diff options
author | Kurt Zenker <kz@openoffice.org> | 2009-12-01 13:17:08 +0100 |
---|---|---|
committer | Kurt Zenker <kz@openoffice.org> | 2009-12-01 13:17:08 +0100 |
commit | 041210d90f162084e98b1fc0acbe744926ac8f60 (patch) | |
tree | 2db9f4199ba6ba9e59ceb44e62ab2abe1ccafd1e /sfx2 | |
parent | ef1ec7001a06a6ba0fdbed702bcd7a6fec58eaf9 (diff) | |
parent | d5c799bd36d600f4ebbce76f12333324bc1f6c09 (diff) |
CWS-TOOLING: integrate CWS dba33a
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/view/sfxbasecontroller.cxx | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/sfx2/source/view/sfxbasecontroller.cxx b/sfx2/source/view/sfxbasecontroller.cxx index 54ccd29a7dd7..2951ac3ef4a3 100644 --- a/sfx2/source/view/sfxbasecontroller.cxx +++ b/sfx2/source/view/sfxbasecontroller.cxx @@ -81,6 +81,7 @@ #include <vos/mutex.hxx> #include <osl/mutex.hxx> +#include <tools/diagnose_ex.h> #include <comphelper/sequence.hxx> #include <rtl/ustrbuf.hxx> #include <toolkit/helper/convert.hxx> @@ -706,6 +707,29 @@ void SAL_CALL SfxBaseController::attachFrame( const REFERENCE< XFRAME >& xFrame SfxViewFrame* pActFrame = m_pData->m_pViewShell->GetFrame() ; pActFrame->Enable( TRUE ); pActFrame->GetDispatcher()->Lock( FALSE ); + + if ( ( m_pData->m_pViewShell->GetObjectShell() != NULL ) + && ( m_pData->m_pViewShell->GetObjectShell()->GetCreateMode() == SFX_CREATE_MODE_EMBEDDED ) + ) + { + SfxViewFrame* pViewFrm = m_pData->m_pViewShell->GetViewFrame(); + if ( !pViewFrm->GetFrame()->IsInPlace() ) + { + // for outplace embedded objects, we want the layout manager to keep the content window + // size constant, if possible + try + { + uno::Reference< beans::XPropertySet > xFrameProps( m_pData->m_xFrame, uno::UNO_QUERY_THROW ); + uno::Reference< beans::XPropertySet > xLayouterProps( + xFrameProps->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "LayoutManager" ) ) ), uno::UNO_QUERY_THROW ); + xLayouterProps->setPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PreserveContentSize" ) ), uno::makeAny( sal_True ) ); + } + catch( const uno::Exception& ) + { + DBG_UNHANDLED_EXCEPTION(); + } + } + } } } } |