From 09f17cbad1a64ac59e25469a0b048eaa361e58c2 Mon Sep 17 00:00:00 2001 From: Vladimir Glazounov Date: Tue, 22 May 2007 18:36:19 +0000 Subject: [PATCH] INTEGRATION: CWS chart2mst3 (1.9.4); FILE MERGED 2006/11/29 16:10:24 mba 1.9.4.1: #i64497#: avoid setting visAreaSize explicitly for all objects when they are copied for clipboard --- embeddedobj/source/msole/xolefactory.cxx | 25 ++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/embeddedobj/source/msole/xolefactory.cxx b/embeddedobj/source/msole/xolefactory.cxx index 642331f442b1..f1bd894cb373 100644 --- a/embeddedobj/source/msole/xolefactory.cxx +++ b/embeddedobj/source/msole/xolefactory.cxx @@ -4,9 +4,9 @@ * * $RCSfile: xolefactory.cxx,v $ * - * $Revision: 1.9 $ + * $Revision: 1.10 $ * - * last change: $Author: obo $ $Date: 2006-10-12 11:24:14 $ + * last change: $Author: vg $ $Date: 2007-05-22 19:36:19 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -54,6 +54,10 @@ #include #endif +#ifndef _COM_SUN_STAR_EMBED_ASPECTS_HPP_ +#include +#endif + #include @@ -140,6 +144,23 @@ uno::Reference< uno::XInterface > SAL_CALL OleEmbeddedObjectFactory::createInsta aMedDescr, lObjArgs ); + for ( sal_Int32 nInd = 0; nInd < lObjArgs.getLength(); nInd++ ) + { + if ( lObjArgs[nInd].Name.equalsAscii( "CloneFrom" ) ) + { + try + { + uno::Reference < embed::XEmbeddedObject > xObj; + uno::Reference < embed::XEmbeddedObject > xNew( xResult, uno::UNO_QUERY ); + lObjArgs[nInd].Value >>= xObj; + if ( xObj.is() ) + xNew->setVisualAreaSize( embed::Aspects::MSOLE_CONTENT, xObj->getVisualAreaSize( embed::Aspects::MSOLE_CONTENT ) ); + } + catch ( uno::Exception& ) {}; + break; + } + } + return xResult; }