summaryrefslogtreecommitdiff
path: root/svx/source/svdraw
diff options
context:
space:
mode:
authorOliver Bolte <obo@openoffice.org>2008-10-17 08:40:10 +0000
committerOliver Bolte <obo@openoffice.org>2008-10-17 08:40:10 +0000
commita8ac4bc4145e7e558153b58c87b2def339aebe36 (patch)
treed1f5da0a1b702f12725b2b82117b7ff49872bb21 /svx/source/svdraw
parentae562e931a98e708a75e8d140cf1ff24854acfc7 (diff)
CWS-TOOLING: integrate CWS aw057
Diffstat (limited to 'svx/source/svdraw')
-rw-r--r--svx/source/svdraw/gradtrns.cxx7
-rw-r--r--svx/source/svdraw/svdcrtv.cxx77
-rw-r--r--svx/source/svdraw/svddrgv.cxx257
-rw-r--r--svx/source/svdraw/svdedtv.cxx72
-rw-r--r--svx/source/svdraw/svdedtv1.cxx105
-rw-r--r--svx/source/svdraw/svdetc.cxx9
-rw-r--r--svx/source/svdraw/svdhdl.cxx167
-rw-r--r--svx/source/svdraw/svdmrkv.cxx8
-rw-r--r--svx/source/svdraw/svdoashp.cxx15
-rw-r--r--svx/source/svdraw/svdoattr.cxx5
-rw-r--r--svx/source/svdraw/svdobj.cxx120
-rw-r--r--svx/source/svdraw/svdocapt.cxx6
-rw-r--r--svx/source/svdraw/svdocirc.cxx4
-rw-r--r--svx/source/svdraw/svdoedge.cxx4
-rw-r--r--svx/source/svdraw/svdograf.cxx14
-rw-r--r--svx/source/svdraw/svdogrp.cxx10
-rw-r--r--svx/source/svdraw/svdomeas.cxx6
-rw-r--r--svx/source/svdraw/svdopath.cxx4
-rw-r--r--svx/source/svdraw/svdorect.cxx4
-rw-r--r--svx/source/svdraw/svdotext.cxx6
-rw-r--r--svx/source/svdraw/svdotextdecomposition.cxx16
-rw-r--r--svx/source/svdraw/svdovirt.cxx6
-rw-r--r--svx/source/svdraw/svdundo.cxx44
-rw-r--r--svx/source/svdraw/svdview.cxx4
-rw-r--r--svx/source/svdraw/svdxcgv.cxx5
25 files changed, 620 insertions, 355 deletions
diff --git a/svx/source/svdraw/gradtrns.cxx b/svx/source/svdraw/gradtrns.cxx
index b9df6db5b473..0e62aa9ed75f 100644
--- a/svx/source/svdraw/gradtrns.cxx
+++ b/svx/source/svdraw/gradtrns.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: gradtrns.cxx,v $
- * $Revision: 1.7 $
+ * $Revision: 1.7.226.1 $
*
* This file is part of OpenOffice.org.
*
@@ -33,7 +33,6 @@
#include "gradtrns.hxx"
#include <svx/svdobj.hxx>
-#include <goodies/b3dcolor.hxx>
#include <basegfx/range/b2drange.hxx>
#include <basegfx/matrix/b2dhommatrix.hxx>
#include <vcl/salbtype.hxx> // FRound
@@ -47,7 +46,7 @@ void GradTransformer::GradToVec(GradTransGradient& rG, GradTransVector& rV, cons
if(100 != rG.aGradient.GetStartIntens())
{
const double fFact((double)rG.aGradient.GetStartIntens() / 100.0);
- rV.aCol1 = (B3dColor)rV.aCol1 * fFact;
+ rV.aCol1 = Color(rV.aCol1.getBColor() * fFact);
}
// handle end color
@@ -55,7 +54,7 @@ void GradTransformer::GradToVec(GradTransGradient& rG, GradTransVector& rV, cons
if(100 != rG.aGradient.GetEndIntens())
{
const double fFact((double)rG.aGradient.GetEndIntens() / 100.0);
- rV.aCol2 = (B3dColor)rV.aCol2 * fFact;
+ rV.aCol2 = Color(rV.aCol2.getBColor() * fFact);
}
// calc the basic positions
diff --git a/svx/source/svdraw/svdcrtv.cxx b/svx/source/svdraw/svdcrtv.cxx
index 1c835c93fc07..ebd596ac972d 100644
--- a/svx/source/svdraw/svdcrtv.cxx
+++ b/svx/source/svdraw/svdcrtv.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: svdcrtv.cxx,v $
- * $Revision: 1.29 $
+ * $Revision: 1.29.18.1 $
*
* This file is part of OpenOffice.org.
*
@@ -84,7 +84,7 @@ public:
ImplConnectMarkerOverlay::ImplConnectMarkerOverlay(const SdrCreateView& rView, SdrObject& rObject)
: mrObject(rObject)
{
- basegfx::B2DPolyPolygon aB2DPolyPolygon(rObject.TakeXorPoly(true));
+ basegfx::B2DPolyPolygon aB2DPolyPolygon(rObject.TakeXorPoly());
for(sal_uInt32 a(0L); a < rView.PaintWindowCount(); a++)
{
@@ -291,12 +291,16 @@ void SdrCreateView::BrkAction()
void SdrCreateView::TakeActionRect(Rectangle& rRect) const
{
- if (pAktCreate!=NULL) {
+ if (pAktCreate!=NULL)
+ {
rRect=aDragStat.GetActionRect();
- if (rRect.IsEmpty()) {
+ if (rRect.IsEmpty())
+ {
rRect=Rectangle(aDragStat.GetPrev(),aDragStat.GetNow());
}
- } else {
+ }
+ else
+ {
SdrDragView::TakeActionRect(rRect);
}
}
@@ -305,7 +309,8 @@ BOOL SdrCreateView::CheckEdgeMode()
{
UINT32 nInv=nAktInvent;
UINT16 nIdn=nAktIdent;
- if (pAktCreate!=NULL) {
+ if (pAktCreate!=NULL)
+ {
nInv=pAktCreate->GetObjInventor();
nIdn=pAktCreate->GetObjIdentifier();
// wird vom EdgeObj gemanaged
@@ -388,7 +393,8 @@ BOOL SdrCreateView::IsMeasureTool() const
void SdrCreateView::SetCurrentObj(UINT16 nIdent, UINT32 nInvent)
{
- if (nAktInvent!=nInvent || nAktIdent!=nIdent) {
+ if (nAktInvent!=nInvent || nAktIdent!=nIdent)
+ {
nAktInvent=nInvent;
nAktIdent=nIdent;
SdrObject* pObj = SdrObjFactory::MakeNewObject(nInvent,nIdent,NULL,NULL);
@@ -473,7 +479,8 @@ BOOL SdrCreateView::ImpBegCreateObj(UINT32 nInvent, UINT16 nIdent, const Point&
nAktIdent!=USHORT(OBJ_FREEFILL) )) { // Kein Fang fuer Edge und Freihand!
aPnt=GetSnapPos(aPnt,pCreatePV);
}
- if (pAktCreate!=NULL) {
+ if (pAktCreate!=NULL)
+ {
BOOL bStartEdit=FALSE; // nach Ende von Create automatisch TextEdit starten
if (pDefaultStyleSheet!=NULL) pAktCreate->NbcSetStyleSheet(pDefaultStyleSheet, sal_False);
@@ -543,10 +550,13 @@ BOOL SdrCreateView::ImpBegCreateObj(UINT32 nInvent, UINT16 nIdent, const Point&
aDragStat.SetPageView(pCreatePV);
aDragStat.SetMinMove(ImpGetMinMovLogic(nMinMov,pOut));
pDragWin=pOut;
- if (pAktCreate->BegCreate(aDragStat)) {
+ if (pAktCreate->BegCreate(aDragStat))
+ {
ShowCreateObj(/*pOut,TRUE*/);
bRet=TRUE;
- } else {
+ }
+ else
+ {
SdrObject::Free( pAktCreate );
pAktCreate=NULL;
pCreatePV=NULL;
@@ -587,10 +597,12 @@ void SdrCreateView::MovCreateObj(const Point& rPnt)
{
if (pAktCreate!=NULL) {
Point aPnt(rPnt);
- if (!aDragStat.IsNoSnap()) {
+ if (!aDragStat.IsNoSnap())
+ {
aPnt=GetSnapPos(aPnt,pCreatePV);
}
- if (IsOrtho()) {
+ if (IsOrtho())
+ {
if (aDragStat.IsOrtho8Possible()) OrthoDistance8(aDragStat.GetPrev(),aPnt,IsBigOrtho());
else if (aDragStat.IsOrtho4Possible()) OrthoDistance4(aDragStat.GetPrev(),aPnt,IsBigOrtho());
}
@@ -608,7 +620,8 @@ void SdrCreateView::MovCreateObj(const Point& rPnt)
if (aPnt==aDragStat.GetNow()) return;
bool bMerk(aDragStat.IsMinMoved());
- if (aDragStat.CheckMinMoved(aPnt)) {
+ if (aDragStat.CheckMinMoved(aPnt))
+ {
Rectangle aBound;
if (!bMerk) aDragStat.NextPoint();
aDragStat.NextMove(aPnt);
@@ -718,7 +731,9 @@ BOOL SdrCreateView::EndCreateObj(SdrCreateCmd eCmd)
nAnz==0 || // keine Punkte da (kann eigentlich nicht vorkommen)
(nAnz<=1 && !aDragStat.IsMinMoved())) { // MinMove nicht erfuellt
BrkCreateObj();
- } else {
+ }
+ else
+ {
// replace for DrawCreateObjDiff
HideCreateObj();
ShowCreateObj();
@@ -726,7 +741,8 @@ BOOL SdrCreateView::EndCreateObj(SdrCreateCmd eCmd)
bRet=TRUE;
}
}
- if (bRet && pObjMerk!=NULL && IsTextEditAfterCreate()) {
+ if (bRet && pObjMerk!=NULL && IsTextEditAfterCreate())
+ {
SdrTextObj* pText=PTR_CAST(SdrTextObj,pObjMerk);
if (pText!=NULL && pText->IsTextFrame())
{
@@ -739,15 +755,22 @@ BOOL SdrCreateView::EndCreateObj(SdrCreateCmd eCmd)
void SdrCreateView::BckCreateObj()
{
- if (pAktCreate!=NULL) {
- if (aDragStat.GetPointAnz()<=2 ) {
+ if (pAktCreate!=NULL)
+ {
+ if (aDragStat.GetPointAnz()<=2 )
+ {
BrkCreateObj();
- } else {
+ }
+ else
+ {
HideCreateObj();
aDragStat.PrevPoint();
- if (pAktCreate->BckCreate(aDragStat)) {
+ if (pAktCreate->BckCreate(aDragStat))
+ {
ShowCreateObj();
- } else {
+ }
+ else
+ {
BrkCreateObj();
}
}
@@ -897,20 +920,26 @@ BOOL SdrCreateView::SetAttributes(const SfxItemSet& rSet, BOOL bReplaceAll)
SfxStyleSheet* SdrCreateView::GetStyleSheet() const // SfxStyleSheet* SdrCreateView::GetStyleSheet(BOOL& rOk) const
{
- if (pAktCreate!=NULL) {
+ if (pAktCreate!=NULL)
+ {
//rOk=TRUE;
return pAktCreate->GetStyleSheet();
- } else {
+ }
+ else
+ {
return SdrDragView::GetStyleSheet(); // SdrDragView::GetStyleSheet(rOk);
}
}
BOOL SdrCreateView::SetStyleSheet(SfxStyleSheet* pStyleSheet, BOOL bDontRemoveHardAttr)
{
- if (pAktCreate!=NULL) {
+ if (pAktCreate!=NULL)
+ {
pAktCreate->SetStyleSheet(pStyleSheet,bDontRemoveHardAttr);
return TRUE;
- } else {
+ }
+ else
+ {
return SdrDragView::SetStyleSheet(pStyleSheet,bDontRemoveHardAttr);
}
}
diff --git a/svx/source/svdraw/svddrgv.cxx b/svx/source/svdraw/svddrgv.cxx
index 3b663a8c945c..4d99598bed78 100644
--- a/svx/source/svdraw/svddrgv.cxx
+++ b/svx/source/svdraw/svddrgv.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: svddrgv.cxx,v $
- * $Revision: 1.27 $
+ * $Revision: 1.27.18.1 $
*
* This file is part of OpenOffice.org.
*
@@ -185,7 +185,8 @@ BOOL SdrDragView::IsAction() const
void SdrDragView::MovAction(const Point& rPnt)
{
SdrExchangeView::MovAction(rPnt);
- if (pDragBla!=NULL) {
+ if (pDragBla!=NULL)
+ {
MovDragObj(rPnt);
}
}
@@ -213,9 +214,11 @@ void SdrDragView::BrkAction()
void SdrDragView::TakeActionRect(Rectangle& rRect) const
{
- if (pDragBla!=NULL) {
+ if (pDragBla!=NULL)
+ {
rRect=aDragStat.GetActionRect();
- if (rRect.IsEmpty()) {
+ if (rRect.IsEmpty())
+ {
BOOL b1st=TRUE;
SdrPageView* pPV = GetSdrPageView();
@@ -224,21 +227,27 @@ void SdrDragView::TakeActionRect(Rectangle& rRect) const
if (pPV->HasMarkedObjPageView())
{
const basegfx::B2DRange aBoundRange(basegfx::tools::getRange(pPV->getDragPoly()));
- const Rectangle aR(FRound(aBoundRange.getMinX()), FRound(aBoundRange.getMinY()), FRound(aBoundRange.getMaxX()), FRound(aBoundRange.getMaxY()));
+ const Rectangle aR(basegfx::fround(aBoundRange.getMinX()), basegfx::fround(aBoundRange.getMinY()), basegfx::fround(aBoundRange.getMaxX()), basegfx::fround(aBoundRange.getMaxY()));
- if (b1st) {
+ if (b1st)
+ {
b1st=FALSE;
rRect=aR;
- } else {
+ }
+ else
+ {
rRect.Union(aR);
}
}
}
}
- if (rRect.IsEmpty()) {
+ if (rRect.IsEmpty())
+ {
rRect=Rectangle(aDragStat.GetNow(),aDragStat.GetNow());
}
- } else {
+ }
+ else
+ {
SdrExchangeView::TakeActionRect(rRect);
}
}
@@ -262,12 +271,16 @@ void SdrDragView::SetDragPolys(bool bReset)
if(pPV)
{
pPV->setDragPoly0(basegfx::B2DPolyPolygon());
- if (pPV->HasMarkedObjPageView()) {
- for (ULONG nm=0; nm<nMarkAnz; nm++) {
+ if (pPV->HasMarkedObjPageView())
+ {
+ for (ULONG nm=0; nm<nMarkAnz; nm++)
+ {
SdrMark* pM=GetSdrMarkByIndex(nm);
- if (pM->GetPageView()==pPV) {
+ if (pM->GetPageView()==pPV)
+ {
const SdrUShortCont* pPts=bGlue ? pM->GetMarkedGluePoints() : pM->GetMarkedPoints();
- if (pPts!=NULL && pPts->GetCount()!=0) {
+ if (pPts!=NULL && pPts->GetCount()!=0)
+ {
const SdrObject* pObj=pM->GetMarkedSdrObj();
const SdrPathObj* pPath=bGlue ? NULL : PTR_CAST(SdrPathObj,pObj);
const basegfx::B2DPolyPolygon aPathXPP = (pPath) ? pPath->GetPathPoly() : basegfx::B2DPolyPolygon();
@@ -343,7 +356,7 @@ void SdrDragView::SetDragPolys(bool bReset)
if(pM->GetPageView()==pPV)
{
- aDazuPP = pM->GetMarkedSdrObj()->TakeXorPoly(sal_False);
+ aDazuPP = pM->GetMarkedSdrObj()->TakeXorPoly();
const sal_uInt32 nDazuPolyAnz(aDazuPP.count());
nPolyCnt += nDazuPolyAnz;
@@ -400,14 +413,19 @@ BOOL SdrDragView::TakeDragObjAnchorPos(Point& rPos, BOOL bTR ) const
!pDragBla->ISA(SdrDragMovHdl)) // nicht beim Handlesschieben
{
SdrObject* pObj=GetMarkedObjectByIndex(0);
- if (pObj->ISA(SdrCaptionObj)) {
+ if (pObj->ISA(SdrCaptionObj))
+ {
Point aPt(((SdrCaptionObj*)pObj)->GetTailPos());
BOOL bTail=eDragHdl==HDL_POLY; // Schwanz wird gedraggt (nicht so ganz feine Abfrage hier)
BOOL bOwn=pDragBla->ISA(SdrDragObjOwn); // Objektspeziefisch
- if (!bTail) { // bei bTail liefert TakeActionRect schon das richtige
- if (bOwn) { // bOwn kann sein MoveTextFrame, ResizeTextFrame aber eben nicht mehr DragTail
+ if (!bTail)
+ { // bei bTail liefert TakeActionRect schon das richtige
+ if (bOwn)
+ { // bOwn kann sein MoveTextFrame, ResizeTextFrame aber eben nicht mehr DragTail
rPos=aPt;
- } else {
+ }
+ else
+ {
// hier nun dragging des gesamten Objekts (Move, Resize, ...)
pDragBla->MovPoint(aPt); // ,Point()); //GetSdrPageViewOfMarkedByIndex(0)->GetOffset());
}
@@ -482,11 +500,15 @@ BOOL SdrDragView::BegDragObj(const Point& rPnt, OutputDevice* pOut, SdrHdl* pHdl
}
else if(!bNotDraggable)
{
- switch (eDragMode) {
- case SDRDRAG_ROTATE: case SDRDRAG_SHEAR: case SDRDRAG_DISTORT: {
- switch (eDragHdl) {
+ switch (eDragMode)
+ {
+ case SDRDRAG_ROTATE: case SDRDRAG_SHEAR: case SDRDRAG_DISTORT:
+ {
+ switch (eDragHdl)
+ {
case HDL_LEFT: case HDL_RIGHT:
- case HDL_UPPER: case HDL_LOWER: {
+ case HDL_UPPER: case HDL_LOWER:
+ {
// Sind 3D-Objekte selektiert?
BOOL b3DObjSelected = FALSE;
for(UINT32 a=0;!b3DObjSelected && a<GetMarkedObjectCount();a++)
@@ -503,31 +525,43 @@ BOOL SdrDragView::BegDragObj(const Point& rPnt, OutputDevice* pOut, SdrHdl* pHdl
pDragBla=new SdrDragShear(*this,eDragMode==SDRDRAG_ROTATE);
} break;
case HDL_UPLFT: case HDL_UPRGT:
- case HDL_LWLFT: case HDL_LWRGT: {
- if (eDragMode==SDRDRAG_SHEAR || eDragMode==SDRDRAG_DISTORT) {
+ case HDL_LWLFT: case HDL_LWRGT:
+ {
+ if (eDragMode==SDRDRAG_SHEAR || eDragMode==SDRDRAG_DISTORT)
+ {
if (!IsDistortAllowed(TRUE) && !IsDistortAllowed(FALSE)) return FALSE;
pDragBla=new SdrDragDistort(*this);
- } else {
+ }
+ else
+ {
if (!IsRotateAllowed(TRUE)) return FALSE;
pDragBla=new SdrDragRotate(*this);
}
} break;
- default: {
- if (IsMarkedHitMovesAlways() && eDragHdl==HDL_MOVE) { // HDL_MOVE ist auch wenn Obj direkt getroffen
+ default:
+ {
+ if (IsMarkedHitMovesAlways() && eDragHdl==HDL_MOVE)
+ { // HDL_MOVE ist auch wenn Obj direkt getroffen
if (!IsMoveAllowed()) return FALSE;
pDragBla=new SdrDragMove(*this);
- } else {
+ }
+ else
+ {
if (!IsRotateAllowed(TRUE)) return FALSE;
pDragBla=new SdrDragRotate(*this);
}
}
}
} break;
- case SDRDRAG_MIRROR: {
- if (eDragHdl==HDL_MOVE && IsMarkedHitMovesAlways()) {
+ case SDRDRAG_MIRROR:
+ {
+ if (eDragHdl==HDL_MOVE && IsMarkedHitMovesAlways())
+ {
if (!IsMoveAllowed()) return FALSE;
pDragBla=new SdrDragMove(*this);
- } else {
+ }
+ else
+ {
if (!IsMirrorAllowed(TRUE,TRUE)) return FALSE;
pDragBla=new SdrDragMirror(*this);
}
@@ -585,11 +619,15 @@ BOOL SdrDragView::BegDragObj(const Point& rPnt, OutputDevice* pOut, SdrHdl* pHdl
break;
}
- case SDRDRAG_CROOK : {
- if (eDragHdl==HDL_MOVE && IsMarkedHitMovesAlways()) {
+ case SDRDRAG_CROOK :
+ {
+ if (eDragHdl==HDL_MOVE && IsMarkedHitMovesAlways())
+ {
if (!IsMoveAllowed()) return FALSE;
pDragBla=new SdrDragMove(*this);
- } else {
+ }
+ else
+ {
if (!IsCrookAllowed(TRUE) && !IsCrookAllowed(FALSE)) return FALSE;
pDragBla=new SdrDragCrook(*this);
}
@@ -628,15 +666,19 @@ BOOL SdrDragView::BegDragObj(const Point& rPnt, OutputDevice* pOut, SdrHdl* pHdl
}
}
}
- if (pForcedMeth!=NULL) {
+ if (pForcedMeth!=NULL)
+ {
delete pDragBla;
pDragBla=pForcedMeth;
}
aDragStat.SetDragMethod(pDragBla);
- if (pDragBla!=NULL) {
+ if (pDragBla!=NULL)
+ {
bRet=pDragBla->Beg();
- if (!bRet) {
- if (pHdl==NULL && IS_TYPE(SdrDragObjOwn,pDragBla)) {
+ if (!bRet)
+ {
+ if (pHdl==NULL && IS_TYPE(SdrDragObjOwn,pDragBla))
+ {
// Aha, Obj kann nicht Move SpecialDrag, also MoveFrameDrag versuchen
delete pDragBla;
pDragBla=NULL;
@@ -648,7 +690,8 @@ BOOL SdrDragView::BegDragObj(const Point& rPnt, OutputDevice* pOut, SdrHdl* pHdl
bRet=pDragBla->Beg();
}
}
- if (!bRet) {
+ if (!bRet)
+ {
delete pDragBla;
pDragBla=NULL;
aDragStat.SetDragMethod(pDragBla);
@@ -684,10 +727,12 @@ BOOL SdrDragView::EndDragObj(BOOL bCopy)
if(pDragBla && aDragStat.IsMinMoved() && (IsInsertGluePoint() || aDragStat.GetNow() != aDragStat.GetPrev()))
{
ULONG nHdlAnzMerk=0;
- if (bEliminatePolyPoints) { // IBM Special
+ if (bEliminatePolyPoints)
+ { // IBM Special
nHdlAnzMerk=GetMarkablePointCount();
}
- if (IsInsertGluePoint()) {
+ if (IsInsertGluePoint())
+ {
BegUndo(aInsPointUndoStr);
AddUndo(pInsPointUndo);
}
@@ -695,12 +740,15 @@ BOOL SdrDragView::EndDragObj(BOOL bCopy)
if (IsInsertGluePoint()) EndUndo();
delete pDragBla;
pDragBla=NULL;
- if (bEliminatePolyPoints) { // IBM Special
- if (nHdlAnzMerk!=GetMarkablePointCount()) {
+ if (bEliminatePolyPoints)
+ { // IBM Special
+ if (nHdlAnzMerk!=GetMarkablePointCount())
+ {
UnmarkAllPoints();
}
}
- if (bInsPolyPoint) {
+ if (bInsPolyPoint)
+ {
//HMHBOOL bVis=IsMarkHdlShown();
//HMHif (bVis) HideMarkHdl();
SetMarkHandles();
@@ -724,7 +772,9 @@ BOOL SdrDragView::EndDragObj(BOOL bCopy)
}
}
SetDragPolys(true);
- } else {
+ }
+ else
+ {
BrkDragObj();
}
bInsPolyPoint=FALSE;
@@ -735,11 +785,13 @@ BOOL SdrDragView::EndDragObj(BOOL bCopy)
void SdrDragView::BrkDragObj()
{
- if (pDragBla!=NULL) {
+ if (pDragBla!=NULL)
+ {
pDragBla->Brk();
delete pDragBla;
pDragBla=NULL;
- if (bInsPolyPoint) {
+ if (bInsPolyPoint)
+ {
//HMHBOOL bVis=IsMarkHdlShown();
//HMHif (bVis) HideMarkHdl();
pInsPointUndo->Undo(); // Den eingefuegten Punkt wieder raus
@@ -749,7 +801,8 @@ void SdrDragView::BrkDragObj()
bInsPolyPoint=FALSE;
//HMHif (bVis) ShowMarkHdl();
}
- if (IsInsertGluePoint()) {
+ if (IsInsertGluePoint())
+ {
pInsPointUndo->Undo(); // Den eingefuegten Klebepunkt wieder raus
delete pInsPointUndo;
pInsPointUndo=NULL;
@@ -857,7 +910,8 @@ BOOL SdrDragView::EndInsObjPoint(SdrCreateCmd eCmd)
sal_uInt32 nNextPnt(mnInsPointNum);
Point aPnt(aDragStat.GetNow());
BOOL bOk=EndDragObj(FALSE);
- if (bOk==TRUE && eCmd!=SDRCREATE_FORCEEND) {
+ if (bOk==TRUE && eCmd!=SDRCREATE_FORCEEND)
+ {
// Ret=True bedeutet: Action ist vorbei.
bOk=!(ImpBegInsObjPoint(sal_True, nNextPnt, aPnt, eCmd == SDRCREATE_NEXTOBJECT, pDragWin));
}
@@ -869,14 +923,19 @@ BOOL SdrDragView::EndInsObjPoint(SdrCreateCmd eCmd)
BOOL SdrDragView::IsInsGluePointPossible() const
{
BOOL bRet=FALSE;
- if (IsInsGluePointMode() && AreObjectsMarked()) {
- if (GetMarkedObjectCount()==1) {
+ if (IsInsGluePointMode() && AreObjectsMarked())
+ {
+ if (GetMarkedObjectCount()==1)
+ {
// FALSE liefern, wenn 1 Objekt und dieses ein Verbinder ist.
const SdrObject* pObj=GetMarkedObjectByIndex(0);
- if (!HAS_BASE(SdrEdgeObj,pObj)) {
+ if (!HAS_BASE(SdrEdgeObj,pObj))
+ {
bRet=TRUE;
}
- } else {
+ }
+ else
+ {
bRet=TRUE;
}
}
@@ -889,7 +948,8 @@ BOOL SdrDragView::BegInsGluePoint(const Point& rPnt)
SdrObject* pObj;
SdrPageView* pPV;
ULONG nMarkNum;
- if (PickMarkedObj(rPnt,pObj,pPV,&nMarkNum,SDRSEARCH_PASS2BOUND)) {
+ if (PickMarkedObj(rPnt,pObj,pPV,&nMarkNum,SDRSEARCH_PASS2BOUND))
+ {
BrkAction();
UnmarkAllGluePoints();
//SdrMark* pM=GetSdrMarkByIndex(nMarkNum);
@@ -902,31 +962,41 @@ BOOL SdrDragView::BegInsGluePoint(const Point& rPnt)
aInsPointUndoStr=aStr;
SdrGluePointList* pGPL=pObj->ForceGluePointList();
- if (pGPL!=NULL) {
+ if (pGPL!=NULL)
+ {
USHORT nGlueIdx=pGPL->Insert(SdrGluePoint());
SdrGluePoint& rGP=(*pGPL)[nGlueIdx];
USHORT nGlueId=rGP.GetId();
rGP.SetAbsolutePos(rPnt,*pObj);
SdrHdl* pHdl=NULL;
- if (MarkGluePoint(pObj,nGlueId,pPV)) {
+ if (MarkGluePoint(pObj,nGlueId,pPV))
+ {
pHdl=GetGluePointHdl(pObj,nGlueId);
}
- if (pHdl!=NULL && pHdl->GetKind()==HDL_GLUE && pHdl->GetObj()==pObj && pHdl->GetObjHdlNum()==nGlueId) {
+ if (pHdl!=NULL && pHdl->GetKind()==HDL_GLUE && pHdl->GetObj()==pObj && pHdl->GetObjHdlNum()==nGlueId)
+ {
SetInsertGluePoint(TRUE);
bRet=BegDragObj(rPnt,NULL,pHdl,0);
- if (bRet) {
+ if (bRet)
+ {
aDragStat.SetMinMoved();
MovDragObj(rPnt);
- } else {
+ }
+ else
+ {
SetInsertGluePoint(FALSE);
delete pInsPointUndo;
pInsPointUndo=NULL;
}
- } else {
+ }
+ else
+ {
DBG_ERROR("BegInsGluePoint(): GluePoint-Handle nicht gefunden");
}
- } else {
+ }
+ else
+ {
// Keine Klebepunkte moeglich bei diesem Objekt (z.B. Edge)
SetInsertGluePoint(FALSE);
delete pInsPointUndo;
@@ -940,10 +1010,14 @@ BOOL SdrDragView::BegInsGluePoint(const Point& rPnt)
BOOL SdrDragView::IsMoveOnlyDragObj(BOOL bAskRTTI) const
{
bool bRet=false;
- if (pDragBla!=NULL && !IsDraggingPoints() && !IsDraggingGluePoints()) {
- if (bAskRTTI) {
+ if (pDragBla!=NULL && !IsDraggingPoints() && !IsDraggingGluePoints())
+ {
+ if (bAskRTTI)
+ {
bRet=IS_TYPE(SdrDragMove,pDragBla);
- } else {
+ }
+ else
+ {
bRet=pDragBla->IsMoveOnly();
}
}
@@ -982,26 +1056,32 @@ void SdrDragView::HideDragObj()
void SdrDragView::SetNoDragXorPolys(BOOL bOn)
{
- if (IsNoDragXorPolys()!=bOn) {
+ if (IsNoDragXorPolys()!=bOn)
+ {
BOOL bDragging=pDragBla!=NULL;
BOOL bShown=bDragging && aDragStat.IsShown();
if (bShown) HideDragObj();
bNoDragXorPolys=bOn;
- if (bDragging) {
+ if (bDragging)
+ {
SetDragPolys();
pDragBla->MovAllPoints(); // die gedraggten Polys neu berechnen
}
- if (bShown) ShowDragObj();
+ if (bShown)
+ ShowDragObj();
}
}
void SdrDragView::SetDragStripes(BOOL bOn)
{
- if (pDragBla!=NULL && aDragStat.IsShown()) {
+ if (pDragBla!=NULL && aDragStat.IsShown())
+ {
HideDragObj();
bDragStripes=bOn;
ShowDragObj();
- } else {
+ }
+ else
+ {
bDragStripes=bOn;
}
}
@@ -1018,7 +1098,8 @@ void SdrDragView::SetDragStripes(BOOL bOn)
BOOL SdrDragView::IsOrthoDesired() const
{
- if (pDragBla!=NULL && (IS_TYPE(SdrDragObjOwn,pDragBla) || IS_TYPE(SdrDragResize,pDragBla))) {
+ if (pDragBla!=NULL && (IS_TYPE(SdrDragObjOwn,pDragBla) || IS_TYPE(SdrDragResize,pDragBla)))
+ {
return bOrthoDesiredOnMarked;
}
return FALSE;
@@ -1028,49 +1109,61 @@ BOOL SdrDragView::IsOrthoDesired() const
void SdrDragView::SetRubberEdgeDragging(BOOL bOn)
{
- if (bOn!=IsRubberEdgeDragging()) {
+ if (bOn!=IsRubberEdgeDragging())
+ {
ULONG nAnz = GetEdgesOfMarkedNodes().GetMarkCount();
BOOL bShowHide=nAnz!=0 && IsDragObj() &&
(nRubberEdgeDraggingLimit>=nAnz);
- if (bShowHide) HideDragObj();
+ if (bShowHide)
+ HideDragObj();
bRubberEdgeDragging=bOn;
- if (bShowHide) ShowDragObj();
+ if (bShowHide)
+ ShowDragObj();
}
}
void SdrDragView::SetRubberEdgeDraggingLimit(USHORT nEdgeObjAnz)
{
- if (nEdgeObjAnz!=nRubberEdgeDraggingLimit) {
+ if (nEdgeObjAnz!=nRubberEdgeDraggingLimit)
+ {
ULONG nAnz = GetEdgesOfMarkedNodes().GetMarkCount();
BOOL bShowHide=IsRubberEdgeDragging() && nAnz!=0 && IsDragObj() &&
(nEdgeObjAnz>=nAnz)!=(nRubberEdgeDraggingLimit>=nAnz);
- if (bShowHide) HideDragObj();
+ if (bShowHide)
+ HideDragObj();
nRubberEdgeDraggingLimit=nEdgeObjAnz;
- if (bShowHide) ShowDragObj();
+ if (bShowHide)
+ ShowDragObj();
}
}
void SdrDragView::SetDetailedEdgeDragging(BOOL bOn)
{
- if (bOn!=IsDetailedEdgeDragging()) {
+ if (bOn!=IsDetailedEdgeDragging())
+ {
ULONG nAnz = GetEdgesOfMarkedNodes().GetMarkCount();
BOOL bShowHide=nAnz!=0 && IsDragObj() &&
(nDetailedEdgeDraggingLimit>=nAnz);
- if (bShowHide) HideDragObj();
+ if (bShowHide)
+ HideDragObj();
bDetailedEdgeDragging=bOn;
- if (bShowHide) ShowDragObj();
+ if (bShowHide)
+ ShowDragObj();
}
}
void SdrDragView::SetDetailedEdgeDraggingLimit(USHORT nEdgeObjAnz)
{
- if (nEdgeObjAnz!=nDetailedEdgeDraggingLimit) {
+ if (nEdgeObjAnz!=nDetailedEdgeDraggingLimit)
+ {
ULONG nAnz = GetEdgesOfMarkedNodes().GetMarkCount();
BOOL bShowHide=IsDetailedEdgeDragging() && nAnz!=0 && IsDragObj() &&
(nEdgeObjAnz>=nAnz)!=(nDetailedEdgeDraggingLimit>=nAnz);
- if (bShowHide) HideDragObj();
+ if (bShowHide)
+ HideDragObj();
nDetailedEdgeDraggingLimit=nEdgeObjAnz;
- if (bShowHide) ShowDragObj();
+ if (bShowHide)
+ ShowDragObj();
}
}
diff --git a/svx/source/svdraw/svdedtv.cxx b/svx/source/svdraw/svdedtv.cxx
index 4f5bc437d2bf..85292b417e60 100644
--- a/svx/source/svdraw/svdedtv.cxx
+++ b/svx/source/svdraw/svdedtv.cxx
@@ -45,6 +45,7 @@
#include <svx/svdpoev.hxx> // fuer die PolyPossiblities
#include "svdstr.hrc" // Namen aus der Resource
#include "svdglob.hxx" // StringCache
+#include <svx/e3dsceneupdater.hxx>
// #i13033#
#include <clonelist.hxx>
@@ -688,31 +689,54 @@ void SdrEditView::DeleteMarkedList(const SdrMarkList& rMark)
if (rMark.GetMarkCount()!=0) {
rMark.ForceSort();
BegUndo();
- ULONG nMarkAnz=rMark.GetMarkCount();
- ULONG nm;
- for (nm=nMarkAnz; nm>0;) {
- nm--;
- SdrMark* pM=rMark.GetMark(nm);
- SdrObject* pObj = pM->GetMarkedSdrObj();
- std::vector< SdrUndoAction* > vConnectorUndoActions( CreateConnectorUndo( *pObj ) );
- AddUndoActions( vConnectorUndoActions );
- AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoDeleteObject(*pObj));
- }
- // Sicherstellen, dass die OrderNums stimmen:
- rMark.GetMark(0)->GetMarkedSdrObj()->GetOrdNum();
- for (nm=nMarkAnz; nm>0;) {
- nm--;
- SdrMark* pM=rMark.GetMark(nm);
- SdrObject* pObj=pM->GetMarkedSdrObj();
- //SdrPageView* pPV =pM->GetPageView();
- SdrObjList* pOL =pObj->GetObjList(); //#52680#
- UINT32 nOrdNum=pObj->GetOrdNumDirect();
-#ifdef DBG_UTIL
- SdrObject* pChkObj=
-#endif
- pOL->RemoveObject(nOrdNum);
- DBG_ASSERT(pChkObj==pObj,"DeleteMarkedList(MarkList): pChkObj!=pObj beim RemoveObject()");
+ const sal_uInt32 nMarkAnz(rMark.GetMarkCount());
+
+ if(nMarkAnz)
+ {
+ sal_uInt32 nm(0);
+ std::vector< E3DModifySceneSnapRectUpdater* > aUpdaters;
+
+ for(nm = nMarkAnz; nm > 0;)
+ {
+ nm--;
+ SdrMark* pM = rMark.GetMark(nm);
+ SdrObject* pObj = pM->GetMarkedSdrObj();
+
+ // extra undo actions for changed connector which now may hold it's layouted path (SJ)
+ std::vector< SdrUndoAction* > vConnectorUndoActions( CreateConnectorUndo( *pObj ) );
+ AddUndoActions( vConnectorUndoActions );
+
+ AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoDeleteObject(*pObj));
+ }
+
+ // Sicherstellen, dass die OrderNums stimmen:
+ rMark.GetMark(0)->GetMarkedSdrObj()->GetOrdNum();
+
+ for(nm = nMarkAnz; nm > 0;)
+ {
+ nm--;
+ SdrMark* pM = rMark.GetMark(nm);
+ SdrObject* pObj = pM->GetMarkedSdrObj();
+ SdrObjList* pOL = pObj->GetObjList(); //#52680#
+ const sal_uInt32 nOrdNum(pObj->GetOrdNumDirect());
+
+ // set up a scene updater if object is a 3d object
+ if(dynamic_cast< E3dObject* >(pObj))
+ {
+ aUpdaters.push_back(new E3DModifySceneSnapRectUpdater(pObj));
+ }
+
+ pOL->RemoveObject(nOrdNum);
+ }
+
+ // fire scene updaters
+ while(aUpdaters.size())
+ {
+ delete aUpdaters.back();
+ aUpdaters.pop_back();
+ }
}
+
EndUndo();
}
}
diff --git a/svx/source/svdraw/svdedtv1.cxx b/svx/source/svdraw/svdedtv1.cxx
index ba828ed72dc3..632761bb819c 100644
--- a/svx/source/svdraw/svdedtv1.cxx
+++ b/svx/source/svdraw/svdedtv1.cxx
@@ -41,7 +41,6 @@
#include <svtools/itemiter.hxx>
#include <vcl/msgbox.hxx>
#include <svx/rectenum.hxx>
-
#include <svx/svxids.hrc> // fuer SID_ATTR_TRANSFORM_...
#include <svx/svdattr.hxx> // fuer Get/SetGeoAttr
#include "svditext.hxx"
@@ -60,9 +59,9 @@
#include <svtools/aeitem.hxx>
#include <svtools/whiter.hxx>
#include <svx/sdr/contact/objectcontact.hxx>
-
-// #i38495#
#include <svx/sdr/contact/viewcontact.hxx>
+#include <svx/e3dsceneupdater.hxx>
+#include <svx/obj3d.hxx>
////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -240,15 +239,40 @@ void SdrEditView::RotateMarkedObj(const Point& rRef, long nWink, bool bCopy)
if (bCopy) CopyMarkedObj();
double nSin=sin(nWink*nPi180);
double nCos=cos(nWink*nPi180);
- ULONG nMarkAnz=GetMarkedObjectCount();
- for (ULONG nm=0; nm<nMarkAnz; nm++) {
- SdrMark* pM=GetSdrMarkByIndex(nm);
- SdrObject* pO=pM->GetMarkedSdrObj();
- std::vector< SdrUndoAction* > vConnectorUndoActions( CreateConnectorUndo( *pO ) );
- AddUndoActions( vConnectorUndoActions );
- AddUndo( GetModel()->GetSdrUndoFactory().CreateUndoGeoObject(*pO));
- pO->Rotate(rRef,nWink,nSin,nCos);
+ const sal_uInt32 nMarkAnz(GetMarkedObjectCount());
+
+ if(nMarkAnz)
+ {
+ std::vector< E3DModifySceneSnapRectUpdater* > aUpdaters;
+
+ for(sal_uInt32 nm(0); nm < nMarkAnz; nm++)
+ {
+ SdrMark* pM = GetSdrMarkByIndex(nm);
+ SdrObject* pO = pM->GetMarkedSdrObj();
+
+ // extra undo actions for changed connector which now may hold it's layouted path (SJ)
+ std::vector< SdrUndoAction* > vConnectorUndoActions( CreateConnectorUndo( *pO ) );
+ AddUndoActions( vConnectorUndoActions );
+
+ AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoGeoObject(*pO));
+
+ // set up a scene updater if object is a 3d object
+ if(dynamic_cast< E3dObject* >(pO))
+ {
+ aUpdaters.push_back(new E3DModifySceneSnapRectUpdater(pO));
+ }
+
+ pO->Rotate(rRef,nWink,nSin,nCos);
+ }
+
+ // fire scene updaters
+ while(aUpdaters.size())
+ {
+ delete aUpdaters.back();
+ aUpdaters.pop_back();
+ }
}
+
EndUndo();
}
@@ -263,15 +287,40 @@ void SdrEditView::MirrorMarkedObj(const Point& rRef1, const Point& rRef2, bool b
if (bCopy) aStr+=ImpGetResStr(STR_EditWithCopy);
BegUndo(aStr);
if (bCopy) CopyMarkedObj();
- ULONG nMarkAnz=GetMarkedObjectCount();
- for (ULONG nm=0; nm<nMarkAnz; nm++) {
- SdrMark* pM=GetSdrMarkByIndex(nm);
- SdrObject* pO=pM->GetMarkedSdrObj();
- std::vector< SdrUndoAction* > vConnectorUndoActions( CreateConnectorUndo( *pO ) );
- AddUndoActions( vConnectorUndoActions );
- AddUndo( GetModel()->GetSdrUndoFactory().CreateUndoGeoObject(*pO));
- pO->Mirror(rRef1,rRef2);
+ const sal_uInt32 nMarkAnz(GetMarkedObjectCount());
+
+ if(nMarkAnz)
+ {
+ std::vector< E3DModifySceneSnapRectUpdater* > aUpdaters;
+
+ for(sal_uInt32 nm(0); nm < nMarkAnz; nm++)
+ {
+ SdrMark* pM = GetSdrMarkByIndex(nm);
+ SdrObject* pO = pM->GetMarkedSdrObj();
+
+ // extra undo actions for changed connector which now may hold it's layouted path (SJ)
+ std::vector< SdrUndoAction* > vConnectorUndoActions( CreateConnectorUndo( *pO ) );
+ AddUndoActions( vConnectorUndoActions );
+
+ AddUndo( GetModel()->GetSdrUndoFactory().CreateUndoGeoObject(*pO));
+
+ // set up a scene updater if object is a 3d object
+ if(dynamic_cast< E3dObject* >(pO))
+ {
+ aUpdaters.push_back(new E3DModifySceneSnapRectUpdater(pO));
+ }
+
+ pO->Mirror(rRef1,rRef2);
+ }
+
+ // fire scene updaters
+ while(aUpdaters.size())
+ {
+ delete aUpdaters.back();
+ aUpdaters.pop_back();
+ }
}
+
EndUndo();
}
@@ -816,7 +865,8 @@ void SdrEditView::SetAttrToMarked(const SfxItemSet& rAttr, BOOL bReplaceAll)
}
BegUndo(aStr);
- ULONG nMarkAnz=GetMarkedObjectCount();
+ const sal_uInt32 nMarkAnz(GetMarkedObjectCount());
+ std::vector< E3DModifySceneSnapRectUpdater* > aUpdaters;
// create ItemSet without SFX_ITEM_DONTCARE. Put()
// uses it's second parameter (bInvalidAsDefault) to
@@ -858,7 +908,13 @@ void SdrEditView::SetAttrToMarked(const SfxItemSet& rAttr, BOOL bReplaceAll)
// add attribute undo
AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoAttrObject(*pObj,FALSE,bHasEEItems || bPossibleGeomChange || bRescueText));
- //pObj->SetItemSetAndBroadcast(aAttr, bReplaceAll);
+ // set up a scxene updater if object is a 3d object
+ if(dynamic_cast< E3dObject* >(pObj))
+ {
+ aUpdaters.push_back(new E3DModifySceneSnapRectUpdater(pObj));
+ }
+
+ // set attributes at object
pObj->SetMergedItemSetAndBroadcast(aAttr, bReplaceAll);
if(pObj->ISA(SdrTextObj))
@@ -892,6 +948,13 @@ void SdrEditView::SetAttrToMarked(const SfxItemSet& rAttr, BOOL bReplaceAll)
}
}
+ // fire scene updaters
+ while(aUpdaters.size())
+ {
+ delete aUpdaters.back();
+ aUpdaters.pop_back();
+ }
+
// #i38135#
if(bResetAnimationTimer)
{
diff --git a/svx/source/svdraw/svdetc.cxx b/svx/source/svdraw/svdetc.cxx
index 7de04ebc55cb..4a3e37bfc0ee 100644
--- a/svx/source/svdraw/svdetc.cxx
+++ b/svx/source/svdraw/svdetc.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: svdetc.cxx,v $
- * $Revision: 1.35 $
+ * $Revision: 1.35.18.2 $
*
* This file is part of OpenOffice.org.
*
@@ -70,7 +70,6 @@
#include <svx/xflbckit.hxx>
#include <svx/extrusionbar.hxx>
#include <svx/fontworkbar.hxx>
-#include <goodies/b3dcolor.hxx>
#include <vcl/svapp.hxx> //add CHINA001
//#i80528#
@@ -468,7 +467,8 @@ FASTBOOL GetDraftFillColor(const SfxItemSet& rSet, Color& rCol)
aCol2 = ((const XFillColorItem&)(rSet.Get(XATTR_FILLCOLOR))).GetColorValue();
}
- ((B3dColor&)rCol).CalcMiddle(aCol1, aCol2);
+ const basegfx::BColor aAverageColor(basegfx::average(aCol1.getBColor(), aCol2.getBColor()));
+ rCol = Color(aAverageColor);
bRetval = TRUE;
break;
@@ -477,7 +477,8 @@ FASTBOOL GetDraftFillColor(const SfxItemSet& rSet, Color& rCol)
const XGradient& rGrad=((XFillGradientItem&)rSet.Get(XATTR_FILLGRADIENT)).GetGradientValue();
Color aCol1(rGrad.GetStartColor());
Color aCol2(rGrad.GetEndColor());
- ((B3dColor&)rCol).CalcMiddle(aCol1, aCol2);
+ const basegfx::BColor aAverageColor(basegfx::average(aCol1.getBColor(), aCol2.getBColor()));
+ rCol = Color(aAverageColor);
bRetval = TRUE;
break;
diff --git a/svx/source/svdraw/svdhdl.cxx b/svx/source/svdraw/svdhdl.cxx
index 7c2bc3d6a17b..8ada8ace73fa 100644
--- a/svx/source/svdraw/svdhdl.cxx
+++ b/svx/source/svdraw/svdhdl.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: svdhdl.cxx,v $
- * $Revision: 1.34 $
+ * $Revision: 1.34.18.1 $
*
* This file is part of OpenOffice.org.
*
@@ -31,6 +31,8 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_svx.hxx"
+#include <algorithm>
+
#include <svx/svdhdl.hxx>
#include "svdtouch.hxx"
#include <svx/svdpagv.hxx>
@@ -41,7 +43,6 @@
#include <vcl/virdev.hxx>
#include <tools/poly.hxx>
#include <vcl/bmpacc.hxx>
-#include <goodies/b3dcolor.hxx>
#include <svx/sxekitm.hxx>
#include "svdstr.hrc"
@@ -67,6 +68,7 @@
#include <svx/sdrpagewindow.hxx>
#include <sdrpaintwindow.hxx>
#include <vcl/svapp.hxx>
+#include <svx/sdr/overlay/overlaypolypolygon.hxx>
////////////////////////////////////////////////////////////////////////////////////////////////////
// #i15222#
@@ -815,7 +817,8 @@ Pointer SdrHdl::GetPointer() const
PointerStyle ePtr=POINTER_MOVE;
BOOL bSize=eKind>=HDL_UPLFT && eKind<=HDL_LWRGT;
// Fuer Resize von gedrehten Rechtecken die Mauszeiger etwas mitdrehen
- if (bSize && nDrehWink!=0) {
+ if (bSize && nDrehWink!=0)
+ {
long nHdlWink=0;
switch (eKind) {
case HDL_UPLFT: nHdlWink=13500; break;
@@ -833,18 +836,22 @@ Pointer SdrHdl::GetPointer() const
while (nHdlWink<0) nHdlWink+=18000;
while (nHdlWink>=18000) nHdlWink-=18000;
nHdlWink/=4500;
- switch ((BYTE)nHdlWink) {
+ switch ((BYTE)nHdlWink)
+ {
case 0: ePtr=POINTER_ESIZE; break;
case 1: ePtr=POINTER_NESIZE; break;
case 2: ePtr=POINTER_SSIZE; break;
case 3: ePtr=POINTER_SESIZE; break;
} // switch
}
- if (ePtr==POINTER_MOVE) {
+ if (ePtr==POINTER_MOVE)
+ {
BOOL bRot=pHdlList!=NULL && pHdlList->IsRotateShear();
BOOL bDis=pHdlList!=NULL && pHdlList->IsDistortShear();
- if (bSize && pHdlList!=NULL && (bRot || bDis)) {
- switch (eKind) {
+ if (bSize && pHdlList!=NULL && (bRot || bDis))
+ {
+ switch (eKind)
+ {
case HDL_UPLFT: case HDL_UPRGT:
case HDL_LWLFT: case HDL_LWRGT: ePtr=bRot ? POINTER_ROTATE : POINTER_REFHAND; break;
case HDL_LEFT : case HDL_RIGHT: ePtr=POINTER_VSHEAR; break;
@@ -852,8 +859,11 @@ Pointer SdrHdl::GetPointer() const
default:
break;
}
- } else {
- switch (eKind) {
+ }
+ else
+ {
+ switch (eKind)
+ {
case HDL_UPLFT: ePtr=POINTER_NWSIZE; break;
case HDL_UPPER: ePtr=POINTER_NSIZE; break;
case HDL_UPRGT: ePtr=POINTER_NESIZE; break;
@@ -1023,17 +1033,20 @@ Bitmap SdrHdlColor::CreateColorDropper(Color aCol)
pWrite->DrawLine(Point(nWidth - 1, 1), Point(nWidth - 1, nHeight - 2));
// draw lighter UpperLeft
- B3dColor aMixCol(aCol);
- B3dColor aFactor(0x40, 0x40, 0x40);
- aMixCol += aFactor;
- pWrite->SetLineColor((Color)aMixCol);
+ const Color aLightColor(
+ (sal_uInt8)(::std::min((sal_Int16)((sal_Int16)aCol.GetRed() + (sal_Int16)0x0040), (sal_Int16)0x00ff)),
+ (sal_uInt8)(::std::min((sal_Int16)((sal_Int16)aCol.GetGreen() + (sal_Int16)0x0040), (sal_Int16)0x00ff)),
+ (sal_uInt8)(::std::min((sal_Int16)((sal_Int16)aCol.GetBlue() + (sal_Int16)0x0040), (sal_Int16)0x00ff)));
+ pWrite->SetLineColor(aLightColor);
pWrite->DrawLine(Point(1, 1), Point(1, nHeight - 2));
pWrite->DrawLine(Point(2, 1), Point(nWidth - 2, 1));
// draw darker LowerRight
- aMixCol = aCol;
- aMixCol -= aFactor;
- pWrite->SetLineColor((Color)aMixCol);
+ const Color aDarkColor(
+ (sal_uInt8)(::std::max((sal_Int16)((sal_Int16)aCol.GetRed() - (sal_Int16)0x0040), (sal_Int16)0x0000)),
+ (sal_uInt8)(::std::max((sal_Int16)((sal_Int16)aCol.GetGreen() - (sal_Int16)0x0040), (sal_Int16)0x0000)),
+ (sal_uInt8)(::std::max((sal_Int16)((sal_Int16)aCol.GetBlue() - (sal_Int16)0x0040), (sal_Int16)0x0000)));
+ pWrite->SetLineColor(aDarkColor);
pWrite->DrawLine(Point(2, nHeight - 2), Point(nWidth - 2, nHeight - 2));
pWrite->DrawLine(Point(nWidth - 2, 2), Point(nWidth - 2, nHeight - 3));
@@ -1421,21 +1434,10 @@ void E3dVolumeMarker::CreateB2dIAObject()
if(rPageWindow.GetPaintWindow().OutputToWindow())
{
- if(rPageWindow.GetOverlayManager())
- {
- const sal_uInt32 nCnt(aWireframePoly.count());
-
- for(sal_uInt32 i(0L); i < nCnt; i++)
+ if(rPageWindow.GetOverlayManager() && aWireframePoly.count())
{
- const basegfx::B2DPolygon aPoly(aWireframePoly.getB2DPolygon(i));
- const basegfx::B2DPoint aPointA(aPoly.getB2DPoint(0L));
- const basegfx::B2DPoint aPointB(aPoly.getB2DPoint(1L));
-
::sdr::overlay::OverlayObject* pNewOverlayObject = new
- ::sdr::overlay::OverlayLineStriped(
- aPointA,
- aPointB
- );
+ ::sdr::overlay::OverlayPolyPolygonStriped(aWireframePoly);
DBG_ASSERT(pNewOverlayObject, "Got NO new IAO!");
// OVERLAYMANAGER
@@ -1453,7 +1455,6 @@ void E3dVolumeMarker::CreateB2dIAObject()
}
}
}
-}
////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -1542,27 +1543,38 @@ void ImpEdgeHdl::SetLineCode(SdrEdgeLineCode eCode)
Pointer ImpEdgeHdl::GetPointer() const
{
SdrEdgeObj* pEdge=PTR_CAST(SdrEdgeObj,pObj);
- if (pEdge==NULL) return SdrHdl::GetPointer();
- if (nObjHdlNum<=1) return Pointer(POINTER_MOVEPOINT); //Pointer(POINTER_DRAW_CONNECT);
- if (IsHorzDrag()) return Pointer(POINTER_ESIZE);
- else return Pointer(POINTER_SSIZE);
+ if (pEdge==NULL)
+ return SdrHdl::GetPointer();
+ if (nObjHdlNum<=1)
+ return Pointer(POINTER_MOVEPOINT); //Pointer(POINTER_DRAW_CONNECT);
+ if (IsHorzDrag())
+ return Pointer(POINTER_ESIZE);
+ else
+ return Pointer(POINTER_SSIZE);
}
BOOL ImpEdgeHdl::IsHorzDrag() const
{
SdrEdgeObj* pEdge=PTR_CAST(SdrEdgeObj,pObj);
- if (pEdge==NULL) return FALSE;
- if (nObjHdlNum<=1) return FALSE;
+ if (pEdge==NULL)
+ return FALSE;
+ if (nObjHdlNum<=1)
+ return FALSE;
SdrEdgeKind eEdgeKind = ((SdrEdgeKindItem&)(pEdge->GetObjectItem(SDRATTR_EDGEKIND))).GetValue();
const SdrEdgeInfoRec& rInfo=pEdge->aEdgeInfo;
- if (eEdgeKind==SDREDGE_ORTHOLINES || eEdgeKind==SDREDGE_BEZIER) {
+ if (eEdgeKind==SDREDGE_ORTHOLINES || eEdgeKind==SDREDGE_BEZIER)
+ {
return !rInfo.ImpIsHorzLine(eLineCode,*pEdge->pEdgeTrack);
- } else if (eEdgeKind==SDREDGE_THREELINES) {
+ }
+ else if (eEdgeKind==SDREDGE_THREELINES)
+ {
long nWink=nObjHdlNum==2 ? rInfo.nAngle1 : rInfo.nAngle2;
- if (nWink==0 || nWink==18000) return TRUE;
- else return FALSE;
+ if (nWink==0 || nWink==18000)
+ return TRUE;
+ else
+ return FALSE;
}
return FALSE;
}
@@ -1632,7 +1644,8 @@ void ImpMeasureHdl::CreateB2dIAObject()
Pointer ImpMeasureHdl::GetPointer() const
{
- switch (nObjHdlNum) {
+ switch (nObjHdlNum)
+ {
case 0: case 1: return Pointer(POINTER_HAND);
case 2: case 3: return Pointer(POINTER_MOVEPOINT);
case 4: case 5: return SdrHdl::GetPointer(); // wird dann entsprechend gedreht
@@ -1655,7 +1668,8 @@ int ImpSdrHdlListSorter::Compare(const void* pElem1, const void* pElem2) const
// Level 1: Erst normale Handles, dann Glue, dann User, dann Plushandles, dann Retpunkt-Handles
unsigned n1=1;
unsigned n2=1;
- if (eKind1!=eKind2) {
+ if (eKind1!=eKind2)
+ {
if (eKind1==HDL_REF1 || eKind1==HDL_REF2 || eKind1==HDL_MIRX) n1=5;
else if (eKind1==HDL_GLUE) n1=2;
else if (eKind1==HDL_USER) n1=3;
@@ -1667,29 +1681,41 @@ int ImpSdrHdlListSorter::Compare(const void* pElem1, const void* pElem2) const
}
if (((SdrHdl*)pElem1)->IsPlusHdl()) n1=4;
if (((SdrHdl*)pElem2)->IsPlusHdl()) n2=4;
- if (n1==n2) {
+ if (n1==n2)
+ {
// Level 2: PageView (Pointer)
SdrPageView* pPV1=((SdrHdl*)pElem1)->GetPageView();
SdrPageView* pPV2=((SdrHdl*)pElem2)->GetPageView();
- if (pPV1==pPV2) {
+ if (pPV1==pPV2)
+ {
// Level 3: Position (x+y)
SdrObject* pObj1=((SdrHdl*)pElem1)->GetObj();
SdrObject* pObj2=((SdrHdl*)pElem2)->GetObj();
- if (pObj1==pObj2) {
+ if (pObj1==pObj2)
+ {
sal_uInt32 nNum1=((SdrHdl*)pElem1)->GetObjHdlNum();
sal_uInt32 nNum2=((SdrHdl*)pElem2)->GetObjHdlNum();
- if (nNum1==nNum2) { // #48763#
+ if (nNum1==nNum2)
+ { // #48763#
if (eKind1==eKind2)
return (long)pElem1<(long)pElem2 ? -1 : 1; // Notloesung, um immer die gleiche Sortierung zu haben
return (USHORT)eKind1<(USHORT)eKind2 ? -1 : 1;
- } else return nNum1<nNum2 ? -1 : 1;
- } else {
+ }
+ else
+ return nNum1<nNum2 ? -1 : 1;
+ }
+ else
+ {
return (long)pObj1<(long)pObj2 ? -1 : 1;
}
- } else {
+ }
+ else
+ {
return (long)pPV1<(long)pPV2 ? -1 : 1;
}
- } else {
+ }
+ else
+ {
return n1<n2 ? -1 : 1;
}
}
@@ -2104,17 +2130,22 @@ void SdrHdlList::Sort()
ULONG SdrHdlList::GetHdlNum(const SdrHdl* pHdl) const
{
- if (pHdl==NULL) return CONTAINER_ENTRY_NOTFOUND;
+ if (pHdl==NULL)
+ return CONTAINER_ENTRY_NOTFOUND;
ULONG nPos=aList.GetPos(pHdl);
return nPos;
}
void SdrHdlList::AddHdl(SdrHdl* pHdl, BOOL bAtBegin)
{
- if (pHdl!=NULL) {
- if (bAtBegin) {
+ if (pHdl!=NULL)
+ {
+ if (bAtBegin)
+ {
aList.Insert(pHdl,ULONG(0));
- } else {
+ }
+ else
+ {
aList.Insert(pHdl,CONTAINER_APPEND);
}
pHdl->SetHdlList(this);
@@ -2126,15 +2157,23 @@ SdrHdl* SdrHdlList::IsHdlListHit(const Point& rPnt, BOOL bBack, BOOL bNext, SdrH
SdrHdl* pRet=NULL;
ULONG nAnz=GetHdlCount();
ULONG nNum=bBack ? 0 : nAnz;
- while ((bBack ? nNum<nAnz : nNum>0) && pRet==NULL) {
- if (!bBack) nNum--;
+ while ((bBack ? nNum<nAnz : nNum>0) && pRet==NULL)
+ {
+ if (!bBack)
+ nNum--;
SdrHdl* pHdl=GetHdl(nNum);
- if (bNext) {
- if (pHdl==pHdl0) bNext=FALSE;
- } else {
- if (pHdl->IsHdlHit(rPnt)) pRet=pHdl;
+ if (bNext)
+ {
+ if (pHdl==pHdl0)
+ bNext=FALSE;
+ }
+ else
+ {
+ if (pHdl->IsHdlHit(rPnt))
+ pRet=pHdl;
}
- if (bBack) nNum++;
+ if (bBack)
+ nNum++;
}
return pRet;
}
@@ -2142,9 +2181,11 @@ SdrHdl* SdrHdlList::IsHdlListHit(const Point& rPnt, BOOL bBack, BOOL bNext, SdrH
SdrHdl* SdrHdlList::GetHdl(SdrHdlKind eKind1) const
{
SdrHdl* pRet=NULL;
- for (ULONG i=0; i<GetHdlCount() && pRet==NULL; i++) {
+ for (ULONG i=0; i<GetHdlCount() && pRet==NULL; i++)
+ {
SdrHdl* pHdl=GetHdl(i);
- if (pHdl->GetKind()==eKind1) pRet=pHdl;
+ if (pHdl->GetKind()==eKind1)
+ pRet=pHdl;
}
return pRet;
}
diff --git a/svx/source/svdraw/svdmrkv.cxx b/svx/source/svdraw/svdmrkv.cxx
index 42a27dc99e36..97793ffa769e 100644
--- a/svx/source/svdraw/svdmrkv.cxx
+++ b/svx/source/svdraw/svdmrkv.cxx
@@ -972,8 +972,8 @@ void SdrMarkView::AddDragModeHdl(SdrDragMode eMode)
aGradTransformer.GradToVec(aGradTransGradient, aGradTransVector, pObj);
// build handles
- const Point aTmpPos1(FRound(aGradTransVector.maPositionA.getX()), FRound(aGradTransVector.maPositionA.getY()));
- const Point aTmpPos2(FRound(aGradTransVector.maPositionB.getX()), FRound(aGradTransVector.maPositionB.getY()));
+ const Point aTmpPos1(basegfx::fround(aGradTransVector.maPositionA.getX()), basegfx::fround(aGradTransVector.maPositionA.getY()));
+ const Point aTmpPos2(basegfx::fround(aGradTransVector.maPositionB.getX()), basegfx::fround(aGradTransVector.maPositionB.getY()));
SdrHdlColor* pColHdl1 = new SdrHdlColor(aTmpPos1, aGradTransVector.aCol1, SDR_HANDLE_COLOR_SIZE_NORMAL, TRUE);
SdrHdlColor* pColHdl2 = new SdrHdlColor(aTmpPos2, aGradTransVector.aCol2, SDR_HANDLE_COLOR_SIZE_NORMAL, TRUE);
SdrHdlGradient* pGradHdl = new SdrHdlGradient(aTmpPos1, aTmpPos2, FALSE);
@@ -1014,8 +1014,8 @@ void SdrMarkView::AddDragModeHdl(SdrDragMode eMode)
aGradTransformer.GradToVec(aGradTransGradient, aGradTransVector, pObj);
// build handles
- const Point aTmpPos1(FRound(aGradTransVector.maPositionA.getX()), FRound(aGradTransVector.maPositionA.getY()));
- const Point aTmpPos2(FRound(aGradTransVector.maPositionB.getX()), FRound(aGradTransVector.maPositionB.getY()));
+ const Point aTmpPos1(basegfx::fround(aGradTransVector.maPositionA.getX()), basegfx::fround(aGradTransVector.maPositionA.getY()));
+ const Point aTmpPos2(basegfx::fround(aGradTransVector.maPositionB.getX()), basegfx::fround(aGradTransVector.maPositionB.getY()));
SdrHdlColor* pColHdl1 = new SdrHdlColor(aTmpPos1, aGradTransVector.aCol1, aHdlSize, FALSE);
SdrHdlColor* pColHdl2 = new SdrHdlColor(aTmpPos2, aGradTransVector.aCol2, aHdlSize, FALSE);
SdrHdlGradient* pGradHdl = new SdrHdlGradient(aTmpPos1, aTmpPos2, TRUE);
diff --git a/svx/source/svdraw/svdoashp.cxx b/svx/source/svdraw/svdoashp.cxx
index 6cb515067c24..c4327a975e25 100644
--- a/svx/source/svdraw/svdoashp.cxx
+++ b/svx/source/svdraw/svdoashp.cxx
@@ -36,11 +36,7 @@
#include <ucbhelper/content.hxx>
#include <ucbhelper/contentbroker.hxx>
#include <unotools/datetime.hxx>
-#ifndef SVX_LIGHT
-#ifndef _LNKBASE_HXX //autogen
#include <sfx2/lnkbase.hxx>
-#endif
-#endif
#include <tools/urlobj.hxx>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/drawing/XShape.hpp>
@@ -82,18 +78,11 @@
#include <com/sun/star/drawing/EnhancedCustomShapeSegment.hpp>
#include <com/sun/star/drawing/EnhancedCustomShapeSegmentCommand.hpp>
#include <svx/writingmodeitem.hxx>
-
-// textitem.hxx editdata.hxx
#include <svx/xlnclit.hxx>
-
-
-
#include <svx/svxids.hrc>
#include <svtools/whiter.hxx>
#include <svx/sdr/properties/customshapeproperties.hxx>
#include <svx/sdr/contact/viewcontactofsdrobjcustomshape.hxx>
-
-// #i37011#
#include <svx/xlnclit.hxx>
#include <svx/xlntrit.hxx>
#include <svx/xfltrit.hxx>
@@ -102,8 +91,6 @@
#include <svx/xflhtit.hxx>
#include <svx/xbtmpit.hxx>
#include <vcl/bmpacc.hxx>
-
-// #i37448#
#include <svx/svdview.hxx>
#include <basegfx/polygon/b2dpolypolygontools.hxx>
#include <basegfx/matrix/b2dhommatrix.hxx>
@@ -3360,7 +3347,7 @@ void SdrObjCustomShape::TakeObjNamePlural(XubString& rName) const
rName=ImpGetResStr(STR_ObjNamePluralCUSTOMSHAPE);
}
-basegfx::B2DPolyPolygon SdrObjCustomShape::TakeXorPoly(sal_Bool /*bDetail*/) const
+basegfx::B2DPolyPolygon SdrObjCustomShape::TakeXorPoly() const
{
return GetLineGeometry( (SdrObjCustomShape*)this, sal_False );
}
diff --git a/svx/source/svdraw/svdoattr.cxx b/svx/source/svdraw/svdoattr.cxx
index 546add85e862..f192221bd880 100644
--- a/svx/source/svdraw/svdoattr.cxx
+++ b/svx/source/svdraw/svdoattr.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: svdoattr.cxx,v $
- * $Revision: 1.53 $
+ * $Revision: 1.53.18.1 $
*
* This file is part of OpenOffice.org.
*
@@ -115,8 +115,9 @@ const Rectangle& SdrAttrObj::GetSnapRect() const
if(bSnapRectDirty)
{
((SdrAttrObj*)this)->RecalcSnapRect();
- ((SdrAttrObj*)this)->bSnapRectDirty = FALSE;
+ ((SdrAttrObj*)this)->bSnapRectDirty = false;
}
+
return maSnapRect;
}
diff --git a/svx/source/svdraw/svdobj.cxx b/svx/source/svdraw/svdobj.cxx
index 6dca44b4811f..b68dddbd4637 100644
--- a/svx/source/svdraw/svdobj.cxx
+++ b/svx/source/svdraw/svdobj.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: svdobj.cxx,v $
- * $Revision: 1.99 $
+ * $Revision: 1.99.16.2 $
*
* This file is part of OpenOffice.org.
*
@@ -189,7 +189,7 @@ void SdrObjUserData::PaintMacro(OutputDevice& rOut, const Rectangle& /*rDirtyRec
return;
const RasterOp eRop(rOut.GetRasterOp());
- const basegfx::B2DPolyPolygon aPolyPolygon(pObj->TakeXorPoly(true));
+ const basegfx::B2DPolyPolygon aPolyPolygon(pObj->TakeXorPoly());
const sal_uInt32 nCount(aPolyPolygon.count());
rOut.SetLineColor(COL_BLACK);
@@ -913,27 +913,25 @@ const Rectangle& SdrObject::GetLastBoundRect() const
void SdrObject::RecalcBoundRect()
{
// central new method which will calculate the BoundRect using primitive geometry
- const drawinglayer::primitive2d::Primitive2DSequence xPrimitives(GetViewContact().getViewIndependentPrimitive2DSequence());
-
- if(xPrimitives.hasElements())
+ if(aOutRect.IsEmpty())
{
- // use neutral ViewInformation
- const drawinglayer::geometry::ViewInformation2D aViewInformation2D(0);
-
- // get the range of the primitives
- const basegfx::B2DRange aRange(drawinglayer::primitive2d::getB2DRangeFromPrimitive2DSequence(xPrimitives, aViewInformation2D));
+ const drawinglayer::primitive2d::Primitive2DSequence xPrimitives(GetViewContact().getViewIndependentPrimitive2DSequence());
- if(!aRange.isEmpty())
+ if(xPrimitives.hasElements())
{
- aOutRect = Rectangle(
- (sal_Int32)floor(aRange.getMinX()), (sal_Int32)floor(aRange.getMinY()),
- (sal_Int32)ceil(aRange.getMaxX()), (sal_Int32)ceil(aRange.getMaxY()));
+ // use neutral ViewInformation and get the range of the primitives
+ const drawinglayer::geometry::ViewInformation2D aViewInformation2D(0);
+ const basegfx::B2DRange aRange(drawinglayer::primitive2d::getB2DRangeFromPrimitive2DSequence(xPrimitives, aViewInformation2D));
+
+ if(!aRange.isEmpty())
+ {
+ aOutRect = Rectangle(
+ (sal_Int32)floor(aRange.getMinX()), (sal_Int32)floor(aRange.getMinY()),
+ (sal_Int32)ceil(aRange.getMaxX()), (sal_Int32)ceil(aRange.getMaxY()));
+ return;
+ }
}
}
- else
- {
- aOutRect = Rectangle();
- }
}
void SdrObject::BroadcastObjectChange() const
@@ -1127,7 +1125,7 @@ XubString SdrObject::GetMetrStr(long nVal, MapUnit /*eWantMap*/, FASTBOOL bNoUni
return aStr;
}
-basegfx::B2DPolyPolygon SdrObject::TakeXorPoly(sal_Bool /*bDetail*/) const
+basegfx::B2DPolyPolygon SdrObject::TakeXorPoly() const
{
basegfx::B2DPolyPolygon aRetval;
const Rectangle aR(GetCurrentBoundRect());
@@ -1140,26 +1138,80 @@ basegfx::B2DPolyPolygon SdrObject::TakeXorPoly(sal_Bool /*bDetail*/) const
basegfx::B2DPolyPolygon SdrObject::TakeContour() const
{
basegfx::B2DPolyPolygon aRetval;
- const sdr::contact::ViewContact& rVC(GetViewContact());
- const drawinglayer::primitive2d::Primitive2DSequence xSequence(rVC.getViewIndependentPrimitive2DSequence());
- if(xSequence.hasElements())
+ // create cloned object without text, but with XLINE_SOLID,
+ // COL_BLACK as line color and XFILL_NONE
+ SdrObject* pClone = Clone();
+
+ if(pClone)
{
- // use neutral ViewInformation
- const drawinglayer::geometry::ViewInformation2D aViewInformation2D(0);
+ const SdrTextObj* pTextObj = dynamic_cast< const SdrTextObj* >(this);
+
+ if(pTextObj)
+ {
+ // no text and no text animation
+ pClone->SetMergedItem(SdrTextAniKindItem(SDRTEXTANI_NONE));
+ pClone->SetOutlinerParaObject(0);
+ }
+
+ const SdrEdgeObj* pEdgeObj = dynamic_cast< const SdrEdgeObj* >(this);
+
+ if(pEdgeObj)
+ {
+ // create connections if connector, will be cleaned up when
+ // deleting the connector again
+ SdrObject* pLeft = pEdgeObj->GetConnectedNode(TRUE);
+ SdrObject* pRight = pEdgeObj->GetConnectedNode(FALSE);
+
+ if(pLeft)
+ {
+ pClone->ConnectToNode(TRUE, pLeft);
+ }
+
+ if(pRight)
+ {
+ pClone->ConnectToNode(FALSE, pRight);
+ }
+ }
- // create extractor, process and get result
- drawinglayer::processor2d::ContourExtractor2D aExtractor(aViewInformation2D);
- aExtractor.process(xSequence);
- const std::vector< basegfx::B2DPolyPolygon >& rResult(aExtractor.getExtractedContour());
- const sal_uInt32 nSize(rResult.size());
+ SfxItemSet aNewSet(*GetObjectItemPool());
- // the topology for contour is correctly a vector of PolyPolygons; for
- // historical reasons cut it back to a single PolyPolygon here
- for(sal_uInt32 a(0); a < nSize; a++)
+ // solid black lines and no fill
+ aNewSet.Put(XLineStyleItem(XLINE_SOLID));
+ aNewSet.Put(XLineColorItem(String(), Color(COL_BLACK)));
+ aNewSet.Put(XFillStyleItem(XFILL_NONE));
+ pClone->SetMergedItemSet(aNewSet);
+
+ // get sequence from clone
+ const sdr::contact::ViewContact& rVC(pClone->GetViewContact());
+ const drawinglayer::primitive2d::Primitive2DSequence xSequence(rVC.getViewIndependentPrimitive2DSequence());
+
+ if(xSequence.hasElements())
{
- aRetval.append(rResult[a]);
+ // use neutral ViewInformation
+ const drawinglayer::geometry::ViewInformation2D aViewInformation2D(0);
+
+ // create extractor, process and get result
+ drawinglayer::processor2d::ContourExtractor2D aExtractor(aViewInformation2D);
+ aExtractor.process(xSequence);
+ const std::vector< basegfx::B2DPolyPolygon >& rResult(aExtractor.getExtractedContour());
+ const sal_uInt32 nSize(rResult.size());
+
+ // when count is one, it is implied that the object has only it's normal
+ // contour anyways and TakeCountour() is to return an empty PolyPolygon
+ // (see old implementation for historical reasons)
+ if(nSize > 1)
+ {
+ // the topology for contour is correctly a vector of PolyPolygons; for
+ // historical reasons cut it back to a single PolyPolygon here
+ for(sal_uInt32 a(0); a < nSize; a++)
+ {
+ aRetval.append(rResult[a]);
+ }
+ }
}
+
+ delete pClone;
}
return aRetval;
@@ -1782,7 +1834,7 @@ void SdrObject::PaintMacro(OutputDevice& rOut, const Rectangle& rDirtyRect, cons
else
{
const RasterOp eRop(rOut.GetRasterOp());
- const basegfx::B2DPolyPolygon aPolyPolygon(TakeXorPoly(true));
+ const basegfx::B2DPolyPolygon aPolyPolygon(TakeXorPoly());
const sal_uInt32 nCount(aPolyPolygon.count());
rOut.SetLineColor(COL_BLACK);
diff --git a/svx/source/svdraw/svdocapt.cxx b/svx/source/svdraw/svdocapt.cxx
index af09d0fd8ca5..9ff1416dbd2f 100644
--- a/svx/source/svdraw/svdocapt.cxx
+++ b/svx/source/svdraw/svdocapt.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: svdocapt.cxx,v $
- * $Revision: 1.30 $
+ * $Revision: 1.30.18.1 $
*
* This file is part of OpenOffice.org.
*
@@ -303,9 +303,9 @@ void SdrCaptionObj::TakeObjNamePlural(XubString& rName) const
rName=ImpGetResStr(STR_ObjNamePluralCAPTION);
}
-basegfx::B2DPolyPolygon SdrCaptionObj::TakeXorPoly(sal_Bool bDetail) const
+basegfx::B2DPolyPolygon SdrCaptionObj::TakeXorPoly() const
{
- basegfx::B2DPolyPolygon aPolyPoly(SdrRectObj::TakeXorPoly(bDetail));
+ basegfx::B2DPolyPolygon aPolyPoly(SdrRectObj::TakeXorPoly());
aPolyPoly.append(aTailPoly.getB2DPolygon());
return aPolyPoly;
diff --git a/svx/source/svdraw/svdocirc.cxx b/svx/source/svdraw/svdocirc.cxx
index 4141c761bc53..d156071a858d 100644
--- a/svx/source/svdraw/svdocirc.cxx
+++ b/svx/source/svdraw/svdocirc.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: svdocirc.cxx,v $
- * $Revision: 1.37 $
+ * $Revision: 1.37.18.1 $
*
* This file is part of OpenOffice.org.
*
@@ -497,7 +497,7 @@ void SdrCircObj::operator=(const SdrObject& rObj)
aPnt2 = ((SdrCircObj&)rObj).aPnt2;
}
-basegfx::B2DPolyPolygon SdrCircObj::TakeXorPoly(sal_Bool /*bDetail*/) const
+basegfx::B2DPolyPolygon SdrCircObj::TakeXorPoly() const
{
const basegfx::B2DPolygon aCircPolygon(ImpCalcXPolyCirc(meCircleKind, aRect, nStartWink, nEndWink));
return basegfx::B2DPolyPolygon(aCircPolygon);
diff --git a/svx/source/svdraw/svdoedge.cxx b/svx/source/svdraw/svdoedge.cxx
index c65c5d4fc62f..f55424c75182 100644
--- a/svx/source/svdraw/svdoedge.cxx
+++ b/svx/source/svdraw/svdoedge.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: svdoedge.cxx,v $
- * $Revision: 1.45 $
+ * $Revision: 1.45.18.1 $
*
* This file is part of OpenOffice.org.
*
@@ -1675,7 +1675,7 @@ void SdrEdgeObj::TakeObjNamePlural(XubString& rName) const
rName=ImpGetResStr(STR_ObjNamePluralEDGE);
}
-basegfx::B2DPolyPolygon SdrEdgeObj::TakeXorPoly(sal_Bool /*bDetail*/) const
+basegfx::B2DPolyPolygon SdrEdgeObj::TakeXorPoly() const
{
basegfx::B2DPolyPolygon aPolyPolygon;
diff --git a/svx/source/svdraw/svdograf.cxx b/svx/source/svdraw/svdograf.cxx
index 5b15013a7031..fd6d76f0b94b 100644
--- a/svx/source/svdraw/svdograf.cxx
+++ b/svx/source/svdraw/svdograf.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: svdograf.cxx,v $
- * $Revision: 1.84 $
+ * $Revision: 1.84.18.2 $
*
* This file is part of OpenOffice.org.
*
@@ -291,9 +291,13 @@ void SdrGrafObj::SetGraphicObject( const GraphicObject& rGrfObj )
// -----------------------------------------------------------------------------
-const GraphicObject& SdrGrafObj::GetGraphicObject() const
+const GraphicObject& SdrGrafObj::GetGraphicObject(bool bForceSwapIn) const
{
- ForceSwapIn();
+ if(bForceSwapIn)
+ {
+ ForceSwapIn();
+ }
+
return *pGraphic;
}
@@ -685,7 +689,7 @@ void SdrGrafObj::operator=( const SdrObject& rObj )
// -----------------------------------------------------------------------------
// #i25616#
-basegfx::B2DPolyPolygon SdrGrafObj::TakeXorPoly(sal_Bool bDetail) const
+basegfx::B2DPolyPolygon SdrGrafObj::TakeXorPoly() const
{
if(mbInsidePaint)
{
@@ -707,7 +711,7 @@ basegfx::B2DPolyPolygon SdrGrafObj::TakeXorPoly(sal_Bool bDetail) const
else
{
// call parent
- return SdrRectObj::TakeXorPoly(bDetail);
+ return SdrRectObj::TakeXorPoly();
}
}
diff --git a/svx/source/svdraw/svdogrp.cxx b/svx/source/svdraw/svdogrp.cxx
index 46fb9421d1c3..c2408bb42061 100644
--- a/svx/source/svdraw/svdogrp.cxx
+++ b/svx/source/svdraw/svdogrp.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: svdogrp.cxx,v $
- * $Revision: 1.38 $
+ * $Revision: 1.38.18.1 $
*
* This file is part of OpenOffice.org.
*
@@ -38,11 +38,7 @@
#include <svx/svdogrp.hxx>
-#ifndef SVX_LIGHT
-#ifndef _LNKBASE_HXX //autogen
#include <sfx2/lnkbase.hxx>
-#endif
-#endif
#include <tools/urlobj.hxx>
#include <svtools/urihelper.hxx>
@@ -386,7 +382,7 @@ void SdrObjGroup::RecalcSnapRect()
// nicht erforderlich, da die Rects von der SubList verwendet werden.
}
-basegfx::B2DPolyPolygon SdrObjGroup::TakeXorPoly(sal_Bool bDetail) const
+basegfx::B2DPolyPolygon SdrObjGroup::TakeXorPoly() const
{
basegfx::B2DPolyPolygon aRetval;
const sal_uInt32 nObjCount(pSub->GetObjCount());
@@ -394,7 +390,7 @@ basegfx::B2DPolyPolygon SdrObjGroup::TakeXorPoly(sal_Bool bDetail) const
for(sal_uInt32 a(0L); a < nObjCount; a++)
{
SdrObject* pObj = pSub->GetObj(a);
- aRetval.append(pObj->TakeXorPoly(bDetail));
+ aRetval.append(pObj->TakeXorPoly());
}
if(!aRetval.count())
diff --git a/svx/source/svdraw/svdomeas.cxx b/svx/source/svdraw/svdomeas.cxx
index 560f27549bb1..a446be3d0efe 100644
--- a/svx/source/svdraw/svdomeas.cxx
+++ b/svx/source/svdraw/svdomeas.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: svdomeas.cxx,v $
- * $Revision: 1.35 $
+ * $Revision: 1.35.18.1 $
*
* This file is part of OpenOffice.org.
*
@@ -823,7 +823,7 @@ void SdrMeasureObj::TakeObjNamePlural(XubString& rName) const
rName=ImpGetResStr(STR_ObjNamePluralMEASURE);
}
-basegfx::B2DPolyPolygon SdrMeasureObj::TakeXorPoly(sal_Bool /*bDetail*/) const
+basegfx::B2DPolyPolygon SdrMeasureObj::TakeXorPoly() const
{
ImpMeasureRec aRec;
ImpMeasurePoly aMPol;
@@ -1239,7 +1239,7 @@ void SdrMeasureObj::RestGeoData(const SdrObjGeoData& rGeo)
SdrObject* SdrMeasureObj::DoConvertToPolyObj(BOOL bBezier) const
{
// get XOR Poly as base
- XPolyPolygon aTmpPolyPolygon(TakeXorPoly(TRUE));
+ XPolyPolygon aTmpPolyPolygon(TakeXorPoly());
// get local ItemSet and StyleSheet
SfxItemSet aSet(GetObjectItemSet());
diff --git a/svx/source/svdraw/svdopath.cxx b/svx/source/svdraw/svdopath.cxx
index 17a1025b536d..6dd5003ae2ef 100644
--- a/svx/source/svdraw/svdopath.cxx
+++ b/svx/source/svdraw/svdopath.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: svdopath.cxx,v $
- * $Revision: 1.51 $
+ * $Revision: 1.51.18.1 $
*
* This file is part of OpenOffice.org.
*
@@ -2043,7 +2043,7 @@ void SdrPathObj::TakeObjNamePlural(XubString& rName) const
}
}
-basegfx::B2DPolyPolygon SdrPathObj::TakeXorPoly(sal_Bool /*bDetail*/) const
+basegfx::B2DPolyPolygon SdrPathObj::TakeXorPoly() const
{
return GetPathPoly();
}
diff --git a/svx/source/svdraw/svdorect.cxx b/svx/source/svdraw/svdorect.cxx
index 44b71e5f7c16..a338889afa48 100644
--- a/svx/source/svdraw/svdorect.cxx
+++ b/svx/source/svdraw/svdorect.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: svdorect.cxx,v $
- * $Revision: 1.31 $
+ * $Revision: 1.31.18.1 $
*
* This file is part of OpenOffice.org.
*
@@ -364,7 +364,7 @@ void SdrRectObj::operator=(const SdrObject& rObj)
SdrTextObj::operator=(rObj);
}
-basegfx::B2DPolyPolygon SdrRectObj::TakeXorPoly(sal_Bool /*bDetail*/) const
+basegfx::B2DPolyPolygon SdrRectObj::TakeXorPoly() const
{
XPolyPolygon aXPP;
aXPP.Insert(ImpCalcXPoly(aRect,GetEckenradius()));
diff --git a/svx/source/svdraw/svdotext.cxx b/svx/source/svdraw/svdotext.cxx
index 64e70427d076..56c8366368df 100644
--- a/svx/source/svdraw/svdotext.cxx
+++ b/svx/source/svdraw/svdotext.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: svdotext.cxx,v $
- * $Revision: 1.90 $
+ * $Revision: 1.90.18.1 $
*
* This file is part of OpenOffice.org.
*
@@ -736,7 +736,7 @@ FASTBOOL SdrTextObj::NbcSetFitToSize(SdrFitToSizeType eFit)
void SdrTextObj::ImpSetContourPolygon( SdrOutliner& rOutliner, Rectangle& rAnchorRect, BOOL bLineWidth ) const
{
- basegfx::B2DPolyPolygon aXorPolyPolygon(TakeXorPoly(FALSE));
+ basegfx::B2DPolyPolygon aXorPolyPolygon(TakeXorPoly());
basegfx::B2DPolyPolygon* pContourPolyPolygon = 0L;
basegfx::B2DHomMatrix aMatrix;
@@ -1347,7 +1347,7 @@ void SdrTextObj::operator=(const SdrObject& rObj)
}
}
-basegfx::B2DPolyPolygon SdrTextObj::TakeXorPoly(sal_Bool /*bDetail*/) const
+basegfx::B2DPolyPolygon SdrTextObj::TakeXorPoly() const
{
Polygon aPol(aRect);
if (aGeo.nShearWink!=0) ShearPoly(aPol,aRect.TopLeft(),aGeo.nTan);
diff --git a/svx/source/svdraw/svdotextdecomposition.cxx b/svx/source/svdraw/svdotextdecomposition.cxx
index 8ebdb320e4de..25c743850bf2 100644
--- a/svx/source/svdraw/svdotextdecomposition.cxx
+++ b/svx/source/svdraw/svdotextdecomposition.cxx
@@ -8,7 +8,7 @@
*
* $RCSfile: svdotextdecomposition.cxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.2.18.2 $
*
* This file is part of OpenOffice.org.
*
@@ -90,6 +90,9 @@ namespace
basegfx::B2DHomMatrix maNewTransformA;
basegfx::B2DHomMatrix maNewTransformB;
+ // the visible area for contour text decomposition
+ basegfx::B2DVector maScale;
+
DECL_LINK(decomposeContourTextPrimitive, DrawPortionInfo* );
DECL_LINK(decomposeBlockTextPrimitive, DrawPortionInfo* );
DECL_LINK(decomposeStretchTextPrimitive, DrawPortionInfo* );
@@ -112,8 +115,9 @@ namespace
{
}
- void decomposeContourTextPrimitive(const basegfx::B2DHomMatrix& rNewTransformA, const basegfx::B2DHomMatrix& rNewTransformB)
+ void decomposeContourTextPrimitive(const basegfx::B2DHomMatrix& rNewTransformA, const basegfx::B2DHomMatrix& rNewTransformB, const basegfx::B2DVector& rScale)
{
+ maScale = rScale;
maNewTransformA = rNewTransformA;
maNewTransformB = rNewTransformB;
mrOutliner.SetDrawPortionHdl(LINK(this, impTextBreakupHandler, decomposeContourTextPrimitive));
@@ -511,7 +515,9 @@ namespace
IMPL_LINK(impTextBreakupHandler, decomposeContourTextPrimitive, DrawPortionInfo*, pInfo)
{
- if(pInfo)
+ // for contour text, ignore (clip away) all portions which are below
+ // the visible area given by maScale
+ if(pInfo && (double)pInfo->mrStartPos.Y() < maScale.getY())
{
impHandleDrawPortionInfo(*pInfo);
}
@@ -641,7 +647,7 @@ bool SdrTextObj::impDecomposeContourTextPrimitive(
// now break up text primitives.
impTextBreakupHandler aConverter(rOutliner);
- aConverter.decomposeContourTextPrimitive(aNewTransformA, aNewTransformB);
+ aConverter.decomposeContourTextPrimitive(aNewTransformA, aNewTransformB, aScale);
// cleanup outliner
rOutliner.Clear();
@@ -705,7 +711,7 @@ bool SdrTextObj::impDecomposeBlockTextPrimitive(
}
else
{
- if(IsTextFrame() && !rSdrBlockTextPrimitive.getUnlimitedPage())
+ if((rSdrBlockTextPrimitive.getWordWrap() || IsTextFrame()) && !rSdrBlockTextPrimitive.getUnlimitedPage())
{
rOutliner.SetMaxAutoPaperSize(aAnchorTextSize);
}
diff --git a/svx/source/svdraw/svdovirt.cxx b/svx/source/svdraw/svdovirt.cxx
index 3d191cfa78a8..aea0523c895b 100644
--- a/svx/source/svdraw/svdovirt.cxx
+++ b/svx/source/svdraw/svdovirt.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: svdovirt.cxx,v $
- * $Revision: 1.21 $
+ * $Revision: 1.21.18.1 $
*
* This file is part of OpenOffice.org.
*
@@ -215,9 +215,9 @@ void operator +=(PolyPolygon& rPoly, const Point& rOfs)
}
}
-basegfx::B2DPolyPolygon SdrVirtObj::TakeXorPoly(sal_Bool bDetail) const
+basegfx::B2DPolyPolygon SdrVirtObj::TakeXorPoly() const
{
- basegfx::B2DPolyPolygon aPolyPolygon(rRefObj.TakeXorPoly(bDetail));
+ basegfx::B2DPolyPolygon aPolyPolygon(rRefObj.TakeXorPoly());
if(aAnchor.X() || aAnchor.Y())
{
diff --git a/svx/source/svdraw/svdundo.cxx b/svx/source/svdraw/svdundo.cxx
index d851e3f4bb33..976f48c82194 100644
--- a/svx/source/svdraw/svdundo.cxx
+++ b/svx/source/svdraw/svdundo.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: svdundo.cxx,v $
- * $Revision: 1.31 $
+ * $Revision: 1.31.226.1 $
*
* This file is part of OpenOffice.org.
*
@@ -43,17 +43,12 @@
#include "svdglob.hxx" // StringCache
#include <svx/scene3d.hxx>
#include <svx/outlobj.hxx>
-
-// #i11426#
#include <svx/svdogrp.hxx>
#include <svx/sdr/properties/itemsettools.hxx>
#include <svx/sdr/properties/properties.hxx>
-
-// #109587#
#include <svx/svdocapt.hxx>
-
-// #109587#
#include <svtools/whiter.hxx>
+#include <svx/e3dsceneupdater.hxx>
#include "svdviter.hxx"
@@ -386,6 +381,7 @@ void SdrUndoAttrObj::SetRepeatAttr(const SfxItemSet& rSet)
void SdrUndoAttrObj::Undo()
{
+ E3DModifySceneSnapRectUpdater aUpdater(pObj);
BOOL bIs3DScene(pObj && pObj->ISA(E3dScene));
// #94278# Trigger PageChangeCall
@@ -486,6 +482,7 @@ void SdrUndoAttrObj::Undo()
void SdrUndoAttrObj::Redo()
{
+ E3DModifySceneSnapRectUpdater aUpdater(pObj);
BOOL bIs3DScene(pObj && pObj->ISA(E3dScene));
if(!pUndoGroup || bIs3DScene)
@@ -777,6 +774,7 @@ void SdrUndoRemoveObj::Undo()
aOwnerAnchorPos = pObjList->GetOwnerObj()->GetAnchorPos();
}
+ E3DModifySceneSnapRectUpdater aUpdater(pObjList->GetOwnerObj());
SdrInsertReason aReason(SDRREASON_UNDO);
pObjList->InsertObject(pObj,nOrdNum,&aReason);
@@ -785,13 +783,6 @@ void SdrUndoRemoveObj::Undo()
{
pObj->NbcSetAnchorPos(aOwnerAnchorPos);
}
-
- if(pObjList->GetOwnerObj() && pObjList->GetOwnerObj()->ISA(E3dObject) && pObj->ISA(E3dObject))
- {
- E3dScene* pScene = ((E3dObject*)pObjList->GetOwnerObj())->GetScene();
- if(pScene)
- pScene->CorrectSceneDimensions();
- }
}
}
@@ -801,18 +792,8 @@ void SdrUndoRemoveObj::Redo()
if (pObj->IsInserted())
{
ImplUnmarkObject( pObj );
-
-#ifdef DBG_UTIL
- SdrObject* pChkObj=
-#endif
+ E3DModifySceneSnapRectUpdater aUpdater(pObj);
pObjList->RemoveObject(nOrdNum);
- DBG_ASSERT(pChkObj==pObj,"RedoRemoveObj: RemoveObjNum!=pObj");
- if(pObjList->GetOwnerObj() && pObjList->GetOwnerObj()->ISA(E3dObject) && pObj->ISA(E3dObject))
- {
- E3dScene* pScene = ((E3dObject*)pObjList->GetOwnerObj())->GetScene();
- if(pScene)
- pScene->CorrectSceneDimensions();
- }
}
// #94278# Trigger PageChangeCall
@@ -836,12 +817,6 @@ void SdrUndoInsertObj::Undo()
#endif
pObjList->RemoveObject(nOrdNum);
DBG_ASSERT(pChkObj==pObj,"UndoInsertObj: RemoveObjNum!=pObj");
- if(pObjList->GetOwnerObj() && pObjList->GetOwnerObj()->ISA(E3dObject) && pObj->ISA(E3dObject))
- {
- E3dScene* pScene = ((E3dObject*)pObjList->GetOwnerObj())->GetScene();
- if(pScene)
- pScene->CorrectSceneDimensions();
- }
}
}
@@ -871,13 +846,6 @@ void SdrUndoInsertObj::Redo()
pObj->NbcSetAnchorPos( aAnchorPos );
}
// <--
-
- if(pObjList->GetOwnerObj() && pObjList->GetOwnerObj()->ISA(E3dObject) && pObj->ISA(E3dObject))
- {
- E3dScene* pScene = ((E3dObject*)pObjList->GetOwnerObj())->GetScene();
- if(pScene)
- pScene->CorrectSceneDimensions();
- }
}
// #94278# Trigger PageChangeCall
diff --git a/svx/source/svdraw/svdview.cxx b/svx/source/svdraw/svdview.cxx
index 355f0a261615..465b5be209c3 100644
--- a/svx/source/svdraw/svdview.cxx
+++ b/svx/source/svdraw/svdview.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: svdview.cxx,v $
- * $Revision: 1.29 $
+ * $Revision: 1.29.18.1 $
*
* This file is part of OpenOffice.org.
*
@@ -123,7 +123,7 @@ void SdrDropMarkerOverlay::ImplCreateOverlays(const SdrView& rView, const basegf
SdrDropMarkerOverlay::SdrDropMarkerOverlay(const SdrView& rView, const SdrObject& rObject)
{
- ImplCreateOverlays(rView, rObject.TakeXorPoly(true));
+ ImplCreateOverlays(rView, rObject.TakeXorPoly());
}
SdrDropMarkerOverlay::SdrDropMarkerOverlay(const SdrView& rView, const Rectangle& rRectangle)
diff --git a/svx/source/svdraw/svdxcgv.cxx b/svx/source/svdraw/svdxcgv.cxx
index d5cb7f8951a4..207faa7d78ea 100644
--- a/svx/source/svdraw/svdxcgv.cxx
+++ b/svx/source/svdraw/svdxcgv.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: svdxcgv.cxx,v $
- * $Revision: 1.34 $
+ * $Revision: 1.34.18.1 $
*
* This file is part of OpenOffice.org.
*
@@ -665,8 +665,9 @@ Graphic SdrExchangeView::GetObjGraphic( SdrModel* pModel, SdrObject* pObj )
aMtf.Record( &aOut );
// aXOut.SetOffset( Point( -aBoundRect.Left(), -aBoundRect.Top() ) );
+ // #i92760# offset set in wrong direction, corrected
MapMode aOffsetMapMode(aOut.GetMapMode());
- aOffsetMapMode.SetOrigin(aBoundRect.TopLeft());
+ aOffsetMapMode.SetOrigin(Point(-aBoundRect.Left(), -aBoundRect.Top()));
aOut.SetMapMode(aOffsetMapMode);
pObj->SingleObjectPainter( aOut ); // #110094#-17