summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorKai Ahrens <ka@openoffice.org>2001-09-06 08:22:12 +0000
committerKai Ahrens <ka@openoffice.org>2001-09-06 08:22:12 +0000
commit75db9801c164b475733d60a0ddb43eb82055288f (patch)
tree0b4b1a6e9ce0737064e2350b3f80744e2e6deaf6 /svx
parent333e6c1ec02a39846ec0a2df74b524203f5f7947 (diff)
#86482#: convert page object to graphic object (::GetAllMarkedModel)
Diffstat (limited to 'svx')
-rw-r--r--svx/source/svdraw/svdopage.cxx7
-rw-r--r--svx/source/svdraw/svdxcgv.cxx34
2 files changed, 27 insertions, 14 deletions
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; nm<nMarkAnz; nm++) {
- const SdrMark* pM=aMark.GetMark(nm);
- const SdrObject* pObj=pM->GetObj();
- SdrObject* pNeuObj=pObj->Clone(pNeuPag,pNeuMod);
- if (pNeuObj!=NULL) {
+
+ for (nm=0; nm<nMarkAnz; nm++)
+ {
+ const SdrMark* pM = aMark.GetMark( nm );
+ const SdrObject* pObj = pM->GetObj();
+ 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