summaryrefslogtreecommitdiff
path: root/sc/source/ui/cctrl
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 /sc/source/ui/cctrl
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 'sc/source/ui/cctrl')
-rw-r--r--sc/source/ui/cctrl/cbuttonw.cxx10
-rw-r--r--sc/source/ui/cctrl/checklistmenu.cxx34
-rw-r--r--sc/source/ui/cctrl/dpcontrol.cxx6
-rw-r--r--sc/source/ui/cctrl/tbzoomsliderctrl.cxx24
4 files changed, 37 insertions, 37 deletions
diff --git a/sc/source/ui/cctrl/cbuttonw.cxx b/sc/source/ui/cctrl/cbuttonw.cxx
index f7d9729512d2..4fa281c4734a 100644
--- a/sc/source/ui/cctrl/cbuttonw.cxx
+++ b/sc/source/ui/cctrl/cbuttonw.cxx
@@ -61,13 +61,13 @@ void ScDDComboBoxButton::Draw( const Point& rAt,
Color aOldLine = pOut->GetLineColor();
bool bOldEnable = pOut->IsMapModeEnabled();
- Rectangle aBtnRect( rAt, rSize );
+ tools::Rectangle aBtnRect( rAt, rSize );
pOut->EnableMapMode( false );
DecorationView aDecoView( pOut);
- Rectangle aInnerRect=aDecoView.DrawButton( aBtnRect, DrawButtonFlags::Default );
+ tools::Rectangle aInnerRect=aDecoView.DrawButton( aBtnRect, DrawButtonFlags::Default );
aInnerRect.Left() += 1;
aInnerRect.Top() += 1;
@@ -94,11 +94,11 @@ void ScDDComboBoxButton::Draw( const Point& rAt,
pOut->SetFillColor();
}
-void ScDDComboBoxButton::ImpDrawArrow( const Rectangle& rRect )
+void ScDDComboBoxButton::ImpDrawArrow( const tools::Rectangle& rRect )
{
// no need to save old line and fill color here (is restored after the call)
- Rectangle aPixRect = rRect;
+ tools::Rectangle aPixRect = rRect;
Point aCenter = aPixRect.Center();
Size aSize = aPixRect.GetSize();
@@ -110,7 +110,7 @@ void ScDDComboBoxButton::ImpDrawArrow( const Rectangle& rRect )
aSize4.Width() = aSize.Width() >> 2;
aSize4.Height() = aSize.Height() >> 2;
- Rectangle aTempRect = aPixRect;
+ tools::Rectangle aTempRect = aPixRect;
const StyleSettings& rSett = Application::GetSettings().GetStyleSettings();
Color aColor( rSett.GetButtonTextColor().GetColor() );
diff --git a/sc/source/ui/cctrl/checklistmenu.cxx b/sc/source/ui/cctrl/checklistmenu.cxx
index 9023b0f296a3..cf4d20082181 100644
--- a/sc/source/ui/cctrl/checklistmenu.cxx
+++ b/sc/source/ui/cctrl/checklistmenu.cxx
@@ -238,7 +238,7 @@ void ScMenuFloatingWindow::KeyInput(const KeyEvent& rKEvt)
Window::KeyInput(rKEvt);
}
-void ScMenuFloatingWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangle& /*rRect*/)
+void ScMenuFloatingWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& /*rRect*/)
{
const StyleSettings& rStyle = GetSettings().GetStyleSettings();
@@ -247,7 +247,7 @@ void ScMenuFloatingWindow::Paint(vcl::RenderContext& rRenderContext, const Recta
Color aBackColor = rStyle.GetMenuColor();
Color aBorderColor = rStyle.GetShadowColor();
- Rectangle aCtrlRect(Point(0, 0), GetOutputSizePixel());
+ tools::Rectangle aCtrlRect(Point(0, 0), GetOutputSizePixel());
// Window background
bool bNativeDrawn = true;
@@ -373,7 +373,7 @@ void ScMenuFloatingWindow::drawMenuItem(vcl::RenderContext& rRenderContext, size
aMarkerPos.Y() += aSize.Height() / 2 - nFontHeight / 4 + 1;
aMarkerPos.X() += aSize.Width() - nFontHeight + nFontHeight / 4;
Size aMarkerSize(nFontHeight / 2, nFontHeight / 2);
- aDecoView.DrawSymbol(Rectangle(aMarkerPos, aMarkerSize), SymbolType::SPIN_RIGHT, GetTextColor());
+ aDecoView.DrawSymbol(tools::Rectangle(aMarkerPos, aMarkerSize), SymbolType::SPIN_RIGHT, GetTextColor());
}
}
@@ -382,13 +382,13 @@ void ScMenuFloatingWindow::drawSeparator(vcl::RenderContext& rRenderContext, siz
Point aPos;
Size aSize;
getMenuItemPosSize(nPos, aPos, aSize);
- Rectangle aRegion(aPos,aSize);
+ tools::Rectangle aRegion(aPos,aSize);
if (rRenderContext.IsNativeControlSupported(ControlType::MenuPopup, ControlPart::Entire))
{
rRenderContext.Push(PushFlags::CLIPREGION);
rRenderContext.IntersectClipRegion(aRegion);
- Rectangle aCtrlRect(Point(0,0), GetOutputSizePixel());
+ tools::Rectangle aCtrlRect(Point(0,0), GetOutputSizePixel());
rRenderContext.DrawNativeControl(ControlType::MenuPopup, ControlPart::Entire, aCtrlRect,
ControlState::ENABLED, ImplControlValue(), OUString());
@@ -565,7 +565,7 @@ void ScMenuFloatingWindow::launchSubMenu(bool bSetMenuPos)
SetPopupModeFlags(nOldFlags | FloatWinPopupFlags::NoAppFocusClose);
pSubMenu->resizeToFitMenuItems(); // set the size before launching the popup to get it positioned correctly.
pSubMenu->StartPopupMode(
- Rectangle(aPos,aSize), (FloatWinPopupFlags::Right | FloatWinPopupFlags::GrabFocus));
+ tools::Rectangle(aPos,aSize), (FloatWinPopupFlags::Right | FloatWinPopupFlags::GrabFocus));
pSubMenu->AddPopupModeWindow(this);
if (bSetMenuPos)
pSubMenu->setSelectedMenuItem(0, false, false); // select menu item after the popup becomes fully visible.
@@ -675,13 +675,13 @@ void ScMenuFloatingWindow::highlightMenuItem(vcl::RenderContext& rRenderContext,
Point aPos;
Size aSize;
getMenuItemPosSize(nPos, aPos, aSize);
- Rectangle aRegion(aPos,aSize);
+ tools::Rectangle aRegion(aPos,aSize);
if (rRenderContext.IsNativeControlSupported(ControlType::MenuPopup, ControlPart::Entire))
{
rRenderContext.Push(PushFlags::CLIPREGION);
- rRenderContext.IntersectClipRegion(Rectangle(aPos, aSize));
- Rectangle aCtrlRect(Point(0,0), GetOutputSizePixel());
+ rRenderContext.IntersectClipRegion(tools::Rectangle(aPos, aSize));
+ tools::Rectangle aCtrlRect(Point(0,0), GetOutputSizePixel());
rRenderContext.DrawNativeControl(ControlType::MenuPopup, ControlPart::Entire, aCtrlRect, ControlState::ENABLED,
ImplControlValue(), OUString());
rRenderContext.Pop();
@@ -707,7 +707,7 @@ void ScMenuFloatingWindow::highlightMenuItem(vcl::RenderContext& rRenderContext,
rRenderContext.SetFillColor(aBackColor);
rRenderContext.SetLineColor(aBackColor);
}
- rRenderContext.DrawRect(Rectangle(aPos,aSize));
+ rRenderContext.DrawRect(tools::Rectangle(aPos,aSize));
}
Color aTextColor = bSelected ? rStyle.GetMenuHighlightTextColor() : rStyle.GetMenuTextColor();
@@ -744,7 +744,7 @@ size_t ScMenuFloatingWindow::getEnclosingMenuItem(const Point& rPos) const
Point aPos;
Size aSize;
getMenuItemPosSize(i, aPos, aSize);
- Rectangle aRect(aPos, aSize);
+ tools::Rectangle aRect(aPos, aSize);
if (aRect.IsInside(rPos))
return maMenuItems[i].mbSeparator ? MENU_NOT_SELECTED : i;
}
@@ -815,7 +815,7 @@ void ScMenuFloatingWindow::ensureSubMenuVisible(ScMenuFloatingWindow* pSubMenu)
SetPopupModeFlags(nOldFlags | FloatWinPopupFlags::NoAppFocusClose);
pSubMenu->resizeToFitMenuItems(); // set the size before launching the popup to get it positioned correctly.
pSubMenu->StartPopupMode(
- Rectangle(aPos,aSize), (FloatWinPopupFlags::Right | FloatWinPopupFlags::GrabFocus));
+ tools::Rectangle(aPos,aSize), (FloatWinPopupFlags::Right | FloatWinPopupFlags::GrabFocus));
pSubMenu->AddPopupModeWindow(this);
SetPopupModeFlags(nOldFlags);
}
@@ -1337,7 +1337,7 @@ bool ScCheckListMenuWindow::EventNotify(NotifyEvent& rNEvt)
return ScMenuFloatingWindow::EventNotify(rNEvt);
}
-void ScCheckListMenuWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect)
+void ScCheckListMenuWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect)
{
ScMenuFloatingWindow::Paint(rRenderContext, rRect);
@@ -1352,12 +1352,12 @@ void ScCheckListMenuWindow::Paint(vcl::RenderContext& rRenderContext, const Rect
// Member list box background
rRenderContext.SetFillColor(aMemberBackColor);
rRenderContext.SetLineColor(aBorderColor);
- rRenderContext.DrawRect(Rectangle(aPos,aSize));
+ rRenderContext.DrawRect(tools::Rectangle(aPos,aSize));
// Single-action button box
getSectionPosSize(aPos, aSize, SINGLE_BTN_AREA);
rRenderContext.SetFillColor(rStyle.GetMenuColor());
- rRenderContext.DrawRect(Rectangle(aPos,aSize));
+ rRenderContext.DrawRect(tools::Rectangle(aPos,aSize));
}
void ScCheckListMenuWindow::updateMemberParents( SvTreeListEntry* pLeaf, size_t nIdx )
@@ -1930,14 +1930,14 @@ void ScCheckListMenuWindow::getResult(ResultType& rResult)
rResult.swap(aResult);
}
-void ScCheckListMenuWindow::launch(const Rectangle& rRect)
+void ScCheckListMenuWindow::launch(const tools::Rectangle& rRect)
{
packWindow();
if (!maConfig.mbAllowEmptySet)
// We need to have at least one member selected.
maBtnOk->Enable(maChecks->GetCheckedEntryCount() != 0);
- Rectangle aRect(rRect);
+ tools::Rectangle aRect(rRect);
if (maConfig.mbRTL)
{
// In RTL mode, the logical "left" is visual "right".
diff --git a/sc/source/ui/cctrl/dpcontrol.cxx b/sc/source/ui/cctrl/dpcontrol.cxx
index cc0aaf972e61..deb422163e9f 100644
--- a/sc/source/ui/cctrl/dpcontrol.cxx
+++ b/sc/source/ui/cctrl/dpcontrol.cxx
@@ -98,7 +98,7 @@ void ScDPFieldButton::draw()
if (mbBaseButton)
{
// Background
- Rectangle aRect(maPos, maSize);
+ tools::Rectangle aRect(maPos, maSize);
mpOutDev->SetLineColor(mpStyle->GetFaceColor());
mpOutDev->SetFillColor(mpStyle->GetFaceColor());
mpOutDev->DrawRect(aRect);
@@ -176,7 +176,7 @@ void ScDPFieldButton::drawPopupButton()
mpOutDev->SetLineColor(COL_BLACK);
Color aBackgroundColor = mbPopupPressed ? mpStyle->GetShadowColor() : mpStyle->GetFaceColor();
mpOutDev->SetFillColor(aBackgroundColor);
- mpOutDev->DrawRect(Rectangle(aPos, aSize));
+ mpOutDev->DrawRect(tools::Rectangle(aPos, aSize));
// the arrowhead
Color aArrowColor = mbHasHiddenMember ? mpStyle->GetHighlightLinkColor() : mpStyle->GetButtonTextColor();
@@ -198,7 +198,7 @@ void ScDPFieldButton::drawPopupButton()
// tiny little box to display in presence of hidden member(s).
Point aBoxPos(aPos.X() + aSize.Width() - 5 * fScaleFactor, aPos.Y() + aSize.Height() - 5 * fScaleFactor);
Size aBoxSize(3 * fScaleFactor, 3 * fScaleFactor);
- mpOutDev->DrawRect(Rectangle(aBoxPos, aBoxSize));
+ mpOutDev->DrawRect(tools::Rectangle(aBoxPos, aBoxSize));
}
}
diff --git a/sc/source/ui/cctrl/tbzoomsliderctrl.cxx b/sc/source/ui/cctrl/tbzoomsliderctrl.cxx
index 2c09eaedda54..15d0e88d44d6 100644
--- a/sc/source/ui/cctrl/tbzoomsliderctrl.cxx
+++ b/sc/source/ui/cctrl/tbzoomsliderctrl.cxx
@@ -274,7 +274,7 @@ void ScZoomSliderWnd::MouseButtonDown( const MouseEvent& rMEvt )
if( nOldZoom == mpImpl->mnCurrentZoom )
return ;
- Rectangle aRect( Point( 0, 0 ), aSliderWindowSize );
+ tools::Rectangle aRect( Point( 0, 0 ), aSliderWindowSize );
Invalidate(aRect);
mpImpl->mbOmitPaint = true;
@@ -308,7 +308,7 @@ void ScZoomSliderWnd::MouseMove( const MouseEvent& rMEvt )
{
mpImpl->mnCurrentZoom = Offset2Zoom( aPoint.X() );
- Rectangle aRect(Point(0, 0), aSliderWindowSize);
+ tools::Rectangle aRect(Point(0, 0), aSliderWindowSize);
Invalidate(aRect);
mpImpl->mbOmitPaint = true; // optimization: paint before executing command,
@@ -374,45 +374,45 @@ void ScZoomSliderWnd::UpdateFromItem( const SvxZoomSliderItem* pZoomSliderItem )
}
Size aSliderWindowSize = GetOutputSizePixel();
- Rectangle aRect(Point(0, 0), aSliderWindowSize);
+ tools::Rectangle aRect(Point(0, 0), aSliderWindowSize);
if ( !mpImpl->mbOmitPaint )
Invalidate(aRect);
}
-void ScZoomSliderWnd::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect)
+void ScZoomSliderWnd::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect)
{
DoPaint(rRenderContext, rRect);
}
-void ScZoomSliderWnd::DoPaint(vcl::RenderContext& rRenderContext, const Rectangle& /*rRect*/)
+void ScZoomSliderWnd::DoPaint(vcl::RenderContext& rRenderContext, const tools::Rectangle& /*rRect*/)
{
if (mpImpl->mbOmitPaint)
return;
Size aSliderWindowSize(GetOutputSizePixel());
- Rectangle aRect(Point(0, 0), aSliderWindowSize);
+ tools::Rectangle aRect(Point(0, 0), aSliderWindowSize);
ScopedVclPtrInstance< VirtualDevice > pVDev(rRenderContext);
pVDev->SetOutputSizePixel(aSliderWindowSize);
- Rectangle aSlider = aRect;
+ tools::Rectangle aSlider = aRect;
aSlider.Top() += (aSliderWindowSize.Height() - nSliderHeight) / 2 - 1;
aSlider.Bottom() = aSlider.Top() + nSliderHeight;
aSlider.Left() += nSliderXOffset;
aSlider.Right() -= nSliderXOffset;
- Rectangle aFirstLine(aSlider);
+ tools::Rectangle aFirstLine(aSlider);
aFirstLine.Bottom() = aFirstLine.Top();
- Rectangle aSecondLine(aSlider);
+ tools::Rectangle aSecondLine(aSlider);
aSecondLine.Top() = aSecondLine.Bottom();
- Rectangle aLeft(aSlider);
+ tools::Rectangle aLeft(aSlider);
aLeft.Right() = aLeft.Left();
- Rectangle aRight(aSlider);
+ tools::Rectangle aRight(aSlider);
aRight.Left() = aRight.Right();
// draw VirtualDevice's background color
@@ -446,7 +446,7 @@ void ScZoomSliderWnd::DoPaint(vcl::RenderContext& rRenderContext, const Rectangl
++aSnappingPointIter)
{
pVDev->SetLineColor(Color(COL_GRAY));
- Rectangle aSnapping(aRect);
+ tools::Rectangle aSnapping(aRect);
aSnapping.Bottom() = aSlider.Top();
aSnapping.Top() = aSnapping.Bottom() - nSnappingHeight;
aSnapping.Left() += *aSnappingPointIter;