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,
+void DecorationView::DrawSymbol( const tools::Rectangle& rRect, SymbolType eType,
const Color& rColor, DrawSymbolFlags nStyle )
{
const StyleSettings& rStyleSettings = mpOutDev->GetSettings().GetStyleSettings();
- const Rectangle aRect = mpOutDev->LogicToPixel( rRect );
+ const tools::Rectangle aRect = mpOutDev->LogicToPixel( rRect );
const Color aOldLineColor = mpOutDev->GetLineColor();
const Color aOldFillColor = mpOutDev->GetFillColor();
const bool bOldMapMode = mpOutDev->IsMapModeEnabled();
@@ -819,11 +819,11 @@ void DecorationView::DrawSymbol( const Rectangle& rRect, SymbolType eType,
mpOutDev->EnableMapMode( bOldMapMode );
}
-void DecorationView::DrawFrame( const Rectangle& rRect,
+void DecorationView::DrawFrame( const tools::Rectangle& rRect,
const Color& rLeftTopColor,
const Color& rRightBottomColor )
{
- Rectangle aRect = mpOutDev->LogicToPixel( rRect );
+ tools::Rectangle aRect = mpOutDev->LogicToPixel( rRect );
const Color aOldLineColor = mpOutDev->GetLineColor();
const bool bOldMapMode = mpOutDev->IsMapModeEnabled();
mpOutDev->EnableMapMode( false );
@@ -832,7 +832,7 @@ void DecorationView::DrawFrame( const Rectangle& rRect,
mpOutDev->EnableMapMode( bOldMapMode );
}
-void DecorationView::DrawHighlightFrame( const Rectangle& rRect,
+void DecorationView::DrawHighlightFrame( const tools::Rectangle& rRect,
DrawHighlightFrameStyle nStyle )
{
const StyleSettings& rStyleSettings = mpOutDev->GetSettings().GetStyleSettings();
@@ -880,9 +880,9 @@ void DecorationView::DrawHighlightFrame( const Rectangle& rRect,
DrawFrame( rRect, aLightColor, aShadowColor );
}
-Rectangle DecorationView::DrawFrame( const Rectangle& rRect, DrawFrameStyle nStyle, DrawFrameFlags nFlags )
+tools::Rectangle DecorationView::DrawFrame( const tools::Rectangle& rRect, DrawFrameStyle nStyle, DrawFrameFlags nFlags )
{
- Rectangle aRect = rRect;
+ tools::Rectangle aRect = rRect;
bool bOldMap = mpOutDev->IsMapModeEnabled();
if ( bOldMap )
{
@@ -913,14 +913,14 @@ Rectangle DecorationView::DrawFrame( const Rectangle& rRect, DrawFrameStyle nSty
return aRect;
}
-Rectangle DecorationView::DrawButton( const Rectangle& rRect, DrawButtonFlags nStyle )
+tools::Rectangle DecorationView::DrawButton( const tools::Rectangle& rRect, DrawButtonFlags nStyle )
{
if ( rRect.IsEmpty() )
{
return rRect;
}
- Rectangle aRect = rRect;
+ tools::Rectangle aRect = rRect;
const bool bOldMap = mpOutDev->IsMapModeEnabled();
if ( bOldMap )
@@ -1003,7 +1003,7 @@ void DecorationView::DrawSeparator( const Point& rStart, const Point& rStop, boo
bool nativeSupported = pWin->IsNativeControlSupported( ControlType::Fixedline, nPart );
ImplControlValue aValue;
ControlState nState = ControlState::NONE;
- Rectangle aRect(rStart,rStop);
+ tools::Rectangle aRect(rStart,rStop);
if(nativeSupported && pWin->DrawNativeControl(ControlType::Fixedline,nPart,aRect,nState,aValue,OUString()))
return;
}
@@ -1033,7 +1033,7 @@ void DecorationView::DrawSeparator( const Point& rStart, const Point& rStop, boo
mpOutDev->Pop();
}
-void DecorationView::DrawHandle(const Rectangle& rRect)
+void DecorationView::DrawHandle(const tools::Rectangle& rRect)
{
const StyleSettings& rStyleSettings = mpOutDev->GetSettings().GetStyleSettings();
@@ -1054,8 +1054,8 @@ void DecorationView::DrawHandle(const Rectangle& rRect)
for (long i = 1; i <= nNumberOfPoints; i++)
{
- Rectangle aLocation;
- aLocation = Rectangle(nHalfWidth - nRadius,
+ tools::Rectangle aLocation;
+ aLocation = tools::Rectangle(nHalfWidth - nRadius,
round(fDistance * i) - nRadius,
nHalfWidth + nRadius,
round(fDistance * i) + nRadius);
diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx
index 2371d88fe73a..e66155d1cc60 100644
--- a/vcl/source/window/dialog.cxx
+++ b/vcl/source/window/dialog.cxx
@@ -1161,7 +1161,7 @@ void Dialog::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, Dra
else
{
pDev->SetFillColor( aWallpaper.GetColor() );
- pDev->DrawRect( Rectangle( aPos, aSize ) );
+ pDev->DrawRect( tools::Rectangle( aPos, aSize ) );
}
if (!( GetStyle() & WB_NOBORDER ))
@@ -1172,7 +1172,7 @@ void Dialog::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, Dra
aImplWin->SetDisplayActive( true );
aImplWin->InitView();
- aImplWin->Draw( Rectangle( aPos, aSize ), pDev, aPos );
+ aImplWin->Draw( tools::Rectangle( aPos, aSize ), pDev, aPos );
}
pDev->Pop();
diff --git a/vcl/source/window/dockingarea.cxx b/vcl/source/window/dockingarea.cxx
index f23fc4da10b6..3ed68fc7a1ec 100644
--- a/vcl/source/window/dockingarea.cxx
+++ b/vcl/source/window/dockingarea.cxx
@@ -138,7 +138,7 @@ void DockingAreaWindow::ApplySettings(vcl::RenderContext& rRenderContext)
if (pMenubarWin)
nMenubarHeight = pMenubarWin->GetOutputHeightPixel();
}
- aWallpaper.SetRect(Rectangle(Point(0, -nMenubarHeight),
+ aWallpaper.SetRect(tools::Rectangle(Point(0, -nMenubarHeight),
Size(rRenderContext.GetOutputWidthPixel(),
rRenderContext.GetOutputHeightPixel() + nMenubarHeight)));
@@ -155,7 +155,7 @@ void DockingAreaWindow::ApplySettings(vcl::RenderContext& rRenderContext)
}
-void DockingAreaWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangle&)
+void DockingAreaWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&)
{
const StyleSettings rSetting = rRenderContext.GetSettings().GetStyleSettings();
@@ -179,7 +179,7 @@ void DockingAreaWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangl
else if (!ImplGetSVData()->maNWFData.mbDockingAreaSeparateTB)
{
// draw a single toolbar background covering the whole docking area
- Rectangle aCtrlRegion(Point(), GetOutputSizePixel());
+ tools::Rectangle aCtrlRegion(Point(), GetOutputSizePixel());
rRenderContext.DrawNativeControl(ControlType::Toolbar, IsHorizontal() ? ControlPart::DrawBackgroundHorz : ControlPart::DrawBackgroundVert,
aCtrlRegion, nState, aControlValue, OUString() );
@@ -195,7 +195,7 @@ void DockingAreaWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangl
{
Point aPos = pChild->GetPosPixel();
Size aSize = pChild->GetSizePixel();
- Rectangle aRect(aPos, aSize);
+ tools::Rectangle aRect(aPos, aSize);
rRenderContext.SetLineColor(rRenderContext.GetSettings().GetStyleSettings().GetLightColor());
rRenderContext.DrawLine(aRect.TopLeft(), aRect.TopRight());
@@ -229,7 +229,7 @@ void DockingAreaWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangl
std::map<int, int>::const_iterator it;
for (it = ranges.begin(); it != ranges.end(); ++it)
{
- Rectangle aTBRect;
+ tools::Rectangle aTBRect;
if (IsHorizontal())
{
aTBRect.Left() = 0;
diff --git a/vcl/source/window/dockmgr.cxx b/vcl/source/window/dockmgr.cxx
index 2c92d7d984a3..a68d5b1fbd6d 100644
--- a/vcl/source/window/dockmgr.cxx
+++ b/vcl/source/window/dockmgr.cxx
@@ -46,7 +46,7 @@ private:
Idle maDockIdle;
Idle maEndDockIdle;
Point maDockPos;
- Rectangle maDockRect;
+ tools::Rectangle maDockRect;
bool mbInMove;
ImplSVEvent * mnLastUserEvent;
@@ -169,7 +169,7 @@ IMPL_LINK_NOARG(ImplDockFloatWin2, DockingHdl, void*, void)
vcl::Window *pBorder = GetWindow( GetWindowType::Border );
if( pBorder != this )
{
- Rectangle aBorderRect( Point(), pBorder->GetSizePixel() );
+ tools::Rectangle aBorderRect( Point(), pBorder->GetSizePixel() );
sal_Int32 nLeft, nTop, nRight, nBottom;
GetBorder( nLeft, nTop, nRight, nBottom );
// limit borderrect to the caption part only and without the resizing borders
@@ -192,7 +192,7 @@ IMPL_LINK_NOARG(ImplDockFloatWin2, DockingHdl, void*, void)
bRealMove )
{
maDockPos = Point( pDockingArea->OutputToScreenPixel( pDockingArea->AbsoluteScreenToOutputPixel( OutputToAbsoluteScreenPixel( Point() ) ) ) );
- maDockRect = Rectangle( maDockPos, mpDockWin->GetSizePixel() );
+ maDockRect = tools::Rectangle( maDockPos, mpDockWin->GetSizePixel() );
// mouse pos in screen pixels
Point aMousePos = pDockingArea->OutputToScreenPixel( aState.maPos );
@@ -417,12 +417,12 @@ void DockingManager::SetPosSizePixel( vcl::Window *pWindow, long nX, long nY,
pWrapper->setPosSizePixel( nX, nY, nWidth, nHeight, nFlags );
}
-Rectangle DockingManager::GetPosSizePixel( const vcl::Window *pWindow )
+tools::Rectangle DockingManager::GetPosSizePixel( const vcl::Window *pWindow )
{
- Rectangle aRect;
+ tools::Rectangle aRect;
ImplDockingWindowWrapper* pWrapper = GetDockingWindowWrapper( pWindow );
if( pWrapper )
- aRect = Rectangle( pWrapper->GetPosPixel(), pWrapper->GetSizePixel() );
+ aRect = tools::Rectangle( pWrapper->GetPosPixel(), pWrapper->GetSizePixel() );
return aRect;
}
@@ -443,14 +443,14 @@ public:
virtual void dispose() override;
virtual css::uno::Reference< css::accessibility::XAccessible > CreateAccessible() override;
- 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 MouseButtonDown( const MouseEvent& rMEvt ) override;
virtual void MouseButtonUp( const MouseEvent& rMEvt ) override;
virtual void Tracking( const TrackingEvent& rTEvt ) override;
virtual void Resize() override;
- Rectangle GetDragRect() const;
+ tools::Rectangle GetDragRect() const;
Point GetToolboxPosition() const;
void DrawGrip(vcl::RenderContext& rRenderContext);
void DrawBorder(vcl::RenderContext& rRenderContext);
@@ -513,11 +513,11 @@ void ImplPopupFloatWin::Resize()
ImplSetBorder();
}
-Rectangle ImplPopupFloatWin::GetDragRect() const
+tools::Rectangle ImplPopupFloatWin::GetDragRect() const
{
if( !hasGrip() )
- return Rectangle();
- return Rectangle( 1, 1, GetOutputSizePixel().Width() - 1,
+ return tools::Rectangle();
+ return tools::Rectangle( 1, 1, GetOutputSizePixel().Width() - 1,
2 + ToolBox::ImplGetDragWidth( *this, false ) );
}
@@ -530,11 +530,11 @@ Point ImplPopupFloatWin::GetToolboxPosition() const
void ImplPopupFloatWin::DrawBorder(vcl::RenderContext& rRenderContext)
{
rRenderContext.SetFillColor();
- Rectangle aRect( Point(), GetOutputSizePixel() );
+ tools::Rectangle aRect( Point(), GetOutputSizePixel() );
vcl::Region oldClipRgn( GetClipRegion( ) );
vcl::Region aClipRgn( aRect );
- Rectangle aItemClipRect( ImplGetItemEdgeClipRect() );
+ tools::Rectangle aItemClipRect( ImplGetItemEdgeClipRect() );
if( !aItemClipRect.IsEmpty() )
{
aItemClipRect.SetPos( AbsoluteScreenToOutputPixel( aItemClipRect.TopLeft() ) );
@@ -575,7 +575,7 @@ void ImplPopupFloatWin::DrawGrip(vcl::RenderContext& rRenderContext)
rRenderContext.SetFillColor();
}
-void ImplPopupFloatWin::Paint(vcl::RenderContext& rRenderContext, const Rectangle&)
+void ImplPopupFloatWin::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&)
{
DrawBorder(rRenderContext);
if (hasGrip())
@@ -737,7 +737,7 @@ bool ImplDockingWindowWrapper::ImplStartDocking( const Point& rPos )
// mouse pos in screen pixels
Point aMousePos = pDockingArea->OutputToScreenPixel( aState.maPos );
Point aDockPos = Point( pDockingArea->AbsoluteScreenToOutputPixel( GetWindow()->OutputToAbsoluteScreenPixel( GetWindow()->GetPosPixel() ) ) );
- Rectangle aDockRect( aDockPos, GetWindow()->GetSizePixel() );
+ tools::Rectangle aDockRect( aDockPos, GetWindow()->GetSizePixel() );
StartDocking( aMousePos, aDockRect );
GetWindow()->ImplUpdateAll();
@@ -759,11 +759,11 @@ void ImplDockingWindowWrapper::Tracking( const TrackingEvent& rTEvt )
if ( rTEvt.IsTrackingCanceled() )
{
mbDockCanceled = true;
- EndDocking( Rectangle( Point( mnTrackX, mnTrackY ), Size( mnTrackWidth, mnTrackHeight ) ), mbLastFloatMode );
+ EndDocking( tools::Rectangle( Point( mnTrackX, mnTrackY ), Size( mnTrackWidth, mnTrackHeight ) ), mbLastFloatMode );
mbDockCanceled = false;
}
else
- EndDocking( Rectangle( Point( mnTrackX, mnTrackY ), Size( mnTrackWidth, mnTrackHeight ) ), mbLastFloatMode );
+ EndDocking( tools::Rectangle( Point( mnTrackX, mnTrackY ), Size( mnTrackWidth, mnTrackHeight ) ), mbLastFloatMode );
}
// Docking only upon non-synthetic MouseEvents
else if ( !rTEvt.GetMouseEvent().IsSynthetic() || rTEvt.GetMouseEvent().IsModifierChanged() )
@@ -783,8 +783,8 @@ void ImplDockingWindowWrapper::Tracking( const TrackingEvent& rTEvt )
aMousePos.X() -= maMouseOff.X();
aMousePos.Y() -= maMouseOff.Y();
Point aPos = GetWindow()->ImplOutputToFrame( aMousePos );
- Rectangle aTrackRect( aPos, Size( mnTrackWidth, mnTrackHeight ) );
- Rectangle aCompRect = aTrackRect;
+ tools::Rectangle aTrackRect( aPos, Size( mnTrackWidth, mnTrackHeight ) );
+ tools::Rectangle aCompRect = aTrackRect;
aPos.X() += maMouseOff.X();
aPos.Y() += maMouseOff.Y();
@@ -817,7 +817,7 @@ void ImplDockingWindowWrapper::Tracking( const TrackingEvent& rTEvt )
nTrackStyle = ShowTrackFlags::Object;
else
nTrackStyle = ShowTrackFlags::Big;
- Rectangle aShowTrackRect = aTrackRect;
+ tools::Rectangle aShowTrackRect = aTrackRect;
aShowTrackRect.SetPos( GetWindow()->ImplFrameToOutput( aShowTrackRect.TopLeft() ) );
GetWindow()->ShowTracking( aShowTrackRect, nTrackStyle );
@@ -834,7 +834,7 @@ void ImplDockingWindowWrapper::Tracking( const TrackingEvent& rTEvt )
}
}
-void ImplDockingWindowWrapper::StartDocking( const Point& rPoint, Rectangle& rRect )
+void ImplDockingWindowWrapper::StartDocking( const Point& rPoint, tools::Rectangle& rRect )
{
DockingData data( rPoint, rRect, IsFloatingMode() );
@@ -842,7 +842,7 @@ void ImplDockingWindowWrapper::StartDocking( const Point& rPoint, Rectangle& rRe
mbDocking = true;
}
-bool ImplDockingWindowWrapper::Docking( const Point& rPoint, Rectangle& rRect )
+bool ImplDockingWindowWrapper::Docking( const Point& rPoint, tools::Rectangle& rRect )
{
DockingData data( rPoint, rRect, IsFloatingMode() );
@@ -851,9 +851,9 @@ bool ImplDockingWindowWrapper::Docking( const Point& rPoint, Rectangle& rRect )
return data.mbFloating;
}
-void ImplDockingWindowWrapper::EndDocking( const Rectangle& rRect, bool bFloatMode )
+void ImplDockingWindowWrapper::EndDocking( const tools::Rectangle& rRect, bool bFloatMode )
{
- Rectangle aRect( rRect );
+ tools::Rectangle aRect( rRect );
bool bOrigDockCanceled = mbDockCanceled;
if (bFloatMode && !StyleSettings::GetDockingFloatsSupported())
@@ -1220,7 +1220,7 @@ bool ImplDockingWindowWrapper::IsFloatingMode() const
return (mpFloatWin != nullptr);
}
-void ImplDockingWindowWrapper::SetDragArea( const Rectangle& rRect )
+void ImplDockingWindowWrapper::SetDragArea( const tools::Rectangle& rRect )
{
maDragArea = rRect;
}
diff --git a/vcl/source/window/dockwin.cxx b/vcl/source/window/dockwin.cxx
index ced4ec955b36..4f61ff8aed92 100644
--- a/vcl/source/window/dockwin.cxx
+++ b/vcl/source/window/dockwin.cxx
@@ -58,7 +58,7 @@ private:
sal_uInt64 mnLastTicks;
Idle maDockIdle;
Point maDockPos;
- Rectangle maDockRect;
+ tools::Rectangle maDockRect;
bool mbInMove;
ImplSVEvent * mnLastUserEvent;
@@ -160,7 +160,7 @@ IMPL_LINK_NOARG(ImplDockFloatWin, DockingHdl, void*, void)
if( ! mpDockWin->IsDocking() )
mpDockWin->StartDocking();
- maDockRect = Rectangle( maDockPos, mpDockWin->GetSizePixel() );
+ maDockRect = tools::Rectangle( maDockPos, mpDockWin->GetSizePixel() );
// mouse pos also in screen pixels
Point aMousePos = mpDockWin->GetParent()->OutputToScreenPixel( aState.maPos );
@@ -420,7 +420,7 @@ void DockingWindow::Tracking( const TrackingEvent& rTEvt )
if ( rTEvt.IsTrackingCanceled() )
{
StartDocking();
- Rectangle aRect( Point( mnTrackX, mnTrackY ), Size( mnTrackWidth, mnTrackHeight ) );
+ tools::Rectangle aRect( Point( mnTrackX, mnTrackY ), Size( mnTrackWidth, mnTrackHeight ) );
EndDocking( aRect, mbStartFloat );
}
}
@@ -430,11 +430,11 @@ void DockingWindow::Tracking( const TrackingEvent& rTEvt )
if ( rTEvt.IsTrackingCanceled() )
{
mbDockCanceled = true;
- EndDocking( Rectangle( Point( mnTrackX, mnTrackY ), Size( mnTrackWidth, mnTrackHeight ) ), mbLastFloatMode );
+ EndDocking( tools::Rectangle( Point( mnTrackX, mnTrackY ), Size( mnTrackWidth, mnTrackHeight ) ), mbLastFloatMode );
mbDockCanceled = false;
}
else
- EndDocking( Rectangle( Point( mnTrackX, mnTrackY ), Size( mnTrackWidth, mnTrackHeight ) ), mbLastFloatMode );
+ EndDocking( tools::Rectangle( Point( mnTrackX, mnTrackY ), Size( mnTrackWidth, mnTrackHeight ) ), mbLastFloatMode );
}
}
// dock only for non-synthetic MouseEvents
@@ -455,8 +455,8 @@ void DockingWindow::Tracking( const TrackingEvent& rTEvt )
aMousePos.X() -= maMouseOff.X();
aMousePos.Y() -= maMouseOff.Y();
Point aFramePos = ImplOutputToFrame( aMousePos );
- Rectangle aTrackRect( aFramePos, Size( mnTrackWidth, mnTrackHeight ) );
- Rectangle aCompRect = aTrackRect;
+ tools::Rectangle aTrackRect( aFramePos, Size( mnTrackWidth, mnTrackHeight ) );
+ tools::Rectangle aCompRect = aTrackRect;
aFramePos.X() += maMouseOff.X();
aFramePos.Y() += maMouseOff.Y();
if ( mbDragFull )
@@ -502,7 +502,7 @@ void DockingWindow::Tracking( const TrackingEvent& rTEvt )
nTrackStyle = ShowTrackFlags::Big;
else
nTrackStyle = ShowTrackFlags::Object;
- Rectangle aShowTrackRect = aTrackRect;
+ tools::Rectangle aShowTrackRect = aTrackRect;
aShowTrackRect.SetPos( ImplFrameToOutput( aShowTrackRect.TopLeft() ) );
ShowTracking( aShowTrackRect, nTrackStyle );
@@ -578,12 +578,12 @@ void DockingWindow::StartDocking()
mbDocking = true;
}
-bool DockingWindow::Docking( const Point&, Rectangle& )
+bool DockingWindow::Docking( const Point&, tools::Rectangle& )
{
return IsFloatingMode();
}
-void DockingWindow::EndDocking( const Rectangle& rRect, bool bFloatMode )
+void DockingWindow::EndDocking( const tools::Rectangle& rRect, bool bFloatMode )
{
bool bOrigDockCanceled = mbDockCanceled;
if (bFloatMode && !StyleSettings::GetDockingFloatsSupported())
diff --git a/vcl/source/window/floatwin.cxx b/vcl/source/window/floatwin.cxx
index 4337969fc07f..9b27d56b6617 100644
--- a/vcl/source/window/floatwin.cxx
+++ b/vcl/source/window/floatwin.cxx
@@ -39,7 +39,7 @@ public:
ImplData();
VclPtr<ToolBox> mpBox;
- Rectangle maItemEdgeClipRect; // used to clip the common edge between a toolbar item and the border of this window
+ tools::Rectangle maItemEdgeClipRect; // used to clip the common edge between a toolbar item and the border of this window
};
FloatingWindow::ImplData::ImplData()
@@ -47,7 +47,7 @@ FloatingWindow::ImplData::ImplData()
mpBox = nullptr;
}
-Rectangle& FloatingWindow::ImplGetItemEdgeClipRect()
+tools::Rectangle& FloatingWindow::ImplGetItemEdgeClipRect()
{
return mpImplData->maItemEdgeClipRect;
}
@@ -225,19 +225,19 @@ void FloatingWindow::dispose()
SystemWindow::dispose();
}
-Point FloatingWindow::CalcFloatingPosition( vcl::Window* pWindow, const Rectangle& rRect, FloatWinPopupFlags nFlags, sal_uInt16& rArrangeIndex )
+Point FloatingWindow::CalcFloatingPosition( vcl::Window* pWindow, const tools::Rectangle& rRect, FloatWinPopupFlags nFlags, sal_uInt16& rArrangeIndex )
{
return ImplCalcPos( pWindow, rRect, nFlags, rArrangeIndex );
}
Point FloatingWindow::ImplCalcPos( vcl::Window* pWindow,
- const Rectangle& rRect, FloatWinPopupFlags nFlags,
+ const tools::Rectangle& rRect, FloatWinPopupFlags nFlags,
sal_uInt16& rArrangeIndex )
{
// get window position
Point aPos;
Size aSize = ::isLayoutEnabled(pWindow) ? pWindow->get_preferred_size() : pWindow->GetSizePixel();
- Rectangle aScreenRect = pWindow->ImplGetFrameWindow()->GetDesktopRectPixel();
+ tools::Rectangle aScreenRect = pWindow->ImplGetFrameWindow()->GetDesktopRectPixel();
FloatingWindow *pFloatingWindow = dynamic_cast<FloatingWindow*>( pWindow );
// convert....
@@ -245,15 +245,15 @@ Point FloatingWindow::ImplCalcPos( vcl::Window* pWindow,
if ( pW->mpWindowImpl->mpRealParent )
pW = pW->mpWindowImpl->mpRealParent;
- Rectangle normRect( rRect ); // rRect is already relative to top-level window
+ tools::Rectangle normRect( rRect ); // rRect is already relative to top-level window
normRect.SetPos( pW->ScreenToOutputPixel( normRect.TopLeft() ) );
bool bRTL = AllSettings::GetLayoutRTL();
- Rectangle devRect( pW->OutputToAbsoluteScreenPixel( normRect.TopLeft() ),
+ tools::Rectangle devRect( pW->OutputToAbsoluteScreenPixel( normRect.TopLeft() ),
pW->OutputToAbsoluteScreenPixel( normRect.BottomRight() ) );
- Rectangle devRectRTL( devRect );
+ tools::Rectangle devRectRTL( devRect );
if( bRTL )
// create a rect that can be compared to desktop coordinates
devRectRTL = pW->ImplOutputToUnmirroredAbsoluteScreenPixel( normRect );
@@ -431,7 +431,7 @@ Point FloatingWindow::ImplCalcPos( vcl::Window* pWindow,
if( pFloatingWindow )
{
pFloatingWindow->mpImplData->maItemEdgeClipRect =
- Rectangle( e1, e2 );
+ tools::Rectangle( e1, e2 );
}
// caller expects coordinates relative to top-level win
@@ -451,7 +451,7 @@ Point FloatingWindow::ImplConvertToAbsPos(vcl::Window* pReference, const Point&
// --- RTL --- re-mirror back to get device coordinates
pWindowOutDev->ReMirror( aAbsolute );
- Rectangle aRect( pReference->ScreenToOutputPixel(aAbsolute), Size(1,1) ) ;
+ tools::Rectangle aRect( pReference->ScreenToOutputPixel(aAbsolute), Size(1,1) ) ;
aRect = pReference->ImplOutputToUnmirroredAbsoluteScreenPixel( aRect );
aAbsolute = aRect.TopLeft();
}
@@ -462,9 +462,9 @@ Point FloatingWindow::ImplConvertToAbsPos(vcl::Window* pReference, const Point&
return aAbsolute;
}
-Rectangle FloatingWindow::ImplConvertToAbsPos(vcl::Window* pReference, const Rectangle& rRect)
+tools::Rectangle FloatingWindow::ImplConvertToAbsPos(vcl::Window* pReference, const tools::Rectangle& rRect)
{
- Rectangle aFloatRect = rRect;
+ tools::Rectangle aFloatRect = rRect;
const OutputDevice *pParentWinOutDev = pReference->GetOutDev();
@@ -498,7 +498,7 @@ FloatingWindow* FloatingWindow::ImplFloatHitTest( vcl::Window* pReference, const
vcl::Window *pBorderWin = pWin->GetWindow( GetWindowType::Border );
Point aPt; // the top-left corner in output coordinates ie (0,0)
- Rectangle devRect( pBorderWin->ImplOutputToUnmirroredAbsoluteScreenPixel( Rectangle( aPt, pBorderWin->GetSizePixel()) ) ) ;
+ tools::Rectangle devRect( pBorderWin->ImplOutputToUnmirroredAbsoluteScreenPixel( tools::Rectangle( aPt, pBorderWin->GetSizePixel()) ) ) ;
if ( devRect.IsInside( aAbsolute ) )
{
rHitTest = HITTEST_WINDOW;
@@ -651,7 +651,7 @@ void FloatingWindow::SetTitleType( FloatWinTitleType nTitle )
}
}
-void FloatingWindow::StartPopupMode( const Rectangle& rRect, FloatWinPopupFlags nFlags )
+void FloatingWindow::StartPopupMode( const tools::Rectangle& rRect, FloatWinPopupFlags nFlags )
{
if ( IsRollUp() )
RollDown();
@@ -717,7 +717,7 @@ void FloatingWindow::StartPopupMode( ToolBox* pBox, FloatWinPopupFlags nFlags )
pBox->ImplFloatControl( true, this );
// retrieve some data from the ToolBox
- Rectangle aRect = nItemId ? pBox->GetItemRect( nItemId ) : pBox->GetOverflowRect();
+ tools::Rectangle aRect = nItemId ? pBox->GetItemRect( nItemId ) : pBox->GetOverflowRect();
Point aPos;
// convert to parent's screen coordinates
aPos = GetParent()->OutputToScreenPixel( GetParent()->AbsoluteScreenToOutputPixel( pBox->OutputToAbsoluteScreenPixel( aRect.TopLeft() ) ) );
diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx
index 785ec06f13bb..d5a61d4e42f0 100644
--- a/vcl/source/window/layout.cxx
+++ b/vcl/source/window/layout.cxx
@@ -2585,7 +2585,7 @@ void VclVPaned::arrange(const Size& rAllocation, long nFirstHeight, long nSecond
void VclVPaned::setAllocation(const Size& rAllocation)
{
//supporting "shrink" could be done by adjusting the allowed drag rectangle
- m_pSplitter->SetDragRectPixel(Rectangle(Point(0, 0), rAllocation));
+ m_pSplitter->SetDragRectPixel(tools::Rectangle(Point(0, 0), rAllocation));
Size aSplitterSize(rAllocation.Width(), getLayoutRequisition(*m_pSplitter).Height());
const long nHeight = rAllocation.Height() - aSplitterSize.Height();
@@ -2646,7 +2646,7 @@ Size VclVPaned::calculateRequisition() const
Size getLegacyBestSizeForChildren(const vcl::Window &rWindow)
{
- Rectangle aBounds;
+ tools::Rectangle aBounds;
for (const vcl::Window* pChild = rWindow.GetWindow(GetWindowType::FirstChild); pChild;
pChild = pChild->GetWindow(GetWindowType::Next))
@@ -2654,7 +2654,7 @@ Size getLegacyBestSizeForChildren(const vcl::Window &rWindow)
if (!pChild->IsVisible())
continue;
- Rectangle aChildBounds(pChild->GetPosPixel(), pChild->GetSizePixel());
+ tools::Rectangle aChildBounds(pChild->GetPosPixel(), pChild->GetSizePixel());
aBounds.Union(aChildBounds);
}
diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx
index 76a64324ae8b..cda664076440 100644
--- a/vcl/source/window/menu.cxx
+++ b/vcl/source/window/menu.cxx
@@ -77,7 +77,7 @@ struct MenuLayoutData : public ControlLayoutData
{
std::vector< sal_uInt16 > m_aLineItemIds;
std::vector< sal_uInt16 > m_aLineItemPositions;
- std::map< sal_uInt16, Rectangle > m_aVisibleItemBoundRects;
+ std::map< sal_uInt16, tools::Rectangle > m_aVisibleItemBoundRects;
};
}
@@ -981,7 +981,7 @@ void Menu::EnableItem( sal_uInt16 nItemId, bool bEnable )
MenuItemData* pData = pItemList->GetDataFromPos( n );
if ( n == nPos )
{
- pWin->Invalidate( Rectangle( Point( nX, 0 ), Size( pData->aSz.Width(), pData->aSz.Height() ) ) );
+ pWin->Invalidate( tools::Rectangle( Point( nX, 0 ), Size( pData->aSz.Width(), pData->aSz.Height() ) ) );
break;
}
nX += pData->aSz.Width();
@@ -1368,10 +1368,10 @@ Size Menu::ImplGetNativeCheckAndRadioSize(vcl::RenderContext& rRenderContext, lo
if (!IsMenuBar())
{
ImplControlValue aVal;
- Rectangle aNativeBounds;
- Rectangle aNativeContent;
+ tools::Rectangle aNativeBounds;
+ tools::Rectangle aNativeContent;
- Rectangle aCtrlRegion(Rectangle(Point(), Size(100, 15)));
+ tools::Rectangle aCtrlRegion(tools::Rectangle(Point(), Size(100, 15)));
if (rRenderContext.IsNativeControlSupported(ControlType::MenuPopup, ControlPart::MenuItemCheckMark))
{
if (rRenderContext.GetNativeControlRegion(ControlType::MenuPopup, ControlPart::MenuItemCheckMark,
@@ -1399,9 +1399,9 @@ Size Menu::ImplGetNativeCheckAndRadioSize(vcl::RenderContext& rRenderContext, lo
bool Menu::ImplGetNativeSubmenuArrowSize(vcl::RenderContext& rRenderContext, Size& rArrowSize, long& rArrowSpacing)
{
ImplControlValue aVal;
- Rectangle aNativeBounds;
- Rectangle aNativeContent;
- Rectangle aCtrlRegion(Rectangle(Point(), Size(100, 15)));
+ tools::Rectangle aNativeBounds;
+ tools::Rectangle aNativeContent;
+ tools::Rectangle aCtrlRegion(tools::Rectangle(Point(), Size(100, 15)));
if (rRenderContext.IsNativeControlSupported(ControlType::MenuPopup, ControlPart::SubmenuArrow))
{
if (rRenderContext.GetNativeControlRegion(ControlType::MenuPopup, ControlPart::SubmenuArrow,
@@ -1592,7 +1592,7 @@ Size Menu::ImplCalcSize( vcl::Window* pWin )
pWin->SetFont(aFont);
// Compute text bounding box
- Rectangle aTextBoundRect;
+ tools::Rectangle aTextBoundRect;
pWin->GetTextBoundRect(aTextBoundRect, aTitleText);
// Vertically, one height of char + extra space for decoration
@@ -1612,7 +1612,7 @@ Size Menu::ImplCalcSize( vcl::Window* pWin )
// TODO: move GetScreenNumber from SystemWindow to Window ?
// currently we rely on internal privileges
unsigned int nDisplayScreen = pWin->ImplGetWindowImpl()->mpFrame->maGeometry.nDisplayScreenNumber;
- Rectangle aDispRect( Application::GetScreenPosSizePixel( nDisplayScreen ) );
+ tools::Rectangle aDispRect( Application::GetScreenPosSizePixel( nDisplayScreen ) );
long nScreenWidth = aDispRect.GetWidth() >= 800 ? aDispRect.GetWidth() : 800;
if( nMaxWidth > nScreenWidth/2 )
nMaxWidth = nScreenWidth/2;
@@ -1643,10 +1643,10 @@ Size Menu::ImplCalcSize( vcl::Window* pWin )
if( pWindow->IsNativeControlSupported( ControlType::Menubar, ControlPart::Entire ) )
{
ImplControlValue aVal;
- Rectangle aNativeBounds;
- Rectangle aNativeContent;
+ tools::Rectangle aNativeBounds;
+ tools::Rectangle aNativeContent;
Point tmp( 0, 0 );
- Rectangle aCtrlRegion( tmp, Size( 100, 15 ) );
+ tools::Rectangle aCtrlRegion( tmp, Size( 100, 15 ) );
if( pWindow->GetNativeControlRegion( ControlType::Menubar,
ControlPart::Entire,
aCtrlRegion,
@@ -1676,13 +1676,13 @@ Size Menu::ImplCalcSize( vcl::Window* pWin )
return aSz;
}
-static void ImplPaintCheckBackground(vcl::RenderContext& rRenderContext, vcl::Window& rWindow, const Rectangle& i_rRect, bool i_bHighlight)
+static void ImplPaintCheckBackground(vcl::RenderContext& rRenderContext, vcl::Window& rWindow, const tools::Rectangle& i_rRect, bool i_bHighlight)
{
bool bNativeOk = false;
if (rRenderContext.IsNativeControlSupported(ControlType::Toolbar, ControlPart::Button))
{
ImplControlValue aControlValue;
- Rectangle aCtrlRegion( i_rRect );
+ tools::Rectangle aCtrlRegion( i_rRect );
ControlState nState = ControlState::PRESSED | ControlState::ENABLED;
aControlValue.setTristateVal(ButtonValue::On);
@@ -1720,7 +1720,7 @@ static OUString getShortenedString( const OUString& i_rLong, vcl::RenderContext&
return aNonMnem;
}
-void Menu::ImplPaintMenuTitle(vcl::RenderContext& rRenderContext, const Rectangle& rRect ) const
+void Menu::ImplPaintMenuTitle(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect ) const
{
// Save previous graphical settings, set new one
rRenderContext.Push(PushFlags::FONT | PushFlags::FILLCOLOR);
@@ -1734,7 +1734,7 @@ void Menu::ImplPaintMenuTitle(vcl::RenderContext& rRenderContext, const Rectangl
rRenderContext.SetFont(aFont);
// Draw background rectangle
- Rectangle aBgRect(rRect);
+ tools::Rectangle aBgRect(rRect);
int nOuterSpaceX = ImplGetSVData()->maNWFData.mnMenuFormatBorderX;
aBgRect.setX(aBgRect.getX() + SPACE_AROUND_TITLE);
aBgRect.setWidth(aBgRect.getWidth() - 2 * SPACE_AROUND_TITLE - 2 * nOuterSpaceX);
@@ -1744,7 +1744,7 @@ void Menu::ImplPaintMenuTitle(vcl::RenderContext& rRenderContext, const Rectangl
// Draw the text centered
Point aTextTopLeft(aBgRect.TopLeft());
- Rectangle aTextBoundRect;
+ tools::Rectangle aTextBoundRect;
rRenderContext.GetTextBoundRect( aTextBoundRect, aTitleText );
aTextTopLeft.X() += (aBgRect.getWidth() - aTextBoundRect.GetSize().Width()) / 2;
aTextTopLeft.Y() += (aBgRect.GetHeight() - aTextBoundRect.GetSize().Height()) / 2
@@ -1792,7 +1792,7 @@ void Menu::ImplPaint(vcl::RenderContext& rRenderContext,
// Paint title
if (!pThisItemOnly && !IsMenuBar() && nTitleHeight > 0)
- ImplPaintMenuTitle(rRenderContext, Rectangle(aTopLeft, aOutSz));
+ ImplPaintMenuTitle(rRenderContext, tools::Rectangle(aTopLeft, aOutSz));
for (size_t n = 0; n < nCount; n++)
{
@@ -1864,7 +1864,7 @@ void Menu::ImplPaint(vcl::RenderContext& rRenderContext,
aMpos.X() += nSepPad;
Size aSz(pData->aSz);
aSz.Width() = aOutSz.Width() - 2*nOuterSpaceX - 2 * nSepPad;
- Rectangle aItemRect(aMpos, aSz);
+ tools::Rectangle aItemRect(aMpos, aSz);
MenupopupValue aVal(nTextPos - GUTTERBORDER, aItemRect);
bNativeOk = rRenderContext.DrawNativeControl(ControlType::MenuPopup, ControlPart::Separator,
aItemRect, nState, aVal, OUString());
@@ -1882,7 +1882,7 @@ void Menu::ImplPaint(vcl::RenderContext& rRenderContext,
}
}
- Rectangle aOuterCheckRect(Point(aPos.X()+nImgOrChkPos, aPos.Y()),
+ tools::Rectangle aOuterCheckRect(Point(aPos.X()+nImgOrChkPos, aPos.Y()),
Size(pData->aSz.Height(), pData->aSz.Height()));
aOuterCheckRect.Left() += 1;
aOuterCheckRect.Right() -= 1;
@@ -1924,10 +1924,10 @@ void Menu::ImplPaint(vcl::RenderContext& rRenderContext,
aTmpPos.X() = aOuterCheckRect.Left() + (aOuterCheckRect.GetWidth() - nCtrlHeight) / 2;
aTmpPos.Y() = aOuterCheckRect.Top() + (aOuterCheckRect.GetHeight() - nCtrlHeight) / 2;
- Rectangle aCheckRect(aTmpPos, Size(nCtrlHeight, nCtrlHeight));
+ tools::Rectangle aCheckRect(aTmpPos, Size(nCtrlHeight, nCtrlHeight));
Size aSz(pData->aSz);
aSz.Width() = aOutSz.Width() - 2 * nOuterSpaceX;
- Rectangle aItemRect(aPos, aSz);
+ tools::Rectangle aItemRect(aPos, aSz);
MenupopupValue aVal(nTextPos - GUTTERBORDER, aItemRect);
rRenderContext.DrawNativeControl(ControlType::MenuPopup, nPart, aCheckRect,
nState, aVal, OUString());
@@ -1950,7 +1950,7 @@ void Menu::ImplPaint(vcl::RenderContext& rRenderContext,
}
aTmpPos.X() = aOuterCheckRect.Left() + (aOuterCheckRect.GetWidth() - aSymbolSize.Width()) / 2;
aTmpPos.Y() = aOuterCheckRect.Top() + (aOuterCheckRect.GetHeight() - aSymbolSize.Height()) / 2;
- Rectangle aRect(aTmpPos, aSymbolSize);
+ tools::Rectangle aRect(aTmpPos, aSymbolSize);
aDecoView.DrawSymbol(aRect, eSymbol, rRenderContext.GetTextColor(), nSymbolStyle);
}
}
@@ -2063,7 +2063,7 @@ void Menu::ImplPaint(vcl::RenderContext& rRenderContext,
aTmpPos.Y() = aPos.Y() + ( pData->aSz.Height() - aTmpSz.Height() ) / 2;
aTmpPos.Y() += nExtra / 2;
- Rectangle aItemRect(aTmpPos, aTmpSz);
+ tools::Rectangle aItemRect(aTmpPos, aTmpSz);
MenupopupValue aVal(nTextPos - GUTTERBORDER, aItemRect);
bNativeOk = rRenderContext.DrawNativeControl(ControlType::MenuPopup, ControlPart::SubmenuArrow,
aItemRect, nState, aVal, OUString());
@@ -2079,11 +2079,11 @@ void Menu::ImplPaint(vcl::RenderContext& rRenderContext,
rRenderContext.SetTextColor(rSettings.GetMenuTextColor());
Point aTmpPos2(aPos);
aTmpPos2.X() = aOutSz.Width() - nFontHeight - nFontHeight/4;
- aDecoView.DrawFrame(Rectangle(aTmpPos2, Size(nFontHeight + nFontHeight / 4,
+ aDecoView.DrawFrame(tools::Rectangle(aTmpPos2, Size(nFontHeight + nFontHeight / 4,
pData->aSz.Height())),
DrawFrameStyle::Group);
}
- aDecoView.DrawSymbol(Rectangle(aTmpPos, Size(nFontHeight / 2, nFontHeight / 2)),
+ aDecoView.DrawSymbol(tools::Rectangle(aTmpPos, Size(nFontHeight / 2, nFontHeight / 2)),
SymbolType::SPIN_RIGHT, rRenderContext.GetTextColor(), nSymbolStyle);
}
}
@@ -2101,9 +2101,9 @@ void Menu::ImplPaint(vcl::RenderContext& rRenderContext,
if( bLayout )
{
if (!IsMenuBar())
- mpLayoutData->m_aVisibleItemBoundRects[ n ] = Rectangle(aTopLeft, Size(aOutSz.Width(), pData->aSz.Height()));
+ mpLayoutData->m_aVisibleItemBoundRects[ n ] = tools::Rectangle(aTopLeft, Size(aOutSz.Width(), pData->aSz.Height()));
else
- mpLayoutData->m_aVisibleItemBoundRects[ n ] = Rectangle(aTopLeft, pData->aSz);
+ mpLayoutData->m_aVisibleItemBoundRects[ n ] = tools::Rectangle(aTopLeft, pData->aSz);
}
}
@@ -2117,7 +2117,7 @@ void Menu::ImplPaint(vcl::RenderContext& rRenderContext,
{
Size aLogoSz = pLogo->aBitmap.GetSizePixel();
- Rectangle aRect(Point(), Point(aLogoSz.Width() - 1, aOutSz.Height()));
+ tools::Rectangle aRect(Point(), Point(aLogoSz.Width() - 1, aOutSz.Height()));
if (rRenderContext.GetColorCount() >= 256)
{
Gradient aGrad(GradientStyle::Linear, pLogo->aStartColor, pLogo->aEndColor);
@@ -2283,7 +2283,7 @@ void Menu::ImplFillLayoutData() const
}
}
-Rectangle Menu::GetCharacterBounds( sal_uInt16 nItemID, long nIndex ) const
+tools::Rectangle Menu::GetCharacterBounds( sal_uInt16 nItemID, long nIndex ) const
{
long nItemIndex = -1;
if( ! mpLayoutData )
@@ -2299,7 +2299,7 @@ Rectangle Menu::GetCharacterBounds( sal_uInt16 nItemID, long nIndex ) const
}
}
}
- return (mpLayoutData && nItemIndex != -1) ? mpLayoutData->GetCharacterBounds( nItemIndex+nIndex ) : Rectangle();
+ return (mpLayoutData && nItemIndex != -1) ? mpLayoutData->GetCharacterBounds( nItemIndex+nIndex ) : tools::Rectangle();
}
long Menu::GetIndexForPoint( const Point& rPoint, sal_uInt16& rItemID ) const
@@ -2326,15 +2326,15 @@ long Menu::GetIndexForPoint( const Point& rPoint, sal_uInt16& rItemID ) const
return nIndex;
}
-Rectangle Menu::GetBoundingRectangle( sal_uInt16 nPos ) const
+tools::Rectangle Menu::GetBoundingRectangle( sal_uInt16 nPos ) const
{
- Rectangle aRet;
+ tools::Rectangle aRet;
if (!mpLayoutData )
ImplFillLayoutData();
if (mpLayoutData)
{
- std::map< sal_uInt16, Rectangle >::const_iterator it = mpLayoutData->m_aVisibleItemBoundRects.find( nPos );
+ std::map< sal_uInt16, tools::Rectangle >::const_iterator it = mpLayoutData->m_aVisibleItemBoundRects.find( nPos );
if( it != mpLayoutData->m_aVisibleItemBoundRects.end() )
aRet = it->second;
}
@@ -2707,10 +2707,10 @@ void MenuBar::RemoveMenuBarButton( sal_uInt16 nId )
pMenuWin->RemoveMenuBarButton(nId);
}
-Rectangle MenuBar::GetMenuBarButtonRectPixel( sal_uInt16 nId )
+tools::Rectangle MenuBar::GetMenuBarButtonRectPixel( sal_uInt16 nId )
{
MenuBarWindow* pMenuWin = getMenuBarWindow();
- return pMenuWin ? pMenuWin->GetMenuBarButtonRectPixel(nId) : Rectangle();
+ return pMenuWin ? pMenuWin->GetMenuBarButtonRectPixel(nId) : tools::Rectangle();
}
bool MenuBar::HandleMenuButtonEvent( Menu *, sal_uInt16 i_nButtonId )
@@ -2845,10 +2845,10 @@ void PopupMenu::SetSelectedEntry( sal_uInt16 nId )
sal_uInt16 PopupMenu::Execute( vcl::Window* pExecWindow, const Point& rPopupPos )
{
- return Execute( pExecWindow, Rectangle( rPopupPos, rPopupPos ), PopupMenuFlags::ExecuteDown );
+ return Execute( pExecWindow, tools::Rectangle( rPopupPos, rPopupPos ), PopupMenuFlags::ExecuteDown );
}
-sal_uInt16 PopupMenu::Execute( vcl::Window* pExecWindow, const Rectangle& rRect, PopupMenuFlags nFlags )
+sal_uInt16 PopupMenu::Execute( vcl::Window* pExecWindow, const tools::Rectangle& rRect, PopupMenuFlags nFlags )
{
ENSURE_OR_RETURN( pExecWindow, "PopupMenu::Execute: need a non-NULL window!", 0 );
@@ -2886,7 +2886,7 @@ void PopupMenu::ImplFlushPendingSelect()
}
}
-sal_uInt16 PopupMenu::ImplExecute( const VclPtr<vcl::Window>& pW, const Rectangle& rRect, FloatWinPopupFlags nPopupModeFlags, Menu* pSFrom, bool bPreSelectFirst )
+sal_uInt16 PopupMenu::ImplExecute( const VclPtr<vcl::Window>& pW, const tools::Rectangle& rRect, FloatWinPopupFlags nPopupModeFlags, Menu* pSFrom, bool bPreSelectFirst )
{
if ( !pSFrom && ( PopupMenu::IsInExecute() || !GetItemCount() ) )
return 0;
@@ -2920,7 +2920,7 @@ sal_uInt16 PopupMenu::ImplExecute( const VclPtr<vcl::Window>& pW, const Rectangl
}
SAL_WARN_IF( ImplGetWindow(), "vcl", "Win?!" );
- Rectangle aRect( rRect );
+ tools::Rectangle aRect( rRect );
aRect.SetPos( pW->OutputToScreenPixel( aRect.TopLeft() ) );
WinBits nStyle = WB_BORDER;
@@ -2986,7 +2986,7 @@ sal_uInt16 PopupMenu::ImplExecute( const VclPtr<vcl::Window>& pW, const Rectangl
Size aSz = ImplCalcSize( pWin );
- Rectangle aDesktopRect(pWin->GetDesktopRectPixel());
+ tools::Rectangle aDesktopRect(pWin->GetDesktopRectPixel());
if( Application::GetScreenCount() > 1 && Application::IsUnifiedDisplay() )
{
vcl::Window* pDeskW = pWindow->GetWindow( GetWindowType::RealParent );
@@ -2994,7 +2994,7 @@ sal_uInt16 PopupMenu::ImplExecute( const VclPtr<vcl::Window>& pW, const Rectangl
pDeskW = pWindow;
Point aDesktopTL( pDeskW->OutputToAbsoluteScreenPixel( aRect.TopLeft() ) );
aDesktopRect = Application::GetScreenPosSizePixel(
- Application::GetBestScreen( Rectangle( aDesktopTL, aRect.GetSize() ) ));
+ Application::GetBestScreen( tools::Rectangle( aDesktopTL, aRect.GetSize() ) ));
}
long nMaxHeight = aDesktopRect.GetHeight();
@@ -3009,7 +3009,7 @@ sal_uInt16 PopupMenu::ImplExecute( const VclPtr<vcl::Window>& pW, const Rectangl
if ( pRef->GetParent() )
pRef = pRef->GetParent();
- Rectangle devRect( pRef->OutputToAbsoluteScreenPixel( aRect.TopLeft() ),
+ tools::Rectangle devRect( pRef->OutputToAbsoluteScreenPixel( aRect.TopLeft() ),
pRef->OutputToAbsoluteScreenPixel( aRect.BottomRight() ) );
long nHeightAbove = devRect.Top() - aDesktopRect.Top();
diff --git a/vcl/source/window/menubarwindow.cxx b/vcl/source/window/menubarwindow.cxx
index 876edcdc51d7..e1f50c0b5632 100644
--- a/vcl/source/window/menubarwindow.cxx
+++ b/vcl/source/window/menubarwindow.cxx
@@ -102,8 +102,8 @@ void DecoToolBox::SetImages( long nMaxHeight, bool bForce )
aBmpExDst.Erase( aEraseColor );
aBmpExDst.SetSizePixel( Size( lastSize, lastSize ) );
- Rectangle aSrcRect( Point(0,0), maImage.GetSizePixel() );
- Rectangle aDestRect( Point((lastSize - maImage.GetSizePixel().Width())/2,
+ tools::Rectangle aSrcRect( Point(0,0), maImage.GetSizePixel() );
+ tools::Rectangle aDestRect( Point((lastSize - maImage.GetSizePixel().Width())/2,
(lastSize - maImage.GetSizePixel().Height())/2 ),
maImage.GetSizePixel() );
@@ -320,7 +320,7 @@ void MenuBarWindow::ImplCreatePopup( bool bPreSelectFirst )
// #99071# do not grab the focus, otherwise it will be restored to the menubar
// when the frame is reactivated later
//GrabFocus();
- pActivePopup->ImplExecute( this, Rectangle( aItemTopLeft, aItemBottomRight ), FloatWinPopupFlags::Down | FloatWinPopupFlags::NoHorzPlacement, pMenu, bPreSelectFirst );
+ pActivePopup->ImplExecute( this, tools::Rectangle( aItemTopLeft, aItemBottomRight ), FloatWinPopupFlags::Down | FloatWinPopupFlags::NoHorzPlacement, pMenu, bPreSelectFirst );
// does not have a window, if aborted before or if there are no entries
if ( pActivePopup->ImplGetFloatingWindow() )
pActivePopup->ImplGetFloatingWindow()->AddPopupModeWindow( this );
@@ -569,7 +569,7 @@ static void ImplAddNWFSeparator(vcl::RenderContext& rRenderContext, const Size&
rRenderContext.SetLineColor(rRenderContext.GetSettings().GetStyleSettings().GetSeparatorColor());
Point aPt;
- Rectangle aRect(aPt, rSize);
+ tools::Rectangle aRect(aPt, rSize);
rRenderContext.DrawLine(aRect.BottomLeft(), aRect.BottomRight());
}
}
@@ -589,7 +589,7 @@ void MenuBarWindow::HighlightItem(vcl::RenderContext& rRenderContext, sal_uInt16
if (pData->eType != MenuItemType::SEPARATOR)
{
// #107747# give menuitems the height of the menubar
- Rectangle aRect = Rectangle(Point(nX, 1), Size(pData->aSz.Width(), GetOutputSizePixel().Height() - 2));
+ tools::Rectangle aRect = tools::Rectangle(Point(nX, 1), Size(pData->aSz.Width(), GetOutputSizePixel().Height() - 2));
rRenderContext.Push(PushFlags::CLIPREGION);
rRenderContext.IntersectClipRegion(aRect);
bool bRollover, bHighlight;
@@ -614,7 +614,7 @@ void MenuBarWindow::HighlightItem(vcl::RenderContext& rRenderContext, sal_uInt16
Erase(rRenderContext);
else
{
- Rectangle aBgRegion(Point(), GetOutputSizePixel());
+ tools::Rectangle aBgRegion(Point(), GetOutputSizePixel());
rRenderContext.DrawNativeControl(ControlType::Menubar, ControlPart::Entire, aBgRegion,
ControlState::ENABLED, aControlValue, OUString());
}
@@ -649,9 +649,9 @@ void MenuBarWindow::HighlightItem(vcl::RenderContext& rRenderContext, sal_uInt16
}
}
-Rectangle MenuBarWindow::ImplGetItemRect( sal_uInt16 nPos )
+tools::Rectangle MenuBarWindow::ImplGetItemRect( sal_uInt16 nPos )
{
- Rectangle aRect;
+ tools::Rectangle aRect;
if( pMenu )
{
long nX = 0;
@@ -663,7 +663,7 @@ Rectangle MenuBarWindow::ImplGetItemRect( sal_uInt16 nPos )
{
if ( pData->eType != MenuItemType::SEPARATOR )
// #107747# give menuitems the height of the menubar
- aRect = Rectangle( Point( nX, 1 ), Size( pData->aSz.Width(), GetOutputSizePixel().Height()-2 ) );
+ aRect = tools::Rectangle( Point( nX, 1 ), Size( pData->aSz.Width(), GetOutputSizePixel().Height()-2 ) );
break;
}
@@ -848,7 +848,7 @@ bool MenuBarWindow::HandleKeyEvent( const KeyEvent& rKEvent, bool bFromMenu )
return bDone;
}
-void MenuBarWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangle&)
+void MenuBarWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&)
{
if (!pMenu)
return;
@@ -872,7 +872,7 @@ void MenuBarWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangle&)
else
{
Point aPt;
- Rectangle aCtrlRegion( aPt, GetOutputSizePixel() );
+ tools::Rectangle aCtrlRegion( aPt, GetOutputSizePixel() );
rRenderContext.DrawNativeControl(ControlType::Menubar, ControlPart::Entire, aCtrlRegion,
ControlState::ENABLED, aMenubarValue, OUString());
@@ -963,7 +963,7 @@ void MenuBarWindow::RequestHelp( const HelpEvent& rHEvt )
if ( rHEvt.GetMode() & (HelpEventMode::CONTEXT | HelpEventMode::EXTENDED) )
ChangeHighlightItem( ITEMPOS_INVALID, true );
- Rectangle aHighlightRect( ImplGetItemRect( nHighlightedItem ) );
+ tools::Rectangle aHighlightRect( ImplGetItemRect( nHighlightedItem ) );
if( !ImplHandleHelpEvent( this, pMenu, nId, rHEvt, aHighlightRect ) )
Window::RequestHelp( rHEvt );
}
@@ -1143,18 +1143,18 @@ void MenuBarWindow::SetMenuBarButtonHighlightHdl( sal_uInt16 nId, const Link<Men
it->second.m_aHighlightLink = rLink;
}
-Rectangle MenuBarWindow::GetMenuBarButtonRectPixel( sal_uInt16 nId )
+tools::Rectangle MenuBarWindow::GetMenuBarButtonRectPixel( sal_uInt16 nId )
{
- Rectangle aRect;
+ tools::Rectangle aRect;
if( m_aAddButtons.find( nId ) != m_aAddButtons.end() )
{
if( pMenu->mpSalMenu )
{
aRect = pMenu->mpSalMenu->GetMenuBarButtonRectPixel( nId, ImplGetWindowImpl()->mpFrame );
- if( aRect == Rectangle( Point( -1, -1 ), Size( 1, 1 ) ) )
+ if( aRect == tools::Rectangle( Point( -1, -1 ), Size( 1, 1 ) ) )
{
// system menu button is somewhere but location cannot be determined
- return Rectangle();
+ return tools::Rectangle();
}
}
diff --git a/vcl/source/window/menubarwindow.hxx b/vcl/source/window/menubarwindow.hxx
index 86f0192785ec..e1e3d36cb8b9 100644
--- a/vcl/source/window/menubarwindow.hxx
+++ b/vcl/source/window/menubarwindow.hxx
@@ -92,7 +92,7 @@ private:
sal_uInt16 ImplFindEntry( const Point& rMousePos ) const;
void ImplCreatePopup( bool bPreSelectFirst );
bool HandleKeyEvent(const KeyEvent& rKEvent, bool bFromMenu = true);
- Rectangle ImplGetItemRect( sal_uInt16 nPos );
+ tools::Rectangle ImplGetItemRect( sal_uInt16 nPos );
void ImplInitStyleSettings();
@@ -118,7 +118,7 @@ public:
virtual void MouseButtonDown( const MouseEvent& rMEvt ) override;
virtual void MouseButtonUp( const MouseEvent& rMEvt ) override;
virtual void KeyInput( const KeyEvent& rKEvent ) 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 RequestHelp( const HelpEvent& rHEvt ) override;
@@ -136,7 +136,7 @@ public:
/// Add an arbitrary button to the menubar that will appear next to the close button.
sal_uInt16 AddMenuBarButton(const Image&, const Link<MenuBar::MenuBarButtonCallbackArg&,bool>&, const OUString&);
void SetMenuBarButtonHighlightHdl(sal_uInt16 nId, const Link<MenuBar::MenuBarButtonCallbackArg&,bool>&);
- Rectangle GetMenuBarButtonRectPixel(sal_uInt16 nId);
+ tools::Rectangle GetMenuBarButtonRectPixel(sal_uInt16 nId);
void RemoveMenuBarButton(sal_uInt16 nId);
bool HandleMenuButtonEvent(sal_uInt16 i_nButtonId);
void SetMBWHideAccel(bool val) { mbHideAccel = val; }
diff --git a/vcl/source/window/menufloatingwindow.cxx b/vcl/source/window/menufloatingwindow.cxx
index 67d430cd9e3d..2c27e57ec775 100644
--- a/vcl/source/window/menufloatingwindow.cxx
+++ b/vcl/source/window/menufloatingwindow.cxx
@@ -98,7 +98,7 @@ void MenuFloatingWindow::doShutdown()
// so this can be taken into account if the commandhandler performs a scroll operation
if( GetParent() )
{
- Rectangle aInvRect( GetWindowExtentsRelative( GetParent() ) );
+ tools::Rectangle aInvRect( GetWindowExtentsRelative( GetParent() ) );
GetParent()->Invalidate( aInvRect );
}
pMenu = nullptr;
@@ -168,7 +168,7 @@ vcl::Region MenuFloatingWindow::ImplCalcClipRegion( bool bIncludeLogo ) const
{
Size aOutSz = GetOutputSizePixel();
Point aPos;
- Rectangle aRect( aPos, aOutSz );
+ tools::Rectangle aRect( aPos, aOutSz );
aRect.Top() += nScrollerHeight;
aRect.Bottom() -= nScrollerHeight;
@@ -177,7 +177,7 @@ vcl::Region MenuFloatingWindow::ImplCalcClipRegion( bool bIncludeLogo ) const
vcl::Region aRegion(aRect);
if ( pMenu && pMenu->pLogo && bIncludeLogo && nScrollerHeight )
- aRegion.Union( Rectangle( Point(), Size( pMenu->pLogo->aBitmap.GetSizePixel().Width(), aOutSz.Height() ) ) );
+ aRegion.Union( tools::Rectangle( Point(), Size( pMenu->pLogo->aBitmap.GetSizePixel().Width(), aOutSz.Height() ) ) );
return aRegion;
}
@@ -354,7 +354,7 @@ IMPL_LINK( MenuFloatingWindow, HighlightChanged, Timer*, pTimer, void )
Menu* pTest = pActivePopup;
FloatWinPopupFlags nOldFlags = GetPopupModeFlags();
SetPopupModeFlags( GetPopupModeFlags() | FloatWinPopupFlags::NoAppFocusClose );
- sal_uInt16 nRet = pActivePopup->ImplExecute( this, Rectangle( aItemTopLeft, aItemBottomRight ), FloatWinPopupFlags::Right, pMenu, pTimer == nullptr );
+ sal_uInt16 nRet = pActivePopup->ImplExecute( this, tools::Rectangle( aItemTopLeft, aItemBottomRight ), FloatWinPopupFlags::Right, pMenu, pTimer == nullptr );
SetPopupModeFlags( nOldFlags );
// nRet != 0, wenn es waerend Activate() abgeschossen wurde...
@@ -780,7 +780,7 @@ void MenuFloatingWindow::InvalidateItem(sal_uInt16 nPos)
if (n == nPos)
{
Size aWidth( GetSizePixel() );
- Rectangle aRect(Point(0, nY), Size(aWidth.Width(), nHeight));
+ tools::Rectangle aRect(Point(0, nY), Size(aWidth.Width(), nHeight));
Invalidate( aRect );
}
nY += nHeight;
@@ -816,7 +816,7 @@ void MenuFloatingWindow::RenderHighlightItem(vcl::RenderContext& rRenderContext,
Color oldLineColor;
bool bDrawItemRect = true;
- Rectangle aItemRect(Point(nX + nOuterSpaceX, nY), Size(aSz.Width() - 2 * nOuterSpaceX, pData->aSz.Height()));
+ tools::Rectangle aItemRect(Point(nX + nOuterSpaceX, nY), Size(aSz.Width() - 2 * nOuterSpaceX, pData->aSz.Height()));
if (pData->nBits & MenuItemBits::POPUPSELECT)
{
long nFontHeight = GetTextHeight();
@@ -827,8 +827,8 @@ void MenuFloatingWindow::RenderHighlightItem(vcl::RenderContext& rRenderContext,
{
Size aPxSize(GetOutputSizePixel());
rRenderContext.Push(PushFlags::CLIPREGION);
- rRenderContext.IntersectClipRegion(Rectangle(Point(nX, nY), Size(aSz.Width(), pData->aSz.Height())));
- Rectangle aCtrlRect(Point(nX, 0), Size(aPxSize.Width()-nX, aPxSize.Height()));
+ rRenderContext.IntersectClipRegion(tools::Rectangle(Point(nX, nY), Size(aSz.Width(), pData->aSz.Height())));
+ tools::Rectangle aCtrlRect(Point(nX, 0), Size(aPxSize.Width()-nX, aPxSize.Height()));
MenupopupValue aVal(pMenu->nTextPos-GUTTERBORDER, aItemRect);
rRenderContext.DrawNativeControl(ControlType::MenuPopup, ControlPart::Entire,
aCtrlRect, ControlState::ENABLED, aVal, OUString());
@@ -873,12 +873,12 @@ void MenuFloatingWindow::RenderHighlightItem(vcl::RenderContext& rRenderContext,
}
}
-Rectangle MenuFloatingWindow::ImplGetItemRect( sal_uInt16 nPos )
+tools::Rectangle MenuFloatingWindow::ImplGetItemRect( sal_uInt16 nPos )
{
if( ! pMenu )
- return Rectangle();
+ return tools::Rectangle();
- Rectangle aRect;
+ tools::Rectangle aRect;
Size aSz = GetOutputSizePixel();
long nStartY = ImplGetStartY();
long nY = nScrollerHeight+nStartY;
@@ -896,7 +896,7 @@ Rectangle MenuFloatingWindow::ImplGetItemRect( sal_uInt16 nPos )
SAL_WARN_IF( !pMenu->ImplIsVisible( n ), "vcl", "ImplGetItemRect: Item not visible!" );
if ( pData->eType != MenuItemType::SEPARATOR )
{
- aRect = Rectangle( Point( nX, nY ), Size( aSz.Width(), pData->aSz.Height() ) );
+ aRect = tools::Rectangle( Point( nX, nY ), Size( aSz.Width(), pData->aSz.Height() ) );
if ( pData->nBits & MenuItemBits::POPUPSELECT )
{
long nFontHeight = GetTextHeight();
@@ -1166,7 +1166,7 @@ void MenuFloatingWindow::KeyInput( const KeyEvent& rKEvent )
}
}
-void MenuFloatingWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangle &rPaintRect)
+void MenuFloatingWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle &rPaintRect)
{
if (!pMenu)
return;
@@ -1182,7 +1182,7 @@ void MenuFloatingWindow::Paint(vcl::RenderContext& rRenderContext, const Rectang
aPxSize.Width() -= nX;
ImplControlValue aVal(pMenu->nTextPos - GUTTERBORDER);
rRenderContext.DrawNativeControl(ControlType::MenuPopup, ControlPart::Entire,
- Rectangle(Point(nX, 0), aPxSize),
+ tools::Rectangle(Point(nX, 0), aPxSize),
ControlState::ENABLED, aVal, OUString());
InitMenuClipRegion(rRenderContext);
}
@@ -1209,7 +1209,7 @@ void MenuFloatingWindow::ImplDrawScroller(vcl::RenderContext& rRenderContext, bo
Size aOutSz(GetOutputSizePixel());
long nY = bUp ? 0 : (aOutSz.Height() - nScrollerHeight);
long nX = pMenu->pLogo ? pMenu->pLogo->aBitmap.GetSizePixel().Width() : 0;
- Rectangle aRect(Point(nX, nY), Size(aOutSz.Width() - nX, nScrollerHeight));
+ tools::Rectangle aRect(Point(nX, nY), Size(aOutSz.Width() - nX, nScrollerHeight));
DecorationView aDecoView(&rRenderContext);
SymbolType eSymbol = bUp ? SymbolType::SPIN_UP : SymbolType::SPIN_DOWN;
@@ -1230,7 +1230,7 @@ void MenuFloatingWindow::RequestHelp( const HelpEvent& rHEvt )
vcl::Window* pW = this;
// #102618# Get item rect before destroying the window in EndExecute() call
- Rectangle aHighlightRect( ImplGetItemRect( nHighlightedItem ) );
+ tools::Rectangle aHighlightRect( ImplGetItemRect( nHighlightedItem ) );
if ( rHEvt.GetMode() & (HelpEventMode::CONTEXT | HelpEventMode::EXTENDED) )
{
diff --git a/vcl/source/window/menufloatingwindow.hxx b/vcl/source/window/menufloatingwindow.hxx
index 97d676e2f6bb..d53a92964fe3 100644
--- a/vcl/source/window/menufloatingwindow.hxx
+++ b/vcl/source/window/menufloatingwindow.hxx
@@ -79,7 +79,7 @@ protected:
void ImplCursorUpDown( bool bUp, bool bHomeEnd = false );
void ImplHighlightItem( const MouseEvent& rMEvt, bool bMBDown );
long ImplGetStartY() const;
- Rectangle ImplGetItemRect( sal_uInt16 nPos );
+ tools::Rectangle ImplGetItemRect( sal_uInt16 nPos );
void RenderHighlightItem( vcl::RenderContext& rRenderContext, sal_uInt16 nPos );
long GetInitialItemY( long *pOptStartY = nullptr ) const;
void InvalidateItem( sal_uInt16 nPos );
@@ -96,7 +96,7 @@ public:
virtual void MouseButtonUp(const MouseEvent& rMEvt) override;
virtual void KeyInput(const KeyEvent& rKEvent) override;
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 RequestHelp( const HelpEvent& rHEvt ) override;
virtual void Resize() override;
diff --git a/vcl/source/window/menuwindow.cxx b/vcl/source/window/menuwindow.cxx
index 83ca0b610975..baa81fbbdb99 100644
--- a/vcl/source/window/menuwindow.cxx
+++ b/vcl/source/window/menuwindow.cxx
@@ -38,7 +38,7 @@ static sal_uLong ImplChangeTipTimeout( sal_uLong nTimeout, vcl::Window *pWindow
}
bool MenuWindow::ImplHandleHelpEvent(vcl::Window* pMenuWindow, Menu* pMenu, sal_uInt16 nHighlightedItem,
- const HelpEvent& rHEvt, const Rectangle &rHighlightRect)
+ const HelpEvent& rHEvt, const tools::Rectangle &rHighlightRect)
{
if( ! pMenu )
return false;
@@ -61,7 +61,7 @@ bool MenuWindow::ImplHandleHelpEvent(vcl::Window* pMenuWindow, Menu* pMenu, sal_
else
aPos = rHEvt.GetMousePosPixel();
- Rectangle aRect( aPos, Size() );
+ tools::Rectangle aRect( aPos, Size() );
if (!pMenu->GetHelpText(nId).isEmpty())
Help::ShowBalloon( pMenuWindow, aPos, aRect, pMenu->GetHelpText( nId ) );
else
@@ -77,7 +77,7 @@ bool MenuWindow::ImplHandleHelpEvent(vcl::Window* pMenuWindow, Menu* pMenu, sal_
else if ( ( rHEvt.GetMode() &HelpEventMode::QUICK ) && pMenuWindow )
{
Point aPos = rHEvt.GetMousePosPixel();
- Rectangle aRect( aPos, Size() );
+ tools::Rectangle aRect( aPos, Size() );
// give user a chance to read the full filename
sal_uLong oldTimeout=ImplChangeTipTimeout( 60000, pMenuWindow );
// call always, even when strlen==0 to correctly remove tip
diff --git a/vcl/source/window/menuwindow.hxx b/vcl/source/window/menuwindow.hxx
index a61b41ec0ea6..8fa78e138007 100644
--- a/vcl/source/window/menuwindow.hxx
+++ b/vcl/source/window/menuwindow.hxx
@@ -29,7 +29,7 @@ class HelpEvent;
class Image;
class Menu;
class MenuBar;
-class Rectangle;
+namespace tools { class Rectangle; }
namespace vcl { class Window; }
/** Common ancestor for MenuFloatingWindow and MenuBarWindow.
@@ -53,7 +53,7 @@ class MenuWindow
protected:
/// Show the appropriate help tooltip.
static bool ImplHandleHelpEvent(vcl::Window* pMenuWindow, Menu* pMenu, sal_uInt16 nHighlightedItem,
- const HelpEvent& rHEvt, const Rectangle &rHighlightRect);
+ const HelpEvent& rHEvt, const tools::Rectangle &rHighlightRect);
};
#endif // INCLUDED_VCL_SOURCE_WINDOW_MENUWINDOW_HXX
diff --git a/vcl/source/window/mouse.cxx b/vcl/source/window/mouse.cxx
index 7efe8741bb7c..090b2e3e73fd 100644
--- a/vcl/source/window/mouse.cxx
+++ b/vcl/source/window/mouse.cxx
@@ -59,7 +59,7 @@ WindowHitTest Window::ImplHitTest( const Point& rFramePos )
const OutputDevice *pOutDev = GetOutDev();
pOutDev->ReMirror( aFramePos );
}
- Rectangle aRect( Point( mnOutOffX, mnOutOffY ), Size( mnOutWidth, mnOutHeight ) );
+ tools::Rectangle aRect( Point( mnOutOffX, mnOutOffY ), Size( mnOutWidth, mnOutHeight ) );
if ( !aRect.IsInside( aFramePos ) )
return WindowHitTest::NONE;
if ( mpWindowImpl->mbWinRegion )
@@ -84,7 +84,7 @@ bool Window::ImplTestMousePointerSet()
return true;
// if the mouse is over the window, switch it
- Rectangle aClientRect( Point( 0, 0 ), GetOutputSizePixel() );
+ tools::Rectangle aClientRect( Point( 0, 0 ), GetOutputSizePixel() );
if ( aClientRect.IsInside( GetPointerPosPixel() ) )
return true;
@@ -177,7 +177,7 @@ IMPL_LINK_NOARG(Window, ImplGenerateMouseMoveHdl, void*, void)
}
}
-void Window::ImplInvertFocus( const Rectangle& rRect )
+void Window::ImplInvertFocus( const tools::Rectangle& rRect )
{
InvertTracking( rRect, ShowTrackFlags::Small | ShowTrackFlags::TrackWindow );
}
diff --git a/vcl/source/window/msgbox.cxx b/vcl/source/window/msgbox.cxx
index 81862e62aa4f..1686a9378fda 100644
--- a/vcl/source/window/msgbox.cxx
+++ b/vcl/source/window/msgbox.cxx
@@ -175,8 +175,8 @@ void MessBox::ImplPosControls()
}
TextRectInfo aTextInfo;
- Rectangle aRect( 0, 0, 30000, 30000 );
- Rectangle aFormatRect;
+ tools::Rectangle aRect( 0, 0, 30000, 30000 );
+ tools::Rectangle aFormatRect;
Point aTextPos( IMPL_DIALOG_OFFSET, IMPL_DIALOG_OFFSET+IMPL_MSGBOX_OFFSET_EXTRA_Y );
Size aImageSize;
Size aPageSize;
diff --git a/vcl/source/window/openglwin.cxx b/vcl/source/window/openglwin.cxx
index 7d20fd777ad4..1deb2e47618f 100644
--- a/vcl/source/window/openglwin.cxx
+++ b/vcl/source/window/openglwin.cxx
@@ -88,7 +88,7 @@ OpenGLContext& OpenGLWindow::getContext()
return mxImpl->getContext();
}
-void OpenGLWindow::Paint(vcl::RenderContext& /*rRenderContext*/, const Rectangle&)
+void OpenGLWindow::Paint(vcl::RenderContext& /*rRenderContext*/, const tools::Rectangle&)
{
if(mpRenderer)
mpRenderer->update();
diff --git a/vcl/source/window/paint.cxx b/vcl/source/window/paint.cxx
index 955153bc9ef7..d321ed97b916 100644
--- a/vcl/source/window/paint.cxx
+++ b/vcl/source/window/paint.cxx
@@ -122,7 +122,7 @@ PaintBufferGuard::~PaintBufferGuard()
}
else
{
- Rectangle aRectanglePixel = m_pWindow->LogicToPixel(m_aPaintRect);
+ tools::Rectangle aRectanglePixel = m_pWindow->LogicToPixel(m_aPaintRect);
aPaintRectSize = m_pWindow->PixelToLogic(aRectanglePixel.GetSize());
}
@@ -142,7 +142,7 @@ PaintBufferGuard::~PaintBufferGuard()
mpFrameData->mpBuffer->SetBackground();
}
-void PaintBufferGuard::SetPaintRect(const Rectangle& rRectangle)
+void PaintBufferGuard::SetPaintRect(const tools::Rectangle& rRectangle)
{
m_aPaintRect = rRectangle;
}
@@ -160,8 +160,8 @@ class PaintHelper
private:
VclPtr<vcl::Window> m_pWindow;
vcl::Region* m_pChildRegion;
- Rectangle m_aSelectionRect;
- Rectangle m_aPaintRect;
+ tools::Rectangle m_aSelectionRect;
+ tools::Rectangle m_aPaintRect;
vcl::Region m_aPaintRegion;
ImplPaintFlags m_nPaintFlags;
bool m_bPop : 1;
@@ -173,11 +173,11 @@ public:
{
m_bPop = true;
}
- void SetPaintRect(const Rectangle& rRect)
+ void SetPaintRect(const tools::Rectangle& rRect)
{
m_aPaintRect = rRect;
}
- void SetSelectionRect(const Rectangle& rRect)
+ void SetSelectionRect(const tools::Rectangle& rRect)
{
m_aSelectionRect = rRect;
}
@@ -224,7 +224,7 @@ void PaintHelper::StartBufferedPaint()
assert(!pFrameData->mbInBufferedPaint);
pFrameData->mbInBufferedPaint = true;
- pFrameData->maBufferedRect = Rectangle();
+ pFrameData->maBufferedRect = tools::Rectangle();
m_bStartedBufferedPaint = true;
}
@@ -310,7 +310,7 @@ namespace vcl
{
void RenderTools::DrawSelectionBackground(vcl::RenderContext& rRenderContext, vcl::Window& rWindow,
- const Rectangle& rRect, sal_uInt16 nHighlight,
+ const tools::Rectangle& rRect, sal_uInt16 nHighlight,
bool bChecked, bool bDrawBorder, bool bDrawExtBorderOnly,
Color* pSelectionTextColor, long nCornerRadius, Color* pPaintColor)
{
@@ -350,7 +350,7 @@ void RenderTools::DrawSelectionBackground(vcl::RenderContext& rRenderContext, vc
aSelectionBorderColor.DecreaseLuminance(128);
}
- Rectangle aRect(rRect);
+ tools::Rectangle aRect(rRect);
if (bDrawExtBorderOnly)
{
aRect.Left() -= 1;
@@ -474,7 +474,7 @@ void Window::PushPaintHelper(PaintHelper *pHelper, vcl::RenderContext& rRenderCo
// restore Paint-Region
vcl::Region &rPaintRegion = pHelper->GetPaintRegion();
rPaintRegion = mpWindowImpl->maInvalidateRegion;
- Rectangle aPaintRect = rPaintRegion.GetBoundRect();
+ tools::Rectangle aPaintRect = rPaintRegion.GetBoundRect();
// - RTL - re-mirror paint rect and region at this window
if (ImplIsAntiparallel())
@@ -554,7 +554,7 @@ PaintHelper::~PaintHelper()
{
PaintBuffer();
pFrameData->mbInBufferedPaint = false;
- pFrameData->maBufferedRect = Rectangle();
+ pFrameData->maBufferedRect = tools::Rectangle();
}
// #98943# draw toolbox selection
@@ -797,7 +797,7 @@ void Window::ImplInvalidate( const vcl::Region* pRegion, InvalidateFlags nFlags
ImplInvalidateFrameRegion( nullptr, nFlags );
else
{
- Rectangle aRect( Point( mnOutOffX, mnOutOffY ), Size( mnOutWidth, mnOutHeight ) );
+ tools::Rectangle aRect( Point( mnOutOffX, mnOutOffY ), Size( mnOutWidth, mnOutHeight ) );
vcl::Region aRegion( aRect );
if ( pRegion )
{
@@ -836,7 +836,7 @@ void Window::ImplInvalidate( const vcl::Region* pRegion, InvalidateFlags nFlags
pOpaqueWindow->Update(); // start painting at the opaque parent
}
-void Window::ImplMoveInvalidateRegion( const Rectangle& rRect,
+void Window::ImplMoveInvalidateRegion( const tools::Rectangle& rRect,
long nHorzScroll, long nVertScroll,
bool bChildren )
{
@@ -859,7 +859,7 @@ void Window::ImplMoveInvalidateRegion( const Rectangle& rRect,
}
}
-void Window::ImplMoveAllInvalidateRegions( const Rectangle& rRect,
+void Window::ImplMoveAllInvalidateRegions( const tools::Rectangle& rRect,
long nHorzScroll, long nVertScroll,
bool bChildren )
{
@@ -908,7 +908,7 @@ void Window::ImplValidateFrameRegion( const vcl::Region* pRegion, ValidateFlags
vcl::Region aChildRegion = mpWindowImpl->maInvalidateRegion;
if ( mpWindowImpl->mnPaintFlags & ImplPaintFlags::PaintAll )
{
- Rectangle aRect( Point( mnOutOffX, mnOutOffY ), Size( mnOutWidth, mnOutHeight ) );
+ tools::Rectangle aRect( Point( mnOutOffX, mnOutOffY ), Size( mnOutWidth, mnOutHeight ) );
aChildRegion = aRect;
}
vcl::Window* pChild = mpWindowImpl->mpFirstChild;
@@ -920,7 +920,7 @@ void Window::ImplValidateFrameRegion( const vcl::Region* pRegion, ValidateFlags
}
if ( mpWindowImpl->mnPaintFlags & ImplPaintFlags::PaintAll )
{
- Rectangle aRect( Point( mnOutOffX, mnOutOffY ), Size( mnOutWidth, mnOutHeight ) );
+ tools::Rectangle aRect( Point( mnOutOffX, mnOutOffY ), Size( mnOutWidth, mnOutHeight ) );
mpWindowImpl->maInvalidateRegion = aRect;
}
mpWindowImpl->maInvalidateRegion.Exclude( *pRegion );
@@ -953,7 +953,7 @@ void Window::ImplValidate()
ImplValidateFrameRegion( nullptr, nFlags );
else
{
- Rectangle aRect( Point( mnOutOffX, mnOutOffY ), Size( mnOutWidth, mnOutHeight ) );
+ tools::Rectangle aRect( Point( mnOutOffX, mnOutOffY ), Size( mnOutWidth, mnOutHeight ) );
vcl::Region aRegion( aRect );
ImplClipBoundaries( aRegion, true, true );
if ( nFlags & ValidateFlags::NoChildren )
@@ -976,7 +976,7 @@ void Window::ImplUpdateAll()
if ( mpWindowImpl->mpFrameWindow->mpWindowImpl->mbPaintFrame )
{
Point aPoint( 0, 0 );
- vcl::Region aRegion( Rectangle( aPoint, Size( mnOutWidth, mnOutHeight ) ) );
+ vcl::Region aRegion( tools::Rectangle( aPoint, Size( mnOutWidth, mnOutHeight ) ) );
ImplInvalidateOverlapFrameRegion( aRegion );
if ( mpWindowImpl->mbFrame || (mpWindowImpl->mpBorderWindow && mpWindowImpl->mpBorderWindow->mpWindowImpl->mbFrame) )
bFlush = true;
@@ -999,9 +999,9 @@ void Window::PostPaint(vcl::RenderContext& /*rRenderContext*/)
{
}
-void Window::Paint(vcl::RenderContext& /*rRenderContext*/, const Rectangle& rRect)
+void Window::Paint(vcl::RenderContext& /*rRenderContext*/, const tools::Rectangle& rRect)
{
- CallEventListeners(VclEventId::WindowPaint, const_cast<Rectangle *>(&rRect));
+ CallEventListeners(VclEventId::WindowPaint, const_cast<tools::Rectangle *>(&rRect));
}
void Window::SetPaintTransparent( bool bTransparent )
@@ -1037,7 +1037,7 @@ void Window::SetWindowRegionPixel()
if ( IsReallyVisible() )
{
- Rectangle aRect( Point( mnOutOffX, mnOutOffY ), Size( mnOutWidth, mnOutHeight ) );
+ tools::Rectangle aRect( Point( mnOutOffX, mnOutOffY ), Size( mnOutWidth, mnOutHeight ) );
vcl::Region aRegion( aRect );
ImplInvalidateParentFrameRegion( aRegion );
}
@@ -1119,7 +1119,7 @@ void Window::SetWindowRegionPixel( const vcl::Region& rRegion )
if ( IsReallyVisible() )
{
- Rectangle aRect( Point( mnOutOffX, mnOutOffY ), Size( mnOutWidth, mnOutHeight ) );
+ tools::Rectangle aRect( Point( mnOutOffX, mnOutOffY ), Size( mnOutWidth, mnOutHeight ) );
vcl::Region aRegion( aRect );
ImplInvalidateParentFrameRegion( aRegion );
}
@@ -1169,18 +1169,18 @@ void Window::Invalidate( InvalidateFlags nFlags )
LogicInvalidate(nullptr);
}
-void Window::Invalidate( const Rectangle& rRect, InvalidateFlags nFlags )
+void Window::Invalidate( const tools::Rectangle& rRect, InvalidateFlags nFlags )
{
if ( !comphelper::LibreOfficeKit::isActive() && (!IsDeviceOutputNecessary() || !mnOutWidth || !mnOutHeight) )
return;
OutputDevice *pOutDev = GetOutDev();
- Rectangle aRect = pOutDev->ImplLogicToDevicePixel( rRect );
+ tools::Rectangle aRect = pOutDev->ImplLogicToDevicePixel( rRect );
if ( !aRect.IsEmpty() )
{
vcl::Region aRegion( aRect );
ImplInvalidate( &aRegion, nFlags );
- Rectangle aLogicRectangle(rRect);
+ tools::Rectangle aLogicRectangle(rRect);
LogicInvalidate(&aLogicRectangle);
}
}
@@ -1201,7 +1201,7 @@ void Window::Invalidate( const vcl::Region& rRegion, InvalidateFlags nFlags )
if ( !aRegion.IsEmpty() )
{
ImplInvalidate( &aRegion, nFlags );
- Rectangle aLogicRectangle = rRegion.GetBoundRect();
+ tools::Rectangle aLogicRectangle = rRegion.GetBoundRect();
LogicInvalidate(&aLogicRectangle);
}
}
@@ -1257,7 +1257,7 @@ void Window::Update()
if ( mpWindowImpl->mpFrameWindow->mpWindowImpl->mbPaintFrame )
{
Point aPoint( 0, 0 );
- vcl::Region aRegion( Rectangle( aPoint, Size( mnOutWidth, mnOutHeight ) ) );
+ vcl::Region aRegion( tools::Rectangle( aPoint, Size( mnOutWidth, mnOutHeight ) ) );
ImplInvalidateOverlapFrameRegion( aRegion );
if ( mpWindowImpl->mbFrame || (mpWindowImpl->mpBorderWindow && mpWindowImpl->mpBorderWindow->mpWindowImpl->mbFrame) )
bFlush = true;
@@ -1380,7 +1380,7 @@ void Window::ImplPaintToDevice( OutputDevice* i_pTargetOutDev, const Point& i_rP
SetRefPoint();
SetLayoutMode( GetLayoutMode() );
SetDigitLanguage( GetDigitLanguage() );
- Rectangle aPaintRect( Point( 0, 0 ), GetOutputSizePixel() );
+ tools::Rectangle aPaintRect( Point( 0, 0 ), GetOutputSizePixel() );
aClipRegion.Intersect( aPaintRect );
SetClipRegion( aClipRegion );
@@ -1480,7 +1480,7 @@ void Window::Erase(vcl::RenderContext& rRenderContext)
ControlPart aCtrlPart = ImplGetWindowImpl()->mnNativeBackground;
if (aCtrlPart != ControlPart::NONE && ! IsControlBackground())
{
- Rectangle aCtrlRegion(Point(), GetOutputSizePixel());
+ tools::Rectangle aCtrlRegion(Point(), GetOutputSizePixel());
ControlState nState = ControlState::NONE;
if (IsEnabled())
@@ -1504,7 +1504,7 @@ void Window::Erase(vcl::RenderContext& rRenderContext)
mpAlphaVDev->Erase();
}
-void Window::ImplScroll( const Rectangle& rRect,
+void Window::ImplScroll( const tools::Rectangle& rRect,
long nHorzScroll, long nVertScroll, ScrollFlags nFlags )
{
if ( !IsDeviceOutputNecessary() )
@@ -1539,7 +1539,7 @@ void Window::ImplScroll( const Rectangle& rRect,
// --- RTL --- check if this window requires special action
bool bReMirror = ( ImplIsAntiparallel() );
- Rectangle aRectMirror( rRect );
+ tools::Rectangle aRectMirror( rRect );
if( bReMirror )
{
// --- RTL --- make sure the invalidate region of this window is
@@ -1561,7 +1561,7 @@ void Window::ImplScroll( const Rectangle& rRect,
aInvalidateRegion.Move(bReMirror ? -nHorzScroll : nHorzScroll, nVertScroll);
}
- Rectangle aDestRect(aRectMirror);
+ tools::Rectangle aDestRect(aRectMirror);
aDestRect.Move(bReMirror ? -nHorzScroll : nHorzScroll, nVertScroll);
vcl::Region aWinInvalidateRegion(aRectMirror);
if (!SupportsDoubleBuffering())
@@ -1575,7 +1575,7 @@ void Window::ImplScroll( const Rectangle& rRect,
aInvalidateRegion.Union(aWinInvalidateRegion);
Point aPoint( mnOutOffX, mnOutOffY );
- vcl::Region aRegion( Rectangle( aPoint, Size( mnOutWidth, mnOutHeight ) ) );
+ vcl::Region aRegion( tools::Rectangle( aPoint, Size( mnOutWidth, mnOutHeight ) ) );
if ( nFlags & ScrollFlags::Clip )
aRegion.Intersect( rRect );
if ( mpWindowImpl->mbWinRegion )
diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx
index 0600e9f3d375..ad623fb09830 100644
--- a/vcl/source/window/printdlg.cxx
+++ b/vcl/source/window/printdlg.cxx
@@ -165,7 +165,7 @@ void PrintDialog::PrintPreviewWindow::Resize()
}
-void PrintDialog::PrintPreviewWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangle&)
+void PrintDialog::PrintPreviewWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&)
{
long nTextHeight = maHorzDim->GetTextHeight();
Size aSize(GetSizePixel());
@@ -178,7 +178,7 @@ void PrintDialog::PrintPreviewWindow::Paint(vcl::RenderContext& rRenderContext,
rRenderContext.Push();
Font aFont(rRenderContext.GetSettings().GetStyleSettings().GetLabelFont());
SetZoomedPointFont(rRenderContext, aFont);
- Rectangle aTextRect(aOffset + Point(2, 2), Size(maPreviewSize.Width() - 4, maPreviewSize.Height() - 4));
+ tools::Rectangle aTextRect(aOffset + Point(2, 2), Size(maPreviewSize.Width() - 4, maPreviewSize.Height() - 4));
rRenderContext.DrawText(aTextRect, maReplacementString,
DrawTextFlags::Center | DrawTextFlags::VCenter |
DrawTextFlags::WordBreak | DrawTextFlags::MultiLine);
@@ -191,7 +191,7 @@ void PrintDialog::PrintPreviewWindow::Paint(vcl::RenderContext& rRenderContext,
rRenderContext.DrawBitmap(aOffset, aPreviewBitmap);
}
- Rectangle aFrameRect(aOffset + Point(-1, -1), Size(maPreviewSize.Width() + 2, maPreviewSize.Height() + 2));
+ tools::Rectangle aFrameRect(aOffset + Point(-1, -1), Size(maPreviewSize.Width() + 2, maPreviewSize.Height() + 2));
DecorationView aDecorationView(&rRenderContext);
aDecorationView.DrawFrame(aFrameRect, DrawFrameStyle::Group);
}
@@ -319,7 +319,7 @@ Size PrintDialog::ShowNupOrderWindow::GetOptimalSize() const
return Size(70, 70);
}
-void PrintDialog::ShowNupOrderWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangle& i_rRect)
+void PrintDialog::ShowNupOrderWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& i_rRect)
{
Window::Paint(rRenderContext, i_rRect);
@@ -373,7 +373,7 @@ void PrintDialog::ShowNupOrderWindow::Paint(vcl::RenderContext& rRenderContext,
nY * aSubSize.Height() + nDeltaY), aPageText);
}
DecorationView aDecorationView(&rRenderContext);
- aDecorationView.DrawFrame(Rectangle(Point(0, 0), aOutSize), DrawFrameStyle::Group);
+ aDecorationView.DrawFrame(tools::Rectangle(Point(0, 0), aOutSize), DrawFrameStyle::Group);
}
PrintDialog::NUpTabPage::NUpTabPage( VclBuilder *pUIBuilder )
diff --git a/vcl/source/window/scrwnd.cxx b/vcl/source/window/scrwnd.cxx
index 7f377fcd7ae0..a904064348f0 100644
--- a/vcl/source/window/scrwnd.cxx
+++ b/vcl/source/window/scrwnd.cxx
@@ -109,7 +109,7 @@ void ImplWheelWindow::ImplSetRegion( const Bitmap& rRegionBmp )
Point aPos( GetPointerPosPixel() );
const Size aSize( rRegionBmp.GetSizePixel() );
Point aPoint;
- const Rectangle aRect( aPoint, aSize );
+ const tools::Rectangle aRect( aPoint, aSize );
maCenter = maLastMousePos = aPos;
aPos.X() -= aSize.Width() >> 1;
@@ -307,7 +307,7 @@ PointerStyle ImplWheelWindow::ImplGetMousePointer( long nDistX, long nDistY )
return eStyle;
}
-void ImplWheelWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangle&)
+void ImplWheelWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&)
{
ImplDrawWheel(rRenderContext);
}
diff --git a/vcl/source/window/split.cxx b/vcl/source/window/split.cxx
index 8d607d6f9858..d597a0e15594 100644
--- a/vcl/source/window/split.cxx
+++ b/vcl/source/window/split.cxx
@@ -110,7 +110,7 @@ void Splitter::ImplSplitMousePos( Point& rPos )
void Splitter::ImplDrawSplitter()
{
- Rectangle aInvRect( maDragRect );
+ tools::Rectangle aInvRect( maDragRect );
if ( mbHorzSplit )
{
@@ -443,7 +443,7 @@ void Splitter::EndSplit()
maEndSplitHdl.Call( this );
}
-void Splitter::SetDragRectPixel( const Rectangle& rDragRect, vcl::Window* _pRefWin )
+void Splitter::SetDragRectPixel( const tools::Rectangle& rDragRect, vcl::Window* _pRefWin )
{
maDragRect = rDragRect;
if ( !_pRefWin )
@@ -669,7 +669,7 @@ void Splitter::DataChanged( const DataChangedEvent& rDCEvt )
}
}
-void Splitter::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rPaintRect)
+void Splitter::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rPaintRect)
{
rRenderContext.DrawRect(rPaintRect);
diff --git a/vcl/source/window/splitwin.cxx b/vcl/source/window/splitwin.cxx
index eb796b695e07..883fa98c3c61 100644
--- a/vcl/source/window/splitwin.cxx
+++ b/vcl/source/window/splitwin.cxx
@@ -412,7 +412,7 @@ static sal_uInt16 ImplFindItem( ImplSplitSet* pSet, const Point& rPos,
{
Point aPoint( rItems[i]->mnLeft, rItems[i]->mnTop );
Size aSize( rItems[i]->mnWidth, rItems[i]->mnHeight );
- Rectangle aRect( aPoint, aSize );
+ tools::Rectangle aRect( aPoint, aSize );
if ( bRows )
{
if ( bDown )
@@ -823,7 +823,7 @@ void SplitWindow::ImplCalcSet2( SplitWindow* pWindow, ImplSplitSet* pSet, bool b
(rItems[i]->mnOldWidth != rItems[i]->mnWidth) ||
(rItems[i]->mnOldHeight != rItems[i]->mnHeight) )
{
- Rectangle aRect;
+ tools::Rectangle aRect;
// invalidate old rectangle
if ( bRows )
@@ -941,7 +941,7 @@ static void ImplCalcLogSize( std::vector< ImplSplitItem* > rItems, size_t nItems
}
}
-void SplitWindow::ImplDrawBack(vcl::RenderContext& rRenderContext, const Rectangle& rRect,
+void SplitWindow::ImplDrawBack(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect,
const Wallpaper* pWall, const Bitmap* pBitmap)
{
if (pBitmap)
@@ -980,7 +980,7 @@ void SplitWindow::ImplDrawBack(vcl::RenderContext& rRenderContext, ImplSplitSet*
{
if (pSet->mpBitmap)
{
- Rectangle aRect(mnLeftBorder, mnTopBorder,
+ tools::Rectangle aRect(mnLeftBorder, mnTopBorder,
mnDX - mnRightBorder - 1,
mnDY - mnBottomBorder - 1);
@@ -997,7 +997,7 @@ void SplitWindow::ImplDrawBack(vcl::RenderContext& rRenderContext, ImplSplitSet*
{
Point aPoint(rItems[i]->mnLeft, rItems[i]->mnTop);
Size aSize(rItems[i]->mnWidth, rItems[i]->mnHeight);
- Rectangle aRect(aPoint, aSize);
+ tools::Rectangle aRect(aPoint, aSize);
ImplDrawBack(rRenderContext, aRect, pSet->mpWallpaper, pSet->mpBitmap);
}
}
@@ -1246,7 +1246,7 @@ sal_uInt16 SplitWindow::ImplTestSplit( SplitWindow* pWindow, const Point& rPos,
void SplitWindow::ImplDrawSplitTracking(const Point& rPos)
{
- Rectangle aRect;
+ tools::Rectangle aRect;
if (mnSplitTest & SPLIT_HORZ)
{
@@ -1607,7 +1607,7 @@ void SplitWindow::ImplSplitMousePos( Point& rMousePos )
}
}
-void SplitWindow::ImplGetButtonRect( Rectangle& rRect, long nEx, bool bTest ) const
+void SplitWindow::ImplGetButtonRect( tools::Rectangle& rRect, long nEx, bool bTest ) const
{
long nSplitSize = mpMainSet->mnSplitSize-1;
if (mbFadeOut || mbFadeIn)
@@ -1675,9 +1675,9 @@ void SplitWindow::ImplGetButtonRect( Rectangle& rRect, long nEx, bool bTest ) co
}
}
-void SplitWindow::ImplGetFadeInRect( Rectangle& rRect, bool bTest ) const
+void SplitWindow::ImplGetFadeInRect( tools::Rectangle& rRect, bool bTest ) const
{
- Rectangle aRect;
+ tools::Rectangle aRect;
if ( mbFadeIn )
ImplGetButtonRect( aRect, 0, bTest );
@@ -1685,9 +1685,9 @@ void SplitWindow::ImplGetFadeInRect( Rectangle& rRect, bool bTest ) const
rRect = aRect;
}
-void SplitWindow::ImplGetFadeOutRect( Rectangle& rRect, bool ) const
+void SplitWindow::ImplGetFadeOutRect( tools::Rectangle& rRect, bool ) const
{
- Rectangle aRect;
+ tools::Rectangle aRect;
if ( mbFadeOut )
ImplGetButtonRect( aRect, 0, false );
@@ -1695,7 +1695,7 @@ void SplitWindow::ImplGetFadeOutRect( Rectangle& rRect, bool ) const
rRect = aRect;
}
-void SplitWindow::ImplDrawGrip(vcl::RenderContext& rRenderContext, const Rectangle& rRect, bool bHorizontal, bool bLeft)
+void SplitWindow::ImplDrawGrip(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect, bool bHorizontal, bool bLeft)
{
const StyleSettings& rStyleSettings = rRenderContext.GetSettings().GetStyleSettings();
@@ -1780,7 +1780,7 @@ void SplitWindow::ImplDrawFadeIn(vcl::RenderContext& rRenderContext)
{
if (mbFadeIn)
{
- Rectangle aTempRect;
+ tools::Rectangle aTempRect;
ImplGetFadeInRect(aTempRect);
bool bLeft = true;
@@ -1805,7 +1805,7 @@ void SplitWindow::ImplDrawFadeOut(vcl::RenderContext& rRenderContext)
{
if (mbFadeOut)
{
- Rectangle aTempRect;
+ tools::Rectangle aTempRect;
ImplGetFadeOutRect(aTempRect);
bool bLeft = true;
@@ -2045,7 +2045,7 @@ void SplitWindow::MouseButtonDown( const MouseEvent& rMEvt )
}
Point aMousePosPixel = rMEvt.GetPosPixel();
- Rectangle aTestRect;
+ tools::Rectangle aTestRect;
mbFadeNoButtonMode = false;
@@ -2089,8 +2089,8 @@ void SplitWindow::MouseMove( const MouseEvent& rMEvt )
sal_uInt16 nTempSplitPos;
sal_uInt16 nSplitTest = ImplTestSplit( this, aPos, nTemp, &pTempSplitSet, nTempSplitPos );
PointerStyle eStyle = PointerStyle::Arrow;
- Rectangle aFadeInRect;
- Rectangle aFadeOutRect;
+ tools::Rectangle aFadeInRect;
+ tools::Rectangle aFadeOutRect;
ImplGetFadeInRect( aFadeInRect );
ImplGetFadeOutRect( aFadeOutRect );
@@ -2131,7 +2131,7 @@ void SplitWindow::Tracking( const TrackingEvent& rTEvt )
}
else
{
- Rectangle aTestRect;
+ tools::Rectangle aTestRect;
ImplGetFadeInRect( aTestRect, true );
bool bNewPressed = aTestRect.IsInside( aMousePosPixel );
if ( bNewPressed != mbFadeInPressed )
@@ -2157,7 +2157,7 @@ void SplitWindow::Tracking( const TrackingEvent& rTEvt )
}
else
{
- Rectangle aTestRect;
+ tools::Rectangle aTestRect;
ImplGetFadeOutRect( aTestRect, true );
bool bNewPressed = aTestRect.IsInside( aMousePosPixel );
if ( !bNewPressed )
@@ -2270,8 +2270,8 @@ bool SplitWindow::PreNotify( NotifyEvent& rNEvt )
if( !pMouseEvt->GetButtons() && !pMouseEvt->IsSynthetic() && !pMouseEvt->IsModifierChanged() )
{
// trigger redraw if mouse over state has changed
- Rectangle aFadeInRect;
- Rectangle aFadeOutRect;
+ tools::Rectangle aFadeInRect;
+ tools::Rectangle aFadeOutRect;
ImplGetFadeInRect( aFadeInRect );
ImplGetFadeOutRect( aFadeOutRect );
@@ -2290,7 +2290,7 @@ bool SplitWindow::PreNotify( NotifyEvent& rNEvt )
return Window::PreNotify( rNEvt );
}
-void SplitWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangle&)
+void SplitWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&)
{
if (mnWinStyle & WB_BORDER)
ImplDrawBorder(rRenderContext);
@@ -2326,7 +2326,7 @@ void SplitWindow::RequestHelp( const HelpEvent& rHEvt )
if ( rHEvt.GetMode() & (HelpEventMode::BALLOON | HelpEventMode::QUICK) && !rHEvt.KeyboardActivated() )
{
Point aMousePosPixel = ScreenToOutputPixel( rHEvt.GetMousePosPixel() );
- Rectangle aHelpRect;
+ tools::Rectangle aHelpRect;
sal_uInt16 nHelpResId = 0;
ImplGetFadeInRect( aHelpRect, true );
diff --git a/vcl/source/window/stacking.cxx b/vcl/source/window/stacking.cxx
index ce70ebaf2428..1aa805e0fdee 100644
--- a/vcl/source/window/stacking.cxx
+++ b/vcl/source/window/stacking.cxx
@@ -219,7 +219,7 @@ void Window::ImplCalcToTop( ImplCalcToTopData* pPrevData )
{
// calculate region, where the window overlaps with other windows
Point aPoint( mnOutOffX, mnOutOffY );
- vcl::Region aRegion( Rectangle( aPoint,
+ vcl::Region aRegion( tools::Rectangle( aPoint,
Size( mnOutWidth, mnOutHeight ) ) );
vcl::Region aInvalidateRegion;
ImplCalcOverlapRegionOverlaps( aRegion, aInvalidateRegion );
@@ -559,7 +559,7 @@ void Window::SetZOrder( vcl::Window* pRefWindow, ZOrderFlags nFlags )
{
// Invalidate all windows which are next to each other
// Is INCOMPLETE !!!
- Rectangle aWinRect( Point( mnOutOffX, mnOutOffY ), Size( mnOutWidth, mnOutHeight ) );
+ tools::Rectangle aWinRect( Point( mnOutOffX, mnOutOffY ), Size( mnOutWidth, mnOutHeight ) );
vcl::Window* pWindow = nullptr;
if ( ImplIsOverlapWindow() )
{
@@ -573,7 +573,7 @@ void Window::SetZOrder( vcl::Window* pRefWindow, ZOrderFlags nFlags )
{
if ( pWindow == this )
break;
- Rectangle aCompRect( Point( pWindow->mnOutOffX, pWindow->mnOutOffY ),
+ tools::Rectangle aCompRect( Point( pWindow->mnOutOffX, pWindow->mnOutOffY ),
Size( pWindow->mnOutWidth, pWindow->mnOutHeight ) );
if ( aWinRect.IsOver( aCompRect ) )
pWindow->Invalidate( InvalidateFlags::Children | InvalidateFlags::NoTransparent );
@@ -586,7 +586,7 @@ void Window::SetZOrder( vcl::Window* pRefWindow, ZOrderFlags nFlags )
{
if ( pWindow != this )
{
- Rectangle aCompRect( Point( pWindow->mnOutOffX, pWindow->mnOutOffY ),
+ tools::Rectangle aCompRect( Point( pWindow->mnOutOffX, pWindow->mnOutOffY ),
Size( pWindow->mnOutWidth, pWindow->mnOutHeight ) );
if ( aWinRect.IsOver( aCompRect ) )
{
diff --git a/vcl/source/window/status.cxx b/vcl/source/window/status.cxx
index 764665c0a1ae..9b27520a6fbc 100644
--- a/vcl/source/window/status.cxx
+++ b/vcl/source/window/status.cxx
@@ -292,9 +292,9 @@ void StatusBar::ImplFormat()
mbFormat = false;
}
-Rectangle StatusBar::ImplGetItemRectPos( sal_uInt16 nPos ) const
+tools::Rectangle StatusBar::ImplGetItemRectPos( sal_uInt16 nPos ) const
{
- Rectangle aRect;
+ tools::Rectangle aRect;
ImplStatusItem* pItem;
pItem = ( nPos < mpItemList.size() ) ? mpItemList[ nPos ] : nullptr;
if ( pItem )
@@ -329,7 +329,7 @@ sal_uInt16 StatusBar::ImplGetFirstVisiblePos() const
void StatusBar::ImplDrawText(vcl::RenderContext& rRenderContext)
{
// prevent item box from being overwritten
- Rectangle aTextRect;
+ tools::Rectangle aTextRect;
aTextRect.Left() = STATUSBAR_OFFSET_X + 1;
aTextRect.Top() = mnTextY;
if (mbVisibleItems && (GetStyle() & WB_RIGHT))
@@ -352,7 +352,7 @@ void StatusBar::ImplDrawText(vcl::RenderContext& rRenderContext)
void StatusBar::ImplDrawItem(vcl::RenderContext& rRenderContext, bool bOffScreen, sal_uInt16 nPos)
{
- Rectangle aRect = ImplGetItemRectPos(nPos);
+ tools::Rectangle aRect = ImplGetItemRectPos(nPos);
if (aRect.IsEmpty())
return;
@@ -360,7 +360,7 @@ void StatusBar::ImplDrawItem(vcl::RenderContext& rRenderContext, bool bOffScreen
// compute output region
ImplStatusItem* pItem = mpItemList[nPos];
long nW = mpImplData->mnItemBorderWidth + 1;
- Rectangle aTextRect(aRect.Left() + nW, aRect.Top() + nW,
+ tools::Rectangle aTextRect(aRect.Left() + nW, aRect.Top() + nW,
aRect.Right() - nW, aRect.Bottom() - nW);
Size aTextRectSize(aTextRect.GetSize());
@@ -396,7 +396,7 @@ void StatusBar::ImplDrawItem(vcl::RenderContext& rRenderContext, bool bOffScreen
{
mbInUserDraw = true;
mpImplData->mpVirDev->EnableRTL( IsRTLEnabled() );
- UserDrawEvent aODEvt(this, mpImplData->mpVirDev, Rectangle(Point(), aTextRectSize), pItem->mnId);
+ UserDrawEvent aODEvt(this, mpImplData->mpVirDev, tools::Rectangle(Point(), aTextRectSize), pItem->mnId);
UserDraw(aODEvt);
mpImplData->mpVirDev->EnableRTL(false);
mbInUserDraw = false;
@@ -450,7 +450,7 @@ void StatusBar::ImplDrawItem(vcl::RenderContext& rRenderContext, bool bOffScreen
void DrawProgress(vcl::Window* pWindow, vcl::RenderContext& rRenderContext, const Point& rPos,
long nOffset, long nPrgsWidth, long nPrgsHeight,
sal_uInt16 nPercent1, sal_uInt16 nPercent2, sal_uInt16 nPercentCount,
- const Rectangle& rFramePosSize)
+ const tools::Rectangle& rFramePosSize)
{
if (rRenderContext.IsNativeControlSupported(ControlType::Progress, ControlPart::Entire))
{
@@ -459,8 +459,8 @@ void DrawProgress(vcl::Window* pWindow, vcl::RenderContext& rRenderContext, cons
long nFullWidth = (nPrgsWidth + nOffset) * (10000 / nPercentCount);
long nPerc = (nPercent2 > 10000) ? 10000 : nPercent2;
ImplControlValue aValue(nFullWidth * long(nPerc) / 10000);
- Rectangle aDrawRect(rPos, Size(nFullWidth, nPrgsHeight));
- Rectangle aControlRegion(aDrawRect);
+ tools::Rectangle aDrawRect(rPos, Size(nFullWidth, nPrgsHeight));
+ tools::Rectangle aControlRegion(aDrawRect);
if(bNeedErase)
{
@@ -480,7 +480,7 @@ void DrawProgress(vcl::Window* pWindow, vcl::RenderContext& rRenderContext, cons
// restore transparent background
Point aTL(pWindow->OutputToAbsoluteScreenPixel(rFramePosSize.TopLeft()));
aTL = pEraseWindow->AbsoluteScreenToOutputPixel(aTL);
- Rectangle aRect(aTL, rFramePosSize.GetSize());
+ tools::Rectangle aRect(aTL, rFramePosSize.GetSize());
pEraseWindow->Invalidate(aRect, InvalidateFlags::NoChildren |
InvalidateFlags::NoClipChildren |
InvalidateFlags::Transparent);
@@ -509,7 +509,7 @@ void DrawProgress(vcl::Window* pWindow, vcl::RenderContext& rRenderContext, cons
// compute rectangle
long nDX = nPrgsWidth + nOffset;
long nLeft = rPos.X() + ((nPerc1 - 1) * nDX);
- Rectangle aRect(nLeft, rPos.Y(), nLeft + nPrgsWidth, rPos.Y() + nPrgsHeight);
+ tools::Rectangle aRect(nLeft, rPos.Y(), nLeft + nPrgsWidth, rPos.Y() + nPrgsHeight);
do
{
@@ -534,7 +534,7 @@ void DrawProgress(vcl::Window* pWindow, vcl::RenderContext& rRenderContext, cons
// compute rectangle
long nDX = nPrgsWidth + nOffset;
long nLeft = rPos.X() + (nPerc1 * nDX);
- Rectangle aRect(nLeft, rPos.Y(), nLeft + nPrgsWidth, rPos.Y() + nPrgsHeight);
+ tools::Rectangle aRect(nLeft, rPos.Y(), nLeft + nPrgsWidth, rPos.Y() + nPrgsHeight);
do
{
@@ -614,8 +614,8 @@ void StatusBar::ImplCalcProgressRect()
if( IsNativeControlSupported( ControlType::Progress, ControlPart::Entire ) )
{
ImplControlValue aValue;
- Rectangle aControlRegion( Rectangle( (const Point&)Point(), maPrgsFrameRect.GetSize() ) );
- Rectangle aNativeControlRegion, aNativeContentRegion;
+ tools::Rectangle aControlRegion( tools::Rectangle( (const Point&)Point(), maPrgsFrameRect.GetSize() ) );
+ tools::Rectangle aNativeControlRegion, aNativeContentRegion;
if( (bNativeOK = GetNativeControlRegion( ControlType::Progress, ControlPart::Entire, aControlRegion,
ControlState::ENABLED, aValue, OUString(),
aNativeControlRegion, aNativeContentRegion ) ) )
@@ -671,7 +671,7 @@ void StatusBar::MouseButtonDown( const MouseEvent& rMEvt )
}
}
-void StatusBar::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect)
+void StatusBar::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect)
{
if (mbFormat)
ImplFormat();
@@ -757,7 +757,7 @@ void StatusBar::RequestHelp( const HelpEvent& rHEvt )
if ( nItemId )
{
- Rectangle aItemRect = GetItemRect( nItemId );
+ tools::Rectangle aItemRect = GetItemRect( nItemId );
Point aPt = OutputToScreenPixel( aItemRect.TopLeft() );
aItemRect.Left() = aPt.X();
aItemRect.Top() = aPt.Y();
@@ -1040,7 +1040,7 @@ sal_uInt16 StatusBar::GetItemId( const Point& rPos ) const
for ( nPos = 0; nPos < nItemCount; nPos++ )
{
// get rectangle
- Rectangle aRect = ImplGetItemRectPos( nPos );
+ tools::Rectangle aRect = ImplGetItemRectPos( nPos );
if ( aRect.IsInside( rPos ) )
return mpItemList[ nPos ]->mnId;
}
@@ -1049,9 +1049,9 @@ sal_uInt16 StatusBar::GetItemId( const Point& rPos ) const
return 0;
}
-Rectangle StatusBar::GetItemRect( sal_uInt16 nItemId ) const
+tools::Rectangle StatusBar::GetItemRect( sal_uInt16 nItemId ) const
{
- Rectangle aRect;
+ tools::Rectangle aRect;
if ( AreItemsVisible() && !mbFormat )
{
@@ -1081,9 +1081,9 @@ Point StatusBar::GetItemTextPos( sal_uInt16 nItemId ) const
{
// get rectangle
ImplStatusItem* pItem = mpItemList[ nPos ];
- Rectangle aRect = ImplGetItemRectPos( nPos );
+ tools::Rectangle aRect = ImplGetItemRectPos( nPos );
long nW = mpImplData->mnItemBorderWidth + 1;
- Rectangle aTextRect( aRect.Left()+nW, aRect.Top()+nW,
+ tools::Rectangle aTextRect( aRect.Left()+nW, aRect.Top()+nW,
aRect.Right()-nW, aRect.Bottom()-nW );
Point aPos = ImplGetItemTextPos( aTextRect.GetSize(),
Size( GetTextWidth( pItem->maText ), GetTextHeight() ),
@@ -1156,7 +1156,7 @@ void StatusBar::SetItemText( sal_uInt16 nItemId, const OUString& rText )
// re-draw item if StatusBar is visible and UpdateMode active
if ( pItem->mbVisible && !mbFormat && ImplIsItemUpdate() )
{
- Rectangle aRect = ImplGetItemRectPos(nPos);
+ tools::Rectangle aRect = ImplGetItemRectPos(nPos);
Invalidate(aRect);
Update();
}
@@ -1209,7 +1209,7 @@ void StatusBar::SetItemData( sal_uInt16 nItemId, void* pNewData )
if ( (pItem->mnBits & StatusBarItemBits::UserDraw) && pItem->mbVisible &&
!mbFormat && ImplIsItemUpdate() )
{
- Rectangle aRect = ImplGetItemRectPos(nPos);
+ tools::Rectangle aRect = ImplGetItemRectPos(nPos);
Invalidate(aRect, InvalidateFlags::NoErase);
Update();
}
@@ -1239,7 +1239,7 @@ void StatusBar::RedrawItem(sal_uInt16 nItemId)
if (pItem && (pItem->mnBits & StatusBarItemBits::UserDraw) &&
pItem->mbVisible && ImplIsItemUpdate())
{
- Rectangle aRect = ImplGetItemRectPos(nPos);
+ tools::Rectangle aRect = ImplGetItemRectPos(nPos);
Invalidate(aRect);
Update();
}
@@ -1421,8 +1421,8 @@ Size StatusBar::CalcWindowSizePixel() const
if( IsNativeControlSupported( ControlType::Progress, ControlPart::Entire ) )
{
ImplControlValue aValue;
- Rectangle aControlRegion( (const Point&)Point(), Size( nCalcWidth, nMinHeight ) );
- Rectangle aNativeControlRegion, aNativeContentRegion;
+ tools::Rectangle aControlRegion( (const Point&)Point(), Size( nCalcWidth, nMinHeight ) );
+ tools::Rectangle aNativeControlRegion, aNativeContentRegion;
if( GetNativeControlRegion( ControlType::Progress, ControlPart::Entire,
aControlRegion, ControlState::ENABLED, aValue, OUString(),
aNativeControlRegion, aNativeContentRegion ) )
@@ -1435,8 +1435,8 @@ Size StatusBar::CalcWindowSizePixel() const
IsNativeControlSupported( ControlType::Frame, ControlPart::Border ) )
{
ImplControlValue aControlValue( static_cast<long>(DrawFrameFlags::NoDraw) );
- Rectangle aBound, aContent;
- Rectangle aNatRgn( Point( 0, 0 ), Size( 150, 50 ) );
+ tools::Rectangle aBound, aContent;
+ tools::Rectangle aNatRgn( Point( 0, 0 ), Size( 150, 50 ) );
if( GetNativeControlRegion(ControlType::Frame, ControlPart::Border,
aNatRgn, ControlState::NONE, aControlValue, OUString(), aBound, aContent) )
{
diff --git a/vcl/source/window/syswin.cxx b/vcl/source/window/syswin.cxx
index 192b85e4c8a8..6656f122ecd3 100644
--- a/vcl/source/window/syswin.cxx
+++ b/vcl/source/window/syswin.cxx
@@ -594,7 +594,7 @@ static OString ImplWindowStateToStr(const WindowStateData& rData)
void SystemWindow::ImplMoveToScreen( long& io_rX, long& io_rY, long i_nWidth, long i_nHeight, vcl::Window* i_pConfigureWin )
{
- Rectangle aScreenRect;
+ tools::Rectangle aScreenRect;
if( !Application::IsUnifiedDisplay() )
aScreenRect = Application::GetScreenPosSizePixel( GetScreenNumber() );
else
@@ -698,7 +698,7 @@ void SystemWindow::SetWindowStateData( const WindowStateData& rData )
if( !((rData.GetMask() & WindowStateMask::State) && (nState & WindowStateState::Maximized)) )
if( rData.GetMask() & (WindowStateMask::Pos|WindowStateMask::Width|WindowStateMask::Height) )
{
- Rectangle aDesktop = GetDesktopRectPixel();
+ tools::Rectangle aDesktop = GetDesktopRectPixel();
ImplSVData *pSVData = ImplGetSVData();
vcl::Window *pWin = pSVData->maWinData.mpFirstFrame;
bool bWrapped = false;
diff --git a/vcl/source/window/tabpage.cxx b/vcl/source/window/tabpage.cxx
index a929a333830d..59c5a653681c 100644
--- a/vcl/source/window/tabpage.cxx
+++ b/vcl/source/window/tabpage.cxx
@@ -128,7 +128,7 @@ void TabPage::DataChanged( const DataChangedEvent& rDCEvt )
}
}
-void TabPage::Paint( vcl::RenderContext& rRenderContext, const Rectangle& )
+void TabPage::Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& )
{
// draw native tabpage only inside tabcontrols, standalone tabpages look ugly (due to bad dialog design)
if( IsNativeControlSupported(ControlType::TabBody, ControlPart::Entire) && GetParent() && (GetParent()->GetType() == WindowType::TABCONTROL) )
@@ -143,7 +143,7 @@ void TabPage::Paint( vcl::RenderContext& rRenderContext, const Rectangle& )
nState |= ControlState::FOCUSED;
// pass the whole window region to NWF as the tab body might be a gradient or bitmap
// that has to be scaled properly, clipping makes sure that we do not paint too much
- Rectangle aCtrlRegion( Point(), GetOutputSizePixel() );
+ tools::Rectangle aCtrlRegion( Point(), GetOutputSizePixel() );
rRenderContext.DrawNativeControl( ControlType::TabBody, part, aCtrlRegion, nState,
aControlValue, OUString() );
}
@@ -170,7 +170,7 @@ void TabPage::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, Dr
pDev->SetFillColor( GetSettings().GetStyleSettings().GetDialogColor() );
else
pDev->SetFillColor( aWallpaper.GetColor() );
- pDev->DrawRect( Rectangle( aPos, aSize ) );
+ pDev->DrawRect( tools::Rectangle( aPos, aSize ) );
}
pDev->Pop();
diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx
index 9614d223598b..d026b94b7c6e 100644
--- a/vcl/source/window/toolbox.cxx
+++ b/vcl/source/window/toolbox.cxx
@@ -90,8 +90,8 @@ class ImplTBDragMgr
private:
VclPtr<ToolBox> mpDragBox;
Point maMouseOff;
- Rectangle maRect;
- Rectangle maStartRect;
+ tools::Rectangle maRect;
+ tools::Rectangle maStartRect;
Accelerator maAccel;
sal_uInt16 mnLineMode;
ToolBox::ImplToolItems::size_type mnStartLines;
@@ -103,7 +103,7 @@ private:
public:
ImplTBDragMgr();
- void StartDragging( ToolBox* pDragBox, const Point& rPos, const Rectangle& rRect, sal_uInt16 nLineMode );
+ void StartDragging( ToolBox* pDragBox, const Point& rPos, const tools::Rectangle& rRect, sal_uInt16 nLineMode );
void Dragging( const Point& rPos );
void EndDragging( bool bOK = true );
DECL_LINK( SelectHdl, Accelerator&, void );
@@ -126,8 +126,8 @@ int ToolBox::ImplGetDragWidth( const vcl::RenderContext& rRenderContext, bool bH
ImplControlValue aControlValue;
Point aPoint;
- Rectangle aContent, aBound;
- Rectangle aArea( aPoint, rRenderContext.GetOutputSizePixel() );
+ tools::Rectangle aContent, aBound;
+ tools::Rectangle aArea( aPoint, rRenderContext.GetOutputSizePixel() );
if ( rRenderContext.GetNativeControlRegion(ControlType::Toolbar,
bHorz ? ControlPart::ThumbVert : ControlPart::ThumbHorz,
@@ -168,13 +168,13 @@ void ToolBox::ImplUpdateDragArea() const
if( pWrapper )
{
if ( ImplIsFloatingMode() || pWrapper->IsLocked() )
- pWrapper->SetDragArea( Rectangle() );
+ pWrapper->SetDragArea( tools::Rectangle() );
else
{
if( meAlign == WindowAlign::Top || meAlign == WindowAlign::Bottom )
- pWrapper->SetDragArea( Rectangle( 0, 0, ImplGetDragWidth(), GetOutputSizePixel().Height() ) );
+ pWrapper->SetDragArea( tools::Rectangle( 0, 0, ImplGetDragWidth(), GetOutputSizePixel().Height() ) );
else
- pWrapper->SetDragArea( Rectangle( 0, 0, GetOutputSizePixel().Width(), ImplGetDragWidth() ) );
+ pWrapper->SetDragArea( tools::Rectangle( 0, 0, GetOutputSizePixel().Width(), ImplGetDragWidth() ) );
}
}
}
@@ -240,7 +240,7 @@ void ToolBox::ImplCheckUpdate()
}
void ToolBox::ImplDrawGrip(vcl::RenderContext& rRenderContext,
- const Rectangle &aDragArea, int nDragWidth, WindowAlign eAlign, bool bHorz)
+ const tools::Rectangle &aDragArea, int nDragWidth, WindowAlign eAlign, bool bHorz)
{
bool bNativeOk = false;
const ControlPart ePart = bHorz ? ControlPart::ThumbVert : ControlPart::ThumbHorz;
@@ -251,7 +251,7 @@ void ToolBox::ImplDrawGrip(vcl::RenderContext& rRenderContext,
aToolbarValue.maGripRect = aDragArea;
Point aPt;
- Rectangle aCtrlRegion(aPt, aSz);
+ tools::Rectangle aCtrlRegion(aPt, aSz);
ControlState nState = ControlState::ENABLED;
bNativeOk = rRenderContext.DrawNativeControl( ControlType::Toolbar, ePart,
@@ -275,7 +275,7 @@ void ToolBox::ImplDrawGrip(vcl::RenderContext& rRenderContext,
while (i <= height)
{
int x = nDragWidth / 2;
- rRenderContext.DrawEllipse(Rectangle(Point(x, i), Size(2 * fScaleFactor, 2 * fScaleFactor)));
+ rRenderContext.DrawEllipse(tools::Rectangle(Point(x, i), Size(2 * fScaleFactor, 2 * fScaleFactor)));
i += 4 * fScaleFactor;
}
}
@@ -287,7 +287,7 @@ void ToolBox::ImplDrawGrip(vcl::RenderContext& rRenderContext,
while (i <= width)
{
int y = nDragWidth / 2;
- rRenderContext.DrawEllipse(Rectangle(Point(i, y), Size(2 * fScaleFactor, 2 * fScaleFactor)));
+ rRenderContext.DrawEllipse(tools::Rectangle(Point(i, y), Size(2 * fScaleFactor, 2 * fScaleFactor)));
i += 4 * fScaleFactor;
}
}
@@ -398,31 +398,31 @@ void ToolBox::ImplDrawGradientBackground(vcl::RenderContext& rRenderContext, Imp
{
long y = 0;
- rRenderContext.DrawGradient(Rectangle(0, y, aTopLineSz.Width(), y + aTopLineSz.Height()), g);
+ rRenderContext.DrawGradient(tools::Rectangle(0, y, aTopLineSz.Width(), y + aTopLineSz.Height()), g);
y += aTopLineSz.Height();
while (y < (mnDY - aBottomLineSz.Height()))
{
- rRenderContext.DrawGradient(Rectangle(0, y, aLineSz.Width(), y + aLineSz.Height()), g);
+ rRenderContext.DrawGradient(tools::Rectangle(0, y, aLineSz.Width(), y + aLineSz.Height()), g);
y += aLineSz.Height();
}
- rRenderContext.DrawGradient(Rectangle(0, y, aBottomLineSz.Width(), y + aBottomLineSz.Height()), g);
+ rRenderContext.DrawGradient(tools::Rectangle(0, y, aBottomLineSz.Width(), y + aBottomLineSz.Height()), g);
}
else
{
long x = 0;
- rRenderContext.DrawGradient(Rectangle(x, 0, x + aTopLineSz.Width(), aTopLineSz.Height()), g);
+ rRenderContext.DrawGradient(tools::Rectangle(x, 0, x + aTopLineSz.Width(), aTopLineSz.Height()), g);
x += aTopLineSz.Width();
while (x < (mnDX - aBottomLineSz.Width()))
{
- rRenderContext.DrawGradient(Rectangle(x, 0, x + aLineSz.Width(), aLineSz.Height()), g);
+ rRenderContext.DrawGradient(tools::Rectangle(x, 0, x + aLineSz.Width(), aLineSz.Height()), g);
x += aLineSz.Width();
}
- rRenderContext.DrawGradient(Rectangle( x, 0, x + aBottomLineSz.Width(), aBottomLineSz.Height()), g);
+ rRenderContext.DrawGradient(tools::Rectangle( x, 0, x + aBottomLineSz.Width(), aBottomLineSz.Height()), g);
}
if( bLineColor )
@@ -434,7 +434,7 @@ bool ToolBox::ImplDrawNativeBackground(vcl::RenderContext& rRenderContext, const
{
// use NWF
Point aPt;
- Rectangle aCtrlRegion(aPt, GetOutputSizePixel());
+ tools::Rectangle aCtrlRegion(aPt, GetOutputSizePixel());
ControlState nState = ControlState::ENABLED;
return rRenderContext.DrawNativeControl( ControlType::Toolbar, mbHorz ? ControlPart::DrawBackgroundHorz : ControlPart::DrawBackgroundVert,
@@ -470,7 +470,7 @@ void ToolBox::ImplDrawConstantBackground(vcl::RenderContext& rRenderContext, con
}
}
-void ToolBox::ImplDrawBackground(vcl::RenderContext& rRenderContext, const Rectangle& rRect)
+void ToolBox::ImplDrawBackground(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect)
{
// execute pending paint requests
ImplCheckUpdate();
@@ -522,7 +522,7 @@ void ToolBox::ImplDrawBackground(vcl::RenderContext& rRenderContext, const Recta
rRenderContext.Pop();
}
-void ToolBox::ImplErase(vcl::RenderContext& rRenderContext, const Rectangle &rRect, bool bHighlight, bool bHasOpenPopup)
+void ToolBox::ImplErase(vcl::RenderContext& rRenderContext, const tools::Rectangle &rRect, bool bHighlight, bool bHasOpenPopup)
{
// the background of non NWF buttons is painted in a constant color
// to have the same highlight color (transparency in DrawSelectionBackground())
@@ -941,7 +941,7 @@ sal_uInt16 ToolBox::ImplTestLineSize( const Point& rPos ) const
return 0;
}
-void ToolBox::ImplLineSizing( const Point& rPos, Rectangle& rRect, sal_uInt16 nLineMode )
+void ToolBox::ImplLineSizing( const Point& rPos, tools::Rectangle& rRect, sal_uInt16 nLineMode )
{
bool bHorz;
long nOneLineSize;
@@ -1046,7 +1046,7 @@ ImplTBDragMgr::ImplTBDragMgr()
}
void ImplTBDragMgr::StartDragging( ToolBox* pToolBox,
- const Point& rPos, const Rectangle& rRect,
+ const Point& rPos, const tools::Rectangle& rRect,
sal_uInt16 nDragLineMode )
{
mpDragBox = pToolBox;
@@ -1437,10 +1437,10 @@ bool ToolBox::ImplCalcItem()
mnWinHeight = 0;
// determine minimum size necessary in NWF
{
- Rectangle aRect( Point( 0, 0 ), Size( nMinWidth, nMinHeight ) );
- Rectangle aReg( aRect );
+ tools::Rectangle aRect( Point( 0, 0 ), Size( nMinWidth, nMinHeight ) );
+ tools::Rectangle aReg( aRect );
ImplControlValue aVal;
- Rectangle aNativeBounds, aNativeContent;
+ tools::Rectangle aNativeBounds, aNativeContent;
if( IsNativeControlSupported( ControlType::Toolbar, ControlPart::Button ) )
{
if( GetNativeControlRegion( ControlType::Toolbar, ControlPart::Button,
@@ -1466,7 +1466,7 @@ bool ToolBox::ImplCalcItem()
// also calculate the area for comboboxes, drop down list boxes and spinfields
// as these are often inserted into toolboxes; set mnWinHeight to the
// greater of those values to prevent toolbar flickering (#i103385#)
- aRect = Rectangle( Point( 0, 0 ), Size( nMinWidth, nMinHeight ) );
+ aRect = tools::Rectangle( Point( 0, 0 ), Size( nMinWidth, nMinHeight ) );
aReg = aRect;
if( GetNativeControlRegion( ControlType::Combobox, ControlPart::Entire,
aReg,
@@ -1478,7 +1478,7 @@ bool ToolBox::ImplCalcItem()
if( aRect.GetHeight() > mnWinHeight )
mnWinHeight = aRect.GetHeight();
}
- aRect = Rectangle( Point( 0, 0 ), Size( nMinWidth, nMinHeight ) );
+ aRect = tools::Rectangle( Point( 0, 0 ), Size( nMinWidth, nMinHeight ) );
aReg = aRect;
if( GetNativeControlRegion( ControlType::Listbox, ControlPart::Entire,
aReg,
@@ -1490,7 +1490,7 @@ bool ToolBox::ImplCalcItem()
if( aRect.GetHeight() > mnWinHeight )
mnWinHeight = aRect.GetHeight();
}
- aRect = Rectangle( Point( 0, 0 ), Size( nMinWidth, nMinHeight ) );
+ aRect = tools::Rectangle( Point( 0, 0 ), Size( nMinWidth, nMinHeight ) );
aReg = aRect;
if( GetNativeControlRegion( ControlType::Spinbox, ControlPart::Entire,
aReg,
@@ -1974,7 +1974,7 @@ void ToolBox::ImplFormat( bool bResize )
mpData->ImplClearLayoutData();
// recalculate positions and sizes
- Rectangle aEmptyRect;
+ tools::Rectangle aEmptyRect;
long nLineSize;
long nLeft;
long nTop;
@@ -1993,7 +1993,7 @@ void ToolBox::ImplFormat( bool bResize )
ImplCalcBorder( meAlign, mnLeftBorder, mnTopBorder, mnRightBorder, mnBottomBorder );
// update drag area (where the 'grip' will be placed)
- Rectangle aOldDragRect;
+ tools::Rectangle aOldDragRect;
if( pWrapper )
aOldDragRect = pWrapper->GetDragArea();
ImplUpdateDragArea();
@@ -2125,9 +2125,9 @@ void ToolBox::ImplFormat( bool bResize )
nFormatLine = 1;
// save old scroll rectangles and reset them
- Rectangle aOldLowerRect = maLowerRect;
- Rectangle aOldUpperRect = maUpperRect;
- Rectangle aOldMenubuttonRect = mpData->maMenubuttonItem.maRect;
+ tools::Rectangle aOldLowerRect = maLowerRect;
+ tools::Rectangle aOldUpperRect = maUpperRect;
+ tools::Rectangle aOldMenubuttonRect = mpData->maMenubuttonItem.maRect;
maUpperRect = aEmptyRect;
maLowerRect = aEmptyRect;
mpData->maMenubuttonItem.maRect = aEmptyRect;
@@ -2370,7 +2370,7 @@ void ToolBox::ImplFormat( bool bResize )
{
if ( bMustFullPaint )
{
- maPaintRect = Rectangle( mnLeftBorder, mnTopBorder,
+ maPaintRect = tools::Rectangle( mnLeftBorder, mnTopBorder,
mnDX-mnRightBorder, mnDY-mnBottomBorder );
}
else
@@ -2458,7 +2458,7 @@ IMPL_LINK_NOARG(ToolBox, ImplUpdateHdl, Timer *, void)
ImplFormat();
}
-static void ImplDrawMoreIndicator(vcl::RenderContext& rRenderContext, const Rectangle& rRect, bool bSetColor, bool bRotate )
+static void ImplDrawMoreIndicator(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect, bool bSetColor, bool bRotate )
{
rRenderContext.Push(PushFlags::FILLCOLOR | PushFlags::LINECOLOR);
rRenderContext.SetLineColor();
@@ -2490,9 +2490,9 @@ static void ImplDrawMoreIndicator(vcl::RenderContext& rRenderContext, const Rect
long y = rRect.Top() + (rRect.getHeight() - height)/2 + 1;
while( height >= 1)
{
- rRenderContext.DrawRect( Rectangle( x, y, x + linewidth, y ) );
+ rRenderContext.DrawRect( tools::Rectangle( x, y, x + linewidth, y ) );
x += space;
- rRenderContext.DrawRect( Rectangle( x, y, x + linewidth, y ) );
+ rRenderContext.DrawRect( tools::Rectangle( x, y, x + linewidth, y ) );
x -= space;
y++;
if( height <= heightOrig / 2 + 1) x--;
@@ -2515,9 +2515,9 @@ static void ImplDrawMoreIndicator(vcl::RenderContext& rRenderContext, const Rect
long y = rRect.Top() + (rRect.getHeight() - height)/2 + 1;
while( width >= 1)
{
- rRenderContext.DrawRect( Rectangle( x, y, x, y + linewidth ) );
+ rRenderContext.DrawRect( tools::Rectangle( x, y, x, y + linewidth ) );
y += space;
- rRenderContext.DrawRect( Rectangle( x, y, x, y + linewidth ) );
+ rRenderContext.DrawRect( tools::Rectangle( x, y, x, y + linewidth ) );
y -= space;
x++;
if( width <= widthOrig / 2 + 1) y--;
@@ -2529,7 +2529,7 @@ static void ImplDrawMoreIndicator(vcl::RenderContext& rRenderContext, const Rect
rRenderContext.Pop();
}
-static void ImplDrawDropdownArrow(vcl::RenderContext& rRenderContext, const Rectangle& rDropDownRect, bool bSetColor, bool bRotate )
+static void ImplDrawDropdownArrow(vcl::RenderContext& rRenderContext, const tools::Rectangle& rDropDownRect, bool bSetColor, bool bRotate )
{
bool bLineColor = rRenderContext.IsLineColor();
bool bFillColor = rRenderContext.IsFillColor();
@@ -2556,7 +2556,7 @@ static void ImplDrawDropdownArrow(vcl::RenderContext& rRenderContext, const Rect
long y = rDropDownRect.Top() + (rDropDownRect.getHeight() - height)/2;
while( width >= 1)
{
- rRenderContext.DrawRect( Rectangle( x, y, x+width-1, y ) );
+ rRenderContext.DrawRect( tools::Rectangle( x, y, x+width-1, y ) );
y++;
x++;
width -= 2;
@@ -2571,7 +2571,7 @@ static void ImplDrawDropdownArrow(vcl::RenderContext& rRenderContext, const Rect
long y = rDropDownRect.Top() + (rDropDownRect.getHeight() - height)/2;
while( height >= 1)
{
- rRenderContext.DrawRect( Rectangle( x, y, x, y+height-1 ) );
+ rRenderContext.DrawRect( tools::Rectangle( x, y, x, y+height-1 ) );
y++;
x++;
height -= 2;
@@ -2646,7 +2646,7 @@ void ToolBox::ImplDrawSpin(vcl::RenderContext& rRenderContext)
false/*bUpperIn*/, false/*bLowerIn*/, bTmpUpper, bTmpLower, !mbHorz);
}
-void ToolBox::ImplDrawSeparator(vcl::RenderContext& rRenderContext, ImplToolItems::size_type nPos, const Rectangle& rRect)
+void ToolBox::ImplDrawSeparator(vcl::RenderContext& rRenderContext, ImplToolItems::size_type nPos, const tools::Rectangle& rRect)
{
if ( nPos >= mpData->m_aItems.size() - 1 )
// no separator if it's the last item
@@ -2692,7 +2692,7 @@ void ToolBox::ImplDrawSeparator(vcl::RenderContext& rRenderContext, ImplToolItem
}
}
-void ToolBox::ImplDrawButton(vcl::RenderContext& rRenderContext, const Rectangle &rRect, sal_uInt16 highlight,
+void ToolBox::ImplDrawButton(vcl::RenderContext& rRenderContext, const tools::Rectangle &rRect, sal_uInt16 highlight,
bool bChecked, bool bEnabled, bool bIsWindow )
{
// draws toolbar button background either native or using a coloured selection
@@ -2761,7 +2761,7 @@ void ToolBox::ImplDrawItem(vcl::RenderContext& rRenderContext, ImplToolItems::si
((pItem->mnBits & ToolBoxItemBits::DROPDOWNONLY) != ToolBoxItemBits::DROPDOWNONLY) )
|| ( ( pItem->mnBits & ToolBoxItemBits::DROPDOWN) && ( meTextPosition == ToolBoxTextPosition::Bottom ) ) )
{
- Rectangle aArrowRect = pItem->GetDropDownRect( mbHorz && ( meTextPosition == ToolBoxTextPosition::Right ) );
+ tools::Rectangle aArrowRect = pItem->GetDropDownRect( mbHorz && ( meTextPosition == ToolBoxTextPosition::Right ) );
if( aArrowRect.Top() == pItem->maRect.Top() ) // dropdown arrow on right side
aBtnSize.Width() -= aArrowRect.GetWidth();
else if ( !( (meTextPosition == ToolBoxTextPosition::Bottom)
@@ -2772,7 +2772,7 @@ void ToolBox::ImplDrawItem(vcl::RenderContext& rRenderContext, ImplToolItems::si
/* Compute the button/separator rectangle here, we'll need it for
* both the buttons and the separators. */
- Rectangle aButtonRect( pItem->maRect.TopLeft(), aBtnSize );
+ tools::Rectangle aButtonRect( pItem->maRect.TopLeft(), aBtnSize );
long nOffX = SMALLBUTTON_OFF_NORMAL_X;
long nOffY = SMALLBUTTON_OFF_NORMAL_Y;
long nImageOffX = 0;
@@ -2960,7 +2960,7 @@ void ToolBox::ImplDrawItem(vcl::RenderContext& rRenderContext, ImplToolItems::si
// paint optional drop down arrow
if ( pItem->mnBits & ToolBoxItemBits::DROPDOWN )
{
- Rectangle aDropDownRect( pItem->GetDropDownRect( mbHorz && ( meTextPosition == ToolBoxTextPosition::Right ) ) );
+ tools::Rectangle aDropDownRect( pItem->GetDropDownRect( mbHorz && ( meTextPosition == ToolBoxTextPosition::Right ) ) );
bool bSetColor = true;
if ( !pItem->mbEnabled || !IsEnabled() )
{
@@ -2990,7 +2990,7 @@ void ToolBox::ImplDrawFloatwinBorder(vcl::RenderContext& rRenderContext, ImplToo
{
if ( !pItem->maRect.IsEmpty() )
{
- Rectangle aRect( mpFloatWin->ImplGetItemEdgeClipRect() );
+ tools::Rectangle aRect( mpFloatWin->ImplGetItemEdgeClipRect() );
aRect.SetPos( AbsoluteScreenToOutputPixel( aRect.TopLeft() ) );
rRenderContext.SetLineColor(rRenderContext.GetSettings().GetStyleSettings().GetShadowColor());
Point p1, p2;
@@ -3649,7 +3649,7 @@ void ToolBox::MouseButtonDown( const MouseEvent& rMEvt )
aPos = ScreenToOutputPixel( aPos );
// start dragging
- pMgr->StartDragging( this, aMousePos, Rectangle( aPos, aSize ),
+ pMgr->StartDragging( this, aMousePos, tools::Rectangle( aPos, aSize ),
nLineMode );
return;
}
@@ -3720,12 +3720,12 @@ void ToolBox::InvalidateSpin(bool bUpperIn, bool bLowerIn)
Invalidate(maLowerRect);
}
-void ToolBox::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rPaintRect)
+void ToolBox::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rPaintRect)
{
if( mpData->mbIsPaintLocked )
return;
- if (rPaintRect == Rectangle(0, 0, mnDX-1, mnDY-1))
+ if (rPaintRect == tools::Rectangle(0, 0, mnDX-1, mnDY-1))
mbFullPaint = true;
ImplFormat();
mbFullPaint = false;
@@ -3824,7 +3824,7 @@ void ToolBox::Resize()
if (!aExpandables.empty())
{
//Get how big the optimal size is
- Rectangle aBounds;
+ tools::Rectangle aBounds;
for (const ImplToolItem & rItem : mpData->m_aItems)
{
aBounds.Union( rItem.maRect );
@@ -3864,17 +3864,17 @@ void ToolBox::Resize()
if ( mnRightBorder )
{
if ( nOldDX > mnDX )
- Invalidate( Rectangle( mnDX-mnRightBorder-1, 0, mnDX, mnDY ) );
+ Invalidate( tools::Rectangle( mnDX-mnRightBorder-1, 0, mnDX, mnDY ) );
else
- Invalidate( Rectangle( nOldDX-mnRightBorder-1, 0, nOldDX, nOldDY ) );
+ Invalidate( tools::Rectangle( nOldDX-mnRightBorder-1, 0, nOldDX, nOldDY ) );
}
if ( mnBottomBorder )
{
if ( nOldDY > mnDY )
- Invalidate( Rectangle( 0, mnDY-mnBottomBorder-1, mnDX, mnDY ) );
+ Invalidate( tools::Rectangle( 0, mnDY-mnBottomBorder-1, mnDX, mnDY ) );
else
- Invalidate( Rectangle( 0, nOldDY-mnBottomBorder-1, nOldDX, nOldDY ) );
+ Invalidate( tools::Rectangle( 0, nOldDY-mnBottomBorder-1, nOldDX, nOldDY ) );
}
}
}
@@ -3917,7 +3917,7 @@ void ToolBox::RequestHelp( const HelpEvent& rHEvt )
return;
else
nItemId = mnHighItemId;
- Rectangle aRect( GetItemRect( nItemId ) );
+ tools::Rectangle aRect( GetItemRect( nItemId ) );
if( aRect.IsEmpty() )
return;
else
@@ -3929,7 +3929,7 @@ void ToolBox::RequestHelp( const HelpEvent& rHEvt )
if ( rHEvt.GetMode() & (HelpEventMode::BALLOON | HelpEventMode::QUICK) )
{
// get rectangle
- Rectangle aTempRect = GetItemRect( nItemId );
+ tools::Rectangle aTempRect = GetItemRect( nItemId );
Point aPt = OutputToScreenPixel( aTempRect.TopLeft() );
aTempRect.Left() = aPt.X();
aTempRect.Top() = aPt.Y();
@@ -4079,7 +4079,7 @@ void ToolBox::Command( const CommandEvent& rCEvt )
}
else if ( rCEvt.GetCommand() == CommandEventId::ContextMenu )
{
- ExecuteCustomMenu( Rectangle( rCEvt.GetMousePosPixel(), rCEvt.GetMousePosPixel() ) );
+ ExecuteCustomMenu( tools::Rectangle( rCEvt.GetMousePosPixel(), rCEvt.GetMousePosPixel() ) );
return;
}
@@ -4231,7 +4231,7 @@ void ToolBox::StartDocking()
DockingWindow::StartDocking();
}
-bool ToolBox::Docking( const Point& rPos, Rectangle& rRect )
+bool ToolBox::Docking( const Point& rPos, tools::Rectangle& rRect )
{
// do nothing during dragging, it was calculated before
if ( mbDragging )
@@ -4242,7 +4242,7 @@ bool ToolBox::Docking( const Point& rPos, Rectangle& rRect )
DockingWindow::Docking( rPos, rRect );
// if the mouse is outside the area, it can only become a floating window
- Rectangle aDockingRect( rRect );
+ tools::Rectangle aDockingRect( rRect );
if ( !ImplIsFloatingMode() )
{
// don't use tracking rectangle for alignment check, because it will be too large
@@ -4256,10 +4256,10 @@ bool ToolBox::Docking( const Point& rPos, Rectangle& rRect )
aDockingRect.SetPos( ImplGetFrameWindow()->GetPointerPosPixel() );
}
- Rectangle aIntersection = maOutDockRect.GetIntersection( aDockingRect );
+ tools::Rectangle aIntersection = maOutDockRect.GetIntersection( aDockingRect );
if ( !aIntersection.IsEmpty() )
{
- Rectangle aInRect = maInDockRect;
+ tools::Rectangle aInRect = maInDockRect;
Size aDockSize;
aDockSize.Width() = ImplCalcSize( mnLines, TB_CALCMODE_VERT ).Width();
aDockSize.Height() = ImplCalcSize( mnLines, TB_CALCMODE_HORZ ).Height();
@@ -4282,7 +4282,7 @@ bool ToolBox::Docking( const Point& rPos, Rectangle& rRect )
// if the mouse is outside the Dock area, it can only
// become a floating window
- Rectangle aIntersect = aInRect.GetIntersection( aDockingRect );
+ tools::Rectangle aIntersect = aInRect.GetIntersection( aDockingRect );
if ( aIntersect == aDockingRect )
bFloatMode = true;
else
@@ -4355,7 +4355,7 @@ bool ToolBox::Docking( const Point& rPos, Rectangle& rRect )
return bFloatMode;
}
-void ToolBox::EndDocking( const Rectangle& rRect, bool bFloatMode )
+void ToolBox::EndDocking( const tools::Rectangle& rRect, bool bFloatMode )
{
if ( !IsDockingCanceled() )
{
diff --git a/vcl/source/window/toolbox2.cxx b/vcl/source/window/toolbox2.cxx
index b2d708dfbb32..19cc5a029648 100644
--- a/vcl/source/window/toolbox2.cxx
+++ b/vcl/source/window/toolbox2.cxx
@@ -241,9 +241,9 @@ void ImplToolItem::DetermineButtonDrawStyle( ButtonType eButtonType, bool& rbIma
}
}
-Rectangle ImplToolItem::GetDropDownRect( bool bHorz ) const
+tools::Rectangle ImplToolItem::GetDropDownRect( bool bHorz ) const
{
- Rectangle aRect;
+ tools::Rectangle aRect;
if( (mnBits & ToolBoxItemBits::DROPDOWN) && !maRect.IsEmpty() )
{
aRect = maRect;
@@ -281,7 +281,7 @@ void ToolBox::ImplInvalidate( bool bNewCalc, bool bFullPaint )
// do we need to redraw?
if ( IsReallyVisible() && IsUpdateMode() )
{
- Invalidate( Rectangle( mnLeftBorder, mnTopBorder,
+ Invalidate( tools::Rectangle( mnLeftBorder, mnTopBorder,
mnDX-mnRightBorder-1, mnDY-mnBottomBorder-1 ) );
mpIdle->Stop();
}
@@ -310,7 +310,7 @@ void ToolBox::ImplUpdateItem( ImplToolItems::size_type nIndex )
if ( nIndex == ITEM_NOTFOUND )
{
// #i52217# no immediate draw as this might lead to paint problems
- Invalidate( Rectangle( mnLeftBorder, mnTopBorder, mnDX-mnRightBorder-1, mnDY-mnBottomBorder-1 ) );
+ Invalidate( tools::Rectangle( mnLeftBorder, mnTopBorder, mnDX-mnRightBorder-1, mnDY-mnBottomBorder-1 ) );
}
else
{
@@ -801,12 +801,12 @@ sal_uInt16 ToolBox::GetItemId(const OUString &rCommand) const
return 0;
}
-Point ToolBox::ImplGetPopupPosition( const Rectangle& rRect, const Size& rSize ) const
+Point ToolBox::ImplGetPopupPosition( const tools::Rectangle& rRect, const Size& rSize ) const
{
Point aPos;
if( !rRect.IsEmpty() )
{
- Rectangle aScreen = GetDesktopRectPixel();
+ tools::Rectangle aScreen = GetDesktopRectPixel();
// the popup should be positioned so that it will not cover
// the item rect and that it fits the desktop
@@ -855,7 +855,7 @@ Point ToolBox::ImplGetPopupPosition( const Rectangle& rRect, const Size& rSize )
return aPos;
}
-Rectangle ToolBox::GetItemRect( sal_uInt16 nItemId )
+tools::Rectangle ToolBox::GetItemRect( sal_uInt16 nItemId )
{
if ( mbCalc || mbFormat )
ImplFormat();
@@ -864,7 +864,7 @@ Rectangle ToolBox::GetItemRect( sal_uInt16 nItemId )
return GetItemPosRect( nPos );
}
-Rectangle ToolBox::GetItemPosRect( ImplToolItems::size_type nPos )
+tools::Rectangle ToolBox::GetItemPosRect( ImplToolItems::size_type nPos )
{
if ( mbCalc || mbFormat )
ImplFormat();
@@ -872,10 +872,10 @@ Rectangle ToolBox::GetItemPosRect( ImplToolItems::size_type nPos )
if ( nPos < mpData->m_aItems.size() )
return mpData->m_aItems[nPos].maRect;
else
- return Rectangle();
+ return tools::Rectangle();
}
-Rectangle ToolBox::GetOverflowRect() const
+tools::Rectangle ToolBox::GetOverflowRect() const
{
return mpData->maMenubuttonItem.maRect;
}
@@ -1346,7 +1346,7 @@ bool ToolBox::IsItemReallyVisible( sal_uInt16 nItemId ) const
{
// is the item on the visible area of the toolbox?
bool bRet = false;
- Rectangle aRect( mnLeftBorder, mnTopBorder, mnDX-mnRightBorder, mnDY-mnBottomBorder );
+ tools::Rectangle aRect( mnLeftBorder, mnTopBorder, mnDX-mnRightBorder, mnDY-mnBottomBorder );
ImplToolItem* pItem = ImplGetItem( nItemId );
if ( pItem && pItem->mbVisible &&
@@ -1491,7 +1491,7 @@ OUString ToolBox::GetDisplayText() const
return mpData->m_pLayoutData ? OUString(mpData->m_pLayoutData->m_aDisplayText) : OUString();
}
-Rectangle ToolBox::GetCharacterBounds( sal_uInt16 nItemID, long nIndex )
+tools::Rectangle ToolBox::GetCharacterBounds( sal_uInt16 nItemID, long nIndex )
{
long nItemIndex = -1;
if( ! mpData->m_pLayoutData )
@@ -1507,7 +1507,7 @@ Rectangle ToolBox::GetCharacterBounds( sal_uInt16 nItemID, long nIndex )
}
}
}
- return (mpData->m_pLayoutData && nItemIndex != -1) ? mpData->m_pLayoutData->GetCharacterBounds( nItemIndex+nIndex ) : Rectangle();
+ return (mpData->m_pLayoutData && nItemIndex != -1) ? mpData->m_pLayoutData->GetCharacterBounds( nItemIndex+nIndex ) : tools::Rectangle();
}
long ToolBox::GetIndexForPoint( const Point& rPoint, sal_uInt16& rItemID )
@@ -1693,7 +1693,7 @@ IMPL_LINK_NOARG(ToolBox, ImplCallExecuteCustomMenu, void*, void)
bool bBorderDel = false;
VclPtr<vcl::Window> pWin = this;
- Rectangle aMenuRect = mpData->maMenuRect;
+ tools::Rectangle aMenuRect = mpData->maMenuRect;
mpData->maMenuRect.SetEmpty();
VclPtr<ImplBorderWindow> pBorderWin;
if( aMenuRect.IsEmpty() && IsFloatingMode() )
@@ -1708,7 +1708,7 @@ IMPL_LINK_NOARG(ToolBox, ImplCallExecuteCustomMenu, void*, void)
}
}
- sal_uInt16 uId = GetMenu()->Execute( pWin, Rectangle( ImplGetPopupPosition( aMenuRect, Size() ), Size() ),
+ sal_uInt16 uId = GetMenu()->Execute( pWin, tools::Rectangle( ImplGetPopupPosition( aMenuRect, Size() ), Size() ),
PopupMenuFlags::ExecuteDown | PopupMenuFlags::NoMouseUpClose );
if ( pWin->IsDisposed() )
@@ -1729,7 +1729,7 @@ IMPL_LINK_NOARG(ToolBox, ImplCallExecuteCustomMenu, void*, void)
}
}
-void ToolBox::ExecuteCustomMenu( const Rectangle& rRect )
+void ToolBox::ExecuteCustomMenu( const tools::Rectangle& rRect )
{
if( IsMenuEnabled() )
{
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index c0186a7049ff..6bf40c96f20b 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -1211,9 +1211,9 @@ void Window::ImplInitAppFontData( vcl::Window* pWindow )
// of control sizes, if yes, make app font scalings larger
// so dialog positioning is not completely off
ImplControlValue aControlValue;
- Rectangle aCtrlRegion( Point(), Size( nTextWidth < 10 ? 10 : nTextWidth, nTextHeight < 10 ? 10 : nTextHeight ) );
- Rectangle aBoundingRgn( aCtrlRegion );
- Rectangle aContentRgn( aCtrlRegion );
+ tools::Rectangle aCtrlRegion( Point(), Size( nTextWidth < 10 ? 10 : nTextWidth, nTextHeight < 10 ? 10 : nTextHeight ) );
+ tools::Rectangle aBoundingRgn( aCtrlRegion );
+ tools::Rectangle aContentRgn( aCtrlRegion );
if( pWindow->GetNativeControlRegion( ControlType::Editbox, ControlPart::Entire, aCtrlRegion,
ControlState::ENABLED, aControlValue, OUString(),
aBoundingRgn, aContentRgn ) )
@@ -1248,7 +1248,7 @@ void Window::CopyDeviceArea( SalTwoRect& aPosAry, bool bWindowInvalidate )
if (bWindowInvalidate)
{
- const Rectangle aSrcRect(Point(aPosAry.mnSrcX, aPosAry.mnSrcY),
+ const tools::Rectangle aSrcRect(Point(aPosAry.mnSrcX, aPosAry.mnSrcY),
Size(aPosAry.mnSrcWidth, aPosAry.mnSrcHeight));
ImplMoveAllInvalidateRegions(aSrcRect,
@@ -1454,7 +1454,7 @@ void Window::ImplPosSizeWindow( long nX, long nY,
if ( IsReallyVisible() )
{
- Rectangle aOldWinRect( Point( nOldOutOffX, nOldOutOffY ),
+ tools::Rectangle aOldWinRect( Point( nOldOutOffX, nOldOutOffY ),
Size( nOldOutWidth, nOldOutHeight ) );
pOldRegion = new vcl::Region( aOldWinRect );
if ( mpWindowImpl->mbWinRegion )
@@ -1542,7 +1542,7 @@ void Window::ImplPosSizeWindow( long nX, long nY,
if ( bCopyBits && !pOverlapRegion )
{
pOverlapRegion = new vcl::Region();
- ImplCalcOverlapRegion( Rectangle( Point( mnOutOffX, mnOutOffY ),
+ ImplCalcOverlapRegion( tools::Rectangle( Point( mnOutOffX, mnOutOffY ),
Size( mnOutWidth, mnOutHeight ) ),
*pOverlapRegion, false, true );
}
@@ -1560,7 +1560,7 @@ void Window::ImplPosSizeWindow( long nX, long nY,
if ( bCopyBits && !pOverlapRegion )
{
pOverlapRegion = new vcl::Region();
- ImplCalcOverlapRegion( Rectangle( Point( mnOutOffX, mnOutOffY ),
+ ImplCalcOverlapRegion( tools::Rectangle( Point( mnOutOffX, mnOutOffY ),
Size( mnOutWidth, mnOutHeight ) ),
*pOverlapRegion, false, true );
}
@@ -1646,7 +1646,7 @@ void Window::ImplPosSizeWindow( long nX, long nY,
if ( bCopyBits && bParentPaint && !HasPaintEvent() )
{
Point aPoint( mnOutOffX, mnOutOffY );
- vcl::Region aRegion( Rectangle( aPoint,
+ vcl::Region aRegion( tools::Rectangle( aPoint,
Size( mnOutWidth, mnOutHeight ) ) );
if ( mpWindowImpl->mbWinRegion )
aRegion.Intersect( ImplPixelToDevicePixel( mpWindowImpl->maWinRegion ) );
@@ -1659,7 +1659,7 @@ void Window::ImplPosSizeWindow( long nX, long nY,
if ( !aRegion.IsEmpty() )
{
// adapt Paint areas
- ImplMoveAllInvalidateRegions( Rectangle( Point( nOldOutOffX, nOldOutOffY ),
+ ImplMoveAllInvalidateRegions( tools::Rectangle( Point( nOldOutOffX, nOldOutOffY ),
Size( nOldOutWidth, nOldOutHeight ) ),
mnOutOffX-nOldOutOffX, mnOutOffY-nOldOutOffY,
true );
@@ -1698,7 +1698,7 @@ void Window::ImplPosSizeWindow( long nX, long nY,
else
{
Point aPoint( mnOutOffX, mnOutOffY );
- vcl::Region aRegion( Rectangle( aPoint,
+ vcl::Region aRegion( tools::Rectangle( aPoint,
Size( mnOutWidth, mnOutHeight ) ) );
aRegion.Exclude( *pOldRegion );
if ( mpWindowImpl->mbWinRegion )
@@ -1875,7 +1875,7 @@ void Window::RequestHelp( const HelpEvent& rHEvt )
Point aPos = GetPosPixel();
if ( ImplGetParent() && !ImplIsOverlapWindow() )
aPos = ImplGetParent()->OutputToScreenPixel( aPos );
- Rectangle aRect( aPos, GetSizePixel() );
+ tools::Rectangle aRect( aPos, GetSizePixel() );
Help::ShowBalloon( this, rHEvt.GetMousePosPixel(), aRect, rStr );
}
@@ -1890,7 +1890,7 @@ void Window::RequestHelp( const HelpEvent& rHEvt )
Point aPos = GetPosPixel();
if ( ImplGetParent() && !ImplIsOverlapWindow() )
aPos = ImplGetParent()->OutputToScreenPixel( aPos );
- Rectangle aRect( aPos, GetSizePixel() );
+ tools::Rectangle aRect( aPos, GetSizePixel() );
OUString aHelpText;
if ( !rStr.isEmpty() )
aHelpText = GetHelpText();
@@ -2102,7 +2102,7 @@ void Window::EndExtTextInput()
ImplGetFrame()->EndExtTextInput( EndExtTextInputFlags::Complete );
}
-void Window::SetCursorRect( const Rectangle* pRect, long nExtTextInputWidth )
+void Window::SetCursorRect( const tools::Rectangle* pRect, long nExtTextInputWidth )
{
ImplWinData* pWinData = ImplGetWinData();
@@ -2119,14 +2119,14 @@ void Window::SetCursorRect( const Rectangle* pRect, long nExtTextInputWidth )
else
{
if ( pRect )
- pWinData->mpCursorRect = new Rectangle( *pRect );
+ pWinData->mpCursorRect = new tools::Rectangle( *pRect );
}
pWinData->mnCursorExtWidth = nExtTextInputWidth;
}
-const Rectangle* Window::GetCursorRect() const
+const tools::Rectangle* Window::GetCursorRect() const
{
ImplWinData* pWinData = ImplGetWinData();
@@ -2140,7 +2140,7 @@ long Window::GetCursorExtTextInputWidth() const
return pWinData->mnCursorExtWidth;
}
-void Window::SetCompositionCharRect( const Rectangle* pRect, long nCompositionLength, bool bVertical ) {
+void Window::SetCompositionCharRect( const tools::Rectangle* pRect, long nCompositionLength, bool bVertical ) {
ImplWinData* pWinData = ImplGetWinData();
delete[] pWinData->mpCompositionCharRects;
@@ -2149,7 +2149,7 @@ void Window::SetCompositionCharRect( const Rectangle* pRect, long nCompositionLe
pWinData->mnCompositionCharRects = nCompositionLength;
if ( pRect && (nCompositionLength > 0) )
{
- pWinData->mpCompositionCharRects = new Rectangle[nCompositionLength];
+ pWinData->mpCompositionCharRects = new tools::Rectangle[nCompositionLength];
for (long i = 0; i < nCompositionLength; ++i)
pWinData->mpCompositionCharRects[i] = pRect[i];
}
@@ -2252,7 +2252,7 @@ void Window::Show(bool bVisible, ShowFlags nFlags)
* invalidated. Workaround: invalidate an area on the parent, too
*/
const int workaround_border = 5;
- Rectangle aBounds( aInvRegion.GetBoundRect() );
+ tools::Rectangle aBounds( aInvRegion.GetBoundRect() );
aBounds.Left() -= workaround_border;
aBounds.Top() -= workaround_border;
aBounds.Right() += workaround_border;
@@ -2759,7 +2759,7 @@ void Window::setPosSizePixel( long nX, long nY,
if( pParent && pParent->ImplIsAntiparallel() )
{
// --- RTL --- (re-mirror at parent window)
- Rectangle aRect( Point ( nX, nY ), Size( nWidth, nHeight ) );
+ tools::Rectangle aRect( Point ( nX, nY ), Size( nWidth, nHeight ) );
const OutputDevice *pParentOutDev = pParent->GetOutDev();
pParentOutDev->ReMirror( aRect );
nX = aRect.Left();
@@ -2845,9 +2845,9 @@ Point Window::GetPosPixel() const
return mpWindowImpl->maPos;
}
-Rectangle Window::GetDesktopRectPixel() const
+tools::Rectangle Window::GetDesktopRectPixel() const
{
- Rectangle rRect;
+ tools::Rectangle rRect;
mpWindowImpl->mpFrameWindow->mpWindowImpl->mpFrame->GetWorkArea( rRect );
return rRect;
}
@@ -2921,7 +2921,7 @@ Point Window::AbsoluteScreenToOutputPixel( const Point& rPos ) const
return p;
}
-Rectangle Window::ImplOutputToUnmirroredAbsoluteScreenPixel( const Rectangle &rRect ) const
+tools::Rectangle Window::ImplOutputToUnmirroredAbsoluteScreenPixel( const tools::Rectangle &rRect ) const
{
// this method creates unmirrored screen coordinates to be compared with the desktop
// and is used for positioning of RTL popup windows correctly on the screen
@@ -2935,22 +2935,22 @@ Rectangle Window::ImplOutputToUnmirroredAbsoluteScreenPixel( const Rectangle &rR
p2.X() = g.nX+g.nWidth-p2.X();
p2.Y() += g.nY;
- return Rectangle( p1, p2 );
+ return tools::Rectangle( p1, p2 );
}
-Rectangle Window::GetWindowExtentsRelative( vcl::Window *pRelativeWindow ) const
+tools::Rectangle Window::GetWindowExtentsRelative( vcl::Window *pRelativeWindow ) const
{
// with decoration
return ImplGetWindowExtentsRelative( pRelativeWindow, false );
}
-Rectangle Window::GetClientWindowExtentsRelative() const
+tools::Rectangle Window::GetClientWindowExtentsRelative() const
{
// without decoration
return ImplGetWindowExtentsRelative( nullptr, true );
}
-Rectangle Window::ImplGetWindowExtentsRelative( vcl::Window *pRelativeWindow, bool bClientOnly ) const
+tools::Rectangle Window::ImplGetWindowExtentsRelative( vcl::Window *pRelativeWindow, bool bClientOnly ) const
{
SalFrameGeometry g = mpWindowImpl->mpFrame->GetGeometry();
// make sure we use the extent of our border window,
@@ -2975,23 +2975,23 @@ Rectangle Window::ImplGetWindowExtentsRelative( vcl::Window *pRelativeWindow, bo
vcl::Window *pRelWin = (!bClientOnly && pRelativeWindow->mpWindowImpl->mpBorderWindow) ? pRelativeWindow->mpWindowImpl->mpBorderWindow.get() : pRelativeWindow;
aPos = pRelWin->AbsoluteScreenToOutputPixel( aPos );
}
- return Rectangle( aPos, aSize );
+ return tools::Rectangle( aPos, aSize );
}
void Window::Scroll( long nHorzScroll, long nVertScroll, ScrollFlags nFlags )
{
- ImplScroll( Rectangle( Point( mnOutOffX, mnOutOffY ),
+ ImplScroll( tools::Rectangle( Point( mnOutOffX, mnOutOffY ),
Size( mnOutWidth, mnOutHeight ) ),
nHorzScroll, nVertScroll, nFlags & ~ScrollFlags::Clip );
}
void Window::Scroll( long nHorzScroll, long nVertScroll,
- const Rectangle& rRect, ScrollFlags nFlags )
+ const tools::Rectangle& rRect, ScrollFlags nFlags )
{
OutputDevice *pOutDev = GetOutDev();
- Rectangle aRect = pOutDev->ImplLogicToDevicePixel( rRect );
- aRect.Intersection( Rectangle( Point( mnOutOffX, mnOutOffY ), Size( mnOutWidth, mnOutHeight ) ) );
+ tools::Rectangle aRect = pOutDev->ImplLogicToDevicePixel( rRect );
+ aRect.Intersection( tools::Rectangle( Point( mnOutOffX, mnOutOffY ), Size( mnOutWidth, mnOutHeight ) ) );
if ( !aRect.IsEmpty() )
ImplScroll( aRect, nHorzScroll, nVertScroll, nFlags );
}
@@ -2999,7 +2999,7 @@ void Window::Scroll( long nHorzScroll, long nVertScroll,
void Window::Flush()
{
- const Rectangle aWinRect( Point( mnOutOffX, mnOutOffY ), Size( mnOutWidth, mnOutHeight ) );
+ const tools::Rectangle aWinRect( Point( mnOutOffX, mnOutOffY ), Size( mnOutWidth, mnOutHeight ) );
mpWindowImpl->mpFrame->Flush( aWinRect );
}
@@ -3295,7 +3295,7 @@ Reference< XClipboard > Window::GetPrimarySelection()
return static_cast < XClipboard * > (nullptr);
}
-void Window::RecordLayoutData( vcl::ControlLayoutData* pLayout, const Rectangle& rRect )
+void Window::RecordLayoutData( vcl::ControlLayoutData* pLayout, const tools::Rectangle& rRect )
{
assert(mpOutDevData);
mpOutDevData->mpRecordLayout = pLayout;
@@ -3304,7 +3304,7 @@ void Window::RecordLayoutData( vcl::ControlLayoutData* pLayout, const Rectangle&
mpOutDevData->mpRecordLayout = nullptr;
}
-void Window::DrawSelectionBackground( const Rectangle& rRect,
+void Window::DrawSelectionBackground( const tools::Rectangle& rRect,
sal_uInt16 highlight,
bool bChecked,
bool bDrawBorder
@@ -3336,7 +3336,7 @@ void Window::DrawSelectionBackground( const Rectangle& rRect,
aSelectionBorderCol = aSelectionFillCol;
}
- Rectangle aRect( rRect );
+ tools::Rectangle aRect( rRect );
Color oldFillCol = GetFillColor();
Color oldLineCol = GetLineColor();
diff --git a/vcl/source/window/window2.cxx b/vcl/source/window/window2.cxx
index 9882ce3e3e77..a88d1c0c8a40 100644
--- a/vcl/source/window/window2.cxx
+++ b/vcl/source/window/window2.cxx
@@ -49,7 +49,7 @@ using namespace com::sun::star;
namespace vcl {
-void Window::ShowFocus( const Rectangle& rRect )
+void Window::ShowFocus( const tools::Rectangle& rRect )
{
if( mpWindowImpl->mbInShowFocus )
return;
@@ -77,7 +77,7 @@ void Window::ShowFocus( const Rectangle& rRect )
ImplInvertFocus( rRect );
}
if ( !pWinData->mpFocusRect )
- pWinData->mpFocusRect = new Rectangle( rRect );
+ pWinData->mpFocusRect = new tools::Rectangle( rRect );
else
*(pWinData->mpFocusRect) = rRect;
mpWindowImpl->mbFocusVisible = true;
@@ -127,7 +127,7 @@ void Window::HideFocus()
mpWindowImpl->mbInHideFocus = false;
}
-void Window::ShowTracking( const Rectangle& rRect, ShowTrackFlags nFlags )
+void Window::ShowTracking( const tools::Rectangle& rRect, ShowTrackFlags nFlags )
{
ImplWinData* pWinData = ImplGetWinData();
@@ -146,7 +146,7 @@ void Window::ShowTracking( const Rectangle& rRect, ShowTrackFlags nFlags )
}
if ( !pWinData->mpTrackRect )
- pWinData->mpTrackRect = new Rectangle( rRect );
+ pWinData->mpTrackRect = new tools::Rectangle( rRect );
else
*(pWinData->mpTrackRect) = rRect;
pWinData->mnTrackFlags = nFlags;
@@ -164,10 +164,10 @@ void Window::HideTracking()
}
}
-void Window::InvertTracking( const Rectangle& rRect, ShowTrackFlags nFlags )
+void Window::InvertTracking( const tools::Rectangle& rRect, ShowTrackFlags nFlags )
{
OutputDevice *pOutDev = GetOutDev();
- Rectangle aRect( pOutDev->ImplLogicToDevicePixel( rRect ) );
+ tools::Rectangle aRect( pOutDev->ImplLogicToDevicePixel( rRect ) );
if ( aRect.IsEmpty() )
return;
@@ -202,7 +202,7 @@ void Window::InvertTracking( const Rectangle& rRect, ShowTrackFlags nFlags )
if ( nFlags & ShowTrackFlags::Clip )
{
Point aPoint( mnOutOffX, mnOutOffY );
- vcl::Region aRegion( Rectangle( aPoint,
+ vcl::Region aRegion( tools::Rectangle( aPoint,
Size( mnOutWidth, mnOutHeight ) ) );
ImplClipBoundaries( aRegion, false, false );
pOutDev->SelectClipRegion( aRegion, pGraphics );
@@ -266,7 +266,7 @@ void Window::InvertTracking( const tools::Polygon& rPoly, ShowTrackFlags nFlags
if ( nFlags & ShowTrackFlags::Clip )
{
Point aPoint( mnOutOffX, mnOutOffY );
- vcl::Region aRegion( Rectangle( aPoint,
+ vcl::Region aRegion( tools::Rectangle( aPoint,
Size( mnOutWidth, mnOutHeight ) ) );
ImplClipBoundaries( aRegion, false, false );
pOutDev->SelectClipRegion( aRegion, pGraphics );
diff --git a/vcl/source/window/winproc.cxx b/vcl/source/window/winproc.cxx
index 567f1c969412..17ada9bc8752 100644
--- a/vcl/source/window/winproc.cxx
+++ b/vcl/source/window/winproc.cxx
@@ -1240,7 +1240,7 @@ static bool ImplHandleEndExtTextInput( vcl::Window* /* pWindow */ )
}
static void ImplHandleExtTextInputPos( vcl::Window* pWindow,
- Rectangle& rRect, long& rInputWidth,
+ tools::Rectangle& rRect, long& rInputWidth,
bool * pVertical )
{
ImplSVData* pSVData = ImplGetSVData();
@@ -1259,7 +1259,7 @@ static void ImplHandleExtTextInputPos( vcl::Window* pWindow,
{
const OutputDevice *pChildOutDev = pChild->GetOutDev();
ImplCallCommand( pChild, CommandEventId::CursorPos );
- const Rectangle* pRect = pChild->GetCursorRect();
+ const tools::Rectangle* pRect = pChild->GetCursorRect();
if ( pRect )
rRect = pChildOutDev->ImplLogicToDevicePixel( *pRect );
else
@@ -1271,10 +1271,10 @@ static void ImplHandleExtTextInputPos( vcl::Window* pWindow,
Size aSize = pChild->LogicToPixel( pCursor->GetSize() );
if ( !aSize.Width() )
aSize.Width() = pChild->GetSettings().GetStyleSettings().GetCursorSize();
- rRect = Rectangle( aPos, aSize );
+ rRect = tools::Rectangle( aPos, aSize );
}
else
- rRect = Rectangle( Point( pChild->GetOutOffXPixel(), pChild->GetOutOffYPixel() ), Size() );
+ rRect = tools::Rectangle( Point( pChild->GetOutOffXPixel(), pChild->GetOutOffYPixel() ), Size() );
}
rInputWidth = pChild->ImplLogicWidthToDevicePixel( pChild->GetCursorExtTextInputWidth() );
if ( !rInputWidth )
@@ -1573,7 +1573,7 @@ static bool ImplHandleLongPress(vcl::Window *pWindow, const SalLongPressEvent& r
return aHandler.HandleEvent();
}
-static void ImplHandlePaint( vcl::Window* pWindow, const Rectangle& rBoundRect, bool bImmediateUpdate )
+static void ImplHandlePaint( vcl::Window* pWindow, const tools::Rectangle& rBoundRect, bool bImmediateUpdate )
{
// system paint events must be checked for re-mirroring
pWindow->ImplGetWindowImpl()->mnPaintFlags |= ImplPaintFlags::CheckRtl;
@@ -2157,7 +2157,7 @@ static void ImplHandleSalSettings( SalEvent nEvent )
static void ImplHandleSalExtTextInputPos( vcl::Window* pWindow, SalExtTextInputPosEvent* pEvt )
{
- Rectangle aCursorRect;
+ tools::Rectangle aCursorRect;
ImplHandleExtTextInputPos( pWindow, aCursorRect, pEvt->mnExtWidth, &pEvt->mbVertical );
if ( aCursorRect.IsEmpty() )
{
@@ -2283,8 +2283,8 @@ static void ImplHandleSalQueryCharPosition( vcl::Window *pWindow,
if ( pWinData->mpCompositionCharRects && pEvt->mnCharPos < static_cast<sal_uLong>( pWinData->mnCompositionCharRects ) )
{
const OutputDevice *pChildOutDev = pChild->GetOutDev();
- const Rectangle& aRect = pWinData->mpCompositionCharRects[ pEvt->mnCharPos ];
- Rectangle aDeviceRect = pChildOutDev->ImplLogicToDevicePixel( aRect );
+ const tools::Rectangle& aRect = pWinData->mpCompositionCharRects[ pEvt->mnCharPos ];
+ tools::Rectangle aDeviceRect = pChildOutDev->ImplLogicToDevicePixel( aRect );
Point aAbsScreenPos = pChild->OutputToAbsoluteScreenPixel( pChild->ScreenToOutputPixel(aDeviceRect.TopLeft()) );
pEvt->mnCursorBoundX = aAbsScreenPos.X();
pEvt->mnCursorBoundY = aAbsScreenPos.Y();
@@ -2429,7 +2429,7 @@ bool ImplWindowFrameProc( vcl::Window* _pWindow, SalEvent nEvent, const void* pE
const_cast<SalPaintEvent *>(pPaintEvt)->mnBoundX = pSalFrame->maGeometry.nWidth-pPaintEvt->mnBoundWidth-pPaintEvt->mnBoundX;
}
- Rectangle aBoundRect( Point( pPaintEvt->mnBoundX, pPaintEvt->mnBoundY ),
+ tools::Rectangle aBoundRect( Point( pPaintEvt->mnBoundX, pPaintEvt->mnBoundY ),
Size( pPaintEvt->mnBoundWidth, pPaintEvt->mnBoundHeight ) );
ImplHandlePaint( pWindow, aBoundRect, pPaintEvt->mbImmediateUpdate );
}
diff --git a/vcl/unx/generic/app/saldisp.cxx b/vcl/unx/generic/app/saldisp.cxx
index 0a586297083e..8fa71a19a9da 100644
--- a/vcl/unx/generic/app/saldisp.cxx
+++ b/vcl/unx/generic/app/saldisp.cxx
@@ -2251,7 +2251,7 @@ void SalDisplay::addXineramaScreenUnique( int i, long i_nX, long i_nY, long i_nW
}
}
m_aXineramaScreenIndexMap[i] = m_aXineramaScreens.size();
- m_aXineramaScreens.push_back( Rectangle( Point( i_nX, i_nY ), Size( i_nWidth, i_nHeight ) ) );
+ m_aXineramaScreens.push_back( tools::Rectangle( Point( i_nX, i_nY ), Size( i_nWidth, i_nHeight ) ) );
}
void SalDisplay::InitXinerama()
@@ -2270,7 +2270,7 @@ void SalDisplay::InitXinerama()
{
if( nFramebuffers > 1 )
{
- m_aXineramaScreens = std::vector<Rectangle>();
+ m_aXineramaScreens = std::vector<tools::Rectangle>();
m_aXineramaScreenIndexMap = std::vector<int>(nFramebuffers);
for( int i = 0; i < nFramebuffers; i++ )
{
diff --git a/vcl/unx/generic/app/wmadaptor.cxx b/vcl/unx/generic/app/wmadaptor.cxx
index 559bc1cf3770..7b4cc062f854 100644
--- a/vcl/unx/generic/app/wmadaptor.cxx
+++ b/vcl/unx/generic/app/wmadaptor.cxx
@@ -234,8 +234,8 @@ WMAdaptor::WMAdaptor( SalDisplay* pDisplay ) :
// default desktops
m_nDesktops = 1;
- m_aWMWorkAreas = ::std::vector< Rectangle >
- ( 1, Rectangle( Point(), m_pSalDisplay->GetScreenSize( m_pSalDisplay->GetDefaultXScreen() ) ) );
+ m_aWMWorkAreas = ::std::vector< tools::Rectangle >
+ ( 1, tools::Rectangle( Point(), m_pSalDisplay->GetScreenSize( m_pSalDisplay->GetDefaultXScreen() ) ) );
m_bEqualWorkAreas = true;
memset( m_aWMAtoms, 0, sizeof( m_aWMAtoms ) );
@@ -457,7 +457,7 @@ NetWMAdaptor::NetWMAdaptor( SalDisplay* pSalDisplay ) :
&& nItems == 4*(unsigned)m_nDesktops
)
{
- m_aWMWorkAreas = ::std::vector< Rectangle > ( m_nDesktops );
+ m_aWMWorkAreas = ::std::vector< tools::Rectangle > ( m_nDesktops );
long* pValues = reinterpret_cast<long*>(pProperty);
for( int i = 0; i < m_nDesktops; i++ )
{
@@ -465,7 +465,7 @@ NetWMAdaptor::NetWMAdaptor( SalDisplay* pSalDisplay ) :
pValues[4*i+1] );
Size aSize( pValues[4*i+2],
pValues[4*i+3] );
- Rectangle aWorkArea( aPoint, aSize );
+ tools::Rectangle aWorkArea( aPoint, aSize );
m_aWMWorkAreas[i] = aWorkArea;
if( aWorkArea != m_aWMWorkAreas[0] )
m_bEqualWorkAreas = false;
@@ -1134,9 +1134,9 @@ void NetWMAdaptor::setNetWMState( X11SalFrame* pFrame ) const
if( nCurrent < 0 )
nCurrent = 0;
}
- Rectangle aPosSize = m_aWMWorkAreas[nCurrent];
+ tools::Rectangle aPosSize = m_aWMWorkAreas[nCurrent];
const SalFrameGeometry& rGeom( pFrame->GetUnmirroredGeometry() );
- aPosSize = Rectangle( Point( aPosSize.Left() + rGeom.nLeftDecoration,
+ aPosSize = tools::Rectangle( Point( aPosSize.Left() + rGeom.nLeftDecoration,
aPosSize.Top() + rGeom.nTopDecoration ),
Size( aPosSize.GetWidth()
- rGeom.nLeftDecoration
@@ -1224,9 +1224,9 @@ void GnomeWMAdaptor::setGnomeWMState( X11SalFrame* pFrame ) const
if( nCurrent < 0 )
nCurrent = 0;
}
- Rectangle aPosSize = m_aWMWorkAreas[nCurrent];
+ tools::Rectangle aPosSize = m_aWMWorkAreas[nCurrent];
const SalFrameGeometry& rGeom( pFrame->GetUnmirroredGeometry() );
- aPosSize = Rectangle( Point( aPosSize.Left() + rGeom.nLeftDecoration,
+ aPosSize = tools::Rectangle( Point( aPosSize.Left() + rGeom.nLeftDecoration,
aPosSize.Top() + rGeom.nTopDecoration ),
Size( aPosSize.GetWidth()
- rGeom.nLeftDecoration
@@ -1448,7 +1448,7 @@ void WMAdaptor::maximizeFrame( X11SalFrame* pFrame, bool bHorizontal, bool bVert
if( m_pSalDisplay->IsXinerama() )
{
Point aMed( aTL.X() + rGeom.nWidth/2, aTL.Y() + rGeom.nHeight/2 );
- const std::vector< Rectangle >& rScreens = m_pSalDisplay->GetXineramaScreens();
+ const std::vector< tools::Rectangle >& rScreens = m_pSalDisplay->GetXineramaScreens();
for(const auto & rScreen : rScreens)
if( rScreen.IsInside( aMed ) )
{
@@ -1457,7 +1457,7 @@ void WMAdaptor::maximizeFrame( X11SalFrame* pFrame, bool bHorizontal, bool bVert
break;
}
}
- Rectangle aTarget( aTL,
+ tools::Rectangle aTarget( aTL,
Size( aScreenSize.Width() - rGeom.nLeftDecoration - rGeom.nTopDecoration,
aScreenSize.Height() - rGeom.nTopDecoration - rGeom.nBottomDecoration )
);
@@ -1488,7 +1488,7 @@ void WMAdaptor::maximizeFrame( X11SalFrame* pFrame, bool bHorizontal, bool bVert
rGeom.nY : pFrame->maRestorePosSize.Top();
}
- Rectangle aRestore( Point( rGeom.nX, rGeom.nY ), Size( rGeom.nWidth, rGeom.nHeight ) );
+ tools::Rectangle aRestore( Point( rGeom.nX, rGeom.nY ), Size( rGeom.nWidth, rGeom.nHeight ) );
if( pFrame->bMapped_ )
{
XSetInputFocus( m_pDisplay,
@@ -1516,7 +1516,7 @@ void WMAdaptor::maximizeFrame( X11SalFrame* pFrame, bool bHorizontal, bool bVert
else
{
pFrame->SetPosSize( pFrame->maRestorePosSize );
- pFrame->maRestorePosSize = Rectangle();
+ pFrame->maRestorePosSize = tools::Rectangle();
pFrame->nWidth_ = rGeom.nWidth;
pFrame->nHeight_ = rGeom.nHeight;
}
@@ -1577,12 +1577,12 @@ void NetWMAdaptor::maximizeFrame( X11SalFrame* pFrame, bool bHorizontal, bool bV
setNetWMState( pFrame );
}
if( !bHorizontal && !bVertical )
- pFrame->maRestorePosSize = Rectangle();
+ pFrame->maRestorePosSize = tools::Rectangle();
else if( pFrame->maRestorePosSize.IsEmpty() )
{
const SalFrameGeometry& rGeom( pFrame->GetUnmirroredGeometry() );
pFrame->maRestorePosSize =
- Rectangle( Point( rGeom.nX, rGeom.nY ), Size( rGeom.nWidth, rGeom.nHeight ) );
+ tools::Rectangle( Point( rGeom.nX, rGeom.nY ), Size( rGeom.nWidth, rGeom.nHeight ) );
}
}
else
@@ -1631,12 +1631,12 @@ void GnomeWMAdaptor::maximizeFrame( X11SalFrame* pFrame, bool bHorizontal, bool
setGnomeWMState( pFrame );
if( !bHorizontal && !bVertical )
- pFrame->maRestorePosSize = Rectangle();
+ pFrame->maRestorePosSize = tools::Rectangle();
else if( pFrame->maRestorePosSize.IsEmpty() )
{
const SalFrameGeometry& rGeom( pFrame->GetUnmirroredGeometry() );
pFrame->maRestorePosSize =
- Rectangle( Point( rGeom.nX, rGeom.nY ), Size( rGeom.nWidth, rGeom.nHeight ) );
+ tools::Rectangle( Point( rGeom.nX, rGeom.nY ), Size( rGeom.nWidth, rGeom.nHeight ) );
}
}
else
@@ -1815,14 +1815,14 @@ int NetWMAdaptor::handlePropertyNotify( X11SalFrame* pFrame, XPropertyEvent* pEv
}
if( ! (pFrame->mbMaximizedHorz || pFrame->mbMaximizedVert ) )
- pFrame->maRestorePosSize = Rectangle();
+ pFrame->maRestorePosSize = tools::Rectangle();
else
{
const SalFrameGeometry& rGeom = pFrame->GetUnmirroredGeometry();
// the current geometry may already be changed by the corresponding
// ConfigureNotify, but this cannot be helped
pFrame->maRestorePosSize =
- Rectangle( Point( rGeom.nX, rGeom.nY ),
+ tools::Rectangle( Point( rGeom.nX, rGeom.nY ),
Size( rGeom.nWidth, rGeom.nHeight ) );
}
}
@@ -1881,14 +1881,14 @@ int GnomeWMAdaptor::handlePropertyNotify( X11SalFrame* pFrame, XPropertyEvent* p
}
if( ! (pFrame->mbMaximizedHorz || pFrame->mbMaximizedVert ) )
- pFrame->maRestorePosSize = Rectangle();
+ pFrame->maRestorePosSize = tools::Rectangle();
else
{
const SalFrameGeometry& rGeom = pFrame->GetUnmirroredGeometry();
// the current geometry may already be changed by the corresponding
// ConfigureNotify, but this cannot be helped
pFrame->maRestorePosSize =
- Rectangle( Point( rGeom.nX, rGeom.nY ),
+ tools::Rectangle( Point( rGeom.nX, rGeom.nY ),
Size( rGeom.nWidth, rGeom.nHeight ) );
}
}
@@ -2047,7 +2047,7 @@ void NetWMAdaptor::showFullScreen( X11SalFrame* pFrame, bool bFullScreen ) const
m_pSalDisplay->GetRootWindow( pFrame->GetScreenNumber() ),
&aRoot, &aChild,
&root_x, &root_y, &lx, &ly, &mask );
- const std::vector< Rectangle >& rScreens = m_pSalDisplay->GetXineramaScreens();
+ const std::vector< tools::Rectangle >& rScreens = m_pSalDisplay->GetXineramaScreens();
Point aMousePoint( root_x, root_y );
for(const auto & rScreen : rScreens)
{
diff --git a/vcl/unx/generic/fontmanager/fontmanager.cxx b/vcl/unx/generic/fontmanager/fontmanager.cxx
index 5efceb8bec49..012876db03a3 100644
--- a/vcl/unx/generic/fontmanager/fontmanager.cxx
+++ b/vcl/unx/generic/fontmanager/fontmanager.cxx
@@ -1090,7 +1090,7 @@ bool PrintFontManager::createFontSubset(
int xMin, yMin, xMax, yMax;
getFontBoundingBox( nFont, xMin, yMin, xMax, yMax );
- rInfo.m_aFontBBox = Rectangle( Point( xMin, yMin ), Size( xMax-xMin, yMax-yMin ) );
+ rInfo.m_aFontBBox = tools::Rectangle( Point( xMin, yMin ), Size( xMax-xMin, yMax-yMin ) );
rInfo.m_nCapHeight = yMax; // Well ...
// fill in glyph advance widths
diff --git a/vcl/unx/generic/gdi/cairotextrender.cxx b/vcl/unx/generic/gdi/cairotextrender.cxx
index 11cedcc66701..6321f64e1c64 100644
--- a/vcl/unx/generic/gdi/cairotextrender.cxx
+++ b/vcl/unx/generic/gdi/cairotextrender.cxx
@@ -425,7 +425,7 @@ void CairoTextRender::GetFontMetric( ImplFontMetricDataRef& rxFontMetric, int nF
mpFreetypeFont[nFallbackLevel]->GetFontMetric(rxFontMetric);
}
-bool CairoTextRender::GetGlyphBoundRect(const GlyphItem& rGlyph, Rectangle& rRect)
+bool CairoTextRender::GetGlyphBoundRect(const GlyphItem& rGlyph, tools::Rectangle& rRect)
{
const int nLevel = rGlyph.mnFallbackLevel;
if( nLevel >= MAX_FALLBACK )
@@ -435,7 +435,7 @@ bool CairoTextRender::GetGlyphBoundRect(const GlyphItem& rGlyph, Rectangle& rRec
if( !pSF )
return false;
- Rectangle aRect = pSF->GetGlyphBoundRect(rGlyph);
+ tools::Rectangle aRect = pSF->GetGlyphBoundRect(rGlyph);
if ( pSF->mnCos != 0x10000 && pSF->mnSin != 0 )
{
diff --git a/vcl/unx/generic/gdi/font.cxx b/vcl/unx/generic/gdi/font.cxx
index b4141e07efad..2e8dd081cf35 100644
--- a/vcl/unx/generic/gdi/font.cxx
+++ b/vcl/unx/generic/gdi/font.cxx
@@ -106,7 +106,7 @@ X11SalGraphics::GetFontMetric( ImplFontMetricDataRef &rxFontMetric, int nFallbac
mxTextRenderImpl->GetFontMetric(rxFontMetric, nFallbackLevel);
}
-bool X11SalGraphics::GetGlyphBoundRect(const GlyphItem& rGlyph, Rectangle& rRect)
+bool X11SalGraphics::GetGlyphBoundRect(const GlyphItem& rGlyph, tools::Rectangle& rRect)
{
return mxTextRenderImpl->GetGlyphBoundRect(rGlyph, rRect);
}
diff --git a/vcl/unx/generic/gdi/openglx11cairotextrender.cxx b/vcl/unx/generic/gdi/openglx11cairotextrender.cxx
index 2710b6a0ed10..08618195a036 100644
--- a/vcl/unx/generic/gdi/openglx11cairotextrender.cxx
+++ b/vcl/unx/generic/gdi/openglx11cairotextrender.cxx
@@ -26,7 +26,7 @@ cairo_t* OpenGLX11CairoTextRender::getCairoContext()
OpenGLSalGraphicsImpl *pImpl = dynamic_cast< OpenGLSalGraphicsImpl* >(mrParent.GetImpl());
if( pImpl )
{
- Rectangle aClipRect = pImpl->getClipRegion().GetBoundRect();
+ tools::Rectangle aClipRect = pImpl->getClipRegion().GetBoundRect();
if( aClipRect.GetWidth() == 0 || aClipRect.GetHeight() == 0 )
{
aClipRect.setWidth( GetWidth() );
@@ -46,7 +46,7 @@ void OpenGLX11CairoTextRender::getSurfaceOffset( double& nDX, double& nDY )
OpenGLSalGraphicsImpl *pImpl = dynamic_cast< OpenGLSalGraphicsImpl* >(mrParent.GetImpl());
if( pImpl )
{
- Rectangle aClipRect = pImpl->getClipRegion().GetBoundRect();
+ tools::Rectangle aClipRect = pImpl->getClipRegion().GetBoundRect();
nDX = -aClipRect.Left();
nDY = -aClipRect.Top();
}
@@ -69,7 +69,7 @@ void OpenGLX11CairoTextRender::releaseCairoContext(cairo_t* cr)
unsigned char *pSrc = cairo_image_surface_get_data( pSurface );
// XXX: lfrb: GLES 2.0 doesn't support GL_UNSIGNED_INT_8_8_8_8_REV
- Rectangle aClipRect = pImpl->getClipRegion().GetBoundRect();
+ tools::Rectangle aClipRect = pImpl->getClipRegion().GetBoundRect();
SalTwoRect aRect(0, 0, nWidth, nHeight,
aClipRect.Left(), aClipRect.Top(), nWidth, nHeight);
diff --git a/vcl/unx/generic/glyphs/freetype_glyphcache.cxx b/vcl/unx/generic/glyphs/freetype_glyphcache.cxx
index c24dd5f3e050..c4341fe27176 100644
--- a/vcl/unx/generic/glyphs/freetype_glyphcache.cxx
+++ b/vcl/unx/generic/glyphs/freetype_glyphcache.cxx
@@ -650,7 +650,7 @@ void FreetypeFont::InitGlyphData(const GlyphItem& rGlyph, GlyphData& rGD ) const
FT_BBox aBbox;
FT_Glyph_Get_CBox( pGlyphFT, FT_GLYPH_BBOX_PIXELS, &aBbox );
- rGD.SetBoundRect(Rectangle(aBbox.xMin, -aBbox.yMax, aBbox.xMax, -aBbox.yMin));
+ rGD.SetBoundRect(tools::Rectangle(aBbox.xMin, -aBbox.yMax, aBbox.xMax, -aBbox.yMin));
FT_Done_Glyph( pGlyphFT );
}
diff --git a/vcl/unx/generic/glyphs/glyphcache.cxx b/vcl/unx/generic/glyphs/glyphcache.cxx
index b72a0a0cd4a1..f5978ba35c2f 100644
--- a/vcl/unx/generic/glyphs/glyphcache.cxx
+++ b/vcl/unx/generic/glyphs/glyphcache.cxx
@@ -314,7 +314,7 @@ long FreetypeFont::Release() const
return --mnRefCount;
}
-const Rectangle& FreetypeFont::GetGlyphBoundRect(const GlyphItem& rGlyph)
+const tools::Rectangle& FreetypeFont::GetGlyphBoundRect(const GlyphItem& rGlyph)
{
// usually the GlyphData is cached
GlyphList::iterator it = maGlyphList.find(rGlyph.maGlyphId);
diff --git a/vcl/unx/generic/print/bitmap_gfx.cxx b/vcl/unx/generic/print/bitmap_gfx.cxx
index e28064d6f543..0573001edb06 100644
--- a/vcl/unx/generic/print/bitmap_gfx.cxx
+++ b/vcl/unx/generic/print/bitmap_gfx.cxx
@@ -407,7 +407,7 @@ LZWEncoder::EncodeByte (sal_uInt8 nByte )
*/
void
-PrinterGfx::DrawBitmap (const Rectangle& rDest, const Rectangle& rSrc,
+PrinterGfx::DrawBitmap (const tools::Rectangle& rDest, const tools::Rectangle& rSrc,
const PrinterBmp& rBitmap)
{
double fScaleX = (double)rDest.GetWidth();
@@ -468,7 +468,7 @@ PrinterGfx::DrawBitmap (const Rectangle& rDest, const Rectangle& rSrc,
*/
void
-PrinterGfx::DrawPS1GrayImage (const PrinterBmp& rBitmap, const Rectangle& rArea)
+PrinterGfx::DrawPS1GrayImage (const PrinterBmp& rBitmap, const tools::Rectangle& rArea)
{
sal_uInt32 nWidth = rArea.GetWidth();
sal_uInt32 nHeight = rArea.GetHeight();
@@ -515,7 +515,7 @@ PrinterGfx::DrawPS1GrayImage (const PrinterBmp& rBitmap, const Rectangle& rArea)
*/
void
-PrinterGfx::writePS2ImageHeader (const Rectangle& rArea, psp::ImageType nType)
+PrinterGfx::writePS2ImageHeader (const tools::Rectangle& rArea, psp::ImageType nType)
{
sal_Int32 nChar = 0;
sal_Char pImage [512];
@@ -591,7 +591,7 @@ PrinterGfx::writePS2Colorspace(const PrinterBmp& rBitmap, psp::ImageType nType)
}
void
-PrinterGfx::DrawPS2GrayImage (const PrinterBmp& rBitmap, const Rectangle& rArea)
+PrinterGfx::DrawPS2GrayImage (const PrinterBmp& rBitmap, const tools::Rectangle& rArea)
{
writePS2Colorspace(rBitmap, psp::ImageType::GrayScaleImage);
writePS2ImageHeader(rArea, psp::ImageType::GrayScaleImage);
@@ -609,7 +609,7 @@ PrinterGfx::DrawPS2GrayImage (const PrinterBmp& rBitmap, const Rectangle& rArea)
}
void
-PrinterGfx::DrawPS2MonoImage (const PrinterBmp& rBitmap, const Rectangle& rArea)
+PrinterGfx::DrawPS2MonoImage (const PrinterBmp& rBitmap, const tools::Rectangle& rArea)
{
writePS2Colorspace(rBitmap, psp::ImageType::MonochromeImage);
writePS2ImageHeader(rArea, psp::ImageType::MonochromeImage);
@@ -640,7 +640,7 @@ PrinterGfx::DrawPS2MonoImage (const PrinterBmp& rBitmap, const Rectangle& rArea)
}
void
-PrinterGfx::DrawPS2PaletteImage (const PrinterBmp& rBitmap, const Rectangle& rArea)
+PrinterGfx::DrawPS2PaletteImage (const PrinterBmp& rBitmap, const tools::Rectangle& rArea)
{
writePS2Colorspace(rBitmap, psp::ImageType::PaletteImage);
writePS2ImageHeader(rArea, psp::ImageType::PaletteImage);
@@ -658,7 +658,7 @@ PrinterGfx::DrawPS2PaletteImage (const PrinterBmp& rBitmap, const Rectangle& rAr
}
void
-PrinterGfx::DrawPS2TrueColorImage (const PrinterBmp& rBitmap, const Rectangle& rArea)
+PrinterGfx::DrawPS2TrueColorImage (const PrinterBmp& rBitmap, const tools::Rectangle& rArea)
{
writePS2Colorspace(rBitmap, psp::ImageType::TrueColorImage);
writePS2ImageHeader(rArea, psp::ImageType::TrueColorImage);
diff --git a/vcl/unx/generic/print/common_gfx.cxx b/vcl/unx/generic/print/common_gfx.cxx
index df32ef2a2ebb..1d9a1ca9b659 100644
--- a/vcl/unx/generic/print/common_gfx.cxx
+++ b/vcl/unx/generic/print/common_gfx.cxx
@@ -160,21 +160,21 @@ void
PrinterGfx::UnionClipRegion (sal_Int32 nX,sal_Int32 nY,sal_Int32 nDX,sal_Int32 nDY)
{
if( nDX && nDY )
- maClipRegion.push_back (Rectangle(Point(nX,nY ), Size(nDX,nDY)));
+ maClipRegion.push_back (tools::Rectangle(Point(nX,nY ), Size(nDX,nDY)));
}
bool
-PrinterGfx::JoinVerticalClipRectangles( std::list< Rectangle >::iterator& it,
+PrinterGfx::JoinVerticalClipRectangles( std::list< tools::Rectangle >::iterator& it,
Point& rOldPoint, sal_Int32& rColumn )
{
bool bSuccess = false;
- std::list< Rectangle >::iterator tempit, nextit;
+ std::list< tools::Rectangle >::iterator tempit, nextit;
nextit = it;
++nextit;
std::list< Point > leftside, rightside;
- Rectangle aLastRect( *it );
+ tools::Rectangle aLastRect( *it );
leftside.push_back( Point( it->Left(), it->Top() ) );
rightside.push_back( Point( it->Right()+1, it->Top() ) );
while( nextit != maClipRegion.end() )
@@ -274,7 +274,7 @@ PrinterGfx::EndSetClipRegion()
Point aOldPoint (0, 0);
sal_Int32 nColumn = 0;
- std::list< Rectangle >::iterator it = maClipRegion.begin();
+ std::list< tools::Rectangle >::iterator it = maClipRegion.begin();
while( it != maClipRegion.end() )
{
// try to concatenate adjacent rectangles
@@ -301,7 +301,7 @@ PrinterGfx::EndSetClipRegion()
*/
void
-PrinterGfx::DrawRect (const Rectangle& rRectangle )
+PrinterGfx::DrawRect (const tools::Rectangle& rRectangle )
{
char pRect [128];
sal_Int32 nChar = 0;
@@ -1053,7 +1053,7 @@ PrinterGfx::PSShowGlyph (const unsigned char nGlyphId)
}
bool
-PrinterGfx::DrawEPS( const Rectangle& rBoundingBox, void* pPtr, sal_uInt32 nSize )
+PrinterGfx::DrawEPS( const tools::Rectangle& rBoundingBox, void* pPtr, sal_uInt32 nSize )
{
if( nSize == 0 )
return true;
diff --git a/vcl/unx/generic/print/genpspgraphics.cxx b/vcl/unx/generic/print/genpspgraphics.cxx
index 9c20ac6d1fb2..be31508dc179 100644
--- a/vcl/unx/generic/print/genpspgraphics.cxx
+++ b/vcl/unx/generic/print/genpspgraphics.cxx
@@ -398,7 +398,7 @@ void GenPspGraphics::drawLine( long nX1, long nY1, long nX2, long nY2 )
void GenPspGraphics::drawRect( long nX, long nY, long nDX, long nDY )
{
- m_pPrinterGfx->DrawRect (Rectangle(Point(nX, nY), Size(nDX, nDY)));
+ m_pPrinterGfx->DrawRect (tools::Rectangle(Point(nX, nY), Size(nDX, nDY)));
}
void GenPspGraphics::drawPolyLine( sal_uInt32 nPoints, const SalPoint *pPtAry )
@@ -468,7 +468,7 @@ void GenPspGraphics::invert( sal_uInt32,
bool GenPspGraphics::drawEPS( long nX, long nY, long nWidth, long nHeight, void* pPtr, sal_uLong nSize )
{
- return m_pPrinterGfx->DrawEPS( Rectangle( Point( nX, nY ), Size( nWidth, nHeight ) ), pPtr, nSize );
+ return m_pPrinterGfx->DrawEPS( tools::Rectangle( Point( nX, nY ), Size( nWidth, nHeight ) ), pPtr, nSize );
}
void GenPspGraphics::copyBits( const SalTwoRect&,
@@ -484,9 +484,9 @@ void GenPspGraphics::copyArea ( long,long,long,long,long,long,bool )
void GenPspGraphics::drawBitmap( const SalTwoRect& rPosAry, const SalBitmap& rSalBitmap )
{
- Rectangle aSrc (Point(rPosAry.mnSrcX, rPosAry.mnSrcY),
+ tools::Rectangle aSrc (Point(rPosAry.mnSrcX, rPosAry.mnSrcY),
Size(rPosAry.mnSrcWidth, rPosAry.mnSrcHeight));
- Rectangle aDst (Point(rPosAry.mnDestX, rPosAry.mnDestY),
+ tools::Rectangle aDst (Point(rPosAry.mnDestX, rPosAry.mnDestY),
Size(rPosAry.mnDestWidth, rPosAry.mnDestHeight));
BitmapBuffer* pBuffer= const_cast<SalBitmap&>(rSalBitmap).AcquireBuffer(BitmapAccessMode::Read);
@@ -756,7 +756,7 @@ void GenPspGraphics::GetFontMetric(ImplFontMetricDataRef& rxFontMetric, int nFal
m_pFreetypeFont[nFallbackLevel]->GetFontMetric(rxFontMetric);
}
-bool GenPspGraphics::GetGlyphBoundRect(const GlyphItem& rGlyph, Rectangle& rRect)
+bool GenPspGraphics::GetGlyphBoundRect(const GlyphItem& rGlyph, tools::Rectangle& rRect)
{
const int nLevel = rGlyph.mnFallbackLevel;
if( nLevel >= MAX_FALLBACK )
diff --git a/vcl/unx/generic/window/salframe.cxx b/vcl/unx/generic/window/salframe.cxx
index af37168137bb..0828f68c3587 100644
--- a/vcl/unx/generic/window/salframe.cxx
+++ b/vcl/unx/generic/window/salframe.cxx
@@ -514,7 +514,7 @@ void X11SalFrame::Init( SalFrameStyleFlags nSalFrameStyle, SalX11Screen nXScreen
GetDisplay()->GetRootWindow( m_nXScreen ),
&aRoot, &aChild,
&root_x, &root_y, &lx, &ly, &mask );
- const std::vector< Rectangle >& rScreens = GetDisplay()->GetXineramaScreens();
+ const std::vector< tools::Rectangle >& rScreens = GetDisplay()->GetXineramaScreens();
for(const auto & rScreen : rScreens)
if( rScreen.IsInside( Point( root_x, root_y ) ) )
{
@@ -1390,7 +1390,7 @@ void X11SalFrame::ToTop( SalFrameToTop nFlags )
}
}
-void X11SalFrame::GetWorkArea( Rectangle& rWorkArea )
+void X11SalFrame::GetWorkArea( tools::Rectangle& rWorkArea )
{
rWorkArea = pDisplay_->getWMAdaptor()->getWorkArea( 0 );
}
@@ -1449,7 +1449,7 @@ void X11SalFrame::Center( )
&root_x, &root_y,
&x, &y,
&mask );
- const std::vector< Rectangle >& rScreens = GetDisplay()->GetXineramaScreens();
+ const std::vector< tools::Rectangle >& rScreens = GetDisplay()->GetXineramaScreens();
for(const auto & rScreen : rScreens)
if( rScreen.IsInside( Point( root_x, root_y ) ) )
{
@@ -1468,7 +1468,7 @@ void X11SalFrame::Center( )
pFrame = pFrame->mpParent;
if( pFrame->maGeometry.nWidth < 1 || pFrame->maGeometry.nHeight < 1 )
{
- Rectangle aRect;
+ tools::Rectangle aRect;
pFrame->GetPosSize( aRect );
pFrame->maGeometry.nX = aRect.Left();
pFrame->maGeometry.nY = aRect.Top();
@@ -1529,7 +1529,7 @@ void X11SalFrame::Center( )
}
Point aPoint(nX, nY);
- SetPosSize( Rectangle( aPoint, Size( maGeometry.nWidth, maGeometry.nHeight ) ) );
+ SetPosSize( tools::Rectangle( aPoint, Size( maGeometry.nWidth, maGeometry.nHeight ) ) );
}
void X11SalFrame::updateScreenNumber()
@@ -1537,7 +1537,7 @@ void X11SalFrame::updateScreenNumber()
if( GetDisplay()->IsXinerama() && GetDisplay()->GetXineramaScreens().size() > 1 )
{
Point aPoint( maGeometry.nX, maGeometry.nY );
- const std::vector<Rectangle>& rScreenRects( GetDisplay()->GetXineramaScreens() );
+ const std::vector<tools::Rectangle>& rScreenRects( GetDisplay()->GetXineramaScreens() );
size_t nScreens = rScreenRects.size();
for( size_t i = 0; i < nScreens; i++ )
{
@@ -1558,7 +1558,7 @@ void X11SalFrame::SetPosSize( long nX, long nY, long nWidth, long nHeight, sal_u
return;
// relative positioning in X11SalFrame::SetPosSize
- Rectangle aPosSize( Point( maGeometry.nX, maGeometry.nY ), Size( maGeometry.nWidth, maGeometry.nHeight ) );
+ tools::Rectangle aPosSize( Point( maGeometry.nX, maGeometry.nY ), Size( maGeometry.nWidth, maGeometry.nHeight ) );
aPosSize.Justify();
if( ! ( nFlags & SAL_FRAME_POSSIZE_X ) )
@@ -1578,7 +1578,7 @@ void X11SalFrame::SetPosSize( long nX, long nY, long nWidth, long nHeight, sal_u
if( ! ( nFlags & SAL_FRAME_POSSIZE_HEIGHT ) )
nHeight = aPosSize.GetHeight();
- aPosSize = Rectangle( Point( nX, nY ), Size( nWidth, nHeight ) );
+ aPosSize = tools::Rectangle( Point( nX, nY ), Size( nWidth, nHeight ) );
if( ! ( nFlags & ( SAL_FRAME_POSSIZE_X | SAL_FRAME_POSSIZE_Y ) ) )
{
@@ -1621,7 +1621,7 @@ void X11SalFrame::SetWindowState( const SalFrameState *pState )
// Request for position or size change
if (pState->mnMask & FRAMESTATE_MASK_GEOMETRY)
{
- Rectangle aPosSize;
+ tools::Rectangle aPosSize;
/* #i44325#
* if maximized, set restore size and guess maximized size from last time
@@ -1771,7 +1771,7 @@ bool X11SalFrame::GetWindowState( SalFrameState* pState )
else
pState->mnState = WindowStateState::Normal;
- Rectangle aPosSize;
+ tools::Rectangle aPosSize;
if( maRestorePosSize.IsEmpty() )
GetPosSize( aPosSize );
else
@@ -1814,7 +1814,7 @@ void X11SalFrame::SetMenu( SalMenu* )
{
}
-void X11SalFrame::GetPosSize( Rectangle &rPosSize )
+void X11SalFrame::GetPosSize( tools::Rectangle &rPosSize )
{
if( maGeometry.nWidth < 1 || maGeometry.nHeight < 1 )
{
@@ -1822,10 +1822,10 @@ void X11SalFrame::GetPosSize( Rectangle &rPosSize )
long w = aScreenSize.Width() - maGeometry.nLeftDecoration - maGeometry.nRightDecoration;
long h = aScreenSize.Height() - maGeometry.nTopDecoration - maGeometry.nBottomDecoration;
- rPosSize = Rectangle( Point( maGeometry.nX, maGeometry.nY ), Size( w, h ) );
+ rPosSize = tools::Rectangle( Point( maGeometry.nX, maGeometry.nY ), Size( w, h ) );
}
else
- rPosSize = Rectangle( Point( maGeometry.nX, maGeometry.nY ),
+ rPosSize = tools::Rectangle( Point( maGeometry.nX, maGeometry.nY ),
Size( maGeometry.nWidth, maGeometry.nHeight ) );
}
@@ -1872,7 +1872,7 @@ void X11SalFrame::SetSize( const Size &rSize )
}
}
-void X11SalFrame::SetPosSize( const Rectangle &rPosSize )
+void X11SalFrame::SetPosSize( const tools::Rectangle &rPosSize )
{
XWindowChanges values;
values.x = rPosSize.Left();
@@ -2049,8 +2049,8 @@ void X11SalFrame::SetScreenNumber( unsigned int nNewScreen )
if( nNewScreen >= GetDisplay()->GetXineramaScreens().size() )
return;
- Rectangle aOldScreenRect( GetDisplay()->GetXineramaScreens()[maGeometry.nDisplayScreenNumber] );
- Rectangle aNewScreenRect( GetDisplay()->GetXineramaScreens()[nNewScreen] );
+ tools::Rectangle aOldScreenRect( GetDisplay()->GetXineramaScreens()[maGeometry.nDisplayScreenNumber] );
+ tools::Rectangle aNewScreenRect( GetDisplay()->GetXineramaScreens()[nNewScreen] );
bool bVisible = bMapped_;
if( bVisible )
Show( false );
@@ -2108,11 +2108,11 @@ void X11SalFrame::ShowFullScreen( bool bFullScreen, sal_Int32 nScreen )
return;
if( bFullScreen )
{
- maRestorePosSize = Rectangle( Point( maGeometry.nX, maGeometry.nY ),
+ maRestorePosSize = tools::Rectangle( Point( maGeometry.nX, maGeometry.nY ),
Size( maGeometry.nWidth, maGeometry.nHeight ) );
- Rectangle aRect;
+ tools::Rectangle aRect;
if( nScreen < 0 || nScreen >= static_cast<int>(GetDisplay()->GetXineramaScreens().size()) )
- aRect = Rectangle( Point(0,0), GetDisplay()->GetScreenSize( m_nXScreen ) );
+ aRect = tools::Rectangle( Point(0,0), GetDisplay()->GetScreenSize( m_nXScreen ) );
else
aRect = GetDisplay()->GetXineramaScreens()[nScreen];
nStyle_ |= SalFrameStyleFlags::PARTIAL_FULLSCREEN;
@@ -2139,8 +2139,8 @@ void X11SalFrame::ShowFullScreen( bool bFullScreen, sal_Int32 nScreen )
mbFullScreen = false;
nStyle_ &= ~SalFrameStyleFlags::PARTIAL_FULLSCREEN;
bool bVisible = bMapped_;
- Rectangle aRect = maRestorePosSize;
- maRestorePosSize = Rectangle();
+ tools::Rectangle aRect = maRestorePosSize;
+ maRestorePosSize = tools::Rectangle();
if( bVisible )
Show( false );
createNewWindow( None, m_nXScreen );
@@ -3368,7 +3368,7 @@ long X11SalFrame::HandleExposeEvent( XEvent *pEvent )
XSetInputFocus( GetXDisplay(), GetShellWindow(), RevertToNone, CurrentTime );
// width and height are extents, so they are of by one for rectangle
- maPaintRegion.Union( Rectangle( Point(aRect.x, aRect.y), Size(aRect.width+1, aRect.height+1) ) );
+ maPaintRegion.Union( tools::Rectangle( Point(aRect.x, aRect.y), Size(aRect.width+1, aRect.height+1) ) );
if( nCount )
// wait for last expose rectangle, do not wait for resize timer
@@ -3378,7 +3378,7 @@ long X11SalFrame::HandleExposeEvent( XEvent *pEvent )
SalPaintEvent aPEvt( maPaintRegion.Left(), maPaintRegion.Top(), maPaintRegion.GetWidth(), maPaintRegion.GetHeight() );
CallCallback( SalEvent::Paint, &aPEvt );
- maPaintRegion = Rectangle();
+ maPaintRegion = tools::Rectangle();
return 1;
}
diff --git a/vcl/unx/gtk/gtksalframe.cxx b/vcl/unx/gtk/gtksalframe.cxx
index 371f9be54f16..07d81cd39751 100644
--- a/vcl/unx/gtk/gtksalframe.cxx
+++ b/vcl/unx/gtk/gtksalframe.cxx
@@ -1771,7 +1771,7 @@ void GtkSalFrame::GetClientSize( long& rWidth, long& rHeight )
rWidth = rHeight = 0;
}
-void GtkSalFrame::GetWorkArea( Rectangle& rRect )
+void GtkSalFrame::GetWorkArea( tools::Rectangle& rRect )
{
rRect = GetGtkSalData()->GetGtkDisplay()->getWMAdaptor()->getWorkArea( 0 );
}
@@ -1808,7 +1808,7 @@ void GtkSalFrame::SetWindowState( const SalFrameState* pState )
updateScreenNumber();
m_nState = GdkWindowState( m_nState | GDK_WINDOW_STATE_MAXIMIZED );
- m_aRestorePosSize = Rectangle( Point( pState->mnX, pState->mnY ),
+ m_aRestorePosSize = tools::Rectangle( Point( pState->mnX, pState->mnY ),
Size( pState->mnWidth, pState->mnHeight ) );
CallCallback( SalEvent::Resize, nullptr );
}
@@ -1893,7 +1893,7 @@ bool GtkSalFrame::GetWindowState( SalFrameState* pState )
return true;
}
-void GtkSalFrame::SetScreen( unsigned int nNewScreen, SetType eType, Rectangle *pSize )
+void GtkSalFrame::SetScreen( unsigned int nNewScreen, SetType eType, tools::Rectangle *pSize )
{
if( !m_pWindow )
return;
@@ -2081,7 +2081,7 @@ void GtkSalFrame::ShowFullScreen( bool bFullScreen, sal_Int32 nScreen )
if( bFullScreen )
{
- m_aRestorePosSize = Rectangle( Point( maGeometry.nX, maGeometry.nY ),
+ m_aRestorePosSize = tools::Rectangle( Point( maGeometry.nX, maGeometry.nY ),
Size( maGeometry.nWidth, maGeometry.nHeight ) );
SetScreen( nScreen, SetType::Fullscreen );
}
@@ -2089,7 +2089,7 @@ void GtkSalFrame::ShowFullScreen( bool bFullScreen, sal_Int32 nScreen )
{
SetScreen( nScreen, SetType::UnFullscreen,
!m_aRestorePosSize.IsEmpty() ? &m_aRestorePosSize : nullptr );
- m_aRestorePosSize = Rectangle();
+ m_aRestorePosSize = tools::Rectangle();
}
}
@@ -3268,7 +3268,7 @@ gboolean GtkSalFrame::signalWindowState( GtkWidget*, GdkEvent* pEvent, gpointer
! (pThis->m_nState & GDK_WINDOW_STATE_MAXIMIZED) )
{
pThis->m_aRestorePosSize =
- Rectangle( Point( pThis->maGeometry.nX, pThis->maGeometry.nY ),
+ tools::Rectangle( Point( pThis->maGeometry.nX, pThis->maGeometry.nY ),
Size( pThis->maGeometry.nWidth, pThis->maGeometry.nHeight ) );
}
pThis->m_nState = pEvent->window_state.new_window_state;
@@ -3870,7 +3870,7 @@ gboolean GtkSalFrame::IMHandler::signalIMDeleteSurrounding( GtkIMContext*, gint
Size GtkSalDisplay::GetScreenSize( int nDisplayScreen )
{
- Rectangle aRect = m_pSys->GetDisplayScreenPosSizePixel( nDisplayScreen );
+ tools::Rectangle aRect = m_pSys->GetDisplayScreenPosSizePixel( nDisplayScreen );
return Size( aRect.GetWidth(), aRect.GetHeight() );
}
diff --git a/vcl/unx/gtk/gtksalmenu.cxx b/vcl/unx/gtk/gtksalmenu.cxx
index d2067719ff2b..f004a055d544 100644
--- a/vcl/unx/gtk/gtksalmenu.cxx
+++ b/vcl/unx/gtk/gtksalmenu.cxx
@@ -405,7 +405,7 @@ static void MenuPositionFunc(GtkMenu* menu, gint* x, gint* y, gboolean* push_in,
}
#endif
-bool GtkSalMenu::ShowNativePopupMenu(FloatingWindow* pWin, const Rectangle& rRect,
+bool GtkSalMenu::ShowNativePopupMenu(FloatingWindow* pWin, const tools::Rectangle& rRect,
FloatWinPopupFlags nFlags)
{
#if GTK_CHECK_VERSION(3,0,0)
diff --git a/vcl/unx/gtk/gtksys.cxx b/vcl/unx/gtk/gtksys.cxx
index 80831d68737b..5c047e4453a8 100644
--- a/vcl/unx/gtk/gtksys.cxx
+++ b/vcl/unx/gtk/gtksys.cxx
@@ -250,16 +250,16 @@ unsigned int GtkSalSystem::GetDisplayBuiltInScreen()
return idx + _get_primary_monitor (pDefault);
}
-Rectangle GtkSalSystem::GetDisplayScreenPosSizePixel (unsigned int nScreen)
+tools::Rectangle GtkSalSystem::GetDisplayScreenPosSizePixel (unsigned int nScreen)
{
gint nMonitor;
GdkScreen *pScreen;
GdkRectangle aRect;
pScreen = getScreenMonitorFromIdx (nScreen, nMonitor);
if (!pScreen)
- return Rectangle();
+ return tools::Rectangle();
gdk_screen_get_monitor_geometry (pScreen, nMonitor, &aRect);
- return Rectangle (Point(aRect.x, aRect.y), Size(aRect.width, aRect.height));
+ return tools::Rectangle (Point(aRect.x, aRect.y), Size(aRect.width, aRect.height));
}
// convert ~ to indicate mnemonic to '_'
diff --git a/vcl/unx/gtk/salnativewidgets-gtk.cxx b/vcl/unx/gtk/salnativewidgets-gtk.cxx
index 162b48535dcb..46ebe46c7e84 100644
--- a/vcl/unx/gtk/salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk/salnativewidgets-gtk.cxx
@@ -214,53 +214,53 @@ static void NWConvertVCLStateToGTKState( ControlState nVCLState, GtkStateType* n
static void NWAddWidgetToCacheWindow( GtkWidget* widget, SalX11Screen nScreen );
static void NWSetWidgetState( GtkWidget* widget, ControlState nState, GtkStateType nGtkState );
-static void NWCalcArrowRect( const Rectangle& rButton, Rectangle& rArrow );
+static void NWCalcArrowRect( const tools::Rectangle& rButton, tools::Rectangle& rArrow );
/*
* Individual helper functions
*
*/
-static Rectangle NWGetButtonArea( SalX11Screen nScreen, ControlType nType, ControlPart nPart, Rectangle aAreaRect, ControlState nState,
+static tools::Rectangle NWGetButtonArea( SalX11Screen nScreen, ControlType nType, ControlPart nPart, tools::Rectangle aAreaRect, ControlState nState,
const ImplControlValue& aValue, const OUString& rCaption );
-static Rectangle NWGetTabItemRect( SalX11Screen nScreen, Rectangle aAreaRect );
+static tools::Rectangle NWGetTabItemRect( SalX11Screen nScreen, tools::Rectangle aAreaRect );
-static Rectangle NWGetEditBoxPixmapRect( SalX11Screen nScreen, ControlType nType, ControlPart nPart, Rectangle aAreaRect, ControlState nState,
+static tools::Rectangle NWGetEditBoxPixmapRect( SalX11Screen nScreen, ControlType nType, ControlPart nPart, tools::Rectangle aAreaRect, ControlState nState,
const ImplControlValue& aValue, const OUString& rCaption );
static void NWPaintOneEditBox( SalX11Screen nScreen, GdkDrawable * gdkDrawable, GdkRectangle *gdkRect,
- ControlType nType, ControlPart nPart, Rectangle aEditBoxRect,
+ ControlType nType, ControlPart nPart, tools::Rectangle aEditBoxRect,
ControlState nState, const ImplControlValue& aValue,
const OUString& rCaption );
-static Rectangle NWGetSpinButtonRect( SalX11Screen nScreen, ControlType nType, ControlPart nPart, Rectangle aAreaRect, ControlState nState,
+static tools::Rectangle NWGetSpinButtonRect( SalX11Screen nScreen, ControlType nType, ControlPart nPart, tools::Rectangle aAreaRect, ControlState nState,
const ImplControlValue& aValue, const OUString& rCaption );
-static void NWPaintOneSpinButton( SalX11Screen nScreen, GdkPixmap * pixmap, ControlType nType, ControlPart nPart, Rectangle aAreaRect,
+static void NWPaintOneSpinButton( SalX11Screen nScreen, GdkPixmap * pixmap, ControlType nType, ControlPart nPart, tools::Rectangle aAreaRect,
ControlState nState, const ImplControlValue& aValue,
const OUString& rCaption );
-static Rectangle NWGetComboBoxButtonRect( SalX11Screen nScreen, ControlType nType, ControlPart nPart, Rectangle aAreaRect, ControlState nState,
+static tools::Rectangle NWGetComboBoxButtonRect( SalX11Screen nScreen, ControlType nType, ControlPart nPart, tools::Rectangle aAreaRect, ControlState nState,
const ImplControlValue& aValue, const OUString& rCaption );
-static Rectangle NWGetListBoxButtonRect( SalX11Screen nScreen, ControlType nType, ControlPart nPart, Rectangle aAreaRect, ControlState nState,
+static tools::Rectangle NWGetListBoxButtonRect( SalX11Screen nScreen, ControlType nType, ControlPart nPart, tools::Rectangle aAreaRect, ControlState nState,
const ImplControlValue& aValue, const OUString& rCaption );
-static Rectangle NWGetListBoxIndicatorRect( SalX11Screen nScreen, ControlType nType, ControlPart nPart, Rectangle aAreaRect, ControlState nState,
+static tools::Rectangle NWGetListBoxIndicatorRect( SalX11Screen nScreen, ControlType nType, ControlPart nPart, tools::Rectangle aAreaRect, ControlState nState,
const ImplControlValue& aValue, const OUString& rCaption );
-static Rectangle NWGetToolbarRect( SalX11Screen nScreen,
+static tools::Rectangle NWGetToolbarRect( SalX11Screen nScreen,
ControlType nType,
ControlPart nPart,
- Rectangle aAreaRect,
+ tools::Rectangle aAreaRect,
ControlState nState,
const ImplControlValue& aValue,
const OUString& rCaption );
static int getFrameWidth(GtkWidget* widget);
-static Rectangle NWGetScrollButtonRect( SalX11Screen nScreen, ControlPart nPart, Rectangle aAreaRect );
+static tools::Rectangle NWGetScrollButtonRect( SalX11Screen nScreen, ControlPart nPart, tools::Rectangle aAreaRect );
/************************************************************************
@@ -339,7 +339,7 @@ class NWPixmapCacheData
public:
ControlType m_nType;
ControlState m_nState;
- Rectangle m_pixmapRect;
+ tools::Rectangle m_pixmapRect;
GdkX11Pixmap* m_pixmap;
GdkX11Pixmap* m_mask;
@@ -363,8 +363,8 @@ public:
{ delete [] pData; m_idx = 0; m_size = n; pData = new NWPixmapCacheData[m_size]; }
int GetSize() const { return m_size; }
- bool Find( ControlType aType, ControlState aState, const Rectangle& r_pixmapRect, GdkX11Pixmap** pPixmap, GdkX11Pixmap** pMask );
- void Fill( ControlType aType, ControlState aState, const Rectangle& r_pixmapRect, GdkX11Pixmap* pPixmap, GdkX11Pixmap* pMask );
+ bool Find( ControlType aType, ControlState aState, const tools::Rectangle& r_pixmapRect, GdkX11Pixmap** pPixmap, GdkX11Pixmap** pMask );
+ void Fill( ControlType aType, ControlState aState, const tools::Rectangle& r_pixmapRect, GdkX11Pixmap* pPixmap, GdkX11Pixmap* pMask );
void ThemeChanged();
};
@@ -413,7 +413,7 @@ void NWPixmapCache::ThemeChanged()
pData[i].SetPixmap( nullptr, nullptr );
}
-bool NWPixmapCache::Find( ControlType aType, ControlState aState, const Rectangle& r_pixmapRect, GdkX11Pixmap** pPixmap, GdkX11Pixmap** pMask )
+bool NWPixmapCache::Find( ControlType aType, ControlState aState, const tools::Rectangle& r_pixmapRect, GdkX11Pixmap** pPixmap, GdkX11Pixmap** pMask )
{
aState &= ~ControlState::CACHING_ALLOWED; // mask clipping flag
int i;
@@ -433,7 +433,7 @@ bool NWPixmapCache::Find( ControlType aType, ControlState aState, const Rectang
return false;
}
-void NWPixmapCache::Fill( ControlType aType, ControlState aState, const Rectangle& r_pixmapRect, GdkX11Pixmap* pPixmap, GdkX11Pixmap* pMask )
+void NWPixmapCache::Fill( ControlType aType, ControlState aState, const tools::Rectangle& r_pixmapRect, GdkX11Pixmap* pPixmap, GdkX11Pixmap* pMask )
{
if( !(aState & ControlState::CACHING_ALLOWED) )
return;
@@ -738,7 +738,7 @@ bool GtkSalGraphics::IsNativeControlSupported( ControlType nType, ControlPart nP
bool GtkSalGraphics::hitTestNativeControl( ControlType nType,
ControlPart nPart,
- const Rectangle& rControlRegion,
+ const tools::Rectangle& rControlRegion,
const Point& aPos,
bool& rIsInside )
{
@@ -762,8 +762,8 @@ bool GtkSalGraphics::hitTestNativeControl( ControlType nType,
"has-backward-stepper", &has_backward,
"has-secondary-backward-stepper", &has_backward2,
nullptr );
- Rectangle aForward;
- Rectangle aBackward;
+ tools::Rectangle aForward;
+ tools::Rectangle aBackward;
rIsInside = false;
@@ -839,7 +839,7 @@ bool GtkSalGraphics::hitTestNativeControl( ControlType nType,
}
bool GtkSalGraphics::drawNativeControl(ControlType nType, ControlPart nPart,
- const Rectangle& rControlRegion, ControlState nState,
+ const tools::Rectangle& rControlRegion, ControlState nState,
const ImplControlValue& aValue, const OUString& rCaption)
{
// get a GC with current clipping region set
@@ -855,16 +855,16 @@ bool GtkSalGraphics::drawNativeControl(ControlType nType, ControlPart nPart,
GtkSalGraphics::bThemeChanged = false;
}
- Rectangle aCtrlRect( rControlRegion );
+ tools::Rectangle aCtrlRect( rControlRegion );
vcl::Region aClipRegion( m_aClipRegion );
if( aClipRegion.IsNull() )
aClipRegion = aCtrlRect;
- Rectangle aPixmapRect;
+ tools::Rectangle aPixmapRect;
// make pixmap a little larger since some themes draw decoration
// outside the rectangle, see e.g. checkbox
- aPixmapRect = Rectangle(Point( aCtrlRect.Left()-1, aCtrlRect.Top()-1 ),
+ aPixmapRect = tools::Rectangle(Point( aCtrlRect.Left()-1, aCtrlRect.Top()-1 ),
Size( aCtrlRect.GetWidth()+2, aCtrlRect.GetHeight()+2) );
ControlCacheKey aControlCacheKey(nType, nPart, nState, aPixmapRect.GetSize());
@@ -874,7 +874,7 @@ bool GtkSalGraphics::drawNativeControl(ControlType nType, ControlPart nPart,
return true;
}
- std::list< Rectangle > aClip;
+ std::list< tools::Rectangle > aClip;
int nPasses = 0;
GdkDrawable* gdkDrawable[2];
std::unique_ptr<GdkX11Pixmap> xPixmap;
@@ -908,7 +908,7 @@ bool GtkSalGraphics::drawNativeControl(ControlType nType, ControlPart nPart,
gdkDrawable[0] = xPixmap->GetGdkDrawable();
}
- aCtrlRect = Rectangle( Point(1,1), aCtrlRect.GetSize() );
+ aCtrlRect = tools::Rectangle( Point(1,1), aCtrlRect.GetSize() );
aClip.push_back( aCtrlRect );
}
else
@@ -920,7 +920,7 @@ bool GtkSalGraphics::drawNativeControl(ControlType nType, ControlPart nPart,
for(RectangleVector::const_iterator aRectIter(aRectangles.begin()); aRectIter != aRectangles.end(); ++aRectIter)
{
- Rectangle aPaintRect = aCtrlRect.GetIntersection(*aRectIter);
+ tools::Rectangle aPaintRect = aCtrlRect.GetIntersection(*aRectIter);
if( aPaintRect.IsEmpty() )
continue;
aClip.push_back( aPaintRect );
@@ -954,8 +954,8 @@ bool GtkSalGraphics::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,
@@ -1077,12 +1077,12 @@ bool GtkSalGraphics::DoDrawNativeControl(
bool GtkSalGraphics::getNativeControlRegion( ControlType nType,
ControlPart nPart,
- const Rectangle& rControlRegion,
+ const tools::Rectangle& rControlRegion,
ControlState nState,
const ImplControlValue& aValue,
const OUString& rCaption,
- Rectangle &rNativeBoundingRegion,
- Rectangle &rNativeContentRegion )
+ tools::Rectangle &rNativeBoundingRegion,
+ tools::Rectangle &rNativeContentRegion )
{
bool returnVal = false;
@@ -1157,8 +1157,8 @@ bool GtkSalGraphics::getNativeControlRegion( ControlType nType,
NWEnsureGTKMenubar( m_nXScreen );
GtkRequisition aReq;
gtk_widget_size_request( gWidgetData[m_nXScreen].gMenubarWidget, &aReq );
- Rectangle aMenuBarRect = rControlRegion;
- aMenuBarRect = Rectangle( aMenuBarRect.TopLeft(),
+ tools::Rectangle aMenuBarRect = rControlRegion;
+ aMenuBarRect = tools::Rectangle( aMenuBarRect.TopLeft(),
Size( aMenuBarRect.GetWidth(), aReq.height+1 ) );
rNativeBoundingRegion = aMenuBarRect;
rNativeContentRegion = rNativeBoundingRegion;
@@ -1178,7 +1178,7 @@ bool GtkSalGraphics::getNativeControlRegion( ControlType nType,
"indicator_size", &indicator_size,
nullptr );
rNativeBoundingRegion = rControlRegion;
- Rectangle aIndicatorRect( Point( 0,
+ tools::Rectangle aIndicatorRect( Point( 0,
(rControlRegion.GetHeight()-indicator_size)/2),
Size( indicator_size, indicator_size ) );
rNativeContentRegion = aIndicatorRect;
@@ -1222,9 +1222,9 @@ bool GtkSalGraphics::getNativeControlRegion( ControlType nType,
arrow_extent = static_cast<gint>(arrow_size * arrow_scaling);
- rNativeContentRegion = Rectangle( Point( 0, 0 ),
+ rNativeContentRegion = tools::Rectangle( Point( 0, 0 ),
Size( arrow_extent, arrow_extent ));
- rNativeBoundingRegion = Rectangle( Point( 0, 0 ),
+ rNativeBoundingRegion = tools::Rectangle( Point( 0, 0 ),
Size( arrow_extent + horizontal_padding, arrow_extent ));
returnVal = true;
}
@@ -1243,7 +1243,7 @@ bool GtkSalGraphics::getNativeControlRegion( ControlType nType,
nullptr);
indicator_size += 2*indicator_spacing + 2*(focusWidth + focusWidth);
rNativeBoundingRegion = rControlRegion;
- Rectangle aIndicatorRect( Point( 0,
+ tools::Rectangle aIndicatorRect( Point( 0,
(rControlRegion.GetHeight()-indicator_size)/2),
Size( indicator_size, indicator_size ) );
rNativeContentRegion = aIndicatorRect;
@@ -1255,9 +1255,9 @@ bool GtkSalGraphics::getNativeControlRegion( ControlType nType,
GtkWidget* widget = gWidgetData[m_nXScreen].gEditBoxWidget;
GtkRequisition aReq;
gtk_widget_size_request( widget, &aReq );
- Rectangle aEditRect = rControlRegion;
+ tools::Rectangle aEditRect = rControlRegion;
long nHeight = (aEditRect.GetHeight() > aReq.height) ? aEditRect.GetHeight() : aReq.height;
- aEditRect = Rectangle( aEditRect.TopLeft(),
+ aEditRect = tools::Rectangle( aEditRect.TopLeft(),
Size( aEditRect.GetWidth(), nHeight ) );
rNativeBoundingRegion = aEditRect;
rNativeContentRegion = rNativeBoundingRegion;
@@ -1273,7 +1273,7 @@ bool GtkSalGraphics::getNativeControlRegion( ControlType nType,
"slider-width", &slider_width,
"slider-length", &slider_length,
nullptr);
- Rectangle aRect( rControlRegion );
+ tools::Rectangle aRect( rControlRegion );
if( nPart == ControlPart::ThumbHorz )
{
aRect.Right() = aRect.Left() + slider_length - 1;
@@ -1299,7 +1299,7 @@ bool GtkSalGraphics::getNativeControlRegion( ControlType nType,
if( nStyle & DrawFrameFlags::NoDraw )
{
- rNativeContentRegion = Rectangle(x1+frameWidth,
+ rNativeContentRegion = tools::Rectangle(x1+frameWidth,
y1+frameWidth,
x2-frameWidth,
y2-frameWidth);
@@ -1379,8 +1379,8 @@ bool GtkSalGraphics::getNativeControlRegion( ControlType nType,
bool GtkSalGraphics::NWPaintGTKArrow(
GdkDrawable* gdkDrawable,
ControlType, ControlPart,
- 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& )
{
@@ -1388,7 +1388,7 @@ bool GtkSalGraphics::NWPaintGTKArrow(
GtkStateType stateType(nState&ControlState::PRESSED?GTK_STATE_ACTIVE:GTK_STATE_NORMAL);
GdkRectangle clipRect;
- for( std::list< Rectangle >::const_iterator it = rClipList.begin(); it != rClipList.end(); ++it )
+ for( std::list< tools::Rectangle >::const_iterator it = rClipList.begin(); it != rClipList.end(); ++it )
{
clipRect.x = it->Left();
clipRect.y = it->Top();
@@ -1408,8 +1408,8 @@ bool GtkSalGraphics::NWPaintGTKArrow(
bool GtkSalGraphics::NWPaintGTKListHeader(
GdkDrawable* gdkDrawable,
ControlType, ControlPart,
- const Rectangle& rControlRectangle,
- const std::list< Rectangle >& rClipList,
+ const tools::Rectangle& rControlRectangle,
+ const std::list< tools::Rectangle >& rClipList,
ControlState nState, const ImplControlValue&,
const OUString& )
{
@@ -1429,7 +1429,7 @@ bool GtkSalGraphics::NWPaintGTKListHeader(
NWSetWidgetState( button, nState, stateType );
GdkRectangle clipRect;
- for( std::list< Rectangle >::const_iterator it = rClipList.begin(); it != rClipList.end(); ++it )
+ for( std::list< tools::Rectangle >::const_iterator it = rClipList.begin(); it != rClipList.end(); ++it )
{
clipRect.x = it->Left();
clipRect.y = it->Top();
@@ -1449,8 +1449,8 @@ bool GtkSalGraphics::NWPaintGTKListHeader(
bool GtkSalGraphics::NWPaintGTKFixedLine(
GdkDrawable* gdkDrawable,
ControlType, ControlPart nPart,
- const Rectangle& rControlRectangle,
- const std::list< Rectangle >&,
+ const tools::Rectangle& rControlRectangle,
+ const std::list< tools::Rectangle >&,
ControlState, const ImplControlValue&,
const OUString& )
{
@@ -1465,8 +1465,8 @@ bool GtkSalGraphics::NWPaintGTKFixedLine(
bool GtkSalGraphics::NWPaintGTKFrame(
GdkDrawable* gdkDrawable,
ControlType, ControlPart,
- 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& )
{
@@ -1479,7 +1479,7 @@ bool GtkSalGraphics::NWPaintGTKFrame(
if( nStyle == DrawFrameStyle::Out )
shadowType=GTK_SHADOW_IN;
- for( std::list< Rectangle >::const_iterator it = rClipList.begin(); it != rClipList.end(); ++it )
+ for( std::list< tools::Rectangle >::const_iterator it = rClipList.begin(); it != rClipList.end(); ++it )
{
clipRect.x = it->Left();
clipRect.y = it->Top();
@@ -1532,13 +1532,13 @@ bool GtkSalGraphics::NWPaintGTKFrame(
bool GtkSalGraphics::NWPaintGTKWindowBackground(
GdkDrawable* gdkDrawable,
ControlType, ControlPart,
- const Rectangle& rControlRectangle,
- const std::list< Rectangle >& rClipList,
+ const tools::Rectangle& rControlRectangle,
+ const std::list< tools::Rectangle >& rClipList,
ControlState /* nState */, const ImplControlValue&,
const OUString& )
{
GdkRectangle clipRect;
- for( std::list< Rectangle >::const_iterator it = rClipList.begin(); it != rClipList.end(); ++it )
+ for( std::list< tools::Rectangle >::const_iterator it = rClipList.begin(); it != rClipList.end(); ++it )
{
clipRect.x = it->Left();
clipRect.y = it->Top();
@@ -1560,8 +1560,8 @@ bool GtkSalGraphics::NWPaintGTKButtonReal(
GtkWidget* button,
GdkDrawable* gdkDrawable,
ControlType, ControlPart,
- const Rectangle& rControlRectangle,
- const std::list< Rectangle >& rClipList,
+ const tools::Rectangle& rControlRectangle,
+ const std::list< tools::Rectangle >& rClipList,
ControlState nState, const ImplControlValue&,
const OUString& )
{
@@ -1657,7 +1657,7 @@ bool GtkSalGraphics::NWPaintGTKButtonReal(
wi -= 2 * (focusWidth + focusPad);
hi -= 2 * (focusWidth + focusPad);
}
- for( std::list< Rectangle >::const_iterator it = rClipList.begin(); it != rClipList.end(); ++it)
+ for( std::list< tools::Rectangle >::const_iterator it = rClipList.begin(); it != rClipList.end(); ++it)
{
clipRect.x = it->Left();
clipRect.y = it->Top();
@@ -1696,8 +1696,8 @@ bool GtkSalGraphics::NWPaintGTKButtonReal(
bool GtkSalGraphics::NWPaintGTKButton(
GdkDrawable* gdkDrawable,
ControlType type, ControlPart part,
- const Rectangle& rControlRectangle,
- const std::list< Rectangle >& rClipList,
+ const tools::Rectangle& rControlRectangle,
+ const std::list< tools::Rectangle >& rClipList,
ControlState nState, const ImplControlValue& value,
const OUString& string)
{
@@ -1711,8 +1711,8 @@ bool GtkSalGraphics::NWPaintGTKButton(
string );
}
-static Rectangle NWGetButtonArea( SalX11Screen nScreen,
- ControlType, ControlPart, Rectangle aAreaRect, ControlState nState,
+static tools::Rectangle NWGetButtonArea( SalX11Screen nScreen,
+ ControlType, ControlPart, tools::Rectangle aAreaRect, ControlState nState,
const ImplControlValue&, const OUString& )
{
gboolean interiorFocus;
@@ -1721,7 +1721,7 @@ static Rectangle NWGetButtonArea( SalX11Screen nScreen,
GtkBorder aDefBorder;
GtkBorder * pBorder;
bool bDrawFocus = true;
- Rectangle aRect;
+ tools::Rectangle aRect;
gint x, y, w, h;
NWEnsureGTKButton( nScreen );
@@ -1757,12 +1757,12 @@ static Rectangle NWGetButtonArea( SalX11Screen nScreen,
h += aDefBorder.top + aDefBorder.bottom;
}
- aRect = Rectangle( Point( x, y ), Size( w, h ) );
+ aRect = tools::Rectangle( Point( x, y ), Size( w, h ) );
return aRect;
}
-static Rectangle NWGetTabItemRect( SalX11Screen nScreen, Rectangle aAreaRect )
+static tools::Rectangle NWGetTabItemRect( SalX11Screen nScreen, tools::Rectangle aAreaRect )
{
NWEnsureGTKNotebook( nScreen );
@@ -1781,13 +1781,13 @@ static Rectangle NWGetTabItemRect( SalX11Screen nScreen, Rectangle aAreaRect )
w += xthickness*2;
h += ythickness*2;
- return Rectangle( Point( x, y ), Size( w, h ) );
+ return tools::Rectangle( Point( x, y ), Size( w, h ) );
}
bool GtkSalGraphics::NWPaintGTKRadio( GdkDrawable* gdkDrawable,
ControlType, ControlPart,
- 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& )
@@ -1825,7 +1825,7 @@ bool GtkSalGraphics::NWPaintGTKRadio( GdkDrawable* gdkDrawable,
GTK_TOGGLE_BUTTON(gWidgetData[m_nXScreen].gRadioWidgetSibling)->active = true;
GTK_TOGGLE_BUTTON(gWidgetData[m_nXScreen].gRadioWidget)->active = isChecked;
- for( std::list< Rectangle >::const_iterator it = rClipList.begin(); it != rClipList.end(); ++it )
+ for( std::list< tools::Rectangle >::const_iterator it = rClipList.begin(); it != rClipList.end(); ++it )
{
clipRect.x = it->Left();
clipRect.y = it->Top();
@@ -1842,8 +1842,8 @@ bool GtkSalGraphics::NWPaintGTKRadio( GdkDrawable* gdkDrawable,
bool GtkSalGraphics::NWPaintGTKCheck( GdkDrawable* gdkDrawable,
ControlType, ControlPart,
- 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& )
@@ -1870,7 +1870,7 @@ bool GtkSalGraphics::NWPaintGTKCheck( GdkDrawable* gdkDrawable,
NWSetWidgetState( gWidgetData[m_nXScreen].gCheckWidget, nState, stateType );
GTK_TOGGLE_BUTTON(gWidgetData[m_nXScreen].gCheckWidget)->active = isChecked;
- for( std::list< Rectangle >::const_iterator it = rClipList.begin(); it != rClipList.end(); ++it )
+ for( std::list< tools::Rectangle >::const_iterator it = rClipList.begin(); it != rClipList.end(); ++it )
{
clipRect.x = it->Left();
clipRect.y = it->Top();
@@ -1885,7 +1885,7 @@ bool GtkSalGraphics::NWPaintGTKCheck( GdkDrawable* gdkDrawable,
return true;
}
-static void NWCalcArrowRect( const Rectangle& rButton, Rectangle& rArrow )
+static void NWCalcArrowRect( const tools::Rectangle& rButton, tools::Rectangle& rArrow )
{
// Size the arrow appropriately
Size aSize( rButton.GetWidth()/2, rButton.GetHeight()/2 );
@@ -1898,8 +1898,8 @@ static void NWCalcArrowRect( const Rectangle& rButton, Rectangle& rArrow )
}
bool GtkSalGraphics::NWPaintGTKScrollbar( ControlType, ControlPart nPart,
- const Rectangle& rControlRectangle,
- const std::list< Rectangle >&,
+ const tools::Rectangle& rControlRectangle,
+ const std::list< tools::Rectangle >&,
ControlState nState,
const ImplControlValue& aValue,
const OUString& )
@@ -1907,24 +1907,24 @@ bool GtkSalGraphics::NWPaintGTKScrollbar( ControlType, ControlPart nPart,
assert(aValue.getType() == ControlType::Scrollbar);
const ScrollbarValue& rScrollbarVal = static_cast<const ScrollbarValue&>(aValue);
GdkX11Pixmap* pixmap = nullptr;
- Rectangle pixmapRect, scrollbarRect;
+ tools::Rectangle pixmapRect, scrollbarRect;
GtkStateType stateType;
GtkShadowType shadowType;
GtkScrollbar * scrollbarWidget;
GtkStyle * style;
GtkAdjustment* scrollbarValues = nullptr;
GtkOrientation scrollbarOrientation;
- Rectangle thumbRect = rScrollbarVal.maThumbRect;
- Rectangle button11BoundRect = rScrollbarVal.maButton1Rect; // backward
- Rectangle button22BoundRect = rScrollbarVal.maButton2Rect; // forward
- Rectangle button12BoundRect = rScrollbarVal.maButton1Rect; // secondary forward
- Rectangle button21BoundRect = rScrollbarVal.maButton2Rect; // secondary backward
+ tools::Rectangle thumbRect = rScrollbarVal.maThumbRect;
+ tools::Rectangle button11BoundRect = rScrollbarVal.maButton1Rect; // backward
+ tools::Rectangle button22BoundRect = rScrollbarVal.maButton2Rect; // forward
+ tools::Rectangle button12BoundRect = rScrollbarVal.maButton1Rect; // secondary forward
+ tools::Rectangle button21BoundRect = rScrollbarVal.maButton2Rect; // secondary backward
GtkArrowType button1Type; // backward
GtkArrowType button2Type; // forward
gchar * scrollbarTagH = const_cast<gchar *>("hscrollbar");
gchar * scrollbarTagV = const_cast<gchar *>("vscrollbar");
gchar * scrollbarTag = nullptr;
- Rectangle arrowRect;
+ tools::Rectangle arrowRect;
gint slider_width = 0;
gint stepper_size = 0;
gint stepper_spacing = 0;
@@ -2217,7 +2217,7 @@ bool GtkSalGraphics::NWPaintGTKScrollbar( ControlType, ControlPart nPart,
return bRet;
}
-static Rectangle NWGetScrollButtonRect( SalX11Screen nScreen, ControlPart nPart, Rectangle aAreaRect )
+static tools::Rectangle NWGetScrollButtonRect( SalX11Screen nScreen, ControlPart nPart, tools::Rectangle aAreaRect )
{
gint slider_width;
gint stepper_size;
@@ -2245,7 +2245,7 @@ static Rectangle NWGetScrollButtonRect( SalX11Screen nScreen, ControlPart nPa
"has-secondary-backward-stepper", &has_backward2, nullptr );
gint buttonWidth;
gint buttonHeight;
- Rectangle buttonRect;
+ tools::Rectangle buttonRect;
gint nFirst = 0;
gint nSecond = 0;
@@ -2300,20 +2300,20 @@ static Rectangle NWGetScrollButtonRect( SalX11Screen nScreen, ControlPart nPa
bool GtkSalGraphics::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 )
{
- Rectangle pixmapRect;
+ tools::Rectangle pixmapRect;
GdkRectangle clipRect;
// Find the overall bounding rect of the buttons's drawing area,
// plus its actual draw rect excluding adornment
pixmapRect = NWGetEditBoxPixmapRect( m_nXScreen, nType, nPart, rControlRectangle,
nState, aValue, rCaption );
- for( std::list< Rectangle >::const_iterator it = rClipList.begin(); it != rClipList.end(); ++it )
+ for( std::list< tools::Rectangle >::const_iterator it = rClipList.begin(); it != rClipList.end(); ++it )
{
clipRect.x = it->Left();
clipRect.y = it->Top();
@@ -2330,15 +2330,15 @@ bool GtkSalGraphics::NWPaintGTKEditBox( GdkDrawable* gdkDrawable,
* the bounding rectangle of the edit box including
* any focus requirements.
*/
-static Rectangle NWGetEditBoxPixmapRect(SalX11Screen nScreen,
+static tools::Rectangle NWGetEditBoxPixmapRect(SalX11Screen nScreen,
ControlType,
ControlPart,
- Rectangle aAreaRect,
+ tools::Rectangle aAreaRect,
ControlState,
const ImplControlValue&,
const OUString& )
{
- Rectangle pixmapRect = aAreaRect;
+ tools::Rectangle pixmapRect = aAreaRect;
gboolean interiorFocus;
gint focusWidth;
@@ -2368,7 +2368,7 @@ static void NWPaintOneEditBox( SalX11Screen nScreen,
GdkRectangle * gdkRect,
ControlType nType,
ControlPart,
- Rectangle aEditBoxRect,
+ tools::Rectangle aEditBoxRect,
ControlState nState,
const ImplControlValue&,
const OUString& )
@@ -2432,21 +2432,21 @@ static void NWPaintOneEditBox( SalX11Screen nScreen,
}
bool GtkSalGraphics::NWPaintGTKSpinBox(ControlType nType, ControlPart nPart,
- const Rectangle& rControlRectangle,
- const std::list< Rectangle >&,
+ const tools::Rectangle& rControlRectangle,
+ const std::list< tools::Rectangle >&,
ControlState nState,
const ImplControlValue& aValue,
const OUString& rCaption,
ControlCacheKey& rControlCacheKey)
{
- Rectangle pixmapRect;
+ tools::Rectangle pixmapRect;
GtkStateType stateType;
GtkShadowType shadowType;
const SpinbuttonValue * pSpinVal = (aValue.getType() == ControlType::SpinButtons) ? static_cast<const SpinbuttonValue *>(&aValue) : nullptr;
- Rectangle upBtnRect;
+ tools::Rectangle upBtnRect;
ControlPart upBtnPart = ControlPart::ButtonUp;
ControlState upBtnState = ControlState::ENABLED;
- Rectangle downBtnRect;
+ tools::Rectangle downBtnRect;
ControlPart downBtnPart = ControlPart::ButtonDown;
ControlState downBtnState = ControlState::ENABLED;
@@ -2482,7 +2482,7 @@ bool GtkSalGraphics::NWPaintGTKSpinBox(ControlType nType, ControlPart nPart,
if ( (nType==ControlType::Spinbox) && (nPart!=ControlPart::AllButtons) )
{
// Draw an edit field for SpinBoxes and ComboBoxes
- Rectangle aEditBoxRect( pixmapRect );
+ tools::Rectangle aEditBoxRect( pixmapRect );
aEditBoxRect.SetSize( Size( pixmapRect.GetWidth() - upBtnRect.GetWidth(), aEditBoxRect.GetHeight() ) );
if( AllSettings::GetLayoutRTL() )
aEditBoxRect.setX( upBtnRect.GetWidth() );
@@ -2498,7 +2498,7 @@ bool GtkSalGraphics::NWPaintGTKSpinBox(ControlType nType, ControlPart nPart,
if ( shadowType != GTK_SHADOW_NONE )
{
- Rectangle shadowRect( upBtnRect );
+ tools::Rectangle shadowRect( upBtnRect );
shadowRect.Union( downBtnRect );
gtk_paint_box( gWidgetData[m_nXScreen].gSpinButtonWidget->style, gdkPixmap, GTK_STATE_NORMAL, shadowType, nullptr,
@@ -2515,16 +2515,16 @@ bool GtkSalGraphics::NWPaintGTKSpinBox(ControlType nType, ControlPart nPart,
return true;
}
-static Rectangle NWGetSpinButtonRect( SalX11Screen nScreen,
+static tools::Rectangle NWGetSpinButtonRect( SalX11Screen nScreen,
ControlType,
ControlPart nPart,
- Rectangle aAreaRect,
+ tools::Rectangle aAreaRect,
ControlState,
const ImplControlValue&,
const OUString& )
{
gint buttonSize;
- Rectangle buttonRect;
+ tools::Rectangle buttonRect;
NWEnsureGTKSpinButton( nScreen );
@@ -2567,15 +2567,15 @@ static void NWPaintOneSpinButton( SalX11Screen nScreen,
GdkPixmap* pixmap,
ControlType nType,
ControlPart nPart,
- Rectangle aAreaRect,
+ tools::Rectangle aAreaRect,
ControlState nState,
const ImplControlValue& aValue,
const OUString& rCaption )
{
- Rectangle buttonRect;
+ tools::Rectangle buttonRect;
GtkStateType stateType;
GtkShadowType shadowType;
- Rectangle arrowRect;
+ tools::Rectangle arrowRect;
gint arrowSize;
NWEnsureGTKSpinButton( nScreen );
@@ -2606,17 +2606,17 @@ static void NWPaintOneSpinButton( SalX11Screen nScreen,
bool GtkSalGraphics::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 )
{
- Rectangle pixmapRect;
- Rectangle buttonRect;
+ tools::Rectangle pixmapRect;
+ tools::Rectangle buttonRect;
GtkStateType stateType;
GtkShadowType shadowType;
- Rectangle arrowRect;
+ tools::Rectangle arrowRect;
gint x,y;
GdkRectangle clipRect;
@@ -2639,7 +2639,7 @@ bool GtkSalGraphics::NWPaintGTKComboBox( GdkDrawable* gdkDrawable,
if( nPart == ControlPart::ButtonDown )
buttonRect.Left() += 1;
- Rectangle aEditBoxRect( pixmapRect );
+ tools::Rectangle aEditBoxRect( pixmapRect );
aEditBoxRect.SetSize( Size( pixmapRect.GetWidth() - buttonRect.GetWidth(), aEditBoxRect.GetHeight() ) );
if( AllSettings::GetLayoutRTL() )
aEditBoxRect.SetPos( Point( x + buttonRect.GetWidth() , y ) );
@@ -2650,7 +2650,7 @@ bool GtkSalGraphics::NWPaintGTKComboBox( GdkDrawable* gdkDrawable,
arrowRect.SetPos( Point( buttonRect.Left() + (gint)((buttonRect.GetWidth() - arrowRect.GetWidth()) / 2),
buttonRect.Top() + (gint)((buttonRect.GetHeight() - arrowRect.GetHeight()) / 2) ) );
- for( std::list< Rectangle >::const_iterator it = rClipList.begin(); it != rClipList.end(); ++it )
+ for( std::list< tools::Rectangle >::const_iterator it = rClipList.begin(); it != rClipList.end(); ++it )
{
clipRect.x = it->Left();
clipRect.y = it->Top();
@@ -2682,15 +2682,15 @@ bool GtkSalGraphics::NWPaintGTKComboBox( GdkDrawable* gdkDrawable,
return true;
}
-static Rectangle NWGetComboBoxButtonRect( SalX11Screen nScreen,
+static tools::Rectangle NWGetComboBoxButtonRect( SalX11Screen nScreen,
ControlType,
ControlPart nPart,
- Rectangle aAreaRect,
+ tools::Rectangle aAreaRect,
ControlState,
const ImplControlValue&,
const OUString& )
{
- Rectangle aButtonRect;
+ tools::Rectangle aButtonRect;
gint nArrowWidth;
gint nButtonWidth;
gint nFocusWidth;
@@ -2739,8 +2739,8 @@ static Rectangle NWGetComboBoxButtonRect( SalX11Screen nScreen,
}
bool GtkSalGraphics::NWPaintGTKTabItem( ControlType nType, ControlPart,
- const Rectangle& rControlRectangle,
- const std::list< Rectangle >&,
+ const tools::Rectangle& rControlRectangle,
+ const std::list< tools::Rectangle >&,
ControlState nState,
const ImplControlValue& aValue,
const OUString& )
@@ -2748,8 +2748,8 @@ bool GtkSalGraphics::NWPaintGTKTabItem( ControlType nType, ControlPart,
OSL_ASSERT( nType != ControlType::TabItem || aValue.getType() == ControlType::TabItem );
GdkX11Pixmap * pixmap;
GdkX11Pixmap * mask;
- Rectangle pixmapRect;
- Rectangle tabRect;
+ tools::Rectangle pixmapRect;
+ tools::Rectangle tabRect;
GtkStateType stateType;
GtkShadowType shadowType;
if( ! gWidgetData[ m_nXScreen ].gCacheTabItems )
@@ -2892,13 +2892,13 @@ bool GtkSalGraphics::NWPaintGTKTabItem( ControlType nType, ControlPart,
bool GtkSalGraphics::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 )
{
- Rectangle aIndicatorRect;
+ tools::Rectangle aIndicatorRect;
GtkStateType stateType;
GtkShadowType shadowType;
gint bInteriorFocus;
@@ -2931,7 +2931,7 @@ bool GtkSalGraphics::NWPaintGTKListBox( GdkDrawable* gdkDrawable,
nullptr);
}
- for( std::list< Rectangle >::const_iterator it = rClipList.begin(); it != rClipList.end(); ++it )
+ for( std::list< tools::Rectangle >::const_iterator it = rClipList.begin(); it != rClipList.end(); ++it )
{
clipRect.x = it->Left();
clipRect.y = it->Top();
@@ -2969,8 +2969,8 @@ bool GtkSalGraphics::NWPaintGTKListBox( GdkDrawable* gdkDrawable,
bool GtkSalGraphics::NWPaintGTKToolbar(
GdkDrawable* gdkDrawable,
ControlType, 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& string)
{
@@ -3047,7 +3047,7 @@ bool GtkSalGraphics::NWPaintGTKToolbar(
if( nPart != ControlPart::Button )
{
- for( std::list< Rectangle >::const_iterator it = rClipList.begin(); it != rClipList.end(); ++it )
+ for( std::list< tools::Rectangle >::const_iterator it = rClipList.begin(); it != rClipList.end(); ++it )
{
clipRect.x = it->Left();
clipRect.y = it->Top();
@@ -3138,7 +3138,7 @@ bool GtkSalGraphics::NWPaintGTKToolbar(
}
/// Converts a VCL Rectangle to a GdkRectangle.
-static void lcl_rectangleToGdkRectangle(const Rectangle& rRectangle, GdkRectangle& rGdkRectangle)
+static void lcl_rectangleToGdkRectangle(const tools::Rectangle& rRectangle, GdkRectangle& rGdkRectangle)
{
rGdkRectangle.x = rRectangle.Left();
rGdkRectangle.y = rRectangle.Top();
@@ -3149,8 +3149,8 @@ static void lcl_rectangleToGdkRectangle(const Rectangle& rRectangle, GdkRectangl
bool GtkSalGraphics::NWPaintGTKMenubar(
GdkDrawable* gdkDrawable,
ControlType, ControlPart nPart,
- const Rectangle& rControlRectangle,
- const std::list< Rectangle >& rClipList,
+ const tools::Rectangle& rControlRectangle,
+ const std::list< tools::Rectangle >& rClipList,
ControlState nState, const ImplControlValue&,
const OUString& )
{
@@ -3178,7 +3178,7 @@ bool GtkSalGraphics::NWPaintGTKMenubar(
}
}
- for( std::list< Rectangle >::const_iterator it = rClipList.begin(); it != rClipList.end(); ++it )
+ for( std::list< tools::Rectangle >::const_iterator it = rClipList.begin(); it != rClipList.end(); ++it )
{
lcl_rectangleToGdkRectangle(*it, clipRect);
@@ -3236,8 +3236,8 @@ bool GtkSalGraphics::NWPaintGTKMenubar(
bool GtkSalGraphics::NWPaintGTKPopupMenu(
GdkDrawable* gdkDrawable,
ControlType, ControlPart nPart,
- const Rectangle& rControlRectangle,
- const std::list< Rectangle >& rClipList,
+ const tools::Rectangle& rControlRectangle,
+ const std::list< tools::Rectangle >& rClipList,
ControlState nState, const ImplControlValue&,
const OUString& )
{
@@ -3275,7 +3275,7 @@ bool GtkSalGraphics::NWPaintGTKPopupMenu(
if ( nState & ControlState::ENABLED )
GTK_WIDGET_SET_FLAGS( gWidgetData[m_nXScreen].gMenuWidget, GTK_SENSITIVE );
- for( std::list< Rectangle >::const_iterator it = rClipList.begin(); it != rClipList.end(); ++it )
+ for( std::list< tools::Rectangle >::const_iterator it = rClipList.begin(); it != rClipList.end(); ++it )
{
clipRect.x = it->Left();
clipRect.y = it->Top();
@@ -3401,8 +3401,8 @@ bool GtkSalGraphics::NWPaintGTKPopupMenu(
bool GtkSalGraphics::NWPaintGTKTooltip(
GdkDrawable* gdkDrawable,
ControlType, ControlPart,
- const Rectangle& rControlRectangle,
- const std::list< Rectangle >& rClipList,
+ const tools::Rectangle& rControlRectangle,
+ const std::list< tools::Rectangle >& rClipList,
ControlState, const ImplControlValue&,
const OUString& )
{
@@ -3416,7 +3416,7 @@ bool GtkSalGraphics::NWPaintGTKTooltip(
w = rControlRectangle.GetWidth();
h = rControlRectangle.GetHeight();
- for( std::list< Rectangle >::const_iterator it = rClipList.begin(); it != rClipList.end(); ++it )
+ for( std::list< tools::Rectangle >::const_iterator it = rClipList.begin(); it != rClipList.end(); ++it )
{
clipRect.x = it->Left();
clipRect.y = it->Top();
@@ -3439,14 +3439,14 @@ bool GtkSalGraphics::NWPaintGTKTooltip(
bool GtkSalGraphics::NWPaintGTKListNode(
GdkDrawable*,
ControlType, ControlPart,
- const Rectangle& rControlRectangle,
- const std::list< Rectangle >&,
+ const tools::Rectangle& rControlRectangle,
+ const std::list< tools::Rectangle >&,
ControlState nState, const ImplControlValue& rValue,
const OUString& )
{
NWEnsureGTKTreeView( m_nXScreen );
- Rectangle aRect( rControlRectangle );
+ tools::Rectangle aRect( rControlRectangle );
aRect.Left() -= 2;
aRect.Right() += 2;
aRect.Top() -= 2;
@@ -3489,8 +3489,8 @@ bool GtkSalGraphics::NWPaintGTKListNode(
bool GtkSalGraphics::NWPaintGTKProgress(
GdkDrawable*,
ControlType, ControlPart,
- const Rectangle& rControlRectangle,
- const std::list< Rectangle >&,
+ const tools::Rectangle& rControlRectangle,
+ const std::list< tools::Rectangle >&,
ControlState, const ImplControlValue& rValue,
const OUString& )
{
@@ -3499,7 +3499,7 @@ bool GtkSalGraphics::NWPaintGTKProgress(
gint w, h;
w = rControlRectangle.GetWidth();
h = rControlRectangle.GetHeight();
- Rectangle aRect( Point( 0, 0 ), Size( w, h ) );
+ tools::Rectangle aRect( Point( 0, 0 ), Size( w, h ) );
long nProgressWidth = rValue.getNumericVal();
@@ -3554,8 +3554,8 @@ bool GtkSalGraphics::NWPaintGTKProgress(
bool GtkSalGraphics::NWPaintGTKSlider(
GdkDrawable*,
ControlType, ControlPart nPart,
- const Rectangle& rControlRectangle,
- const std::list< Rectangle >&,
+ const tools::Rectangle& rControlRectangle,
+ const std::list< tools::Rectangle >&,
ControlState nState, const ImplControlValue& rValue,
const OUString& )
{
@@ -3640,15 +3640,15 @@ static int getFrameWidth(GtkWidget* widget)
return widget->style->xthickness;
}
-static Rectangle NWGetListBoxButtonRect( SalX11Screen nScreen,
+static tools::Rectangle NWGetListBoxButtonRect( SalX11Screen nScreen,
ControlType,
ControlPart nPart,
- Rectangle aAreaRect,
+ tools::Rectangle aAreaRect,
ControlState,
const ImplControlValue&,
const OUString& )
{
- Rectangle aPartRect;
+ tools::Rectangle aPartRect;
GtkRequisition *pIndicatorSize = nullptr;
GtkBorder *pIndicatorSpacing = nullptr;
gint width = 13; // GTK+ default
@@ -3693,7 +3693,7 @@ static Rectangle NWGetListBoxButtonRect( SalX11Screen nScreen,
aPartPos.X() = aAreaRect.Left();
break;
}
- aPartRect = Rectangle( aPartPos, aPartSize );
+ aPartRect = tools::Rectangle( aPartPos, aPartSize );
if ( pIndicatorSize )
gtk_requisition_free( pIndicatorSize );
@@ -3703,15 +3703,15 @@ static Rectangle NWGetListBoxButtonRect( SalX11Screen nScreen,
return aPartRect;
}
-static Rectangle NWGetListBoxIndicatorRect( SalX11Screen nScreen,
+static tools::Rectangle NWGetListBoxIndicatorRect( SalX11Screen nScreen,
ControlType,
ControlPart,
- Rectangle aAreaRect,
+ tools::Rectangle aAreaRect,
ControlState,
const ImplControlValue&,
const OUString& )
{
- Rectangle aIndicatorRect;
+ tools::Rectangle aIndicatorRect;
GtkRequisition *pIndicatorSize = nullptr;
GtkBorder *pIndicatorSpacing = nullptr;
gint width = 13; // GTK+ default
@@ -3753,23 +3753,23 @@ static Rectangle NWGetListBoxIndicatorRect( SalX11Screen nScreen,
return aIndicatorRect;
}
-static Rectangle NWGetToolbarRect( SalX11Screen nScreen,
+static tools::Rectangle NWGetToolbarRect( SalX11Screen nScreen,
ControlType,
ControlPart nPart,
- Rectangle aAreaRect,
+ tools::Rectangle aAreaRect,
ControlState,
const ImplControlValue&,
const OUString& )
{
- Rectangle aRet;
+ tools::Rectangle aRet;
if( nPart == ControlPart::DrawBackgroundHorz ||
nPart == ControlPart::DrawBackgroundVert )
aRet = aAreaRect;
else if( nPart == ControlPart::ThumbHorz )
- aRet = Rectangle( Point( 0, 0 ), Size( aAreaRect.GetWidth(), 10 ) );
+ aRet = tools::Rectangle( Point( 0, 0 ), Size( aAreaRect.GetWidth(), 10 ) );
else if( nPart == ControlPart::ThumbVert )
- aRet = Rectangle( Point( 0, 0 ), Size( 10, aAreaRect.GetHeight() ) );
+ aRet = tools::Rectangle( Point( 0, 0 ), Size( 10, aAreaRect.GetHeight() ) );
else if( nPart == ControlPart::Button )
{
aRet = aAreaRect;
@@ -4191,7 +4191,7 @@ void GtkSalGraphics::updateSettings( AllSettings& rSettings )
* Create a GdkPixmap filled with the contents of an area of an Xlib window
************************************************************************/
-GdkX11Pixmap* GtkSalGraphics::NWGetPixmapFromScreen( Rectangle srcRect, int nBgColor )
+GdkX11Pixmap* GtkSalGraphics::NWGetPixmapFromScreen( tools::Rectangle srcRect, int nBgColor )
{
GdkX11Pixmap* pPixmap;
int nDepth = vcl_sal::getSalDisplay(GetGenericData())->GetVisual( m_nXScreen ).GetDepth();
@@ -4221,7 +4221,7 @@ GdkX11Pixmap* GtkSalGraphics::NWGetPixmapFromScreen( Rectangle srcRect, int nBgC
* Copy an alpha pixmap to screen using a gc with clipping
************************************************************************/
-bool GtkSalGraphics::NWRenderPixmapToScreen( GdkX11Pixmap* pPixmap, GdkX11Pixmap* pMask, Rectangle dstRect )
+bool GtkSalGraphics::NWRenderPixmapToScreen( GdkX11Pixmap* pPixmap, GdkX11Pixmap* pMask, tools::Rectangle dstRect )
{
return RenderPixmapToScreen( pPixmap, pMask, dstRect.Left(), dstRect.Top() );
}
diff --git a/vcl/unx/gtk3/gtk3gtkframe.cxx b/vcl/unx/gtk3/gtk3gtkframe.cxx
index 7ae0b9c0915b..1459f669fcca 100644
--- a/vcl/unx/gtk3/gtk3gtkframe.cxx
+++ b/vcl/unx/gtk3/gtk3gtkframe.cxx
@@ -1663,16 +1663,16 @@ void GtkSalFrame::GetClientSize( long& rWidth, long& rHeight )
rWidth = rHeight = 0;
}
-void GtkSalFrame::GetWorkArea( Rectangle& rRect )
+void GtkSalFrame::GetWorkArea( tools::Rectangle& rRect )
{
GdkScreen *pScreen = gtk_window_get_screen(GTK_WINDOW(m_pWindow));
- Rectangle aRetRect;
+ tools::Rectangle aRetRect;
int max = gdk_screen_get_n_monitors (pScreen);
for (int i = 0; i < max; ++i)
{
GdkRectangle aRect;
gdk_screen_get_monitor_workarea(pScreen, i, &aRect);
- Rectangle aMonitorRect(aRect.x, aRect.y, aRect.x+aRect.width, aRect.y+aRect.height);
+ tools::Rectangle aMonitorRect(aRect.x, aRect.y, aRect.x+aRect.width, aRect.y+aRect.height);
aRetRect.Union(aMonitorRect);
}
rRect = aRetRect;
@@ -1706,7 +1706,7 @@ void GtkSalFrame::SetWindowState( const SalFrameState* pState )
updateScreenNumber();
m_nState = GdkWindowState( m_nState | GDK_WINDOW_STATE_MAXIMIZED );
- m_aRestorePosSize = Rectangle( Point( pState->mnX, pState->mnY ),
+ m_aRestorePosSize = tools::Rectangle( Point( pState->mnX, pState->mnY ),
Size( pState->mnWidth, pState->mnHeight ) );
}
else if( pState->mnMask & (WindowStateMask::X | WindowStateMask::Y |
@@ -1766,11 +1766,11 @@ namespace
rHeight = height;
}
- Rectangle GetPosAndSize(GtkWindow *pWindow)
+ tools::Rectangle GetPosAndSize(GtkWindow *pWindow)
{
long nX, nY, nWidth, nHeight;
GetPosAndSize(pWindow, nX, nY, nWidth, nHeight);
- return Rectangle(nX, nY, nX + nWidth, nY + nHeight);
+ return tools::Rectangle(nX, nY, nX + nWidth, nY + nHeight);
}
}
@@ -1808,7 +1808,7 @@ bool GtkSalFrame::GetWindowState( SalFrameState* pState )
return true;
}
-void GtkSalFrame::SetScreen( unsigned int nNewScreen, SetType eType, Rectangle *pSize )
+void GtkSalFrame::SetScreen( unsigned int nNewScreen, SetType eType, tools::Rectangle *pSize )
{
if( !m_pWindow )
return;
@@ -2011,7 +2011,7 @@ void GtkSalFrame::ShowFullScreen( bool bFullScreen, sal_Int32 nScreen )
{
SetScreen( nScreen, SetType::UnFullscreen,
!m_aRestorePosSize.IsEmpty() ? &m_aRestorePosSize : nullptr );
- m_aRestorePosSize = Rectangle();
+ m_aRestorePosSize = tools::Rectangle();
}
}
@@ -2460,7 +2460,7 @@ gboolean GtkSalFrame::signalTooltipQuery(GtkWidget*, gint /*x*/, gint /*y*/,
return true;
}
-bool GtkSalFrame::ShowTooltip(const OUString& rHelpText, const Rectangle& rHelpArea)
+bool GtkSalFrame::ShowTooltip(const OUString& rHelpText, const tools::Rectangle& rHelpArea)
{
m_aTooltip = rHelpText;
m_aHelpArea = rHelpArea;
@@ -2471,7 +2471,7 @@ bool GtkSalFrame::ShowTooltip(const OUString& rHelpText, const Rectangle& rHelpA
#if GTK_CHECK_VERSION(3,12,0)
namespace
{
- void set_pointing_to(GtkPopover *pPopOver, const Rectangle& rHelpArea)
+ void set_pointing_to(GtkPopover *pPopOver, const tools::Rectangle& rHelpArea)
{
GdkRectangle aRect;
aRect.x = rHelpArea.Left();
@@ -2497,7 +2497,7 @@ namespace
}
#endif
-sal_uIntPtr GtkSalFrame::ShowPopover(const OUString& rHelpText, const Rectangle& rHelpArea, QuickHelpFlags nFlags)
+sal_uIntPtr GtkSalFrame::ShowPopover(const OUString& rHelpText, const tools::Rectangle& rHelpArea, QuickHelpFlags nFlags)
{
#if GTK_CHECK_VERSION(3,12,0)
GtkWidget *pWidget = gtk_popover_new(getMouseEventWidget());
@@ -2529,7 +2529,7 @@ sal_uIntPtr GtkSalFrame::ShowPopover(const OUString& rHelpText, const Rectangle&
#endif
}
-bool GtkSalFrame::UpdatePopover(sal_uIntPtr nId, const OUString& rHelpText, const Rectangle& rHelpArea)
+bool GtkSalFrame::UpdatePopover(sal_uIntPtr nId, const OUString& rHelpText, const tools::Rectangle& rHelpArea)
{
#if GTK_CHECK_VERSION(3,12,0)
GtkWidget *pWidget = reinterpret_cast<GtkWidget*>(nId);
@@ -4097,7 +4097,7 @@ gboolean GtkSalFrame::IMHandler::signalIMDeleteSurrounding( GtkIMContext*, gint
Size GtkSalDisplay::GetScreenSize( int nDisplayScreen )
{
- Rectangle aRect = m_pSys->GetDisplayScreenPosSizePixel( nDisplayScreen );
+ tools::Rectangle aRect = m_pSys->GetDisplayScreenPosSizePixel( nDisplayScreen );
return Size( aRect.GetWidth(), aRect.GetHeight() );
}
diff --git a/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx b/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx
index 731f5a83b8a8..fc0e94149545 100644
--- a/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx
@@ -152,7 +152,7 @@ enum class RenderType {
Focus
};
-static void NWCalcArrowRect( const Rectangle& rButton, Rectangle& rArrow )
+static void NWCalcArrowRect( const tools::Rectangle& rButton, tools::Rectangle& rArrow )
{
// Size the arrow appropriately
Size aSize( rButton.GetWidth()/2, rButton.GetHeight()/2 );
@@ -164,7 +164,7 @@ static void NWCalcArrowRect( const Rectangle& rButton, Rectangle& rArrow )
) );
}
-Rectangle GtkSalGraphics::NWGetSpinButtonRect( ControlPart nPart, Rectangle aAreaRect)
+tools::Rectangle GtkSalGraphics::NWGetSpinButtonRect( ControlPart nPart, tools::Rectangle aAreaRect)
{
gint w, h;
gtk_icon_size_lookup (GTK_ICON_SIZE_MENU, &w, &h);
@@ -180,11 +180,11 @@ Rectangle GtkSalGraphics::NWGetSpinButtonRect( ControlPart nPart, Rectangle aAre
gint buttonHeight = icon_size + padding.top + padding.bottom +
border.top + border.bottom;
- Rectangle buttonRect;
+ tools::Rectangle buttonRect;
buttonRect.SetSize(Size(buttonWidth, buttonHeight));
buttonRect.setY(aAreaRect.Top());
buttonRect.Bottom() = buttonRect.Top() + aAreaRect.GetHeight();
- Rectangle partRect(buttonRect);
+ tools::Rectangle partRect(buttonRect);
if ( nPart == ControlPart::ButtonUp )
{
if (AllSettings::GetLayoutRTL())
@@ -239,9 +239,9 @@ namespace
}
}
-Rectangle GtkSalGraphics::NWGetScrollButtonRect( ControlPart nPart, Rectangle aAreaRect )
+tools::Rectangle GtkSalGraphics::NWGetScrollButtonRect( ControlPart nPart, tools::Rectangle aAreaRect )
{
- Rectangle buttonRect;
+ tools::Rectangle buttonRect;
gboolean has_forward;
gboolean has_forward2;
@@ -398,14 +398,14 @@ namespace
parent_styles_context_set_state(context, flags);
}
- Rectangle render_common(GtkStyleContext *pContext, cairo_t *cr, const Rectangle &rIn, GtkStateFlags flags)
+ tools::Rectangle render_common(GtkStyleContext *pContext, cairo_t *cr, const tools::Rectangle &rIn, GtkStateFlags flags)
{
if (!pContext)
return rIn;
gtk_style_context_set_state(pContext, flags);
- Rectangle aRect(rIn);
+ tools::Rectangle aRect(rIn);
GtkBorder margin;
gtk_style_context_get_margin(pContext, gtk_style_context_get_state(pContext), &margin);
@@ -434,7 +434,7 @@ namespace
void GtkSalGraphics::PaintScrollbar(GtkStyleContext *context,
cairo_t *cr,
- const Rectangle& rControlRectangle,
+ const tools::Rectangle& rControlRectangle,
ControlType nType,
ControlPart nPart,
const ImplControlValue& rValue )
@@ -443,17 +443,17 @@ void GtkSalGraphics::PaintScrollbar(GtkStyleContext *context,
{
assert(rValue.getType() == ControlType::Scrollbar);
const ScrollbarValue& rScrollbarVal = static_cast<const ScrollbarValue&>(rValue);
- Rectangle scrollbarRect;
+ tools::Rectangle scrollbarRect;
GtkStateFlags stateFlags;
GtkOrientation scrollbarOrientation;
- Rectangle thumbRect = rScrollbarVal.maThumbRect;
- Rectangle button11BoundRect = rScrollbarVal.maButton1Rect; // backward
- Rectangle button22BoundRect = rScrollbarVal.maButton2Rect; // forward
- Rectangle button12BoundRect = rScrollbarVal.maButton1Rect; // secondary forward
- Rectangle button21BoundRect = rScrollbarVal.maButton2Rect; // secondary backward
+ tools::Rectangle thumbRect = rScrollbarVal.maThumbRect;
+ tools::Rectangle button11BoundRect = rScrollbarVal.maButton1Rect; // backward
+ tools::Rectangle button22BoundRect = rScrollbarVal.maButton2Rect; // forward
+ tools::Rectangle button12BoundRect = rScrollbarVal.maButton1Rect; // secondary forward
+ tools::Rectangle button21BoundRect = rScrollbarVal.maButton2Rect; // secondary backward
gdouble arrow1Angle; // backward
gdouble arrow2Angle; // forward
- Rectangle arrowRect;
+ tools::Rectangle arrowRect;
gint slider_width = 0;
gint stepper_size = 0;
@@ -708,18 +708,18 @@ void GtkSalGraphics::PaintScrollbar(GtkStyleContext *context,
// ----------------- TROUGH
// trackrect matches that of ScrollBar::ImplCalc
- Rectangle aTrackRect(Point(0, 0), scrollbarRect.GetSize());
+ tools::Rectangle aTrackRect(Point(0, 0), scrollbarRect.GetSize());
if (nPart == ControlPart::DrawBackgroundHorz)
{
- Rectangle aBtn1Rect = NWGetScrollButtonRect(ControlPart::ButtonLeft, aTrackRect);
- Rectangle aBtn2Rect = NWGetScrollButtonRect(ControlPart::ButtonRight, aTrackRect);
+ tools::Rectangle aBtn1Rect = NWGetScrollButtonRect(ControlPart::ButtonLeft, aTrackRect);
+ tools::Rectangle aBtn2Rect = NWGetScrollButtonRect(ControlPart::ButtonRight, aTrackRect);
aTrackRect.Left() = aBtn1Rect.Right();
aTrackRect.Right() = aBtn2Rect.Left();
}
else
{
- Rectangle aBtn1Rect = NWGetScrollButtonRect(ControlPart::ButtonUp, aTrackRect);
- Rectangle aBtn2Rect = NWGetScrollButtonRect(ControlPart::ButtonDown, aTrackRect);
+ tools::Rectangle aBtn1Rect = NWGetScrollButtonRect(ControlPart::ButtonUp, aTrackRect);
+ tools::Rectangle aBtn2Rect = NWGetScrollButtonRect(ControlPart::ButtonDown, aTrackRect);
aTrackRect.Top() = aBtn1Rect.Bottom() + 1;
aTrackRect.Bottom() = aBtn2Rect.Top();
}
@@ -763,17 +763,17 @@ void GtkSalGraphics::PaintScrollbar(GtkStyleContext *context,
(void)nType;
OSL_ASSERT( rValue.getType() == ControlType::Scrollbar );
const ScrollbarValue& rScrollbarVal = static_cast<const ScrollbarValue&>(rValue);
- Rectangle scrollbarRect;
+ tools::Rectangle scrollbarRect;
GtkStateFlags stateFlags;
GtkOrientation scrollbarOrientation;
- Rectangle thumbRect = rScrollbarVal.maThumbRect;
- Rectangle button11BoundRect = rScrollbarVal.maButton1Rect; // backward
- Rectangle button22BoundRect = rScrollbarVal.maButton2Rect; // forward
- Rectangle button12BoundRect = rScrollbarVal.maButton1Rect; // secondary forward
- Rectangle button21BoundRect = rScrollbarVal.maButton2Rect; // secondary backward
+ tools::Rectangle thumbRect = rScrollbarVal.maThumbRect;
+ tools::Rectangle button11BoundRect = rScrollbarVal.maButton1Rect; // backward
+ tools::Rectangle button22BoundRect = rScrollbarVal.maButton2Rect; // forward
+ tools::Rectangle button12BoundRect = rScrollbarVal.maButton1Rect; // secondary forward
+ tools::Rectangle button21BoundRect = rScrollbarVal.maButton2Rect; // secondary backward
gdouble arrow1Angle; // backward
gdouble arrow2Angle; // forward
- Rectangle arrowRect;
+ tools::Rectangle arrowRect;
gint slider_width = 0;
gint stepper_size = 0;
gint trough_border = 0;
@@ -1055,14 +1055,14 @@ void GtkSalGraphics::PaintOneSpinButton( GtkStyleContext *context,
cairo_t *cr,
ControlType nType,
ControlPart nPart,
- Rectangle aAreaRect,
+ tools::Rectangle aAreaRect,
ControlState nState )
{
(void)nType;
GtkBorder padding, border;
GtkStateFlags stateFlags = NWConvertVCLStateToGTKState(nState);
- Rectangle buttonRect = NWGetSpinButtonRect( nPart, aAreaRect );
+ tools::Rectangle buttonRect = NWGetSpinButtonRect( nPart, aAreaRect );
gtk_style_context_set_state(context, stateFlags);
@@ -1087,7 +1087,7 @@ void GtkSalGraphics::PaintOneSpinButton( GtkStyleContext *context,
iconWidth = gdk_pixbuf_get_width(pixbuf);
iconHeight = gdk_pixbuf_get_height(pixbuf);
- Rectangle arrowRect;
+ tools::Rectangle arrowRect;
arrowRect.SetSize(Size(iconWidth, iconHeight));
arrowRect.setX( buttonRect.Left() + (buttonRect.GetWidth() - arrowRect.GetWidth()) / 2 );
arrowRect.setY( buttonRect.Top() + (buttonRect.GetHeight() - arrowRect.GetHeight()) / 2 );
@@ -1102,7 +1102,7 @@ void GtkSalGraphics::PaintOneSpinButton( GtkStyleContext *context,
void GtkSalGraphics::PaintSpinButton(GtkStateFlags flags,
cairo_t *cr,
- const Rectangle& rControlRectangle,
+ const tools::Rectangle& rControlRectangle,
ControlType nType,
ControlPart nPart,
const ImplControlValue& rValue )
@@ -1146,13 +1146,13 @@ void GtkSalGraphics::PaintSpinButton(GtkStateFlags flags,
#define FALLBACK_ARROW_SIZE 11 * 0.85
-Rectangle GtkSalGraphics::NWGetComboBoxButtonRect( ControlType nType,
+tools::Rectangle GtkSalGraphics::NWGetComboBoxButtonRect( ControlType nType,
ControlPart nPart,
- Rectangle aAreaRect )
+ tools::Rectangle aAreaRect )
{
(void)nType;
(void)nPart;
- Rectangle aButtonRect;
+ tools::Rectangle aButtonRect;
GtkBorder padding;
gtk_style_context_get_padding( mpButtonStyle, gtk_style_context_get_state(mpButtonStyle), &padding);
@@ -1196,14 +1196,14 @@ Rectangle GtkSalGraphics::NWGetComboBoxButtonRect( ControlType nType,
}
void GtkSalGraphics::PaintCombobox( GtkStateFlags flags, cairo_t *cr,
- const Rectangle& rControlRectangle,
+ const tools::Rectangle& rControlRectangle,
ControlType nType,
ControlPart nPart,
const ImplControlValue& /*rValue*/ )
{
- Rectangle areaRect;
- Rectangle buttonRect;
- Rectangle arrowRect;
+ tools::Rectangle areaRect;
+ tools::Rectangle buttonRect;
+ tools::Rectangle arrowRect;
// Find the overall bounding rect of the buttons's drawing area,
// plus its actual draw rect excluding adornment
@@ -1211,7 +1211,7 @@ void GtkSalGraphics::PaintCombobox( GtkStateFlags flags, cairo_t *cr,
buttonRect = NWGetComboBoxButtonRect( nType, ControlPart::ButtonDown, areaRect );
- Rectangle aEditBoxRect( areaRect );
+ tools::Rectangle aEditBoxRect( areaRect );
aEditBoxRect.SetSize( Size( areaRect.GetWidth() - buttonRect.GetWidth(), aEditBoxRect.GetHeight() ) );
if (AllSettings::GetLayoutRTL())
aEditBoxRect.SetPos( Point( areaRect.Left() + buttonRect.GetWidth(), areaRect.Top() ) );
@@ -1238,7 +1238,7 @@ void GtkSalGraphics::PaintCombobox( GtkStateFlags flags, cairo_t *cr,
buttonRect.Top() + (gint)((buttonRect.GetHeight() - arrowRect.GetHeight()) / 2) ) );
- Rectangle aRect(Point(0, 0), Size(areaRect.GetWidth(), areaRect.GetHeight()));
+ tools::Rectangle aRect(Point(0, 0), Size(areaRect.GetWidth(), areaRect.GetHeight()));
if (nType == ControlType::Combobox)
{
@@ -1246,7 +1246,7 @@ void GtkSalGraphics::PaintCombobox( GtkStateFlags flags, cairo_t *cr,
{
render_common(mpComboboxStyle, cr, aRect, flags);
render_common(mpComboboxBoxStyle, cr, aRect, flags);
- Rectangle aEntryRect(Point(aEditBoxRect.Left() - areaRect.Left(),
+ tools::Rectangle aEntryRect(Point(aEditBoxRect.Left() - areaRect.Left(),
aEditBoxRect.Top() - areaRect.Top()),
Size(aEditBoxRect.GetWidth(), aEditBoxRect.GetHeight()));
@@ -1259,7 +1259,7 @@ void GtkSalGraphics::PaintCombobox( GtkStateFlags flags, cairo_t *cr,
gtk_style_context_set_junction_sides(mpComboboxEntryStyle, eJuncSides);
}
- Rectangle aButtonRect(Point(buttonRect.Left() - areaRect.Left(), buttonRect.Top() - areaRect.Top()),
+ tools::Rectangle aButtonRect(Point(buttonRect.Left() - areaRect.Left(), buttonRect.Top() - areaRect.Top()),
Size(buttonRect.GetWidth(), buttonRect.GetHeight()));
GtkJunctionSides eJuncSides = gtk_style_context_get_junction_sides(mpComboboxButtonStyle);
if (AllSettings::GetLayoutRTL())
@@ -2121,7 +2121,7 @@ namespace
}
void GtkSalGraphics::PaintCheckOrRadio(cairo_t *cr, GtkStyleContext *context,
- const Rectangle& rControlRectangle, bool bIsCheck, bool bInMenu)
+ const tools::Rectangle& rControlRectangle, bool bIsCheck, bool bInMenu)
{
gint indicator_size;
gtk_style_context_get_style(context, "indicator-size", &indicator_size, nullptr);
@@ -2141,13 +2141,13 @@ void GtkSalGraphics::PaintCheckOrRadio(cairo_t *cr, GtkStyleContext *context,
}
void GtkSalGraphics::PaintCheck(cairo_t *cr, GtkStyleContext *context,
- const Rectangle& rControlRectangle, bool bInMenu)
+ const tools::Rectangle& rControlRectangle, bool bInMenu)
{
PaintCheckOrRadio(cr, context, rControlRectangle, true, bInMenu);
}
void GtkSalGraphics::PaintRadio(cairo_t *cr, GtkStyleContext *context,
- const Rectangle& rControlRectangle, bool bInMenu)
+ const tools::Rectangle& rControlRectangle, bool bInMenu)
{
PaintCheckOrRadio(cr, context, rControlRectangle, false, bInMenu);
}
@@ -2160,7 +2160,7 @@ static gfloat getArrowSize(GtkStyleContext* context)
return arrow_size;
}
-bool GtkSalGraphics::drawNativeControl( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion,
+bool GtkSalGraphics::drawNativeControl( ControlType nType, ControlPart nPart, const tools::Rectangle& rControlRegion,
ControlState nState, const ImplControlValue& rValue,
const OUString& )
{
@@ -2547,7 +2547,7 @@ bool GtkSalGraphics::drawNativeControl( ControlType nType, ControlPart nPart, co
nX += initial_gap/2;
nWidth -= initial_gap;
}
- Rectangle aRect(Point(nX, nY), Size(nWidth, nHeight));
+ tools::Rectangle aRect(Point(nX, nY), Size(nWidth, nHeight));
render_common(mpNotebookHeaderTabsTabStyle, cr, aRect, flags);
break;
}
@@ -2568,15 +2568,15 @@ bool GtkSalGraphics::drawNativeControl( ControlType nType, ControlPart nPart, co
return true;
}
-Rectangle GetWidgetSize(const Rectangle& rControlRegion, GtkWidget* widget)
+tools::Rectangle GetWidgetSize(const tools::Rectangle& rControlRegion, GtkWidget* widget)
{
GtkRequisition aReq;
gtk_widget_get_preferred_size(widget, nullptr, &aReq);
long nHeight = (rControlRegion.GetHeight() > aReq.height) ? rControlRegion.GetHeight() : aReq.height;
- return Rectangle(rControlRegion.TopLeft(), Size(rControlRegion.GetWidth(), nHeight));
+ return tools::Rectangle(rControlRegion.TopLeft(), Size(rControlRegion.GetWidth(), nHeight));
}
-Rectangle AdjustRectForTextBordersPadding(GtkStyleContext* pStyle, long nContentWidth, long nContentHeight, const Rectangle& rControlRegion)
+tools::Rectangle AdjustRectForTextBordersPadding(GtkStyleContext* pStyle, long nContentWidth, long nContentHeight, const tools::Rectangle& rControlRegion)
{
GtkBorder border;
gtk_style_context_get_border(pStyle, gtk_style_context_get_state(pStyle), &border);
@@ -2590,17 +2590,17 @@ Rectangle AdjustRectForTextBordersPadding(GtkStyleContext* pStyle, long nContent
gint nWidgetWidth = nContentWidth + padding.left + padding.right + border.left + border.right;
nWidgetWidth = std::max<gint>(nWidgetWidth, rControlRegion.GetWidth());
- Rectangle aEditRect(rControlRegion.TopLeft(), Size(nWidgetWidth, nWidgetHeight));
+ tools::Rectangle aEditRect(rControlRegion.TopLeft(), Size(nWidgetWidth, nWidgetHeight));
return aEditRect;
}
-bool GtkSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion, ControlState,
+bool GtkSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPart, const tools::Rectangle& rControlRegion, ControlState,
const ImplControlValue& rValue, const OUString&,
- Rectangle &rNativeBoundingRegion, Rectangle &rNativeContentRegion )
+ tools::Rectangle &rNativeBoundingRegion, tools::Rectangle &rNativeContentRegion )
{
/* TODO: all this functions needs improvements */
- Rectangle aEditRect = rControlRegion;
+ tools::Rectangle aEditRect = rControlRegion;
gint indicator_size, indicator_spacing, point;
if(((nType == ControlType::Checkbox) || (nType == ControlType::Radiobutton)) &&
@@ -2624,7 +2624,7 @@ bool GtkSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPar
indicator_size += 2*indicator_spacing + border.left + padding.left + border.right + padding.right;
- Rectangle aIndicatorRect( Point( 0,
+ tools::Rectangle aIndicatorRect( Point( 0,
(rControlRegion.GetHeight()-indicator_size)/2),
Size( indicator_size, indicator_size ) );
rNativeContentRegion = aIndicatorRect;
@@ -2646,7 +2646,7 @@ bool GtkSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPar
nullptr );
point = MAX(0, rControlRegion.GetHeight() - indicator_size);
- aEditRect = Rectangle( Point( 0, point / 2),
+ aEditRect = tools::Rectangle( Point( 0, point / 2),
Size( indicator_size, indicator_size ) );
}
else if (nPart == ControlPart::Separator)
@@ -2659,13 +2659,13 @@ bool GtkSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPar
"separator-height", &separator_height,
nullptr);
- aEditRect = Rectangle( aEditRect.TopLeft(),
+ aEditRect = tools::Rectangle( aEditRect.TopLeft(),
Size( aEditRect.GetWidth(), wide_separators ? separator_height : 1 ) );
}
else if (nPart == ControlPart::SubmenuArrow)
{
gfloat arrow_size = getArrowSize(mpMenuItemArrowStyle);
- aEditRect = Rectangle( aEditRect.TopLeft(),
+ aEditRect = tools::Rectangle( aEditRect.TopLeft(),
Size( arrow_size, arrow_size ) );
}
}
@@ -2687,7 +2687,7 @@ bool GtkSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPar
((nPart==ControlPart::ButtonUp) || (nPart==ControlPart::ButtonDown) ||
(nPart==ControlPart::SubEdit)) )
{
- Rectangle aControlRegion(GetWidgetSize(rControlRegion, gSpinBox));
+ tools::Rectangle aControlRegion(GetWidgetSize(rControlRegion, gSpinBox));
aEditRect = NWGetSpinButtonRect(nPart, aControlRegion);
}
else if ( (nType==ControlType::Combobox) &&
@@ -2719,7 +2719,7 @@ bool GtkSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPar
else if (nType == ControlType::TabItem && nPart == ControlPart::Entire)
{
const TabitemValue& rTabitemValue = static_cast<const TabitemValue&>(rValue);
- const Rectangle& rTabitemRect = rTabitemValue.getContentRect();
+ const tools::Rectangle& rTabitemRect = rTabitemValue.getContentRect();
aEditRect = AdjustRectForTextBordersPadding(mpNotebookHeaderTabsTabStyle, rTabitemRect.GetWidth(),
rTabitemRect.GetHeight(), rControlRegion);
@@ -2742,7 +2742,7 @@ bool GtkSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPar
int y2 = aEditRect.Bottom();
rNativeBoundingRegion = aEditRect;
- rNativeContentRegion = Rectangle(x1 + (padding.left + border.left),
+ rNativeContentRegion = tools::Rectangle(x1 + (padding.left + border.left),
y1 + (padding.top + border.top),
x2 - (padding.right + border.right),
y2 - (padding.bottom + border.bottom));
diff --git a/vcl/unx/x11/x11sys.cxx b/vcl/unx/x11/x11sys.cxx
index e4f4b2955726..69a626274a0c 100644
--- a/vcl/unx/x11/x11sys.cxx
+++ b/vcl/unx/x11/x11sys.cxx
@@ -60,13 +60,13 @@ unsigned int X11SalSystem::GetDisplayBuiltInScreen()
return pSalDisp->GetDefaultXScreen().getXScreen();
}
-Rectangle X11SalSystem::GetDisplayScreenPosSizePixel( unsigned int nScreen )
+tools::Rectangle X11SalSystem::GetDisplayScreenPosSizePixel( unsigned int nScreen )
{
- Rectangle aRet;
+ tools::Rectangle aRet;
SalDisplay* pSalDisp = vcl_sal::getSalDisplay(GetGenericData());
if( pSalDisp->IsXinerama() )
{
- const std::vector< Rectangle >& rScreens = pSalDisp->GetXineramaScreens();
+ const std::vector< tools::Rectangle >& rScreens = pSalDisp->GetXineramaScreens();
// we shouldn't be able to pick a screen > number of screens available
assert(nScreen < rScreens.size() );
@@ -78,7 +78,7 @@ Rectangle X11SalSystem::GetDisplayScreenPosSizePixel( unsigned int nScreen )
{
const SalDisplay::ScreenData& rScreen =
pSalDisp->getDataForScreen( SalX11Screen( nScreen ) );
- aRet = Rectangle( Point( 0, 0 ), rScreen.m_aSize );
+ aRet = tools::Rectangle( Point( 0, 0 ), rScreen.m_aSize );
}
return aRet;
diff --git a/vcl/win/app/salinfo.cxx b/vcl/win/app/salinfo.cxx
index 15a71e3177d9..5b9fa323c528 100644
--- a/vcl/win/app/salinfo.cxx
+++ b/vcl/win/app/salinfo.cxx
@@ -66,7 +66,7 @@ bool WinSalSystem::handleMonitorCallback( sal_IntPtr hMonitor, sal_IntPtr, sal_I
if( it != m_aDeviceNameToMonitor.end() )
{
DisplayMonitor& rMon( m_aMonitors[ it->second ] );
- rMon.m_aArea = Rectangle( Point( aInfo.rcMonitor.left,
+ rMon.m_aArea = tools::Rectangle( Point( aInfo.rcMonitor.left,
aInfo.rcMonitor.top ),
Size( aInfo.rcMonitor.right - aInfo.rcMonitor.left,
aInfo.rcMonitor.bottom - aInfo.rcMonitor.top ) );
@@ -94,7 +94,7 @@ bool WinSalSystem::initMonitors()
int w = GetSystemMetrics( SM_CXSCREEN );
int h = GetSystemMetrics( SM_CYSCREEN );
m_aMonitors.push_back( DisplayMonitor( OUString(),
- Rectangle( Point(), Size( w, h ) ) ) );
+ tools::Rectangle( Point(), Size( w, h ) ) ) );
m_aDeviceNameToMonitor[ OUString() ] = 0;
m_nPrimary = 0;
}
@@ -119,7 +119,7 @@ bool WinSalSystem::initMonitors()
aDeviceStringCount[ aDeviceString ]++;
m_aDeviceNameToMonitor[ aDeviceName ] = m_aMonitors.size();
m_aMonitors.push_back( DisplayMonitor( aDeviceString,
- Rectangle() ) );
+ tools::Rectangle() ) );
}
}
HDC aDesktopRC = GetDC( nullptr );
@@ -159,10 +159,10 @@ unsigned int WinSalSystem::GetDisplayBuiltInScreen()
return m_nPrimary;
}
-Rectangle WinSalSystem::GetDisplayScreenPosSizePixel( unsigned int nScreen )
+tools::Rectangle WinSalSystem::GetDisplayScreenPosSizePixel( unsigned int nScreen )
{
initMonitors();
- return (nScreen < m_aMonitors.size()) ? m_aMonitors[nScreen].m_aArea : Rectangle();
+ return (nScreen < m_aMonitors.size()) ? m_aMonitors[nScreen].m_aArea : tools::Rectangle();
}
int WinSalSystem::ShowNativeMessageBox(const OUString& rTitle, const OUString& rMessage)
diff --git a/vcl/win/gdi/salfont.cxx b/vcl/win/gdi/salfont.cxx
index 65b828ad5fa2..aa3eac7c56a5 100644
--- a/vcl/win/gdi/salfont.cxx
+++ b/vcl/win/gdi/salfont.cxx
@@ -1346,7 +1346,7 @@ void WinSalGraphics::ClearDevFontCache()
//anything to do here ?
}
-bool WinSalGraphics::GetGlyphBoundRect(const GlyphItem& rGlyph, Rectangle& rRect)
+bool WinSalGraphics::GetGlyphBoundRect(const GlyphItem& rGlyph, tools::Rectangle& rRect)
{
HDC hDC = getHDC();
@@ -1365,7 +1365,7 @@ bool WinSalGraphics::GetGlyphBoundRect(const GlyphItem& rGlyph, Rectangle& rRect
if( nSize == GDI_ERROR )
return false;
- rRect = Rectangle( Point( +aGM.gmptGlyphOrigin.x, -aGM.gmptGlyphOrigin.y ),
+ rRect = tools::Rectangle( Point( +aGM.gmptGlyphOrigin.x, -aGM.gmptGlyphOrigin.y ),
Size( aGM.gmBlackBoxX, aGM.gmBlackBoxY ) );
rRect.Right() += 1;
rRect.Bottom() += 1;
@@ -1683,7 +1683,7 @@ bool WinSalGraphics::CreateFontSubset( const OUString& rToFile,
rInfo.m_aPSName = ImplSalGetUniString( aTTInfo.psname );
rInfo.m_nAscent = aTTInfo.winAscent;
rInfo.m_nDescent = aTTInfo.winDescent;
- 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 ...
diff --git a/vcl/win/gdi/salnativewidgets-luna.cxx b/vcl/win/gdi/salnativewidgets-luna.cxx
index 0c5e80253e05..b0ea1a9b275d 100644
--- a/vcl/win/gdi/salnativewidgets-luna.cxx
+++ b/vcl/win/gdi/salnativewidgets-luna.cxx
@@ -335,7 +335,7 @@ bool WinSalGraphics::IsNativeControlSupported( ControlType nType, ControlPart nP
bool WinSalGraphics::hitTestNativeControl( ControlType,
ControlPart,
- const Rectangle&,
+ const tools::Rectangle&,
const Point&,
bool& )
{
@@ -358,19 +358,19 @@ bool ImplDrawTheme( HTHEME hTheme, HDC hDC, int iPart, int iState, RECT rc, cons
return (hr == S_OK);
}
-Rectangle ImplGetThemeRect( HTHEME hTheme, HDC hDC, int iPart, int iState, const Rectangle& /* aRect */, THEMESIZE eTS = TS_TRUE )
+tools::Rectangle ImplGetThemeRect( HTHEME hTheme, HDC hDC, int iPart, int iState, const tools::Rectangle& /* aRect */, THEMESIZE eTS = TS_TRUE )
{
SIZE aSz;
HRESULT hr = vsAPI.GetThemePartSize( hTheme, hDC, iPart, iState, nullptr, eTS, &aSz ); // TS_TRUE returns optimal size
if( hr == S_OK )
- return Rectangle( 0, 0, aSz.cx, aSz.cy );
+ return tools::Rectangle( 0, 0, aSz.cx, aSz.cy );
else
- return Rectangle();
+ return tools::Rectangle();
}
// Helper functions
-void ImplConvertSpinbuttonValues( ControlPart nControlPart, const ControlState& rState, const Rectangle& rRect,
+void ImplConvertSpinbuttonValues( ControlPart nControlPart, const ControlState& rState, const tools::Rectangle& rRect,
int* pLunaPart, int *pLunaState, RECT *pRect )
{
if( nControlPart == ControlPart::ButtonDown )
@@ -1001,7 +1001,7 @@ bool ImplDrawNativeControl( HDC hDC, HTHEME hTheme, RECT rc,
iPart = (nPart == ControlPart::TrackHorzArea) ? TKP_TRACK : TKP_TRACKVERT;
iState = (nPart == ControlPart::TrackHorzArea) ? static_cast<int>(TRS_NORMAL) : static_cast<int>(TRVS_NORMAL);
- Rectangle aTrackRect = ImplGetThemeRect( hTheme, hDC, iPart, iState, Rectangle() );
+ tools::Rectangle aTrackRect = ImplGetThemeRect( hTheme, hDC, iPart, iState, tools::Rectangle() );
RECT aTRect = rc;
if( nPart == ControlPart::TrackHorzArea )
{
@@ -1120,8 +1120,8 @@ bool ImplDrawNativeControl( HDC hDC, HTHEME hTheme, RECT rc,
rc.right -= aValue.getNumericVal()+1;
else
rc.left += aValue.getNumericVal()+1;
- Rectangle aRect( ImplGetThemeRect( hTheme, hDC,
- MENU_POPUPSEPARATOR, 0, Rectangle( rc.left, rc.top, rc.right, rc.bottom ) ) );
+ tools::Rectangle aRect( ImplGetThemeRect( hTheme, hDC,
+ MENU_POPUPSEPARATOR, 0, tools::Rectangle( rc.left, rc.top, rc.right, rc.bottom ) ) );
// center the separator inside the passed rectangle
long nDY = ((rc.bottom - rc.top + 1) - aRect.GetHeight()) / 2;
rc.top += nDY;
@@ -1136,7 +1136,7 @@ bool ImplDrawNativeControl( HDC hDC, HTHEME hTheme, RECT rc,
bool WinSalGraphics::drawNativeControl( ControlType nType,
ControlPart nPart,
- const Rectangle& rControlRegion,
+ const tools::Rectangle& rControlRegion,
ControlState nState,
const ImplControlValue& aValue,
const OUString& aCaption )
@@ -1144,8 +1144,8 @@ bool WinSalGraphics::drawNativeControl( ControlType nType,
bool bOk = false;
HTHEME hTheme = nullptr;
- Rectangle buttonRect = rControlRegion;
- Rectangle cacheRect = rControlRegion;
+ tools::Rectangle buttonRect = rControlRegion;
+ tools::Rectangle cacheRect = rControlRegion;
Size keySize = cacheRect.GetSize();
WinOpenGLSalGraphicsImpl* pImpl = dynamic_cast<WinOpenGLSalGraphicsImpl*>(mpImpl.get());
@@ -1153,8 +1153,8 @@ bool WinSalGraphics::drawNativeControl( ControlType nType,
// tdf#95618 - A few controls render outside the region they're given.
if (pImpl && nType == ControlType::TabItem)
{
- Rectangle rNativeBoundingRegion;
- Rectangle rNativeContentRegion;
+ tools::Rectangle rNativeBoundingRegion;
+ tools::Rectangle rNativeContentRegion;
if (getNativeControlRegion(nType, nPart, rControlRegion, nState, aValue, aCaption,
rNativeBoundingRegion, rNativeContentRegion))
{
@@ -1296,12 +1296,12 @@ bool WinSalGraphics::drawNativeControl( ControlType nType,
bool WinSalGraphics::getNativeControlRegion( ControlType nType,
ControlPart nPart,
- const Rectangle& rControlRegion,
+ const tools::Rectangle& rControlRegion,
ControlState nState,
const ImplControlValue& rControlValue,
const OUString&,
- Rectangle &rNativeBoundingRegion,
- Rectangle &rNativeContentRegion )
+ tools::Rectangle &rNativeBoundingRegion,
+ tools::Rectangle &rNativeContentRegion )
{
bool bRet = FALSE;
@@ -1320,11 +1320,11 @@ bool WinSalGraphics::getNativeControlRegion( ControlType nType,
HTHEME hTheme = getThemeHandle( mhWnd, L"Rebar");
if( hTheme )
{
- Rectangle aRect( ImplGetThemeRect( hTheme, hDC, nPart == ControlPart::ThumbHorz ? RP_GRIPPERVERT : RP_GRIPPER,
+ tools::Rectangle aRect( ImplGetThemeRect( hTheme, hDC, nPart == ControlPart::ThumbHorz ? RP_GRIPPERVERT : RP_GRIPPER,
0, rControlRegion.GetBoundRect() ) );
if( nPart == ControlPart::ThumbHorz && !aRect.IsEmpty() )
{
- Rectangle aVertRect( 0, 0, aRect.getHeight(), aRect.getWidth() );
+ tools::Rectangle aVertRect( 0, 0, aRect.getHeight(), aRect.getWidth() );
rNativeContentRegion = aVertRect;
}
else
@@ -1340,7 +1340,7 @@ bool WinSalGraphics::getNativeControlRegion( ControlType nType,
HTHEME hTheme = getThemeHandle( mhWnd, L"Toolbar");
if( hTheme )
{
- Rectangle aRect( ImplGetThemeRect( hTheme, hDC, TP_SPLITBUTTONDROPDOWN,
+ tools::Rectangle aRect( ImplGetThemeRect( hTheme, hDC, TP_SPLITBUTTONDROPDOWN,
TS_HOT, rControlRegion ) );
rNativeContentRegion = aRect;
rNativeBoundingRegion = rNativeContentRegion;
@@ -1354,7 +1354,7 @@ bool WinSalGraphics::getNativeControlRegion( ControlType nType,
HTHEME hTheme = getThemeHandle( mhWnd, L"Progress");
if( hTheme )
{
- Rectangle aRect( ImplGetThemeRect( hTheme, hDC, PP_BAR,
+ tools::Rectangle aRect( ImplGetThemeRect( hTheme, hDC, PP_BAR,
0, rControlRegion ) );
rNativeContentRegion = aRect;
rNativeBoundingRegion = rNativeContentRegion;
@@ -1367,8 +1367,8 @@ bool WinSalGraphics::getNativeControlRegion( ControlType nType,
HTHEME hTheme = getThemeHandle( mhWnd, L"Combobox");
if( hTheme )
{
- Rectangle aBoxRect( rControlRegion );
- Rectangle aRect( ImplGetThemeRect( hTheme, hDC, CP_DROPDOWNBUTTON,
+ tools::Rectangle aBoxRect( rControlRegion );
+ tools::Rectangle aRect( ImplGetThemeRect( hTheme, hDC, CP_DROPDOWNBUTTON,
CBXS_NORMAL, aBoxRect ) );
if( aRect.GetHeight() > aBoxRect.GetHeight() )
aBoxRect.Bottom() = aBoxRect.Top() + aRect.GetHeight();
@@ -1387,8 +1387,8 @@ bool WinSalGraphics::getNativeControlRegion( ControlType nType,
if( hTheme )
{
// get border size
- Rectangle aBoxRect( rControlRegion );
- Rectangle aRect( ImplGetThemeRect( hTheme, hDC, EP_BACKGROUNDWITHBORDER,
+ tools::Rectangle aBoxRect( rControlRegion );
+ tools::Rectangle aRect( ImplGetThemeRect( hTheme, hDC, EP_BACKGROUNDWITHBORDER,
EBWBS_HOT, aBoxRect ) );
// ad app font height
NONCLIENTMETRICSW aNonClientMetrics;
@@ -1423,8 +1423,8 @@ bool WinSalGraphics::getNativeControlRegion( ControlType nType,
nPart == ControlPart::MenuItemRadioMark )
{
HTHEME hTheme = getThemeHandle( mhWnd, L"Menu");
- Rectangle aBoxRect( rControlRegion );
- Rectangle aRect( ImplGetThemeRect( hTheme, hDC,
+ tools::Rectangle aBoxRect( rControlRegion );
+ tools::Rectangle aRect( ImplGetThemeRect( hTheme, hDC,
MENU_POPUPCHECK,
MC_CHECKMARKNORMAL,
aBoxRect ) );
@@ -1445,11 +1445,11 @@ bool WinSalGraphics::getNativeControlRegion( ControlType nType,
{
int iPart = (nPart == ControlPart::ThumbHorz) ? TKP_THUMB : TKP_THUMBVERT;
int iState = (nPart == ControlPart::ThumbHorz) ? static_cast<int>(TUS_NORMAL) : static_cast<int>(TUVS_NORMAL);
- Rectangle aThumbRect = ImplGetThemeRect( hTheme, hDC, iPart, iState, Rectangle() );
+ tools::Rectangle aThumbRect = ImplGetThemeRect( hTheme, hDC, iPart, iState, tools::Rectangle() );
if( nPart == ControlPart::ThumbHorz )
{
long nW = aThumbRect.GetWidth();
- Rectangle aRect( rControlRegion );
+ tools::Rectangle aRect( rControlRegion );
aRect.Right() = aRect.Left() + nW - 1;
rNativeContentRegion = aRect;
rNativeBoundingRegion = rNativeContentRegion;
@@ -1457,7 +1457,7 @@ bool WinSalGraphics::getNativeControlRegion( ControlType nType,
else
{
long nH = aThumbRect.GetHeight();
- Rectangle aRect( rControlRegion );
+ tools::Rectangle aRect( rControlRegion );
aRect.Bottom() = aRect.Top() + nH - 1;
rNativeContentRegion = aRect;
rNativeBoundingRegion = rNativeContentRegion;
@@ -1468,7 +1468,7 @@ bool WinSalGraphics::getNativeControlRegion( ControlType nType,
if ( ( nType == ControlType::TabItem ) && ( nPart == ControlPart::Entire ) )
{
- Rectangle aControlRect( rControlRegion );
+ tools::Rectangle aControlRect( rControlRegion );
rNativeContentRegion = aControlRect;
--aControlRect.Bottom();
diff --git a/vcl/win/gdi/winlayout.cxx b/vcl/win/gdi/winlayout.cxx
index b41ad598acbb..3f12664b8d96 100644
--- a/vcl/win/gdi/winlayout.cxx
+++ b/vcl/win/gdi/winlayout.cxx
@@ -80,7 +80,7 @@ bool WinFontInstance::CacheGlyphToAtlas(HDC hDC, HFONT hFont, int nGlyphIndex, S
std::vector<WORD> aGlyphIndices(1);
aGlyphIndices[0] = nGlyphIndex;
// Fetch the ink boxes and calculate the size of the atlas.
- Rectangle bounds(0, 0, 0, 0);
+ tools::Rectangle bounds(0, 0, 0, 0);
auto aInkBoxes = pTxt->GetGlyphInkBoxes(aGlyphIndices.data(), aGlyphIndices.data() + 1);
for (auto &box : aInkBoxes)
bounds.Union(box + Point(bounds.Right(), 0));
@@ -142,7 +142,7 @@ bool WinFontInstance::CacheGlyphToAtlas(HDC hDC, HFONT hFont, int nGlyphIndex, S
aDC.fill(MAKE_SALCOLOR(0xff, 0xff, 0xff));
- pTxt->BindDC(aDC.getCompatibleHDC(), Rectangle(0, 0, nBitmapWidth, nBitmapHeight));
+ pTxt->BindDC(aDC.getCompatibleHDC(), tools::Rectangle(0, 0, nBitmapWidth, nBitmapHeight));
auto pRT = pTxt->GetRenderTarget();
ID2D1SolidColorBrush* pBrush = nullptr;
@@ -353,7 +353,7 @@ bool D2DWriteTextOutRenderer::operator ()(CommonSalLayout const &rLayout,
return ExTextOutRenderer()(rLayout, rGraphics, hDC);
}
- Rectangle bounds;
+ tools::Rectangle bounds;
bool succeeded = rLayout.GetBoundRect(rGraphics, bounds);
succeeded &= BindDC(hDC, bounds); // Update the bounding rect.
@@ -435,19 +435,19 @@ bool D2DWriteTextOutRenderer::ReleaseFont()
// The inkboxes returned have their origin on the baseline, to a -ve value
// of Top() means the glyph extends abs(Top()) many pixels above the
// baseline, and +ve means the ink starts that many pixels below.
-std::vector<Rectangle> D2DWriteTextOutRenderer::GetGlyphInkBoxes(uint16_t * pGid, uint16_t * pGidEnd) const
+std::vector<tools::Rectangle> D2DWriteTextOutRenderer::GetGlyphInkBoxes(uint16_t * pGid, uint16_t * pGidEnd) const
{
ptrdiff_t nGlyphs = pGidEnd - pGid;
- if (nGlyphs < 0) return std::vector<Rectangle>();
+ if (nGlyphs < 0) return std::vector<tools::Rectangle>();
DWRITE_FONT_METRICS aFontMetrics;
mpFontFace->GetMetrics(&aFontMetrics);
std::vector<DWRITE_GLYPH_METRICS> metrics(nGlyphs);
if (!SUCCEEDED(mpFontFace->GetDesignGlyphMetrics(pGid, nGlyphs, metrics.data())))
- return std::vector<Rectangle>();
+ return std::vector<tools::Rectangle>();
- std::vector<Rectangle> aOut(nGlyphs);
+ std::vector<tools::Rectangle> aOut(nGlyphs);
auto pOut = aOut.begin();
for (auto &m : metrics)
{
@@ -566,7 +566,7 @@ bool WinSalGraphics::DrawCachedGlyphs(const CommonSalLayout& rLayout)
{
HDC hDC = getHDC();
- Rectangle aRect;
+ tools::Rectangle aRect;
rLayout.GetBoundRect(*this, aRect);
COLORREF color = GetTextColor(hDC);
@@ -657,7 +657,7 @@ void WinSalGraphics::DrawTextLayout(const CommonSalLayout& rLayout)
// TODO: check the performance of this 2nd approach at some stage and
// switch to that if it performs well.
- Rectangle aRect;
+ tools::Rectangle aRect;
rLayout.GetBoundRect(*this, aRect);
WinOpenGLSalGraphicsImpl *pImpl = dynamic_cast<WinOpenGLSalGraphicsImpl*>(mpImpl.get());
diff --git a/vcl/win/window/salframe.cxx b/vcl/win/window/salframe.cxx
index b0347461a2a2..4932ecdabdac 100644
--- a/vcl/win/window/salframe.cxx
+++ b/vcl/win/window/salframe.cxx
@@ -766,7 +766,7 @@ static void ImplSalCalcFullScreenSize( const WinSalFrame* pFrame,
sal_Int32 nMonitors = Application::GetScreenCount();
if( (pFrame->mnDisplay >= 0) && (pFrame->mnDisplay < nMonitors) )
{
- Rectangle aRect = Application::GetScreenPosSizePixel( pFrame->mnDisplay );
+ tools::Rectangle aRect = Application::GetScreenPosSizePixel( pFrame->mnDisplay );
nScreenX = aRect.Left();
nScreenY = aRect.Top();
nScreenDX = aRect.getWidth()+1; // difference between java/awt convention and vcl
@@ -774,7 +774,7 @@ static void ImplSalCalcFullScreenSize( const WinSalFrame* pFrame,
}
else
{
- Rectangle aCombined = Application::GetScreenPosSizePixel( 0 );
+ tools::Rectangle aCombined = Application::GetScreenPosSizePixel( 0 );
for( sal_Int32 i = 1 ; i < nMonitors ; i++ )
{
aCombined.Union( Application::GetScreenPosSizePixel( i ) );
@@ -1606,7 +1606,7 @@ bool WinSalFrame::SetPluginParent( SystemParentData* pNewParent )
return true;
}
-void WinSalFrame::GetWorkArea( Rectangle &rRect )
+void WinSalFrame::GetWorkArea( tools::Rectangle &rRect )
{
RECT aRect;
ImplSalGetWorkArea( mhWnd, &aRect, nullptr );
diff --git a/vcl/workben/icontest.cxx b/vcl/workben/icontest.cxx
index 32d6ae8c05fe..a321d5392dc6 100644
--- a/vcl/workben/icontest.cxx
+++ b/vcl/workben/icontest.cxx
@@ -76,7 +76,7 @@ public:
virtual void dispose() override { mpFixedBitmap.clear(); WorkWindow::dispose(); }
void LoadGraphic( const OUString& sImageFile );
- 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;
};
@@ -101,7 +101,7 @@ void MyWorkWindow::LoadGraphic( const OUString& sImageFile )
}
}
-void MyWorkWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect)
+void MyWorkWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect)
{
std::cout << "==> Paint! " << mnPaintCount++ << " (vcl) " << GetSizePixel() << " " << getTimeNow() - mnStartTime << std::endl;
diff --git a/vcl/workben/mtfdemo.cxx b/vcl/workben/mtfdemo.cxx
index 3c842f9da649..6cc3b440913b 100644
--- a/vcl/workben/mtfdemo.cxx
+++ b/vcl/workben/mtfdemo.cxx
@@ -55,10 +55,10 @@ public:
}
}
- virtual void Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) override;
+ virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) override;
};
-void DemoMtfWin::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect)
+void DemoMtfWin::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect)
{
maMtf.Play(this, maMtf.GetActionSize());
diff --git a/vcl/workben/outdevgrind.cxx b/vcl/workben/outdevgrind.cxx
index 6c0bf652d70b..c86039c09590 100644
--- a/vcl/workben/outdevgrind.cxx
+++ b/vcl/workben/outdevgrind.cxx
@@ -71,7 +71,7 @@ class TestWindow : public Dialog
Show();
}
- virtual void Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) override;
+ virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) override;
};
typedef std::function<void (OutputDevice*)> functor_type;
@@ -95,8 +95,8 @@ void setupMethodStubs( functor_vector_type& res )
const Point aPt3(0,0);
const Point aPt4(450,450);
- const Rectangle aRect(aPt1,aPt2);
- const Rectangle aRect2(aPt3,aPt4);
+ const tools::Rectangle aRect(aPt1,aPt2);
+ const tools::Rectangle aRect2(aPt3,aPt4);
const tools::Polygon aPoly(aRect);
const tools::Polygon aPoly2(aRect2);
tools::PolyPolygon aPolyPoly(aPoly);
@@ -614,7 +614,7 @@ void outDevGrind(vcl::RenderContext& rTarget)
functor_vector_type aMethods;
setupMethodStubs( aMethods );
- const Rectangle aClipRect(10,10,1000,1000);
+ const tools::Rectangle aClipRect(10,10,1000,1000);
const tools::Polygon aPoly1( aClipRect );
tools::Polygon aPoly2( aClipRect );
aPoly2.Rotate(aClipRect.Center(),450);
@@ -665,7 +665,7 @@ void outDevGrind(vcl::RenderContext& rTarget)
}
}
-void TestWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangle&)
+void TestWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&)
{
outDevGrind(rRenderContext);
fflush(stdout);
diff --git a/vcl/workben/svptest.cxx b/vcl/workben/svptest.cxx
index 24ff69d988ed..2e679bb7f756 100644
--- a/vcl/workben/svptest.cxx
+++ b/vcl/workben/svptest.cxx
@@ -85,7 +85,7 @@ class MyWin : public WorkWindow
public:
MyWin( vcl::Window* pParent, WinBits nWinStyle );
- virtual void Paint( vcl::RenderContext& /*rRenderContext*/, const Rectangle& rRect ) override;
+ virtual void Paint( vcl::RenderContext& /*rRenderContext*/, const tools::Rectangle& rRect ) override;
};
void Main()
@@ -194,7 +194,7 @@ static Color approachColor( const Color& rFrom, const Color& rTo )
}
#define DELTA 5.0
-void MyWin::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect)
+void MyWin::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect)
{
WorkWindow::Paint(rRenderContext, rRect);
@@ -209,14 +209,14 @@ void MyWin::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect)
Point aP1(aPaperSize.Width() / 48, 0), aP2(aPaperSize.Width() / 40, 0);
Point aPoint;
- rRenderContext.DrawRect(Rectangle(Point(0, 0), aPaperSize));
- rRenderContext.DrawRect(Rectangle(Point(100, 100),
+ rRenderContext.DrawRect(tools::Rectangle(Point(0, 0), aPaperSize));
+ rRenderContext.DrawRect(tools::Rectangle(Point(100, 100),
Size(aPaperSize.Width() - 200,
aPaperSize.Height() - 200)));
- rRenderContext.DrawRect(Rectangle(Point(200, 200),
+ rRenderContext.DrawRect(tools::Rectangle(Point(200, 200),
Size(aPaperSize.Width() - 400,
aPaperSize.Height() - 400)));
- rRenderContext.DrawRect(Rectangle(Point(300, 300),
+ rRenderContext.DrawRect(tools::Rectangle(Point(300, 300),
Size(aPaperSize.Width() - 600,
aPaperSize.Height() - 600)));
@@ -240,14 +240,14 @@ void MyWin::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect)
aPrintText.append( "SVP test program" );
- rRenderContext.DrawText(Rectangle(Point((aPaperSize.Width() - 4000) / 2, 2000),
+ rRenderContext.DrawText(tools::Rectangle(Point((aPaperSize.Width() - 4000) / 2, 2000),
Size(aPaperSize.Width() - 2100 - nMaxWidth, aPaperSize.Height() - 4000)),
aPrintText.makeStringAndClear(),
DrawTextFlags::MultiLine);
}
rRenderContext.SetFillColor();
- DrawRect(Rectangle(Point(aPaperSize.Width() - 4000, 1000),
+ DrawRect(tools::Rectangle(Point(aPaperSize.Width() - 4000, 1000),
Size(3000, 3000)));
rRenderContext.DrawBitmap(Point(aPaperSize.Width() - 4000, 1000),
Size( 3000,3000 ),
@@ -264,22 +264,22 @@ void MyWin::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect)
Gradient aGradient(GradientStyle::Linear, aBlack, aWhite);
aGradient.SetAngle(900);
- rRenderContext.DrawGradient(Rectangle(Point(1000, 4500),
+ rRenderContext.DrawGradient(tools::Rectangle(Point(1000, 4500),
Size(aPaperSize.Width() - 2000, 500)),
aGradient);
aGradient.SetStartColor(aDarkRed);
aGradient.SetEndColor(aLightBlue);
- rRenderContext.DrawGradient(Rectangle(Point(1000, 5300),
+ rRenderContext.DrawGradient(tools::Rectangle(Point(1000, 5300),
Size(aPaperSize.Width() - 2000, 500)),
aGradient);
aGradient.SetStartColor(aDarkBlue);
aGradient.SetEndColor(aLightGreen);
- rRenderContext.DrawGradient(Rectangle(Point(1000, 6100),
+ rRenderContext.DrawGradient(tools::Rectangle(Point(1000, 6100),
Size(aPaperSize.Width() - 2000, 500)),
aGradient);
aGradient.SetStartColor(aDarkGreen);
aGradient.SetEndColor(aLightRed);
- rRenderContext.DrawGradient(Rectangle(Point(1000, 6900),
+ rRenderContext.DrawGradient(tools::Rectangle(Point(1000, 6900),
Size(aPaperSize.Width() - 2000, 500)),
aGradient);
diff --git a/vcl/workben/vcldemo.cxx b/vcl/workben/vcldemo.cxx
index 66fd7cff8316..b80ed6c5a2d8 100644
--- a/vcl/workben/vcldemo.cxx
+++ b/vcl/workben/vcldemo.cxx
@@ -107,7 +107,7 @@ class DemoRenderer
virtual ~RegionRenderer() {}
virtual OUString getName() = 0;
virtual sal_uInt16 getAccelerator() = 0;
- virtual void RenderRegion(OutputDevice &rDev, Rectangle r,
+ virtual void RenderRegion(OutputDevice &rDev, tools::Rectangle r,
const RenderContext &rCtx) = 0;
// repeating count for profiling (to exceed the poor time resolution on Windows)
virtual sal_uInt16 getTestRepeatCount() = 0;
@@ -179,24 +179,24 @@ public:
bool MouseButtonDown(const MouseEvent& rMEvt);
void KeyInput(const KeyEvent& rKEvt);
- static std::vector<Rectangle> partition(const Rectangle &rRect, int nX, int nY)
+ static std::vector<tools::Rectangle> partition(const tools::Rectangle &rRect, int nX, int nY)
{
- std::vector<Rectangle> aRegions = partition(rRect.GetSize(), nX, nY);
+ std::vector<tools::Rectangle> aRegions = partition(rRect.GetSize(), nX, nY);
for (auto it = aRegions.begin(); it != aRegions.end(); ++it)
it->Move(rRect.Left(), rRect.Top());
return aRegions;
}
- static std::vector<Rectangle> partition(const RenderContext &rCtx, int nX, int nY)
+ static std::vector<tools::Rectangle> partition(const RenderContext &rCtx, int nX, int nY)
{
return partition(rCtx.maSize, nX, nY);
}
- static std::vector<Rectangle> partition(Size aSize, int nX, int nY)
+ static std::vector<tools::Rectangle> partition(Size aSize, int nX, int nY)
{
- Rectangle r;
- std::vector<Rectangle> aRegions;
+ tools::Rectangle r;
+ std::vector<tools::Rectangle> aRegions;
// Make small cleared area for these guys
long nBorderSize = std::min(aSize.Height() / 32, aSize.Width() / 32);
@@ -216,7 +216,7 @@ public:
return aRegions;
}
- static void clearRects(OutputDevice &rDev, std::vector<Rectangle> &rRects)
+ static void clearRects(OutputDevice &rDev, std::vector<tools::Rectangle> &rRects)
{
for (size_t i = 0; i < rRects.size(); i++)
{
@@ -233,7 +233,7 @@ public:
}
}
- static void drawBackground(OutputDevice &rDev, const Rectangle& r)
+ static void drawBackground(OutputDevice &rDev, const tools::Rectangle& r)
{
rDev.Erase();
Gradient aGradient;
@@ -246,7 +246,7 @@ public:
struct DrawLines : public RegionRenderer
{
RENDER_DETAILS(lines,KEY_L,100)
- virtual void RenderRegion(OutputDevice &rDev, Rectangle r,
+ virtual void RenderRegion(OutputDevice &rDev, tools::Rectangle r,
const RenderContext &rCtx) override
{
if (rCtx.meStyle == RENDER_EXPANDED)
@@ -254,7 +254,7 @@ public:
AntialiasingFlags nOldAA = rDev.GetAntialiasing();
rDev.SetAntialiasing(AntialiasingFlags::EnableB2dDraw);
- std::vector<Rectangle> aRegions(DemoRenderer::partition(rCtx, 4, 4));
+ std::vector<tools::Rectangle> aRegions(DemoRenderer::partition(rCtx, 4, 4));
DemoRenderer::clearRects(rDev, aRegions);
#if 0 // FIXME: get this through to the backend ...
@@ -296,7 +296,7 @@ public:
};
rDev.SetLineColor(Color(COL_BLACK));
basegfx::B2DPolygon aPoly;
- Rectangle aSub(aRegions[i]);
+ tools::Rectangle aSub(aRegions[i]);
for (size_t j = 0; j < SAL_N_ELEMENTS(aPoints); j++)
{
aPoly.append(basegfx::B2DPoint(aSub.Left() + aSub.GetWidth() * aPoints[j].nX,
@@ -334,16 +334,16 @@ public:
{
RENDER_DETAILS(text,KEY_T,1)
- virtual void RenderRegion(OutputDevice &rDev, Rectangle r,
+ virtual void RenderRegion(OutputDevice &rDev, tools::Rectangle r,
const RenderContext &rCtx) override
{
if (rCtx.meStyle == RENDER_EXPANDED)
{
- std::vector<Rectangle> aToplevelRegions(
+ std::vector<tools::Rectangle> aToplevelRegions(
DemoRenderer::partition(rCtx, 1, 3));
- std::vector<Rectangle> aSubRegions(
+ std::vector<tools::Rectangle> aSubRegions(
DemoRenderer::partition(aToplevelRegions[0], 4, 2));
- Rectangle aBottom(aToplevelRegions[1].TopLeft(),
+ tools::Rectangle aBottom(aToplevelRegions[1].TopLeft(),
aToplevelRegions[2].BottomRight());
DemoRenderer::clearRects(rDev,aSubRegions);
struct {
@@ -381,7 +381,7 @@ public:
}
}
- static void drawText (OutputDevice &rDev, Rectangle r, bool bClip, bool bArabicText, bool bRotate)
+ static void drawText (OutputDevice &rDev, tools::Rectangle r, bool bClip, bool bArabicText, bool bRotate)
{
rDev.SetClipRegion( vcl::Region(r) );
@@ -430,7 +430,7 @@ public:
if (bClip && !bRotate)
{
// only show the first quarter of the text
- Rectangle aRect( r.TopLeft(), Size( r.GetWidth()/2, r.GetHeight()/2 ) );
+ tools::Rectangle aRect( r.TopLeft(), Size( r.GetWidth()/2, r.GetHeight()/2 ) );
rDev.SetClipRegion( vcl::Region( aRect ) );
}
@@ -459,7 +459,7 @@ public:
if (bRotate)
{
- Rectangle aFontRect = r;
+ tools::Rectangle aFontRect = r;
int nHeight = r.GetHeight();
@@ -476,7 +476,7 @@ public:
if (bClip)
{
- Rectangle aClipRect( Point( r.Left(), r.Top() + ( r.GetHeight()/2 ) ) , Size( r.GetWidth()/2, r.GetHeight()/2 ) );
+ tools::Rectangle aClipRect( Point( r.Left(), r.Top() + ( r.GetHeight()/2 ) ) , Size( r.GetWidth()/2, r.GetHeight()/2 ) );
rDev.SetClipRegion( vcl::Region( aClipRect ) );
}
else
@@ -492,7 +492,7 @@ public:
rDev.SetClipRegion();
}
- static void drawComplex (OutputDevice &rDev, Rectangle r)
+ static void drawComplex (OutputDevice &rDev, tools::Rectangle r)
{
const unsigned char pInvalid[] = { 0xfe, 0x1f, 0 };
const unsigned char pDiacritic1[] = { 0x61, 0xcc, 0x8a, 0xcc, 0x8c, 0 };
@@ -558,7 +558,7 @@ public:
// Legend
vcl::Font aIndexFont("sans", Size(0,20));
aIndexFont.SetColor(COL_BLACK);
- Rectangle aTextRect;
+ tools::Rectangle aTextRect;
rDev.SetFont(aIndexFont);
OUString aText = OUString::number(i) + ".";
rDev.DrawText(aPos, aText);
@@ -613,7 +613,7 @@ public:
{
rDev.Push();
{
- Rectangle aTextRect;
+ tools::Rectangle aTextRect;
rDev.DrawText(aPos,aText);
@@ -626,7 +626,7 @@ public:
if (aTextRect.GetHeight() > nMaxTextHeight)
nMaxTextHeight = aTextRect.GetHeight();
// This should intersect with the text
- Rectangle aInnerRect(
+ tools::Rectangle aInnerRect(
aTextRect.Left()+1, aTextRect.Top()+1,
aTextRect.Right()-1, aTextRect.Bottom()-1);
rDev.SetLineColor(COL_WHITE);
@@ -661,17 +661,17 @@ public:
struct DrawCheckered : public RegionRenderer
{
RENDER_DETAILS(checks,KEY_C,20)
- virtual void RenderRegion(OutputDevice &rDev, Rectangle r,
+ virtual void RenderRegion(OutputDevice &rDev, tools::Rectangle r,
const RenderContext &rCtx) override
{
if (rCtx.meStyle == RENDER_EXPANDED)
{
- std::vector<Rectangle> aRegions(DemoRenderer::partition(rCtx, 2, 2));
+ std::vector<tools::Rectangle> aRegions(DemoRenderer::partition(rCtx, 2, 2));
for (size_t i = 0; i < aRegions.size(); i++)
{
vcl::Region aRegion;
- Rectangle aSub(aRegions[i]);
- Rectangle aSmaller(aSub);
+ tools::Rectangle aSub(aRegions[i]);
+ tools::Rectangle aSmaller(aSub);
aSmaller.Move(10,10);
aSmaller.setWidth(aSmaller.getWidth()-20);
aSmaller.setHeight(aSmaller.getHeight()-24);
@@ -696,7 +696,7 @@ public:
tools::PolyPolygon aPolyPoly;
sal_Int32 nTW = aSub.GetWidth()/6;
sal_Int32 nTH = aSub.GetHeight()/6;
- Rectangle aTiny(Point(4, 4), Size(nTW*2, nTH*2));
+ tools::Rectangle aTiny(Point(4, 4), Size(nTW*2, nTH*2));
aPolyPoly.Insert( tools::Polygon(aTiny));
aTiny.Move(nTW*3, nTH*3);
aPolyPoly.Insert( tools::Polygon(aTiny));
@@ -723,14 +723,14 @@ public:
{
RENDER_DETAILS(poly,KEY_P,20)
DrawCheckered maCheckered;
- virtual void RenderRegion(OutputDevice &rDev, Rectangle r,
+ virtual void RenderRegion(OutputDevice &rDev, tools::Rectangle r,
const RenderContext &rCtx) override
{
maCheckered.RenderRegion(rDev, r, rCtx);
long nDx = r.GetWidth()/20;
long nDy = r.GetHeight()/20;
- Rectangle aShrunk(r);
+ tools::Rectangle aShrunk(r);
aShrunk.Move(nDx, nDy);
aShrunk.SetSize(Size(r.GetWidth()-nDx*2,
r.GetHeight()-nDy*2));
@@ -746,17 +746,17 @@ public:
struct DrawEllipse : public RegionRenderer
{
RENDER_DETAILS(ellipse,KEY_E,500)
- static void doInvert(OutputDevice &rDev, const Rectangle &r,
+ static void doInvert(OutputDevice &rDev, const tools::Rectangle &r,
InvertFlags nFlags)
{
rDev.Invert(r, nFlags);
if (r.GetWidth() > 10 && r.GetHeight() > 10)
{
- Rectangle aSmall(r.Center()-Point(4,4), Size(8,8));
+ tools::Rectangle aSmall(r.Center()-Point(4,4), Size(8,8));
rDev.Invert(aSmall,nFlags);
}
}
- virtual void RenderRegion(OutputDevice &rDev, Rectangle r,
+ virtual void RenderRegion(OutputDevice &rDev, tools::Rectangle r,
const RenderContext &rCtx) override
{
rDev.SetLineColor(Color(COL_RED));
@@ -777,12 +777,12 @@ public:
struct DrawGradient : public RegionRenderer
{
RENDER_DETAILS(gradient,KEY_G,50)
- virtual void RenderRegion(OutputDevice &rDev, Rectangle r,
+ virtual void RenderRegion(OutputDevice &rDev, tools::Rectangle r,
const RenderContext &rCtx) override
{
if (rCtx.meStyle == RENDER_EXPANDED)
{
- std::vector<Rectangle> aRegions(DemoRenderer::partition(rCtx,5, 4));
+ std::vector<tools::Rectangle> aRegions(DemoRenderer::partition(rCtx,5, 4));
sal_uInt32 nStartCols[] = {
COL_RED, COL_RED, COL_RED, COL_GREEN, COL_GREEN,
COL_BLUE, COL_BLUE, COL_BLUE, COL_CYAN, COL_CYAN,
@@ -822,7 +822,7 @@ public:
assert(aRegions.size() <= SAL_N_ELEMENTS(nBorders));
for (size_t i = 0; i < aRegions.size(); i++)
{
- Rectangle aSub = aRegions[i];
+ tools::Rectangle aSub = aRegions[i];
Gradient aGradient;
aGradient.SetStartColor(Color(nStartCols[i]));
aGradient.SetEndColor(Color(nEndCols[i]));
@@ -850,14 +850,14 @@ public:
// Simulate Page Borders rendering - which ultimately should
// be done with a shader / gradient
- static void SimulateBorderStretch(OutputDevice &rDev, const Rectangle& r)
+ static void SimulateBorderStretch(OutputDevice &rDev, const tools::Rectangle& r)
{
BitmapEx aPageShadowMask("sw/res/page-shadow-mask.png");
BitmapEx aRight(aPageShadowMask);
sal_Int32 nSlice = (aPageShadowMask.GetSizePixel().Width() - 3) / 4;
// a width x 1 slice
- aRight.Crop(Rectangle(Point((nSlice * 3) + 3, (nSlice * 2) + 1),
+ aRight.Crop(tools::Rectangle(Point((nSlice * 3) + 3, (nSlice * 2) + 1),
Size(nSlice, 1)));
AlphaMask aAlphaMask(aRight.GetBitmap());
Bitmap aBlockColor = Bitmap(aAlphaMask.GetSizePixel(), 24);
@@ -888,12 +888,12 @@ public:
// An offset background for alpha rendering
rDev.SetFillColor(COL_BLUE);
- Rectangle aSurround(r.Center(), Size(aPageShadowMask.GetSizePixel()));
+ tools::Rectangle aSurround(r.Center(), Size(aPageShadowMask.GetSizePixel()));
rDev.DrawRect(aSurround);
rDev.DrawBitmapEx(aRenderPt, aWhole);
}
- virtual void RenderRegion(OutputDevice &rDev, Rectangle r,
+ virtual void RenderRegion(OutputDevice &rDev, tools::Rectangle r,
const RenderContext &rCtx) override
{
Bitmap aBitmap(rCtx.mpDemoRenderer->maIntroBW);
@@ -908,7 +908,7 @@ public:
{
RENDER_DETAILS(bitmapex,KEY_X,2)
DrawCheckered maCheckered;
- virtual void RenderRegion(OutputDevice &rDev, Rectangle r,
+ virtual void RenderRegion(OutputDevice &rDev, tools::Rectangle r,
const RenderContext &rCtx) override
{
maCheckered.RenderRegion(rDev, r, rCtx);
@@ -925,7 +925,7 @@ public:
struct DrawPolyPolygons : public RegionRenderer
{
RENDER_DETAILS(polypoly,KEY_N,100)
- virtual void RenderRegion(OutputDevice &rDev, Rectangle r,
+ virtual void RenderRegion(OutputDevice &rDev, tools::Rectangle r,
const RenderContext &) override
{
struct {
@@ -946,7 +946,7 @@ public:
{
for (int y = 0; y < 2; y++)
{
- Rectangle aSubRect(r);
+ tools::Rectangle aSubRect(r);
aSubRect.Move(x * r.GetWidth()/3, y * r.GetHeight()/3);
aSubRect.SetSize(Size(r.GetWidth()/2, r.GetHeight()/4));
tools::Polygon aPoly(SAL_N_ELEMENTS(aPoints));
@@ -976,17 +976,17 @@ public:
struct DrawClipped : public RegionRenderer
{
RENDER_DETAILS(clip,KEY_D,10)
- virtual void RenderRegion(OutputDevice &rDev, Rectangle r,
+ virtual void RenderRegion(OutputDevice &rDev, tools::Rectangle r,
const RenderContext &) override
{
- std::vector<Rectangle> aRegions(DemoRenderer::partition(r, 2, 2));
+ std::vector<tools::Rectangle> aRegions(DemoRenderer::partition(r, 2, 2));
const int nLimits[] = { 4, -100 };
for (int i = 0; i < 2; ++i)
{
sal_uInt16 nHue = 0;
rDev.Push(PushFlags::CLIPREGION);
- Rectangle aOuter = aRegions[i];
- Rectangle aInner = aOuter;
+ tools::Rectangle aOuter = aRegions[i];
+ tools::Rectangle aInner = aOuter;
while (aInner.GetWidth() > nLimits[i] && aInner.GetHeight() > nLimits[i])
{
aInner.expand(-1);
@@ -1000,8 +1000,8 @@ public:
{
sal_uInt16 nHue = 0;
- Rectangle aOuter = aRegions[2];
- std::vector<Rectangle> aPieces(DemoRenderer::partition(aOuter, 2, 2));
+ tools::Rectangle aOuter = aRegions[2];
+ std::vector<tools::Rectangle> aPieces(DemoRenderer::partition(aOuter, 2, 2));
for (int j = 0; j < std::min(aOuter.GetWidth(), aOuter.GetHeight())/5; ++j)
{
rDev.Push(PushFlags::CLIPREGION);
@@ -1025,8 +1025,8 @@ public:
{
sal_uInt16 nHue = 0;
- Rectangle aOuter = aRegions[3];
- std::vector<Rectangle> aPieces(DemoRenderer::partition(aOuter, 2, 2));
+ tools::Rectangle aOuter = aRegions[3];
+ std::vector<tools::Rectangle> aPieces(DemoRenderer::partition(aOuter, 2, 2));
bool bDone = false;
for (int j = 0; !bDone; ++j)
{
@@ -1088,7 +1088,7 @@ public:
RENDER_AS_ALPHA_OUTDEV
};
- static void SizeAndRender(OutputDevice &rDev, const Rectangle& r, RenderType eType,
+ static void SizeAndRender(OutputDevice &rDev, const tools::Rectangle& r, RenderType eType,
const RenderContext &rCtx)
{
ScopedVclPtr<VirtualDevice> pNested;
@@ -1099,7 +1099,7 @@ public:
pNested = VclPtr<VirtualDevice>::Create(rDev,DeviceFormat::DEFAULT,DeviceFormat::DEFAULT).get();
pNested->SetOutputSizePixel(r.GetSize());
- Rectangle aWhole(Point(0,0), r.GetSize());
+ tools::Rectangle aWhole(Point(0,0), r.GetSize());
// mini me
rCtx.mpDemoRenderer->drawToDevice(*pNested, r.GetSize(), true);
@@ -1122,7 +1122,7 @@ public:
*pNested);
}
}
- virtual void RenderRegion(OutputDevice &rDev, Rectangle r,
+ virtual void RenderRegion(OutputDevice &rDev, tools::Rectangle r,
const RenderContext &rCtx) override
{
// avoid infinite recursion
@@ -1131,7 +1131,7 @@ public:
if (rCtx.meStyle == RENDER_EXPANDED)
{
- std::vector<Rectangle> aRegions(DemoRenderer::partition(rCtx,2, 2));
+ std::vector<tools::Rectangle> aRegions(DemoRenderer::partition(rCtx,2, 2));
DemoRenderer::clearRects(rDev, aRegions);
RenderType eRenderTypes[] = { RENDER_AS_BITMAP, RENDER_AS_OUTDEV,
@@ -1148,7 +1148,7 @@ public:
{
RENDER_DETAILS(xor,KEY_X,1)
- virtual void RenderRegion(OutputDevice &rDev, Rectangle r,
+ virtual void RenderRegion(OutputDevice &rDev, tools::Rectangle r,
const RenderContext &rCtx) override
{
// avoid infinite recursion
@@ -1228,7 +1228,7 @@ public:
}
}
- void doDrawIcons(OutputDevice &rDev, Rectangle r, bool bExpanded)
+ void doDrawIcons(OutputDevice &rDev, tools::Rectangle r, bool bExpanded)
{
long nMaxH = 0;
Point p(r.LeftCenter());
@@ -1363,7 +1363,7 @@ public:
return BitmapEx(aRecovered, aMask);
}
- virtual void RenderRegion(OutputDevice &rDev, Rectangle r,
+ virtual void RenderRegion(OutputDevice &rDev, tools::Rectangle r,
const RenderContext &rCtx) override
{
if (rCtx.meStyle == RENDER_EXPANDED)
@@ -1424,7 +1424,7 @@ public:
struct FetchDrawBitmap : public RegionRenderer
{
RENDER_DETAILS(fetchdraw,KEY_F,50)
- virtual void RenderRegion(OutputDevice &rDev, Rectangle r,
+ virtual void RenderRegion(OutputDevice &rDev, tools::Rectangle r,
const RenderContext &) override
{
Bitmap aBitmap(rDev.GetBitmap(Point(0,0),rDev.GetOutputSizePixel()));
@@ -1433,14 +1433,14 @@ public:
}
};
- void drawThumbs(vcl::RenderContext& rDev, Rectangle aRect, bool bVDev)
+ void drawThumbs(vcl::RenderContext& rDev, tools::Rectangle aRect, bool bVDev)
{
RenderContext aCtx;
aCtx.meStyle = RENDER_THUMB;
aCtx.mbVDev = bVDev;
aCtx.mpDemoRenderer = this;
aCtx.maSize = aRect.GetSize();
- std::vector<Rectangle> aRegions(partition(aRect, mnSegmentsX, mnSegmentsY));
+ std::vector<tools::Rectangle> aRegions(partition(aRect, mnSegmentsX, mnSegmentsY));
DemoRenderer::clearRects(rDev, aRegions);
for (size_t i = 0; i < maRenderers.size(); i++)
{
@@ -1474,7 +1474,7 @@ public:
aCtx.mbVDev = bVDev;
aCtx.mpDemoRenderer = this;
aCtx.maSize = aSize;
- Rectangle aWholeWin(Point(0,0), rDev.GetOutputSizePixel());
+ tools::Rectangle aWholeWin(Point(0,0), rDev.GetOutputSizePixel());
drawBackground(rDev, aWholeWin);
@@ -1578,7 +1578,7 @@ bool DemoRenderer::MouseButtonDown(const MouseEvent& rMEvt)
}
// click on a region to zoom into it
- std::vector<Rectangle> aRegions(partition(GetSizePixel(), mnSegmentsX, mnSegmentsY));
+ std::vector<tools::Rectangle> aRegions(partition(GetSizePixel(), mnSegmentsX, mnSegmentsY));
for (size_t i = 0; i < aRegions.size(); i++)
{
if (aRegions[i].IsInside(rMEvt.GetPosPixel()))
@@ -1782,7 +1782,7 @@ public:
mrRenderer.SetSizePixel(GetSizePixel());
mrRenderer.KeyInput(rKEvt);
}
- virtual void Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) override
+ virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) override
{
mrRenderer.SetSizePixel(GetSizePixel());
fprintf(stderr, "DemoWin::Paint(%ld,%ld,%ld,%ld)\n", rRect.getX(), rRect.getY(), rRect.getWidth(), rRect.getHeight());
@@ -1894,11 +1894,11 @@ public:
mpBar.disposeAndClear();
WorkWindow::dispose();
}
- virtual void Paint(vcl::RenderContext& rRenderContext, const Rectangle&) override
+ virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&) override
{
- Rectangle aWholeSize(Point(0, 0),GetOutputSizePixel());
+ tools::Rectangle aWholeSize(Point(0, 0),GetOutputSizePixel());
vcl::Region aClip(aWholeSize);
- Rectangle aExclude(Rectangle(Point(50,50),Size(100,100)));
+ tools::Rectangle aExclude(tools::Rectangle(Point(50,50),Size(100,100)));
aClip.Exclude(aExclude);
Wallpaper aWallpaper(COL_GREEN);
@@ -1912,7 +1912,7 @@ public:
pDev->EnableRTL(IsRTLEnabled());
pDev->SetOutputSizePixel(aExclude.GetSize());
- Rectangle aSubRect(aWholeSize);
+ tools::Rectangle aSubRect(aWholeSize);
aSubRect.Move(-aExclude.Left(), -aExclude.Top());
pDev->DrawWallpaper(aSubRect, aWallpaper );
@@ -1973,12 +1973,12 @@ class DemoPopup : public FloatingWindow
Update();
}
- virtual void Paint(vcl::RenderContext& /*rRenderContext*/, const Rectangle&) override
+ virtual void Paint(vcl::RenderContext& /*rRenderContext*/, const tools::Rectangle&) override
{
// Interestingly in GL mode on Windows, this doesn't render.
Size aSize = GetOutputSizePixel();
- Rectangle aTextRect(Point(6, 6), aSize);
+ tools::Rectangle aTextRect(Point(6, 6), aSize);
SetTextColor(COL_BLACK);
SetTextAlign(ALIGN_TOP);
@@ -1988,12 +1988,12 @@ class DemoPopup : public FloatingWindow
SetLineColor(COL_BLACK);
SetFillColor();
- DrawRect( Rectangle( Point(), aSize ) );
+ DrawRect( tools::Rectangle( Point(), aSize ) );
aSize.Width() -= 2;
aSize.Height() -= 2;
Color aColor( GetLineColor() );
SetLineColor( ( COL_GRAY ) );
- DrawRect( Rectangle( Point( 1, 1 ), aSize ) );
+ DrawRect( tools::Rectangle( Point( 1, 1 ), aSize ) );
SetLineColor( aColor );
}