diff options
author | Oliver Bolte <obo@openoffice.org> | 2005-03-15 10:38:03 +0000 |
---|---|---|
committer | Oliver Bolte <obo@openoffice.org> | 2005-03-15 10:38:03 +0000 |
commit | 415ebdd04b49f75a8d8d51e37c7c11a2af0f968b (patch) | |
tree | 796365a3cc6e13081490cd77bd20f31a7764e2a5 | |
parent | 68f7d7a5830f695465f01612fd1d23bf349f336d (diff) |
INTEGRATION: CWS mav17 (1.13.10); FILE MERGED
2005/02/23 08:42:32 mav 1.13.10.1: #i35991# let the embedded document be opened outplace with the same size and in nonmodified state
-rw-r--r-- | embeddedobj/source/general/docholder.cxx | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/embeddedobj/source/general/docholder.cxx b/embeddedobj/source/general/docholder.cxx index 1340c4cd41bb..e9e40b24be5c 100644 --- a/embeddedobj/source/general/docholder.cxx +++ b/embeddedobj/source/general/docholder.cxx @@ -2,9 +2,9 @@ * * $RCSfile: docholder.cxx,v $ * - * $Revision: 1.14 $ + * $Revision: 1.15 $ * - * last change: $Author: kz $ $Date: 2005-03-01 19:52:56 $ + * last change: $Author: obo $ $Date: 2005-03-15 11:38:03 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -874,11 +874,31 @@ uno::Reference< frame::XFrame > DocumentHolder::GetDocFrame() if ( m_xComponent.is() ) { + uno::Reference< drafts::com::sun::star::frame::XLayoutManager > xOwnLM; + try { + uno::Reference< beans::XPropertySet > xPropSet( m_xFrame, uno::UNO_QUERY_THROW ); + xPropSet->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "LayoutManager" ))) >>= xOwnLM; + } catch( uno::Exception& ) + {} + + if ( xOwnLM.is() ) + xOwnLM->lock(); + // TODO/LATER: get it for the real aspect awt::Size aSize; GetExtent( embed::Aspects::MSOLE_CONTENT, &aSize ); LoadDocToFrame(sal_False); + + if ( xOwnLM.is() ) + { + xOwnLM->unlock(); + xOwnLM->lock(); + } + SetExtent( embed::Aspects::MSOLE_CONTENT, aSize ); + + if ( xOwnLM.is() ) + xOwnLM->unlock(); } return m_xFrame; |