diff options
author | Frank Schoenheit [fs] <frank.schoenheit@oracle.com> | 2010-12-02 15:29:46 +0100 |
---|---|---|
committer | Frank Schoenheit [fs] <frank.schoenheit@oracle.com> | 2010-12-02 15:29:46 +0100 |
commit | ea6c7c0d73e7d898d6e4759cb33997b7a48d2bd7 (patch) | |
tree | 9154bdc555fba8896458d45c9034a13d63c0da09 /svx/source/form | |
parent | dba34c: spelling (diff) | |
download | core-ea6c7c0d73e7d898d6e4759cb33997b7a48d2bd7.tar.gz core-ea6c7c0d73e7d898d6e4759cb33997b7a48d2bd7.zip |
dba34c: FmFormPageImpl needs late init, else the 'copy-ctor' crashs after the previous change
Diffstat (limited to 'svx/source/form')
-rw-r--r-- | svx/source/form/fmpage.cxx | 5 | ||||
-rw-r--r-- | svx/source/form/fmpgeimp.cxx | 13 |
2 files changed, 9 insertions, 9 deletions
diff --git a/svx/source/form/fmpage.cxx b/svx/source/form/fmpage.cxx index 0a5c7da9ea3c..94c6e80dcc07 100644 --- a/svx/source/form/fmpage.cxx +++ b/svx/source/form/fmpage.cxx @@ -105,12 +105,15 @@ FmFormPage::FmFormPage(FmFormModel& rModel, StarBASIC* _pBasic, FASTBOOL bMaster FmFormPage::FmFormPage(const FmFormPage& rPage) :SdrPage(rPage) #ifndef SVX_LIGHT - ,m_pImpl(new FmFormPageImpl( *this, rPage.GetImpl() ) ) + ,m_pImpl(new FmFormPageImpl( *this ) ) #else ,m_pImpl(NULL) #endif ,m_pBasic(0) { +#ifndef SVX_LIGHT + m_pImpl->initFrom( rPage.GetImpl() ); +#endif RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmFormPage::FmFormPage" ); m_sPageName = rPage.m_sPageName; } diff --git a/svx/source/form/fmpgeimp.cxx b/svx/source/form/fmpgeimp.cxx index ceafd55566e2..ec612e2ea782 100644 --- a/svx/source/form/fmpgeimp.cxx +++ b/svx/source/form/fmpgeimp.cxx @@ -167,19 +167,16 @@ namespace } //------------------------------------------------------------------------------ -FmFormPageImpl::FmFormPageImpl( FmFormPage& _rPage, const FmFormPageImpl& rImpl ) - :m_rPage( _rPage ) - ,m_bFirstActivation( sal_True ) - ,m_bAttemptedFormCreation( false ) +void FmFormPageImpl::initFrom( FmFormPageImpl& i_foreignImpl ) { DBG_CTOR(FmFormPageImpl,NULL); // clone the Forms collection - Reference< XCloneable > xCloneable( const_cast< FmFormPageImpl& >( rImpl ).getForms( false ), UNO_QUERY ); + Reference< XCloneable > xCloneable( const_cast< FmFormPageImpl& >( i_foreignImpl ).getForms( false ), UNO_QUERY ); if ( !xCloneable.is() ) { // great, nothing to do - OSL_ENSURE( !const_cast< FmFormPageImpl& >( rImpl ).getForms( false ).is(), "FmFormPageImpl::FmFormPageImpl: a non-cloneable forms container!?" ); + OSL_ENSURE( !const_cast< FmFormPageImpl& >( i_foreignImpl ).getForms( false ).is(), "FmFormPageImpl::FmFormPageImpl: a non-cloneable forms container!?" ); return; } try @@ -196,7 +193,7 @@ FmFormPageImpl::FmFormPageImpl( FmFormPage& _rPage, const FmFormPageImpl& rImpl aVisitor.process( FormComponentPair( xCloneable, m_xForms ), aAssignmentProcessor ); // assign the cloned models to their SdrObjects - SdrObjListIter aForeignIter( rImpl.m_rPage ); + SdrObjListIter aForeignIter( i_foreignImpl.m_rPage ); SdrObjListIter aOwnIter( m_rPage ); OSL_ENSURE( aForeignIter.IsMore() == aOwnIter.IsMore(), "FmFormPageImpl::FmFormPageImpl: inconsistent number of objects (1)!" ); @@ -230,7 +227,7 @@ FmFormPageImpl::FmFormPageImpl( FmFormPage& _rPage, const FmFormPageImpl& rImpl MapControlModels::const_iterator assignment = aModelAssignment.find( xForeignModel ); OSL_ENSURE( assignment != aModelAssignment.end(), "FmFormPageImpl::FmFormPageImpl: no clone found for this model!" ); if ( assignment == aModelAssignment.end() ) - // the source SdrObject has a model, but it is not part of the model hierarchy in rImpl.getForms(). + // the source SdrObject has a model, but it is not part of the model hierarchy in i_foreignImpl.getForms(). // Pathological, too ... continue; |