Class SOLib


public class SOLib extends ArDkLib
  • Method Details

    • getLib

      public static SOLib getLib(android.app.Activity activity)
      Get a reference to the SOLib, creating one if there is not one already. There is only ever one SOLib per activity. Different Activities will get different SOLibs.
      Parameters:
      activity - The current Activity.
    • initSecureFS

      public void initSecureFS(SOSecureFS impl)
      Register/release the SecureFS implementation
    • finSecureFS

      public void finSecureFS()
    • isDocTypeDoc

      public boolean isDocTypeDoc(String path)
      get the doc type from its extension
    • isDocTypeExcel

      public boolean isDocTypeExcel(String path)
    • isDocTypePowerPoint

      public boolean isDocTypePowerPoint(String path)
    • isDocTypePdf

      public boolean isDocTypePdf(String path)
    • isDocTypeImage

      public boolean isDocTypeImage(String path)
    • isDocTypeOther

      public boolean isDocTypeOther(String path)
    • getDocTypeFromFileExtension

      public int getDocTypeFromFileExtension(String path)
    • setPptEmptyPlaceholderText

      public static void setPptEmptyPlaceholderText(String text)
    • getDocTypeFromFileContents

      public int getDocTypeFromFileContents(String path)
      get the doc type from file contents
    • openDocument

      public ArDkDoc openDocument(String path, SODocLoadListener listener, android.content.Context context, ConfigOptions docCfgOptions)
      Load a document.
      Specified by:
      openDocument in class ArDkLib
      Parameters:
      path - The path to the file to load.
      listener - SODocLoadListener to monitor progress of doc load.
      Returns:
      the loaded document.
    • finalize

      protected void finalize() throws Throwable
      Finalizer. We only ever have 1 instance of the Lib. When it's finished, shut down the underlying C lib.
      Overrides:
      finalize in class Object
      Throws:
      Throwable
    • installFonts

      public int installFonts(String path)
      Native function to set the system font path (usually /system/fonts/).
      Returns:
      0 if success, non-zero otherwise.
    • getFormulaeCategories

      public String[] getFormulaeCategories()
    • getFormulae

      public String[] getFormulae(String category)
    • getVersionInfo

      public String[] getVersionInfo()
    • isTrackChangesEnabled

      public boolean isTrackChangesEnabled()
    • setTrackChangesEnabled

      public void setTrackChangesEnabled(boolean enabled)
    • isAnimationEnabled

      public boolean isAnimationEnabled()
    • setAnimationEnabled

      public void setAnimationEnabled(boolean enabled)
    • isOdtEditingEnabled

      public boolean isOdtEditingEnabled()
    • getPowerpointEmptyPlaceholderText

      public String[] getPowerpointEmptyPlaceholderText()
    • setPowerpointEmptyPlaceholderText

      public void setPowerpointEmptyPlaceholderText(String placeholder)
    • createBitmap

      public ArDkBitmap createBitmap(int w, int h)
      Specified by:
      createBitmap in class ArDkLib
    • reclaimMemory

      public void reclaimMemory()
      Overrides:
      reclaimMemory in class ArDkLib