summaryrefslogtreecommitdiff
path: root/sc/source/ui/view/drawvie4.cxx
diff options
context:
space:
mode:
authorKurt Zenker <kz@openoffice.org>2004-10-04 19:22:41 +0000
committerKurt Zenker <kz@openoffice.org>2004-10-04 19:22:41 +0000
commit42123d2927506117d908bb9c57879fb80e90d78b (patch)
treec245fad189a78284941fa54fd6c7b16d1c9407f2 /sc/source/ui/view/drawvie4.cxx
parentd4363707b77b8c43d3298990cd6d5656e278b242 (diff)
INTEGRATION: CWS mav09 (1.14.138); FILE MERGED
2004/08/30 17:10:01 mav 1.14.138.6: #i27773# chart update 2004/08/09 20:47:51 mav 1.14.138.5: RESYNC: (1.15-1.16); FILE MERGED 2004/07/09 02:59:04 mav 1.14.138.4: RESYNC: (1.14-1.15); FILE MERGED 2004/06/01 08:10:24 mba 1.14.138.3: #i27773#: new embedding API 2004/05/20 20:34:34 mba 1.14.138.2: #i27773#: some API changes 2004/05/04 14:01:56 mba 1.14.138.1: #i27773#: remove so3
Diffstat (limited to 'sc/source/ui/view/drawvie4.cxx')
-rw-r--r--sc/source/ui/view/drawvie4.cxx22
1 files changed, 12 insertions, 10 deletions
diff --git a/sc/source/ui/view/drawvie4.cxx b/sc/source/ui/view/drawvie4.cxx
index a92cb191a42b..edd4ca68c896 100644
--- a/sc/source/ui/view/drawvie4.cxx
+++ b/sc/source/ui/view/drawvie4.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: drawvie4.cxx,v $
*
- * $Revision: 1.16 $
+ * $Revision: 1.17 $
*
- * last change: $Author: rt $ $Date: 2004-07-12 15:30:32 $
+ * last change: $Author: kz $ $Date: 2004-10-04 20:22:41 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -77,6 +77,7 @@
#include <svx/svdundo.hxx>
#include <sfx2/docfile.hxx>
#include <tools/urlobj.hxx>
+#include <toolkit/helper/vclunohelper.hxx>
#include "drawview.hxx"
#include "global.hxx"
@@ -166,6 +167,7 @@ void lcl_RefreshChartData( SdrModel* pModel, ScDocument* pSourceDoc )
SchMemChart* pNewData = aArray.CreateMemChart();
SchDLL::Update( aIPObj, pNewData );
delete pNewData;
+ ((SdrOle2Obj*)pObject)->GetNewReplacement();
}
}
}
@@ -222,8 +224,7 @@ BOOL ScDrawView::BeginDrag( Window* pWindow, const Point& rStartPos )
ScDrawTransferObj* pTransferObj = new ScDrawTransferObj( pModel, pDocSh, aObjDesc );
uno::Reference<datatransfer::XTransferable> xTransferable( pTransferObj );
- SvEmbeddedObjectRef aPersistRef( aDragShellRef );
- pTransferObj->SetDrawPersist( aPersistRef ); // keep persist for ole objects alive
+ pTransferObj->SetDrawPersist( &aDragShellRef ); // keep persist for ole objects alive
pTransferObj->SetDragSource( this ); // copies selection
SC_MOD()->SetDragObject( NULL, pTransferObj ); // for internal D&D
@@ -262,8 +263,7 @@ void ScDrawView::DoCopy()
if ( ScGlobal::pDrawClipDocShellRef )
{
- SvEmbeddedObjectRef aPersistRef( *ScGlobal::pDrawClipDocShellRef );
- pTransferObj->SetDrawPersist( aPersistRef ); // keep persist for ole objects alive
+ pTransferObj->SetDrawPersist( &(*ScGlobal::pDrawClipDocShellRef) ); // keep persist for ole objects alive
}
pTransferObj->CopyToClipboard( pViewData->GetActiveWin() ); // system clipboard
@@ -309,12 +309,14 @@ void ScDrawView::SetMarkedOriginalSize()
Size aOriginalSize;
if (nIdent == OBJ_OLE2)
{
- SvInPlaceObjectRef xIPObj = ((SdrOle2Obj*)pObj)->GetObjRef();
- if (xIPObj.Is())
+ uno::Reference < embed::XEmbeddedObject > xObj( ((SdrOle2Obj*)pObj)->GetObjRef(), uno::UNO_QUERY );
+ if ( xObj.is() )
{
+ MapUnit aUnit = VCLUnoHelper::UnoEmbed2VCLMapUnit( xObj->getMapUnit( ((SdrOle2Obj*)pObj)->GetAspect() ) );
+ awt::Size aSz = xObj->getVisualAreaSize( ((SdrOle2Obj*)pObj)->GetAspect() );
aOriginalSize = OutputDevice::LogicToLogic(
- xIPObj->GetVisArea().GetSize(),
- xIPObj->GetMapUnit(), MAP_100TH_MM );
+ Size( aSz.Width, aSz.Height ),
+ aUnit, MAP_100TH_MM );
bDo = TRUE;
}
}