LibreOffice Module android (master) 1
|
Main activity of the LibreOffice App. More...
Classes | |
class | DocumentPartClickListener |
Static Public Member Functions | |
static boolean | isExperimentalMode () |
static boolean | isDeveloperMode () |
static boolean | isReadOnlyMode () |
static void | setDocumentChanged (boolean changed) |
Static Public Attributes | |
static final String | ENABLE_EXPERIMENTAL_PREFS_KEY = "ENABLE_EXPERIMENTAL" |
static LOKitThread | loKitThread |
Protected Member Functions | |
void | onResume () |
void | onPause () |
void | onStart () |
void | onStop () |
void | onDestroy () |
void | onActivityResult (int requestCode, int resultCode, Intent data) |
Private Member Functions | |
void | updatePreferences () |
void | loadNewDocument (String newDocumentType) |
boolean | copyFileToTemp (Uri documentUri) |
void | saveDocumentAs (Uri newUri) |
Saves the document under the given URI using ODF format and uses that URI from now on for all operations. More... | |
void | exportToPDF (final Uri uri) |
String | getODFMimeTypeForDocument () |
Returns the ODF MIME type that can be used for the current document, regardless of whether the document is an ODF Document or not (e.g. More... | |
boolean | isTemplate (final Uri documentUri) |
Returns whether the MIME type for the URI is considered one for a document template. More... | |
void | showSoftKeyboardDirect () |
void | hideSoftKeyboardDirect () |
Hides software keyboard. More... | |
boolean | copyStream (InputStream inputStream, OutputStream outputStream) |
Copies everything from the given input stream to the given output stream and closes both streams in the end. More... | |
boolean | copyUriToStream (final Uri inputUri, final OutputStream outputStream) |
Copies everything from the given Uri to the given OutputStream and closes the OutputStream in the end. More... | |
boolean | copyStreamToUri (final InputStream inputStream, final Uri outputUri) |
Copies everything from the given InputStream to the given URI and closes the InputStream in the end. More... | |
Static Private Member Functions | |
static boolean | copyFromAssets (AssetManager assetManager, String fromAssetPath, String targetDir) |
static boolean | copyAsset (AssetManager assetManager, String fromAssetPath, String toPath) |
Private Attributes | |
GeckoLayerClient | mLayerClient |
DrawerLayout | mDrawerLayout |
ListView | mDrawerList |
final List< DocumentPartView > | mDocumentPartView = new ArrayList<DocumentPartView>() |
DocumentPartViewListAdapter | mDocumentPartViewListAdapter |
DocumentOverlay | mDocumentOverlay |
Uri | mDocumentUri |
URI to save the document to. More... | |
File | mTempFile = null |
Temporary local copy of the document. More... | |
File | mTempSlideShowFile = null |
FormattingController | mFormattingController |
ToolbarController | mToolbarController |
FontController | mFontController |
SearchController | mSearchController |
UNOCommandsController | mUNOCommandsController |
CalcHeadersController | mCalcHeadersController |
LOKitTileProvider | mTileProvider |
String | mPassword |
boolean | mPasswordProtected |
boolean | mbSkipNextRefresh |
boolean | isKeyboardOpen = false |
boolean | isFormattingToolbarOpen = false |
boolean | isSearchToolbarOpen = false |
boolean | isUNOCommandsToolbarOpen = false |
Static Private Attributes | |
static final String | LOGTAG = "LibreOfficeMainActivity" |
static final String | ASSETS_EXTRACTED_PREFS_KEY = "ASSETS_EXTRACTED" |
static final String | ENABLE_DEVELOPER_PREFS_KEY = "ENABLE_DEVELOPER" |
static final int | REQUEST_CODE_SAVEAS = 12345 |
static final int | REQUEST_CODE_EXPORT_TO_PDF = 12346 |
static boolean | mIsExperimentalMode |
static boolean | mIsDeveloperMode |
static boolean | mbISReadOnlyMode |
static boolean | isDocumentChanged = false |
Main activity of the LibreOffice App.
It is started in the UI thread.
Definition at line 60 of file LibreOfficeMainActivity.java.
|
inline |
Definition at line 794 of file LibreOfficeMainActivity.java.
Referenced by org.libreoffice.ToolbarController.onMenuItemClick().
|
inlinestaticprivate |
Definition at line 943 of file LibreOfficeMainActivity.java.
|
inlineprivate |
Definition at line 290 of file LibreOfficeMainActivity.java.
|
inlinestaticprivate |
|
inlineprivate |
Copies everything from the given input stream to the given output stream and closes both streams in the end.
Definition at line 978 of file LibreOfficeMainActivity.java.
|
inlineprivate |
Copies everything from the given InputStream to the given URI and closes the InputStream in the end.
Whether copy operation was successful.
Definition at line 1043 of file LibreOfficeMainActivity.java.
|
inlineprivate |
Copies everything from the given Uri to the given OutputStream and closes the OutputStream in the end.
The copy operation runs in a separate thread, but the method only returns after the thread has finished its execution. This can be used to copy in a blocking way when network access is involved, which is not allowed from the main thread, but that may happen when an underlying DocumentsProvider (like the NextCloud one) does network access.
Whether copy operation was successful.
Definition at line 1009 of file LibreOfficeMainActivity.java.
|
inline |
Definition at line 823 of file LibreOfficeMainActivity.java.
Referenced by org.libreoffice.ToolbarController.onMenuItemClick().
|
inline |
Definition at line 545 of file LibreOfficeMainActivity.java.
References org.libreoffice.LOKitShell.getMainHandler(), and run().
|
inline |
Definition at line 349 of file LibreOfficeMainActivity.java.
References org.libreoffice.ui.FileUtilities.MIMETYPE_PDF.
Referenced by org.libreoffice.ToolbarController.onMenuItemClick().
|
inlineprivate |
Definition at line 358 of file LibreOfficeMainActivity.java.
References File, org.libreoffice.LOKitShell.getMainHandler(), getString(), R, and run().
|
inline |
Definition at line 768 of file LibreOfficeMainActivity.java.
|
inline |
Definition at line 286 of file LibreOfficeMainActivity.java.
References org.libreoffice.overlay.DocumentOverlay.getCurrentCursorPosition().
Referenced by org.libreoffice.SearchController.onClick().
|
inline |
|
inline |
Definition at line 541 of file LibreOfficeMainActivity.java.
|
inline |
Definition at line 555 of file LibreOfficeMainActivity.java.
Referenced by org.libreoffice.InvalidationHandler.unoCommandResult().
|
inline |
Definition at line 776 of file LibreOfficeMainActivity.java.
Referenced by org.libreoffice.InvalidationHandler.stateChanged().
|
inline |
Definition at line 780 of file LibreOfficeMainActivity.java.
Referenced by org.libreoffice.InvalidationHandler.stateChanged().
|
inline |
Definition at line 105 of file LibreOfficeMainActivity.java.
References org.libreoffice.LibreOfficeMainActivity.mLayerClient.
Referenced by org.libreoffice.canvas.AdjustLengthLine.dragEnd(), org.libreoffice.InvalidationHandler.InvalidationHandler(), org.libreoffice.LOKitShell.moveViewportTo(), org.mozilla.gecko.gfx.LayerView.registerCxxCompositor(), org.libreoffice.canvas.GraphicSelection.sendGraphicSelection(), org.libreoffice.canvas.CalcSelectionBox.signalHandleMove(), and org.libreoffice.canvas.SelectionHandle.signalHandleMove().
|
inlineprivate |
Returns the ODF MIME type that can be used for the current document, regardless of whether the document is an ODF Document or not (e.g.
returns FileUtilities.MIMETYPE_OPENDOCUMENT_TEXT for a DOCX file).
Definition at line 395 of file LibreOfficeMainActivity.java.
References Log, LOGTAG, org.libreoffice.ui.FileUtilities.MIMETYPE_OPENDOCUMENT_GRAPHICS, org.libreoffice.ui.FileUtilities.MIMETYPE_OPENDOCUMENT_PRESENTATION, org.libreoffice.ui.FileUtilities.MIMETYPE_OPENDOCUMENT_SPREADSHEET, org.libreoffice.ui.FileUtilities.MIMETYPE_OPENDOCUMENT_TEXT, and String.
|
inline |
Definition at line 861 of file LibreOfficeMainActivity.java.
Referenced by org.libreoffice.ToolbarController.onMenuItemClick(), org.libreoffice.InvalidationHandler.pageSizeChanged(), org.libreoffice.FontController.sendFontBackColorChange(), org.libreoffice.InvalidationHandler.stateChanged(), org.libreoffice.InvalidationHandler.textSelection(), and org.libreoffice.InvalidationHandler.unoCommandResult().
|
inline |
Definition at line 772 of file LibreOfficeMainActivity.java.
Referenced by org.libreoffice.InvalidationHandler.handleGeneralChangeState(), and org.libreoffice.InvalidationHandler.textSelection().
|
inline |
Definition at line 899 of file LibreOfficeMainActivity.java.
|
inline |
Definition at line 633 of file LibreOfficeMainActivity.java.
References org.libreoffice.LOKitShell.getMainHandler(), R, run(), and View.
Referenced by org.libreoffice.LibreOfficeMainActivity.onCreate().
|
inline |
Definition at line 671 of file LibreOfficeMainActivity.java.
References org.libreoffice.LOKitShell.getMainHandler(), and run().
|
inline |
Definition at line 744 of file LibreOfficeMainActivity.java.
Referenced by org.libreoffice.LOKitShell.hideProgressSpinner().
|
inline |
Definition at line 702 of file LibreOfficeMainActivity.java.
References org.libreoffice.LOKitShell.getMainHandler(), and run().
|
inline |
Hides software keyboard on UI thread.
Definition at line 604 of file LibreOfficeMainActivity.java.
References org.libreoffice.LOKitShell.getMainHandler(), and run().
Referenced by org.libreoffice.InvalidationHandler.handleGraphicSelectionState(), and org.libreoffice.InvalidationHandler.handleNoneState().
|
inlineprivate |
Hides software keyboard.
Definition at line 616 of file LibreOfficeMainActivity.java.
|
inline |
Definition at line 731 of file LibreOfficeMainActivity.java.
References org.libreoffice.LOKitShell.getMainHandler(), and run().
|
inline |
Definition at line 880 of file LibreOfficeMainActivity.java.
References org.libreoffice.LOKitShell.getMainHandler(), org.mozilla.gecko.gfx.GeckoLayerClient.getView(), R, run(), org.libreoffice.overlay.CalcHeadersController.setupHeaderPopupView(), and View.
|
inlinestatic |
Definition at line 113 of file LibreOfficeMainActivity.java.
References org.libreoffice.LibreOfficeMainActivity.mIsDeveloperMode.
|
inline |
Definition at line 831 of file LibreOfficeMainActivity.java.
|
inlinestatic |
Definition at line 109 of file LibreOfficeMainActivity.java.
References org.libreoffice.LibreOfficeMainActivity.mIsExperimentalMode.
Referenced by org.libreoffice.overlay.CalcHeadersView.showHeaderPopup().
|
inline |
Definition at line 876 of file LibreOfficeMainActivity.java.
|
inlinestatic |
Definition at line 895 of file LibreOfficeMainActivity.java.
Referenced by org.libreoffice.LOKitShell.isEditingEnabled().
|
inlineprivate |
Returns whether the MIME type for the URI is considered one for a document template.
Definition at line 413 of file LibreOfficeMainActivity.java.
References org.libreoffice.ui.FileUtilities.isTemplateMimeType(), and String.
|
inlineprivate |
Definition at line 280 of file LibreOfficeMainActivity.java.
References File, org.libreoffice.LOKitShell.sendNewDocumentLoadEvent(), and String.
|
inlineprotected |
Definition at line 1106 of file LibreOfficeMainActivity.java.
|
inline |
Definition at line 504 of file LibreOfficeMainActivity.java.
References R.
|
inline |
Definition at line 124 of file LibreOfficeMainActivity.java.
References org.libreoffice.SettingsListenerModel.getInstance(), org.libreoffice.LibreOfficeMainActivity.hideBottomToolbar(), Log, org.libreoffice.LibreOfficeMainActivity.LOGTAG, org.libreoffice.LibreOfficeMainActivity.mFormattingController, org.libreoffice.LibreOfficeMainActivity.mToolbarController, R, org.libreoffice.SettingsListenerModel.setListener(), org.libreoffice.LibreOfficeMainActivity.updatePreferences(), and View.
|
inlineprotected |
Definition at line 486 of file LibreOfficeMainActivity.java.
References org.mozilla.gecko.gfx.GeckoLayerClient.destroy(), Log, LOGTAG, and org.libreoffice.LOKitShell.sendCloseEvent().
|
inlineprotected |
Definition at line 463 of file LibreOfficeMainActivity.java.
|
inlineprotected |
Definition at line 450 of file LibreOfficeMainActivity.java.
References org.libreoffice.ToolbarController.getEditModeStatus(), Log, and LOGTAG.
|
inlineprotected |
Definition at line 469 of file LibreOfficeMainActivity.java.
References Log, LOGTAG, org.libreoffice.LOEvent.REFRESH, and org.libreoffice.LOKitShell.sendEvent().
|
inlineprotected |
Definition at line 479 of file LibreOfficeMainActivity.java.
|
inline |
Definition at line 784 of file LibreOfficeMainActivity.java.
Referenced by org.libreoffice.ToolbarController.onMenuItemClick().
|
inline |
Definition at line 1075 of file LibreOfficeMainActivity.java.
References File, org.libreoffice.LOKitShell.sendSaveCopyAsEvent(), and String.
Referenced by org.libreoffice.ToolbarController.onMenuItemClick().
|
inline |
Definition at line 845 of file LibreOfficeMainActivity.java.
References org.libreoffice.PasswordDialogFragment.setLOMainActivity().
Referenced by org.libreoffice.InvalidationHandler.documentPassword().
|
inline |
Definition at line 800 of file LibreOfficeMainActivity.java.
References R.
Referenced by org.libreoffice.ToolbarController.onMenuItemClick().
|
inline |
Save the document.
Definition at line 312 of file LibreOfficeMainActivity.java.
References R, org.libreoffice.LOKitShell.sendEvent(), and org.libreoffice.LOEvent.UNO_COMMAND_NOTIFY.
|
inline |
Open file chooser and save the document to the URI selected there.
Definition at line 322 of file LibreOfficeMainActivity.java.
References String.
Referenced by org.libreoffice.ToolbarController.onMenuItemClick().
|
inlineprivate |
Saves the document under the given URI using ODF format and uses that URI from now on for all operations.
newUri | URI to save the document and use from now on. |
Definition at line 337 of file LibreOfficeMainActivity.java.
References org.libreoffice.ui.FileUtilities.retrieveDisplayNameForDocumentUri(), and String.
|
inline |
Definition at line 418 of file LibreOfficeMainActivity.java.
Referenced by org.libreoffice.InvalidationHandler.unoCommandResult().
|
inline |
Definition at line 865 of file LibreOfficeMainActivity.java.
|
inlinestatic |
Definition at line 903 of file LibreOfficeMainActivity.java.
References changed().
Referenced by org.libreoffice.ToolbarController.onMenuItemClick(), and org.libreoffice.InvalidationHandler.unoCommandResult().
|
inline |
Definition at line 852 of file LibreOfficeMainActivity.java.
Referenced by org.libreoffice.InvalidationHandler.documentPassword().
|
inline |
Definition at line 872 of file LibreOfficeMainActivity.java.
Referenced by org.libreoffice.InvalidationHandler.documentPassword().
|
inline |
Definition at line 857 of file LibreOfficeMainActivity.java.
|
inline |
Implements org.libreoffice.SettingsListenerModel.OnSettingsPreferenceChangedListener.
Definition at line 838 of file LibreOfficeMainActivity.java.
|
inline |
Definition at line 789 of file LibreOfficeMainActivity.java.
Referenced by org.libreoffice.ToolbarController.onMenuItemClick().
|
inline |
Definition at line 748 of file LibreOfficeMainActivity.java.
References R.
|
inline |
Definition at line 624 of file LibreOfficeMainActivity.java.
References org.libreoffice.LOKitShell.getMainHandler(), and run().
|
inline |
Definition at line 1071 of file LibreOfficeMainActivity.java.
|
inline |
Definition at line 649 of file LibreOfficeMainActivity.java.
References org.libreoffice.LOKitShell.getMainHandler(), R, run(), and View.
Referenced by org.libreoffice.ToolbarController.onMenuItemClick().
|
inline |
Definition at line 740 of file LibreOfficeMainActivity.java.
Referenced by org.libreoffice.LOKitShell.showProgressSpinner().
|
inline |
Definition at line 680 of file LibreOfficeMainActivity.java.
References org.libreoffice.LOKitShell.getMainHandler(), R, run(), and View.
Referenced by org.libreoffice.ToolbarController.onMenuItemClick().
|
inline |
Definition at line 827 of file LibreOfficeMainActivity.java.
Referenced by org.libreoffice.ToolbarController.onMenuItemClick().
|
inline |
Show software keyboard.
Force the request on main thread.
Definition at line 563 of file LibreOfficeMainActivity.java.
References org.libreoffice.LOKitShell.getMainHandler(), and run().
Referenced by org.libreoffice.ToolbarController.onMenuItemClick().
|
inlineprivate |
Definition at line 575 of file LibreOfficeMainActivity.java.
References R.
|
inline |
Definition at line 589 of file LibreOfficeMainActivity.java.
References org.libreoffice.LOKitShell.getMainHandler(), R, run(), and View.
Referenced by org.libreoffice.InvalidationHandler.handleCursorState().
|
inline |
Definition at line 711 of file LibreOfficeMainActivity.java.
References org.libreoffice.LOKitShell.getMainHandler(), R, run(), and View.
Referenced by org.libreoffice.ToolbarController.onMenuItemClick().
|
inline |
Definition at line 1087 of file LibreOfficeMainActivity.java.
References R.
|
inlineprivate |
Definition at line 266 of file LibreOfficeMainActivity.java.
References getApplicationInfo().
Referenced by org.libreoffice.LibreOfficeMainActivity.onCreate().
|
staticprivate |
Definition at line 64 of file LibreOfficeMainActivity.java.
|
staticprivate |
Definition at line 65 of file LibreOfficeMainActivity.java.
|
static |
Definition at line 63 of file LibreOfficeMainActivity.java.
Referenced by org.libreoffice.ui.LibreOfficeUIActivity.createUI().
|
staticprivate |
Definition at line 120 of file LibreOfficeMainActivity.java.
|
private |
Definition at line 118 of file LibreOfficeMainActivity.java.
|
private |
Definition at line 117 of file LibreOfficeMainActivity.java.
|
private |
Definition at line 119 of file LibreOfficeMainActivity.java.
|
private |
Definition at line 121 of file LibreOfficeMainActivity.java.
|
staticprivate |
Definition at line 62 of file LibreOfficeMainActivity.java.
Referenced by org.libreoffice.LibreOfficeMainActivity.onCreate().
|
static |
Definition at line 70 of file LibreOfficeMainActivity.java.
Referenced by org.libreoffice.LOKitShell.sendEvent().
|
staticprivate |
Definition at line 76 of file LibreOfficeMainActivity.java.
|
private |
Definition at line 103 of file LibreOfficeMainActivity.java.
|
private |
Definition at line 99 of file LibreOfficeMainActivity.java.
|
private |
Definition at line 84 of file LibreOfficeMainActivity.java.
|
private |
Definition at line 82 of file LibreOfficeMainActivity.java.
|
private |
Definition at line 83 of file LibreOfficeMainActivity.java.
|
private |
URI to save the document to.
Definition at line 86 of file LibreOfficeMainActivity.java.
|
private |
Definition at line 78 of file LibreOfficeMainActivity.java.
|
private |
Definition at line 81 of file LibreOfficeMainActivity.java.
|
private |
Definition at line 96 of file LibreOfficeMainActivity.java.
|
private |
Definition at line 94 of file LibreOfficeMainActivity.java.
Referenced by org.libreoffice.LibreOfficeMainActivity.onCreate().
|
staticprivate |
Definition at line 75 of file LibreOfficeMainActivity.java.
Referenced by org.libreoffice.LibreOfficeMainActivity.isDeveloperMode().
|
staticprivate |
Definition at line 74 of file LibreOfficeMainActivity.java.
Referenced by org.libreoffice.LibreOfficeMainActivity.isExperimentalMode().
|
private |
Definition at line 72 of file LibreOfficeMainActivity.java.
Referenced by org.libreoffice.LibreOfficeMainActivity.getLayerClient().
|
private |
Definition at line 101 of file LibreOfficeMainActivity.java.
|
private |
Definition at line 102 of file LibreOfficeMainActivity.java.
|
private |
Definition at line 97 of file LibreOfficeMainActivity.java.
|
private |
Temporary local copy of the document.
Definition at line 88 of file LibreOfficeMainActivity.java.
|
private |
Definition at line 89 of file LibreOfficeMainActivity.java.
|
private |
Definition at line 100 of file LibreOfficeMainActivity.java.
|
private |
Definition at line 95 of file LibreOfficeMainActivity.java.
Referenced by org.libreoffice.LibreOfficeMainActivity.onCreate().
|
private |
Definition at line 98 of file LibreOfficeMainActivity.java.
|
staticprivate |
Definition at line 67 of file LibreOfficeMainActivity.java.
|
staticprivate |
Definition at line 66 of file LibreOfficeMainActivity.java.