summaryrefslogtreecommitdiff
path: root/svx/source/svdraw/svdotxdr.cxx
diff options
context:
space:
mode:
authorIvo Hinkelmann <ihi@openoffice.org>2006-11-14 12:47:21 +0000
committerIvo Hinkelmann <ihi@openoffice.org>2006-11-14 12:47:21 +0000
commit8743850ee90cd6ab4175e05fce60e1eaa2e12178 (patch)
tree214b265d67e560c1a9cc77cc8699cc36fdcbf277 /svx/source/svdraw/svdotxdr.cxx
parentcf68040125716b71e035b2260d4c7a1a39f22a31 (diff)
INTEGRATION: CWS aw024 (1.1.1.1.1214); FILE MERGED
2006/10/27 12:14:14 aw 1.1.1.1.1214.7: #i39528# ::basegfx -> basegfx adaption 2006/09/21 19:31:50 aw 1.1.1.1.1214.6: RESYNC: (1.4-1.5); FILE MERGED 2006/07/04 13:18:32 aw 1.1.1.1.1214.5: RESYNC: (1.3-1.4); FILE MERGED 2005/11/18 17:06:52 aw 1.1.1.1.1214.4: RESYNC: (1.2-1.3); FILE MERGED 2005/09/18 05:08:06 aw 1.1.1.1.1214.3: RESYNC: (1.1.1.1-1.2); FILE MERGED 2005/05/19 12:31:37 aw 1.1.1.1.1214.2: #i39529# 2005/04/26 15:04:31 aw 1.1.1.1.1214.1: #i39528#
Diffstat (limited to 'svx/source/svdraw/svdotxdr.cxx')
-rw-r--r--svx/source/svdraw/svdotxdr.cxx52
1 files changed, 39 insertions, 13 deletions
diff --git a/svx/source/svdraw/svdotxdr.cxx b/svx/source/svdraw/svdotxdr.cxx
index a50d04b4ca58..f90cf5f2275d 100644
--- a/svx/source/svdraw/svdotxdr.cxx
+++ b/svx/source/svdraw/svdotxdr.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: svdotxdr.cxx,v $
*
- * $Revision: 1.5 $
+ * $Revision: 1.6 $
*
- * last change: $Author: obo $ $Date: 2006-09-17 05:57:31 $
+ * last change: $Author: ihi $ $Date: 2006-11-14 13:47:21 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -49,6 +49,18 @@
#include <tools/bigint.hxx>
#endif
+#ifndef _BGFX_POLYGON_B2DPOLYGON_HXX
+#include <basegfx/polygon/b2dpolygon.hxx>
+#endif
+
+#ifndef _BGFX_RANGE_B2DRANGE_HXX
+#include <basegfx/range/b2drange.hxx>
+#endif
+
+#ifndef _BGFX_POLYGON_B2DPOLYGONTOOLS_HXX
+#include <basegfx/polygon/b2dpolygontools.hxx>
+#endif
+
////////////////////////////////////////////////////////////////////////////////////////////////////
//
// @@@@@@ @@@@@ @@ @@ @@@@@@ @@@@ @@@@@ @@@@@@
@@ -63,12 +75,12 @@
//
////////////////////////////////////////////////////////////////////////////////////////////////////
-USHORT SdrTextObj::GetHdlCount() const
+sal_uInt32 SdrTextObj::GetHdlCount() const
{
- return 8;
+ return 8L;
}
-SdrHdl* SdrTextObj::GetHdl(USHORT nHdlNum) const
+SdrHdl* SdrTextObj::GetHdl(sal_uInt32 nHdlNum) const
{
SdrHdl* pH=NULL;
Point aPnt;
@@ -244,18 +256,24 @@ XubString SdrTextObj::GetDragComment(const SdrDragStat& /*rDrag*/, FASTBOOL /*bU
return aStr;
}
-void SdrTextObj::TakeDragPoly(const SdrDragStat& rDrag, XPolyPolygon& rXPP) const
+basegfx::B2DPolyPolygon SdrTextObj::TakeDragPoly(const SdrDragStat& rDrag) const
{
- rXPP.Clear();
+ XPolyPolygon aXPP;
Rectangle aTmpRect(ImpDragCalcRect(rDrag));
- if (aGeo.nDrehWink!=0 || aGeo.nShearWink!=0) {
+
+ if(aGeo.nDrehWink || aGeo.nShearWink)
+ {
Polygon aPoly(aTmpRect);
if (aGeo.nShearWink!=0) ShearPoly(aPoly,aRect.TopLeft(),aGeo.nTan);
if (aGeo.nDrehWink!=0) RotatePoly(aPoly,aRect.TopLeft(),aGeo.nSin,aGeo.nCos);
- rXPP.Insert(XPolygon(aPoly));
- } else {
- rXPP.Insert(XPolygon(aTmpRect));
+ aXPP.Insert(XPolygon(aPoly));
+ }
+ else
+ {
+ aXPP.Insert(XPolygon(aTmpRect));
}
+
+ return aXPP.getB2DPolyPolygon();
}
////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -264,6 +282,10 @@ void SdrTextObj::TakeDragPoly(const SdrDragStat& rDrag, XPolyPolygon& rXPP) cons
FASTBOOL SdrTextObj::BegCreate(SdrDragStat& rStat)
{
rStat.SetOrtho4Possible();
+ Rectangle aRect1(rStat.GetStart(), rStat.GetNow());
+ aRect1.Justify();
+ rStat.SetActionRect(aRect1);
+ aRect = aRect1;
return TRUE;
}
@@ -318,12 +340,16 @@ FASTBOOL SdrTextObj::BckCreate(SdrDragStat& /*rStat*/)
return TRUE;
}
-void SdrTextObj::TakeCreatePoly(const SdrDragStat& rDrag, XPolyPolygon& rXPP) const
+basegfx::B2DPolyPolygon SdrTextObj::TakeCreatePoly(const SdrDragStat& rDrag) const
{
Rectangle aRect1;
rDrag.TakeCreateRect(aRect1);
aRect1.Justify();
- rXPP=XPolyPolygon(XPolygon(aRect1));
+
+ basegfx::B2DPolyPolygon aRetval;
+ const basegfx::B2DRange aRange(aRect1.Left(), aRect1.Top(), aRect1.Right(), aRect1.Bottom());
+ aRetval.append(basegfx::tools::createPolygonFromRect(aRange));
+ return aRetval;
}
Pointer SdrTextObj::GetCreatePointer() const