From e1e25bdd16958a72c952ccb9eb70f05636637e9d Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Fri, 29 Jan 2010 10:12:25 +0100 Subject: dba33f: when re-activating an embedded object, do not reset its modified state (plus do not the other initializations which are needed for the first activation only) --- dbaccess/source/core/dataaccess/documentdefinition.cxx | 8 ++++---- dbaccess/source/core/dataaccess/documentdefinition.hxx | 4 +--- 2 files changed, 5 insertions(+), 7 deletions(-) (limited to 'dbaccess') diff --git a/dbaccess/source/core/dataaccess/documentdefinition.cxx b/dbaccess/source/core/dataaccess/documentdefinition.cxx index 50f391c64afb..4687b7cfdd34 100644 --- a/dbaccess/source/core/dataaccess/documentdefinition.cxx +++ b/dbaccess/source/core/dataaccess/documentdefinition.cxx @@ -741,7 +741,7 @@ void ODocumentDefinition::impl_removeFrameFromDesktop_throw( const Reference< XF } // ----------------------------------------------------------------------------- -void ODocumentDefinition::impl_onActivateEmbeddedObject() +void ODocumentDefinition::impl_onActivateEmbeddedObject( const bool i_bReactivated ) { try { @@ -771,7 +771,7 @@ void ODocumentDefinition::impl_onActivateEmbeddedObject() LifetimeCoupler::couple( *this, Reference< XComponent >( xFrame, UNO_QUERY_THROW ) ); // init the edit view - if ( m_bOpenInDesign ) + if ( m_bOpenInDesign && !i_bReactivated ) impl_initObjectEditView( xController ); } catch( const RuntimeException& ) @@ -1085,7 +1085,7 @@ void ODocumentDefinition::onCommandOpenSomething( const Any& _rOpenArgument, con if ( _bActivate && !bOpenHidden ) { m_xEmbeddedObject->changeState( EmbedStates::ACTIVE ); - impl_onActivateEmbeddedObject(); + impl_onActivateEmbeddedObject( false ); } // LLA: Alle fillReportData() calls prfen, sollte es welche geben, die danach noch viel machen @@ -1126,7 +1126,7 @@ Any SAL_CALL ODocumentDefinition::execute( const Command& aCommand, sal_Int32 Co if ( bIsActive && !bIsAliveNewStyleReport ) { - impl_onActivateEmbeddedObject(); + impl_onActivateEmbeddedObject( true ); return makeAny( getComponent() ); } } diff --git a/dbaccess/source/core/dataaccess/documentdefinition.hxx b/dbaccess/source/core/dataaccess/documentdefinition.hxx index 32ec2c68a083..9fc32364cb0a 100644 --- a/dbaccess/source/core/dataaccess/documentdefinition.hxx +++ b/dbaccess/source/core/dataaccess/documentdefinition.hxx @@ -217,10 +217,8 @@ public: private: /** does necessary initializations after our embedded object has been switched to ACTIVE - @param _bOpenedInDesignMode - determines whether the embedded object has been opened for designing it or for data display */ - void impl_onActivateEmbeddedObject(); + void impl_onActivateEmbeddedObject( const bool i_bReactivated ); /** initializes a newly created view/controller which is displaying our embedded object -- cgit