From 75db9801c164b475733d60a0ddb43eb82055288f Mon Sep 17 00:00:00 2001 From: Kai Ahrens Date: Thu, 6 Sep 2001 08:22:12 +0000 Subject: #86482#: convert page object to graphic object (::GetAllMarkedModel) --- svx/source/svdraw/svdopage.cxx | 7 ++----- svx/source/svdraw/svdxcgv.cxx | 34 +++++++++++++++++++++++++--------- 2 files changed, 27 insertions(+), 14 deletions(-) (limited to 'svx') diff --git a/svx/source/svdraw/svdopage.cxx b/svx/source/svdraw/svdopage.cxx index 4c48de12c145..5d34dbcda0cf 100644 --- a/svx/source/svdraw/svdopage.cxx +++ b/svx/source/svdraw/svdopage.cxx @@ -2,9 +2,9 @@ * * $RCSfile: svdopage.cxx,v $ * - * $Revision: 1.6 $ + * $Revision: 1.7 $ * - * last change: $Author: aw $ $Date: 2001-05-02 12:10:24 $ + * last change: $Author: ka $ $Date: 2001-09-06 09:22:12 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -248,9 +248,6 @@ void SdrPageObj::TakeObjInfo(SdrObjTransformInfoRec& rInfo) const rInfo.bCanConvToPolyLineToArea=FALSE; } -#define NORELMAPMODE - - FASTBOOL SdrPageObj::Paint(ExtOutputDevice& rXOut, const SdrPaintInfoRec& rInfoRec) const { // Hidden objects on masterpages, draw nothing diff --git a/svx/source/svdraw/svdxcgv.cxx b/svx/source/svdraw/svdxcgv.cxx index 3c6599520896..4223dd26311d 100644 --- a/svx/source/svdraw/svdxcgv.cxx +++ b/svx/source/svdraw/svdxcgv.cxx @@ -2,9 +2,9 @@ * * $RCSfile: svdxcgv.cxx,v $ * - * $Revision: 1.9 $ + * $Revision: 1.10 $ * - * last change: $Author: ka $ $Date: 2001-09-04 12:30:22 $ + * last change: $Author: ka $ $Date: 2001-09-06 09:22:12 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -72,6 +72,7 @@ #include "svdoole2.hxx" // fuer kein OLE im SdrClipboardFormat #include "svdorect.hxx" #include "svdoedge.hxx" // fuer Konnektoren uebers Clipboard +#include "svdopage.hxx" // fuer Konnektoren uebers Clipboard #include "svdpage.hxx" #include "svdpagv.hxx" #include "svdtrans.hxx" // Fuer GetMapFactor zum umskalieren bei PasteModel @@ -722,18 +723,33 @@ SdrModel* SdrExchangeView::GetMarkedObjModel() const ULONG nCloneErrCnt=0; ULONG nMarkAnz=aMark.GetMarkCount(); ULONG nm; - for (nm=0; nmGetObj(); - SdrObject* pNeuObj=pObj->Clone(pNeuPag,pNeuMod); - if (pNeuObj!=NULL) { + + for (nm=0; nmGetObj(); + SdrObject* pNeuObj; + + if( pObj->ISA( SdrPageObj ) ) + { + // convert SdrPageObj's to a graphic representation, because + // virtual connection to referenced page gets lost in new model + pNeuObj = new SdrGrafObj( GetObjGraphic( pMod, const_cast< SdrObject* >( pObj ) ), pObj->GetLogicRect() ); + pNeuObj->SetPage( pNeuPag ); + pNeuObj->SetModel( pNeuMod ); + } + else + pNeuObj = pObj->Clone( pNeuPag, pNeuMod ); + + if( pNeuObj ) + { Point aP(pM->GetPageView()->GetOffset()); if (aP.X()!=0 || aP.Y()!=0) pNeuObj->NbcMove(Size(aP.X(),aP.Y())); SdrInsertReason aReason(SDRREASON_VIEWCALL); pNeuPag->InsertObject(pNeuObj,CONTAINER_APPEND,&aReason); - } else { - nCloneErrCnt++; } + else + nCloneErrCnt++; } // und nun zu den Konnektoren // Die Objekte in pNeuPag werden auf die MarkList abgebildet -- cgit