diff options
author | RĂ¼diger Timm <rt@openoffice.org> | 2005-04-04 07:22:36 +0000 |
---|---|---|
committer | RĂ¼diger Timm <rt@openoffice.org> | 2005-04-04 07:22:36 +0000 |
commit | 7f04805d550cde345be40e3b33e137d58f190ab0 (patch) | |
tree | 41183504b4b9b8957658531bba63b552edb4d875 /sw/source/core/unocore | |
parent | 3c0d98aaed139b19f5980204d2d12b0306fdbe84 (diff) |
INTEGRATION: CWS tl07 (1.95.24); FILE MERGED
2005/03/15 09:54:35 tl 1.95.24.3: RESYNC: (1.96-1.97); FILE MERGED
2005/02/14 12:42:47 tl 1.95.24.2: RESYNC: (1.95-1.96); FILE MERGED
2005/01/24 13:00:33 mba 1.95.24.1: #i38930#: set parent of embedded object before inserting and after removal
Diffstat (limited to 'sw/source/core/unocore')
-rw-r--r-- | sw/source/core/unocore/unoframe.cxx | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/sw/source/core/unocore/unoframe.cxx b/sw/source/core/unocore/unoframe.cxx index c89297ee61db..95c76df979a0 100644 --- a/sw/source/core/unocore/unoframe.cxx +++ b/sw/source/core/unocore/unoframe.cxx @@ -2,9 +2,9 @@ * * $RCSfile: unoframe.cxx,v $ * - * $Revision: 1.98 $ + * $Revision: 1.99 $ * - * last change: $Author: obo $ $Date: 2005-03-15 11:25:26 $ + * last change: $Author: rt $ $Date: 2005-04-04 08:22:36 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -64,6 +64,9 @@ #ifndef _COM_SUN_STAR_EMBED_NOVISUALAREASIZEEXCEPTION_HPP_ #include <com/sun/star/embed/NoVisualAreaSizeException.hpp> #endif +#ifndef _COM_SUN_STAR_CONTAINER_XCHILD_HPP_ +#include <com/sun/star/container/XChild.hpp> +#endif #ifndef _COM_SUN_STAR_EMBED_XCLASSIFIEDOBJECT_HPP_ #include <com/sun/star/embed/XClassifiedObject.hpp> #endif @@ -2263,7 +2266,14 @@ void SwXFrame::attachToRange(const uno::Reference< XTextRange > & xTextRange) //TODO/LATER: from where do I get a ViewAspect? And how do I transport it to the OLENode? sal_Int64 nAspect = embed::Aspects::MSOLE_CONTENT; - // TODO/LEAN: VisualArea may switch object to running state + // TODO/LEAN: VisualArea still needs running state + svt::EmbeddedObjectRef::TryRunningState( xIPObj ); + + // set parent to get correct VisArea(in case of object needing parent printer) + uno::Reference < container::XChild > xChild( xIPObj, uno::UNO_QUERY ); + if ( xChild.is() ) + xChild->setParent( pDoc->GetDocShell()->GetModel() ); + //The Size should be suggested by the OLE server if not manually set MapUnit aRefMap = VCLUnoHelper::UnoEmbed2VCLMapUnit( xIPObj->getMapUnit( nAspect ) ); awt::Size aSize; |