summaryrefslogtreecommitdiff
path: root/vcl/source
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2017-03-30 20:27:55 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2017-03-31 06:27:11 +0000
commita5a571307fb3306b74ab46b085cde6388270a770 (patch)
tree66d4ce12bb5236c50ab6a5d253bc8c6d8b5d292d /vcl/source
parent17d821af6bb9df93569836a92f6bed975587fc6c (diff)
tdf#82580 tools: rename Rectangle to tools::Rectangle
Mostly generated using make check COMPILER_EXTERNAL_TOOL=1 CCACHE_PREFIX=clang-rename-wrapper RENAME_ARGS="-qualified-name=Rectangle -new-name=tools::Rectangle" Except some modules have their own foo::tools namespace, so there have to use ::tools::Rectangle. This commit just moves the class from the global namespace, it does not update pre/postwin.h yet. Change-Id: I42b2de3c6f769fcf28cfe086f98eb31e42a305f2 Reviewed-on: https://gerrit.libreoffice.org/35923 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to 'vcl/source')
-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
119 files changed, 1533 insertions, 1533 deletions
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 );
}