LibreOffice Module basctl (master) 1
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
basctl::ScriptDocument::Impl Class Reference
Inheritance diagram for basctl::ScriptDocument::Impl:
[legend]
Collaboration diagram for basctl::ScriptDocument::Impl:
[legend]

Public Member Functions

 Impl ()
 
 Impl (Reference< XModel > const &rxDocument)
 
virtual ~Impl () override
 
bool isValid () const
 determines whether the instance refers to a valid "document" with script and dialog libraries More...
 
bool isAlive () const
 determines whether the instance refers to a non-closed document More...
 
bool isApplication () const
 determines whether the "document" refers to the application in real More...
 
bool isDocument () const
 determines whether the document refers to a real document (instead of the application) More...
 
void invalidate ()
 invalidates the instance More...
 
const Reference< XModel > & getDocumentRef () const
 
Reference< XLibraryContainer > getLibraryContainer (LibraryContainerType _eType) const
 returns a library container belonging to the document More...
 
bool isLibraryShared (const OUString &_rLibName, LibraryContainerType _eType)
 determines whether a given library is part of the shared installation More...
 
bool getCurrentFrame (Reference< XFrame > &_out_rxFrame) const
 returns the current frame of the document More...
 
bool isReadOnly () const
 
bool isInVBAMode () const
 
BasicManagergetBasicManager () const
 
Reference< XModel > getDocument () const
 
void setDocumentModified () const
 
bool isDocumentModified () const
 
void saveDocument (const Reference< XStatusIndicator > &_rxStatusIndicator) const
 
OUString getTitle () const
 
OUString getURL () const
 
bool allowMacros () const
 
Reference< XNameContainer > getLibrary (LibraryContainerType _eType, const OUString &_rLibName, bool _bLoadLibrary) const
 
bool hasLibrary (LibraryContainerType _eType, const OUString &_rLibName) const
 
Reference< XNameContainer > getOrCreateLibrary (LibraryContainerType _eType, const OUString &_rLibName) const
 
void loadLibraryIfExists (LibraryContainerType _eType, const OUString &_rLibrary)
 
bool removeModuleOrDialog (LibraryContainerType _eType, const OUString &_rLibName, const OUString &_rModuleName)
 
bool hasModuleOrDialog (LibraryContainerType _eType, const OUString &_rLibName, const OUString &_rModName) const
 
bool getModuleOrDialog (LibraryContainerType _eType, const OUString &_rLibName, const OUString &_rObjectName, Any &_out_rModuleOrDialog)
 
bool renameModuleOrDialog (LibraryContainerType _eType, const OUString &_rLibName, const OUString &_rOldName, const OUString &_rNewName, const Reference< XNameContainer > &_rxExistingDialogModel)
 
bool createModule (const OUString &_rLibName, const OUString &_rModName, bool _bCreateMain, OUString &_out_rNewModuleCode) const
 
bool insertModuleOrDialog (LibraryContainerType _eType, const OUString &_rObjectName, const OUString &_rModName, const Any &_rElement) const
 
bool updateModule (const OUString &_rLibName, const OUString &_rModName, const OUString &_rModuleCode) const
 
bool createDialog (const OUString &_rLibName, const OUString &_rDialogName, Reference< XInputStreamProvider > &_out_rDialogProvider) const
 
- Public Member Functions inherited from basctl::DocumentEventListener
 DocumentEventListener (const DocumentEventListener &)=delete
 
const DocumentEventListeneroperator= (const DocumentEventListener &)=delete
 
 DocumentEventListener ()=default
 
virtual void onDocumentCreated (const ScriptDocument &_rDocument)=0
 
virtual void onDocumentOpened (const ScriptDocument &_rDocument)=0
 
virtual void onDocumentSave (const ScriptDocument &_rDocument)=0
 
virtual void onDocumentSaveDone (const ScriptDocument &_rDocument)=0
 
virtual void onDocumentSaveAs (const ScriptDocument &_rDocument)=0
 
virtual void onDocumentSaveAsDone (const ScriptDocument &_rDocument)=0
 
virtual void onDocumentClosed (const ScriptDocument &_rDocument)=0
 
virtual void onDocumentTitleChanged (const ScriptDocument &_rDocument)=0
 
virtual void onDocumentModeChanged (const ScriptDocument &_rDocument)=0
 
virtual ~DocumentEventListener ()
 

Protected Member Functions

virtual void onDocumentCreated (const ScriptDocument &_rDocument) override
 
virtual void onDocumentOpened (const ScriptDocument &_rDocument) override
 
virtual void onDocumentSave (const ScriptDocument &_rDocument) override
 
virtual void onDocumentSaveDone (const ScriptDocument &_rDocument) override
 
virtual void onDocumentSaveAs (const ScriptDocument &_rDocument) override
 
virtual void onDocumentSaveAsDone (const ScriptDocument &_rDocument) override
 
virtual void onDocumentClosed (const ScriptDocument &_rDocument) override
 
virtual void onDocumentTitleChanged (const ScriptDocument &_rDocument) override
 
virtual void onDocumentModeChanged (const ScriptDocument &_rDocument) override
 

Private Member Functions

bool impl_initDocument_nothrow (const Reference< XModel > &_rxModel)
 

Private Attributes

bool m_bIsApplication
 
bool m_bValid
 
bool m_bDocumentClosed
 
Reference< XModel > m_xDocument
 
Reference< XModifiable > m_xDocModify
 
Reference< XEmbeddedScripts > m_xScriptAccess
 
std::unique_ptr< DocumentEventNotifierm_pDocListener
 

Detailed Description

Definition at line 173 of file scriptdocument.cxx.

Constructor & Destructor Documentation

◆ Impl() [1/2]

basctl::ScriptDocument::Impl::Impl ( )

Definition at line 273 of file scriptdocument.cxx.

◆ Impl() [2/2]

basctl::ScriptDocument::Impl::Impl ( Reference< XModel > const &  rxDocument)
explicit

Definition at line 280 of file scriptdocument.cxx.

References impl_initDocument_nothrow().

◆ ~Impl()

basctl::ScriptDocument::Impl::~Impl ( )
overridevirtual

Definition at line 289 of file scriptdocument.cxx.

Member Function Documentation

◆ allowMacros()

bool basctl::ScriptDocument::Impl::allowMacros ( ) const

◆ createDialog()

bool basctl::ScriptDocument::Impl::createDialog ( const OUString &  _rLibName,
const OUString &  _rDialogName,
Reference< XInputStreamProvider > &  _out_rDialogProvider 
) const

◆ createModule()

bool basctl::ScriptDocument::Impl::createModule ( const OUString &  _rLibName,
const OUString &  _rModName,
bool  _bCreateMain,
OUString &  _out_rNewModuleCode 
) const

◆ getBasicManager()

BasicManager * basctl::ScriptDocument::Impl::getBasicManager ( ) const

◆ getCurrentFrame()

bool basctl::ScriptDocument::Impl::getCurrentFrame ( Reference< XFrame > &  _out_rxFrame) const

returns the current frame of the document

To be called for documents only, not for the application.

If <FALSE> is returned, an assertion will be raised in non-product builds.

Definition at line 886 of file scriptdocument.cxx.

References DBG_UNHANDLED_EXCEPTION, Exception, basctl::ScriptDocument::isDocument(), basctl::ScriptDocument::isValid(), m_xDocument, and xController.

◆ getDocument()

Reference< XModel > basctl::ScriptDocument::Impl::getDocument ( ) const

◆ getDocumentRef()

const Reference< XModel > & basctl::ScriptDocument::Impl::getDocumentRef ( ) const
inline

Definition at line 206 of file scriptdocument.cxx.

References m_xDocument.

◆ getLibrary()

Reference< XNameContainer > basctl::ScriptDocument::Impl::getLibrary ( LibraryContainerType  _eType,
const OUString &  _rLibName,
bool  _bLoadLibrary 
) const

◆ getLibraryContainer()

Reference< XLibraryContainer > basctl::ScriptDocument::Impl::getLibraryContainer ( LibraryContainerType  _eType) const

returns a library container belonging to the document

Definition at line 335 of file scriptdocument.cxx.

References DBG_UNHANDLED_EXCEPTION, basctl::E_SCRIPTS, Exception, basctl::ScriptDocument::isApplication(), basctl::ScriptDocument::isValid(), and SfxGetpApp().

◆ getModuleOrDialog()

bool basctl::ScriptDocument::Impl::getModuleOrDialog ( LibraryContainerType  _eType,
const OUString &  _rLibName,
const OUString &  _rObjectName,
Any &  _out_rModuleOrDialog 
)

◆ getOrCreateLibrary()

Reference< XNameContainer > basctl::ScriptDocument::Impl::getOrCreateLibrary ( LibraryContainerType  _eType,
const OUString &  _rLibName 
) const

◆ getTitle()

OUString basctl::ScriptDocument::Impl::getTitle ( ) const

◆ getURL()

OUString basctl::ScriptDocument::Impl::getURL ( ) const

◆ hasLibrary()

bool basctl::ScriptDocument::Impl::hasLibrary ( LibraryContainerType  _eType,
const OUString &  _rLibName 
) const

◆ hasModuleOrDialog()

bool basctl::ScriptDocument::Impl::hasModuleOrDialog ( LibraryContainerType  _eType,
const OUString &  _rLibName,
const OUString &  _rModName 
) const

◆ impl_initDocument_nothrow()

bool basctl::ScriptDocument::Impl::impl_initDocument_nothrow ( const Reference< XModel > &  _rxModel)
private

Definition at line 308 of file scriptdocument.cxx.

References DBG_UNHANDLED_EXCEPTION, Exception, and m_xDocument.

Referenced by Impl().

◆ insertModuleOrDialog()

bool basctl::ScriptDocument::Impl::insertModuleOrDialog ( LibraryContainerType  _eType,
const OUString &  _rObjectName,
const OUString &  _rModName,
const Any &  _rElement 
) const

◆ invalidate()

void basctl::ScriptDocument::Impl::invalidate ( )

invalidates the instance

Definition at line 294 of file scriptdocument.cxx.

References m_xDocument.

◆ isAlive()

bool basctl::ScriptDocument::Impl::isAlive ( ) const
inline

determines whether the instance refers to a non-closed document

Definition at line 195 of file scriptdocument.cxx.

References m_bDocumentClosed, m_bIsApplication, and m_bValid.

◆ isApplication()

bool basctl::ScriptDocument::Impl::isApplication ( ) const
inline

determines whether the "document" refers to the application in real

Definition at line 197 of file scriptdocument.cxx.

References m_bIsApplication, and m_bValid.

◆ isDocument()

bool basctl::ScriptDocument::Impl::isDocument ( ) const
inline

determines whether the document refers to a real document (instead of the application)

Definition at line 199 of file scriptdocument.cxx.

References m_bIsApplication, and m_bValid.

◆ isDocumentModified()

bool basctl::ScriptDocument::Impl::isDocumentModified ( ) const

◆ isInVBAMode()

bool basctl::ScriptDocument::Impl::isInVBAMode ( ) const

◆ isLibraryShared()

bool basctl::ScriptDocument::Impl::isLibraryShared ( const OUString &  _rLibName,
LibraryContainerType  _eType 
)

determines whether a given library is part of the shared installation

Definition at line 908 of file scriptdocument.cxx.

References DBG_UNHANDLED_EXCEPTION, Exception, and basctl::ScriptDocument::getLibraryContainer().

◆ isReadOnly()

bool basctl::ScriptDocument::Impl::isReadOnly ( ) const

◆ isValid()

bool basctl::ScriptDocument::Impl::isValid ( ) const
inline

determines whether the instance refers to a valid "document" with script and dialog libraries

Definition at line 192 of file scriptdocument.cxx.

References m_bValid.

◆ loadLibraryIfExists()

void basctl::ScriptDocument::Impl::loadLibraryIfExists ( LibraryContainerType  _eType,
const OUString &  _rLibrary 
)

◆ onDocumentClosed()

void basctl::ScriptDocument::Impl::onDocumentClosed ( const ScriptDocument _rDocument)
overrideprotectedvirtual

◆ onDocumentCreated()

void basctl::ScriptDocument::Impl::onDocumentCreated ( const ScriptDocument _rDocument)
overrideprotectedvirtual

Implements basctl::DocumentEventListener.

Definition at line 963 of file scriptdocument.cxx.

◆ onDocumentModeChanged()

void basctl::ScriptDocument::Impl::onDocumentModeChanged ( const ScriptDocument _rDocument)
overrideprotectedvirtual

Implements basctl::DocumentEventListener.

Definition at line 1012 of file scriptdocument.cxx.

◆ onDocumentOpened()

void basctl::ScriptDocument::Impl::onDocumentOpened ( const ScriptDocument _rDocument)
overrideprotectedvirtual

Implements basctl::DocumentEventListener.

Definition at line 968 of file scriptdocument.cxx.

◆ onDocumentSave()

void basctl::ScriptDocument::Impl::onDocumentSave ( const ScriptDocument _rDocument)
overrideprotectedvirtual

Implements basctl::DocumentEventListener.

Definition at line 973 of file scriptdocument.cxx.

◆ onDocumentSaveAs()

void basctl::ScriptDocument::Impl::onDocumentSaveAs ( const ScriptDocument _rDocument)
overrideprotectedvirtual

Implements basctl::DocumentEventListener.

Definition at line 983 of file scriptdocument.cxx.

◆ onDocumentSaveAsDone()

void basctl::ScriptDocument::Impl::onDocumentSaveAsDone ( const ScriptDocument _rDocument)
overrideprotectedvirtual

Implements basctl::DocumentEventListener.

Definition at line 988 of file scriptdocument.cxx.

◆ onDocumentSaveDone()

void basctl::ScriptDocument::Impl::onDocumentSaveDone ( const ScriptDocument _rDocument)
overrideprotectedvirtual

Implements basctl::DocumentEventListener.

Definition at line 978 of file scriptdocument.cxx.

◆ onDocumentTitleChanged()

void basctl::ScriptDocument::Impl::onDocumentTitleChanged ( const ScriptDocument _rDocument)
overrideprotectedvirtual

Implements basctl::DocumentEventListener.

Definition at line 1007 of file scriptdocument.cxx.

◆ removeModuleOrDialog()

bool basctl::ScriptDocument::Impl::removeModuleOrDialog ( LibraryContainerType  _eType,
const OUString &  _rLibName,
const OUString &  _rModuleName 
)

◆ renameModuleOrDialog()

bool basctl::ScriptDocument::Impl::renameModuleOrDialog ( LibraryContainerType  _eType,
const OUString &  _rLibName,
const OUString &  _rOldName,
const OUString &  _rNewName,
const Reference< XNameContainer > &  _rxExistingDialogModel 
)

◆ saveDocument()

void basctl::ScriptDocument::Impl::saveDocument ( const Reference< XStatusIndicator > &  _rxStatusIndicator) const

Definition at line 798 of file scriptdocument.cxx.

References Any, aURL, DBG_UNHANDLED_EXCEPTION, Exception, URL, xDispatch, and xFrame.

◆ setDocumentModified()

void basctl::ScriptDocument::Impl::setDocumentModified ( ) const

◆ updateModule()

bool basctl::ScriptDocument::Impl::updateModule ( const OUString &  _rLibName,
const OUString &  _rModName,
const OUString &  _rModuleCode 
) const

Member Data Documentation

◆ m_bDocumentClosed

bool basctl::ScriptDocument::Impl::m_bDocumentClosed
private

Definition at line 178 of file scriptdocument.cxx.

Referenced by isAlive().

◆ m_bIsApplication

bool basctl::ScriptDocument::Impl::m_bIsApplication
private

Definition at line 176 of file scriptdocument.cxx.

Referenced by isAlive(), isApplication(), and isDocument().

◆ m_bValid

bool basctl::ScriptDocument::Impl::m_bValid
private

Definition at line 177 of file scriptdocument.cxx.

Referenced by isAlive(), isApplication(), isDocument(), and isValid().

◆ m_pDocListener

std::unique_ptr< DocumentEventNotifier > basctl::ScriptDocument::Impl::m_pDocListener
private

Definition at line 182 of file scriptdocument.cxx.

◆ m_xDocModify

Reference< XModifiable > basctl::ScriptDocument::Impl::m_xDocModify
private

Definition at line 180 of file scriptdocument.cxx.

◆ m_xDocument

Reference< XModel > basctl::ScriptDocument::Impl::m_xDocument
private

Definition at line 179 of file scriptdocument.cxx.

Referenced by getDocumentRef().

◆ m_xScriptAccess

Reference< XEmbeddedScripts > basctl::ScriptDocument::Impl::m_xScriptAccess
private

Definition at line 181 of file scriptdocument.cxx.


The documentation for this class was generated from the following file: