summaryrefslogtreecommitdiff
path: root/sfx2/source/control
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 /sfx2/source/control
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 'sfx2/source/control')
-rw-r--r--sfx2/source/control/recentdocsview.cxx4
-rw-r--r--sfx2/source/control/recentdocsviewitem.cxx14
-rw-r--r--sfx2/source/control/templatedefaultview.cxx4
-rw-r--r--sfx2/source/control/templatelocalview.cxx6
-rw-r--r--sfx2/source/control/templatesearchview.cxx4
-rw-r--r--sfx2/source/control/templateviewitem.cxx6
-rw-r--r--sfx2/source/control/thumbnailview.cxx10
-rw-r--r--sfx2/source/control/thumbnailviewacc.cxx8
-rw-r--r--sfx2/source/control/thumbnailviewitem.cxx6
9 files changed, 31 insertions, 31 deletions
diff --git a/sfx2/source/control/recentdocsview.cxx b/sfx2/source/control/recentdocsview.cxx
index 02c6019e7033..e068c0f3d989 100644
--- a/sfx2/source/control/recentdocsview.cxx
+++ b/sfx2/source/control/recentdocsview.cxx
@@ -66,7 +66,7 @@ RecentDocsView::RecentDocsView( vcl::Window* pParent )
, maWelcomeLine1(SfxResId(STR_WELCOME_LINE1))
, maWelcomeLine2(SfxResId(STR_WELCOME_LINE2))
{
- Rectangle aScreen = Application::GetScreenPosSizePixel(Application::GetDisplayBuiltInScreen());
+ tools::Rectangle aScreen = Application::GetScreenPosSizePixel(Application::GetDisplayBuiltInScreen());
mnItemMaxSize = std::min(aScreen.GetWidth(),aScreen.GetHeight()) > 800 ? 256 : 192;
SetStyle(GetStyle() | WB_VSCROLL);
@@ -264,7 +264,7 @@ void RecentDocsView::OnItemDblClicked(ThumbnailViewItem *pItem)
pRecentItem->OpenDocument();
}
-void RecentDocsView::Paint(vcl::RenderContext& rRenderContext, const Rectangle &aRect)
+void RecentDocsView::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle &aRect)
{
// Set preferred width
if (mFilteredItemList.empty())
diff --git a/sfx2/source/control/recentdocsviewitem.cxx b/sfx2/source/control/recentdocsviewitem.cxx
index 571ec8e4ad90..5b8080171d93 100644
--- a/sfx2/source/control/recentdocsviewitem.cxx
+++ b/sfx2/source/control/recentdocsviewitem.cxx
@@ -93,8 +93,8 @@ RecentDocsViewItem::RecentDocsViewItem(ThumbnailView &rView, const OUString &rUR
aThumbnail = BitmapEx(Bitmap(aThumbnailSize, 24), AlphaMask(aThumbnailSize, &nAlpha));
aThumbnail.CopyPixel(
- Rectangle(Point((aThumbnailSize.Width() - aExtSize.Width()) / 2, (aThumbnailSize.Height() - aExtSize.Height()) / 2), aExtSize),
- Rectangle(Point(0, 0), aExtSize),
+ ::tools::Rectangle(Point((aThumbnailSize.Width() - aExtSize.Width()) / 2, (aThumbnailSize.Height() - aExtSize.Height()) / 2), aExtSize),
+ ::tools::Rectangle(Point(0, 0), aExtSize),
&aExt);
}
@@ -102,9 +102,9 @@ RecentDocsViewItem::RecentDocsViewItem(ThumbnailView &rView, const OUString &rUR
maPreview1 = TemplateLocalView::scaleImg(aThumbnail, nThumbnailSize, nThumbnailSize);
}
-Rectangle RecentDocsViewItem::updateHighlight(bool bVisible, const Point& rPoint)
+::tools::Rectangle RecentDocsViewItem::updateHighlight(bool bVisible, const Point& rPoint)
{
- Rectangle aRect(ThumbnailViewItem::updateHighlight(bVisible, rPoint));
+ ::tools::Rectangle aRect(ThumbnailViewItem::updateHighlight(bVisible, rPoint));
if (bVisible && getRemoveIconArea().IsInside(rPoint))
{
@@ -124,12 +124,12 @@ Rectangle RecentDocsViewItem::updateHighlight(bool bVisible, const Point& rPoint
return aRect;
}
-Rectangle RecentDocsViewItem::getRemoveIconArea() const
+::tools::Rectangle RecentDocsViewItem::getRemoveIconArea() const
{
- Rectangle aArea(getDrawArea());
+ ::tools::Rectangle aArea(getDrawArea());
Size aSize(m_aRemoveRecentBitmap.GetSizePixel());
- return Rectangle(
+ return ::tools::Rectangle(
Point(aArea.Right() - aSize.Width() - THUMBNAILVIEW_ITEM_CORNER, aArea.Top() + THUMBNAILVIEW_ITEM_CORNER),
aSize);
}
diff --git a/sfx2/source/control/templatedefaultview.cxx b/sfx2/source/control/templatedefaultview.cxx
index 26d3f808da27..1520a856f5b4 100644
--- a/sfx2/source/control/templatedefaultview.cxx
+++ b/sfx2/source/control/templatedefaultview.cxx
@@ -29,7 +29,7 @@ TemplateDefaultView::TemplateDefaultView( Window* pParent)
: TemplateLocalView(pParent, WB_TABSTOP)
, mnTextHeight(30)
{
- Rectangle aScreen = Application::GetScreenPosSizePixel(Application::GetDisplayBuiltInScreen());
+ tools::Rectangle aScreen = Application::GetScreenPosSizePixel(Application::GetDisplayBuiltInScreen());
mnItemMaxSize = std::min(aScreen.GetWidth(),aScreen.GetHeight()) > 800 ? 256 : 192;
ThumbnailView::setItemDimensions( mnItemMaxSize, mnItemMaxSize, mnTextHeight, gnItemPadding );
updateThumbnailDimensions(mnItemMaxSize);
@@ -86,7 +86,7 @@ void TemplateDefaultView::createContextMenu()
deselectItems();
maSelectedItem->setSelection(true);
pItemMenu->SetSelectHdl(LINK(this, TemplateLocalView, ContextMenuSelectHdl));
- pItemMenu->Execute(this, Rectangle(maPosition,Size(1,1)), PopupMenuFlags::ExecuteDown);
+ pItemMenu->Execute(this, tools::Rectangle(maPosition,Size(1,1)), PopupMenuFlags::ExecuteDown);
Invalidate();
}
diff --git a/sfx2/source/control/templatelocalview.cxx b/sfx2/source/control/templatelocalview.cxx
index ffb3eeefc61c..cfbe91cc9b69 100644
--- a/sfx2/source/control/templatelocalview.cxx
+++ b/sfx2/source/control/templatelocalview.cxx
@@ -250,7 +250,7 @@ void TemplateLocalView::createContextMenu(const bool bIsDefault)
maSelectedItem->setSelection(true);
maItemStateHdl.Call(maSelectedItem);
pItemMenu->SetSelectHdl(LINK(this, TemplateLocalView, ContextMenuSelectHdl));
- pItemMenu->Execute(this, Rectangle(maPosition,Size(1,1)), PopupMenuFlags::ExecuteDown);
+ pItemMenu->Execute(this, tools::Rectangle(maPosition,Size(1,1)), PopupMenuFlags::ExecuteDown);
Invalidate();
}
@@ -840,7 +840,7 @@ void TemplateLocalView::RequestHelp( const HelpEvent& rHEvt )
{
if ( rHEvt.GetMode() & HelpEventMode::QUICK )
{
- Rectangle aRect( OutputToScreenPixel( GetPosPixel() ), GetSizePixel() );
+ tools::Rectangle aRect( OutputToScreenPixel( GetPosPixel() ), GetSizePixel() );
Help::ShowQuickHelp( this, aRect, GetQuickHelpText(),
QuickHelpFlags::CtrlText | QuickHelpFlags::TipStyleBalloon );
return;
@@ -878,7 +878,7 @@ void TemplateLocalView::Command( const CommandEvent& rCEvt )
deselectItems();
pItem->setSelection(true);
maItemStateHdl.Call(pItem);
- Rectangle aRect = pItem->getDrawArea();
+ tools::Rectangle aRect = pItem->getDrawArea();
maPosition = aRect.Center();
maSelectedItem = dynamic_cast<TemplateViewItem*>(pItem);
maCreateContextMenuHdl.Call(pItem);
diff --git a/sfx2/source/control/templatesearchview.cxx b/sfx2/source/control/templatesearchview.cxx
index 0628e0d8b760..1695fa25913f 100644
--- a/sfx2/source/control/templatesearchview.cxx
+++ b/sfx2/source/control/templatesearchview.cxx
@@ -111,7 +111,7 @@ void TemplateSearchView::Command( const CommandEvent& rCEvt )
deselectItems();
pItem->setSelection(true);
maItemStateHdl.Call(pItem);
- Rectangle aRect = pItem->getDrawArea();
+ tools::Rectangle aRect = pItem->getDrawArea();
maPosition = aRect.Center();
maSelectedItem = dynamic_cast<TemplateViewItem*>(pItem);
maCreateContextMenuHdl.Call(pItem);
@@ -140,7 +140,7 @@ void TemplateSearchView::createContextMenu( const bool bIsDefault)
maSelectedItem->setSelection(true);
maItemStateHdl.Call(maSelectedItem);
pItemMenu->SetSelectHdl(LINK(this, TemplateSearchView, ContextMenuSelectHdl));
- pItemMenu->Execute(this, Rectangle(maPosition,Size(1,1)), PopupMenuFlags::ExecuteDown);
+ pItemMenu->Execute(this, tools::Rectangle(maPosition,Size(1,1)), PopupMenuFlags::ExecuteDown);
Invalidate();
}
diff --git a/sfx2/source/control/templateviewitem.cxx b/sfx2/source/control/templateviewitem.cxx
index 2d396b9e640f..9a32bc8efa09 100644
--- a/sfx2/source/control/templateviewitem.cxx
+++ b/sfx2/source/control/templateviewitem.cxx
@@ -43,12 +43,12 @@ TemplateViewItem::~TemplateViewItem ()
{
}
-Rectangle TemplateViewItem::getDefaultIconArea() const
+::tools::Rectangle TemplateViewItem::getDefaultIconArea() const
{
- Rectangle aArea(getDrawArea());
+ ::tools::Rectangle aArea(getDrawArea());
Size aSize(maDefaultBitmap.GetSizePixel());
- return Rectangle(
+ return ::tools::Rectangle(
Point(aArea.Left() + THUMBNAILVIEW_ITEM_CORNER, aArea.Top() + THUMBNAILVIEW_ITEM_CORNER),
aSize);
}
diff --git a/sfx2/source/control/thumbnailview.cxx b/sfx2/source/control/thumbnailview.cxx
index 5843d79c8a54..8ecb03dad3e8 100644
--- a/sfx2/source/control/thumbnailview.cxx
+++ b/sfx2/source/control/thumbnailview.cxx
@@ -88,7 +88,7 @@ void ThumbnailView::MouseMove(const MouseEvent& rMEvt)
aHelp = pItem->getHelpText();
}
- Rectangle aToInvalidate(pItem->updateHighlight(pItem->mbVisible && !rMEvt.IsLeaveWindow(), aPoint));
+ ::tools::Rectangle aToInvalidate(pItem->updateHighlight(pItem->mbVisible && !rMEvt.IsLeaveWindow(), aPoint));
if (!aToInvalidate.IsEmpty() && IsReallyVisible() && IsUpdateMode())
Invalidate(aToInvalidate);
@@ -208,7 +208,7 @@ void ThumbnailView::DrawItem(ThumbnailViewItem *pItem)
{
if (pItem->isVisible())
{
- Rectangle aRect = pItem->getDrawArea();
+ ::tools::Rectangle aRect = pItem->getDrawArea();
if ((aRect.GetHeight() > 0) && (aRect.GetWidth() > 0))
Invalidate(aRect);
@@ -351,7 +351,7 @@ void ThumbnailView::CalculateItemPositions (bool bScrollBarUsed)
maItemStateHdl.Call(pItem);
}
- pItem->setDrawArea(Rectangle( Point(x,y), Size(mnItemWidth, mnItemHeight) ));
+ pItem->setDrawArea(::tools::Rectangle( Point(x,y), Size(mnItemWidth, mnItemHeight) ));
pItem->calculateItemsPosition(mnThumbnailHeight,mnDisplayHeight,mnItemPadding,mpItemAttrs->nMaxTextLength,mpItemAttrs);
if ( !((nCurCount+1) % mnCols) )
@@ -824,7 +824,7 @@ void ThumbnailView::Command( const CommandEvent& rCEvt )
Control::Command( rCEvt );
}
-void ThumbnailView::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect)
+void ThumbnailView::Paint(vcl::RenderContext& rRenderContext, const ::tools::Rectangle& rRect)
{
size_t nItemCount = mItemList.size();
@@ -832,7 +832,7 @@ void ThumbnailView::Paint(vcl::RenderContext& rRenderContext, const Rectangle& r
drawinglayer::primitive2d::Primitive2DContainer aSeq(1);
aSeq[0] = drawinglayer::primitive2d::Primitive2DReference(
new PolyPolygonColorPrimitive2D(
- B2DPolyPolygon( ::tools::Polygon(Rectangle(Point(), GetOutputSizePixel()), 0, 0).getB2DPolygon()),
+ B2DPolyPolygon( ::tools::Polygon(::tools::Rectangle(Point(), GetOutputSizePixel()), 0, 0).getB2DPolygon()),
maFillColor.getBColor()));
// Create the processor and process the primitives
diff --git a/sfx2/source/control/thumbnailviewacc.cxx b/sfx2/source/control/thumbnailviewacc.cxx
index 7fcf59f19458..aab1ba555b1d 100644
--- a/sfx2/source/control/thumbnailviewacc.cxx
+++ b/sfx2/source/control/thumbnailviewacc.cxx
@@ -310,7 +310,7 @@ sal_Bool SAL_CALL ThumbnailViewAcc::containsPoint( const awt::Point& aPoint )
const Point aSize( aRect.Width, aRect.Height );
const Point aNullPoint, aTestPoint( aPoint.X, aPoint.Y );
- return Rectangle( aNullPoint, aSize ).IsInside( aTestPoint );
+ return tools::Rectangle( aNullPoint, aSize ).IsInside( aTestPoint );
}
uno::Reference< accessibility::XAccessible > SAL_CALL ThumbnailViewAcc::getAccessibleAtPoint( const awt::Point& aPoint )
@@ -823,7 +823,7 @@ sal_Bool SAL_CALL ThumbnailViewItemAcc::containsPoint( const awt::Point& aPoint
const Point aSize( aRect.Width, aRect.Height );
const Point aNullPoint, aTestPoint( aPoint.X, aPoint.Y );
- return Rectangle( aNullPoint, aSize ).IsInside( aTestPoint );
+ return tools::Rectangle( aNullPoint, aSize ).IsInside( aTestPoint );
}
uno::Reference< accessibility::XAccessible > SAL_CALL ThumbnailViewItemAcc::getAccessibleAtPoint( const awt::Point& )
@@ -839,9 +839,9 @@ awt::Rectangle SAL_CALL ThumbnailViewItemAcc::getBounds()
if( mpParent )
{
- Rectangle aRect( mpParent->getDrawArea() );
+ tools::Rectangle aRect( mpParent->getDrawArea() );
Point aOrigin;
- Rectangle aParentRect( aOrigin, mpParent->mrParent.GetOutputSizePixel() );
+ tools::Rectangle aParentRect( aOrigin, mpParent->mrParent.GetOutputSizePixel() );
aRect.Intersection( aParentRect );
diff --git a/sfx2/source/control/thumbnailviewitem.cxx b/sfx2/source/control/thumbnailviewitem.cxx
index 249e1c4a56f7..b90c88b2d753 100644
--- a/sfx2/source/control/thumbnailviewitem.cxx
+++ b/sfx2/source/control/thumbnailviewitem.cxx
@@ -78,7 +78,7 @@ void ThumbnailViewItem::setHighlight (bool state)
mbHover = state;
}
-Rectangle ThumbnailViewItem::updateHighlight(bool bVisible, const Point& rPoint)
+::tools::Rectangle ThumbnailViewItem::updateHighlight(bool bVisible, const Point& rPoint)
{
bool bNeedsPaint = false;
@@ -98,7 +98,7 @@ Rectangle ThumbnailViewItem::updateHighlight(bool bVisible, const Point& rPoint)
if (bNeedsPaint)
return getDrawArea();
- return Rectangle();
+ return ::tools::Rectangle();
}
void ThumbnailViewItem::setTitle (const OUString& rTitle)
@@ -115,7 +115,7 @@ uno::Reference< accessibility::XAccessible > const & ThumbnailViewItem::GetAcces
return mxAcc;
}
-void ThumbnailViewItem::setDrawArea (const Rectangle &area)
+void ThumbnailViewItem::setDrawArea (const ::tools::Rectangle &area)
{
maDrawArea = area;
}