LibreOffice Module sfx2 (master) 1
Public Member Functions | Public Attributes | List of all members
SfxObjectShell_Impl Struct Referencefinal

#include <objshimp.hxx>

Inheritance diagram for SfxObjectShell_Impl:
[legend]
Collaboration diagram for SfxObjectShell_Impl:
[legend]

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...
 

Public Attributes

std::unique_ptr<::comphelper::EmbeddedObjectContainermxObjectContainer
 
SfxBasicManagerHolder aBasicManager
 
SfxObjectShellrDocShell
 
css::uno::Reference< css::script::XLibraryContainer > xBasicLibraries
 
css::uno::Reference< css::script::XLibraryContainer > xDialogLibraries
 
::sfx2::DocumentMacroMode aMacroMode
 
SfxProgresspProgress
 
OUString aTitle
 
OUString aTempName
 
DateTime nTime
 
sal_uInt16 nVisualDocumentNumber
 
SignatureState nDocumentSignatureState
 
SignatureState nScriptingSignatureState
 
bool bClosing:1
 
bool bIsSaving:1
 
bool bIsNamedVisible:1
 
bool bIsAbortingImport:1
 
bool bInPrepareClose: 1
 
bool bPreparedForClose: 1
 
bool bForbidReload: 1
 
bool bBasicInitialized:1
 
bool bIsPrintJobCancelable:1
 
bool bOwnsStorage:1
 
bool bInitialized:1
 
bool bModelInitialized:1
 
bool bPreserveVersions:1
 
bool m_bMacroSignBroken:1
 
bool m_bNoBasicCapabilities:1
 
bool m_bDocRecoverySupport:1
 
bool bQueryLoadTemplate:1
 
bool bLoadReadonly:1
 
bool bUseUserData:1
 
bool bUseThumbnailSave:1
 
bool bSaveVersionOnClose:1
 
bool m_bSharedXMLFlag:1
 
bool m_bAllowShareControlFileClean:1
 
bool m_bConfigOptionsChecked:1
 
bool m_bMacroCallsSeenWhileLoading:1
 
IndexBitSet aBitSet
 
ErrCode lErr
 
SfxEventHintId nEventId
 
std::unique_ptr< AutoReloadTimer_ImplpReloadTimer
 
SfxLoadedFlags nLoadedFlags
 
SfxLoadedFlags nFlagsInProgress
 
bool bModalMode
 
bool bRunningMacro
 
bool bReadOnlyUI
 
tools::SvRef< SvRefBasexHeaderAttributes
 
::rtl::Reference< SfxBaseModelpBaseModel
 
sal_uInt16 nStyleFilter
 
bool m_bEnableSetModified
 
bool m_bIsModified
 
tools::Rectangle m_aVisArea
 
MapUnit m_nMapUnit
 
bool m_bCreateTempStor
 
css::uno::Reference< css::embed::XStorage > m_xDocStorage
 
bool m_bIsInit
 
OUString m_aSharedFileURL
 
bool m_bIncomplEncrWarnShown
 
sal_uInt32 m_nModifyPasswordHash
 
css::uno::Sequence< css::beans::PropertyValue > m_aModifyPasswordInfo
 
bool m_bModifyPasswordEntered
 
bool m_bSavingForSigning
 If true, then this is not a real save, just the signatures change. More...
 
bool m_bAllowModifiedBackAfterSigning
 
std::vector< InfobarDatam_aPendingInfobars
 Holds Infobars until View is fully loaded. More...
 
std::unordered_map< sal_uInt16, NamedColorm_aRecentColors
 

Additional Inherited Members

- Protected Member Functions inherited from sfx2::IMacroDocumentAccess
 ~IMacroDocumentAccess ()
 

Detailed Description

Definition at line 52 of file objshimp.hxx.

Constructor & Destructor Documentation

◆ SfxObjectShell_Impl()

SfxObjectShell_Impl::SfxObjectShell_Impl ( SfxObjectShell _rDocShell)

◆ ~SfxObjectShell_Impl()

SfxObjectShell_Impl::~SfxObjectShell_Impl ( )
virtual

Definition at line 238 of file objxtor.cxx.

Member Function Documentation

◆ documentStorageHasMacros()

bool SfxObjectShell_Impl::documentStorageHasMacros ( ) const
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.

◆ getCurrentMacroExecMode()

sal_Int16 SfxObjectShell_Impl::getCurrentMacroExecMode ( ) const
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.

See also
css::document::MediaDescriptor::MacroExecutionMode
css::frame::XComponentLoader::loadComponentFromURL
css::frame::XModel::attachResource
setCurrentMacroExecMode

Implements sfx2::IMacroDocumentAccess.

Definition at line 1724 of file objmisc.cxx.

References SfxItemSet::GetItem(), SfxMedium::GetItemSet(), SfxObjectShell::GetMedium(), CntUInt16Item::GetValue(), and rDocShell.

◆ getDocumentLocation()

OUString SfxObjectShell_Impl::getDocumentLocation ( ) const
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().

◆ getEmbeddedDocumentScripts()

Reference< XEmbeddedScripts > SfxObjectShell_Impl::getEmbeddedDocumentScripts ( ) const
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.

◆ getScriptingSignatureState()

SignatureState SfxObjectShell_Impl::getScriptingSignatureState ( )
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.

◆ hasTrustedScriptingSignature()

bool SfxObjectShell_Impl::hasTrustedScriptingSignature ( bool  bAllowUIToAddAuthor)
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.

◆ macroCallsSeenWhileLoading()

bool SfxObjectShell_Impl::macroCallsSeenWhileLoading ( ) const
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.

◆ setCurrentMacroExecMode()

void SfxObjectShell_Impl::setCurrentMacroExecMode ( sal_uInt16  )
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 also
css::document::MediaDescriptor::MacroExecutionMode
css::frame::XComponentLoader::loadComponentFromURL
css::frame::XModel::attachResource

see getCurrentMacroExecMode

Implements sfx2::IMacroDocumentAccess.

Definition at line 1739 of file objmisc.cxx.

References SfxMedium::GetItemSet(), SfxObjectShell::GetMedium(), SfxItemSet::Put(), and rDocShell.

Member Data Documentation

◆ aBasicManager

SfxBasicManagerHolder SfxObjectShell_Impl::aBasicManager

Definition at line 55 of file objshimp.hxx.

◆ aBitSet

IndexBitSet SfxObjectShell_Impl::aBitSet

Definition at line 96 of file objshimp.hxx.

◆ aMacroMode

::sfx2::DocumentMacroMode SfxObjectShell_Impl::aMacroMode

Definition at line 62 of file objshimp.hxx.

Referenced by SfxViewFrame::AppendContainsMacrosInfobar().

◆ aTempName

OUString SfxObjectShell_Impl::aTempName

Definition at line 65 of file objshimp.hxx.

◆ aTitle

OUString SfxObjectShell_Impl::aTitle

Definition at line 64 of file objshimp.hxx.

◆ bBasicInitialized

bool SfxObjectShell_Impl::bBasicInitialized

Definition at line 77 of file objshimp.hxx.

◆ bClosing

bool SfxObjectShell_Impl::bClosing

Definition at line 70 of file objshimp.hxx.

◆ bForbidReload

bool SfxObjectShell_Impl::bForbidReload

Definition at line 76 of file objshimp.hxx.

◆ bInitialized

bool SfxObjectShell_Impl::bInitialized

Definition at line 80 of file objshimp.hxx.

Referenced by SfxApplication::NotifyEvent().

◆ bInPrepareClose

bool SfxObjectShell_Impl::bInPrepareClose

Definition at line 74 of file objshimp.hxx.

◆ bIsAbortingImport

bool SfxObjectShell_Impl::bIsAbortingImport

Definition at line 73 of file objshimp.hxx.

◆ bIsNamedVisible

bool SfxObjectShell_Impl::bIsNamedVisible

Definition at line 72 of file objshimp.hxx.

◆ bIsPrintJobCancelable

bool SfxObjectShell_Impl::bIsPrintJobCancelable

Definition at line 78 of file objshimp.hxx.

◆ bIsSaving

bool SfxObjectShell_Impl::bIsSaving

Definition at line 71 of file objshimp.hxx.

◆ bLoadReadonly

bool SfxObjectShell_Impl::bLoadReadonly

Definition at line 87 of file objshimp.hxx.

◆ bModalMode

bool SfxObjectShell_Impl::bModalMode

Definition at line 103 of file objshimp.hxx.

◆ bModelInitialized

bool SfxObjectShell_Impl::bModelInitialized

Definition at line 81 of file objshimp.hxx.

◆ bOwnsStorage

bool SfxObjectShell_Impl::bOwnsStorage

Definition at line 79 of file objshimp.hxx.

◆ bPreparedForClose

bool SfxObjectShell_Impl::bPreparedForClose

Definition at line 75 of file objshimp.hxx.

◆ bPreserveVersions

bool SfxObjectShell_Impl::bPreserveVersions

Definition at line 82 of file objshimp.hxx.

◆ bQueryLoadTemplate

bool SfxObjectShell_Impl::bQueryLoadTemplate

Definition at line 86 of file objshimp.hxx.

◆ bReadOnlyUI

bool SfxObjectShell_Impl::bReadOnlyUI

Definition at line 105 of file objshimp.hxx.

◆ bRunningMacro

bool SfxObjectShell_Impl::bRunningMacro

Definition at line 104 of file objshimp.hxx.

◆ bSaveVersionOnClose

bool SfxObjectShell_Impl::bSaveVersionOnClose

Definition at line 90 of file objshimp.hxx.

◆ bUseThumbnailSave

bool SfxObjectShell_Impl::bUseThumbnailSave

Definition at line 89 of file objshimp.hxx.

◆ bUseUserData

bool SfxObjectShell_Impl::bUseUserData

Definition at line 88 of file objshimp.hxx.

◆ lErr

ErrCode SfxObjectShell_Impl::lErr

Definition at line 97 of file objshimp.hxx.

◆ m_aModifyPasswordInfo

css::uno::Sequence< css::beans::PropertyValue > SfxObjectShell_Impl::m_aModifyPasswordInfo

Definition at line 128 of file objshimp.hxx.

◆ m_aPendingInfobars

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().

◆ m_aRecentColors

std::unordered_map<sal_uInt16, NamedColor> SfxObjectShell_Impl::m_aRecentColors

Definition at line 138 of file objshimp.hxx.

◆ m_aSharedFileURL

OUString SfxObjectShell_Impl::m_aSharedFileURL

Definition at line 122 of file objshimp.hxx.

◆ m_aVisArea

tools::Rectangle SfxObjectShell_Impl::m_aVisArea

Definition at line 114 of file objshimp.hxx.

◆ m_bAllowModifiedBackAfterSigning

bool SfxObjectShell_Impl::m_bAllowModifiedBackAfterSigning

Definition at line 132 of file objshimp.hxx.

◆ m_bAllowShareControlFileClean

bool SfxObjectShell_Impl::m_bAllowShareControlFileClean

Definition at line 92 of file objshimp.hxx.

◆ m_bConfigOptionsChecked

bool SfxObjectShell_Impl::m_bConfigOptionsChecked

Definition at line 93 of file objshimp.hxx.

◆ m_bCreateTempStor

bool SfxObjectShell_Impl::m_bCreateTempStor

Definition at line 117 of file objshimp.hxx.

◆ m_bDocRecoverySupport

bool SfxObjectShell_Impl::m_bDocRecoverySupport

Definition at line 85 of file objshimp.hxx.

◆ m_bEnableSetModified

bool SfxObjectShell_Impl::m_bEnableSetModified

Definition at line 111 of file objshimp.hxx.

◆ m_bIncomplEncrWarnShown

bool SfxObjectShell_Impl::m_bIncomplEncrWarnShown

Definition at line 124 of file objshimp.hxx.

◆ m_bIsInit

bool SfxObjectShell_Impl::m_bIsInit

Definition at line 120 of file objshimp.hxx.

◆ m_bIsModified

bool SfxObjectShell_Impl::m_bIsModified

Definition at line 112 of file objshimp.hxx.

◆ m_bMacroCallsSeenWhileLoading

bool SfxObjectShell_Impl::m_bMacroCallsSeenWhileLoading

Definition at line 94 of file objshimp.hxx.

◆ m_bMacroSignBroken

bool SfxObjectShell_Impl::m_bMacroSignBroken

Definition at line 83 of file objshimp.hxx.

Referenced by getScriptingSignatureState().

◆ m_bModifyPasswordEntered

bool SfxObjectShell_Impl::m_bModifyPasswordEntered

Definition at line 129 of file objshimp.hxx.

◆ m_bNoBasicCapabilities

bool SfxObjectShell_Impl::m_bNoBasicCapabilities

Definition at line 84 of file objshimp.hxx.

◆ m_bSavingForSigning

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.

◆ m_bSharedXMLFlag

bool SfxObjectShell_Impl::m_bSharedXMLFlag

Definition at line 91 of file objshimp.hxx.

◆ m_nMapUnit

MapUnit SfxObjectShell_Impl::m_nMapUnit

Definition at line 115 of file objshimp.hxx.

◆ m_nModifyPasswordHash

sal_uInt32 SfxObjectShell_Impl::m_nModifyPasswordHash

Definition at line 127 of file objshimp.hxx.

◆ m_xDocStorage

css::uno::Reference< css::embed::XStorage > SfxObjectShell_Impl::m_xDocStorage

Definition at line 118 of file objshimp.hxx.

Referenced by documentStorageHasMacros().

◆ mxObjectContainer

std::unique_ptr<::comphelper::EmbeddedObjectContainer> SfxObjectShell_Impl::mxObjectContainer

Definition at line 54 of file objshimp.hxx.

◆ nDocumentSignatureState

SignatureState SfxObjectShell_Impl::nDocumentSignatureState

Definition at line 68 of file objshimp.hxx.

◆ nEventId

SfxEventHintId SfxObjectShell_Impl::nEventId

Definition at line 98 of file objshimp.hxx.

◆ nFlagsInProgress

SfxLoadedFlags SfxObjectShell_Impl::nFlagsInProgress

Definition at line 102 of file objshimp.hxx.

◆ nLoadedFlags

SfxLoadedFlags SfxObjectShell_Impl::nLoadedFlags

Definition at line 101 of file objshimp.hxx.

Referenced by SfxViewFrame::ExecReload_Impl(), and SfxViewFrame::StateReload_Impl().

◆ nScriptingSignatureState

SignatureState SfxObjectShell_Impl::nScriptingSignatureState

Definition at line 69 of file objshimp.hxx.

Referenced by hasTrustedScriptingSignature().

◆ nStyleFilter

sal_uInt16 SfxObjectShell_Impl::nStyleFilter

Definition at line 109 of file objshimp.hxx.

◆ nTime

DateTime SfxObjectShell_Impl::nTime

Definition at line 66 of file objshimp.hxx.

◆ nVisualDocumentNumber

sal_uInt16 SfxObjectShell_Impl::nVisualDocumentNumber

Definition at line 67 of file objshimp.hxx.

◆ pBaseModel

::rtl::Reference< SfxBaseModel > SfxObjectShell_Impl::pBaseModel

Definition at line 108 of file objshimp.hxx.

◆ pProgress

SfxProgress* SfxObjectShell_Impl::pProgress

Definition at line 63 of file objshimp.hxx.

◆ pReloadTimer

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().

◆ rDocShell

SfxObjectShell& SfxObjectShell_Impl::rDocShell

◆ xBasicLibraries

css::uno::Reference< css::script::XLibraryContainer > SfxObjectShell_Impl::xBasicLibraries

Definition at line 58 of file objshimp.hxx.

◆ xDialogLibraries

css::uno::Reference< css::script::XLibraryContainer > SfxObjectShell_Impl::xDialogLibraries

Definition at line 60 of file objshimp.hxx.

◆ xHeaderAttributes

tools::SvRef<SvRefBase> SfxObjectShell_Impl::xHeaderAttributes

Definition at line 106 of file objshimp.hxx.


The documentation for this struct was generated from the following files: