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/fmpgeimp.cxx | |
parent | 3ae1e51873cf2cd2a56edceda14e702a806f68c8 (diff) |
dba34c: FmFormPageImpl needs late init, else the 'copy-ctor' crashs after the previous change
Diffstat (limited to 'svx/source/form/fmpgeimp.cxx')
-rw-r--r-- | svx/source/form/fmpgeimp.cxx | 13 |
1 files changed, 5 insertions, 8 deletions
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; |