29#include <com/sun/star/awt/XTopWindow.hpp>
30#include <com/sun/star/sdbc/XConnection.hpp>
31#include <com/sun/star/frame/XController.hpp>
32#include <com/sun/star/embed/XStateChangeListener.hpp>
33#include <com/sun/star/embed/XEmbeddedObject.hpp>
34#include <com/sun/star/embed/XStorage.hpp>
35#include <com/sun/star/sdb/XSubDocument.hpp>
36#include <com/sun/star/util/XCloseListener.hpp>
37#include <com/sun/star/container/XHierarchicalName.hpp>
42 class NamedValueCollection;
49 class OEmbeddedClientHelper;
54 , css::sdb::XSubDocument
55 , css::util::XCloseListener
56 , css::container::XHierarchicalName
66 css::uno::Reference< css::embed::XStateChangeListener >
m_xListener;
82 const css::uno::Reference< css::uno::XInterface >& _rxContainer,
83 const css::uno::Reference< css::uno::XComponentContext >&,
89 const css::uno::Sequence< sal_Int8 >& i_rClassID,
90 const css::uno::Sequence< css::beans::PropertyValue >& i_rCreationArgs,
91 const css::uno::Reference< css::sdbc::XConnection >& i_rConnection
94 virtual css::uno::Sequence<css::uno::Type> SAL_CALL
getTypes()
override;
105 css::
uno::Any& o_rValue,
110 virtual css::
uno::Reference< css::util::XCloseable > SAL_CALL
getComponent( ) override;
113 virtual css::
uno::Reference< css::lang::XComponent > SAL_CALL
open( ) override;
114 virtual css::
uno::Reference< css::lang::XComponent > SAL_CALL
openDesign( ) override;
115 virtual
void SAL_CALL
store( ) override;
126 virtual css::
uno::Any SAL_CALL
execute( const css::
ucb::Command& aCommand, sal_Int32 CommandId, const css::
uno::Reference< css::
ucb::XCommandEnvironment >& Environment ) override ;
129 virtual
void SAL_CALL
rename( const OUString& newName ) override;
132 virtual
void SAL_CALL
queryClosing( const css::lang::EventObject& Source,
sal_Bool GetsOwnership ) override;
133 virtual
void SAL_CALL
notifyClosing( const css::lang::EventObject& Source ) override;
136 virtual
void SAL_CALL
disposing( const css::lang::EventObject& Source ) override;
141 css::
uno::Reference< css::embed::XStorage >
144 bool save(
bool _bApprove, const css::
uno::Reference<css::awt::XTopWindow>& rDialogParent);
151 const css::uno::Reference< css::uno::XComponentContext > & _rxContext,
152 const css::uno::Reference< css::util::XCloseable >& _rxComponent,
153 const css::uno::Reference< css::sdbc::XConnection >& _rxActiveConnection
156 const css::uno::Reference< css::sdbc::XConnection >&
170 const OUString& _rMediaType,
171 const css::uno::Reference< css::uno::XComponentContext > & _rxContext,
172 css::uno::Sequence< sal_Int8 >& _rClassId
175 const css::uno::Reference< css::embed::XStorage >& _rxContainerStorage,
176 const OUString& _rEntityName,
177 const css::uno::Reference< css::uno::XComponentContext > & _rxContext,
178 css::uno::Sequence< sal_Int8 >& _rClassId
185 const css::uno::Any& i_rNewValue,
186 const css::uno::Any& i_rOldValue,
188 const NotifierAccess&
204 static void impl_initFormEditView(
const css::uno::Reference< css::frame::XController >& _rxController );
210 const css::uno::Reference< css::uno::XComponentContext >& _rContext,
211 const css::uno::Reference< css::frame::XFrame >& _rxFrame
216 css::uno::Reference< css::lang::XComponent >
229 css::uno::Reference< css::util::XCloseable >
244 virtual void SAL_CALL
disposing()
override;
251 css::uno::Sequence< css::beans::PropertyValue >
253 const css::uno::Reference< css::sdbc::XConnection>& _xConnection,
254 const bool _bSuppressMacros,
255 const bool _bReadOnly,
256 const css::uno::Sequence< css::beans::PropertyValue >& i_rOpenCommandArguments,
257 css::uno::Sequence< css::beans::PropertyValue >& _out_rEmbeddedObjectDescriptor
275 const css::uno::Sequence< css::beans::PropertyValue >& i_rOpenCommandArguments,
285 const css::uno::Reference< css::sdbc::XConnection>& _xConnection,
286 const css::uno::Sequence< sal_Int8 >& _aClassID,
287 const css::uno::Sequence< css::beans::PropertyValue >& _rAdditionalArgs,
288 const bool _bSuppressMacros,
289 const bool _bReadOnly
299 css::uno::Sequence< sal_Int8 >(),
300 css::uno::Sequence< css::beans::PropertyValue >(),
323 void onCommandInsert(
const OUString& _sURL,
const css::uno::Reference< css::ucb::XCommandEnvironment >& Environment );
327 const css::uno::Any& _rArgument,
328 const bool _bActivate,
329 const css::uno::Reference< css::ucb::XCommandEnvironment >& _rxEnvironment
332 using ::cppu::OPropertySetHelper::getFastPropertyValue;
340 const OUString& i_rNewName,
341 ::osl::ResettableMutexGuard& i_rClearForNotify
::osl::ResettableMutexGuard & m_rClearForNotify
NameChangeNotifier(ODocumentDefinition &i_rDocumentDefinition, const OUString &i_rNewName, ::osl::ResettableMutexGuard &i_rClearForNotify)
void impl_fireEvent_throw(const bool i_bVetoable)
const css::uno::Any m_aNewValue
const css::uno::Any m_aOldValue
ODocumentDefinition & m_rDocumentDefinition
virtual void SAL_CALL rename(const OUString &newName) override
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
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
bool impl_close_throw()
closes our document, if it's open
css::uno::Reference< css::sdbc::XConnection > m_xLastKnownConnection
virtual void getPropertyDefaultByHandle(sal_Int32 _nHandle, css::uno::Any &_rDefault) const override
const OUString & getCurrentName() const
void onCommandInsert(const OUString &_sURL, const css::uno::Reference< css::ucb::XCommandEnvironment > &Environment)
rtl::Reference< OEmbeddedClientHelper > m_pClientHelper
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)
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,...
bool prepareClose()
prepares closing the document component
virtual css::uno::Reference< css::util::XCloseable > SAL_CALL getComponent() override
virtual void SAL_CALL disposing() override
void updateDocumentTitle()
searches for read-only flag in the args of the model and sets it to the given value,...
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
const css::uno::Reference< css::sdbc::XConnection > & getConnection() const
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
void loadEmbeddedObjectForPreview()
loads the embedded object for preview.
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)
bool save(bool _bApprove, const css::uno::Reference< css::awt::XTopWindow > &rDialogParent)
void impl_store_throw()
stores our document, if it's already loaded
ODocumentDefinition(const css::uno::Reference< css::uno::XInterface > &_rxContainer, const css::uno::Reference< css::uno::XComponentContext > &, const TContentPtr &_pImpl, bool _bForm)
void onCommandPreview(css::uno::Any &_rImage)
virtual OUString determineContentType() const override
css::uno::Reference< css::embed::XStorage > getContainerStorage() const
returns the forms/reports container storage, depending on m_bForm.
virtual ::cppu::IPropertyArrayHelper * createArrayHelper() const override
rtl::Reference< OInterceptor > m_pInterceptor
css::uno::Reference< css::util::XCloseable > impl_getComponent_throw(const bool i_ForceCreate=true)
returns our component, creates it if necessary
virtual css::uno::Reference< css::lang::XComponent > SAL_CALL open() override
void firePropertyChange(sal_Int32 i_nHandle, const css::uno::Any &i_rNewValue, const css::uno::Any &i_rOldValue, bool i_bVetoable, const NotifierAccess &)
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
virtual sal_Bool SAL_CALL close() override
css::uno::Reference< css::embed::XEmbeddedObject > m_xEmbeddedObject
void impl_showOrHideComponent_throw(const bool i_bShow)
shows or hides our component
virtual ::cppu::IPropertyArrayHelper &SAL_CALL getInfoHelper() override
virtual ~ODocumentDefinition() override
void impl_onActivateEmbeddedObject_nothrow(const bool i_bReactivated)
does necessary initializations after our embedded object has been switched to ACTIVE
void registerProperties()
void onCommandGetDocumentProperties(css::uno::Any &_rProps)
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
bool objectSupportsEmbeddedScripts() const
determines whether the document we represent supports embedded scripts and macros
virtual css::uno::Reference< css::lang::XComponent > SAL_CALL openDesign() override
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)
css::uno::Any onCommandOpenSomething(const css::uno::Any &_rArgument, const bool _bActivate, const css::uno::Reference< css::ucb::XCommandEnvironment > &_rxEnvironment)
css::uno::Reference< css::lang::XComponent > impl_openUI_nolck_throw(bool _bForEditing)
opens the UI for this sub document
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override
virtual OUString SAL_CALL getHierarchicalName() override
virtual void SAL_CALL notifyClosing(const css::lang::EventObject &Source) override
css::uno::Reference< css::embed::XStateChangeListener > m_xListener
virtual void SAL_CALL queryClosing(const css::lang::EventObject &Source, sal_Bool GetsOwnership) 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 OUString SAL_CALL composeHierarchicalName(const OUString &aRelativeName) override
static OUString GetDocumentServiceFromMediaType(const OUString &_rMediaType, const css::uno::Reference< css::uno::XComponentContext > &_rxContext, css::uno::Sequence< sal_Int8 > &_rClassId)
virtual void SAL_CALL getFastPropertyValue(css::uno::Any &o_rValue, sal_Int32 i_nHandle) const override
std::shared_ptr< OContentHelper_Impl > TContentPtr
::cppu::ImplHelper4< css::embed::XComponentSupplier, css::sdb::XSubDocument, css::util::XCloseListener, css::container::XHierarchicalName > ODocumentDefinition_Base
#define DECLARE_XINTERFACE()