diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2017-03-30 20:27:55 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2017-03-31 06:27:11 +0000 |
commit | a5a571307fb3306b74ab46b085cde6388270a770 (patch) | |
tree | 66d4ce12bb5236c50ab6a5d253bc8c6d8b5d292d /starmath | |
parent | 17d821af6bb9df93569836a92f6bed975587fc6c (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 'starmath')
-rw-r--r-- | starmath/inc/ElementsDockingWindow.hxx | 4 | ||||
-rw-r--r-- | starmath/inc/dialog.hxx | 8 | ||||
-rw-r--r-- | starmath/inc/document.hxx | 2 | ||||
-rw-r--r-- | starmath/inc/edit.hxx | 4 | ||||
-rw-r--r-- | starmath/inc/rect.hxx | 6 | ||||
-rw-r--r-- | starmath/inc/view.hxx | 12 | ||||
-rw-r--r-- | starmath/inc/visitors.hxx | 4 | ||||
-rw-r--r-- | starmath/source/ElementsDockingWindow.cxx | 24 | ||||
-rw-r--r-- | starmath/source/accessibility.cxx | 30 | ||||
-rw-r--r-- | starmath/source/accessibility.hxx | 8 | ||||
-rw-r--r-- | starmath/source/dialog.cxx | 16 | ||||
-rw-r--r-- | starmath/source/document.cxx | 6 | ||||
-rw-r--r-- | starmath/source/edit.cxx | 10 | ||||
-rw-r--r-- | starmath/source/mathmlexport.cxx | 2 | ||||
-rw-r--r-- | starmath/source/mathmlimport.cxx | 2 | ||||
-rw-r--r-- | starmath/source/rect.cxx | 8 | ||||
-rw-r--r-- | starmath/source/unomodel.cxx | 6 | ||||
-rw-r--r-- | starmath/source/view.cxx | 24 | ||||
-rw-r--r-- | starmath/source/visitors.cxx | 8 |
19 files changed, 92 insertions, 92 deletions
diff --git a/starmath/inc/ElementsDockingWindow.hxx b/starmath/inc/ElementsDockingWindow.hxx index 2b5c8b0cc34e..a7a43a1d11f4 100644 --- a/starmath/inc/ElementsDockingWindow.hxx +++ b/starmath/inc/ElementsDockingWindow.hxx @@ -85,7 +85,7 @@ class SmElementsControl : public Control static const sal_uInt16 aFormats[][2]; static const sal_uInt16 aOthers[][2]; - virtual void Paint(vcl::RenderContext& rRenderContext, const Rectangle&) override; + virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&) override; virtual void MouseButtonDown(const MouseEvent& rMEvt) override; virtual void MouseMove(const MouseEvent& rMEvt) override; virtual void RequestHelp(const HelpEvent& rHEvt) override; @@ -151,7 +151,7 @@ public: virtual ~SmElementsDockingWindow() override; virtual void dispose() override; - virtual void EndDocking( const Rectangle& rReactangle, bool bFloatMode) override; + virtual void EndDocking( const tools::Rectangle& rReactangle, bool bFloatMode) override; virtual void ToggleFloatingMode() override; }; diff --git a/starmath/inc/dialog.hxx b/starmath/inc/dialog.hxx index 79bc363db7f3..7de61cf8b7dd 100644 --- a/starmath/inc/dialog.hxx +++ b/starmath/inc/dialog.hxx @@ -80,7 +80,7 @@ public: class SmShowFont : public vcl::Window { - virtual void Paint(vcl::RenderContext& rRenderContext, const Rectangle&) override; + virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&) override; vcl::Font maFont; @@ -279,7 +279,7 @@ class SmShowSymbolSetWindow : public Control void SetScrollBarRange(); Point OffsetPoint(const Point &rPoint) const; - virtual void Paint(vcl::RenderContext& rRenderContext, const Rectangle&) override; + virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&) override; virtual void MouseButtonDown(const MouseEvent& rMEvt) override; virtual void KeyInput(const KeyEvent& rKEvt) override; virtual void Resize() override; @@ -323,7 +323,7 @@ class SmShowSymbol : public Control { Link<SmShowSymbol&,void> aDblClickHdlLink; - virtual void Paint(vcl::RenderContext& rRenderContext, const Rectangle&) override; + virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&) override; virtual void ApplySettings(vcl::RenderContext& rRenderContext) override; virtual void MouseButtonDown(const MouseEvent& rMEvt) override; virtual void Resize() override; @@ -384,7 +384,7 @@ public: class SmShowChar : public Control { - virtual void Paint(vcl::RenderContext& rRenderContext, const Rectangle&) override; + virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&) override; virtual void Resize() override; public: diff --git a/starmath/inc/document.hxx b/starmath/inc/document.hxx index 0c72a33f50a1..351724ddccc7 100644 --- a/starmath/inc/document.hxx +++ b/starmath/inc/document.hxx @@ -201,7 +201,7 @@ public: void Execute( SfxRequest& rReq ); void GetState(SfxItemSet &); - virtual void SetVisArea (const Rectangle & rVisArea) override; + virtual void SetVisArea (const tools::Rectangle & rVisArea) override; virtual void SetModified(bool bModified = true) override; /** Get a cursor for modifying this document diff --git a/starmath/inc/edit.hxx b/starmath/inc/edit.hxx index 5fb4ec1dcdaa..6f1aa1ae7f15 100644 --- a/starmath/inc/edit.hxx +++ b/starmath/inc/edit.hxx @@ -70,13 +70,13 @@ class SmEditWindow : public vcl::Window, public DropTargetHelper virtual sal_Int8 AcceptDrop( const AcceptDropEvent& rEvt ) override; virtual sal_Int8 ExecuteDrop( const ExecuteDropEvent& rEvt ) override; - virtual void Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) override; + virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) override; DECL_LINK(EditStatusHdl, EditStatus&, void); DECL_LINK(ScrollHdl, ScrollBar*, void); void CreateEditView(); - Rectangle AdjustScrollBars(); + tools::Rectangle AdjustScrollBars(); void SetScrollBarRanges(); void InitScrollBars(); void InvalidateSlots(); diff --git a/starmath/inc/rect.hxx b/starmath/inc/rect.hxx index 2a33bb5c5023..83ebdcda5586 100644 --- a/starmath/inc/rect.hxx +++ b/starmath/inc/rect.hxx @@ -180,7 +180,7 @@ public: bool IsInsideRect(const Point &rPoint) const; bool IsInsideItalicRect(const Point &rPoint) const; - inline Rectangle AsRectangle() const; + inline tools::Rectangle AsRectangle() const; SmRect AsGlyphRect() const; }; @@ -210,9 +210,9 @@ inline long SmRect::GetBaseline() const } -inline Rectangle SmRect::AsRectangle() const +inline tools::Rectangle SmRect::AsRectangle() const { - return Rectangle(Point(GetItalicLeft(), GetTop()), GetItalicSize()); + return tools::Rectangle(Point(GetItalicLeft(), GetTop()), GetItalicSize()); } #endif diff --git a/starmath/inc/view.hxx b/starmath/inc/view.hxx index 83cf858ba36f..fdbe2526e625 100644 --- a/starmath/inc/view.hxx +++ b/starmath/inc/view.hxx @@ -46,7 +46,7 @@ class SmGraphicWindow : public ScrollableWindow { Point aFormulaDrawPos; // old style editing pieces - Rectangle aCursorRect; + tools::Rectangle aCursorRect; bool bIsCursorVisible; bool bIsLineVisible; AutoTimer aCaretBlinkTimer; @@ -69,7 +69,7 @@ protected: } using Window::SetCursor; void SetCursor(const SmNode *pNode); - void SetCursor(const Rectangle &rRect); + void SetCursor(const tools::Rectangle &rRect); bool IsInlineEditEnabled() const; private: @@ -79,7 +79,7 @@ private: sal_uInt16 nZoom; protected: - virtual void Paint(vcl::RenderContext& rRenderContext, const Rectangle&) override; + virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&) override; virtual void KeyInput(const KeyEvent& rKEvt) override; virtual void Command(const CommandEvent& rCEvt) override; virtual void StateChanged( StateChangedType eChanged ) override; @@ -172,7 +172,7 @@ protected: // Window virtual void GetFocus() override; virtual void Resize() override; - virtual void Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) override; + virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) override; virtual void StateChanged( StateChangedType nStateChange ) override; virtual Size CalcDockingSize(SfxChildAlignment eAlign) override; @@ -264,7 +264,7 @@ protected: virtual void AdjustPosSizePixel(const Point &rPos, const Size &rSize) override; virtual void InnerResizePixel(const Point &rOfs, const Size &rSize, bool inplaceEditModeChange) override; virtual void OuterResizePixel(const Point &rOfs, const Size &rSize) override; - virtual void QueryObjAreaPixel( Rectangle& rRect ) const override; + virtual void QueryObjAreaPixel( tools::Rectangle& rRect ) const override; virtual void SetZoomFactor( const Fraction &rX, const Fraction &rY ) override; public: @@ -306,7 +306,7 @@ public: void GetState(SfxItemSet &); void Impl_Print( OutputDevice &rOutDev, const SmPrintUIOptions &rPrintUIOptions, - Rectangle aOutRect, Point aZeroPoint ); + tools::Rectangle aOutRect, Point aZeroPoint ); /** Set bInsertIntoEditWindow so we know where to insert * diff --git a/starmath/inc/visitors.hxx b/starmath/inc/visitors.hxx index fafbd328ee2e..63271613f10f 100644 --- a/starmath/inc/visitors.hxx +++ b/starmath/inc/visitors.hxx @@ -392,9 +392,9 @@ private: /** True if aSelectionArea have been initialized */ bool mbHasSelectionArea; /** The current area that is selected */ - Rectangle maSelectionArea; + tools::Rectangle maSelectionArea; /** Extend the area that must be selected */ - void ExtendSelectionArea(const Rectangle& rArea); + void ExtendSelectionArea(const tools::Rectangle& rArea); /** Default visiting method */ void DefaultVisit( SmNode* pNode ) override; /** Visit the children of a given pNode */ diff --git a/starmath/source/ElementsDockingWindow.cxx b/starmath/source/ElementsDockingWindow.cxx index 55d4475fa5c9..2c228d51cca9 100644 --- a/starmath/source/ElementsDockingWindow.cxx +++ b/starmath/source/ElementsDockingWindow.cxx @@ -308,7 +308,7 @@ void SmElementsControl::LayoutOrPaintContents(vcl::RenderContext *pContext) x += boxX; y = 0; - Rectangle aSelectionRectangle(x + 5 - 1, y + 5, + tools::Rectangle aSelectionRectangle(x + 5 - 1, y + 5, x + 5 + 1, nControlHeight - 5); if (pContext) @@ -320,7 +320,7 @@ void SmElementsControl::LayoutOrPaintContents(vcl::RenderContext *pContext) x = 0; y += boxY; - Rectangle aSelectionRectangle(x + 5, y + 5 - 1, + tools::Rectangle aSelectionRectangle(x + 5, y + 5 - 1, nControlWidth - 5, y + 5 + 1); if (pContext) @@ -355,7 +355,7 @@ void SmElementsControl::LayoutOrPaintContents(vcl::RenderContext *pContext) pContext->SetFillColor(Color(230, 230, 230)); pContext->SetLineColor(Color(230, 230, 230)); - pContext->DrawRect(PixelToLogic(Rectangle(x + 2, y + 2, x + boxX - 2, y + boxY - 2))); + pContext->DrawRect(PixelToLogic(tools::Rectangle(x + 2, y + 2, x + boxX - 2, y + boxY - 2))); pContext->Pop(); } @@ -394,7 +394,7 @@ void SmElementsControl::LayoutOrPaintContents(vcl::RenderContext *pContext) } } -void SmElementsControl::Paint(vcl::RenderContext& rRenderContext, const Rectangle&) +void SmElementsControl::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&) { rRenderContext.Push(); LayoutOrPaintContents(&rRenderContext); @@ -413,7 +413,7 @@ void SmElementsControl::RequestHelp(const HelpEvent& rHEvt) for (std::unique_ptr<SmElement> & i : maElementList) { SmElement* pElement = i.get(); - Rectangle aRect(pElement->mBoxLocation, pElement->mBoxSize); + tools::Rectangle aRect(pElement->mBoxLocation, pElement->mBoxSize); if (aRect.IsInside(aHelpEventPos)) { pHelpElement = pElement; @@ -425,7 +425,7 @@ void SmElementsControl::RequestHelp(const HelpEvent& rHEvt) if (!pHelpElement) return; - Rectangle aHelpRect(pHelpElement->mBoxLocation, pHelpElement->mBoxSize); + tools::Rectangle aHelpRect(pHelpElement->mBoxLocation, pHelpElement->mBoxSize); Point aPt = OutputToScreenPixel( aHelpRect.TopLeft() ); aHelpRect.Left() = aPt.X(); aHelpRect.Top()= aPt.Y(); @@ -457,12 +457,12 @@ void SmElementsControl::MouseMove( const MouseEvent& rMouseEvent ) Invalidate(); return; } - if (Rectangle(Point(0, 0), GetOutputSizePixel()).IsInside(rMouseEvent.GetPosPixel())) + if (tools::Rectangle(Point(0, 0), GetOutputSizePixel()).IsInside(rMouseEvent.GetPosPixel())) { for (std::unique_ptr<SmElement> & i : maElementList) { SmElement* element = i.get(); - Rectangle rect(element->mBoxLocation, element->mBoxSize); + tools::Rectangle rect(element->mBoxLocation, element->mBoxSize); if (rect.IsInside(rMouseEvent.GetPosPixel())) { if (pPrevElement != element) @@ -484,12 +484,12 @@ void SmElementsControl::MouseButtonDown(const MouseEvent& rMouseEvent) { GrabFocus(); - if (rMouseEvent.IsLeft() && Rectangle(Point(0, 0), GetOutputSizePixel()).IsInside(rMouseEvent.GetPosPixel()) && maSelectHdlLink.IsSet()) + if (rMouseEvent.IsLeft() && tools::Rectangle(Point(0, 0), GetOutputSizePixel()).IsInside(rMouseEvent.GetPosPixel()) && maSelectHdlLink.IsSet()) { for (std::unique_ptr<SmElement> & i : maElementList) { SmElement* element = i.get(); - Rectangle rect(element->mBoxLocation, element->mBoxSize); + tools::Rectangle rect(element->mBoxLocation, element->mBoxSize); if (rect.IsInside(rMouseEvent.GetPosPixel())) { maSelectHdlLink.Call(*element); @@ -511,7 +511,7 @@ IMPL_LINK_NOARG( SmElementsControl, ScrollHdl, ScrollBar*, void ) void SmElementsControl::DoScroll(long nDelta) { Point aNewPoint = mxScroll->GetPosPixel(); - Rectangle aRect(Point(), GetOutputSize()); + tools::Rectangle aRect(Point(), GetOutputSize()); aRect.Right() -= mxScroll->GetSizePixel().Width(); Scroll( 0, -nDelta, aRect ); mxScroll->SetPosPixel(aNewPoint); @@ -765,7 +765,7 @@ void SmElementsDockingWindow::ToggleFloatingMode() Invalidate(); } -void SmElementsDockingWindow::EndDocking( const Rectangle& rReactangle, bool bFloatMode) +void SmElementsDockingWindow::EndDocking( const tools::Rectangle& rReactangle, bool bFloatMode) { SfxDockingWindow::EndDocking(rReactangle, bFloatMode); bool bVertical = ( GetAlignment() == SfxChildAlignment::TOP || GetAlignment() == SfxChildAlignment::BOTTOM ); diff --git a/starmath/source/accessibility.cxx b/starmath/source/accessibility.cxx index cc560281908a..3c91461ccbc6 100644 --- a/starmath/source/accessibility.cxx +++ b/starmath/source/accessibility.cxx @@ -77,7 +77,7 @@ static awt::Rectangle lcl_GetBounds( vcl::Window *pWin ) awt::Rectangle aBounds; if (pWin) { - Rectangle aRect = pWin->GetWindowExtentsRelative( nullptr ); + tools::Rectangle aRect = pWin->GetWindowExtentsRelative( nullptr ); aBounds.X = aRect.Left(); aBounds.Y = aRect.Top(); aBounds.Width = aRect.GetWidth(); @@ -85,7 +85,7 @@ static awt::Rectangle lcl_GetBounds( vcl::Window *pWin ) vcl::Window* pParent = pWin->GetAccessibleParentWindow(); if (pParent) { - Rectangle aParentRect = pParent->GetWindowExtentsRelative( nullptr ); + tools::Rectangle aParentRect = pParent->GetWindowExtentsRelative( nullptr ); awt::Point aParentScreenLoc( aParentRect.Left(), aParentRect.Top() ); aBounds.X -= aParentScreenLoc.X; aBounds.Y -= aParentScreenLoc.Y; @@ -101,7 +101,7 @@ static awt::Point lcl_GetLocationOnScreen( vcl::Window *pWin ) awt::Point aPos; if (pWin) { - Rectangle aRect = pWin->GetWindowExtentsRelative( nullptr ); + tools::Rectangle aRect = pWin->GetWindowExtentsRelative( nullptr ); aPos.X = aRect.Left(); aPos.Y = aRect.Top(); } @@ -549,7 +549,7 @@ sal_Int32 SAL_CALL SmGraphicAccessible::getIndexAtPoint( const awt::Point& aPoin aTLPos.X() -= 0; Size aSize( pNode->GetSize() ); - Rectangle aRect( aTLPos, aSize ); + tools::Rectangle aRect( aTLPos, aSize ); if (aRect.IsInside( aPos )) { OSL_ENSURE( pNode->IsVisible(), "node is not a leaf" ); @@ -813,14 +813,14 @@ bool SmViewForwarder::IsValid() const return rEditAcc.GetEditView() != nullptr; } -Rectangle SmViewForwarder::GetVisArea() const +tools::Rectangle SmViewForwarder::GetVisArea() const { EditView *pEditView = rEditAcc.GetEditView(); OutputDevice* pOutDev = pEditView ? pEditView->GetWindow() : nullptr; if( pOutDev && pEditView) { - Rectangle aVisArea = pEditView->GetVisArea(); + tools::Rectangle aVisArea = pEditView->GetVisArea(); // figure out map mode from edit engine EditEngine* pEditEngine = pEditView->GetEditEngine(); @@ -836,7 +836,7 @@ Rectangle SmViewForwarder::GetVisArea() const } } - return Rectangle(); + return tools::Rectangle(); } Point SmViewForwarder::LogicToPixel( const Point& rPoint, const MapMode& rMapMode ) const @@ -1176,9 +1176,9 @@ EBulletInfo SmTextForwarder::GetBulletInfo( sal_Int32 /*nPara*/ ) const return EBulletInfo(); } -Rectangle SmTextForwarder::GetCharBounds( sal_Int32 nPara, sal_Int32 nIndex ) const +tools::Rectangle SmTextForwarder::GetCharBounds( sal_Int32 nPara, sal_Int32 nIndex ) const { - Rectangle aRect(0,0,0,0); + tools::Rectangle aRect(0,0,0,0); EditEngine *pEditEngine = rEditAcc.GetEditEngine(); if (pEditEngine) @@ -1200,9 +1200,9 @@ Rectangle SmTextForwarder::GetCharBounds( sal_Int32 nPara, sal_Int32 nIndex ) co return aRect; } -Rectangle SmTextForwarder::GetParaBounds( sal_Int32 nPara ) const +tools::Rectangle SmTextForwarder::GetParaBounds( sal_Int32 nPara ) const { - Rectangle aRect(0,0,0,0); + tools::Rectangle aRect(0,0,0,0); EditEngine *pEditEngine = rEditAcc.GetEditEngine(); if (pEditEngine) @@ -1210,7 +1210,7 @@ Rectangle SmTextForwarder::GetParaBounds( sal_Int32 nPara ) const const Point aPnt = pEditEngine->GetDocPosTopLeft( nPara ); const sal_uLong nWidth = pEditEngine->CalcTextWidth(); const sal_uLong nHeight = pEditEngine->GetTextHeight( nPara ); - aRect = Rectangle( aPnt.X(), aPnt.Y(), aPnt.X() + nWidth, aPnt.Y() + nHeight ); + aRect = tools::Rectangle( aPnt.X(), aPnt.Y(), aPnt.X() + nWidth, aPnt.Y() + nHeight ); } return aRect; @@ -1417,16 +1417,16 @@ bool SmEditViewForwarder::IsValid() const return rEditAcc.GetEditView() != nullptr; } -Rectangle SmEditViewForwarder::GetVisArea() const +tools::Rectangle SmEditViewForwarder::GetVisArea() const { - Rectangle aRect(0,0,0,0); + tools::Rectangle aRect(0,0,0,0); EditView *pEditView = rEditAcc.GetEditView(); OutputDevice* pOutDev = pEditView ? pEditView->GetWindow() : nullptr; if( pOutDev && pEditView) { - Rectangle aVisArea = pEditView->GetVisArea(); + tools::Rectangle aVisArea = pEditView->GetVisArea(); // figure out map mode from edit engine EditEngine* pEditEngine = pEditView->GetEditEngine(); diff --git a/starmath/source/accessibility.hxx b/starmath/source/accessibility.hxx index b69978e76135..bc9186ba41db 100644 --- a/starmath/source/accessibility.hxx +++ b/starmath/source/accessibility.hxx @@ -164,7 +164,7 @@ public: virtual ~SmViewForwarder() override; virtual bool IsValid() const override; - virtual Rectangle GetVisArea() const override; + virtual tools::Rectangle GetVisArea() const override; virtual Point LogicToPixel( const Point& rPoint, const MapMode& rMapMode ) const override; virtual Point PixelToLogic( const Point& rPoint, const MapMode& rMapMode ) const override; }; @@ -212,8 +212,8 @@ public: virtual sal_Int32 GetFieldCount( sal_Int32 nPara ) const override; virtual EFieldInfo GetFieldInfo( sal_Int32 nPara, sal_uInt16 nField ) const override; virtual EBulletInfo GetBulletInfo( sal_Int32 nPara ) const override; - virtual Rectangle GetCharBounds( sal_Int32 nPara, sal_Int32 nIndex ) const override; - virtual Rectangle GetParaBounds( sal_Int32 nPara ) const override; + virtual tools::Rectangle GetCharBounds( sal_Int32 nPara, sal_Int32 nIndex ) const override; + virtual tools::Rectangle GetParaBounds( sal_Int32 nPara ) const override; virtual MapMode GetMapMode() const override; virtual OutputDevice* GetRefDevice() const override; virtual bool GetIndexAtPoint( const Point&, sal_Int32& nPara, sal_Int32& nIndex ) const override; @@ -253,7 +253,7 @@ public: virtual bool IsValid() const override; - virtual Rectangle GetVisArea() const override; + virtual tools::Rectangle GetVisArea() const override; virtual Point LogicToPixel( const Point& rPoint, const MapMode& rMapMode ) const override; virtual Point PixelToLogic( const Point& rPoint, const MapMode& rMapMode ) const override; diff --git a/starmath/source/dialog.cxx b/starmath/source/dialog.cxx index 3dd2f9191adb..6e7e909918ac 100644 --- a/starmath/source/dialog.cxx +++ b/starmath/source/dialog.cxx @@ -254,7 +254,7 @@ VclPtr<SfxTabPage> SmPrintOptionsTabPage::Create(vcl::Window* pWindow, const Sfx return VclPtr<SmPrintOptionsTabPage>::Create(pWindow, rSet).get(); } -void SmShowFont::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) +void SmShowFont::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) { Window::Paint(rRenderContext, rRect); @@ -1106,7 +1106,7 @@ Point SmShowSymbolSetWindow::OffsetPoint(const Point &rPoint) const return Point(rPoint.X() + nXOffset, rPoint.Y() + nYOffset); } -void SmShowSymbolSetWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangle&) +void SmShowSymbolSetWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&) { Color aBackgroundColor; Color aTextColor; @@ -1153,7 +1153,7 @@ void SmShowSymbolSetWindow::Paint(vcl::RenderContext& rRenderContext, const Rect Point aPoint(((nSelectSymbol - v) % nColumns) * nLen, ((nSelectSymbol - v) / nColumns) * nLen); - Invert(Rectangle(OffsetPoint(aPoint), Size(nLen, nLen))); + Invert(tools::Rectangle(OffsetPoint(aPoint), Size(nLen, nLen))); } @@ -1172,7 +1172,7 @@ void SmShowSymbolSetWindow::MouseButtonDown(const MouseEvent& rMEvt) aPoint.X() -= nXOffset; aPoint.Y() -= nYOffset; - if (rMEvt.IsLeft() && Rectangle(Point(0, 0), aOutputSize).IsInside(rMEvt.GetPosPixel())) + if (rMEvt.IsLeft() && tools::Rectangle(Point(0, 0), aOutputSize).IsInside(rMEvt.GetPosPixel())) { long nPos = (aPoint.Y() / nLen) * nColumns + (aPoint.X() / nLen) + m_pVScrollBar->GetThumbPos() * nColumns; @@ -1313,7 +1313,7 @@ void SmShowSymbolSetWindow::SelectSymbol(sal_uInt16 nSymbol) int v = static_cast<int>(m_pVScrollBar->GetThumbPos() * nColumns); if (nSelectSymbol != SYMBOL_NONE) - Invalidate(Rectangle(OffsetPoint(Point(((nSelectSymbol - v) % nColumns) * nLen, + Invalidate(tools::Rectangle(OffsetPoint(Point(((nSelectSymbol - v) % nColumns) * nLen, ((nSelectSymbol - v) / nColumns) * nLen)), Size(nLen, nLen))); @@ -1324,7 +1324,7 @@ void SmShowSymbolSetWindow::SelectSymbol(sal_uInt16 nSymbol) nSelectSymbol = SYMBOL_NONE; if (nSelectSymbol != SYMBOL_NONE) - Invalidate(Rectangle(OffsetPoint(Point(((nSelectSymbol - v) % nColumns) * nLen, + Invalidate(tools::Rectangle(OffsetPoint(Point(((nSelectSymbol - v) % nColumns) * nLen, ((nSelectSymbol - v) / nColumns) * nLen)), Size(nLen, nLen))); @@ -1359,7 +1359,7 @@ void SmShowSymbol::setFontSize(vcl::Font &rFont) const rFont.SetFontSize(Size(0, GetOutputSize().Height() - GetOutputSize().Height() / 3)); } -void SmShowSymbol::Paint(vcl::RenderContext& rRenderContext, const Rectangle &rRect) +void SmShowSymbol::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle &rRect) { Control::Paint(rRenderContext, rRect); @@ -1621,7 +1621,7 @@ const SmSym* SmSymbolDialog::GetSymbol() const VCL_BUILDER_FACTORY_CONSTRUCTOR(SmShowChar, 0) -void SmShowChar::Paint(vcl::RenderContext& rRenderContext, const Rectangle &rRect) +void SmShowChar::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle &rRect) { Control::Paint(rRenderContext, rRect); diff --git a/starmath/source/document.cxx b/starmath/source/document.cxx index 230c70ebb2b7..fa04a4941b80 100644 --- a/starmath/source/document.cxx +++ b/starmath/source/document.cxx @@ -719,7 +719,7 @@ bool SmDocShell::InitNew( const uno::Reference < embed::XStorage >& xStorage ) if ( SfxObjectShell::InitNew( xStorage ) ) { bRet = true; - SetVisArea(Rectangle(Point(0, 0), Size(2000, 1000))); + SetVisArea(tools::Rectangle(Point(0, 0), Size(2000, 1000))); } return bRet; } @@ -1234,9 +1234,9 @@ SfxItemPool& SmDocShell::GetPool() return SfxGetpApp()->GetPool(); } -void SmDocShell::SetVisArea(const Rectangle & rVisArea) +void SmDocShell::SetVisArea(const tools::Rectangle & rVisArea) { - Rectangle aNewRect(rVisArea); + tools::Rectangle aNewRect(rVisArea); aNewRect.SetPos(Point()); diff --git a/starmath/source/edit.cxx b/starmath/source/edit.cxx index 9a6bc2f0d1b5..5c79de85524b 100644 --- a/starmath/source/edit.cxx +++ b/starmath/source/edit.cxx @@ -293,7 +293,7 @@ void SmEditWindow::Resize() pEditView->GetOutputArea().GetHeight(); if (pEditView->GetVisArea().Top() > nMaxVisAreaStart) { - Rectangle aVisArea(pEditView->GetVisArea() ); + tools::Rectangle aVisArea(pEditView->GetVisArea() ); aVisArea.Top() = (nMaxVisAreaStart > 0 ) ? nMaxVisAreaStart : 0; aVisArea.SetSize(pEditView->GetOutputArea().GetSize()); pEditView->SetVisArea(aVisArea); @@ -528,7 +528,7 @@ void SmEditWindow::KeyInput(const KeyEvent& rKEvt) } } -void SmEditWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) +void SmEditWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) { if (!pEditView) CreateEditView(); @@ -584,18 +584,18 @@ IMPL_LINK( SmEditWindow, ScrollHdl, ScrollBar *, /*pScrollBar*/, void ) OSL_ENSURE(pEditView, "EditView missing"); if (pEditView) { - pEditView->SetVisArea(Rectangle(Point(pHScrollBar->GetThumbPos(), + pEditView->SetVisArea(tools::Rectangle(Point(pHScrollBar->GetThumbPos(), pVScrollBar->GetThumbPos()), pEditView->GetVisArea().GetSize())); pEditView->Invalidate(); } } -Rectangle SmEditWindow::AdjustScrollBars() +tools::Rectangle SmEditWindow::AdjustScrollBars() { const Size aOut( GetOutputSizePixel() ); Point aPoint; - Rectangle aRect( aPoint, aOut ); + tools::Rectangle aRect( aPoint, aOut ); if (pVScrollBar && pHScrollBar && pScrollBox) { diff --git a/starmath/source/mathmlexport.cxx b/starmath/source/mathmlexport.cxx index c3135675ca93..8aaa96dbecba 100644 --- a/starmath/source/mathmlexport.cxx +++ b/starmath/source/mathmlexport.cxx @@ -539,7 +539,7 @@ void SmXMLExport::GetViewSettings( Sequence < PropertyValue >& aProps) PropertyValue *pValue = aProps.getArray(); sal_Int32 nIndex = 0; - Rectangle aRect( pDocShell->GetVisArea() ); + tools::Rectangle aRect( pDocShell->GetVisArea() ); pValue[nIndex].Name = "ViewAreaTop"; pValue[nIndex++].Value <<= aRect.Top(); diff --git a/starmath/source/mathmlimport.cxx b/starmath/source/mathmlimport.cxx index a23397558594..abcea1149093 100644 --- a/starmath/source/mathmlimport.cxx +++ b/starmath/source/mathmlimport.cxx @@ -3082,7 +3082,7 @@ void SmXMLImport::SetViewSettings(const Sequence<PropertyValue>& aViewProps) if ( !pDocShell ) return; - Rectangle aRect( pDocShell->GetVisArea() ); + tools::Rectangle aRect( pDocShell->GetVisArea() ); sal_Int32 nCount = aViewProps.getLength(); const PropertyValue *pValue = aViewProps.getConstArray(); diff --git a/starmath/source/rect.cxx b/starmath/source/rect.cxx index 511f4f68483b..a693d932d07a 100644 --- a/starmath/source/rect.cxx +++ b/starmath/source/rect.cxx @@ -34,7 +34,7 @@ namespace { bool SmGetGlyphBoundRect(const vcl::RenderContext &rDev, - const OUString &rText, Rectangle &rRect) + const OUString &rText, tools::Rectangle &rRect) // basically the same as 'GetTextBoundRect' (in class 'OutputDevice') // but with a string as argument. { @@ -77,7 +77,7 @@ bool SmGetGlyphBoundRect(const vcl::RenderContext &rDev, long nTextWidth = rDev.GetTextWidth(rText); Point aPoint; - Rectangle aResult (aPoint, Size(nTextWidth, rDev.GetTextHeight())), + tools::Rectangle aResult (aPoint, Size(nTextWidth, rDev.GetTextHeight())), aTmp; bool bSuccess = pGlyphDev->GetTextBoundRect(aTmp, rText); @@ -86,7 +86,7 @@ bool SmGetGlyphBoundRect(const vcl::RenderContext &rDev, if (!aTmp.IsEmpty()) { - aResult = Rectangle(aTmp.Left() * nScaleFactor, aTmp.Top() * nScaleFactor, + aResult = tools::Rectangle(aTmp.Left() * nScaleFactor, aTmp.Top() * nScaleFactor, aTmp.Right() * nScaleFactor, aTmp.Bottom() * nScaleFactor); if (&rDev != pGlyphDev) /* only when rDev is a printer... */ { @@ -223,7 +223,7 @@ SmRect::SmRect(const OutputDevice &rDev, const SmFormat *pFormat, } // get GlyphBoundRect - Rectangle aGlyphRect; + tools::Rectangle aGlyphRect; bool bSuccess = SmGetGlyphBoundRect(rDev, rText, aGlyphRect); if (!bSuccess) SAL_WARN("starmath", "Ooops... (Font missing?)"); diff --git a/starmath/source/unomodel.cxx b/starmath/source/unomodel.cxx index d8f9e0b00046..2037b222b163 100644 --- a/starmath/source/unomodel.cxx +++ b/starmath/source/unomodel.cxx @@ -686,7 +686,7 @@ void SmModel::_setPropertyValues(const PropertyMapEntry** ppEntries, const Any* // #i67283# since about all of the above changes are likely to change // the formula size we have to recalculate the vis-area now - pDocSh->SetVisArea( Rectangle( Point(0, 0), pDocSh->GetSize() ) ); + pDocSh->SetVisArea( tools::Rectangle( Point(0, 0), pDocSh->GetSize() ) ); } void SmModel::_getPropertyValues( const PropertyMapEntry **ppEntries, Any *pValue ) @@ -1028,7 +1028,7 @@ void SAL_CALL SmModel::render( static_cast<long>(aPrtPaperSize.Height() * 0.0214)); } Point aZeroPoint; - Rectangle OutputRect( aZeroPoint, aOutputSize ); + tools::Rectangle OutputRect( aZeroPoint, aOutputSize ); // set minimum top and bottom border @@ -1049,7 +1049,7 @@ void SAL_CALL SmModel::render( m_pPrintUIOptions.reset(new SmPrintUIOptions); m_pPrintUIOptions->processProperties( rxOptions ); - pView->Impl_Print( *pOut, *m_pPrintUIOptions, Rectangle( OutputRect ), Point() ); + pView->Impl_Print( *pOut, *m_pPrintUIOptions, tools::Rectangle( OutputRect ), Point() ); // release SmPrintUIOptions when everything is done. // That way, when SmPrintUIOptions is needed again it will read the latest configuration settings in its c-tor. diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx index 22df9455b809..fcc9db61414c 100644 --- a/starmath/source/view.cxx +++ b/starmath/source/view.cxx @@ -321,10 +321,10 @@ void SmGraphicWindow::SetCursor(const SmNode *pNode) aTLPos.X() -= pNode->GetItalicLeftSpace(); Size aSize (pNode->GetItalicSize()); - SetCursor(Rectangle(aTLPos, aSize)); + SetCursor(tools::Rectangle(aTLPos, aSize)); } -void SmGraphicWindow::SetCursor(const Rectangle &rRect) +void SmGraphicWindow::SetCursor(const tools::Rectangle &rRect) // sets cursor to new position (rectangle) 'rRect'. // The old cursor will be removed, and the new one will be shown if // that is activated in the ConfigItem @@ -366,7 +366,7 @@ const SmNode * SmGraphicWindow::SetCursorPos(sal_uInt16 nRow, sal_uInt16 nCol) return pNode; } -void SmGraphicWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangle&) +void SmGraphicWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&) { ApplyColorConfigValues(SM_MOD()->GetColorConfig()); @@ -701,7 +701,7 @@ SmViewShell * SmCmdBoxWindow::GetView() void SmCmdBoxWindow::Resize() { - Rectangle aRect(Point(0, 0), GetOutputSizePixel()); + tools::Rectangle aRect(Point(0, 0), GetOutputSizePixel()); aRect.Left() += CMD_BOX_PADDING; aRect.Top() += CMD_BOX_PADDING_TOP; aRect.Right() -= CMD_BOX_PADDING; @@ -715,9 +715,9 @@ void SmCmdBoxWindow::Resize() Invalidate(); } -void SmCmdBoxWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangle& /*rRect*/) +void SmCmdBoxWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& /*rRect*/) { - Rectangle aRect(Point(0, 0), GetOutputSizePixel()); + tools::Rectangle aRect(Point(0, 0), GetOutputSizePixel()); aRect.Left() += CMD_BOX_PADDING; aRect.Top() += CMD_BOX_PADDING_TOP; aRect.Right() -= CMD_BOX_PADDING; @@ -816,7 +816,7 @@ IMPL_LINK_NOARG( SmCmdBoxWindow, InitialFocusTimerHdl, Timer *, void ) void SmCmdBoxWindow::AdjustPosition() { Point aPt; - const Rectangle aRect( aPt, GetParent()->GetOutputSizePixel() ); + const tools::Rectangle aRect( aPt, GetParent()->GetOutputSizePixel() ); Point aTopLeft( Point( aRect.Left(), aRect.Bottom() - GetSizePixel().Height() ) ); Point aPos( GetParent()->OutputToScreenPixel( aTopLeft ) ); @@ -910,7 +910,7 @@ void SmViewShell::OuterResizePixel(const Point &rOfs, const Size &rSize) rWin.Update(); } -void SmViewShell::QueryObjAreaPixel( Rectangle& rRect ) const +void SmViewShell::QueryObjAreaPixel( tools::Rectangle& rRect ) const { rRect.SetSize( GetGraphicWindow().GetSizePixel() ); } @@ -1093,7 +1093,7 @@ void SmViewShell::DrawText(OutputDevice& rDevice, const Point& rPosition, const while ( nPos >= 0 ); } -void SmViewShell::Impl_Print(OutputDevice &rOutDev, const SmPrintUIOptions &rPrintUIOptions, Rectangle aOutRect, Point aZeroPoint ) +void SmViewShell::Impl_Print(OutputDevice &rOutDev, const SmPrintUIOptions &rPrintUIOptions, tools::Rectangle aOutRect, Point aZeroPoint ) { const bool bIsPrintTitle = rPrintUIOptions.getBoolValue( PRTUIOPT_TITLE_ROW, true ); const bool bIsPrintFrame = rPrintUIOptions.getBoolValue( PRTUIOPT_BORDER, true ); @@ -1126,7 +1126,7 @@ void SmViewShell::Impl_Print(OutputDevice &rOutDev, const SmPrintUIOptions &rPri Size aDescSize (GetTextSize(rOutDev, GetDoc()->GetComment(), aOutRect.GetWidth() - 200)); if (bIsPrintFrame) - rOutDev.DrawRect(Rectangle(aOutRect.TopLeft(), + rOutDev.DrawRect(tools::Rectangle(aOutRect.TopLeft(), Size(aOutRect.GetWidth(), 100 + aTitleSize.Height() + 200 + aDescSize.Height() + 100))); aOutRect.Top() += 200; @@ -1166,7 +1166,7 @@ void SmViewShell::Impl_Print(OutputDevice &rOutDev, const SmPrintUIOptions &rPri aOutRect.Bottom() -= aSize.Height() + 600; if (bIsPrintFrame) - rOutDev.DrawRect(Rectangle(aOutRect.BottomLeft(), + rOutDev.DrawRect(tools::Rectangle(aOutRect.BottomLeft(), Size(aOutRect.GetWidth(), 200 + aSize.Height() + 200))); Point aPoint (aOutRect.Left() + (aOutRect.GetWidth() - aSize.Width()) / 2, @@ -2042,7 +2042,7 @@ void SmViewShell::ZoomByItemSet(const SfxItemSet *pSet) const MapMode aMap( MapUnit::Map100thMM ); SfxPrinter *pPrinter = GetPrinter( true ); Point aPoint; - Rectangle OutputRect(aPoint, pPrinter->GetOutputSize()); + tools::Rectangle OutputRect(aPoint, pPrinter->GetOutputSize()); Size OutputSize(pPrinter->LogicToPixel(Size(OutputRect.GetWidth(), OutputRect.GetHeight()), aMap)); Size GraphicSize(pPrinter->LogicToPixel(GetDoc()->GetSize(), aMap)); diff --git a/starmath/source/visitors.cxx b/starmath/source/visitors.cxx index 1d254073f87f..3f63a86df88d 100644 --- a/starmath/source/visitors.cxx +++ b/starmath/source/visitors.cxx @@ -410,7 +410,7 @@ void SmDrawingVisitor::Visit( SmRootSymbolNode* pNode ) Point aBarOffset( pNode->GetWidth( ), +pNode->GetBorderWidth( ) ); Point aBarPos( maPosition + aBarOffset ); - Rectangle aBar( aBarPos, Size( nBarWidth, nBarHeight ) ); + tools::Rectangle aBar( aBarPos, Size( nBarWidth, nBarHeight ) ); //! avoid GROWING AND SHRINKING of drawn rectangle when constantly //! increasing zoomfactor. // This is done by shifting its output-position to a point that @@ -455,7 +455,7 @@ void SmDrawingVisitor::Visit( SmRectangleNode* pNode ) sal_uLong nTmpBorderWidth = pNode->GetFont( ).GetBorderWidth( ); // get rectangle and remove borderspace - Rectangle aTmp ( pNode->AsRectangle( ) + maPosition - pNode->GetTopLeft( ) ); + tools::Rectangle aTmp ( pNode->AsRectangle( ) + maPosition - pNode->GetTopLeft( ) ); aTmp.Left( ) += nTmpBorderWidth; aTmp.Right( ) -= nTmpBorderWidth; aTmp.Top( ) += nTmpBorderWidth; @@ -1866,7 +1866,7 @@ SmSelectionDrawingVisitor::SmSelectionDrawingVisitor( OutputDevice& rDevice, SmN } } -void SmSelectionDrawingVisitor::ExtendSelectionArea(const Rectangle& rArea) +void SmSelectionDrawingVisitor::ExtendSelectionArea(const tools::Rectangle& rArea) { if ( ! mbHasSelectionArea ) { maSelectionArea = rArea; @@ -1905,7 +1905,7 @@ void SmSelectionDrawingVisitor::Visit( SmTextNode* pNode ) long right = Position.getX( ) + mrDev.GetTextWidth( pNode->GetText( ), 0, pNode->GetSelectionEnd( ) ); long top = Position.getY( ); long bottom = top + pNode->GetHeight( ); - Rectangle rect( left, top, right, bottom ); + tools::Rectangle rect( left, top, right, bottom ); ExtendSelectionArea( rect ); |