summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
Diffstat (limited to 'vcl')
-rw-r--r--vcl/backendtest/VisualBackendTest.cxx38
-rw-r--r--vcl/backendtest/outputdevice/bitmap.cxx22
-rw-r--r--vcl/backendtest/outputdevice/common.cxx10
-rw-r--r--vcl/backendtest/outputdevice/gradient.cxx4
-rw-r--r--vcl/backendtest/outputdevice/line.cxx2
-rw-r--r--vcl/backendtest/outputdevice/outputdevice.cxx4
-rw-r--r--vcl/backendtest/outputdevice/pixel.cxx2
-rw-r--r--vcl/backendtest/outputdevice/polygon.cxx2
-rw-r--r--vcl/backendtest/outputdevice/polyline.cxx2
-rw-r--r--vcl/backendtest/outputdevice/polypolygon.cxx2
-rw-r--r--vcl/backendtest/outputdevice/rectangle.cxx4
-rw-r--r--vcl/headless/svpdummies.cxx6
-rw-r--r--vcl/headless/svpframe.cxx4
-rw-r--r--vcl/headless/svptext.cxx2
-rw-r--r--vcl/inc/brdwin.hxx30
-rw-r--r--vcl/inc/fontsubset.hxx2
-rw-r--r--vcl/inc/headless/svpdummies.hxx2
-rw-r--r--vcl/inc/headless/svpframe.hxx2
-rw-r--r--vcl/inc/headless/svpgdi.hxx2
-rw-r--r--vcl/inc/helpwin.hxx14
-rw-r--r--vcl/inc/listbox.hxx14
-rw-r--r--vcl/inc/opengl/RenderState.hxx4
-rw-r--r--vcl/inc/opengl/texture.hxx4
-rw-r--r--vcl/inc/openglgdiimpl.hxx8
-rw-r--r--vcl/inc/osx/salframe.h8
-rw-r--r--vcl/inc/osx/salmenu.h4
-rw-r--r--vcl/inc/osx/salsys.h2
-rw-r--r--vcl/inc/outdev.h2
-rw-r--r--vcl/inc/printdlg.hxx4
-rw-r--r--vcl/inc/quartz/salgdi.h12
-rw-r--r--vcl/inc/regionband.hxx4
-rw-r--r--vcl/inc/salframe.hxx10
-rw-r--r--vcl/inc/salgdi.hxx26
-rw-r--r--vcl/inc/sallayout.hxx2
-rw-r--r--vcl/inc/salmenu.hxx4
-rw-r--r--vcl/inc/salsys.hxx2
-rw-r--r--vcl/inc/scrwnd.hxx2
-rw-r--r--vcl/inc/spin.hxx6
-rw-r--r--vcl/inc/test/outputdevice.hxx8
-rw-r--r--vcl/inc/textlayout.hxx4
-rw-r--r--vcl/inc/textrender.hxx2
-rw-r--r--vcl/inc/toolbox.h8
-rw-r--r--vcl/inc/unx/cairotextrender.hxx2
-rw-r--r--vcl/inc/unx/genpspgraphics.h2
-rw-r--r--vcl/inc/unx/glyphcache.hxx8
-rw-r--r--vcl/inc/unx/gtk/gtkframe.hxx14
-rw-r--r--vcl/inc/unx/gtk/gtkgdi.hxx132
-rw-r--r--vcl/inc/unx/gtk/gtksalmenu.hxx2
-rw-r--r--vcl/inc/unx/gtk/gtksys.hxx2
-rw-r--r--vcl/inc/unx/printergfx.hxx22
-rw-r--r--vcl/inc/unx/saldisp.hxx4
-rw-r--r--vcl/inc/unx/salframe.h10
-rw-r--r--vcl/inc/unx/salgdi.h2
-rw-r--r--vcl/inc/unx/wmadaptor.hxx4
-rw-r--r--vcl/inc/unx/x11/x11sys.hxx2
-rw-r--r--vcl/inc/wall2.hxx2
-rw-r--r--vcl/inc/win/salframe.h2
-rw-r--r--vcl/inc/win/salgdi.h10
-rw-r--r--vcl/inc/win/salsys.h6
-rw-r--r--vcl/inc/win/winlayout.hxx6
-rw-r--r--vcl/inc/window.h14
-rw-r--r--vcl/opengl/FixedTextureAtlas.cxx2
-rw-r--r--vcl/opengl/PackedTextureAtlas.cxx20
-rw-r--r--vcl/opengl/gdiimpl.cxx24
-rw-r--r--vcl/opengl/texture.cxx4
-rw-r--r--vcl/osx/salframe.cxx8
-rw-r--r--vcl/osx/salmenu.cxx16
-rw-r--r--vcl/osx/salnativewidgets.cxx86
-rw-r--r--vcl/osx/salsys.cxx6
-rw-r--r--vcl/qa/cppunit/BitmapTest.cxx4
-rw-r--r--vcl/qa/cppunit/canvasbitmaptest.cxx6
-rw-r--r--vcl/qa/cppunit/complextext.cxx10
-rw-r--r--vcl/qa/cppunit/svm/svmtest.cxx14
-rw-r--r--vcl/quartz/ctfonts.cxx4
-rw-r--r--vcl/quartz/salgdi.cxx4
-rw-r--r--vcl/quartz/salgdicommon.cxx4
-rw-r--r--vcl/source/app/help.cxx36
-rw-r--r--vcl/source/app/salvtables.cxx8
-rw-r--r--vcl/source/app/svapp.cxx14
-rw-r--r--vcl/source/control/button.cxx156
-rw-r--r--vcl/source/control/combobox.cxx28
-rw-r--r--vcl/source/control/ctrl.cxx22
-rw-r--r--vcl/source/control/edit.cxx38
-rw-r--r--vcl/source/control/fixed.cxx20
-rw-r--r--vcl/source/control/fixedhyper.cxx6
-rw-r--r--vcl/source/control/group.cxx4
-rw-r--r--vcl/source/control/imgctrl.cxx12
-rw-r--r--vcl/source/control/imp_listbox.cxx36
-rw-r--r--vcl/source/control/listbox.cxx38
-rw-r--r--vcl/source/control/menubtn.cxx4
-rw-r--r--vcl/source/control/morebtn.cxx2
-rw-r--r--vcl/source/control/notebookbar.cxx2
-rw-r--r--vcl/source/control/prgsbar.cxx4
-rw-r--r--vcl/source/control/scrbar.cxx50
-rw-r--r--vcl/source/control/slider.cxx22
-rw-r--r--vcl/source/control/spinbtn.cxx30
-rw-r--r--vcl/source/control/spinfld.cxx68
-rw-r--r--vcl/source/control/tabctrl.cxx104
-rw-r--r--vcl/source/edit/texteng.cxx22
-rw-r--r--vcl/source/edit/textview.cxx24
-rw-r--r--vcl/source/edit/vclmedit.cxx8
-rw-r--r--vcl/source/filter/jpeg/JpegReader.cxx2
-rw-r--r--vcl/source/filter/sgfbram.cxx2
-rw-r--r--vcl/source/filter/sgvmain.cxx44
-rw-r--r--vcl/source/filter/wmf/emfwr.cxx12
-rw-r--r--vcl/source/filter/wmf/emfwr.hxx2
-rw-r--r--vcl/source/filter/wmf/enhwmf.cxx28
-rw-r--r--vcl/source/filter/wmf/winmtf.cxx36
-rw-r--r--vcl/source/filter/wmf/winmtf.hxx44
-rw-r--r--vcl/source/filter/wmf/winwmf.cxx48
-rw-r--r--vcl/source/filter/wmf/wmfwr.cxx20
-rw-r--r--vcl/source/filter/wmf/wmfwr.hxx16
-rw-r--r--vcl/source/font/fontmetric.cxx2
-rw-r--r--vcl/source/fontsubset/cff.cxx2
-rw-r--r--vcl/source/gdi/animate.cxx8
-rw-r--r--vcl/source/gdi/bitmap.cxx54
-rw-r--r--vcl/source/gdi/bitmapex.cxx10
-rw-r--r--vcl/source/gdi/bmpacc3.cxx8
-rw-r--r--vcl/source/gdi/gdimetafiletools.cxx20
-rw-r--r--vcl/source/gdi/gdimtf.cxx120
-rw-r--r--vcl/source/gdi/gradient.cxx4
-rw-r--r--vcl/source/gdi/graph.cxx2
-rw-r--r--vcl/source/gdi/impanmvw.cxx8
-rw-r--r--vcl/source/gdi/impgraph.cxx4
-rw-r--r--vcl/source/gdi/impvect.cxx4
-rw-r--r--vcl/source/gdi/metaact.cxx40
-rw-r--r--vcl/source/gdi/pdfextoutdevdata.cxx30
-rw-r--r--vcl/source/gdi/pdfwriter.cxx38
-rw-r--r--vcl/source/gdi/pdfwriter_impl.cxx92
-rw-r--r--vcl/source/gdi/pdfwriter_impl.hxx56
-rw-r--r--vcl/source/gdi/pdfwriter_impl2.cxx12
-rw-r--r--vcl/source/gdi/print.cxx16
-rw-r--r--vcl/source/gdi/print2.cxx62
-rw-r--r--vcl/source/gdi/print3.cxx6
-rw-r--r--vcl/source/gdi/region.cxx36
-rw-r--r--vcl/source/gdi/regionband.cxx8
-rw-r--r--vcl/source/gdi/salgdilayout.cxx18
-rw-r--r--vcl/source/gdi/sallayout.cxx4
-rw-r--r--vcl/source/gdi/salnativewidgets-none.cxx8
-rw-r--r--vcl/source/gdi/svmconverter.cxx12
-rw-r--r--vcl/source/gdi/textlayout.cxx28
-rw-r--r--vcl/source/gdi/virdev.cxx2
-rw-r--r--vcl/source/gdi/wall.cxx12
-rw-r--r--vcl/source/helper/canvasbitmap.cxx4
-rw-r--r--vcl/source/helper/canvastools.cxx14
-rw-r--r--vcl/source/opengl/OpenGLContext.cxx2
-rw-r--r--vcl/source/outdev/bitmap.cxx40
-rw-r--r--vcl/source/outdev/clipping.cxx8
-rw-r--r--vcl/source/outdev/curvedshapes.cxx16
-rw-r--r--vcl/source/outdev/font.cxx30
-rw-r--r--vcl/source/outdev/gradient.cxx48
-rw-r--r--vcl/source/outdev/hatch.cxx4
-rw-r--r--vcl/source/outdev/map.cxx38
-rw-r--r--vcl/source/outdev/mask.cxx2
-rw-r--r--vcl/source/outdev/nativecontrols.cxx16
-rw-r--r--vcl/source/outdev/outdev.cxx16
-rw-r--r--vcl/source/outdev/rect.cxx30
-rw-r--r--vcl/source/outdev/text.cxx28
-rw-r--r--vcl/source/outdev/textline.cxx2
-rw-r--r--vcl/source/outdev/transparent.cxx24
-rw-r--r--vcl/source/outdev/wallpaper.cxx30
-rw-r--r--vcl/source/window/brdwin.cxx88
-rw-r--r--vcl/source/window/clipping.cxx22
-rw-r--r--vcl/source/window/cursor.cxx4
-rw-r--r--vcl/source/window/decoview.cxx84
-rw-r--r--vcl/source/window/dialog.cxx4
-rw-r--r--vcl/source/window/dockingarea.cxx10
-rw-r--r--vcl/source/window/dockmgr.cxx50
-rw-r--r--vcl/source/window/dockwin.cxx20
-rw-r--r--vcl/source/window/floatwin.cxx30
-rw-r--r--vcl/source/window/layout.cxx6
-rw-r--r--vcl/source/window/menu.cxx88
-rw-r--r--vcl/source/window/menubarwindow.cxx32
-rw-r--r--vcl/source/window/menubarwindow.hxx6
-rw-r--r--vcl/source/window/menufloatingwindow.cxx32
-rw-r--r--vcl/source/window/menufloatingwindow.hxx4
-rw-r--r--vcl/source/window/menuwindow.cxx6
-rw-r--r--vcl/source/window/menuwindow.hxx4
-rw-r--r--vcl/source/window/mouse.cxx6
-rw-r--r--vcl/source/window/msgbox.cxx4
-rw-r--r--vcl/source/window/openglwin.cxx2
-rw-r--r--vcl/source/window/paint.cxx66
-rw-r--r--vcl/source/window/printdlg.cxx10
-rw-r--r--vcl/source/window/scrwnd.cxx4
-rw-r--r--vcl/source/window/split.cxx6
-rw-r--r--vcl/source/window/splitwin.cxx46
-rw-r--r--vcl/source/window/stacking.cxx8
-rw-r--r--vcl/source/window/status.cxx56
-rw-r--r--vcl/source/window/syswin.cxx4
-rw-r--r--vcl/source/window/tabpage.cxx6
-rw-r--r--vcl/source/window/toolbox.cxx132
-rw-r--r--vcl/source/window/toolbox2.cxx32
-rw-r--r--vcl/source/window/window.cxx70
-rw-r--r--vcl/source/window/window2.cxx16
-rw-r--r--vcl/source/window/winproc.cxx18
-rw-r--r--vcl/unx/generic/app/saldisp.cxx4
-rw-r--r--vcl/unx/generic/app/wmadaptor.cxx42
-rw-r--r--vcl/unx/generic/fontmanager/fontmanager.cxx2
-rw-r--r--vcl/unx/generic/gdi/cairotextrender.cxx4
-rw-r--r--vcl/unx/generic/gdi/font.cxx2
-rw-r--r--vcl/unx/generic/gdi/openglx11cairotextrender.cxx6
-rw-r--r--vcl/unx/generic/glyphs/freetype_glyphcache.cxx2
-rw-r--r--vcl/unx/generic/glyphs/glyphcache.cxx2
-rw-r--r--vcl/unx/generic/print/bitmap_gfx.cxx14
-rw-r--r--vcl/unx/generic/print/common_gfx.cxx14
-rw-r--r--vcl/unx/generic/print/genpspgraphics.cxx10
-rw-r--r--vcl/unx/generic/window/salframe.cxx46
-rw-r--r--vcl/unx/gtk/gtksalframe.cxx14
-rw-r--r--vcl/unx/gtk/gtksalmenu.cxx2
-rw-r--r--vcl/unx/gtk/gtksys.cxx6
-rw-r--r--vcl/unx/gtk/salnativewidgets-gtk.cxx320
-rw-r--r--vcl/unx/gtk3/gtk3gtkframe.cxx26
-rw-r--r--vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx124
-rw-r--r--vcl/unx/x11/x11sys.cxx8
-rw-r--r--vcl/win/app/salinfo.cxx10
-rw-r--r--vcl/win/gdi/salfont.cxx6
-rw-r--r--vcl/win/gdi/salnativewidgets-luna.cxx60
-rw-r--r--vcl/win/gdi/winlayout.cxx18
-rw-r--r--vcl/win/window/salframe.cxx6
-rw-r--r--vcl/workben/icontest.cxx4
-rw-r--r--vcl/workben/mtfdemo.cxx4
-rw-r--r--vcl/workben/outdevgrind.cxx10
-rw-r--r--vcl/workben/svptest.cxx24
-rw-r--r--vcl/workben/vcldemo.cxx146
224 files changed, 2378 insertions, 2378 deletions
diff --git a/vcl/backendtest/VisualBackendTest.cxx b/vcl/backendtest/VisualBackendTest.cxx
index d419f249eb8c..1d9af127eb24 100644
--- a/vcl/backendtest/VisualBackendTest.cxx
+++ b/vcl/backendtest/VisualBackendTest.cxx
@@ -51,7 +51,7 @@
using namespace css;
-void drawBitmapCentered(Rectangle& rRect, Bitmap aBitmap, vcl::RenderContext& rRenderContext)
+void drawBitmapCentered(tools::Rectangle& rRect, Bitmap aBitmap, vcl::RenderContext& rRenderContext)
{
long nWidth = rRect.GetWidth();
long nHeight = rRect.GetHeight();
@@ -66,7 +66,7 @@ void drawBitmapCentered(Rectangle& rRect, Bitmap aBitmap, vcl::RenderContext& rR
rRenderContext.DrawBitmap(aPoint, aBitmap);
}
-void drawBitmapScaledAndCentered(Rectangle& rRect, Bitmap aBitmap, vcl::RenderContext& rRenderContext, BmpScaleFlag aFlag = BmpScaleFlag::Fast)
+void drawBitmapScaledAndCentered(tools::Rectangle& rRect, Bitmap aBitmap, vcl::RenderContext& rRenderContext, BmpScaleFlag aFlag = BmpScaleFlag::Fast)
{
long nWidth = rRect.GetWidth();
long nHeight = rRect.GetHeight();
@@ -80,7 +80,7 @@ void drawBitmapScaledAndCentered(Rectangle& rRect, Bitmap aBitmap, vcl::RenderCo
drawBitmapCentered(rRect, aBitmap, rRenderContext);
}
-void drawBackgroundRect(Rectangle& rRect, Color aColor, vcl::RenderContext& rRenderContext)
+void drawBackgroundRect(tools::Rectangle& rRect, Color aColor, vcl::RenderContext& rRenderContext)
{
rRenderContext.Push(PushFlags::LINECOLOR | PushFlags::FILLCOLOR);
rRenderContext.SetFillColor(aColor);
@@ -89,7 +89,7 @@ void drawBackgroundRect(Rectangle& rRect, Color aColor, vcl::RenderContext& rRen
rRenderContext.Pop();
}
-void assertAndSetBackground(vcl::test::TestResult eResult, Rectangle& rRect, vcl::RenderContext& rRenderContext)
+void assertAndSetBackground(vcl::test::TestResult eResult, tools::Rectangle& rRect, vcl::RenderContext& rRenderContext)
{
if (eResult == vcl::test::TestResult::Passed)
drawBackgroundRect(rRect, COL_GREEN, rRenderContext);
@@ -157,9 +157,9 @@ public:
}
}
- static std::vector<Rectangle> setupRegions(int nPartitionsX, int nPartitionsY, int nWidth, int nHeight)
+ static std::vector<tools::Rectangle> setupRegions(int nPartitionsX, int nPartitionsY, int nWidth, int nHeight)
{
- std::vector<Rectangle> aRegions;
+ std::vector<tools::Rectangle> aRegions;
for (int y = 0; y < nPartitionsY; y++)
{
@@ -170,7 +170,7 @@ public:
long x2 = (x+1) * (nWidth / nPartitionsX);
long y2 = (y+1) * (nHeight / nPartitionsY);
- aRegions.push_back(Rectangle(x1 + 1, y1 + 1, x2 - 2, y2 - 2));
+ aRegions.push_back(tools::Rectangle(x1 + 1, y1 + 1, x2 - 2, y2 - 2));
}
}
return aRegions;
@@ -178,10 +178,10 @@ public:
static void testRectangles(vcl::RenderContext& rRenderContext, int nWidth, int nHeight)
{
- Rectangle aRectangle;
+ tools::Rectangle aRectangle;
size_t index = 0;
- std::vector<Rectangle> aRegions = setupRegions(3, 2, nWidth, nHeight);
+ std::vector<tools::Rectangle> aRegions = setupRegions(3, 2, nWidth, nHeight);
aRectangle = aRegions[index++];
{
@@ -234,10 +234,10 @@ public:
static void testFilledRectangles(vcl::RenderContext& rRenderContext, int nWidth, int nHeight)
{
- Rectangle aRectangle;
+ tools::Rectangle aRectangle;
size_t index = 0;
- std::vector<Rectangle> aRegions = setupRegions(3, 2, nWidth, nHeight);
+ std::vector<tools::Rectangle> aRegions = setupRegions(3, 2, nWidth, nHeight);
aRectangle = aRegions[index++];
{
@@ -288,10 +288,10 @@ public:
static void testLines(vcl::RenderContext& rRenderContext, int nWidth, int nHeight)
{
- Rectangle aRectangle;
+ tools::Rectangle aRectangle;
size_t index = 0;
- std::vector<Rectangle> aRegions = setupRegions(3, 2, nWidth, nHeight);
+ std::vector<tools::Rectangle> aRegions = setupRegions(3, 2, nWidth, nHeight);
aRectangle = aRegions[index++];
{
@@ -339,10 +339,10 @@ public:
static void testBitmaps(vcl::RenderContext& rRenderContext, int nWidth, int nHeight)
{
- Rectangle aRectangle;
+ tools::Rectangle aRectangle;
size_t index = 0;
- std::vector<Rectangle> aRegions = setupRegions(2, 2, nWidth, nHeight);
+ std::vector<tools::Rectangle> aRegions = setupRegions(2, 2, nWidth, nHeight);
aRectangle = aRegions[index++];
{
@@ -374,7 +374,7 @@ public:
}
}
- virtual void Paint(vcl::RenderContext& rRenderContext, const Rectangle& /*rRect*/) override
+ virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& /*rRect*/) override
{
if (mnTest % mnNumberOfTests == mnNumberOfTests - 1)
{
@@ -427,7 +427,7 @@ public:
mpVDev->DrawPolyPolygon(polyPolygon);
- Rectangle aGradientRect(Point(200, 200), Size(200 + fTime * 300, 200 + fTime * 300));
+ tools::Rectangle aGradientRect(Point(200, 200), Size(200 + fTime * 300, 200 + fTime * 300));
mpVDev->DrawGradient(aGradientRect, Gradient(GradientStyle::Linear, COL_YELLOW, COL_BLUE));
rRenderContext.DrawOutDev(Point(), mpVDev->GetOutputSizePixel(),
@@ -445,7 +445,7 @@ public:
long nWidth = aSize.Width();
long nHeight = aSize.Height();
- Rectangle aRectangle;
+ tools::Rectangle aRectangle;
size_t index = 0;
if (mnTest % mnNumberOfTests == 0)
@@ -466,7 +466,7 @@ public:
}
else if (mnTest % mnNumberOfTests == 4)
{
- std::vector<Rectangle> aRegions = setupRegions(3, 2, nWidth, nHeight);
+ std::vector<tools::Rectangle> aRegions = setupRegions(3, 2, nWidth, nHeight);
aRectangle = aRegions[index++];
{
diff --git a/vcl/backendtest/outputdevice/bitmap.cxx b/vcl/backendtest/outputdevice/bitmap.cxx
index c86589ae9171..eaddff1a18a9 100644
--- a/vcl/backendtest/outputdevice/bitmap.cxx
+++ b/vcl/backendtest/outputdevice/bitmap.cxx
@@ -23,8 +23,8 @@ Bitmap OutputDeviceTestBitmap::setupDrawTransformedBitmap()
Bitmap::ScopedWriteAccess aWriteAccess(aBitmap);
aWriteAccess->Erase(constFillColor);
aWriteAccess->SetLineColor(COL_YELLOW);
- aWriteAccess->DrawRect(Rectangle(0, 0, 8, 8));
- aWriteAccess->DrawRect(Rectangle(2, 2, 6, 6));
+ aWriteAccess->DrawRect(tools::Rectangle(0, 0, 8, 8));
+ aWriteAccess->DrawRect(tools::Rectangle(2, 2, 6, 6));
}
initialSetup(13, 13, constBackgroundColor);
@@ -48,8 +48,8 @@ Bitmap OutputDeviceTestBitmap::setupDrawBitmap()
Bitmap::ScopedWriteAccess aWriteAccess(aBitmap);
aWriteAccess->Erase(constFillColor);
aWriteAccess->SetLineColor(COL_YELLOW);
- aWriteAccess->DrawRect(Rectangle(0, 0, 8, 8));
- aWriteAccess->DrawRect(Rectangle(2, 2, 6, 6));
+ aWriteAccess->DrawRect(tools::Rectangle(0, 0, 8, 8));
+ aWriteAccess->DrawRect(tools::Rectangle(2, 2, 6, 6));
}
initialSetup(13, 13, constBackgroundColor);
@@ -70,8 +70,8 @@ Bitmap OutputDeviceTestBitmap::setupDrawBitmapExWithAlpha()
Bitmap::ScopedWriteAccess aWriteAccess(aBitmap);
aWriteAccess->Erase(COL_WHITE);
aWriteAccess->SetLineColor(Color(0xFF, 0xFF, 0x00));
- aWriteAccess->DrawRect(Rectangle(0, 0, 8, 8));
- aWriteAccess->DrawRect(Rectangle(3, 3, 5, 5));
+ aWriteAccess->DrawRect(tools::Rectangle(0, 0, 8, 8));
+ aWriteAccess->DrawRect(tools::Rectangle(3, 3, 5, 5));
}
AlphaMask aAlpha(aBitmapSize);
@@ -79,13 +79,13 @@ Bitmap OutputDeviceTestBitmap::setupDrawBitmapExWithAlpha()
AlphaMask::ScopedWriteAccess aWriteAccess(aAlpha);
aWriteAccess->Erase(COL_WHITE);
aWriteAccess->SetLineColor(Color(0x44, 0x44, 0x44));
- aWriteAccess->DrawRect(Rectangle(0, 0, 8, 8));
- aWriteAccess->DrawRect(Rectangle(3, 3, 5, 5));
+ aWriteAccess->DrawRect(tools::Rectangle(0, 0, 8, 8));
+ aWriteAccess->DrawRect(tools::Rectangle(3, 3, 5, 5));
}
initialSetup(13, 13, constBackgroundColor);
- Point aPoint(alignToCenter(maVDRectangle, Rectangle(Point(), aBitmapSize)).TopLeft());
+ Point aPoint(alignToCenter(maVDRectangle, tools::Rectangle(Point(), aBitmapSize)).TopLeft());
mpVirtualDevice->DrawBitmapEx(aPoint, BitmapEx(aBitmap, aAlpha));
@@ -100,8 +100,8 @@ Bitmap OutputDeviceTestBitmap::setupDrawMask()
Bitmap::ScopedWriteAccess aWriteAccess(aBitmap);
aWriteAccess->Erase(COL_WHITE);
aWriteAccess->SetLineColor(COL_BLACK);
- aWriteAccess->DrawRect(Rectangle(0, 0, 8, 8));
- aWriteAccess->DrawRect(Rectangle(3, 3, 5, 5));
+ aWriteAccess->DrawRect(tools::Rectangle(0, 0, 8, 8));
+ aWriteAccess->DrawRect(tools::Rectangle(3, 3, 5, 5));
}
initialSetup(13, 13, constBackgroundColor);
diff --git a/vcl/backendtest/outputdevice/common.cxx b/vcl/backendtest/outputdevice/common.cxx
index 727fbcc8c767..1252baf3b1b1 100644
--- a/vcl/backendtest/outputdevice/common.cxx
+++ b/vcl/backendtest/outputdevice/common.cxx
@@ -226,7 +226,7 @@ OutputDeviceTestCommon::OutputDeviceTestCommon()
void OutputDeviceTestCommon::initialSetup(long nWidth, long nHeight, Color aColor)
{
- maVDRectangle = Rectangle(Point(), Size (nWidth, nHeight));
+ maVDRectangle = tools::Rectangle(Point(), Size (nWidth, nHeight));
mpVirtualDevice->SetOutputSizePixel(maVDRectangle.GetSize());
mpVirtualDevice->SetBackground(Wallpaper(aColor));
mpVirtualDevice->Erase();
@@ -282,12 +282,12 @@ TestResult OutputDeviceTestCommon::checkRectangles(Bitmap& aBitmap, std::vector<
return aReturnValue;
}
-Rectangle OutputDeviceTestCommon::alignToCenter(Rectangle aRect1, Rectangle aRect2)
+tools::Rectangle OutputDeviceTestCommon::alignToCenter(tools::Rectangle aRect1, tools::Rectangle aRect2)
{
Point aPoint((aRect1.GetWidth() / 2.0) - (aRect2.GetWidth() / 2.0),
(aRect1.GetHeight() / 2.0) - (aRect2.GetHeight() / 2.0));
- return Rectangle(aPoint, aRect2.GetSize());
+ return tools::Rectangle(aPoint, aRect2.GetSize());
}
TestResult OutputDeviceTestCommon::checkDiamond(Bitmap& rBitmap)
@@ -295,7 +295,7 @@ TestResult OutputDeviceTestCommon::checkDiamond(Bitmap& rBitmap)
return checkDiamondLine(rBitmap, 1, constLineColor);
}
-void OutputDeviceTestCommon::createDiamondPoints(Rectangle rRect, int nOffset,
+void OutputDeviceTestCommon::createDiamondPoints(tools::Rectangle rRect, int nOffset,
Point& rPoint1, Point& rPoint2,
Point& rPoint3, Point& rPoint4)
{
@@ -308,7 +308,7 @@ void OutputDeviceTestCommon::createDiamondPoints(Rectangle rRect, int nOffset,
rPoint4 = Point(midPointX - nOffset, midPointY );
}
-void OutputDeviceTestCommon::createHorizontalVerticalDiagonalLinePoints(Rectangle rRect,
+void OutputDeviceTestCommon::createHorizontalVerticalDiagonalLinePoints(tools::Rectangle rRect,
Point& rHorizontalLinePoint1, Point& rHorizontalLinePoint2,
Point& rVerticalLinePoint1, Point& rVerticalLinePoint2,
Point& rDiagonalLinePoint1, Point& rDiagonalLinePoint2)
diff --git a/vcl/backendtest/outputdevice/gradient.cxx b/vcl/backendtest/outputdevice/gradient.cxx
index 83d45bf8cf4d..b1fdd0a24445 100644
--- a/vcl/backendtest/outputdevice/gradient.cxx
+++ b/vcl/backendtest/outputdevice/gradient.cxx
@@ -19,7 +19,7 @@ Bitmap OutputDeviceTestGradient::setupLinearGradient()
Gradient aGradient(GradientStyle::Linear, Color(0xFF, 0xFF, 0xFF), Color(0x00, 0x00, 0x00));
aGradient.SetAngle(900);
- Rectangle aDrawRect(maVDRectangle.Left() + 1, maVDRectangle.Top() + 1,
+ tools::Rectangle aDrawRect(maVDRectangle.Left() + 1, maVDRectangle.Top() + 1,
maVDRectangle.Right() - 1, maVDRectangle.Bottom() - 1);
mpVirtualDevice->DrawGradient(aDrawRect, aGradient);
@@ -31,7 +31,7 @@ Bitmap OutputDeviceTestGradient::setupRadialGradient()
initialSetup(12, 12, constBackgroundColor);
Gradient aGradient(GradientStyle::Radial, Color(0xFF, 0xFF, 0xFF), Color(0x00, 0x00, 0x00));
- Rectangle aDrawRect(maVDRectangle.Left() + 1, maVDRectangle.Top() + 1,
+ tools::Rectangle aDrawRect(maVDRectangle.Left() + 1, maVDRectangle.Top() + 1,
maVDRectangle.Right() - 1, maVDRectangle.Bottom() - 1);
mpVirtualDevice->DrawGradient(aDrawRect, aGradient);
diff --git a/vcl/backendtest/outputdevice/line.cxx b/vcl/backendtest/outputdevice/line.cxx
index 4cd39dbfcfe9..1c384c14de3c 100644
--- a/vcl/backendtest/outputdevice/line.cxx
+++ b/vcl/backendtest/outputdevice/line.cxx
@@ -16,7 +16,7 @@ namespace test {
namespace
{
-void drawLineOffset(OutputDevice& rDevice, Rectangle& rRect, int nOffset)
+void drawLineOffset(OutputDevice& rDevice, tools::Rectangle& rRect, int nOffset)
{
Point aLeftTop (rRect.Left() + nOffset, rRect.Top() + nOffset);
Point aRightTop (rRect.Right() - nOffset, rRect.Top() + nOffset);
diff --git a/vcl/backendtest/outputdevice/outputdevice.cxx b/vcl/backendtest/outputdevice/outputdevice.cxx
index 6f7ed16df824..5ada6edcefec 100644
--- a/vcl/backendtest/outputdevice/outputdevice.cxx
+++ b/vcl/backendtest/outputdevice/outputdevice.cxx
@@ -32,10 +32,10 @@ Bitmap OutputDeviceTestAnotherOutDev::setupXOR()
{
initialSetup(13, 13, constBackgroundColor);
- Rectangle aDrawRectangle(maVDRectangle);
+ tools::Rectangle aDrawRectangle(maVDRectangle);
aDrawRectangle.shrink(2);
- Rectangle aScissorRectangle(maVDRectangle);
+ tools::Rectangle aScissorRectangle(maVDRectangle);
aScissorRectangle.shrink(4);
mpVirtualDevice->SetRasterOp(RasterOp::Xor);
diff --git a/vcl/backendtest/outputdevice/pixel.cxx b/vcl/backendtest/outputdevice/pixel.cxx
index f13690e72209..2ad49e0f2fe8 100644
--- a/vcl/backendtest/outputdevice/pixel.cxx
+++ b/vcl/backendtest/outputdevice/pixel.cxx
@@ -16,7 +16,7 @@ namespace test {
namespace
{
-void drawPixelOffset(OutputDevice& rDevice, Rectangle& rRect, int nOffset)
+void drawPixelOffset(OutputDevice& rDevice, tools::Rectangle& rRect, int nOffset)
{
for (long x = 0 + nOffset; x < (rRect.GetWidth() - nOffset); ++x)
{
diff --git a/vcl/backendtest/outputdevice/polygon.cxx b/vcl/backendtest/outputdevice/polygon.cxx
index de722c54abe9..a6b3c75a9a13 100644
--- a/vcl/backendtest/outputdevice/polygon.cxx
+++ b/vcl/backendtest/outputdevice/polygon.cxx
@@ -16,7 +16,7 @@ namespace test {
namespace
{
-void drawPolygonOffset(OutputDevice& rDevice, Rectangle& rRect, int nOffset)
+void drawPolygonOffset(OutputDevice& rDevice, tools::Rectangle& rRect, int nOffset)
{
tools::Polygon aPolygon(4);
aPolygon.SetPoint(Point(rRect.Left() + nOffset, rRect.Top() + nOffset), 0);
diff --git a/vcl/backendtest/outputdevice/polyline.cxx b/vcl/backendtest/outputdevice/polyline.cxx
index 808d7274965b..c449cfb31100 100644
--- a/vcl/backendtest/outputdevice/polyline.cxx
+++ b/vcl/backendtest/outputdevice/polyline.cxx
@@ -16,7 +16,7 @@ namespace test {
namespace
{
-void drawPolyLineOffset(OutputDevice& rDevice, Rectangle& rRect, int nOffset)
+void drawPolyLineOffset(OutputDevice& rDevice, tools::Rectangle& rRect, int nOffset)
{
tools::Polygon aPolygon(4);
aPolygon.SetPoint(Point(rRect.Left() + nOffset, rRect.Top() + nOffset), 0);
diff --git a/vcl/backendtest/outputdevice/polypolygon.cxx b/vcl/backendtest/outputdevice/polypolygon.cxx
index a6d3a018fbfc..f7f3a53749f5 100644
--- a/vcl/backendtest/outputdevice/polypolygon.cxx
+++ b/vcl/backendtest/outputdevice/polypolygon.cxx
@@ -17,7 +17,7 @@ namespace test {
namespace
{
-tools::Polygon createPolygonOffset(Rectangle& rRect, int nOffset)
+tools::Polygon createPolygonOffset(tools::Rectangle& rRect, int nOffset)
{
tools::Polygon aPolygon(4);
aPolygon.SetPoint(Point(rRect.Left() + nOffset, rRect.Top() + nOffset), 0);
diff --git a/vcl/backendtest/outputdevice/rectangle.cxx b/vcl/backendtest/outputdevice/rectangle.cxx
index 80ab3cf6f7ee..911d3dccf51d 100644
--- a/vcl/backendtest/outputdevice/rectangle.cxx
+++ b/vcl/backendtest/outputdevice/rectangle.cxx
@@ -15,9 +15,9 @@ namespace test {
namespace
{
- void drawRectOffset(OutputDevice& rDevice, Rectangle& rRect, int nOffset)
+ void drawRectOffset(OutputDevice& rDevice, tools::Rectangle& rRect, int nOffset)
{
- rDevice.DrawRect(Rectangle(rRect.Left() + nOffset, rRect.Top() + nOffset,
+ rDevice.DrawRect(tools::Rectangle(rRect.Left() + nOffset, rRect.Top() + nOffset,
rRect.Right() - nOffset, rRect.Bottom() - nOffset));
}
diff --git a/vcl/headless/svpdummies.cxx b/vcl/headless/svpdummies.cxx
index 1a3eefb0d23a..46ff2841a961 100644
--- a/vcl/headless/svpdummies.cxx
+++ b/vcl/headless/svpdummies.cxx
@@ -50,11 +50,11 @@ unsigned int SvpSalSystem::GetDisplayScreenCount()
return 1;
}
-Rectangle SvpSalSystem::GetDisplayScreenPosSizePixel( unsigned int nScreen )
+tools::Rectangle SvpSalSystem::GetDisplayScreenPosSizePixel( unsigned int nScreen )
{
- Rectangle aRect;
+ tools::Rectangle aRect;
if( nScreen == 0 )
- aRect = Rectangle( Point(0,0), Size(VIRTUAL_DESKTOP_WIDTH,VIRTUAL_DESKTOP_HEIGHT) );
+ aRect = tools::Rectangle( Point(0,0), Size(VIRTUAL_DESKTOP_WIDTH,VIRTUAL_DESKTOP_HEIGHT) );
return aRect;
}
diff --git a/vcl/headless/svpframe.cxx b/vcl/headless/svpframe.cxx
index 962cea02a69f..ef32f7dbae77 100644
--- a/vcl/headless/svpframe.cxx
+++ b/vcl/headless/svpframe.cxx
@@ -295,9 +295,9 @@ void SvpSalFrame::GetClientSize( long& rWidth, long& rHeight )
rHeight = maGeometry.nHeight;
}
-void SvpSalFrame::GetWorkArea( Rectangle& rRect )
+void SvpSalFrame::GetWorkArea( tools::Rectangle& rRect )
{
- rRect = Rectangle( Point( 0, 0 ),
+ rRect = tools::Rectangle( Point( 0, 0 ),
Size( VIRTUAL_DESKTOP_WIDTH, VIRTUAL_DESKTOP_HEIGHT ) );
}
diff --git a/vcl/headless/svptext.cxx b/vcl/headless/svptext.cxx
index bdb97a97efc7..3751a0f217e7 100644
--- a/vcl/headless/svptext.cxx
+++ b/vcl/headless/svptext.cxx
@@ -91,7 +91,7 @@ void SvpSalGraphics::GetGlyphWidths( const PhysicalFontFace* pFont,
m_aTextRenderImpl.GetGlyphWidths(pFont, bVertical, rWidths, rUnicodeEnc);
}
-bool SvpSalGraphics::GetGlyphBoundRect(const GlyphItem& rGlyph, Rectangle& rRect)
+bool SvpSalGraphics::GetGlyphBoundRect(const GlyphItem& rGlyph, tools::Rectangle& rRect)
{
return m_aTextRenderImpl.GetGlyphBoundRect(rGlyph, rRect);
}
diff --git a/vcl/inc/brdwin.hxx b/vcl/inc/brdwin.hxx
index 0911d1c8a412..43341841a399 100644
--- a/vcl/inc/brdwin.hxx
+++ b/vcl/inc/brdwin.hxx
@@ -124,7 +124,7 @@ public:
virtual void MouseMove( const MouseEvent& rMEvt ) override;
virtual void MouseButtonDown( const MouseEvent& rMEvt ) override;
virtual void Tracking( const TrackingEvent& rTEvt ) override;
- virtual void Paint( vcl::RenderContext& rRenderContext, const Rectangle& rRect ) override;
+ virtual void Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect ) override;
virtual void Activate() override;
virtual void Deactivate() override;
virtual void Resize() override;
@@ -138,7 +138,7 @@ public:
void InvalidateBorder();
using Window::Draw;
- void Draw( const Rectangle& rRect, OutputDevice* pDev, const Point& rPos );
+ void Draw( const tools::Rectangle& rRect, OutputDevice* pDev, const Point& rPos );
void SetDisplayActive( bool bActive );
void SetTitleType( BorderWindowTitleType nTitleType, const Size& rSize );
@@ -167,7 +167,7 @@ public:
sal_Int32& rRightBorder, sal_Int32& rBottomBorder ) const;
long CalcTitleWidth() const;
- Rectangle GetMenuRect() const;
+ tools::Rectangle GetMenuRect() const;
virtual Size GetOptimalSize() const override;
};
@@ -176,13 +176,13 @@ struct ImplBorderFrameData
{
VclPtr<ImplBorderWindow> mpBorderWindow;
VclPtr<OutputDevice> mpOutDev;
- Rectangle maTitleRect;
- Rectangle maCloseRect;
- Rectangle maRollRect;
- Rectangle maDockRect;
- Rectangle maMenuRect;
- Rectangle maHideRect;
- Rectangle maHelpRect;
+ tools::Rectangle maTitleRect;
+ tools::Rectangle maCloseRect;
+ tools::Rectangle maRollRect;
+ tools::Rectangle maDockRect;
+ tools::Rectangle maMenuRect;
+ tools::Rectangle maHideRect;
+ tools::Rectangle maHelpRect;
Point maMouseOff;
long mnWidth;
long mnHeight;
@@ -218,19 +218,19 @@ public:
virtual bool MouseMove( const MouseEvent& rMEvt );
virtual bool MouseButtonDown( const MouseEvent& rMEvt );
virtual bool Tracking( const TrackingEvent& rTEvt );
- virtual OUString RequestHelp( const Point& rPos, Rectangle& rHelpRect );
+ virtual OUString RequestHelp( const Point& rPos, tools::Rectangle& rHelpRect );
virtual void Init( OutputDevice* pDev, long nWidth, long nHeight ) = 0;
virtual void GetBorder( sal_Int32& rLeftBorder, sal_Int32& rTopBorder,
sal_Int32& rRightBorder, sal_Int32& rBottomBorder ) const = 0;
virtual long CalcTitleWidth() const = 0;
virtual void DrawWindow(vcl::RenderContext& rRenderContext, const Point* pOffset = nullptr) = 0;
- virtual Rectangle GetMenuRect() const;
+ virtual tools::Rectangle GetMenuRect() const;
static void ImplInitTitle( ImplBorderFrameData* pData );
static BorderWindowHitTest ImplHitTest( ImplBorderFrameData* pData, const Point& rPos );
static bool ImplMouseMove( ImplBorderFrameData* pData, const MouseEvent& rMEvt );
- static OUString ImplRequestHelp( ImplBorderFrameData* pData, const Point& rPos, Rectangle& rHelpRect );
+ static OUString ImplRequestHelp( ImplBorderFrameData* pData, const Point& rPos, tools::Rectangle& rHelpRect );
static long ImplCalcTitleWidth( const ImplBorderFrameData* pData );
};
@@ -281,8 +281,8 @@ public:
virtual bool MouseMove( const MouseEvent& rMEvt ) override;
virtual bool MouseButtonDown( const MouseEvent& rMEvt ) override;
virtual bool Tracking( const TrackingEvent& rTEvt ) override;
- virtual OUString RequestHelp( const Point& rPos, Rectangle& rHelpRect ) override;
- virtual Rectangle GetMenuRect() const override;
+ virtual OUString RequestHelp( const Point& rPos, tools::Rectangle& rHelpRect ) override;
+ virtual tools::Rectangle GetMenuRect() const override;
virtual void Init( OutputDevice* pDev, long nWidth, long nHeight ) override;
virtual void GetBorder( sal_Int32& rLeftBorder, sal_Int32& rTopBorder,
diff --git a/vcl/inc/fontsubset.hxx b/vcl/inc/fontsubset.hxx
index 58cdb1e1db71..3ec9826b8f80 100644
--- a/vcl/inc/fontsubset.hxx
+++ b/vcl/inc/fontsubset.hxx
@@ -65,7 +65,7 @@ public: // TODO: make subsetter results private and provide accessor methods ins
int m_nAscent; ///< all metrics in PS font units
int m_nDescent;
int m_nCapHeight;
- Rectangle m_aFontBBox;
+ tools::Rectangle m_aFontBBox;
FontType m_nFontType; ///< font-type of subset result
private:
diff --git a/vcl/inc/headless/svpdummies.hxx b/vcl/inc/headless/svpdummies.hxx
index c053720de79a..a14aabe2b447 100644
--- a/vcl/inc/headless/svpdummies.hxx
+++ b/vcl/inc/headless/svpdummies.hxx
@@ -55,7 +55,7 @@ public:
virtual ~SvpSalSystem() override;
// get info about the display
virtual unsigned int GetDisplayScreenCount() override;
- virtual Rectangle GetDisplayScreenPosSizePixel( unsigned int nScreen ) override;
+ virtual tools::Rectangle GetDisplayScreenPosSizePixel( unsigned int nScreen ) override;
virtual int ShowNativeDialog( const OUString& rTitle,
const OUString& rMessage,
diff --git a/vcl/inc/headless/svpframe.hxx b/vcl/inc/headless/svpframe.hxx
index ec0a2b2d55fd..c5245899c748 100644
--- a/vcl/inc/headless/svpframe.hxx
+++ b/vcl/inc/headless/svpframe.hxx
@@ -83,7 +83,7 @@ public:
virtual void SetMaxClientSize( long nWidth, long nHeight ) override;
virtual void SetPosSize( long nX, long nY, long nWidth, long nHeight, sal_uInt16 nFlags ) override;
virtual void GetClientSize( long& rWidth, long& rHeight ) override;
- virtual void GetWorkArea( Rectangle& rRect ) override;
+ virtual void GetWorkArea( tools::Rectangle& rRect ) override;
virtual SalFrame* GetParent() const override;
virtual void SetWindowState( const SalFrameState* pState ) override;
virtual bool GetWindowState( SalFrameState* pState ) override;
diff --git a/vcl/inc/headless/svpgdi.hxx b/vcl/inc/headless/svpgdi.hxx
index 64101e338182..56ed365339f2 100644
--- a/vcl/inc/headless/svpgdi.hxx
+++ b/vcl/inc/headless/svpgdi.hxx
@@ -162,7 +162,7 @@ public:
bool bVertical,
std::vector< sal_Int32 >& rWidths,
Ucs2UIntMap& rUnicodeEnc ) override;
- virtual bool GetGlyphBoundRect(const GlyphItem&, Rectangle&) override;
+ virtual bool GetGlyphBoundRect(const GlyphItem&, tools::Rectangle&) override;
virtual bool GetGlyphOutline(const GlyphItem&, basegfx::B2DPolyPolygon&) override;
virtual SalLayout* GetTextLayout( ImplLayoutArgs&, int nFallbackLevel ) override;
virtual void DrawTextLayout( const CommonSalLayout& ) override;
diff --git a/vcl/inc/helpwin.hxx b/vcl/inc/helpwin.hxx
index beb72460024d..4d9ea576f0b2 100644
--- a/vcl/inc/helpwin.hxx
+++ b/vcl/inc/helpwin.hxx
@@ -28,9 +28,9 @@ enum class QuickHelpFlags;
class HelpTextWindow : public FloatingWindow
{
private:
- Rectangle maHelpArea; // If next Help for the same rectangle w/ same text, then keep window
+ tools::Rectangle maHelpArea; // If next Help for the same rectangle w/ same text, then keep window
- Rectangle maTextRect; // For wrapped text in QuickHelp
+ tools::Rectangle maTextRect; // For wrapped text in QuickHelp
OUString maHelpText;
OUString maStatusText;
@@ -44,7 +44,7 @@ private:
private:
DECL_LINK( TimerHdl, Timer*, void );
- virtual void Paint(vcl::RenderContext& rRenderContext, const Rectangle&) override;
+ virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&) override;
virtual void RequestHelp( const HelpEvent& rHEvt ) override;
virtual void ApplySettings(vcl::RenderContext& rRenderContext) override;
virtual void StateChanged(StateChangedType nType) override;
@@ -64,20 +64,20 @@ public:
// Nur merken:
void SetStatusText( const OUString& rStatusText ) { maStatusText = rStatusText; }
- void SetHelpArea( const Rectangle& rRect ) { maHelpArea = rRect; }
+ void SetHelpArea( const tools::Rectangle& rRect ) { maHelpArea = rRect; }
void ShowHelp( sal_uInt16 nDelayMode );
Size CalcOutSize() const;
- const Rectangle& GetHelpArea() const { return maHelpArea; }
+ const tools::Rectangle& GetHelpArea() const { return maHelpArea; }
};
void ImplShowHelpWindow( vcl::Window* pParent, sal_uInt16 nHelpWinStyle, QuickHelpFlags nStyle,
const OUString& rHelpText, const OUString& rStatusText,
- const Point& rScreenPos, const Rectangle& rHelpArea );
+ const Point& rScreenPos, const tools::Rectangle& rHelpArea );
void ImplDestroyHelpWindow( bool bUpdateHideTime );
void ImplSetHelpWindowPos( vcl::Window* pHelpWindow, sal_uInt16 nHelpWinStyle, QuickHelpFlags nStyle,
- const Point& rPos, const Rectangle& rHelpArea );
+ const Point& rPos, const tools::Rectangle& rHelpArea );
#endif // INCLUDED_VCL_INC_HELPWIN_HXX
diff --git a/vcl/inc/listbox.hxx b/vcl/inc/listbox.hxx
index 84a9a6cfd054..43fe803bfaf6 100644
--- a/vcl/inc/listbox.hxx
+++ b/vcl/inc/listbox.hxx
@@ -165,7 +165,7 @@ class ImplListBoxWindow : public Control, public vcl::ISearchableStringList
{
private:
ImplEntryList* mpEntryList; ///< EntryList
- Rectangle maFocusRect;
+ tools::Rectangle maFocusRect;
Size maUserItemSize;
@@ -230,14 +230,14 @@ protected:
virtual void MouseButtonDown( const MouseEvent& rMEvt ) override;
virtual void MouseMove( const MouseEvent& rMEvt ) override;
virtual void Tracking( const TrackingEvent& rTEvt ) override;
- virtual void Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) override;
+ virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) override;
virtual void Resize() override;
virtual void GetFocus() override;
virtual void LoseFocus() override;
bool SelectEntries( sal_Int32 nSelect, LB_EVENT_TYPE eLET, bool bShift = false, bool bCtrl = false, bool bSelectPosChange = false );
void ImplPaint(vcl::RenderContext& rRenderContext, sal_Int32 nPos);
- void ImplDoPaint(vcl::RenderContext& rRenderContext, const Rectangle& rRect);
+ void ImplDoPaint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect);
void ImplCalcMetrics();
void ImplUpdateEntryMetrics( ImplEntryType& rEntry );
void ImplCallSelect();
@@ -311,7 +311,7 @@ public:
bool IsMouseMoveSelect() const { return mbMouseMoveSelect||mbStackMode; }
Size CalcSize(sal_Int32 nMaxLines) const;
- Rectangle GetBoundingRectangle( sal_Int32 nItem ) const;
+ tools::Rectangle GetBoundingRectangle( sal_Int32 nItem ) const;
long GetEntryHeight() const { return mnMaxHeight; }
long GetMaxEntryWidth() const { return mnMaxWidth; }
@@ -512,7 +512,7 @@ private:
OUString maString;
Image maImage;
- Rectangle maFocusRect;
+ tools::Rectangle maFocusRect;
Link<void*,void> maMBDownHdl;
Link<UserDrawEvent*, void> maUserDrawHdl;
@@ -529,7 +529,7 @@ public:
ImplWin( vcl::Window* pParent, WinBits nWinStyle );
virtual void MouseButtonDown( const MouseEvent& rMEvt ) override;
- virtual void Paint( vcl::RenderContext& rRenderContext, const Rectangle& rRect ) override;
+ virtual void Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect ) override;
virtual void Resize() override;
virtual void GetFocus() override;
virtual void LoseFocus() override;
@@ -554,7 +554,7 @@ public:
bool GetEdgeBlending() const { return mbEdgeBlending; }
void SetEdgeBlending(bool bNew) { mbEdgeBlending = bNew; }
- virtual void ShowFocus(const Rectangle& rRect) override;
+ virtual void ShowFocus(const tools::Rectangle& rRect) override;
using Control::ImplInitSettings;
virtual void ApplySettings(vcl::RenderContext& rRenderContext) override;
diff --git a/vcl/inc/opengl/RenderState.hxx b/vcl/inc/opengl/RenderState.hxx
index b7b2f18a692b..c0f1b725f1bc 100644
--- a/vcl/inc/opengl/RenderState.hxx
+++ b/vcl/inc/opengl/RenderState.hxx
@@ -153,13 +153,13 @@ class RenderState
StencilState maStencil;
BlendState maBlend;
- Rectangle maCurrentViewport;
+ tools::Rectangle maCurrentViewport;
public:
RenderState()
{}
- void viewport(Rectangle aViewPort)
+ void viewport(tools::Rectangle aViewPort)
{
if (aViewPort != maCurrentViewport)
{
diff --git a/vcl/inc/opengl/texture.hxx b/vcl/inc/opengl/texture.hxx
index 3a06b2a48c77..3485c4f332a1 100644
--- a/vcl/inc/opengl/texture.hxx
+++ b/vcl/inc/opengl/texture.hxx
@@ -72,7 +72,7 @@ class VCL_DLLPUBLIC OpenGLTexture final
private:
// if the rect size doesn't match the mpImpl one, this instance
// is a sub-area from the real OpenGL texture
- Rectangle maRect;
+ tools::Rectangle maRect;
std::shared_ptr<ImplOpenGLTexture> mpImpl;
int mnSlotNumber;
@@ -85,7 +85,7 @@ private:
public:
OpenGLTexture();
- OpenGLTexture(const std::shared_ptr<ImplOpenGLTexture>& pImpl, Rectangle aRectangle, int nSlotNumber);
+ OpenGLTexture(const std::shared_ptr<ImplOpenGLTexture>& pImpl, tools::Rectangle aRectangle, int nSlotNumber);
OpenGLTexture( int nWidth, int nHeight, bool bAllocate = true );
OpenGLTexture( int nWidth, int nHeight, int nFormat, int nType, void const * pData );
diff --git a/vcl/inc/openglgdiimpl.hxx b/vcl/inc/openglgdiimpl.hxx
index f3d603c0f1be..1f546b0dd240 100644
--- a/vcl/inc/openglgdiimpl.hxx
+++ b/vcl/inc/openglgdiimpl.hxx
@@ -126,7 +126,7 @@ public:
void DrawConvexPolygon( const tools::Polygon& rPolygon, bool blockAA );
void DrawTrapezoid( const basegfx::B2DTrapezoid& trapezoid, bool blockAA );
void DrawRect( long nX, long nY, long nWidth, long nHeight );
- void DrawRect( const Rectangle& rRect );
+ void DrawRect( const tools::Rectangle& rRect );
void DrawPolygon( sal_uInt32 nPoints, const SalPoint* pPtAry );
void DrawLineSegment(float x1, float y1, float x2, float y2);
void DrawPolyPolygon( const basegfx::B2DPolyPolygon& rPolyPolygon, bool blockAA = false );
@@ -139,9 +139,9 @@ public:
void DrawTextureWithMask( OpenGLTexture& rTexture, OpenGLTexture& rMask, const SalTwoRect& rPosAry );
void DrawBlendedTexture( OpenGLTexture& rTexture, OpenGLTexture& rMask, OpenGLTexture& rAlpha, const SalTwoRect& rPosAry );
void DrawMask( OpenGLTexture& rTexture, SalColor nMaskColor, const SalTwoRect& rPosAry );
- void DrawLinearGradient( const Gradient& rGradient, const Rectangle& rRect );
- void DrawAxialGradient( const Gradient& rGradient, const Rectangle& rRect );
- void DrawRadialGradient( const Gradient& rGradient, const Rectangle& rRect );
+ void DrawLinearGradient( const Gradient& rGradient, const tools::Rectangle& rRect );
+ void DrawAxialGradient( const Gradient& rGradient, const tools::Rectangle& rRect );
+ void DrawRadialGradient( const Gradient& rGradient, const tools::Rectangle& rRect );
void DeferredTextDraw(OpenGLTexture& rTexture, const SalColor nMaskColor, const SalTwoRect& rPosAry);
void FlushDeferredDrawing();
diff --git a/vcl/inc/osx/salframe.h b/vcl/inc/osx/salframe.h
index 94afaf3e9f0e..4b6d486f6be6 100644
--- a/vcl/inc/osx/salframe.h
+++ b/vcl/inc/osx/salframe.h
@@ -87,7 +87,7 @@ public:
std::list<AquaBlinker*> maBlinkers;
- Rectangle maInvalidRect;
+ tools::Rectangle maInvalidRect;
InputContextFlags mnICOptions;
@@ -118,7 +118,7 @@ public:
virtual void SetMaxClientSize( long nWidth, long nHeight ) override;
virtual void SetPosSize( long nX, long nY, long nWidth, long nHeight, sal_uInt16 nFlags ) override;
virtual void GetClientSize( long& rWidth, long& rHeight ) override;
- virtual void GetWorkArea( Rectangle& rRect ) override;
+ virtual void GetWorkArea( tools::Rectangle& rRect ) override;
virtual SalFrame* GetParent() const override;
virtual void SetWindowState( const SalFrameState* pState ) override;
virtual bool GetWindowState( SalFrameState* pState ) override;
@@ -130,7 +130,7 @@ public:
virtual void CaptureMouse( bool bMouse ) override;
virtual void SetPointerPos( long nX, long nY ) override;
virtual void Flush( void ) override;
- virtual void Flush( const Rectangle& ) override;
+ virtual void Flush( const tools::Rectangle& ) override;
virtual void SetInputContext( SalInputContext* pContext ) override;
virtual void EndExtTextInput( EndExtTextInputFlags nFlags ) override;
virtual OUString GetKeyName( sal_uInt16 nKeyCode ) override;
@@ -161,7 +161,7 @@ public:
void UpdateFrameGeometry();
// trigger painting of the window
- void SendPaintEvent( const Rectangle* pRect = nullptr );
+ void SendPaintEvent( const tools::Rectangle* pRect = nullptr );
static bool isAlive( const AquaSalFrame* pFrame )
{ return GetSalData()->maFrameCheck.find( pFrame ) != GetSalData()->maFrameCheck.end(); }
diff --git a/vcl/inc/osx/salmenu.h b/vcl/inc/osx/salmenu.h
index f21c750bcc01..4d3ffaaf752e 100644
--- a/vcl/inc/osx/salmenu.h
+++ b/vcl/inc/osx/salmenu.h
@@ -69,10 +69,10 @@ public:
virtual void SetItemImage( unsigned nPos, SalMenuItem* pSalMenuItem, const Image& rImage) override;
virtual void SetAccelerator( unsigned nPos, SalMenuItem* pSalMenuItem, const vcl::KeyCode& rKeyCode, const OUString& rKeyName ) override;
virtual void GetSystemMenuData( SystemMenuData* pData ) override;
- virtual bool ShowNativePopupMenu(FloatingWindow * pWin, const Rectangle& rRect, FloatWinPopupFlags nFlags) override;
+ virtual bool ShowNativePopupMenu(FloatingWindow * pWin, const tools::Rectangle& rRect, FloatWinPopupFlags nFlags) override;
virtual bool AddMenuBarButton( const SalMenuButtonItem& ) override;
virtual void RemoveMenuBarButton( sal_uInt16 nId ) override;
- virtual Rectangle GetMenuBarButtonRectPixel( sal_uInt16 i_nItemId, SalFrame* i_pReferenceFrame ) override;
+ virtual tools::Rectangle GetMenuBarButtonRectPixel( sal_uInt16 i_nItemId, SalFrame* i_pReferenceFrame ) override;
int getItemIndexByPos( sal_uInt16 nPos ) const;
const AquaSalFrame* getFrame() const;
diff --git a/vcl/inc/osx/salsys.h b/vcl/inc/osx/salsys.h
index e1b18f90d124..c619a99eef4e 100644
--- a/vcl/inc/osx/salsys.h
+++ b/vcl/inc/osx/salsys.h
@@ -33,7 +33,7 @@ public:
// get info about the display
virtual unsigned int GetDisplayScreenCount() override;
- virtual Rectangle GetDisplayScreenPosSizePixel( unsigned int nScreen ) override;
+ virtual tools::Rectangle GetDisplayScreenPosSizePixel( unsigned int nScreen ) override;
virtual int ShowNativeMessageBox( const OUString& rTitle,
const OUString& rMessage) override;
diff --git a/vcl/inc/outdev.h b/vcl/inc/outdev.h
index 82750c23748a..33fa41255f66 100644
--- a/vcl/inc/outdev.h
+++ b/vcl/inc/outdev.h
@@ -132,7 +132,7 @@ struct ImplOutDevData
{
VclPtr<VirtualDevice> mpRotateDev;
vcl::ControlLayoutData* mpRecordLayout;
- Rectangle maRecordRect;
+ tools::Rectangle maRecordRect;
// #i75163#
basegfx::B2DHomMatrix* mpViewTransform;
diff --git a/vcl/inc/printdlg.hxx b/vcl/inc/printdlg.hxx
index 530275b0088c..b8129dcd8b93 100644
--- a/vcl/inc/printdlg.hxx
+++ b/vcl/inc/printdlg.hxx
@@ -59,7 +59,7 @@ namespace vcl
virtual ~PrintPreviewWindow() override;
virtual void dispose() override;
- virtual void Paint( vcl::RenderContext& rRenderContext, const Rectangle& rRect ) override;
+ virtual void Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect ) override;
virtual void Command( const CommandEvent& ) override;
virtual void Resize() override;
virtual void DataChanged( const DataChangedEvent& ) override;
@@ -82,7 +82,7 @@ namespace vcl
virtual Size GetOptimalSize() const override;
- virtual void Paint( vcl::RenderContext& rRenderContext, const Rectangle& ) override;
+ virtual void Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& ) override;
void setValues( NupOrderType i_nOrderMode, int i_nColumns, int i_nRows )
{
diff --git a/vcl/inc/quartz/salgdi.h b/vcl/inc/quartz/salgdi.h
index 248d07eb37ba..6d29fccb1d6a 100644
--- a/vcl/inc/quartz/salgdi.h
+++ b/vcl/inc/quartz/salgdi.h
@@ -89,7 +89,7 @@ public:
~CoreTextStyle( void );
void GetFontMetric( ImplFontMetricDataRef& ) const;
- bool GetGlyphBoundRect(const GlyphItem&, Rectangle&) const;
+ bool GetGlyphBoundRect(const GlyphItem&, tools::Rectangle&) const;
bool GetGlyphOutline(const GlyphItem&, basegfx::B2DPolyPolygon&) const;
hb_font_t* GetHbFont() const { return mpHbFont; }
void SetHbFont(hb_font_t* pHbFont) const { mpHbFont = pHbFont; }
@@ -292,14 +292,14 @@ public:
// native widget rendering methods that require mirroring
#ifdef MACOSX
- virtual bool hitTestNativeControl( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion,
+ virtual bool hitTestNativeControl( ControlType nType, ControlPart nPart, const tools::Rectangle& rControlRegion,
const Point& aPos, bool& rIsInside ) override;
- virtual bool drawNativeControl( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion,
+ virtual bool drawNativeControl( ControlType nType, ControlPart nPart, const tools::Rectangle& rControlRegion,
ControlState nState, const ImplControlValue& aValue,
const OUString& aCaption ) override;
- virtual bool getNativeControlRegion( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion, ControlState nState,
+ virtual bool getNativeControlRegion( ControlType nType, ControlPart nPart, const tools::Rectangle& rControlRegion, ControlState nState,
const ImplControlValue& aValue, const OUString& aCaption,
- Rectangle &rNativeBoundingRegion, Rectangle &rNativeContentRegion ) override;
+ tools::Rectangle &rNativeBoundingRegion, tools::Rectangle &rNativeContentRegion ) override;
#endif
// get device resolution
@@ -375,7 +375,7 @@ public:
std::vector< sal_Int32 >& rWidths,
Ucs2UIntMap& rUnicodeEnc ) override;
- virtual bool GetGlyphBoundRect(const GlyphItem&, Rectangle&) override;
+ virtual bool GetGlyphBoundRect(const GlyphItem&, tools::Rectangle&) override;
virtual bool GetGlyphOutline(const GlyphItem&, basegfx::B2DPolyPolygon&) override;
virtual SalLayout* GetTextLayout( ImplLayoutArgs&, int nFallbackLevel ) override;
diff --git a/vcl/inc/regionband.hxx b/vcl/inc/regionband.hxx
index 91a13ebffcbf..1fb5db93a410 100644
--- a/vcl/inc/regionband.hxx
+++ b/vcl/inc/regionband.hxx
@@ -41,7 +41,7 @@ public:
RegionBand();
RegionBand(const RegionBand&);
RegionBand& operator=(const RegionBand&);
- RegionBand(const Rectangle&);
+ RegionBand(const tools::Rectangle&);
~RegionBand();
bool operator==( const RegionBand& rRegionBand ) const;
@@ -70,7 +70,7 @@ public:
void Intersect(const RegionBand& rSource);
bool Exclude(const RegionBand& rSource);
void XOr(const RegionBand& rSource);
- Rectangle GetBoundRect() const;
+ tools::Rectangle GetBoundRect() const;
bool IsInside(const Point& rPoint) const;
sal_uInt32 getRectangleCount() const; // only users are Region::Intersect, Region::IsRectangle and PSWriter::ImplBmp
void GetRegionRectangles(RectangleVector& rTarget) const;
diff --git a/vcl/inc/salframe.hxx b/vcl/inc/salframe.hxx
index a0a65aa5c48a..4cea89eae3a3 100644
--- a/vcl/inc/salframe.hxx
+++ b/vcl/inc/salframe.hxx
@@ -147,7 +147,7 @@ public:
virtual void SetMaxClientSize( long nWidth, long nHeight ) = 0;
virtual void SetPosSize( long nX, long nY, long nWidth, long nHeight, sal_uInt16 nFlags ) = 0;
virtual void GetClientSize( long& rWidth, long& rHeight ) = 0;
- virtual void GetWorkArea( Rectangle& rRect ) = 0;
+ virtual void GetWorkArea( tools::Rectangle& rRect ) = 0;
virtual SalFrame* GetParent() const = 0;
// Note: x will be mirrored at parent if UI mirroring is active
SalFrameGeometry GetGeometry();
@@ -175,7 +175,7 @@ public:
// flush output buffer
virtual void Flush() = 0;
- virtual void Flush( const Rectangle& );
+ virtual void Flush( const tools::Rectangle& );
virtual void SetInputContext( SalInputContext* pContext ) = 0;
virtual void EndExtTextInput( EndExtTextInputFlags nFlags ) = 0;
@@ -239,19 +239,19 @@ public:
}
// return true to indicate tooltips are shown natively, false otherwise
- virtual bool ShowTooltip(const OUString& /*rHelpText*/, const Rectangle& /*rHelpArea*/)
+ virtual bool ShowTooltip(const OUString& /*rHelpText*/, const tools::Rectangle& /*rHelpArea*/)
{
return false;
}
// return !0 to indicate popovers are shown natively, 0 otherwise
- virtual sal_uIntPtr ShowPopover(const OUString& /*rHelpText*/, const Rectangle& /*rHelpArea*/, QuickHelpFlags /*nFlags*/)
+ virtual sal_uIntPtr ShowPopover(const OUString& /*rHelpText*/, const tools::Rectangle& /*rHelpArea*/, QuickHelpFlags /*nFlags*/)
{
return 0;
}
// return true to indicate popovers are shown natively, false otherwise
- virtual bool UpdatePopover(sal_uIntPtr /*nId*/, const OUString& /*rHelpText*/, const Rectangle& /*rHelpArea*/)
+ virtual bool UpdatePopover(sal_uIntPtr /*nId*/, const OUString& /*rHelpText*/, const tools::Rectangle& /*rHelpArea*/)
{
return false;
}
diff --git a/vcl/inc/salgdi.hxx b/vcl/inc/salgdi.hxx
index a2b67c07ede3..e914b6493dff 100644
--- a/vcl/inc/salgdi.hxx
+++ b/vcl/inc/salgdi.hxx
@@ -39,7 +39,7 @@ class FontAttributes;
class PhysicalFontFace;
class SalLayout;
class ImplLayoutArgs;
-class Rectangle;
+namespace tools { class Rectangle; }
class FontSubsetInfo;
class OpenGLContext;
class OutputDevice;
@@ -189,7 +189,7 @@ public:
std::vector< sal_Int32 >& rWidths,
Ucs2UIntMap& rUnicodeEnc ) = 0;
- virtual bool GetGlyphBoundRect(const GlyphItem&, Rectangle&) = 0;
+ virtual bool GetGlyphBoundRect(const GlyphItem&, tools::Rectangle&) = 0;
virtual bool GetGlyphOutline(const GlyphItem&, basegfx::B2DPolyPolygon&) = 0;
virtual SalLayout* GetTextLayout( ImplLayoutArgs&, int nFallbackLevel ) = 0;
@@ -204,7 +204,7 @@ public:
void mirror( long& nX, const OutputDevice *pOutDev ) const;
void mirror( long& nX, long& nWidth, const OutputDevice *pOutDev, bool bBack = false ) const;
bool mirror( sal_uInt32 nPoints, const SalPoint *pPtAry, SalPoint *pPtAry2, const OutputDevice *pOutDev ) const;
- void mirror( Rectangle& rRect, const OutputDevice*, bool bBack = false ) const;
+ void mirror( tools::Rectangle& rRect, const OutputDevice*, bool bBack = false ) const;
void mirror( vcl::Region& rRgn, const OutputDevice *pOutDev ) const;
void mirror( ImplControlValue&, const OutputDevice* ) const;
basegfx::B2DPoint mirror( const basegfx::B2DPoint& i_rPoint, const OutputDevice *pOutDev ) const;
@@ -353,7 +353,7 @@ public:
*/
bool HitTestNativeScrollbar(
ControlPart nPart,
- const Rectangle& rControlRegion,
+ const tools::Rectangle& rControlRegion,
const Point& aPos,
bool& rIsInside,
const OutputDevice *pOutDev );
@@ -366,7 +366,7 @@ public:
bool DrawNativeControl(
ControlType nType,
ControlPart nPart,
- const Rectangle& rControlRegion,
+ const tools::Rectangle& rControlRegion,
ControlState nState,
const ImplControlValue& aValue,
const OUString& aCaption,
@@ -380,12 +380,12 @@ public:
bool GetNativeControlRegion(
ControlType nType,
ControlPart nPart,
- const Rectangle& rControlRegion,
+ const tools::Rectangle& rControlRegion,
ControlState nState,
const ImplControlValue& aValue,
const OUString& aCaption,
- Rectangle &rNativeBoundingRegion,
- Rectangle &rNativeContentRegion,
+ tools::Rectangle &rNativeBoundingRegion,
+ tools::Rectangle &rNativeContentRegion,
const OutputDevice *pOutDev );
bool BlendBitmap(
@@ -540,7 +540,7 @@ protected:
*/
virtual bool hitTestNativeControl(
ControlType eType, ControlPart ePart,
- const Rectangle& rBoundingControlRegion,
+ const tools::Rectangle& rBoundingControlRegion,
const Point& aPos, bool& rIsInside );
/**
@@ -557,7 +557,7 @@ protected:
*/
virtual bool drawNativeControl(
ControlType eType, ControlPart ePart,
- const Rectangle& rBoundingControlRegion,
+ const tools::Rectangle& rBoundingControlRegion,
ControlState eState,
const ImplControlValue& aValue,
const OUString& aCaption );
@@ -583,12 +583,12 @@ protected:
*/
virtual bool getNativeControlRegion(
ControlType eType, ControlPart ePart,
- const Rectangle& rBoundingControlRegion,
+ const tools::Rectangle& rBoundingControlRegion,
ControlState eState,
const ImplControlValue& aValue,
const OUString& aCaption,
- Rectangle &rNativeBoundingRegion,
- Rectangle &rNativeContentRegion );
+ tools::Rectangle &rNativeBoundingRegion,
+ tools::Rectangle &rNativeContentRegion );
/** Blend the bitmap with the current buffer */
virtual bool blendBitmap(
diff --git a/vcl/inc/sallayout.hxx b/vcl/inc/sallayout.hxx
index b1ded19700a4..9dbe269a82b1 100644
--- a/vcl/inc/sallayout.hxx
+++ b/vcl/inc/sallayout.hxx
@@ -178,7 +178,7 @@ public:
virtual int GetNextGlyphs(int nLen, const GlyphItem** pGlyphs, Point& rPos, int&,
const PhysicalFontFace** pFallbackFonts = nullptr) const = 0;
virtual bool GetOutline( SalGraphics&, basegfx::B2DPolyPolygonVector& ) const;
- virtual bool GetBoundRect( SalGraphics&, Rectangle& ) const;
+ virtual bool GetBoundRect( SalGraphics&, tools::Rectangle& ) const;
// reference counting
void Release() const;
diff --git a/vcl/inc/salmenu.hxx b/vcl/inc/salmenu.hxx
index 8b2b5e20335f..169d887068da 100644
--- a/vcl/inc/salmenu.hxx
+++ b/vcl/inc/salmenu.hxx
@@ -74,7 +74,7 @@ public:
virtual void SetItemImage( unsigned nPos, SalMenuItem* pSalMenuItem, const Image& rImage ) = 0;
virtual void SetAccelerator( unsigned nPos, SalMenuItem* pSalMenuItem, const vcl::KeyCode& rKeyCode, const OUString& rKeyName ) = 0;
virtual void GetSystemMenuData( SystemMenuData* pData ) = 0;
- virtual bool ShowNativePopupMenu(FloatingWindow * pWin, const Rectangle& rRect, FloatWinPopupFlags nFlags);
+ virtual bool ShowNativePopupMenu(FloatingWindow * pWin, const tools::Rectangle& rRect, FloatWinPopupFlags nFlags);
virtual void ShowCloseButton(bool bShow);
virtual bool AddMenuBarButton( const SalMenuButtonItem& ); // return false if not implemented or failure
virtual void RemoveMenuBarButton( sal_uInt16 nId );
@@ -89,7 +89,7 @@ public:
// return an empty rectangle if not implemented
// return Rectangle( Point( -1, -1 ), Size( 1, 1 ) ) if menu bar buttons implemented
// but rectangle cannot be determined
- virtual Rectangle GetMenuBarButtonRectPixel( sal_uInt16 i_nItemId, SalFrame* i_pReferenceFrame );
+ virtual tools::Rectangle GetMenuBarButtonRectPixel( sal_uInt16 i_nItemId, SalFrame* i_pReferenceFrame );
};
#endif // INCLUDED_VCL_INC_SALMENU_HXX
diff --git a/vcl/inc/salsys.hxx b/vcl/inc/salsys.hxx
index bc273f07ddee..5e3478e45b2b 100644
--- a/vcl/inc/salsys.hxx
+++ b/vcl/inc/salsys.hxx
@@ -63,7 +63,7 @@ public:
else position relative to whole display
size: size of the screen
*/
- virtual Rectangle GetDisplayScreenPosSizePixel( unsigned int nScreen ) = 0;
+ virtual tools::Rectangle GetDisplayScreenPosSizePixel( unsigned int nScreen ) = 0;
/* Shows a native message box with the specified title, message and button
combination.
diff --git a/vcl/inc/scrwnd.hxx b/vcl/inc/scrwnd.hxx
index be8445e681a8..db002d2290e6 100644
--- a/vcl/inc/scrwnd.hxx
+++ b/vcl/inc/scrwnd.hxx
@@ -66,7 +66,7 @@ private:
protected:
- virtual void Paint( vcl::RenderContext& rRenderContext, const Rectangle& rRect ) override;
+ virtual void Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect ) override;
virtual void MouseMove( const MouseEvent& rMEvt ) override;
virtual void MouseButtonUp( const MouseEvent& rMEvt ) override;
diff --git a/vcl/inc/spin.hxx b/vcl/inc/spin.hxx
index 4961ebd7efa9..7b7fbe11bd40 100644
--- a/vcl/inc/spin.hxx
+++ b/vcl/inc/spin.hxx
@@ -22,18 +22,18 @@
#include <vcl/window.hxx>
-class Rectangle;
+namespace tools { class Rectangle; }
// Draw Spinners as found in a SpinButton. Some themes like gtk3 will draw +- elements here,
// so these are only suitable in the context of SpinButtons
void ImplDrawSpinButton(vcl::RenderContext& rRenderContext, vcl::Window* pWindow,
- const Rectangle& rUpperRect, const Rectangle& rLowerRect,
+ const tools::Rectangle& rUpperRect, const tools::Rectangle& rLowerRect,
bool bUpperIn, bool bLowerIn, bool bUpperEnabled = true, bool bLowerEnabled = true,
bool bHorz = false, bool bMirrorHorz = false);
// Draw Up/Down buttons suitable for use in any context
void ImplDrawUpDownButtons(vcl::RenderContext& rRenderContext,
- const Rectangle& rUpperRect, const Rectangle& rLowerRect,
+ const tools::Rectangle& rUpperRect, const tools::Rectangle& rLowerRect,
bool bUpperIn, bool bLowerIn, bool bUpperEnabled, bool bLowerEnabled,
bool bHorz, bool bMirrorHorz = false);
diff --git a/vcl/inc/test/outputdevice.hxx b/vcl/inc/test/outputdevice.hxx
index 0192bf9a4d5a..c75720f53d69 100644
--- a/vcl/inc/test/outputdevice.hxx
+++ b/vcl/inc/test/outputdevice.hxx
@@ -36,7 +36,7 @@ class VCL_DLLPUBLIC OutputDeviceTestCommon
protected:
ScopedVclPtr<VirtualDevice> mpVirtualDevice;
- Rectangle maVDRectangle;
+ tools::Rectangle maVDRectangle;
static const Color constBackgroundColor;
static const Color constLineColor;
@@ -55,16 +55,16 @@ public:
static TestResult checkRectangles(Bitmap& rBitmap, std::vector<Color>& aExpectedColors);
- static void createDiamondPoints(Rectangle rRect, int nOffset,
+ static void createDiamondPoints(tools::Rectangle rRect, int nOffset,
Point& rPoint1, Point& rPoint2,
Point& rPoint3, Point& rPoint4);
- static void createHorizontalVerticalDiagonalLinePoints(Rectangle rRect,
+ static void createHorizontalVerticalDiagonalLinePoints(tools::Rectangle rRect,
Point& rHorizontalLinePoint1, Point& rHorizontalLinePoint2,
Point& rVerticalLinePoint1, Point& rVerticalLinePoint2,
Point& rDiagonalLinePoint1, Point& rDiagonalLinePoint2);
// tools
- static Rectangle alignToCenter(Rectangle aRect1, Rectangle aRect2);
+ static tools::Rectangle alignToCenter(tools::Rectangle aRect1, tools::Rectangle aRect2);
};
diff --git a/vcl/inc/textlayout.hxx b/vcl/inc/textlayout.hxx
index a8a4124daafb..ae478847c2dc 100644
--- a/vcl/inc/textlayout.hxx
+++ b/vcl/inc/textlayout.hxx
@@ -90,11 +90,11 @@ namespace vcl
ControlTextRenderer( const Control& _rControl, OutputDevice& _rTargetDevice, OutputDevice& _rReferenceDevice );
~ControlTextRenderer();
- Rectangle DrawText( const Rectangle& _rRect,
+ tools::Rectangle DrawText( const tools::Rectangle& _rRect,
const OUString& _rText, DrawTextFlags _nStyle,
MetricVector* _pVector, OUString* _pDisplayText, const Size* i_pDeviceSize );
- Rectangle GetTextRect( const Rectangle& _rRect,
+ tools::Rectangle GetTextRect( const tools::Rectangle& _rRect,
const OUString& _rText, DrawTextFlags _nStyle, Size* o_pDeviceSize );
private:
diff --git a/vcl/inc/textrender.hxx b/vcl/inc/textrender.hxx
index 1b04725398ce..ebcb7a081f7c 100644
--- a/vcl/inc/textrender.hxx
+++ b/vcl/inc/textrender.hxx
@@ -59,7 +59,7 @@ public:
std::vector< sal_Int32 >& rWidths,
Ucs2UIntMap& rUnicodeEnc ) = 0;
- virtual bool GetGlyphBoundRect(const GlyphItem&, Rectangle&) = 0;
+ virtual bool GetGlyphBoundRect(const GlyphItem&, tools::Rectangle&) = 0;
virtual bool GetGlyphOutline(const GlyphItem&, basegfx::B2DPolyPolygon&) = 0;
virtual SalLayout* GetTextLayout( ImplLayoutArgs&, int nFallbackLevel ) = 0;
virtual void DrawTextLayout(const CommonSalLayout&) = 0;
diff --git a/vcl/inc/toolbox.h b/vcl/inc/toolbox.h
index f8f798d5a079..18f94aeb5f5e 100644
--- a/vcl/inc/toolbox.h
+++ b/vcl/inc/toolbox.h
@@ -44,8 +44,8 @@ struct ImplToolItem
OUString maHelpText;
OUString maCommandStr;
OString maHelpId;
- Rectangle maRect;
- Rectangle maCalcRect;
+ tools::Rectangle maRect;
+ tools::Rectangle maCalcRect;
/// Widget layout may request size; set it as the minimal size (like, the item will always have at least this size).
Size maMinimalItemSize;
/// The overall horizontal item size, including one or more of [image size + textlength + dropdown arrow]
@@ -87,7 +87,7 @@ struct ImplToolItem
// returns the rectangle which contains the drop down arrow
// or an empty rect if there is none
// bHorz denotes the toolbox alignment
- Rectangle GetDropDownRect( bool bHorz ) const;
+ tools::Rectangle GetDropDownRect( bool bHorz ) const;
// returns sal_True if the toolbar item is currently clipped, which can happen for docked toolbars
bool IsClipped() const;
@@ -128,7 +128,7 @@ struct ImplToolBoxPrivateData
// the optional custom menu
VclPtr<PopupMenu> mpMenu;
- Rectangle maMenuRect;
+ tools::Rectangle maMenuRect;
ToolBoxMenuType maMenuType;
ImplSVEvent * mnEventId;
diff --git a/vcl/inc/unx/cairotextrender.hxx b/vcl/inc/unx/cairotextrender.hxx
index 1cdf405f1dc9..2e6d1a57d63e 100644
--- a/vcl/inc/unx/cairotextrender.hxx
+++ b/vcl/inc/unx/cairotextrender.hxx
@@ -75,7 +75,7 @@ public:
std::vector< sal_Int32 >& rWidths,
Ucs2UIntMap& rUnicodeEnc ) override;
- virtual bool GetGlyphBoundRect(const GlyphItem&, Rectangle&) override;
+ virtual bool GetGlyphBoundRect(const GlyphItem&, tools::Rectangle&) override;
virtual bool GetGlyphOutline(const GlyphItem&, basegfx::B2DPolyPolygon&) override;
virtual SalLayout* GetTextLayout( ImplLayoutArgs&, int nFallbackLevel ) override;
virtual void DrawTextLayout(const CommonSalLayout&) override;
diff --git a/vcl/inc/unx/genpspgraphics.h b/vcl/inc/unx/genpspgraphics.h
index 721efd56245c..b37bb909d1f2 100644
--- a/vcl/inc/unx/genpspgraphics.h
+++ b/vcl/inc/unx/genpspgraphics.h
@@ -115,7 +115,7 @@ public:
bool bVertical,
std::vector< sal_Int32 >& rWidths,
Ucs2UIntMap& rUnicodeEnc ) override;
- virtual bool GetGlyphBoundRect(const GlyphItem&, Rectangle&) override;
+ virtual bool GetGlyphBoundRect(const GlyphItem&, tools::Rectangle&) override;
virtual bool GetGlyphOutline(const GlyphItem&, basegfx::B2DPolyPolygon&) override;
virtual SalLayout* GetTextLayout( ImplLayoutArgs&, int nFallbackLevel ) override;
virtual void DrawTextLayout( const CommonSalLayout& ) override;
diff --git a/vcl/inc/unx/glyphcache.hxx b/vcl/inc/unx/glyphcache.hxx
index 8d66fbb23eac..ba889d7d876a 100644
--- a/vcl/inc/unx/glyphcache.hxx
+++ b/vcl/inc/unx/glyphcache.hxx
@@ -100,14 +100,14 @@ class GlyphData
public:
GlyphData() : mnLruValue(0) {}
- const Rectangle& GetBoundRect() const { return maBoundRect; }
- void SetBoundRect(Rectangle r) { maBoundRect = r; }
+ const tools::Rectangle& GetBoundRect() const { return maBoundRect; }
+ void SetBoundRect(tools::Rectangle r) { maBoundRect = r; }
void SetLruValue( int n ) const { mnLruValue = n; }
long GetLruValue() const { return mnLruValue;}
private:
- Rectangle maBoundRect;
+ tools::Rectangle maBoundRect;
// used by GlyphCache for cache LRU algorithm
mutable long mnLruValue;
@@ -136,7 +136,7 @@ public:
const FontCharMapRef GetFontCharMap() const;
bool GetFontCapabilities(vcl::FontCapabilities &) const;
- const Rectangle& GetGlyphBoundRect(const GlyphItem& rGlyph);
+ const tools::Rectangle& GetGlyphBoundRect(const GlyphItem& rGlyph);
bool GetGlyphOutline(const GlyphItem& rGlyph, basegfx::B2DPolyPolygon&) const;
bool GetAntialiasAdvice() const;
hb_font_t* GetHbFont() { return mpHbFont; }
diff --git a/vcl/inc/unx/gtk/gtkframe.hxx b/vcl/inc/unx/gtk/gtkframe.hxx
index ad615048ec86..5ab7296081b0 100644
--- a/vcl/inc/unx/gtk/gtkframe.hxx
+++ b/vcl/inc/unx/gtk/gtkframe.hxx
@@ -204,11 +204,11 @@ class GtkSalFrame : public SalFrame
Size m_aMaxSize;
Size m_aMinSize;
- Rectangle m_aRestorePosSize;
+ tools::Rectangle m_aRestorePosSize;
#if GTK_CHECK_VERSION(3,0,0)
OUString m_aTooltip;
- Rectangle m_aHelpArea;
+ tools::Rectangle m_aHelpArea;
long m_nWidthRequest;
long m_nHeightRequest;
cairo_region_t* m_pRegion;
@@ -341,7 +341,7 @@ class GtkSalFrame : public SalFrame
enum class SetType { RetainSize, Fullscreen, UnFullscreen };
- void SetScreen( unsigned int nNewScreen, SetType eType, Rectangle *pSize = nullptr );
+ void SetScreen( unsigned int nNewScreen, SetType eType, tools::Rectangle *pSize = nullptr );
public:
#if GTK_CHECK_VERSION(3,0,0)
@@ -457,7 +457,7 @@ public:
virtual void SetMaxClientSize( long nWidth, long nHeight ) override;
virtual void SetPosSize( long nX, long nY, long nWidth, long nHeight, sal_uInt16 nFlags ) override;
virtual void GetClientSize( long& rWidth, long& rHeight ) override;
- virtual void GetWorkArea( Rectangle& rRect ) override;
+ virtual void GetWorkArea( tools::Rectangle& rRect ) override;
virtual SalFrame* GetParent() const override;
virtual void SetWindowState( const SalFrameState* pState ) override;
virtual bool GetWindowState( SalFrameState* pState ) override;
@@ -527,9 +527,9 @@ public:
#if GTK_CHECK_VERSION(3,0,0)
virtual void SetModal(bool bModal) override;
- virtual bool ShowTooltip(const OUString& rHelpText, const Rectangle& rHelpArea) override;
- virtual sal_uIntPtr ShowPopover(const OUString& rHelpText, const Rectangle& rHelpArea, QuickHelpFlags nFlags) override;
- virtual bool UpdatePopover(sal_uIntPtr nId, const OUString& rHelpText, const Rectangle& rHelpArea) override;
+ virtual bool ShowTooltip(const OUString& rHelpText, const tools::Rectangle& rHelpArea) override;
+ virtual sal_uIntPtr ShowPopover(const OUString& rHelpText, const tools::Rectangle& rHelpArea, QuickHelpFlags nFlags) override;
+ virtual bool UpdatePopover(sal_uIntPtr nId, const OUString& rHelpText, const tools::Rectangle& rHelpArea) override;
virtual bool HidePopover(sal_uIntPtr nId) override;
#endif
diff --git a/vcl/inc/unx/gtk/gtkgdi.hxx b/vcl/inc/unx/gtk/gtkgdi.hxx
index bf70ba1694dc..e8b425436b64 100644
--- a/vcl/inc/unx/gtk/gtkgdi.hxx
+++ b/vcl/inc/unx/gtk/gtkgdi.hxx
@@ -103,17 +103,17 @@ class GtkSalGraphics : public SvpSalGraphics
public:
GtkSalGraphics( GtkSalFrame *pFrame, GtkWidget *pWindow );
virtual bool drawNativeControl( ControlType nType, ControlPart nPart,
- const Rectangle& rControlRegion,
+ const tools::Rectangle& rControlRegion,
ControlState nState, const ImplControlValue& aValue,
const OUString& rCaption ) override;
virtual bool IsNativeControlSupported( ControlType nType, ControlPart nPart ) override;
virtual bool getNativeControlRegion( ControlType nType, ControlPart nPart,
- const Rectangle& rControlRegion,
+ const tools::Rectangle& rControlRegion,
ControlState nState,
const ImplControlValue& aValue,
const OUString& rCaption,
- Rectangle &rNativeBoundingRegion,
- Rectangle &rNativeContentRegion ) override;
+ tools::Rectangle &rNativeBoundingRegion,
+ tools::Rectangle &rNativeContentRegion ) override;
#if ENABLE_CAIRO_CANVAS
virtual bool SupportsCairo() const override;
@@ -203,13 +203,13 @@ private:
static GtkStyleContext *mpSeparatorMenuItemStyle;
static GtkStyleContext *mpSeparatorMenuItemSeparatorStyle;
- static Rectangle NWGetScrollButtonRect( ControlPart nPart, Rectangle aAreaRect );
- static Rectangle NWGetSpinButtonRect( ControlPart nPart, Rectangle aAreaRect);
- static Rectangle NWGetComboBoxButtonRect( ControlType nType, ControlPart nPart, Rectangle aAreaRect );
+ static tools::Rectangle NWGetScrollButtonRect( ControlPart nPart, tools::Rectangle aAreaRect );
+ static tools::Rectangle NWGetSpinButtonRect( ControlPart nPart, tools::Rectangle aAreaRect);
+ static tools::Rectangle NWGetComboBoxButtonRect( ControlType nType, ControlPart nPart, tools::Rectangle aAreaRect );
static void PaintScrollbar(GtkStyleContext *context,
cairo_t *cr,
- const Rectangle& rControlRectangle,
+ const tools::Rectangle& rControlRectangle,
ControlType nType,
ControlPart nPart,
const ImplControlValue& aValue );
@@ -217,29 +217,29 @@ private:
cairo_t *cr,
ControlType nType,
ControlPart nPart,
- Rectangle aAreaRect,
+ tools::Rectangle aAreaRect,
ControlState nState );
void PaintSpinButton(GtkStateFlags flags,
cairo_t *cr,
- const Rectangle& rControlRectangle,
+ const tools::Rectangle& rControlRectangle,
ControlType nType,
ControlPart nPart,
const ImplControlValue& aValue);
static void PaintCombobox(GtkStateFlags flags,
cairo_t *cr,
- const Rectangle& rControlRectangle,
+ const tools::Rectangle& rControlRectangle,
ControlType nType,
ControlPart nPart,
const ImplControlValue& aValue);
static void PaintCheckOrRadio(cairo_t *cr, GtkStyleContext *context,
- const Rectangle& rControlRectangle,
+ const tools::Rectangle& rControlRectangle,
bool bIsCheck, bool bInMenu);
static void PaintCheck(cairo_t *cr, GtkStyleContext *context,
- const Rectangle& rControlRectangle, bool bInMenu);
+ const tools::Rectangle& rControlRectangle, bool bInMenu);
static void PaintRadio(cairo_t *cr, GtkStyleContext *context,
- const Rectangle& rControlRectangle, bool bInMenu);
+ const tools::Rectangle& rControlRectangle, bool bInMenu);
static bool style_loaded;
@@ -270,14 +270,14 @@ public:
// native widget methods
virtual bool IsNativeControlSupported( ControlType nType, ControlPart nPart ) override;
- virtual bool hitTestNativeControl( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion,
+ virtual bool hitTestNativeControl( ControlType nType, ControlPart nPart, const tools::Rectangle& rControlRegion,
const Point& aPos, bool& rIsInside ) override;
- virtual bool drawNativeControl( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion,
+ virtual bool drawNativeControl( ControlType nType, ControlPart nPart, const tools::Rectangle& rControlRegion,
ControlState nState, const ImplControlValue& aValue,
const OUString& rCaption ) override;
- virtual bool getNativeControlRegion( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion, ControlState nState,
+ virtual bool getNativeControlRegion( ControlType nType, ControlPart nPart, const tools::Rectangle& rControlRegion, ControlState nState,
const ImplControlValue& aValue, const OUString& rCaption,
- Rectangle &rNativeBoundingRegion, Rectangle &rNativeContentRegion ) override;
+ tools::Rectangle &rNativeBoundingRegion, tools::Rectangle &rNativeContentRegion ) override;
//helper methods for frame's UpdateSettings
void updateSettings( AllSettings& rSettings );
@@ -296,129 +296,129 @@ public:
protected:
- GdkX11Pixmap* NWGetPixmapFromScreen( Rectangle srcRect, int nBgColor = 0 );
- bool NWRenderPixmapToScreen( GdkX11Pixmap* pPixmap, GdkX11Pixmap* pMask, Rectangle dstRect );
+ GdkX11Pixmap* NWGetPixmapFromScreen( tools::Rectangle srcRect, int nBgColor = 0 );
+ bool NWRenderPixmapToScreen( GdkX11Pixmap* pPixmap, GdkX11Pixmap* pMask, tools::Rectangle dstRect );
bool DoDrawNativeControl( GdkDrawable* pDrawable,
ControlType nType,
ControlPart nPart,
- const Rectangle& aCtrlRect,
- const std::list< Rectangle >& aClip,
+ const tools::Rectangle& aCtrlRect,
+ const std::list< tools::Rectangle >& aClip,
ControlState nState,
const ImplControlValue& aValue,
const OUString& rCaption,
ControlCacheKey& rControlCacheKey);
bool NWPaintGTKArrow( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart,
- const Rectangle& rControlRectangle,
- const std::list< Rectangle >& rClipList,
+ const tools::Rectangle& rControlRectangle,
+ const std::list< tools::Rectangle >& rClipList,
ControlState nState, const ImplControlValue& aValue,
const OUString& rCaption );
bool NWPaintGTKListHeader( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart,
- const Rectangle& rControlRectangle,
- const std::list< Rectangle >& rClipList,
+ const tools::Rectangle& rControlRectangle,
+ const std::list< tools::Rectangle >& rClipList,
ControlState nState, const ImplControlValue& aValue,
const OUString& rCaption );
bool NWPaintGTKFixedLine( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart,
- const Rectangle& rControlRectangle,
- const std::list< Rectangle >& rClipList,
+ const tools::Rectangle& rControlRectangle,
+ const std::list< tools::Rectangle >& rClipList,
ControlState nState, const ImplControlValue& aValue,
const OUString& rCaption );
bool NWPaintGTKFrame( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart,
- const Rectangle& rControlRectangle,
- const std::list< Rectangle >& rClipList,
+ const tools::Rectangle& rControlRectangle,
+ const std::list< tools::Rectangle >& rClipList,
ControlState nState, const ImplControlValue& aValue,
const OUString& rCaption );
bool NWPaintGTKWindowBackground( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart,
- const Rectangle& rControlRectangle,
- const std::list< Rectangle >& rClipList,
+ const tools::Rectangle& rControlRectangle,
+ const std::list< tools::Rectangle >& rClipList,
ControlState nState, const ImplControlValue& aValue,
const OUString& rCaption );
bool NWPaintGTKButtonReal( GtkWidget* button, GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart,
- const Rectangle& rControlRectangle,
- const std::list< Rectangle >& rClipList,
+ const tools::Rectangle& rControlRectangle,
+ const std::list< tools::Rectangle >& rClipList,
ControlState nState, const ImplControlValue& aValue,
const OUString& rCaption );
bool NWPaintGTKButton( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart,
- const Rectangle& rControlRectangle,
- const std::list< Rectangle >& rClipList,
+ const tools::Rectangle& rControlRectangle,
+ const std::list< tools::Rectangle >& rClipList,
ControlState nState, const ImplControlValue& aValue,
const OUString& rCaption );
bool NWPaintGTKRadio( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart,
- const Rectangle& rControlRectangle,
- const std::list< Rectangle >& rClipList,
+ const tools::Rectangle& rControlRectangle,
+ const std::list< tools::Rectangle >& rClipList,
ControlState nState, const ImplControlValue& aValue,
const OUString& rCaption );
bool NWPaintGTKCheck( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart,
- const Rectangle& rControlRectangle,
- const std::list< Rectangle >& rClipList,
+ const tools::Rectangle& rControlRectangle,
+ const std::list< tools::Rectangle >& rClipList,
ControlState nState, const ImplControlValue& aValue,
const OUString& rCaption );
bool NWPaintGTKScrollbar( ControlType nType, ControlPart nPart,
- const Rectangle& rControlRectangle,
- const std::list< Rectangle >& rClipList,
+ const tools::Rectangle& rControlRectangle,
+ const std::list< tools::Rectangle >& rClipList,
ControlState nState, const ImplControlValue& aValue,
const OUString& rCaption );
bool NWPaintGTKEditBox( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart,
- const Rectangle& rControlRectangle,
- const std::list< Rectangle >& rClipList,
+ const tools::Rectangle& rControlRectangle,
+ const std::list< tools::Rectangle >& rClipList,
ControlState nState, const ImplControlValue& aValue,
const OUString& rCaption );
bool NWPaintGTKSpinBox(ControlType nType, ControlPart nPart,
- const Rectangle& rControlRectangle,
- const std::list< Rectangle >& rClipList,
+ const tools::Rectangle& rControlRectangle,
+ const std::list< tools::Rectangle >& rClipList,
ControlState nState, const ImplControlValue& aValue,
const OUString& rCaption,
ControlCacheKey& rControlCacheKey);
bool NWPaintGTKComboBox( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart,
- const Rectangle& rControlRectangle,
- const std::list< Rectangle >& rClipList,
+ const tools::Rectangle& rControlRectangle,
+ const std::list< tools::Rectangle >& rClipList,
ControlState nState, const ImplControlValue& aValue,
const OUString& rCaption );
bool NWPaintGTKTabItem( ControlType nType, ControlPart nPart,
- const Rectangle& rControlRectangle,
- const std::list< Rectangle >& rClipList,
+ const tools::Rectangle& rControlRectangle,
+ const std::list< tools::Rectangle >& rClipList,
ControlState nState, const ImplControlValue& aValue,
const OUString& rCaption );
bool NWPaintGTKListBox( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart,
- const Rectangle& rControlRectangle,
- const std::list< Rectangle >& rClipList,
+ const tools::Rectangle& rControlRectangle,
+ const std::list< tools::Rectangle >& rClipList,
ControlState nState, const ImplControlValue& aValue,
const OUString& rCaption );
bool NWPaintGTKToolbar( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart,
- const Rectangle& rControlRectangle,
- const std::list< Rectangle >& rClipList,
+ const tools::Rectangle& rControlRectangle,
+ const std::list< tools::Rectangle >& rClipList,
ControlState nState, const ImplControlValue& aValue,
const OUString& rCaption );
bool NWPaintGTKMenubar( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart,
- const Rectangle& rControlRectangle,
- const std::list< Rectangle >& rClipList,
+ const tools::Rectangle& rControlRectangle,
+ const std::list< tools::Rectangle >& rClipList,
ControlState nState, const ImplControlValue& aValue,
const OUString& rCaption );
bool NWPaintGTKPopupMenu( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart,
- const Rectangle& rControlRectangle,
- const std::list< Rectangle >& rClipList,
+ const tools::Rectangle& rControlRectangle,
+ const std::list< tools::Rectangle >& rClipList,
ControlState nState, const ImplControlValue& aValue,
const OUString& rCaption );
bool NWPaintGTKTooltip( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart,
- const Rectangle& rControlRectangle,
- const std::list< Rectangle >& rClipList,
+ const tools::Rectangle& rControlRectangle,
+ const std::list< tools::Rectangle >& rClipList,
ControlState nState, const ImplControlValue& aValue,
const OUString& rCaption );
bool NWPaintGTKProgress( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart,
- const Rectangle& rControlRectangle,
- const std::list< Rectangle >& rClipList,
+ const tools::Rectangle& rControlRectangle,
+ const std::list< tools::Rectangle >& rClipList,
ControlState nState, const ImplControlValue& aValue,
const OUString& rCaption );
bool NWPaintGTKSlider( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart,
- const Rectangle& rControlRectangle,
- const std::list< Rectangle >& rClipList,
+ const tools::Rectangle& rControlRectangle,
+ const std::list< tools::Rectangle >& rClipList,
ControlState nState, const ImplControlValue& aValue,
const OUString& rCaption );
bool NWPaintGTKListNode( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart,
- const Rectangle& rControlRectangle,
- const std::list< Rectangle >& rClipList,
+ const tools::Rectangle& rControlRectangle,
+ const std::list< tools::Rectangle >& rClipList,
ControlState nState, const ImplControlValue& aValue,
const OUString& rCaption );
};
diff --git a/vcl/inc/unx/gtk/gtksalmenu.hxx b/vcl/inc/unx/gtk/gtksalmenu.hxx
index cf076675dea8..9a5ef3ed67ab 100644
--- a/vcl/inc/unx/gtk/gtksalmenu.hxx
+++ b/vcl/inc/unx/gtk/gtksalmenu.hxx
@@ -126,7 +126,7 @@ public:
gboolean SignalKey(GdkEventKey* pEvent);
void ReturnFocus();
- virtual bool ShowNativePopupMenu(FloatingWindow * pWin, const Rectangle& rRect, FloatWinPopupFlags nFlags) override;
+ virtual bool ShowNativePopupMenu(FloatingWindow * pWin, const tools::Rectangle& rRect, FloatWinPopupFlags nFlags) override;
virtual void ShowCloseButton(bool bShow) override;
virtual bool CanGetFocus() const override;
virtual bool TakeFocus() override;
diff --git a/vcl/inc/unx/gtk/gtksys.hxx b/vcl/inc/unx/gtk/gtksys.hxx
index b8ebbdf0574d..d888bce5bca3 100644
--- a/vcl/inc/unx/gtk/gtksys.hxx
+++ b/vcl/inc/unx/gtk/gtksys.hxx
@@ -29,7 +29,7 @@ public:
virtual bool IsUnifiedDisplay() override;
virtual unsigned int GetDisplayScreenCount() override;
virtual unsigned int GetDisplayBuiltInScreen() override;
- virtual Rectangle GetDisplayScreenPosSizePixel (unsigned int nScreen) override;
+ virtual tools::Rectangle GetDisplayScreenPosSizePixel (unsigned int nScreen) override;
virtual int ShowNativeDialog (const OUString& rTitle,
const OUString& rMessage,
const std::list< OUString >& rButtons,
diff --git a/vcl/inc/unx/printergfx.hxx b/vcl/inc/unx/printergfx.hxx
index 152573e10b9d..59c2f338d2bd 100644
--- a/vcl/inc/unx/printergfx.hxx
+++ b/vcl/inc/unx/printergfx.hxx
@@ -187,18 +187,18 @@ private:
/* bitmap drawing implementation */
- void DrawPS1GrayImage (const PrinterBmp& rBitmap, const Rectangle& rArea);
- void writePS2ImageHeader (const Rectangle& rArea, psp::ImageType nType);
+ void DrawPS1GrayImage (const PrinterBmp& rBitmap, const tools::Rectangle& rArea);
+ void writePS2ImageHeader (const tools::Rectangle& rArea, psp::ImageType nType);
void writePS2Colorspace (const PrinterBmp& rBitmap, psp::ImageType nType);
- void DrawPS2GrayImage (const PrinterBmp& rBitmap, const Rectangle& rArea);
- void DrawPS2PaletteImage (const PrinterBmp& rBitmap, const Rectangle& rArea);
- void DrawPS2TrueColorImage (const PrinterBmp& rBitmap, const Rectangle& rArea);
- void DrawPS2MonoImage (const PrinterBmp& rBitmap, const Rectangle& rArea);
+ void DrawPS2GrayImage (const PrinterBmp& rBitmap, const tools::Rectangle& rArea);
+ void DrawPS2PaletteImage (const PrinterBmp& rBitmap, const tools::Rectangle& rArea);
+ void DrawPS2TrueColorImage (const PrinterBmp& rBitmap, const tools::Rectangle& rArea);
+ void DrawPS2MonoImage (const PrinterBmp& rBitmap, const tools::Rectangle& rArea);
/* clip region */
- std::list< Rectangle > maClipRegion;
- bool JoinVerticalClipRectangles( std::list< Rectangle >::iterator& it,
+ std::list< tools::Rectangle > maClipRegion;
+ bool JoinVerticalClipRectangles( std::list< tools::Rectangle >::iterator& it,
Point& aOldPoint, sal_Int32& nColumn );
/* color settings */
@@ -285,7 +285,7 @@ public:
void DrawPixel (const Point& rPoint)
{ DrawPixel (rPoint, maLineColor); }
void DrawLine (const Point& rFrom, const Point& rTo);
- void DrawRect (const Rectangle& rRectangle);
+ void DrawRect (const tools::Rectangle& rRectangle);
void DrawPolyLine (sal_uInt32 nPoints, const Point* pPath );
void DrawPolygon (sal_uInt32 nPoints, const Point* pPath);
void DrawPolyPolygon (sal_uInt32 nPoly,
@@ -303,10 +303,10 @@ public:
const PolyFlags* const* pFlgAry);
// eps
- bool DrawEPS ( const Rectangle& rBoundingBox, void* pPtr, sal_uInt32 nSize);
+ bool DrawEPS ( const tools::Rectangle& rBoundingBox, void* pPtr, sal_uInt32 nSize);
// image drawing
- void DrawBitmap (const Rectangle& rDest, const Rectangle& rSrc,
+ void DrawBitmap (const tools::Rectangle& rDest, const tools::Rectangle& rSrc,
const PrinterBmp& rBitmap);
// font and text handling
diff --git a/vcl/inc/unx/saldisp.hxx b/vcl/inc/unx/saldisp.hxx
index 44e851a8b981..d28326e389bb 100644
--- a/vcl/inc/unx/saldisp.hxx
+++ b/vcl/inc/unx/saldisp.hxx
@@ -287,7 +287,7 @@ protected:
vcl_sal::WMAdaptor* m_pWMAdaptor;
bool m_bXinerama;
- std::vector< Rectangle > m_aXineramaScreens;
+ std::vector< tools::Rectangle > m_aXineramaScreens;
std::vector< int > m_aXineramaScreenIndexMap;
std::list<SalObject*> m_aSalObjects;
@@ -370,7 +370,7 @@ public:
{ mpKbdExtension = pKbdExtension; }
::vcl_sal::WMAdaptor* getWMAdaptor() const { return m_pWMAdaptor; }
bool IsXinerama() const { return m_bXinerama; }
- const std::vector< Rectangle >& GetXineramaScreens() const { return m_aXineramaScreens; }
+ const std::vector< tools::Rectangle >& GetXineramaScreens() const { return m_aXineramaScreens; }
::Window GetRootWindow( SalX11Screen nXScreen ) const
{ return getDataForScreen( nXScreen ).m_aRoot; }
unsigned int GetXScreenCount() const { return m_aScreens.size(); }
diff --git a/vcl/inc/unx/salframe.h b/vcl/inc/unx/salframe.h
index 69702fc8710d..4263581a979f 100644
--- a/vcl/inc/unx/salframe.h
+++ b/vcl/inc/unx/salframe.h
@@ -94,7 +94,7 @@ class VCLPLUG_GEN_PUBLIC X11SalFrame : public SalFrame, public NativeWindowHandl
int nShowState_; // show state
int nWidth_; // client width
int nHeight_; // client height
- Rectangle maRestorePosSize;
+ tools::Rectangle maRestorePosSize;
SalFrameStyleFlags nStyle_;
SalExtStyle mnExtStyle;
bool bAlwaysOnTop_;
@@ -108,7 +108,7 @@ class VCLPLUG_GEN_PUBLIC X11SalFrame : public SalFrame, public NativeWindowHandl
bool m_bSetFocusOnMap;
ScreenSaverInhibitor maScreenSaverInhibitor;
- Rectangle maPaintRegion;
+ tools::Rectangle maPaintRegion;
Timer maAlwaysOnTopRaiseTimer;
@@ -138,10 +138,10 @@ class VCLPLUG_GEN_PUBLIC X11SalFrame : public SalFrame, public NativeWindowHandl
bool mPendingSizeEvent;
- void GetPosSize( Rectangle &rPosSize );
+ void GetPosSize( tools::Rectangle &rPosSize );
void SetSize ( const Size &rSize );
void Center();
- void SetPosSize( const Rectangle &rPosSize );
+ void SetPosSize( const tools::Rectangle &rPosSize );
void Minimize();
void Maximize();
void Restore();
@@ -228,7 +228,7 @@ public:
virtual void SetMaxClientSize( long nWidth, long nHeight ) override;
virtual void SetPosSize( long nX, long nY, long nWidth, long nHeight, sal_uInt16 nFlags ) override;
virtual void GetClientSize( long& rWidth, long& rHeight ) override;
- virtual void GetWorkArea( Rectangle& rRect ) override;
+ virtual void GetWorkArea( tools::Rectangle& rRect ) override;
virtual SalFrame* GetParent() const override;
virtual void SetWindowState( const SalFrameState* pState ) override;
virtual bool GetWindowState( SalFrameState* pState ) override;
diff --git a/vcl/inc/unx/salgdi.h b/vcl/inc/unx/salgdi.h
index 90d3fd6b3f70..87f9d6e83176 100644
--- a/vcl/inc/unx/salgdi.h
+++ b/vcl/inc/unx/salgdi.h
@@ -141,7 +141,7 @@ public:
std::vector< sal_Int32 >& rWidths,
Ucs2UIntMap& rUnicodeEnc ) override;
- virtual bool GetGlyphBoundRect(const GlyphItem&, Rectangle&) override;
+ virtual bool GetGlyphBoundRect(const GlyphItem&, tools::Rectangle&) override;
virtual bool GetGlyphOutline(const GlyphItem&, basegfx::B2DPolyPolygon&) override;
virtual SalLayout* GetTextLayout( ImplLayoutArgs&, int nFallbackLevel ) override;
virtual void DrawTextLayout( const CommonSalLayout& ) override;
diff --git a/vcl/inc/unx/wmadaptor.hxx b/vcl/inc/unx/wmadaptor.hxx
index fbd87f96a8ef..4e9c2769ee7e 100644
--- a/vcl/inc/unx/wmadaptor.hxx
+++ b/vcl/inc/unx/wmadaptor.hxx
@@ -132,7 +132,7 @@ protected:
Atom m_aWMAtoms[ NetAtomMax];
int m_nDesktops;
bool m_bEqualWorkAreas;
- ::std::vector< Rectangle >
+ ::std::vector< tools::Rectangle >
m_aWMWorkAreas;
bool m_bEnableAlwaysOnTopWorks;
bool m_bLegacyPartialFullscreen;
@@ -179,7 +179,7 @@ public:
/*
* gets the specified workarea
*/
- const Rectangle& getWorkArea( int n ) const
+ const tools::Rectangle& getWorkArea( int n ) const
{ return m_aWMWorkAreas[n]; }
/*
diff --git a/vcl/inc/unx/x11/x11sys.hxx b/vcl/inc/unx/x11/x11sys.hxx
index a5937fe074f9..8e209014e262 100644
--- a/vcl/inc/unx/x11/x11sys.hxx
+++ b/vcl/inc/unx/x11/x11sys.hxx
@@ -35,7 +35,7 @@ public:
virtual unsigned int GetDisplayScreenCount() override;
virtual bool IsUnifiedDisplay() override;
virtual unsigned int GetDisplayBuiltInScreen() override;
- virtual Rectangle GetDisplayScreenPosSizePixel( unsigned int nScreen ) override;
+ virtual tools::Rectangle GetDisplayScreenPosSizePixel( unsigned int nScreen ) override;
virtual int ShowNativeDialog( const OUString& rTitle,
const OUString& rMessage,
const std::list< OUString >& rButtons,
diff --git a/vcl/inc/wall2.hxx b/vcl/inc/wall2.hxx
index 52393dd937a4..cce5d03919ec 100644
--- a/vcl/inc/wall2.hxx
+++ b/vcl/inc/wall2.hxx
@@ -28,7 +28,7 @@ private:
Color maColor;
std::unique_ptr<BitmapEx> mpBitmap;
std::unique_ptr<Gradient> mpGradient;
- std::unique_ptr<Rectangle> mpRect;
+ std::unique_ptr<tools::Rectangle> mpRect;
WallpaperStyle meStyle;
std::unique_ptr<BitmapEx> mpCache;
diff --git a/vcl/inc/win/salframe.h b/vcl/inc/win/salframe.h
index 3c3fa0eb0c77..177a28cbf9cf 100644
--- a/vcl/inc/win/salframe.h
+++ b/vcl/inc/win/salframe.h
@@ -99,7 +99,7 @@ public:
virtual void SetMaxClientSize( long nWidth, long nHeight ) override;
virtual void SetPosSize( long nX, long nY, long nWidth, long nHeight, sal_uInt16 nFlags ) override;
virtual void GetClientSize( long& rWidth, long& rHeight ) override;
- virtual void GetWorkArea( Rectangle& rRect ) override;
+ virtual void GetWorkArea( tools::Rectangle& rRect ) override;
virtual SalFrame* GetParent() const override;
virtual void SetWindowState( const SalFrameState* pState ) override;
virtual bool GetWindowState( SalFrameState* pState ) override;
diff --git a/vcl/inc/win/salgdi.h b/vcl/inc/win/salgdi.h
index 3af90cbefae3..a1076e0c7d1e 100644
--- a/vcl/inc/win/salgdi.h
+++ b/vcl/inc/win/salgdi.h
@@ -268,14 +268,14 @@ protected:
virtual bool drawEPS( long nX, long nY, long nWidth, long nHeight, void* pPtr, sal_uIntPtr nSize ) override;
// native widget rendering methods that require mirroring
- virtual bool hitTestNativeControl( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion,
+ virtual bool hitTestNativeControl( ControlType nType, ControlPart nPart, const tools::Rectangle& rControlRegion,
const Point& aPos, bool& rIsInside ) override;
- virtual bool drawNativeControl( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion,
+ virtual bool drawNativeControl( ControlType nType, ControlPart nPart, const tools::Rectangle& rControlRegion,
ControlState nState, const ImplControlValue& aValue,
const OUString& aCaption ) override;
- virtual bool getNativeControlRegion( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion, ControlState nState,
+ virtual bool getNativeControlRegion( ControlType nType, ControlPart nPart, const tools::Rectangle& rControlRegion, ControlState nState,
const ImplControlValue& aValue, const OUString& aCaption,
- Rectangle &rNativeBoundingRegion, Rectangle &rNativeContentRegion ) override;
+ tools::Rectangle &rNativeBoundingRegion, tools::Rectangle &rNativeContentRegion ) override;
virtual bool blendBitmap( const SalTwoRect&,
const SalBitmap& rBitmap ) override;
@@ -377,7 +377,7 @@ public:
std::vector< sal_Int32 >& rWidths,
Ucs2UIntMap& rUnicodeEnc ) override;
- virtual bool GetGlyphBoundRect(const GlyphItem&, Rectangle&) override;
+ virtual bool GetGlyphBoundRect(const GlyphItem&, tools::Rectangle&) override;
virtual bool GetGlyphOutline(const GlyphItem&, basegfx::B2DPolyPolygon&) override;
virtual SalLayout* GetTextLayout( ImplLayoutArgs&, int nFallbackLevel ) override;
diff --git a/vcl/inc/win/salsys.h b/vcl/inc/win/salsys.h
index ec9424b318e6..03f627b5abb2 100644
--- a/vcl/inc/win/salsys.h
+++ b/vcl/inc/win/salsys.h
@@ -31,11 +31,11 @@ public:
struct DisplayMonitor
{
OUString m_aName;
- Rectangle m_aArea;
+ tools::Rectangle m_aArea;
DisplayMonitor() {}
DisplayMonitor( const OUString& rName,
- const Rectangle& rArea )
+ const tools::Rectangle& rArea )
: m_aName( rName ),
m_aArea( rArea )
{
@@ -51,7 +51,7 @@ public:
virtual unsigned int GetDisplayScreenCount() override;
virtual unsigned int GetDisplayBuiltInScreen() override;
- virtual Rectangle GetDisplayScreenPosSizePixel( unsigned int nScreen ) override;
+ virtual tools::Rectangle GetDisplayScreenPosSizePixel( unsigned int nScreen ) override;
virtual int ShowNativeMessageBox( const OUString& rTitle,
const OUString& rMessage) override;
bool initMonitors();
diff --git a/vcl/inc/win/winlayout.hxx b/vcl/inc/win/winlayout.hxx
index 35c17cc6fea0..eb1004ca142c 100644
--- a/vcl/inc/win/winlayout.hxx
+++ b/vcl/inc/win/winlayout.hxx
@@ -44,7 +44,7 @@ const int GLYPH_OFFSET_RATIO = GLYPH_SPACE_RATIO * 2;
struct OpenGLGlyphDrawElement
{
- Rectangle maLocation;
+ tools::Rectangle maLocation;
int maLeftOverhangs;
OpenGLTexture maTexture;
int mnBaselineOffset;
@@ -217,7 +217,7 @@ public:
SalGraphics &rGraphics,
HDC hDC) override;
- inline bool BindDC(HDC hDC, Rectangle const & rRect = Rectangle(0, 0, 0, 0)) {
+ inline bool BindDC(HDC hDC, tools::Rectangle const & rRect = tools::Rectangle(0, 0, 0, 0)) {
RECT const rc = { rRect.Left(), rRect.Top(), rRect.Right(), rRect.Bottom() };
return SUCCEEDED(mpRT->BindDC(hDC, &rc));
}
@@ -225,7 +225,7 @@ public:
bool BindFont(HDC hDC) /*override*/;
bool ReleaseFont() /*override*/;
- std::vector<Rectangle> GetGlyphInkBoxes(uint16_t * pGid, uint16_t * pGidEnd) const /*override*/;
+ std::vector<tools::Rectangle> GetGlyphInkBoxes(uint16_t * pGid, uint16_t * pGidEnd) const /*override*/;
ID2D1RenderTarget * GetRenderTarget() const { return mpRT; }
IDWriteFontFace * GetFontFace() const { return mpFontFace; }
float GetEmHeight() const { return mlfEmHeight; }
diff --git a/vcl/inc/window.h b/vcl/inc/window.h
index 6553b18eb40c..0825ccfed464 100644
--- a/vcl/inc/window.h
+++ b/vcl/inc/window.h
@@ -85,13 +85,13 @@ struct ImplWinData
{
OUString* mpExtOldText;
ExtTextInputAttr* mpExtOldAttrAry;
- Rectangle* mpCursorRect;
+ tools::Rectangle* mpCursorRect;
long mnCursorExtWidth;
bool mbVertical;
- Rectangle* mpCompositionCharRects;
+ tools::Rectangle* mpCompositionCharRects;
long mnCompositionCharRects;
- Rectangle* mpFocusRect;
- Rectangle* mpTrackRect;
+ tools::Rectangle* mpFocusRect;
+ tools::Rectangle* mpTrackRect;
ShowTrackFlags mnTrackFlags;
sal_uInt16 mnIsTopWindow;
bool mbMouseOver; //< tracks mouse over for native widget paint effect
@@ -154,7 +154,7 @@ struct ImplFrameData
bool mbInternalDragGestureRecognizer;
VclPtr<VirtualDevice> mpBuffer; ///< Buffer for the double-buffering
bool mbInBufferedPaint; ///< PaintHelper is in the process of painting into this buffer.
- Rectangle maBufferedRect; ///< Rectangle in the buffer that has to be painted to the screen.
+ tools::Rectangle maBufferedRect; ///< Rectangle in the buffer that has to be painted to the screen.
ImplFrameData( vcl::Window *pWindow );
};
@@ -378,12 +378,12 @@ class PaintBufferGuard
AllSettings maSettings;
long mnOutOffX;
long mnOutOffY;
- Rectangle m_aPaintRect;
+ tools::Rectangle m_aPaintRect;
public:
PaintBufferGuard(ImplFrameData* pFrameData, vcl::Window* pWindow);
~PaintBufferGuard();
/// If this is called, then the dtor will also copy rRectangle to the window from the buffer, before restoring the state.
- void SetPaintRect(const Rectangle& rRectangle);
+ void SetPaintRect(const tools::Rectangle& rRectangle);
/// Returns either the frame's buffer or the window, in case of no buffering.
vcl::RenderContext* GetRenderContext();
};
diff --git a/vcl/opengl/FixedTextureAtlas.cxx b/vcl/opengl/FixedTextureAtlas.cxx
index 33a5a1360374..aeece80a7760 100644
--- a/vcl/opengl/FixedTextureAtlas.cxx
+++ b/vcl/opengl/FixedTextureAtlas.cxx
@@ -119,7 +119,7 @@ OpenGLTexture FixedTextureAtlasManager::Reserve(int nWidth, int nHeight)
int nX = (nSlot % mWidthFactor) * mSubTextureSize;
int nY = (nSlot / mWidthFactor) * mSubTextureSize;
- Rectangle aRectangle(Point(nX, nY), Size(nWidth, nHeight));
+ tools::Rectangle aRectangle(Point(nX, nY), Size(nWidth, nHeight));
return OpenGLTexture(pFixedTexture->mpTexture, aRectangle, nSlot);
}
diff --git a/vcl/opengl/PackedTextureAtlas.cxx b/vcl/opengl/PackedTextureAtlas.cxx
index bad17587762d..dc6d0db4c76f 100644
--- a/vcl/opengl/PackedTextureAtlas.cxx
+++ b/vcl/opengl/PackedTextureAtlas.cxx
@@ -19,26 +19,26 @@
struct Node
{
- Rectangle mRectangle;
+ tools::Rectangle mRectangle;
std::unique_ptr<Node> mLeftNode;
std::unique_ptr<Node> mRightNode;
bool mOccupied;
explicit Node(int nWidth, int nHeight);
- explicit Node(Rectangle& aRectangle);
+ explicit Node(tools::Rectangle& aRectangle);
bool isLeaf();
Node* insert(int nWidth, int nHeight, int nPadding);
};
Node::Node(int nWidth, int nHeight)
- : mRectangle(Rectangle(Point(), Size(nWidth, nHeight)))
+ : mRectangle(tools::Rectangle(Point(), Size(nWidth, nHeight)))
, mLeftNode()
, mRightNode()
, mOccupied(false)
{}
-Node::Node(Rectangle& aRectangle)
+Node::Node(tools::Rectangle& aRectangle)
: mRectangle(aRectangle)
, mLeftNode()
, mRightNode()
@@ -83,20 +83,20 @@ Node* Node::insert(int nWidth, int nHeight, int nPadding)
int dw = mRectangle.GetWidth() - nWidth;
int dh = mRectangle.GetHeight() - nHeight;
- Rectangle aLeftRect;
- Rectangle aRightRect;
+ tools::Rectangle aLeftRect;
+ tools::Rectangle aRightRect;
if (dw > dh)
{
- aLeftRect = Rectangle(Point(mRectangle.Left(), mRectangle.Top()),
+ aLeftRect = tools::Rectangle(Point(mRectangle.Left(), mRectangle.Top()),
Size(nWidth, mRectangle.GetHeight()));
- aRightRect = Rectangle(Point(nPadding + mRectangle.Left() + nWidth, mRectangle.Top()),
+ aRightRect = tools::Rectangle(Point(nPadding + mRectangle.Left() + nWidth, mRectangle.Top()),
Size(mRectangle.GetWidth() - nWidth - nPadding, mRectangle.GetHeight()));
}
else
{
- aLeftRect = Rectangle(Point(mRectangle.Left(), mRectangle.Top()),
+ aLeftRect = tools::Rectangle(Point(mRectangle.Left(), mRectangle.Top()),
Size(mRectangle.GetWidth(), nHeight));
- aRightRect = Rectangle(Point(mRectangle.Left(), nPadding + mRectangle.Top() + nHeight),
+ aRightRect = tools::Rectangle(Point(mRectangle.Left(), nPadding + mRectangle.Top() + nHeight),
Size(mRectangle.GetWidth(), mRectangle.GetHeight() - nHeight - nPadding));
}
diff --git a/vcl/opengl/gdiimpl.cxx b/vcl/opengl/gdiimpl.cxx
index c483fb094f4d..9e1bc471d13f 100644
--- a/vcl/opengl/gdiimpl.cxx
+++ b/vcl/opengl/gdiimpl.cxx
@@ -222,7 +222,7 @@ void OpenGLSalGraphicsImpl::InitializePreDrawState(XOROption eOpt)
CheckOffscreenTexture();
CHECK_GL_ERROR();
- mpContext->state().viewport(Rectangle(Point(0, 0), Size(GetWidth(), GetHeight())));
+ mpContext->state().viewport(tools::Rectangle(Point(0, 0), Size(GetWidth(), GetHeight())));
ImplInitClipRegion();
CHECK_GL_ERROR();
@@ -355,7 +355,7 @@ void OpenGLSalGraphicsImpl::ImplInitClipRegion()
if (mbUseScissor)
{
- Rectangle aRect(maClipRegion.GetBoundRect());
+ tools::Rectangle aRect(maClipRegion.GetBoundRect());
mpContext->state().scissor().set(aRect.Left(), GetHeight() - aRect.Bottom() - 1, aRect.GetWidth(), aRect.GetHeight());
mpContext->state().scissor().enable();
}
@@ -867,7 +867,7 @@ void OpenGLSalGraphicsImpl::DrawRect( long nX, long nY, long nWidth, long nHeigh
DrawConvexPolygon( 4, aPoints, true );
}
-void OpenGLSalGraphicsImpl::DrawRect( const Rectangle& rRect )
+void OpenGLSalGraphicsImpl::DrawRect( const tools::Rectangle& rRect )
{
long nX1( rRect.Left() );
long nY1( rRect.Top() );
@@ -927,7 +927,7 @@ void OpenGLSalGraphicsImpl::DrawRegionBand( const RegionBand& rRegion )
aVertices.push_back(GLfloat(pt.X())); \
aVertices.push_back(GLfloat(pt.Y()));
- for(Rectangle & rRect : aRects)
+ for(tools::Rectangle & rRect : aRects)
{
rRect.Bottom() += 1;
rRect.Right() += 1;
@@ -1412,7 +1412,7 @@ void OpenGLSalGraphicsImpl::FlushDeferredDrawing()
VCL_GL_INFO("End FlushDeferredDrawing");
}
-void OpenGLSalGraphicsImpl::DrawLinearGradient( const Gradient& rGradient, const Rectangle& rRect )
+void OpenGLSalGraphicsImpl::DrawLinearGradient( const Gradient& rGradient, const tools::Rectangle& rRect )
{
OpenGLZone aZone;
@@ -1425,7 +1425,7 @@ void OpenGLSalGraphicsImpl::DrawLinearGradient( const Gradient& rGradient, const
nFactor = rGradient.GetEndIntensity();
mpProgram->SetColorWithIntensity( "end_color", aEndCol, nFactor );
- Rectangle aBoundRect;
+ tools::Rectangle aBoundRect;
Point aCenter;
rGradient.GetBoundRect( rRect, aBoundRect, aCenter );
tools::Polygon aPoly( aBoundRect );
@@ -1438,7 +1438,7 @@ void OpenGLSalGraphicsImpl::DrawLinearGradient( const Gradient& rGradient, const
DrawConvexPolygon( aPoly, true );
}
-void OpenGLSalGraphicsImpl::DrawAxialGradient( const Gradient& rGradient, const Rectangle& rRect )
+void OpenGLSalGraphicsImpl::DrawAxialGradient( const Gradient& rGradient, const tools::Rectangle& rRect )
{
OpenGLZone aZone;
@@ -1465,7 +1465,7 @@ void OpenGLSalGraphicsImpl::DrawAxialGradient( const Gradient& rGradient, const
*
*/
- Rectangle aRect;
+ tools::Rectangle aRect;
Point aCenter;
rGradient.GetBoundRect( rRect, aRect, aCenter );
@@ -1490,7 +1490,7 @@ void OpenGLSalGraphicsImpl::DrawAxialGradient( const Gradient& rGradient, const
DrawConvexPolygon( aPoly, true );
}
-void OpenGLSalGraphicsImpl::DrawRadialGradient( const Gradient& rGradient, const Rectangle& rRect )
+void OpenGLSalGraphicsImpl::DrawRadialGradient( const Gradient& rGradient, const tools::Rectangle& rRect )
{
OpenGLZone aZone;
@@ -1503,7 +1503,7 @@ void OpenGLSalGraphicsImpl::DrawRadialGradient( const Gradient& rGradient, const
nFactor = rGradient.GetEndIntensity();
mpProgram->SetColorWithIntensity( "end_color", aEndCol, nFactor );
- Rectangle aRect;
+ tools::Rectangle aRect;
Point aCenter;
rGradient.GetBoundRect( rRect, aRect, aCenter );
@@ -1962,7 +1962,7 @@ bool OpenGLSalGraphicsImpl::drawAlphaRect(
bool OpenGLSalGraphicsImpl::drawGradient(const tools::PolyPolygon& rPolyPoly,
const Gradient& rGradient)
{
- Rectangle aBoundRect( rPolyPoly.GetBoundRect() );
+ tools::Rectangle aBoundRect( rPolyPoly.GetBoundRect() );
VCL_GL_INFO("::drawGradient " << rPolyPoly.GetBoundRect());
@@ -2116,7 +2116,7 @@ void OpenGLSalGraphicsImpl::doFlush()
CHECK_GL_ERROR();
mpWindowContext->state().sync();
- mpWindowContext->state().viewport(Rectangle(Point(0, 0), Size(GetWidth(), GetHeight())));
+ mpWindowContext->state().viewport(tools::Rectangle(Point(0, 0), Size(GetWidth(), GetHeight())));
mpWindowContext->state().scissor().disable();
mpWindowContext->state().stencil().disable();
diff --git a/vcl/opengl/texture.cxx b/vcl/opengl/texture.cxx
index 002d03f8bea0..9a3584c4f9cf 100644
--- a/vcl/opengl/texture.cxx
+++ b/vcl/opengl/texture.cxx
@@ -253,7 +253,7 @@ OpenGLTexture::OpenGLTexture() :
{
}
-OpenGLTexture::OpenGLTexture(const std::shared_ptr<ImplOpenGLTexture>& rpImpl, Rectangle aRectangle, int nSlotNumber)
+OpenGLTexture::OpenGLTexture(const std::shared_ptr<ImplOpenGLTexture>& rpImpl, tools::Rectangle aRectangle, int nSlotNumber)
: maRect(aRectangle)
, mpImpl(rpImpl)
, mnSlotNumber(nSlotNumber)
@@ -297,7 +297,7 @@ OpenGLTexture::OpenGLTexture( const OpenGLTexture& rTexture )
OpenGLTexture::OpenGLTexture( const OpenGLTexture& rTexture,
int nX, int nY, int nWidth, int nHeight )
{
- maRect = Rectangle( Point( rTexture.maRect.Left() + nX, rTexture.maRect.Top() + nY ),
+ maRect = tools::Rectangle( Point( rTexture.maRect.Left() + nX, rTexture.maRect.Top() + nY ),
Size( nWidth, nHeight ) );
mpImpl = rTexture.mpImpl;
mnSlotNumber = rTexture.mnSlotNumber;
diff --git a/vcl/osx/salframe.cxx b/vcl/osx/salframe.cxx
index ca4a5d9928d7..28284b4a73fc 100644
--- a/vcl/osx/salframe.cxx
+++ b/vcl/osx/salframe.cxx
@@ -364,7 +364,7 @@ void AquaSalFrame::initShow()
mbInitShow = false;
if( ! mbPositioned && ! mbFullScreen )
{
- Rectangle aScreenRect;
+ tools::Rectangle aScreenRect;
GetWorkArea( aScreenRect );
if( mpParent ) // center relative to parent
{
@@ -396,7 +396,7 @@ void AquaSalFrame::initShow()
[AquaA11yFactory registerView: mpNSView];
}
-void AquaSalFrame::SendPaintEvent( const Rectangle* pRect )
+void AquaSalFrame::SendPaintEvent( const tools::Rectangle* pRect )
{
SalPaintEvent aPaintEvt( 0, 0, maGeometry.nWidth, maGeometry.nHeight, true );
if( pRect )
@@ -905,7 +905,7 @@ void AquaSalFrame::Flush()
}
}
-void AquaSalFrame::Flush( const Rectangle& rRect )
+void AquaSalFrame::Flush( const tools::Rectangle& rRect )
{
if( !(mbGraphics && mpGraphics && mpNSView && mbShown) )
return;
@@ -1336,7 +1336,7 @@ void AquaSalFrame::SetPosSize(long nX, long nY, long nWidth, long nHeight, sal_u
}
}
-void AquaSalFrame::GetWorkArea( Rectangle& rRect )
+void AquaSalFrame::GetWorkArea( tools::Rectangle& rRect )
{
if ( !mpNSWindow )
return;
diff --git a/vcl/osx/salmenu.cxx b/vcl/osx/salmenu.cxx
index c567f9ecbed2..1915cc3e8e32 100644
--- a/vcl/osx/salmenu.cxx
+++ b/vcl/osx/salmenu.cxx
@@ -319,7 +319,7 @@ AquaSalMenu::~AquaSalMenu()
}
}
-bool AquaSalMenu::ShowNativePopupMenu(FloatingWindow * pWin, const Rectangle& rRect, FloatWinPopupFlags nFlags)
+bool AquaSalMenu::ShowNativePopupMenu(FloatingWindow * pWin, const tools::Rectangle& rRect, FloatWinPopupFlags nFlags)
{
// do not use native popup menu when AQUA_NATIVE_MENUS is set to false
if( ! VisibleMenuBar() ) {
@@ -854,26 +854,26 @@ void AquaSalMenu::RemoveMenuBarButton( sal_uInt16 i_nId )
statusLayout();
}
-Rectangle AquaSalMenu::GetMenuBarButtonRectPixel( sal_uInt16 i_nItemId, SalFrame* i_pReferenceFrame )
+tools::Rectangle AquaSalMenu::GetMenuBarButtonRectPixel( sal_uInt16 i_nItemId, SalFrame* i_pReferenceFrame )
{
if( ! i_pReferenceFrame || ! AquaSalFrame::isAlive( static_cast<AquaSalFrame*>(i_pReferenceFrame) ) )
- return Rectangle();
+ return tools::Rectangle();
MenuBarButtonEntry* pEntry = findButtonItem( i_nItemId );
if( ! pEntry )
- return Rectangle();
+ return tools::Rectangle();
NSStatusItem* pItem = SalData::getStatusItem();
if( ! pItem )
- return Rectangle();
+ return tools::Rectangle();
NSView* pNSView = [pItem view];
if( ! pNSView )
- return Rectangle();
+ return tools::Rectangle();
NSWindow* pNSWin = [pNSView window];
if( ! pNSWin )
- return Rectangle();
+ return tools::Rectangle();
NSRect aRect = [pNSWin convertRectToScreen:[pNSWin frame]];
@@ -882,7 +882,7 @@ Rectangle AquaSalMenu::GetMenuBarButtonRectPixel( sal_uInt16 i_nItemId, SalFrame
aRect.origin.x -= i_pReferenceFrame->maGeometry.nX;
aRect.origin.y -= i_pReferenceFrame->maGeometry.nY + aRect.size.height;
- return Rectangle( Point(static_cast<long int>(aRect.origin.x),
+ return tools::Rectangle( Point(static_cast<long int>(aRect.origin.x),
static_cast<long int>(aRect.origin.y)
),
Size( static_cast<long int>(aRect.size.width),
diff --git a/vcl/osx/salnativewidgets.cxx b/vcl/osx/salnativewidgets.cxx
index 31824cd754a1..7c91d058c292 100644
--- a/vcl/osx/salnativewidgets.cxx
+++ b/vcl/osx/salnativewidgets.cxx
@@ -47,9 +47,9 @@
class AquaBlinker : public Timer
{
AquaSalFrame* mpFrame;
- Rectangle maInvalidateRect;
+ tools::Rectangle maInvalidateRect;
- AquaBlinker( AquaSalFrame* pFrame, const Rectangle& rRect )
+ AquaBlinker( AquaSalFrame* pFrame, const tools::Rectangle& rRect )
: mpFrame( pFrame ), maInvalidateRect( rRect )
{
mpFrame->maBlinkers.push_back( this );
@@ -57,7 +57,7 @@ class AquaBlinker : public Timer
public:
- static void Blink( AquaSalFrame*, const Rectangle&, int nTimeout = 80 );
+ static void Blink( AquaSalFrame*, const tools::Rectangle&, int nTimeout = 80 );
virtual void Invoke() override
{
@@ -71,7 +71,7 @@ class AquaBlinker : public Timer
}
};
-void AquaBlinker::Blink( AquaSalFrame* pFrame, const Rectangle& rRect, int nTimeout )
+void AquaBlinker::Blink( AquaSalFrame* pFrame, const tools::Rectangle& rRect, int nTimeout )
{
// prevent repeated paints from triggering themselves all the time
for( std::list< AquaBlinker* >::const_iterator it = pFrame->maBlinkers.begin();
@@ -87,7 +87,7 @@ void AquaBlinker::Blink( AquaSalFrame* pFrame, const Rectangle& rRect, int nTime
// Helper returns an HIRect
-static HIRect ImplGetHIRectFromRectangle(Rectangle aRect)
+static HIRect ImplGetHIRectFromRectangle(tools::Rectangle aRect)
{
HIRect aHIRect;
aHIRect.origin.x = static_cast<float>(aRect.Left());
@@ -118,7 +118,7 @@ static ThemeButtonValue ImplGetButtonValue( ButtonValue aButtonValue )
}
static bool AquaGetScrollRect( /* TODO: int nScreen, */ ControlPart nPart,
- const Rectangle& rControlRect, Rectangle& rResultRect )
+ const tools::Rectangle& rControlRect, tools::Rectangle& rResultRect )
{
bool bRetVal = true;
rResultRect = rControlRect;
@@ -285,12 +285,12 @@ bool AquaSalGraphics::IsNativeControlSupported( ControlType nType, ControlPart n
return bOk;
}
-bool AquaSalGraphics::hitTestNativeControl( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion,
+bool AquaSalGraphics::hitTestNativeControl( ControlType nType, ControlPart nPart, const tools::Rectangle& rControlRegion,
const Point& rPos, bool& rIsInside )
{
if ( nType == ControlType::Scrollbar )
{
- Rectangle aRect;
+ tools::Rectangle aRect;
bool bValid = AquaGetScrollRect( /* TODO: m_nScreen */ nPart, rControlRegion, aRect );
rIsInside = bValid && aRect.IsInside( rPos );
return bValid;
@@ -334,7 +334,7 @@ UInt32 AquaSalGraphics::getTrackState( ControlState nState )
bool AquaSalGraphics::drawNativeControl(ControlType nType,
ControlPart nPart,
- const Rectangle& rControlRegion,
+ const tools::Rectangle& rControlRegion,
ControlState nState,
const ImplControlValue& aValue,
const OUString& )
@@ -346,7 +346,7 @@ bool AquaSalGraphics::drawNativeControl(ControlType nType,
CGContextSaveGState( mrContext );
- Rectangle buttonRect = rControlRegion;
+ tools::Rectangle buttonRect = rControlRegion;
HIRect rc = ImplGetHIRectFromRectangle(buttonRect);
switch( nType )
@@ -938,7 +938,7 @@ bool AquaSalGraphics::drawNativeControl(ControlType nType,
else if((nUpperState & ControlState::ROLLOVER)||(nLowerState & ControlState::ROLLOVER))
aSpinInfo.state = kThemeStateRollover;
- Rectangle aSpinRect( pSpinButtonVal->maUpperRect );
+ tools::Rectangle aSpinRect( pSpinButtonVal->maUpperRect );
aSpinRect.Union( pSpinButtonVal->maLowerRect );
HIRect buttonRc = ImplGetHIRectFromRectangle(aSpinRect);
@@ -1034,7 +1034,7 @@ bool AquaSalGraphics::drawNativeControl(ControlType nType,
if( mxClipPath )
aRect = CGPathGetBoundingBox( mxClipPath );
if( aRect.size.width != 0 && aRect.size.height != 0 )
- buttonRect.Intersection( Rectangle( Point( static_cast<long int>(aRect.origin.x),
+ buttonRect.Intersection( tools::Rectangle( Point( static_cast<long int>(aRect.origin.x),
static_cast<long int>(aRect.origin.y) ),
Size( static_cast<long int>(aRect.size.width),
static_cast<long int>(aRect.size.height) ) ) );
@@ -1045,14 +1045,14 @@ bool AquaSalGraphics::drawNativeControl(ControlType nType,
return bOK;
}
-bool AquaSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion, ControlState /*nState*/,
+bool AquaSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPart, const tools::Rectangle& rControlRegion, ControlState /*nState*/,
const ImplControlValue& aValue, const OUString&,
- Rectangle &rNativeBoundingRegion, Rectangle &rNativeContentRegion )
+ tools::Rectangle &rNativeBoundingRegion, tools::Rectangle &rNativeContentRegion )
{
bool toReturn = false;
- Rectangle aCtrlBoundRect( rControlRegion );
+ tools::Rectangle aCtrlBoundRect( rControlRegion );
short x = aCtrlBoundRect.Left();
short y = aCtrlBoundRect.Top();
short w, h;
@@ -1067,14 +1067,14 @@ bool AquaSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPa
{
w = 19; // taken from HIG
h = aCtrlBoundRect.GetHeight();
- rNativeBoundingRegion = rNativeContentRegion = Rectangle( Point( x, y ), Size( w, h ) );
+ rNativeBoundingRegion = rNativeContentRegion = tools::Rectangle( Point( x, y ), Size( w, h ) );
toReturn = true;
}
else if( nPart == ControlPart::ThumbVert )
{
w = aCtrlBoundRect.GetWidth();
h = 18; // taken from HIG
- rNativeBoundingRegion = rNativeContentRegion = Rectangle( Point( x, y ), Size( w, h ) );
+ rNativeBoundingRegion = rNativeContentRegion = tools::Rectangle( Point( x, y ), Size( w, h ) );
toReturn = true;
}
}
@@ -1082,7 +1082,7 @@ bool AquaSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPa
case ControlType::Scrollbar:
{
- Rectangle aRect;
+ tools::Rectangle aRect;
if( AquaGetScrollRect( /* m_nScreen */ nPart, aCtrlBoundRect, aRect ) )
{
toReturn = true;
@@ -1112,15 +1112,15 @@ bool AquaSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPa
}
- rNativeContentRegion = Rectangle( Point( x, y ), Size( w, h + nBorderCleanup) );
- rNativeBoundingRegion = Rectangle( Point( x, y ), Size( w, h ) );
+ rNativeContentRegion = tools::Rectangle( Point( x, y ), Size( w, h + nBorderCleanup) );
+ rNativeBoundingRegion = tools::Rectangle( Point( x, y ), Size( w, h ) );
toReturn = true;
}
break;
case ControlType::Progress:
{
- Rectangle aRect( aCtrlBoundRect );
+ tools::Rectangle aRect( aCtrlBoundRect );
if( aRect.GetHeight() < 16 )
aRect.Bottom() = aRect.Top() + 9; // values taken from HIG for medium progress
else
@@ -1133,7 +1133,7 @@ bool AquaSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPa
case ControlType::IntroProgress:
{
- Rectangle aRect( aCtrlBoundRect );
+ tools::Rectangle aRect( aCtrlBoundRect );
aRect.Bottom() = aRect.Top() + INTRO_PROGRESS_HEIGHT; // values taken from HIG for medium progress
rNativeBoundingRegion = aRect;
rNativeContentRegion = aRect;
@@ -1146,8 +1146,8 @@ bool AquaSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPa
w = aCtrlBoundRect.GetWidth() + 2*TAB_TEXT_OFFSET - 2*VCL_TAB_TEXT_OFFSET;
h = TAB_HEIGHT_NORMAL+2;
- rNativeContentRegion = Rectangle( Point( x, y ), Size( w, h ) );
- rNativeBoundingRegion = Rectangle( Point( x, y ), Size( w, h ) );
+ rNativeContentRegion = tools::Rectangle( Point( x, y ), Size( w, h ) );
+ rNativeBoundingRegion = tools::Rectangle( Point( x, y ), Size( w, h ) );
toReturn = true;
@@ -1162,8 +1162,8 @@ bool AquaSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPa
if( h < aCtrlBoundRect.GetHeight() )
h = aCtrlBoundRect.GetHeight();
- rNativeContentRegion = Rectangle( Point( x+FOCUS_RING_WIDTH, y+FOCUS_RING_WIDTH ), Size( w-2*(FOCUS_RING_WIDTH+1), h-2*(FOCUS_RING_WIDTH+1) ) );
- rNativeBoundingRegion = Rectangle( Point( x, y ), Size( w, h ) );
+ rNativeContentRegion = tools::Rectangle( Point( x+FOCUS_RING_WIDTH, y+FOCUS_RING_WIDTH ), Size( w-2*(FOCUS_RING_WIDTH+1), h-2*(FOCUS_RING_WIDTH+1) ) );
+ rNativeBoundingRegion = tools::Rectangle( Point( x, y ), Size( w, h ) );
toReturn = true;
}
@@ -1176,8 +1176,8 @@ bool AquaSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPa
w = aCtrlBoundRect.GetWidth();
h = COMBOBOX_HEIGHT_NORMAL;//listboxes and comboxes have the same height
- rNativeContentRegion = Rectangle( Point( x+FOCUS_RING_WIDTH, y+FOCUS_RING_WIDTH ), Size( w-2*FOCUS_RING_WIDTH, h ) );
- rNativeBoundingRegion = Rectangle( Point( x, y ), Size( w, h+2*FOCUS_RING_WIDTH ) );
+ rNativeContentRegion = tools::Rectangle( Point( x+FOCUS_RING_WIDTH, y+FOCUS_RING_WIDTH ), Size( w-2*FOCUS_RING_WIDTH, h ) );
+ rNativeBoundingRegion = tools::Rectangle( Point( x, y ), Size( w, h+2*FOCUS_RING_WIDTH ) );
toReturn = true;
}
@@ -1192,8 +1192,8 @@ bool AquaSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPa
y += FOCUS_RING_WIDTH;
w = DROPDOWN_BUTTON_WIDTH;
- rNativeContentRegion = Rectangle( Point( x, y ), Size( w, h ) );
- rNativeBoundingRegion = Rectangle( Point( x, y ), Size( w+FOCUS_RING_WIDTH, h+2*FOCUS_RING_WIDTH ) );
+ rNativeContentRegion = tools::Rectangle( Point( x, y ), Size( w, h ) );
+ rNativeBoundingRegion = tools::Rectangle( Point( x, y ), Size( w+FOCUS_RING_WIDTH, h+2*FOCUS_RING_WIDTH ) );
toReturn = true;
}
@@ -1211,8 +1211,8 @@ bool AquaSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPa
w -= 9; // HIG specifies 9 units distance between dropdown button area and content
h -= 4; // don't draw into lower border
- rNativeContentRegion = Rectangle( Point( x, y ), Size( w, h ) );
- rNativeBoundingRegion = Rectangle( Point( x, y ), Size( w+FOCUS_RING_WIDTH, h+2*FOCUS_RING_WIDTH ) );
+ rNativeContentRegion = tools::Rectangle( Point( x, y ), Size( w, h ) );
+ rNativeBoundingRegion = tools::Rectangle( Point( x, y ), Size( w+FOCUS_RING_WIDTH, h+2*FOCUS_RING_WIDTH ) );
toReturn = true;
}
@@ -1225,8 +1225,8 @@ bool AquaSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPa
w = 3+2*FOCUS_RING_WIDTH+SPIN_BUTTON_SPACE+SPIN_BUTTON_WIDTH;
h = TEXT_EDIT_HEIGHT_NORMAL;
- rNativeContentRegion = Rectangle( Point( x+FOCUS_RING_WIDTH, y ), Size( w-2*FOCUS_RING_WIDTH, h ) );
- rNativeBoundingRegion = Rectangle( Point( x, y ), Size( w, h+2*FOCUS_RING_WIDTH ) );
+ rNativeContentRegion = tools::Rectangle( Point( x+FOCUS_RING_WIDTH, y ), Size( w-2*FOCUS_RING_WIDTH, h ) );
+ rNativeBoundingRegion = tools::Rectangle( Point( x, y ), Size( w, h+2*FOCUS_RING_WIDTH ) );
toReturn = true;
}
@@ -1238,8 +1238,8 @@ bool AquaSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPa
w -= 8; // offset for left and right rounded border
h -= 4; // don't draw into upper or lower border
- rNativeContentRegion = Rectangle( Point( x + FOCUS_RING_WIDTH, y + FOCUS_RING_WIDTH ), Size( w - 2* FOCUS_RING_WIDTH, h ) );
- rNativeBoundingRegion = Rectangle( Point( x, y ), Size( w, h+2*FOCUS_RING_WIDTH ) );
+ rNativeContentRegion = tools::Rectangle( Point( x + FOCUS_RING_WIDTH, y + FOCUS_RING_WIDTH ), Size( w - 2* FOCUS_RING_WIDTH, h ) );
+ rNativeBoundingRegion = tools::Rectangle( Point( x, y ), Size( w, h+2*FOCUS_RING_WIDTH ) );
toReturn = true;
}
@@ -1252,8 +1252,8 @@ bool AquaSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPa
w = SPIN_BUTTON_WIDTH + 2*CLIP_FUZZ;
h = SPIN_UPPER_BUTTON_HEIGHT + 2*CLIP_FUZZ;
- rNativeContentRegion = Rectangle( Point( x, y ), Size( w, h ) );
- rNativeBoundingRegion = Rectangle( Point( x, y ), Size( w, h ) );
+ rNativeContentRegion = tools::Rectangle( Point( x, y ), Size( w, h ) );
+ rNativeBoundingRegion = tools::Rectangle( Point( x, y ), Size( w, h ) );
toReturn = true;
}
@@ -1263,8 +1263,8 @@ bool AquaSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPa
w = SPIN_BUTTON_WIDTH + 2*CLIP_FUZZ;
h = SPIN_LOWER_BUTTON_HEIGHT + 2*CLIP_FUZZ;
- rNativeContentRegion = Rectangle( Point( x, y ), Size( w, h ) );
- rNativeBoundingRegion = Rectangle( Point( x, y ), Size( w, h ) );
+ rNativeContentRegion = tools::Rectangle( Point( x, y ), Size( w, h ) );
+ rNativeBoundingRegion = tools::Rectangle( Point( x, y ), Size( w, h ) );
toReturn = true;
}
@@ -1276,7 +1276,7 @@ bool AquaSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPa
if( ( nPart == ControlPart::Border ) &&
!( nFlags & (DrawFrameFlags::Menu | DrawFrameFlags::WindowBorder | DrawFrameFlags::BorderWindowBorder) ) )
{
- Rectangle aRect(aCtrlBoundRect);
+ tools::Rectangle aRect(aCtrlBoundRect);
if( nStyle == DrawFrameStyle::DoubleIn )
{
aRect.Left() += 1;
@@ -1308,8 +1308,8 @@ bool AquaSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPa
w=10;
h=10;//dimensions of the mark (10px font)
- rNativeContentRegion = Rectangle( Point( x, y ), Size( w, h ) );
- rNativeBoundingRegion = Rectangle( Point( x, y ), Size( w, h ) );
+ rNativeContentRegion = tools::Rectangle( Point( x, y ), Size( w, h ) );
+ rNativeBoundingRegion = tools::Rectangle( Point( x, y ), Size( w, h ) );
toReturn = true;
}
diff --git a/vcl/osx/salsys.cxx b/vcl/osx/salsys.cxx
index c4d454abed93..e7870ef79bd3 100644
--- a/vcl/osx/salsys.cxx
+++ b/vcl/osx/salsys.cxx
@@ -38,10 +38,10 @@ unsigned int AquaSalSystem::GetDisplayScreenCount()
return pScreens ? [pScreens count] : 1;
}
-Rectangle AquaSalSystem::GetDisplayScreenPosSizePixel( unsigned int nScreen )
+tools::Rectangle AquaSalSystem::GetDisplayScreenPosSizePixel( unsigned int nScreen )
{
NSArray* pScreens = [NSScreen screens];
- Rectangle aRet;
+ tools::Rectangle aRet;
NSScreen* pScreen = nil;
if( pScreens && nScreen < [pScreens count] )
pScreen = [pScreens objectAtIndex: nScreen];
@@ -51,7 +51,7 @@ Rectangle AquaSalSystem::GetDisplayScreenPosSizePixel( unsigned int nScreen )
if( pScreen )
{
NSRect aFrame = [pScreen frame];
- aRet = Rectangle( Point( static_cast<long int>(aFrame.origin.x), static_cast<long int>(aFrame.origin.y) ),
+ aRet = tools::Rectangle( Point( static_cast<long int>(aFrame.origin.x), static_cast<long int>(aFrame.origin.y) ),
Size( static_cast<long int>(aFrame.size.width), static_cast<long int>(aFrame.size.height) ) );
}
return aRet;
diff --git a/vcl/qa/cppunit/BitmapTest.cxx b/vcl/qa/cppunit/BitmapTest.cxx
index f6d69d6cba5d..f55a5b607617 100644
--- a/vcl/qa/cppunit/BitmapTest.cxx
+++ b/vcl/qa/cppunit/BitmapTest.cxx
@@ -112,8 +112,8 @@ void BitmapTest::testScale()
Bitmap::ScopedWriteAccess aWriteAccess(aBitmap24Bit);
aWriteAccess->Erase(COL_WHITE);
aWriteAccess->SetLineColor(COL_BLACK);
- aWriteAccess->DrawRect(Rectangle(1, 1, 8, 8));
- aWriteAccess->DrawRect(Rectangle(3, 3, 6, 6));
+ aWriteAccess->DrawRect(tools::Rectangle(1, 1, 8, 8));
+ aWriteAccess->DrawRect(tools::Rectangle(3, 3, 6, 6));
}
BitmapSymmetryCheck aBitmapSymmetryCheck;
diff --git a/vcl/qa/cppunit/canvasbitmaptest.cxx b/vcl/qa/cppunit/canvasbitmaptest.cxx
index ff3479cdce13..211a75b1ab57 100644
--- a/vcl/qa/cppunit/canvasbitmaptest.cxx
+++ b/vcl/qa/cppunit/canvasbitmaptest.cxx
@@ -656,7 +656,7 @@ void CanvasBitmapTest::runTest()
aWhite = Color(COL_WHITE);
}
pAcc->SetFillColor(COL_GREEN);
- pAcc->FillRect(Rectangle(0,0,100,100));
+ pAcc->FillRect(tools::Rectangle(0,0,100,100));
pAcc->SetPixel(0,0,aWhite);
pAcc->SetPixel(0,1,aBlack);
pAcc->SetPixel(0,2,aWhite);
@@ -674,7 +674,7 @@ void CanvasBitmapTest::runTest()
if( pAcc.get() )
{
pAcc->SetFillColor(COL_BLACK);
- pAcc->FillRect(Rectangle(0,0,100,100));
+ pAcc->FillRect(tools::Rectangle(0,0,100,100));
pAcc->SetPixel(0,0,BitmapColor(1));
pAcc->SetPixel(0,1,BitmapColor(0));
pAcc->SetPixel(0,2,BitmapColor(1));
@@ -692,7 +692,7 @@ void CanvasBitmapTest::runTest()
if( pAcc )
{
pAcc->SetFillColor(COL_BLACK);
- pAcc->FillRect(Rectangle(0,0,100,100));
+ pAcc->FillRect(tools::Rectangle(0,0,100,100));
pAcc->SetPixel(0,0,BitmapColor(255));
pAcc->SetPixel(0,1,BitmapColor(0));
pAcc->SetPixel(0,2,BitmapColor(255));
diff --git a/vcl/qa/cppunit/complextext.cxx b/vcl/qa/cppunit/complextext.cxx
index f785b4a60591..f2c33363fb92 100644
--- a/vcl/qa/cppunit/complextext.cxx
+++ b/vcl/qa/cppunit/complextext.cxx
@@ -85,20 +85,20 @@ void VclComplexTextTest::testArabic()
// exact bounding rectangle, not essentially the same as text width/height
#if defined(MACOSX) || defined(_WIN32)
// FIXME: fails on some Linux tinderboxes, might be a FreeType issue.
- Rectangle aBoundRect;
+ tools::Rectangle aBoundRect;
pOutDev->GetTextBoundRect(aBoundRect, aOneTwoThree);
- CPPUNIT_ASSERT_EQUAL(Rectangle(0, 1, 71, 15), aBoundRect);
+ CPPUNIT_ASSERT_EQUAL(tools::Rectangle(0, 1, 71, 15), aBoundRect);
#endif
// normal orientation
- Rectangle aInput;
- Rectangle aRect = pOutDev->GetTextRect( aInput, aOneTwoThree );
+ tools::Rectangle aInput;
+ tools::Rectangle aRect = pOutDev->GetTextRect( aInput, aOneTwoThree );
// now rotate 270 degress
vcl::Font aRotated( aFont );
aRotated.SetOrientation( 2700 );
pOutDev->SetFont( aRotated );
- Rectangle aRectRot = pOutDev->GetTextRect( aInput, aOneTwoThree );
+ tools::Rectangle aRectRot = pOutDev->GetTextRect( aInput, aOneTwoThree );
// Check that we did do the rotation ...
#if 0
diff --git a/vcl/qa/cppunit/svm/svmtest.cxx b/vcl/qa/cppunit/svm/svmtest.cxx
index f90b1992d536..619fa07e684d 100644
--- a/vcl/qa/cppunit/svm/svmtest.cxx
+++ b/vcl/qa/cppunit/svm/svmtest.cxx
@@ -343,7 +343,7 @@ void SvmTest::testRect()
pVirtualDev->SetLineColor(Color(0x123456));
pVirtualDev->SetFillColor(Color(0x654321));
- pVirtualDev->DrawRect(Rectangle(Point(1, 2), Size(4, 4)));
+ pVirtualDev->DrawRect(tools::Rectangle(Point(1, 2), Size(4, 4)));
checkRect(writeAndRead(aGDIMetaFile, "rect.svm"));
}
@@ -371,7 +371,7 @@ void SvmTest::testRoundRect()
pVirtualDev->SetLineColor(Color(0x123456));
pVirtualDev->SetFillColor(Color(0x654321));
- pVirtualDev->DrawRect(Rectangle(Point(1, 2), Size(4, 4)), 1, 2);
+ pVirtualDev->DrawRect(tools::Rectangle(Point(1, 2), Size(4, 4)), 1, 2);
checkRoundRect(writeAndRead(aGDIMetaFile, "roundrect.svm"));
}
@@ -398,7 +398,7 @@ void SvmTest::testEllipse()
pVirtualDev->SetLineColor(Color(0x123456));
pVirtualDev->SetFillColor(Color(0x654321));
- pVirtualDev->DrawEllipse(Rectangle(Point(1, 2), Size(4, 4)));
+ pVirtualDev->DrawEllipse(tools::Rectangle(Point(1, 2), Size(4, 4)));
checkEllipse(writeAndRead(aGDIMetaFile, "ellipse.svm"));
}
@@ -428,7 +428,7 @@ void SvmTest::testArc()
pVirtualDev->SetLineColor(Color(0x123456));
pVirtualDev->SetFillColor(Color(0x654321));
- pVirtualDev->DrawArc(Rectangle(Point(1, 2), Size(4, 4)), Point(10, 11), Point(12, 13));
+ pVirtualDev->DrawArc(tools::Rectangle(Point(1, 2), Size(4, 4)), Point(10, 11), Point(12, 13));
checkArc(writeAndRead(aGDIMetaFile, "arc.svm"));
}
@@ -458,7 +458,7 @@ void SvmTest::testPie()
pVirtualDev->SetLineColor(Color(0x123456));
pVirtualDev->SetFillColor(Color(0x654321));
- pVirtualDev->DrawPie(Rectangle(Point(11, 12), Size(4, 4)), Point(20, 21), Point(22, 23));
+ pVirtualDev->DrawPie(tools::Rectangle(Point(11, 12), Size(4, 4)), Point(20, 21), Point(22, 23));
checkPie(writeAndRead(aGDIMetaFile, "pie.svm"));
}
@@ -488,7 +488,7 @@ void SvmTest::testChord()
pVirtualDev->SetLineColor(Color(0x123456));
pVirtualDev->SetFillColor(Color(0x654321));
- pVirtualDev->DrawChord(Rectangle(Point(21, 22), Size(4, 4)), Point(30, 31), Point(32, 33));
+ pVirtualDev->DrawChord(tools::Rectangle(Point(21, 22), Size(4, 4)), Point(30, 31), Point(32, 33));
checkChord(writeAndRead(aGDIMetaFile, "chord.svm"));
}
@@ -729,7 +729,7 @@ void SvmTest::testTextRect()
GDIMetaFile aGDIMetaFile;
ScopedVclPtrInstance<VirtualDevice> pVirtualDev;
setupBaseVirtualDevice(*pVirtualDev.get(), aGDIMetaFile);
- pVirtualDev->DrawText(Rectangle(Point(0,0), Size(5,5)), "123456", DrawTextFlags::Center);
+ pVirtualDev->DrawText(tools::Rectangle(Point(0,0), Size(5,5)), "123456", DrawTextFlags::Center);
checkTextRect(writeAndRead(aGDIMetaFile, "textrectangle.svm"));
}
diff --git a/vcl/quartz/ctfonts.cxx b/vcl/quartz/ctfonts.cxx
index 42e1169a37aa..7c5b528634d5 100644
--- a/vcl/quartz/ctfonts.cxx
+++ b/vcl/quartz/ctfonts.cxx
@@ -152,7 +152,7 @@ SAL_WNODEPRECATED_DECLARATIONS_POP
}
}
-bool CoreTextStyle::GetGlyphBoundRect(const GlyphItem& rGlyph, Rectangle& rRect ) const
+bool CoreTextStyle::GetGlyphBoundRect(const GlyphItem& rGlyph, tools::Rectangle& rRect ) const
{
CGGlyph nCGGlyph = rGlyph.maGlyphId;
CTFontRef aCTFontRef = static_cast<CTFontRef>(CFDictionaryGetValue( mpStyleDict, kCTFontAttributeName ));
@@ -170,7 +170,7 @@ bool CoreTextStyle::GetGlyphBoundRect(const GlyphItem& rGlyph, Rectangle& rRect
long yMin = floor(aCGRect.origin.y);
long xMax = ceil(aCGRect.origin.x + aCGRect.size.width);
long yMax = ceil(aCGRect.origin.y + aCGRect.size.height);
- rRect = Rectangle(xMin, -yMax, xMax, -yMin);
+ rRect = tools::Rectangle(xMin, -yMax, xMax, -yMin);
return true;
}
diff --git a/vcl/quartz/salgdi.cxx b/vcl/quartz/salgdi.cxx
index 5c24d2290937..e998403fe6ac 100644
--- a/vcl/quartz/salgdi.cxx
+++ b/vcl/quartz/salgdi.cxx
@@ -389,7 +389,7 @@ bool AquaSalGraphics::GetGlyphOutline(const GlyphItem& rGlyph, basegfx::B2DPolyP
return false;
}
-bool AquaSalGraphics::GetGlyphBoundRect(const GlyphItem& rGlyph, Rectangle& rRect )
+bool AquaSalGraphics::GetGlyphBoundRect(const GlyphItem& rGlyph, tools::Rectangle& rRect )
{
const int nFallbackLevel = rGlyph.mnFallbackLevel;
if (nFallbackLevel < MAX_FALLBACK && mpTextStyle[nFallbackLevel])
@@ -856,7 +856,7 @@ void AquaSalGraphics::RefreshRect(float lX, float lY, float lWidth, float lHeigh
// Rounding down x and width can accumulate a rounding error of up to 2
// The decrementing of x, the rounding error and the antialiasing border
// require that the width and the height need to be increased by four
- const Rectangle aVclRect(Point(static_cast<long int>(lX-1),
+ const tools::Rectangle aVclRect(Point(static_cast<long int>(lX-1),
static_cast<long int>(lY-1) ),
Size( static_cast<long int>(lWidth+4),
static_cast<long int>(lHeight+4) ) );
diff --git a/vcl/quartz/salgdicommon.cxx b/vcl/quartz/salgdicommon.cxx
index 11d831bd861b..2f36c76d4303 100644
--- a/vcl/quartz/salgdicommon.cxx
+++ b/vcl/quartz/salgdicommon.cxx
@@ -237,7 +237,7 @@ bool AquaSalGraphics::CreateFontSubset( const OUString& rToFile,
rInfo.m_nFontType = FontType::SFNT_TTF;
rInfo.m_aPSName = OUString( aTTInfo.psname, std::strlen(aTTInfo.psname),
RTL_TEXTENCODING_UTF8 );
- rInfo.m_aFontBBox = Rectangle( Point( aTTInfo.xMin, aTTInfo.yMin ),
+ rInfo.m_aFontBBox = tools::Rectangle( Point( aTTInfo.xMin, aTTInfo.yMin ),
Point( aTTInfo.xMax, aTTInfo.yMax ) );
rInfo.m_nCapHeight = aTTInfo.yMax; // Well ...
rInfo.m_nAscent = aTTInfo.winAscent;
@@ -895,7 +895,7 @@ void AquaSalGraphics::drawLine( long nX1, long nY1, long nX2, long nY2 )
SAL_INFO( "vcl.cg", "CGContextDrawPath(" << mrContext << ",kCGPathStroke)" );
CGContextDrawPath( mrContext, kCGPathStroke );
- Rectangle aRefreshRect( nX1, nY1, nX2, nY2 );
+ tools::Rectangle aRefreshRect( nX1, nY1, nX2, nY2 );
(void) aRefreshRect;
// Is a call to RefreshRect( aRefreshRect ) missing here?
diff --git a/vcl/source/app/help.cxx b/vcl/source/app/help.cxx
index e6f3c8a4f215..39980c25a501 100644
--- a/vcl/source/app/help.cxx
+++ b/vcl/source/app/help.cxx
@@ -148,7 +148,7 @@ bool Help::IsBalloonHelpEnabled()
}
bool Help::ShowBalloon( vcl::Window* pParent,
- const Point& rScreenPos, const Rectangle& rRect,
+ const Point& rScreenPos, const tools::Rectangle& rRect,
const OUString& rHelpText )
{
ImplShowHelpWindow( pParent, HELPWINSTYLE_BALLOON, QuickHelpFlags::NONE,
@@ -173,7 +173,7 @@ bool Help::IsQuickHelpEnabled()
}
bool Help::ShowQuickHelp( vcl::Window* pParent,
- const Rectangle& rScreenRect,
+ const tools::Rectangle& rScreenRect,
const OUString& rHelpText,
const OUString& rLongHelpText,
QuickHelpFlags nStyle )
@@ -192,7 +192,7 @@ void Help::HideBalloonAndQuickHelp()
ImplDestroyHelpWindow( bIsVisible );
}
-sal_uIntPtr Help::ShowPopover(vcl::Window* pParent, const Rectangle& rScreenRect,
+sal_uIntPtr Help::ShowPopover(vcl::Window* pParent, const tools::Rectangle& rScreenRect,
const OUString& rText, QuickHelpFlags nStyle)
{
sal_uIntPtr nId = pParent->ImplGetFrame()->ShowPopover(rText, rScreenRect, nStyle);
@@ -212,7 +212,7 @@ sal_uIntPtr Help::ShowPopover(vcl::Window* pParent, const Rectangle& rScreenRect
return nId;
}
-void Help::UpdatePopover(sal_uIntPtr nId, vcl::Window* pParent, const Rectangle& rScreenRect,
+void Help::UpdatePopover(sal_uIntPtr nId, vcl::Window* pParent, const tools::Rectangle& rScreenRect,
const OUString& rText)
{
if (pParent->ImplGetFrame()->UpdatePopover(nId, rText, rScreenRect))
@@ -343,7 +343,7 @@ void HelpTextWindow::SetHelpText( const OUString& rHelpText )
aSize.Width() = GetCtrlTextWidth( maHelpText );
else
aSize.Width() = GetTextWidth( maHelpText );
- maTextRect = Rectangle( Point( HELPTEXTMARGIN_QUICK, HELPTEXTMARGIN_QUICK ), aSize );
+ maTextRect = tools::Rectangle( Point( HELPTEXTMARGIN_QUICK, HELPTEXTMARGIN_QUICK ), aSize );
}
else // HELPWINSTYLE_BALLOON
{
@@ -355,12 +355,12 @@ void HelpTextWindow::SetHelpText( const OUString& rHelpText )
OUString aXXX = aBuf.makeStringAndClear();
long nWidth = GetTextWidth( aXXX );
Size aTmpSize( nWidth, 0x7FFFFFFF );
- Rectangle aTry1( aTmpPoint, aTmpSize );
+ tools::Rectangle aTry1( aTmpPoint, aTmpSize );
DrawTextFlags nDrawFlags = DrawTextFlags::MultiLine | DrawTextFlags::WordBreak |
DrawTextFlags::Left | DrawTextFlags::Top;
if ( mnStyle & QuickHelpFlags::CtrlText )
nDrawFlags |= DrawTextFlags::Mnemonic;
- Rectangle aTextRect = GetTextRect( aTry1, maHelpText, nDrawFlags );
+ tools::Rectangle aTextRect = GetTextRect( aTry1, maHelpText, nDrawFlags );
// get a better width later...
maTextRect = aTextRect;
@@ -381,13 +381,13 @@ void HelpTextWindow::ImplShow()
Update();
}
-void HelpTextWindow::Paint( vcl::RenderContext& rRenderContext, const Rectangle& )
+void HelpTextWindow::Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& )
{
// paint native background
bool bNativeOK = false;
if (rRenderContext.IsNativeControlSupported(ControlType::Tooltip, ControlPart::Entire))
{
- Rectangle aCtrlRegion(Point(0, 0), GetOutputSizePixel());
+ tools::Rectangle aCtrlRegion(Point(0, 0), GetOutputSizePixel());
ImplControlValue aControlValue;
bNativeOK = rRenderContext.DrawNativeControl(ControlType::Tooltip, ControlPart::Entire, aCtrlRegion,
ControlState::NONE, aControlValue, OUString());
@@ -414,14 +414,14 @@ void HelpTextWindow::Paint( vcl::RenderContext& rRenderContext, const Rectangle&
if (!bNativeOK)
{
Size aSz = GetOutputSizePixel();
- rRenderContext.DrawRect(Rectangle(Point(), aSz));
+ rRenderContext.DrawRect(tools::Rectangle(Point(), aSz));
if (mnHelpWinStyle == HELPWINSTYLE_BALLOON)
{
aSz.Width() -= 2;
aSz.Height() -= 2;
Color aColor(rRenderContext.GetLineColor());
rRenderContext.SetLineColor(COL_GRAY);
- rRenderContext.DrawRect(Rectangle(Point(1, 1), aSz));
+ rRenderContext.DrawRect(tools::Rectangle(Point(1, 1), aSz));
rRenderContext.SetLineColor(aColor);
}
}
@@ -493,7 +493,7 @@ OUString HelpTextWindow::GetText() const
void ImplShowHelpWindow( vcl::Window* pParent, sal_uInt16 nHelpWinStyle, QuickHelpFlags nStyle,
const OUString& rHelpText, const OUString& rStatusText,
- const Point& rScreenPos, const Rectangle& rHelpArea )
+ const Point& rScreenPos, const tools::Rectangle& rHelpArea )
{
if (pParent->ImplGetFrame()->ShowTooltip(rHelpText, rHelpArea))
{
@@ -533,7 +533,7 @@ void ImplShowHelpWindow( vcl::Window* pParent, sal_uInt16 nHelpWinStyle, QuickHe
if (bTextChanged)
{
vcl::Window * pWindow = pHelpWin->GetParent()->ImplGetFrameWindow();
- Rectangle aInvRect( pHelpWin->GetWindowExtentsRelative( pWindow ) );
+ tools::Rectangle aInvRect( pHelpWin->GetWindowExtentsRelative( pWindow ) );
if( pHelpWin->IsVisible() )
pWindow->Invalidate( aInvRect );
@@ -578,7 +578,7 @@ void ImplDestroyHelpWindow( bool bUpdateHideTime )
{
vcl::Window * pWindow = pHelpWin->GetParent()->ImplGetFrameWindow();
// find out screen area covered by system help window
- Rectangle aInvRect( pHelpWin->GetWindowExtentsRelative( pWindow ) );
+ tools::Rectangle aInvRect( pHelpWin->GetWindowExtentsRelative( pWindow ) );
if( pHelpWin->IsVisible() )
pWindow->Invalidate( aInvRect );
pSVData->maHelpData.mpHelpWin = nullptr;
@@ -591,11 +591,11 @@ void ImplDestroyHelpWindow( bool bUpdateHideTime )
}
void ImplSetHelpWindowPos( vcl::Window* pHelpWin, sal_uInt16 nHelpWinStyle, QuickHelpFlags nStyle,
- const Point& rPos, const Rectangle& rHelpArea )
+ const Point& rPos, const tools::Rectangle& rHelpArea )
{
Point aPos = rPos;
Size aSz = pHelpWin->GetSizePixel();
- Rectangle aScreenRect = pHelpWin->ImplGetFrameWindow()->GetDesktopRectPixel();
+ tools::Rectangle aScreenRect = pHelpWin->ImplGetFrameWindow()->GetDesktopRectPixel();
aPos = pHelpWin->GetParent()->ImplGetFrameWindow()->OutputToAbsoluteScreenPixel( aPos );
// get mouse screen coords
Point aMousePos( pHelpWin->GetParent()->ImplGetFrameWindow()->GetPointerPosPixel() );
@@ -627,7 +627,7 @@ void ImplSetHelpWindowPos( vcl::Window* pHelpWin, sal_uInt16 nHelpWinStyle, Quic
if ( nStyle & QuickHelpFlags::NoAutoPos )
{
// convert help area to screen coords
- Rectangle devHelpArea(
+ tools::Rectangle devHelpArea(
pHelpWin->GetParent()->ImplGetFrameWindow()->OutputToAbsoluteScreenPixel( rHelpArea.TopLeft() ),
pHelpWin->GetParent()->ImplGetFrameWindow()->OutputToAbsoluteScreenPixel( rHelpArea.BottomRight() ) );
@@ -678,7 +678,7 @@ void ImplSetHelpWindowPos( vcl::Window* pHelpWin, sal_uInt16 nHelpWinStyle, Quic
// the popup must not appear under the mouse
// otherwise it would directly be closed due to a focus change...
*/
- Rectangle aHelpRect( aPos, aSz );
+ tools::Rectangle aHelpRect( aPos, aSz );
if( aHelpRect.IsInside( aMousePos ) )
{
Point delta(2,2);
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index 12cee864feda..dec8bdb64683 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -50,7 +50,7 @@ void SalFrame::SetCallback( vcl::Window* pWindow, SALFRAMEPROC pProc )
// default to full-frame flushes
// on ports where partial-flushes are much cheaper this method should be overridden
-void SalFrame::Flush( const Rectangle& )
+void SalFrame::Flush( const tools::Rectangle& )
{
Flush();
}
@@ -139,7 +139,7 @@ SalMenu::~SalMenu()
{
}
-bool SalMenu::ShowNativePopupMenu(FloatingWindow *, const Rectangle&, FloatWinPopupFlags )
+bool SalMenu::ShowNativePopupMenu(FloatingWindow *, const tools::Rectangle&, FloatWinPopupFlags )
{
return false;
}
@@ -157,9 +157,9 @@ void SalMenu::RemoveMenuBarButton( sal_uInt16 )
{
}
-Rectangle SalMenu::GetMenuBarButtonRectPixel( sal_uInt16, SalFrame* )
+tools::Rectangle SalMenu::GetMenuBarButtonRectPixel( sal_uInt16, SalFrame* )
{
- return Rectangle();
+ return tools::Rectangle();
}
SalMenuItem::~SalMenuItem()
diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx
index 1dc3e6012036..eeeb25e0a283 100644
--- a/vcl/source/app/svapp.cxx
+++ b/vcl/source/app/svapp.cxx
@@ -1276,14 +1276,14 @@ unsigned int Application::GetDisplayExternalScreen()
return nExternal;
}
-Rectangle Application::GetScreenPosSizePixel( unsigned int nScreen )
+tools::Rectangle Application::GetScreenPosSizePixel( unsigned int nScreen )
{
SalSystem* pSys = ImplGetSalSystem();
- return pSys ? pSys->GetDisplayScreenPosSizePixel( nScreen ) : Rectangle();
+ return pSys ? pSys->GetDisplayScreenPosSizePixel( nScreen ) : tools::Rectangle();
}
namespace {
-unsigned long calcDistSquare( const Point& i_rPoint, const Rectangle& i_rRect )
+unsigned long calcDistSquare( const Point& i_rPoint, const tools::Rectangle& i_rRect )
{
const Point aRectCenter( (i_rRect.Left() + i_rRect.Right())/2,
(i_rRect.Top() + i_rRect.Bottom())/ 2 );
@@ -1293,7 +1293,7 @@ unsigned long calcDistSquare( const Point& i_rPoint, const Rectangle& i_rRect )
}
}
-unsigned int Application::GetBestScreen( const Rectangle& i_rRect )
+unsigned int Application::GetBestScreen( const tools::Rectangle& i_rRect )
{
if( !IsUnifiedDisplay() )
return GetDisplayBuiltInScreen();
@@ -1303,12 +1303,12 @@ unsigned int Application::GetBestScreen( const Rectangle& i_rRect )
unsigned long nOverlap = 0;
for( unsigned int i = 0; i < nScreens; i++ )
{
- const Rectangle aCurScreenRect( GetScreenPosSizePixel( i ) );
+ const tools::Rectangle aCurScreenRect( GetScreenPosSizePixel( i ) );
// if a screen contains the rectangle completely it is obviously the best screen
if( aCurScreenRect.IsInside( i_rRect ) )
return i;
// next the screen which contains most of the area of the rect is the best
- Rectangle aIntersection( aCurScreenRect.GetIntersection( i_rRect ) );
+ tools::Rectangle aIntersection( aCurScreenRect.GetIntersection( i_rRect ) );
if( ! aIntersection.IsEmpty() )
{
const unsigned long nCurOverlap( aIntersection.GetWidth() * aIntersection.GetHeight() );
@@ -1328,7 +1328,7 @@ unsigned int Application::GetBestScreen( const Rectangle& i_rRect )
unsigned long nDist = ULONG_MAX;
for( unsigned int i = 0; i < nScreens; i++ )
{
- const Rectangle aCurScreenRect( GetScreenPosSizePixel( i ) );
+ const tools::Rectangle aCurScreenRect( GetScreenPosSizePixel( i ) );
const unsigned long nCurDist( calcDistSquare( aCenter, aCurScreenRect ) );
if( nCurDist < nDist )
{
diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx
index e94df630f4db..64c078e070fa 100644
--- a/vcl/source/control/button.cxx
+++ b/vcl/source/control/button.cxx
@@ -73,7 +73,7 @@ class ImplCommonButtonData
public:
ImplCommonButtonData();
- Rectangle maFocusRect;
+ tools::Rectangle maFocusRect;
long mnSeparatorX;
DrawButtonFlags mnButtonState;
bool mbSmallSymbol;
@@ -200,7 +200,7 @@ ImageAlign Button::GetImageAlign() const
return mpButtonData->meImageAlign;
}
-void Button::SetFocusRect( const Rectangle& rFocusRect )
+void Button::SetFocusRect( const tools::Rectangle& rFocusRect )
{
ImplSetFocusRect( rFocusRect );
}
@@ -247,7 +247,7 @@ DrawTextFlags Button::ImplGetTextStyle(OUString& rText, WinBits nWinStyle, DrawF
void Button::ImplDrawAlignedImage(OutputDevice* pDev, Point& rPos,
Size& rSize,
sal_uLong nImageSep, DrawFlags nDrawFlags,
- DrawTextFlags nTextStyle, Rectangle *pSymbolRect,
+ DrawTextFlags nTextStyle, tools::Rectangle *pSymbolRect,
bool bAddImageSep)
{
OUString aText(GetText());
@@ -260,7 +260,7 @@ void Button::ImplDrawAlignedImage(OutputDevice* pDev, Point& rPos,
return;
WinBits nWinStyle = GetStyle();
- Rectangle aOutRect( rPos, rSize );
+ tools::Rectangle aOutRect( rPos, rSize );
ImageAlign eImageAlign = mpButtonData->meImageAlign;
Size aImageSize = mpButtonData->maImage.GetSizePixel();
@@ -300,8 +300,8 @@ void Button::ImplDrawAlignedImage(OutputDevice* pDev, Point& rPos,
Size aMax;
Point aImagePos = rPos;
Point aTextPos = rPos;
- Rectangle aUnion = Rectangle(aImagePos, aImageSize);
- Rectangle aSymbol;
+ tools::Rectangle aUnion = tools::Rectangle(aImagePos, aImageSize);
+ tools::Rectangle aSymbol;
long nSymbolHeight = 0;
if (bDrawText || bHasSymbol)
@@ -309,7 +309,7 @@ void Button::ImplDrawAlignedImage(OutputDevice* pDev, Point& rPos,
// Get the size of the text output area ( the symbol will be drawn in
// this area as well, so the symbol rectangle will be calculated here, too )
- Rectangle aRect = Rectangle(Point(), rSize);
+ tools::Rectangle aRect = tools::Rectangle(Point(), rSize);
Size aTSSize;
if (bHasSymbol)
@@ -320,14 +320,14 @@ void Button::ImplDrawAlignedImage(OutputDevice* pDev, Point& rPos,
if (mpButtonData->mbSmallSymbol)
nSymbolHeight = nSymbolHeight * 3 / 4;
- aSymbol = Rectangle(Point(), Size(nSymbolHeight, nSymbolHeight));
+ aSymbol = tools::Rectangle(Point(), Size(nSymbolHeight, nSymbolHeight));
ImplCalcSymbolRect(aSymbol);
aRect.Left() += 3 * nSymbolHeight / 2;
aTSSize.Width() = 3 * nSymbolHeight / 2;
}
else
{
- aSymbol = Rectangle(Point(), rSize);
+ aSymbol = tools::Rectangle(Point(), rSize);
ImplCalcSymbolRect(aSymbol);
aTSSize.Width() = aSymbol.GetWidth();
}
@@ -433,8 +433,8 @@ void Button::ImplDrawAlignedImage(OutputDevice* pDev, Point& rPos,
aTextPos.X() = rPos.X() + (aMax.Width() - aTSSize.Width()) / 2;
aTextPos.Y() = rPos.Y() + (aMax.Height() - aTSSize.Height()) / 2;
}
- aUnion = Rectangle(aImagePos, aImageSize);
- aUnion.Union(Rectangle(aTextPos, aTSSize));
+ aUnion = tools::Rectangle(aImagePos, aImageSize);
+ aUnion.Union(tools::Rectangle(aTextPos, aTSSize));
}
// Now place the combination of text and image in the output area of the button
@@ -479,11 +479,11 @@ void Button::ImplDrawAlignedImage(OutputDevice* pDev, Point& rPos,
if (mpButtonData->meSymbolAlign == SymbolAlign::RIGHT)
{
Point aRightPos = Point(aTextPos.X() + aTextSize.Width() + aSymbolSize.Width() / 2, aTextPos.Y());
- *pSymbolRect = Rectangle(aRightPos, aSymbolSize);
+ *pSymbolRect = tools::Rectangle(aRightPos, aSymbolSize);
}
else
{
- *pSymbolRect = Rectangle(aTextPos, aSymbolSize);
+ *pSymbolRect = tools::Rectangle(aTextPos, aSymbolSize);
aTextPos.X() += 3 * nSymbolHeight / 2;
}
if (mpButtonData->mbSmallSymbol)
@@ -508,20 +508,20 @@ void Button::ImplDrawAlignedImage(OutputDevice* pDev, Point& rPos,
if (bDrawText)
{
- const Rectangle aTOutRect(aTextPos, aTextSize);
+ const tools::Rectangle aTOutRect(aTextPos, aTextSize);
ImplSetFocusRect(aTOutRect);
DrawControlText(*pDev, aTOutRect, aText, nTextStyle, nullptr, nullptr, &aDeviceTextSize);
}
else
{
- ImplSetFocusRect(Rectangle(aImagePos, aImageSize));
+ ImplSetFocusRect(tools::Rectangle(aImagePos, aImageSize));
}
}
-void Button::ImplSetFocusRect(const Rectangle &rFocusRect)
+void Button::ImplSetFocusRect(const tools::Rectangle &rFocusRect)
{
- Rectangle aFocusRect = rFocusRect;
- Rectangle aOutputRect = Rectangle(Point(), GetOutputSizePixel());
+ tools::Rectangle aFocusRect = rFocusRect;
+ tools::Rectangle aOutputRect = tools::Rectangle(Point(), GetOutputSizePixel());
if (!aFocusRect.IsEmpty())
{
@@ -543,7 +543,7 @@ void Button::ImplSetFocusRect(const Rectangle &rFocusRect)
mpButtonData->maFocusRect = aFocusRect;
}
-const Rectangle& Button::ImplGetFocusRect() const
+const tools::Rectangle& Button::ImplGetFocusRect() const
{
return mpButtonData->maFocusRect;
}
@@ -726,7 +726,7 @@ void PushButton::ImplInitSettings( bool bFont,
}
void PushButton::ImplDrawPushButtonFrame(vcl::RenderContext& rRenderContext,
- Rectangle& rRect, DrawButtonFlags nStyle)
+ tools::Rectangle& rRect, DrawButtonFlags nStyle)
{
if (!(GetStyle() & (WB_RECTSTYLE | WB_SMALLSTYLE)))
{
@@ -759,7 +759,7 @@ bool PushButton::ImplHitTestPushButton( vcl::Window* pDev,
const Point& rPos )
{
Point aTempPoint;
- Rectangle aTestRect( aTempPoint, pDev->GetOutputSizePixel() );
+ tools::Rectangle aTestRect( aTempPoint, pDev->GetOutputSizePixel() );
return aTestRect.IsInside( rPos );
}
@@ -811,25 +811,25 @@ static void ImplDrawBtnDropDownArrow( OutputDevice* pDev,
pDev->SetFillColor( Color( COL_BLACK ) );
else
pDev->SetFillColor( rColor );
- pDev->DrawRect( Rectangle( nX+0, nY+0, nX+6, nY+0 ) );
- pDev->DrawRect( Rectangle( nX+1, nY+1, nX+5, nY+1 ) );
- pDev->DrawRect( Rectangle( nX+2, nY+2, nX+4, nY+2 ) );
- pDev->DrawRect( Rectangle( nX+3, nY+3, nX+3, nY+3 ) );
+ pDev->DrawRect( tools::Rectangle( nX+0, nY+0, nX+6, nY+0 ) );
+ pDev->DrawRect( tools::Rectangle( nX+1, nY+1, nX+5, nY+1 ) );
+ pDev->DrawRect( tools::Rectangle( nX+2, nY+2, nX+4, nY+2 ) );
+ pDev->DrawRect( tools::Rectangle( nX+3, nY+3, nX+3, nY+3 ) );
if ( bBlack )
{
pDev->SetFillColor( rColor );
- pDev->DrawRect( Rectangle( nX+2, nY+1, nX+4, nY+1 ) );
- pDev->DrawRect( Rectangle( nX+3, nY+2, nX+3, nY+2 ) );
+ pDev->DrawRect( tools::Rectangle( nX+2, nY+1, nX+4, nY+1 ) );
+ pDev->DrawRect( tools::Rectangle( nX+3, nY+2, nX+3, nY+2 ) );
}
pDev->SetLineColor( aOldLineColor );
pDev->SetFillColor( aOldFillColor );
}
void PushButton::ImplDrawPushButtonContent(OutputDevice* pDev, DrawFlags nDrawFlags,
- const Rectangle& rRect, bool bMenuBtnSep)
+ const tools::Rectangle& rRect, bool bMenuBtnSep)
{
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
- Rectangle aInRect = rRect;
+ tools::Rectangle aInRect = rRect;
Color aColor;
OUString aText = PushButton::GetText(); // PushButton:: because of MoreButton
DrawTextFlags nTextStyle = ImplGetTextStyle( nDrawFlags );
@@ -869,7 +869,7 @@ void PushButton::ImplDrawPushButtonContent(OutputDevice* pDev, DrawFlags nDrawFl
mnDDStyle == PushButtonDropdownStyle::SplitMenuButton )
{
long nSeparatorX = 0;
- Rectangle aSymbolRect = aInRect;
+ tools::Rectangle aSymbolRect = aInRect;
if ( !aText.isEmpty() && ! (ImplGetButtonState() & DrawButtonFlags::NoText) )
{
// calculate symbol size
@@ -903,7 +903,7 @@ void PushButton::ImplDrawPushButtonContent(OutputDevice* pDev, DrawFlags nDrawFl
}
else
{
- Rectangle aSymbolRect;
+ tools::Rectangle aSymbolRect;
ImplDrawAlignedImage( pDev, aPos, aSize, nImageSep, nDrawFlags,
nTextStyle, IsSymbol() ? &aSymbolRect : nullptr, true );
@@ -944,8 +944,8 @@ void PushButton::ImplDrawPushButton(vcl::RenderContext& rRenderContext)
DrawButtonFlags nButtonStyle = ImplGetButtonState();
Point aPoint;
Size aOutSz(GetOutputSizePixel());
- Rectangle aRect(aPoint, aOutSz);
- Rectangle aInRect = aRect;
+ tools::Rectangle aRect(aPoint, aOutSz);
+ tools::Rectangle aInRect = aRect;
bool bNativeOK = false;
// adjust style if button should be rendered 'pressed'
@@ -1042,7 +1042,7 @@ void PushButton::ImplDrawPushButton(vcl::RenderContext& rRenderContext)
if (bNativeOK)
{
PushButtonValue aControlValue;
- Rectangle aCtrlRegion(aInRect);
+ tools::Rectangle aCtrlRegion(aInRect);
ControlState nState = ControlState::NONE;
if (mbPressed || IsChecked() || mbIsActive)
@@ -1107,7 +1107,7 @@ void PushButton::ImplDrawPushButton(vcl::RenderContext& rRenderContext)
// draw PushButtonFrame, aInRect has content size afterwards
if (GetStyle() & WB_FLATBUTTON)
{
- Rectangle aTempRect(aInRect);
+ tools::Rectangle aTempRect(aInRect);
if (bRollOver)
ImplDrawPushButtonFrame(rRenderContext, aTempRect, nButtonStyle);
aInRect.Left() += 2;
@@ -1139,11 +1139,11 @@ void PushButton::ImplSetDefButton( bool bSet )
if ( IsNativeControlSupported(ControlType::Pushbutton, ControlPart::Entire) )
{
- Rectangle aBound, aCont;
- Rectangle aCtrlRect( 0, 0, 80, 20 ); // use a constant size to avoid accumulating
+ tools::Rectangle aBound, aCont;
+ tools::Rectangle aCtrlRect( 0, 0, 80, 20 ); // use a constant size to avoid accumulating
// will not work if the theme has dynamic adornment sizes
ImplControlValue aControlValue;
- Rectangle aCtrlRegion( aCtrlRect );
+ tools::Rectangle aCtrlRegion( aCtrlRect );
ControlState nState = ControlState::DEFAULT|ControlState::ENABLED;
// get native size of a 'default' button
@@ -1354,7 +1354,7 @@ void PushButton::FillLayoutData() const
const_cast<PushButton*>(this)->Invalidate();
}
-void PushButton::Paint(vcl::RenderContext& rRenderContext, const Rectangle&)
+void PushButton::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&)
{
ImplDrawPushButton(rRenderContext);
}
@@ -1364,7 +1364,7 @@ void PushButton::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize,
{
Point aPos = pDev->LogicToPixel( rPos );
Size aSize = pDev->LogicToPixel( rSize );
- Rectangle aRect( aPos, aSize );
+ tools::Rectangle aRect( aPos, aSize );
vcl::Font aFont = GetDrawPixelFont( pDev );
pDev->Push();
@@ -1527,7 +1527,7 @@ bool PushButton::PreNotify( NotifyEvent& rNEvt )
{
// only paint the button part to avoid flickering of the combobox text
Point aPt;
- Rectangle aClipRect( aPt, GetOutputSizePixel() );
+ tools::Rectangle aClipRect( aPt, GetOutputSizePixel() );
aClipRect.SetPos(pBorder->ScreenToOutputPixel(OutputToScreenPixel(aClipRect.TopLeft())));
pBorder->Invalidate( aClipRect );
}
@@ -1648,7 +1648,7 @@ Size PushButton::CalcMinimumSize() const
}
if ( !PushButton::GetText().isEmpty() && ! (ImplGetButtonState() & DrawButtonFlags::NoText) )
{
- Size textSize = GetTextRect( Rectangle( Point(), Size( 0x7fffffff, 0x7fffffff ) ),
+ Size textSize = GetTextRect( tools::Rectangle( Point(), Size( 0x7fffffff, 0x7fffffff ) ),
PushButton::GetText(), ImplGetTextStyle( DrawFlags::NONE ) ).GetSize();
aSize.Width() += textSize.Width();
aSize.Height() = std::max( aSize.Height(), long( textSize.Height() * 1.15 ) );
@@ -1684,12 +1684,12 @@ bool PushButton::set_property(const OString &rKey, const OString &rValue)
return true;
}
-void PushButton::ShowFocus(const Rectangle& rRect)
+void PushButton::ShowFocus(const tools::Rectangle& rRect)
{
if (IsNativeControlSupported(ControlType::Pushbutton, ControlPart::Focus))
{
ImplControlValue aControlValue;
- Rectangle aInRect(Point(), GetOutputSizePixel());
+ tools::Rectangle aInRect(Point(), GetOutputSizePixel());
GetOutDev()->DrawNativeControl(ControlType::Pushbutton, ControlPart::Focus, aInRect,
ControlState::FOCUSED, aControlValue, OUString());
}
@@ -1909,7 +1909,7 @@ void RadioButton::ImplDrawRadioButtonState(vcl::RenderContext& rRenderContext)
if (!maImage && rRenderContext.IsNativeControlSupported(ControlType::Radiobutton, ControlPart::Entire))
{
ImplControlValue aControlValue( mbChecked ? ButtonValue::On : ButtonValue::Off );
- Rectangle aCtrlRect(maStateRect.TopLeft(), maStateRect.GetSize());
+ tools::Rectangle aCtrlRect(maStateRect.TopLeft(), maStateRect.GetSize());
ControlState nState = ControlState::NONE;
if (ImplGetButtonState() & DrawButtonFlags::Pressed)
@@ -1949,7 +1949,7 @@ void RadioButton::ImplDrawRadioButtonState(vcl::RenderContext& rRenderContext)
DecorationView aDecoView(&rRenderContext);
const StyleSettings& rStyleSettings = rRenderContext.GetSettings().GetStyleSettings();
- Rectangle aImageRect = maStateRect;
+ tools::Rectangle aImageRect = maStateRect;
Size aImageSize = maImage.GetSizePixel();
bool bEnabled = IsEnabled();
DrawFrameStyle nButtonStyle = DrawFrameStyle::DoubleIn;
@@ -2015,14 +2015,14 @@ void RadioButton::ImplDrawRadioButtonState(vcl::RenderContext& rRenderContext)
void RadioButton::ImplDraw( OutputDevice* pDev, DrawFlags nDrawFlags,
const Point& rPos, const Size& rSize,
- const Size& rImageSize, Rectangle& rStateRect,
- Rectangle& rMouseRect )
+ const Size& rImageSize, tools::Rectangle& rStateRect,
+ tools::Rectangle& rMouseRect )
{
WinBits nWinStyle = GetStyle();
OUString aText( GetText() );
pDev->Push( PushFlags::CLIPREGION );
- pDev->IntersectClipRegion( Rectangle( rPos, rSize ) );
+ pDev->IntersectClipRegion( tools::Rectangle( rPos, rSize ) );
// no image radio button
if ( !maImage )
@@ -2050,7 +2050,7 @@ void RadioButton::ImplDraw( OutputDevice* pDev, DrawFlags nDrawFlags,
ImplDrawAlignedImage( pDev, aPos, aSize, 1, nDrawFlags, nTextStyle );
- rMouseRect = Rectangle( aPos, aSize );
+ rMouseRect = tools::Rectangle( aPos, aSize );
rMouseRect.Left() = rPos.X();
rStateRect.Left() = rPos.X();
@@ -2105,7 +2105,7 @@ void RadioButton::ImplDraw( OutputDevice* pDev, DrawFlags nDrawFlags,
{
bool bTopImage = (nWinStyle & WB_TOP) != 0;
Size aImageSize = maImage.GetSizePixel();
- Rectangle aImageRect( rPos, rSize );
+ tools::Rectangle aImageRect( rPos, rSize );
long nTextHeight = pDev->GetTextHeight();
long nTextWidth = pDev->GetCtrlTextWidth( aText );
@@ -2422,7 +2422,7 @@ void RadioButton::FillLayoutData() const
const_cast<RadioButton*>(this)->Invalidate();
}
-void RadioButton::Paint( vcl::RenderContext& rRenderContext, const Rectangle& )
+void RadioButton::Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& )
{
ImplDrawRadioButton(rRenderContext);
}
@@ -2439,8 +2439,8 @@ void RadioButton::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize
Size aBrd1Size = pDev->LogicToPixel( Size( 20, 20 ), aResMapMode );
Size aBrd2Size = pDev->LogicToPixel( Size( 60, 60 ), aResMapMode );
vcl::Font aFont = GetDrawPixelFont( pDev );
- Rectangle aStateRect;
- Rectangle aMouseRect;
+ tools::Rectangle aStateRect;
+ tools::Rectangle aMouseRect;
aImageSize.Width() = CalcZoom( aImageSize.Width() );
aImageSize.Height() = CalcZoom( aImageSize.Height() );
@@ -2722,9 +2722,9 @@ Size RadioButton::ImplGetRadioImageSize() const
if( IsNativeControlSupported( ControlType::Radiobutton, ControlPart::Entire ) )
{
ImplControlValue aControlValue;
- Rectangle aCtrlRegion( Point( 0, 0 ), GetSizePixel() );
+ tools::Rectangle aCtrlRegion( Point( 0, 0 ), GetSizePixel() );
ControlState nState = ControlState::DEFAULT|ControlState::ENABLED;
- Rectangle aBoundingRgn, aContentRgn;
+ tools::Rectangle aBoundingRgn, aContentRgn;
// get native size of a radio button
if( GetNativeControlRegion( ControlType::Radiobutton, ControlPart::Entire, aCtrlRegion,
@@ -2836,8 +2836,8 @@ void RadioButton::ImplSetMinimumNWFSize()
ImplControlValue aControlValue;
Size aCurSize( GetSizePixel() );
- Rectangle aCtrlRegion( Point( 0, 0 ), aCurSize );
- Rectangle aBoundingRgn, aContentRgn;
+ tools::Rectangle aCtrlRegion( Point( 0, 0 ), aCurSize );
+ tools::Rectangle aBoundingRgn, aContentRgn;
// get native size of a radiobutton
if( GetNativeControlRegion( ControlType::Radiobutton, ControlPart::Entire, aCtrlRegion,
@@ -2873,7 +2873,7 @@ Size RadioButton::CalcMinimumSize() const
{
bool bTopImage = (GetStyle() & WB_TOP) != 0;
- Size aTextSize = GetTextRect( Rectangle( Point(), Size( 0x7fffffff, 0x7fffffff ) ),
+ Size aTextSize = GetTextRect( tools::Rectangle( Point(), Size( 0x7fffffff, 0x7fffffff ) ),
aText, FixedText::ImplGetTextStyle( GetStyle() ) ).GetSize();
aSize.Width()+=2; // for focus rect
@@ -2902,12 +2902,12 @@ Size RadioButton::GetOptimalSize() const
return CalcMinimumSize();
}
-void RadioButton::ShowFocus(const Rectangle& rRect)
+void RadioButton::ShowFocus(const tools::Rectangle& rRect)
{
if (IsNativeControlSupported(ControlType::Radiobutton, ControlPart::Focus))
{
ImplControlValue aControlValue;
- Rectangle aInRect(Point(0, 0), GetSizePixel());
+ tools::Rectangle aInRect(Point(0, 0), GetSizePixel());
aInRect.Left() = rRect.Left(); // exclude the radio element itself from the focusrect
@@ -3001,7 +3001,7 @@ void CheckBox::ImplDrawCheckBoxState(vcl::RenderContext& rRenderContext)
if (bNativeOK)
{
ImplControlValue aControlValue(meState == TRISTATE_TRUE ? ButtonValue::On : ButtonValue::Off);
- Rectangle aCtrlRegion(maStateRect);
+ tools::Rectangle aCtrlRegion(maStateRect);
ControlState nState = ControlState::NONE;
if (HasFocus())
@@ -3044,14 +3044,14 @@ void CheckBox::ImplDrawCheckBoxState(vcl::RenderContext& rRenderContext)
void CheckBox::ImplDraw( OutputDevice* pDev, DrawFlags nDrawFlags,
const Point& rPos, const Size& rSize,
- const Size& rImageSize, Rectangle& rStateRect,
- Rectangle& rMouseRect )
+ const Size& rImageSize, tools::Rectangle& rStateRect,
+ tools::Rectangle& rMouseRect )
{
WinBits nWinStyle = GetStyle();
OUString aText( GetText() );
pDev->Push( PushFlags::CLIPREGION | PushFlags::LINECOLOR );
- pDev->IntersectClipRegion( Rectangle( rPos, rSize ) );
+ pDev->IntersectClipRegion( tools::Rectangle( rPos, rSize ) );
long nLineY = rPos.Y() + (rSize.Height()-1)/2;
if ( ( !aText.isEmpty() && ! (ImplGetButtonState() & DrawButtonFlags::NoText) ) ||
@@ -3078,7 +3078,7 @@ void CheckBox::ImplDraw( OutputDevice* pDev, DrawFlags nDrawFlags,
ImplDrawAlignedImage( pDev, aPos, aSize, 1, nDrawFlags, nTextStyle );
nLineY = aPos.Y() + aSize.Height()/2;
- rMouseRect = Rectangle( aPos, aSize );
+ rMouseRect = tools::Rectangle( aPos, aSize );
rMouseRect.Left() = rPos.X();
rStateRect.Left() = rPos.X();
rStateRect.Top() = rMouseRect.Top();
@@ -3292,7 +3292,7 @@ void CheckBox::FillLayoutData() const
const_cast<CheckBox*>(this)->Invalidate();
}
-void CheckBox::Paint(vcl::RenderContext& rRenderContext, const Rectangle&)
+void CheckBox::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&)
{
ImplDrawCheckBox(rRenderContext);
}
@@ -3308,8 +3308,8 @@ void CheckBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize,
Size aBrd2Size = pDev->LogicToPixel( Size( 30, 30 ), aResMapMode );
long nCheckWidth = pDev->LogicToPixel( Size( 20, 20 ), aResMapMode ).Width();
vcl::Font aFont = GetDrawPixelFont( pDev );
- Rectangle aStateRect;
- Rectangle aMouseRect;
+ tools::Rectangle aStateRect;
+ tools::Rectangle aMouseRect;
aImageSize.Width() = CalcZoom( aImageSize.Width() );
aImageSize.Height() = CalcZoom( aImageSize.Height() );
@@ -3587,9 +3587,9 @@ Size CheckBox::ImplGetCheckImageSize() const
if( IsNativeControlSupported( ControlType::Checkbox, ControlPart::Entire ) )
{
ImplControlValue aControlValue;
- Rectangle aCtrlRegion( Point( 0, 0 ), GetSizePixel() );
+ tools::Rectangle aCtrlRegion( Point( 0, 0 ), GetSizePixel() );
ControlState nState = ControlState::DEFAULT|ControlState::ENABLED;
- Rectangle aBoundingRgn, aContentRgn;
+ tools::Rectangle aBoundingRgn, aContentRgn;
// get native size of a check box
if( GetNativeControlRegion( ControlType::Checkbox, ControlPart::Entire, aCtrlRegion,
@@ -3682,8 +3682,8 @@ void CheckBox::ImplSetMinimumNWFSize()
ImplControlValue aControlValue;
Size aCurSize( GetSizePixel() );
- Rectangle aCtrlRegion( Point( 0, 0 ), aCurSize );
- Rectangle aBoundingRgn, aContentRgn;
+ tools::Rectangle aCtrlRegion( Point( 0, 0 ), aCurSize );
+ tools::Rectangle aBoundingRgn, aContentRgn;
// get native size of a radiobutton
if( GetNativeControlRegion( ControlType::Checkbox, ControlPart::Entire, aCtrlRegion,
@@ -3714,7 +3714,7 @@ Size CheckBox::CalcMinimumSize( long nMaxWidth ) const
nMaxWidth-=2;
nMaxWidth -= ImplGetImageToTextDistance();
- Size aTextSize = GetTextRect( Rectangle( Point(), Size( nMaxWidth > 0 ? nMaxWidth : 0x7fffffff, 0x7fffffff ) ),
+ Size aTextSize = GetTextRect( tools::Rectangle( Point(), Size( nMaxWidth > 0 ? nMaxWidth : 0x7fffffff, 0x7fffffff ) ),
aText, FixedText::ImplGetTextStyle( GetStyle() ) ).GetSize();
aSize.Width()+=2; // for focus rect
aSize.Width() += ImplGetImageToTextDistance();
@@ -3740,12 +3740,12 @@ Size CheckBox::GetOptimalSize() const
return CalcMinimumSize();
}
-void CheckBox::ShowFocus(const Rectangle& rRect)
+void CheckBox::ShowFocus(const tools::Rectangle& rRect)
{
if (IsNativeControlSupported(ControlType::Checkbox, ControlPart::Focus))
{
ImplControlValue aControlValue;
- Rectangle aInRect(Point(0, 0), GetSizePixel());
+ tools::Rectangle aInRect(Point(0, 0), GetSizePixel());
aInRect.Left() = rRect.Left(); // exclude the checkbox itself from the focusrect
@@ -3810,10 +3810,10 @@ void DisclosureButton::ImplDrawCheckBoxState(vcl::RenderContext& rRenderContext)
for ControlType::ListNode would have to be implemented and taken into account
*/
- Rectangle aStateRect(GetStateRect());
+ tools::Rectangle aStateRect(GetStateRect());
ImplControlValue aControlValue(GetState() == TRISTATE_TRUE ? ButtonValue::On : ButtonValue::Off);
- Rectangle aCtrlRegion(aStateRect);
+ tools::Rectangle aCtrlRegion(aStateRect);
ControlState nState = ControlState::NONE;
if (HasFocus())
diff --git a/vcl/source/control/combobox.cxx b/vcl/source/control/combobox.cxx
index 84d1edcf9e5c..01eac4eb3d07 100644
--- a/vcl/source/control/combobox.cxx
+++ b/vcl/source/control/combobox.cxx
@@ -151,8 +151,8 @@ void ComboBox::ImplCalcEditHeight()
if ( !IsDropDownBox() )
m_pImpl->m_nDDHeight += 4;
- Rectangle aCtrlRegion( Point( 0, 0 ), Size( 10, 10 ) );
- Rectangle aBoundRegion, aContentRegion;
+ tools::Rectangle aCtrlRegion( Point( 0, 0 ), Size( 10, 10 ) );
+ tools::Rectangle aBoundRegion, aContentRegion;
ImplControlValue aControlValue;
ControlType aType = IsDropDownBox() ? ControlType::Combobox : ControlType::Editbox;
if( GetNativeControlRegion( aType, ControlPart::Entire,
@@ -1005,10 +1005,10 @@ long ComboBox::getMaxWidthScrollBarAndDownButton() const
vcl::Window *pBorder = GetWindow( GetWindowType::Border );
ImplControlValue aControlValue;
Point aPoint;
- Rectangle aContent, aBound;
+ tools::Rectangle aContent, aBound;
// use the full extent of the control
- Rectangle aArea( aPoint, pBorder->GetOutputSizePixel() );
+ tools::Rectangle aArea( aPoint, pBorder->GetOutputSizePixel() );
if ( GetNativeControlRegion(ControlType::Combobox, ControlPart::ButtonDown,
aArea, ControlState::NONE, aControlValue, OUString(), aBound, aContent) )
@@ -1161,7 +1161,7 @@ void ComboBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, D
bool bBackground = !(nFlags & DrawFlags::NoBackground) && IsControlBackground();
if ( bBorder || bBackground )
{
- Rectangle aRect( aPos, aSize );
+ tools::Rectangle aRect( aPos, aSize );
// aRect.Top() += nEditHeight;
if ( bBorder )
{
@@ -1210,14 +1210,14 @@ void ComboBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, D
}
}
- Rectangle aClip( aPos, aSize );
+ tools::Rectangle aClip( aPos, aSize );
pDev->IntersectClipRegion( aClip );
sal_Int32 nLines = static_cast<sal_Int32>( nTextHeight > 0 ? (aSize.Height()-nEditHeight)/nTextHeight : 1 );
if ( !nLines )
nLines = 1;
const sal_Int32 nTEntry = IsReallyVisible() ? m_pImpl->m_pImplLB->GetTopEntry() : 0;
- Rectangle aTextRect( aPos, aSize );
+ tools::Rectangle aTextRect( aPos, aSize );
aTextRect.Left() += 3*nOnePixel;
aTextRect.Right() -= 3*nOnePixel;
@@ -1323,11 +1323,11 @@ void ComboBox::SetProminentEntryType( ProminentEntry eType )
m_pImpl->m_pImplLB->SetProminentEntryType( eType );
}
-Rectangle ComboBox::GetDropDownPosSizePixel() const
+tools::Rectangle ComboBox::GetDropDownPosSizePixel() const
{
return m_pImpl->m_pFloatWin
? m_pImpl->m_pFloatWin->GetWindowExtentsRelative(const_cast<ComboBox*>(this))
- : Rectangle();
+ : tools::Rectangle();
}
const Wallpaper& ComboBox::GetDisplayBackground() const
@@ -1380,10 +1380,10 @@ void ComboBox::SetNoSelection()
m_pImpl->m_pSubEdit->SetText( OUString() );
}
-Rectangle ComboBox::GetBoundingRectangle( sal_Int32 nItem ) const
+tools::Rectangle ComboBox::GetBoundingRectangle( sal_Int32 nItem ) const
{
- Rectangle aRect = m_pImpl->m_pImplLB->GetMainWindow()->GetBoundingRectangle( nItem );
- Rectangle aOffset = m_pImpl->m_pImplLB->GetMainWindow()->GetWindowExtentsRelative( static_cast<vcl::Window*>(const_cast<ComboBox *>(this)) );
+ tools::Rectangle aRect = m_pImpl->m_pImplLB->GetMainWindow()->GetBoundingRectangle( nItem );
+ tools::Rectangle aOffset = m_pImpl->m_pImplLB->GetMainWindow()->GetWindowExtentsRelative( static_cast<vcl::Window*>(const_cast<ComboBox *>(this)) );
aRect.Move( aOffset.TopLeft().X(), aOffset.TopLeft().Y() );
return aRect;
}
@@ -1443,10 +1443,10 @@ ComboBoxBounds ComboBox::Impl::calcComboBoxDropDownComponentBounds(
vcl::Window *pBorder = m_rThis.GetWindow( GetWindowType::Border );
ImplControlValue aControlValue;
Point aPoint;
- Rectangle aContent, aBound;
+ tools::Rectangle aContent, aBound;
// use the full extent of the control
- Rectangle aArea( aPoint, rBorderOutSz );
+ tools::Rectangle aArea( aPoint, rBorderOutSz );
if (m_rThis.GetNativeControlRegion(ControlType::Combobox, ControlPart::ButtonDown,
aArea, ControlState::NONE, aControlValue, OUString(), aBound, aContent) )
diff --git a/vcl/source/control/ctrl.cxx b/vcl/source/control/ctrl.cxx
index aadff32a5953..229051b58ae6 100644
--- a/vcl/source/control/ctrl.cxx
+++ b/vcl/source/control/ctrl.cxx
@@ -106,16 +106,16 @@ ControlLayoutData::ControlLayoutData() : m_pParent( nullptr )
{
}
-Rectangle ControlLayoutData::GetCharacterBounds( long nIndex ) const
+tools::Rectangle ControlLayoutData::GetCharacterBounds( long nIndex ) const
{
- return (nIndex >= 0 && nIndex < (long) m_aUnicodeBoundRects.size()) ? m_aUnicodeBoundRects[ nIndex ] : Rectangle();
+ return (nIndex >= 0 && nIndex < (long) m_aUnicodeBoundRects.size()) ? m_aUnicodeBoundRects[ nIndex ] : tools::Rectangle();
}
-Rectangle Control::GetCharacterBounds( long nIndex ) const
+tools::Rectangle Control::GetCharacterBounds( long nIndex ) const
{
if( !HasLayoutData() )
FillLayoutData();
- return mpControlData->mpLayoutData ? mpControlData->mpLayoutData->GetCharacterBounds( nIndex ) : Rectangle();
+ return mpControlData->mpLayoutData ? mpControlData->mpLayoutData->GetCharacterBounds( nIndex ) : tools::Rectangle();
}
long ControlLayoutData::GetIndexForPoint( const Point& rPoint ) const
@@ -289,10 +289,10 @@ void Control::AppendLayoutData( const Control& rSubControl ) const
for( n = 1; n < nLines; n++ )
mpControlData->mpLayoutData->m_aLineIndices.push_back( rSubControl.mpControlData->mpLayoutData->m_aLineIndices[n] + nCurrentIndex );
int nRectangles = rSubControl.mpControlData->mpLayoutData->m_aUnicodeBoundRects.size();
- Rectangle aRel = const_cast<Control&>(rSubControl).GetWindowExtentsRelative( const_cast<Control*>(this) );
+ tools::Rectangle aRel = const_cast<Control&>(rSubControl).GetWindowExtentsRelative( const_cast<Control*>(this) );
for( n = 0; n < nRectangles; n++ )
{
- Rectangle aRect = rSubControl.mpControlData->mpLayoutData->m_aUnicodeBoundRects[n];
+ tools::Rectangle aRect = rSubControl.mpControlData->mpLayoutData->m_aUnicodeBoundRects[n];
aRect.Move( aRel.Left(), aRel.Top() );
mpControlData->mpLayoutData->m_aUnicodeBoundRects.push_back( aRect );
}
@@ -329,7 +329,7 @@ void Control::ImplClearLayoutData() const
mpControlData->mpLayoutData.reset();
}
-void Control::ImplDrawFrame( OutputDevice* pDev, Rectangle& rRect )
+void Control::ImplDrawFrame( OutputDevice* pDev, tools::Rectangle& rRect )
{
// use a deco view to draw the frame
// However, since there happens a lot of magic there, we need to fake some (style) settings
@@ -413,7 +413,7 @@ void Control::ImplInitSettings(const bool, const bool)
ApplySettings(*this);
}
-Rectangle Control::DrawControlText( OutputDevice& _rTargetDevice, const Rectangle& rRect, const OUString& _rStr,
+tools::Rectangle Control::DrawControlText( OutputDevice& _rTargetDevice, const tools::Rectangle& rRect, const OUString& _rStr,
DrawTextFlags _nStyle, MetricVector* _pVector, OUString* _pDisplayText, const Size* i_pDeviceSize ) const
{
OUString rPStr = _rStr;
@@ -430,7 +430,7 @@ Rectangle Control::DrawControlText( OutputDevice& _rTargetDevice, const Rectangl
if ( !mpControlData->mpReferenceDevice || ( mpControlData->mpReferenceDevice == &_rTargetDevice ) )
{
- const Rectangle aRet = _rTargetDevice.GetTextRect(rRect, rPStr, nPStyle);
+ const tools::Rectangle aRet = _rTargetDevice.GetTextRect(rRect, rPStr, nPStyle);
_rTargetDevice.DrawText(aRet, rPStr, nPStyle, _pVector, _pDisplayText);
return aRet;
}
@@ -439,7 +439,7 @@ Rectangle Control::DrawControlText( OutputDevice& _rTargetDevice, const Rectangl
return aRenderer.DrawText(rRect, rPStr, nPStyle, _pVector, _pDisplayText, i_pDeviceSize);
}
-Rectangle Control::GetControlTextRect( OutputDevice& _rTargetDevice, const Rectangle & rRect,
+tools::Rectangle Control::GetControlTextRect( OutputDevice& _rTargetDevice, const tools::Rectangle & rRect,
const OUString& _rStr, DrawTextFlags _nStyle, Size* o_pDeviceSize ) const
{
OUString rPStr = _rStr;
@@ -456,7 +456,7 @@ Rectangle Control::GetControlTextRect( OutputDevice& _rTargetDevice, const Recta
if ( !mpControlData->mpReferenceDevice || ( mpControlData->mpReferenceDevice == &_rTargetDevice ) )
{
- Rectangle aRet = _rTargetDevice.GetTextRect( rRect, rPStr, nPStyle );
+ tools::Rectangle aRet = _rTargetDevice.GetTextRect( rRect, rPStr, nPStyle );
if (o_pDeviceSize)
{
*o_pDeviceSize = aRet.GetSize();
diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx
index 95dc4d916c10..fa559c150117 100644
--- a/vcl/source/control/edit.cxx
+++ b/vcl/source/control/edit.cxx
@@ -473,7 +473,7 @@ long Edit::ImplGetTextYPosition() const
return ( GetOutputSizePixel().Height() - GetTextHeight() ) / 2;
}
-void Edit::ImplRepaint(vcl::RenderContext& rRenderContext, const Rectangle& rRectangle)
+void Edit::ImplRepaint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRectangle)
{
if (!IsReallyVisible())
return;
@@ -522,7 +522,7 @@ void Edit::ImplRepaint(vcl::RenderContext& rRenderContext, const Rectangle& rRec
rRenderContext.Push(PushFlags::FILLCOLOR | PushFlags::LINECOLOR);
rRenderContext.SetLineColor();
rRenderContext.SetFillColor(GetControlBackground());
- rRenderContext.DrawRect(Rectangle(aPos, Size(GetOutputSizePixel().Width() - 2 * mnXOffset, GetOutputSizePixel().Height())));
+ rRenderContext.DrawRect(tools::Rectangle(aPos, Size(GetOutputSizePixel().Width() - 2 * mnXOffset, GetOutputSizePixel().Height())));
rRenderContext.Pop();
rRenderContext.SetTextFillColor(GetControlBackground());
@@ -557,7 +557,7 @@ void Edit::ImplRepaint(vcl::RenderContext& rRenderContext, const Rectangle& rRec
// selection is highlighted
for(sal_Int32 i = 0; i < nLen; ++i)
{
- Rectangle aRect(aPos, Size(10, nTH));
+ tools::Rectangle aRect(aPos, Size(10, nTH));
aRect.Left() = pDX[2 * i] + mnXOffset + ImplGetExtraXOffset();
aRect.Right() = pDX[2 * i + 1] + mnXOffset + ImplGetExtraXOffset();
aRect.Justify();
@@ -635,7 +635,7 @@ void Edit::ImplRepaint(vcl::RenderContext& rRenderContext, const Rectangle& rRec
int nIndex = i;
while (nIndex < mpIMEInfos->nLen && mpIMEInfos->pAttribs[nIndex] == nAttr) // #112631# check nIndex before using it
{
- Rectangle aRect( aPos, Size( 10, nTH ) );
+ tools::Rectangle aRect( aPos, Size( 10, nTH ) );
aRect.Left() = pDX[2 * (nIndex + mpIMEInfos->nPos)] + mnXOffset + ImplGetExtraXOffset();
aRect.Right() = pDX[2 * (nIndex + mpIMEInfos->nPos) + 1] + mnXOffset + ImplGetExtraXOffset();
aRect.Justify();
@@ -983,13 +983,13 @@ ControlType Edit::ImplGetNativeControlType() const
return nCtrl;
}
-void Edit::ImplClearBackground(vcl::RenderContext& rRenderContext, const Rectangle& rRectangle, long nXStart, long nXEnd )
+void Edit::ImplClearBackground(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRectangle, long nXStart, long nXEnd )
{
/*
* note: at this point the cursor must be switched off already
*/
Point aTmpPoint;
- Rectangle aRect(aTmpPoint, GetOutputSizePixel());
+ tools::Rectangle aRect(aTmpPoint, GetOutputSizePixel());
aRect.Left() = nXStart;
aRect.Right() = nXEnd;
@@ -1011,7 +1011,7 @@ void Edit::ImplPaintBorder(vcl::RenderContext& rRenderContext, long nXStart, lon
return;
Point aTmpPoint;
- Rectangle aRect(aTmpPoint, GetOutputSizePixel());
+ tools::Rectangle aRect(aTmpPoint, GetOutputSizePixel());
aRect.Left() = nXStart;
aRect.Right() = nXEnd;
@@ -1040,7 +1040,7 @@ void Edit::ImplPaintBorder(vcl::RenderContext& rRenderContext, long nXStart, lon
// need to mirror in case border is not RTL but edit is (or vice versa)
// mirror
- Rectangle aBounds(aClipRgn.GetBoundRect());
+ tools::Rectangle aBounds(aClipRgn.GetBoundRect());
int xNew = GetOutputSizePixel().Width() - aBounds.GetWidth() - aBounds.Left();
aClipRgn.Move(xNew - aBounds.Left(), 0);
@@ -1060,13 +1060,13 @@ void Edit::ImplPaintBorder(vcl::RenderContext& rRenderContext, long nXStart, lon
vcl::Region oldRgn(pBorder->GetClipRegion());
pBorder->SetClipRegion(aClipRgn);
- pBorder->Paint(*pBorder, Rectangle());
+ pBorder->Paint(*pBorder, tools::Rectangle());
pBorder->SetClipRegion(oldRgn);
}
else
{
- pBorder->Paint(*pBorder, Rectangle());
+ pBorder->Paint(*pBorder, tools::Rectangle());
}
}
}
@@ -1719,7 +1719,7 @@ void Edit::FillLayoutData() const
const_cast<Edit*>(this)->Invalidate();
}
-void Edit::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRectangle)
+void Edit::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRectangle)
{
if (!mpSubEdit)
ImplRepaint(rRenderContext, rRectangle);
@@ -1759,7 +1759,7 @@ void Edit::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, DrawF
bool bBackground = !(nFlags & DrawFlags::NoBackground) && IsControlBackground();
if ( bBorder || bBackground )
{
- Rectangle aRect( aPos, aSize );
+ tools::Rectangle aRect( aPos, aSize );
if ( bBorder )
{
ImplDrawFrame( pDev, aRect );
@@ -1790,7 +1790,7 @@ void Edit::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, DrawF
const long nOnePixel = GetDrawPixel( pDev, 1 );
const long nOffX = 3*nOnePixel;
DrawTextFlags nTextStyle = DrawTextFlags::VCenter;
- Rectangle aTextRect( aPos, aSize );
+ tools::Rectangle aTextRect( aPos, aSize );
if ( GetStyle() & WB_CENTER )
nTextStyle |= DrawTextFlags::Center;
@@ -1812,7 +1812,7 @@ void Edit::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, DrawF
((nOffY+nTextHeight) > aSize.Height()) ||
((nOffX+nTextWidth) > aSize.Width()) )
{
- Rectangle aClip( aPos, aSize );
+ tools::Rectangle aClip( aPos, aSize );
if ( nTextHeight > aSize.Height() )
aClip.Bottom() += nTextHeight-aSize.Height()+1; // prevent HP printers from 'optimizing'
pDev->IntersectClipRegion( aClip );
@@ -2146,10 +2146,10 @@ void Edit::Command( const CommandEvent& rCEvt )
long nTH = GetTextHeight();
Point aPos( mnXOffset, ImplGetTextYPosition() );
- std::unique_ptr<Rectangle[]> aRects(new Rectangle[ mpIMEInfos->nLen ]);
+ std::unique_ptr<tools::Rectangle[]> aRects(new tools::Rectangle[ mpIMEInfos->nLen ]);
for ( int nIndex = 0; nIndex < mpIMEInfos->nLen; ++nIndex )
{
- Rectangle aRect( aPos, Size( 10, nTH ) );
+ tools::Rectangle aRect( aPos, Size( 10, nTH ) );
aRect.Left() = pDX[2*(nIndex+mpIMEInfos->nPos)] + mnXOffset + ImplGetExtraXOffset();
aRects[ nIndex ] = aRect;
}
@@ -2282,7 +2282,7 @@ void Edit::ImplShowDDCursor()
{
long nTextWidth = GetTextWidth( maText.toString(), 0, mpDDInfo->nDropPos );
long nTextHeight = GetTextHeight();
- Rectangle aCursorRect( Point( nTextWidth + mnXOffset, (GetOutputSize().Height()-nTextHeight)/2 ), Size( 2, nTextHeight ) );
+ tools::Rectangle aCursorRect( Point( nTextWidth + mnXOffset, (GetOutputSize().Height()-nTextHeight)/2 ), Size( 2, nTextHeight ) );
mpDDInfo->aCursor.SetWindow( this );
mpDDInfo->aCursor.SetPos( aCursorRect.TopLeft() );
mpDDInfo->aCursor.SetSize( aCursorRect.GetSize() );
@@ -2725,8 +2725,8 @@ Size Edit::CalcMinimumSizeForText(const OUString &rString) const
// ask NWF what if it has an opinion, too
ImplControlValue aControlValue;
- Rectangle aRect( Point( 0, 0 ), aSize );
- Rectangle aContent, aBound;
+ tools::Rectangle aRect( Point( 0, 0 ), aSize );
+ tools::Rectangle aContent, aBound;
if (GetNativeControlRegion(eCtrlType, ControlPart::Entire, aRect, ControlState::NONE,
aControlValue, OUString(), aBound, aContent))
{
diff --git a/vcl/source/control/fixed.cxx b/vcl/source/control/fixed.cxx
index da3202945acf..42b6cc1ef1ab 100644
--- a/vcl/source/control/fixed.cxx
+++ b/vcl/source/control/fixed.cxx
@@ -182,7 +182,7 @@ void FixedText::ImplDraw(OutputDevice* pDev, DrawFlags nDrawFlags,
if( bFillLayout )
(mpControlData->mpLayoutData->m_aDisplayText).clear();
- const Rectangle aRect(aPos, rSize);
+ const tools::Rectangle aRect(aPos, rSize);
DrawControlText(*pDev, aRect, aText, nTextStyle,
bFillLayout ? &mpControlData->mpLayoutData->m_aUnicodeBoundRects : nullptr,
bFillLayout ? &mpControlData->mpLayoutData->m_aDisplayText : nullptr);
@@ -213,7 +213,7 @@ void FixedText::ApplySettings(vcl::RenderContext& rRenderContext)
}
}
-void FixedText::Paint( vcl::RenderContext& rRenderContext, const Rectangle& )
+void FixedText::Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& )
{
ImplDraw(&rRenderContext, DrawFlags::NONE, Point(), GetOutputSizePixel());
}
@@ -240,7 +240,7 @@ void FixedText::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize,
bool bBackground = !(nFlags & DrawFlags::NoBackground) && IsControlBackground();
if ( bBorder || bBackground )
{
- Rectangle aRect( aPos, aSize );
+ tools::Rectangle aRect( aPos, aSize );
if ( bBorder )
{
ImplDrawFrame( pDev, aRect );
@@ -321,7 +321,7 @@ Size FixedText::getTextDimensions(Control const *pControl, const OUString &rTxt,
if ( !( pControl->GetStyle() & WB_NOLABEL ) )
nStyle |= DrawTextFlags::Mnemonic;
- return pControl->GetTextRect(Rectangle( Point(), Size(nMaxWidth, 0x7fffffff)),
+ return pControl->GetTextRect(tools::Rectangle( Point(), Size(nMaxWidth, 0x7fffffff)),
rTxt, nStyle).GetSize();
}
@@ -545,7 +545,7 @@ void FixedLine::ImplDraw(vcl::RenderContext& rRenderContext)
else
{
DrawTextFlags nStyle = DrawTextFlags::Mnemonic | DrawTextFlags::Left | DrawTextFlags::VCenter | DrawTextFlags::EndEllipsis;
- Rectangle aRect(0, 0, aOutSize.Width(), aOutSize.Height());
+ tools::Rectangle aRect(0, 0, aOutSize.Width(), aOutSize.Height());
const StyleSettings& rStyleSettings = rRenderContext.GetSettings().GetStyleSettings();
if (nWinStyle & WB_CENTER)
nStyle |= DrawTextFlags::Center;
@@ -604,7 +604,7 @@ void FixedLine::ApplySettings(vcl::RenderContext& rRenderContext)
}
}
-void FixedLine::Paint(vcl::RenderContext& rRenderContext, const Rectangle&)
+void FixedLine::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&)
{
ImplDraw(rRenderContext);
}
@@ -736,7 +736,7 @@ void FixedBitmap::ApplySettings(vcl::RenderContext& rRenderContext)
}
}
-void FixedBitmap::Paint(vcl::RenderContext& rRenderContext, const Rectangle&)
+void FixedBitmap::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&)
{
ImplDraw(&rRenderContext, DrawFlags::NONE, Point(), GetOutputSizePixel());
}
@@ -746,7 +746,7 @@ void FixedBitmap::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize
{
Point aPos = pDev->LogicToPixel( rPos );
Size aSize = pDev->LogicToPixel( rSize );
- Rectangle aRect( aPos, aSize );
+ tools::Rectangle aRect( aPos, aSize );
pDev->Push();
pDev->SetMapMode();
@@ -881,7 +881,7 @@ void FixedImage::ApplySettings(vcl::RenderContext& rRenderContext)
}
-void FixedImage::Paint(vcl::RenderContext& rRenderContext, const Rectangle&)
+void FixedImage::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&)
{
ImplDraw(&rRenderContext, DrawFlags::NONE, Point(), GetOutputSizePixel());
}
@@ -896,7 +896,7 @@ void FixedImage::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize,
{
Point aPos = pDev->LogicToPixel( rPos );
Size aSize = pDev->LogicToPixel( rSize );
- Rectangle aRect( aPos, aSize );
+ tools::Rectangle aRect( aPos, aSize );
pDev->Push();
pDev->SetMapMode();
diff --git a/vcl/source/control/fixedhyper.cxx b/vcl/source/control/fixedhyper.cxx
index 6843485e14f1..052973d92ef4 100644
--- a/vcl/source/control/fixedhyper.cxx
+++ b/vcl/source/control/fixedhyper.cxx
@@ -102,14 +102,14 @@ void FixedHyperlink::RequestHelp( const HelpEvent& rHEvt )
void FixedHyperlink::GetFocus()
{
SetTextColor( Color( COL_LIGHTRED ) );
- Invalidate(Rectangle(Point(), GetSizePixel()));
- ShowFocus( Rectangle( Point( 1, 1 ), Size( m_nTextLen + 4, GetSizePixel().Height() - 2 ) ) );
+ Invalidate(tools::Rectangle(Point(), GetSizePixel()));
+ ShowFocus( tools::Rectangle( Point( 1, 1 ), Size( m_nTextLen + 4, GetSizePixel().Height() - 2 ) ) );
}
void FixedHyperlink::LoseFocus()
{
SetTextColor( GetControlForeground() );
- Invalidate(Rectangle(Point(), GetSizePixel()));
+ Invalidate(tools::Rectangle(Point(), GetSizePixel()));
HideFocus();
}
diff --git a/vcl/source/control/group.cxx b/vcl/source/control/group.cxx
index 48d3ffdbdfc6..9d8070cc9b01 100644
--- a/vcl/source/control/group.cxx
+++ b/vcl/source/control/group.cxx
@@ -99,7 +99,7 @@ void GroupBox::ImplDraw( OutputDevice* pDev, DrawFlags nDrawFlags,
long nTextOff;
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
OUString aText( GetText() );
- Rectangle aRect( rPos, rSize );
+ tools::Rectangle aRect( rPos, rSize );
DrawTextFlags nTextStyle = DrawTextFlags::Left | DrawTextFlags::Top | DrawTextFlags::EndEllipsis | DrawTextFlags::Mnemonic;
if ( GetStyle() & WB_NOLABEL )
@@ -188,7 +188,7 @@ void GroupBox::FillLayoutData() const
const_cast<GroupBox*>(this)->ImplDraw( const_cast<GroupBox*>(this), DrawFlags::NONE, Point(), GetOutputSizePixel(), true );
}
-void GroupBox::Paint( vcl::RenderContext& rRenderContext, const Rectangle& )
+void GroupBox::Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& )
{
ImplDraw(&rRenderContext, DrawFlags::NONE, Point(), GetOutputSizePixel());
}
diff --git a/vcl/source/control/imgctrl.cxx b/vcl/source/control/imgctrl.cxx
index 625706f13a4a..f3d1942eabd6 100644
--- a/vcl/source/control/imgctrl.cxx
+++ b/vcl/source/control/imgctrl.cxx
@@ -47,7 +47,7 @@ void ImageControl::Resize()
namespace
{
- Size lcl_calcPaintSize( const Rectangle& _rPaintRect, const Size& _rBitmapSize )
+ Size lcl_calcPaintSize( const tools::Rectangle& _rPaintRect, const Size& _rBitmapSize )
{
const Size aPaintSize = _rPaintRect.GetSize();
@@ -58,7 +58,7 @@ namespace
return Size( long( _rBitmapSize.Width() * nRatioMin ), long( _rBitmapSize.Height() * nRatioMin ) );
}
- Point lcl_centerWithin( const Rectangle& _rArea, const Size& _rObjectSize )
+ Point lcl_centerWithin( const tools::Rectangle& _rArea, const Size& _rObjectSize )
{
Point aPos( _rArea.TopLeft() );
aPos.X() += ( _rArea.GetWidth() - _rObjectSize.Width() ) / 2;
@@ -77,7 +77,7 @@ void ImageControl::ImplDraw(OutputDevice& rDev, DrawFlags nDrawFlags, const Poin
}
const Image& rImage( GetModeImage() );
- const Rectangle aDrawRect( rPos, rSize );
+ const tools::Rectangle aDrawRect( rPos, rSize );
if (!rImage)
{
OUString sText( GetText() );
@@ -127,7 +127,7 @@ void ImageControl::ImplDraw(OutputDevice& rDev, DrawFlags nDrawFlags, const Poin
} // switch ( mnScaleMode )
}
-void ImageControl::Paint(vcl::RenderContext& rRenderContext, const Rectangle& /*rRect*/)
+void ImageControl::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& /*rRect*/)
{
ImplDraw(rRenderContext, DrawFlags::NONE, Point(), GetOutputSizePixel());
@@ -136,7 +136,7 @@ void ImageControl::Paint(vcl::RenderContext& rRenderContext, const Rectangle& /*
vcl::Window* pBorderWindow = GetWindow(GetWindowType::Border);
bool bFlat = (GetBorderStyle() == WindowBorderStyle::MONO);
- Rectangle aRect(Point(0,0), pBorderWindow->GetOutputSizePixel());
+ tools::Rectangle aRect(Point(0,0), pBorderWindow->GetOutputSizePixel());
Color oldLineCol = pBorderWindow->GetLineColor();
Color oldFillCol = pBorderWindow->GetFillColor();
pBorderWindow->SetFillColor();
@@ -157,7 +157,7 @@ void ImageControl::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSiz
{
const Point aPos = pDev->LogicToPixel( rPos );
const Size aSize = pDev->LogicToPixel( rSize );
- Rectangle aRect( aPos, aSize );
+ tools::Rectangle aRect( aPos, aSize );
pDev->Push();
pDev->SetMapMode();
diff --git a/vcl/source/control/imp_listbox.cxx b/vcl/source/control/imp_listbox.cxx
index c824c628b896..96baf7ac1a4f 100644
--- a/vcl/source/control/imp_listbox.cxx
+++ b/vcl/source/control/imp_listbox.cxx
@@ -628,7 +628,7 @@ void ImplListBoxWindow::ImplUpdateEntryMetrics( ImplEntryType& rEntry )
// set the current size to a large number
// GetTextRect should shrink it to the actual size
aCurSize.Height() = 0x7fffff;
- Rectangle aTextRect( Point( 0, 0 ), aCurSize );
+ tools::Rectangle aTextRect( Point( 0, 0 ), aCurSize );
aTextRect = GetTextRect( aTextRect, rEntry.maStr, DrawTextFlags::WordBreak | DrawTextFlags::MultiLine );
aMetrics.nTextWidth = aTextRect.GetWidth();
if( aMetrics.nTextWidth > mnMaxTxtWidth )
@@ -895,7 +895,7 @@ void ImplListBoxWindow::MouseMove( const MouseEvent& rMEvt )
else if ( ( ( !mbMulti && IsMouseMoveSelect() ) || mbStackMode ) && mpEntryList->GetEntryCount() )
{
Point aPoint;
- Rectangle aRect( aPoint, GetOutputSizePixel() );
+ tools::Rectangle aRect( aPoint, GetOutputSizePixel() );
if( aRect.IsInside( rMEvt.GetPosPixel() ) )
{
if ( IsMouseMoveSelect() )
@@ -1166,7 +1166,7 @@ bool ImplListBoxWindow::SelectEntries( sal_Int32 nSelect, LB_EVENT_TYPE eLET, bo
void ImplListBoxWindow::Tracking( const TrackingEvent& rTEvt )
{
Point aPoint;
- Rectangle aRect( aPoint, GetOutputSizePixel() );
+ tools::Rectangle aRect( aPoint, GetOutputSizePixel() );
bool bInside = aRect.IsInside( rTEvt.GetMouseEvent().GetPosPixel() );
if( rTEvt.IsTrackingCanceled() || rTEvt.IsTrackingEnded() ) // MouseButtonUp
@@ -1700,7 +1700,7 @@ void ImplListBoxWindow::ImplPaint(vcl::RenderContext& rRenderContext, sal_Int32
long nWidth = GetOutputSizePixel().Width();
long nY = mpEntryList->GetAddedHeight(nPos, mnTop);
- Rectangle aRect(Point(0, nY), Size(nWidth, pEntry->mnHeight));
+ tools::Rectangle aRect(Point(0, nY), Size(nWidth, pEntry->mnHeight));
if (mpEntryList->IsEntryPosSelected(nPos))
{
@@ -1806,7 +1806,7 @@ void ImplListBoxWindow::DrawEntry(vcl::RenderContext& rRenderContext, sal_Int32
if ((pEntry->mnFlags & ListBoxEntryFlags::MultiLine))
nMaxWidth = GetOutputSizePixel().Width() - 2 * mnBorder;
- Rectangle aTextRect(Point(mnBorder - mnLeft, nY),
+ tools::Rectangle aTextRect(Point(mnBorder - mnLeft, nY),
Size(nMaxWidth, pEntry->mnHeight));
if (!bDrawTextAtImagePos && (mpEntryList->HasEntryImage(nPos) || IsUserDrawEnabled()))
@@ -1852,10 +1852,10 @@ void ImplListBoxWindow::DrawEntry(vcl::RenderContext& rRenderContext, sal_Int32
void ImplListBoxWindow::FillLayoutData() const
{
mpControlData->mpLayoutData.reset( new vcl::ControlLayoutData );
- const_cast<ImplListBoxWindow*>(this)->Invalidate(Rectangle(Point(0, 0), GetOutputSize()));
+ const_cast<ImplListBoxWindow*>(this)->Invalidate(tools::Rectangle(Point(0, 0), GetOutputSize()));
}
-void ImplListBoxWindow::ImplDoPaint(vcl::RenderContext& rRenderContext, const Rectangle& rRect)
+void ImplListBoxWindow::ImplDoPaint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect)
{
sal_Int32 nCount = mpEntryList->GetEntryCount();
@@ -1885,7 +1885,7 @@ void ImplListBoxWindow::ImplDoPaint(vcl::RenderContext& rRenderContext, const Re
ImplShowFocusRect();
}
-void ImplListBoxWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect)
+void ImplListBoxWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect)
{
ImplDoPaint(rRenderContext, rRect);
}
@@ -2030,12 +2030,12 @@ Size ImplListBoxWindow::CalcSize(sal_Int32 nMaxLines) const
return aSz;
}
-Rectangle ImplListBoxWindow::GetBoundingRectangle( sal_Int32 nItem ) const
+tools::Rectangle ImplListBoxWindow::GetBoundingRectangle( sal_Int32 nItem ) const
{
const ImplEntryType* pEntry = mpEntryList->GetEntryPtr( nItem );
Size aSz( GetSizePixel().Width(), pEntry ? pEntry->mnHeight : GetEntryHeight() );
long nY = mpEntryList->GetAddedHeight( nItem, GetTopEntry() ) + GetEntryList()->GetMRUCount()*GetEntryHeight();
- Rectangle aRect( Point( 0, nY ), aSz );
+ tools::Rectangle aRect( Point( 0, nY ), aSz );
return aRect;
}
@@ -2644,7 +2644,7 @@ void ImplWin::ImplDraw(vcl::RenderContext& rRenderContext, bool bLayout)
sal_Int32 nLeft, nTop, nRight, nBottom;
pWin->GetBorder( nLeft, nTop, nRight, nBottom );
Point aPoint( -nLeft, -nTop );
- Rectangle aCtrlRegion( aPoint - GetPosPixel(), pWin->GetSizePixel() );
+ tools::Rectangle aCtrlRegion( aPoint - GetPosPixel(), pWin->GetSizePixel() );
bool bMouseOver = false;
vcl::Window *pChild = pWin->GetWindow( GetWindowType::FirstChild );
@@ -2658,7 +2658,7 @@ void ImplWin::ImplDraw(vcl::RenderContext& rRenderContext, bool bLayout)
WinBits nParentStyle = pWin->GetStyle();
if( ! (nParentStyle & WB_BORDER) || (nParentStyle & WB_NOBORDER) )
{
- Rectangle aParentRect( Point( 0, 0 ), pWin->GetSizePixel() );
+ tools::Rectangle aParentRect( Point( 0, 0 ), pWin->GetSizePixel() );
pWin->DrawNativeControl( ControlType::Listbox, ControlPart::Entire, aParentRect,
nState, aControlValue, OUString() );
}
@@ -2751,7 +2751,7 @@ void ImplWin::ApplySettings(vcl::RenderContext& rRenderContext)
rRenderContext.SetBackground(rStyleSettings.GetFieldColor());
}
-void ImplWin::Paint( vcl::RenderContext& rRenderContext, const Rectangle& )
+void ImplWin::Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& )
{
ImplDraw(rRenderContext);
}
@@ -2812,7 +2812,7 @@ void ImplWin::DrawEntry(vcl::RenderContext& rRenderContext, bool bDrawImage, boo
else
nTextStyle |= DrawTextFlags::Left;
- Rectangle aTextRect( Point( nBorder, 0 ), Size( aOutSz.Width()-2*nBorder, aOutSz.Height() ) );
+ tools::Rectangle aTextRect( Point( nBorder, 0 ), Size( aOutSz.Width()-2*nBorder, aOutSz.Height() ) );
if ( !bDrawTextAtImagePos && ( bImage || IsUserDrawEnabled() ) )
{
@@ -2869,14 +2869,14 @@ void ImplWin::LoseFocus()
Control::LoseFocus();
}
-void ImplWin::ShowFocus(const Rectangle& rRect)
+void ImplWin::ShowFocus(const tools::Rectangle& rRect)
{
if (IsNativeControlSupported(ControlType::Listbox, ControlPart::Focus))
{
ImplControlValue aControlValue;
vcl::Window *pWin = GetParent();
- Rectangle aParentRect(Point(0, 0), pWin->GetSizePixel());
+ tools::Rectangle aParentRect(Point(0, 0), pWin->GetSizePixel());
pWin->DrawNativeControl(ControlType::Listbox, ControlPart::Focus, aParentRect,
ControlState::FOCUSED, aControlValue, OUString());
}
@@ -2962,7 +2962,7 @@ void ImplListBoxFloatingWindow::setPosSizePixel( long nX, long nY, long nWidth,
aPos.Y() = nY;
sal_uInt16 nIndex;
- SetPosPixel( ImplCalcPos( this, Rectangle( aPos, GetParent()->GetSizePixel() ), FloatWinPopupFlags::Down, nIndex ) );
+ SetPosPixel( ImplCalcPos( this, tools::Rectangle( aPos, GetParent()->GetSizePixel() ), FloatWinPopupFlags::Down, nIndex ) );
}
// if( !IsReallyVisible() )
@@ -3082,7 +3082,7 @@ void ImplListBoxFloatingWindow::StartFloat( bool bStartTracking )
aSz.Width() -= nLeft + nRight;
aSz.Height() -= nTop + nBottom;
}
- Rectangle aRect( aPos, aSz );
+ tools::Rectangle aRect( aPos, aSz );
// check if the control's parent is un-mirrored which is the case for form controls in a mirrored UI
// where the document is unmirrored
diff --git a/vcl/source/control/listbox.cxx b/vcl/source/control/listbox.cxx
index eedb2cbe4110..c05c63b8dea2 100644
--- a/vcl/source/control/listbox.cxx
+++ b/vcl/source/control/listbox.cxx
@@ -106,9 +106,9 @@ void ListBox::ImplInit( vcl::Window* pParent, WinBits nStyle )
IsNativeControlSupported( ControlType::Listbox, ControlPart::Entire ) )
{
ImplControlValue aControlValue;
- Rectangle aCtrlRegion( Point( 0, 0 ), Size( 20, mnDDHeight ) );
- Rectangle aBoundingRgn( aCtrlRegion );
- Rectangle aContentRgn( aCtrlRegion );
+ tools::Rectangle aCtrlRegion( Point( 0, 0 ), Size( 20, mnDDHeight ) );
+ tools::Rectangle aBoundingRgn( aCtrlRegion );
+ tools::Rectangle aContentRgn( aCtrlRegion );
if( GetNativeControlRegion( ControlType::Listbox, ControlPart::Entire, aCtrlRegion,
ControlState::ENABLED, aControlValue, OUString(),
aBoundingRgn, aContentRgn ) )
@@ -347,7 +347,7 @@ void ListBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, Dr
bool bBackground = !(nFlags & DrawFlags::NoBackground) && IsControlBackground();
if ( bBorder || bBackground )
{
- Rectangle aRect( aPos, aSize );
+ tools::Rectangle aRect( aPos, aSize );
if ( bBorder )
{
ImplDrawFrame( pDev, aRect );
@@ -380,7 +380,7 @@ void ListBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, Dr
const long nOnePixel = GetDrawPixel( pDev, 1 );
const long nOffX = 3*nOnePixel;
DrawTextFlags nTextStyle = DrawTextFlags::VCenter;
- Rectangle aTextRect( aPos, aSize );
+ tools::Rectangle aTextRect( aPos, aSize );
if ( GetStyle() & WB_CENTER )
nTextStyle |= DrawTextFlags::Center;
@@ -404,7 +404,7 @@ void ListBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, Dr
((nOffY+nTextHeight) > aSize.Height()) ||
((nOffX+nTextWidth) > aSize.Width()) )
{
- Rectangle aClip( aPos, aSize );
+ tools::Rectangle aClip( aPos, aSize );
if ( nTextHeight > aSize.Height() )
aClip.Bottom() += nTextHeight-aSize.Height()+1; // So that HP Printers don't optimize this away
pDev->IntersectClipRegion( aClip );
@@ -416,7 +416,7 @@ void ListBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, Dr
{
long nTextHeight = pDev->GetTextHeight();
sal_uInt16 nLines = ( nTextHeight > 0 ) ? (sal_uInt16)(aSize.Height() / nTextHeight) : 1;
- Rectangle aClip( aPos, aSize );
+ tools::Rectangle aClip( aPos, aSize );
pDev->IntersectClipRegion( aClip );
@@ -430,7 +430,7 @@ void ListBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, Dr
if ( bSelected )
{
pDev->SetFillColor( COL_BLACK );
- pDev->DrawRect( Rectangle( Point( aPos.X(), aPos.Y() + n*nTextHeight ),
+ pDev->DrawRect( tools::Rectangle( Point( aPos.X(), aPos.Y() + n*nTextHeight ),
Point( aPos.X() + aSize.Width(), aPos.Y() + (n+1)*nTextHeight + 2*nOnePixel ) ) );
pDev->SetFillColor();
pDev->SetTextColor( COL_WHITE );
@@ -580,10 +580,10 @@ void ListBox::Resize()
vcl::Window *pBorder = GetWindow( GetWindowType::Border );
ImplControlValue aControlValue;
Point aPoint;
- Rectangle aContent, aBound;
+ tools::Rectangle aContent, aBound;
// Use the full extent of the control
- Rectangle aArea( aPoint, pBorder->GetOutputSizePixel() );
+ tools::Rectangle aArea( aPoint, pBorder->GetOutputSizePixel() );
if ( GetNativeControlRegion( ControlType::Listbox, ControlPart::ButtonDown,
aArea, ControlState::NONE, aControlValue, OUString(), aBound, aContent) )
@@ -1125,10 +1125,10 @@ bool ListBox::IsInDropDown() const
return mpFloatWin && mpFloatWin->IsInPopupMode();
}
-Rectangle ListBox::GetBoundingRectangle( sal_Int32 nItem ) const
+tools::Rectangle ListBox::GetBoundingRectangle( sal_Int32 nItem ) const
{
- Rectangle aRect = mpImplLB->GetMainWindow()->GetBoundingRectangle( nItem );
- Rectangle aOffset = mpImplLB->GetMainWindow()->GetWindowExtentsRelative( static_cast<vcl::Window*>(const_cast<ListBox *>(this)) );
+ tools::Rectangle aRect = mpImplLB->GetMainWindow()->GetBoundingRectangle( nItem );
+ tools::Rectangle aOffset = mpImplLB->GetMainWindow()->GetWindowExtentsRelative( static_cast<vcl::Window*>(const_cast<ListBox *>(this)) );
aRect.Move( aOffset.TopLeft().X(), aOffset.TopLeft().Y() );
return aRect;
}
@@ -1184,9 +1184,9 @@ Size ListBox::CalcMinimumSize() const
// See how large the edit area inside is to estimate what is needed for the dropdown
ImplControlValue aControlValue;
Point aPoint;
- Rectangle aContent, aBound;
+ tools::Rectangle aContent, aBound;
Size aTestSize( 100, 20 );
- Rectangle aArea( aPoint, aTestSize );
+ tools::Rectangle aArea( aPoint, aTestSize );
if( GetNativeControlRegion( ControlType::Listbox, ControlPart::SubEdit, aArea, ControlState::NONE,
aControlValue, OUString(), aBound, aContent) )
{
@@ -1202,8 +1202,8 @@ Size ListBox::CalcMinimumSize() const
if (IsDropDownBox()) // Check minimum height of dropdown box
{
ImplControlValue aControlValue;
- Rectangle aRect( Point( 0, 0 ), aSz );
- Rectangle aContent, aBound;
+ tools::Rectangle aRect( Point( 0, 0 ), aSz );
+ tools::Rectangle aContent, aBound;
if( GetNativeControlRegion( ControlType::Listbox, ControlPart::Entire, aRect, ControlState::NONE,
aControlValue, OUString(), aBound, aContent) )
{
@@ -1388,9 +1388,9 @@ void ListBox::EnableMirroring()
mpImplLB->EnableMirroring();
}
-Rectangle ListBox::GetDropDownPosSizePixel() const
+tools::Rectangle ListBox::GetDropDownPosSizePixel() const
{
- return mpFloatWin ? mpFloatWin->GetWindowExtentsRelative( const_cast<ListBox*>(this) ) : Rectangle();
+ return mpFloatWin ? mpFloatWin->GetWindowExtentsRelative( const_cast<ListBox*>(this) ) : tools::Rectangle();
}
const Wallpaper& ListBox::GetDisplayBackground() const
diff --git a/vcl/source/control/menubtn.cxx b/vcl/source/control/menubtn.cxx
index cc30eb548cc5..79d09a6687f9 100644
--- a/vcl/source/control/menubtn.cxx
+++ b/vcl/source/control/menubtn.cxx
@@ -49,13 +49,13 @@ void MenuButton::ExecuteMenu()
if (mpMenu)
{
Point aPos(0, 1);
- Rectangle aRect(aPos, aSize );
+ tools::Rectangle aRect(aPos, aSize );
mnCurItemId = mpMenu->Execute(this, aRect, PopupMenuFlags::ExecuteDown);
}
else
{
Point aPos(GetParent()->OutputToScreenPixel(GetPosPixel()));
- Rectangle aRect(aPos, aSize );
+ tools::Rectangle aRect(aPos, aSize );
mpFloatingWindow->StartPopupMode(aRect, FloatWinPopupFlags::Down | FloatWinPopupFlags::GrabFocus);
}
SetPressed(false);
diff --git a/vcl/source/control/morebtn.cxx b/vcl/source/control/morebtn.cxx
index 9509e152e21f..cb66fcd005c1 100644
--- a/vcl/source/control/morebtn.cxx
+++ b/vcl/source/control/morebtn.cxx
@@ -108,7 +108,7 @@ void MoreButton::Click()
// Adapt dialogbox
Point aPos( pParent->GetPosPixel() );
- Rectangle aDeskRect( pParent->ImplGetFrameWindow()->GetDesktopRectPixel() );
+ tools::Rectangle aDeskRect( pParent->ImplGetFrameWindow()->GetDesktopRectPixel() );
aSize.Height() += nDeltaPixel;
if ( (aPos.Y()+aSize.Height()) > aDeskRect.Bottom() )
diff --git a/vcl/source/control/notebookbar.cxx b/vcl/source/control/notebookbar.cxx
index a96a86d1ac27..3706c090a703 100644
--- a/vcl/source/control/notebookbar.cxx
+++ b/vcl/source/control/notebookbar.cxx
@@ -175,7 +175,7 @@ void NotebookBar::UpdateBackground()
else
SetBackground(rStyleSettings.GetMenuBarColor());
- Invalidate(Rectangle(Point(0,0), GetSizePixel()));
+ Invalidate(tools::Rectangle(Point(0,0), GetSizePixel()));
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/control/prgsbar.cxx b/vcl/source/control/prgsbar.cxx
index 67619d8d85a7..240756b921d5 100644
--- a/vcl/source/control/prgsbar.cxx
+++ b/vcl/source/control/prgsbar.cxx
@@ -147,10 +147,10 @@ void ProgressBar::ImplDrawProgress(vcl::RenderContext& rRenderContext, sal_uInt1
::DrawProgress(this, rRenderContext, maPos, PROGRESSBAR_OFFSET, mnPrgsWidth, mnPrgsHeight,
nOldPerc * 100, nNewPerc * 100, mnPercentCount,
- Rectangle(Point(), GetSizePixel()));
+ tools::Rectangle(Point(), GetSizePixel()));
}
-void ProgressBar::Paint(vcl::RenderContext& rRenderContext, const Rectangle& /*rRect*/)
+void ProgressBar::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& /*rRect*/)
{
ImplDrawProgress(rRenderContext, mnPreviousPercent, mnPercent);
}
diff --git a/vcl/source/control/scrbar.cxx b/vcl/source/control/scrbar.cxx
index 85207710d4b6..40dfd14aa0f8 100644
--- a/vcl/source/control/scrbar.cxx
+++ b/vcl/source/control/scrbar.cxx
@@ -241,8 +241,8 @@ void ScrollBar::ImplCalc( bool bUpdate )
{
Size aOldSize = getCurrentCalcSize();
- const Rectangle aControlRegion( Point(0,0), aSize );
- Rectangle aBtn1Region, aBtn2Region, aTrackRegion, aBoundingRegion;
+ const tools::Rectangle aControlRegion( Point(0,0), aSize );
+ tools::Rectangle aBtn1Region, aBtn2Region, aTrackRegion, aBoundingRegion;
if ( GetStyle() & WB_HORZ )
{
@@ -267,7 +267,7 @@ void ScrollBar::ImplCalc( bool bUpdate )
aControlRegion, ControlState::NONE, ImplControlValue(), OUString(), aBoundingRegion, aTrackRegion ) )
maTrackRect = aTrackRegion;
else
- maTrackRect = Rectangle( maBtn1Rect.TopRight(), maBtn2Rect.BottomLeft() );
+ maTrackRect = tools::Rectangle( maBtn1Rect.TopRight(), maBtn2Rect.BottomLeft() );
// Check if available space is big enough for thumb ( min thumb size = ScrBar width/height )
mnThumbPixRange = maTrackRect.Right() - maTrackRect.Left();
@@ -308,7 +308,7 @@ void ScrollBar::ImplCalc( bool bUpdate )
aControlRegion, ControlState::NONE, ImplControlValue(), OUString(), aBoundingRegion, aTrackRegion ) )
maTrackRect = aTrackRegion;
else
- maTrackRect = Rectangle( maBtn1Rect.BottomLeft()+Point(0,1), maBtn2Rect.TopRight() );
+ maTrackRect = tools::Rectangle( maBtn1Rect.BottomLeft()+Point(0,1), maBtn2Rect.TopRight() );
// Check if available space is big enough for thumb
mnThumbPixRange = maTrackRect.Bottom() - maTrackRect.Top();
@@ -454,7 +454,7 @@ bool ScrollBar::ImplDrawNative(vcl::RenderContext& rRenderContext, sal_uInt16 nD
if (IsMouseOver())
{
- Rectangle* pRect = ImplFindPartRect(GetPointerPosPixel());
+ tools::Rectangle* pRect = ImplFindPartRect(GetPointerPosPixel());
if (pRect)
{
if (pRect == &maThumbRect)
@@ -470,14 +470,14 @@ bool ScrollBar::ImplDrawNative(vcl::RenderContext& rRenderContext, sal_uInt16 nD
}
}
- Rectangle aCtrlRegion;
+ tools::Rectangle aCtrlRegion;
aCtrlRegion.Union(maBtn1Rect);
aCtrlRegion.Union(maBtn2Rect);
aCtrlRegion.Union(maPage1Rect);
aCtrlRegion.Union(maPage2Rect);
aCtrlRegion.Union(maThumbRect);
- Rectangle aRequestedRegion(Point(0,0), GetOutputSizePixel());
+ tools::Rectangle aRequestedRegion(Point(0,0), GetOutputSizePixel());
// if the actual native control region is smaller then the region that
// we requested the control to draw in, then draw a background rectangle
// to avoid drawing artifacts in the uncovered region
@@ -499,8 +499,8 @@ bool ScrollBar::ImplDrawNative(vcl::RenderContext& rRenderContext, sal_uInt16 nD
{
ControlPart part1 = bHorz ? ControlPart::TrackHorzLeft : ControlPart::TrackVertUpper;
ControlPart part2 = bHorz ? ControlPart::TrackHorzRight : ControlPart::TrackVertLower;
- Rectangle aCtrlRegion1(maPage1Rect);
- Rectangle aCtrlRegion2(maPage2Rect);
+ tools::Rectangle aCtrlRegion1(maPage1Rect);
+ tools::Rectangle aCtrlRegion2(maPage2Rect);
ControlState nState1 = (IsEnabled() ? ControlState::ENABLED : ControlState::NONE)
| (HasFocus() ? ControlState::FOCUSED : ControlState::NONE);
ControlState nState2 = nState1;
@@ -510,7 +510,7 @@ bool ScrollBar::ImplDrawNative(vcl::RenderContext& rRenderContext, sal_uInt16 nD
if (IsMouseOver())
{
- Rectangle* pRect = ImplFindPartRect(GetPointerPosPixel());
+ tools::Rectangle* pRect = ImplFindPartRect(GetPointerPosPixel());
if (pRect)
{
if (pRect == &maPage1Rect)
@@ -530,8 +530,8 @@ bool ScrollBar::ImplDrawNative(vcl::RenderContext& rRenderContext, sal_uInt16 nD
{
ControlPart part1 = bHorz ? ControlPart::ButtonLeft : ControlPart::ButtonUp;
ControlPart part2 = bHorz ? ControlPart::ButtonRight : ControlPart::ButtonDown;
- Rectangle aCtrlRegion1(maBtn1Rect);
- Rectangle aCtrlRegion2(maBtn2Rect);
+ tools::Rectangle aCtrlRegion1(maBtn1Rect);
+ tools::Rectangle aCtrlRegion2(maBtn2Rect);
ControlState nState1 = HasFocus() ? ControlState::FOCUSED : ControlState::NONE;
ControlState nState2 = nState1;
@@ -550,7 +550,7 @@ bool ScrollBar::ImplDrawNative(vcl::RenderContext& rRenderContext, sal_uInt16 nD
if (IsMouseOver())
{
- Rectangle* pRect = ImplFindPartRect(GetPointerPosPixel());
+ tools::Rectangle* pRect = ImplFindPartRect(GetPointerPosPixel());
if (pRect)
{
if (pRect == &maBtn1Rect)
@@ -569,7 +569,7 @@ bool ScrollBar::ImplDrawNative(vcl::RenderContext& rRenderContext, sal_uInt16 nD
if ((nDrawFlags & SCRBAR_DRAW_THUMB) && !maThumbRect.IsEmpty())
{
ControlState nState = IsEnabled() ? ControlState::ENABLED : ControlState::NONE;
- Rectangle aCtrlRegion(maThumbRect);
+ tools::Rectangle aCtrlRegion(maThumbRect);
if (mnStateFlags & SCRBAR_STATE_THUMB_DOWN)
nState |= ControlState::PRESSED;
@@ -579,7 +579,7 @@ bool ScrollBar::ImplDrawNative(vcl::RenderContext& rRenderContext, sal_uInt16 nD
if (IsMouseOver())
{
- Rectangle* pRect = ImplFindPartRect(GetPointerPosPixel());
+ tools::Rectangle* pRect = ImplFindPartRect(GetPointerPosPixel());
if (pRect)
{
if (pRect == &maThumbRect)
@@ -597,7 +597,7 @@ bool ScrollBar::ImplDrawNative(vcl::RenderContext& rRenderContext, sal_uInt16 nD
void ScrollBar::ImplDraw(vcl::RenderContext& rRenderContext)
{
DecorationView aDecoView(&rRenderContext);
- Rectangle aTempRect;
+ tools::Rectangle aTempRect;
DrawButtonFlags nStyle;
const StyleSettings& rStyleSettings = rRenderContext.GetSettings().GetStyleSettings();
SymbolType eSymbolType;
@@ -741,7 +741,7 @@ void ScrollBar::ImplDoMouseAction( const Point& rMousePos, bool bCallAction )
bool bIsInside = false;
Point aPoint( 0, 0 );
- Rectangle aControlRegion( aPoint, GetOutputSizePixel() );
+ tools::Rectangle aControlRegion( aPoint, GetOutputSizePixel() );
switch ( meScrollType )
{
@@ -869,7 +869,7 @@ void ScrollBar::MouseButtonDown( const MouseEvent& rMEvt )
bool bDragToMouse = false;
Point aPoint( 0, 0 );
- Rectangle aControlRegion( aPoint, GetOutputSizePixel() );
+ tools::Rectangle aControlRegion( aPoint, GetOutputSizePixel() );
if ( HitTestNativeScrollbar( bHorizontal? (IsRTLEnabled()? ControlPart::ButtonRight: ControlPart::ButtonLeft): ControlPart::ButtonUp,
aControlRegion, rMousePos, bIsInside )?
@@ -1102,7 +1102,7 @@ void ScrollBar::ApplySettings(vcl::RenderContext& rRenderContext)
rRenderContext.SetBackground();
}
-void ScrollBar::Paint(vcl::RenderContext& rRenderContext, const Rectangle&)
+void ScrollBar::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&)
{
ImplDraw(rRenderContext);
}
@@ -1125,7 +1125,7 @@ IMPL_LINK_NOARG(ScrollBar, ImplAutoTimerHdl, Timer *, void)
void ScrollBar::ImplInvert()
{
- Rectangle aRect( maThumbRect );
+ tools::Rectangle aRect( maThumbRect );
if( aRect.getWidth() > 4 )
{
aRect.Left() += 2;
@@ -1217,13 +1217,13 @@ void ScrollBar::DataChanged( const DataChangedEvent& rDCEvt )
}
}
-Rectangle* ScrollBar::ImplFindPartRect( const Point& rPt )
+tools::Rectangle* ScrollBar::ImplFindPartRect( const Point& rPt )
{
bool bHorizontal = ( GetStyle() & WB_HORZ ) != 0;
bool bIsInside = false;
Point aPoint( 0, 0 );
- Rectangle aControlRegion( aPoint, GetOutputSizePixel() );
+ tools::Rectangle aControlRegion( aPoint, GetOutputSizePixel() );
if( HitTestNativeScrollbar( bHorizontal? (IsRTLEnabled()? ControlPart::ButtonRight: ControlPart::ButtonLeft): ControlPart::ButtonUp,
aControlRegion, rPt, bIsInside )?
@@ -1268,8 +1268,8 @@ bool ScrollBar::PreNotify( NotifyEvent& rNEvt )
// Trigger a redraw if mouse over state has changed
if( IsNativeControlSupported(ControlType::Scrollbar, ControlPart::Entire) )
{
- Rectangle* pRect = ImplFindPartRect( GetPointerPosPixel() );
- Rectangle* pLastRect = ImplFindPartRect( GetLastPointerPosPixel() );
+ tools::Rectangle* pRect = ImplFindPartRect( GetPointerPosPixel() );
+ tools::Rectangle* pLastRect = ImplFindPartRect( GetLastPointerPosPixel() );
if( pRect != pLastRect || pMouseEvt->IsLeaveWindow() || pMouseEvt->IsEnterWindow() )
{
vcl::Region aRgn( GetActiveClipRegion() );
@@ -1421,7 +1421,7 @@ Size ScrollBar::GetOptimalSize() const
Size ScrollBar::getCurrentCalcSize() const
{
- Rectangle aCtrlRegion;
+ tools::Rectangle aCtrlRegion;
aCtrlRegion.Union(maBtn1Rect);
aCtrlRegion.Union(maBtn2Rect);
aCtrlRegion.Union(maPage1Rect);
diff --git a/vcl/source/control/slider.cxx b/vcl/source/control/slider.cxx
index 5c16e5a96dba..51e894b280c7 100644
--- a/vcl/source/control/slider.cxx
+++ b/vcl/source/control/slider.cxx
@@ -110,7 +110,7 @@ void Slider::ImplInitSettings()
void Slider::ImplUpdateRects( bool bUpdate )
{
- Rectangle aOldThumbRect = maThumbRect;
+ tools::Rectangle aOldThumbRect = maThumbRect;
bool bInvalidateAll = false;
if ( mnThumbPixRange )
@@ -138,8 +138,8 @@ void Slider::ImplUpdateRects( bool bUpdate )
else
maChannel2Rect.SetEmpty();
- const Rectangle aControlRegion( Rectangle( Point(0,0), Size( SLIDER_THUMB_SIZE, 10 ) ) );
- Rectangle aThumbBounds, aThumbContent;
+ const tools::Rectangle aControlRegion( tools::Rectangle( Point(0,0), Size( SLIDER_THUMB_SIZE, 10 ) ) );
+ tools::Rectangle aThumbBounds, aThumbContent;
if ( GetNativeControlRegion( ControlType::Slider, ControlPart::ThumbHorz,
aControlRegion, ControlState::NONE, ImplControlValue(), OUString(),
aThumbBounds, aThumbContent ) )
@@ -172,8 +172,8 @@ void Slider::ImplUpdateRects( bool bUpdate )
else
maChannel2Rect.SetEmpty();
- const Rectangle aControlRegion( Rectangle( Point(0,0), Size( 10, SLIDER_THUMB_SIZE ) ) );
- Rectangle aThumbBounds, aThumbContent;
+ const tools::Rectangle aControlRegion( tools::Rectangle( Point(0,0), Size( 10, SLIDER_THUMB_SIZE ) ) );
+ tools::Rectangle aThumbBounds, aThumbContent;
if ( GetNativeControlRegion( ControlType::Slider, ControlPart::ThumbVert,
aControlRegion, ControlState::NONE, ImplControlValue(), OUString(),
aThumbBounds, aThumbContent ) )
@@ -341,7 +341,7 @@ void Slider::ImplDraw(vcl::RenderContext& rRenderContext)
sldValue.mnThumbState |= ControlState::ROLLOVER;
}
- const Rectangle aCtrlRegion(Point(0,0), GetOutputSizePixel());
+ const tools::Rectangle aCtrlRegion(Point(0,0), GetOutputSizePixel());
bool bNativeOK = rRenderContext.DrawNativeControl(ControlType::Slider, nPart, aCtrlRegion, nState, sldValue, OUString());
if (bNativeOK)
return;
@@ -349,7 +349,7 @@ void Slider::ImplDraw(vcl::RenderContext& rRenderContext)
if (!maChannel1Rect.IsEmpty())
{
long nRectSize;
- Rectangle aRect = maChannel1Rect;
+ tools::Rectangle aRect = maChannel1Rect;
rRenderContext.SetLineColor(rStyleSettings.GetShadowColor());
if (GetStyle() & WB_HORZ)
{
@@ -393,7 +393,7 @@ void Slider::ImplDraw(vcl::RenderContext& rRenderContext)
if (!maChannel2Rect.IsEmpty())
{
long nRectSize;
- Rectangle aRect = maChannel2Rect;
+ tools::Rectangle aRect = maChannel2Rect;
rRenderContext.SetLineColor(rStyleSettings.GetLightColor());
if (GetStyle() & WB_HORZ)
{
@@ -452,7 +452,7 @@ void Slider::ImplDraw(vcl::RenderContext& rRenderContext)
bool Slider::ImplIsPageUp( const Point& rPos )
{
Size aSize = GetOutputSizePixel();
- Rectangle aRect = maChannel1Rect;
+ tools::Rectangle aRect = maChannel1Rect;
if ( GetStyle() & WB_HORZ )
{
aRect.Top() = 0;
@@ -469,7 +469,7 @@ bool Slider::ImplIsPageUp( const Point& rPos )
bool Slider::ImplIsPageDown( const Point& rPos )
{
Size aSize = GetOutputSizePixel();
- Rectangle aRect = maChannel2Rect;
+ tools::Rectangle aRect = maChannel2Rect;
if ( GetStyle() & WB_HORZ )
{
aRect.Top() = 0;
@@ -809,7 +809,7 @@ void Slider::KeyInput( const KeyEvent& rKEvt )
Control::KeyInput( rKEvt );
}
-void Slider::Paint(vcl::RenderContext& rRenderContext, const Rectangle& /*rRect*/)
+void Slider::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& /*rRect*/)
{
ImplDraw(rRenderContext);
}
diff --git a/vcl/source/control/spinbtn.cxx b/vcl/source/control/spinbtn.cxx
index 6294549bc917..1899000f7d90 100644
--- a/vcl/source/control/spinbtn.cxx
+++ b/vcl/source/control/spinbtn.cxx
@@ -104,16 +104,16 @@ void SpinButton::Resize()
Size aSize(GetOutputSizePixel());
Point aTmpPoint;
- Rectangle aRect(aTmpPoint, aSize);
+ tools::Rectangle aRect(aTmpPoint, aSize);
if (mbHorz)
{
- maLowerRect = Rectangle(0, 0, aSize.Width() / 2, aSize.Height() - 1);
- maUpperRect = Rectangle(maLowerRect.TopRight(), aRect.BottomRight());
+ maLowerRect = tools::Rectangle(0, 0, aSize.Width() / 2, aSize.Height() - 1);
+ maUpperRect = tools::Rectangle(maLowerRect.TopRight(), aRect.BottomRight());
}
else
{
- maUpperRect = Rectangle(0, 0, aSize.Width() - 1, aSize.Height() / 2);
- maLowerRect = Rectangle(maUpperRect.BottomLeft(), aRect.BottomRight());
+ maUpperRect = tools::Rectangle(0, 0, aSize.Width() - 1, aSize.Height() / 2);
+ maLowerRect = tools::Rectangle(maUpperRect.BottomLeft(), aRect.BottomRight());
}
ImplCalcFocusRect(ImplIsUpperEnabled() || !ImplIsLowerEnabled());
@@ -142,17 +142,17 @@ void SpinButton::Draw(OutputDevice* pDev, const Point& rPos, const Size& rSize,
pDev->SetSettings( aSettings );
}
- Rectangle aRect( Point( 0, 0 ), aSize );
- Rectangle aLowerRect, aUpperRect;
+ tools::Rectangle aRect( Point( 0, 0 ), aSize );
+ tools::Rectangle aLowerRect, aUpperRect;
if ( mbHorz )
{
- aLowerRect = Rectangle( 0, 0, aSize.Width()/2, aSize.Height()-1 );
- aUpperRect = Rectangle( aLowerRect.TopRight(), aRect.BottomRight() );
+ aLowerRect = tools::Rectangle( 0, 0, aSize.Width()/2, aSize.Height()-1 );
+ aUpperRect = tools::Rectangle( aLowerRect.TopRight(), aRect.BottomRight() );
}
else
{
- aUpperRect = Rectangle( 0, 0, aSize.Width()-1, aSize.Height()/2 );
- aLowerRect = Rectangle( aUpperRect.BottomLeft(), aRect.BottomRight() );
+ aUpperRect = tools::Rectangle( 0, 0, aSize.Width()-1, aSize.Height()/2 );
+ aLowerRect = tools::Rectangle( aUpperRect.BottomLeft(), aRect.BottomRight() );
}
aUpperRect += aPos;
@@ -164,7 +164,7 @@ void SpinButton::Draw(OutputDevice* pDev, const Point& rPos, const Size& rSize,
pDev->Pop();
}
-void SpinButton::Paint(vcl::RenderContext& rRenderContext, const Rectangle& /*rRect*/)
+void SpinButton::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& /*rRect*/)
{
HideFocus();
@@ -427,7 +427,7 @@ void SpinButton::ImplCalcFocusRect( bool _bUpper )
mbUpperIsFocused = _bUpper;
}
-Rectangle* SpinButton::ImplFindPartRect( const Point& rPt )
+tools::Rectangle* SpinButton::ImplFindPartRect( const Point& rPt )
{
if( maUpperRect.IsInside( rPt ) )
return &maUpperRect;
@@ -449,8 +449,8 @@ bool SpinButton::PreNotify( NotifyEvent& rNEvt )
if (IsNativeControlSupported(ControlType::Spinbox, ControlPart::Entire) ||
IsNativeControlSupported(ControlType::Spinbox, ControlPart::AllButtons) )
{
- Rectangle* pRect = ImplFindPartRect( GetPointerPosPixel() );
- Rectangle* pLastRect = ImplFindPartRect( GetLastPointerPosPixel() );
+ tools::Rectangle* pRect = ImplFindPartRect( GetPointerPosPixel() );
+ tools::Rectangle* pLastRect = ImplFindPartRect( GetLastPointerPosPixel() );
if (pRect != pLastRect || (pMouseEvt->IsLeaveWindow() || pMouseEvt->IsEnterWindow()))
{
vcl::Region aRgn(GetActiveClipRegion());
diff --git a/vcl/source/control/spinfld.cxx b/vcl/source/control/spinfld.cxx
index c006140571a3..84fb780d50f6 100644
--- a/vcl/source/control/spinfld.cxx
+++ b/vcl/source/control/spinfld.cxx
@@ -32,7 +32,7 @@
namespace {
void ImplGetSpinbuttonValue(vcl::Window* pWin,
- const Rectangle& rUpperRect, const Rectangle& rLowerRect,
+ const tools::Rectangle& rUpperRect, const tools::Rectangle& rLowerRect,
bool bUpperIn, bool bLowerIn, bool bUpperEnabled, bool bLowerEnabled,
bool bHorz, SpinbuttonValue& rValue )
{
@@ -82,7 +82,7 @@ bool ImplDrawNativeSpinfield(vcl::RenderContext& rRenderContext, vcl::Window* pW
rRenderContext.IsNativeControlSupported(ControlType::Spinbox, rSpinbuttonValue.mnLowerPart))
{
// only paint the embedded spin buttons, all buttons are painted at once
- Rectangle aUpperAndLowerButtons( rSpinbuttonValue.maUpperRect.GetUnion( rSpinbuttonValue.maLowerRect ) );
+ tools::Rectangle aUpperAndLowerButtons( rSpinbuttonValue.maUpperRect.GetUnion( rSpinbuttonValue.maLowerRect ) );
bNativeOK = rRenderContext.DrawNativeControl(ControlType::Spinbox, ControlPart::AllButtons, aUpperAndLowerButtons,
ControlState::ENABLED, rSpinbuttonValue, OUString());
}
@@ -92,14 +92,14 @@ bool ImplDrawNativeSpinfield(vcl::RenderContext& rRenderContext, vcl::Window* pW
vcl::Window* pBorder = pWin->GetWindow(GetWindowType::Border);
// to not overwrite everything, set the button region as clipregion to the border window
- Rectangle aClipRect(rSpinbuttonValue.maLowerRect);
+ tools::Rectangle aClipRect(rSpinbuttonValue.maLowerRect);
aClipRect.Union(rSpinbuttonValue.maUpperRect);
vcl::RenderContext* pContext = &rRenderContext;
vcl::Region oldRgn;
Point aPt;
Size aSize(pBorder->GetOutputSizePixel()); // the size of the border window, i.e., the whole control
- Rectangle aNatRgn(aPt, aSize);
+ tools::Rectangle aNatRgn(aPt, aSize);
if (!pWin->SupportsDoubleBuffering())
{
@@ -112,7 +112,7 @@ bool ImplDrawNativeSpinfield(vcl::RenderContext& rRenderContext, vcl::Window* pW
pContext = pBorder;
}
- Rectangle aBound, aContent;
+ tools::Rectangle aBound, aContent;
if (!ImplGetSVData()->maNWFData.mbCanDrawWidgetAnySize &&
pContext->GetNativeControlRegion(ControlType::Spinbox, ControlPart::Entire,
aNatRgn, ControlState::NONE, rSpinbuttonValue,
@@ -121,7 +121,7 @@ bool ImplDrawNativeSpinfield(vcl::RenderContext& rRenderContext, vcl::Window* pW
aSize = aContent.GetSize();
}
- Rectangle aRgn(aPt, aSize);
+ tools::Rectangle aRgn(aPt, aSize);
if (pWin->SupportsDoubleBuffering())
{
// convert from borderwin space, to the pWin's space
@@ -144,7 +144,7 @@ bool ImplDrawNativeSpinbuttons(vcl::RenderContext& rRenderContext, const Spinbut
if (rRenderContext.IsNativeControlSupported(ControlType::SpinButtons, ControlPart::Entire))
{
- Rectangle aArea = rSpinbuttonValue.maUpperRect.GetUnion(rSpinbuttonValue.maLowerRect);
+ tools::Rectangle aArea = rSpinbuttonValue.maUpperRect.GetUnion(rSpinbuttonValue.maLowerRect);
// only paint the standalone spin buttons, all buttons are painted at once
bNativeOK = rRenderContext.DrawNativeControl(ControlType::SpinButtons, ControlPart::AllButtons, aArea,
ControlState::ENABLED, rSpinbuttonValue, OUString());
@@ -155,7 +155,7 @@ bool ImplDrawNativeSpinbuttons(vcl::RenderContext& rRenderContext, const Spinbut
}
void ImplDrawSpinButton(vcl::RenderContext& rRenderContext, vcl::Window* pWindow,
- const Rectangle& rUpperRect, const Rectangle& rLowerRect,
+ const tools::Rectangle& rUpperRect, const tools::Rectangle& rLowerRect,
bool bUpperIn, bool bLowerIn, bool bUpperEnabled, bool bLowerEnabled,
bool bHorz, bool bMirrorHorz)
{
@@ -205,7 +205,7 @@ void ImplDrawSpinButton(vcl::RenderContext& rRenderContext, vcl::Window* pWindow
}
void ImplDrawUpDownButtons(vcl::RenderContext& rRenderContext,
- const Rectangle& rUpperRect, const Rectangle& rLowerRect,
+ const tools::Rectangle& rUpperRect, const tools::Rectangle& rLowerRect,
bool bUpperIn, bool bLowerIn, bool bUpperEnabled, bool bLowerEnabled,
bool bHorz, bool bMirrorHorz)
{
@@ -229,14 +229,14 @@ void ImplDrawUpDownButtons(vcl::RenderContext& rRenderContext,
if (bUpperIn)
nStyle |= DrawButtonFlags::Pressed;
- Rectangle aUpRect = aDecoView.DrawButton(rUpperRect, nStyle);
+ tools::Rectangle aUpRect = aDecoView.DrawButton(rUpperRect, nStyle);
nStyle = DrawButtonFlags::NoLeftLightBorder;
// draw lower/right Button
if (bLowerIn)
nStyle |= DrawButtonFlags::Pressed;
- Rectangle aLowRect = aDecoView.DrawButton(rLowerRect, nStyle);
+ tools::Rectangle aLowRect = aDecoView.DrawButton(rLowerRect, nStyle);
// make use of additional default edge
aUpRect.Left()--;
@@ -403,7 +403,7 @@ void SpinField::MouseButtonDown( const MouseEvent& rMEvt )
{
// put DropDownButton to the right
mbInDropDown = ShowDropDown( !mbInDropDown );
- Invalidate(Rectangle(Point(), GetOutputSizePixel()));
+ Invalidate(tools::Rectangle(Point(), GetOutputSizePixel()));
}
if (mbUpperIn || mbLowerIn)
@@ -519,7 +519,7 @@ bool SpinField::EventNotify(NotifyEvent& rNEvt)
else if ((nMod == KEY_MOD2) && !mbInDropDown && (GetStyle() & WB_DROPDOWN))
{
mbInDropDown = ShowDropDown(true);
- Invalidate(Rectangle(Point(), GetOutputSizePixel()));
+ Invalidate(tools::Rectangle(Point(), GetOutputSizePixel()));
bDone = true;
}
}
@@ -584,7 +584,7 @@ void SpinField::FillLayoutData() const
Edit::FillLayoutData();
}
-void SpinField::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect)
+void SpinField::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect)
{
if (mbSpin)
{
@@ -600,7 +600,7 @@ void SpinField::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect
DrawButtonFlags nStyle = DrawButtonFlags::NoLightBorder;
if (mbInDropDown)
nStyle |= DrawButtonFlags::Pressed;
- Rectangle aInnerRect = aView.DrawButton(maDropDownRect, nStyle);
+ tools::Rectangle aInnerRect = aView.DrawButton(maDropDownRect, nStyle);
SymbolType eSymbol = SymbolType::SPIN_DOWN;
DrawSymbolFlags nSymbolStyle = IsEnabled() ? DrawSymbolFlags::NONE : DrawSymbolFlags::Disable;
@@ -610,8 +610,8 @@ void SpinField::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect
Edit::Paint(rRenderContext, rRect);
}
-void SpinField::ImplCalcButtonAreas(OutputDevice* pDev, const Size& rOutSz, Rectangle& rDDArea,
- Rectangle& rSpinUpArea, Rectangle& rSpinDownArea)
+void SpinField::ImplCalcButtonAreas(OutputDevice* pDev, const Size& rOutSz, tools::Rectangle& rDDArea,
+ tools::Rectangle& rSpinUpArea, tools::Rectangle& rSpinDownArea)
{
const StyleSettings& rStyleSettings = pDev->GetSettings().GetStyleSettings();
@@ -624,7 +624,7 @@ void SpinField::ImplCalcButtonAreas(OutputDevice* pDev, const Size& rOutSz, Rect
nW = GetDrawPixel( pDev, nW );
aDropDownSize = Size( CalcZoom( nW ), aSize.Height() );
aSize.Width() -= aDropDownSize.Width();
- rDDArea = Rectangle( Point( aSize.Width(), 0 ), aDropDownSize );
+ rDDArea = tools::Rectangle( Point( aSize.Width(), 0 ), aDropDownSize );
rDDArea.Top()--;
}
else
@@ -640,7 +640,7 @@ void SpinField::ImplCalcButtonAreas(OutputDevice* pDev, const Size& rOutSz, Rect
nBottom1--;
bool bNativeRegionOK = false;
- Rectangle aContentUp, aContentDown;
+ tools::Rectangle aContentUp, aContentDown;
if ((pDev->GetOutDevType() == OUTDEV_WINDOW) &&
// there is just no useful native support for spinfields with dropdown
@@ -652,11 +652,11 @@ void SpinField::ImplCalcButtonAreas(OutputDevice* pDev, const Size& rOutSz, Rect
// get the system's spin button size
ImplControlValue aControlValue;
- Rectangle aBound;
+ tools::Rectangle aBound;
Point aPoint;
// use the full extent of the control
- Rectangle aArea( aPoint, pBorder->GetOutputSizePixel() );
+ tools::Rectangle aArea( aPoint, pBorder->GetOutputSizePixel() );
bNativeRegionOK =
pWin->GetNativeControlRegion(ControlType::Spinbox, ControlPart::ButtonUp,
@@ -682,8 +682,8 @@ void SpinField::ImplCalcButtonAreas(OutputDevice* pDev, const Size& rOutSz, Rect
{
aSize.Width() -= CalcZoom( GetDrawPixel( pDev, rStyleSettings.GetSpinSize() ) );
- rSpinUpArea = Rectangle( aSize.Width(), 0, rOutSz.Width()-aDropDownSize.Width()-1, nBottom1 );
- rSpinDownArea = Rectangle( rSpinUpArea.Left(), nTop2, rSpinUpArea.Right(), nBottom2 );
+ rSpinUpArea = tools::Rectangle( aSize.Width(), 0, rOutSz.Width()-aDropDownSize.Width()-1, nBottom1 );
+ rSpinDownArea = tools::Rectangle( rSpinUpArea.Left(), nTop2, rSpinUpArea.Right(), nBottom2 );
}
}
else
@@ -707,11 +707,11 @@ void SpinField::Resize()
ImplControlValue aControlValue;
Point aPoint;
- Rectangle aContent, aBound;
+ tools::Rectangle aContent, aBound;
// use the full extent of the control
vcl::Window *pBorder = GetWindow( GetWindowType::Border );
- Rectangle aArea( aPoint, pBorder->GetOutputSizePixel() );
+ tools::Rectangle aArea( aPoint, pBorder->GetOutputSizePixel() );
// adjust position and size of the edit field
if (GetNativeControlRegion(ControlType::Spinbox, ControlPart::SubEdit, aArea, ControlState::NONE,
@@ -748,7 +748,7 @@ void SpinField::Resize()
mpEdit->SetSizePixel(aSize);
if (GetStyle() & WB_SPIN)
- Invalidate(Rectangle(maUpperRect.TopLeft(), maLowerRect.BottomRight()));
+ Invalidate(tools::Rectangle(maUpperRect.TopLeft(), maLowerRect.BottomRight()));
if (GetStyle() & WB_DROPDOWN)
Invalidate(maDropDownRect);
}
@@ -825,7 +825,7 @@ void SpinField::DataChanged( const DataChangedEvent& rDCEvt )
}
}
-Rectangle* SpinField::ImplFindPartRect(const Point& rPt)
+tools::Rectangle* SpinField::ImplFindPartRect(const Point& rPt)
{
if (maUpperRect.IsInside(rPt))
return &maUpperRect;
@@ -847,8 +847,8 @@ bool SpinField::PreNotify(NotifyEvent& rNEvt)
if( IsNativeControlSupported(ControlType::Spinbox, ControlPart::Entire) ||
IsNativeControlSupported(ControlType::Spinbox, ControlPart::AllButtons) )
{
- Rectangle* pRect = ImplFindPartRect( GetPointerPosPixel() );
- Rectangle* pLastRect = ImplFindPartRect( GetLastPointerPosPixel() );
+ tools::Rectangle* pRect = ImplFindPartRect( GetPointerPosPixel() );
+ tools::Rectangle* pLastRect = ImplFindPartRect( GetLastPointerPosPixel() );
if( pRect != pLastRect || (pMouseEvt->IsLeaveWindow() || pMouseEvt->IsEnterWindow()) )
{
// FIXME: this is currently only on OS X
@@ -886,7 +886,7 @@ bool SpinField::PreNotify(NotifyEvent& rNEvt)
void SpinField::EndDropDown()
{
mbInDropDown = false;
- Invalidate(Rectangle(Point(), GetOutputSizePixel()));
+ Invalidate(tools::Rectangle(Point(), GetOutputSizePixel()));
}
bool SpinField::ShowDropDown( bool )
@@ -903,8 +903,8 @@ Size SpinField::CalcMinimumSizeForText(const OUString &rString) const
if ( GetStyle() & WB_SPIN )
{
ImplControlValue aControlValue;
- Rectangle aArea( Point(), Size(100, aSz.Height()));
- Rectangle aEntireBound, aEntireContent, aEditBound, aEditContent;
+ tools::Rectangle aArea( Point(), Size(100, aSz.Height()));
+ tools::Rectangle aEntireBound, aEntireContent, aEditBound, aEditContent;
if (
GetNativeControlRegion(ControlType::Spinbox, ControlPart::Entire,
aArea, ControlState::NONE, aControlValue, OUString(), aEntireBound, aEntireContent) &&
@@ -986,7 +986,7 @@ void SpinField::Draw(OutputDevice* pDev, const Point& rPos, const Size& rSize, D
pDev->SetSettings(aSettings);
}
- Rectangle aDD, aUp, aDown;
+ tools::Rectangle aDD, aUp, aDown;
ImplCalcButtonAreas(pDev, aSize, aDD, aUp, aDown);
aDD.Move(aPos.X(), aPos.Y());
aUp.Move(aPos.X(), aPos.Y());
@@ -1003,7 +1003,7 @@ void SpinField::Draw(OutputDevice* pDev, const Point& rPos, const Size& rSize, D
{
DecorationView aView( pDev );
DrawButtonFlags nStyle = DrawButtonFlags::NoLightBorder;
- Rectangle aInnerRect = aView.DrawButton( aDD, nStyle );
+ tools::Rectangle aInnerRect = aView.DrawButton( aDD, nStyle );
SymbolType eSymbol = SymbolType::SPIN_DOWN;
DrawSymbolFlags nSymbolStyle = (IsEnabled() || (nFlags & DrawFlags::NoDisable)) ? DrawSymbolFlags::NONE : DrawSymbolFlags::Disable;
aView.DrawSymbol(aInnerRect, eSymbol, aButtonTextColor, nSymbolStyle);
diff --git a/vcl/source/control/tabctrl.cxx b/vcl/source/control/tabctrl.cxx
index 52afe6b4924f..2df0fbfd5028 100644
--- a/vcl/source/control/tabctrl.cxx
+++ b/vcl/source/control/tabctrl.cxx
@@ -51,7 +51,7 @@ struct ImplTabItem
OUString maHelpText;
OString maHelpId;
OString maTabName;
- Rectangle maRect;
+ tools::Rectangle maRect;
sal_uInt16 mnLine;
bool mbFullVisible;
bool mbEnabled;
@@ -232,9 +232,9 @@ Size TabControl::ImplGetItemSize( ImplTabItem* pItem, long nMaxWidth )
aSize.Width() += TAB_TABOFFSET_X*2;
aSize.Height() += TAB_TABOFFSET_Y*2;
- Rectangle aCtrlRegion( Point( 0, 0 ), aSize );
- Rectangle aBoundingRgn, aContentRgn;
- const TabitemValue aControlValue(Rectangle(TAB_TABOFFSET_X, TAB_TABOFFSET_Y,
+ tools::Rectangle aCtrlRegion( Point( 0, 0 ), aSize );
+ tools::Rectangle aBoundingRgn, aContentRgn;
+ const TabitemValue aControlValue(tools::Rectangle(TAB_TABOFFSET_X, TAB_TABOFFSET_Y,
aSize.Width() - TAB_TABOFFSET_X * 2,
aSize.Height() - TAB_TABOFFSET_Y * 2));
if(GetNativeControlRegion( ControlType::TabItem, ControlPart::Entire, aCtrlRegion,
@@ -425,7 +425,7 @@ bool TabControl::ImplPlaceTabs( long nWidth )
nLinePosAry[nLines] = nPos;
}
- Rectangle aNewRect( Point( nX, nY ), aSize );
+ tools::Rectangle aNewRect( Point( nX, nY ), aSize );
if ( mbSmallInvalidate && (it->maRect != aNewRect) )
mbSmallInvalidate = false;
it->maRect = aNewRect;
@@ -523,7 +523,7 @@ bool TabControl::ImplPlaceTabs( long nWidth )
return true;
}
-Rectangle TabControl::ImplGetTabRect( sal_uInt16 nItemPos, long nWidth, long nHeight )
+tools::Rectangle TabControl::ImplGetTabRect( sal_uInt16 nItemPos, long nWidth, long nHeight )
{
Size aWinSize = Control::GetOutputSizePixel();
if ( nWidth < 0 )
@@ -536,8 +536,8 @@ Rectangle TabControl::ImplGetTabRect( sal_uInt16 nItemPos, long nWidth, long nHe
long nW = nWidth-TAB_OFFSET*2;
long nH = nHeight-TAB_OFFSET*2;
return (nW > 0 && nH > 0)
- ? Rectangle( Point( TAB_OFFSET, TAB_OFFSET ), Size( nW, nH ) )
- : Rectangle();
+ ? tools::Rectangle( Point( TAB_OFFSET, TAB_OFFSET ), Size( nW, nH ) )
+ : tools::Rectangle();
}
if ( nItemPos == TAB_PAGERECT )
@@ -548,19 +548,19 @@ Rectangle TabControl::ImplGetTabRect( sal_uInt16 nItemPos, long nWidth, long nHe
else
nLastPos = 0;
- Rectangle aRect = ImplGetTabRect( nLastPos, nWidth, nHeight );
+ tools::Rectangle aRect = ImplGetTabRect( nLastPos, nWidth, nHeight );
long nW = nWidth-TAB_OFFSET*2;
long nH = nHeight-aRect.Bottom()-TAB_OFFSET*2;
aRect = (nW > 0 && nH > 0)
- ? Rectangle( Point( TAB_OFFSET, aRect.Bottom()+TAB_OFFSET ), Size( nW, nH ) )
- : Rectangle();
+ ? tools::Rectangle( Point( TAB_OFFSET, aRect.Bottom()+TAB_OFFSET ), Size( nW, nH ) )
+ : tools::Rectangle();
return aRect;
}
nWidth -= 1;
if ( (nWidth <= 0) || (nHeight <= 0) )
- return Rectangle();
+ return tools::Rectangle();
if ( mbFormat || (mnLastWidth != nWidth) || (mnLastHeight != nHeight) )
{
@@ -570,14 +570,14 @@ Rectangle TabControl::ImplGetTabRect( sal_uInt16 nItemPos, long nWidth, long nHe
bool bRet = ImplPlaceTabs( nWidth );
if ( !bRet )
- return Rectangle();
+ return tools::Rectangle();
mnLastWidth = nWidth;
mnLastHeight = nHeight;
mbFormat = false;
}
- return size_t(nItemPos) < mpTabCtrlData->maItemList.size() ? mpTabCtrlData->maItemList[nItemPos].maRect : Rectangle();
+ return size_t(nItemPos) < mpTabCtrlData->maItemList.size() ? mpTabCtrlData->maItemList[nItemPos].maRect : tools::Rectangle();
}
void TabControl::ImplChangeTabPage( sal_uInt16 nId, sal_uInt16 nOldId )
@@ -593,7 +593,7 @@ void TabControl::ImplChangeTabPage( sal_uInt16 nId, sal_uInt16 nOldId )
if ( IsReallyVisible() && IsUpdateMode() )
{
sal_uInt16 nPos = GetPagePos( nId );
- Rectangle aRect = ImplGetTabRect( nPos );
+ tools::Rectangle aRect = ImplGetTabRect( nPos );
if ( !pOldItem || !pItem || (pOldItem->mnLine != pItem->mnLine) )
{
@@ -619,7 +619,7 @@ void TabControl::ImplChangeTabPage( sal_uInt16 nId, sal_uInt16 nOldId )
if ( pOldPage == pPage )
return;
- Rectangle aRect = ImplGetTabRect( TAB_PAGERECT );
+ tools::Rectangle aRect = ImplGetTabRect( TAB_PAGERECT );
if ( pOldPage )
{
@@ -632,7 +632,7 @@ void TabControl::ImplChangeTabPage( sal_uInt16 nId, sal_uInt16 nOldId )
{
if ( ( GetStyle() & WB_NOBORDER ) )
{
- Rectangle aRectNoTab(Point(0, 0), GetSizePixel());
+ tools::Rectangle aRectNoTab(Point(0, 0), GetSizePixel());
pPage->SetPosSizePixel( aRectNoTab.TopLeft(), aRectNoTab.GetSize() );
}
else
@@ -685,11 +685,11 @@ bool TabControl::ImplPosCurTabPage()
{
if ( ( GetStyle() & WB_NOBORDER ) )
{
- Rectangle aRectNoTab(Point(0, 0), GetSizePixel());
+ tools::Rectangle aRectNoTab(Point(0, 0), GetSizePixel());
pItem->mpTabPage->SetPosSizePixel( aRectNoTab.TopLeft(), aRectNoTab.GetSize() );
return true;
}
- Rectangle aRect = ImplGetTabRect( TAB_PAGERECT );
+ tools::Rectangle aRect = ImplGetTabRect( TAB_PAGERECT );
pItem->mpTabPage->SetPosSizePixel( aRect.TopLeft(), aRect.GetSize() );
return true;
}
@@ -720,7 +720,7 @@ void TabControl::ImplShowFocus()
return;
sal_uInt16 nCurPos = GetPagePos( mnCurPageId );
- Rectangle aRect = ImplGetTabRect( nCurPos );
+ tools::Rectangle aRect = ImplGetTabRect( nCurPos );
const ImplTabItem& rItem = mpTabCtrlData->maItemList[ nCurPos ];
Size aTabSize = aRect.GetSize();
Size aImageSize( 0, 0 );
@@ -764,14 +764,14 @@ void TabControl::ImplShowFocus()
ShowFocus( aRect );
}
-void TabControl::ImplDrawItem(vcl::RenderContext& rRenderContext, ImplTabItem* pItem, const Rectangle& rCurRect,
+void TabControl::ImplDrawItem(vcl::RenderContext& rRenderContext, ImplTabItem* pItem, const tools::Rectangle& rCurRect,
bool bFirstInGroup, bool bLastInGroup, bool /* bIsCurrentItem */ )
{
if (pItem->maRect.IsEmpty())
return;
const StyleSettings& rStyleSettings = rRenderContext.GetSettings().GetStyleSettings();
- Rectangle aRect = pItem->maRect;
+ tools::Rectangle aRect = pItem->maRect;
long nLeftBottom = aRect.Bottom();
long nRightBottom = aRect.Bottom();
bool bLeftBorder = true;
@@ -844,7 +844,7 @@ void TabControl::ImplDrawItem(vcl::RenderContext& rRenderContext, ImplTabItem* p
bNativeOK = rRenderContext.IsNativeControlSupported(ControlType::TabItem, ControlPart::Entire);
if ( bNativeOK )
{
- TabitemValue tiValue(Rectangle(pItem->maRect.Left() + TAB_TABOFFSET_X,
+ TabitemValue tiValue(tools::Rectangle(pItem->maRect.Left() + TAB_TABOFFSET_X,
pItem->maRect.Top() + TAB_TABOFFSET_Y,
pItem->maRect.Right() - TAB_TABOFFSET_X,
pItem->maRect.Bottom() - TAB_TABOFFSET_Y));
@@ -857,7 +857,7 @@ void TabControl::ImplDrawItem(vcl::RenderContext& rRenderContext, ImplTabItem* p
if (bLastInGroup)
tiValue.mnAlignment |= TabitemFlags::LastInGroup;
- Rectangle aCtrlRegion( pItem->maRect );
+ tools::Rectangle aCtrlRegion( pItem->maRect );
bNativeOK = rRenderContext.DrawNativeControl(ControlType::TabItem, ControlPart::Entire,
aCtrlRegion, nState, tiValue, OUString() );
}
@@ -940,7 +940,7 @@ void TabControl::ImplDrawItem(vcl::RenderContext& rRenderContext, ImplTabItem* p
Color aOldColor(rRenderContext.GetTextColor());
rRenderContext.SetTextColor(aColor);
- const Rectangle aOutRect(nXPos + aImageSize.Width(), nYPos,
+ const tools::Rectangle aOutRect(nXPos + aImageSize.Width(), nYPos,
nXPos + aImageSize.Width() + nTextWidth, nYPos + nTextHeight);
DrawControlText(rRenderContext, aOutRect, pItem->maFormatText, nStyle,
nullptr, nullptr);
@@ -1041,18 +1041,18 @@ void TabControl::KeyInput( const KeyEvent& rKEvt )
Control::KeyInput( rKEvt );
}
-void TabControl::Paint( vcl::RenderContext& rRenderContext, const Rectangle& rRect)
+void TabControl::Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect)
{
if (!(GetStyle() & WB_NOBORDER))
ImplPaint(rRenderContext, rRect);
}
-void TabControl::ImplPaint(vcl::RenderContext& rRenderContext, const Rectangle& rRect)
+void TabControl::ImplPaint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect)
{
HideFocus();
// reformat if needed
- Rectangle aRect = ImplGetTabRect(TAB_PAGERECT);
+ tools::Rectangle aRect = ImplGetTabRect(TAB_PAGERECT);
// find current item
ImplTabItem* pCurItem = nullptr;
@@ -1068,7 +1068,7 @@ void TabControl::ImplPaint(vcl::RenderContext& rRenderContext, const Rectangle&
// Draw the TabPage border
const StyleSettings& rStyleSettings = rRenderContext.GetSettings().GetStyleSettings();
- Rectangle aCurRect;
+ tools::Rectangle aCurRect;
aRect.Left() -= TAB_OFFSET;
aRect.Top() -= TAB_OFFSET;
aRect.Right() += TAB_OFFSET;
@@ -1110,7 +1110,7 @@ void TabControl::ImplPaint(vcl::RenderContext& rRenderContext, const Rectangle&
if (rRenderContext.IsNativeControlSupported(ControlType::TabHeader, ControlPart::Entire))
{
- Rectangle aHeaderRect(aRect.Left(), 0, aRect.Right(), aRect.Top());
+ tools::Rectangle aHeaderRect(aRect.Left(), 0, aRect.Right(), aRect.Top());
aClipRgn = rRenderContext.GetActiveClipRegion();
aClipRgn.Intersect(aHeaderRect);
@@ -1280,7 +1280,7 @@ void TabControl::setAllocation(const Size &rAllocation)
if ( mbSmallInvalidate )
{
- Rectangle aRect = ImplGetTabRect( TAB_PAGERECT );
+ tools::Rectangle aRect = ImplGetTabRect( TAB_PAGERECT );
aRect.Left() -= TAB_OFFSET+TAB_BORDER_LEFT;
aRect.Top() -= TAB_OFFSET+TAB_BORDER_TOP;
aRect.Right() += TAB_OFFSET+TAB_BORDER_RIGHT;
@@ -1363,7 +1363,7 @@ void TabControl::RequestHelp( const HelpEvent& rHEvt )
OUString aStr = GetHelpText( nItemId );
if ( !aStr.isEmpty() )
{
- Rectangle aItemRect = ImplGetTabRect( GetPagePos( nItemId ) );
+ tools::Rectangle aItemRect = ImplGetTabRect( GetPagePos( nItemId ) );
Point aPt = OutputToScreenPixel( aItemRect.TopLeft() );
aItemRect.Left() = aPt.X();
aItemRect.Top() = aPt.Y();
@@ -1394,7 +1394,7 @@ void TabControl::RequestHelp( const HelpEvent& rHEvt )
const OUString& rStr = pItem->maText;
if ( rStr != pItem->maFormatText )
{
- Rectangle aItemRect = ImplGetTabRect( GetPagePos( nItemId ) );
+ tools::Rectangle aItemRect = ImplGetTabRect( GetPagePos( nItemId ) );
Point aPt = OutputToScreenPixel( aItemRect.TopLeft() );
aItemRect.Left() = aPt.X();
aItemRect.Top() = aPt.Y();
@@ -1419,7 +1419,7 @@ void TabControl::RequestHelp( const HelpEvent& rHEvt )
// show tooltip if not text but image is set and helptext is available
if ( !rHelpText.isEmpty() && pItem->maText.isEmpty() && !!pItem->maTabImage )
{
- Rectangle aItemRect = ImplGetTabRect( GetPagePos( nItemId ) );
+ tools::Rectangle aItemRect = ImplGetTabRect( GetPagePos( nItemId ) );
Point aPt = OutputToScreenPixel( aItemRect.TopLeft() );
aItemRect.Left() = aPt.X();
aItemRect.Top() = aPt.Y();
@@ -1521,7 +1521,7 @@ void TabControl::DataChanged( const DataChangedEvent& rDCEvt )
}
}
-Rectangle* TabControl::ImplFindPartRect( const Point& rPt )
+tools::Rectangle* TabControl::ImplFindPartRect( const Point& rPt )
{
ImplTabItem* pFoundItem = nullptr;
int nFound = 0;
@@ -1550,8 +1550,8 @@ bool TabControl::PreNotify( NotifyEvent& rNEvt )
// trigger redraw if mouse over state has changed
if( IsNativeControlSupported(ControlType::TabItem, ControlPart::Entire) )
{
- Rectangle* pRect = ImplFindPartRect( GetPointerPosPixel() );
- Rectangle* pLastRect = ImplFindPartRect( GetLastPointerPosPixel() );
+ tools::Rectangle* pRect = ImplFindPartRect( GetPointerPosPixel() );
+ tools::Rectangle* pLastRect = ImplFindPartRect( GetLastPointerPosPixel() );
if( pRect != pLastRect || (pMouseEvt->IsLeaveWindow() || pMouseEvt->IsEnterWindow()) )
{
vcl::Region aClipRgn;
@@ -1560,7 +1560,7 @@ bool TabControl::PreNotify( NotifyEvent& rNEvt )
// allow for slightly bigger tabitems
// as used by gtk
// TODO: query for the correct sizes
- Rectangle aRect(*pLastRect);
+ tools::Rectangle aRect(*pLastRect);
aRect.Left()-=2;
aRect.Right()+=2;
aRect.Top()-=3;
@@ -1571,7 +1571,7 @@ bool TabControl::PreNotify( NotifyEvent& rNEvt )
// allow for slightly bigger tabitems
// as used by gtk
// TODO: query for the correct sizes
- Rectangle aRect(*pRect);
+ tools::Rectangle aRect(*pRect);
aRect.Left()-=2;
aRect.Right()+=2;
aRect.Top()-=3;
@@ -1613,7 +1613,7 @@ void TabControl::SetTabPageSizePixel( const Size& rSize )
Size aNewSize( rSize );
aNewSize.Width() += TAB_OFFSET*2;
- Rectangle aRect = ImplGetTabRect( TAB_PAGERECT,
+ tools::Rectangle aRect = ImplGetTabRect( TAB_PAGERECT,
aNewSize.Width(), aNewSize.Height() );
aNewSize.Height() += aRect.Top()+TAB_OFFSET;
Window::SetOutputSizePixel( aNewSize );
@@ -1621,7 +1621,7 @@ void TabControl::SetTabPageSizePixel( const Size& rSize )
Size TabControl::GetTabPageSizePixel() const
{
- Rectangle aRect = const_cast<TabControl*>(this)->ImplGetTabRect( TAB_PAGERECT );
+ tools::Rectangle aRect = const_cast<TabControl*>(this)->ImplGetTabRect( TAB_PAGERECT );
return aRect.GetSize();
}
@@ -2026,9 +2026,9 @@ void TabControl::SetPageImage( sal_uInt16 i_nPageId, const Image& i_rImage )
}
}
-Rectangle TabControl::GetCharacterBounds( sal_uInt16 nPageId, long nIndex ) const
+tools::Rectangle TabControl::GetCharacterBounds( sal_uInt16 nPageId, long nIndex ) const
{
- Rectangle aRet;
+ tools::Rectangle aRet;
if( !HasLayoutData() || ! mpTabCtrlData->maLayoutPageIdToLine.size() )
FillLayoutData();
@@ -2085,9 +2085,9 @@ void TabControl::FillLayoutData() const
const_cast<TabControl*>(this)->Invalidate();
}
-Rectangle TabControl::GetTabBounds( sal_uInt16 nPageId ) const
+tools::Rectangle TabControl::GetTabBounds( sal_uInt16 nPageId ) const
{
- Rectangle aRet;
+ tools::Rectangle aRet;
ImplTabItem* pItem = ImplGetItem( nPageId );
if(pItem)
@@ -2157,7 +2157,7 @@ Size TabControl::calculateRequisition() const
TabControl* pThis = const_cast<TabControl*>(this);
sal_uInt16 nPos = it - mpTabCtrlData->maItemList.begin();
- Rectangle aTabRect = pThis->ImplGetTabRect(nPos, aOptimalPageSize.Width(), LONG_MAX);
+ tools::Rectangle aTabRect = pThis->ImplGetTabRect(nPos, aOptimalPageSize.Width(), LONG_MAX);
if (aTabRect.Bottom() > nTabLabelsBottom)
nTabLabelsBottom = aTabRect.Bottom();
if (aTabRect.Right() > nTabLabelsRight)
@@ -2419,7 +2419,7 @@ bool NotebookbarTabControlBase::ImplPlaceTabs( long nWidth )
if( !it->maText.isEmpty() && aSize.getWidth() < 100)
aSize.Width() = 100;
- Rectangle aNewRect( Point( nX, nY ), aSize );
+ tools::Rectangle aNewRect( Point( nX, nY ), aSize );
if ( mbSmallInvalidate && (it->maRect != aNewRect) )
mbSmallInvalidate = false;
@@ -2539,12 +2539,12 @@ bool NotebookbarTabControlBase::ImplPlaceTabs( long nWidth )
return true;
}
-void NotebookbarTabControlBase::ImplPaint(vcl::RenderContext& rRenderContext, const Rectangle& rRect)
+void NotebookbarTabControlBase::ImplPaint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect)
{
HideFocus();
// reformat if needed
- Rectangle aRect = ImplGetTabRect(TAB_PAGERECT);
+ tools::Rectangle aRect = ImplGetTabRect(TAB_PAGERECT);
// find current item
ImplTabItem* pCurItem = nullptr;
@@ -2560,7 +2560,7 @@ void NotebookbarTabControlBase::ImplPaint(vcl::RenderContext& rRenderContext, co
// Draw the TabPage border
const StyleSettings& rStyleSettings = rRenderContext.GetSettings().GetStyleSettings();
- Rectangle aCurRect;
+ tools::Rectangle aCurRect;
aRect.Left() -= TAB_OFFSET;
aRect.Top() -= TAB_OFFSET;
aRect.Right() += TAB_OFFSET;
@@ -2602,7 +2602,7 @@ void NotebookbarTabControlBase::ImplPaint(vcl::RenderContext& rRenderContext, co
if (rRenderContext.IsNativeControlSupported(ControlType::TabHeader, ControlPart::Entire))
{
- Rectangle aHeaderRect(aRect.Left(), 0, aRect.Right(), aRect.Top());
+ tools::Rectangle aHeaderRect(aRect.Left(), 0, aRect.Right(), aRect.Top());
aClipRgn = rRenderContext.GetActiveClipRegion();
aClipRgn.Intersect(aHeaderRect);
@@ -2781,7 +2781,7 @@ Size NotebookbarTabControlBase::calculateRequisition() const
NotebookbarTabControlBase* pThis = const_cast<NotebookbarTabControlBase*>(this);
sal_uInt16 nPos = it - mpTabCtrlData->maItemList.begin();
- Rectangle aTabRect = pThis->ImplGetTabRect(nPos, aOptimalPageSize.Width(), LONG_MAX);
+ tools::Rectangle aTabRect = pThis->ImplGetTabRect(nPos, aOptimalPageSize.Width(), LONG_MAX);
if (aTabRect.Bottom() > nTabLabelsBottom)
{
nTabLabelsBottom = aTabRect.Bottom();
diff --git a/vcl/source/edit/texteng.cxx b/vcl/source/edit/texteng.cxx
index 5ff7af0e9d29..b143b93835f9 100644
--- a/vcl/source/edit/texteng.cxx
+++ b/vcl/source/edit/texteng.cxx
@@ -841,11 +841,11 @@ TextPaM TextEngine::ImpInsertParaBreak( const TextPaM& rPaM )
return aPaM;
}
-Rectangle TextEngine::PaMtoEditCursor( const TextPaM& rPaM, bool bSpecial )
+tools::Rectangle TextEngine::PaMtoEditCursor( const TextPaM& rPaM, bool bSpecial )
{
SAL_WARN_IF( !GetUpdateMode(), "vcl", "PaMtoEditCursor: GetUpdateMode()" );
- Rectangle aEditCursor;
+ tools::Rectangle aEditCursor;
long nY = 0;
if ( !mbHasMultiLineParas )
@@ -867,7 +867,7 @@ Rectangle TextEngine::PaMtoEditCursor( const TextPaM& rPaM, bool bSpecial )
return aEditCursor;
}
-Rectangle TextEngine::GetEditCursor( const TextPaM& rPaM, bool bSpecial, bool bPreferPortionStart )
+tools::Rectangle TextEngine::GetEditCursor( const TextPaM& rPaM, bool bSpecial, bool bPreferPortionStart )
{
if ( !IsFormatted() && !IsFormatting() )
FormatAndUpdate();
@@ -906,7 +906,7 @@ Rectangle TextEngine::GetEditCursor( const TextPaM& rPaM, bool bSpecial, bool bP
nY -= mnCharHeight;
}
- Rectangle aEditCursor;
+ tools::Rectangle aEditCursor;
aEditCursor.Top() = nY;
nY += mnCharHeight;
@@ -1475,9 +1475,9 @@ void TextEngine::UpdateViews( TextView* pCurView )
{
pView->HideCursor();
- Rectangle aClipRect( maInvalidRect );
+ tools::Rectangle aClipRect( maInvalidRect );
const Size aOutSz = pView->GetWindow()->GetOutputSizePixel();
- const Rectangle aVisArea( pView->GetStartDocPos(), aOutSz );
+ const tools::Rectangle aVisArea( pView->GetStartDocPos(), aOutSz );
aClipRect.Intersection( aVisArea );
if ( !aClipRect.IsEmpty() )
{
@@ -1496,7 +1496,7 @@ void TextEngine::UpdateViews( TextView* pCurView )
pCurView->ShowCursor( pCurView->IsAutoScroll() );
}
- maInvalidRect = Rectangle();
+ maInvalidRect = tools::Rectangle();
}
IMPL_LINK_NOARG(TextEngine, IdleFormatHdl, Timer *, void)
@@ -1532,7 +1532,7 @@ void TextEngine::FormatDoc()
long nY = 0;
bool bGrow = false;
- maInvalidRect = Rectangle(); // clear
+ maInvalidRect = tools::Rectangle(); // clear
for ( sal_uInt32 nPara = 0; nPara < mpTEParaPortions->Count(); ++nPara )
{
TEParaPortion* pTEParaPortion = mpTEParaPortions->GetObject( nPara );
@@ -1553,7 +1553,7 @@ void TextEngine::FormatDoc()
? mnMaxTextWidth
: std::numeric_limits<long>::max();
const Range aInvRange( GetInvalidYOffsets( nPara ) );
- maInvalidRect = Rectangle( Point( 0, nY+aInvRange.Min() ),
+ maInvalidRect = tools::Rectangle( Point( 0, nY+aInvRange.Min() ),
Size( nWidth, aInvRange.Len() ) );
}
else
@@ -1904,7 +1904,7 @@ void TextEngine::RecalcTextPortion( sal_uInt32 nPara, sal_Int32 nStartPos, sal_I
}
}
-void TextEngine::ImpPaint( OutputDevice* pOutDev, const Point& rStartPos, Rectangle const* pPaintArea, TextSelection const* pSelection )
+void TextEngine::ImpPaint( OutputDevice* pOutDev, const Point& rStartPos, tools::Rectangle const* pPaintArea, TextSelection const* pSelection )
{
if ( !GetUpdateMode() )
return;
@@ -2035,7 +2035,7 @@ void TextEngine::ImpPaint( OutputDevice* pOutDev, const Point& rStartPos, Rectan
// for HideSelection() only Range, pSelection = 0.
if ( pSelStart )
{
- const Rectangle aTabArea( aTmpPos, Point( aTmpPos.X()+nTxtWidth, aTmpPos.Y()+mnCharHeight-1 ) );
+ const tools::Rectangle aTabArea( aTmpPos, Point( aTmpPos.X()+nTxtWidth, aTmpPos.Y()+mnCharHeight-1 ) );
bool bDone = false;
if ( pSelStart )
{
diff --git a/vcl/source/edit/textview.cxx b/vcl/source/edit/textview.cxx
index bbb842ed9d04..cff429cdb828 100644
--- a/vcl/source/edit/textview.cxx
+++ b/vcl/source/edit/textview.cxx
@@ -292,7 +292,7 @@ void TextView::DeleteSelected()
ShowCursor();
}
-void TextView::ImpPaint(vcl::RenderContext& rRenderContext, const Point& rStartPos, Rectangle const* pPaintArea, TextSelection const* pSelection)
+void TextView::ImpPaint(vcl::RenderContext& rRenderContext, const Point& rStartPos, tools::Rectangle const* pPaintArea, TextSelection const* pSelection)
{
if (!mpImpl->mbPaintSelection)
{
@@ -317,12 +317,12 @@ void TextView::ImpPaint(vcl::RenderContext& rRenderContext, const Point& rStartP
mpImpl->mpTextEngine->ImpPaint(&rRenderContext, rStartPos, pPaintArea, pSelection);
}
-void TextView::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect)
+void TextView::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect)
{
ImpPaint(rRenderContext, rRect);
}
-void TextView::ImpPaint(vcl::RenderContext& rRenderContext, const Rectangle& rRect)
+void TextView::ImpPaint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect)
{
if ( !mpImpl->mpTextEngine->GetUpdateMode() || mpImpl->mpTextEngine->IsInUndo() )
return;
@@ -347,7 +347,7 @@ void TextView::ImpHighlight( const TextSelection& rSel )
SAL_WARN_IF( mpImpl->mpTextEngine->mpIdleFormatter->IsActive(), "vcl", "ImpHighlight: Not formatted!" );
- Rectangle aVisArea( mpImpl->maStartDocPos, mpImpl->mpWindow->GetOutputSizePixel() );
+ tools::Rectangle aVisArea( mpImpl->maStartDocPos, mpImpl->mpWindow->GetOutputSizePixel() );
long nY = 0;
const sal_uInt32 nStartPara = aSel.GetStart().GetPara();
const sal_uInt32 nEndPara = aSel.GetEnd().GetPara();
@@ -379,7 +379,7 @@ void TextView::ImpHighlight( const TextSelection& rSel )
if ( nEndIndex < nStartIndex )
nEndIndex = nStartIndex;
- Rectangle aTmpRect( mpImpl->mpTextEngine->GetEditCursor( TextPaM( nPara, nStartIndex ), false ) );
+ tools::Rectangle aTmpRect( mpImpl->mpTextEngine->GetEditCursor( TextPaM( nPara, nStartIndex ), false ) );
aTmpRect.Top() += nY;
aTmpRect.Bottom() += nY;
Point aTopLeft( aTmpRect.TopLeft() );
@@ -396,7 +396,7 @@ void TextView::ImpHighlight( const TextSelection& rSel )
Point aPnt1( GetWindowPos( aTopLeft ) );
Point aPnt2( GetWindowPos( aBottomRight ) );
- Rectangle aRect( aPnt1, aPnt2 );
+ tools::Rectangle aRect( aPnt1, aPnt2 );
mpImpl->mpWindow->Invert( aRect );
}
}
@@ -941,7 +941,7 @@ void TextView::Command( const CommandEvent& rCEvt )
if ( mpImpl->mpTextEngine->mpIMEInfos && mpImpl->mpTextEngine->mpIMEInfos->nLen )
{
TextPaM aPaM( GetSelection().GetEnd() );
- Rectangle aR1 = mpImpl->mpTextEngine->PaMtoEditCursor( aPaM );
+ tools::Rectangle aR1 = mpImpl->mpTextEngine->PaMtoEditCursor( aPaM );
sal_Int32 nInputEnd = mpImpl->mpTextEngine->mpIMEInfos->aPos.GetIndex() + mpImpl->mpTextEngine->mpIMEInfos->nLen;
@@ -953,7 +953,7 @@ void TextView::Command( const CommandEvent& rCEvt )
TextLine& rLine = pParaPortion->GetLines()[ nLine ];
if ( nInputEnd > rLine.GetEnd() )
nInputEnd = rLine.GetEnd();
- Rectangle aR2 = mpImpl->mpTextEngine->PaMtoEditCursor( TextPaM( aPaM.GetPara(), nInputEnd ) );
+ tools::Rectangle aR2 = mpImpl->mpTextEngine->PaMtoEditCursor( TextPaM( aPaM.GetPara(), nInputEnd ) );
long nWidth = aR2.Left()-aR1.Right();
aR1.Move( -GetStartDocPos().X(), -GetStartDocPos().Y() );
@@ -1568,7 +1568,7 @@ TextPaM TextView::CursorEndOfDoc()
TextPaM TextView::PageUp( const TextPaM& rPaM )
{
- Rectangle aRect = mpImpl->mpTextEngine->PaMtoEditCursor( rPaM );
+ tools::Rectangle aRect = mpImpl->mpTextEngine->PaMtoEditCursor( rPaM );
Point aTopLeft = aRect.TopLeft();
aTopLeft.Y() -= mpImpl->mpWindow->GetOutputSizePixel().Height() * 9/10;
aTopLeft.X() += 1;
@@ -1581,7 +1581,7 @@ TextPaM TextView::PageUp( const TextPaM& rPaM )
TextPaM TextView::PageDown( const TextPaM& rPaM )
{
- Rectangle aRect = mpImpl->mpTextEngine->PaMtoEditCursor( rPaM );
+ tools::Rectangle aRect = mpImpl->mpTextEngine->PaMtoEditCursor( rPaM );
Point aBottomRight = aRect.BottomRight();
aBottomRight.Y() += mpImpl->mpWindow->GetOutputSizePixel().Height() * 9/10;
aBottomRight.X() += 1;
@@ -1607,7 +1607,7 @@ void TextView::ImpShowCursor( bool bGotoCursor, bool bForceVisCursor, bool bSpec
mpImpl->mpTextEngine->FormatAndUpdate( this );
TextPaM aPaM( mpImpl->maSelection.GetEnd() );
- Rectangle aEditCursor = mpImpl->mpTextEngine->PaMtoEditCursor( aPaM, bSpecial );
+ tools::Rectangle aEditCursor = mpImpl->mpTextEngine->PaMtoEditCursor( aPaM, bSpecial );
// Remember that we placed the cursor behind the last character of a line
mpImpl->mbCursorAtEndOfLine = false;
@@ -1814,7 +1814,7 @@ void TextView::ImpShowDDCursor()
{
if ( !mpImpl->mpDDInfo->mbVisCursor )
{
- Rectangle aCursor = mpImpl->mpTextEngine->PaMtoEditCursor( mpImpl->mpDDInfo->maDropPos, true );
+ tools::Rectangle aCursor = mpImpl->mpTextEngine->PaMtoEditCursor( mpImpl->mpDDInfo->maDropPos, true );
aCursor.Right()++;
aCursor.SetPos( GetWindowPos( aCursor.TopLeft() ) );
diff --git a/vcl/source/edit/vclmedit.cxx b/vcl/source/edit/vclmedit.cxx
index 46319e33cfdf..4301ae5c167c 100644
--- a/vcl/source/edit/vclmedit.cxx
+++ b/vcl/source/edit/vclmedit.cxx
@@ -59,7 +59,7 @@ public:
virtual void Command( const CommandEvent& rCEvt ) override;
- virtual void Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) override;
+ virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) override;
virtual void Resize() override;
virtual void GetFocus() override;
@@ -805,7 +805,7 @@ void TextWindow::KeyInput( const KeyEvent& rKEvent )
Window::KeyInput( rKEvent );
}
-void TextWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect)
+void TextWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect)
{
mpExtTextView->Paint(rRenderContext, rRect);
}
@@ -1393,7 +1393,7 @@ void VclMultiLineEdit::Draw( OutputDevice* pDev, const Point& rPos, const Size&
bool bBackground = !(nFlags & DrawFlags::NoBackground) && IsControlBackground();
if ( bBorder || bBackground )
{
- Rectangle aRect( aPos, aSize );
+ tools::Rectangle aRect( aPos, aSize );
if ( bBorder )
{
DecorationView aDecoView( pDev );
@@ -1435,7 +1435,7 @@ void VclMultiLineEdit::Draw( OutputDevice* pDev, const Point& rPos, const Size&
// Clipping?
if ( ( nOffY < 0 ) || ( (nOffY+aTextSz.Height()) > aSize.Height() ) || ( (nOffX+aTextSz.Width()) > aSize.Width() ) )
{
- Rectangle aClip( aPos, aSize );
+ tools::Rectangle aClip( aPos, aSize );
if ( aTextSz.Height() > aSize.Height() )
aClip.Bottom() += aTextSz.Height() - aSize.Height() + 1; // so that HP-printer does not 'optimize-away'
pDev->IntersectClipRegion( aClip );
diff --git a/vcl/source/filter/jpeg/JpegReader.cxx b/vcl/source/filter/jpeg/JpegReader.cxx
index 86dda22fc806..58a79babeb46 100644
--- a/vcl/source/filter/jpeg/JpegReader.cxx
+++ b/vcl/source/filter/jpeg/JpegReader.cxx
@@ -249,7 +249,7 @@ Graphic JPEGReader::CreateIntermediateGraphic(long nLines)
{
Bitmap::ScopedWriteAccess pAccess(maIncompleteAlpha);
pAccess->SetFillColor(Color(COL_BLACK));
- pAccess->FillRect(Rectangle(Point(0, mnLastLines), Size(pAccess->Width(), nNewLines)));
+ pAccess->FillRect(tools::Rectangle(Point(0, mnLastLines), Size(pAccess->Width(), nNewLines)));
}
aGraphic = BitmapEx(maBitmap, maIncompleteAlpha);
diff --git a/vcl/source/filter/sgfbram.cxx b/vcl/source/filter/sgfbram.cxx
index 335ee7017623..5f9f6d551847 100644
--- a/vcl/source/filter/sgfbram.cxx
+++ b/vcl/source/filter/sgfbram.cxx
@@ -435,7 +435,7 @@ bool SgfFilterVect(SvStream& rInp, SgfHeader& rHead, SgfEntry&, GDIMetaFile& rMt
aOutDev->DrawLine(aP0,aP1); break; // line
case 2: break; // circle
case 3: break; // text
- case 5: aOutDev->DrawRect(Rectangle(aP0,aP1)); break; // rectangle (solid)
+ case 5: aOutDev->DrawRect(tools::Rectangle(aP0,aP1)); break; // rectangle (solid)
}
}
aP0=aP1;
diff --git a/vcl/source/filter/sgvmain.cxx b/vcl/source/filter/sgvmain.cxx
index 0bfc0a3ef74e..55ebb2ff9853 100644
--- a/vcl/source/filter/sgvmain.cxx
+++ b/vcl/source/filter/sgvmain.cxx
@@ -442,7 +442,7 @@ void DrawSlideRect(sal_Int16 x1, sal_Int16 y1, sal_Int16 x2, sal_Int16 y2, ObjAr
Int1=100-F.FIntens; Int2=F.FIntens;
if (Int1==Int2) {
SgfAreaColorIntens(F.FMuster,(sal_uInt8)Col1,(sal_uInt8)Col2,(sal_uInt8)Int2,rOut);
- rOut.DrawRect(Rectangle(x1,y1,x2,y2));
+ rOut.DrawRect(tools::Rectangle(x1,y1,x2,y2));
} else {
b0=Int1;
switch (F.FBFarbe & 0x38) {
@@ -453,13 +453,13 @@ void DrawSlideRect(sal_Int16 x1, sal_Int16 y1, sal_Int16 x2, sal_Int16 y2, ObjAr
b=Int1+sal_Int16((sal_Int32)(Int2-Int1)*(sal_Int32)(i-y1) /(sal_Int32)(y2-y1+1));
if (b!=b0) {
SgfAreaColorIntens(F.FMuster,(sal_uInt8)Col1,(sal_uInt8)Col2,(sal_uInt8)b0,rOut);
- rOut.DrawRect(Rectangle(x1,i0,x2,i-1));
+ rOut.DrawRect(tools::Rectangle(x1,i0,x2,i-1));
i0=i; b0=b;
}
i++;
}
SgfAreaColorIntens(F.FMuster,(sal_uInt8)Col1,(sal_uInt8)Col2,(sal_uInt8)Int2,rOut);
- rOut.DrawRect(Rectangle(x1,i0,x2,y2));
+ rOut.DrawRect(tools::Rectangle(x1,i0,x2,y2));
} break;
case 0x28: { // horizontal
i0=x1;
@@ -468,20 +468,20 @@ void DrawSlideRect(sal_Int16 x1, sal_Int16 y1, sal_Int16 x2, sal_Int16 y2, ObjAr
b=Int1+sal_Int16((sal_Int32)(Int2-Int1)*(sal_Int32)(i-x1) /(sal_Int32)(x2-x1+1));
if (b!=b0) {
SgfAreaColorIntens(F.FMuster,(sal_uInt8)Col1,(sal_uInt8)Col2,(sal_uInt8)b0,rOut);
- rOut.DrawRect(Rectangle(i0,y1,i-1,y2));
+ rOut.DrawRect(tools::Rectangle(i0,y1,i-1,y2));
i0=i; b0=b;
}
i++;
}
SgfAreaColorIntens(F.FMuster,(sal_uInt8)Col1,(sal_uInt8)Col2,(sal_uInt8)Int2,rOut);
- rOut.DrawRect(Rectangle(i0,y1,x2,y2));
+ rOut.DrawRect(tools::Rectangle(i0,y1,x2,y2));
} break;
case 0x18: case 0x38: { // circle
vcl::Region ClipMerk=rOut.GetClipRegion();
double a;
- rOut.SetClipRegion(vcl::Region(Rectangle(x1,y1,x2,y2)));
+ rOut.SetClipRegion(vcl::Region(tools::Rectangle(x1,y1,x2,y2)));
cx=(x1+x2) /2;
cy=(y1+y2) /2;
dx=x2-x1+1;
@@ -495,13 +495,13 @@ void DrawSlideRect(sal_Int16 x1, sal_Int16 y1, sal_Int16 x2, sal_Int16 y2, ObjAr
b=Int1+sal_Int16((sal_Int32(Int2-Int1)*sal_Int32(i)) /sal_Int32(MaxR));
if (b!=b0) {
SgfAreaColorIntens(F.FMuster,(sal_uInt8)Col1,(sal_uInt8)Col2,(sal_uInt8)b0,rOut);
- rOut.DrawEllipse(Rectangle(cx-i0,cy-i0,cx+i0,cy+i0));
+ rOut.DrawEllipse(tools::Rectangle(cx-i0,cy-i0,cx+i0,cy+i0));
i0=i; b0=b;
}
i--;
}
SgfAreaColorIntens(F.FMuster,(sal_uInt8)Col1,(sal_uInt8)Col2,(sal_uInt8)Int1,rOut);
- rOut.DrawEllipse(Rectangle(cx-i0,cy-i0,cx+i0,cy+i0));
+ rOut.DrawEllipse(tools::Rectangle(cx-i0,cy-i0,cx+i0,cy+i0));
rOut.SetClipRegion(ClipMerk);
} break; // circle
}
@@ -515,13 +515,13 @@ void RectType::Draw(OutputDevice& rOut)
if (RotationAngle==0) {
if ((F.FBFarbe & 0x38)==0 || Radius!=0) {
SetLine(L,rOut);
- rOut.DrawRect(Rectangle(Pos1.x,Pos1.y,Pos2.x,Pos2.y),Radius,Radius);
+ rOut.DrawRect(tools::Rectangle(Pos1.x,Pos1.y,Pos2.x,Pos2.y),Radius,Radius);
} else {
DrawSlideRect(Pos1.x,Pos1.y,Pos2.x,Pos2.y,F,rOut);
if (L.LMuster!=0) {
SetLine(L,rOut);
rOut.SetFillColor();
- rOut.DrawRect(Rectangle(Pos1.x,Pos1.y,Pos2.x,Pos2.y));
+ rOut.DrawRect(tools::Rectangle(Pos1.x,Pos1.y,Pos2.x,Pos2.y));
}
}
} else {
@@ -590,7 +590,7 @@ void DrawSlideCirc(sal_Int16 cx, sal_Int16 cy, sal_Int16 rx, sal_Int16 ry, ObjAr
Int1=100-F.FIntens; Int2=F.FIntens;
if (Int1==Int2) {
SgfAreaColorIntens(F.FMuster,(sal_uInt8)Col1,(sal_uInt8)Col2,(sal_uInt8)Int2,rOut);
- rOut.DrawEllipse(Rectangle(x1,y1,x2,y2));
+ rOut.DrawEllipse(tools::Rectangle(x1,y1,x2,y2));
} else {
b0=Int1;
switch (F.FBFarbe & 0x38) {
@@ -602,15 +602,15 @@ void DrawSlideCirc(sal_Int16 cx, sal_Int16 cy, sal_Int16 rx, sal_Int16 ry, ObjAr
b=Int1+sal_Int16((sal_Int32)(Int2-Int1)*(sal_Int32)(i-y1) /(sal_Int32)(y2-y1+1));
if (b!=b0) {
SgfAreaColorIntens(F.FMuster,(sal_uInt8)Col1,(sal_uInt8)Col2,(sal_uInt8)b0,rOut);
- rOut.SetClipRegion(vcl::Region(Rectangle(x1,i0,x2,i-1)));
- rOut.DrawEllipse(Rectangle(x1,y1,x2,y2));
+ rOut.SetClipRegion(vcl::Region(tools::Rectangle(x1,i0,x2,i-1)));
+ rOut.DrawEllipse(tools::Rectangle(x1,y1,x2,y2));
i0=i; b0=b;
}
i++;
}
SgfAreaColorIntens(F.FMuster,(sal_uInt8)Col1,(sal_uInt8)Col2,(sal_uInt8)Int2,rOut);
- rOut.SetClipRegion(vcl::Region(Rectangle(x1,i0,x2,y2)));
- rOut.DrawEllipse(Rectangle(x1,y1,x2,y2));
+ rOut.SetClipRegion(vcl::Region(tools::Rectangle(x1,i0,x2,y2)));
+ rOut.DrawEllipse(tools::Rectangle(x1,y1,x2,y2));
rOut.SetClipRegion(ClipMerk);
} break;
case 0x28: { // horizontal
@@ -621,15 +621,15 @@ void DrawSlideCirc(sal_Int16 cx, sal_Int16 cy, sal_Int16 rx, sal_Int16 ry, ObjAr
b=Int1+sal_Int16((sal_Int32)(Int2-Int1)*(sal_Int32)(i-x1) /(sal_Int32)(x2-x1+1));
if (b!=b0) {
SgfAreaColorIntens(F.FMuster,(sal_uInt8)Col1,(sal_uInt8)Col2,(sal_uInt8)b0,rOut);
- rOut.SetClipRegion(vcl::Region(Rectangle(i0,y1,i-1,y2)));
- rOut.DrawEllipse(Rectangle(x1,y1,x2,y2));
+ rOut.SetClipRegion(vcl::Region(tools::Rectangle(i0,y1,i-1,y2)));
+ rOut.DrawEllipse(tools::Rectangle(x1,y1,x2,y2));
i0=i; b0=b;
}
i++;
}
SgfAreaColorIntens(F.FMuster,(sal_uInt8)Col1,(sal_uInt8)Col2,(sal_uInt8)Int2,rOut);
- rOut.SetClipRegion(vcl::Region(Rectangle(i0,y1,x2,y2)));
- rOut.DrawEllipse(Rectangle(x1,y1,x2,y2));
+ rOut.SetClipRegion(vcl::Region(tools::Rectangle(i0,y1,x2,y2)));
+ rOut.DrawEllipse(tools::Rectangle(x1,y1,x2,y2));
rOut.SetClipRegion(ClipMerk);
} break;
@@ -648,13 +648,13 @@ void DrawSlideCirc(sal_Int16 cx, sal_Int16 cy, sal_Int16 rx, sal_Int16 ry, ObjAr
sal_Int32 temp=sal_Int32(i0)*sal_Int32(ry)/sal_Int32(rx);
sal_Int16 j0=sal_Int16(temp);
SgfAreaColorIntens(F.FMuster,(sal_uInt8)Col1,(sal_uInt8)Col2,(sal_uInt8)b0,rOut);
- rOut.DrawEllipse(Rectangle(cx-i0,cy-j0,cx+i0,cy+j0));
+ rOut.DrawEllipse(tools::Rectangle(cx-i0,cy-j0,cx+i0,cy+j0));
i0=i; b0=b;
}
i--;
}
SgfAreaColorIntens(F.FMuster,(sal_uInt8)Col1,(sal_uInt8)Col2,(sal_uInt8)Int1,rOut);
- rOut.DrawEllipse(Rectangle(cx-i0,cy-i0,cx+i0,cy+i0));
+ rOut.DrawEllipse(tools::Rectangle(cx-i0,cy-i0,cx+i0,cy+i0));
} break; // circle
}
}
@@ -662,7 +662,7 @@ void DrawSlideCirc(sal_Int16 cx, sal_Int16 cy, sal_Int16 rx, sal_Int16 ry, ObjAr
void CircType::Draw(OutputDevice& rOut)
{
- Rectangle aRect(Center.x-Radius.x,Center.y-Radius.y,Center.x+Radius.x,Center.y+Radius.y);
+ tools::Rectangle aRect(Center.x-Radius.x,Center.y-Radius.y,Center.x+Radius.x,Center.y+Radius.y);
if (L.LMuster!=0) L.LMuster=1; // no line pattern here, only on or off
SetArea(F,rOut);
diff --git a/vcl/source/filter/wmf/emfwr.cxx b/vcl/source/filter/wmf/emfwr.cxx
index 7eb9c63103bb..0091aa1e8fe9 100644
--- a/vcl/source/filter/wmf/emfwr.cxx
+++ b/vcl/source/filter/wmf/emfwr.cxx
@@ -602,9 +602,9 @@ void EMFWriter::ImplWriteSize( const Size& rSize)
m_rStm.WriteInt32( aSize.Width() ).WriteInt32( aSize.Height() );
}
-void EMFWriter::ImplWriteRect( const Rectangle& rRect )
+void EMFWriter::ImplWriteRect( const tools::Rectangle& rRect )
{
- const Rectangle aRect( OutputDevice::LogicToLogic ( rRect, maVDev->GetMapMode(), maDestMapMode ));
+ const tools::Rectangle aRect( OutputDevice::LogicToLogic ( rRect, maVDev->GetMapMode(), maDestMapMode ));
m_rStm
.WriteInt32( aRect.Left() )
.WriteInt32( aRect.Top() )
@@ -780,7 +780,7 @@ void EMFWriter::ImplWriteBmpRecord( const Bitmap& rBmp, const Point& rPt,
const Size aBmpSizePixel( rBmp.GetSizePixel() );
ImplBeginRecord( WIN_EMR_STRETCHDIBITS );
- ImplWriteRect( Rectangle( rPt, rSz ) );
+ ImplWriteRect( tools::Rectangle( rPt, rSz ) );
ImplWritePoint( rPt );
m_rStm.WriteInt32( 0 ).WriteInt32( 0 ).WriteInt32( aBmpSizePixel.Width() ).WriteInt32( aBmpSizePixel.Height() );
@@ -872,7 +872,7 @@ void EMFWriter::ImplWriteTextRecord( const Point& rPos, const OUString& rText, c
// write text record
ImplBeginRecord( WIN_EMR_EXTTEXTOUTW );
- ImplWriteRect( Rectangle( rPos, Size( nNormWidth, maVDev->GetTextHeight() ) ) );
+ ImplWriteRect( tools::Rectangle( rPos, Size( nNormWidth, maVDev->GetTextHeight() ) ) );
m_rStm.WriteUInt32( 1 );
m_rStm.WriteInt32( 0 ).WriteInt32( 0 );
ImplWritePoint( rPos );
@@ -1253,7 +1253,7 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf )
const MetaBmpScalePartAction* pA = static_cast<const MetaBmpScalePartAction*>(pAction);
Bitmap aTmp( pA->GetBitmap() );
- if( aTmp.Crop( Rectangle( pA->GetSrcPoint(), pA->GetSrcSize() ) ) )
+ if( aTmp.Crop( tools::Rectangle( pA->GetSrcPoint(), pA->GetSrcSize() ) ) )
ImplWriteBmpRecord( aTmp, pA->GetDestPoint(), pA->GetDestSize(), WIN_SRCCOPY );
}
break;
@@ -1298,7 +1298,7 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf )
{
const MetaBmpExScalePartAction* pA = static_cast<const MetaBmpExScalePartAction*>(pAction);
BitmapEx aBmpEx( pA->GetBitmapEx() );
- aBmpEx.Crop( Rectangle( pA->GetSrcPoint(), pA->GetSrcSize() ) );
+ aBmpEx.Crop( tools::Rectangle( pA->GetSrcPoint(), pA->GetSrcSize() ) );
Bitmap aBmp( aBmpEx.GetBitmap() );
Bitmap aMsk( aBmpEx.GetMask() );
diff --git a/vcl/source/filter/wmf/emfwr.hxx b/vcl/source/filter/wmf/emfwr.hxx
index c34ad63358c2..0e01db54dcf8 100644
--- a/vcl/source/filter/wmf/emfwr.hxx
+++ b/vcl/source/filter/wmf/emfwr.hxx
@@ -73,7 +73,7 @@ private:
void ImplWriteExtent( long nExtent );
void ImplWritePoint( const Point& rPoint );
void ImplWriteSize( const Size& rSize);
- void ImplWriteRect( const Rectangle& rRect );
+ void ImplWriteRect( const tools::Rectangle& rRect );
void ImplWritePath( const tools::PolyPolygon& rPolyPoly, bool bClose );
void ImplWritePolygonRecord( const tools::Polygon& rPoly, bool bClose );
void ImplWritePolyPolygonRecord( const tools::PolyPolygon& rPolyPoly );
diff --git a/vcl/source/filter/wmf/enhwmf.cxx b/vcl/source/filter/wmf/enhwmf.cxx
index 6249b41c748d..d07e96fe394e 100644
--- a/vcl/source/filter/wmf/enhwmf.cxx
+++ b/vcl/source/filter/wmf/enhwmf.cxx
@@ -386,7 +386,7 @@ bool ImplReadRegion( tools::PolyPolygon& rPolyPoly, SvStream& rStream, sal_uInt3
rStream.ReadInt32(nx2);
rStream.ReadInt32(ny2);
- Rectangle aRectangle(Point(nx1, ny1), Point(nx2, ny2));
+ tools::Rectangle aRectangle(Point(nx1, ny1), Point(nx2, ny2));
tools::Polygon aPolygon(aRectangle);
tools::PolyPolygon aPolyPolyOr1(aPolygon);
@@ -1141,7 +1141,7 @@ bool EnhWMFReader::ReadEnhWMF()
{
sal_uInt32 nStartX, nStartY, nEndX, nEndY;
pWMF->ReadInt32( nX32 ).ReadInt32( nY32 ).ReadInt32( nx32 ).ReadInt32( ny32 ).ReadUInt32( nStartX ).ReadUInt32( nStartY ).ReadUInt32( nEndX ).ReadUInt32( nEndY );
- const Rectangle aRect( ReadRectangle( nX32, nY32, nx32, ny32 ));
+ const tools::Rectangle aRect( ReadRectangle( nX32, nY32, nx32, ny32 ));
// #i73608# OutputDevice deviates from WMF
// semantics. start==end means full ellipse here.
@@ -1249,7 +1249,7 @@ bool EnhWMFReader::ReadEnhWMF()
.ReadUInt32( offBitsSrc ).ReadUInt32( cbBitsSrc ).ReadInt32( cxSrc ).ReadInt32( cySrc ) ;
sal_uInt32 dwRop = SRCAND|SRCINVERT;
- Rectangle aRect( Point( xDest, yDest ), Size( cxDest+1, cyDest+1 ) );
+ tools::Rectangle aRect( Point( xDest, yDest ), Size( cxDest+1, cyDest+1 ) );
if ( (cbBitsSrc > (SAL_MAX_UINT32 - 14)) || ((SAL_MAX_UINT32 - 14) - cbBitsSrc < cbBmiSrc) )
bStatus = false;
@@ -1345,7 +1345,7 @@ bool EnhWMFReader::ReadEnhWMF()
( xSrc + cxSrc < aBitmapEx.GetSizePixel().Width() ) &&
( ySrc + cySrc < aBitmapEx.GetSizePixel().Height() ) )
{
- const Rectangle aCropRect( Point( xSrc, ySrc ), Size( cxSrc, cySrc ) );
+ const tools::Rectangle aCropRect( Point( xSrc, ySrc ), Size( cxSrc, cySrc ) );
aBitmapEx.Crop( aCropRect );
}
@@ -1388,7 +1388,7 @@ bool EnhWMFReader::ReadEnhWMF()
cxSrc = cySrc = 0;
Bitmap aBitmap;
- Rectangle aRect( Point( xDest, yDest ), Size( cxDest, cyDest ) );
+ tools::Rectangle aRect( Point( xDest, yDest ), Size( cxDest, cyDest ) );
if ( (cbBitsSrc > (SAL_MAX_UINT32 - 14)) || ((SAL_MAX_UINT32 - 14) - cbBitsSrc < cbBmiSrc) )
bStatus = false;
@@ -1419,7 +1419,7 @@ bool EnhWMFReader::ReadEnhWMF()
( xSrc + cxSrc <= aBitmap.GetSizePixel().Width() ) &&
( ySrc + cySrc <= aBitmap.GetSizePixel().Height() ) )
{
- Rectangle aCropRect( Point( xSrc, ySrc ), Size( cxSrc, cySrc ) );
+ tools::Rectangle aCropRect( Point( xSrc, ySrc ), Size( cxSrc, cySrc ) );
aBitmap.Crop( aCropRect );
}
aBmpSaveList.emplace_back(new BSaveStruct(aBitmap, aRect, dwRop));
@@ -1451,7 +1451,7 @@ bool EnhWMFReader::ReadEnhWMF()
.ReadInt32( cyDest );
Bitmap aBitmap;
- Rectangle aRect( Point( xDest, yDest ), Size( cxDest, cyDest ) );
+ tools::Rectangle aRect( Point( xDest, yDest ), Size( cxDest, cyDest ) );
if ( ((SAL_MAX_UINT32 - 14) < cbBitsSrc)
|| ((SAL_MAX_UINT32 - 14) - cbBitsSrc < cbBmiSrc )
@@ -1486,7 +1486,7 @@ bool EnhWMFReader::ReadEnhWMF()
( xSrc + cxSrc <= aBitmap.GetSizePixel().Width() ) &&
( ySrc + cySrc <= aBitmap.GetSizePixel().Height() ) )
{
- Rectangle aCropRect( Point( xSrc, ySrc ), Size( cxSrc, cySrc ) );
+ tools::Rectangle aCropRect( Point( xSrc, ySrc ), Size( cxSrc, cySrc ) );
aBitmap.Crop( aCropRect );
}
aBmpSaveList.emplace_back(new BSaveStruct(aBitmap, aRect, dwRop));
@@ -1836,10 +1836,10 @@ bool EnhWMFReader::ReadHeader()
// Start reading the EMR_HEADER Header object
// bound size (RectL object, see [MS-WMF] section 2.2.2.19)
- Rectangle rclBounds = ReadRectangle(); // rectangle in logical units
+ tools::Rectangle rclBounds = ReadRectangle(); // rectangle in logical units
// picture frame size (RectL object)
- Rectangle rclFrame = ReadRectangle(); // rectangle in device units 1/100th mm
+ tools::Rectangle rclFrame = ReadRectangle(); // rectangle in device units 1/100th mm
pWMF->ReadUInt32( nSignature );
@@ -1924,21 +1924,21 @@ bool EnhWMFReader::ReadHeader()
return true;
}
-Rectangle EnhWMFReader::ReadRectangle()
+tools::Rectangle EnhWMFReader::ReadRectangle()
{
sal_Int32 nLeft, nTop, nRight, nBottom;
pWMF->ReadInt32(nLeft);
pWMF->ReadInt32(nTop);
pWMF->ReadInt32(nRight);
pWMF->ReadInt32(nBottom);
- return Rectangle(nLeft, nTop, nRight, nBottom);
+ return tools::Rectangle(nLeft, nTop, nRight, nBottom);
}
-Rectangle EnhWMFReader::ReadRectangle( sal_Int32 x1, sal_Int32 y1, sal_Int32 x2, sal_Int32 y2 )
+tools::Rectangle EnhWMFReader::ReadRectangle( sal_Int32 x1, sal_Int32 y1, sal_Int32 x2, sal_Int32 y2 )
{
Point aTL ( Point( x1, y1 ) );
Point aBR( Point( --x2, --y2 ) );
- return Rectangle( aTL, aBR );
+ return tools::Rectangle( aTL, aBR );
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/filter/wmf/winmtf.cxx b/vcl/source/filter/wmf/winmtf.cxx
index cb53a11135d0..cf88ff61736d 100644
--- a/vcl/source/filter/wmf/winmtf.cxx
+++ b/vcl/source/filter/wmf/winmtf.cxx
@@ -41,13 +41,13 @@
#define EMFP_DEBUG(x)
#endif
-void WinMtfClipPath::intersectClipRect( const Rectangle& rRect )
+void WinMtfClipPath::intersectClipRect( const tools::Rectangle& rRect )
{
maClip.intersectRange(
vcl::unotools::b2DRectangleFromRectangle(rRect));
}
-void WinMtfClipPath::excludeClipRect( const Rectangle& rRect )
+void WinMtfClipPath::excludeClipRect( const tools::Rectangle& rRect )
{
maClip.subtractRange(
vcl::unotools::b2DRectangleFromRectangle(rRect));
@@ -488,9 +488,9 @@ Size WinMtfOutput::ImplMap(const Size& rSz, bool bDoWorldTransform)
return Size();
}
-Rectangle WinMtfOutput::ImplMap( const Rectangle& rRect )
+tools::Rectangle WinMtfOutput::ImplMap( const tools::Rectangle& rRect )
{
- return Rectangle( ImplMap( rRect.TopLeft() ), ImplMap( rRect.GetSize() ) );
+ return tools::Rectangle( ImplMap( rRect.TopLeft() ), ImplMap( rRect.GetSize() ) );
}
void WinMtfOutput::ImplMap( vcl::Font& rFont )
@@ -769,7 +769,7 @@ void WinMtfOutput::DeleteObject( sal_Int32 nIndex )
}
}
-void WinMtfOutput::IntersectClipRect( const Rectangle& rRect )
+void WinMtfOutput::IntersectClipRect( const tools::Rectangle& rRect )
{
mbClipNeedsUpdate=true;
if ((rRect.Left()-rRect.Right()==0) && (rRect.Top()-rRect.Bottom()==0))
@@ -779,7 +779,7 @@ void WinMtfOutput::IntersectClipRect( const Rectangle& rRect )
aClipPath.intersectClipRect( ImplMap( rRect ) );
}
-void WinMtfOutput::ExcludeClipRect( const Rectangle& rRect )
+void WinMtfOutput::ExcludeClipRect( const tools::Rectangle& rRect )
{
mbClipNeedsUpdate=true;
aClipPath.excludeClipRect( ImplMap( rRect ) );
@@ -1069,7 +1069,7 @@ void WinMtfOutput::LineTo( const Point& rPoint, bool bRecordPath )
maActPos = aDest;
}
-void WinMtfOutput::DrawRect( const Rectangle& rRect, bool bEdge )
+void WinMtfOutput::DrawRect( const tools::Rectangle& rRect, bool bEdge )
{
UpdateClipRegion();
UpdateFillStyle();
@@ -1107,7 +1107,7 @@ void WinMtfOutput::DrawRect( const Rectangle& rRect, bool bEdge )
}
}
-void WinMtfOutput::DrawRoundRect( const Rectangle& rRect, const Size& rSize )
+void WinMtfOutput::DrawRoundRect( const tools::Rectangle& rRect, const Size& rSize )
{
UpdateClipRegion();
UpdateLineStyle();
@@ -1115,7 +1115,7 @@ void WinMtfOutput::DrawRoundRect( const Rectangle& rRect, const Size& rSize )
mpGDIMetaFile->AddAction( new MetaRoundRectAction( ImplMap( rRect ), labs( ImplMap( rSize ).Width() ), labs( ImplMap( rSize ).Height() ) ) );
}
-void WinMtfOutput::DrawEllipse( const Rectangle& rRect )
+void WinMtfOutput::DrawEllipse( const tools::Rectangle& rRect )
{
UpdateClipRegion();
UpdateFillStyle();
@@ -1137,13 +1137,13 @@ void WinMtfOutput::DrawEllipse( const Rectangle& rRect )
}
}
-void WinMtfOutput::DrawArc( const Rectangle& rRect, const Point& rStart, const Point& rEnd, bool bTo )
+void WinMtfOutput::DrawArc( const tools::Rectangle& rRect, const Point& rStart, const Point& rEnd, bool bTo )
{
UpdateClipRegion();
UpdateLineStyle();
UpdateFillStyle();
- Rectangle aRect( ImplMap( rRect ) );
+ tools::Rectangle aRect( ImplMap( rRect ) );
Point aStart( ImplMap( rStart ) );
Point aEnd( ImplMap( rEnd ) );
@@ -1166,12 +1166,12 @@ void WinMtfOutput::DrawArc( const Rectangle& rRect, const Point& rStart, const P
maActPos = aEnd;
}
-void WinMtfOutput::DrawPie( const Rectangle& rRect, const Point& rStart, const Point& rEnd )
+void WinMtfOutput::DrawPie( const tools::Rectangle& rRect, const Point& rStart, const Point& rEnd )
{
UpdateClipRegion();
UpdateFillStyle();
- Rectangle aRect( ImplMap( rRect ) );
+ tools::Rectangle aRect( ImplMap( rRect ) );
Point aStart( ImplMap( rStart ) );
Point aEnd( ImplMap( rEnd ) );
@@ -1189,12 +1189,12 @@ void WinMtfOutput::DrawPie( const Rectangle& rRect, const Point& rStart, const P
}
}
-void WinMtfOutput::DrawChord( const Rectangle& rRect, const Point& rStart, const Point& rEnd )
+void WinMtfOutput::DrawChord( const tools::Rectangle& rRect, const Point& rStart, const Point& rEnd )
{
UpdateClipRegion();
UpdateFillStyle();
- Rectangle aRect( ImplMap( rRect ) );
+ tools::Rectangle aRect( ImplMap( rRect ) );
Point aStart( ImplMap( rStart ) );
Point aEnd( ImplMap( rEnd ) );
@@ -1670,7 +1670,7 @@ void WinMtfOutput::ResolveBitmapActions( std::vector<std::unique_ptr<BSaveStruct
size_t nObjectStartIndex = nObjects - nObjectsLeft;
BSaveStruct* pSave = rSaveList[nObjectStartIndex].get();
- Rectangle aRect( pSave->aOutRect );
+ tools::Rectangle aRect( pSave->aOutRect );
for ( i = nObjectStartIndex; i < nObjects; )
{
@@ -1992,12 +1992,12 @@ void WinMtfOutput::ScaleWinExt( double fX, double fY )
mnWinExtY = FRound( mnWinExtY * fY );
}
-void WinMtfOutput::SetrclBounds( const Rectangle& rRect )
+void WinMtfOutput::SetrclBounds( const tools::Rectangle& rRect )
{
mrclBounds = rRect;
}
-void WinMtfOutput::SetrclFrame( const Rectangle& rRect )
+void WinMtfOutput::SetrclFrame( const tools::Rectangle& rRect )
{
mrclFrame = rRect;
}
diff --git a/vcl/source/filter/wmf/winmtf.hxx b/vcl/source/filter/wmf/winmtf.hxx
index d6e161d9e6a8..c7402f50ff95 100644
--- a/vcl/source/filter/wmf/winmtf.hxx
+++ b/vcl/source/filter/wmf/winmtf.hxx
@@ -249,8 +249,8 @@ public:
WinMtfClipPath(): maClip() {};
void setClipPath( const tools::PolyPolygon& rPolyPolygon, sal_Int32 nClippingMode );
- void intersectClipRect( const Rectangle& rRect );
- void excludeClipRect( const Rectangle& rRect );
+ void intersectClipRect( const tools::Rectangle& rRect );
+ void excludeClipRect( const tools::Rectangle& rRect );
void moveClipRegion( const Size& rSize );
void setDefaultClipPath();
@@ -416,16 +416,16 @@ struct SaveStruct
struct BSaveStruct
{
BitmapEx aBmpEx;
- Rectangle aOutRect;
+ tools::Rectangle aOutRect;
sal_uInt32 nWinRop;
- BSaveStruct(const Bitmap& rBmp, const Rectangle& rOutRect, sal_uInt32 nRop)
+ BSaveStruct(const Bitmap& rBmp, const tools::Rectangle& rOutRect, sal_uInt32 nRop)
: aBmpEx(rBmp)
, aOutRect(rOutRect)
, nWinRop(nRop)
{}
- BSaveStruct(const BitmapEx& rBmpEx, const Rectangle& rOutRect, sal_uInt32 nRop)
+ BSaveStruct(const BitmapEx& rBmpEx, const tools::Rectangle& rOutRect, sal_uInt32 nRop)
: aBmpEx(rBmpEx)
, aOutRect(rOutRect)
, nWinRop(nRop)
@@ -484,8 +484,8 @@ class WinMtfOutput final
sal_Int32 mnPixX, mnPixY; // Reference Device in pixel
sal_Int32 mnMillX, mnMillY; // Reference Device in Mill
- Rectangle mrclFrame; // rectangle in logical units 1/100th mm
- Rectangle mrclBounds;
+ tools::Rectangle mrclFrame; // rectangle in logical units 1/100th mm
+ tools::Rectangle mrclBounds;
GDIMetaFile* mpGDIMetaFile;
@@ -495,7 +495,7 @@ class WinMtfOutput final
Point ImplMap( const Point& rPt );
Point ImplScale( const Point& rPt );
Size ImplMap( const Size& rSize, bool bDoWorldTransform = true);
- Rectangle ImplMap( const Rectangle& rRectangle );
+ tools::Rectangle ImplMap( const tools::Rectangle& rRectangle );
void ImplMap( vcl::Font& rFont );
tools::Polygon& ImplMap( tools::Polygon& rPolygon );
tools::PolyPolygon& ImplMap( tools::PolyPolygon& rPolyPolygon );
@@ -519,8 +519,8 @@ public:
void SetWinExt( const Size& rSize , bool bIsEMF = false);
void ScaleWinExt( double fX, double fY );
- void SetrclBounds( const Rectangle& rRect );
- void SetrclFrame( const Rectangle& rRect );
+ void SetrclBounds( const tools::Rectangle& rRect );
+ void SetrclFrame( const tools::Rectangle& rRect );
void SetRefPix( const Size& rSize );
void SetRefMill( const Size& rSize );
@@ -562,22 +562,22 @@ public:
void MoveTo( const Point& rPoint, bool bRecordPath = false );
void LineTo( const Point& rPoint, bool bRecordPath = false );
void DrawPixel( const Point& rSource, const Color& rColor );
- void DrawRect( const Rectangle& rRect, bool bEdge = true );
- void DrawRoundRect( const Rectangle& rRect, const Size& rSize );
- void DrawEllipse( const Rectangle& rRect );
+ void DrawRect( const tools::Rectangle& rRect, bool bEdge = true );
+ void DrawRoundRect( const tools::Rectangle& rRect, const Size& rSize );
+ void DrawEllipse( const tools::Rectangle& rRect );
void DrawArc(
- const Rectangle& rRect,
+ const tools::Rectangle& rRect,
const Point& rStartAngle,
const Point& rEndAngle,
bool bDrawTo = false
);
void DrawPie(
- const Rectangle& rRect,
+ const tools::Rectangle& rRect,
const Point& rStartAngle,
const Point& rEndAngle
);
void DrawChord(
- const Rectangle& rRect,
+ const tools::Rectangle& rRect,
const Point& rStartAngle,
const Point& rEndAngle
);
@@ -605,8 +605,8 @@ public:
void ResolveBitmapActions( std::vector<std::unique_ptr<BSaveStruct>>& rSaveList );
- void IntersectClipRect( const Rectangle& rRect );
- void ExcludeClipRect( const Rectangle& rRect );
+ void IntersectClipRect( const tools::Rectangle& rRect );
+ void ExcludeClipRect( const tools::Rectangle& rRect );
void MoveClipRegion( const Size& rSize );
void SetClipPath(
const tools::PolyPolygon& rPolyPoly,
@@ -659,7 +659,7 @@ class EnhWMFReader : public WinMtf
bool ReadHeader();
// reads and converts the rectangle
- static Rectangle ReadRectangle( sal_Int32, sal_Int32, sal_Int32, sal_Int32 );
+ static tools::Rectangle ReadRectangle( sal_Int32, sal_Int32, sal_Int32, sal_Int32 );
public:
EnhWMFReader(SvStream& rStreamWMF, GDIMetaFile& rGDIMetaFile, FilterConfigItem* pConfigItem = nullptr);
@@ -672,7 +672,7 @@ private:
template <class T> tools::Polygon ReadPolygon(sal_uInt32 nStartIndex, sal_uInt32 nPoints);
template <class T, class Drawer> void ReadAndDrawPolygon(Drawer drawer, const bool skipFirst);
- Rectangle ReadRectangle();
+ tools::Rectangle ReadRectangle();
void ReadEMFPlusComment(sal_uInt32 length, bool& bHaveDC);
};
@@ -708,9 +708,9 @@ private:
Point ReadPoint(); // reads and converts a point (first X then Y)
Point ReadYX(); // reads and converts a point (first Y then X)
- Rectangle ReadRectangle(); // reads and converts a rectangle
+ tools::Rectangle ReadRectangle(); // reads and converts a rectangle
Size ReadYXExt();
- void GetPlaceableBound( Rectangle& rSize, SvStream* pStrm );
+ void GetPlaceableBound( tools::Rectangle& rSize, SvStream* pStrm );
public:
diff --git a/vcl/source/filter/wmf/winwmf.cxx b/vcl/source/filter/wmf/winwmf.cxx
index a03781ff3568..94783f8879d4 100644
--- a/vcl/source/filter/wmf/winwmf.cxx
+++ b/vcl/source/filter/wmf/winwmf.cxx
@@ -112,7 +112,7 @@
#define W_META_CREATEBITMAP 0x06FE
#define W_META_CREATEREGION 0x06FF
-static void GetWinExtMax( const Point& rSource, Rectangle& rPlaceableBound, const sal_Int16 nMapMode )
+static void GetWinExtMax( const Point& rSource, tools::Rectangle& rPlaceableBound, const sal_Int16 nMapMode )
{
Point aSource( rSource );
if ( nMapMode == MM_HIMETRIC )
@@ -127,7 +127,7 @@ static void GetWinExtMax( const Point& rSource, Rectangle& rPlaceableBound, cons
rPlaceableBound.Bottom() = aSource.Y();
}
-static void GetWinExtMax( const Rectangle& rSource, Rectangle& rPlaceableBound, const sal_Int16 nMapMode )
+static void GetWinExtMax( const tools::Rectangle& rSource, tools::Rectangle& rPlaceableBound, const sal_Int16 nMapMode )
{
GetWinExtMax( rSource.TopLeft(), rPlaceableBound, nMapMode );
GetWinExtMax( rSource.BottomRight(), rPlaceableBound, nMapMode );
@@ -147,14 +147,14 @@ inline Point WMFReader::ReadYX()
return Point( nX, nY );
}
-Rectangle WMFReader::ReadRectangle()
+tools::Rectangle WMFReader::ReadRectangle()
{
Point aBR, aTL;
aBR = ReadYX();
aTL = ReadYX();
aBR.X()--;
aBR.Y()--;
- return Rectangle( aTL, aBR );
+ return tools::Rectangle( aTL, aBR );
}
Size WMFReader::ReadYXExt()
@@ -306,7 +306,7 @@ void WMFReader::ReadRecordParams( sal_uInt16 nFunc )
{
Point aEnd( ReadYX() );
Point aStart( ReadYX() );
- Rectangle aRect( ReadRectangle() );
+ tools::Rectangle aRect( ReadRectangle() );
aRect.Justify();
pOut->DrawArc( aRect, aStart, aEnd );
}
@@ -316,7 +316,7 @@ void WMFReader::ReadRecordParams( sal_uInt16 nFunc )
{
Point aEnd( ReadYX() );
Point aStart( ReadYX() );
- Rectangle aRect( ReadRectangle() );
+ tools::Rectangle aRect( ReadRectangle() );
aRect.Justify();
// #i73608# OutputDevice deviates from WMF
@@ -332,7 +332,7 @@ void WMFReader::ReadRecordParams( sal_uInt16 nFunc )
{
Point aEnd( ReadYX() );
Point aStart( ReadYX() );
- Rectangle aRect( ReadRectangle() );
+ tools::Rectangle aRect( ReadRectangle() );
aRect.Justify();
pOut->DrawChord( aRect, aStart, aEnd );
}
@@ -538,12 +538,12 @@ void WMFReader::ReadRecordParams( sal_uInt16 nFunc )
{
sal_Int32 nOriginalTextLen = nLen;
sal_Int32 nOriginalBlockLen = ( nOriginalTextLen + 1 ) &~ 1;
- Rectangle aRect;
+ tools::Rectangle aRect;
if( nOptions & ETO_CLIPPED )
{
const Point aPt1( ReadPoint() );
const Point aPt2( ReadPoint() );
- aRect = Rectangle( aPt1, aPt2 );
+ aRect = tools::Rectangle( aPt1, aPt2 );
}
auto nRemainingSize = pWMF->remainingSize();
@@ -699,10 +699,10 @@ void WMFReader::ReadRecordParams( sal_uInt16 nFunc )
( ( nSx + nSxe ) <= aBmp.GetSizePixel().Width() ) &&
( ( nSy + nSye <= aBmp.GetSizePixel().Height() ) ) )
{
- Rectangle aCropRect( Point( nSx, nSy ), Size( nSxe, nSye ) );
+ tools::Rectangle aCropRect( Point( nSx, nSy ), Size( nSxe, nSye ) );
aBmp.Crop( aCropRect );
}
- Rectangle aDestRect( aPoint, Size( nSxe, nSye ) );
+ tools::Rectangle aDestRect( aPoint, Size( nSxe, nSye ) );
aBmpSaveList.emplace_back(new BSaveStruct(aBmp, aDestRect, nWinROP));
}
}
@@ -741,7 +741,7 @@ void WMFReader::ReadRecordParams( sal_uInt16 nFunc )
Size aDestSize( ReadYXExt() );
if ( aDestSize.Width() && aDestSize.Height() ) // #92623# do not try to read buggy bitmaps
{
- Rectangle aDestRect( ReadYX(), aDestSize );
+ tools::Rectangle aDestRect( ReadYX(), aDestSize );
if ( nWinROP != PATCOPY )
ReadDIB(aBmp, *pWMF, false);
@@ -750,7 +750,7 @@ void WMFReader::ReadRecordParams( sal_uInt16 nFunc )
( ( nSx + nSxe ) <= aBmp.GetSizePixel().Width() ) &&
( ( nSy + nSye <= aBmp.GetSizePixel().Height() ) ) )
{
- Rectangle aCropRect( Point( nSx, nSy ), Size( nSxe, nSye ) );
+ tools::Rectangle aCropRect( Point( nSx, nSy ), Size( nSxe, nSye ) );
aBmp.Crop( aCropRect );
}
aBmpSaveList.emplace_back(new BSaveStruct(aBmp, aDestRect, nWinROP));
@@ -978,7 +978,7 @@ void WMFReader::ReadRecordParams( sal_uInt16 nFunc )
pWMF->ReadUInt32( nROP );
Size aSize = ReadYXExt();
nOldROP = pOut->SetRasterOp( (WMFRasterOp)nROP );
- pOut->DrawRect( Rectangle( ReadYX(), aSize ), false );
+ pOut->DrawRect( tools::Rectangle( ReadYX(), aSize ), false );
pOut->SetRasterOp( nOldROP );
}
break;
@@ -1192,7 +1192,7 @@ bool WMFReader::ReadHeader()
if (!pWMF->good())
return false;
- Rectangle aPlaceableBound;
+ tools::Rectangle aPlaceableBound;
bool bPlaceable = nPlaceableMetaKey == 0x9ac6cdd7L;
@@ -1236,7 +1236,7 @@ bool WMFReader::ReadHeader()
&& (pExternalHeader->mapMode == MM_ISOTROPIC || pExternalHeader->mapMode == MM_ANISOTROPIC))
{
// #n417818#: If we have an external header then overwrite the bounds!
- Rectangle aExtRect(0, 0,
+ tools::Rectangle aExtRect(0, 0,
(double) pExternalHeader->xExt * 567 * nUnitsPerInch / 1440000,
(double) pExternalHeader->yExt * 567 * nUnitsPerInch / 1440000);
aPlaceableBound = aExtRect;
@@ -1259,7 +1259,7 @@ bool WMFReader::ReadHeader()
{
double fRatio = aPlaceableBound.GetWidth() / fMaxWidth;
- aPlaceableBound = Rectangle(
+ aPlaceableBound = tools::Rectangle(
aPlaceableBound.Left() / fRatio,
aPlaceableBound.Top() / fRatio,
aPlaceableBound.Right() / fRatio,
@@ -1398,7 +1398,7 @@ void WMFReader::ReadWMF()
if( bEMFAvailable )
{
pOut->AddFromGDIMetaFile( aMeta );
- pOut->SetrclFrame( Rectangle( Point(0, 0), aMeta.GetPrefSize()));
+ pOut->SetrclFrame( tools::Rectangle( Point(0, 0), aMeta.GetPrefSize()));
// the stream needs to be set to the wmf end position,
// otherwise the GfxLink that is created will be incorrect
@@ -1435,11 +1435,11 @@ void WMFReader::ReadWMF()
pWMF->Seek( nStartPos );
}
-void WMFReader::GetPlaceableBound( Rectangle& rPlaceableBound, SvStream* pStm )
+void WMFReader::GetPlaceableBound( tools::Rectangle& rPlaceableBound, SvStream* pStm )
{
bool bRet = true;
- Rectangle aBound;
+ tools::Rectangle aBound;
aBound.Left() = RECT_MAX;
aBound.Top() = RECT_MAX;
aBound.Right() = RECT_MIN;
@@ -1738,7 +1738,7 @@ void WMFReader::GetPlaceableBound( Rectangle& rPlaceableBound, SvStream* pStm )
Size aDestSize( ReadYXExt() );
if ( aDestSize.Width() && aDestSize.Height() ) // #92623# do not try to read buggy bitmaps
{
- Rectangle aDestRect( ReadYX(), aDestSize );
+ tools::Rectangle aDestRect( ReadYX(), aDestSize );
GetWinExtMax( aDestRect, aBound, nMapMode );
bBoundsDetermined = true;
}
@@ -1751,7 +1751,7 @@ void WMFReader::GetPlaceableBound( Rectangle& rPlaceableBound, SvStream* pStm )
sal_uInt32 nROP;
pStm->ReadUInt32( nROP );
Size aSize = ReadYXExt();
- GetWinExtMax( Rectangle( ReadYX(), aSize ), aBound, nMapMode );
+ GetWinExtMax( tools::Rectangle( ReadYX(), aSize ), aBound, nMapMode );
bBoundsDetermined = true;
}
break;
@@ -1781,14 +1781,14 @@ void WMFReader::GetPlaceableBound( Rectangle& rPlaceableBound, SvStream* pStm )
{
if (aWinExt)
{
- rPlaceableBound = Rectangle(aWinOrg, *aWinExt);
+ rPlaceableBound = tools::Rectangle(aWinOrg, *aWinExt);
SAL_INFO("vcl.wmf", "Window dimension "
" t: " << rPlaceableBound.Left() << " l: " << rPlaceableBound.Top()
<< " b: " << rPlaceableBound.Right() << " r: " << rPlaceableBound.Bottom());
}
else if (aViewportExt)
{
- rPlaceableBound = Rectangle(aViewportOrg, *aViewportExt);
+ rPlaceableBound = tools::Rectangle(aViewportOrg, *aViewportExt);
SAL_INFO("vcl.wmf", "Viewport dimension "
" t: " << rPlaceableBound.Left() << " l: " << rPlaceableBound.Top()
<< " b: " << rPlaceableBound.Right() << " r: " << rPlaceableBound.Bottom());
diff --git a/vcl/source/filter/wmf/wmfwr.cxx b/vcl/source/filter/wmf/wmfwr.cxx
index 969a6f74d5a0..7950f105ee20 100644
--- a/vcl/source/filter/wmf/wmfwr.cxx
+++ b/vcl/source/filter/wmf/wmfwr.cxx
@@ -243,7 +243,7 @@ void WMFWriter::WriteHeightWidth(const Size & rSize)
pWMF->WriteInt16( aSz.Height() ).WriteInt16( aSz.Width() );
}
-void WMFWriter::WriteRectangle(const Rectangle & rRect)
+void WMFWriter::WriteRectangle(const tools::Rectangle & rRect)
{
WritePointYX(Point(rRect.Right()+1,rRect.Bottom()+1));
WritePointYX(rRect.TopLeft());
@@ -278,7 +278,7 @@ void WMFWriter::UpdateRecordHeader()
pWMF->Seek(nPos);
}
-void WMFWriter::WMFRecord_Arc(const Rectangle & rRect, const Point & rStartPt, const Point & rEndPt)
+void WMFWriter::WMFRecord_Arc(const tools::Rectangle & rRect, const Point & rStartPt, const Point & rEndPt)
{
WriteRecordHeader(0x0000000b,W_META_ARC);
WritePointYX(rEndPt);
@@ -286,7 +286,7 @@ void WMFWriter::WMFRecord_Arc(const Rectangle & rRect, const Point & rStartPt, c
WriteRectangle(rRect);
}
-void WMFWriter::WMFRecord_Chord(const Rectangle & rRect, const Point & rStartPt, const Point & rEndPt)
+void WMFWriter::WMFRecord_Chord(const tools::Rectangle & rRect, const Point & rStartPt, const Point & rEndPt)
{
WriteRecordHeader(0x0000000b,W_META_CHORD);
WritePointYX(rEndPt);
@@ -411,7 +411,7 @@ void WMFWriter::WMFRecord_DeleteObject(sal_uInt16 nObjectHandle)
pWMF->WriteUInt16( nObjectHandle );
}
-void WMFWriter::WMFRecord_Ellipse(const Rectangle & rRect)
+void WMFWriter::WMFRecord_Ellipse(const tools::Rectangle & rRect)
{
WriteRecordHeader(0x00000007,W_META_ELLIPSE);
WriteRectangle(rRect);
@@ -605,7 +605,7 @@ void WMFWriter::WMFRecord_MoveTo(const Point & rPoint)
WritePointYX(rPoint);
}
-void WMFWriter::WMFRecord_Pie(const Rectangle & rRect, const Point & rStartPt, const Point & rEndPt)
+void WMFWriter::WMFRecord_Pie(const tools::Rectangle & rRect, const Point & rStartPt, const Point & rEndPt)
{
WriteRecordHeader(0x0000000b,W_META_PIE);
WritePointYX(rEndPt);
@@ -668,7 +668,7 @@ void WMFWriter::WMFRecord_PolyPolygon(const tools::PolyPolygon & rPolyPoly)
UpdateRecordHeader();
}
-void WMFWriter::WMFRecord_Rectangle(const Rectangle & rRect)
+void WMFWriter::WMFRecord_Rectangle(const tools::Rectangle & rRect)
{
WriteRecordHeader( 0x00000007,W_META_RECTANGLE );
WriteRectangle( rRect );
@@ -680,7 +680,7 @@ void WMFWriter::WMFRecord_RestoreDC()
pWMF->WriteInt16( -1 );
}
-void WMFWriter::WMFRecord_RoundRect(const Rectangle & rRect, long nHorzRound, long nVertRound)
+void WMFWriter::WMFRecord_RoundRect(const tools::Rectangle & rRect, long nHorzRound, long nVertRound)
{
WriteRecordHeader(0x00000009,W_META_ROUNDRECT);
WriteHeightWidth(Size(nHorzRound,nVertRound));
@@ -838,7 +838,7 @@ void WMFWriter::TrueTextOut(const Point & rPoint, const OString& rString)
UpdateRecordHeader();
}
-void WMFWriter::WMFRecord_IntersectClipRect( const Rectangle& rRect )
+void WMFWriter::WMFRecord_IntersectClipRect( const tools::Rectangle& rRect )
{
WriteRecordHeader( 0x00000007, W_META_INTERSECTCLIPRECT );
WriteRectangle(rRect);
@@ -1238,7 +1238,7 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF )
const MetaBmpScalePartAction* pA = static_cast<const MetaBmpScalePartAction*>(pMA);
Bitmap aTmp( pA->GetBitmap() );
- if( aTmp.Crop( Rectangle( pA->GetSrcPoint(), pA->GetSrcSize() ) ) )
+ if( aTmp.Crop( tools::Rectangle( pA->GetSrcPoint(), pA->GetSrcSize() ) ) )
WMFRecord_StretchDIB( pA->GetDestPoint(), pA->GetDestSize(), aTmp );
}
break;
@@ -1283,7 +1283,7 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF )
{
const MetaBmpExScalePartAction* pA = static_cast<const MetaBmpExScalePartAction*>(pMA);
BitmapEx aBmpEx( pA->GetBitmapEx() );
- aBmpEx.Crop( Rectangle( pA->GetSrcPoint(), pA->GetSrcSize() ) );
+ aBmpEx.Crop( tools::Rectangle( pA->GetSrcPoint(), pA->GetSrcSize() ) );
Bitmap aBmp( aBmpEx.GetBitmap() );
Bitmap aMsk( aBmpEx.GetMask() );
diff --git a/vcl/source/filter/wmf/wmfwr.hxx b/vcl/source/filter/wmf/wmfwr.hxx
index c7d130e4020e..8410275c5466 100644
--- a/vcl/source/filter/wmf/wmfwr.hxx
+++ b/vcl/source/filter/wmf/wmfwr.hxx
@@ -123,7 +123,7 @@ private:
sal_Int32 ScaleWidth( sal_Int32 nDX );
void WriteSize(const Size & rSize);
void WriteHeightWidth(const Size & rSize);
- void WriteRectangle(const Rectangle & rRect);
+ void WriteRectangle(const tools::Rectangle & rRect);
void WriteColor(const Color & rColor);
void WriteRecordHeader(sal_uInt32 nSizeWords, sal_uInt16 nType);
@@ -135,13 +135,13 @@ private:
// nSizeWords was unknown upon calling WriteRecordHeader(..)
// if needed it inserts a BYTE 0 to make number of bytes even
- void WMFRecord_Arc(const Rectangle& rRect, const Point& rStartPt, const Point& rEndPt);
- void WMFRecord_Chord(const Rectangle& rRect, const Point& rStartPt, const Point& rEndPt);
+ void WMFRecord_Arc(const tools::Rectangle& rRect, const Point& rStartPt, const Point& rEndPt);
+ void WMFRecord_Chord(const tools::Rectangle& rRect, const Point& rStartPt, const Point& rEndPt);
void WMFRecord_CreateBrushIndirect(const Color& rColor);
void WMFRecord_CreateFontIndirect(const vcl::Font& rFont);
void WMFRecord_CreatePenIndirect(const Color& rColor, const LineInfo& rLineInfo );
void WMFRecord_DeleteObject(sal_uInt16 nObjectHandle);
- void WMFRecord_Ellipse(const Rectangle& rRect);
+ void WMFRecord_Ellipse(const tools::Rectangle& rRect);
void WMFRecord_Escape( sal_uInt32 nEsc, sal_uInt32 nLen, const sal_Int8* pData );
bool WMFRecord_Escape_Unicode( const Point& rPoint, const OUString& rStr, const long* pDXAry );
void WMFRecord_ExtTextOut(const Point& rPoint, const OUString& rString, const long* pDXAry);
@@ -151,13 +151,13 @@ private:
void TrueTextOut(const Point& rPoint, const OString& rString);
void WMFRecord_LineTo(const Point & rPoint);
void WMFRecord_MoveTo(const Point & rPoint);
- void WMFRecord_Pie(const Rectangle & rRect, const Point & rStartPt, const Point & rEndPt);
+ void WMFRecord_Pie(const tools::Rectangle & rRect, const Point & rStartPt, const Point & rEndPt);
void WMFRecord_Polygon(const tools::Polygon & rPoly);
void WMFRecord_PolyLine(const tools::Polygon & rPoly);
void WMFRecord_PolyPolygon(const tools::PolyPolygon & rPolyPoly);
- void WMFRecord_Rectangle(const Rectangle & rRect);
+ void WMFRecord_Rectangle(const tools::Rectangle & rRect);
void WMFRecord_RestoreDC();
- void WMFRecord_RoundRect(const Rectangle & rRect, long nHorzRound, long nVertRound);
+ void WMFRecord_RoundRect(const tools::Rectangle & rRect, long nHorzRound, long nVertRound);
void WMFRecord_SaveDC();
void WMFRecord_SelectObject(sal_uInt16 nObjectHandle);
void WMFRecord_SetBkMode(bool bTransparent);
@@ -170,7 +170,7 @@ private:
void WMFRecord_SetWindowOrg(const Point & rPoint);
void WMFRecord_StretchDIB(const Point & rPoint, const Size & rSize, const Bitmap & rBitmap, sal_uInt32 nROP = 0UL );
void WMFRecord_TextOut(const Point & rPoint, const OUString & rString);
- void WMFRecord_IntersectClipRect( const Rectangle& rRect);
+ void WMFRecord_IntersectClipRect( const tools::Rectangle& rRect);
sal_uInt16 AllocHandle();
void FreeHandle(sal_uInt16 nObjectHandle);
diff --git a/vcl/source/font/fontmetric.cxx b/vcl/source/font/fontmetric.cxx
index 08153093dd1d..b397684136e0 100644
--- a/vcl/source/font/fontmetric.cxx
+++ b/vcl/source/font/fontmetric.cxx
@@ -325,7 +325,7 @@ void ImplFontMetricData::ImplInitTextLineSize( const OutputDevice* pDev )
if (MsLangId::isCJK(rFont.GetLanguage()))
{
const OUString sFullstop( sal_Unicode( 0x3001 ) ); // Fullwidth fullstop
- Rectangle aRect;
+ tools::Rectangle aRect;
pDev->GetTextBoundRect( aRect, sFullstop );
const sal_uInt16 nH = rFont.GetFontSize().Height();
const sal_uInt16 nB = aRect.Left();
diff --git a/vcl/source/fontsubset/cff.cxx b/vcl/source/fontsubset/cff.cxx
index ca6115686d8a..f7d3cdd3d8ca 100644
--- a/vcl/source/fontsubset/cff.cxx
+++ b/vcl/source/fontsubset/cff.cxx
@@ -2103,7 +2103,7 @@ bool CffSubsetterContext::emitAsType1( Type1Emitter& rEmitter,
fXFactor = 1000.0F * maFontMatrix[0];
fYFactor = 1000.0F * maFontMatrix[3];
}
- rFSInfo.m_aFontBBox = Rectangle( Point( static_cast<sal_Int32>(maFontBBox[0] * fXFactor),
+ rFSInfo.m_aFontBBox = tools::Rectangle( Point( static_cast<sal_Int32>(maFontBBox[0] * fXFactor),
static_cast<sal_Int32>(maFontBBox[1] * fYFactor) ),
Point( static_cast<sal_Int32>(maFontBBox[2] * fXFactor),
static_cast<sal_Int32>(maFontBBox[3] * fYFactor) ) );
diff --git a/vcl/source/gdi/animate.cxx b/vcl/source/gdi/animate.cxx
index 72ea051ba2fe..bf3f42e937f1 100644
--- a/vcl/source/gdi/animate.cxx
+++ b/vcl/source/gdi/animate.cxx
@@ -161,7 +161,7 @@ void Animation::Clear()
bool Animation::IsTransparent() const
{
Point aPoint;
- Rectangle aRect( aPoint, maGlobalSize );
+ tools::Rectangle aRect( aPoint, maGlobalSize );
bool bRet = false;
// If some small bitmap needs to be replaced by the background,
@@ -171,7 +171,7 @@ bool Animation::IsTransparent() const
for(const AnimationBitmap* pAnimBmp : maList)
{
if( Disposal::Back == pAnimBmp->eDisposal
- && Rectangle( pAnimBmp->aPosPix, pAnimBmp->aSizePix ) != aRect
+ && tools::Rectangle( pAnimBmp->aPosPix, pAnimBmp->aSizePix ) != aRect
)
{
bRet = true;
@@ -466,9 +466,9 @@ bool Animation::Insert( const AnimationBitmap& rStepBmp )
if( !IsInAnimation() )
{
Point aPoint;
- Rectangle aGlobalRect( aPoint, maGlobalSize );
+ tools::Rectangle aGlobalRect( aPoint, maGlobalSize );
- maGlobalSize = aGlobalRect.Union( Rectangle( rStepBmp.aPosPix, rStepBmp.aSizePix ) ).GetSize();
+ maGlobalSize = aGlobalRect.Union( tools::Rectangle( rStepBmp.aPosPix, rStepBmp.aSizePix ) ).GetSize();
maList.push_back( new AnimationBitmap( rStepBmp ) );
// As a start, we make the first BitmapEx the replacement BitmapEx
diff --git a/vcl/source/gdi/bitmap.cxx b/vcl/source/gdi/bitmap.cxx
index 6ec5a842f30a..ec534784c3d8 100644
--- a/vcl/source/gdi/bitmap.cxx
+++ b/vcl/source/gdi/bitmap.cxx
@@ -438,7 +438,7 @@ bool Bitmap::Erase(const Color& rFillColor)
else
{
Point aTmpPoint;
- const Rectangle aRect( aTmpPoint, Size( pWriteAcc->Width(), pWriteAcc->Height() ) );
+ const tools::Rectangle aRect( aTmpPoint, Size( pWriteAcc->Width(), pWriteAcc->Height() ) );
pWriteAcc->SetFillColor( rFillColor );
pWriteAcc->FillRect( aRect );
}
@@ -638,11 +638,11 @@ bool Bitmap::Rotate( long nAngle10, const Color& rFillColor )
else
{
Point aTmpPoint;
- Rectangle aTmpRectangle( aTmpPoint, aSizePix );
+ tools::Rectangle aTmpRectangle( aTmpPoint, aSizePix );
tools::Polygon aPoly( aTmpRectangle );
aPoly.Rotate( aTmpPoint, (sal_uInt16) nAngle10 );
- Rectangle aNewBound( aPoly.GetBoundRect() );
+ tools::Rectangle aNewBound( aPoly.GetBoundRect() );
const Size aNewSizePix( aNewBound.GetSize() );
Bitmap aNewBmp( aNewSizePix, GetBitCount(), &pReadAcc->GetPalette() );
ScopedWriteAccess pWriteAcc(aNewBmp);
@@ -717,13 +717,13 @@ bool Bitmap::Rotate( long nAngle10, const Color& rFillColor )
return bRet;
};
-bool Bitmap::Crop( const Rectangle& rRectPixel )
+bool Bitmap::Crop( const tools::Rectangle& rRectPixel )
{
const Size aSizePix( GetSizePixel() );
- Rectangle aRect( rRectPixel );
+ tools::Rectangle aRect( rRectPixel );
bool bRet = false;
- aRect.Intersection( Rectangle( Point(), aSizePix ) );
+ aRect.Intersection( tools::Rectangle( Point(), aSizePix ) );
if( !aRect.IsEmpty() && aSizePix != aRect.GetSize())
{
@@ -732,7 +732,7 @@ bool Bitmap::Crop( const Rectangle& rRectPixel )
if( pReadAcc )
{
Point aTmpPoint;
- const Rectangle aNewRect( aTmpPoint, aRect.GetSize() );
+ const tools::Rectangle aNewRect( aTmpPoint, aRect.GetSize() );
Bitmap aNewBmp( aNewRect.GetSize(), GetBitCount(), &pReadAcc->GetPalette() );
ScopedWriteAccess pWriteAcc(aNewBmp);
@@ -761,14 +761,14 @@ bool Bitmap::Crop( const Rectangle& rRectPixel )
return bRet;
};
-bool Bitmap::CopyPixel( const Rectangle& rRectDst,
- const Rectangle& rRectSrc, const Bitmap* pBmpSrc )
+bool Bitmap::CopyPixel( const tools::Rectangle& rRectDst,
+ const tools::Rectangle& rRectSrc, const Bitmap* pBmpSrc )
{
const Size aSizePix( GetSizePixel() );
- Rectangle aRectDst( rRectDst );
+ tools::Rectangle aRectDst( rRectDst );
bool bRet = false;
- aRectDst.Intersection( Rectangle( Point(), aSizePix ) );
+ aRectDst.Intersection( tools::Rectangle( Point(), aSizePix ) );
if( !aRectDst.IsEmpty() )
{
@@ -776,7 +776,7 @@ bool Bitmap::CopyPixel( const Rectangle& rRectDst,
{
Bitmap* pSrc = const_cast<Bitmap*>(pBmpSrc);
const Size aCopySizePix( pSrc->GetSizePixel() );
- Rectangle aRectSrc( rRectSrc );
+ tools::Rectangle aRectSrc( rRectSrc );
const sal_uInt16 nSrcBitCount = pBmpSrc->GetBitCount();
const sal_uInt16 nDstBitCount = GetBitCount();
@@ -829,7 +829,7 @@ bool Bitmap::CopyPixel( const Rectangle& rRectDst,
}
}
- aRectSrc.Intersection( Rectangle( Point(), aCopySizePix ) );
+ aRectSrc.Intersection( tools::Rectangle( Point(), aCopySizePix ) );
if( !aRectSrc.IsEmpty() )
{
@@ -882,9 +882,9 @@ bool Bitmap::CopyPixel( const Rectangle& rRectDst,
}
else
{
- Rectangle aRectSrc( rRectSrc );
+ tools::Rectangle aRectSrc( rRectSrc );
- aRectSrc.Intersection( Rectangle( Point(), aSizePix ) );
+ aRectSrc.Intersection( tools::Rectangle( Point(), aSizePix ) );
if( !aRectSrc.IsEmpty() && ( aRectSrc != aRectDst ) )
{
@@ -938,16 +938,16 @@ bool Bitmap::CopyPixel( const Rectangle& rRectDst,
return bRet;
}
-bool Bitmap::CopyPixel_AlphaOptimized( const Rectangle& rRectDst, const Rectangle& rRectSrc,
+bool Bitmap::CopyPixel_AlphaOptimized( const tools::Rectangle& rRectDst, const tools::Rectangle& rRectSrc,
const Bitmap* pBmpSrc )
{
// Note: this code is copied from Bitmap::CopyPixel but avoids any palette lookups
// This optimization is possible because the palettes of AlphaMasks are always identical (8bit GreyPalette, see ctor)
const Size aSizePix( GetSizePixel() );
- Rectangle aRectDst( rRectDst );
+ tools::Rectangle aRectDst( rRectDst );
bool bRet = false;
- aRectDst.Intersection( Rectangle( Point(), aSizePix ) );
+ aRectDst.Intersection( tools::Rectangle( Point(), aSizePix ) );
if( !aRectDst.IsEmpty() )
{
@@ -955,9 +955,9 @@ bool Bitmap::CopyPixel_AlphaOptimized( const Rectangle& rRectDst, const Rectangl
{
Bitmap* pSrc = const_cast<Bitmap*>(pBmpSrc);
const Size aCopySizePix( pSrc->GetSizePixel() );
- Rectangle aRectSrc( rRectSrc );
+ tools::Rectangle aRectSrc( rRectSrc );
- aRectSrc.Intersection( Rectangle( Point(), aCopySizePix ) );
+ aRectSrc.Intersection( tools::Rectangle( Point(), aCopySizePix ) );
if( !aRectSrc.IsEmpty() )
{
@@ -989,9 +989,9 @@ bool Bitmap::CopyPixel_AlphaOptimized( const Rectangle& rRectDst, const Rectangl
}
else
{
- Rectangle aRectSrc( rRectSrc );
+ tools::Rectangle aRectSrc( rRectSrc );
- aRectSrc.Intersection( Rectangle( Point(), aSizePix ) );
+ aRectSrc.Intersection( tools::Rectangle( Point(), aSizePix ) );
if( !aRectSrc.IsEmpty() && ( aRectSrc != aRectDst ) )
{
@@ -1299,13 +1299,13 @@ Bitmap Bitmap::CreateMask( const Color& rTransColor, sal_uLong nTol ) const
return aNewBmp;
}
-vcl::Region Bitmap::CreateRegion( const Color& rColor, const Rectangle& rRect ) const
+vcl::Region Bitmap::CreateRegion( const Color& rColor, const tools::Rectangle& rRect ) const
{
vcl::Region aRegion;
- Rectangle aRect( rRect );
+ tools::Rectangle aRect( rRect );
ScopedReadAccess pReadAcc(const_cast<Bitmap&>(*this));
- aRect.Intersection( Rectangle( Point(), GetSizePixel() ) );
+ aRect.Intersection( tools::Rectangle( Point(), GetSizePixel() ) );
aRect.Justify();
if( pReadAcc )
@@ -1356,7 +1356,7 @@ vcl::Region Bitmap::CreateRegion( const Color& rColor, const Rectangle& rRect )
// need to write aLine, it's different from the next line
if(aLine.size())
{
- Rectangle aSubRect;
+ tools::Rectangle aSubRect;
// enter y values and proceed ystart
aSubRect.Top() = nYStart;
@@ -1379,7 +1379,7 @@ vcl::Region Bitmap::CreateRegion( const Color& rColor, const Rectangle& rRect )
// write last line if used
if(aLine.size())
{
- Rectangle aSubRect;
+ tools::Rectangle aSubRect;
// enter y values
aSubRect.Top() = nYStart;
diff --git a/vcl/source/gdi/bitmapex.cxx b/vcl/source/gdi/bitmapex.cxx
index 8e0f7f0e22b4..1231ab165367 100644
--- a/vcl/source/gdi/bitmapex.cxx
+++ b/vcl/source/gdi/bitmapex.cxx
@@ -81,8 +81,8 @@ BitmapEx::BitmapEx( const BitmapEx& rBitmapEx, Point aSrc, Size aSize )
else if( rBitmapEx.IsTransparent() )
aMask = Bitmap( aSize, rBitmapEx.aMask.GetBitCount() );
- Rectangle aDestRect( Point( 0, 0 ), aSize );
- Rectangle aSrcRect( aSrc, aSize );
+ tools::Rectangle aDestRect( Point( 0, 0 ), aSize );
+ tools::Rectangle aSrcRect( aSrc, aSize );
CopyPixel( aDestRect, aSrcRect, &rBitmapEx );
}
@@ -447,7 +447,7 @@ bool BitmapEx::Rotate( long nAngle10, const Color& rFillColor )
return bRet;
}
-bool BitmapEx::Crop( const Rectangle& rRectPixel )
+bool BitmapEx::Crop( const tools::Rectangle& rRectPixel )
{
bool bRet = false;
@@ -500,7 +500,7 @@ bool BitmapEx::Expand( sal_uLong nDX, sal_uLong nDY, bool bExpandTransparent )
return bRet;
}
-bool BitmapEx::CopyPixel( const Rectangle& rRectDst, const Rectangle& rRectSrc,
+bool BitmapEx::CopyPixel( const tools::Rectangle& rRectDst, const tools::Rectangle& rRectSrc,
const BitmapEx* pBmpExSrc )
{
bool bRet = false;
@@ -693,7 +693,7 @@ BitmapEx BitmapEx:: AutoScaleBitmap(BitmapEx & aBitmap, const long aStandardSize
}
Size aStdSize( aStandardSize, aStandardSize );
- Rectangle aRect(aEmptyPoint, aStdSize );
+ tools::Rectangle aRect(aEmptyPoint, aStdSize );
ScopedVclPtrInstance< VirtualDevice > aVirDevice(*Application::GetDefaultDevice(),
DeviceFormat::DEFAULT, DeviceFormat::BITMASK);
diff --git a/vcl/source/gdi/bmpacc3.cxx b/vcl/source/gdi/bmpacc3.cxx
index 754a4bb6cc53..f8aeb5c99bf9 100644
--- a/vcl/source/gdi/bmpacc3.cxx
+++ b/vcl/source/gdi/bmpacc3.cxx
@@ -85,7 +85,7 @@ void BitmapWriteAccess::Erase( const Color& rColor )
// use the canonical method to clear the bitmap
BitmapColor* pOldFillColor = mpFillColor ? new BitmapColor(*mpFillColor) : nullptr;
const Point aPoint;
- const Rectangle aRect(aPoint, maBitmap.GetSizePixel());
+ const tools::Rectangle aRect(aPoint, maBitmap.GetSizePixel());
SetFillColor(rColor);
FillRect(aRect);
@@ -229,13 +229,13 @@ void BitmapWriteAccess::DrawLine( const Point& rStart, const Point& rEnd )
}
}
-void BitmapWriteAccess::FillRect( const Rectangle& rRect )
+void BitmapWriteAccess::FillRect( const tools::Rectangle& rRect )
{
if (mpFillColor)
{
const BitmapColor& rFillColor = *mpFillColor.get();
Point aPoint;
- Rectangle aRect(aPoint, maBitmap.GetSizePixel());
+ tools::Rectangle aRect(aPoint, maBitmap.GetSizePixel());
aRect.Intersection(rRect);
@@ -257,7 +257,7 @@ void BitmapWriteAccess::FillRect( const Rectangle& rRect )
}
}
-void BitmapWriteAccess::DrawRect( const Rectangle& rRect )
+void BitmapWriteAccess::DrawRect( const tools::Rectangle& rRect )
{
if (mpFillColor)
FillRect(rRect);
diff --git a/vcl/source/gdi/gdimetafiletools.cxx b/vcl/source/gdi/gdimetafiletools.cxx
index 5bb96bef602a..6cbdcdc0734f 100644
--- a/vcl/source/gdi/gdimetafiletools.cxx
+++ b/vcl/source/gdi/gdimetafiletools.cxx
@@ -313,7 +313,7 @@ void clipMetafileContentAgainstOwnRegions(GDIMetaFile& rSource)
case MetaActionType::ISECTRECTCLIPREGION :
{
const MetaISectRectClipRegionAction* pA = static_cast< const MetaISectRectClipRegionAction* >(pAction);
- const Rectangle& rRect = pA->GetRect();
+ const tools::Rectangle& rRect = pA->GetRect();
if(!rRect.IsEmpty() && aClips.size() && aClips.back().count())
{
@@ -501,7 +501,7 @@ void clipMetafileContentAgainstOwnRegions(GDIMetaFile& rSource)
case MetaActionType::RECT :
{
const MetaRectAction* pA = static_cast< const MetaRectAction* >(pAction);
- const Rectangle& rRect = pA->GetRect();
+ const tools::Rectangle& rRect = pA->GetRect();
if(rRect.IsEmpty())
{
@@ -526,7 +526,7 @@ void clipMetafileContentAgainstOwnRegions(GDIMetaFile& rSource)
case MetaActionType::ROUNDRECT :
{
const MetaRoundRectAction* pA = static_cast< const MetaRoundRectAction* >(pAction);
- const Rectangle& rRect = pA->GetRect();
+ const tools::Rectangle& rRect = pA->GetRect();
if(rRect.IsEmpty())
{
@@ -565,7 +565,7 @@ void clipMetafileContentAgainstOwnRegions(GDIMetaFile& rSource)
case MetaActionType::ELLIPSE :
{
const MetaEllipseAction* pA = static_cast< const MetaEllipseAction* >(pAction);
- const Rectangle& rRect = pA->GetRect();
+ const tools::Rectangle& rRect = pA->GetRect();
if(rRect.IsEmpty())
{
@@ -591,7 +591,7 @@ void clipMetafileContentAgainstOwnRegions(GDIMetaFile& rSource)
case MetaActionType::ARC :
{
const MetaArcAction* pA = static_cast< const MetaArcAction* >(pAction);
- const Rectangle& rRect = pA->GetRect();
+ const tools::Rectangle& rRect = pA->GetRect();
if(rRect.IsEmpty())
{
@@ -617,7 +617,7 @@ void clipMetafileContentAgainstOwnRegions(GDIMetaFile& rSource)
case MetaActionType::PIE :
{
const MetaPieAction* pA = static_cast< const MetaPieAction* >(pAction);
- const Rectangle& rRect = pA->GetRect();
+ const tools::Rectangle& rRect = pA->GetRect();
if(rRect.IsEmpty())
{
@@ -643,7 +643,7 @@ void clipMetafileContentAgainstOwnRegions(GDIMetaFile& rSource)
case MetaActionType::CHORD :
{
const MetaChordAction* pA = static_cast< const MetaChordAction* >(pAction);
- const Rectangle& rRect = pA->GetRect();
+ const tools::Rectangle& rRect = pA->GetRect();
if(rRect.IsEmpty())
{
@@ -799,7 +799,7 @@ void clipMetafileContentAgainstOwnRegions(GDIMetaFile& rSource)
else
{
BitmapEx aCroppedBitmapEx(rBitmapEx);
- const Rectangle aCropRectangle(pA->GetSrcPoint(), pA->GetSrcSize());
+ const tools::Rectangle aCropRectangle(pA->GetSrcPoint(), pA->GetSrcSize());
if(aCropRectangle.IsEmpty())
{
@@ -833,7 +833,7 @@ void clipMetafileContentAgainstOwnRegions(GDIMetaFile& rSource)
else
{
Bitmap aCroppedBitmap(rBitmap);
- const Rectangle aCropRectangle(pA->GetSrcPoint(), pA->GetSrcSize());
+ const tools::Rectangle aCropRectangle(pA->GetSrcPoint(), pA->GetSrcSize());
if(aCropRectangle.IsEmpty())
{
@@ -964,7 +964,7 @@ void clipMetafileContentAgainstOwnRegions(GDIMetaFile& rSource)
case MetaActionType::GRADIENT :
{
const MetaGradientAction* pA = static_cast< const MetaGradientAction* >(pAction);
- const Rectangle& rRect = pA->GetRect();
+ const tools::Rectangle& rRect = pA->GetRect();
if(rRect.IsEmpty())
{
diff --git a/vcl/source/gdi/gdimtf.cxx b/vcl/source/gdi/gdimtf.cxx
index 320e9a1f7af4..3c673b91e7c5 100644
--- a/vcl/source/gdi/gdimtf.cxx
+++ b/vcl/source/gdi/gdimtf.cxx
@@ -748,9 +748,9 @@ void GDIMetaFile::Scale( const Fraction& rScaleX, const Fraction& rScaleY )
Scale( (double) rScaleX, (double) rScaleY );
}
-void GDIMetaFile::Clip( const Rectangle& i_rClipRect )
+void GDIMetaFile::Clip( const tools::Rectangle& i_rClipRect )
{
- Rectangle aCurRect( i_rClipRect );
+ tools::Rectangle aCurRect( i_rClipRect );
ScopedVclPtrInstance< VirtualDevice > aMapVDev;
aMapVDev->EnableOutput( false );
@@ -847,7 +847,7 @@ void GDIMetaFile::Rotate( long nAngle10 )
const double fAngle = F_PI1800 * nAngle10;
const double fSin = sin( fAngle );
const double fCos = cos( fAngle );
- Rectangle aRect=Rectangle( Point(), GetPrefSize() );
+ tools::Rectangle aRect=tools::Rectangle( Point(), GetPrefSize() );
tools::Polygon aPoly( aRect );
aPoly.Rotate( Point(), fSin, fCos );
@@ -855,7 +855,7 @@ void GDIMetaFile::Rotate( long nAngle10 )
aMapVDev->EnableOutput( false );
aMapVDev->SetMapMode( GetPrefMapMode() );
- const Rectangle aNewBound( aPoly.GetBoundRect() );
+ const tools::Rectangle aNewBound( aPoly.GetBoundRect() );
const Point aOrigin( GetPrefMapMode().GetOrigin().X(), GetPrefMapMode().GetOrigin().Y() );
const Size aOffset( -aNewBound.Left(), -aNewBound.Top() );
@@ -1001,8 +1001,8 @@ void GDIMetaFile::Rotate( long nAngle10 )
case( MetaActionType::BMPSCALE ):
{
MetaBmpScaleAction* pAct = static_cast<MetaBmpScaleAction*>(pAction);
- tools::Polygon aBmpPoly( ImplGetRotatedPolygon( Rectangle( pAct->GetPoint(), pAct->GetSize() ), aRotAnchor, aRotOffset, fSin, fCos ) );
- Rectangle aBmpRect( aBmpPoly.GetBoundRect() );
+ tools::Polygon aBmpPoly( ImplGetRotatedPolygon( tools::Rectangle( pAct->GetPoint(), pAct->GetSize() ), aRotAnchor, aRotOffset, fSin, fCos ) );
+ tools::Rectangle aBmpRect( aBmpPoly.GetBoundRect() );
BitmapEx aBmpEx( pAct->GetBitmap() );
aBmpEx.Rotate( nAngle10, Color( COL_TRANSPARENT ) );
@@ -1014,11 +1014,11 @@ void GDIMetaFile::Rotate( long nAngle10 )
case( MetaActionType::BMPSCALEPART ):
{
MetaBmpScalePartAction* pAct = static_cast<MetaBmpScalePartAction*>(pAction);
- tools::Polygon aBmpPoly( ImplGetRotatedPolygon( Rectangle( pAct->GetDestPoint(), pAct->GetDestSize() ), aRotAnchor, aRotOffset, fSin, fCos ) );
- Rectangle aBmpRect( aBmpPoly.GetBoundRect() );
+ tools::Polygon aBmpPoly( ImplGetRotatedPolygon( tools::Rectangle( pAct->GetDestPoint(), pAct->GetDestSize() ), aRotAnchor, aRotOffset, fSin, fCos ) );
+ tools::Rectangle aBmpRect( aBmpPoly.GetBoundRect() );
BitmapEx aBmpEx( pAct->GetBitmap() );
- aBmpEx.Crop( Rectangle( pAct->GetSrcPoint(), pAct->GetSrcSize() ) );
+ aBmpEx.Crop( tools::Rectangle( pAct->GetSrcPoint(), pAct->GetSrcSize() ) );
aBmpEx.Rotate( nAngle10, Color( COL_TRANSPARENT ) );
aMtf.AddAction( new MetaBmpExScaleAction( aBmpRect.TopLeft(), aBmpRect.GetSize(), aBmpEx ) );
@@ -1028,8 +1028,8 @@ void GDIMetaFile::Rotate( long nAngle10 )
case( MetaActionType::BMPEXSCALE ):
{
MetaBmpExScaleAction* pAct = static_cast<MetaBmpExScaleAction*>(pAction);
- tools::Polygon aBmpPoly( ImplGetRotatedPolygon( Rectangle( pAct->GetPoint(), pAct->GetSize() ), aRotAnchor, aRotOffset, fSin, fCos ) );
- Rectangle aBmpRect( aBmpPoly.GetBoundRect() );
+ tools::Polygon aBmpPoly( ImplGetRotatedPolygon( tools::Rectangle( pAct->GetPoint(), pAct->GetSize() ), aRotAnchor, aRotOffset, fSin, fCos ) );
+ tools::Rectangle aBmpRect( aBmpPoly.GetBoundRect() );
BitmapEx aBmpEx( pAct->GetBitmapEx() );
aBmpEx.Rotate( nAngle10, Color( COL_TRANSPARENT ) );
@@ -1041,11 +1041,11 @@ void GDIMetaFile::Rotate( long nAngle10 )
case( MetaActionType::BMPEXSCALEPART ):
{
MetaBmpExScalePartAction* pAct = static_cast<MetaBmpExScalePartAction*>(pAction);
- tools::Polygon aBmpPoly( ImplGetRotatedPolygon( Rectangle( pAct->GetDestPoint(), pAct->GetDestSize() ), aRotAnchor, aRotOffset, fSin, fCos ) );
- Rectangle aBmpRect( aBmpPoly.GetBoundRect() );
+ tools::Polygon aBmpPoly( ImplGetRotatedPolygon( tools::Rectangle( pAct->GetDestPoint(), pAct->GetDestSize() ), aRotAnchor, aRotOffset, fSin, fCos ) );
+ tools::Rectangle aBmpRect( aBmpPoly.GetBoundRect() );
BitmapEx aBmpEx( pAct->GetBitmapEx() );
- aBmpEx.Crop( Rectangle( pAct->GetSrcPoint(), pAct->GetSrcSize() ) );
+ aBmpEx.Crop( tools::Rectangle( pAct->GetSrcPoint(), pAct->GetSrcSize() ) );
aBmpEx.Rotate( nAngle10, Color( COL_TRANSPARENT ) );
aMtf.AddAction( new MetaBmpExScaleAction( aBmpRect.TopLeft(), aBmpRect.GetSize(), aBmpEx ) );
@@ -1182,8 +1182,8 @@ void GDIMetaFile::Rotate( long nAngle10 )
{
MetaFloatTransparentAction* pAct = static_cast<MetaFloatTransparentAction*>(pAction);
GDIMetaFile aTransMtf( pAct->GetGDIMetaFile() );
- tools::Polygon aMtfPoly( ImplGetRotatedPolygon( Rectangle( pAct->GetPoint(), pAct->GetSize() ), aRotAnchor, aRotOffset, fSin, fCos ) );
- Rectangle aMtfRect( aMtfPoly.GetBoundRect() );
+ tools::Polygon aMtfPoly( ImplGetRotatedPolygon( tools::Rectangle( pAct->GetPoint(), pAct->GetSize() ), aRotAnchor, aRotOffset, fSin, fCos ) );
+ tools::Rectangle aMtfRect( aMtfPoly.GetBoundRect() );
aTransMtf.Rotate( nAngle10 );
aMtf.AddAction( new MetaFloatTransparentAction( aTransMtf, aMtfRect.TopLeft(), aMtfRect.GetSize(),
@@ -1195,8 +1195,8 @@ void GDIMetaFile::Rotate( long nAngle10 )
{
MetaEPSAction* pAct = static_cast<MetaEPSAction*>(pAction);
GDIMetaFile aEPSMtf( pAct->GetSubstitute() );
- tools::Polygon aEPSPoly( ImplGetRotatedPolygon( Rectangle( pAct->GetPoint(), pAct->GetSize() ), aRotAnchor, aRotOffset, fSin, fCos ) );
- Rectangle aEPSRect( aEPSPoly.GetBoundRect() );
+ tools::Polygon aEPSPoly( ImplGetRotatedPolygon( tools::Rectangle( pAct->GetPoint(), pAct->GetSize() ), aRotAnchor, aRotOffset, fSin, fCos ) );
+ tools::Rectangle aEPSRect( aEPSPoly.GetBoundRect() );
aEPSMtf.Rotate( nAngle10 );
aMtf.AddAction( new MetaEPSAction( aEPSRect.TopLeft(), aEPSRect.GetSize(),
@@ -1298,12 +1298,12 @@ void GDIMetaFile::Rotate( long nAngle10 )
}
}
-static void ImplActionBounds( Rectangle& o_rOutBounds,
- const Rectangle& i_rInBounds,
- const std::vector<Rectangle>& i_rClipStack,
- Rectangle* o_pHairline )
+static void ImplActionBounds( tools::Rectangle& o_rOutBounds,
+ const tools::Rectangle& i_rInBounds,
+ const std::vector<tools::Rectangle>& i_rClipStack,
+ tools::Rectangle* o_pHairline )
{
- Rectangle aBounds( i_rInBounds );
+ tools::Rectangle aBounds( i_rInBounds );
if( ! i_rInBounds.IsEmpty() && ! i_rClipStack.empty() && ! i_rClipStack.back().IsEmpty() )
aBounds.Intersection( i_rClipStack.back() );
if( ! aBounds.IsEmpty() )
@@ -1323,7 +1323,7 @@ static void ImplActionBounds( Rectangle& o_rOutBounds,
}
}
-Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHairline ) const
+tools::Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, tools::Rectangle* pHairline ) const
{
GDIMetaFile aMtf;
ScopedVclPtrInstance< VirtualDevice > aMapVDev( i_rReference );
@@ -1331,13 +1331,13 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai
aMapVDev->EnableOutput( false );
aMapVDev->SetMapMode( GetPrefMapMode() );
- std::vector<Rectangle> aClipStack( 1, Rectangle() );
+ std::vector<tools::Rectangle> aClipStack( 1, tools::Rectangle() );
std::vector<PushFlags> aPushFlagStack;
- Rectangle aBound;
+ tools::Rectangle aBound;
if(pHairline)
- *pHairline = Rectangle();
+ *pHairline = tools::Rectangle();
const sal_uLong nCount(GetActionSize());
@@ -1345,7 +1345,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai
{
MetaAction* pAction = GetAction(a);
const MetaActionType nActionType = pAction->GetType();
- Rectangle* pUseHairline = (pHairline && aMapVDev->IsLineColor()) ? pHairline : nullptr;
+ tools::Rectangle* pUseHairline = (pHairline && aMapVDev->IsLineColor()) ? pHairline : nullptr;
switch( nActionType )
{
@@ -1353,7 +1353,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai
{
MetaPixelAction* pAct = static_cast<MetaPixelAction*>(pAction);
ImplActionBounds( aBound,
- Rectangle( OutputDevice::LogicToLogic( pAct->GetPoint(), aMapVDev->GetMapMode(), GetPrefMapMode() ),
+ tools::Rectangle( OutputDevice::LogicToLogic( pAct->GetPoint(), aMapVDev->GetMapMode(), GetPrefMapMode() ),
aMapVDev->PixelToLogic( Size( 1, 1 ), GetPrefMapMode() ) ),
aClipStack, pUseHairline );
}
@@ -1363,7 +1363,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai
{
MetaPointAction* pAct = static_cast<MetaPointAction*>(pAction);
ImplActionBounds( aBound,
- Rectangle( OutputDevice::LogicToLogic( pAct->GetPoint(), aMapVDev->GetMapMode(), GetPrefMapMode() ),
+ tools::Rectangle( OutputDevice::LogicToLogic( pAct->GetPoint(), aMapVDev->GetMapMode(), GetPrefMapMode() ),
aMapVDev->PixelToLogic( Size( 1, 1 ), GetPrefMapMode() ) ),
aClipStack, pUseHairline );
}
@@ -1373,7 +1373,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai
{
MetaLineAction* pAct = static_cast<MetaLineAction*>(pAction);
Point aP1( pAct->GetStartPoint() ), aP2( pAct->GetEndPoint() );
- Rectangle aRect( aP1, aP2 );
+ tools::Rectangle aRect( aP1, aP2 );
aRect.Justify();
if(pUseHairline)
@@ -1439,7 +1439,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai
case( MetaActionType::POLYLINE ):
{
MetaPolyLineAction* pAct = static_cast<MetaPolyLineAction*>(pAction);
- Rectangle aRect( pAct->GetPolygon().GetBoundRect() );
+ tools::Rectangle aRect( pAct->GetPolygon().GetBoundRect() );
if(pUseHairline)
{
@@ -1456,7 +1456,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai
case( MetaActionType::POLYGON ):
{
MetaPolygonAction* pAct = static_cast<MetaPolygonAction*>(pAction);
- Rectangle aRect( pAct->GetPolygon().GetBoundRect() );
+ tools::Rectangle aRect( pAct->GetPolygon().GetBoundRect() );
ImplActionBounds( aBound, OutputDevice::LogicToLogic( aRect, aMapVDev->GetMapMode(), GetPrefMapMode() ), aClipStack, pUseHairline );
}
break;
@@ -1464,7 +1464,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai
case( MetaActionType::POLYPOLYGON ):
{
MetaPolyPolygonAction* pAct = static_cast<MetaPolyPolygonAction*>(pAction);
- Rectangle aRect( pAct->GetPolyPolygon().GetBoundRect() );
+ tools::Rectangle aRect( pAct->GetPolyPolygon().GetBoundRect() );
ImplActionBounds( aBound, OutputDevice::LogicToLogic( aRect, aMapVDev->GetMapMode(), GetPrefMapMode() ), aClipStack, pUseHairline );
}
break;
@@ -1472,7 +1472,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai
case( MetaActionType::TEXT ):
{
MetaTextAction* pAct = static_cast<MetaTextAction*>(pAction);
- Rectangle aRect;
+ tools::Rectangle aRect;
// hdu said base = index
aMapVDev->GetTextBoundRect( aRect, pAct->GetText(), pAct->GetIndex(), pAct->GetIndex(), pAct->GetLen() );
Point aPt( pAct->GetPoint() );
@@ -1484,7 +1484,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai
case( MetaActionType::TEXTARRAY ):
{
MetaTextArrayAction* pAct = static_cast<MetaTextArrayAction*>(pAction);
- Rectangle aRect;
+ tools::Rectangle aRect;
// hdu said base = index
aMapVDev->GetTextBoundRect( aRect, pAct->GetText(), pAct->GetIndex(), pAct->GetIndex(), pAct->GetLen(),
0, pAct->GetDXArray() );
@@ -1497,7 +1497,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai
case( MetaActionType::STRETCHTEXT ):
{
MetaStretchTextAction* pAct = static_cast<MetaStretchTextAction*>(pAction);
- Rectangle aRect;
+ tools::Rectangle aRect;
// hdu said base = index
aMapVDev->GetTextBoundRect( aRect, pAct->GetText(), pAct->GetIndex(), pAct->GetIndex(), pAct->GetLen(),
pAct->GetWidth() );
@@ -1514,7 +1514,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai
static const sal_Unicode pStr[] = { 0xc4, 0x67, 0 };
OUString aStr( pStr );
- Rectangle aRect;
+ tools::Rectangle aRect;
aMapVDev->GetTextBoundRect( aRect, aStr, 0, 0, aStr.getLength() );
Point aPt( pAct->GetStartPoint() );
aRect.Move( aPt.X(), aPt.Y() );
@@ -1526,7 +1526,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai
case( MetaActionType::BMPSCALE ):
{
MetaBmpScaleAction* pAct = static_cast<MetaBmpScaleAction*>(pAction);
- Rectangle aRect( pAct->GetPoint(), pAct->GetSize() );
+ tools::Rectangle aRect( pAct->GetPoint(), pAct->GetSize() );
ImplActionBounds( aBound, OutputDevice::LogicToLogic( aRect, aMapVDev->GetMapMode(), GetPrefMapMode() ), aClipStack, nullptr );
}
break;
@@ -1534,7 +1534,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai
case( MetaActionType::BMPSCALEPART ):
{
MetaBmpScalePartAction* pAct = static_cast<MetaBmpScalePartAction*>(pAction);
- Rectangle aRect( pAct->GetDestPoint(), pAct->GetDestSize() );
+ tools::Rectangle aRect( pAct->GetDestPoint(), pAct->GetDestSize() );
ImplActionBounds( aBound, OutputDevice::LogicToLogic( aRect, aMapVDev->GetMapMode(), GetPrefMapMode() ), aClipStack, nullptr );
}
break;
@@ -1542,7 +1542,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai
case( MetaActionType::BMPEXSCALE ):
{
MetaBmpExScaleAction* pAct = static_cast<MetaBmpExScaleAction*>(pAction);
- Rectangle aRect( pAct->GetPoint(), pAct->GetSize() );
+ tools::Rectangle aRect( pAct->GetPoint(), pAct->GetSize() );
ImplActionBounds( aBound, OutputDevice::LogicToLogic( aRect, aMapVDev->GetMapMode(), GetPrefMapMode() ), aClipStack, nullptr );
}
break;
@@ -1550,7 +1550,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai
case( MetaActionType::BMPEXSCALEPART ):
{
MetaBmpExScalePartAction* pAct = static_cast<MetaBmpExScalePartAction*>(pAction);
- Rectangle aRect( pAct->GetDestPoint(), pAct->GetDestSize() );
+ tools::Rectangle aRect( pAct->GetDestPoint(), pAct->GetDestSize() );
ImplActionBounds( aBound, OutputDevice::LogicToLogic( aRect, aMapVDev->GetMapMode(), GetPrefMapMode() ), aClipStack, nullptr );
}
break;
@@ -1558,7 +1558,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai
case( MetaActionType::GRADIENT ):
{
MetaGradientAction* pAct = static_cast<MetaGradientAction*>(pAction);
- Rectangle aRect( pAct->GetRect() );
+ tools::Rectangle aRect( pAct->GetRect() );
ImplActionBounds( aBound, OutputDevice::LogicToLogic( aRect, aMapVDev->GetMapMode(), GetPrefMapMode() ), aClipStack, nullptr );
}
break;
@@ -1566,7 +1566,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai
case( MetaActionType::GRADIENTEX ):
{
MetaGradientExAction* pAct = static_cast<MetaGradientExAction*>(pAction);
- Rectangle aRect( pAct->GetPolyPolygon().GetBoundRect() );
+ tools::Rectangle aRect( pAct->GetPolyPolygon().GetBoundRect() );
ImplActionBounds( aBound, OutputDevice::LogicToLogic( aRect, aMapVDev->GetMapMode(), GetPrefMapMode() ), aClipStack, nullptr );
}
break;
@@ -1580,7 +1580,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai
case( MetaActionType::HATCH ):
{
MetaHatchAction* pAct = static_cast<MetaHatchAction*>(pAction);
- Rectangle aRect( pAct->GetPolyPolygon().GetBoundRect() );
+ tools::Rectangle aRect( pAct->GetPolyPolygon().GetBoundRect() );
ImplActionBounds( aBound, OutputDevice::LogicToLogic( aRect, aMapVDev->GetMapMode(), GetPrefMapMode() ), aClipStack, nullptr );
}
break;
@@ -1588,7 +1588,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai
case( MetaActionType::Transparent ):
{
MetaTransparentAction* pAct = static_cast<MetaTransparentAction*>(pAction);
- Rectangle aRect( pAct->GetPolyPolygon().GetBoundRect() );
+ tools::Rectangle aRect( pAct->GetPolyPolygon().GetBoundRect() );
ImplActionBounds( aBound, OutputDevice::LogicToLogic( aRect, aMapVDev->GetMapMode(), GetPrefMapMode() ), aClipStack, nullptr );
}
break;
@@ -1598,7 +1598,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai
MetaFloatTransparentAction* pAct = static_cast<MetaFloatTransparentAction*>(pAction);
// MetaFloatTransparentAction is defined limiting its content Metafile
// to its geometry definition(Point, Size), so use these directly
- const Rectangle aRect( pAct->GetPoint(), pAct->GetSize() );
+ const tools::Rectangle aRect( pAct->GetPoint(), pAct->GetSize() );
ImplActionBounds( aBound, OutputDevice::LogicToLogic( aRect, aMapVDev->GetMapMode(), GetPrefMapMode() ), aClipStack, nullptr );
}
break;
@@ -1606,7 +1606,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai
case( MetaActionType::EPS ):
{
MetaEPSAction* pAct = static_cast<MetaEPSAction*>(pAction);
- Rectangle aRect( pAct->GetPoint(), pAct->GetSize() );
+ tools::Rectangle aRect( pAct->GetPoint(), pAct->GetSize() );
ImplActionBounds( aBound, OutputDevice::LogicToLogic( aRect, aMapVDev->GetMapMode(), GetPrefMapMode() ), aClipStack, nullptr );
}
break;
@@ -1617,14 +1617,14 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai
if( pAct->IsClipping() )
aClipStack.back() = OutputDevice::LogicToLogic( pAct->GetRegion().GetBoundRect(), aMapVDev->GetMapMode(), GetPrefMapMode() );
else
- aClipStack.back() = Rectangle();
+ aClipStack.back() = tools::Rectangle();
}
break;
case( MetaActionType::ISECTRECTCLIPREGION ):
{
MetaISectRectClipRegionAction* pAct = static_cast<MetaISectRectClipRegionAction*>(pAction);
- Rectangle aRect( OutputDevice::LogicToLogic( pAct->GetRect(), aMapVDev->GetMapMode(), GetPrefMapMode() ) );
+ tools::Rectangle aRect( OutputDevice::LogicToLogic( pAct->GetRect(), aMapVDev->GetMapMode(), GetPrefMapMode() ) );
if( aClipStack.back().IsEmpty() )
aClipStack.back() = aRect;
else
@@ -1635,7 +1635,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai
case( MetaActionType::ISECTREGIONCLIPREGION ):
{
MetaISectRegionClipRegionAction* pAct = static_cast<MetaISectRegionClipRegionAction*>(pAction);
- Rectangle aRect( OutputDevice::LogicToLogic( pAct->GetRegion().GetBoundRect(), aMapVDev->GetMapMode(), GetPrefMapMode() ) );
+ tools::Rectangle aRect( OutputDevice::LogicToLogic( pAct->GetRegion().GetBoundRect(), aMapVDev->GetMapMode(), GetPrefMapMode() ) );
if( aClipStack.back().IsEmpty() )
aClipStack.back() = aRect;
else
@@ -1646,7 +1646,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai
case( MetaActionType::BMP ):
{
MetaBmpAction* pAct = static_cast<MetaBmpAction*>(pAction);
- Rectangle aRect( pAct->GetPoint(), aMapVDev->PixelToLogic( pAct->GetBitmap().GetSizePixel() ) );
+ tools::Rectangle aRect( pAct->GetPoint(), aMapVDev->PixelToLogic( pAct->GetBitmap().GetSizePixel() ) );
ImplActionBounds( aBound, OutputDevice::LogicToLogic( aRect, aMapVDev->GetMapMode(), GetPrefMapMode() ), aClipStack, nullptr );
}
break;
@@ -1654,7 +1654,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai
case( MetaActionType::BMPEX ):
{
MetaBmpExAction* pAct = static_cast<MetaBmpExAction*>(pAction);
- Rectangle aRect( pAct->GetPoint(), aMapVDev->PixelToLogic( pAct->GetBitmapEx().GetSizePixel() ) );
+ tools::Rectangle aRect( pAct->GetPoint(), aMapVDev->PixelToLogic( pAct->GetBitmapEx().GetSizePixel() ) );
ImplActionBounds( aBound, OutputDevice::LogicToLogic( aRect, aMapVDev->GetMapMode(), GetPrefMapMode() ), aClipStack, nullptr );
}
break;
@@ -1662,7 +1662,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai
case( MetaActionType::MASK ):
{
MetaMaskAction* pAct = static_cast<MetaMaskAction*>(pAction);
- Rectangle aRect( pAct->GetPoint(), aMapVDev->PixelToLogic( pAct->GetBitmap().GetSizePixel() ) );
+ tools::Rectangle aRect( pAct->GetPoint(), aMapVDev->PixelToLogic( pAct->GetBitmap().GetSizePixel() ) );
ImplActionBounds( aBound, OutputDevice::LogicToLogic( aRect, aMapVDev->GetMapMode(), GetPrefMapMode() ), aClipStack, nullptr );
}
break;
@@ -1670,7 +1670,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai
case( MetaActionType::MASKSCALE ):
{
MetaMaskScalePartAction* pAct = static_cast<MetaMaskScalePartAction*>(pAction);
- Rectangle aRect( pAct->GetDestPoint(), pAct->GetDestSize() );
+ tools::Rectangle aRect( pAct->GetDestPoint(), pAct->GetDestSize() );
ImplActionBounds( aBound, OutputDevice::LogicToLogic( aRect, aMapVDev->GetMapMode(), GetPrefMapMode() ), aClipStack, nullptr );
}
break;
@@ -1678,7 +1678,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai
case( MetaActionType::MASKSCALEPART ):
{
MetaMaskScalePartAction* pAct = static_cast<MetaMaskScalePartAction*>(pAction);
- Rectangle aRect( pAct->GetDestPoint(), pAct->GetDestSize() );
+ tools::Rectangle aRect( pAct->GetDestPoint(), pAct->GetDestSize() );
ImplActionBounds( aBound, OutputDevice::LogicToLogic( aRect, aMapVDev->GetMapMode(), GetPrefMapMode() ), aClipStack, nullptr );
}
break;
@@ -1686,7 +1686,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai
case( MetaActionType::WALLPAPER ):
{
MetaWallpaperAction* pAct = static_cast<MetaWallpaperAction*>(pAction);
- Rectangle aRect( pAct->GetRect() );
+ tools::Rectangle aRect( pAct->GetRect() );
ImplActionBounds( aBound, OutputDevice::LogicToLogic( aRect, aMapVDev->GetMapMode(), GetPrefMapMode() ), aClipStack, nullptr );
}
break;
@@ -1694,7 +1694,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai
case( MetaActionType::TEXTRECT ):
{
MetaTextRectAction* pAct = static_cast<MetaTextRectAction*>(pAction);
- Rectangle aRect( pAct->GetRect() );
+ tools::Rectangle aRect( pAct->GetRect() );
ImplActionBounds( aBound, OutputDevice::LogicToLogic( aRect, aMapVDev->GetMapMode(), GetPrefMapMode() ), aClipStack, nullptr );
}
break;
@@ -1721,7 +1721,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai
aPushFlagStack.push_back( pAct->GetFlags() );
if( aPushFlagStack.back() & PushFlags::CLIPREGION )
{
- Rectangle aRect( aClipStack.back() );
+ tools::Rectangle aRect( aClipStack.back() );
aClipStack.push_back( aRect );
}
}
@@ -1948,7 +1948,7 @@ void GDIMetaFile::ImplExchangeColors( ColorExchangeFnc pFncCol, const void* pCol
{
MetaWallpaperAction* pAct = static_cast<MetaWallpaperAction*>(pAction);
Wallpaper aWall( pAct->GetWallpaper() );
- const Rectangle& rRect = pAct->GetRect();
+ const tools::Rectangle& rRect = pAct->GetRect();
aWall.SetColor( pFncCol( aWall.GetColor(), pColParam ) );
diff --git a/vcl/source/gdi/gradient.cxx b/vcl/source/gdi/gradient.cxx
index 69ac7b7f9339..7de77e20dc7f 100644
--- a/vcl/source/gdi/gradient.cxx
+++ b/vcl/source/gdi/gradient.cxx
@@ -145,9 +145,9 @@ void Gradient::SetSteps( sal_uInt16 nSteps )
mpImplGradient->mnStepCount = nSteps;
}
-void Gradient::GetBoundRect( const Rectangle& rRect, Rectangle& rBoundRect, Point& rCenter ) const
+void Gradient::GetBoundRect( const tools::Rectangle& rRect, tools::Rectangle& rBoundRect, Point& rCenter ) const
{
- Rectangle aRect( rRect );
+ tools::Rectangle aRect( rRect );
sal_uInt16 nAngle = GetAngle() % 3600;
if( GetStyle() == GradientStyle::Linear || GetStyle() == GradientStyle::Axial )
diff --git a/vcl/source/gdi/graph.cxx b/vcl/source/gdi/graph.cxx
index 69be7c08b8b9..54bcc706f987 100644
--- a/vcl/source/gdi/graph.cxx
+++ b/vcl/source/gdi/graph.cxx
@@ -45,7 +45,7 @@ void ImplDrawDefault( OutputDevice* pOutDev, const OUString* pText,
Point aPoint( rDestPt.X() + nPixelWidth, rDestPt.Y() + nPixelWidth );
Size aSize( rDestSize.Width() - ( nPixelWidth << 1 ), rDestSize.Height() - ( nPixelWidth << 1 ) );
bool bFilled = ( pBitmap != nullptr || pBitmapEx != nullptr || pFont != nullptr );
- Rectangle aBorderRect( aPoint, aSize );
+ tools::Rectangle aBorderRect( aPoint, aSize );
pOutDev->Push();
diff --git a/vcl/source/gdi/impanmvw.cxx b/vcl/source/gdi/impanmvw.cxx
index 185fee4b95f3..45928c4dbec3 100644
--- a/vcl/source/gdi/impanmvw.cxx
+++ b/vcl/source/gdi/impanmvw.cxx
@@ -180,7 +180,7 @@ void ImplAnimView::drawToPos( sal_uLong nPos )
pRenderContext->DrawOutDev( maDispPt, maDispSz, Point(), maSzPix, *aVDev.get() );
if (pGuard)
- pGuard->SetPaintRect(Rectangle(maDispPt, maDispSz));
+ pGuard->SetPaintRect(tools::Rectangle(maDispPt, maDispSz));
if (xOldClip)
pRenderContext->SetClipRegion(*xOldClip);
@@ -198,10 +198,10 @@ void ImplAnimView::draw( sal_uLong nPos, VirtualDevice* pVDev )
pRenderContext = pGuard->GetRenderContext();
}
- Rectangle aOutRect( pRenderContext->PixelToLogic( Point() ), pRenderContext->GetOutputSize() );
+ tools::Rectangle aOutRect( pRenderContext->PixelToLogic( Point() ), pRenderContext->GetOutputSize() );
// check, if output lies out of display
- if( aOutRect.Intersection( Rectangle( maDispPt, maDispSz ) ).IsEmpty() )
+ if( aOutRect.Intersection( tools::Rectangle( maDispPt, maDispSz ) ).IsEmpty() )
setMarked( true );
else if( !mbPause )
{
@@ -292,7 +292,7 @@ void ImplAnimView::draw( sal_uLong nPos, VirtualDevice* pVDev )
pRenderContext->DrawOutDev( maDispPt, maDispSz, Point(), maSzPix, *pDev );
if (pGuard)
- pGuard->SetPaintRect(Rectangle(maDispPt, maDispSz));
+ pGuard->SetPaintRect(tools::Rectangle(maDispPt, maDispSz));
if( xOldClip)
{
diff --git a/vcl/source/gdi/impgraph.cxx b/vcl/source/gdi/impgraph.cxx
index ee81b1447a0a..92d29e547068 100644
--- a/vcl/source/gdi/impgraph.cxx
+++ b/vcl/source/gdi/impgraph.cxx
@@ -489,8 +489,8 @@ Bitmap ImpGraphic::ImplGetBitmap(const GraphicConversionParameters& rParameters)
if(GraphicType::GdiMetafile == ImplGetType())
{
// get hairline and full bound rect
- Rectangle aHairlineRect;
- const Rectangle aRect(maMetaFile.GetBoundRect(*aVDev.get(), &aHairlineRect));
+ tools::Rectangle aHairlineRect;
+ const tools::Rectangle aRect(maMetaFile.GetBoundRect(*aVDev.get(), &aHairlineRect));
if(!aRect.IsEmpty() && !aHairlineRect.IsEmpty())
{
diff --git a/vcl/source/gdi/impvect.cxx b/vcl/source/gdi/impvect.cxx
index 8f2cf84e6d9a..0de467a03d38 100644
--- a/vcl/source/gdi/impvect.cxx
+++ b/vcl/source/gdi/impvect.cxx
@@ -741,7 +741,7 @@ void ImplLimitPolyPoly( tools::PolyPolygon& rPolyPoly )
for( sal_uInt16 i = 0, nCount = rPolyPoly.Count(); i < nCount; i++ )
{
- const Rectangle aBound( rPolyPoly[ i ].GetBoundRect() );
+ const tools::Rectangle aBound( rPolyPoly[ i ].GetBoundRect() );
if( aBound.GetWidth() > nReduce && aBound.GetHeight() > nReduce )
{
@@ -881,7 +881,7 @@ void ImplCalculate( ImplVectMap* pMap, tools::PolyPolygon& rPolyPoly, sal_uInt8
{
if( cReduce )
{
- const Rectangle aBound( rPoly.GetBoundRect() );
+ const tools::Rectangle aBound( rPoly.GetBoundRect() );
if( aBound.GetWidth() > cReduce && aBound.GetHeight() > cReduce )
rPolyPoly.Insert( rPoly );
diff --git a/vcl/source/gdi/metaact.cxx b/vcl/source/gdi/metaact.cxx
index 0f277234cdca..1ce4182bafa4 100644
--- a/vcl/source/gdi/metaact.cxx
+++ b/vcl/source/gdi/metaact.cxx
@@ -113,7 +113,7 @@ inline void ImplScalePoint( Point& rPt, double fScaleX, double fScaleY )
rPt.Y() = FRound( fScaleY * rPt.Y() );
}
-inline void ImplScaleRect( Rectangle& rRect, double fScaleX, double fScaleY )
+inline void ImplScaleRect( tools::Rectangle& rRect, double fScaleX, double fScaleY )
{
Point aTL( rRect.TopLeft() );
Point aBR( rRect.BottomRight() );
@@ -121,7 +121,7 @@ inline void ImplScaleRect( Rectangle& rRect, double fScaleX, double fScaleY )
ImplScalePoint( aTL, fScaleX, fScaleY );
ImplScalePoint( aBR, fScaleX, fScaleY );
- rRect = Rectangle( aTL, aBR );
+ rRect = tools::Rectangle( aTL, aBR );
rRect.Justify();
}
@@ -446,7 +446,7 @@ MetaRectAction::MetaRectAction() :
MetaRectAction::~MetaRectAction()
{}
-MetaRectAction::MetaRectAction( const Rectangle& rRect ) :
+MetaRectAction::MetaRectAction( const tools::Rectangle& rRect ) :
MetaAction ( MetaActionType::RECT ),
maRect ( rRect )
{}
@@ -495,7 +495,7 @@ MetaRoundRectAction::MetaRoundRectAction() :
MetaRoundRectAction::~MetaRoundRectAction()
{}
-MetaRoundRectAction::MetaRoundRectAction( const Rectangle& rRect,
+MetaRoundRectAction::MetaRoundRectAction( const tools::Rectangle& rRect,
sal_uInt32 nHorzRound, sal_uInt32 nVertRound ) :
MetaAction ( MetaActionType::ROUNDRECT ),
maRect ( rRect ),
@@ -548,7 +548,7 @@ MetaEllipseAction::MetaEllipseAction() :
MetaEllipseAction::~MetaEllipseAction()
{}
-MetaEllipseAction::MetaEllipseAction( const Rectangle& rRect ) :
+MetaEllipseAction::MetaEllipseAction( const tools::Rectangle& rRect ) :
MetaAction ( MetaActionType::ELLIPSE ),
maRect ( rRect )
{}
@@ -595,7 +595,7 @@ MetaArcAction::MetaArcAction() :
MetaArcAction::~MetaArcAction()
{}
-MetaArcAction::MetaArcAction( const Rectangle& rRect,
+MetaArcAction::MetaArcAction( const tools::Rectangle& rRect,
const Point& rStart, const Point& rEnd ) :
MetaAction ( MetaActionType::ARC ),
maRect ( rRect ),
@@ -653,7 +653,7 @@ MetaPieAction::MetaPieAction() :
MetaPieAction::~MetaPieAction()
{}
-MetaPieAction::MetaPieAction( const Rectangle& rRect,
+MetaPieAction::MetaPieAction( const tools::Rectangle& rRect,
const Point& rStart, const Point& rEnd ) :
MetaAction ( MetaActionType::PIE ),
maRect ( rRect ),
@@ -711,7 +711,7 @@ MetaChordAction::MetaChordAction() :
MetaChordAction::~MetaChordAction()
{}
-MetaChordAction::MetaChordAction( const Rectangle& rRect,
+MetaChordAction::MetaChordAction( const tools::Rectangle& rRect,
const Point& rStart, const Point& rEnd ) :
MetaAction ( MetaActionType::CHORD ),
maRect ( rRect ),
@@ -1313,7 +1313,7 @@ MetaTextRectAction::MetaTextRectAction() :
MetaTextRectAction::~MetaTextRectAction()
{}
-MetaTextRectAction::MetaTextRectAction( const Rectangle& rRect,
+MetaTextRectAction::MetaTextRectAction( const tools::Rectangle& rRect,
const OUString& rStr, DrawTextFlags nStyle ) :
MetaAction ( MetaActionType::TEXTRECT ),
maRect ( rRect ),
@@ -1538,7 +1538,7 @@ void MetaBmpScaleAction::Move( long nHorzMove, long nVertMove )
void MetaBmpScaleAction::Scale( double fScaleX, double fScaleY )
{
- Rectangle aRectangle(maPt, maSz);
+ tools::Rectangle aRectangle(maPt, maSz);
ImplScaleRect( aRectangle, fScaleX, fScaleY );
maPt = aRectangle.TopLeft();
maSz = aRectangle.GetSize();
@@ -1601,7 +1601,7 @@ void MetaBmpScalePartAction::Move( long nHorzMove, long nVertMove )
void MetaBmpScalePartAction::Scale( double fScaleX, double fScaleY )
{
- Rectangle aRectangle(maDstPt, maDstSz);
+ tools::Rectangle aRectangle(maDstPt, maDstSz);
ImplScaleRect( aRectangle, fScaleX, fScaleY );
maDstPt = aRectangle.TopLeft();
maDstSz = aRectangle.GetSize();
@@ -1718,7 +1718,7 @@ void MetaBmpExScaleAction::Move( long nHorzMove, long nVertMove )
void MetaBmpExScaleAction::Scale( double fScaleX, double fScaleY )
{
- Rectangle aRectangle(maPt, maSz);
+ tools::Rectangle aRectangle(maPt, maSz);
ImplScaleRect( aRectangle, fScaleX, fScaleY );
maPt = aRectangle.TopLeft();
maSz = aRectangle.GetSize();
@@ -1781,7 +1781,7 @@ void MetaBmpExScalePartAction::Move( long nHorzMove, long nVertMove )
void MetaBmpExScalePartAction::Scale( double fScaleX, double fScaleY )
{
- Rectangle aRectangle(maDstPt, maDstSz);
+ tools::Rectangle aRectangle(maDstPt, maDstSz);
ImplScaleRect( aRectangle, fScaleX, fScaleY );
maDstPt = aRectangle.TopLeft();
maDstSz = aRectangle.GetSize();
@@ -1903,7 +1903,7 @@ void MetaMaskScaleAction::Move( long nHorzMove, long nVertMove )
void MetaMaskScaleAction::Scale( double fScaleX, double fScaleY )
{
- Rectangle aRectangle(maPt, maSz);
+ tools::Rectangle aRectangle(maPt, maSz);
ImplScaleRect( aRectangle, fScaleX, fScaleY );
maPt = aRectangle.TopLeft();
maSz = aRectangle.GetSize();
@@ -1968,7 +1968,7 @@ void MetaMaskScalePartAction::Move( long nHorzMove, long nVertMove )
void MetaMaskScalePartAction::Scale( double fScaleX, double fScaleY )
{
- Rectangle aRectangle(maDstPt, maDstSz);
+ tools::Rectangle aRectangle(maDstPt, maDstSz);
ImplScaleRect( aRectangle, fScaleX, fScaleY );
maDstPt = aRectangle.TopLeft();
maDstSz = aRectangle.GetSize();
@@ -2007,7 +2007,7 @@ MetaGradientAction::MetaGradientAction() :
MetaGradientAction::~MetaGradientAction()
{}
-MetaGradientAction::MetaGradientAction( const Rectangle& rRect, const Gradient& rGradient ) :
+MetaGradientAction::MetaGradientAction( const tools::Rectangle& rRect, const Gradient& rGradient ) :
MetaAction ( MetaActionType::GRADIENT ),
maRect ( rRect ),
maGradient ( rGradient )
@@ -2173,7 +2173,7 @@ MetaWallpaperAction::MetaWallpaperAction() :
MetaWallpaperAction::~MetaWallpaperAction()
{}
-MetaWallpaperAction::MetaWallpaperAction( const Rectangle& rRect,
+MetaWallpaperAction::MetaWallpaperAction( const tools::Rectangle& rRect,
const Wallpaper& rPaper ) :
MetaAction ( MetaActionType::WALLPAPER ),
maRect ( rRect ),
@@ -2278,7 +2278,7 @@ MetaISectRectClipRegionAction::MetaISectRectClipRegionAction() :
MetaISectRectClipRegionAction::~MetaISectRectClipRegionAction()
{}
-MetaISectRectClipRegionAction::MetaISectRectClipRegionAction( const Rectangle& rRect ) :
+MetaISectRectClipRegionAction::MetaISectRectClipRegionAction( const tools::Rectangle& rRect ) :
MetaAction ( MetaActionType::ISECTRECTCLIPREGION ),
maRect ( rRect )
{}
@@ -3029,7 +3029,7 @@ void MetaFloatTransparentAction::Move( long nHorzMove, long nVertMove )
void MetaFloatTransparentAction::Scale( double fScaleX, double fScaleY )
{
- Rectangle aRectangle(maPoint, maSize);
+ tools::Rectangle aRectangle(maPoint, maSize);
ImplScaleRect( aRectangle, fScaleX, fScaleY );
maPoint = aRectangle.TopLeft();
maSize = aRectangle.GetSize();
@@ -3090,7 +3090,7 @@ void MetaEPSAction::Move( long nHorzMove, long nVertMove )
void MetaEPSAction::Scale( double fScaleX, double fScaleY )
{
- Rectangle aRectangle(maPoint, maSize);
+ tools::Rectangle aRectangle(maPoint, maSize);
ImplScaleRect( aRectangle, fScaleX, fScaleY );
maPoint = aRectangle.TopLeft();
maSize = aRectangle.GetSize();
diff --git a/vcl/source/gdi/pdfextoutdevdata.cxx b/vcl/source/gdi/pdfextoutdevdata.cxx
index 6defb59564ac..0175d5faea91 100644
--- a/vcl/source/gdi/pdfextoutdevdata.cxx
+++ b/vcl/source/gdi/pdfextoutdevdata.cxx
@@ -65,7 +65,7 @@ struct PDFExtOutDevDataSync
struct PDFLinkDestination
{
- Rectangle mRect;
+ tools::Rectangle mRect;
MapMode mMapMode;
sal_Int32 mPageNr;
PDFWriter::DestAreaType mAreaType;
@@ -75,7 +75,7 @@ struct GlobalSyncData
{
std::deque< PDFExtOutDevDataSync::Action > mActions;
std::deque< MapMode > mParaMapModes;
- std::deque< Rectangle > mParaRects;
+ std::deque< tools::Rectangle > mParaRects;
std::deque< sal_Int32 > mParaInts;
std::deque< sal_uInt32 > mParauInts;
std::deque< OUString > mParaOUStrings;
@@ -281,7 +281,7 @@ void GlobalSyncData::PlayGlobalActions( PDFWriter& rWriter )
struct PageSyncData
{
std::deque< PDFExtOutDevDataSync > mActions;
- std::deque< Rectangle > mParaRects;
+ std::deque< tools::Rectangle > mParaRects;
std::deque< sal_Int32 > mParaInts;
std::deque< OUString > mParaOUStrings;
std::deque< PDFWriter::StructElement > mParaStructElements;
@@ -424,7 +424,7 @@ bool PageSyncData::PlaySyncPageAct( PDFWriter& rWriter, sal_uInt32& rCurGDIMtfAc
break;
case PDFExtOutDevDataSync::EndGroupGfxLink :
{
- Rectangle aOutputRect, aVisibleOutputRect;
+ tools::Rectangle aOutputRect, aVisibleOutputRect;
Graphic aGraphic( mGraphics.front() );
mGraphics.pop_front();
@@ -609,7 +609,7 @@ void PDFExtOutDevData::PlayGlobalActions( PDFWriter& rWriter )
all actions will be played after the last page was recorded
*/
//--->i56629
-sal_Int32 PDFExtOutDevData::CreateNamedDest(const OUString& sDestName, const Rectangle& rRect, sal_Int32 nPageNr )
+sal_Int32 PDFExtOutDevData::CreateNamedDest(const OUString& sDestName, const tools::Rectangle& rRect, sal_Int32 nPageNr )
{
mpGlobalSyncData->mActions.push_back( PDFExtOutDevDataSync::CreateNamedDest );
mpGlobalSyncData->mParaOUStrings.push_back( sDestName );
@@ -629,7 +629,7 @@ sal_Int32 PDFExtOutDevData::RegisterDest()
return nLinkDestID;
}
-void PDFExtOutDevData::DescribeRegisteredDest( sal_Int32 nDestId, const Rectangle& rRect, sal_Int32 nPageNr, PDFWriter::DestAreaType eType )
+void PDFExtOutDevData::DescribeRegisteredDest( sal_Int32 nDestId, const tools::Rectangle& rRect, sal_Int32 nPageNr, PDFWriter::DestAreaType eType )
{
OSL_PRECOND( nDestId != -1, "PDFExtOutDevData::DescribeRegisteredDest: invalid destination Id!" );
PDFLinkDestination aLinkDestination;
@@ -639,7 +639,7 @@ void PDFExtOutDevData::DescribeRegisteredDest( sal_Int32 nDestId, const Rectangl
aLinkDestination.mAreaType = eType;
mpGlobalSyncData->mFutureDestinations[ nDestId ] = aLinkDestination;
}
-sal_Int32 PDFExtOutDevData::CreateDest( const Rectangle& rRect, sal_Int32 nPageNr, PDFWriter::DestAreaType eType )
+sal_Int32 PDFExtOutDevData::CreateDest( const tools::Rectangle& rRect, sal_Int32 nPageNr, PDFWriter::DestAreaType eType )
{
mpGlobalSyncData->mActions.push_back( PDFExtOutDevDataSync::CreateDest );
mpGlobalSyncData->mParaRects.push_back( rRect );
@@ -648,7 +648,7 @@ sal_Int32 PDFExtOutDevData::CreateDest( const Rectangle& rRect, sal_Int32 nPageN
mpGlobalSyncData->mParaDestAreaTypes.push_back( eType );
return mpGlobalSyncData->mCurId++;
}
-sal_Int32 PDFExtOutDevData::CreateLink( const Rectangle& rRect, sal_Int32 nPageNr )
+sal_Int32 PDFExtOutDevData::CreateLink( const tools::Rectangle& rRect, sal_Int32 nPageNr )
{
mpGlobalSyncData->mActions.push_back( PDFExtOutDevDataSync::CreateLink );
mpGlobalSyncData->mParaRects.push_back( rRect );
@@ -657,7 +657,7 @@ sal_Int32 PDFExtOutDevData::CreateLink( const Rectangle& rRect, sal_Int32 nPageN
return mpGlobalSyncData->mCurId++;
}
-sal_Int32 PDFExtOutDevData::CreateScreen(const Rectangle& rRect, sal_Int32 nPageNr)
+sal_Int32 PDFExtOutDevData::CreateScreen(const tools::Rectangle& rRect, sal_Int32 nPageNr)
{
mpGlobalSyncData->mActions.push_back(PDFExtOutDevDataSync::CreateScreen);
mpGlobalSyncData->mParaRects.push_back(rRect);
@@ -703,7 +703,7 @@ sal_Int32 PDFExtOutDevData::CreateOutlineItem( sal_Int32 nParent, const OUString
mpGlobalSyncData->mParaInts.push_back( nDestID );
return mpGlobalSyncData->mCurId++;
}
-void PDFExtOutDevData::CreateNote( const Rectangle& rRect, const PDFNote& rNote, sal_Int32 nPageNr )
+void PDFExtOutDevData::CreateNote( const tools::Rectangle& rRect, const PDFNote& rNote, sal_Int32 nPageNr )
{
mpGlobalSyncData->mActions.push_back( PDFExtOutDevDataSync::CreateNote );
mpGlobalSyncData->mParaRects.push_back( rRect );
@@ -767,7 +767,7 @@ bool PDFExtOutDevData::SetStructureAttributeNumerical( PDFWriter::StructAttribut
mpPageSyncData->mParaInts.push_back( nValue );
return true;
}
-void PDFExtOutDevData::SetStructureBoundingBox( const Rectangle& rRect )
+void PDFExtOutDevData::SetStructureBoundingBox( const tools::Rectangle& rRect )
{
mpPageSyncData->PushAction( mrOutDev, PDFExtOutDevDataSync::SetStructureBoundingBox );
mpPageSyncData->mParaRects.push_back( rRect );
@@ -798,8 +798,8 @@ void PDFExtOutDevData::BeginGroup()
void PDFExtOutDevData::EndGroup( const Graphic& rGraphic,
sal_uInt8 nTransparency,
- const Rectangle& rOutputRect,
- const Rectangle& rVisibleOutputRect )
+ const tools::Rectangle& rOutputRect,
+ const tools::Rectangle& rVisibleOutputRect )
{
mpPageSyncData->PushAction( mrOutDev, PDFExtOutDevDataSync::EndGroupGfxLink );
mpPageSyncData->mGraphics.push_back( rGraphic );
@@ -810,8 +810,8 @@ void PDFExtOutDevData::EndGroup( const Graphic& rGraphic,
// Avoids expensive de-compression and re-compression of large images.
bool PDFExtOutDevData::HasAdequateCompression( const Graphic &rGraphic,
- const Rectangle & /* rOutputRect */,
- const Rectangle & /* rVisibleOutputRect */ ) const
+ const tools::Rectangle & /* rOutputRect */,
+ const tools::Rectangle & /* rVisibleOutputRect */ ) const
{
bool bReduceResolution = false;
diff --git a/vcl/source/gdi/pdfwriter.cxx b/vcl/source/gdi/pdfwriter.cxx
index bd204cf1379f..ec612820e15d 100644
--- a/vcl/source/gdi/pdfwriter.cxx
+++ b/vcl/source/gdi/pdfwriter.cxx
@@ -109,7 +109,7 @@ void PDFWriter::DrawStretchText(
}
void PDFWriter::DrawText(
- const Rectangle& rRect,
+ const tools::Rectangle& rRect,
const OUString& rStr,
DrawTextFlags nStyle )
{
@@ -136,32 +136,32 @@ void PDFWriter::DrawPolyLine( const tools::Polygon& rPoly )
xImplementation->drawPolyLine( rPoly );
}
-void PDFWriter::DrawRect( const Rectangle& rRect )
+void PDFWriter::DrawRect( const tools::Rectangle& rRect )
{
xImplementation->drawRectangle( rRect );
}
-void PDFWriter::DrawRect( const Rectangle& rRect, sal_uLong nHorzRound, sal_uLong nVertRound )
+void PDFWriter::DrawRect( const tools::Rectangle& rRect, sal_uLong nHorzRound, sal_uLong nVertRound )
{
xImplementation->drawRectangle( rRect, nHorzRound, nVertRound );
}
-void PDFWriter::DrawEllipse( const Rectangle& rRect )
+void PDFWriter::DrawEllipse( const tools::Rectangle& rRect )
{
xImplementation->drawEllipse( rRect );
}
-void PDFWriter::DrawArc( const Rectangle& rRect, const Point& rStart, const Point& rStop )
+void PDFWriter::DrawArc( const tools::Rectangle& rRect, const Point& rStart, const Point& rStop )
{
xImplementation->drawArc( rRect, rStart, rStop, false, false );
}
-void PDFWriter::DrawPie( const Rectangle& rRect, const Point& rStart, const Point& rStop )
+void PDFWriter::DrawPie( const tools::Rectangle& rRect, const Point& rStart, const Point& rStop )
{
xImplementation->drawArc( rRect, rStart, rStop, true, false );
}
-void PDFWriter::DrawChord( const Rectangle& rRect, const Point& rStart, const Point& rStop )
+void PDFWriter::DrawChord( const tools::Rectangle& rRect, const Point& rStart, const Point& rStop )
{
xImplementation->drawArc( rRect, rStart, rStop, false, true );
}
@@ -201,7 +201,7 @@ void PDFWriter::DrawHatch( const tools::PolyPolygon& rPolyPoly, const Hatch& rHa
xImplementation->drawHatch( rPolyPoly, rHatch );
}
-void PDFWriter::DrawGradient( const Rectangle& rRect, const Gradient& rGradient )
+void PDFWriter::DrawGradient( const tools::Rectangle& rRect, const Gradient& rGradient )
{
xImplementation->drawGradient( rRect, rGradient );
}
@@ -214,7 +214,7 @@ void PDFWriter::DrawGradient( const tools::PolyPolygon& rPolyPoly, const Gradien
xImplementation->pop();
}
-void PDFWriter::DrawWallpaper( const Rectangle& rRect, const Wallpaper& rWallpaper )
+void PDFWriter::DrawWallpaper( const tools::Rectangle& rRect, const Wallpaper& rWallpaper )
{
xImplementation->drawWallpaper( rRect, rWallpaper );
}
@@ -229,7 +229,7 @@ void PDFWriter::BeginTransparencyGroup()
xImplementation->beginTransparencyGroup();
}
-void PDFWriter::EndTransparencyGroup( const Rectangle& rRect, sal_uInt16 nTransparentPercent )
+void PDFWriter::EndTransparencyGroup( const tools::Rectangle& rRect, sal_uInt16 nTransparentPercent )
{
xImplementation->endTransparencyGroup( rRect, nTransparentPercent );
}
@@ -279,7 +279,7 @@ void PDFWriter::IntersectClipRegion( const basegfx::B2DPolyPolygon& rRegion )
xImplementation->intersectClipRegion( rRegion );
}
-void PDFWriter::IntersectClipRegion( const Rectangle& rRect )
+void PDFWriter::IntersectClipRegion( const tools::Rectangle& rRect )
{
xImplementation->intersectClipRegion( rRect );
}
@@ -334,31 +334,31 @@ void PDFWriter::SetTextAlign( ::TextAlign eAlign )
xImplementation->setTextAlign( eAlign );
}
-void PDFWriter::DrawJPGBitmap( SvStream& rStreamData, bool bIsTrueColor, const Size& rSrcSizePixel, const Rectangle& rTargetArea, const Bitmap& rMask, const Graphic& rGraphic )
+void PDFWriter::DrawJPGBitmap( SvStream& rStreamData, bool bIsTrueColor, const Size& rSrcSizePixel, const tools::Rectangle& rTargetArea, const Bitmap& rMask, const Graphic& rGraphic )
{
xImplementation->drawJPGBitmap( rStreamData, bIsTrueColor, rSrcSizePixel, rTargetArea, rMask, rGraphic );
}
-sal_Int32 PDFWriter::CreateLink( const Rectangle& rRect, sal_Int32 nPageNr )
+sal_Int32 PDFWriter::CreateLink( const tools::Rectangle& rRect, sal_Int32 nPageNr )
{
return xImplementation->createLink( rRect, nPageNr );
}
-sal_Int32 PDFWriter::CreateScreen(const Rectangle& rRect, sal_Int32 nPageNr)
+sal_Int32 PDFWriter::CreateScreen(const tools::Rectangle& rRect, sal_Int32 nPageNr)
{
return xImplementation->createScreen(rRect, nPageNr);
}
-sal_Int32 PDFWriter::RegisterDestReference( sal_Int32 nDestId, const Rectangle& rRect, sal_Int32 nPageNr, DestAreaType eType )
+sal_Int32 PDFWriter::RegisterDestReference( sal_Int32 nDestId, const tools::Rectangle& rRect, sal_Int32 nPageNr, DestAreaType eType )
{
return xImplementation->registerDestReference( nDestId, rRect, nPageNr, eType );
}
//--->i56629
-sal_Int32 PDFWriter::CreateNamedDest( const OUString& sDestName, const Rectangle& rRect, sal_Int32 nPageNr, PDFWriter::DestAreaType eType )
+sal_Int32 PDFWriter::CreateNamedDest( const OUString& sDestName, const tools::Rectangle& rRect, sal_Int32 nPageNr, PDFWriter::DestAreaType eType )
{
return xImplementation->createNamedDest( sDestName, rRect, nPageNr, eType );
}
-sal_Int32 PDFWriter::CreateDest( const Rectangle& rRect, sal_Int32 nPageNr, PDFWriter::DestAreaType eType )
+sal_Int32 PDFWriter::CreateDest( const tools::Rectangle& rRect, sal_Int32 nPageNr, PDFWriter::DestAreaType eType )
{
return xImplementation->createDest( rRect, nPageNr, eType );
}
@@ -393,7 +393,7 @@ sal_Int32 PDFWriter::CreateOutlineItem( sal_Int32 nParent, const OUString& rText
return xImplementation->createOutlineItem( nParent, rText, nDestID );
}
-void PDFWriter::CreateNote( const Rectangle& rRect, const PDFNote& rNote, sal_Int32 nPageNr )
+void PDFWriter::CreateNote( const tools::Rectangle& rRect, const PDFNote& rNote, sal_Int32 nPageNr )
{
xImplementation->createNote( rRect, rNote, nPageNr );
}
@@ -423,7 +423,7 @@ bool PDFWriter::SetStructureAttributeNumerical( enum StructAttribute eAttr, sal_
return xImplementation->setStructureAttributeNumerical( eAttr, nValue );
}
-void PDFWriter::SetStructureBoundingBox( const Rectangle& rRect )
+void PDFWriter::SetStructureBoundingBox( const tools::Rectangle& rRect )
{
xImplementation->setStructureBoundingBox( rRect );
}
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index 50712b80086e..8e6815db1fd3 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -1404,7 +1404,7 @@ void PDFWriterImpl::PDFPage::appendPixelPoint( const basegfx::B2DPoint& rPoint,
appendDouble( fValue, rBuffer, nLog10Divisor );
}
-void PDFWriterImpl::PDFPage::appendRect( const Rectangle& rRect, OStringBuffer& rBuffer ) const
+void PDFWriterImpl::PDFPage::appendRect( const tools::Rectangle& rRect, OStringBuffer& rBuffer ) const
{
appendPoint( rRect.BottomLeft() + Point( 0, 1 ), rBuffer );
rBuffer.append( ' ' );
@@ -1414,7 +1414,7 @@ void PDFWriterImpl::PDFPage::appendRect( const Rectangle& rRect, OStringBuffer&
rBuffer.append( " re" );
}
-void PDFWriterImpl::PDFPage::convertRect( Rectangle& rRect ) const
+void PDFWriterImpl::PDFPage::convertRect( tools::Rectangle& rRect ) const
{
Point aLL = lcl_convert( m_pWriter->m_aGraphicsStack.front().m_aMapMode,
m_pWriter->m_aMapMode,
@@ -2934,7 +2934,7 @@ std::map< sal_Int32, sal_Int32 > PDFWriterImpl::emitSystemFont( const PhysicalFo
aInfo.m_nAscent = 1000;
aInfo.m_nDescent = 200;
aInfo.m_nCapHeight = 1000;
- aInfo.m_aFontBBox = Rectangle( Point( -200, -200 ), Size( 1700, 1700 ) );
+ aInfo.m_aFontBBox = tools::Rectangle( Point( -200, -200 ), Size( 1700, 1700 ) );
aInfo.m_aPSName = pFont->GetFamilyName();
sal_Int32 pWidths[256];
memset( pWidths, 0, sizeof(pWidths) );
@@ -4243,7 +4243,7 @@ Font PDFWriterImpl::drawFieldBorder( PDFWidget& rIntern,
if( nDelta < 1 )
nDelta = 1;
setLineColor( Color( COL_TRANSPARENT ) );
- Rectangle aRect = rIntern.m_aRect;
+ tools::Rectangle aRect = rIntern.m_aRect;
setFillColor( rSettings.GetLightBorderColor() );
drawRectangle( aRect );
aRect.Left() += nDelta; aRect.Top() += nDelta;
@@ -4251,11 +4251,11 @@ Font PDFWriterImpl::drawFieldBorder( PDFWidget& rIntern,
setFillColor( rSettings.GetFieldColor() );
drawRectangle( aRect );
setFillColor( rSettings.GetLightColor() );
- drawRectangle( Rectangle( Point( aRect.Left(), aRect.Bottom()-nDelta ), aRect.BottomRight() ) );
- drawRectangle( Rectangle( Point( aRect.Right()-nDelta, aRect.Top() ), aRect.BottomRight() ) );
+ drawRectangle( tools::Rectangle( Point( aRect.Left(), aRect.Bottom()-nDelta ), aRect.BottomRight() ) );
+ drawRectangle( tools::Rectangle( Point( aRect.Right()-nDelta, aRect.Top() ), aRect.BottomRight() ) );
setFillColor( rSettings.GetDarkShadowColor() );
- drawRectangle( Rectangle( aRect.TopLeft(), Point( aRect.Left()+nDelta, aRect.Bottom() ) ) );
- drawRectangle( Rectangle( aRect.TopLeft(), Point( aRect.Right(), aRect.Top()+nDelta ) ) );
+ drawRectangle( tools::Rectangle( aRect.TopLeft(), Point( aRect.Left()+nDelta, aRect.Bottom() ) ) );
+ drawRectangle( tools::Rectangle( aRect.TopLeft(), Point( aRect.Right(), aRect.Top()+nDelta ) ) );
}
else
{
@@ -4395,7 +4395,7 @@ void PDFWriterImpl::createDefaultCheckBoxAppearance( PDFWidget& rBox, const PDFW
if( nDelta < 1 )
nDelta = 1;
- Rectangle aCheckRect, aTextRect;
+ tools::Rectangle aCheckRect, aTextRect;
{
aCheckRect.Left() = rBox.m_aRect.Left() + nDelta;
aCheckRect.Top() = rBox.m_aRect.Top() + (rBox.m_aRect.GetHeight()-aFontSize.Height())/2;
@@ -4499,7 +4499,7 @@ void PDFWriterImpl::createDefaultRadioButtonAppearance( PDFWidget& rBox, const P
if( nDelta < 1 )
nDelta = 1;
- Rectangle aCheckRect, aTextRect;
+ tools::Rectangle aCheckRect, aTextRect;
{
aCheckRect.Left() = rBox.m_aRect.Left() + nDelta;
aCheckRect.Top() = rBox.m_aRect.Top() + (rBox.m_aRect.GetHeight()-aFontSize.Height())/2;
@@ -8727,7 +8727,7 @@ void PDFWriterImpl::drawLayout( SalLayout& rLayout, const OUString& rText, bool
// The rectangle is the bounding box of the text, but also includes
// ascent / descent to match the on-screen rendering.
- Rectangle aRectangle;
+ tools::Rectangle aRectangle;
// This is the top left of the text without ascent / descent.
aRectangle.SetPos(m_pReferenceDevice->PixelToLogic(rLayout.GetDrawPosition()));
aRectangle.setY(aRectangle.getY() - aRefDevFontMetric.GetAscent());
@@ -8823,8 +8823,8 @@ void PDFWriterImpl::drawLayout( SalLayout& rLayout, const OUString& rText, bool
if( m_aCurrentPDFState.m_aFont.GetEmphasisMark() & FontEmphasisMark::Style )
{
tools::PolyPolygon aEmphPoly;
- Rectangle aEmphRect1;
- Rectangle aEmphRect2;
+ tools::Rectangle aEmphRect1;
+ tools::Rectangle aEmphRect2;
long nEmphYOff;
long nEmphWidth;
long nEmphHeight;
@@ -8906,7 +8906,7 @@ void PDFWriterImpl::drawLayout( SalLayout& rLayout, const OUString& rText, bool
void PDFWriterImpl::drawEmphasisMark( long nX, long nY,
const tools::PolyPolygon& rPolyPoly, bool bPolyLine,
- const Rectangle& rRect1, const Rectangle& rRect2 )
+ const tools::Rectangle& rRect1, const tools::Rectangle& rRect2 )
{
// TODO: pass nWidth as width of this mark
// long nWidth = 0;
@@ -8929,14 +8929,14 @@ void PDFWriterImpl::drawEmphasisMark( long nX, long nY,
if ( !rRect1.IsEmpty() )
{
- Rectangle aRect( Point( nX+rRect1.Left(),
+ tools::Rectangle aRect( Point( nX+rRect1.Left(),
nY+rRect1.Top() ), rRect1.GetSize() );
drawRectangle( aRect );
}
if ( !rRect2.IsEmpty() )
{
- Rectangle aRect( Point( nX+rRect2.Left(),
+ tools::Rectangle aRect( Point( nX+rRect2.Left(),
nY+rRect2.Top() ), rRect2.GetSize() );
drawRectangle( aRect );
@@ -8991,7 +8991,7 @@ void PDFWriterImpl::drawStretchText( const Point& rPos, sal_uLong nWidth, const
}
}
-void PDFWriterImpl::drawText( const Rectangle& rRect, const OUString& rOrigStr, DrawTextFlags nStyle )
+void PDFWriterImpl::drawText( const tools::Rectangle& rRect, const OUString& rOrigStr, DrawTextFlags nStyle )
{
long nWidth = rRect.GetWidth();
long nHeight = rRect.GetHeight();
@@ -9512,7 +9512,7 @@ void PDFWriterImpl::drawStrikeoutChar( const Point& rPos, long nWidth, FontStrik
push( PushFlags::CLIPREGION );
FontMetric aRefDevFontMetric = m_pReferenceDevice->GetFontMetric();
- Rectangle aRect;
+ tools::Rectangle aRect;
aRect.Left() = rPos.X();
aRect.Right() = aRect.Left()+nWidth;
aRect.Bottom() = rPos.Y()+aRefDevFontMetric.GetDescent();
@@ -9772,7 +9772,7 @@ void PDFWriterImpl::pushResource( ResourceKind eKind, const OString& rResource,
}
}
-void PDFWriterImpl::beginRedirect( SvStream* pStream, const Rectangle& rTargetRect )
+void PDFWriterImpl::beginRedirect( SvStream* pStream, const tools::Rectangle& rTargetRect )
{
push( PushFlags::ALL );
@@ -9832,10 +9832,10 @@ void PDFWriterImpl::beginTransparencyGroup()
{
updateGraphicsState();
if( m_aContext.Version >= PDFWriter::PDFVersion::PDF_1_4 )
- beginRedirect( new SvMemoryStream( 1024, 1024 ), Rectangle() );
+ beginRedirect( new SvMemoryStream( 1024, 1024 ), tools::Rectangle() );
}
-void PDFWriterImpl::endTransparencyGroup( const Rectangle& rBoundingBox, sal_uInt32 nTransparentPercent )
+void PDFWriterImpl::endTransparencyGroup( const tools::Rectangle& rBoundingBox, sal_uInt32 nTransparentPercent )
{
SAL_WARN_IF( nTransparentPercent > 100, "vcl.pdfwriter", "invalid alpha value" );
nTransparentPercent = nTransparentPercent % 100;
@@ -9875,7 +9875,7 @@ void PDFWriterImpl::endTransparencyGroup( const Rectangle& rBoundingBox, sal_uIn
}
}
-void PDFWriterImpl::drawRectangle( const Rectangle& rRect )
+void PDFWriterImpl::drawRectangle( const tools::Rectangle& rRect )
{
MARK( "drawRectangle" );
@@ -9899,7 +9899,7 @@ void PDFWriterImpl::drawRectangle( const Rectangle& rRect )
writeBuffer( aLine.getStr(), aLine.getLength() );
}
-void PDFWriterImpl::drawRectangle( const Rectangle& rRect, sal_uInt32 nHorzRound, sal_uInt32 nVertRound )
+void PDFWriterImpl::drawRectangle( const tools::Rectangle& rRect, sal_uInt32 nHorzRound, sal_uInt32 nVertRound )
{
MARK( "drawRectangle with rounded edges" );
@@ -9989,7 +9989,7 @@ void PDFWriterImpl::drawRectangle( const Rectangle& rRect, sal_uInt32 nHorzRound
writeBuffer( aLine.getStr(), aLine.getLength() );
}
-void PDFWriterImpl::drawEllipse( const Rectangle& rRect )
+void PDFWriterImpl::drawEllipse( const tools::Rectangle& rRect )
{
MARK( "drawEllipse" );
@@ -10059,7 +10059,7 @@ void PDFWriterImpl::drawEllipse( const Rectangle& rRect )
writeBuffer( aLine.getStr(), aLine.getLength() );
}
-static double calcAngle( const Rectangle& rRect, const Point& rPoint )
+static double calcAngle( const tools::Rectangle& rRect, const Point& rPoint )
{
Point aOrigin((rRect.Left()+rRect.Right()+1)/2,
(rRect.Top()+rRect.Bottom()+1)/2);
@@ -10078,7 +10078,7 @@ static double calcAngle( const Rectangle& rRect, const Point& rPoint )
return atan2( fY, fX );
}
-void PDFWriterImpl::drawArc( const Rectangle& rRect, const Point& rStart, const Point& rStop, bool bWithPie, bool bWithChord )
+void PDFWriterImpl::drawArc( const tools::Rectangle& rRect, const Point& rStart, const Point& rStop, bool bWithPie, bool bWithChord )
{
MARK( "drawArc" );
@@ -10387,7 +10387,7 @@ void PDFWriterImpl::drawPolyLine( const tools::Polygon& rPoly, const PDFWriter::
if( rInfo.m_fTransparency != 0.0 )
{
// FIXME: actually this may be incorrect with bezier polygons
- Rectangle aBoundRect( rPoly.GetBoundRect() );
+ tools::Rectangle aBoundRect( rPoly.GetBoundRect() );
// avoid clipping with thick lines
if( rInfo.m_fLineWidth > 0.0 )
{
@@ -10582,7 +10582,7 @@ bool PDFWriterImpl::writeGradientFunction( GradientEmit& rObject )
aDev->SetDrawMode( aDev->GetDrawMode() |
( DrawModeFlags::GrayLine | DrawModeFlags::GrayFill | DrawModeFlags::GrayText |
DrawModeFlags::GrayBitmap | DrawModeFlags::GrayGradient ) );
- aDev->DrawGradient( Rectangle( Point( 0, 0 ), rObject.m_aSize ), rObject.m_aGradient );
+ aDev->DrawGradient( tools::Rectangle( Point( 0, 0 ), rObject.m_aSize ), rObject.m_aGradient );
Bitmap aSample = aDev->GetBitmap( Point( 0, 0 ), rObject.m_aSize );
Bitmap::ScopedReadAccess pAccess(aSample);
@@ -10714,12 +10714,12 @@ bool PDFWriterImpl::writeGradientFunction( GradientEmit& rObject )
// Determination of shading axis
// See: OutputDevice::ImplDrawLinearGradient for reference
- Rectangle aRect;
+ tools::Rectangle aRect;
aRect.Left() = aRect.Top() = 0;
aRect.Right() = aSize.Width();
aRect.Bottom() = aSize.Height();
- Rectangle aBoundRect;
+ tools::Rectangle aBoundRect;
Point aCenter;
sal_uInt16 nAngle = rObject.m_aGradient.GetAngle() % 3600;
rObject.m_aGradient.GetBoundRect( aRect, aBoundRect, aCenter );
@@ -11573,7 +11573,7 @@ void PDFWriterImpl::createEmbeddedFile(const Graphic& rGraphic, ReferenceXObject
rEmit.m_aPixelSize = rGraphic.GetBitmap().GetPrefSize();
}
-void PDFWriterImpl::drawJPGBitmap( SvStream& rDCTData, bool bIsTrueColor, const Size& rSizePixel, const Rectangle& rTargetArea, const Bitmap& rMask, const Graphic& rGraphic )
+void PDFWriterImpl::drawJPGBitmap( SvStream& rDCTData, bool bIsTrueColor, const Size& rSizePixel, const tools::Rectangle& rTargetArea, const Bitmap& rMask, const Graphic& rGraphic )
{
MARK( "drawJPGBitmap" );
@@ -11810,7 +11810,7 @@ sal_Int32 PDFWriterImpl::createGradient( const Gradient& rGradient, const Size&
return it->m_nObject;
}
-void PDFWriterImpl::drawGradient( const Rectangle& rRect, const Gradient& rGradient )
+void PDFWriterImpl::drawGradient( const tools::Rectangle& rRect, const Gradient& rGradient )
{
MARK( "drawGradient (Rectangle)" );
@@ -11873,7 +11873,7 @@ void PDFWriterImpl::drawHatch( const tools::PolyPolygon& rPolyPoly, const Hatch&
}
}
-void PDFWriterImpl::drawWallpaper( const Rectangle& rRect, const Wallpaper& rWall )
+void PDFWriterImpl::drawWallpaper( const tools::Rectangle& rRect, const Wallpaper& rWall )
{
MARK( "drawWallpaper" );
@@ -11891,7 +11891,7 @@ void PDFWriterImpl::drawWallpaper( const Rectangle& rRect, const Wallpaper& rWal
getMapMode(),
getReferenceDevice(),
aBitmap.GetPrefSize() );
- Rectangle aRect( rRect );
+ tools::Rectangle aRect( rRect );
if( rWall.IsRect() )
{
aRect = rWall.GetRect();
@@ -11949,7 +11949,7 @@ void PDFWriterImpl::drawWallpaper( const Rectangle& rRect, const Wallpaper& rWal
// convert to page coordinates; this needs to be done here
// since the emit does not know the page anymore
- Rectangle aConvertRect( aBmpPos, aBmpSize );
+ tools::Rectangle aConvertRect( aBmpPos, aBmpSize );
m_aPages.back().convertRect( aConvertRect );
OStringBuffer aNameBuf(16);
@@ -11968,7 +11968,7 @@ void PDFWriterImpl::drawWallpaper( const Rectangle& rRect, const Wallpaper& rWal
m_aTilings.push_back( TilingEmit() );
m_aTilings.back().m_nObject = createObject();
- m_aTilings.back().m_aRectangle = Rectangle( Point( 0, 0 ), aConvertRect.GetSize() );
+ m_aTilings.back().m_aRectangle = tools::Rectangle( Point( 0, 0 ), aConvertRect.GetSize() );
m_aTilings.back().m_pTilingStream = new SvMemoryStream();
m_aTilings.back().m_pTilingStream->WriteBytes(
aTilingStream.getStr(), aTilingStream.getLength() );
@@ -12249,7 +12249,7 @@ void PDFWriterImpl::moveClipRegion( sal_Int32 nX, sal_Int32 nY )
}
}
-void PDFWriterImpl::intersectClipRegion( const Rectangle& rRect )
+void PDFWriterImpl::intersectClipRegion( const tools::Rectangle& rRect )
{
basegfx::B2DPolyPolygon aRect( basegfx::tools::createPolygonFromRect(
basegfx::B2DRectangle( rRect.Left(), rRect.Top(), rRect.Right(), rRect.Bottom() ) ) );
@@ -12275,7 +12275,7 @@ bool PDFWriterImpl::intersectClipRegion( const basegfx::B2DPolyPolygon& rRegion
return true;
}
-void PDFWriterImpl::createNote( const Rectangle& rRect, const PDFNote& rNote, sal_Int32 nPageNr )
+void PDFWriterImpl::createNote( const tools::Rectangle& rRect, const PDFNote& rNote, sal_Int32 nPageNr )
{
if( nPageNr < 0 )
nPageNr = m_nCurrentPage;
@@ -12294,7 +12294,7 @@ void PDFWriterImpl::createNote( const Rectangle& rRect, const PDFNote& rNote, sa
m_aPages[ nPageNr ].m_aAnnotations.push_back( m_aNotes.back().m_nObject );
}
-sal_Int32 PDFWriterImpl::createLink( const Rectangle& rRect, sal_Int32 nPageNr )
+sal_Int32 PDFWriterImpl::createLink( const tools::Rectangle& rRect, sal_Int32 nPageNr )
{
if( nPageNr < 0 )
nPageNr = m_nCurrentPage;
@@ -12317,7 +12317,7 @@ sal_Int32 PDFWriterImpl::createLink( const Rectangle& rRect, sal_Int32 nPageNr )
return nRet;
}
-sal_Int32 PDFWriterImpl::createScreen(const Rectangle& rRect, sal_Int32 nPageNr)
+sal_Int32 PDFWriterImpl::createScreen(const tools::Rectangle& rRect, sal_Int32 nPageNr)
{
if (nPageNr < 0)
nPageNr = m_nCurrentPage;
@@ -12340,7 +12340,7 @@ sal_Int32 PDFWriterImpl::createScreen(const Rectangle& rRect, sal_Int32 nPageNr)
return nRet;
}
-sal_Int32 PDFWriterImpl::createNamedDest( const OUString& sDestName, const Rectangle& rRect, sal_Int32 nPageNr, PDFWriter::DestAreaType eType )
+sal_Int32 PDFWriterImpl::createNamedDest( const OUString& sDestName, const tools::Rectangle& rRect, sal_Int32 nPageNr, PDFWriter::DestAreaType eType )
{
if( nPageNr < 0 )
nPageNr = m_nCurrentPage;
@@ -12361,7 +12361,7 @@ sal_Int32 PDFWriterImpl::createNamedDest( const OUString& sDestName, const Recta
return nRet;
}
-sal_Int32 PDFWriterImpl::createDest( const Rectangle& rRect, sal_Int32 nPageNr, PDFWriter::DestAreaType eType )
+sal_Int32 PDFWriterImpl::createDest( const tools::Rectangle& rRect, sal_Int32 nPageNr, PDFWriter::DestAreaType eType )
{
if( nPageNr < 0 )
nPageNr = m_nCurrentPage;
@@ -12381,7 +12381,7 @@ sal_Int32 PDFWriterImpl::createDest( const Rectangle& rRect, sal_Int32 nPageNr,
return nRet;
}
-sal_Int32 PDFWriterImpl::registerDestReference( sal_Int32 nDestId, const Rectangle& rRect, sal_Int32 nPageNr, PDFWriter::DestAreaType eType )
+sal_Int32 PDFWriterImpl::registerDestReference( sal_Int32 nDestId, const tools::Rectangle& rRect, sal_Int32 nPageNr, PDFWriter::DestAreaType eType )
{
return m_aDestinationIdTranslation[ nDestId ] = createDest( rRect, nPageNr, eType );
}
@@ -13206,7 +13206,7 @@ bool PDFWriterImpl::setStructureAttributeNumerical( enum PDFWriter::StructAttrib
return bInsert;
}
-void PDFWriterImpl::setStructureBoundingBox( const Rectangle& rRect )
+void PDFWriterImpl::setStructureBoundingBox( const tools::Rectangle& rRect )
{
sal_Int32 nPageNr = m_nCurrentPage;
if( nPageNr < 0 || nPageNr >= (sal_Int32)m_aPages.size() || !m_aContext.Tagged )
@@ -13455,7 +13455,7 @@ sal_Int32 PDFWriterImpl::createControl( const PDFWriter::AnyWidget& rControl, sa
createDefaultRadioButtonAppearance( rNewWidget, rBtn );
// union rect of radio group
- Rectangle aRect = rNewWidget.m_aRect;
+ tools::Rectangle aRect = rNewWidget.m_aRect;
m_aPages[ nPageNr ].convertRect( aRect );
rRadioButton.m_aRect.Union( aRect );
}
@@ -13539,7 +13539,7 @@ sal_Int32 PDFWriterImpl::createControl( const PDFWriter::AnyWidget& rControl, sa
{
sigHidden = true;
- rNewWidget.m_aRect = Rectangle(0, 0, 0, 0);
+ rNewWidget.m_aRect = tools::Rectangle(0, 0, 0, 0);
m_nSignatureObject = createObject();
rNewWidget.m_aValue = OUString::number( m_nSignatureObject );
diff --git a/vcl/source/gdi/pdfwriter_impl.hxx b/vcl/source/gdi/pdfwriter_impl.hxx
index fad0d6c5bce0..4562ac984439 100644
--- a/vcl/source/gdi/pdfwriter_impl.hxx
+++ b/vcl/source/gdi/pdfwriter_impl.hxx
@@ -164,9 +164,9 @@ public:
// appends a B2DPoint without further transformation
void appendPixelPoint( const basegfx::B2DPoint& rPoint, OStringBuffer& rBuffer ) const;
// appends a rectangle
- void appendRect( const Rectangle& rRect, OStringBuffer& rBuffer ) const;
+ void appendRect( const tools::Rectangle& rRect, OStringBuffer& rBuffer ) const;
// converts a rectangle to 10th points page space
- void convertRect( Rectangle& rRect ) const;
+ void convertRect( tools::Rectangle& rRect ) const;
// appends a polygon optionally closing it
void appendPolygon( const tools::Polygon& rPoly, OStringBuffer& rBuffer, bool bClose = true ) const;
// appends a polygon optionally closing it
@@ -282,7 +282,7 @@ public:
struct TilingEmit
{
sal_Int32 m_nObject;
- Rectangle m_aRectangle;
+ tools::Rectangle m_aRectangle;
Size m_aCellSize;
SvtGraphicFill::Transform m_aTransform;
ResourceDict m_aResources;
@@ -300,7 +300,7 @@ public:
sal_Int32 m_nObject;
sal_Int32 m_nExtGStateObject;
double m_fAlpha;
- Rectangle m_aBoundRect;
+ tools::Rectangle m_aBoundRect;
SvMemoryStream* m_pContentStream;
SvMemoryStream* m_pSoftMaskStream;
@@ -378,7 +378,7 @@ public:
{
sal_Int32 m_nPage;
PDFWriter::DestAreaType m_eType;
- Rectangle m_aRect;
+ tools::Rectangle m_aRect;
};
//--->i56629
@@ -387,7 +387,7 @@ public:
OUString m_aDestName;
sal_Int32 m_nPage;
PDFWriter::DestAreaType m_eType;
- Rectangle m_aRect;
+ tools::Rectangle m_aRect;
};
struct PDFOutlineEntry
@@ -412,7 +412,7 @@ public:
struct PDFAnnotation
{
sal_Int32 m_nObject;
- Rectangle m_aRect;
+ tools::Rectangle m_aRect;
sal_Int32 m_nPage;
PDFAnnotation()
@@ -563,7 +563,7 @@ public:
std::list< sal_Int32 > m_aChildren; // indexes into structure vector
std::list< PDFStructureElementKid > m_aKids;
PDFStructAttributes m_aAttributes;
- Rectangle m_aBBox;
+ tools::Rectangle m_aBBox;
OUString m_aActualText;
OUString m_aAltText;
css::lang::Locale m_aLocale;
@@ -731,7 +731,7 @@ private:
{
SvStream* m_pStream;
MapMode m_aMapMode;
- Rectangle m_aTargetRect;
+ tools::Rectangle m_aTargetRect;
ResourceDict m_aResourceDict;
};
std::list< StreamRedirect > m_aOutputStreams;
@@ -995,7 +995,7 @@ i12626
bool writeBuffer( const void* pBuffer, sal_uInt64 nBytes );
void beginCompression();
void endCompression();
- void beginRedirect( SvStream* pStream, const Rectangle& );
+ void beginRedirect( SvStream* pStream, const tools::Rectangle& );
SvStream* endRedirect();
void endPage();
@@ -1013,7 +1013,7 @@ i12626
bool checkEmitStructure();
/* draws an emphasis mark */
- void drawEmphasisMark( long nX, long nY, const tools::PolyPolygon& rPolyPoly, bool bPolyLine, const Rectangle& rRect1, const Rectangle& rRect2 );
+ void drawEmphasisMark( long nX, long nY, const tools::PolyPolygon& rPolyPoly, bool bPolyLine, const tools::Rectangle& rRect1, const tools::Rectangle& rRect2 );
/* true if PDF/A-1a or PDF/A-1b is output */
bool m_bIsPDF_A1;
@@ -1174,7 +1174,7 @@ public:
void moveClipRegion( sal_Int32 nX, sal_Int32 nY );
- void intersectClipRegion( const Rectangle& rRect );
+ void intersectClipRegion( const tools::Rectangle& rRect );
bool intersectClipRegion( const basegfx::B2DPolyPolygon& rRegion );
@@ -1201,7 +1201,7 @@ public:
void drawTextArray( const Point& rPos, const OUString& rText, const long* pDXArray, sal_Int32 nIndex, sal_Int32 nLen );
void drawStretchText( const Point& rPos, sal_uLong nWidth, const OUString& rText,
sal_Int32 nIndex, sal_Int32 nLen );
- void drawText( const Rectangle& rRect, const OUString& rOrigStr, DrawTextFlags nStyle );
+ void drawText( const tools::Rectangle& rRect, const OUString& rOrigStr, DrawTextFlags nStyle );
void drawTextLine( const Point& rPos, long nWidth, FontStrikeout eStrikeout, FontLineStyle eUnderline, FontLineStyle eOverline, bool bUnderlineAbove );
void drawWaveTextLine( OStringBuffer& aLine, long nWidth, FontLineStyle eTextLine, Color aColor, bool bIsAbove );
void drawStraightTextLine( OStringBuffer& aLine, long nWidth, FontLineStyle eTextLine, Color aColor, bool bIsAbove );
@@ -1218,28 +1218,28 @@ public:
void drawPixel( const Point& rPt, const Color& rColor );
- void drawRectangle( const Rectangle& rRect );
- void drawRectangle( const Rectangle& rRect, sal_uInt32 nHorzRound, sal_uInt32 nVertRound );
- void drawEllipse( const Rectangle& rRect );
- void drawArc( const Rectangle& rRect, const Point& rStart, const Point& rStop, bool bWithPie, bool bWidthChord );
+ void drawRectangle( const tools::Rectangle& rRect );
+ void drawRectangle( const tools::Rectangle& rRect, sal_uInt32 nHorzRound, sal_uInt32 nVertRound );
+ void drawEllipse( const tools::Rectangle& rRect );
+ void drawArc( const tools::Rectangle& rRect, const Point& rStart, const Point& rStop, bool bWithPie, bool bWidthChord );
void drawBitmap( const Point& rDestPoint, const Size& rDestSize, const Bitmap& rBitmap, const Graphic& rGraphic );
void drawBitmap( const Point& rDestPoint, const Size& rDestSize, const BitmapEx& rBitmap );
- void drawJPGBitmap( SvStream& rDCTData, bool bIsTrueColor, const Size& rSizePixel, const Rectangle& rTargetArea, const Bitmap& rMask, const Graphic& rGraphic );
+ void drawJPGBitmap( SvStream& rDCTData, bool bIsTrueColor, const Size& rSizePixel, const tools::Rectangle& rTargetArea, const Bitmap& rMask, const Graphic& rGraphic );
/// Stores the original PDF data from rGraphic as an embedded file.
void createEmbeddedFile(const Graphic& rGraphic, ReferenceXObjectEmit& rEmit, sal_Int32 nBitmapObject);
- void drawGradient( const Rectangle& rRect, const Gradient& rGradient );
+ void drawGradient( const tools::Rectangle& rRect, const Gradient& rGradient );
void drawHatch( const tools::PolyPolygon& rPolyPoly, const Hatch& rHatch );
- void drawWallpaper( const Rectangle& rRect, const Wallpaper& rWall );
+ void drawWallpaper( const tools::Rectangle& rRect, const Wallpaper& rWall );
void drawTransparent( const tools::PolyPolygon& rPolyPoly, sal_uInt32 nTransparentPercent );
void beginTransparencyGroup();
- void endTransparencyGroup( const Rectangle& rBoundingBox, sal_uInt32 nTransparentPercent );
+ void endTransparencyGroup( const tools::Rectangle& rBoundingBox, sal_uInt32 nTransparentPercent );
void emitComment( const char* pComment );
//--->i56629 named destinations
- sal_Int32 createNamedDest( const OUString& sDestName, const Rectangle& rRect, sal_Int32 nPageNr, PDFWriter::DestAreaType eType );
+ sal_Int32 createNamedDest( const OUString& sDestName, const tools::Rectangle& rRect, sal_Int32 nPageNr, PDFWriter::DestAreaType eType );
//--->i59651
//emits output intent
@@ -1249,15 +1249,15 @@ public:
sal_Int32 emitDocumentMetadata();
// links
- sal_Int32 createLink( const Rectangle& rRect, sal_Int32 nPageNr );
- sal_Int32 createDest( const Rectangle& rRect, sal_Int32 nPageNr, PDFWriter::DestAreaType eType );
- sal_Int32 registerDestReference( sal_Int32 nDestId, const Rectangle& rRect, sal_Int32 nPageNr, PDFWriter::DestAreaType eType );
+ sal_Int32 createLink( const tools::Rectangle& rRect, sal_Int32 nPageNr );
+ sal_Int32 createDest( const tools::Rectangle& rRect, sal_Int32 nPageNr, PDFWriter::DestAreaType eType );
+ sal_Int32 registerDestReference( sal_Int32 nDestId, const tools::Rectangle& rRect, sal_Int32 nPageNr, PDFWriter::DestAreaType eType );
void setLinkDest( sal_Int32 nLinkId, sal_Int32 nDestId );
void setLinkURL( sal_Int32 nLinkId, const OUString& rURL );
void setLinkPropertyId( sal_Int32 nLinkId, sal_Int32 nPropertyId );
// screens
- sal_Int32 createScreen(const Rectangle& rRect, sal_Int32 nPageNr);
+ sal_Int32 createScreen(const tools::Rectangle& rRect, sal_Int32 nPageNr);
void setScreenURL(sal_Int32 nScreenId, const OUString& rURL);
void setScreenStream(sal_Int32 nScreenId, const OUString& rURL);
@@ -1268,14 +1268,14 @@ public:
void setOutlineItemDest( sal_Int32 nItem, sal_Int32 nDestID );
// notes
- void createNote( const Rectangle& rRect, const PDFNote& rNote, sal_Int32 nPageNr );
+ void createNote( const tools::Rectangle& rRect, const PDFNote& rNote, sal_Int32 nPageNr );
// structure elements
sal_Int32 beginStructureElement( PDFWriter::StructElement eType, const OUString& rAlias );
void endStructureElement();
bool setCurrentStructureElement( sal_Int32 nElement );
bool setStructureAttribute( enum PDFWriter::StructAttribute eAttr, enum PDFWriter::StructAttributeValue eVal );
bool setStructureAttributeNumerical( enum PDFWriter::StructAttribute eAttr, sal_Int32 nValue );
- void setStructureBoundingBox( const Rectangle& rRect );
+ void setStructureBoundingBox( const tools::Rectangle& rRect );
void setActualText( const OUString& rText );
void setAlternateText( const OUString& rText );
diff --git a/vcl/source/gdi/pdfwriter_impl2.cxx b/vcl/source/gdi/pdfwriter_impl2.cxx
index bc5cb346b47f..828ae3e2f66a 100644
--- a/vcl/source/gdi/pdfwriter_impl2.cxx
+++ b/vcl/source/gdi/pdfwriter_impl2.cxx
@@ -243,7 +243,7 @@ void PDFWriterImpl::implWriteBitmapEx( const Point& i_rPoint, const Size& i_rSiz
}
}
if ( bUseJPGCompression )
- m_rOuterFace.DrawJPGBitmap( aStrm, bTrueColorJPG, aSizePixel, Rectangle( aPoint, aSize ), aMask, i_Graphic );
+ m_rOuterFace.DrawJPGBitmap( aStrm, bTrueColorJPG, aSizePixel, tools::Rectangle( aPoint, aSize ), aMask, i_Graphic );
else if ( aBitmapEx.IsTransparent() )
m_rOuterFace.DrawBitmapEx( aPoint, aSize, aBitmapEx );
else
@@ -423,7 +423,7 @@ void PDFWriterImpl::playMetafile( const GDIMetaFile& i_rMtf, vcl::PDFExtOutDevDa
const sal_uInt16 nTransPercent = aTransCol.GetLuminance() * 100 / 255;
m_rOuterFace.BeginTransparencyGroup();
playMetafile( aTmpMtf, nullptr, i_rContext, pDummyVDev );
- m_rOuterFace.EndTransparencyGroup( Rectangle( rPos, rSize ), nTransPercent );
+ m_rOuterFace.EndTransparencyGroup( tools::Rectangle( rPos, rSize ), nTransPercent );
}
else
{
@@ -476,7 +476,7 @@ void PDFWriterImpl::playMetafile( const GDIMetaFile& i_rMtf, vcl::PDFExtOutDevDa
// create mask bitmap
xVDev->SetLineColor( COL_BLACK );
xVDev->SetFillColor( COL_BLACK );
- xVDev->DrawRect( Rectangle( aPoint, aDstSize ) );
+ xVDev->DrawRect( tools::Rectangle( aPoint, aDstSize ) );
xVDev->SetDrawMode( DrawModeFlags::WhiteLine | DrawModeFlags::WhiteFill | DrawModeFlags::WhiteText |
DrawModeFlags::WhiteBitmap | DrawModeFlags::WhiteGradient );
aTmpMtf.WindStart();
@@ -488,7 +488,7 @@ void PDFWriterImpl::playMetafile( const GDIMetaFile& i_rMtf, vcl::PDFExtOutDevDa
// create alpha mask from gradient
xVDev->SetDrawMode( DrawModeFlags::GrayGradient );
- xVDev->DrawGradient( Rectangle( aPoint, aDstSize ), rTransparenceGradient );
+ xVDev->DrawGradient( tools::Rectangle( aPoint, aDstSize ), rTransparenceGradient );
xVDev->SetDrawMode( DrawModeFlags::Default );
xVDev->EnableMapMode( false );
xVDev->DrawMask( aPoint, aDstSizePixel, aMask, Color( COL_WHITE ) );
@@ -812,7 +812,7 @@ void PDFWriterImpl::playMetafile( const GDIMetaFile& i_rMtf, vcl::PDFExtOutDevDa
{
const MetaBmpScalePartAction* pA = static_cast<const MetaBmpScalePartAction*>(pAction);
BitmapEx aBitmapEx( pA->GetBitmap() );
- aBitmapEx.Crop( Rectangle( pA->GetSrcPoint(), pA->GetSrcSize() ) );
+ aBitmapEx.Crop( tools::Rectangle( pA->GetSrcPoint(), pA->GetSrcSize() ) );
Graphic aGraphic = i_pOutDevData ? i_pOutDevData->GetCurrentGraphic() : Graphic();
implWriteBitmapEx( pA->GetDestPoint(), pA->GetDestSize(), aBitmapEx, aGraphic, pDummyVDev, i_rContext );
}
@@ -841,7 +841,7 @@ void PDFWriterImpl::playMetafile( const GDIMetaFile& i_rMtf, vcl::PDFExtOutDevDa
{
const MetaBmpExScalePartAction* pA = static_cast<const MetaBmpExScalePartAction*>(pAction);
BitmapEx aBitmapEx( pA->GetBitmapEx() );
- aBitmapEx.Crop( Rectangle( pA->GetSrcPoint(), pA->GetSrcSize() ) );
+ aBitmapEx.Crop( tools::Rectangle( pA->GetSrcPoint(), pA->GetSrcSize() ) );
Graphic aGraphic = i_pOutDevData ? i_pOutDevData->GetCurrentGraphic() : Graphic();
implWriteBitmapEx( pA->GetDestPoint(), pA->GetDestSize(), aBitmapEx, aGraphic, pDummyVDev, i_rContext );
}
diff --git a/vcl/source/gdi/print.cxx b/vcl/source/gdi/print.cxx
index 8bb043a3991c..7941632b89fc 100644
--- a/vcl/source/gdi/print.cxx
+++ b/vcl/source/gdi/print.cxx
@@ -240,7 +240,7 @@ void Printer::EmulateDrawTransparent ( const tools::PolyPolygon& rPolyPoly,
// #110958# Restore disabled alpha VDev
mpAlphaVDev = pOldAlphaVDev;
- Rectangle aPolyRect( LogicToPixel( rPolyPoly ).GetBoundRect() );
+ tools::Rectangle aPolyRect( LogicToPixel( rPolyPoly ).GetBoundRect() );
const Size aDPISize( LogicToPixel( Size( 1, 1 ), MapUnit::MapInch ) );
const long nBaseExtent = std::max( FRound( aDPISize.Width() / 300. ), 1L );
long nMove;
@@ -270,14 +270,14 @@ void Printer::EmulateDrawTransparent ( const tools::PolyPolygon& rPolyPoly,
if(nMove)
{
- Rectangle aRect( aPolyRect.TopLeft(), Size( aPolyRect.GetWidth(), nBaseExtent ) );
+ tools::Rectangle aRect( aPolyRect.TopLeft(), Size( aPolyRect.GetWidth(), nBaseExtent ) );
while( aRect.Top() <= aPolyRect.Bottom() )
{
DrawRect( aRect );
aRect.Move( 0, nMove );
}
- aRect = Rectangle( aPolyRect.TopLeft(), Size( nBaseExtent, aPolyRect.GetHeight() ) );
+ aRect = tools::Rectangle( aPolyRect.TopLeft(), Size( nBaseExtent, aPolyRect.GetHeight() ) );
while( aRect.Left() <= aPolyRect.Right() )
{
DrawRect( aRect );
@@ -739,7 +739,7 @@ void Printer::DrawDeviceMask( const Bitmap& rMask, const Color& rMaskColor,
Point aPt;
Point aDestPt( LogicToPixel( rDestPt ) );
Size aDestSz( LogicToPixel( rDestSize ) );
- Rectangle aSrcRect( rSrcPtPixel, rSrcSizePixel );
+ tools::Rectangle aSrcRect( rSrcPtPixel, rSrcSizePixel );
aSrcRect.Justify();
@@ -768,7 +768,7 @@ void Printer::DrawDeviceMask( const Bitmap& rMask, const Color& rMaskColor,
}
// source cropped?
- if( aSrcRect != Rectangle( aPt, aMask.GetSizePixel() ) )
+ if( aSrcRect != tools::Rectangle( aPt, aMask.GetSizePixel() ) )
aMask.Crop( aSrcRect );
// destination mirrored
@@ -799,7 +799,7 @@ void Printer::DrawDeviceMask( const Bitmap& rMask, const Color& rMaskColor,
pMapY[ nY ] = aDestPt.Y() + FRound( (double) aDestSz.Height() * nY / nSrcHeight );
// walk through all rectangles of mask
- const vcl::Region aWorkRgn(aMask.CreateRegion(COL_BLACK, Rectangle(Point(), aMask.GetSizePixel())));
+ const vcl::Region aWorkRgn(aMask.CreateRegion(COL_BLACK, tools::Rectangle(Point(), aMask.GetSizePixel())));
RectangleVector aRectangles;
aWorkRgn.GetRegionRectangles(aRectangles);
@@ -810,7 +810,7 @@ void Printer::DrawDeviceMask( const Bitmap& rMask, const Color& rMaskColor,
pMapX[aRectIter->Right() + 1] - aMapPt.X(), // pMapX[L + W] -> L + ((R - L) + 1) -> R + 1
pMapY[aRectIter->Bottom() + 1] - aMapPt.Y()); // same for Y
- DrawRect(Rectangle(aMapPt, aMapSz));
+ DrawRect(tools::Rectangle(aMapPt, aMapSz));
}
Pop();
@@ -1749,7 +1749,7 @@ bool Printer::UsePolyPolygonForComplexGradient()
void Printer::ClipAndDrawGradientMetafile ( const Gradient &rGradient, const tools::PolyPolygon &rPolyPoly )
{
- const Rectangle aBoundRect( rPolyPoly.GetBoundRect() );
+ const tools::Rectangle aBoundRect( rPolyPoly.GetBoundRect() );
Push( PushFlags::CLIPREGION );
IntersectClipRegion(vcl::Region(rPolyPoly));
diff --git a/vcl/source/gdi/print2.cxx b/vcl/source/gdi/print2.cxx
index e794c07c6a4f..42c96e8f6064 100644
--- a/vcl/source/gdi/print2.cxx
+++ b/vcl/source/gdi/print2.cxx
@@ -58,7 +58,7 @@ struct ConnectedComponents
{}
ComponentList aComponentList;
- Rectangle aBounds;
+ tools::Rectangle aBounds;
Color aBgColor;
bool bIsSpecial;
bool bIsFullyTransparent;
@@ -125,9 +125,9 @@ bool DoesActionHandleTransparency( const MetaAction& rAct )
/** Check whether rCurrRect rectangle fully covers io_rPrevRect - if
yes, return true and update o_rBgColor
*/
-bool checkRect( Rectangle& io_rPrevRect,
+bool checkRect( tools::Rectangle& io_rPrevRect,
Color& o_rBgColor,
- const Rectangle& rCurrRect,
+ const tools::Rectangle& rCurrRect,
OutputDevice& rMapModeVDev )
{
// shape needs to fully cover previous content, and have uniform
@@ -393,24 +393,24 @@ bool ImplIsNotTransparent( const MetaAction& rAct, const OutputDevice& rOut )
}
// #i10613# Extracted from ImplCheckRect::ImplCreate
-Rectangle ImplCalcActionBounds( const MetaAction& rAct, const OutputDevice& rOut )
+tools::Rectangle ImplCalcActionBounds( const MetaAction& rAct, const OutputDevice& rOut )
{
- Rectangle aActionBounds;
+ tools::Rectangle aActionBounds;
switch( rAct.GetType() )
{
case MetaActionType::PIXEL:
- aActionBounds = Rectangle( static_cast<const MetaPixelAction&>(rAct).GetPoint(), Size( 1, 1 ) );
+ aActionBounds = tools::Rectangle( static_cast<const MetaPixelAction&>(rAct).GetPoint(), Size( 1, 1 ) );
break;
case MetaActionType::POINT:
- aActionBounds = Rectangle( static_cast<const MetaPointAction&>(rAct).GetPoint(), Size( 1, 1 ) );
+ aActionBounds = tools::Rectangle( static_cast<const MetaPointAction&>(rAct).GetPoint(), Size( 1, 1 ) );
break;
case MetaActionType::LINE:
{
const MetaLineAction& rMetaLineAction = static_cast<const MetaLineAction&>(rAct);
- aActionBounds = Rectangle( rMetaLineAction.GetStartPoint(), rMetaLineAction.GetEndPoint() );
+ aActionBounds = tools::Rectangle( rMetaLineAction.GetStartPoint(), rMetaLineAction.GetEndPoint() );
aActionBounds.Justify();
const long nLineWidth(rMetaLineAction.GetLineInfo().GetWidth());
if(nLineWidth)
@@ -436,7 +436,7 @@ Rectangle ImplCalcActionBounds( const MetaAction& rAct, const OutputDevice& rOut
case MetaActionType::ELLIPSE:
{
- const Rectangle& rRect = static_cast<const MetaEllipseAction&>(rAct).GetRect();
+ const tools::Rectangle& rRect = static_cast<const MetaEllipseAction&>(rAct).GetRect();
aActionBounds = tools::Polygon( rRect.Center(),
rRect.GetWidth() >> 1,
rRect.GetHeight() >> 1 ).GetBoundRect();
@@ -486,47 +486,47 @@ Rectangle ImplCalcActionBounds( const MetaAction& rAct, const OutputDevice& rOut
break;
case MetaActionType::BMP:
- aActionBounds = Rectangle( static_cast<const MetaBmpAction&>(rAct).GetPoint(),
+ aActionBounds = tools::Rectangle( static_cast<const MetaBmpAction&>(rAct).GetPoint(),
rOut.PixelToLogic( static_cast<const MetaBmpAction&>(rAct).GetBitmap().GetSizePixel() ) );
break;
case MetaActionType::BMPSCALE:
- aActionBounds = Rectangle( static_cast<const MetaBmpScaleAction&>(rAct).GetPoint(),
+ aActionBounds = tools::Rectangle( static_cast<const MetaBmpScaleAction&>(rAct).GetPoint(),
static_cast<const MetaBmpScaleAction&>(rAct).GetSize() );
break;
case MetaActionType::BMPSCALEPART:
- aActionBounds = Rectangle( static_cast<const MetaBmpScalePartAction&>(rAct).GetDestPoint(),
+ aActionBounds = tools::Rectangle( static_cast<const MetaBmpScalePartAction&>(rAct).GetDestPoint(),
static_cast<const MetaBmpScalePartAction&>(rAct).GetDestSize() );
break;
case MetaActionType::BMPEX:
- aActionBounds = Rectangle( static_cast<const MetaBmpExAction&>(rAct).GetPoint(),
+ aActionBounds = tools::Rectangle( static_cast<const MetaBmpExAction&>(rAct).GetPoint(),
rOut.PixelToLogic( static_cast<const MetaBmpExAction&>(rAct).GetBitmapEx().GetSizePixel() ) );
break;
case MetaActionType::BMPEXSCALE:
- aActionBounds = Rectangle( static_cast<const MetaBmpExScaleAction&>(rAct).GetPoint(),
+ aActionBounds = tools::Rectangle( static_cast<const MetaBmpExScaleAction&>(rAct).GetPoint(),
static_cast<const MetaBmpExScaleAction&>(rAct).GetSize() );
break;
case MetaActionType::BMPEXSCALEPART:
- aActionBounds = Rectangle( static_cast<const MetaBmpExScalePartAction&>(rAct).GetDestPoint(),
+ aActionBounds = tools::Rectangle( static_cast<const MetaBmpExScalePartAction&>(rAct).GetDestPoint(),
static_cast<const MetaBmpExScalePartAction&>(rAct).GetDestSize() );
break;
case MetaActionType::MASK:
- aActionBounds = Rectangle( static_cast<const MetaMaskAction&>(rAct).GetPoint(),
+ aActionBounds = tools::Rectangle( static_cast<const MetaMaskAction&>(rAct).GetPoint(),
rOut.PixelToLogic( static_cast<const MetaMaskAction&>(rAct).GetBitmap().GetSizePixel() ) );
break;
case MetaActionType::MASKSCALE:
- aActionBounds = Rectangle( static_cast<const MetaMaskScaleAction&>(rAct).GetPoint(),
+ aActionBounds = tools::Rectangle( static_cast<const MetaMaskScaleAction&>(rAct).GetPoint(),
static_cast<const MetaMaskScaleAction&>(rAct).GetSize() );
break;
case MetaActionType::MASKSCALEPART:
- aActionBounds = Rectangle( static_cast<const MetaMaskScalePartAction&>(rAct).GetDestPoint(),
+ aActionBounds = tools::Rectangle( static_cast<const MetaMaskScalePartAction&>(rAct).GetDestPoint(),
static_cast<const MetaMaskScalePartAction&>(rAct).GetDestSize() );
break;
@@ -551,12 +551,12 @@ Rectangle ImplCalcActionBounds( const MetaAction& rAct, const OutputDevice& rOut
break;
case MetaActionType::FLOATTRANSPARENT:
- aActionBounds = Rectangle( static_cast<const MetaFloatTransparentAction&>(rAct).GetPoint(),
+ aActionBounds = tools::Rectangle( static_cast<const MetaFloatTransparentAction&>(rAct).GetPoint(),
static_cast<const MetaFloatTransparentAction&>(rAct).GetSize() );
break;
case MetaActionType::EPS:
- aActionBounds = Rectangle( static_cast<const MetaEPSAction&>(rAct).GetPoint(),
+ aActionBounds = tools::Rectangle( static_cast<const MetaEPSAction&>(rAct).GetPoint(),
static_cast<const MetaEPSAction&>(rAct).GetSize() );
break;
@@ -591,7 +591,7 @@ Rectangle ImplCalcActionBounds( const MetaAction& rAct, const OutputDevice& rOut
0, rTextAct.GetDXArray() );
if( pSalLayout )
{
- Rectangle aBoundRect( const_cast<OutputDevice&>(rOut).ImplGetTextBoundRect( *pSalLayout ) );
+ tools::Rectangle aBoundRect( const_cast<OutputDevice&>(rOut).ImplGetTextBoundRect( *pSalLayout ) );
aActionBounds = rOut.PixelToLogic( aBoundRect );
pSalLayout->Release();
}
@@ -621,7 +621,7 @@ Rectangle ImplCalcActionBounds( const MetaAction& rAct, const OutputDevice& rOut
rTextAct.GetWidth() );
if( pSalLayout )
{
- Rectangle aBoundRect( const_cast<OutputDevice&>(rOut).ImplGetTextBoundRect( *pSalLayout ) );
+ tools::Rectangle aBoundRect( const_cast<OutputDevice&>(rOut).ImplGetTextBoundRect( *pSalLayout ) );
aActionBounds = rOut.PixelToLogic( aBoundRect );
pSalLayout->Release();
}
@@ -647,7 +647,7 @@ Rectangle ImplCalcActionBounds( const MetaAction& rAct, const OutputDevice& rOut
return rOut.LogicToPixel( aActionBounds );
}
else
- return Rectangle();
+ return tools::Rectangle();
}
} // end anon namespace
@@ -751,10 +751,10 @@ bool OutputDevice::RemoveTransparenciesFromMetaFile( const GDIMetaFile& rInMtf,
Point aPageOffset = pThis->GetPageOffsetPixel();
aPageOffset = Point( 0, 0 ) - aPageOffset;
Size aSize = pThis->GetPaperSizePixel();
- aBackgroundComponent.aBounds = Rectangle( aPageOffset, aSize );
+ aBackgroundComponent.aBounds = tools::Rectangle( aPageOffset, aSize );
}
else
- aBackgroundComponent.aBounds = Rectangle( Point( 0, 0 ), GetOutputSizePixel() );
+ aBackgroundComponent.aBounds = tools::Rectangle( Point( 0, 0 ), GetOutputSizePixel() );
}
while( pCurrAct && bStillBackground )
{
@@ -876,10 +876,10 @@ bool OutputDevice::RemoveTransparenciesFromMetaFile( const GDIMetaFile& rInMtf,
pCurrAct->Execute( aMapModeVDev.get() );
// cache bounds of current action
- const Rectangle aBBCurrAct( ImplCalcActionBounds(*pCurrAct, *aMapModeVDev.get()) );
+ const tools::Rectangle aBBCurrAct( ImplCalcActionBounds(*pCurrAct, *aMapModeVDev.get()) );
// accumulate collected bounds here, initialize with current action
- Rectangle aTotalBounds( aBBCurrAct ); // thus,
+ tools::Rectangle aTotalBounds( aBBCurrAct ); // thus,
// aTotalComponents.aBounds
// is
// empty
@@ -1123,7 +1123,7 @@ bool OutputDevice::RemoveTransparenciesFromMetaFile( const GDIMetaFile& rInMtf,
aPageOffset = Point( 0, 0 ) - aPageOffset;
aTmpSize = pThis->GetPaperSizePixel();
}
- const Rectangle aOutputRect( aPageOffset, aTmpSize );
+ const tools::Rectangle aOutputRect( aPageOffset, aTmpSize );
bool bTiling = dynamic_cast<Printer*>(this) != nullptr;
// iterate over all aCCList members and generate bitmaps for the special ones
@@ -1131,7 +1131,7 @@ bool OutputDevice::RemoveTransparenciesFromMetaFile( const GDIMetaFile& rInMtf,
{
if( aCurr->bIsSpecial )
{
- Rectangle aBoundRect( aCurr->aBounds );
+ tools::Rectangle aBoundRect( aCurr->aBounds );
aBoundRect.Intersection( aOutputRect );
const double fBmpArea( (double) aBoundRect.GetWidth() * aBoundRect.GetHeight() );
@@ -1177,7 +1177,7 @@ bool OutputDevice::RemoveTransparenciesFromMetaFile( const GDIMetaFile& rInMtf,
if( ( aDstPtPix.X() + aDstSzPix.Width() - 1 ) > aBoundRect.Right() )
aDstSzPix.Width() = aBoundRect.Right() - aDstPtPix.X() + 1;
- if( !Rectangle( aDstPtPix, aDstSzPix ).Intersection( aBoundRect ).IsEmpty() &&
+ if( !tools::Rectangle( aDstPtPix, aDstSzPix ).Intersection( aBoundRect ).IsEmpty() &&
aPaintVDev->SetOutputSizePixel( aDstSzPix ) )
{
aPaintVDev->Push();
@@ -1340,7 +1340,7 @@ bool OutputDevice::RemoveTransparenciesFromMetaFile( const GDIMetaFile& rInMtf,
return bTransparent;
}
-void Printer::DrawGradientEx( OutputDevice* pOut, const Rectangle& rRect, const Gradient& rGradient )
+void Printer::DrawGradientEx( OutputDevice* pOut, const tools::Rectangle& rRect, const Gradient& rGradient )
{
const PrinterOptions& rPrinterOptions = GetPrinterOptions();
diff --git a/vcl/source/gdi/print3.cxx b/vcl/source/gdi/print3.cxx
index 28ebd80b9473..7ad7ce34f8be 100644
--- a/vcl/source/gdi/print3.cxx
+++ b/vcl/source/gdi/print3.cxx
@@ -1022,7 +1022,7 @@ PrinterController::PageSize PrinterController::getPageFile( int i_nUnfilteredPag
return aPageSize;
}
-static void appendSubPage( GDIMetaFile& o_rMtf, const Rectangle& i_rClipRect, GDIMetaFile& io_rSubPage, bool i_bDrawBorder )
+static void appendSubPage( GDIMetaFile& o_rMtf, const tools::Rectangle& i_rClipRect, GDIMetaFile& io_rSubPage, bool i_bDrawBorder )
{
// intersect all clipregion actions with our clip rect
io_rSubPage.WindStart();
@@ -1048,7 +1048,7 @@ static void appendSubPage( GDIMetaFile& o_rMtf, const Rectangle& i_rClipRect, GD
o_rMtf.AddAction( new MetaPushAction( PushFlags::LINECOLOR | PushFlags::FILLCOLOR | PushFlags::CLIPREGION | PushFlags::MAPMODE ) );
o_rMtf.AddAction( new MetaMapModeAction( MapMode( MapUnit::Map100thMM ) ) );
- Rectangle aBorderRect( i_rClipRect );
+ tools::Rectangle aBorderRect( i_rClipRect );
o_rMtf.AddAction( new MetaLineColorAction( Color( COL_BLACK ), true ) );
o_rMtf.AddAction( new MetaFillColorAction( Color( COL_TRANSPARENT ), false ) );
o_rMtf.AddAction( new MetaRectAction( aBorderRect ) );
@@ -1183,7 +1183,7 @@ PrinterController::PageSize PrinterController::getFilteredPageFile( int i_nFilte
aPageFile.Move( nX, nY, mpImplData->mxPrinter->GetDPIX(), mpImplData->mxPrinter->GetDPIY() );
aPageFile.WindStart();
// calculate border rectangle
- Rectangle aSubPageRect( Point( nX, nY ),
+ tools::Rectangle aSubPageRect( Point( nX, nY ),
Size( long(double(aPageSize.aSize.Width())*fScale),
long(double(aPageSize.aSize.Height())*fScale) ) );
diff --git a/vcl/source/gdi/region.cxx b/vcl/source/gdi/region.cxx
index b6ed3e1ef2c0..fd256020c76f 100644
--- a/vcl/source/gdi/region.cxx
+++ b/vcl/source/gdi/region.cxx
@@ -183,7 +183,7 @@ namespace
/** Convert a general polygon (one for which ImplIsPolygonRectilinear()
returns <FALSE/>) to bands.
*/
- std::unique_ptr<RegionBand> ImplGeneralPolygonToBands(const tools::PolyPolygon& rPolyPoly, const Rectangle& rPolygonBoundingBox)
+ std::unique_ptr<RegionBand> ImplGeneralPolygonToBands(const tools::PolyPolygon& rPolyPoly, const tools::Rectangle& rPolygonBoundingBox)
{
long nLineID = 0;
@@ -246,7 +246,7 @@ std::unique_ptr<RegionBand> ImplCreateRegionBandFromPolyPolygon(const tools::Pol
if(aPolyPolygon.Count())
{
- const Rectangle aRect(aPolyPolygon.GetBoundRect());
+ const tools::Rectangle aRect(aPolyPolygon.GetBoundRect());
if(!aRect.IsEmpty())
{
@@ -316,7 +316,7 @@ Region::Region(bool bIsNull)
{
}
-Region::Region(const Rectangle& rRect)
+Region::Region(const tools::Rectangle& rRect)
: mpB2DPolyPolygon(),
mpPolyPolygon(),
mpRegionBand(),
@@ -392,7 +392,7 @@ void vcl::Region::ImplCreatePolyPolyRegion( const tools::PolyPolygon& rPolyPoly
if(nPolyCount)
{
// polypolygon empty? -> empty region
- const Rectangle aRect(rPolyPoly.GetBoundRect());
+ const tools::Rectangle aRect(rPolyPoly.GetBoundRect());
if(!aRect.IsEmpty())
{
@@ -514,7 +514,7 @@ void vcl::Region::Scale( double fScaleX, double fScaleY )
}
}
-bool vcl::Region::Union( const Rectangle& rRect )
+bool vcl::Region::Union( const tools::Rectangle& rRect )
{
if(rRect.IsEmpty())
{
@@ -595,7 +595,7 @@ bool vcl::Region::Union( const Rectangle& rRect )
return true;
}
-bool vcl::Region::Intersect( const Rectangle& rRect )
+bool vcl::Region::Intersect( const tools::Rectangle& rRect )
{
if ( rRect.IsEmpty() )
{
@@ -687,7 +687,7 @@ bool vcl::Region::Intersect( const Rectangle& rRect )
return true;
}
-bool vcl::Region::Exclude( const Rectangle& rRect )
+bool vcl::Region::Exclude( const tools::Rectangle& rRect )
{
if ( rRect.IsEmpty() )
{
@@ -767,7 +767,7 @@ bool vcl::Region::Exclude( const Rectangle& rRect )
return true;
}
-bool vcl::Region::XOr( const Rectangle& rRect )
+bool vcl::Region::XOr( const tools::Rectangle& rRect )
{
if ( rRect.IsEmpty() )
{
@@ -1232,19 +1232,19 @@ bool vcl::Region::XOr( const vcl::Region& rRegion )
return true;
}
-Rectangle vcl::Region::GetBoundRect() const
+tools::Rectangle vcl::Region::GetBoundRect() const
{
if(IsEmpty())
{
// no internal data? -> region is empty!
- return Rectangle();
+ return tools::Rectangle();
}
if(IsNull())
{
// error; null region has no BoundRect
// OSL_ENSURE(false, "Region::GetBoundRect error: null region has unlimited bound rect, not representable (!)");
- return Rectangle();
+ return tools::Rectangle();
}
// prefer double precision source
@@ -1255,12 +1255,12 @@ Rectangle vcl::Region::GetBoundRect() const
if(aRange.isEmpty())
{
// emulate PolyPolygon::GetBoundRect() when empty polygon
- return Rectangle();
+ return tools::Rectangle();
}
else
{
// #i122149# corrected rounding, no need for ceil() and floor() here
- return Rectangle(
+ return tools::Rectangle(
basegfx::fround(aRange.getMinX()), basegfx::fround(aRange.getMinY()),
basegfx::fround(aRange.getMaxX()), basegfx::fround(aRange.getMaxY()));
}
@@ -1276,7 +1276,7 @@ Rectangle vcl::Region::GetBoundRect() const
return getRegionBand()->GetBoundRect();
}
- return Rectangle();
+ return tools::Rectangle();
}
const tools::PolyPolygon vcl::Region::GetAsPolyPolygon() const
@@ -1385,7 +1385,7 @@ bool vcl::Region::IsInside( const Point& rPoint ) const
return false;
}
-bool vcl::Region::IsOver( const Rectangle& rRect ) const
+bool vcl::Region::IsOver( const tools::Rectangle& rRect ) const
{
if(IsEmpty())
{
@@ -1466,7 +1466,7 @@ Region& vcl::Region::operator=( vcl::Region&& rRegion )
return *this;
}
-Region& vcl::Region::operator=( const Rectangle& rRect )
+Region& vcl::Region::operator=( const tools::Rectangle& rRect )
{
mpB2DPolyPolygon.reset();
mpPolyPolygon.reset();
@@ -1695,7 +1695,7 @@ void vcl::Region::GetRegionRectangles(RectangleVector& rTarget) const
}
}
-static inline bool ImplPolygonRectTest( const tools::Polygon& rPoly, Rectangle* pRectOut = nullptr )
+static inline bool ImplPolygonRectTest( const tools::Polygon& rPoly, tools::Rectangle* pRectOut = nullptr )
{
bool bIsRect = false;
const Point* pPoints = rPoly.GetConstPointAry();
@@ -1779,7 +1779,7 @@ vcl::Region vcl::Region::GetRegionFromPolyPolygon( const tools::PolyPolygon& rPo
}
vcl::Region aResult;
- Rectangle aRect;
+ tools::Rectangle aRect;
for( int i = 0; i < nPolygons; i++ )
{
diff --git a/vcl/source/gdi/regionband.cxx b/vcl/source/gdi/regionband.cxx
index abd6fc4c365c..e7d1163bdb26 100644
--- a/vcl/source/gdi/regionband.cxx
+++ b/vcl/source/gdi/regionband.cxx
@@ -61,7 +61,7 @@ RegionBand& RegionBand::operator=(const RegionBand& rRef)
return *this;
}
-RegionBand::RegionBand(const Rectangle& rRect)
+RegionBand::RegionBand(const tools::Rectangle& rRect)
: mpFirstBand(nullptr),
mpLastCheckedBand(nullptr)
{
@@ -1155,7 +1155,7 @@ bool RegionBand::Exclude(const RegionBand& rSource)
return true;
}
-Rectangle RegionBand::GetBoundRect() const
+tools::Rectangle RegionBand::GetBoundRect() const
{
// get the boundaries of the first band
@@ -1176,7 +1176,7 @@ Rectangle RegionBand::GetBoundRect() const
pBand = pBand->mpNextBand;
}
- return Rectangle( nXLeft, nYTop, nXRight, nYBottom );
+ return tools::Rectangle( nXLeft, nYTop, nXRight, nYBottom );
}
void RegionBand::XOr(const RegionBand& rSource)
@@ -1234,7 +1234,7 @@ void RegionBand::GetRegionRectangles(RectangleVector& rTarget) const
// clear result vector
rTarget.clear();
ImplRegionBand* pCurrRectBand = mpFirstBand;
- Rectangle aRectangle;
+ tools::Rectangle aRectangle;
while(pCurrRectBand)
{
diff --git a/vcl/source/gdi/salgdilayout.cxx b/vcl/source/gdi/salgdilayout.cxx
index 6c607b0cfb23..7a30d990ebbd 100644
--- a/vcl/source/gdi/salgdilayout.cxx
+++ b/vcl/source/gdi/salgdilayout.cxx
@@ -258,7 +258,7 @@ void SalGraphics::mirror( vcl::Region& rRgn, const OutputDevice *pOutDev ) const
}
}
-void SalGraphics::mirror( Rectangle& rRect, const OutputDevice *pOutDev, bool bBack ) const
+void SalGraphics::mirror( tools::Rectangle& rRect, const OutputDevice *pOutDev, bool bBack ) const
{
long nWidth = rRect.GetWidth();
long x = rRect.Left();
@@ -639,13 +639,13 @@ bool SalGraphics::DrawEPS( long nX, long nY, long nWidth, long nHeight, void* pP
return drawEPS( nX, nY, nWidth, nHeight, pPtr, nSize );
}
-bool SalGraphics::HitTestNativeScrollbar( ControlPart nPart, const Rectangle& rControlRegion,
+bool SalGraphics::HitTestNativeScrollbar( ControlPart nPart, const tools::Rectangle& rControlRegion,
const Point& aPos, bool& rIsInside, const OutputDevice *pOutDev )
{
if( (m_nLayout & SalLayoutFlags::BiDiRtl) || (pOutDev && pOutDev->IsRTLEnabled()) )
{
Point pt( aPos );
- Rectangle rgn( rControlRegion );
+ tools::Rectangle rgn( rControlRegion );
mirror( pt.X(), pOutDev );
mirror( rgn, pOutDev );
return hitTestNativeControl( ControlType::Scrollbar, nPart, rgn, pt, rIsInside );
@@ -690,14 +690,14 @@ void SalGraphics::mirror( ImplControlValue& rVal, const OutputDevice* pOutDev )
}
}
-bool SalGraphics::DrawNativeControl( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion,
+bool SalGraphics::DrawNativeControl( ControlType nType, ControlPart nPart, const tools::Rectangle& rControlRegion,
ControlState nState, const ImplControlValue& aValue,
const OUString& aCaption, const OutputDevice *pOutDev )
{
if( (m_nLayout & SalLayoutFlags::BiDiRtl) || (pOutDev && pOutDev->IsRTLEnabled()) )
{
- Rectangle rgn( rControlRegion );
- Rectangle aNull;
+ tools::Rectangle rgn( rControlRegion );
+ tools::Rectangle aNull;
if (rgn != aNull)
mirror(rgn, pOutDev);
std::unique_ptr< ImplControlValue > mirrorValue( aValue.clone());
@@ -709,13 +709,13 @@ bool SalGraphics::DrawNativeControl( ControlType nType, ControlPart nPart, const
return drawNativeControl( nType, nPart, rControlRegion, nState, aValue, aCaption );
}
-bool SalGraphics::GetNativeControlRegion( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion, ControlState nState,
+bool SalGraphics::GetNativeControlRegion( ControlType nType, ControlPart nPart, const tools::Rectangle& rControlRegion, ControlState nState,
const ImplControlValue& aValue, const OUString& aCaption,
- Rectangle &rNativeBoundingRegion, Rectangle &rNativeContentRegion, const OutputDevice *pOutDev )
+ tools::Rectangle &rNativeBoundingRegion, tools::Rectangle &rNativeContentRegion, const OutputDevice *pOutDev )
{
if( (m_nLayout & SalLayoutFlags::BiDiRtl) || (pOutDev && pOutDev->IsRTLEnabled()) )
{
- Rectangle rgn( rControlRegion );
+ tools::Rectangle rgn( rControlRegion );
mirror( rgn, pOutDev );
std::unique_ptr< ImplControlValue > mirrorValue( aValue.clone());
mirror( *mirrorValue, pOutDev );
diff --git a/vcl/source/gdi/sallayout.cxx b/vcl/source/gdi/sallayout.cxx
index 85ed62226ee4..764ad4ce75e1 100644
--- a/vcl/source/gdi/sallayout.cxx
+++ b/vcl/source/gdi/sallayout.cxx
@@ -693,12 +693,12 @@ bool SalLayout::GetOutline( SalGraphics& rSalGraphics,
return (bAllOk && bOneOk);
}
-bool SalLayout::GetBoundRect( SalGraphics& rSalGraphics, Rectangle& rRect ) const
+bool SalLayout::GetBoundRect( SalGraphics& rSalGraphics, tools::Rectangle& rRect ) const
{
bool bRet = false;
rRect.SetEmpty();
- Rectangle aRectangle;
+ tools::Rectangle aRectangle;
Point aPos;
const GlyphItem* pGlyph;
diff --git a/vcl/source/gdi/salnativewidgets-none.cxx b/vcl/source/gdi/salnativewidgets-none.cxx
index afe6c2e6dab9..6de0ace197c7 100644
--- a/vcl/source/gdi/salnativewidgets-none.cxx
+++ b/vcl/source/gdi/salnativewidgets-none.cxx
@@ -29,22 +29,22 @@ bool SalGraphics::IsNativeControlSupported( ControlType, ControlPart )
}
bool SalGraphics::hitTestNativeControl( ControlType, ControlPart,
- const Rectangle&, const Point&, bool& )
+ const tools::Rectangle&, const Point&, bool& )
{
return false;
}
bool SalGraphics::drawNativeControl( ControlType, ControlPart,
- const Rectangle&, ControlState,
+ const tools::Rectangle&, ControlState,
const ImplControlValue&, const OUString& )
{
return false;
}
bool SalGraphics::getNativeControlRegion( ControlType, ControlPart,
- const Rectangle&, ControlState,
+ const tools::Rectangle&, ControlState,
const ImplControlValue&,
- const OUString&, Rectangle&, Rectangle& )
+ const OUString&, tools::Rectangle&, tools::Rectangle& )
{
return false;
}
diff --git a/vcl/source/gdi/svmconverter.cxx b/vcl/source/gdi/svmconverter.cxx
index cb0f87ac387e..08428e876fc2 100644
--- a/vcl/source/gdi/svmconverter.cxx
+++ b/vcl/source/gdi/svmconverter.cxx
@@ -36,7 +36,7 @@
#include <o3tl/make_unique.hxx>
// Inlines
-void ImplReadRect( SvStream& rIStm, Rectangle& rRect )
+void ImplReadRect( SvStream& rIStm, tools::Rectangle& rRect )
{
Point aTL;
Point aBR;
@@ -44,10 +44,10 @@ void ImplReadRect( SvStream& rIStm, Rectangle& rRect )
ReadPair( rIStm, aTL );
ReadPair( rIStm, aBR );
- rRect = Rectangle( aTL, aBR );
+ rRect = tools::Rectangle( aTL, aBR );
}
-void ImplWriteRect( SvStream& rOStm, const Rectangle& rRect )
+void ImplWriteRect( SvStream& rOStm, const tools::Rectangle& rRect )
{
WritePair( rOStm, rRect.TopLeft() );
WritePair( rOStm, rRect.BottomRight() );
@@ -550,7 +550,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
bool bFatLine = false;
tools::Polygon aActionPoly;
- Rectangle aRect;
+ tools::Rectangle aRect;
Point aPt, aPt1;
Size aSz;
Color aActionColor;
@@ -1149,7 +1149,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
case 1:
{
- Rectangle aRegRect;
+ tools::Rectangle aRegRect;
ImplReadRect( rIStm, aRegRect );
aRegion = vcl::Region( aRegRect );
@@ -2079,7 +2079,7 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
{
const MetaClipRegionAction* pAct = static_cast<const MetaClipRegionAction*>(pAction);
const vcl::Region& rRegion = pAct->GetRegion();
- Rectangle aClipRect;
+ tools::Rectangle aClipRect;
rOStm.WriteInt16( GDI_CLIPREGION_ACTION );
rOStm.WriteInt32( 24 );
diff --git a/vcl/source/gdi/textlayout.cxx b/vcl/source/gdi/textlayout.cxx
index e41887d24e01..5c0d0efa9595 100644
--- a/vcl/source/gdi/textlayout.cxx
+++ b/vcl/source/gdi/textlayout.cxx
@@ -84,8 +84,8 @@ namespace vcl
public:
// equivalents to the respective OutputDevice methods, which take the reference device into account
- Rectangle DrawText( const Rectangle& _rRect, const OUString& _rText, DrawTextFlags _nStyle, MetricVector* _pVector, OUString* _pDisplayText, const Size* i_pDeviceSize );
- Rectangle GetTextRect( const Rectangle& _rRect, const OUString& _rText, DrawTextFlags _nStyle, Size* o_pDeviceSize );
+ tools::Rectangle DrawText( const tools::Rectangle& _rRect, const OUString& _rText, DrawTextFlags _nStyle, MetricVector* _pVector, OUString* _pDisplayText, const Size* i_pDeviceSize );
+ tools::Rectangle GetTextRect( const tools::Rectangle& _rRect, const OUString& _rText, DrawTextFlags _nStyle, Size* o_pDeviceSize );
private:
long GetTextArray( const OUString& _rText, long* _pDXAry, sal_Int32 _nStartIndex, sal_Int32 _nLength ) const;
@@ -96,7 +96,7 @@ namespace vcl
const Fraction m_aZoom;
const bool m_bRTLEnabled;
- Rectangle m_aCompleteTextRect;
+ tools::Rectangle m_aCompleteTextRect;
};
ReferenceDeviceTextLayout::ReferenceDeviceTextLayout( const Control& _rControl, OutputDevice& _rTargetDevice,
@@ -218,7 +218,7 @@ namespace vcl
m_rTargetDevice.DrawTextArray( _rStartPoint, _rText, pCharWidths.get(), _nStartIndex, _nLength );
pCharWidths.reset();
- m_aCompleteTextRect.Union( Rectangle( _rStartPoint, Size( nTextWidth, m_rTargetDevice.GetTextHeight() ) ) );
+ m_aCompleteTextRect.Union( tools::Rectangle( _rStartPoint, Size( nTextWidth, m_rTargetDevice.GetTextHeight() ) ) );
}
void ReferenceDeviceTextLayout::GetCaretPositions( const OUString& _rText, long* _pCaretXArray,
@@ -244,11 +244,11 @@ namespace vcl
return true;
}
- Rectangle ReferenceDeviceTextLayout::DrawText( const Rectangle& _rRect, const OUString& _rText, DrawTextFlags _nStyle,
+ tools::Rectangle ReferenceDeviceTextLayout::DrawText( const tools::Rectangle& _rRect, const OUString& _rText, DrawTextFlags _nStyle,
MetricVector* _pVector, OUString* _pDisplayText, const Size* i_pDeviceSize )
{
if ( _rText.isEmpty() )
- return Rectangle();
+ return tools::Rectangle();
// determine text layout mode from the RTL-ness of the control whose text we render
ComplexTextLayoutFlags nTextLayoutMode = m_bRTLEnabled ? ComplexTextLayoutFlags::BiDiRtl : ComplexTextLayoutFlags::Default;
@@ -259,7 +259,7 @@ namespace vcl
// our caller gives us the left border of the draw position, regardless of script type, text layout,
// and the like in our ctor, we set the map mode of the target device from pixel to twip, but our caller doesn't know this,
// but passed pixel coordinates. So, adjust the rect.
- Rectangle aRect( m_rTargetDevice.PixelToLogic( _rRect ) );
+ tools::Rectangle aRect( m_rTargetDevice.PixelToLogic( _rRect ) );
if (i_pDeviceSize)
{
//if i_pDeviceSize is passed in here, it was the original pre logic-to-pixel size of _rRect
@@ -270,7 +270,7 @@ namespace vcl
m_aCompleteTextRect.SetEmpty();
m_rTargetDevice.DrawText( aRect, _rText, _nStyle, _pVector, _pDisplayText, this );
- Rectangle aTextRect = m_aCompleteTextRect;
+ tools::Rectangle aTextRect = m_aCompleteTextRect;
if ( aTextRect.IsEmpty() && !aRect.IsEmpty() )
{
@@ -302,10 +302,10 @@ namespace vcl
return aTextRect;
}
- Rectangle ReferenceDeviceTextLayout::GetTextRect( const Rectangle& _rRect, const OUString& _rText, DrawTextFlags _nStyle, Size* o_pDeviceSize )
+ tools::Rectangle ReferenceDeviceTextLayout::GetTextRect( const tools::Rectangle& _rRect, const OUString& _rText, DrawTextFlags _nStyle, Size* o_pDeviceSize )
{
if ( _rText.isEmpty() )
- return Rectangle();
+ return tools::Rectangle();
// determine text layout mode from the RTL-ness of the control whose text we render
ComplexTextLayoutFlags nTextLayoutMode = m_bRTLEnabled ? ComplexTextLayoutFlags::BiDiRtl : ComplexTextLayoutFlags::Default;
@@ -316,9 +316,9 @@ namespace vcl
// our caller gives us the left border of the draw position, regardless of script type, text layout,
// and the like in our ctor, we set the map mode of the target device from pixel to twip, but our caller doesn't know this,
// but passed pixel coordinates. So, adjust the rect.
- Rectangle aRect( m_rTargetDevice.PixelToLogic( _rRect ) );
+ tools::Rectangle aRect( m_rTargetDevice.PixelToLogic( _rRect ) );
- Rectangle aTextRect = m_rTargetDevice.GetTextRect( aRect, _rText, _nStyle, nullptr, this );
+ tools::Rectangle aTextRect = m_rTargetDevice.GetTextRect( aRect, _rText, _nStyle, nullptr, this );
//if o_pDeviceSize is available, stash the pre logic-to-pixel size in it
if (o_pDeviceSize)
@@ -342,13 +342,13 @@ namespace vcl
{
}
- Rectangle ControlTextRenderer::DrawText( const Rectangle& _rRect, const OUString& _rText, DrawTextFlags _nStyle,
+ tools::Rectangle ControlTextRenderer::DrawText( const tools::Rectangle& _rRect, const OUString& _rText, DrawTextFlags _nStyle,
MetricVector* _pVector, OUString* _pDisplayText, const Size* i_pDeviceSize )
{
return m_pImpl->DrawText( _rRect, _rText, _nStyle, _pVector, _pDisplayText, i_pDeviceSize );
}
- Rectangle ControlTextRenderer::GetTextRect( const Rectangle& _rRect, const OUString& _rText, DrawTextFlags _nStyle, Size* o_pDeviceSize = nullptr )
+ tools::Rectangle ControlTextRenderer::GetTextRect( const tools::Rectangle& _rRect, const OUString& _rText, DrawTextFlags _nStyle, Size* o_pDeviceSize = nullptr )
{
return m_pImpl->GetTextRect( _rRect, _rText, _nStyle, o_pDeviceSize );
}
diff --git a/vcl/source/gdi/virdev.cxx b/vcl/source/gdi/virdev.cxx
index 06560be47f08..52bb9f566873 100644
--- a/vcl/source/gdi/virdev.cxx
+++ b/vcl/source/gdi/virdev.cxx
@@ -377,7 +377,7 @@ bool VirtualDevice::InnerImplSetOutputSizePixel( const Size& rNewSize, bool bEra
// #i32109#: Fill opaque areas correctly (without relying on
// fill/linecolor state)
-void VirtualDevice::ImplFillOpaqueRectangle( const Rectangle& rRect )
+void VirtualDevice::ImplFillOpaqueRectangle( const tools::Rectangle& rRect )
{
// Set line and fill color to black (->opaque),
// fill rect with that (linecolor, too, because of
diff --git a/vcl/source/gdi/wall.cxx b/vcl/source/gdi/wall.cxx
index b3f6fa2fa0b0..1e9ecd37dd2c 100644
--- a/vcl/source/gdi/wall.cxx
+++ b/vcl/source/gdi/wall.cxx
@@ -47,7 +47,7 @@ ImplWallpaper::ImplWallpaper( const ImplWallpaper& rImplWallpaper ) :
mpGradient = o3tl::make_unique<Gradient>( *rImplWallpaper.mpGradient );
if ( rImplWallpaper.mpRect )
- mpRect = o3tl::make_unique<Rectangle>( *rImplWallpaper.mpRect );
+ mpRect = o3tl::make_unique<tools::Rectangle>( *rImplWallpaper.mpRect );
}
@@ -77,7 +77,7 @@ SvStream& ReadImplWallpaper( SvStream& rIStm, ImplWallpaper& rImplWallpaper )
if( bRect )
{
- rImplWallpaper.mpRect = o3tl::make_unique<Rectangle>();
+ rImplWallpaper.mpRect = o3tl::make_unique<tools::Rectangle>();
ReadRectangle( rIStm, *rImplWallpaper.mpRect );
}
@@ -300,7 +300,7 @@ Gradient Wallpaper::ImplGetApplicationGradient()
return g;
}
-void Wallpaper::SetRect( const Rectangle& rRect )
+void Wallpaper::SetRect( const tools::Rectangle& rRect )
{
if ( rRect.IsEmpty() )
{
@@ -311,16 +311,16 @@ void Wallpaper::SetRect( const Rectangle& rRect )
if ( mpImplWallpaper->mpRect )
*(mpImplWallpaper->mpRect) = rRect;
else
- mpImplWallpaper->mpRect = o3tl::make_unique<Rectangle>( rRect );
+ mpImplWallpaper->mpRect = o3tl::make_unique<tools::Rectangle>( rRect );
}
}
-Rectangle Wallpaper::GetRect() const
+tools::Rectangle Wallpaper::GetRect() const
{
if ( mpImplWallpaper->mpRect )
return *(mpImplWallpaper->mpRect);
else
- return Rectangle();
+ return tools::Rectangle();
}
bool Wallpaper::IsRect() const
diff --git a/vcl/source/helper/canvasbitmap.cxx b/vcl/source/helper/canvasbitmap.cxx
index 0bef43295f86..05d99ecb1238 100644
--- a/vcl/source/helper/canvasbitmap.cxx
+++ b/vcl/source/helper/canvasbitmap.cxx
@@ -448,7 +448,7 @@ uno::Sequence< sal_Int8 > SAL_CALL VclCanvasBitmap::getData( rendering::IntegerB
bitmapLayout = getMemoryLayout();
- const ::Rectangle aRequestedArea( vcl::unotools::rectangleFromIntegerRectangle2D(rect) );
+ const ::tools::Rectangle aRequestedArea( vcl::unotools::rectangleFromIntegerRectangle2D(rect) );
if( aRequestedArea.IsEmpty() )
return uno::Sequence< sal_Int8 >();
@@ -466,7 +466,7 @@ uno::Sequence< sal_Int8 > SAL_CALL VclCanvasBitmap::getData( rendering::IntegerB
}
uno::Sequence< sal_Int8 > aRet;
- Rectangle aRequestedBytes( aRequestedArea );
+ tools::Rectangle aRequestedBytes( aRequestedArea );
// adapt to byte boundaries
aRequestedBytes.Left() = aRequestedArea.Left()*m_nBitsPerOutputPixel/8;
diff --git a/vcl/source/helper/canvastools.cxx b/vcl/source/helper/canvastools.cxx
index a986f6a5e1cb..2f7e8d60635e 100644
--- a/vcl/source/helper/canvastools.cxx
+++ b/vcl/source/helper/canvastools.cxx
@@ -348,7 +348,7 @@ namespace vcl
return pointFromB2IPoint(basegfx::fround(rPoint));
}
- ::Rectangle rectangleFromB2DRectangle( const basegfx::B2DRange& rRect )
+ ::tools::Rectangle rectangleFromB2DRectangle( const basegfx::B2DRange& rRect )
{
return rectangleFromB2IRectangle(basegfx::fround(rRect));
}
@@ -364,15 +364,15 @@ namespace vcl
return basegfx::B2IPoint(rPoint.X(), rPoint.Y());
}
- Rectangle rectangleFromB2IRectangle( const basegfx::B2IRange& rRect )
+ tools::Rectangle rectangleFromB2IRectangle( const basegfx::B2IRange& rRect )
{
- return ::Rectangle( rRect.getMinX(),
+ return ::tools::Rectangle( rRect.getMinX(),
rRect.getMinY(),
rRect.getMaxX(),
rRect.getMaxY() );
}
- basegfx::B2IRectangle b2IRectangleFromRectangle(Rectangle const& rRect)
+ basegfx::B2IRectangle b2IRectangleFromRectangle(tools::Rectangle const& rRect)
{
return basegfx::B2IRectangle(rRect.Left(), rRect.Top(),
rRect.Right(), rRect.Bottom());
@@ -390,7 +390,7 @@ namespace vcl
rPoint.Y() );
}
- basegfx::B2DRange b2DRectangleFromRectangle( const ::Rectangle& rRect )
+ basegfx::B2DRange b2DRectangleFromRectangle( const ::tools::Rectangle& rRect )
{
return basegfx::B2DRange( rRect.Left(),
rRect.Top(),
@@ -416,9 +416,9 @@ namespace vcl
rPoint.Y );
}
- Rectangle rectangleFromIntegerRectangle2D( const geometry::IntegerRectangle2D& rRectangle )
+ tools::Rectangle rectangleFromIntegerRectangle2D( const geometry::IntegerRectangle2D& rRectangle )
{
- return Rectangle( rRectangle.X1, rRectangle.Y1,
+ return tools::Rectangle( rRectangle.X1, rRectangle.Y1,
rRectangle.X2, rRectangle.Y2 );
}
diff --git a/vcl/source/opengl/OpenGLContext.cxx b/vcl/source/opengl/OpenGLContext.cxx
index d031f9c01848..72e7f3cbc32d 100644
--- a/vcl/source/opengl/OpenGLContext.cxx
+++ b/vcl/source/opengl/OpenGLContext.cxx
@@ -694,7 +694,7 @@ OpenGLFramebuffer* OpenGLContext::AcquireFramebuffer( const OpenGLTexture& rText
BindFramebuffer( pFramebuffer );
pFramebuffer->AttachTexture( rTexture );
- state().viewport(Rectangle(Point(), Size(rTexture.GetWidth(), rTexture.GetHeight())));
+ state().viewport(tools::Rectangle(Point(), Size(rTexture.GetWidth(), rTexture.GetHeight())));
return pFramebuffer;
}
diff --git a/vcl/source/outdev/bitmap.cxx b/vcl/source/outdev/bitmap.cxx
index 8593a3f3f7ca..4ae3c84d37ce 100644
--- a/vcl/source/outdev/bitmap.cxx
+++ b/vcl/source/outdev/bitmap.cxx
@@ -71,7 +71,7 @@ void OutputDevice::DrawBitmap( const Point& rDestPt, const Size& rDestSize,
}
if ( RasterOp::Invert == meRasterOp )
{
- DrawRect( Rectangle( rDestPt, rDestSize ) );
+ DrawRect( tools::Rectangle( rDestPt, rDestSize ) );
return;
}
@@ -93,7 +93,7 @@ void OutputDevice::DrawBitmap( const Point& rDestPt, const Size& rDestSize,
Push( PushFlags::LINECOLOR | PushFlags::FILLCOLOR );
SetLineColor( aCol );
SetFillColor( aCol );
- DrawRect( Rectangle( rDestPt, rDestSize ) );
+ DrawRect( tools::Rectangle( rDestPt, rDestSize ) );
Pop();
return;
}
@@ -168,7 +168,7 @@ void OutputDevice::DrawBitmap( const Point& rDestPt, const Size& rDestSize,
if( mpAlphaVDev )
{
// #i32109#: Make bitmap area opaque
- mpAlphaVDev->ImplFillOpaqueRectangle( Rectangle(rDestPt, rDestSize) );
+ mpAlphaVDev->ImplFillOpaqueRectangle( tools::Rectangle(rDestPt, rDestSize) );
}
}
@@ -181,8 +181,8 @@ Bitmap OutputDevice::GetDownsampledBitmap( const Size& rDstSz,
if( !aBmp.IsEmpty() )
{
Point aPoint;
- const Rectangle aBmpRect( aPoint, aBmp.GetSizePixel() );
- Rectangle aSrcRect( rSrcPt, rSrcSz );
+ const tools::Rectangle aBmpRect( aPoint, aBmp.GetSizePixel() );
+ tools::Rectangle aSrcRect( rSrcPt, rSrcSz );
// do cropping if necessary
if( aSrcRect.Intersection( aBmpRect ) != aBmpRect )
@@ -297,7 +297,7 @@ void OutputDevice::DrawBitmapEx( const Point& rDestPt, const Size& rDestSize,
if ( RasterOp::Invert == meRasterOp )
{
- DrawRect( Rectangle( rDestPt, rDestSize ) );
+ DrawRect( tools::Rectangle( rDestPt, rDestSize ) );
return;
}
@@ -394,7 +394,7 @@ Bitmap OutputDevice::GetBitmap( const Point& rSrcPt, const Size& rSize ) const
{
if ( nWidth > 0 && nHeight > 0 && nX <= (mnOutWidth + mnOutOffX) && nY <= (mnOutHeight + mnOutOffY))
{
- Rectangle aRect( Point( nX, nY ), Size( nWidth, nHeight ) );
+ tools::Rectangle aRect( Point( nX, nY ), Size( nWidth, nHeight ) );
bool bClipped = false;
// X-Coordinate outside of draw area?
@@ -552,7 +552,7 @@ void OutputDevice::DrawDeviceBitmap( const Point& rDestPt, const Size& rDestSize
// Note the call to ImplPixelToDevicePixel(), since
// aPosAry already contains the mnOutOff-offsets, they
// also have to be applied to the region
- Rectangle aClipRegionBounds( ImplPixelToDevicePixel(maRegion).GetBoundRect() );
+ tools::Rectangle aClipRegionBounds( ImplPixelToDevicePixel(maRegion).GetBoundRect() );
// TODO: Also respect scaling (that's a bit tricky,
// since the source points have to move fractional
@@ -567,7 +567,7 @@ void OutputDevice::DrawDeviceBitmap( const Point& rDestPt, const Size& rDestSize
aPosAry.mnDestHeight == aPosAry.mnSrcHeight)
{
// now intersect dest rect with clip region
- aClipRegionBounds.Intersection(Rectangle(aPosAry.mnDestX,
+ aClipRegionBounds.Intersection(tools::Rectangle(aPosAry.mnDestX,
aPosAry.mnDestY,
aPosAry.mnDestX + aPosAry.mnDestWidth - 1,
aPosAry.mnDestY + aPosAry.mnDestHeight - 1));
@@ -617,7 +617,7 @@ void OutputDevice::DrawDeviceBitmap( const Point& rDestPt, const Size& rDestSize
if (mpAlphaVDev)
{
// #i32109#: Make bitmap area opaque
- mpAlphaVDev->ImplFillOpaqueRectangle( Rectangle(rDestPt, rDestSize) );
+ mpAlphaVDev->ImplFillOpaqueRectangle( tools::Rectangle(rDestPt, rDestSize) );
}
}
}
@@ -632,7 +632,7 @@ void OutputDevice::DrawDeviceAlphaBitmap( const Bitmap& rBmp, const AlphaMask& r
Point aOutPt(LogicToPixel(rDestPt));
Size aOutSz(LogicToPixel(rDestSize));
- Rectangle aDstRect(Point(), GetOutputSizePixel());
+ tools::Rectangle aDstRect(Point(), GetOutputSizePixel());
const bool bHMirr = aOutSz.Width() < 0;
const bool bVMirr = aOutSz.Height() < 0;
@@ -651,7 +651,7 @@ void OutputDevice::DrawDeviceAlphaBitmap( const Bitmap& rBmp, const AlphaMask& r
aOutPt.Y() -= aOutSz.Height() - 1L;
}
- if (!aDstRect.Intersection(Rectangle(aOutPt, aOutSz)).IsEmpty())
+ if (!aDstRect.Intersection(tools::Rectangle(aOutPt, aOutSz)).IsEmpty())
{
static const char* pDisableNative = getenv( "SAL_DISABLE_NATIVE_ALPHA");
// #i83087# Naturally, system alpha blending cannot work with
@@ -696,8 +696,8 @@ void OutputDevice::DrawDeviceAlphaBitmap( const Bitmap& rBmp, const AlphaMask& r
#if HAVE_FEATURE_OPENGL
assert(!OpenGLHelper::isVCLOpenGLEnabled());
#endif
- Rectangle aBmpRect(Point(), rBmp.GetSizePixel());
- if (!aBmpRect.Intersection(Rectangle(rSrcPtPixel, rSrcSizePixel)).IsEmpty())
+ tools::Rectangle aBmpRect(Point(), rBmp.GetSizePixel());
+ if (!aBmpRect.Intersection(tools::Rectangle(rSrcPtPixel, rSrcSizePixel)).IsEmpty())
{
Point auxOutPt(LogicToPixel(rDestPt));
Size auxOutSz(LogicToPixel(rDestSize));
@@ -718,7 +718,7 @@ struct LinearScaleContext
std::unique_ptr<long[]> mpMapXOffset;
std::unique_ptr<long[]> mpMapYOffset;
- LinearScaleContext(Rectangle& aDstRect, Rectangle& aBitmapRect,
+ LinearScaleContext(tools::Rectangle& aDstRect, tools::Rectangle& aBitmapRect,
Size& aOutSize, long nOffX, long nOffY)
: mpMapX(new long[aDstRect.GetWidth()])
@@ -882,7 +882,7 @@ struct TradScaleContext
std::unique_ptr<long[]> mpMapX;
std::unique_ptr<long[]> mpMapY;
- TradScaleContext(Rectangle& aDstRect, Rectangle& aBitmapRect,
+ TradScaleContext(tools::Rectangle& aDstRect, tools::Rectangle& aBitmapRect,
Size& aOutSize, long nOffX, long nOffY)
: mpMapX(new long[aDstRect.GetWidth()])
@@ -925,7 +925,7 @@ private:
} // end anonymous namespace
-void OutputDevice::DrawDeviceAlphaBitmapSlowPath(const Bitmap& rBitmap, const AlphaMask& rAlpha, Rectangle aDstRect, Rectangle aBmpRect, Size& aOutSize, Point& aOutPoint)
+void OutputDevice::DrawDeviceAlphaBitmapSlowPath(const Bitmap& rBitmap, const AlphaMask& rAlpha, tools::Rectangle aDstRect, tools::Rectangle aBmpRect, Size& aOutSize, Point& aOutPoint)
{
assert(!is_double_buffered_window());
@@ -1107,7 +1107,7 @@ bool OutputDevice::TransformAndReduceBitmapExToTargetRange(
if(IsClipRegion())
{
- const Rectangle aRegionRectangle(GetActiveClipRegion().GetBoundRect());
+ const tools::Rectangle aRegionRectangle(GetActiveClipRegion().GetBoundRect());
aOutPixel.intersect( // caution! Range from rectangle, one too much (!)
basegfx::B2DRange(
@@ -1389,7 +1389,7 @@ Bitmap OutputDevice::BlendBitmapWithAlpha(
Bitmap& aBmp,
BitmapReadAccess* pP,
BitmapReadAccess* pA,
- const Rectangle& aDstRect,
+ const tools::Rectangle& aDstRect,
const sal_Int32 nOffY,
const sal_Int32 nDstHeight,
const sal_Int32 nOffX,
@@ -1489,7 +1489,7 @@ Bitmap OutputDevice::BlendBitmap(
const sal_Int32 nDstHeight,
const sal_Int32 nOffX,
const sal_Int32 nDstWidth,
- const Rectangle& aBmpRect,
+ const tools::Rectangle& aBmpRect,
const Size& aOutSz,
const bool bHMirr,
const bool bVMirr,
diff --git a/vcl/source/outdev/clipping.cxx b/vcl/source/outdev/clipping.cxx
index 9396f262362b..5b6d71d4a3f1 100644
--- a/vcl/source/outdev/clipping.cxx
+++ b/vcl/source/outdev/clipping.cxx
@@ -103,13 +103,13 @@ void OutputDevice::MoveClipRegion( long nHorzMove, long nVertMove )
mpAlphaVDev->MoveClipRegion( nHorzMove, nVertMove );
}
-void OutputDevice::IntersectClipRegion( const Rectangle& rRect )
+void OutputDevice::IntersectClipRegion( const tools::Rectangle& rRect )
{
if ( mpMetaFile )
mpMetaFile->AddAction( new MetaISectRectClipRegionAction( rRect ) );
- Rectangle aRect = LogicToPixel( rRect );
+ tools::Rectangle aRect = LogicToPixel( rRect );
maRegion.Intersect( aRect );
mbClipRegion = true;
mbInitClipRegion = true;
@@ -157,7 +157,7 @@ void OutputDevice::InitClipRegion()
// Perform actual rect clip against outdev
// dimensions, to generate empty clips whenever one of the
// values is completely off the device.
- Rectangle aDeviceBounds( mnOutOffX, mnOutOffY,
+ tools::Rectangle aDeviceBounds( mnOutOffX, mnOutOffY,
mnOutOffX+GetOutputWidthPixel()-1,
mnOutOffY+GetOutputHeightPixel()-1 );
aRegion.Intersect( aDeviceBounds );
@@ -195,7 +195,7 @@ vcl::Region OutputDevice::GetActiveClipRegion() const
return GetClipRegion();
}
-void OutputDevice::ClipToPaintRegion(Rectangle& /*rDstRect*/)
+void OutputDevice::ClipToPaintRegion(tools::Rectangle& /*rDstRect*/)
{
// this is only used in Window, but we still need it as it's called
// on in other clipping functions
diff --git a/vcl/source/outdev/curvedshapes.cxx b/vcl/source/outdev/curvedshapes.cxx
index 3c931c87f2f5..675543f04197 100644
--- a/vcl/source/outdev/curvedshapes.cxx
+++ b/vcl/source/outdev/curvedshapes.cxx
@@ -25,7 +25,7 @@
#include <salgdi.hxx>
-void OutputDevice::DrawEllipse( const Rectangle& rRect )
+void OutputDevice::DrawEllipse( const tools::Rectangle& rRect )
{
assert(!is_double_buffered_window());
@@ -35,7 +35,7 @@ void OutputDevice::DrawEllipse( const Rectangle& rRect )
if ( !IsDeviceOutputNecessary() || (!mbLineColor && !mbFillColor) || ImplIsRecordLayout() )
return;
- Rectangle aRect( ImplLogicToDevicePixel( rRect ) );
+ tools::Rectangle aRect( ImplLogicToDevicePixel( rRect ) );
if ( aRect.IsEmpty() )
return;
@@ -72,7 +72,7 @@ void OutputDevice::DrawEllipse( const Rectangle& rRect )
mpAlphaVDev->DrawEllipse( rRect );
}
-void OutputDevice::DrawArc( const Rectangle& rRect,
+void OutputDevice::DrawArc( const tools::Rectangle& rRect,
const Point& rStartPt, const Point& rEndPt )
{
assert(!is_double_buffered_window());
@@ -83,7 +83,7 @@ void OutputDevice::DrawArc( const Rectangle& rRect,
if ( !IsDeviceOutputNecessary() || !mbLineColor || ImplIsRecordLayout() )
return;
- Rectangle aRect( ImplLogicToDevicePixel( rRect ) );
+ tools::Rectangle aRect( ImplLogicToDevicePixel( rRect ) );
if ( aRect.IsEmpty() )
return;
@@ -116,7 +116,7 @@ void OutputDevice::DrawArc( const Rectangle& rRect,
mpAlphaVDev->DrawArc( rRect, rStartPt, rEndPt );
}
-void OutputDevice::DrawPie( const Rectangle& rRect,
+void OutputDevice::DrawPie( const tools::Rectangle& rRect,
const Point& rStartPt, const Point& rEndPt )
{
assert(!is_double_buffered_window());
@@ -127,7 +127,7 @@ void OutputDevice::DrawPie( const Rectangle& rRect,
if ( !IsDeviceOutputNecessary() || (!mbLineColor && !mbFillColor) || ImplIsRecordLayout() )
return;
- Rectangle aRect( ImplLogicToDevicePixel( rRect ) );
+ tools::Rectangle aRect( ImplLogicToDevicePixel( rRect ) );
if ( aRect.IsEmpty() )
return;
@@ -167,7 +167,7 @@ void OutputDevice::DrawPie( const Rectangle& rRect,
mpAlphaVDev->DrawPie( rRect, rStartPt, rEndPt );
}
-void OutputDevice::DrawChord( const Rectangle& rRect,
+void OutputDevice::DrawChord( const tools::Rectangle& rRect,
const Point& rStartPt, const Point& rEndPt )
{
assert(!is_double_buffered_window());
@@ -178,7 +178,7 @@ void OutputDevice::DrawChord( const Rectangle& rRect,
if ( !IsDeviceOutputNecessary() || (!mbLineColor && !mbFillColor) || ImplIsRecordLayout() )
return;
- Rectangle aRect( ImplLogicToDevicePixel( rRect ) );
+ tools::Rectangle aRect( ImplLogicToDevicePixel( rRect ) );
if ( aRect.IsEmpty() )
return;
diff --git a/vcl/source/outdev/font.cxx b/vcl/source/outdev/font.cxx
index a28fba0c0220..554bec061e50 100644
--- a/vcl/source/outdev/font.cxx
+++ b/vcl/source/outdev/font.cxx
@@ -287,7 +287,7 @@ SystemFontData OutputDevice::GetSysFontData(int nFallbacklevel) const
#endif // ENABLE_CAIRO_CANVAS
void OutputDevice::ImplGetEmphasisMark( tools::PolyPolygon& rPolyPoly, bool& rPolyLine,
- Rectangle& rRect1, Rectangle& rRect2,
+ tools::Rectangle& rRect1, tools::Rectangle& rRect2,
long& rYOff, long& rWidth,
FontEmphasisMark eEmphasis,
long nHeight, short /*nOrient*/ )
@@ -349,7 +349,7 @@ void OutputDevice::ImplGetEmphasisMark( tools::PolyPolygon& rPolyPoly, bool& rPo
if ( !nDotSize )
nDotSize = 1;
if ( nDotSize <= 2 )
- rRect1 = Rectangle( Point(), Size( nDotSize, nDotSize ) );
+ rRect1 = tools::Rectangle( Point(), Size( nDotSize, nDotSize ) );
else
{
long nRad = nDotSize/2;
@@ -366,7 +366,7 @@ void OutputDevice::ImplGetEmphasisMark( tools::PolyPolygon& rPolyPoly, bool& rPo
if ( !nDotSize )
nDotSize = 1;
if ( nDotSize <= 2 )
- rRect1 = Rectangle( Point(), Size( nDotSize, nDotSize ) );
+ rRect1 = tools::Rectangle( Point(), Size( nDotSize, nDotSize ) );
else
{
long nRad = nDotSize/2;
@@ -392,7 +392,7 @@ void OutputDevice::ImplGetEmphasisMark( tools::PolyPolygon& rPolyPoly, bool& rPo
if ( !nDotSize )
nDotSize = 1;
if ( nDotSize <= 2 )
- rRect1 = Rectangle( Point(), Size( nDotSize, nDotSize ) );
+ rRect1 = tools::Rectangle( Point(), Size( nDotSize, nDotSize ) );
else
{
long nRad = nDotSize/2;
@@ -411,13 +411,13 @@ void OutputDevice::ImplGetEmphasisMark( tools::PolyPolygon& rPolyPoly, bool& rPo
{
if ( nDotSize == 1 )
{
- rRect1 = Rectangle( Point(), Size( nDotSize, nDotSize ) );
+ rRect1 = tools::Rectangle( Point(), Size( nDotSize, nDotSize ) );
rWidth = nDotSize;
}
else
{
- rRect1 = Rectangle( Point(), Size( 1, 1 ) );
- rRect2 = Rectangle( Point( 1, 1 ), Size( 1, 1 ) );
+ rRect1 = tools::Rectangle( Point(), Size( 1, 1 ) );
+ rRect2 = tools::Rectangle( Point( 1, 1 ), Size( 1, 1 ) );
}
}
else
@@ -429,7 +429,7 @@ void OutputDevice::ImplGetEmphasisMark( tools::PolyPolygon& rPolyPoly, bool& rPo
aPoly.Scale( dScale, dScale );
tools::Polygon aTemp;
aPoly.AdaptiveSubdivide( aTemp );
- Rectangle aBoundRect = aTemp.GetBoundRect();
+ tools::Rectangle aBoundRect = aTemp.GetBoundRect();
rWidth = aBoundRect.GetWidth();
nDotSize = aBoundRect.GetHeight();
rPolyPoly.Insert( aTemp );
@@ -1193,7 +1193,7 @@ void OutputDevice::SetFontOrientation( LogicalFontInstance* const pFontInstance
void OutputDevice::ImplDrawEmphasisMark( long nBaseX, long nX, long nY,
const tools::PolyPolygon& rPolyPoly, bool bPolyLine,
- const Rectangle& rRect1, const Rectangle& rRect2 )
+ const tools::Rectangle& rRect1, const tools::Rectangle& rRect2 )
{
if( IsRTLEnabled() )
// --- RTL --- mirror at basex
@@ -1220,14 +1220,14 @@ void OutputDevice::ImplDrawEmphasisMark( long nBaseX, long nX, long nY,
if ( !rRect1.IsEmpty() )
{
- Rectangle aRect( Point( nX+rRect1.Left(),
+ tools::Rectangle aRect( Point( nX+rRect1.Left(),
nY+rRect1.Top() ), rRect1.GetSize() );
DrawRect( aRect );
}
if ( !rRect2.IsEmpty() )
{
- Rectangle aRect( Point( nX+rRect2.Left(),
+ tools::Rectangle aRect( Point( nX+rRect2.Left(),
nY+rRect2.Top() ), rRect2.GetSize() );
DrawRect( aRect );
@@ -1245,8 +1245,8 @@ void OutputDevice::ImplDrawEmphasisMarks( SalLayout& rSalLayout )
FontEmphasisMark nEmphasisMark = ImplGetEmphasisMarkStyle( maFont );
tools::PolyPolygon aPolyPoly;
- Rectangle aRect1;
- Rectangle aRect2;
+ tools::Rectangle aRect1;
+ tools::Rectangle aRect2;
long nEmphasisYOff;
long nEmphasisWidth;
long nEmphasisHeight;
@@ -1286,7 +1286,7 @@ void OutputDevice::ImplDrawEmphasisMarks( SalLayout& rSalLayout )
aOffset += Point( nEmphasisWidth2, nEmphasisHeight2 );
Point aOutPoint;
- Rectangle aRectangle;
+ tools::Rectangle aRectangle;
const GlyphItem* pGlyph;
int nStart = 0;
while (rSalLayout.GetNextGlyphs(1, &pGlyph, aOutPoint, nStart))
@@ -1477,7 +1477,7 @@ bool OutputDevice::GetGlyphBoundRects( const Point& rOrigin, const OUString& rSt
nLen = rStr.getLength() - nIndex;
}
- Rectangle aRect;
+ tools::Rectangle aRect;
for( int i = 0; i < nLen; i++ )
{
if( !GetTextBoundRect( aRect, rStr, nIndex, nIndex + i, 1 ) )
diff --git a/vcl/source/outdev/gradient.cxx b/vcl/source/outdev/gradient.cxx
index 7c14e0a7b149..24e7e098f2e7 100644
--- a/vcl/source/outdev/gradient.cxx
+++ b/vcl/source/outdev/gradient.cxx
@@ -31,7 +31,7 @@
#define GRADIENT_DEFAULT_STEPCOUNT 0
-void OutputDevice::DrawGradient( const Rectangle& rRect,
+void OutputDevice::DrawGradient( const tools::Rectangle& rRect,
const Gradient& rGradient )
{
assert(!is_double_buffered_window());
@@ -84,12 +84,12 @@ void OutputDevice::DrawGradient( const tools::PolyPolygon& rPolyPoly,
return;
// Clip and then draw the gradient
- if( !Rectangle( PixelToLogic( Point() ), GetOutputSize() ).IsEmpty() )
+ if( !tools::Rectangle( PixelToLogic( Point() ), GetOutputSize() ).IsEmpty() )
{
- const Rectangle aBoundRect( rPolyPoly.GetBoundRect() );
+ const tools::Rectangle aBoundRect( rPolyPoly.GetBoundRect() );
// convert rectangle to pixels
- Rectangle aRect( ImplLogicToDevicePixel( aBoundRect ) );
+ tools::Rectangle aRect( ImplLogicToDevicePixel( aBoundRect ) );
aRect.Justify();
// do nothing if the rectangle is empty
@@ -155,7 +155,7 @@ void OutputDevice::DrawGradient( const tools::PolyPolygon& rPolyPoly,
void OutputDevice::ClipAndDrawGradientMetafile ( const Gradient &rGradient, const tools::PolyPolygon &rPolyPoly )
{
- const Rectangle aBoundRect( rPolyPoly.GetBoundRect() );
+ const tools::Rectangle aBoundRect( rPolyPoly.GetBoundRect() );
const bool bOldOutput = IsOutputEnabled();
EnableOutput( false );
@@ -188,7 +188,7 @@ void OutputDevice::DrawGradientToMetafile ( const tools::PolyPolygon& rPolyPoly,
SetGrayscaleColors( aGradient );
}
- const Rectangle aBoundRect( rPolyPoly.GetBoundRect() );
+ const tools::Rectangle aBoundRect( rPolyPoly.GetBoundRect() );
if ( rPolyPoly.IsRect() )
{
@@ -208,10 +208,10 @@ void OutputDevice::DrawGradientToMetafile ( const tools::PolyPolygon& rPolyPoly,
return;
// Clip and then draw the gradient
- if( !Rectangle( PixelToLogic( Point() ), GetOutputSize() ).IsEmpty() )
+ if( !tools::Rectangle( PixelToLogic( Point() ), GetOutputSize() ).IsEmpty() )
{
// convert rectangle to pixels
- Rectangle aRect( ImplLogicToDevicePixel( aBoundRect ) );
+ tools::Rectangle aRect( ImplLogicToDevicePixel( aBoundRect ) );
aRect.Justify();
// do nothing if the rectangle is empty
@@ -258,14 +258,14 @@ namespace
}
}
-void OutputDevice::DrawLinearGradient( const Rectangle& rRect,
+void OutputDevice::DrawLinearGradient( const tools::Rectangle& rRect,
const Gradient& rGradient,
const tools::PolyPolygon* pClixPolyPoly )
{
assert(!is_double_buffered_window());
// get BoundRect of rotated rectangle
- Rectangle aRect;
+ tools::Rectangle aRect;
Point aCenter;
sal_uInt16 nAngle = rGradient.GetAngle() % 3600;
@@ -277,7 +277,7 @@ void OutputDevice::DrawLinearGradient( const Rectangle& rRect,
{
fBorder /= 2.0;
}
- Rectangle aMirrorRect = aRect; // used in style axial
+ tools::Rectangle aMirrorRect = aRect; // used in style axial
aMirrorRect.Top() = ( aRect.Top() + aRect.Bottom() ) / 2;
if ( !bLinear )
{
@@ -322,7 +322,7 @@ void OutputDevice::DrawLinearGradient( const Rectangle& rRect,
sal_uInt8 nBlue;
// Create border
- Rectangle aBorderRect = aRect;
+ tools::Rectangle aBorderRect = aRect;
tools::Polygon aPoly( 4 );
if (fBorder > 0.0)
{
@@ -446,7 +446,7 @@ bool OutputDevice::is_double_buffered_window() const
return pWindow && pWindow->SupportsDoubleBuffering();
}
-void OutputDevice::DrawComplexGradient( const Rectangle& rRect,
+void OutputDevice::DrawComplexGradient( const tools::Rectangle& rRect,
const Gradient& rGradient,
const tools::PolyPolygon* pClixPolyPoly )
{
@@ -459,7 +459,7 @@ void OutputDevice::DrawComplexGradient( const Rectangle& rRect,
// can print polygons on top of each other.
std::unique_ptr<tools::PolyPolygon> xPolyPoly;
- Rectangle aRect;
+ tools::Rectangle aRect;
Point aCenter;
Color aStartCol( rGradient.GetStartColor() );
Color aEndCol( rGradient.GetEndColor() );
@@ -527,7 +527,7 @@ void OutputDevice::DrawComplexGradient( const Rectangle& rRect,
else
{
// extend rect, to avoid missing bounding line
- Rectangle aExtRect( rRect );
+ tools::Rectangle aExtRect( rRect );
aExtRect.Left() -= 1;
aExtRect.Top() -= 1;
@@ -613,13 +613,13 @@ void OutputDevice::DrawComplexGradient( const Rectangle& rRect,
}
}
-void OutputDevice::DrawLinearGradientToMetafile( const Rectangle& rRect,
+void OutputDevice::DrawLinearGradientToMetafile( const tools::Rectangle& rRect,
const Gradient& rGradient )
{
assert(!is_double_buffered_window());
// get BoundRect of rotated rectangle
- Rectangle aRect;
+ tools::Rectangle aRect;
Point aCenter;
sal_uInt16 nAngle = rGradient.GetAngle() % 3600;
@@ -631,7 +631,7 @@ void OutputDevice::DrawLinearGradientToMetafile( const Rectangle& rRect,
{
fBorder /= 2.0;
}
- Rectangle aMirrorRect = aRect; // used in style axial
+ tools::Rectangle aMirrorRect = aRect; // used in style axial
aMirrorRect.Top() = ( aRect.Top() + aRect.Bottom() ) / 2;
if ( !bLinear )
{
@@ -676,7 +676,7 @@ void OutputDevice::DrawLinearGradientToMetafile( const Rectangle& rRect,
sal_uInt8 nBlue;
// Create border
- Rectangle aBorderRect = aRect;
+ tools::Rectangle aBorderRect = aRect;
tools::Polygon aPoly( 4 );
if (fBorder > 0.0)
{
@@ -793,7 +793,7 @@ void OutputDevice::DrawLinearGradientToMetafile( const Rectangle& rRect,
}
}
-void OutputDevice::DrawComplexGradientToMetafile( const Rectangle& rRect,
+void OutputDevice::DrawComplexGradientToMetafile( const tools::Rectangle& rRect,
const Gradient& rGradient )
{
assert(!is_double_buffered_window());
@@ -805,7 +805,7 @@ void OutputDevice::DrawComplexGradientToMetafile( const Rectangle& rRect,
// can print polygons on top of each other.
std::unique_ptr<tools::PolyPolygon> xPolyPoly;
- Rectangle aRect;
+ tools::Rectangle aRect;
Point aCenter;
Color aStartCol( rGradient.GetStartColor() );
Color aEndCol( rGradient.GetEndColor() );
@@ -934,7 +934,7 @@ long OutputDevice::GetGradientStepCount( long nMinRect )
return nInc;
}
-long OutputDevice::GetGradientSteps( const Gradient& rGradient, const Rectangle& rRect, bool bMtf, bool bComplex )
+long OutputDevice::GetGradientSteps( const Gradient& rGradient, const tools::Rectangle& rRect, bool bMtf, bool bComplex )
{
// calculate step count
long nStepCount = rGradient.GetSteps();
@@ -1013,11 +1013,11 @@ void OutputDevice::SetGrayscaleColors( Gradient &rGradient )
rGradient.SetEndColor( aEndCol );
}
-void OutputDevice::AddGradientActions( const Rectangle& rRect, const Gradient& rGradient,
+void OutputDevice::AddGradientActions( const tools::Rectangle& rRect, const Gradient& rGradient,
GDIMetaFile& rMtf )
{
- Rectangle aRect( rRect );
+ tools::Rectangle aRect( rRect );
aRect.Justify();
diff --git a/vcl/source/outdev/hatch.cxx b/vcl/source/outdev/hatch.cxx
index 39312eabea63..f0712911f637 100644
--- a/vcl/source/outdev/hatch.cxx
+++ b/vcl/source/outdev/hatch.cxx
@@ -166,7 +166,7 @@ void OutputDevice::DrawHatch( const tools::PolyPolygon& rPolyPoly, const Hatch&
}
else
{
- Rectangle aRect( rPolyPoly.GetBoundRect() );
+ tools::Rectangle aRect( rPolyPoly.GetBoundRect() );
const long nLogPixelWidth = ImplDevicePixelToLogicWidth( 1 );
const long nWidth = ImplDevicePixelToLogicWidth( std::max( ImplLogicWidthToDevicePixel( rHatch.GetDistance() ), 3L ) );
std::unique_ptr<Point[]> pPtBuffer(new Point[ HATCH_MAXPOINTS ]);
@@ -213,7 +213,7 @@ void OutputDevice::DrawHatch( const tools::PolyPolygon& rPolyPoly, const Hatch&
}
}
-void OutputDevice::CalcHatchValues( const Rectangle& rRect, long nDist, sal_uInt16 nAngle10,
+void OutputDevice::CalcHatchValues( const tools::Rectangle& rRect, long nDist, sal_uInt16 nAngle10,
Point& rPt1, Point& rPt2, Size& rInc, Point& rEndPt1 )
{
Point aRef;
diff --git a/vcl/source/outdev/map.cxx b/vcl/source/outdev/map.cxx
index 72d5f928d914..c2c65b341ece 100644
--- a/vcl/source/outdev/map.cxx
+++ b/vcl/source/outdev/map.cxx
@@ -511,18 +511,18 @@ Size OutputDevice::ImplLogicToDevicePixel( const Size& rLogicSize ) const
maThresRes.mnThresLogToPixY ) );
}
-Rectangle OutputDevice::ImplLogicToDevicePixel( const Rectangle& rLogicRect ) const
+tools::Rectangle OutputDevice::ImplLogicToDevicePixel( const tools::Rectangle& rLogicRect ) const
{
if ( rLogicRect.IsEmpty() )
return rLogicRect;
if ( !mbMap )
{
- return Rectangle( rLogicRect.Left()+mnOutOffX, rLogicRect.Top()+mnOutOffY,
+ return tools::Rectangle( rLogicRect.Left()+mnOutOffX, rLogicRect.Top()+mnOutOffY,
rLogicRect.Right()+mnOutOffX, rLogicRect.Bottom()+mnOutOffY );
}
- return Rectangle( ImplLogicToPixel( rLogicRect.Left()+maMapRes.mnMapOfsX, mnDPIX,
+ return tools::Rectangle( ImplLogicToPixel( rLogicRect.Left()+maMapRes.mnMapOfsX, mnDPIX,
maMapRes.mnMapScNumX, maMapRes.mnMapScDenomX,
maThresRes.mnThresLogToPixX )+mnOutOffX+mnOutOffOrigX,
ImplLogicToPixel( rLogicRect.Top()+maMapRes.mnMapOfsY, mnDPIY,
@@ -619,18 +619,18 @@ LineInfo OutputDevice::ImplLogicToDevicePixel( const LineInfo& rLineInfo ) const
return aInfo;
}
-Rectangle OutputDevice::ImplDevicePixelToLogic( const Rectangle& rPixelRect ) const
+tools::Rectangle OutputDevice::ImplDevicePixelToLogic( const tools::Rectangle& rPixelRect ) const
{
if ( rPixelRect.IsEmpty() )
return rPixelRect;
if ( !mbMap )
{
- return Rectangle( rPixelRect.Left()-mnOutOffX, rPixelRect.Top()-mnOutOffY,
+ return tools::Rectangle( rPixelRect.Left()-mnOutOffX, rPixelRect.Top()-mnOutOffY,
rPixelRect.Right()-mnOutOffX, rPixelRect.Bottom()-mnOutOffY );
}
- return Rectangle( ImplPixelToLogic( rPixelRect.Left()-mnOutOffX-mnOutOffOrigX, mnDPIX,
+ return tools::Rectangle( ImplPixelToLogic( rPixelRect.Left()-mnOutOffX-mnOutOffOrigX, mnDPIX,
maMapRes.mnMapScNumX, maMapRes.mnMapScDenomX,
maThresRes.mnThresPixToLogX )-maMapRes.mnMapOfsX,
ImplPixelToLogic( rPixelRect.Top()-mnOutOffY-mnOutOffOrigY, mnDPIY,
@@ -985,13 +985,13 @@ Size OutputDevice::LogicToPixel( const Size& rLogicSize ) const
maThresRes.mnThresLogToPixY ) );
}
-Rectangle OutputDevice::LogicToPixel( const Rectangle& rLogicRect ) const
+tools::Rectangle OutputDevice::LogicToPixel( const tools::Rectangle& rLogicRect ) const
{
if ( !mbMap || rLogicRect.IsEmpty() )
return rLogicRect;
- return Rectangle( ImplLogicToPixel( rLogicRect.Left() + maMapRes.mnMapOfsX, mnDPIX,
+ return tools::Rectangle( ImplLogicToPixel( rLogicRect.Left() + maMapRes.mnMapOfsX, mnDPIX,
maMapRes.mnMapScNumX, maMapRes.mnMapScDenomX,
maThresRes.mnThresLogToPixX )+mnOutOffOrigX,
ImplLogicToPixel( rLogicRect.Top() + maMapRes.mnMapOfsY, mnDPIY,
@@ -1132,7 +1132,7 @@ Size OutputDevice::LogicToPixel( const Size& rLogicSize,
aThresRes.mnThresLogToPixY ) );
}
-Rectangle OutputDevice::LogicToPixel( const Rectangle& rLogicRect,
+tools::Rectangle OutputDevice::LogicToPixel( const tools::Rectangle& rLogicRect,
const MapMode& rMapMode ) const
{
@@ -1144,7 +1144,7 @@ Rectangle OutputDevice::LogicToPixel( const Rectangle& rLogicRect,
ImplThresholdRes aThresRes;
ImplCalcMapResolution( rMapMode, mnDPIX, mnDPIY, aMapRes, aThresRes );
- return Rectangle( ImplLogicToPixel( rLogicRect.Left() + aMapRes.mnMapOfsX, mnDPIX,
+ return tools::Rectangle( ImplLogicToPixel( rLogicRect.Left() + aMapRes.mnMapOfsX, mnDPIX,
aMapRes.mnMapScNumX, aMapRes.mnMapScDenomX,
aThresRes.mnThresLogToPixX )+mnOutOffOrigX,
ImplLogicToPixel( rLogicRect.Top() + aMapRes.mnMapOfsY, mnDPIY,
@@ -1230,13 +1230,13 @@ Size OutputDevice::PixelToLogic( const Size& rDeviceSize ) const
maThresRes.mnThresPixToLogY ) );
}
-Rectangle OutputDevice::PixelToLogic( const Rectangle& rDeviceRect ) const
+tools::Rectangle OutputDevice::PixelToLogic( const tools::Rectangle& rDeviceRect ) const
{
if ( !mbMap || rDeviceRect.IsEmpty() )
return rDeviceRect;
- return Rectangle( ImplPixelToLogic( rDeviceRect.Left(), mnDPIX,
+ return tools::Rectangle( ImplPixelToLogic( rDeviceRect.Left(), mnDPIX,
maMapRes.mnMapScNumX, maMapRes.mnMapScDenomX,
maThresRes.mnThresPixToLogX ) - maMapRes.mnMapOfsX - mnOutOffLogicX,
ImplPixelToLogic( rDeviceRect.Top(), mnDPIY,
@@ -1379,7 +1379,7 @@ Size OutputDevice::PixelToLogic( const Size& rDeviceSize,
aThresRes.mnThresPixToLogY ) );
}
-Rectangle OutputDevice::PixelToLogic( const Rectangle& rDeviceRect,
+tools::Rectangle OutputDevice::PixelToLogic( const tools::Rectangle& rDeviceRect,
const MapMode& rMapMode ) const
{
@@ -1392,7 +1392,7 @@ Rectangle OutputDevice::PixelToLogic( const Rectangle& rDeviceRect,
ImplThresholdRes aThresRes;
ImplCalcMapResolution( rMapMode, mnDPIX, mnDPIY, aMapRes, aThresRes );
- return Rectangle( ImplPixelToLogic( rDeviceRect.Left(), mnDPIX,
+ return tools::Rectangle( ImplPixelToLogic( rDeviceRect.Left(), mnDPIX,
aMapRes.mnMapScNumX, aMapRes.mnMapScDenomX,
aThresRes.mnThresPixToLogX ) - aMapRes.mnMapOfsX - mnOutOffLogicX,
ImplPixelToLogic( rDeviceRect.Top(), mnDPIY,
@@ -1735,13 +1735,13 @@ Size OutputDevice::LogicToLogic( const Size& rSzSource,
aMapResSource.mnMapScDenomY, aMapResDest.mnMapScNumY ) );
}
-Rectangle OutputDevice::LogicToLogic( const Rectangle& rRectSource,
+tools::Rectangle OutputDevice::LogicToLogic( const tools::Rectangle& rRectSource,
const MapMode* pMapModeSource,
const MapMode* pMapModeDest ) const
{
ENTER1( rRectSource, pMapModeSource, pMapModeDest );
- return Rectangle( fn5( rRectSource.Left() + aMapResSource.mnMapOfsX,
+ return tools::Rectangle( fn5( rRectSource.Left() + aMapResSource.mnMapOfsX,
aMapResSource.mnMapScNumX, aMapResDest.mnMapScDenomX,
aMapResSource.mnMapScDenomX, aMapResDest.mnMapScNumX ) -
aMapResDest.mnMapOfsX,
@@ -1878,7 +1878,7 @@ basegfx::B2DHomMatrix OutputDevice::LogicToLogic(const MapMode& rMapModeSource,
return aTransform;
}
-Rectangle OutputDevice::LogicToLogic( const Rectangle& rRectSource,
+tools::Rectangle OutputDevice::LogicToLogic( const tools::Rectangle& rRectSource,
const MapMode& rMapModeSource,
const MapMode& rMapModeDest )
{
@@ -1893,7 +1893,7 @@ Rectangle OutputDevice::LogicToLogic( const Rectangle& rRectSource,
{
ENTER3( eUnitSource, eUnitDest );
- return Rectangle( fn3( rRectSource.Left(), nNumerator, nDenominator ),
+ return tools::Rectangle( fn3( rRectSource.Left(), nNumerator, nDenominator ),
fn3( rRectSource.Top(), nNumerator, nDenominator ),
fn3( rRectSource.Right(), nNumerator, nDenominator ),
fn3( rRectSource.Bottom(), nNumerator, nDenominator ) );
@@ -1902,7 +1902,7 @@ Rectangle OutputDevice::LogicToLogic( const Rectangle& rRectSource,
{
ENTER4( rMapModeSource, rMapModeDest );
- return Rectangle( fn5( rRectSource.Left() + aMapResSource.mnMapOfsX,
+ return tools::Rectangle( fn5( rRectSource.Left() + aMapResSource.mnMapOfsX,
aMapResSource.mnMapScNumX, aMapResDest.mnMapScDenomX,
aMapResSource.mnMapScDenomX, aMapResDest.mnMapScNumX ) -
aMapResDest.mnMapOfsX,
diff --git a/vcl/source/outdev/mask.cxx b/vcl/source/outdev/mask.cxx
index 73af2869fff0..5ce47c676e84 100644
--- a/vcl/source/outdev/mask.cxx
+++ b/vcl/source/outdev/mask.cxx
@@ -56,7 +56,7 @@ void OutputDevice::DrawMask( const Point& rDestPt, const Size& rDestSize,
if( RasterOp::Invert == meRasterOp )
{
- DrawRect( Rectangle( rDestPt, rDestSize ) );
+ DrawRect( tools::Rectangle( rDestPt, rDestSize ) );
return;
}
diff --git a/vcl/source/outdev/nativecontrols.cxx b/vcl/source/outdev/nativecontrols.cxx
index 01bcb85f78a3..5dc1fd8c417d 100644
--- a/vcl/source/outdev/nativecontrols.cxx
+++ b/vcl/source/outdev/nativecontrols.cxx
@@ -170,7 +170,7 @@ bool OutputDevice::IsNativeControlSupported( ControlType nType, ControlPart nPar
bool OutputDevice::HitTestNativeScrollbar(
ControlPart nPart,
- const Rectangle& rControlRegion,
+ const tools::Rectangle& rControlRegion,
const Point& aPos,
bool& rIsInside ) const
{
@@ -182,7 +182,7 @@ bool OutputDevice::HitTestNativeScrollbar(
return false;
Point aWinOffs( mnOutOffX, mnOutOffY );
- Rectangle screenRegion( rControlRegion );
+ tools::Rectangle screenRegion( rControlRegion );
screenRegion.Move( aWinOffs.X(), aWinOffs.Y());
return mpGraphics->HitTestNativeScrollbar( nPart, screenRegion, Point( aPos.X() + mnOutOffX, aPos.Y() + mnOutOffY ),
@@ -270,7 +270,7 @@ static std::shared_ptr< ImplControlValue > TransformControlValue( const ImplCont
}
bool OutputDevice::DrawNativeControl( ControlType nType,
ControlPart nPart,
- const Rectangle& rControlRegion,
+ const tools::Rectangle& rControlRegion,
ControlState nState,
const ImplControlValue& aValue,
const OUString& aCaption )
@@ -298,7 +298,7 @@ bool OutputDevice::DrawNativeControl( ControlType nType,
// Convert the coordinates from relative to Window-absolute, so we draw
// in the correct place in platform code
std::shared_ptr< ImplControlValue > aScreenCtrlValue( TransformControlValue( aValue, *this ) );
- Rectangle screenRegion( ImplLogicToDevicePixel( rControlRegion ) );
+ tools::Rectangle screenRegion( ImplLogicToDevicePixel( rControlRegion ) );
vcl::Region aTestRegion( GetActiveClipRegion() );
aTestRegion.Intersect( rControlRegion );
@@ -315,12 +315,12 @@ bool OutputDevice::DrawNativeControl( ControlType nType,
bool OutputDevice::GetNativeControlRegion( ControlType nType,
ControlPart nPart,
- const Rectangle& rControlRegion,
+ const tools::Rectangle& rControlRegion,
ControlState nState,
const ImplControlValue& aValue,
const OUString& aCaption,
- Rectangle &rNativeBoundingRegion,
- Rectangle &rNativeContentRegion ) const
+ tools::Rectangle &rNativeBoundingRegion,
+ tools::Rectangle &rNativeContentRegion ) const
{
if( !EnableNativeWidget( *this ) )
return false;
@@ -332,7 +332,7 @@ bool OutputDevice::GetNativeControlRegion( ControlType nType,
// Convert the coordinates from relative to Window-absolute, so we draw
// in the correct place in platform code
std::shared_ptr< ImplControlValue > aScreenCtrlValue( TransformControlValue( aValue, *this ) );
- Rectangle screenRegion( ImplLogicToDevicePixel( rControlRegion ) );
+ tools::Rectangle screenRegion( ImplLogicToDevicePixel( rControlRegion ) );
bool bRet = mpGraphics->GetNativeControlRegion(nType, nPart, screenRegion, nState, *aScreenCtrlValue,
aCaption, rNativeBoundingRegion,
diff --git a/vcl/source/outdev/outdev.cxx b/vcl/source/outdev/outdev.cxx
index c4be8b67f630..31449f224342 100644
--- a/vcl/source/outdev/outdev.cxx
+++ b/vcl/source/outdev/outdev.cxx
@@ -419,7 +419,7 @@ void OutputDevice::DrawOutDev( const Point& rDestPt, const Size& rDestSize,
if ( RasterOp::Invert == meRasterOp )
{
- DrawRect( Rectangle( rDestPt, rDestSize ) );
+ DrawRect( tools::Rectangle( rDestPt, rDestSize ) );
return;
}
@@ -454,7 +454,7 @@ void OutputDevice::DrawOutDev( const Point& rDestPt, const Size& rDestSize,
ImplLogicXToDevicePixel(rDestPt.X()), ImplLogicYToDevicePixel(rDestPt.Y()),
nDestWidth, nDestHeight);
- const Rectangle aSrcOutRect( Point( mnOutOffX, mnOutOffY ),
+ const tools::Rectangle aSrcOutRect( Point( mnOutOffX, mnOutOffY ),
Size( mnOutWidth, mnOutHeight ) );
AdjustTwoRect( aPosAry, aSrcOutRect );
@@ -476,7 +476,7 @@ void OutputDevice::DrawOutDev( const Point& rDestPt, const Size& rDestSize,
if ( RasterOp::Invert == meRasterOp )
{
- DrawRect( Rectangle( rDestPt, rDestSize ) );
+ DrawRect( tools::Rectangle( rDestPt, rDestSize ) );
return;
}
@@ -520,7 +520,7 @@ void OutputDevice::DrawOutDev( const Point& rDestPt, const Size& rDestSize,
drawOutDevDirect( &rOutDev, aPosAry );
// #i32109#: make destination rectangle opaque - source has no alpha
- mpAlphaVDev->ImplFillOpaqueRectangle( Rectangle(rDestPt, rDestSize) );
+ mpAlphaVDev->ImplFillOpaqueRectangle( tools::Rectangle(rDestPt, rDestSize) );
}
}
else
@@ -570,7 +570,7 @@ void OutputDevice::CopyArea( const Point& rDestPt,
ImplLogicXToDevicePixel(rDestPt.X()), ImplLogicYToDevicePixel(rDestPt.Y()),
nSrcWidth, nSrcHeight);
- const Rectangle aSrcOutRect( Point( mnOutOffX, mnOutOffY ),
+ const tools::Rectangle aSrcOutRect( Point( mnOutOffX, mnOutOffY ),
Size( mnOutWidth, mnOutHeight ) );
AdjustTwoRect( aPosAry, aSrcOutRect );
@@ -641,7 +641,7 @@ void OutputDevice::drawOutDevDirect( const OutputDevice* pSrcDev, SalTwoRect& rP
}
// #102532# Offset only has to be pseudo window offset
- const Rectangle aSrcOutRect( Point( pSrcDev->mnOutOffX, pSrcDev->mnOutOffY ),
+ const tools::Rectangle aSrcOutRect( Point( pSrcDev->mnOutOffX, pSrcDev->mnOutOffY ),
Size( pSrcDev->mnOutWidth, pSrcDev->mnOutHeight ) );
AdjustTwoRect( rPosAry, aSrcOutRect );
@@ -693,7 +693,7 @@ void OutputDevice::ReMirror( Point &rPoint ) const
{
rPoint.X() = mnOutOffX + mnOutWidth - 1 - rPoint.X() + mnOutOffX;
}
-void OutputDevice::ReMirror( Rectangle &rRect ) const
+void OutputDevice::ReMirror( tools::Rectangle &rRect ) const
{
long nWidth = rRect.Right() - rRect.Left();
@@ -754,7 +754,7 @@ bool OutputDevice::DrawEPS( const Point& rPoint, const Size& rSize,
if( mbOutputClipped )
return bDrawn;
- Rectangle aRect( ImplLogicToDevicePixel( Rectangle( rPoint, rSize ) ) );
+ tools::Rectangle aRect( ImplLogicToDevicePixel( tools::Rectangle( rPoint, rSize ) ) );
if( !aRect.IsEmpty() )
{
diff --git a/vcl/source/outdev/rect.cxx b/vcl/source/outdev/rect.cxx
index 61cbeaa4f4af..30ca92c1f7db 100644
--- a/vcl/source/outdev/rect.cxx
+++ b/vcl/source/outdev/rect.cxx
@@ -30,7 +30,7 @@
#include "salgdi.hxx"
-void OutputDevice::DrawRect( const Rectangle& rRect )
+void OutputDevice::DrawRect( const tools::Rectangle& rRect )
{
assert(!is_double_buffered_window());
@@ -40,7 +40,7 @@ void OutputDevice::DrawRect( const Rectangle& rRect )
if ( !IsDeviceOutputNecessary() || (!mbLineColor && !mbFillColor) || ImplIsRecordLayout() )
return;
- Rectangle aRect( ImplLogicToDevicePixel( rRect ) );
+ tools::Rectangle aRect( ImplLogicToDevicePixel( rRect ) );
if ( aRect.IsEmpty() )
return;
@@ -68,7 +68,7 @@ void OutputDevice::DrawRect( const Rectangle& rRect )
mpAlphaVDev->DrawRect( rRect );
}
-void OutputDevice::DrawRect( const Rectangle& rRect,
+void OutputDevice::DrawRect( const tools::Rectangle& rRect,
sal_uLong nHorzRound, sal_uLong nVertRound )
{
assert(!is_double_buffered_window());
@@ -79,7 +79,7 @@ void OutputDevice::DrawRect( const Rectangle& rRect,
if ( !IsDeviceOutputNecessary() || (!mbLineColor && !mbFillColor) || ImplIsRecordLayout() )
return;
- const Rectangle aRect( ImplLogicToDevicePixel( rRect ) );
+ const tools::Rectangle aRect( ImplLogicToDevicePixel( rRect ) );
if ( aRect.IsEmpty() )
return;
@@ -129,13 +129,13 @@ void OutputDevice::DrawRect( const Rectangle& rRect,
mpAlphaVDev->DrawRect( rRect, nHorzRound, nVertRound );
}
-void OutputDevice::Invert( const Rectangle& rRect, InvertFlags nFlags )
+void OutputDevice::Invert( const tools::Rectangle& rRect, InvertFlags nFlags )
{
assert(!is_double_buffered_window());
if ( !IsDeviceOutputNecessary() )
return;
- Rectangle aRect( ImplLogicToDevicePixel( rRect ) );
+ tools::Rectangle aRect( ImplLogicToDevicePixel( rRect ) );
if ( aRect.IsEmpty() )
return;
@@ -218,18 +218,18 @@ void OutputDevice::DrawCheckered(const Point& rPos, const Size& rSize, sal_uInt3
const sal_uInt32 nBottom(std::min(nMaxY, nY + nLen));
SetFillColor(((x & 0x0001) ^ (y & 0x0001)) ? aStart : aEnd);
- DrawRect(Rectangle(nX, nY, nRight, nBottom));
+ DrawRect(tools::Rectangle(nX, nY, nRight, nBottom));
}
}
Pop();
}
-void OutputDevice::DrawGrid( const Rectangle& rRect, const Size& rDist, DrawGridFlags nFlags )
+void OutputDevice::DrawGrid( const tools::Rectangle& rRect, const Size& rDist, DrawGridFlags nFlags )
{
assert(!is_double_buffered_window());
- Rectangle aDstRect( PixelToLogic( Point() ), GetOutputSize() );
+ tools::Rectangle aDstRect( PixelToLogic( Point() ), GetOutputSize() );
aDstRect.Intersection( rRect );
if( aDstRect.IsEmpty() || ImplIsRecordLayout() )
@@ -351,11 +351,11 @@ BmpMirrorFlags AdjustTwoRect( SalTwoRect& rTwoRect, const Size& rSizePix )
( ( rTwoRect.mnSrcX + rTwoRect.mnSrcWidth ) > rSizePix.Width() ) ||
( ( rTwoRect.mnSrcY + rTwoRect.mnSrcHeight ) > rSizePix.Height() ) )
{
- const Rectangle aSourceRect( Point( rTwoRect.mnSrcX, rTwoRect.mnSrcY ),
+ const tools::Rectangle aSourceRect( Point( rTwoRect.mnSrcX, rTwoRect.mnSrcY ),
Size( rTwoRect.mnSrcWidth, rTwoRect.mnSrcHeight ) );
- Rectangle aCropRect( aSourceRect );
+ tools::Rectangle aCropRect( aSourceRect );
- aCropRect.Intersection( Rectangle( Point(), rSizePix ) );
+ aCropRect.Intersection( tools::Rectangle( Point(), rSizePix ) );
if( aCropRect.IsEmpty() )
{
@@ -385,16 +385,16 @@ BmpMirrorFlags AdjustTwoRect( SalTwoRect& rTwoRect, const Size& rSizePix )
return nMirrFlags;
}
-void AdjustTwoRect( SalTwoRect& rTwoRect, const Rectangle& rValidSrcRect )
+void AdjustTwoRect( SalTwoRect& rTwoRect, const tools::Rectangle& rValidSrcRect )
{
if( ( rTwoRect.mnSrcX < rValidSrcRect.Left() ) || ( rTwoRect.mnSrcX >= rValidSrcRect.Right() ) ||
( rTwoRect.mnSrcY < rValidSrcRect.Top() ) || ( rTwoRect.mnSrcY >= rValidSrcRect.Bottom() ) ||
( ( rTwoRect.mnSrcX + rTwoRect.mnSrcWidth ) > rValidSrcRect.Right() ) ||
( ( rTwoRect.mnSrcY + rTwoRect.mnSrcHeight ) > rValidSrcRect.Bottom() ) )
{
- const Rectangle aSourceRect( Point( rTwoRect.mnSrcX, rTwoRect.mnSrcY ),
+ const tools::Rectangle aSourceRect( Point( rTwoRect.mnSrcX, rTwoRect.mnSrcY ),
Size( rTwoRect.mnSrcWidth, rTwoRect.mnSrcHeight ) );
- Rectangle aCropRect( aSourceRect );
+ tools::Rectangle aCropRect( aSourceRect );
aCropRect.Intersection( rValidSrcRect );
diff --git a/vcl/source/outdev/text.cxx b/vcl/source/outdev/text.cxx
index ad835c29dbf5..5cf1ca62fd74 100644
--- a/vcl/source/outdev/text.cxx
+++ b/vcl/source/outdev/text.cxx
@@ -132,7 +132,7 @@ void OutputDevice::ImplDrawTextRect( long nBaseX, long nBaseY,
nX += nBaseX;
nY += nBaseY;
// inflate because polygons are drawn smaller
- Rectangle aRect( Point( nX, nY ), Size( nWidth+1, nHeight+1 ) );
+ tools::Rectangle aRect( Point( nX, nY ), Size( nWidth+1, nHeight+1 ) );
tools::Polygon aPoly( aRect );
aPoly.Rotate( Point( nBaseX, nBaseY ), mpFontInstance->mnOrientation );
ImplDrawPolygon( aPoly );
@@ -166,7 +166,7 @@ void OutputDevice::ImplDrawTextBackground( const SalLayout& rSalLayout )
mpFontInstance->mnLineHeight+mnEmphasisAscent+mnEmphasisDescent );
}
-Rectangle OutputDevice::ImplGetTextBoundRect( const SalLayout& rSalLayout )
+tools::Rectangle OutputDevice::ImplGetTextBoundRect( const SalLayout& rSalLayout )
{
Point aPoint = rSalLayout.GetDrawPosition();
long nX = aPoint.X();
@@ -194,14 +194,14 @@ Rectangle OutputDevice::ImplGetTextBoundRect( const SalLayout& rSalLayout )
else
{
// inflate by +1+1 because polygons are drawn smaller
- Rectangle aRect( Point( nX, nY ), Size( nWidth+1, nHeight+1 ) );
+ tools::Rectangle aRect( Point( nX, nY ), Size( nWidth+1, nHeight+1 ) );
tools::Polygon aPoly( aRect );
aPoly.Rotate( Point( nBaseX, nBaseY ), mpFontInstance->mnOrientation );
return aPoly.GetBoundRect();
}
}
- return Rectangle( Point( nX, nY ), Size( nWidth, nHeight ) );
+ return tools::Rectangle( Point( nX, nY ), Size( nWidth, nHeight ) );
}
bool OutputDevice::ImplDrawRotateText( SalLayout& rSalLayout )
@@ -209,7 +209,7 @@ bool OutputDevice::ImplDrawRotateText( SalLayout& rSalLayout )
long nX = rSalLayout.DrawBase().X();
long nY = rSalLayout.DrawBase().Y();
- Rectangle aBoundRect;
+ tools::Rectangle aBoundRect;
rSalLayout.DrawBase() = Point( 0, 0 );
rSalLayout.DrawOffset() = Point( 0, 0 );
if( !rSalLayout.GetBoundRect( *mpGraphics, aBoundRect ) )
@@ -218,7 +218,7 @@ bool OutputDevice::ImplDrawRotateText( SalLayout& rSalLayout )
long nRight = rSalLayout.GetTextWidth();
long nTop = mpFontInstance->mxFontMetric->GetAscent() + mnEmphasisAscent;
long nHeight = mpFontInstance->mnLineHeight + mnEmphasisAscent + mnEmphasisDescent;
- aBoundRect = Rectangle( 0, -nTop, nRight, nHeight - nTop );
+ aBoundRect = tools::Rectangle( 0, -nTop, nRight, nHeight - nTop );
}
// cache virtual device for rotation
@@ -829,7 +829,7 @@ void OutputDevice::DrawText( const Point& rStartPt, const OUString& rStr,
{
vcl::Region aClip( GetClipRegion() );
if( meOutDevType == OUTDEV_WINDOW )
- aClip.Intersect( Rectangle( Point(), GetOutputSize() ) );
+ aClip.Intersect( tools::Rectangle( Point(), GetOutputSize() ) );
if (mpOutDevData->mpRecordLayout)
{
mpOutDevData->mpRecordLayout->m_aLineIndices.push_back( mpOutDevData->mpRecordLayout->m_aDisplayText.getLength() );
@@ -1465,7 +1465,7 @@ sal_Int32 OutputDevice::GetTextBreak( const OUString& rStr, long nTextWidth,
return nRetVal;
}
-void OutputDevice::ImplDrawText( OutputDevice& rTargetDevice, const Rectangle& rRect,
+void OutputDevice::ImplDrawText( OutputDevice& rTargetDevice, const tools::Rectangle& rRect,
const OUString& rOrigStr, DrawTextFlags nStyle,
MetricVector* pVector, OUString* pDisplayText,
vcl::ITextLayout& _rLayout )
@@ -1730,7 +1730,7 @@ void OutputDevice::ImplDrawText( OutputDevice& rTargetDevice, const Rectangle& r
}
}
-void OutputDevice::AddTextRectActions( const Rectangle& rRect,
+void OutputDevice::AddTextRectActions( const tools::Rectangle& rRect,
const OUString& rOrigStr,
DrawTextFlags nStyle,
GDIMetaFile& rMtf )
@@ -1763,7 +1763,7 @@ void OutputDevice::AddTextRectActions( const Rectangle& rRect,
mpMetaFile = pMtf;
}
-void OutputDevice::DrawText( const Rectangle& rRect, const OUString& rOrigStr, DrawTextFlags nStyle,
+void OutputDevice::DrawText( const tools::Rectangle& rRect, const OUString& rOrigStr, DrawTextFlags nStyle,
MetricVector* pVector, OUString* pDisplayText,
vcl::ITextLayout* _pTextLayout )
{
@@ -1808,13 +1808,13 @@ void OutputDevice::DrawText( const Rectangle& rRect, const OUString& rOrigStr, D
mpAlphaVDev->DrawText( rRect, rOrigStr, nStyle, pVector, pDisplayText );
}
-Rectangle OutputDevice::GetTextRect( const Rectangle& rRect,
+tools::Rectangle OutputDevice::GetTextRect( const tools::Rectangle& rRect,
const OUString& rStr, DrawTextFlags nStyle,
TextRectInfo* pInfo,
const vcl::ITextLayout* _pTextLayout ) const
{
- Rectangle aRect = rRect;
+ tools::Rectangle aRect = rRect;
sal_Int32 nLines;
long nWidth = rRect.GetWidth();
long nMaxWidth;
@@ -2332,7 +2332,7 @@ SystemTextLayoutData OutputDevice::GetSysTextLayoutData(const Point& rStartPt, c
return aSysLayoutData;
}
-bool OutputDevice::GetTextBoundRect( Rectangle& rRect,
+bool OutputDevice::GetTextBoundRect( tools::Rectangle& rRect,
const OUString& rStr, sal_Int32 nBase,
sal_Int32 nIndex, sal_Int32 nLen,
sal_uLong nLayoutWidth, const long* pDXAry ) const
@@ -2361,7 +2361,7 @@ bool OutputDevice::GetTextBoundRect( Rectangle& rRect,
}
pSalLayout = ImplLayout( rStr, nIndex, nLen, aPoint, nLayoutWidth, pDXAry );
- Rectangle aPixelRect;
+ tools::Rectangle aPixelRect;
if( pSalLayout )
{
bRet = pSalLayout->GetBoundRect( *mpGraphics, aPixelRect );
diff --git a/vcl/source/outdev/textline.cxx b/vcl/source/outdev/textline.cxx
index ba974d525b63..409f4fc108d4 100644
--- a/vcl/source/outdev/textline.cxx
+++ b/vcl/source/outdev/textline.cxx
@@ -644,7 +644,7 @@ void OutputDevice::ImplDrawStrikeoutChar( long nBaseX, long nBaseY,
pLayout->DrawBase() = Point( nBaseX+mnTextOffX, nBaseY+mnTextOffY );
- Rectangle aPixelRect;
+ tools::Rectangle aPixelRect;
aPixelRect.Left() = nBaseX+mnTextOffX;
aPixelRect.Right() = aPixelRect.Left()+nWidth;
aPixelRect.Bottom() = nBaseY+mpFontInstance->mxFontMetric->GetDescent();
diff --git a/vcl/source/outdev/transparent.cxx b/vcl/source/outdev/transparent.cxx
index c1c3a639bff1..91dfec3b24cc 100644
--- a/vcl/source/outdev/transparent.cxx
+++ b/vcl/source/outdev/transparent.cxx
@@ -119,7 +119,7 @@ void OutputDevice::ImplPrintTransparent( const Bitmap& rBmp, const Bitmap& rMask
{
Point aDestPt( LogicToPixel( rDestPt ) );
Size aDestSz( LogicToPixel( rDestSize ) );
- Rectangle aSrcRect( rSrcPtPixel, rSrcSizePixel );
+ tools::Rectangle aSrcRect( rSrcPtPixel, rSrcSizePixel );
aSrcRect.Justify();
@@ -148,7 +148,7 @@ void OutputDevice::ImplPrintTransparent( const Bitmap& rBmp, const Bitmap& rMask
}
// source cropped?
- if( aSrcRect != Rectangle( Point(), aPaint.GetSizePixel() ) )
+ if( aSrcRect != tools::Rectangle( Point(), aPaint.GetSizePixel() ) )
{
aPaint.Crop( aSrcRect );
aMask.Crop( aSrcRect );
@@ -185,7 +185,7 @@ void OutputDevice::ImplPrintTransparent( const Bitmap& rBmp, const Bitmap& rMask
pMapY[ nY ] = aDestPt.Y() + FRound( (double) aDestSz.Height() * nY / nSrcHeight );
// walk through all rectangles of mask
- const vcl::Region aWorkRgn(aMask.CreateRegion(COL_BLACK, Rectangle(Point(), aMask.GetSizePixel())));
+ const vcl::Region aWorkRgn(aMask.CreateRegion(COL_BLACK, tools::Rectangle(Point(), aMask.GetSizePixel())));
RectangleVector aRectangles;
aWorkRgn.GetRegionRectangles(aRectangles);
@@ -389,9 +389,9 @@ void OutputDevice::EmulateDrawTransparent ( const tools::PolyPolygon& rPolyPoly,
mpMetaFile = nullptr;
tools::PolyPolygon aPolyPoly( LogicToPixel( rPolyPoly ) );
- Rectangle aPolyRect( aPolyPoly.GetBoundRect() );
+ tools::Rectangle aPolyRect( aPolyPoly.GetBoundRect() );
Point aPoint;
- Rectangle aDstRect( aPoint, GetOutputSizePixel() );
+ tools::Rectangle aDstRect( aPoint, GetOutputSizePixel() );
aDstRect.Intersection( aPolyRect );
@@ -421,8 +421,8 @@ void OutputDevice::EmulateDrawTransparent ( const tools::PolyPolygon& rPolyPoly,
if ( mbInitFillColor )
InitFillColor();
- Rectangle aLogicPolyRect( rPolyPoly.GetBoundRect() );
- Rectangle aPixelRect( ImplLogicToDevicePixel( aLogicPolyRect ) );
+ tools::Rectangle aLogicPolyRect( rPolyPoly.GetBoundRect() );
+ tools::Rectangle aPixelRect( ImplLogicToDevicePixel( aLogicPolyRect ) );
if( !mbOutputClipped )
{
@@ -686,9 +686,9 @@ void OutputDevice::DrawTransparent( const GDIMetaFile& rMtf, const Point& rPos,
else
{
GDIMetaFile* pOldMetaFile = mpMetaFile;
- Rectangle aOutRect( LogicToPixel( rPos ), LogicToPixel( rSize ) );
+ tools::Rectangle aOutRect( LogicToPixel( rPos ), LogicToPixel( rSize ) );
Point aPoint;
- Rectangle aDstRect( aPoint, GetOutputSizePixel() );
+ tools::Rectangle aDstRect( aPoint, GetOutputSizePixel() );
mpMetaFile = nullptr;
aDstRect.Intersection( aOutRect );
@@ -746,7 +746,7 @@ void OutputDevice::DrawTransparent( const GDIMetaFile& rMtf, const Point& rPos,
// create alpha mask from gradient and get as Bitmap
xVDev->EnableMapMode(bBufferMapModeEnabled);
xVDev->SetDrawMode(DrawModeFlags::GrayGradient);
- xVDev->DrawGradient(Rectangle(rPos, rSize), rTransparenceGradient);
+ xVDev->DrawGradient(tools::Rectangle(rPos, rSize), rTransparenceGradient);
xVDev->SetDrawMode(DrawModeFlags::Default);
xVDev->EnableMapMode(false);
@@ -781,7 +781,7 @@ void OutputDevice::DrawTransparent( const GDIMetaFile& rMtf, const Point& rPos,
// create mask bitmap
xVDev->SetLineColor( COL_BLACK );
xVDev->SetFillColor( COL_BLACK );
- xVDev->DrawRect( Rectangle( xVDev->PixelToLogic( Point() ), xVDev->GetOutputSize() ) );
+ xVDev->DrawRect( tools::Rectangle( xVDev->PixelToLogic( Point() ), xVDev->GetOutputSize() ) );
xVDev->SetDrawMode( DrawModeFlags::WhiteLine | DrawModeFlags::WhiteFill | DrawModeFlags::WhiteText |
DrawModeFlags::WhiteBitmap | DrawModeFlags::WhiteGradient );
const_cast<GDIMetaFile&>(rMtf).WindStart();
@@ -793,7 +793,7 @@ void OutputDevice::DrawTransparent( const GDIMetaFile& rMtf, const Point& rPos,
// create alpha mask from gradient
xVDev->SetDrawMode( DrawModeFlags::GrayGradient );
- xVDev->DrawGradient( Rectangle( rPos, rSize ), rTransparenceGradient );
+ xVDev->DrawGradient( tools::Rectangle( rPos, rSize ), rTransparenceGradient );
xVDev->SetDrawMode( DrawModeFlags::Default );
xVDev->EnableMapMode( false );
xVDev->DrawMask( Point(), xVDev->GetOutputSizePixel(), aMask, Color( COL_WHITE ) );
diff --git a/vcl/source/outdev/wallpaper.cxx b/vcl/source/outdev/wallpaper.cxx
index e4d89716f28d..452cb12f4df6 100644
--- a/vcl/source/outdev/wallpaper.cxx
+++ b/vcl/source/outdev/wallpaper.cxx
@@ -25,7 +25,7 @@
#include <wall2.hxx>
-void OutputDevice::DrawWallpaper( const Rectangle& rRect,
+void OutputDevice::DrawWallpaper( const tools::Rectangle& rRect,
const Wallpaper& rWallpaper )
{
assert(!is_double_buffered_window());
@@ -38,7 +38,7 @@ void OutputDevice::DrawWallpaper( const Rectangle& rRect,
if ( rWallpaper.GetStyle() != WallpaperStyle::NONE )
{
- Rectangle aRect = LogicToPixel( rRect );
+ tools::Rectangle aRect = LogicToPixel( rRect );
aRect.Justify();
if ( !aRect.IsEmpty() )
@@ -80,7 +80,7 @@ void OutputDevice::DrawColorWallpaper( long nX, long nY,
bool bMap = mbMap;
EnableMapMode( false );
- DrawRect( Rectangle( Point( nX, nY ), Size( nWidth, nHeight ) ) );
+ DrawRect( tools::Rectangle( Point( nX, nY ), Size( nWidth, nHeight ) ) );
SetLineColor( aOldLineColor );
SetFillColor( aOldFillColor );
EnableMapMode( bMap );
@@ -170,7 +170,7 @@ void OutputDevice::DrawBitmapWallpaper( long nX, long nY,
// calc pos and size
if( rWallpaper.IsRect() )
{
- const Rectangle aBound( LogicToPixel( rWallpaper.GetRect() ) );
+ const tools::Rectangle aBound( LogicToPixel( rWallpaper.GetRect() ) );
aPos = aBound.TopLeft();
aSize = aBound.GetSize();
}
@@ -183,7 +183,7 @@ void OutputDevice::DrawBitmapWallpaper( long nX, long nY,
mpMetaFile = nullptr;
EnableMapMode( false );
Push( PushFlags::CLIPREGION );
- IntersectClipRegion( Rectangle( Point( nX, nY ), Size( nWidth, nHeight ) ) );
+ IntersectClipRegion( tools::Rectangle( Point( nX, nY ), Size( nWidth, nHeight ) ) );
switch( eStyle )
{
@@ -286,11 +286,11 @@ void OutputDevice::DrawBitmapWallpaper( long nX, long nY,
{
const Size aBmpSize( aBmpEx.GetSizePixel() );
const Point aTmpPoint;
- const Rectangle aOutRect( aTmpPoint, GetOutputSizePixel() );
- const Rectangle aColRect( Point( nX, nY ), Size( nWidth, nHeight ) );
- Rectangle aWorkRect;
+ const tools::Rectangle aOutRect( aTmpPoint, GetOutputSizePixel() );
+ const tools::Rectangle aColRect( Point( nX, nY ), Size( nWidth, nHeight ) );
+ tools::Rectangle aWorkRect;
- aWorkRect = Rectangle( 0, 0, aOutRect.Right(), aPos.Y() - 1L );
+ aWorkRect = tools::Rectangle( 0, 0, aOutRect.Right(), aPos.Y() - 1L );
aWorkRect.Justify();
aWorkRect.Intersection( aColRect );
if( !aWorkRect.IsEmpty() )
@@ -300,7 +300,7 @@ void OutputDevice::DrawBitmapWallpaper( long nX, long nY,
rWallpaper );
}
- aWorkRect = Rectangle( 0, aPos.Y(), aPos.X() - 1L, aPos.Y() + aBmpSize.Height() - 1L );
+ aWorkRect = tools::Rectangle( 0, aPos.Y(), aPos.X() - 1L, aPos.Y() + aBmpSize.Height() - 1L );
aWorkRect.Justify();
aWorkRect.Intersection( aColRect );
if( !aWorkRect.IsEmpty() )
@@ -310,7 +310,7 @@ void OutputDevice::DrawBitmapWallpaper( long nX, long nY,
rWallpaper );
}
- aWorkRect = Rectangle( aPos.X() + aBmpSize.Width(), aPos.Y(),
+ aWorkRect = tools::Rectangle( aPos.X() + aBmpSize.Width(), aPos.Y(),
aOutRect.Right(), aPos.Y() + aBmpSize.Height() - 1L );
aWorkRect.Justify();
aWorkRect.Intersection( aColRect );
@@ -321,7 +321,7 @@ void OutputDevice::DrawBitmapWallpaper( long nX, long nY,
rWallpaper );
}
- aWorkRect = Rectangle( 0, aPos.Y() + aBmpSize.Height(),
+ aWorkRect = tools::Rectangle( 0, aPos.Y() + aBmpSize.Height(),
aOutRect.Right(), aOutRect.Bottom() );
aWorkRect.Justify();
aWorkRect.Intersection( aColRect );
@@ -349,16 +349,16 @@ void OutputDevice::DrawGradientWallpaper( long nX, long nY,
{
assert(!is_double_buffered_window());
- Rectangle aBound;
+ tools::Rectangle aBound;
GDIMetaFile* pOldMetaFile = mpMetaFile;
const bool bOldMap = mbMap;
- aBound = Rectangle( Point( nX, nY ), Size( nWidth, nHeight ) );
+ aBound = tools::Rectangle( Point( nX, nY ), Size( nWidth, nHeight ) );
mpMetaFile = nullptr;
EnableMapMode( false );
Push( PushFlags::CLIPREGION );
- IntersectClipRegion( Rectangle( Point( nX, nY ), Size( nWidth, nHeight ) ) );
+ IntersectClipRegion( tools::Rectangle( Point( nX, nY ), Size( nWidth, nHeight ) ) );
DrawGradient( aBound, rWallpaper.GetGradient() );
diff --git a/vcl/source/window/brdwin.cxx b/vcl/source/window/brdwin.cxx
index 6a174b89521f..bd466a7004a8 100644
--- a/vcl/source/window/brdwin.cxx
+++ b/vcl/source/window/brdwin.cxx
@@ -44,7 +44,7 @@ using namespace ::com::sun::star::uno;
namespace vcl {
-void Window::ImplCalcSymbolRect( Rectangle& rRect )
+void Window::ImplCalcSymbolRect( tools::Rectangle& rRect )
{
// Add border, not shown in the non-default representation,
// as we want to use it for small buttons
@@ -65,24 +65,24 @@ void Window::ImplCalcSymbolRect( Rectangle& rRect )
} /* namespace vcl */
static void ImplDrawBrdWinSymbol( vcl::RenderContext* pDev,
- const Rectangle& rRect, SymbolType eSymbol )
+ const tools::Rectangle& rRect, SymbolType eSymbol )
{
// we leave 5% room between the symbol and the button border
DecorationView aDecoView( pDev );
- Rectangle aTempRect = rRect;
+ tools::Rectangle aTempRect = rRect;
vcl::Window::ImplCalcSymbolRect( aTempRect );
aDecoView.DrawSymbol( aTempRect, eSymbol,
pDev->GetSettings().GetStyleSettings().GetButtonTextColor() );
}
static void ImplDrawBrdWinSymbolButton( vcl::RenderContext* pDev,
- const Rectangle& rRect,
+ const tools::Rectangle& rRect,
SymbolType eSymbol, DrawButtonFlags nState )
{
bool bMouseOver(nState & DrawButtonFlags::Highlight);
nState &= ~DrawButtonFlags::Highlight;
- Rectangle aTempRect;
+ tools::Rectangle aTempRect;
vcl::Window *pWin = dynamic_cast< vcl::Window* >(pDev);
if( pWin )
{
@@ -129,14 +129,14 @@ bool ImplBorderWindowView::Tracking( const TrackingEvent& )
return false;
}
-OUString ImplBorderWindowView::RequestHelp( const Point&, Rectangle& )
+OUString ImplBorderWindowView::RequestHelp( const Point&, tools::Rectangle& )
{
return OUString();
}
-Rectangle ImplBorderWindowView::GetMenuRect() const
+tools::Rectangle ImplBorderWindowView::GetMenuRect() const
{
- return Rectangle();
+ return tools::Rectangle();
}
void ImplBorderWindowView::ImplInitTitle(ImplBorderFrameData* pData)
@@ -291,7 +291,7 @@ bool ImplBorderWindowView::ImplMouseMove( ImplBorderFrameData* pData, const Mous
OUString ImplBorderWindowView::ImplRequestHelp( ImplBorderFrameData* pData,
const Point& rPos,
- Rectangle& rHelpRect )
+ tools::Rectangle& rHelpRect )
{
sal_uInt16 nHelpId = 0;
OUString aHelpStr;
@@ -489,8 +489,8 @@ void ImplSmallBorderWindowView::Init( OutputDevice* pDev, long nWidth, long nHei
Size aMinSize( mnWidth - mnLeftBorder - mnRightBorder, mnHeight - mnTopBorder - mnBottomBorder );
if( aMinSize.Width() < 10 ) aMinSize.setWidth( 10 );
if( aMinSize.Height() < 10 ) aMinSize.setHeight( 10 );
- Rectangle aCtrlRegion( Point(mnLeftBorder, mnTopBorder), aMinSize );
- Rectangle aBounds, aContent;
+ tools::Rectangle aCtrlRegion( Point(mnLeftBorder, mnTopBorder), aMinSize );
+ tools::Rectangle aBounds, aContent;
if( pWin->GetNativeControlRegion( aCtrlType, ControlPart::Entire, aCtrlRegion,
ControlState::ENABLED, aControlValue, OUString(),
aBounds, aContent ) )
@@ -547,8 +547,8 @@ void ImplSmallBorderWindowView::Init( OutputDevice* pDev, long nWidth, long nHei
nFlags |= DrawFrameFlags::Mono;
DecorationView aDecoView( mpOutDev );
- Rectangle aRect( 0, 0, 10, 10 );
- Rectangle aCalcRect = aDecoView.DrawFrame( aRect, nStyle, nFlags );
+ tools::Rectangle aRect( 0, 0, 10, 10 );
+ tools::Rectangle aCalcRect = aDecoView.DrawFrame( aRect, nStyle, nFlags );
mnLeftBorder = aCalcRect.Left();
mnTopBorder = aCalcRect.Top();
mnRightBorder = aRect.Right()-aCalcRect.Right();
@@ -690,10 +690,10 @@ void ImplSmallBorderWindowView::DrawWindow(vcl::RenderContext& rRenderContext, c
nState |= ControlState::ROLLOVER;
Point aPoint;
- Rectangle aCtrlRegion(aPoint, Size(mnWidth, mnHeight));
+ tools::Rectangle aCtrlRegion(aPoint, Size(mnWidth, mnHeight));
- Rectangle aBoundingRgn(aPoint, Size(mnWidth, mnHeight));
- Rectangle aContentRgn(aCtrlRegion);
+ tools::Rectangle aBoundingRgn(aPoint, Size(mnWidth, mnHeight));
+ tools::Rectangle aContentRgn(aCtrlRegion);
if (!ImplGetSVData()->maNWFData.mbCanDrawWidgetAnySize &&
rRenderContext.GetNativeControlRegion(aCtrlType, aCtrlPart, aCtrlRegion,
nState, aControlValue, OUString(),
@@ -710,7 +710,7 @@ void ImplSmallBorderWindowView::DrawWindow(vcl::RenderContext& rRenderContext, c
{
Edit* pEdit = static_cast<Edit*>(pCtrl)->GetSubEdit();
if (pEdit && !pEdit->SupportsDoubleBuffering())
- pCtrl->Paint(*pCtrl, Rectangle()); // make sure the buttons are also drawn as they might overwrite the border
+ pCtrl->Paint(*pCtrl, tools::Rectangle()); // make sure the buttons are also drawn as they might overwrite the border
}
}
@@ -736,7 +736,7 @@ void ImplSmallBorderWindowView::DrawWindow(vcl::RenderContext& rRenderContext, c
DecorationView aDecoView(&rRenderContext);
Point aTmpPoint;
- Rectangle aInRect(aTmpPoint, Size(mnWidth, mnHeight));
+ tools::Rectangle aInRect(aTmpPoint, Size(mnWidth, mnHeight));
aDecoView.DrawFrame(aInRect, nStyle, nFlags);
}
@@ -1150,14 +1150,14 @@ bool ImplStdBorderWindowView::Tracking( const TrackingEvent& rTEvt )
{
maFrameData.mnTrackX = aPos.X();
maFrameData.mnTrackY = aPos.Y();
- pBorderWindow->ShowTracking( Rectangle( pBorderWindow->ScreenToOutputPixel( aPos ), pBorderWindow->GetOutputSizePixel() ), ShowTrackFlags::Big );
+ pBorderWindow->ShowTracking( tools::Rectangle( pBorderWindow->ScreenToOutputPixel( aPos ), pBorderWindow->GetOutputSizePixel() ), ShowTrackFlags::Big );
}
}
else
{
Point aOldPos = pBorderWindow->GetPosPixel();
Size aSize = pBorderWindow->GetSizePixel();
- Rectangle aNewRect( aOldPos, aSize );
+ tools::Rectangle aNewRect( aOldPos, aSize );
long nOldWidth = aSize.Width();
long nOldHeight = aSize.Height();
long nBorderWidth = maFrameData.mnLeftBorder+maFrameData.mnRightBorder;
@@ -1261,7 +1261,7 @@ bool ImplStdBorderWindowView::Tracking( const TrackingEvent& rTEvt )
maFrameData.mnTrackY = aNewRect.Top();
maFrameData.mnTrackWidth = aNewRect.GetWidth();
maFrameData.mnTrackHeight = aNewRect.GetHeight();
- pBorderWindow->ShowTracking( Rectangle( pBorderWindow->ScreenToOutputPixel( aNewRect.TopLeft() ), aNewRect.GetSize() ), ShowTrackFlags::Big );
+ pBorderWindow->ShowTracking( tools::Rectangle( pBorderWindow->ScreenToOutputPixel( aNewRect.TopLeft() ), aNewRect.GetSize() ), ShowTrackFlags::Big );
}
}
}
@@ -1270,12 +1270,12 @@ bool ImplStdBorderWindowView::Tracking( const TrackingEvent& rTEvt )
return true;
}
-OUString ImplStdBorderWindowView::RequestHelp( const Point& rPos, Rectangle& rHelpRect )
+OUString ImplStdBorderWindowView::RequestHelp( const Point& rPos, tools::Rectangle& rHelpRect )
{
return ImplRequestHelp( &maFrameData, rPos, rHelpRect );
}
-Rectangle ImplStdBorderWindowView::GetMenuRect() const
+tools::Rectangle ImplStdBorderWindowView::GetMenuRect() const
{
return maFrameData.maMenuRect;
}
@@ -1286,8 +1286,8 @@ void ImplStdBorderWindowView::Init( OutputDevice* pDev, long nWidth, long nHeigh
ImplBorderWindow* pBorderWindow = maFrameData.mpBorderWindow;
const StyleSettings& rStyleSettings = pDev->GetSettings().GetStyleSettings();
DecorationView aDecoView( pDev );
- Rectangle aRect( 0, 0, 10, 10 );
- Rectangle aCalcRect = aDecoView.DrawFrame( aRect, DrawFrameStyle::DoubleOut, DrawFrameFlags::NoDraw );
+ tools::Rectangle aRect( 0, 0, 10, 10 );
+ tools::Rectangle aCalcRect = aDecoView.DrawFrame( aRect, DrawFrameStyle::DoubleOut, DrawFrameFlags::NoDraw );
pData->mpOutDev = pDev;
pData->mnWidth = nWidth;
@@ -1335,7 +1335,7 @@ void ImplStdBorderWindowView::Init( OutputDevice* pDev, long nWidth, long nHeigh
long const nItemBottom = pData->maTitleRect.Bottom() - 2;
auto addSquareOnRight = [&nRight, nItemTop, nItemBottom](
- Rectangle & rect, long gap)
+ tools::Rectangle & rect, long gap)
{
rect.Top() = nItemTop;
rect.Bottom() = nItemBottom;
@@ -1412,7 +1412,7 @@ void ImplStdBorderWindowView::DrawWindow(vcl::RenderContext& rRenderContext, con
ImplBorderFrameData* pData = &maFrameData;
ImplBorderWindow* pBorderWindow = pData->mpBorderWindow;
Point aTmpPoint = pOffset ? Point(*pOffset) : Point();
- Rectangle aInRect( aTmpPoint, Size( pData->mnWidth, pData->mnHeight ) );
+ tools::Rectangle aInRect( aTmpPoint, Size( pData->mnWidth, pData->mnHeight ) );
const StyleSettings& rStyleSettings = rRenderContext.GetSettings().GetStyleSettings();
DecorationView aDecoView(&rRenderContext);
Color aFaceColor(rStyleSettings.GetFaceColor());
@@ -1430,7 +1430,7 @@ void ImplStdBorderWindowView::DrawWindow(vcl::RenderContext& rRenderContext, con
if (pWin)
{
vcl::Region aClipRgn(aInRect);
- Rectangle aItemClipRect(pWin->ImplGetItemEdgeClipRect());
+ tools::Rectangle aItemClipRect(pWin->ImplGetItemEdgeClipRect());
if (!aItemClipRect.IsEmpty())
{
aItemClipRect.SetPos(pData->mpBorderWindow->AbsoluteScreenToOutputPixel(aItemClipRect.TopLeft()));
@@ -1459,13 +1459,13 @@ void ImplStdBorderWindowView::DrawWindow(vcl::RenderContext& rRenderContext, con
if (nBorderSize)
{
rRenderContext.SetFillColor(rStyleSettings.GetFaceColor());
- rRenderContext.DrawRect(Rectangle(Point(aInRect.Left(), aInRect.Top()),
+ rRenderContext.DrawRect(tools::Rectangle(Point(aInRect.Left(), aInRect.Top()),
Size(aInRect.GetWidth(), nBorderSize)));
- rRenderContext.DrawRect(Rectangle(Point(aInRect.Left(), aInRect.Top() + nBorderSize),
+ rRenderContext.DrawRect(tools::Rectangle(Point(aInRect.Left(), aInRect.Top() + nBorderSize),
Size(nBorderSize, aInRect.GetHeight() - nBorderSize)));
- rRenderContext.DrawRect(Rectangle(Point(aInRect.Left(), aInRect.Bottom() - nBorderSize + 1),
+ rRenderContext.DrawRect(tools::Rectangle(Point(aInRect.Left(), aInRect.Bottom() - nBorderSize + 1),
Size(aInRect.GetWidth(), nBorderSize)));
- rRenderContext.DrawRect(Rectangle(Point(aInRect.Right()-nBorderSize + 1, aInRect.Top() + nBorderSize),
+ rRenderContext.DrawRect(tools::Rectangle(Point(aInRect.Right()-nBorderSize + 1, aInRect.Top() + nBorderSize),
Size(nBorderSize, aInRect.GetHeight() - nBorderSize)));
}
@@ -1481,7 +1481,7 @@ void ImplStdBorderWindowView::DrawWindow(vcl::RenderContext& rRenderContext, con
rRenderContext.SetFillColor(aFaceColor);
rRenderContext.SetTextColor(rStyleSettings.GetButtonTextColor());
- Rectangle aTitleRect(pData->maTitleRect);
+ tools::Rectangle aTitleRect(pData->maTitleRect);
if(pOffset)
aTitleRect.Move(pOffset->X(), pOffset->Y());
rRenderContext.DrawRect(aTitleRect);
@@ -1520,28 +1520,28 @@ void ImplStdBorderWindowView::DrawWindow(vcl::RenderContext& rRenderContext, con
if (!pData->maCloseRect.IsEmpty())
{
- Rectangle aSymbolRect(pData->maCloseRect);
+ tools::Rectangle aSymbolRect(pData->maCloseRect);
if (pOffset)
aSymbolRect.Move(pOffset->X(), pOffset->Y());
ImplDrawBrdWinSymbolButton(&rRenderContext, aSymbolRect, SymbolType::CLOSE, pData->mnCloseState);
}
if (!pData->maDockRect.IsEmpty())
{
- Rectangle aSymbolRect(pData->maDockRect);
+ tools::Rectangle aSymbolRect(pData->maDockRect);
if (pOffset)
aSymbolRect.Move(pOffset->X(), pOffset->Y());
ImplDrawBrdWinSymbolButton(&rRenderContext, aSymbolRect, SymbolType::DOCK, pData->mnDockState);
}
if (!pData->maMenuRect.IsEmpty())
{
- Rectangle aSymbolRect(pData->maMenuRect);
+ tools::Rectangle aSymbolRect(pData->maMenuRect);
if (pOffset)
aSymbolRect.Move(pOffset->X(), pOffset->Y());
ImplDrawBrdWinSymbolButton(&rRenderContext, aSymbolRect, SymbolType::MENU, pData->mnMenuState);
}
if (!pData->maHideRect.IsEmpty())
{
- Rectangle aSymbolRect(pData->maHideRect);
+ tools::Rectangle aSymbolRect(pData->maHideRect);
if (pOffset)
aSymbolRect.Move(pOffset->X(), pOffset->Y());
ImplDrawBrdWinSymbolButton(&rRenderContext, aSymbolRect, SymbolType::HIDE, pData->mnHideState);
@@ -1553,7 +1553,7 @@ void ImplStdBorderWindowView::DrawWindow(vcl::RenderContext& rRenderContext, con
eType = SymbolType::ROLLDOWN;
else
eType = SymbolType::ROLLUP;
- Rectangle aSymbolRect(pData->maRollRect);
+ tools::Rectangle aSymbolRect(pData->maRollRect);
if (pOffset)
aSymbolRect.Move(pOffset->X(), pOffset->Y());
ImplDrawBrdWinSymbolButton(&rRenderContext, aSymbolRect, eType, pData->mnRollState);
@@ -1561,7 +1561,7 @@ void ImplStdBorderWindowView::DrawWindow(vcl::RenderContext& rRenderContext, con
if (!pData->maHelpRect.IsEmpty())
{
- Rectangle aSymbolRect(pData->maHelpRect);
+ tools::Rectangle aSymbolRect(pData->maHelpRect);
if (pOffset)
aSymbolRect.Move(pOffset->X(), pOffset->Y());
ImplDrawBrdWinSymbolButton(&rRenderContext, aSymbolRect, SymbolType::HELP, pData->mnHelpState);
@@ -1692,13 +1692,13 @@ void ImplBorderWindow::Tracking( const TrackingEvent& rTEvt )
mpBorderView->Tracking( rTEvt );
}
-void ImplBorderWindow::Paint( vcl::RenderContext& rRenderContext, const Rectangle& )
+void ImplBorderWindow::Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& )
{
if (mpBorderView)
mpBorderView->DrawWindow(rRenderContext);
}
-void ImplBorderWindow::Draw( const Rectangle&, OutputDevice* pOutDev, const Point& rPos )
+void ImplBorderWindow::Draw( const tools::Rectangle&, OutputDevice* pOutDev, const Point& rPos )
{
if (mpBorderView)
mpBorderView->DrawWindow(*pOutDev, &rPos);
@@ -1725,7 +1725,7 @@ void ImplBorderWindow::RequestHelp( const HelpEvent& rHEvt )
if ( rHEvt.GetMode() & (HelpEventMode::BALLOON | HelpEventMode::QUICK) && !rHEvt.KeyboardActivated() )
{
Point aMousePosPixel = ScreenToOutputPixel( rHEvt.GetMousePosPixel() );
- Rectangle aHelpRect;
+ tools::Rectangle aHelpRect;
OUString aHelpStr( mpBorderView->RequestHelp( aMousePosPixel, aHelpRect ) );
// retrieve rectangle
@@ -1904,7 +1904,7 @@ void ImplBorderWindow::InvalidateBorder()
mpBorderView->GetBorder( nLeftBorder, nTopBorder, nRightBorder, nBottomBorder );
if ( nLeftBorder || nTopBorder || nRightBorder || nBottomBorder )
{
- Rectangle aWinRect( Point( 0, 0 ), GetOutputSizePixel() );
+ tools::Rectangle aWinRect( Point( 0, 0 ), GetOutputSizePixel() );
vcl::Region aRegion( aWinRect );
aWinRect.Left() += nLeftBorder;
aWinRect.Top() += nTopBorder;
@@ -2039,7 +2039,7 @@ long ImplBorderWindow::CalcTitleWidth() const
return mpBorderView->CalcTitleWidth();
}
-Rectangle ImplBorderWindow::GetMenuRect() const
+tools::Rectangle ImplBorderWindow::GetMenuRect() const
{
return mpBorderView->GetMenuRect();
}
diff --git a/vcl/source/window/clipping.cxx b/vcl/source/window/clipping.cxx
index 13989cd09b49..d87bafd74de3 100644
--- a/vcl/source/window/clipping.cxx
+++ b/vcl/source/window/clipping.cxx
@@ -112,7 +112,7 @@ vcl::Region Window::GetWindowClipRegionPixel() const
const_cast<vcl::Window*>(this)->ImplInitWinClipRegion();
aWinClipRegion = mpWindowImpl->maWinClipRegion;
- Rectangle aWinRect( Point( mnOutOffX, mnOutOffY ), Size( mnOutWidth, mnOutHeight ) );
+ tools::Rectangle aWinRect( Point( mnOutOffX, mnOutOffY ), Size( mnOutWidth, mnOutHeight ) );
vcl::Region aWinRegion( aWinRect );
if ( aWinRegion == aWinClipRegion )
@@ -140,7 +140,7 @@ vcl::Region Window::GetActiveClipRegion() const
return PixelToLogic( aRegion );
}
-void Window::ClipToPaintRegion(Rectangle& rDstRect)
+void Window::ClipToPaintRegion(tools::Rectangle& rDstRect)
{
const vcl::Region aPaintRgn(GetPaintRegion());
@@ -165,7 +165,7 @@ void Window::ImplClipBoundaries( vcl::Region& rRegion, bool bThis, bool bOverlap
{
// clip to frame if required
if ( !mpWindowImpl->mbFrame )
- rRegion.Intersect( Rectangle( Point( 0, 0 ), Size( mpWindowImpl->mpFrameWindow->mnOutWidth, mpWindowImpl->mpFrameWindow->mnOutHeight ) ) );
+ rRegion.Intersect( tools::Rectangle( Point( 0, 0 ), Size( mpWindowImpl->mpFrameWindow->mnOutWidth, mpWindowImpl->mpFrameWindow->mnOutHeight ) ) );
if ( bOverlaps && !rRegion.IsEmpty() )
{
@@ -242,7 +242,7 @@ void Window::ImplClipSiblings( vcl::Region& rRegion )
void Window::ImplInitWinClipRegion()
{
// Build Window Region
- mpWindowImpl->maWinClipRegion = Rectangle( Point( mnOutOffX, mnOutOffY ),
+ mpWindowImpl->maWinClipRegion = tools::Rectangle( Point( mnOutOffX, mnOutOffY ),
Size( mnOutWidth, mnOutHeight ) );
if ( mpWindowImpl->mbWinRegion )
mpWindowImpl->maWinClipRegion.Intersect( ImplPixelToDevicePixel( mpWindowImpl->maWinRegion ) );
@@ -319,7 +319,7 @@ bool Window::ImplSysObjClip( const vcl::Region* pOldRegion )
}
vcl::Region aRegion = *pWinChildClipRegion;
- Rectangle aWinRect( Point( mnOutOffX, mnOutOffY ), Size( mnOutWidth, mnOutHeight ) );
+ tools::Rectangle aWinRect( Point( mnOutOffX, mnOutOffY ), Size( mnOutWidth, mnOutHeight ) );
vcl::Region aWinRectRegion( aWinRect );
if ( aRegion == aWinRectRegion )
@@ -504,7 +504,7 @@ void Window::ImplIntersectWindowClipRegion( vcl::Region& rRegion )
void Window::ImplIntersectWindowRegion( vcl::Region& rRegion )
{
- rRegion.Intersect( Rectangle( Point( mnOutOffX, mnOutOffY ),
+ rRegion.Intersect( tools::Rectangle( Point( mnOutOffX, mnOutOffY ),
Size( mnOutWidth, mnOutHeight ) ) );
if ( mpWindowImpl->mbWinRegion )
rRegion.Intersect( ImplPixelToDevicePixel( mpWindowImpl->maWinRegion ) );
@@ -515,7 +515,7 @@ void Window::ImplExcludeWindowRegion( vcl::Region& rRegion )
if ( mpWindowImpl->mbWinRegion )
{
Point aPoint( mnOutOffX, mnOutOffY );
- vcl::Region aRegion( Rectangle( aPoint,
+ vcl::Region aRegion( tools::Rectangle( aPoint,
Size( mnOutWidth, mnOutHeight ) ) );
aRegion.Intersect( ImplPixelToDevicePixel( mpWindowImpl->maWinRegion ) );
rRegion.Exclude( aRegion );
@@ -523,7 +523,7 @@ void Window::ImplExcludeWindowRegion( vcl::Region& rRegion )
else
{
Point aPoint( mnOutOffX, mnOutOffY );
- rRegion.Exclude( Rectangle( aPoint,
+ rRegion.Exclude( tools::Rectangle( aPoint,
Size( mnOutWidth, mnOutHeight ) ) );
}
}
@@ -606,7 +606,7 @@ void Window::ImplCalcOverlapRegionOverlaps( const vcl::Region& rInterRegion, vcl
ImplIntersectAndUnionOverlapWindows( rInterRegion, rRegion );
}
-void Window::ImplCalcOverlapRegion( const Rectangle& rSourceRect, vcl::Region& rRegion,
+void Window::ImplCalcOverlapRegion( const tools::Rectangle& rSourceRect, vcl::Region& rRegion,
bool bChildren, bool bSiblings )
{
vcl::Region aRegion( rSourceRect );
@@ -636,7 +636,7 @@ void Window::ImplCalcOverlapRegion( const Rectangle& rSourceRect, vcl::Region& r
if ( pWindow && !pWindow->mpWindowImpl->mbFrame )
{
aTempRegion = aRegion;
- aTempRegion.Exclude( Rectangle( Point( 0, 0 ), Size( mpWindowImpl->mpFrameWindow->mnOutWidth, mpWindowImpl->mpFrameWindow->mnOutHeight ) ) );
+ aTempRegion.Exclude( tools::Rectangle( Point( 0, 0 ), Size( mpWindowImpl->mpFrameWindow->mnOutWidth, mpWindowImpl->mpFrameWindow->mnOutHeight ) ) );
rRegion.Union( aTempRegion );
}
@@ -682,7 +682,7 @@ void Window::SaveBackground( const Point& rPos, const Size& rSize,
const Point aPixPos( LogicToPixel( rPos ) );
aClip.Move( -mnOutOffX, -mnOutOffY );
- aClip.Intersect( Rectangle( aPixPos, LogicToPixel( rSize ) ) );
+ aClip.Intersect( tools::Rectangle( aPixPos, LogicToPixel( rSize ) ) );
if ( !aClip.IsEmpty() )
{
diff --git a/vcl/source/window/cursor.cxx b/vcl/source/window/cursor.cxx
index 163c6b6289a4..819db146bc5e 100644
--- a/vcl/source/window/cursor.cxx
+++ b/vcl/source/window/cursor.cxx
@@ -49,7 +49,7 @@ static void ImplCursorInvert( ImplCursorData* pData )
if (bDoubleBuffering)
pGuard.reset(new PaintBufferGuard(pWindow->ImplGetWindowImpl()->mpFrameData, pWindow));
vcl::RenderContext* pRenderContext = bDoubleBuffering ? pGuard->GetRenderContext() : pWindow;
- Rectangle aPaintRect;
+ tools::Rectangle aPaintRect;
bool bMapMode = pRenderContext->IsMapModeEnabled();
pRenderContext->EnableMapMode( false );
InvertFlags nInvertStyle;
@@ -58,7 +58,7 @@ static void ImplCursorInvert( ImplCursorData* pData )
else
nInvertStyle = InvertFlags::NONE;
- Rectangle aRect( pData->maPixPos, pData->maPixSize );
+ tools::Rectangle aRect( pData->maPixPos, pData->maPixSize );
if ( pData->mnDirection != CursorDirection::NONE || pData->mnOrientation || pData->mnPixSlant )
{
tools::Polygon aPoly( aRect );
diff --git a/vcl/source/window/decoview.cxx b/vcl/source/window/decoview.cxx
index 70589e9f05dc..4a84622b7ea6 100644
--- a/vcl/source/window/decoview.cxx
+++ b/vcl/source/window/decoview.cxx
@@ -32,7 +32,7 @@ using namespace std;
namespace {
-long AdjustRectToSquare( Rectangle &rRect )
+long AdjustRectToSquare( tools::Rectangle &rRect )
{
const long nWidth = rRect.GetWidth();
const long nHeight = rRect.GetHeight();
@@ -53,7 +53,7 @@ long AdjustRectToSquare( Rectangle &rRect )
return nSide;
}
-void ImplDrawSymbol( OutputDevice* pDev, Rectangle nRect, const SymbolType eType )
+void ImplDrawSymbol( OutputDevice* pDev, tools::Rectangle nRect, const SymbolType eType )
{
const long nSide = AdjustRectToSquare( nRect );
@@ -80,7 +80,7 @@ void ImplDrawSymbol( OutputDevice* pDev, Rectangle nRect, const SymbolType eType
pDev->DrawLine( Point( aCenter.X()-i, nRect.Top() ),
Point( aCenter.X()+i, nRect.Top() ) );
}
- pDev->DrawRect( Rectangle( aCenter.X()-n8, nRect.Top()+1,
+ pDev->DrawRect( tools::Rectangle( aCenter.X()-n8, nRect.Top()+1,
aCenter.X()+n8, nRect.Bottom() ) );
break;
@@ -92,7 +92,7 @@ void ImplDrawSymbol( OutputDevice* pDev, Rectangle nRect, const SymbolType eType
pDev->DrawLine( Point( aCenter.X()-i, nRect.Bottom() ),
Point( aCenter.X()+i, nRect.Bottom() ) );
}
- pDev->DrawRect( Rectangle( aCenter.X()-n8, nRect.Top(),
+ pDev->DrawRect( tools::Rectangle( aCenter.X()-n8, nRect.Top(),
aCenter.X()+n8, nRect.Bottom()-1 ) );
break;
@@ -104,7 +104,7 @@ void ImplDrawSymbol( OutputDevice* pDev, Rectangle nRect, const SymbolType eType
pDev->DrawLine( Point( nRect.Left(), aCenter.Y()-i ),
Point( nRect.Left(), aCenter.Y()+i ) );
}
- pDev->DrawRect( Rectangle( nRect.Left()+1, aCenter.Y()-n8,
+ pDev->DrawRect( tools::Rectangle( nRect.Left()+1, aCenter.Y()-n8,
nRect.Right(), aCenter.Y()+n8 ) );
break;
@@ -116,7 +116,7 @@ void ImplDrawSymbol( OutputDevice* pDev, Rectangle nRect, const SymbolType eType
pDev->DrawLine( Point( nRect.Right(), aCenter.Y()-i ),
Point( nRect.Right(), aCenter.Y()+i ) );
}
- pDev->DrawRect( Rectangle( nRect.Left(), aCenter.Y()-n8,
+ pDev->DrawRect( tools::Rectangle( nRect.Left(), aCenter.Y()-n8,
nRect.Right()-1, aCenter.Y()+n8 ) );
break;
@@ -270,7 +270,7 @@ void ImplDrawSymbol( OutputDevice* pDev, Rectangle nRect, const SymbolType eType
Point( nRect.Right(), nRect.Bottom() ) );
SAL_FALLTHROUGH;
case SymbolType::ROLLUP:
- pDev->DrawRect( Rectangle( nRect.Left(), nRect.Top(),
+ pDev->DrawRect( tools::Rectangle( nRect.Left(), nRect.Top(),
nRect.Right(), nRect.Top()+n8 ) );
break;
@@ -314,7 +314,7 @@ void ImplDrawSymbol( OutputDevice* pDev, Rectangle nRect, const SymbolType eType
case SymbolType::FLOAT:
nRect.Right() -= n4;
nRect.Top() += n4+1;
- pDev->DrawRect( Rectangle( nRect.Left(), nRect.Top(),
+ pDev->DrawRect( tools::Rectangle( nRect.Left(), nRect.Top(),
nRect.Right(), nRect.Top()+n8 ) );
pDev->DrawLine( Point( nRect.Left(), nRect.Top()+n8 ),
Point( nRect.Left(), nRect.Bottom() ) );
@@ -326,7 +326,7 @@ void ImplDrawSymbol( OutputDevice* pDev, Rectangle nRect, const SymbolType eType
nRect.Top() -= n4+1;
nRect.Left() += n4;
nRect.Bottom() -= n4+1;
- pDev->DrawRect( Rectangle( nRect.Left(), nRect.Top(),
+ pDev->DrawRect( tools::Rectangle( nRect.Left(), nRect.Top(),
nRect.Right(), nRect.Top()+n8 ) );
pDev->DrawLine( Point( nRect.Left(), nRect.Top()+n8 ),
Point( nRect.Left(), nRect.Bottom() ) );
@@ -348,14 +348,14 @@ void ImplDrawSymbol( OutputDevice* pDev, Rectangle nRect, const SymbolType eType
break;
case SymbolType::HIDE:
- pDev->DrawRect( Rectangle( nRect.Left()+n8, nRect.Bottom()-n8,
+ pDev->DrawRect( tools::Rectangle( nRect.Left()+n8, nRect.Bottom()-n8,
nRect.Right()-n8, nRect.Bottom() ) );
break;
case SymbolType::PLUS:
- pDev->DrawRect( Rectangle( nRect.Left(), aCenter.Y()-n8/2,
+ pDev->DrawRect( tools::Rectangle( nRect.Left(), aCenter.Y()-n8/2,
nRect.Right()+1, aCenter.Y()+n8/2+1 ) );
- pDev->DrawRect( Rectangle( aCenter.X()-n8/2, nRect.Top(),
+ pDev->DrawRect( tools::Rectangle( aCenter.X()-n8/2, nRect.Top(),
aCenter.X()+n8/2+1, nRect.Bottom()+1 ) );
break;
case SymbolType::DONTKNOW:
@@ -364,7 +364,7 @@ void ImplDrawSymbol( OutputDevice* pDev, Rectangle nRect, const SymbolType eType
}
}
-void ImplDrawDPILineRect( OutputDevice *const pDev, Rectangle& rRect,
+void ImplDrawDPILineRect( OutputDevice *const pDev, tools::Rectangle& rRect,
const Color *const pColor, const bool bRound = false )
{
long nLineWidth = pDev->GetDPIX()/300;
@@ -398,11 +398,11 @@ void ImplDrawDPILineRect( OutputDevice *const pDev, Rectangle& rRect,
const long nHeight = rRect.GetHeight();
pDev->SetLineColor();
pDev->SetFillColor( *pColor );
- pDev->DrawRect( Rectangle( rRect.TopLeft(), Size( nWidth, nLineHeight ) ) );
- pDev->DrawRect( Rectangle( rRect.TopLeft(), Size( nLineWidth, nHeight ) ) );
- pDev->DrawRect( Rectangle( Point( rRect.Left(), rRect.Bottom()-nLineHeight ),
+ pDev->DrawRect( tools::Rectangle( rRect.TopLeft(), Size( nWidth, nLineHeight ) ) );
+ pDev->DrawRect( tools::Rectangle( rRect.TopLeft(), Size( nLineWidth, nHeight ) ) );
+ pDev->DrawRect( tools::Rectangle( Point( rRect.Left(), rRect.Bottom()-nLineHeight ),
Size( nWidth, nLineHeight ) ) );
- pDev->DrawRect( Rectangle( Point( rRect.Right()-nLineWidth, rRect.Top() ),
+ pDev->DrawRect( tools::Rectangle( Point( rRect.Right()-nLineWidth, rRect.Top() ),
Size( nLineWidth, nHeight ) ) );
}
}
@@ -413,7 +413,7 @@ void ImplDrawDPILineRect( OutputDevice *const pDev, Rectangle& rRect,
rRect.Bottom() -= nLineHeight;
}
-void ImplDraw2ColorFrame( OutputDevice *const pDev, Rectangle& rRect,
+void ImplDraw2ColorFrame( OutputDevice *const pDev, tools::Rectangle& rRect,
const Color& rLeftTopColor, const Color& rRightBottomColor )
{
pDev->SetLineColor( rLeftTopColor );
@@ -430,7 +430,7 @@ void ImplDraw2ColorFrame( OutputDevice *const pDev, Rectangle& rRect,
--rRect.Bottom();
}
-void ImplDrawButton( OutputDevice *const pDev, Rectangle aFillRect,
+void ImplDrawButton( OutputDevice *const pDev, tools::Rectangle aFillRect,
const DrawButtonFlags nStyle )
{
const StyleSettings& rStyleSettings = pDev->GetSettings().GetStyleSettings();
@@ -460,16 +460,16 @@ void ImplDrawButton( OutputDevice *const pDev, Rectangle aFillRect,
pDev->SetLineColor();
pDev->SetFillColor( aBlackColor );
- const Rectangle aOrigFillRect(aFillRect);
+ const tools::Rectangle aOrigFillRect(aFillRect);
if ( nStyle & (DrawButtonFlags::Pressed | DrawButtonFlags::Checked) )
{
// shrink fill rect
aFillRect.Left() += aBrdSize.Width();
aFillRect.Top() += aBrdSize.Height();
// draw top and left borders (aOrigFillRect-aFillRect)
- pDev->DrawRect( Rectangle( aOrigFillRect.Left(), aOrigFillRect.Top(),
+ pDev->DrawRect( tools::Rectangle( aOrigFillRect.Left(), aOrigFillRect.Top(),
aOrigFillRect.Right(), aFillRect.Top()-1 ) );
- pDev->DrawRect( Rectangle( aOrigFillRect.Left(), aOrigFillRect.Top(),
+ pDev->DrawRect( tools::Rectangle( aOrigFillRect.Left(), aOrigFillRect.Top(),
aFillRect.Left()-1, aOrigFillRect.Bottom() ) );
}
else
@@ -478,9 +478,9 @@ void ImplDrawButton( OutputDevice *const pDev, Rectangle aFillRect,
aFillRect.Right() -= aBrdSize.Width();
aFillRect.Bottom() -= aBrdSize.Height();
// draw bottom and right borders (aOrigFillRect-aFillRect)
- pDev->DrawRect( Rectangle( aOrigFillRect.Left(), aFillRect.Bottom()+1,
+ pDev->DrawRect( tools::Rectangle( aOrigFillRect.Left(), aFillRect.Bottom()+1,
aOrigFillRect.Right(), aOrigFillRect.Bottom() ) );
- pDev->DrawRect( Rectangle( aFillRect.Right()+1, aOrigFillRect.Top(),
+ pDev->DrawRect( tools::Rectangle( aFillRect.Right()+1, aOrigFillRect.Top(),
aOrigFillRect.Right(), aOrigFillRect.Bottom() ) );
}
@@ -561,7 +561,7 @@ void ImplDrawButton( OutputDevice *const pDev, Rectangle aFillRect,
}
}
-void ImplDrawFrame( OutputDevice *const pDev, Rectangle& rRect,
+void ImplDrawFrame( OutputDevice *const pDev, tools::Rectangle& rRect,
const StyleSettings& rStyleSettings, DrawFrameStyle nStyle, DrawFrameFlags nFlags )
{
vcl::Window *const pWin = (pDev->GetOutDevType()==OUTDEV_WINDOW) ? static_cast<vcl::Window*>(pDev) : nullptr;
@@ -600,8 +600,8 @@ void ImplDrawFrame( OutputDevice *const pDev, Rectangle& rRect,
DrawFrameFlags::BorderWindowBorder : DrawFrameFlags::NONE);
ImplControlValue aControlValue( nControlFlags );
- Rectangle aBound, aContent;
- Rectangle aNatRgn( rRect );
+ tools::Rectangle aBound, aContent;
+ tools::Rectangle aNatRgn( rRect );
if( pWin->GetNativeControlRegion(ControlType::Frame, ControlPart::Border,
aNatRgn, ControlState::NONE, aControlValue, OUString(), aBound, aContent) )
{
@@ -684,10 +684,10 @@ void ImplDrawFrame( OutputDevice *const pDev, Rectangle& rRect,
case DrawFrameStyle::Group:
pDev->SetFillColor();
pDev->SetLineColor( rStyleSettings.GetLightColor() );
- pDev->DrawRect( Rectangle( rRect.Left()+1, rRect.Top()+1,
+ pDev->DrawRect( tools::Rectangle( rRect.Left()+1, rRect.Top()+1,
rRect.Right(), rRect.Bottom() ) );
pDev->SetLineColor( rStyleSettings.GetShadowColor() );
- pDev->DrawRect( Rectangle( rRect.Left(), rRect.Top(),
+ pDev->DrawRect( tools::Rectangle( rRect.Left(), rRect.Top(),
rRect.Right()-1, rRect.Bottom()-1 ) );
// adjust target rectangle
@@ -776,11 +776,11 @@ DecorationView::DecorationView(OutputDevice* pOutDev) :
mpOutDev(pOutDev)
{}
-void DecorationView::DrawSymbol( const Rectangle& rRect, SymbolType eType,