LibreOffice Module basctl (master) 1
|
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 |
BasicManager * | getBasicManager () 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 DocumentEventListener & | operator= (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< DocumentEventNotifier > | m_pDocListener |
Definition at line 173 of file scriptdocument.cxx.
basctl::ScriptDocument::Impl::Impl | ( | ) |
Definition at line 273 of file scriptdocument.cxx.
|
explicit |
Definition at line 280 of file scriptdocument.cxx.
References impl_initDocument_nothrow().
|
overridevirtual |
Definition at line 289 of file scriptdocument.cxx.
bool basctl::ScriptDocument::Impl::allowMacros | ( | ) | const |
Definition at line 867 of file scriptdocument.cxx.
References DBG_UNHANDLED_EXCEPTION, Exception, basctl::ScriptDocument::isDocument(), and basctl::ScriptDocument::isValid().
bool basctl::ScriptDocument::Impl::createDialog | ( | const OUString & | _rLibName, |
const OUString & | _rDialogName, | ||
Reference< XInputStreamProvider > & | _out_rDialogProvider | ||
) | const |
Definition at line 724 of file scriptdocument.cxx.
References Any, DBG_UNHANDLED_EXCEPTION, basctl::DLGED_PROP_NAME, basctl::E_DIALOGS, Exception, basctl::ScriptDocument::getDocument(), basctl::ScriptDocument::getLibrary(), comphelper::getProcessComponentContext(), and basctl::ScriptDocument::isDocument().
bool basctl::ScriptDocument::Impl::createModule | ( | const OUString & | _rLibName, |
const OUString & | _rModName, | ||
bool | _bCreateMain, | ||
OUString & | _out_rNewModuleCode | ||
) | const |
Definition at line 652 of file scriptdocument.cxx.
References Any, DBG_UNHANDLED_EXCEPTION, basctl::E_SCRIPTS, Exception, and basctl::ScriptDocument::getLibrary().
BasicManager * basctl::ScriptDocument::Impl::getBasicManager | ( | ) | const |
Definition at line 395 of file scriptdocument.cxx.
References SfxApplication::GetBasicManager(), basctl::ScriptDocument::isApplication(), basctl::ScriptDocument::isValid(), m_xDocument, and TOOLS_WARN_EXCEPTION.
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.
Reference< XModel > basctl::ScriptDocument::Impl::getDocument | ( | ) | const |
Definition at line 415 of file scriptdocument.cxx.
References basctl::ScriptDocument::isDocument(), basctl::ScriptDocument::isValid(), and m_xDocument.
|
inline |
Definition at line 206 of file scriptdocument.cxx.
References m_xDocument.
Reference< XNameContainer > basctl::ScriptDocument::Impl::getLibrary | ( | LibraryContainerType | _eType, |
const OUString & | _rLibName, | ||
bool | _bLoadLibrary | ||
) | const |
Definition at line 426 of file scriptdocument.cxx.
References DBG_UNHANDLED_EXCEPTION, Exception, basctl::ScriptDocument::getLibraryContainer(), and basctl::ScriptDocument::isValid().
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().
bool basctl::ScriptDocument::Impl::getModuleOrDialog | ( | LibraryContainerType | _eType, |
const OUString & | _rLibName, | ||
const OUString & | _rObjectName, | ||
Any & | _out_rModuleOrDialog | ||
) |
Definition at line 555 of file scriptdocument.cxx.
References DBG_UNHANDLED_EXCEPTION, Exception, basctl::ScriptDocument::getLibrary(), and basctl::ScriptDocument::isValid().
Reference< XNameContainer > basctl::ScriptDocument::Impl::getOrCreateLibrary | ( | LibraryContainerType | _eType, |
const OUString & | _rLibName | ||
) | const |
Definition at line 473 of file scriptdocument.cxx.
References DBG_UNHANDLED_EXCEPTION, Exception, and basctl::ScriptDocument::getLibraryContainer().
OUString basctl::ScriptDocument::Impl::getTitle | ( | ) | const |
Definition at line 834 of file scriptdocument.cxx.
References basctl::ScriptDocument::isDocument(), basctl::ScriptDocument::isValid(), and m_xDocument.
OUString basctl::ScriptDocument::Impl::getURL | ( | ) | const |
Definition at line 847 of file scriptdocument.cxx.
References DBG_UNHANDLED_EXCEPTION, Exception, basctl::ScriptDocument::isDocument(), basctl::ScriptDocument::isValid(), and m_xDocument.
bool basctl::ScriptDocument::Impl::hasLibrary | ( | LibraryContainerType | _eType, |
const OUString & | _rLibName | ||
) | const |
Definition at line 457 of file scriptdocument.cxx.
References DBG_UNHANDLED_EXCEPTION, Exception, and basctl::ScriptDocument::getLibraryContainer().
bool basctl::ScriptDocument::Impl::hasModuleOrDialog | ( | LibraryContainerType | _eType, |
const OUString & | _rLibName, | ||
const OUString & | _rModName | ||
) | const |
Definition at line 535 of file scriptdocument.cxx.
References DBG_UNHANDLED_EXCEPTION, Exception, basctl::ScriptDocument::getLibrary(), and basctl::ScriptDocument::isValid().
|
private |
Definition at line 308 of file scriptdocument.cxx.
References DBG_UNHANDLED_EXCEPTION, Exception, and m_xDocument.
Referenced by Impl().
bool basctl::ScriptDocument::Impl::insertModuleOrDialog | ( | LibraryContainerType | _eType, |
const OUString & | _rObjectName, | ||
const OUString & | _rModName, | ||
const Any & | _rElement | ||
) | const |
Definition at line 687 of file scriptdocument.cxx.
References DBG_UNHANDLED_EXCEPTION, Exception, and basctl::ScriptDocument::getOrCreateLibrary().
void basctl::ScriptDocument::Impl::invalidate | ( | ) |
|
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.
|
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.
|
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.
bool basctl::ScriptDocument::Impl::isDocumentModified | ( | ) | const |
Definition at line 779 of file scriptdocument.cxx.
References DBG_UNHANDLED_EXCEPTION, Exception, basctl::ScriptDocument::isDocument(), and basctl::ScriptDocument::isValid().
bool basctl::ScriptDocument::Impl::isInVBAMode | ( | ) | const |
Definition at line 383 of file scriptdocument.cxx.
References basctl::E_SCRIPTS, basctl::ScriptDocument::getLibraryContainer(), and basctl::ScriptDocument::isApplication().
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().
bool basctl::ScriptDocument::Impl::isReadOnly | ( | ) | const |
Definition at line 361 of file scriptdocument.cxx.
References DBG_UNHANDLED_EXCEPTION, Exception, basctl::ScriptDocument::isApplication(), basctl::ScriptDocument::isValid(), and m_xDocument.
|
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.
void basctl::ScriptDocument::Impl::loadLibraryIfExists | ( | LibraryContainerType | _eType, |
const OUString & | _rLibrary | ||
) |
Definition at line 495 of file scriptdocument.cxx.
References DBG_UNHANDLED_EXCEPTION, Exception, and basctl::ScriptDocument::getLibraryContainer().
|
overrideprotectedvirtual |
Implements basctl::DocumentEventListener.
Definition at line 993 of file scriptdocument.cxx.
References DBG_TESTSOLARMUTEX, basctl::ScriptDocument::getDocument(), basctl::ScriptDocument::isValid(), and m_xDocument.
|
overrideprotectedvirtual |
Implements basctl::DocumentEventListener.
Definition at line 963 of file scriptdocument.cxx.
|
overrideprotectedvirtual |
Implements basctl::DocumentEventListener.
Definition at line 1012 of file scriptdocument.cxx.
|
overrideprotectedvirtual |
Implements basctl::DocumentEventListener.
Definition at line 968 of file scriptdocument.cxx.
|
overrideprotectedvirtual |
Implements basctl::DocumentEventListener.
Definition at line 973 of file scriptdocument.cxx.
|
overrideprotectedvirtual |
Implements basctl::DocumentEventListener.
Definition at line 983 of file scriptdocument.cxx.
|
overrideprotectedvirtual |
Implements basctl::DocumentEventListener.
Definition at line 988 of file scriptdocument.cxx.
|
overrideprotectedvirtual |
Implements basctl::DocumentEventListener.
Definition at line 978 of file scriptdocument.cxx.
|
overrideprotectedvirtual |
Implements basctl::DocumentEventListener.
Definition at line 1007 of file scriptdocument.cxx.
bool basctl::ScriptDocument::Impl::removeModuleOrDialog | ( | LibraryContainerType | _eType, |
const OUString & | _rLibName, | ||
const OUString & | _rModuleName | ||
) |
Definition at line 510 of file scriptdocument.cxx.
References DBG_UNHANDLED_EXCEPTION, Exception, basctl::ScriptDocument::getLibrary(), and basctl::ScriptDocument::isValid().
bool basctl::ScriptDocument::Impl::renameModuleOrDialog | ( | LibraryContainerType | _eType, |
const OUString & | _rLibName, | ||
const OUString & | _rOldName, | ||
const OUString & | _rNewName, | ||
const Reference< XNameContainer > & | _rxExistingDialogModel | ||
) |
Definition at line 579 of file scriptdocument.cxx.
References Any, DBG_UNHANDLED_EXCEPTION, basctl::DLGED_PROP_NAME, basctl::E_DIALOGS, basctl::E_SCRIPTS, Exception, basctl::ScriptDocument::getDocument(), basctl::ScriptDocument::getLibrary(), comphelper::getProcessComponentContext(), basctl::ScriptDocument::isDocument(), and basctl::ScriptDocument::isValid().
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.
void basctl::ScriptDocument::Impl::setDocumentModified | ( | ) | const |
Definition at line 762 of file scriptdocument.cxx.
References DBG_UNHANDLED_EXCEPTION, Exception, basctl::ScriptDocument::isDocument(), and basctl::ScriptDocument::isValid().
bool basctl::ScriptDocument::Impl::updateModule | ( | const OUString & | _rLibName, |
const OUString & | _rModName, | ||
const OUString & | _rModuleCode | ||
) | const |
Definition at line 706 of file scriptdocument.cxx.
References Any, DBG_UNHANDLED_EXCEPTION, basctl::E_SCRIPTS, Exception, and basctl::ScriptDocument::getOrCreateLibrary().
|
private |
Definition at line 178 of file scriptdocument.cxx.
Referenced by isAlive().
|
private |
Definition at line 176 of file scriptdocument.cxx.
Referenced by isAlive(), isApplication(), and isDocument().
|
private |
Definition at line 177 of file scriptdocument.cxx.
Referenced by isAlive(), isApplication(), isDocument(), and isValid().
|
private |
Definition at line 182 of file scriptdocument.cxx.
|
private |
Definition at line 180 of file scriptdocument.cxx.
|
private |
Definition at line 179 of file scriptdocument.cxx.
Referenced by getDocumentRef().
|
private |
Definition at line 181 of file scriptdocument.cxx.