diff options
author | Noel Grandin <noel@peralex.com> | 2013-03-27 14:20:45 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-04-23 16:05:56 +0200 |
commit | 1165aac95b8e44f41fc16a44bfec4c1c05801ac8 (patch) | |
tree | 7887802f0d1ba62ab95bad1c6fe8ebf323c87a91 /svx | |
parent | 9ffb86c7e93c1633866ed89f0749831fd7f31a35 (diff) |
fdo#46808, convert form::Forms to new style
Change-Id: I966ed18d45dc8a04c97a703d3c83382714025f2c
Diffstat (limited to 'svx')
-rw-r--r-- | svx/inc/svx/fmpage.hxx | 6 | ||||
-rw-r--r-- | svx/source/form/fmdpage.cxx | 2 | ||||
-rw-r--r-- | svx/source/form/fmmodel.cxx | 4 | ||||
-rw-r--r-- | svx/source/form/fmobj.cxx | 42 | ||||
-rw-r--r-- | svx/source/form/fmpage.cxx | 16 | ||||
-rw-r--r-- | svx/source/form/fmpgeimp.cxx | 41 | ||||
-rw-r--r-- | svx/source/form/fmundo.cxx | 8 | ||||
-rw-r--r-- | svx/source/form/navigatortreemodel.cxx | 14 | ||||
-rw-r--r-- | svx/source/inc/fmexch.hxx | 7 | ||||
-rw-r--r-- | svx/source/inc/fmexpl.hxx | 4 | ||||
-rw-r--r-- | svx/source/inc/fmobj.hxx | 9 | ||||
-rw-r--r-- | svx/source/inc/fmpgeimp.hxx | 5 |
12 files changed, 66 insertions, 92 deletions
diff --git a/svx/inc/svx/fmpage.hxx b/svx/inc/svx/fmpage.hxx index 548bdb65c7d7..ba3bdd13679d 100644 --- a/svx/inc/svx/fmpage.hxx +++ b/svx/inc/svx/fmpage.hxx @@ -30,8 +30,8 @@ class FmFormModel; class FmFormPageImpl; // contains a list of all forms namespace com { namespace sun { namespace star { - namespace container { - class XNameContainer; + namespace form { + class XForms; } }}} @@ -63,7 +63,7 @@ public: virtual SdrObject* RemoveObject(sal_uLong nObjNum); // access to all forms - const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer>& GetForms( bool _bForceCreate = true ) const; + const ::com::sun::star::uno::Reference< ::com::sun::star::form::XForms>& GetForms( bool _bForceCreate = true ) const; FmFormPageImpl& GetImpl() const { return *m_pImpl; } diff --git a/svx/source/form/fmdpage.cxx b/svx/source/form/fmdpage.cxx index 5d239f5b6042..76d1c97f930f 100644 --- a/svx/source/form/fmdpage.cxx +++ b/svx/source/form/fmdpage.cxx @@ -112,7 +112,7 @@ SdrObject *SvxFmDrawPage::_CreateSdrObject( const ::com::sun::star::uno::Referen FmFormPage *pFmPage = PTR_CAST( FmFormPage, GetSdrPage() ); if( pFmPage ) - xForms = pFmPage->GetForms(); + xForms.set( pFmPage->GetForms(), css::uno::UNO_QUERY_THROW ); return xForms; } diff --git a/svx/source/form/fmmodel.cxx b/svx/source/form/fmmodel.cxx index 474f8abfa1a2..b84f8b6912c4 100644 --- a/svx/source/form/fmmodel.cxx +++ b/svx/source/form/fmmodel.cxx @@ -175,7 +175,7 @@ SdrPage* FmFormModel::RemovePage(sal_uInt16 nPgNum) if ( pToBeRemovedPage ) { - Reference< XNameContainer > xForms( pToBeRemovedPage->GetForms( false ) ); + Reference< XNameContainer > xForms( pToBeRemovedPage->GetForms( false ), css::uno::UNO_QUERY ); if ( xForms.is() ) m_pImpl->pUndoEnv->RemoveForms( xForms ); } @@ -210,7 +210,7 @@ SdrPage* FmFormModel::RemoveMasterPage(sal_uInt16 nPgNum) if ( pPage ) { - Reference< XNameContainer > xForms( pPage->GetForms( false ) ); + Reference< XNameContainer > xForms( pPage->GetForms( false ), css::uno::UNO_QUERY ); if ( xForms.is() ) m_pImpl->pUndoEnv->RemoveForms( xForms ); } diff --git a/svx/source/form/fmobj.cxx b/svx/source/form/fmobj.cxx index 5f0641a9910d..34949302dc9f 100644 --- a/svx/source/form/fmobj.cxx +++ b/svx/source/form/fmobj.cxx @@ -31,9 +31,10 @@ #include "svx/dialmgr.hxx" #include <com/sun/star/awt/XDevice.hpp> -#include <com/sun/star/script/XEventAttacherManager.hpp> -#include <com/sun/star/io/XPersistObject.hpp> #include <com/sun/star/awt/XControlContainer.hpp> +#include <com/sun/star/form/Forms.hpp> +#include <com/sun/star/io/XPersistObject.hpp> +#include <com/sun/star/script/XEventAttacherManager.hpp> #include <com/sun/star/util/XCloneable.hpp> #include "svx/fmtools.hxx" @@ -84,9 +85,8 @@ FmFormObj::~FmFormObj() { DBG_DTOR(FmFormObj, NULL); - Reference< XComponent> xHistory(m_xEnvironmentHistory, UNO_QUERY); - if (xHistory.is()) - xHistory->dispose(); + if (m_xEnvironmentHistory.is()) + m_xEnvironmentHistory->dispose(); m_xEnvironmentHistory = NULL; m_aEventsHistory.realloc(0); @@ -194,7 +194,7 @@ void FmFormObj::SetPage(SdrPage* _pNewPage) return; } - Reference< XIndexContainer > xNewPageForms( pNewFormPage->GetForms( true ), UNO_QUERY ); + Reference< css::form::XForms > xNewPageForms = pNewFormPage->GetForms( true ); Reference< XIndexContainer > xNewParent; Sequence< ScriptEventDescriptor> aNewEvents; @@ -204,7 +204,7 @@ void FmFormObj::SetPage(SdrPage* _pNewPage) { // the element in m_xEnvironmentHistory which is equivalent to my new parent (which (perhaps) has to be created within _pNewPage->GetForms) // is the right-most element in the tree. - Reference< XIndexContainer > xRightMostLeaf = m_xEnvironmentHistory; + Reference< XIndexContainer > xRightMostLeaf( m_xEnvironmentHistory, UNO_QUERY_THROW ); try { while ( xRightMostLeaf->getCount() ) @@ -318,9 +318,8 @@ void FmFormObj::SetPage(SdrPage* _pNewPage) } // delete my history - Reference< XComponent> xHistory(m_xEnvironmentHistory, UNO_QUERY); - if (xHistory.is()) - xHistory->dispose(); + if (m_xEnvironmentHistory.is()) + m_xEnvironmentHistory->dispose(); m_xEnvironmentHistory = NULL; m_aEventsHistory.realloc(0); @@ -345,9 +344,8 @@ sal_uInt16 FmFormObj::GetObjIdentifier() const void FmFormObj::clonedFrom(const FmFormObj* _pSource) { DBG_ASSERT(_pSource != NULL, "FmFormObj::clonedFrom : invalid source !"); - Reference< XComponent> xHistory(m_xEnvironmentHistory, UNO_QUERY); - if (xHistory.is()) - xHistory->dispose(); + if (m_xEnvironmentHistory.is()) + m_xEnvironmentHistory->dispose(); m_xEnvironmentHistory = NULL; m_aEventsHistory.realloc(0); @@ -358,17 +356,11 @@ void FmFormObj::clonedFrom(const FmFormObj* _pSource) Reference< XInterface > xSourceContainer = xSourceAsChild->getParent(); - m_xEnvironmentHistory = Reference< XIndexContainer >( - ::comphelper::getProcessServiceFactory()->createInstance(OUString("com.sun.star.form.Forms") ), - UNO_QUERY); - DBG_ASSERT(m_xEnvironmentHistory.is(), "FmFormObj::clonedFrom : could not create a forms collection !"); + m_xEnvironmentHistory = css::form::Forms::create( comphelper::getProcessComponentContext() ); - if (m_xEnvironmentHistory.is()) - { - ensureModelEnv(xSourceContainer, m_xEnvironmentHistory); - m_aEventsHistory = aEvts; - // if we we're clone there was a call to operator=, so aEvts are excatly the events we need here ... - } + ensureModelEnv(xSourceContainer, m_xEnvironmentHistory); + m_aEventsHistory = aEvts; + // if we we're clone there was a call to operator=, so aEvts are excatly the events we need here ... } //------------------------------------------------------------------ @@ -454,7 +446,7 @@ namespace } //------------------------------------------------------------------ -Reference< XInterface > FmFormObj::ensureModelEnv(const Reference< XInterface > & _rSourceContainer, const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexContainer > _rTopLevelDestContainer) +Reference< XInterface > FmFormObj::ensureModelEnv(const Reference< XInterface > & _rSourceContainer, const Reference<css::form::XForms>& _rTopLevelDestContainer) { Reference< XInterface > xTopLevelSouce; OUString sAccessPath = lcl_getFormComponentAccessPath(_rSourceContainer, xTopLevelSouce); @@ -462,7 +454,7 @@ Reference< XInterface > FmFormObj::ensureModelEnv(const Reference< XInterface > // something went wrong, maybe _rSourceContainer isn't part of a valid forms hierarchy return Reference< XInterface > (); - Reference< XIndexContainer > xDestContainer(_rTopLevelDestContainer); + Reference< XIndexContainer > xDestContainer(_rTopLevelDestContainer, UNO_QUERY_THROW); Reference< XIndexContainer > xSourceContainer(xTopLevelSouce, UNO_QUERY); DBG_ASSERT(xSourceContainer.is(), "FmFormObj::ensureModelEnv : the top level source is invalid !"); diff --git a/svx/source/form/fmpage.cxx b/svx/source/form/fmpage.cxx index 3243c2314a68..507e2294712f 100644 --- a/svx/source/form/fmpage.cxx +++ b/svx/source/form/fmpage.cxx @@ -99,19 +99,15 @@ void FmFormPage::SetModel(SdrModel* pNewModel) { try { - Reference< XNameContainer > xForms( m_pImpl->getForms( false ) ); + Reference< css::form::XForms > xForms( m_pImpl->getForms( false ) ); if ( xForms.is() ) { // we want to keep the current collection, just reset the model // with which it's associated. - Reference< XChild > xAsChild( xForms, UNO_QUERY ); - if ( xAsChild.is() ) - { - FmFormModel* pDrawModel = (FmFormModel*) GetModel(); - SfxObjectShell* pObjShell = pDrawModel->GetObjectShell(); - if ( pObjShell ) - xAsChild->setParent( pObjShell->GetModel() ); - } + FmFormModel* pDrawModel = (FmFormModel*) GetModel(); + SfxObjectShell* pObjShell = pDrawModel->GetObjectShell(); + if ( pObjShell ) + xForms->setParent( pObjShell->GetModel() ); } } catch( ::com::sun::star::uno::Exception const& ) @@ -140,7 +136,7 @@ void FmFormPage::InsertObject(SdrObject* pObj, sal_uLong nPos, } //------------------------------------------------------------------ -const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer > & FmFormPage::GetForms( bool _bForceCreate ) const +const Reference< css::form::XForms > & FmFormPage::GetForms( bool _bForceCreate ) const { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmFormPage::GetForms" ); const SdrPage& rMasterPage( *this ); diff --git a/svx/source/form/fmpgeimp.cxx b/svx/source/form/fmpgeimp.cxx index 6d46e64d705d..ab7c9d597989 100644 --- a/svx/source/form/fmpgeimp.cxx +++ b/svx/source/form/fmpgeimp.cxx @@ -35,6 +35,7 @@ #include <com/sun/star/util/XCloneable.hpp> #include <com/sun/star/container/EnumerableMap.hpp> #include <com/sun/star/drawing/XControlShape.hpp> +#include <com/sun/star/form/Forms.hpp> #include <sfx2/objsh.hxx> #include <svx/fmglob.hxx> @@ -159,18 +160,11 @@ namespace void FmFormPageImpl::initFrom( FmFormPageImpl& i_foreignImpl ) { // clone the Forms collection - const Reference< XNameContainer > xForeignForms( const_cast< FmFormPageImpl& >( i_foreignImpl ).getForms( false ) ); - const Reference< XCloneable > xCloneable( xForeignForms, UNO_QUERY ); - if ( !xCloneable.is() ) - { - // great, nothing to do - OSL_ENSURE( !xForeignForms.is(), "FmFormPageImpl::FmFormPageImpl: a non-cloneable forms container!?" ); - return; - } + const Reference< css::form::XForms > xForeignForms( const_cast< FmFormPageImpl& >( i_foreignImpl ).getForms( false ) ); try { - m_xForms.set( xCloneable->createClone(), UNO_QUERY_THROW ); + m_xForms.set( xForeignForms->createClone(), UNO_QUERY_THROW ); // create a mapping between the original control models and their clones MapControlModels aModelAssignment; @@ -179,7 +173,7 @@ void FmFormPageImpl::initFrom( FmFormPageImpl& i_foreignImpl ) FormComponentVisitor aVisitor = FormComponentVisitor( FormHierarchyComparator() ); FormComponentAssignment aAssignmentProcessor( aModelAssignment ); - aVisitor.process( FormComponentPair( xCloneable, m_xForms ), aAssignmentProcessor ); + aVisitor.process( FormComponentPair( xForeignForms, m_xForms ), aAssignmentProcessor ); // assign the cloned models to their SdrObjects SdrObjListIter aForeignIter( i_foreignImpl.m_rPage ); @@ -318,7 +312,7 @@ Reference< XMap > FmFormPageImpl::impl_createControlShapeMap_nothrow() } //------------------------------------------------------------------------------ -const Reference< XNameContainer >& FmFormPageImpl::getForms( bool _bForceCreate ) +const Reference< css::form::XForms >& FmFormPageImpl::getForms( bool _bForceCreate ) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmFormPageImpl::getForms" ); if ( m_xForms.is() || !_bForceCreate ) @@ -328,12 +322,8 @@ const Reference< XNameContainer >& FmFormPageImpl::getForms( bool _bForceCreate { m_bAttemptedFormCreation = true; - const OUString sFormsCollectionServiceName("com.sun.star.form.Forms"); Reference<XComponentContext> xContext = comphelper::getProcessComponentContext(); - m_xForms.set( - xContext->getServiceManager()->createInstanceWithContext( sFormsCollectionServiceName, xContext), - UNO_QUERY_THROW - ); + m_xForms = css::form::Forms::create( xContext ); if ( m_aFormsCreationHdl.IsSet() ) { @@ -343,17 +333,13 @@ const Reference< XNameContainer >& FmFormPageImpl::getForms( bool _bForceCreate FmFormModel* pFormsModel = PTR_CAST( FmFormModel, m_rPage.GetModel() ); // give the newly created collection a place in the universe - Reference< XChild > xAsChild( m_xForms, UNO_QUERY ); - if ( xAsChild.is() ) - { - SfxObjectShell* pObjShell = pFormsModel ? pFormsModel->GetObjectShell() : NULL; - if ( pObjShell ) - xAsChild->setParent( pObjShell->GetModel() ); - } + SfxObjectShell* pObjShell = pFormsModel ? pFormsModel->GetObjectShell() : NULL; + if ( pObjShell ) + m_xForms->setParent( pObjShell->GetModel() ); // tell the UNDO environment that we have a new forms collection if ( pFormsModel ) - pFormsModel->GetUndoEnv().AddForms( m_xForms ); + pFormsModel->GetUndoEnv().AddForms( Reference<XNameContainer>(m_xForms,UNO_QUERY_THROW) ); } return m_xForms; } @@ -395,13 +381,13 @@ Reference< XForm > FmFormPageImpl::getDefaultForm() RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmFormPageImpl::getDefaultForm" ); Reference< XForm > xForm; - Reference< XNameContainer > xForms( getForms() ); + Reference< XForms > xForms( getForms() ); // by default, we use our "current form" if ( !validateCurForm() ) { // check whether there is a "standard" form - if ( xForms->hasElements() ) + if ( Reference<XNameAccess>(xForms,UNO_QUERY_THROW)->hasElements() ) { // suche die Standardform OUString sStandardFormname = String( SVX_RES( RID_STR_STDFORMNAME ) ); @@ -412,8 +398,7 @@ Reference< XForm > FmFormPageImpl::getDefaultForm() xForm.set( xForms->getByName( sStandardFormname ), UNO_QUERY_THROW ); else { - Reference< XIndexAccess > xFormsByIndex( xForms, UNO_QUERY_THROW ); - xForm.set( xFormsByIndex->getByIndex(0), UNO_QUERY_THROW ); + xForm.set( xForms->getByIndex(0), UNO_QUERY_THROW ); } } catch( const Exception& ) diff --git a/svx/source/form/fmundo.cxx b/svx/source/form/fmundo.cxx index 20b924b28f66..29ef91a77aa5 100644 --- a/svx/source/form/fmundo.cxx +++ b/svx/source/form/fmundo.cxx @@ -214,7 +214,7 @@ void FmXUndoEnvironment::dispose() FmFormPage* pPage = PTR_CAST( FmFormPage, rModel.GetPage(i) ); if ( pPage ) { - Reference< XInterface > xForms = pPage->GetForms( false ).get(); + Reference< css::form::XForms > xForms = pPage->GetForms( false ).get(); if ( xForms.is() ) RemoveElement( xForms ); } @@ -226,7 +226,7 @@ void FmXUndoEnvironment::dispose() FmFormPage* pPage = PTR_CAST( FmFormPage, rModel.GetMasterPage(i) ); if ( pPage ) { - Reference< XInterface > xForms = pPage->GetForms( false ).get(); + Reference< css::form::XForms > xForms = pPage->GetForms( false ).get(); if ( xForms.is() ) RemoveElement( xForms ); } @@ -265,7 +265,7 @@ void FmXUndoEnvironment::ModeChanged() FmFormPage* pPage = PTR_CAST( FmFormPage, rModel.GetPage(i) ); if ( pPage ) { - Reference< XInterface > xForms = pPage->GetForms( false ).get(); + Reference< css::form::XForms > xForms = pPage->GetForms( false ).get(); if ( xForms.is() ) TogglePropertyListening( xForms ); } @@ -277,7 +277,7 @@ void FmXUndoEnvironment::ModeChanged() FmFormPage* pPage = PTR_CAST( FmFormPage, rModel.GetMasterPage(i) ); if ( pPage ) { - Reference< XInterface > xForms = pPage->GetForms( false ).get(); + Reference< css::form::XForms > xForms = pPage->GetForms( false ).get(); if ( xForms.is() ) TogglePropertyListening( xForms ); } diff --git a/svx/source/form/navigatortreemodel.cxx b/svx/source/form/navigatortreemodel.cxx index 4187473ef9b3..a5c7d96c99f8 100644 --- a/svx/source/form/navigatortreemodel.cxx +++ b/svx/source/form/navigatortreemodel.cxx @@ -253,10 +253,8 @@ namespace svxform void NavigatorTreeModel::Clear() { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "NavigatorTreeModel::Clear" ); - Reference< XNameContainer > xForms( GetForms()); - Reference< XContainer > xContainer(xForms, UNO_QUERY); - if (xContainer.is()) - xContainer->removeContainerListener((XContainerListener*)m_pPropChangeList); + Reference< css::form::XForms > xForms( GetForms()); + xForms->removeContainerListener((XContainerListener*)m_pPropChangeList); ////////////////////////////////////////////////////////////////////// // RootList loeschen @@ -269,7 +267,7 @@ namespace svxform } //------------------------------------------------------------------------ - Reference< XNameContainer > NavigatorTreeModel::GetForms() const + Reference< css::form::XForms > NavigatorTreeModel::GetForms() const { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "NavigatorTreeModel::GetForms" ); if( !m_pFormShell || !m_pFormShell->GetCurPage()) @@ -869,7 +867,7 @@ namespace svxform } //------------------------------------------------------------------------ - void NavigatorTreeModel::UpdateContent( const Reference< XNameContainer > & xForms ) + void NavigatorTreeModel::UpdateContent( const Reference< css::form::XForms > & xForms ) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "NavigatorTreeModel::UpdateContent" ); ////////////////////////////////////////////////////////////////////// @@ -877,9 +875,7 @@ namespace svxform Clear(); if (xForms.is()) { - Reference< XContainer > xFormContainer(xForms, UNO_QUERY); - if (xFormContainer.is()) - xFormContainer->addContainerListener((XContainerListener*)m_pPropChangeList); + xForms->addContainerListener((XContainerListener*)m_pPropChangeList); FillBranch(NULL); diff --git a/svx/source/inc/fmexch.hxx b/svx/source/inc/fmexch.hxx index 3221e644a376..9b1265026c74 100644 --- a/svx/source/inc/fmexch.hxx +++ b/svx/source/inc/fmexch.hxx @@ -23,6 +23,7 @@ #include <svtools/transfer.hxx> #include <com/sun/star/uno/Sequence.hxx> #include <com/sun/star/container/XNameContainer.hpp> +#include <com/sun/star/form/XForms.hpp> #include <tools/link.hxx> #include <svx/svxdllapi.h> @@ -137,7 +138,7 @@ namespace svxform ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > > m_aHiddenControlModels; - ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer > + ::com::sun::star::uno::Reference< ::com::sun::star::form::XForms > m_xFormsRoot; // the root of the forms collection where the entries we represent reside // this uniquely identifies the page and the document @@ -171,7 +172,7 @@ namespace svxform size_t onEntryRemoved( SvTreeListEntry* _pEntry ); void setFormsRoot( - const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >& _rxFormsRoot + const ::com::sun::star::uno::Reference< ::com::sun::star::form::XForms >& _rxFormsRoot ) { m_xFormsRoot = _rxFormsRoot; } void buildPathFormat(SvTreeListBox* pTreeBox, SvTreeListEntry* pRoot); @@ -192,7 +193,7 @@ namespace svxform ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > > hiddenControls() const { return m_aHiddenControlModels; } - ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer > + ::com::sun::star::uno::Reference< ::com::sun::star::form::XForms > getFormsRoot() const { return m_xFormsRoot; } }; diff --git a/svx/source/inc/fmexpl.hxx b/svx/source/inc/fmexpl.hxx index 1b20fe4f666d..67e4adf6ca24 100644 --- a/svx/source/inc/fmexpl.hxx +++ b/svx/source/inc/fmexpl.hxx @@ -359,7 +359,7 @@ namespace svxform ImageList m_aNormalImages; - void UpdateContent( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >& xForms ); + void UpdateContent( const ::com::sun::star::uno::Reference< ::com::sun::star::form::XForms >& xForms ); FmControlData* CreateControlData( ::com::sun::star::form::XFormComponent* pFormComponent ); void InsertForm(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm >& xForm, sal_uInt32 nRelPos); @@ -395,7 +395,7 @@ namespace svxform void Clear(); void SetModified( sal_Bool bMod=sal_True ); - ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer > GetForms() const; + ::com::sun::star::uno::Reference< ::com::sun::star::form::XForms > GetForms() const; FmFormShell* GetFormShell() const { return m_pFormShell; } FmFormPage* GetFormPage() const { return m_pFormPage; } FmEntryData* FindData( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& xElement, FmEntryDataList* pDataList, sal_Bool bRecurs=sal_True ); diff --git a/svx/source/inc/fmobj.hxx b/svx/source/inc/fmobj.hxx index 5bbd02aa01ec..5e77e56eb5d2 100644 --- a/svx/source/inc/fmobj.hxx +++ b/svx/source/inc/fmobj.hxx @@ -20,8 +20,9 @@ #define _SVX_FMOBJ_HXX #include <svx/svdouno.hxx> -#include <com/sun/star/script/ScriptEventDescriptor.hpp> #include <com/sun/star/container/XIndexContainer.hpp> +#include <com/sun/star/form/XForms.hpp> +#include <com/sun/star/script/ScriptEventDescriptor.hpp> //================================================================== // FmFormObj @@ -36,7 +37,7 @@ class FmFormObj: public SdrUnoObj // Informationen fuer die Controlumgebung // werden nur vorgehalten, wenn ein Object sich nicht in einer Objectliste befindet ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexContainer> m_xParent; - ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexContainer > m_xEnvironmentHistory; + ::com::sun::star::uno::Reference< ::com::sun::star::form::XForms > m_xEnvironmentHistory; sal_Int32 m_nPos; OutputDevice* m_pLastKnownRefDevice; @@ -78,7 +79,9 @@ public: virtual void clonedFrom(const FmFormObj* _pSource); - static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface> ensureModelEnv(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>& _rSourceContainer, const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexContainer> _rTopLevelDestContainer); + static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface> ensureModelEnv( + const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>& _rSourceContainer, + const ::com::sun::star::uno::Reference< ::com::sun::star::form::XForms>& _rTopLevelDestContainer); /** returns the FmFormObj behind the given SdrObject diff --git a/svx/source/inc/fmpgeimp.hxx b/svx/source/inc/fmpgeimp.hxx index db53cc09bf8c..57a3ad0826e7 100644 --- a/svx/source/inc/fmpgeimp.hxx +++ b/svx/source/inc/fmpgeimp.hxx @@ -23,6 +23,7 @@ #include <com/sun/star/container/XNameAccess.hpp> #include <com/sun/star/form/XFormComponent.hpp> #include <com/sun/star/form/XForm.hpp> +#include <com/sun/star/form/XForms.hpp> #include <com/sun/star/container/XNameContainer.hpp> #include <com/sun/star/frame/XModel.hpp> #include <com/sun/star/lang/XServiceInfo.hpp> @@ -49,7 +50,7 @@ class SVX_DLLPRIVATE FmFormPageImpl { ::std::map< ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormComponent >,SdrObject* > m_aComponentMap; ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm > xCurrentForm; - ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer > m_xForms; + ::com::sun::star::uno::Reference< ::com::sun::star::form::XForms > m_xForms; ::com::sun::star::uno::WeakReference< ::com::sun::star::container::XMap > m_aControlShapeMap; FmFormPage& m_rPage; @@ -90,7 +91,7 @@ public: inline sal_Bool hasEverBeenActivated( ) const { return !m_bFirstActivation; } inline void setHasBeenActivated( ) { m_bFirstActivation = sal_False; } - const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer>& getForms( bool _bForceCreate = true ); + const ::com::sun::star::uno::Reference< ::com::sun::star::form::XForms>& getForms( bool _bForceCreate = true ); void SetFormsCreationHdl( const Link& _rFormsCreationHdl ) { m_aFormsCreationHdl = _rFormsCreationHdl; } const Link& GetFormsCreationHdl() const { return m_aFormsCreationHdl; } |