summaryrefslogtreecommitdiff
path: root/svx/source
diff options
context:
space:
mode:
Diffstat (limited to 'svx/source')
-rw-r--r--svx/source/dialog/framelinkarray.cxx5
-rw-r--r--svx/source/dialog/pagectrl.cxx13
-rw-r--r--svx/source/sdr/contact/objectcontactofpageview.cxx9
-rw-r--r--svx/source/sdr/contact/viewcontactofgraphic.cxx6
-rw-r--r--svx/source/sdr/contact/viewcontactofgroup.cxx6
-rw-r--r--svx/source/sdr/contact/viewcontactofpageobj.cxx3
-rw-r--r--svx/source/sdr/contact/viewcontactofsdrcaptionobj.cxx5
-rw-r--r--svx/source/sdr/contact/viewcontactofsdrcircobj.cxx6
-rw-r--r--svx/source/sdr/contact/viewcontactofsdrmediaobj.cxx5
-rw-r--r--svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx11
-rw-r--r--svx/source/sdr/contact/viewcontactofsdrole2obj.cxx5
-rw-r--r--svx/source/sdr/contact/viewcontactofsdrpathobj.cxx5
-rw-r--r--svx/source/sdr/contact/viewcontactofsdrrectobj.cxx5
-rw-r--r--svx/source/sdr/contact/viewcontactofunocontrol.cxx6
-rw-r--r--svx/source/sdr/contact/viewobjectcontactofpageobj.cxx5
-rw-r--r--svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx8
-rw-r--r--svx/source/sdr/overlay/overlaymanager.cxx5
-rw-r--r--svx/source/sidebar/possize/PosSizePropertyPanel.cxx5
-rw-r--r--svx/source/svdraw/gradtrns.cxx5
-rw-r--r--svx/source/svdraw/svddrgmt.cxx5
-rw-r--r--svx/source/svdraw/svdedxv.cxx9
-rw-r--r--svx/source/svdraw/svdfmtf.cxx7
-rw-r--r--svx/source/svdraw/svdobj.cxx7
-rw-r--r--svx/source/svdraw/svdocapt.cxx3
-rw-r--r--svx/source/svdraw/svdocirc.cxx3
-rw-r--r--svx/source/svdraw/svdogrp.cxx3
-rw-r--r--svx/source/svdraw/svdotxdr.cxx3
-rw-r--r--svx/source/table/svdotable.cxx2
-rw-r--r--svx/source/table/tablehandles.cxx2
-rw-r--r--svx/source/table/viewcontactoftableobj.cxx11
30 files changed, 71 insertions, 102 deletions
diff --git a/svx/source/dialog/framelinkarray.cxx b/svx/source/dialog/framelinkarray.cxx
index 9185e49ecd22..e0a2e93b9376 100644
--- a/svx/source/dialog/framelinkarray.cxx
+++ b/svx/source/dialog/framelinkarray.cxx
@@ -24,6 +24,7 @@
#include <set>
#include <algorithm>
#include <tools/debug.hxx>
+#include <vcl/canvastools.hxx>
#include <vcl/outdev.hxx>
#include <drawinglayer/primitive2d/borderlineprimitive2d.hxx>
#include <svx/sdr/primitive2d/sdrframeborderprimitive2d.hxx>
@@ -872,7 +873,7 @@ basegfx::B2DRange Array::GetCellRange( size_t nCol, size_t nRow, bool bExpandMer
aRect.AdjustBottom(rCell.mnAddBottom );
}
- return basegfx::B2DRange(aRect.Left(), aRect.Top(), aRect.Right(), aRect.Bottom());
+ return vcl::unotools::b2DRectangleFromRectangle(aRect);
}
else
{
@@ -880,7 +881,7 @@ basegfx::B2DRange Array::GetCellRange( size_t nCol, size_t nRow, bool bExpandMer
const Size aSize( GetColWidth( nCol, nCol ) + 1, GetRowHeight( nRow, nRow ) + 1 );
const tools::Rectangle aRect(aPoint, aSize);
- return basegfx::B2DRange(aRect.Left(), aRect.Top(), aRect.Right(), aRect.Bottom());
+ return vcl::unotools::b2DRectangleFromRectangle(aRect);
}
}
diff --git a/svx/source/dialog/pagectrl.cxx b/svx/source/dialog/pagectrl.cxx
index 56f4216ff298..d7b100253d0a 100644
--- a/svx/source/dialog/pagectrl.cxx
+++ b/svx/source/dialog/pagectrl.cxx
@@ -19,6 +19,7 @@
#include <memory>
#include <vcl/bitmap.hxx>
+#include <vcl/canvastools.hxx>
#include <vcl/settings.hxx>
#include <tools/fract.hxx>
#include <editeng/frmdiritem.hxx>
@@ -325,21 +326,13 @@ void SvxPageWindow::drawFillAttributes(vcl::RenderContext& rRenderContext,
const tools::Rectangle& rPaintRange,
const tools::Rectangle& rDefineRange)
{
- const basegfx::B2DRange aPaintRange(
- rPaintRange.Left(),
- rPaintRange.Top(),
- rPaintRange.Right(),
- rPaintRange.Bottom());
+ const basegfx::B2DRange aPaintRange = vcl::unotools::b2DRectangleFromRectangle(rPaintRange);
if(!aPaintRange.isEmpty() &&
!basegfx::fTools::equalZero(aPaintRange.getWidth()) &&
!basegfx::fTools::equalZero(aPaintRange.getHeight()))
{
- const basegfx::B2DRange aDefineRange(
- rDefineRange.Left(),
- rDefineRange.Top(),
- rDefineRange.Right(),
- rDefineRange.Bottom());
+ const basegfx::B2DRange aDefineRange = vcl::unotools::b2DRectangleFromRectangle(rDefineRange);
// prepare primitive sequence
drawinglayer::primitive2d::Primitive2DContainer aSequence;
diff --git a/svx/source/sdr/contact/objectcontactofpageview.cxx b/svx/source/sdr/contact/objectcontactofpageview.cxx
index 92b0153f072d..3bda11b111f6 100644
--- a/svx/source/sdr/contact/objectcontactofpageview.cxx
+++ b/svx/source/sdr/contact/objectcontactofpageview.cxx
@@ -37,6 +37,7 @@
#include <drawinglayer/processor2d/processor2dtools.hxx>
#include <svx/unoapi.hxx>
#include <unotools/configmgr.hxx>
+#include <vcl/canvastools.hxx>
#include <comphelper/lok.hxx>
#include <eventhandler.hxx>
@@ -179,9 +180,7 @@ namespace sdr
// export, so why not do it always
const tools::Rectangle aLogicClipRectangle(rDisplayInfo.GetRedrawArea().GetBoundRect());
- aViewRange = basegfx::B2DRange(
- aLogicClipRectangle.Left(), aLogicClipRectangle.Top(),
- aLogicClipRectangle.Right(), aLogicClipRectangle.Bottom());
+ aViewRange = vcl::unotools::b2DRectangleFromRectangle(aLogicClipRectangle);
}
}
else
@@ -193,9 +192,7 @@ namespace sdr
{
// get logic clip range and create discrete one
const tools::Rectangle aLogicClipRectangle(rDisplayInfo.GetRedrawArea().GetBoundRect());
- basegfx::B2DRange aLogicClipRange(
- aLogicClipRectangle.Left(), aLogicClipRectangle.Top(),
- aLogicClipRectangle.Right(), aLogicClipRectangle.Bottom());
+ basegfx::B2DRange aLogicClipRange = vcl::unotools::b2DRectangleFromRectangle(aLogicClipRectangle);
basegfx::B2DRange aDiscreteClipRange(aLogicClipRange);
aDiscreteClipRange.transform(rTargetOutDev.GetViewTransformation());
diff --git a/svx/source/sdr/contact/viewcontactofgraphic.cxx b/svx/source/sdr/contact/viewcontactofgraphic.cxx
index 2892b3e63eff..80b575585db9 100644
--- a/svx/source/sdr/contact/viewcontactofgraphic.cxx
+++ b/svx/source/sdr/contact/viewcontactofgraphic.cxx
@@ -29,6 +29,7 @@
#include <svx/sdr/contact/objectcontact.hxx>
#include <basegfx/matrix/b2dhommatrix.hxx>
#include <sdr/primitive2d/sdrgrafprimitive2d.hxx>
+#include <vcl/canvastools.hxx>
#include <vcl/svapp.hxx>
#include <vcl/settings.hxx>
#include <basegfx/polygon/b2dpolygontools.hxx>
@@ -310,10 +311,7 @@ namespace sdr
// take unrotated snap rect for position and size. Directly use model data, not getBoundRect() or getSnapRect()
// which will use the primitive data we just create in the near future
- const tools::Rectangle aRectangle(GetGrafObject().GetGeoRect());
- const ::basegfx::B2DRange aObjectRange(
- aRectangle.Left(), aRectangle.Top(),
- aRectangle.Right(), aRectangle.Bottom());
+ const ::basegfx::B2DRange aObjectRange = vcl::unotools::b2DRectangleFromRectangle(GetGrafObject().GetGeoRect());
// look for mirroring
const GeoStat& rGeoStat(GetGrafObject().GetGeoStat());
diff --git a/svx/source/sdr/contact/viewcontactofgroup.cxx b/svx/source/sdr/contact/viewcontactofgroup.cxx
index 3aa1b9302b08..46561001adf7 100644
--- a/svx/source/sdr/contact/viewcontactofgroup.cxx
+++ b/svx/source/sdr/contact/viewcontactofgroup.cxx
@@ -28,6 +28,7 @@
#include <drawinglayer/primitive2d/polygonprimitive2d.hxx>
#include <drawinglayer/primitive2d/sdrdecompositiontools2d.hxx>
#include <tools/debug.hxx>
+#include <vcl/canvastools.hxx>
namespace sdr
@@ -72,10 +73,7 @@ namespace sdr
else
{
// append an invisible outline for the cases where no visible content exists
- const tools::Rectangle aCurrentBoundRect(GetSdrObjGroup().GetLastBoundRect());
- const basegfx::B2DRange aCurrentRange(
- aCurrentBoundRect.Left(), aCurrentBoundRect.Top(),
- aCurrentBoundRect.Right(), aCurrentBoundRect.Bottom());
+ const basegfx::B2DRange aCurrentRange = vcl::unotools::b2DRectangleFromRectangle(GetSdrObjGroup().GetLastBoundRect());
const drawinglayer::primitive2d::Primitive2DReference xReference(
drawinglayer::primitive2d::createHiddenGeometryPrimitives2D(
diff --git a/svx/source/sdr/contact/viewcontactofpageobj.cxx b/svx/source/sdr/contact/viewcontactofpageobj.cxx
index a79c8e70c073..3032bfdb95a1 100644
--- a/svx/source/sdr/contact/viewcontactofpageobj.cxx
+++ b/svx/source/sdr/contact/viewcontactofpageobj.cxx
@@ -20,6 +20,7 @@
#include <svx/sdr/contact/viewcontactofpageobj.hxx>
#include <svx/svdopage.hxx>
#include <svx/sdr/contact/displayinfo.hxx>
+#include <vcl/canvastools.hxx>
#include <vcl/outdev.hxx>
#include <svx/svdmodel.hxx>
#include <svx/svdpage.hxx>
@@ -70,7 +71,7 @@ drawinglayer::primitive2d::Primitive2DContainer ViewContactOfPageObj::createView
// create a replacement graphic visualisation here. Use GetLastBoundRect to access the model data directly
// which is aOutRect for SdrPageObj.
const tools::Rectangle aModelRectangle(GetPageObj().GetLastBoundRect());
- const basegfx::B2DRange aModelRange(aModelRectangle.Left(), aModelRectangle.Top(), aModelRectangle.Right(), aModelRectangle.Bottom());
+ const basegfx::B2DRange aModelRange = vcl::unotools::b2DRectangleFromRectangle(aModelRectangle);
const basegfx::B2DPolygon aOutline(basegfx::utils::createPolygonFromRect(aModelRange));
const basegfx::BColor aYellow(1.0, 1.0, 0.0);
const drawinglayer::primitive2d::Primitive2DReference xReference(new drawinglayer::primitive2d::PolygonHairlinePrimitive2D(aOutline, aYellow));
diff --git a/svx/source/sdr/contact/viewcontactofsdrcaptionobj.cxx b/svx/source/sdr/contact/viewcontactofsdrcaptionobj.cxx
index 8fe42c1fa6de..83aab2dfc687 100644
--- a/svx/source/sdr/contact/viewcontactofsdrcaptionobj.cxx
+++ b/svx/source/sdr/contact/viewcontactofsdrcaptionobj.cxx
@@ -35,6 +35,7 @@
#include <basegfx/polygon/b2dpolygontools.hxx>
#include <svx/sdr/primitive2d/sdrdecompositiontools.hxx>
#include <basegfx/polygon/b2dpolygonclipper.hxx>
+#include <vcl/canvastools.hxx>
using namespace com::sun::star;
@@ -64,9 +65,7 @@ namespace sdr
// take unrotated snap rect (direct model data) for position and size
const tools::Rectangle aRectangle(rCaptionObj.GetGeoRect());
- const ::basegfx::B2DRange aObjectRange(
- aRectangle.Left(), aRectangle.Top(),
- aRectangle.Right(), aRectangle.Bottom());
+ const ::basegfx::B2DRange aObjectRange = vcl::unotools::b2DRectangleFromRectangle(aRectangle);
const GeoStat& rGeoStat(rCaptionObj.GetGeoStat());
// fill object matrix
diff --git a/svx/source/sdr/contact/viewcontactofsdrcircobj.cxx b/svx/source/sdr/contact/viewcontactofsdrcircobj.cxx
index 8d796643386d..6b1253d57ee0 100644
--- a/svx/source/sdr/contact/viewcontactofsdrcircobj.cxx
+++ b/svx/source/sdr/contact/viewcontactofsdrcircobj.cxx
@@ -25,6 +25,7 @@
#include <svl/itemset.hxx>
#include <svx/sxciaitm.hxx>
#include <basegfx/matrix/b2dhommatrixtools.hxx>
+#include <vcl/canvastools.hxx>
namespace sdr
@@ -50,10 +51,7 @@ namespace sdr
false));
// take unrotated snap rect (direct model data) for position and size
- const tools::Rectangle aRectangle(GetCircObj().GetGeoRect());
- const basegfx::B2DRange aObjectRange(
- aRectangle.Left(), aRectangle.Top(),
- aRectangle.Right(), aRectangle.Bottom() );
+ const basegfx::B2DRange aObjectRange = vcl::unotools::b2DRectangleFromRectangle(GetCircObj().GetGeoRect());
const GeoStat& rGeoStat(GetCircObj().GetGeoStat());
// fill object matrix
diff --git a/svx/source/sdr/contact/viewcontactofsdrmediaobj.cxx b/svx/source/sdr/contact/viewcontactofsdrmediaobj.cxx
index bda8a934109f..80373d8df122 100644
--- a/svx/source/sdr/contact/viewcontactofsdrmediaobj.cxx
+++ b/svx/source/sdr/contact/viewcontactofsdrmediaobj.cxx
@@ -23,6 +23,7 @@
#include <sdr/contact/viewobjectcontactofsdrmediaobj.hxx>
#include <drawinglayer/primitive2d/mediaprimitive2d.hxx>
#include <avmedia/mediawindow.hxx>
+#include <vcl/canvastools.hxx>
namespace sdr { namespace contact {
@@ -101,9 +102,7 @@ drawinglayer::primitive2d::Primitive2DContainer ViewContactOfSdrMediaObj::create
// create range using the model data directly. This is in SdrTextObj::aRect which i will access using
// GetGeoRect() to not trigger any calculations. It's the unrotated geometry which is okay for MediaObjects ATM.
const tools::Rectangle aRectangle(GetSdrMediaObj().GetGeoRect());
- const basegfx::B2DRange aRange(
- aRectangle.Left(), aRectangle.Top(),
- aRectangle.Right(), aRectangle.Bottom());
+ const basegfx::B2DRange aRange = vcl::unotools::b2DRectangleFromRectangle(aRectangle);
// create object transform
basegfx::B2DHomMatrix aTransform;
diff --git a/svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx b/svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx
index 5c4bb784c515..c4af096a0d13 100644
--- a/svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx
+++ b/svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx
@@ -28,6 +28,7 @@
#include <basegfx/matrix/b2dhommatrixtools.hxx>
#include <svx/obj3d.hxx>
#include <drawinglayer/primitive2d/sdrdecompositiontools2d.hxx>
+#include <vcl/canvastools.hxx>
namespace sdr
@@ -48,10 +49,8 @@ namespace sdr
const tools::Rectangle aObjectBound(GetCustomShapeObj().GetGeoRect());
tools::Rectangle aTextBound(aObjectBound);
GetCustomShapeObj().GetTextBounds(aTextBound);
- basegfx::B2DRange aTextRange(aTextBound.Left(), aTextBound.Top(), aTextBound.Right(), aTextBound.Bottom());
- const basegfx::B2DRange aObjectRange(
- aObjectBound.Left(), aObjectBound.Top(),
- aObjectBound.Right(), aObjectBound.Bottom());
+ basegfx::B2DRange aTextRange = vcl::unotools::b2DRectangleFromRectangle(aTextBound);
+ const basegfx::B2DRange aObjectRange = vcl::unotools::b2DRectangleFromRectangle(aObjectBound);
// no need to correct if no extra text range
if(aTextRange != aObjectRange)
@@ -151,9 +150,7 @@ namespace sdr
// take unrotated snap rect as default, then get the
// unrotated text box. Rotation needs to be done centered
const tools::Rectangle aObjectBound(GetCustomShapeObj().GetGeoRect());
- const basegfx::B2DRange aObjectRange(
- aObjectBound.Left(), aObjectBound.Top(),
- aObjectBound.Right(), aObjectBound.Bottom());
+ const basegfx::B2DRange aObjectRange = vcl::unotools::b2DRectangleFromRectangle(aObjectBound);
// #i101684# get the text range unrotated and absolute to the object range
const basegfx::B2DRange aTextRange(getCorrectedTextBoundRect());
diff --git a/svx/source/sdr/contact/viewcontactofsdrole2obj.cxx b/svx/source/sdr/contact/viewcontactofsdrole2obj.cxx
index 6a13aaef8682..fdd64bee1243 100644
--- a/svx/source/sdr/contact/viewcontactofsdrole2obj.cxx
+++ b/svx/source/sdr/contact/viewcontactofsdrole2obj.cxx
@@ -28,6 +28,7 @@
#include <drawinglayer/primitive2d/bitmapprimitive2d.hxx>
#include <svtools/colorcfg.hxx>
#include <svx/sdr/primitive2d/sdrattributecreator.hxx>
+#include <vcl/canvastools.hxx>
#include <vcl/svapp.hxx>
#include <sdr/primitive2d/sdrolecontentprimitive2d.hxx>
#include <basegfx/matrix/b2dhommatrixtools.hxx>
@@ -61,9 +62,7 @@ basegfx::B2DHomMatrix ViewContactOfSdrOle2Obj::createObjectTransform() const
{
// take unrotated snap rect (direct model data) for position and size
const tools::Rectangle aRectangle(GetOle2Obj().GetGeoRect());
- const basegfx::B2DRange aObjectRange(
- aRectangle.Left(), aRectangle.Top(),
- aRectangle.Right(), aRectangle.Bottom());
+ const basegfx::B2DRange aObjectRange = vcl::unotools::b2DRectangleFromRectangle(aRectangle);
// create object matrix
const GeoStat& rGeoStat(GetOle2Obj().GetGeoStat());
diff --git a/svx/source/sdr/contact/viewcontactofsdrpathobj.cxx b/svx/source/sdr/contact/viewcontactofsdrpathobj.cxx
index 28942f7b04de..082abb6a0e27 100644
--- a/svx/source/sdr/contact/viewcontactofsdrpathobj.cxx
+++ b/svx/source/sdr/contact/viewcontactofsdrpathobj.cxx
@@ -27,6 +27,7 @@
#include <sdr/primitive2d/sdrpathprimitive2d.hxx>
#include <basegfx/matrix/b2dhommatrixtools.hxx>
#include <basegfx/polygon/b2dpolygontools.hxx>
+#include <vcl/canvastools.hxx>
namespace sdr
{
@@ -177,9 +178,7 @@ namespace sdr
aUnitDefinitionPolyPolygon.append(
basegfx::utils::createPolygonFromRect(
- basegfx::B2DRange(
- rSnapRect.Left(), rSnapRect.Top(),
- rSnapRect.Right(), rSnapRect.Bottom())));
+ vcl::unotools::b2DRectangleFromRectangle(rSnapRect)));
// use same coordinate system as the shape geometry -> this
// makes it relative to shape's unit geometry and thus freely
diff --git a/svx/source/sdr/contact/viewcontactofsdrrectobj.cxx b/svx/source/sdr/contact/viewcontactofsdrrectobj.cxx
index 34734f96e1cd..3e51de1ed3c7 100644
--- a/svx/source/sdr/contact/viewcontactofsdrrectobj.cxx
+++ b/svx/source/sdr/contact/viewcontactofsdrrectobj.cxx
@@ -25,6 +25,7 @@
#include <sdr/primitive2d/sdrprimitivetools.hxx>
#include <basegfx/matrix/b2dhommatrixtools.hxx>
#include <svx/svdmodel.hxx>
+#include <vcl/canvastools.hxx>
namespace sdr { namespace contact {
@@ -48,9 +49,7 @@ drawinglayer::primitive2d::Primitive2DContainer ViewContactOfSdrRectObj::createV
// take unrotated snap rect (direct model data) for position and size
const tools::Rectangle aRectangle(GetRectObj().GetGeoRect());
- const ::basegfx::B2DRange aObjectRange(
- aRectangle.Left(), aRectangle.Top(),
- aRectangle.Right(), aRectangle.Bottom() );
+ const ::basegfx::B2DRange aObjectRange = vcl::unotools::b2DRectangleFromRectangle(aRectangle);
const GeoStat& rGeoStat(GetRectObj().GetGeoStat());
diff --git a/svx/source/sdr/contact/viewcontactofunocontrol.cxx b/svx/source/sdr/contact/viewcontactofunocontrol.cxx
index 78bdce4d6c2e..2c34c56a7c07 100644
--- a/svx/source/sdr/contact/viewcontactofunocontrol.cxx
+++ b/svx/source/sdr/contact/viewcontactofunocontrol.cxx
@@ -30,6 +30,7 @@
#include <svx/sdrpaintwindow.hxx>
#include <tools/diagnose_ex.h>
+#include <vcl/canvastools.hxx>
#include <vcl/pdfextoutdevdata.hxx>
#include <basegfx/matrix/b2dhommatrix.hxx>
#include <drawinglayer/primitive2d/controlprimitive2d.hxx>
@@ -94,10 +95,7 @@ namespace sdr { namespace contact {
// create range. Use model data directly, not getBoundRect()/getSnapRect; these will use
// the primitive data themselves in the long run. Use SdrUnoObj's (which is a SdrRectObj)
// call to GetGeoRect() to access SdrTextObj::aRect directly and without executing anything
- const tools::Rectangle aRectangle(GetSdrUnoObj().GetGeoRect());
- const basegfx::B2DRange aRange(
- aRectangle.Left(), aRectangle.Top(),
- aRectangle.Right(), aRectangle.Bottom());
+ const basegfx::B2DRange aRange = vcl::unotools::b2DRectangleFromRectangle(GetSdrUnoObj().GetGeoRect());
// create object transform
basegfx::B2DHomMatrix aTransform;
diff --git a/svx/source/sdr/contact/viewobjectcontactofpageobj.cxx b/svx/source/sdr/contact/viewobjectcontactofpageobj.cxx
index 9acef8175f33..ef2247a746e0 100644
--- a/svx/source/sdr/contact/viewobjectcontactofpageobj.cxx
+++ b/svx/source/sdr/contact/viewobjectcontactofpageobj.cxx
@@ -32,6 +32,7 @@
#include <svx/unoapi.hxx>
#include <drawinglayer/primitive2d/pagepreviewprimitive2d.hxx>
#include <drawinglayer/primitive2d/sdrdecompositiontools2d.hxx>
+#include <vcl/canvastools.hxx>
using namespace com::sun::star;
@@ -192,9 +193,7 @@ drawinglayer::primitive2d::Primitive2DContainer ViewObjectContactOfPageObj::crea
basegfx::B2DHomMatrix aPageObjectTransform;
{
const tools::Rectangle aPageObjectModelData(rPageObject.GetLastBoundRect());
- const basegfx::B2DRange aPageObjectBound(
- aPageObjectModelData.Left(), aPageObjectModelData.Top(),
- aPageObjectModelData.Right(), aPageObjectModelData.Bottom());
+ const basegfx::B2DRange aPageObjectBound = vcl::unotools::b2DRectangleFromRectangle(aPageObjectModelData);
aPageObjectTransform.set(0, 0, aPageObjectBound.getWidth());
aPageObjectTransform.set(1, 1, aPageObjectBound.getHeight());
diff --git a/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx b/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx
index d188ce4d2243..bd22d412cffc 100644
--- a/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx
+++ b/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx
@@ -45,6 +45,7 @@
#include <com/sun/star/container/XContainerListener.hpp>
#include <com/sun/star/container/XContainer.hpp>
+#include <vcl/canvastools.hxx>
#include <vcl/svapp.hxx>
#include <comphelper/processfactory.hxx>
#include <comphelper/scopeguard.hxx>
@@ -1482,12 +1483,7 @@ namespace sdr { namespace contact {
// use getBoundRect()/getSnapRect() here; these will use the sequence of
// primitives themselves in the long run.
const tools::Rectangle aSdrGeoData( _rVOC.GetSdrUnoObj().GetGeoRect() );
- const basegfx::B2DRange aRange(
- aSdrGeoData.Left(),
- aSdrGeoData.Top(),
- aSdrGeoData.Right(),
- aSdrGeoData.Bottom()
- );
+ const basegfx::B2DRange aRange = vcl::unotools::b2DRectangleFromRectangle(aSdrGeoData);
_out_Transformation.identity();
_out_Transformation.set( 0, 0, aRange.getWidth() );
diff --git a/svx/source/sdr/overlay/overlaymanager.cxx b/svx/source/sdr/overlay/overlaymanager.cxx
index b5a9f15cfaf8..d3b3ecb6b676 100644
--- a/svx/source/sdr/overlay/overlaymanager.cxx
+++ b/svx/source/sdr/overlay/overlaymanager.cxx
@@ -21,6 +21,7 @@
#include <basegfx/point/b2dpoint.hxx>
#include <basegfx/range/b2drange.hxx>
#include <tools/gen.hxx>
+#include <vcl/canvastools.hxx>
#include <vcl/outdev.hxx>
#include <vcl/window.hxx>
#include <svx/sdr/overlay/overlayobject.hxx>
@@ -241,9 +242,7 @@ namespace sdr
// paint members
const tools::Rectangle aRegionBoundRect(rRegion.GetBoundRect());
- const basegfx::B2DRange aRegionRange(
- aRegionBoundRect.Left(), aRegionBoundRect.Top(),
- aRegionBoundRect.Right(), aRegionBoundRect.Bottom());
+ const basegfx::B2DRange aRegionRange = vcl::unotools::b2DRectangleFromRectangle(aRegionBoundRect);
OutputDevice& rTarget = pPreRenderDevice ? *pPreRenderDevice : getOutputDevice();
ImpDrawMembers(aRegionRange, rTarget);
diff --git a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx
index cd3e75d57632..37cd10ae1bce 100644
--- a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx
+++ b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx
@@ -35,6 +35,7 @@
#include <unotools/localedatawrapper.hxx>
#include <unotools/viewoptions.hxx>
#include <vcl/button.hxx>
+#include <vcl/canvastools.hxx>
#include <vcl/virdev.hxx>
#include <vcl/svapp.hxx>
#include <vcl/field.hxx>
@@ -1083,11 +1084,11 @@ void PosSizePropertyPanel::SetPosSizeMinMax()
return;
tools::Rectangle aTmpRect(mpView->GetAllMarkedRect());
pPV->LogicToPagePos(aTmpRect);
- maRect = basegfx::B2DRange(aTmpRect.Left(), aTmpRect.Top(), aTmpRect.Right(), aTmpRect.Bottom());
+ maRect = vcl::unotools::b2DRectangleFromRectangle(aTmpRect);
tools::Rectangle aTmpRect2(mpView->GetWorkArea());
pPV->LogicToPagePos(aTmpRect2);
- maWorkArea = basegfx::B2DRange(aTmpRect2.Left(), aTmpRect2.Top(), aTmpRect2.Right(), aTmpRect2.Bottom());
+ maWorkArea = vcl::unotools::b2DRectangleFromRectangle(aTmpRect2);
const Fraction aUIScale(mpView->GetModel()->GetUIScale());
TransfrmHelper::ScaleRect( maWorkArea, aUIScale );
diff --git a/svx/source/svdraw/gradtrns.cxx b/svx/source/svdraw/gradtrns.cxx
index 640636bf44c9..cc36f493a9f2 100644
--- a/svx/source/svdraw/gradtrns.cxx
+++ b/svx/source/svdraw/gradtrns.cxx
@@ -24,6 +24,7 @@
#include <basegfx/matrix/b2dhommatrix.hxx>
#include <basegfx/matrix/b2dhommatrixtools.hxx>
#include <tools/helpers.hxx>
+#include <vcl/canvastools.hxx>
#include <vcl/outdev.hxx>
@@ -47,7 +48,7 @@ void GradTransformer::GradToVec(GradTransGradient const & rG, GradTransVector& r
// calc the basic positions
const tools::Rectangle aObjectSnapRectangle(pObj->GetSnapRect());
- const basegfx::B2DRange aRange(aObjectSnapRectangle.Left(), aObjectSnapRectangle.Top(), aObjectSnapRectangle.Right(), aObjectSnapRectangle.Bottom());
+ const basegfx::B2DRange aRange = vcl::unotools::b2DRectangleFromRectangle(aObjectSnapRectangle);
const basegfx::B2DPoint aCenter(aRange.getCenter());
basegfx::B2DPoint aStartPos, aEndPos;
@@ -199,7 +200,7 @@ void GradTransformer::VecToGrad(GradTransVector const & rV, GradTransGradient& r
// calc the basic positions
const tools::Rectangle aObjectSnapRectangle(pObj->GetSnapRect());
- const basegfx::B2DRange aRange(aObjectSnapRectangle.Left(), aObjectSnapRectangle.Top(), aObjectSnapRectangle.Right(), aObjectSnapRectangle.Bottom());
+ const basegfx::B2DRange aRange = vcl::unotools::b2DRectangleFromRectangle(aObjectSnapRectangle);
const basegfx::B2DPoint aCenter(aRange.getCenter());
basegfx::B2DPoint aStartPos(rV.maPositionA);
basegfx::B2DPoint aEndPos(rV.maPositionB);
diff --git a/svx/source/svdraw/svddrgmt.cxx b/svx/source/svdraw/svddrgmt.cxx
index d96bed18602e..834547fc24ce 100644
--- a/svx/source/svdraw/svddrgmt.cxx
+++ b/svx/source/svdraw/svddrgmt.cxx
@@ -22,6 +22,7 @@
#include <tools/bigint.hxx>
#include <o3tl/numeric.hxx>
+#include <vcl/canvastools.hxx>
#include <vcl/svapp.hxx>
#include <vcl/settings.hxx>
#include <vcl/ptrstyle.hxx>
@@ -468,7 +469,7 @@ void SdrDragMethod::createSdrDragEntries_PolygonDrag()
if(bNoPolygons)
{
const tools::Rectangle aR(getSdrDragView().GetSdrPageView()->MarkSnap());
- const basegfx::B2DRange aNewRectangle(aR.Left(), aR.Top(), aR.Right(), aR.Bottom());
+ const basegfx::B2DRange aNewRectangle = vcl::unotools::b2DRectangleFromRectangle(aR);
basegfx::B2DPolygon aNewPolygon(basegfx::utils::createPolygonFromRect(aNewRectangle));
aResult = basegfx::B2DPolyPolygon(basegfx::utils::expandToCurve(aNewPolygon));
@@ -3466,7 +3467,7 @@ void SdrDragDistort::MovAllPoints(basegfx::B2DPolyPolygon& rTarget)
if(pPV && pPV->HasMarkedObjPageView())
{
basegfx::B2DPolyPolygon aDragPolygon(rTarget);
- const basegfx::B2DRange aOriginalRange(aMarkRect.Left(), aMarkRect.Top(), aMarkRect.Right(), aMarkRect.Bottom());
+ const basegfx::B2DRange aOriginalRange = vcl::unotools::b2DRectangleFromRectangle(aMarkRect);
const basegfx::B2DPoint aTopLeft(aDistortedRect[0].X(), aDistortedRect[0].Y());
const basegfx::B2DPoint aTopRight(aDistortedRect[1].X(), aDistortedRect[1].Y());
const basegfx::B2DPoint aBottomLeft(aDistortedRect[3].X(), aDistortedRect[3].Y());
diff --git a/svx/source/svdraw/svdedxv.cxx b/svx/source/svdraw/svdedxv.cxx
index 938a8fce0fae..6d905b3ba63c 100644
--- a/svx/source/svdraw/svdedxv.cxx
+++ b/svx/source/svdraw/svdedxv.cxx
@@ -28,6 +28,7 @@
#include <svl/whiter.hxx>
#include <svl/style.hxx>
#include <editeng/editstat.hxx>
+#include <vcl/canvastools.hxx>
#include <vcl/cursor.hxx>
#include <editeng/unotext.hxx>
#include <editeng/editdata.hxx>
@@ -525,7 +526,7 @@ namespace
// check current range
const tools::Rectangle aOutArea(mrOutlinerView.GetOutputArea());
- basegfx::B2DRange aNewRange(aOutArea.Left(), aOutArea.Top(), aOutArea.Right(), aOutArea.Bottom());
+ basegfx::B2DRange aNewRange = vcl::unotools::b2DRectangleFromRectangle(aOutArea);
aNewRange.expand(rMinTextEditArea);
if (aNewRange != maRange)
@@ -630,9 +631,7 @@ void SdrObjEditView::EditViewInvalidate(const tools::Rectangle&) const
if (IsTextEdit())
{
// MinTextRange may have changed. Forward it, too
- const basegfx::B2DRange aMinTextRange(
- aMinTextEditArea.Left(), aMinTextEditArea.Top(),
- aMinTextEditArea.Right(), aMinTextEditArea.Bottom());
+ const basegfx::B2DRange aMinTextRange = vcl::unotools::b2DRectangleFromRectangle(aMinTextEditArea);
for (sal_uInt32 a(0); a < maTEOverlayGroup.count(); a++)
{
@@ -753,7 +752,7 @@ void SdrObjEditView::ImpPaintOutlinerView(OutlinerView& rOutlView, const tools::
if (xProcessor)
{
const bool bMapModeEnabled(rTargetDevice.IsMapModeEnabled());
- const basegfx::B2DRange aRange(aPixRect.Left(), aPixRect.Top(), aPixRect.Right(), aPixRect.Bottom());
+ const basegfx::B2DRange aRange = vcl::unotools::b2DRectangleFromRectangle(aPixRect);
const SvtOptionsDrawinglayer aSvtOptionsDrawinglayer;
const Color aHilightColor(aSvtOptionsDrawinglayer.getHilightColor());
const double fTransparence(aSvtOptionsDrawinglayer.GetTransparentSelectionPercent() * 0.01);
diff --git a/svx/source/svdraw/svdfmtf.cxx b/svx/source/svdraw/svdfmtf.cxx
index 2c9c14b1f2c4..fc7223d50ef9 100644
--- a/svx/source/svdraw/svdfmtf.cxx
+++ b/svx/source/svdraw/svdfmtf.cxx
@@ -40,6 +40,7 @@
#include <editeng/wrlmitem.hxx>
#include <editeng/contouritem.hxx>
#include <editeng/colritem.hxx>
+#include <vcl/canvastools.hxx>
#include <vcl/metric.hxx>
#include <editeng/charscaleitem.hxx>
#include <svx/xflhtit.hxx>
@@ -1434,7 +1435,7 @@ namespace
void ImpSdrGDIMetaFileImport::DoAction(MetaGradientAction const & rAct)
{
- basegfx::B2DRange aRange(rAct.GetRect().Left(), rAct.GetRect().Top(), rAct.GetRect().Right(), rAct.GetRect().Bottom());
+ basegfx::B2DRange aRange = vcl::unotools::b2DRectangleFromRectangle(rAct.GetRect());
if(aRange.isEmpty())
return;
@@ -1548,9 +1549,7 @@ void ImpSdrGDIMetaFileImport::DoAction(MetaFloatTransparentAction const & rAct)
BitmapEx aBitmapEx(
convertMetafileToBitmapEx(
rMtf,
- basegfx::B2DRange(
- aRect.Left(), aRect.Top(),
- aRect.Right(), aRect.Bottom()),
+ vcl::unotools::b2DRectangleFromRectangle(aRect),
125000));
// handle colors
diff --git a/svx/source/svdraw/svdobj.cxx b/svx/source/svdraw/svdobj.cxx
index 977202efdd15..119b046ef95f 100644
--- a/svx/source/svdraw/svdobj.cxx
+++ b/svx/source/svdraw/svdobj.cxx
@@ -50,6 +50,7 @@
#include <tools/helpers.hxx>
#include <tools/line.hxx>
#include <unotools/configmgr.hxx>
+#include <vcl/canvastools.hxx>
#include <vcl/graphictools.hxx>
#include <vcl/metaact.hxx>
#include <vcl/virdev.hxx>
@@ -1077,8 +1078,7 @@ basegfx::B2DPolyPolygon SdrObject::TakeXorPoly() const
{
basegfx::B2DPolyPolygon aRetval;
const tools::Rectangle aR(GetCurrentBoundRect());
- const basegfx::B2DRange aRange(aR.Left(), aR.Top(), aR.Right(), aR.Bottom());
- aRetval.append(basegfx::utils::createPolygonFromRect(aRange));
+ aRetval.append(basegfx::utils::createPolygonFromRect(vcl::unotools::b2DRectangleFromRectangle(aR)));
return aRetval;
}
@@ -1371,8 +1371,7 @@ basegfx::B2DPolyPolygon SdrObject::TakeCreatePoly(const SdrDragStat& rDrag) cons
aRect1.Justify();
basegfx::B2DPolyPolygon aRetval;
- const basegfx::B2DRange aRange(aRect1.Left(), aRect1.Top(), aRect1.Right(), aRect1.Bottom());
- aRetval.append(basegfx::utils::createPolygonFromRect(aRange));
+ aRetval.append(basegfx::utils::createPolygonFromRect(vcl::unotools::b2DRectangleFromRectangle(aRect1)));
return aRetval;
}
diff --git a/svx/source/svdraw/svdocapt.cxx b/svx/source/svdraw/svdocapt.cxx
index fe71700d3568..f31de7302a20 100644
--- a/svx/source/svdraw/svdocapt.cxx
+++ b/svx/source/svdraw/svdocapt.cxx
@@ -58,6 +58,7 @@
#include <svx/xlnwtit.hxx>
#include <svx/xpoly.hxx>
#include <svx/xpool.hxx>
+#include <vcl/canvastools.hxx>
#include <vcl/ptrstyle.hxx>
@@ -581,7 +582,7 @@ void SdrCaptionObj::BrkCreate(SdrDragStat& /*rStat*/)
basegfx::B2DPolyPolygon SdrCaptionObj::TakeCreatePoly(const SdrDragStat& /*rDrag*/) const
{
basegfx::B2DPolyPolygon aRetval;
- const basegfx::B2DRange aRange(maRect.Left(), maRect.Top(), maRect.Right(), maRect.Bottom());
+ const basegfx::B2DRange aRange =vcl::unotools::b2DRectangleFromRectangle(maRect);
aRetval.append(basegfx::utils::createPolygonFromRect(aRange));
aRetval.append(aTailPoly.getB2DPolygon());
return aRetval;
diff --git a/svx/source/svdraw/svdocirc.cxx b/svx/source/svdraw/svdocirc.cxx
index 7a01a5742708..c2637ff48e52 100644
--- a/svx/source/svdraw/svdocirc.cxx
+++ b/svx/source/svdraw/svdocirc.cxx
@@ -49,6 +49,7 @@
#include <svx/xlnstwit.hxx>
#include <svx/xlnwtit.hxx>
#include <svx/xpool.hxx>
+#include <vcl/canvastools.hxx>
#include <vcl/ptrstyle.hxx>
using namespace com::sun::star;
@@ -214,7 +215,7 @@ bool SdrCircObj::PaintNeedsXPolyCirc() const
basegfx::B2DPolygon SdrCircObj::ImpCalcXPolyCirc(const SdrObjKind eCicrleKind, const tools::Rectangle& rRect1, long nStart, long nEnd) const
{
- const basegfx::B2DRange aRange(rRect1.Left(), rRect1.Top(), rRect1.Right(), rRect1.Bottom());
+ const basegfx::B2DRange aRange = vcl::unotools::b2DRectangleFromRectangle(rRect1);
basegfx::B2DPolygon aCircPolygon;
if(OBJ_CIRC == eCicrleKind)
diff --git a/svx/source/svdraw/svdogrp.cxx b/svx/source/svdraw/svdogrp.cxx
index f4c391eab0a3..61bca73c9a37 100644
--- a/svx/source/svdraw/svdogrp.cxx
+++ b/svx/source/svdraw/svdogrp.cxx
@@ -49,6 +49,7 @@
#include <basegfx/polygon/b2dpolygontools.hxx>
#include <basegfx/polygon/b2dpolygon.hxx>
#include <libxml/xmlwriter.h>
+#include <vcl/canvastools.hxx>
// BaseProperties section
std::unique_ptr<sdr::properties::BaseProperties> SdrObjGroup::CreateObjectSpecificProperties()
@@ -297,7 +298,7 @@ basegfx::B2DPolyPolygon SdrObjGroup::TakeXorPoly() const
if(!aRetval.count())
{
- const basegfx::B2DRange aRange(aOutRect.Left(), aOutRect.Top(), aOutRect.Right(), aOutRect.Bottom());
+ const basegfx::B2DRange aRange = vcl::unotools::b2DRectangleFromRectangle(aOutRect);
aRetval.append(basegfx::utils::createPolygonFromRect(aRange));
}
diff --git a/svx/source/svdraw/svdotxdr.cxx b/svx/source/svdraw/svdotxdr.cxx
index ae33a01892f9..a5aae5432817 100644
--- a/svx/source/svdraw/svdotxdr.cxx
+++ b/svx/source/svdraw/svdotxdr.cxx
@@ -29,6 +29,7 @@
#include <basegfx/polygon/b2dpolygon.hxx>
#include <basegfx/range/b2drange.hxx>
#include <basegfx/polygon/b2dpolygontools.hxx>
+#include <vcl/canvastools.hxx>
#include <vcl/ptrstyle.hxx>
@@ -235,7 +236,7 @@ basegfx::B2DPolyPolygon SdrTextObj::TakeCreatePoly(const SdrDragStat& rDrag) con
aRect1.Justify();
basegfx::B2DPolyPolygon aRetval;
- const basegfx::B2DRange aRange(aRect1.Left(), aRect1.Top(), aRect1.Right(), aRect1.Bottom());
+ const basegfx::B2DRange aRange = vcl::unotools::b2DRectangleFromRectangle(aRect1);
aRetval.append(basegfx::utils::createPolygonFromRect(aRange));
return aRetval;
}
diff --git a/svx/source/table/svdotable.cxx b/svx/source/table/svdotable.cxx
index f186b96f63f0..4717e1b796cd 100644
--- a/svx/source/table/svdotable.cxx
+++ b/svx/source/table/svdotable.cxx
@@ -2340,7 +2340,7 @@ basegfx::B2DPolyPolygon SdrTableObj::TakeCreatePoly(const SdrDragStat& rDrag) co
aRect1.Justify();
basegfx::B2DPolyPolygon aRetval;
- const basegfx::B2DRange aRange(aRect1.Left(), aRect1.Top(), aRect1.Right(), aRect1.Bottom());
+ const basegfx::B2DRange aRange = vcl::unotools::b2DRectangleFromRectangle(aRect1);
aRetval.append(basegfx::utils::createPolygonFromRect(aRange));
return aRetval;
}
diff --git a/svx/source/table/tablehandles.cxx b/svx/source/table/tablehandles.cxx
index e6ab5304f16d..776768affc53 100644
--- a/svx/source/table/tablehandles.cxx
+++ b/svx/source/table/tablehandles.cxx
@@ -280,7 +280,7 @@ void TableBorderHdl::CreateB2dIAObject()
if (xManager.is())
{
- const basegfx::B2DRange aRange(vcl::unotools::b2DRectangleFromRectangle(maRectangle));
+ const basegfx::B2DRange aRange = vcl::unotools::b2DRectangleFromRectangle(maRectangle);
const SvtOptionsDrawinglayer aSvtOptionsDrawinglayer;
const Color aHilightColor(aSvtOptionsDrawinglayer.getHilightColor());
const double fTransparence(aSvtOptionsDrawinglayer.GetTransparentSelectionPercent() * 0.01);
diff --git a/svx/source/table/viewcontactoftableobj.cxx b/svx/source/table/viewcontactoftableobj.cxx
index 05759f3e3364..10a6173fab56 100644
--- a/svx/source/table/viewcontactoftableobj.cxx
+++ b/svx/source/table/viewcontactoftableobj.cxx
@@ -40,6 +40,7 @@
#include <basegfx/matrix/b2dhommatrixtools.hxx>
#include <svx/framelink.hxx>
#include <svx/framelinkarray.hxx>
+#include <vcl/canvastools.hxx>
#include <cell.hxx>
#include "tablelayouter.hxx"
@@ -223,10 +224,7 @@ namespace sdr
// create range using the model data directly. This is in SdrTextObj::aRect which i will access using
// GetGeoRect() to not trigger any calculations. It's the unrotated geometry.
- const tools::Rectangle& rObjectRectangle(rTableObj.GetGeoRect());
- const basegfx::B2DRange aObjectRange(
- rObjectRectangle.Left(), rObjectRectangle.Top(),
- rObjectRectangle.Right(), rObjectRectangle.Bottom());
+ const basegfx::B2DRange aObjectRange = vcl::unotools::b2DRectangleFromRectangle(rTableObj.GetGeoRect());
// To create the CellBorderPrimitives, use the tolling from svx::frame::Array
// which is capable of creating the needed visualization. Fill it during the
@@ -392,10 +390,7 @@ namespace sdr
else
{
// take unrotated snap rect (direct model data) for position and size
- const tools::Rectangle& rRectangle = rTableObj.GetGeoRect();
- const basegfx::B2DRange aObjectRange(
- rRectangle.Left(), rRectangle.Top(),
- rRectangle.Right(), rRectangle.Bottom());
+ const basegfx::B2DRange aObjectRange = vcl::unotools::b2DRectangleFromRectangle(rTableObj.GetGeoRect());
// create object matrix
const GeoStat& rGeoStat(rTableObj.GetGeoStat());