LibreOffice Module sfx2 (master) 1
|
#include <objshimp.hxx>
Public Member Functions | |
SfxObjectShell_Impl (SfxObjectShell &_rDocShell) | |
virtual | ~SfxObjectShell_Impl () |
virtual sal_Int16 | getCurrentMacroExecMode () const override |
retrieves the current MacroExecutionMode. More... | |
virtual void | setCurrentMacroExecMode (sal_uInt16 nMacroMode) override |
sets the MacroExecutionMode of the document, as calculated by the DocumentMacroMode class. More... | |
virtual OUString | getDocumentLocation () const override |
returns the origin of the document More... | |
virtual bool | documentStorageHasMacros () const override |
checks whether the document's storage contains sub storages with macros or scripts More... | |
virtual bool | macroCallsSeenWhileLoading () const override |
checks whether the document's contained calls to macros or scripts after loading More... | |
virtual css::uno::Reference< css::document::XEmbeddedScripts > | getEmbeddedDocumentScripts () const override |
provides access to the XEmbeddedScripts interface of the document More... | |
virtual SignatureState | getScriptingSignatureState () override |
returns the state of the signatures for the scripts embedded in the document More... | |
virtual bool | hasTrustedScriptingSignature (bool bAllowUIToAddAuthor) override |
allows to detect whether there is a trusted scripting signature More... | |
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... | |
Additional Inherited Members | |
Protected Member Functions inherited from sfx2::IMacroDocumentAccess | |
~IMacroDocumentAccess () | |
Definition at line 52 of file objshimp.hxx.
SfxObjectShell_Impl::SfxObjectShell_Impl | ( | SfxObjectShell & | _rDocShell | ) |
Definition at line 180 of file objxtor.cxx.
References ALL, ERRCODE_NONE, SfxApplication::GetObjectShells_Impl(), Map100thMM, NONE, SfxGetpApp(), and UNKNOWN.
|
virtual |
Definition at line 238 of file objxtor.cxx.
|
overridevirtual |
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).
Implements sfx2::IMacroDocumentAccess.
Definition at line 1772 of file objmisc.cxx.
References m_xDocStorage.
|
overridevirtual |
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.
Implements sfx2::IMacroDocumentAccess.
Definition at line 1724 of file objmisc.cxx.
References SfxItemSet::GetItem(), SfxMedium::GetItemSet(), SfxObjectShell::GetMedium(), CntUInt16Item::GetValue(), and rDocShell.
|
overridevirtual |
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.
Implements sfx2::IMacroDocumentAccess.
Definition at line 1749 of file objmisc.cxx.
References SfxObjectShell::getDocProperties(), SfxObjectShell::getDocumentBaseURL(), SfxObjectShell::GetMedium(), SfxMedium::GetName(), and rDocShell.
Referenced by hasTrustedScriptingSignature().
|
overridevirtual |
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.
Implements sfx2::IMacroDocumentAccess.
Definition at line 1782 of file objmisc.cxx.
References SfxObjectShell::GetModel(), and rDocShell.
|
overridevirtual |
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>
Implements sfx2::IMacroDocumentAccess.
Definition at line 1787 of file objmisc.cxx.
References BROKEN, SfxObjectShell::GetScriptingSignatureState(), m_bMacroSignBroken, NOSIGNATURES, and rDocShell.
|
overridevirtual |
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>
Implements sfx2::IMacroDocumentAccess.
Definition at line 1800 of file objmisc.cxx.
References SfxMedium::CallApproveHandler(), getDocumentLocation(), SfxObjectShell::GetDocumentSignatureInformation(), SfxMedium::GetInteractionHandler(), SfxObjectShell::GetMedium(), comphelper::getProcessComponentContext(), DocumentSignatures::getSignatureState(), SfxObjectShell::GetStorage(), SfxMedium::GetZipStorageToSign_Impl(), NOTVALIDATED, nScriptingSignatureState, OK, rDocShell, and UNKNOWN.
|
overridevirtual |
checks whether the document's contained calls to macros or scripts after loading
Implements sfx2::IMacroDocumentAccess.
Definition at line 1777 of file objmisc.cxx.
References SfxObjectShell::GetMacroCallsSeenWhileLoading(), and rDocShell.
|
overridevirtual |
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
Implements sfx2::IMacroDocumentAccess.
Definition at line 1739 of file objmisc.cxx.
References SfxMedium::GetItemSet(), SfxObjectShell::GetMedium(), SfxItemSet::Put(), and rDocShell.
SfxBasicManagerHolder SfxObjectShell_Impl::aBasicManager |
Definition at line 55 of file objshimp.hxx.
IndexBitSet SfxObjectShell_Impl::aBitSet |
Definition at line 96 of file objshimp.hxx.
::sfx2::DocumentMacroMode SfxObjectShell_Impl::aMacroMode |
Definition at line 62 of file objshimp.hxx.
Referenced by SfxViewFrame::AppendContainsMacrosInfobar().
OUString SfxObjectShell_Impl::aTempName |
Definition at line 65 of file objshimp.hxx.
OUString SfxObjectShell_Impl::aTitle |
Definition at line 64 of file objshimp.hxx.
bool SfxObjectShell_Impl::bBasicInitialized |
Definition at line 77 of file objshimp.hxx.
bool SfxObjectShell_Impl::bClosing |
Definition at line 70 of file objshimp.hxx.
bool SfxObjectShell_Impl::bForbidReload |
Definition at line 76 of file objshimp.hxx.
bool SfxObjectShell_Impl::bInitialized |
Definition at line 80 of file objshimp.hxx.
Referenced by SfxApplication::NotifyEvent().
bool SfxObjectShell_Impl::bInPrepareClose |
Definition at line 74 of file objshimp.hxx.
bool SfxObjectShell_Impl::bIsAbortingImport |
Definition at line 73 of file objshimp.hxx.
bool SfxObjectShell_Impl::bIsNamedVisible |
Definition at line 72 of file objshimp.hxx.
bool SfxObjectShell_Impl::bIsPrintJobCancelable |
Definition at line 78 of file objshimp.hxx.
bool SfxObjectShell_Impl::bIsSaving |
Definition at line 71 of file objshimp.hxx.
bool SfxObjectShell_Impl::bLoadReadonly |
Definition at line 87 of file objshimp.hxx.
bool SfxObjectShell_Impl::bModalMode |
Definition at line 103 of file objshimp.hxx.
bool SfxObjectShell_Impl::bModelInitialized |
Definition at line 81 of file objshimp.hxx.
bool SfxObjectShell_Impl::bOwnsStorage |
Definition at line 79 of file objshimp.hxx.
bool SfxObjectShell_Impl::bPreparedForClose |
Definition at line 75 of file objshimp.hxx.
bool SfxObjectShell_Impl::bPreserveVersions |
Definition at line 82 of file objshimp.hxx.
bool SfxObjectShell_Impl::bQueryLoadTemplate |
Definition at line 86 of file objshimp.hxx.
bool SfxObjectShell_Impl::bReadOnlyUI |
Definition at line 105 of file objshimp.hxx.
bool SfxObjectShell_Impl::bRunningMacro |
Definition at line 104 of file objshimp.hxx.
bool SfxObjectShell_Impl::bSaveVersionOnClose |
Definition at line 90 of file objshimp.hxx.
bool SfxObjectShell_Impl::bUseThumbnailSave |
Definition at line 89 of file objshimp.hxx.
bool SfxObjectShell_Impl::bUseUserData |
Definition at line 88 of file objshimp.hxx.
ErrCode SfxObjectShell_Impl::lErr |
Definition at line 97 of file objshimp.hxx.
css::uno::Sequence< css::beans::PropertyValue > SfxObjectShell_Impl::m_aModifyPasswordInfo |
Definition at line 128 of file objshimp.hxx.
std::vector<InfobarData> SfxObjectShell_Impl::m_aPendingInfobars |
Holds Infobars until View is fully loaded.
Definition at line 135 of file objshimp.hxx.
Referenced by SfxObjectShell::AppendInfoBarWhenReady(), and SfxObjectShell::getPendingInfobars().
std::unordered_map<sal_uInt16, NamedColor> SfxObjectShell_Impl::m_aRecentColors |
Definition at line 138 of file objshimp.hxx.
OUString SfxObjectShell_Impl::m_aSharedFileURL |
Definition at line 122 of file objshimp.hxx.
tools::Rectangle SfxObjectShell_Impl::m_aVisArea |
Definition at line 114 of file objshimp.hxx.
bool SfxObjectShell_Impl::m_bAllowModifiedBackAfterSigning |
Definition at line 132 of file objshimp.hxx.
bool SfxObjectShell_Impl::m_bAllowShareControlFileClean |
Definition at line 92 of file objshimp.hxx.
bool SfxObjectShell_Impl::m_bConfigOptionsChecked |
Definition at line 93 of file objshimp.hxx.
bool SfxObjectShell_Impl::m_bCreateTempStor |
Definition at line 117 of file objshimp.hxx.
bool SfxObjectShell_Impl::m_bDocRecoverySupport |
Definition at line 85 of file objshimp.hxx.
bool SfxObjectShell_Impl::m_bEnableSetModified |
Definition at line 111 of file objshimp.hxx.
bool SfxObjectShell_Impl::m_bIncomplEncrWarnShown |
Definition at line 124 of file objshimp.hxx.
bool SfxObjectShell_Impl::m_bIsInit |
Definition at line 120 of file objshimp.hxx.
bool SfxObjectShell_Impl::m_bIsModified |
Definition at line 112 of file objshimp.hxx.
bool SfxObjectShell_Impl::m_bMacroCallsSeenWhileLoading |
Definition at line 94 of file objshimp.hxx.
bool SfxObjectShell_Impl::m_bMacroSignBroken |
Definition at line 83 of file objshimp.hxx.
Referenced by getScriptingSignatureState().
bool SfxObjectShell_Impl::m_bModifyPasswordEntered |
Definition at line 129 of file objshimp.hxx.
bool SfxObjectShell_Impl::m_bNoBasicCapabilities |
Definition at line 84 of file objshimp.hxx.
bool SfxObjectShell_Impl::m_bSavingForSigning |
If true, then this is not a real save, just the signatures change.
Definition at line 131 of file objshimp.hxx.
bool SfxObjectShell_Impl::m_bSharedXMLFlag |
Definition at line 91 of file objshimp.hxx.
MapUnit SfxObjectShell_Impl::m_nMapUnit |
Definition at line 115 of file objshimp.hxx.
sal_uInt32 SfxObjectShell_Impl::m_nModifyPasswordHash |
Definition at line 127 of file objshimp.hxx.
css::uno::Reference< css::embed::XStorage > SfxObjectShell_Impl::m_xDocStorage |
Definition at line 118 of file objshimp.hxx.
Referenced by documentStorageHasMacros().
std::unique_ptr<::comphelper::EmbeddedObjectContainer> SfxObjectShell_Impl::mxObjectContainer |
Definition at line 54 of file objshimp.hxx.
SignatureState SfxObjectShell_Impl::nDocumentSignatureState |
Definition at line 68 of file objshimp.hxx.
SfxEventHintId SfxObjectShell_Impl::nEventId |
Definition at line 98 of file objshimp.hxx.
SfxLoadedFlags SfxObjectShell_Impl::nFlagsInProgress |
Definition at line 102 of file objshimp.hxx.
SfxLoadedFlags SfxObjectShell_Impl::nLoadedFlags |
Definition at line 101 of file objshimp.hxx.
Referenced by SfxViewFrame::ExecReload_Impl(), and SfxViewFrame::StateReload_Impl().
SignatureState SfxObjectShell_Impl::nScriptingSignatureState |
Definition at line 69 of file objshimp.hxx.
Referenced by hasTrustedScriptingSignature().
sal_uInt16 SfxObjectShell_Impl::nStyleFilter |
Definition at line 109 of file objshimp.hxx.
DateTime SfxObjectShell_Impl::nTime |
Definition at line 66 of file objshimp.hxx.
sal_uInt16 SfxObjectShell_Impl::nVisualDocumentNumber |
Definition at line 67 of file objshimp.hxx.
::rtl::Reference< SfxBaseModel > SfxObjectShell_Impl::pBaseModel |
Definition at line 108 of file objshimp.hxx.
SfxProgress* SfxObjectShell_Impl::pProgress |
Definition at line 63 of file objshimp.hxx.
std::unique_ptr<AutoReloadTimer_Impl> SfxObjectShell_Impl::pReloadTimer |
Definition at line 100 of file objshimp.hxx.
Referenced by SfxViewFrame::ExecReload_Impl(), and AutoReloadTimer_Impl::Invoke().
SfxObjectShell& SfxObjectShell_Impl::rDocShell |
Definition at line 56 of file objshimp.hxx.
Referenced by getCurrentMacroExecMode(), getDocumentLocation(), getEmbeddedDocumentScripts(), getScriptingSignatureState(), hasTrustedScriptingSignature(), macroCallsSeenWhileLoading(), and setCurrentMacroExecMode().
css::uno::Reference< css::script::XLibraryContainer > SfxObjectShell_Impl::xBasicLibraries |
Definition at line 58 of file objshimp.hxx.
css::uno::Reference< css::script::XLibraryContainer > SfxObjectShell_Impl::xDialogLibraries |
Definition at line 60 of file objshimp.hxx.
tools::SvRef<SvRefBase> SfxObjectShell_Impl::xHeaderAttributes |
Definition at line 106 of file objshimp.hxx.