LibreOffice Module sfx2 (master) 1
|
provides access to several settings of a document, which are needed by ->DocumentMacroMode to properly determine the current macro execution mode of this document More...
#include <docmacromode.hxx>
Public Member Functions | |
virtual sal_Int16 | getCurrentMacroExecMode () const =0 |
retrieves the current MacroExecutionMode. More... | |
virtual void | setCurrentMacroExecMode (sal_uInt16)=0 |
sets the MacroExecutionMode of the document, as calculated by the DocumentMacroMode class. More... | |
virtual OUString | getDocumentLocation () const =0 |
returns the origin of the document More... | |
virtual bool | documentStorageHasMacros () const =0 |
checks whether the document's storage contains sub storages with macros or scripts More... | |
virtual bool | macroCallsSeenWhileLoading () const =0 |
checks whether the document's contained calls to macros or scripts after loading More... | |
virtual css::uno::Reference< css::document::XEmbeddedScripts > | getEmbeddedDocumentScripts () const =0 |
provides access to the XEmbeddedScripts interface of the document More... | |
virtual SignatureState | getScriptingSignatureState ()=0 |
returns the state of the signatures for the scripts embedded in the document More... | |
virtual bool | hasTrustedScriptingSignature (bool bAllowUIToAddAuthor)=0 |
allows to detect whether there is a trusted scripting signature More... | |
Protected Member Functions | |
~IMacroDocumentAccess () | |
provides access to several settings of a document, which are needed by ->DocumentMacroMode to properly determine the current macro execution mode of this document
Definition at line 45 of file docmacromode.hxx.
|
inlineprotected |
Definition at line 161 of file docmacromode.hxx.
|
pure virtual |
checks whether the document's storage contains sub storages with macros or scripts
A default implementation of this method will simply call DocumentMacroMode::storageHasMacros with the document's root storage. However, there might be document types where this isn't sufficient (e.g. database documents which contain sub documents which can also contain macro/script storages).
Implemented in SfxObjectShell_Impl.
|
pure virtual |
retrieves the current MacroExecutionMode.
Usually, this is initialized from the media descriptor used to load the document, respectively the one passed into the document's XModel::attachResource call.
If no such mode was passed there, document implementations should return MacroExecMode::NEVER_EXECUTE.
Implemented in SfxObjectShell_Impl.
|
pure virtual |
returns the origin of the document
This usually is the document's location, or, if the document has been newly created from a template, then the location of the template. Location here means the complete path of the document, including the file name.
Implemented in SfxObjectShell_Impl.
|
pure virtual |
provides access to the XEmbeddedScripts interface of the document
Implementations are allowed to return <NULL> here if and only if they do not (yet) support embedding scripts.
Implemented in SfxObjectShell_Impl.
|
pure virtual |
returns the state of the signatures for the scripts embedded in the document
Note: On the medium run, the signature handling of a document should be outsourced into a dedicated class, instead of being hard-wired into the SfxObjectShell. This class could then be used outside the SfxObjectShell (e.g. in Base documents), too. When this happens, this method here becomes should be replaced by a method at this new class.
@seealso <sfx2/signaturestate.hxx>
Implemented in SfxObjectShell_Impl.
|
pure virtual |
allows to detect whether there is a trusted scripting signature
Note: On the medium run, the signature handling of a document should be outsourced into a dedicated class, instead of being hard-wired into the SfxObjectShell. This class could then be used outside the SfxObjectShell (e.g. in Base documents), too. When this happens, this method here should be replaced by a method at this new class.
@seealso <sfx2/signaturestate.hxx>
Implemented in SfxObjectShell_Impl.
|
pure virtual |
checks whether the document's contained calls to macros or scripts after loading
Implemented in SfxObjectShell_Impl.
|
pure virtual |
sets the MacroExecutionMode of the document, as calculated by the DocumentMacroMode class.
Effectively, the existence of this method means that the responsibility to store the current macro execution mode is not with the DocumentMacroMode instance, but with the document instance itself.
Usually, a document implementation will simply put the macro execution mode into its media descriptor, as returned by XModel::getArgs.
see getCurrentMacroExecMode
Implemented in SfxObjectShell_Impl.