LibreOffice Module dbaccess (master) 1
Classes | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
dbaccess::ODocumentDefinition Class Reference

#include <documentdefinition.hxx>

Inheritance diagram for dbaccess::ODocumentDefinition:
[legend]
Collaboration diagram for dbaccess::ODocumentDefinition:
[legend]

Classes

struct  NotifierAccess
 

Public Member Functions

 ODocumentDefinition (const css::uno::Reference< css::uno::XInterface > &_rxContainer, const css::uno::Reference< css::uno::XComponentContext > &, const TContentPtr &_pImpl, bool _bForm)
 
void initialLoad (const css::uno::Sequence< sal_Int8 > &i_rClassID, const css::uno::Sequence< css::beans::PropertyValue > &i_rCreationArgs, const css::uno::Reference< css::sdbc::XConnection > &i_rConnection)
 
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes () override
 
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId () override
 
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo () override
 
virtual void SAL_CALL getFastPropertyValue (css::uno::Any &o_rValue, sal_Int32 i_nHandle) const override
 
virtual css::uno::Reference< css::util::XCloseable > SAL_CALL getComponent () override
 
virtual css::uno::Reference< css::lang::XComponent > SAL_CALL open () override
 
virtual css::uno::Reference< css::lang::XComponent > SAL_CALL openDesign () override
 
virtual void SAL_CALL store () override
 
virtual sal_Bool SAL_CALL close () override
 
virtual OUString SAL_CALL getHierarchicalName () override
 
virtual OUString SAL_CALL composeHierarchicalName (const OUString &aRelativeName) override
 
virtual ::cppu::IPropertyArrayHelper &SAL_CALL getInfoHelper () override
 
virtual css::uno::Any SAL_CALL execute (const css::ucb::Command &aCommand, sal_Int32 CommandId, const css::uno::Reference< css::ucb::XCommandEnvironment > &Environment) override
 
virtual void SAL_CALL rename (const OUString &newName) override
 
virtual void SAL_CALL queryClosing (const css::lang::EventObject &Source, sal_Bool GetsOwnership) override
 
virtual void SAL_CALL notifyClosing (const css::lang::EventObject &Source) override
 
virtual void SAL_CALL disposing (const css::lang::EventObject &Source) override
 
css::uno::Reference< css::embed::XStorage > getContainerStorage () const
 returns the forms/reports container storage, depending on m_bForm. More...
 
bool save (bool _bApprove, const css::uno::Reference< css::awt::XTopWindow > &rDialogParent)
 
void saveAs ()
 
void closeObject ()
 
bool isModified ()
 
bool isNewReport () const
 
const css::uno::Reference< css::sdbc::XConnection > & getConnection () const
 
bool prepareClose ()
 prepares closing the document component More...
 
const OUString & getCurrentName () const
 
void firePropertyChange (sal_Int32 i_nHandle, const css::uno::Any &i_rNewValue, const css::uno::Any &i_rOldValue, bool i_bVetoable, const NotifierAccess &)
 
- Public Member Functions inherited from dbaccess::OContentHelper
 OContentHelper (const css::uno::Reference< css::uno::XComponentContext > &_xORB, const css::uno::Reference< css::uno::XInterface > &_xParentContainer, TContentPtr _pImpl)
 
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId () override
 
virtual sal_Bool SAL_CALL supportsService (const OUString &ServiceName) override
 
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames () override
 
virtual OUString SAL_CALL getImplementationName () override
 
virtual css::uno::Reference< css::ucb::XContentIdentifier > SAL_CALL getIdentifier () override
 
virtual OUString SAL_CALL getContentType () override
 
virtual void SAL_CALL addContentEventListener (const css::uno::Reference< css::ucb::XContentEventListener > &Listener) override
 
virtual void SAL_CALL removeContentEventListener (const css::uno::Reference< css::ucb::XContentEventListener > &Listener) override
 
virtual sal_Int32 SAL_CALL createCommandIdentifier () override
 
virtual css::uno::Any SAL_CALL execute (const css::ucb::Command &aCommand, sal_Int32 CommandId, const css::uno::Reference< css::ucb::XCommandEnvironment > &Environment) override
 
virtual void SAL_CALL abort (sal_Int32 CommandId) override
 
virtual void SAL_CALL addPropertiesChangeListener (const css::uno::Sequence< OUString > &PropertyNames, const css::uno::Reference< css::beans::XPropertiesChangeListener > &Listener) override
 
virtual void SAL_CALL removePropertiesChangeListener (const css::uno::Sequence< OUString > &PropertyNames, const css::uno::Reference< css::beans::XPropertiesChangeListener > &Listener) override
 
virtual void SAL_CALL addProperty (const OUString &Name, sal_Int16 Attributes, const css::uno::Any &DefaultValue) override
 
virtual void SAL_CALL removeProperty (const OUString &Name) override
 
virtual void SAL_CALL initialize (const css::uno::Sequence< css::uno::Any > &aArguments) override
 
virtual css::uno::Reference< css::uno::XInterface > SAL_CALL getParent () override
 
virtual void SAL_CALL setParent (const css::uno::Reference< css::uno::XInterface > &Parent) override
 
virtual void SAL_CALL rename (const OUString &newName) override
 
const ContentPropertiesgetContentProperties () const
 
css::uno::Reference< css::sdbc::XRow > getPropertyValues (const css::uno::Sequence< css::beans::Property > &rProperties)
 
const css::uno::Reference< css::uno::XComponentContext > & getContext () const
 
const TContentPtrgetImpl () const
 
- Public Member Functions inherited from comphelper::OPropertyContainer
virtual ~OPropertyContainer ()
 
- Public Member Functions inherited from comphelper::OPropertyArrayUsageHelper< ODocumentDefinition >
 OPropertyArrayUsageHelper ()
 
virtual ~OPropertyArrayUsageHelper ()
 
::cppu::IPropertyArrayHelpergetArrayHelper ()
 
- Public Member Functions inherited from cppu::ImplHelper4< class Ifc1, class Ifc2, class Ifc3, class Ifc4 >
virtual css::uno::Any SAL_CALL queryInterface (css::uno::Type const &rType) SAL_OVERRIDE
 
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes () SAL_OVERRIDE
 
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId () SAL_OVERRIDE
 

Static Public Member Functions

static void fillReportData (const css::uno::Reference< css::uno::XComponentContext > &_rxContext, const css::uno::Reference< css::util::XCloseable > &_rxComponent, const css::uno::Reference< css::sdbc::XConnection > &_rxActiveConnection)
 
static OUString GetDocumentServiceFromMediaType (const OUString &_rMediaType, const css::uno::Reference< css::uno::XComponentContext > &_rxContext, css::uno::Sequence< sal_Int8 > &_rClassId)
 
static OUString GetDocumentServiceFromMediaType (const css::uno::Reference< css::embed::XStorage > &_rxContainerStorage, const OUString &_rEntityName, const css::uno::Reference< css::uno::XComponentContext > &_rxContext, css::uno::Sequence< sal_Int8 > &_rClassId)
 

Protected Member Functions

virtual ~ODocumentDefinition () override
 
- Protected Member Functions inherited from dbaccess::OContentHelper
virtual void SAL_CALL disposing () override
 
void notifyDataSourceModified ()
 
void notifyPropertiesChange (const css::uno::Sequence< css::beans::PropertyChangeEvent > &evt) const
 This method can be used to propagate changes of property values. More...
 
OUString impl_getHierarchicalName (bool _includingRootContainer) const
 
virtual OUString determineContentType () const =0
 
- Protected Member Functions inherited from comphelper::OPropertyStateContainer
 OPropertyStateContainer (::cppu::OBroadcastHelper &_rBHelper)
 
virtual css::beans::PropertyState SAL_CALL getPropertyState (const OUString &PropertyName) override
 
virtual css::uno::Sequence< css::beans::PropertyState > SAL_CALL getPropertyStates (const css::uno::Sequence< OUString > &aPropertyName) override
 
virtual void SAL_CALL setPropertyToDefault (const OUString &PropertyName) override
 
virtual css::uno::Any SAL_CALL getPropertyDefault (const OUString &aPropertyName) override
 
css::beans::PropertyState getPropertyStateByHandle (sal_Int32 _nHandle) const
 
void setPropertyToDefaultByHandle (sal_Int32 _nHandle)
 
virtual void getPropertyDefaultByHandle (sal_Int32 _nHandle, css::uno::Any &_rDefault) const=0
 
virtual css::uno::Any SAL_CALL queryInterface (const css::uno::Type &_rType) override
 
sal_Int32 getHandleForName (const OUString &_rPropertyName)
 
- Protected Member Functions inherited from comphelper::OPropertyContainer
 OPropertyContainer (::cppu::OBroadcastHelper &_rBHelper)
 
virtual sal_Bool SAL_CALL convertFastPropertyValue (css::uno::Any &rConvertedValue, css::uno::Any &rOldValue, sal_Int32 nHandle, const css::uno::Any &rValue) override
 
virtual void SAL_CALL setFastPropertyValue_NoBroadcast (sal_Int32 nHandle, const css::uno::Any &rValue) override
 
virtual void SAL_CALL getFastPropertyValue (css::uno::Any &rValue, sal_Int32 nHandle) const override
 
virtual css::uno::Any SAL_CALL getFastPropertyValue (sal_Int32 nHandle) override final
 
virtual void getFastPropertyValue (std::unique_lock< std::mutex > &rGuard, css::uno::Any &rValue, sal_Int32 nHandle) const =0
 
virtual void SAL_CALL setFastPropertyValue (sal_Int32 nHandle, const css::uno::Any &rValue) override final
 
- Protected Member Functions inherited from comphelper::OPropertyContainerHelper
 OPropertyContainerHelper ()
 
 ~OPropertyContainerHelper ()
 
void registerProperty (const OUString &_rName, sal_Int32 _nHandle, sal_Int32 _nAttributes, void *_pPointerToMember, const css::uno::Type &_rMemberType)
 
void registerMayBeVoidProperty (const OUString &_rName, sal_Int32 _nHandle, sal_Int32 _nAttributes, css::uno::Any *_pPointerToMember, const css::uno::Type &_rExpectedType)
 
void registerPropertyNoMember (const OUString &_rName, sal_Int32 _nHandle, sal_Int32 _nAttributes, const css::uno::Type &_rType, css::uno::Any const &_pInitialValue)
 
void revokeProperty (sal_Int32 _nHandle)
 
bool isRegisteredProperty (sal_Int32 _nHandle) const
 
bool isRegisteredProperty (const OUString &_rName) const
 
bool convertFastPropertyValue (css::uno::Any &rConvertedValue, css::uno::Any &rOldValue, sal_Int32 nHandle, const css::uno::Any &rValue)
 
void setFastPropertyValue (sal_Int32 nHandle, const css::uno::Any &rValue)
 
void getFastPropertyValue (css::uno::Any &rValue, sal_Int32 nHandle) const
 
void describeProperties (css::uno::Sequence< css::beans::Property > &_rProps) const
 
const css::beans::Property & getProperty (const OUString &_rName) const
 
virtual ::cppu::IPropertyArrayHelpercreateArrayHelper () const =0
 
- Protected Member Functions inherited from cppu::ImplHelper4< class Ifc1, class Ifc2, class Ifc3, class Ifc4 >
 ~ImplHelper4 () SAL_NOEXCEPT
 

Private Member Functions

void impl_onActivateEmbeddedObject_nothrow (const bool i_bReactivated)
 does necessary initializations after our embedded object has been switched to ACTIVE More...
 
css::uno::Reference< css::lang::XComponent > impl_openUI_nolck_throw (bool _bForEditing)
 opens the UI for this sub document More...
 
void impl_store_throw ()
 stores our document, if it's already loaded More...
 
bool impl_close_throw ()
 closes our document, if it's open More...
 
css::uno::Reference< css::util::XCloseable > impl_getComponent_throw (const bool i_ForceCreate=true)
 returns our component, creates it if necessary More...
 
void impl_showOrHideComponent_throw (const bool i_bShow)
 shows or hides our component More...
 
virtual ::cppu::IPropertyArrayHelpercreateArrayHelper () const override
 
virtual void getPropertyDefaultByHandle (sal_Int32 _nHandle, css::uno::Any &_rDefault) const override
 
virtual void SAL_CALL disposing () override
 
virtual OUString determineContentType () const override
 
css::uno::Sequence< css::beans::PropertyValue > fillLoadArgs (const css::uno::Reference< css::sdbc::XConnection > &_xConnection, const bool _bSuppressMacros, const bool _bReadOnly, const css::uno::Sequence< css::beans::PropertyValue > &i_rOpenCommandArguments, css::uno::Sequence< css::beans::PropertyValue > &_out_rEmbeddedObjectDescriptor)
 fills the load arguments More...
 
void loadEmbeddedObject (const css::uno::Reference< css::sdbc::XConnection > &_xConnection, const css::uno::Sequence< sal_Int8 > &_aClassID, const css::uno::Sequence< css::beans::PropertyValue > &_rAdditionalArgs, const bool _bSuppressMacros, const bool _bReadOnly)
 loads the EmbeddedObject if not already loaded More...
 
void loadEmbeddedObjectForPreview ()
 loads the embedded object for preview. More...
 
void updateDocumentTitle ()
 searches for read-only flag in the args of the model and sets it to the given value, if the value was not found, it will be appended. More...
 
void registerProperties ()
 
bool objectSupportsEmbeddedScripts () const
 determines whether the document we represent supports embedded scripts and macros More...
 
void onCommandGetDocumentProperties (css::uno::Any &_rProps)
 
void onCommandInsert (const OUString &_sURL, const css::uno::Reference< css::ucb::XCommandEnvironment > &Environment)
 
void onCommandPreview (css::uno::Any &_rImage)
 
css::uno::Any onCommandOpenSomething (const css::uno::Any &_rArgument, const bool _bActivate, const css::uno::Reference< css::ucb::XCommandEnvironment > &_rxEnvironment)
 

Static Private Member Functions

static void impl_initFormEditView (const css::uno::Reference< css::frame::XController > &_rxController)
 initializes a newly created view/controller of a form which is displaying our embedded object More...
 
static void impl_removeFrameFromDesktop_throw (const css::uno::Reference< css::uno::XComponentContext > &_rContext, const css::uno::Reference< css::frame::XFrame > &_rxFrame)
 removes the given frame from the desktop's frame collection More...
 
static void separateOpenCommandArguments (const css::uno::Sequence< css::beans::PropertyValue > &i_rOpenCommandArguments, ::comphelper::NamedValueCollection &o_rDocumentLoadArgs, ::comphelper::NamedValueCollection &o_rEmbeddedObjectDescriptor)
 splits the given arguments to an "open*" command into arguments for loading the document, and arguments to be put into the EmbeddedObjectDescriptor More...
 

Private Attributes

css::uno::Reference< css::embed::XEmbeddedObject > m_xEmbeddedObject
 
css::uno::Reference< css::embed::XStateChangeListener > m_xListener
 
css::uno::Reference< css::sdbc::XConnection > m_xLastKnownConnection
 
rtl::Reference< OInterceptorm_pInterceptor
 
bool m_bForm
 
bool m_bOpenInDesign
 
bool m_bInExecute
 
bool m_bRemoveListener
 
rtl::Reference< OEmbeddedClientHelperm_pClientHelper
 

Additional Inherited Members

- Static Protected Member Functions inherited from comphelper::OPropertyContainer
static css::uno::Sequence< css::uno::Type > getBaseTypes ()
 
- Static Protected Member Functions inherited from comphelper::OPropertyArrayUsageHelper< ODocumentDefinition >
static std::mutextheMutex ()
 
- Protected Attributes inherited from dbaccess::OContentHelper
::comphelper::OInterfaceContainerHelper3< css::ucb::XContentEventListener > m_aContentListeners
 
PropertyChangeListenerContainer m_aPropertyChangeListeners
 
css::uno::Reference< css::uno::XInterface > m_xParentContainer
 
const css::uno::Reference< css::uno::XComponentContext > m_aContext
 
const ::connectivity::SQLError m_aErrorHelper
 
TContentPtr m_pImpl
 
sal_uInt32 m_nCommandId
 
- Protected Attributes inherited from cppu::BaseMutex
mutable::osl::Mutex m_aMutex
 
- Static Protected Attributes inherited from comphelper::OPropertyArrayUsageHelper< ODocumentDefinition >
static sal_Int32 s_nRefCount
 
::cppu::IPropertyArrayHelpers_pProps
 

Detailed Description

Definition at line 59 of file documentdefinition.hxx.

Constructor & Destructor Documentation

◆ ~ODocumentDefinition()

dbaccess::ODocumentDefinition::~ODocumentDefinition ( )
overrideprotectedvirtual

Definition at line 428 of file documentdefinition.cxx.

References dispose(), and m_pInterceptor.

◆ ODocumentDefinition()

dbaccess::ODocumentDefinition::ODocumentDefinition ( const css::uno::Reference< css::uno::XInterface > &  _rxContainer,
const css::uno::Reference< css::uno::XComponentContext > &  ,
const TContentPtr _pImpl,
bool  _bForm 
)

Definition at line 406 of file documentdefinition.cxx.

References registerProperties().

Member Function Documentation

◆ close()

sal_Bool SAL_CALL dbaccess::ODocumentDefinition::close ( )
overridevirtual

Definition at line 1872 of file documentdefinition.cxx.

References Exception, impl_close_throw(), and cppu::BaseMutex::m_aMutex.

Referenced by queryClosing().

◆ closeObject()

void dbaccess::ODocumentDefinition::closeObject ( )

Definition at line 443 of file documentdefinition.cxx.

References Exception, cppu::BaseMutex::m_aMutex, m_pClientHelper, and m_xEmbeddedObject.

Referenced by disposing(), and execute().

◆ composeHierarchicalName()

OUString SAL_CALL dbaccess::ODocumentDefinition::composeHierarchicalName ( const OUString &  aRelativeName)
overridevirtual

Definition at line 1896 of file documentdefinition.cxx.

References getHierarchicalName().

◆ createArrayHelper()

IPropertyArrayHelper * dbaccess::ODocumentDefinition::createArrayHelper ( ) const
overrideprivatevirtual

◆ determineContentType()

OUString dbaccess::ODocumentDefinition::determineContentType ( ) const
overrideprivatevirtual

◆ disposing() [1/2]

void SAL_CALL dbaccess::ODocumentDefinition::disposing ( )
overrideprivatevirtual

◆ disposing() [2/2]

virtual void SAL_CALL dbaccess::ODocumentDefinition::disposing ( const css::lang::EventObject &  Source)
overridevirtual

◆ execute()

Any SAL_CALL dbaccess::ODocumentDefinition::execute ( const css::ucb::Command &  aCommand,
sal_Int32  CommandId,
const css::uno::Reference< css::ucb::XCommandEnvironment > &  Environment 
)
overridevirtual

◆ fillLoadArgs()

Sequence< PropertyValue > dbaccess::ODocumentDefinition::fillLoadArgs ( const css::uno::Reference< css::sdbc::XConnection > &  _xConnection,
const bool  _bSuppressMacros,
const bool  _bReadOnly,
const css::uno::Sequence< css::beans::PropertyValue > &  i_rOpenCommandArguments,
css::uno::Sequence< css::beans::PropertyValue > &  _out_rEmbeddedObjectDescriptor 
)
private

◆ fillReportData()

void dbaccess::ODocumentDefinition::fillReportData ( const css::uno::Reference< css::uno::XComponentContext > &  _rxContext,
const css::uno::Reference< css::util::XCloseable > &  _rxComponent,
const css::uno::Reference< css::sdbc::XConnection > &  _rxActiveConnection 
)
static

◆ firePropertyChange()

void dbaccess::ODocumentDefinition::firePropertyChange ( sal_Int32  i_nHandle,
const css::uno::Any &  i_rNewValue,
const css::uno::Any &  i_rOldValue,
bool  i_bVetoable,
const NotifierAccess  
)

◆ getComponent()

Reference< util::XCloseable > dbaccess::ODocumentDefinition::getComponent ( )
overridevirtual

◆ getConnection()

const css::uno::Reference< css::sdbc::XConnection > & dbaccess::ODocumentDefinition::getConnection ( ) const
inline

Definition at line 157 of file documentdefinition.hxx.

References m_xLastKnownConnection.

Referenced by dbaccess::OInterceptor::dispatch().

◆ getContainerStorage()

Reference< XStorage > dbaccess::ODocumentDefinition::getContainerStorage ( ) const

returns the forms/reports container storage, depending on m_bForm.

Our own storage inside this container storage is the one with the name as indicated by m_pImpl->m_aProps.sPersistentName.

Definition at line 1926 of file documentdefinition.cxx.

References dbaccess::ODatabaseModelImpl::Form, m_bForm, dbaccess::OContentHelper::m_pImpl, and dbaccess::ODatabaseModelImpl::Report.

Referenced by determineContentType(), execute(), loadEmbeddedObject(), onCommandInsert(), and saveAs().

◆ getCurrentName()

const OUString & dbaccess::ODocumentDefinition::getCurrentName ( ) const
inline

Definition at line 182 of file documentdefinition.hxx.

References dbaccess::OContentHelper::m_pImpl.

◆ GetDocumentServiceFromMediaType() [1/2]

static OUString dbaccess::ODocumentDefinition::GetDocumentServiceFromMediaType ( const css::uno::Reference< css::embed::XStorage > &  _rxContainerStorage,
const OUString &  _rEntityName,
const css::uno::Reference< css::uno::XComponentContext > &  _rxContext,
css::uno::Sequence< sal_Int8 > &  _rClassId 
)
static

◆ GetDocumentServiceFromMediaType() [2/2]

static OUString dbaccess::ODocumentDefinition::GetDocumentServiceFromMediaType ( const OUString &  _rMediaType,
const css::uno::Reference< css::uno::XComponentContext > &  _rxContext,
css::uno::Sequence< sal_Int8 > &  _rClassId 
)
static

◆ getFastPropertyValue()

void SAL_CALL dbaccess::ODocumentDefinition::getFastPropertyValue ( css::uno::Any &  o_rValue,
sal_Int32  i_nHandle 
) const
overridevirtual

◆ getHierarchicalName()

OUString SAL_CALL dbaccess::ODocumentDefinition::getHierarchicalName ( )
overridevirtual

◆ getImplementationId()

css::uno::Sequence< sal_Int8 > dbaccess::ODocumentDefinition::getImplementationId ( )
overridevirtual

◆ getInfoHelper()

IPropertyArrayHelper & dbaccess::ODocumentDefinition::getInfoHelper ( )
override

◆ getPropertyDefaultByHandle()

void dbaccess::ODocumentDefinition::getPropertyDefaultByHandle ( sal_Int32  _nHandle,
css::uno::Any &  _rDefault 
) const
overrideprivatevirtual

Implements comphelper::OPropertyStateContainer.

Definition at line 1719 of file documentdefinition.cxx.

◆ getPropertySetInfo()

Reference< XPropertySetInfo > SAL_CALL dbaccess::ODocumentDefinition::getPropertySetInfo ( )
overridevirtual

Definition at line 520 of file documentdefinition.cxx.

References getInfoHelper().

◆ getTypes()

css::uno::Sequence< css::uno::Type > dbaccess::ODocumentDefinition::getTypes ( )
overridevirtual

◆ impl_close_throw()

bool dbaccess::ODocumentDefinition::impl_close_throw ( )
private

closes our document, if it's open

Definition at line 1836 of file documentdefinition.cxx.

References m_xEmbeddedObject, and prepareClose().

Referenced by close(), and execute().

◆ impl_getComponent_throw()

Reference< util::XCloseable > dbaccess::ODocumentDefinition::impl_getComponent_throw ( const bool  i_ForceCreate = true)
private

returns our component, creates it if necessary

Definition at line 1743 of file documentdefinition.cxx.

References m_xEmbeddedObject, and nState.

Referenced by execute(), getComponent(), impl_showOrHideComponent_throw(), loadEmbeddedObject(), onCommandOpenSomething(), and prepareClose().

◆ impl_initFormEditView()

void dbaccess::ODocumentDefinition::impl_initFormEditView ( const css::uno::Reference< css::frame::XController > &  _rxController)
staticprivate

initializes a newly created view/controller of a form which is displaying our embedded object

Has only to be called if the respective embedded object has been loaded for design (and not for data entry)

Parameters
_rxControllerthe controller which belongs to the XModel of our (active) embedded object

Definition at line 704 of file documentdefinition.cxx.

References Any, DBG_UNHANDLED_EXCEPTION, and Exception.

Referenced by impl_onActivateEmbeddedObject_nothrow().

◆ impl_onActivateEmbeddedObject_nothrow()

void dbaccess::ODocumentDefinition::impl_onActivateEmbeddedObject_nothrow ( const bool  i_bReactivated)
private

◆ impl_openUI_nolck_throw()

Reference< XComponent > dbaccess::ODocumentDefinition::impl_openUI_nolck_throw ( bool  _bForEditing)
private

◆ impl_removeFrameFromDesktop_throw()

void dbaccess::ODocumentDefinition::impl_removeFrameFromDesktop_throw ( const css::uno::Reference< css::uno::XComponentContext > &  _rContext,
const css::uno::Reference< css::frame::XFrame > &  _rxFrame 
)
staticprivate

removes the given frame from the desktop's frame collection

Exceptions
css::uno::RuntimeException

Definition at line 573 of file documentdefinition.cxx.

Referenced by impl_onActivateEmbeddedObject_nothrow().

◆ impl_showOrHideComponent_throw()

void dbaccess::ODocumentDefinition::impl_showOrHideComponent_throw ( const bool  i_bShow)
private

shows or hides our component

The embedded object must exist, and be in state LOADED, at least.

Definition at line 738 of file documentdefinition.cxx.

References impl_getComponent_throw(), impl_onActivateEmbeddedObject_nothrow(), and m_xEmbeddedObject.

Referenced by execute().

◆ impl_store_throw()

void dbaccess::ODocumentDefinition::impl_store_throw ( )
private

stores our document, if it's already loaded

Definition at line 1826 of file documentdefinition.cxx.

References m_xEmbeddedObject, and dbaccess::OContentHelper::notifyDataSourceModified().

Referenced by execute(), and store().

◆ initialLoad()

void dbaccess::ODocumentDefinition::initialLoad ( const css::uno::Sequence< sal_Int8 > &  i_rClassID,
const css::uno::Sequence< css::beans::PropertyValue > &  i_rCreationArgs,
const css::uno::Reference< css::sdbc::XConnection > &  i_rConnection 
)

Definition at line 418 of file documentdefinition.cxx.

References loadEmbeddedObject().

◆ isModified()

bool dbaccess::ODocumentDefinition::isModified ( )

Definition at line 1933 of file documentdefinition.cxx.

References getComponent(), cppu::BaseMutex::m_aMutex, m_xEmbeddedObject, and xModel.

Referenced by prepareClose().

◆ isNewReport()

bool dbaccess::ODocumentDefinition::isNewReport ( ) const
inline

◆ loadEmbeddedObject()

void dbaccess::ODocumentDefinition::loadEmbeddedObject ( const css::uno::Reference< css::sdbc::XConnection > &  _xConnection,
const css::uno::Sequence< sal_Int8 > &  _aClassID,
const css::uno::Sequence< css::beans::PropertyValue > &  _rAdditionalArgs,
const bool  _bSuppressMacros,
const bool  _bReadOnly 
)
private

◆ loadEmbeddedObjectForPreview()

void dbaccess::ODocumentDefinition::loadEmbeddedObjectForPreview ( )
inlineprivate

loads the embedded object for preview.

Macros will be suppressed, and the document will be read-only.

Definition at line 295 of file documentdefinition.hxx.

References loadEmbeddedObject().

Referenced by onCommandGetDocumentProperties(), and onCommandPreview().

◆ notifyClosing()

void SAL_CALL dbaccess::ODocumentDefinition::notifyClosing ( const css::lang::EventObject &  Source)
overridevirtual

Definition at line 2061 of file documentdefinition.cxx.

◆ objectSupportsEmbeddedScripts()

bool dbaccess::ODocumentDefinition::objectSupportsEmbeddedScripts ( ) const
private

determines whether the document we represent supports embedded scripts and macros

Definition at line 1430 of file documentdefinition.cxx.

References dbaccess::OContentHelper::m_pImpl, and dbaccess::ODatabaseModelImpl::SubDocument.

Referenced by fillLoadArgs().

◆ onCommandGetDocumentProperties()

void dbaccess::ODocumentDefinition::onCommandGetDocumentProperties ( css::uno::Any &  _rProps)
private

◆ onCommandInsert()

void dbaccess::ODocumentDefinition::onCommandInsert ( const OUString &  _sURL,
const css::uno::Reference< css::ucb::XCommandEnvironment > &  Environment 
)
private

◆ onCommandOpenSomething()

Any dbaccess::ODocumentDefinition::onCommandOpenSomething ( const css::uno::Any &  _rArgument,
const bool  _bActivate,
const css::uno::Reference< css::ucb::XCommandEnvironment > &  _rxEnvironment 
)
private

◆ onCommandPreview()

void dbaccess::ODocumentDefinition::onCommandPreview ( css::uno::Any &  _rImage)
private

Definition at line 1695 of file documentdefinition.cxx.

References Exception, getComponent(), loadEmbeddedObjectForPreview(), and m_xEmbeddedObject.

Referenced by execute().

◆ open()

Reference< XComponent > SAL_CALL dbaccess::ODocumentDefinition::open ( )
overridevirtual

Definition at line 1847 of file documentdefinition.cxx.

References impl_openUI_nolck_throw().

◆ openDesign()

Reference< XComponent > SAL_CALL dbaccess::ODocumentDefinition::openDesign ( )
overridevirtual

Definition at line 1852 of file documentdefinition.cxx.

References impl_openUI_nolck_throw().

◆ prepareClose()

bool dbaccess::ODocumentDefinition::prepareClose ( )

prepares closing the document component

The method suspends the controller associated with the document, and saves the document if necessary.

Returns
<TRUE> if and only if the document component can be closed

Definition at line 1945 of file documentdefinition.cxx.

References DBG_UNHANDLED_EXCEPTION, Exception, impl_getComponent_throw(), isModified(), m_xEmbeddedObject, save(), xController, xFrame, and xModel.

Referenced by impl_close_throw().

◆ queryClosing()

void SAL_CALL dbaccess::ODocumentDefinition::queryClosing ( const css::lang::EventObject &  Source,
sal_Bool  GetsOwnership 
)
overridevirtual

Definition at line 2048 of file documentdefinition.cxx.

References close().

◆ registerProperties()

void dbaccess::ODocumentDefinition::registerProperties ( )
private

◆ rename()

void SAL_CALL dbaccess::ODocumentDefinition::rename ( const OUString &  newName)
overridevirtual

◆ save()

bool dbaccess::ODocumentDefinition::save ( bool  _bApprove,
const css::uno::Reference< css::awt::XTopWindow > &  rDialogParent 
)

◆ saveAs()

void dbaccess::ODocumentDefinition::saveAs ( )

◆ separateOpenCommandArguments()

void dbaccess::ODocumentDefinition::separateOpenCommandArguments ( const css::uno::Sequence< css::beans::PropertyValue > &  i_rOpenCommandArguments,
::comphelper::NamedValueCollection o_rDocumentLoadArgs,
::comphelper::NamedValueCollection o_rEmbeddedObjectDescriptor 
)
staticprivate

splits the given arguments to an "open*" command into arguments for loading the document, and arguments to be put into the EmbeddedObjectDescriptor

Any values already present in o_rDocumentLoadArgs and o_rEmbeddedObjectDescriptor will be overwritten by values from i_rOpenCommandArguments, if applicable, otherwise they will be preserved.

Parameters
i_rOpenCommandArgumentsthe arguments passed to the "open*" command at the content
o_rDocumentLoadArgsthe arguments to be passed when actually loading the embedded document.
o_rEmbeddedObjectDescriptorthe EmbeddedObjectDescriptor to be passed when initializing the embedded object

Definition at line 1447 of file documentdefinition.cxx.

References comphelper::NamedValueCollection::get(), comphelper::NamedValueCollection::has(), comphelper::NamedValueCollection::merge(), comphelper::NamedValueCollection::put(), comphelper::NamedValueCollection::remove(), and u.

Referenced by fillLoadArgs(), and loadEmbeddedObject().

◆ store()

void SAL_CALL dbaccess::ODocumentDefinition::store ( )
overridevirtual

Definition at line 1857 of file documentdefinition.cxx.

References Exception, impl_store_throw(), and cppu::BaseMutex::m_aMutex.

◆ updateDocumentTitle()

void dbaccess::ODocumentDefinition::updateDocumentTitle ( )
private

searches for read-only flag in the args of the model and sets it to the given value, if the value was not found, it will be appended.

Parameters
_bReadOnlyIf <TRUE> the document will be switched to readonly mode

Definition at line 2023 of file documentdefinition.cxx.

References DBA_RES, getComponent(), m_bForm, dbaccess::OContentHelper::m_pImpl, and sName.

Referenced by onCommandOpenSomething(), rename(), save(), and saveAs().

Member Data Documentation

◆ m_bForm

bool dbaccess::ODocumentDefinition::m_bForm
private

◆ m_bInExecute

bool dbaccess::ODocumentDefinition::m_bInExecute
private

Definition at line 72 of file documentdefinition.hxx.

Referenced by execute(), and onCommandOpenSomething().

◆ m_bOpenInDesign

bool dbaccess::ODocumentDefinition::m_bOpenInDesign
private

◆ m_bRemoveListener

bool dbaccess::ODocumentDefinition::m_bRemoveListener
private

Definition at line 73 of file documentdefinition.hxx.

Referenced by disposing(), and fillLoadArgs().

◆ m_pClientHelper

rtl::Reference<OEmbeddedClientHelper> dbaccess::ODocumentDefinition::m_pClientHelper
private

Definition at line 74 of file documentdefinition.hxx.

Referenced by closeObject(), and loadEmbeddedObject().

◆ m_pInterceptor

rtl::Reference<OInterceptor> dbaccess::ODocumentDefinition::m_pInterceptor
private

Definition at line 69 of file documentdefinition.hxx.

Referenced by fillLoadArgs(), and ~ODocumentDefinition().

◆ m_xEmbeddedObject

css::uno::Reference< css::embed::XEmbeddedObject> dbaccess::ODocumentDefinition::m_xEmbeddedObject
private

◆ m_xLastKnownConnection

css::uno::Reference< css::sdbc::XConnection > dbaccess::ODocumentDefinition::m_xLastKnownConnection
private

◆ m_xListener

css::uno::Reference< css::embed::XStateChangeListener > dbaccess::ODocumentDefinition::m_xListener
private

Definition at line 66 of file documentdefinition.hxx.

Referenced by disposing(), and impl_onActivateEmbeddedObject_nothrow().


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