diff options
1558 files changed, 9232 insertions, 9217 deletions
diff --git a/accessibility/inc/extended/AccessibleBrowseBox.hxx b/accessibility/inc/extended/AccessibleBrowseBox.hxx index 781a9afeb0d8..ea96ca44be00 100644 --- a/accessibility/inc/extended/AccessibleBrowseBox.hxx +++ b/accessibility/inc/extended/AccessibleBrowseBox.hxx @@ -141,10 +141,10 @@ protected: /** @attention This method requires locked mutex's and a living object. @return The bounding box (VCL rect.) relative to the parent window. */ - virtual Rectangle implGetBoundingBox() override; + virtual tools::Rectangle implGetBoundingBox() override; /** @attention This method requires locked mutex's and a living object. @return The bounding box (VCL rect.) in screen coordinates. */ - virtual Rectangle implGetBoundingBoxOnScreen() override; + virtual tools::Rectangle implGetBoundingBoxOnScreen() override; // internal helper methods diff --git a/accessibility/inc/extended/AccessibleBrowseBoxBase.hxx b/accessibility/inc/extended/AccessibleBrowseBoxBase.hxx index 0448ddfa930b..64c9636e9be5 100644 --- a/accessibility/inc/extended/AccessibleBrowseBoxBase.hxx +++ b/accessibility/inc/extended/AccessibleBrowseBoxBase.hxx @@ -247,11 +247,11 @@ protected: /** Derived classes return the bounding box relative to the parent window. @attention This method requires locked mutex's and a living object. @return The bounding box (VCL rect.) relative to the parent window. */ - virtual Rectangle implGetBoundingBox() = 0; + virtual tools::Rectangle implGetBoundingBox() = 0; /** Derived classes return the bounding box in screen coordinates. @attention This method requires locked mutex's and a living object. @return The bounding box (VCL rect.) in screen coordinates. */ - virtual Rectangle implGetBoundingBoxOnScreen() = 0; + virtual tools::Rectangle implGetBoundingBoxOnScreen() = 0; /** Creates a new AccessibleStateSetHelper and fills it with states of the current object. This method calls FillStateSet at the BrowseBox which @@ -272,13 +272,13 @@ protected: @return The bounding box (VCL rect.) relative to the parent object. @throws css::lang::DisposedException */ - Rectangle getBoundingBox(); + tools::Rectangle getBoundingBox(); /** Locks all mutex's and calculates the bounding box in screen coordinates. @return The bounding box (VCL rect.) in screen coordinates. @throws css::lang::DisposedException */ - Rectangle getBoundingBoxOnScreen(); + tools::Rectangle getBoundingBoxOnScreen(); ::comphelper::AccessibleEventNotifier::TClientId getClientId() const { return m_aClientId; } void setClientId(::comphelper::AccessibleEventNotifier::TClientId _aNewClientId) { m_aClientId = _aNewClientId; } diff --git a/accessibility/inc/extended/AccessibleBrowseBoxHeaderBar.hxx b/accessibility/inc/extended/AccessibleBrowseBoxHeaderBar.hxx index c81c836a4de8..7ad695f235f0 100644 --- a/accessibility/inc/extended/AccessibleBrowseBoxHeaderBar.hxx +++ b/accessibility/inc/extended/AccessibleBrowseBoxHeaderBar.hxx @@ -162,10 +162,10 @@ protected: /** @attention This method requires locked mutex's and a living object. @return The bounding box (VCL rect.) relative to the parent window. */ - virtual Rectangle implGetBoundingBox() override; + virtual tools::Rectangle implGetBoundingBox() override; /** @attention This method requires locked mutex's and a living object. @return The bounding box (VCL rect.) in screen coordinates. */ - virtual Rectangle implGetBoundingBoxOnScreen() override; + virtual tools::Rectangle implGetBoundingBoxOnScreen() override; /** @attention This method requires locked mutex's and a living object. @return The count of used rows. */ diff --git a/accessibility/inc/extended/AccessibleBrowseBoxHeaderCell.hxx b/accessibility/inc/extended/AccessibleBrowseBoxHeaderCell.hxx index c9659708f9aa..fe7e5e88c399 100644 --- a/accessibility/inc/extended/AccessibleBrowseBoxHeaderCell.hxx +++ b/accessibility/inc/extended/AccessibleBrowseBoxHeaderCell.hxx @@ -63,9 +63,9 @@ namespace accessibility ::utl::AccessibleStateSetHelper* implCreateStateSetHelper() override; protected: - virtual Rectangle implGetBoundingBox() override; + virtual tools::Rectangle implGetBoundingBox() override; - virtual Rectangle implGetBoundingBoxOnScreen() override; + virtual tools::Rectangle implGetBoundingBoxOnScreen() override; }; } diff --git a/accessibility/inc/extended/AccessibleBrowseBoxTable.hxx b/accessibility/inc/extended/AccessibleBrowseBoxTable.hxx index a6735dcdffcc..25ff5b478f97 100644 --- a/accessibility/inc/extended/AccessibleBrowseBoxTable.hxx +++ b/accessibility/inc/extended/AccessibleBrowseBoxTable.hxx @@ -107,10 +107,10 @@ protected: /** @attention This method requires locked mutex's and a living object. @return The bounding box (VCL rect.) relative to the parent window. */ - virtual Rectangle implGetBoundingBox() override; + virtual tools::Rectangle implGetBoundingBox() override; /** @attention This method requires locked mutex's and a living object. @return The bounding box (VCL rect.) in screen coordinates. */ - virtual Rectangle implGetBoundingBoxOnScreen() override; + virtual tools::Rectangle implGetBoundingBoxOnScreen() override; // internal helper methods diff --git a/accessibility/inc/extended/AccessibleGridControl.hxx b/accessibility/inc/extended/AccessibleGridControl.hxx index 362dee2ea120..3bcaaac1d288 100644 --- a/accessibility/inc/extended/AccessibleGridControl.hxx +++ b/accessibility/inc/extended/AccessibleGridControl.hxx @@ -111,10 +111,10 @@ protected: /** @attention This method requires locked mutex's and a living object. @return The bounding box (VCL rect.) relative to the parent window. */ - virtual Rectangle implGetBoundingBox() override; + virtual tools::Rectangle implGetBoundingBox() override; /** @attention This method requires locked mutex's and a living object. @return The bounding box (VCL rect.) in screen coordinates. */ - virtual Rectangle implGetBoundingBoxOnScreen() override; + virtual tools::Rectangle implGetBoundingBoxOnScreen() override; // internal helper methods ------------------------------------------------ diff --git a/accessibility/inc/extended/AccessibleGridControlBase.hxx b/accessibility/inc/extended/AccessibleGridControlBase.hxx index 3c8dd7cbb11e..2c9cbd42fae1 100644 --- a/accessibility/inc/extended/AccessibleGridControlBase.hxx +++ b/accessibility/inc/extended/AccessibleGridControlBase.hxx @@ -214,11 +214,11 @@ protected: /** Derived classes return the bounding box relative to the parent window. @attention This method requires locked mutex's and a living object. @return The bounding box (VCL rect.) relative to the parent window. */ - virtual Rectangle implGetBoundingBox() = 0; + virtual tools::Rectangle implGetBoundingBox() = 0; ///** Derived classes return the bounding box in screen coordinates. // @attention This method requires locked mutex's and a living object. // @return The bounding box (VCL rect.) in screen coordinates. */ - virtual Rectangle implGetBoundingBoxOnScreen() = 0; + virtual tools::Rectangle implGetBoundingBoxOnScreen() = 0; /** Creates a new AccessibleStateSetHelper and fills it with states of the current object. This method calls FillStateSet at the GridControl which @@ -242,12 +242,12 @@ protected: @return The bounding box (VCL rect.) relative to the parent object. @throws css::lang::DisposedException */ - Rectangle getBoundingBox(); + tools::Rectangle getBoundingBox(); ///** Locks all mutex's and calculates the bounding box in screen // coordinates. // @return The bounding box (VCL rect.) in screen coordinates. */ /// @throws css::lang::DisposedException - Rectangle getBoundingBoxOnScreen(); + tools::Rectangle getBoundingBoxOnScreen(); ::comphelper::AccessibleEventNotifier::TClientId getClientId() const { return m_aClientId; } void setClientId(::comphelper::AccessibleEventNotifier::TClientId _aNewClientId) { m_aClientId = _aNewClientId; } diff --git a/accessibility/inc/extended/AccessibleGridControlHeader.hxx b/accessibility/inc/extended/AccessibleGridControlHeader.hxx index 439941a67a55..8024b504dfe4 100644 --- a/accessibility/inc/extended/AccessibleGridControlHeader.hxx +++ b/accessibility/inc/extended/AccessibleGridControlHeader.hxx @@ -124,10 +124,10 @@ protected: implGetChild( sal_Int32 nRow, sal_uInt32 nColumnPos ); /** @attention This method requires locked mutex's and a living object. @return The bounding box (VCL rect.) relative to the parent window. */ - virtual Rectangle implGetBoundingBox() override; + virtual tools::Rectangle implGetBoundingBox() override; /** @attention This method requires locked mutex's and a living object. @return The bounding box (VCL rect.) in screen coordinates. */ - virtual Rectangle implGetBoundingBoxOnScreen() override; + virtual tools::Rectangle implGetBoundingBoxOnScreen() override; // internal helper methods diff --git a/accessibility/inc/extended/AccessibleGridControlHeaderCell.hxx b/accessibility/inc/extended/AccessibleGridControlHeaderCell.hxx index bece5123ad85..b36089a05332 100644 --- a/accessibility/inc/extended/AccessibleGridControlHeaderCell.hxx +++ b/accessibility/inc/extended/AccessibleGridControlHeaderCell.hxx @@ -73,9 +73,9 @@ namespace accessibility ::utl::AccessibleStateSetHelper* implCreateStateSetHelper() override; protected: - virtual Rectangle implGetBoundingBox() override; + virtual tools::Rectangle implGetBoundingBox() override; - virtual Rectangle implGetBoundingBoxOnScreen() override; + virtual tools::Rectangle implGetBoundingBoxOnScreen() override; }; } diff --git a/accessibility/inc/extended/AccessibleGridControlTable.hxx b/accessibility/inc/extended/AccessibleGridControlTable.hxx index df91b96c664e..b00fdaf062c3 100644 --- a/accessibility/inc/extended/AccessibleGridControlTable.hxx +++ b/accessibility/inc/extended/AccessibleGridControlTable.hxx @@ -152,10 +152,10 @@ protected: /** @attention This method requires locked mutex's and a living object. @return The bounding box (VCL rect.) relative to the parent window. */ - virtual Rectangle implGetBoundingBox() override; + virtual tools::Rectangle implGetBoundingBox() override; ///** @attention This method requires locked mutex's and a living object. // @return The bounding box (VCL rect.) in screen coordinates. */ - virtual Rectangle implGetBoundingBoxOnScreen() override; + virtual tools::Rectangle implGetBoundingBoxOnScreen() override; //// internal helper methods diff --git a/accessibility/inc/extended/AccessibleGridControlTableCell.hxx b/accessibility/inc/extended/AccessibleGridControlTableCell.hxx index eeef6d32a82e..d66b399504c4 100644 --- a/accessibility/inc/extended/AccessibleGridControlTableCell.hxx +++ b/accessibility/inc/extended/AccessibleGridControlTableCell.hxx @@ -69,8 +69,8 @@ namespace accessibility virtual OUString implGetText() override; virtual css::lang::Locale implGetLocale() override; virtual void implGetSelection( sal_Int32& nStartIndex, sal_Int32& nEndIndex ) override; - virtual Rectangle implGetBoundingBox() override; - virtual Rectangle implGetBoundingBoxOnScreen() override; + virtual tools::Rectangle implGetBoundingBox() override; + virtual tools::Rectangle implGetBoundingBoxOnScreen() override; public: AccessibleGridControlTableCell( const css::uno::Reference< css::accessibility::XAccessible >& _rxParent, diff --git a/accessibility/inc/extended/accessiblebrowseboxcell.hxx b/accessibility/inc/extended/accessiblebrowseboxcell.hxx index eb82e4862726..e24c8e999f08 100644 --- a/accessibility/inc/extended/accessiblebrowseboxcell.hxx +++ b/accessibility/inc/extended/accessiblebrowseboxcell.hxx @@ -45,8 +45,8 @@ namespace accessibility protected: // AccessibleBrowseBoxBase overridables - virtual Rectangle implGetBoundingBox() override; - virtual Rectangle implGetBoundingBoxOnScreen() override; + virtual tools::Rectangle implGetBoundingBox() override; + virtual tools::Rectangle implGetBoundingBoxOnScreen() override; // XAccessibleComponent virtual void SAL_CALL grabFocus() override; diff --git a/accessibility/inc/extended/accessibleiconchoicectrlentry.hxx b/accessibility/inc/extended/accessibleiconchoicectrlentry.hxx index fb020db028b5..1b1f6a832414 100644 --- a/accessibility/inc/extended/accessibleiconchoicectrlentry.hxx +++ b/accessibility/inc/extended/accessibleiconchoicectrlentry.hxx @@ -73,17 +73,17 @@ namespace accessibility css::uno::Reference< css::accessibility::XAccessible > m_xParent; private: - Rectangle GetBoundingBox_Impl() const; - Rectangle GetBoundingBoxOnScreen_Impl() const; + tools::Rectangle GetBoundingBox_Impl() const; + tools::Rectangle GetBoundingBoxOnScreen_Impl() const; bool IsAlive_Impl() const; bool IsShowing_Impl() const; /// @throws css::lang::DisposedException /// @throws css::uno::RuntimeException - Rectangle GetBoundingBox(); + tools::Rectangle GetBoundingBox(); /// @throws css::lang::DisposedException /// @throws css::uno::RuntimeException - Rectangle GetBoundingBoxOnScreen(); + tools::Rectangle GetBoundingBoxOnScreen(); /// @throws css::lang::DisposedException void EnsureIsAlive() const; diff --git a/accessibility/inc/extended/accessiblelistboxentry.hxx b/accessibility/inc/extended/accessiblelistboxentry.hxx index 90d4b0a3811e..7690d440806c 100644 --- a/accessibility/inc/extended/accessiblelistboxentry.hxx +++ b/accessibility/inc/extended/accessiblelistboxentry.hxx @@ -89,17 +89,17 @@ namespace accessibility m_aParent; private: - Rectangle GetBoundingBox_Impl() const; - Rectangle GetBoundingBoxOnScreen_Impl() const; + tools::Rectangle GetBoundingBox_Impl() const; + tools::Rectangle GetBoundingBoxOnScreen_Impl() const; bool IsAlive_Impl() const; bool IsShowing_Impl() const; /// @throws css::lang::DisposedException /// @throws css::uno::RuntimeException - Rectangle GetBoundingBox(); + tools::Rectangle GetBoundingBox(); /// @throws css::lang::DisposedException /// @throws css::uno::RuntimeException - Rectangle GetBoundingBoxOnScreen(); + tools::Rectangle GetBoundingBoxOnScreen(); /// @throws css::lang::DisposedException void EnsureIsAlive() const; diff --git a/accessibility/inc/helper/IComboListBoxHelper.hxx b/accessibility/inc/helper/IComboListBoxHelper.hxx index bcb195b4c8a5..8c60bc5b8070 100644 --- a/accessibility/inc/helper/IComboListBoxHelper.hxx +++ b/accessibility/inc/helper/IComboListBoxHelper.hxx @@ -29,7 +29,7 @@ namespace com { namespace sun { namespace star { namespace datatransfer { namesp } } } } } class Point; -class Rectangle; +namespace tools { class Rectangle; } namespace vcl { class Window; } namespace accessibility { @@ -39,9 +39,9 @@ namespace accessibility virtual ~IComboListBoxHelper() = 0; virtual OUString GetEntry( sal_Int32 nPos ) const = 0; - virtual Rectangle GetDropDownPosSizePixel( ) const = 0; - virtual Rectangle GetBoundingRectangle( sal_uInt16 nItem ) const = 0; - virtual Rectangle GetWindowExtentsRelative() = 0; + virtual tools::Rectangle GetDropDownPosSizePixel( ) const = 0; + virtual tools::Rectangle GetBoundingRectangle( sal_uInt16 nItem ) const = 0; + virtual tools::Rectangle GetWindowExtentsRelative() = 0; virtual bool IsEnabled() const = 0; virtual bool IsEntryVisible( sal_Int32 nPos ) const = 0; virtual sal_uInt16 GetDisplayLineCount() const = 0; @@ -57,7 +57,7 @@ namespace accessibility virtual void SetNoSelection() = 0; virtual sal_Int32 GetSelectEntryPos( sal_Int32 nSelIndex ) const = 0; virtual bool IsInDropDown() const = 0; - virtual Rectangle GetEntryCharacterBounds( const sal_Int32 _nEntryPos, const sal_Int32 _nCharacterIndex ) const = 0; + virtual tools::Rectangle GetEntryCharacterBounds( const sal_Int32 _nEntryPos, const sal_Int32 _nCharacterIndex ) const = 0; virtual long GetIndexForPoint( const Point& rPoint, sal_Int32 & nPos ) const = 0; virtual css::uno::Reference< css::datatransfer::clipboard::XClipboard > GetClipboard() = 0; diff --git a/accessibility/inc/helper/listboxhelper.hxx b/accessibility/inc/helper/listboxhelper.hxx index 570e46ffce03..8bc7e2dae2ef 100644 --- a/accessibility/inc/helper/listboxhelper.hxx +++ b/accessibility/inc/helper/listboxhelper.hxx @@ -50,32 +50,32 @@ public: return m_aComboListBox.GetEntry( nPos ); } - virtual Rectangle GetDropDownPosSizePixel() const override + virtual tools::Rectangle GetDropDownPosSizePixel() const override { - Rectangle aTemp = m_aComboListBox.GetWindowExtentsRelative(nullptr); - Rectangle aRet = m_aComboListBox.GetDropDownPosSizePixel(); + tools::Rectangle aTemp = m_aComboListBox.GetWindowExtentsRelative(nullptr); + tools::Rectangle aRet = m_aComboListBox.GetDropDownPosSizePixel(); aRet.Move(aTemp.TopLeft().X(),aTemp.TopLeft().Y()); return aRet; } - virtual Rectangle GetBoundingRectangle( sal_uInt16 nItem ) const override + virtual tools::Rectangle GetBoundingRectangle( sal_uInt16 nItem ) const override { - Rectangle aRect; + tools::Rectangle aRect; if ( m_aComboListBox.IsInDropDown() && IsEntryVisible( nItem ) ) { - Rectangle aTemp = m_aComboListBox.GetDropDownPosSizePixel(); + tools::Rectangle aTemp = m_aComboListBox.GetDropDownPosSizePixel(); Size aSize = aTemp.GetSize(); aSize.Height() /= m_aComboListBox.GetDisplayLineCount(); Point aTopLeft = aTemp.TopLeft(); aTopLeft.Y() += aSize.Height() * ( nItem - m_aComboListBox.GetTopEntry() ); - aRect = Rectangle( aTopLeft, aSize ); + aRect = tools::Rectangle( aTopLeft, aSize ); } else aRect = m_aComboListBox.GetBoundingRectangle( nItem ); return aRect; } - virtual Rectangle GetWindowExtentsRelative() override + virtual tools::Rectangle GetWindowExtentsRelative() override { return m_aComboListBox.GetWindowExtentsRelative( nullptr ); } @@ -157,9 +157,9 @@ public: return m_aComboListBox.IsInDropDown(); } - virtual Rectangle GetEntryCharacterBounds( const sal_Int32 _nEntryPos, const sal_Int32 _nCharacterIndex ) const override + virtual tools::Rectangle GetEntryCharacterBounds( const sal_Int32 _nEntryPos, const sal_Int32 _nCharacterIndex ) const override { - Rectangle aRect; + tools::Rectangle aRect; Pair aEntryCharacterRange = m_aComboListBox.GetLineStartEnd( _nEntryPos ); if ( aEntryCharacterRange.A() + _nCharacterIndex <= aEntryCharacterRange.B() ) diff --git a/accessibility/source/extended/AccessibleBrowseBox.cxx b/accessibility/source/extended/AccessibleBrowseBox.cxx index dc534214e7b1..cba3534711a1 100644 --- a/accessibility/source/extended/AccessibleBrowseBox.cxx +++ b/accessibility/source/extended/AccessibleBrowseBox.cxx @@ -191,7 +191,7 @@ OUString SAL_CALL AccessibleBrowseBox::getImplementationName() // internal virtual methods -Rectangle AccessibleBrowseBox::implGetBoundingBox() +tools::Rectangle AccessibleBrowseBox::implGetBoundingBox() { vcl::Window* pParent = mpBrowseBox->GetAccessibleParentWindow(); OSL_ENSURE( pParent, "implGetBoundingBox - missing parent window" ); @@ -199,7 +199,7 @@ Rectangle AccessibleBrowseBox::implGetBoundingBox() } -Rectangle AccessibleBrowseBox::implGetBoundingBoxOnScreen() +tools::Rectangle AccessibleBrowseBox::implGetBoundingBoxOnScreen() { return mpBrowseBox->GetWindowExtentsRelative( nullptr ); } diff --git a/accessibility/source/extended/AccessibleBrowseBoxBase.cxx b/accessibility/source/extended/AccessibleBrowseBoxBase.cxx index d94a14b473d4..f4b18d9e1208 100644 --- a/accessibility/source/extended/AccessibleBrowseBoxBase.cxx +++ b/accessibility/source/extended/AccessibleBrowseBoxBase.cxx @@ -205,7 +205,7 @@ lang::Locale SAL_CALL AccessibleBrowseBoxBase::getLocale() sal_Bool SAL_CALL AccessibleBrowseBoxBase::containsPoint( const css::awt::Point& rPoint ) { - return Rectangle( Point(), getBoundingBox().GetSize() ).IsInside( VCLPoint( rPoint ) ); + return tools::Rectangle( Point(), getBoundingBox().GetSize() ).IsInside( VCLPoint( rPoint ) ); } awt::Rectangle SAL_CALL AccessibleBrowseBoxBase::getBounds() @@ -383,12 +383,12 @@ void AccessibleBrowseBoxBase::ensureIsAlive() const throw lang::DisposedException(); } -Rectangle AccessibleBrowseBoxBase::getBoundingBox() +tools::Rectangle AccessibleBrowseBoxBase::getBoundingBox() { SolarMethodGuard aGuard(getMutex()); ensureIsAlive(); - Rectangle aRect = implGetBoundingBox(); + tools::Rectangle aRect = implGetBoundingBox(); if ( 0 == aRect.Left() && 0 == aRect.Top() && 0 == aRect.Right() && 0 == aRect.Bottom() ) { SAL_WARN( "accessibility", "rectangle doesn't exist" ); @@ -396,12 +396,12 @@ Rectangle AccessibleBrowseBoxBase::getBoundingBox() return aRect; } -Rectangle AccessibleBrowseBoxBase::getBoundingBoxOnScreen() +tools::Rectangle AccessibleBrowseBoxBase::getBoundingBoxOnScreen() { SolarMethodGuard aGuard(getMutex()); ensureIsAlive(); - Rectangle aRect = implGetBoundingBoxOnScreen(); + tools::Rectangle aRect = implGetBoundingBoxOnScreen(); if ( 0 == aRect.Left() && 0 == aRect.Top() && 0 == aRect.Right() && 0 == aRect.Bottom() ) { SAL_WARN( "accessibility", "rectangle doesn't exist" ); diff --git a/accessibility/source/extended/AccessibleBrowseBoxHeaderBar.cxx b/accessibility/source/extended/AccessibleBrowseBoxHeaderBar.cxx index 00d04c7756e1..04e03818e828 100644 --- a/accessibility/source/extended/AccessibleBrowseBoxHeaderBar.cxx +++ b/accessibility/source/extended/AccessibleBrowseBoxHeaderBar.cxx @@ -295,12 +295,12 @@ Sequence< sal_Int8 > SAL_CALL AccessibleBrowseBoxHeaderBar::getImplementationId( // internal virtual methods --------------------------------------------------- -Rectangle AccessibleBrowseBoxHeaderBar::implGetBoundingBox() +tools::Rectangle AccessibleBrowseBoxHeaderBar::implGetBoundingBox() { return mpBrowseBox->calcHeaderRect(isColumnBar(), false); } -Rectangle AccessibleBrowseBoxHeaderBar::implGetBoundingBoxOnScreen() +tools::Rectangle AccessibleBrowseBoxHeaderBar::implGetBoundingBoxOnScreen() { return mpBrowseBox->calcHeaderRect(isColumnBar()); } diff --git a/accessibility/source/extended/AccessibleBrowseBoxHeaderCell.cxx b/accessibility/source/extended/AccessibleBrowseBoxHeaderCell.cxx index ce5c3ef7f3f4..1572de65e2d3 100644 --- a/accessibility/source/extended/AccessibleBrowseBoxHeaderCell.cxx +++ b/accessibility/source/extended/AccessibleBrowseBoxHeaderCell.cxx @@ -117,7 +117,7 @@ OUString SAL_CALL AccessibleBrowseBoxHeaderCell::getImplementationName() namespace { - Rectangle getRectangle(IAccessibleTableProvider* _pBrowseBox,sal_Int32 _nRowColIndex, bool _bOnScreen,bool _bRowBar) + tools::Rectangle getRectangle(IAccessibleTableProvider* _pBrowseBox,sal_Int32 _nRowColIndex, bool _bOnScreen,bool _bRowBar) { sal_Int32 nRow = 0; sal_uInt16 nCol = (sal_uInt16)_nRowColIndex; @@ -127,18 +127,18 @@ namespace nCol = 0; } - Rectangle aRet(_pBrowseBox->GetFieldRectPixelAbs( nRow , nCol, true, _bOnScreen)); - return Rectangle(aRet.TopLeft() - Point(0,aRet.GetHeight()),aRet.GetSize()); + tools::Rectangle aRet(_pBrowseBox->GetFieldRectPixelAbs( nRow , nCol, true, _bOnScreen)); + return tools::Rectangle(aRet.TopLeft() - Point(0,aRet.GetHeight()),aRet.GetSize()); } } -Rectangle AccessibleBrowseBoxHeaderCell::implGetBoundingBox() +tools::Rectangle AccessibleBrowseBoxHeaderCell::implGetBoundingBox() { return getRectangle(mpBrowseBox,m_nColumnRowId,false,isRowBarCell()); } -Rectangle AccessibleBrowseBoxHeaderCell::implGetBoundingBoxOnScreen() +tools::Rectangle AccessibleBrowseBoxHeaderCell::implGetBoundingBoxOnScreen() { return getRectangle(mpBrowseBox,m_nColumnRowId,true,isRowBarCell()); } diff --git a/accessibility/source/extended/AccessibleBrowseBoxTable.cxx b/accessibility/source/extended/AccessibleBrowseBoxTable.cxx index 61d7c2b21773..5b9ba4927e96 100644 --- a/accessibility/source/extended/AccessibleBrowseBoxTable.cxx +++ b/accessibility/source/extended/AccessibleBrowseBoxTable.cxx @@ -188,12 +188,12 @@ OUString SAL_CALL AccessibleBrowseBoxTable::getImplementationName() // internal virtual methods --------------------------------------------------- -Rectangle AccessibleBrowseBoxTable::implGetBoundingBox() +tools::Rectangle AccessibleBrowseBoxTable::implGetBoundingBox() { return mpBrowseBox->calcTableRect(false); } -Rectangle AccessibleBrowseBoxTable::implGetBoundingBoxOnScreen() +tools::Rectangle AccessibleBrowseBoxTable::implGetBoundingBoxOnScreen() { return mpBrowseBox->calcTableRect(); } diff --git a/accessibility/source/extended/AccessibleGridControl.cxx b/accessibility/source/extended/AccessibleGridControl.cxx index 07d108592ff6..999354efaedf 100644 --- a/accessibility/source/extended/AccessibleGridControl.cxx +++ b/accessibility/source/extended/AccessibleGridControl.cxx @@ -213,7 +213,7 @@ OUString SAL_CALL AccessibleGridControl::getImplementationName() // internal virtual methods --------------------------------------------------- -Rectangle AccessibleGridControl::implGetBoundingBox() +tools::Rectangle AccessibleGridControl::implGetBoundingBox() { vcl::Window* pParent = m_aTable.GetAccessibleParentWindow(); OSL_ENSURE( pParent, "implGetBoundingBox - missing parent window" ); @@ -221,7 +221,7 @@ Rectangle AccessibleGridControl::implGetBoundingBox() } -Rectangle AccessibleGridControl::implGetBoundingBoxOnScreen() +tools::Rectangle AccessibleGridControl::implGetBoundingBoxOnScreen() { return m_aTable.GetWindowExtentsRelative( nullptr ); } diff --git a/accessibility/source/extended/AccessibleGridControlBase.cxx b/accessibility/source/extended/AccessibleGridControlBase.cxx index 0c25e45a9009..dd22d4c76af7 100644 --- a/accessibility/source/extended/AccessibleGridControlBase.cxx +++ b/accessibility/source/extended/AccessibleGridControlBase.cxx @@ -181,7 +181,7 @@ lang::Locale SAL_CALL AccessibleGridControlBase::getLocale() sal_Bool SAL_CALL AccessibleGridControlBase::containsPoint( const awt::Point& rPoint ) { - return Rectangle( Point(), getBoundingBox().GetSize() ).IsInside( VCLPoint( rPoint ) ); + return tools::Rectangle( Point(), getBoundingBox().GetSize() ).IsInside( VCLPoint( rPoint ) ); } awt::Rectangle SAL_CALL AccessibleGridControlBase::getBounds() @@ -308,11 +308,11 @@ void AccessibleGridControlBase::ensureIsAlive() const throw lang::DisposedException(); } -Rectangle AccessibleGridControlBase::getBoundingBox() +tools::Rectangle AccessibleGridControlBase::getBoundingBox() { SolarMutexGuard aSolarGuard; ensureIsAlive(); - Rectangle aRect = implGetBoundingBox(); + tools::Rectangle aRect = implGetBoundingBox(); if ( 0 == aRect.Left() && 0 == aRect.Top() && 0 == aRect.Right() && 0 == aRect.Bottom() ) { SAL_WARN( "accessibility", "rectangle doesn't exist" ); @@ -320,11 +320,11 @@ Rectangle AccessibleGridControlBase::getBoundingBox() return aRect; } -Rectangle AccessibleGridControlBase::getBoundingBoxOnScreen() +tools::Rectangle AccessibleGridControlBase::getBoundingBoxOnScreen() { SolarMutexGuard aSolarGuard; ensureIsAlive(); - Rectangle aRect = implGetBoundingBoxOnScreen(); + tools::Rectangle aRect = implGetBoundingBoxOnScreen(); if ( 0 == aRect.Left() && 0 == aRect.Top() && 0 == aRect.Right() && 0 == aRect.Bottom() ) { SAL_WARN( "accessibility", "rectangle doesn't exist" ); diff --git a/accessibility/source/extended/AccessibleGridControlHeader.cxx b/accessibility/source/extended/AccessibleGridControlHeader.cxx index f3786228c4f5..f6a4cb177043 100644 --- a/accessibility/source/extended/AccessibleGridControlHeader.cxx +++ b/accessibility/source/extended/AccessibleGridControlHeader.cxx @@ -191,26 +191,26 @@ Sequence< sal_Int8 > SAL_CALL AccessibleGridControlHeader::getImplementationId() // internal virtual methods --------------------------------------------------- -Rectangle AccessibleGridControlHeader::implGetBoundingBox() +tools::Rectangle AccessibleGridControlHeader::implGetBoundingBox() { vcl::Window* pParent = m_aTable.GetAccessibleParentWindow(); - Rectangle aGridRect( m_aTable.GetWindowExtentsRelative( pParent ) ); - Rectangle aHeaderRect (m_aTable.calcHeaderRect(isColumnBar())); + tools::Rectangle aGridRect( m_aTable.GetWindowExtentsRelative( pParent ) ); + tools::Rectangle aHeaderRect (m_aTable.calcHeaderRect(isColumnBar())); if(isColumnBar()) - return Rectangle(aGridRect.TopLeft(), Size(aGridRect.getWidth(),aHeaderRect.getHeight())); + return tools::Rectangle(aGridRect.TopLeft(), Size(aGridRect.getWidth(),aHeaderRect.getHeight())); else - return Rectangle(aGridRect.TopLeft(), Size(aHeaderRect.getWidth(),aGridRect.getHeight())); + return tools::Rectangle(aGridRect.TopLeft(), Size(aHeaderRect.getWidth(),aGridRect.getHeight())); } -Rectangle AccessibleGridControlHeader::implGetBoundingBoxOnScreen() +tools::Rectangle AccessibleGridControlHeader::implGetBoundingBoxOnScreen() { - Rectangle aGridRect( m_aTable.GetWindowExtentsRelative( nullptr ) ); - Rectangle aHeaderRect (m_aTable.calcHeaderRect(isColumnBar())); + tools::Rectangle aGridRect( m_aTable.GetWindowExtentsRelative( nullptr ) ); + tools::Rectangle aHeaderRect (m_aTable.calcHeaderRect(isColumnBar())); if(isColumnBar()) - return Rectangle(aGridRect.TopLeft(), Size(aGridRect.getWidth(),aHeaderRect.getHeight())); + return tools::Rectangle(aGridRect.TopLeft(), Size(aGridRect.getWidth(),aHeaderRect.getHeight())); else - return Rectangle(aGridRect.TopLeft(), Size(aHeaderRect.getWidth(),aGridRect.getHeight())); + return tools::Rectangle(aGridRect.TopLeft(), Size(aHeaderRect.getWidth(),aGridRect.getHeight())); } // internal helper methods ---------------------------------------------------- diff --git a/accessibility/source/extended/AccessibleGridControlHeaderCell.cxx b/accessibility/source/extended/AccessibleGridControlHeaderCell.cxx index 49a84aa0d356..a48f24c8f133 100644 --- a/accessibility/source/extended/AccessibleGridControlHeaderCell.cxx +++ b/accessibility/source/extended/AccessibleGridControlHeaderCell.cxx @@ -125,30 +125,30 @@ OUString SAL_CALL AccessibleGridControlHeaderCell::getImplementationName() return OUString( "com.sun.star.accessibility.AccessibleGridControlHeaderCell" ); } -Rectangle AccessibleGridControlHeaderCell::implGetBoundingBox() +tools::Rectangle AccessibleGridControlHeaderCell::implGetBoundingBox() { vcl::Window* pParent = m_aTable.GetAccessibleParentWindow(); - Rectangle aGridRect( m_aTable.GetWindowExtentsRelative( pParent ) ); + tools::Rectangle aGridRect( m_aTable.GetWindowExtentsRelative( pParent ) ); sal_Int32 nIndex = getAccessibleIndexInParent(); - Rectangle aCellRect; + tools::Rectangle aCellRect; if(m_eObjType == TCTYPE_COLUMNHEADERCELL) aCellRect = m_aTable.calcHeaderCellRect(true, nIndex); else aCellRect = m_aTable.calcHeaderCellRect(false, nIndex); - return Rectangle(Point(aGridRect.Left()+aCellRect.Left(),aGridRect.Top()+aCellRect.Top()), aCellRect.GetSize()); + return tools::Rectangle(Point(aGridRect.Left()+aCellRect.Left(),aGridRect.Top()+aCellRect.Top()), aCellRect.GetSize()); } -Rectangle AccessibleGridControlHeaderCell::implGetBoundingBoxOnScreen() +tools::Rectangle AccessibleGridControlHeaderCell::implGetBoundingBoxOnScreen() { - Rectangle aGridRect( m_aTable.GetWindowExtentsRelative( nullptr ) ); + tools::Rectangle aGridRect( m_aTable.GetWindowExtentsRelative( nullptr ) ); sal_Int32 nIndex = getAccessibleIndexInParent(); - Rectangle aCellRect; + tools::Rectangle aCellRect; if(m_eObjType == TCTYPE_COLUMNHEADERCELL) aCellRect = m_aTable.calcHeaderCellRect(true, nIndex); else aCellRect = m_aTable.calcHeaderCellRect(false, nIndex); - return Rectangle(Point(aGridRect.Left()+aCellRect.Left(),aGridRect.Top()+aCellRect.Top()), aCellRect.GetSize()); + return tools::Rectangle(Point(aGridRect.Left()+aCellRect.Left(),aGridRect.Top()+aCellRect.Top()), aCellRect.GetSize()); } sal_Int32 SAL_CALL AccessibleGridControlHeaderCell::getAccessibleIndexInParent() diff --git a/accessibility/source/extended/AccessibleGridControlTable.cxx b/accessibility/source/extended/AccessibleGridControlTable.cxx index 68262003f0f9..f22a8db0ff0a 100644 --- a/accessibility/source/extended/AccessibleGridControlTable.cxx +++ b/accessibility/source/extended/AccessibleGridControlTable.cxx @@ -316,29 +316,29 @@ OUString SAL_CALL AccessibleGridControlTable::getImplementationName() // internal virtual methods --------------------------------------------------- -Rectangle AccessibleGridControlTable::implGetBoundingBox() +tools::Rectangle AccessibleGridControlTable::implGetBoundingBox() { vcl::Window* pParent = m_aTable.GetAccessibleParentWindow(); DBG_ASSERT( pParent, "implGetBoundingBox - missing parent window" ); - Rectangle aGridRect( m_aTable.GetWindowExtentsRelative( pParent )); - Rectangle aTableRect( m_aTable.calcTableRect() ); + tools::Rectangle aGridRect( m_aTable.GetWindowExtentsRelative( pParent )); + tools::Rectangle aTableRect( m_aTable.calcTableRect() ); long nX = aGridRect.Left() + aTableRect.Left(); long nY = aGridRect.Top() + aTableRect.Top(); long nWidth = aGridRect.GetSize().Width()-aTableRect.Left(); long nHeight = aGridRect.GetSize().Height()-aTableRect.Top(); - Rectangle aTable( Point( nX, nY ), Size( nWidth, nHeight )); + tools::Rectangle aTable( Point( nX, nY ), Size( nWidth, nHeight )); return aTable; } -Rectangle AccessibleGridControlTable::implGetBoundingBoxOnScreen() +tools::Rectangle AccessibleGridControlTable::implGetBoundingBoxOnScreen() { - Rectangle aGridRect( m_aTable.GetWindowExtentsRelative( nullptr )); - Rectangle aTableRect( m_aTable.calcTableRect() ); + tools::Rectangle aGridRect( m_aTable.GetWindowExtentsRelative( nullptr )); + tools::Rectangle aTableRect( m_aTable.calcTableRect() ); long nX = aGridRect.Left() + aTableRect.Left(); long nY = aGridRect.Top() + aTableRect.Top(); long nWidth = aGridRect.GetSize().Width()-aTableRect.Left(); long nHeight = aGridRect.GetSize().Height()-aTableRect.Top(); - Rectangle aTable( Point( nX, nY ), Size( nWidth, nHeight )); + tools::Rectangle aTable( Point( nX, nY ), Size( nWidth, nHeight )); return aTable; } // internal helper methods ---------------------------------------------------- diff --git a/accessibility/source/extended/AccessibleGridControlTableCell.cxx b/accessibility/source/extended/AccessibleGridControlTableCell.cxx index 55378092f535..753c9bd643f6 100644 --- a/accessibility/source/extended/AccessibleGridControlTableCell.cxx +++ b/accessibility/source/extended/AccessibleGridControlTableCell.cxx @@ -325,27 +325,27 @@ namespace accessibility return false; } - Rectangle AccessibleGridControlTableCell::implGetBoundingBox() + tools::Rectangle AccessibleGridControlTableCell::implGetBoundingBox() { vcl::Window* pParent = m_aTable.GetAccessibleParentWindow(); DBG_ASSERT( pParent, "implGetBoundingBox - missing parent window" ); - Rectangle aGridRect = m_aTable.GetWindowExtentsRelative( pParent ); + tools::Rectangle aGridRect = m_aTable.GetWindowExtentsRelative( pParent ); sal_Int32 nIndex = getAccessibleIndexInParent(); - Rectangle aCellRect = m_aTable.calcCellRect(nIndex%m_aTable.GetColumnCount(), nIndex/m_aTable.GetColumnCount()); + tools::Rectangle aCellRect = m_aTable.calcCellRect(nIndex%m_aTable.GetColumnCount(), nIndex/m_aTable.GetColumnCount()); long nX = aGridRect.Left() + aCellRect.Left(); long nY = aGridRect.Top() + aCellRect.Top(); - Rectangle aCell( Point( nX, nY ), aCellRect.GetSize()); + tools::Rectangle aCell( Point( nX, nY ), aCellRect.GetSize()); return aCell; } - Rectangle AccessibleGridControlTableCell::implGetBoundingBoxOnScreen() + tools::Rectangle AccessibleGridControlTableCell::implGetBoundingBoxOnScreen() { - Rectangle aGridRect = m_aTable.GetWindowExtentsRelative( nullptr ); + tools::Rectangle aGridRect = m_aTable.GetWindowExtentsRelative( nullptr ); sal_Int32 nIndex = getAccessibleIndexInParent(); - Rectangle aCellRect = m_aTable.calcCellRect(nIndex%m_aTable.GetColumnCount(), nIndex/m_aTable.GetColumnCount()); + tools::Rectangle aCellRect = m_aTable.calcCellRect(nIndex%m_aTable.GetColumnCount(), nIndex/m_aTable.GetColumnCount()); long nX = aGridRect.Left() + aCellRect.Left(); long nY = aGridRect.Top() + aCellRect.Top(); - Rectangle aCell( Point( nX, nY ), aCellRect.GetSize()); + tools::Rectangle aCell( Point( nX, nY ), aCellRect.GetSize()); return aCell; } } diff --git a/accessibility/source/extended/accessiblebrowseboxcell.cxx b/accessibility/source/extended/accessiblebrowseboxcell.cxx index 099dde455ee7..abf3a4cf382a 100644 --- a/accessibility/source/extended/accessiblebrowseboxcell.cxx +++ b/accessibility/source/extended/accessiblebrowseboxcell.cxx @@ -56,12 +56,12 @@ namespace accessibility mpBrowseBox->GoToCell( m_nRowPos, m_nColPos ); } - ::Rectangle AccessibleBrowseBoxCell::implGetBoundingBox() + ::tools::Rectangle AccessibleBrowseBoxCell::implGetBoundingBox() { return mpBrowseBox->GetFieldRectPixelAbs( m_nRowPos, m_nColPos, false, false ); } - ::Rectangle AccessibleBrowseBoxCell::implGetBoundingBoxOnScreen() + ::tools::Rectangle AccessibleBrowseBoxCell::implGetBoundingBoxOnScreen() { return mpBrowseBox->GetFieldRectPixelAbs( m_nRowPos, m_nColPos, false ); } diff --git a/accessibility/source/extended/accessibleiconchoicectrlentry.cxx b/accessibility/source/extended/accessibleiconchoicectrlentry.cxx index 86750fa019eb..6be99bec6c93 100644 --- a/accessibility/source/extended/accessibleiconchoicectrlentry.cxx +++ b/accessibility/source/extended/accessibleiconchoicectrlentry.cxx @@ -106,9 +106,9 @@ namespace accessibility } } - Rectangle AccessibleIconChoiceCtrlEntry::GetBoundingBox_Impl() const + tools::Rectangle AccessibleIconChoiceCtrlEntry::GetBoundingBox_Impl() const { - Rectangle aRect; + tools::Rectangle aRect; SvxIconChoiceCtrlEntry* pEntry = m_pIconCtrl->GetEntry( m_nIndex ); if ( pEntry ) aRect = m_pIconCtrl->GetBoundingBox( pEntry ); @@ -116,16 +116,16 @@ namespace accessibility return aRect; } - Rectangle AccessibleIconChoiceCtrlEntry::GetBoundingBoxOnScreen_Impl() const + tools::Rectangle AccessibleIconChoiceCtrlEntry::GetBoundingBoxOnScreen_Impl() const { - Rectangle aRect; + tools::Rectangle aRect; SvxIconChoiceCtrlEntry* pEntry = m_pIconCtrl->GetEntry( m_nIndex ); if ( pEntry ) { aRect = m_pIconCtrl->GetBoundingBox( pEntry ); Point aTopLeft = aRect.TopLeft(); aTopLeft += m_pIconCtrl->GetWindowExtentsRelative( nullptr ).TopLeft(); - aRect = Rectangle( aTopLeft, aRect.GetSize() ); + aRect = tools::Rectangle( aTopLeft, aRect.GetSize() ); } return aRect; @@ -151,7 +151,7 @@ namespace accessibility return bShowing; } - Rectangle AccessibleIconChoiceCtrlEntry::GetBoundingBox() + tools::Rectangle AccessibleIconChoiceCtrlEntry::GetBoundingBox() { SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard( m_aMutex ); @@ -160,7 +160,7 @@ namespace accessibility return GetBoundingBox_Impl(); } - Rectangle AccessibleIconChoiceCtrlEntry::GetBoundingBoxOnScreen() + tools::Rectangle AccessibleIconChoiceCtrlEntry::GetBoundingBoxOnScreen() { SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard( m_aMutex ); @@ -347,7 +347,7 @@ namespace accessibility sal_Bool SAL_CALL AccessibleIconChoiceCtrlEntry::containsPoint( const awt::Point& rPoint ) { - return Rectangle( Point(), GetBoundingBox().GetSize() ).IsInside( VCLPoint( rPoint ) ); + return tools::Rectangle( Point(), GetBoundingBox().GetSize() ).IsInside( VCLPoint( rPoint ) ); } Reference< XAccessible > SAL_CALL AccessibleIconChoiceCtrlEntry::getAccessibleAtPoint( const awt::Point& ) @@ -428,8 +428,8 @@ namespace accessibility awt::Rectangle aBounds( 0, 0, 0, 0 ); if ( m_pIconCtrl ) { - Rectangle aItemRect = GetBoundingBox_Impl(); - Rectangle aCharRect = m_pIconCtrl->GetEntryCharacterBounds( m_nIndex, _nIndex ); + tools::Rectangle aItemRect = GetBoundingBox_Impl(); + tools::Rectangle aCharRect = m_pIconCtrl->GetEntryCharacterBounds( m_nIndex, _nIndex ); aCharRect.Move( -aItemRect.Left(), -aItemRect.Top() ); aBounds = AWTRectangle( aCharRect ); } @@ -446,7 +446,7 @@ namespace accessibility if ( m_pIconCtrl ) { vcl::ControlLayoutData aLayoutData; - Rectangle aItemRect = GetBoundingBox_Impl(); + tools::Rectangle aItemRect = GetBoundingBox_Impl(); m_pIconCtrl->RecordLayoutData( &aLayoutData, aItemRect ); Point aPnt( VCLPoint( aPoint ) ); aPnt += aItemRect.TopLeft(); @@ -455,7 +455,7 @@ namespace accessibility long nLen = aLayoutData.m_aUnicodeBoundRects.size(); for ( long i = 0; i < nLen; ++i ) { - Rectangle aRect = aLayoutData.GetCharacterBounds(i); + tools::Rectangle aRect = aLayoutData.GetCharacterBounds(i); bool bInside = aRect.IsInside( aPnt ); if ( bInside ) diff --git a/accessibility/source/extended/accessiblelistboxentry.cxx b/accessibility/source/extended/accessiblelistboxentry.cxx index 8f0b1ecf32cc..dc1c80299e51 100644 --- a/accessibility/source/extended/accessiblelistboxentry.cxx +++ b/accessibility/source/extended/accessiblelistboxentry.cxx @@ -108,9 +108,9 @@ namespace accessibility } - Rectangle AccessibleListBoxEntry::GetBoundingBox_Impl() const + tools::Rectangle AccessibleListBoxEntry::GetBoundingBox_Impl() const { - Rectangle aRect; + tools::Rectangle aRect; SvTreeListEntry* pEntry = getListBox()->GetEntryFromPath( m_aEntryPath ); if ( pEntry ) { @@ -121,23 +121,23 @@ namespace accessibility // position relative to parent entry Point aTopLeft = aRect.TopLeft(); aTopLeft -= getListBox()->GetBoundingRect( pParent ).TopLeft(); - aRect = Rectangle( aTopLeft, aRect.GetSize() ); + aRect = tools::Rectangle( aTopLeft, aRect.GetSize() ); } } return aRect; } - Rectangle AccessibleListBoxEntry::GetBoundingBoxOnScreen_Impl() const + tools::Rectangle AccessibleListBoxEntry::GetBoundingBoxOnScreen_Impl() const { - Rectangle aRect; + tools::Rectangle aRect; SvTreeListEntry* pEntry = getListBox()->GetEntryFromPath( m_aEntryPath ); if ( pEntry ) { aRect = getListBox()->GetBoundingRect( pEntry ); Point aTopLeft = aRect.TopLeft(); aTopLeft += getListBox()->GetWindowExtentsRelative( nullptr ).TopLeft(); - aRect = Rectangle( aTopLeft, aRect.GetSize() ); + aRect = tools::Rectangle( aTopLeft, aRect.GetSize() ); } return aRect; @@ -165,7 +165,7 @@ namespace accessibility return bShowing; } - Rectangle AccessibleListBoxEntry::GetBoundingBox() + tools::Rectangle AccessibleListBoxEntry::GetBoundingBox() { SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard( m_aMutex ); @@ -174,7 +174,7 @@ namespace accessibility return GetBoundingBox_Impl(); } - Rectangle AccessibleListBoxEntry::GetBoundingBoxOnScreen() + tools::Rectangle AccessibleListBoxEntry::GetBoundingBoxOnScreen() { SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard( m_aMutex ); @@ -550,7 +550,7 @@ namespace accessibility sal_Bool SAL_CALL AccessibleListBoxEntry::containsPoint( const awt::Point& rPoint ) { - return Rectangle( Point(), GetBoundingBox().GetSize() ).IsInside( VCLPoint( rPoint ) ); + return tools::Rectangle( Point(), GetBoundingBox().GetSize() ).IsInside( VCLPoint( rPoint ) ); } Reference< XAccessible > SAL_CALL AccessibleListBoxEntry::getAccessibleAtPoint( const awt::Point& _aPoint ) @@ -565,7 +565,7 @@ namespace accessibility Reference< XAccessible > xAcc; AccessibleListBoxEntry* pAccEntry = new AccessibleListBoxEntry( *getListBox(), pEntry, this ); - Rectangle aRect = pAccEntry->GetBoundingBox_Impl(); + tools::Rectangle aRect = pAccEntry->GetBoundingBox_Impl(); if ( aRect.IsInside( VCLPoint( _aPoint ) ) ) xAcc = pAccEntry; return xAcc; @@ -648,9 +648,9 @@ namespace accessibility if ( pEntry ) { vcl::ControlLayoutData aLayoutData; - Rectangle aItemRect = GetBoundingBox(); + tools::Rectangle aItemRect = GetBoundingBox(); getListBox()->RecordLayoutData( &aLayoutData, aItemRect ); - Rectangle aCharRect = aLayoutData.GetCharacterBounds( nIndex ); + tools::Rectangle aCharRect = aLayoutData.GetCharacterBounds( nIndex ); aCharRect.Move( -aItemRect.Left(), -aItemRect.Top() ); aBounds = AWTRectangle( aCharRect ); } @@ -670,7 +670,7 @@ namespace accessibility if ( pEntry ) { vcl::ControlLayoutData aLayoutData; - Rectangle aItemRect = GetBoundingBox(); + tools::Rectangle aItemRect = GetBoundingBox(); getListBox()->RecordLayoutData( &aLayoutData, aItemRect ); Point aPnt( VCLPoint( aPoint ) ); aPnt += aItemRect.TopLeft(); diff --git a/accessibility/source/extended/accessibletabbar.cxx b/accessibility/source/extended/accessibletabbar.cxx index 246fd3c57769..66ffc402a915 100644 --- a/accessibility/source/extended/accessibletabbar.cxx +++ b/accessibility/source/extended/accessibletabbar.cxx @@ -150,7 +150,7 @@ namespace accessibility { awt::Rectangle aBounds; if ( m_pTabBar ) - aBounds = AWTRectangle( Rectangle( m_pTabBar->GetPosPixel(), m_pTabBar->GetSizePixel() ) ); + aBounds = AWTRectangle( tools::Rectangle( m_pTabBar->GetPosPixel(), m_pTabBar->GetSizePixel() ) ); return aBounds; } @@ -391,7 +391,7 @@ namespace accessibility Reference< XAccessibleComponent > xComp( xAcc->getAccessibleContext(), UNO_QUERY ); if ( xComp.is() ) { - Rectangle aRect = VCLRectangle( xComp->getBounds() ); + tools::Rectangle aRect = VCLRectangle( xComp->getBounds() ); Point aPos = VCLPoint( rPoint ); if ( aRect.IsInside( aPos ) ) { diff --git a/accessibility/source/extended/accessibletabbarpagelist.cxx b/accessibility/source/extended/accessibletabbarpagelist.cxx index a683cb23aea6..8853ac58a8b7 100644 --- a/accessibility/source/extended/accessibletabbarpagelist.cxx +++ b/accessibility/source/extended/accessibletabbarpagelist.cxx @@ -528,7 +528,7 @@ namespace accessibility Reference< XAccessibleComponent > xComp( xAcc->getAccessibleContext(), UNO_QUERY ); if ( xComp.is() ) { - Rectangle aRect = VCLRectangle( xComp->getBounds() ); + tools::Rectangle aRect = VCLRectangle( xComp->getBounds() ); Point aPos = VCLPoint( rPoint ); if ( aRect.IsInside( aPos ) ) { diff --git a/accessibility/source/extended/textwindowaccessibility.cxx b/accessibility/source/extended/textwindowaccessibility.cxx index 0a61a1a84991..754526db7b75 100644 --- a/accessibility/source/extended/textwindowaccessibility.cxx +++ b/accessibility/source/extended/textwindowaccessibility.cxx @@ -869,10 +869,10 @@ Document::retrieveCharacterBounds(Paragraph const * pParagraph, } else { - ::Rectangle aLeft( + ::tools::Rectangle aLeft( m_rEngine.PaMtoEditCursor(::TextPaM(nNumber, nIndex))); // XXX numeric overflow - ::Rectangle aRight( + ::tools::Rectangle aRight( m_rEngine.PaMtoEditCursor(::TextPaM(nNumber, nIndex + 1))); // XXX numeric overflow (2x) // FIXME If the vertical extends of the two cursors do not match, assume diff --git a/accessibility/source/standard/accessiblemenubasecomponent.cxx b/accessibility/source/standard/accessiblemenubasecomponent.cxx index baa097e2bb2d..3ee3a95a4a07 100644 --- a/accessibility/source/standard/accessiblemenubasecomponent.cxx +++ b/accessibility/source/standard/accessiblemenubasecomponent.cxx @@ -365,7 +365,7 @@ Reference< XAccessible > OAccessibleMenuBaseComponent::GetChildAt( const awt::Po Reference< XAccessibleComponent > xComp( xAcc->getAccessibleContext(), UNO_QUERY ); if ( xComp.is() ) { - Rectangle aRect = VCLRectangle( xComp->getBounds() ); + tools::Rectangle aRect = VCLRectangle( xComp->getBounds() ); Point aPos = VCLPoint( rPoint ); if ( aRect.IsInside( aPos ) ) { diff --git a/accessibility/source/standard/accessiblemenucomponent.cxx b/accessibility/source/standard/accessiblemenucomponent.cxx index 67ddc2c48341..3d8204faaf3d 100644 --- a/accessibility/source/standard/accessiblemenucomponent.cxx +++ b/accessibility/source/standard/accessiblemenucomponent.cxx @@ -110,7 +110,7 @@ awt::Rectangle OAccessibleMenuComponent::implGetBounds() if ( pWindow ) { // get bounding rectangle of the window in screen coordinates - Rectangle aRect = pWindow->GetWindowExtentsRelative( nullptr ); + tools::Rectangle aRect = pWindow->GetWindowExtentsRelative( nullptr ); aBounds = AWTRectangle( aRect ); // get position of the accessible parent in screen coordinates @@ -261,7 +261,7 @@ awt::Point OAccessibleMenuComponent::getLocationOnScreen( ) vcl::Window* pWindow = m_pMenu->GetWindow(); if ( pWindow ) { - Rectangle aRect = pWindow->GetWindowExtentsRelative( nullptr ); + tools::Rectangle aRect = pWindow->GetWindowExtentsRelative( nullptr ); aPos = AWTPoint( aRect.TopLeft() ); } } diff --git a/accessibility/source/standard/accessiblemenuitemcomponent.cxx b/accessibility/source/standard/accessiblemenuitemcomponent.cxx index 2fafbb0e6e1d..98dca6573593 100644 --- a/accessibility/source/standard/accessiblemenuitemcomponent.cxx +++ b/accessibility/source/standard/accessiblemenuitemcomponent.cxx @@ -258,7 +258,7 @@ awt::Rectangle OAccessibleMenuItemComponent::implGetBounds() vcl::Window* pWindow = m_pParent->GetWindow(); if ( pWindow ) { - Rectangle aRect = pWindow->GetWindowExtentsRelative( nullptr ); + tools::Rectangle aRect = pWindow->GetWindowExtentsRelative( nullptr ); awt::Point aWindowScreenLoc = AWTPoint( aRect.TopLeft() ); // get position of accessible parent in screen coordinates diff --git a/accessibility/source/standard/vclxaccessibleedit.cxx b/accessibility/source/standard/vclxaccessibleedit.cxx index dce74975018e..e0ee6fe3f0a6 100644 --- a/accessibility/source/standard/vclxaccessibleedit.cxx +++ b/accessibility/source/standard/vclxaccessibleedit.cxx @@ -371,7 +371,7 @@ awt::Rectangle VCLXAccessibleEdit::getCharacterBounds( sal_Int32 nIndex ) // #108914# calculate virtual bounding rectangle for ( sal_Int32 i = 0; i < nLength; ++i ) { - Rectangle aRect = pControl->GetCharacterBounds( i ); + tools::Rectangle aRect = pControl->GetCharacterBounds( i ); sal_Int32 nHeight = aRect.GetHeight(); if ( aBounds.Height < nHeight ) { diff --git a/accessibility/source/standard/vclxaccessiblelistitem.cxx b/accessibility/source/standard/vclxaccessiblelistitem.cxx index 463dc45c5043..d53245dca36d 100644 --- a/accessibility/source/standard/vclxaccessiblelistitem.cxx +++ b/accessibility/source/standard/vclxaccessiblelistitem.cxx @@ -304,7 +304,7 @@ sal_Bool SAL_CALL VCLXAccessibleListItem::containsPoint( const awt::Point& _aPoi ::accessibility::IComboListBoxHelper* pListBoxHelper = m_xParent.is() ? m_xParent->getListBoxHelper() : nullptr; if (pListBoxHelper) { - Rectangle aRect(pListBoxHelper->GetBoundingRectangle((sal_uInt16)m_nIndexInParent)); + tools::Rectangle aRect(pListBoxHelper->GetBoundingRectangle((sal_uInt16)m_nIndexInParent)); aRect.Move(-aRect.TopLeft().X(),-aRect.TopLeft().Y()); bInside = aRect.IsInside( VCLPoint( _aPoint ) ); } @@ -338,7 +338,7 @@ awt::Point SAL_CALL VCLXAccessibleListItem::getLocation( ) ::accessibility::IComboListBoxHelper* pListBoxHelper = m_xParent.is() ? m_xParent->getListBoxHelper() : nullptr; if (pListBoxHelper) { - Rectangle aRect = pListBoxHelper->GetBoundingRectangle( (sal_uInt16)m_nIndexInParent ); + tools::Rectangle aRect = pListBoxHelper->GetBoundingRectangle( (sal_uInt16)m_nIndexInParent ); aPoint = aRect.TopLeft(); } return AWTPoint( aPoint ); @@ -353,7 +353,7 @@ awt::Point SAL_CALL VCLXAccessibleListItem::getLocationOnScreen( ) ::accessibility::IComboListBoxHelper* pListBoxHelper = m_xParent.is() ? m_xParent->getListBoxHelper() : nullptr; if (pListBoxHelper) { - Rectangle aRect = pListBoxHelper->GetBoundingRectangle((sal_uInt16)m_nIndexInParent); + tools::Rectangle aRect = pListBoxHelper->GetBoundingRectangle((sal_uInt16)m_nIndexInParent); aPoint = aRect.TopLeft(); aPoint += pListBoxHelper->GetWindowExtentsRelative().TopLeft(); } @@ -429,8 +429,8 @@ awt::Rectangle SAL_CALL VCLXAccessibleListItem::getCharacterBounds( sal_Int32 nI ::accessibility::IComboListBoxHelper* pListBoxHelper = m_xParent.is() ? m_xParent->getListBoxHelper() : nullptr; if (pListBoxHelper) { - Rectangle aCharRect = pListBoxHelper->GetEntryCharacterBounds( m_nIndexInParent, nIndex ); - Rectangle aItemRect = pListBoxHelper->GetBoundingRectangle( (sal_uInt16)m_nIndexInParent ); + tools::Rectangle aCharRect = pListBoxHelper->GetEntryCharacterBounds( m_nIndexInParent, nIndex ); + tools::Rectangle aItemRect = pListBoxHelper->GetBoundingRectangle( (sal_uInt16)m_nIndexInParent ); aCharRect.Move( -aItemRect.Left(), -aItemRect.Top() ); aBounds = AWTRectangle( aCharRect ); } @@ -456,7 +456,7 @@ sal_Int32 SAL_CALL VCLXAccessibleListItem::getIndexAtPoint( const awt::Point& aP if (pListBoxHelper) { sal_Int32 nPos = LISTBOX_ENTRY_NOTFOUND; - Rectangle aItemRect = pListBoxHelper->GetBoundingRectangle( (sal_uInt16)m_nIndexInParent ); + tools::Rectangle aItemRect = pListBoxHelper->GetBoundingRectangle( (sal_uInt16)m_nIndexInParent ); Point aPnt( VCLPoint( aPoint ) ); aPnt += aItemRect.TopLeft(); sal_Int32 nI = pListBoxHelper->GetIndexForPoint( aPnt, nPos ); diff --git a/accessibility/source/standard/vclxaccessiblemenuitem.cxx b/accessibility/source/standard/vclxaccessiblemenuitem.cxx index 3aca273605e7..7436716dedf8 100644 --- a/accessibility/source/standard/vclxaccessiblemenuitem.cxx +++ b/accessibility/source/standard/vclxaccessiblemenuitem.cxx @@ -247,8 +247,8 @@ awt::Rectangle VCLXAccessibleMenuItem::getCharacterBounds( sal_Int32 nIndex ) if ( m_pParent ) { sal_uInt16 nItemId = m_pParent->GetItemId( m_nItemPos ); - Rectangle aItemRect = m_pParent->GetBoundingRectangle( m_nItemPos ); - Rectangle aCharRect = m_pParent->GetCharacterBounds( nItemId, nIndex ); + tools::Rectangle aItemRect = m_pParent->GetBoundingRectangle( m_nItemPos ); + tools::Rectangle aCharRect = m_pParent->GetCharacterBounds( nItemId, nIndex ); aCharRect.Move( -aItemRect.Left(), -aItemRect.Top() ); aBounds = AWTRectangle( aCharRect ); } @@ -273,7 +273,7 @@ sal_Int32 VCLXAccessibleMenuItem::getIndexAtPoint( const awt::Point& aPoint ) if ( m_pParent ) { sal_uInt16 nItemId = 0; - Rectangle aItemRect = m_pParent->GetBoundingRectangle( m_nItemPos ); + tools::Rectangle aItemRect = m_pParent->GetBoundingRectangle( m_nItemPos ); Point aPnt( VCLPoint( aPoint ) ); aPnt += aItemRect.TopLeft(); sal_Int32 nI = m_pParent->GetIndexForPoint( aPnt, nItemId ); diff --git a/accessibility/source/standard/vclxaccessiblestatusbaritem.cxx b/accessibility/source/standard/vclxaccessiblestatusbaritem.cxx index e937415f18ed..7ebf8dbc2e29 100644 --- a/accessibility/source/standard/vclxaccessiblestatusbaritem.cxx +++ b/accessibility/source/standard/vclxaccessiblestatusbaritem.cxx @@ -134,7 +134,7 @@ OUString VCLXAccessibleStatusBarItem::GetItemText() vcl::ControlLayoutData aLayoutData; if ( m_pStatusBar ) { - Rectangle aItemRect = m_pStatusBar->GetItemRect( m_nItemId ); + tools::Rectangle aItemRect = m_pStatusBar->GetItemRect( m_nItemId ); m_pStatusBar->RecordLayoutData( &aLayoutData, aItemRect ); sText = aLayoutData.m_aDisplayText; } @@ -503,9 +503,9 @@ awt::Rectangle VCLXAccessibleStatusBarItem::getCharacterBounds( sal_Int32 nIndex if ( m_pStatusBar ) { vcl::ControlLayoutData aLayoutData; - Rectangle aItemRect = m_pStatusBar->GetItemRect( m_nItemId ); + tools::Rectangle aItemRect = m_pStatusBar->GetItemRect( m_nItemId ); m_pStatusBar->RecordLayoutData( &aLayoutData, aItemRect ); - Rectangle aCharRect = aLayoutData.GetCharacterBounds( nIndex ); + tools::Rectangle aCharRect = aLayoutData.GetCharacterBounds( nIndex ); aCharRect.Move( -aItemRect.Left(), -aItemRect.Top() ); aBounds = AWTRectangle( aCharRect ); } @@ -522,7 +522,7 @@ sal_Int32 VCLXAccessibleStatusBarItem::getIndexAtPoint( const awt::Point& aPoint if ( m_pStatusBar ) { vcl::ControlLayoutData aLayoutData; - Rectangle aItemRect = m_pStatusBar->GetItemRect( m_nItemId ); + tools::Rectangle aItemRect = m_pStatusBar->GetItemRect( m_nItemId ); m_pStatusBar->RecordLayoutData( &aLayoutData, aItemRect ); Point aPnt( VCLPoint( aPoint ) ); aPnt += aItemRect.TopLeft(); diff --git a/accessibility/source/standard/vclxaccessibletabpage.cxx b/accessibility/source/standard/vclxaccessibletabpage.cxx index 4ccebc7eb3f9..7e33f49785cc 100644 --- a/accessibility/source/standard/vclxaccessibletabpage.cxx +++ b/accessibility/source/standard/vclxaccessibletabpage.cxx @@ -423,7 +423,7 @@ Reference< XAccessible > VCLXAccessibleTabPage::getAccessibleAtPoint( const awt: Reference< XAccessibleComponent > xComp( xAcc->getAccessibleContext(), UNO_QUERY ); if ( xComp.is() ) { - Rectangle aRect = VCLRectangle( xComp->getBounds() ); + tools::Rectangle aRect = VCLRectangle( xComp->getBounds() ); Point aPos = VCLPoint( rPoint ); if ( aRect.IsInside( aPos ) ) { @@ -575,8 +575,8 @@ awt::Rectangle VCLXAccessibleTabPage::getCharacterBounds( sal_Int32 nIndex ) awt::Rectangle aBounds( 0, 0, 0, 0 ); if ( m_pTabControl ) { - Rectangle aPageRect = m_pTabControl->GetTabBounds( m_nPageId ); - Rectangle aCharRect = m_pTabControl->GetCharacterBounds( m_nPageId, nIndex ); + tools::Rectangle aPageRect = m_pTabControl->GetTabBounds( m_nPageId ); + tools::Rectangle aCharRect = m_pTabControl->GetCharacterBounds( m_nPageId, nIndex ); aCharRect.Move( -aPageRect.Left(), -aPageRect.Top() ); aBounds = AWTRectangle( aCharRect ); } @@ -593,7 +593,7 @@ sal_Int32 VCLXAccessibleTabPage::getIndexAtPoint( const awt::Point& aPoint ) if ( m_pTabControl ) { sal_uInt16 nPageId = 0; - Rectangle aPageRect = m_pTabControl->GetTabBounds( m_nPageId ); + tools::Rectangle aPageRect = m_pTabControl->GetTabBounds( m_nPageId ); Point aPnt( VCLPoint( aPoint ) ); aPnt += aPageRect.TopLeft(); sal_Int32 nI = m_pTabControl->GetIndexForPoint( aPnt, nPageId ); diff --git a/accessibility/source/standard/vclxaccessibletabpagewindow.cxx b/accessibility/source/standard/vclxaccessibletabpagewindow.cxx index c160ecd7aef0..c8edcab404f8 100644 --- a/accessibility/source/standard/vclxaccessibletabpagewindow.cxx +++ b/accessibility/source/standard/vclxaccessibletabpagewindow.cxx @@ -72,10 +72,10 @@ awt::Rectangle VCLXAccessibleTabPageWindow::implGetBounds() if ( m_pTabControl ) { - Rectangle aPageRect = m_pTabControl->GetTabBounds( m_nPageId ); + tools::Rectangle aPageRect = m_pTabControl->GetTabBounds( m_nPageId ); if ( m_pTabPage ) { - Rectangle aRect = Rectangle( m_pTabPage->GetPosPixel(), m_pTabPage->GetSizePixel() ); + tools::Rectangle aRect = tools::Rectangle( m_pTabPage->GetPosPixel(), m_pTabPage->GetSizePixel() ); aRect.Move( -aPageRect.Left(), -aPageRect.Top() ); aBounds = AWTRectangle( aRect ); } diff --git a/accessibility/source/standard/vclxaccessibletoolboxitem.cxx b/accessibility/source/standard/vclxaccessibletoolboxitem.cxx index bebc04fddfef..4d836e03e69e 100644 --- a/accessibility/source/standard/vclxaccessibletoolboxitem.cxx +++ b/accessibility/source/standard/vclxaccessibletoolboxitem.cxx @@ -467,8 +467,8 @@ awt::Rectangle SAL_CALL VCLXAccessibleToolBoxItem::getCharacterBounds( sal_Int32 awt::Rectangle aBounds( 0, 0, 0, 0 ); if ( m_pToolBox && m_pToolBox->GetButtonType() != ButtonType::SYMBOLONLY ) // symbol buttons have no character bounds { - Rectangle aCharRect = m_pToolBox->GetCharacterBounds( m_nItemId, nIndex ); - Rectangle aItemRect = m_pToolBox->GetItemRect( m_nItemId ); + tools::Rectangle aCharRect = m_pToolBox->GetCharacterBounds( m_nItemId, nIndex ); + tools::Rectangle aItemRect = m_pToolBox->GetItemRect( m_nItemId ); aCharRect.Move( -aItemRect.Left(), -aItemRect.Top() ); aBounds = AWTRectangle( aCharRect ); } @@ -484,7 +484,7 @@ sal_Int32 SAL_CALL VCLXAccessibleToolBoxItem::getIndexAtPoint( const awt::Point& if ( m_pToolBox && m_pToolBox->GetButtonType() != ButtonType::SYMBOLONLY ) // symbol buttons have no character bounds { sal_uInt16 nItemId = 0; - Rectangle aItemRect = m_pToolBox->GetItemRect( m_nItemId ); + tools::Rectangle aItemRect = m_pToolBox->GetItemRect( m_nItemId ); Point aPnt( VCLPoint( aPoint ) ); aPnt += aItemRect.TopLeft(); sal_Int32 nIdx = m_pToolBox->GetIndexForPoint( aPnt, nItemId ); diff --git a/avmedia/source/framework/mediaplayer.cxx b/avmedia/source/framework/mediaplayer.cxx index 4b3a9e016c7b..881ce0760244 100644 --- a/avmedia/source/framework/mediaplayer.cxx +++ b/avmedia/source/framework/mediaplayer.cxx @@ -84,7 +84,7 @@ void MediaFloater::Resize() SfxDockingWindow::Resize(); if( mpMediaWindow ) - mpMediaWindow->setPosSize( Rectangle( Point(), GetOutputSizePixel() ) ); + mpMediaWindow->setPosSize( tools::Rectangle( Point(), GetOutputSizePixel() ) ); } void MediaFloater::ToggleFloatingMode() @@ -103,7 +103,7 @@ void MediaFloater::ToggleFloatingMode() mpMediaWindow = new MediaWindow( this, true ); - mpMediaWindow->setPosSize( Rectangle( Point(), GetOutputSizePixel() ) ); + mpMediaWindow->setPosSize( tools::Rectangle( Point(), GetOutputSizePixel() ) ); mpMediaWindow->executeMediaItem( aRestoreItem ); vcl::Window* pWindow = mpMediaWindow->getWindow(); diff --git a/avmedia/source/opengl/oglwindow.cxx b/avmedia/source/opengl/oglwindow.cxx index fe0adab71a20..ae550ff37f84 100644 --- a/avmedia/source/opengl/oglwindow.cxx +++ b/avmedia/source/opengl/oglwindow.cxx @@ -188,7 +188,7 @@ IMPL_LINK(OGLWindow, FocusGrabber, VclWindowEvent&, rEvent, void) if(pMouseEvt) { const Point& rMousePos = pMouseEvt->GetPosPixel(); - const Rectangle aWinRect(m_rEventHandler.GetPosPixel(),m_rEventHandler.GetSizePixel()); + const tools::Rectangle aWinRect(m_rEventHandler.GetPosPixel(),m_rEventHandler.GetSizePixel()); // Grab focus to the OpenGL window when mouse pointer is over it if( aWinRect.IsInside(rMousePos) ) { diff --git a/avmedia/source/viewer/mediawindow.cxx b/avmedia/source/viewer/mediawindow.cxx index b204542b8833..74bb879a5233 100644 --- a/avmedia/source/viewer/mediawindow.cxx +++ b/avmedia/source/viewer/mediawindow.cxx @@ -122,7 +122,7 @@ Size MediaWindow::getPreferredSize() const } -void MediaWindow::setPosSize( const Rectangle& rNewRect ) +void MediaWindow::setPosSize( const tools::Rectangle& rNewRect ) { mpImpl->setPosSize( rNewRect ); } diff --git a/avmedia/source/viewer/mediawindow_impl.cxx b/avmedia/source/viewer/mediawindow_impl.cxx index 9802d90706ab..518b83eaf119 100644 --- a/avmedia/source/viewer/mediawindow_impl.cxx +++ b/avmedia/source/viewer/mediawindow_impl.cxx @@ -506,7 +506,7 @@ void MediaWindowImpl::onURLChanged() } } -void MediaWindowImpl::setPosSize(const Rectangle& rRect) +void MediaWindowImpl::setPosSize(const tools::Rectangle& rRect) { SetPosSizePixel(rRect.TopLeft(), rRect.GetSize()); } @@ -595,7 +595,7 @@ void MediaWindowImpl::StateChanged(StateChangedType eType) } } -void MediaWindowImpl::Paint(vcl::RenderContext& rRenderContext, const Rectangle&) +void MediaWindowImpl::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&) { if (mxPlayerWindow.is()) mxPlayerWindow->update(); @@ -621,7 +621,7 @@ void MediaWindowImpl::Paint(vcl::RenderContext& rRenderContext, const Rectangle& return; const Point aBasePos(mpChildWindow->GetPosPixel()); - const Rectangle aVideoRect(aBasePos, mpChildWindow->GetSizePixel()); + const tools::Rectangle aVideoRect(aBasePos, mpChildWindow->GetSizePixel()); if (pLogo && !pLogo->IsEmpty() && (aVideoRect.GetWidth() > 0) && (aVideoRect.GetHeight() > 0)) { diff --git a/avmedia/source/viewer/mediawindow_impl.hxx b/avmedia/source/viewer/mediawindow_impl.hxx index c179a9e55110..68fbaeb8a0d1 100644 --- a/avmedia/source/viewer/mediawindow_impl.hxx +++ b/avmedia/source/viewer/mediawindow_impl.hxx @@ -98,7 +98,7 @@ public: void updateMediaItem( MediaItem& rItem ) const; void executeMediaItem( const MediaItem& rItem ); - void setPosSize( const Rectangle& rRect ); + void setPosSize( const tools::Rectangle& rRect ); void setPointer( const Pointer& rPointer ); @@ -113,7 +113,7 @@ private: virtual void Command( const CommandEvent& rCEvt ) override; virtual void Resize() override; virtual void StateChanged( StateChangedType ) override; - virtual void Paint(vcl::RenderContext& rRenderContext, const Rectangle&) override; // const + virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&) override; // const virtual void GetFocus() override; // DropTargetHelper diff --git a/basctl/source/accessibility/accessibledialogcontrolshape.cxx b/basctl/source/accessibility/accessibledialogcontrolshape.cxx index cf41060c40bb..afa2a469c3c6 100644 --- a/basctl/source/accessibility/accessibledialogcontrolshape.cxx +++ b/basctl/source/accessibility/accessibledialogcontrolshape.cxx @@ -137,7 +137,7 @@ awt::Rectangle AccessibleDialogControlShape::GetBounds() if ( m_pDlgEdObj ) { // get the bounding box of the shape in logic units - Rectangle aRect = m_pDlgEdObj->GetSnapRect(); + tools::Rectangle aRect = m_pDlgEdObj->GetSnapRect(); if ( m_pDialogWindow ) { @@ -150,7 +150,7 @@ awt::Rectangle AccessibleDialogControlShape::GetBounds() aRect = m_pDialogWindow->LogicToPixel( aRect, MapMode(MapUnit::Map100thMM) ); // clip the shape's bounding box with the bounding box of its parent - Rectangle aParentRect( Point( 0, 0 ), m_pDialogWindow->GetSizePixel() ); + tools::Rectangle aParentRect( Point( 0, 0 ), m_pDialogWindow->GetSizePixel() ); aRect = aRect.GetIntersection( aParentRect ); aBounds = AWTRectangle( aRect ); } diff --git a/basctl/source/accessibility/accessibledialogwindow.cxx b/basctl/source/accessibility/accessibledialogwindow.cxx index 3941ffabbd0a..1bde5e6ef245 100644 --- a/basctl/source/accessibility/accessibledialogwindow.cxx +++ b/basctl/source/accessibility/accessibledialogwindow.cxx @@ -215,7 +215,7 @@ bool AccessibleDialogWindow::IsChildVisible( const ChildDescriptor& rDesc ) if (rView.IsLayerVisible(aLayerName)) { // get the bounding box of the shape in logic units - Rectangle aRect = pDlgEdObj->GetSnapRect(); + tools::Rectangle aRect = pDlgEdObj->GetSnapRect(); // transform coordinates relative to the parent MapMode aMap = m_pDialogWindow->GetMapMode(); @@ -226,7 +226,7 @@ bool AccessibleDialogWindow::IsChildVisible( const ChildDescriptor& rDesc ) aRect = m_pDialogWindow->LogicToPixel( aRect, MapMode(MapUnit::Map100thMM) ); // check, if the shape's bounding box intersects with the bounding box of its parent - Rectangle aParentRect( Point( 0, 0 ), m_pDialogWindow->GetSizePixel() ); + tools::Rectangle aParentRect( Point( 0, 0 ), m_pDialogWindow->GetSizePixel() ); if ( aParentRect.IsOver( aRect ) ) bVisible = true; } @@ -463,7 +463,7 @@ awt::Rectangle AccessibleDialogWindow::implGetBounds() { awt::Rectangle aBounds; if ( m_pDialogWindow ) - aBounds = AWTRectangle( Rectangle( m_pDialogWindow->GetPosPixel(), m_pDialogWindow->GetSizePixel() ) ); + aBounds = AWTRectangle( tools::Rectangle( m_pDialogWindow->GetPosPixel(), m_pDialogWindow->GetSizePixel() ) ); return aBounds; } @@ -761,7 +761,7 @@ Reference< XAccessible > AccessibleDialogWindow::getAccessibleAtPoint( const awt Reference< XAccessibleComponent > xComp( xAcc->getAccessibleContext(), UNO_QUERY ); if ( xComp.is() ) { - Rectangle aRect = VCLRectangle( xComp->getBounds() ); + tools::Rectangle aRect = VCLRectangle( xComp->getBounds() ); Point aPos = VCLPoint( rPoint ); if ( aRect.IsInside( aPos ) ) { diff --git a/basctl/source/basicide/baside2.cxx b/basctl/source/basicide/baside2.cxx index bce9ce80480d..9692a5e9660d 100644 --- a/basctl/source/basicide/baside2.cxx +++ b/basctl/source/basicide/baside2.cxx @@ -115,7 +115,7 @@ void lcl_PrintHeader( Printer* pPrinter, sal_uInt16 nPages, sal_uInt16 nCurPage, long nXRight = aSz.Width() - Print::nRightMargin + Print::nBorder; if( bOutput ) - pPrinter->DrawRect(Rectangle( + pPrinter->DrawRect(tools::Rectangle( Point(nXLeft, nYTop), Size(nXRight - nXLeft, aSz.Height() - nYTop - Print::nBottomMargin + Print::nBorder) )); @@ -246,7 +246,7 @@ void ModulWindow::DoInit() GetEditorWindow().InitScrollBars(); } -void ModulWindow::Paint(vcl::RenderContext& /*rRenderContext*/, const Rectangle&) +void ModulWindow::Paint(vcl::RenderContext& /*rRenderContext*/, const tools::Rectangle&) { } @@ -1434,7 +1434,7 @@ void ModulWindowLayout::UpdateDebug (bool bBasicStopped) aStackWindow->UpdateCalls(); } -void ModulWindowLayout::Paint (vcl::RenderContext& rRenderContext, Rectangle const&) +void ModulWindowLayout::Paint (vcl::RenderContext& rRenderContext, tools::Rectangle const&) { rRenderContext.DrawText(Point(), IDEResId(RID_STR_NOMODULE).toString()); } diff --git a/basctl/source/basicide/baside2.hxx b/basctl/source/basicide/baside2.hxx index 4deb7db00221..854f698e591c 100644 --- a/basctl/source/basicide/baside2.hxx +++ b/basctl/source/basicide/baside2.hxx @@ -116,7 +116,7 @@ private: TextSelection GetLastHighlightPortionTextSelection(); protected: - virtual void Paint( vcl::RenderContext& rRenderContext, const Rectangle& ) override; + virtual void Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& ) override; virtual void Resize() override; virtual void KeyInput( const KeyEvent& rKeyEvt ) override; virtual void MouseMove( const MouseEvent& rMEvt ) override; @@ -175,7 +175,7 @@ private: void setBackgroundColor(Color aColor); protected: - virtual void Paint(vcl::RenderContext& rRenderContext, const Rectangle&) override; + virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&) override; BreakPoint* FindBreakPoint( const Point& rMousePos ); void ShowMarker(vcl::RenderContext& rRenderContext); virtual void MouseButtonDown( const MouseEvent& rMEvt ) override; @@ -231,7 +231,7 @@ private: protected: 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; DECL_LINK( ButtonHdl, Button *, void ); DECL_LINK(TreeListHdl, SvTreeListBox*, void); @@ -258,7 +258,7 @@ private: protected: 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; public: explicit StackWindow (Layout* pParent); @@ -316,7 +316,7 @@ private: protected: virtual void Resize() override; virtual void GetFocus() override; - virtual void Paint( vcl::RenderContext& rRenderContext, const Rectangle& ) override; + virtual void Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& ) override; virtual void DoInit() override; virtual void DoScroll( ScrollBar* pCurScrollBar ) override; @@ -432,7 +432,7 @@ public: protected: // Window: - virtual void Paint (vcl::RenderContext& rRenderContext, const Rectangle& rRect) override; + virtual void Paint (vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) override; // Layout: virtual void OnFirstSize (long nWidth, long nHeight) override; diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx index 86d6afc49361..c51f5e8e4dee 100644 --- a/basctl/source/basicide/baside2b.cxx +++ b/basctl/source/basicide/baside2b.cxx @@ -376,7 +376,7 @@ void EditorWindow::RequestHelp( const HelpEvent& rHEvt ) } } } - Help::ShowQuickHelp( this, Rectangle( aTopLeft, Size( 1, 1 ) ), aHelpText, QuickHelpFlags::Top|QuickHelpFlags::Left); + Help::ShowQuickHelp( this, tools::Rectangle( aTopLeft, Size( 1, 1 ) ), aHelpText, QuickHelpFlags::Top|QuickHelpFlags::Left); bDone = true; } } @@ -902,7 +902,7 @@ void EditorWindow::SetupAndShowCodeCompleteWnd( const std::vector< OUString >& a pEditView->GetWindow()->GrabFocus(); } -void EditorWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) +void EditorWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) { if (!pEditEngine) // We need it now at latest CreateEditEngine(); @@ -1295,7 +1295,7 @@ void EditorWindow::ParagraphInsertedDeleted( sal_uLong nPara, bool bInserted ) long nLineHeight = GetTextHeight(); Size aSz = rModulWindow.GetBreakPointWindow().GetOutputSize(); - Rectangle aInvRect( Point( 0, 0 ), aSz ); + tools::Rectangle aInvRect( Point( 0, 0 ), aSz ); long nY = nPara*nLineHeight - rModulWindow.GetBreakPointWindow().GetCurYOffset(); aInvRect.Top() = nY; rModulWindow.GetBreakPointWindow().Invalidate( aInvRect ); @@ -1341,7 +1341,7 @@ BreakPointWindow::BreakPointWindow (vcl::Window* pParent, ModulWindow* pModulWin SetHelpId(HID_BASICIDE_BREAKPOINTWINDOW); } -void BreakPointWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangle&) +void BreakPointWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&) { if (SyncYOffset()) return; @@ -1640,7 +1640,7 @@ void WatchWindow::dispose() DockingWindow::dispose(); } -void WatchWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangle&) +void WatchWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&) { rRenderContext.DrawText(Point(DWBORDER, 7), aWatchStr); lcl_DrawIDEWindowFrame(this, rRenderContext); @@ -1861,7 +1861,7 @@ void StackWindow::dispose() DockingWindow::dispose(); } -void StackWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangle&) +void StackWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&) { rRenderContext.DrawText(Point(DWBORDER, 7), aStackStr); lcl_DrawIDEWindowFrame(this, rRenderContext); @@ -2814,7 +2814,7 @@ void CodeCompleteWindow::ResizeAndPositionListBox() if( pListBox->GetEntryCount() >= 1 ) {// if there is at least one element inside // calculate basic position: under the current line - Rectangle aRect = static_cast<TextEngine*>(pParent->GetEditEngine())->PaMtoEditCursor( pParent->GetEditView()->GetSelection().GetEnd() ); + tools::Rectangle aRect = static_cast<TextEngine*>(pParent->GetEditEngine())->PaMtoEditCursor( pParent->GetEditView()->GetSelection().GetEnd() ); long nViewYOffset = pParent->GetEditView()->GetStartDocPos().Y(); Point aPos = aRect.BottomRight();// this variable will be used later (if needed) aPos.Y() = (aPos.Y() - nViewYOffset) + nBasePad; @@ -2838,7 +2838,7 @@ void CodeCompleteWindow::ResizeAndPositionListBox() pListBox->SetSizePixel( aSize ); //calculate position - const Rectangle aVisArea( pParent->GetEditView()->GetStartDocPos(), pParent->GetOutputSizePixel() ); //the visible area + const tools::Rectangle aVisArea( pParent->GetEditView()->GetStartDocPos(), pParent->GetOutputSizePixel() ); //the visible area const Point& aBottomPoint = aVisArea.BottomRight(); if( aVisArea.TopRight().getY() + aPos.getY() + aSize.getHeight() > aBottomPoint.getY() ) diff --git a/basctl/source/basicide/baside3.cxx b/basctl/source/basicide/baside3.cxx index ffccb5e2f1cb..608ded2c1c68 100644 --- a/basctl/source/basicide/baside3.cxx +++ b/basctl/source/basicide/baside3.cxx @@ -111,7 +111,7 @@ void DialogWindow::LoseFocus() Window::LoseFocus(); } -void DialogWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) +void DialogWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) { m_pEditor->Paint(rRenderContext, rRect); } @@ -200,7 +200,7 @@ void DialogWindow::Command( const CommandEvent& rCEvt ) SdrView& rView = GetView(); if( !rCEvt.IsMouseEvent() && rView.AreObjectsMarked() ) { - Rectangle aMarkedRect( rView.GetMarkedRect() ); + tools::Rectangle aMarkedRect( rView.GetMarkedRect() ); Point MarkedCenter( aMarkedRect.Center() ); Point PosPixel( LogicToPixel( MarkedCenter ) ); SfxDispatcher::ExecutePopup( this, &PosPixel ); diff --git a/basctl/source/basicide/bastypes.cxx b/basctl/source/basicide/bastypes.cxx index 8a2940b39288..0f4210836884 100644 --- a/basctl/source/basicide/bastypes.cxx +++ b/basctl/source/basicide/bastypes.cxx @@ -284,7 +284,7 @@ void DockingWindow::dispose() // when the window is floating. Called by Layout. void DockingWindow::ResizeIfDocking (Point const& rPos, Size const& rSize) { - Rectangle const rRect(rPos, rSize); + tools::Rectangle const rRect(rPos, rSize); if (rRect != aDockingRect) { // saving the position and the size @@ -332,7 +332,7 @@ void DockingWindow::Hide () Show(false); } -bool DockingWindow::Docking( const Point& rPos, Rectangle& rRect ) +bool DockingWindow::Docking( const Point& rPos, tools::Rectangle& rRect ) { if (aDockingRect.IsInside(rPos)) { @@ -347,7 +347,7 @@ bool DockingWindow::Docking( const Point& rPos, Rectangle& rRect ) } } -void DockingWindow::EndDocking( const Rectangle& rRect, bool bFloatMode ) +void DockingWindow::EndDocking( const tools::Rectangle& rRect, bool bFloatMode ) { if ( bFloatMode ) ::DockingWindow::EndDocking( rRect, bFloatMode ); @@ -376,7 +376,7 @@ bool DockingWindow::PrepareToggleFloatingMode() if (IsFloatingMode()) { // memorize position and size on the desktop... - aFloatingRect = Rectangle( + aFloatingRect = tools::Rectangle( GetParent()->OutputToScreenPixel(GetPosPixel()), GetSizePixel() ); @@ -388,7 +388,7 @@ void DockingWindow::StartDocking() { if (IsFloatingMode()) { - aFloatingRect = Rectangle( + aFloatingRect = tools::Rectangle( GetParent()->OutputToScreenPixel(GetPosPixel()), GetSizePixel() ); diff --git a/basctl/source/basicide/layout.cxx b/basctl/source/basicide/layout.cxx index 6d87bf687ccb..5337adf61b3b 100644 --- a/basctl/source/basicide/layout.cxx +++ b/basctl/source/basicide/layout.cxx @@ -101,8 +101,8 @@ void Layout::ArrangeWindows () } // sides - aBottomSide.ArrangeIn(Rectangle(Point(0, 0), aSize)); - aLeftSide.ArrangeIn(Rectangle(Point(0, 0), Size(nWidth, nHeight - aBottomSide.GetSize()))); + aBottomSide.ArrangeIn(tools::Rectangle(Point(0, 0), aSize)); + aLeftSide.ArrangeIn(tools::Rectangle(Point(0, 0), Size(nWidth, nHeight - aBottomSide.GetSize()))); // child in the middle pChild->SetPosSizePixel( Point(aLeftSide.GetSize(), 0), @@ -265,7 +265,7 @@ long Layout::SplittedSide::GetSize () const // Arrange() -- arranges the docking windows // rRect: the available space -void Layout::SplittedSide::ArrangeIn (Rectangle const& rRect) +void Layout::SplittedSide::ArrangeIn (tools::Rectangle const& rRect) { // saving the rectangle aRect = rRect; @@ -333,7 +333,7 @@ void Layout::SplittedSide::ArrangeIn (Rectangle const& rRect) MakeSize(nSplitThickness, nSize - nSplitThickness) ); // the dragging rectangle - rSplit.SetDragRectPixel(Rectangle( + rSplit.SetDragRectPixel(tools::Rectangle( MakePoint(nPos2, nPos1), MakeSize(nLength, nSize - nSplitThickness) )); diff --git a/basctl/source/basicide/linenumberwindow.cxx b/basctl/source/basicide/linenumberwindow.cxx index 2030c8734d02..0fe9517cbf98 100644 --- a/basctl/source/basicide/linenumberwindow.cxx +++ b/basctl/source/basicide/linenumberwindow.cxx @@ -36,7 +36,7 @@ void LineNumberWindow::dispose() Window::dispose(); } -void LineNumberWindow::Paint( vcl::RenderContext& rRenderContext, const Rectangle&) +void LineNumberWindow::Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle&) { if(SyncYOffset()) return; diff --git a/basctl/source/basicide/linenumberwindow.hxx b/basctl/source/basicide/linenumberwindow.hxx index df90c20af65c..81aaa8d93a00 100644 --- a/basctl/source/basicide/linenumberwindow.hxx +++ b/basctl/source/basicide/linenumberwindow.hxx @@ -26,7 +26,7 @@ private: virtual void DataChanged (DataChangedEvent const& rDCEvt) override; protected: - virtual void Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) override; + virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) override; public: LineNumberWindow (vcl::Window* pParent, ModulWindow* pModulWin); diff --git a/basctl/source/dlged/dlged.cxx b/basctl/source/dlged/dlged.cxx index ecdbdf540ad1..01fe64219c1f 100644 --- a/basctl/source/dlged/dlged.cxx +++ b/basctl/source/dlged/dlged.cxx @@ -226,7 +226,7 @@ DlgEditor::DlgEditor ( pDlgEdView->ShowSdrPage(pDlgEdView->GetModel()->GetPage(0)); pDlgEdView->SetLayerVisible( "HiddenLayer", false ); pDlgEdView->SetMoveSnapOnlyTopLeft(true); - pDlgEdView->SetWorkArea( Rectangle( Point( 0, 0 ), pDlgEdPage->GetSize() ) ); + pDlgEdView->SetWorkArea( tools::Rectangle( Point( 0, 0 ), pDlgEdPage->GetSize() ) ); pDlgEdView->SetGridCoarse( aGridSize ); pDlgEdView->SetSnapGridWidth(Fraction(aGridSize.Width(), 1), Fraction(aGridSize.Height(), 1)); @@ -469,7 +469,7 @@ bool DlgEditor::KeyInput( const KeyEvent& rKEvt ) } -void DlgEditor::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) +void DlgEditor::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) { aPaintRect = rRect; mnPaintGuard++; @@ -517,7 +517,7 @@ void DlgEditor::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect } // set dialog position and size - pDlgEdForm->SetSnapRect( Rectangle( aPos, aSize ) ); + pDlgEdForm->SetSnapRect( tools::Rectangle( aPos, aSize ) ); pDlgEdForm->EndListening(false); pDlgEdForm->SetPropsFromRect(); pDlgEdForm->GetDlgEditor().SetDialogModelChanged(); @@ -621,7 +621,7 @@ void DlgEditor::CreateDefaultObject() Point aPoint = (pDlgEdForm->GetSnapRect()).Center(); aPoint.X() -= aSize.Width() / 2; aPoint.Y() -= aSize.Height() / 2; - pDlgEdObj->SetSnapRect( Rectangle( aPoint, aSize ) ); + pDlgEdObj->SetSnapRect( tools::Rectangle( aPoint, aSize ) ); // set default property values pDlgEdObj->SetDefaults(); @@ -1120,7 +1120,7 @@ void lcl_PrintHeader( Printer* pPrinter, const OUString& rTitle ) // not working long const nXLeft = Print::nLeftMargin - Print::nBorder; long const nXRight = aSz.Width() - Print::nRightMargin + Print::nBorder; - pPrinter->DrawRect(Rectangle( + pPrinter->DrawRect(tools::Rectangle( Point(nXLeft, nYTop), Size(nXRight - nXLeft, aSz.Height() - nYTop - Print::nBottomMargin + Print::nBorder) )); @@ -1237,7 +1237,7 @@ bool DlgEditor::AdjustPageSize() { Size aNewPageSize( nNewPageWidth, nNewPageHeight ); pDlgEdPage->SetSize( aNewPageSize ); - pDlgEdView->SetWorkArea( Rectangle( Point( 0, 0 ), aNewPageSize ) ); + pDlgEdView->SetWorkArea( tools::Rectangle( Point( 0, 0 ), aNewPageSize ) ); bAdjustedPageSize = true; } } diff --git a/basctl/source/dlged/dlgedfunc.cxx b/basctl/source/dlged/dlgedfunc.cxx index 52b5434bb020..0545b7c05faf 100644 --- a/basctl/source/dlged/dlgedfunc.cxx +++ b/basctl/source/dlged/dlgedfunc.cxx @@ -43,7 +43,7 @@ void DlgEdFunc::ForceScroll( const Point& rPos ) vcl::Window& rWindow = rParent.GetWindow(); static Point aDefPoint; - Rectangle aOutRect( aDefPoint, rWindow.GetOutputSizePixel() ); + tools::Rectangle aOutRect( aDefPoint, rWindow.GetOutputSizePixel() ); aOutRect = rWindow.PixelToLogic( aOutRect ); ScrollBar* pHScroll = rParent.GetHScroll(); @@ -161,7 +161,7 @@ bool DlgEdFunc::KeyInput( const KeyEvent& rKEvt ) if (SdrHdl* pHdl = rHdlList.GetFocusHdl()) { Point aHdlPosition( pHdl->GetPos() ); - Rectangle aVisRect( aHdlPosition - Point( 100, 100 ), Size( 200, 200 ) ); + tools::Rectangle aVisRect( aHdlPosition - Point( 100, 100 ), Size( 200, 200 ) ); rView.MakeVisible( aVisRect, rWindow ); } @@ -227,11 +227,11 @@ bool DlgEdFunc::KeyInput( const KeyEvent& rKEvt ) if ( rView.IsMoveAllowed() ) { // restrict movement to work area - const Rectangle& rWorkArea = rView.GetWorkArea(); + const tools::Rectangle& rWorkArea = rView.GetWorkArea(); if ( !rWorkArea.IsEmpty() ) { - Rectangle aMarkRect( rView.GetMarkedObjRect() ); + tools::Rectangle aMarkRect( rView.GetMarkedObjRect() ); aMarkRect.Move( nX, nY ); if ( !rWorkArea.IsInside( aMarkRect ) ) @@ -291,7 +291,7 @@ bool DlgEdFunc::KeyInput( const KeyEvent& rKEvt ) } // make moved handle visible - Rectangle aVisRect( aEndPoint - Point( 100, 100 ), Size( 200, 200 ) ); + tools::Rectangle aVisRect( aEndPoint - Point( 100, 100 ), Size( 200, 200 ) ); rView.MakeVisible( aVisRect, rWindow ); } } diff --git a/basctl/source/dlged/dlgedobj.cxx b/basctl/source/dlged/dlgedobj.cxx index a2e19d0decaa..b02f73d7043b 100644 --- a/basctl/source/dlged/dlgedobj.cxx +++ b/basctl/source/dlged/dlgedobj.cxx @@ -127,7 +127,7 @@ bool DlgEdObj::TransformSdrToControlCoordinates( DlgEdForm* pForm = nullptr; if ( !lcl_getDlgEdForm( this, pForm ) ) return false; - Rectangle aFormRect = pForm->GetSnapRect(); + tools::Rectangle aFormRect = pForm->GetSnapRect(); Size aFormPos( aFormRect.Left(), aFormRect.Top() ); // convert 100th_mm to pixel @@ -345,7 +345,7 @@ void DlgEdObj::SetRectFromProps() // set rectangle position and size Point aPoint( nXOut, nYOut ); Size aSize( nWidthOut, nHeightOut ); - SetSnapRect( Rectangle( aPoint, aSize ) ); + SetSnapRect( tools::Rectangle( aPoint, aSize ) ); } } } @@ -353,7 +353,7 @@ void DlgEdObj::SetRectFromProps() void DlgEdObj::SetPropsFromRect() { // get control position and size from rectangle - Rectangle aRect_ = GetSnapRect(); + tools::Rectangle aRect_ = GetSnapRect(); sal_Int32 nXIn = aRect_.Left(); sal_Int32 nYIn = aRect_.Top(); sal_Int32 nWidthIn = aRect_.GetWidth(); @@ -1229,7 +1229,7 @@ void DlgEdForm::SetRectFromProps() // set rectangle position and size Point aPoint( nXOut, nYOut ); Size aSize( nWidthOut, nHeightOut ); - SetSnapRect( Rectangle( aPoint, aSize ) ); + SetSnapRect( tools::Rectangle( aPoint, aSize ) ); } } } @@ -1237,7 +1237,7 @@ void DlgEdForm::SetRectFromProps() void DlgEdForm::SetPropsFromRect() { // get form position and size from rectangle - Rectangle aRect_ = GetSnapRect(); + tools::Rectangle aRect_ = GetSnapRect(); sal_Int32 nXIn = aRect_.Left(); sal_Int32 nYIn = aRect_.Top(); sal_Int32 nWidthIn = aRect_.GetWidth(); diff --git a/basctl/source/dlged/dlgedview.cxx b/basctl/source/dlged/dlgedview.cxx index f5f1f733d255..d05ceb1d9a70 100644 --- a/basctl/source/dlged/dlgedview.cxx +++ b/basctl/source/dlged/dlgedview.cxx @@ -53,14 +53,14 @@ void DlgEdView::MarkListHasChanged() rDlgEditor.UpdatePropertyBrowserDelayed(); } -void DlgEdView::MakeVisible( const Rectangle& rRect, vcl::Window& rWin ) +void DlgEdView::MakeVisible( const tools::Rectangle& rRect, vcl::Window& rWin ) { // visible area MapMode aMap( rWin.GetMapMode() ); Point aOrg( aMap.GetOrigin() ); Size aVisSize( rWin.GetOutputSize() ); - Rectangle RectTmp( Point(-aOrg.X(),-aOrg.Y()), aVisSize ); - Rectangle aVisRect( RectTmp ); + tools::Rectangle RectTmp( Point(-aOrg.X(),-aOrg.Y()), aVisSize ); + tools::Rectangle aVisRect( RectTmp ); // check, if rectangle is inside visible area if ( !aVisRect.IsInside( rRect ) ) @@ -144,7 +144,7 @@ SdrObject* impLocalHitCorrection(SdrObject* pRetval, const Point& rPnt, sal_uInt { // use direct model data; it's a DlgEdObj, so GetLastBoundRect() // will access aOutRect directly - const Rectangle aOuterRectangle(pDlgEdObj->GetLastBoundRect()); + const tools::Rectangle aOuterRectangle(pDlgEdObj->GetLastBoundRect()); if(!aOuterRectangle.IsEmpty()) { diff --git a/basctl/source/inc/baside3.hxx b/basctl/source/inc/baside3.hxx index c6510010b555..3f799fcdf106 100644 --- a/basctl/source/inc/baside3.hxx +++ b/basctl/source/inc/baside3.hxx @@ -63,7 +63,7 @@ private: sal_uInt16 m_nControlSlotId; protected: - 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 dispose() override; diff --git a/basctl/source/inc/bastypes.hxx b/basctl/source/inc/bastypes.hxx index c6e0d51e9d16..4f934d7ce7d0 100644 --- a/basctl/source/inc/bastypes.hxx +++ b/basctl/source/inc/bastypes.hxx @@ -93,17 +93,17 @@ public: void Hide (); protected: - virtual bool Docking( const Point& rPos, Rectangle& rRect ) override; - virtual void EndDocking( const Rectangle& rRect, bool bFloatMode ) override; + virtual bool Docking( const Point& rPos, tools::Rectangle& rRect ) override; + virtual void EndDocking( const tools::Rectangle& rRect, bool bFloatMode ) override; virtual void ToggleFloatingMode() override; virtual bool PrepareToggleFloatingMode() override; virtual void StartDocking() override; private: // the position and the size of the floating window - Rectangle aFloatingRect; + tools::Rectangle aFloatingRect; // the position and the size of the docking window - Rectangle aDockingRect; + tools::Rectangle aDockingRect; // the parent layout window (only when docking) VclPtr<Layout> pLayout; // > 0: shown, <= 0: hidden, ++ by Show() and -- by Hide() diff --git a/basctl/source/inc/dlged.hxx b/basctl/source/inc/dlged.hxx index d8e282ed93da..2fa9bb9de66e 100644 --- a/basctl/source/inc/dlged.hxx +++ b/basctl/source/inc/dlged.hxx @@ -127,7 +127,7 @@ private: bool bFirstDraw; Size aGridSize; bool bCreateOK; - Rectangle aPaintRect; + tools::Rectangle aPaintRect; bool bDialogModelChanged; Idle aMarkIdle; long mnPaintGuard; @@ -181,7 +181,7 @@ public: void MouseButtonDown( const MouseEvent& rMEvt ); void MouseButtonUp( const MouseEvent& rMEvt ); void MouseMove( const MouseEvent& rMEvt ); - void Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect); + void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect); bool KeyInput( const KeyEvent& rKEvt ); void SetMode (Mode eMode); diff --git a/basctl/source/inc/dlgedview.hxx b/basctl/source/inc/dlgedview.hxx index 1440e0903a33..a370d48e16b4 100644 --- a/basctl/source/inc/dlgedview.hxx +++ b/basctl/source/inc/dlgedview.hxx @@ -43,7 +43,7 @@ public: virtual ~DlgEdView() override; virtual void MarkListHasChanged() override; - virtual void MakeVisible( const Rectangle& rRect, vcl::Window& rWin ) override; + virtual void MakeVisible( const tools::Rectangle& rRect, vcl::Window& rWin ) override; protected: /// override to handle HitTest for some objects specially diff --git a/basctl/source/inc/layout.hxx b/basctl/source/inc/layout.hxx index 5b66e4163032..0c476f0f0701 100644 --- a/basctl/source/inc/layout.hxx +++ b/basctl/source/inc/layout.hxx @@ -85,7 +85,7 @@ private: void Remove (DockingWindow*); bool IsEmpty () const; long GetSize () const; - void ArrangeIn (Rectangle const&); + void ArrangeIn (tools::Rectangle const&); void dispose(); private: @@ -96,7 +96,7 @@ private: // lower (top or left) or higher (bottom or right) strip? bool bLower; // rectangle to move in - Rectangle aRect; + tools::Rectangle aRect; // size (width or height) long nSize; // the main splitting line diff --git a/canvas/source/vcl/canvashelper.cxx b/canvas/source/vcl/canvashelper.cxx index 7aebfbc1ac2f..8bdda85d1ba8 100644 --- a/canvas/source/vcl/canvashelper.cxx +++ b/canvas/source/vcl/canvashelper.cxx @@ -168,7 +168,7 @@ namespace vclcanvas rOutDev.SetLineColor( COL_WHITE ); rOutDev.SetFillColor( COL_WHITE ); rOutDev.SetClipRegion(); - rOutDev.DrawRect( Rectangle( Point(), + rOutDev.DrawRect( ::tools::Rectangle( Point(), rOutDev.GetOutputSizePixel()) ); if( mp2ndOutDev ) @@ -181,7 +181,7 @@ namespace vclcanvas rOutDev2.SetLineColor( COL_WHITE ); rOutDev2.SetFillColor( COL_WHITE ); rOutDev2.SetClipRegion(); - rOutDev2.DrawRect( Rectangle( Point(), + rOutDev2.DrawRect( ::tools::Rectangle( Point(), rOutDev2.GetOutputSizePixel()) ); rOutDev2.SetDrawMode( DrawModeFlags::BlackLine | DrawModeFlags::BlackFill | DrawModeFlags::BlackText | DrawModeFlags::BlackGradient | DrawModeFlags::BlackBitmap ); @@ -946,7 +946,7 @@ namespace vclcanvas rLayout = getMemoryLayout(); // TODO(F2): Support alpha canvas here - const Rectangle aRect( vcl::unotools::rectangleFromIntegerRectangle2D(rect) ); + const ::tools::Rectangle aRect( vcl::unotools::rectangleFromIntegerRectangle2D(rect) ); OutputDevice& rOutDev( mpOutDev->getOutDev() ); @@ -1007,7 +1007,7 @@ namespace vclcanvas rOutDev.EnableMapMode( false ); rOutDev.SetAntialiasing( AntialiasingFlags::EnableB2dDraw ); - const Rectangle aRect( vcl::unotools::rectangleFromIntegerRectangle2D(rect) ); + const ::tools::Rectangle aRect( vcl::unotools::rectangleFromIntegerRectangle2D(rect) ); const sal_uInt16 nBitCount( std::min( (sal_uInt16)24, rOutDev.GetBitCount() ) ); const BitmapPalette* pPalette = nullptr; diff --git a/canvas/source/vcl/canvashelper_texturefill.cxx b/canvas/source/vcl/canvashelper_texturefill.cxx index dd5236673edb..3250fc879746 100644 --- a/canvas/source/vcl/canvashelper_texturefill.cxx +++ b/canvas/source/vcl/canvashelper_texturefill.cxx @@ -106,7 +106,7 @@ namespace vclcanvas */ void fillLinearGradient( OutputDevice& rOutDev, const ::basegfx::B2DHomMatrix& rTextureTransform, - const ::Rectangle& rBounds, + const ::tools::Rectangle& rBounds, unsigned int nStepCount, const ::canvas::ParametricPolyPolygon::Values& rValues, const std::vector< ::Color >& rColors ) @@ -264,7 +264,7 @@ namespace vclcanvas void fillPolygonalGradient( OutputDevice& rOutDev, const ::basegfx::B2DHomMatrix& rTextureTransform, - const ::Rectangle& rBounds, + const ::tools::Rectangle& rBounds, unsigned int nStepCount, bool bFillNonOverlapping, const ::canvas::ParametricPolyPolygon::Values& rValues, @@ -488,7 +488,7 @@ namespace vclcanvas const ::canvas::ParametricPolyPolygon::Values& rValues, const std::vector< ::Color >& rColors, const ::basegfx::B2DHomMatrix& rTextureTransform, - const ::Rectangle& rBounds, + const ::tools::Rectangle& rBounds, unsigned int nStepCount, bool bFillNonOverlapping ) { @@ -563,7 +563,7 @@ namespace vclcanvas // determine maximal bound rect of texture-filled // polygon - const ::Rectangle aPolygonDeviceRectOrig( + const ::tools::Rectangle aPolygonDeviceRectOrig( rPoly.GetBoundRect() ); if( tools::isRectangle( rPoly ) ) @@ -734,7 +734,7 @@ namespace vclcanvas // determine maximal bound rect of texture-filled // polygon - const ::Rectangle aPolygonDeviceRect( + const ::tools::Rectangle aPolygonDeviceRect( aPolyPoly.GetBoundRect() ); @@ -760,7 +760,7 @@ namespace vclcanvas aRect, aTotalTransform ); - const ::Rectangle aIntegerTextureDeviceRect( + const ::tools::Rectangle aIntegerTextureDeviceRect( vcl::unotools::rectangleFromB2DRectangle( aTextureDeviceRect ) ); if( bRectangularPolygon && diff --git a/canvas/source/vcl/spritecanvashelper.cxx b/canvas/source/vcl/spritecanvashelper.cxx index b8ea28bad033..59efaa6deff8 100644 --- a/canvas/source/vcl/spritecanvashelper.cxx +++ b/canvas/source/vcl/spritecanvashelper.cxx @@ -36,7 +36,7 @@ using namespace ::com::sun::star; -#define FPS_BOUNDS Rectangle(0,0,130,90) +#define FPS_BOUNDS ::tools::Rectangle(0,0,130,90) #define INFO_COLOR COL_RED namespace vclcanvas @@ -79,7 +79,7 @@ namespace vclcanvas OutputDevice& rOutDev, const ::basegfx::B2IRange& rArea ) { - const Rectangle& rRequestedArea( + const ::tools::Rectangle& rRequestedArea( vcl::unotools::rectangleFromB2IRectangle( rArea ) ); // clip output to actual update region (otherwise a) @@ -222,7 +222,7 @@ namespace vclcanvas // clips. besides that, will interfere with animations (as for // Window-invalidate repaints, only parts of the window will // be redrawn otherwise) - const vcl::Region aFullWindowRegion( Rectangle(aEmptyPoint, + const vcl::Region aFullWindowRegion( ::tools::Rectangle(aEmptyPoint, aOutDevSize) ); pTargetWindow->ExpandPaintClipRegion(aFullWindowRegion); } diff --git a/chart2/source/controller/accessibility/AccessibleBase.cxx b/chart2/source/controller/accessibility/AccessibleBase.cxx index 3a283d2e48bf..832f48bac59d 100644 --- a/chart2/source/controller/accessibility/AccessibleBase.cxx +++ b/chart2/source/controller/accessibility/AccessibleBase.cxx @@ -650,7 +650,7 @@ awt::Rectangle SAL_CALL AccessibleBase::getBounds() awt::Rectangle aLogicRect( pExplicitValueProvider->getRectangleOfObject( m_aAccInfo.m_aOID.getObjectCID() )); if( pWindow ) { - Rectangle aRect( aLogicRect.X, aLogicRect.Y, + tools::Rectangle aRect( aLogicRect.X, aLogicRect.Y, aLogicRect.X + aLogicRect.Width, aLogicRect.Y + aLogicRect.Height ); SolarMutexGuard aSolarGuard; diff --git a/chart2/source/controller/accessibility/AccessibleViewForwarder.cxx b/chart2/source/controller/accessibility/AccessibleViewForwarder.cxx index 22dff81d646a..6e7a3abc10c3 100644 --- a/chart2/source/controller/accessibility/AccessibleViewForwarder.cxx +++ b/chart2/source/controller/accessibility/AccessibleViewForwarder.cxx @@ -40,9 +40,9 @@ AccessibleViewForwarder::~AccessibleViewForwarder() // ________ IAccessibleViewforwarder ________ -Rectangle AccessibleViewForwarder::GetVisibleArea() const +tools::Rectangle AccessibleViewForwarder::GetVisibleArea() const { - Rectangle aVisibleArea; + tools::Rectangle aVisibleArea; if ( m_pWindow ) { aVisibleArea.SetPos( Point( 0, 0 ) ); diff --git a/chart2/source/controller/accessibility/AccessibleViewForwarder.hxx b/chart2/source/controller/accessibility/AccessibleViewForwarder.hxx index b1fbeb6ce756..7aa21fe600d1 100644 --- a/chart2/source/controller/accessibility/AccessibleViewForwarder.hxx +++ b/chart2/source/controller/accessibility/AccessibleViewForwarder.hxx @@ -37,7 +37,7 @@ public: virtual ~AccessibleViewForwarder() override; // ________ IAccessibleViewforwarder ________ - virtual Rectangle GetVisibleArea() const override; + virtual tools::Rectangle GetVisibleArea() const override; virtual Point LogicToPixel( const Point& rPoint ) const override; virtual Size LogicToPixel( const Size& rSize ) const override; diff --git a/chart2/source/controller/dialogs/DataBrowser.cxx b/chart2/source/controller/dialogs/DataBrowser.cxx index 0d9b6d983afb..1661e0aa1365 100644 --- a/chart2/source/controller/dialogs/DataBrowser.cxx +++ b/chart2/source/controller/dialogs/DataBrowser.cxx @@ -1021,7 +1021,7 @@ void DataBrowser::SetCursorMovedHdl( const Link<DataBrowser*,void>& rLink ) // implementations for ::svt::EditBrowseBox (pure virtual methods) void DataBrowser::PaintCell( - OutputDevice& rDev, const Rectangle& rRect, sal_uInt16 nColumnId ) const + OutputDevice& rDev, const tools::Rectangle& rRect, sal_uInt16 nColumnId ) const { Point aPos( rRect.TopLeft()); aPos.X() += 1; diff --git a/chart2/source/controller/dialogs/DataBrowser.hxx b/chart2/source/controller/dialogs/DataBrowser.hxx index 8eb8fbac53af..0be7b531cafe 100644 --- a/chart2/source/controller/dialogs/DataBrowser.hxx +++ b/chart2/source/controller/dialogs/DataBrowser.hxx @@ -50,7 +50,7 @@ class DataBrowser : public ::svt::EditBrowseBox { protected: // EditBrowseBox overridables - virtual void PaintCell( OutputDevice& rDev, const Rectangle& rRect, sal_uInt16 nColumnId ) const override; + virtual void PaintCell( OutputDevice& rDev, const tools::Rectangle& rRect, sal_uInt16 nColumnId ) const override; virtual bool SeekRow( long nRow ) override; virtual bool IsTabAllowed( bool bForward ) const override; virtual ::svt::CellController* GetController( long nRow, sal_uInt16 nCol ) override; diff --git a/chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx b/chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx index a41830d2063f..5ca2b85758b3 100644 --- a/chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx +++ b/chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx @@ -281,7 +281,7 @@ void SAL_CALL CreationWizardUnoDlg::setPropertyValue( const OUString& rPropertyN if( m_pDialog ) { m_pDialog->SetPosPixel( Point(0,0) ); - Rectangle aRect( m_pDialog->GetWindowExtentsRelative( nullptr ) ); + tools::Rectangle aRect( m_pDialog->GetWindowExtentsRelative( nullptr ) ); Point aNewOuterPos = Point( aPos.X - aRect.Left(), aPos.Y - aRect.Top() ); m_pDialog->SetPosPixel( aNewOuterPos ); @@ -311,7 +311,7 @@ uno::Any SAL_CALL CreationWizardUnoDlg::getPropertyValue( const OUString& rPrope createDialogOnDemand(); if( m_pDialog ) { - Rectangle aRect( m_pDialog->GetWindowExtentsRelative( nullptr ) ); + tools::Rectangle aRect( m_pDialog->GetWindowExtentsRelative( nullptr ) ); awt::Point aPoint(aRect.Left(),aRect.Top()); aRet <<= aPoint; } @@ -324,7 +324,7 @@ uno::Any SAL_CALL CreationWizardUnoDlg::getPropertyValue( const OUString& rPrope createDialogOnDemand(); if( m_pDialog ) { - Rectangle aRect( m_pDialog->GetWindowExtentsRelative( nullptr ) ); + tools::Rectangle aRect( m_pDialog->GetWindowExtentsRelative( nullptr ) ); awt::Size aSize(aRect.GetWidth(),aRect.GetHeight()); aRet <<= aSize; } diff --git a/chart2/source/controller/drawinglayer/DrawViewWrapper.cxx b/chart2/source/controller/drawinglayer/DrawViewWrapper.cxx index 11939212e5cd..47932bb49d82 100644 --- a/chart2/source/controller/drawinglayer/DrawViewWrapper.cxx +++ b/chart2/source/controller/drawinglayer/DrawViewWrapper.cxx @@ -147,7 +147,7 @@ void DrawViewWrapper::ReInit() this->SetNoDragXorPolys(true);//for interactive 3D resize-dragging: paint only a single rectangle (not a simulated 3D object) //a correct work area is at least necessary for correct values in the position and size dialog - Rectangle aRect(Point(0,0), aOutputSize); + tools::Rectangle aRect(Point(0,0), aOutputSize); this->SetWorkArea(aRect); this->ShowSdrPage(this->GetModel()->GetPage(0)); @@ -306,7 +306,7 @@ bool DrawViewWrapper::IsObjectHit( SdrObject* pObj, const Point& rPnt ) { if(pObj) { - Rectangle aRect(pObj->GetCurrentBoundRect()); + tools::Rectangle aRect(pObj->GetCurrentBoundRect()); return aRect.IsInside(rPnt); } return false; diff --git a/chart2/source/controller/inc/ChartController.hxx b/chart2/source/controller/inc/ChartController.hxx index 02a3468365b2..ae579cf14b3d 100644 --- a/chart2/source/controller/inc/ChartController.hxx +++ b/chart2/source/controller/inc/ChartController.hxx @@ -281,7 +281,7 @@ public: // WindowController stuff void PrePaint(vcl::RenderContext& rRenderContext); - void execute_Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect); + void execute_Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect); void execute_MouseButtonDown( const MouseEvent& rMEvt ); void execute_MouseMove( const MouseEvent& rMEvt ); void execute_MouseButtonUp( const MouseEvent& rMEvt ); diff --git a/chart2/source/controller/inc/ChartWindow.hxx b/chart2/source/controller/inc/ChartWindow.hxx index 5a407fdac85c..95a029698e9c 100644 --- a/chart2/source/controller/inc/ChartWindow.hxx +++ b/chart2/source/controller/inc/ChartWindow.hxx @@ -39,7 +39,7 @@ public: //from base class Window: virtual void PrePaint(vcl::RenderContext& rRenderContext) override; - virtual void Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) override; + virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) override; virtual void MouseButtonDown( const MouseEvent& rMEvt ) override; virtual void MouseMove( const MouseEvent& rMEvt ) override; virtual void Tracking( const TrackingEvent& rTEvt ) override; @@ -56,7 +56,7 @@ public: void ForceInvalidate(); virtual void Invalidate( InvalidateFlags nFlags = InvalidateFlags::NONE ) override; - virtual void Invalidate( const Rectangle& rRect, InvalidateFlags nFlags = InvalidateFlags::NONE ) override; + virtual void Invalidate( const tools::Rectangle& rRect, InvalidateFlags nFlags = InvalidateFlags::NONE ) override; virtual void Invalidate( const vcl::Region& rRegion, InvalidateFlags nFlags = InvalidateFlags::NONE ) override; virtual css::uno::Reference< css::accessibility::XAccessible > CreateAccessible() override; diff --git a/chart2/source/controller/main/ChartController_Tools.cxx b/chart2/source/controller/main/ChartController_Tools.cxx index 502c649ab6bd..2b049ab616b1 100644 --- a/chart2/source/controller/main/ChartController_Tools.cxx +++ b/chart2/source/controller/main/ChartController_Tools.cxx @@ -255,7 +255,7 @@ void ChartController::executeDispatch_Paste() Graphic aGraphic; // paste location: center of window Point aPos; - aPos = pChartWindow->PixelToLogic( Rectangle( aPos, pChartWindow->GetSizePixel()).Center()); + aPos = pChartWindow->PixelToLogic( tools::Rectangle( aPos, pChartWindow->GetSizePixel()).Center()); // handle different formats TransferableDataHelper aDataHelper( TransferableDataHelper::CreateFromSystemClipboard( pChartWindow )); diff --git a/chart2/source/controller/main/ChartController_Window.cxx b/chart2/source/controller/main/ChartController_Window.cxx index dd08a7ef99c1..11dd2d832ab4 100644 --- a/chart2/source/controller/main/ChartController_Window.cxx +++ b/chart2/source/controller/main/ChartController_Window.cxx @@ -262,7 +262,7 @@ void SAL_CALL ChartController::setPosSize( //a correct work area is at least necessary for correct values in the position and size dialog and for dragging area if(m_pDrawViewWrapper) { - Rectangle aRect(Point(0,0), pChartWindow->GetOutputSize()); + tools::Rectangle aRect(Point(0,0), pChartWindow->GetOutputSize()); m_pDrawViewWrapper->SetWorkArea( aRect ); } pChartWindow->Invalidate(); @@ -440,7 +440,7 @@ void ChartController::PrePaint(vcl::RenderContext& /*rRenderContext*/) } } -void ChartController::execute_Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) +void ChartController::execute_Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) { try { @@ -792,9 +792,9 @@ void ChartController::execute_MouseButtonUp( const MouseEvent& rMEvt ) SdrObject* pObj = pDrawViewWrapper->getSelectedObject(); if( pObj ) { - Rectangle aObjectRect = pObj->GetSnapRect(); + tools::Rectangle aObjectRect = pObj->GetSnapRect(); awt::Size aPageSize( ChartModelHelper::getPageSize( getModel() ) ); - Rectangle aPageRect( 0,0,aPageSize.Width,aPageSize.Height ); + tools::Rectangle aPageRect( 0,0,aPageSize.Width,aPageSize.Height ); const E3dObject* pE3dObject = dynamic_cast< const E3dObject*>( pObj ); if( pE3dObject ) diff --git a/chart2/source/controller/main/ChartWindow.cxx b/chart2/source/controller/main/ChartWindow.cxx index b8c602b308be..4ffb92fde111 100644 --- a/chart2/source/controller/main/ChartWindow.cxx +++ b/chart2/source/controller/main/ChartWindow.cxx @@ -32,9 +32,9 @@ using namespace ::com::sun::star; namespace { -::Rectangle lcl_AWTRectToVCLRect( const css::awt::Rectangle & rAWTRect ) +::tools::Rectangle lcl_AWTRectToVCLRect( const css::awt::Rectangle & rAWTRect ) { - ::Rectangle aResult; + ::tools::Rectangle aResult; aResult.setX( rAWTRect.X ); aResult.setY( rAWTRect.Y ); aResult.setWidth( rAWTRect.Width ); @@ -106,7 +106,7 @@ void ChartWindow::PrePaint(vcl::RenderContext& rRenderContext) } } -void ChartWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) +void ChartWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) { m_bInPaint = true; if (m_pOpenGLWindow && m_pOpenGLWindow->IsVisible()) @@ -280,7 +280,7 @@ void ChartWindow::Invalidate( InvalidateFlags nFlags ) m_pOpenGLWindow->Invalidate( nFlags ); } } -void ChartWindow::Invalidate( const Rectangle& rRect, InvalidateFlags nFlags ) +void ChartWindow::Invalidate( const tools::Rectangle& rRect, InvalidateFlags nFlags ) { if( m_bInPaint ) // #i101928# superfluous paint calls while entering and editing charts" return; diff --git a/chart2/source/controller/main/DragMethod_RotateDiagram.hxx b/chart2/source/controller/main/DragMethod_RotateDiagram.hxx index f89ab3682816..286078ebfcc7 100644 --- a/chart2/source/controller/main/DragMethod_RotateDiagram.hxx +++ b/chart2/source/controller/main/DragMethod_RotateDiagram.hxx @@ -55,7 +55,7 @@ public: private: E3dScene* m_pScene; - Rectangle m_aReferenceRect; + tools::Rectangle m_aReferenceRect; Point m_aStartPos; basegfx::B3DPolyPolygon m_aWireframePolyPolygon; diff --git a/chart2/source/controller/main/DrawCommandDispatch.cxx b/chart2/source/controller/main/DrawCommandDispatch.cxx index 9519df44556c..22f3bb95ad29 100644 --- a/chart2/source/controller/main/DrawCommandDispatch.cxx +++ b/chart2/source/controller/main/DrawCommandDispatch.cxx @@ -444,11 +444,11 @@ SdrObject* DrawCommandDispatch::createDefaultObject( const sal_uInt16 nID ) long nDefaultObjectSizeWidth = 4000; long nDefaultObjectSizeHeight = 2500; Size aObjectSize( nDefaultObjectSizeWidth, nDefaultObjectSizeHeight ); - Rectangle aPageRect( Rectangle( Point( 0, 0 ), pPage->GetSize() ) ); + tools::Rectangle aPageRect( tools::Rectangle( Point( 0, 0 ), pPage->GetSize() ) ); Point aObjectPos = aPageRect.Center(); aObjectPos.X() -= aObjectSize.Width() / 2; aObjectPos.Y() -= aObjectSize.Height() / 2; - Rectangle aRect( aObjectPos, aObjectSize ); + tools::Rectangle aRect( aObjectPos, aObjectSize ); switch ( nID ) { diff --git a/chart2/source/controller/main/PositionAndSizeHelper.cxx b/chart2/source/controller/main/PositionAndSizeHelper.cxx index 6280ecb2be56..076789eaa0ca 100644 --- a/chart2/source/controller/main/PositionAndSizeHelper.cxx +++ b/chart2/source/controller/main/PositionAndSizeHelper.cxx @@ -43,8 +43,8 @@ bool PositionAndSizeHelper::moveObject( ObjectType eObjectType { if(!xObjectProp.is()) return false; - Rectangle aObjectRect( Point(rNewPositionAndSize.X,rNewPositionAndSize.Y), Size(rNewPositionAndSize.Width,rNewPositionAndSize.Height) ); - Rectangle aPageRect( Point(rPageRectangle.X,rPageRectangle.Y), Size(rPageRectangle.Width,rPageRectangle.Height) ); + tools::Rectangle aObjectRect( Point(rNewPositionAndSize.X,rNewPositionAndSize.Y), Size(rNewPositionAndSize.Width,rNewPositionAndSize.Height) ); + tools::Rectangle aPageRect( Point(rPageRectangle.X,rPageRectangle.Y), Size(rPageRectangle.Width,rPageRectangle.Height) ); if( OBJECTTYPE_TITLE==eObjectType ) { diff --git a/chart2/source/view/main/ChartView.cxx b/chart2/source/view/main/ChartView.cxx index 1e0f0d48d437..2053ab09eaea 100644 --- a/chart2/source/view/main/ChartView.cxx +++ b/chart2/source/view/main/ChartView.cxx @@ -1963,7 +1963,7 @@ awt::Rectangle ChartView::getRectangleOfObject( const OUString& rObjectCID, bool SdrObject* pSdrObject = pShape->GetSdrObject(); if( pSdrObject ) { - Rectangle aSnapRect( pSdrObject->GetSnapRect() ); + tools::Rectangle aSnapRect( pSdrObject->GetSnapRect() ); aRet = awt::Rectangle(aSnapRect.Left(),aSnapRect.Top(),aSnapRect.GetWidth(),aSnapRect.GetHeight()); } } diff --git a/chart2/source/view/main/DummyXShape.cxx b/chart2/source/view/main/DummyXShape.cxx index 4d7291c03646..b066f39a2d2d 100644 --- a/chart2/source/view/main/DummyXShape.cxx +++ b/chart2/source/view/main/DummyXShape.cxx @@ -786,7 +786,7 @@ DummyText::DummyText(const OUString& rText, const tNameSequence& rNames, ScopedVclPtrInstance< VirtualDevice > pDevice(*Application::GetDefaultDevice(), DeviceFormat::DEFAULT, DeviceFormat::DEFAULT); pDevice->Erase(); - Rectangle aRect; + tools::Rectangle aRect; pDevice->SetFont(aFont); pDevice->GetTextBoundRect(aRect, rText); int screenWidth = (aRect.BottomRight().X()); diff --git a/cppcanvas/source/inc/implrenderer.hxx b/cppcanvas/source/inc/implrenderer.hxx index be9656466c69..0b584fad9a85 100644 --- a/cppcanvas/source/inc/implrenderer.hxx +++ b/cppcanvas/source/inc/implrenderer.hxx @@ -36,7 +36,7 @@ class GDIMetaFile; class VirtualDevice; class Gradient; -class Rectangle; +namespace tools { class Rectangle; } namespace vcl { class Font; } namespace tools { class PolyPolygon; } class Point; @@ -215,7 +215,7 @@ static float GetSwapFloat( SvStream& rSt ) const ActionFactoryParameters& rParms, bool bIntersect ); - static void updateClipping( const ::Rectangle& rClipRect, + static void updateClipping( const ::tools::Rectangle& rClipRect, const ActionFactoryParameters& rParms, bool bIntersect ); diff --git a/cppcanvas/source/inc/outdevstate.hxx b/cppcanvas/source/inc/outdevstate.hxx index 2d199cc860ce..1a087fdc63c4 100644 --- a/cppcanvas/source/inc/outdevstate.hxx +++ b/cppcanvas/source/inc/outdevstate.hxx @@ -80,7 +80,7 @@ namespace cppcanvas } ::basegfx::B2DPolyPolygon clip; - ::Rectangle clipRect; + ::tools::Rectangle clipRect; css::uno::Reference< css::rendering::XPolyPolygon2D > xClipPoly; css::uno::Sequence< double > lineColor; diff --git a/cppcanvas/source/mtfrenderer/emfplus.cxx b/cppcanvas/source/mtfrenderer/emfplus.cxx index 97f6e01920eb..20142396e4e9 100644 --- a/cppcanvas/source/mtfrenderer/emfplus.cxx +++ b/cppcanvas/source/mtfrenderer/emfplus.cxx @@ -1060,7 +1060,7 @@ namespace cppcanvas sal_Int32 aCount; ReadRectangle (rMF, sx, sy, sw, sh); - Rectangle aSource(Point(sx, sy), Size(sw, sh)); + ::tools::Rectangle aSource(Point(sx, sy), Size(sw, sh)); SAL_INFO("cppcanvas.emf", "EMF+ " << (type == EmfPlusRecordTypeDrawImagePoints ? "DrawImagePoints" : "DrawImage") << " source rectangle: " << sx << "," << sy << " " << sw << "x" << sh); diff --git a/cppcanvas/source/mtfrenderer/implrenderer.cxx b/cppcanvas/source/mtfrenderer/implrenderer.cxx index f12efdb10b1b..38b3921eb215 100644 --- a/cppcanvas/source/mtfrenderer/implrenderer.cxx +++ b/cppcanvas/source/mtfrenderer/implrenderer.cxx @@ -1121,7 +1121,7 @@ namespace cppcanvas } } - void ImplRenderer::updateClipping( const ::Rectangle& rClipRect, + void ImplRenderer::updateClipping( const ::tools::Rectangle& rClipRect, const ActionFactoryParameters& rParms, bool bIntersect ) { @@ -1297,7 +1297,7 @@ namespace cppcanvas "region encountered, falling back to bounding box!" ); // #121806# explicitly kept integer - Rectangle aClipRect( + ::tools::Rectangle aClipRect( rVDev.LogicToPixel( pClipAction->GetRegion().GetBoundRect() ) ); @@ -1331,7 +1331,7 @@ namespace cppcanvas MetaISectRectClipRegionAction* pClipAction = static_cast<MetaISectRectClipRegionAction*>(pCurrAct); // #121806# explicitly kept integer - Rectangle aClipRect( + ::tools::Rectangle aClipRect( rVDev.LogicToPixel( pClipAction->GetRect() ) ); // intersect current clip with given rect @@ -1353,7 +1353,7 @@ namespace cppcanvas "region encountered, falling back to bounding box!" ); // #121806# explicitly kept integer - Rectangle aClipRect( + ::tools::Rectangle aClipRect( rVDev.LogicToPixel( pClipAction->GetRegion().GetBoundRect() ) ); // intersect current clip with given rect @@ -1931,7 +1931,7 @@ namespace cppcanvas case MetaActionType::RECT: { - const Rectangle& rRect( + const ::tools::Rectangle& rRect( static_cast<MetaRectAction*>(pCurrAct)->GetRect() ); if( rRect.IsEmpty() ) @@ -1956,7 +1956,7 @@ namespace cppcanvas case MetaActionType::ROUNDRECT: { - const Rectangle& rRect( + const ::tools::Rectangle& rRect( static_cast<MetaRoundRectAction*>(pCurrAct)->GetRect()); if( rRect.IsEmpty() ) @@ -1979,7 +1979,7 @@ namespace cppcanvas case MetaActionType::ELLIPSE: { - const Rectangle& rRect( + const ::tools::Rectangle& rRect( static_cast<MetaEllipseAction*>(pCurrAct)->GetRect() ); if( rRect.IsEmpty() ) @@ -2184,7 +2184,7 @@ namespace cppcanvas // crop bitmap to given source rectangle (no // need to copy and convert the whole bitmap) ::Bitmap aBmp( pAct->GetBitmap() ); - const Rectangle aCropRect( pAct->GetSrcPoint(), + const ::tools::Rectangle aCropRect( pAct->GetSrcPoint(), pAct->GetSrcSize() ); aBmp.Crop( aCropRect ); @@ -2267,7 +2267,7 @@ namespace cppcanvas // crop bitmap to given source rectangle (no // need to copy and convert the whole bitmap) BitmapEx aBmp( pAct->GetBitmapEx() ); - const Rectangle aCropRect( pAct->GetSrcPoint(), + const ::tools::Rectangle aCropRect( pAct->GetSrcPoint(), pAct->GetSrcSize() ); aBmp.Crop( aCropRect ); @@ -2367,7 +2367,7 @@ namespace cppcanvas // crop bitmap to given source rectangle (no // need to copy and convert the whole bitmap) - const Rectangle aCropRect( pAct->GetSrcPoint(), + const ::tools::Rectangle aCropRect( pAct->GetSrcPoint(), pAct->GetSrcSize() ); aBmp.Crop( aCropRect ); diff --git a/cppcanvas/source/mtfrenderer/mtftools.cxx b/cppcanvas/source/mtfrenderer/mtftools.cxx index b6f1fff2876d..a9ceb98c5594 100644 --- a/cppcanvas/source/mtfrenderer/mtftools.cxx +++ b/cppcanvas/source/mtfrenderer/mtftools.cxx @@ -161,7 +161,7 @@ namespace cppcanvas { // simple rect case - const ::Rectangle aLocalClipRect( rOutdevState.clipRect ); + const ::tools::Rectangle aLocalClipRect( rOutdevState.clipRect ); if( bRotation ) { diff --git a/cui/source/customize/acccfg.cxx b/cui/source/customize/acccfg.cxx index 39172a819517..93d36283ed52 100644 --- a/cui/source/customize/acccfg.cxx +++ b/cui/source/customize/acccfg.cxx @@ -1097,7 +1097,7 @@ IMPL_LINK_NOARG(SfxAcceleratorConfigPage, RemoveHdl, Button*, void) IMPL_LINK( SfxAcceleratorConfigPage, SelectHdl, SvTreeListBox*, pListBox, void ) { // disable help - Help::ShowBalloon( this, Point(), Rectangle(), OUString() ); + Help::ShowBalloon( this, Point(), ::tools::Rectangle(), OUString() ); if (pListBox == m_pEntriesBox) { sal_uLong nPos = SvTreeList::GetRelPos( m_pEntriesBox->FirstSelected() ); diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx index 0f47c1856b3a..c8410db79857 100644 --- a/cui/source/customize/cfg.cxx +++ b/cui/source/customize/cfg.cxx @@ -1573,7 +1573,7 @@ public: long n = 0; while (n <= nHalfSize) { - rRenderContext.DrawRect(Rectangle(nX + n, nY + n, nX + n, nY + nSize - n)); + rRenderContext.DrawRect(::tools::Rectangle(nX + n, nY + n, nX + n, nY + nSize - n)); ++n; } @@ -4849,7 +4849,7 @@ Image SvxToolbarEntriesListBox::GetSizedImage( Point aPos( nPosX > 0 ? nPosX : 0, nPosY > 0 ? nPosY : 0 ); rVDev.SetFillColor( aFillColor ); rVDev.SetLineColor( aFillColor ); - rVDev.DrawRect( Rectangle( Point(), aNewSize )); + rVDev.DrawRect( ::tools::Rectangle( Point(), aNewSize )); rVDev.DrawImage( aPos, aImage ); // Draw separator line 2 pixels left from the right border diff --git a/cui/source/customize/selector.cxx b/cui/source/customize/selector.cxx index 874384694521..0a22e09e8c84 100644 --- a/cui/source/customize/selector.cxx +++ b/cui/source/customize/selector.cxx @@ -122,7 +122,7 @@ void SvxConfigFunctionListBox::MouseMove( const MouseEvent& rMEvt ) aTimer.Start(); else { - Rectangle aRect(GetPosPixel(), GetSizePixel()); + ::tools::Rectangle aRect(GetPosPixel(), GetSizePixel()); Help::ShowBalloon( this, aMousePos, aRect, OUString() ); aTimer.Stop(); } @@ -136,7 +136,7 @@ IMPL_LINK_NOARG(SvxConfigFunctionListBox, TimerHdl, Timer *, void) SvTreeListEntry *pEntry = GetCurEntry(); if ( pEntry && GetEntry( aMousePos ) == pEntry && pCurEntry == pEntry ) { - Rectangle aRect(GetPosPixel(), GetSizePixel()); + ::tools::Rectangle aRect(GetPosPixel(), GetSizePixel()); Help::ShowBalloon( this, OutputToScreenPixel(aMousePos), aRect, GetHelpText( pEntry ) ); } } @@ -173,7 +173,7 @@ OUString SvxConfigFunctionListBox::GetHelpText( SvTreeListEntry *pEntry ) void SvxConfigFunctionListBox::FunctionSelected() { - Help::ShowBalloon( this, Point(), Rectangle(), OUString() ); + Help::ShowBalloon( this, Point(), ::tools::Rectangle(), OUString() ); } // drag and drop support diff --git a/cui/source/dialogs/about.cxx b/cui/source/dialogs/about.cxx index 35308f030af9..9384a76743dd 100644 --- a/cui/source/dialogs/about.cxx +++ b/cui/source/dialogs/about.cxx @@ -242,7 +242,7 @@ void AboutDialog::Resize() } } -void AboutDialog::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) +void AboutDialog::Paint(vcl::RenderContext& rRenderContext, const ::tools::Rectangle& rRect) { rRenderContext.SetClipRegion(vcl::Region(rRect)); diff --git a/cui/source/dialogs/colorpicker.cxx b/cui/source/dialogs/colorpicker.cxx index 54b1e9d7ee4f..548594aa1f9b 100644 --- a/cui/source/dialogs/colorpicker.cxx +++ b/cui/source/dialogs/colorpicker.cxx @@ -153,7 +153,7 @@ class ColorPreviewControl : public Control public: ColorPreviewControl( vcl::Window* pParent, WinBits nStyle ); - virtual void Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) override; + virtual void Paint(vcl::RenderContext& rRenderContext, const ::tools::Rectangle& rRect) override; void SetColor(const Color& rColor); @@ -177,7 +177,7 @@ void ColorPreviewControl::SetColor( const Color& rCol ) } } -void ColorPreviewControl::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) +void ColorPreviewControl::Paint(vcl::RenderContext& rRenderContext, const ::tools::Rectangle& rRect) { rRenderContext.SetFillColor(maColor); rRenderContext.SetLineColor(maColor); @@ -199,7 +199,7 @@ public: virtual void MouseButtonDown( const MouseEvent& rMEvt ) override; virtual void MouseButtonUp( const MouseEvent& rMEvt ) override; virtual void KeyInput( const KeyEvent& rKEvt ) 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 Size GetOptimalSize() const override; @@ -434,8 +434,8 @@ void ColorFieldControl::ShowPosition( const Point& rPos, bool bUpdate ) Point aPos = maPosition; maPosition.X() = nX - 5; maPosition.Y() = nY - 5; - Invalidate(Rectangle(aPos, Size(11, 11))); - Invalidate(Rectangle(maPosition, Size(11, 11))); + Invalidate(::tools::Rectangle(aPos, Size(11, 11))); + Invalidate(::tools::Rectangle(maPosition, Size(11, 11))); if (bUpdate) { @@ -525,7 +525,7 @@ void ColorFieldControl::KeyInput( const KeyEvent& rKEvt ) Control::KeyInput(rKEvt); } -void ColorFieldControl::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) +void ColorFieldControl::Paint(vcl::RenderContext& rRenderContext, const ::tools::Rectangle& rRect) { if (!mpBitmap) UpdateBitmap(); @@ -548,7 +548,7 @@ void ColorFieldControl::Paint(vcl::RenderContext& rRenderContext, const Rectangl rRenderContext.SetFillColor(); - rRenderContext.DrawEllipse(Rectangle(maPosition, Size(11, 11))); + rRenderContext.DrawEllipse(::tools::Rectangle(maPosition, Size(11, 11))); } void ColorFieldControl::Resize() @@ -598,7 +598,7 @@ public: virtual void MouseButtonDown( const MouseEvent& rMEvt ) override; virtual void MouseButtonUp( const MouseEvent& rMEvt ) override; virtual void KeyInput( const KeyEvent& rKEvt ) 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; void UpdateBitmap(); @@ -794,7 +794,7 @@ void ColorSliderControl::KeyInput(const KeyEvent& rKEvt) Control::KeyInput( rKEvt ); } -void ColorSliderControl::Paint(vcl::RenderContext& rRenderContext, const Rectangle& /*rRect*/) +void ColorSliderControl::Paint(vcl::RenderContext& rRenderContext, const ::tools::Rectangle& /*rRect*/) { if (!mpBitmap) UpdateBitmap(); diff --git a/cui/source/dialogs/cuicharmap.cxx b/cui/source/dialogs/cuicharmap.cxx index 5ac0bf270535..a92f99b6d00c 100644 --- a/cui/source/dialogs/cuicharmap.cxx +++ b/cui/source/dialogs/cuicharmap.cxx @@ -181,7 +181,7 @@ SvxShowText::SvxShowText(vcl::Window* pParent) VCL_BUILDER_FACTORY(SvxShowText) -void SvxShowText::Paint(vcl::RenderContext& rRenderContext, const Rectangle&) +void SvxShowText::Paint(vcl::RenderContext& rRenderContext, const ::tools::Rectangle&) { rRenderContext.SetFont(maFont); @@ -201,7 +201,7 @@ void SvxShowText::Paint(vcl::RenderContext& rRenderContext, const Rectangle&) bool bShrankFont = false; vcl::Font aOrigFont(rRenderContext.GetFont()); Size aFontSize(aOrigFont.GetFontSize()); - Rectangle aBoundRect; + ::tools::Rectangle aBoundRect; for (long nFontHeight = aFontSize.Height(); nFontHeight > 0; nFontHeight -= 5) { diff --git a/cui/source/dialogs/cuigrfflt.cxx b/cui/source/dialogs/cuigrfflt.cxx index 60ee026c8fd1..7f499c01a776 100644 --- a/cui/source/dialogs/cuigrfflt.cxx +++ b/cui/source/dialogs/cuigrfflt.cxx @@ -46,7 +46,7 @@ Size GraphicPreviewWindow::GetOptimalSize() const } -void GraphicPreviewWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) +void GraphicPreviewWindow::Paint(vcl::RenderContext& rRenderContext, const ::tools::Rectangle& rRect) { Control::Paint(rRenderContext, rRect); diff --git a/cui/source/dialogs/hangulhanjadlg.cxx b/cui/source/dialogs/hangulhanjadlg.cxx index 9b4eb01f2b61..fb766aba1653 100644 --- a/cui/source/dialogs/hangulhanjadlg.cxx +++ b/cui/source/dialogs/hangulhanjadlg.cxx @@ -101,8 +101,8 @@ namespace svx const OUString& getSecondaryText() const { return m_sSecondaryText; } public: - void Paint( OutputDevice& _rDevice, const Rectangle& _rRect, DrawTextFlags _nTextStyle, - Rectangle* _pPrimaryLocation, Rectangle* _pSecondaryLocation ); + void Paint( OutputDevice& _rDevice, const ::tools::Rectangle& _rRect, DrawTextFlags _nTextStyle, + ::tools::Rectangle* _pPrimaryLocation, ::tools::Rectangle* _pSecondaryLocation ); }; PseudoRubyText::PseudoRubyText() @@ -118,8 +118,8 @@ namespace svx } - void PseudoRubyText::Paint(vcl::RenderContext& rRenderContext, const Rectangle& _rRect, DrawTextFlags _nTextStyle, - Rectangle* _pPrimaryLocation, Rectangle* _pSecondaryLocation ) + void PseudoRubyText::Paint(vcl::RenderContext& rRenderContext, const ::tools::Rectangle& _rRect, DrawTextFlags _nTextStyle, + ::tools::Rectangle* _pPrimaryLocation, ::tools::Rectangle* _pSecondaryLocation ) { Size aPlaygroundSize(_rRect.GetSize()); @@ -129,8 +129,8 @@ namespace svx aSmallerFont.SetFontHeight( (long)( 0.8 * aSmallerFont.GetFontHeight() ) ); // let's calculate the size of our two texts - Rectangle aPrimaryRect = rRenderContext.GetTextRect( _rRect, m_sPrimaryText, _nTextStyle ); - Rectangle aSecondaryRect; + ::tools::Rectangle aPrimaryRect = rRenderContext.GetTextRect( _rRect, m_sPrimaryText, _nTextStyle ); + ::tools::Rectangle aSecondaryRect; { FontSwitch aFontRestore(rRenderContext, aSmallerFont); aSecondaryRect = rRenderContext.GetTextRect(_rRect, m_sSecondaryText, _nTextStyle); @@ -212,7 +212,7 @@ namespace svx virtual Size GetOptimalSize() const override; protected: - virtual void Paint( vcl::RenderContext& /*rRenderContext*/, const Rectangle& _rRect ) override; + virtual void Paint( vcl::RenderContext& /*rRenderContext*/, const ::tools::Rectangle& _rRect ) override; private: PseudoRubyText m_aRubyText; @@ -229,7 +229,7 @@ namespace svx } - void RubyRadioButton::Paint(vcl::RenderContext& rRenderContext, const Rectangle&) + void RubyRadioButton::Paint(vcl::RenderContext& rRenderContext, const ::tools::Rectangle&) { HideFocus(); @@ -239,10 +239,10 @@ namespace svx aImageSize.Width() = CalcZoom( aImageSize.Width() ) + 2; // + 2 because otherwise the radiobuttons aImageSize.Height() = CalcZoom( aImageSize.Height() ) + 2; // appear a bit cut from right and top. - Rectangle aOverallRect( Point( 0, 0 ), GetOutputSizePixel() ); + ::tools::Rectangle aOverallRect( Point( 0, 0 ), GetOutputSizePixel() ); aOverallRect.Left() += aImageSize.Width() + 4; // 4 is the separator between the image and the text // inflate the rect a little bit (because the VCL radio button does the same) - Rectangle aTextRect( aOverallRect ); + ::tools::Rectangle aTextRect( aOverallRect ); ++aTextRect.Left(); --aTextRect.Right(); ++aTextRect.Top(); --aTextRect.Bottom(); @@ -269,19 +269,19 @@ namespace svx nTextStyle |= DrawTextFlags::Mnemonic; // paint the ruby text - Rectangle aPrimaryTextLocation; - Rectangle aSecondaryTextLocation; + ::tools::Rectangle aPrimaryTextLocation; + ::tools::Rectangle aSecondaryTextLocation; m_aRubyText.Paint(rRenderContext, aTextRect, nTextStyle, &aPrimaryTextLocation, &aSecondaryTextLocation); // the focus rectangle is to be painted around both texts - Rectangle aCombinedRect(aPrimaryTextLocation); + ::tools::Rectangle aCombinedRect(aPrimaryTextLocation); aCombinedRect.Union(aSecondaryTextLocation); SetFocusRect(aCombinedRect); // let the base class paint the radio button // for this, give it the proper location to paint the image (vertically centered, relative to our text) - Rectangle aImageLocation( Point( 0, 0 ), aImageSize ); + ::tools::Rectangle aImageLocation( Point( 0, 0 ), aImageSize ); sal_Int32 nTextHeight = aSecondaryTextLocation.Bottom() - aPrimaryTextLocation.Top(); aImageLocation.Top() = aPrimaryTextLocation.Top() + ( nTextHeight - aImageSize.Height() ) / 2; aImageLocation.Bottom() = aImageLocation.Top() + aImageSize.Height(); @@ -306,7 +306,7 @@ namespace svx { vcl::Font aSmallerFont( GetFont() ); aSmallerFont.SetFontHeight( static_cast<long>( 0.8 * aSmallerFont.GetFontHeight() ) ); - Rectangle rect( Point(), Size( SAL_MAX_INT32, SAL_MAX_INT32 ) ); + ::tools::Rectangle rect( Point(), Size( SAL_MAX_INT32, SAL_MAX_INT32 ) ); Size aPrimarySize = GetTextRect( rect, m_aRubyText.getPrimaryText() ).GetSize(); Size aSecondarySize; @@ -343,7 +343,7 @@ namespace svx void SuggestionSet::UserDraw( const UserDrawEvent& rUDEvt ) { vcl::RenderContext* pDev = rUDEvt.GetRenderContext(); - Rectangle aRect = rUDEvt.GetRect(); + ::tools::Rectangle aRect = rUDEvt.GetRect(); sal_uInt16 nItemId = rUDEvt.GetItemId(); OUString sText = *static_cast< OUString* >( GetItemData( nItemId ) ); diff --git a/cui/source/dialogs/hlmarkwn.cxx b/cui/source/dialogs/hlmarkwn.cxx index ce7009ec76b2..ad50188d1db1 100644 --- a/cui/source/dialogs/hlmarkwn.cxx +++ b/cui/source/dialogs/hlmarkwn.cxx @@ -92,7 +92,7 @@ Size SvxHlmarkTreeLBox::GetOptimalSize() const return LogicToPixel(Size(103, 162), MapUnit::MapAppFont); } -void SvxHlmarkTreeLBox::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) +void SvxHlmarkTreeLBox::Paint(vcl::RenderContext& rRenderContext, const ::tools::Rectangle& rRect) { if (!mpParentWnd || mpParentWnd->mnError == LERR_NOERROR) { @@ -102,7 +102,7 @@ void SvxHlmarkTreeLBox::Paint(vcl::RenderContext& rRenderContext, const Rectangl { Erase(rRenderContext); - Rectangle aDrawRect(Point( 0, 0 ), GetSizePixel()); + ::tools::Rectangle aDrawRect(Point( 0, 0 ), GetSizePixel()); OUString aStrMessage; diff --git a/cui/source/dialogs/hltpbase.cxx b/cui/source/dialogs/hltpbase.cxx index 7fefb04ddcb3..6d60d1820df5 100644 --- a/cui/source/dialogs/hltpbase.cxx +++ b/cui/source/dialogs/hltpbase.cxx @@ -200,12 +200,12 @@ void SvxHyperlinkTabPageBase::ShowMarkWnd () static_cast<vcl::Window*>(mpMarkWnd)->Show(); // Size of dialog-window in screen pixels - Rectangle aDlgRect( mpDialog->GetWindowExtentsRelative( nullptr ) ); + ::tools::Rectangle aDlgRect( mpDialog->GetWindowExtentsRelative( nullptr ) ); Point aDlgPos ( aDlgRect.TopLeft() ); Size aDlgSize ( mpDialog->GetSizePixel () ); // Absolute size of the screen - Rectangle aScreen( mpDialog->GetDesktopRectPixel() ); + ::tools::Rectangle aScreen( mpDialog->GetDesktopRectPixel() ); // Size of Extrawindow Size aExtraWndSize( mpMarkWnd->GetSizePixel () ); diff --git a/cui/source/dialogs/thesdlg.cxx b/cui/source/dialogs/thesdlg.cxx index b2cb31592be7..3d44a8593994 100644 --- a/cui/source/dialogs/thesdlg.cxx +++ b/cui/source/dialogs/thesdlg.cxx @@ -255,7 +255,7 @@ void ThesaurusAlternativesCtrl::KeyInput( const KeyEvent& rKEvt ) SvxCheckListBox::KeyInput( rKEvt ); } -void ThesaurusAlternativesCtrl::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) +void ThesaurusAlternativesCtrl::Paint(vcl::RenderContext& rRenderContext, const ::tools::Rectangle& rRect) { if (!m_pDialog->WordFound()) { diff --git a/cui/source/inc/about.hxx b/cui/source/inc/about.hxx index e3b50e1b5377..9ea511c4488b 100644 --- a/cui/source/inc/about.hxx +++ b/cui/source/inc/about.hxx @@ -66,7 +66,7 @@ private: protected: virtual bool Close() 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; public: diff --git a/cui/source/inc/cuicharmap.hxx b/cui/source/inc/cuicharmap.hxx index 41382bb45949..8d83798ecdbe 100644 --- a/cui/source/inc/cuicharmap.hxx +++ b/cui/source/inc/cuicharmap.hxx @@ -50,7 +50,7 @@ public: virtual Size GetOptimalSize() const override; protected: - virtual void Paint(vcl::RenderContext& rRenderContext, const Rectangle&) override; + virtual void Paint(vcl::RenderContext& rRenderContext, const ::tools::Rectangle&) override; private: long mnY; diff --git a/cui/source/inc/cuigrfflt.hxx b/cui/source/inc/cuigrfflt.hxx index 1fdeffc57afb..d4b7b085bb92 100644 --- a/cui/source/inc/cuigrfflt.hxx +++ b/cui/source/inc/cuigrfflt.hxx @@ -42,7 +42,7 @@ private: double mfScaleX; double mfScaleY; - 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 Size GetOptimalSize() const override; diff --git a/cui/source/inc/grfpage.hxx b/cui/source/inc/grfpage.hxx index a750bdb26597..2a6fa79a5322 100644 --- a/cui/source/inc/grfpage.hxx +++ b/cui/source/inc/grfpage.hxx @@ -35,7 +35,7 @@ class SvxCropExample : public vcl::Window public: SvxCropExample( vcl::Window* pPar, WinBits nStyle ); - 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 Size GetOptimalSize() const override; diff --git a/cui/source/inc/hlmarkwn.hxx b/cui/source/inc/hlmarkwn.hxx index b652f8c24b1b..5a879197b3ed 100644 --- a/cui/source/inc/hlmarkwn.hxx +++ b/cui/source/inc/hlmarkwn.hxx @@ -51,7 +51,7 @@ public: mpParentWnd = pParent; } - virtual void Paint( vcl::RenderContext& rRenderContext, const Rectangle& rRect ) override; + virtual void Paint( vcl::RenderContext& rRenderContext, const ::tools::Rectangle& rRect ) override; virtual Size GetOptimalSize() const override; }; diff --git a/cui/source/inc/numfmt.hxx b/cui/source/inc/numfmt.hxx index 09a1fc62e5fd..f49f0077e130 100644 --- a/cui/source/inc/numfmt.hxx +++ b/cui/source/inc/numfmt.hxx @@ -48,7 +48,7 @@ private: void InitSettings( bool bForeground, bool bBackground ); protected: - 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 void DataChanged( const DataChangedEvent& rDCEvt ) override; diff --git a/cui/source/inc/numpages.hxx b/cui/source/inc/numpages.hxx index bb30cbd3d751..b09fd9366c9a 100644 --- a/cui/source/inc/numpages.hxx +++ b/cui/source/inc/numpages.hxx @@ -51,7 +51,7 @@ class SvxNumberingPreview : public vcl::Window sal_uInt16 nActLevel; protected: - virtual void Paint( vcl::RenderContext& rRenderContext, const Rectangle& rRect ) override; + virtual void Paint( vcl::RenderContext& rRenderContext, const ::tools::Rectangle& rRect ) override; public: SvxNumberingPreview(vcl::Window* pParent, WinBits nWinBits = WB_BORDER); diff --git a/cui/source/inc/swpossizetabpage.hxx b/cui/source/inc/swpossizetabpage.hxx index aa5f90a7175d..4442250f19cf 100644 --- a/cui/source/inc/swpossizetabpage.hxx +++ b/cui/source/inc/swpossizetabpage.hxx @@ -76,8 +76,8 @@ class SvxSwPosSizeTabPage : public SfxTabPage //'string provider' SvxSwFramePosString m_aFramePosString; - Rectangle m_aRect; //size of all selected objects - Rectangle m_aWorkArea; + ::tools::Rectangle m_aRect; //size of all selected objects + ::tools::Rectangle m_aWorkArea; Point m_aAnchorPos; FrmMap* m_pVMap; diff --git a/cui/source/inc/thesdlg.hxx b/cui/source/inc/thesdlg.hxx index 2a43f980fe52..5e32d0c5630f 100644 --- a/cui/source/inc/thesdlg.hxx +++ b/cui/source/inc/thesdlg.hxx @@ -95,7 +95,7 @@ public: AlternativesExtraData * GetExtraData( const SvTreeListEntry *pEntry ); virtual void KeyInput( const KeyEvent& rKEvt ) override; - virtual void Paint( vcl::RenderContext& rRenderContext, const Rectangle& rRect ) override; + virtual void Paint( vcl::RenderContext& rRenderContext, const ::tools::Rectangle& rRect ) override; }; class ReplaceEdit : public Edit diff --git a/cui/source/options/connpooloptions.cxx b/cui/source/options/connpooloptions.cxx index 514581f9ce8e..642309118778 100644 --- a/cui/source/options/connpooloptions.cxx +++ b/cui/source/options/connpooloptions.cxx @@ -68,7 +68,7 @@ namespace offapp virtual void InitController( ::svt::CellControllerRef& rController, long nRow, sal_uInt16 nCol ) override; virtual ::svt::CellController* GetController( long nRow, sal_uInt16 nCol ) override; - virtual void PaintCell( OutputDevice& rDev, const Rectangle& rRect, sal_uInt16 nColId ) const override; + virtual void PaintCell( OutputDevice& rDev, const ::tools::Rectangle& rRect, sal_uInt16 nColId ) const override; virtual bool SeekRow( long nRow ) override; virtual bool SaveModified() override; @@ -266,7 +266,7 @@ namespace offapp } - void DriverListControl::PaintCell( OutputDevice& rDev, const Rectangle& rRect, sal_uInt16 nColId ) const + void DriverListControl::PaintCell( OutputDevice& rDev, const ::tools::Rectangle& rRect, sal_uInt16 nColId ) const { OSL_ENSURE(m_aSeekRow != m_aSettings.end(), "DriverListControl::PaintCell: invalid row!"); diff --git a/cui/source/options/optchart.cxx b/cui/source/options/optchart.cxx index 34c8f4ed58de..9471cb6f59d5 100644 --- a/cui/source/options/optchart.cxx +++ b/cui/source/options/optchart.cxx @@ -45,7 +45,7 @@ void SvxDefaultColorOptPage::InsertColorEntry(const XColorEntry& rEntry, sal_Int VclPtr<VirtualDevice> xDevice = VclPtr<VirtualDevice>::Create(); xDevice->SetOutputSize(aImageSize); - const Rectangle aRect(Point(0, 0), aImageSize); + const ::tools::Rectangle aRect(Point(0, 0), aImageSize); xDevice->SetFillColor(rColor); xDevice->SetLineColor(rStyleSettings.GetDisableColor()); xDevice->DrawRect(aRect); diff --git a/cui/source/tabpages/backgrnd.cxx b/cui/source/tabpages/backgrnd.cxx index f781f0c7e715..23b9b4cba00b 100644 --- a/cui/source/tabpages/backgrnd.cxx +++ b/cui/source/tabpages/backgrnd.cxx @@ -157,7 +157,7 @@ public: void NotifyChange( const Bitmap* pBitmap ); protected: - virtual void Paint( vcl::RenderContext& /*rRenderContext*/, const Rectangle& rRect ) override; + virtual void Paint( vcl::RenderContext& /*rRenderContext*/, const ::tools::Rectangle& rRect ) override; virtual void DataChanged( const DataChangedEvent& rDCEvt ) override; virtual void Resize() override; @@ -169,7 +169,7 @@ private: Bitmap* pBitmap; Point aDrawPos; Size aDrawSize; - Rectangle aDrawRect; + ::tools::Rectangle aDrawRect; sal_uInt8 nTransparency; }; @@ -282,11 +282,11 @@ void BackgroundPreviewImpl::recalcDrawPos() void BackgroundPreviewImpl::Resize() { Window::Resize(); - aDrawRect = Rectangle(Point(0,0), GetOutputSizePixel()); + aDrawRect = ::tools::Rectangle(Point(0,0), GetOutputSizePixel()); recalcDrawPos(); } -void BackgroundPreviewImpl::Paint(vcl::RenderContext& rRenderContext, const Rectangle&) +void BackgroundPreviewImpl::Paint(vcl::RenderContext& rRenderContext, const ::tools::Rectangle&) { const StyleSettings& rStyleSettings = rRenderContext.GetSettings().GetStyleSettings(); rRenderContext.SetBackground(Wallpaper(rStyleSettings.GetWindowColor())); diff --git a/cui/source/tabpages/grfpage.cxx b/cui/source/tabpages/grfpage.cxx index 363c56af80c2..cd4bc8a97ba8 100644 --- a/cui/source/tabpages/grfpage.cxx +++ b/cui/source/tabpages/grfpage.cxx @@ -779,16 +779,16 @@ Size SvxCropExample::GetOptimalSize() const VCL_BUILDER_FACTORY_CONSTRUCTOR(SvxCropExample, 0) -void SvxCropExample::Paint(vcl::RenderContext& rRenderContext, const Rectangle&) +void SvxCropExample::Paint(vcl::RenderContext& rRenderContext, const ::tools::Rectangle&) { Size aWinSize(rRenderContext.PixelToLogic(GetOutputSizePixel())); rRenderContext.SetLineColor(); rRenderContext.SetFillColor(rRenderContext.GetSettings().GetStyleSettings().GetWindowColor()); rRenderContext.SetRasterOp(RasterOp::OverPaint); - rRenderContext.DrawRect(Rectangle(Point(), aWinSize)); + rRenderContext.DrawRect(::tools::Rectangle(Point(), aWinSize)); rRenderContext.SetLineColor(Color(COL_WHITE)); - Rectangle aRect(Point((aWinSize.Width() - aFrameSize.Width())/2, + ::tools::Rectangle aRect(Point((aWinSize.Width() - aFrameSize.Width())/2, (aWinSize.Height() - aFrameSize.Height())/2), aFrameSize); aGrf.Draw(&rRenderContext, aRect.TopLeft(), aRect.GetSize()); diff --git a/cui/source/tabpages/numfmt.cxx b/cui/source/tabpages/numfmt.cxx index 9b3e0e580892..d28fdbff8267 100644 --- a/cui/source/tabpages/numfmt.cxx +++ b/cui/source/tabpages/numfmt.cxx @@ -145,7 +145,7 @@ void SvxNumberPreview::NotifyChange( const OUString& rPrevStr, #* #************************************************************************/ -void SvxNumberPreview::Paint(vcl::RenderContext& rRenderContext, const Rectangle&) +void SvxNumberPreview::Paint(vcl::RenderContext& rRenderContext, const ::tools::Rectangle&) { vcl::Font aDrawFont = rRenderContext.GetFont(); Size aSzWnd(GetOutputSizePixel()); diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx index 063e265ca04f..3da5e1033da7 100644 --- a/cui/source/tabpages/numpages.cxx +++ b/cui/source/tabpages/numpages.cxx @@ -2349,7 +2349,7 @@ SvxNumberingPreview::SvxNumberingPreview(vcl::Window* pParent, WinBits nWinBits) VCL_BUILDER_FACTORY_ARGS(SvxNumberingPreview, WB_BORDER) // paint preview of numeration -void SvxNumberingPreview::Paint(vcl::RenderContext& rRenderContext, const Rectangle& /*rRect*/) +void SvxNumberingPreview::Paint(vcl::RenderContext& rRenderContext, const ::tools::Rectangle& /*rRect*/) { Size aSize(rRenderContext.PixelToLogic(GetOutputSizePixel())); @@ -2521,11 +2521,11 @@ void SvxNumberingPreview::Paint(vcl::RenderContext& rRenderContext, const Rectan nXStart = static_cast<sal_uInt16>(rFmt.GetIndentAt() / nWidthRelation); } - Rectangle aRect1(Point(nTextXPos, nYStart + nFontHeight / 2), Size(aSize.Width() / 2, 2)); + ::tools::Rectangle aRect1(Point(nTextXPos, nYStart + nFontHeight / 2), Size(aSize.Width() / 2, 2)); pVDev->SetFillColor(aBackColor); pVDev->DrawRect(aRect1); - Rectangle aRect2(Point(nXStart, nYStart + nLineHeight + nFontHeight / 2 ), Size(aSize.Width() / 2, 2)); + ::tools::Rectangle aRect2(Point(nXStart, nYStart + nLineHeight + nFontHeight / 2 ), Size(aSize.Width() / 2, 2)); pVDev->DrawRect(aRect2); nYStart += 2 * nLineHeight; } @@ -2616,7 +2616,7 @@ void SvxNumberingPreview::Paint(vcl::RenderContext& rRenderContext, const Rectan pVDev->SetFillColor( aLineColor ); pVDev->SetLineColor( aLineColor ); } - Rectangle aRect1(Point(nXStart + nTextOffset, nYStart + nTopOffset), Size(nWidth, nRectHeight)); + ::tools::Rectangle aRect1(Point(nXStart + nTextOffset, nYStart + nTopOffset), Size(nWidth, nRectHeight)); pVDev->DrawRect(aRect1); } } diff --git a/cui/source/tabpages/tabstpge.cxx b/cui/source/tabpages/tabstpge.cxx index f6f42f4312fd..25870806419f 100644 --- a/cui/source/tabpages/tabstpge.cxx +++ b/cui/source/tabpages/tabstpge.cxx @@ -54,7 +54,7 @@ public: virtual ~TabWin_Impl() override { disposeOnce(); } virtual void dispose() override { mpPage.clear(); vcl::Window::dispose(); } - virtual void Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) override; + virtual void Paint(vcl::RenderContext& rRenderContext, const ::tools::Rectangle& rRect) override; void SetTabulatorTabPage(SvxTabulatorTabPage* pPage) { mpPage = pPage; } void SetTabStyle(sal_uInt16 nStyle) {nTabStyle = nStyle; } @@ -79,7 +79,7 @@ void FillUpWithDefTabs_Impl( long nDefDist, SvxTabStopItem& rTabs ) } } -void TabWin_Impl::Paint(vcl::RenderContext& rRenderContext, const Rectangle&) +void TabWin_Impl::Paint(vcl::RenderContext& rRenderContext, const ::tools::Rectangle&) { // Paint tabulators Point aPoint; diff --git a/cui/source/tabpages/transfrm.cxx b/cui/source/tabpages/transfrm.cxx index d8916301c142..e990af8fcd2e 100644 --- a/cui/source/tabpages/transfrm.cxx +++ b/cui/source/tabpages/transfrm.cxx @@ -228,7 +228,7 @@ void SvxAngleTabPage::Construct() } { // #i75273# - Rectangle aTempRect(pView->GetAllMarkedRect()); + ::tools::Rectangle aTempRect(pView->GetAllMarkedRect()); pView->GetSdrPageView()->LogicToPagePos(aTempRect); maRange = basegfx::B2DRange(aTempRect.Left(), aTempRect.Top(), aTempRect.Right(), aTempRect.Bottom()); } @@ -473,7 +473,7 @@ void SvxSlantTabPage::Construct() SetFieldUnit(*m_pMtrRadius, eDlgUnit, true); { // #i75273# - Rectangle aTempRect(pView->GetAllMarkedRect()); + ::tools::Rectangle aTempRect(pView->GetAllMarkedRect()); pView->GetSdrPageView()->LogicToPagePos(aTempRect); maRange = basegfx::B2DRange(aTempRect.Left(), aTempRect.Top(), aTempRect.Right(), aTempRect.Bottom()); } @@ -507,7 +507,7 @@ bool SvxSlantTabPage::FillItemSet(SfxItemSet* rAttrs) if( bModified ) { // set reference points - Rectangle aObjectRect(pView->GetAllMarkedRect()); + ::tools::Rectangle aObjectRect(pView->GetAllMarkedRect()); pView->GetSdrPageView()->LogicToPagePos(aObjectRect); Point aPt = aObjectRect.Center(); @@ -536,7 +536,7 @@ bool SvxSlantTabPage::FillItemSet(SfxItemSet* rAttrs) pModel->BegUndo(pUndo->GetComment()); EnhancedCustomShape2d aShape(pObj); - Rectangle aLogicRect = aShape.GetLogicRect(); + ::tools::Rectangle aLogicRect = aShape.GetLogicRect(); for (int i = 0; i < 2; ++i) { @@ -651,7 +651,7 @@ void SvxSlantTabPage::Reset(const SfxItemSet* rAttrs) Point aMinPosition; aShape.GetHandlePosition(i, aMinPosition); - Rectangle aLogicRect = aShape.GetLogicRect(); + ::tools::Rectangle aLogicRect = aShape.GetLogicRect(); aInitialPosition.Move(-aLogicRect.Left(), -aLogicRect.Top()); aMaxPosition.Move(-aLogicRect.Left(), -aLogicRect.Top()); aMinPosition.Move(-aLogicRect.Left(), -aLogicRect.Top()); @@ -697,7 +697,7 @@ void SvxSlantTabPage::ActivatePage( const SfxItemSet& rSet ) if( SfxItemState::SET == rSet.GetItemState( GetWhich( SID_ATTR_TRANSFORM_INTERN ) , false, reinterpret_cast<SfxPoolItem const **>(&pRectItem) ) ) { - const Rectangle aTempRect(pRectItem->GetValue()); + const ::tools::Rectangle aTempRect(pRectItem->GetValue()); maRange = basegfx::B2DRange(aTempRect.Left(), aTempRect.Top(), aTempRect.Right(), aTempRect.Bottom()); } } @@ -829,13 +829,13 @@ void SvxPositionSizeTabPage::Construct() } { // #i75273# - Rectangle aTempRect(mpView->GetAllMarkedRect()); + ::tools::Rectangle aTempRect(mpView->GetAllMarkedRect()); mpView->GetSdrPageView()->LogicToPagePos(aTempRect); maRange = basegfx::B2DRange(aTempRect.Left(), aTempRect.Top(), aTempRect.Right(), aTempRect.Bottom()); } { // #i75273# - Rectangle aTempRect(mpView->GetWorkArea()); + ::tools::Rectangle aTempRect(mpView->GetWorkArea()); mpView->GetSdrPageView()->LogicToPagePos(aTempRect); maWorkRange = basegfx::B2DRange(aTempRect.Left(), aTempRect.Top(), aTempRect.Right(), aTempRect.Bottom()); } @@ -930,7 +930,7 @@ bool SvxPositionSizeTabPage::FillItemSet( SfxItemSet* rOutAttrs ) double fY((GetCoreValue( *m_pMtrPosY, mePoolUnit ) + maAnchor.getY()) * fUIScale); { // #i75273# - Rectangle aTempRect(mpView->GetAllMarkedRect()); + ::tools::Rectangle aTempRect(mpView->GetAllMarkedRect()); mpView->GetSdrPageView()->LogicToPagePos(aTempRect); maRange = basegfx::B2DRange(aTempRect.Left(), aTempRect.Top(), aTempRect.Right(), aTempRect.Bottom()); } @@ -1149,7 +1149,7 @@ void SvxPositionSizeTabPage::ActivatePage( const SfxItemSet& rSet ) if( SfxItemState::SET == rSet.GetItemState( GetWhich( SID_ATTR_TRANSFORM_INTERN ) , false, reinterpret_cast<SfxPoolItem const **>(&pRectItem) ) ) { { // #i75273# - const Rectangle aTempRect(pRectItem->GetValue()); + const ::tools::Rectangle aTempRect(pRectItem->GetValue()); maRange = basegfx::B2DRange(aTempRect.Left(), aTempRect.Top(), aTempRect.Right(), aTempRect.Bottom()); } @@ -1166,7 +1166,7 @@ DeactivateRC SvxPositionSizeTabPage::DeactivatePage( SfxItemSet* _pSet ) double fY((double)m_pMtrPosY->GetValue()); GetTopLeftPosition(fX, fY, maRange); - const Rectangle aOutRectangle( + const ::tools::Rectangle aOutRectangle( basegfx::fround(fX), basegfx::fround(fY), basegfx::fround(fX + maRange.getWidth()), basegfx::fround(fY + maRange.getHeight())); _pSet->Put(SfxRectangleItem(SID_ATTR_TRANSFORM_INTERN, aOutRectangle)); diff --git a/dbaccess/source/ui/app/AppDetailPageHelper.cxx b/dbaccess/source/ui/app/AppDetailPageHelper.cxx index 240b9fac5274..c53476d3b72f 100644 --- a/dbaccess/source/ui/app/AppDetailPageHelper.cxx +++ b/dbaccess/source/ui/app/AppDetailPageHelper.cxx @@ -1262,7 +1262,7 @@ OPreviewWindow::OPreviewWindow(vcl::Window* _pParent) ImplInitSettings(); } -bool OPreviewWindow::ImplGetGraphicCenterRect( const Graphic& rGraphic, Rectangle& rResultRect ) const +bool OPreviewWindow::ImplGetGraphicCenterRect( const Graphic& rGraphic, tools::Rectangle& rResultRect ) const { const Size aWinSize( GetOutputSizePixel() ); Size aNewSize( LogicToPixel( rGraphic.GetPrefSize(), rGraphic.GetPrefMapMode() ) ); @@ -1288,14 +1288,14 @@ bool OPreviewWindow::ImplGetGraphicCenterRect( const Graphic& rGraphic, Rectangl const Point aNewPos( ( aWinSize.Width() - aNewSize.Width() ) >> 1, ( aWinSize.Height() - aNewSize.Height() ) >> 1 ); - rResultRect = Rectangle( aNewPos, aNewSize ); + rResultRect = tools::Rectangle( aNewPos, aNewSize ); bRet = true; } return bRet; } -void OPreviewWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) +void OPreviewWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) { Window::Paint(rRenderContext, rRect); diff --git a/dbaccess/source/ui/app/AppDetailPageHelper.hxx b/dbaccess/source/ui/app/AppDetailPageHelper.hxx index 09091df09989..0041f6c636d2 100644 --- a/dbaccess/source/ui/app/AppDetailPageHelper.hxx +++ b/dbaccess/source/ui/app/AppDetailPageHelper.hxx @@ -50,7 +50,7 @@ namespace dbaui class OPreviewWindow : public vcl::Window { GraphicObject m_aGraphicObj; - Rectangle m_aPreviewRect; + tools::Rectangle m_aPreviewRect; /** gets the graphic center rect @param rGraphic @@ -61,7 +61,7 @@ namespace dbaui @return <TRUE/> when successful */ - bool ImplGetGraphicCenterRect( const Graphic& rGraphic, Rectangle& rResultRect ) const; + bool ImplGetGraphicCenterRect( const Graphic& rGraphic, tools::Rectangle& rResultRect ) const; void ImplInitSettings(); protected: virtual void DataChanged(const DataChangedEvent& rDCEvt) override; @@ -69,7 +69,7 @@ namespace dbaui explicit OPreviewWindow(vcl::Window* _pParent); // Window overrides - virtual void Paint(vcl::RenderContext& /*rRenderContext*/, const Rectangle& rRect) override; + virtual void Paint(vcl::RenderContext& /*rRenderContext*/, const tools::Rectangle& rRect) override; void setGraphic(const Graphic& _rGraphic ) { m_aGraphicObj.SetGraphic(_rGraphic); } }; diff --git a/dbaccess/source/ui/app/AppDetailView.cxx b/dbaccess/source/ui/app/AppDetailView.cxx index 9961e28beb2d..08af0e8e7fd4 100644 --- a/dbaccess/source/ui/app/AppDetailView.cxx +++ b/dbaccess/source/ui/app/AppDetailView.cxx @@ -84,7 +84,7 @@ OCreationList::OCreationList( OTasksWindow& _rParent ) EnableEntryMnemonics(); } -void OCreationList::Paint(vcl::RenderContext& rRenderContext, const Rectangle& _rRect ) +void OCreationList::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& _rRect ) { SetBackground(); @@ -148,9 +148,9 @@ void OCreationList::ExecuteSearchEntry( const void* _pEntry ) const onSelected( pEntry ); } -Rectangle OCreationList::GetFocusRect( SvTreeListEntry* _pEntry, long _nLine ) +tools::Rectangle OCreationList::GetFocusRect( SvTreeListEntry* _pEntry, long _nLine ) { - Rectangle aRect = SvTreeListBox::GetFocusRect( _pEntry, _nLine ); + tools::Rectangle aRect = SvTreeListBox::GetFocusRect( _pEntry, _nLine ); aRect.Left() = 0; // try to let the focus rect start before the bitmap item - this looks better diff --git a/dbaccess/source/ui/app/AppDetailView.hxx b/dbaccess/source/ui/app/AppDetailView.hxx index 31ab9c7bf89b..c9b14279c90c 100644 --- a/dbaccess/source/ui/app/AppDetailView.hxx +++ b/dbaccess/source/ui/app/AppDetailView.hxx @@ -61,7 +61,7 @@ namespace dbaui virtual void MouseButtonDown( const MouseEvent& rMEvt ) override; virtual void MouseButtonUp( const MouseEvent& rMEvt ) override; virtual void KeyInput( const KeyEvent& rKEvt ) override; - virtual void Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) override; + virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) override; virtual void StartDrag( sal_Int8 _nAction, const Point& _rPosPixel ) override; virtual void GetFocus() override; virtual void LoseFocus() override; @@ -72,7 +72,7 @@ namespace dbaui protected: virtual void PreparePaint(vcl::RenderContext& rRenderContext, SvTreeListEntry& rEntry) override; - virtual Rectangle GetFocusRect( SvTreeListEntry* _pEntry, long _nLine ) override; + virtual tools::Rectangle GetFocusRect( SvTreeListEntry* _pEntry, long _nLine ) override; virtual void ModelHasCleared() override; // IMnemonicEntryList diff --git a/dbaccess/source/ui/app/AppSwapWindow.hxx b/dbaccess/source/ui/app/AppSwapWindow.hxx index ac2b9f195909..2ba5b8f2ef74 100644 --- a/dbaccess/source/ui/app/AppSwapWindow.hxx +++ b/dbaccess/source/ui/app/AppSwapWindow.hxx @@ -57,7 +57,7 @@ namespace dbaui sal_Int32 GetEntryCount() const { return m_aIconControl->GetEntryCount(); } SvxIconChoiceCtrlEntry* GetEntry( sal_uLong nPos ) const { return m_aIconControl->GetEntry(nPos); } - Rectangle GetBoundingBox( SvxIconChoiceCtrlEntry* pEntry ) const { return m_aIconControl->GetBoundingBox(pEntry); } + tools::Rectangle GetBoundingBox( SvxIconChoiceCtrlEntry* pEntry ) const { return m_aIconControl->GetBoundingBox(pEntry); } /** automatically creates mnemonics for the icon/texts in our left hand side panel */ diff --git a/dbaccess/source/ui/app/AppView.cxx b/dbaccess/source/ui/app/AppView.cxx index f8831c38ef4b..389a1bb5d628 100644 --- a/dbaccess/source/ui/app/AppView.cxx +++ b/dbaccess/source/ui/app/AppView.cxx @@ -240,7 +240,7 @@ void OApplicationView::DataChanged( const DataChangedEvent& rDCEvt ) } } -void OApplicationView::resizeDocumentView(Rectangle& _rPlayground) +void OApplicationView::resizeDocumentView(tools::Rectangle& _rPlayground) { if ( m_pWin && !_rPlayground.IsEmpty() ) { diff --git a/dbaccess/source/ui/app/AppView.hxx b/dbaccess/source/ui/app/AppView.hxx index 289f8c59af38..cc34525ae665 100644 --- a/dbaccess/source/ui/app/AppView.hxx +++ b/dbaccess/source/ui/app/AppView.hxx @@ -91,7 +91,7 @@ namespace dbaui protected: // return the Rectangle where I can paint myself - virtual void resizeDocumentView(Rectangle& rRect) override; + virtual void resizeDocumentView(tools::Rectangle& rRect) override; // OEventListenerAdapter virtual void _disposing( const css::lang::EventObject& _rSource ) override; diff --git a/dbaccess/source/ui/browser/brwview.cxx b/dbaccess/source/ui/browser/brwview.cxx index f40bcf13f009..fee1b1ab6932 100644 --- a/dbaccess/source/ui/browser/brwview.cxx +++ b/dbaccess/source/ui/browser/brwview.cxx @@ -186,7 +186,7 @@ void UnoDataBrowserView::hideStatus() Update(); } -void UnoDataBrowserView::resizeDocumentView(Rectangle& _rPlayground) +void UnoDataBrowserView::resizeDocumentView(tools::Rectangle& _rPlayground) { Point aSplitPos; Size aSplitSize; diff --git a/dbaccess/source/ui/browser/dataview.cxx b/dbaccess/source/ui/browser/dataview.cxx index 206d529d071f..e9db894c50e4 100644 --- a/dbaccess/source/ui/browser/dataview.cxx +++ b/dbaccess/source/ui/browser/dataview.cxx @@ -71,11 +71,11 @@ namespace dbaui vcl::Window::dispose(); } - void ODataView::resizeDocumentView( Rectangle& /*_rPlayground*/ ) + void ODataView::resizeDocumentView( tools::Rectangle& /*_rPlayground*/ ) { } - void ODataView::Paint(vcl::RenderContext& rRenderContext, const Rectangle& _rRect) + void ODataView::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& _rRect) { // draw the background { @@ -90,9 +90,9 @@ namespace dbaui Window::Paint(rRenderContext, _rRect); } - void ODataView::resizeAll( const Rectangle& _rPlayground ) + void ODataView::resizeAll( const tools::Rectangle& _rPlayground ) { - Rectangle aPlayground( _rPlayground ); + tools::Rectangle aPlayground( _rPlayground ); // position the separator const Size aSeparatorSize( aPlayground.GetWidth(), 2 ); @@ -106,7 +106,7 @@ namespace dbaui void ODataView::Resize() { Window::Resize(); - resizeAll( Rectangle( Point( 0, 0), GetSizePixel() ) ); + resizeAll( tools::Rectangle( Point( 0, 0), GetSizePixel() ) ); } bool ODataView::PreNotify( NotifyEvent& _rNEvt ) { diff --git a/dbaccess/source/ui/browser/sbagrid.cxx b/dbaccess/source/ui/browser/sbagrid.cxx index 41832fcd5992..bd8dbae2c479 100644 --- a/dbaccess/source/ui/browser/sbagrid.cxx +++ b/dbaccess/source/ui/browser/sbagrid.cxx @@ -597,7 +597,7 @@ void SbaGridHeader::ImplStartColumnDrag(sal_Int8 _nAction, const Point& _rMouseP bool bResizingCol = false; if (HEADERBAR_ITEM_NOTFOUND != nId) { - Rectangle aColRect = GetItemRect(nId); + tools::Rectangle aColRect = GetItemRect(nId); aColRect.Left() += nId ? 3 : 0; // the handle col (nId == 0) does not have a left margin for resizing aColRect.Right() -= 3; bResizingCol = !aColRect.IsInside(_rMousePos); @@ -1265,7 +1265,7 @@ sal_Int8 SbaGridControl::AcceptDrop( const BrowserAcceptDropEvent& rEvt ) // no valid cell under the mouse cursor break; - Rectangle aRect = GetCellRect(nRow, nCol, false); + tools::Rectangle aRect = GetCellRect(nRow, nCol, false); if (!aRect.IsInside(rEvt.maPosPixel)) // not dropped within a cell (a cell isn't as wide as the column - the are small spaces) break; diff --git a/dbaccess/source/ui/control/RelationControl.cxx b/dbaccess/source/ui/control/RelationControl.cxx index f996db591258..39ada9ecf47e 100644 --- a/dbaccess/source/ui/control/RelationControl.cxx +++ b/dbaccess/source/ui/control/RelationControl.cxx @@ -112,7 +112,7 @@ namespace dbaui using ORelationControl_Base::Init; virtual void InitController( ::svt::CellControllerRef& rController, long nRow, sal_uInt16 nCol ) override; virtual ::svt::CellController* GetController( long nRow, sal_uInt16 nCol ) override; - virtual void PaintCell( OutputDevice& rDev, const Rectangle& rRect, sal_uInt16 nColId ) const override; + virtual void PaintCell( OutputDevice& rDev, const tools::Rectangle& rRect, sal_uInt16 nColId ) const override; virtual bool SeekRow( long nRow ) override; virtual bool SaveModified() override; virtual OUString GetCellText( long nRow, sal_uInt16 nColId ) const override; @@ -335,7 +335,7 @@ namespace dbaui return true; } - void ORelationControl::PaintCell( OutputDevice& rDev, const Rectangle& rRect, sal_uInt16 nColumnId ) const + void ORelationControl::PaintCell( OutputDevice& rDev, const tools::Rectangle& rRect, sal_uInt16 nColumnId ) const { OUString aText = GetCellText( m_nDataPos, nColumnId ); diff --git a/dbaccess/source/ui/control/ScrollHelper.cxx b/dbaccess/source/ui/control/ScrollHelper.cxx index 03bcdcb879a7..fb3ae70035c5 100644 --- a/dbaccess/source/ui/control/ScrollHelper.cxx +++ b/dbaccess/source/ui/control/ScrollHelper.cxx @@ -34,7 +34,7 @@ namespace dbaui void OScrollHelper::scroll(const Point& _rPoint, const Size& _rOutputSize) { // Scrolling Areas - Rectangle aScrollArea( Point(0, _rOutputSize.Height() - LISTBOX_SCROLLING_AREA), + tools::Rectangle aScrollArea( Point(0, _rOutputSize.Height() - LISTBOX_SCROLLING_AREA), Size(_rOutputSize.Width(), LISTBOX_SCROLLING_AREA) ); // if pointer in bottom area begin scroll diff --git a/dbaccess/source/ui/control/TableGrantCtrl.cxx b/dbaccess/source/ui/control/TableGrantCtrl.cxx index 58de1f22855a..1e07be29d9ea 100644 --- a/dbaccess/source/ui/control/TableGrantCtrl.cxx +++ b/dbaccess/source/ui/control/TableGrantCtrl.cxx @@ -386,7 +386,7 @@ bool OTableGrantControl::SeekRow( long nRow ) return (nRow <= m_aTableNames.getLength()); } -void OTableGrantControl::PaintCell( OutputDevice& rDev, const Rectangle& rRect, sal_uInt16 nColumnId ) const +void OTableGrantControl::PaintCell( OutputDevice& rDev, const tools::Rectangle& rRect, sal_uInt16 nColumnId ) const { if(nColumnId != COL_TABLE_NAME) diff --git a/dbaccess/source/ui/control/VertSplitView.cxx b/dbaccess/source/ui/control/VertSplitView.cxx index 57a61ecbcb8e..72d93564842f 100644 --- a/dbaccess/source/ui/control/VertSplitView.cxx +++ b/dbaccess/source/ui/control/VertSplitView.cxx @@ -134,7 +134,7 @@ void OSplitterView::Resize() //set the size of the splitter m_pSplitter->SetPosSizePixel( aSplitPos, Size( aPlaygroundSize.Width(), aSplitSize.Height() ) ); - m_pSplitter->SetDragRectPixel( Rectangle(aPlaygroundPos,aPlaygroundSize) ); + m_pSplitter->SetDragRectPixel( tools::Rectangle(aPlaygroundPos,aPlaygroundSize) ); } if ( m_pRight ) diff --git a/dbaccess/source/ui/control/dbtreelistbox.cxx b/dbaccess/source/ui/control/dbtreelistbox.cxx index dc6537b4c3c6..27036b7125c9 100644 --- a/dbaccess/source/ui/control/dbtreelistbox.cxx +++ b/dbaccess/source/ui/control/dbtreelistbox.cxx @@ -295,7 +295,7 @@ void DBTreeListBox::RequestHelp( const HelpEvent& rHEvt ) if ( m_pActionListener->requestQuickHelp( pEntry, sQuickHelpText ) ) { Size aSize( GetOutputSizePixel().Width(), GetEntryHeight() ); - Rectangle aScreenRect( OutputToScreenPixel( GetEntryPosition( pEntry ) ), aSize ); + tools::Rectangle aScreenRect( OutputToScreenPixel( GetEntryPosition( pEntry ) ), aSize ); Help::ShowQuickHelp( this, aScreenRect, sQuickHelpText, QuickHelpFlags::Left | QuickHelpFlags::VCenter ); diff --git a/dbaccess/source/ui/control/marktree.cxx b/dbaccess/source/ui/control/marktree.cxx index 9bcd358b30a9..5f4abcd8261c 100644 --- a/dbaccess/source/ui/control/marktree.cxx +++ b/dbaccess/source/ui/control/marktree.cxx @@ -46,7 +46,7 @@ void OMarkableTreeListBox::dispose() DBTreeListBox::dispose(); } -void OMarkableTreeListBox::Paint(vcl::RenderContext& rRenderContext, const Rectangle& _rRect) +void OMarkableTreeListBox::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& _rRect) { if (!IsEnabled()) { diff --git a/dbaccess/source/ui/control/opendoccontrols.cxx b/dbaccess/source/ui/control/opendoccontrols.cxx index 207e017ad06b..661f6813f4a3 100644 --- a/dbaccess/source/ui/control/opendoccontrols.cxx +++ b/dbaccess/source/ui/control/opendoccontrols.cxx @@ -240,8 +240,8 @@ namespace dbaui sal_Int32 nItemIndex = LISTBOX_ENTRY_NOTFOUND; if ( GetIndexForPoint( aRequestPos, nItemIndex ) != -1 ) { - Rectangle aItemRect( GetBoundingRectangle( nItemIndex ) ); - aItemRect = Rectangle( + tools::Rectangle aItemRect( GetBoundingRectangle( nItemIndex ) ); + aItemRect = tools::Rectangle( OutputToScreenPixel( aItemRect.TopLeft() ), OutputToScreenPixel( aItemRect.BottomRight() ) ); OUString sHelpText = impl_getDocumentAtIndex( nItemIndex, true ).first; diff --git a/dbaccess/source/ui/dlg/indexfieldscontrol.cxx b/dbaccess/source/ui/dlg/indexfieldscontrol.cxx index a7e0ec20ab8c..dfad2d52b031 100644 --- a/dbaccess/source/ui/dlg/indexfieldscontrol.cxx +++ b/dbaccess/source/ui/dlg/indexfieldscontrol.cxx @@ -113,7 +113,7 @@ namespace dbaui return true; } - void IndexFieldsControl::PaintCell( OutputDevice& _rDev, const Rectangle& _rRect, sal_uInt16 _nColumnId ) const + void IndexFieldsControl::PaintCell( OutputDevice& _rDev, const tools::Rectangle& _rRect, sal_uInt16 _nColumnId ) const { Point aPos(_rRect.TopLeft()); aPos.X() += 1; diff --git a/dbaccess/source/ui/dlg/sqlmessage.cxx b/dbaccess/source/ui/dlg/sqlmessage.cxx index 8cd2ee05a6c8..56bed0d40fcd 100644 --- a/dbaccess/source/ui/dlg/sqlmessage.cxx +++ b/dbaccess/source/ui/dlg/sqlmessage.cxx @@ -462,7 +462,7 @@ void OSQLMessageBox::impl_positionControls() m_aTitle->SetText( sPrimary ); m_aTitle->Show(); - Rectangle aPrimaryRect( m_aTitle->GetPosPixel(), m_aTitle->GetSizePixel() ); + tools::Rectangle aPrimaryRect( m_aTitle->GetPosPixel(), m_aTitle->GetSizePixel() ); // secondary text (if applicable) m_aMessage->SetStyle( m_aMessage->GetStyle() | WB_NOLABEL ); @@ -470,7 +470,7 @@ void OSQLMessageBox::impl_positionControls() m_aMessage->SetText( sSecondary ); lcl_positionInAppFont( *this, *m_aMessage.get(), TEXT_POS_X, OUTER_MARGIN + 16 + 3, DIALOG_WIDTH - TEXT_POS_X - 2 * OUTER_MARGIN, 8 ); - Rectangle aSecondaryRect( m_aMessage->GetPosPixel(), m_aMessage->GetSizePixel() ); + tools::Rectangle aSecondaryRect( m_aMessage->GetPosPixel(), m_aMessage->GetSizePixel() ); bool bHaveSecondaryText = !sSecondary.isEmpty(); @@ -487,13 +487,13 @@ void OSQLMessageBox::impl_positionControls() // if there's no secondary text ... if ( !bHaveSecondaryText ) { // then give the primary text as much horizontal space as it needs - Rectangle aSuggestedRect( GetTextRect( aPrimaryRect, sPrimary, DrawTextFlags::WordBreak | DrawTextFlags::MultiLine | DrawTextFlags::Center ) ); + tools::Rectangle aSuggestedRect( GetTextRect( aPrimaryRect, sPrimary, DrawTextFlags::WordBreak | DrawTextFlags::MultiLine | DrawTextFlags::Center ) ); aPrimaryRect.Right() = aPrimaryRect.Left() + aSuggestedRect.GetWidth(); aPrimaryRect.Bottom() = aPrimaryRect.Top() + aSuggestedRect.GetHeight(); // and center it horizontally m_aTitle->SetStyle( ( m_aTitle->GetStyle() & ~WB_LEFT ) | WB_CENTER ); - Rectangle aInfoRect( m_aInfoImage->GetPosPixel(), m_aInfoImage->GetSizePixel() ); + tools::Rectangle aInfoRect( m_aInfoImage->GetPosPixel(), m_aInfoImage->GetSizePixel() ); // also, if it's not as high as the image ... if ( aPrimaryRect.GetHeight() < m_aInfoImage->GetSizePixel().Height() ) { // ... make it fit the image height @@ -511,7 +511,7 @@ void OSQLMessageBox::impl_positionControls() } // adjust dialog size accordingly - const Rectangle& rBottomTextRect( bHaveSecondaryText ? aSecondaryRect : aPrimaryRect ); + const tools::Rectangle& rBottomTextRect( bHaveSecondaryText ? aSecondaryRect : aPrimaryRect ); Size aBorderSize = LogicToPixel( Size( OUTER_MARGIN, OUTER_MARGIN ), MapUnit::MapAppFont ); Size aDialogSize( LogicToPixel( Size( DIALOG_WIDTH, 30 ), MapUnit::MapAppFont ) ); aDialogSize.Height() = rBottomTextRect.Bottom() + aBorderSize.Height(); diff --git a/dbaccess/source/ui/inc/ConnectionLine.hxx b/dbaccess/source/ui/inc/ConnectionLine.hxx index 5ad17084e20e..fffbcc79b02c 100644 --- a/dbaccess/source/ui/inc/ConnectionLine.hxx +++ b/dbaccess/source/ui/inc/ConnectionLine.hxx @@ -52,15 +52,15 @@ namespace dbaui OConnectionLine& operator=( const OConnectionLine& rLine ); - Rectangle GetBoundingRect(); + tools::Rectangle GetBoundingRect(); bool RecalcLine(); void Draw( OutputDevice* pOutDev ); bool CheckHit( const Point& rMousePos ) const; bool IsValid() const; - Rectangle GetSourceTextPos() const; - Rectangle GetDestTextPos() const; + tools::Rectangle GetSourceTextPos() const; + tools::Rectangle GetDestTextPos() const; const OConnectionLineDataRef& GetData() const { return m_pData; } diff --git a/dbaccess/source/ui/inc/JoinDesignView.hxx b/dbaccess/source/ui/inc/JoinDesignView.hxx index 2167cc0a3bcb..c22e549e6116 100644 --- a/dbaccess/source/ui/inc/JoinDesignView.hxx +++ b/dbaccess/source/ui/inc/JoinDesignView.hxx @@ -62,7 +62,7 @@ namespace dbaui OScrollWindowHelper* getScrollHelper() const { return m_pScrollWindow; } protected: // return the Rectangle where I can paint myself - virtual void resizeDocumentView(Rectangle& rRect) override; + virtual void resizeDocumentView(tools::Rectangle& rRect) override; }; } #endif // INCLUDED_DBACCESS_SOURCE_UI_INC_JOINDESIGNVIEW_HXX diff --git a/dbaccess/source/ui/inc/JoinTableView.hxx b/dbaccess/source/ui/inc/JoinTableView.hxx index 5ecceca3577f..a95dead35eb5 100644 --- a/dbaccess/source/ui/inc/JoinTableView.hxx +++ b/dbaccess/source/ui/inc/JoinTableView.hxx @@ -88,8 +88,8 @@ namespace dbaui std::vector<VclPtr<OTableConnection> > m_vTableConnection; Idle m_aDragScrollIdle; - Rectangle m_aDragRect; - Rectangle m_aSizingRect; + tools::Rectangle m_aDragRect; + tools::Rectangle m_aSizingRect; Point m_aDragOffset; Point m_aScrollOffset; Point m_ptPrevDraggingPos; @@ -128,7 +128,7 @@ namespace dbaui ScrollBar& GetVScrollBar() { return static_cast<OScrollWindowHelper*>(GetParent())->GetVScrollBar(); } DECL_LINK( ScrollHdl, ScrollBar*, void ); - void DrawConnections(vcl::RenderContext& rRenderContext, const Rectangle& rRect); + void DrawConnections(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect); void InvalidateConnections(); void BeginChildMove( OTableWindow* pTabWin, const Point& rMousePos ); @@ -270,7 +270,7 @@ namespace dbaui virtual void MouseButtonUp( const MouseEvent& rEvt ) override; virtual void MouseButtonDown( const MouseEvent& rEvt ) override; virtual void Tracking( const TrackingEvent& rTEvt ) override; - virtual void Paint( vcl::RenderContext& rRenderContext, const Rectangle& rRect ) override; + virtual void Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect ) override; virtual void ConnDoubleClicked(VclPtr<OTableConnection>& rConnection); void SetDefaultTabWinPosSize( OTableWindow* pTabWin ); virtual void DataChanged( const DataChangedEvent& rDCEvt ) override; diff --git a/dbaccess/source/ui/inc/QueryDesignView.hxx b/dbaccess/source/ui/inc/QueryDesignView.hxx index d6360ca4442b..493ea9296f68 100644 --- a/dbaccess/source/ui/inc/QueryDesignView.hxx +++ b/dbaccess/source/ui/inc/QueryDesignView.hxx @@ -144,7 +144,7 @@ namespace dbaui ,OTableFieldDescRef& aInfo); protected: // return the Rectangle where I can paint myself - virtual void resizeDocumentView(Rectangle& rRect) override; + virtual void resizeDocumentView(tools::Rectangle& rRect) override; DECL_LINK( SplitHdl, Splitter*, void ); private: diff --git a/dbaccess/source/ui/inc/TableConnection.hxx b/dbaccess/source/ui/inc/TableConnection.hxx index e5de1f31d0f0..af2e82ccc50e 100644 --- a/dbaccess/source/ui/inc/TableConnection.hxx +++ b/dbaccess/source/ui/inc/TableConnection.hxx @@ -26,7 +26,7 @@ #include "TableConnectionData.hxx" class Point; -class Rectangle; +namespace tools { class Rectangle; } namespace dbaui { @@ -86,12 +86,12 @@ namespace dbaui return (_pTable == GetSourceWin() || _pTable == GetDestWin()); } - Rectangle GetBoundingRect() const; + tools::Rectangle GetBoundingRect() const; const TTableConnectionData::value_type& GetData() const { return m_pData; } const std::vector<OConnectionLine*>& GetConnLineList() const { return m_vConnLine; } OJoinTableView* GetParent() const { return m_pParent; } - virtual void Draw(vcl::RenderContext& rRenderContext, const Rectangle& rRect); + virtual void Draw(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect); using Window::Draw; virtual css::uno::Reference< css::accessibility::XAccessible > CreateAccessible() override; }; diff --git a/dbaccess/source/ui/inc/TableDesignView.hxx b/dbaccess/source/ui/inc/TableDesignView.hxx index 0d73d19078f1..6f9dd87af9e7 100644 --- a/dbaccess/source/ui/inc/TableDesignView.hxx +++ b/dbaccess/source/ui/inc/TableDesignView.hxx @@ -70,7 +70,7 @@ namespace dbaui protected: // return the Rectangle where I can paint myself - virtual void resizeDocumentView(Rectangle& rRect) override; + virtual void resizeDocumentView(tools::Rectangle& rRect) override; public: OTableDesignView( vcl::Window* pParent, diff --git a/dbaccess/source/ui/inc/TableGrantCtrl.hxx b/dbaccess/source/ui/inc/TableGrantCtrl.hxx index ddfd05e8c979..ed0fd74deb74 100644 --- a/dbaccess/source/ui/inc/TableGrantCtrl.hxx +++ b/dbaccess/source/ui/inc/TableGrantCtrl.hxx @@ -86,7 +86,7 @@ protected: virtual bool IsTabAllowed(bool bForward) const override; virtual void InitController( ::svt::CellControllerRef& rController, long nRow, sal_uInt16 nCol ) override; virtual ::svt::CellController* GetController( long nRow, sal_uInt16 nCol ) override; - virtual void PaintCell( OutputDevice& rDev, const Rectangle& rRect, sal_uInt16 nColId ) const override; + virtual void PaintCell( OutputDevice& rDev, const tools::Rectangle& rRect, sal_uInt16 nColId ) const override; virtual bool SeekRow( long nRow ) override; virtual bool SaveModified() override; virtual OUString GetCellText( long nRow, sal_uInt16 nColId ) const override; diff --git a/dbaccess/source/ui/inc/TableWindow.hxx b/dbaccess/source/ui/inc/TableWindow.hxx index 205c5f298ff3..5acc6b872f80 100644 --- a/dbaccess/source/ui/inc/TableWindow.hxx +++ b/dbaccess/source/ui/inc/TableWindow.hxx @@ -83,7 +83,7 @@ namespace dbaui protected: 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 MouseMove( const MouseEvent& rEvt ) override; virtual void MouseButtonDown( const MouseEvent& rEvt ) override; virtual void DataChanged( const DataChangedEvent& rDCEvt ) override; @@ -172,7 +172,7 @@ namespace dbaui /** returns the new sizing */ - Rectangle getSizingRect(const Point& _rPos,const Size& _rOutputSize) const; + tools::Rectangle getSizingRect(const Point& _rPos,const Size& _rOutputSize) const; // window override virtual void StateChanged( StateChangedType nStateChange ) override; diff --git a/dbaccess/source/ui/inc/brwview.hxx b/dbaccess/source/ui/inc/brwview.hxx index ad9618f71b0b..5b51cf707a1a 100644 --- a/dbaccess/source/ui/inc/brwview.hxx +++ b/dbaccess/source/ui/inc/brwview.hxx @@ -84,7 +84,7 @@ namespace dbaui protected: virtual bool PreNotify( NotifyEvent& rNEvt ) override; virtual void GetFocus() override; - virtual void resizeDocumentView(Rectangle& rRect) override; + virtual void resizeDocumentView(tools::Rectangle& rRect) override; virtual void _disposing( const css::lang::EventObject& _rSource ) override; private: diff --git a/dbaccess/source/ui/inc/indexfieldscontrol.hxx b/dbaccess/source/ui/inc/indexfieldscontrol.hxx index 3ddeca497062..0fcfc4d8c0d3 100644 --- a/dbaccess/source/ui/inc/indexfieldscontrol.hxx +++ b/dbaccess/source/ui/inc/indexfieldscontrol.hxx @@ -72,7 +72,7 @@ namespace dbaui protected: // EditBrowseBox overridables - virtual void PaintCell( OutputDevice& _rDev, const Rectangle& _rRect, sal_uInt16 _nColumnId ) const override; + virtual void PaintCell( OutputDevice& _rDev, const tools::Rectangle& _rRect, sal_uInt16 _nColumnId ) const override; virtual bool SeekRow(long nRow) override; virtual sal_uInt32 GetTotalCellWidth(long nRow, sal_uInt16 nColId) override; virtual bool IsTabAllowed(bool bForward) const override; diff --git a/dbaccess/source/ui/inc/marktree.hxx b/dbaccess/source/ui/inc/marktree.hxx index d10e461de4a1..c132bd1ec8c3 100644 --- a/dbaccess/source/ui/inc/marktree.hxx +++ b/dbaccess/source/ui/inc/marktree.hxx @@ -50,7 +50,7 @@ public: void SetCheckHandler(const Link<void*,void>& _rHdl) { m_aCheckButtonHandler = _rHdl; } protected: - virtual void Paint(vcl::RenderContext& rRenderContext, const Rectangle& _rRect) override; + virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& _rRect) override; virtual void checkedButton_noBroadcast(SvTreeListEntry* _pEntry); SvButtonState implDetermineState(SvTreeListEntry* _pEntry); diff --git a/dbaccess/source/ui/inc/querycontainerwindow.hxx b/dbaccess/source/ui/inc/querycontainerwindow.hxx index c4aa690c4891..9cd55dccdf48 100644 --- a/dbaccess/source/ui/inc/querycontainerwindow.hxx +++ b/dbaccess/source/ui/inc/querycontainerwindow.hxx @@ -93,10 +93,10 @@ namespace dbaui protected: // re-arrange the controls belonging to the document itself - virtual void resizeAll( const Rectangle& _rPlayground ) override; + virtual void resizeAll( const tools::Rectangle& _rPlayground ) override; // arrange derived classes controls in the rectangle given - virtual void resizeDocumentView(Rectangle& _rPlayground) override; + virtual void resizeDocumentView(tools::Rectangle& _rPlayground) override; }; // end of temp classes diff --git a/dbaccess/source/ui/querydesign/ConnectionLine.cxx b/dbaccess/source/ui/querydesign/ConnectionLine.cxx index a14d86e50c7d..8745e1c67714 100644 --- a/dbaccess/source/ui/querydesign/ConnectionLine.cxx +++ b/dbaccess/source/ui/querydesign/ConnectionLine.cxx @@ -38,21 +38,21 @@ namespace @param _rBase the base point @param _aVector the vector which will be added */ - inline Rectangle calcRect(const Point& _rBase,const Point& _aVector) + inline tools::Rectangle calcRect(const Point& _rBase,const Point& _aVector) { - return Rectangle( _rBase - _aVector, _rBase + _aVector ); + return tools::Rectangle( _rBase - _aVector, _rBase + _aVector ); } /** GetTextPos calculate the rectangle for the connection to be drawn @param _pWin the table window where to draw it @param _aConnPos the connection point @param _aDescrLinePos the description line pos */ - Rectangle GetTextPos(const OTableWindow* _pWin, const Point& _aConnPos,const Point& _aDescrLinePos) + tools::Rectangle GetTextPos(const OTableWindow* _pWin, const Point& _aConnPos,const Point& _aDescrLinePos) { VclPtr<OTableWindowListBox> pListBox = _pWin ? _pWin->GetListBox() : nullptr; OSL_ENSURE(_pWin && pListBox, "OConnectionLine::GetSourceTextPos : invalid call !"); - Rectangle aReturn; + tools::Rectangle aReturn; if ( pListBox ) { const long nRowHeight = pListBox->GetEntryHeight(); @@ -145,10 +145,10 @@ OConnectionLine& OConnectionLine::operator=( const OConnectionLine& rLine ) return *this; } -Rectangle OConnectionLine::GetBoundingRect() +tools::Rectangle OConnectionLine::GetBoundingRect() { // determine surrounding rectangle - Rectangle aBoundingRect( Point(0,0), Point(0,0) ); + tools::Rectangle aBoundingRect( Point(0,0), Point(0,0) ); if( !IsValid() ) return aBoundingRect; @@ -186,7 +186,7 @@ Rectangle OConnectionLine::GetBoundingRect() aBottomRight.X() += DESCRIPT_LINE_WIDTH; } - aBoundingRect = Rectangle( aTopLeft-Point(2,17), aBottomRight+Point(2,2) ); + aBoundingRect = tools::Rectangle( aTopLeft-Point(2,17), aBottomRight+Point(2,2) ); return aBoundingRect; } @@ -323,12 +323,12 @@ bool OConnectionLine::CheckHit( const Point& rMousePos ) const return false; } -Rectangle OConnectionLine::GetSourceTextPos() const +tools::Rectangle OConnectionLine::GetSourceTextPos() const { return GetTextPos(m_pTabConn->GetSourceWin(),m_aSourceConnPos,m_aSourceDescrLinePos); } -Rectangle OConnectionLine::GetDestTextPos() const +tools::Rectangle OConnectionLine::GetDestTextPos() const { return GetTextPos(m_pTabConn->GetDestWin(),m_aDestConnPos,m_aDestDescrLinePos); } diff --git a/dbaccess/source/ui/querydesign/ConnectionLineAccess.cxx b/dbaccess/source/ui/querydesign/ConnectionLineAccess.cxx index 40e54d0b801e..8621f30311f1 100644 --- a/dbaccess/source/ui/querydesign/ConnectionLineAccess.cxx +++ b/dbaccess/source/ui/querydesign/ConnectionLineAccess.cxx @@ -108,7 +108,7 @@ namespace dbaui awt::Rectangle SAL_CALL OConnectionLineAccess::getBounds( ) { ::osl::MutexGuard aGuard( m_aMutex ); - Rectangle aRect(m_pLine ? m_pLine->GetBoundingRect() : Rectangle()); + tools::Rectangle aRect(m_pLine ? m_pLine->GetBoundingRect() : tools::Rectangle()); return awt::Rectangle(aRect.getX(),aRect.getY(),aRect.getWidth(),aRect.getHeight()); } awt::Point SAL_CALL OConnectionLineAccess::getLocation( ) diff --git a/dbaccess/source/ui/querydesign/JoinDesignView.cxx b/dbaccess/source/ui/querydesign/JoinDesignView.cxx index 81564fb9f9bb..f8573dcec78b 100644 --- a/dbaccess/source/ui/querydesign/JoinDesignView.cxx +++ b/dbaccess/source/ui/querydesign/JoinDesignView.cxx @@ -86,7 +86,7 @@ void OJoinDesignView::initialize() { } -void OJoinDesignView::resizeDocumentView(Rectangle& _rPlayground) +void OJoinDesignView::resizeDocumentView(tools::Rectangle& _rPlayground) { m_pScrollWindow->SetPosSizePixel( _rPlayground.TopLeft(), _rPlayground.GetSize() ); diff --git a/dbaccess/source/ui/querydesign/JoinTableView.cxx b/dbaccess/source/ui/querydesign/JoinTableView.cxx index 6f383c341841..0c8fedfc97f9 100644 --- a/dbaccess/source/ui/querydesign/JoinTableView.cxx +++ b/dbaccess/source/ui/querydesign/JoinTableView.cxx @@ -531,7 +531,7 @@ void OJoinTableView::SetDefaultTabWinPosSize( OTableWindow* pTabWin ) aNewPos.Y() = (nRow+1) * TABWIN_SPACING_Y; // determine rectangle for the corresponding line - Rectangle aRowRect( Point(0,0), aOutSize ); + tools::Rectangle aRowRect( Point(0,0), aOutSize ); aRowRect.Top() = nRow * ( TABWIN_SPACING_Y + TABWIN_HEIGHT_STD ); aRowRect.Bottom() = (nRow+1) * ( TABWIN_SPACING_Y + TABWIN_HEIGHT_STD ); @@ -541,7 +541,7 @@ void OJoinTableView::SetDefaultTabWinPosSize( OTableWindow* pTabWin ) for(;aIter != aEnd;++aIter) { OTableWindow* pOtherTabWin = aIter->second; - Rectangle aOtherTabWinRect( pOtherTabWin->GetPosPixel(), pOtherTabWin->GetSizePixel() ); + tools::Rectangle aOtherTabWinRect( pOtherTabWin->GetPosPixel(), pOtherTabWin->GetSizePixel() ); if( ( (aOtherTabWinRect.Top()>aRowRect.Top()) && (aOtherTabWinRect.Top()<aRowRect.Bottom()) ) || @@ -933,7 +933,7 @@ void OJoinTableView::SelectConn(OTableConnection* pConn) } } -void OJoinTableView::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) +void OJoinTableView::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) { DrawConnections(rRenderContext, rRect); } @@ -945,7 +945,7 @@ void OJoinTableView::InvalidateConnections() conn->InvalidateConnection(); } -void OJoinTableView::DrawConnections(vcl::RenderContext& rRenderContext, const Rectangle& rRect) +void OJoinTableView::DrawConnections(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) { // draw Joins for(const auto& connection : m_vTableConnection) @@ -1068,7 +1068,7 @@ void OJoinTableView::ScrollWhileDragging() } // redraw DraggingRect - m_aDragRect = Rectangle(m_ptPrevDraggingPos - m_aDragOffset, m_pDragWin->GetSizePixel()); + m_aDragRect = tools::Rectangle(m_ptPrevDraggingPos - m_aDragOffset, m_pDragWin->GetSizePixel()); Update(); ShowTracking( m_aDragRect, ShowTrackFlags::Small | ShowTrackFlags::TrackWindow ); } diff --git a/dbaccess/source/ui/querydesign/QueryDesignView.cxx b/dbaccess/source/ui/querydesign/QueryDesignView.cxx index fadd63dcd72e..85acecdb4700 100644 --- a/dbaccess/source/ui/querydesign/QueryDesignView.cxx +++ b/dbaccess/source/ui/querydesign/QueryDesignView.cxx @@ -2526,7 +2526,7 @@ void OQueryDesignView::initialize() reset(); } -void OQueryDesignView::resizeDocumentView(Rectangle& _rPlayground) +void OQueryDesignView::resizeDocumentView(tools::Rectangle& _rPlayground) { Point aPlaygroundPos( _rPlayground.TopLeft() ); Size aPlaygroundSize( _rPlayground.GetSize() ); diff --git a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx index 27222c9f7fd3..496ced84a687 100644 --- a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx +++ b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx @@ -1206,7 +1206,7 @@ bool OSelectionBrowseBox::SeekRow(long nRow) return nRow < m_nVisibleCount; } -void OSelectionBrowseBox::PaintCell(OutputDevice& rDev, const Rectangle& rRect, sal_uInt16 nColumnId) const +void OSelectionBrowseBox::PaintCell(OutputDevice& rDev, const tools::Rectangle& rRect, sal_uInt16 nColumnId) const { rDev.SetClipRegion(vcl::Region(rRect)); @@ -1227,9 +1227,9 @@ void OSelectionBrowseBox::PaintCell(OutputDevice& rDev, const Rectangle& rRect, rDev.SetClipRegion( ); } -void OSelectionBrowseBox::PaintStatusCell(OutputDevice& rDev, const Rectangle& rRect) const +void OSelectionBrowseBox::PaintStatusCell(OutputDevice& rDev, const tools::Rectangle& rRect) const { - Rectangle aRect(rRect); + tools::Rectangle aRect(rRect); aRect.TopLeft().Y() -= 2; OUString aLabel(ModuleRes(STR_QUERY_HANDLETEXT)); @@ -1262,7 +1262,7 @@ void OSelectionBrowseBox::RemoveColumn(sal_uInt16 _nColumnId) InsertDataColumn( _nColumnId , OUString(), DEFAULT_SIZE ); // Neuzeichnen - Rectangle aInvalidRect = GetInvalidRect( _nColumnId ); + tools::Rectangle aInvalidRect = GetInvalidRect( _nColumnId ); Invalidate( aInvalidRect ); ActivateCell( nCurrentRow, nCurCol ); @@ -1458,13 +1458,13 @@ void OSelectionBrowseBox::SetColWidth(sal_uInt16 nColId, long nNewWidth) ActivateCell(GetCurRow(), GetCurColumnId()); } -Rectangle OSelectionBrowseBox::GetInvalidRect( sal_uInt16 nColId ) +tools::Rectangle OSelectionBrowseBox::GetInvalidRect( sal_uInt16 nColId ) { // The rectangle is the full output area of the window - Rectangle aInvalidRect( Point(0,0), GetOutputSizePixel() ); + tools::Rectangle aInvalidRect( Point(0,0), GetOutputSizePixel() ); // now update the left side - Rectangle aFieldRect(GetCellRect( 0, nColId )); // used instead of GetFieldRectPixel + tools::Rectangle aFieldRect(GetCellRect( 0, nColId )); // used instead of GetFieldRectPixel aInvalidRect.Left() = aFieldRect.Left(); return aInvalidRect; @@ -1523,7 +1523,7 @@ void OSelectionBrowseBox::InsertColumn(const OTableFieldDescRef& pEntry, sal_uIn SetColWidth(nColumnId,getDesignView()->getColWidth(GetColumnPos(nColumnId)-1)); // redraw - Rectangle aInvalidRect = GetInvalidRect( nColumnId ); + tools::Rectangle aInvalidRect = GetInvalidRect( nColumnId ); Invalidate( aInvalidRect ); ActivateCell( nCurrentRow, nCurCol ); @@ -1916,7 +1916,7 @@ void OSelectionBrowseBox::Command(const CommandEvent& rEvt) sal_uInt16 nSelId = GetColumnId( sal::static_int_cast< sal_uInt16 >( FirstSelectedColumn() ) ); - ::Rectangle aColRect( GetFieldRectPixel( 0, nSelId, false ) ); + ::tools::Rectangle aColRect( GetFieldRectPixel( 0, nSelId, false ) ); aMenuPos = aColRect.TopCenter(); } diff --git a/dbaccess/source/ui/querydesign/SelectionBrowseBox.hxx b/dbaccess/source/ui/querydesign/SelectionBrowseBox.hxx index 8fa74e9b6c49..f4cad626d5f7 100644 --- a/dbaccess/source/ui/querydesign/SelectionBrowseBox.hxx +++ b/dbaccess/source/ui/querydesign/SelectionBrowseBox.hxx @@ -182,8 +182,8 @@ namespace dbaui protected: virtual bool SeekRow( long nRow ) override; - virtual void PaintStatusCell(OutputDevice& rDev, const Rectangle& rRect) const override; - virtual void PaintCell(OutputDevice& rDev, const Rectangle& rRect, + virtual void PaintStatusCell(OutputDevice& rDev, const tools::Rectangle& rRect) const override; + virtual void PaintCell(OutputDevice& rDev, const tools::Rectangle& rRect, sal_uInt16 nColumnId ) const override; virtual sal_Int8 AcceptDrop( const BrowserAcceptDropEvent& rEvt ) override; @@ -219,7 +219,7 @@ namespace dbaui // rCol contains the Nummer of the first empty column (in pOTableFieldDescList) void RemoveField( sal_uInt16 nId ); - Rectangle GetInvalidRect( sal_uInt16 nColId ); + tools::Rectangle GetInvalidRect( sal_uInt16 nColId ); long GetRealRow(long nRow) const; long GetBrowseRow(long nRowId) const; bool GetFunctionName(sal_uInt32 _nFunctionTokenId, OUString& rFkt); diff --git a/dbaccess/source/ui/querydesign/TableConnection.cxx b/dbaccess/source/ui/querydesign/TableConnection.cxx index 606e9f10ba9b..d8c9859f8d0a 100644 --- a/dbaccess/source/ui/querydesign/TableConnection.cxx +++ b/dbaccess/source/ui/querydesign/TableConnection.cxx @@ -157,7 +157,7 @@ namespace dbaui void OTableConnection::InvalidateConnection() { - Rectangle rcBounding = GetBoundingRect(); + tools::Rectangle rcBounding = GetBoundingRect(); rcBounding.Bottom() += 1; rcBounding.Right() += 1; // I believe Invalidate and Draw(Rectangle) do not behave consistent: in any case it @@ -167,11 +167,11 @@ namespace dbaui m_pParent->Invalidate( rcBounding, InvalidateFlags::NoChildren ); } - Rectangle OTableConnection::GetBoundingRect() const + tools::Rectangle OTableConnection::GetBoundingRect() const { // determine all lines of the surrounding rectangle - Rectangle aBoundingRect( Point(0,0), Point(0,0) ); - Rectangle aTempRect; + tools::Rectangle aBoundingRect( Point(0,0), Point(0,0) ); + tools::Rectangle aTempRect; std::vector<OConnectionLine*>::const_iterator aEnd = m_vConnLine.end(); for(std::vector<OConnectionLine*>::const_iterator aIter = m_vConnLine.begin();aIter != aEnd;++aIter) { @@ -190,7 +190,7 @@ namespace dbaui return aBoundingRect; } - void OTableConnection::Draw(vcl::RenderContext& rRenderContext, const Rectangle& /*rRect*/) + void OTableConnection::Draw(vcl::RenderContext& rRenderContext, const tools::Rectangle& /*rRect*/) { // Draw line for( const auto& pLine : m_vConnLine ) diff --git a/dbaccess/source/ui/querydesign/TableWindow.cxx b/dbaccess/source/ui/querydesign/TableWindow.cxx index aad254bdb8b7..fc18fe0e166a 100644 --- a/dbaccess/source/ui/querydesign/TableWindow.cxx +++ b/dbaccess/source/ui/querydesign/TableWindow.cxx @@ -64,7 +64,7 @@ namespace DatabaseObject = css::sdb::application::DatabaseObject; namespace { -void Draw3DBorder(vcl::RenderContext& rRenderContext, const Rectangle& rRect) +void Draw3DBorder(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) { // Use the System Style-Settings for my colours const StyleSettings& aSystemStyle = Application::GetSettings().GetStyleSettings(); @@ -328,16 +328,16 @@ void OTableWindow::DataChanged(const DataChangedEvent& rDCEvt) } } -void OTableWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) +void OTableWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) { - Rectangle aRect(Point(0,0), GetOutputSizePixel()); + tools::Rectangle aRect(Point(0,0), GetOutputSizePixel()); Window::Paint(rRenderContext, rRect); Draw3DBorder(rRenderContext, aRect); } -Rectangle OTableWindow::getSizingRect(const Point& _rPos,const Size& _rOutputSize) const +tools::Rectangle OTableWindow::getSizingRect(const Point& _rPos,const Size& _rOutputSize) const { - Rectangle aSizingRect = Rectangle( GetPosPixel(), GetSizePixel() ); + tools::Rectangle aSizingRect = tools::Rectangle( GetPosPixel(), GetSizePixel() ); if( m_nSizingFlags & SizingFlags::Top ) { diff --git a/dbaccess/source/ui/querydesign/TableWindowAccess.cxx b/dbaccess/source/ui/querydesign/TableWindowAccess.cxx index 0a0c98cc3357..1998abcf86c7 100644 --- a/dbaccess/source/ui/querydesign/TableWindowAccess.cxx +++ b/dbaccess/source/ui/querydesign/TableWindowAccess.cxx @@ -152,7 +152,7 @@ namespace dbaui if(m_pTable && !m_pTable->IsDisposed()) { Point aPoint(_aPoint.X,_aPoint.Y); - Rectangle aRect(m_pTable->GetDesktopRectPixel()); + tools::Rectangle aRect(m_pTable->GetDesktopRectPixel()); if( aRect.IsInside(aPoint) ) aRet = this; else if( m_pTable->GetListBox()->GetDesktopRectPixel().IsInside(aPoint)) diff --git a/dbaccess/source/ui/querydesign/TableWindowListBox.cxx b/dbaccess/source/ui/querydesign/TableWindowListBox.cxx index e45cccad0525..82aefa64fa4f 100644 --- a/dbaccess/source/ui/querydesign/TableWindowListBox.cxx +++ b/dbaccess/source/ui/querydesign/TableWindowListBox.cxx @@ -233,9 +233,9 @@ sal_Int8 OTableWindowListBox::AcceptDrop( const AcceptDropEvent& _rEvt ) return DND_ACTION_NONE; // Scrolling Areas - Rectangle aBottomScrollArea( Point(0, aOutputSize.Height()-LISTBOX_SCROLLING_AREA), + tools::Rectangle aBottomScrollArea( Point(0, aOutputSize.Height()-LISTBOX_SCROLLING_AREA), Size(aOutputSize.Width(), LISTBOX_SCROLLING_AREA) ); - Rectangle aTopScrollArea( Point(0,0), Size(aOutputSize.Width(), LISTBOX_SCROLLING_AREA) ); + tools::Rectangle aTopScrollArea( Point(0,0), Size(aOutputSize.Width(), LISTBOX_SCROLLING_AREA) ); // scroll up if the pointer is on the upper scroll area if( aBottomScrollArea.IsInside(m_aMousePos) ) diff --git a/dbaccess/source/ui/querydesign/TableWindowTitle.cxx b/dbaccess/source/ui/querydesign/TableWindowTitle.cxx index ac50e2a5aa75..71faa6c0d282 100644 --- a/dbaccess/source/ui/querydesign/TableWindowTitle.cxx +++ b/dbaccess/source/ui/querydesign/TableWindowTitle.cxx @@ -88,7 +88,7 @@ void OTableWindowTitle::RequestHelp( const HelpEvent& rHEvt ) if( !aHelpText.isEmpty()) { // show help - Rectangle aItemRect(Point(0,0),GetSizePixel()); + tools::Rectangle aItemRect(Point(0,0),GetSizePixel()); aItemRect = LogicToPixel( aItemRect ); Point aPt = OutputToScreenPixel( aItemRect.TopLeft() ); aItemRect.Left() = aPt.X(); diff --git a/dbaccess/source/ui/querydesign/querycontainerwindow.cxx b/dbaccess/source/ui/querydesign/querycontainerwindow.cxx index 2118643b32e5..19912ac849d0 100644 --- a/dbaccess/source/ui/querydesign/querycontainerwindow.cxx +++ b/dbaccess/source/ui/querydesign/querycontainerwindow.cxx @@ -88,9 +88,9 @@ namespace dbaui return m_pViewSwitch->forceInitialView(); } - void OQueryContainerWindow::resizeAll( const Rectangle& _rPlayground ) + void OQueryContainerWindow::resizeAll( const tools::Rectangle& _rPlayground ) { - Rectangle aPlayground( _rPlayground ); + tools::Rectangle aPlayground( _rPlayground ); if ( m_pBeamer && m_pBeamer->IsVisible() ) { @@ -120,7 +120,7 @@ namespace dbaui ODataView::resizeAll( aPlayground ); } - void OQueryContainerWindow::resizeDocumentView( Rectangle& _rPlayground ) + void OQueryContainerWindow::resizeDocumentView( tools::Rectangle& _rPlayground ) { m_pViewSwitch->SetPosSizePixel( _rPlayground.TopLeft(), Size( _rPlayground.GetWidth(), _rPlayground.GetHeight() ) ); diff --git a/dbaccess/source/ui/relationdesign/RTableConnection.cxx b/dbaccess/source/ui/relationdesign/RTableConnection.cxx index 6b0468508fda..6b4b1ef74649 100644 --- a/dbaccess/source/ui/relationdesign/RTableConnection.cxx +++ b/dbaccess/source/ui/relationdesign/RTableConnection.cxx @@ -48,7 +48,7 @@ ORelationTableConnection& ORelationTableConnection::operator=( const ORelationTa return *this; } -void ORelationTableConnection::Draw(vcl::RenderContext& rRenderContext, const Rectangle& rRect ) +void ORelationTableConnection::Draw(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect ) { OTableConnection::Draw(rRenderContext, rRect); ORelationTableConnectionData* pData = static_cast< ORelationTableConnectionData* >(GetData().get()); @@ -56,7 +56,7 @@ void ORelationTableConnection::Draw(vcl::RenderContext& rRenderContext, const Re return; // search lines for top line - Rectangle aBoundingRect; + tools::Rectangle aBoundingRect; long nTop = GetBoundingRect().Bottom(); long nTemp; @@ -83,8 +83,8 @@ void ORelationTableConnection::Draw(vcl::RenderContext& rRenderContext, const Re if (!pTopLine) return; - Rectangle aSourcePos = pTopLine->GetSourceTextPos(); - Rectangle aDestPos = pTopLine->GetDestTextPos(); + tools::Rectangle aSourcePos = pTopLine->GetSourceTextPos(); + tools::Rectangle aDestPos = pTopLine->GetDestTextPos(); OUString aSourceText; OUString aDestText; diff --git a/dbaccess/source/ui/relationdesign/RTableConnection.hxx b/dbaccess/source/ui/relationdesign/RTableConnection.hxx index 02eccc775d15..4684b7c26417 100644 --- a/dbaccess/source/ui/relationdesign/RTableConnection.hxx +++ b/dbaccess/source/ui/relationdesign/RTableConnection.hxx @@ -34,7 +34,7 @@ namespace dbaui ORelationTableConnection& operator=( const ORelationTableConnection& rConn ); - virtual void Draw(vcl::RenderContext& rRenderContext, const Rectangle& rRect) override; + virtual void Draw(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) override; using OTableConnection::Draw; }; } diff --git a/dbaccess/source/ui/tabledesign/TEditControl.cxx b/dbaccess/source/ui/tabledesign/TEditControl.cxx index 5895b8376f17..d62b5cbd844c 100644 --- a/dbaccess/source/ui/tabledesign/TEditControl.cxx +++ b/dbaccess/source/ui/tabledesign/TEditControl.cxx @@ -304,7 +304,7 @@ bool OTableEditorCtrl::SeekRow(long _nRow) return SetDataPtr(_nRow); } -void OTableEditorCtrl::PaintCell(OutputDevice& rDev, const Rectangle& rRect, +void OTableEditorCtrl::PaintCell(OutputDevice& rDev, const tools::Rectangle& rRect, sal_uInt16 nColumnId ) const { const OUString aText( GetCellText( m_nCurrentPos, nColumnId )); @@ -1329,13 +1329,13 @@ void OTableEditorCtrl::Command(const CommandEvent& rEvt) sal_uInt16 nSelId = GetColumnId( sal::static_int_cast< sal_uInt16 >( FirstSelectedColumn() ) ); - ::Rectangle aColRect( GetFieldRectPixel( 0, nSelId, false ) ); + ::tools::Rectangle aColRect( GetFieldRectPixel( 0, nSelId, false ) ); aMenuPos = aColRect.TopCenter(); } else if ( GetSelectRowCount() > 0 ) { - ::Rectangle aColRect( GetFieldRectPixel( FirstSelectedRow(), HANDLE_ID ) ); + ::tools::Rectangle aColRect( GetFieldRectPixel( FirstSelectedRow(), HANDLE_ID ) ); aMenuPos = aColRect.TopCenter(); } diff --git a/dbaccess/source/ui/tabledesign/TEditControl.hxx b/dbaccess/source/ui/tabledesign/TEditControl.hxx index 4eb3426b16b7..28bb1acc977e 100644 --- a/dbaccess/source/ui/tabledesign/TEditControl.hxx +++ b/dbaccess/source/ui/tabledesign/TEditControl.hxx @@ -88,7 +88,7 @@ namespace dbaui protected: virtual void Command( const CommandEvent& rEvt ) override; virtual bool SeekRow(long nRow) override; - virtual void PaintCell(OutputDevice& rDev, const Rectangle& rRect, + virtual void PaintCell(OutputDevice& rDev, const tools::Rectangle& rRect, sal_uInt16 nColumnId ) const override; virtual void CursorMoved() override; diff --git a/dbaccess/source/ui/tabledesign/TableDesignView.cxx b/dbaccess/source/ui/tabledesign/TableDesignView.cxx index 05b30b82bcf9..ca3b1ffd6660 100644 --- a/dbaccess/source/ui/tabledesign/TableDesignView.cxx +++ b/dbaccess/source/ui/tabledesign/TableDesignView.cxx @@ -90,7 +90,7 @@ void OTableBorderWindow::Resize() // Verschiebebereich Splitter mittleres Drittel des Outputs long nDragPosY = nOutputHeight/3; long nDragSizeHeight = nOutputHeight/3; - m_aHorzSplitter->SetDragRectPixel( Rectangle(Point(0,nDragPosY), Size(nOutputWidth,nDragSizeHeight) ), this ); + m_aHorzSplitter->SetDragRectPixel( tools::Rectangle(Point(0,nDragPosY), Size(nOutputWidth,nDragSizeHeight) ), this ); if( (nSplitPos < nDragPosY) || (nSplitPos > (nDragPosY+nDragSizeHeight)) ) nSplitPos = nDragPosY+nDragSizeHeight-5; @@ -203,7 +203,7 @@ void OTableDesignView::initialize() GetEditorCtrl()->DisplayData(0); } -void OTableDesignView::resizeDocumentView(Rectangle& _rPlayground) +void OTableDesignView::resizeDocumentView(tools::Rectangle& _rPlayground) { m_pWin->SetPosSizePixel( _rPlayground.TopLeft(), _rPlayground.GetSize() ); diff --git a/dbaccess/source/ui/tabledesign/TableFieldDescWin.cxx b/dbaccess/source/ui/tabledesign/TableFieldDescWin.cxx index d21025f5fd59..cce951ac698b 100644 --- a/dbaccess/source/ui/tabledesign/TableFieldDescWin.cxx +++ b/dbaccess/source/ui/tabledesign/TableFieldDescWin.cxx @@ -102,7 +102,7 @@ void OTableFieldDescWin::SaveData( OFieldDescription* pFieldDescr ) getGenPage()->SaveData( pFieldDescr ); } -void OTableFieldDescWin::Paint(vcl::RenderContext& rRenderContext, const Rectangle& /*rRect*/) +void OTableFieldDescWin::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& /*rRect*/) { // 3D-line at the top window border const StyleSettings& rStyleSettings = rRenderContext.GetSettings().GetStyleSettings(); diff --git a/dbaccess/source/ui/tabledesign/TableFieldDescWin.hxx b/dbaccess/source/ui/tabledesign/TableFieldDescWin.hxx index c2878e947fc7..addd546728ac 100644 --- a/dbaccess/source/ui/tabledesign/TableFieldDescWin.hxx +++ b/dbaccess/source/ui/tabledesign/TableFieldDescWin.hxx @@ -50,7 +50,7 @@ namespace dbaui protected: 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; public: explicit OTableFieldDescWin( vcl::Window* pParent); diff --git a/desktop/qa/desktop_lib/test_desktop_lib.cxx b/desktop/qa/desktop_lib/test_desktop_lib.cxx index aac2b3ad078b..2b767a7c2b47 100644 --- a/desktop/qa/desktop_lib/test_desktop_lib.cxx +++ b/desktop/qa/desktop_lib/test_desktop_lib.cxx @@ -1693,7 +1693,7 @@ class ViewCallback { public: bool m_bTilesInvalidated; - Rectangle m_aOwnCursor; + tools::Rectangle m_aOwnCursor; boost::property_tree::ptree m_aCommentCallbackResult; ViewCallback() @@ -1802,7 +1802,7 @@ void DesktopLOKTest::testWriterCommentInsertCursor() pDocument->m_pDocumentClass->postKeyEvent(pDocument, LOK_KEYEVENT_KEYINPUT, 'x', 0); pDocument->m_pDocumentClass->postKeyEvent(pDocument, LOK_KEYEVENT_KEYUP, 'x', 0); Scheduler::ProcessEventsToIdle(); - Rectangle aBodyCursor = aView2.m_aOwnCursor; + tools::Rectangle aBodyCursor = aView2.m_aOwnCursor; // Now insert a comment and make sure that the comment's cursor is shown, // not the body text's one. diff --git a/desktop/source/deployment/gui/dp_gui_extlistbox.cxx b/desktop/source/deployment/gui/dp_gui_extlistbox.cxx index 44fa43e614b6..2e8e8094932c 100644 --- a/desktop/source/deployment/gui/dp_gui_extlistbox.cxx +++ b/desktop/source/deployment/gui/dp_gui_extlistbox.cxx @@ -310,7 +310,7 @@ void ExtensionBox_Impl::CalcActiveHeight( const long nPos ) aText += "\n"; aText += m_vEntries[ nPos ]->m_sDescription; - Rectangle aRect = GetTextRect( Rectangle( Point(), aSize ), aText, + tools::Rectangle aRect = GetTextRect( tools::Rectangle( Point(), aSize ), aText, DrawTextFlags::MultiLine | DrawTextFlags::WordBreak ); aTextHeight += aRect.GetHeight(); @@ -323,7 +323,7 @@ void ExtensionBox_Impl::CalcActiveHeight( const long nPos ) m_nActiveHeight = aTextHeight + 2; } -Rectangle ExtensionBox_Impl::GetEntryRect( const long nPos ) const +tools::Rectangle ExtensionBox_Impl::GetEntryRect( const long nPos ) const { const ::osl::MutexGuard aGuard( m_entriesMutex ); @@ -341,7 +341,7 @@ Rectangle ExtensionBox_Impl::GetEntryRect( const long nPos ) const if ( m_bHasActive && ( nPos < m_nActive ) ) aPos.Y() += m_nActiveHeight - m_nStdHeight; - return Rectangle( aPos, aSize ); + return tools::Rectangle( aPos, aSize ); } @@ -419,7 +419,7 @@ void ExtensionBox_Impl::selectEntry( const long nPos ) } -void ExtensionBox_Impl::DrawRow(vcl::RenderContext& rRenderContext, const Rectangle& rRect, const TEntry_Impl& rEntry) +void ExtensionBox_Impl::DrawRow(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect, const TEntry_Impl& rEntry) { const StyleSettings& rStyleSettings = rRenderContext.GetSettings().GetStyleSettings(); @@ -537,7 +537,7 @@ void ExtensionBox_Impl::DrawRow(vcl::RenderContext& rRenderContext, const Rectan if (rEntry->m_bHasButtons) nExtraHeight = m_nExtraHeight; - rRenderContext.DrawText(Rectangle(aPos.X(), aPos.Y(), rRect.Right(), rRect.Bottom() - nExtraHeight), + rRenderContext.DrawText(tools::Rectangle(aPos.X(), aPos.Y(), rRect.Right(), rRect.Bottom() - nExtraHeight), sDescription, DrawTextFlags::MultiLine | DrawTextFlags::WordBreak ); } else @@ -587,7 +587,7 @@ void ExtensionBox_Impl::RecalcAll() if ( m_bHasActive ) { - Rectangle aEntryRect = GetEntryRect( m_nActive ); + tools::Rectangle aEntryRect = GetEntryRect( m_nActive ); if ( m_bAdjustActive ) { @@ -674,7 +674,7 @@ bool ExtensionBox_Impl::HandleCursorKey( sal_uInt16 nKeyCode ) } -void ExtensionBox_Impl::Paint(vcl::RenderContext& rRenderContext, const Rectangle& /*rPaintRect*/) +void ExtensionBox_Impl::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& /*rPaintRect*/) { if ( !m_bInDelete ) DeleteRemoved(); @@ -694,7 +694,7 @@ void ExtensionBox_Impl::Paint(vcl::RenderContext& rRenderContext, const Rectangl for (ITER iIndex = m_vEntries.begin(); iIndex < m_vEntries.end(); ++iIndex) { aSize.Height() = (*iIndex)->m_bActive ? m_nActiveHeight : m_nStdHeight; - Rectangle aEntryRect( aStart, aSize ); + tools::Rectangle aEntryRect( aStart, aSize ); DrawRow(rRenderContext, aEntryRect, *iIndex); aStart.Y() += aSize.Height(); } @@ -1170,7 +1170,7 @@ void ExtensionBox_Impl::DoScroll( long nDelta ) m_nTopIndex += nDelta; Point aNewSBPt( m_pScrollBar->GetPosPixel() ); - Rectangle aScrRect( Point(), GetOutputSizePixel() ); + tools::Rectangle aScrRect( Point(), GetOutputSizePixel() ); aScrRect.Right() -= m_pScrollBar->GetSizePixel().Width(); Scroll( 0, -nDelta, aScrRect ); diff --git a/desktop/source/deployment/gui/dp_gui_extlistbox.hxx b/desktop/source/deployment/gui/dp_gui_extlistbox.hxx index 1f60db9e7cfa..0f61526cb97a 100644 --- a/desktop/source/deployment/gui/dp_gui_extlistbox.hxx +++ b/desktop/source/deployment/gui/dp_gui_extlistbox.hxx @@ -153,7 +153,7 @@ class ExtensionBox_Impl : public ::svt::IExtensionListBox void CalcActiveHeight( const long nPos ); long GetTotalHeight() const; void SetupScrollBar(); - void DrawRow(vcl::RenderContext& rRenderContext, const Rectangle& rRect, const TEntry_Impl& rEntry); + void DrawRow(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect, const TEntry_Impl& rEntry); bool HandleCursorKey( sal_uInt16 nKeyCode ); bool FindEntryPos( const TEntry_Impl& rEntry, long nStart, long nEnd, long &nFound ); void DeleteRemoved(); @@ -168,14 +168,14 @@ public: virtual void dispose() override; virtual void MouseButtonDown( const MouseEvent& rMEvt ) override; - virtual void Paint( vcl::RenderContext& rRenderContext, const Rectangle &rPaintRect ) override; + virtual void Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle &rPaintRect ) override; virtual void Resize() override; virtual bool EventNotify( NotifyEvent& rNEvt ) override; virtual Size GetOptimalSize() const override; TEntry_Impl GetEntryData( long nPos ) { return m_vEntries[ nPos ]; } long GetEntryCount() { return (long) m_vEntries.size(); } - Rectangle GetEntryRect( const long nPos ) const; + tools::Rectangle GetEntryRect( const long nPos ) const; bool HasActive() { return m_bHasActive; } long PointToPos( const Point& rPos ); void DoScroll( long nDelta ); diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 1a01253e70fe..e7aa186873f0 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -346,7 +346,7 @@ namespace { /// Represents an invalidated rectangle inside a given document part. struct RectangleAndPart { - Rectangle m_aRectangle; + tools::Rectangle m_aRectangle; int m_nPart; RectangleAndPart() @@ -382,7 +382,7 @@ struct RectangleAndPart RectangleAndPart aRet; if (rPayload.compare(0, 5, "EMPTY") == 0) // payload starts with "EMPTY" { - aRet.m_aRectangle = Rectangle(0, 0, SfxLokHelper::MaxTwips, SfxLokHelper::MaxTwips); + aRet.m_aRectangle = tools::Rectangle(0, 0, SfxLokHelper::MaxTwips, SfxLokHelper::MaxTwips); if (comphelper::LibreOfficeKit::isPartInInvalidation()) aRet.m_nPart = std::stol(rPayload.substr(6)); @@ -420,7 +420,7 @@ struct RectangleAndPart if (nWidth > 0 && nHeight > 0) { - aRet.m_aRectangle = Rectangle(nLeft, nTop, nLeft + nWidth, nTop + nHeight); + aRet.m_aRectangle = tools::Rectangle(nLeft, nTop, nLeft + nWidth, nTop + nHeight); } } // else leave empty rect. @@ -940,7 +940,7 @@ void CallbackFlushHandler::queue(const int type, const char* data) } else { - const Rectangle rcOverlap = rcNew.m_aRectangle.GetIntersection(rcOld.m_aRectangle); + const tools::Rectangle rcOverlap = rcNew.m_aRectangle.GetIntersection(rcOld.m_aRectangle); const bool bOverlap = !rcOverlap.IsEmpty(); SAL_WARN("lok", "Merging " << rcNew.toString() << " & " << rcOld.toString() << " => " << rcOverlap.toString() << " Overlap: " << bOverlap); @@ -1846,7 +1846,7 @@ static void doc_paintTile(LibreOfficeKitDocument* pThis, if (bDebug) { // Draw a small red rectangle in the top left corner so that it's easy to see where a new tile begins. - Rectangle aRect(0, 0, 5, 5); + tools::Rectangle aRect(0, 0, 5, 5); aRect = pDevice->PixelToLogic(aRect); pDevice->Push(PushFlags::FILLCOLOR | PushFlags::LINECOLOR); pDevice->SetFillColor(COL_LIGHTRED); @@ -2675,7 +2675,7 @@ static char* doc_getCommandValues(LibreOfficeKitDocument* pThis, const char* pCo return nullptr; } - Rectangle aRectangle; + tools::Rectangle aRectangle; if (aCommand.getLength() > aViewRowColumnHeaders.getLength()) { // Command has parameters. @@ -2710,7 +2710,7 @@ static char* doc_getCommandValues(LibreOfficeKitDocument* pThis, const char* pCo nHeight = aValue.toInt32(); } while (nParamIndex >= 0); - aRectangle = Rectangle(nX, nY, nX + nWidth, nY + nHeight); + aRectangle = tools::Rectangle(nX, nY, nX + nWidth, nY + nHeight); } OUString aHeaders = pDoc->getRowColumnHeaders(aRectangle); @@ -2808,7 +2808,7 @@ static void doc_setClientVisibleArea(LibreOfficeKitDocument* pThis, int nX, int return; } - Rectangle aRectangle(Point(nX, nY), Size(nWidth, nHeight)); + tools::Rectangle aRectangle(Point(nX, nY), Size(nWidth, nHeight)); pDoc->setClientVisibleArea(aRectangle); } @@ -2885,7 +2885,7 @@ unsigned char* doc_renderFont(LibreOfficeKitDocument* /*pThis*/, auto aDevice( VclPtr<VirtualDevice>::Create( nullptr, Size(1, 1), DeviceFormat::DEFAULT)); - ::Rectangle aRect; + ::tools::Rectangle aRect; vcl::Font aFont(rFontMetric); aFont.SetFontSize(Size(0, 25)); aDevice->SetFont(aFont); diff --git a/desktop/source/splash/splash.cxx b/desktop/source/splash/splash.cxx index 7b3bb7930ac6..74d1d56fe42a 100644 --- a/desktop/source/splash/splash.cxx +++ b/desktop/source/splash/splash.cxx @@ -58,7 +58,7 @@ public: virtual ~SplashScreenWindow() override { disposeOnce(); } virtual void dispose() override; // workwindow - virtual void Paint(vcl::RenderContext& rRenderContext, const Rectangle&) override; + virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&) override; void Redraw(); }; @@ -142,7 +142,7 @@ void SplashScreenWindow::Redraw() Invalidate(); // Trigger direct painting too - otherwise the splash screen won't be // shown in some cases (when the idle timer won't be hit). - Paint(*this, Rectangle()); + Paint(*this, tools::Rectangle()); Flush(); } @@ -473,7 +473,7 @@ void SplashScreen::SetScreenBitmap(BitmapEx &rBitmap) if ( nCount > 0 ) { // retrieve size from first screen - Rectangle aScreenArea = Application::GetScreenPosSizePixel((unsigned int)0); + tools::Rectangle aScreenArea = Application::GetScreenPosSizePixel((unsigned int)0); nWidth = aScreenArea.GetWidth(); nHeight = aScreenArea.GetHeight(); } @@ -516,7 +516,7 @@ void SplashScreen::determineProgressRatioValues( if ( nCount > 0 ) { // retrieve size from first screen - Rectangle aScreenArea = Application::GetScreenPosSizePixel((unsigned int)0); + tools::Rectangle aScreenArea = Application::GetScreenPosSizePixel((unsigned int)0); nWidth = aScreenArea.GetWidth(); nHeight = aScreenArea.GetHeight(); nScreenRatio = nHeight ? sal_Int32( rtl::math::round( double( nWidth ) / double( nHeight ), 2 ) * 100 ) : 0; @@ -574,7 +574,7 @@ void SplashScreen::determineProgressRatioValues( } } -void SplashScreenWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangle&) +void SplashScreenWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&) { if (!pSpl || !pSpl->_bVisible) return; @@ -586,8 +586,8 @@ void SplashScreenWindow::Paint(vcl::RenderContext& rRenderContext, const Rectang rRenderContext.DrawBitmapEx(Point(), pSpl->_aIntroBmp); ImplControlValue aValue( pSpl->_iProgress * pSpl->_barwidth / pSpl->_iMax); - Rectangle aDrawRect( Point(pSpl->_tlx, pSpl->_tly), Size( pSpl->_barwidth, pSpl->_barheight)); - Rectangle aNativeControlRegion, aNativeContentRegion; + tools::Rectangle aDrawRect( Point(pSpl->_tlx, pSpl->_tly), Size( pSpl->_barwidth, pSpl->_barheight)); + tools::Rectangle aNativeControlRegion, aNativeContentRegion; if (rRenderContext.GetNativeControlRegion(ControlType::IntroProgress, ControlPart::Entire, aDrawRect, ControlState::ENABLED, aValue, OUString(), @@ -617,10 +617,10 @@ void SplashScreenWindow::Paint(vcl::RenderContext& rRenderContext, const Rectang // border _vdev->SetFillColor(); _vdev->SetLineColor( pSpl->_cProgressFrameColor ); - _vdev->DrawRect(Rectangle(pSpl->_tlx, pSpl->_tly, pSpl->_tlx+pSpl->_barwidth, pSpl->_tly+pSpl->_barheight)); + _vdev->DrawRect(tools::Rectangle(pSpl->_tlx, pSpl->_tly, pSpl->_tlx+pSpl->_barwidth, pSpl->_tly+pSpl->_barheight)); _vdev->SetFillColor( pSpl->_cProgressBarColor ); _vdev->SetLineColor(); - _vdev->DrawRect(Rectangle(pSpl->_tlx+pSpl->_barspace, pSpl->_tly+pSpl->_barspace, pSpl->_tlx+pSpl->_barspace+length, pSpl->_tly+pSpl->_barheight-pSpl->_barspace)); + _vdev->DrawRect(tools::Rectangle(pSpl->_tlx+pSpl->_barspace, pSpl->_tly+pSpl->_barspace, pSpl->_tlx+pSpl->_barspace+length, pSpl->_tly+pSpl->_barheight-pSpl->_barspace)); vcl::Font aFont; aFont.SetFontSize(Size(0, 12)); aFont.SetAlignment(ALIGN_BASELINE); diff --git a/drawinglayer/source/primitive2d/discreteshadowprimitive2d.cxx b/drawinglayer/source/primitive2d/discreteshadowprimitive2d.cxx index 95acd391f4cf..64dd146ec77a 100644 --- a/drawinglayer/source/primitive2d/discreteshadowprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/discreteshadowprimitive2d.cxx @@ -56,7 +56,7 @@ namespace drawinglayer const sal_Int32 nQuarter((getBitmapEx().GetSizePixel().Width() - 3) >> 2); const_cast< DiscreteShadow* >(this)->maTopLeft = getBitmapEx(); const_cast< DiscreteShadow* >(this)->maTopLeft.Crop( - Rectangle(Point(0, 0), Size((nQuarter * 2) + 1, (nQuarter * 2) + 1))); + tools::Rectangle(Point(0, 0), Size((nQuarter * 2) + 1, (nQuarter * 2) + 1))); } return maTopLeft; @@ -69,7 +69,7 @@ namespace drawinglayer const sal_Int32 nQuarter((getBitmapEx().GetSizePixel().Width() - 3) >> 2); const_cast< DiscreteShadow* >(this)->maTop = getBitmapEx(); const_cast< DiscreteShadow* >(this)->maTop.Crop( - Rectangle(Point((nQuarter * 2) + 1, 0), Size(1, nQuarter))); + tools::Rectangle(Point((nQuarter * 2) + 1, 0), Size(1, nQuarter))); } return maTop; @@ -82,7 +82,7 @@ namespace drawinglayer const sal_Int32 nQuarter((getBitmapEx().GetSizePixel().Width() - 3) >> 2); const_cast< DiscreteShadow* >(this)->maTopRight = getBitmapEx(); const_cast< DiscreteShadow* >(this)->maTopRight.Crop( - Rectangle(Point((nQuarter * 2) + 2, 0), Size((nQuarter * 2) + 1, (nQuarter * 2) + 1))); + tools::Rectangle(Point((nQuarter * 2) + 2, 0), Size((nQuarter * 2) + 1, (nQuarter * 2) + 1))); } return maTopRight; @@ -95,7 +95,7 @@ namespace drawinglayer const sal_Int32 nQuarter((getBitmapEx().GetSizePixel().Width() - 3) >> 2); const_cast< DiscreteShadow* >(this)->maRight = getBitmapEx(); const_cast< DiscreteShadow* >(this)->maRight.Crop( - Rectangle(Point((nQuarter * 3) + 3, (nQuarter * 2) + 1), Size(nQuarter, 1))); + tools::Rectangle(Point((nQuarter * 3) + 3, (nQuarter * 2) + 1), Size(nQuarter, 1))); } return maRight; @@ -108,7 +108,7 @@ namespace drawinglayer const sal_Int32 nQuarter((getBitmapEx().GetSizePixel().Width() - 3) >> 2); const_cast< DiscreteShadow* >(this)->maBottomRight = getBitmapEx(); const_cast< DiscreteShadow* >(this)->maBottomRight.Crop( - Rectangle(Point((nQuarter * 2) + 2, (nQuarter * 2) + 2), Size((nQuarter * 2) + 1, (nQuarter * 2) + 1))); + tools::Rectangle(Point((nQuarter * 2) + 2, (nQuarter * 2) + 2), Size((nQuarter * 2) + 1, (nQuarter * 2) + 1))); } return maBottomRight; @@ -121,7 +121,7 @@ namespace drawinglayer const sal_Int32 nQuarter((getBitmapEx().GetSizePixel().Width() - 3) >> 2); const_cast< DiscreteShadow* >(this)->maBottom = getBitmapEx(); const_cast< DiscreteShadow* >(this)->maBottom.Crop( - Rectangle(Point((nQuarter * 2) + 1, (nQuarter * 3) + 3), Size(1, nQuarter))); + tools::Rectangle(Point((nQuarter * 2) + 1, (nQuarter * 3) + 3), Size(1, nQuarter))); } return maBottom; @@ -134,7 +134,7 @@ namespace drawinglayer const sal_Int32 nQuarter((getBitmapEx().GetSizePixel().Width() - 3) >> 2); const_cast< DiscreteShadow* >(this)->maBottomLeft = getBitmapEx(); const_cast< DiscreteShadow* >(this)->maBottomLeft.Crop( - Rectangle(Point(0, (nQuarter * 2) + 2), Size((nQuarter * 2) + 1, (nQuarter * 2) + 1))); + tools::Rectangle(Point(0, (nQuarter * 2) + 2), Size((nQuarter * 2) + 1, (nQuarter * 2) + 1))); } return maBottomLeft; @@ -147,7 +147,7 @@ namespace drawinglayer const sal_Int32 nQuarter((getBitmapEx().GetSizePixel().Width() - 3) >> 2); const_cast< DiscreteShadow* >(this)->maLeft = getBitmapEx(); const_cast< DiscreteShadow* >(this)->maLeft.Crop( - Rectangle(Point(0, (nQuarter * 2) + 1), Size(nQuarter, 1))); + tools::Rectangle(Point(0, (nQuarter * 2) + 1), Size(nQuarter, 1))); } return maLeft; diff --git a/drawinglayer/source/primitive2d/graphicprimitivehelper2d.cxx b/drawinglayer/source/primitive2d/graphicprimitivehelper2d.cxx index c2e574aef8b1..98192700264d 100644 --- a/drawinglayer/source/primitive2d/graphicprimitivehelper2d.cxx +++ b/drawinglayer/source/primitive2d/graphicprimitivehelper2d.cxx @@ -237,7 +237,7 @@ namespace drawinglayer if (aMask.IsEmpty()) { const Point aEmpty; - const Rectangle aRect(aEmpty, maVirtualDeviceMask->GetOutputSizePixel()); + const tools::Rectangle aRect(aEmpty, maVirtualDeviceMask->GetOutputSizePixel()); const Wallpaper aWallpaper(COL_BLACK); maVirtualDeviceMask->DrawWallpaper(aRect, aWallpaper); } @@ -260,7 +260,7 @@ namespace drawinglayer if (aMask.IsEmpty()) { - const Rectangle aRect(rAnimBitmap.aPosPix, aContent.GetSizePixel()); + const tools::Rectangle aRect(rAnimBitmap.aPosPix, aContent.GetSizePixel()); maVirtualDeviceMask->SetFillColor(COL_BLACK); maVirtualDeviceMask->SetLineColor(); maVirtualDeviceMask->DrawRect(aRect); diff --git a/drawinglayer/source/primitive2d/metafileprimitive2d.cxx b/drawinglayer/source/primitive2d/metafileprimitive2d.cxx index e22d9a04348a..e07033aa50d5 100644 --- a/drawinglayer/source/primitive2d/metafileprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/metafileprimitive2d.cxx @@ -1751,7 +1751,7 @@ namespace if(rPropertyHolders.Current().getLineOrFillActive()) { const MetaRectAction* pA = static_cast<const MetaRectAction*>(pAction); - const Rectangle& rRectangle = pA->GetRect(); + const tools::Rectangle& rRectangle = pA->GetRect(); if(!rRectangle.IsEmpty()) { @@ -1778,7 +1778,7 @@ namespace if(rPropertyHolders.Current().getLineOrFillActive()) { const MetaRoundRectAction* pA = static_cast<const MetaRoundRectAction*>(pAction); - const Rectangle& rRectangle = pA->GetRect(); + const tools::Rectangle& rRectangle = pA->GetRect(); if(!rRectangle.IsEmpty()) { @@ -1817,7 +1817,7 @@ namespace if(rPropertyHolders.Current().getLineOrFillActive()) { const MetaEllipseAction* pA = static_cast<const MetaEllipseAction*>(pAction); - const Rectangle& rRectangle = pA->GetRect(); + const tools::Rectangle& rRectangle = pA->GetRect(); if(!rRectangle.IsEmpty()) { @@ -2073,7 +2073,7 @@ namespace /** CHECKED, WORKS WELL */ // OSL_FAIL("MetaActionType::TEXTRECT requested (!)"); const MetaTextRectAction* pA = static_cast<const MetaTextRectAction*>(pAction); - const Rectangle& rRectangle = pA->GetRect(); + const tools::Rectangle& rRectangle = pA->GetRect(); const sal_uInt32 nStringLength(pA->GetText().getLength()); if(!rRectangle.IsEmpty() && 0 != nStringLength) @@ -2157,7 +2157,7 @@ namespace if(!rBitmap.IsEmpty()) { Bitmap aCroppedBitmap(rBitmap); - const Rectangle aCropRectangle(pA->GetSrcPoint(), pA->GetSrcSize()); + const tools::Rectangle aCropRectangle(pA->GetSrcPoint(), pA->GetSrcSize()); if(!aCropRectangle.IsEmpty()) { @@ -2199,7 +2199,7 @@ namespace if(!rBitmapEx.IsEmpty()) { BitmapEx aCroppedBitmapEx(rBitmapEx); - const Rectangle aCropRectangle(pA->GetSrcPoint(), pA->GetSrcSize()); + const tools::Rectangle aCropRectangle(pA->GetSrcPoint(), pA->GetSrcSize()); if(!aCropRectangle.IsEmpty()) { @@ -2241,7 +2241,7 @@ namespace if(!rBitmap.IsEmpty()) { Bitmap aCroppedBitmap(rBitmap); - const Rectangle aCropRectangle(pA->GetSrcPoint(), pA->GetSrcSize()); + const tools::Rectangle aCropRectangle(pA->GetSrcPoint(), pA->GetSrcSize()); if(!aCropRectangle.IsEmpty()) { @@ -2258,7 +2258,7 @@ namespace { /** CHECKED, WORKS WELL */ const MetaGradientAction* pA = static_cast<const MetaGradientAction*>(pAction); - const Rectangle& rRectangle = pA->GetRect(); + const tools::Rectangle& rRectangle = pA->GetRect(); if(!rRectangle.IsEmpty()) { @@ -2348,7 +2348,7 @@ namespace { /** CHECKED, WORKS WELL */ const MetaWallpaperAction* pA = static_cast<const MetaWallpaperAction*>(pAction); - Rectangle aWallpaperRectangle(pA->GetRect()); + tools::Rectangle aWallpaperRectangle(pA->GetRect()); if(!aWallpaperRectangle.IsEmpty()) { @@ -2421,7 +2421,7 @@ namespace { /** CHECKED, WORKS WELL */ const MetaISectRectClipRegionAction* pA = static_cast<const MetaISectRectClipRegionAction*>(pAction); - const Rectangle& rRectangle = pA->GetRect(); + const tools::Rectangle& rRectangle = pA->GetRect(); if(rRectangle.IsEmpty()) { @@ -2868,7 +2868,7 @@ namespace // this EPS on screen, the renderer visualizing this has to support // that primitive and visualize the Eps file (e.g. printing) const MetaEPSAction* pA = static_cast<const MetaEPSAction*>(pAction); - const Rectangle aRectangle(pA->GetPoint(), pA->GetSize()); + const tools::Rectangle aRectangle(pA->GetPoint(), pA->GetSize()); if(!aRectangle.IsEmpty()) { @@ -3187,7 +3187,7 @@ namespace drawinglayer if(!xRetval.empty()) { // get target size - const Rectangle aMtfTarget(getMetaFile().GetPrefMapMode().GetOrigin(), getMetaFile().GetPrefSize()); + const tools::Rectangle aMtfTarget(getMetaFile().GetPrefMapMode().GetOrigin(), getMetaFile().GetPrefSize()); // create transformation basegfx::B2DHomMatrix aAdaptedTransform; diff --git a/drawinglayer/source/primitive2d/textlayoutdevice.cxx b/drawinglayer/source/primitive2d/textlayoutdevice.cxx index e58aacfa0113..ffad187e7217 100644 --- a/drawinglayer/source/primitive2d/textlayoutdevice.cxx +++ b/drawinglayer/source/primitive2d/textlayoutdevice.cxx @@ -290,7 +290,7 @@ namespace drawinglayer if(nTextLength) { - Rectangle aRect; + tools::Rectangle aRect; mrDevice.GetTextBoundRect( aRect, @@ -324,7 +324,7 @@ namespace drawinglayer } void TextLayouterDevice::addTextRectActions( - const Rectangle& rRectangle, + const tools::Rectangle& rRectangle, const OUString& rText, DrawTextFlags nStyle, GDIMetaFile& rGDIMetaFile) const diff --git a/drawinglayer/source/processor2d/vclhelperbufferdevice.cxx b/drawinglayer/source/processor2d/vclhelperbufferdevice.cxx index 7d58734363ae..125b154f90b0 100644 --- a/drawinglayer/source/processor2d/vclhelperbufferdevice.cxx +++ b/drawinglayer/source/processor2d/vclhelperbufferdevice.cxx @@ -176,7 +176,7 @@ namespace { if (bClear) { - pRetval->Erase(Rectangle(0, 0, rSizePixel.getWidth(), rSizePixel.getHeight())); + pRetval->Erase(tools::Rectangle(0, 0, rSizePixel.getWidth(), rSizePixel.getHeight())); } } else @@ -258,11 +258,11 @@ namespace drawinglayer { basegfx::B2DRange aRangePixel(rRange); aRangePixel.transform(mrOutDev.GetViewTransformation()); - const Rectangle aRectPixel( + const tools::Rectangle aRectPixel( (sal_Int32)floor(aRangePixel.getMinX()), (sal_Int32)floor(aRangePixel.getMinY()), (sal_Int32)ceil(aRangePixel.getMaxX()), (sal_Int32)ceil(aRangePixel.getMaxY())); const Point aEmptyPoint; - maDestPixel = Rectangle(aEmptyPoint, mrOutDev.GetOutputSizePixel()); + maDestPixel = tools::Rectangle(aEmptyPoint, mrOutDev.GetOutputSizePixel()); maDestPixel.Intersection(aRectPixel); if(isVisible()) diff --git a/drawinglayer/source/processor2d/vclhelperbufferdevice.hxx b/drawinglayer/source/processor2d/vclhelperbufferdevice.hxx index d20eab478d9d..3cc9e887b62e 100644 --- a/drawinglayer/source/processor2d/vclhelperbufferdevice.hxx +++ b/drawinglayer/source/processor2d/vclhelperbufferdevice.hxx @@ -38,7 +38,7 @@ namespace drawinglayer VclPtr<VirtualDevice> mpContent; VclPtr<VirtualDevice> mpMask; VclPtr<VirtualDevice> mpAlpha; - Rectangle maDestPixel; + tools::Rectangle maDestPixel; public: impBufferDevice( diff --git a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx index b4d425d8a89b..22e33a74828a 100644 --- a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx +++ b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx @@ -236,7 +236,7 @@ namespace drawinglayer { namespace processor2d { - Rectangle VclMetafileProcessor2D::impDumpToMetaFile( + tools::Rectangle VclMetafileProcessor2D::impDumpToMetaFile( const primitive2d::Primitive2DContainer& rContent, GDIMetaFile& o_rContentMetafile) { @@ -248,7 +248,7 @@ namespace drawinglayer // transform primitive range with current transformation (e.g shadow offset) aPrimitiveRange.transform(maCurrentTransformation); - const Rectangle aPrimitiveRectangle( + const tools::Rectangle aPrimitiveRectangle( basegfx::fround(aPrimitiveRange.getMinX()), basegfx::fround(aPrimitiveRange.getMinY()), basegfx::fround(aPrimitiveRange.getMaxX()), basegfx::fround(aPrimitiveRange.getMaxY())); ScopedVclPtrInstance< VirtualDevice > aContentVDev; @@ -803,12 +803,12 @@ namespace drawinglayer const basegfx::B2DRange aCurrentRange( aTranslate.getX(), aTranslate.getY(), aTranslate.getX() + aScale.getX(), aTranslate.getY() + aScale.getY()); - const Rectangle aCurrentRect( + const tools::Rectangle aCurrentRect( sal_Int32(floor(aCurrentRange.getMinX())), sal_Int32(floor(aCurrentRange.getMinY())), sal_Int32(ceil(aCurrentRange.getMaxX())), sal_Int32(ceil(aCurrentRange.getMaxY()))); const GraphicAttr& rAttr = rGraphicPrimitive.getGraphicAttr(); // fdo#72530 don't pass empty Rectangle to EndGroup - Rectangle aCropRect(aCurrentRect); + tools::Rectangle aCropRect(aCurrentRect); if(rAttr.IsCropped()) { @@ -841,7 +841,7 @@ namespace drawinglayer aCropRange.expand(aCurrentRange.getMinimum() - basegfx::B2DPoint(rAttr.GetLeftCrop() * fFactorX, rAttr.GetTopCrop() * fFactorY)); aCropRange.expand(aCurrentRange.getMaximum() + basegfx::B2DPoint(rAttr.GetRightCrop() * fFactorX, rAttr.GetBottomCrop() * fFactorY)); - aCropRect = Rectangle( + aCropRect = tools::Rectangle( sal_Int32(floor(aCropRange.getMinX())), sal_Int32(floor(aCropRange.getMinY())), sal_Int32(ceil(aCropRange.getMaxX())), sal_Int32(ceil(aCropRange.getMaxY()))); } @@ -903,7 +903,7 @@ namespace drawinglayer { // still need to fill in the location (is a class Rectangle) const basegfx::B2DRange aRangeLogic(rControlPrimitive.getB2DRange(getViewInformation2D())); - const Rectangle aRectLogic( + const tools::Rectangle aRectLogic( (sal_Int32)floor(aRangeLogic.getMinX()), (sal_Int32)floor(aRangeLogic.getMinY()), (sal_Int32)ceil(aRangeLogic.getMaxX()), (sal_Int32)ceil(aRangeLogic.getMaxY())); pPDFControl->Location = aRectLogic; @@ -1012,7 +1012,7 @@ namespace drawinglayer { // emulate data handling from ImpEditEngine::Paint const basegfx::B2DRange aViewRange(rContent.getB2DRange(getViewInformation2D())); - const Rectangle aRectLogic( + const tools::Rectangle aRectLogic( (sal_Int32)floor(aViewRange.getMinX()), (sal_Int32)floor(aViewRange.getMinY()), (sal_Int32)ceil(aViewRange.getMaxX()), (sal_Int32)ceil(aViewRange.getMaxY())); vcl::PDFExtOutDevBookmarkEntry aBookmark; @@ -1915,7 +1915,7 @@ namespace drawinglayer // various content, create content-metafile GDIMetaFile aContentMetafile; - const Rectangle aPrimitiveRectangle(impDumpToMetaFile(rContent, aContentMetafile)); + const tools::Rectangle aPrimitiveRectangle(impDumpToMetaFile(rContent, aContentMetafile)); // restore mfCurrentUnifiedTransparence; it may have been used // while processing the sub-content in impDumpToMetaFile @@ -1977,7 +1977,7 @@ namespace drawinglayer { // various content, create content-metafile GDIMetaFile aContentMetafile; - const Rectangle aPrimitiveRectangle(impDumpToMetaFile(rContent, aContentMetafile)); + const tools::Rectangle aPrimitiveRectangle(impDumpToMetaFile(rContent, aContentMetafile)); // re-create a VCL-gradient from FillGradientPrimitive2D Gradient aVCLGradient; @@ -2005,10 +2005,10 @@ namespace drawinglayer basegfx::B2DRange aViewRange(rContent.getB2DRange(getViewInformation2D())); aViewRange.transform(maCurrentTransformation); - const Rectangle aRectLogic( + const tools::Rectangle aRectLogic( (sal_Int32)floor(aViewRange.getMinX()), (sal_Int32)floor(aViewRange.getMinY()), (sal_Int32)ceil(aViewRange.getMaxX()), (sal_Int32)ceil(aViewRange.getMaxY())); - const Rectangle aRectPixel(mpOutputDevice->LogicToPixel(aRectLogic)); + const tools::Rectangle aRectPixel(mpOutputDevice->LogicToPixel(aRectLogic)); Size aSizePixel(aRectPixel.GetSize()); const Point aEmptyPoint; ScopedVclPtrInstance< VirtualDevice > aBufferDevice; diff --git a/drawinglayer/source/processor2d/vclmetafileprocessor2d.hxx b/drawinglayer/source/processor2d/vclmetafileprocessor2d.hxx index 360c0433518e..bbd032dfd94e 100644 --- a/drawinglayer/source/processor2d/vclmetafileprocessor2d.hxx +++ b/drawinglayer/source/processor2d/vclmetafileprocessor2d.hxx @@ -35,7 +35,7 @@ // predefines class GDIMetaFile; -class Rectangle; +namespace tools { class Rectangle; } class Gradient; class SvtGraphicFill; class SvtGraphicStroke; @@ -72,7 +72,7 @@ namespace drawinglayer { private: /// local helper(s) - Rectangle impDumpToMetaFile( + tools::Rectangle impDumpToMetaFile( const primitive2d::Primitive2DContainer& rContent, GDIMetaFile& o_rContentMetafile); void impConvertFillGradientAttributeToVCLGradient( diff --git a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx index a212fb8b4460..a11326e1e76b 100644 --- a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx +++ b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx @@ -1203,7 +1203,7 @@ namespace drawinglayer // create rectangle for fill const basegfx::B2DRange& aViewport(getViewInformation2D().getDiscreteViewport()); - const Rectangle aRectangle( + const tools::Rectangle aRectangle( (sal_Int32)floor(aViewport.getMinX()), (sal_Int32)floor(aViewport.getMinY()), (sal_Int32)ceil(aViewport.getMaxX()), (sal_Int32)ceil(aViewport.getMaxY())); mpOutputDevice->DrawRect(aRectangle); diff --git a/drawinglayer/source/processor2d/vclprocessor2d.cxx b/drawinglayer/source/processor2d/vclprocessor2d.cxx index f3c6c88ad61c..8bd8e8857e7f 100644 --- a/drawinglayer/source/processor2d/vclprocessor2d.cxx +++ b/drawinglayer/source/processor2d/vclprocessor2d.cxx @@ -530,7 +530,7 @@ namespace drawinglayer // prepare OutDev const Point aEmptyPoint(0, 0); - const Rectangle aVisiblePixel(aEmptyPoint, mpOutputDevice->GetOutputSizePixel()); + const tools::Rectangle aVisiblePixel(aEmptyPoint, mpOutputDevice->GetOutputSizePixel()); const bool bWasEnabled(mpOutputDevice->IsMapModeEnabled()); mpOutputDevice->EnableMapMode(false); @@ -545,7 +545,7 @@ namespace drawinglayer for(sal_Int32 nXPos((nPosY % 2) ? nBLeft - nBWidth + nOffsetX : nBLeft); nXPos < nOLeft + nOWidth; nXPos += nBWidth) { - const Rectangle aOutRectPixel(Point(nXPos, nYPos), aNeededBitmapSizePixel); + const tools::Rectangle aOutRectPixel(Point(nXPos, nYPos), aNeededBitmapSizePixel); if(aOutRectPixel.IsOver(aVisiblePixel)) { @@ -572,7 +572,7 @@ namespace drawinglayer for(sal_Int32 nYPos((nPosX % 2) ? nBTop - nBHeight + nOffsetY : nBTop); nYPos < nOTop + nOHeight; nYPos += nBHeight) { - const Rectangle aOutRectPixel(Point(nXPos, nYPos), aNeededBitmapSizePixel); + const tools::Rectangle aOutRectPixel(Point(nXPos, nYPos), aNeededBitmapSizePixel); if(aOutRectPixel.IsOver(aVisiblePixel)) { @@ -741,7 +741,7 @@ namespace drawinglayer // the inner pixel bounds accordingly (ceil resp. floor). This will also be done for logic // units e.g. when creating a new MetaFile, but since much huger value ranges are used // there typically will be okay for this compromise. - Rectangle aDestRectView( + tools::Rectangle aDestRectView( // !!CAUTION!! Here, ceil and floor are exchanged BY PURPOSE, do NOT copy when // looking for a standard conversion to rectangle (!) (sal_Int32)ceil(aOutlineRange.getMinX()), (sal_Int32)ceil(aOutlineRange.getMinY()), @@ -1269,7 +1269,7 @@ namespace drawinglayer if(!aRange.isEmpty()) { - const Rectangle aRectangle( + const tools::Rectangle aRectangle( (sal_Int32)floor(aRange.getMinX()), (sal_Int32)floor(aRange.getMinY()), (sal_Int32)ceil(aRange.getMaxX()), (sal_Int32)ceil(aRange.getMaxY())); diff --git a/editeng/source/accessibility/AccessibleEditableTextPara.cxx b/editeng/source/accessibility/AccessibleEditableTextPara.cxx index 11a212b02f41..993f906d5b05 100644 --- a/editeng/source/accessibility/AccessibleEditableTextPara.cxx +++ b/editeng/source/accessibility/AccessibleEditableTextPara.cxx @@ -544,10 +544,10 @@ namespace accessibility return GetTextForwarder().HaveImageBullet( GetParagraphIndex() ); } - Rectangle AccessibleEditableTextPara::LogicToPixel( const Rectangle& rRect, const MapMode& rMapMode, SvxViewForwarder& rForwarder ) + tools::Rectangle AccessibleEditableTextPara::LogicToPixel( const tools::Rectangle& rRect, const MapMode& rMapMode, SvxViewForwarder& rForwarder ) { // convert to screen coordinates - return Rectangle( rForwarder.LogicToPixel( rRect.TopLeft(), rMapMode ), + return tools::Rectangle( rForwarder.LogicToPixel( rRect.TopLeft(), rMapMode ), rForwarder.LogicToPixel( rRect.BottomRight(), rMapMode ) ); } @@ -1001,7 +1001,7 @@ namespace accessibility "AccessibleEditableTextPara::contains: index value overflow"); awt::Rectangle aTmpRect = getBounds(); - Rectangle aRect( Point(aTmpRect.X, aTmpRect.Y), Size(aTmpRect.Width, aTmpRect.Height) ); + tools::Rectangle aRect( Point(aTmpRect.X, aTmpRect.Y), Size(aTmpRect.Width, aTmpRect.Height) ); Point aPoint( aTmpPoint.X, aTmpPoint.Y ); return aRect.IsInside( aPoint ); @@ -1029,7 +1029,7 @@ namespace accessibility aBulletInfo.bVisible && aBulletInfo.nType == SVX_NUM_BITMAP ) { - Rectangle aRect = aBulletInfo.aBounds; + tools::Rectangle aRect = aBulletInfo.aBounds; if( aRect.IsInside( aLogPoint ) ) return getAccessibleChild(0); @@ -1048,10 +1048,10 @@ namespace accessibility "AccessibleEditableTextPara::getBounds: index value overflow"); SvxTextForwarder& rCacheTF = GetTextForwarder(); - Rectangle aRect = rCacheTF.GetParaBounds( GetParagraphIndex() ); + tools::Rectangle aRect = rCacheTF.GetParaBounds( GetParagraphIndex() ); // convert to screen coordinates - Rectangle aScreenRect = AccessibleEditableTextPara::LogicToPixel( aRect, + tools::Rectangle aScreenRect = AccessibleEditableTextPara::LogicToPixel( aRect, rCacheTF.GetMapMode(), GetViewForwarder() ); @@ -1311,10 +1311,10 @@ namespace accessibility CheckPosition( nIndex ); SvxTextForwarder& rCacheTF = GetTextForwarder(); - Rectangle aRect = rCacheTF.GetCharBounds(GetParagraphIndex(), nIndex); + tools::Rectangle aRect = rCacheTF.GetCharBounds(GetParagraphIndex(), nIndex); // convert to screen - Rectangle aScreenRect = AccessibleEditableTextPara::LogicToPixel( aRect, + tools::Rectangle aScreenRect = AccessibleEditableTextPara::LogicToPixel( aRect, rCacheTF.GetMapMode(), GetViewForwarder() ); // #109864# offset from parent (paragraph), but in screen @@ -1358,7 +1358,7 @@ namespace accessibility Point aLogPoint( GetViewForwarder().PixelToLogic( aPoint, rCacheTF.GetMapMode() ) ); // re-offset to parent (paragraph) - Rectangle aParaRect = rCacheTF.GetParaBounds( GetParagraphIndex() ); + tools::Rectangle aParaRect = rCacheTF.GetParaBounds( GetParagraphIndex() ); aLogPoint.Move( aParaRect.Left(), aParaRect.Top() ); if( rCacheTF.GetIndexAtPoint( aLogPoint, nPara, nIndex ) && @@ -1368,7 +1368,7 @@ namespace accessibility try { awt::Rectangle aRect1( getCharacterBounds(nIndex) ); - Rectangle aRect2( aRect1.X, aRect1.Y, + tools::Rectangle aRect2( aRect1.X, aRect1.Y, aRect1.Width + aRect1.X, aRect1.Height + aRect1.Y ); if( aRect2.IsInside( Point( rPoint.X, rPoint.Y ) ) ) return nIndex; diff --git a/editeng/source/accessibility/AccessibleImageBullet.cxx b/editeng/source/accessibility/AccessibleImageBullet.cxx index c287c5d6235d..4015d7e08e4d 100644 --- a/editeng/source/accessibility/AccessibleImageBullet.cxx +++ b/editeng/source/accessibility/AccessibleImageBullet.cxx @@ -219,7 +219,7 @@ namespace accessibility "AccessibleEditableTextPara::contains: index value overflow"); awt::Rectangle aTmpRect = getBounds(); - Rectangle aRect( Point(aTmpRect.X, aTmpRect.Y), Size(aTmpRect.Width, aTmpRect.Height) ); + tools::Rectangle aRect( Point(aTmpRect.X, aTmpRect.Y), Size(aTmpRect.Width, aTmpRect.Height) ); Point aPoint( rPoint.X, rPoint.Y ); return aRect.IsInside( aPoint ); @@ -242,19 +242,19 @@ namespace accessibility SvxTextForwarder& rCacheTF = GetTextForwarder(); EBulletInfo aBulletInfo = rCacheTF.GetBulletInfo( GetParagraphIndex() ); - Rectangle aParentRect = rCacheTF.GetParaBounds( GetParagraphIndex() ); + tools::Rectangle aParentRect = rCacheTF.GetParaBounds( GetParagraphIndex() ); if( aBulletInfo.nParagraph != EE_PARA_NOT_FOUND && aBulletInfo.bVisible && aBulletInfo.nType == SVX_NUM_BITMAP ) { - Rectangle aRect = aBulletInfo.aBounds; + tools::Rectangle aRect = aBulletInfo.aBounds; // subtract paragraph position (bullet pos is absolute in EditEngine/Outliner) aRect.Move( -aParentRect.Left(), -aParentRect.Top() ); // convert to screen coordinates - Rectangle aScreenRect = AccessibleEditableTextPara::LogicToPixel( aRect, + tools::Rectangle aScreenRect = AccessibleEditableTextPara::LogicToPixel( aRect, rCacheTF.GetMapMode(), GetViewForwarder() ); diff --git a/editeng/source/accessibility/AccessibleStaticTextBase.cxx b/editeng/source/accessibility/AccessibleStaticTextBase.cxx index 6700b1402a43..c75af4633b90 100644 --- a/editeng/source/accessibility/AccessibleStaticTextBase.cxx +++ b/editeng/source/accessibility/AccessibleStaticTextBase.cxx @@ -148,7 +148,7 @@ namespace accessibility bool CopyText( sal_Int32 nStartPara, sal_Int32 nStartIndex, sal_Int32 nEndPara, sal_Int32 nEndIndex ); - Rectangle GetParagraphBoundingBox() const; + tools::Rectangle GetParagraphBoundingBox() const; bool RemoveLineBreakCount( sal_Int32& rIndex ); private: @@ -367,13 +367,13 @@ namespace accessibility } } - Rectangle AccessibleStaticTextBase_Impl::GetParagraphBoundingBox() const + tools::Rectangle AccessibleStaticTextBase_Impl::GetParagraphBoundingBox() const { - Rectangle aRect; + tools::Rectangle aRect; if( mxTextParagraph.is() ) { awt::Rectangle aAwtRect = mxTextParagraph->getBounds(); - aRect = Rectangle( Point( aAwtRect.X, aAwtRect.Y ), Size( aAwtRect.Width, aAwtRect.Height ) ); + aRect = tools::Rectangle( Point( aAwtRect.X, aAwtRect.Y ), Size( aAwtRect.Width, aAwtRect.Height ) ); } else { @@ -962,7 +962,7 @@ namespace accessibility return ::comphelper::concatSequences( aRunAttrSeq, comphelper::containerToSequence(aDiffVec) ); } - Rectangle AccessibleStaticTextBase::GetParagraphBoundingBox() const + tools::Rectangle AccessibleStaticTextBase::GetParagraphBoundingBox() const { return mpImpl->GetParagraphBoundingBox(); } diff --git a/editeng/source/accessibility/AccessibleStringWrap.cxx b/editeng/source/accessibility/AccessibleStringWrap.cxx index f5589f703854..af55049458f0 100644 --- a/editeng/source/accessibility/AccessibleStringWrap.cxx +++ b/editeng/source/accessibility/AccessibleStringWrap.cxx @@ -36,7 +36,7 @@ AccessibleStringWrap::AccessibleStringWrap( OutputDevice& rDev, SvxFont& rFont, { } -void AccessibleStringWrap::GetCharacterBounds( sal_Int32 nIndex, Rectangle& rRect ) +void AccessibleStringWrap::GetCharacterBounds( sal_Int32 nIndex, tools::Rectangle& rRect ) { DBG_ASSERT(nIndex >= 0 && nIndex <= USHRT_MAX, "SvxAccessibleStringWrap::GetCharacterBounds: index value overflow"); @@ -65,7 +65,7 @@ void AccessibleStringWrap::GetCharacterBounds( sal_Int32 nIndex, Rectangle& rRec if( mrFont.IsVertical() ) { // #101701# Rotate to vertical - rRect = Rectangle( Point(-rRect.Top(), rRect.Left()), + rRect = tools::Rectangle( Point(-rRect.Top(), rRect.Left()), Point(-rRect.Bottom(), rRect.Right())); } } @@ -73,7 +73,7 @@ void AccessibleStringWrap::GetCharacterBounds( sal_Int32 nIndex, Rectangle& rRec sal_Int32 AccessibleStringWrap::GetIndexAtPoint( const Point& rPoint ) { // search for character bounding box containing given point - Rectangle aRect; + tools::Rectangle aRect; sal_Int32 i, nLen = maText.getLength(); for( i=0; i<nLen; ++i ) { diff --git a/editeng/source/editeng/editdbg.cxx b/editeng/source/editeng/editdbg.cxx index 674e091b9a44..7929980b92ad 100644 --- a/editeng/source/editeng/editdbg.cxx +++ b/editeng/source/editeng/editdbg.cxx @@ -465,7 +465,7 @@ void EditDbg::ShowEditEngineData( EditEngine* pEE, bool bInfoBox ) EditView* pV = pEE->GetView( nView ); DBG_ASSERT( pV, "View not found!" ); fprintf( fp, "\nView %zu: Focus=%i", nView, pV->GetWindow()->HasFocus() ); - Rectangle aR( pV->GetOutputArea() ); + tools::Rectangle aR( pV->GetOutputArea() ); fprintf( fp, "\n OutputArea: nX=%li, nY=%li, dX=%li, dY=%li, MapMode = %i", aR.TopLeft().X(), aR.TopLeft().Y(), aR.GetSize().Width(), aR.GetSize().Height() , int( pV->GetWindow()->GetMapMode().GetMapUnit() ) ); aR = pV->GetVisArea(); fprintf( fp, "\n VisArea: nX=%li, nY=%li, dX=%li, dY=%li", aR.TopLeft().X(), aR.TopLeft().Y(), aR.GetSize().Width(), aR.GetSize().Height() ); diff --git a/editeng/source/editeng/editeng.cxx b/editeng/source/editeng/editeng.cxx index a50e2903ae36..32a48b1e84d3 100644 --- a/editeng/source/editeng/editeng.cxx +++ b/editeng/source/editeng/editeng.cxx @@ -205,7 +205,7 @@ const SfxItemSet& EditEngine::GetEmptyItemSet() return pImpEditEngine->GetEmptyItemSet(); } -void EditEngine::Draw( OutputDevice* pOutDev, const Rectangle& rOutRect ) +void EditEngine::Draw( OutputDevice* pOutDev, const tools::Rectangle& rOutRect ) { Draw( pOutDev, rOutRect, Point( 0, 0 ) ); } @@ -214,7 +214,7 @@ void EditEngine::Draw( OutputDevice* pOutDev, const Point& rStartPos, short nOri { // Create with 2 points, as with positive points it will end up with // LONGMAX as Size, Bottom and Right in the range > LONGMAX. - Rectangle aBigRect( -0x3FFFFFFF, -0x3FFFFFFF, 0x3FFFFFFF, 0x3FFFFFFF ); + tools::Rectangle aBigRect( -0x3FFFFFFF, -0x3FFFFFFF, 0x3FFFFFFF, 0x3FFFFFFF ); if( pOutDev->GetConnectMetaFile() ) pOutDev->Push(); Point aStartPos( rStartPos ); @@ -228,12 +228,12 @@ void EditEngine::Draw( OutputDevice* pOutDev, const Point& rStartPos, short nOri pOutDev->Pop(); } -void EditEngine::Draw( OutputDevice* pOutDev, const Rectangle& rOutRect, const Point& rStartDocPos ) +void EditEngine::Draw( OutputDevice* pOutDev, const tools::Rectangle& rOutRect, const Point& rStartDocPos ) { Draw( pOutDev, rOutRect, rStartDocPos, true ); } -void EditEngine::Draw( OutputDevice* pOutDev, const Rectangle& rOutRect, const Point& rStartDocPos, bool bClip ) +void EditEngine::Draw( OutputDevice* pOutDev, const tools::Rectangle& rOutRect, const Point& rStartDocPos, bool bClip ) { #if defined( DBG_UTIL ) || (OSL_DEBUG_LEVEL > 1) if ( bDebugPaint ) @@ -242,7 +242,7 @@ void EditEngine::Draw( OutputDevice* pOutDev, const Rectangle& rOutRect, const P // Align to the pixel boundary, so that it becomes exactly the same // as Paint () - Rectangle aOutRect( pOutDev->LogicToPixel( rOutRect ) ); + tools::Rectangle aOutRect( pOutDev->LogicToPixel( rOutRect ) ); aOutRect = pOutDev->PixelToLogic( aOutRect ); Point aStartPos; @@ -276,7 +276,7 @@ void EditEngine::Draw( OutputDevice* pOutDev, const Rectangle& rOutRect, const P { // Some printer drivers cause problems if characters graze the // ClipRegion, therefore rather add a pixel more ... - Rectangle aClipRect( aOutRect ); + tools::Rectangle aClipRect( aOutRect ); if ( pOutDev->GetOutDevType() == OUTDEV_PRINTER ) { Size aPixSz( 1, 0 ); @@ -403,7 +403,7 @@ void EditEngine::SetPaperSize( const Size& rNewSize ) pView->pImpEditView->RecalcOutputArea(); else if ( pView->pImpEditView->DoAutoSize() ) { - pView->pImpEditView->ResetOutputArea( Rectangle( + pView->pImpEditView->ResetOutputArea( tools::Rectangle( pView->pImpEditView->GetOutputArea().TopLeft(), aNewSize ) ); } } @@ -1022,7 +1022,7 @@ bool EditEngine::PostKeyEvent( const KeyEvent& rKeyEvent, EditView* pEditView, v P2.Y() += nH; pEditView->GetWindow()->SetLineColor(); pEditView->GetWindow()->SetFillColor( Color( (n%2) ? COL_YELLOW : COL_LIGHTGREEN ) ); - pEditView->GetWindow()->DrawRect( Rectangle( P1, P2 ) ); + pEditView->GetWindow()->DrawRect( tools::Rectangle( P1, P2 ) ); aPos.Y() += nH; } } @@ -1341,7 +1341,7 @@ bool EditEngine::PostKeyEvent( const KeyEvent& rKeyEvent, EditView* pEditView, v aPos = pEditView->pImpEditView->GetWindow()->LogicToPixel( aPos ); aPos = pEditView->GetWindow()->OutputToScreenPixel( aPos ); aPos.Y() -= 3; - Help::ShowQuickHelp( pEditView->GetWindow(), Rectangle( aPos, Size( 1, 1 ) ), aComplete, QuickHelpFlags::Bottom|QuickHelpFlags::Left ); + Help::ShowQuickHelp( pEditView->GetWindow(), tools::Rectangle( aPos, Size( 1, 1 ) ), aComplete, QuickHelpFlags::Bottom|QuickHelpFlags::Left ); } } } @@ -1774,7 +1774,7 @@ SvxFont EditEngine::GetStandardSvxFont( sal_Int32 nPara ) void EditEngine::StripPortions() { ScopedVclPtrInstance< VirtualDevice > aTmpDev; - Rectangle aBigRect( Point( 0, 0 ), Size( 0x7FFFFFFF, 0x7FFFFFFF ) ); + tools::Rectangle aBigRect( Point( 0, 0 ), Size( 0x7FFFFFFF, 0x7FFFFFFF ) ); if ( IsVertical() ) { aBigRect.Right() = 0; @@ -2369,16 +2369,16 @@ EPosition EditEngine::FindDocPosition( const Point& rDocPos ) const return aPos; } -Rectangle EditEngine::GetCharacterBounds( const EPosition& rPos ) const +tools::Rectangle EditEngine::GetCharacterBounds( const EPosition& rPos ) const { - Rectangle aBounds; + tools::Rectangle aBounds; ContentNode* pNode = pImpEditEngine->GetEditDoc().GetObject( rPos.nPara ); // Check against index, not paragraph if ( pNode && ( rPos.nIndex < pNode->Len() ) ) { aBounds = pImpEditEngine->PaMtoEditCursor( EditPaM( pNode, rPos.nIndex ), GetCursorFlags::TextOnly ); - Rectangle aR2 = pImpEditEngine->PaMtoEditCursor( EditPaM( pNode, rPos.nIndex+1 ), GetCursorFlags::TextOnly|GetCursorFlags::EndOfLine ); + tools::Rectangle aR2 = pImpEditEngine->PaMtoEditCursor( EditPaM( pNode, rPos.nIndex+1 ), GetCursorFlags::TextOnly|GetCursorFlags::EndOfLine ); if ( aR2.Right() > aBounds.Right() ) aBounds.Right() = aR2.Right(); } @@ -2540,9 +2540,9 @@ OUString EditEngine::GetUndoComment( sal_uInt16 nId ) const return aComment; } -Rectangle EditEngine::GetBulletArea( sal_Int32 ) +tools::Rectangle EditEngine::GetBulletArea( sal_Int32 ) { - return Rectangle( Point(), Point() ); + return tools::Rectangle( Point(), Point() ); } OUString EditEngine::CalcFieldValue( const SvxFieldItem&, sal_Int32, sal_Int32, Color*&, Color*& ) diff --git a/editeng/source/editeng/editview.cxx b/editeng/source/editeng/editview.cxx index 7b6ec40254cf..3f6aeacd7c37 100644 --- a/editeng/source/editeng/editview.cxx +++ b/editeng/source/editeng/editview.cxx @@ -172,13 +172,13 @@ EditEngine* EditView::GetEditEngine() const return pImpEditView->pEditEngine; } -Rectangle EditView::GetInvalidateRect() const +tools::Rectangle EditView::GetInvalidateRect() const { if ( !pImpEditView->DoInvalidateMore() ) return pImpEditView->aOutArea; else { - Rectangle aRect( pImpEditView->aOutArea ); + tools::Rectangle aRect( pImpEditView->aOutArea ); long nMore = pImpEditView->GetWindow()->PixelToLogic( Size( pImpEditView->GetInvalidateMore(), 0 ) ).Width(); aRect.Left() -= nMore; aRect.Right() += nMore; @@ -188,7 +188,7 @@ Rectangle EditView::GetInvalidateRect() const } } -void EditView::InvalidateOtherViewWindows( const Rectangle& rInvRect ) +void EditView::InvalidateOtherViewWindows( const tools::Rectangle& rInvRect ) { if (comphelper::LibreOfficeKit::isActive()) { @@ -202,7 +202,7 @@ void EditView::InvalidateOtherViewWindows( const Rectangle& rInvRect ) void EditView::Invalidate() { - const Rectangle& rInvRect = GetInvalidateRect(); + const tools::Rectangle& rInvRect = GetInvalidateRect(); pImpEditView->GetWindow()->Invalidate( rInvRect ); InvalidateOtherViewWindows( rInvRect ); } @@ -283,12 +283,12 @@ SvtScriptType EditView::GetSelectedScriptType() const return pImpEditView->pEditEngine->GetScriptType( pImpEditView->GetEditSelection() ); } -void EditView::GetSelectionRectangles(std::vector<Rectangle>& rLogicRects) const +void EditView::GetSelectionRectangles(std::vector<tools::Rectangle>& rLogicRects) const { return pImpEditView->GetSelectionRectangles(rLogicRects); } -void EditView::Paint( const Rectangle& rRect, OutputDevice* pTargetDevice ) +void EditView::Paint( const tools::Rectangle& rRect, OutputDevice* pTargetDevice ) { pImpEditView->pEditEngine->pImpEditEngine->Paint( pImpEditView.get(), rRect, pTargetDevice ); } @@ -337,20 +337,20 @@ bool EditView::RemoveOtherViewWindow( vcl::Window* pWin ) return true; } -void EditView::SetVisArea( const Rectangle& rRect ) +void EditView::SetVisArea( const tools::Rectangle& rRect ) { pImpEditView->SetVisDocStartPos( rRect.TopLeft() ); } -const Rectangle& EditView::GetVisArea() const +const tools::Rectangle& EditView::GetVisArea() const { // Change return value to Rectangle in next incompatible build !!! - static Rectangle aRect; + static tools::Rectangle aRect; aRect = pImpEditView->GetVisDocArea(); return aRect; } -void EditView::SetOutputArea( const Rectangle& rRect ) +void EditView::SetOutputArea( const tools::Rectangle& rRect ) { pImpEditView->SetOutputArea( rRect ); @@ -361,7 +361,7 @@ void EditView::SetOutputArea( const Rectangle& rRect ) pImpEditView->ShowCursor( false, false ); } -const Rectangle& EditView::GetOutputArea() const +const tools::Rectangle& EditView::GetOutputArea() const { return pImpEditView->GetOutputArea(); } @@ -978,10 +978,10 @@ void EditView::ExecuteSpellPopup( const Point& rPosPixel, Link<SpellCallbackInfo aPopupMenu->RemoveDisabledEntries( true, true ); - Rectangle aTempRect = pImpEditView->pEditEngine->pImpEditEngine->PaMtoEditCursor( aPaM, GetCursorFlags::TextOnly ); + tools::Rectangle aTempRect = pImpEditView->pEditEngine->pImpEditEngine->PaMtoEditCursor( aPaM, GetCursorFlags::TextOnly ); Point aScreenPos = pImpEditView->GetWindowPos( aTempRect.TopLeft() ); aScreenPos = pImpEditView->GetWindow()->OutputToScreenPixel( aScreenPos ); - aTempRect = pImpEditView->GetWindow()->LogicToPixel( Rectangle(aScreenPos, aTempRect.GetSize() )); + aTempRect = pImpEditView->GetWindow()->LogicToPixel( tools::Rectangle(aScreenPos, aTempRect.GetSize() )); //tdf#106123 store and restore the EditPaM around the menu Execute //because the loss of focus in the current editeng causes writer diff --git a/editeng/source/editeng/impedit.cxx b/editeng/source/editeng/impedit.cxx index 9d2f03c3f585..25df5d898fd8 100644 --- a/editeng/source/editeng/impedit.cxx +++ b/editeng/source/editeng/impedit.cxx @@ -230,7 +230,7 @@ void ImpEditView::DrawSelection( EditSelection aTmpSel, vcl::Region* pRegion, Ou // aTmpOutArea: if OutputArea > Paper width and // Text > Paper width ( over large fields ) - Rectangle aTmpOutArea( aOutArea ); + tools::Rectangle aTmpOutArea( aOutArea ); if ( aTmpOutArea.GetWidth() > pEditEngine->pImpEditEngine->GetPaperSize().Width() ) aTmpOutArea.Right() = aTmpOutArea.Left() + pEditEngine->pImpEditEngine->GetPaperSize().Width(); pTarget->IntersectClipRegion( aTmpOutArea ); @@ -294,7 +294,7 @@ void ImpEditView::DrawSelection( EditSelection aTmpSel, vcl::Region* pRegion, Ou if ( nEndIndex < nStartIndex ) nEndIndex = nStartIndex; - Rectangle aTmpRect( pEditEngine->pImpEditEngine->GetEditCursor( pTmpPortion, nStartIndex ) ); + tools::Rectangle aTmpRect( pEditEngine->pImpEditEngine->GetEditCursor( pTmpPortion, nStartIndex ) ); Point aTopLeft( aTmpRect.TopLeft() ); Point aBottomRight( aTmpRect.BottomRight() ); @@ -380,21 +380,21 @@ void ImpEditView::DrawSelection( EditSelection aTmpSel, vcl::Region* pRegion, Ou // If we are not in selection mode, then the exported own selection should be empty. if (pEditEngine->pImpEditEngine->IsInSelectionMode() || mpOtherShell) { - std::vector<Rectangle> aRectangles; + std::vector<tools::Rectangle> aRectangles; pRegion->GetRegionRectangles(aRectangles); if (!aRectangles.empty()) { - Rectangle& rStart = aRectangles.front(); - Rectangle aStart = Rectangle(rStart.Left(), rStart.Top(), rStart.Left() + 1, rStart.Bottom()); + tools::Rectangle& rStart = aRectangles.front(); + tools::Rectangle aStart = tools::Rectangle(rStart.Left(), rStart.Top(), rStart.Left() + 1, rStart.Bottom()); if (bMm100ToTwip) aStart = OutputDevice::LogicToLogic(aStart, MapUnit::Map100thMM, MapUnit::MapTwip); aStart.Move(aOrigin.getX(), aOrigin.getY()); mpViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_TEXT_SELECTION_START, aStart.toString().getStr()); - Rectangle& rEnd = aRectangles.back(); - Rectangle aEnd = Rectangle(rEnd.Right() - 1, rEnd.Top(), rEnd.Right(), rEnd.Bottom()); + tools::Rectangle& rEnd = aRectangles.back(); + tools::Rectangle aEnd = tools::Rectangle(rEnd.Right() - 1, rEnd.Top(), rEnd.Right(), rEnd.Bottom()); if (bMm100ToTwip) aEnd = OutputDevice::LogicToLogic(aEnd, MapUnit::Map100thMM, MapUnit::MapTwip); aEnd.Move(aOrigin.getX(), aOrigin.getY()); @@ -403,7 +403,7 @@ void ImpEditView::DrawSelection( EditSelection aTmpSel, vcl::Region* pRegion, Ou } std::vector<OString> v; - for (Rectangle & rRectangle : aRectangles) + for (tools::Rectangle & rRectangle : aRectangles) { if (bMm100ToTwip) rRectangle = OutputDevice::LogicToLogic(rRectangle, MapUnit::Map100thMM, MapUnit::MapTwip); @@ -442,14 +442,14 @@ void ImpEditView::DrawSelection( EditSelection aTmpSel, vcl::Region* pRegion, Ou } } -void ImpEditView::GetSelectionRectangles(std::vector<Rectangle>& rLogicRects) +void ImpEditView::GetSelectionRectangles(std::vector<tools::Rectangle>& rLogicRects) { bool bMm100ToTwip = pOutWin->GetMapMode().GetMapUnit() == MapUnit::Map100thMM; vcl::Region aRegion; DrawSelection(aEditSelection, &aRegion); aRegion.GetRegionRectangles(rLogicRects); - for (Rectangle& rRectangle : rLogicRects) + for (tools::Rectangle& rRectangle : rLogicRects) { if (bMm100ToTwip) rRectangle = OutputDevice::LogicToLogic(rRectangle, MapUnit::Map100thMM, MapUnit::MapTwip); @@ -476,7 +476,7 @@ void ImpEditView::ImplDrawHighlightRect( OutputDevice* _pTarget, const Point& rD lcl_AllignToPixel( aPnt2, _pTarget, ( bPixelMode ? 0 : +1 ), 0 ); } - Rectangle aRect( aPnt1, aPnt2 ); + tools::Rectangle aRect( aPnt1, aPnt2 ); if ( pPolyPoly ) { tools::Polygon aTmpPoly( 4 ); @@ -513,9 +513,9 @@ bool ImpEditView::IsVertical() const return pEditEngine->pImpEditEngine->IsVertical(); } -Rectangle ImpEditView::GetVisDocArea() const +tools::Rectangle ImpEditView::GetVisDocArea() const { - return Rectangle( GetVisDocLeft(), GetVisDocTop(), GetVisDocRight(), GetVisDocBottom() ); + return tools::Rectangle( GetVisDocLeft(), GetVisDocTop(), GetVisDocRight(), GetVisDocBottom() ); } Point ImpEditView::GetDocPos( const Point& rWindowPos ) const @@ -556,20 +556,20 @@ Point ImpEditView::GetWindowPos( const Point& rDocPos ) const return aPoint; } -Rectangle ImpEditView::GetWindowPos( const Rectangle& rDocRect ) const +tools::Rectangle ImpEditView::GetWindowPos( const tools::Rectangle& rDocRect ) const { // Document position => window position Point aPos( GetWindowPos( rDocRect.TopLeft() ) ); Size aSz = rDocRect.GetSize(); - Rectangle aRect; + tools::Rectangle aRect; if ( !pEditEngine->pImpEditEngine->IsVertical() ) { - aRect = Rectangle( aPos, aSz ); + aRect = tools::Rectangle( aPos, aSz ); } else { Point aNewPos( aPos.X()-aSz.Height(), aPos.Y() ); - aRect = Rectangle( aNewPos, Size( aSz.Height(), aSz.Width() ) ); + aRect = tools::Rectangle( aNewPos, Size( aSz.Height(), aSz.Width() ) ); } return aRect; } @@ -584,10 +584,10 @@ void ImpEditView::SetSelectionMode( EESelectionMode eNewMode ) } } -void ImpEditView::SetOutputArea( const Rectangle& rRect ) +void ImpEditView::SetOutputArea( const tools::Rectangle& rRect ) { // should be better be aligned on pixels! - Rectangle aNewRect( pOutWin->LogicToPixel( rRect ) ); + tools::Rectangle aNewRect( pOutWin->LogicToPixel( rRect ) ); aNewRect = pOutWin->PixelToLogic( aNewRect ); aOutArea = aNewRect; if ( aOutArea.Right() < aOutArea.Left() ) @@ -601,10 +601,10 @@ void ImpEditView::SetOutputArea( const Rectangle& rRect ) SetScrollDiffX( (sal_uInt16)aOutArea.GetWidth() * 2 / 10 ); } -void ImpEditView::ResetOutputArea( const Rectangle& rRect ) +void ImpEditView::ResetOutputArea( const tools::Rectangle& rRect ) { // remember old out area - const Rectangle aOldArea(aOutArea); + const tools::Rectangle aOldArea(aOutArea); // apply new one SetOutputArea(rRect); @@ -617,38 +617,38 @@ void ImpEditView::ResetOutputArea( const Rectangle& rRect ) if(aOldArea.Left() > aOutArea.Left()) { - GetWindow()->Invalidate(Rectangle(aOutArea.Left() - nMore, aOldArea.Top() - nMore, aOldArea.Left(), aOldArea.Bottom() + nMore)); + GetWindow()->Invalidate(tools::Rectangle(aOutArea.Left() - nMore, aOldArea.Top() - nMore, aOldArea.Left(), aOldArea.Bottom() + nMore)); } else if(aOldArea.Left() < aOutArea.Left()) { - GetWindow()->Invalidate(Rectangle(aOldArea.Left() - nMore, aOldArea.Top() - nMore, aOutArea.Left(), aOldArea.Bottom() + nMore)); + GetWindow()->Invalidate(tools::Rectangle(aOldArea.Left() - nMore, aOldArea.Top() - nMore, aOutArea.Left(), aOldArea.Bottom() + nMore)); } if(aOldArea.Right() > aOutArea.Right()) { - GetWindow()->Invalidate(Rectangle(aOutArea.Right(), aOldArea.Top() - nMore, aOldArea.Right() + nMore, aOldArea.Bottom() + nMore)); + GetWindow()->Invalidate(tools::Rectangle(aOutArea.Right(), aOldArea.Top() - nMore, aOldArea.Right() + nMore, aOldArea.Bottom() + nMore)); } else if(aOldArea.Right() < aOutArea.Right()) { - GetWindow()->Invalidate(Rectangle(aOldArea.Right(), aOldArea.Top() - nMore, aOutArea.Right() + nMore, aOldArea.Bottom() + nMore)); + GetWindow()->Invalidate(tools::Rectangle(aOldArea.Right(), aOldArea.Top() - nMore, aOutArea.Right() + nMore, aOldArea.Bottom() + nMore)); } if(aOldArea.Top() > aOutArea.Top()) { - GetWindow()->Invalidate(Rectangle(aOldArea.Left() - nMore, aOutArea.Top() - nMore, aOldArea.Right() + nMore, aOldArea.Top())); + GetWindow()->Invalidate(tools::Rectangle(aOldArea.Left() - nMore, aOutArea.Top() - nMore, aOldArea.Right() + nMore, aOldArea.Top())); } else if(aOldArea.Top() < aOutArea.Top()) { - GetWindow()->Invalidate(Rectangle(aOldArea.Left() - nMore, aOldArea.Top() - nMore, aOldArea.Right() + nMore, aOutArea.Top())); + GetWindow()->Invalidate(tools::Rectangle(aOldArea.Left() - nMore, aOldArea.Top() - nMore, aOldArea.Right() + nMore, aOutArea.Top())); } if(aOldArea.Bottom() > aOutArea.Bottom()) { - GetWindow()->Invalidate(Rectangle(aOldArea.Left() - nMore, aOutArea.Bottom(), aOldArea.Right() + nMore, aOldArea.Bottom() + nMore)); + GetWindow()->Invalidate(tools::Rectangle(aOldArea.Left() - nMore, aOutArea.Bottom(), aOldArea.Right() + nMore, aOldArea.Bottom() + nMore)); } else if(aOldArea.Bottom() < aOutArea.Bottom()) { - GetWindow()->Invalidate(Rectangle(aOldArea.Left() - nMore, aOldArea.Bottom(), aOldArea.Right() + nMore, aOutArea.Bottom() + nMore)); + GetWindow()->Invalidate(tools::Rectangle(aOldArea.Left() - nMore, aOldArea.Bottom(), aOldArea.Right() + nMore, aOutArea.Bottom() + nMore)); } } } @@ -719,7 +719,7 @@ void ImpEditView::RecalcOutputArea() break; } } - ResetOutputArea( Rectangle( aNewTopLeft, aNewSz ) ); + ResetOutputArea( tools::Rectangle( aNewTopLeft, aNewSz ) ); } void ImpEditView::SetAnchorMode( EVAnchorMode eMode ) @@ -827,7 +827,7 @@ void ImpEditView::ShowCursor( bool bGotoCursor, bool bForceVisCursor ) nShowCursorFlags |= GetCursorFlags::PreferPortionStart; } - Rectangle aEditCursor = pEditEngine->pImpEditEngine->PaMtoEditCursor( aPaM, nShowCursorFlags ); + tools::Rectangle aEditCursor = pEditEngine->pImpEditEngine->PaMtoEditCursor( aPaM, nShowCursorFlags ); if ( !IsInsertMode() && !aEditSelection.HasRange() ) { if ( aPaM.GetNode()->Len() && ( aPaM.GetIndex() < aPaM.GetNode()->Len() ) ) @@ -844,7 +844,7 @@ void ImpEditView::ShowCursor( bool bGotoCursor, bool bForceVisCursor ) else { EditPaM aNext = pEditEngine->CursorRight( aPaM ); - Rectangle aTmpRect = pEditEngine->pImpEditEngine->PaMtoEditCursor( aNext, GetCursorFlags::TextOnly ); + tools::Rectangle aTmpRect = pEditEngine->pImpEditEngine->PaMtoEditCursor( aNext, GetCursorFlags::TextOnly ); if ( aTmpRect.Top() != aEditCursor.Top() ) aTmpRect = pEditEngine->pImpEditEngine->PaMtoEditCursor( aNext, GetCursorFlags::TextOnly|GetCursorFlags::EndOfLine ); aEditCursor.Right() = aTmpRect.Left(); @@ -863,7 +863,7 @@ void ImpEditView::ShowCursor( bool bGotoCursor, bool bForceVisCursor ) long nDocDiffX = 0; long nDocDiffY = 0; - Rectangle aTmpVisArea( GetVisDocArea() ); + tools::Rectangle aTmpVisArea( GetVisDocArea() ); // aTmpOutArea: if OutputArea > Paper width and // Text > Paper width ( over large fields ) long nMaxTextWidth = !IsVertical() ? pEditEngine->pImpEditEngine->GetPaperSize().Width() : pEditEngine->pImpEditEngine->GetPaperSize().Height(); @@ -971,7 +971,7 @@ void ImpEditView::ShowCursor( bool bGotoCursor, bool bForceVisCursor ) ( aEditCursor.Left() + nOnePixel >= GetVisDocLeft() ) && ( aEditCursor.Right() - nOnePixel <= GetVisDocRight() ) ) ) { - Rectangle aCursorRect = GetWindowPos( aEditCursor ); + tools::Rectangle aCursorRect = GetWindowPos( aEditCursor ); GetCursor()->SetPos( aCursorRect.TopLeft() ); Size aCursorSz( aCursorRect.GetSize() ); // Rectangle is inclusive @@ -1004,7 +1004,7 @@ void ImpEditView::ShowCursor( bool bGotoCursor, bool bForceVisCursor ) if (comphelper::LibreOfficeKit::isActive() && mpViewShell) { const Point& rPos = GetCursor()->GetPos(); - Rectangle aRect(rPos.getX(), rPos.getY(), rPos.getX() + GetCursor()->GetWidth(), rPos.getY() + GetCursor()->GetHeight()); + tools::Rectangle aRect(rPos.getX(), rPos.getY(), rPos.getX() + GetCursor()->GetWidth(), rPos.getY() + GetCursor()->GetHeight()); // LOK output is always in twips, convert from mm100 if necessary. if (pOutWin->GetMapMode().GetMapUnit() == MapUnit::Map100thMM) @@ -1071,13 +1071,13 @@ Pair ImpEditView::Scroll( long ndX, long ndY, ScrollRangeCheck nRangeCheck ) return Pair( 0, 0 ); #ifdef DBG_UTIL - Rectangle aR( aOutArea ); + tools::Rectangle aR( aOutArea ); aR = pOutWin->LogicToPixel( aR ); aR = pOutWin->PixelToLogic( aR ); SAL_WARN_IF( aR != aOutArea, "editeng", "OutArea before Scroll not aligned" ); #endif - Rectangle aNewVisArea( GetVisDocArea() ); + tools::Rectangle aNewVisArea( GetVisDocArea() ); // Vertical: if ( !IsVertical() ) @@ -1144,7 +1144,7 @@ Pair ImpEditView::Scroll( long ndX, long ndY, ScrollRangeCheck nRangeCheck ) // rectangle ... aVisDocStartPos = pOutWin->LogicToPixel( aVisDocStartPos ); aVisDocStartPos = pOutWin->PixelToLogic( aVisDocStartPos ); - Rectangle aRect( aOutArea ); + tools::Rectangle aRect( aOutArea ); pOutWin->Scroll( nRealDiffX, nRealDiffY, aRect, ScrollFlags::Clip ); if (comphelper::LibreOfficeKit::isActive()) @@ -1157,7 +1157,7 @@ Pair ImpEditView::Scroll( long ndX, long ndY, ScrollRangeCheck nRangeCheck ) pCrsr->SetPos( pCrsr->GetPos() + Point( nRealDiffX, nRealDiffY ) ); if ( bVisCursor ) { - Rectangle aCursorRect( pCrsr->GetPos(), pCrsr->GetSize() ); + tools::Rectangle aCursorRect( pCrsr->GetPos(), pCrsr->GetSize() ); if ( aOutArea.IsInside( aCursorRect ) ) pCrsr->Show(); } @@ -1405,7 +1405,7 @@ bool ImpEditView::IsBulletArea( const Point& rPos, sal_Int32* pPara ) if ( aPaM.GetIndex() == 0 ) { sal_Int32 nPara = pEditEngine->GetEditDoc().GetPos( aPaM.GetNode() ); - Rectangle aBulletArea = pEditEngine->GetBulletArea( nPara ); + tools::Rectangle aBulletArea = pEditEngine->GetBulletArea( nPara ); long nY = pEditEngine->GetDocPosTopLeft( nPara ).Y(); const ParaPortion* pParaPortion = pEditEngine->GetParaPortions()[nPara]; nY += pParaPortion->GetFirstLineOffset(); @@ -1659,7 +1659,7 @@ void ImpEditView::HideDDCursor() } } -void ImpEditView::ShowDDCursor( const Rectangle& rRect ) +void ImpEditView::ShowDDCursor( const tools::Rectangle& rRect ) { if ( pDragAndDropInfo && !pDragAndDropInfo->bVisCursor ) { @@ -1670,7 +1670,7 @@ void ImpEditView::ShowDDCursor( const Rectangle& rRect ) GetWindow()->SetFillColor( Color(4210752) ); // GRAY BRUSH_50, OLDSV, change to DDCursor! // Save background ... - Rectangle aSaveRect( GetWindow()->LogicToPixel( rRect ) ); + tools::Rectangle aSaveRect( GetWindow()->LogicToPixel( rRect ) ); // prefer to save some more ... aSaveRect.Right() += 1; aSaveRect.Bottom() += 1; @@ -2076,7 +2076,7 @@ void ImpEditView::dragOver(const css::datatransfer::dnd::DropTargetDragEvent& rD } if ( bAccept ) { - Rectangle aEditCursor; + tools::Rectangle aEditCursor; if ( pDragAndDropInfo->bOutlinerMode ) { long nDDYPos; @@ -2093,7 +2093,7 @@ void ImpEditView::dragOver(const css::datatransfer::dnd::DropTargetDragEvent& rD aStartPos = GetWindowPos( aStartPos ); Point aEndPos( GetOutputArea().GetWidth(), nDDYPos ); aEndPos = GetWindowPos( aEndPos ); - aEditCursor = GetWindow()->LogicToPixel( Rectangle( aStartPos, aEndPos ) ); + aEditCursor = GetWindow()->LogicToPixel( tools::Rectangle( aStartPos, aEndPos ) ); if ( !pEditEngine->IsVertical() ) { aEditCursor.Top()--; diff --git a/editeng/source/editeng/impedit.hxx b/editeng/source/editeng/impedit.hxx index e3a0d8046c5e..fe0ce85c2386 100644 --- a/editeng/source/editeng/impedit.hxx +++ b/editeng/source/editeng/impedit.hxx @@ -116,8 +116,8 @@ namespace o3tl { struct DragAndDropInfo { - Rectangle aCurCursor; - Rectangle aCurSavedCursor; + tools::Rectangle aCurCursor; + tools::Rectangle aCurSavedCursor; sal_uInt16 nSensibleRange; sal_uInt16 nCursorWidth; ESelection aBeginDragSel; @@ -253,7 +253,7 @@ private: bool bActiveDragAndDropListener; Point aAnchorPoint; - Rectangle aOutArea; + tools::Rectangle aOutArea; Point aVisDocStartPos; EESelectionMode eSelectionMode; EditSelection aEditSelection; @@ -269,7 +269,7 @@ protected: void dragExit( const css::datatransfer::dnd::DropTargetEvent& dte ) override; void dragOver(const css::datatransfer::dnd::DropTargetDragEvent& dtde) override; - void ShowDDCursor( const Rectangle& rRect ); + void ShowDDCursor( const tools::Rectangle& rRect ); void HideDDCursor(); void ImplDrawHighlightRect( OutputDevice* _pTarget, const Point& rDocPosTopLeft, const Point& rDocPosBottomRight, tools::PolyPolygon* pPolyPoly ); @@ -288,11 +288,11 @@ public: Point GetDocPos( const Point& rWindowPos ) const; Point GetWindowPos( const Point& rDocPos ) const; - Rectangle GetWindowPos( const Rectangle& rDocPos ) const; + tools::Rectangle GetWindowPos( const tools::Rectangle& rDocPos ) const; - void SetOutputArea( const Rectangle& rRect ); - void ResetOutputArea( const Rectangle& rRect ); - const Rectangle& GetOutputArea() const { return aOutArea; } + void SetOutputArea( const tools::Rectangle& rRect ); + void ResetOutputArea( const tools::Rectangle& rRect ); + const tools::Rectangle& GetOutputArea() const { return aOutArea; } bool IsVertical() const; @@ -313,7 +313,7 @@ public: long GetVisDocTop() const { return aVisDocStartPos.Y(); } long GetVisDocRight() const { return aVisDocStartPos.X() + ( !IsVertical() ? aOutArea.GetWidth() : aOutArea.GetHeight() ); } long GetVisDocBottom() const { return aVisDocStartPos.Y() + ( !IsVertical() ? aOutArea.GetHeight() : aOutArea.GetWidth() ); } - Rectangle GetVisDocArea() const; + tools::Rectangle GetVisDocArea() const; EditSelection& GetEditSelection() { return aEditSelection; } void SetEditSelection( const EditSelection& rEditSelection ); @@ -321,7 +321,7 @@ public: void DrawSelection() { DrawSelection( aEditSelection ); } void DrawSelection( EditSelection, vcl::Region* pRegion = nullptr, OutputDevice* pTargetDevice = nullptr ); - void GetSelectionRectangles(std::vector<Rectangle>& rLogicRects); + void GetSelectionRectangles(std::vector<tools::Rectangle>& rLogicRects); vcl::Window* GetWindow() const { return pOutWin; } @@ -470,7 +470,7 @@ private: // For Formatting / Update .... std::vector<std::unique_ptr<DeletedNodeInfo> > aDeletedNodes; - Rectangle aInvalidRect; + tools::Rectangle aInvalidRect; sal_uInt32 nCurTextHeight; sal_uInt32 nCurTextHeightNTP; // without trailing empty paragraphs sal_uInt16 nOnePixelInRef; @@ -751,8 +751,8 @@ public: void FormatDoc(); void FormatFullDoc(); void UpdateViews( EditView* pCurView = nullptr ); - void Paint( ImpEditView* pView, const Rectangle& rRect, OutputDevice* pTargetDevice ); - void Paint( OutputDevice* pOutDev, Rectangle aClipRect, Point aStartPos, bool bStripOnly = false, short nOrientation = 0 ); + void Paint( ImpEditView* pView, const tools::Rectangle& rRect, OutputDevice* pTargetDevice ); + void Paint( OutputDevice* pOutDev, tools::Rectangle aClipRect, Point aStartPos, bool bStripOnly = false, short nOrientation = 0 ); bool MouseButtonUp( const MouseEvent& rMouseEvent, EditView* pView ); bool MouseButtonDown( const MouseEvent& rMouseEvent, EditView* pView ); @@ -834,8 +834,8 @@ public: bool HasParaAttrib( sal_Int32 nPara, sal_uInt16 nWhich ) const; const SfxPoolItem& GetParaAttrib( sal_Int32 nPara, sal_uInt16 nWhich ) const; - Rectangle PaMtoEditCursor( EditPaM aPaM, GetCursorFlags nFlags = GetCursorFlags::NONE ); - Rectangle GetEditCursor( ParaPortion* pPortion, sal_Int32 nIndex, GetCursorFlags nFlags = GetCursorFlags::NONE ); + tools::Rectangle PaMtoEditCursor( EditPaM aPaM, GetCursorFlags nFlags = GetCursorFlags::NONE ); + tools::Rectangle GetEditCursor( ParaPortion* pPortion, sal_Int32 nIndex, GetCursorFlags nFlags = GetCursorFlags::NONE ); bool IsModified() const { return aEditDoc.IsModified(); } void SetModifyFlag( bool b ) { aEditDoc.SetModified( b ); } diff --git a/editeng/source/editeng/impedit2.cxx b/editeng/source/editeng/impedit2.cxx index d925b2c8a0cc..64f9daaf9a2e 100644 --- a/editeng/source/editeng/impedit2.cxx +++ b/editeng/source/editeng/impedit2.cxx @@ -483,7 +483,7 @@ void ImpEditEngine::Command( const CommandEvent& rCEvt, EditView* pView ) if ( mpIMEInfos && mpIMEInfos->nLen ) { EditPaM aPaM( pView->pImpEditView->GetEditSelection().Max() ); - Rectangle aR1 = PaMtoEditCursor( aPaM ); + tools::Rectangle aR1 = PaMtoEditCursor( aPaM ); sal_Int32 nInputEnd = mpIMEInfos->aPos.GetIndex() + mpIMEInfos->nLen; @@ -495,8 +495,8 @@ void ImpEditEngine::Command( const CommandEvent& rCEvt, EditView* pView ) const EditLine& rLine = pParaPortion->GetLines()[nLine]; if ( nInputEnd > rLine.GetEnd() ) nInputEnd = rLine.GetEnd(); - Rectangle aR2 = PaMtoEditCursor( EditPaM( aPaM.GetNode(), nInputEnd ), GetCursorFlags::EndOfLine ); - Rectangle aRect = pView->GetImpEditView()->GetWindowPos( aR1 ); + tools::Rectangle aR2 = PaMtoEditCursor( EditPaM( aPaM.GetNode(), nInputEnd ), GetCursorFlags::EndOfLine ); + tools::Rectangle aRect = pView->GetImpEditView()->GetWindowPos( aR1 ); pView->GetWindow()->SetCursorRect( &aRect, aR2.Left()-aR1.Right() ); } else @@ -551,13 +551,13 @@ void ImpEditEngine::Command( const CommandEvent& rCEvt, EditView* pView ) ParaPortion* pParaPortion = GetParaPortions().SafeGetObject( GetEditDoc().GetPos( aPaM.GetNode() ) ); sal_Int32 nLine = pParaPortion->GetLines().FindLine( aPaM.GetIndex(), true ); const EditLine& rLine = pParaPortion->GetLines()[nLine]; - std::unique_ptr<Rectangle[]> aRects(new Rectangle[ mpIMEInfos->nLen ]); + std::unique_ptr<tools::Rectangle[]> aRects(new tools::Rectangle[ mpIMEInfos->nLen ]); for (sal_Int32 i = 0; i < mpIMEInfos->nLen; ++i) { sal_Int32 nInputPos = mpIMEInfos->aPos.GetIndex() + i; if ( nInputPos > rLine.GetEnd() ) nInputPos = rLine.GetEnd(); - Rectangle aR2 = GetEditCursor( pParaPortion, nInputPos ); + tools::Rectangle aR2 = GetEditCursor( pParaPortion, nInputPos ); aRects[ i ] = pView->GetImpEditView()->GetWindowPos( aR2 ); } pView->GetWindow()->SetCompositionCharRect( aRects.get(), mpIMEInfos->nLen ); @@ -671,7 +671,7 @@ void ImpEditEngine::SetText(const OUString& rText) // => The text remains. if (rText.isEmpty() && GetUpdateMode()) { - Rectangle aTmpRect( pView->GetOutputArea().TopLeft(), + tools::Rectangle aTmpRect( pView->GetOutputArea().TopLeft(), Size( aPaperSize.Width(), nCurTextHeight ) ); aTmpRect.Intersection( pView->GetOutputArea() ); pView->GetWindow()->Invalidate( aTmpRect ); @@ -1374,7 +1374,7 @@ EditPaM ImpEditEngine::CursorEndOfDoc() EditPaM ImpEditEngine::PageUp( const EditPaM& rPaM, EditView* pView ) { - Rectangle aRect = PaMtoEditCursor( rPaM ); + tools::Rectangle aRect = PaMtoEditCursor( rPaM ); Point aTopLeft = aRect.TopLeft(); aTopLeft.Y() -= pView->GetVisArea().GetHeight() *9/10; aTopLeft.X() += nOnePixelInRef; @@ -1387,7 +1387,7 @@ EditPaM ImpEditEngine::PageUp( const EditPaM& rPaM, EditView* pView ) EditPaM ImpEditEngine::PageDown( const EditPaM& rPaM, EditView* pView ) { - Rectangle aRect = PaMtoEditCursor( rPaM ); + tools::Rectangle aRect = PaMtoEditCursor( rPaM ); Point aBottomRight = aRect.BottomRight(); aBottomRight.Y() += pView->GetVisArea().GetHeight() *9/10; aBottomRight.X() += nOnePixelInRef; @@ -2976,11 +2976,11 @@ EditPaM ImpEditEngine::InsertLineBreak(const EditSelection& aCurSel) // Helper functions -Rectangle ImpEditEngine::PaMtoEditCursor( EditPaM aPaM, GetCursorFlags nFlags ) +tools::Rectangle ImpEditEngine::PaMtoEditCursor( EditPaM aPaM, GetCursorFlags nFlags ) { OSL_ENSURE( GetUpdateMode(), "Must not be reached when Update=FALSE: PaMtoEditCursor" ); - Rectangle aEditCursor; + tools::Rectangle aEditCursor; long nY = 0; for ( sal_Int32 nPortion = 0; nPortion < GetParaPortions().Count(); nPortion++ ) { @@ -4126,7 +4126,7 @@ void ImpEditEngine::CalcHeight( ParaPortion* pPortion ) } } -Rectangle ImpEditEngine::GetEditCursor( ParaPortion* pPortion, sal_Int32 nIndex, GetCursorFlags nFlags ) +tools::Rectangle ImpEditEngine::GetEditCursor( ParaPortion* pPortion, sal_Int32 nIndex, GetCursorFlags nFlags ) { OSL_ENSURE( pPortion->IsVisible(), "Why GetEditCursor() for an invisible paragraph?" ); OSL_ENSURE( IsFormatted() || GetTextRanger(), "GetEditCursor: Not formatted" ); @@ -4148,7 +4148,7 @@ Rectangle ImpEditEngine::GetEditCursor( ParaPortion* pPortion, sal_Int32 nIndex, sal_Int32 nLineCount = pPortion->GetLines().Count(); OSL_ENSURE( nLineCount, "Empty ParaPortion in GetEditCursor!" ); if (nLineCount == 0) - return Rectangle(); + return tools::Rectangle(); const EditLine* pLine = nullptr; bool bEOL( nFlags & GetCursorFlags::EndOfLine ); for (sal_Int32 nLine = 0; nLine < nLineCount; ++nLine) @@ -4176,7 +4176,7 @@ Rectangle ImpEditEngine::GetEditCursor( ParaPortion* pPortion, sal_Int32 nIndex, nY -= nSBL; } - Rectangle aEditCursor; + tools::Rectangle aEditCursor; aEditCursor.Top() = nY; nY += pLine->GetHeight(); diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx index c45f239d3885..ba3520c00572 100644 --- a/editeng/source/editeng/impedit3.cxx +++ b/editeng/source/editeng/impedit3.cxx @@ -281,8 +281,8 @@ void ImpEditEngine::UpdateViews( EditView* pCurView ) { pView->HideCursor(); - Rectangle aClipRect( aInvalidRect ); - Rectangle aVisArea( pView->GetVisArea() ); + tools::Rectangle aClipRect( aInvalidRect ); + tools::Rectangle aVisArea( pView->GetVisArea() ); aClipRect.Intersection( aVisArea ); if ( !aClipRect.IsEmpty() ) @@ -300,7 +300,7 @@ void ImpEditEngine::UpdateViews( EditView* pCurView ) pCurView->ShowCursor( bGotoCursor ); } - aInvalidRect = Rectangle(); + aInvalidRect = tools::Rectangle(); CallStatusHdl(); } @@ -372,7 +372,7 @@ void ImpEditEngine::FormatDoc() // Here already, so that not always in CreateLines... bool bMapChanged = ImpCheckRefMapMode(); - aInvalidRect = Rectangle(); // make empty + aInvalidRect = tools::Rectangle(); // make empty for ( sal_Int32 nPara = 0; nPara < GetParaPortions().Count(); nPara++ ) { ParaPortion* pParaPortion = GetParaPortions()[nPara]; @@ -404,7 +404,7 @@ void ImpEditEngine::FormatDoc() // For Paperwidth 0 (AutoPageSize) it would otherwise be Empty()... long nWidth = std::max( (long)1, ( !IsVertical() ? aPaperSize.Width() : aPaperSize.Height() ) ); Range aInvRange( GetInvalidYOffsets( pParaPortion ) ); - aInvalidRect = Rectangle( Point( 0, nY+aInvRange.Min() ), + aInvalidRect = tools::Rectangle( Point( 0, nY+aInvRange.Min() ), Size( nWidth, aInvRange.Len() ) ); } else @@ -456,7 +456,7 @@ void ImpEditEngine::FormatDoc() aSz.Height() = aMaxAutoPaperSize.Height(); else if ( aSz.Height() < aMinAutoPaperSize.Height() ) aSz.Height() = aMinAutoPaperSize.Height(); - pImpView->ResetOutputArea( Rectangle( + pImpView->ResetOutputArea( tools::Rectangle( pImpView->GetOutputArea().TopLeft(), aSz ) ); } } @@ -545,7 +545,7 @@ void ImpEditEngine::CheckAutoPageSize() aSz.Width() = aInvSize.Height(); aSz.Height() = aInvSize.Width(); } - aInvalidRect = Rectangle( Point(), aSz ); + aInvalidRect = tools::Rectangle( Point(), aSz ); for (EditView* pView : aEditViews) @@ -726,8 +726,8 @@ bool ImpEditEngine::CreateLines( sal_Int32 nPara, sal_uInt32 nStartPosY ) EditLine* pLine = &pParaPortion->GetLines()[nLine]; - static Rectangle aZeroArea = Rectangle( Point(), Point() ); - Rectangle aBulletArea( aZeroArea ); + static tools::Rectangle aZeroArea = tools::Rectangle( Point(), Point() ); + tools::Rectangle aBulletArea( aZeroArea ); if ( !nLine ) { aBulletArea = GetEditEnginePtr()->GetBulletArea( GetParaPortions().GetPos( pParaPortion ) ); @@ -1645,7 +1645,7 @@ void ImpEditEngine::CreateAndInsertEmptyLine( ParaPortion* pParaPortion, sal_uIn const SvxLineSpacingItem& rLSItem = static_cast<const SvxLineSpacingItem&>(pParaPortion->GetNode()->GetContentAttribs().GetItem( EE_PARA_SBL )); long nStartX = GetXValue( rLRItem.GetTextLeft() + rLRItem.GetTextFirstLineOfst() + nSpaceBefore ); - Rectangle aBulletArea = Rectangle( Point(), Point() ); + tools::Rectangle aBulletArea = tools::Rectangle( Point(), Point() ); if ( bLineBreak ) { nStartX = GetXValue( rLRItem.GetTextLeft() + rLRItem.GetTextFirstLineOfst() + nSpaceBeforeAndMinLabelWidth ); @@ -2905,7 +2905,7 @@ void ImpEditEngine::RecalcFormatterFontMetrics( FormatterFontMetric& rCurMetrics } } -void ImpEditEngine::Paint( OutputDevice* pOutDev, Rectangle aClipRect, Point aStartPos, bool bStripOnly, short nOrientation ) +void ImpEditEngine::Paint( OutputDevice* pOutDev, tools::Rectangle aClipRect, Point aStartPos, bool bStripOnly, short nOrientation ) { if ( !GetUpdateMode() && !bStripOnly ) return; @@ -3162,7 +3162,7 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, Rectangle aClipRect, Point aSt pOutDev->SetFillColor( COL_LIGHTGRAY ); pOutDev->SetLineColor( COL_LIGHTGRAY ); - const Rectangle aBackRect( aTopLeftRectPos, aBottomRightRectPos ); + const tools::Rectangle aBackRect( aTopLeftRectPos, aBottomRightRectPos ); pOutDev->DrawRect( aBackRect ); pOutDev->Pop(); @@ -3492,7 +3492,7 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, Rectangle aClipRect, Point aSt aTopLeft.Y() -= pLine->GetMaxAscent(); if ( nOrientation ) aTopLeft = lcl_ImplCalcRotatedPos( aTopLeft, aOrigin, nSin, nCos ); - Rectangle aRect( aTopLeft, rTextPortion.GetSize() ); + tools::Rectangle aRect( aTopLeft, rTextPortion.GetSize() ); pOutDev->DrawRect( aRect ); } @@ -3511,7 +3511,7 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, Rectangle aClipRect, Point aSt Point aTopLeft( aTmpPos ); aTopLeft.Y() -= pLine->GetMaxAscent(); - Rectangle aRect( aTopLeft, rTextPortion.GetSize() ); + tools::Rectangle aRect( aTopLeft, rTextPortion.GetSize() ); vcl::PDFExtOutDevBookmarkEntry aBookmark; aBookmark.nLinkId = pPDFExtOutDevData->CreateLink( aRect ); aBookmark.aBookmark = static_cast<const SvxURLField*>(pFieldData)->GetURL(); @@ -3713,7 +3713,7 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, Rectangle aClipRect, Point aSt pOutDev->SetFont( aOldFont ); } -void ImpEditEngine::Paint( ImpEditView* pView, const Rectangle& rRect, OutputDevice* pTargetDevice ) +void ImpEditEngine::Paint( ImpEditView* pView, const tools::Rectangle& rRect, OutputDevice* pTargetDevice ) { DBG_ASSERT( pView, "No View - No Paint!" ); @@ -3721,7 +3721,7 @@ void ImpEditEngine::Paint( ImpEditView* pView, const Rectangle& rRect, OutputDev return; // Intersection of paint area and output area. - Rectangle aClipRect( pView->GetOutputArea() ); + tools::Rectangle aClipRect( pView->GetOutputArea() ); aClipRect.Intersection( rRect ); OutputDevice* pTarget = pTargetDevice ? pTargetDevice : pView->GetWindow(); @@ -3860,7 +3860,7 @@ void ImpEditEngine::ShowParagraph( sal_Int32 nParagraph, bool bShow ) pPPortion->SetMustRepaint( true ); if ( GetUpdateMode() && !IsInUndo() && !GetTextRanger() ) { - aInvalidRect = Rectangle( Point( 0, GetParaPortions().GetYOffset( pPPortion ) ), + aInvalidRect = tools::Rectangle( Point( 0, GetParaPortions().GetYOffset( pPPortion ) ), Point( GetPaperSize().Width(), nCurTextHeight ) ); UpdateViews( GetActiveView() ); } @@ -3892,7 +3892,7 @@ EditSelection ImpEditEngine::MoveParagraphs( Range aOldPositions, sal_Int32 nNew ParaPortion* pUpperPortion = GetParaPortions().SafeGetObject( nFirstPortion ); ParaPortion* pLowerPortion = GetParaPortions().SafeGetObject( nLastPortion ); - aInvalidRect = Rectangle(); // make empty + aInvalidRect = tools::Rectangle(); // make empty aInvalidRect.Left() = 0; aInvalidRect.Right() = aPaperSize.Width(); aInvalidRect.Top() = GetParaPortions().GetYOffset( pUpperPortion ); @@ -4122,7 +4122,7 @@ void ImpEditEngine::SetCharStretching( sal_uInt16 nX, sal_uInt16 nY ) { FormatFullDoc(); // (potentially) need everything redrawn - aInvalidRect=Rectangle(0,0,1000000,1000000); + aInvalidRect=tools::Rectangle(0,0,1000000,1000000); UpdateViews( GetActiveView() ); } } diff --git a/editeng/source/editeng/impedit4.cxx b/editeng/source/editeng/impedit4.cxx index c647a820cad8..99a926075737 100644 --- a/editeng/source/editeng/impedit4.cxx +++ b/editeng/source/editeng/impedit4.cxx @@ -2389,8 +2389,8 @@ void ImpEditEngine::DoOnlineSpelling( ContentNode* pThisNodeOnly, bool bSpellAtC // clipping, ... over all views. Probably not worthwhile. EditPaM aStartPaM( pNode, nPaintFrom ); EditPaM aEndPaM( pNode, nPaintTo ); - Rectangle aStartCursor( PaMtoEditCursor( aStartPaM ) ); - Rectangle aEndCursor( PaMtoEditCursor( aEndPaM ) ); + tools::Rectangle aStartCursor( PaMtoEditCursor( aStartPaM ) ); + tools::Rectangle aEndCursor( PaMtoEditCursor( aEndPaM ) ); DBG_ASSERT( aInvalidRect.IsEmpty(), "InvalidRect set!" ); aInvalidRect.Left() = 0; aInvalidRect.Right() = GetPaperSize().Width(); @@ -2405,7 +2405,7 @@ void ImpEditEngine::DoOnlineSpelling( ContentNode* pThisNodeOnly, bool bSpellAtC { for (EditView* pView : aEditViews) { - Rectangle aClipRect( aInvalidRect ); + tools::Rectangle aClipRect( aInvalidRect ); aClipRect.Intersection( pView->GetVisArea() ); if ( !aClipRect.IsEmpty() ) { @@ -2419,7 +2419,7 @@ void ImpEditEngine::DoOnlineSpelling( ContentNode* pThisNodeOnly, bool bSpellAtC { UpdateViews( pActiveView ); } - aInvalidRect = Rectangle(); + aInvalidRect = tools::Rectangle(); } } // After two corrected nodes give up the control ... @@ -2693,7 +2693,7 @@ void ImpEditEngine::SetAutoCompleteText(const OUString& rStr, bool bClearTipWind { aAutoCompleteText = rStr; if ( bClearTipWindow && pActiveView ) - Help::ShowQuickHelp( pActiveView->GetWindow(), Rectangle(), OUString() ); + Help::ShowQuickHelp( pActiveView->GetWindow(), tools::Rectangle(), OUString() ); } namespace diff --git a/editeng/source/items/svxfont.cxx b/editeng/source/items/svxfont.cxx index 274e31f8f2ab..33b267be1fb9 100644 --- a/editeng/source/items/svxfont.cxx +++ b/editeng/source/items/svxfont.cxx @@ -55,7 +55,7 @@ SvxFont::SvxFont( const SvxFont &rFont ) SetLanguage(rFont.GetLanguage()); } -void SvxFont::DrawArrow( OutputDevice &rOut, const Rectangle& rRect, +void SvxFont::DrawArrow( OutputDevice &rOut, const tools::Rectangle& rRect, const Size& rSize, const Color& rCol, bool bLeft ) { long nLeft = ( rRect.Left() + rRect.Right() - rSize.Width() )/ 2; diff --git a/editeng/source/misc/txtrange.cxx b/editeng/source/misc/txtrange.cxx index afa88b53cbe9..08fd01941a27 100644 --- a/editeng/source/misc/txtrange.cxx +++ b/editeng/source/misc/txtrange.cxx @@ -654,10 +654,10 @@ LongDqPtr TextRanger::GetTextRanges( const Range& rRange ) return &(mRangeCache.back().results); } -const Rectangle& TextRanger::GetBoundRect_() +const tools::Rectangle& TextRanger::GetBoundRect_() { DBG_ASSERT( nullptr == pBound, "Don't call twice." ); - pBound = new Rectangle( mpPolyPolygon->GetBoundRect() ); + pBound = new tools::Rectangle( mpPolyPolygon->GetBoundRect() ); return *pBound; } diff --git a/editeng/source/outliner/outleeng.cxx b/editeng/source/outliner/outleeng.cxx index 3863c98e5919..571196e24b74 100644 --- a/editeng/source/outliner/outleeng.cxx +++ b/editeng/source/outliner/outleeng.cxx @@ -64,9 +64,9 @@ const SvxNumberFormat* OutlinerEditEng::GetNumberFormat( sal_Int32 nPara ) const } -Rectangle OutlinerEditEng::GetBulletArea( sal_Int32 nPara ) +tools::Rectangle OutlinerEditEng::GetBulletArea( sal_Int32 nPara ) { - Rectangle aBulletArea = Rectangle( Point(), Point() ); + tools::Rectangle aBulletArea = tools::Rectangle( Point(), Point() ); if ( nPara < pOwner->pParaList->GetParagraphCount() ) { if ( pOwner->ImplHasNumberFormat( nPara ) ) diff --git a/editeng/source/outliner/outleeng.hxx b/editeng/source/outliner/outleeng.hxx index daaa6696c367..093ef2991c8e 100644 --- a/editeng/source/outliner/outleeng.hxx +++ b/editeng/source/outliner/outleeng.hxx @@ -74,7 +74,7 @@ public: virtual void FieldClicked( const SvxFieldItem& rField, sal_Int32 nPara, sal_Int32 nPos ) override; virtual OUString CalcFieldValue( const SvxFieldItem& rField, sal_Int32 nPara, sal_Int32 nPos, Color*& rTxtColor, Color*& rFldColor ) override; - virtual Rectangle GetBulletArea( sal_Int32 nPara ) override; + virtual tools::Rectangle GetBulletArea( sal_Int32 nPara ) override; virtual void SetParaAttribs( sal_Int32 nPara, const SfxItemSet& rSet ) override; diff --git a/editeng/source/outliner/outlin2.cxx b/editeng/source/outliner/outlin2.cxx index 2f6d8a3d608d..d3504c94b24f 100644 --- a/editeng/source/outliner/outlin2.cxx +++ b/editeng/source/outliner/outlin2.cxx @@ -173,7 +173,7 @@ OUString Outliner::GetWord( sal_Int32 nPara, sal_Int32 nIndex ) return pEditEngine->GetWord( nPara, nIndex ); } -void Outliner::Draw( OutputDevice* pOutDev, const Rectangle& rOutRect ) +void Outliner::Draw( OutputDevice* pOutDev, const tools::Rectangle& rOutRect ) { pEditEngine->Draw( pOutDev, rOutRect ); } @@ -444,7 +444,7 @@ bool Outliner::IsTextPos( const Point& rPaperPos, sal_uInt16 nBorder, bool* pbBu sal_Int32 nPara = pEditEngine->FindParagraph( aDocPos.Y() ); if ( ( nPara != EE_PARA_NOT_FOUND ) && ImplHasNumberFormat( nPara ) ) { - Rectangle aBulArea = ImpCalcBulletArea( nPara, true, true ); + tools::Rectangle aBulArea = ImpCalcBulletArea( nPara, true, true ); if ( aBulArea.IsInside( rPaperPos ) ) { bTextPos = true; diff --git a/editeng/source/outliner/outliner.cxx b/editeng/source/outliner/outliner.cxx index 014ece747009..3f7914ff2ad2 100644 --- a/editeng/source/outliner/outliner.cxx +++ b/editeng/source/outliner/outliner.cxx @@ -893,10 +893,10 @@ void Outliner::PaintBullet( sal_Int32 nPara, const Point& rStartPos, bool bRightToLeftPara = pEditEngine->IsRightToLeft( nPara ); - Rectangle aBulletArea( ImpCalcBulletArea( nPara, true, false ) ); + tools::Rectangle aBulletArea( ImpCalcBulletArea( nPara, true, false ) ); sal_uInt16 nStretchX, nStretchY; GetGlobalCharStretching(nStretchX, nStretchY); - aBulletArea = Rectangle( Point(aBulletArea.Left()*nStretchX/100, + aBulletArea = tools::Rectangle( Point(aBulletArea.Left()*nStretchX/100, aBulletArea.Top()), Size(aBulletArea.GetWidth()*nStretchX/100, aBulletArea.GetHeight()) ); @@ -1066,7 +1066,7 @@ void Outliner::InvalidateBullet(sal_Int32 nPara) for (OutlinerView* pView : aViewList) { Point aPos( pView->pEditView->GetWindowPosTopLeft(nPara ) ); - Rectangle aRect( pView->GetOutputArea() ); + tools::Rectangle aRect( pView->GetOutputArea() ); aRect.Right() = aPos.X(); aRect.Top() = aPos.Y(); aRect.Bottom() = aPos.Y(); @@ -1508,10 +1508,10 @@ void Outliner::StyleSheetChanged( SfxStyleSheet* pStyle ) } } -Rectangle Outliner::ImpCalcBulletArea( sal_Int32 nPara, bool bAdjust, bool bReturnPaperPos ) +tools::Rectangle Outliner::ImpCalcBulletArea( sal_Int32 nPara, bool bAdjust, bool bReturnPaperPos ) { // Bullet area within the paragraph ... - Rectangle aBulletArea; + tools::Rectangle aBulletArea; const SvxNumberFormat* pFmt = GetNumberFormat( nPara ); if ( pFmt ) @@ -1581,7 +1581,7 @@ Rectangle Outliner::ImpCalcBulletArea( sal_Int32 nPara, bool bAdjust, bool bRetu if ( aTopLeft.X() < 0 ) // then push aTopLeft.X() = 0; - aBulletArea = Rectangle( aTopLeft, aBulletSize ); + aBulletArea = tools::Rectangle( aTopLeft, aBulletSize ); } if ( bReturnPaperPos ) { @@ -1605,7 +1605,7 @@ Rectangle Outliner::ImpCalcBulletArea( sal_Int32 nPara, bool bAdjust, bool bRetu aBulletPos.X() = GetPaperSize().Width() - aBulletDocPos.X() - aBulletSize.Width(); } - aBulletArea = Rectangle( aBulletPos, aBulletSize ); + aBulletArea = tools::Rectangle( aBulletPos, aBulletSize ); } return aBulletArea; } diff --git a/editeng/source/outliner/outlvw.cxx b/editeng/source/outliner/outlvw.cxx index a08eb17d641b..3d34502f611f 100644 --- a/editeng/source/outliner/outlvw.cxx +++ b/editeng/source/outliner/outlvw.cxx @@ -60,7 +60,7 @@ OutlinerView::~OutlinerView() { } -void OutlinerView::Paint( const Rectangle& rRect, OutputDevice* pTargetDevice ) +void OutlinerView::Paint( const tools::Rectangle& rRect, OutputDevice* pTargetDevice ) { // For the first Paint/KeyInput/Drop an empty Outliner is turned into // an Outliner with exactly one paragraph. @@ -253,8 +253,8 @@ sal_Int32 OutlinerView::ImpCheckMousePos(const Point& rPosPix, MouseTarget& reTa reTarget = MouseTarget::Text; Point aPaperPos( aMousePosWin ); - Rectangle aOutArea = pEditView->GetOutputArea(); - Rectangle aVisArea = pEditView->GetVisArea(); + tools::Rectangle aOutArea = pEditView->GetOutputArea(); + tools::Rectangle aVisArea = pEditView->GetVisArea(); aPaperPos.X() -= aOutArea.Left(); aPaperPos.X() += aVisArea.Left(); aPaperPos.Y() -= aOutArea.Top(); @@ -572,7 +572,7 @@ void OutlinerView::AdjustHeight( long nDY ) pEditView->MoveParagraphs( nDY ); } -Rectangle OutlinerView::GetVisArea() const +tools::Rectangle OutlinerView::GetVisArea() const { return pEditView->GetVisArea(); } @@ -1193,7 +1193,7 @@ void OutlinerView::InsertText( const OUString& rNew, bool bSelect ) pEditView->InsertText( rNew, bSelect ); } -void OutlinerView::SetVisArea( const Rectangle& rRect ) +void OutlinerView::SetVisArea( const tools::Rectangle& rRect ) { pEditView->SetVisArea( rRect ); } @@ -1204,7 +1204,7 @@ void OutlinerView::SetSelection( const ESelection& rSel ) pEditView->SetSelection( rSel ); } -void OutlinerView::GetSelectionRectangles(std::vector<Rectangle>& rLogicRects) const +void OutlinerView::GetSelectionRectangles(std::vector<tools::Rectangle>& rLogicRects) const { pEditView->GetSelectionRectangles(rLogicRects); } @@ -1244,12 +1244,12 @@ vcl::Window* OutlinerView::GetWindow() const return pEditView->GetWindow(); } -void OutlinerView::SetOutputArea( const Rectangle& rRect ) +void OutlinerView::SetOutputArea( const tools::Rectangle& rRect ) { pEditView->SetOutputArea( rRect ); } -Rectangle OutlinerView::GetOutputArea() const +tools::Rectangle OutlinerView::GetOutputArea() const { return pEditView->GetOutputArea(); } diff --git a/editeng/source/uno/unoedhlp.cxx b/editeng/source/uno/unoedhlp.cxx index 54839155d4c4..00f27fddea8e 100644 --- a/editeng/source/uno/unoedhlp.cxx +++ b/editeng/source/uno/unoedhlp.cxx @@ -255,9 +255,9 @@ Point SvxEditSourceHelper::UserSpaceToEE( const Point& rPoint, const Size& rEESi return bIsVertical ? Point( rPoint.Y(), -rPoint.X() + rEESize.Height() ) : rPoint; } -Rectangle SvxEditSourceHelper::EEToUserSpace( const Rectangle& rRect, const Size& rEESize, bool bIsVertical ) +tools::Rectangle SvxEditSourceHelper::EEToUserSpace( const tools::Rectangle& rRect, const Size& rEESize, bool bIsVertical ) { - return bIsVertical ? Rectangle( EEToUserSpace(rRect.BottomLeft(), rEESize, bIsVertical), + return bIsVertical ? tools::Rectangle( EEToUserSpace(rRect.BottomLeft(), rEESize, bIsVertical), EEToUserSpace(rRect.TopRight(), rEESize, bIsVertical) ) : rRect; } diff --git a/editeng/source/uno/unoedprx.cxx b/editeng/source/uno/unoedprx.cxx index 363ed425f6c9..7ddbb28a4d3a 100644 --- a/editeng/source/uno/unoedprx.cxx +++ b/editeng/source/uno/unoedprx.cxx @@ -693,7 +693,7 @@ bool SvxAccessibleTextAdapter::GetUpdateModeForAcc( ) const return mpTextForwarder->GetUpdateModeForAcc(); } -Rectangle SvxAccessibleTextAdapter::GetCharBounds( sal_Int32 nPara, sal_Int32 nIndex ) const +tools::Rectangle SvxAccessibleTextAdapter::GetCharBounds( sal_Int32 nPara, sal_Int32 nIndex ) const { assert(mpTextForwarder && "SvxAccessibleTextAdapter: no forwarder"); @@ -702,7 +702,7 @@ Rectangle SvxAccessibleTextAdapter::GetCharBounds( sal_Int32 nPara, sal_Int32 nI // preset if anything goes wrong below // n-th char in GetParagraphIndex's paragraph - Rectangle aRect = mpTextForwarder->GetCharBounds( nPara, aIndex.GetEEIndex() ); + tools::Rectangle aRect = mpTextForwarder->GetCharBounds( nPara, aIndex.GetEEIndex() ); if( aIndex.InBullet() ) { @@ -740,7 +740,7 @@ Rectangle SvxAccessibleTextAdapter::GetCharBounds( sal_Int32 nPara, sal_Int32 nI aFont, mpTextForwarder->GetText( aSel ) ); - Rectangle aStartRect = mpTextForwarder->GetCharBounds( nPara, aIndex.GetEEIndex() ); + tools::Rectangle aStartRect = mpTextForwarder->GetCharBounds( nPara, aIndex.GetEEIndex() ); aStringWrap.GetCharacterBounds( aIndex.GetFieldOffset(), aRect ); aRect.Move( aStartRect.Left(), aStartRect.Top() ); @@ -751,7 +751,7 @@ Rectangle SvxAccessibleTextAdapter::GetCharBounds( sal_Int32 nPara, sal_Int32 nI return aRect; } -Rectangle SvxAccessibleTextAdapter::GetParaBounds( sal_Int32 nPara ) const +tools::Rectangle SvxAccessibleTextAdapter::GetParaBounds( sal_Int32 nPara ) const { assert(mpTextForwarder && "SvxAccessibleTextAdapter: no forwarder"); @@ -762,7 +762,7 @@ Rectangle SvxAccessibleTextAdapter::GetParaBounds( sal_Int32 nPara ) const aBulletInfo.nType != SVX_NUM_BITMAP ) { // include bullet in para bounding box - Rectangle aRect( mpTextForwarder->GetParaBounds( nPara ) ); + tools::Rectangle aRect( mpTextForwarder->GetParaBounds( nPara ) ); aRect.Union( aBulletInfo.aBounds ); @@ -846,7 +846,7 @@ bool SvxAccessibleTextAdapter::GetIndexAtPoint( const Point& rPoint, sal_Int32& aFont, mpTextForwarder->GetText( aSelection ) ); - Rectangle aRect = mpTextForwarder->GetCharBounds( nPara, aIndex.GetEEIndex() ); + tools::Rectangle aRect = mpTextForwarder->GetCharBounds( nPara, aIndex.GetEEIndex() ); Point aPoint = rPoint; aPoint.Move( -aRect.Left(), -aRect.Top() ); @@ -1140,7 +1140,7 @@ bool SvxAccessibleTextEditViewAdapter::IsValid() const return false; } -Rectangle SvxAccessibleTextEditViewAdapter::GetVisArea() const +tools::Rectangle SvxAccessibleTextEditViewAdapter::GetVisArea() const { DBG_ASSERT(mpViewForwarder, "SvxAccessibleTextEditViewAdapter: no forwarder"); diff --git a/editeng/source/uno/unofored.cxx b/editeng/source/uno/unofored.cxx index f2063e4d515a..2d18e32c3a33 100644 --- a/editeng/source/uno/unofored.cxx +++ b/editeng/source/uno/unofored.cxx @@ -285,7 +285,7 @@ EBulletInfo SvxEditEngineForwarder::GetBulletInfo( sal_Int32 ) const return EBulletInfo(); } -Rectangle SvxEditEngineForwarder::GetCharBounds( sal_Int32 nPara, sal_Int32 nIndex ) const +tools::Rectangle SvxEditEngineForwarder::GetCharBounds( sal_Int32 nPara, sal_Int32 nIndex ) const { // EditEngine's 'internal' methods like GetCharacterBounds() // don't rotate for vertical text. @@ -296,7 +296,7 @@ Rectangle SvxEditEngineForwarder::GetCharBounds( sal_Int32 nPara, sal_Int32 nInd // #108900# Handle virtual position one-past-the end of the string if( nIndex >= rEditEngine.GetTextLen(nPara) ) { - Rectangle aLast; + tools::Rectangle aLast; if( nIndex ) { @@ -332,7 +332,7 @@ Rectangle SvxEditEngineForwarder::GetCharBounds( sal_Int32 nPara, sal_Int32 nInd } } -Rectangle SvxEditEngineForwarder::GetParaBounds( sal_Int32 nPara ) const +tools::Rectangle SvxEditEngineForwarder::GetParaBounds( sal_Int32 nPara ) const { const Point aPnt = rEditEngine.GetDocPosTopLeft( nPara ); sal_uLong nWidth; @@ -348,14 +348,14 @@ Rectangle SvxEditEngineForwarder::GetParaBounds( sal_Int32 nPara ) const nHeight = rEditEngine.GetTextHeight(); nTextWidth = rEditEngine.GetTextHeight(); - return Rectangle( nTextWidth - aPnt.Y() - nWidth, 0, nTextWidth - aPnt.Y(), nHeight ); + return tools::Rectangle( nTextWidth - aPnt.Y() - nWidth, 0, nTextWidth - aPnt.Y(), nHeight ); } else { nWidth = rEditEngine.CalcTextWidth(); nHeight = rEditEngine.GetTextHeight( nPara ); - return Rectangle( 0, aPnt.Y(), nWidth, aPnt.Y() + nHeight ); + return tools::Rectangle( 0, aPnt.Y(), nWidth, aPnt.Y() + nHeight ); } } diff --git a/editeng/source/uno/unoforou.cxx b/editeng/source/uno/unoforou.cxx index 6e75f2ae44f8..f1d16b76fda1 100644 --- a/editeng/source/uno/unoforou.cxx +++ b/editeng/source/uno/unoforou.cxx @@ -287,7 +287,7 @@ EBulletInfo SvxOutlinerForwarder::GetBulletInfo( sal_Int32 nPara ) const return rOutliner.GetBulletInfo( nPara ); } -Rectangle SvxOutlinerForwarder::GetCharBounds( sal_Int32 nPara, sal_Int32 nIndex ) const +tools::Rectangle SvxOutlinerForwarder::GetCharBounds( sal_Int32 nPara, sal_Int32 nIndex ) const { // EditEngine's 'internal' methods like GetCharacterBounds() // don't rotate for vertical text. @@ -298,7 +298,7 @@ Rectangle SvxOutlinerForwarder::GetCharBounds( sal_Int32 nPara, sal_Int32 nIndex // #108900# Handle virtual position one-past-the end of the string if( nIndex >= GetTextLen(nPara) ) { - Rectangle aLast; + tools::Rectangle aLast; if( nIndex ) { @@ -334,7 +334,7 @@ Rectangle SvxOutlinerForwarder::GetCharBounds( sal_Int32 nPara, sal_Int32 nIndex } } -Rectangle SvxOutlinerForwarder::GetParaBounds( sal_Int32 nPara ) const +tools::Rectangle SvxOutlinerForwarder::GetParaBounds( sal_Int32 nPara ) const { Point aPnt = rOutliner.GetDocPosTopLeft( nPara ); Size aSize = rOutliner.CalcTextSize(); @@ -346,13 +346,13 @@ Rectangle SvxOutlinerForwarder::GetParaBounds( sal_Int32 nPara ) const // don't rotate. sal_uLong nWidth = rOutliner.GetTextHeight( nPara ); - return Rectangle( aSize.Width() - aPnt.Y() - nWidth, 0, aSize.Width() - aPnt.Y(), aSize.Height() ); + return tools::Rectangle( aSize.Width() - aPnt.Y() - nWidth, 0, aSize.Width() - aPnt.Y(), aSize.Height() ); } else { sal_uLong nHeight = rOutliner.GetTextHeight( nPara ); - return Rectangle( 0, aPnt.Y(), aSize.Width(), aPnt.Y() + nHeight ); + return tools::Rectangle( 0, aPnt.Y(), aSize.Width(), aPnt.Y() + nHeight ); } } diff --git a/editeng/source/uno/unotext.cxx b/editeng/source/uno/unotext.cxx index 0263f955b9f4..e18a660e5df3 100644 --- a/editeng/source/uno/unotext.cxx +++ b/editeng/source/uno/unotext.cxx @@ -2439,14 +2439,14 @@ EBulletInfo SvxDummyTextSource::GetBulletInfo( sal_Int32 ) const return EBulletInfo(); } -Rectangle SvxDummyTextSource::GetCharBounds( sal_Int32, sal_Int32 ) const +tools::Rectangle SvxDummyTextSource::GetCharBounds( sal_Int32, sal_Int32 ) const { - return Rectangle(); + return tools::Rectangle(); } -Rectangle SvxDummyTextSource::GetParaBounds( sal_Int32 ) const +tools::Rectangle SvxDummyTextSource::GetParaBounds( sal_Int32 ) const { - return Rectangle(); + return tools::Rectangle(); } MapMode SvxDummyTextSource::GetMapMode() const diff --git a/editeng/source/uno/unoviwou.cxx b/editeng/source/uno/unoviwou.cxx index 106002919d30..96f445e7cb02 100644 --- a/editeng/source/uno/unoviwou.cxx +++ b/editeng/source/uno/unoviwou.cxx @@ -41,7 +41,7 @@ SvxDrawOutlinerViewForwarder::~SvxDrawOutlinerViewForwarder() Point SvxDrawOutlinerViewForwarder::GetTextOffset() const { // calc text offset from shape anchor - Rectangle aOutputRect( mrOutlinerView.GetOutputArea() ); + tools::Rectangle aOutputRect( mrOutlinerView.GetOutputArea() ); return aOutputRect.TopLeft() - maTextShapeTopLeft; } @@ -51,13 +51,13 @@ bool SvxDrawOutlinerViewForwarder::IsValid() const return true; } -Rectangle SvxDrawOutlinerViewForwarder::GetVisArea() const +tools::Rectangle SvxDrawOutlinerViewForwarder::GetVisArea() const { OutputDevice* pOutDev = mrOutlinerView.GetWindow(); if( pOutDev ) { - Rectangle aVisArea = mrOutlinerView.GetVisArea(); + tools::Rectangle aVisArea = mrOutlinerView.GetVisArea(); Point aTextOffset( GetTextOffset() ); aVisArea.Move( aTextOffset.X(), aTextOffset.Y() ); @@ -76,7 +76,7 @@ Rectangle SvxDrawOutlinerViewForwarder::GetVisArea() const } } - return Rectangle(); + return tools::Rectangle(); } Point SvxDrawOutlinerViewForwarder::LogicToPixel( const Point& rPoint, const MapMode& rMapMode ) const diff --git a/embeddedobj/source/general/docholder.cxx b/embeddedobj/source/general/docholder.cxx index 8626b51e41ec..941cb6ff36bf 100644 --- a/embeddedobj/source/general/docholder.cxx +++ b/embeddedobj/source/general/docholder.cxx @@ -889,7 +889,7 @@ uno::Reference< frame::XFrame > const & DocumentHolder::GetDocFrame() { sal_Int32 nDisplay = Application::GetDisplayBuiltInScreen(); - Rectangle aWorkRect = Application::GetScreenPosSizePixel( nDisplay ); + tools::Rectangle aWorkRect = Application::GetScreenPosSizePixel( nDisplay ); awt::Rectangle aWindowRect = xHWindow->getPosSize(); if (( aWindowRect.Width < aWorkRect.GetWidth()) && ( aWindowRect.Height < aWorkRect.GetHeight() )) diff --git a/extensions/source/propctrlr/browserlistbox.cxx b/extensions/source/propctrlr/browserlistbox.cxx index 0e8055b436a0..269b14d033dc 100644 --- a/extensions/source/propctrlr/browserlistbox.cxx +++ b/extensions/source/propctrlr/browserlistbox.cxx @@ -417,13 +417,13 @@ namespace pcr void OBrowserListBox::Resize() { - Rectangle aPlayground( Point( 0, 0 ), GetOutputSizePixel() ); + tools::Rectangle aPlayground( Point( 0, 0 ), GetOutputSizePixel() ); Size aHelpWindowDistance( LogicToPixel( Size( 0, LAYOUT_HELP_WINDOW_DISTANCE_APPFONT ), MapUnit::MapAppFont ) ); long nHelpWindowHeight = m_nCurrentPreferredHelpHeight = impl_getPrefererredHelpHeight(); bool bPositionHelpWindow = ( nHelpWindowHeight != 0 ); - Rectangle aLinesArea( aPlayground ); + tools::Rectangle aLinesArea( aPlayground ); if ( bPositionHelpWindow ) { aLinesArea.Bottom() -= nHelpWindowHeight; @@ -471,7 +471,7 @@ namespace pcr // position the help window if ( bPositionHelpWindow ) { - Rectangle aHelpArea( aPlayground ); + tools::Rectangle aHelpArea( aPlayground ); aHelpArea.Top() = aLinesArea.Bottom() + aHelpWindowDistance.Height(); m_pHelpWindow->SetPosSizePixel( aHelpArea.TopLeft(), aHelpArea.GetSize() ); } diff --git a/extensions/source/propctrlr/inspectorhelpwindow.cxx b/extensions/source/propctrlr/inspectorhelpwindow.cxx index 5641015f5461..bb4edca2a414 100644 --- a/extensions/source/propctrlr/inspectorhelpwindow.cxx +++ b/extensions/source/propctrlr/inspectorhelpwindow.cxx @@ -111,7 +111,7 @@ namespace pcr long nMinTextWindowHeight = impl_getMinimalTextWindowHeight(); long nMaxTextWindowHeight = impl_getMaximalTextWindowHeight(); - Rectangle aTextRect( Point( 0, 0 ), m_aHelpText->GetOutputSizePixel() ); + tools::Rectangle aTextRect( Point( 0, 0 ), m_aHelpText->GetOutputSizePixel() ); aTextRect = m_aHelpText->GetTextRect( aTextRect, m_aHelpText->GetText(), DrawTextFlags::Left | DrawTextFlags::Top | DrawTextFlags::MultiLine | DrawTextFlags::WordBreak ); long nActTextWindowHeight = impl_getHelpTextBorderHeight() + aTextRect.GetHeight(); @@ -127,13 +127,13 @@ namespace pcr { Size a3AppFont( LogicToPixel( Size( 3, 3 ), MapUnit::MapAppFont ) ); - Rectangle aPlayground( Point( 0, 0 ), GetOutputSizePixel() ); + tools::Rectangle aPlayground( Point( 0, 0 ), GetOutputSizePixel() ); - Rectangle aSeparatorArea( aPlayground ); + tools::Rectangle aSeparatorArea( aPlayground ); aSeparatorArea.Bottom() = aSeparatorArea.Top() + LogicToPixel( Size( 0, 8 ), MapUnit::MapAppFont ).Height(); m_aSeparator->SetPosSizePixel( aSeparatorArea.TopLeft(), aSeparatorArea.GetSize() ); - Rectangle aTextArea( aPlayground ); + tools::Rectangle aTextArea( aPlayground ); aTextArea.Top() = aSeparatorArea.Bottom() + a3AppFont.Height(); m_aHelpText->SetPosSizePixel( aTextArea.TopLeft(), aTextArea.GetSize() ); } diff --git a/extensions/source/propctrlr/propertyeditor.cxx b/extensions/source/propctrlr/propertyeditor.cxx index 2da1083025f0..714e640cc0ec 100644 --- a/extensions/source/propctrlr/propertyeditor.cxx +++ b/extensions/source/propctrlr/propertyeditor.cxx @@ -114,7 +114,7 @@ namespace pcr sal_uInt16 nFirstID = m_aTabControl->GetPageId( 0 ); // reserve space for the tabs themself - Rectangle aTabArea( m_aTabControl->GetTabBounds( nFirstID ) ); + tools::Rectangle aTabArea( m_aTabControl->GetTabBounds( nFirstID ) ); nMinHeight += aTabArea.GetHeight(); // ask the page how much it requires @@ -201,7 +201,7 @@ namespace pcr void OPropertyEditor::Resize() { - Rectangle aPlayground( + tools::Rectangle aPlayground( Point( LAYOUT_BORDER_LEFT, LAYOUT_BORDER_TOP ), Size( GetOutputSizePixel().Width() - LAYOUT_BORDER_LEFT - LAYOUT_BORDER_RIGHT, @@ -209,7 +209,7 @@ namespace pcr ) ); - Rectangle aTabArea( aPlayground ); + tools::Rectangle aTabArea( aPlayground ); m_aTabControl->SetPosSizePixel( aTabArea.TopLeft(), aTabArea.GetSize() ); } diff --git a/extensions/source/propctrlr/standardcontrol.cxx b/extensions/source/propctrlr/standardcontrol.cxx index 1b60b7f57a7c..556435ad829e 100644 --- a/extensions/source/propctrlr/standardcontrol.cxx +++ b/extensions/source/propctrlr/standardcontrol.cxx @@ -1120,7 +1120,7 @@ namespace pcr ::Point aMePos= GetPosPixel(); aMePos = GetParent()->OutputToScreenPixel( aMePos ); ::Size aSize=GetSizePixel(); - ::Rectangle aRect(aMePos,aSize); + ::tools::Rectangle aRect(aMePos,aSize); aSize.Height() = STD_HEIGHT; m_pFloatingEdit->SetOutputSizePixel(aSize); m_pFloatingEdit->StartPopupMode( aRect, FloatWinPopupFlags::Down ); diff --git a/extensions/source/scanner/grid.cxx b/extensions/source/scanner/grid.cxx index f7d08a96a28a..fac5f706ca10 100644 --- a/extensions/source/scanner/grid.cxx +++ b/extensions/source/scanner/grid.cxx @@ -60,12 +60,12 @@ class GridWindow : public vcl::Window bool isHit(vcl::Window& rWin, const Point& rPos) { const Point aOffset(rWin.PixelToLogic(Point(mnOffX, mnOffY))); - const Rectangle aTarget(maPos - aOffset, maPos + aOffset); + const tools::Rectangle aTarget(maPos - aOffset, maPos + aOffset); return aTarget.IsInside(rPos); } }; - Rectangle m_aGridArea; + tools::Rectangle m_aGridArea; double m_fMinX; double m_fMinY; @@ -132,7 +132,7 @@ public: void ChangeMode(ResetType nType); - virtual void Paint( vcl::RenderContext& /*rRenderContext*/, const Rectangle& rRect ) override; + virtual void Paint( vcl::RenderContext& /*rRenderContext*/, const tools::Rectangle& rRect ) override; }; GridWindow::GridWindow(vcl::Window* pParent) @@ -528,7 +528,7 @@ void GridWindow::drawHandles(vcl::RenderContext& rRenderContext) } } -void GridWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) +void GridWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) { Window::Paint(rRenderContext, rRect); drawGrid(rRenderContext); diff --git a/extensions/source/scanner/sanedlg.cxx b/extensions/source/scanner/sanedlg.cxx index 50033df310a9..cc712b24ccd3 100644 --- a/extensions/source/scanner/sanedlg.cxx +++ b/extensions/source/scanner/sanedlg.cxx @@ -52,14 +52,14 @@ void DrawRectangles(vcl::RenderContext& rRenderContext, Point& rUL, Point& rBR) rRenderContext.DrawLine(aBL, rBR); rRenderContext.DrawLine(rBR, aUR); rRenderContext.DrawLine(aUR, rUL); - rRenderContext.DrawRect(Rectangle(rUL, Size(RECT_SIZE_PIX,RECT_SIZE_PIX))); - rRenderContext.DrawRect(Rectangle(aBL, Size(RECT_SIZE_PIX, -RECT_SIZE_PIX))); - rRenderContext.DrawRect(Rectangle(rBR, Size(-RECT_SIZE_PIX, -RECT_SIZE_PIX))); - rRenderContext.DrawRect(Rectangle(aUR, Size(-RECT_SIZE_PIX, RECT_SIZE_PIX ))); - rRenderContext.DrawRect(Rectangle(Point(nMiddleX - RECT_SIZE_PIX / 2, rUL.Y()), Size(RECT_SIZE_PIX, RECT_SIZE_PIX))); - rRenderContext.DrawRect(Rectangle(Point(nMiddleX - RECT_SIZE_PIX / 2, rBR.Y()), Size(RECT_SIZE_PIX, -RECT_SIZE_PIX))); - rRenderContext.DrawRect(Rectangle(Point(rUL.X(), nMiddleY - RECT_SIZE_PIX / 2), Size(RECT_SIZE_PIX, RECT_SIZE_PIX))); - rRenderContext.DrawRect(Rectangle(Point(rBR.X(), nMiddleY - RECT_SIZE_PIX / 2), Size(-RECT_SIZE_PIX, RECT_SIZE_PIX))); + rRenderContext.DrawRect(tools::Rectangle(rUL, Size(RECT_SIZE_PIX,RECT_SIZE_PIX))); + rRenderContext.DrawRect(tools::Rectangle(aBL, Size(RECT_SIZE_PIX, -RECT_SIZE_PIX))); + rRenderContext.DrawRect(tools::Rectangle(rBR, Size(-RECT_SIZE_PIX, -RECT_SIZE_PIX))); + rRenderContext.DrawRect(tools::Rectangle(aUR, Size(-RECT_SIZE_PIX, RECT_SIZE_PIX ))); + rRenderContext.DrawRect(tools::Rectangle(Point(nMiddleX - RECT_SIZE_PIX / 2, rUL.Y()), Size(RECT_SIZE_PIX, RECT_SIZE_PIX))); + rRenderContext.DrawRect(tools::Rectangle(Point(nMiddleX - RECT_SIZE_PIX / 2, rBR.Y()), Size(RECT_SIZE_PIX, -RECT_SIZE_PIX))); + rRenderContext.DrawRect(tools::Rectangle(Point(rUL.X(), nMiddleY - RECT_SIZE_PIX / 2), Size(RECT_SIZE_PIX, RECT_SIZE_PIX))); + rRenderContext.DrawRect(tools::Rectangle(Point(rBR.X(), nMiddleY - RECT_SIZE_PIX / 2), Size(-RECT_SIZE_PIX, RECT_SIZE_PIX))); } } @@ -71,7 +71,7 @@ private: BottomLeft, Left }; Bitmap maPreviewBitmap; - Rectangle maPreviewRect; + tools::Rectangle maPreviewRect; Point maTopLeft, maBottomRight; Point maMinTopLeft, maMaxBottomRight; VclPtr<SaneDlg> mpParentDialog; @@ -129,7 +129,7 @@ public: return mbDragEnable; } - virtual void Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) override; + virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) override; virtual void MouseButtonDown(const MouseEvent& rMEvt) override; virtual void MouseMove(const MouseEvent& rMEvt) override; virtual void MouseButtonUp(const MouseEvent& rMEvt) override; @@ -175,7 +175,7 @@ public: { maTopLeft = GetPixelPos(rTopLeft); maBottomRight = GetPixelPos(rBottomRight); - maPreviewRect = Rectangle(maTopLeft, + maPreviewRect = tools::Rectangle(maTopLeft, Size(maBottomRight.X() - maTopLeft.X(), maBottomRight.Y() - maTopLeft.Y())); } @@ -918,7 +918,7 @@ void ScanPreview::UpdatePreviewBounds() { if( mbDragEnable ) { - maPreviewRect = Rectangle( maTopLeft, + maPreviewRect = tools::Rectangle( maTopLeft, Size( maBottomRight.X() - maTopLeft.X(), maBottomRight.Y() - maTopLeft.Y() ) ); @@ -929,27 +929,27 @@ void ScanPreview::UpdatePreviewBounds() if( aBMSize.Width() > aBMSize.Height() && aBMSize.Width() ) { int nVHeight = (maBottomRight.X() - maTopLeft.X()) * aBMSize.Height() / aBMSize.Width(); - maPreviewRect = Rectangle( Point( maTopLeft.X(), ( maTopLeft.Y() + maBottomRight.Y() )/2 - nVHeight/2 ), + maPreviewRect = tools::Rectangle( Point( maTopLeft.X(), ( maTopLeft.Y() + maBottomRight.Y() )/2 - nVHeight/2 ), Size( maBottomRight.X() - maTopLeft.X(), nVHeight ) ); } else if (aBMSize.Height()) { int nVWidth = (maBottomRight.Y() - maTopLeft.Y()) * aBMSize.Width() / aBMSize.Height(); - maPreviewRect = Rectangle( Point( ( maTopLeft.X() + maBottomRight.X() )/2 - nVWidth/2, maTopLeft.Y() ), + maPreviewRect = tools::Rectangle( Point( ( maTopLeft.X() + maBottomRight.X() )/2 - nVWidth/2, maTopLeft.Y() ), Size( nVWidth, maBottomRight.Y() - maTopLeft.Y() ) ); } } } -void ScanPreview::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) +void ScanPreview::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) { Window::Paint(rRenderContext, rRect); rRenderContext.SetMapMode(MapUnit::MapAppFont); rRenderContext.SetFillColor(Color(COL_WHITE)); rRenderContext.SetLineColor(Color(COL_WHITE)); - rRenderContext.DrawRect(Rectangle(Point(0, 0), + rRenderContext.DrawRect(tools::Rectangle(Point(0, 0), Size(PREVIEW_WIDTH, PREVIEW_HEIGHT))); rRenderContext.SetMapMode(MapMode(MapUnit::MapPixel)); // check for sane values diff --git a/extensions/source/update/ui/updatecheckui.cxx b/extensions/source/update/ui/updatecheckui.cxx index 1f40751a423c..710e4256965e 100644 --- a/extensions/source/update/ui/updatecheckui.cxx +++ b/extensions/source/update/ui/updatecheckui.cxx @@ -93,8 +93,8 @@ class BubbleWindow : public FloatingWindow OUString maBubbleText; Image maBubbleImage; Size maMaxTextSize; - Rectangle maTitleRect; - Rectangle maTextRect; + tools::Rectangle maTitleRect; + tools::Rectangle maTextRect; long mnTipOffset; private: @@ -105,7 +105,7 @@ public: const OUString& rText, const Image& rImage ); virtual void MouseButtonDown( const MouseEvent& rMEvt ) override; - virtual void Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) override; + virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) override; void Resize() override; void Show( bool bVisible = true, ShowFlags nFlags = ShowFlags::NoActivate ); void SetTipPosPixel( const Point& rTipPos ) { maTipPos = rTipPos; } @@ -487,7 +487,7 @@ VclPtr<BubbleWindow> UpdateCheckUI::GetBubbleWindow() if ( !mpIconSysWin ) return nullptr; - Rectangle aIconRect = mpIconMBar->GetMenuBarButtonRectPixel( mnIconID ); + tools::Rectangle aIconRect = mpIconMBar->GetMenuBarButtonRectPixel( mnIconID ); if( aIconRect.IsEmpty() ) return nullptr; @@ -668,7 +668,7 @@ IMPL_LINK( UpdateCheckUI, WindowEventHdl, VclWindowEvent&, rEvent, void ) if ( ( mpIconSysWin == rEvent.GetWindow() ) && mpBubbleWin && ( mpIconMBar != nullptr ) ) { - Rectangle aIconRect = mpIconMBar->GetMenuBarButtonRectPixel( mnIconID ); + tools::Rectangle aIconRect = mpIconMBar->GetMenuBarButtonRectPixel( mnIconID ); Point aWinPos = aIconRect.BottomCenter(); mpBubbleWin->SetTipPosPixel( aWinPos ); if ( mpBubbleWin->IsVisible() ) @@ -738,7 +738,7 @@ void BubbleWindow::Resize() if ( ( aSize.Height() < 20 ) || ( aSize.Width() < 60 ) ) return; - Rectangle aRect( 0, TIP_HEIGHT, aSize.Width(), aSize.Height() - TIP_HEIGHT ); + tools::Rectangle aRect( 0, TIP_HEIGHT, aSize.Width(), aSize.Height() - TIP_HEIGHT ); maRectPoly = tools::Polygon( aRect, 6, 6 ); vcl::Region aRegion( maRectPoly ); long nTipOffset = aSize.Width() - TIP_RIGHT_OFFSET + mnTipOffset; @@ -770,7 +770,7 @@ void BubbleWindow::SetTitleAndText( const OUString& rTitle, } -void BubbleWindow::Paint(vcl::RenderContext& /*rRenderContext*/, const Rectangle& /*rRect*/) +void BubbleWindow::Paint(vcl::RenderContext& /*rRenderContext*/, const tools::Rectangle& /*rRect*/) { SolarMutexGuard aGuard; @@ -799,12 +799,12 @@ void BubbleWindow::Paint(vcl::RenderContext& /*rRenderContext*/, const Rectangle aBoldFont.SetWeight( WEIGHT_BOLD ); SetFont( aBoldFont ); - Rectangle aTitleRect = maTitleRect; + tools::Rectangle aTitleRect = maTitleRect; aTitleRect.Move( aImgSize.Width(), 0 ); DrawText( aTitleRect, maBubbleTitle, DrawTextFlags::MultiLine | DrawTextFlags::WordBreak ); SetFont( aOldFont ); - Rectangle aTextRect = maTextRect; + tools::Rectangle aTextRect = maTextRect; aTextRect.Move( aImgSize.Width(), 0 ); DrawText( aTextRect, maBubbleText, DrawTextFlags::MultiLine | DrawTextFlags::WordBreak ); } @@ -878,12 +878,12 @@ void BubbleWindow::RecalcTextRects() { SetFont( aBoldFont ); - maTitleRect = GetTextRect( Rectangle( Point( 0, 0 ), maMaxTextSize ), + maTitleRect = GetTextRect( tools::Rectangle( Point( 0, 0 ), maMaxTextSize ), maBubbleTitle, DrawTextFlags::MultiLine | DrawTextFlags::WordBreak ); SetFont( aOldFont ); - maTextRect = GetTextRect( Rectangle( Point( 0, 0 ), maMaxTextSize ), + maTextRect = GetTextRect( tools::Rectangle( Point( 0, 0 ), maMaxTextSize ), maBubbleText, DrawTextFlags::MultiLine | DrawTextFlags::WordBreak ); diff --git a/filter/source/flash/swfexporter.cxx b/filter/source/flash/swfexporter.cxx index b0110010b561..37ea443db756 100644 --- a/filter/source/flash/swfexporter.cxx +++ b/filter/source/flash/swfexporter.cxx @@ -684,7 +684,7 @@ bool FlashExporter::getMetaFile( Reference< XComponent >&xComponent, GDIMetaFile aFilter.ImportGraphic( aGraphic, aFile.GetURL(), *aFile.GetStream( StreamMode::READ ) ); BitmapEx rBitmapEx( aGraphic.GetBitmap(), Color(255,255,255) ); - Rectangle clipRect; + tools::Rectangle clipRect; for( size_t i = 0, nCount = rMtf.GetActionSize(); i < nCount; i++ ) { const MetaAction* pAction = rMtf.GetAction( i ); diff --git a/filter/source/flash/swfwriter.cxx b/filter/source/flash/swfwriter.cxx index 91cd5e47f9a4..9c99d8dfb607 100644 --- a/filter/source/flash/swfwriter.cxx +++ b/filter/source/flash/swfwriter.cxx @@ -60,7 +60,7 @@ Writer::Writer( sal_Int32 nTWIPWidthOutput, sal_Int32 nTWIPHeightOutput, sal_Int mpFontsStream = maFontsTempFile.GetStream( StreamMode::WRITE|StreamMode::TRUNC ); // define an invisible button with the size of a page - Rectangle aRect( 0, 0, (long)( mnDocWidth * mnDocXScale ), (long)( mnDocHeight * mnDocYScale ) ); + tools::Rectangle aRect( 0, 0, (long)( mnDocWidth * mnDocXScale ), (long)( mnDocHeight * mnDocYScale ) ); tools::Polygon aPoly( aRect ); FillStyle aFill = FillStyle( Color(COL_WHITE) ); mnWhiteBackgroundShapeId = defineShape( aPoly, aFill ); @@ -151,7 +151,7 @@ void Writer::storeTo( Reference< XOutputStream > &xOutStream ) aHeader.WriteUInt32( 0 ); - Rectangle aDocRect( 0, 0, static_cast<long>(mnDocWidth*mnDocXScale), static_cast<long>(mnDocHeight*mnDocYScale) ); + tools::Rectangle aDocRect( 0, 0, static_cast<long>(mnDocWidth*mnDocXScale), static_cast<long>(mnDocHeight*mnDocYScale) ); aHeader.addRect( aDocRect ); diff --git a/filter/source/flash/swfwriter.hxx b/filter/source/flash/swfwriter.hxx index f9425162f365..b1640de9a80e 100644 --- a/filter/source/flash/swfwriter.hxx +++ b/filter/source/flash/swfwriter.hxx @@ -176,12 +176,12 @@ public: void addRGBA( const Color& rColor ); void addRGB( const Color& rColor ); - void addRect( const Rectangle& rRect ); + void addRect( const tools::Rectangle& rRect ); void addMatrix( const ::basegfx::B2DHomMatrix& rMatrix ); // #i73264# void addStream( SvStream& rIn ); static void writeMatrix( SvStream& rOut, const ::basegfx::B2DHomMatrix& rMatrix ); // #i73264# - static void writeRect( SvStream& rOut, const Rectangle& rRect ); + static void writeRect( SvStream& rOut, const tools::Rectangle& rRect ); private: sal_uInt8 mnTagId; @@ -215,7 +215,7 @@ public: explicit FillStyle( const Color& rSolidColor ); /** this c'tor creates a linear or radial gradient fill style */ - FillStyle( const Rectangle& rBoundRect, const Gradient& rGradient ); + FillStyle( const tools::Rectangle& rBoundRect, const Gradient& rGradient ); /** this c'tor creates a tiled or clipped bitmap fill style */ FillStyle( sal_uInt16 nBitmapId, bool bClipped, const ::basegfx::B2DHomMatrix& rMatrix ); // #i73264# @@ -230,7 +230,7 @@ private: sal_uInt16 mnBitmapId; Color maColor; Gradient maGradient; - Rectangle maBoundRect; + tools::Rectangle maBoundRect; }; @@ -317,7 +317,7 @@ private: sal_uInt16 createID() { return mnNextId++; } void Impl_writeBmp( sal_uInt16 nBitmapId, sal_uInt32 width, sal_uInt32 height, sal_uInt8 *pCompressed, sal_uInt32 compressed_size ); - void Impl_writeImage( const BitmapEx& rBmpEx, const Point& rPt, const Size& rSz, const Point& rSrcPt, const Size& rSrcSz, const Rectangle& rClipRect, bool bMap ); + void Impl_writeImage( const BitmapEx& rBmpEx, const Point& rPt, const Size& rSz, const Point& rSrcPt, const Size& rSrcSz, const tools::Rectangle& rClipRect, bool bMap ); void Impl_writeJPEG(sal_uInt16 nBitmapId, const sal_uInt8* pJpgData, sal_uInt32 nJpgDataLength, sal_uInt8 *pCompressed, sal_uInt32 compressed_size ); void Impl_handleLineInfoPolyPolygons(const LineInfo& rInfo, const basegfx::B2DPolygon& rLinePolygon); void Impl_writeActions( const GDIMetaFile& rMtf ); @@ -329,7 +329,7 @@ private: void Impl_writeText( const Point& rPos, const OUString& rText, const long* pDXArray, long nWidth, Color aTextColor ); void Impl_writeGradientEx( const tools::PolyPolygon& rPolyPoly, const Gradient& rGradient ); void Impl_writeLine( const Point& rPt1, const Point& rPt2, const Color* pLineColor = nullptr ); - void Impl_writeRect( const Rectangle& rRect, long nRadX, long nRadY ); + void Impl_writeRect( const tools::Rectangle& rRect, long nRadX, long nRadY ); void Impl_writeEllipse( const Point& rCenter, long nRadX, long nRadY ); bool Impl_writeFilling( SvtGraphicFill& rFilling ); bool Impl_writeStroke( SvtGraphicStroke& rStroke ); diff --git a/filter/source/flash/swfwriter1.cxx b/filter/source/flash/swfwriter1.cxx index ef3bbf5118bf..b3bdb5dff933 100644 --- a/filter/source/flash/swfwriter1.cxx +++ b/filter/source/flash/swfwriter1.cxx @@ -318,7 +318,7 @@ void Writer::Impl_writeGradientEx( const tools::PolyPolygon& rPolyPoly, const Gr if( (rGradient.GetStyle() == GradientStyle::Linear && rGradient.GetAngle() == 900) || (rGradient.GetStyle() == GradientStyle::Radial) ) { - const Rectangle aBoundRect( aPolyPolygon.GetBoundRect() ); + const tools::Rectangle aBoundRect( aPolyPolygon.GetBoundRect() ); FillStyle aFillStyle( aBoundRect, rGradient ); @@ -576,7 +576,7 @@ void Writer::Impl_writeText( const Point& rPos, const OUString& rText, const lon // CL: This is still a hack until we figure out how to calculate a correct bound rect // for rotated text - Rectangle textBounds( 0, 0, static_cast<long>(mnDocWidth*mnDocXScale), static_cast<long>(mnDocHeight*mnDocYScale) ); + tools::Rectangle textBounds( 0, 0, static_cast<long>(mnDocWidth*mnDocXScale), static_cast<long>(mnDocHeight*mnDocYScale) ); double scale = 1.0; // scale width if we have a stretched text @@ -852,17 +852,17 @@ sal_uInt16 Writer::defineBitmap( const BitmapEx &bmpSource, sal_Int32 nJPEGQuali } -void Writer::Impl_writeImage( const BitmapEx& rBmpEx, const Point& rPt, const Size& rSz, const Point& /* rSrcPt */, const Size& /* rSrcSz */, const Rectangle& rClipRect, bool bNeedToMapClipRect ) +void Writer::Impl_writeImage( const BitmapEx& rBmpEx, const Point& rPt, const Size& rSz, const Point& /* rSrcPt */, const Size& /* rSrcSz */, const tools::Rectangle& rClipRect, bool bNeedToMapClipRect ) { if( !!rBmpEx ) { BitmapEx bmpSource( rBmpEx ); - Rectangle originalPixelRect = Rectangle(Point(), bmpSource.GetSizePixel()); + tools::Rectangle originalPixelRect = tools::Rectangle(Point(), bmpSource.GetSizePixel()); Point srcPt( map(rPt) ); Size srcSize( map(rSz) ); - Rectangle destRect( srcPt, srcSize ); + tools::Rectangle destRect( srcPt, srcSize ); // AS: Christian, my scaling factors are different than yours, and work better for me. // However, I can't explain why exactly. I got some of this by trial and error. @@ -879,15 +879,15 @@ void Writer::Impl_writeImage( const BitmapEx& rBmpEx, const Point& rPt, const Si // clipping rectangle to get mapped. However, sometimes there are multiple layers // of mapping which eventually do cause the clipping rect to be mapped. Size clipSize( bNeedToMapClipRect ? map(rClipRect.GetSize()) : rClipRect.GetSize() ); - Rectangle clipRect = Rectangle(Point(), clipSize); + tools::Rectangle clipRect = tools::Rectangle(Point(), clipSize); destRect.Intersection( clipRect ); - Rectangle cropRect(destRect); + tools::Rectangle cropRect(destRect); // AS: The bmp origin is always 0,0 so we have to adjust before we crop. cropRect.Move(-srcPt.X(), -srcPt.Y()); // AS: Rectangle has no scale function (?!) so I do it manually... - Rectangle cropPixelRect(static_cast<long>(cropRect.Left()*XScale), + tools::Rectangle cropPixelRect(static_cast<long>(cropRect.Left()*XScale), static_cast<long>(cropRect.Top()*YScale), static_cast<long>(cropRect.Right()*XScale), static_cast<long>(cropRect.Bottom()*YScale)); @@ -1114,7 +1114,7 @@ void Writer::Impl_writeLine( const Point& rPt1, const Point& rPt2, const Color* } -void Writer::Impl_writeRect( const Rectangle& rRect, long nRadX, long nRadY ) +void Writer::Impl_writeRect( const tools::Rectangle& rRect, long nRadX, long nRadY ) { if( (rRect.Top() == rRect.Bottom()) || (rRect.Left() == rRect.Right()) ) { @@ -1187,11 +1187,11 @@ bool Writer::Impl_writeFilling( SvtGraphicFill& rFilling ) tools::PolyPolygon aPolyPolygon; rFilling.getPath( aPolyPolygon ); - Rectangle aOldRect( aPolyPolygon.GetBoundRect() ); + tools::Rectangle aOldRect( aPolyPolygon.GetBoundRect() ); map( aPolyPolygon ); - Rectangle aNewRect( aPolyPolygon.GetBoundRect() ); + tools::Rectangle aNewRect( aPolyPolygon.GetBoundRect() ); switch( rFilling.getFillType() ) { @@ -1344,7 +1344,7 @@ void Writer::Impl_handleLineInfoPolyPolygons(const LineInfo& rInfo, const basegf void Writer::Impl_writeActions( const GDIMetaFile& rMtf ) { - Rectangle clipRect; + tools::Rectangle clipRect; int bMap = 0; for( size_t i = 0, nCount = rMtf.GetActionSize(); i < nCount; i++ ) { @@ -1405,7 +1405,7 @@ void Writer::Impl_writeActions( const GDIMetaFile& rMtf ) case MetaActionType::ELLIPSE: { const MetaEllipseAction* pA = static_cast<const MetaEllipseAction*>(pAction); - const Rectangle& rRect = pA->GetRect(); + const tools::Rectangle& rRect = pA->GetRect(); Impl_writeEllipse( rRect.Center(), rRect.GetWidth() >> 1, rRect.GetHeight() >> 1 ); } diff --git a/filter/source/flash/swfwriter2.cxx b/filter/source/flash/swfwriter2.cxx index c9ee555bcb65..5d8acaed1150 100644 --- a/filter/source/flash/swfwriter2.cxx +++ b/filter/source/flash/swfwriter2.cxx @@ -220,13 +220,13 @@ void Tag::addRGB( const Color& rColor ) } -void Tag::addRect( const Rectangle& rRect ) +void Tag::addRect( const tools::Rectangle& rRect ) { writeRect( *this, rRect ); } -void Tag::writeRect( SvStream& rOut, const Rectangle& rRect ) +void Tag::writeRect( SvStream& rOut, const tools::Rectangle& rRect ) { BitStream aBits; @@ -509,7 +509,7 @@ FillStyle::FillStyleType Impl_getFillStyleType( const Gradient& rGradient ) /** this c'tor creates a linear or radial gradient fill style */ -FillStyle::FillStyle( const Rectangle& rBoundRect, const Gradient& rGradient ) +FillStyle::FillStyle( const tools::Rectangle& rBoundRect, const Gradient& rGradient ) : meType(Impl_getFillStyleType(rGradient)) , mnBitmapId(0) , maGradient(rGradient) diff --git a/filter/source/graphicfilter/eps/eps.cxx b/filter/source/graphicfilter/eps/eps.cxx index 33bf466a2972..6bfb2476f3bd 100644 --- a/filter/source/graphicfilter/eps/eps.cxx +++ b/filter/source/graphicfilter/eps/eps.cxx @@ -189,8 +189,8 @@ private: void ImplWriteLineInfo( double fLineWidth, double fMiterLimit, SvtGraphicStroke::CapType eLineCap, SvtGraphicStroke::JoinType eJoinType, SvtGraphicStroke::DashArray& rDashArray ); void ImplWriteLineInfo( const LineInfo& rLineInfo ); - void ImplRect( const Rectangle & rRectangle ); - void ImplRectFill ( const Rectangle & rRectangle ); + void ImplRect( const tools::Rectangle & rRectangle ); + void ImplRectFill ( const tools::Rectangle & rRectangle ); void ImplWriteGradient( const tools::PolyPolygon& rPolyPoly, const Gradient& rGradient, VirtualDevice& rVDev ); void ImplIntersect( const tools::PolyPolygon& rPolyPoly ); void ImplPolyPoly( const tools::PolyPolygon & rPolyPolygon, bool bTextOutline = false ); @@ -664,7 +664,7 @@ void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev ) case MetaActionType::ELLIPSE : { - Rectangle aRect = static_cast<const MetaEllipseAction*>(pMA)->GetRect(); + tools::Rectangle aRect = static_cast<const MetaEllipseAction*>(pMA)->GetRect(); Point aCenter = aRect.Center(); tools::Polygon aPoly( aCenter, aRect.GetWidth() / 2, aRect.GetHeight() / 2 ); tools::PolyPolygon aPolyPoly( aPoly ); @@ -816,7 +816,7 @@ void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev ) case MetaActionType::BMPSCALEPART : { Bitmap aBitmap( static_cast<const MetaBmpScalePartAction*>(pMA)->GetBitmap() ); - aBitmap.Crop( Rectangle( static_cast<const MetaBmpScalePartAction*>(pMA)->GetSrcPoint(), + aBitmap.Crop( tools::Rectangle( static_cast<const MetaBmpScalePartAction*>(pMA)->GetSrcPoint(), static_cast<const MetaBmpScalePartAction*>(pMA)->GetSrcSize() ) ); if ( mbGrayScale ) aBitmap.Convert( BmpConversion::N8BitGreys ); @@ -855,7 +855,7 @@ void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev ) case MetaActionType::BMPEXSCALEPART : { BitmapEx aBitmapEx( static_cast<const MetaBmpExScalePartAction*>(pMA)->GetBitmapEx() ); - aBitmapEx.Crop( Rectangle( static_cast<const MetaBmpExScalePartAction*>(pMA)->GetSrcPoint(), + aBitmapEx.Crop( tools::Rectangle( static_cast<const MetaBmpExScalePartAction*>(pMA)->GetSrcPoint(), static_cast<const MetaBmpExScalePartAction*>(pMA)->GetSrcSize() ) ); Bitmap aBitmap( aBitmapEx.GetBitmap() ); if ( mbGrayScale ) @@ -905,7 +905,7 @@ void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev ) case MetaActionType::WALLPAPER : { const MetaWallpaperAction* pA = static_cast<const MetaWallpaperAction*>(pMA); - Rectangle aRect = pA->GetRect(); + tools::Rectangle aRect = pA->GetRect(); Wallpaper aWallpaper = pA->GetWallpaper(); if ( aWallpaper.IsBitmap() ) @@ -1450,7 +1450,7 @@ void PSWriter::ImplScale( const double& fX, const double& fY ) ImplExecMode( PS_RET ); } -void PSWriter::ImplRect( const Rectangle & rRect ) +void PSWriter::ImplRect( const tools::Rectangle & rRect ) { if ( bFillColor ) ImplRectFill( rRect ); @@ -1473,7 +1473,7 @@ void PSWriter::ImplRect( const Rectangle & rRect ) mnCursorPos = 0; } -void PSWriter::ImplRectFill( const Rectangle & rRect ) +void PSWriter::ImplRectFill( const tools::Rectangle & rRect ) { double nWidth = rRect.GetWidth(); double nHeight = rRect.GetHeight(); @@ -1672,7 +1672,7 @@ void PSWriter::ImplBmp( Bitmap* pBitmap, Bitmap* pMaskBitmap, const Point & rPoi bool bDoTrans = false; - Rectangle aRect; + tools::Rectangle aRect; vcl::Region aRegion; if ( pMaskBitmap ) @@ -1685,7 +1685,7 @@ void PSWriter::ImplBmp( Bitmap* pBitmap, Bitmap* pMaskBitmap, const Point & rPoi if ( nHeight > 10 ) nHeight = 8; } - aRect = Rectangle( Point( 0, nHeightOrg - nHeightLeft ), Size( (long)nWidth, (long)nHeight ) ); + aRect = tools::Rectangle( Point( 0, nHeightOrg - nHeightLeft ), Size( (long)nWidth, (long)nHeight ) ); aRegion = vcl::Region( pMaskBitmap->CreateRegion( COL_BLACK, aRect ) ); if( mnLevel == 1 ) @@ -1707,7 +1707,7 @@ void PSWriter::ImplBmp( Bitmap* pBitmap, Bitmap* pMaskBitmap, const Point & rPoi if ( nHeight != nHeightOrg ) { nYHeight = nYHeightOrg * nHeight / nHeightOrg; - aTileBitmap.Crop( Rectangle( Point( 0, nHeightOrg - nHeightLeft ), Size( nWidth, nHeight ) ) ); + aTileBitmap.Crop( tools::Rectangle( Point( 0, nHeightOrg - nHeightLeft ), Size( nWidth, nHeight ) ) ); } if ( bDoTrans ) { diff --git a/filter/source/graphicfilter/icgm/bitmap.cxx b/filter/source/graphicfilter/icgm/bitmap.cxx index 44c8169562f4..215b46a17019 100644 --- a/filter/source/graphicfilter/icgm/bitmap.cxx +++ b/filter/source/graphicfilter/icgm/bitmap.cxx @@ -323,8 +323,8 @@ void CGMBitmap::ImplInsert( CGMBitmapDescriptor& rSource, CGMBitmapDescriptor& r if ( mpCGM->mnVDCYmul == -1 ) rDest.mnOrigin = rSource.mnOrigin; // new origin rDest.mpBitmap->Expand( 0, rSource.mnY ); - rDest.mpBitmap->CopyPixel( Rectangle( Point( 0, rDest.mnY ), Size( rSource.mnX, rSource.mnY ) ), - Rectangle( Point( 0, 0 ), Size( rSource.mnX, rSource.mnY ) ), rSource.mpBitmap ); + rDest.mpBitmap->CopyPixel( tools::Rectangle( Point( 0, rDest.mnY ), Size( rSource.mnX, rSource.mnY ) ), + tools::Rectangle( Point( 0, 0 ), Size( rSource.mnX, rSource.mnY ) ), rSource.mpBitmap ); FloatPoint aFloatPoint; aFloatPoint.X = rSource.mnQ.X - rSource.mnR.X; aFloatPoint.Y = rSource.mnQ.Y - rSource.mnR.Y; @@ -338,8 +338,8 @@ void CGMBitmap::ImplInsert( CGMBitmapDescriptor& rSource, CGMBitmapDescriptor& r if ( mpCGM->mnVDCYmul == 1 ) rDest.mnOrigin = rSource.mnOrigin; // new origin rDest.mpBitmap->Expand( 0, rSource.mnY ); - rDest.mpBitmap->CopyPixel( Rectangle( Point( 0, rDest.mnY ), Size( rSource.mnX, rSource.mnY ) ), - Rectangle( Point( 0, 0 ), Size( rSource.mnX, rSource.mnY ) ), rSource.mpBitmap ); + rDest.mpBitmap->CopyPixel( tools::Rectangle( Point( 0, rDest.mnY ), Size( rSource.mnX, rSource.mnY ) ), + tools::Rectangle( Point( 0, 0 ), Size( rSource.mnX, rSource.mnY ) ), rSource.mpBitmap ); rDest.mnP = rSource.mnP; rDest.mnR = rSource.mnR; } diff --git a/filter/source/graphicfilter/icgm/class4.cxx b/filter/source/graphicfilter/icgm/class4.cxx index 805b92785fd3..c74333123c6b 100644 --- a/filter/source/graphicfilter/icgm/class4.cxx +++ b/filter/source/graphicfilter/icgm/class4.cxx @@ -404,7 +404,7 @@ void CGM::ImplDoClass4() if ( mbFigure ) { - Rectangle aBoundingBox( Point( (long)( aCenterPoint.X - fRadius ), long( aCenterPoint.Y - fRadius ) ), + tools::Rectangle aBoundingBox( Point( (long)( aCenterPoint.X - fRadius ), long( aCenterPoint.Y - fRadius ) ), Size( ( static_cast< long >( 2 * fRadius ) ), (long)( 2 * fRadius) ) ); tools::Polygon aPolygon( aBoundingBox, Point( (long)aStartingPoint.X, (long)aStartingPoint.Y ) ,Point( (long)aEndingPoint.X, (long)aEndingPoint.Y ), PolyStyle::Arc ); if ( nSwitch ) @@ -520,7 +520,7 @@ void CGM::ImplDoClass4() if ( mbFigure ) { - Rectangle aBoundingBox( + tools::Rectangle aBoundingBox( Point( (long)( aCenter.X - aRadius.X ), long( aCenter.Y - aRadius.X ) ), Size( static_cast< long >( 2 * aRadius.X ), (long)( 2 * aRadius.X ) ) ); tools::Polygon aPolygon( aBoundingBox, diff --git a/filter/source/graphicfilter/idxf/dxf2mtf.cxx b/filter/source/graphicfilter/idxf/dxf2mtf.cxx index b867bca6e372..3ceab9525257 100644 --- a/filter/source/graphicfilter/idxf/dxf2mtf.cxx +++ b/filter/source/graphicfilter/idxf/dxf2mtf.cxx @@ -264,7 +264,7 @@ void DXF2GDIMetaFile::DrawCircleEntity(const DXFCircleEntity & rE, const DXFTran rTransform.Transform(rE.aP0,aC); if (rE.fThickness==0 && rTransform.TransCircleToEllipse(rE.fRadius,frx,fry)) { pVirDev->DrawEllipse( - Rectangle((long)(aC.fx-frx+0.5),(long)(aC.fy-fry+0.5), + tools::Rectangle((long)(aC.fx-frx+0.5),(long)(aC.fy-fry+0.5), (long)(aC.fx+frx+0.5),(long)(aC.fy+fry+0.5))); } else { @@ -324,7 +324,7 @@ void DXF2GDIMetaFile::DrawArcEntity(const DXFArcEntity & rE, const DXFTransform rTransform.Transform(aVE,aPS); } pVirDev->DrawArc( - Rectangle((long)(aC.fx-frx+0.5),(long)(aC.fy-fry+0.5), + tools::Rectangle((long)(aC.fx-frx+0.5),(long)(aC.fy-fry+0.5), (long)(aC.fx+frx+0.5),(long)(aC.fy+fry+0.5)), aPS,aPE ); diff --git a/filter/source/graphicfilter/ieps/ieps.cxx b/filter/source/graphicfilter/ieps/ieps.cxx index af4ab68457ea..3ab880a9ae3a 100644 --- a/filter/source/graphicfilter/ieps/ieps.cxx +++ b/filter/source/graphicfilter/ieps/ieps.cxx @@ -470,7 +470,7 @@ void MakePreview(sal_uInt8* pBuf, sal_uInt32 nBytesRead, pVDev->Push( PushFlags::FONT ); pVDev->SetFont( aFont ); - Rectangle aRect( Point( 1, 1 ), Size( nWidth - 2, nHeight - 2 ) ); + tools::Rectangle aRect( Point( 1, 1 ), Size( nWidth - 2, nHeight - 2 ) ); pVDev->DrawRect( aRect ); OUString aString; diff --git a/filter/source/graphicfilter/ios2met/ios2met.cxx b/filter/source/graphicfilter/ios2met/ios2met.cxx index 9ba110cd8ec7..e2ebb601d1d6 100644 --- a/filter/source/graphicfilter/ios2met/ios2met.cxx +++ b/filter/source/graphicfilter/ios2met/ios2met.cxx @@ -350,8 +350,8 @@ private: // While doing this a recording in the GDIMetaFile // will take place. sal_uLong nOrigPos; // initial position in pOS2MET - Rectangle aBoundingRect; // bounding rectangle as stored in the file - Rectangle aCalcBndRect; // bounding rectangle calculated on our own + tools::Rectangle aBoundingRect; // bounding rectangle as stored in the file + tools::Rectangle aCalcBndRect; // bounding rectangle calculated on our own MapMode aGlobMapMode; // resolution of the picture bool bCoord32; @@ -853,7 +853,7 @@ Point OS2METReader::ReadPoint( const bool bAdjustBoundRect ) y=aBoundingRect.Bottom()-y; if ( bAdjustBoundRect ) - aCalcBndRect.Union(Rectangle(x,y,x+1,y+1)); + aCalcBndRect.Union(tools::Rectangle(x,y,x+1,y+1)); return Point(x,y); } @@ -908,7 +908,7 @@ void OS2METReader::ReadRelLine(bool bGivenPos, sal_uInt16 nOrderLen) sal_Int8 nsignedbyte; pOS2MET->ReadSChar( nsignedbyte ); aP0.X()+=(long)nsignedbyte; pOS2MET->ReadSChar( nsignedbyte ); aP0.Y()-=(long)nsignedbyte; - aCalcBndRect.Union(Rectangle(aP0,Size(1,1))); + aCalcBndRect.Union(tools::Rectangle(aP0,Size(1,1))); aPolygon.SetPoint(aP0,i); } aAttr.aCurPos=aPolygon.GetPoint(nPolySize-1); @@ -940,7 +940,7 @@ void OS2METReader::ReadBox(bool bGivenPos) nHRound=ReadCoord(bCoord32); nVRound=ReadCoord(bCoord32); - Rectangle aBoxRect( P0, aAttr.aCurPos ); + tools::Rectangle aBoxRect( P0, aAttr.aCurPos ); if ( pAreaStack ) AddPointsToArea( tools::Polygon( aBoxRect ) ); @@ -1057,7 +1057,7 @@ void OS2METReader::ReadChrStr(bool bGivenPos, bool bMove, bool bExtra, sal_uInt1 aSize = Size( pVirDev->GetTextWidth(aStr), pVirDev->GetTextHeight() ); if ( aAttr.nChrAng == 0 ) { - aCalcBndRect.Union(Rectangle( Point(aP0.X(),aP0.Y()-aSize.Height()), + aCalcBndRect.Union(tools::Rectangle( Point(aP0.X(),aP0.Y()-aSize.Height()), Size(aSize.Width(),aSize.Height()*2))); if (bMove) aAttr.aCurPos = Point( aP0.X() + aSize.Width(), aP0.Y()); @@ -1073,8 +1073,8 @@ void OS2METReader::ReadChrStr(bool bGivenPos, bool bMove, bool bExtra, sal_uInt1 aDummyPoly.Rotate( aP0, (short)aAttr.nChrAng ); if ( bMove ) aAttr.aCurPos = aDummyPoly.GetPoint( 0 ); - aCalcBndRect.Union( Rectangle( aDummyPoly.GetPoint( 0 ), aDummyPoly.GetPoint( 3 ) ) ); - aCalcBndRect.Union( Rectangle( aDummyPoly.GetPoint( 1 ), aDummyPoly.GetPoint( 2 ) ) ); + aCalcBndRect.Union( tools::Rectangle( aDummyPoly.GetPoint( 0 ), aDummyPoly.GetPoint( 3 ) ) ); + aCalcBndRect.Union( tools::Rectangle( aDummyPoly.GetPoint( 1 ), aDummyPoly.GetPoint( 2 ) ) ); } } @@ -1113,11 +1113,11 @@ void OS2METReader::ReadArc(bool bGivenPos) w1=fmod((atan2(x1-cx,y1-cy)-atan2(x2-cx,y2-cy)),6.28318530718); if (w1<0) w1+=6.28318530718; w3=fmod((atan2(x3-cx,y3-cy)-atan2(x2-cx,y2-cy)),6.28318530718); if (w3<0) w3+=6.28318530718; if (w3<w1) { - pVirDev->DrawArc(Rectangle((long)(cx-rx),(long)(cy-ry), + pVirDev->DrawArc(tools::Rectangle((long)(cx-rx),(long)(cy-ry), (long)(cx+rx),(long)(cy+ry)),aP1,aP3); } else { - pVirDev->DrawArc(Rectangle((long)(cx-rx),(long)(cy-ry), + pVirDev->DrawArc(tools::Rectangle((long)(cx-rx),(long)(cy-ry), (long)(cx+rx),(long)(cy+ry)),aP3,aP1); } } @@ -1126,7 +1126,7 @@ void OS2METReader::ReadFullArc(bool bGivenPos, sal_uInt16 nOrderSize) { Point aCenter; long nP,nQ; - Rectangle aRect; + tools::Rectangle aRect; sal_uInt32 nMul; sal_uInt16 nMulS; if (bGivenPos) { @@ -1145,7 +1145,7 @@ void OS2METReader::ReadFullArc(bool bGivenPos, sal_uInt16 nOrderSize) nQ=(nQ*nMul)>>16; } - aRect=Rectangle(aCenter.X()-nP,aCenter.Y()-nQ, + aRect=tools::Rectangle(aCenter.X()-nP,aCenter.Y()-nQ, aCenter.X()+nP,aCenter.Y()+nQ); aCalcBndRect.Union(aRect); @@ -1170,7 +1170,7 @@ void OS2METReader::ReadPartialArc(bool bGivenPos, sal_uInt16 nOrderSize) { Point aP0, aCenter,aPStart,aPEnd; sal_Int32 nP,nQ,nStart, nSweep; - Rectangle aRect; + tools::Rectangle aRect; sal_uInt32 nMul; sal_uInt16 nMulS; double fStart, fEnd; @@ -1199,7 +1199,7 @@ void OS2METReader::ReadPartialArc(bool bGivenPos, sal_uInt16 nOrderSize) aPEnd= Point(aCenter.X()+(sal_Int32)( cos(fEnd)*nP), aCenter.Y()+(sal_Int32)(-sin(fEnd)*nQ)); - aRect=Rectangle(aCenter.X()-nP,aCenter.Y()-nQ, + aRect=tools::Rectangle(aCenter.X()-nP,aCenter.Y()-nQ, aCenter.X()+nP,aCenter.Y()+nQ); aCalcBndRect.Union(aRect); @@ -1387,7 +1387,7 @@ void OS2METReader::ReadMarker(bool bGivenPos, sal_uInt16 nOrderLen) if (i!=0 || bGivenPos) aAttr.aCurPos=ReadPoint(); const long x = aAttr.aCurPos.X(); const long y=aAttr.aCurPos.Y(); - aCalcBndRect.Union(Rectangle(x-5,y-5,x+5,y+5)); + aCalcBndRect.Union(tools::Rectangle(x-5,y-5,x+5,y+5)); switch (aAttr.nMrkSymbol) { case 2: // PLUS pVirDev->DrawLine(Point(x-4,y),Point(x+4,y)); @@ -1452,10 +1452,10 @@ void OS2METReader::ReadMarker(bool bGivenPos, sal_uInt16 nOrderLen) break; } case 9: // DOT - pVirDev->DrawEllipse(Rectangle(x-1,y-1,x+1,y+1)); + pVirDev->DrawEllipse(tools::Rectangle(x-1,y-1,x+1,y+1)); break; case 10: // SMALLCIRCLE - pVirDev->DrawEllipse(Rectangle(x-2,y-2,x+2,y+2)); + pVirDev->DrawEllipse(tools::Rectangle(x-2,y-2,x+2,y+2)); break; case 64: // BLANK break; @@ -2233,7 +2233,7 @@ void OS2METReader::ReadDsc(sal_uInt16 nDscID, sal_uInt16 /*nDscLen*/) aBoundingRect.Bottom() = y2; // no output beside this bounding rect - pVirDev->IntersectClipRegion( Rectangle( Point(), aBoundingRect.GetSize() ) ); + pVirDev->IntersectClipRegion( tools::Rectangle( Point(), aBoundingRect.GetSize() ) ); break; } diff --git a/filter/source/graphicfilter/ipict/ipict.cxx b/filter/source/graphicfilter/ipict/ipict.cxx index bcdbc3caa867..08fa3b6a9a5c 100644 --- a/filter/source/graphicfilter/ipict/ipict.cxx +++ b/filter/source/graphicfilter/ipict/ipict.cxx @@ -150,7 +150,7 @@ private: sal_uLong nOrigPos; // Initial position in pPict. bool IsVersion2; // If it is a version 2 Pictfile. - Rectangle aBoundingRect; // Min/Max-Rectangle for the whole drawing. + tools::Rectangle aBoundingRect; // Min/Max-Rectangle for the whole drawing. Point aPenPosition; Point aTextPosition; @@ -183,21 +183,21 @@ private: Color ReadRGBColor(); - void ReadRectangle(Rectangle & rRect); + void ReadRectangle(tools::Rectangle & rRect); sal_uLong ReadPolygon(tools::Polygon & rPoly); sal_uLong ReadPixPattern(Pattern &pattern); - Rectangle aLastRect; + tools::Rectangle aLastRect; sal_uLong ReadAndDrawRect(PictDrawingMethod eMethod); sal_uLong ReadAndDrawSameRect(PictDrawingMethod eMethod); - Rectangle aLastRoundRect; + tools::Rectangle aLastRoundRect; sal_uLong ReadAndDrawRoundRect(PictDrawingMethod eMethod); sal_uLong ReadAndDrawSameRoundRect(PictDrawingMethod eMethod); - Rectangle aLastOval; + tools::Rectangle aLastOval; sal_uLong ReadAndDrawOval(PictDrawingMethod eMethod); sal_uLong ReadAndDrawSameOval(PictDrawingMethod eMethod); @@ -205,7 +205,7 @@ private: sal_uLong ReadAndDrawPolygon(PictDrawingMethod eMethod); sal_uLong ReadAndDrawSamePolygon(PictDrawingMethod eMethod); - Rectangle aLastArcRect; + tools::Rectangle aLastArcRect; sal_uLong ReadAndDrawArc(PictDrawingMethod eMethod); sal_uLong ReadAndDrawSameArc(PictDrawingMethod eMethod); @@ -224,7 +224,7 @@ private: sal_uLong ReadAndDrawText(); sal_uLong ReadPixMapEtc(Bitmap & rBitmap, bool bBaseAddr, bool bColorTable, - Rectangle * pSrcRect, Rectangle * pDestRect, + tools::Rectangle * pSrcRect, tools::Rectangle * pDestRect, bool bMode, bool bMaskRgn); void ReadHeader(); @@ -443,13 +443,13 @@ Color PictReader::ReadRGBColor() } -void PictReader::ReadRectangle(Rectangle & rRect) +void PictReader::ReadRectangle(tools::Rectangle & rRect) { Point aTopLeft, aBottomRight; aTopLeft=ReadPoint(); aBottomRight=ReadPoint(); - rRect=Rectangle(aTopLeft,aBottomRight); + rRect=tools::Rectangle(aTopLeft,aBottomRight); SAL_INFO("filter.pict", "ReadRectangle: " << rRect); } @@ -721,8 +721,8 @@ namespace } } -sal_uLong PictReader::ReadPixMapEtc( Bitmap &rBitmap, bool bBaseAddr, bool bColorTable, Rectangle* pSrcRect, - Rectangle* pDestRect, bool bMode, bool bMaskRgn ) +sal_uLong PictReader::ReadPixMapEtc( Bitmap &rBitmap, bool bBaseAddr, bool bColorTable, tools::Rectangle* pSrcRect, + tools::Rectangle* pDestRect, bool bMode, bool bMaskRgn ) { Bitmap aBitmap; sal_uInt16 nPackType(0), nPixelSize(0), nCmpCount(0), nCmpSize(0); @@ -805,7 +805,7 @@ sal_uLong PictReader::ReadPixMapEtc( Bitmap &rBitmap, bool bBaseAddr, bool bColo { sal_uInt16 nTop, nLeft, nBottom, nRight; pPict->ReadUInt16( nTop ).ReadUInt16( nLeft ).ReadUInt16( nBottom ).ReadUInt16( nRight ); - *pSrcRect = Rectangle( (sal_uLong)nLeft, (sal_uLong)nTop, (sal_uLong)nRight, (sal_uLong)nBottom ); + *pSrcRect = tools::Rectangle( (sal_uLong)nLeft, (sal_uLong)nTop, (sal_uLong)nRight, (sal_uLong)nBottom ); nDataSize += 8; } @@ -815,7 +815,7 @@ sal_uLong PictReader::ReadPixMapEtc( Bitmap &rBitmap, bool bBaseAddr, bool bColo Point aTL, aBR; aTL = ReadPoint(); aBR = ReadPoint(); - *pDestRect = Rectangle( aTL, aBR ); + *pDestRect = tools::Rectangle( aTL, aBR ); nDataSize += 8; } @@ -1220,7 +1220,7 @@ void PictReader::ReadHeader() else if (x2 < x1+8 || y2 < y1+8) // a little dubious actualConfid-=1; if (st >= 3 && actualConfid != 20) continue; - aBoundingRect=Rectangle( x1,y1, x2, y2 ); + aBoundingRect=tools::Rectangle( x1,y1, x2, y2 ); if (pPict->IsEof() || pPict->GetError()) continue; // read version @@ -1272,7 +1272,7 @@ void PictReader::ReadHeader() fVRes /= 65536; aHRes /= fHRes; aVRes /= fVRes; - aBoundingRect=Rectangle( x1,y1, x2, y2 ); + aBoundingRect=tools::Rectangle( x1,y1, x2, y2 ); pPict->SeekRel( 4 ); // 4 bytes reserved return; } @@ -1344,7 +1344,7 @@ sal_uLong PictReader::ReadData(sal_uInt16 nOpcode) break; case 0x0001: { // Clip - Rectangle aRect; + tools::Rectangle aRect; pPict->ReadUInt16( nUSHORT ); nDataSize=nUSHORT; ReadRectangle(aRect); @@ -1806,7 +1806,7 @@ sal_uLong PictReader::ReadData(sal_uInt16 nOpcode) case 0x0090: { // BitsRect Bitmap aBmp; - Rectangle aSrcRect, aDestRect; + tools::Rectangle aSrcRect, aDestRect; nDataSize=ReadPixMapEtc(aBmp, false, true, &aSrcRect, &aDestRect, true, false); DrawingMethod( PictDrawingMethod::PAINT ); pVirDev->DrawBitmap(aDestRect.TopLeft(),aDestRect.GetSize(),aBmp); @@ -1814,7 +1814,7 @@ sal_uLong PictReader::ReadData(sal_uInt16 nOpcode) } case 0x0091: { // BitsRgn Bitmap aBmp; - Rectangle aSrcRect, aDestRect; + tools::Rectangle aSrcRect, aDestRect; nDataSize=ReadPixMapEtc(aBmp, false, true, &aSrcRect, &aDestRect, true, true); DrawingMethod( PictDrawingMethod::PAINT ); pVirDev->DrawBitmap(aDestRect.TopLeft(),aDestRect.GetSize(),aBmp); @@ -1831,7 +1831,7 @@ sal_uLong PictReader::ReadData(sal_uInt16 nOpcode) case 0x0098: { // PackBitsRect Bitmap aBmp; - Rectangle aSrcRect, aDestRect; + tools::Rectangle aSrcRect, aDestRect; nDataSize=ReadPixMapEtc(aBmp, false, true, &aSrcRect, &aDestRect, true, false); DrawingMethod( PictDrawingMethod::PAINT ); pVirDev->DrawBitmap(aDestRect.TopLeft(),aDestRect.GetSize(),aBmp); @@ -1839,7 +1839,7 @@ sal_uLong PictReader::ReadData(sal_uInt16 nOpcode) } case 0x0099: { // PackBitsRgn Bitmap aBmp; - Rectangle aSrcRect, aDestRect; + tools::Rectangle aSrcRect, aDestRect; nDataSize=ReadPixMapEtc(aBmp, false, true, &aSrcRect, &aDestRect, true, true); DrawingMethod( PictDrawingMethod::PAINT ); pVirDev->DrawBitmap(aDestRect.TopLeft(),aDestRect.GetSize(),aBmp); @@ -1847,7 +1847,7 @@ sal_uLong PictReader::ReadData(sal_uInt16 nOpcode) } case 0x009a: { // DirectBitsRect Bitmap aBmp; - Rectangle aSrcRect, aDestRect; + tools::Rectangle aSrcRect, aDestRect; nDataSize=ReadPixMapEtc(aBmp, true, false, &aSrcRect, &aDestRect, true, false); DrawingMethod( PictDrawingMethod::PAINT ); pVirDev->DrawBitmap(aDestRect.TopLeft(),aDestRect.GetSize(),aBmp); @@ -1855,7 +1855,7 @@ sal_uLong PictReader::ReadData(sal_uInt16 nOpcode) } case 0x009b: { // DirectBitsRgn Bitmap aBmp; - Rectangle aSrcRect, aDestRect; + tools::Rectangle aSrcRect, aDestRect; nDataSize=ReadPixMapEtc(aBmp, true, false, &aSrcRect, &aDestRect, true, true); DrawingMethod( PictDrawingMethod::PAINT ); pVirDev->DrawBitmap(aDestRect.TopLeft(),aDestRect.GetSize(),aBmp); diff --git a/filter/source/graphicfilter/ipict/shape.cxx b/filter/source/graphicfilter/ipict/shape.cxx index 5aba327f869d..c7ab3ba2f8a0 100644 --- a/filter/source/graphicfilter/ipict/shape.cxx +++ b/filter/source/graphicfilter/ipict/shape.cxx @@ -38,14 +38,14 @@ Here, we choose: namespace PictReaderShapePrivate { /** returns an inside rectangle knowing the penSize in order to obtain the ``correct'' position when we draw a frame in wide length*/ - Rectangle contractRectangle(bool drawFrame, Rectangle const &rect, Size const &pSize) { + tools::Rectangle contractRectangle(bool drawFrame, tools::Rectangle const &rect, Size const &pSize) { if (!drawFrame) return rect; long penSize=(pSize.Width()+pSize.Height())/2; if (2*penSize > rect.Right()-rect.Left()) penSize = (rect.Right()-rect.Left()+1)/2; if (2*penSize > rect.Bottom()-rect.Top()) penSize = (rect.Bottom()-rect.Top()+1)/2; long const X[2] = { rect.Left()+penSize/2, rect.Right()-(penSize+1)/2 }; long const Y[2] = { rect.Top()+penSize/2, rect.Bottom()-(penSize+1)/2 }; - return Rectangle(Point(X[0],Y[0]), Point(X[1], Y[1])); + return tools::Rectangle(Point(X[0],Y[0]), Point(X[1], Y[1])); } } @@ -125,9 +125,9 @@ namespace PictReaderShape { /* Note(checkme): contradictally with the QuickDraw's reference 3-23, it seems better to consider that the frame/content of a rectangle appears inside the given rectangle. Does a conversion appear between the pascal functions and the data stored in the file ? */ - void drawRectangle(VirtualDevice *dev, bool drawFrame, Rectangle const &orig, Size const &pSize) { + void drawRectangle(VirtualDevice *dev, bool drawFrame, tools::Rectangle const &orig, Size const &pSize) { int penSize=(pSize.Width()+pSize.Height())/2; - Rectangle rect = PictReaderShapePrivate::contractRectangle(drawFrame, orig, pSize); + tools::Rectangle rect = PictReaderShapePrivate::contractRectangle(drawFrame, orig, pSize); long const X[2] = { rect.Left(), rect.Right() }; long const Y[2] = { rect.Top(), rect.Bottom() }; @@ -144,9 +144,9 @@ namespace PictReaderShape { } //-------------------- draws an ellipse -------------------- - void drawEllipse(VirtualDevice *dev, bool drawFrame, Rectangle const &orig, Size const &pSize) { + void drawEllipse(VirtualDevice *dev, bool drawFrame, tools::Rectangle const &orig, Size const &pSize) { int penSize=(pSize.Width()+pSize.Height())/2; - Rectangle oval = PictReaderShapePrivate::contractRectangle(drawFrame, orig, pSize); + tools::Rectangle oval = PictReaderShapePrivate::contractRectangle(drawFrame, orig, pSize); using namespace basegfx; long const X[2] = { oval.Left(), oval.Right() }; long const Y[2] = { oval.Top(), oval.Bottom() }; @@ -159,9 +159,9 @@ namespace PictReaderShape { } //-------------------- draws an arc/pie -------------------- - void drawArc(VirtualDevice *dev, bool drawFrame, Rectangle const &orig, const double& angle1, const double& angle2, Size const &pSize) { + void drawArc(VirtualDevice *dev, bool drawFrame, tools::Rectangle const &orig, const double& angle1, const double& angle2, Size const &pSize) { int penSize=(pSize.Width()+pSize.Height())/2; - Rectangle arc = PictReaderShapePrivate::contractRectangle(drawFrame, orig, pSize); + tools::Rectangle arc = PictReaderShapePrivate::contractRectangle(drawFrame, orig, pSize); using namespace basegfx; double const PI2 = M_PI/2.0; @@ -194,9 +194,9 @@ namespace PictReaderShape { } } //-------------------- draws a rectangle with round corner -------------------- - void drawRoundRectangle(VirtualDevice *dev, bool drawFrame, Rectangle const &orig, Size const &ovalSize, Size const &pSize) { + void drawRoundRectangle(VirtualDevice *dev, bool drawFrame, tools::Rectangle const &orig, Size const &ovalSize, Size const &pSize) { int penSize=(pSize.Width()+pSize.Height())/2; - Rectangle oval = PictReaderShapePrivate::contractRectangle(drawFrame, orig, pSize); + tools::Rectangle oval = PictReaderShapePrivate::contractRectangle(drawFrame, orig, pSize); int ovalW=ovalSize.Width(), ovalH=ovalSize.Height(); using namespace basegfx; long const X[2] = { oval.Left(), oval.Right() }; diff --git a/filter/source/graphicfilter/ipict/shape.hxx b/filter/source/graphicfilter/ipict/shape.hxx index 1264df4f4b01..bccd39e63c26 100644 --- a/filter/source/graphicfilter/ipict/shape.hxx +++ b/filter/source/graphicfilter/ipict/shape.hxx @@ -33,23 +33,23 @@ namespace PictReaderShape { void drawLine(VirtualDevice *dev, Point const &orig, Point const &dest, Size const &pSize); /** draws a rectangle knowing penSize */ - void drawRectangle(VirtualDevice *dev, bool drawFrame, Rectangle const &rect, Size const &pSize); + void drawRectangle(VirtualDevice *dev, bool drawFrame, tools::Rectangle const &rect, Size const &pSize); /** draws a polygon knowing penSize */ void drawPolygon(VirtualDevice *dev, bool drawFrame, tools::Polygon const &rect, Size const &pSize); /** draws an ellipse knowing penSize */ - void drawEllipse(VirtualDevice *dev, bool drawFrame, Rectangle const &orig, Size const &pSize); + void drawEllipse(VirtualDevice *dev, bool drawFrame, tools::Rectangle const &orig, Size const &pSize); /** draws a rounded rectangle knowing penSize \note ovalSize is two time the size of the corner */ - void drawRoundRectangle(VirtualDevice *dev, bool drawFrame, Rectangle const &orig, Size const &ovalS, Size const &pSize); + void drawRoundRectangle(VirtualDevice *dev, bool drawFrame, tools::Rectangle const &orig, Size const &ovalS, Size const &pSize); /** draws an arc in a b2dpolygon knowing penSize \note - it supposes that angl1 < angl2 */ - void drawArc(VirtualDevice *dev, bool drawFrame, Rectangle const &orig, const double& angle1, const double& angle2, Size const &pSize); + void drawArc(VirtualDevice *dev, bool drawFrame, tools::Rectangle const &orig, const double& angle1, const double& angle2, Size const &pSize); } #endif // INCLUDED_FILTER_SOURCE_GRAPHICFILTER_IPICT_SHAPE_HXX diff --git a/filter/source/msfilter/escherex.cxx b/filter/source/msfilter/escherex.cxx index 00efa154aa86..87daad96ae83 100644 --- a/filter/source/msfilter/escherex.cxx +++ b/filter/source/msfilter/escherex.cxx @@ -143,7 +143,7 @@ EscherExClientAnchor_Base::~EscherExClientAnchor_Base() EscherPropertyContainer::EscherPropertyContainer( EscherGraphicProvider * pGraphProv, SvStream * pPiOutStrm, - Rectangle * pBoundRect): + tools::Rectangle * pBoundRect): pGraphicProvider(pGraphProv), pPicOutStrm(pPiOutStrm), pShapeBoundRect(pBoundRect), @@ -162,7 +162,7 @@ EscherPropertyContainer::EscherPropertyContainer() EscherPropertyContainer::EscherPropertyContainer( EscherGraphicProvider& rGraphProv, SvStream* pPiOutStrm, - Rectangle& rBoundRect ) : + tools::Rectangle& rBoundRect ) : EscherPropertyContainer(&rGraphProv, pPiOutStrm, &rBoundRect) {} @@ -1292,7 +1292,7 @@ bool EscherPropertyContainer::CreateGraphicProperties( const css::uno::Reference pVisArea.reset(new css::awt::Rectangle); aAny >>= (*pVisArea); } - Rectangle aRect( Point( 0, 0 ), pShapeBoundRect->GetSize() ); + tools::Rectangle aRect( Point( 0, 0 ), pShapeBoundRect->GetSize() ); sal_uInt32 nBlibId = pGraphicProvider->GetBlibID( *pPicOutStrm, aUniqueId, aRect, pVisArea.get() ); if ( nBlibId ) { @@ -1327,7 +1327,7 @@ bool EscherPropertyContainer::ImplCreateEmbeddedBmp( const OString& rUniqueId ) { EscherGraphicProvider aProvider; SvMemoryStream aMemStrm; - Rectangle aRect; + tools::Rectangle aRect; if ( aProvider.GetBlibID( aMemStrm, rUniqueId, aRect ) ) { // grab BLIP from stream and insert directly as complex property @@ -1367,7 +1367,7 @@ void EscherPropertyContainer::CreateEmbeddedBitmapProperties( namespace { -GraphicObject* lclDrawHatch( const css::drawing::Hatch& rHatch, const Color& rBackColor, bool bFillBackground, const Rectangle& rRect ) +GraphicObject* lclDrawHatch( const css::drawing::Hatch& rHatch, const Color& rBackColor, bool bFillBackground, const tools::Rectangle& rRect ) { // #i121183# For hatch, do no longer create a bitmap with the fixed size of 28x28 pixels. Also // do not create a bitmap in page size, that would explode file sizes (and have no good quality). @@ -1397,7 +1397,7 @@ GraphicObject* lclDrawHatch( const css::drawing::Hatch& rHatch, const Color& rBa void EscherPropertyContainer::CreateEmbeddedHatchProperties( const css::drawing::Hatch& rHatch, const Color& rBackColor, bool bFillBackground ) { - const Rectangle aRect(pShapeBoundRect ? *pShapeBoundRect : Rectangle(Point(0,0), Size(28000, 21000))); + const tools::Rectangle aRect(pShapeBoundRect ? *pShapeBoundRect : tools::Rectangle(Point(0,0), Size(28000, 21000))); std::unique_ptr<GraphicObject> xGraphicObject(lclDrawHatch(rHatch, rBackColor, bFillBackground, aRect)); OString aUniqueId = xGraphicObject->GetUniqueID(); bool bRetValue = ImplCreateEmbeddedBmp( aUniqueId ); @@ -1497,7 +1497,7 @@ bool EscherPropertyContainer::CreateGraphicProperties( aAny >>= bFillBackground; } - const Rectangle aRect(Point(0, 0), pShapeBoundRect ? pShapeBoundRect->GetSize() : Size(28000, 21000)); + const tools::Rectangle aRect(Point(0, 0), pShapeBoundRect ? pShapeBoundRect->GetSize() : Size(28000, 21000)); xGraphicObject.reset(lclDrawHatch(aHatch, aBackColor, bFillBackground, aRect)); aUniqueId = xGraphicObject->GetUniqueID(); eBitmapMode = css::drawing::BitmapMode_REPEAT; @@ -1696,7 +1696,7 @@ bool EscherPropertyContainer::CreateGraphicProperties( // write out embedded graphic if ( pGraphicProvider && pPicOutStrm && pShapeBoundRect ) { - Rectangle aRect( Point( 0, 0 ), pShapeBoundRect->GetSize() ); + tools::Rectangle aRect( Point( 0, 0 ), pShapeBoundRect->GetSize() ); const sal_uInt32 nBlibId(pGraphicProvider->GetBlibID(*pPicOutStrm, aUniqueId, aRect, nullptr, pGraphicAttr.get())); if(nBlibId) @@ -1718,7 +1718,7 @@ bool EscherPropertyContainer::CreateGraphicProperties( { EscherGraphicProvider aProvider; SvMemoryStream aMemStrm; - Rectangle aRect; + tools::Rectangle aRect; if ( aProvider.GetBlibID( aMemStrm, aUniqueId, aRect, nullptr, pGraphicAttr.get(), bOOxmlExport ) ) { @@ -1940,7 +1940,7 @@ bool EscherPropertyContainer::CreatePolygonProperties( sal_uInt16 nPolyCount = aPolyPolygon.Count(); sal_uInt32 nTotalPoints(0), nTotalBezPoints(0); - Rectangle aRect( aPolyPolygon.GetBoundRect() ); + tools::Rectangle aRect( aPolyPolygon.GetBoundRect() ); rGeoRect = css::awt::Rectangle( aRect.Left(), aRect.Top(), aRect.GetWidth(), aRect.GetHeight() ); for (sal_uInt16 i = 0; i < nPolyCount; ++i) @@ -3811,7 +3811,7 @@ bool EscherPropertyContainer::CreateBlipPropertiesforOLEControl(const css::uno { if ( pGraphicProvider && pPicOutStrm && pShapeBoundRect ) { - Rectangle aRect( Point( 0, 0 ), pShapeBoundRect->GetSize() ); + tools::Rectangle aRect( Point( 0, 0 ), pShapeBoundRect->GetSize() ); sal_uInt32 nBlibId = pGraphicProvider->GetBlibID( *pPicOutStrm, aUniqueId, aRect ); if ( nBlibId ) @@ -4190,7 +4190,7 @@ bool EscherGraphicProvider::GetPrefSize( const sal_uInt32 nBlibId, Size& rPrefSi } sal_uInt32 EscherGraphicProvider::GetBlibID( SvStream& rPicOutStrm, const OString& rId, - const Rectangle& /* rBoundRect */, const css::awt::Rectangle* pVisArea, + const tools::Rectangle& /* rBoundRect */, const css::awt::Rectangle* pVisArea, const GraphicAttr* pGraphicAttr, const bool bOOxmlExport ) { sal_uInt32 nBlibId = 0; @@ -4688,7 +4688,7 @@ sal_uInt32 EscherConnectorListEntry::GetConnectorRule( bool bFirst ) css::awt::Point aPoint( aXShape->getPosition() ); css::awt::Size aSize( aXShape->getSize() ); - Rectangle aRect( Point( aPoint.X, aPoint.Y ), Size( aSize.Width, aSize.Height ) ); + tools::Rectangle aRect( Point( aPoint.X, aPoint.Y ), Size( aSize.Width, aSize.Height ) ); Point aCenter( aRect.Center() ); tools::Polygon aPoly( 4 ); @@ -5216,7 +5216,7 @@ void EscherEx::AddAtom( sal_uInt32 nAtomSize, sal_uInt16 nRecType, int nRecVersi mpOutStrm->WriteUInt16( ( nRecInstance << 4 ) | ( nRecVersion & 0xf ) ).WriteUInt16( nRecType ).WriteUInt32( nAtomSize ); } -void EscherEx::AddChildAnchor( const Rectangle& rRect ) +void EscherEx::AddChildAnchor( const tools::Rectangle& rRect ) { AddAtom( 16, ESCHER_ChildAnchor ); mpOutStrm ->WriteInt32( rRect.Left() ) @@ -5225,7 +5225,7 @@ void EscherEx::AddChildAnchor( const Rectangle& rRect ) .WriteInt32( rRect.Bottom() ); } -void EscherEx::AddClientAnchor( const Rectangle& rRect ) +void EscherEx::AddClientAnchor( const tools::Rectangle& rRect ) { AddAtom( 8, ESCHER_ClientAnchor ); mpOutStrm->WriteInt16( rRect.Top() ) @@ -5239,9 +5239,9 @@ EscherExHostAppData* EscherEx::EnterAdditionalTextGroup() return nullptr; } -sal_uInt32 EscherEx::EnterGroup( const OUString& rShapeName, const Rectangle* pBoundRect ) +sal_uInt32 EscherEx::EnterGroup( const OUString& rShapeName, const tools::Rectangle* pBoundRect ) { - Rectangle aRect; + tools::Rectangle aRect; if( pBoundRect ) aRect = *pBoundRect; @@ -5287,12 +5287,12 @@ sal_uInt32 EscherEx::EnterGroup( const OUString& rShapeName, const Rectangle* pB return nShapeId; } -sal_uInt32 EscherEx::EnterGroup( const Rectangle* pBoundRect ) +sal_uInt32 EscherEx::EnterGroup( const tools::Rectangle* pBoundRect ) { return EnterGroup( OUString(), pBoundRect ); } -void EscherEx::SetGroupSnapRect( sal_uInt32 nGroupLevel, const Rectangle& rRect ) +void EscherEx::SetGroupSnapRect( sal_uInt32 nGroupLevel, const tools::Rectangle& rRect ) { if ( nGroupLevel ) { @@ -5308,7 +5308,7 @@ void EscherEx::SetGroupSnapRect( sal_uInt32 nGroupLevel, const Rectangle& rRect } } -void EscherEx::SetGroupLogicRect( sal_uInt32 nGroupLevel, const Rectangle& rRect ) +void EscherEx::SetGroupLogicRect( sal_uInt32 nGroupLevel, const tools::Rectangle& rRect ) { if ( nGroupLevel ) { @@ -5344,7 +5344,7 @@ void EscherEx::AddShape( sal_uInt32 nShpInstance, sal_uInt32 nFlags, sal_uInt32 mpOutStrm->WriteUInt32( nShapeID ).WriteUInt32( nFlags ); } -void EscherEx::Commit( EscherPropertyContainer& rProps, const Rectangle& ) +void EscherEx::Commit( EscherPropertyContainer& rProps, const tools::Rectangle& ) { rProps.Commit( GetStream() ); } diff --git a/filter/source/msfilter/eschesdo.cxx b/filter/source/msfilter/eschesdo.cxx index 95bd490582af..75bd52cdff99 100644 --- a/filter/source/msfilter/eschesdo.cxx +++ b/filter/source/msfilter/eschesdo.cxx @@ -95,7 +95,7 @@ Size ImplEESdrWriter::ImplMapSize( const Size& rSize ) void ImplEESdrWriter::ImplFlipBoundingBox( ImplEESdrObject& rObj, EscherPropertyContainer& rPropOpt ) { sal_Int32 nAngle = rObj.GetAngle(); - Rectangle aRect( rObj.GetRect() ); + tools::Rectangle aRect( rObj.GetRect() ); // for position calculations, we normalize the angle between 0 and 90 degrees if ( nAngle < 0 ) @@ -232,7 +232,7 @@ sal_uInt32 ImplEESdrWriter::ImplWriteShape( ImplEESdrObject& rObj, const css::awt::Size aSize100thmm( rObj.GetShapeRef()->getSize() ); const css::awt::Point aPoint100thmm( rObj.GetShapeRef()->getPosition() ); - Rectangle aRect100thmm( Point( aPoint100thmm.X, aPoint100thmm.Y ), Size( aSize100thmm.Width, aSize100thmm.Height ) ); + tools::Rectangle aRect100thmm( Point( aPoint100thmm.X, aPoint100thmm.Y ), Size( aSize100thmm.Width, aSize100thmm.Height ) ); if ( !mpPicStrm ) mpPicStrm = mpEscherEx->QueryPictureStream(); EscherPropertyContainer aPropOpt( mpEscherEx->GetGraphicProvider(), mpPicStrm, aRect100thmm ); @@ -271,10 +271,10 @@ sal_uInt32 ImplEESdrWriter::ImplWriteShape( ImplEESdrObject& rObj, SdrObject* pObj = GetSdrObjectFromXShape( rObj.GetShapeRef() ); if ( pObj ) { - Rectangle aBound = pObj->GetCurrentBoundRect(); + tools::Rectangle aBound = pObj->GetCurrentBoundRect(); Point aPosition( ImplMapPoint( aBound.TopLeft() ) ); Size aSize( ImplMapSize( aBound.GetSize() ) ); - rObj.SetRect( Rectangle( aPosition, aSize ) ); + rObj.SetRect( tools::Rectangle( aPosition, aSize ) ); rObj.SetAngle( 0 ); bDontWriteText = true; } @@ -378,7 +378,7 @@ sal_uInt32 ImplEESdrWriter::ImplWriteShape( ImplEESdrObject& rObj, F_PI18000 ) ) * 100.0 ) ); aEnd.Y() = - (sal_Int32)( ( sin( (double)( nEndAngle * F_PI18000 ) ) * 100.0 ) ); - const Rectangle& rRect = aRect100thmm; + const tools::Rectangle& rRect = aRect100thmm; aCenter.X() = rRect.Left() + ( rRect.GetWidth() / 2 ); aCenter.Y() = rRect.Top() + ( rRect.GetHeight() / 2 ); aStart.X() += aCenter.X(); @@ -411,7 +411,7 @@ sal_uInt32 ImplEESdrWriter::ImplWriteShape( ImplEESdrObject& rObj, } break; } - rObj.SetRect( Rectangle( ImplMapPoint( Point( aNewRect.X, aNewRect.Y ) ), + rObj.SetRect( tools::Rectangle( ImplMapPoint( Point( aNewRect.X, aNewRect.Y ) ), ImplMapSize( Size( aNewRect.Width, aNewRect.Height ) ) ) ); } if ( rObj.ImplGetText() ) @@ -431,7 +431,7 @@ sal_uInt32 ImplEESdrWriter::ImplWriteShape( ImplEESdrObject& rObj, if ( ! aPropOpt.CreateConnectorProperties( rObj.GetShapeRef(), rSolverContainer, aNewRect, nSpType, nSpFlags ) ) break; - rObj.SetRect( Rectangle( ImplMapPoint( Point( aNewRect.X, aNewRect.Y ) ), + rObj.SetRect( tools::Rectangle( ImplMapPoint( Point( aNewRect.X, aNewRect.Y ) ), ImplMapSize( Size( aNewRect.Width, aNewRect.Height ) ) ) ); mpEscherEx->OpenContainer( ESCHER_SpContainer ); @@ -656,7 +656,7 @@ sal_uInt32 ImplEESdrWriter::ImplWriteShape( ImplEESdrObject& rObj, } { - Rectangle aRect( rObj.GetRect() ); + tools::Rectangle aRect( rObj.GetRect() ); aRect.Justify(); rObj.SetRect( aRect ); } @@ -708,7 +708,7 @@ void ImplEESdrWriter::ImplWriteAdditionalText( ImplEESdrObject& rObj, const css::awt::Size aSize100thmm( rObj.GetShapeRef()->getSize() ); const css::awt::Point aPoint100thmm( rObj.GetShapeRef()->getPosition() ); - Rectangle aRect100thmm( Point( aPoint100thmm.X, aPoint100thmm.Y ), Size( aSize100thmm.Width, aSize100thmm.Height ) ); + tools::Rectangle aRect100thmm( Point( aPoint100thmm.X, aPoint100thmm.Y ), Size( aSize100thmm.Width, aSize100thmm.Height ) ); if ( !mpPicStrm ) mpPicStrm = mpEscherEx->QueryPictureStream(); EscherPropertyContainer aPropOpt( mpEscherEx->GetGraphicProvider(), mpPicStrm, aRect100thmm ); @@ -719,7 +719,7 @@ void ImplEESdrWriter::ImplWriteAdditionalText( ImplEESdrObject& rObj, //2do: this does not work right double fDist = hypot( rObj.GetRect().GetWidth(), rObj.GetRect().GetHeight() ); - rObj.SetRect( Rectangle( rTextRefPoint, + rObj.SetRect( tools::Rectangle( rTextRefPoint, Point( (sal_Int32)( rTextRefPoint.X() + fDist ), rTextRefPoint.Y() - 1 ) ) ); mpEscherEx->OpenContainer( ESCHER_SpContainer ); @@ -797,7 +797,7 @@ void ImplEESdrWriter::ImplWriteAdditionalText( ImplEESdrObject& rObj, sal_uInt32 ImplEESdrWriter::ImplEnterAdditionalTextGroup( const Reference< XShape >& rShape, - const Rectangle* pBoundRect ) + const tools::Rectangle* pBoundRect ) { mpHostAppData = mpEscherEx->EnterAdditionalTextGroup(); sal_uInt32 nGrpId = mpEscherEx->EnterGroup( pBoundRect ); @@ -953,7 +953,7 @@ void EscherEx::EndSdrObjectPage() mpImplEESdrWriter->ImplExitPage(); } -EscherExHostAppData* EscherEx::StartShape( const Reference< XShape >& /* rShape */, const Rectangle* /*pChildAnchor*/ ) +EscherExHostAppData* EscherEx::StartShape( const Reference< XShape >& /* rShape */, const tools::Rectangle* /*pChildAnchor*/ ) { return nullptr; } @@ -1195,7 +1195,7 @@ bool ImplEESdrObject::ImplGetPropertyValue( const sal_Unicode* rString ) void ImplEESdrObject::SetRect( const Point& rPos, const Size& rSz ) { - maRect = Rectangle( rPos, rSz ); + maRect = tools::Rectangle( rPos, rSz ); } const SdrObject* ImplEESdrObject::GetSdrObject() const diff --git a/filter/source/msfilter/eschesdo.hxx b/filter/source/msfilter/eschesdo.hxx index 0a9fbc7144d3..bde285a83cfc 100644 --- a/filter/source/msfilter/eschesdo.hxx +++ b/filter/source/msfilter/eschesdo.hxx @@ -37,7 +37,7 @@ class ImplEESdrObject css::uno::Reference< css::drawing::XShape > mXShape; // XTextRef mXText; // TextRef des globalen Text css::uno::Any mAny; - Rectangle maRect; + tools::Rectangle maRect; OUString mType; sal_uInt32 mnShapeId; sal_uInt32 mnTextSize; @@ -68,9 +68,9 @@ public: const OUString& GetType() const { return mType; } void SetType( const OUString& rS ) { mType = rS; } - const Rectangle& GetRect() const { return maRect; } + const tools::Rectangle& GetRect() const { return maRect; } void SetRect( const Point& rPos, const Size& rSz ); - void SetRect( const Rectangle& rRect ) + void SetRect( const tools::Rectangle& rRect ) { maRect = rRect; } sal_Int32 GetAngle() const { return mnAngle; } @@ -130,7 +130,7 @@ class ImplEESdrWriter const Point& rTextRefPoint ); sal_uInt32 ImplEnterAdditionalTextGroup( const css::uno::Reference< css::drawing::XShape >& rShape, - const Rectangle* pBoundRect ); + const tools::Rectangle* pBoundRect ); void ImplFlushSolverContainer(); public: diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx index 545d6a0be1fd..cad1ea27f9a7 100644 --- a/filter/source/msfilter/msdffimp.cxx +++ b/filter/source/msfilter/msdffimp.cxx @@ -533,7 +533,7 @@ void SvxMSDffManager::SolveSolver( const SvxMSDffSolverContainer& rSolver ) sal_uInt16 k, j, nPolySize = aPolyPoly.Count(); if ( nPolySize ) { - Rectangle aBoundRect( aPolyPoly.GetBoundRect() ); + tools::Rectangle aBoundRect( aPolyPoly.GetBoundRect() ); if ( aBoundRect.GetWidth() && aBoundRect.GetHeight() ) { sal_uInt32 nPointCount = 0; @@ -2560,7 +2560,7 @@ void DffPropertyReader::ApplyCustomShapeGeometryAttributes( SvStream& rIn, SfxIt void DffPropertyReader::ApplyAttributes( SvStream& rIn, SfxItemSet& rSet ) const { - Rectangle aEmptyRect; + tools::Rectangle aEmptyRect; DffRecordHeader aHdTemp; DffObjData aDffObjTemp( aHdTemp, aEmptyRect, 0 ); ApplyAttributes( rIn, rSet, aDffObjTemp ); @@ -3750,7 +3750,7 @@ static void lcl_ApplyCropping( const DffPropSet& rPropSet, SfxItemSet* pSet, Gra pSet->Put( SdrGrafCropItem( nLeft, nTop, nRight, nBottom ) ); else { - Rectangle aCropRect( nLeft, nTop, aCropSize.Width() - nRight, aCropSize.Height() - nBottom ); + tools::Rectangle aCropRect( nLeft, nTop, aCropSize.Width() - nRight, aCropSize.Height() - nBottom ); aCropBitmap.Crop( aCropRect ); rGraf = aCropBitmap; } @@ -3762,7 +3762,7 @@ SdrObject* SvxMSDffManager::ImportGraphic( SvStream& rSt, SfxItemSet& rSet, cons SdrObject* pRet = nullptr; OUString aFileName; OUString aLinkFileName, aLinkFilterName; - Rectangle aVisArea; + tools::Rectangle aVisArea; MSO_BlipFlags eFlags = (MSO_BlipFlags)GetPropertyValue( DFF_Prop_pibFlags, mso_blipflagDefault ); sal_uInt32 nBlipId = GetPropertyValue( DFF_Prop_pib, 0 ); @@ -4010,7 +4010,7 @@ SdrObject* SvxMSDffManager::ImportGraphic( SvStream& rSt, SfxItemSet& rSet, cons // PptSlidePersistEntry& rPersistEntry, SdPage* pPage SdrObject* SvxMSDffManager::ImportObj( SvStream& rSt, void* pClientData, - Rectangle& rClientRect, const Rectangle& rGlobalChildRect, int nCalledByGroup, sal_Int32* pShapeId ) + tools::Rectangle& rClientRect, const tools::Rectangle& rGlobalChildRect, int nCalledByGroup, sal_Int32* pShapeId ) { SdrObject* pRet = nullptr; DffRecordHeader aObjHd; @@ -4028,7 +4028,7 @@ SdrObject* SvxMSDffManager::ImportObj( SvStream& rSt, void* pClientData, } SdrObject* SvxMSDffManager::ImportGroup( const DffRecordHeader& rHd, SvStream& rSt, void* pClientData, - Rectangle& rClientRect, const Rectangle& rGlobalChildRect, + tools::Rectangle& rClientRect, const tools::Rectangle& rGlobalChildRect, int nCalledByGroup, sal_Int32* pShapeId ) { SdrObject* pRet = nullptr; @@ -4053,9 +4053,9 @@ SdrObject* SvxMSDffManager::ImportGroup( const DffRecordHeader& rHd, SvStream& r sal_Int32 nSpFlags = nGroupShapeFlags; nGroupRotateAngle = mnFix16Angle; - Rectangle aClientRect( rClientRect ); + tools::Rectangle aClientRect( rClientRect ); - Rectangle aGlobalChildRect; + tools::Rectangle aGlobalChildRect; if ( !nCalledByGroup || rGlobalChildRect.IsEmpty() ) aGlobalChildRect = GetGlobalChildAnchor( rHd, rSt, aClientRect ); else @@ -4071,7 +4071,7 @@ SdrObject* SvxMSDffManager::ImportGroup( const DffRecordHeader& rHd, SvStream& r const long nRotatedWidth = aClientRect.GetHeight(); const long nRotatedHeight = aClientRect.GetWidth(); Size aNewSize(nRotatedWidth, nRotatedHeight); - Rectangle aNewRect( aTopLeft, aNewSize ); + tools::Rectangle aNewRect( aTopLeft, aNewSize ); aClientRect = aNewRect; } @@ -4086,7 +4086,7 @@ SdrObject* SvxMSDffManager::ImportGroup( const DffRecordHeader& rHd, SvStream& r break; if ( aRecHd2.nRecType == DFF_msofbtSpgrContainer ) { - Rectangle aGroupClientAnchor, aGroupChildAnchor; + tools::Rectangle aGroupClientAnchor, aGroupChildAnchor; GetGroupAnchors( aRecHd2, rSt, aGroupClientAnchor, aGroupChildAnchor, aClientRect, aGlobalChildRect ); if (!aRecHd2.SeekToBegOfRecord(rSt)) return pRet; @@ -4145,7 +4145,7 @@ SdrObject* SvxMSDffManager::ImportGroup( const DffRecordHeader& rHd, SvStream& r } SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& rSt, void* pClientData, - Rectangle& rClientRect, const Rectangle& rGlobalChildRect, + tools::Rectangle& rClientRect, const tools::Rectangle& rGlobalChildRect, int nCalledByGroup, sal_Int32* pShapeId ) { SdrObject* pRet = nullptr; @@ -4234,7 +4234,7 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r Scale( o ); Scale( r ); Scale( u ); - aObjData.aChildAnchor = Rectangle( l, o, r, u ); + aObjData.aChildAnchor = tools::Rectangle( l, o, r, u ); if ( !rGlobalChildRect.IsEmpty() && !rClientRect.IsEmpty() && rGlobalChildRect.GetWidth() && rGlobalChildRect.GetHeight() ) { double fWidth = r - l; @@ -4245,7 +4245,7 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r double fo = ( ( o - rGlobalChildRect.Top() ) * fYScale ) + rClientRect.Top(); fWidth *= fXScale; fHeight *= fYScale; - aObjData.aChildAnchor = Rectangle( Point( (sal_Int32)fl, (sal_Int32)fo ), Size( (sal_Int32)( fWidth + 1 ), (sal_Int32)( fHeight + 1 ) ) ); + aObjData.aChildAnchor = tools::Rectangle( Point( (sal_Int32)fl, (sal_Int32)fo ), Size( (sal_Int32)( fWidth + 1 ), (sal_Int32)( fHeight + 1 ) ) ); } } @@ -4257,9 +4257,9 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r aObjData.aBoundRect = aObjData.aChildAnchor; if ( aObjData.nSpFlags & SP_FBACKGROUND ) - aObjData.aBoundRect = Rectangle( Point(), Size( 1, 1 ) ); + aObjData.aBoundRect = tools::Rectangle( Point(), Size( 1, 1 ) ); - Rectangle aTextRect; + tools::Rectangle aTextRect; if ( !aObjData.aBoundRect.IsEmpty() ) { // apply rotation to the BoundingBox BEFORE an object has been generated if( mnFix16Angle ) @@ -4272,7 +4272,7 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r Point aTopLeft( aObjData.aBoundRect.Left() + nHalfWidth - nHalfHeight, aObjData.aBoundRect.Top() + nHalfHeight - nHalfWidth ); Size aNewSize( aObjData.aBoundRect.GetHeight(), aObjData.aBoundRect.GetWidth() ); - Rectangle aNewRect( aTopLeft, aNewSize ); + tools::Rectangle aNewRect( aTopLeft, aNewSize ); aObjData.aBoundRect = aNewRect; } } @@ -4470,7 +4470,7 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r // before clearing the GeometryItem we have to store the current Coordinates const uno::Any* pAny = ((SdrCustomShapeGeometryItem&)aGeometryItem).GetPropertyValueByName( sPath, sCoordinates ); - Rectangle aPolyBoundRect; + tools::Rectangle aPolyBoundRect; Point aStartPt( 0,0 ); if ( pAny && ( *pAny >>= seqCoordinates ) && ( seqCoordinates.getLength() >= 4 ) ) { @@ -4486,7 +4486,7 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r aP.Y() = nY; aXP[ (sal_uInt16)nPtNum ] = aP; } - aPolyBoundRect = Rectangle( aXP.GetBoundRect() ); + aPolyBoundRect = tools::Rectangle( aXP.GetBoundRect() ); if ( nNumElemVert >= 3 ) { // arc first command is always wr -- clockwise arc // the parameters are : (left,top),(right,bottom),start(x,y),end(x,y) @@ -4494,7 +4494,7 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r } } else - aPolyBoundRect = Rectangle( -21600, 0, 21600, 43200 ); // defaulting + aPolyBoundRect = tools::Rectangle( -21600, 0, 21600, 43200 ); // defaulting // clearing items, so MergeDefaultAttributes will set the corresponding defaults from EnhancedCustomShapeGeometry aGeometryItem.ClearPropertyValue( sHandles ); @@ -4553,7 +4553,7 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r { XPolygon aXPoly( aPolyBoundRect.Center(), aPolyBoundRect.GetWidth() / 2, aPolyBoundRect.GetHeight() / 2, (sal_uInt16)nStartAngle / 10, (sal_uInt16)nEndAngle / 10, true ); - Rectangle aPolyPieRect( aXPoly.GetBoundRect() ); + tools::Rectangle aPolyPieRect( aXPoly.GetBoundRect() ); double fYScale = 0.0, fXScale = 0.0; double fYOfs, fXOfs; @@ -4562,7 +4562,7 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r Size aS( aObjData.aBoundRect.GetSize() ); aP.X() -= aS.Width() / 2; aP.Y() -= aS.Height() / 2; - Rectangle aLogicRect( aP, aS ); + tools::Rectangle aLogicRect( aP, aS ); fYOfs = fXOfs = 0.0; @@ -4588,8 +4588,8 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r if ( aPolyPieRect.GetHeight() ) fYScale = (double)aPolyBoundRect.GetHeight() / (double)aPolyPieRect.GetHeight(); - Rectangle aOldBoundRect( aObjData.aBoundRect ); - aObjData.aBoundRect = Rectangle( Point( aLogicRect.Left() + (sal_Int32)fXOfs, aLogicRect.Top() + (sal_Int32)fYOfs ), + tools::Rectangle aOldBoundRect( aObjData.aBoundRect ); + aObjData.aBoundRect = tools::Rectangle( Point( aLogicRect.Left() + (sal_Int32)fXOfs, aLogicRect.Top() + (sal_Int32)fYOfs ), Size( (sal_Int32)( aLogicRect.GetWidth() * fXScale ), (sal_Int32)( aLogicRect.GetHeight() * fYScale ) ) ); // creating the text frame -> scaling into (0,0),(21600,21600) destination coordinate system @@ -4664,7 +4664,7 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r // mirrored horizontally? if ( nSpFlags & SP_FFLIPH ) { - Rectangle aBndRect( pRet->GetSnapRect() ); + tools::Rectangle aBndRect( pRet->GetSnapRect() ); Point aTop( ( aBndRect.Left() + aBndRect.Right() ) >> 1, aBndRect.Top() ); Point aBottom( aTop.X(), aTop.Y() + 1000 ); pRet->NbcMirror( aTop, aBottom ); @@ -4672,7 +4672,7 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r // mirrored vertically? if ( nSpFlags & SP_FFLIPV ) { - Rectangle aBndRect( pRet->GetSnapRect() ); + tools::Rectangle aBndRect( pRet->GetSnapRect() ); Point aLeft( aBndRect.Left(), ( aBndRect.Top() + aBndRect.Bottom() ) >> 1 ); Point aRight( aLeft.X() + 1000, aLeft.Y() ); pRet->NbcMirror( aLeft, aRight ); @@ -4775,7 +4775,7 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r // mirrored horizontally? if ( nSpFlags & SP_FFLIPH ) { - Rectangle aBndRect( pRet->GetSnapRect() ); + tools::Rectangle aBndRect( pRet->GetSnapRect() ); Point aTop( ( aBndRect.Left() + aBndRect.Right() ) >> 1, aBndRect.Top() ); Point aBottom( aTop.X(), aTop.Y() + 1000 ); pRet->NbcMirror( aTop, aBottom ); @@ -4783,7 +4783,7 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r // mirrored vertically? if ( nSpFlags & SP_FFLIPV ) { - Rectangle aBndRect( pRet->GetSnapRect() ); + tools::Rectangle aBndRect( pRet->GetSnapRect() ); Point aLeft( aBndRect.Left(), ( aBndRect.Top() + aBndRect.Bottom() ) >> 1 ); Point aRight( aLeft.X() + 1000, aLeft.Y() ); pRet->NbcMirror( aLeft, aRight ); @@ -4832,9 +4832,9 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r return pRet; } -Rectangle SvxMSDffManager::GetGlobalChildAnchor( const DffRecordHeader& rHd, SvStream& rSt, Rectangle& aClientRect ) +tools::Rectangle SvxMSDffManager::GetGlobalChildAnchor( const DffRecordHeader& rHd, SvStream& rSt, tools::Rectangle& aClientRect ) { - Rectangle aChildAnchor; + tools::Rectangle aChildAnchor; if (!rHd.SeekToContent(rSt)) return aChildAnchor; @@ -4880,12 +4880,12 @@ Rectangle SvxMSDffManager::GetGlobalChildAnchor( const DffRecordHeader& rHd, SvS Scale( b ); if ( bIsClientRectRead ) { - Rectangle aChild( l, t, r, b ); + tools::Rectangle aChild( l, t, r, b ); aChildAnchor.Union( aChild ); } else { - aClientRect = Rectangle( l, t, r, b ); + aClientRect = tools::Rectangle( l, t, r, b ); bIsClientRectRead = true; } } @@ -4899,7 +4899,7 @@ Rectangle SvxMSDffManager::GetGlobalChildAnchor( const DffRecordHeader& rHd, SvS Scale( o ); Scale( r ); Scale( u ); - Rectangle aChild( l, o, r, u ); + tools::Rectangle aChild( l, o, r, u ); aChildAnchor.Union( aChild ); break; } @@ -4914,8 +4914,8 @@ Rectangle SvxMSDffManager::GetGlobalChildAnchor( const DffRecordHeader& rHd, SvS } void SvxMSDffManager::GetGroupAnchors( const DffRecordHeader& rHd, SvStream& rSt, - Rectangle& rGroupClientAnchor, Rectangle& rGroupChildAnchor, - const Rectangle& rClientRect, const Rectangle& rGlobalChildRect ) + tools::Rectangle& rGroupClientAnchor, tools::Rectangle& rGroupChildAnchor, + const tools::Rectangle& rClientRect, const tools::Rectangle& rGlobalChildRect ) { if (!rHd.SeekToContent(rSt)) return; @@ -4945,7 +4945,7 @@ void SvxMSDffManager::GetGroupAnchors( const DffRecordHeader& rHd, SvStream& rSt Scale( o ); Scale( r ); Scale( u ); - Rectangle aChild( l, o, r, u ); + tools::Rectangle aChild( l, o, r, u ); if ( bFirst ) { @@ -4959,7 +4959,7 @@ void SvxMSDffManager::GetGroupAnchors( const DffRecordHeader& rHd, SvStream& rSt double fo = ( ( o - rGlobalChildRect.Top() ) * fYScale ) + rClientRect.Top(); fWidth *= fXScale; fHeight *= fYScale; - rGroupClientAnchor = Rectangle( Point( (sal_Int32)fl, (sal_Int32)fo ), Size( (sal_Int32)( fWidth + 1 ), (sal_Int32)( fHeight + 1 ) ) ); + rGroupClientAnchor = tools::Rectangle( Point( (sal_Int32)fl, (sal_Int32)fo ), Size( (sal_Int32)( fWidth + 1 ), (sal_Int32)( fHeight + 1 ) ) ); } bFirst = false; } @@ -4979,7 +4979,7 @@ void SvxMSDffManager::GetGroupAnchors( const DffRecordHeader& rHd, SvStream& rSt SdrObject* SvxMSDffManager::ProcessObj(SvStream& rSt, DffObjData& rObjData, void* pData, - Rectangle& rTextRect, + tools::Rectangle& rTextRect, SdrObject* pObj ) { @@ -5185,7 +5185,7 @@ SdrObject* SvxMSDffManager::ProcessObj(SvStream& rSt, // the vertical paragraph indents are part of the BoundRect, // here we 'remove' them by calculating - Rectangle aNewRect(rTextRect); + tools::Rectangle aNewRect(rTextRect); aNewRect.Bottom() -= nTextTop + nTextBottom; aNewRect.Right() -= nTextLeft + nTextRight; @@ -6237,7 +6237,7 @@ bool SvxMSDffManager::GetShape(sal_uLong nId, SdrObject*& rpShape, /* access to a BLIP at runtime (if the Blip-Number is already known) --------------------------- ******************************************************************************/ -bool SvxMSDffManager::GetBLIP( sal_uLong nIdx_, Graphic& rData, Rectangle* pVisArea ) +bool SvxMSDffManager::GetBLIP( sal_uLong nIdx_, Graphic& rData, tools::Rectangle* pVisArea ) { if (!pStData) return false; @@ -6324,7 +6324,7 @@ bool SvxMSDffManager::GetBLIP( sal_uLong nIdx_, Graphic& rData, Rectangle* pVisA /* access to a BLIP at runtime (with correctly positioned stream) --------------------------------- ******************************************************************************/ -bool SvxMSDffManager::GetBLIPDirect( SvStream& rBLIPStream, Graphic& rData, Rectangle* pVisArea ) +bool SvxMSDffManager::GetBLIPDirect( SvStream& rBLIPStream, Graphic& rData, tools::Rectangle* pVisArea ) { sal_uLong nOldPos = rBLIPStream.Tell(); @@ -6361,7 +6361,7 @@ bool SvxMSDffManager::GetBLIPDirect( SvStream& rBLIPStream, Graphic& rData, Rect aMtfSize100.Height() /= 360; if ( pVisArea ) // seem that we currently are skipping the visarea position - *pVisArea = Rectangle( Point(), aMtfSize100 ); + *pVisArea = tools::Rectangle( Point(), aMtfSize100 ); // skip rest of header nSkip = 6; @@ -6552,8 +6552,8 @@ bool SvxMSDffManager::ShapeHasText( sal_uLong /* nShapeId */, sal_uLong /* nFile // #i32596# - add new parameter <_nCalledByGroup> SdrObject* SvxMSDffManager::ImportOLE( sal_uInt32 nOLEId, const Graphic& rGrf, - const Rectangle& rBoundRect, - const Rectangle& rVisArea, + const tools::Rectangle& rBoundRect, + const tools::Rectangle& rVisArea, const int /* _nCalledByGroup */, sal_Int64 nAspect ) const { @@ -6880,7 +6880,7 @@ OUString GetFilterNameFromClassID_Impl( const SvGlobalName& aGlobName ) css::uno::Reference < css::embed::XEmbeddedObject > SvxMSDffManager::CheckForConvertToSOObj( sal_uInt32 nConvertFlags, SotStorage& rSrcStg, const uno::Reference < embed::XStorage >& rDestStorage, const Graphic& rGrf, - const Rectangle& rVisArea, OUString const& rBaseURL) + const tools::Rectangle& rVisArea, OUString const& rBaseURL) { uno::Reference < embed::XEmbeddedObject > xObj; SvGlobalName aStgNm = rSrcStg.GetClassName(); @@ -7061,8 +7061,8 @@ SdrOle2Obj* SvxMSDffManager::CreateSdrOLEFromStorage( tools::SvRef<SotStorage>& rSrcStorage, const uno::Reference < embed::XStorage >& xDestStorage, const Graphic& rGrf, - const Rectangle& rBoundRect, - const Rectangle& rVisArea, + const tools::Rectangle& rBoundRect, + const tools::Rectangle& rVisArea, SvStream* pDataStrm, ErrCode& rError, sal_uInt32 nConvertFlags, diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx index 4b31ec3ef5ef..6cbec6992f76 100644 --- a/filter/source/msfilter/svdfppt.cxx +++ b/filter/source/msfilter/svdfppt.cxx @@ -610,7 +610,7 @@ void SdrEscherImport::ProcessClientAnchor2( SvStream& rSt, DffRecordHeader& rHd, Scale( t ); Scale( r ); Scale( b ); - rObj.aChildAnchor = Rectangle( l, t, r, b ); + rObj.aChildAnchor = tools::Rectangle( l, t, r, b ); rObj.bChildAnchor = true; return; }; @@ -732,7 +732,7 @@ sal_uLong DffPropSet::SanitizeEndPos(SvStream &rIn, sal_uLong nEndRecPos) The parameter pOriginalObj is the object as it was imported by our general escher import, it must either be deleted or it can be returned to be inserted into the sdr page. */ -SdrObject* SdrEscherImport::ProcessObj( SvStream& rSt, DffObjData& rObjData, void* pData, Rectangle& rTextRect, SdrObject* pOriginalObj ) +SdrObject* SdrEscherImport::ProcessObj( SvStream& rSt, DffObjData& rObjData, void* pData, tools::Rectangle& rTextRect, SdrObject* pOriginalObj ) { if ( dynamic_cast<const SdrObjCustomShape* >(pOriginalObj) != nullptr ) pOriginalObj->SetMergedItem( SdrTextFixedCellHeightItem( true ) ); @@ -1243,7 +1243,7 @@ SdrObject* SdrEscherImport::ProcessObj( SvStream& rSt, DffObjData& rObjData, voi { if ( rObjData.nSpFlags & SP_FBACKGROUND ) { - pRet->NbcSetSnapRect( Rectangle( Point(), rData.pPage.page->GetSize() ) ); // set size + pRet->NbcSetSnapRect( tools::Rectangle( Point(), rData.pPage.page->GetSize() ) ); // set size } if ( rPersistEntry.pSolverContainer ) { @@ -1782,8 +1782,8 @@ bool SdrPowerPointOLEDecompress( SvStream& rOutput, SvStream& rInput, sal_uInt32 // #i32596# - add new parameter <_nCalledByGroup> SdrObject* SdrPowerPointImport::ImportOLE( sal_uInt32 nOLEId, const Graphic& rGraf, - const Rectangle& rBoundRect, - const Rectangle& rVisArea, + const tools::Rectangle& rBoundRect, + const tools::Rectangle& rVisArea, const int /*_nCalledByGroup*/, sal_Int64 /*nAspect*/ ) const { @@ -2796,7 +2796,7 @@ void SdrPowerPointImport::ImportPage( SdrPage* pRet, const PptSlidePersistEntry* { case DFF_msofbtSpContainer : { - Rectangle aPageSize( Point(), pRet->GetSize() ); + tools::Rectangle aPageSize( Point(), pRet->GetSize() ); if ( rSlidePersist.aSlideAtom.nFlags & 4 ) // follow master background? { if ( HasMasterPage( nAktPageNum, eAktPageKind ) ) @@ -2876,7 +2876,7 @@ void SdrPowerPointImport::ImportPage( SdrPage* pRet, const PptSlidePersistEntry* ReadDffRecordHeader( rStCtrl, aShapeHd ); if ( ( aShapeHd.nRecType == DFF_msofbtSpContainer ) || ( aShapeHd.nRecType == DFF_msofbtSpgrContainer ) ) { - Rectangle aEmpty; + tools::Rectangle aEmpty; aShapeHd.SeekToBegOfRecord( rStCtrl ); sal_Int32 nShapeId; aProcessData.pTableRowProperties.reset(); @@ -3037,7 +3037,7 @@ SdrObject* SdrPowerPointImport::ImportPageBackgroundObject( const SdrPage& rPage mnFix16Angle = Fix16ToAngle( GetPropertyValue( DFF_Prop_Rotation, 0 ) ); sal_uInt32 nColor = GetPropertyValue( DFF_Prop_fillColor, 0xffffff ); pSet.reset(new SfxItemSet( pSdrModel->GetItemPool() )); - DffObjData aObjData( aEscherObjectHd, Rectangle( 0, 0, 28000, 21000 ), 0 ); + DffObjData aObjData( aEscherObjectHd, tools::Rectangle( 0, 0, 28000, 21000 ), 0 ); ApplyAttributes( rStCtrl, *pSet, aObjData ); Color aColor( MSO_CLR_ToColor( nColor ) ); pSet->Put( XFillColorItem( OUString(), aColor ) ); @@ -3053,7 +3053,7 @@ SdrObject* SdrPowerPointImport::ImportPageBackgroundObject( const SdrPage& rPage pSet->Put( XFillStyleItem( drawing::FillStyle_NONE ) ); } pSet->Put( XLineStyleItem( drawing::LineStyle_NONE ) ); - Rectangle aRect( rPage.GetLftBorder(), rPage.GetUppBorder(), rPage.GetWdt()-rPage.GetRgtBorder(), rPage.GetHgt()-rPage.GetLwrBorder() ); + tools::Rectangle aRect( rPage.GetLftBorder(), rPage.GetUppBorder(), rPage.GetWdt()-rPage.GetRgtBorder(), rPage.GetHgt()-rPage.GetLwrBorder() ); pRet = new SdrRectObj( aRect ); pRet->SetModel( pSdrModel ); @@ -7192,7 +7192,7 @@ bool IsLine( const SdrObject* pObj ) bool GetCellPosition( const SdrObject* pObj, const std::set< sal_Int32 >& rRows, const std::set< sal_Int32 >& rColumns, sal_Int32& nTableIndex, sal_Int32& nRow, sal_Int32& nRowCount, sal_Int32& nColumn, sal_Int32& nColumnCount ) { - Rectangle aSnapRect( pObj->GetSnapRect() ); + tools::Rectangle aSnapRect( pObj->GetSnapRect() ); bool bCellObject = ( aSnapRect.GetWidth() > 1 ) && ( aSnapRect.GetHeight() > 1 ); if ( bCellObject ) { @@ -7232,7 +7232,7 @@ bool GetCellPosition( const SdrObject* pObj, const std::set< sal_Int32 >& rRows, #define LinePositionBLTR 0x20000000 -void GetRowPositions( const Rectangle& rSnapRect, const std::set< sal_Int32 >& rRows, +void GetRowPositions( const tools::Rectangle& rSnapRect, const std::set< sal_Int32 >& rRows, const std::set< sal_Int32 >& rColumns, std::vector< sal_Int32 >& rPositions, sal_Int32 nColumn, sal_Int32 nFlags ) { std::set< sal_Int32 >::const_iterator aRow( rRows.find( rSnapRect.Top() ) ); @@ -7253,7 +7253,7 @@ void GetRowPositions( const Rectangle& rSnapRect, const std::set< sal_Int32 >& r } -void GetColumnPositions( const Rectangle& rSnapRect, const std::set< sal_Int32 >& /* rRows */, +void GetColumnPositions( const tools::Rectangle& rSnapRect, const std::set< sal_Int32 >& /* rRows */, const std::set< sal_Int32 >& rColumns, std::vector< sal_Int32 >& rPositions, sal_Int32 nRow, sal_Int32 nFlags ) { std::set< sal_Int32 >::const_iterator aColumn( rColumns.find( rSnapRect.Left() ) ); @@ -7274,9 +7274,9 @@ void GetColumnPositions( const Rectangle& rSnapRect, const std::set< sal_Int32 > } void GetLinePositions( const SdrObject* pObj, const std::set< sal_Int32 >& rRows, const std::set< sal_Int32 >& rColumns, - std::vector< sal_Int32 >& rPositions, const Rectangle& rGroupSnap ) + std::vector< sal_Int32 >& rPositions, const tools::Rectangle& rGroupSnap ) { - Rectangle aSnapRect( pObj->GetSnapRect() ); + tools::Rectangle aSnapRect( pObj->GetSnapRect() ); if ( aSnapRect.Left() == aSnapRect.Right() ) { std::set< sal_Int32 >::const_iterator aColumn( rColumns.find( aSnapRect.Left() ) ); @@ -7592,7 +7592,7 @@ SdrObject* SdrPowerPointImport::CreateTable( SdrObject* pGroup, sal_uInt32* pTab const SdrObject* pObj( aGroupIter.Next() ); if ( !IsLine( pObj ) ) { - Rectangle aSnapRect( pObj->GetSnapRect() ); + tools::Rectangle aSnapRect( pObj->GetSnapRect() ); aRows.insert( aSnapRect.Top() ); aColumns.insert( aSnapRect.Left() ); } diff --git a/filter/source/pdf/pdfexport.cxx b/filter/source/pdf/pdfexport.cxx index 5be242f870e7..4dc6a9dca0cc 100644 --- a/filter/source/pdf/pdfexport.cxx +++ b/filter/source/pdf/pdfexport.cxx @@ -1014,7 +1014,7 @@ bool PDFExport::ImplExportPage( vcl::PDFWriter& rWriter, vcl::PDFExtOutDevData& { const Size aSizePDF( OutputDevice::LogicToLogic( rMtf.GetPrefSize(), rMtf.GetPrefMapMode(), MapUnit::MapPoint ) ); Point aOrigin; - Rectangle aPageRect( aOrigin, rMtf.GetPrefSize() ); + tools::Rectangle aPageRect( aOrigin, rMtf.GetPrefSize() ); bool bRet = true; rWriter.NewPage( aSizePDF.Width(), aSizePDF.Height() ); @@ -1096,12 +1096,12 @@ void PDFExport::ImplWriteWatermark( vcl::PDFWriter& rWriter, const Size& rPageSi rWriter.SetFont( aFont ); rWriter.SetTextColor( COL_LIGHTGREEN ); Point aTextPoint; - Rectangle aTextRect; + tools::Rectangle aTextRect; if( rPageSize.Width() > rPageSize.Height() ) { aTextPoint = Point( (rPageSize.Width()-w)/2, rPageSize.Height()-(rPageSize.Height()-nTextHeight)/2 ); - aTextRect = Rectangle( Point( (rPageSize.Width()-w)/2, + aTextRect = tools::Rectangle( Point( (rPageSize.Width()-w)/2, (rPageSize.Height()-nTextHeight)/2 ), Size( w, nTextHeight ) ); } @@ -1109,7 +1109,7 @@ void PDFExport::ImplWriteWatermark( vcl::PDFWriter& rWriter, const Size& rPageSi { aTextPoint = Point( (rPageSize.Width()-nTextHeight)/2, (rPageSize.Height()-w)/2 ); - aTextRect = Rectangle( aTextPoint, Size( nTextHeight, w ) ); + aTextRect = tools::Rectangle( aTextPoint, Size( nTextHeight, w ) ); } rWriter.SetClipRegion(); rWriter.BeginTransparencyGroup(); diff --git a/filter/source/svg/svgfontexport.cxx b/filter/source/svg/svgfontexport.cxx index 39b7276f3f7f..cd6b224b0041 100644 --- a/filter/source/svg/svgfontexport.cxx +++ b/filter/source/svg/svgfontexport.cxx @@ -229,7 +229,7 @@ void SVGFontExport::implEmbedFont( const vcl::Font& rFont ) { const Point aPos; - const tools::PolyPolygon aMissingGlyphPolyPoly( Rectangle( aPos, aSize ) ); + const tools::PolyPolygon aMissingGlyphPolyPoly( tools::Rectangle( aPos, aSize ) ); mrExport.AddAttribute( XML_NAMESPACE_NONE, "d", SVGActionWriter::GetPathString( aMissingGlyphPolyPoly, false ) ); @@ -257,17 +257,17 @@ void SVGFontExport::implEmbedGlyph( OutputDevice& rOut, const OUString& rCellStr if( rOut.GetTextOutline( aPolyPoly, rCellStr ) ) { - Rectangle aBoundRect; + tools::Rectangle aBoundRect; aPolyPoly.Scale( 1.0, -1.0 ); if( !rOut.GetTextBoundRect( aBoundRect, rCellStr ) ) - aBoundRect = Rectangle( Point( 0, 0 ), Size( rOut.GetTextWidth( rCellStr ), 0 ) ); + aBoundRect = tools::Rectangle( Point( 0, 0 ), Size( rOut.GetTextWidth( rCellStr ), 0 ) ); mrExport.AddAttribute( XML_NAMESPACE_NONE, "unicode", rCellStr ); if( rCellStr[ 0 ] == nSpace && rCellStr.getLength() == 1 ) - aBoundRect = Rectangle( Point( 0, 0 ), Size( rOut.GetTextWidth( OUString(' ') ), 0 ) ); + aBoundRect = tools::Rectangle( Point( 0, 0 ), Size( rOut.GetTextWidth( OUString(' ') ), 0 ) ); mrExport.AddAttribute( XML_NAMESPACE_NONE, "horiz-adv-x", OUString::number( aBoundRect.GetWidth() ) ); diff --git a/filter/source/svg/svgwriter.cxx b/filter/source/svg/svgwriter.cxx index 12cf98074131..e271db6cfceb 100644 --- a/filter/source/svg/svgwriter.cxx +++ b/filter/source/svg/svgwriter.cxx @@ -175,7 +175,7 @@ void SVGAttributeWriter::AddColorAttr( const char* pColorAttrName, void SVGAttributeWriter::AddPaintAttr( const Color& rLineColor, const Color& rFillColor, - const Rectangle* pObjBoundRect, const Gradient* pFillGradient ) + const tools::Rectangle* pObjBoundRect, const Gradient* pFillGradient ) { // Fill if( pObjBoundRect && pFillGradient ) @@ -198,7 +198,7 @@ void SVGAttributeWriter::AddPaintAttr( const Color& rLineColor, const Color& rFi } -void SVGAttributeWriter::AddGradientDef( const Rectangle& rObjRect, const Gradient& rGradient, OUString& rGradientId ) +void SVGAttributeWriter::AddGradientDef( const tools::Rectangle& rObjRect, const Gradient& rGradient, OUString& rGradientId ) { if( rObjRect.GetWidth() && rObjRect.GetHeight() && ( rGradient.GetStyle() == GradientStyle::Linear || rGradient.GetStyle() == GradientStyle::Axial || @@ -212,7 +212,7 @@ void SVGAttributeWriter::AddGradientDef( const Rectangle& rObjRect, const Gradie static sal_Int32 nCurGradientId = 1; aPoly.Rotate( aObjRectCenter, nAngle ); - Rectangle aRect( aPoly.GetBoundRect() ); + tools::Rectangle aRect( aPoly.GetBoundRect() ); // adjust start/end colors with intensities aStartColor.SetRed( (sal_uInt8)( ( aStartColor.GetRed() * rGradient.GetStartIntensity() ) / 100 ) ); @@ -1764,12 +1764,12 @@ Size& SVGActionWriter::ImplMap( const Size& rSz, Size& rDstSz ) const } -void SVGActionWriter::ImplMap( const Rectangle& rRect, Rectangle& rDstRect ) const +void SVGActionWriter::ImplMap( const tools::Rectangle& rRect, tools::Rectangle& rDstRect ) const { Point aTL( rRect.TopLeft() ); Size aSz( rRect.GetSize() ); - rDstRect = Rectangle( ImplMap( aTL, aTL ), ImplMap( aSz, aSz ) ); + rDstRect = tools::Rectangle( ImplMap( aTL, aTL ), ImplMap( aSz, aSz ) ); } @@ -1903,9 +1903,9 @@ void SVGActionWriter::ImplWriteLine( const Point& rPt1, const Point& rPt2, } -void SVGActionWriter::ImplWriteRect( const Rectangle& rRect, long nRadX, long nRadY ) +void SVGActionWriter::ImplWriteRect( const tools::Rectangle& rRect, long nRadX, long nRadY ) { - Rectangle aRect; + tools::Rectangle aRect; ImplMap( rRect, aRect ); @@ -2023,7 +2023,7 @@ void SVGActionWriter::ImplWriteShape( const SVGShapeDescriptor& rShape ) ImplMap( rShape.maShapePolyPoly, aPolyPoly ); const bool bLineOnly = ( rShape.maShapeFillColor == Color( COL_TRANSPARENT ) ) && ( !rShape.mapShapeGradient.get() ); - Rectangle aBoundRect( aPolyPoly.GetBoundRect() ); + tools::Rectangle aBoundRect( aPolyPoly.GetBoundRect() ); maAttributeWriter.AddPaintAttr( rShape.maShapeLineColor, rShape.maShapeFillColor, &aBoundRect, rShape.mapShapeGradient.get() ); @@ -2167,7 +2167,7 @@ void SVGActionWriter::ImplWritePattern( const tools::PolyPolygon& rPolyPoly, mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrId, aPatternId ); - Rectangle aRect; + tools::Rectangle aRect; ImplMap( rPolyPoly.GetBoundRect(), aRect ); mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrX, OUString::number( aRect.Left() ) ); @@ -2238,7 +2238,7 @@ void SVGActionWriter::ImplWriteGradientLinear( const tools::PolyPolygon& rPolyPo mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrId, aGradientId ); { - Rectangle aTmpRect, aRect; + tools::Rectangle aTmpRect, aRect; Point aTmpCenter, aCenter; rGradient.GetBoundRect( rPolyPoly.GetBoundRect(), aTmpRect, aTmpCenter ); @@ -2412,7 +2412,7 @@ void SVGActionWriter::ImplWriteMask( GDIMetaFile& rMtf, { SvXMLElementExport aElemMask( mrExport, XML_NAMESPACE_NONE, "mask", true, true ); - const tools::PolyPolygon aPolyPolygon( tools::PolyPolygon( Rectangle( rDestPt, rDestSize ) ) ); + const tools::PolyPolygon aPolyPolygon( tools::PolyPolygon( tools::Rectangle( rDestPt, rDestSize ) ) ); Gradient aGradient( rGradient ); // swap gradient stops to adopt SVG mask @@ -2718,8 +2718,8 @@ void SVGActionWriter::ImplWriteBmp( const BitmapEx& rBmpEx, { BitmapEx aBmpEx( rBmpEx ); Point aPoint; - const Rectangle aBmpRect( aPoint, rBmpEx.GetSizePixel() ); - const Rectangle aSrcRect( rSrcPt, rSrcSz ); + const tools::Rectangle aBmpRect( aPoint, rBmpEx.GetSizePixel() ); + const tools::Rectangle aSrcRect( rSrcPt, rSrcSz ); if( aSrcRect != aBmpRect ) aBmpEx.Crop( aSrcRect ); @@ -2901,7 +2901,7 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf, if( nWriteFlags & SVGWRITER_WRITE_FILL ) { const MetaEllipseAction* pA = static_cast<const MetaEllipseAction*>(pAction); - const Rectangle& rRect = pA->GetRect(); + const tools::Rectangle& rRect = pA->GetRect(); maAttributeWriter.AddPaintAttr( mpVDev->GetLineColor(), mpVDev->GetFillColor() ); ImplWriteEllipse( rRect.Center(), rRect.GetWidth() >> 1, rRect.GetHeight() >> 1 ); diff --git a/filter/source/svg/svgwriter.hxx b/filter/source/svg/svgwriter.hxx index 659d635d8ca7..46fced788f72 100644 --- a/filter/source/svg/svgwriter.hxx +++ b/filter/source/svg/svgwriter.hxx @@ -164,9 +164,9 @@ public: ~SVGAttributeWriter(); void AddColorAttr( const char* pColorAttrName, const char* pColorOpacityAttrName, const Color& rColor ); - void AddGradientDef( const Rectangle& rObjRect,const Gradient& rGradient, OUString& rGradientId ); + void AddGradientDef( const tools::Rectangle& rObjRect,const Gradient& rGradient, OUString& rGradientId ); void AddPaintAttr( const Color& rLineColor, const Color& rFillColor, - const Rectangle* pObjBoundRect = nullptr, const Gradient* pFillGradient = nullptr ); + const tools::Rectangle* pObjBoundRect = nullptr, const Gradient* pFillGradient = nullptr ); void SetFontAttr( const vcl::Font& rFont ); void startFontSettings(); @@ -336,12 +336,12 @@ private: long ImplMap( sal_Int32 nVal ) const; Point& ImplMap( const Point& rPt, Point& rDstPt ) const; Size& ImplMap( const Size& rSz, Size& rDstSz ) const; - void ImplMap( const Rectangle& rRect, Rectangle& rDstRect ) const; + void ImplMap( const tools::Rectangle& rRect, tools::Rectangle& rDstRect ) const; tools::Polygon& ImplMap( const tools::Polygon& rPoly, tools::Polygon& rDstPoly ) const; tools::PolyPolygon& ImplMap( const tools::PolyPolygon& rPolyPoly, tools::PolyPolygon& rDstPolyPoly ) const; void ImplWriteLine( const Point& rPt1, const Point& rPt2, const Color* pLineColor = nullptr ); - void ImplWriteRect( const Rectangle& rRect, long nRadX = 0, long nRadY = 0 ); + void ImplWriteRect( const tools::Rectangle& rRect, long nRadX = 0, long nRadY = 0 ); void ImplWriteEllipse( const Point& rCenter, long nRadX, long nRadY ); void ImplWritePattern( const tools::PolyPolygon& rPolyPoly, const Hatch* pHatch, const Gradient* pGradient, sal_uInt32 nWriteFlags ); void ImplAddLineAttr( const LineInfo &rAttrs ); diff --git a/forms/source/richtext/richtextimplcontrol.cxx b/forms/source/richtext/richtextimplcontrol.cxx index 5a11fa9dd031..655ca5158fcd 100644 --- a/forms/source/richtext/richtextimplcontrol.cxx +++ b/forms/source/richtext/richtextimplcontrol.cxx @@ -78,7 +78,7 @@ namespace frm } // ensure that it's initially scrolled to the upper left - m_pView->SetVisArea( Rectangle( Point( ), m_pViewport->GetOutputSize() ) ); + m_pView->SetVisArea( tools::Rectangle( Point( ), m_pViewport->GetOutputSize() ) ); ensureScrollbars(); @@ -432,8 +432,8 @@ namespace frm m_pEngine->SetPaperSize( Size( aViewportSizeLogic.Width(), m_pEngine->GetTextHeight() ) ); // output area of the view - m_pView->SetOutputArea( Rectangle( Point( ), aViewportSizeLogic ) ); - m_pView->SetVisArea( Rectangle( Point( ), aViewportSizeLogic ) ); + m_pView->SetOutputArea( tools::Rectangle( Point( ), aViewportSizeLogic ) ); + m_pView->SetVisArea( tools::Rectangle( Point( ), aViewportSizeLogic ) ); if ( m_pVScroll ) { @@ -543,7 +543,7 @@ namespace frm namespace { - void lcl_inflate( Rectangle& _rRect, long _nInflateX, long _nInflateY ) + void lcl_inflate( tools::Rectangle& _rRect, long _nInflateX, long _nInflateY ) { _rRect.Left() -= _nInflateX; _rRect.Right() += _nInflateX; @@ -592,7 +592,7 @@ namespace frm aSize = OutputDevice::LogicToLogic( _rSize, aOriginalMapMode, aNormalizedMapMode ); } - Rectangle aPlayground( aPos, aSize ); + tools::Rectangle aPlayground( aPos, aSize ); Size aOnePixel( _pDev->PixelToLogic( Size( 1, 1 ) ) ); aPlayground.Right() -= aOnePixel.Width(); aPlayground.Bottom() -= aOnePixel.Height(); diff --git a/forms/source/richtext/richtextviewport.cxx b/forms/source/richtext/richtextviewport.cxx index 36aeef8101cf..32f12ebe681f 100644 --- a/forms/source/richtext/richtextviewport.cxx +++ b/forms/source/richtext/richtextviewport.cxx @@ -35,7 +35,7 @@ namespace frm SetPointer( _rView.GetPointer() ); } - void RichTextViewPort::Paint( vcl::RenderContext& rRenderContext, const Rectangle& _rRect ) + void RichTextViewPort::Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& _rRect ) { m_pView->Paint(_rRect, &rRenderContext); } diff --git a/forms/source/richtext/richtextviewport.hxx b/forms/source/richtext/richtextviewport.hxx index 47520922b6cf..8e4636fe4932 100644 --- a/forms/source/richtext/richtextviewport.hxx +++ b/forms/source/richtext/richtextviewport.hxx @@ -43,7 +43,7 @@ namespace frm bool GetHideInactiveSelection() const { return m_bHideInactiveSelection; } protected: - virtual void Paint( vcl::RenderContext& rRenderContext, const Rectangle& rRect ) override; + virtual void Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect ) override; virtual void GetFocus() override; virtual void LoseFocus() override; virtual void KeyInput( const KeyEvent& _rKEvt ) override; diff --git a/fpicker/source/office/RemoteFilesDialog.cxx b/fpicker/source/office/RemoteFilesDialog.cxx index 32034f6fe441..89a78cfd53e1 100644 --- a/fpicker/source/office/RemoteFilesDialog.cxx +++ b/fpicker/source/office/RemoteFilesDialog.cxx @@ -85,7 +85,7 @@ class FileViewContainer : public vcl::Window m_pSplitter->SetSizePixel( splitterNewSize ); sal_Int32 nMinX = m_pTreeView->GetPosPixel().X(); sal_Int32 nMaxX = m_pFileView->GetPosPixel().X() + m_pFileView->GetSizePixel().Width() - nMinX; - m_pSplitter->SetDragRectPixel( Rectangle( Point( nMinX, 0 ), Size( nMaxX, aSize.Width() ) ) ); + m_pSplitter->SetDragRectPixel( tools::Rectangle( Point( nMinX, 0 ), Size( nMaxX, aSize.Width() ) ) ); // Resize the tree list box to fit the height of the FileView Size placesNewSize( m_pTreeView->GetSizePixel() ); diff --git a/fpicker/source/office/iodlg.cxx b/fpicker/source/office/iodlg.cxx index b2b5a3347443..b73d626e927d 100644 --- a/fpicker/source/office/iodlg.cxx +++ b/fpicker/source/office/iodlg.cxx @@ -394,7 +394,7 @@ public: _pSplitter->SetSizePixel( splitterNewSize ); sal_Int32 nMinX = pImpl->_pPlaces->GetPosPixel( ).X( ); sal_Int32 nMaxX = _pFileView->GetPosPixel( ).X( ) + _pFileView->GetSizePixel( ).Width() - nMinX; - _pSplitter->SetDragRectPixel( Rectangle( Point( nMinX, 0 ), Size( nMaxX, aSize.Width() ) ) ); + _pSplitter->SetDragRectPixel( tools::Rectangle( Point( nMinX, 0 ), Size( nMaxX, aSize.Width() ) ) ); // Resize the places list box to fit the height of the FileView Size placesNewSize(pImpl->_pPlaces->GetSizePixel()); diff --git a/framework/source/layoutmanager/helpers.cxx b/framework/source/layoutmanager/helpers.cxx index 1c9ae72bb649..90c7e303ee3c 100644 --- a/framework/source/layoutmanager/helpers.cxx +++ b/framework/source/layoutmanager/helpers.cxx @@ -128,7 +128,7 @@ SystemWindow* getTopSystemWindow( const uno::Reference< awt::XWindow >& xWindow return nullptr; } -void setZeroRectangle( ::Rectangle& rRect ) +void setZeroRectangle( ::tools::Rectangle& rRect ) { rRect.setX(0); rRect.setY(0); @@ -224,7 +224,7 @@ void parseResourceURL( const OUString& aResourceURL, OUString& aElementType, OUS } } -css::awt::Rectangle putRectangleValueToAWT( const ::Rectangle& rRect ) +css::awt::Rectangle putRectangleValueToAWT( const ::tools::Rectangle& rRect ) { css::awt::Rectangle aRect; aRect.X = rRect.Left(); @@ -235,9 +235,9 @@ css::awt::Rectangle putRectangleValueToAWT( const ::Rectangle& rRect ) return aRect; } -::Rectangle putAWTToRectangle( const css::awt::Rectangle& rRect ) +::tools::Rectangle putAWTToRectangle( const css::awt::Rectangle& rRect ) { - ::Rectangle aRect; + ::tools::Rectangle aRect; aRect.Left() = rRect.X; aRect.Top() = rRect.Y; aRect.Right() = rRect.Width; diff --git a/framework/source/layoutmanager/helpers.hxx b/framework/source/layoutmanager/helpers.hxx index 2b0a259adbae..3f5362990f25 100644 --- a/framework/source/layoutmanager/helpers.hxx +++ b/framework/source/layoutmanager/helpers.hxx @@ -55,14 +55,14 @@ ToolBox* getToolboxPtr( vcl::Window* pWindow ); vcl::Window* getWindowFromXUIElement( const css::uno::Reference< css::ui::XUIElement >& xUIElement ); SystemWindow* getTopSystemWindow( const css::uno::Reference< css::awt::XWindow >& xWindow ); bool equalRectangles( const css::awt::Rectangle& rRect1, const css::awt::Rectangle& rRect2 ); -void setZeroRectangle( ::Rectangle& rRect ); +void setZeroRectangle( ::tools::Rectangle& rRect ); bool lcl_checkUIElement(const css::uno::Reference< css::ui::XUIElement >& xUIElement,css::awt::Rectangle& _rPosSize, css::uno::Reference< css::awt::XWindow >& _xWindow); css::uno::Reference< css::awt::XWindowPeer > createToolkitWindow( const css::uno::Reference< css::uno::XComponentContext >& rxContext, const css::uno::Reference< css::awt::XWindowPeer >& rParent, const char* pService ); WindowAlign ImplConvertAlignment( sal_Int16 aAlignment ); OUString getElementTypeFromResourceURL( const OUString& aResourceURL ); void parseResourceURL( const OUString& aResourceURL, OUString& aElementType, OUString& aElementName ); -::Rectangle putAWTToRectangle( const css::awt::Rectangle& rRect ); -css::awt::Rectangle putRectangleValueToAWT( const ::Rectangle& rRect ); +::tools::Rectangle putAWTToRectangle( const css::awt::Rectangle& rRect ); +css::awt::Rectangle putRectangleValueToAWT( const ::tools::Rectangle& rRect ); css::uno::Reference< css::frame::XModel > impl_getModelFromFrame( const css::uno::Reference< css::frame::XFrame >& rFrame ); bool implts_isPreviewModel( const css::uno::Reference< css::frame::XModel >& xModel ); bool implts_isFrameOrWindowTop( const css::uno::Reference< css::frame::XFrame >& xFrame ); diff --git a/framework/source/layoutmanager/layoutmanager.cxx b/framework/source/layoutmanager/layoutmanager.cxx index 1243f2d88205..c426d921121a 100644 --- a/framework/source/layoutmanager/layoutmanager.cxx +++ b/framework/source/layoutmanager/layoutmanager.cxx @@ -1126,7 +1126,7 @@ bool LayoutManager::implts_hideStatusBar( bool bStoreState ) void LayoutManager::implts_setOffset( const sal_Int32 nBottomOffset ) { - ::Rectangle aOffsetRect; + ::tools::Rectangle aOffsetRect; setZeroRectangle( aOffsetRect ); aOffsetRect.setHeight( nBottomOffset ); @@ -2403,7 +2403,7 @@ bool LayoutManager::implts_resizeContainerWindow( const awt::Size& rContainerSiz // calculate the maximum size we have for the container window sal_Int32 nDisplay = xContainerTopWindow->getDisplay(); - Rectangle aWorkArea = Application::GetScreenPosSizePixel( nDisplay ); + tools::Rectangle aWorkArea = Application::GetScreenPosSizePixel( nDisplay ); if (( aWorkArea.GetWidth() > 0 ) && ( aWorkArea.GetHeight() > 0 )) { diff --git a/framework/source/layoutmanager/toolbarlayoutmanager.cxx b/framework/source/layoutmanager/toolbarlayoutmanager.cxx index befb53f0f27b..508ecefc0fed 100644 --- a/framework/source/layoutmanager/toolbarlayoutmanager.cxx +++ b/framework/source/layoutmanager/toolbarlayoutmanager.cxx @@ -117,7 +117,7 @@ void SAL_CALL ToolbarLayoutManager::disposing( const lang::EventObject& aEvent ) awt::Rectangle ToolbarLayoutManager::getDockingArea() { SolarMutexResettableGuard aWriteLock; - Rectangle aNewDockingArea( m_aDockingArea ); + tools::Rectangle aNewDockingArea( m_aDockingArea ); aWriteLock.clear(); if ( isLayoutDirty() ) @@ -140,7 +140,7 @@ void ToolbarLayoutManager::setDockingArea( const awt::Rectangle& rDockingArea ) void ToolbarLayoutManager::implts_setDockingAreaWindowSizes( const awt::Rectangle& rBorderSpace ) { SolarMutexClearableGuard aReadLock; - Rectangle aDockOffsets = m_aDockingAreaOffsets; + tools::Rectangle aDockOffsets = m_aDockingAreaOffsets; uno::Reference< awt::XWindow2 > xContainerWindow( m_xContainerWindow ); uno::Reference< awt::XWindow > xTopDockAreaWindow( m_xDockAreaWindows[ui::DockingArea_DOCKINGAREA_TOP] ); uno::Reference< awt::XWindow > xBottomDockAreaWindow( m_xDockAreaWindows[ui::DockingArea_DOCKINGAREA_BOTTOM] ); @@ -248,13 +248,13 @@ bool ToolbarLayoutManager::implts_isParentWindowVisible() const return bVisible; } -Rectangle ToolbarLayoutManager::implts_calcDockingArea() +tools::Rectangle ToolbarLayoutManager::implts_calcDockingArea() { SolarMutexClearableGuard aReadLock; UIElementVector aWindowVector( m_aUIElements ); aReadLock.clear(); - Rectangle aBorderSpace; + tools::Rectangle aBorderSpace; sal_Int32 nCurrRowColumn( 0 ); sal_Int32 nCurrPos( 0 ); sal_Int32 nCurrDockingArea( ui::DockingArea_DOCKINGAREA_TOP ); @@ -1057,7 +1057,7 @@ void ToolbarLayoutManager::setParentWindow( } } -void ToolbarLayoutManager::setDockingAreaOffsets( const ::Rectangle& rOffsets ) +void ToolbarLayoutManager::setDockingAreaOffsets( const ::tools::Rectangle& rOffsets ) { SolarMutexGuard g; m_aDockingAreaOffsets = rOffsets; @@ -2140,13 +2140,13 @@ void ToolbarLayoutManager::implts_getDockingAreaElementInfoOnSingleRowCol( ui::D } } -::Rectangle ToolbarLayoutManager::implts_getWindowRectFromRowColumn( +::tools::Rectangle ToolbarLayoutManager::implts_getWindowRectFromRowColumn( ui::DockingArea DockingArea, const SingleRowColumnWindowData& rRowColumnWindowData, const ::Point& rMousePos, const OUString& rExcludeElementName ) { - ::Rectangle aWinRect; + ::tools::Rectangle aWinRect; if (( DockingArea < ui::DockingArea_DOCKINGAREA_TOP ) || ( DockingArea > ui::DockingArea_DOCKINGAREA_RIGHT )) DockingArea = ui::DockingArea_DOCKINGAREA_TOP; @@ -2170,7 +2170,7 @@ void ToolbarLayoutManager::implts_getDockingAreaElementInfoOnSingleRowCol( ui::D for ( sal_uInt32 i = 0; i < nCount; i++ ) { awt::Rectangle aWindowRect = rRowColumnWindowData.aRowColumnWindows[i]->getPosSize(); - ::Rectangle aRect( aWindowRect.X, aWindowRect.Y, aWindowRect.X+aWindowRect.Width, aWindowRect.Y+aWindowRect.Height ); + ::tools::Rectangle aRect( aWindowRect.X, aWindowRect.Y, aWindowRect.X+aWindowRect.Width, aWindowRect.Y+aWindowRect.Height ); aRect.SetPos( pContainerWindow->ScreenToOutputPixel( pDockingAreaWindow->OutputToScreenPixel( aRect.TopLeft() ))); if ( aRect.IsInside( rMousePos )) { @@ -2188,12 +2188,12 @@ void ToolbarLayoutManager::implts_getDockingAreaElementInfoOnSingleRowCol( ui::D return aWinRect; } -::Rectangle ToolbarLayoutManager::implts_determineFrontDockingRect( +::tools::Rectangle ToolbarLayoutManager::implts_determineFrontDockingRect( ui::DockingArea eDockingArea, sal_Int32 nRowCol, - const ::Rectangle& rDockedElementRect, + const ::tools::Rectangle& rDockedElementRect, const OUString& rMovedElementName, - const ::Rectangle& rMovedElementRect ) + const ::tools::Rectangle& rMovedElementRect ) { SingleRowColumnWindowData aRowColumnWindowData; @@ -2204,7 +2204,7 @@ void ToolbarLayoutManager::implts_getDockingAreaElementInfoOnSingleRowCol( ui::D else { sal_Int32 nSpace( 0 ); - ::Rectangle aFrontDockingRect( rMovedElementRect ); + ::tools::Rectangle aFrontDockingRect( rMovedElementRect ); const sal_uInt32 nCount = aRowColumnWindowData.aRowColumnWindows.size(); for ( sal_uInt32 i = 0; i < nCount; i++ ) { @@ -2579,9 +2579,9 @@ void ToolbarLayoutManager::implts_setLayoutInProgress( bool bInProgress ) m_bLayoutInProgress = bInProgress; } -::Rectangle ToolbarLayoutManager::implts_calcHotZoneRect( const ::Rectangle& rRect, sal_Int32 nHotZoneOffset ) +::tools::Rectangle ToolbarLayoutManager::implts_calcHotZoneRect( const ::tools::Rectangle& rRect, sal_Int32 nHotZoneOffset ) { - ::Rectangle aRect( rRect ); + ::tools::Rectangle aRect( rRect ); aRect.Left() -= nHotZoneOffset; aRect.Top() -= nHotZoneOffset; @@ -2594,19 +2594,19 @@ void ToolbarLayoutManager::implts_setLayoutInProgress( bool bInProgress ) void ToolbarLayoutManager::implts_calcDockingPosSize( UIElement& rUIElement, DockingOperation& rDockingOperation, - ::Rectangle& rTrackingRect, + ::tools::Rectangle& rTrackingRect, const Point& rMousePos ) { SolarMutexResettableGuard aReadLock; uno::Reference< awt::XWindow2 > xContainerWindow( m_xContainerWindow ); ::Size aContainerWinSize; vcl::Window* pContainerWindow( nullptr ); - ::Rectangle aDockingAreaOffsets( m_aDockingAreaOffsets ); + ::tools::Rectangle aDockingAreaOffsets( m_aDockingAreaOffsets ); aReadLock.clear(); if ( !rUIElement.m_xUIElement.is() ) { - rTrackingRect = ::Rectangle(); + rTrackingRect = ::tools::Rectangle(); return; } @@ -2621,7 +2621,7 @@ void ToolbarLayoutManager::implts_calcDockingPosSize( ToolBox* pToolBox( nullptr ); uno::Reference< awt::XWindow > xWindow( rUIElement.m_xUIElement->getRealInterface(), uno::UNO_QUERY ); uno::Reference< awt::XWindow > xDockingAreaWindow; - ::Rectangle aTrackingRect( rTrackingRect ); + ::tools::Rectangle aTrackingRect( rTrackingRect ); ui::DockingArea eDockedArea( (ui::DockingArea)rUIElement.m_aDockedData.m_nDockedArea ); sal_Int32 nTopDockingAreaSize( implts_getTopBottomDockingAreaSizes().Width() ); sal_Int32 nBottomDockingAreaSize( implts_getTopBottomDockingAreaSizes().Height() ); @@ -2632,7 +2632,7 @@ void ToolbarLayoutManager::implts_calcDockingPosSize( nBottomDockingAreaSize - aDockingAreaOffsets.Top() - aDockingAreaOffsets.Bottom(); - ::Rectangle aDockingAreaRect; + ::tools::Rectangle aDockingAreaRect; aReadLock.reset(); xDockingAreaWindow = m_xDockAreaWindows[eDockedArea]; @@ -2645,7 +2645,7 @@ void ToolbarLayoutManager::implts_calcDockingPosSize( if ( pDockWindow && pDockWindow->GetType() == WindowType::TOOLBOX ) pToolBox = static_cast<ToolBox *>(pDockWindow.get()); - aDockingAreaRect = ::Rectangle( pDockingAreaWindow->GetPosPixel(), pDockingAreaWindow->GetSizePixel() ); + aDockingAreaRect = ::tools::Rectangle( pDockingAreaWindow->GetPosPixel(), pDockingAreaWindow->GetSizePixel() ); if ( pToolBox ) { // docked toolbars always have one line @@ -2679,13 +2679,13 @@ void ToolbarLayoutManager::implts_calcDockingPosSize( // docking inside our docking area sal_Int32 nIndex( -1 ); sal_Int32 nRowCol( -1 ); - ::Rectangle aWindowRect; - ::Rectangle aRowColumnRect; + ::tools::Rectangle aWindowRect; + ::tools::Rectangle aRowColumnRect; const sal_uInt32 nWindowDataCount = aRowColumnsWindowData.size(); for ( sal_uInt32 i = 0; i < nWindowDataCount; i++ ) { - ::Rectangle aRect( aRowColumnsWindowData[i].aRowColumnRect.X, + ::tools::Rectangle aRect( aRowColumnsWindowData[i].aRowColumnRect.X, aRowColumnsWindowData[i].aRowColumnRect.Y, aRowColumnsWindowData[i].aRowColumnRect.X + aRowColumnsWindowData[i].aRowColumnRect.Width, aRowColumnsWindowData[i].aRowColumnRect.Y + aRowColumnsWindowData[i].aRowColumnRect.Height ); @@ -2718,7 +2718,7 @@ void ToolbarLayoutManager::implts_calcDockingPosSize( // Tracking rect is on a row/column and mouse is over a docked toolbar. // Determine if the tracking rect must be located before/after the docked toolbar. - ::Rectangle aUIElementRect( aWindowRect ); + ::tools::Rectangle aUIElementRect( aWindowRect ); sal_Int32 nMiddle( bHorizontalDockArea ? ( aWindowRect.Left() + aWindowRect.getWidth() / 2 ) : ( aWindowRect.Top() + aWindowRect.getHeight() / 2 )); bool bInsertBefore( bHorizontalDockArea ? ( rMousePos.X() < nMiddle ) : ( rMousePos.Y() < nMiddle )); @@ -2973,7 +2973,7 @@ void ToolbarLayoutManager::implts_calcDockingPosSize( framework::ToolbarLayoutManager::DockingOperation ToolbarLayoutManager::implts_determineDockingOperation( ui::DockingArea DockingArea, - const ::Rectangle& rRowColRect, + const ::tools::Rectangle& rRowColRect, const Point& rMousePos ) { const sal_Int32 nHorzVerticalRegionSize = 6; @@ -3010,16 +3010,16 @@ framework::ToolbarLayoutManager::DockingOperation ToolbarLayoutManager::implts_d return DOCKOP_ON_COLROW; } -::Rectangle ToolbarLayoutManager::implts_calcTrackingAndElementRect( +::tools::Rectangle ToolbarLayoutManager::implts_calcTrackingAndElementRect( ui::DockingArea eDockingArea, sal_Int32 nRowCol, UIElement& rUIElement, - const ::Rectangle& rTrackingRect, - const ::Rectangle& rRowColumnRect, + const ::tools::Rectangle& rTrackingRect, + const ::tools::Rectangle& rRowColumnRect, const ::Size& rContainerWinSize ) { SolarMutexResettableGuard aReadGuard; - ::Rectangle aDockingAreaOffsets( m_aDockingAreaOffsets ); + ::tools::Rectangle aDockingAreaOffsets( m_aDockingAreaOffsets ); aReadGuard.clear(); bool bHorizontalDockArea( isHorizontalDockingArea( eDockingArea )); @@ -3033,7 +3033,7 @@ framework::ToolbarLayoutManager::DockingOperation ToolbarLayoutManager::implts_d aDockingAreaOffsets.Top() - aDockingAreaOffsets.Bottom(); - ::Rectangle aTrackingRect( rTrackingRect ); + ::tools::Rectangle aTrackingRect( rTrackingRect ); if ( bHorizontalDockArea ) { sal_Int32 nPosX( std::max( sal_Int32( rTrackingRect.Left()), sal_Int32( 0 ))); @@ -3091,7 +3091,7 @@ framework::ToolbarLayoutManager::DockingOperation ToolbarLayoutManager::implts_d return aTrackingRect; } -void ToolbarLayoutManager::implts_setTrackingRect( ui::DockingArea eDockingArea, const ::Point& rMousePos, ::Rectangle& rTrackingRect ) +void ToolbarLayoutManager::implts_setTrackingRect( ui::DockingArea eDockingArea, const ::Point& rMousePos, ::tools::Rectangle& rTrackingRect ) { ::Point aPoint( rTrackingRect.TopLeft()); if ( isHorizontalDockingArea( eDockingArea )) @@ -3337,25 +3337,25 @@ awt::DockingData SAL_CALL ToolbarLayoutManager::docking( const awt::DockingEvent sal_Int16 eDockingArea( -1 ); // none sal_Int32 nMagneticZone( aUIDockingElement.m_bFloating ? MAGNETIC_DISTANCE_DOCK : MAGNETIC_DISTANCE_UNDOCK ); awt::Rectangle aNewTrackingRect; - ::Rectangle aTrackingRect( e.TrackingRectangle.X, e.TrackingRectangle.Y, + ::tools::Rectangle aTrackingRect( e.TrackingRectangle.X, e.TrackingRectangle.Y, ( e.TrackingRectangle.X + e.TrackingRectangle.Width ), ( e.TrackingRectangle.Y + e.TrackingRectangle.Height )); awt::Rectangle aTmpRect = xTopDockingWindow->getPosSize(); - ::Rectangle aTopDockRect( aTmpRect.X, aTmpRect.Y, aTmpRect.Width, aTmpRect.Height ); - ::Rectangle aHotZoneTopDockRect( implts_calcHotZoneRect( aTopDockRect, nMagneticZone )); + ::tools::Rectangle aTopDockRect( aTmpRect.X, aTmpRect.Y, aTmpRect.Width, aTmpRect.Height ); + ::tools::Rectangle aHotZoneTopDockRect( implts_calcHotZoneRect( aTopDockRect, nMagneticZone )); aTmpRect = xBottomDockingWindow->getPosSize(); - ::Rectangle aBottomDockRect( aTmpRect.X, aTmpRect.Y, ( aTmpRect.X + aTmpRect.Width), ( aTmpRect.Y + aTmpRect.Height )); - ::Rectangle aHotZoneBottomDockRect( implts_calcHotZoneRect( aBottomDockRect, nMagneticZone )); + ::tools::Rectangle aBottomDockRect( aTmpRect.X, aTmpRect.Y, ( aTmpRect.X + aTmpRect.Width), ( aTmpRect.Y + aTmpRect.Height )); + ::tools::Rectangle aHotZoneBottomDockRect( implts_calcHotZoneRect( aBottomDockRect, nMagneticZone )); aTmpRect = xLeftDockingWindow->getPosSize(); - ::Rectangle aLeftDockRect( aTmpRect.X, aTmpRect.Y, ( aTmpRect.X + aTmpRect.Width ), ( aTmpRect.Y + aTmpRect.Height )); - ::Rectangle aHotZoneLeftDockRect( implts_calcHotZoneRect( aLeftDockRect, nMagneticZone )); + ::tools::Rectangle aLeftDockRect( aTmpRect.X, aTmpRect.Y, ( aTmpRect.X + aTmpRect.Width ), ( aTmpRect.Y + aTmpRect.Height )); + ::tools::Rectangle aHotZoneLeftDockRect( implts_calcHotZoneRect( aLeftDockRect, nMagneticZone )); aTmpRect = xRightDockingWindow->getPosSize(); - ::Rectangle aRightDockRect( aTmpRect.X, aTmpRect.Y, ( aTmpRect.X + aTmpRect.Width ), ( aTmpRect.Y + aTmpRect.Height )); - ::Rectangle aHotZoneRightDockRect( implts_calcHotZoneRect( aRightDockRect, nMagneticZone )); + ::tools::Rectangle aRightDockRect( aTmpRect.X, aTmpRect.Y, ( aTmpRect.X + aTmpRect.Width ), ( aTmpRect.Y + aTmpRect.Height )); + ::tools::Rectangle aHotZoneRightDockRect( implts_calcHotZoneRect( aRightDockRect, nMagneticZone )); VclPtr<vcl::Window> pContainerWindow( VCLUnoHelper::GetWindow( xContainerWindow ) ); ::Point aMousePos( pContainerWindow->ScreenToOutputPixel( ::Point( e.MousePos.X, e.MousePos.Y ))); @@ -3411,7 +3411,7 @@ awt::DockingData SAL_CALL ToolbarLayoutManager::docking( const awt::DockingEvent ::Point aOutputPos = pContainerWindow->ScreenToOutputPixel( aTrackingRect.TopLeft() ); aTrackingRect.SetPos( aOutputPos ); - ::Rectangle aNewDockingRect( aTrackingRect ); + ::tools::Rectangle aNewDockingRect( aTrackingRect ); implts_calcDockingPosSize( aUIDockingElement, eDockingOperation, aNewDockingRect, aMousePos ); diff --git a/framework/source/layoutmanager/toolbarlayoutmanager.hxx b/framework/source/layoutmanager/toolbarlayoutmanager.hxx index ff2eb021eb0a..c82baa37b291 100644 --- a/framework/source/layoutmanager/toolbarlayoutmanager.hxx +++ b/framework/source/layoutmanager/toolbarlayoutmanager.hxx @@ -83,7 +83,7 @@ class ToolbarLayoutManager : public ::cppu::WeakImplHelper< css::awt::XDockableW const css::uno::Reference< css::container::XNameAccess >& xPersistentWindowState ); void setParentWindow( const css::uno::Reference< css::awt::XWindowPeer >& xParentWindow ); - void setDockingAreaOffsets(const ::Rectangle& rOffsets); + void setDockingAreaOffsets(const ::tools::Rectangle& rOffsets); void resetDockingArea(); @@ -194,7 +194,7 @@ class ToolbarLayoutManager : public ::cppu::WeakImplHelper< css::awt::XDockableW // internal helper methods bool implts_isParentWindowVisible() const; - ::Rectangle implts_calcDockingArea(); + ::tools::Rectangle implts_calcDockingArea(); void implts_sortUIElements(); void implts_reparentToolbars(); OUString implts_generateGenericAddonToolbarTitle( sal_Int32 nNumber ) const; @@ -227,26 +227,26 @@ class ToolbarLayoutManager : public ::cppu::WeakImplHelper< css::awt::XDockableW // internal docking methods - ::Rectangle implts_calcHotZoneRect( const ::Rectangle& rRect, sal_Int32 nHotZoneOffset ); - void implts_calcDockingPosSize( UIElement& aUIElement, DockingOperation& eDockOperation, ::Rectangle& rTrackingRect, const Point& rMousePos ); - DockingOperation implts_determineDockingOperation( css::ui::DockingArea DockingArea, const ::Rectangle& rRowColRect, const Point& rMousePos ); - ::Rectangle implts_getWindowRectFromRowColumn( css::ui::DockingArea DockingArea, const SingleRowColumnWindowData& rRowColumnWindowData, const ::Point& rMousePos, const OUString& rExcludeElementName ); - ::Rectangle implts_determineFrontDockingRect( css::ui::DockingArea eDockingArea, + ::tools::Rectangle implts_calcHotZoneRect( const ::tools::Rectangle& rRect, sal_Int32 nHotZoneOffset ); + void implts_calcDockingPosSize( UIElement& aUIElement, DockingOperation& eDockOperation, ::tools::Rectangle& rTrackingRect, const Point& rMousePos ); + DockingOperation implts_determineDockingOperation( css::ui::DockingArea DockingArea, const ::tools::Rectangle& rRowColRect, const Point& rMousePos ); + ::tools::Rectangle implts_getWindowRectFromRowColumn( css::ui::DockingArea DockingArea, const SingleRowColumnWindowData& rRowColumnWindowData, const ::Point& rMousePos, const OUString& rExcludeElementName ); + ::tools::Rectangle implts_determineFrontDockingRect( css::ui::DockingArea eDockingArea, sal_Int32 nRowCol, - const ::Rectangle& rDockedElementRect, + const ::tools::Rectangle& rDockedElementRect, const OUString& rMovedElementName, - const ::Rectangle& rMovedElementRect ); - ::Rectangle implts_calcTrackingAndElementRect( css::ui::DockingArea eDockingArea, + const ::tools::Rectangle& rMovedElementRect ); + ::tools::Rectangle implts_calcTrackingAndElementRect( css::ui::DockingArea eDockingArea, sal_Int32 nRowCol, UIElement& rUIElement, - const ::Rectangle& rTrackingRect, - const ::Rectangle& rRowColumnRect, + const ::tools::Rectangle& rTrackingRect, + const ::tools::Rectangle& rRowColumnRect, const ::Size& rContainerWinSize ); void implts_getDockingAreaElementInfos( css::ui::DockingArea DockingArea, std::vector< SingleRowColumnWindowData >& rRowColumnsWindowData ); void implts_getDockingAreaElementInfoOnSingleRowCol( css::ui::DockingArea, sal_Int32 nRowCol, SingleRowColumnWindowData& rRowColumnWindowData ); void implts_findNextDockingPos( css::ui::DockingArea DockingArea, const ::Size& aUIElementSize, css::awt::Point& rVirtualPos, ::Point& rPixelPos ); - void implts_setTrackingRect( css::ui::DockingArea eDockingArea, const ::Point& rMousePos, ::Rectangle& rTrackingRect ); + void implts_setTrackingRect( css::ui::DockingArea eDockingArea, const ::Point& rMousePos, ::tools::Rectangle& rTrackingRect ); // creation methods @@ -278,8 +278,8 @@ class ToolbarLayoutManager : public ::cppu::WeakImplHelper< css::awt::XDockableW UIElementVector m_aUIElements; UIElement m_aDockUIElement; Point m_aStartDockMousePos; - Rectangle m_aDockingArea; - Rectangle m_aDockingAreaOffsets; + tools::Rectangle m_aDockingArea; + tools::Rectangle m_aDockingAreaOffsets; DockingOperation m_eDockOperation; PreviewFrameDetection m_ePreviewDetection; diff --git a/framework/source/uiconfiguration/ImageList.cxx b/framework/source/uiconfiguration/ImageList.cxx index 8c0fc26bdac0..800330907ebb 100644 --- a/framework/source/uiconfiguration/ImageList.cxx +++ b/framework/source/uiconfiguration/ImageList.cxx @@ -86,10 +86,10 @@ BitmapEx ImageList::GetAsHorizontalStrip() const else aResult = BitmapEx( aPixels ); - Rectangle aSrcRect( Point( 0, 0 ), mpImplData->maImageSize ); + tools::Rectangle aSrcRect( Point( 0, 0 ), mpImplData->maImageSize ); for (sal_uInt16 nIdx = 0; nIdx < nCount; nIdx++) { - Rectangle aDestRect( Point( nIdx * mpImplData->maImageSize.Width(), 0 ), + tools::Rectangle aDestRect( Point( nIdx * mpImplData->maImageSize.Width(), 0 ), mpImplData->maImageSize ); ImageAryData *pData = mpImplData->maImages[ nIdx ]; aResult.CopyPixel( aDestRect, aSrcRect, &pData->maBitmapEx); diff --git a/framework/source/uielement/statusbaritem.cxx b/framework/source/uielement/statusbaritem.cxx index ddc25d37d0ff..2c47706d0a6e 100644 --- a/framework/source/uielement/statusbaritem.cxx +++ b/framework/source/uielement/statusbaritem.cxx @@ -131,7 +131,7 @@ css::awt::Rectangle SAL_CALL StatusbarItem::getItemRect() css::awt::Rectangle aAWTRect; if ( m_pStatusBar ) { - Rectangle aRect = m_pStatusBar->GetItemRect( m_nId ); + tools::Rectangle aRect = m_pStatusBar->GetItemRect( m_nId ); return css::awt::Rectangle( aRect.Left(), aRect.Top(), aRect.GetWidth(), diff --git a/include/avmedia/mediawindow.hxx b/include/avmedia/mediawindow.hxx index 414b06f3f508..c24fcdcfb589 100644 --- a/include/avmedia/mediawindow.hxx +++ b/include/avmedia/mediawindow.hxx @@ -65,7 +65,7 @@ namespace avmedia vcl::Window* getWindow() const; - void setPosSize( const Rectangle& rNewRect ); + void setPosSize( const tools::Rectangle& rNewRect ); void setPointer( const Pointer& rPointer ); diff --git a/include/dbaccess/dataview.hxx b/include/dbaccess/dataview.hxx index df50c19a15f2..6394539dcff7 100644 --- a/include/dbaccess/dataview.hxx +++ b/include/dbaccess/dataview.hxx @@ -41,7 +41,7 @@ namespace svt { class DataChangedEvent; class FixedLine; class NotifyEvent; -class Rectangle; +namespace tools { class Rectangle; } namespace dbaui { @@ -82,13 +82,13 @@ namespace dbaui void attachFrame(const css::uno::Reference< css::frame::XFrame >& _xFrame); protected: // window overridables - virtual void Paint( vcl::RenderContext& rRenderContext, const Rectangle& _rRect ) override; + virtual void Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& _rRect ) override; /// re-arrange all controls, including the toolbox, it's separator, and the "real view" - virtual void resizeAll( const Rectangle& _rPlayground ); + virtual void resizeAll( const tools::Rectangle& _rPlayground ); // re-arrange the controls belonging to the document itself - virtual void resizeDocumentView( Rectangle& _rPlayground ); + virtual void resizeDocumentView( tools::Rectangle& _rPlayground ); }; } #endif // INCLUDED_DBACCESS_DATAVIEW_HXX diff --git a/include/drawinglayer/primitive2d/textlayoutdevice.hxx b/include/drawinglayer/primitive2d/textlayoutdevice.hxx index 5761d3a03a9d..c8670603e26a 100644 --- a/include/drawinglayer/primitive2d/textlayoutdevice.hxx +++ b/include/drawinglayer/primitive2d/textlayoutdevice.hxx @@ -36,7 +36,7 @@ namespace rtl { }; class OutputDevice; class GDIMetaFile; -class Rectangle; +namespace tools { class Rectangle; } enum class DrawTextFlags; namespace drawinglayer { namespace attribute { class FontAttribute; @@ -102,7 +102,7 @@ namespace drawinglayer double getFontDescent() const; void addTextRectActions( - const Rectangle& rRectangle, + const tools::Rectangle& rRectangle, const rtl::OUString& rText, DrawTextFlags nStyle, GDIMetaFile& rGDIMetaFile) const; diff --git a/include/editeng/AccessibleEditableTextPara.hxx b/include/editeng/AccessibleEditableTextPara.hxx index 7a57582386ae..7d05f74ee876 100644 --- a/include/editeng/AccessibleEditableTextPara.hxx +++ b/include/editeng/AccessibleEditableTextPara.hxx @@ -234,7 +234,7 @@ namespace accessibility /// Unsets the given state on the internal state set and fires STATE_CHANGE event. Don't hold locks when calling this! void UnSetState( const sal_Int16 nStateId ); - static Rectangle LogicToPixel( const Rectangle& rRect, const MapMode& rMapMode, SvxViewForwarder& rForwarder ); + static tools::Rectangle LogicToPixel( const tools::Rectangle& rRect, const MapMode& rMapMode, SvxViewForwarder& rForwarder ); SvxEditSourceAdapter& GetEditSource() const; diff --git a/include/editeng/AccessibleStaticTextBase.hxx b/include/editeng/AccessibleStaticTextBase.hxx index fd34ba76639f..fef4cefa65f5 100644 --- a/include/editeng/AccessibleStaticTextBase.hxx +++ b/include/editeng/AccessibleStaticTextBase.hxx @@ -216,7 +216,7 @@ namespace accessibility virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleAtPoint( const css::awt::Point& aPoint ); protected: - Rectangle GetParagraphBoundingBox() const; + tools::Rectangle GetParagraphBoundingBox() const; private: diff --git a/include/editeng/AccessibleStringWrap.hxx b/include/editeng/AccessibleStringWrap.hxx index 5a2dd3440528..73e41d7ab432 100644 --- a/include/editeng/AccessibleStringWrap.hxx +++ b/include/editeng/AccessibleStringWrap.hxx @@ -26,7 +26,7 @@ class OutputDevice; class SvxFont; -class Rectangle; +namespace tools { class Rectangle; } class Point; @@ -39,7 +39,7 @@ public: EDITENG_DLLPUBLIC AccessibleStringWrap( OutputDevice& rDev, SvxFont& rFont, const OUString& rText ); - EDITENG_DLLPUBLIC void GetCharacterBounds( sal_Int32 nIndex, Rectangle& rRect ); + EDITENG_DLLPUBLIC void GetCharacterBounds( sal_Int32 nIndex, tools::Rectangle& rRect ); EDITENG_DLLPUBLIC sal_Int32 GetIndexAtPoint( const Point& rPoint ); private: diff --git a/include/editeng/editeng.hxx b/include/editeng/editeng.hxx index 69d2d61b5951..fcab47ad4269 100644 --- a/include/editeng/editeng.hxx +++ b/include/editeng/editeng.hxx @@ -83,7 +83,7 @@ class KeyEvent; namespace tools { class PolyPolygon; } class Size; class Point; -class Rectangle; +namespace tools { class Rectangle; } class SvStream; class OutputDevice; namespace vcl { class Window; } @@ -293,7 +293,7 @@ public: ParagraphInfos GetParagraphInfos( sal_Int32 nPara ); sal_Int32 FindParagraph( long nDocPosY ); EPosition FindDocPosition( const Point& rDocPos ) const; - Rectangle GetCharacterBounds( const EPosition& rPos ) const; + tools::Rectangle GetCharacterBounds( const EPosition& rPos ) const; OUString GetWord(sal_Int32 nPara, sal_Int32 nIndex); @@ -365,9 +365,9 @@ public: bool IsTextPos( const Point& rPaperPos, sal_uInt16 nBorder ); // StartDocPos corresponds to VisArea.TopLeft(). - void Draw( OutputDevice* pOutDev, const Rectangle& rOutRect ); - void Draw( OutputDevice* pOutDev, const Rectangle& rOutRect, const Point& rStartDocPos ); - void Draw( OutputDevice* pOutDev, const Rectangle& rOutRect, const Point& rStartDocPos, bool bClip ); + void Draw( OutputDevice* pOutDev, const tools::Rectangle& rOutRect ); + void Draw( OutputDevice* pOutDev, const tools::Rectangle& rOutRect, const Point& rStartDocPos ); + void Draw( OutputDevice* pOutDev, const tools::Rectangle& rOutRect, const Point& rStartDocPos, bool bClip ); void Draw( OutputDevice* pOutDev, const Point& rStartPos, short nOrientation = 0 ); // sal_uInt32: Error code of the stream. @@ -510,7 +510,7 @@ public: // override this if access to bullet information needs to be provided virtual const SvxNumberFormat * GetNumberFormat( sal_Int32 nPara ) const; - virtual Rectangle GetBulletArea( sal_Int32 nPara ); + virtual tools::Rectangle GetBulletArea( sal_Int32 nPara ); static SfxItemPool* CreatePool( bool bLoadRefCounts = true ); static SfxItemPool& GetGlobalItemPool(); diff --git a/include/editeng/editview.hxx b/include/editeng/editview.hxx index 15e53a141eb6..b246e8db6ac6 100644 --- a/include/editeng/editview.hxx +++ b/include/editeng/editview.hxx @@ -48,7 +48,7 @@ class KeyEvent; class MouseEvent; class DropEvent; class CommandEvent; -class Rectangle; +namespace tools { class Rectangle; } class Pair; class Point; class Range; @@ -114,9 +114,9 @@ public: bool AddOtherViewWindow( vcl::Window* pWin ); bool RemoveOtherViewWindow( vcl::Window* pWin ); - void Paint( const Rectangle& rRect, OutputDevice* pTargetDevice = nullptr ); - Rectangle GetInvalidateRect() const; - void InvalidateOtherViewWindows( const Rectangle& rInvRect ); + void Paint( const tools::Rectangle& rRect, OutputDevice* pTargetDevice = nullptr ); + tools::Rectangle GetInvalidateRect() const; + void InvalidateOtherViewWindows( const tools::Rectangle& rInvRect ); void Invalidate(); Pair Scroll( long nHorzScroll, long nVertScroll, ScrollRangeCheck nRangeCheck = ScrollRangeCheck::NoNegative ); @@ -133,7 +133,7 @@ public: void SetSelection( const ESelection& rNewSel ); void SelectCurrentWord( sal_Int16 nWordType = css::i18n::WordType::ANYWORD_IGNOREWHITESPACES ); /// Returns the rectangles of the current selection in TWIPs. - void GetSelectionRectangles(std::vector<Rectangle>& rLogicRects) const; + void GetSelectionRectangles(std::vector<tools::Rectangle>& rLogicRects) const; bool IsInsertMode() const; void SetInsertMode( bool bInsert ); @@ -145,13 +145,13 @@ public: // VisArea position of the Output window. // A size change also affects the VisArea - void SetOutputArea( const Rectangle& rRect ); - const Rectangle& GetOutputArea() const; + void SetOutputArea( const tools::Rectangle& rRect ); + const tools::Rectangle& GetOutputArea() const; // Document position. // A size change also affects the VisArea - void SetVisArea( const Rectangle& rRect ); - const Rectangle& GetVisArea() const; + void SetVisArea( const tools::Rectangle& rRect ); + const tools::Rectangle& GetVisArea() const; const Pointer& GetPointer() const; diff --git a/include/editeng/outliner.hxx b/include/editeng/outliner.hxx index 75127e7e5f30..665497ed33a3 100644 --- a/include/editeng/outliner.hxx +++ b/include/editeng/outliner.hxx @@ -222,7 +222,7 @@ public: void Scroll( long nHorzScroll, long nVertScroll ); - void Paint( const Rectangle& rRect, OutputDevice* pTargetDevice = nullptr ); + void Paint( const tools::Rectangle& rRect, OutputDevice* pTargetDevice = nullptr ); bool PostKeyEvent( const KeyEvent& rKEvt, vcl::Window* pFrameWin = nullptr ); bool MouseButtonDown( const MouseEvent& ); bool MouseButtonUp( const MouseEvent& ); @@ -240,10 +240,10 @@ public: void SetReadOnly( bool bReadOnly ); bool IsReadOnly() const; - void SetOutputArea( const Rectangle& rRect ); - Rectangle GetOutputArea() const; + void SetOutputArea( const tools::Rectangle& rRect ); + tools::Rectangle GetOutputArea() const; - Rectangle GetVisArea() const; + tools::Rectangle GetVisArea() const; void CreateSelectionList (std::vector<Paragraph*> &aSelList) ; @@ -305,9 +305,9 @@ public: SvtScriptType GetSelectedScriptType() const; - void SetVisArea( const Rectangle& rRect ); + void SetVisArea( const tools::Rectangle& rRect ); void SetSelection( const ESelection& ); - void GetSelectionRectangles(std::vector<Rectangle>& rLogicRects) const; + void GetSelectionRectangles(std::vector<tools::Rectangle>& rLogicRects) const; void RemoveAttribs( bool bRemoveParaAttribs, bool bKeepLanguages = false ); void RemoveAttribsKeepLanguages( bool bRemoveParaAttribs ); @@ -561,7 +561,7 @@ struct EBulletInfo SvxFont aFont; Graphic aGraphic; sal_Int32 nParagraph; - Rectangle aBounds; + tools::Rectangle aBounds; EBulletInfo() : bVisible( false ), nType( 0 ), nParagraph( EE_PARA_NOT_FOUND ) {} }; @@ -650,7 +650,7 @@ private: void ImpTextPasted( sal_Int32 nStartPara, sal_Int32 nCount ); vcl::Font ImpCalcBulletFont( sal_Int32 nPara ) const; - Rectangle ImpCalcBulletArea( sal_Int32 nPara, bool bAdjust, bool bReturnPaperPos ); + tools::Rectangle ImpCalcBulletArea( sal_Int32 nPara, bool bAdjust, bool bReturnPaperPos ); bool ImpCanIndentSelectedPages( OutlinerView* pCurView ); bool ImpCanDeleteSelectedPages( OutlinerView* pCurView ); bool ImpCanDeleteSelectedPages( OutlinerView* pCurView, sal_Int32 nFirstPage, sal_Int32 nPages ); @@ -800,7 +800,7 @@ public: void SetStatusEventHdl( const Link<EditStatus&, void>& rLink ); Link<EditStatus&, void> GetStatusEventHdl() const; - void Draw( OutputDevice* pOutDev, const Rectangle& rOutRect ); + void Draw( OutputDevice* pOutDev, const tools::Rectangle& rOutRect ); void Draw( OutputDevice* pOutDev, const Point& rStartPos ); const Size& GetPaperSize() const; diff --git a/include/editeng/svxfont.hxx b/include/editeng/svxfont.hxx index 2034bd6363df..0c631e706548 100644 --- a/include/editeng/svxfont.hxx +++ b/include/editeng/svxfont.hxx @@ -33,7 +33,7 @@ class SvxDoCapitals; class OutputDevice; class Printer; class Point; -class Rectangle; +namespace tools { class Rectangle; } class Size; class EDITENG_DLLPUBLIC SvxFont : public vcl::Font @@ -102,7 +102,7 @@ public: const Point &rPos, const OUString &rTxt, const sal_Int32 nIdx = 0, const sal_Int32 nLen = SAL_MAX_INT32 ) const; - static void DrawArrow( OutputDevice &rOut, const Rectangle& rRect, + static void DrawArrow( OutputDevice &rOut, const tools::Rectangle& rRect, const Size& rSize, const Color& rCol, bool bLeft ); SvxFont& operator=( const SvxFont& rFont ); SvxFont& operator=( const Font& rFont ); diff --git a/include/editeng/txtrange.hxx b/include/editeng/txtrange.hxx index 9611a263f9b5..db510d319b1b 100644 --- a/include/editeng/txtrange.hxx +++ b/include/editeng/txtrange.hxx @@ -25,7 +25,7 @@ #include <deque> namespace tools { class PolyPolygon; } -class Rectangle; +namespace tools { class Rectangle; } namespace basegfx { class B2DPolyPolygon; @@ -45,7 +45,7 @@ class EDITENG_DLLPUBLIC TextRanger std::deque<RangeCache> mRangeCache; //!< Cached range calculations. tools::PolyPolygon *mpPolyPolygon; // Surface polygon tools::PolyPolygon *mpLinePolyPolygon; // Line polygon - Rectangle *pBound; // Comprehensive rectangle + tools::Rectangle *pBound; // Comprehensive rectangle sal_uInt16 nCacheSize; // Cache-Size sal_uInt16 nRight; // Distance Contour-Text sal_uInt16 nLeft; // Distance Text-Contour @@ -58,7 +58,7 @@ class EDITENG_DLLPUBLIC TextRanger bool bVertical :1;// for vertical writing mode TextRanger( const TextRanger& ) = delete; - const Rectangle& GetBoundRect_(); + const tools::Rectangle& GetBoundRect_(); public: TextRanger( const basegfx::B2DPolyPolygon& rPolyPolygon, const basegfx::B2DPolyPolygon* pLinePolyPolygon, @@ -74,8 +74,8 @@ public: bool IsSimple() const { return bSimple; } bool IsInner() const { return bInner; } bool IsVertical() const { return bVertical; } - const Rectangle& GetBoundRect() - { return pBound ? static_cast< const Rectangle& >(*pBound) : GetBoundRect_(); } + const tools::Rectangle& GetBoundRect() + { return pBound ? static_cast< const tools::Rectangle& >(*pBound) : GetBoundRect_(); } void SetUpper( sal_uInt16 nNew ){ nUpper = nNew; } void SetLower( sal_uInt16 nNew ){ nLower = nNew; } void SetVertical( bool bNew ); diff --git a/include/editeng/unoedhlp.hxx b/include/editeng/unoedhlp.hxx index c08576741cd8..3d0a42cde3f7 100644 --- a/include/editeng/unoedhlp.hxx +++ b/include/editeng/unoedhlp.hxx @@ -150,7 +150,7 @@ public: @return the possibly transformed rect */ - static Rectangle EEToUserSpace( const Rectangle& rRect, const Size& rEESize, bool bIsVertical ); + static tools::Rectangle EEToUserSpace( const tools::Rectangle& rRect, const Size& rEESize, bool bIsVertical ); }; diff --git a/include/editeng/unoedprx.hxx b/include/editeng/unoedprx.hxx index cc92ef40bddc..39bc5f163b6d 100644 --- a/include/editeng/unoedprx.hxx +++ b/include/editeng/unoedprx.hxx @@ -63,8 +63,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; @@ -118,7 +118,7 @@ public: // SvxViewForwarder interface 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/include/editeng/unoedsrc.hxx b/include/editeng/unoedsrc.hxx index 8094d0509604..6274ccfd9046 100644 --- a/include/editeng/unoedsrc.hxx +++ b/include/editeng/unoedsrc.hxx @@ -233,7 +233,7 @@ public: left corner of text. The coordinates returned here are to be interpreted in the map mode given by GetMapMode(). */ - virtual Rectangle GetCharBounds( sal_Int32 nPara, sal_Int32 nIndex ) const = 0; + virtual tools::Rectangle GetCharBounds( sal_Int32 nPara, sal_Int32 nIndex ) const = 0; /** Query the bounding rectangle of the given paragraph @@ -244,7 +244,7 @@ public: left corner of text. The coordinates returned here are to be interpreted in the map mode given by GetMapMode(). */ - virtual Rectangle GetParaBounds( sal_Int32 nPara ) const = 0; + virtual tools::Rectangle GetParaBounds( sal_Int32 nPara ) const = 0; /** Query the map mode of the underlying EditEngine/Outliner @@ -461,7 +461,7 @@ public: values are already in screen coordinates (pixel), and have to be relative to the EditEngine/Outliner's upper left corner. */ - virtual Rectangle GetVisArea() const = 0; + virtual tools::Rectangle GetVisArea() const = 0; /** Convert from logical, EditEngine-relative coordinates to screen coordinates diff --git a/include/editeng/unofored.hxx b/include/editeng/unofored.hxx index b6c561caa37f..c450598f1c1c 100644 --- a/include/editeng/unofored.hxx +++ b/include/editeng/unofored.hxx @@ -62,8 +62,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; diff --git a/include/editeng/unoforou.hxx b/include/editeng/unoforou.hxx index 02a78236e585..a26fc406c220 100644 --- a/include/editeng/unoforou.hxx +++ b/include/editeng/unoforou.hxx @@ -81,8 +81,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; diff --git a/include/editeng/unotext.hxx b/include/editeng/unotext.hxx index 179a3a621994..2318730d5e06 100644 --- a/include/editeng/unotext.hxx +++ b/include/editeng/unotext.hxx @@ -204,8 +204,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; diff --git a/include/editeng/unoviwou.hxx b/include/editeng/unoviwou.hxx index ec3fa18dc33b..7a4dc1c2b3ca 100644 --- a/include/editeng/unoviwou.hxx +++ b/include/editeng/unoviwou.hxx @@ -41,7 +41,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/include/filter/msfilter/escherex.hxx b/include/filter/msfilter/escherex.hxx index 5a2f1d3bd676..63f2a346f306 100644 --- a/include/filter/msfilter/escherex.hxx +++ b/include/filter/msfilter/escherex.hxx @@ -577,7 +577,7 @@ public: sal_uInt32 GetBlibID( SvStream& rPicOutStream, const OString& rGraphicId, - const Rectangle& rBoundRect, + const tools::Rectangle& rBoundRect, const css::awt::Rectangle* pVisArea = nullptr, const GraphicAttr* pGrafikAttr = nullptr, const bool ooxmlExport = false @@ -648,7 +648,7 @@ class MSFILTER_DLLPUBLIC EscherPropertyContainer { EscherGraphicProvider* pGraphicProvider; SvStream* pPicOutStrm; - Rectangle* pShapeBoundRect; + tools::Rectangle* pShapeBoundRect; sal_uInt32 nSortCount; sal_uInt32 nSortBufSize; @@ -670,7 +670,7 @@ class MSFILTER_DLLPUBLIC EscherPropertyContainer SAL_DLLPRIVATE explicit EscherPropertyContainer( EscherGraphicProvider * pGraphProv, SvStream * pPiOutStrm, - Rectangle * pBoundRect); + tools::Rectangle * pBoundRect); public: @@ -678,7 +678,7 @@ public: EscherPropertyContainer( EscherGraphicProvider& rGraphicProvider, // the PropertyContainer needs to know SvStream* pPicOutStrm, // the GraphicProvider to be able to write - Rectangle& rShapeBoundRect // FillBitmaps or GraphicObjects. + tools::Rectangle& rShapeBoundRect // FillBitmaps or GraphicObjects. ); // under some circumstances the ShapeBoundRect // is adjusted this will happen when rotated // GraphicObjects are saved to PowerPoint @@ -883,7 +883,7 @@ public: /// using rEx.AddAtom(...) followed by /// record data written to rEx.GetStream() virtual void WriteData( EscherEx& rEx, - const Rectangle& rRect ) = 0; + const tools::Rectangle& rRect ) = 0; }; class InteractionInfo @@ -930,7 +930,7 @@ public: EscherExClientRecord_Base* GetClientTextbox() const { return pClientTextbox; } - void WriteClientAnchor( EscherEx& rEx, const Rectangle& rRect ) + void WriteClientAnchor( EscherEx& rEx, const tools::Rectangle& rRect ) { if( pClientAnchor ) pClientAnchor->WriteData( rEx, rRect ); } void WriteClientData( EscherEx& rEx ) { if( pClientData ) pClientData->WriteData( rEx ); } @@ -1115,20 +1115,20 @@ public: void BeginAtom(); void EndAtom( sal_uInt16 nRecType, int nRecVersion = 0, int nRecInstance = 0 ); void AddAtom( sal_uInt32 nAtomSitze, sal_uInt16 nRecType, int nRecVersion = 0, int nRecInstance = 0 ); - void AddChildAnchor( const Rectangle& rRectangle ); - void AddClientAnchor( const Rectangle& rRectangle ); + void AddChildAnchor( const tools::Rectangle& rRectangle ); + void AddClientAnchor( const tools::Rectangle& rRectangle ); - virtual sal_uInt32 EnterGroup( const OUString& rShapeName, const Rectangle* pBoundRect ); - sal_uInt32 EnterGroup( const Rectangle* pBoundRect = nullptr ); + virtual sal_uInt32 EnterGroup( const OUString& rShapeName, const tools::Rectangle* pBoundRect ); + sal_uInt32 EnterGroup( const tools::Rectangle* pBoundRect = nullptr ); sal_uInt32 GetGroupLevel() const { return mnGroupLevel; }; - void SetGroupSnapRect( sal_uInt32 nGroupLevel, const Rectangle& rRect ); - void SetGroupLogicRect( sal_uInt32 nGroupLevel, const Rectangle& rRect ); + void SetGroupSnapRect( sal_uInt32 nGroupLevel, const tools::Rectangle& rRect ); + void SetGroupLogicRect( sal_uInt32 nGroupLevel, const tools::Rectangle& rRect ); virtual void LeaveGroup(); // a ESCHER_Sp is being written ( a ESCHER_DgContainer has to be opened for this purpose!) virtual void AddShape( sal_uInt32 nShpInstance, sal_uInt32 nFlagIds, sal_uInt32 nShapeID = 0 ); - virtual void Commit( EscherPropertyContainer& rProps, const Rectangle& rRect); + virtual void Commit( EscherPropertyContainer& rProps, const tools::Rectangle& rRect); static sal_uInt32 GetColor( const sal_uInt32 nColor ); static sal_uInt32 GetColor( const Color& rColor, bool bSwap ); @@ -1155,7 +1155,7 @@ public: /// shape is ignored. virtual EscherExHostAppData* StartShape( const css::uno::Reference< css::drawing::XShape >& rShape, - const Rectangle* pChildAnchor ); + const tools::Rectangle* pChildAnchor ); /// Called after a shape is written to inform the application /// of the resulted shape type and ID. diff --git a/include/filter/msfilter/msdffimp.hxx b/include/filter/msfilter/msdffimp.hxx index 9b810357450e..5016902e5994 100644 --- a/include/filter/msfilter/msdffimp.hxx +++ b/include/filter/msfilter/msdffimp.hxx @@ -271,10 +271,10 @@ typedef std::set<std::unique_ptr<SvxMSDffImportRec>, struct SvxMSDffImportData { MSDffImportRecords m_Records; ///< Shape pointer, Shape ids and private data - Rectangle aParentRect;///< Rectangle of the surrounding groups, + tools::Rectangle aParentRect;///< Rectangle of the surrounding groups, ///< which might have been provided externally - explicit SvxMSDffImportData( const Rectangle& rParentRect ) : aParentRect( rParentRect ) {} + explicit SvxMSDffImportData( const tools::Rectangle& rParentRect ) : aParentRect( rParentRect ) {} bool empty() const { return m_Records.empty(); } size_t size() const { return m_Records.size(); } MSDffImportRecords::const_iterator begin() const { return m_Records.begin(); } @@ -285,8 +285,8 @@ struct DffObjData { const DffRecordHeader& rSpHd; - Rectangle aBoundRect; - Rectangle aChildAnchor; + tools::Rectangle aBoundRect; + tools::Rectangle aChildAnchor; sal_uInt32 nShapeId; sal_uInt32 nSpFlags; @@ -303,7 +303,7 @@ struct DffObjData int nCalledByGroup; DffObjData( const DffRecordHeader& rObjHd, - const Rectangle& rBoundRect, + const tools::Rectangle& rBoundRect, int nClByGroup ) : rSpHd( rObjHd ), aBoundRect( rBoundRect ), @@ -474,15 +474,15 @@ protected: // inside groups. Instead a graphic object is created. virtual SdrObject* ImportOLE( sal_uInt32 nOLEId, const Graphic& rGraf, - const Rectangle& rBoundRect, - const Rectangle& rVisArea, + const tools::Rectangle& rBoundRect, + const tools::Rectangle& rVisArea, const int _nCalledByGroup, sal_Int64 nAspect ) const; static css::uno::Reference < css::embed::XEmbeddedObject > CheckForConvertToSOObj( sal_uInt32 nConvertFlags, SotStorage& rSrcStg, const css::uno::Reference < css::embed::XStorage >& xDestStg, const Graphic& rGrf, - const Rectangle& rVisArea, + const tools::Rectangle& rVisArea, OUString const& rBaseURL); // the following methods need to be overridden for Excel imports @@ -500,7 +500,7 @@ protected: virtual SdrObject* ProcessObj( SvStream& rSt, DffObjData& rData, void* pData, - Rectangle& rTextRect, + tools::Rectangle& rTextRect, SdrObject* pObj); /** Object finalization, used by the Excel filter to correctly @@ -634,7 +634,7 @@ public: @return true if successful, false otherwise */ - bool GetBLIP( sal_uLong nIdx, Graphic& rData, Rectangle* pVisArea = nullptr ); + bool GetBLIP( sal_uLong nIdx, Graphic& rData, tools::Rectangle* pVisArea = nullptr ); // TODO: provide proper documentation here /** read a BLIP out of a already positioned stream @@ -646,40 +646,40 @@ public: @return true if successful, false otherwise */ - static bool GetBLIPDirect(SvStream& rBLIPStream, Graphic& rData, Rectangle* pVisArea = nullptr ); + static bool GetBLIPDirect(SvStream& rBLIPStream, Graphic& rData, tools::Rectangle* pVisArea = nullptr ); bool GetShape(sal_uLong nId, SdrObject*& rpData, SvxMSDffImportData& rData); SdrObject* ImportObj( SvStream& rSt, void* pData, - Rectangle& rClientRect, - const Rectangle& rGlobalChildRect, + tools::Rectangle& rClientRect, + const tools::Rectangle& rGlobalChildRect, int nCalledByGroup = 0, sal_Int32* pShapeId = nullptr); SdrObject* ImportGroup( const DffRecordHeader& rHd, SvStream& rSt, void* pData, - Rectangle& rClientRect, - const Rectangle& rGlobalChildRect, + tools::Rectangle& rClientRect, + const tools::Rectangle& rGlobalChildRect, int nCalledByGroup, sal_Int32* pShapeId = nullptr ); SdrObject* ImportShape( const DffRecordHeader& rHd, SvStream& rSt, void* pData, - Rectangle& rClientRect, - const Rectangle& rGlobalChildRect, + tools::Rectangle& rClientRect, + const tools::Rectangle& rGlobalChildRect, int nCalledByGroup, sal_Int32* pShapeId = nullptr); - Rectangle GetGlobalChildAnchor( const DffRecordHeader& rHd, + tools::Rectangle GetGlobalChildAnchor( const DffRecordHeader& rHd, SvStream& rSt, - Rectangle& aClientRect ); + tools::Rectangle& aClientRect ); void GetGroupAnchors( const DffRecordHeader& rHd, SvStream& rSt, - Rectangle& rGroupClientAnchor, - Rectangle& rGroupChildAnchor, - const Rectangle& rClientRect, - const Rectangle& rGlobalChildRect ); + tools::Rectangle& rGroupClientAnchor, + tools::Rectangle& rGroupChildAnchor, + const tools::Rectangle& rClientRect, + const tools::Rectangle& rGlobalChildRect ); const SvxMSDffShapeInfos_ById* GetShapeInfos() const { return m_xShapeInfosById.get(); } @@ -703,8 +703,8 @@ public: tools::SvRef<SotStorage>& rSrcStorage, const css::uno::Reference < css::embed::XStorage >& xDestStg, const Graphic& rGraf, - const Rectangle& rBoundRect, - const Rectangle& rVisArea, + const tools::Rectangle& rBoundRect, + const tools::Rectangle& rVisArea, SvStream* pDataStrrm, ErrCode& rError, sal_uInt32 nConvertFlags, diff --git a/include/filter/msfilter/svdfppt.hxx b/include/filter/msfilter/svdfppt.hxx index f0a78072b3d8..65aa8a9884d3 100644 --- a/include/filter/msfilter/svdfppt.hxx +++ b/include/filter/msfilter/svdfppt.hxx @@ -461,7 +461,7 @@ public: PptFontEntityAtom* GetFontEnityAtom( sal_uInt32 nNum ) const; void RecolorGraphic( SvStream& rSt, sal_uInt32 nRecLen, Graphic& rGraph ); virtual SdrObject* ReadObjText( PPTTextObj* pTextObj, SdrObject* pObj, SdPageCapsule pPage ) const; - virtual SdrObject* ProcessObj( SvStream& rSt, DffObjData& rData, void* pData, Rectangle& rTextRect, SdrObject* pObj ) override; + virtual SdrObject* ProcessObj( SvStream& rSt, DffObjData& rData, void* pData, tools::Rectangle& rTextRect, SdrObject* pObj ) override; virtual void ProcessClientAnchor2( SvStream& rSt, DffRecordHeader& rHd, void* pData, DffObjData& rObj ) override; void ImportHeaderFooterContainer( DffRecordHeader& rHeader, HeaderFooterEntry& rEntry ); }; @@ -576,8 +576,8 @@ protected: virtual SdrObject* ImportOLE( sal_uInt32 nOLEId, const Graphic& rGraf, - const Rectangle& rBoundRect, - const Rectangle& rVisArea, + const tools::Rectangle& rBoundRect, + const tools::Rectangle& rVisArea, const int _nCalledByGroup, sal_Int64 nAspect ) const override; diff --git a/include/oox/export/drawingml.hxx b/include/oox/export/drawingml.hxx index 97d8dff58de6..94ccc6aac24d 100644 --- a/include/oox/export/drawingml.hxx +++ b/include/oox/export/drawingml.hxx @@ -75,7 +75,7 @@ namespace uno { struct EscherConnectorListEntry; class OutlinerParaObject; -class Rectangle; +namespace tools { class Rectangle; } namespace tools { class PolyPolygon; @@ -190,7 +190,7 @@ public: void WriteShapeTransformation( const css::uno::Reference< css::drawing::XShape >& rXShape, sal_Int32 nXmlNamespace, bool bFlipH = false, bool bFlipV = false, bool bSuppressRotation = false ); - void WriteTransformation( const Rectangle& rRectangle, + void WriteTransformation( const tools::Rectangle& rRectangle, sal_Int32 nXmlNamespace, bool bFlipH = false, bool bFlipV = false, sal_Int32 nRotation = 0 ); void WriteText( const css::uno::Reference< css::uno::XInterface >& rXIface, const OUString& presetWarp, bool bBodyPr = true, bool bText = true, sal_Int32 nXmlNamespace = 0); diff --git a/include/oox/export/vmlexport.hxx b/include/oox/export/vmlexport.hxx index 37dc577c10c1..222be73aa7bc 100644 --- a/include/oox/export/vmlexport.hxx +++ b/include/oox/export/vmlexport.hxx @@ -48,7 +48,7 @@ namespace sax_fastparser { } class Point; -class Rectangle; +namespace tools { class Rectangle; } class SdrObject; namespace oox { @@ -140,14 +140,14 @@ protected: /// /// The parameter is just what we got from StartShape(). virtual void EndShape( sal_Int32 nShapeElement ); - virtual void Commit( EscherPropertyContainer& rProps, const Rectangle& rRect ) override; + virtual void Commit( EscherPropertyContainer& rProps, const tools::Rectangle& rRect ) override; private: virtual void OpenContainer( sal_uInt16 nEscherContainer, int nRecInstance = 0 ) override; virtual void CloseContainer() override; - virtual sal_uInt32 EnterGroup( const OUString& rShapeName, const Rectangle* pBoundRect ) override; + virtual sal_uInt32 EnterGroup( const OUString& rShapeName, const tools::Rectangle* pBoundRect ) override; virtual void LeaveGroup() override; virtual void AddShape( sal_uInt32 nShapeType, sal_uInt32 nShapeFlags, sal_uInt32 nShapeId = 0 ) override; @@ -160,10 +160,10 @@ private: void AddFlipXY( ); /// Add starting and ending point of a line to the m_pShapeAttrList. - void AddLineDimensions( const Rectangle& rRectangle ); + void AddLineDimensions( const tools::Rectangle& rRectangle ); /// Add position and size to the OStringBuffer. - void AddRectangleDimensions( OStringBuffer& rBuffer, const Rectangle& rRectangle, bool rbAbsolutePos = true ); + void AddRectangleDimensions( OStringBuffer& rBuffer, const tools::Rectangle& rRectangle, bool rbAbsolutePos = true ); }; } // namespace vml diff --git a/include/sfx2/StylePreviewRenderer.hxx b/include/sfx2/StylePreviewRenderer.hxx index 419a7ee8097c..6e3cf72b2212 100644 --- a/include/sfx2/StylePreviewRenderer.hxx +++ b/include/sfx2/StylePreviewRenderer.hxx @@ -50,7 +50,7 @@ public: virtual bool recalculate() = 0; virtual Size getRenderSize() = 0; - virtual bool render(const Rectangle& aRectangle, RenderAlign eRenderAlign = RenderAlign::CENTER) = 0; + virtual bool render(const tools::Rectangle& aRectangle, RenderAlign eRenderAlign = RenderAlign::CENTER) = 0; }; } // end namespace sfx2 diff --git a/include/sfx2/app.hxx b/include/sfx2/app.hxx index 5798c07d3de2..dbdabc015f77 100644 --- a/include/sfx2/app.hxx +++ b/include/sfx2/app.hxx @@ -41,7 +41,7 @@ class BasicManager; class DdeService; class PrinterDialog; class Point; -class Rectangle; +namespace tools { class Rectangle; } class AppSettings; struct SfxChildWinContextFactory; class SfxAppData_Impl; diff --git a/include/sfx2/dockwin.hxx b/include/sfx2/dockwin.hxx index d9b3109e4466..62b6231e8bd3 100644 --- a/include/sfx2/dockwin.hxx +++ b/include/sfx2/dockwin.hxx @@ -40,8 +40,8 @@ bool SFX2_DLLPUBLIC SAL_CALL IsDockingWindowVisible( const css::uno::Reference< class SFX2_DLLPUBLIC SfxDockingWindow : public DockingWindow { private: - Rectangle aInnerRect; - Rectangle aOuterRect; + tools::Rectangle aInnerRect; + tools::Rectangle aOuterRect; SfxBindings* pBindings; Size aFloatSize; SfxChildWindow* pMgr; @@ -51,7 +51,7 @@ private: void operator =(SfxDockingWindow &) = delete; protected: - SfxChildAlignment CalcAlignment(const Point& rPos, Rectangle& rRect ); + SfxChildAlignment CalcAlignment(const Point& rPos, tools::Rectangle& rRect ); virtual Size CalcDockingSize(SfxChildAlignment); virtual SfxChildAlignment CheckAlignment(SfxChildAlignment,SfxChildAlignment); @@ -60,10 +60,10 @@ protected: virtual bool PrepareToggleFloatingMode() override; virtual void ToggleFloatingMode() override; virtual void StartDocking() override; - virtual bool Docking( const Point& rPos, Rectangle& rRect ) override; - virtual void EndDocking( const Rectangle& rRect, bool bFloatMode ) override; + virtual bool Docking( const Point& rPos, tools::Rectangle& rRect ) override; + virtual void EndDocking( const tools::Rectangle& rRect, bool bFloatMode ) override; virtual void Resizing( Size& rSize ) override; - virtual void Paint( vcl::RenderContext& rRenderContext, const Rectangle& rRect ) override; + virtual void Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect ) override; virtual bool Close() override; virtual void Move() override; @@ -85,10 +85,10 @@ public: virtual void FillInfo(SfxChildWinInfo&) const; virtual void StateChanged( StateChangedType nStateChange ) override; - void SetDockingRects(const Rectangle& rOuter, const Rectangle& rInner) + void SetDockingRects(const tools::Rectangle& rOuter, const tools::Rectangle& rInner) { aInnerRect = rInner; aOuterRect = rOuter; } - const Rectangle& GetInnerRect() const { return aInnerRect; } - const Rectangle& GetOuterRect() const { return aOuterRect; } + const tools::Rectangle& GetInnerRect() const { return aInnerRect; } + const tools::Rectangle& GetOuterRect() const { return aOuterRect; } SfxBindings& GetBindings() const { return *pBindings; } sal_uInt16 GetType() const { return pMgr->GetType(); } SfxChildAlignment GetAlignment() const { return pMgr->GetAlignment(); } diff --git a/include/sfx2/frame.hxx b/include/sfx2/frame.hxx index b8afc7f9b26d..b14bb6e6f0b5 100644 --- a/include/sfx2/frame.hxx +++ b/include/sfx2/frame.hxx @@ -69,7 +69,7 @@ class SfxViewFrame; class SfxFrameDescriptor; class SfxFrameSetDescriptor; class SfxDispatcher; -class Rectangle; +namespace tools { class Rectangle; } class SfxRequest; class SystemWindow; class SfxFrameArr_Impl; @@ -163,7 +163,7 @@ public: SAL_DLLPRIVATE bool OwnsBindings_Impl() const; SAL_DLLPRIVATE SfxWorkWindow* GetWorkWindow_Impl() const; SAL_DLLPRIVATE void SetToolSpaceBorderPixel_Impl( const SvBorder& ); - SAL_DLLPRIVATE Rectangle GetTopOuterRectPixel_Impl() const; + SAL_DLLPRIVATE tools::Rectangle GetTopOuterRectPixel_Impl() const; SAL_DLLPRIVATE void CreateWorkWindow_Impl(); SAL_DLLPRIVATE void GrabFocusOnComponent_Impl(); diff --git a/include/sfx2/infobar.hxx b/include/sfx2/infobar.hxx index d78aed2d61a9..4ad6d8a7ab14 100644 --- a/include/sfx2/infobar.hxx +++ b/include/sfx2/infobar.hxx @@ -64,7 +64,7 @@ class SfxInfoBarWindow : public vcl::Window virtual void dispose() override; const OUString& getId() const { return m_sId; } - virtual void Paint( vcl::RenderContext& rRenderContext, const Rectangle& ) override; + virtual void Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& ) override; virtual void Resize( ) override; basegfx::BColor m_aBackgroundColor; basegfx::BColor m_aForegroundColor; diff --git a/include/sfx2/ipclient.hxx b/include/sfx2/ipclient.hxx index 1ab9f4df89fd..0bc3d99ebc21 100644 --- a/include/sfx2/ipclient.hxx +++ b/include/sfx2/ipclient.hxx @@ -50,7 +50,7 @@ friend class SfxInPlaceClient_Impl; SAL_DLLPRIVATE virtual void ObjectAreaChanged(); // an active object was resized by the user and now asks for the new space - SAL_DLLPRIVATE virtual void RequestNewObjectArea( Rectangle& ); + SAL_DLLPRIVATE virtual void RequestNewObjectArea( tools::Rectangle& ); // notify the client that an active object has changed its VisualAreaSize SAL_DLLPRIVATE virtual void ViewChanged(); @@ -70,11 +70,11 @@ public: bool IsObjectUIActive() const; bool IsObjectInPlaceActive() const; void DeactivateObject(); - bool SetObjArea( const Rectangle & ); - const Rectangle& GetObjArea() const; - Rectangle GetScaledObjArea() const; + bool SetObjArea( const tools::Rectangle & ); + const tools::Rectangle& GetObjArea() const; + tools::Rectangle GetScaledObjArea() const; void SetSizeScale( const Fraction & rScaleWidth, const Fraction & rScaleHeight ); - void SetObjAreaAndScale( const Rectangle&, const Fraction&, const Fraction& ); + void SetObjAreaAndScale( const tools::Rectangle&, const Fraction&, const Fraction& ); const Fraction& GetScaleWidth() const; const Fraction& GetScaleHeight() const; void Invalidate(); diff --git a/include/sfx2/objsh.hxx b/include/sfx2/objsh.hxx index cf1ca2a2fe2d..d8a74fcbf307 100644 --- a/include/sfx2/objsh.hxx +++ b/include/sfx2/objsh.hxx @@ -628,9 +628,9 @@ public: virtual Printer * GetDocumentPrinter(); virtual OutputDevice* GetDocumentRefDev(); virtual void OnDocumentPrinterChanged( Printer * pNewPrinter ); - virtual Rectangle GetVisArea( sal_uInt16 nAspect ) const; - virtual void SetVisArea( const Rectangle & rVisArea ); - const Rectangle & GetVisArea() const; + virtual tools::Rectangle GetVisArea( sal_uInt16 nAspect ) const; + virtual void SetVisArea( const tools::Rectangle & rVisArea ); + const tools::Rectangle & GetVisArea() const; void SetVisAreaSize( const Size & rVisSize ); virtual sal_uIntPtr GetMiscStatus() const; diff --git a/include/sfx2/recentdocsview.hxx b/include/sfx2/recentdocsview.hxx index 0c2a238092c8..bbf2ac917faa 100644 --- a/include/sfx2/recentdocsview.hxx +++ b/include/sfx2/recentdocsview.hxx @@ -80,7 +80,7 @@ protected: virtual void OnItemDblClicked(ThumbnailViewItem *pItem) override; - virtual void Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) override; + virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) override; virtual void LoseFocus() override; diff --git a/include/sfx2/recentdocsviewitem.hxx b/include/sfx2/recentdocsviewitem.hxx index 63ff1ef31277..00fdb3e77d23 100644 --- a/include/sfx2/recentdocsviewitem.hxx +++ b/include/sfx2/recentdocsviewitem.hxx @@ -24,7 +24,7 @@ public: Returns rectangle that needs to be invalidated. */ - virtual Rectangle updateHighlight(bool bVisible, const Point& rPoint) override; + virtual tools::Rectangle updateHighlight(bool bVisible, const Point& rPoint) override; /// Text to be used for the tooltip. virtual OUString getHelpText() const override; @@ -39,7 +39,7 @@ public: protected: /// Return area where is the icon to remove document from the recent documents. - Rectangle getRemoveIconArea() const; + tools::Rectangle getRemoveIconArea() const; private: OUString maURL; diff --git a/include/sfx2/sidebar/Deck.hxx b/include/sfx2/sidebar/Deck.hxx index fa27ec5c1d4c..044c7edfda8c 100644 --- a/include/sfx2/sidebar/Deck.hxx +++ b/include/sfx2/sidebar/Deck.hxx @@ -47,7 +47,7 @@ public: const OUString& GetId() const { return msId; } VclPtr<DeckTitleBar> GetTitleBar() const; - Rectangle GetContentArea() const; + tools::Rectangle GetContentArea() const; void ResetPanels (const SharedPanelContainer& rPanels); const SharedPanelContainer& GetPanels() const { return maPanels; } @@ -63,7 +63,7 @@ public: void ShowPanel (const Panel& rPanel); virtual void ApplySettings(vcl::RenderContext& rRenderContext) override; - virtual void Paint(vcl::RenderContext& rRenderContext, const Rectangle& rUpdateArea) override; + virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rUpdateArea) override; virtual void DataChanged (const DataChangedEvent& rEvent) override; virtual bool EventNotify(NotifyEvent& rEvent) override; @@ -75,7 +75,7 @@ public: { public: ScrollContainerWindow(vcl::Window* pParentWindow); - virtual void Paint(vcl::RenderContext& rRenderContext, const Rectangle& rUpdateArea) override; + virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rUpdateArea) override; void SetSeparators(const ::std::vector<sal_Int32>& rSeparators); private: std::vector<sal_Int32> maSeparators; diff --git a/include/sfx2/sidebar/DeckLayouter.hxx b/include/sfx2/sidebar/DeckLayouter.hxx index 8b3b24810aba..27a94dd7b3e9 100644 --- a/include/sfx2/sidebar/DeckLayouter.hxx +++ b/include/sfx2/sidebar/DeckLayouter.hxx @@ -40,7 +40,7 @@ class Panel; namespace DeckLayouter { void LayoutDeck ( - const Rectangle& rContentArea, + const tools::Rectangle& rContentArea, sal_Int32& rMinimalWidth, SharedPanelContainer& rPanels, vcl::Window& pDeckTitleBar, diff --git a/include/sfx2/sidebar/DeckTitleBar.hxx b/include/sfx2/sidebar/DeckTitleBar.hxx index 9ddba79046a2..3542cd45e0fb 100644 --- a/include/sfx2/sidebar/DeckTitleBar.hxx +++ b/include/sfx2/sidebar/DeckTitleBar.hxx @@ -35,8 +35,8 @@ public: virtual void DataChanged(const DataChangedEvent& rEvent) override; protected: - virtual Rectangle GetTitleArea(const Rectangle& rTitleBarBox) override; - virtual void PaintDecoration(vcl::RenderContext& rRenderContext, const Rectangle& rTitleBarBox) override; + virtual tools::Rectangle GetTitleArea(const tools::Rectangle& rTitleBarBox) override; + virtual void PaintDecoration(vcl::RenderContext& rRenderContext, const tools::Rectangle& rTitleBarBox) override; virtual sidebar::Paint GetBackgroundPaint() override; virtual void HandleToolBoxItemClick(const sal_uInt16 nItemIndex) override; virtual css::uno::Reference<css::accessibility::XAccessible> CreateAccessible() override; diff --git a/include/sfx2/sidebar/DrawHelper.hxx b/include/sfx2/sidebar/DrawHelper.hxx index 97bdb0c04530..f80a0ca12775 100644 --- a/include/sfx2/sidebar/DrawHelper.hxx +++ b/include/sfx2/sidebar/DrawHelper.hxx @@ -34,13 +34,13 @@ class Paint; class DrawHelper { public: - static void DrawBorder(vcl::RenderContext& rRenderContext, const Rectangle& rBox, const SvBorder& rBorderSize, + static void DrawBorder(vcl::RenderContext& rRenderContext, const tools::Rectangle& rBox, const SvBorder& rBorderSize, const Paint& rHorizontalPaint, const Paint& rVerticalPaint); static void DrawHorizontalLine(vcl::RenderContext& rRenderContext, const sal_Int32 nLeft, const sal_Int32 nRight, const sal_Int32 nY, const sal_Int32 nHeight, const Paint& rPaint); static void DrawVerticalLine(vcl::RenderContext& rRenderContext, const sal_Int32 nTop, const sal_Int32 nBottom, const sal_Int32 nX, const sal_Int32 nWidth, const Paint& rPaint); - static void DrawRoundedRectangle(vcl::RenderContext& rRenderContext, const Rectangle& rBox, const sal_Int32 nCornerRadius, + static void DrawRoundedRectangle(vcl::RenderContext& rRenderContext, const tools::Rectangle& rBox, const sal_Int32 nCornerRadius, const Color& rBorderColor, const Paint& rFillPaint); }; diff --git a/include/sfx2/sidebar/MenuButton.hxx b/include/sfx2/sidebar/MenuButton.hxx index 72438050a654..e5be89ffd075 100644 --- a/include/sfx2/sidebar/MenuButton.hxx +++ b/include/sfx2/sidebar/MenuButton.hxx @@ -29,7 +29,7 @@ class MenuButton public: MenuButton (vcl::Window* pParentWindow); - virtual void Paint (vcl::RenderContext& /*rRenderContext*/, const Rectangle& rUpdateArea) override; + virtual void Paint (vcl::RenderContext& /*rRenderContext*/, const tools::Rectangle& rUpdateArea) override; virtual void MouseMove (const MouseEvent& rEvent) override; virtual void MouseButtonDown (const MouseEvent& rMouseEvent) override; virtual void MouseButtonUp (const MouseEvent& rMouseEvent) override; diff --git a/include/sfx2/sidebar/PanelTitleBar.hxx b/include/sfx2/sidebar/PanelTitleBar.hxx index 998a12d68ee6..4a5475a98c93 100644 --- a/include/sfx2/sidebar/PanelTitleBar.hxx +++ b/include/sfx2/sidebar/PanelTitleBar.hxx @@ -44,8 +44,8 @@ public: virtual void MouseButtonUp(const MouseEvent& rMouseEvent) override; protected: - virtual Rectangle GetTitleArea(const Rectangle& rTitleBarBox) override; - virtual void PaintDecoration(vcl::RenderContext& rRenderContext, const Rectangle& rTitleBarBox) override; + virtual tools::Rectangle GetTitleArea(const tools::Rectangle& rTitleBarBox) override; + virtual void PaintDecoration(vcl::RenderContext& rRenderContext, const tools::Rectangle& rTitleBarBox) override; virtual sidebar::Paint GetBackgroundPaint() override; virtual void HandleToolBoxItemClick (const sal_uInt16 nItemIndex) override; virtual css::uno::Reference<css::accessibility::XAccessible> CreateAccessible() override; diff --git a/include/sfx2/sidebar/SidebarController.hxx b/include/sfx2/sidebar/SidebarController.hxx index 5832f2124db3..cf46885a4a7b 100644 --- a/include/sfx2/sidebar/SidebarController.hxx +++ b/include/sfx2/sidebar/SidebarController.hxx @@ -235,7 +235,7 @@ private: const Context& rContext); void ShowPopupMenu ( - const Rectangle& rButtonBox, + const tools::Rectangle& rButtonBox, const ::std::vector<TabBar::DeckMenuData>& rMenuData) const; VclPtr<PopupMenu> CreatePopupMenu ( const ::std::vector<TabBar::DeckMenuData>& rMenuData) const; diff --git a/include/sfx2/sidebar/TabBar.hxx b/include/sfx2/sidebar/TabBar.hxx index df4b0c01983e..6ae1edeb93c5 100644 --- a/include/sfx2/sidebar/TabBar.hxx +++ b/include/sfx2/sidebar/TabBar.hxx @@ -63,7 +63,7 @@ public: bool mbIsEnabled; }; typedef ::std::function<void ( - const Rectangle&, + const tools::Rectangle&, const ::std::vector<DeckMenuData>& rMenuData)> PopupMenuProvider; TabBar ( vcl::Window* pParentWindow, @@ -75,7 +75,7 @@ public: virtual ~TabBar() override; virtual void dispose() override; - virtual void Paint (vcl::RenderContext& /*rRenderContext*/, const Rectangle& rUpdateArea) override; + virtual void Paint (vcl::RenderContext& /*rRenderContext*/, const tools::Rectangle& rUpdateArea) override; virtual void DataChanged (const DataChangedEvent& rDataChangedEvent) override; virtual bool EventNotify (NotifyEvent& rEvent) override; diff --git a/include/sfx2/sidebar/TabItem.hxx b/include/sfx2/sidebar/TabItem.hxx index a5e26ffd7500..ff39fb4e9cd6 100644 --- a/include/sfx2/sidebar/TabItem.hxx +++ b/include/sfx2/sidebar/TabItem.hxx @@ -35,7 +35,7 @@ class TabItem public: TabItem (vcl::Window* pParentWindow); - virtual void Paint (vcl::RenderContext& rRenderContext, const Rectangle& rUpdateArea) override; + virtual void Paint (vcl::RenderContext& rRenderContext, const tools::Rectangle& rUpdateArea) override; virtual void MouseMove (const MouseEvent& rEvent) override; virtual void MouseButtonDown (const MouseEvent& rMouseEvent) override; virtual void MouseButtonUp (const MouseEvent& rMouseEvent) override; diff --git a/include/sfx2/sidebar/Theme.hxx b/include/sfx2/sidebar/Theme.hxx index 6f0915e1c17a..ba71420b9f92 100644 --- a/include/sfx2/sidebar/Theme.hxx +++ b/include/sfx2/sidebar/Theme.hxx @@ -185,7 +185,7 @@ private: std::vector<Paint> maPaints; std::vector<sal_Int32> maIntegers; std::vector<bool> maBooleans; - std::vector<Rectangle> maRectangles; + std::vector<tools::Rectangle> maRectangles; bool mbIsHighContrastMode; bool mbIsHighContrastModeSetManually; diff --git a/include/sfx2/sidebar/TitleBar.hxx b/include/sfx2/sidebar/TitleBar.hxx index 2a554317fb39..35c37fc11424 100644 --- a/include/sfx2/sidebar/TitleBar.hxx +++ b/include/sfx2/sidebar/TitleBar.hxx @@ -41,7 +41,7 @@ public: void SetIcon (const Image& rIcon); virtual void ApplySettings(vcl::RenderContext& rRenderContext) override; - virtual void Paint(vcl::RenderContext& rRenderContext, const Rectangle& rUpdateArea) override; + virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rUpdateArea) override; virtual void DataChanged (const DataChangedEvent& rEvent) override; virtual void setPosSizePixel (long nX, long nY, long nWidth, long nHeight, PosSizeFlags nFlags = PosSizeFlags::All) override; @@ -58,9 +58,9 @@ protected: VclPtr<SidebarToolBox> maToolBox; OUString msTitle; - virtual Rectangle GetTitleArea (const Rectangle& rTitleBarBox) = 0; - virtual void PaintDecoration (vcl::RenderContext& rRenderContext, const Rectangle& rTitleBarBox) = 0; - void PaintFocus(vcl::RenderContext& rRenderContext, const Rectangle& rFocusBox); + virtual tools::Rectangle GetTitleArea (const tools::Rectangle& rTitleBarBox) = 0; + virtual void PaintDecoration (vcl::RenderContext& rRenderContext, const tools::Rectangle& rTitleBarBox) = 0; + void PaintFocus(vcl::RenderContext& rRenderContext, const tools::Rectangle& rFocusBox); virtual sidebar::Paint GetBackgroundPaint() = 0; virtual void HandleToolBoxItemClick (const sal_uInt16 nItemIndex); virtual css::uno::Reference<css::accessibility::XAccessible> CreateAccessible() override; @@ -69,7 +69,7 @@ private: Image maIcon; sidebar::Paint maBackgroundPaint; - void PaintTitle(vcl::RenderContext& rRenderContext, const Rectangle& rTitleBox); + void PaintTitle(vcl::RenderContext& rRenderContext, const tools::Rectangle& rTitleBox); DECL_LINK(SelectionHandler, ToolBox*, void); }; diff --git a/include/sfx2/templateviewitem.hxx b/include/sfx2/templateviewitem.hxx index 098241fcf1af..f16d8393fbf6 100644 --- a/include/sfx2/templateviewitem.hxx +++ b/include/sfx2/templateviewitem.hxx @@ -28,7 +28,7 @@ public: bool IsDefaultTemplate() const { return mbIsDefaultTemplate; } - Rectangle getDefaultIconArea() const; + tools::Rectangle getDefaultIconArea() const; virtual void Paint (drawinglayer::processor2d::BaseProcessor2D *pProcessor, const ThumbnailItemAttributes *pAttrs) override; diff --git a/include/sfx2/thumbnailview.hxx b/include/sfx2/thumbnailview.hxx index d5f0a5a91b14..421f2414398d 100644 --- a/include/sfx2/thumbnailview.hxx +++ b/include/sfx2/thumbnailview.hxx @@ -246,7 +246,7 @@ protected: 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 GetFocus() override; diff --git a/include/sfx2/thumbnailviewitem.hxx b/include/sfx2/thumbnailviewitem.hxx index b39c1d2d5844..11236f3bdfa2 100644 --- a/include/sfx2/thumbnailviewitem.hxx +++ b/include/sfx2/thumbnailviewitem.hxx @@ -98,7 +98,7 @@ public: Returns rectangle that needs to be invalidated. */ - virtual Rectangle updateHighlight(bool bVisible, const Point& rPoint); + virtual tools::Rectangle updateHighlight(bool bVisible, const Point& rPoint); /// Text to be used for the tooltip. @@ -112,9 +112,9 @@ public: css::uno::Reference< css::accessibility::XAccessible > const & GetAccessible( bool bIsTransientChildrenDisabled ); - void setDrawArea (const Rectangle &area); + void setDrawArea (const tools::Rectangle &area); - const Rectangle& getDrawArea () const { return maDrawArea; } + const tools::Rectangle& getDrawArea () const { return maDrawArea; } virtual void calculateItemsPosition (const long nThumbnailHeight, const long nDisplayHeight, const long nPadding, sal_uInt32 nMaxTextLength, @@ -133,7 +133,7 @@ protected: Point maTextPos; Point maPrev1Pos; - Rectangle maDrawArea; + tools::Rectangle maDrawArea; }; #endif // INCLUDED_SFX2_THUMBNAILVIEWITEM_HXX diff --git a/include/sfx2/titledockwin.hxx b/include/sfx2/titledockwin.hxx index a83de3084d5e..93c5f5527f57 100644 --- a/include/sfx2/titledockwin.hxx +++ b/include/sfx2/titledockwin.hxx @@ -57,14 +57,14 @@ namespace sfx2 protected: // Window overridables - virtual void Paint(vcl::RenderContext& rRenderContext, const Rectangle& i_rArea) override; + virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& i_rArea) override; virtual void Resize() override; virtual void StateChanged( StateChangedType i_nType ) override; virtual void DataChanged( const DataChangedEvent& i_rDataChangedEvent ) override; virtual void SetText( const OUString& i_rText ) override; // DockingWindow overridables - void EndDocking(const Rectangle& rRect, bool bFloatMode) override; + void EndDocking(const tools::Rectangle& rRect, bool bFloatMode) override; virtual void ApplySettings(vcl::RenderContext& rRenderContext) override; protected: diff --git a/include/sfx2/viewsh.hxx b/include/sfx2/viewsh.hxx index 52792c3d2f7b..72fed2785283 100644 --- a/include/sfx2/viewsh.hxx +++ b/include/sfx2/viewsh.hxx @@ -201,7 +201,7 @@ public: virtual void UIDeactivated( SfxInPlaceClient* pClient ); void JumpToMark( const OUString& rMark ); - void VisAreaChanged(const Rectangle& rRect); + void VisAreaChanged(const tools::Rectangle& rRect); // Misc @@ -249,7 +249,7 @@ public: virtual void ReadUserData( const OUString&, bool bBrowse = false ); virtual void WriteUserDataSequence ( css::uno::Sequence < css::beans::PropertyValue >& ); virtual void ReadUserDataSequence ( const css::uno::Sequence < css::beans::PropertyValue >& ); - virtual void QueryObjAreaPixel( Rectangle& rRect ) const; + virtual void QueryObjAreaPixel( tools::Rectangle& rRect ) const; virtual SfxObjectShell* GetObjectShell() override; @@ -315,7 +315,7 @@ public: SAL_DLLPRIVATE void ExecPrint_Impl(SfxRequest &); SAL_DLLPRIVATE void ExecMisc_Impl(SfxRequest &); SAL_DLLPRIVATE void GetState_Impl(SfxItemSet&); - SAL_DLLPRIVATE void CheckIPClient_Impl(SfxInPlaceClient*, const Rectangle&); + SAL_DLLPRIVATE void CheckIPClient_Impl(SfxInPlaceClient*, const tools::Rectangle&); SAL_DLLPRIVATE void PushSubShells_Impl( bool bPush=true ); SAL_DLLPRIVATE void PopSubShells_Impl() { PushSubShells_Impl( false ); } SAL_DLLPRIVATE void TakeOwnership_Impl(); diff --git a/include/svl/rectitem.hxx b/include/svl/rectitem.hxx index 359b7aa4de41..bbd33b936161 100644 --- a/include/svl/rectitem.hxx +++ b/include/svl/rectitem.hxx @@ -28,12 +28,12 @@ class SvStream; class SVL_DLLPUBLIC SfxRectangleItem: public SfxPoolItem { - Rectangle aVal; + tools::Rectangle aVal; public: static SfxPoolItem* CreateDefault(); SfxRectangleItem(); - SfxRectangleItem( sal_uInt16 nWhich, const Rectangle& rVal ); + SfxRectangleItem( sal_uInt16 nWhich, const tools::Rectangle& rVal ); SfxRectangleItem( const SfxRectangleItem& ); virtual bool GetPresentation( SfxItemPresentation ePres, @@ -47,7 +47,7 @@ public: virtual SfxPoolItem* Create(SvStream &, sal_uInt16 nItemVersion) const override; virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion) const override; - const Rectangle& GetValue() const { return aVal; } + const tools::Rectangle& GetValue() const { return aVal; } virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override; virtual bool PutValue( const css::uno::Any& rVal, diff --git a/include/svtools/accessibleruler.hxx b/include/svtools/accessibleruler.hxx index f4a52304078c..e8ad0d7f4b42 100644 --- a/include/svtools/accessibleruler.hxx +++ b/include/svtools/accessibleruler.hxx @@ -46,7 +46,7 @@ namespace com { namespace sun { namespace star { namespace awt { class XFocusListener; } } } } -class Rectangle; +namespace tools { class Rectangle; } class Ruler; namespace vcl { class Window; } @@ -165,12 +165,12 @@ protected: /// @Return the object's current bounding box relative to the desktop. /// /// @throws css::uno::RuntimeException - Rectangle GetBoundingBoxOnScreen(); + tools::Rectangle GetBoundingBoxOnScreen(); /// @Return the object's current bounding box relative to the parent object. /// /// @throws css::uno::RuntimeException - Rectangle GetBoundingBox(); + tools::Rectangle GetBoundingBox(); virtual void SAL_CALL disposing() override; diff --git a/include/svtools/accessibletable.hxx b/include/svtools/accessibletable.hxx index fd17a67736c8..335379ac3bc1 100644 --- a/include/svtools/accessibletable.hxx +++ b/include/svtools/accessibletable.hxx @@ -71,7 +71,7 @@ public: AccessibleTableControlObjType eObjType ) const= 0; // Window - virtual Rectangle GetWindowExtentsRelative( vcl::Window *pRelativeWindow ) const = 0; + virtual tools::Rectangle GetWindowExtentsRelative( vcl::Window *pRelativeWindow ) const = 0; virtual void GrabFocus()= 0; virtual css::uno::Reference< css::accessibility::XAccessible > GetAccessible()= 0; virtual vcl::Window* GetAccessibleParentWindow() const= 0; @@ -81,11 +81,11 @@ public: virtual long GetRowCount() const= 0; virtual long GetColumnCount() const= 0; virtual bool ConvertPointToCellAddress( sal_Int32& _rnRow, sal_Int32& _rnColPos, const Point& _rPoint )= 0; - virtual Rectangle calcHeaderRect( bool _bIsColumnBar ) = 0; - virtual Rectangle calcHeaderCellRect( bool _bColHeader, sal_Int32 _nPos ) = 0; - virtual Rectangle calcTableRect() = 0; - virtual Rectangle calcCellRect( sal_Int32 _nRowPos, sal_Int32 _nColPos ) = 0; - virtual Rectangle GetFieldCharacterBounds(sal_Int32 _nRow,sal_Int32 _nColumnPos,sal_Int32 nIndex)= 0; + virtual tools::Rectangle calcHeaderRect( bool _bIsColumnBar ) = 0; + virtual tools::Rectangle calcHeaderCellRect( bool _bColHeader, sal_Int32 _nPos ) = 0; + virtual tools::Rectangle calcTableRect() = 0; + virtual tools::Rectangle calcCellRect( sal_Int32 _nRowPos, sal_Int32 _nColPos ) = 0; + virtual tools::Rectangle GetFieldCharacterBounds(sal_Int32 _nRow,sal_Int32 _nColumnPos,sal_Int32 nIndex)= 0; virtual sal_Int32 GetFieldIndexAtPoint(sal_Int32 _nRow,sal_Int32 _nColumnPos,const Point& _rPoint)= 0; virtual void FillAccessibleStateSetForCell( ::utl::AccessibleStateSetHelper& _rStateSet, sal_Int32 _nRow, sal_uInt16 _nColumnPos ) const= 0; virtual OUString GetRowDescription( sal_Int32 _nRow ) const = 0; diff --git a/include/svtools/accessibletableprovider.hxx b/include/svtools/accessibletableprovider.hxx index 805e95aa5c23..d3ca495b3b9a 100644 --- a/include/svtools/accessibletableprovider.hxx +++ b/include/svtools/accessibletableprovider.hxx @@ -87,9 +87,9 @@ public: virtual bool IsCellVisible( sal_Int32 _nRow, sal_uInt16 _nColumnPos ) const = 0; virtual OUString GetAccessibleCellText( long _nRow, sal_uInt16 _nColumnPos ) const = 0; - virtual Rectangle calcHeaderRect( bool _bIsColumnBar, bool _bOnScreen = true ) = 0; - virtual Rectangle calcTableRect( bool _bOnScreen = true ) = 0; - virtual Rectangle GetFieldRectPixelAbs( sal_Int32 _nRow, sal_uInt16 _nColumnPos, bool _bIsHeader, bool _bOnScreen = true ) = 0; + virtual tools::Rectangle calcHeaderRect( bool _bIsColumnBar, bool _bOnScreen = true ) = 0; + virtual tools::Rectangle calcTableRect( bool _bOnScreen = true ) = 0; + virtual tools::Rectangle GetFieldRectPixelAbs( sal_Int32 _nRow, sal_uInt16 _nColumnPos, bool _bIsHeader, bool _bOnScreen = true ) = 0; virtual css::uno::Reference< css::accessibility::XAccessible > CreateAccessibleCell( sal_Int32 _nRow, sal_uInt16 _nColumnPos ) = 0; virtual css::uno::Reference< css::accessibility::XAccessible > CreateAccessibleRowHeader( sal_Int32 _nRow ) = 0; @@ -114,13 +114,13 @@ public: virtual bool GetGlyphBoundRects( const Point& rOrigin, const OUString& rStr, int nIndex, int nLen, MetricVector& rVector ) = 0; // Window - virtual Rectangle GetWindowExtentsRelative( vcl::Window *pRelativeWindow ) const = 0; + virtual tools::Rectangle GetWindowExtentsRelative( vcl::Window *pRelativeWindow ) const = 0; virtual void GrabFocus() = 0; virtual css::uno::Reference< css::accessibility::XAccessible > GetAccessible() = 0; virtual vcl::Window* GetAccessibleParentWindow() const = 0; virtual vcl::Window* GetWindowInstance() = 0; - virtual Rectangle GetFieldCharacterBounds(sal_Int32 _nRow,sal_Int32 _nColumnPos,sal_Int32 nIndex) = 0; + virtual tools::Rectangle GetFieldCharacterBounds(sal_Int32 _nRow,sal_Int32 _nColumnPos,sal_Int32 nIndex) = 0; virtual sal_Int32 GetFieldIndexAtPoint(sal_Int32 _nRow,sal_Int32 _nColumnPos,const Point& _rPoint) = 0; protected: diff --git a/include/svtools/brwbox.hxx b/include/svtools/brwbox.hxx index 33ff5ac24273..58689dab7c81 100644 --- a/include/svtools/brwbox.hxx +++ b/include/svtools/brwbox.hxx @@ -125,7 +125,7 @@ class BrowseEvent { VclPtr<vcl::Window> pWin; long nRow; - Rectangle aRect; + tools::Rectangle aRect; sal_uInt16 nCol; sal_uInt16 nColId; @@ -133,13 +133,13 @@ public: BrowseEvent( vcl::Window* pWindow, long nAbsRow, sal_uInt16 nColumn, sal_uInt16 nColumnId, - const Rectangle& rRect ); + const tools::Rectangle& rRect ); vcl::Window* GetWindow() const { return pWin; } long GetRow() const { return nRow; } sal_uInt16 GetColumn() const { return nCol; } sal_uInt16 GetColumnId() const { return nColId; } - const Rectangle& GetRect() const { return aRect; } + const tools::Rectangle& GetRect() const { return aRect; } }; @@ -149,7 +149,7 @@ public: BrowserMouseEvent( BrowserDataWin* pWin, const MouseEvent& rEvt ); BrowserMouseEvent( vcl::Window* pWin, const MouseEvent& rEvt, long nAbsRow, sal_uInt16 nColumn, sal_uInt16 nColumnId, - const Rectangle& rRect ); + const tools::Rectangle& rRect ); }; @@ -286,7 +286,7 @@ private: SVT_DLLPRIVATE void AutoSizeLastColumn(); SVT_DLLPRIVATE long ImpGetDataRowHeight() const; - SVT_DLLPRIVATE Rectangle ImplFieldRectPixel( long nRow, sal_uInt16 nColId ) const; + SVT_DLLPRIVATE tools::Rectangle ImplFieldRectPixel( long nRow, sal_uInt16 nColId ) const; SVT_DLLPRIVATE sal_uInt16 FrozenColCount() const; SVT_DLLPRIVATE void ColumnInserted( sal_uInt16 nPos ); @@ -302,7 +302,7 @@ private: bool GoToColumnId( sal_uInt16 nColId, bool bMakeVisible, bool bRowColMove = false); void SelectColumnPos( sal_uInt16 nCol, bool _bSelect, bool bMakeVisible); - void ImplPaintData(OutputDevice& _rOut, const Rectangle& _rRect, bool _bForeignDevice, bool _bDrawSelections); + void ImplPaintData(OutputDevice& _rOut, const tools::Rectangle& _rRect, bool _bForeignDevice, bool _bDrawSelections); bool PaintCursorIfHiddenOnce() const { return !m_bFocusOnlyCursor && !HasFocus(); } @@ -336,8 +336,8 @@ protected: */ virtual bool SeekRow( long nRow ) = 0; void DrawCursor(); - void PaintData(vcl::Window& rWin, vcl::RenderContext& rRenderContext, const Rectangle& rRect); - virtual void PaintField(OutputDevice& rDev, const Rectangle& rRect, sal_uInt16 nColumnId) const = 0; + void PaintData(vcl::Window& rWin, vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect); + virtual void PaintField(OutputDevice& rDev, const tools::Rectangle& rRect, sal_uInt16 nColumnId) const = 0; // Advice for the subclass: the visible scope of rows has changed. // The subclass is able to announce changes of the model with the // help of the methods RowInserted and RowRemoved. Because of the @@ -396,7 +396,7 @@ public: virtual void LoseFocus() override; 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 Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, DrawFlags nFlags ) override; virtual void Command( const CommandEvent& rEvt ) override; virtual void StartDrag( sal_Int8 _nAction, const Point& _rPosPixel ) override; @@ -456,7 +456,7 @@ public: // access to dynamic values of cursor row OUString GetColumnTitle( sal_uInt16 nColumnId ) const; - Rectangle GetFieldRect( sal_uInt16 nColumnId ) const; + tools::Rectangle GetFieldRect( sal_uInt16 nColumnId ) const; sal_uLong GetColumnWidth( sal_uInt16 nColumnId ) const; sal_uInt16 GetColumnId( sal_uInt16 nPos ) const; sal_uInt16 GetColumnPos( sal_uInt16 nColumnId ) const; @@ -499,8 +499,8 @@ public: // access to positions of fields, column and rows vcl::Window& GetDataWindow() const; - Rectangle GetRowRectPixel( long nRow ) const; - Rectangle GetFieldRectPixel( long nRow, sal_uInt16 nColId, + tools::Rectangle GetRowRectPixel( long nRow ) const; + tools::Rectangle GetFieldRectPixel( long nRow, sal_uInt16 nColId, bool bRelToBrowser = true) const; bool IsFieldVisible( long nRow, sal_uInt16 nColId, bool bComplete = false ) const; @@ -517,7 +517,7 @@ public: // miscellaneous bool ReserveControlArea(sal_uInt16 nWidth = USHRT_MAX); - Rectangle GetControlArea() const; + tools::Rectangle GetControlArea() const; bool ProcessKey( const KeyEvent& rEvt ); void Dispatch( sal_uInt16 nId ); void SetMode( BrowserMode nMode ); @@ -538,7 +538,7 @@ public: struct BrowserColumnAccess { friend class BrowserColumn; private: BrowserColumnAccess() { } }; /** public version of PaintField, with selected access rights for the BrowserColumn */ - void DoPaintField( OutputDevice& rDev, const Rectangle& rRect, sal_uInt16 nColumnId, BrowserColumnAccess ) const + void DoPaintField( OutputDevice& rDev, const tools::Rectangle& rRect, sal_uInt16 nColumnId, BrowserColumnAccess ) const { PaintField( rDev, rRect, nColumnId ); } /** suggests a default width for a column containing a given text @@ -609,7 +609,7 @@ public: @return the Rectangle */ - virtual Rectangle calcHeaderRect(bool _bIsColumnBar, bool _bOnScreen = true) override; + virtual tools::Rectangle calcHeaderRect(bool _bIsColumnBar, bool _bOnScreen = true) override; /** calculates the Rectangle of the table @param _bOnScreen @@ -617,7 +617,7 @@ public: @return the Rectangle */ - virtual Rectangle calcTableRect(bool _bOnScreen = true) override; + virtual tools::Rectangle calcTableRect(bool _bOnScreen = true) override; /** @param _nRowId @@ -629,7 +629,7 @@ public: @return the Rectangle */ - virtual Rectangle GetFieldRectPixelAbs(sal_Int32 _nRowId, sal_uInt16 _nColId, bool _bIsHeader, bool _bOnScreen = true) override; + virtual tools::Rectangle GetFieldRectPixelAbs(sal_Int32 _nRowId, sal_uInt16 _nColId, bool _bIsHeader, bool _bOnScreen = true) override; /// return <TRUE/> if and only if the accessible object for this instance has been created and is alive bool isAccessibleAlive( ) const; @@ -757,7 +757,7 @@ public: virtual bool IsCellVisible( sal_Int32 _nRow, sal_uInt16 _nColumn ) const override; virtual OUString GetAccessibleCellText(long _nRow, sal_uInt16 _nColPos) const override; virtual bool GetGlyphBoundRects( const Point& rOrigin, const OUString& rStr, int nIndex, int nLen, MetricVector& rVector ) override; - virtual Rectangle GetWindowExtentsRelative( vcl::Window *pRelativeWindow ) const override; + virtual tools::Rectangle GetWindowExtentsRelative( vcl::Window *pRelativeWindow ) const override; virtual void GrabFocus() override; virtual css::uno::Reference< css::accessibility::XAccessible > GetAccessible() override; virtual vcl::Window* GetAccessibleParentWindow() const override; diff --git a/include/svtools/calendar.hxx b/include/svtools/calendar.hxx index 62d3a9d99227..4c190b73c157 100644 --- a/include/svtools/calendar.hxx +++ b/include/svtools/calendar.hxx @@ -159,8 +159,8 @@ private: OUString maDayText; OUString maWeekText; CalendarWrapper maCalendarWrapper; - Rectangle maPrevRect; - Rectangle maNextRect; + tools::Rectangle maPrevRect; + tools::Rectangle maNextRect; OUString maDayOfWeekText; long mnDayOfWeekAry[7]; Date maOldFormatFirstDate; @@ -255,7 +255,7 @@ public: virtual void MouseMove( const MouseEvent& rMEvt ) override; virtual void Tracking( const TrackingEvent& rMEvt ) override; virtual void KeyInput( const KeyEvent& rKEvt ) override; - virtual void Paint( vcl::RenderContext& rRenderContext, const Rectangle& rRect ) override; + virtual void Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect ) override; virtual void Resize() override; virtual void GetFocus() override; virtual void LoseFocus() override; @@ -280,7 +280,7 @@ public: Date GetLastMonth() const; sal_uInt16 GetMonthCount() const; bool GetDate( const Point& rPos, Date& rDate ) const; - Rectangle GetDateRect( const Date& rDate ) const; + tools::Rectangle GetDateRect( const Date& rDate ) const; void StartSelection(); void EndSelection(); diff --git a/include/svtools/editbrowsebox.hxx b/include/svtools/editbrowsebox.hxx index 4bf90f3a4792..e73403b921e1 100644 --- a/include/svtools/editbrowsebox.hxx +++ b/include/svtools/editbrowsebox.hxx @@ -278,7 +278,7 @@ namespace svt class SVT_DLLPUBLIC CheckBoxControl : public Control { VclPtr<CheckBox> pBox; - Rectangle aFocusRect; + tools::Rectangle aFocusRect; Link<VclPtr<CheckBox>,void> m_aClickLink; Link<LinkParamNone*,void> m_aModifyLink; @@ -289,7 +289,7 @@ namespace svt virtual void GetFocus() override; virtual bool PreNotify(NotifyEvent& rEvt) override; - virtual void Paint(vcl::RenderContext& rRenderContext, const Rectangle& rClientRect) override; + virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rClientRect) override; virtual void Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, DrawFlags nFlags ) override; virtual void StateChanged( StateChangedType nStateChange ) override; virtual void DataChanged( const DataChangedEvent& _rEvent ) override; @@ -528,12 +528,12 @@ namespace svt virtual void EndScroll() override; // should be used instead of GetFieldRectPixel, 'cause this method here takes into account the borders - Rectangle GetCellRect(long nRow, sal_uInt16 nColId, bool bRelToBrowser = true) const; + tools::Rectangle GetCellRect(long nRow, sal_uInt16 nColId, bool bRelToBrowser = true) const; virtual sal_uInt32 GetTotalCellWidth(long nRow, sal_uInt16 nColId); sal_uInt32 GetAutoColumnWidth(sal_uInt16 nColId); - virtual void PaintStatusCell(OutputDevice& rDev, const Rectangle& rRect) const; - virtual void PaintCell(OutputDevice& rDev, const Rectangle& rRect, sal_uInt16 nColId) const = 0; + virtual void PaintStatusCell(OutputDevice& rDev, const tools::Rectangle& rRect) const; + virtual void PaintCell(OutputDevice& rDev, const tools::Rectangle& rRect, sal_uInt16 nColId) const = 0; virtual RowStatus GetRowStatus(long nRow) const; @@ -559,7 +559,7 @@ namespace svt virtual CellController* GetController(long nRow, sal_uInt16 nCol); virtual void InitController(CellControllerRef& rController, long nRow, sal_uInt16 nCol); - static void ResizeController(CellControllerRef& rController, const Rectangle&); + static void ResizeController(CellControllerRef& rController, const tools::Rectangle&); virtual void DoubleClick(const BrowserMouseEvent&) override; void ActivateCell() { ActivateCell(GetCurRow(), GetCurColumnId()); } @@ -578,7 +578,7 @@ namespace svt virtual bool IsCursorMoveAllowed(long nNewRow, sal_uInt16 nNewColId) const override; - void PaintTristate(OutputDevice& rDev, const Rectangle& rRect, const TriState& eState, bool _bEnabled=true) const; + void PaintTristate(OutputDevice& rDev, const tools::Rectangle& rRect, const TriState& eState, bool _bEnabled=true) const; void AsynchGetFocus(); // secure starting of StartEditHdl @@ -619,7 +619,7 @@ namespace svt /** Sets focus to current cell of the data table. */ virtual void GrabTableFocus() override; - virtual Rectangle GetFieldCharacterBounds(sal_Int32 _nRow,sal_Int32 _nColumnPos,sal_Int32 nIndex) override; + virtual tools::Rectangle GetFieldCharacterBounds(sal_Int32 _nRow,sal_Int32 _nColumnPos,sal_Int32 nIndex) override; virtual sal_Int32 GetFieldIndexAtPoint(sal_Int32 _nRow,sal_Int32 _nColumnPos,const Point& _rPoint) override; css::uno::Reference< css::accessibility::XAccessible > CreateAccessibleCheckBoxCell(long _nRow, sal_uInt16 _nColumnPos,const TriState& eState); @@ -628,7 +628,7 @@ namespace svt void implCreateActiveAccessible( ); private: - virtual void PaintField(OutputDevice& rDev, const Rectangle& rRect, + virtual void PaintField(OutputDevice& rDev, const tools::Rectangle& rRect, sal_uInt16 nColumnId ) const override; using Control::ImplInitSettings; SVT_DLLPRIVATE void ImplInitSettings( bool bFont, bool bForeground, bool bBackground ); diff --git a/include/svtools/embedhlp.hxx b/include/svtools/embedhlp.hxx index 70d16743e37b..3db446579142 100644 --- a/include/svtools/embedhlp.hxx +++ b/include/svtools/embedhlp.hxx @@ -37,7 +37,7 @@ namespace com { namespace sun { namespace star { namespace embed { class XEmbeddedObject; }}}} -class Rectangle; +namespace tools { class Rectangle; } class OutputDevice; namespace svt { @@ -54,8 +54,8 @@ class SVT_DLLPUBLIC EmbeddedObjectRef EmbeddedObjectRef& operator = ( const EmbeddedObjectRef& ) = delete; public: - static void DrawPaintReplacement( const Rectangle &rRect, const OUString &rText, OutputDevice *pOut ); - static void DrawShading( const Rectangle &rRect, OutputDevice *pOut ); + static void DrawPaintReplacement( const tools::Rectangle &rRect, const OUString &rText, OutputDevice *pOut ); + static void DrawShading( const tools::Rectangle &rRect, OutputDevice *pOut ); static bool TryRunningState( const css::uno::Reference < css::embed::XEmbeddedObject >& ); static void SetGraphicToContainer( const Graphic& rGraphic, comphelper::EmbeddedObjectContainer& aContainer, diff --git a/include/svtools/grfmgr.hxx b/include/svtools/grfmgr.hxx index f85a175a314a..d07a4448531b 100644 --- a/include/svtools/grfmgr.hxx +++ b/include/svtools/grfmgr.hxx @@ -274,7 +274,7 @@ private: bool SVT_DLLPRIVATE ImplDrawTiled( OutputDevice* pOut, - const Rectangle& rArea, + const tools::Rectangle& rArea, const Size& rSizePixel, const Size& rOffset, const GraphicAttr* pAttr, @@ -297,7 +297,7 @@ private: const GraphicAttr& rAttr, const Size& rCropLeftTop, const Size& rCropRightBottom, - const Rectangle& rCropRect, + const tools::Rectangle& rCropRect, const Size& rDstSize, bool bEnlarge ) const; @@ -449,7 +449,7 @@ public: */ void DrawTiled( OutputDevice* pOut, - const Rectangle& rArea, + const tools::Rectangle& rArea, const Size& rSize, const Size& rOffset, GraphicManagerDrawFlags nFlags = GraphicManagerDrawFlags::STANDARD, diff --git a/include/svtools/headbar.hxx b/include/svtools/headbar.hxx index 186a70b68ce8..be4c5af01bb3 100644 --- a/include/svtools/headbar.hxx +++ b/include/svtools/headbar.hxx @@ -251,14 +251,14 @@ private: SVT_DLLPRIVATE void ImplInit( WinBits nWinStyle ); SVT_DLLPRIVATE void ImplInitSettings( bool bFont, bool bForeground, bool bBackground ); SVT_DLLPRIVATE long ImplGetItemPos( sal_uInt16 nPos ) const; - SVT_DLLPRIVATE Rectangle ImplGetItemRect( sal_uInt16 nPos ) const; + SVT_DLLPRIVATE tools::Rectangle ImplGetItemRect( sal_uInt16 nPos ) const; using Window::ImplHitTest; SVT_DLLPRIVATE sal_uInt16 ImplHitTest( const Point& rPos, long& nMouseOff, sal_uInt16& nPos ) const; SVT_DLLPRIVATE void ImplInvertDrag( sal_uInt16 nStartPos, sal_uInt16 nEndPos ); SVT_DLLPRIVATE void ImplDrawItem(vcl::RenderContext& rRenderContext, sal_uInt16 nPos, bool bHigh, - const Rectangle& rItemRect, const Rectangle* pRect, DrawFlags nFlags); + const tools::Rectangle& rItemRect, const tools::Rectangle* pRect, DrawFlags nFlags); SVT_DLLPRIVATE void ImplDrawItem(vcl::RenderContext& rRenderContext, sal_uInt16 nPos, bool bHigh, - const Rectangle* pRect); + const tools::Rectangle* pRect); SVT_DLLPRIVATE void ImplUpdate( sal_uInt16 nPos, bool bEnd = false ); SVT_DLLPRIVATE void ImplStartDrag( const Point& rPos, bool bCommand ); @@ -275,7 +275,7 @@ public: virtual void MouseButtonDown( const MouseEvent& rMEvt ) override; virtual void MouseMove( const MouseEvent& rMEvt ) override; virtual void Tracking( const TrackingEvent& rTEvt ) override; - virtual void Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) override; + virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) override; virtual void Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, DrawFlags nFlags ) override; virtual void Resize() override; virtual void Command( const CommandEvent& rCEvt ) override; @@ -301,7 +301,7 @@ public: sal_uInt16 GetItemPos( sal_uInt16 nItemId ) const; sal_uInt16 GetItemId( sal_uInt16 nPos ) const; sal_uInt16 GetItemId( const Point& rPos ) const; - Rectangle GetItemRect( sal_uInt16 nItemId ) const; + tools::Rectangle GetItemRect( sal_uInt16 nItemId ) const; sal_uInt16 GetCurItemId() const { return mnCurItemId; } long GetDragPos() const { return mnDragPos; } bool IsItemMode() const { return mbItemMode; } diff --git a/include/svtools/iconview.hxx b/include/svtools/iconview.hxx index 28dc92255c02..2865f6c54bc4 100644 --- a/include/svtools/iconview.hxx +++ b/include/svtools/iconview.hxx @@ -30,7 +30,7 @@ public: virtual void Resize() SAL_OVERRIDE; - virtual Rectangle GetFocusRect( SvTreeListEntry*, long nEntryPos ) SAL_OVERRIDE; + virtual tools::Rectangle GetFocusRect( SvTreeListEntry*, long nEntryPos ) SAL_OVERRIDE; void ClearAll(); diff --git a/include/svtools/imap.hxx b/include/svtools/imap.hxx index da68c639b2f0..e54bb3193ccb 100644 --- a/include/svtools/imap.hxx +++ b/include/svtools/imap.hxx @@ -26,7 +26,7 @@ #include <vector> class Point; -class Rectangle; +namespace tools { class Rectangle; } class Size; class Fraction; class IMapObject; diff --git a/include/svtools/imapobj.hxx b/include/svtools/imapobj.hxx index e79e57105812..f5d83ccaeb01 100644 --- a/include/svtools/imapobj.hxx +++ b/include/svtools/imapobj.hxx @@ -25,7 +25,7 @@ #include <rtl/strbuf.hxx> class Point; -class Rectangle; +namespace tools { class Rectangle; } class SvStream; #define IMAP_OBJ_NONE ((sal_uInt16)0x0000) diff --git a/include/svtools/imappoly.hxx b/include/svtools/imappoly.hxx index 42626b5209df..f0b2da8aa7b6 100644 --- a/include/svtools/imappoly.hxx +++ b/include/svtools/imappoly.hxx @@ -29,7 +29,7 @@ class Fraction; class SVT_DLLPUBLIC IMapPolygonObject : public IMapObject { tools::Polygon aPoly; - Rectangle aEllipse; + tools::Rectangle aEllipse; bool bEllipse; SVT_DLLPRIVATE void ImpConstruct( const tools::Polygon& rPoly, bool bPixel ); @@ -57,8 +57,8 @@ public: tools::Polygon GetPolygon( bool bPixelCoords = true ) const; bool HasExtraEllipse() const { return bEllipse; } - const Rectangle& GetExtraEllipse() const { return aEllipse; } - void SetExtraEllipse( const Rectangle& rEllipse ); + const tools::Rectangle& GetExtraEllipse() const { return aEllipse; } + void SetExtraEllipse( const tools::Rectangle& rEllipse ); void Scale( const Fraction& rFractX, const Fraction& rFracY ); diff --git a/include/svtools/imaprect.hxx b/include/svtools/imaprect.hxx index 4aac46946b9b..07c88ae18c0e 100644 --- a/include/svtools/imaprect.hxx +++ b/include/svtools/imaprect.hxx @@ -27,9 +27,9 @@ class Fraction; class SVT_DLLPUBLIC IMapRectangleObject : public IMapObject { - Rectangle aRect; + tools::Rectangle aRect; - SVT_DLLPRIVATE void ImpConstruct( const Rectangle& rRect, bool bPixel ); + SVT_DLLPRIVATE void ImpConstruct( const tools::Rectangle& rRect, bool bPixel ); protected: @@ -40,7 +40,7 @@ protected: public: IMapRectangleObject() {}; - IMapRectangleObject( const Rectangle& rRect, + IMapRectangleObject( const tools::Rectangle& rRect, const OUString& rURL, const OUString& rAltText, const OUString& rDesc, @@ -52,7 +52,7 @@ public: virtual sal_uInt16 GetType() const override; virtual bool IsHit( const Point& rPoint ) const override; - Rectangle GetRectangle( bool bPixelCoords = true ) const; + tools::Rectangle GetRectangle( bool bPixelCoords = true ) const; void Scale( const Fraction& rFractX, const Fraction& rFracY ); diff --git a/include/svtools/ivctrl.hxx b/include/svtools/ivctrl.hxx index c25a3e1622ee..5f9d0f1b4b89 100644 --- a/include/svtools/ivctrl.hxx +++ b/include/svtools/ivctrl.hxx @@ -74,8 +74,8 @@ class SvxIconChoiceCtrlEntry friend class EntryList_Impl; friend class IcnGridMap_Impl; - Rectangle aRect; // Bounding-Rectangle of the entry - Rectangle aGridRect; // Only valid in Grid-mode + tools::Rectangle aRect; // Bounding-Rectangle of the entry + tools::Rectangle aGridRect; // Only valid in Grid-mode sal_Int32 nPos; /* @@ -195,7 +195,7 @@ protected: virtual void KeyInput( const KeyEvent& rKEvt ) 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 MouseButtonDown( const MouseEvent& rMEvt ) override; virtual void MouseButtonUp( const MouseEvent& rMEvt ) override; virtual void MouseMove( const MouseEvent& rMEvt ) override; @@ -278,8 +278,8 @@ public: Point GetPixelPos( const Point& rPosLogic ) const; void SetSelectionMode( SelectionMode eMode ); - Rectangle GetBoundingBox( SvxIconChoiceCtrlEntry* pEntry ) const; - Rectangle GetEntryCharacterBounds( const sal_Int32 _nEntryPos, const sal_Int32 _nCharacterIndex ) const; + tools::Rectangle GetBoundingBox( SvxIconChoiceCtrlEntry* pEntry ) const; + tools::Rectangle GetEntryCharacterBounds( const sal_Int32 _nEntryPos, const sal_Int32 _nCharacterIndex ) const; void SetNoSelection(); diff --git a/include/svtools/ruler.hxx b/include/svtools/ruler.hxx index 72e546ba0ad1..f2611676db40 100644 --- a/include/svtools/ruler.hxx +++ b/include/svtools/ruler.hxx @@ -628,7 +628,7 @@ private: ImplRulerData* mpSaveData; ImplRulerData* mpData; ImplRulerData* mpDragData; - Rectangle maExtraRect; + tools::Rectangle maExtraRect; WinBits mnWinStyle; sal_uInt16 mnUnitIndex; sal_uInt16 mnDragAryPos; @@ -719,7 +719,7 @@ public: virtual void MouseButtonDown( const MouseEvent& rMEvt ) override; virtual void MouseMove( const MouseEvent& rMEvt ) override; virtual void Tracking( const TrackingEvent& rTEvt ) override; - virtual void Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) override; + virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) override; virtual void Resize() override; virtual void StateChanged( StateChangedType nStateChange ) override; virtual void DataChanged( const DataChangedEvent& rDCEvt ) override; @@ -740,7 +740,7 @@ public: long GetPageOffset() const; void SetBorderPos( long nOff = 0 ); long GetBorderOffset() const { return mnBorderOff; } - const Rectangle& GetExtraRect() const { return maExtraRect; } + const tools::Rectangle& GetExtraRect() const { return maExtraRect; } void SetUnit( FieldUnit eNewUnit ); FieldUnit GetUnit() const { return meUnit; } diff --git a/include/svtools/simptabl.hxx b/include/svtools/simptabl.hxx index a7a7ac7c7172..af146bd70c71 100644 --- a/include/svtools/simptabl.hxx +++ b/include/svtools/simptabl.hxx @@ -77,7 +77,7 @@ protected: virtual void NotifyScrolled() override; virtual void SetTabs() override; - virtual void Paint( vcl::RenderContext& rRenderContext, const Rectangle& rRect ) override; + virtual void Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect ) override; virtual void HBarClick(); void HBarDrag(); diff --git a/include/svtools/statusbarcontroller.hxx b/include/svtools/statusbarcontroller.hxx index c9f403fd7265..8a2d74cfa129 100644 --- a/include/svtools/statusbarcontroller.hxx +++ b/include/svtools/statusbarcontroller.hxx @@ -53,7 +53,7 @@ class SVT_DLLPUBLIC StatusbarController : css::uno::Reference< css::frame::XFrame > getFrameInterface() const; css::uno::Reference< css::util::XURLTransformer > getURLTransformer() const; - ::Rectangle getControlRect() const; + ::tools::Rectangle getControlRect() const; // XInterface virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type& aType ) override; diff --git a/include/svtools/svtabbx.hxx b/include/svtools/svtabbx.hxx index a824ebd8ba82..23efa2956a09 100644 --- a/include/svtools/svtabbx.hxx +++ b/include/svtools/svtabbx.hxx @@ -141,7 +141,7 @@ public: virtual ~SvHeaderTabListBox() override; virtual void dispose() override; - virtual void Paint( vcl::RenderContext& rRenderContext, const Rectangle& ) override; + virtual void Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& ) override; void InitHeaderBar( HeaderBar* pHeaderBar ); static bool IsItemChecked( SvTreeListEntry* pEntry, sal_uInt16 nCol ); @@ -204,9 +204,9 @@ public: virtual bool IsCellVisible( sal_Int32 _nRow, sal_uInt16 _nColumn ) const override; virtual OUString GetAccessibleCellText( long _nRow, sal_uInt16 _nColumnPos ) const override; - virtual Rectangle calcHeaderRect( bool _bIsColumnBar, bool _bOnScreen = true ) override; - virtual Rectangle calcTableRect( bool _bOnScreen = true ) override; - virtual Rectangle GetFieldRectPixelAbs( sal_Int32 _nRow, sal_uInt16 _nColumn, bool _bIsHeader, bool _bOnScreen = true ) override; + virtual tools::Rectangle calcHeaderRect( bool _bIsColumnBar, bool _bOnScreen = true ) override; + virtual tools::Rectangle calcTableRect( bool _bOnScreen = true ) override; + virtual tools::Rectangle GetFieldRectPixelAbs( sal_Int32 _nRow, sal_uInt16 _nColumn, bool _bIsHeader, bool _bOnScreen = true ) override; virtual css::uno::Reference< css::accessibility::XAccessible > CreateAccessibleCell( sal_Int32 _nRow, sal_uInt16 _nColumn ) override; virtual css::uno::Reference< css::accessibility::XAccessible > CreateAccessibleRowHeader( sal_Int32 _nRow ) override; @@ -232,7 +232,7 @@ public: virtual bool GetGlyphBoundRects( const Point& rOrigin, const OUString& rStr, int nIndex, int nLen, MetricVector& rVector ) override; // Window - virtual Rectangle GetWindowExtentsRelative( vcl::Window *pRelativeWindow ) const override; + virtual tools::Rectangle GetWindowExtentsRelative( vcl::Window *pRelativeWindow ) const override; virtual void GrabFocus() override; virtual css::uno::Reference< css::accessibility::XAccessible > GetAccessible() override; virtual vcl::Window* GetAccessibleParentWindow() const override; @@ -240,7 +240,7 @@ public: /** Creates and returns the accessible object of the whole BrowseBox. */ virtual css::uno::Reference< css::accessibility::XAccessible > CreateAccessible() override; - virtual Rectangle GetFieldCharacterBounds(sal_Int32 _nRow,sal_Int32 _nColumnPos,sal_Int32 nIndex) override; + virtual tools::Rectangle GetFieldCharacterBounds(sal_Int32 _nRow,sal_Int32 _nColumnPos,sal_Int32 nIndex) override; virtual sal_Int32 GetFieldIndexAtPoint(sal_Int32 _nRow,sal_Int32 _nColumnPos,const Point& _rPoint) override; }; diff --git a/include/svtools/tabbar.hxx b/include/svtools/tabbar.hxx index 2b983036b00a..8019e38996c1 100644 --- a/include/svtools/tabbar.hxx +++ b/include/svtools/tabbar.hxx @@ -373,7 +373,7 @@ public: virtual void MouseMove( const MouseEvent& rMEvt ) override; virtual void MouseButtonDown( const MouseEvent& rMEvt ) override; virtual void MouseButtonUp( const MouseEvent& rMEvt ) override; - virtual void Paint( vcl::RenderContext& rRenderContext, const Rectangle& rRect ) override; + virtual void Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect ) override; virtual void Resize() override; virtual void RequestHelp( const HelpEvent& rHEvt ) override; virtual void StateChanged( StateChangedType nStateChange ) override; @@ -410,9 +410,9 @@ public: sal_uInt16 GetPageId( sal_uInt16 nPos ) const; sal_uInt16 GetPagePos( sal_uInt16 nPageId ) const; sal_uInt16 GetPageId( const Point& rPos ) const; - Rectangle GetPageRect( sal_uInt16 nPageId ) const; + tools::Rectangle GetPageRect( sal_uInt16 nPageId ) const; // returns the rectangle in which page tabs are drawn - Rectangle GetPageArea() const; + tools::Rectangle GetPageArea() const; void SetCurPageId( sal_uInt16 nPageId ); sal_uInt16 GetCurPageId() const { return mnCurPageId; } diff --git a/include/svtools/table/tablerenderer.hxx b/include/svtools/table/tablerenderer.hxx index eb3f47858794..9d7ebd95d808 100644 --- a/include/svtools/table/tablerenderer.hxx +++ b/include/svtools/table/tablerenderer.hxx @@ -84,7 +84,7 @@ namespace svt { namespace table the style to be used for drawing */ virtual void PaintHeaderArea( - OutputDevice& _rDevice, const Rectangle& _rArea, + OutputDevice& _rDevice, const tools::Rectangle& _rArea, bool _bIsColHeaderArea, bool _bIsRowHeaderArea, const StyleSettings& _rStyle ) = 0; @@ -106,7 +106,7 @@ namespace svt { namespace table the style to be used for drawing */ virtual void PaintColumnHeader( ColPos _nCol, bool _bActive, bool _bSelected, - OutputDevice& _rDevice, const Rectangle& _rArea, + OutputDevice& _rDevice, const tools::Rectangle& _rArea, const StyleSettings& _rStyle ) = 0; /** prepares a row for painting @@ -141,7 +141,7 @@ namespace svt { namespace table the style to be used for drawing */ virtual void PrepareRow( RowPos _nRow, bool i_hasControlFocus, bool _bSelected, - OutputDevice& _rDevice, const Rectangle& _rRowArea, + OutputDevice& _rDevice, const tools::Rectangle& _rRowArea, const StyleSettings& _rStyle ) = 0; /** paints the header of a row @@ -170,7 +170,7 @@ namespace svt { namespace table the style to be used for drawing */ virtual void PaintRowHeader( bool i_hasControlFocus, bool _bSelected, - OutputDevice& _rDevice, Rectangle const & _rArea, + OutputDevice& _rDevice, tools::Rectangle const & _rArea, StyleSettings const & _rStyle ) = 0; /** paints a certain cell @@ -201,7 +201,7 @@ namespace svt { namespace table */ virtual void PaintCell( ColPos const i_col, bool i_hasControlFocus, bool _bSelected, - OutputDevice& _rDevice, const Rectangle& _rArea, + OutputDevice& _rDevice, const tools::Rectangle& _rArea, const StyleSettings& _rStyle ) = 0; /** draws a cell cursor in the given rectangle @@ -209,14 +209,14 @@ namespace svt { namespace table The cell cursor is used to indicate the active/current cell of a table control. */ - virtual void ShowCellCursor( vcl::Window& _rView, const Rectangle& _rCursorRect) = 0; + virtual void ShowCellCursor( vcl::Window& _rView, const tools::Rectangle& _rCursorRect) = 0; /** hides the cell cursor previously drawn into the given rectangle The cell cursor is used to indicate the active/current cell of a table control. */ - virtual void HideCellCursor( vcl::Window& _rView, const Rectangle& _rCursorRect) = 0; + virtual void HideCellCursor( vcl::Window& _rView, const tools::Rectangle& _rCursorRect) = 0; /** checks whether a given cell content fits into a given target area on a given device. @@ -232,7 +232,7 @@ namespace svt { namespace table */ virtual bool FitsIntoCell( css::uno::Any const & i_cellContent, - OutputDevice& i_targetDevice, Rectangle const & i_targetArea + OutputDevice& i_targetDevice, tools::Rectangle const & i_targetArea ) const = 0; /** attempts to format the content of the given cell as string diff --git a/include/svtools/toolbarmenu.hxx b/include/svtools/toolbarmenu.hxx index 94aba0966a1c..317b65c37932 100644 --- a/include/svtools/toolbarmenu.hxx +++ b/include/svtools/toolbarmenu.hxx @@ -84,7 +84,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 GetFocus() override; virtual void LoseFocus() override; diff --git a/include/svtools/treelistbox.hxx b/include/svtools/treelistbox.hxx index 97e0ce929a68..bb3ff359b1f1 100644 --- a/include/svtools/treelistbox.hxx +++ b/include/svtools/treelistbox.hxx @@ -301,7 +301,7 @@ protected: // In-place editing SvInplaceEdit2* pEdCtrl; - void EditText( const OUString&, const Rectangle&,const Selection&); + void EditText( const OUString&, const tools::Rectangle&,const Selection&); void CancelTextEditing(); bool EditingCanceled() const; @@ -508,7 +508,7 @@ public: @param pEntry The entry. @return The bounding rectangle of an entry. */ - Rectangle GetBoundingRect( SvTreeListEntry* pEntry ); + tools::Rectangle GetBoundingRect( SvTreeListEntry* pEntry ); /** Enables, that one cell of a tablistbox entry can be focused */ void EnableCellFocus(); @@ -665,7 +665,7 @@ public: virtual bool EditingEntry( SvTreeListEntry* pEntry, Selection& ); virtual bool EditedEntry( SvTreeListEntry* pEntry, const OUString& rNewText ); - virtual void Paint( vcl::RenderContext& rRenderContext, const Rectangle& rRect ) override; + virtual void Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect ) override; virtual void MouseButtonDown( const MouseEvent& rMEvt ) override; virtual void MouseButtonUp( const MouseEvent& rMEvt ) override; virtual void MouseMove( const MouseEvent& rMEvt ) override; @@ -715,7 +715,7 @@ public: SvTreeListEntry* GetEntry( const Point& rPos, bool bHit = false ) const; - virtual Rectangle GetFocusRect( SvTreeListEntry*, long nLine ); + virtual tools::Rectangle GetFocusRect( SvTreeListEntry*, long nLine ); // Respects indentation virtual sal_IntPtr GetTabPos( SvTreeListEntry*, SvLBoxTab* ); void InvalidateEntry( SvTreeListEntry* ); @@ -736,7 +736,7 @@ public: using Window::Invalidate; virtual void Invalidate( InvalidateFlags nFlags = InvalidateFlags::NONE) override; - virtual void Invalidate( const Rectangle&, InvalidateFlags nFlags = InvalidateFlags::NONE ) override; + virtual void Invalidate( const tools::Rectangle&, InvalidateFlags nFlags = InvalidateFlags::NONE ) override; void SetHighlightRange(sal_uInt16 nFirstTab=0, sal_uInt16 nLastTab=0xffff); diff --git a/include/svtools/valueset.hxx b/include/svtools/valueset.hxx index 061816e84bb9..e470be598bfd 100644 --- a/include/svtools/valueset.hxx +++ b/include/svtools/valueset.hxx @@ -201,8 +201,8 @@ private: ValueItemList mItemList; std::unique_ptr<ValueSetItem> mpNoneItem; VclPtr<ScrollBar> mxScrollBar; - Rectangle maNoneItemRect; - Rectangle maItemListRect; + tools::Rectangle maNoneItemRect; + tools::Rectangle maItemListRect; long mnItemWidth; long mnItemHeight; long mnTextOffset; @@ -247,7 +247,7 @@ private: SVT_DLLPRIVATE void ImplInitScrollBar(); SVT_DLLPRIVATE void ImplDeleteItems(); - SVT_DLLPRIVATE void ImplFormatItem(vcl::RenderContext& rRenderContext, ValueSetItem* pItem, Rectangle aRect); + SVT_DLLPRIVATE void ImplFormatItem(vcl::RenderContext& rRenderContext, ValueSetItem* pItem, tools::Rectangle aRect); SVT_DLLPRIVATE void ImplDrawItemText(vcl::RenderContext& rRenderContext, const OUString& rStr); SVT_DLLPRIVATE void ImplDrawSelect(vcl::RenderContext& rRenderContext, sal_uInt16 nItemId, const bool bFocus, const bool bDrawSel); SVT_DLLPRIVATE void ImplDrawSelect(vcl::RenderContext& rRenderContext); @@ -261,7 +261,7 @@ private: SVT_DLLPRIVATE ValueSetItem* ImplGetFirstItem(); SVT_DLLPRIVATE sal_uInt16 ImplGetVisibleItemCount() const; SVT_DLLPRIVATE void ImplInsertItem( ValueSetItem *const pItem, const size_t nPos ); - SVT_DLLPRIVATE Rectangle ImplGetItemRect( size_t nPos ) const; + SVT_DLLPRIVATE tools::Rectangle ImplGetItemRect( size_t nPos ) const; SVT_DLLPRIVATE void ImplFireAccessibleEvent( short nEventId, const css::uno::Any& rOldValue, const css::uno::Any& rNewValue ); SVT_DLLPRIVATE bool ImplHasAccessibleListeners(); SVT_DLLPRIVATE void ImplTracking( const Point& rPos, bool bRepeat ); @@ -288,7 +288,7 @@ public: virtual void Tracking( const TrackingEvent& rMEvt ) override; virtual void KeyInput( const KeyEvent& rKEvt ) 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 GetFocus() override; virtual void LoseFocus() override; virtual void Resize() override; @@ -320,7 +320,7 @@ public: size_t GetItemPos( sal_uInt16 nItemId ) const; sal_uInt16 GetItemId( size_t nPos ) const; sal_uInt16 GetItemId( const Point& rPos ) const; - Rectangle GetItemRect( sal_uInt16 nItemId ) const; + tools::Rectangle GetItemRect( sal_uInt16 nItemId ) const; void EnableFullItemMode( bool bFullMode ); void SetColCount( sal_uInt16 nNewCols = 1 ); diff --git a/include/svtools/viewdataentry.hxx b/include/svtools/viewdataentry.hxx index 8226cfbb101d..1a61b3f6c13a 100644 --- a/include/svtools/viewdataentry.hxx +++ b/include/svtools/viewdataentry.hxx @@ -51,7 +51,7 @@ class SVT_DLLPUBLIC SvViewDataEntry bool mbExpanded:1; bool mbFocused:1; bool mbSelectable:1; - Rectangle maPaintRectangle; + tools::Rectangle maPaintRectangle; public: SvViewDataEntry(); @@ -74,8 +74,8 @@ public: const SvViewDataItem& GetItem(size_t nPos) const; SvViewDataItem& GetItem(size_t nPos); - void SetPaintRectangle(Rectangle aRectangle); - const Rectangle& GetPaintRectangle() const; + void SetPaintRectangle(tools::Rectangle aRectangle); + const tools::Rectangle& GetPaintRectangle() const; }; diff --git a/include/svx/CommonStylePreviewRenderer.hxx b/include/svx/CommonStylePreviewRenderer.hxx index fe30c2277eb3..717ccb2cc785 100644 --- a/include/svx/CommonStylePreviewRenderer.hxx +++ b/include/svx/CommonStylePreviewRenderer.hxx @@ -41,7 +41,7 @@ public: virtual bool recalculate() override; virtual Size getRenderSize() override; - virtual bool render(const Rectangle& aRectangle, RenderAlign eRenderAlign = RenderAlign::CENTER) override; + virtual bool render(const tools::Rectangle& aRectangle, RenderAlign eRenderAlign = RenderAlign::CENTER) override; }; } // end namespace svx diff --git a/include/svx/EnhancedCustomShape2d.hxx b/include/svx/EnhancedCustomShape2d.hxx index e0db73fdc36b..87b21855aaf7 100644 --- a/include/svx/EnhancedCustomShape2d.hxx +++ b/include/svx/EnhancedCustomShape2d.hxx @@ -81,7 +81,7 @@ class SVX_DLLPUBLIC EnhancedCustomShape2d : public SfxItemSet sal_Int32 nCoordHeightG; sal_Int32 nCoordWidth; sal_Int32 nCoordHeight; - Rectangle aLogicRect; + tools::Rectangle aLogicRect; double fXScale; double fYScale; @@ -178,8 +178,8 @@ class SVX_DLLPUBLIC EnhancedCustomShape2d : public SfxItemSet SdrObject* CreateLineGeometry(); SdrObject* CreateObject( bool bLineGeometryNeededOnly ); void ApplyGluePoints( SdrObject* pObj ); - Rectangle GetTextRect() const; - const Rectangle& GetLogicRect() const { return aLogicRect; } + tools::Rectangle GetTextRect() const; + const tools::Rectangle& GetLogicRect() const { return aLogicRect; } sal_uInt32 GetHdlCount() const; bool GetHandlePosition( const sal_uInt32 nIndex, Point& rReturnPosition ) const; diff --git a/include/svx/IAccessibleViewForwarder.hxx b/include/svx/IAccessibleViewForwarder.hxx index 35d1fd77ad7f..eb89854fe1fe 100644 --- a/include/svx/IAccessibleViewForwarder.hxx +++ b/include/svx/IAccessibleViewForwarder.hxx @@ -61,7 +61,7 @@ public: are, contrary to the base class, in internal coordinates of 100th of mm. */ - virtual Rectangle GetVisibleArea() const = 0; + virtual tools::Rectangle GetVisibleArea() const = 0; /** Transform the specified point from internal coordinates in 100th of mm to an absolute screen position. diff --git a/include/svx/charmap.hxx b/include/svx/charmap.hxx index ca48018229f4..ade653b697be 100644 --- a/include/svx/charmap.hxx +++ b/include/svx/charmap.hxx @@ -93,7 +93,7 @@ public: virtual FactoryFunction GetUITestFactory() const override; protected: - 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 MouseButtonUp( const MouseEvent& rMEvt ) override; virtual void MouseMove( const MouseEvent& rMEvt ) override; @@ -139,7 +139,7 @@ private: DECL_LINK(VscrollHdl, ScrollBar*, void); void init(); - Rectangle getGridRectangle(const Point &rPointUL, const Size &rOutputSize); + tools::Rectangle getGridRectangle(const Point &rPointUL, const Size &rOutputSize); }; #endif diff --git a/include/svx/compressgraphicdialog.hxx b/include/svx/compressgraphicdialog.hxx index 4499b190777d..d36e71a54a77 100644 --- a/include/svx/compressgraphicdialog.hxx +++ b/include/svx/compressgraphicdialog.hxx @@ -69,7 +69,7 @@ private: SdrGrafObj* m_pGraphicObj; Graphic m_aGraphic; Size m_aViewSize100mm; - Rectangle m_aCropRectangle; + tools::Rectangle m_aCropRectangle; SfxBindings& m_rBindings; double m_dResolution; @@ -102,14 +102,14 @@ private: public: CompressGraphicsDialog( vcl::Window* pParent, SdrGrafObj* pGraphicObj, SfxBindings& rBindings ); - CompressGraphicsDialog( vcl::Window* pParent, Graphic& rGraphic, Size rViewSize100mm, Rectangle& rCropRectangle, SfxBindings& rBindings ); + CompressGraphicsDialog( vcl::Window* pParent, Graphic& rGraphic, Size rViewSize100mm, tools::Rectangle& rCropRectangle, SfxBindings& rBindings ); virtual ~CompressGraphicsDialog() override; virtual void dispose() override; SdrGrafObj* GetCompressedSdrGrafObj(); Graphic GetCompressedGraphic(); - Rectangle GetScaledCropRectangle(); + tools::Rectangle GetScaledCropRectangle(); }; #endif diff --git a/include/svx/connctrl.hxx b/include/svx/connctrl.hxx index b3b1b54da9f1..360ff38522da 100644 --- a/include/svx/connctrl.hxx +++ b/include/svx/connctrl.hxx @@ -55,7 +55,7 @@ public: virtual ~SvxXConnectionPreview() override; virtual void dispose() override; - virtual void Paint( vcl::RenderContext& rRenderContext, const Rectangle& rRect ) override; + virtual void Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect ) override; virtual void Resize() override; virtual Size GetOptimalSize() const override; virtual void MouseButtonDown( const MouseEvent& rMEvt ) override; diff --git a/include/svx/contdlg.hxx b/include/svx/contdlg.hxx index 15cc8a9ca895..2664a656f002 100644 --- a/include/svx/contdlg.hxx +++ b/include/svx/contdlg.hxx @@ -80,7 +80,7 @@ public: const tools::PolyPolygon* pPolyPoly, void* pEditingObj ); static tools::PolyPolygon CreateAutoContour( const Graphic& rGraphic, - const Rectangle* pRect = nullptr, + const tools::Rectangle* pRect = nullptr, const sal_uIntPtr nFlags = 0L ); }; diff --git a/include/svx/dialcontrol.hxx b/include/svx/dialcontrol.hxx index 90815338d57d..c12f3c97652b 100644 --- a/include/svx/dialcontrol.hxx +++ b/include/svx/dialcontrol.hxx @@ -43,7 +43,7 @@ public: void DrawElements( const OUString& rText, sal_Int32 nAngle ); protected: - Rectangle maRect; + tools::Rectangle maRect; bool mbEnabled; private: @@ -79,7 +79,7 @@ class SAL_WARN_UNUSED SVX_DLLPUBLIC DialControl : public Control public: explicit DialControl( vcl::Window* pParent, WinBits nBits ); - 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 void DataChanged( const DataChangedEvent& rDCEvt ) override; diff --git a/include/svx/dlgctl3d.hxx b/include/svx/dlgctl3d.hxx index 056056db8d86..57edb8a46fe9 100644 --- a/include/svx/dlgctl3d.hxx +++ b/include/svx/dlgctl3d.hxx @@ -52,7 +52,7 @@ public: virtual ~Svx3DPreviewControl() override; virtual void dispose() override; - virtual void Paint( vcl::RenderContext& rRenderContext, const Rectangle& rRect ) override; + virtual void Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect ) override; virtual void MouseButtonDown( const MouseEvent& rMEvt ) override; virtual void Resize() override; virtual Size GetOptimalSize() const override; @@ -100,7 +100,7 @@ class SAL_WARN_UNUSED SVX_DLLPUBLIC Svx3DLightControl : public Svx3DPreviewContr public: Svx3DLightControl(vcl::Window* pParent, WinBits nStyle); - virtual void Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) override; + virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) override; virtual void MouseButtonDown(const MouseEvent& rMEvt) override; virtual void Tracking( const TrackingEvent& rTEvt ) override; virtual void Resize() override; diff --git a/include/svx/dlgctrl.hxx b/include/svx/dlgctrl.hxx index 98e7ecac0673..2cb800216f39 100644 --- a/include/svx/dlgctrl.hxx +++ b/include/svx/dlgctrl.hxx @@ -113,7 +113,7 @@ public: virtual ~SvxRectCtl() override; virtual void dispose() override; - virtual void Paint( vcl::RenderContext& rRenderContext, const Rectangle& rRect ) override; + virtual void Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect ) override; virtual void MouseButtonDown( const MouseEvent& rMEvt ) override; virtual void KeyInput( const KeyEvent& rKeyEvt ) override; virtual void StateChanged( StateChangedType nStateChange ) override; @@ -129,8 +129,8 @@ public: static const sal_uInt8 NO_CHILDREN = 9; // returns number of usable radio buttons - Rectangle CalculateFocusRectangle() const; - Rectangle CalculateFocusRectangle( RectPoint eRectPoint ) const; + tools::Rectangle CalculateFocusRectangle() const; + tools::Rectangle CalculateFocusRectangle( RectPoint eRectPoint ) const; virtual css::uno::Reference< css::accessibility::XAccessible > CreateAccessible() override; @@ -161,7 +161,7 @@ protected: Point aFocusPosition; rtl::Reference<SvxPixelCtlAccessible> m_xAccess; - Rectangle implCalFocusRect( const Point& aPosition ); + tools::Rectangle implCalFocusRect( const Point& aPosition ); void ChangePixel( sal_uInt16 nPixel ); public: @@ -170,7 +170,7 @@ public: virtual ~SvxPixelCtl() override; virtual void dispose() override; - virtual void Paint( vcl::RenderContext& rRenderContext, const Rectangle& rRect ) override; + virtual void Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect ) override; virtual void MouseButtonDown( const MouseEvent& rMEvt ) override; virtual void Resize() override; virtual Size GetOptimalSize() const override; @@ -357,7 +357,7 @@ public: void SetSymbol( Graphic* p, const Size& s ); void ResizeSymbol( const Size& s ); - 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 Size GetOptimalSize() const override; }; @@ -380,7 +380,7 @@ public: void SetAttributes(const SfxItemSet& rItemSet); - 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; }; @@ -408,7 +408,7 @@ public: void SetShadowAttributes(const SfxItemSet& rItemSet); void SetShadowPosition(const Point& rPos); - virtual void Paint( vcl::RenderContext& rRenderContext, const Rectangle& rRect ) override; + virtual void Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect ) override; }; #endif // INCLUDED_SVX_DLGCTRL_HXX diff --git a/include/svx/fntctrl.hxx b/include/svx/fntctrl.hxx index 758f1eb6bddc..e753970341af 100644 --- a/include/svx/fntctrl.hxx +++ b/include/svx/fntctrl.hxx @@ -62,7 +62,7 @@ public: void ResetColor(); void SetBackColor( const Color& rColor ); void UseResourceText(); - void Paint( vcl::RenderContext& rRenderContext, const Rectangle& ) override; + void Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& ) override; bool IsTwoLines() const; void SetTwoLines(bool bSet); diff --git a/include/svx/framelink.hxx b/include/svx/framelink.hxx index eacf64633d73..20ef1dbc6dcc 100644 --- a/include/svx/framelink.hxx +++ b/include/svx/framelink.hxx @@ -30,7 +30,7 @@ #include <drawinglayer/primitive2d/baseprimitive2d.hxx> class Point; -class Rectangle; +namespace tools { class Rectangle; } class OutputDevice; namespace svx { @@ -218,7 +218,7 @@ SVX_DLLPUBLIC double GetHorDiagAngle( long nWidth, long nHeight ); The returned values represents the inner angle between the diagonals and horizontal borders, and is therefore in the range [0,PI/2] (inclusive). */ -inline double GetHorDiagAngle( const Rectangle& rRect ) +inline double GetHorDiagAngle( const tools::Rectangle& rRect ) { return GetHorDiagAngle( rRect.GetWidth(), rRect.GetHeight() ); } @@ -236,7 +236,7 @@ inline double GetVerDiagAngle( long nWidth, long nHeight ) The returned values represents the inner angle between the diagonals and vertical borders, and is therefore in the range [0,PI/2] (inclusive). */ -inline double GetVerDiagAngle( const Rectangle& rRect ) +inline double GetVerDiagAngle( const tools::Rectangle& rRect ) { return GetVerDiagAngle( rRect.GetWidth(), rRect.GetHeight() ); } @@ -471,7 +471,7 @@ SVX_DLLPUBLIC drawinglayer::primitive2d::Primitive2DContainer CreateBorderPrimit SVX_DLLPUBLIC drawinglayer::primitive2d::Primitive2DContainer CreateClippedBorderPrimitives ( const Point& rStart, const Point& rEnd, const Style& rBorder, - const Rectangle& rClipRect ); + const tools::Rectangle& rClipRect ); /** Draws a horizontal frame border, regards all connected frame styles. @@ -610,7 +610,7 @@ SVX_DLLPUBLIC void DrawVerFrameBorder( SVX_DLLPUBLIC void DrawDiagFrameBorders( OutputDevice& rDev, /// The output device used to draw the frame border. - const Rectangle& rRect, /// Rectangle for both diagonal frame borders. + const tools::Rectangle& rRect, /// Rectangle for both diagonal frame borders. const Style& rTLBR, /// Style of the processed top-left to bottom-right diagonal frame border. const Style& rBLTR, /// Style of the processed bottom-left to top-right diagonal frame border. diff --git a/include/svx/framelinkarray.hxx b/include/svx/framelinkarray.hxx index d48fbf8c98c0..a899caa7ee40 100644 --- a/include/svx/framelinkarray.hxx +++ b/include/svx/framelinkarray.hxx @@ -247,7 +247,7 @@ public: void SetClipRange( size_t nFirstCol, size_t nFirstRow, size_t nLastCol, size_t nLastRow ); /** Returns the rectangle (output coordinates) of the current clipping range. */ - Rectangle GetClipRangeRectangle() const; + tools::Rectangle GetClipRangeRectangle() const; // cell coordinates ------------------------------------------------------- @@ -301,7 +301,7 @@ public: /** Returns the output rectangle of the cell (nCol,nRow). Returns total output rectangle of merged ranges. */ - Rectangle GetCellRect( size_t nCol, size_t nRow ) const; + tools::Rectangle GetCellRect( size_t nCol, size_t nRow ) const; // diagonal frame borders ------------------------------------------------- diff --git a/include/svx/frmsel.hxx b/include/svx/frmsel.hxx index 3221512f8c44..c91241b69653 100644 --- a/include/svx/frmsel.hxx +++ b/include/svx/frmsel.hxx @@ -171,11 +171,11 @@ public: /** Returns true, if the passed point is inside the click area of any enabled frame border. */ bool ContainsClickPoint( const Point& rPos ) const; /** Returns the bounding rectangle of the specified frame border (if enabled). */ - Rectangle GetClickBoundRect( FrameBorderType eBorder ) const; + tools::Rectangle GetClickBoundRect( FrameBorderType eBorder ) const; protected: - virtual void Paint( vcl::RenderContext& rRenderContext, const Rectangle& rRect ) override; + virtual void Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect ) override; virtual void MouseButtonDown( const MouseEvent& rMEvt ) override; virtual void KeyInput( const KeyEvent& rKEvt ) override; virtual void GetFocus() override; diff --git a/include/svx/galctrl.hxx b/include/svx/galctrl.hxx index 63e8a8932e91..6c1091c420c7 100644 --- a/include/svx/galctrl.hxx +++ b/include/svx/galctrl.hxx @@ -45,14 +45,14 @@ class SVX_DLLPUBLIC GalleryPreview : public vcl::Window, public DropTargetHelper private: GraphicObject aGraphicObj; - Rectangle aPreviewRect; + tools::Rectangle aPreviewRect; GalleryTheme* mpTheme; - SVX_DLLPRIVATE bool ImplGetGraphicCenterRect( const Graphic& rGraphic, Rectangle& rResultRect ) const; + SVX_DLLPRIVATE bool ImplGetGraphicCenterRect( const Graphic& rGraphic, tools::Rectangle& rResultRect ) const; SVX_DLLPRIVATE void InitSettings(); // Window - SVX_DLLPRIVATE virtual void Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) override; + SVX_DLLPRIVATE virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) override; SVX_DLLPRIVATE virtual Size GetOptimalSize() const override; SVX_DLLPRIVATE virtual void MouseButtonDown(const MouseEvent& rMEvt) override; SVX_DLLPRIVATE virtual void Command(const CommandEvent& rCEvt) override; @@ -124,7 +124,7 @@ private: // BrowseBox virtual bool SeekRow( long nRow ) override; - virtual void PaintField( OutputDevice& rDev, const Rectangle& rRect, sal_uInt16 nColumnId ) const override; + virtual void PaintField( OutputDevice& rDev, const tools::Rectangle& rRect, sal_uInt16 nColumnId ) const override; virtual void DoubleClick( const BrowserMouseEvent& rEvt ) override; virtual void Select() override; virtual sal_Int8 AcceptDrop( const BrowserAcceptDropEvent& rEvt ) override; @@ -155,7 +155,7 @@ public: virtual OUString GetCellText(long _nRow, sal_uInt16 _nColId) const override; // from IAccessibleTableProvider - virtual Rectangle GetFieldCharacterBounds(sal_Int32 _nRow,sal_Int32 _nColumnPos,sal_Int32 nIndex) override; + virtual tools::Rectangle GetFieldCharacterBounds(sal_Int32 _nRow,sal_Int32 _nColumnPos,sal_Int32 nIndex) override; virtual sal_Int32 GetFieldIndexAtPoint(sal_Int32 _nRow,sal_Int32 _nColumnPos,const Point& _rPoint) override; }; diff --git a/include/svx/graphctl.hxx b/include/svx/graphctl.hxx index 1cf1c9cb419e..ff89fd40b468 100644 --- a/include/svx/graphctl.hxx +++ b/include/svx/graphctl.hxx @@ -63,7 +63,7 @@ protected: SdrModel* pModel; SdrView* pView; - 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 KeyInput(const KeyEvent& rKEvt) override; virtual void MouseButtonDown(const MouseEvent& rMEvt) override; @@ -125,7 +125,7 @@ public: : rWin(rGraphWin) {} - virtual void Changed(const SdrObject& rObj, SdrUserCallType eType, const Rectangle& rOldBoundRect) override; + virtual void Changed(const SdrObject& rObj, SdrUserCallType eType, const tools::Rectangle& rOldBoundRect) override; }; SdrObjUserCall* GraphCtrl::GetSdrUserCall() diff --git a/include/svx/gridctrl.hxx b/include/svx/gridctrl.hxx index 2bd8f90b72ba..43a6a12ee059 100644 --- a/include/svx/gridctrl.hxx +++ b/include/svx/gridctrl.hxx @@ -214,7 +214,7 @@ public: protected: 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 nType ) override; private: @@ -307,7 +307,7 @@ protected: protected: virtual bool SeekRow(long nRow) override; virtual void VisibleRowsChanged( long nNewTopRow, sal_uInt16 nNumRows) override; - virtual void PaintCell(OutputDevice& rDev, const Rectangle& rRect, sal_uInt16 nColId) const override; + virtual void PaintCell(OutputDevice& rDev, const tools::Rectangle& rRect, sal_uInt16 nColId) const override; virtual RowStatus GetRowStatus(long nRow) const override; virtual bool CursorMoving(long nNewRow, sal_uInt16 nNewCol) override; virtual void CursorMoved() override; diff --git a/include/svx/measctrl.hxx b/include/svx/measctrl.hxx index 118ea02ba764..09b861703ee4 100644 --- a/include/svx/measctrl.hxx +++ b/include/svx/measctrl.hxx @@ -39,7 +39,7 @@ public: virtual ~SvxXMeasurePreview() override; virtual void dispose() override; - virtual void Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) override; + virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) override; virtual void Resize() override; virtual void MouseButtonDown(const MouseEvent& rMEvt) override; virtual Size GetOptimalSize() const override; diff --git a/include/svx/numvset.hxx b/include/svx/numvset.hxx index 1c2da29a55ee..eaba4507685e 100644 --- a/include/svx/numvset.hxx +++ b/include/svx/numvset.hxx @@ -58,7 +58,7 @@ enum class NumberingPageType class SVX_DLLPUBLIC SvxNumValueSet : public ValueSet { NumberingPageType ePageType; - Rectangle aOrgRect; + tools::Rectangle aOrgRect; VclPtr<VirtualDevice> pVDev; css::uno::Reference<css::text::XNumberingFormatter> xFormatter; diff --git a/include/svx/pagectrl.hxx b/include/svx/pagectrl.hxx index 64123cf0be8a..438018e08fbd 100644 --- a/include/svx/pagectrl.hxx +++ b/include/svx/pagectrl.hxx @@ -70,14 +70,14 @@ private: SvxPageUsage eUsage; protected: - virtual void Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) override; + virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) override; virtual void DrawPage(vcl::RenderContext& rRenderContext, const Point& rPoint, const bool bSecond, const bool bEnabled); void drawFillAttributes(vcl::RenderContext& rRenderContext, const drawinglayer::attribute::SdrAllFillAttributesHelperPtr& rFillAttributes, - const Rectangle& rPaintRange, const Rectangle& rDefineRange); + const tools::Rectangle& rPaintRange, const tools::Rectangle& rDefineRange); public: SvxPageWindow(vcl::Window* pParent); diff --git a/include/svx/paraprev.hxx b/include/svx/paraprev.hxx index 7b326487c0f3..a7ac58eb1f35 100644 --- a/include/svx/paraprev.hxx +++ b/include/svx/paraprev.hxx @@ -55,10 +55,10 @@ private: sal_uInt16 nLineVal; OUString aText; - Rectangle Lines[9]; + tools::Rectangle Lines[9]; protected: - virtual void Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) override; + virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) override; virtual Size GetOptimalSize() const override; void DrawParagraph(vcl::RenderContext& rRenderContext); diff --git a/include/svx/rubydialog.hxx b/include/svx/rubydialog.hxx index 048d959e0e3d..f3afb3f35868 100644 --- a/include/svx/rubydialog.hxx +++ b/include/svx/rubydialog.hxx @@ -37,7 +37,7 @@ class SvxRubyDialog; class RubyPreview : public vcl::Window { protected: - virtual void Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) override; + virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) override; VclPtr<SvxRubyDialog> m_pParentDlg; public: diff --git a/include/svx/scene3d.hxx b/include/svx/scene3d.hxx index 3babb6be0057..2059e1109387 100644 --- a/include/svx/scene3d.hxx +++ b/include/svx/scene3d.hxx @@ -118,7 +118,7 @@ public: bool GetDrawOnlySelected() const { return bDrawOnlySelected; } virtual sal_uInt16 GetObjIdentifier() const override; - virtual void NbcSetSnapRect(const Rectangle& rRect) override; + virtual void NbcSetSnapRect(const tools::Rectangle& rRect) override; virtual void NbcMove(const Size& rSize) override; virtual void NbcResize(const Point& rRef, const Fraction& rXFact, const Fraction& rYFact) override; diff --git a/include/svx/sdr/contact/objectcontact.hxx b/include/svx/sdr/contact/objectcontact.hxx index e883b9d2a968..a2429eca7af6 100644 --- a/include/svx/sdr/contact/objectcontact.hxx +++ b/include/svx/sdr/contact/objectcontact.hxx @@ -25,7 +25,7 @@ #include <drawinglayer/geometry/viewinformation2d.hxx> class SetOfByte; -class Rectangle; +namespace tools { class Rectangle; } class SdrPageView; class OutputDevice; diff --git a/include/svx/sdrpaintwindow.hxx b/include/svx/sdrpaintwindow.hxx index 1c0e03a1dd44..970fdd7efc62 100644 --- a/include/svx/sdrpaintwindow.hxx +++ b/include/svx/sdrpaintwindow.hxx @@ -41,7 +41,7 @@ namespace sdr /// paint the transparent children of rWin that overlap rPixelRect /// (for example, transparent form controls like check boxes) void SVX_DLLPUBLIC -PaintTransparentChildren(vcl::Window & rWindow, Rectangle const& rPixelRect); +PaintTransparentChildren(vcl::Window & rWindow, tools::Rectangle const& rPixelRect); class SdrPreRenderDevice { @@ -105,7 +105,7 @@ public: void DrawOverlay(const vcl::Region& rRegion); // calculate visible area and return - Rectangle GetVisibleArea() const; + tools::Rectangle GetVisibleArea() const; // Is OutDev a printer? bool OutputToPrinter() const { return (OUTDEV_PRINTER == mpOutputDevice->GetOutDevType()); } diff --git a/include/svx/svdcrtv.hxx b/include/svx/svdcrtv.hxx index c66b05488d3e..928006172ee2 100644 --- a/include/svx/svdcrtv.hxx +++ b/include/svx/svdcrtv.hxx @@ -61,7 +61,7 @@ private: protected: bool ImpBegCreateObj(SdrInventor nInvent, sal_uInt16 nIdent, const Point& rPnt, OutputDevice* pOut, - sal_Int16 nMinMov, const Rectangle& rLogRect, SdrObject* pPreparedFactoryObject); + sal_Int16 nMinMov, const tools::Rectangle& rLogRect, SdrObject* pPreparedFactoryObject); void ShowCreateObj(/*OutputDevice* pOut, bool bFull*/); void HideCreateObj(/*OutputDevice* pOut, bool bFull*/); @@ -78,7 +78,7 @@ public: virtual void EndAction() override; virtual void BckAction() override; virtual void BrkAction() override; - virtual void TakeActionRect(Rectangle& rRect) const override; + virtual void TakeActionRect(tools::Rectangle& rRect) const override; virtual bool MouseMove(const MouseEvent& rMEvt, vcl::Window* pWin) override; diff --git a/include/svx/svddrag.hxx b/include/svx/svddrag.hxx index ef48ccf692fa..6764e71b0cf7 100644 --- a/include/svx/svddrag.hxx +++ b/include/svx/svddrag.hxx @@ -51,7 +51,7 @@ protected: Point aRef2; // axis of reflection, ...) Point aPos0; // Position at the last Event Point aRealNow; // Current dragging position without Snap, Ortho and Limit - Rectangle aActionRect; + tools::Rectangle aActionRect; bool bEndDragChangesAttributes; bool bEndDragChangesGeoAndAttributes; @@ -156,11 +156,11 @@ public: SdrDragMethod* GetDragMethod() const { return pDragMethod; } void SetDragMethod(SdrDragMethod* pMth) { pDragMethod=pMth; } - const Rectangle& GetActionRect() const { return aActionRect; } - void SetActionRect(const Rectangle& rR) { aActionRect=rR; } + const tools::Rectangle& GetActionRect() const { return aActionRect; } + void SetActionRect(const tools::Rectangle& rR) { aActionRect=rR; } // Also considering 1stPointAsCenter - void TakeCreateRect(Rectangle& rRect) const; + void TakeCreateRect(tools::Rectangle& rRect) const; }; #endif // INCLUDED_SVX_SVDDRAG_HXX diff --git a/include/svx/svddrgmt.hxx b/include/svx/svddrgmt.hxx index e3286291b534..c484c8736625 100644 --- a/include/svx/svddrgmt.hxx +++ b/include/svx/svddrgmt.hxx @@ -156,11 +156,11 @@ protected: const SdrHdlList& GetHdlList() const { return getSdrDragView().GetHdlList(); } void AddUndo(SdrUndoAction* pUndo) { getSdrDragView().AddUndo(pUndo); } bool IsDragLimit() { return getSdrDragView().mbDragLimit; } - const Rectangle& GetDragLimitRect() { return getSdrDragView().maDragLimit; } + const tools::Rectangle& GetDragLimitRect() { return getSdrDragView().maDragLimit; } const SdrMarkList& GetMarkedObjectList() { return getSdrDragView().GetMarkedObjectList(); } Point GetSnapPos(const Point& rPt) const { return getSdrDragView().GetSnapPos(rPt,getSdrDragView().mpMarkedPV); } SdrSnap SnapPos(Point& rPt) const { return getSdrDragView().SnapPos(rPt,getSdrDragView().mpMarkedPV); } - inline const Rectangle& GetMarkedRect() const; + inline const tools::Rectangle& GetMarkedRect() const; SdrPageView* GetDragPV() const; SdrObject* GetDragObj() const; bool IsDraggingPoints() const { return getSdrDragView().IsDraggingPoints(); } @@ -203,7 +203,7 @@ public: bool getSolidDraggingActive() const { return mbSolidDraggingActive; } }; -inline const Rectangle& SdrDragMethod::GetMarkedRect() const +inline const tools::Rectangle& SdrDragMethod::GetMarkedRect() const { return getSdrDragView().meDragHdl==SdrHdlKind::Poly ? getSdrDragView().GetMarkedPointsRect() : getSdrDragView().meDragHdl==SdrHdlKind::Glue ? getSdrDragView().GetMarkedGluePointsRect() : diff --git a/include/svx/svddrgv.hxx b/include/svx/svddrgv.hxx index 0ca6445122df..5da66b5eaa90 100644 --- a/include/svx/svddrgv.hxx +++ b/include/svx/svddrgv.hxx @@ -34,7 +34,7 @@ protected: SdrHdl* mpDragHdl; SdrDragMethod* mpCurrentSdrDragMethod; SdrUndoGeoObj* mpInsPointUndo; - Rectangle maDragLimit; + tools::Rectangle maDragLimit; OUString maInsPointUndoStr; SdrHdlKind meDragHdl; @@ -77,7 +77,7 @@ public: virtual void EndAction() override; virtual void BckAction() override; virtual void BrkAction() override; - virtual void TakeActionRect(Rectangle& rRect) const override; + virtual void TakeActionRect(tools::Rectangle& rRect) const override; // special implementation for Writer: // TakeDragObjAnchorPos() returns the position at which an object @@ -205,8 +205,8 @@ public: // errors,... // Default=EmptyRect=no limitation // only partially implemented - void SetWorkArea(const Rectangle& rRect) { maMaxWorkArea=rRect; } - const Rectangle& GetWorkArea() const { return maMaxWorkArea; } + void SetWorkArea(const tools::Rectangle& rRect) { maMaxWorkArea=rRect; } + const tools::Rectangle& GetWorkArea() const { return maMaxWorkArea; } // The DragLimit refers to the Page of the object. @@ -221,7 +221,7 @@ public: // occur, because of which the LimitRect might be exceeded by a // very small extent.... // Implemented for Move and Resize - virtual bool TakeDragLimit(SdrDragMode eMode, Rectangle& rRect) const; + virtual bool TakeDragLimit(SdrDragMode eMode, tools::Rectangle& rRect) const; }; #endif // INCLUDED_SVX_SVDDRGV_HXX diff --git a/include/svx/svdedtv.hxx b/include/svx/svdedtv.hxx index 15a331697568..1275adbca56a 100644 --- a/include/svx/svdedtv.hxx +++ b/include/svx/svdedtv.hxx @@ -153,8 +153,8 @@ protected: static bool ImpCanDismantle(const SdrObject* pObj, bool bMakeLines); void ImpDismantleOneObject(const SdrObject* pObj, SdrObjList& rOL, size_t& rPos, SdrPageView* pPV, bool bMakeLines); static void ImpCrookObj(SdrObject* pO, const Point& rRef, const Point& rRad, SdrCrookMode eMode, - bool bVertical, bool bNoContortion, bool bRotate, const Rectangle& rMarkRect); - static void ImpDistortObj(SdrObject* pO, const Rectangle& rRef, const XPolygon& rDistortedRect, bool bNoContortion); + bool bVertical, bool bNoContortion, bool bRotate, const tools::Rectangle& rMarkRect); + static void ImpDistortObj(SdrObject* pO, const tools::Rectangle& rRef, const XPolygon& rDistortedRect, bool bNoContortion); bool ImpDelLayerCheck(SdrObjList* pOL, SdrLayerID nDelID) const; void ImpDelLayerDelObjs(SdrObjList* pOL, SdrLayerID nDelID); @@ -206,7 +206,7 @@ public: // Set a logical enclosing rectangle for all marked objects. // It is not guaranteed if this succeeds, as a horizontal // line has always a height of 0 - void SetMarkedObjRect(const Rectangle& rRect); + void SetMarkedObjRect(const tools::Rectangle& rRect); void MoveMarkedObj(const Size& rSiz, bool bCopy=false); void ResizeMarkedObj(const Point& rRef, const Fraction& xFact, const Fraction& yFact, bool bCopy=false); void ResizeMultMarkedObj(const Point& rRef, const Fraction& xFact, const Fraction& yFact, const bool bCopy, const bool bWdh, const bool bHgt); @@ -218,11 +218,11 @@ public: long GetMarkedObjShear() const; void ShearMarkedObj(const Point& rRef, long nAngle, bool bVShear=false, bool bCopy=false); void CrookMarkedObj(const Point& rRef, const Point& rRad, SdrCrookMode eMode, bool bVertical, bool bNoContortion, bool bCopy=false); - void DistortMarkedObj(const Rectangle& rRef, const XPolygon& rDistortedRect, bool bNoContortion, bool bCopy=false); + void DistortMarkedObj(const tools::Rectangle& rRef, const XPolygon& rDistortedRect, bool bNoContortion, bool bCopy=false); // copy marked objects and mark them instead of the old ones void CopyMarkedObj(); - void SetAllMarkedRect(const Rectangle& rRect) { SetMarkedObjRect(rRect); } + void SetAllMarkedRect(const tools::Rectangle& rRect) { SetMarkedObjRect(rRect); } void MoveAllMarked(const Size& rSiz, bool bCopy=false) { MoveMarkedObj(rSiz,bCopy); } void ResizeAllMarked(const Point& rRef, const Fraction& xFact, const Fraction& yFact) { ResizeMarkedObj(rRef,xFact,yFact); } void RotateAllMarked(const Point& rRef, long nAngle) { RotateMarkedObj(rRef,nAngle); } diff --git a/include/svx/svdedxv.hxx b/include/svx/svdedxv.hxx index 211594aa9e89..d35e398301b6 100644 --- a/include/svx/svdedxv.hxx +++ b/include/svx/svdedxv.hxx @@ -75,8 +75,8 @@ protected: SdrPageView* pMacroPV; VclPtr<vcl::Window> pMacroWin; - Rectangle aTextEditArea; - Rectangle aMinTextEditArea; + tools::Rectangle aTextEditArea; + tools::Rectangle aMinTextEditArea; Link<EditFieldInfo*,void> aOldCalcFieldValueLink; // for call the old handler Point aMacroDownPos; @@ -112,7 +112,7 @@ protected: // Create a new OutlinerView at the heap and initialize all required parameters. // pTextEditObj, pTextEditPV and pTextEditOutliner have to be initialized OutlinerView* ImpMakeOutlinerView(vcl::Window* pWin, bool bNoPaint, OutlinerView* pGivenView, SfxViewShell* pViewShell = nullptr) const; - void ImpPaintOutlinerView(OutlinerView& rOutlView, const Rectangle& rRect, OutputDevice& rTargetDevice) const; + void ImpPaintOutlinerView(OutlinerView& rOutlView, const tools::Rectangle& rRect, OutputDevice& rTargetDevice) const; void ImpInvalidateOutlinerView(OutlinerView& rOutlView) const; // Chaining @@ -155,7 +155,7 @@ public: virtual void EndAction() override; virtual void BrkAction() override; virtual void BckAction() override; - virtual void TakeActionRect(Rectangle& rRect) const override; + virtual void TakeActionRect(tools::Rectangle& rRect) const override; SdrPageView* ShowSdrPage(SdrPage* pPage) override; void HideSdrPage() override; diff --git a/include/svx/svdhdl.hxx b/include/svx/svdhdl.hxx index 413164c9f592..010c73b84c6d 100644 --- a/include/svx/svdhdl.hxx +++ b/include/svx/svdhdl.hxx @@ -401,13 +401,13 @@ public: class ImpTextframeHdl: public SdrHdl { - const Rectangle maRect; + const tools::Rectangle maRect; // create marker for this kind virtual void CreateB2dIAObject() override; public: - explicit ImpTextframeHdl(const Rectangle& rRect); + explicit ImpTextframeHdl(const tools::Rectangle& rRect); }; diff --git a/include/svx/svdhlpln.hxx b/include/svx/svdhlpln.hxx index fafab5a4d427..86890979f91d 100644 --- a/include/svx/svdhlpln.hxx +++ b/include/svx/svdhlpln.hxx @@ -52,7 +52,7 @@ public: Pointer GetPointer() const; bool IsHit(const Point& rPnt, sal_uInt16 nTolLog, const OutputDevice& rOut) const; // OutputDevice is required because capture points have a fixed pixel size - Rectangle GetBoundRect(const OutputDevice& rOut) const; + tools::Rectangle GetBoundRect(const OutputDevice& rOut) const; }; #define SDRHELPLINE_NOTFOUND 0xFFFF diff --git a/include/svx/svdmark.hxx b/include/svx/svdmark.hxx index 39a5eb3f6c7a..f8c74d23a81c 100644 --- a/include/svx/svdmark.hxx +++ b/include/svx/svdmark.hxx @@ -28,7 +28,7 @@ #include <set> #include <vector> -class Rectangle; +namespace tools { class Rectangle; } class SdrPage; class SdrObjList; class SdrObject; @@ -217,8 +217,8 @@ public: } // pPage=0L: Selection of everything! Respect Pages - bool TakeBoundRect(SdrPageView* pPageView, Rectangle& rRect) const; - bool TakeSnapRect(SdrPageView* pPageView, Rectangle& rRect) const; + bool TakeBoundRect(SdrPageView* pPageView, tools::Rectangle& rRect) const; + bool TakeSnapRect(SdrPageView* pPageView, tools::Rectangle& rRect) const; // All Entries are copied! SdrMarkList& operator=(const SdrMarkList& rLst); diff --git a/include/svx/svdmrkv.hxx b/include/svx/svdmrkv.hxx index 7a2b1e30c42e..8afceb7e2082 100644 --- a/include/svx/svdmrkv.hxx +++ b/include/svx/svdmrkv.hxx @@ -109,10 +109,10 @@ protected: SdrHdlList maHdlList; sdr::ViewSelection* mpSdrViewSelection; - Rectangle maMarkedObjRect; - Rectangle maMarkedObjRectNoOffset; - Rectangle maMarkedPointsRect; - Rectangle maMarkedGluePointsRect; + tools::Rectangle maMarkedObjRect; + tools::Rectangle maMarkedObjRectNoOffset; + tools::Rectangle maMarkedPointsRect; + tools::Rectangle maMarkedGluePointsRect; sal_uInt16 mnFrameHandlesLimit; sal_uIntPtr mnInsPointNum; // Number of the InsPoint @@ -162,8 +162,8 @@ protected: // Generates a string including degrees symbol, from an angel specification in 1/100deg bool ImpMarkPoint(SdrHdl* pHdl, SdrMark* pMark, bool bUnmark); - virtual bool MarkPoints(const Rectangle* pRect, bool bUnmark); - bool MarkGluePoints(const Rectangle* pRect, bool bUnmark); + virtual bool MarkPoints(const tools::Rectangle* pRect, bool bUnmark); + bool MarkGluePoints(const tools::Rectangle* pRect, bool bUnmark); void SetMoveOutside(bool bOn); @@ -178,7 +178,7 @@ public: virtual void EndAction() override; virtual void BckAction() override; virtual void BrkAction() override; - virtual void TakeActionRect(Rectangle& rRect) const override; + virtual void TakeActionRect(tools::Rectangle& rRect) const override; virtual void ClearPageView() override; virtual void HideSdrPage() override; @@ -291,7 +291,7 @@ public: // Mark all objects within a rectangular area // Just objects are marked which are inclosed completely - void MarkObj(const Rectangle& rRect, bool bUnmark); + void MarkObj(const tools::Rectangle& rRect, bool bUnmark); void MarkObj(SdrObject* pObj, SdrPageView* pPV, bool bUnmark=false, bool bImpNoSetMarkHdl=false); void MarkAllObj(SdrPageView* pPV=nullptr); // pPage=NULL => all displayed pages void UnmarkAllObj(SdrPageView* pPV=nullptr); // pPage=NULL => all displayed pages @@ -403,12 +403,12 @@ public: // The purpose is to avoid unnecessary flickering. -> This does not yet work, that's why sal_True! void AdjustMarkHdl(SfxViewShell* pOtherShell = nullptr); //HMHBOOL bRestraintPaint=sal_True); - const Rectangle& GetMarkedObjRect() const; // SnapRects of Objects, without line width - Rectangle GetMarkedObjBoundRect() const; // incl. line width, overlapping rags, ... - const Rectangle& GetMarkedPointsRect() const; // Enclosing rectangle of all marked points - const Rectangle& GetMarkedGluePointsRect() const; // Enclosing rectangle of all marked glue points - const Rectangle& GetAllMarkedRect() const { return GetMarkedObjRect(); } - Rectangle GetAllMarkedBoundRect() const { return GetMarkedObjBoundRect(); } + const tools::Rectangle& GetMarkedObjRect() const; // SnapRects of Objects, without line width + tools::Rectangle GetMarkedObjBoundRect() const; // incl. line width, overlapping rags, ... + const tools::Rectangle& GetMarkedPointsRect() const; // Enclosing rectangle of all marked points + const tools::Rectangle& GetMarkedGluePointsRect() const; // Enclosing rectangle of all marked glue points + const tools::Rectangle& GetAllMarkedRect() const { return GetMarkedObjRect(); } + tools::Rectangle GetAllMarkedBoundRect() const { return GetMarkedObjBoundRect(); } Point GetGridOffset() const; // Will be always called, if the list of marked objects might be changed. diff --git a/include/svx/svdoashp.hxx b/include/svx/svdoashp.hxx index 43c9c1bf4394..483455aa2d25 100644 --- a/include/svx/svdoashp.hxx +++ b/include/svx/svdoashp.hxx @@ -106,7 +106,7 @@ public: SVX_DLLPRIVATE void DragCreateObject( SdrDragStat& rDrag ); - SVX_DLLPRIVATE void DragResizeCustomShape( const Rectangle& rNewRect ); + SVX_DLLPRIVATE void DragResizeCustomShape( const tools::Rectangle& rNewRect ); SVX_DLLPRIVATE void DragMoveCustomShapeHdl( const Point& rDestination, const sal_uInt16 nCustomShapeHdlNum, bool bMoveCalloutRectangle ); @@ -117,13 +117,13 @@ public: void ImpCheckCustomGluePointsAreAdded(); // returns the new text rect that corresponds to the current logic rect, the return value can be empty if nothing changed. - Rectangle ImpCalculateTextFrame( const bool bHgt, const bool bWdt ); + tools::Rectangle ImpCalculateTextFrame( const bool bHgt, const bool bWdt ); public: // #i37011# const SdrObject* GetSdrObjectFromCustomShape() const; const SdrObject* GetSdrObjectShadowFromCustomShape() const; - bool GetTextBounds( Rectangle& rTextBound ) const; + bool GetTextBounds( tools::Rectangle& rTextBound ) const; bool IsTextPath() const; basegfx::B2DPolyPolygon GetLineGeometry( const bool bBezierAllowed ) const; @@ -176,16 +176,16 @@ public: virtual void Move(const Size& rSiz) override; virtual void Shear(const Point& rRef, long nAngle, double tn, bool bVShear) override; - virtual void SetSnapRect(const Rectangle& rRect) override; - virtual void SetLogicRect(const Rectangle& rRect) override; + virtual void SetSnapRect(const tools::Rectangle& rRect) override; + virtual void SetLogicRect(const tools::Rectangle& rRect) override; virtual void NbcMove(const Size& rSiz) override; virtual void NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact) override; virtual void NbcRotate(const Point& rRef, long nAngle, double sn, double cs) override; virtual void NbcMirror(const Point& rRef1, const Point& rRef2) override; virtual void NbcShear(const Point& rRef, long nAngle, double tn, bool bVShear) override; - virtual void NbcSetSnapRect(const Rectangle& rRect) override; - virtual void NbcSetLogicRect(const Rectangle& rRect) override; + virtual void NbcSetSnapRect(const tools::Rectangle& rRect) override; + virtual void NbcSetLogicRect(const tools::Rectangle& rRect) override; virtual SdrGluePoint GetVertexGluePoint(sal_uInt16 nNum) const override; @@ -205,17 +205,17 @@ public: * text. */ void SuggestTextFrameSize(Size aSuggestedTextFrameSize); - virtual bool AdjustTextFrameWidthAndHeight(Rectangle& rR, bool bHgt = true, bool bWdt = true) const override; + virtual bool AdjustTextFrameWidthAndHeight(tools::Rectangle& rR, bool bHgt = true, bool bWdt = true) const override; virtual bool NbcAdjustTextFrameWidthAndHeight(bool bHgt = true, bool bWdt = true) override; virtual bool AdjustTextFrameWidthAndHeight() override; virtual bool IsAutoGrowHeight() const override; virtual bool IsAutoGrowWidth() const override; virtual void SetVerticalWriting( bool bVertical ) override; - virtual void TakeTextEditArea(Size* pPaperMin, Size* pPaperMax, Rectangle* pViewInit, Rectangle* pViewMin) const override; + virtual void TakeTextEditArea(Size* pPaperMin, Size* pPaperMax, tools::Rectangle* pViewInit, tools::Rectangle* pViewMin) const override; virtual void EndTextEdit( SdrOutliner& rOutl ) override; - virtual void TakeTextAnchorRect( Rectangle& rAnchorRect ) const override; - virtual void TakeTextRect( SdrOutliner& rOutliner, Rectangle& rTextRect, bool bNoEditText, - Rectangle* pAnchorRect, bool bLineWidth = true ) const override; + virtual void TakeTextAnchorRect( tools::Rectangle& rAnchorRect ) const override; + virtual void TakeTextRect( SdrOutliner& rOutliner, tools::Rectangle& rTextRect, bool bNoEditText, + tools::Rectangle* pAnchorRect, bool bLineWidth = true ) const override; virtual SdrObjCustomShape* Clone() const override; SdrObjCustomShape& operator=(const SdrObjCustomShape& rObj); diff --git a/include/svx/svdoattr.hxx b/include/svx/svdoattr.hxx index 8ec8673d5648..10c163b3b9b0 100644 --- a/include/svx/svdoattr.hxx +++ b/include/svx/svdoattr.hxx @@ -50,7 +50,7 @@ private: protected: virtual sdr::properties::BaseProperties* CreateObjectSpecificProperties() override; - Rectangle maSnapRect; + tools::Rectangle maSnapRect; protected: /// Detects the width of the line. No line ->0. @@ -70,7 +70,7 @@ public: // Detects if Line != LineNone bool HasLine() const; - virtual const Rectangle& GetSnapRect() const override; + virtual const tools::Rectangle& GetSnapRect() const override; virtual void SetModel(SdrModel* pNewModel) override; }; diff --git a/include/svx/svdobj.hxx b/include/svx/svdobj.hxx index f35f1d0fd5db..5ca83078913c 100644 --- a/include/svx/svdobj.hxx +++ b/include/svx/svdobj.hxx @@ -172,7 +172,7 @@ class SVX_DLLPUBLIC SdrObjUserCall { public: virtual ~SdrObjUserCall(); - virtual void Changed(const SdrObject& rObj, SdrUserCallType eType, const Rectangle& rOldBoundRect); + virtual void Changed(const SdrObject& rObj, SdrUserCallType eType, const tools::Rectangle& rOldBoundRect); }; class SVX_DLLPUBLIC SdrObjMacroHitRec @@ -221,7 +221,7 @@ public: class SVX_DLLPUBLIC SdrObjGeoData { public: - Rectangle aBoundRect; + tools::Rectangle aBoundRect; Point aAnchor; std::unique_ptr<SdrGluePointList> pGPL; @@ -343,7 +343,7 @@ public: // renaming GetLayerSet -> getMergedHierarchyLayerSet to make clear what happens here. rSet needs to be empty. void getMergedHierarchyLayerSet(SetOfByte& rSet) const; - void SendUserCall(SdrUserCallType eUserCall, const Rectangle& rBoundRect) const; + void SendUserCall(SdrUserCallType eUserCall, const tools::Rectangle& rBoundRect) const; // #i68101# // An object may have a user-set Name (Get/SetName()), e.g SdrGrafObj, SdrObjGroup @@ -390,13 +390,13 @@ public: // expensive and sometimes problematic (inside a bigger object change You will get // non-useful BoundRects sometimes) i rename that method from GetBoundRect() to // GetCurrentBoundRect(). - virtual const Rectangle& GetCurrentBoundRect() const; + virtual const tools::Rectangle& GetCurrentBoundRect() const; // To have a possibility to get the last calculated BoundRect e.g for producing // the first rectangle for repaints (old and new need to be used) without forcing // a RecalcBoundRect (which may be problematical and expensive sometimes) i add here // a new method for accessing the last BoundRect. - virtual const Rectangle& GetLastBoundRect() const; + virtual const tools::Rectangle& GetLastBoundRect() const; virtual void RecalcBoundRect(); @@ -534,21 +534,21 @@ public: /// SetSnapRect() tries to size the Object so that it fits into the /// passed Rect (without stroke width, ...) virtual void RecalcSnapRect(); - virtual const Rectangle& GetSnapRect() const; - virtual void SetSnapRect(const Rectangle& rRect); - virtual void NbcSetSnapRect(const Rectangle& rRect); + virtual const tools::Rectangle& GetSnapRect() const; + virtual void SetSnapRect(const tools::Rectangle& rRect); + virtual void NbcSetSnapRect(const tools::Rectangle& rRect); // Logic Rect: for the Rect for instance without regard to rotation angle, shear, ... - virtual const Rectangle& GetLogicRect() const; - virtual void SetLogicRect(const Rectangle& rRect); - virtual void NbcSetLogicRect(const Rectangle& rRect); + virtual const tools::Rectangle& GetLogicRect() const; + virtual void SetLogicRect(const tools::Rectangle& rRect); + virtual void NbcSetLogicRect(const tools::Rectangle& rRect); // the default is to set the logic rect to the given rectangle rMaxRect. If the shape // has an intrinsic aspect ratio it may set the logic rect so the aspect // ratio is kept but still inside the rectangle rMaxRect. // If bShrinkOnly is set to true, the size of the current logic rect will not // be changed if it is smaller than the given rectangle rMaxRect. - virtual void AdjustToMaxRect( const Rectangle& rMaxRect, bool bShrinkOnly = false ); + virtual void AdjustToMaxRect( const tools::Rectangle& rMaxRect, bool bShrinkOnly = false ); // rotation and shear angle virtual long GetRotateAngle() const; @@ -614,7 +614,7 @@ public: virtual bool HasMacro() const; virtual SdrObject* CheckMacroHit (const SdrObjMacroHitRec& rRec) const; virtual Pointer GetMacroPointer (const SdrObjMacroHitRec& rRec) const; - virtual void PaintMacro (OutputDevice& rOut, const Rectangle& rDirtyRect, const SdrObjMacroHitRec& rRec) const; + virtual void PaintMacro (OutputDevice& rOut, const tools::Rectangle& rDirtyRect, const SdrObjMacroHitRec& rRec) const; virtual bool DoMacro (const SdrObjMacroHitRec& rRec); virtual OUString GetMacroPopupComment(const SdrObjMacroHitRec& rRec) const; bool IsMacroHit(const SdrObjMacroHitRec& rRec) const; @@ -784,8 +784,8 @@ public: // the following methods are used to control it; // usually this data makes no sense after the import is finished, since the object // might be resized - const Rectangle& GetBLIPSizeRectangle() const { return maBLIPSizeRectangle;} - void SetBLIPSizeRectangle( const Rectangle& aRect ); + const tools::Rectangle& GetBLIPSizeRectangle() const { return maBLIPSizeRectangle;} + void SetBLIPSizeRectangle( const tools::Rectangle& aRect ); // #i121917# virtual bool HasText() const; @@ -834,7 +834,7 @@ public: const css::uno::WeakReference< css::uno::XInterface >& getWeakUnoShape() const { return maWeakUnoShape; } protected: - Rectangle aOutRect; // surrounding rectangle for Paint (incl. LineWdt, ...) + tools::Rectangle aOutRect; // surrounding rectangle for Paint (incl. LineWdt, ...) Point aAnchor; // anchor position (Writer) SdrPage* pPage; SdrModel* pModel; @@ -871,7 +871,7 @@ protected: virtual sdr::contact::ViewContact* CreateObjectSpecificViewContact(); - Rectangle ImpDragCalcRect(const SdrDragStat& rDrag) const; + tools::Rectangle ImpDragCalcRect(const SdrDragStat& rDrag) const; // for GetDragComment void ImpTakeDescriptionStr(sal_uInt16 nStrCacheID, OUString& rStr) const; @@ -928,7 +928,7 @@ private: bool bMarkProt : 1; // marking forbidden, persistent // on import of OLE object from MS documents the BLIP size might be retrieved, // in this case the following member is initialized as nonempty rectangle - Rectangle maBLIPSizeRectangle; + tools::Rectangle maBLIPSizeRectangle; sdr::properties::BaseProperties* mpProperties; sdr::contact::ViewContact* mpViewContact; bool mbDelayBroadcastObjectChange : 1; @@ -989,7 +989,7 @@ class SVX_DLLPUBLIC SdrObjFactory { public: static SdrObject* MakeNewObject(SdrInventor nInventor, sal_uInt16 nObjIdentifier, SdrPage* pPage, SdrModel* pModel=nullptr); - static SdrObject* MakeNewObject(SdrInventor nInventor, sal_uInt16 nObjIdentifier, const Rectangle& rSnapRect, SdrPage* pPage); + static SdrObject* MakeNewObject(SdrInventor nInventor, sal_uInt16 nObjIdentifier, const tools::Rectangle& rSnapRect, SdrPage* pPage); static void InsertMakeObjectHdl(Link<SdrObjCreatorParams, SdrObject*> const & rLink); static void RemoveMakeObjectHdl(Link<SdrObjCreatorParams, SdrObject*> const & rLink); static void InsertMakeUserDataHdl(Link<SdrObjUserDataCreatorParams, SdrObjUserData*> const & rLink); diff --git a/include/svx/svdocapt.hxx b/include/svx/svdocapt.hxx index bd0034030258..d1b0680010e9 100644 --- a/include/svx/svdocapt.hxx +++ b/include/svx/svdocapt.hxx @@ -66,15 +66,15 @@ private: private: SVX_DLLPRIVATE void ImpGetCaptParams(ImpCaptParams& rPara) const; - SVX_DLLPRIVATE static void ImpCalcTail1(const ImpCaptParams& rPara, tools::Polygon& rPoly, Rectangle& rRect); - SVX_DLLPRIVATE static void ImpCalcTail2(const ImpCaptParams& rPara, tools::Polygon& rPoly, Rectangle& rRect); - SVX_DLLPRIVATE static void ImpCalcTail3(const ImpCaptParams& rPara, tools::Polygon& rPoly, Rectangle& rRect); - SVX_DLLPRIVATE static void ImpCalcTail (const ImpCaptParams& rPara, tools::Polygon& rPoly, Rectangle& rRect); + SVX_DLLPRIVATE static void ImpCalcTail1(const ImpCaptParams& rPara, tools::Polygon& rPoly, tools::Rectangle& rRect); + SVX_DLLPRIVATE static void ImpCalcTail2(const ImpCaptParams& rPara, tools::Polygon& rPoly, tools::Rectangle& rRect); + SVX_DLLPRIVATE static void ImpCalcTail3(const ImpCaptParams& rPara, tools::Polygon& rPoly, tools::Rectangle& rRect); + SVX_DLLPRIVATE static void ImpCalcTail (const ImpCaptParams& rPara, tools::Polygon& rPoly, tools::Rectangle& rRect); SVX_DLLPRIVATE void ImpRecalcTail(); public: SdrCaptionObj(); - SdrCaptionObj(const Rectangle& rRect, const Point& rTail); + SdrCaptionObj(const tools::Rectangle& rRect, const Point& rTail); virtual ~SdrCaptionObj() override; virtual void TakeObjInfo(SdrObjTransformInfoRec& rInfo) const override; @@ -118,8 +118,8 @@ public: virtual void NbcSetRelativePos(const Point& rPnt) override; virtual Point GetRelativePos() const override; - virtual const Rectangle& GetLogicRect() const override; - virtual void NbcSetLogicRect(const Rectangle& rRect) override; + virtual const tools::Rectangle& GetLogicRect() const override; + virtual void NbcSetLogicRect(const tools::Rectangle& rRect) override; virtual sal_uInt32 GetSnapPointCount() const override; virtual Point GetSnapPoint(sal_uInt32 i) const override; diff --git a/include/svx/svdocirc.hxx b/include/svx/svdocirc.hxx index fc640860ec23..8385cd96ca97 100644 --- a/include/svx/svdocirc.hxx +++ b/include/svx/svdocirc.hxx @@ -55,7 +55,7 @@ protected: long nStartAngle; long nEndAngle; private: - SVX_DLLPRIVATE basegfx::B2DPolygon ImpCalcXPolyCirc(const SdrObjKind eKind, const Rectangle& rRect1, long nStart, long nEnd) const; + SVX_DLLPRIVATE basegfx::B2DPolygon ImpCalcXPolyCirc(const SdrObjKind eKind, const tools::Rectangle& rRect1, long nStart, long nEnd) const; SVX_DLLPRIVATE static void ImpSetCreateParams(SdrDragStat& rStat); SVX_DLLPRIVATE void ImpSetAttrToCircInfo(); // copy values from pool SVX_DLLPRIVATE void ImpSetCircInfoToAttr(); // copy values into pool @@ -69,25 +69,25 @@ protected: public: SdrCircObj(SdrObjKind eNewKind); // Circ, CArc, Sect or CCut - SdrCircObj(SdrObjKind eNewKind, const Rectangle& rRect); + SdrCircObj(SdrObjKind eNewKind, const tools::Rectangle& rRect); // 0=0.00Deg=3h 9000=90.00Deg=12h 18000=180.00Deg=9h 27000=270.00Deg=6h // The circle is build up from StartAngle to EndWink anti-clockwise. // If nNewStartAngle==nNewEndWink, then arc has an angle of 0 degrees. // If nNewStartAngle+36000==nNewEndWink, then the arc has angle of 360 degrees. - SdrCircObj(SdrObjKind eNewKind, const Rectangle& rRect, long nNewStartAngle, long nNewEndWink); + SdrCircObj(SdrObjKind eNewKind, const tools::Rectangle& rRect, long nNewStartAngle, long nNewEndWink); virtual ~SdrCircObj() override; virtual void TakeObjInfo(SdrObjTransformInfoRec& rInfo) const override; virtual sal_uInt16 GetObjIdentifier() const override; - virtual void TakeUnrotatedSnapRect(Rectangle& rRect) const override; + virtual void TakeUnrotatedSnapRect(tools::Rectangle& rRect) const override; virtual OUString TakeObjNameSingul() const override; virtual OUString TakeObjNamePlural() const override; virtual SdrCircObj* Clone() const override; virtual void RecalcSnapRect() override; - virtual void NbcSetSnapRect(const Rectangle& rRect) override; + virtual void NbcSetSnapRect(const tools::Rectangle& rRect) override; virtual basegfx::B2DPolyPolygon TakeXorPoly() const override; virtual sal_uInt32 GetSnapPointCount() const override; diff --git a/include/svx/svdoedge.hxx b/include/svx/svdoedge.hxx index 15e476e33e89..5f685276c8d7 100644 --- a/include/svx/svdoedge.hxx +++ b/include/svx/svdoedge.hxx @@ -174,11 +174,11 @@ public: protected: virtual void Notify(SfxBroadcaster& rBC, const SfxHint& rHint) override; - static XPolygon ImpCalcObjToCenter(const Point& rStPt, long nEscAngle, const Rectangle& rRect, const Point& rCenter); + static XPolygon ImpCalcObjToCenter(const Point& rStPt, long nEscAngle, const tools::Rectangle& rRect, const Point& rCenter); void ImpRecalcEdgeTrack(); // recalculation of the connection track XPolygon ImpCalcEdgeTrack(const XPolygon& rTrack0, SdrObjConnection& rCon1, SdrObjConnection& rCon2, SdrEdgeInfoRec* pInfo) const; - XPolygon ImpCalcEdgeTrack(const Point& rPt1, long nAngle1, const Rectangle& rBoundRect1, const Rectangle& rBewareRect1, - const Point& rPt2, long nAngle2, const Rectangle& rBoundRect2, const Rectangle& rBewareRect2, + XPolygon ImpCalcEdgeTrack(const Point& rPt1, long nAngle1, const tools::Rectangle& rBoundRect1, const tools::Rectangle& rBewareRect1, + const Point& rPt2, long nAngle2, const tools::Rectangle& rBoundRect2, const tools::Rectangle& rBewareRect2, sal_uIntPtr* pnQuality, SdrEdgeInfoRec* pInfo) const; static bool ImpFindConnector(const Point& rPt, const SdrPageView& rPV, SdrObjConnection& rCon, const SdrEdgeObj* pThis, OutputDevice* pOut=nullptr); static SdrEscapeDirection ImpCalcEscAngle(SdrObject* pObj, const Point& aPt2); @@ -196,8 +196,8 @@ public: SdrObjConnection& GetConnection(bool bTail1) { return *(bTail1 ? &aCon1 : &aCon2); } virtual void TakeObjInfo(SdrObjTransformInfoRec& rInfo) const override; virtual sal_uInt16 GetObjIdentifier() const override; - virtual const Rectangle& GetCurrentBoundRect() const override; - virtual const Rectangle& GetSnapRect() const override; + virtual const tools::Rectangle& GetCurrentBoundRect() const override; + virtual const tools::Rectangle& GetSnapRect() const override; virtual bool IsNode() const override; virtual SdrGluePoint GetVertexGluePoint(sal_uInt16 nNum) const override; virtual SdrGluePoint GetCornerGluePoint(sal_uInt16 nNum) const override; @@ -215,7 +215,7 @@ public: bool CheckNodeConnection(bool bTail1) const; virtual void RecalcSnapRect() override; - virtual void TakeUnrotatedSnapRect(Rectangle& rRect) const override; + virtual void TakeUnrotatedSnapRect(tools::Rectangle& rRect) const override; virtual SdrEdgeObj* Clone() const override; SdrEdgeObj& operator=(const SdrEdgeObj& rObj); virtual OUString TakeObjNameSingul() const override; @@ -237,7 +237,7 @@ public: // FullDrag support virtual SdrObject* getFullDragClone() const override; - virtual void NbcSetSnapRect(const Rectangle& rRect) override; + virtual void NbcSetSnapRect(const tools::Rectangle& rRect) override; virtual void NbcMove(const Size& aSize) override; virtual void NbcResize(const Point& rRefPnt, const Fraction& aXFact, const Fraction& aYFact) override; diff --git a/include/svx/svdograf.hxx b/include/svx/svdograf.hxx index 30c564342e9e..07532267e8be 100644 --- a/include/svx/svdograf.hxx +++ b/include/svx/svdograf.hxx @@ -119,7 +119,7 @@ public: SdrGrafObj(); SdrGrafObj(const Graphic& rGrf); - SdrGrafObj(const Graphic& rGrf, const Rectangle& rRect); + SdrGrafObj(const Graphic& rGrf, const tools::Rectangle& rRect); virtual ~SdrGrafObj() override; void SetGraphicObject( const GraphicObject& rGrfObj ); @@ -190,7 +190,7 @@ public: virtual SdrObject* DoConvertToPolyObj(bool bBezier, bool bAddText) const override; - virtual void AdjustToMaxRect( const Rectangle& rMaxRect, bool bShrinkOnly = false ) override; + virtual void AdjustToMaxRect( const tools::Rectangle& rMaxRect, bool bShrinkOnly = false ) override; virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) override; diff --git a/include/svx/svdogrp.hxx b/include/svx/svdogrp.hxx index 8d10e75de5b6..ea2988093d2f 100644 --- a/include/svx/svdogrp.hxx +++ b/include/svx/svdogrp.hxx @@ -59,8 +59,8 @@ public: virtual void SetModel(SdrModel* pNewModel) override; virtual SdrObjList* GetSubList() const override; - virtual const Rectangle& GetCurrentBoundRect() const override; - virtual const Rectangle& GetSnapRect() const override; + virtual const tools::Rectangle& GetCurrentBoundRect() const override; + virtual const tools::Rectangle& GetSnapRect() const override; virtual SdrObjGroup* Clone() const override; SdrObjGroup& operator=(const SdrObjGroup& rObj); @@ -86,8 +86,8 @@ public: virtual void Shear(const Point& rRef, long nAngle, double tn, bool bVShear) override; virtual void SetAnchorPos(const Point& rPnt) override; virtual void SetRelativePos(const Point& rPnt) override; - virtual void SetSnapRect(const Rectangle& rRect) override; - virtual void SetLogicRect(const Rectangle& rRect) override; + virtual void SetSnapRect(const tools::Rectangle& rRect) override; + virtual void SetLogicRect(const tools::Rectangle& rRect) override; virtual void NbcMove(const Size& rSiz) override; virtual void NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact) override; @@ -96,8 +96,8 @@ public: virtual void NbcShear(const Point& rRef, long nAngle, double tn, bool bVShear) override; virtual void NbcSetAnchorPos(const Point& rPnt) override; virtual void NbcSetRelativePos(const Point& rPnt) override; - virtual void NbcSetSnapRect(const Rectangle& rRect) override; - virtual void NbcSetLogicRect(const Rectangle& rRect) override; + virtual void NbcSetSnapRect(const tools::Rectangle& rRect) override; + virtual void NbcSetLogicRect(const tools::Rectangle& rRect) override; virtual void NbcReformatText() override; virtual void ReformatText() override; diff --git a/include/svx/svdomeas.hxx b/include/svx/svdomeas.hxx index f2da911ddb57..bcc445702001 100644 --- a/include/svx/svdomeas.hxx +++ b/include/svx/svdomeas.hxx @@ -91,7 +91,7 @@ public: virtual void TakeObjInfo(SdrObjTransformInfoRec& rInfo) const override; virtual sal_uInt16 GetObjIdentifier() const override; - virtual void TakeUnrotatedSnapRect(Rectangle& rRect) const override; + virtual void TakeUnrotatedSnapRect(tools::Rectangle& rRect) const override; virtual SdrMeasureObj* Clone() const override; virtual OUString TakeObjNameSingul() const override; @@ -135,10 +135,10 @@ public: virtual bool BegTextEdit(SdrOutliner& rOutl) override; virtual const Size& GetTextSize() const override; - virtual void TakeTextRect( SdrOutliner& rOutliner, Rectangle& rTextRect, bool bNoEditText, - Rectangle* pAnchorRect, bool bLineWidth = true ) const override; - virtual void TakeTextAnchorRect(Rectangle& rAnchorRect) const override; - virtual void TakeTextEditArea(Size* pPaperMin, Size* pPaperMax, Rectangle* pViewInit, Rectangle* pViewMin) const override; + virtual void TakeTextRect( SdrOutliner& rOutliner, tools::Rectangle& rTextRect, bool bNoEditText, + tools::Rectangle* pAnchorRect, bool bLineWidth = true ) const override; + virtual void TakeTextAnchorRect(tools::Rectangle& rAnchorRect) const override; + virtual void TakeTextEditArea(Size* pPaperMin, Size* pPaperMax, tools::Rectangle* pViewInit, tools::Rectangle* pViewMin) const override; virtual sal_uInt16 GetOutlinerViewAnchorMode() const override; virtual void NbcSetOutlinerParaObject(OutlinerParaObject* pTextObject) override; virtual OutlinerParaObject* GetOutlinerParaObject() const override; diff --git a/include/svx/svdomedia.hxx b/include/svx/svdomedia.hxx index 5b69ed6ea67c..4a96e9ac6c3f 100644 --- a/include/svx/svdomedia.hxx +++ b/include/svx/svdomedia.hxx @@ -37,7 +37,7 @@ public: SdrMediaObj(); - SdrMediaObj( const Rectangle& rRect ); + SdrMediaObj( const tools::Rectangle& rRect ); virtual ~SdrMediaObj() override; @@ -52,7 +52,7 @@ public: virtual SdrMediaObj* Clone() const override; SdrMediaObj& operator=(const SdrMediaObj& rObj); - virtual void AdjustToMaxRect( const Rectangle& rMaxRect, bool bShrinkOnly = false ) override; + virtual void AdjustToMaxRect( const tools::Rectangle& rMaxRect, bool bShrinkOnly = false ) override; public: diff --git a/include/svx/svdoole2.hxx b/include/svx/svdoole2.hxx index 345f6ebba16b..d1a471db2f48 100644 --- a/include/svx/svdoole2.hxx +++ b/include/svx/svdoole2.hxx @@ -68,7 +68,7 @@ public: OUString GetStyleString(); SdrOle2Obj( bool bFrame_ = false ); - SdrOle2Obj( const svt::EmbeddedObjectRef& rNewObjRef, const OUString& rNewObjName, const Rectangle& rNewRect ); + SdrOle2Obj( const svt::EmbeddedObjectRef& rNewObjRef, const OUString& rNewObjName, const tools::Rectangle& rNewRect ); virtual ~SdrOle2Obj() override; const svt::EmbeddedObjectRef& getEmbeddedObjectRef() const; @@ -135,8 +135,8 @@ public: virtual void NbcMove(const Size& rSize) override; virtual void NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact) override; - virtual void NbcSetSnapRect(const Rectangle& rRect) override; - virtual void NbcSetLogicRect(const Rectangle& rRect) override; + virtual void NbcSetSnapRect(const tools::Rectangle& rRect) override; + virtual void NbcSetLogicRect(const tools::Rectangle& rRect) override; virtual void SetGeoData(const SdrObjGeoData& rGeo) override; static bool CanUnloadRunningObj( const css::uno::Reference< css::embed::XEmbeddedObject >& xObj, diff --git a/include/svx/svdopage.hxx b/include/svx/svdopage.hxx index 5f2947fc0702..8893e812d783 100644 --- a/include/svx/svdopage.hxx +++ b/include/svx/svdopage.hxx @@ -42,7 +42,7 @@ protected: public: SdrPageObj(SdrPage* pNewPage = nullptr); - SdrPageObj(const Rectangle& rRect, SdrPage* pNewPage = nullptr); + SdrPageObj(const tools::Rectangle& rRect, SdrPage* pNewPage = nullptr); virtual ~SdrPageObj() override; SdrPage* GetReferencedPage() const { return mpShownPage;} diff --git a/include/svx/svdopath.hxx b/include/svx/svdopath.hxx index 85eca76899a9..f4ad038f1e22 100644 --- a/include/svx/svdopath.hxx +++ b/include/svx/svdopath.hxx @@ -74,7 +74,7 @@ public: virtual void TakeObjInfo(SdrObjTransformInfoRec& rInfo) const override; virtual sal_uInt16 GetObjIdentifier() const override; - virtual void TakeUnrotatedSnapRect(Rectangle& rRect) const override; + virtual void TakeUnrotatedSnapRect(tools::Rectangle& rRect) const override; virtual SdrPathObj* Clone() const override; SdrPathObj& operator=(const SdrPathObj& rObj); @@ -82,7 +82,7 @@ public: virtual OUString TakeObjNamePlural() const override; virtual basegfx::B2DPolyPolygon TakeXorPoly() const override; virtual void RecalcSnapRect() override; - virtual void NbcSetSnapRect(const Rectangle& rRect) override; + virtual void NbcSetSnapRect(const tools::Rectangle& rRect) override; virtual sal_uInt32 GetHdlCount() const override; virtual SdrHdl* GetHdl(sal_uInt32 nHdlNum) const override; virtual sal_uInt32 GetPlusHdlCount(const SdrHdl& rHdl) const override; diff --git a/include/svx/svdorect.hxx b/include/svx/svdorect.hxx index 11d6b7d7d55d..367ea1737f19 100644 --- a/include/svx/svdorect.hxx +++ b/include/svx/svdorect.hxx @@ -49,7 +49,7 @@ protected: std::unique_ptr<XPolygon> mpXPoly; protected: - XPolygon ImpCalcXPoly(const Rectangle& rRect1, long nRad1) const; + XPolygon ImpCalcXPoly(const tools::Rectangle& rRect1, long nRad1) const; void SetXPolyDirty(); /// Subclasses should override RecalcXPoly() by creating an XPolygon @@ -66,26 +66,26 @@ public: * Constructor of a rectangular drawing object */ SdrRectObj(); - SdrRectObj(const Rectangle& rRect); + SdrRectObj(const tools::Rectangle& rRect); SdrRectObj& operator=(const SdrRectObj& rCopy); // Constructor of a text frame SdrRectObj(SdrObjKind eNewTextKind); - SdrRectObj(SdrObjKind eNewTextKind, const Rectangle& rRect); + SdrRectObj(SdrObjKind eNewTextKind, const tools::Rectangle& rRect); virtual ~SdrRectObj() override; virtual void TakeObjInfo(SdrObjTransformInfoRec& rInfo) const override; virtual sal_uInt16 GetObjIdentifier() const override; - virtual void TakeUnrotatedSnapRect(Rectangle& rRect) const override; + virtual void TakeUnrotatedSnapRect(tools::Rectangle& rRect) const override; virtual OUString TakeObjNameSingul() const override; virtual OUString TakeObjNamePlural() const override; virtual SdrRectObj* Clone() const override; virtual void RecalcSnapRect() override; - virtual void NbcSetSnapRect(const Rectangle& rRect) override; - virtual void NbcSetLogicRect(const Rectangle& rRect) override; + virtual void NbcSetSnapRect(const tools::Rectangle& rRect) override; + virtual void NbcSetLogicRect(const tools::Rectangle& rRect) override; virtual basegfx::B2DPolyPolygon TakeXorPoly() const override; virtual sal_uInt32 GetHdlCount() const override; diff --git a/include/svx/svdotable.hxx b/include/svx/svdotable.hxx index 3de0a341246a..9cfb42cfa337 100644 --- a/include/svx/svdotable.hxx +++ b/include/svx/svdotable.hxx @@ -99,7 +99,7 @@ class SVX_DLLPUBLIC SdrTableObj : public ::SdrTextObj public: SdrTableObj(SdrModel* _pModel); - SdrTableObj(SdrModel* _pModel, const ::Rectangle& rNewRect, sal_Int32 nColumns, sal_Int32 nRows); + SdrTableObj(SdrModel* _pModel, const ::tools::Rectangle& rNewRect, sal_Int32 nColumns, sal_Int32 nRows); virtual ~SdrTableObj() override; @@ -138,7 +138,7 @@ public: void setActiveCell( const sdr::table::CellPos& rPos ); void getActiveCellPos( sdr::table::CellPos& rPos ) const; sal_Int32 getColumnCount() const; - void getCellBounds( const sdr::table::CellPos& rPos, ::Rectangle& rCellRect ); + void getCellBounds( const sdr::table::CellPos& rPos, ::tools::Rectangle& rCellRect ); const SfxItemSet& GetActiveCellItemSet() const; void SetMergedItemSetAndBroadcastOnActiveCell(const SfxItemSet& rSet, bool bClearAllItems); @@ -175,10 +175,10 @@ public: /** At the same time, we set the text in the outliner (if applicable the EditOutliners') * as well as the PaperSize */ - void TakeTextRect( const sdr::table::CellPos& rPos, SdrOutliner& rOutliner, ::Rectangle& rTextRect, bool bNoEditText, ::Rectangle* pAnchorRect=nullptr, bool bLineWidth = true ) const; - virtual void TakeTextRect( SdrOutliner& rOutliner, Rectangle& rTextRect, bool bNoEditText, Rectangle* pAnchorRect, bool bLineWidth = true ) const override; - void TakeTextAnchorRect(const sdr::table::CellPos& rPos, ::Rectangle& rAnchorRect ) const; - virtual void TakeTextAnchorRect(::Rectangle& rAnchorRect) const override; + void TakeTextRect( const sdr::table::CellPos& rPos, SdrOutliner& rOutliner, ::tools::Rectangle& rTextRect, bool bNoEditText, ::tools::Rectangle* pAnchorRect=nullptr, bool bLineWidth = true ) const; + virtual void TakeTextRect( SdrOutliner& rOutliner, tools::Rectangle& rTextRect, bool bNoEditText, tools::Rectangle* pAnchorRect, bool bLineWidth = true ) const override; + void TakeTextAnchorRect(const sdr::table::CellPos& rPos, ::tools::Rectangle& rAnchorRect ) const; + virtual void TakeTextAnchorRect(::tools::Rectangle& rAnchorRect) const override; virtual bool IsAutoGrowHeight() const override; virtual bool IsAutoGrowWidth() const override; @@ -190,19 +190,19 @@ public: virtual sal_uInt16 GetObjIdentifier() const override; virtual void SetChanged() override; - virtual bool AdjustTextFrameWidthAndHeight(Rectangle& rR, bool bHgt = true, bool bWdt = true) const override; + virtual bool AdjustTextFrameWidthAndHeight(tools::Rectangle& rR, bool bHgt = true, bool bWdt = true) const override; virtual bool AdjustTextFrameWidthAndHeight() override; virtual OUString TakeObjNameSingul() const override; virtual OUString TakeObjNamePlural() const override; virtual SdrTableObj* Clone() const override; SdrTableObj& operator=(const SdrTableObj& rObj); virtual void RecalcSnapRect() override; - virtual const Rectangle& GetSnapRect() const override; - virtual void NbcSetSnapRect(const Rectangle& rRect) override; + virtual const tools::Rectangle& GetSnapRect() const override; + virtual void NbcSetSnapRect(const tools::Rectangle& rRect) override; - virtual const Rectangle& GetLogicRect() const override; - virtual void NbcSetLogicRect(const Rectangle& rRect) override; - virtual void AdjustToMaxRect( const Rectangle& rMaxRect, bool bShrinkOnly = false ) override; + virtual const tools::Rectangle& GetLogicRect() const override; + virtual void NbcSetLogicRect(const tools::Rectangle& rRect) override; + virtual void AdjustToMaxRect( const tools::Rectangle& rMaxRect, bool bShrinkOnly = false ) override; virtual sal_uInt32 GetHdlCount() const override; virtual SdrHdl* GetHdl(sal_uInt32 nHdlNum) const override; @@ -227,8 +227,8 @@ public: virtual bool BegTextEdit(SdrOutliner& rOutl) override; virtual void EndTextEdit(SdrOutliner& rOutl) override; - virtual void TakeTextEditArea(Size* pPaperMin, Size* pPaperMax, Rectangle* pViewInit, Rectangle* pViewMin) const override; - void TakeTextEditArea(const sdr::table::CellPos& rPos, Size* pPaperMin, Size* pPaperMax, Rectangle* pViewInit, Rectangle* pViewMin) const; + virtual void TakeTextEditArea(Size* pPaperMin, Size* pPaperMax, tools::Rectangle* pViewInit, tools::Rectangle* pViewMin) const override; + void TakeTextEditArea(const sdr::table::CellPos& rPos, Size* pPaperMin, Size* pPaperMax, tools::Rectangle* pViewInit, tools::Rectangle* pViewMin) const; virtual sal_uInt16 GetOutlinerViewAnchorMode() const override; virtual void NbcSetOutlinerParaObject(OutlinerParaObject* pTextObject) override; @@ -277,7 +277,7 @@ private: friend class sdr::contact::ViewContactOfTableObj; const TableLayouter& getTableLayouter() const; - Rectangle maLogicRect; + tools::Rectangle maLogicRect; private: rtl::Reference<SdrTableObjImpl> mpImpl; }; diff --git a/include/svx/svdotext.hxx b/include/svx/svdotext.hxx index 2c2a4ab00f6a..ae1d77fcf202 100644 --- a/include/svx/svdotext.hxx +++ b/include/svx/svdotext.hxx @@ -90,7 +90,7 @@ namespace sdr { namespace table { class SdrTextObjGeoData : public SdrObjGeoData { public: - Rectangle aRect; + tools::Rectangle aRect; GeoStat aGeo; }; @@ -184,7 +184,7 @@ protected: // The "aRect" is also the rect of RectObj and CircObj. // When bTextFrame=sal_True the text will be formatted into this rect // When bTextFrame=sal_False the text will be centered around its middle - Rectangle maRect; + tools::Rectangle maRect; // The GeoStat contains the rotation and shear angles GeoStat aGeo; @@ -266,9 +266,9 @@ private: // #101029#: Extracted from Paint() SVX_DLLPRIVATE void ImpSetupDrawOutlinerForPaint( bool bContourFrame, SdrOutliner& rOutliner, - Rectangle& rTextRect, - Rectangle& rAnchorRect, - Rectangle& rPaintRect, + tools::Rectangle& rTextRect, + tools::Rectangle& rAnchorRect, + tools::Rectangle& rPaintRect, Fraction& aFitXKorreg ) const; void ImpAutoFitText( SdrOutliner& rOutliner ) const; static void ImpAutoFitText( SdrOutliner& rOutliner, const Size& rShapeSize, bool bIsVerticalWriting ); @@ -290,14 +290,14 @@ protected: SdrObject* ImpConvertAddText(SdrObject* pObj, bool bBezier) const; void ImpSetTextStyleSheetListeners(); static void ImpSetCharStretching(SdrOutliner& rOutliner, const Size& rTextSize, const Size& rShapeSize, Fraction& rFitXKorreg); - static void ImpJustifyRect(Rectangle& rRect); + static void ImpJustifyRect(tools::Rectangle& rRect); void ImpCheckShear(); - Rectangle ImpDragCalcRect(const SdrDragStat& rDrag) const; + tools::Rectangle ImpDragCalcRect(const SdrDragStat& rDrag) const; void ImpSetTextEditParams() const; void SetTextSizeDirty() { bTextSizeDirty=true; } // rAnchorRect ist InOut-Parameter! - void ImpSetContourPolygon( SdrOutliner& rOutliner, Rectangle& rAnchorRect, bool bLineWidth ) const; + void ImpSetContourPolygon( SdrOutliner& rOutliner, tools::Rectangle& rAnchorRect, bool bLineWidth ) const; virtual SdrObjGeoData* NewGeoData() const override; virtual void SaveGeoData(SdrObjGeoData& rGeo) const override; @@ -311,11 +311,11 @@ protected: // constructors for labeled graphical objects SdrTextObj(); - SdrTextObj(const Rectangle& rNewRect); + SdrTextObj(const tools::Rectangle& rNewRect); // constructors for text frames SdrTextObj(SdrObjKind eNewTextKind); - SdrTextObj(SdrObjKind eNewTextKind, const Rectangle& rNewRect); + SdrTextObj(SdrObjKind eNewTextKind, const tools::Rectangle& rNewRect); virtual ~SdrTextObj() override; @@ -340,7 +340,7 @@ public: bool ReloadLinkedText(bool bForceLoad); bool LoadText(const OUString& rFileName, const OUString& rFilterName, rtl_TextEncoding eCharSet); - virtual bool AdjustTextFrameWidthAndHeight(Rectangle& rR, bool bHgt = true, bool bWdt = true) const; + virtual bool AdjustTextFrameWidthAndHeight(tools::Rectangle& rR, bool bHgt = true, bool bWdt = true) const; virtual bool NbcAdjustTextFrameWidthAndHeight(bool bHgt = true, bool bWdt = true); virtual bool AdjustTextFrameWidthAndHeight(); bool IsTextFrame() const { return bTextFrame; } @@ -395,9 +395,9 @@ public: // Simultaneously sets the text into the Outliner (possibly // the one of the EditOutliner) and sets the PaperSize. - virtual void TakeTextRect( SdrOutliner& rOutliner, Rectangle& rTextRect, bool bNoEditText, - Rectangle* pAnchorRect, bool bLineWidth = true ) const; - virtual void TakeTextAnchorRect(::Rectangle& rAnchorRect) const; + virtual void TakeTextRect( SdrOutliner& rOutliner, tools::Rectangle& rTextRect, bool bNoEditText, + tools::Rectangle* pAnchorRect, bool bLineWidth = true ) const; + virtual void TakeTextAnchorRect(::tools::Rectangle& rAnchorRect) const; const GeoStat& GetGeoStat() const { return aGeo; } // get corner radius @@ -410,7 +410,7 @@ public: long GetMaxTextFrameWidth() const; SdrFitToSizeType GetFitToSize() const; - const Rectangle &GetGeoRect() const; + const tools::Rectangle &GetGeoRect() const; // check if it's a TextFontwork virtual bool IsFontwork() const; @@ -444,7 +444,7 @@ public: virtual sal_uInt16 GetObjIdentifier() const override; // needed to determine text anchor area - virtual void TakeUnrotatedSnapRect(Rectangle& rRect) const; + virtual void TakeUnrotatedSnapRect(tools::Rectangle& rRect) const; virtual OUString TakeObjNameSingul() const override; virtual OUString TakeObjNamePlural() const override; virtual SdrTextObj* Clone() const override; @@ -452,9 +452,9 @@ public: virtual basegfx::B2DPolyPolygon TakeXorPoly() const override; virtual basegfx::B2DPolyPolygon TakeContour() const override; virtual void RecalcSnapRect() override; - virtual void NbcSetSnapRect(const Rectangle& rRect) override; - virtual void NbcSetLogicRect(const Rectangle& rRect) override; - virtual const Rectangle& GetLogicRect() const override; + virtual void NbcSetSnapRect(const tools::Rectangle& rRect) override; + virtual void NbcSetLogicRect(const tools::Rectangle& rRect) override; + virtual const tools::Rectangle& GetLogicRect() const override; virtual long GetRotateAngle() const override; virtual long GetShearAngle(bool bVertical = false) const override; @@ -485,7 +485,7 @@ public: virtual bool HasTextEdit() const override; virtual bool BegTextEdit(SdrOutliner& rOutl) override; - virtual void TakeTextEditArea(Size* pPaperMin, Size* pPaperMax, Rectangle* pViewInit, Rectangle* pViewMin) const; + virtual void TakeTextEditArea(Size* pPaperMin, Size* pPaperMax, tools::Rectangle* pViewInit, tools::Rectangle* pViewMin) const; virtual void EndTextEdit(SdrOutliner& rOutl) override; virtual sal_uInt16 GetOutlinerViewAnchorMode() const; @@ -520,7 +520,7 @@ public: The region to paint the outliner content into. This is useful to e.g. determine the top, left position of text in shapes. */ - void SetupOutlinerFormatting( SdrOutliner& rOutl, Rectangle& rPaintRect ) const; + void SetupOutlinerFormatting( SdrOutliner& rOutl, tools::Rectangle& rPaintRect ) const; /** Update given Outliner equivalently to SdrTextObj::Paint() @@ -534,7 +534,7 @@ public: The region to paint the outliner content into. This is useful to e.g. determine the top, left position of text in shapes. */ - void UpdateOutlinerFormatting( SdrOutliner& rOutl, Rectangle& rPaintRect ) const; + void UpdateOutlinerFormatting( SdrOutliner& rOutl, tools::Rectangle& rPaintRect ) const; void ForceOutlinerParaObject(); virtual bool IsVerticalWriting() const; virtual void SetVerticalWriting(bool bVertical); @@ -568,7 +568,7 @@ public: // Get necessary data for text scroll animation. ATM base it on a Text-Metafile and a // painting rectangle. Rotation is taken from the object. - GDIMetaFile* GetTextScrollMetaFileAndRectangle(Rectangle& rScrollRectangle, Rectangle& rPaintRectangle); + GDIMetaFile* GetTextScrollMetaFileAndRectangle(tools::Rectangle& rScrollRectangle, tools::Rectangle& rPaintRectangle); // Access to TextAnimationAllowed flag void SetTextAnimationAllowed(bool bNew); diff --git a/include/svx/svdovirt.hxx b/include/svx/svdovirt.hxx index 3484671d5557..a6223975572d 100644 --- a/include/svx/svdovirt.hxx +++ b/include/svx/svdovirt.hxx @@ -37,7 +37,7 @@ protected: virtual sdr::contact::ViewContact* CreateObjectSpecificViewContact() override; SdrObject& rRefObj; // Referenced drawing object - Rectangle aSnapRect; + tools::Rectangle aSnapRect; protected: virtual void Notify(SfxBroadcaster& rBC, const SfxHint& rHint) override; @@ -59,8 +59,8 @@ public: virtual sal_uInt16 GetObjIdentifier() const override; virtual SdrObjList* GetSubList() const override; - virtual const Rectangle& GetCurrentBoundRect() const override; - virtual const Rectangle& GetLastBoundRect() const override; + virtual const tools::Rectangle& GetCurrentBoundRect() const override; + virtual const tools::Rectangle& GetLastBoundRect() const override; virtual void RecalcBoundRect() override; virtual SdrVirtObj* Clone() const override; SdrVirtObj& operator=(const SdrVirtObj& rObj); @@ -106,13 +106,13 @@ public: virtual void Shear(const Point& rRef, long nAngle, double tn, bool bVShear) override; virtual void RecalcSnapRect() override; - virtual const Rectangle& GetSnapRect() const override; - virtual void SetSnapRect(const Rectangle& rRect) override; - virtual void NbcSetSnapRect(const Rectangle& rRect) override; + virtual const tools::Rectangle& GetSnapRect() const override; + virtual void SetSnapRect(const tools::Rectangle& rRect) override; + virtual void NbcSetSnapRect(const tools::Rectangle& rRect) override; - virtual const Rectangle& GetLogicRect() const override; - virtual void SetLogicRect(const Rectangle& rRect) override; - virtual void NbcSetLogicRect(const Rectangle& rRect) override; + virtual const tools::Rectangle& GetLogicRect() const override; + virtual void SetLogicRect(const tools::Rectangle& rRect) override; + virtual void NbcSetLogicRect(const tools::Rectangle& rRect) override; virtual long GetRotateAngle() const override; virtual long GetShearAngle(bool bVertical = false) const override; @@ -134,7 +134,7 @@ public: virtual bool HasMacro() const override; virtual SdrObject* CheckMacroHit (const SdrObjMacroHitRec& rRec) const override; virtual Pointer GetMacroPointer (const SdrObjMacroHitRec& rRec) const override; - virtual void PaintMacro (OutputDevice& rOut, const Rectangle& rDirtyRect, const SdrObjMacroHitRec& rRec) const override; + virtual void PaintMacro (OutputDevice& rOut, const tools::Rectangle& rDirtyRect, const SdrObjMacroHitRec& rRec) const override; virtual bool DoMacro (const SdrObjMacroHitRec& rRec) override; virtual OUString GetMacroPopupComment(const SdrObjMacroHitRec& rRec) const override; diff --git a/include/svx/svdpage.hxx b/include/svx/svdpage.hxx index be9dc8bafa7a..11db722b0acf 100644 --- a/include/svx/svdpage.hxx +++ b/include/svx/svdpage.hxx @@ -69,8 +69,8 @@ friend class SdrEditView; SdrModel* pModel; /// model to which the list belongs (Layer,ItemPool,Storage) SdrPage* pPage; /// Page containing the list, may be "this". SdrObject* pOwnerObj; /// OwnerObject, if it's list of a Group object. - Rectangle aOutRect; - Rectangle aSnapRect; + tools::Rectangle aOutRect; + tools::Rectangle aSnapRect; SdrObjListKind eListKind; bool bObjOrdNumsDirty; bool bRectsDirty; @@ -120,8 +120,8 @@ public: void SetRectsDirty(); - const Rectangle& GetAllObjSnapRect() const; - const Rectangle& GetAllObjBoundRect() const; + const tools::Rectangle& GetAllObjSnapRect() const; + const tools::Rectangle& GetAllObjBoundRect() const; /// reformat all text objects, e.g. when changing printer void NbcReformatAllTextObjects(); @@ -278,12 +278,12 @@ private: /// for the snap-to-grid in Writer class SdrPageGridFrame { - Rectangle aPaper; - Rectangle aUserArea; + tools::Rectangle aPaper; + tools::Rectangle aUserArea; public: - SdrPageGridFrame(const Rectangle& rPaper, const Rectangle& rUser): aPaper(rPaper), aUserArea(rUser) {} - const Rectangle& GetPaperRect() const { return aPaper; } - const Rectangle& GetUserArea() const { return aUserArea; } + SdrPageGridFrame(const tools::Rectangle& rPaper, const tools::Rectangle& rUser): aPaper(rPaper), aUserArea(rUser) {} + const tools::Rectangle& GetPaperRect() const { return aPaper; } + const tools::Rectangle& GetUserArea() const { return aUserArea; } }; class SVX_DLLPUBLIC SdrPageGridFrameList { @@ -485,7 +485,7 @@ public: /// for snap-to-grid in Writer, also for AlignObjects if 1 object is marked /// if pRect != null, then the pages that are intersected by this Rect, /// otherwise the visible pages - virtual const SdrPageGridFrameList* GetGridFrameList(const SdrPageView* pPV, const Rectangle* pRect) const; + virtual const SdrPageGridFrameList* GetGridFrameList(const SdrPageView* pPV, const tools::Rectangle* pRect) const; css::uno::Reference< css::uno::XInterface > const & getUnoPage(); diff --git a/include/svx/svdpagv.hxx b/include/svx/svdpagv.hxx index 039dcd4dc025..44a0000beb86 100644 --- a/include/svx/svdpagv.hxx +++ b/include/svx/svdpagv.hxx @@ -64,8 +64,8 @@ private: SdrPage* mpPage; Point aPgOrg; // The Page's point of origin - Rectangle aMarkBound; - Rectangle aMarkSnap; + tools::Rectangle aMarkBound; + tools::Rectangle aMarkSnap; bool mbHasMarked; bool mbVisible; @@ -162,11 +162,11 @@ public: void setPreparedPageWindow(SdrPageWindow* pKnownTarget); void DrawLayer(SdrLayerID nID, OutputDevice* pGivenTarget, sdr::contact::ViewObjectContactRedirector* pRedirector = nullptr, - const Rectangle& rRect = Rectangle(), + const tools::Rectangle& rRect = tools::Rectangle(), basegfx::B2IRange const* pPageFrame = nullptr); - void DrawPageViewGrid(OutputDevice& rOut, const Rectangle& rRect, Color aColor = Color( COL_BLACK ) ); + void DrawPageViewGrid(OutputDevice& rOut, const tools::Rectangle& rRect, Color aColor = Color( COL_BLACK ) ); - Rectangle GetPageRect() const; + tools::Rectangle GetPageRect() const; SdrPage* GetPage() const { return mpPage; } /// Return current List @@ -181,10 +181,10 @@ public: bool HasMarkedObjPageView() const { return mbHasMarked; } void SetHasMarkedObj(bool bOn) { mbHasMarked = bOn; } - const Rectangle& MarkBound() const { return aMarkBound; } - const Rectangle& MarkSnap() const { return aMarkSnap; } - Rectangle& MarkBound() { return aMarkBound; } - Rectangle& MarkSnap() { return aMarkSnap; } + const tools::Rectangle& MarkBound() const { return aMarkBound; } + const tools::Rectangle& MarkSnap() const { return aMarkSnap; } + tools::Rectangle& MarkBound() { return aMarkBound; } + tools::Rectangle& MarkSnap() { return aMarkSnap; } void SetLayerVisible(const OUString& rName, bool bShow) { SetLayer(rName, aLayerVisi, bShow); @@ -207,7 +207,7 @@ public: void SetPageOrigin(const Point& rOrg); void LogicToPagePos(Point& rPnt) const { rPnt-=aPgOrg; } - void LogicToPagePos(Rectangle& rRect) const { rRect.Move(-aPgOrg.X(),-aPgOrg.Y()); } + void LogicToPagePos(tools::Rectangle& rRect) const { rRect.Move(-aPgOrg.X(),-aPgOrg.Y()); } void PagePosToLogic(Point& rPnt) const { rPnt+=aPgOrg; } void SetVisibleLayers(const SetOfByte& rSet) { aLayerVisi=rSet; } diff --git a/include/svx/svdpntv.hxx b/include/svx/svdpntv.hxx index 726d3f78956a..b660297d573c 100644 --- a/include/svx/svdpntv.hxx +++ b/include/svx/svdpntv.hxx @@ -135,7 +135,7 @@ protected: Size maGridBig; // FIXME: We need to get rid of this eventually Size maGridFin; // FIXME: We need to get rid of this eventually SdrDragStat maDragStat; - Rectangle maMaxWorkArea; + tools::Rectangle maMaxWorkArea; SfxItemSet maDefaultAttr; Idle maComeBackIdle; @@ -260,7 +260,7 @@ public: virtual void EndAction(); virtual void BckAction(); virtual void BrkAction(); // Cancel all Actions (e.g. cancel dragging) - virtual void TakeActionRect(Rectangle& rRect) const; + virtual void TakeActionRect(tools::Rectangle& rRect) const; // Info about TextEdit. Default is sal_False. virtual bool IsTextEdit() const; @@ -407,12 +407,12 @@ public: const Size& GetGridFine() const { return maGridFin; } void InvalidateAllWin(); - void InvalidateAllWin(const Rectangle& rRect); + void InvalidateAllWin(const tools::Rectangle& rRect); /// If the View should not call Invalidate() on the windows, override /// the following 2 methods and do something else. virtual void InvalidateOneWin(vcl::Window& rWin); - virtual void InvalidateOneWin(vcl::Window& rWin, const Rectangle& rRect); + virtual void InvalidateOneWin(vcl::Window& rWin, const tools::Rectangle& rRect); void SetActiveLayer(const OUString& rName) { maActualLayer=rName; } const OUString& GetActiveLayer() const { return maActualLayer; } @@ -455,7 +455,7 @@ public: SfxStyleSheet* GetStyleSheet() const; // SfxStyleSheet* GetStyleSheet(bool& rOk) const; bool SetStyleSheet(SfxStyleSheet* pStyleSheet, bool bDontRemoveHardAttr); - virtual void MakeVisible(const Rectangle& rRect, vcl::Window& rWin); + virtual void MakeVisible(const tools::Rectangle& rRect, vcl::Window& rWin); /// For Plugins /// Is called by the Paint of the OLE object diff --git a/include/svx/svdsnpv.hxx b/include/svx/svdsnpv.hxx index 57a73610d8f7..a90bdf34d392 100644 --- a/include/svx/svdsnpv.hxx +++ b/include/svx/svdsnpv.hxx @@ -136,7 +136,7 @@ public: virtual void EndAction() override; virtual void BckAction() override; virtual void BrkAction() override; // break actions for derived classes e.g. interrupt dragging. - virtual void TakeActionRect(Rectangle& rRect) const override; + virtual void TakeActionRect(tools::Rectangle& rRect) const override; void SetSnapGridWidth(const Fraction& rX, const Fraction& rY) { aSnapWdtX=rX; aSnapWdtY=rY; } const Fraction& GetSnapGridWidthX() const { return aSnapWdtX; } diff --git a/include/svx/svdtrans.hxx b/include/svx/svdtrans.hxx index 6570a6bee099..6ad879d3a822 100644 --- a/include/svx/svdtrans.hxx +++ b/include/svx/svdtrans.hxx @@ -54,12 +54,12 @@ namespace svx inline long Round(double a) { return a>0.0 ? (long)(a+0.5) : -(long)((-a)+0.5); } } -inline void MoveRect(Rectangle& rRect, const Size& S) { rRect.Move(S.Width(),S.Height()); } +inline void MoveRect(tools::Rectangle& rRect, const Size& S) { rRect.Move(S.Width(),S.Height()); } inline void MovePoint(Point& rPnt, const Size& S) { rPnt.X()+=S.Width(); rPnt.Y()+=S.Height(); } inline void MovePoly(tools::Polygon& rPoly, const Size& S) { rPoly.Move(S.Width(),S.Height()); } void MoveXPoly(XPolygon& rPoly, const Size& S); -SVX_DLLPUBLIC void ResizeRect(Rectangle& rRect, const Point& rRef, const Fraction& xFact, const Fraction& yFact); +SVX_DLLPUBLIC void ResizeRect(tools::Rectangle& rRect, const Point& rRef, const Fraction& xFact, const Fraction& yFact); inline void ResizePoint(Point& rPnt, const Point& rRef, const Fraction& xFract, const Fraction& yFract); void ResizePoly(tools::Polygon& rPoly, const Point& rRef, const Fraction& xFact, const Fraction& yFact); void ResizeXPoly(XPolygon& rPoly, const Point& rRef, const Fraction& xFact, const Fraction& yFact); @@ -97,15 +97,15 @@ double CrookSlantXPoint(Point& rPnt, Point* pC1, Point* pC2, const Point& rCente const Point& rRad, double& rSin, double& rCos, bool bVert); double CrookStretchXPoint(Point& rPnt, Point* pC1, Point* pC2, const Point& rCenter, const Point& rRad, double& rSin, double& rCos, bool bVert, - const Rectangle& rRefRect); + const tools::Rectangle& rRefRect); void CrookRotatePoly(XPolygon& rPoly, const Point& rCenter, const Point& rRad, bool bVert); void CrookSlantPoly(XPolygon& rPoly, const Point& rCenter, const Point& rRad, bool bVert); -void CrookStretchPoly(XPolygon& rPoly, const Point& rCenter, const Point& rRad, bool bVert, const Rectangle& rRefRect); +void CrookStretchPoly(XPolygon& rPoly, const Point& rCenter, const Point& rRad, bool bVert, const tools::Rectangle& rRefRect); void CrookRotatePoly(XPolyPolygon& rPoly, const Point& rCenter, const Point& rRad, bool bVert); void CrookSlantPoly(XPolyPolygon& rPoly, const Point& rCenter, const Point& rRad, bool bVert); -void CrookStretchPoly(XPolyPolygon& rPoly, const Point& rCenter, const Point& rRad, bool bVert, const Rectangle& rRefRect); +void CrookStretchPoly(XPolyPolygon& rPoly, const Point& rCenter, const Point& rRad, bool bVert, const tools::Rectangle& rRefRect); /**************************************************************************************************/ /* Inline */ @@ -232,8 +232,8 @@ public: void RecalcTan(); }; -tools::Polygon Rect2Poly(const Rectangle& rRect, const GeoStat& rGeo); -void Poly2Rect(const tools::Polygon& rPol, Rectangle& rRect, GeoStat& rGeo); +tools::Polygon Rect2Poly(const tools::Rectangle& rRect, const GeoStat& rGeo); +void Poly2Rect(const tools::Polygon& rPol, tools::Rectangle& rRect, GeoStat& rGeo); SVX_DLLPUBLIC void OrthoDistance8(const Point& rPt0, Point& rPt, bool bBigOrtho); SVX_DLLPUBLIC void OrthoDistance4(const Point& rPt0, Point& rPt, bool bBigOrtho); diff --git a/include/svx/svdview.hxx b/include/svx/svdview.hxx index 3caee8e84dda..1beb5e7d93b3 100644 --- a/include/svx/svdview.hxx +++ b/include/svx/svdview.hxx @@ -144,7 +144,7 @@ class SVX_DLLPUBLIC SdrDropMarkerOverlay public: SdrDropMarkerOverlay(const SdrView& rView, const SdrObject& rObject); - SdrDropMarkerOverlay(const SdrView& rView, const Rectangle& rRectangle); + SdrDropMarkerOverlay(const SdrView& rView, const tools::Rectangle& rRectangle); SdrDropMarkerOverlay(const SdrView& rView, const Point& rStart, const Point& rEnd); ~SdrDropMarkerOverlay(); }; @@ -227,7 +227,7 @@ public: void MarkAll(); void UnmarkAll(); - const Rectangle& GetMarkedRect() const; + const tools::Rectangle& GetMarkedRect() const; virtual void DeleteMarked(); diff --git a/include/svx/swframeexample.hxx b/include/svx/swframeexample.hxx index 8b17f6290da4..bc1928029e18 100644 --- a/include/svx/swframeexample.hxx +++ b/include/svx/swframeexample.hxx @@ -39,14 +39,14 @@ class SVX_DLLPUBLIC SvxSwFrameExample : public vcl::Window Color m_aBlankCol; // area of symbol for blank Color m_aBlankFrameCol; // frame of symbol for blank - Rectangle aPage; - Rectangle aPagePrtArea; - Rectangle aTextLine; - Rectangle aPara; - Rectangle aParaPrtArea; - Rectangle aFrameAtFrame; - Rectangle aDrawObj; - Rectangle aAutoCharFrame; + tools::Rectangle aPage; + tools::Rectangle aPagePrtArea; + tools::Rectangle aTextLine; + tools::Rectangle aPara; + tools::Rectangle aParaPrtArea; + tools::Rectangle aFrameAtFrame; + tools::Rectangle aDrawObj; + tools::Rectangle aAutoCharFrame; Size aFrmSize; short nHAlign; @@ -63,10 +63,10 @@ class SVX_DLLPUBLIC SvxSwFrameExample : public vcl::Window void InitColors_Impl(); void InitAllRects_Impl(vcl::RenderContext& rRenderContext); - void CalcBoundRect_Impl(Rectangle &rRect); - Rectangle DrawInnerFrame_Impl(vcl::RenderContext& rRenderContext, const Rectangle &rRect, const Color &rFillColor, const Color &rBorderColor); + void CalcBoundRect_Impl(tools::Rectangle &rRect); + tools::Rectangle DrawInnerFrame_Impl(vcl::RenderContext& rRenderContext, const tools::Rectangle &rRect, const Color &rFillColor, const Color &rBorderColor); - virtual void Paint(vcl::RenderContext& rRenderContext, const Rectangle&) override; + virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&) override; virtual Size GetOptimalSize() const override; protected: virtual void DataChanged( const DataChangedEvent& rDCEvt ) override; diff --git a/include/svx/tbxcolorupdate.hxx b/include/svx/tbxcolorupdate.hxx index 0077eb84f0d4..4dc21b9b45ce 100644 --- a/include/svx/tbxcolorupdate.hxx +++ b/include/svx/tbxcolorupdate.hxx @@ -59,7 +59,7 @@ namespace svx sal_uInt16 mnSlotId; VclPtr<ToolBox> mpTbx; Color maCurColor; - Rectangle maUpdRect; + tools::Rectangle maUpdRect; Size maBmpSize; bool mbWasHiContrastMode; }; diff --git a/include/svx/unoshtxt.hxx b/include/svx/unoshtxt.hxx index fbd214df6cf7..f38cf8a62d0f 100644 --- a/include/svx/unoshtxt.hxx +++ b/include/svx/unoshtxt.hxx @@ -73,7 +73,7 @@ public: // the SvxViewForwarder interface virtual bool IsValid() const override; - virtual Rectangle GetVisArea() const override; + virtual tools::Rectangle GetVisArea() const override; virtual Point LogicToPixel( const Point&, const MapMode& ) const override; virtual Point PixelToLogic( const Point&, const MapMode& ) const override; diff --git a/include/svx/viewpt3d.hxx b/include/svx/viewpt3d.hxx index 61157fe79569..d344f0d11923 100644 --- a/include/svx/viewpt3d.hxx +++ b/include/svx/viewpt3d.hxx @@ -56,7 +56,7 @@ class SVX_DLLPUBLIC Viewport3D double fVPD; // View Plane Distance ProjectionType eProjection; // kind of the projection - Rectangle aDeviceRect; // position and size of the output area + tools::Rectangle aDeviceRect; // position and size of the output area struct { @@ -88,8 +88,8 @@ class SVX_DLLPUBLIC Viewport3D void SetViewWindow(double fX, double fY, double fW, double fH); - void SetDeviceWindow(const Rectangle& rRect); - const Rectangle& GetDeviceWindow() const { return aDeviceRect; } + void SetDeviceWindow(const tools::Rectangle& rRect); + const tools::Rectangle& GetDeviceWindow() const { return aDeviceRect; } // returns observers position in world coordinates const basegfx::B3DPoint& GetViewPoint(); diff --git a/include/svx/xoutbmp.hxx b/include/svx/xoutbmp.hxx index 4163be681d92..28748cb0cd2f 100644 --- a/include/svx/xoutbmp.hxx +++ b/include/svx/xoutbmp.hxx @@ -71,7 +71,7 @@ public: static tools::Polygon GetCountour( const Bitmap& rBmp, const XOutFlags nContourFlags, const sal_uInt8 cEdgeDetectThreshold, - const Rectangle* pWorkRect ); + const tools::Rectangle* pWorkRect ); }; SVX_DLLPUBLIC bool DitherBitmap( Bitmap& rBitmap ); diff --git a/include/svx/xpoly.hxx b/include/svx/xpoly.hxx index 430df7b6ffb2..ac5dbd8ac812 100644 --- a/include/svx/xpoly.hxx +++ b/include/svx/xpoly.hxx @@ -25,7 +25,7 @@ #include <tools/poly.hxx> class Point; -class Rectangle; +namespace tools { class Rectangle; } class SvStream; namespace tools { class Polygon; @@ -58,7 +58,7 @@ public: XPolygon( const XPolygon& rXPoly ); XPolygon( XPolygon&& rXPoly ); XPolygon( const tools::Polygon& rPoly ); - XPolygon( const Rectangle& rRect, long nRx = 0, long nRy = 0 ); + XPolygon( const tools::Rectangle& rRect, long nRx = 0, long nRy = 0 ); XPolygon( const Point& rCenter, long nRx, long nRy, sal_uInt16 nStartAngle = 0, sal_uInt16 nEndAngle = 3600, bool bClose = true ); @@ -74,7 +74,7 @@ public: void Insert( sal_uInt16 nPos, const XPolygon& rXPoly ); void Remove( sal_uInt16 nPos, sal_uInt16 nCount ); void Move( long nHorzMove, long nVertMove ); - Rectangle GetBoundRect() const; + tools::Rectangle GetBoundRect() const; const Point& operator[]( sal_uInt16 nPos ) const; Point& operator[]( sal_uInt16 nPos ); @@ -97,7 +97,7 @@ public: // transformations void Scale(double fSx, double fSy); - void Distort(const Rectangle& rRefRect, const XPolygon& rDistortedRect); + void Distort(const tools::Rectangle& rRefRect, const XPolygon& rDistortedRect); // #116512# convert to basegfx::B2DPolygon and return basegfx::B2DPolygon getB2DPolygon() const; @@ -131,7 +131,7 @@ public: void Clear(); sal_uInt16 Count() const; - Rectangle GetBoundRect() const; + tools::Rectangle GetBoundRect() const; const XPolygon& operator[]( sal_uInt16 nPos ) const { return GetObject( nPos ); } @@ -141,7 +141,7 @@ public: XPolyPolygon& operator=( XPolyPolygon&& rXPolyPoly ); // transformations - void Distort(const Rectangle& rRefRect, const XPolygon& rDistortedRect); + void Distort(const tools::Rectangle& rRefRect, const XPolygon& rDistortedRect); // #116512# convert to basegfx::B2DPolyPolygon and return basegfx::B2DPolyPolygon getB2DPolyPolygon() const; diff --git a/include/toolkit/helper/convert.hxx b/include/toolkit/helper/convert.hxx index a189f8562519..3e4d23696249 100644 --- a/include/toolkit/helper/convert.hxx +++ b/include/toolkit/helper/convert.hxx @@ -46,14 +46,14 @@ inline ::Point VCLPoint( const css::awt::Point& rAWTPoint ) return ::Point( rAWTPoint.X, rAWTPoint.Y ); } -inline css::awt::Rectangle AWTRectangle( const ::Rectangle& rVCLRect ) +inline css::awt::Rectangle AWTRectangle( const ::tools::Rectangle& rVCLRect ) { return css::awt::Rectangle( rVCLRect.Left(), rVCLRect.Top(), rVCLRect.GetWidth(), rVCLRect.GetHeight() ); } -inline ::Rectangle VCLRectangle( const css::awt::Rectangle& rAWTRect ) +inline ::tools::Rectangle VCLRectangle( const css::awt::Rectangle& rAWTRect ) { - return ::Rectangle( ::Point( rAWTRect.X, rAWTRect.Y ), ::Size( rAWTRect.Width, rAWTRect.Height ) ); + return ::tools::Rectangle( ::Point( rAWTRect.X, rAWTRect.Y ), ::Size( rAWTRect.Width, rAWTRect.Height ) ); } #endif // INCLUDED_TOOLKIT_HELPER_CONVERT_HXX diff --git a/include/toolkit/helper/vclunohelper.hxx b/include/toolkit/helper/vclunohelper.hxx index 24747523f947..2dbf25320a24 100644 --- a/include/toolkit/helper/vclunohelper.hxx +++ b/include/toolkit/helper/vclunohelper.hxx @@ -138,8 +138,8 @@ public: static ::Point /* VCLPoint */ ConvertToVCLPoint(css::awt::Point const& _aPoint); static css::awt::Point ConvertToAWTPoint(::Point /* VCLPoint */ const& _aPoint); - static ::Rectangle ConvertToVCLRect( css::awt::Rectangle const & _rRect ); - static css::awt::Rectangle ConvertToAWTRect( ::Rectangle const & _rRect ); + static ::tools::Rectangle ConvertToVCLRect( css::awt::Rectangle const & _rRect ); + static css::awt::Rectangle ConvertToAWTRect( ::tools::Rectangle const & _rRect ); static css::awt::MouseEvent createMouseEvent( diff --git a/include/tools/b3dtrans.hxx b/include/tools/b3dtrans.hxx index ae50f4596ac6..eca70105b248 100644 --- a/include/tools/b3dtrans.hxx +++ b/include/tools/b3dtrans.hxx @@ -68,13 +68,13 @@ private: double mfRatio; // Viewport area in logical coordinates - Rectangle maViewportRectangle; + tools::Rectangle maViewportRectangle; // Visible area within viewport - Rectangle maVisibleRectangle; + tools::Rectangle maVisibleRectangle; // Actual coordinates as set by CalcViewport // of visible viewport area (logical coordinates) - Rectangle maSetBound; + tools::Rectangle maSetBound; // Flags bool mbPerspective : 1; @@ -109,8 +109,8 @@ public: void SetPerspective(bool bNew); - void SetViewportRectangle(Rectangle const & rRect, Rectangle const & rVisible); - void SetViewportRectangle(Rectangle const & rRect) { SetViewportRectangle(rRect, rRect); } + void SetViewportRectangle(tools::Rectangle const & rRect, tools::Rectangle const & rVisible); + void SetViewportRectangle(tools::Rectangle const & rRect) { SetViewportRectangle(rRect, rRect); } void CalcViewport(); diff --git a/include/tools/gen.hxx b/include/tools/gen.hxx index bebc35015e82..079ada40e2e6 100644 --- a/include/tools/gen.hxx +++ b/include/tools/gen.hxx @@ -339,6 +339,8 @@ inline std::basic_ostream<charT, traits> & operator <<( /// etc. methods interpret the interval as closed, while the lowercase /// getWidth() / getHeight() etc. methods interpret the interval as half-open. /// Ok, now is the time for despair. +namespace tools +{ class SAL_WARN_UNUSED TOOLS_DLLPUBLIC Rectangle { public: @@ -379,31 +381,31 @@ public: /// Returns the difference between bottom and top, assuming the range is inclusive. inline long GetHeight() const; - Rectangle& Union( const Rectangle& rRect ); - Rectangle& Intersection( const Rectangle& rRect ); - inline Rectangle GetUnion( const Rectangle& rRect ) const; - inline Rectangle GetIntersection( const Rectangle& rRect ) const; + tools::Rectangle& Union( const tools::Rectangle& rRect ); + tools::Rectangle& Intersection( const tools::Rectangle& rRect ); + inline tools::Rectangle GetUnion( const tools::Rectangle& rRect ) const; + inline tools::Rectangle GetIntersection( const tools::Rectangle& rRect ) const; void Justify(); bool IsInside( const Point& rPOINT ) const; - bool IsInside( const Rectangle& rRect ) const; - bool IsOver( const Rectangle& rRect ) const; + bool IsInside( const tools::Rectangle& rRect ) const; + bool IsOver( const tools::Rectangle& rRect ) const; void SetEmpty() { nRight = nBottom = RECT_EMPTY; } inline bool IsEmpty() const; - inline bool operator == ( const Rectangle& rRect ) const; - inline bool operator != ( const Rectangle& rRect ) const; + inline bool operator == ( const tools::Rectangle& rRect ) const; + inline bool operator != ( const tools::Rectangle& rRect ) const; - inline Rectangle& operator += ( const Point& rPt ); - inline Rectangle& operator -= ( const Point& rPt ); + inline tools::Rectangle& operator += ( const Point& rPt ); + inline tools::Rectangle& operator -= ( const Point& rPt ); - friend inline Rectangle operator + ( const Rectangle& rRect, const Point& rPt ); - friend inline Rectangle operator - ( const Rectangle& rRect, const Point& rPt ); + friend inline tools::Rectangle operator + ( const tools::Rectangle& rRect, const Point& rPt ); + friend inline tools::Rectangle operator - ( const tools::Rectangle& rRect, const Point& rPt ); - TOOLS_DLLPUBLIC friend SvStream& ReadRectangle( SvStream& rIStream, Rectangle& rRect ); - TOOLS_DLLPUBLIC friend SvStream& WriteRectangle( SvStream& rOStream, const Rectangle& rRect ); + TOOLS_DLLPUBLIC friend SvStream& ReadRectangle( SvStream& rIStream, tools::Rectangle& rRect ); + TOOLS_DLLPUBLIC friend SvStream& WriteRectangle( SvStream& rOStream, const tools::Rectangle& rRect ); // ONE long getX() const { return nLeft; } @@ -433,14 +435,15 @@ private: long nRight; long nBottom; }; +} -inline Rectangle::Rectangle() +inline tools::Rectangle::Rectangle() { nLeft = nTop = 0; nRight = nBottom = RECT_EMPTY; } -inline Rectangle::Rectangle( const Point& rLT, const Point& rRB ) +inline tools::Rectangle::Rectangle( const Point& rLT, const Point& rRB ) { nLeft = rLT.X(); nTop = rLT.Y(); @@ -448,7 +451,7 @@ inline Rectangle::Rectangle( const Point& rLT, const Point& rRB ) nBottom = rRB.Y(); } -inline Rectangle::Rectangle( long _nLeft, long _nTop, +inline tools::Rectangle::Rectangle( long _nLeft, long _nTop, long _nRight, long _nBottom ) { nLeft = _nLeft; @@ -457,7 +460,7 @@ inline Rectangle::Rectangle( long _nLeft, long _nTop, nBottom = _nBottom; } -inline Rectangle::Rectangle( const Point& rLT, const Size& rSize ) +inline tools::Rectangle::Rectangle( const Point& rLT, const Size& rSize ) { nLeft = rLT.X(); nTop = rLT.Y(); @@ -465,33 +468,33 @@ inline Rectangle::Rectangle( const Point& rLT, const Size& rSize ) nBottom = rSize.Height() ? nTop+rSize.Height()-1 : RECT_EMPTY; } -inline bool Rectangle::IsEmpty() const +inline bool tools::Rectangle::IsEmpty() const { return (nRight == RECT_EMPTY) || (nBottom == RECT_EMPTY); } -inline Point Rectangle::TopLeft() const +inline Point tools::Rectangle::TopLeft() const { return Point( nLeft, nTop ); } -inline Point Rectangle::TopRight() const +inline Point tools::Rectangle::TopRight() const { return Point( (nRight == RECT_EMPTY) ? nLeft : nRight, nTop ); } -inline Point Rectangle::BottomLeft() const +inline Point tools::Rectangle::BottomLeft() const { return Point( nLeft, (nBottom == RECT_EMPTY) ? nTop : nBottom ); } -inline Point Rectangle::BottomRight() const +inline Point tools::Rectangle::BottomRight() const { return Point( (nRight == RECT_EMPTY) ? nLeft : nRight, (nBottom == RECT_EMPTY) ? nTop : nBottom ); } -inline Point Rectangle::TopCenter() const +inline Point tools::Rectangle::TopCenter() const { if ( IsEmpty() ) return Point( nLeft, nTop ); @@ -500,7 +503,7 @@ inline Point Rectangle::TopCenter() const std::min( nTop, nBottom) ); } -inline Point Rectangle::BottomCenter() const +inline Point tools::Rectangle::BottomCenter() const { if ( IsEmpty() ) return Point( nLeft, nTop ); @@ -509,7 +512,7 @@ inline Point Rectangle::BottomCenter() const std::max( nTop, nBottom) ); } -inline Point Rectangle::LeftCenter() const +inline Point tools::Rectangle::LeftCenter() const { if ( IsEmpty() ) return Point( nLeft, nTop ); @@ -517,7 +520,7 @@ inline Point Rectangle::LeftCenter() const return Point( std::min( nLeft, nRight ), nTop + (nBottom - nTop)/2 ); } -inline Point Rectangle::RightCenter() const +inline Point tools::Rectangle::RightCenter() const { if ( IsEmpty() ) return Point( nLeft, nTop ); @@ -525,7 +528,7 @@ inline Point Rectangle::RightCenter() const return Point( std::max( nLeft, nRight ), nTop + (nBottom - nTop)/2 ); } -inline Point Rectangle::Center() const +inline Point tools::Rectangle::Center() const { if ( IsEmpty() ) return Point( nLeft, nTop ); @@ -533,7 +536,7 @@ inline Point Rectangle::Center() const return Point( nLeft+(nRight-nLeft)/2 , nTop+(nBottom-nTop)/2 ); } -inline void Rectangle::Move( long nHorzMove, long nVertMove ) +inline void tools::Rectangle::Move( long nHorzMove, long nVertMove ) { nLeft += nHorzMove; nTop += nVertMove; @@ -543,7 +546,7 @@ inline void Rectangle::Move( long nHorzMove, long nVertMove ) nBottom += nVertMove; } -inline void Rectangle::SetPos( const Point& rPoint ) +inline void tools::Rectangle::SetPos( const Point& rPoint ) { if ( nRight != RECT_EMPTY ) nRight += rPoint.X() - nLeft; @@ -553,7 +556,7 @@ inline void Rectangle::SetPos( const Point& rPoint ) nTop = rPoint.Y(); } -inline long Rectangle::GetWidth() const +inline long tools::Rectangle::GetWidth() const { long n; if ( nRight == RECT_EMPTY ) @@ -570,7 +573,7 @@ inline long Rectangle::GetWidth() const return n; } -inline long Rectangle::GetHeight() const +inline long tools::Rectangle::GetHeight() const { long n; if ( nBottom == RECT_EMPTY ) @@ -587,24 +590,24 @@ inline long Rectangle::GetHeight() const return n; } -inline Size Rectangle::GetSize() const +inline Size tools::Rectangle::GetSize() const { return Size( GetWidth(), GetHeight() ); } -inline Rectangle Rectangle::GetUnion( const Rectangle& rRect ) const +inline tools::Rectangle tools::Rectangle::GetUnion( const tools::Rectangle& rRect ) const { - Rectangle aTmpRect( *this ); + tools::Rectangle aTmpRect( *this ); return aTmpRect.Union( rRect ); } -inline Rectangle Rectangle::GetIntersection( const Rectangle& rRect ) const +inline tools::Rectangle tools::Rectangle::GetIntersection( const tools::Rectangle& rRect ) const { - Rectangle aTmpRect( *this ); + tools::Rectangle aTmpRect( *this ); return aTmpRect.Intersection( rRect ); } -inline bool Rectangle::operator == ( const Rectangle& rRect ) const +inline bool tools::Rectangle::operator == ( const tools::Rectangle& rRect ) const { return (nLeft == rRect.nLeft ) && (nTop == rRect.nTop ) && @@ -612,7 +615,7 @@ inline bool Rectangle::operator == ( const Rectangle& rRect ) const (nBottom == rRect.nBottom ); } -inline bool Rectangle::operator != ( const Rectangle& rRect ) const +inline bool tools::Rectangle::operator != ( const tools::Rectangle& rRect ) const { return (nLeft != rRect.nLeft ) || (nTop != rRect.nTop ) || @@ -620,7 +623,7 @@ inline bool Rectangle::operator != ( const Rectangle& rRect ) const (nBottom != rRect.nBottom ); } -inline Rectangle& Rectangle::operator +=( const Point& rPt ) +inline tools::Rectangle& tools::Rectangle::operator +=( const Point& rPt ) { nLeft += rPt.X(); nTop += rPt.Y(); @@ -631,7 +634,7 @@ inline Rectangle& Rectangle::operator +=( const Point& rPt ) return *this; } -inline Rectangle& Rectangle::operator -= ( const Point& rPt ) +inline tools::Rectangle& tools::Rectangle::operator -= ( const Point& rPt ) { nLeft -= rPt.X(); nTop -= rPt.Y(); @@ -642,6 +645,8 @@ inline Rectangle& Rectangle::operator -= ( const Point& rPt ) return *this; } +namespace tools +{ inline Rectangle operator + ( const Rectangle& rRect, const Point& rPt ) { Rectangle aRect( rRect.nLeft + rPt.X(), rRect.nTop + rPt.Y(), @@ -658,8 +663,9 @@ inline Rectangle operator - ( const Rectangle& rRect, const Point& rPt ) (rRect.nBottom == RECT_EMPTY) ? RECT_EMPTY : rRect.nBottom - rPt.Y() ); return aRect; } +} -inline void Rectangle::expand(long nExpandBy) +inline void tools::Rectangle::expand(long nExpandBy) { nLeft -= nExpandBy; nTop -= nExpandBy; @@ -667,7 +673,7 @@ inline void Rectangle::expand(long nExpandBy) nBottom += nExpandBy; } -inline void Rectangle::shrink(long nShrinkBy) +inline void tools::Rectangle::shrink(long nShrinkBy) { nLeft += nShrinkBy; nTop += nShrinkBy; @@ -677,7 +683,7 @@ inline void Rectangle::shrink(long nShrinkBy) template< typename charT, typename traits > inline std::basic_ostream<charT, traits> & operator <<( - std::basic_ostream<charT, traits> & stream, const Rectangle& rectangle ) + std::basic_ostream<charT, traits> & stream, const tools::Rectangle& rectangle ) { if (rectangle.IsEmpty()) return stream << "EMPTY"; diff --git a/include/tools/poly.hxx b/include/tools/poly.hxx index e1f34a2f8c31..40a129414a38 100644 --- a/include/tools/poly.hxx +++ b/include/tools/poly.hxx @@ -87,12 +87,12 @@ public: Polygon( sal_uInt16 nSize ); Polygon( sal_uInt16 nPoints, const Point* pPtAry, const PolyFlags* pFlagAry = nullptr ); - Polygon( const Rectangle& rRect ); - Polygon( const Rectangle& rRect, + Polygon( const tools::Rectangle& rRect ); + Polygon( const tools::Rectangle& rRect, sal_uInt32 nHorzRound, sal_uInt32 nVertRound ); Polygon( const Point& rCenter, long nRadX, long nRadY ); - Polygon( const Rectangle& rBound, + Polygon( const tools::Rectangle& rBound, const Point& rStart, const Point& rEnd, PolyStyle ePolyStyle = PolyStyle::Arc, bool bWholeCircle = false ); @@ -117,10 +117,10 @@ public: void Clear(); - Rectangle GetBoundRect() const; + tools::Rectangle GetBoundRect() const; bool IsInside( const Point& rPt ) const; double CalcDistance( sal_uInt16 nPt1, sal_uInt16 nPt2 ); - void Clip( const Rectangle& rRect ); + void Clip( const tools::Rectangle& rRect ); void Optimize( PolyOptimizeFlags nOptimizeFlags ); /** Adaptive subdivision of polygons with curves @@ -210,8 +210,8 @@ public: void Clear(); sal_uInt16 Count() const; - Rectangle GetBoundRect() const; - void Clip( const Rectangle& rRect ); + tools::Rectangle GetBoundRect() const; + void Clip( const tools::Rectangle& rRect ); void Optimize( PolyOptimizeFlags nOptimizeFlags ); /** Adaptive subdivision of polygons with curves diff --git a/include/tools/svborder.hxx b/include/tools/svborder.hxx index 95b1ff48ca80..9eef88819847 100644 --- a/include/tools/svborder.hxx +++ b/include/tools/svborder.hxx @@ -72,7 +72,7 @@ public: long Left() const { return nLeft; } }; -TOOLS_DLLPUBLIC Rectangle & operator += ( Rectangle & rRect, const SvBorder & rBorder ); +TOOLS_DLLPUBLIC tools::Rectangle & operator += ( tools::Rectangle & rRect, const SvBorder & rBorder ); #endif diff --git a/include/vcl/ITiledRenderable.hxx b/include/vcl/ITiledRenderable.hxx index abe4979058c8..3592be536d0f 100644 --- a/include/vcl/ITiledRenderable.hxx +++ b/include/vcl/ITiledRenderable.hxx @@ -155,7 +155,7 @@ public: * @param rRectangle - if not empty, then limit the output only to the area of this rectangle * @return a JSON describing position/content of rows/columns */ - virtual OUString getRowColumnHeaders(const Rectangle& rRectangle) + virtual OUString getRowColumnHeaders(const tools::Rectangle& rRectangle) { (void) rRectangle; return OUString(); @@ -201,7 +201,7 @@ public: } /// @see lok::Document::setClientVisibleArea(). - virtual void setClientVisibleArea(const Rectangle& /*rRectangle*/) + virtual void setClientVisibleArea(const tools::Rectangle& /*rRectangle*/) { } diff --git a/include/vcl/bitmap.hxx b/include/vcl/bitmap.hxx index f1b950052526..cca13188f58d 100644 --- a/include/vcl/bitmap.hxx +++ b/include/vcl/bitmap.hxx @@ -315,7 +315,7 @@ public: nothing had to be cropped, because e.g. the crop rectangle included the bitmap, false is returned, too! */ - bool Crop( const Rectangle& rRectPixel ); + bool Crop( const tools::Rectangle& rRectPixel ); /** Expand the bitmap by pixel padding @@ -359,13 +359,13 @@ public: empty. */ bool CopyPixel( - const Rectangle& rRectDst, - const Rectangle& rRectSrc, + const tools::Rectangle& rRectDst, + const tools::Rectangle& rRectSrc, const Bitmap* pBmpSrc = nullptr ); bool CopyPixel_AlphaOptimized( - const Rectangle& rRectDst, - const Rectangle& rRectSrc, + const tools::Rectangle& rRectDst, + const tools::Rectangle& rRectSrc, const Bitmap* pBmpSrc ); /** Perform boolean operations with another bitmap @@ -510,7 +510,7 @@ public: @return the generated region. */ - vcl::Region CreateRegion( const Color& rColor, const Rectangle& rRect ) const; + vcl::Region CreateRegion( const Color& rColor, const tools::Rectangle& rRect ) const; /** Replace all pixel where the given mask is on with the specified color diff --git a/include/vcl/bitmapaccess.hxx b/include/vcl/bitmapaccess.hxx index b215aa08ca01..d20b9b1abd54 100644 --- a/include/vcl/bitmapaccess.hxx +++ b/include/vcl/bitmapaccess.hxx @@ -343,8 +343,8 @@ public: void DrawLine(const Point& rStart, const Point& rEnd); - void FillRect(const Rectangle& rRect); - void DrawRect(const Rectangle& rRect); + void FillRect(const tools::Rectangle& rRect); + void DrawRect(const tools::Rectangle& rRect); private: diff --git a/include/vcl/bitmapex.hxx b/include/vcl/bitmapex.hxx index c3e566b860dc..a9bf00bfc36c 100644 --- a/include/vcl/bitmapex.hxx +++ b/include/vcl/bitmapex.hxx @@ -134,7 +134,7 @@ public: nothing had to be cropped, because e.g. the crop rectangle included the bitmap, false is returned, too! */ - bool Crop( const Rectangle& rRectPixel ); + bool Crop( const tools::Rectangle& rRectPixel ); /** Expand the bitmap by pixel padding @@ -178,8 +178,8 @@ public: empty. */ bool CopyPixel( - const Rectangle& rRectDst, - const Rectangle& rRectSrc, + const tools::Rectangle& rRectDst, + const tools::Rectangle& rRectSrc, const BitmapEx* pBmpExSrc ); /** Fill the entire bitmap with the given color diff --git a/include/vcl/button.hxx b/include/vcl/button.hxx index ef5f23cfed63..1c9fd19f421f 100644 --- a/include/vcl/button.hxx +++ b/include/vcl/button.hxx @@ -54,9 +54,9 @@ public: SAL_DLLPRIVATE DrawTextFlags ImplGetTextStyle( OUString& rText, WinBits nWinStyle, DrawFlags nDrawFlags ); SAL_DLLPRIVATE void ImplDrawAlignedImage(OutputDevice* pDev, Point& rPos, Size& rSize, sal_uLong nImageSep, DrawFlags nDrawFlags, - DrawTextFlags nTextStyle, Rectangle *pSymbolRect=nullptr, bool bAddImageSep = false ); - SAL_DLLPRIVATE void ImplSetFocusRect( const Rectangle &rFocusRect ); - SAL_DLLPRIVATE const Rectangle& ImplGetFocusRect() const; + DrawTextFlags nTextStyle, tools::Rectangle *pSymbolRect=nullptr, bool bAddImageSep = false ); + SAL_DLLPRIVATE void ImplSetFocusRect( const tools::Rectangle &rFocusRect ); + SAL_DLLPRIVATE const tools::Rectangle& ImplGetFocusRect() const; SAL_DLLPRIVATE void ImplSetSymbolAlign( SymbolAlign eAlign ); /// The x-coordinate of the vertical separator line, use in MenuButton subclass only. SAL_DLLPRIVATE long ImplGetSeparatorX() const; @@ -89,7 +89,7 @@ public: void EnableImageDisplay( bool bEnable ); void EnableTextDisplay( bool bEnable ); - void SetFocusRect( const Rectangle& rFocusRect ); + void SetFocusRect( const tools::Rectangle& rFocusRect ); bool IsSmallSymbol() const; void SetSmallSymbol(); virtual bool set_property(const OString &rKey, const OString &rValue) override; @@ -117,7 +117,7 @@ class VCL_DLLPUBLIC PushButton : public Button { public: SAL_DLLPRIVATE void ImplSetDefButton( bool bSet ); - SAL_DLLPRIVATE void ImplDrawPushButtonFrame(vcl::RenderContext& rRenderContext, Rectangle& rRect, DrawButtonFlags nStyle); + SAL_DLLPRIVATE void ImplDrawPushButtonFrame(vcl::RenderContext& rRenderContext, tools::Rectangle& rRect, DrawButtonFlags nStyle); SAL_DLLPRIVATE static bool ImplHitTestPushButton(vcl::Window* pDev, const Point& rPos); SAL_DLLPRIVATE bool ImplIsDefButton() const; @@ -127,7 +127,7 @@ public: virtual void Tracking( const TrackingEvent& rTEvt ) override; virtual void KeyInput( const KeyEvent& rKEvt ) override; virtual void KeyUp( const KeyEvent& rKEvt ) override; - virtual void Paint( vcl::RenderContext& rRenderContext, const Rectangle& rRect ) override; + virtual void Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect ) override; virtual void Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, DrawFlags nFlags ) override; virtual void Resize() override; virtual void GetFocus() override; @@ -163,7 +163,7 @@ public: virtual Size GetOptimalSize() const override; virtual bool set_property(const OString &rKey, const OString &rValue) override; - virtual void ShowFocus(const Rectangle& rRect) override; + virtual void ShowFocus(const tools::Rectangle& rRect) override; protected: PushButtonDropdownStyle mnDDStyle; @@ -173,7 +173,7 @@ protected: SAL_DLLPRIVATE static WinBits ImplInitStyle( const vcl::Window* pPrevWindow, WinBits nStyle ); SAL_DLLPRIVATE void ImplInitSettings( bool bFont, bool bForeground, bool bBackground ); SAL_DLLPRIVATE void ImplDrawPushButtonContent(OutputDevice* pDev, DrawFlags nDrawFlags, - const Rectangle& rRect, bool bMenuBtnSep); + const tools::Rectangle& rRect, bool bMenuBtnSep); SAL_DLLPRIVATE void ImplDrawPushButton(vcl::RenderContext& rRenderContext); using Button::ImplGetTextStyle; SAL_DLLPRIVATE DrawTextFlags ImplGetTextStyle( DrawFlags nDrawFlags ) const; @@ -271,8 +271,8 @@ class VCL_DLLPUBLIC RadioButton : public Button { private: std::shared_ptr< std::vector< VclPtr< RadioButton > > > m_xGroup; - Rectangle maStateRect; - Rectangle maMouseRect; + tools::Rectangle maStateRect; + tools::Rectangle maMouseRect; Image maImage; bool mbChecked; bool mbSaveValue; @@ -290,8 +290,8 @@ private: SAL_DLLPRIVATE void ImplDrawRadioButtonState(vcl::RenderContext& rRenderContext); SAL_DLLPRIVATE void 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 ); SAL_DLLPRIVATE void ImplDrawRadioButton(vcl::RenderContext& rRenderContext ); SAL_DLLPRIVATE void ImplUncheckAllOther(); SAL_DLLPRIVATE Size ImplGetRadioImageSize() const; @@ -316,8 +316,8 @@ protected: virtual const Color& GetCanonicalTextColor( const StyleSettings& _rStyle ) const override; - void SetMouseRect( const Rectangle& _rMouseRect ) { maMouseRect = _rMouseRect; } - void SetStateRect( const Rectangle& _rStateRect ) { maStateRect = _rStateRect; } + void SetMouseRect( const tools::Rectangle& _rMouseRect ) { maMouseRect = _rMouseRect; } + void SetStateRect( const tools::Rectangle& _rStateRect ) { maStateRect = _rStateRect; } // draws the radio button (the knob image), in its current state (pressed/checked) // at the usual location, which can be overridden with SetStateRect @@ -332,7 +332,7 @@ public: virtual void Tracking( const TrackingEvent& rTEvt ) override; virtual void KeyInput( const KeyEvent& rKEvt ) override; virtual void KeyUp( const KeyEvent& rKEvt ) override; - virtual void Paint( vcl::RenderContext& rRenderContext, const Rectangle& rRect ) override; + virtual void Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect ) override; virtual void Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, DrawFlags nFlags ) override; virtual void Resize() override; virtual void GetFocus() override; @@ -387,7 +387,7 @@ public: * Group this RadioButton with another */ void group(RadioButton &rOther); - virtual void ShowFocus(const Rectangle& rRect) override; + virtual void ShowFocus(const tools::Rectangle& rRect) override; virtual FactoryFunction GetUITestFactory() const override; }; @@ -395,8 +395,8 @@ public: class VCL_DLLPUBLIC CheckBox : public Button { private: - Rectangle maStateRect; - Rectangle maMouseRect; + tools::Rectangle maStateRect; + tools::Rectangle maMouseRect; TriState meState; TriState meSaveValue; bool mbTriState; @@ -411,8 +411,8 @@ private: SAL_DLLPRIVATE void ImplInitSettings( bool bFont, bool bForeground, bool bBackground ); SAL_DLLPRIVATE void 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 ); SAL_DLLPRIVATE void ImplDrawCheckBox(vcl::RenderContext& rRenderContext ); SAL_DLLPRIVATE long ImplGetImageToTextDistance() const; SAL_DLLPRIVATE Size ImplGetCheckImageSize() const; @@ -429,8 +429,8 @@ protected: virtual const Color& GetCanonicalTextColor( const StyleSettings& _rStyle ) const override; virtual void ImplDrawCheckBoxState(vcl::RenderContext& rRenderContext); - SAL_DLLPRIVATE const Rectangle& GetStateRect() const { return maStateRect; } - SAL_DLLPRIVATE const Rectangle& GetMouseRect() const { return maMouseRect; } + SAL_DLLPRIVATE const tools::Rectangle& GetStateRect() const { return maStateRect; } + SAL_DLLPRIVATE const tools::Rectangle& GetMouseRect() const { return maMouseRect; } public: SAL_DLLPRIVATE void ImplCheck(); @@ -442,7 +442,7 @@ public: virtual void Tracking( const TrackingEvent& rTEvt ) override; virtual void KeyInput( const KeyEvent& rKEvt ) override; virtual void KeyUp( const KeyEvent& rKEvt ) override; - virtual void Paint( vcl::RenderContext& rRenderContext, const Rectangle& rRect ) override; + virtual void Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect ) override; virtual void Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, DrawFlags nFlags ) override; virtual void Resize() override; virtual void GetFocus() override; @@ -475,7 +475,7 @@ public: void SetLegacyNoTextAlign( bool bVal ) { mbLegacyNoTextAlign = bVal; } virtual bool set_property(const OString &rKey, const OString &rValue) override; - virtual void ShowFocus(const Rectangle& rRect) override; + virtual void ShowFocus(const tools::Rectangle& rRect) override; virtual FactoryFunction GetUITestFactory() const override; }; diff --git a/include/vcl/canvastools.hxx b/include/vcl/canvastools.hxx index aedcff7a2227..e2abfb32bbe1 100644 --- a/include/vcl/canvastools.hxx +++ b/include/vcl/canvastools.hxx @@ -30,7 +30,7 @@ class Point; class Size; -class Rectangle; +namespace tools { class Rectangle; } namespace tools { class Polygon; class PolyPolygon; @@ -152,22 +152,22 @@ namespace vcl Size VCL_DLLPUBLIC sizeFromIntegerSize2D( const css::geometry::IntegerSize2D& ); Point VCL_DLLPUBLIC pointFromIntegerPoint2D( const css::geometry::IntegerPoint2D& ); - Rectangle VCL_DLLPUBLIC rectangleFromIntegerRectangle2D( const css::geometry::IntegerRectangle2D& ); + tools::Rectangle VCL_DLLPUBLIC rectangleFromIntegerRectangle2D( const css::geometry::IntegerRectangle2D& ); // basegfx::B2D Size VCL_DLLPUBLIC sizeFromB2DSize( const basegfx::B2DVector& ); Point VCL_DLLPUBLIC pointFromB2DPoint( const basegfx::B2DPoint& ); - Rectangle VCL_DLLPUBLIC rectangleFromB2DRectangle( const basegfx::B2DRange& ); + tools::Rectangle VCL_DLLPUBLIC rectangleFromB2DRectangle( const basegfx::B2DRange& ); basegfx::B2DVector VCL_DLLPUBLIC b2DSizeFromSize( const Size& ); basegfx::B2DPoint VCL_DLLPUBLIC b2DPointFromPoint( const Point& ); - basegfx::B2DRange VCL_DLLPUBLIC b2DRectangleFromRectangle( const Rectangle& ); + basegfx::B2DRange VCL_DLLPUBLIC b2DRectangleFromRectangle( const tools::Rectangle& ); // basegfx::B2I Point VCL_DLLPUBLIC pointFromB2IPoint( const basegfx::B2IPoint& ); - Rectangle VCL_DLLPUBLIC rectangleFromB2IRectangle( const basegfx::B2IRange& ); + tools::Rectangle VCL_DLLPUBLIC rectangleFromB2IRectangle( const basegfx::B2IRange& ); basegfx::B2IPoint VCL_DLLPUBLIC b2IPointFromPoint(const Point&); - basegfx::B2IRectangle VCL_DLLPUBLIC b2IRectangleFromRectangle(const Rectangle&); + basegfx::B2IRectangle VCL_DLLPUBLIC b2IRectangleFromRectangle(const tools::Rectangle&); } } diff --git a/include/vcl/combobox.hxx b/include/vcl/combobox.hxx index afe4d61d072e..ccacd3cd65e2 100644 --- a/include/vcl/combobox.hxx +++ b/include/vcl/combobox.hxx @@ -68,7 +68,7 @@ public: virtual void setPosSizePixel( long nX, long nY, long nWidth, long nHeight, PosSizeFlags nFlags = PosSizeFlags::All ) override; - Rectangle GetDropDownPosSizePixel() const; + tools::Rectangle GetDropDownPosSizePixel() const; void AdaptDropDownLineCountToMaximum(); void SetDropDownLineCount( sal_uInt16 nLines ); @@ -146,7 +146,7 @@ public: bool IsEntryPosSelected( sal_Int32 nPos ) const; void SelectEntryPos( sal_Int32 nPos, bool bSelect = true ); void SetNoSelection(); - Rectangle GetBoundingRectangle( sal_Int32 nItem ) const; + tools::Rectangle GetBoundingRectangle( sal_Int32 nItem ) const; /** checks whether a certain point lies within the bounds of a list item and returns the item as well as the character position diff --git a/include/vcl/controllayout.hxx b/include/vcl/controllayout.hxx index ea85d379a792..13dd67d4cec0 100644 --- a/include/vcl/controllayout.hxx +++ b/include/vcl/controllayout.hxx @@ -37,7 +37,7 @@ struct VCL_DLLPUBLIC ControlLayoutData OUString m_aDisplayText; // the bounding rectangle of every character // where one character may consist of many glyphs - std::vector< Rectangle > m_aUnicodeBoundRects; + std::vector< tools::Rectangle > m_aUnicodeBoundRects; // start indices of lines std::vector< long > m_aLineIndices; // notify parent control on destruction @@ -46,7 +46,7 @@ struct VCL_DLLPUBLIC ControlLayoutData ControlLayoutData(); ~ControlLayoutData(); - Rectangle GetCharacterBounds( long nIndex ) const; + tools::Rectangle GetCharacterBounds( long nIndex ) const; // returns the character index for corresponding to rPoint (in control coordinates) // -1 is returned if no character is at that point long GetIndexForPoint( const Point& rPoint ) const; diff --git a/include/vcl/ctrl.hxx b/include/vcl/ctrl.hxx index c6b60ef48ace..522ab4a7fa84 100644 --- a/include/vcl/ctrl.hxx +++ b/include/vcl/ctrl.hxx @@ -84,12 +84,12 @@ protected: at the target device, or taking the reference device into account) when returning. */ - Rectangle DrawControlText( OutputDevice& _rTargetDevice, const Rectangle& _rRect, + tools::Rectangle DrawControlText( OutputDevice& _rTargetDevice, const tools::Rectangle& _rRect, const OUString& _rStr, DrawTextFlags _nStyle, MetricVector* _pVector, OUString* _pDisplayText, const Size* i_pDeviceSize = nullptr ) const; - Rectangle GetControlTextRect( OutputDevice& _rTargetDevice, const Rectangle & rRect, + tools::Rectangle GetControlTextRect( OutputDevice& _rTargetDevice, const tools::Rectangle & rRect, const OUString& _rStr, DrawTextFlags _nStyle, Size* o_pDeviceSize = nullptr ) const; @@ -122,7 +122,7 @@ public: the rect for drawing the frame. Upon returning from the call, the rect will be inflated by the space occupied by the drawn pixels. */ - SAL_DLLPRIVATE void ImplDrawFrame( OutputDevice* pDev, Rectangle& rRect ); + SAL_DLLPRIVATE void ImplDrawFrame( OutputDevice* pDev, tools::Rectangle& rRect ); public: explicit Control( vcl::Window* pParent, WinBits nWinStyle = 0 ); @@ -140,7 +140,7 @@ public: // gets the displayed text virtual OUString GetDisplayText() const override; // returns the bounding box for the character at index nIndex (in control coordinates) - Rectangle GetCharacterBounds( long nIndex ) const; + tools::Rectangle GetCharacterBounds( long nIndex ) const; // returns the character index for corresponding to rPoint (in control coordinates) // -1 is returned if no character is at that point long GetIndexForPoint( const Point& rPoint ) const; diff --git a/include/vcl/decoview.hxx b/include/vcl/decoview.hxx index e7aa4a0643c9..1cb36bb8d723 100644 --- a/include/vcl/decoview.hxx +++ b/include/vcl/decoview.hxx @@ -25,7 +25,7 @@ #include <rsc/rsc-vcl-shared-types.hxx> #include <o3tl/typed_flags_set.hxx> -class Rectangle; +namespace tools { class Rectangle; } class Point; class Color; class OutputDevice; @@ -105,17 +105,17 @@ private: public: DecorationView(OutputDevice* pOutDev); - void DrawSymbol( const Rectangle& rRect, SymbolType eType, + void DrawSymbol( const tools::Rectangle& rRect, SymbolType eType, const Color& rColor, DrawSymbolFlags nStyle = DrawSymbolFlags::NONE ); - void DrawFrame( const Rectangle& rRect, + void DrawFrame( const tools::Rectangle& rRect, const Color& rLeftTopColor, const Color& rRightBottomColor ); - void DrawHighlightFrame( const Rectangle& rRect, + void DrawHighlightFrame( const tools::Rectangle& rRect, DrawHighlightFrameStyle nStyle ); - Rectangle DrawFrame( const Rectangle& rRect, DrawFrameStyle nStyle = DrawFrameStyle::Out, DrawFrameFlags nFlags = DrawFrameFlags::NONE ); - Rectangle DrawButton( const Rectangle& rRect, DrawButtonFlags nStyle ); + tools::Rectangle DrawFrame( const tools::Rectangle& rRect, DrawFrameStyle nStyle = DrawFrameStyle::Out, DrawFrameFlags nFlags = DrawFrameFlags::NONE ); + tools::Rectangle DrawButton( const tools::Rectangle& rRect, DrawButtonFlags nStyle ); void DrawSeparator( const Point& rStart, const Point& rStop, bool bVertical = true ); - void DrawHandle(const Rectangle& rRectangle); + void DrawHandle(const tools::Rectangle& rRectangle); }; #endif // INCLUDED_VCL_DECOVIEW_HXX diff --git a/include/vcl/dockingarea.hxx b/include/vcl/dockingarea.hxx index b2935bf6a7e3..2a178f530e5d 100644 --- a/include/vcl/dockingarea.hxx +++ b/include/vcl/dockingarea.hxx @@ -44,7 +44,7 @@ public: bool IsHorizontal() const; virtual void ApplySettings(vcl::RenderContext& rRenderContext) 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 DataChanged( const DataChangedEvent& rDCEvt ) override; virtual void StateChanged( StateChangedType nType ) override; diff --git a/include/vcl/dockwin.hxx b/include/vcl/dockwin.hxx index 4d9c48963e93..d4622a07ff7b 100644 --- a/include/vcl/dockwin.hxx +++ b/include/vcl/dockwin.hxx @@ -30,21 +30,21 @@ struct DockingData { Point maMousePos; // in - Rectangle maTrackRect; // in/out + tools::Rectangle maTrackRect; // in/out bool mbFloating; // out - DockingData( const Point& rPt, const Rectangle& rRect, bool b) : + DockingData( const Point& rPt, const tools::Rectangle& rRect, bool b) : maMousePos( rPt ), maTrackRect( rRect ), mbFloating( b ) {}; }; struct EndDockingData { - Rectangle maWindowRect; // in + tools::Rectangle maWindowRect; // in bool mbFloating; // in bool mbCancelled; // in - EndDockingData( const Rectangle& rRect, bool b, bool bCancelled ) : + EndDockingData( const tools::Rectangle& rRect, bool b, bool bCancelled ) : maWindowRect( rRect ), mbFloating( b ), mbCancelled( bCancelled ) {}; }; @@ -88,7 +88,7 @@ private: Size maRollUpOutSize; Size maMinOutSize; Size maMaxOutSize; - Rectangle maDragArea; + tools::Rectangle maDragArea; long mnTrackX; long mnTrackY; long mnTrackWidth; @@ -120,14 +120,14 @@ public: bool ImplStartDocking( const Point& rPos ); // those methods actually call the corresponding handlers - void StartDocking( const Point& rPos, Rectangle& rRect ); - bool Docking( const Point& rPos, Rectangle& rRect ); - void EndDocking( const Rectangle& rRect, bool bFloatMode ); + void StartDocking( const Point& rPos, tools::Rectangle& rRect ); + bool Docking( const Point& rPos, tools::Rectangle& rRect ); + void EndDocking( const tools::Rectangle& rRect, bool bFloatMode ); bool PrepareToggleFloatingMode(); void ToggleFloatingMode(); - void SetDragArea( const Rectangle& rRect ); - const Rectangle& GetDragArea() const { return maDragArea;} + void SetDragArea( const tools::Rectangle& rRect ); + const tools::Rectangle& GetDragArea() const { return maDragArea;} void Lock(); void Unlock(); @@ -195,7 +195,7 @@ public: void SetPosSizePixel( vcl::Window *pWin, long nX, long nY, long nWidth, long nHeight, PosSizeFlags nFlags ); - Rectangle GetPosSizePixel( const vcl::Window *pWin ); + tools::Rectangle GetPosSizePixel( const vcl::Window *pWin ); }; @@ -277,8 +277,8 @@ public: virtual void dispose() override; virtual void StartDocking(); - virtual bool Docking( const Point& rPos, Rectangle& rRect ); - virtual void EndDocking( const Rectangle& rRect, bool bFloatMode ); + virtual bool Docking( const Point& rPos, tools::Rectangle& rRect ); + virtual void EndDocking( const tools::Rectangle& rRect, bool bFloatMode ); virtual bool PrepareToggleFloatingMode(); virtual void ToggleFloatingMode(); diff --git a/include/vcl/edit.hxx b/include/vcl/edit.hxx index c29fe97ecbb9..e588869ea429 100644 --- a/include/vcl/edit.hxx +++ b/include/vcl/edit.hxx @@ -104,13 +104,13 @@ private: SAL_DLLPRIVATE void ImplInitEditData(); SAL_DLLPRIVATE void ImplModified(); SAL_DLLPRIVATE OUString ImplGetText() const; - SAL_DLLPRIVATE void ImplRepaint(vcl::RenderContext& rRenderContext, const Rectangle& rRectangle); + SAL_DLLPRIVATE void ImplRepaint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRectangle); SAL_DLLPRIVATE void ImplInvalidateOrRepaint(); SAL_DLLPRIVATE void ImplDelete( const Selection& rSelection, sal_uInt8 nDirection, sal_uInt8 nMode ); SAL_DLLPRIVATE void ImplSetText( const OUString& rStr, const Selection* pNewSelection ); SAL_DLLPRIVATE void ImplInsertText( const OUString& rStr, const Selection* pNewSelection = nullptr, bool bIsUserInput = false ); SAL_DLLPRIVATE static OUString ImplGetValidString( const OUString& rString ); - SAL_DLLPRIVATE void ImplClearBackground(vcl::RenderContext& rRenderContext, const Rectangle& rRectangle, long nXStart, long nXEnd); + SAL_DLLPRIVATE void ImplClearBackground(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRectangle, long nXStart, long nXEnd); SAL_DLLPRIVATE void ImplPaintBorder(vcl::RenderContext& rRenderContext, long nXStart, long nXEnd); SAL_DLLPRIVATE void ImplShowCursor( bool bOnlyIfVisible = true ); SAL_DLLPRIVATE void ImplAlign(); @@ -167,7 +167,7 @@ public: virtual void MouseButtonDown( const MouseEvent& rMEvt ) override; virtual void MouseButtonUp( const MouseEvent& rMEvt ) override; virtual void KeyInput( const KeyEvent& rKEvt ) 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 Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, DrawFlags nFlags ) override; virtual void GetFocus() override; diff --git a/include/vcl/event.hxx b/include/vcl/event.hxx index 3dfdf649b390..7c58ac620c01 100644 --- a/include/vcl/event.hxx +++ b/include/vcl/event.hxx @@ -221,23 +221,23 @@ private: /// RenderContext to which we should draw - can be a VirtualDevice or anything. VclPtr<vcl::RenderContext> mpRenderContext; - Rectangle maOutRect; + tools::Rectangle maOutRect; sal_uInt16 mnItemId; sal_uInt16 mnStyle; public: UserDrawEvent(vcl::Window* pWindow, vcl::RenderContext* pRenderContext, - const Rectangle& rOutRect, sal_uInt16 nId, sal_uInt16 nStyle = 0); + const tools::Rectangle& rOutRect, sal_uInt16 nId, sal_uInt16 nStyle = 0); vcl::Window* GetWindow() const { return mpWindow; } vcl::RenderContext* GetRenderContext() const { return mpRenderContext; } - const Rectangle& GetRect() const { return maOutRect; } + const tools::Rectangle& GetRect() const { return maOutRect; } sal_uInt16 GetItemId() const { return mnItemId; } sal_uInt16 GetStyle() const { return mnStyle; } }; inline UserDrawEvent::UserDrawEvent(vcl::Window* pWindow, vcl::RenderContext* pRenderContext, - const Rectangle& rOutRect, sal_uInt16 nId, sal_uInt16 nStyle) + const tools::Rectangle& rOutRect, sal_uInt16 nId, sal_uInt16 nStyle) : mpWindow(pWindow) , mpRenderContext(pRenderContext) , maOutRect( rOutRect ) diff --git a/include/vcl/fixed.hxx b/include/vcl/fixed.hxx index b7e3774214bf..5cb5102632bc 100644 --- a/include/vcl/fixed.hxx +++ b/include/vcl/fixed.hxx @@ -61,7 +61,7 @@ public: virtual void ApplySettings(vcl::RenderContext& rRenderContext) override; - virtual void Paint( vcl::RenderContext& rRenderContext, const Rectangle& rRect ) override; + virtual void Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect ) override; virtual void Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, DrawFlags nFlags ) override; virtual void Resize() override; virtual void StateChanged( StateChangedType nType ) override; @@ -109,7 +109,7 @@ public: virtual void ApplySettings(vcl::RenderContext&) override; - virtual void Paint( vcl::RenderContext& rRenderContext, const Rectangle& rRect ) override; + virtual void Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect ) override; virtual void Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, DrawFlags nFlags ) override; virtual void Resize() override; virtual void StateChanged( StateChangedType nType ) override; @@ -135,7 +135,7 @@ public: virtual void ApplySettings(vcl::RenderContext&) override; - virtual void Paint( vcl::RenderContext& rRenderContext, const Rectangle& rRect ) override; + virtual void Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect ) override; virtual void Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, DrawFlags nFlags ) override; virtual void Resize() override; virtual void StateChanged( StateChangedType nType ) override; @@ -165,7 +165,7 @@ public: virtual void ApplySettings(vcl::RenderContext&) override; - virtual void Paint( vcl::RenderContext& rRenderContext, const Rectangle& rRect ) override; + virtual void Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect ) override; virtual void Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, DrawFlags nFlags ) override; virtual void Resize() override; virtual void StateChanged( StateChangedType nType ) override; diff --git a/include/vcl/floatwin.hxx b/include/vcl/floatwin.hxx index 9279f5e3a50e..fc7df3ada424 100644 --- a/include/vcl/floatwin.hxx +++ b/include/vcl/floatwin.hxx @@ -87,7 +87,7 @@ private: VclPtr<vcl::Window> mpFirstPopupModeWin; VclPtr<vcl::Window> mxPrevFocusWin; ImplData* mpImplData; - Rectangle maFloatRect; + tools::Rectangle maFloatRect; ImplSVEvent * mnPostId; FloatWinPopupFlags mnPopupModeFlags; FloatWinTitleType mnTitle; @@ -121,12 +121,12 @@ public: SAL_DLLPRIVATE void ImplSetMouseDown() { mbMouseDown = true; } SAL_DLLPRIVATE bool ImplIsMouseDown() const { return mbMouseDown; } static Point ImplCalcPos( vcl::Window* pWindow, - const Rectangle& rRect, FloatWinPopupFlags nFlags, + const tools::Rectangle& rRect, FloatWinPopupFlags nFlags, sal_uInt16& rArrangeIndex ); static Point ImplConvertToAbsPos(vcl::Window* pReference, const Point& rPos); - static Rectangle ImplConvertToAbsPos(vcl::Window* pReference, const Rectangle& rRect); + static tools::Rectangle ImplConvertToAbsPos(vcl::Window* pReference, const tools::Rectangle& rRect); SAL_DLLPRIVATE void ImplEndPopupMode( FloatWinPopupEndFlags nFlags, const VclPtr<vcl::Window>& xFocusId ); - SAL_DLLPRIVATE Rectangle& ImplGetItemEdgeClipRect(); + SAL_DLLPRIVATE tools::Rectangle& ImplGetItemEdgeClipRect(); SAL_DLLPRIVATE bool ImplIsInPrivatePopupMode() const { return mbInPopupMode; } virtual void doDeferredInit(WinBits nBits) override; @@ -146,7 +146,7 @@ public: void SetTitleType( FloatWinTitleType nTitle ); FloatWinTitleType GetTitleType() const { return mnTitle; } - void StartPopupMode( const Rectangle& rRect, FloatWinPopupFlags nFlags ); + void StartPopupMode( const tools::Rectangle& rRect, FloatWinPopupFlags nFlags ); void StartPopupMode( ToolBox* pBox, FloatWinPopupFlags nFlags = FloatWinPopupFlags::NONE ); void EndPopupMode( FloatWinPopupEndFlags nFlags = FloatWinPopupEndFlags::NONE ); void AddPopupModeWindow( vcl::Window* pWindow ); @@ -161,7 +161,7 @@ public: bool GrabsFocus() const { return mbGrabFocus; } - static Point CalcFloatingPosition( vcl::Window* pWindow, const Rectangle& rRect, FloatWinPopupFlags nFlags, sal_uInt16& rArrangeIndex ); + static Point CalcFloatingPosition( vcl::Window* pWindow, const tools::Rectangle& rRect, FloatWinPopupFlags nFlags, sal_uInt16& rArrangeIndex ); }; #endif // INCLUDED_VCL_FLOATWIN_HXX diff --git a/include/vcl/gdimtf.hxx b/include/vcl/gdimtf.hxx index 735babcf9f88..5ce2f9514afb 100644 --- a/include/vcl/gdimtf.hxx +++ b/include/vcl/gdimtf.hxx @@ -116,7 +116,7 @@ public: void Scale( double fScaleX, double fScaleY ); void Scale( const Fraction& rScaleX, const Fraction& rScaleY ); void Rotate( long nAngle10 ); - void Clip( const Rectangle& ); + void Clip( const tools::Rectangle& ); /* get the bound rect of the contained actions * caveats: * - clip actions will limit the contained actions, @@ -124,7 +124,7 @@ public: * - coordinates of actions will be transformed to preferred mapmode * - the returned rectangle is relative to the preferred mapmode of the metafile */ - Rectangle GetBoundRect( OutputDevice& i_rReference, Rectangle* pHairline = nullptr ) const; + tools::Rectangle GetBoundRect( OutputDevice& i_rReference, tools::Rectangle* pHairline = nullptr ) const; void Adjust( short nLuminancePercent, short nContrastPercent, short nChannelRPercent = 0, short nChannelGPercent = 0, diff --git a/include/vcl/gradient.hxx b/include/vcl/gradient.hxx index 6563b51abf69..b3b2d1a9abef 100644 --- a/include/vcl/gradient.hxx +++ b/include/vcl/gradient.hxx @@ -28,7 +28,10 @@ #include <o3tl/cow_wrapper.hxx> +namespace tools +{ class Rectangle; +} class Point; class SvStream; @@ -93,7 +96,7 @@ public: void SetSteps( sal_uInt16 nSteps ); sal_uInt16 GetSteps() const { return mpImplGradient->mnStepCount; } - void GetBoundRect( const Rectangle& rRect, Rectangle &rBoundRect, Point& rCenter ) const; + void GetBoundRect( const tools::Rectangle& rRect, tools::Rectangle &rBoundRect, Point& rCenter ) const; Gradient& operator=( const Gradient& rGradient ); Gradient& operator=( Gradient&& rGradient ); diff --git a/include/vcl/group.hxx b/include/vcl/group.hxx index 3c68a4cdb5a6..1669cfe1cf91 100644 --- a/include/vcl/group.hxx +++ b/include/vcl/group.hxx @@ -45,7 +45,7 @@ private: public: explicit GroupBox( vcl::Window* pParent, WinBits nStyle ); - virtual void Paint( vcl::RenderContext& rRenderContext, const Rectangle& rRect ) override; + virtual void Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect ) override; virtual void Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, DrawFlags nFlags ) override; virtual void Resize() override; virtual void StateChanged( StateChangedType nType ) override; diff --git a/include/vcl/help.hxx b/include/vcl/help.hxx index f89de301aaed..cd64b4f669db 100644 --- a/include/vcl/help.hxx +++ b/include/vcl/help.hxx @@ -26,7 +26,7 @@ #include <o3tl/typed_flags_set.hxx> class Point; -class Rectangle; +namespace tools { class Rectangle; } namespace vcl { class Window; } @@ -81,19 +81,19 @@ public: static bool IsBalloonHelpEnabled(); static bool ShowBalloon( vcl::Window* pParent, const Point& rScreenPos, - const Rectangle&, + const tools::Rectangle&, const OUString& rHelpText ); static void EnableQuickHelp(); static void DisableQuickHelp(); static bool IsQuickHelpEnabled(); static bool ShowQuickHelp( vcl::Window* pParent, - const Rectangle& rScreenRect, + const tools::Rectangle& rScreenRect, const OUString& rHelpText, const OUString& rLongHelpText, QuickHelpFlags nStyle ); static bool ShowQuickHelp( vcl::Window* pParent, - const Rectangle& rScreenRect, + const tools::Rectangle& rScreenRect, const OUString& rHelpText, QuickHelpFlags nStyle = QuickHelpFlags::NONE ) { return Help::ShowQuickHelp( pParent, rScreenRect, rHelpText, OUString(), nStyle ); } @@ -101,12 +101,12 @@ public: static void HideBalloonAndQuickHelp(); static sal_uLong ShowPopover(vcl::Window* pParent, - const Rectangle& rScreenRect, + const tools::Rectangle& rScreenRect, const OUString& rText, QuickHelpFlags nStyle); static void UpdatePopover(sal_uLong nId, vcl::Window* pParent, - const Rectangle& rScreenRect, + const tools::Rectangle& rScreenRect, const OUString& rText); static void HidePopover(vcl::Window* pParent, sal_uLong nId); }; diff --git a/include/vcl/imgctrl.hxx b/include/vcl/imgctrl.hxx index 14fe5e60b7a9..f1aa5f3225d6 100644 --- a/include/vcl/imgctrl.hxx +++ b/include/vcl/imgctrl.hxx @@ -40,7 +40,7 @@ public: virtual void Resize() override; virtual void Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, DrawFlags nFlags ) override; - virtual void Paint( vcl::RenderContext& rRenderContext, const Rectangle& rRect ) override; + virtual void Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect ) override; virtual void GetFocus() override; virtual void LoseFocus() override; diff --git a/include/vcl/lstbox.hxx b/include/vcl/lstbox.hxx index add63a49e544..c5f3bf0c6eb4 100644 --- a/include/vcl/lstbox.hxx +++ b/include/vcl/lstbox.hxx @@ -137,7 +137,7 @@ public: virtual void setPosSizePixel( long nX, long nY, long nWidth, long nHeight, PosSizeFlags nFlags = PosSizeFlags::All ) override; - Rectangle GetDropDownPosSizePixel() const; + tools::Rectangle GetDropDownPosSizePixel() const; void AdaptDropDownLineCountToMaximum(); void SetDropDownLineCount( sal_uInt16 nLines ); @@ -214,7 +214,7 @@ public: void SetReadOnly( bool bReadOnly = true ); bool IsReadOnly() const; - Rectangle GetBoundingRectangle( sal_Int32 nItem ) const; + tools::Rectangle GetBoundingRectangle( sal_Int32 nItem ) const; void EnableUserDraw( bool bUserDraw ); diff --git a/include/vcl/menu.hxx b/include/vcl/menu.hxx index b5912a5a1765..5c15022e6424 100644 --- a/include/vcl/menu.hxx +++ b/include/vcl/menu.hxx @@ -39,7 +39,7 @@ struct ImplSVEvent; struct MenuItemData; class Point; class Size; -class Rectangle; +namespace tools { class Rectangle; } class Menu; class MenuItemList; class HelpEvent; @@ -178,7 +178,7 @@ protected: SAL_DLLPRIVATE void ImplPaint(vcl::RenderContext& rRenderContext, sal_uInt16 nBorder, long nOffY = 0, MenuItemData* pThisDataOnly = nullptr, bool bHighlighted = false, bool bLayout = false, bool bRollover = false ) const; - SAL_DLLPRIVATE void ImplPaintMenuTitle(vcl::RenderContext&, const Rectangle& rRect) const; + SAL_DLLPRIVATE void ImplPaintMenuTitle(vcl::RenderContext&, const tools::Rectangle& rRect) const; SAL_DLLPRIVATE void ImplSelect(); SAL_DLLPRIVATE void ImplCallHighlight( sal_uInt16 nHighlightItem ); SAL_DLLPRIVATE void ImplCallEventListeners( VclEventId nEvent, sal_uInt16 nPos ); @@ -367,12 +367,12 @@ public: // returns the bounding box for the character at index nIndex // where nIndex is relative to the starting index of the item // with id nItemId (in coordinates of the displaying window) - Rectangle GetCharacterBounds( sal_uInt16 nItemId, long nIndex ) const; + tools::Rectangle GetCharacterBounds( sal_uInt16 nItemId, long nIndex ) const; // -1 is returned if no character is at that point // if an index is found the corresponding item id is filled in (else 0) long GetIndexForPoint( const Point& rPoint, sal_uInt16& rItemID ) const; // returns the bounding rectangle for an item at pos nItemPos - Rectangle GetBoundingRectangle( sal_uInt16 nItemPos ) const; + tools::Rectangle GetBoundingRectangle( sal_uInt16 nItemPos ) const; css::uno::Reference<css::accessibility::XAccessible> GetAccessible(); void SetAccessible(const css::uno::Reference<css::accessibility::XAccessible >& rxAccessible); @@ -472,7 +472,7 @@ public: // returns the rectangle occupied by the additional button named nId // coordinates are relative to the systemwindow the menubar is attached to // if the menubar is unattached an empty rectangle is returned - Rectangle GetMenuBarButtonRectPixel( sal_uInt16 nId ); + tools::Rectangle GetMenuBarButtonRectPixel( sal_uInt16 nId ); void RemoveMenuBarButton( sal_uInt16 nId ); void LayoutChanged(); }; @@ -496,7 +496,7 @@ private: SAL_DLLPRIVATE MenuFloatingWindow * ImplGetFloatingWindow() const; protected: - SAL_DLLPRIVATE sal_uInt16 ImplExecute( const VclPtr<vcl::Window>& pW, const Rectangle& rRect, FloatWinPopupFlags nPopupModeFlags, Menu* pSFrom, bool bPreSelectFirst ); + SAL_DLLPRIVATE sal_uInt16 ImplExecute( const VclPtr<vcl::Window>& pW, const tools::Rectangle& rRect, FloatWinPopupFlags nPopupModeFlags, Menu* pSFrom, bool bPreSelectFirst ); SAL_DLLPRIVATE void ImplFlushPendingSelect(); SAL_DLLPRIVATE long ImplCalcHeight( sal_uInt16 nEntries ) const; SAL_DLLPRIVATE sal_uInt16 ImplCalcVisEntries( long nMaxHeight, sal_uInt16 nStartEntry, sal_uInt16* pLastVisible = nullptr ) const; @@ -519,7 +519,7 @@ public: } sal_uInt16 Execute( vcl::Window* pWindow, const Point& rPopupPos ); - sal_uInt16 Execute( vcl::Window* pWindow, const Rectangle& rRect, PopupMenuFlags nFlags = PopupMenuFlags::NONE ); + sal_uInt16 Execute( vcl::Window* pWindow, const tools::Rectangle& rRect, PopupMenuFlags nFlags = PopupMenuFlags::NONE ); // Fuer das TestTool void EndExecute(); diff --git a/include/vcl/metaact.hxx b/include/vcl/metaact.hxx index 5041f3a954ee..09eb534f4621 100644 --- a/include/vcl/metaact.hxx +++ b/include/vcl/metaact.hxx @@ -173,7 +173,7 @@ class VCL_DLLPUBLIC MetaRectAction : public MetaAction { private: - Rectangle maRect; + tools::Rectangle maRect; public: MetaRectAction(); @@ -185,19 +185,19 @@ public: virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override; virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override; - explicit MetaRectAction( const Rectangle& ); + explicit MetaRectAction( const tools::Rectangle& ); virtual void Move( long nHorzMove, long nVertMove ) override; virtual void Scale( double fScaleX, double fScaleY ) override; - const Rectangle& GetRect() const { return maRect; } + const tools::Rectangle& GetRect() const { return maRect; } }; class VCL_DLLPUBLIC MetaRoundRectAction : public MetaAction { private: - Rectangle maRect; + tools::Rectangle maRect; sal_uInt32 mnHorzRound; sal_uInt32 mnVertRound; @@ -211,13 +211,13 @@ public: virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override; virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override; - MetaRoundRectAction( const Rectangle& rRect, + MetaRoundRectAction( const tools::Rectangle& rRect, sal_uInt32 nHorzRound, sal_uInt32 nVertRound ); virtual void Move( long nHorzMove, long nVertMove ) override; virtual void Scale( double fScaleX, double fScaleY ) override; - const Rectangle& GetRect() const { return maRect; } + const tools::Rectangle& GetRect() const { return maRect; } sal_uInt32 GetHorzRound() const { return mnHorzRound; } sal_uInt32 GetVertRound() const { return mnVertRound; } }; @@ -226,7 +226,7 @@ class VCL_DLLPUBLIC MetaEllipseAction : public MetaAction { private: - Rectangle maRect; + tools::Rectangle maRect; public: MetaEllipseAction(); @@ -238,19 +238,19 @@ public: virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override; virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override; - explicit MetaEllipseAction( const Rectangle& ); + explicit MetaEllipseAction( const tools::Rectangle& ); virtual void Move( long nHorzMove, long nVertMove ) override; virtual void Scale( double fScaleX, double fScaleY ) override; - const Rectangle& GetRect() const { return maRect; } + const tools::Rectangle& GetRect() const { return maRect; } }; class VCL_DLLPUBLIC MetaArcAction : public MetaAction { private: - Rectangle maRect; + tools::Rectangle maRect; Point maStartPt; Point maEndPt; @@ -264,13 +264,13 @@ public: virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override; virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override; - MetaArcAction( const Rectangle& rRect, + MetaArcAction( const tools::Rectangle& rRect, const Point& rStart, const Point& rEnd ); virtual void Move( long nHorzMove, long nVertMove ) override; virtual void Scale( double fScaleX, double fScaleY ) override; - const Rectangle& GetRect() const { return maRect; } + const tools::Rectangle& GetRect() const { return maRect; } const Point& GetStartPoint() const { return maStartPt; } const Point& GetEndPoint() const { return maEndPt; } }; @@ -279,7 +279,7 @@ class VCL_DLLPUBLIC MetaPieAction : public MetaAction { private: - Rectangle maRect; + tools::Rectangle maRect; Point maStartPt; Point maEndPt; @@ -293,13 +293,13 @@ public: virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override; virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override; - MetaPieAction( const Rectangle& rRect, + MetaPieAction( const tools::Rectangle& rRect, const Point& rStart, const Point& rEnd ); virtual void Move( long nHorzMove, long nVertMove ) override; virtual void Scale( double fScaleX, double fScaleY ) override; - const Rectangle& GetRect() const { return maRect; } + const tools::Rectangle& GetRect() const { return maRect; } const Point& GetStartPoint() const { return maStartPt; } const Point& GetEndPoint() const { return maEndPt; } }; @@ -308,7 +308,7 @@ class VCL_DLLPUBLIC MetaChordAction : public MetaAction { private: - Rectangle maRect; + tools::Rectangle maRect; Point maStartPt; Point maEndPt; @@ -322,13 +322,13 @@ public: virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override; virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override; - MetaChordAction( const Rectangle& rRect, + MetaChordAction( const tools::Rectangle& rRect, const Point& rStart, const Point& rEnd ); virtual void Move( long nHorzMove, long nVertMove ) override; virtual void Scale( double fScaleX, double fScaleY ) override; - const Rectangle& GetRect() const { return maRect; } + const tools::Rectangle& GetRect() const { return maRect; } const Point& GetStartPoint() const { return maStartPt; } const Point& GetEndPoint() const { return maEndPt; } }; @@ -515,7 +515,7 @@ class VCL_DLLPUBLIC MetaTextRectAction : public MetaAction { private: - Rectangle maRect; + tools::Rectangle maRect; OUString maStr; DrawTextFlags mnStyle; @@ -529,13 +529,13 @@ public: virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override; virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override; - MetaTextRectAction( const Rectangle& rRect, + MetaTextRectAction( const tools::Rectangle& rRect, const OUString& rStr, DrawTextFlags nStyle ); virtual void Move( long nHorzMove, long nVertMove ) override; virtual void Scale( double fScaleX, double fScaleY ) override; - const Rectangle& GetRect() const { return maRect; } + const tools::Rectangle& GetRect() const { return maRect; } const OUString& GetText() const { return maStr; } DrawTextFlags GetStyle() const { return mnStyle; } }; @@ -855,7 +855,7 @@ class VCL_DLLPUBLIC MetaGradientAction : public MetaAction { private: - Rectangle maRect; + tools::Rectangle maRect; Gradient maGradient; public: @@ -868,12 +868,12 @@ public: virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override; virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override; - MetaGradientAction( const Rectangle& rRect, const Gradient& rGradient ); + MetaGradientAction( const tools::Rectangle& rRect, const Gradient& rGradient ); virtual void Move( long nHorzMove, long nVertMove ) override; virtual void Scale( double fScaleX, double fScaleY ) override; - const Rectangle& GetRect() const { return maRect; } + const tools::Rectangle& GetRect() const { return maRect; } const Gradient& GetGradient() const { return maGradient; } }; @@ -933,7 +933,7 @@ class VCL_DLLPUBLIC MetaWallpaperAction : public MetaAction { private: - Rectangle maRect; + tools::Rectangle maRect; Wallpaper maWallpaper; public: @@ -946,13 +946,13 @@ public: virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override; virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override; - MetaWallpaperAction( const Rectangle& rRect, + MetaWallpaperAction( const tools::Rectangle& rRect, const Wallpaper& rPaper ); virtual void Move( long nHorzMove, long nVertMove ) override; virtual void Scale( double fScaleX, double fScaleY ) override; - const Rectangle& GetRect() const { return maRect; } + const tools::Rectangle& GetRect() const { return maRect; } const Wallpaper& GetWallpaper() const { return maWallpaper; } }; @@ -986,7 +986,7 @@ class VCL_DLLPUBLIC MetaISectRectClipRegionAction : public MetaAction { private: - Rectangle maRect; + tools::Rectangle maRect; public: MetaISectRectClipRegionAction(); @@ -998,12 +998,12 @@ public: virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) override; virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) override; - explicit MetaISectRectClipRegionAction( const Rectangle& ); + explicit MetaISectRectClipRegionAction( const tools::Rectangle& ); virtual void Move( long nHorzMove, long nVertMove ) override; virtual void Scale( double fScaleX, double fScaleY ) override; - const Rectangle& GetRect() const { return maRect; } + const tools::Rectangle& GetRect() const { return maRect; } }; class VCL_DLLPUBLIC MetaISectRegionClipRegionAction : public MetaAction diff --git a/include/vcl/openglwin.hxx b/include/vcl/openglwin.hxx index 00a964323706..354a061fed96 100644 --- a/include/vcl/openglwin.hxx +++ b/include/vcl/openglwin.hxx @@ -41,7 +41,7 @@ public: void setRenderer(IRenderer* pRenderer); - 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 MouseButtonUp( const MouseEvent& rMEvt ) override; diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx index 90591a9c00a0..2c8017c97b54 100644 --- a/include/vcl/outdev.hxx +++ b/include/vcl/outdev.hxx @@ -146,7 +146,7 @@ namespace o3tl template<> struct typed_flags<SalLayoutFlags> : is_typed_flags<SalLayoutFlags, 0x2e77> {}; } -typedef std::vector< Rectangle > MetricVector; +typedef std::vector< tools::Rectangle > MetricVector; // OutputDevice-Types @@ -301,7 +301,7 @@ enum class OutDevViewType { DontKnow, PrintPreview, SlideShow }; typedef tools::SvRef<FontCharMap> FontCharMapRef; BmpMirrorFlags AdjustTwoRect( SalTwoRect& rTwoRect, const Size& rSizePix ); -void AdjustTwoRect( SalTwoRect& rTwoRect, const Rectangle& rValidSrcRect ); +void AdjustTwoRect( SalTwoRect& rTwoRect, const tools::Rectangle& rValidSrcRect ); class OutputDevice; @@ -678,7 +678,7 @@ public: bool IsClipRegion() const { return mbClipRegion; } void MoveClipRegion( long nHorzMove, long nVertMove ); - void IntersectClipRegion( const Rectangle& rRect ); + void IntersectClipRegion( const tools::Rectangle& rRect ); void IntersectClipRegion( const vcl::Region& rRegion ); virtual vcl::Region GetActiveClipRegion() const; @@ -686,7 +686,7 @@ public: protected: virtual void InitClipRegion(); - virtual void ClipToPaintRegion ( Rectangle& rDstRect ); + virtual void ClipToPaintRegion ( tools::Rectangle& rDstRect ); private: @@ -715,8 +715,8 @@ public: public: - void DrawRect( const Rectangle& rRect ); - void DrawRect( const Rectangle& rRect, + void DrawRect( const tools::Rectangle& rRect ); + void DrawRect( const tools::Rectangle& rRect, sal_uLong nHorzRount, sal_uLong nVertRound ); /// Fill the given rectangle with checkered rectangles of size nLen x nLen using the colors aStart and aEnd @@ -727,7 +727,7 @@ public: Color aStart = Color(COL_WHITE), Color aEnd = Color(COL_BLACK)); - void DrawGrid( const Rectangle& rRect, const Size& rDist, DrawGridFlags nFlags ); + void DrawGrid( const tools::Rectangle& rRect, const Size& rDist, DrawGridFlags nFlags ); ///@} @@ -735,7 +735,7 @@ public: */ ///@{ public: - void Invert( const Rectangle& rRect, InvertFlags nFlags = InvertFlags::NONE ); + void Invert( const tools::Rectangle& rRect, InvertFlags nFlags = InvertFlags::NONE ); void Invert( const tools::Polygon& rPoly, InvertFlags nFlags = InvertFlags::NONE ); ///@} @@ -865,18 +865,18 @@ private: public: - void DrawEllipse( const Rectangle& rRect ); + void DrawEllipse( const tools::Rectangle& rRect ); void DrawArc( - const Rectangle& rRect, + const tools::Rectangle& rRect, const Point& rStartPt, const Point& rEndPt ); void DrawPie( - const Rectangle& rRect, + const tools::Rectangle& rRect, const Point& rStartPt, const Point& rEndPt ); void DrawChord( - const Rectangle& rRect, + const tools::Rectangle& rRect, const Point& rStartPt, const Point& rEndPt ); ///@} @@ -887,11 +887,11 @@ public: ///@{ public: - void DrawGradient( const Rectangle& rRect, const Gradient& rGradient ); + void DrawGradient( const tools::Rectangle& rRect, const Gradient& rGradient ); void DrawGradient( const tools::PolyPolygon& rPolyPoly, const Gradient& rGradient ); void AddGradientActions( - const Rectangle& rRect, + const tools::Rectangle& rRect, const Gradient& rGradient, GDIMetaFile& rMtf ); @@ -903,14 +903,14 @@ protected: private: - SAL_DLLPRIVATE void DrawLinearGradient( const Rectangle& rRect, const Gradient& rGradient, const tools::PolyPolygon* pClipPolyPoly ); - SAL_DLLPRIVATE void DrawComplexGradient( const Rectangle& rRect, const Gradient& rGradient, const tools::PolyPolygon* pClipPolyPoly ); + SAL_DLLPRIVATE void DrawLinearGradient( const tools::Rectangle& rRect, const Gradient& rGradient, const tools::PolyPolygon* pClipPolyPoly ); + SAL_DLLPRIVATE void DrawComplexGradient( const tools::Rectangle& rRect, const Gradient& rGradient, const tools::PolyPolygon* pClipPolyPoly ); SAL_DLLPRIVATE void DrawGradientToMetafile( const tools::PolyPolygon& rPolyPoly, const Gradient& rGradient ); - SAL_DLLPRIVATE void DrawLinearGradientToMetafile( const Rectangle& rRect, const Gradient& rGradient ); - SAL_DLLPRIVATE void DrawComplexGradientToMetafile( const Rectangle& rRect, const Gradient& rGradient ); + SAL_DLLPRIVATE void DrawLinearGradientToMetafile( const tools::Rectangle& rRect, const Gradient& rGradient ); + SAL_DLLPRIVATE void DrawComplexGradientToMetafile( const tools::Rectangle& rRect, const Gradient& rGradient ); - SAL_DLLPRIVATE long GetGradientSteps( const Gradient& rGradient, const Rectangle& rRect, bool bMtf, bool bComplex=false ); + SAL_DLLPRIVATE long GetGradientSteps( const Gradient& rGradient, const tools::Rectangle& rRect, bool bMtf, bool bComplex=false ); SAL_DLLPRIVATE Color GetSingleColorGradientFill(); SAL_DLLPRIVATE void SetGrayscaleColors( Gradient &rGradient ); @@ -939,7 +939,7 @@ public: private: - SAL_DLLPRIVATE void CalcHatchValues( const Rectangle& rRect, long nDist, sal_uInt16 nAngle10, Point& rPt1, Point& rPt2, Size& rInc, Point& rEndPt1 ); + SAL_DLLPRIVATE void CalcHatchValues( const tools::Rectangle& rRect, long nDist, sal_uInt16 nAngle10, Point& rPt1, Point& rPt2, Size& rInc, Point& rEndPt1 ); SAL_DLLPRIVATE void DrawHatchLine( const tools::Line& rLine, const tools::PolyPolygon& rPolyPoly, Point* pPtBuffer, bool bMtf ); ///@} @@ -949,10 +949,10 @@ private: ///@{ public: - void DrawWallpaper( const Rectangle& rRect, const Wallpaper& rWallpaper ); + void DrawWallpaper( const tools::Rectangle& rRect, const Wallpaper& rWallpaper ); void Erase(); - void Erase( const Rectangle& rRect ) { DrawWallpaper( rRect, GetBackground() ); } + void Erase( const tools::Rectangle& rRect ) { DrawWallpaper( rRect, GetBackground() ); } protected: void DrawGradientWallpaper( long nX, long nY, long nWidth, long nHeight, const Wallpaper& rWallpaper ); @@ -974,12 +974,12 @@ public: sal_Int32 nIndex = 0, sal_Int32 nLen = -1, MetricVector* pVector = nullptr, OUString* pDisplayText = nullptr ); - void DrawText( const Rectangle& rRect, + void DrawText( const tools::Rectangle& rRect, const OUString& rStr, DrawTextFlags nStyle = DrawTextFlags::NONE, MetricVector* pVector = nullptr, OUString* pDisplayText = nullptr, vcl::ITextLayout* _pTextLayout = nullptr ); - static void ImplDrawText( OutputDevice& rTargetDevice, const Rectangle& rRect, + static void ImplDrawText( OutputDevice& rTargetDevice, const tools::Rectangle& rRect, const OUString& rOrigStr, DrawTextFlags nStyle, MetricVector* pVector, OUString* pDisplayText, vcl::ITextLayout& _rLayout ); @@ -1008,7 +1008,7 @@ public: bool ImplDrawRotateText( SalLayout& ); - Rectangle GetTextRect( const Rectangle& rRect, + tools::Rectangle GetTextRect( const tools::Rectangle& rRect, const OUString& rStr, DrawTextFlags nStyle = DrawTextFlags::WordBreak, TextRectInfo* pInfo = nullptr, const vcl::ITextLayout* _pTextLayout = nullptr ) const; @@ -1062,11 +1062,11 @@ public: Bitmap aBitmap(aDevice.GetBitmap(Point(0, 0), aDevice.GetOutputSize())); </code> */ - bool GetTextBoundRect( Rectangle& rRect, + bool GetTextBoundRect( tools::Rectangle& rRect, const OUString& rStr, sal_Int32 nBase = 0, sal_Int32 nIndex = 0, sal_Int32 nLen = -1, sal_uLong nLayoutWidth = 0, const long* pDXArray = nullptr ) const; - Rectangle ImplGetTextBoundRect( const SalLayout& ); + tools::Rectangle ImplGetTextBoundRect( const SalLayout& ); bool GetTextOutline( tools::PolyPolygon&, const OUString& rStr, @@ -1102,7 +1102,7 @@ public: constituent polygons. Parameter semantics fully compatible to DrawText(). */ - void AddTextRectActions( const Rectangle& rRect, + void AddTextRectActions( const tools::Rectangle& rRect, const OUString& rOrigStr, DrawTextFlags nStyle, GDIMetaFile& rMtf ); @@ -1225,7 +1225,7 @@ public: */ SystemFontData GetSysFontData( int nFallbacklevel ) const; - SAL_DLLPRIVATE void ImplGetEmphasisMark( tools::PolyPolygon& rPolyPoly, bool& rPolyLine, Rectangle& rRect1, Rectangle& rRect2, + SAL_DLLPRIVATE void ImplGetEmphasisMark( tools::PolyPolygon& rPolyPoly, bool& rPolyLine, tools::Rectangle& rRect1, tools::Rectangle& rRect2, long& rYOff, long& rWidth, FontEmphasisMark eEmphasis, long nHeight, short nOrient ); SAL_DLLPRIVATE static FontEmphasisMark ImplGetEmphasisMarkStyle( const vcl::Font& rFont ); @@ -1294,7 +1294,7 @@ private: SAL_DLLPRIVATE OUString ImplGetEllipsisString( const OutputDevice& rTargetDevice, const OUString& rStr, long nMaxWidth, DrawTextFlags nStyle, const vcl::ITextLayout& _rLayout ); - SAL_DLLPRIVATE void ImplDrawEmphasisMark( long nBaseX, long nX, long nY, const tools::PolyPolygon& rPolyPoly, bool bPolyLine, const Rectangle& rRect1, const Rectangle& rRect2 ); + SAL_DLLPRIVATE void ImplDrawEmphasisMark( long nBaseX, long nX, long nY, const tools::PolyPolygon& rPolyPoly, bool bPolyLine, const tools::Rectangle& rRect1, const tools::Rectangle& rRect2 ); SAL_DLLPRIVATE void ImplDrawEmphasisMarks( SalLayout& ); ///@} @@ -1311,7 +1311,7 @@ public: SAL_DLLPRIVATE bool ImplIsAntiparallel() const ; SAL_DLLPRIVATE void ReMirror( Point &rPoint ) const; - SAL_DLLPRIVATE void ReMirror( Rectangle &rRect ) const; + SAL_DLLPRIVATE void ReMirror( tools::Rectangle &rRect ) const; SAL_DLLPRIVATE void ReMirror( vcl::Region &rRegion ) const; SAL_DLLPRIVATE bool ImplIsRecordLayout() const; virtual bool HasMirroredGraphics() const; @@ -1505,7 +1505,7 @@ private: SAL_DLLPRIVATE void DrawDeviceAlphaBitmapSlowPath( const Bitmap& rBitmap, const AlphaMask& rAlpha, - Rectangle aDstRect, Rectangle aBmpRect, + tools::Rectangle aDstRect, tools::Rectangle aBmpRect, Size& aOutSz, Point& aOutPt); @@ -1521,7 +1521,7 @@ private: 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, @@ -1532,7 +1532,7 @@ private: 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, @@ -1689,7 +1689,7 @@ public: Point LogicToPixel( const Point& rLogicPt ) const; Size LogicToPixel( const Size& rLogicSize ) const; - Rectangle LogicToPixel( const Rectangle& rLogicRect ) const; + tools::Rectangle LogicToPixel( const tools::Rectangle& rLogicRect ) const; tools::Polygon LogicToPixel( const tools::Polygon& rLogicPoly ) const; tools::PolyPolygon LogicToPixel( const tools::PolyPolygon& rLogicPolyPoly ) const; basegfx::B2DPolyPolygon LogicToPixel( const basegfx::B2DPolyPolygon& rLogicPolyPoly ) const; @@ -1698,7 +1698,7 @@ public: const MapMode& rMapMode ) const; Size LogicToPixel( const Size& rLogicSize, const MapMode& rMapMode ) const; - Rectangle LogicToPixel( const Rectangle& rLogicRect, + tools::Rectangle LogicToPixel( const tools::Rectangle& rLogicRect, const MapMode& rMapMode ) const; tools::Polygon LogicToPixel( const tools::Polygon& rLogicPoly, const MapMode& rMapMode ) const; @@ -1707,7 +1707,7 @@ public: Point PixelToLogic( const Point& rDevicePt ) const; Size PixelToLogic( const Size& rDeviceSize ) const; - Rectangle PixelToLogic( const Rectangle& rDeviceRect ) const; + tools::Rectangle PixelToLogic( const tools::Rectangle& rDeviceRect ) const; tools::Polygon PixelToLogic( const tools::Polygon& rDevicePoly ) const; tools::PolyPolygon PixelToLogic( const tools::PolyPolygon& rDevicePolyPoly ) const; basegfx::B2DPolyPolygon PixelToLogic( const basegfx::B2DPolyPolygon& rDevicePolyPoly ) const; @@ -1716,7 +1716,7 @@ public: const MapMode& rMapMode ) const; Size PixelToLogic( const Size& rDeviceSize, const MapMode& rMapMode ) const; - Rectangle PixelToLogic( const Rectangle& rDeviceRect, + tools::Rectangle PixelToLogic( const tools::Rectangle& rDeviceRect, const MapMode& rMapMode ) const; tools::Polygon PixelToLogic( const tools::Polygon& rDevicePoly, const MapMode& rMapMode ) const; @@ -1731,7 +1731,7 @@ public: Size LogicToLogic( const Size& rSzSource, const MapMode* pMapModeSource, const MapMode* pMapModeDest ) const; - Rectangle LogicToLogic( const Rectangle& rRectSource, + tools::Rectangle LogicToLogic( const tools::Rectangle& rRectSource, const MapMode* pMapModeSource, const MapMode* pMapModeDest ) const; static Point LogicToLogic( const Point& rPtSource, @@ -1740,7 +1740,7 @@ public: static Size LogicToLogic( const Size& rSzSource, const MapMode& rMapModeSource, const MapMode& rMapModeDest ); - static Rectangle LogicToLogic( const Rectangle& rRectSource, + static tools::Rectangle LogicToLogic( const tools::Rectangle& rRectSource, const MapMode& rMapModeSource, const MapMode& rMapModeDest ); static long LogicToLogic( long nLongSource, @@ -1761,7 +1761,7 @@ public: @returns Rectangle based on physical device pixel coordinates and units. */ - SAL_DLLPRIVATE Rectangle ImplLogicToDevicePixel( const Rectangle& rLogicRect ) const; + SAL_DLLPRIVATE tools::Rectangle ImplLogicToDevicePixel( const tools::Rectangle& rLogicRect ) const; /** Convert a logical point to a physical point on the device. @@ -1791,7 +1791,7 @@ protected: * * @param pRectangle If 0, that means the whole area, otherwise the area in logic coordinates. */ - virtual void LogicInvalidate(const Rectangle* pRectangle) { (void)pRectangle; } + virtual void LogicInvalidate(const tools::Rectangle* pRectangle) { (void)pRectangle; } private: @@ -1880,7 +1880,7 @@ private: @returns Rectangle based on logical coordinates and units. */ - SAL_DLLPRIVATE Rectangle ImplDevicePixelToLogic( const Rectangle& rPixelRect ) const; + SAL_DLLPRIVATE tools::Rectangle ImplDevicePixelToLogic( const tools::Rectangle& rPixelRect ) const; /** Convert a logical polygon to a polygon in physical device pixel units. @@ -1944,7 +1944,7 @@ public: */ bool HitTestNativeScrollbar( ControlPart nPart, - const Rectangle& rControlRegion, + const tools::Rectangle& rControlRegion, const Point& aPos, bool& rIsInside ) const; @@ -1953,7 +1953,7 @@ public: bool DrawNativeControl( ControlType nType, ControlPart nPart, - const Rectangle& rControlRegion, + const tools::Rectangle& rControlRegion, ControlState nState, const ImplControlValue& aValue, const OUString& aCaption ); @@ -1963,12 +1963,12 @@ public: bool GetNativeControlRegion( ControlType nType, ControlPart nPart, - const Rectangle& rControlRegion, + const tools::Rectangle& rControlRegion, ControlState nState, const ImplControlValue& aValue, const OUString& aCaption, - Rectangle &rNativeBoundingRegion, - Rectangle &rNativeContentRegion ) const; + tools::Rectangle &rNativeBoundingRegion, + tools::Rectangle &rNativeContentRegion ) const; ///@} /** @name EPS functions diff --git a/include/vcl/pdfextoutdevdata.hxx b/include/vcl/pdfextoutdevdata.hxx index 23058141756a..c28663ae8232 100644 --- a/include/vcl/pdfextoutdevdata.hxx +++ b/include/vcl/pdfextoutdevdata.hxx @@ -183,13 +183,13 @@ public: */ void EndGroup( const Graphic& rGraphic, sal_uInt8 nTransparency, - const Rectangle& rOutputRect, - const Rectangle& rVisibleOutputRect ); + const tools::Rectangle& rOutputRect, + const tools::Rectangle& rVisibleOutputRect ); /// Detect if stream is compressed enough to avoid de-compress / scale & re-compress bool HasAdequateCompression( const Graphic &rGraphic, - const Rectangle &rOutputRect, - const Rectangle &rVisibleOutputRect ) const; + const tools::Rectangle &rOutputRect, + const tools::Rectangle &rVisibleOutputRect ) const; //--->i56629 /** Create a new named destination to be used in a link to this document from another PDF document @@ -209,7 +209,7 @@ public: the destination id (to be used in SetLinkDest) or -1 if page id does not exist */ - sal_Int32 CreateNamedDest( const OUString& sDestName, const Rectangle& rRect, sal_Int32 nPageNr = -1 ); + sal_Int32 CreateNamedDest( const OUString& sDestName, const tools::Rectangle& rRect, sal_Int32 nPageNr = -1 ); /** registers a destination for which a destination ID needs to be known immediately, instead of later on setting it via SetLinkDest. @@ -226,7 +226,7 @@ public: /** provides detailed information about a destination range which previously has been registered using RegisterDest. */ - void DescribeRegisteredDest( sal_Int32 nDestId, const Rectangle& rRect, sal_Int32 nPageNr, PDFWriter::DestAreaType eType = PDFWriter::DestAreaType::XYZ ); + void DescribeRegisteredDest( sal_Int32 nDestId, const tools::Rectangle& rRect, sal_Int32 nPageNr, PDFWriter::DestAreaType eType = PDFWriter::DestAreaType::XYZ ); //<---i56629 @@ -246,7 +246,7 @@ public: the destination id (to be used in SetLinkDest) or -1 if page id does not exist */ - sal_Int32 CreateDest( const Rectangle& rRect, sal_Int32 nPageNr = -1, PDFWriter::DestAreaType eType = PDFWriter::DestAreaType::XYZ ); + sal_Int32 CreateDest( const tools::Rectangle& rRect, sal_Int32 nPageNr = -1, PDFWriter::DestAreaType eType = PDFWriter::DestAreaType::XYZ ); /** Create a new link on a page @param rRect @@ -261,10 +261,10 @@ public: the link id (to be used in SetLinkDest, SetLinkURL) or -1 if page id does not exist */ - sal_Int32 CreateLink( const Rectangle& rRect, sal_Int32 nPageNr = -1 ); + sal_Int32 CreateLink( const tools::Rectangle& rRect, sal_Int32 nPageNr = -1 ); /// Create a Screen annotation. - sal_Int32 CreateScreen(const Rectangle& rRect, sal_Int32 nPageNr); + sal_Int32 CreateScreen(const tools::Rectangle& rRect, sal_Int32 nPageNr); /** Set the destination for a link <p>will change a URL type link to a dest link if necessary</p> @@ -334,7 +334,7 @@ public: number of page the note is on (as returned by NewPage) or -1 in which case the current page is used */ - void CreateNote( const Rectangle& rRect, const PDFNote& rNote, sal_Int32 nPageNr = -1 ); + void CreateNote( const tools::Rectangle& rRect, const PDFNote& rNote, sal_Int32 nPageNr = -1 ); /** begin a new logical structure element @@ -450,7 +450,7 @@ public: @param rRect the new bounding box for the structural element */ - void SetStructureBoundingBox( const Rectangle& rRect ); + void SetStructureBoundingBox( const tools::Rectangle& rRect ); /** set the ActualText attribute of a structural element diff --git a/include/vcl/pdfwriter.hxx b/include/vcl/pdfwriter.hxx index 7fbcebf7d149..147ffec67288 100644 --- a/include/vcl/pdfwriter.hxx +++ b/include/vcl/pdfwriter.hxx @@ -229,7 +229,7 @@ public: OUString Text; // user text to appear on the control DrawTextFlags TextStyle; // style flags bool ReadOnly; - Rectangle Location; // describes the area filled by the control + tools::Rectangle Location; // describes the area filled by the control bool Border; // true: widget should have a border, false: no border Color BorderColor;// COL_TRANSPARENT and Border=true means get color from application settings bool Background; // true: widget shall draw its background, false: no background @@ -737,7 +737,7 @@ The following structure describes the permissions used in PDF security void SetClipRegion(); void SetClipRegion( const basegfx::B2DPolyPolygon& rRegion ); void MoveClipRegion( long nHorzMove, long nVertMove ); - void IntersectClipRegion( const Rectangle& rRect ); + void IntersectClipRegion( const tools::Rectangle& rRect ); void IntersectClipRegion( const basegfx::B2DPolyPolygon& rRegion ); void SetLayoutMode( ComplexTextLayoutFlags nMode ); @@ -777,7 +777,7 @@ The following structure describes the permissions used in PDF security void DrawStretchText( const Point& rStartPt, sal_uLong nWidth, const OUString& rStr, sal_Int32 nIndex, sal_Int32 nLen ); - void DrawText( const Rectangle& rRect, + void DrawText( const tools::Rectangle& rRect, const OUString& rStr, DrawTextFlags nStyle ); void DrawPixel( const Point& rPt, const Color& rColor ); @@ -793,15 +793,15 @@ The following structure describes the permissions used in PDF security void DrawPolyLine( const tools::Polygon& rPoly, const ExtLineInfo& rInfo ); void DrawPolygon( const tools::Polygon& rPoly ); void DrawPolyPolygon( const tools::PolyPolygon& rPolyPoly ); - void DrawRect( const Rectangle& rRect ); - void DrawRect( const Rectangle& rRect, + void DrawRect( const tools::Rectangle& rRect ); + void DrawRect( const tools::Rectangle& rRect, sal_uLong nHorzRount, sal_uLong nVertRound ); - void DrawEllipse( const Rectangle& rRect ); - void DrawArc( const Rectangle& rRect, + void DrawEllipse( const tools::Rectangle& rRect ); + void DrawArc( const tools::Rectangle& rRect, const Point& rStartPt, const Point& rEndPt ); - void DrawPie( const Rectangle& rRect, + void DrawPie( const tools::Rectangle& rRect, const Point& rStartPt, const Point& rEndPt ); - void DrawChord( const Rectangle& rRect, + void DrawChord( const tools::Rectangle& rRect, const Point& rStartPt, const Point& rEndPt ); void DrawBitmap( const Point& rDestPt, const Size& rDestSize, @@ -810,12 +810,12 @@ The following structure describes the permissions used in PDF security void DrawBitmapEx( const Point& rDestPt, const Size& rDestSize, const BitmapEx& rBitmapEx ); - void DrawGradient( const Rectangle& rRect, const Gradient& rGradient ); + void DrawGradient( const tools::Rectangle& rRect, const Gradient& rGradient ); void DrawGradient( const tools::PolyPolygon& rPolyPoly, const Gradient& rGradient ); void DrawHatch( const tools::PolyPolygon& rPolyPoly, const Hatch& rHatch ); - void DrawWallpaper( const Rectangle& rRect, const Wallpaper& rWallpaper ); + void DrawWallpaper( const tools::Rectangle& rRect, const Wallpaper& rWallpaper ); void DrawTransparent( const tools::PolyPolygon& rPolyPoly, sal_uInt16 nTransparencePercent ); @@ -850,7 +850,7 @@ The following structure describes the permissions used in PDF security @param nTransparencePercent The transparency factor */ - void EndTransparencyGroup( const Rectangle& rBoundRect, sal_uInt16 nTransparencePercent ); + void EndTransparencyGroup( const tools::Rectangle& rBoundRect, sal_uInt16 nTransparencePercent ); /** Insert a JPG encoded image (optionally with mask) @@ -871,7 +871,7 @@ The following structure describes the permissions used in PDF security the same pixel size as the image and be either 1 bit black&white or 8 bit grey */ - void DrawJPGBitmap( SvStream& rJPGData, bool bIsTrueColor, const Size& rSrcSizePixel, const Rectangle& rTargetArea, const Bitmap& rMask, const Graphic& rGraphic ); + void DrawJPGBitmap( SvStream& rJPGData, bool bIsTrueColor, const Size& rSrcSizePixel, const tools::Rectangle& rTargetArea, const Bitmap& rMask, const Graphic& rGraphic ); /** Create a new named destination to be used in a link from another PDF document @@ -892,7 +892,7 @@ The following structure describes the permissions used in PDF security the destination id (to be used in SetLinkDest) or -1 if page id does not exist */ - sal_Int32 CreateNamedDest( const OUString& sDestName, const Rectangle& rRect, sal_Int32 nPageNr, DestAreaType eType ); + sal_Int32 CreateNamedDest( const OUString& sDestName, const tools::Rectangle& rRect, sal_Int32 nPageNr, DestAreaType eType ); /** Create a new destination to be used in a link @param rRect @@ -909,7 +909,7 @@ The following structure describes the permissions used in PDF security the destination id (to be used in SetLinkDest) or -1 if page id does not exist */ - sal_Int32 CreateDest( const Rectangle& rRect, sal_Int32 nPageNr, DestAreaType eType ); + sal_Int32 CreateDest( const tools::Rectangle& rRect, sal_Int32 nPageNr, DestAreaType eType ); /** Create a new link on a page @param rRect @@ -924,10 +924,10 @@ The following structure describes the permissions used in PDF security the link id (to be used in SetLinkDest, SetLinkURL) or -1 if page id does not exist */ - sal_Int32 CreateLink( const Rectangle& rRect, sal_Int32 nPageNr ); + sal_Int32 CreateLink( const tools::Rectangle& rRect, sal_Int32 nPageNr ); /// Creates a screen annotation. - sal_Int32 CreateScreen(const Rectangle& rRect, sal_Int32 nPageNr); + sal_Int32 CreateScreen(const tools::Rectangle& rRect, sal_Int32 nPageNr); /** creates a destination which is not intended to be referred to by a link, but by a public destination Id. @@ -951,7 +951,7 @@ The following structure describes the permissions used in PDF security @returns the internal destination Id. */ - sal_Int32 RegisterDestReference( sal_Int32 nDestId, const Rectangle& rRect, sal_Int32 nPageNr, DestAreaType eType ); + sal_Int32 RegisterDestReference( sal_Int32 nDestId, const tools::Rectangle& rRect, sal_Int32 nPageNr, DestAreaType eType ); /** Set the destination for a link @@ -1039,7 +1039,7 @@ The following structure describes the permissions used in PDF security number of page the note is on (as returned by NewPage) or -1 in which case the current page is used */ - void CreateNote( const Rectangle& rRect, const PDFNote& rNote, sal_Int32 nPageNr ); + void CreateNote( const tools::Rectangle& rRect, const PDFNote& rNote, sal_Int32 nPageNr ); /** begin a new logical structure element @@ -1157,7 +1157,7 @@ The following structure describes the permissions used in PDF security @param rRect the new bounding box for the structural element */ - void SetStructureBoundingBox( const Rectangle& rRect ); + void SetStructureBoundingBox( const tools::Rectangle& rRect ); /** set the ActualText attribute of a structural element diff --git a/include/vcl/prgsbar.hxx b/include/vcl/prgsbar.hxx index 364c6ea312e7..fcdad3fac97f 100644 --- a/include/vcl/prgsbar.hxx +++ b/include/vcl/prgsbar.hxx @@ -65,7 +65,7 @@ private: public: ProgressBar( vcl::Window* pParent, WinBits nWinBits ); - 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 StateChanged( StateChangedType nStateChange ) override; virtual void DataChanged( const DataChangedEvent& rDCEvt ) override; diff --git a/include/vcl/print.hxx b/include/vcl/print.hxx index 24fd13bafa61..a5ccedd4f3e6 100644 --- a/include/vcl/print.hxx +++ b/include/vcl/print.hxx @@ -242,7 +242,7 @@ protected: void ScaleBitmap ( Bitmap&, SalTwoRect& ) override { }; public: - void DrawGradientEx( OutputDevice* pOut, const Rectangle& rRect, + void DrawGradientEx( OutputDevice* pOut, const tools::Rectangle& rRect, const Gradient& rGradient ); virtual Bitmap GetBitmap( const Point& rSrcPt, const Size& rSize ) const override; diff --git a/include/vcl/region.hxx b/include/vcl/region.hxx index 1235b3dddcec..a7458358127c 100644 --- a/include/vcl/region.hxx +++ b/include/vcl/region.hxx @@ -37,7 +37,7 @@ namespace vcl { class Window; } class OutputDevice; class Bitmap; -typedef std::vector< Rectangle > RectangleVector; +typedef std::vector< tools::Rectangle > RectangleVector; namespace vcl { @@ -68,7 +68,7 @@ private: public: explicit Region(bool bIsNull = false); // default creates empty region, with true a null region is created - explicit Region(const Rectangle& rRect); + explicit Region(const tools::Rectangle& rRect); explicit Region(const tools::Polygon& rPolygon); explicit Region(const tools::PolyPolygon& rPolyPoly); explicit Region(const basegfx::B2DPolyPolygon&); @@ -90,10 +90,10 @@ public: // manipulators void Move( long nHorzMove, long nVertMove ); void Scale( double fScaleX, double fScaleY ); - bool Union( const Rectangle& rRegion ); - bool Intersect( const Rectangle& rRegion ); - bool Exclude( const Rectangle& rRegion ); - bool XOr( const Rectangle& rRegion ); + bool Union( const tools::Rectangle& rRegion ); + bool Intersect( const tools::Rectangle& rRegion ); + bool Exclude( const tools::Rectangle& rRegion ); + bool XOr( const tools::Rectangle& rRegion ); bool Union( const vcl::Region& rRegion ); bool Intersect( const vcl::Region& rRegion ); bool Exclude( const vcl::Region& rRegion ); @@ -107,16 +107,16 @@ public: bool IsRectangle() const; - Rectangle GetBoundRect() const; + tools::Rectangle GetBoundRect() const; bool HasPolyPolygonOrB2DPolyPolygon() const { return (getB2DPolyPolygon() || getPolyPolygon()); } void GetRegionRectangles(RectangleVector& rTarget) const; bool IsInside( const Point& rPoint ) const; - bool IsOver( const Rectangle& rRect ) const; + bool IsOver( const tools::Rectangle& rRect ) const; vcl::Region& operator=( const vcl::Region& rRegion ); vcl::Region& operator=( vcl::Region&& rRegion ); - vcl::Region& operator=( const Rectangle& rRect ); + vcl::Region& operator=( const tools::Rectangle& rRect ); bool operator==( const vcl::Region& rRegion ) const; bool operator!=( const vcl::Region& rRegion ) const { return !(Region::operator==( rRegion )); } diff --git a/include/vcl/salnativewidgets.hxx b/include/vcl/salnativewidgets.hxx index 2d392b596897..98cbc1953f5f 100644 --- a/include/vcl/salnativewidgets.hxx +++ b/include/vcl/salnativewidgets.hxx @@ -291,9 +291,9 @@ class VCL_DLLPUBLIC ScrollbarValue : public ImplControlValue long mnMax; long mnCur; long mnVisibleSize; - Rectangle maThumbRect; - Rectangle maButton1Rect; - Rectangle maButton2Rect; + tools::Rectangle maThumbRect; + tools::Rectangle maButton1Rect; + tools::Rectangle maButton2Rect; ControlState mnButton1State; ControlState mnButton2State; ControlState mnThumbState; @@ -317,7 +317,7 @@ class VCL_DLLPUBLIC SliderValue : public ImplControlValue long mnMin; long mnMax; long mnCur; - Rectangle maThumbRect; + tools::Rectangle maThumbRect; ControlState mnThumbState; SliderValue() @@ -351,9 +351,9 @@ class VCL_DLLPUBLIC TabitemValue : public ImplControlValue { public: TabitemFlags mnAlignment; - Rectangle maContentRect; + tools::Rectangle maContentRect; - TabitemValue(const Rectangle &rContentRect) + TabitemValue(const tools::Rectangle &rContentRect) : ImplControlValue( ControlType::TabItem, 0 ) , mnAlignment(TabitemFlags::NONE) , maContentRect(rContentRect) @@ -368,7 +368,7 @@ class VCL_DLLPUBLIC TabitemValue : public ImplControlValue bool isNotAligned() const { return !(mnAlignment & (TabitemFlags::LeftAligned | TabitemFlags::RightAligned)); } bool isFirst() const { return bool(mnAlignment & TabitemFlags::FirstInGroup); } bool isLast() const { return bool(mnAlignment & TabitemFlags::LastInGroup); } - const Rectangle& getContentRect() const { return maContentRect; } + const tools::Rectangle& getContentRect() const { return maContentRect; } }; /* SpinbuttonValue: @@ -380,8 +380,8 @@ class VCL_DLLPUBLIC TabitemValue : public ImplControlValue class VCL_DLLPUBLIC SpinbuttonValue : public ImplControlValue { public: - Rectangle maUpperRect; - Rectangle maLowerRect; + tools::Rectangle maUpperRect; + tools::Rectangle maLowerRect; ControlState mnUpperState; ControlState mnLowerState; ControlPart mnUpperPart; @@ -411,7 +411,7 @@ public: { mbIsTopDockingArea = false; } virtual ~ToolbarValue() override; virtual ToolbarValue* clone() const override; - Rectangle maGripRect; + tools::Rectangle maGripRect; bool mbIsTopDockingArea; // indicates that this is the top aligned dockingarea // adjacent to the menubar }; @@ -438,13 +438,13 @@ public: class VCL_DLLPUBLIC MenupopupValue : public ImplControlValue { public: - MenupopupValue( long i_nGutterWidth, const Rectangle& i_rItemRect ) + MenupopupValue( long i_nGutterWidth, const tools::Rectangle& i_rItemRect ) : ImplControlValue( ControlType::MenuPopup, i_nGutterWidth ) , maItemRect( i_rItemRect ) {} virtual ~MenupopupValue() override; virtual MenupopupValue* clone() const override; - Rectangle maItemRect; + tools::Rectangle maItemRect; }; /* PushButtonValue: diff --git a/include/vcl/scrbar.hxx b/include/vcl/scrbar.hxx index 110ef9f9aff2..73d4cc69ddf7 100644 --- a/include/vcl/scrbar.hxx +++ b/include/vcl/scrbar.hxx @@ -41,12 +41,12 @@ struct ImplScrollBarData; class VCL_DLLPUBLIC ScrollBar : public Control { private: - Rectangle maBtn1Rect; - Rectangle maBtn2Rect; - Rectangle maPage1Rect; - Rectangle maPage2Rect; - Rectangle maThumbRect; - Rectangle maTrackRect; + tools::Rectangle maBtn1Rect; + tools::Rectangle maBtn2Rect; + tools::Rectangle maPage1Rect; + tools::Rectangle maPage2Rect; + tools::Rectangle maThumbRect; + tools::Rectangle maTrackRect; ImplScrollBarData* mpData; long mnStartPos; long mnMouseOff; @@ -68,7 +68,7 @@ private: Link<ScrollBar*,void> maScrollHdl; Link<ScrollBar*,void> maEndScrollHdl; - SAL_DLLPRIVATE Rectangle* ImplFindPartRect( const Point& rPt ); + SAL_DLLPRIVATE tools::Rectangle* ImplFindPartRect( const Point& rPt ); using Window::ImplInit; SAL_DLLPRIVATE void ImplInit( vcl::Window* pParent, WinBits nStyle ); SAL_DLLPRIVATE void ImplInitStyle( WinBits nStyle ); @@ -95,7 +95,7 @@ public: virtual void MouseButtonDown(const MouseEvent& rMEvt) override; virtual void Tracking(const TrackingEvent& rTEvt) override; virtual void KeyInput(const KeyEvent& rKEvt) override; - virtual void Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) override; + virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) override; virtual void Draw(OutputDevice* pDev, const Point& rPos, const Size& rSize, DrawFlags nFlags) override; virtual void Resize() override; virtual void StateChanged(StateChangedType nType) override; diff --git a/include/vcl/seleng.hxx b/include/vcl/seleng.hxx index 430fe3af03fe..9b1c269e2582 100644 --- a/include/vcl/seleng.hxx +++ b/include/vcl/seleng.hxx @@ -79,7 +79,7 @@ class VCL_DLLPUBLIC SelectionEngine private: FunctionSet* pFunctionSet; VclPtr<vcl::Window> pWin; - Rectangle aArea; + tools::Rectangle aArea; Timer aWTimer; // generate fake mouse moves MouseEvent aLastMove; SelectionMode eSelMode; @@ -113,7 +113,7 @@ public: // is needed to generate a Move event via a Timer // when the mouse is outside the area - void SetVisibleArea( const Rectangle& rNewArea ) + void SetVisibleArea( const tools::Rectangle& rNewArea ) { aArea = rNewArea; } void SetAddMode( bool); diff --git a/include/vcl/slider.hxx b/include/vcl/slider.hxx index 72d4bc9c313a..996fc136b125 100644 --- a/include/vcl/slider.hxx +++ b/include/vcl/slider.hxx @@ -28,9 +28,9 @@ class VCL_DLLPUBLIC Slider : public Control { private: - Rectangle maChannel1Rect; - Rectangle maChannel2Rect; - Rectangle maThumbRect; + tools::Rectangle maChannel1Rect; + tools::Rectangle maChannel2Rect; + tools::Rectangle maThumbRect; long mnStartPos; long mnMouseOff; long mnThumbPixOffset; @@ -86,7 +86,7 @@ public: virtual void MouseButtonUp( const MouseEvent& rMEvt ) override; virtual void Tracking( const TrackingEvent& rTEvt ) override; virtual void KeyInput( const KeyEvent& rKEvt ) 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 StateChanged( StateChangedType nType ) override; virtual void DataChanged( const DataChangedEvent& rDCEvt ) override; diff --git a/include/vcl/spin.hxx b/include/vcl/spin.hxx index 95655b7b9192..3d77fa5c1f06 100644 --- a/include/vcl/spin.hxx +++ b/include/vcl/spin.hxx @@ -30,9 +30,9 @@ class VCL_DLLPUBLIC SpinButton : public Control { private: AutoTimer maRepeatTimer; - Rectangle maUpperRect; - Rectangle maLowerRect; - Rectangle maFocusRect; + tools::Rectangle maUpperRect; + tools::Rectangle maLowerRect; + tools::Rectangle maFocusRect; bool mbRepeat : 1; bool mbUpperIn : 1; bool mbLowerIn : 1; @@ -45,7 +45,7 @@ private: long mnValue; long mnValueStep; - SAL_DLLPRIVATE Rectangle* ImplFindPartRect( const Point& rPt ); + SAL_DLLPRIVATE tools::Rectangle* ImplFindPartRect( const Point& rPt ); using Window::ImplInit; SAL_DLLPRIVATE void ImplInit( vcl::Window* pParent, WinBits nStyle ); DECL_DLLPRIVATE_LINK( ImplTimeout, Timer*, void ); @@ -57,7 +57,7 @@ public: void Down(); 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 Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, DrawFlags nFlags ) override; virtual void MouseButtonDown( const MouseEvent& rMEvt ) override; virtual void MouseButtonUp( const MouseEvent& rMEvt ) override; diff --git a/include/vcl/spinfld.hxx b/include/vcl/spinfld.hxx index 7549aa5fb46f..50c6afc3d748 100644 --- a/include/vcl/spinfld.hxx +++ b/include/vcl/spinfld.hxx @@ -43,7 +43,7 @@ public: virtual void MouseButtonDown( const MouseEvent& rMEvt ) override; virtual void MouseButtonUp( const MouseEvent& rMEvt ) override; virtual void MouseMove( const MouseEvent& rMEvt ) override; - virtual void Paint( vcl::RenderContext& rRenderContext, const Rectangle& rRect ) override; + virtual void Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect ) override; virtual void Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, DrawFlags nFlags ) override; virtual void Resize() override; virtual void StateChanged( StateChangedType nType ) override; @@ -64,9 +64,9 @@ public: virtual FactoryFunction GetUITestFactory() const override; protected: - Rectangle maUpperRect; - Rectangle maLowerRect; - Rectangle maDropDownRect; // noch nicht angebunden... + tools::Rectangle maUpperRect; + tools::Rectangle maLowerRect; + tools::Rectangle maDropDownRect; // noch nicht angebunden... using Window::ImplInit; SAL_DLLPRIVATE void ImplInit( vcl::Window* pParent, WinBits nStyle ); @@ -76,12 +76,12 @@ protected: void EndDropDown(); virtual void FillLayoutData() const override; - Rectangle * ImplFindPartRect( const Point& rPt ); + tools::Rectangle * ImplFindPartRect( const Point& rPt ); private: DECL_DLLPRIVATE_LINK( ImplTimeout, Timer*, void ); SAL_DLLPRIVATE void ImplInitSpinFieldData(); - SAL_DLLPRIVATE void ImplCalcButtonAreas( OutputDevice* pDev, const Size& rOutSz, Rectangle& rDDArea, Rectangle& rSpinUpArea, Rectangle& rSpinDownArea ); + SAL_DLLPRIVATE void ImplCalcButtonAreas( OutputDevice* pDev, const Size& rOutSz, tools::Rectangle& rDDArea, tools::Rectangle& rSpinUpArea, tools::Rectangle& rSpinDownArea ); VclPtr<Edit> mpEdit; AutoTimer maRepeatTimer; diff --git a/include/vcl/split.hxx b/include/vcl/split.hxx index 853163d2aace..448894d746ec 100644 --- a/include/vcl/split.hxx +++ b/include/vcl/split.hxx @@ -33,7 +33,7 @@ private: long mnLastSplitPos; long mnStartSplitPos; Point maDragPos; - Rectangle maDragRect; + tools::Rectangle maDragRect; bool mbHorzSplit; bool mbDragFull; bool mbKbdSplitting; @@ -74,14 +74,14 @@ public: virtual void GetFocus() override; virtual void LoseFocus() override; virtual void KeyInput( const KeyEvent& rKEvt ) override; - virtual void Paint( vcl::RenderContext& rRenderContext, const Rectangle& rPaintRect ) override; + virtual void Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& rPaintRect ) override; virtual Size GetOptimalSize() const override; virtual void DataChanged( const DataChangedEvent& rDCEvt ) override; void StartDrag(); - void SetDragRectPixel( const Rectangle& rDragRect, + void SetDragRectPixel( const tools::Rectangle& rDragRect, vcl::Window* pRefWin = nullptr ); void SetSplitPosPixel( long nPos ); diff --git a/include/vcl/splitwin.hxx b/include/vcl/splitwin.hxx index e32c999fac43..18d40e6431bc 100644 --- a/include/vcl/splitwin.hxx +++ b/include/vcl/splitwin.hxx @@ -51,7 +51,7 @@ private: ImplSplitSet* mpBaseSet; ImplSplitSet* mpSplitSet; long* mpLastSizes; - Rectangle maDragRect; + tools::Rectangle maDragRect; long mnDX; long mnDY; long mnLeftBorder; @@ -89,13 +89,13 @@ private: SAL_DLLPRIVATE void ImplUpdate(); SAL_DLLPRIVATE void ImplSetWindowSize( long nDelta ); SAL_DLLPRIVATE void ImplSplitMousePos( Point& rMousePos ); - SAL_DLLPRIVATE void ImplGetButtonRect( Rectangle& rRect, long nEx, bool bTest ) const; - SAL_DLLPRIVATE void ImplGetFadeInRect( Rectangle& rRect, bool bTest = false ) const; - SAL_DLLPRIVATE void ImplGetFadeOutRect( Rectangle& rRect, bool bTest = false ) const; + SAL_DLLPRIVATE void ImplGetButtonRect( tools::Rectangle& rRect, long nEx, bool bTest ) const; + SAL_DLLPRIVATE void ImplGetFadeInRect( tools::Rectangle& rRect, bool bTest = false ) const; + SAL_DLLPRIVATE void ImplGetFadeOutRect( tools::Rectangle& rRect, bool bTest = false ) const; SAL_DLLPRIVATE void ImplDrawFadeIn(vcl::RenderContext& rRenderContext); SAL_DLLPRIVATE void ImplDrawFadeOut(vcl::RenderContext& rRenderContext); SAL_DLLPRIVATE void ImplNewAlign(); - SAL_DLLPRIVATE void ImplDrawGrip(vcl::RenderContext& rRenderContext, const Rectangle& rRect, bool bHorz, bool bLeft); + SAL_DLLPRIVATE void ImplDrawGrip(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect, bool bHorz, bool bLeft); SAL_DLLPRIVATE void ImplStartSplit( const MouseEvent& rMEvt ); SAL_DLLPRIVATE void ImplDrawBorder(vcl::RenderContext& rRenderContext); @@ -103,7 +103,7 @@ private: static SAL_DLLPRIVATE void ImplCalcSet2( SplitWindow* pWindow, ImplSplitSet* pSet, bool bHide, bool bRows, bool bDown = true ); SAL_DLLPRIVATE void ImplDrawBack(vcl::RenderContext& rRenderContext, ImplSplitSet* pSet ); - SAL_DLLPRIVATE static void ImplDrawBack(vcl::RenderContext& rRenderContext, const Rectangle& rRect, + SAL_DLLPRIVATE static void ImplDrawBack(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect, const Wallpaper* pWall, const Bitmap* pBitmap ); static SAL_DLLPRIVATE sal_uInt16 ImplTestSplit( ImplSplitSet* pSet, const Point& rPos, long& rMouseOff, ImplSplitSet** ppFoundSet, sal_uInt16& rFoundPos, @@ -128,7 +128,7 @@ public: virtual void MouseButtonDown( const MouseEvent& rMEvt ) override; virtual void MouseMove( const MouseEvent& rMEvt ) override; virtual void Tracking( const TrackingEvent& rTEvt ) override; - virtual void Paint( vcl::RenderContext& rRenderContext, const Rectangle& rRect ) override; + virtual void Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect ) override; virtual void Resize() override; virtual void RequestHelp( const HelpEvent& rHEvt ) override; virtual void StateChanged( StateChangedType nType ) override; diff --git a/include/vcl/status.hxx b/include/vcl/status.hxx index 518ba6ab4a62..1b27844b318b 100644 --- a/include/vcl/status.hxx +++ b/include/vcl/status.hxx @@ -31,7 +31,7 @@ struct ImplStatusItem; void VCL_DLLPUBLIC 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); enum class StatusBarItemBits { @@ -63,7 +63,7 @@ private: ImplData* mpImplData; OUString maPrgsTxt; Point maPrgsTxtPos; - Rectangle maPrgsFrameRect; + tools::Rectangle maPrgsFrameRect; long mnPrgsSize; long mnItemsWidth; long mnDX; @@ -93,7 +93,7 @@ private: sal_uInt16 nPos); SAL_DLLPRIVATE void ImplDrawProgress(vcl::RenderContext& rRenderContext, sal_uInt16 nNewPerc); SAL_DLLPRIVATE void ImplCalcProgressRect(); - SAL_DLLPRIVATE Rectangle ImplGetItemRectPos( sal_uInt16 nPos ) const; + SAL_DLLPRIVATE tools::Rectangle ImplGetItemRectPos( sal_uInt16 nPos ) const; SAL_DLLPRIVATE sal_uInt16 ImplGetFirstVisiblePos() const; protected: @@ -108,7 +108,7 @@ public: void AdjustItemWidthsForHiDPI(); virtual void MouseButtonDown( const MouseEvent& rMEvt ) override; - virtual void Paint( vcl::RenderContext& rRenderContext, const Rectangle& rRect ) override; + virtual void Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect ) override; virtual void Resize() override; virtual void RequestHelp( const HelpEvent& rHEvt ) override; virtual void StateChanged( StateChangedType nType ) override; @@ -138,7 +138,7 @@ public: sal_uInt16 GetItemId( sal_uInt16 nPos ) const; sal_uInt16 GetItemId( const Point& rPos ) const; sal_uInt16 GetItemPos( sal_uInt16 nItemId ) const; - Rectangle GetItemRect( sal_uInt16 nItemId ) const; + tools::Rectangle GetItemRect( sal_uInt16 nItemId ) const; Point GetItemTextPos( sal_uInt16 nItemId ) const; sal_uInt16 GetCurItemId() const { return mnCurItemId; } diff --git a/include/vcl/svapp.hxx b/include/vcl/svapp.hxx index 0af0d3862488..0891859c79e1 100644 --- a/include/vcl/svapp.hxx +++ b/include/vcl/svapp.hxx @@ -982,7 +982,7 @@ public: @see GetScreenCount */ - static Rectangle GetScreenPosSizePixel( unsigned int nScreen ); + static tools::Rectangle GetScreenPosSizePixel( unsigned int nScreen ); /** Determines if the screens that make up a display are separate or form one large display area. @@ -1006,7 +1006,7 @@ public: @see IsUnifiedDisplay, GetDisplayBuiltInScreen */ - SAL_DLLPRIVATE static unsigned int GetBestScreen( const Rectangle& ); + SAL_DLLPRIVATE static unsigned int GetBestScreen( const tools::Rectangle& ); /** Get the built-in screen. diff --git a/include/vcl/tabctrl.hxx b/include/vcl/tabctrl.hxx index bdc1d3289a58..2032b7eb1bce 100644 --- a/include/vcl/tabctrl.hxx +++ b/include/vcl/tabctrl.hxx @@ -66,13 +66,13 @@ protected: SAL_DLLPRIVATE void ImplInitSettings( bool bFont, bool bForeground, bool bBackground ); SAL_DLLPRIVATE ImplTabItem* ImplGetItem( sal_uInt16 nId ) const; SAL_DLLPRIVATE Size ImplGetItemSize( ImplTabItem* pItem, long nMaxWidth ); - SAL_DLLPRIVATE Rectangle ImplGetTabRect( sal_uInt16 nPos, long nWidth = -1, long nHeight = -1 ); + SAL_DLLPRIVATE tools::Rectangle ImplGetTabRect( sal_uInt16 nPos, long nWidth = -1, long nHeight = -1 ); SAL_DLLPRIVATE void ImplChangeTabPage( sal_uInt16 nId, sal_uInt16 nOldId ); SAL_DLLPRIVATE bool ImplPosCurTabPage(); virtual void ImplActivateTabPage( bool bNext ); SAL_DLLPRIVATE void ImplShowFocus(); SAL_DLLPRIVATE void ImplDrawItem(vcl::RenderContext& rRenderContext, ImplTabItem* pItem, - const Rectangle& rCurRect, bool bFirstInGroup, + const tools::Rectangle& rCurRect, bool bFirstInGroup, bool bLastInGroup, bool bIsCurrentItem); SAL_DLLPRIVATE void ImplFreeLayoutData(); SAL_DLLPRIVATE bool ImplHandleKeyEvent( const KeyEvent& rKeyEvent ); @@ -86,9 +86,9 @@ protected: virtual void FillLayoutData() const override; virtual const vcl::Font& GetCanonicalFont( const StyleSettings& _rStyle ) const override; virtual const Color& GetCanonicalTextColor( const StyleSettings& _rStyle ) const override; - SAL_DLLPRIVATE Rectangle* ImplFindPartRect( const Point& rPt ); + SAL_DLLPRIVATE tools::Rectangle* ImplFindPartRect( const Point& rPt ); virtual bool ImplPlaceTabs( long nWidth ); - virtual void ImplPaint(vcl::RenderContext& rRenderContext, const Rectangle& rRect); + virtual void ImplPaint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect); public: TabControl( vcl::Window* pParent, @@ -98,7 +98,7 @@ public: virtual void MouseButtonDown( const MouseEvent& rMEvt ) override; virtual void KeyInput( const KeyEvent& rKEvt ) override; - virtual void Paint( vcl::RenderContext& rRenderContext, const Rectangle& rRect ) override; + virtual void Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect ) override; virtual void Resize() override; virtual void GetFocus() override; virtual void LoseFocus() override; @@ -165,7 +165,7 @@ public: // returns (control relative) bounding rectangle for the // character at index nIndex relative to the text of page nPageId using Control::GetCharacterBounds; - Rectangle GetCharacterBounds( sal_uInt16 nPageId, long nIndex ) const; + tools::Rectangle GetCharacterBounds( sal_uInt16 nPageId, long nIndex ) const; // returns the index relative to the text of page nPageId (also returned) // at position rPoint (control relative) @@ -173,7 +173,7 @@ public: long GetIndexForPoint( const Point& rPoint, sal_uInt16& rPageId ) const; // returns the rectangle of the tab for page nPageId - Rectangle GetTabBounds( sal_uInt16 nPageId ) const; + tools::Rectangle GetTabBounds( sal_uInt16 nPageId ) const; virtual void SetPosPixel(const Point& rPos) override; virtual void SetSizePixel(const Size& rNewSize) override; @@ -212,7 +212,7 @@ public: protected: virtual bool ImplPlaceTabs( long nWidth ) override; - virtual void ImplPaint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) override; + virtual void ImplPaint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) override; virtual void ImplActivateTabPage( bool bNext ) override; private: diff --git a/include/vcl/tabpage.hxx b/include/vcl/tabpage.hxx index edf9da15d52f..a837ee2761e4 100644 --- a/include/vcl/tabpage.hxx +++ b/include/vcl/tabpage.hxx @@ -43,7 +43,7 @@ public: virtual ~TabPage() override; virtual void dispose() override; - virtual void Paint( vcl::RenderContext& rRenderContext, const Rectangle& rRect ) override; + virtual void Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect ) override; virtual void Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, DrawFlags nFlags ) override; virtual void StateChanged( StateChangedType nStateChange ) override; diff --git a/include/vcl/texteng.hxx b/include/vcl/texteng.hxx index 9e2a74b68785..e8751bbf096f 100644 --- a/include/vcl/texteng.hxx +++ b/include/vcl/texteng.hxx @@ -110,7 +110,7 @@ private: css::uno::Reference< css::i18n::XBreakIterator > mxBreakIterator; css::uno::Reference < css::i18n::XExtendedInputSequenceChecker > mxISC; - Rectangle maInvalidRect; + tools::Rectangle maInvalidRect; LocaleDataWrapper* mpLocaleDataWrapper; @@ -189,12 +189,12 @@ protected: bool IsFormatting() const { return mbIsFormatting; } void UpdateViews( TextView* pCurView = nullptr ); - void ImpPaint( OutputDevice* pOut, const Point& rStartPos, Rectangle const* pPaintArea, TextSelection const* pSelection = nullptr ); + void ImpPaint( OutputDevice* pOut, const Point& rStartPos, tools::Rectangle const* pPaintArea, TextSelection const* pSelection = nullptr ); bool IsFormatted() const { return mbFormatted; } sal_Int32 GetCharPos( sal_uInt32 nPara, std::vector<TextLine>::size_type nLine, long nDocPosX, bool bSmart = false ); - Rectangle GetEditCursor( const TextPaM& rPaM, bool bSpecial, bool bPreferPortionStart = false ); + tools::Rectangle GetEditCursor( const TextPaM& rPaM, bool bSpecial, bool bPreferPortionStart = false ); sal_Int32 ImpFindIndex( sal_uInt32 nPortion, const Point& rPosInPara, bool bSmart ); long ImpGetPortionXOffset( sal_uInt32 nPara, TextLine* pLine, std::size_t nTextPortion ); long ImpGetXPos( sal_uInt32 nPara, TextLine* pLine, sal_Int32 nIndex, bool bPreferPortionStart = false ); @@ -290,7 +290,7 @@ public: bool Write( SvStream& rOutput, const TextSelection* pSel = nullptr, bool bHTML = false ); TextPaM GetPaM( const Point& rDocPos, bool bSmart = true ); - Rectangle PaMtoEditCursor( const TextPaM& rPaM, bool bSpecial = false ); + tools::Rectangle PaMtoEditCursor( const TextPaM& rPaM, bool bSpecial = false ); OUString GetWord( const TextPaM& rCursorPos, TextPaM* pStartOfWord = nullptr ); bool HasAttrib( sal_uInt16 nWhich ) const; diff --git a/include/vcl/textview.hxx b/include/vcl/textview.hxx index 61f59be6a41c..347f02d8b667 100644 --- a/include/vcl/textview.hxx +++ b/include/vcl/textview.hxx @@ -75,8 +75,8 @@ protected: TextPaM ImpDelete( sal_uInt8 nMode, sal_uInt8 nDelMode ); bool IsInSelection( const TextPaM& rPaM ); - void ImpPaint(vcl::RenderContext& rRenderContext, const Point& rStartPos, Rectangle const* pPaintArea, TextSelection const* pSelection); - void ImpPaint(vcl::RenderContext& rRenderContext, const Rectangle& rRect); + void ImpPaint(vcl::RenderContext& rRenderContext, const Point& rStartPos, tools::Rectangle const* pPaintArea, TextSelection const* pSelection); + void ImpPaint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect); void ImpShowCursor( bool bGotoCursor, bool bForceVisCursor, bool bEndKey ); void ImpHighlight( const TextSelection& rSel ); void ImpSetSelection( const TextSelection& rSelection ); @@ -129,7 +129,7 @@ public: void InsertText( const OUString& rNew ); bool KeyInput( const KeyEvent& rKeyEvent ); - void Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect); + void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect); void MouseButtonUp( const MouseEvent& rMouseEvent ); void MouseButtonDown( const MouseEvent& rMouseEvent ); void MouseMove( const MouseEvent& rMouseEvent ); diff --git a/include/vcl/toolbox.hxx b/include/vcl/toolbox.hxx index 864f3ab13d7a..a200557a4a2f 100644 --- a/include/vcl/toolbox.hxx +++ b/include/vcl/toolbox.hxx @@ -101,11 +101,11 @@ private: ImplToolBoxPrivateData* mpData; std::vector<ImplToolSize> maFloatSizes; Idle *mpIdle; - Rectangle maUpperRect; - Rectangle maLowerRect; - Rectangle maOutDockRect; - Rectangle maInDockRect; - Rectangle maPaintRect; + tools::Rectangle maUpperRect; + tools::Rectangle maLowerRect; + tools::Rectangle maOutDockRect; + tools::Rectangle maInDockRect; + tools::Rectangle maPaintRect; VclPtr<FloatingWindow> mpFloatWin; sal_uInt16 mnKeyModifier; long mnDX; @@ -186,7 +186,7 @@ private: SAL_DLLPRIVATE ImplToolItems::size_type ImplCalcBreaks( long nWidth, long* pMaxLineWidth, bool bCalcHorz ) const; SAL_DLLPRIVATE void ImplFormat( bool bResize = false ); SAL_DLLPRIVATE void ImplDrawSpin(vcl::RenderContext& rRenderContext); - SAL_DLLPRIVATE void ImplDrawSeparator(vcl::RenderContext& rRenderContext, ImplToolItems::size_type nPos, const Rectangle& rRect); + SAL_DLLPRIVATE void ImplDrawSeparator(vcl::RenderContext& rRenderContext, ImplToolItems::size_type nPos, const tools::Rectangle& rRect); SAL_DLLPRIVATE void ImplDrawItem(vcl::RenderContext& rRenderContext, ImplToolItems::size_type nPos, sal_uInt16 nHighlight ); using Window::ImplInvalidate; SAL_DLLPRIVATE void ImplInvalidate( bool bNewCalc = false, bool bFullPaint = false ); @@ -204,7 +204,7 @@ private: SAL_DLLPRIVATE void ImplUpdateInputEnable(); SAL_DLLPRIVATE void ImplFillLayoutData(); SAL_DLLPRIVATE bool ImplHasClippedItems(); - SAL_DLLPRIVATE Point ImplGetPopupPosition( const Rectangle& rRect, const Size& rSize ) const; + SAL_DLLPRIVATE Point ImplGetPopupPosition( const tools::Rectangle& rRect, const Size& rSize ) const; SAL_DLLPRIVATE bool ImplIsFloatingMode() const; SAL_DLLPRIVATE bool ImplIsInPopupMode() const; SAL_DLLPRIVATE const OUString& ImplGetHelpText( sal_uInt16 nItemId ) const; @@ -232,7 +232,7 @@ public: long& rRight, long& rBottom ) const; SAL_DLLPRIVATE void ImplCheckUpdate(); static SAL_DLLPRIVATE void ImplDrawGrip(vcl::RenderContext& rRenderContext, - const Rectangle &aDragArea, int nDragWidth, + const tools::Rectangle &aDragArea, int nDragWidth, WindowAlign eAlign, bool bHorz); SAL_DLLPRIVATE void ImplDrawGrip(vcl::RenderContext& rRenderContext); @@ -240,9 +240,9 @@ public: SAL_DLLPRIVATE bool ImplDrawNativeBackground(vcl::RenderContext& rRenderContext, const vcl::Region &rRegion); SAL_DLLPRIVATE void ImplDrawTransparentBackground(vcl::RenderContext& rRenderContext, const vcl::Region &rRegion); SAL_DLLPRIVATE static void ImplDrawConstantBackground(vcl::RenderContext& rRenderContext, const vcl::Region &rRegion, bool bIsInPopupMode); - SAL_DLLPRIVATE void ImplDrawBackground(vcl::RenderContext& rRenderContext, const Rectangle &rRect); + SAL_DLLPRIVATE void ImplDrawBackground(vcl::RenderContext& rRenderContext, const tools::Rectangle &rRect); - SAL_DLLPRIVATE void ImplErase(vcl::RenderContext& rRenderContext, const Rectangle &rRect, bool bHighlight, bool bHasOpenPopup = false ); + SAL_DLLPRIVATE void ImplErase(vcl::RenderContext& rRenderContext, const tools::Rectangle &rRect, bool bHighlight, bool bHasOpenPopup = false ); SAL_DLLPRIVATE void ImplDrawBorder(vcl::RenderContext& rRenderContext); SAL_DLLPRIVATE const ImplToolItem *ImplGetFirstClippedItem() const; @@ -253,10 +253,10 @@ public: SAL_DLLPRIVATE void ImplSetMinMaxFloatSize(); SAL_DLLPRIVATE ImplToolItems::size_type ImplCalcLines( long nToolSize ) const; SAL_DLLPRIVATE sal_uInt16 ImplTestLineSize( const Point& rPos ) const; - SAL_DLLPRIVATE void ImplLineSizing( const Point& rPos, Rectangle& rRect, sal_uInt16 nLineMode ); + SAL_DLLPRIVATE void ImplLineSizing( const Point& rPos, tools::Rectangle& rRect, sal_uInt16 nLineMode ); static SAL_DLLPRIVATE ImplToolItems::size_type ImplFindItemPos( const ImplToolItem* pItem, const ImplToolItems& rList ); SAL_DLLPRIVATE void ImplDrawMenuButton(vcl::RenderContext& rRenderContext, bool bHighlight); - SAL_DLLPRIVATE void ImplDrawButton(vcl::RenderContext& rRenderContext, const Rectangle &rRect, sal_uInt16 highlight, bool bChecked, bool bEnabled, bool bIsWindow); + SAL_DLLPRIVATE void ImplDrawButton(vcl::RenderContext& rRenderContext, const tools::Rectangle &rRect, sal_uInt16 highlight, bool bChecked, bool bEnabled, bool bIsWindow); SAL_DLLPRIVATE ImplToolItems::size_type ImplCountLineBreaks() const; SAL_DLLPRIVATE ImplToolBoxPrivateData* ImplGetToolBoxPrivateData() const { return mpData; } @@ -285,7 +285,7 @@ public: virtual void MouseButtonUp( const MouseEvent& rMEvt ) override; virtual void MouseMove( const MouseEvent& rMEvt ) override; virtual void Tracking( const TrackingEvent& rTEvt ) override; - virtual void Paint( vcl::RenderContext& rRenderContext, const Rectangle& rRect ) override; + virtual void Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect ) override; virtual void Resize() override; virtual void RequestHelp( const HelpEvent& rHEvt ) override; virtual bool EventNotify( NotifyEvent& rNEvt ) override; @@ -298,8 +298,8 @@ public: virtual void ToggleFloatingMode() override; virtual void StartDocking() override; - virtual bool Docking( const Point& rPos, Rectangle& rRect ) override; - virtual void EndDocking( const Rectangle& rRect, bool bFloatMode ) override; + virtual bool Docking( const Point& rPos, tools::Rectangle& rRect ) override; + virtual void EndDocking( const tools::Rectangle& rRect, bool bFloatMode ) override; virtual void Resizing( Size& rSize ) override; virtual Size GetOptimalSize() const override; virtual void doDeferredInit(WinBits nBits) override; @@ -355,9 +355,9 @@ public: sal_uInt16 GetItemId( const Point& rPos ) const; /// Map the command name (like .uno:Save) back to item id. sal_uInt16 GetItemId( const OUString& rCommand ) const; - Rectangle GetItemRect( sal_uInt16 nItemId ); - Rectangle GetItemPosRect( ImplToolItems::size_type nPos ); - Rectangle GetOverflowRect() const; + tools::Rectangle GetItemRect( sal_uInt16 nItemId ); + tools::Rectangle GetItemPosRect( ImplToolItems::size_type nPos ); + tools::Rectangle GetOverflowRect() const; /// Returns size of the bitmap / text that is inside this toolbox item. Size GetItemContentSize( sal_uInt16 nItemId ); @@ -487,7 +487,7 @@ public: void SetMenuExecuteHdl( const Link<ToolBox *, void>& rLink ); // open custommenu - void ExecuteCustomMenu( const Rectangle& rRect = Rectangle() ); + void ExecuteCustomMenu( const tools::Rectangle& rRect = tools::Rectangle() ); // allow Click Handler to distinguish between mouse and key input bool IsKeyEvent() const { return mbIsKeyEvent; } @@ -503,7 +503,7 @@ public: // returns the bounding box for the character at index nIndex // where nIndex is relative to the starting index of the item // with id nItemId (in coordinates of the displaying window) - Rectangle GetCharacterBounds( sal_uInt16 nItemId, long nIndex ); + tools::Rectangle GetCharacterBounds( sal_uInt16 nItemId, long nIndex ); // -1 is returned if no character is at that point // if an index is found the corresponding item id is filled in (else 0) long GetIndexForPoint( const Point& rPoint, sal_uInt16& rItemID ); diff --git a/include/vcl/unowrap.hxx b/include/vcl/unowrap.hxx index 44c86f2cc041..090fb8c4242f 100644 --- a/include/vcl/unowrap.hxx +++ b/include/vcl/unowrap.hxx @@ -31,7 +31,7 @@ class OutputDevice; class MouseEvent; class CommandEvent; class KeyEvent; -class Rectangle; +namespace tools { class Rectangle; } class Menu; namespace com { diff --git a/include/vcl/virdev.hxx b/include/vcl/virdev.hxx index 9184ef8af0f1..cf7c82140392 100644 --- a/include/vcl/virdev.hxx +++ b/include/vcl/virdev.hxx @@ -66,7 +66,7 @@ private: @since \#i32109# */ - SAL_DLLPRIVATE void ImplFillOpaqueRectangle( const Rectangle& rRect ); + SAL_DLLPRIVATE void ImplFillOpaqueRectangle( const tools::Rectangle& rRect ); protected: virtual bool AcquireGraphics() const override; diff --git a/include/vcl/wall.hxx b/include/vcl/wall.hxx index bd9fa295a693..d63fabf83e1d 100644 --- a/include/vcl/wall.hxx +++ b/include/vcl/wall.hxx @@ -84,8 +84,8 @@ public: Gradient GetGradient() const; bool IsGradient() const; - void SetRect( const Rectangle& rRect ); - Rectangle GetRect() const; + void SetRect( const tools::Rectangle& rRect ); + tools::Rectangle GetRect() const; bool IsRect() const; bool IsFixed() const; diff --git a/include/vcl/window.hxx b/include/vcl/window.hxx index 75f5a24f337f..16c7abd21e7f 100644 --- a/include/vcl/window.hxx +++ b/include/vcl/window.hxx @@ -472,7 +472,7 @@ public: // + selection Color with a text color complementing the selection background // + rounded edge static void 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 = nullptr, long nCornerRadius = 0, Color* pPaintColor = nullptr); @@ -564,7 +564,7 @@ public: SAL_DLLPRIVATE void ImplGrabFocus( GetFocusFlags nFlags ); SAL_DLLPRIVATE void ImplGrabFocusToDocument( GetFocusFlags nFlags ); - SAL_DLLPRIVATE void ImplInvertFocus( const Rectangle& rRect ); + SAL_DLLPRIVATE void ImplInvertFocus( const tools::Rectangle& rRect ); SAL_DLLPRIVATE PointerStyle ImplGetMousePointer() const; SAL_DLLPRIVATE void ImplCallMouseMove( sal_uInt16 nMouseCode, bool bModChanged = false ); @@ -587,7 +587,7 @@ public: SAL_DLLPRIVATE void ImplIncModalCount(); SAL_DLLPRIVATE void ImplDecModalCount(); - SAL_DLLPRIVATE static void ImplCalcSymbolRect( Rectangle& rRect ); + SAL_DLLPRIVATE static void ImplCalcSymbolRect( tools::Rectangle& rRect ); protected: @@ -601,8 +601,8 @@ protected: SAL_DLLPRIVATE void ImplInvalidateParentFrameRegion( vcl::Region& rRegion ); SAL_DLLPRIVATE void ImplValidateFrameRegion( const vcl::Region* rRegion, ValidateFlags nFlags ); SAL_DLLPRIVATE void ImplValidate(); - SAL_DLLPRIVATE void ImplMoveInvalidateRegion( const Rectangle& rRect, long nHorzScroll, long nVertScroll, bool bChildren ); - SAL_DLLPRIVATE void ImplMoveAllInvalidateRegions( const Rectangle& rRect, long nHorzScroll, long nVertScroll, bool bChildren ); + SAL_DLLPRIVATE void ImplMoveInvalidateRegion( const tools::Rectangle& rRect, long nHorzScroll, long nVertScroll, bool bChildren ); + SAL_DLLPRIVATE void ImplMoveAllInvalidateRegions( const tools::Rectangle& rRect, long nHorzScroll, long nVertScroll, bool bChildren ); SAL_DLLPRIVATE vcl::Window* ImplGetBorderWindow() const; @@ -612,7 +612,7 @@ protected: SAL_DLLPRIVATE void ImplSetMouseTransparent( bool bTransparent ); - SAL_DLLPRIVATE void ImplScroll( const Rectangle& rRect, long nHorzScroll, long nVertScroll, ScrollFlags nFlags ); + SAL_DLLPRIVATE void ImplScroll( const tools::Rectangle& rRect, long nHorzScroll, long nVertScroll, ScrollFlags nFlags ); SAL_DLLPRIVATE bool ImplSetClipFlagChildren( bool bSysObjOnlySmaller ); SAL_DLLPRIVATE bool ImplSetClipFlagOverlapWindows( bool bSysObjOnlySmaller = false ); @@ -670,7 +670,7 @@ private: SAL_DLLPRIVATE void ImplIntersectAndUnionOverlapWindows( const vcl::Region& rInterRegion, vcl::Region& rRegion ); SAL_DLLPRIVATE void ImplIntersectAndUnionOverlapWindows2( const vcl::Region& rInterRegion, vcl::Region& rRegion ); SAL_DLLPRIVATE void ImplCalcOverlapRegionOverlaps( const vcl::Region& rInterRegion, vcl::Region& rRegion ); - SAL_DLLPRIVATE void ImplCalcOverlapRegion( const Rectangle& rSourceRect, vcl::Region& rRegion, + SAL_DLLPRIVATE void ImplCalcOverlapRegion( const tools::Rectangle& rSourceRect, vcl::Region& rRegion, bool bChildren, bool bSiblings ); /** Invoke the actual painting. @@ -715,7 +715,7 @@ private: SAL_DLLPRIVATE static void ImplHandleScroll( ScrollBar* pHScrl, long nX, ScrollBar* pVScrl, long nY ); - SAL_DLLPRIVATE Rectangle ImplOutputToUnmirroredAbsoluteScreenPixel( const Rectangle& rRect ) const; + SAL_DLLPRIVATE tools::Rectangle ImplOutputToUnmirroredAbsoluteScreenPixel( const tools::Rectangle& rRect ) const; SAL_DLLPRIVATE long ImplGetUnmirroredOutOffX(); // retrieves the list of owner draw decorated windows for this window hiearchy @@ -723,7 +723,7 @@ private: SAL_DLLPRIVATE vcl::Window* ImplGetTopmostFrameWindow(); - SAL_DLLPRIVATE Rectangle ImplGetWindowExtentsRelative( vcl::Window *pRelativeWindow, bool bClientOnly ) const; + SAL_DLLPRIVATE tools::Rectangle ImplGetWindowExtentsRelative( vcl::Window *pRelativeWindow, bool bClientOnly ) const; SAL_DLLPRIVATE bool ImplStopDnd(); SAL_DLLPRIVATE void ImplStartDnd(); @@ -754,7 +754,7 @@ protected: SAL_DLLPRIVATE void ImplAdjustNWFSizes(); virtual void CopyDeviceArea( SalTwoRect& aPosAry, bool bWindowInvalidate) override; - virtual void ClipToPaintRegion( Rectangle& rDstRect ) override; + virtual void ClipToPaintRegion( tools::Rectangle& rDstRect ) override; virtual bool UsePolyPolygonForComplexGradient() override; virtual void ApplySettings(vcl::RenderContext& rRenderContext); @@ -777,7 +777,7 @@ public: virtual void KeyInput( const KeyEvent& rKEvt ); virtual void KeyUp( const KeyEvent& rKEvt ); virtual void PrePaint(vcl::RenderContext& rRenderContext); - virtual void Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect); + virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect); virtual void PostPaint(vcl::RenderContext& rRenderContext); using OutputDevice::Erase; @@ -878,11 +878,11 @@ public: void SetInputContext( const InputContext& rInputContext ); const InputContext& GetInputContext() const; void EndExtTextInput(); - void SetCursorRect( const Rectangle* pRect = nullptr, long nExtTextInputWidth = 0 ); - const Rectangle* GetCursorRect() const; + void SetCursorRect( const tools::Rectangle* pRect = nullptr, long nExtTextInputWidth = 0 ); + const tools::Rectangle* GetCursorRect() const; long GetCursorExtTextInputWidth() const; - void SetCompositionCharRect( const Rectangle* pRect, long nCompositionLength, bool bVertical = false ); + void SetCompositionCharRect( const tools::Rectangle* pRect, long nCompositionLength, bool bVertical = false ); using ::OutputDevice::SetSettings; virtual void SetSettings( const AllSettings& rSettings ) override; @@ -1041,19 +1041,19 @@ public: Point NormalizedScreenToOutputPixel( const Point& rPos ) const; Point OutputToAbsoluteScreenPixel( const Point& rPos ) const; Point AbsoluteScreenToOutputPixel( const Point& rPos ) const; - Rectangle GetDesktopRectPixel() const; + tools::Rectangle GetDesktopRectPixel() const; // window extents including border and decoration - Rectangle GetWindowExtentsRelative( vcl::Window *pRelativeWindow ) const; + tools::Rectangle GetWindowExtentsRelative( vcl::Window *pRelativeWindow ) const; // window extents of the client window, coordinates to be used in SetPosPixel - Rectangle GetClientWindowExtentsRelative() const; + tools::Rectangle GetClientWindowExtentsRelative() const; bool IsScrollable() const; virtual void Scroll( long nHorzScroll, long nVertScroll, ScrollFlags nFlags = ScrollFlags::NONE ); void Scroll( long nHorzScroll, long nVertScroll, - const Rectangle& rRect, ScrollFlags nFlags = ScrollFlags::NONE ); + const tools::Rectangle& rRect, ScrollFlags nFlags = ScrollFlags::NONE ); virtual void Invalidate( InvalidateFlags nFlags = InvalidateFlags::NONE ); - virtual void Invalidate( const Rectangle& rRect, InvalidateFlags nFlags = InvalidateFlags::NONE ); + virtual void Invalidate( const tools::Rectangle& rRect, InvalidateFlags nFlags = InvalidateFlags::NONE ); virtual void Invalidate( const vcl::Region& rRegion, InvalidateFlags nFlags = InvalidateFlags::NONE ); void Validate(); bool HasPaintEvent() const; @@ -1157,16 +1157,16 @@ public: /// Add all children to rAllChildren recursively. SAL_DLLPRIVATE void CollectChildren(::std::vector<vcl::Window *>& rAllChildren ); - virtual void ShowFocus(const Rectangle& rRect); + virtual void ShowFocus(const tools::Rectangle& rRect); void HideFocus(); // transparent background for selected or checked items in toolboxes etc. - void DrawSelectionBackground( const Rectangle& rRect, sal_uInt16 highlight, bool bChecked, bool bDrawBorder ); + void DrawSelectionBackground( const tools::Rectangle& rRect, sal_uInt16 highlight, bool bChecked, bool bDrawBorder ); - void ShowTracking( const Rectangle& rRect, + void ShowTracking( const tools::Rectangle& rRect, ShowTrackFlags nFlags = ShowTrackFlags::Small ); void HideTracking(); - void InvertTracking( const Rectangle& rRect, ShowTrackFlags nFlags ); + void InvertTracking( const tools::Rectangle& rRect, ShowTrackFlags nFlags ); void InvertTracking( const tools::Polygon& rPoly, ShowTrackFlags nFlags ); void StartTracking( StartTrackingFlags nFlags = StartTrackingFlags::NONE ); @@ -1296,7 +1296,7 @@ public: /* records all DrawText operations within the passed rectangle; * a synchronous paint is sent to achieve this */ - void RecordLayoutData( vcl::ControlLayoutData* pLayout, const Rectangle& rRect ); + void RecordLayoutData( vcl::ControlLayoutData* pLayout, const tools::Rectangle& rRect ); // set and retrieve for Toolkit VCLXWindow* GetWindowPeer() const; diff --git a/lotuswordpro/source/filter/lwpdrawobj.cxx b/lotuswordpro/source/filter/lwpdrawobj.cxx index 8361e21cf64c..19649affe271 100644 --- a/lotuswordpro/source/filter/lwpdrawobj.cxx +++ b/lotuswordpro/source/filter/lwpdrawobj.cxx @@ -780,7 +780,7 @@ XFFrame* LwpDrawRectangle::CreateStandardDrawObj(const OUString& rStyleName) double fStartX, fStartY, fWidth, fHeight; double fRotAngle = 0.0; SdwRectangle aSdwRect; - Rectangle aOriginalRect; + tools::Rectangle aOriginalRect; Point aPt0, aPt1, aPt2, aPt3; aPt0.setX(m_aVector[0].x); aPt0.setY(m_aVector[0].y); @@ -796,7 +796,7 @@ XFFrame* LwpDrawRectangle::CreateStandardDrawObj(const OUString& rStyleName) } else { - aOriginalRect = Rectangle(aPt0, aPt2); + aOriginalRect = tools::Rectangle(aPt0, aPt2); } fStartX = aOriginalRect.TopLeft().X(); diff --git a/lotuswordpro/source/filter/lwpoleobject.hxx b/lotuswordpro/source/filter/lwpoleobject.hxx index 2eefc3f5560d..bd514035a34c 100644 --- a/lotuswordpro/source/filter/lwpoleobject.hxx +++ b/lotuswordpro/source/filter/lwpoleobject.hxx @@ -124,7 +124,7 @@ public: private: sal_uInt16 cPersistentFlags; - Rectangle m_SizeRect; + tools::Rectangle m_SizeRect; }; #endif diff --git a/lotuswordpro/source/filter/lwpsdwgrouploaderv0102.cxx b/lotuswordpro/source/filter/lwpsdwgrouploaderv0102.cxx index 39d1b3fa501d..41f0af74477c 100644 --- a/lotuswordpro/source/filter/lwpsdwgrouploaderv0102.cxx +++ b/lotuswordpro/source/filter/lwpsdwgrouploaderv0102.cxx @@ -197,7 +197,7 @@ void LwpSdwGroupLoaderV0102::BeginDrawObjects(std::vector< rtl::Reference<XFFram // placement: centered if (xMyFrameLayout->GetScaleCenter()) { - Rectangle aBoundRect(static_cast<long>(left*m_aTransformData.fScaleX + fLeftMargin), + tools::Rectangle aBoundRect(static_cast<long>(left*m_aTransformData.fScaleX + fLeftMargin), static_cast<long>(top * m_aTransformData.fScaleY + fTopMargin), static_cast<long>(right * m_aTransformData.fScaleX), static_cast<long>(bottom * m_aTransformData.fScaleY)); diff --git a/lotuswordpro/source/filter/lwpsdwrect.cxx b/lotuswordpro/source/filter/lwpsdwrect.cxx index 5937864ec3cf..d9f73ebde2b9 100644 --- a/lotuswordpro/source/filter/lwpsdwrect.cxx +++ b/lotuswordpro/source/filter/lwpsdwrect.cxx @@ -145,7 +145,7 @@ long SdwRectangle::GetHeight() const * @short: Calculate coordinate of the original rectangle. * @return: a prz rectangle **************************************************************************/ -Rectangle SdwRectangle::GetOriginalRect() const +tools::Rectangle SdwRectangle::GetOriginalRect() const { if (m_bRotated) { @@ -157,11 +157,11 @@ Rectangle SdwRectangle::GetOriginalRect() const aCenter.Y()-(long)((double)nHeight/2+0.5)); Point aRB(aLT.X()+nWidth, aLT.Y()+nHeight); - return Rectangle(aLT, aRB); + return tools::Rectangle(aLT, aRB); } else { - return Rectangle(m_nRectCorner[3], m_nRectCorner[1]); + return tools::Rectangle(m_nRectCorner[3], m_nRectCorner[1]); } } /************************************************************************** diff --git a/lotuswordpro/source/filter/lwpsdwrect.hxx b/lotuswordpro/source/filter/lwpsdwrect.hxx index cc3066900948..9af37440ef68 100644 --- a/lotuswordpro/source/filter/lwpsdwrect.hxx +++ b/lotuswordpro/source/filter/lwpsdwrect.hxx @@ -116,7 +116,7 @@ public: long GetHeight() const; - Rectangle GetOriginalRect() const; + tools::Rectangle GetOriginalRect() const; double GetRotationAngle() const; diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx index 43b7c0369210..beb7e0ea6ee2 100644 --- a/oox/source/export/drawingml.cxx +++ b/oox/source/export/drawingml.cxx @@ -1154,7 +1154,7 @@ void DrawingML::WriteStretch( const css::uno::Reference< css::beans::XPropertySe mpFS->endElementNS( XML_a, XML_stretch ); } -void DrawingML::WriteTransformation( const Rectangle& rRect, +void DrawingML::WriteTransformation( const tools::Rectangle& rRect, sal_Int32 nXmlNamespace, bool bFlipH, bool bFlipV, sal_Int32 nRotation ) { mpFS->startElementNS( nXmlNamespace, XML_xfrm, @@ -1214,7 +1214,7 @@ void DrawingML::WriteShapeTransformation( const Reference< XShape >& rXShape, sa if (xPropertySetInfo->hasPropertyByName("RotateAngle")) xPropertySet->getPropertyValue("RotateAngle") >>= nRotation; } - WriteTransformation( Rectangle( Point( aPos.X, aPos.Y ), Size( aSize.Width, aSize.Height ) ), nXmlNamespace, bFlipH, bFlipV, OOX_DRAWINGML_EXPORT_ROTATE_CLOCKWISIFY(nRotation) ); + WriteTransformation( tools::Rectangle( Point( aPos.X, aPos.Y ), Size( aSize.Width, aSize.Height ) ), nXmlNamespace, bFlipH, bFlipV, OOX_DRAWINGML_EXPORT_ROTATE_CLOCKWISIFY(nRotation) ); } void DrawingML::WriteRunProperties( const Reference< XPropertySet >& rRun, bool bIsField, sal_Int32 nElement, bool bCheckDirect, @@ -2630,7 +2630,7 @@ void DrawingML::WritePolyPolygon( const tools::PolyPolygon& rPolyPolygon ) mpFS->startElementNS( XML_a, XML_pathLst, FSEND ); - const Rectangle aRect( rPolyPolygon.GetBoundRect() ); + const tools::Rectangle aRect( rPolyPolygon.GetBoundRect() ); // Put all polygons of rPolyPolygon in the same path elemnt // to subtract the overlapped areas. diff --git a/oox/source/export/shapes.cxx b/oox/source/export/shapes.cxx index 048e9247adec..82d899ff1078 100644 --- a/oox/source/export/shapes.cxx +++ b/oox/source/export/shapes.cxx @@ -437,7 +437,7 @@ ShapeExport& ShapeExport::WritePolyPolygonShape( const Reference< XShape >& xSha pFS->startElementNS( mnXmlNamespace, (GetDocumentType() != DOCUMENT_DOCX ? XML_sp : XML_wsp), FSEND ); tools::PolyPolygon aPolyPolygon = EscherPropertyContainer::GetPolyPolygon( xShape ); - Rectangle aRect( aPolyPolygon.GetBoundRect() ); + tools::Rectangle aRect( aPolyPolygon.GetBoundRect() ); #if OSL_DEBUG_LEVEL > 0 awt::Size size = MapSize( awt::Size( aRect.GetWidth(), aRect.GetHeight() ) ); @@ -1190,7 +1190,7 @@ ShapeExport& ShapeExport::WriteConnectorShape( const Reference< XShape >& xShape } EscherConnectorListEntry aConnectorEntry( xShape, aStartPoint, rXShapeA, aEndPoint, rXShapeB ); - Rectangle aRect( Point( aStartPoint.X, aStartPoint.Y ), Point( aEndPoint.X, aEndPoint.Y ) ); + tools::Rectangle aRect( Point( aStartPoint.X, aStartPoint.Y ), Point( aEndPoint.X, aEndPoint.Y ) ); if( aRect.getWidth() < 0 ) { bFlipH = true; aRect.setX( aEndPoint.X ); diff --git a/oox/source/export/vmlexport.cxx b/oox/source/export/vmlexport.cxx index 274c99b660f5..b68fa6452c73 100644 --- a/oox/source/export/vmlexport.cxx +++ b/oox/source/export/vmlexport.cxx @@ -126,7 +126,7 @@ void VMLExport::CloseContainer() EscherEx::CloseContainer(); } -sal_uInt32 VMLExport::EnterGroup( const OUString& rShapeName, const Rectangle* pRect ) +sal_uInt32 VMLExport::EnterGroup( const OUString& rShapeName, const tools::Rectangle* pRect ) { sal_uInt32 nShapeId = GenerateShapeId(); @@ -355,7 +355,7 @@ void VMLExport::AddSdrObjectVMLObject( const SdrObject& rObj) { m_pSdrObject = &rObj; } -void VMLExport::Commit( EscherPropertyContainer& rProps, const Rectangle& rRect ) +void VMLExport::Commit( EscherPropertyContainer& rProps, const tools::Rectangle& rRect ) { if ( m_nShapeType == ESCHER_ShpInst_Nil ) return; @@ -891,7 +891,7 @@ void VMLExport::AddFlipXY( ) } } -void VMLExport::AddLineDimensions( const Rectangle& rRectangle ) +void VMLExport::AddLineDimensions( const tools::Rectangle& rRectangle ) { // style if (!m_ShapeStyle.isEmpty()) @@ -931,7 +931,7 @@ void VMLExport::AddLineDimensions( const Rectangle& rRectangle ) .makeStringAndClear() ); } -void VMLExport::AddRectangleDimensions( OStringBuffer& rBuffer, const Rectangle& rRectangle, bool rbAbsolutePos) +void VMLExport::AddRectangleDimensions( OStringBuffer& rBuffer, const tools::Rectangle& rRectangle, bool rbAbsolutePos) { if ( !rBuffer.isEmpty() ) rBuffer.append( ";" ); diff --git a/reportdesign/inc/RptObject.hxx b/reportdesign/inc/RptObject.hxx index c37f0c0591d0..e6f74e9ffeb7 100644 --- a/reportdesign/inc/RptObject.hxx +++ b/reportdesign/inc/RptObject.hxx @@ -82,7 +82,7 @@ protected: bool isListening() const { return m_bIsListening; } - void SetPropsFromRect(const Rectangle& _rRect); + void SetPropsFromRect(const tools::Rectangle& _rRect); virtual SdrPage* GetImplPage() const = 0; @@ -139,7 +139,7 @@ protected: virtual void NbcMove( const Size& rSize ) override; virtual void NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact) override; - virtual void NbcSetLogicRect(const Rectangle& rRect) override; + virtual void NbcSetLogicRect(const tools::Rectangle& rRect) override; virtual bool EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd) override; virtual SdrPage* GetImplPage() const override; @@ -183,7 +183,7 @@ protected: virtual void NbcMove( const Size& rSize ) override; virtual void NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact) override; - virtual void NbcSetLogicRect(const Rectangle& rRect) override; + virtual void NbcSetLogicRect(const tools::Rectangle& rRect) override; virtual bool EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd) override; virtual SdrPage* GetImplPage() const override; @@ -228,7 +228,7 @@ protected: virtual void NbcMove( const Size& rSize ) override; virtual void NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact) override; - virtual void NbcSetLogicRect(const Rectangle& rRect) override; + virtual void NbcSetLogicRect(const tools::Rectangle& rRect) override; virtual bool EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd) override; virtual SdrPage* GetImplPage() const override; diff --git a/reportdesign/source/core/sdr/ReportDrawPage.cxx b/reportdesign/source/core/sdr/ReportDrawPage.cxx index 328b9e279e49..40b2bd1561c0 100644 --- a/reportdesign/source/core/sdr/ReportDrawPage.cxx +++ b/reportdesign/source/core/sdr/ReportDrawPage.cxx @@ -116,7 +116,7 @@ uno::Reference< drawing::XShape > OReportDrawPage::CreateShape( SdrObject *pObj rOle2Obj.SetPersistName(sName); rOle2Obj.SetName(sName); rOle2Obj.SetAspect(nAspect); - Rectangle aRect = rOle2Obj.GetLogicRect(); + tools::Rectangle aRect = rOle2Obj.GetLogicRect(); Size aTmp = aRect.GetSize(); awt::Size aSz( aTmp.Width(), aTmp.Height() ); diff --git a/reportdesign/source/core/sdr/RptObject.cxx b/reportdesign/source/core/sdr/RptObject.cxx index ab5cf3aea4c8..ed7426783038 100644 --- a/reportdesign/source/core/sdr/RptObject.cxx +++ b/reportdesign/source/core/sdr/RptObject.cxx @@ -387,7 +387,7 @@ void OObjectBase::EndListening(bool /*bRemoveListener*/) } } -void OObjectBase::SetPropsFromRect(const Rectangle& _rRect) +void OObjectBase::SetPropsFromRect(const tools::Rectangle& _rRect) { // set properties OReportPage* pPage = dynamic_cast<OReportPage*>(GetImplPage()); @@ -525,7 +525,7 @@ void OCustomShape::NbcResize(const Point& rRef, const Fraction& xFract, const Fr SetPropsFromRect(GetSnapRect()); } -void OCustomShape::NbcSetLogicRect(const Rectangle& rRect) +void OCustomShape::NbcSetLogicRect(const tools::Rectangle& rRect) { SdrObjCustomShape::NbcSetLogicRect(rRect); SetPropsFromRect(rRect); @@ -717,7 +717,7 @@ void OUnoObject::NbcResize(const Point& rRef, const Fraction& xFract, const Frac OObjectBase::StartListening(); } -void OUnoObject::NbcSetLogicRect(const Rectangle& rRect) +void OUnoObject::NbcSetLogicRect(const tools::Rectangle& rRect) { SdrUnoObj::NbcSetLogicRect(rRect); // stop listening @@ -1002,7 +1002,7 @@ void OOle2Obj::NbcResize(const Point& rRef, const Fraction& xFract, const Fracti OObjectBase::StartListening(); } -void OOle2Obj::NbcSetLogicRect(const Rectangle& rRect) +void OOle2Obj::NbcSetLogicRect(const tools::Rectangle& rRect) { SdrOle2Obj::NbcSetLogicRect(rRect); // stop listening diff --git a/reportdesign/source/ui/dlg/GroupsSorting.cxx b/reportdesign/source/ui/dlg/GroupsSorting.cxx index 521951992040..eba7ab9d24e6 100644 --- a/reportdesign/source/ui/dlg/GroupsSorting.cxx +++ b/reportdesign/source/ui/dlg/GroupsSorting.cxx @@ -149,7 +149,7 @@ protected: virtual void InitController( ::svt::CellControllerRef& rController, long nRow, sal_uInt16 nCol ) override; virtual ::svt::CellController* GetController( long nRow, sal_uInt16 nCol ) override; - virtual void PaintCell( OutputDevice& rDev, const Rectangle& rRect, sal_uInt16 nColId ) const override; + virtual void PaintCell( OutputDevice& rDev, const tools::Rectangle& rRect, sal_uInt16 nColId ) const override; virtual bool SeekRow( long nRow ) override; virtual bool SaveModified() override; virtual OUString GetCellText( long nRow, sal_uInt16 nColId ) const override; @@ -574,7 +574,7 @@ bool OFieldExpressionControl::SeekRow( long _nRow ) } -void OFieldExpressionControl::PaintCell( OutputDevice& rDev, const Rectangle& rRect, sal_uInt16 nColumnId ) const +void OFieldExpressionControl::PaintCell( OutputDevice& rDev, const tools::Rectangle& rRect, sal_uInt16 nColumnId ) const { OUString aText =GetCellText( m_nCurrentPos, nColumnId ); diff --git a/reportdesign/source/ui/inc/DesignView.hxx b/reportdesign/source/ui/inc/DesignView.hxx index 41434ae3f36f..503e36534eeb 100644 --- a/reportdesign/source/ui/inc/DesignView.hxx +++ b/reportdesign/source/ui/inc/DesignView.hxx @@ -85,7 +85,7 @@ namespace rptui void operator =(ODesignView&) = delete; protected: // return the Rectangle where I can paint myself - virtual void resizeDocumentView(Rectangle& rRect) override; + virtual void resizeDocumentView(tools::Rectangle& rRect) override; // return the Rectangle where I can paint myself virtual void DataChanged( const DataChangedEvent& rDCEvt ) override; diff --git a/reportdesign/source/ui/inc/EndMarker.hxx b/reportdesign/source/ui/inc/EndMarker.hxx index e6898302ef66..b2a32a78114e 100644 --- a/reportdesign/source/ui/inc/EndMarker.hxx +++ b/reportdesign/source/ui/inc/EndMarker.hxx @@ -37,7 +37,7 @@ namespace rptui virtual ~OEndMarker() override; // windows - virtual void Paint( vcl::RenderContext& rRenderContext, const Rectangle& rRect ) override; + virtual void Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect ) override; virtual void MouseButtonDown( const MouseEvent& rMEvt ) override; }; } diff --git a/reportdesign/source/ui/inc/ReportSection.hxx b/reportdesign/source/ui/inc/ReportSection.hxx index 7c0e3d856681..8b3d37a30f88 100644 --- a/reportdesign/source/ui/inc/ReportSection.hxx +++ b/reportdesign/source/ui/inc/ReportSection.hxx @@ -69,7 +69,7 @@ namespace rptui virtual sal_Int8 ExecuteDrop( const ExecuteDropEvent& _rEvt ) override; // window overrides - 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 Command( const CommandEvent& rCEvt ) override; diff --git a/reportdesign/source/ui/inc/SectionView.hxx b/reportdesign/source/ui/inc/SectionView.hxx index 13d3365940cb..1035a8a7ef5f 100644 --- a/reportdesign/source/ui/inc/SectionView.hxx +++ b/reportdesign/source/ui/inc/SectionView.hxx @@ -47,7 +47,7 @@ public: virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) override; virtual void MarkListHasChanged() override; - virtual void MakeVisible( const Rectangle& rRect, vcl::Window& rWin ) override; + virtual void MakeVisible( const tools::Rectangle& rRect, vcl::Window& rWin ) override; OReportSection* getReportSection() const { return m_pSectionWindow; } diff --git a/reportdesign/source/ui/inc/StartMarker.hxx b/reportdesign/source/ui/inc/StartMarker.hxx index 305fc10f53b5..25629b641096 100644 --- a/reportdesign/source/ui/inc/StartMarker.hxx +++ b/reportdesign/source/ui/inc/StartMarker.hxx @@ -58,7 +58,7 @@ namespace rptui // SfxListener virtual void Notify(SfxBroadcaster & rBc, SfxHint const & rHint) override; // Window overrides - virtual void Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) override; + virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) override; virtual void MouseButtonUp(const MouseEvent& rMEvt) override; virtual void Resize() override; virtual void RequestHelp(const HelpEvent& rHEvt) override; diff --git a/reportdesign/source/ui/inc/UITools.hxx b/reportdesign/source/ui/inc/UITools.hxx index 5c6ce0179a12..2aa0b9f6fca0 100644 --- a/reportdesign/source/ui/inc/UITools.hxx +++ b/reportdesign/source/ui/inc/UITools.hxx @@ -37,7 +37,7 @@ class SdrPage; class SdrObject; class SdrUnoObj; class SdrView; -class Rectangle; +namespace tools { class Rectangle; } namespace comphelper { class OPropertyChangeMultiplexer; @@ -138,9 +138,9 @@ namespace rptui * \param _bAllObjects if <TRUE/> all objects are taken into account, otherwise only not marked ones * \return the object which is overlapped, otherwise <NULL/> */ - SdrObject* isOver(const Rectangle& _rRect,SdrPage& _rPage,SdrView& _rView,bool _bAllObjects = false,SdrObject* _pIgnore = nullptr, sal_Int16 _nIgnoreType=0); + SdrObject* isOver(const tools::Rectangle& _rRect,SdrPage& _rPage,SdrView& _rView,bool _bAllObjects = false,SdrObject* _pIgnore = nullptr, sal_Int16 _nIgnoreType=0); - SdrObject* isOver(const Rectangle& _rRect,SdrPage& _rPage,SdrView& _rView,bool _bAllObjects, SdrUnoObj* _pIgnoreList[], int _nIgnoreListLength); + SdrObject* isOver(const tools::Rectangle& _rRect,SdrPage& _rPage,SdrView& _rView,bool _bAllObjects, SdrUnoObj* _pIgnoreList[], int _nIgnoreListLength); /** checks whether the given OUnoObject object rectangle overlapps another object in that view. * @@ -169,7 +169,7 @@ namespace rptui * \param pControl the SdrObject */ - Rectangle getRectangleFromControl(SdrObject* pControl); + tools::Rectangle getRectangleFromControl(SdrObject* pControl); /** sets the map mode at the window @param _aZoom the zoom scale diff --git a/reportdesign/source/ui/inc/ViewsWindow.hxx b/reportdesign/source/ui/inc/ViewsWindow.hxx index 6e8be8df0b80..e05f1cd123cd 100644 --- a/reportdesign/source/ui/inc/ViewsWindow.hxx +++ b/reportdesign/source/ui/inc/ViewsWindow.hxx @@ -44,13 +44,13 @@ namespace rptui class OSectionView; - struct RectangleLess : public ::std::binary_function< Rectangle, Rectangle, bool> + struct RectangleLess : public ::std::binary_function< tools::Rectangle, tools::Rectangle, bool> { enum CompareMode { POS_LEFT,POS_RIGHT,POS_UPPER,POS_DOWN,POS_CENTER_HORIZONTAL,POS_CENTER_VERTICAL }; CompareMode m_eCompareMode; Point m_aRefPoint; RectangleLess(CompareMode _eCompareMode,const Point& _rRefPoint ) : m_eCompareMode(_eCompareMode),m_aRefPoint(_rRefPoint){} - bool operator() (const Rectangle& lhs, const Rectangle& rhs) const + bool operator() (const tools::Rectangle& lhs, const tools::Rectangle& rhs) const { switch(m_eCompareMode) { @@ -75,7 +75,7 @@ namespace rptui , public utl::ConfigurationListener , public IMarkedSection { - typedef ::std::multimap<Rectangle,::std::pair<SdrObject*,OSectionView*>,RectangleLess> TRectangleMap; + typedef ::std::multimap<tools::Rectangle,::std::pair<SdrObject*,OSectionView*>,RectangleLess> TRectangleMap; public: typedef ::std::vector< VclPtr<OSectionWindow> > TSectionsMap; @@ -91,7 +91,7 @@ namespace rptui */ TSectionsMap::iterator getIteratorAtPos(sal_uInt16 _nPos); void collectRectangles(TRectangleMap& _rMap); - static void collectBoundResizeRect(const TRectangleMap& _rSortRectangles,sal_Int32 _nControlModification,bool _bAlignAtSection,Rectangle& _rBound,Rectangle& _rResize); + static void collectBoundResizeRect(const TRectangleMap& _rSortRectangles,sal_Int32 _nControlModification,bool _bAlignAtSection,tools::Rectangle& _rBound,tools::Rectangle& _rResize); void impl_resizeSectionWindow(OSectionWindow& _rSectionWindow,Point& _rStartPoint,bool _bSet); OViewsWindow(OViewsWindow&) = delete; @@ -102,7 +102,7 @@ namespace rptui virtual void MouseButtonDown( const MouseEvent& rMEvt ) override; virtual void MouseButtonUp( const MouseEvent& rMEvt ) override; - virtual void Paint( vcl::RenderContext& /*rRenderContext*/, const Rectangle& rRect ) override; + virtual void Paint( vcl::RenderContext& /*rRenderContext*/, const tools::Rectangle& rRect ) override; virtual void ConfigurationChanged( utl::ConfigurationBroadcaster*, ConfigurationHints ) override; public: OViewsWindow( @@ -241,7 +241,7 @@ namespace rptui void BegMarkObj(const Point& _aPnt,const OSectionView* _pSection); private: - void BegDragObj_createInvisibleObjectAtPosition(const Rectangle& _aRect, const OSectionView& _rSection); + void BegDragObj_createInvisibleObjectAtPosition(const tools::Rectangle& _aRect, const OSectionView& _rSection); void EndDragObj_removeInvisibleObjects(); Point m_aDragDelta; ::std::vector<SdrObject*> m_aBegDragTempList; diff --git a/reportdesign/source/ui/inspection/GeometryHandler.cxx b/reportdesign/source/ui/inspection/GeometryHandler.cxx index 32c4801bc250..7f462c0492b7 100644 --- a/reportdesign/source/ui/inspection/GeometryHandler.cxx +++ b/reportdesign/source/ui/inspection/GeometryHandler.cxx @@ -1648,7 +1648,7 @@ void GeometryHandler::checkPosAndSize( const awt::Point& _aNewPos, if ( aPos.X() < 0 || aPos.Y() < 0 ) // TODO: have to check size with pos aka || (aPos.X() + aAwtSize.Width) > m_xSection->getReportDefinition()-> throw beans::PropertyVetoException(ModuleRes(RID_STR_ILLEGAL_POSITION),xSourceReportComponent); - ::Rectangle aSourceRect(aPos,VCLSize(_aSize)); + ::tools::Rectangle aSourceRect(aPos,VCLSize(_aSize)); const sal_Int32 nCount = xSection->getCount(); for (sal_Int32 i = 0; i < nCount ; ++i) @@ -1656,8 +1656,8 @@ void GeometryHandler::checkPosAndSize( const awt::Point& _aNewPos, const uno::Reference< report::XReportComponent> xReportComponent(xSection->getByIndex(i),uno::UNO_QUERY); if ( xReportComponent.is() && xReportComponent != xSourceReportComponent ) { - const ::Rectangle aBoundRect(VCLPoint(xReportComponent->getPosition()),VCLSize(xReportComponent->getSize())); - const ::Rectangle aRect = aSourceRect.GetIntersection(aBoundRect); + const ::tools::Rectangle aBoundRect(VCLPoint(xReportComponent->getPosition()),VCLSize(xReportComponent->getSize())); + const ::tools::Rectangle aRect = aSourceRect.GetIntersection(aBoundRect); if ( !aRect.IsEmpty() && (aRect.Left() != aRect.Right() && aRect.Top() != aRect.Bottom() ) ) throw beans::PropertyVetoException(ModuleRes( RID_STR_OVERLAP_OTHER_CONTROL),xSourceReportComponent); } diff --git a/reportdesign/source/ui/misc/UITools.cxx b/reportdesign/source/ui/misc/UITools.cxx index 92ab7a0a5b42..7d6294b4e062 100644 --- a/reportdesign/source/ui/misc/UITools.cxx +++ b/reportdesign/source/ui/misc/UITools.cxx @@ -841,7 +841,7 @@ void notifySystemWindow(vcl::Window* _pWindow, vcl::Window* _pToRegister, const } } -SdrObject* isOver(const Rectangle& _rRect, SdrPage& _rPage, SdrView& _rView, bool _bAllObjects, SdrObject* _pIgnore, sal_Int16 _nIgnoreType) +SdrObject* isOver(const tools::Rectangle& _rRect, SdrPage& _rPage, SdrView& _rView, bool _bAllObjects, SdrObject* _pIgnore, sal_Int16 _nIgnoreType) { SdrObject* pOverlappedObj = nullptr; SdrObjListIter aIter(_rPage,SdrIterMode::DeepNoGroups); @@ -860,7 +860,7 @@ SdrObject* isOver(const Rectangle& _rRect, SdrPage& _rPage, SdrView& _rView, boo if (dynamic_cast<OUnoObject*>(pObjIter) != nullptr || dynamic_cast<OOle2Obj*>(pObjIter) != nullptr) { - Rectangle aRect = _rRect.GetIntersection(pObjIter->GetLastBoundRect()); + tools::Rectangle aRect = _rRect.GetIntersection(pObjIter->GetLastBoundRect()); if ( !aRect.IsEmpty() && (aRect.Left() != aRect.Right() && aRect.Top() != aRect.Bottom() ) ) pOverlappedObj = pObjIter; } @@ -882,7 +882,7 @@ bool checkArrayForOccurrence(SdrObject* _pObjToCheck, SdrUnoObj* _pIgnore[], int return false; } -SdrObject* isOver(const Rectangle& _rRect,SdrPage& _rPage,SdrView& _rView,bool _bAllObjects, SdrUnoObj * _pIgnoreList[], int _nIgnoreListLength) +SdrObject* isOver(const tools::Rectangle& _rRect,SdrPage& _rPage,SdrView& _rView,bool _bAllObjects, SdrUnoObj * _pIgnoreList[], int _nIgnoreListLength) { SdrObject* pOverlappedObj = nullptr; SdrObjListIter aIter(_rPage,SdrIterMode::DeepNoGroups); @@ -898,7 +898,7 @@ SdrObject* isOver(const Rectangle& _rRect,SdrPage& _rPage,SdrView& _rView,bool _ if ( (_bAllObjects || !_rView.IsObjMarked(pObjIter)) && (dynamic_cast<OUnoObject*>(pObjIter) != nullptr || dynamic_cast<OOle2Obj*>(pObjIter) != nullptr) ) { - Rectangle aRect = _rRect.GetIntersection(pObjIter->GetLastBoundRect()); + tools::Rectangle aRect = _rRect.GetIntersection(pObjIter->GetLastBoundRect()); if ( !aRect.IsEmpty() && (aRect.Left() != aRect.Right() && aRect.Top() != aRect.Bottom() ) ) pOverlappedObj = pObjIter; } @@ -912,7 +912,7 @@ SdrObject* isOver(SdrObject* _pObj,SdrPage& _rPage,SdrView& _rView) SdrObject* pOverlappedObj = nullptr; if (dynamic_cast<OUnoObject*>(_pObj) != nullptr || dynamic_cast<OOle2Obj*>(_pObj) != nullptr) // this doesn't need to be done for shapes { - Rectangle aRect = _pObj->GetCurrentBoundRect(); + tools::Rectangle aRect = _pObj->GetCurrentBoundRect(); pOverlappedObj = isOver(aRect,_rPage,_rView,false/*_bUnMarkedObjects*/,_pObj); } return pOverlappedObj; @@ -950,20 +950,20 @@ uno::Sequence< OUString > getParameterNames( const uno::Reference< sdbc::XRowSet return aNames; } -Rectangle getRectangleFromControl(SdrObject* _pControl) +tools::Rectangle getRectangleFromControl(SdrObject* _pControl) { if (_pControl) { uno::Reference< report::XReportComponent > xComponent( _pControl->getUnoShape(), uno::UNO_QUERY); if (xComponent.is()) { - Rectangle aRect(VCLPoint(xComponent->getPosition()),VCLSize(xComponent->getSize())); + tools::Rectangle aRect(VCLPoint(xComponent->getPosition()),VCLSize(xComponent->getSize())); aRect.setHeight(aRect.getHeight() + 1); aRect.setWidth(aRect.getWidth() + 1); return aRect; } } - return Rectangle(); + return tools::Rectangle(); } // check overlapping @@ -971,7 +971,7 @@ void correctOverlapping(SdrObject* _pControl,OReportSection& _aReportSection,boo { OSectionView& rSectionView = _aReportSection.getSectionView(); uno::Reference< report::XReportComponent> xComponent(_pControl->getUnoShape(),uno::UNO_QUERY); - Rectangle aRect = getRectangleFromControl(_pControl); + tools::Rectangle aRect = getRectangleFromControl(_pControl); bool bOverlapping = true; while ( bOverlapping ) @@ -980,7 +980,7 @@ void correctOverlapping(SdrObject* _pControl,OReportSection& _aReportSection,boo bOverlapping = pOverlappedObj != nullptr; if ( bOverlapping ) { - const Rectangle& aLogicRect = pOverlappedObj->GetLogicRect(); + const tools::Rectangle& aLogicRect = pOverlappedObj->GetLogicRect(); aRect.Move(0,aLogicRect.Top() + aLogicRect.getHeight() - aRect.Top()); xComponent->setPositionY(aRect.Top()); } diff --git a/reportdesign/source/ui/report/DesignView.cxx b/reportdesign/source/ui/report/DesignView.cxx index 1e013e88eff7..ff6b97866952 100644 --- a/reportdesign/source/ui/report/DesignView.cxx +++ b/reportdesign/source/ui/report/DesignView.cxx @@ -210,7 +210,7 @@ bool ODesignView::PreNotify( NotifyEvent& rNEvt ) return bRet; } -void ODesignView::resizeDocumentView(Rectangle& _rPlayground) +void ODesignView::resizeDocumentView(tools::Rectangle& _rPlayground) { if ( !_rPlayground.IsEmpty() ) { diff --git a/reportdesign/source/ui/report/EndMarker.cxx b/reportdesign/source/ui/report/EndMarker.cxx index fc59eb96d5d5..63f23e09c0d9 100644 --- a/reportdesign/source/ui/report/EndMarker.cxx +++ b/reportdesign/source/ui/report/EndMarker.cxx @@ -42,7 +42,7 @@ OEndMarker::~OEndMarker() { } -void OEndMarker::Paint(vcl::RenderContext& rRenderContext, const Rectangle& /*rRect*/) +void OEndMarker::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& /*rRect*/) { Fraction aCornerSpace(long(CORNER_SPACE)); aCornerSpace *= rRenderContext.GetMapMode().GetScaleX(); @@ -50,7 +50,7 @@ void OEndMarker::Paint(vcl::RenderContext& rRenderContext, const Rectangle& /*rR Size aSize = GetSizePixel(); aSize.Width() += nCornerSpace; - Rectangle aWholeRect(Point(-nCornerSpace,0),aSize); + tools::Rectangle aWholeRect(Point(-nCornerSpace,0),aSize); tools::PolyPolygon aPoly; aPoly.Insert( tools::Polygon(aWholeRect,nCornerSpace,nCornerSpace)); @@ -68,7 +68,7 @@ void OEndMarker::Paint(vcl::RenderContext& rRenderContext, const Rectangle& /*rR rRenderContext.DrawGradient(PixelToLogic(aPoly), aGradient); if (m_bMarked) { - Rectangle aRect(Point(-nCornerSpace, nCornerSpace), + tools::Rectangle aRect(Point(-nCornerSpace, nCornerSpace), Size(aSize.Width() - nCornerSpace, aSize.Height() - nCornerSpace - nCornerSpace)); ColorChanger aColors(this, COL_WHITE, COL_WHITE); diff --git a/reportdesign/source/ui/report/ReportController.cxx b/reportdesign/source/ui/report/ReportController.cxx index b1d0d9499ea3..fd112bffc036 100644 --- a/reportdesign/source/ui/report/ReportController.cxx +++ b/reportdesign/source/ui/report/ReportController.cxx @@ -3144,13 +3144,13 @@ void OReportController::createControl(const Sequence< PropertyValue >& _aArgs,co if ( sCustomShapeType.isEmpty() ) sCustomShapeType = "diamond"; OReportSection::createDefault(sCustomShapeType,pNewControl); - pNewControl->SetLogicRect(Rectangle(3000,500,6000,3500)); // switch height and width + pNewControl->SetLogicRect(tools::Rectangle(3000,500,6000,3500)); // switch height and width } else if ( _nObjectId == OBJ_OLE2 || OBJ_DLG_SUBREPORT == _nObjectId ) { pNewControl = SdrObjFactory::MakeNewObject( SdrInventor::ReportDesign, _nObjectId, pSectionWindow->getReportSection().getPage(),m_aReportModel.get() ); - pNewControl->SetLogicRect(Rectangle(3000,500,8000,5500)); // switch height and width + pNewControl->SetLogicRect(tools::Rectangle(3000,500,8000,5500)); // switch height and width xShapeProp.set(pNewControl->getUnoShape(),uno::UNO_QUERY_THROW); OOle2Obj* pObj = dynamic_cast<OOle2Obj*>(pNewControl); if ( pObj && !pObj->IsEmpty() ) @@ -3558,11 +3558,11 @@ void OReportController::addPairControls(const Sequence< PropertyValue >& aArgs) { if ( pSectionViews[0] == pSectionViews[1] ) { - Rectangle aLabel = getRectangleFromControl(pControl[0]); - Rectangle aTextfield = getRectangleFromControl(pControl[1]); + tools::Rectangle aLabel = getRectangleFromControl(pControl[0]); + tools::Rectangle aTextfield = getRectangleFromControl(pControl[1]); // create a Union of the given Label and Textfield - Rectangle aLabelAndTextfield( aLabel ); + tools::Rectangle aLabelAndTextfield( aLabel ); aLabelAndTextfield.Union(aTextfield); // check if there exists other fields and if yes, move down @@ -3574,7 +3574,7 @@ void OReportController::addPairControls(const Sequence< PropertyValue >& aArgs) bOverlapping = pOverlappedObj != nullptr; if ( bOverlapping ) { - const Rectangle& aLogicRect = pOverlappedObj->GetLogicRect(); + const tools::Rectangle& aLogicRect = pOverlappedObj->GetLogicRect(); aLabelAndTextfield.Move(0,aLogicRect.Top() + aLogicRect.getHeight() - aLabelAndTextfield.Top()); bHasToMove = true; } diff --git a/reportdesign/source/ui/report/ReportSection.cxx b/reportdesign/source/ui/report/ReportSection.cxx index b05a85a53348..f074a0aebf30 100644 --- a/reportdesign/source/ui/report/ReportSection.cxx +++ b/reportdesign/source/ui/report/ReportSection.cxx @@ -135,7 +135,7 @@ void OReportSection::dispose() vcl::Window::dispose(); } -void OReportSection::Paint( vcl::RenderContext& rRenderContext, const Rectangle& rRect ) +void OReportSection::Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect ) { Window::Paint(rRenderContext, rRect); @@ -231,7 +231,7 @@ void OReportSection::fill() m_pView->StartListening( *m_pModel ); m_pPage->SetSize( Size( getStyleProperty<awt::Size>(xReportDefinition,PROPERTY_PAPERSIZE).Width,5*m_xSection->getHeight()) ); const Size aPageSize = m_pPage->GetSize(); - m_pView->SetWorkArea( Rectangle( Point( nLeftMargin, 0), Size(aPageSize.Width() - nLeftMargin - nRightMargin,aPageSize.Height()) ) ); + m_pView->SetWorkArea( tools::Rectangle( Point( nLeftMargin, 0), Size(aPageSize.Width() - nLeftMargin - nRightMargin,aPageSize.Height()) ) ); } void OReportSection::Paste(const uno::Sequence< beans::NamedValue >& _aAllreadyCopiedObjects,bool _bForce) @@ -270,7 +270,7 @@ void OReportSection::Paste(const uno::Sequence< beans::NamedValue >& _aAllreadyC pNeuObj->SetModel( m_pModel.get() ); m_pPage->InsertObject(pNeuObj, SAL_MAX_SIZE); - Rectangle aRet(VCLPoint((*pCopiesIter)->getPosition()),VCLSize((*pCopiesIter)->getSize())); + tools::Rectangle aRet(VCLPoint((*pCopiesIter)->getPosition()),VCLSize((*pCopiesIter)->getSize())); aRet.setHeight(aRet.getHeight() + 1); aRet.setWidth(aRet.getWidth() + 1); bool bOverlapping = true; @@ -495,7 +495,7 @@ void OReportSection::_propertyChanged(const beans::PropertyChangeEvent& _rEvent) { m_pPage->SetSize( Size( nPaperWidth,nNewHeight) ); const Size aPageSize = m_pPage->GetSize(); - m_pView->SetWorkArea( Rectangle( Point( nLeftMargin, 0), Size(aPageSize.Width() - nLeftMargin - nRightMargin,aPageSize.Height()) ) ); + m_pView->SetWorkArea( tools::Rectangle( Point( nLeftMargin, 0), Size(aPageSize.Width() - nLeftMargin - nRightMargin,aPageSize.Height()) ) ); } impl_adjustObjectSizePosition(nPaperWidth,nLeftMargin,nRightMargin); m_pParent->Invalidate(InvalidateFlags::Update | InvalidateFlags::Transparent); @@ -546,7 +546,7 @@ void OReportSection::impl_adjustObjectSizePosition(sal_Int32 i_nPaperWidth,sal_I { xReportComponent->setPosition(aPos); correctOverlapping(pObject,*this,false); - Rectangle aRet(VCLPoint(xReportComponent->getPosition()),VCLSize(xReportComponent->getSize())); + tools::Rectangle aRet(VCLPoint(xReportComponent->getPosition()),VCLSize(xReportComponent->getSize())); aRet.setHeight(aRet.getHeight() + 1); aRet.setWidth(aRet.getWidth() + 1); if ( m_xSection.is() && (static_cast<sal_uInt32>(aRet.getHeight() + aRet.Top()) > m_xSection->getHeight()) ) @@ -757,7 +757,7 @@ sal_Int8 OReportSection::ExecuteDrop( const ExecuteDropEvent& _rEvt ) { m_pParent->getViewsWindow()->getView()->setMarked(m_pView, true); m_pView->UnmarkAll(); - const Rectangle& rRect = m_pView->GetWorkArea(); + const tools::Rectangle& rRect = m_pView->GetWorkArea(); if ( aDropPos.X() < rRect.Left() ) aDropPos.X() = rRect.Left(); else if ( aDropPos.X() > rRect.Right() ) diff --git a/reportdesign/source/ui/report/SectionView.cxx b/reportdesign/source/ui/report/SectionView.cxx index d7796c7549b2..1c5ba21f4865 100644 --- a/reportdesign/source/ui/report/SectionView.cxx +++ b/reportdesign/source/ui/report/SectionView.cxx @@ -67,13 +67,13 @@ void OSectionView::MarkListHasChanged() } -void OSectionView::MakeVisible( const Rectangle& rRect, vcl::Window& rWin ) +void OSectionView::MakeVisible( const tools::Rectangle& rRect, vcl::Window& rWin ) { // visible area MapMode aMap( rWin.GetMapMode() ); const Point aOrg( aMap.GetOrigin() ); const Size aVisSize( rWin.GetOutputSize() ); - const Rectangle aVisRect( Point(-aOrg.X(),-aOrg.Y()), aVisSize ); + const tools::Rectangle aVisRect( Point(-aOrg.X(),-aOrg.Y()), aVisSize ); // check, if rectangle is inside visible area if ( !aVisRect.IsInside( rRect ) ) diff --git a/reportdesign/source/ui/report/SectionWindow.cxx b/reportdesign/source/ui/report/SectionWindow.cxx index fc235820760d..fe7f59b7930f 100644 --- a/reportdesign/source/ui/report/SectionWindow.cxx +++ b/reportdesign/source/ui/report/SectionWindow.cxx @@ -265,7 +265,7 @@ void OSectionWindow::Resize() aReportPos.Y() += aSectionSize.Height(); m_aSplitter->SetPosSizePixel(aReportPos,Size(aSectionSize.Width(),m_aSplitter->GetSizePixel().Height())); aSectionSize.Height() = (long)(1000 * (double)GetMapMode().GetScaleY()); - m_aSplitter->SetDragRectPixel( Rectangle(Point(aStartWidth,0),aSectionSize)); + m_aSplitter->SetDragRectPixel( tools::Rectangle(Point(aStartWidth,0),aSectionSize)); // set end marker aReportPos.X() += aSectionSize.Width(); diff --git a/reportdesign/source/ui/report/StartMarker.cxx b/reportdesign/source/ui/report/StartMarker.cxx index 31d2130743bd..9f1b7954be94 100644 --- a/reportdesign/source/ui/report/StartMarker.cxx +++ b/reportdesign/source/ui/report/StartMarker.cxx @@ -101,7 +101,7 @@ sal_Int32 OStartMarker::getMinHeight() const return LogicToPixel(Size(0, m_aText->GetTextHeight())).Height() + long(aExtraWidth); } -void OStartMarker::Paint(vcl::RenderContext& rRenderContext, const Rectangle& /*rRect*/) +void OStartMarker::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& /*rRect*/) { Size aSize(GetOutputSizePixel()); const long nCornerWidth = long(CORNER_SPACE * double(GetMapMode().GetScaleX())); @@ -115,11 +115,11 @@ void OStartMarker::Paint(vcl::RenderContext& rRenderContext, const Rectangle& /* const long nVRulerWidth = m_aVRuler->GetSizePixel().Width(); long nSize = aSize.Width() - nVRulerWidth; aSize.Width() += nCornerWidth; - rRenderContext.SetClipRegion(vcl::Region(rRenderContext.PixelToLogic(Rectangle(Point(), + rRenderContext.SetClipRegion(vcl::Region(rRenderContext.PixelToLogic(tools::Rectangle(Point(), Size(nSize, aSize.Height()))))); } - Rectangle aWholeRect(Point(), aSize); + tools::Rectangle aWholeRect(Point(), aSize); { const ColorChanger aColors(&rRenderContext, m_nTextBoundaries, m_nColor); tools::PolyPolygon aPoly; @@ -141,7 +141,7 @@ void OStartMarker::Paint(vcl::RenderContext& rRenderContext, const Rectangle& /* if (m_bMarked) { const long nCornerHeight = long(CORNER_SPACE * double(GetMapMode().GetScaleY())); - Rectangle aRect(Point(nCornerWidth, nCornerHeight), + tools::Rectangle aRect(Point(nCornerWidth, nCornerHeight), Size(aSize.Width() - nCornerWidth - nCornerWidth, aSize.Height() - nCornerHeight - nCornerHeight)); ColorChanger aColors(&rRenderContext, COL_WHITE, COL_WHITE); @@ -170,7 +170,7 @@ void OStartMarker::MouseButtonUp( const MouseEvent& rMEvt ) const Size aOutputSize = GetOutputSizePixel(); if( aPos.X() > aOutputSize.Width() || aPos.Y() > aOutputSize.Height() ) return; - Rectangle aRect(m_aImage->GetPosPixel(),m_aImage->GetSizePixel()); + tools::Rectangle aRect(m_aImage->GetPosPixel(),m_aImage->GetSizePixel()); if ( rMEvt.GetClicks() == 2 || aRect.IsInside( aPos ) ) { m_bCollapsed = !m_bCollapsed; @@ -271,7 +271,7 @@ void OStartMarker::RequestHelp( const HelpEvent& rHEvt ) if( !m_aText->GetText().isEmpty()) { // Hilfe anzeigen - Rectangle aItemRect(rHEvt.GetMousePosPixel(),Size(GetSizePixel().Width(),getMinHeight())); + tools::Rectangle aItemRect(rHEvt.GetMousePosPixel(),Size(GetSizePixel().Width(),getMinHeight())); Point aPt = OutputToScreenPixel( aItemRect.TopLeft() ); aItemRect.Left() = aPt.X(); aItemRect.Top() = aPt.Y(); diff --git a/reportdesign/source/ui/report/ViewsWindow.cxx b/reportdesign/source/ui/report/ViewsWindow.cxx index c7e4234e2e9f..11c35bf2897c 100644 --- a/reportdesign/source/ui/report/ViewsWindow.cxx +++ b/reportdesign/source/ui/report/ViewsWindow.cxx @@ -55,12 +55,12 @@ namespace rptui using namespace ::com::sun::star; using namespace ::comphelper; -bool lcl_getNewRectSize(const Rectangle& _aObjRect,long& _nXMov, long& _nYMov,SdrObject* _pObj,SdrView* _pView,sal_Int32 _nControlModification, bool _bBoundRects) +bool lcl_getNewRectSize(const tools::Rectangle& _aObjRect,long& _nXMov, long& _nYMov,SdrObject* _pObj,SdrView* _pView,sal_Int32 _nControlModification, bool _bBoundRects) { bool bMoveAllowed = _nXMov != 0 || _nYMov != 0; if ( bMoveAllowed ) { - Rectangle aNewRect = _aObjRect; + tools::Rectangle aNewRect = _aObjRect; SdrObject* pOverlappedObj = nullptr; do { @@ -81,7 +81,7 @@ bool lcl_getNewRectSize(const Rectangle& _aObjRect,long& _nXMov, long& _nYMov,Sd pOverlappedObj = isOver(aNewRect,*_pObj->GetPage(),*_pView,true,_pObj); if ( pOverlappedObj && _pObj != pOverlappedObj ) { - Rectangle aOverlappingRect = (_bBoundRects ? pOverlappedObj->GetCurrentBoundRect() : pOverlappedObj->GetSnapRect()); + tools::Rectangle aOverlappingRect = (_bBoundRects ? pOverlappedObj->GetCurrentBoundRect() : pOverlappedObj->GetSnapRect()); sal_Int32 nXTemp = _nXMov; sal_Int32 nYTemp = _nYMov; switch(_nControlModification) @@ -119,7 +119,7 @@ bool lcl_getNewRectSize(const Rectangle& _aObjRect,long& _nXMov, long& _nYMov,Sd case ControlModification::HEIGHT_GREATEST: case ControlModification::WIDTH_GREATEST: { - Rectangle aIntersectionRect = aNewRect.GetIntersection(aOverlappingRect); + tools::Rectangle aIntersectionRect = aNewRect.GetIntersection(aOverlappingRect); if ( !aIntersectionRect.IsEmpty() ) { if ( _nControlModification == ControlModification::WIDTH_GREATEST ) @@ -252,7 +252,7 @@ void OViewsWindow::Resize() } } -void OViewsWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) +void OViewsWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) { Window::Paint(rRenderContext, rRect); @@ -267,7 +267,7 @@ void OViewsWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rR aOut.Width() -= long(aStartWidth); aOut = rRenderContext.PixelToLogic(aOut); - Rectangle aRect(rRenderContext.PixelToLogic(Point(aStartWidth,0)), aOut); + tools::Rectangle aRect(rRenderContext.PixelToLogic(Point(aStartWidth,0)), aOut); Wallpaper aWall(m_aColorConfig.GetColorValue(::svtools::APPBACKGROUND).nColor); rRenderContext.DrawWallpaper(aRect, aWall); } @@ -667,21 +667,21 @@ void OViewsWindow::collectRectangles(TRectangleMap& _rSortRectangles) { const SdrMark* pM = rView.GetSdrMarkByIndex(i); SdrObject* pObj = pM->GetMarkedSdrObj(); - Rectangle aObjRect(pObj->GetSnapRect()); + tools::Rectangle aObjRect(pObj->GetSnapRect()); _rSortRectangles.insert(TRectangleMap::value_type(aObjRect,TRectangleMap::mapped_type(pObj,&rView))); } } } } -void OViewsWindow::collectBoundResizeRect(const TRectangleMap& _rSortRectangles,sal_Int32 _nControlModification,bool _bAlignAtSection, Rectangle& _rBound, Rectangle& _rResize) +void OViewsWindow::collectBoundResizeRect(const TRectangleMap& _rSortRectangles,sal_Int32 _nControlModification,bool _bAlignAtSection, tools::Rectangle& _rBound, tools::Rectangle& _rResize) { bool bOnlyOnce = false; TRectangleMap::const_iterator aRectIter = _rSortRectangles.begin(); TRectangleMap::const_iterator aRectEnd = _rSortRectangles.end(); for (;aRectIter != aRectEnd ; ++aRectIter) { - Rectangle aObjRect = aRectIter->first; + tools::Rectangle aObjRect = aRectIter->first; if ( _rResize.IsEmpty() ) _rResize = aObjRect; switch(_nControlModification) @@ -722,7 +722,7 @@ void OViewsWindow::collectBoundResizeRect(const TRectangleMap& _rSortRectangles, try { uno::Reference<report::XReportDefinition> xReportDefinition = xSection->getReportDefinition(); - _rBound.Union(Rectangle(getStyleProperty<sal_Int32>(xReportDefinition,PROPERTY_LEFTMARGIN),0, + _rBound.Union(tools::Rectangle(getStyleProperty<sal_Int32>(xReportDefinition,PROPERTY_LEFTMARGIN),0, getStyleProperty<awt::Size>(xReportDefinition,PROPERTY_PAPERSIZE).Width - getStyleProperty<sal_Int32>(xReportDefinition,PROPERTY_RIGHTMARGIN), xSection->getHeight())); } @@ -756,7 +756,7 @@ void OViewsWindow::alignMarkedObjects(sal_Int32 _nControlModification,bool _bAli eCompareMode = (ControlModification::CENTER_VERTICAL == _nControlModification) ? RectangleLess::POS_CENTER_VERTICAL : RectangleLess::POS_CENTER_HORIZONTAL; uno::Reference<report::XSection> xSection = (*m_aSections.begin())->getReportSection().getSection(); uno::Reference<report::XReportDefinition> xReportDefinition = xSection->getReportDefinition(); - aRefPoint = Rectangle(getStyleProperty<sal_Int32>(xReportDefinition,PROPERTY_LEFTMARGIN),0, + aRefPoint = tools::Rectangle(getStyleProperty<sal_Int32>(xReportDefinition,PROPERTY_LEFTMARGIN),0, getStyleProperty<awt::Size>(xReportDefinition,PROPERTY_PAPERSIZE).Width - getStyleProperty<sal_Int32>(xReportDefinition,PROPERTY_RIGHTMARGIN), xSection->getHeight()).Center(); } @@ -767,19 +767,19 @@ void OViewsWindow::alignMarkedObjects(sal_Int32 _nControlModification,bool _bAli TRectangleMap aSortRectangles(aCompare); collectRectangles(aSortRectangles); - Rectangle aBound; - Rectangle aResize; + tools::Rectangle aBound; + tools::Rectangle aResize; collectBoundResizeRect(aSortRectangles,_nControlModification,_bAlignAtSection,aBound,aResize); bool bMove = true; - ::std::mem_fun_t<long&,Rectangle> aGetFun = ::std::mem_fun<long&,Rectangle>(&Rectangle::Bottom); - ::std::mem_fun_t<long&,Rectangle> aRefFun = ::std::mem_fun<long&,Rectangle>(&Rectangle::Top); + ::std::mem_fun_t<long&,tools::Rectangle> aGetFun = ::std::mem_fun<long&,tools::Rectangle>(&tools::Rectangle::Bottom); + ::std::mem_fun_t<long&,tools::Rectangle> aRefFun = ::std::mem_fun<long&,tools::Rectangle>(&tools::Rectangle::Top); TRectangleMap::const_iterator aRectIter = aSortRectangles.begin(); TRectangleMap::const_iterator aRectEnd = aSortRectangles.end(); for (;aRectIter != aRectEnd ; ++aRectIter) { - Rectangle aObjRect = aRectIter->first; + tools::Rectangle aObjRect = aRectIter->first; SdrObject* pObj = aRectIter->second.first; SdrView* pView = aRectIter->second.second; Point aCenter(aBound.Center()); @@ -793,8 +793,8 @@ void OViewsWindow::alignMarkedObjects(sal_Int32 _nControlModification,bool _bAli switch(_nControlModification) { case ControlModification::TOP : - aGetFun = ::std::mem_fun<long&,Rectangle>(&Rectangle::Top); - aRefFun = ::std::mem_fun<long&,Rectangle>(&Rectangle::Bottom); + aGetFun = ::std::mem_fun<long&,tools::Rectangle>(&tools::Rectangle::Top); + aRefFun = ::std::mem_fun<long&,tools::Rectangle>(&tools::Rectangle::Bottom); pValue = &nYMov; break; case ControlModification::BOTTOM: @@ -807,16 +807,16 @@ void OViewsWindow::alignMarkedObjects(sal_Int32 _nControlModification,bool _bAli bMove = false; break; case ControlModification::RIGHT : - aGetFun = ::std::mem_fun<long&,Rectangle>(&Rectangle::Right); - aRefFun = ::std::mem_fun<long&,Rectangle>(&Rectangle::Left); + aGetFun = ::std::mem_fun<long&,tools::Rectangle>(&tools::Rectangle::Right); + aRefFun = ::std::mem_fun<long&,tools::Rectangle>(&tools::Rectangle::Left); break; case ControlModification::CENTER_HORIZONTAL: nXMov = aCenter.X() - aObjRect.Center().X(); bMove = false; break; case ControlModification::LEFT : - aGetFun = ::std::mem_fun<long&,Rectangle>(&Rectangle::Left); - aRefFun = ::std::mem_fun<long&,Rectangle>(&Rectangle::Right); + aGetFun = ::std::mem_fun<long&,tools::Rectangle>(&tools::Rectangle::Left); + aRefFun = ::std::mem_fun<long&,tools::Rectangle>(&tools::Rectangle::Right); break; default: bMove = false; @@ -824,7 +824,7 @@ void OViewsWindow::alignMarkedObjects(sal_Int32 _nControlModification,bool _bAli } if ( bMove ) { - Rectangle aTest = aObjRect; + tools::Rectangle aTest = aObjRect; aGetFun(&aTest) = aGetFun(&aBound); TRectangleMap::const_iterator aInterSectRectIter = aSortRectangles.begin(); for (; aInterSectRectIter != aRectIter; ++aInterSectRectIter) @@ -832,7 +832,7 @@ void OViewsWindow::alignMarkedObjects(sal_Int32 _nControlModification,bool _bAli if ( pView == aInterSectRectIter->second.second && (dynamic_cast<OUnoObject*>(aInterSectRectIter->second.first) || dynamic_cast<OOle2Obj*>(aInterSectRectIter->second.first))) { SdrObject* pPreviousObj = aInterSectRectIter->second.first; - Rectangle aIntersectRect = aTest.GetIntersection( pPreviousObj->GetSnapRect()); + tools::Rectangle aIntersectRect = aTest.GetIntersection( pPreviousObj->GetSnapRect()); if ( !aIntersectRect.IsEmpty() && (aIntersectRect.Left() != aIntersectRect.Right() && aIntersectRect.Top() != aIntersectRect.Bottom() ) ) { *pValue = aRefFun(&aIntersectRect) - aGetFun(&aObjRect); @@ -1000,7 +1000,7 @@ void OViewsWindow::BrkAction() ::std::for_each( m_aSections.begin(), m_aSections.end(), ApplySectionViewAction(eBreakAction) ); } -void OViewsWindow::BegDragObj_createInvisibleObjectAtPosition(const Rectangle& _aRect, const OSectionView& _rSection) +void OViewsWindow::BegDragObj_createInvisibleObjectAtPosition(const tools::Rectangle& _aRect, const OSectionView& _rSection) { TSectionsMap::const_iterator aIter = m_aSections.begin(); TSectionsMap::const_iterator aEnd = m_aSections.end(); @@ -1078,7 +1078,7 @@ void OViewsWindow::BegDragObj(const Point& _aPnt, SdrHdl* _pHdl,const OSectionVi SdrObject* pObj = pM->GetMarkedSdrObj(); if (::std::find(m_aBegDragTempList.begin(),m_aBegDragTempList.end(),pObj) == m_aBegDragTempList.end()) { - Rectangle aRect( pObj->GetCurrentBoundRect() ); + tools::Rectangle aRect( pObj->GetCurrentBoundRect() ); aRect.Move(0, aNewObjPos.Y()); aLeftTop.X() = ::std::min( aRect.Left(), aLeftTop.X() ); @@ -1094,7 +1094,7 @@ void OViewsWindow::BegDragObj(const Point& _aPnt, SdrHdl* _pHdl,const OSectionVi } } ++nViewCount; - Rectangle aClipRect = rView.GetWorkArea(); + tools::Rectangle aClipRect = rView.GetWorkArea(); aClipRect.Top() = -aNewObjPos.Y(); rView.SetWorkArea( aClipRect ); @@ -1382,14 +1382,14 @@ void OViewsWindow::MovAction(const Point& _aPnt,const OSectionView* _pSection,bo if (_bControlKeySet) { - Rectangle aClipRect = rView.GetWorkArea(); + tools::Rectangle aClipRect = rView.GetWorkArea(); aClipRect.Top() = aCurrentSectionPos.Y() - aPosForWorkArea.Y(); aClipRect.Bottom() = aClipRect.Top() + nSectionHeight; rView.SetWorkArea( aClipRect ); } else { - Rectangle aClipRect = rView.GetWorkArea(); + tools::Rectangle aClipRect = rView.GetWorkArea(); aClipRect.Top() = -aPosForWorkArea.Y(); rView.SetWorkArea( aClipRect ); } @@ -1497,14 +1497,14 @@ void OViewsWindow::handleKey(const vcl::KeyCode& _rCode) if ( rView.IsMoveAllowed() ) { // restrict movement to work area - Rectangle rWorkArea = rView.GetWorkArea(); + tools::Rectangle rWorkArea = rView.GetWorkArea(); rWorkArea.Right()++; if ( !rWorkArea.IsEmpty() ) { if ( rWorkArea.Top() < 0 ) rWorkArea.Top() = 0; - Rectangle aMarkRect( rView.GetMarkedObjRect() ); + tools::Rectangle aMarkRect( rView.GetMarkedObjRect() ); aMarkRect.Move( nX, nY ); if ( !rWorkArea.IsInside( aMarkRect ) ) @@ -1537,7 +1537,7 @@ void OViewsWindow::handleKey(const vcl::KeyCode& _rCode) { do { - Rectangle aOver = pOverlapped->GetLastBoundRect(); + tools::Rectangle aOver = pOverlapped->GetLastBoundRect(); Point aPos; if ( nCode == KEY_UP ) { @@ -1608,7 +1608,7 @@ void OViewsWindow::handleKey(const vcl::KeyCode& _rCode) if ( bWasSnapEnabled ) rView.SetSnapEnabled( false ); - Rectangle aNewRect; + tools::Rectangle aNewRect; bool bCheck = false; const SdrMarkList& rMarkList = rView.GetMarkedObjectList(); for (size_t i = 0; !bCheck && i < rMarkList.GetMarkCount(); ++i ) @@ -1650,7 +1650,7 @@ void OViewsWindow::handleKey(const vcl::KeyCode& _rCode) } // make moved handle visible - const Rectangle aVisRect( aEndPoint - Point( DEFAUL_MOVE_SIZE, DEFAUL_MOVE_SIZE ), Size( 200, 200 ) ); + const tools::Rectangle aVisRect( aEndPoint - Point( DEFAUL_MOVE_SIZE, DEFAUL_MOVE_SIZE ), Size( 200, 200 ) ); rView.MakeVisible( aVisRect, rReportSection); } } @@ -1717,7 +1717,7 @@ void OViewsWindow::zoom(const Fraction& _aZoom) aOut.Width() = aStartWidth; aOut = PixelToLogic(aOut); - Rectangle aRect(PixelToLogic(Point(0,0)),aOut); + tools::Rectangle aRect(PixelToLogic(Point(0,0)),aOut); Invalidate(aRect, InvalidateFlags::NoChildren); } diff --git a/reportdesign/source/ui/report/dlgedfunc.cxx b/reportdesign/source/ui/report/dlgedfunc.cxx index 009d686a3a24..55299ad0c8fb 100644 --- a/reportdesign/source/ui/report/dlgedfunc.cxx +++ b/reportdesign/source/ui/report/dlgedfunc.cxx @@ -83,9 +83,9 @@ void DlgEdFunc::ForceScroll( const Point& rPos ) Point aPos = pScrollWindow->getThumbPos(); aPos.X() *= 0.5; aPos.Y() *= 0.5; - Rectangle aOutRect( aPos, aOut ); + tools::Rectangle aOutRect( aPos, aOut ); aOutRect = m_pParent->PixelToLogic( aOutRect ); - Rectangle aWorkArea(Point(), pScrollWindow->getTotalSize()); + tools::Rectangle aWorkArea(Point(), pScrollWindow->getTotalSize()); aWorkArea.Right() -= (long)aStartWidth; aWorkArea = pScrollWindow->PixelToLogic( aWorkArea ); if( !aOutRect.IsInside( rPos ) && aWorkArea.IsInside( rPos ) ) @@ -326,7 +326,7 @@ bool DlgEdFunc::handleKeyEvent(const KeyEvent& _rEvent) if ( pHdl ) { Point aHdlPosition( pHdl->GetPos() ); - Rectangle aVisRect( aHdlPosition - Point( DEFAUL_MOVE_SIZE, DEFAUL_MOVE_SIZE ), Size( 200, 200 ) ); + tools::Rectangle aVisRect( aHdlPosition - Point( DEFAUL_MOVE_SIZE, DEFAUL_MOVE_SIZE ), Size( 200, 200 ) ); m_rView.MakeVisible( aVisRect, *m_pParent); } @@ -582,7 +582,7 @@ bool DlgEdFunc::isRectangleHit(const MouseEvent& rMEvt) if ( m_rView.IsObjMarked(pObjIter) && (dynamic_cast<OUnoObject*>(pObjIter) != nullptr || dynamic_cast<OOle2Obj*>(pObjIter) != nullptr) ) { - Rectangle aNewRect = pObjIter->GetLastBoundRect(); + tools::Rectangle aNewRect = pObjIter->GetLastBoundRect(); long nDx = rDragStat.IsHorFixed() ? 0 : rDragStat.GetDX(); long nDy = rDragStat.IsVerFixed() ? 0 : rDragStat.GetDY(); if ( (nDx + aNewRect.Left()) < 0 ) diff --git a/sc/inc/AccessibleFilterMenu.hxx b/sc/inc/AccessibleFilterMenu.hxx index 43d338072153..fe3c42afca83 100644 --- a/sc/inc/AccessibleFilterMenu.hxx +++ b/sc/inc/AccessibleFilterMenu.hxx @@ -127,9 +127,9 @@ protected: sal_Int32 getMenuItemCount() const; - virtual Rectangle GetBoundingBoxOnScreen() const override; + virtual tools::Rectangle GetBoundingBoxOnScreen() const override; - virtual Rectangle GetBoundingBox() const override; + virtual tools::Rectangle GetBoundingBox() const override; private: bool isSelected() const; diff --git a/sc/inc/AccessibleFilterMenuItem.hxx b/sc/inc/AccessibleFilterMenuItem.hxx index cbf4425cff25..06fbc8a2d6db 100644 --- a/sc/inc/AccessibleFilterMenuItem.hxx +++ b/sc/inc/AccessibleFilterMenuItem.hxx @@ -79,9 +79,9 @@ public: protected: - virtual Rectangle GetBoundingBoxOnScreen() const override; + virtual tools::Rectangle GetBoundingBoxOnScreen() const override; - virtual Rectangle GetBoundingBox() const override; + virtual tools::Rectangle GetBoundingBox() const override; private: bool isSelected() const; diff --git a/sc/inc/detfunc.hxx b/sc/inc/detfunc.hxx index 47e8a4f2ac1f..93bccd455996 100644 --- a/sc/inc/detfunc.hxx +++ b/sc/inc/detfunc.hxx @@ -69,10 +69,10 @@ class SC_DLLPUBLIC ScDetectiveFunc Point GetDrawPos( SCCOL nCol, SCROW nRow, DrawPosMode eMode ) const; /** @return the drawing layer rectangle for the passed cell range. */ - Rectangle GetDrawRect( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2 ) const; + tools::Rectangle GetDrawRect( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2 ) const; /** @return the drawing layer rectangle for the passed cell address. */ - Rectangle GetDrawRect( SCCOL nCol, SCROW nRow ) const; + tools::Rectangle GetDrawRect( SCCOL nCol, SCROW nRow ) const; bool HasArrow( const ScAddress& rStart, SCCOL nEndCol, SCROW nEndRow, SCTAB nEndTab ); diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx index 8310e973dfc3..bb28fb5a0fd0 100644 --- a/sc/inc/document.hxx +++ b/sc/inc/document.hxx @@ -790,8 +790,8 @@ public: void GetEmbedded( ScRange& rRange ) const; void SetEmbedded( const ScRange& rRange ); void ResetEmbedded(); - Rectangle GetEmbeddedRect() const; // 1/100 mm - void SetEmbedded( SCTAB nTab, const Rectangle& rRect ); // from VisArea (1/100 mm) + tools::Rectangle GetEmbeddedRect() const; // 1/100 mm + void SetEmbedded( SCTAB nTab, const tools::Rectangle& rRect ); // from VisArea (1/100 mm) static SC_DLLPUBLIC bool ValidTabName( const OUString& rName ); @@ -942,8 +942,8 @@ public: void StartAnimations( SCTAB nTab, vcl::Window* pWin ); - bool HasBackgroundDraw( SCTAB nTab, const Rectangle& rMMRect ) const; - bool HasAnyDraw( SCTAB nTab, const Rectangle& rMMRect ) const; + bool HasBackgroundDraw( SCTAB nTab, const tools::Rectangle& rMMRect ) const; + bool HasAnyDraw( SCTAB nTab, const tools::Rectangle& rMMRect ) const; const ScSheetEvents* GetSheetEvents( SCTAB nTab ) const; void SetSheetEvents( SCTAB nTab, const ScSheetEvents* pNew ); @@ -1141,7 +1141,7 @@ public: SCCOL nEndCol, SCROW nEndRow, bool bLeftIsEmpty = false, ScRange* pLastRange = nullptr, - Rectangle* pLastMM = nullptr ) const; + tools::Rectangle* pLastMM = nullptr ) const; void SkipOverlapped( SCCOL& rCol, SCROW& rRow, SCTAB nTab ) const; bool IsHorOverlapped( SCCOL nCol, SCROW nRow, SCTAB nTab ) const; @@ -1834,9 +1834,9 @@ public: ScPrintRangeSaver* CreatePrintRangeSaver() const; void RestorePrintRanges( const ScPrintRangeSaver& rSaver ); - SC_DLLPUBLIC Rectangle GetMMRect( SCCOL nStartCol, SCROW nStartRow, + SC_DLLPUBLIC tools::Rectangle GetMMRect( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTab, bool bHiddenAsZero = true ) const; - SC_DLLPUBLIC ScRange GetRange( SCTAB nTab, const Rectangle& rMMRect, bool bHiddenAsZero = true ) const; + SC_DLLPUBLIC ScRange GetRange( SCTAB nTab, const tools::Rectangle& rMMRect, bool bHiddenAsZero = true ) const; void UpdStlShtPtrsFrmNms(); void StylesToNames(); diff --git a/sc/inc/docuno.hxx b/sc/inc/docuno.hxx index e7195e5a9e61..55f6afb99858 100644 --- a/sc/inc/docuno.hxx +++ b/sc/inc/docuno.hxx @@ -340,7 +340,7 @@ public: virtual void setClientZoom(int nTilePixelWidth, int nTilePixelHeight, int nTileTwipWidth, int nTileTwipHeight) override; /// @see vcl::ITiledRenderable::getRowColumnHeaders(). - virtual OUString getRowColumnHeaders(const Rectangle& rRectangle) override; + virtual OUString getRowColumnHeaders(const tools::Rectangle& rRectangle) override; /// @see vcl::ITiledRenderable::getCellCursor(). virtual OString getCellCursor( int nOutputWidth, @@ -355,7 +355,7 @@ public: OUString getTrackedChanges() override; /// @see vcl::ITiledRenderable::setClientVisibleArea(). - virtual void setClientVisibleArea(const Rectangle& rRectangle) override; + virtual void setClientVisibleArea(const tools::Rectangle& rRectangle) override; /// @see vcl::ITiledRenderable::getPostIts(). OUString getPostIts() override; diff --git a/sc/inc/dpobject.hxx b/sc/inc/dpobject.hxx index d8c20f10f5f8..1b3031f662bc 100644 --- a/sc/inc/dpobject.hxx +++ b/sc/inc/dpobject.hxx @@ -53,7 +53,7 @@ namespace com { namespace sun { namespace star { } }}} -class Rectangle; +namespace tools { class Rectangle; } class ScDPSaveData; class ScDPOutput; struct ScPivotParam; @@ -176,7 +176,7 @@ public: long GetHeaderDim( const ScAddress& rPos, sal_uInt16& rOrient ); bool GetHeaderDrag( const ScAddress& rPos, bool bMouseLeft, bool bMouseTop, long nDragDim, - Rectangle& rPosRect, sal_uInt16& rOrient, long& rDimPos ); + tools::Rectangle& rPosRect, sal_uInt16& rOrient, long& rDimPos ); bool IsFilterButton( const ScAddress& rPos ); double GetPivotData( diff --git a/sc/inc/dpoutput.hxx b/sc/inc/dpoutput.hxx index ecd933c22814..e6d97cc2620a 100644 --- a/sc/inc/dpoutput.hxx +++ b/sc/inc/dpoutput.hxx @@ -38,7 +38,7 @@ namespace com { namespace sun { namespace star { namespace sheet { struct DataPilotTablePositionData; }}}} -class Rectangle; +namespace tools { class Rectangle; } class ScDocument; struct ScDPOutLevelData; @@ -117,7 +117,7 @@ public: long GetHeaderDim( const ScAddress& rPos, sal_uInt16& rOrient ); bool GetHeaderDrag( const ScAddress& rPos, bool bMouseLeft, bool bMouseTop, long nDragDim, - Rectangle& rPosRect, sal_uInt16& rOrient, long& rDimPos ); + tools::Rectangle& rPosRect, sal_uInt16& rOrient, long& rDimPos ); bool IsFilterButton( const ScAddress& rPos ); void GetMemberResultNames(ScDPUniqueStringSet& rNames, long nDimension); diff --git a/sc/inc/drwlayer.hxx b/sc/inc/drwlayer.hxx index fa31f6f43afd..46b117256957 100644 --- a/sc/inc/drwlayer.hxx +++ b/sc/inc/drwlayer.hxx @@ -148,20 +148,20 @@ public: SCCOL nCol2,SCROW nRow2 ); void DeleteObjectsInSelection( const ScMarkData& rMark ); - void CopyToClip( ScDocument* pClipDoc, SCTAB nTab, const Rectangle& rRange ); + void CopyToClip( ScDocument* pClipDoc, SCTAB nTab, const tools::Rectangle& rRange ); void CopyFromClip( ScDrawLayer* pClipModel, - SCTAB nSourceTab, const Rectangle& rSourceRange, - const ScAddress& rDestPos, const Rectangle& rDestRange ); + SCTAB nSourceTab, const tools::Rectangle& rSourceRange, + const ScAddress& rDestPos, const tools::Rectangle& rDestRange ); void SetPageSize( sal_uInt16 nPageNo, const Size& rSize, bool bUpdateNoteCaptionPos ); // mirror or move between positive and negative positions for RTL void MirrorRTL( SdrObject* pObj ); - static void MirrorRectRTL( Rectangle& rRect ); // for bounding rectangles etc. + static void MirrorRectRTL( tools::Rectangle& rRect ); // for bounding rectangles etc. /** Returns the rectangle for the passed cell address in 1/100 mm. @param bMergedCell True = regards merged cells. False = use single column/row size. */ - static Rectangle GetCellRect( ScDocument& rDoc, const ScAddress& rPos, bool bMergedCell ); + static tools::Rectangle GetCellRect( ScDocument& rDoc, const ScAddress& rPos, bool bMergedCell ); // GetVisibleName: name for navigator etc: GetPersistName or GetName // (ChartListenerCollection etc. must use GetPersistName directly) diff --git a/sc/inc/editutil.hxx b/sc/inc/editutil.hxx index 00f0029d3eba..88ddd6138ea3 100644 --- a/sc/inc/editutil.hxx +++ b/sc/inc/editutil.hxx @@ -82,7 +82,7 @@ public: OutputDevice* pDevice, double nScaleX, double nScaleY, const Fraction& rX, const Fraction& rY ); - Rectangle GetEditArea( const ScPatternAttr* pPattern, bool bForceToTop ); + tools::Rectangle GetEditArea( const ScPatternAttr* pPattern, bool bForceToTop ); }; class ScEditAttrTester diff --git a/sc/inc/postit.hxx b/sc/inc/postit.hxx index c61df47be866..fde974b5f5df 100644 --- a/sc/inc/postit.hxx +++ b/sc/inc/postit.hxx @@ -34,7 +34,7 @@ class SdrPage; class SfxItemSet; class ScDocument; -class Rectangle; +namespace tools { class Rectangle; } struct ScCaptionInitData; /** Some desperate attempt to fight against the caption object ownership mess, @@ -265,7 +265,7 @@ public: /** Creates and returns a caption object for a temporary caption. */ static ScCaptionPtr CreateTempCaption( ScDocument& rDoc, const ScAddress& rPos, SdrPage& rDrawPage, const OUString& rUserText, - const Rectangle& rVisRect, bool bTailFront ); + const tools::Rectangle& rVisRect, bool bTailFront ); /** Creates a cell note using the passed caption drawing object. @@ -321,7 +321,7 @@ public: static ScPostIt* CreateNoteFromObjectData( ScDocument& rDoc, const ScAddress& rPos, SfxItemSet* pItemSet, OutlinerParaObject* pOutlinerObj, - const Rectangle& rCaptionRect, bool bShown, + const tools::Rectangle& rCaptionRect, bool bShown, bool bAlwaysCreateCaption ); /** Creates a cell note based on the passed string and inserts it into the diff --git a/sc/inc/userdat.hxx b/sc/inc/userdat.hxx index c8e8d6a98ec0..f9b19ac6fdbd 100644 --- a/sc/inc/userdat.hxx +++ b/sc/inc/userdat.hxx @@ -49,7 +49,7 @@ public: Point maStartOffset; Point maEndOffset; Type meType; - Rectangle maLastRect; + tools::Rectangle maLastRect; explicit ScDrawObjData(); diff --git a/sc/qa/extras/anchor.cxx b/sc/qa/extras/anchor.cxx index 4f5594eb2126..93ff96adf278 100644 --- a/sc/qa/extras/anchor.cxx +++ b/sc/qa/extras/anchor.cxx @@ -165,12 +165,12 @@ void ScAnchorTest::testTdf76183() SdrPage *pPage = pDrawLayer->GetPage(0); // Add a circle somewhere below first row. - const Rectangle aOrigRect = Rectangle(1000, 1000, 1200, 1200); + const tools::Rectangle aOrigRect = tools::Rectangle(1000, 1000, 1200, 1200); SdrCircObj* pObj = new SdrCircObj(OBJ_CIRC, aOrigRect); pPage->InsertObject(pObj); // Anchor to cell ScDrawLayer::SetCellAnchoredFromPosition(*pObj, rDoc, 0); - const Rectangle& rNewRect = pObj->GetLogicRect(); + const tools::Rectangle& rNewRect = pObj->GetLogicRect(); // Set word wrap to true rDoc.ApplyAttr(0, 0, 0, SfxBoolItem(ATTR_LINEBREAK, true)); diff --git a/sc/qa/unit/filters-test.cxx b/sc/qa/unit/filters-test.cxx index 4354cc41d041..556d2bed6e3b 100644 --- a/sc/qa/unit/filters-test.cxx +++ b/sc/qa/unit/filters-test.cxx @@ -422,7 +422,7 @@ void ScFiltersTest::testSheetNamesXLSX() xDocSh->DoClose(); } -void impl_testLegacyCellAnchoredRotatedShape( ScDocument& rDoc, Rectangle& aRect, ScDrawObjData& aAnchor, long TOLERANCE = 30 /* 30 hmm */ ) +void impl_testLegacyCellAnchoredRotatedShape( ScDocument& rDoc, tools::Rectangle& aRect, ScDrawObjData& aAnchor, long TOLERANCE = 30 /* 30 hmm */ ) { ScDrawLayer* pDrawLayer = rDoc.GetDrawLayer(); CPPUNIT_ASSERT_MESSAGE("No drawing layer.", pDrawLayer); @@ -431,7 +431,7 @@ void impl_testLegacyCellAnchoredRotatedShape( ScDocument& rDoc, Rectangle& aRect CPPUNIT_ASSERT_EQUAL( static_cast<size_t>(1), pPage->GetObjCount() ); SdrObject* pObj = pPage->GetObj(0); - const Rectangle& aSnap = pObj->GetSnapRect(); + const tools::Rectangle& aSnap = pObj->GetSnapRect(); printf("expected height %ld actual %ld\n", aRect.GetHeight(), aSnap.GetHeight() ); CPPUNIT_ASSERT_EQUAL( true, testEqualsWithTolerance( aRect.GetHeight(), aSnap.GetHeight(), TOLERANCE ) ); printf("expected width %ld actual %ld\n", aRect.GetWidth(), aSnap.GetWidth() ); @@ -463,7 +463,7 @@ void ScFiltersTest::testLegacyCellAnchoredRotatedShape() ScDocument& rDoc = xDocSh->GetDocument(); // ensure the imported legacy rotated shape is in the expected position - Rectangle aRect( 6000, -2000, 8000, 4000 ); + tools::Rectangle aRect( 6000, -2000, 8000, 4000 ); // ensure the imported ( and converted ) anchor ( note we internally now store the anchor in // terms of the rotated shape ) is more or less contains the correct info ScDrawObjData aAnchor; @@ -493,7 +493,7 @@ void ScFiltersTest::testLegacyCellAnchoredRotatedShape() // ( same but different error happens pre-patch ) - we should do better here, I regard it // as a pre-existing bug though (#FIXME) //Rectangle aRect( 6000, -2000, 8000, 4000 ); // proper dimensions - Rectangle aRect( 6000, -2000, 7430, 4000 ); + tools::Rectangle aRect( 6000, -2000, 7430, 4000 ); // ensure the imported (and converted) anchor (note we internally now store the anchor in // terms of the rotated shape) is more or less contains the correct info ScDrawObjData aAnchor; @@ -516,7 +516,7 @@ void ScFiltersTest::testLegacyCellAnchoredRotatedShape() ScDocument& rDoc = xDocSh->GetDocument(); // ensure the imported legacy rotated shape is in the expected position - Rectangle aRect( 6000, 3000, 8000, 9000 ); + tools::Rectangle aRect( 6000, 3000, 8000, 9000 ); // ensure the imported (and converted) anchor (note we internally now store the anchor in // terms of the rotated shape) more or less contains the correct info diff --git a/sc/qa/unit/subsequent_filters-test.cxx b/sc/qa/unit/subsequent_filters-test.cxx index 56bbcb6d3f36..f838659d81ee 100644 --- a/sc/qa/unit/subsequent_filters-test.cxx +++ b/sc/qa/unit/subsequent_filters-test.cxx @@ -3757,7 +3757,7 @@ void ScFiltersTest::testBnc762542() SdrObject* pObj = pPage->GetObj(i); CPPUNIT_ASSERT_MESSAGE("Failed to get drawing object.", pObj); - Rectangle aRect(pObj->GetCurrentBoundRect()); + tools::Rectangle aRect(pObj->GetCurrentBoundRect()); CPPUNIT_ASSERT_MESSAGE("Drawing object shouldn't be rotated.", aRect.GetWidth() > aRect.GetHeight()); } diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx index 0dcd60215edc..68b83625acb2 100644 --- a/sc/qa/unit/ucalc.cxx +++ b/sc/qa/unit/ucalc.cxx @@ -2707,12 +2707,12 @@ void Test::testGraphicsInGroup() { //Add a square - Rectangle aOrigRect(2,2,100,100); + tools::Rectangle aOrigRect(2,2,100,100); SdrRectObj *pObj = new SdrRectObj(aOrigRect); pPage->InsertObject(pObj); - const Rectangle &rNewRect = pObj->GetLogicRect(); + const tools::Rectangle &rNewRect = pObj->GetLogicRect(); CPPUNIT_ASSERT_EQUAL_MESSAGE("must have equal position and size", - static_cast<const Rectangle &>(aOrigRect), rNewRect); + static_cast<const tools::Rectangle &>(aOrigRect), rNewRect); ScDrawLayer::SetPageAnchored(*pObj); @@ -2720,15 +2720,15 @@ void Test::testGraphicsInGroup() m_pDoc->ShowRows(0, 100, 0, false); m_pDoc->SetDrawPageSize(0); CPPUNIT_ASSERT_EQUAL_MESSAGE("Should not change when page anchored", - static_cast<const Rectangle &>(aOrigRect), rNewRect); + static_cast<const tools::Rectangle &>(aOrigRect), rNewRect); m_pDoc->ShowRows(0, 100, 0, true); m_pDoc->SetDrawPageSize(0); CPPUNIT_ASSERT_EQUAL_MESSAGE("Should not change when page anchored", - static_cast<const Rectangle &>(aOrigRect), rNewRect); + static_cast<const tools::Rectangle &>(aOrigRect), rNewRect); ScDrawLayer::SetCellAnchoredFromPosition(*pObj, *m_pDoc, 0); CPPUNIT_ASSERT_EQUAL_MESSAGE("That shouldn't change size or positioning", - static_cast<const Rectangle &>(aOrigRect), rNewRect); + static_cast<const tools::Rectangle &>(aOrigRect), rNewRect); m_pDoc->ShowRows(0, 100, 0, false); m_pDoc->SetDrawPageSize(0); @@ -2739,21 +2739,21 @@ void Test::testGraphicsInGroup() m_pDoc->ShowRows(0, 100, 0, true); m_pDoc->SetDrawPageSize(0); CPPUNIT_ASSERT_EQUAL_MESSAGE("Should not change when page anchored", - static_cast<const Rectangle &>(aOrigRect), rNewRect); + static_cast<const tools::Rectangle &>(aOrigRect), rNewRect); } { // Add a circle. - Rectangle aOrigRect = Rectangle(10,10,210,210); // 200 x 200 + tools::Rectangle aOrigRect = tools::Rectangle(10,10,210,210); // 200 x 200 SdrCircObj* pObj = new SdrCircObj(OBJ_CIRC, aOrigRect); pPage->InsertObject(pObj); - const Rectangle& rNewRect = pObj->GetLogicRect(); + const tools::Rectangle& rNewRect = pObj->GetLogicRect(); CPPUNIT_ASSERT_EQUAL_MESSAGE("Position and size of the circle shouldn't change when inserted into the page.", - static_cast<const Rectangle &>(aOrigRect), rNewRect); + static_cast<const tools::Rectangle &>(aOrigRect), rNewRect); ScDrawLayer::SetCellAnchoredFromPosition(*pObj, *m_pDoc, 0); CPPUNIT_ASSERT_EQUAL_MESSAGE("Size changed when cell anchored. Not good.", - static_cast<const Rectangle &>(aOrigRect), rNewRect); + static_cast<const tools::Rectangle &>(aOrigRect), rNewRect); // Insert 2 rows at the top. This should push the circle object down. m_pDoc->InsertRow(0, 0, MAXCOL, 0, 0, 2); @@ -2767,33 +2767,33 @@ void Test::testGraphicsInGroup() m_pDoc->DeleteRow(0, 0, MAXCOL, 0, 0, 2); m_pDoc->SetDrawPageSize(0); CPPUNIT_ASSERT_EQUAL_MESSAGE("Failed to move back to its original position.", - static_cast<const Rectangle &>(aOrigRect), rNewRect); + static_cast<const tools::Rectangle &>(aOrigRect), rNewRect); } { // Add a line. basegfx::B2DPolygon aTempPoly; Point aStartPos(10,300), aEndPos(110,200); // bottom-left to top-right. - Rectangle aOrigRect(10,200,110,300); // 100 x 100 + tools::Rectangle aOrigRect(10,200,110,300); // 100 x 100 aTempPoly.append(basegfx::B2DPoint(aStartPos.X(), aStartPos.Y())); aTempPoly.append(basegfx::B2DPoint(aEndPos.X(), aEndPos.Y())); SdrPathObj* pObj = new SdrPathObj(OBJ_LINE, basegfx::B2DPolyPolygon(aTempPoly)); pObj->NbcSetLogicRect(aOrigRect); pPage->InsertObject(pObj); - const Rectangle& rNewRect = pObj->GetLogicRect(); + const tools::Rectangle& rNewRect = pObj->GetLogicRect(); CPPUNIT_ASSERT_EQUAL_MESSAGE("Size differ.", - static_cast<const Rectangle &>(aOrigRect), rNewRect); + static_cast<const tools::Rectangle &>(aOrigRect), rNewRect); ScDrawLayer::SetCellAnchoredFromPosition(*pObj, *m_pDoc, 0); CPPUNIT_ASSERT_EQUAL_MESSAGE("Size changed when cell-anchored. Not good.", - static_cast<const Rectangle &>(aOrigRect), rNewRect); + static_cast<const tools::Rectangle &>(aOrigRect), rNewRect); // Insert 2 rows at the top and delete them immediately. m_pDoc->InsertRow(0, 0, MAXCOL, 0, 0, 2); m_pDoc->DeleteRow(0, 0, MAXCOL, 0, 0, 2); m_pDoc->SetDrawPageSize(0); CPPUNIT_ASSERT_EQUAL_MESSAGE("Size of a line object changed after row insertion and removal.", - static_cast<const Rectangle &>(aOrigRect), rNewRect); + static_cast<const tools::Rectangle &>(aOrigRect), rNewRect); sal_Int32 n = pObj->GetPointCount(); CPPUNIT_ASSERT_EQUAL_MESSAGE("There should be exactly 2 points in a line object.", static_cast<sal_Int32>(2), n); @@ -2817,7 +2817,7 @@ void Test::testGraphicsOnSheetMove() CPPUNIT_ASSERT_MESSAGE("No page instance for the 1st sheet.", pPage); // Insert an object. - Rectangle aObjRect(2,2,100,100); + tools::Rectangle aObjRect(2,2,100,100); SdrObject* pObj = new SdrRectObj(aObjRect); pPage->InsertObject(pObj); ScDrawLayer::SetCellAnchoredFromPosition(*pObj, *m_pDoc, 0); @@ -5647,9 +5647,9 @@ void Test::testAnchoredRotatedShape() m_pDoc->SetColWidth( nCol, 0, sc::HMMToTwips( 1000 ) ); { //Add a rect - Rectangle aRect( 4000, 5000, 10000, 7000 ); + tools::Rectangle aRect( 4000, 5000, 10000, 7000 ); - Rectangle aRotRect( 6000, 3000, 8000, 9000 ); + tools::Rectangle aRotRect( 6000, 3000, 8000, 9000 ); SdrRectObj *pObj = new SdrRectObj(aRect); pPage->InsertObject(pObj); Point aRef1(pObj->GetSnapRect().Center()); @@ -5660,7 +5660,7 @@ void Test::testAnchoredRotatedShape() ScDrawLayer::SetCellAnchoredFromPosition(*pObj, *m_pDoc, 0); - Rectangle aSnap = pObj->GetSnapRect(); + tools::Rectangle aSnap = pObj->GetSnapRect(); CPPUNIT_ASSERT_EQUAL( true, testEqualsWithTolerance( aRotRect.GetHeight(), aSnap.GetHeight(), TOLERANCE ) ); CPPUNIT_ASSERT_EQUAL( true, testEqualsWithTolerance( aRotRect.GetWidth(), aSnap.GetWidth(), TOLERANCE ) ); CPPUNIT_ASSERT_EQUAL( true, testEqualsWithTolerance( aRotRect.Left(), aSnap.Left(), TOLERANCE ) ); @@ -6427,7 +6427,7 @@ void Test::testUndoDataAnchor() CPPUNIT_ASSERT_MESSAGE("No page instance for the 1st sheet.", pPage); // Insert an object. - Rectangle aObjRect(2,1000,100,1100); + tools::Rectangle aObjRect(2,1000,100,1100); SdrObject* pObj = new SdrRectObj(aObjRect); pPage->InsertObject(pObj); ScDrawLayer::SetCellAnchoredFromPosition(*pObj, *m_pDoc, 0); diff --git a/sc/source/core/data/documen3.cxx b/sc/source/core/data/documen3.cxx index 413cc8687c24..d237e539507a 100644 --- a/sc/source/core/data/documen3.cxx +++ b/sc/source/core/data/documen3.cxx @@ -1653,9 +1653,9 @@ void ScDocument::GetEmbedded( ScRange& rRange ) const rRange = aEmbedRange; } -Rectangle ScDocument::GetEmbeddedRect() const // 1/100 mm +tools::Rectangle ScDocument::GetEmbeddedRect() const // 1/100 mm { - Rectangle aRect; + tools::Rectangle aRect; ScTable* pTable = nullptr; if ( aEmbedRange.aStart.Tab() < static_cast<SCTAB>(maTabs.size()) ) pTable = maTabs[aEmbedRange.aStart.Tab()]; @@ -1745,7 +1745,7 @@ static bool lcl_AddTwipsWhile( long & rTwips, long nStopTwips, SCROW & rPosY, SC return bAdded; } -ScRange ScDocument::GetRange( SCTAB nTab, const Rectangle& rMMRect, bool bHiddenAsZero ) const +ScRange ScDocument::GetRange( SCTAB nTab, const tools::Rectangle& rMMRect, bool bHiddenAsZero ) const { ScTable* pTable = nullptr; if (nTab < static_cast<SCTAB>(maTabs.size())) @@ -1758,7 +1758,7 @@ ScRange ScDocument::GetRange( SCTAB nTab, const Rectangle& rMMRect, bool bHidden return ScRange(); } - Rectangle aPosRect = rMMRect; + tools::Rectangle aPosRect = rMMRect; if ( IsNegativePage( nTab ) ) ScDrawLayer::MirrorRectRTL( aPosRect ); // Always with positive (LTR) values @@ -1818,7 +1818,7 @@ ScRange ScDocument::GetRange( SCTAB nTab, const Rectangle& rMMRect, bool bHidden return ScRange( nX1,nY1,nTab, nX2,nY2,nTab ); } -void ScDocument::SetEmbedded( SCTAB nTab, const Rectangle& rRect ) // From VisArea (1/100 mm) +void ScDocument::SetEmbedded( SCTAB nTab, const tools::Rectangle& rRect ) // From VisArea (1/100 mm) { bIsEmbedded = true; aEmbedRange = GetRange( nTab, rRect ); @@ -1930,16 +1930,16 @@ void ScDocument::SetLanguage( LanguageType eLatin, LanguageType eCjk, LanguageTy UpdateDrawLanguages(); // Set edit engine defaults in drawing layer pool } -Rectangle ScDocument::GetMMRect( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTab, bool bHiddenAsZero ) const +tools::Rectangle ScDocument::GetMMRect( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTab, bool bHiddenAsZero ) const { if (!ValidTab(nTab) || nTab >= static_cast<SCTAB>(maTabs.size()) || !maTabs[nTab]) { OSL_FAIL("GetMMRect: wrong table"); - return Rectangle(0,0,0,0); + return tools::Rectangle(0,0,0,0); } SCCOL i; - Rectangle aRect; + tools::Rectangle aRect; for (i=0; i<nStartCol; i++) aRect.Left() += GetColWidth(i,nTab, bHiddenAsZero ); diff --git a/sc/source/core/data/documen9.cxx b/sc/source/core/data/documen9.cxx index d05af1653510..077691579c3f 100644 --- a/sc/source/core/data/documen9.cxx +++ b/sc/source/core/data/documen9.cxx @@ -295,7 +295,7 @@ bool ScDocument::HasOLEObjectsInArea( const ScRange& rRange, const ScMarkData* p { if ( !pTabMark || pTabMark->GetTableSelect(nTab) ) { - Rectangle aMMRect = GetMMRect( rRange.aStart.Col(), rRange.aStart.Row(), + tools::Rectangle aMMRect = GetMMRect( rRange.aStart.Col(), rRange.aStart.Row(), rRange.aEnd.Col(), rRange.aEnd.Row(), nTab ); SdrPage* pPage = pDrawLayer->GetPage(static_cast<sal_uInt16>(nTab)); @@ -336,7 +336,7 @@ void ScDocument::StartAnimations( SCTAB nTab, vcl::Window* pWin ) { if ( pGrafObj->IsAnimated() ) { - const Rectangle& rRect = pGrafObj->GetCurrentBoundRect(); + const tools::Rectangle& rRect = pGrafObj->GetCurrentBoundRect(); pGrafObj->StartAnimation( pWin, rRect.TopLeft(), rRect.GetSize() ); } } @@ -344,7 +344,7 @@ void ScDocument::StartAnimations( SCTAB nTab, vcl::Window* pWin ) } } -bool ScDocument::HasBackgroundDraw( SCTAB nTab, const Rectangle& rMMRect ) const +bool ScDocument::HasBackgroundDraw( SCTAB nTab, const tools::Rectangle& rMMRect ) const { // Are there objects in the background layer who are (partly) affected by rMMRect // (for Drawing optimization, no deletion in front of the background @@ -369,7 +369,7 @@ bool ScDocument::HasBackgroundDraw( SCTAB nTab, const Rectangle& rMMRect ) const return bFound; } -bool ScDocument::HasAnyDraw( SCTAB nTab, const Rectangle& rMMRect ) const +bool ScDocument::HasAnyDraw( SCTAB nTab, const tools::Rectangle& rMMRect ) const { // Are there any objects at all who are (partly) affected by rMMRect? // (To detect blank pages when printing) @@ -438,7 +438,7 @@ SdrObject* ScDocument::GetObjectAtPoint( SCTAB nTab, const Point& rPos ) bool ScDocument::IsPrintEmpty( SCTAB nTab, SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, bool bLeftIsEmpty, - ScRange* pLastRange, Rectangle* pLastMM ) const + ScRange* pLastRange, tools::Rectangle* pLastMM ) const { if (!IsBlockEmpty( nTab, nStartCol, nStartRow, nEndCol, nEndRow )) return false; @@ -447,7 +447,7 @@ bool ScDocument::IsPrintEmpty( SCTAB nTab, SCCOL nStartCol, SCROW nStartRow, // We want to print sheets with borders even if there is no cell content. return false; - Rectangle aMMRect; + tools::Rectangle aMMRect; if ( pLastRange && pLastMM && nTab == pLastRange->aStart.Tab() && nStartRow == pLastRange->aStart.Row() && nEndRow == pLastRange->aEnd.Row() ) { diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx index 64bad940eb65..0c680fe9faa3 100644 --- a/sc/source/core/data/document.cxx +++ b/sc/source/core/data/document.cxx @@ -2198,7 +2198,7 @@ void ScDocument::CopyToClip(const ScClipParam& rClipParam, if (pDrawLayer && bIncludeObjects) { // also copy drawing objects - Rectangle aObjRect = GetMMRect( + tools::Rectangle aObjRect = GetMMRect( aClipRange.aStart.Col(), aClipRange.aStart.Row(), aClipRange.aEnd.Col(), aClipRange.aEnd.Row(), i); pDrawLayer->CopyToClip(pClipDoc, i, aObjRect); } @@ -2340,9 +2340,9 @@ void ScDocument::TransposeClip( ScDocument* pTransClip, InsertDeleteFlags nFlags // are drawing objects to copy) pTransClip->InitDrawLayer(); - Rectangle aSourceRect = GetMMRect( aClipRange.aStart.Col(), aClipRange.aStart.Row(), + tools::Rectangle aSourceRect = GetMMRect( aClipRange.aStart.Col(), aClipRange.aStart.Row(), aClipRange.aEnd.Col(), aClipRange.aEnd.Row(), i ); - Rectangle aDestRect = pTransClip->GetMMRect( 0, 0, + tools::Rectangle aDestRect = pTransClip->GetMMRect( 0, 0, static_cast<SCCOL>(aClipRange.aEnd.Row() - aClipRange.aStart.Row()), static_cast<SCROW>(aClipRange.aEnd.Col() - aClipRange.aStart.Col()), i ); pTransClip->pDrawLayer->CopyFromClip( pDrawLayer, i, aSourceRect, ScAddress(0,0,i), aDestRect ); @@ -2590,9 +2590,9 @@ void ScDocument::CopyBlockFromClip( // (copied in an extra step before pasting, or updated after pasting cells, but // before pasting objects). - Rectangle aSourceRect = rCxt.getClipDoc()->GetMMRect( + tools::Rectangle aSourceRect = rCxt.getClipDoc()->GetMMRect( nCol1-nDx, nRow1-nDy, nCol2-nDx, nRow2-nDy, nClipTab ); - Rectangle aDestRect = GetMMRect( nCol1, nRow1, nCol2, nRow2, i ); + tools::Rectangle aDestRect = GetMMRect( nCol1, nRow1, nCol2, nRow2, i ); pDrawLayer->CopyFromClip(rCxt.getClipDoc()->pDrawLayer, nClipTab, aSourceRect, ScAddress( nCol1, nRow1, i ), aDestRect ); } diff --git a/sc/source/core/data/dpobject.cxx b/sc/source/core/data/dpobject.cxx index 1e315bf75d36..957d16fa20f7 100644 --- a/sc/source/core/data/dpobject.cxx +++ b/sc/source/core/data/dpobject.cxx @@ -1430,7 +1430,7 @@ long ScDPObject::GetHeaderDim( const ScAddress& rPos, sal_uInt16& rOrient ) } bool ScDPObject::GetHeaderDrag( const ScAddress& rPos, bool bMouseLeft, bool bMouseTop, long nDragDim, - Rectangle& rPosRect, sal_uInt16& rOrient, long& rDimPos ) + tools::Rectangle& rPosRect, sal_uInt16& rOrient, long& rDimPos ) { CreateOutput(); // create xSource and pOutput if not already done diff --git a/sc/source/core/data/dpoutput.cxx b/sc/source/core/data/dpoutput.cxx index 188bc8af4fbf..6795a29c53db 100644 --- a/sc/source/core/data/dpoutput.cxx +++ b/sc/source/core/data/dpoutput.cxx @@ -1619,7 +1619,7 @@ long ScDPOutput::GetHeaderDim( const ScAddress& rPos, sal_uInt16& rOrient ) bool ScDPOutput::GetHeaderDrag( const ScAddress& rPos, bool bMouseLeft, bool bMouseTop, long nDragDim, - Rectangle& rPosRect, sal_uInt16& rOrient, long& rDimPos ) + tools::Rectangle& rPosRect, sal_uInt16& rOrient, long& rDimPos ) { // Rectangle instead of ScRange for rPosRect to allow for negative values @@ -1646,7 +1646,7 @@ bool ScDPOutput::GetHeaderDrag( const ScAddress& rPos, bool bMouseLeft, bool bMo } //TODO: find start of dimension - rPosRect = Rectangle( nDataStartCol, nMemberStartRow + nField, + rPosRect = tools::Rectangle( nDataStartCol, nMemberStartRow + nField, nTabEndCol, nMemberStartRow + nField -1 ); bool bFound = false; // is this within the same orientation? @@ -1700,7 +1700,7 @@ bool ScDPOutput::GetHeaderDrag( const ScAddress& rPos, bool bMouseLeft, bool bMo long nField = nCol - nTabStartCol; //TODO: find start of dimension - rPosRect = Rectangle( nTabStartCol + nField, nDataStartRow - 1, + rPosRect = tools::Rectangle( nTabStartCol + nField, nDataStartRow - 1, nTabStartCol + nField - 1, nTabEndRow ); bool bFound = false; // is this within the same orientation? @@ -1756,7 +1756,7 @@ bool ScDPOutput::GetHeaderDrag( const ScAddress& rPos, bool bMouseLeft, bool bMo } //TODO: find start of dimension - rPosRect = Rectangle( aStartPos.Col(), nPageStartRow + nField, + rPosRect = tools::Rectangle( aStartPos.Col(), nPageStartRow + nField, nTabEndCol, nPageStartRow + nField - 1 ); bool bFound = false; // is this within the same orientation? diff --git a/sc/source/core/data/drwlayer.cxx b/sc/source/core/data/drwlayer.cxx index c18c869a84cb..6d43f59c4f14 100644 --- a/sc/source/core/data/drwlayer.cxx +++ b/sc/source/core/data/drwlayer.cxx @@ -223,7 +223,7 @@ inline void ReverseTwipsToMM( long& nVal ) nVal = HmmToTwips (nVal); } -static void lcl_ReverseTwipsToMM( Rectangle& rRect ) +static void lcl_ReverseTwipsToMM( tools::Rectangle& rRect ) { ReverseTwipsToMM( rRect.Left() ); ReverseTwipsToMM( rRect.Right() ); @@ -605,9 +605,9 @@ void ScDrawLayer::SetPageSize( sal_uInt16 nPageNo, const Size& rSize, bool bUpda namespace { //Can't have a zero width dimension - Rectangle lcl_makeSafeRectangle(const Rectangle &rNew) + tools::Rectangle lcl_makeSafeRectangle(const tools::Rectangle &rNew) { - Rectangle aRect = rNew; + tools::Rectangle aRect = rNew; if (aRect.Bottom() == aRect.Top()) aRect.Bottom() = aRect.Top()+1; if (aRect.Right() == aRect.Left()) @@ -627,11 +627,11 @@ namespace return aAvailableDiff; } - Rectangle lcl_UpdateCalcPoly(basegfx::B2DPolygon &rCalcPoly, int nWhichPoint, const Point &rPos) + tools::Rectangle lcl_UpdateCalcPoly(basegfx::B2DPolygon &rCalcPoly, int nWhichPoint, const Point &rPos) { rCalcPoly.setB2DPoint(nWhichPoint, basegfx::B2DPoint(rPos.X(), rPos.Y())); basegfx::B2DRange aRange(basegfx::tools::getRange(rCalcPoly)); - return Rectangle(static_cast<long>(aRange.getMinX()), static_cast<long>(aRange.getMinY()), + return tools::Rectangle(static_cast<long>(aRange.getMinX()), static_cast<long>(aRange.getMinY()), static_cast<long>(aRange.getMaxX()), static_cast<long>(aRange.getMaxY())); } } @@ -656,7 +656,7 @@ void ScDrawLayer::ResizeLastRectFromAnchor( SdrObject* pObj, ScDrawObjData& rDat TwipsToMM( aEnd.Y() ); aEnd += lcl_calcAvailableDiff(*pDoc, nCol2, nRow2, nTab2, rData.maEndOffset); - Rectangle aNew = Rectangle( aPos, aEnd ); + tools::Rectangle aNew = tools::Rectangle( aPos, aEnd ); if ( bNegativePage ) MirrorRectRTL( aNew ); @@ -716,7 +716,7 @@ void ScDrawLayer::RecalcPos( SdrObject* pObj, ScDrawObjData& rData, bool bNegati Size aSize( (long)( TwipsToHmm( pDoc->GetColWidth( nCol1, nTab1) ) ), (long)( TwipsToHmm( pDoc->GetRowHeight( nRow1, nTab1) ) ) ); - Rectangle aRect( aPos, aSize ); + tools::Rectangle aRect( aPos, aSize ); aRect.Left() -= 250; aRect.Right() += 250; aRect.Top() -= 70; @@ -841,7 +841,7 @@ void ScDrawLayer::RecalcPos( SdrObject* pObj, ScDrawObjData& rData, bool bNegati double fShearX(0.0); Point aPoint; - Rectangle aRect; + tools::Rectangle aRect; basegfx::B2DTuple aScale; basegfx::B2DTuple aTranslate; @@ -891,7 +891,7 @@ void ScDrawLayer::RecalcPos( SdrObject* pObj, ScDrawObjData& rData, bool bNegati // is guaranteed to get consistent results) ResizeLastRectFromAnchor( pObj, rData, true, bNegativePage, bCanResize, false ); // aFullRect contains the unrotated size and position of the shape (regardless of any hidden row/columns) - Rectangle aFullRect = rData.maLastRect; + tools::Rectangle aFullRect = rData.maLastRect; // get current size and position from the anchor for use later ResizeLastRectFromAnchor( pObj, rNoRotatedAnchor, true, bNegativePage, bCanResize ); @@ -912,11 +912,11 @@ void ScDrawLayer::RecalcPos( SdrObject* pObj, ScDrawObjData& rData, bool bNegati if( bCanResize ) { - Rectangle aNew = rData.maLastRect; + tools::Rectangle aNew = rData.maLastRect; if ( pObj->GetSnapRect() != aNew ) { - Rectangle aOld(pObj->GetSnapRect()); + tools::Rectangle aOld(pObj->GetSnapRect()); if (bRecording) AddCalcUndo( new SdrUndoGeoObj( *pObj ) ); @@ -1026,7 +1026,7 @@ bool ScDrawLayer::GetPrintArea( ScRange& rRange, bool bSetHor, bool bSetVer ) co { //TODO: test Flags (hidden?) - Rectangle aObjRect = pObject->GetCurrentBoundRect(); + tools::Rectangle aObjRect = pObject->GetCurrentBoundRect(); bool bFit = true; if ( !bSetHor && ( aObjRect.Right() < nStartX || aObjRect.Left() > nEndX ) ) bFit = false; @@ -1149,7 +1149,7 @@ void ScDrawLayer::MoveArea( SCTAB nTab, SCCOL nCol1,SCROW nRow1, SCCOL nCol2,SCR bool bNegativePage = pDoc->IsNegativePage( nTab ); - Rectangle aRect = pDoc->GetMMRect( nCol1, nRow1, nCol2, nRow2, nTab ); + tools::Rectangle aRect = pDoc->GetMMRect( nCol1, nRow1, nCol2, nRow2, nTab ); lcl_ReverseTwipsToMM( aRect ); //TODO: use twips directly? @@ -1198,7 +1198,7 @@ bool ScDrawLayer::HasObjectsInRows( SCTAB nTab, SCROW nStartRow, SCROW nEndRow ) if (!pPage->GetObjCount()) return false; - Rectangle aTestRect; + tools::Rectangle aTestRect; aTestRect.Top() += pDoc->GetRowHeight( 0, nStartRow-1, nTab); @@ -1222,7 +1222,7 @@ bool ScDrawLayer::HasObjectsInRows( SCTAB nTab, SCROW nStartRow, SCROW nEndRow ) bool bFound = false; - Rectangle aObjRect; + tools::Rectangle aObjRect; SdrObjListIter aIter( *pPage ); SdrObject* pObject = aIter.Next(); while ( pObject && !bFound ) @@ -1255,7 +1255,7 @@ void ScDrawLayer::DeleteObjectsInArea( SCTAB nTab, SCCOL nCol1,SCROW nRow1, if (nObjCount) { size_t nDelCount = 0; - Rectangle aDelRect = pDoc->GetMMRect( nCol1, nRow1, nCol2, nRow2, nTab ); + tools::Rectangle aDelRect = pDoc->GetMMRect( nCol1, nRow1, nCol2, nRow2, nTab ); std::unique_ptr<SdrObject*[]> ppObj(new SdrObject*[nObjCount]); @@ -1267,7 +1267,7 @@ void ScDrawLayer::DeleteObjectsInArea( SCTAB nTab, SCCOL nCol1,SCROW nRow1, // TODO: detective objects are still deleted, is this desired? if (!IsNoteCaption( pObject )) { - Rectangle aObjRect = pObject->GetCurrentBoundRect(); + tools::Rectangle aObjRect = pObject->GetCurrentBoundRect(); if ( aDelRect.IsInside( aObjRect ) ) ppObj[nDelCount++] = pObject; } @@ -1310,7 +1310,7 @@ void ScDrawLayer::DeleteObjectsInSelection( const ScMarkData& rMark ) { size_t nDelCount = 0; // Rectangle around the whole selection - Rectangle aMarkBound = pDoc->GetMMRect( + tools::Rectangle aMarkBound = pDoc->GetMMRect( aMarkRange.aStart.Col(), aMarkRange.aStart.Row(), aMarkRange.aEnd.Col(), aMarkRange.aEnd.Row(), nTab ); @@ -1324,7 +1324,7 @@ void ScDrawLayer::DeleteObjectsInSelection( const ScMarkData& rMark ) // TODO: detective objects are still deleted, is this desired? if (!IsNoteCaption( pObject )) { - Rectangle aObjRect = pObject->GetCurrentBoundRect(); + tools::Rectangle aObjRect = pObject->GetCurrentBoundRect(); if ( aMarkBound.IsInside( aObjRect ) ) { ScRange aRange = pDoc->GetRange( nTab, aObjRect ); @@ -1353,7 +1353,7 @@ void ScDrawLayer::DeleteObjectsInSelection( const ScMarkData& rMark ) } } -void ScDrawLayer::CopyToClip( ScDocument* pClipDoc, SCTAB nTab, const Rectangle& rRange ) +void ScDrawLayer::CopyToClip( ScDocument* pClipDoc, SCTAB nTab, const tools::Rectangle& rRange ) { // copy everything in the specified range into the same page (sheet) in the clipboard doc @@ -1367,7 +1367,7 @@ void ScDrawLayer::CopyToClip( ScDocument* pClipDoc, SCTAB nTab, const Rectangle& SdrObject* pOldObject = aIter.Next(); while (pOldObject) { - Rectangle aObjRect = pOldObject->GetCurrentBoundRect(); + tools::Rectangle aObjRect = pOldObject->GetCurrentBoundRect(); // do not copy internal objects (detective) and note captions if ( rRange.IsInside( aObjRect ) && (pOldObject->GetLayer() != SC_LAYER_INTERN) && !IsNoteCaption( pOldObject ) ) { @@ -1457,8 +1457,8 @@ static bool lcl_MoveRanges( ::std::vector< ScRangeList >& rRangesVector, const S return bChanged; } -void ScDrawLayer::CopyFromClip( ScDrawLayer* pClipModel, SCTAB nSourceTab, const Rectangle& rSourceRange, - const ScAddress& rDestPos, const Rectangle& rDestRange ) +void ScDrawLayer::CopyFromClip( ScDrawLayer* pClipModel, SCTAB nSourceTab, const tools::Rectangle& rSourceRange, + const ScAddress& rDestPos, const tools::Rectangle& rDestRange ) { OSL_ENSURE( pDoc, "ScDrawLayer::CopyFromClip without document" ); if ( !pDoc ) @@ -1477,7 +1477,7 @@ void ScDrawLayer::CopyFromClip( ScDrawLayer* pClipModel, SCTAB nSourceTab, const rDestRange.Left() > 0 && rDestRange.Right() > 0 ) || ( rSourceRange.Left() > 0 && rSourceRange.Right() > 0 && rDestRange.Left() < 0 && rDestRange.Right() < 0 ); - Rectangle aMirroredSource = rSourceRange; + tools::Rectangle aMirroredSource = rSourceRange; if ( bMirrorObj ) MirrorRectRTL( aMirroredSource ); @@ -1550,7 +1550,7 @@ void ScDrawLayer::CopyFromClip( ScDrawLayer* pClipModel, SCTAB nSourceTab, const while (pOldObject) { - Rectangle aObjRect = pOldObject->GetCurrentBoundRect(); + tools::Rectangle aObjRect = pOldObject->GetCurrentBoundRect(); // do not copy internal objects (detective) and note captions if ( rSourceRange.IsInside( aObjRect ) && (pOldObject->GetLayer() != SC_LAYER_INTERN) && !IsNoteCaption( pOldObject ) ) { @@ -1685,7 +1685,7 @@ void ScDrawLayer::MirrorRTL( SdrObject* pObj ) // Move instead of mirroring: // New start position is negative of old end position // -> move by sum of start and end position - Rectangle aObjRect = pObj->GetLogicRect(); + tools::Rectangle aObjRect = pObj->GetLogicRect(); Size aMoveSize( -(aObjRect.Left() + aObjRect.Right()), 0 ); if (bRecording) AddCalcUndo( new SdrUndoMoveObj( *pObj, aMoveSize ) ); @@ -1693,7 +1693,7 @@ void ScDrawLayer::MirrorRTL( SdrObject* pObj ) } } -void ScDrawLayer::MirrorRectRTL( Rectangle& rRect ) +void ScDrawLayer::MirrorRectRTL( tools::Rectangle& rRect ) { // mirror and swap left/right long nTemp = rRect.Left(); @@ -1701,9 +1701,9 @@ void ScDrawLayer::MirrorRectRTL( Rectangle& rRect ) rRect.Right() = -nTemp; } -Rectangle ScDrawLayer::GetCellRect( ScDocument& rDoc, const ScAddress& rPos, bool bMergedCell ) +tools::Rectangle ScDrawLayer::GetCellRect( ScDocument& rDoc, const ScAddress& rPos, bool bMergedCell ) { - Rectangle aCellRect; + tools::Rectangle aCellRect; OSL_ENSURE( ValidColRowTab( rPos.Col(), rPos.Row(), rPos.Tab() ), "ScDrawLayer::GetCellRect - invalid cell address" ); if( ValidColRowTab( rPos.Col(), rPos.Row(), rPos.Tab() ) ) { @@ -1735,7 +1735,7 @@ Rectangle ScDrawLayer::GetCellRect( ScDocument& rDoc, const ScAddress& rPos, boo aBotRight.X() = static_cast< long >( aBotRight.X() * HMM_PER_TWIPS ); aBotRight.Y() = static_cast< long >( aBotRight.Y() * HMM_PER_TWIPS ); - aCellRect = Rectangle( aTopLeft, aBotRight ); + aCellRect = tools::Rectangle( aTopLeft, aBotRight ); if( rDoc.IsNegativePage( rPos.Tab() ) ) MirrorRectRTL( aCellRect ); } @@ -1914,10 +1914,10 @@ void ScDrawLayer::SetCellAnchoredFromPosition( SdrObject &rObj, const ScDocument void ScDrawLayer::GetCellAnchorFromPosition( SdrObject &rObj, ScDrawObjData &rAnchor, const ScDocument &rDoc, SCTAB nTab, bool bUseLogicRect, bool bHiddenAsZero ) { - Rectangle aObjRect( bUseLogicRect ? rObj.GetLogicRect() : rObj.GetSnapRect() ); + tools::Rectangle aObjRect( bUseLogicRect ? rObj.GetLogicRect() : rObj.GetSnapRect() ); ScRange aRange = rDoc.GetRange( nTab, aObjRect, bHiddenAsZero ); - Rectangle aCellRect; + tools::Rectangle aCellRect; rAnchor.maStart = aRange.aStart; aCellRect = rDoc.GetMMRect( aRange.aStart.Col(), aRange.aStart.Row(), @@ -1941,13 +1941,13 @@ void ScDrawLayer::GetCellAnchorFromPosition( SdrObject &rObj, ScDrawObjData &rAn void ScDrawLayer::UpdateCellAnchorFromPositionEnd( SdrObject &rObj, ScDrawObjData &rAnchor, const ScDocument &rDoc, SCTAB nTab, bool bUseLogicRect ) { - Rectangle aObjRect(bUseLogicRect ? rObj.GetLogicRect() : rObj.GetSnapRect()); + tools::Rectangle aObjRect(bUseLogicRect ? rObj.GetLogicRect() : rObj.GetSnapRect()); ScRange aRange = rDoc.GetRange( nTab, aObjRect ); ScDrawObjData* pAnchor = &rAnchor; pAnchor->maEnd = aRange.aEnd; - Rectangle aCellRect; + tools::Rectangle aCellRect; aCellRect = rDoc.GetMMRect( aRange.aEnd.Col(), aRange.aEnd.Row(), aRange.aEnd.Col(), aRange.aEnd.Row(), aRange.aEnd.Tab() ); pAnchor->maEndOffset.Y() = aObjRect.Bottom()-aCellRect.Top(); @@ -2046,7 +2046,7 @@ IMapObject* ScDrawLayer::GetHitIMapObject( SdrObject* pObj, const MapMode aMap100( MapUnit::Map100thMM ); MapMode aWndMode = rCmpWnd.GetMapMode(); Point aRelPoint( rCmpWnd.LogicToLogic( rWinPoint, &aWndMode, &aMap100 ) ); - Rectangle aLogRect = rCmpWnd.LogicToLogic( pObj->GetLogicRect(), &aWndMode, &aMap100 ); + tools::Rectangle aLogRect = rCmpWnd.LogicToLogic( pObj->GetLogicRect(), &aWndMode, &aMap100 ); ScIMapInfo* pIMapInfo = GetIMapInfo( pObj ); IMapObject* pIMapObj = nullptr; diff --git a/sc/source/core/data/postit.cxx b/sc/source/core/data/postit.cxx index 2f1763266ce1..1bb1f89e506d 100644 --- a/sc/source/core/data/postit.cxx +++ b/sc/source/core/data/postit.cxx @@ -169,9 +169,9 @@ public: ScCaptionPtr GetCaption() { return mxCaption; } /** Moves the caption inside the passed rectangle. Uses page area if 0 is passed. */ - void FitCaptionToRect( const Rectangle* pVisRect = nullptr ); + void FitCaptionToRect( const tools::Rectangle* pVisRect = nullptr ); /** Places the caption inside the passed rectangle, tries to keep the cell rectangle uncovered. Uses page area if 0 is passed. */ - void AutoPlaceCaption( const Rectangle* pVisRect = nullptr ); + void AutoPlaceCaption( const tools::Rectangle* pVisRect = nullptr ); /** Updates caption tail and textbox according to current cell position. Uses page area if 0 is passed. */ void UpdateCaptionPos(); @@ -188,14 +188,14 @@ private: /** Initializes all members. */ void Initialize(); /** Returns the passed rectangle if existing, page rectangle otherwise. */ - const Rectangle& GetVisRect( const Rectangle* pVisRect ) const { return pVisRect ? *pVisRect : maPageRect; } + const tools::Rectangle& GetVisRect( const tools::Rectangle* pVisRect ) const { return pVisRect ? *pVisRect : maPageRect; } private: ScDocument& mrDoc; ScAddress maPos; ScCaptionPtr mxCaption; - Rectangle maPageRect; - Rectangle maCellRect; + tools::Rectangle maPageRect; + tools::Rectangle maCellRect; bool mbNegPage; }; @@ -228,9 +228,9 @@ SdrPage* ScCaptionCreator::GetDrawPage() return pDrawLayer ? pDrawLayer->GetPage( static_cast< sal_uInt16 >( maPos.Tab() ) ) : nullptr; } -void ScCaptionCreator::FitCaptionToRect( const Rectangle* pVisRect ) +void ScCaptionCreator::FitCaptionToRect( const tools::Rectangle* pVisRect ) { - const Rectangle& rVisRect = GetVisRect( pVisRect ); + const tools::Rectangle& rVisRect = GetVisRect( pVisRect ); // tail position Point aTailPos = mxCaption->GetTailPos(); @@ -239,7 +239,7 @@ void ScCaptionCreator::FitCaptionToRect( const Rectangle* pVisRect ) mxCaption->SetTailPos( aTailPos ); // caption rectangle - Rectangle aCaptRect = mxCaption->GetLogicRect(); + tools::Rectangle aCaptRect = mxCaption->GetLogicRect(); Point aCaptPos = aCaptRect.TopLeft(); // move textbox inside right border of visible area aCaptPos.X() = ::std::min< long >( aCaptPos.X(), rVisRect.Right() - aCaptRect.GetWidth() ); @@ -254,12 +254,12 @@ void ScCaptionCreator::FitCaptionToRect( const Rectangle* pVisRect ) mxCaption->SetLogicRect( aCaptRect ); } -void ScCaptionCreator::AutoPlaceCaption( const Rectangle* pVisRect ) +void ScCaptionCreator::AutoPlaceCaption( const tools::Rectangle* pVisRect ) { - const Rectangle& rVisRect = GetVisRect( pVisRect ); + const tools::Rectangle& rVisRect = GetVisRect( pVisRect ); // caption rectangle - Rectangle aCaptRect = mxCaption->GetLogicRect(); + tools::Rectangle aCaptRect = mxCaption->GetLogicRect(); long nWidth = aCaptRect.GetWidth(); long nHeight = aCaptRect.GetHeight(); @@ -334,7 +334,7 @@ void ScCaptionCreator::UpdateCaptionPos() if( pDrawLayer && pDrawLayer->IsRecording() ) pDrawLayer->AddCalcUndo( new SdrUndoGeoObj( *mxCaption ) ); // calculate new caption rectangle (#i98141# handle LTR<->RTL switch correctly) - Rectangle aCaptRect = mxCaption->GetLogicRect(); + tools::Rectangle aCaptRect = mxCaption->GetLogicRect(); long nDiffX = (rOldTailPos.X() >= 0) ? (aCaptRect.Left() - rOldTailPos.X()) : (rOldTailPos.X() - aCaptRect.Right()); if( mbNegPage ) nDiffX = -nDiffX - aCaptRect.GetWidth(); long nDiffY = aCaptRect.Top() - rOldTailPos.Y(); @@ -372,7 +372,7 @@ Point ScCaptionCreator::CalcTailPos( bool bTailFront ) void ScCaptionCreator::CreateCaption( bool bShown, bool bTailFront ) { // create the caption drawing object - Rectangle aTextRect( Point( 0 , 0 ), Size( SC_NOTECAPTION_WIDTH, SC_NOTECAPTION_HEIGHT ) ); + tools::Rectangle aTextRect( Point( 0 , 0 ), Size( SC_NOTECAPTION_WIDTH, SC_NOTECAPTION_HEIGHT ) ); Point aTailPos = CalcTailPos( bTailFront ); mxCaption.reset( new SdrCaptionObj( aTextRect, aTailPos )); // basic caption settings @@ -385,7 +385,7 @@ void ScCaptionCreator::Initialize() mbNegPage = mrDoc.IsNegativePage( maPos.Tab() ); if( SdrPage* pDrawPage = GetDrawPage() ) { - maPageRect = Rectangle( Point( 0, 0 ), pDrawPage->GetSize() ); + maPageRect = tools::Rectangle( Point( 0, 0 ), pDrawPage->GetSize() ); /* #i98141# SdrPage::GetSize() returns negative width in RTL mode. The call to Rectangle::Adjust() orders left/right coordinate accordingly. */ @@ -1011,11 +1011,11 @@ void ScPostIt::CreateCaptionFromInitData( const ScAddress& rPos ) const } else { - Rectangle aCellRect = ScDrawLayer::GetCellRect( mrDoc, rPos, true ); + tools::Rectangle aCellRect = ScDrawLayer::GetCellRect( mrDoc, rPos, true ); bool bNegPage = mrDoc.IsNegativePage( rPos.Tab() ); long nPosX = bNegPage ? (aCellRect.Left() - rInitData.maCaptionOffset.X()) : (aCellRect.Right() + rInitData.maCaptionOffset.X()); long nPosY = aCellRect.Top() + rInitData.maCaptionOffset.Y(); - Rectangle aCaptRect( Point( nPosX, nPosY ), rInitData.maCaptionSize ); + tools::Rectangle aCaptRect( Point( nPosX, nPosY ), rInitData.maCaptionSize ); maNoteData.mxCaption->SetLogicRect( aCaptRect ); aCreator.FitCaptionToRect(); } @@ -1054,7 +1054,7 @@ void ScPostIt::CreateCaption( const ScAddress& rPos, const SdrCaptionObj* pCapti // copy formatting items (after text has been copied to apply font formatting) maNoteData.mxCaption->SetMergedItemSetAndBroadcast( pCaption->GetMergedItemSet() ); // move textbox position relative to new cell, copy textbox size - Rectangle aCaptRect = pCaption->GetLogicRect(); + tools::Rectangle aCaptRect = pCaption->GetLogicRect(); Point aDist = maNoteData.mxCaption->GetTailPos() - pCaption->GetTailPos(); aCaptRect.Move( aDist.X(), aDist.Y() ); maNoteData.mxCaption->SetLogicRect( aCaptRect ); @@ -1111,7 +1111,7 @@ void ScPostIt::RemoveCaption() ScCaptionPtr ScNoteUtil::CreateTempCaption( ScDocument& rDoc, const ScAddress& rPos, SdrPage& rDrawPage, - const OUString& rUserText, const Rectangle& rVisRect, bool bTailFront ) + const OUString& rUserText, const tools::Rectangle& rVisRect, bool bTailFront ) { OUStringBuffer aBuffer( rUserText ); // add plain text of invisible (!) cell note (no formatting etc.) @@ -1129,7 +1129,7 @@ ScCaptionPtr ScNoteUtil::CreateTempCaption( return ScCaptionPtr(); // prepare visible rectangle (add default distance to all borders) - Rectangle aVisRect( + tools::Rectangle aVisRect( rVisRect.Left() + SC_NOTECAPTION_BORDERDIST_TEMP, rVisRect.Top() + SC_NOTECAPTION_BORDERDIST_TEMP, rVisRect.Right() - SC_NOTECAPTION_BORDERDIST_TEMP, @@ -1150,7 +1150,7 @@ ScCaptionPtr ScNoteUtil::CreateTempCaption( pCaption->SetOutlinerParaObject( new OutlinerParaObject( *pOPO ) ); // set formatting (must be done after setting text) and resize the box to fit the text pCaption->SetMergedItemSetAndBroadcast( pNoteCaption->GetMergedItemSet() ); - Rectangle aCaptRect( pCaption->GetLogicRect().TopLeft(), pNoteCaption->GetLogicRect().GetSize() ); + tools::Rectangle aCaptRect( pCaption->GetLogicRect().TopLeft(), pNoteCaption->GetLogicRect().GetSize() ); pCaption->SetLogicRect( aCaptRect ); } else @@ -1192,7 +1192,7 @@ ScPostIt* ScNoteUtil::CreateNoteFromCaption( ScPostIt* ScNoteUtil::CreateNoteFromObjectData( ScDocument& rDoc, const ScAddress& rPos, SfxItemSet* pItemSet, - OutlinerParaObject* pOutlinerObj, const Rectangle& rCaptionRect, + OutlinerParaObject* pOutlinerObj, const tools::Rectangle& rCaptionRect, bool bShown, bool bAlwaysCreateCaption ) { OSL_ENSURE( pItemSet && pOutlinerObj, "ScNoteUtil::CreateNoteFromObjectData - item set and outliner object expected" ); @@ -1206,7 +1206,7 @@ ScPostIt* ScNoteUtil::CreateNoteFromObjectData( rInitData.mbDefaultPosSize = rCaptionRect.IsEmpty(); if( !rInitData.mbDefaultPosSize ) { - Rectangle aCellRect = ScDrawLayer::GetCellRect( rDoc, rPos, true ); + tools::Rectangle aCellRect = ScDrawLayer::GetCellRect( rDoc, rPos, true ); bool bNegPage = rDoc.IsNegativePage( rPos.Tab() ); rInitData.maCaptionOffset.X() = bNegPage ? (aCellRect.Left() - rCaptionRect.Right()) : (rCaptionRect.Left() - aCellRect.Right()); rInitData.maCaptionOffset.Y() = rCaptionRect.Top() - aCellRect.Top(); diff --git a/sc/source/core/tool/charthelper.cxx b/sc/source/core/tool/charthelper.cxx index cb6b9f5ad980..5ccc1b1541d3 100644 --- a/sc/source/core/tool/charthelper.cxx +++ b/sc/source/core/tool/charthelper.cxx @@ -427,7 +427,7 @@ void ScChartHelper::CreateProtectedChartListenersAndNotify( ScDocument* pDoc, Sd if ( pModelObj && pModelObj->HasChangesListeners() ) { - Rectangle aRectangle = pSdrOle2Obj->GetSnapRect(); + tools::Rectangle aRectangle = pSdrOle2Obj->GetSnapRect(); ScRange aRange( pDoc->GetRange( nTab, aRectangle ) ); ScRangeList aChangeRanges; aChangeRanges.Append( aRange ); diff --git a/sc/source/core/tool/detfunc.cxx b/sc/source/core/tool/detfunc.cxx index 0186c0ce5586..9544fb20453c 100644 --- a/sc/source/core/tool/detfunc.cxx +++ b/sc/source/core/tool/detfunc.cxx @@ -337,16 +337,16 @@ Point ScDetectiveFunc::GetDrawPos( SCCOL nCol, SCROW nRow, DrawPosMode eMode ) c return aPos; } -Rectangle ScDetectiveFunc::GetDrawRect( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2 ) const +tools::Rectangle ScDetectiveFunc::GetDrawRect( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2 ) const { - Rectangle aRect( + tools::Rectangle aRect( GetDrawPos( ::std::min( nCol1, nCol2 ), ::std::min( nRow1, nRow2 ), DrawPosMode::TopLeft ), GetDrawPos( ::std::max( nCol1, nCol2 ), ::std::max( nRow1, nRow2 ), DrawPosMode::BottomRight ) ); aRect.Justify(); // reorder left/right in RTL sheets return aRect; } -Rectangle ScDetectiveFunc::GetDrawRect( SCCOL nCol, SCROW nRow ) const +tools::Rectangle ScDetectiveFunc::GetDrawRect( SCCOL nCol, SCROW nRow ) const { return GetDrawRect( nCol, nRow, nCol, nRow ); } @@ -381,8 +381,8 @@ bool ScDetectiveFunc::HasArrow( const ScAddress& rStart, return true; } - Rectangle aStartRect; - Rectangle aEndRect; + tools::Rectangle aStartRect; + tools::Rectangle aEndRect; if (!bStartAlien) aStartRect = GetDrawRect( rStart.Col(), rStart.Row() ); if (!bEndAlien) @@ -455,7 +455,7 @@ bool ScDetectiveFunc::InsertArrow( SCCOL nCol, SCROW nRow, { // insert the rectangle before the arrow - this is relied on in FindFrameForObject - Rectangle aRect = GetDrawRect( nRefStartCol, nRefStartRow, nRefEndCol, nRefEndRow ); + tools::Rectangle aRect = GetDrawRect( nRefStartCol, nRefStartRow, nRefEndCol, nRefEndRow ); SdrRectObj* pBox = new SdrRectObj( aRect ); pBox->SetMergedItemSetAndBroadcast(rData.GetBoxSet()); @@ -498,7 +498,7 @@ bool ScDetectiveFunc::InsertArrow( SCCOL nCol, SCROW nRow, aTempPoly.append(basegfx::B2DPoint(aStartPos.X(), aStartPos.Y())); aTempPoly.append(basegfx::B2DPoint(aEndPos.X(), aEndPos.Y())); SdrPathObj* pArrow = new SdrPathObj(OBJ_LINE, basegfx::B2DPolyPolygon(aTempPoly)); - pArrow->NbcSetLogicRect(Rectangle(aStartPos,aEndPos)); //TODO: needed ??? + pArrow->NbcSetLogicRect(tools::Rectangle(aStartPos,aEndPos)); //TODO: needed ??? pArrow->SetMergedItemSetAndBroadcast(rAttrSet); pArrow->SetLayer( SC_LAYER_INTERN ); @@ -528,7 +528,7 @@ bool ScDetectiveFunc::InsertToOtherTab( SCCOL nStartCol, SCROW nStartRow, bool bArea = ( nStartCol != nEndCol || nStartRow != nEndRow ); if (bArea) { - Rectangle aRect = GetDrawRect( nStartCol, nStartRow, nEndCol, nEndRow ); + tools::Rectangle aRect = GetDrawRect( nStartCol, nStartRow, nEndCol, nEndRow ); SdrRectObj* pBox = new SdrRectObj( aRect ); pBox->SetMergedItemSetAndBroadcast(rData.GetBoxSet()); @@ -563,7 +563,7 @@ bool ScDetectiveFunc::InsertToOtherTab( SCCOL nStartCol, SCROW nStartRow, aTempPoly.append(basegfx::B2DPoint(aStartPos.X(), aStartPos.Y())); aTempPoly.append(basegfx::B2DPoint(aEndPos.X(), aEndPos.Y())); SdrPathObj* pArrow = new SdrPathObj(OBJ_LINE, basegfx::B2DPolyPolygon(aTempPoly)); - pArrow->NbcSetLogicRect(Rectangle(aStartPos,aEndPos)); //TODO: needed ??? + pArrow->NbcSetLogicRect(tools::Rectangle(aStartPos,aEndPos)); //TODO: needed ??? pArrow->SetMergedItemSetAndBroadcast(rAttrSet); @@ -622,7 +622,7 @@ void ScDetectiveFunc::DrawCircle( SCCOL nCol, SCROW nRow, ScDetectiveData& rData ScDrawLayer* pModel = pDoc->GetDrawLayer(); SdrPage* pPage = pModel->GetPage(static_cast<sal_uInt16>(nTab)); - Rectangle aRect = GetDrawRect( nCol, nRow ); + tools::Rectangle aRect = GetDrawRect( nCol, nRow ); aRect.Left() -= 250; aRect.Right() += 250; aRect.Top() -= 70; @@ -647,7 +647,7 @@ void ScDetectiveFunc::DrawCircle( SCCOL nCol, SCROW nRow, ScDetectiveData& rData void ScDetectiveFunc::DeleteArrowsAt( SCCOL nCol, SCROW nRow, bool bDestPnt ) { - Rectangle aRect = GetDrawRect( nCol, nRow ); + tools::Rectangle aRect = GetDrawRect( nCol, nRow ); ScDrawLayer* pModel = pDoc->GetDrawLayer(); SdrPage* pPage = pModel->GetPage(static_cast<sal_uInt16>(nTab)); @@ -701,7 +701,7 @@ void ScDetectiveFunc::DeleteArrowsAt( SCCOL nCol, SCROW nRow, bool bDestPnt ) #define SC_DET_TOLERANCE 50 -inline bool RectIsPoints( const Rectangle& rRect, const Point& rStart, const Point& rEnd ) +inline bool RectIsPoints( const tools::Rectangle& rRect, const Point& rStart, const Point& rEnd ) { return rRect.Left() >= rStart.X() - SC_DET_TOLERANCE && rRect.Left() <= rStart.X() + SC_DET_TOLERANCE @@ -717,10 +717,10 @@ inline bool RectIsPoints( const Rectangle& rRect, const Point& rStart, const Poi void ScDetectiveFunc::DeleteBox( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2 ) { - Rectangle aCornerRect = GetDrawRect( nCol1, nRow1, nCol2, nRow2 ); + tools::Rectangle aCornerRect = GetDrawRect( nCol1, nRow1, nCol2, nRow2 ); Point aStartCorner = aCornerRect.TopLeft(); Point aEndCorner = aCornerRect.BottomRight(); - Rectangle aObjRect; + tools::Rectangle aObjRect; ScDrawLayer* pModel = pDoc->GetDrawLayer(); SdrPage* pPage = pModel->GetPage(static_cast<sal_uInt16>(nTab)); diff --git a/sc/source/core/tool/editutil.cxx b/sc/source/core/tool/editutil.cxx index 8f44941be3dd..94a762a9f7ca 100644 --- a/sc/source/core/tool/editutil.cxx +++ b/sc/source/core/tool/editutil.cxx @@ -277,7 +277,7 @@ OUString ScEditUtil::GetCellFieldValue( return aRet; } -Rectangle ScEditUtil::GetEditArea( const ScPatternAttr* pPattern, bool bForceToTop ) +tools::Rectangle ScEditUtil::GetEditArea( const ScPatternAttr* pPattern, bool bForceToTop ) { // bForceToTop = always align to top, for editing // (sal_False for querying URLs etc.) @@ -365,7 +365,7 @@ Rectangle ScEditUtil::GetEditArea( const ScPatternAttr* pPattern, bool bForceToT aStartPos.X() -= nCellX - 2; // excluding grid on both sides // -1 -> don't overwrite grid - return Rectangle( aStartPos, Size(nCellX-1,nCellY-1) ); + return tools::Rectangle( aStartPos, Size(nCellX-1,nCellY-1) ); } ScEditAttrTester::ScEditAttrTester( ScEditEngineDefaulter* pEng ) : diff --git a/sc/source/filter/excel/xechart.cxx b/sc/source/filter/excel/xechart.cxx index c7db4c085302..5a4509946dd4 100644 --- a/sc/source/filter/excel/xechart.cxx +++ b/sc/source/filter/excel/xechart.cxx @@ -329,7 +329,7 @@ const XclChFormatInfo& XclExpChRoot::GetFormatInfo( XclChObjectType eObjType ) c return mxChData->mxFmtInfoProv->GetFormatInfo( eObjType ); } -void XclExpChRoot::InitConversion( css::uno::Reference< css::chart2::XChartDocument > const & xChartDoc, const Rectangle& rChartRect ) const +void XclExpChRoot::InitConversion( css::uno::Reference< css::chart2::XChartDocument > const & xChartDoc, const tools::Rectangle& rChartRect ) const { mxChData->InitConversion( GetRoot(), xChartDoc, rChartRect ); } @@ -3308,7 +3308,7 @@ static void lcl_getChartSubTitle(const Reference<XChartDocument>& xChartDoc, } XclExpChChart::XclExpChChart( const XclExpRoot& rRoot, - Reference< XChartDocument > const & xChartDoc, const Rectangle& rChartRect ) : + Reference< XChartDocument > const & xChartDoc, const tools::Rectangle& rChartRect ) : XclExpChGroupBase( XclExpChRoot( rRoot, *this ), EXC_CHFRBLOCK_TYPE_CHART, EXC_ID_CHCHART, 16 ) { Size aPtSize = OutputDevice::LogicToLogic( rChartRect.GetSize(), MapMode( MapUnit::Map100thMM ), MapMode( MapUnit::MapPoint ) ); @@ -3468,7 +3468,7 @@ void XclExpChartDrawing::Save( XclExpStream& rStrm ) mxObjRecs->Save( rStrm ); } -XclExpChart::XclExpChart( const XclExpRoot& rRoot, Reference< XModel > const & xModel, const Rectangle& rChartRect ) : +XclExpChart::XclExpChart( const XclExpRoot& rRoot, Reference< XModel > const & xModel, const tools::Rectangle& rChartRect ) : XclExpSubStream( EXC_BOF_CHART ), XclExpRoot( rRoot ) { diff --git a/sc/source/filter/excel/xeescher.cxx b/sc/source/filter/excel/xeescher.cxx index 9c3999b9de65..b6ef37881da8 100644 --- a/sc/source/filter/excel/xeescher.cxx +++ b/sc/source/filter/excel/xeescher.cxx @@ -138,7 +138,7 @@ const char *ToVertAlign( SdrTextVertAdjust eAdjust ) } } -void lcl_WriteAnchorVertex( sax_fastparser::FSHelperPtr const & rComments, Rectangle &aRect ) +void lcl_WriteAnchorVertex( sax_fastparser::FSHelperPtr const & rComments, tools::Rectangle &aRect ) { rComments->startElement( FSNS( XML_xdr, XML_col ), FSEND ); rComments->writeEscaped( OUString::number( aRect.Left() ) ); @@ -154,7 +154,7 @@ void lcl_WriteAnchorVertex( sax_fastparser::FSHelperPtr const & rComments, Recta rComments->endElement( FSNS( XML_xdr, XML_rowOff ) ); } -void lcl_GetFromTo( const XclExpRoot& rRoot, const Rectangle &aRect, sal_Int32 nTab, Rectangle &aFrom, Rectangle &aTo ) +void lcl_GetFromTo( const XclExpRoot& rRoot, const tools::Rectangle &aRect, sal_Int32 nTab, tools::Rectangle &aFrom, tools::Rectangle &aTo ) { sal_Int32 nCol = 0, nRow = 0; sal_Int32 nColOff = 0, nRowOff= 0; @@ -164,7 +164,7 @@ void lcl_GetFromTo( const XclExpRoot& rRoot, const Rectangle &aRect, sal_Int32 n { while(true) { - Rectangle r = rRoot.GetDocRef().GetMMRect( nCol,nRow,nCol,nRow,nTab ); + tools::Rectangle r = rRoot.GetDocRef().GetMMRect( nCol,nRow,nCol,nRow,nTab ); if( r.Left() <= aRect.Left() ) { nCol++; @@ -177,7 +177,7 @@ void lcl_GetFromTo( const XclExpRoot& rRoot, const Rectangle &aRect, sal_Int32 n } if( r.Left() > aRect.Left() && r.Top() > aRect.Top() ) { - aFrom = Rectangle( nCol-1, lcl_hmm2px( nColOff ), + aFrom = tools::Rectangle( nCol-1, lcl_hmm2px( nColOff ), nRow-1, lcl_hmm2px( nRowOff ) ); break; } @@ -187,7 +187,7 @@ void lcl_GetFromTo( const XclExpRoot& rRoot, const Rectangle &aRect, sal_Int32 n { while(true) { - Rectangle r = rRoot.GetDocRef().GetMMRect( nCol,nRow,nCol,nRow,nTab ); + tools::Rectangle r = rRoot.GetDocRef().GetMMRect( nCol,nRow,nCol,nRow,nTab ); if( r.Left() >= aRect.Left() ) { nCol++; @@ -200,7 +200,7 @@ void lcl_GetFromTo( const XclExpRoot& rRoot, const Rectangle &aRect, sal_Int32 n } if( r.Left() < aRect.Left() && r.Top() > aRect.Top() ) { - aFrom = Rectangle( nCol-1, lcl_hmm2px( nColOff ), + aFrom = tools::Rectangle( nCol-1, lcl_hmm2px( nColOff ), nRow-1, lcl_hmm2px( nRowOff ) ); break; } @@ -210,14 +210,14 @@ void lcl_GetFromTo( const XclExpRoot& rRoot, const Rectangle &aRect, sal_Int32 n { while(true) { - Rectangle r = rRoot.GetDocRef().GetMMRect( nCol,nRow,nCol,nRow,nTab ); + tools::Rectangle r = rRoot.GetDocRef().GetMMRect( nCol,nRow,nCol,nRow,nTab ); if( r.Right() < aRect.Right() ) nCol++; if( r.Bottom() < aRect.Bottom() ) nRow++; if( r.Right() >= aRect.Right() && r.Bottom() >= aRect.Bottom() ) { - aTo = Rectangle( nCol, lcl_hmm2px( aRect.Right() - r.Left() ), + aTo = tools::Rectangle( nCol, lcl_hmm2px( aRect.Right() - r.Left() ), nRow, lcl_hmm2px( aRect.Bottom() - r.Top() )); break; } @@ -227,14 +227,14 @@ void lcl_GetFromTo( const XclExpRoot& rRoot, const Rectangle &aRect, sal_Int32 n { while(true) { - Rectangle r = rRoot.GetDocRef().GetMMRect( nCol,nRow,nCol,nRow,nTab ); + tools::Rectangle r = rRoot.GetDocRef().GetMMRect( nCol,nRow,nCol,nRow,nTab ); if( r.Right() >= aRect.Right() ) nCol++; if( r.Bottom() < aRect.Bottom() ) nRow++; if( r.Right() < aRect.Right() && r.Bottom() >= aRect.Bottom() ) { - aTo = Rectangle( nCol, lcl_hmm2px( r.Left() - aRect.Right() ), + aTo = tools::Rectangle( nCol, lcl_hmm2px( r.Left() - aRect.Right() ), nRow, lcl_hmm2px( aRect.Bottom() - r.Top() )); break; } @@ -270,7 +270,7 @@ void XclExpDffAnchorBase::WriteDffData( EscherEx& rEscherEx ) const WriteXclObjAnchor( rEscherEx.GetStream(), maAnchor ); } -void XclExpDffAnchorBase::WriteData( EscherEx& rEscherEx, const Rectangle& rRect ) +void XclExpDffAnchorBase::WriteData( EscherEx& rEscherEx, const tools::Rectangle& rRect ) { // the passed rectangle is in twips ImplCalcAnchorRect( rRect, MapUnit::MapTwip ); @@ -282,7 +282,7 @@ void XclExpDffAnchorBase::ImplSetFlags( const SdrObject& ) OSL_FAIL( "XclExpDffAnchorBase::ImplSetFlags - not implemented" ); } -void XclExpDffAnchorBase::ImplCalcAnchorRect( const Rectangle&, MapUnit ) +void XclExpDffAnchorBase::ImplCalcAnchorRect( const tools::Rectangle&, MapUnit ) { OSL_FAIL( "XclExpDffAnchorBase::ImplCalcAnchorRect - not implemented" ); } @@ -302,7 +302,7 @@ void XclExpDffSheetAnchor::ImplSetFlags( const SdrObject& rSdrObj ) mnFlags = EXC_ESC_ANCHOR_LOCKED; } -void XclExpDffSheetAnchor::ImplCalcAnchorRect( const Rectangle& rRect, MapUnit eMapUnit ) +void XclExpDffSheetAnchor::ImplCalcAnchorRect( const tools::Rectangle& rRect, MapUnit eMapUnit ) { maAnchor.SetRect( GetRoot(), mnScTab, rRect, eMapUnit ); } @@ -321,12 +321,12 @@ void XclExpDffEmbeddedAnchor::ImplSetFlags( const SdrObject& /*rSdrObj*/ ) // TODO (unsupported feature): fixed size } -void XclExpDffEmbeddedAnchor::ImplCalcAnchorRect( const Rectangle& rRect, MapUnit eMapUnit ) +void XclExpDffEmbeddedAnchor::ImplCalcAnchorRect( const tools::Rectangle& rRect, MapUnit eMapUnit ) { maAnchor.SetRect( maPageSize, mnScaleX, mnScaleY, rRect, eMapUnit ); } -XclExpDffNoteAnchor::XclExpDffNoteAnchor( const XclExpRoot& rRoot, const Rectangle& rRect ) : +XclExpDffNoteAnchor::XclExpDffNoteAnchor( const XclExpRoot& rRoot, const tools::Rectangle& rRect ) : XclExpDffAnchorBase( rRoot, EXC_ESC_ANCHOR_SIZELOCKED ) { maAnchor.SetRect( rRoot, rRoot.GetCurrScTab(), rRect, MapUnit::Map100thMM ); @@ -534,7 +534,7 @@ void XclExpControlHelper::WriteFormulaSubRec( XclExpStream& rStrm, sal_uInt16 nS //#if EXC_EXP_OCX_CTRL XclExpOcxControlObj::XclExpOcxControlObj( XclExpObjectManager& rObjMgr, Reference< XShape > const & xShape, - const Rectangle* pChildAnchor, const OUString& rClassName, sal_uInt32 nStrmStart, sal_uInt32 nStrmSize ) : + const tools::Rectangle* pChildAnchor, const OUString& rClassName, sal_uInt32 nStrmStart, sal_uInt32 nStrmSize ) : XclObj( rObjMgr, EXC_OBJTYPE_PICTURE, true ), XclExpControlHelper( rObjMgr.GetRoot() ), maClassName( rClassName ), @@ -552,7 +552,7 @@ XclExpOcxControlObj::XclExpOcxControlObj( XclExpObjectManager& rObjMgr, Referenc // fill DFF property set mrEscherEx.OpenContainer( ESCHER_SpContainer ); mrEscherEx.AddShape( ESCHER_ShpInst_HostControl, SHAPEFLAG_HAVESPT | SHAPEFLAG_HAVEANCHOR | SHAPEFLAG_OLESHAPE ); - Rectangle aDummyRect; + tools::Rectangle aDummyRect; EscherPropertyContainer aPropOpt( mrEscherEx.GetGraphicProvider(), mrEscherEx.QueryPictureStream(), aDummyRect ); aPropOpt.AddOpt( ESCHER_Prop_FitTextToShape, 0x00080008 ); // bool field aPropOpt.AddOpt( ESCHER_Prop_lineColor, 0x08000040 ); @@ -638,7 +638,7 @@ void XclExpOcxControlObj::WriteSubRecs( XclExpStream& rStrm ) //#else -XclExpTbxControlObj::XclExpTbxControlObj( XclExpObjectManager& rRoot, Reference< XShape > const & xShape , const Rectangle* pChildAnchor ) : +XclExpTbxControlObj::XclExpTbxControlObj( XclExpObjectManager& rRoot, Reference< XShape > const & xShape , const tools::Rectangle* pChildAnchor ) : XclObj( rRoot, EXC_OBJTYPE_UNKNOWN, true ), XclMacroHelper( rRoot ), meEventType( EXC_TBX_EVENT_ACTION ), @@ -1067,7 +1067,7 @@ void XclExpTbxControlObj::WriteSbs( XclExpStream& rStrm ) //#endif -XclExpChartObj::XclExpChartObj( XclExpObjectManager& rObjMgr, Reference< XShape > const & xShape, const Rectangle* pChildAnchor ) : +XclExpChartObj::XclExpChartObj( XclExpObjectManager& rObjMgr, Reference< XShape > const & xShape, const tools::Rectangle* pChildAnchor ) : XclObj( rObjMgr, EXC_OBJTYPE_CHART ), XclExpRoot( rObjMgr.GetRoot() ), mxShape( xShape ) { @@ -1106,7 +1106,7 @@ XclExpChartObj::XclExpChartObj( XclExpObjectManager& rObjMgr, Reference< XShape mxChartDoc.set( xModel,UNO_QUERY ); css::awt::Rectangle aBoundRect; aShapeProp.GetProperty( aBoundRect, "BoundRect" ); - Rectangle aChartRect( Point( aBoundRect.X, aBoundRect.Y ), Size( aBoundRect.Width, aBoundRect.Height ) ); + tools::Rectangle aChartRect( Point( aBoundRect.X, aBoundRect.Y ), Size( aBoundRect.Width, aBoundRect.Height ) ); mxChart.reset( new XclExpChart( GetRoot(), xModel, aChartRect ) ); } diff --git a/sc/source/filter/excel/xichart.cxx b/sc/source/filter/excel/xichart.cxx index 4f178d716425..dc751dca62a9 100644 --- a/sc/source/filter/excel/xichart.cxx +++ b/sc/source/filter/excel/xichart.cxx @@ -257,7 +257,7 @@ Color XclImpChRoot::GetSeriesFillAutoColor( sal_uInt16 nFormatIdx ) const return ScfTools::GetMixedColor( aColor, rPal.GetColor( EXC_COLOR_CHWINDOWBACK ), nTrans ); } -void XclImpChRoot::InitConversion( const Reference<XChartDocument>& xChartDoc, const Rectangle& rChartRect ) const +void XclImpChRoot::InitConversion( const Reference<XChartDocument>& xChartDoc, const tools::Rectangle& rChartRect ) const { // create formatting object tables mxChData->InitConversion( GetRoot(), xChartDoc, rChartRect ); @@ -3908,7 +3908,7 @@ bool XclImpChChart::IsManualPlotArea() const } void XclImpChChart::Convert( const Reference<XChartDocument>& xChartDoc, - XclImpDffConverter& rDffConv, const OUString& rObjName, const Rectangle& rChartRect ) const + XclImpDffConverter& rDffConv, const OUString& rObjName, const tools::Rectangle& rChartRect ) const { // initialize conversion (locks the model to suppress any internal updates) InitConversion( xChartDoc, rChartRect ); @@ -4171,7 +4171,7 @@ XclImpChartDrawing::XclImpChartDrawing( const XclImpRoot& rRoot, bool bOwnTab ) } void XclImpChartDrawing::ConvertObjects( XclImpDffConverter& rDffConv, - const Reference< XModel >& rxModel, const Rectangle& rChartRect ) + const Reference< XModel >& rxModel, const tools::Rectangle& rChartRect ) { maChartRect = rChartRect; // needed in CalcAnchorRect() callback @@ -4202,12 +4202,12 @@ void XclImpChartDrawing::ConvertObjects( XclImpDffConverter& rDffConv, ImplConvertObjects( rDffConv, *pSdrModel, *pSdrPage ); } -Rectangle XclImpChartDrawing::CalcAnchorRect( const XclObjAnchor& rAnchor, bool bDffAnchor ) const +tools::Rectangle XclImpChartDrawing::CalcAnchorRect( const XclObjAnchor& rAnchor, bool bDffAnchor ) const { /* In objects with DFF client anchor, the position of the shape is stored in the cell address components of the client anchor. In old BIFF3-BIFF5 objects, the position is stored in the offset components of the anchor. */ - Rectangle aRect( + tools::Rectangle aRect( static_cast< long >( static_cast< double >( bDffAnchor ? rAnchor.maFirst.mnCol : rAnchor.mnLX ) / EXC_CHART_TOTALUNITS * maChartRect.GetWidth() + 0.5 ), static_cast< long >( static_cast< double >( bDffAnchor ? rAnchor.maFirst.mnRow : rAnchor.mnTY ) / EXC_CHART_TOTALUNITS * maChartRect.GetHeight() + 0.5 ), static_cast< long >( static_cast< double >( bDffAnchor ? rAnchor.maLast.mnCol : rAnchor.mnRX ) / EXC_CHART_TOTALUNITS * maChartRect.GetWidth() + 0.5 ), @@ -4327,7 +4327,7 @@ std::size_t XclImpChart::GetProgressSize() const (mxChartDrawing ? mxChartDrawing->GetProgressSize() : 0); } -void XclImpChart::Convert( Reference< XModel > const & xModel, XclImpDffConverter& rDffConv, const OUString& rObjName, const Rectangle& rChartRect ) const +void XclImpChart::Convert( Reference< XModel > const & xModel, XclImpDffConverter& rDffConv, const OUString& rObjName, const tools::Rectangle& rChartRect ) const { Reference< XChartDocument > xChartDoc( xModel, UNO_QUERY ); if( xChartDoc.is() ) diff --git a/sc/source/filter/excel/xiescher.cxx b/sc/source/filter/excel/xiescher.cxx index 227cdead15ef..aeb46ac33e33 100644 --- a/sc/source/filter/excel/xiescher.cxx +++ b/sc/source/filter/excel/xiescher.cxx @@ -387,7 +387,7 @@ const XclObjAnchor* XclImpDrawObjBase::GetAnchor() const return mbHasAnchor ? &maAnchor : nullptr; } -bool XclImpDrawObjBase::IsValidSize( const Rectangle& rAnchorRect ) const +bool XclImpDrawObjBase::IsValidSize( const tools::Rectangle& rAnchorRect ) const { // XclObjAnchor rounds up the width, width of 3 is the result of an Excel width of 0 return mbAreaObj ? @@ -415,7 +415,7 @@ std::size_t XclImpDrawObjBase::GetProgressSize() const return DoGetProgressSize(); } -SdrObjectPtr XclImpDrawObjBase::CreateSdrObject( XclImpDffConverter& rDffConv, const Rectangle& rAnchorRect, bool bIsDff ) const +SdrObjectPtr XclImpDrawObjBase::CreateSdrObject( XclImpDffConverter& rDffConv, const tools::Rectangle& rAnchorRect, bool bIsDff ) const { SdrObjectPtr xSdrObj; if( bIsDff && !mbCustomDff ) @@ -795,7 +795,7 @@ std::size_t XclImpDrawObjBase::DoGetProgressSize() const return 1; } -SdrObjectPtr XclImpDrawObjBase::DoCreateSdrObj( XclImpDffConverter& rDffConv, const Rectangle& ) const +SdrObjectPtr XclImpDrawObjBase::DoCreateSdrObj( XclImpDffConverter& rDffConv, const tools::Rectangle& ) const { rDffConv.Progress( GetProgressSize() ); return nullptr; @@ -1011,7 +1011,7 @@ std::size_t XclImpGroupObj::DoGetProgressSize() const return XclImpDrawObjBase::DoGetProgressSize() + maChildren.GetProgressSize(); } -SdrObjectPtr XclImpGroupObj::DoCreateSdrObj( XclImpDffConverter& rDffConv, const Rectangle& /*rAnchorRect*/ ) const +SdrObjectPtr XclImpGroupObj::DoCreateSdrObj( XclImpDffConverter& rDffConv, const tools::Rectangle& /*rAnchorRect*/ ) const { std::unique_ptr<SdrObjGroup, SdrObjectFree> xSdrObj( new SdrObjGroup ); // child objects in BIFF2-BIFF5 have absolute size, not needed to pass own anchor rectangle @@ -1058,7 +1058,7 @@ void XclImpLineObj::DoReadObj5( XclImpStream& rStrm, sal_uInt16 nNameLen, sal_uI ReadMacro5( rStrm, nMacroSize ); } -SdrObjectPtr XclImpLineObj::DoCreateSdrObj( XclImpDffConverter& rDffConv, const Rectangle& rAnchorRect ) const +SdrObjectPtr XclImpLineObj::DoCreateSdrObj( XclImpDffConverter& rDffConv, const tools::Rectangle& rAnchorRect ) const { ::basegfx::B2DPolygon aB2DPolygon; switch( mnStartPoint ) @@ -1194,7 +1194,7 @@ void XclImpRectObj::DoReadObj5( XclImpStream& rStrm, sal_uInt16 nNameLen, sal_uI ReadMacro5( rStrm, nMacroSize ); } -SdrObjectPtr XclImpRectObj::DoCreateSdrObj( XclImpDffConverter& rDffConv, const Rectangle& rAnchorRect ) const +SdrObjectPtr XclImpRectObj::DoCreateSdrObj( XclImpDffConverter& rDffConv, const tools::Rectangle& rAnchorRect ) const { SdrObjectPtr xSdrObj( new SdrRectObj( rAnchorRect ) ); ConvertRectStyle( *xSdrObj ); @@ -1207,7 +1207,7 @@ XclImpOvalObj::XclImpOvalObj( const XclImpRoot& rRoot ) : { } -SdrObjectPtr XclImpOvalObj::DoCreateSdrObj( XclImpDffConverter& rDffConv, const Rectangle& rAnchorRect ) const +SdrObjectPtr XclImpOvalObj::DoCreateSdrObj( XclImpDffConverter& rDffConv, const tools::Rectangle& rAnchorRect ) const { SdrObjectPtr xSdrObj( new SdrCircObj( OBJ_CIRC, rAnchorRect ) ); ConvertRectStyle( *xSdrObj ); @@ -1247,9 +1247,9 @@ void XclImpArcObj::DoReadObj5( XclImpStream& rStrm, sal_uInt16 nNameLen, sal_uIn ReadMacro5( rStrm, nMacroSize ); } -SdrObjectPtr XclImpArcObj::DoCreateSdrObj( XclImpDffConverter& rDffConv, const Rectangle& rAnchorRect ) const +SdrObjectPtr XclImpArcObj::DoCreateSdrObj( XclImpDffConverter& rDffConv, const tools::Rectangle& rAnchorRect ) const { - Rectangle aNewRect = rAnchorRect; + tools::Rectangle aNewRect = rAnchorRect; long nStartAngle = 0; long nEndAngle = 0; switch( mnQuadrant ) @@ -1336,7 +1336,7 @@ void XclImpPolygonObj::DoReadObj5( XclImpStream& rStrm, sal_uInt16 nNameLen, sal namespace { -::basegfx::B2DPoint lclGetPolyPoint( const Rectangle& rAnchorRect, const Point& rPoint ) +::basegfx::B2DPoint lclGetPolyPoint( const tools::Rectangle& rAnchorRect, const Point& rPoint ) { return ::basegfx::B2DPoint( rAnchorRect.Left() + static_cast< sal_Int32 >( ::std::min< double >( rPoint.X(), 16384.0 ) / 16384.0 * rAnchorRect.GetWidth() + 0.5 ), @@ -1345,7 +1345,7 @@ namespace { } // namespace -SdrObjectPtr XclImpPolygonObj::DoCreateSdrObj( XclImpDffConverter& rDffConv, const Rectangle& rAnchorRect ) const +SdrObjectPtr XclImpPolygonObj::DoCreateSdrObj( XclImpDffConverter& rDffConv, const tools::Rectangle& rAnchorRect ) const { SdrObjectPtr xSdrObj; if( maCoords.size() >= 2 ) @@ -1419,7 +1419,7 @@ void XclImpTextObj::DoReadObj5( XclImpStream& rStrm, sal_uInt16 nNameLen, sal_uI maTextData.ReadFormats( rStrm ); } -SdrObjectPtr XclImpTextObj::DoCreateSdrObj( XclImpDffConverter& rDffConv, const Rectangle& rAnchorRect ) const +SdrObjectPtr XclImpTextObj::DoCreateSdrObj( XclImpDffConverter& rDffConv, const tools::Rectangle& rAnchorRect ) const { std::unique_ptr<SdrObjCustomShape, SdrObjectFree> xSdrObj( new SdrObjCustomShape ); xSdrObj->NbcSetSnapRect( rAnchorRect ); @@ -1686,7 +1686,7 @@ std::size_t XclImpChartObj::DoGetProgressSize() const return mxChart ? mxChart->GetProgressSize() : 1; } -SdrObjectPtr XclImpChartObj::DoCreateSdrObj( XclImpDffConverter& rDffConv, const Rectangle& rAnchorRect ) const +SdrObjectPtr XclImpChartObj::DoCreateSdrObj( XclImpDffConverter& rDffConv, const tools::Rectangle& rAnchorRect ) const { SdrObjectPtr xSdrObj; SfxObjectShell* pDocShell = GetDocShell(); @@ -1766,7 +1766,7 @@ void XclImpChartObj::FinalizeTabChart() // create the object anchor XclObjAnchor aAnchor; - aAnchor.SetRect( GetRoot(), GetCurrScTab(), Rectangle( 1000, 500, nWidth, nHeight ), MapUnit::Map100thMM ); + aAnchor.SetRect( GetRoot(), GetCurrScTab(), tools::Rectangle( 1000, 500, nWidth, nHeight ), MapUnit::Map100thMM ); SetAnchor( aAnchor ); } @@ -1815,7 +1815,7 @@ XclImpControlHelper::~XclImpControlHelper() } SdrObjectPtr XclImpControlHelper::CreateSdrObjectFromShape( - const Reference< XShape >& rxShape, const Rectangle& rAnchorRect ) const + const Reference< XShape >& rxShape, const tools::Rectangle& rAnchorRect ) const { mxShape = rxShape; SdrObjectPtr xSdrObj( SdrObject::getSdrObjectFromXShape( rxShape ) ); @@ -2060,7 +2060,7 @@ void XclImpTbxObjBase::ConvertLabel( ScfPropertySet& rPropSet ) const ConvertFont( rPropSet ); } -SdrObjectPtr XclImpTbxObjBase::DoCreateSdrObj( XclImpDffConverter& rDffConv, const Rectangle& rAnchorRect ) const +SdrObjectPtr XclImpTbxObjBase::DoCreateSdrObj( XclImpDffConverter& rDffConv, const tools::Rectangle& rAnchorRect ) const { SdrObjectPtr xSdrObj( rDffConv.CreateSdrObject( *this, rAnchorRect ) ); rDffConv.Progress(); @@ -2934,7 +2934,7 @@ void XclImpPictureObj::DoReadObj8SubRec( XclImpStream& rStrm, sal_uInt16 nSubRec } } -SdrObjectPtr XclImpPictureObj::DoCreateSdrObj( XclImpDffConverter& rDffConv, const Rectangle& rAnchorRect ) const +SdrObjectPtr XclImpPictureObj::DoCreateSdrObj( XclImpDffConverter& rDffConv, const tools::Rectangle& rAnchorRect ) const { // try to create an OLE object or form control SdrObjectPtr xSdrObj( rDffConv.CreateSdrObject( *this, rAnchorRect ) ); @@ -3307,7 +3307,7 @@ void XclImpDffConverter::ProcessObject( SdrObjList& rObjList, const XclImpDrawOb { if( const XclObjAnchor* pAnchor = rDrawObj.GetAnchor() ) { - Rectangle aAnchorRect = GetConvData().mrDrawing.CalcAnchorRect( *pAnchor, false ); + tools::Rectangle aAnchorRect = GetConvData().mrDrawing.CalcAnchorRect( *pAnchor, false ); if( rDrawObj.IsValidSize( aAnchorRect ) ) { // CreateSdrObject() recursively creates embedded child objects @@ -3351,7 +3351,7 @@ void XclImpDffConverter::FinalizeDrawing() SetModel( &maDataStack.back()->mrSdrModel, 1440 ); } -SdrObjectPtr XclImpDffConverter::CreateSdrObject( const XclImpTbxObjBase& rTbxObj, const Rectangle& rAnchorRect ) +SdrObjectPtr XclImpDffConverter::CreateSdrObject( const XclImpTbxObjBase& rTbxObj, const tools::Rectangle& rAnchorRect ) { SdrObjectPtr xSdrObj; @@ -3385,7 +3385,7 @@ SdrObjectPtr XclImpDffConverter::CreateSdrObject( const XclImpTbxObjBase& rTbxOb return xSdrObj; } -SdrObjectPtr XclImpDffConverter::CreateSdrObject( const XclImpPictureObj& rPicObj, const Rectangle& rAnchorRect ) +SdrObjectPtr XclImpDffConverter::CreateSdrObject( const XclImpPictureObj& rPicObj, const tools::Rectangle& rAnchorRect ) { SdrObjectPtr xSdrObj; @@ -3429,7 +3429,7 @@ SdrObjectPtr XclImpDffConverter::CreateSdrObject( const XclImpPictureObj& rPicOb { // first try to resolve graphic from DFF storage Graphic aGraphic; - Rectangle aVisArea; + tools::Rectangle aVisArea; if( !GetBLIP( GetPropertyValue( DFF_Prop_pib, 0 ), aGraphic, &aVisArea ) ) { // if not found, use graphic from object (imported from IMGDATA record) @@ -3484,7 +3484,7 @@ void XclImpDffConverter::ProcessClientAnchor2( SvStream& rDffStrm, } SdrObject* XclImpDffConverter::ProcessObj( SvStream& rDffStrm, DffObjData& rDffObjData, - void* pClientData, Rectangle& /*rTextRect*/, SdrObject* pOldSdrObj ) + void* pClientData, tools::Rectangle& /*rTextRect*/, SdrObject* pOldSdrObj ) { XclImpDffConvData& rConvData = GetConvData(); @@ -3495,7 +3495,7 @@ SdrObject* XclImpDffConverter::ProcessObj( SvStream& rDffStrm, DffObjData& rDffO // find the OBJ record data related to the processed shape XclImpDrawObjRef xDrawObj = rConvData.mrDrawing.FindDrawObj( rDffObjData.rSpHd ); - const Rectangle& rAnchorRect = rDffObjData.aChildAnchor; + const tools::Rectangle& rAnchorRect = rDffObjData.aChildAnchor; // Do not process the global page group shape (flag SP_FPATRIARCH) bool bGlobalPageGroup = ::get_flag< sal_uInt32 >( rDffObjData.nSpFlags, SP_FPATRIARCH ); @@ -3746,7 +3746,7 @@ void XclImpDffConverter::ProcessSolverContainer( SvStream& rDffStrm, const DffRe void XclImpDffConverter::ProcessShContainer( SvStream& rDffStrm, const DffRecordHeader& rShHeader ) { rShHeader.SeekToBegOfRecord( rDffStrm ); - Rectangle aDummy; + tools::Rectangle aDummy; const XclImpDrawObjBase* pDrawObj = nullptr; /* The call to ImportObj() creates and returns a new SdrObject for the processed shape. We take ownership of the returned object here. If the @@ -4125,7 +4125,7 @@ void XclImpSheetDrawing::ConvertObjects( XclImpDffConverter& rDffConv ) ImplConvertObjects( rDffConv, *pSdrModel, *pSdrPage ); } -Rectangle XclImpSheetDrawing::CalcAnchorRect( const XclObjAnchor& rAnchor, bool /*bDffAnchor*/ ) const +tools::Rectangle XclImpSheetDrawing::CalcAnchorRect( const XclObjAnchor& rAnchor, bool /*bDffAnchor*/ ) const { return rAnchor.GetRect( GetRoot(), maScUsedArea.aStart.Tab(), MapUnit::Map100thMM ); } diff --git a/sc/source/filter/excel/xlchart.cxx b/sc/source/filter/excel/xlchart.cxx index c78811f10987..655d4abce789 100644 --- a/sc/source/filter/excel/xlchart.cxx +++ b/sc/source/filter/excel/xlchart.cxx @@ -1237,7 +1237,7 @@ XclChRootData::~XclChRootData() { } -void XclChRootData::InitConversion( const XclRoot& rRoot, const Reference< XChartDocument >& rxChartDoc, const Rectangle& rChartRect ) +void XclChRootData::InitConversion( const XclRoot& rRoot, const Reference< XChartDocument >& rxChartDoc, const tools::Rectangle& rChartRect ) { // remember chart document reference and chart shape position/size OSL_ENSURE( rxChartDoc.is(), "XclChRootData::InitConversion - missing chart document" ); diff --git a/sc/source/filter/excel/xlescher.cxx b/sc/source/filter/excel/xlescher.cxx index de02aaab6ac0..dc25c1bdc0d7 100644 --- a/sc/source/filter/excel/xlescher.cxx +++ b/sc/source/filter/excel/xlescher.cxx @@ -119,7 +119,7 @@ void lclGetRowFromY( } /** Mirrors a rectangle (from LTR to RTL layout or vice versa). */ -void lclMirrorRectangle( Rectangle& rRect ) +void lclMirrorRectangle( tools::Rectangle& rRect ) { long nLeft = rRect.Left(); rRect.Left() = -rRect.Right(); @@ -141,11 +141,11 @@ XclObjAnchor::XclObjAnchor() : { } -Rectangle XclObjAnchor::GetRect( const XclRoot& rRoot, SCTAB nScTab, MapUnit eMapUnit ) const +tools::Rectangle XclObjAnchor::GetRect( const XclRoot& rRoot, SCTAB nScTab, MapUnit eMapUnit ) const { ScDocument& rDoc = rRoot.GetDoc(); double fScale = lclGetTwipsScale( eMapUnit ); - Rectangle aRect( + tools::Rectangle aRect( lclGetXFromCol( rDoc, nScTab, maFirst.mnCol, mnLX, fScale ), lclGetYFromRow( rDoc, nScTab, maFirst.mnRow, mnTY, fScale ), lclGetXFromCol( rDoc, nScTab, maLast.mnCol, mnRX + 1, fScale ), @@ -157,14 +157,14 @@ Rectangle XclObjAnchor::GetRect( const XclRoot& rRoot, SCTAB nScTab, MapUnit eMa return aRect; } -void XclObjAnchor::SetRect( const XclRoot& rRoot, SCTAB nScTab, const Rectangle& rRect, MapUnit eMapUnit ) +void XclObjAnchor::SetRect( const XclRoot& rRoot, SCTAB nScTab, const tools::Rectangle& rRect, MapUnit eMapUnit ) { ScDocument& rDoc = rRoot.GetDoc(); sal_uInt16 nXclMaxCol = rRoot.GetXclMaxPos().Col(); sal_uInt16 nXclMaxRow = static_cast<sal_uInt16>( rRoot.GetXclMaxPos().Row()); // adjust coordinates in mirrored sheets - Rectangle aRect( rRect ); + tools::Rectangle aRect( rRect ); if( rDoc.IsLayoutRTL( nScTab ) ) lclMirrorRectangle( aRect ); @@ -178,7 +178,7 @@ void XclObjAnchor::SetRect( const XclRoot& rRoot, SCTAB nScTab, const Rectangle& } void XclObjAnchor::SetRect( const Size& rPageSize, sal_Int32 nScaleX, sal_Int32 nScaleY, - const Rectangle& rRect, MapUnit eMapUnit ) + const tools::Rectangle& rRect, MapUnit eMapUnit ) { double fScale = 1.0; switch( eMapUnit ) diff --git a/sc/source/filter/html/htmlexp2.cxx b/sc/source/filter/html/htmlexp2.cxx index d61cadaa2eae..9b751d3b7ee3 100644 --- a/sc/source/filter/html/htmlexp2.cxx +++ b/sc/source/filter/html/htmlexp2.cxx @@ -69,14 +69,14 @@ void ScHTMLExport::FillGraphList( const SdrPage* pPage, SCTAB nTab, { if ( pPage->GetObjCount() ) { - Rectangle aRect; + tools::Rectangle aRect; if ( !bAll ) aRect = pDoc->GetMMRect( nStartCol, nStartRow, nEndCol, nEndRow, nTab ); SdrObjListIter aIter( *pPage, SdrIterMode::Flat ); SdrObject* pObject = aIter.Next(); while ( pObject ) { - Rectangle aObjRect = pObject->GetCurrentBoundRect(); + tools::Rectangle aObjRect = pObject->GetCurrentBoundRect(); if ( (bAll || aRect.IsInside( aObjRect )) && !ScDrawLayer::IsNoteCaption(pObject) ) { Size aSpace; @@ -96,7 +96,7 @@ void ScHTMLExport::FillGraphList( const SdrPage* pPage, SCTAB nTab, == static_cast< SCSIZE >( nRow2 - nRow1 )); // rows-1 ! if ( bInCell ) { // Spacing in spanning cell - Rectangle aCellRect = pDoc->GetMMRect( + tools::Rectangle aCellRect = pDoc->GetMMRect( nCol1, nRow1, nCol2, nRow2, nTab ); aSpace = MMToPixel( Size( aCellRect.GetWidth() - aObjRect.GetWidth(), diff --git a/sc/source/filter/inc/scfobj.hxx b/sc/source/filter/inc/scfobj.hxx index 1c2a117bc65e..84824ae4b741 100644 --- a/sc/source/filter/inc/scfobj.hxx +++ b/sc/source/filter/inc/scfobj.hxx @@ -21,12 +21,12 @@ #define INCLUDED_SC_SOURCE_FILTER_INC_SCFOBJ_HXX class ScDocument; -class Rectangle; +namespace tools { class Rectangle; } class Sc10InsertObject { public: - static void InsertChart( ScDocument* pDoc, SCTAB nDestTab, const Rectangle& rRect, + static void InsertChart( ScDocument* pDoc, SCTAB nDestTab, const tools::Rectangle& rRect, SCTAB nSrcTab, sal_uInt16 nX1, sal_uInt16 nY1, sal_uInt16 nX2, sal_uInt16 nY2 ); }; diff --git a/sc/source/filter/inc/xcl97esc.hxx b/sc/source/filter/inc/xcl97esc.hxx index c63ce77e0d8c..b8bc241e3700 100644 --- a/sc/source/filter/inc/xcl97esc.hxx +++ b/sc/source/filter/inc/xcl97esc.hxx @@ -93,7 +93,7 @@ public: virtual EscherExHostAppData* StartShape( const css::uno::Reference< css::drawing::XShape>& rxShape, - const Rectangle* pChildAnchor ) override; + const tools::Rectangle* pChildAnchor ) override; virtual void EndShape( sal_uInt16 nShapeType, sal_uInt32 nShapeID ) override; virtual EscherExHostAppData* EnterAdditionalTextGroup() override; @@ -103,14 +103,14 @@ public: @descr Writes the form control data to the 'Ctls' stream. */ std::unique_ptr<XclExpOcxControlObj> CreateOCXCtrlObj( css::uno::Reference< css::drawing::XShape > const & xShape, - const Rectangle* pChildAnchor ); + const tools::Rectangle* pChildAnchor ); private: tools::SvRef<SotStorageStream> mxCtlsStrm; /// The 'Ctls' stream. /** Creates a TBX form control OBJ record from the passed form control. */ std::unique_ptr<XclExpTbxControlObj> CreateTBXCtrlObj( css::uno::Reference< css::drawing::XShape > const & xShape, - const Rectangle* pChildAnchor ); + const tools::Rectangle* pChildAnchor ); private: /** Tries to get the name of a Basic macro from a control. */ diff --git a/sc/source/filter/inc/xcl97rec.hxx b/sc/source/filter/inc/xcl97rec.hxx index 1782b4d80450..40d9b98bc6fa 100644 --- a/sc/source/filter/inc/xcl97rec.hxx +++ b/sc/source/filter/inc/xcl97rec.hxx @@ -104,7 +104,7 @@ protected: See SetOwnEscher() for details. */ explicit XclObj( XclExpObjectManager& rObjMgr, sal_uInt16 nObjType, bool bOwnEscher = false ); - void ImplWriteAnchor( const XclExpRoot& rRoot, const SdrObject* pSdrObj, const Rectangle* pChildAnchor ); + void ImplWriteAnchor( const XclExpRoot& rRoot, const SdrObject* pSdrObj, const tools::Rectangle* pChildAnchor ); // overwritten for writing MSODRAWING record virtual void WriteBody( XclExpStream& rStrm ) override; @@ -159,18 +159,18 @@ class XclObjComment : public XclObj std::unique_ptr< SdrCaptionObj > mpCaption; bool mbVisible; - Rectangle maFrom; - Rectangle maTo; + tools::Rectangle maFrom; + tools::Rectangle maTo; public: XclObjComment( XclExpObjectManager& rObjMgr, - const Rectangle& rRect, const EditTextObject& rEditObj, SdrCaptionObj* pCaption, bool bVisible, const ScAddress& rAddress, Rectangle &rFrom, Rectangle &To ); + const tools::Rectangle& rRect, const EditTextObject& rEditObj, SdrCaptionObj* pCaption, bool bVisible, const ScAddress& rAddress, tools::Rectangle &rFrom, tools::Rectangle &To ); virtual ~XclObjComment() override; /** c'tor process for formatted text objects above . @descr used to construct the MSODRAWING Escher object properties. */ void ProcessEscherObj( const XclExpRoot& rRoot, - const Rectangle& rRect, SdrObject* pCaption, bool bVisible ); + const tools::Rectangle& rRect, SdrObject* pCaption, bool bVisible ); virtual void Save( XclExpStream& rStrm ) override; virtual void SaveXml( XclExpXmlStream& rStrm ) override; diff --git a/sc/source/filter/inc/xechart.hxx b/sc/source/filter/inc/xechart.hxx index f4e05de6f3b3..9514869d1e8f 100644 --- a/sc/source/filter/inc/xechart.hxx +++ b/sc/source/filter/inc/xechart.hxx @@ -31,7 +31,7 @@ #include <map> class Size; -class Rectangle; +namespace tools { class Rectangle; } namespace com { namespace sun { namespace star { namespace awt @@ -100,7 +100,7 @@ public: /** Starts the API chart document conversion. Must be called once before all API conversion. */ void InitConversion( css::uno::Reference< css::chart2::XChartDocument > const & xChartDoc, - const Rectangle& rChartRect ) const; + const tools::Rectangle& rChartRect ) const; /** Finishes the API chart document conversion. Must be called once after all API conversion. */ void FinishConversion() const; @@ -1127,7 +1127,7 @@ class XclExpChChart : public XclExpChGroupBase public: explicit XclExpChChart( const XclExpRoot& rRoot, css::uno::Reference< css::chart2::XChartDocument > const & xChartDoc, - const Rectangle& rChartRect ); + const tools::Rectangle& rChartRect ); /** Creates, registers and returns a new data series object. */ XclExpChSeriesRef CreateSeries(); @@ -1183,7 +1183,7 @@ class XclExpChart : public XclExpSubStream, protected XclExpRoot public: explicit XclExpChart( const XclExpRoot& rRoot, css::uno::Reference< css::frame::XModel > const & xModel, - const Rectangle& rChartRect ); + const tools::Rectangle& rChartRect ); }; #endif diff --git a/sc/source/filter/inc/xeescher.hxx b/sc/source/filter/inc/xeescher.hxx index f3a98cfddd6b..24b87a75dc0d 100644 --- a/sc/source/filter/inc/xeescher.hxx +++ b/sc/source/filter/inc/xeescher.hxx @@ -54,11 +54,11 @@ public: /** Called from SVX DFF converter. @param rRect The object anchor rectangle to be exported (in twips). */ - virtual void WriteData( EscherEx& rEscherEx, const Rectangle& rRect ) override; + virtual void WriteData( EscherEx& rEscherEx, const tools::Rectangle& rRect ) override; private: virtual void ImplSetFlags( const SdrObject& rSdrObj ); - virtual void ImplCalcAnchorRect( const Rectangle& rRect, MapUnit eMapUnit ); + virtual void ImplCalcAnchorRect( const tools::Rectangle& rRect, MapUnit eMapUnit ); protected: // for access in derived classes XclObjAnchor maAnchor; /// The client anchor data. @@ -73,7 +73,7 @@ public: private: virtual void ImplSetFlags( const SdrObject& rSdrObj ) override; - virtual void ImplCalcAnchorRect( const Rectangle& rRect, MapUnit eMapUnit ) override; + virtual void ImplCalcAnchorRect( const tools::Rectangle& rRect, MapUnit eMapUnit ) override; private: SCTAB mnScTab; /// Calc sheet index. @@ -88,7 +88,7 @@ public: private: virtual void ImplSetFlags( const SdrObject& rSdrObj ) override; - virtual void ImplCalcAnchorRect( const Rectangle& rRect, MapUnit eMapUnit ) override; + virtual void ImplCalcAnchorRect( const tools::Rectangle& rRect, MapUnit eMapUnit ) override; private: Size maPageSize; @@ -100,7 +100,7 @@ private: class XclExpDffNoteAnchor : public XclExpDffAnchorBase { public: - explicit XclExpDffNoteAnchor( const XclExpRoot& rRoot, const Rectangle& rRect ); + explicit XclExpDffNoteAnchor( const XclExpRoot& rRoot, const tools::Rectangle& rRect ); }; /** Represents the position (anchor) of a cell dropdown object. */ @@ -227,7 +227,7 @@ public: explicit XclExpOcxControlObj( XclExpObjectManager& rObjMgr, css::uno::Reference< css::drawing::XShape > const & xShape, - const Rectangle* pChildAnchor, + const tools::Rectangle* pChildAnchor, const OUString& rClassName, sal_uInt32 nStrmStart, sal_uInt32 nStrmSize ); @@ -249,7 +249,7 @@ public: explicit XclExpTbxControlObj( XclExpObjectManager& rObjMgr, css::uno::Reference< css::drawing::XShape > const & xShape, - const Rectangle* pChildAnchor ); + const tools::Rectangle* pChildAnchor ); /** Sets the name of a macro attached to this control. @return true = The passed event descriptor was valid, macro name has been found. */ @@ -292,7 +292,7 @@ public: explicit XclExpChartObj( XclExpObjectManager& rObjMgr, css::uno::Reference< css::drawing::XShape > const & xShape, - const Rectangle* pChildAnchor ); + const tools::Rectangle* pChildAnchor ); virtual ~XclExpChartObj() override; /** Writes the OBJ record and the entire chart substream. */ @@ -357,8 +357,8 @@ private: bool mbAutoFill; /// Auto Fill Style bool mbColHidden; /// Column containing the comment is hidden bool mbRowHidden; /// Row containing the comment is hidden - Rectangle maCommentFrom; /// From and From Offset - Rectangle maCommentTo; /// To and To Offsets + tools::Rectangle maCommentFrom; /// From and From Offset + tools::Rectangle maCommentTo; /// To and To Offsets }; class XclExpComments : public XclExpRecord diff --git a/sc/source/filter/inc/xichart.hxx b/sc/source/filter/inc/xichart.hxx index 7d72bf89ddd3..d4be01621e23 100644 --- a/sc/source/filter/inc/xichart.hxx +++ b/sc/source/filter/inc/xichart.hxx @@ -107,7 +107,7 @@ public: /** Starts the API chart document conversion. Must be called once before all API conversion. */ void InitConversion( const css::uno::Reference< css::chart2::XChartDocument>& xChartDoc, - const Rectangle& rChartRect ) const; + const tools::Rectangle& rChartRect ) const; /** Finishes the API chart document conversion. Must be called once after all API conversion. */ void FinishConversion( XclImpDffConverter& rDffConv ) const; @@ -1298,7 +1298,7 @@ public: const css::uno::Reference< css::chart2::XChartDocument>& xChartDoc, XclImpDffConverter& rDffConv, const OUString& rObjName, - const Rectangle& rChartRect ) const; + const tools::Rectangle& rChartRect ) const; private: /** Reads a CHSERIES group (data series source and formatting). */ @@ -1352,15 +1352,15 @@ public: void ConvertObjects( XclImpDffConverter& rDffConv, const css::uno::Reference< css::frame::XModel >& rxModel, - const Rectangle& rChartRect ); + const tools::Rectangle& rChartRect ); /** Calculate the resulting rectangle of the passed anchor. */ - virtual Rectangle CalcAnchorRect( const XclObjAnchor& rAnchor, bool bDffAnchor ) const override; + virtual tools::Rectangle CalcAnchorRect( const XclObjAnchor& rAnchor, bool bDffAnchor ) const override; /** Called whenever an object has been inserted into the draw page. */ virtual void OnObjectInserted( const XclImpDrawObjBase& rDrawObj ) override; private: - Rectangle maChartRect; /// Position and size of the chart shape in 1/100 mm. + tools::Rectangle maChartRect; /// Position and size of the chart shape in 1/100 mm. SCTAB mnScTab; /// Index of the sheet that contains the chart. bool mbOwnTab; /// True = own sheet, false = embedded object. }; @@ -1389,7 +1389,7 @@ public: void Convert( css::uno::Reference< css::frame::XModel > const & xModel, XclImpDffConverter& rDffConv, const OUString& rObjName, - const Rectangle& rChartRect ) const; + const tools::Rectangle& rChartRect ) const; private: /** Returns (initially creates) the drawing container for embedded shapes. **/ diff --git a/sc/source/filter/inc/xiescher.hxx b/sc/source/filter/inc/xiescher.hxx index b564a8e26e71..d1a359e4c7b9 100644 --- a/sc/source/filter/inc/xiescher.hxx +++ b/sc/source/filter/inc/xiescher.hxx @@ -115,7 +115,7 @@ public: /** Returns the object anchor if existing, null otherwise. */ const XclObjAnchor* GetAnchor() const; /** Returns true, if the passed size is valid for this object. */ - bool IsValidSize( const Rectangle& rAnchorRect ) const; + bool IsValidSize( const tools::Rectangle& rAnchorRect ) const; /** Returns the range in the sheet covered by this object. */ ScRange GetUsedArea( SCTAB nScTab ) const; @@ -127,7 +127,7 @@ public: /** Returns the needed size on the progress bar (calls virtual DoGetProgressSize() function). */ std::size_t GetProgressSize() const; /** Creates and returns an SdrObject from the contained data. Caller takes ownership! */ - SdrObjectPtr CreateSdrObject( XclImpDffConverter& rDffConv, const Rectangle& rAnchorRect, bool bIsDff ) const; + SdrObjectPtr CreateSdrObject( XclImpDffConverter& rDffConv, const tools::Rectangle& rAnchorRect, bool bIsDff ) const; /** Additional processing for the passed SdrObject before insertion into the drawing page (calls virtual DoPreProcessSdrObj() function). */ void PreProcessSdrObject( XclImpDffConverter& rDffConv, SdrObject& rSdrObj ) const; @@ -172,7 +172,7 @@ protected: /** Derived classes may return a progress bar size different from 1. */ virtual std::size_t DoGetProgressSize() const; /** Derived classes create and return a new SdrObject from the contained data. Caller takes ownership! */ - virtual SdrObjectPtr DoCreateSdrObj( XclImpDffConverter& rDffConv, const Rectangle& rAnchorRect ) const; + virtual SdrObjectPtr DoCreateSdrObj( XclImpDffConverter& rDffConv, const tools::Rectangle& rAnchorRect ) const; /** Derived classes may perform additional processing for the passed SdrObject before insertion. */ virtual void DoPreProcessSdrObj( XclImpDffConverter& rDffConv, SdrObject& rSdrObj ) const; /** Derived classes may perform additional processing for the passed SdrObject after insertion. */ @@ -254,7 +254,7 @@ protected: /** Returns a progress bar size that takes all group children into account. */ virtual std::size_t DoGetProgressSize() const override; /** Creates and returns a new SdrObject from the contained data. Caller takes ownership! */ - virtual SdrObjectPtr DoCreateSdrObj( XclImpDffConverter& rDffConv, const Rectangle& rAnchorRect ) const override; + virtual SdrObjectPtr DoCreateSdrObj( XclImpDffConverter& rDffConv, const tools::Rectangle& rAnchorRect ) const override; protected: XclImpDrawObjVector maChildren; /// Grouped objects. @@ -275,7 +275,7 @@ protected: /** Reads the contents of the a BIFF5 OBJ record from the passed stream. */ virtual void DoReadObj5( XclImpStream& rStrm, sal_uInt16 nNameLen, sal_uInt16 nMacroSize ) override; /** Creates and returns a new SdrObject from the contained data. Caller takes ownership! */ - virtual SdrObjectPtr DoCreateSdrObj( XclImpDffConverter& rDffConv, const Rectangle& rAnchorRect ) const override; + virtual SdrObjectPtr DoCreateSdrObj( XclImpDffConverter& rDffConv, const tools::Rectangle& rAnchorRect ) const override; protected: XclObjLineData maLineData; /// BIFF5 line formatting. @@ -303,7 +303,7 @@ protected: /** Reads the contents of the a BIFF5 OBJ record from the passed stream. */ virtual void DoReadObj5( XclImpStream& rStrm, sal_uInt16 nNameLen, sal_uInt16 nMacroSize ) override; /** Creates and returns a new SdrObject from the contained data. Caller takes ownership! */ - virtual SdrObjectPtr DoCreateSdrObj( XclImpDffConverter& rDffConv, const Rectangle& rAnchorRect ) const override; + virtual SdrObjectPtr DoCreateSdrObj( XclImpDffConverter& rDffConv, const tools::Rectangle& rAnchorRect ) const override; protected: XclObjFillData maFillData; /// BIFF5 fill formatting. @@ -319,7 +319,7 @@ public: protected: /** Creates and returns a new SdrObject from the contained data. Caller takes ownership! */ - virtual SdrObjectPtr DoCreateSdrObj( XclImpDffConverter& rDffConv, const Rectangle& rAnchorRect ) const override; + virtual SdrObjectPtr DoCreateSdrObj( XclImpDffConverter& rDffConv, const tools::Rectangle& rAnchorRect ) const override; }; /** An arc object. */ @@ -336,7 +336,7 @@ protected: /** Reads the contents of the a BIFF5 OBJ record from the passed stream. */ virtual void DoReadObj5( XclImpStream& rStrm, sal_uInt16 nNameLen, sal_uInt16 nMacroSize ) override; /** Creates and returns a new SdrObject from the contained data. Caller takes ownership! */ - virtual SdrObjectPtr DoCreateSdrObj( XclImpDffConverter& rDffConv, const Rectangle& rAnchorRect ) const override; + virtual SdrObjectPtr DoCreateSdrObj( XclImpDffConverter& rDffConv, const tools::Rectangle& rAnchorRect ) const override; protected: XclObjFillData maFillData; /// BIFF5 fill formatting. @@ -359,7 +359,7 @@ protected: /** Reads the contents of the a BIFF5 OBJ record from the passed stream. */ virtual void DoReadObj5( XclImpStream& rStrm, sal_uInt16 nNameLen, sal_uInt16 nMacroSize ) override; /** Creates and returns a new SdrObject from the contained data. Caller takes ownership! */ - virtual SdrObjectPtr DoCreateSdrObj( XclImpDffConverter& rDffConv, const Rectangle& rAnchorRect ) const override; + virtual SdrObjectPtr DoCreateSdrObj( XclImpDffConverter& rDffConv, const tools::Rectangle& rAnchorRect ) const override; protected: typedef std::vector< Point > PointVector; @@ -396,7 +396,7 @@ protected: /** Reads the contents of the a BIFF5 OBJ record from the passed stream. */ virtual void DoReadObj5( XclImpStream& rStrm, sal_uInt16 nNameLen, sal_uInt16 nMacroSize ) override; /** Creates and returns a new SdrObject from the contained data. Caller takes ownership! */ - virtual SdrObjectPtr DoCreateSdrObj( XclImpDffConverter& rDffConv, const Rectangle& rAnchorRect ) const override; + virtual SdrObjectPtr DoCreateSdrObj( XclImpDffConverter& rDffConv, const tools::Rectangle& rAnchorRect ) const override; /** Inserts the contained text data at the passed object. */ virtual void DoPreProcessSdrObj( XclImpDffConverter& rDffConv, SdrObject& rSdrObj ) const override; @@ -426,7 +426,7 @@ protected: /** Returns the needed size on the progress bar. */ virtual std::size_t DoGetProgressSize() const override; /** Creates and returns a new SdrObject from the contained data. Caller takes ownership! */ - virtual SdrObjectPtr DoCreateSdrObj( XclImpDffConverter& rDffConv, const Rectangle& rAnchorRect ) const override; + virtual SdrObjectPtr DoCreateSdrObj( XclImpDffConverter& rDffConv, const tools::Rectangle& rAnchorRect ) const override; /** Converts the chart document. */ virtual void DoPostProcessSdrObj( XclImpDffConverter& rDffConv, SdrObject& rSdrObj ) const override; @@ -472,7 +472,7 @@ public: /** Returns the SdrObject from the passed control shape and sets the bounding rectangle. */ SdrObjectPtr CreateSdrObjectFromShape( const css::uno::Reference< css::drawing::XShape >& rxShape, - const Rectangle& rAnchorRect ) const; + const tools::Rectangle& rAnchorRect ) const; /** Sets additional properties to the form control model, calls virtual DoProcessControl(). */ void ProcessControl( const XclImpDrawObjBase& rDrawObj ) const; @@ -524,7 +524,7 @@ protected: void ConvertLabel( ScfPropertySet& rPropSet ) const; /** Creates and returns a new SdrObject from the contained data. Caller takes ownership! */ - virtual SdrObjectPtr DoCreateSdrObj( XclImpDffConverter& rDffConv, const Rectangle& rAnchorRect ) const override; + virtual SdrObjectPtr DoCreateSdrObj( XclImpDffConverter& rDffConv, const tools::Rectangle& rAnchorRect ) const override; /** Additional processing on the SdrObject, calls new virtual function DoProcessControl(). */ virtual void DoPreProcessSdrObj( XclImpDffConverter& rDffConv, SdrObject& rSdrObj ) const override; @@ -823,7 +823,7 @@ public: const Graphic& GetGraphic() const { return maGraphic; } /** Returns the visible area of the imported graphic. */ - const Rectangle& GetVisArea() const { return maVisArea; } + const tools::Rectangle& GetVisArea() const { return maVisArea; } /** Returns true, if the OLE object will be shown as symbol. */ bool IsSymbol() const { return mbSymbol; } @@ -847,7 +847,7 @@ protected: /** Reads the contents of the specified subrecord of a BIFF8 OBJ record from stream. */ virtual void DoReadObj8SubRec( XclImpStream& rStrm, sal_uInt16 nSubRecId, sal_uInt16 nSubRecSize ) override; /** Creates and returns a new SdrObject from the contained data. Caller takes ownership! */ - virtual SdrObjectPtr DoCreateSdrObj( XclImpDffConverter& rDffConv, const Rectangle& rAnchorRect ) const override; + virtual SdrObjectPtr DoCreateSdrObj( XclImpDffConverter& rDffConv, const tools::Rectangle& rAnchorRect ) const override; /** Override to do additional processing on the SdrObject. */ virtual void DoPreProcessSdrObj( XclImpDffConverter& rDffConv, SdrObject& rSdrObj ) const override; @@ -861,7 +861,7 @@ private: private: Graphic maGraphic; /// Picture or OLE placeholder graphic. - Rectangle maVisArea; /// Size of graphic. + tools::Rectangle maVisArea; /// Size of graphic. OUString maClassName; /// Class name of embedded OLE object. sal_uInt32 mnStorageId; /// Identifier of the storage for this object. std::size_t mnCtlsStrmPos; /// Position in 'Ctls' stream for this control. @@ -955,9 +955,9 @@ public: void FinalizeDrawing(); /** Creates the SdrObject for the passed Excel TBX form control object. */ - SdrObjectPtr CreateSdrObject( const XclImpTbxObjBase& rTbxObj, const Rectangle& rAnchorRect ); + SdrObjectPtr CreateSdrObject( const XclImpTbxObjBase& rTbxObj, const tools::Rectangle& rAnchorRect ); /** Creates the SdrObject for the passed Excel OLE object or OCX form control object. */ - SdrObjectPtr CreateSdrObject( const XclImpPictureObj& rPicObj, const Rectangle& rAnchorRect ); + SdrObjectPtr CreateSdrObject( const XclImpPictureObj& rPicObj, const tools::Rectangle& rAnchorRect ); /** Returns true, if the conversion of OLE objects is supported. */ bool SupportsOleObjects() const; @@ -978,7 +978,7 @@ private: SvStream& rDffStrm, DffObjData& rDffObjData, void* pClientData, - Rectangle& rTextRect, + tools::Rectangle& rTextRect, SdrObject* pOldSdrObj ) override; /** Finalize a DFF object, sets anchor after nested objs have been loaded. */ @@ -1082,7 +1082,7 @@ public: std::size_t GetProgressSize() const; /** Derived classes calculate the resulting rectangle of the passed anchor. */ - virtual Rectangle CalcAnchorRect( const XclObjAnchor& rAnchor, bool bDffAnchor ) const = 0; + virtual tools::Rectangle CalcAnchorRect( const XclObjAnchor& rAnchor, bool bDffAnchor ) const = 0; /** Called whenever an object has been inserted into the draw page. */ virtual void OnObjectInserted( const XclImpDrawObjBase& rDrawObj ) = 0; @@ -1138,7 +1138,7 @@ public: void ConvertObjects( XclImpDffConverter& rDffConv ); /** Calculate the resulting rectangle of the passed anchor. */ - virtual Rectangle CalcAnchorRect( const XclObjAnchor& rAnchor, bool bDffAnchor ) const override; + virtual tools::Rectangle CalcAnchorRect( const XclObjAnchor& rAnchor, bool bDffAnchor ) const override; /** On call, updates the used area of the sheet. */ virtual void OnObjectInserted( const XclImpDrawObjBase& rDrawObj ) override; diff --git a/sc/source/filter/inc/xlchart.hxx b/sc/source/filter/inc/xlchart.hxx index 8640b348c856..32bbc177e926 100644 --- a/sc/source/filter/inc/xlchart.hxx +++ b/sc/source/filter/inc/xlchart.hxx @@ -1400,7 +1400,7 @@ struct XclChRootData css::uno::Reference< css::chart2::XChartDocument > mxChartDoc; /// The chart document. - Rectangle maChartRect; /// Position and size of the chart shape. + tools::Rectangle maChartRect; /// Position and size of the chart shape. XclChTypeProvRef mxTypeInfoProv; /// Provides info about chart types. XclChFmtInfoProvRef mxFmtInfoProv; /// Provides info about auto formatting. XclChObjectTableRef mxLineDashTable; /// Container for line dash styles. @@ -1420,7 +1420,7 @@ struct XclChRootData void InitConversion( const XclRoot& rRoot, const css::uno::Reference< css::chart2::XChartDocument >& rxChartDoc, - const Rectangle& rChartRect ); + const tools::Rectangle& rChartRect ); /** Finishes the API chart document conversion. Must be called once before any API access. */ void FinishConversion(); diff --git a/sc/source/filter/inc/xlescher.hxx b/sc/source/filter/inc/xlescher.hxx index 7ad4d40b9606..95672abf679f 100644 --- a/sc/source/filter/inc/xlescher.hxx +++ b/sc/source/filter/inc/xlescher.hxx @@ -33,7 +33,7 @@ namespace com { namespace sun { namespace star { namespace script { struct ScriptEventDescriptor; } } } } -class Rectangle; +namespace tools { class Rectangle; } // Constants and Enumerations ================================================= @@ -294,13 +294,13 @@ struct XclObjAnchor : public XclRange explicit XclObjAnchor(); /** Calculates a rectangle from the contained coordinates. */ - Rectangle GetRect( const XclRoot& rRoot, SCTAB nScTab, MapUnit eMapUnit ) const; + tools::Rectangle GetRect( const XclRoot& rRoot, SCTAB nScTab, MapUnit eMapUnit ) const; /** Initializes the anchor coordinates for a sheet. */ - void SetRect( const XclRoot& rRoot, SCTAB nScTab, const Rectangle& rRect, MapUnit eMapUnit ); + void SetRect( const XclRoot& rRoot, SCTAB nScTab, const tools::Rectangle& rRect, MapUnit eMapUnit ); /** Initializes the anchor coordinates for an embedded draw page. */ void SetRect( const Size& rPageSize, sal_Int32 nScaleX, sal_Int32 nScaleY, - const Rectangle& rRect, MapUnit eMapUnit ); + const tools::Rectangle& rRect, MapUnit eMapUnit ); }; inline SvStream& operator>>( SvStream& rStrm, XclObjAnchor& rAnchor ) diff --git a/sc/source/filter/rtf/eeimpars.cxx b/sc/source/filter/rtf/eeimpars.cxx index 926efdd480c9..28bb57bde052 100644 --- a/sc/source/filter/rtf/eeimpars.cxx +++ b/sc/source/filter/rtf/eeimpars.cxx @@ -588,7 +588,7 @@ void ScEEImport::InsertGraphic( SCCOL nCol, SCROW nRow, SCTAB nTab, if ( pI->pGraphic ) { - Rectangle aRect ( aInsertPos, aLogicSize ); + tools::Rectangle aRect ( aInsertPos, aLogicSize ); SdrGrafObj* pObj = new SdrGrafObj( *pI->pGraphic, aRect ); // calling SetGraphicLink here doesn't work pObj->SetName( pI->aURL ); diff --git a/sc/source/filter/starcalc/scflt.cxx b/sc/source/filter/starcalc/scflt.cxx index 0f7f337bedbf..2d7128be907b 100644 --- a/sc/source/filter/starcalc/scflt.cxx +++ b/sc/source/filter/starcalc/scflt.cxx @@ -2379,7 +2379,7 @@ void Sc10Import::LoadObjects() lcl_ReadChartTypeData(rStream, *pTypeData); - Rectangle aRect( Point(nStartX,nStartY), Size(nSizeX,nSizeY) ); + tools::Rectangle aRect( Point(nStartX,nStartY), Size(nSizeX,nSizeY) ); Sc10InsertObject::InsertChart( pDoc, static_cast<SCTAB>(GraphHeader.CarretZ), aRect, static_cast<SCTAB>(GraphHeader.CarretZ), ChartSheetData.DataX1, ChartSheetData.DataY1, diff --git a/sc/source/filter/starcalc/scfobj.cxx b/sc/source/filter/starcalc/scfobj.cxx index 38f6a3054bd6..f05b52a16c3f 100644 --- a/sc/source/filter/starcalc/scfobj.cxx +++ b/sc/source/filter/starcalc/scfobj.cxx @@ -39,7 +39,7 @@ using namespace com::sun::star; #include "drwlayer.hxx" #include "chartarr.hxx" -void Sc10InsertObject::InsertChart( ScDocument* pDoc, SCTAB nDestTab, const Rectangle& rRect, +void Sc10InsertObject::InsertChart( ScDocument* pDoc, SCTAB nDestTab, const tools::Rectangle& rRect, SCTAB nSrcTab, sal_uInt16 nX1, sal_uInt16 nY1, sal_uInt16 nX2, sal_uInt16 nY2 ) { // if Chart is not installed, SCH_MOD cannot be used! diff --git a/sc/source/filter/xcl97/xcl97esc.cxx b/sc/source/filter/xcl97/xcl97esc.cxx index 4a1438f0052f..568e8ef6f4cd 100644 --- a/sc/source/filter/xcl97/xcl97esc.cxx +++ b/sc/source/filter/xcl97/xcl97esc.cxx @@ -184,7 +184,7 @@ bool lcl_IsFontwork( const SdrObject* pObj ) } // namespace -EscherExHostAppData* XclEscherEx::StartShape( const Reference< XShape >& rxShape, const Rectangle* pChildAnchor ) +EscherExHostAppData* XclEscherEx::StartShape( const Reference< XShape >& rxShape, const tools::Rectangle* pChildAnchor ) { if ( nAdditionalText ) nAdditionalText++; @@ -405,7 +405,7 @@ void XclEscherEx::EndDocument() mpOutStrm->Seek( 0 ); } -std::unique_ptr<XclExpOcxControlObj> XclEscherEx::CreateOCXCtrlObj( Reference< XShape > const & xShape, const Rectangle* pChildAnchor ) +std::unique_ptr<XclExpOcxControlObj> XclEscherEx::CreateOCXCtrlObj( Reference< XShape > const & xShape, const tools::Rectangle* pChildAnchor ) { ::std::unique_ptr< XclExpOcxControlObj > xOcxCtrl; @@ -435,7 +435,7 @@ std::unique_ptr<XclExpOcxControlObj> XclEscherEx::CreateOCXCtrlObj( Reference< X return xOcxCtrl; } -std::unique_ptr<XclExpTbxControlObj> XclEscherEx::CreateTBXCtrlObj( Reference< XShape > const & xShape, const Rectangle* pChildAnchor ) +std::unique_ptr<XclExpTbxControlObj> XclEscherEx::CreateTBXCtrlObj( Reference< XShape > const & xShape, const tools::Rectangle* pChildAnchor ) { ::std::unique_ptr< XclExpTbxControlObj > xTbxCtrl( new XclExpTbxControlObj( mrObjMgr, xShape, pChildAnchor ) ); if( xTbxCtrl->GetObjType() == EXC_OBJTYPE_UNKNOWN ) diff --git a/sc/source/filter/xcl97/xcl97rec.cxx b/sc/source/filter/xcl97/xcl97rec.cxx index db77e64f573f..541dd7fdcfeb 100644 --- a/sc/source/filter/xcl97/xcl97rec.cxx +++ b/sc/source/filter/xcl97/xcl97rec.cxx @@ -102,7 +102,7 @@ XclExpObjList::XclExpObjList( const XclExpRoot& rRoot, XclEscherEx& rEscherEx ) pMsodrawingPerSheet = new XclExpMsoDrawing( rEscherEx ); // open the DGCONTAINER and the patriarch group shape mrEscherEx.OpenContainer( ESCHER_DgContainer ); - Rectangle aRect( 0, 0, 0, 0 ); + tools::Rectangle aRect( 0, 0, 0, 0 ); mrEscherEx.EnterGroup( &aRect ); mrEscherEx.UpdateDffFragmentEnd(); } @@ -364,7 +364,7 @@ XclObj::~XclObj() delete pTxo; } -void XclObj::ImplWriteAnchor( const XclExpRoot& /*rRoot*/, const SdrObject* pSdrObj, const Rectangle* pChildAnchor ) +void XclObj::ImplWriteAnchor( const XclExpRoot& /*rRoot*/, const SdrObject* pSdrObj, const tools::Rectangle* pChildAnchor ) { if( pChildAnchor ) { @@ -493,7 +493,7 @@ void XclObj::SaveTextRecs( XclExpStream& rStrm ) // --- class XclObjComment ------------------------------------------ -XclObjComment::XclObjComment( XclExpObjectManager& rObjMgr, const Rectangle& rRect, const EditTextObject& rEditObj, SdrCaptionObj* pCaption, bool bVisible, const ScAddress& rAddress, Rectangle &rFrom, Rectangle &rTo ) : +XclObjComment::XclObjComment( XclExpObjectManager& rObjMgr, const tools::Rectangle& rRect, const EditTextObject& rEditObj, SdrCaptionObj* pCaption, bool bVisible, const ScAddress& rAddress, tools::Rectangle &rFrom, tools::Rectangle &rTo ) : XclObj( rObjMgr, EXC_OBJTYPE_NOTE, true ) , maScPos( rAddress ) , mpCaption( pCaption->Clone() ) @@ -555,7 +555,7 @@ static void lcl_FillProps( EscherPropertyContainer& rPropOpt, SdrObject* pCaptio rPropOpt.AddOpt( ESCHER_Prop_fPrint, nFlags ); // bool field } -void XclObjComment::ProcessEscherObj( const XclExpRoot& rRoot, const Rectangle& rRect, SdrObject* pCaption, const bool bVisible ) +void XclObjComment::ProcessEscherObj( const XclExpRoot& rRoot, const tools::Rectangle& rRect, SdrObject* pCaption, const bool bVisible ) { EscherPropertyContainer aPropOpt; @@ -594,13 +594,13 @@ class VmlCommentExporter : public VMLExport ScAddress maScPos; SdrCaptionObj* mpCaption; bool mbVisible; - Rectangle maFrom; - Rectangle maTo; + tools::Rectangle maFrom; + tools::Rectangle maTo; public: - VmlCommentExporter ( sax_fastparser::FSHelperPtr p, ScAddress aScPos, SdrCaptionObj* pCaption, bool bVisible, Rectangle &aFrom, Rectangle &aTo ); + VmlCommentExporter ( sax_fastparser::FSHelperPtr p, ScAddress aScPos, SdrCaptionObj* pCaption, bool bVisible, tools::Rectangle &aFrom, tools::Rectangle &aTo ); protected: - virtual void Commit( EscherPropertyContainer& rProps, const Rectangle& rRect ) override; + virtual void Commit( EscherPropertyContainer& rProps, const tools::Rectangle& rRect ) override; using VMLExport::StartShape; virtual sal_Int32 StartShape() override; using VMLExport::EndShape; @@ -608,7 +608,7 @@ protected: }; VmlCommentExporter::VmlCommentExporter( sax_fastparser::FSHelperPtr p, ScAddress aScPos, SdrCaptionObj* pCaption, - bool bVisible, Rectangle &aFrom, Rectangle &aTo ) + bool bVisible, tools::Rectangle &aFrom, tools::Rectangle &aTo ) : VMLExport( p ) , maScPos( aScPos ) , mpCaption( pCaption ) @@ -618,7 +618,7 @@ VmlCommentExporter::VmlCommentExporter( sax_fastparser::FSHelperPtr p, ScAddress { } -void VmlCommentExporter::Commit( EscherPropertyContainer& rProps, const Rectangle& rRect ) +void VmlCommentExporter::Commit( EscherPropertyContainer& rProps, const tools::Rectangle& rRect ) { lcl_FillProps( rProps, mpCaption, mbVisible ); rProps.AddOpt( ESCHER_Prop_fHidden, sal_uInt32(mbVisible) ); // bool field @@ -1015,9 +1015,9 @@ void XclObjAny::WriteFromTo( XclExpXmlStream& rStrm, const Reference< XShape >& awt::Point aTopLeft = rShape->getPosition(); awt::Size aSize = rShape->getSize(); - Rectangle aLocation( aTopLeft.X, aTopLeft.Y, aTopLeft.X + aSize.Width, aTopLeft.Y + aSize.Height ); + tools::Rectangle aLocation( aTopLeft.X, aTopLeft.Y, aTopLeft.X + aSize.Width, aTopLeft.Y + aSize.Height ); ScRange aRange = rStrm.GetRoot().GetDoc().GetRange( nTab, aLocation ); - Rectangle aRangeRect = rStrm.GetRoot().GetDoc().GetMMRect( aRange.aStart.Col(), aRange.aStart.Row(), + tools::Rectangle aRangeRect = rStrm.GetRoot().GetDoc().GetMMRect( aRange.aStart.Col(), aRange.aStart.Row(), aRange.aEnd.Col()-1, aRange.aEnd.Row()-1, nTab ); diff --git a/sc/source/filter/xml/xmlcelli.cxx b/sc/source/filter/xml/xmlcelli.cxx index d800c4bad8f1..a91995b1168b 100644 --- a/sc/source/filter/xml/xmlcelli.cxx +++ b/sc/source/filter/xml/xmlcelli.cxx @@ -881,7 +881,7 @@ void ScXMLTableRowCellContext::SetAnnotation(const ScAddress& rPos) ::std::unique_ptr< OutlinerParaObject > xOutlinerObj; if( OutlinerParaObject* pOutlinerObj = pObject->GetOutlinerParaObject() ) xOutlinerObj.reset( new OutlinerParaObject( *pOutlinerObj ) ); - Rectangle aCaptionRect; + tools::Rectangle aCaptionRect; if( mxAnnotationData->mbUseShapePos ) aCaptionRect = pObject->GetLogicRect(); // remove the shape from the drawing page, this invalidates pObject diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx index 56be7c58bf3f..6198cc4a037c 100644 --- a/sc/source/filter/xml/xmlexprt.cxx +++ b/sc/source/filter/xml/xmlexprt.cxx @@ -3502,7 +3502,7 @@ void ScXMLExport::WriteShapes(const ScMyCell& rMyCell) if( rMyCell.bHasShape && !rMyCell.aShapeList.empty() && pDoc ) { awt::Point aPoint; - Rectangle aRect = pDoc->GetMMRect(rMyCell.maCellAddress.Col(), rMyCell.maCellAddress.Row(), + tools::Rectangle aRect = pDoc->GetMMRect(rMyCell.maCellAddress.Col(), rMyCell.maCellAddress.Row(), rMyCell.maCellAddress.Col(), rMyCell.maCellAddress.Row(), rMyCell.maCellAddress.Tab()); bool bNegativePage = pDoc->IsNegativePage(rMyCell.maCellAddress.Tab()); if (bNegativePage) @@ -4835,7 +4835,7 @@ void ScXMLExport::GetViewSettings(uno::Sequence<beans::PropertyValue>& rProps) SfxObjectShell* pEmbeddedObj = pDocObj->GetEmbeddedObject(); if (pEmbeddedObj) { - Rectangle aRect(pEmbeddedObj->GetVisArea()); + tools::Rectangle aRect(pEmbeddedObj->GetVisArea()); sal_uInt16 i(0); pProps[i].Name = "VisibleAreaTop"; pProps[i].Value <<= static_cast<sal_Int32>(aRect.getY()); diff --git a/sc/source/filter/xml/xmlimprt.cxx b/sc/source/filter/xml/xmlimprt.cxx index 54b7ace010f4..a5ac5011d485 100644 --- a/sc/source/filter/xml/xmlimprt.cxx +++ b/sc/source/filter/xml/xmlimprt.cxx @@ -2646,7 +2646,7 @@ void ScXMLImport::SetViewSettings(const uno::Sequence<beans::PropertyValue>& aVi SfxObjectShell* pEmbeddedObj = pDocObj->GetEmbeddedObject(); if (pEmbeddedObj) { - Rectangle aRect; + tools::Rectangle aRect; aRect.setX( nLeft ); aRect.setY( nTop ); aRect.setWidth( nWidth ); diff --git a/sc/source/ui/Accessibility/AccessibleCell.cxx b/sc/source/ui/Accessibility/AccessibleCell.cxx index d566abfe8d19..dbb9a5f76cf7 100644 --- a/sc/source/ui/Accessibility/AccessibleCell.cxx +++ b/sc/source/ui/Accessibility/AccessibleCell.cxx @@ -150,15 +150,15 @@ void SAL_CALL ScAccessibleCell::grabFocus( ) } } -Rectangle ScAccessibleCell::GetBoundingBoxOnScreen() const +tools::Rectangle ScAccessibleCell::GetBoundingBoxOnScreen() const { - Rectangle aCellRect(GetBoundingBox()); + tools::Rectangle aCellRect(GetBoundingBox()); if (mpViewShell) { vcl::Window* pWindow = mpViewShell->GetWindowByPos(meSplitPos); if (pWindow) { - Rectangle aRect = pWindow->GetWindowExtentsRelative(nullptr); + tools::Rectangle aRect = pWindow->GetWindowExtentsRelative(nullptr); aCellRect.setX(aCellRect.getX() + aRect.getX()); aCellRect.setY(aCellRect.getY() + aRect.getY()); } @@ -166,9 +166,9 @@ Rectangle ScAccessibleCell::GetBoundingBoxOnScreen() const return aCellRect; } -Rectangle ScAccessibleCell::GetBoundingBox() const +tools::Rectangle ScAccessibleCell::GetBoundingBox() const { - Rectangle aCellRect; + tools::Rectangle aCellRect; if (mpViewShell) { long nSizeX, nSizeY; @@ -180,7 +180,7 @@ Rectangle ScAccessibleCell::GetBoundingBox() const vcl::Window* pWindow = mpViewShell->GetWindowByPos(meSplitPos); if (pWindow) { - Rectangle aRect(pWindow->GetWindowExtentsRelative(pWindow->GetAccessibleParentWindow())); + tools::Rectangle aRect(pWindow->GetWindowExtentsRelative(pWindow->GetAccessibleParentWindow())); aRect.Move(-aRect.Left(), -aRect.Top()); aCellRect = aRect.Intersection(aCellRect); } @@ -196,7 +196,7 @@ Rectangle ScAccessibleCell::GetBoundingBox() const mpDoc->GetAttr( maCellAddress.Col(), maCellAddress.Row(), maCellAddress.Tab(), ATTR_ROTATE_VALUE ) ); if( pItem && (pItem->GetValue() != 0) ) { - Rectangle aParaRect = GetParagraphBoundingBox(); + tools::Rectangle aParaRect = GetParagraphBoundingBox(); if( !aParaRect.IsEmpty() && (aCellRect.GetWidth() < aParaRect.GetWidth()) ) aCellRect.SetSize( Size( aParaRect.GetWidth(), aCellRect.GetHeight() ) ); } diff --git a/sc/source/ui/Accessibility/AccessibleContextBase.cxx b/sc/source/ui/Accessibility/AccessibleContextBase.cxx index 13b541f4e891..383ede495fef 100644 --- a/sc/source/ui/Accessibility/AccessibleContextBase.cxx +++ b/sc/source/ui/Accessibility/AccessibleContextBase.cxx @@ -146,7 +146,7 @@ sal_Bool SAL_CALL ScAccessibleContextBase::containsPoint(const awt::Point& rPoin { SolarMutexGuard aGuard; IsObjectValid(); - return Rectangle (Point(), GetBoundingBox().GetSize()).IsInside(VCLPoint(rPoint)); + return tools::Rectangle (Point(), GetBoundingBox().GetSize()).IsInside(VCLPoint(rPoint)); } uno::Reference< XAccessible > SAL_CALL ScAccessibleContextBase::getAccessibleAtPoint( @@ -194,8 +194,8 @@ bool SAL_CALL ScAccessibleContextBase::isShowing( ) uno::Reference<XAccessibleComponent> xParentComponent (mxParent->getAccessibleContext(), uno::UNO_QUERY); if (xParentComponent.is()) { - Rectangle aParentBounds(VCLRectangle(xParentComponent->getBounds())); - Rectangle aBounds(VCLRectangle(getBounds())); + tools::Rectangle aParentBounds(VCLRectangle(xParentComponent->getBounds())); + tools::Rectangle aBounds(VCLRectangle(getBounds())); bShowing = aBounds.IsOver(aParentBounds); } } @@ -496,16 +496,16 @@ void ScAccessibleContextBase::CommitFocusLost() const vcl::unohelper::NotifyAccessibleStateEventGlobally(aEvent); } -Rectangle ScAccessibleContextBase::GetBoundingBoxOnScreen() const +tools::Rectangle ScAccessibleContextBase::GetBoundingBoxOnScreen() const { OSL_FAIL("not implemented"); - return Rectangle(); + return tools::Rectangle(); } -Rectangle ScAccessibleContextBase::GetBoundingBox() const +tools::Rectangle ScAccessibleContextBase::GetBoundingBox() const { OSL_FAIL("not implemented"); - return Rectangle(); + return tools::Rectangle(); } void ScAccessibleContextBase::IsObjectValid() const diff --git a/sc/source/ui/Accessibility/AccessibleCsvControl.cxx b/sc/source/ui/Accessibility/AccessibleCsvControl.cxx index ccc46e40b673..463f55e3c2f8 100644 --- a/sc/source/ui/Accessibility/AccessibleCsvControl.cxx +++ b/sc/source/ui/Accessibility/AccessibleCsvControl.cxx @@ -171,14 +171,14 @@ void ScAccessibleCsvControl::SendRemoveColumnEvent( sal_uInt32 /* nFirstColumn * // helpers -------------------------------------------------------------------- -Rectangle ScAccessibleCsvControl::GetBoundingBoxOnScreen() const +tools::Rectangle ScAccessibleCsvControl::GetBoundingBoxOnScreen() const { SolarMutexGuard aGuard; ensureAlive(); return implGetControl().GetWindowExtentsRelative( nullptr ); } -Rectangle ScAccessibleCsvControl::GetBoundingBox() const +tools::Rectangle ScAccessibleCsvControl::GetBoundingBox() const { SolarMutexGuard aGuard; ensureAlive(); @@ -1466,16 +1466,16 @@ OUString SAL_CALL ScAccessibleCsvCell::getImplementationName() // helpers -------------------------------------------------------------------- -Rectangle ScAccessibleCsvCell::GetBoundingBoxOnScreen() const +tools::Rectangle ScAccessibleCsvCell::GetBoundingBoxOnScreen() const { SolarMutexGuard aGuard; ensureAlive(); - Rectangle aRect( implGetBoundingBox() ); + tools::Rectangle aRect( implGetBoundingBox() ); aRect.SetPos( implGetAbsPos( aRect.TopLeft() ) ); return aRect; } -Rectangle ScAccessibleCsvCell::GetBoundingBox() const +tools::Rectangle ScAccessibleCsvCell::GetBoundingBox() const { SolarMutexGuard aGuard; ensureAlive(); @@ -1519,10 +1519,10 @@ Size ScAccessibleCsvCell::implGetRealSize() const (mnLine == CSV_LINE_HEADER) ? rGrid.GetHdrHeight() : rGrid.GetLineHeight() ); } -Rectangle ScAccessibleCsvCell::implGetBoundingBox() const +tools::Rectangle ScAccessibleCsvCell::implGetBoundingBox() const { ScCsvGrid& rGrid = implGetGrid(); - Rectangle aClipRect( Point( 0, 0 ), rGrid.GetSizePixel() ); + tools::Rectangle aClipRect( Point( 0, 0 ), rGrid.GetSizePixel() ); if( mnColumn != CSV_COLUMN_HEADER ) { aClipRect.Left() = rGrid.GetFirstX(); @@ -1531,7 +1531,7 @@ Rectangle ScAccessibleCsvCell::implGetBoundingBox() const if( mnLine != CSV_LINE_HEADER ) aClipRect.Top() = rGrid.GetHdrHeight(); - Rectangle aRect( implGetRealPos(), implGetRealSize() ); + tools::Rectangle aRect( implGetRealPos(), implGetRealSize() ); aRect.Intersection( aClipRect ); if( (aRect.GetWidth() <= 0) || (aRect.GetHeight() <= 0) ) aRect.SetSize( Size( -1, -1 ) ); @@ -1541,7 +1541,7 @@ Rectangle ScAccessibleCsvCell::implGetBoundingBox() const ::std::unique_ptr< SvxEditSource > ScAccessibleCsvCell::implCreateEditSource() { ScCsvGrid& rGrid = implGetGrid(); - Rectangle aBoundRect( implGetBoundingBox() ); + tools::Rectangle aBoundRect( implGetBoundingBox() ); aBoundRect -= implGetRealPos(); ::std::unique_ptr< SvxEditSource > pEditSource( new ScAccessibilityEditSource( o3tl::make_unique<ScAccessibleCsvTextData>(&rGrid, rGrid.GetEditEngine(), maCellText, aBoundRect, implGetRealSize()) ) ); diff --git a/sc/source/ui/Accessibility/AccessibleDocument.cxx b/sc/source/ui/Accessibility/AccessibleDocument.cxx index be2bdb1789e8..f85637dcedcd 100644 --- a/sc/source/ui/Accessibility/AccessibleDocument.cxx +++ b/sc/source/ui/Accessibility/AccessibleDocument.cxx @@ -1613,7 +1613,7 @@ void ScAccessibleDocument::Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) } else if ((rHint.GetId() == SfxHintId::ScAccVisAreaChanged) || (rHint.GetId() == SfxHintId::ScAccWindowResized)) { - Rectangle aOldVisArea(maVisArea); + tools::Rectangle aOldVisArea(maVisArea); maVisArea = GetVisibleArea_Impl(); if (maVisArea != aOldVisArea) @@ -1718,7 +1718,7 @@ uno::Reference< XAccessible > SAL_CALL ScAccessibleDocument::getAccessibleAtPoin uno::Reference< XAccessibleComponent > xComp(xCont, uno::UNO_QUERY); if (xComp.is()) { - Rectangle aBound(VCLRectangle(xComp->getBounds())); + tools::Rectangle aBound(VCLRectangle(xComp->getBounds())); if (aBound.IsInside(VCLPoint(rPoint))) xAccessible = mxTempAcc; } @@ -2063,9 +2063,9 @@ uno::Sequence<sal_Int8> SAL_CALL ///===== IAccessibleViewForwarder ======================================== -Rectangle ScAccessibleDocument::GetVisibleArea_Impl() const +tools::Rectangle ScAccessibleDocument::GetVisibleArea_Impl() const { - Rectangle aVisRect(GetBoundingBox()); + tools::Rectangle aVisRect(GetBoundingBox()); if (mpViewShell) { @@ -2082,7 +2082,7 @@ Rectangle ScAccessibleDocument::GetVisibleArea_Impl() const return aVisRect; } -Rectangle ScAccessibleDocument::GetVisibleArea() const +tools::Rectangle ScAccessibleDocument::GetVisibleArea() const { SolarMutexGuard aGuard; IsObjectValid(); @@ -2142,9 +2142,9 @@ OUString SAL_CALL return sName; } -Rectangle ScAccessibleDocument::GetBoundingBoxOnScreen() const +tools::Rectangle ScAccessibleDocument::GetBoundingBoxOnScreen() const { - Rectangle aRect; + tools::Rectangle aRect; if (mpViewShell) { vcl::Window* pWindow = mpViewShell->GetWindowByPos(meSplitPos); @@ -2154,9 +2154,9 @@ Rectangle ScAccessibleDocument::GetBoundingBoxOnScreen() const return aRect; } -Rectangle ScAccessibleDocument::GetBoundingBox() const +tools::Rectangle ScAccessibleDocument::GetBoundingBox() const { - Rectangle aRect; + tools::Rectangle aRect; if (mpViewShell) { vcl::Window* pWindow = mpViewShell->GetWindowByPos(meSplitPos); diff --git a/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx b/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx index 18e19a7e557c..65a702fc4902 100644 --- a/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx +++ b/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx @@ -69,7 +69,7 @@ typedef std::list< uno::Reference< XAccessible > > ScXAccList; struct ScAccNote { OUString maNoteText; - Rectangle maRect; + tools::Rectangle maRect; ScAddress maNoteCell; ::accessibility::AccessibleTextHelper* mpTextHelper; sal_Int32 mnParaCount; @@ -88,13 +88,13 @@ class ScNotesChildren public: ScNotesChildren(ScPreviewShell* pViewShell, ScAccessibleDocumentPagePreview* pAccDoc); ~ScNotesChildren(); - void Init(const Rectangle& rVisRect, sal_Int32 nOffset); + void Init(const tools::Rectangle& rVisRect, sal_Int32 nOffset); sal_Int32 GetChildrenCount() const { return mnParagraphs;} uno::Reference<XAccessible> GetChild(sal_Int32 nIndex) const; uno::Reference<XAccessible> GetAt(const awt::Point& rPoint) const; - void DataChanged(const Rectangle& rVisRect); + void DataChanged(const tools::Rectangle& rVisRect); private: ScPreviewShell* mpViewShell; @@ -105,12 +105,12 @@ private: sal_Int32 mnParagraphs; sal_Int32 mnOffset; - ::accessibility::AccessibleTextHelper* CreateTextHelper(const OUString& rString, const Rectangle& rVisRect, const ScAddress& aCellPos, bool bMarkNote, sal_Int32 nChildOffset) const; - sal_Int32 AddNotes(const ScPreviewLocationData& rData, const Rectangle& rVisRect, bool bMark, ScAccNotes& rNotes); + ::accessibility::AccessibleTextHelper* CreateTextHelper(const OUString& rString, const tools::Rectangle& rVisRect, const ScAddress& aCellPos, bool bMarkNote, sal_Int32 nChildOffset) const; + sal_Int32 AddNotes(const ScPreviewLocationData& rData, const tools::Rectangle& rVisRect, bool bMark, ScAccNotes& rNotes); static sal_Int8 CompareCell(const ScAddress& aCell1, const ScAddress& aCell2); static void CollectChildren(const ScAccNote& rNote, ScXAccList& rList); - sal_Int32 CheckChanges(const ScPreviewLocationData& rData, const Rectangle& rVisRect, + sal_Int32 CheckChanges(const ScPreviewLocationData& rData, const tools::Rectangle& rVisRect, bool bMark, ScAccNotes& rOldNotes, ScAccNotes& rNewNotes, ScXAccList& rOldParas, ScXAccList& rNewParas); @@ -140,7 +140,7 @@ ScNotesChildren::~ScNotesChildren() std::for_each(maMarks.begin(), maMarks.end(), DeleteAccNote()); } -::accessibility::AccessibleTextHelper* ScNotesChildren::CreateTextHelper(const OUString& rString, const Rectangle& rVisRect, const ScAddress& aCellPos, bool bMarkNote, sal_Int32 nChildOffset) const +::accessibility::AccessibleTextHelper* ScNotesChildren::CreateTextHelper(const OUString& rString, const tools::Rectangle& rVisRect, const ScAddress& aCellPos, bool bMarkNote, sal_Int32 nChildOffset) const { ::accessibility::AccessibleTextHelper* pTextHelper = new ::accessibility::AccessibleTextHelper(o3tl::make_unique<ScAccessibilityEditSource>(o3tl::make_unique<ScAccessibleNoteTextData>(mpViewShell, rString, aCellPos, bMarkNote))); pTextHelper->SetEventSource(mpAccDoc); @@ -150,7 +150,7 @@ ScNotesChildren::~ScNotesChildren() return pTextHelper; } -sal_Int32 ScNotesChildren::AddNotes(const ScPreviewLocationData& rData, const Rectangle& rVisRect, bool bMark, ScAccNotes& rNotes) +sal_Int32 ScNotesChildren::AddNotes(const ScPreviewLocationData& rData, const tools::Rectangle& rVisRect, bool bMark, ScAccNotes& rNotes) { sal_Int32 nCount = rData.GetNoteCountInRange(rVisRect, bMark); @@ -189,7 +189,7 @@ sal_Int32 ScNotesChildren::AddNotes(const ScPreviewLocationData& rData, const Re return nParagraphs; } -void ScNotesChildren::Init(const Rectangle& rVisRect, sal_Int32 nOffset) +void ScNotesChildren::Init(const tools::Rectangle& rVisRect, sal_Int32 nOffset) { if (mpViewShell && !mnParagraphs) { @@ -259,7 +259,7 @@ uno::Reference<XAccessible> ScNotesChildren::GetChild(sal_Int32 nIndex) const struct ScPointFound { - Rectangle maPoint; + tools::Rectangle maPoint; sal_Int32 mnParagraphs; explicit ScPointFound(const Point& rPoint) : maPoint(rPoint, Size(0, 0)), mnParagraphs(0) {} bool operator() (const ScAccNote& rNote) @@ -318,7 +318,7 @@ void ScNotesChildren::CollectChildren(const ScAccNote& rNote, ScXAccList& rList) } sal_Int32 ScNotesChildren::CheckChanges(const ScPreviewLocationData& rData, - const Rectangle& rVisRect, bool bMark, ScAccNotes& rOldNotes, + const tools::Rectangle& rVisRect, bool bMark, ScAccNotes& rOldNotes, ScAccNotes& rNewNotes, ScXAccList& rOldParas, ScXAccList& rNewParas) { sal_Int32 nCount = rData.GetNoteCountInRange(rVisRect, bMark); @@ -451,7 +451,7 @@ struct ScChildNew } }; -void ScNotesChildren::DataChanged(const Rectangle& rVisRect) +void ScNotesChildren::DataChanged(const tools::Rectangle& rVisRect) { if (mpViewShell && mpAccDoc) { @@ -487,7 +487,7 @@ public: ///===== IAccessibleViewForwarder ======================================== - virtual Rectangle GetVisibleArea() const override; + virtual tools::Rectangle GetVisibleArea() const override; virtual Point LogicToPixel (const Point& rPoint) const override; virtual Size LogicToPixel (const Size& rSize) const override; @@ -513,10 +513,10 @@ ScIAccessibleViewForwarder::ScIAccessibleViewForwarder(ScPreviewShell* pViewShel ///===== IAccessibleViewForwarder ======================================== -Rectangle ScIAccessibleViewForwarder::GetVisibleArea() const +tools::Rectangle ScIAccessibleViewForwarder::GetVisibleArea() const { SolarMutexGuard aGuard; - Rectangle aVisRect; + tools::Rectangle aVisRect; vcl::Window* pWin = mpViewShell->GetWindow(); if (pWin) { @@ -536,7 +536,7 @@ Point ScIAccessibleViewForwarder::LogicToPixel (const Point& rPoint) const vcl::Window* pWin = mpViewShell->GetWindow(); if (pWin && mpAccDoc) { - Rectangle aRect(mpAccDoc->GetBoundingBoxOnScreen()); + tools::Rectangle aRect(mpAccDoc->GetBoundingBoxOnScreen()); aPoint = pWin->LogicToPixel(rPoint, maMapMode) + aRect.TopLeft(); } @@ -599,7 +599,7 @@ struct ScShapeRange ScShapeChildVec maBackShapes; ScShapeChildVec maForeShapes; // inclusive internal shapes ScShapeChildVec maControls; - Rectangle maPixelRect; + tools::Rectangle maPixelRect; MapMode maMapMode; ScIAccessibleViewForwarder maViewForwarder; }; @@ -652,7 +652,7 @@ private: void FindChanged(ScShapeRange& aOld, ScShapeRange& aNew) const; ::accessibility::AccessibleShape* GetAccShape(const ScShapeChild& rShape) const; ::accessibility::AccessibleShape* GetAccShape(const ScShapeChildVec& rShapes, sal_Int32 nIndex) const; - void FillShapes(const Rectangle& aPixelPaintRect, const MapMode& aMapMode, sal_uInt8 nRangeId); + void FillShapes(const tools::Rectangle& aPixelPaintRect, const MapMode& aMapMode, sal_uInt8 nRangeId); // void AddShape(const uno::Reference<drawing::XShape>& xShape, SdrLayerID aLayerID); // void RemoveShape(const uno::Reference<drawing::XShape>& xShape, SdrLayerID aLayerID); @@ -839,7 +839,7 @@ void ScShapeChildren::Init() { const ScPreviewLocationData& rData = mpViewShell->GetLocationData(); MapMode aMapMode; - Rectangle aPixelPaintRect; + tools::Rectangle aPixelPaintRect; sal_uInt8 nRangeId; sal_uInt16 nCount(rData.GetDrawRanges()); for (sal_uInt16 i = 0; i < nCount; ++i) @@ -1024,7 +1024,7 @@ uno::Reference<XAccessible> ScShapeChildren::GetBackgroundShapeAt(const awt::Poi return (GetAccShape(rShapes[nIndex])); } -void ScShapeChildren::FillShapes(const Rectangle& aPixelPaintRect, const MapMode& aMapMode, sal_uInt8 nRangeId) +void ScShapeChildren::FillShapes(const tools::Rectangle& aPixelPaintRect, const MapMode& aMapMode, sal_uInt8 nRangeId) { OSL_ENSURE(nRangeId < maShapeRanges.size(), "this is not a valid range for draw objects"); SdrPage* pPage = GetDrawPage(); @@ -1034,10 +1034,10 @@ void ScShapeChildren::FillShapes(const Rectangle& aPixelPaintRect, const MapMode bool bForeAdded(false); bool bBackAdded(false); bool bControlAdded(false); - Rectangle aClippedPixelPaintRect(aPixelPaintRect); + tools::Rectangle aClippedPixelPaintRect(aPixelPaintRect); if (mpAccDoc) { - Rectangle aRect2(Point(0,0), mpAccDoc->GetBoundingBoxOnScreen().GetSize()); + tools::Rectangle aRect2(Point(0,0), mpAccDoc->GetBoundingBoxOnScreen().GetSize()); aClippedPixelPaintRect = aPixelPaintRect.GetIntersection(aRect2); } maShapeRanges[nRangeId].maPixelRect = aClippedPixelPaintRect; @@ -1053,7 +1053,7 @@ void ScShapeChildren::FillShapes(const Rectangle& aPixelPaintRect, const MapMode uno::Reference< drawing::XShape > xShape(pObj->getUnoShape(), uno::UNO_QUERY); if (xShape.is()) { - Rectangle aRect(pWin->LogicToPixel(VCLPoint(xShape->getPosition()), aMapMode), pWin->LogicToPixel(VCLSize(xShape->getSize()), aMapMode)); + tools::Rectangle aRect(pWin->LogicToPixel(VCLPoint(xShape->getPosition()), aMapMode), pWin->LogicToPixel(VCLSize(xShape->getSize()), aMapMode)); if(!aClippedPixelPaintRect.GetIntersection(aRect).IsEmpty()) { ScShapeChild aShape; @@ -1117,7 +1117,7 @@ struct ScPagePreviewCountData { // order is background shapes, header, table or notes, footer, foreground shapes, controls - Rectangle aVisRect; + tools::Rectangle aVisRect; long nBackShapes; long nHeaders; long nTables; @@ -1150,9 +1150,9 @@ ScPagePreviewCountData::ScPagePreviewCountData( const ScPreviewLocationData& rDa if ( pSizeWindow ) aOutputSize = pSizeWindow->GetOutputSizePixel(); Point aPoint; - aVisRect = Rectangle( aPoint, aOutputSize ); + aVisRect = tools::Rectangle( aPoint, aOutputSize ); - Rectangle aObjRect; + tools::Rectangle aObjRect; if ( rData.GetHeaderPosition( aObjRect ) && aObjRect.IsOver( aVisRect ) ) nHeaders = 1; @@ -1259,7 +1259,7 @@ void ScAccessibleDocumentPagePreview::Notify( SfxBroadcaster& rBC, const SfxHint if ( pSizeWindow ) aOutputSize = pSizeWindow->GetOutputSizePixel(); Point aPoint; - Rectangle aVisRect( aPoint, aOutputSize ); + tools::Rectangle aVisRect( aPoint, aOutputSize ); GetNotesChildren()->DataChanged(aVisRect); GetShapeChildren()->DataChanged(); @@ -1296,7 +1296,7 @@ void ScAccessibleDocumentPagePreview::Notify( SfxBroadcaster& rBC, const SfxHint if ( pSizeWindow ) aOutputSize = pSizeWindow->GetOutputSizePixel(); Point aPoint; - Rectangle aVisRect( aPoint, aOutputSize ); + tools::Rectangle aVisRect( aPoint, aOutputSize ); GetNotesChildren()->DataChanged(aVisRect); GetShapeChildren()->VisAreaChanged(); @@ -1532,9 +1532,9 @@ OUString SAL_CALL ScAccessibleDocumentPagePreview::createAccessibleName() return sName; } -Rectangle ScAccessibleDocumentPagePreview::GetBoundingBoxOnScreen() const +tools::Rectangle ScAccessibleDocumentPagePreview::GetBoundingBoxOnScreen() const { - Rectangle aRect; + tools::Rectangle aRect; if (mpViewShell) { vcl::Window* pWindow = mpViewShell->GetWindow(); @@ -1544,9 +1544,9 @@ Rectangle ScAccessibleDocumentPagePreview::GetBoundingBoxOnScreen() const return aRect; } -Rectangle ScAccessibleDocumentPagePreview::GetBoundingBox() const +tools::Rectangle ScAccessibleDocumentPagePreview::GetBoundingBox() const { - Rectangle aRect; + tools::Rectangle aRect; if (mpViewShell) { vcl::Window* pWindow = mpViewShell->GetWindow(); diff --git a/sc/source/ui/Accessibility/AccessibleEditObject.cxx b/sc/source/ui/Accessibility/AccessibleEditObject.cxx index 6393c872f253..1a84a230e14a 100644 --- a/sc/source/ui/Accessibility/AccessibleEditObject.cxx +++ b/sc/source/ui/Accessibility/AccessibleEditObject.cxx @@ -167,9 +167,9 @@ uno::Reference< XAccessible > SAL_CALL ScAccessibleEditObject::getAccessibleAtPo return xRet; } -Rectangle ScAccessibleEditObject::GetBoundingBoxOnScreen() const +tools::Rectangle ScAccessibleEditObject::GetBoundingBoxOnScreen() const { - Rectangle aScreenBounds; + tools::Rectangle aScreenBounds; if ( mpWindow ) { @@ -180,7 +180,7 @@ Rectangle ScAccessibleEditObject::GetBoundingBoxOnScreen() const MapMode aMapMode( mpEditView->GetEditEngine()->GetRefMapMode() ); aScreenBounds = mpWindow->LogicToPixel( mpEditView->GetOutputArea(), aMapMode ); Point aCellLoc = aScreenBounds.TopLeft(); - Rectangle aWindowRect = mpWindow->GetWindowExtentsRelative( nullptr ); + tools::Rectangle aWindowRect = mpWindow->GetWindowExtentsRelative( nullptr ); Point aWindowLoc = aWindowRect.TopLeft(); Point aPos( aCellLoc.getX() + aWindowLoc.getX(), aCellLoc.getY() + aWindowLoc.getY() ); aScreenBounds.SetPos( aPos ); @@ -195,9 +195,9 @@ Rectangle ScAccessibleEditObject::GetBoundingBoxOnScreen() const return aScreenBounds; } -Rectangle ScAccessibleEditObject::GetBoundingBox() const +tools::Rectangle ScAccessibleEditObject::GetBoundingBox() const { - Rectangle aBounds( GetBoundingBoxOnScreen() ); + tools::Rectangle aBounds( GetBoundingBoxOnScreen() ); if ( mpWindow ) { diff --git a/sc/source/ui/Accessibility/AccessibleFilterMenu.cxx b/sc/source/ui/Accessibility/AccessibleFilterMenu.cxx index ca38874eb626..76c96eb554e4 100644 --- a/sc/source/ui/Accessibility/AccessibleFilterMenu.cxx +++ b/sc/source/ui/Accessibility/AccessibleFilterMenu.cxx @@ -236,46 +236,46 @@ Sequence<sal_Int8> ScAccessibleFilterMenu::getImplementationId() return css::uno::Sequence<sal_Int8>(); } -Rectangle ScAccessibleFilterMenu::GetBoundingBoxOnScreen() const +tools::Rectangle ScAccessibleFilterMenu::GetBoundingBoxOnScreen() const { if (mnMenuPos == ScMenuFloatingWindow::MENU_NOT_SELECTED) - return Rectangle(); + return tools::Rectangle(); // Menu object's bounding box is the bounding box of the menu item that // launches the menu, which belongs to the parent window. ScMenuFloatingWindow* pParentWin = mpWindow->getParentMenuWindow(); if (!pParentWin) - return Rectangle(); + return tools::Rectangle(); if (!pParentWin->IsVisible()) - return Rectangle(); + return tools::Rectangle(); Point aPos = pParentWin->OutputToAbsoluteScreenPixel(Point(0,0)); Point aMenuPos; Size aMenuSize; pParentWin->getMenuItemPosSize(mnMenuPos, aMenuPos, aMenuSize); - Rectangle aRect(aPos + aMenuPos, aMenuSize); + tools::Rectangle aRect(aPos + aMenuPos, aMenuSize); return aRect; } -Rectangle ScAccessibleFilterMenu::GetBoundingBox() const +tools::Rectangle ScAccessibleFilterMenu::GetBoundingBox() const { if (mnMenuPos == ScMenuFloatingWindow::MENU_NOT_SELECTED) - return Rectangle(); + return tools::Rectangle(); // Menu object's bounding box is the bounding box of the menu item that // launches the menu, which belongs to the parent window. ScMenuFloatingWindow* pParentWin = mpWindow->getParentMenuWindow(); if (!pParentWin) - return Rectangle(); + return tools::Rectangle(); if (!pParentWin->IsVisible()) - return Rectangle(); + return tools::Rectangle(); Point aMenuPos; Size aMenuSize; pParentWin->getMenuItemPosSize(mnMenuPos, aMenuPos, aMenuSize); - Rectangle aRect(aMenuPos, aMenuSize); + tools::Rectangle aRect(aMenuPos, aMenuSize); return aRect; } diff --git a/sc/source/ui/Accessibility/AccessibleFilterMenuItem.cxx b/sc/source/ui/Accessibility/AccessibleFilterMenuItem.cxx index 1b2174ecbdcb..2712649ab159 100644 --- a/sc/source/ui/Accessibility/AccessibleFilterMenuItem.cxx +++ b/sc/source/ui/Accessibility/AccessibleFilterMenuItem.cxx @@ -126,28 +126,28 @@ void ScAccessibleFilterMenuItem::setEnabled(bool bEnabled) mbEnabled = bEnabled; } -Rectangle ScAccessibleFilterMenuItem::GetBoundingBoxOnScreen() const +tools::Rectangle ScAccessibleFilterMenuItem::GetBoundingBoxOnScreen() const { if (!mpWindow->IsVisible()) - return Rectangle(); + return tools::Rectangle(); Point aPos = mpWindow->OutputToAbsoluteScreenPixel(Point(0,0)); Point aMenuPos; Size aMenuSize; mpWindow->getMenuItemPosSize(mnMenuPos, aMenuPos, aMenuSize); - Rectangle aRect(aPos + aMenuPos, aMenuSize); + tools::Rectangle aRect(aPos + aMenuPos, aMenuSize); return aRect; } -Rectangle ScAccessibleFilterMenuItem::GetBoundingBox() const +tools::Rectangle ScAccessibleFilterMenuItem::GetBoundingBox() const { if (!mpWindow->IsVisible()) - return Rectangle(); + return tools::Rectangle(); Point aMenuPos; Size aMenuSize; mpWindow->getMenuItemPosSize(mnMenuPos, aMenuPos, aMenuSize); - Rectangle aRect(aMenuPos, aMenuSize); + tools::Rectangle aRect(aMenuPos, aMenuSize); return aRect; } diff --git a/sc/source/ui/Accessibility/AccessiblePageHeader.cxx b/sc/source/ui/Accessibility/AccessiblePageHeader.cxx index aa7015cbbc36..9eee1276c5ac 100644 --- a/sc/source/ui/Accessibility/AccessiblePageHeader.cxx +++ b/sc/source/ui/Accessibility/AccessiblePageHeader.cxx @@ -307,15 +307,15 @@ OUString SAL_CALL ScAccessiblePageHeader::createAccessibleName() return sName.replaceFirst("%1", SC_RESSTR(SCSTR_UNKNOWN)); } -Rectangle ScAccessiblePageHeader::GetBoundingBoxOnScreen() const +tools::Rectangle ScAccessiblePageHeader::GetBoundingBoxOnScreen() const { - Rectangle aCellRect(GetBoundingBox()); + tools::Rectangle aCellRect(GetBoundingBox()); if (mpViewShell) { vcl::Window* pWindow = mpViewShell->GetWindow(); if (pWindow) { - Rectangle aRect = pWindow->GetWindowExtentsRelative(nullptr); + tools::Rectangle aRect = pWindow->GetWindowExtentsRelative(nullptr); aCellRect.setX(aCellRect.getX() + aRect.getX()); aCellRect.setY(aCellRect.getY() + aRect.getY()); } @@ -323,9 +323,9 @@ Rectangle ScAccessiblePageHeader::GetBoundingBoxOnScreen() const return aCellRect; } -Rectangle ScAccessiblePageHeader::GetBoundingBox() const +tools::Rectangle ScAccessiblePageHeader::GetBoundingBox() const { - Rectangle aRect; + tools::Rectangle aRect; if (mpViewShell) { const ScPreviewLocationData& rData = mpViewShell->GetLocationData(); @@ -335,7 +335,7 @@ Rectangle ScAccessiblePageHeader::GetBoundingBox() const rData.GetFooterPosition( aRect ); // the Rectangle could contain negative coordinates so it should be clipped - Rectangle aClipRect(Point(0, 0), aRect.GetSize()); + tools::Rectangle aClipRect(Point(0, 0), aRect.GetSize()); vcl::Window* pWindow = mpViewShell->GetWindow(); if (pWindow) aClipRect = pWindow->GetWindowExtentsRelative(pWindow->GetAccessibleParentWindow()); diff --git a/sc/source/ui/Accessibility/AccessiblePageHeaderArea.cxx b/sc/source/ui/Accessibility/AccessiblePageHeaderArea.cxx index 26715505cf37..cbfdc5a57f09 100644 --- a/sc/source/ui/Accessibility/AccessiblePageHeaderArea.cxx +++ b/sc/source/ui/Accessibility/AccessiblePageHeaderArea.cxx @@ -243,9 +243,9 @@ OUString SAL_CALL ScAccessiblePageHeaderArea::createAccessibleName() return sName; } -Rectangle ScAccessiblePageHeaderArea::GetBoundingBoxOnScreen() const +tools::Rectangle ScAccessiblePageHeaderArea::GetBoundingBoxOnScreen() const { - Rectangle aRect; + tools::Rectangle aRect; if (mxParent.is()) { uno::Reference<XAccessibleContext> xContext = mxParent->getAccessibleContext(); @@ -253,15 +253,15 @@ Rectangle ScAccessiblePageHeaderArea::GetBoundingBoxOnScreen() const if (xComp.is()) { // has the same size and position on screen like the parent - aRect = Rectangle(VCLPoint(xComp->getLocationOnScreen()), VCLRectangle(xComp->getBounds()).GetSize()); + aRect = tools::Rectangle(VCLPoint(xComp->getLocationOnScreen()), VCLRectangle(xComp->getBounds()).GetSize()); } } return aRect; } -Rectangle ScAccessiblePageHeaderArea::GetBoundingBox() const +tools::Rectangle ScAccessiblePageHeaderArea::GetBoundingBox() const { - Rectangle aRect; + tools::Rectangle aRect; if (mxParent.is()) { uno::Reference<XAccessibleContext> xContext = mxParent->getAccessibleContext(); @@ -269,7 +269,7 @@ Rectangle ScAccessiblePageHeaderArea::GetBoundingBox() const if (xComp.is()) { // has the same size and position on screen like the parent and so the pos is (0, 0) - Rectangle aNewRect(Point(0, 0), VCLRectangle(xComp->getBounds()).GetSize()); + tools::Rectangle aNewRect(Point(0, 0), VCLRectangle(xComp->getBounds()).GetSize()); aRect = aNewRect; } } diff --git a/sc/source/ui/Accessibility/AccessiblePreviewCell.cxx b/sc/source/ui/Accessibility/AccessiblePreviewCell.cxx index a931018fd28f..8ca2ff72865b 100644 --- a/sc/source/ui/Accessibility/AccessiblePreviewCell.cxx +++ b/sc/source/ui/Accessibility/AccessiblePreviewCell.cxx @@ -201,16 +201,16 @@ uno::Sequence<sal_Int8> SAL_CALL //==== internal ========================================================= -Rectangle ScAccessiblePreviewCell::GetBoundingBoxOnScreen() const +tools::Rectangle ScAccessiblePreviewCell::GetBoundingBoxOnScreen() const { - Rectangle aCellRect; + tools::Rectangle aCellRect; if (mpViewShell) { mpViewShell->GetLocationData().GetCellPosition( maCellAddress, aCellRect ); vcl::Window* pWindow = mpViewShell->GetWindow(); if (pWindow) { - Rectangle aRect = pWindow->GetWindowExtentsRelative(nullptr); + tools::Rectangle aRect = pWindow->GetWindowExtentsRelative(nullptr); aCellRect.setX(aCellRect.getX() + aRect.getX()); aCellRect.setY(aCellRect.getY() + aRect.getY()); } @@ -218,9 +218,9 @@ Rectangle ScAccessiblePreviewCell::GetBoundingBoxOnScreen() const return aCellRect; } -Rectangle ScAccessiblePreviewCell::GetBoundingBox() const +tools::Rectangle ScAccessiblePreviewCell::GetBoundingBox() const { - Rectangle aCellRect; + tools::Rectangle aCellRect; if (mpViewShell) { mpViewShell->GetLocationData().GetCellPosition( maCellAddress, aCellRect ); @@ -231,7 +231,7 @@ Rectangle ScAccessiblePreviewCell::GetBoundingBox() const uno::Reference<XAccessibleComponent> xAccParentComp (xAccParentContext, uno::UNO_QUERY); if (xAccParentComp.is()) { - Rectangle aParentRect (VCLRectangle(xAccParentComp->getBounds())); + tools::Rectangle aParentRect (VCLRectangle(xAccParentComp->getBounds())); aCellRect.setX(aCellRect.getX() - aParentRect.getX()); aCellRect.setY(aCellRect.getY() - aParentRect.getY()); } diff --git a/sc/source/ui/Accessibility/AccessiblePreviewHeaderCell.cxx b/sc/source/ui/Accessibility/AccessiblePreviewHeaderCell.cxx index 2f83e3f60535..cb71f3d3c534 100644 --- a/sc/source/ui/Accessibility/AccessiblePreviewHeaderCell.cxx +++ b/sc/source/ui/Accessibility/AccessiblePreviewHeaderCell.cxx @@ -308,9 +308,9 @@ uno::Sequence<sal_Int8> SAL_CALL //==== internal ========================================================= -Rectangle ScAccessiblePreviewHeaderCell::GetBoundingBoxOnScreen() const +tools::Rectangle ScAccessiblePreviewHeaderCell::GetBoundingBoxOnScreen() const { - Rectangle aCellRect; + tools::Rectangle aCellRect; FillTableInfo(); @@ -319,7 +319,7 @@ Rectangle ScAccessiblePreviewHeaderCell::GetBoundingBoxOnScreen() const const ScPreviewColRowInfo& rColInfo = mpTableInfo->GetColInfo()[maCellPos.Col()]; const ScPreviewColRowInfo& rRowInfo = mpTableInfo->GetRowInfo()[maCellPos.Row()]; - aCellRect = Rectangle( rColInfo.nPixelStart, rRowInfo.nPixelStart, rColInfo.nPixelEnd, rRowInfo.nPixelEnd ); + aCellRect = tools::Rectangle( rColInfo.nPixelStart, rRowInfo.nPixelStart, rColInfo.nPixelEnd, rRowInfo.nPixelEnd ); } if (mpViewShell) @@ -327,7 +327,7 @@ Rectangle ScAccessiblePreviewHeaderCell::GetBoundingBoxOnScreen() const vcl::Window* pWindow = mpViewShell->GetWindow(); if (pWindow) { - Rectangle aRect = pWindow->GetWindowExtentsRelative(nullptr); + tools::Rectangle aRect = pWindow->GetWindowExtentsRelative(nullptr); aCellRect.setX(aCellRect.getX() + aRect.getX()); aCellRect.setY(aCellRect.getY() + aRect.getY()); } @@ -335,7 +335,7 @@ Rectangle ScAccessiblePreviewHeaderCell::GetBoundingBoxOnScreen() const return aCellRect; } -Rectangle ScAccessiblePreviewHeaderCell::GetBoundingBox() const +tools::Rectangle ScAccessiblePreviewHeaderCell::GetBoundingBox() const { FillTableInfo(); @@ -344,7 +344,7 @@ Rectangle ScAccessiblePreviewHeaderCell::GetBoundingBox() const const ScPreviewColRowInfo& rColInfo = mpTableInfo->GetColInfo()[maCellPos.Col()]; const ScPreviewColRowInfo& rRowInfo = mpTableInfo->GetRowInfo()[maCellPos.Row()]; - Rectangle aCellRect( rColInfo.nPixelStart, rRowInfo.nPixelStart, rColInfo.nPixelEnd, rRowInfo.nPixelEnd ); + tools::Rectangle aCellRect( rColInfo.nPixelStart, rRowInfo.nPixelStart, rColInfo.nPixelEnd, rRowInfo.nPixelEnd ); uno::Reference<XAccessible> xAccParent = const_cast<ScAccessiblePreviewHeaderCell*>(this)->getAccessibleParent(); if (xAccParent.is()) { @@ -352,14 +352,14 @@ Rectangle ScAccessiblePreviewHeaderCell::GetBoundingBox() const uno::Reference<XAccessibleComponent> xAccParentComp (xAccParentContext, uno::UNO_QUERY); if (xAccParentComp.is()) { - Rectangle aParentRect (VCLRectangle(xAccParentComp->getBounds())); + tools::Rectangle aParentRect (VCLRectangle(xAccParentComp->getBounds())); aCellRect.setX(aCellRect.getX() - aParentRect.getX()); aCellRect.setY(aCellRect.getY() - aParentRect.getY()); } } return aCellRect; } - return Rectangle(); + return tools::Rectangle(); } OUString SAL_CALL ScAccessiblePreviewHeaderCell::createAccessibleDescription() @@ -423,7 +423,7 @@ void ScAccessiblePreviewHeaderCell::FillTableInfo() const if ( pWindow ) aOutputSize = pWindow->GetOutputSizePixel(); Point aPoint; - Rectangle aVisRect( aPoint, aOutputSize ); + tools::Rectangle aVisRect( aPoint, aOutputSize ); mpTableInfo = new ScPreviewTableInfo; mpViewShell->GetLocationData().GetTableInfo( aVisRect, *mpTableInfo ); diff --git a/sc/source/ui/Accessibility/AccessiblePreviewTable.cxx b/sc/source/ui/Accessibility/AccessiblePreviewTable.cxx index 00e367e3c193..19ea2bd621ee 100644 --- a/sc/source/ui/Accessibility/AccessiblePreviewTable.cxx +++ b/sc/source/ui/Accessibility/AccessiblePreviewTable.cxx @@ -430,7 +430,7 @@ uno::Reference< XAccessible > SAL_CALL ScAccessiblePreviewTable::getAccessibleAt const ScPreviewColRowInfo* pColInfo = mpTableInfo->GetColInfo(); const ScPreviewColRowInfo* pRowInfo = mpTableInfo->GetRowInfo(); - Rectangle aScreenRect(GetBoundingBox()); + tools::Rectangle aScreenRect(GetBoundingBox()); awt::Point aMovedPoint = aPoint; aMovedPoint.X += aScreenRect.Left(); @@ -602,15 +602,15 @@ OUString SAL_CALL ScAccessiblePreviewTable::createAccessibleName() return sName; } -Rectangle ScAccessiblePreviewTable::GetBoundingBoxOnScreen() const +tools::Rectangle ScAccessiblePreviewTable::GetBoundingBoxOnScreen() const { - Rectangle aCellRect(GetBoundingBox()); + tools::Rectangle aCellRect(GetBoundingBox()); if (mpViewShell) { vcl::Window* pWindow = mpViewShell->GetWindow(); if (pWindow) { - Rectangle aRect = pWindow->GetWindowExtentsRelative(nullptr); + tools::Rectangle aRect = pWindow->GetWindowExtentsRelative(nullptr); aCellRect.setX(aCellRect.getX() + aRect.getX()); aCellRect.setY(aCellRect.getY() + aRect.getY()); } @@ -618,11 +618,11 @@ Rectangle ScAccessiblePreviewTable::GetBoundingBoxOnScreen() const return aCellRect; } -Rectangle ScAccessiblePreviewTable::GetBoundingBox() const +tools::Rectangle ScAccessiblePreviewTable::GetBoundingBox() const { FillTableInfo(); - Rectangle aRect; + tools::Rectangle aRect; if ( mpTableInfo ) { SCCOL nColumns = mpTableInfo->GetCols(); @@ -632,7 +632,7 @@ Rectangle ScAccessiblePreviewTable::GetBoundingBox() const const ScPreviewColRowInfo* pColInfo = mpTableInfo->GetColInfo(); const ScPreviewColRowInfo* pRowInfo = mpTableInfo->GetRowInfo(); - aRect = Rectangle( pColInfo[0].nPixelStart, + aRect = tools::Rectangle( pColInfo[0].nPixelStart, pRowInfo[0].nPixelStart, pColInfo[nColumns-1].nPixelEnd, pRowInfo[nRows-1].nPixelEnd ); @@ -656,7 +656,7 @@ void ScAccessiblePreviewTable::FillTableInfo() const if ( pWindow ) aOutputSize = pWindow->GetOutputSizePixel(); Point aPoint; - Rectangle aVisRect( aPoint, aOutputSize ); + tools::Rectangle aVisRect( aPoint, aOutputSize ); mpTableInfo = new ScPreviewTableInfo; mpViewShell->GetLocationData().GetTableInfo( aVisRect, *mpTableInfo ); diff --git a/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx b/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx index ee9f22a3d5e4..fa2733e51e8b 100644 --- a/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx +++ b/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx @@ -1310,9 +1310,9 @@ void SAL_CALL ScAccessibleSpreadsheet::addAccessibleEventListener(const uno::Ref //==== internal ========================================================= -Rectangle ScAccessibleSpreadsheet::GetBoundingBoxOnScreen() const +tools::Rectangle ScAccessibleSpreadsheet::GetBoundingBoxOnScreen() const { - Rectangle aRect; + tools::Rectangle aRect; if (mpViewShell) { vcl::Window* pWindow = mpViewShell->GetWindowByPos(meSplitPos); @@ -1322,9 +1322,9 @@ Rectangle ScAccessibleSpreadsheet::GetBoundingBoxOnScreen() const return aRect; } -Rectangle ScAccessibleSpreadsheet::GetBoundingBox() const +tools::Rectangle ScAccessibleSpreadsheet::GetBoundingBox() const { - Rectangle aRect; + tools::Rectangle aRect; if (mpViewShell) { vcl::Window* pWindow = mpViewShell->GetWindowByPos(meSplitPos); @@ -1393,9 +1393,9 @@ ScDocument* ScAccessibleSpreadsheet::GetDocument(ScTabViewShell* pViewShell) return pDoc; } -Rectangle ScAccessibleSpreadsheet::GetVisArea(ScTabViewShell* pViewShell, ScSplitPos eSplitPos) +tools::Rectangle ScAccessibleSpreadsheet::GetVisArea(ScTabViewShell* pViewShell, ScSplitPos eSplitPos) { - Rectangle aVisArea; + tools::Rectangle aVisArea; if (pViewShell) { vcl::Window* pWindow = pViewShell->GetWindowByPos(eSplitPos); @@ -1408,7 +1408,7 @@ Rectangle ScAccessibleSpreadsheet::GetVisArea(ScTabViewShell* pViewShell, ScSpli return aVisArea; } -Rectangle ScAccessibleSpreadsheet::GetVisCells(const Rectangle& rVisArea) +tools::Rectangle ScAccessibleSpreadsheet::GetVisCells(const tools::Rectangle& rVisArea) { if (mpViewShell) { @@ -1418,10 +1418,10 @@ Rectangle ScAccessibleSpreadsheet::GetVisCells(const Rectangle& rVisArea) mpViewShell->GetViewData().GetPosFromPixel( 1, 1, meSplitPos, nStartX, nStartY); mpViewShell->GetViewData().GetPosFromPixel( rVisArea.GetWidth(), rVisArea.GetHeight(), meSplitPos, nEndX, nEndY); - return Rectangle(nStartX, nStartY, nEndX, nEndY); + return tools::Rectangle(nStartX, nStartY, nEndX, nEndY); } else - return Rectangle(); + return tools::Rectangle(); } sal_Bool SAL_CALL ScAccessibleSpreadsheet::selectRow( sal_Int32 row ) diff --git a/sc/source/ui/Accessibility/AccessibleText.cxx b/sc/source/ui/Accessibility/AccessibleText.cxx index 2878d60e91d2..d4b339a970db 100644 --- a/sc/source/ui/Accessibility/AccessibleText.cxx +++ b/sc/source/ui/Accessibility/AccessibleText.cxx @@ -54,7 +54,7 @@ public: ScViewForwarder(ScTabViewShell* pViewShell, ScSplitPos eSplitPos, const ScAddress& rCell); 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; @@ -74,9 +74,9 @@ bool ScViewForwarder::IsValid() const return mpViewShell != nullptr; } -Rectangle ScViewForwarder::GetVisArea() const +tools::Rectangle ScViewForwarder::GetVisArea() const { - Rectangle aVisArea; + tools::Rectangle aVisArea; if (mpViewShell) { vcl::Window* pWindow = mpViewShell->GetWindowByPos(meSplitPos); @@ -147,7 +147,7 @@ public: const EditView* _pEditView); 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; @@ -167,12 +167,12 @@ bool ScEditObjectViewForwarder::IsValid() const return (mpWindow != nullptr); } -Rectangle ScEditObjectViewForwarder::GetVisArea() const +tools::Rectangle ScEditObjectViewForwarder::GetVisArea() const { - Rectangle aVisArea; + tools::Rectangle aVisArea; if (mpWindow) { - Rectangle aVisRect(mpWindow->GetWindowExtentsRelative(mpWindow->GetAccessibleParentWindow())); + tools::Rectangle aVisRect(mpWindow->GetWindowExtentsRelative(mpWindow->GetAccessibleParentWindow())); aVisRect.SetPos(Point(0, 0)); @@ -194,7 +194,7 @@ Point ScEditObjectViewForwarder::LogicToPixel( const Point& rPoint, const MapMod Point aPoint( rPoint ); if ( mpEditView ) { - Rectangle aEditViewVisArea( mpEditView->GetVisArea() ); + tools::Rectangle aEditViewVisArea( mpEditView->GetVisArea() ); aPoint += aEditViewVisArea.TopLeft(); } return mpWindow->LogicToPixel( aPoint, rMapMode ); @@ -215,7 +215,7 @@ Point ScEditObjectViewForwarder::PixelToLogic( const Point& rPoint, const MapMod Point aPoint( mpWindow->PixelToLogic( rPoint, rMapMode ) ); if ( mpEditView ) { - Rectangle aEditViewVisArea( mpEditView->GetVisArea() ); + tools::Rectangle aEditViewVisArea( mpEditView->GetVisArea() ); aPoint -= aEditViewVisArea.TopLeft(); } return aPoint; @@ -240,16 +240,16 @@ public: explicit ScPreviewViewForwarder(ScPreviewShell* pViewShell); 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; void SetInvalid(); - Rectangle GetVisRect() const; + tools::Rectangle GetVisRect() const; // clips the VisArea and calculates with the negativ coordinates - Rectangle CorrectVisArea(const Rectangle& rVisArea) const; + tools::Rectangle CorrectVisArea(const tools::Rectangle& rVisArea) const; }; ScPreviewViewForwarder::ScPreviewViewForwarder(ScPreviewShell* pViewShell) @@ -262,9 +262,9 @@ bool ScPreviewViewForwarder::IsValid() const return mpViewShell != nullptr; } -Rectangle ScPreviewViewForwarder::GetVisArea() const +tools::Rectangle ScPreviewViewForwarder::GetVisArea() const { - Rectangle aVisArea; + tools::Rectangle aVisArea; OSL_FAIL("should be implemented in an abrevated class"); return aVisArea; } @@ -316,7 +316,7 @@ void ScPreviewViewForwarder::SetInvalid() mpViewShell = nullptr; } -Rectangle ScPreviewViewForwarder::GetVisRect() const +tools::Rectangle ScPreviewViewForwarder::GetVisRect() const { if ( mpViewShell ) { @@ -325,15 +325,15 @@ Rectangle ScPreviewViewForwarder::GetVisRect() const if ( pWindow ) aOutputSize = pWindow->GetOutputSizePixel(); Point aPoint; - Rectangle aVisRect( aPoint, aOutputSize ); + tools::Rectangle aVisRect( aPoint, aOutputSize ); return aVisRect; } - return Rectangle(); + return tools::Rectangle(); } -Rectangle ScPreviewViewForwarder::CorrectVisArea(const Rectangle& rVisArea) const +tools::Rectangle ScPreviewViewForwarder::CorrectVisArea(const tools::Rectangle& rVisArea) const { - Rectangle aVisArea(rVisArea); + tools::Rectangle aVisArea(rVisArea); Point aPos = aVisArea.TopLeft(); // get first the position to remember negative positions after clipping vcl::Window* pWin = mpViewShell->GetWindow(); @@ -362,7 +362,7 @@ class ScPreviewHeaderFooterViewForwarder : public ScPreviewViewForwarder public: ScPreviewHeaderFooterViewForwarder(ScPreviewShell* pViewShell, bool bHeader); - virtual Rectangle GetVisArea() const override; + virtual tools::Rectangle GetVisArea() const override; }; ScPreviewHeaderFooterViewForwarder::ScPreviewHeaderFooterViewForwarder(ScPreviewShell* pViewShell, bool bHeader) @@ -372,9 +372,9 @@ ScPreviewHeaderFooterViewForwarder::ScPreviewHeaderFooterViewForwarder(ScPreview { } -Rectangle ScPreviewHeaderFooterViewForwarder::GetVisArea() const +tools::Rectangle ScPreviewHeaderFooterViewForwarder::GetVisArea() const { - Rectangle aVisArea; + tools::Rectangle aVisArea; if (mpViewShell) { const ScPreviewLocationData& rData = mpViewShell->GetLocationData(); @@ -399,7 +399,7 @@ public: ScPreviewCellViewForwarder(ScPreviewShell* pViewShell, ScAddress aCellPos); - virtual Rectangle GetVisArea() const override; + virtual tools::Rectangle GetVisArea() const override; }; ScPreviewCellViewForwarder::ScPreviewCellViewForwarder(ScPreviewShell* pViewShell, @@ -410,9 +410,9 @@ ScPreviewCellViewForwarder::ScPreviewCellViewForwarder(ScPreviewShell* pViewShel { } -Rectangle ScPreviewCellViewForwarder::GetVisArea() const +tools::Rectangle ScPreviewCellViewForwarder::GetVisArea() const { - Rectangle aVisArea; + tools::Rectangle aVisArea; if (mpViewShell) { const ScPreviewLocationData& rData = mpViewShell->GetLocationData(); @@ -436,7 +436,7 @@ public: ScAddress aCellPos, bool bColHeader); - virtual Rectangle GetVisArea() const override; + virtual tools::Rectangle GetVisArea() const override; }; ScPreviewHeaderCellViewForwarder::ScPreviewHeaderCellViewForwarder(ScPreviewShell* pViewShell, @@ -449,9 +449,9 @@ ScPreviewHeaderCellViewForwarder::ScPreviewHeaderCellViewForwarder(ScPreviewShel { } -Rectangle ScPreviewHeaderCellViewForwarder::GetVisArea() const +tools::Rectangle ScPreviewHeaderCellViewForwarder::GetVisArea() const { - Rectangle aVisArea; + tools::Rectangle aVisArea; if (mpViewShell) { const ScPreviewLocationData& rData = mpViewShell->GetLocationData(); @@ -475,7 +475,7 @@ public: ScAddress aCellPos, bool bNoteMark); - virtual Rectangle GetVisArea() const override; + virtual tools::Rectangle GetVisArea() const override; }; ScPreviewNoteViewForwarder::ScPreviewNoteViewForwarder(ScPreviewShell* pViewShell, @@ -488,9 +488,9 @@ ScPreviewNoteViewForwarder::ScPreviewNoteViewForwarder(ScPreviewShell* pViewShel { } -Rectangle ScPreviewNoteViewForwarder::GetVisArea() const +tools::Rectangle ScPreviewNoteViewForwarder::GetVisArea() const { - Rectangle aVisArea; + tools::Rectangle aVisArea; if (mpViewShell) { const ScPreviewLocationData& rData = mpViewShell->GetLocationData(); @@ -513,7 +513,7 @@ public: ScEditViewForwarder(EditView* pEditView, vcl::Window* pWin); 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; virtual bool GetSelection( ESelection& rSelection ) const override; @@ -536,9 +536,9 @@ bool ScEditViewForwarder::IsValid() const return mpWindow && mpEditView; } -Rectangle ScEditViewForwarder::GetVisArea() const +tools::Rectangle ScEditViewForwarder::GetVisArea() const { - Rectangle aVisArea; + tools::Rectangle aVisArea; if (IsValid() && mpEditView->GetEditEngine()) { MapMode aMapMode(mpEditView->GetEditEngine()->GetRefMapMode()); @@ -1287,7 +1287,7 @@ SvxTextForwarder* ScAccessiblePreviewHeaderCellTextData::GetTextForwarder() if ( pWindow ) aOutputSize = pWindow->GetOutputSizePixel(); Point aPoint; - Rectangle aVisRect( aPoint, aOutputSize ); + tools::Rectangle aVisRect( aPoint, aOutputSize ); Size aSize(mpViewShell->GetLocationData().GetHeaderCellOutputRect(aVisRect, aCellPos, mbColHeader).GetSize()); if (pWindow) aSize = pWindow->PixelToLogic(aSize, pEditEngine->GetRefMapMode()); @@ -1409,7 +1409,7 @@ SvxTextForwarder* ScAccessibleHeaderTextData::GetTextForwarder() if ( mpViewShell ) { - Rectangle aVisRect; + tools::Rectangle aVisRect; mpViewShell->GetLocationData().GetHeaderPosition(aVisRect); Size aSize(aVisRect.GetSize()); vcl::Window* pWin = mpViewShell->GetWindow(); @@ -1514,7 +1514,7 @@ SvxTextForwarder* ScAccessibleNoteTextData::GetTextForwarder() if ( pWindow ) aOutputSize = pWindow->GetOutputSizePixel(); Point aPoint; - Rectangle aVisRect( aPoint, aOutputSize ); + tools::Rectangle aVisRect( aPoint, aOutputSize ); Size aSize(mpViewShell->GetLocationData().GetNoteInRangeOutputRect(aVisRect, mbMarkNote, maCellPos).GetSize()); if (pWindow) aSize = pWindow->PixelToLogic(aSize, mpEditEngine->GetRefMapMode()); @@ -1541,21 +1541,21 @@ SvxViewForwarder* ScAccessibleNoteTextData::GetViewForwarder() class ScCsvViewForwarder : public SvxViewForwarder { - Rectangle maBoundBox; + tools::Rectangle maBoundBox; VclPtr<vcl::Window> mpWindow; public: - explicit ScCsvViewForwarder( vcl::Window* pWindow, const Rectangle& rBoundBox ); + explicit ScCsvViewForwarder( vcl::Window* pWindow, const tools::Rectangle& rBoundBox ); 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; void SetInvalid(); }; -ScCsvViewForwarder::ScCsvViewForwarder( vcl::Window* pWindow, const Rectangle& rBoundBox ) : +ScCsvViewForwarder::ScCsvViewForwarder( vcl::Window* pWindow, const tools::Rectangle& rBoundBox ) : maBoundBox( rBoundBox ), mpWindow( pWindow ) { @@ -1566,7 +1566,7 @@ bool ScCsvViewForwarder::IsValid() const return mpWindow != nullptr; } -Rectangle ScCsvViewForwarder::GetVisArea() const +tools::Rectangle ScCsvViewForwarder::GetVisArea() const { return maBoundBox; } @@ -1590,7 +1590,7 @@ void ScCsvViewForwarder::SetInvalid() ScAccessibleCsvTextData::ScAccessibleCsvTextData( vcl::Window* pWindow, EditEngine* pEditEngine, - const OUString& rCellText, const Rectangle& rBoundBox, const Size& rCellSize ) : + const OUString& rCellText, const tools::Rectangle& rBoundBox, const Size& rCellSize ) : mpWindow( pWindow ), mpEditEngine( pEditEngine ), maCellText( rCellText ), diff --git a/sc/source/ui/app/client.cxx b/sc/source/ui/app/client.cxx index 83e9b922c30c..9713669bf8b6 100644 --- a/sc/source/ui/app/client.cxx +++ b/sc/source/ui/app/client.cxx @@ -77,7 +77,7 @@ SdrOle2Obj* ScClient::GetDrawObj() return pOle2Obj; } -void ScClient::RequestNewObjectArea( Rectangle& aLogicRect ) +void ScClient::RequestNewObjectArea( tools::Rectangle& aLogicRect ) { SfxViewShell* pSfxViewSh = GetViewShell(); ScTabViewShell* pViewSh = dynamic_cast<ScTabViewShell*>( pSfxViewSh ); @@ -87,7 +87,7 @@ void ScClient::RequestNewObjectArea( Rectangle& aLogicRect ) return; } - Rectangle aOldRect = GetObjArea(); + tools::Rectangle aOldRect = GetObjArea(); SdrOle2Obj* pDrawObj = GetDrawObj(); if ( pDrawObj ) { @@ -109,7 +109,7 @@ void ScClient::RequestNewObjectArea( Rectangle& aLogicRect ) aPos.X() = aSize.Width() + 1; // negative aSize.Width() = -aSize.Width(); // positive } - Rectangle aPageRect( aPos, aSize ); + tools::Rectangle aPageRect( aPos, aSize ); if (aLogicRect.Right() > aPageRect.Right()) { @@ -153,7 +153,7 @@ void ScClient::ObjectAreaChanged() SdrOle2Obj* pDrawObj = GetDrawObj(); if (pDrawObj) { - Rectangle aNewRectangle(GetScaledObjArea()); + tools::Rectangle aNewRectangle(GetScaledObjArea()); // #i118524# if sheared/rotated, center to non-rotated LogicRect pDrawObj->setSuppressSetVisAreaSize(true); @@ -162,7 +162,7 @@ void ScClient::ObjectAreaChanged() { pDrawObj->SetLogicRect( aNewRectangle ); - const Rectangle& rBoundRect = pDrawObj->GetCurrentBoundRect(); + const tools::Rectangle& rBoundRect = pDrawObj->GetCurrentBoundRect(); const Point aDelta(aNewRectangle.Center() - rBoundRect.Center()); aNewRectangle.Move(aDelta.X(), aDelta.Y()); @@ -212,7 +212,7 @@ void ScClient::ViewChanged() SdrOle2Obj* pDrawObj = GetDrawObj(); if (pDrawObj) { - Rectangle aLogicRect = pDrawObj->GetLogicRect(); + tools::Rectangle aLogicRect = pDrawObj->GetLogicRect(); Fraction aFractX = GetScaleWidth(); Fraction aFractY = GetScaleHeight(); aFractX *= aVisSize.Width(); diff --git a/sc/source/ui/app/drwtrans.cxx b/sc/source/ui/app/drwtrans.cxx index d2f3deb9e7cd..fc81f99cd695 100644 --- a/sc/source/ui/app/drwtrans.cxx +++ b/sc/source/ui/app/drwtrans.cxx @@ -753,7 +753,7 @@ void ScDrawTransferObj::InitDocShell() } Point aTmpPoint; - Rectangle aDestArea( aTmpPoint, aSrcSize ); + tools::Rectangle aDestArea( aTmpPoint, aSrcSize ); pDocSh->SetVisArea( aDestArea ); ScViewOptions aViewOpt( rDestDoc.GetViewOptions() ); diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx index 52987d1a3fcf..18e9f342650c 100644 --- a/sc/source/ui/app/inputhdl.cxx +++ b/sc/source/ui/app/inputhdl.cxx @@ -1084,7 +1084,7 @@ void ScInputHandler::ShowTip( const OUString& rText ) if (pCur) aPos = pTipVisibleParent->LogicToPixel( pCur->GetPos() ); aPos = pTipVisibleParent->OutputToScreenPixel( aPos ); - Rectangle aRect( aPos, aPos ); + tools::Rectangle aRect( aPos, aPos ); QuickHelpFlags nAlign = QuickHelpFlags::Left|QuickHelpFlags::Bottom; nTipVisible = Help::ShowPopover(pTipVisibleParent, aRect, rText, nAlign); @@ -1109,7 +1109,7 @@ void ScInputHandler::ShowTipBelow( const OUString& rText ) aPos = pTipVisibleSecParent->LogicToPixel( aLogicPos ); } aPos = pTipVisibleSecParent->OutputToScreenPixel( aPos ); - Rectangle aRect( aPos, aPos ); + tools::Rectangle aRect( aPos, aPos ); QuickHelpFlags nAlign = QuickHelpFlags::Left | QuickHelpFlags::Top | QuickHelpFlags::NoEvadePointer; nTipVisibleSec = Help::ShowPopover(pTipVisibleSecParent, aRect, rText, nAlign); pTipVisibleSecParent->AddEventListener( LINK( this, ScInputHandler, ShowHideTipVisibleSecParentListener ) ); diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx index f9e03970f103..be4ab18234c0 100644 --- a/sc/source/ui/app/inputwin.cxx +++ b/sc/source/ui/app/inputwin.cxx @@ -411,7 +411,7 @@ void ScInputWindow::Select() } } -void ScInputWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) +void ScInputWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) { ToolBox::Paint(rRenderContext, rRect); @@ -979,7 +979,7 @@ void ScInputBarGroup::TextGrabFocus() maTextWnd->TextGrabFocus(); } -void ScTextWnd::Paint( vcl::RenderContext& rRenderContext, const Rectangle& rRect ) +void ScTextWnd::Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect ) { EditView* pView = GetEditView(); if (pView) @@ -1033,7 +1033,7 @@ void ScTextWnd::Resize() if (mpEditView) { Size aOutputSize = GetOutputSizePixel(); - Rectangle aOutputArea = PixelToLogic( Rectangle( Point(), aOutputSize )); + tools::Rectangle aOutputArea = PixelToLogic( tools::Rectangle( Point(), aOutputSize )); mpEditView->SetOutputArea( aOutputArea ); // Don't leave an empty area at the bottom if we can move the text down. @@ -1150,7 +1150,7 @@ static void lcl_ModifyRTLDefaults( SfxItemSet& rSet ) static void lcl_ModifyRTLVisArea( EditView* pEditView ) { - Rectangle aVisArea = pEditView->GetVisArea(); + tools::Rectangle aVisArea = pEditView->GetVisArea(); Size aPaper = pEditView->GetEditEngine()->GetPaperSize(); long nDiff = aPaper.Width() - aVisArea.Right(); aVisArea.Left() += nDiff; @@ -1634,7 +1634,7 @@ void ScTextWnd::SetTextString( const OUString& rNewString ) if ( nDifPos == aString.getLength() ) // only new characters appended nFlags = InvalidateFlags::NoErase; // then background is already clear - Invalidate( Rectangle( nInvPos, 0, nStartPos+nTextSize, GetOutputSize().Height()-1 ), nFlags ); + Invalidate( tools::Rectangle( nInvPos, 0, nStartPos+nTextSize, GetOutputSize().Height()-1 ), nFlags ); } } else @@ -2048,7 +2048,7 @@ void ScPosWnd::Modify() if (pCur) aPos = pWin->LogicToPixel( pCur->GetPos() ); aPos = pWin->OutputToScreenPixel( aPos ); - Rectangle aRect( aPos, aPos ); + tools::Rectangle aRect( aPos, aPos ); OUString aText = ScGlobal::GetRscString( nStrId ); QuickHelpFlags nAlign = QuickHelpFlags::Left|QuickHelpFlags::Bottom; diff --git a/sc/source/ui/app/transobj.cxx b/sc/source/ui/app/transobj.cxx index 990be1b5bde8..ee615ff36a07 100644 --- a/sc/source/ui/app/transobj.cxx +++ b/sc/source/ui/app/transobj.cxx @@ -102,7 +102,7 @@ void ScTransferObj::PaintToDev( OutputDevice* pDev, ScDocument* pDoc, double nPr return; Point aPoint; - Rectangle aBound( aPoint, pDev->GetOutputSize() ); //! use size from clip area? + tools::Rectangle aBound( aPoint, pDev->GetOutputSize() ); //! use size from clip area? ScViewData aViewData(nullptr,nullptr); aViewData.InitData( pDoc ); @@ -174,7 +174,7 @@ ScTransferObj::ScTransferObj( ScDocument* pClipDoc, const TransferableObjectDesc aBlock = ScRange( nCol1, nRow1, nTab1, nCol2, nRow2, nTab2 ); nVisibleTab = nTab1; // valid table as default - Rectangle aMMRect = pDoc->GetMMRect( nCol1,nRow1, nCol2,nRow2, nTab1 ); + tools::Rectangle aMMRect = pDoc->GetMMRect( nCol1,nRow1, nCol2,nRow2, nTab1 ); aObjDesc.maSize = aMMRect.GetSize(); PrepareOLE( aObjDesc ); } @@ -348,7 +348,7 @@ bool ScTransferObj::GetData( const datatransfer::DataFlavor& rFlavor, const OUSt } else if ( nFormat == SotClipboardFormatId::BITMAP || nFormat == SotClipboardFormatId::PNG ) { - Rectangle aMMRect = pDoc->GetMMRect( aBlock.aStart.Col(), aBlock.aStart.Row(), + tools::Rectangle aMMRect = pDoc->GetMMRect( aBlock.aStart.Col(), aBlock.aStart.Row(), aBlock.aEnd.Col(), aBlock.aEnd.Row(), aBlock.aStart.Tab() ); ScopedVclPtrInstance< VirtualDevice > pVirtDev; @@ -374,7 +374,7 @@ bool ScTransferObj::GetData( const datatransfer::DataFlavor& rFlavor, const OUSt GDIMetaFile aMtf; ScopedVclPtrInstance< VirtualDevice > pVDev; MapMode aMapMode( pEmbObj->GetMapUnit() ); - Rectangle aVisArea( pEmbObj->GetVisArea( ASPECT_CONTENT ) ); + tools::Rectangle aVisArea( pEmbObj->GetVisArea( ASPECT_CONTENT ) ); pVDev->EnableOutput( false ); pVDev->SetMapMode( aMapMode ); @@ -742,7 +742,7 @@ void ScTransferObj::InitDocShell(bool bLimitToPageSize) // pDocSh->SetVisAreaSize( Size(nSizeX,nSizeY) ); - Rectangle aNewArea( Point(nPosX,nPosY), Size(nSizeX,nSizeY) ); + tools::Rectangle aNewArea( Point(nPosX,nPosY), Size(nSizeX,nSizeY) ); //TODO/LATER: why twice?! //pDocSh->SvInPlaceObject::SetVisArea( aNewArea ); pDocSh->SetVisArea( aNewArea ); 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; diff --git a/sc/source/ui/condformat/condformatdlg.cxx b/sc/source/ui/condformat/condformatdlg.cxx index 1fe49bc81774..8689c0be7115 100644 --- a/sc/source/ui/condformat/condformatdlg.cxx +++ b/sc/source/ui/condformat/condformatdlg.cxx @@ -241,7 +241,7 @@ void ScCondFormatList::RecalcAll() void ScCondFormatList::DoScroll(long nDelta) { Point aNewPoint = mpScrollBar->GetPosPixel(); - Rectangle aRect(Point(), GetOutputSize()); + tools::Rectangle aRect(Point(), GetOutputSize()); aRect.Right() -= mpScrollBar->GetSizePixel().Width(); Scroll( 0, -nDelta, aRect ); mpScrollBar->SetPosPixel(aNewPoint); diff --git a/sc/source/ui/dbgui/csvcontrol.cxx b/sc/source/ui/dbgui/csvcontrol.cxx index f70aec78e579..4d0fa54d66c7 100644 --- a/sc/source/ui/dbgui/csvcontrol.cxx +++ b/sc/source/ui/dbgui/csvcontrol.cxx @@ -256,7 +256,7 @@ sal_Int32 ScCsvControl::GetLineFromY( sal_Int32 nY ) const // static helpers ------------------------------------------------------------- -void ScCsvControl::ImplInvertRect( OutputDevice& rOutDev, const Rectangle& rRect ) +void ScCsvControl::ImplInvertRect( OutputDevice& rOutDev, const tools::Rectangle& rRect ) { rOutDev.Push( PushFlags::LINECOLOR | PushFlags::FILLCOLOR | PushFlags::RASTEROP ); rOutDev.SetLineColor( Color( COL_BLACK ) ); diff --git a/sc/source/ui/dbgui/csvgrid.cxx b/sc/source/ui/dbgui/csvgrid.cxx index 89982b3923b8..d9490d97d503 100644 --- a/sc/source/ui/dbgui/csvgrid.cxx +++ b/sc/source/ui/dbgui/csvgrid.cxx @@ -986,7 +986,7 @@ void ScCsvGrid::Command( const CommandEvent& rCEvt ) case CommandEventId::Wheel: { Point aPoint; - Rectangle aRect( aPoint, maWinSize ); + tools::Rectangle aRect( aPoint, maWinSize ); if( aRect.IsInside( rCEvt.GetMousePosPixel() ) ) { const CommandWheelData* pData = rCEvt.GetWheelData(); @@ -1020,7 +1020,7 @@ void ScCsvGrid::ConfigurationChanged( utl::ConfigurationBroadcaster*, Configurat // painting ------------------------------------------------------------------- -void ScCsvGrid::Paint( vcl::RenderContext& /*rRenderContext*/, const Rectangle& ) +void ScCsvGrid::Paint( vcl::RenderContext& /*rRenderContext*/, const tools::Rectangle& ) { Repaint(); } @@ -1047,7 +1047,7 @@ EditEngine* ScCsvGrid::GetEditEngine() void ScCsvGrid::ImplSetColumnClipRegion( OutputDevice& rOutDev, sal_uInt32 nColIndex ) { - rOutDev.SetClipRegion( vcl::Region( Rectangle( + rOutDev.SetClipRegion( vcl::Region( tools::Rectangle( std::max( GetColumnX( nColIndex ), GetFirstX() ) + 1, 0, std::min( GetColumnX( nColIndex + 1 ), GetLastX() ), GetHeight() - 1 ) ) ); } @@ -1060,7 +1060,7 @@ void ScCsvGrid::ImplDrawColumnHeader( OutputDevice& rOutDev, sal_uInt32 nColInde rOutDev.SetLineColor(); rOutDev.SetFillColor( aFillColor ); - rOutDev.DrawRect( Rectangle( nX1, 0, nX2, nHdrHt ) ); + rOutDev.DrawRect( tools::Rectangle( nX1, 0, nX2, nHdrHt ) ); rOutDev.SetFont( maHeaderFont ); rOutDev.SetTextColor( maHeaderTextColor ); @@ -1150,7 +1150,7 @@ void ScCsvGrid::ImplDrawColumnBackgr( sal_uInt32 nColIndex ) sal_Int32 nX2 = GetColumnX( nColIndex + 1 ); sal_Int32 nY2 = GetY( GetLastVisLine() + 1 ); sal_Int32 nHdrHt = GetHdrHeight(); - Rectangle aRect( nX1, nHdrHt, nX2, nY2 ); + tools::Rectangle aRect( nX1, nHdrHt, nX2, nY2 ); mpBackgrDev->DrawRect( aRect ); mpBackgrDev->SetLineColor( maGridColor ); mpBackgrDev->DrawGrid( aRect, Size( 1, GetLineHeight() ), DrawGridFlags::HorzLines ); @@ -1188,7 +1188,7 @@ void ScCsvGrid::ImplDrawRowHeaders() mpBackgrDev->SetLineColor(); mpBackgrDev->SetFillColor( maAppBackColor ); Point aPoint( GetHdrX(), 0 ); - Rectangle aRect( aPoint, Size( GetHdrWidth() + 1, GetHeight() ) ); + tools::Rectangle aRect( aPoint, Size( GetHdrWidth() + 1, GetHeight() ) ); mpBackgrDev->DrawRect( aRect ); mpBackgrDev->SetFillColor( maHeaderBackColor ); @@ -1224,7 +1224,7 @@ void ScCsvGrid::ImplDrawBackgrDev() { mpBackgrDev->SetLineColor(); mpBackgrDev->SetFillColor( maAppBackColor ); - mpBackgrDev->DrawRect( Rectangle( + mpBackgrDev->DrawRect( tools::Rectangle( Point( GetFirstX() + 1, 0 ), Size( GetWidth() - GetHdrWidth(), GetHeight() ) ) ); sal_uInt32 nLastCol = GetLastVisColumn(); @@ -1248,7 +1248,7 @@ void ScCsvGrid::ImplDrawColumnSelection( sal_uInt32 nColIndex ) sal_Int32 nX2 = GetColumnX( nColIndex + 1 ); // header - Rectangle aRect( nX1, 0, nX2, GetHdrHeight() ); + tools::Rectangle aRect( nX1, 0, nX2, GetHdrHeight() ); mpGridDev->SetLineColor(); if( maHeaderBackColor.IsDark() ) // redraw with light gray background in dark mode @@ -1261,7 +1261,7 @@ void ScCsvGrid::ImplDrawColumnSelection( sal_uInt32 nColIndex ) } // column selection - aRect = Rectangle( nX1, GetHdrHeight() + 1, nX2, GetY( GetLastVisLine() + 1 ) - 1 ); + aRect = tools::Rectangle( nX1, GetHdrHeight() + 1, nX2, GetY( GetLastVisLine() + 1 ) - 1 ); ImplInvertRect( *mpGridDev.get(), aRect ); } @@ -1315,7 +1315,7 @@ void ScCsvGrid::ImplDrawHorzScrolled( sal_Int32 nOldPos ) } ImplInvertCursor( GetRulerCursorPos() + (nPos - nOldPos) ); - Rectangle aRectangle( GetFirstX(), 0, GetLastX(), GetHeight() - 1 ); + tools::Rectangle aRectangle( GetFirstX(), 0, GetLastX(), GetHeight() - 1 ); vcl::Region aClipReg( aRectangle ); mpBackgrDev->SetClipRegion( aClipReg ); mpBackgrDev->CopyArea( aDest, aSrc, maWinSize ); @@ -1331,7 +1331,7 @@ void ScCsvGrid::ImplDrawHorzScrolled( sal_Int32 nOldPos ) sal_Int32 nLastX = GetX( GetPosCount() ) + 1; if( nLastX <= GetLastX() ) { - Rectangle aRect( nLastX, 0, GetLastX(), GetHeight() - 1 ); + tools::Rectangle aRect( nLastX, 0, GetLastX(), GetHeight() - 1 ); mpBackgrDev->SetLineColor(); mpBackgrDev->SetFillColor( maAppBackColor ); mpBackgrDev->DrawRect( aRect ); @@ -1346,7 +1346,7 @@ void ScCsvGrid::ImplInvertCursor( sal_Int32 nPos ) if( IsVisibleSplitPos( nPos ) ) { sal_Int32 nX = GetX( nPos ) - 1; - Rectangle aRect( Point( nX, 0 ), Size( 3, GetHdrHeight() ) ); + tools::Rectangle aRect( Point( nX, 0 ), Size( 3, GetHdrHeight() ) ); ImplInvertRect( *mpGridDev.get(), aRect ); aRect.Top() = GetHdrHeight() + 1; aRect.Bottom() = GetY( GetLastVisLine() + 1 ); @@ -1361,7 +1361,7 @@ void ScCsvGrid::ImplDrawTrackingRect( sal_uInt32 nColIndex ) sal_Int32 nX1 = std::max( GetColumnX( nColIndex ), GetFirstX() ) + 1; sal_Int32 nX2 = std::min( GetColumnX( nColIndex + 1 ) - sal_Int32( 1 ), GetLastX() ); sal_Int32 nY2 = std::min( GetY( GetLastVisLine() + 1 ), GetHeight() ) - 1; - InvertTracking( Rectangle( nX1, 0, nX2, nY2 ), ShowTrackFlags::Small | ShowTrackFlags::TrackWindow ); + InvertTracking( tools::Rectangle( nX1, 0, nX2, nY2 ), ShowTrackFlags::Small | ShowTrackFlags::TrackWindow ); } } diff --git a/sc/source/ui/dbgui/csvruler.cxx b/sc/source/ui/dbgui/csvruler.cxx index c3406cc992a8..23881dbda146 100644 --- a/sc/source/ui/dbgui/csvruler.cxx +++ b/sc/source/ui/dbgui/csvruler.cxx @@ -411,7 +411,7 @@ void ScCsvRuler::MouseMove( const MouseEvent& rMEvt ) else { Point aPoint; - Rectangle aRect( aPoint, maWinSize ); + tools::Rectangle aRect( aPoint, maWinSize ); if( !IsVisibleSplitPos( nPos ) || !aRect.IsInside( rMEvt.GetPosPixel() ) ) // if focused, keep old cursor position for key input nPos = HasFocus() ? GetRulerCursorPos() : CSV_POS_INVALID; @@ -514,7 +514,7 @@ void ScCsvRuler::EndMouseTracking( bool bApply ) // painting ------------------------------------------------------------------- -void ScCsvRuler::Paint( vcl::RenderContext& /*rRenderContext*/, const Rectangle& ) +void ScCsvRuler::Paint( vcl::RenderContext& /*rRenderContext*/, const tools::Rectangle& ) { Repaint(); } @@ -532,7 +532,7 @@ void ScCsvRuler::ImplRedraw() DrawOutDev( Point(), maWinSize, Point(), maWinSize, *maRulerDev.get() ); /* Draws directly tracking rectangle to the column with the specified index. */ if( HasFocus() ) - InvertTracking( Rectangle( 0, 0, GetWidth() - 1, GetHeight() - 2 ), + InvertTracking( tools::Rectangle( 0, 0, GetWidth() - 1, GetHeight() - 2 ), ShowTrackFlags::Small | ShowTrackFlags::TrackWindow ); } } @@ -540,7 +540,7 @@ void ScCsvRuler::ImplRedraw() void ScCsvRuler::ImplDrawArea( sal_Int32 nPosX, sal_Int32 nWidth ) { maBackgrDev->SetLineColor(); - Rectangle aRect( Point( nPosX, 0 ), Size( nWidth, GetHeight() ) ); + tools::Rectangle aRect( Point( nPosX, 0 ), Size( nWidth, GetHeight() ) ); maBackgrDev->SetFillColor( maBackColor ); maBackgrDev->DrawRect( aRect ); @@ -600,7 +600,7 @@ void ScCsvRuler::ImplDrawSplit( sal_Int32 nPos ) Size aSize( mnSplitSize, mnSplitSize ); maRulerDev->SetLineColor( maTextColor ); maRulerDev->SetFillColor( maSplitColor ); - maRulerDev->DrawEllipse( Rectangle( aPos, aSize ) ); + maRulerDev->DrawEllipse( tools::Rectangle( aPos, aSize ) ); maRulerDev->DrawPixel( Point( GetX( nPos ), GetHeight() - 2 ) ); } } @@ -633,7 +633,7 @@ void ScCsvRuler::ImplInvertCursor( sal_Int32 nPos ) { if( IsVisibleSplitPos( nPos ) ) { - ImplInvertRect( *maRulerDev.get(), Rectangle( Point( GetX( nPos ) - 1, 0 ), Size( 3, GetHeight() - 1 ) ) ); + ImplInvertRect( *maRulerDev.get(), tools::Rectangle( Point( GetX( nPos ) - 1, 0 ), Size( 3, GetHeight() - 1 ) ) ); if( HasSplit( nPos ) ) ImplDrawSplit( nPos ); } diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx index 44ae2e3e8677..3fc6d41bd1cb 100644 --- a/sc/source/ui/docshell/docsh.cxx +++ b/sc/source/ui/docshell/docsh.cxx @@ -1619,7 +1619,7 @@ ScDocShell::PrepareSaveGuard::PrepareSaveGuard( ScDocShell& rDocShell ) } } if (mrDocShell.GetCreateMode()== SfxObjectCreateMode::STANDARD) - mrDocShell.SfxObjectShell::SetVisArea( Rectangle() ); // "Normally" worked on => no VisArea. + mrDocShell.SfxObjectShell::SetVisArea( tools::Rectangle() ); // "Normally" worked on => no VisArea. } ScDocShell::PrepareSaveGuard::~PrepareSaveGuard() @@ -2231,7 +2231,7 @@ bool ScDocShell::ConvertTo( SfxMedium &rMed ) if (pAutoStyleList) pAutoStyleList->ExecuteAllNow(); // Execute template timeouts now if (GetCreateMode()== SfxObjectCreateMode::STANDARD) - SfxObjectShell::SetVisArea( Rectangle() ); // Edited normally -> no VisArea + SfxObjectShell::SetVisArea( tools::Rectangle() ); // Edited normally -> no VisArea OSL_ENSURE( rMed.GetFilter(), "Filter == 0" ); diff --git a/sc/source/ui/docshell/docsh2.cxx b/sc/source/ui/docshell/docsh2.cxx index 4aaa39a29403..9dc8cd2b319d 100644 --- a/sc/source/ui/docshell/docsh2.cxx +++ b/sc/source/ui/docshell/docsh2.cxx @@ -50,7 +50,7 @@ bool ScDocShell::InitNew( const uno::Reference < embed::XStorage >& xStor ) Size aSize( (long) ( STD_COL_WIDTH * HMM_PER_TWIPS * OLE_STD_CELLS_X ), (long) ( ScGlobal::nStdRowHeight * HMM_PER_TWIPS * OLE_STD_CELLS_Y ) ); // Also adjust start here - SetVisAreaOrSize( Rectangle( Point(), aSize ) ); + SetVisAreaOrSize( tools::Rectangle( Point(), aSize ) ); } // InitOptions sets the document languages, must be called before CreateStandardStyles diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx index fa4cc7f676fd..521dd0dfa8bd 100644 --- a/sc/source/ui/docshell/docsh4.cxx +++ b/sc/source/ui/docshell/docsh4.cxx @@ -1915,7 +1915,7 @@ void ScDocShell::Draw( OutputDevice* pDev, const JobSetup & /* rSetup */, sal_uI if ( nAspect == ASPECT_THUMBNAIL ) { - Rectangle aBoundRect = GetVisArea( ASPECT_THUMBNAIL ); + tools::Rectangle aBoundRect = GetVisArea( ASPECT_THUMBNAIL ); ScViewData aTmpData( this, nullptr ); aTmpData.SetTabNo(nVisTab); SnapVisArea( aBoundRect ); @@ -1924,7 +1924,7 @@ void ScDocShell::Draw( OutputDevice* pDev, const JobSetup & /* rSetup */, sal_uI } else { - Rectangle aBoundRect = SfxObjectShell::GetVisArea(); + tools::Rectangle aBoundRect = SfxObjectShell::GetVisArea(); ScViewData aTmpData( this, nullptr ); aTmpData.SetTabNo(nVisTab); SnapVisArea( aBoundRect ); @@ -1935,14 +1935,14 @@ void ScDocShell::Draw( OutputDevice* pDev, const JobSetup & /* rSetup */, sal_uI pDev->SetLayoutMode( nOldLayoutMode ); } -Rectangle ScDocShell::GetVisArea( sal_uInt16 nAspect ) const +tools::Rectangle ScDocShell::GetVisArea( sal_uInt16 nAspect ) const { SfxObjectCreateMode eShellMode = GetCreateMode(); if ( eShellMode == SfxObjectCreateMode::ORGANIZER ) { // without contents we also don't know how large are the contents; // return empty rectangle, it will then be calculated after the loading - return Rectangle(); + return tools::Rectangle(); } if( nAspect == ASPECT_THUMBNAIL ) @@ -1956,7 +1956,7 @@ Rectangle ScDocShell::GetVisArea( sal_uInt16 nAspect ) const Size aSize = aDocument.GetPageSize(nVisTab); const long SC_PREVIEW_SIZE_X = 10000; const long SC_PREVIEW_SIZE_Y = 12400; - Rectangle aArea( 0,0, SC_PREVIEW_SIZE_X, SC_PREVIEW_SIZE_Y); + tools::Rectangle aArea( 0,0, SC_PREVIEW_SIZE_X, SC_PREVIEW_SIZE_Y); if (aSize.Width() > aSize.Height()) { aArea.Right() = SC_PREVIEW_SIZE_Y; @@ -1989,7 +1989,7 @@ Rectangle ScDocShell::GetVisArea( sal_uInt16 nAspect ) const nStartCol = nEndCol; if (nStartRow>nEndRow) nStartRow = nEndRow; - Rectangle aNewArea = ((ScDocument&)aDocument) + tools::Rectangle aNewArea = ((ScDocument&)aDocument) .GetMMRect( nStartCol,nStartRow, nEndCol,nEndRow, nVisTab ); //TODO/LATER: different methods for setting VisArea?! const_cast<ScDocShell*>(this)->SfxObjectShell::SetVisArea( aNewArea ); @@ -2059,7 +2059,7 @@ void SnapVer( const ScDocument& rDoc, SCTAB nTab, long& rVal, SCROW& rStartRow ) } -void ScDocShell::SnapVisArea( Rectangle& rRect ) const +void ScDocShell::SnapVisArea( tools::Rectangle& rRect ) const { SCTAB nTab = aDocument.GetVisibleTab(); bool bNegativePage = aDocument.IsNegativePage( nTab ); @@ -2270,7 +2270,7 @@ void ScDocShell::LOKCommentNotify(LOKCommentNotificationType nType, const ScDocu const double fPPTX = pViewData->GetPPTX(); const double fPPTY = pViewData->GetPPTY(); - Rectangle aRect(Point(aScrPos.getX() / fPPTX, aScrPos.getY() / fPPTY), + tools::Rectangle aRect(Point(aScrPos.getX() / fPPTX, aScrPos.getY() / fPPTY), Size(nSizeXPix / fPPTX, nSizeYPix / fPPTY)); aAnnotation.put("cellPos", aRect.toString()); diff --git a/sc/source/ui/docshell/docsh6.cxx b/sc/source/ui/docshell/docsh6.cxx index 66ecd7182b85..7c9353497a63 100644 --- a/sc/source/ui/docshell/docsh6.cxx +++ b/sc/source/ui/docshell/docsh6.cxx @@ -53,14 +53,14 @@ struct ScStylePair // Ole -void ScDocShell::SetVisArea( const Rectangle & rVisArea ) +void ScDocShell::SetVisArea( const tools::Rectangle & rVisArea ) { // with the SnapVisArea call in SetVisAreaOrSize, it's safe to always // use both the size and position of the VisArea SetVisAreaOrSize( rVisArea ); } -static void lcl_SetTopRight( Rectangle& rRect, const Point& rPos ) +static void lcl_SetTopRight( tools::Rectangle& rRect, const Point& rPos ) { Size aSize = rRect.GetSize(); rRect.Right() = rPos.X(); @@ -69,11 +69,11 @@ static void lcl_SetTopRight( Rectangle& rRect, const Point& rPos ) rRect.Bottom() = rPos.Y() + aSize.Height() - 1; } -void ScDocShell::SetVisAreaOrSize( const Rectangle& rVisArea ) +void ScDocShell::SetVisAreaOrSize( const tools::Rectangle& rVisArea ) { bool bNegativePage = aDocument.IsNegativePage( aDocument.GetVisibleTab() ); - Rectangle aArea = rVisArea; + tools::Rectangle aArea = rVisArea; // when loading, don't check for negative values, because the sheet orientation // might be set later if ( !aDocument.IsImportingXML() ) @@ -158,8 +158,8 @@ void ScDocShell::UpdateOle( const ScViewData* pViewData, bool bSnapSize ) OSL_ENSURE(pViewData,"pViewData==0 bei ScDocShell::UpdateOle"); - Rectangle aOldArea = SfxObjectShell::GetVisArea(); - Rectangle aNewArea = aOldArea; + tools::Rectangle aOldArea = SfxObjectShell::GetVisArea(); + tools::Rectangle aNewArea = aOldArea; bool bEmbedded = aDocument.IsEmbedded(); if (bEmbedded) @@ -173,7 +173,7 @@ void ScDocShell::UpdateOle( const ScViewData* pViewData, bool bSnapSize ) bool bNegativePage = aDocument.IsNegativePage( nTab ); SCCOL nX = pViewData->GetPosX(SC_SPLIT_LEFT); SCROW nY = pViewData->GetPosY(SC_SPLIT_BOTTOM); - Rectangle aMMRect = aDocument.GetMMRect( nX,nY, nX,nY, nTab ); + tools::Rectangle aMMRect = aDocument.GetMMRect( nX,nY, nX,nY, nTab ); if (bNegativePage) lcl_SetTopRight( aNewArea, aMMRect.TopRight() ); else diff --git a/sc/source/ui/drawfunc/drawsh2.cxx b/sc/source/ui/drawfunc/drawsh2.cxx index 8bdf4b493582..b9ea261c7696 100644 --- a/sc/source/ui/drawfunc/drawsh2.cxx +++ b/sc/source/ui/drawfunc/drawsh2.cxx @@ -308,7 +308,7 @@ void ScDrawShell::GetDrawAttrState( SfxItemSet& rSet ) bool bActionItem = false; if ( pDrView->IsAction() ) // action rectangle { - Rectangle aRect; + tools::Rectangle aRect; pDrView->TakeActionRect( aRect ); if ( !aRect.IsEmpty() ) { @@ -323,7 +323,7 @@ void ScDrawShell::GetDrawAttrState( SfxItemSet& rSet ) { if ( pDrView->AreObjectsMarked() ) // selected objects { - Rectangle aRect = pDrView->GetAllMarkedRect(); + tools::Rectangle aRect = pDrView->GetAllMarkedRect(); pPV->LogicToPagePos(aRect); rSet.Put( SfxPointItem( SID_ATTR_POSITION, aRect.TopLeft() ) ); Size aSize( aRect.Right() - aRect.Left(), aRect.Bottom() - aRect.Top() ); diff --git a/sc/source/ui/drawfunc/drtxtob.cxx b/sc/source/ui/drawfunc/drtxtob.cxx index 560183b53521..e891c27b1397 100644 --- a/sc/source/ui/drawfunc/drtxtob.cxx +++ b/sc/source/ui/drawfunc/drtxtob.cxx @@ -800,7 +800,7 @@ void ScDrawTextObjectBar::ExecuteAttr( SfxRequest &rReq ) OutlinerView* pOutView = pView->IsTextEdit() ? pView->GetTextEditOutlinerView() : nullptr; if ( pOutView ) - pOutView->Paint( Rectangle() ); + pOutView->Paint( tools::Rectangle() ); SfxItemSet aEmptyAttr( *aEditAttr.GetPool(), EE_ITEMS_START, EE_ITEMS_END ); pView->SetAttributes( aEmptyAttr, true ); diff --git a/sc/source/ui/drawfunc/fuconarc.cxx b/sc/source/ui/drawfunc/fuconarc.cxx index 2fdbafb4a75e..b6f3f66d6177 100644 --- a/sc/source/ui/drawfunc/fuconarc.cxx +++ b/sc/source/ui/drawfunc/fuconarc.cxx @@ -152,7 +152,7 @@ void FuConstArc::Deactivate() } // Create default drawing objects via keyboard -SdrObject* FuConstArc::CreateDefaultObject(const sal_uInt16 nID, const Rectangle& rRectangle) +SdrObject* FuConstArc::CreateDefaultObject(const sal_uInt16 nID, const tools::Rectangle& rRectangle) { // case SID_DRAW_ARC: // case SID_DRAW_PIE: @@ -166,7 +166,7 @@ SdrObject* FuConstArc::CreateDefaultObject(const sal_uInt16 nID, const Rectangle { if(dynamic_cast<const SdrCircObj*>( pObj) != nullptr) { - Rectangle aRect(rRectangle); + tools::Rectangle aRect(rRectangle); if(SID_DRAW_ARC == nID || SID_DRAW_CIRCLECUT == nID) { diff --git a/sc/source/ui/drawfunc/fuconcustomshape.cxx b/sc/source/ui/drawfunc/fuconcustomshape.cxx index 299236908121..45c562a4048f 100644 --- a/sc/source/ui/drawfunc/fuconcustomshape.cxx +++ b/sc/source/ui/drawfunc/fuconcustomshape.cxx @@ -159,14 +159,14 @@ void FuConstCustomShape::Deactivate() } // Create default drawing objects via keyboard -SdrObject* FuConstCustomShape::CreateDefaultObject(const sal_uInt16 /* nID */, const Rectangle& rRectangle) +SdrObject* FuConstCustomShape::CreateDefaultObject(const sal_uInt16 /* nID */, const tools::Rectangle& rRectangle) { SdrObject* pObj = SdrObjFactory::MakeNewObject( pView->GetCurrentObjInventor(), pView->GetCurrentObjIdentifier(), nullptr, pDrDoc); if( pObj ) { - Rectangle aRectangle( rRectangle ); + tools::Rectangle aRectangle( rRectangle ); SetAttributes( pObj ); if ( SdrObjCustomShape::doConstructOrthogonal( aCustomShape ) ) ImpForceQuadratic( aRectangle ); diff --git a/sc/source/ui/drawfunc/fuconpol.cxx b/sc/source/ui/drawfunc/fuconpol.cxx index 5bf7345d0aaa..a92d1ef73bdc 100644 --- a/sc/source/ui/drawfunc/fuconpol.cxx +++ b/sc/source/ui/drawfunc/fuconpol.cxx @@ -215,7 +215,7 @@ void FuConstPolygon::Deactivate() } // Create default drawing objects via keyboard -SdrObject* FuConstPolygon::CreateDefaultObject(const sal_uInt16 nID, const Rectangle& rRectangle) +SdrObject* FuConstPolygon::CreateDefaultObject(const sal_uInt16 nID, const tools::Rectangle& rRectangle) { // case SID_DRAW_XPOLYGON: // case SID_DRAW_XPOLYGON_NOFILL: diff --git a/sc/source/ui/drawfunc/fuconrec.cxx b/sc/source/ui/drawfunc/fuconrec.cxx index d76b1ef7c9d9..08cbcdc2f031 100644 --- a/sc/source/ui/drawfunc/fuconrec.cxx +++ b/sc/source/ui/drawfunc/fuconrec.cxx @@ -389,7 +389,7 @@ void FuConstRectangle::Deactivate() } // Create default drawing objects via keyboard -SdrObject* FuConstRectangle::CreateDefaultObject(const sal_uInt16 nID, const Rectangle& rRectangle) +SdrObject* FuConstRectangle::CreateDefaultObject(const sal_uInt16 nID, const tools::Rectangle& rRectangle) { SdrObject* pObj = SdrObjFactory::MakeNewObject( pView->GetCurrentObjInventor(), pView->GetCurrentObjIdentifier(), @@ -397,7 +397,7 @@ SdrObject* FuConstRectangle::CreateDefaultObject(const sal_uInt16 nID, const Rec if(pObj) { - Rectangle aRect(rRectangle); + tools::Rectangle aRect(rRectangle); Point aStart = aRect.TopLeft(); Point aEnd = aRect.BottomRight(); diff --git a/sc/source/ui/drawfunc/fuconstr.cxx b/sc/source/ui/drawfunc/fuconstr.cxx index 343262832353..f93fa34c8b6c 100644 --- a/sc/source/ui/drawfunc/fuconstr.cxx +++ b/sc/source/ui/drawfunc/fuconstr.cxx @@ -74,7 +74,7 @@ Point FuConstruct::CurrentGridSyncOffsetAndPos( Point& rInOutPos ) // that's the actual correct position for the object (when you // restore the zoom. bool bNegative = pDoc->IsNegativePage(pView->GetTab()); - Rectangle aObjRect( rInOutPos, rInOutPos ); + tools::Rectangle aObjRect( rInOutPos, rInOutPos ); ScRange aRange = pDoc->GetRange( pView->GetTab(), aObjRect ); ScAddress aOldStt = aRange.aStart; Point aOldPos( pDoc->GetColOffset( aOldStt.Col(), aOldStt.Tab() ), pDoc->GetRowOffset( aOldStt.Row(), aOldStt.Tab() ) ); diff --git a/sc/source/ui/drawfunc/fuconuno.cxx b/sc/source/ui/drawfunc/fuconuno.cxx index dfb4f0f09b0e..416d24ad0609 100644 --- a/sc/source/ui/drawfunc/fuconuno.cxx +++ b/sc/source/ui/drawfunc/fuconuno.cxx @@ -142,7 +142,7 @@ void FuConstUnoControl::Deactivate() } // Create default drawing objects via keyboard -SdrObject* FuConstUnoControl::CreateDefaultObject(const sal_uInt16 /* nID */, const Rectangle& rRectangle) +SdrObject* FuConstUnoControl::CreateDefaultObject(const sal_uInt16 /* nID */, const tools::Rectangle& rRectangle) { // case SID_FM_CREATE_CONTROL: diff --git a/sc/source/ui/drawfunc/fudraw.cxx b/sc/source/ui/drawfunc/fudraw.cxx index 16cf0a6b4830..ef4f06d41784 100644 --- a/sc/source/ui/drawfunc/fudraw.cxx +++ b/sc/source/ui/drawfunc/fudraw.cxx @@ -345,7 +345,7 @@ bool FuDraw::KeyInput(const KeyEvent& rKEvt) if(pHdl) { Point aHdlPosition(pHdl->GetPos()); - Rectangle aVisRect(aHdlPosition - Point(100, 100), Size(200, 200)); + tools::Rectangle aVisRect(aHdlPosition - Point(100, 100), Size(200, 200)); pView->MakeVisible(aVisRect, *pWindow); } @@ -489,11 +489,11 @@ bool FuDraw::KeyInput(const KeyEvent& rKEvt) if(pView->IsMoveAllowed()) { // restrict movement to WorkArea - const Rectangle& rWorkArea = pView->GetWorkArea(); + const tools::Rectangle& rWorkArea = pView->GetWorkArea(); if(!rWorkArea.IsEmpty()) { - Rectangle aMarkRect(pView->GetMarkedObjRect()); + tools::Rectangle aMarkRect(pView->GetMarkedObjRect()); aMarkRect.Move(nX, nY); if(!aMarkRect.IsInside(rWorkArea)) @@ -564,7 +564,7 @@ bool FuDraw::KeyInput(const KeyEvent& rKEvt) } // make moved handle visible - Rectangle aVisRect(aEndPoint - Point(100, 100), Size(200, 200)); + tools::Rectangle aVisRect(aEndPoint - Point(100, 100), Size(200, 200)); pView->MakeVisible(aVisRect, *pWindow); bReturn = true; diff --git a/sc/source/ui/drawfunc/fuins1.cxx b/sc/source/ui/drawfunc/fuins1.cxx index 6235ededa0ce..12b6b75614cc 100644 --- a/sc/source/ui/drawfunc/fuins1.cxx +++ b/sc/source/ui/drawfunc/fuins1.cxx @@ -150,7 +150,7 @@ static void lcl_InsertGraphic( const Graphic& rGraphic, ScLimitSizeOnDrawPage( aLogicSize, aInsertPos, pPage->GetSize() ); - Rectangle aRect ( aInsertPos, aLogicSize ); + tools::Rectangle aRect ( aInsertPos, aLogicSize ); SdrGrafObj* pObj = new SdrGrafObj( rGraphic, aRect ); @@ -211,7 +211,7 @@ static void lcl_InsertMedia( const OUString& rMediaURL, bool bApi, if (!bRet) { return; } } - SdrMediaObj* pObj = new SdrMediaObj( Rectangle( aInsertPos, aSize ) ); + SdrMediaObj* pObj = new SdrMediaObj( tools::Rectangle( aInsertPos, aSize ) ); pObj->SetModel(rData.GetDocument()->GetDrawLayer()); // set before setURL pObj->setURL( realURL, ""/*TODO?*/ ); diff --git a/sc/source/ui/drawfunc/fuins2.cxx b/sc/source/ui/drawfunc/fuins2.cxx index e9e63046bdea..f4859a00fe59 100644 --- a/sc/source/ui/drawfunc/fuins2.cxx +++ b/sc/source/ui/drawfunc/fuins2.cxx @@ -336,7 +336,7 @@ FuInsertOLE::FuInsertOLE(ScTabViewShell* pViewSh, vcl::Window* pWin, ScDrawView* Point aPnt = pViewSh->GetInsertPos(); if ( rData.GetDocument()->IsNegativePage( rData.GetTabNo() ) ) aPnt.X() -= aSize.Width(); // move position to left edge - Rectangle aRect (aPnt, aSize); + tools::Rectangle aRect (aPnt, aSize); SdrOle2Obj* pObj = new SdrOle2Obj( aObjRef, aName, aRect); SdrPageView* pPV = pView->GetSdrPageView(); pView->InsertObjectAtView(pObj, *pPV); @@ -472,7 +472,7 @@ FuInsertChart::FuInsertChart(ScTabViewShell* pViewSh, vcl::Window* pWin, ScDrawV xChartModel->lockControllers(); ScRangeListRef aDummy; - Rectangle aMarkDest; + tools::Rectangle aMarkDest; SCTAB nMarkTab; bool bDrawRect = pViewShell->GetChartArea( aDummy, aMarkDest, nMarkTab ); @@ -581,7 +581,7 @@ FuInsertChart::FuInsertChart(ScTabViewShell* pViewSh, vcl::Window* pWin, ScDrawV aStart = pViewSh->GetChartInsertPos( aSize, aPositionRange ); } - Rectangle aRect (aStart, aSize); + tools::Rectangle aRect (aStart, aSize); SdrOle2Obj* pObj = new SdrOle2Obj( svt::EmbeddedObjectRef( xObj, nAspect ), aName, aRect); SdrPageView* pPV = pView->GetSdrPageView(); @@ -747,7 +747,7 @@ FuInsertChartFromFile::FuInsertChartFromFile( ScTabViewShell* pViewSh, vcl::Wind ScRange aPositionRange = pViewSh->GetViewData().GetCurPos(); Point aStart = pViewSh->GetChartInsertPos( aSize, aPositionRange ); - Rectangle aRect (aStart, aSize); + tools::Rectangle aRect (aStart, aSize); SdrOle2Obj* pObj = new SdrOle2Obj( svt::EmbeddedObjectRef( xObj, nAspect ), aName, aRect); SdrPageView* pPV = pView->GetSdrPageView(); diff --git a/sc/source/ui/drawfunc/fupoor.cxx b/sc/source/ui/drawfunc/fupoor.cxx index b5632ea7a02d..f6f071dc40ae 100644 --- a/sc/source/ui/drawfunc/fupoor.cxx +++ b/sc/source/ui/drawfunc/fupoor.cxx @@ -255,23 +255,23 @@ void FuPoor::StopDragTimer() |* \************************************************************************/ -SdrObject* FuPoor::CreateDefaultObject(const sal_uInt16 /* nID */, const Rectangle& /* rRectangle */) +SdrObject* FuPoor::CreateDefaultObject(const sal_uInt16 /* nID */, const tools::Rectangle& /* rRectangle */) { // empty base implementation return nullptr; } -void FuPoor::ImpForceQuadratic(Rectangle& rRect) +void FuPoor::ImpForceQuadratic(tools::Rectangle& rRect) { if(rRect.GetWidth() > rRect.GetHeight()) { - rRect = Rectangle( + rRect = tools::Rectangle( Point(rRect.Left() + ((rRect.GetWidth() - rRect.GetHeight()) / 2), rRect.Top()), Size(rRect.GetHeight(), rRect.GetHeight())); } else { - rRect = Rectangle( + rRect = tools::Rectangle( Point(rRect.Left(), rRect.Top() + ((rRect.GetHeight() - rRect.GetWidth()) / 2)), Size(rRect.GetWidth(), rRect.GetWidth())); } diff --git a/sc/source/ui/drawfunc/futext.cxx b/sc/source/ui/drawfunc/futext.cxx index f672ce2894c3..d6202d55d41a 100644 --- a/sc/source/ui/drawfunc/futext.cxx +++ b/sc/source/ui/drawfunc/futext.cxx @@ -643,7 +643,7 @@ void FuText::SetInEditMode(SdrObject* pObj, const Point* pMousePixel, } // Create default drawing objects via keyboard -SdrObject* FuText::CreateDefaultObject(const sal_uInt16 nID, const Rectangle& rRectangle) +SdrObject* FuText::CreateDefaultObject(const sal_uInt16 nID, const tools::Rectangle& rRectangle) { // case SID_DRAW_TEXT: // case SID_DRAW_TEXT_VERTICAL: diff --git a/sc/source/ui/inc/AccessibleCell.hxx b/sc/source/ui/inc/AccessibleCell.hxx index ec9a125ea823..9f6652d26e60 100644 --- a/sc/source/ui/inc/AccessibleCell.hxx +++ b/sc/source/ui/inc/AccessibleCell.hxx @@ -91,10 +91,10 @@ public: protected: /// Return the object's current bounding box relative to the desktop. - virtual Rectangle GetBoundingBoxOnScreen() const override; + virtual tools::Rectangle GetBoundingBoxOnScreen() const override; /// Return the object's current bounding box relative to the parent object. - virtual Rectangle GetBoundingBox() const override; + virtual tools::Rectangle GetBoundingBox() const override; public: ///===== XAccessibleContext ============================================== diff --git a/sc/source/ui/inc/AccessibleContextBase.hxx b/sc/source/ui/inc/AccessibleContextBase.hxx index bb444c2e984e..f1f204b2df65 100644 --- a/sc/source/ui/inc/AccessibleContextBase.hxx +++ b/sc/source/ui/inc/AccessibleContextBase.hxx @@ -41,7 +41,7 @@ #include <cppuhelper/implbase1.hxx> #include <comphelper/servicehelper.hxx> -class Rectangle; +namespace tools { class Rectangle; } /** @descr This base class provides an implementation of the @@ -237,12 +237,12 @@ protected: /// Return the object's current bounding box relative to the desktop. /// /// @throws css::uno::RuntimeException - virtual Rectangle GetBoundingBoxOnScreen() const; + virtual tools::Rectangle GetBoundingBoxOnScreen() const; /// Return the object's current bounding box relative to the parent object. /// /// @throws css::uno::RuntimeException - virtual Rectangle GetBoundingBox() const; + virtual tools::Rectangle GetBoundingBox() const; public: /// Calls all Listener to tell they the change. diff --git a/sc/source/ui/inc/AccessibleCsvControl.hxx b/sc/source/ui/inc/AccessibleCsvControl.hxx index 234ca326f784..8f0fad53b70f 100644 --- a/sc/source/ui/inc/AccessibleCsvControl.hxx +++ b/sc/source/ui/inc/AccessibleCsvControl.hxx @@ -83,9 +83,9 @@ public: // helpers ---------------------------------------------------------------- protected: /** Returns this object's current bounding box relative to the desktop. */ - virtual Rectangle GetBoundingBoxOnScreen() const override; + virtual tools::Rectangle GetBoundingBoxOnScreen() const override; /** Returns this object's current bounding box relative to the parent object. */ - virtual Rectangle GetBoundingBox() const override; + virtual tools::Rectangle GetBoundingBox() const override; /** Returns whether the object is alive. Must be called with locked mutex. */ bool implIsAlive() const { return !rBHelper.bDisposed && !rBHelper.bInDispose && mpControl; } @@ -527,9 +527,9 @@ public: // helpers ---------------------------------------------------------------- protected: /** Returns this object's current bounding box relative to the desktop. */ - virtual Rectangle GetBoundingBoxOnScreen() const override; + virtual tools::Rectangle GetBoundingBoxOnScreen() const override; /** Returns this object's current bounding box relative to the parent object. */ - virtual Rectangle GetBoundingBox() const override; + virtual tools::Rectangle GetBoundingBox() const override; private: /** Returns this object's name. */ @@ -546,7 +546,7 @@ private: /** Returns the pixel size of the cell, regardless of visibility. */ Size implGetRealSize() const; /** Returns the bounding box of the cell relative in the table. */ - Rectangle implGetBoundingBox() const; + tools::Rectangle implGetBoundingBox() const; /** Creates the edit source the text helper needs. */ ::std::unique_ptr< SvxEditSource > implCreateEditSource(); diff --git a/sc/source/ui/inc/AccessibleDocument.hxx b/sc/source/ui/inc/AccessibleDocument.hxx index 6a01e699a197..d37befd53e48 100644 --- a/sc/source/ui/inc/AccessibleDocument.hxx +++ b/sc/source/ui/inc/AccessibleDocument.hxx @@ -178,7 +178,7 @@ public: The rectangle of the visible part of the document. The values are, contrary to the base class, in internal coordinates. */ - virtual Rectangle GetVisibleArea() const override; + virtual tools::Rectangle GetVisibleArea() const override; /** Transform the specified point from internal coordinates to an absolute screen position. @@ -220,10 +220,10 @@ protected: createAccessibleName() override; /// Return the object's current bounding box relative to the desktop. - virtual Rectangle GetBoundingBoxOnScreen() const override; + virtual tools::Rectangle GetBoundingBoxOnScreen() const override; /// Return the object's current bounding box relative to the parent object. - virtual Rectangle GetBoundingBox() const override; + virtual tools::Rectangle GetBoundingBox() const override; private: ScTabViewShell* mpViewShell; @@ -232,7 +232,7 @@ private: ScChildrenShapes* mpChildrenShapes; ScAccessibleEditObject* mpTempAccEdit; css::uno::Reference<css::accessibility::XAccessible> mxTempAcc; - Rectangle maVisArea; + tools::Rectangle maVisArea; bool mbCompleteSheetSelected; public: @@ -252,7 +252,7 @@ private: OUString GetCurrentCellName() const; static OUString GetCurrentCellDescription(); - Rectangle GetVisibleArea_Impl() const; + tools::Rectangle GetVisibleArea_Impl() const; css::uno::Sequence< css::uno::Any > GetScAccFlowToSequence(); public: ScDocument *GetDocument() const ; diff --git a/sc/source/ui/inc/AccessibleDocumentPagePreview.hxx b/sc/source/ui/inc/AccessibleDocumentPagePreview.hxx index 450c51c1ed0e..1d55304708a3 100644 --- a/sc/source/ui/inc/AccessibleDocumentPagePreview.hxx +++ b/sc/source/ui/inc/AccessibleDocumentPagePreview.hxx @@ -109,11 +109,11 @@ protected: public: // needed in ScShapeChildren /// Return the object's current bounding box relative to the desktop. - virtual Rectangle GetBoundingBoxOnScreen() const override; + virtual tools::Rectangle GetBoundingBoxOnScreen() const override; protected: /// Return the object's current bounding box relative to the parent object. - virtual Rectangle GetBoundingBox() const override; + virtual tools::Rectangle GetBoundingBox() const override; private: ScPreviewShell* mpViewShell; diff --git a/sc/source/ui/inc/AccessibleEditObject.hxx b/sc/source/ui/inc/AccessibleEditObject.hxx index 962a36af1daa..2220e9a3433b 100644 --- a/sc/source/ui/inc/AccessibleEditObject.hxx +++ b/sc/source/ui/inc/AccessibleEditObject.hxx @@ -85,10 +85,10 @@ public: protected: /// Return the object's current bounding box relative to the desktop. - virtual Rectangle GetBoundingBoxOnScreen() const override; + virtual tools::Rectangle GetBoundingBoxOnScreen() const override; /// Return the object's current bounding box relative to the parent object. - virtual Rectangle GetBoundingBox() const override; + virtual tools::Rectangle GetBoundingBox() const override; public: ///===== XAccessibleContext ============================================== diff --git a/sc/source/ui/inc/AccessiblePageHeader.hxx b/sc/source/ui/inc/AccessiblePageHeader.hxx index a5ad2cec6aa2..20c9285f2ed5 100644 --- a/sc/source/ui/inc/AccessiblePageHeader.hxx +++ b/sc/source/ui/inc/AccessiblePageHeader.hxx @@ -72,8 +72,8 @@ protected: virtual OUString SAL_CALL createAccessibleDescription() override; virtual OUString SAL_CALL createAccessibleName() override; - virtual Rectangle GetBoundingBoxOnScreen() const override; - virtual Rectangle GetBoundingBox() const override; + virtual tools::Rectangle GetBoundingBoxOnScreen() const override; + virtual tools::Rectangle GetBoundingBox() const override; private: ScPreviewShell* mpViewShell; diff --git a/sc/source/ui/inc/AccessiblePageHeaderArea.hxx b/sc/source/ui/inc/AccessiblePageHeaderArea.hxx index c66d84a80dfe..a2f87adc44eb 100644 --- a/sc/source/ui/inc/AccessiblePageHeaderArea.hxx +++ b/sc/source/ui/inc/AccessiblePageHeaderArea.hxx @@ -100,8 +100,8 @@ protected: virtual OUString SAL_CALL createAccessibleDescription() override; virtual OUString SAL_CALL createAccessibleName() override; - virtual Rectangle GetBoundingBoxOnScreen() const override; - virtual Rectangle GetBoundingBox() const override; + virtual tools::Rectangle GetBoundingBoxOnScreen() const override; + virtual tools::Rectangle GetBoundingBox() const override; private: EditTextObject* mpEditObj; diff --git a/sc/source/ui/inc/AccessiblePreviewCell.hxx b/sc/source/ui/inc/AccessiblePreviewCell.hxx index ba9212ead0b5..e40f0faad7cd 100644 --- a/sc/source/ui/inc/AccessiblePreviewCell.hxx +++ b/sc/source/ui/inc/AccessiblePreviewCell.hxx @@ -79,8 +79,8 @@ public: getImplementationId() override; protected: - virtual Rectangle GetBoundingBoxOnScreen() const override; - virtual Rectangle GetBoundingBox() const override; + virtual tools::Rectangle GetBoundingBoxOnScreen() const override; + virtual tools::Rectangle GetBoundingBox() const override; private: ScPreviewShell* mpViewShell; diff --git a/sc/source/ui/inc/AccessiblePreviewHeaderCell.hxx b/sc/source/ui/inc/AccessiblePreviewHeaderCell.hxx index 381b45032711..de9bb7834086 100644 --- a/sc/source/ui/inc/AccessiblePreviewHeaderCell.hxx +++ b/sc/source/ui/inc/AccessiblePreviewHeaderCell.hxx @@ -109,8 +109,8 @@ protected: virtual OUString SAL_CALL createAccessibleDescription() override; virtual OUString SAL_CALL createAccessibleName() override; - virtual Rectangle GetBoundingBoxOnScreen() const override; - virtual Rectangle GetBoundingBox() const override; + virtual tools::Rectangle GetBoundingBoxOnScreen() const override; + virtual tools::Rectangle GetBoundingBox() const override; private: ScPreviewShell* mpViewShell; diff --git a/sc/source/ui/inc/AccessiblePreviewTable.hxx b/sc/source/ui/inc/AccessiblePreviewTable.hxx index adb5b5908a15..638dcdcbd8ae 100644 --- a/sc/source/ui/inc/AccessiblePreviewTable.hxx +++ b/sc/source/ui/inc/AccessiblePreviewTable.hxx @@ -118,8 +118,8 @@ protected: virtual OUString SAL_CALL createAccessibleDescription() override; virtual OUString SAL_CALL createAccessibleName() override; - virtual Rectangle GetBoundingBoxOnScreen() const override; - virtual Rectangle GetBoundingBox() const override; + virtual tools::Rectangle GetBoundingBoxOnScreen() const override; + virtual tools::Rectangle GetBoundingBox() const override; private: ScPreviewShell* mpViewShell; diff --git a/sc/source/ui/inc/AccessibleSpreadsheet.hxx b/sc/source/ui/inc/AccessibleSpreadsheet.hxx index 5cc6a6baf9af..14eef752fc77 100644 --- a/sc/source/ui/inc/AccessibleSpreadsheet.hxx +++ b/sc/source/ui/inc/AccessibleSpreadsheet.hxx @@ -211,16 +211,16 @@ private: protected: /// Return the object's current bounding box relative to the desktop. - virtual Rectangle GetBoundingBoxOnScreen() const override; + virtual tools::Rectangle GetBoundingBoxOnScreen() const override; /// Return the object's current bounding box relative to the parent object. - virtual Rectangle GetBoundingBox() const override; + virtual tools::Rectangle GetBoundingBox() const override; private: ScTabViewShell* mpViewShell; ScRangeList* mpMarkedRanges; ScAccessibleDocument* mpAccDoc; rtl::Reference<ScAccessibleCell> mpAccCell; - Rectangle maVisCells; + tools::Rectangle maVisCells; ScSplitPos meSplitPos; ScAddress maActiveCell; SCTAB mnTab; @@ -239,8 +239,8 @@ private: void SelectCell(sal_Int32 nRow, sal_Int32 nCol, bool bDeselect); static ScDocument* GetDocument(ScTabViewShell* pViewShell); - static Rectangle GetVisArea(ScTabViewShell* pViewShell, ScSplitPos eSplitPos); - Rectangle GetVisCells(const Rectangle& rVisArea); + static tools::Rectangle GetVisArea(ScTabViewShell* pViewShell, ScSplitPos eSplitPos); + tools::Rectangle GetVisCells(const tools::Rectangle& rVisArea); typedef std::vector<ScMyAddress> VEC_MYADDR; typedef std::map<ScMyAddress,css::uno::Reference< css::accessibility::XAccessible > > diff --git a/sc/source/ui/inc/AccessibleText.hxx b/sc/source/ui/inc/AccessibleText.hxx index 80e24952ef6d..c6d21fa9a690 100644 --- a/sc/source/ui/inc/AccessibleText.hxx +++ b/sc/source/ui/inc/AccessibleText.hxx @@ -265,7 +265,7 @@ private: TextForwarderPtr mpTextForwarder; ViewForwarderPtr mpViewForwarder; OUString maCellText; - Rectangle maBoundBox; + tools::Rectangle maBoundBox; Size maCellSize; public: @@ -273,7 +273,7 @@ public: vcl::Window* pWindow, EditEngine* pEditEngine, const OUString& rCellText, - const Rectangle& rBoundBox, + const tools::Rectangle& rBoundBox, const Size& rCellSize ); virtual ~ScAccessibleCsvTextData() override; diff --git a/sc/source/ui/inc/autofmt.hxx b/sc/source/ui/inc/autofmt.hxx index c274eefcf145..8df8a45c3a64 100644 --- a/sc/source/ui/inc/autofmt.hxx +++ b/sc/source/ui/inc/autofmt.hxx @@ -51,7 +51,7 @@ public: void NotifyChange( ScAutoFormatData* pNewData ); protected: - 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; private: @@ -76,7 +76,7 @@ private: SvNumberFormatter* pNumFmt; SAL_DLLPRIVATE void Init(); - SAL_DLLPRIVATE void DoPaint(vcl::RenderContext& rRenderContext, const Rectangle& rRect); + SAL_DLLPRIVATE void DoPaint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect); SAL_DLLPRIVATE void CalcCellArray(bool bFitWidth); SAL_DLLPRIVATE void CalcLineMap(); SAL_DLLPRIVATE void PaintCells(vcl::RenderContext& rRenderContext); diff --git a/sc/source/ui/inc/cbutton.hxx b/sc/source/ui/inc/cbutton.hxx index 7c229399ff68..ece8f4a58ba9 100644 --- a/sc/source/ui/inc/cbutton.hxx +++ b/sc/source/ui/inc/cbutton.hxx @@ -48,7 +48,7 @@ public: const Size& GetSizePixel() const { return aBtnSize; } private: - void ImpDrawArrow( const Rectangle& rRect ); + void ImpDrawArrow( const tools::Rectangle& rRect ); protected: VclPtr<OutputDevice> pOut; diff --git a/sc/source/ui/inc/checklistmenu.hxx b/sc/source/ui/inc/checklistmenu.hxx index 061d358edf6a..9c1a1f3fd07f 100644 --- a/sc/source/ui/inc/checklistmenu.hxx +++ b/sc/source/ui/inc/checklistmenu.hxx @@ -57,7 +57,7 @@ public: virtual void MouseButtonDown(const MouseEvent& rMEvt) override; virtual void MouseButtonUp(const MouseEvent& rMEvt) override; virtual void KeyInput(const KeyEvent& rKEvt) override; - virtual void Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) override; + virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) override; virtual css::uno::Reference<css::accessibility::XAccessible> CreateAccessible() override; void addMenuItem(const OUString& rText, Action* pAction); @@ -332,7 +332,7 @@ public: virtual void MouseMove(const MouseEvent& rMEvt) override; virtual bool EventNotify(NotifyEvent& rNEvt) override; - virtual void Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) override; + virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) override; virtual css::uno::Reference< css::accessibility::XAccessible > CreateAccessible() override; void setMemberSize(size_t n); @@ -344,7 +344,7 @@ public: bool isAllSelected() const; void getResult(ResultType& rResult); - void launch(const Rectangle& rRect); + void launch(const tools::Rectangle& rRect); void close(bool bOK); /** diff --git a/sc/source/ui/inc/client.hxx b/sc/source/ui/inc/client.hxx index b112dfd6459b..13d2a198c109 100644 --- a/sc/source/ui/inc/client.hxx +++ b/sc/source/ui/inc/client.hxx @@ -34,7 +34,7 @@ private: SdrGrafObj* pGrafEdit; virtual void ObjectAreaChanged() override; - virtual void RequestNewObjectArea( Rectangle& ) override; + virtual void RequestNewObjectArea( tools::Rectangle& ) override; virtual void ViewChanged() override; public: diff --git a/sc/source/ui/inc/csvcontrol.hxx b/sc/source/ui/inc/csvcontrol.hxx index 6aec2addad75..7ba7cf218828 100644 --- a/sc/source/ui/inc/csvcontrol.hxx +++ b/sc/source/ui/inc/csvcontrol.hxx @@ -362,7 +362,7 @@ public: // static helpers --------------------------------------------------------- /** Inverts a rectangle in the specified output device. */ - static void ImplInvertRect( OutputDevice& rOutDev, const Rectangle& rRect ); + static void ImplInvertRect( OutputDevice& rOutDev, const tools::Rectangle& rRect ); /** Returns direction code for the keys LEFT, RIGHT, HOME, END. @param bHomeEnd false = ignore HOME and END key. */ diff --git a/sc/source/ui/inc/csvgrid.hxx b/sc/source/ui/inc/csvgrid.hxx index c75f8ef32272..bdf91264c097 100644 --- a/sc/source/ui/inc/csvgrid.hxx +++ b/sc/source/ui/inc/csvgrid.hxx @@ -258,7 +258,7 @@ protected: // painting --------------------------------------------------------------- protected: - virtual void Paint( vcl::RenderContext& rRenderContext, const Rectangle& ) override; + virtual void Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& ) override; public: /** Redraws the entire data grid. */ diff --git a/sc/source/ui/inc/csvruler.hxx b/sc/source/ui/inc/csvruler.hxx index 709817c1711f..4caf30e36e31 100644 --- a/sc/source/ui/inc/csvruler.hxx +++ b/sc/source/ui/inc/csvruler.hxx @@ -49,7 +49,7 @@ private: bool mbPosMTMoved; /// Tracking: Anytime moved to another position? Size maWinSize; /// Size of the control. - Rectangle maActiveRect; /// The active area of the ruler. + tools::Rectangle maActiveRect; /// The active area of the ruler. sal_Int32 mnSplitSize; /// Size of a split circle. public: @@ -141,7 +141,7 @@ private: // painting --------------------------------------------------------------- protected: - virtual void Paint( vcl::RenderContext& rRenderContext, const Rectangle& ) override; + virtual void Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& ) override; public: /** Redraws the entire ruler. */ diff --git a/sc/source/ui/inc/docsh.hxx b/sc/source/ui/inc/docsh.hxx index a9349b4a54a9..d61ebac6e45a 100644 --- a/sc/source/ui/inc/docsh.hxx +++ b/sc/source/ui/inc/docsh.hxx @@ -209,16 +209,16 @@ public: virtual void Draw( OutputDevice *, const JobSetup & rSetup, sal_uInt16 nAspect = ASPECT_CONTENT ) override; - virtual void SetVisArea( const Rectangle & rVisArea ) override; + virtual void SetVisArea( const tools::Rectangle & rVisArea ) override; using SfxObjectShell::GetVisArea; - virtual Rectangle GetVisArea( sal_uInt16 nAspect ) const override; + virtual tools::Rectangle GetVisArea( sal_uInt16 nAspect ) const override; virtual Printer* GetDocumentPrinter() override; virtual void SetModified( bool = true ) override; - void SetVisAreaOrSize( const Rectangle& rVisArea ); + void SetVisAreaOrSize( const tools::Rectangle& rVisArea ); virtual VclPtr<SfxDocumentInfoDialog> CreateDocumentInfoDialog( const SfxItemSet &rSet ) override; @@ -424,7 +424,7 @@ public: virtual void SetProtectionPassword( const OUString &rPassword ) override; virtual bool GetProtectionHash( /*out*/ css::uno::Sequence< sal_Int8 > &rPasswordHash ) override; - void SnapVisArea( Rectangle& rRect ) const; + void SnapVisArea( tools::Rectangle& rRect ) const; void SetIsInUcalc(); }; diff --git a/sc/source/ui/inc/drawview.hxx b/sc/source/ui/inc/drawview.hxx index ea0813e6c978..f60d99d83e28 100644 --- a/sc/source/ui/inc/drawview.hxx +++ b/sc/source/ui/inc/drawview.hxx @@ -65,7 +65,7 @@ public: virtual void DoConnect(SdrOle2Obj* pOleObj) override; - virtual void MakeVisible( const Rectangle& rRect, vcl::Window& rWin ) override; + virtual void MakeVisible( const tools::Rectangle& rRect, vcl::Window& rWin ) override; virtual void DeleteMarked() override; diff --git a/sc/source/ui/inc/fuconarc.hxx b/sc/source/ui/inc/fuconarc.hxx index b0c1a63132cd..3612edd676f3 100644 --- a/sc/source/ui/inc/fuconarc.hxx +++ b/sc/source/ui/inc/fuconarc.hxx @@ -38,7 +38,7 @@ class FuConstArc : public FuConstruct virtual void Deactivate() override; // Create default drawing objects via keyboard - virtual SdrObject* CreateDefaultObject(const sal_uInt16 nID, const Rectangle& rRectangle) override; + virtual SdrObject* CreateDefaultObject(const sal_uInt16 nID, const tools::Rectangle& rRectangle) override; }; #endif // _SD_FUCONARC_HXX diff --git a/sc/source/ui/inc/fuconcustomshape.hxx b/sc/source/ui/inc/fuconcustomshape.hxx index 4b40eaa2e3ed..5f5c34d91330 100644 --- a/sc/source/ui/inc/fuconcustomshape.hxx +++ b/sc/source/ui/inc/fuconcustomshape.hxx @@ -41,7 +41,7 @@ public: virtual void Deactivate() override; // Create default drawing objects via keyboard - virtual SdrObject* CreateDefaultObject( const sal_uInt16 nID, const Rectangle& rRectangle ) override; + virtual SdrObject* CreateDefaultObject( const sal_uInt16 nID, const tools::Rectangle& rRectangle ) override; // #i33136# virtual bool doConstructOrthogonal() const override; diff --git a/sc/source/ui/inc/fuconpol.hxx b/sc/source/ui/inc/fuconpol.hxx index 73f843c05a81..acfaf8a16e5f 100644 --- a/sc/source/ui/inc/fuconpol.hxx +++ b/sc/source/ui/inc/fuconpol.hxx @@ -39,7 +39,7 @@ class FuConstPolygon : public FuConstruct virtual void Deactivate() override; // Create default drawing objects via keyboard - virtual SdrObject* CreateDefaultObject(const sal_uInt16 nID, const Rectangle& rRectangle) override; + virtual SdrObject* CreateDefaultObject(const sal_uInt16 nID, const tools::Rectangle& rRectangle) override; }; #endif // _FUCONPOL_HXX diff --git a/sc/source/ui/inc/fuconrec.hxx b/sc/source/ui/inc/fuconrec.hxx index d69d0e3def20..a44201151b05 100644 --- a/sc/source/ui/inc/fuconrec.hxx +++ b/sc/source/ui/inc/fuconrec.hxx @@ -39,7 +39,7 @@ class FuConstRectangle : public FuConstruct static void SetLineEnds(SfxItemSet& rAttr, SdrObject* pObj, sal_uInt16 nSlotId); // Create default drawing objects via keyboard - virtual SdrObject* CreateDefaultObject(const sal_uInt16 nID, const Rectangle& rRectangle) override; + virtual SdrObject* CreateDefaultObject(const sal_uInt16 nID, const tools::Rectangle& rRectangle) override; }; #endif // _SD_FUCONREC_HXX diff --git a/sc/source/ui/inc/fuconuno.hxx b/sc/source/ui/inc/fuconuno.hxx index b17cc84b5cc6..1d6e26f4a02f 100644 --- a/sc/source/ui/inc/fuconuno.hxx +++ b/sc/source/ui/inc/fuconuno.hxx @@ -44,7 +44,7 @@ public: virtual void Deactivate() override; // Create default drawing objects via keyboard - virtual SdrObject* CreateDefaultObject(const sal_uInt16 nID, const Rectangle& rRectangle) override; + virtual SdrObject* CreateDefaultObject(const sal_uInt16 nID, const tools::Rectangle& rRectangle) override; }; #endif // _SD_FUCONCTL_HXX diff --git a/sc/source/ui/inc/fupoor.hxx b/sc/source/ui/inc/fupoor.hxx index 9d82989071f0..5c3ba4fbf03d 100644 --- a/sc/source/ui/inc/fupoor.hxx +++ b/sc/source/ui/inc/fupoor.hxx @@ -97,10 +97,10 @@ public: void StopDragTimer(); // Create default drawing objects via keyboard - virtual SdrObject* CreateDefaultObject(const sal_uInt16 nID, const Rectangle& rRectangle); + virtual SdrObject* CreateDefaultObject(const sal_uInt16 nID, const tools::Rectangle& rRectangle); protected: - static void ImpForceQuadratic(Rectangle& rRect); + static void ImpForceQuadratic(tools::Rectangle& rRect); public: // #i33136# diff --git a/sc/source/ui/inc/futext.hxx b/sc/source/ui/inc/futext.hxx index d7ec42084552..9863fc987036 100644 --- a/sc/source/ui/inc/futext.hxx +++ b/sc/source/ui/inc/futext.hxx @@ -53,7 +53,7 @@ public: void StopEditMode(); // Create default drawing objects via keyboard - virtual SdrObject* CreateDefaultObject(const sal_uInt16 nID, const Rectangle& rRectangle) override; + virtual SdrObject* CreateDefaultObject(const sal_uInt16 nID, const tools::Rectangle& rRectangle) override; private: SdrOutliner* MakeOutliner(); diff --git a/sc/source/ui/inc/gridwin.hxx b/sc/source/ui/inc/gridwin.hxx index 93f50dc83516..a9c33ea6555f 100644 --- a/sc/source/ui/inc/gridwin.hxx +++ b/sc/source/ui/inc/gridwin.hxx @@ -101,7 +101,7 @@ class ScGridWindow : public vcl::Window, public DropTargetHelper, public DragSou std::unique_ptr<sdr::overlay::OverlayObjectList> mpOOHeader; std::unique_ptr<sdr::overlay::OverlayObjectList> mpOOShrink; - std::unique_ptr<Rectangle> mpAutoFillRect; + std::unique_ptr<tools::Rectangle> mpAutoFillRect; struct MouseEventState; @@ -172,12 +172,12 @@ class ScGridWindow : public vcl::Window, public DropTargetHelper, public DragSou Point aCurMousePos; sal_uInt16 nPaintCount; - Rectangle aRepaintPixel; + tools::Rectangle aRepaintPixel; ScAddress aAutoMarkPos; ScAddress aListValPos; - Rectangle aInvertRect; + tools::Rectangle aInvertRect; RfCorner aRFSelectedCorned; @@ -220,7 +220,7 @@ class ScGridWindow : public vcl::Window, public DropTargetHelper, public DragSou void PagebreakMove( const MouseEvent& rMEvt, bool bUp ); - void UpdateDragRect( bool bShowRange, const Rectangle& rPosRect ); + void UpdateDragRect( bool bShowRange, const tools::Rectangle& rPosRect ); bool IsAutoFilterActive( SCCOL nCol, SCROW nRow, SCTAB nTab ); void FilterSelect( sal_uLong nSel ); @@ -250,9 +250,9 @@ class ScGridWindow : public vcl::Window, public DropTargetHelper, public DragSou bool IsMyModel(SdrEditView* pSdrView); void DrawRedraw( ScOutputData& rOutputData, sal_uLong nLayer ); - void DrawSdrGrid( const Rectangle& rDrawingRect, OutputDevice* pContentDev ); + void DrawSdrGrid( const tools::Rectangle& rDrawingRect, OutputDevice* pContentDev ); void DrawAfterScroll(); - Rectangle GetListValButtonRect( const ScAddress& rButtonPos ); + tools::Rectangle GetListValButtonRect( const ScAddress& rButtonPos ); void DrawPagePreview( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, vcl::RenderContext& rRenderContext); @@ -279,12 +279,12 @@ class ScGridWindow : public vcl::Window, public DropTargetHelper, public DragSou void SelectForContextMenu( const Point& rPosPixel, SCsCOL nCellX, SCsROW nCellY ); - void GetSelectionRects( ::std::vector< Rectangle >& rPixelRects ); + void GetSelectionRects( ::std::vector< tools::Rectangle >& rPixelRects ); protected: virtual void PrePaint(vcl::RenderContext& rRenderContext) override; - virtual void Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) override; + virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) override; virtual void GetFocus() override; virtual void LoseFocus() override; @@ -321,14 +321,14 @@ public: long nTileWidth, long nTileHeight ); /// @see OutputDevice::LogicInvalidate(). - void LogicInvalidate(const Rectangle* pRectangle) override; + void LogicInvalidate(const tools::Rectangle* pRectangle) override; /// Update the cell selection according to what handles have been dragged. /// @see vcl::ITiledRenderable::setTextSelection() for the values of nType. /// Coordinates are in pixels. void SetCellSelectionPixel(int nType, int nPixelX, int nPixelY); /// Get the cell selection, coordinates are in logic units. - void GetCellSelection(std::vector<Rectangle>& rLogicRects); + void GetCellSelection(std::vector<tools::Rectangle>& rLogicRects); virtual css::uno::Reference< css::accessibility::XAccessible > CreateAccessible() override; @@ -391,7 +391,7 @@ public: bool NeedsRepaint() { return bNeedsRepaint; } - void DoInvertRect( const Rectangle& rPixel ); + void DoInvertRect( const tools::Rectangle& rPixel ); void CheckNeedsRepaint(); diff --git a/sc/source/ui/inc/hdrcont.hxx b/sc/source/ui/inc/hdrcont.hxx index c1d8ca93a13a..6410e2ce142c 100644 --- a/sc/source/ui/inc/hdrcont.hxx +++ b/sc/source/ui/inc/hdrcont.hxx @@ -75,7 +75,7 @@ protected: // Window overrides - virtual void Paint( vcl::RenderContext& rRenderContext, const Rectangle& rRect ) override; + virtual void Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect ) override; virtual void MouseMove( const MouseEvent& rMEvt ) override; virtual void MouseButtonUp( const MouseEvent& rMEvt ) override; diff --git a/sc/source/ui/inc/inputwin.hxx b/sc/source/ui/inc/inputwin.hxx index b53d794d5fbf..5d77877a9a82 100644 --- a/sc/source/ui/inc/inputwin.hxx +++ b/sc/source/ui/inc/inputwin.hxx @@ -106,7 +106,7 @@ public: DECL_LINK(ModifyHdl, LinkParamNone*, void); protected: - virtual void Paint( vcl::RenderContext& rRenderContext, const Rectangle& rRect ) override; + virtual void Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect ) override; virtual void MouseMove( const MouseEvent& rMEvt ) override; virtual void MouseButtonDown( const MouseEvent& rMEvt ) override; @@ -228,7 +228,7 @@ public: virtual ~ScInputWindow() override; virtual void dispose() override; - virtual void Paint( vcl::RenderContext& rRenderContext, const Rectangle& rRect ) override; + virtual void Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect ) override; virtual void Resize() override; virtual void Select() override; diff --git a/sc/source/ui/inc/invmerge.hxx b/sc/source/ui/inc/invmerge.hxx index 952b8d7d58af..695261434ec5 100644 --- a/sc/source/ui/inc/invmerge.hxx +++ b/sc/source/ui/inc/invmerge.hxx @@ -27,18 +27,18 @@ class ScInvertMerger { private: - ::std::vector< Rectangle >* pRects; - Rectangle aTotalRect; - Rectangle aLineRect; + ::std::vector< tools::Rectangle >* pRects; + tools::Rectangle aTotalRect; + tools::Rectangle aLineRect; void FlushLine(); void FlushTotal(); public: - ScInvertMerger( ::std::vector< Rectangle >* pRectangles ); + ScInvertMerger( ::std::vector< tools::Rectangle >* pRectangles ); ~ScInvertMerger(); - void AddRect( const Rectangle& rRect ); + void AddRect( const tools::Rectangle& rRect ); void Flush(); }; diff --git a/sc/source/ui/inc/navipi.hxx b/sc/source/ui/inc/navipi.hxx index 3007d29ec0bc..fcc2351c987d 100644 --- a/sc/source/ui/inc/navipi.hxx +++ b/sc/source/ui/inc/navipi.hxx @@ -99,7 +99,7 @@ public: } protected: - 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; private: diff --git a/sc/source/ui/inc/notemark.hxx b/sc/source/ui/inc/notemark.hxx index b02bf812f623..bf427a66de0e 100644 --- a/sc/source/ui/inc/notemark.hxx +++ b/sc/source/ui/inc/notemark.hxx @@ -38,13 +38,13 @@ private: ScDocument* pDoc; ScAddress aDocPos; OUString aUserText; - Rectangle aVisRect; + tools::Rectangle aVisRect; Timer aTimer; MapMode aMapMode; bool bLeft; bool bByKeyboard; - Rectangle aRect; + tools::Rectangle aRect; SdrModel* pModel; ScCaptionPtr mxObject; bool bVisible; diff --git a/sc/source/ui/inc/olinewin.hxx b/sc/source/ui/inc/olinewin.hxx index cd9f49183e1a..6e8cc64417ca 100644 --- a/sc/source/ui/inc/olinewin.hxx +++ b/sc/source/ui/inc/olinewin.hxx @@ -49,7 +49,7 @@ private: bool mbMTActive; /// Mouse tracking active? bool mbMTPressed; /// Mouse tracking: Button currently drawed pressed? - Rectangle maFocusRect; /// Focus rectangle on screen. + tools::Rectangle maFocusRect; /// Focus rectangle on screen. size_t mnFocusLevel; /// Level of focused button. size_t mnFocusEntry; /// Entry index of focused button. bool mbDontDrawFocus; /// Do not redraw focus in next Paint(). @@ -98,7 +98,7 @@ private: /** Returns the point in the window of the specified position. */ Point GetPoint( long nLevelPos, long nEntryPos ) const; /** Returns the rectangle in the window of the specified position. */ - Rectangle GetRectangle( + tools::Rectangle GetRectangle( long nLevelStart, long nEntryStart, long nLevelEnd, long nEntryEnd ) const; @@ -206,7 +206,7 @@ private: void ScrollRel( long nEntryDiff, long nEntryStart, long nEntryEnd ); protected: - 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; diff --git a/sc/source/ui/inc/output.hxx b/sc/source/ui/inc/output.hxx index 8012790c2376..26dad1add045 100644 --- a/sc/source/ui/inc/output.hxx +++ b/sc/source/ui/inc/output.hxx @@ -35,7 +35,7 @@ namespace editeng { struct MisspellRanges; } -class Rectangle; +namespace tools { class Rectangle; } namespace vcl { class Font; } class OutputDevice; class EditEngine; @@ -64,8 +64,8 @@ friend class ScGridWindow; private: struct OutputAreaParam { - Rectangle maAlignRect; - Rectangle maClipRect; + tools::Rectangle maAlignRect; + tools::Rectangle maClipRect; long mnColWidth; long mnLeftClipLength; /// length of the string getting cut off on the left. long mnRightClipLength; /// length of the string getting cut off on the right. @@ -113,7 +113,7 @@ private: bool readCellContent(ScDocument* pDoc, bool bShowNullValues, bool bShowFormulas, bool bSyntaxMode, bool bUseStyleColor, bool bForceAutoColor, bool& rWrapFields); void setPatternToEngine(bool bUseStyleColor); void calcMargins(long& rTop, long& rLeft, long& rBottom, long& rRight, double nPPTX, double nPPTY) const; - void calcPaperSize(Size& rPaperSize, const Rectangle& rAlignRect, double nPPTX, double nPPTY) const; + void calcPaperSize(Size& rPaperSize, const tools::Rectangle& rAlignRect, double nPPTX, double nPPTY) const; void getEngineSize(ScFieldEditEngine* pEngine, long& rWidth, long& rHeight) const; bool hasLineBreak() const; bool isHyperlinkCell() const; @@ -226,7 +226,7 @@ private: bool bBreak, bool bOverwrite, OutputAreaParam& rParam ); - void ShrinkEditEngine( EditEngine& rEngine, const Rectangle& rAlignRect, + void ShrinkEditEngine( EditEngine& rEngine, const tools::Rectangle& rAlignRect, long nLeftM, long nTopM, long nRightM, long nBottomM, bool bWidth, sal_uInt16 nOrient, long nAttrRotate, bool bPixelToLogic, long& rEngineWidth, long& rEngineHeight, long& rNeededPixel, @@ -297,7 +297,7 @@ public: void DrawStrings( bool bPixelToLogic = false ); /// Draw all strings, or provide Rectangle where the text (defined by rAddress) would be drawn. - Rectangle LayoutStrings(bool bPixelToLogic, bool bPaint = true, const ScAddress &rAddress = ScAddress()); + tools::Rectangle LayoutStrings(bool bPixelToLogic, bool bPaint = true, const ScAddress &rAddress = ScAddress()); void DrawDocumentBackground(); void DrawBackground(vcl::RenderContext& rRenderContext); diff --git a/sc/source/ui/inc/pfuncache.hxx b/sc/source/ui/inc/pfuncache.hxx index c727b192a2b3..40a41dec0342 100644 --- a/sc/source/ui/inc/pfuncache.hxx +++ b/sc/source/ui/inc/pfuncache.hxx @@ -69,12 +69,12 @@ struct ScPrintPageLocation { long nPage; ScRange aCellRange; - Rectangle aRectangle; // pixels + tools::Rectangle aRectangle; // pixels ScPrintPageLocation() : nPage(-1) {} // default: invalid - ScPrintPageLocation( long nP, const ScRange& rRange, const Rectangle& rRect ) : + ScPrintPageLocation( long nP, const ScRange& rRange, const tools::Rectangle& rRect ) : nPage(nP), aCellRange(rRange), aRectangle(rRect) {} }; diff --git a/sc/source/ui/inc/preview.hxx b/sc/source/ui/inc/preview.hxx index 1e47c34debb2..e0f14b8f069f 100644 --- a/sc/source/ui/inc/preview.hxx +++ b/sc/source/ui/inc/preview.hxx @@ -103,7 +103,7 @@ private: using Window::SetZoom; protected: - virtual void Paint( vcl::RenderContext& rRenderContext, const Rectangle& rRect ) override; + virtual void Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect ) override; virtual void Command( const CommandEvent& rCEvt ) override; virtual void KeyInput( const KeyEvent& rKEvt ) override; virtual void MouseMove( const MouseEvent& rMEvt ) override; diff --git a/sc/source/ui/inc/prevloc.hxx b/sc/source/ui/inc/prevloc.hxx index 56a5326635bb..419deb6e003c 100644 --- a/sc/source/ui/inc/prevloc.hxx +++ b/sc/source/ui/inc/prevloc.hxx @@ -38,7 +38,7 @@ #define SC_PREVIEW_RANGE_TAB 3 class OutputDevice; -class Rectangle; +namespace tools { class Rectangle; } class ScAddress; class ScRange; class ScDocument; @@ -81,7 +81,7 @@ public: void SetTab( SCTAB nNewTab ); void SetColInfo( SCCOL nCount, ScPreviewColRowInfo* pNewInfo ); void SetRowInfo( SCROW nCount, ScPreviewColRowInfo* pNewInfo ); - void LimitToArea( const Rectangle& rPixelArea ); + void LimitToArea( const tools::Rectangle& rPixelArea ); }; class ScPreviewLocationData @@ -93,13 +93,13 @@ private: ScDocument* pDoc; MapMode aCellMapMode; MapMode aDrawMapMode[SC_PREVIEW_MAXRANGES]; - Rectangle aDrawRectangle[SC_PREVIEW_MAXRANGES]; + tools::Rectangle aDrawRectangle[SC_PREVIEW_MAXRANGES]; sal_uInt8 aDrawRangeId[SC_PREVIEW_MAXRANGES]; sal_uInt16 nDrawRanges; SCTAB nPrintTab; Entries_t m_Entries; - Rectangle GetOffsetPixel( const ScAddress& rCellPos, const ScRange& rRange ) const; + tools::Rectangle GetOffsetPixel( const ScAddress& rCellPos, const ScRange& rRange ) const; public: ScPreviewLocationData( ScDocument* pDocument, OutputDevice* pWin ); @@ -108,47 +108,47 @@ public: void SetCellMapMode( const MapMode& rMapMode ); void SetPrintTab( SCTAB nNew ); void Clear(); - void AddCellRange( const Rectangle& rRect, const ScRange& rRange, bool bRepCol, bool bRepRow, + void AddCellRange( const tools::Rectangle& rRect, const ScRange& rRange, bool bRepCol, bool bRepRow, const MapMode& rDrawMap ); - void AddColHeaders( const Rectangle& rRect, SCCOL nStartCol, SCCOL nEndCol, bool bRepCol ); - void AddRowHeaders( const Rectangle& rRect, SCROW nStartRow, SCROW nEndRow, bool bRepRow ); - void AddHeaderFooter( const Rectangle& rRect, bool bHeader, bool bLeft ); - void AddNoteMark( const Rectangle& rRect, const ScAddress& rPos ); - void AddNoteText( const Rectangle& rRect, const ScAddress& rPos ); + void AddColHeaders( const tools::Rectangle& rRect, SCCOL nStartCol, SCCOL nEndCol, bool bRepCol ); + void AddRowHeaders( const tools::Rectangle& rRect, SCROW nStartRow, SCROW nEndRow, bool bRepRow ); + void AddHeaderFooter( const tools::Rectangle& rRect, bool bHeader, bool bLeft ); + void AddNoteMark( const tools::Rectangle& rRect, const ScAddress& rPos ); + void AddNoteText( const tools::Rectangle& rRect, const ScAddress& rPos ); SCTAB GetPrintTab() const { return nPrintTab; } // Get info on visible columns/rows in the visible area - void GetTableInfo( const Rectangle& rVisiblePixel, ScPreviewTableInfo& rInfo ) const; + void GetTableInfo( const tools::Rectangle& rVisiblePixel, ScPreviewTableInfo& rInfo ) const; sal_uInt16 GetDrawRanges() const { return nDrawRanges; } - void GetDrawRange( sal_uInt16 nPos, Rectangle& rPixelRect, MapMode& rMapMode, sal_uInt8& rRangeId ) const; + void GetDrawRange( sal_uInt16 nPos, tools::Rectangle& rPixelRect, MapMode& rMapMode, sal_uInt8& rRangeId ) const; - bool GetHeaderPosition( Rectangle& rHeaderRect ) const; - bool GetFooterPosition( Rectangle& rFooterRect ) const; + bool GetHeaderPosition( tools::Rectangle& rHeaderRect ) const; + bool GetFooterPosition( tools::Rectangle& rFooterRect ) const; bool IsHeaderLeft() const; bool IsFooterLeft() const; - long GetNoteCountInRange( const Rectangle& rVisiblePixel, bool bNoteMarks ) const; - bool GetNoteInRange( const Rectangle& rVisiblePixel, long nIndex, bool bNoteMarks, - ScAddress& rCellPos, Rectangle& rNoteRect ) const; - Rectangle GetNoteInRangeOutputRect(const Rectangle& rVisiblePixel, bool bNoteMarks, + long GetNoteCountInRange( const tools::Rectangle& rVisiblePixel, bool bNoteMarks ) const; + bool GetNoteInRange( const tools::Rectangle& rVisiblePixel, long nIndex, bool bNoteMarks, + ScAddress& rCellPos, tools::Rectangle& rNoteRect ) const; + tools::Rectangle GetNoteInRangeOutputRect(const tools::Rectangle& rVisiblePixel, bool bNoteMarks, const ScAddress& aCellPos) const; // Check if any cells (including column/row headers) are in the visible area - bool HasCellsInRange( const Rectangle& rVisiblePixel ) const; + bool HasCellsInRange( const tools::Rectangle& rVisiblePixel ) const; - void GetCellPosition( const ScAddress& rCellPos, Rectangle& rCellRect ) const; + void GetCellPosition( const ScAddress& rCellPos, tools::Rectangle& rCellRect ) const; // returns the rectangle where the EditEngine draws the text of a Header Cell // if bColHeader is true it returns the rectangle of the header of the column in rCellPos // otherwise of the header of the row in rCellPos - Rectangle GetHeaderCellOutputRect(const Rectangle& rVisRect, const ScAddress& rCellPos, bool bColHeader) const; - Rectangle GetCellOutputRect(const ScAddress& rCellPos) const; + tools::Rectangle GetHeaderCellOutputRect(const tools::Rectangle& rVisRect, const ScAddress& rCellPos, bool bColHeader) const; + tools::Rectangle GetCellOutputRect(const ScAddress& rCellPos) const; // Query the range and rectangle of the main (non-repeat) cell range. // Returns sal_False if not contained. - bool GetMainCellRange( ScRange& rRange, Rectangle& rPixRect ) const; + bool GetMainCellRange( ScRange& rRange, tools::Rectangle& rPixRect ) const; }; #endif diff --git a/sc/source/ui/inc/printfun.hxx b/sc/source/ui/inc/printfun.hxx index b162cb559380..56360a178625 100644 --- a/sc/source/ui/inc/printfun.hxx +++ b/sc/source/ui/inc/printfun.hxx @@ -181,7 +181,7 @@ private: long nTabPages; long nTotalPages; - Rectangle aPageRect; // Document Twips + tools::Rectangle aPageRect; // Document Twips MapMode aLogicMode; // Set in DoPrint MapMode aOffsetMode; @@ -237,7 +237,7 @@ public: ~ScPrintFunc(); static void DrawToDev( ScDocument* pDoc, OutputDevice* pDev, double nPrintFactor, - const Rectangle& rBound, ScViewData* pViewData, bool bMetaFile ); + const tools::Rectangle& rBound, ScViewData* pViewData, bool bMetaFile ); void SetDrawView( FmFormView* pNew ); diff --git a/sc/source/ui/inc/tabsplit.hxx b/sc/source/ui/inc/tabsplit.hxx index 08d4fbfa7c28..206adb70b1d6 100644 --- a/sc/source/ui/inc/tabsplit.hxx +++ b/sc/source/ui/inc/tabsplit.hxx @@ -39,7 +39,7 @@ public: virtual ~ScTabSplitter() override; void SetFixed(bool bSet); - virtual void Paint( vcl::RenderContext& rRenderContext, const Rectangle& rPaintRect ) override; + virtual void Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& rPaintRect ) override; }; #endif diff --git a/sc/source/ui/inc/tabview.hxx b/sc/source/ui/inc/tabview.hxx index d33303426341..b217c5ba0b2a 100644 --- a/sc/source/ui/inc/tabview.hxx +++ b/sc/source/ui/inc/tabview.hxx @@ -67,7 +67,7 @@ private: bool bAdd; protected: - 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 MouseButtonDown( const MouseEvent& rMEvt ) override; public: @@ -170,7 +170,7 @@ private: ScExtraEditViewManager aExtraEditViewManager; sal_uLong nTipVisible; - Rectangle aTipRectangle; + tools::Rectangle aTipRectangle; QuickHelpFlags nTipAlign; OUString sTipString; VclPtr<vcl::Window> sTopParent; @@ -388,7 +388,7 @@ public: Point GetInsertPos(); Point GetChartInsertPos( const Size& rSize, const ScRange& rCellRange ); - Point GetChartDialogPos( const Size& rDialogSize, const Rectangle& rLogicChart ); + Point GetChartDialogPos( const Size& rDialogSize, const tools::Rectangle& rLogicChart ); void UpdateAutoFillMark(); @@ -451,7 +451,7 @@ public: bool ScrollCommand( const CommandEvent& rCEvt, ScSplitPos ePos ); void ScrollToObject( SdrObject* pDrawObj ); - void MakeVisible( const Rectangle& rHMMRect ); + void MakeVisible( const tools::Rectangle& rHMMRect ); // Zeichnen @@ -589,7 +589,7 @@ public: void ResetAutoSpell(); void SetAutoSpellData( SCCOL nPosX, SCROW nPosY, const std::vector<editeng::MisspellRanges>* pRanges ); /// @see ScModelObj::getRowColumnHeaders(). - OUString getRowColumnHeaders(const Rectangle& rRectangle); + OUString getRowColumnHeaders(const tools::Rectangle& rRectangle); static void OnLOKNoteStateChanged(const ScPostIt* pNote); }; diff --git a/sc/source/ui/inc/tabvwsh.hxx b/sc/source/ui/inc/tabvwsh.hxx index 1b6551f1e82c..253ae20da05a 100644 --- a/sc/source/ui/inc/tabvwsh.hxx +++ b/sc/source/ui/inc/tabvwsh.hxx @@ -159,7 +159,7 @@ private: bool bInDispose; ScRangeListRef aChartSource; - Rectangle aChartPos; + tools::Rectangle aChartPos; SCTAB nChartDestTab; sal_uInt16 nCurRefDlgId; @@ -200,7 +200,7 @@ protected: virtual void OuterResizePixel( const Point &rOfs, const Size &rSize ) override; virtual void SetZoomFactor( const Fraction &rZoomX, const Fraction &rZoomY ) override; - virtual void QueryObjAreaPixel( Rectangle& rRect ) const override; + virtual void QueryObjAreaPixel( tools::Rectangle& rRect ) const override; virtual OUString GetSelectionText( bool bWholeWord = false ) override; virtual bool HasSelection( bool bText = true ) const override; @@ -317,7 +317,7 @@ public: void FillFieldData( ScHeaderFieldData& rData ); - bool GetChartArea( ScRangeListRef& rSource, Rectangle& rDest, SCTAB& rTab ) const; + bool GetChartArea( ScRangeListRef& rSource, tools::Rectangle& rDest, SCTAB& rTab ) const; virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) override; diff --git a/sc/source/ui/inc/tbzoomsliderctrl.hxx b/sc/source/ui/inc/tbzoomsliderctrl.hxx index d5b39e1a55c8..faa56f6e5ba0 100644 --- a/sc/source/ui/inc/tbzoomsliderctrl.hxx +++ b/sc/source/ui/inc/tbzoomsliderctrl.hxx @@ -47,7 +47,7 @@ private: sal_uInt16 Offset2Zoom(long nOffset) const; long Zoom2Offset(sal_uInt16 nZoom) const; - void DoPaint(vcl::RenderContext& rRenderContext, const Rectangle& rRect); + void DoPaint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect); public: ScZoomSliderWnd(vcl::Window* pParent, const css::uno::Reference<css::frame::XDispatchProvider >& rDispatchProvider, @@ -59,7 +59,7 @@ public: protected: virtual void MouseButtonDown( const MouseEvent& rMEvt ) override; virtual void MouseMove( const MouseEvent& rMEvt ) override; - virtual void Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) override; + virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) override; }; #endif diff --git a/sc/source/ui/inc/tphfedit.hxx b/sc/source/ui/inc/tphfedit.hxx index e63b00d8161c..da7a5f9199ab 100644 --- a/sc/source/ui/inc/tphfedit.hxx +++ b/sc/source/ui/inc/tphfedit.hxx @@ -75,7 +75,7 @@ public: void SetLocation(ScEditWindowLocation eLoc) { eLocation = eLoc; } protected: - virtual void Paint( vcl::RenderContext& rRenderContext, const Rectangle& rRect ) override; + virtual void Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect ) override; virtual void MouseMove( const MouseEvent& rMEvt ) override; virtual void MouseButtonDown( const MouseEvent& rMEvt ) override; virtual void MouseButtonUp( const MouseEvent& rMEvt ) override; diff --git a/sc/source/ui/inc/viewdata.hxx b/sc/source/ui/inc/viewdata.hxx index 60fd14eaed3a..9c54b3d2a02f 100644 --- a/sc/source/ui/inc/viewdata.hxx +++ b/sc/source/ui/inc/viewdata.hxx @@ -474,7 +474,7 @@ public: SCCOL GetEditEndCol() const { return nEditEndCol; } SCROW GetEditEndRow() const { return nEditEndRow; } - Rectangle GetEditArea( ScSplitPos eWhich, SCCOL nPosX, SCROW nPosY, vcl::Window* pWin, + tools::Rectangle GetEditArea( ScSplitPos eWhich, SCCOL nPosX, SCROW nPosY, vcl::Window* pWin, const ScPatternAttr* pPattern, bool bForceToTop ); void SetTabNo( SCTAB nNewTab ); @@ -495,7 +495,7 @@ public: bool IsOle(); void SetScreen( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2 ); - void SetScreen( const Rectangle& rVisArea ); + void SetScreen( const tools::Rectangle& rVisArea ); void SetScreenPos( const Point& rVisAreaStart ); void UpdateScreenZoom( const Fraction& rNewX, const Fraction& rNewY ); diff --git a/sc/source/ui/miscdlgs/autofmt.cxx b/sc/source/ui/miscdlgs/autofmt.cxx index a20c4729cc0c..c6faad76523f 100644 --- a/sc/source/ui/miscdlgs/autofmt.cxx +++ b/sc/source/ui/miscdlgs/autofmt.cxx @@ -250,7 +250,7 @@ void ScAutoFmtPreview::DrawString(vcl::RenderContext& rRenderContext, size_t nCo Size aStrSize; sal_uInt16 nFmtIndex = GetFormatIndex( nCol, nRow ); - Rectangle cellRect = maArray.GetCellRect( nCol, nRow ); + tools::Rectangle cellRect = maArray.GetCellRect( nCol, nRow ); Point aPos = cellRect.TopLeft(); sal_uInt16 nRightX = 0; bool bJustify = pCurData->GetIncludeJustify(); @@ -478,10 +478,10 @@ void ScAutoFmtPreview::NotifyChange( ScAutoFormatData* pNewData ) CalcCellArray( bFitWidth ); CalcLineMap(); - Invalidate(Rectangle(Point(0,0), GetSizePixel())); + Invalidate(tools::Rectangle(Point(0,0), GetSizePixel())); } -void ScAutoFmtPreview::DoPaint(vcl::RenderContext& rRenderContext, const Rectangle& /*rRect*/) +void ScAutoFmtPreview::DoPaint(vcl::RenderContext& rRenderContext, const tools::Rectangle& /*rRect*/) { DrawModeFlags nOldDrawMode = aVD->GetDrawMode(); @@ -489,7 +489,7 @@ void ScAutoFmtPreview::DoPaint(vcl::RenderContext& rRenderContext, const Rectang vcl::Font aFont(aVD->GetFont()); Color aBackCol(rRenderContext.GetSettings().GetStyleSettings().GetWindowColor()); Point aTmpPoint; - Rectangle aRect(aTmpPoint, aWndSize); + tools::Rectangle aRect(aTmpPoint, aWndSize); aFont.SetTransparent( true ); aVD->SetFont(aFont); @@ -511,7 +511,7 @@ void ScAutoFmtPreview::DoPaint(vcl::RenderContext& rRenderContext, const Rectang aVD->SetDrawMode(nOldDrawMode); } -void ScAutoFmtPreview::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) +void ScAutoFmtPreview::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) { DoPaint(rRenderContext, rRect); } diff --git a/sc/source/ui/navipi/content.cxx b/sc/source/ui/navipi/content.cxx index e9b6e9be7135..d8519c45cd7e 100644 --- a/sc/source/ui/navipi/content.cxx +++ b/sc/source/ui/navipi/content.cxx @@ -699,7 +699,7 @@ void ScContentTree::RequestHelp( const HelpEvent& rHEvt ) aPos = OutputToScreenPixel(aPos); Size aSize( pItem->GetSize( this, pEntry ) ); - Rectangle aItemRect( aPos, aSize ); + tools::Rectangle aItemRect( aPos, aSize ); Help::ShowQuickHelp( this, aItemRect, aHelpText ); bDone = true; } diff --git a/sc/source/ui/navipi/scenwnd.cxx b/sc/source/ui/navipi/scenwnd.cxx index cc887a6f3f84..71c40d913146 100644 --- a/sc/source/ui/navipi/scenwnd.cxx +++ b/sc/source/ui/navipi/scenwnd.cxx @@ -237,7 +237,7 @@ void ScScenarioWindow::dispose() vcl::Window::dispose(); } -void ScScenarioWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) +void ScScenarioWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) { const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings(); Color aBgColor = rStyleSettings.GetFaceColor(); diff --git a/sc/source/ui/pagedlg/tphfedit.cxx b/sc/source/ui/pagedlg/tphfedit.cxx index 6232b14f3f79..1a05f543edc6 100644 --- a/sc/source/ui/pagedlg/tphfedit.cxx +++ b/sc/source/ui/pagedlg/tphfedit.cxx @@ -94,7 +94,7 @@ ScEditWindow::ScEditWindow( vcl::Window* pParent, WinBits nBits, ScEditWindowLoc pEdEngine->SetDefaultHorizontalTextDirection(EE_HTEXTDIR_R2L); pEdView = new EditView( pEdEngine, this ); - pEdView->SetOutputArea( Rectangle( Point(0,0), GetOutputSize() ) ); + pEdView->SetOutputArea( tools::Rectangle( Point(0,0), GetOutputSize() ) ); pEdView->SetBackgroundColor( aBgColor ); pEdEngine->InsertView( pEdView ); @@ -106,7 +106,7 @@ void ScEditWindow::Resize() Size aSize(aOutputSize); aSize.Height() *= 4; pEdEngine->SetPaperSize(aSize); - pEdView->SetOutputArea(Rectangle(Point(0,0), aOutputSize)); + pEdView->SetOutputArea(tools::Rectangle(Point(0,0), aOutputSize)); Control::Resize(); } @@ -216,7 +216,7 @@ void ScEditWindow::SetCharAttributes() } } -void ScEditWindow::Paint( vcl::RenderContext& rRenderContext, const Rectangle& rRect ) +void ScEditWindow::Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect ) { const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings(); Color aBgColor = rStyleSettings.GetWindowColor(); diff --git a/sc/source/ui/sidebar/CellLineStyleValueSet.cxx b/sc/source/ui/sidebar/CellLineStyleValueSet.cxx index 77509827ed8f..74628c74b007 100644 --- a/sc/source/ui/sidebar/CellLineStyleValueSet.cxx +++ b/sc/source/ui/sidebar/CellLineStyleValueSet.cxx @@ -73,7 +73,7 @@ void CellLineStyleValueSet::SetSelItem(sal_uInt16 nSel) void CellLineStyleValueSet::UserDraw( const UserDrawEvent& rUDEvt ) { - Rectangle aRect = rUDEvt.GetRect(); + tools::Rectangle aRect = rUDEvt.GetRect(); vcl::RenderContext* pDev = rUDEvt.GetRenderContext(); sal_uInt16 nItemId = rUDEvt.GetItemId(); @@ -93,7 +93,7 @@ void CellLineStyleValueSet::UserDraw( const UserDrawEvent& rUDEvt ) if( nSelItem == nItemId ) { Color aBackColor(50,107,197); - Rectangle aBackRect = aRect; + tools::Rectangle aBackRect = aRect; aBackRect.Top() += 3; aBackRect.Bottom() -= 2; pDev->SetFillColor(aBackColor); @@ -136,27 +136,27 @@ void CellLineStyleValueSet::UserDraw( const UserDrawEvent& rUDEvt ) case 2: case 3: case 4: - pDev->DrawRect(Rectangle(nTLX, nTLY , nTRX, nTRY + nItemId * 2 - 1 )); + pDev->DrawRect(tools::Rectangle(nTLX, nTLY , nTRX, nTRY + nItemId * 2 - 1 )); break; case 5: - pDev->DrawRect(Rectangle(nTLX, nTLY , nTRX, nTRY + 1 )); - pDev->DrawRect(Rectangle(nTLX, nTLY + 3 , nTRX, nTRY + 4 )); + pDev->DrawRect(tools::Rectangle(nTLX, nTLY , nTRX, nTRY + 1 )); + pDev->DrawRect(tools::Rectangle(nTLX, nTLY + 3 , nTRX, nTRY + 4 )); break; case 6: - pDev->DrawRect(Rectangle(nTLX, nTLY , nTRX, nTRY + 1 )); - pDev->DrawRect(Rectangle(nTLX, nTLY + 5 , nTRX, nTRY + 6 )); + pDev->DrawRect(tools::Rectangle(nTLX, nTLY , nTRX, nTRY + 1 )); + pDev->DrawRect(tools::Rectangle(nTLX, nTLY + 5 , nTRX, nTRY + 6 )); break; case 7: - pDev->DrawRect(Rectangle(nTLX, nTLY , nTRX, nTRY + 1 )); - pDev->DrawRect(Rectangle(nTLX, nTLY + 3 , nTRX, nTRY + 6 )); + pDev->DrawRect(tools::Rectangle(nTLX, nTLY , nTRX, nTRY + 1 )); + pDev->DrawRect(tools::Rectangle(nTLX, nTLY + 3 , nTRX, nTRY + 6 )); break; case 8: - pDev->DrawRect(Rectangle(nTLX, nTLY , nTRX, nTRY + 3 )); - pDev->DrawRect(Rectangle(nTLX, nTLY + 5 , nTRX, nTRY + 6 )); + pDev->DrawRect(tools::Rectangle(nTLX, nTLY , nTRX, nTRY + 3 )); + pDev->DrawRect(tools::Rectangle(nTLX, nTLY + 5 , nTRX, nTRY + 6 )); break; case 9: - pDev->DrawRect(Rectangle(nTLX, nTLY , nTRX, nTRY + 3 )); - pDev->DrawRect(Rectangle(nTLX, nTLY + 5 , nTRX, nTRY + 8 )); + pDev->DrawRect(tools::Rectangle(nTLX, nTLY , nTRX, nTRY + 3 )); + pDev->DrawRect(tools::Rectangle(nTLX, nTLY + 5 , nTRX, nTRY + 8 )); break; } diff --git a/sc/source/ui/unoobj/cellsuno.cxx b/sc/source/ui/unoobj/cellsuno.cxx index c2ce3570f501..81f713ab645d 100644 --- a/sc/source/ui/unoobj/cellsuno.cxx +++ b/sc/source/ui/unoobj/cellsuno.cxx @@ -5889,7 +5889,7 @@ void ScCellRangeObj::GetOnePropertyValue( const SfxItemPropertySimpleEntry* pEnt if (pDocSh) { // GetMMRect converts using HMM_PER_TWIPS, like the DrawingLayer - Rectangle aMMRect(pDocSh->GetDocument().GetMMRect( + tools::Rectangle aMMRect(pDocSh->GetDocument().GetMMRect( aRange.aStart.Col(), aRange.aStart.Row(), aRange.aEnd.Col(), aRange.aEnd.Row(), aRange.aStart.Tab() )); awt::Point aPos( aMMRect.Left(), aMMRect.Top() ); @@ -5902,7 +5902,7 @@ void ScCellRangeObj::GetOnePropertyValue( const SfxItemPropertySimpleEntry* pEnt if (pDocSh) { // GetMMRect converts using HMM_PER_TWIPS, like the DrawingLayer - Rectangle aMMRect = pDocSh->GetDocument().GetMMRect( + tools::Rectangle aMMRect = pDocSh->GetDocument().GetMMRect( aRange.aStart.Col(), aRange.aStart.Row(), aRange.aEnd.Col(), aRange.aEnd.Row(), aRange.aStart.Tab() ); Size aSize(aMMRect.GetSize()); diff --git a/sc/source/ui/unoobj/chartuno.cxx b/sc/source/ui/unoobj/chartuno.cxx index b0b2da480e7d..78152703066f 100644 --- a/sc/source/ui/unoobj/chartuno.cxx +++ b/sc/source/ui/unoobj/chartuno.cxx @@ -225,7 +225,7 @@ void SAL_CALL ScChartsObj::addNewByName( const OUString& rName, if (aRectSize.Height() <= 0) aRectSize.Height() = 5000; - Rectangle aInsRect( aRectPos, aRectSize ); + tools::Rectangle aInsRect( aRectPos, aRectSize ); sal_Int64 nAspect(embed::Aspects::MSOLE_CONTENT); MapUnit aMapUnit(VCLUnoHelper::UnoEmbed2VCLMapUnit( xObj->getMapUnit( nAspect ) )); diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx index 36a275c7d926..31c0e1123624 100644 --- a/sc/source/ui/unoobj/docuno.cxx +++ b/sc/source/ui/unoobj/docuno.cxx @@ -903,7 +903,7 @@ void ScModelObj::setClientZoom(int nTilePixelWidth_, int nTilePixelHeight_, int mnTileTwipHeight = nTileTwipHeight_; } -OUString ScModelObj::getRowColumnHeaders(const Rectangle& rRectangle) +OUString ScModelObj::getRowColumnHeaders(const tools::Rectangle& rRectangle) { ScViewData* pViewData = ScDocShell::GetViewData(); @@ -966,7 +966,7 @@ OUString ScModelObj::getTrackedChanges() return aRet; } -void ScModelObj::setClientVisibleArea(const Rectangle& rRectangle) +void ScModelObj::setClientVisibleArea(const tools::Rectangle& rRectangle) { ScViewData* pViewData = ScDocShell::GetViewData(); if (!pViewData) @@ -1012,7 +1012,7 @@ OUString ScModelObj::getPostIts() double fPPTX = pViewData->GetPPTX(); double fPPTY = pViewData->GetPPTY(); - Rectangle aRect(Point(aScrPos.getX() / fPPTX, aScrPos.getY() / fPPTY), + tools::Rectangle aRect(Point(aScrPos.getX() / fPPTX, aScrPos.getY() / fPPTY), Size(nSizeXPix / fPPTX, nSizeYPix / fPPTY)); aAnnotation.put("cellPos", aRect.toString()); @@ -1263,7 +1263,7 @@ static OutputDevice* lcl_GetRenderDevice( const uno::Sequence<beans::PropertyVal return pRet; } -static bool lcl_ParseTarget( const OUString& rTarget, ScRange& rTargetRange, Rectangle& rTargetRect, +static bool lcl_ParseTarget( const OUString& rTarget, ScRange& rTargetRange, tools::Rectangle& rTargetRect, bool& rIsSheet, ScDocument* pDoc, SCTAB nSourceTab ) { // test in same order as in SID_CURRENTCELL execute @@ -1456,7 +1456,7 @@ bool ScModelObj::FillRenderMarkData( const uno::Any& aSelection, ScDocument& rDoc = pDocShell->GetDocument(); if( pSdrObj ) { - Rectangle aObjRect = pSdrObj->GetCurrentBoundRect(); + tools::Rectangle aObjRect = pSdrObj->GetCurrentBoundRect(); SCTAB nCurrentTab = ScDocShell::GetCurTab(); ScRange aRange = rDoc.GetRange( nCurrentTab, aObjRect ); rMark.SetMarkArea( aRange ); @@ -1749,7 +1749,7 @@ void SAL_CALL ScModelObj::render( sal_Int32 nSelRenderer, const uno::Any& aSelec if ( pPDFData && pPDFData->GetIsExportBookmarks() ) { // the sheet starts at the top of the page - Rectangle aArea( pDev->PixelToLogic( Rectangle( 0,0,0,0 ) ) ); + tools::Rectangle aArea( pDev->PixelToLogic( tools::Rectangle( 0,0,0,0 ) ) ); sal_Int32 nDestID = pPDFData->CreateDest( aArea ); OUString aTabName; rDoc.GetName( nTab, aTabName ); @@ -1759,7 +1759,7 @@ void SAL_CALL ScModelObj::render( sal_Int32 nSelRenderer, const uno::Any& aSelec // #i56629# add the named destination stuff if( pPDFData && pPDFData->GetIsExportNamedDestinations() ) { - Rectangle aArea( pDev->PixelToLogic( Rectangle( 0,0,0,0 ) ) ); + tools::Rectangle aArea( pDev->PixelToLogic( tools::Rectangle( 0,0,0,0 ) ) ); OUString aTabName; rDoc.GetName( nTab, aTabName ); //need the PDF page number here @@ -1788,20 +1788,20 @@ void SAL_CALL ScModelObj::render( sal_Int32 nSelRenderer, const uno::Any& aSelec OUString aTarget( aBookmark.copy( 1 ) ); ScRange aTargetRange; - Rectangle aTargetRect; // 1/100th mm + tools::Rectangle aTargetRect; // 1/100th mm bool bIsSheet = false; bool bValid = lcl_ParseTarget( aTarget, aTargetRange, aTargetRect, bIsSheet, &rDoc, nTab ); if ( bValid ) { sal_Int32 nPage = -1; - Rectangle aArea; + tools::Rectangle aArea; if ( bIsSheet ) { // Get first page for sheet (if nothing from that sheet is printed, // this page can show a different sheet) nPage = pPrintFuncCache->GetTabStart( aTargetRange.aStart.Tab() ); - aArea = pDev->PixelToLogic( Rectangle( 0,0,0,0 ) ); + aArea = pDev->PixelToLogic( tools::Rectangle( 0,0,0,0 ) ); } else { @@ -1814,11 +1814,11 @@ void SAL_CALL ScModelObj::render( sal_Int32 nSelRenderer, const uno::Any& aSelec // get the rectangle of the page's cell range in 1/100th mm ScRange aLocRange = aLocation.aCellRange; - Rectangle aLocationMM = rDoc.GetMMRect( + tools::Rectangle aLocationMM = rDoc.GetMMRect( aLocRange.aStart.Col(), aLocRange.aStart.Row(), aLocRange.aEnd.Col(), aLocRange.aEnd.Row(), aLocRange.aStart.Tab() ); - Rectangle aLocationPixel = aLocation.aRectangle; + tools::Rectangle aLocationPixel = aLocation.aRectangle; // Scale and move the target rectangle from aLocationMM to aLocationPixel, // to get the target rectangle in pixels. @@ -1844,7 +1844,7 @@ void SAL_CALL ScModelObj::render( sal_Int32 nSelRenderer, const uno::Any& aSelec // the time of the CreateDest call, so PixelToLogic can be used here, // regardless of the MapMode that is actually selected. - aArea = pDev->PixelToLogic( Rectangle( nX1, nY1, nX2, nY2 ) ); + aArea = pDev->PixelToLogic( tools::Rectangle( nX1, nY1, nX2, nY2 ) ); } } diff --git a/sc/source/ui/unoobj/shapeuno.cxx b/sc/source/ui/unoobj/shapeuno.cxx index 8c08a3aad1db..68d2f123fecc 100644 --- a/sc/source/ui/unoobj/shapeuno.cxx +++ b/sc/source/ui/unoobj/shapeuno.cxx @@ -290,7 +290,7 @@ static ScRange lcl_GetAnchorCell( uno::Reference< drawing::XShape >& xShape, ScD if (rCaptionPoint.Y < 0) rUnoPoint.Y += rCaptionPoint.Y; } - aReturn = pDoc->GetRange( nTab, Rectangle( VCLPoint(rUnoPoint), VCLPoint(rUnoPoint) )); + aReturn = pDoc->GetRange( nTab, tools::Rectangle( VCLPoint(rUnoPoint), VCLPoint(rUnoPoint) )); } else { @@ -301,7 +301,7 @@ static ScRange lcl_GetAnchorCell( uno::Reference< drawing::XShape >& xShape, ScD if (rCaptionPoint.Y < 0) rUnoPoint.Y += rCaptionPoint.Y; } - aReturn = pDoc->GetRange( nTab, Rectangle( VCLPoint(rUnoPoint), VCLPoint(rUnoPoint) )); + aReturn = pDoc->GetRange( nTab, tools::Rectangle( VCLPoint(rUnoPoint), VCLPoint(rUnoPoint) )); } return aReturn; @@ -312,7 +312,7 @@ static awt::Point lcl_GetRelativePos( uno::Reference< drawing::XShape >& xShape, { awt::Point aUnoPoint; rRange = lcl_GetAnchorCell(xShape, pDoc, nTab, aUnoPoint, rUnoSize, rCaptionPoint); - Rectangle aRect(pDoc->GetMMRect( rRange.aStart.Col(), rRange.aStart.Row(), rRange.aEnd.Col(), rRange.aEnd.Row(), rRange.aStart.Tab() )); + tools::Rectangle aRect(pDoc->GetMMRect( rRange.aStart.Col(), rRange.aStart.Row(), rRange.aEnd.Col(), rRange.aEnd.Row(), rRange.aStart.Tab() )); Point aPoint = pDoc->IsNegativePage(nTab) ? aRect.TopRight() : aRect.TopLeft(); aUnoPoint.X -= aPoint.X(); aUnoPoint.Y -= aPoint.Y(); @@ -349,7 +349,7 @@ void SAL_CALL ScShapeObj::setPropertyValue(const OUString& aPropertyName, const table::CellRangeAddress aAddress = xRangeAdd->getRangeAddress(); if (nTab == aAddress.Sheet) { - Rectangle aRect(pDoc->GetMMRect( static_cast<SCCOL>(aAddress.StartColumn), static_cast<SCROW>(aAddress.StartRow), + tools::Rectangle aRect(pDoc->GetMMRect( static_cast<SCCOL>(aAddress.StartColumn), static_cast<SCROW>(aAddress.StartRow), static_cast<SCCOL>(aAddress.EndColumn), static_cast<SCROW>(aAddress.EndRow), aAddress.Sheet )); awt::Point aRelPoint; uno::Reference<drawing::XShape> xShape( mxShapeAgg, uno::UNO_QUERY ); @@ -513,7 +513,7 @@ void SAL_CALL ScShapeObj::setPropertyValue(const OUString& aPropertyName, const awt::Point aCaptionPoint; ScRange aRange; awt::Point aUnoPoint(lcl_GetRelativePos( xShape, pDoc, nTab, aRange, aUnoSize, aCaptionPoint )); - Rectangle aRect(pDoc->GetMMRect( aRange.aStart.Col(), aRange.aStart.Row(), aRange.aEnd.Col(), aRange.aEnd.Row(), aRange.aStart.Tab() )); + tools::Rectangle aRect(pDoc->GetMMRect( aRange.aStart.Col(), aRange.aStart.Row(), aRange.aEnd.Col(), aRange.aEnd.Row(), aRange.aStart.Tab() )); if (pDoc->IsNegativePage(nTab)) { aUnoPoint.X = -nPos; @@ -597,7 +597,7 @@ void SAL_CALL ScShapeObj::setPropertyValue(const OUString& aPropertyName, const awt::Point aCaptionPoint; ScRange aRange; awt::Point aUnoPoint(lcl_GetRelativePos( xShape, pDoc, nTab, aRange, aUnoSize, aCaptionPoint )); - Rectangle aRect(pDoc->GetMMRect( aRange.aStart.Col(), aRange.aStart.Row(), aRange.aEnd.Col(), aRange.aEnd.Row(), aRange.aStart.Tab() )); + tools::Rectangle aRect(pDoc->GetMMRect( aRange.aStart.Col(), aRange.aStart.Row(), aRange.aEnd.Col(), aRange.aEnd.Row(), aRange.aStart.Tab() )); Point aPoint(aRect.TopRight()); Point aEndPoint(aRect.BottomLeft()); aUnoPoint.Y = nPos; @@ -1014,7 +1014,7 @@ uno::Reference<text::XTextRange> SAL_CALL ScShapeObj::getAnchor() if ( lcl_GetPageNum( pPage, *pModel, nTab ) ) { Point aPos(pObj->GetCurrentBoundRect().TopLeft()); - ScRange aRange(pDoc->GetRange( nTab, Rectangle( aPos, aPos ) )); + ScRange aRange(pDoc->GetRange( nTab, tools::Rectangle( aPos, aPos ) )); // anchor is always the cell diff --git a/sc/source/ui/unoobj/viewuno.cxx b/sc/source/ui/unoobj/viewuno.cxx index 3ed0583819dc..661617800cad 100644 --- a/sc/source/ui/unoobj/viewuno.cxx +++ b/sc/source/ui/unoobj/viewuno.cxx @@ -392,7 +392,7 @@ awt::Rectangle ScViewPaneBase::GetVisArea() const ScAddress aCell(pViewShell->GetViewData().GetPosX(eWhichH), pViewShell->GetViewData().GetPosY(eWhichV), pViewShell->GetViewData().GetTabNo()); - Rectangle aCellRect( pDoc->GetMMRect( aCell.Col(), aCell.Row(), aCell.Col(), aCell.Row(), aCell.Tab() ) ); + tools::Rectangle aCellRect( pDoc->GetMMRect( aCell.Col(), aCell.Row(), aCell.Col(), aCell.Row(), aCell.Tab() ) ); Size aVisSize( pWindow->PixelToLogic( pWindow->GetSizePixel(), pWindow->GetDrawMapMode( true ) ) ); Point aVisPos( aCellRect.TopLeft() ); if ( pDoc->IsLayoutRTL( aCell.Tab() ) ) @@ -400,7 +400,7 @@ awt::Rectangle ScViewPaneBase::GetVisArea() const aVisPos = aCellRect.TopRight(); aVisPos.X() -= aVisSize.Width(); } - Rectangle aVisRect( aVisPos, aVisSize ); + tools::Rectangle aVisRect( aVisPos, aVisSize ); aVisArea = AWTRectangle(aVisRect); } } @@ -1918,7 +1918,7 @@ uno::Any SAL_CALL ScTabViewObj::getPropertyValue( const OUString& aPropertyName vcl::Window* pActiveWin = rViewData.GetActiveWin(); if ( pActiveWin ) { - Rectangle aRect = pActiveWin->GetWindowExtentsRelative( nullptr ); + tools::Rectangle aRect = pActiveWin->GetWindowExtentsRelative( nullptr ); aRet <<= AWTRectangle( aRect ); } } diff --git a/sc/source/ui/view/colrowba.cxx b/sc/source/ui/view/colrowba.cxx index 70c40c466754..45b4aa855375 100644 --- a/sc/source/ui/view/colrowba.cxx +++ b/sc/source/ui/view/colrowba.cxx @@ -187,7 +187,7 @@ bool ScColBar::ResizeAllowed() const void ScColBar::DrawInvert( long nDragPosP ) { - Rectangle aRect( nDragPosP,0, nDragPosP+HDR_SLIDERSIZE-1,GetOutputSizePixel().Width()-1 ); + tools::Rectangle aRect( nDragPosP,0, nDragPosP+HDR_SLIDERSIZE-1,GetOutputSizePixel().Width()-1 ); Update(); Invert(aRect); @@ -346,7 +346,7 @@ bool ScRowBar::ResizeAllowed() const void ScRowBar::DrawInvert( long nDragPosP ) { - Rectangle aRect( 0,nDragPosP, GetOutputSizePixel().Width()-1,nDragPosP+HDR_SLIDERSIZE-1 ); + tools::Rectangle aRect( 0,nDragPosP, GetOutputSizePixel().Width()-1,nDragPosP+HDR_SLIDERSIZE-1 ); Update(); Invert(aRect); diff --git a/sc/source/ui/view/drawvie4.cxx b/sc/source/ui/view/drawvie4.cxx index e9be96c7d5f1..18a82ae2ed00 100644 --- a/sc/source/ui/view/drawvie4.cxx +++ b/sc/source/ui/view/drawvie4.cxx @@ -92,7 +92,7 @@ void ScDrawView::BeginDrag( vcl::Window* pWindow, const Point& rStartPos ) { BrkAction(); - Rectangle aMarkedRect = GetAllMarkedRect(); + tools::Rectangle aMarkedRect = GetAllMarkedRect(); vcl::Region aRegion( aMarkedRect ); aDragStartDiff = rStartPos - aMarkedRect.TopLeft(); @@ -522,7 +522,7 @@ void ScDrawView::SetMarkedOriginalSize() if ( bDo ) { - Rectangle aDrawRect = pObj->GetLogicRect(); + tools::Rectangle aDrawRect = pObj->GetLogicRect(); pUndoGroup->AddAction( new SdrUndoGeoObj( *pObj ) ); pObj->Resize( aDrawRect.TopLeft(), Fraction( aOriginalSize.Width(), aDrawRect.GetWidth() ), diff --git a/sc/source/ui/view/drawview.cxx b/sc/source/ui/view/drawview.cxx index e05ff462cee1..1758f7d8a062 100644 --- a/sc/source/ui/view/drawview.cxx +++ b/sc/source/ui/view/drawview.cxx @@ -267,7 +267,7 @@ void ScDrawView::UpdateWorkArea() { Point aPos; Size aPageSize( pPage->GetSize() ); - Rectangle aNewArea( aPos, aPageSize ); + tools::Rectangle aNewArea( aPos, aPageSize ); if ( aPageSize.Width() < 0 ) { // RTL: from max.negative (left) to zero (right) @@ -558,7 +558,7 @@ bool ScDrawView::SdrBeginTextEdit( { if (OutlinerView* pView = GetTextEditOutlinerView()) { - Rectangle aRectangle = pView->GetOutputArea(); + tools::Rectangle aRectangle = pView->GetOutputArea(); if (pWinL && pWinL->GetMapMode().GetMapUnit() == MapUnit::Map100thMM) aRectangle = OutputDevice::LogicToLogic(aRectangle, MapUnit::Map100thMM, MapUnit::MapTwip); OString sRectangle = aRectangle.toString(); @@ -836,7 +836,7 @@ void ScDrawView::LockCalcLayer( SdrLayerID nLayer, bool bLock ) SetLayerLocked( pLockLayer->GetName(), bLock ); } -void ScDrawView::MakeVisible( const Rectangle& rRect, vcl::Window& rWin ) +void ScDrawView::MakeVisible( const tools::Rectangle& rRect, vcl::Window& rWin ) { //! Evaluate rWin properly //! change zoom if necessary diff --git a/sc/source/ui/view/gridmerg.cxx b/sc/source/ui/view/gridmerg.cxx index abb6493a3d84..aead9ccbb345 100644 --- a/sc/source/ui/view/gridmerg.cxx +++ b/sc/source/ui/view/gridmerg.cxx @@ -200,7 +200,7 @@ void ScGridMerger::Flush() nVarStart = nVarEnd; nVarEnd = nTemp; } - pDev->DrawGrid( Rectangle( nVarStart, nFixStart, nVarEnd, nFixEnd ), + pDev->DrawGrid( tools::Rectangle( nVarStart, nFixStart, nVarEnd, nFixEnd ), Size( nVarDiff, nFixEnd - nFixStart ), DrawGridFlags::VertLines ); } @@ -212,7 +212,7 @@ void ScGridMerger::Flush() else { long nVarEnd = nVarStart + ( nCount - 1 ) * nVarDiff; - pDev->DrawGrid( Rectangle( nFixStart, nVarStart, nFixEnd, nVarEnd ), + pDev->DrawGrid( tools::Rectangle( nFixStart, nVarStart, nFixEnd, nVarEnd ), Size( nFixEnd - nFixStart, nVarDiff ), DrawGridFlags::HorzLines ); } diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx index c590bc336b0d..d0c878b52bb6 100644 --- a/sc/source/ui/view/gridwin.cxx +++ b/sc/source/ui/view/gridwin.cxx @@ -415,7 +415,7 @@ ScGridWindow::ScGridWindow( vcl::Window* pParent, ScViewData* pData, ScSplitPos mpOODragRect(), mpOOHeader(), mpOOShrink(), - mpAutoFillRect(static_cast<Rectangle*>(nullptr)), + mpAutoFillRect(static_cast<tools::Rectangle*>(nullptr)), pViewData( pData ), eWhich( eWhichPos ), mpNoteMarker(), @@ -635,7 +635,7 @@ void ScGridWindow::LaunchAutoFilterMenu(SCCOL nCol, SCROW nRow) long nSizeX = 0; long nSizeY = 0; pViewData->GetMergeSizePixel(nCol, nRow, nSizeX, nSizeY); - Rectangle aCellRect(OutputToScreenPixel(aPos), Size(nSizeX, nSizeY)); + tools::Rectangle aCellRect(OutputToScreenPixel(aPos), Size(nSizeX, nSizeY)); ScDBData* pDBData = pDoc->GetDBAtCursor(nCol, nRow, nTab, ScDBDataPortion::AREA); if (!pDBData) @@ -902,7 +902,7 @@ void ScGridWindow::DoScenarioMenu( const ScRange& rScenRange ) Point aPos = pViewData->GetScrPos( nCol, nRow, eWhich ); if ( bLayoutRTL ) aPos.X() -= nSizeX; - Rectangle aCellRect( OutputToScreenPixel(aPos), Size(nSizeX,nSizeY) ); + tools::Rectangle aCellRect( OutputToScreenPixel(aPos), Size(nSizeX,nSizeY) ); aCellRect.Top() -= nSizeY; aCellRect.Bottom() -= nSizeY - 1; // Place the ListBox directly below the black line of the cell grid @@ -1027,7 +1027,7 @@ void ScGridWindow::LaunchDataSelectMenu( SCCOL nCol, SCROW nRow ) if ( bLayoutRTL ) aPos.X() -= nSizeX; - Rectangle aCellRect( OutputToScreenPixel(aPos), Size(nSizeX,nSizeY) ); + tools::Rectangle aCellRect( OutputToScreenPixel(aPos), Size(nSizeX,nSizeY) ); aPos.X() -= 1; aPos.Y() += nSizeY - 1; @@ -1393,7 +1393,7 @@ bool ScGridWindow::IsCellCoveredByText(SCsCOL nPosX, SCsROW nPosY, SCTAB nTab, S // obtain the bounding box of the text in first non-empty cell // to the left - Rectangle aRect(aOutputData.LayoutStrings(false, false, ScAddress(nNonEmptyX, nPosY, nTab))); + tools::Rectangle aRect(aOutputData.LayoutStrings(false, false, ScAddress(nNonEmptyX, nPosY, nTab))); SetMapMode(aCurrentMapMode); @@ -1550,7 +1550,7 @@ void ScGridWindow::HandleMouseButtonDown( const MouseEvent& rMEvt, MouseEventSta ScViewSelectionEngine* pSelEng = pViewData->GetView()->GetSelEngine(); pSelEng->SetWindow(this); pSelEng->SetWhich(eWhich); - pSelEng->SetVisibleArea( Rectangle(Point(), GetOutputSizePixel()) ); + pSelEng->SetVisibleArea( tools::Rectangle(Point(), GetOutputSizePixel()) ); } if (bEditMode && (pViewData->GetRefTabNo() == pViewData->GetTabNo())) @@ -1697,7 +1697,7 @@ void ScGridWindow::HandleMouseButtonDown( const MouseEvent& rMEvt, MouseEventSta if ( bListValButton ) { - Rectangle aButtonRect = GetListValButtonRect( aListValPos ); + tools::Rectangle aButtonRect = GetListValButtonRect( aListValPos ); if ( aButtonRect.IsInside( aPos ) ) { LaunchDataSelectMenu( aListValPos.Col(), aListValPos.Row() ); @@ -1752,7 +1752,7 @@ void ScGridWindow::HandleMouseButtonDown( const MouseEvent& rMEvt, MouseEventSta ScViewSelectionEngine* pSelEng = pViewData->GetView()->GetSelEngine(); pSelEng->SetWindow(this); pSelEng->SetWhich(eWhich); - pSelEng->SetVisibleArea( Rectangle(Point(), GetOutputSizePixel()) ); + pSelEng->SetVisibleArea( tools::Rectangle(Point(), GetOutputSizePixel()) ); // SelMouseButtonDown on the View is still setting the bMoveIsShift flag if ( pViewData->GetView()->SelMouseButtonDown( rMEvt ) ) @@ -2293,7 +2293,7 @@ void ScGridWindow::MouseMove( const MouseEvent& rMEvt ) if (nMouseStatus == SC_GM_FILTER && mpFilterBox) { Point aRelPos = mpFilterBox->ScreenToOutputPixel( OutputToScreenPixel( rMEvt.GetPosPixel() ) ); - if ( Rectangle(Point(), mpFilterBox->GetOutputSizePixel()).IsInside(aRelPos) ) + if ( tools::Rectangle(Point(), mpFilterBox->GetOutputSizePixel()).IsInside(aRelPos) ) { nButtonDown = 0; nMouseStatus = SC_GM_NONE; @@ -2623,7 +2623,7 @@ static void lcl_SetTextCursorPos( ScViewData* pViewData, ScSplitPos eWhich, vcl: { SCCOL nCol = pViewData->GetCurX(); SCROW nRow = pViewData->GetCurY(); - Rectangle aEditArea = pViewData->GetEditArea( eWhich, nCol, nRow, pWin, nullptr, true ); + tools::Rectangle aEditArea = pViewData->GetEditArea( eWhich, nCol, nRow, pWin, nullptr, true ); aEditArea.Right() = aEditArea.Left(); aEditArea = pWin->PixelToLogic( aEditArea ); pWin->SetCursorRect( &aEditArea ); @@ -2895,7 +2895,7 @@ void ScGridWindow::Command( const CommandEvent& rCEvt ) if (pDrawView && pDrawView->AreObjectsMarked()) { // #100442#; the context menu should open in the middle of the selected objects - Rectangle aSelectRect(LogicToPixel(pDrawView->GetAllMarkedBoundRect())); + tools::Rectangle aSelectRect(LogicToPixel(pDrawView->GetAllMarkedBoundRect())); aMenuPos = aSelectRect.Center(); } } @@ -2934,8 +2934,8 @@ void ScGridWindow::SelectForContextMenu( const Point& rPosPixel, SCsCOL nCellX, EditView* pEditView = pViewData->GetEditView( eWhich ); // not NULL (HasEditView) EditEngine* pEditEngine = pEditView->GetEditEngine(); - Rectangle aOutputArea = pEditView->GetOutputArea(); - Rectangle aVisArea = pEditView->GetVisArea(); + tools::Rectangle aOutputArea = pEditView->GetOutputArea(); + tools::Rectangle aVisArea = pEditView->GetVisArea(); Point aTextPos = PixelToLogic( rPosPixel ); if ( pEditEngine->IsVertical() ) // have to manually transform position @@ -2977,14 +2977,14 @@ void ScGridWindow::SelectForContextMenu( const Point& rPosPixel, SCsCOL nCellX, if ( pDrawView && pDrawView->GetTextEditObject() && pDrawView->GetTextEditOutlinerView() ) { OutlinerView* pOlView = pDrawView->GetTextEditOutlinerView(); - Rectangle aOutputArea = pOlView->GetOutputArea(); + tools::Rectangle aOutputArea = pOlView->GetOutputArea(); if ( aOutputArea.IsInside( aLogicPos ) ) { // handle selection within the OutlinerView Outliner* pOutliner = pOlView->GetOutliner(); const EditEngine& rEditEngine = pOutliner->GetEditEngine(); - Rectangle aVisArea = pOlView->GetVisArea(); + tools::Rectangle aVisArea = pOlView->GetVisArea(); Point aTextPos = aLogicPos; if ( pOutliner->IsVertical() ) // have to manually transform position @@ -4395,7 +4395,7 @@ void ScGridWindow::UpdateEditViewPos() if (bHide) { - Rectangle aRect = pView->GetOutputArea(); + tools::Rectangle aRect = pView->GetOutputArea(); long nHeight = aRect.Bottom() - aRect.Top(); aRect.Top() = PixelToLogic(GetOutputSizePixel(), pViewData->GetLogicMode()). Height() * 2; @@ -4406,10 +4406,10 @@ void ScGridWindow::UpdateEditViewPos() else { // bForceToTop = sal_True for editing - Rectangle aPixRect = pViewData->GetEditArea( eWhich, nCol, nRow, this, nullptr, true ); + tools::Rectangle aPixRect = pViewData->GetEditArea( eWhich, nCol, nRow, this, nullptr, true ); Point aScrPos = PixelToLogic( aPixRect.TopLeft(), pViewData->GetLogicMode() ); - Rectangle aRect = pView->GetOutputArea(); + tools::Rectangle aRect = pView->GetOutputArea(); aRect.SetPos( aScrPos ); pView->SetOutputArea( aRect ); pView->ShowCursor(); @@ -4447,7 +4447,7 @@ void ScGridWindow::UpdateFormulas() // (then at least the MapMode would no longer be right) bNeedsRepaint = true; // -> at end of paint run Invalidate on all - aRepaintPixel = Rectangle(); // All + aRepaintPixel = tools::Rectangle(); // All return; } @@ -5062,7 +5062,7 @@ bool ScGridWindow::GetEditUrl( const Point& rPos, const ScPatternAttr* pPattern = rDoc.GetPattern( nPosX, nPosY, nTab ); // bForceToTop = sal_False, use the cell's real position - Rectangle aEditRect = pViewData->GetEditArea( eWhich, nPosX, nPosY, this, pPattern, false ); + tools::Rectangle aEditRect = pViewData->GetEditArea( eWhich, nPosX, nPosY, this, pPattern, false ); if (rPos.Y() < aEditRect.Top()) return false; @@ -5082,7 +5082,7 @@ bool ScGridWindow::GetEditUrl( const Point& rPos, std::shared_ptr<ScFieldEditEngine> pEngine = createEditEngine(pDocSh, *pPattern); MapMode aEditMode = pViewData->GetLogicMode(eWhich); // without draw scaleing - Rectangle aLogicEdit = PixelToLogic( aEditRect, aEditMode ); + tools::Rectangle aLogicEdit = PixelToLogic( aEditRect, aEditMode ); long nThisColLogic = aLogicEdit.Right() - aLogicEdit.Left() + 1; Size aPaperSize( 1000000, 1000000 ); if (aCell.meType == CELLTYPE_FORMULA) @@ -5180,7 +5180,7 @@ bool ScGridWindow::IsSpellErrorAtPos( const Point& rPos, SCCOL nCol1, SCROW nRow const ScPatternAttr* pPattern = rDoc.GetPattern(nCol1, nRow, nTab); - Rectangle aEditRect = pViewData->GetEditArea(eWhich, nCol1, nRow, this, pPattern, false); + tools::Rectangle aEditRect = pViewData->GetEditArea(eWhich, nCol1, nRow, this, pPattern, false); if (rPos.Y() < aEditRect.Top()) return false; @@ -5197,7 +5197,7 @@ bool ScGridWindow::IsSpellErrorAtPos( const Point& rPos, SCCOL nCol1, SCROW nRow long nTextWidth = static_cast<long>(pEngine->CalcTextWidth()); MapMode aEditMode = pViewData->GetLogicMode(eWhich); - Rectangle aLogicEdit = PixelToLogic(aEditRect, aEditMode); + tools::Rectangle aLogicEdit = PixelToLogic(aEditRect, aEditMode); Point aLogicClick = PixelToLogic(rPos, aEditMode); aLogicEdit.setWidth(nTextWidth + 1); @@ -5265,7 +5265,7 @@ bool ScGridWindow::HasScenarioButton( const Point& rPosPixel, ScRange& rScenRang else aButtonPos.X() -= nBWidth - nHSpace; // same for top or bottom - Rectangle aButRect( aButtonPos, Size(nBWidth,nBHeight) ); + tools::Rectangle aButRect( aButtonPos, Size(nBWidth,nBHeight) ); if ( aButRect.IsInside( rPosPixel ) ) { rScenRange = aRange; @@ -5538,7 +5538,7 @@ OString ScGridWindow::getCellCursor(const Fraction& rZoomX, const Fraction& rZoo double fPPTX = pViewData->GetPPTX(); double fPPTY = pViewData->GetPPTY(); - Rectangle aRect(Point(rtl::math::round(aScrPos.getX() / fPPTX), rtl::math::round(aScrPos.getY() / fPPTY)), + tools::Rectangle aRect(Point(rtl::math::round(aScrPos.getX() / fPPTX), rtl::math::round(aScrPos.getY() / fPPTY)), Size(rtl::math::round(nSizeXPix / fPPTX), rtl::math::round(nSizeYPix / fPPTY))); pViewData->SetZoom(defaultZoomX, defaultZoomY, true); @@ -5657,11 +5657,11 @@ void ScGridWindow::UpdateCopySourceOverlay() long nSizeXPix = aClipEndScrPos.X() - aClipStartScrPos.X(); long nSizeYPix = aClipEndScrPos.Y() - aClipStartScrPos.Y(); - Rectangle aRect( aClipStartScrPos, Size(nSizeXPix, nSizeYPix) ); + tools::Rectangle aRect( aClipStartScrPos, Size(nSizeXPix, nSizeYPix) ); Color aHighlight = GetSettings().GetStyleSettings().GetHighlightColor(); - Rectangle aLogic = PixelToLogic(aRect, aDrawMode); + tools::Rectangle aLogic = PixelToLogic(aRect, aDrawMode); ::basegfx::B2DRange aRange(aLogic.Left(), aLogic.Top(), aLogic.Right(), aLogic.Bottom()); ScOverlayDashedBorder* pDashedBorder = new ScOverlayDashedBorder(aRange, aHighlight); xOverlayManager->add(*pDashedBorder); @@ -5677,7 +5677,7 @@ void ScGridWindow::UpdateCopySourceOverlay() * * @param pLogicRects - if not 0, then don't invoke the callback, just collect the rectangles in the pointed vector. */ -static void updateLibreOfficeKitSelection(ScViewData* pViewData, const std::vector<Rectangle>& rRectangles, std::vector<Rectangle>* pLogicRects = nullptr) +static void updateLibreOfficeKitSelection(ScViewData* pViewData, const std::vector<tools::Rectangle>& rRectangles, std::vector<tools::Rectangle>* pLogicRects = nullptr) { if (!comphelper::LibreOfficeKit::isActive()) return; @@ -5685,20 +5685,20 @@ static void updateLibreOfficeKitSelection(ScViewData* pViewData, const std::vect double nPPTX = pViewData->GetPPTX(); double nPPTY = pViewData->GetPPTY(); - Rectangle aBoundingBox; + tools::Rectangle aBoundingBox; std::vector<OString> aRectangles; for (const auto& rRectangle : rRectangles) { // We explicitly create a copy, since we need to expand // the rectangle before coordinate conversion - Rectangle aRectangle(rRectangle); + tools::Rectangle aRectangle(rRectangle); aRectangle.Right() += 1; aRectangle.Bottom() += 1; aBoundingBox.Union(aRectangle); - Rectangle aRect(aRectangle.Left() / nPPTX, aRectangle.Top() / nPPTY, + tools::Rectangle aRect(aRectangle.Left() / nPPTX, aRectangle.Top() / nPPTY, aRectangle.Right() / nPPTX, aRectangle.Bottom() / nPPTY); if (pLogicRects) pLogicRects->push_back(aRect); @@ -5710,11 +5710,11 @@ static void updateLibreOfficeKitSelection(ScViewData* pViewData, const std::vect return; // selection start handle - Rectangle aStart(aBoundingBox.Left() / nPPTX, aBoundingBox.Top() / nPPTY, + tools::Rectangle aStart(aBoundingBox.Left() / nPPTX, aBoundingBox.Top() / nPPTY, aBoundingBox.Left() / nPPTX, (aBoundingBox.Top() / nPPTY) + 256); // selection end handle - Rectangle aEnd(aBoundingBox.Right() / nPPTX, (aBoundingBox.Bottom() / nPPTY) - 256, + tools::Rectangle aEnd(aBoundingBox.Right() / nPPTX, (aBoundingBox.Bottom() / nPPTY) - 256, aBoundingBox.Right() / nPPTX, aBoundingBox.Bottom() / nPPTY); // the selection itself @@ -5741,7 +5741,7 @@ void ScGridWindow::UpdateCursorOverlay() DeleteCursorOverlay(); - std::vector<Rectangle> aPixelRects; + std::vector<tools::Rectangle> aPixelRects; // determine the cursor rectangles in pixels (moved from ScGridWindow::DrawCursor) @@ -5814,29 +5814,29 @@ void ScGridWindow::UpdateCursorOverlay() aScrPos.X() -= nSizeXPix - 2; // move instead of mirroring // show the cursor as 4 (thin) rectangles - Rectangle aRect(aScrPos, Size(nSizeXPix - 1, nSizeYPix - 1)); + tools::Rectangle aRect(aScrPos, Size(nSizeXPix - 1, nSizeYPix - 1)); float fScaleFactor = GetDPIScaleFactor(); long aCursorWidth = 1 * fScaleFactor; - Rectangle aLeft = Rectangle(aRect); + tools::Rectangle aLeft = tools::Rectangle(aRect); aLeft.Top() -= aCursorWidth; aLeft.Bottom() += aCursorWidth; aLeft.Right() = aLeft.Left(); aLeft.Left() -= aCursorWidth; - Rectangle aRight = Rectangle(aRect); + tools::Rectangle aRight = tools::Rectangle(aRect); aRight.Top() -= aCursorWidth; aRight.Bottom() += aCursorWidth; aRight.Left() = aRight.Right(); aRight.Right() += aCursorWidth; - Rectangle aTop = Rectangle(aRect); + tools::Rectangle aTop = tools::Rectangle(aRect); aTop.Bottom() = aTop.Top(); aTop.Top() -= aCursorWidth; - Rectangle aBottom = Rectangle(aRect); + tools::Rectangle aBottom = tools::Rectangle(aRect); aBottom.Top() = aBottom.Bottom(); aBottom.Bottom() += aCursorWidth; @@ -5868,7 +5868,7 @@ void ScGridWindow::UpdateCursorOverlay() std::vector< basegfx::B2DRange > aRanges; const basegfx::B2DHomMatrix aTransform(GetInverseViewTransformation()); - for(const Rectangle & rRA : aPixelRects) + for(const tools::Rectangle & rRA : aPixelRects) { basegfx::B2DRange aRB(rRA.Left(), rRA.Top(), rRA.Right() + 1, rRA.Bottom() + 1); aRB.transform(aTransform); @@ -5895,9 +5895,9 @@ void ScGridWindow::UpdateCursorOverlay() SetMapMode( aOldMode ); } -void ScGridWindow::GetCellSelection(std::vector<Rectangle>& rLogicRects) +void ScGridWindow::GetCellSelection(std::vector<tools::Rectangle>& rLogicRects) { - std::vector<Rectangle> aPixelRects; + std::vector<tools::Rectangle> aPixelRects; GetSelectionRects(aPixelRects); updateLibreOfficeKitSelection(pViewData, aPixelRects, &rLogicRects); } @@ -5915,7 +5915,7 @@ void ScGridWindow::UpdateSelectionOverlay() SetMapMode( aDrawMode ); DeleteSelectionOverlay(); - std::vector<Rectangle> aPixelRects; + std::vector<tools::Rectangle> aPixelRects; GetSelectionRects( aPixelRects ); if (!aPixelRects.empty() && pViewData->IsActive()) @@ -5931,7 +5931,7 @@ void ScGridWindow::UpdateSelectionOverlay() SCTAB nTab = pViewData->GetTabNo(); bool bLayoutRTL = pDoc->IsLayoutRTL( nTab ); - for(const Rectangle & rRA : aPixelRects) + for(const tools::Rectangle & rRA : aPixelRects) { if (bLayoutRTL) { @@ -6024,10 +6024,10 @@ void ScGridWindow::UpdateAutoFillOverlay() aFillPos.Y() += nSizeYPix; aFillPos.Y() -= (aFillHandleSize.Height() / 2); - Rectangle aFillRect(aFillPos, aFillHandleSize); + tools::Rectangle aFillRect(aFillPos, aFillHandleSize); // expand rect to increase hit area - mpAutoFillRect.reset(new Rectangle(aFillRect.Left() - fScaleFactor, + mpAutoFillRect.reset(new tools::Rectangle(aFillRect.Left() - fScaleFactor, aFillRect.Top() - fScaleFactor, aFillRect.Right() + fScaleFactor, aFillRect.Bottom() + fScaleFactor)); @@ -6082,7 +6082,7 @@ void ScGridWindow::UpdateDragRectOverlay() if ( bDragRect || bPagebreakDrawn ) { - std::vector<Rectangle> aPixelRects; + std::vector<tools::Rectangle> aPixelRects; SCCOL nX1 = bDragRect ? nDragStartX : aPagebreakDrag.aStart.Col(); SCROW nY1 = bDragRect ? nDragStartY : aPagebreakDrag.aStart.Row(); @@ -6130,7 +6130,7 @@ void ScGridWindow::UpdateDragRectOverlay() aScrPos.X() -= 2 * nLayoutSign; aScrPos.Y() -= 2; - Rectangle aRect( aScrPos.X(), aScrPos.Y(), + tools::Rectangle aRect( aScrPos.X(), aScrPos.Y(), aScrPos.X() + ( nSizeXPix + 2 ) * nLayoutSign, aScrPos.Y() + nSizeYPix + 2 ); if ( bLayoutRTL ) { @@ -6140,24 +6140,24 @@ void ScGridWindow::UpdateDragRectOverlay() if ( meDragInsertMode == INS_CELLSDOWN ) { - aPixelRects.push_back( Rectangle( aRect.Left()+1, aRect.Top()+3, aRect.Left()+1, aRect.Bottom()-2 ) ); - aPixelRects.push_back( Rectangle( aRect.Right()-1, aRect.Top()+3, aRect.Right()-1, aRect.Bottom()-2 ) ); - aPixelRects.push_back( Rectangle( aRect.Left()+1, aRect.Top(), aRect.Right()-1, aRect.Top()+2 ) ); - aPixelRects.push_back( Rectangle( aRect.Left()+1, aRect.Bottom()-1, aRect.Right()-1, aRect.Bottom()-1 ) ); + aPixelRects.push_back( tools::Rectangle( aRect.Left()+1, aRect.Top()+3, aRect.Left()+1, aRect.Bottom()-2 ) ); + aPixelRects.push_back( tools::Rectangle( aRect.Right()-1, aRect.Top()+3, aRect.Right()-1, aRect.Bottom()-2 ) ); + aPixelRects.push_back( tools::Rectangle( aRect.Left()+1, aRect.Top(), aRect.Right()-1, aRect.Top()+2 ) ); + aPixelRects.push_back( tools::Rectangle( aRect.Left()+1, aRect.Bottom()-1, aRect.Right()-1, aRect.Bottom()-1 ) ); } else if ( meDragInsertMode == INS_CELLSRIGHT ) { - aPixelRects.push_back( Rectangle( aRect.Left(), aRect.Top()+1, aRect.Left()+2, aRect.Bottom()-1 ) ); - aPixelRects.push_back( Rectangle( aRect.Right()-1, aRect.Top()+1, aRect.Right()-1, aRect.Bottom()-1 ) ); - aPixelRects.push_back( Rectangle( aRect.Left()+3, aRect.Top()+1, aRect.Right()-2, aRect.Top()+1 ) ); - aPixelRects.push_back( Rectangle( aRect.Left()+3, aRect.Bottom()-1, aRect.Right()-2, aRect.Bottom()-1 ) ); + aPixelRects.push_back( tools::Rectangle( aRect.Left(), aRect.Top()+1, aRect.Left()+2, aRect.Bottom()-1 ) ); + aPixelRects.push_back( tools::Rectangle( aRect.Right()-1, aRect.Top()+1, aRect.Right()-1, aRect.Bottom()-1 ) ); + aPixelRects.push_back( tools::Rectangle( aRect.Left()+3, aRect.Top()+1, aRect.Right()-2, aRect.Top()+1 ) ); + aPixelRects.push_back( tools::Rectangle( aRect.Left()+3, aRect.Bottom()-1, aRect.Right()-2, aRect.Bottom()-1 ) ); } else { - aPixelRects.push_back( Rectangle( aRect.Left(), aRect.Top(), aRect.Left()+2, aRect.Bottom() ) ); - aPixelRects.push_back( Rectangle( aRect.Right()-2, aRect.Top(), aRect.Right(), aRect.Bottom() ) ); - aPixelRects.push_back( Rectangle( aRect.Left()+3, aRect.Top(), aRect.Right()-3, aRect.Top()+2 ) ); - aPixelRects.push_back( Rectangle( aRect.Left()+3, aRect.Bottom()-2, aRect.Right()-3, aRect.Bottom() ) ); + aPixelRects.push_back( tools::Rectangle( aRect.Left(), aRect.Top(), aRect.Left()+2, aRect.Bottom() ) ); + aPixelRects.push_back( tools::Rectangle( aRect.Right()-2, aRect.Top(), aRect.Right(), aRect.Bottom() ) ); + aPixelRects.push_back( tools::Rectangle( aRect.Left()+3, aRect.Top(), aRect.Right()-3, aRect.Top()+2 ) ); + aPixelRects.push_back( tools::Rectangle( aRect.Left()+3, aRect.Bottom()-2, aRect.Right()-3, aRect.Bottom() ) ); } // #i70788# get the OverlayManager safely @@ -6168,7 +6168,7 @@ void ScGridWindow::UpdateDragRectOverlay() std::vector< basegfx::B2DRange > aRanges; const basegfx::B2DHomMatrix aTransform(GetInverseViewTransformation()); - for(const Rectangle & rRA : aPixelRects) + for(const tools::Rectangle & rRA : aPixelRects) { basegfx::B2DRange aRB(rRA.Left(), rRA.Top(), rRA.Right() + 1, rRA.Bottom() + 1); aRB.transform(aTransform); @@ -6253,7 +6253,7 @@ void ScGridWindow::UpdateShrinkOverlay() // get the rectangle in pixels - Rectangle aPixRect; + tools::Rectangle aPixRect; ScRange aRange; SCTAB nTab = pViewData->GetTabNo(); if ( pViewData->IsRefMode() && nTab >= pViewData->GetRefStartZ() && nTab <= pViewData->GetRefEndZ() && @@ -6270,7 +6270,7 @@ void ScGridWindow::UpdateShrinkOverlay() aEnd.X() -= 1; aEnd.Y() -= 1; - aPixRect = Rectangle( aStart,aEnd ); + aPixRect = tools::Rectangle( aStart,aEnd ); } } diff --git a/sc/source/ui/view/gridwin2.cxx b/sc/source/ui/view/gridwin2.cxx index 59d70bdb2164..91936ae35c0e 100644 --- a/sc/source/ui/view/gridwin2.cxx +++ b/sc/source/ui/view/gridwin2.cxx @@ -128,7 +128,7 @@ bool ScGridWindow::DoAutoFilterButton( SCCOL nCol, SCROW nRow, const MouseEvent& Point aPopupPos; Size aPopupSize; mpFilterButton->getPopupBoundingBox(aPopupPos, aPopupSize); - Rectangle aRect(aPopupPos, aPopupSize); + tools::Rectangle aRect(aPopupPos, aPopupSize); if (aRect.IsInside(rMEvt.GetPosPixel())) { if ( DoPageFieldSelection( nCol, nRow ) ) @@ -256,7 +256,7 @@ void ScGridWindow::DPTestMouse( const MouseEvent& rMEvt, bool bMove ) nDy = 1; if ( nDx != 0 || nDy != 0 ) { - UpdateDragRect( false, Rectangle() ); + UpdateDragRect( false, tools::Rectangle() ); if ( nDx != 0) pViewData->GetView()->ScrollX( nDx, WhichH(eWhich) ); @@ -275,7 +275,7 @@ void ScGridWindow::DPTestMouse( const MouseEvent& rMEvt, bool bMove ) ScAddress aPos( nPosX, nPosY, pViewData->GetTabNo() ); - Rectangle aPosRect; + tools::Rectangle aPosRect; sal_uInt16 nOrient; long nDimPos; bool bHasRange = pDragDPObj->GetHeaderDrag( aPos, bMouseLeft, bMouseTop, nDPField, @@ -360,7 +360,7 @@ bool ScGridWindow::DPTestFieldPopupArrow( Point aPopupPos; Size aPopupSize; aBtn.getPopupBoundingBox(aPopupPos, aPopupSize); - Rectangle aRect(aPopupPos, aPopupSize); + tools::Rectangle aRect(aPopupPos, aPopupSize); if (aRect.IsInside(rMEvt.GetPosPixel())) { // Mouse cursor inside the popup arrow box. Launch the field menu. @@ -527,7 +527,7 @@ void ScGridWindow::DPLaunchFieldPopupMenu(const Point& rScrPos, const Size& rScr } } - Rectangle aCellRect(rScrPos, rScrSize); + tools::Rectangle aCellRect(rScrPos, rScrSize); mpDPFieldPopup->SetPopupModeEndHdl( LINK(this, ScGridWindow, PopupModeEndHdl) ); ScCheckListMenuWindow::Config aConfig; @@ -655,7 +655,7 @@ void ScGridWindow::DPMouseButtonUp( const MouseEvent& rMEvt ) SetPointer( Pointer( PointerStyle::Arrow ) ); } -void ScGridWindow::UpdateDragRect( bool bShowRange, const Rectangle& rPosRect ) +void ScGridWindow::UpdateDragRect( bool bShowRange, const tools::Rectangle& rPosRect ) { SCCOL nStartX = ( rPosRect.Left() >= 0 ) ? static_cast<SCCOL>(rPosRect.Left()) : SCCOL_MAX; SCROW nStartY = ( rPosRect.Top() >= 0 ) ? static_cast<SCROW>(rPosRect.Top()) : SCROW_MAX; diff --git a/sc/source/ui/view/gridwin3.cxx b/sc/source/ui/view/gridwin3.cxx index 8bfc22fc773f..cb15a6a40476 100644 --- a/sc/source/ui/view/gridwin3.cxx +++ b/sc/source/ui/view/gridwin3.cxx @@ -210,7 +210,7 @@ void ScGridWindow::DrawRedraw( ScOutputData& rOutputData, sal_uLong nLayer ) } } -void ScGridWindow::DrawSdrGrid( const Rectangle& rDrawingRect, OutputDevice* pContentDev ) +void ScGridWindow::DrawSdrGrid( const tools::Rectangle& rDrawingRect, OutputDevice* pContentDev ) { // Draw grid lines @@ -342,7 +342,7 @@ void ScGridWindow::UpdateStatusPosSize() bool bActionItem = false; if ( pDrView->IsAction() ) // action rectangle { - Rectangle aRect; + tools::Rectangle aRect; pDrView->TakeActionRect( aRect ); if ( !aRect.IsEmpty() ) { @@ -361,7 +361,7 @@ void ScGridWindow::UpdateStatusPosSize() { if ( pDrView->AreObjectsMarked() ) // selected objects { - Rectangle aRect = pDrView->GetAllMarkedRect(); + tools::Rectangle aRect = pDrView->GetAllMarkedRect(); // mouse position will have been adjusted for offset // at current position and zoom, restore that adjustment here // so status shows correct value diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx index c8387a336bae..67b0d76fafcd 100644 --- a/sc/source/ui/view/gridwin4.cxx +++ b/sc/source/ui/view/gridwin4.cxx @@ -67,7 +67,7 @@ #include <vcl/virdev.hxx> #include <svx/sdrpaintwindow.hxx> -static void lcl_LimitRect( Rectangle& rRect, const Rectangle& rVisible ) +static void lcl_LimitRect( tools::Rectangle& rRect, const tools::Rectangle& rVisible ) { if ( rRect.Top() < rVisible.Top()-1 ) rRect.Top() = rVisible.Top()-1; if ( rRect.Bottom() > rVisible.Bottom()+1 ) rRect.Bottom() = rVisible.Bottom()+1; @@ -77,7 +77,7 @@ static void lcl_LimitRect( Rectangle& rRect, const Rectangle& rVisible ) // When it is far away, then lcl_DrawOneFrame is not even called. } -static void lcl_DrawOneFrame( vcl::RenderContext* pDev, const Rectangle& rInnerPixel, +static void lcl_DrawOneFrame( vcl::RenderContext* pDev, const tools::Rectangle& rInnerPixel, const OUString& rTitle, const Color& rColor, bool bTextBelow, double nPPTX, double nPPTY, const Fraction& rZoomY, ScDocument* pDoc, ScViewData* pButtonViewData, bool bLayoutRTL ) @@ -85,17 +85,17 @@ static void lcl_DrawOneFrame( vcl::RenderContext* pDev, const Rectangle& rInnerP // pButtonViewData is only used to set the button size, // can otherwise be NULL! - Rectangle aInner = rInnerPixel; + tools::Rectangle aInner = rInnerPixel; if ( bLayoutRTL ) { aInner.Left() = rInnerPixel.Right(); aInner.Right() = rInnerPixel.Left(); } - Rectangle aVisible( Point(0,0), pDev->GetOutputSizePixel() ); + tools::Rectangle aVisible( Point(0,0), pDev->GetOutputSizePixel() ); lcl_LimitRect( aInner, aVisible ); - Rectangle aOuter = aInner; + tools::Rectangle aOuter = aInner; long nHor = (long) ( SC_SCENARIO_HSPACE * nPPTX ); long nVer = (long) ( SC_SCENARIO_VSPACE * nPPTY ); aOuter.Left() -= nHor; @@ -125,10 +125,10 @@ static void lcl_DrawOneFrame( vcl::RenderContext* pDev, const Rectangle& rInnerP pDev->SetLineColor(); pDev->SetFillColor( rColor ); // left, top, right, bottom - pDev->DrawRect( Rectangle( aOuter.Left(), aOuter.Top(), aInner.Left(), aOuter.Bottom() ) ); - pDev->DrawRect( Rectangle( aOuter.Left(), aOuter.Top(), aOuter.Right(), aInner.Top() ) ); - pDev->DrawRect( Rectangle( aInner.Right(), aOuter.Top(), aOuter.Right(), aOuter.Bottom() ) ); - pDev->DrawRect( Rectangle( aOuter.Left(), aInner.Bottom(), aOuter.Right(), aOuter.Bottom() ) ); + pDev->DrawRect( tools::Rectangle( aOuter.Left(), aOuter.Top(), aInner.Left(), aOuter.Bottom() ) ); + pDev->DrawRect( tools::Rectangle( aOuter.Left(), aOuter.Top(), aOuter.Right(), aInner.Top() ) ); + pDev->DrawRect( tools::Rectangle( aInner.Right(), aOuter.Top(), aOuter.Right(), aOuter.Bottom() ) ); + pDev->DrawRect( tools::Rectangle( aOuter.Left(), aInner.Bottom(), aOuter.Right(), aOuter.Bottom() ) ); long nButtonY = bTextBelow ? aInner.Bottom() : aOuter.Top(); @@ -157,7 +157,7 @@ static void lcl_DrawOneFrame( vcl::RenderContext* pDev, const Rectangle& rInnerP } long nClipStartX = bLayoutRTL ? aOuter.Left() + nBWidth : aInner.Left(); long nClipEndX = bLayoutRTL ? aInner.Right() : aOuter.Right() - nBWidth; - pDev->SetClipRegion( vcl::Region(Rectangle( nClipStartX, nButtonY + nVer/2, + pDev->SetClipRegion( vcl::Region(tools::Rectangle( nClipStartX, nButtonY + nVer/2, nClipEndX, nButtonY + nVer/2 + aTextSize.Height())) ); } @@ -243,7 +243,7 @@ static void lcl_DrawScenarioFrames( OutputDevice* pDev, ScViewData* pViewData, S //! Own text "(None)" instead of "(Empty)" ??? - lcl_DrawOneFrame( pDev, Rectangle( aStartPos, aEndPos ), + lcl_DrawOneFrame( pDev, tools::Rectangle( aStartPos, aEndPos ), aCurrent, aColor, bTextBelow, pViewData->GetPPTX(), pViewData->GetPPTY(), pViewData->GetZoomY(), pDoc, pViewData, bLayoutRTL ); @@ -270,10 +270,10 @@ static void lcl_DrawHighlight( ScOutputData& rOutputData, ScViewData* pViewData, } } -void ScGridWindow::DoInvertRect( const Rectangle& rPixel ) +void ScGridWindow::DoInvertRect( const tools::Rectangle& rPixel ) { if ( rPixel == aInvertRect ) - aInvertRect = Rectangle(); // Cancel + aInvertRect = tools::Rectangle(); // Cancel else { OSL_ENSURE( aInvertRect.IsEmpty(), "DoInvertRect no pairs" ); @@ -300,7 +300,7 @@ void ScGridWindow::PrePaint(vcl::RenderContext& /*rRenderContext*/) } } -void ScGridWindow::Paint( vcl::RenderContext& /*rRenderContext*/, const Rectangle& rRect ) +void ScGridWindow::Paint( vcl::RenderContext& /*rRenderContext*/, const tools::Rectangle& rRect ) { ScDocument* pDoc = pViewData->GetDocument(); if ( pDoc->IsInInterpreter() ) @@ -311,7 +311,7 @@ void ScGridWindow::Paint( vcl::RenderContext& /*rRenderContext*/, const Rectangl if ( bNeedsRepaint ) { //! Merge Rectangle? - aRepaintPixel = Rectangle(); // multiple -> paint all + aRepaintPixel = tools::Rectangle(); // multiple -> paint all } else { @@ -330,7 +330,7 @@ void ScGridWindow::Paint( vcl::RenderContext& /*rRenderContext*/, const Rectangl bIsInPaint = true; - Rectangle aPixRect = LogicToPixel( rRect ); + tools::Rectangle aPixRect = LogicToPixel( rRect ); SCCOL nX1 = pViewData->GetPosX(eHWhich); SCROW nY1 = pViewData->GetPosY(eVWhich); @@ -340,7 +340,7 @@ void ScGridWindow::Paint( vcl::RenderContext& /*rRenderContext*/, const Rectangl double nPPTX = pViewData->GetPPTX(); double nPPTY = pViewData->GetPPTY(); - Rectangle aMirroredPixel = aPixRect; + tools::Rectangle aMirroredPixel = aPixRect; if ( pDoc->IsLayoutRTL( nTab ) ) { // mirror and swap @@ -596,12 +596,12 @@ void ScGridWindow::DrawContent(OutputDevice &rDevice, const ScTableInfo& rTableI // See also ScGridWindow::GetDrawMapMode() for the rest of this hack aDrawMode.SetOrigin(PixelToLogic(Point(nScrX, nScrY), aDrawMode)); } - Rectangle aDrawingRectLogic; + tools::Rectangle aDrawingRectLogic; bool bLayoutRTL = rDoc.IsLayoutRTL( nTab ); { // get drawing pixel rect - Rectangle aDrawingRectPixel(Point(nScrX, nScrY), Size(aOutputData.GetScrW(), aOutputData.GetScrH())); + tools::Rectangle aDrawingRectPixel(Point(nScrX, nScrY), Size(aOutputData.GetScrW(), aOutputData.GetScrH())); // correct for border (left/right) if(MAXCOL == nX2) @@ -666,12 +666,12 @@ void ScGridWindow::DrawContent(OutputDevice &rDevice, const ScTableInfo& rTableI MapMode aCurrentMapMode(pContentDev->GetMapMode()); pContentDev->SetMapMode(MapUnit::MapPixel); - Rectangle aPixRect = Rectangle( Point(), GetOutputSizePixel() ); + tools::Rectangle aPixRect = tools::Rectangle( Point(), GetOutputSizePixel() ); pContentDev->SetFillColor( rColorCfg.GetColorValue(svtools::APPBACKGROUND).nColor ); pContentDev->SetLineColor(); if ( nX2==MAXCOL ) { - Rectangle aDrawRect( aPixRect ); + tools::Rectangle aDrawRect( aPixRect ); if ( bLayoutRTL ) aDrawRect.Right() = nScrX - 1; else @@ -681,7 +681,7 @@ void ScGridWindow::DrawContent(OutputDevice &rDevice, const ScTableInfo& rTableI } if ( nY2==MAXROW ) { - Rectangle aDrawRect( aPixRect ); + tools::Rectangle aDrawRect( aPixRect ); aDrawRect.Top() = nScrY + aOutputData.GetScrH(); if ( nX2==MAXCOL ) { @@ -935,7 +935,7 @@ void ScGridWindow::DrawContent(OutputDevice &rDevice, const ScTableInfo& rTableI aEnd.X() -= 2 * nLayoutSign; aEnd.Y() -= 2; - Rectangle aBackground(aStart, aEnd); + tools::Rectangle aBackground(aStart, aEnd); // Need to draw the background in absolute coords. Point aOrigin = aOriginalMode.GetOrigin(); @@ -954,7 +954,7 @@ void ScGridWindow::DrawContent(OutputDevice &rDevice, const ScTableInfo& rTableI // paint the background rDevice.DrawRect(rDevice.PixelToLogic(aBackground)); - Rectangle aEditRect(Point(nScreenX, nScreenY), Size(nScreenW, nScreenH)); + tools::Rectangle aEditRect(Point(nScreenX, nScreenY), Size(nScreenW, nScreenH)); pOtherEditView->Paint(rDevice.PixelToLogic(aEditRect), &rDevice); rDevice.SetMapMode(MapUnit::MapPixel); } @@ -998,7 +998,7 @@ void ScGridWindow::DrawContent(OutputDevice &rDevice, const ScTableInfo& rTableI pCrsr->Hide(); // set the correct mapmode - Rectangle aBackground(aStart, aEnd); + tools::Rectangle aBackground(aStart, aEnd); if (bIsTiledRendering) { // Need to draw the background in absolute coords. @@ -1028,7 +1028,7 @@ void ScGridWindow::DrawContent(OutputDevice &rDevice, const ScTableInfo& rTableI rDevice.DrawRect(rDevice.PixelToLogic(aBackground)); // paint the editeng text - Rectangle aEditRect(Point(nScrX, nScrY), Size(aOutputData.GetScrW(), aOutputData.GetScrH())); + tools::Rectangle aEditRect(Point(nScrX, nScrY), Size(aOutputData.GetScrW(), aOutputData.GetScrH())); pEditView->Paint(rDevice.PixelToLogic(aEditRect), &rDevice); rDevice.SetMapMode(MapUnit::MapPixel); @@ -1205,14 +1205,14 @@ void ScGridWindow::PaintTile( VirtualDevice& rDevice, rDevice.SetMapMode(aOriginalMode); } -void ScGridWindow::LogicInvalidate(const Rectangle* pRectangle) +void ScGridWindow::LogicInvalidate(const tools::Rectangle* pRectangle) { OString sRectangle; if (!pRectangle) sRectangle = "EMPTY"; else { - Rectangle aRectangle(*pRectangle); + tools::Rectangle aRectangle(*pRectangle); // When dragging shapes the map mode is disabled. if (IsMapModeEnabled()) { @@ -1308,7 +1308,7 @@ void ScGridWindow::CheckNeedsRepaint() Invalidate(); else Invalidate(PixelToLogic(aRepaintPixel)); - aRepaintPixel = Rectangle(); + aRepaintPixel = tools::Rectangle(); // selection function in status bar might also be invalid SfxBindings& rBindings = pViewData->GetBindings(); @@ -1392,10 +1392,10 @@ void ScGridWindow::DrawPagePreview( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, if ( aEnd.Y() > aWinSize.Height() + 10 ) aEnd.Y() = aWinSize.Height() + 10; - rRenderContext.DrawRect( Rectangle( aStart, Point(aEnd.X(),aStart.Y()+2) ) ); - rRenderContext.DrawRect( Rectangle( aStart, Point(aStart.X()+2,aEnd.Y()) ) ); - rRenderContext.DrawRect( Rectangle( Point(aStart.X(),aEnd.Y()-2), aEnd ) ); - rRenderContext.DrawRect( Rectangle( Point(aEnd.X()-2,aStart.Y()), aEnd ) ); + rRenderContext.DrawRect( tools::Rectangle( aStart, Point(aEnd.X(),aStart.Y()+2) ) ); + rRenderContext.DrawRect( tools::Rectangle( aStart, Point(aStart.X()+2,aEnd.Y()) ) ); + rRenderContext.DrawRect( tools::Rectangle( Point(aStart.X(),aEnd.Y()-2), aEnd ) ); + rRenderContext.DrawRect( tools::Rectangle( Point(aEnd.X()-2,aStart.Y()), aEnd ) ); // Page breaks //! Display differently (dashed ????) @@ -1415,7 +1415,7 @@ void ScGridWindow::DrawPagePreview( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, rRenderContext.SetFillColor( aAutomatic ); Point aBreak = pViewData->GetScrPos( nBreak, aRange.aStart.Row(), eWhich, true ); - rRenderContext.DrawRect( Rectangle( aBreak.X()-1, aStart.Y(), aBreak.X(), aEnd.Y() ) ); + rRenderContext.DrawRect( tools::Rectangle( aBreak.X()-1, aStart.Y(), aBreak.X(), aEnd.Y() ) ); } } @@ -1434,7 +1434,7 @@ void ScGridWindow::DrawPagePreview( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, rRenderContext.SetFillColor( aAutomatic ); Point aBreak = pViewData->GetScrPos( aRange.aStart.Col(), nBreak, eWhich, true ); - rRenderContext.DrawRect( Rectangle( aStart.X(), aBreak.Y()-1, aEnd.X(), aBreak.Y() ) ); + rRenderContext.DrawRect( tools::Rectangle( aStart.X(), aBreak.Y()-1, aEnd.X(), aBreak.Y() ) ); } } @@ -1657,7 +1657,7 @@ void ScGridWindow::DrawButtons(SCCOL nX1, SCCOL nX2, const ScTableInfo& rTabInfo if ( bListValButton && pRowInfo[nArrY].nRowNo == aListValPos.Row() && pRowInfo[nArrY].bChanged ) { - Rectangle aRect = GetListValButtonRect( aListValPos ); + tools::Rectangle aRect = GetListValButtonRect( aListValPos ); aComboButton.SetPosPixel( aRect.TopLeft() ); aComboButton.SetSizePixel( aRect.GetSize() ); pContentDev->SetClipRegion(vcl::Region(aRect)); @@ -1672,7 +1672,7 @@ void ScGridWindow::DrawButtons(SCCOL nX1, SCCOL nX2, const ScTableInfo& rTabInfo aComboButton.SetOutputDevice( this ); } -Rectangle ScGridWindow::GetListValButtonRect( const ScAddress& rButtonPos ) +tools::Rectangle ScGridWindow::GetListValButtonRect( const ScAddress& rButtonPos ) { ScDocument* pDoc = pViewData->GetDocument(); SCTAB nTab = pViewData->GetTabNo(); @@ -1719,7 +1719,7 @@ Rectangle ScGridWindow::GetListValButtonRect( const ScAddress& rButtonPos ) if ( bLayoutRTL ) aPos.X() -= aBtnSize.Width()-1; // align right edge of button with cell border - return Rectangle( aPos, aBtnSize ); + return tools::Rectangle( aPos, aBtnSize ); } bool ScGridWindow::IsAutoFilterActive( SCCOL nCol, SCROW nRow, SCTAB nTab ) @@ -1759,7 +1759,7 @@ bool ScGridWindow::IsAutoFilterActive( SCCOL nCol, SCROW nRow, SCTAB nTab ) return ( bSimpleQuery && bColumnFound ); } -void ScGridWindow::GetSelectionRects( ::std::vector< Rectangle >& rPixelRects ) +void ScGridWindow::GetSelectionRects( ::std::vector< tools::Rectangle >& rPixelRects ) { ScMarkData aMultiMark( pViewData->GetMarkData() ); aMultiMark.SetMarking( false ); @@ -1927,13 +1927,13 @@ void ScGridWindow::GetSelectionRects( ::std::vector< Rectangle >& rPixelRects ) nThisY + pMerge->GetRowMerge(), eWhich ); if ( aEndPos.X() * nLayoutSign > nScrX * nLayoutSign && aEndPos.Y() > nScrY ) { - aInvert.AddRect( Rectangle( nScrX,nScrY, + aInvert.AddRect( tools::Rectangle( nScrX,nScrY, aEndPos.X()-nLayoutSign,aEndPos.Y()-1 ) ); } } else if ( nEndX * nLayoutSign >= nScrX * nLayoutSign && nEndY >= nScrY ) { - aInvert.AddRect( Rectangle( nScrX,nScrY,nEndX,nEndY ) ); + aInvert.AddRect( tools::Rectangle( nScrX,nScrY,nEndX,nEndY ) ); } } } @@ -1943,7 +1943,7 @@ void ScGridWindow::GetSelectionRects( ::std::vector< Rectangle >& rPixelRects ) if ( aMultiMark.IsCellMarked( nX, nY, true ) == bRepeat && nEndX * nLayoutSign >= nScrX * nLayoutSign && nEndY >= nScrY ) { - aInvert.AddRect( Rectangle( nScrX,nScrY,nEndX,nEndY ) ); + aInvert.AddRect( tools::Rectangle( nScrX,nScrY,nEndX,nEndY ) ); } } diff --git a/sc/source/ui/view/gridwin5.cxx b/sc/source/ui/view/gridwin5.cxx index c6d0af8a4c42..32d95f2855aa 100644 --- a/sc/source/ui/view/gridwin5.cxx +++ b/sc/source/ui/view/gridwin5.cxx @@ -292,7 +292,7 @@ void ScGridWindow::RequestHelp(const HelpEvent& rHEvt) if ( bHelpEnabled && !bDone && !nButtonDown ) // only without pressed button { OUString aHelpText; - Rectangle aPixRect; + tools::Rectangle aPixRect; Point aPosPixel = ScreenToOutputPixel( rHEvt.GetMousePosPixel() ); if ( pDrView ) // URL / Image-Map @@ -406,7 +406,7 @@ void ScGridWindow::RequestHelp(const HelpEvent& rHEvt) if ( !aHelpText.isEmpty() ) { - Rectangle aScreenRect(OutputToScreenPixel(aPixRect.TopLeft()), + tools::Rectangle aScreenRect(OutputToScreenPixel(aPixRect.TopLeft()), OutputToScreenPixel(aPixRect.BottomRight())); if ( rHEvt.GetMode() & HelpEventMode::BALLOON ) diff --git a/sc/source/ui/view/gridwin_dbgutil.cxx b/sc/source/ui/view/gridwin_dbgutil.cxx index 54050a4287ee..36e7f85faa01 100644 --- a/sc/source/ui/view/gridwin_dbgutil.cxx +++ b/sc/source/ui/view/gridwin_dbgutil.cxx @@ -105,8 +105,8 @@ void ScGridWindow::dumpGraphicInformation() if (pObjData) dumpScDrawObjData(*this, *pObjData, pDrawLayer->GetScaleUnit()); - const Rectangle& rRect = pObj->GetSnapRect(); - Rectangle aRect = LogicToPixel(rRect, MapMode(pDrawLayer->GetScaleUnit())); + const tools::Rectangle& rRect = pObj->GetSnapRect(); + tools::Rectangle aRect = LogicToPixel(rRect, MapMode(pDrawLayer->GetScaleUnit())); std::cout << "Snap Rectangle (in pixel): " << aRect << std::endl; } } diff --git a/sc/source/ui/view/hdrcont.cxx b/sc/source/ui/view/hdrcont.cxx index 2fd99256b093..e63f539b56fd 100644 --- a/sc/source/ui/view/hdrcont.cxx +++ b/sc/source/ui/view/hdrcont.cxx @@ -115,7 +115,7 @@ void ScHeaderControl::DoPaint( SCCOLROW nStart, SCCOLROW nEnd ) bool bLayoutRTL = IsLayoutRTL(); long nLayoutSign = bLayoutRTL ? -1 : 1; - Rectangle aRect( Point(0,0), GetOutputSizePixel() ); + tools::Rectangle aRect( Point(0,0), GetOutputSizePixel() ); if ( bVertical ) { aRect.Top() = GetScrPos( nStart )-nLayoutSign; // extra pixel for line at top of selection @@ -224,22 +224,22 @@ void ScHeaderControl::DrawShadedRect( long nStart, long nEnd, const Color& rBase SetLineColor(); SetFillColor( aOuter ); if (bVertical) - DrawRect( Rectangle( 0, nStart, nCenterPos-1, nEnd ) ); + DrawRect( tools::Rectangle( 0, nStart, nCenterPos-1, nEnd ) ); else - DrawRect( Rectangle( nStart, 0, nEnd, nCenterPos-1 ) ); + DrawRect( tools::Rectangle( nStart, 0, nEnd, nCenterPos-1 ) ); SetFillColor( aCenter ); if (bVertical) - DrawRect( Rectangle( nCenterPos, nStart, nCenterPos, nEnd ) ); + DrawRect( tools::Rectangle( nCenterPos, nStart, nCenterPos, nEnd ) ); else - DrawRect( Rectangle( nStart, nCenterPos, nEnd, nCenterPos ) ); + DrawRect( tools::Rectangle( nStart, nCenterPos, nEnd, nCenterPos ) ); SetFillColor( aInner ); if (bVertical) - DrawRect( Rectangle( nCenterPos+1, nStart, nBarSize-1, nEnd ) ); + DrawRect( tools::Rectangle( nCenterPos+1, nStart, nBarSize-1, nEnd ) ); else - DrawRect( Rectangle( nStart, nCenterPos+1, nEnd, nBarSize-1 ) ); + DrawRect( tools::Rectangle( nStart, nCenterPos+1, nEnd, nBarSize-1 ) ); } -void ScHeaderControl::Paint( vcl::RenderContext& /*rRenderContext*/, const Rectangle& rRect ) +void ScHeaderControl::Paint( vcl::RenderContext& /*rRenderContext*/, const tools::Rectangle& rRect ) { // It is important for VCL to have few calls, that is why the outer lines are // grouped together @@ -336,7 +336,7 @@ void ScHeaderControl::Paint( vcl::RenderContext& /*rRenderContext*/, const Recta // background is different for entry area and behind the entries - Rectangle aFillRect; + tools::Rectangle aFillRect; SetLineColor(); if ( nLineEnd * nLayoutSign >= nInitScrPos * nLayoutSign ) @@ -346,9 +346,9 @@ void ScHeaderControl::Paint( vcl::RenderContext& /*rRenderContext*/, const Recta // high contrast: single-color background SetFillColor( rStyleSettings.GetFaceColor() ); if ( bVertical ) - aFillRect = Rectangle( 0, nInitScrPos, nBarSize-1, nLineEnd ); + aFillRect = tools::Rectangle( 0, nInitScrPos, nBarSize-1, nLineEnd ); else - aFillRect = Rectangle( nInitScrPos, 0, nLineEnd, nBarSize-1 ); + aFillRect = tools::Rectangle( nInitScrPos, 0, nLineEnd, nBarSize-1 ); DrawRect( aFillRect ); } else @@ -362,9 +362,9 @@ void ScHeaderControl::Paint( vcl::RenderContext& /*rRenderContext*/, const Recta { SetFillColor( SC_MOD()->GetColorConfig().GetColorValue(svtools::APPBACKGROUND).nColor ); if ( bVertical ) - aFillRect = Rectangle( 0, nLineEnd+nLayoutSign, nBarSize-1, nPEnd ); + aFillRect = tools::Rectangle( 0, nLineEnd+nLayoutSign, nBarSize-1, nPEnd ); else - aFillRect = Rectangle( nLineEnd+nLayoutSign, 0, nPEnd, nBarSize-1 ); + aFillRect = tools::Rectangle( nLineEnd+nLayoutSign, 0, nPEnd, nBarSize-1 ); DrawRect( aFillRect ); } @@ -381,9 +381,9 @@ void ScHeaderControl::Paint( vcl::RenderContext& /*rRenderContext*/, const Recta SetLineColor(); SetFillColor( COL_LIGHTGRAY ); if (bVertical) - DrawRect( Rectangle( 0, nTransStart, nBarSize-1, nTransEnd ) ); + DrawRect( tools::Rectangle( 0, nTransStart, nBarSize-1, nTransEnd ) ); else - DrawRect( Rectangle( nTransStart, 0, nTransEnd, nBarSize-1 ) ); + DrawRect( tools::Rectangle( nTransStart, 0, nTransEnd, nBarSize-1 ) ); } } else @@ -450,11 +450,11 @@ void ScHeaderControl::Paint( vcl::RenderContext& /*rRenderContext*/, const Recta // The window's background color (SetBackground) has to be the background // of the cell area, for the contrast comparison in DrawSelectionBackground. - Rectangle aTransRect; + tools::Rectangle aTransRect; if (bVertical) - aTransRect = Rectangle( 0, nTransStart, nBarSize-1, nTransEnd ); + aTransRect = tools::Rectangle( 0, nTransStart, nBarSize-1, nTransEnd ); else - aTransRect = Rectangle( nTransStart, 0, nTransEnd, nBarSize-1 ); + aTransRect = tools::Rectangle( nTransStart, 0, nTransEnd, nBarSize-1 ); SetBackground( Color( rStyleSettings.GetFaceColor() ) ); DrawSelectionBackground( aTransRect, 0, true, false ); SetBackground(); @@ -708,7 +708,7 @@ void ScHeaderControl::MouseButtonDown( const MouseEvent& rMEvt ) { pSelEngine->SetWindow( this ); Point aPoint; - Rectangle aVis( aPoint,GetOutputSizePixel() ); + tools::Rectangle aVis( aPoint,GetOutputSizePixel() ); if (bVertical) { aVis.Left() = LONG_MIN; @@ -949,7 +949,7 @@ void ScHeaderControl::ShowDragHelp() Point aMousePos = OutputToScreenPixel(GetPointerPosPixel()); - Rectangle aRect; + tools::Rectangle aRect; QuickHelpFlags nAlign; if (!bVertical) { diff --git a/sc/source/ui/view/invmerge.cxx b/sc/source/ui/view/invmerge.cxx index 8ac68bffeec5..e0e176186320 100644 --- a/sc/source/ui/view/invmerge.cxx +++ b/sc/source/ui/view/invmerge.cxx @@ -21,7 +21,7 @@ #include "invmerge.hxx" -ScInvertMerger::ScInvertMerger( ::std::vector< Rectangle >* pRectangles ) : +ScInvertMerger::ScInvertMerger( ::std::vector< tools::Rectangle >* pRectangles ) : pRects( pRectangles ) { // collect rectangles instead of inverting @@ -47,13 +47,13 @@ void ScInvertMerger::Flush() size_t nComparePos = 0; while ( nComparePos < pRects->size() ) { - Rectangle aCompRect = (*pRects)[nComparePos]; + tools::Rectangle aCompRect = (*pRects)[nComparePos]; sal_Int32 nBottom = aCompRect.Bottom(); size_t nOtherPos = nComparePos + 1; while ( nOtherPos < pRects->size() ) { - Rectangle aOtherRect = (*pRects)[nOtherPos]; + tools::Rectangle aOtherRect = (*pRects)[nOtherPos]; if ( aOtherRect.Top() > nBottom + 1 ) { // rectangles are sorted, so we can stop searching @@ -121,9 +121,9 @@ void ScInvertMerger::FlushLine() aLineRect.SetEmpty(); } -void ScInvertMerger::AddRect( const Rectangle& rRect ) +void ScInvertMerger::AddRect( const tools::Rectangle& rRect ) { - Rectangle aJustified = rRect; + tools::Rectangle aJustified = rRect; if ( rRect.Left() > rRect.Right() ) // switch for RTL layout { aJustified.Left() = rRect.Right(); diff --git a/sc/source/ui/view/notemark.cxx b/sc/source/ui/view/notemark.cxx index 5a27c3112912..a55cc917ab80 100644 --- a/sc/source/ui/view/notemark.cxx +++ b/sc/source/ui/view/notemark.cxx @@ -55,7 +55,7 @@ ScNoteMarker::ScNoteMarker( vcl::Window* pWin, vcl::Window* pRight, vcl::Window* aSizePixel.Width() += pRightWin->GetOutputSizePixel().Width(); if( pBottomWin ) aSizePixel.Height() += pBottomWin->GetOutputSizePixel().Height(); - Rectangle aVisPixel( Point( 0, 0 ), aSizePixel ); + tools::Rectangle aVisPixel( Point( 0, 0 ), aSizePixel ); aVisRect = pWindow->PixelToLogic( aVisPixel, aMapMode ); aTimer.SetInvokeHandler( LINK( this, ScNoteMarker, TimeHdl ) ); diff --git a/sc/source/ui/view/olinewin.cxx b/sc/source/ui/view/olinewin.cxx index 614fa6cfb895..daa983f18e11 100644 --- a/sc/source/ui/view/olinewin.cxx +++ b/sc/source/ui/view/olinewin.cxx @@ -136,7 +136,7 @@ void ScOutlineWindow::ScrollPixel( long nDiff ) void ScOutlineWindow::ScrollRel( long nEntryDiff, long nEntryStart, long nEntryEnd ) { - Rectangle aRect( GetRectangle( 0, nEntryStart, GetOutputSizeLevel() - 1, nEntryEnd ) ); + tools::Rectangle aRect( GetRectangle( 0, nEntryStart, GetOutputSizeLevel() - 1, nEntryEnd ) ); if ( mbHoriz ) Scroll( nEntryDiff, 0, aRect ); else @@ -210,10 +210,10 @@ Point ScOutlineWindow::GetPoint( long nLevelPos, long nEntryPos ) const return mbHoriz ? Point( nEntryPos, nLevelPos ) : Point( nLevelPos, nEntryPos ); } -Rectangle ScOutlineWindow::GetRectangle( +tools::Rectangle ScOutlineWindow::GetRectangle( long nLevelStart, long nEntryStart, long nLevelEnd, long nEntryEnd ) const { - return Rectangle( GetPoint( nLevelStart, nEntryStart ), GetPoint( nLevelEnd, nEntryEnd ) ); + return tools::Rectangle( GetPoint( nLevelStart, nEntryStart ), GetPoint( nLevelEnd, nEntryEnd ) ); } long ScOutlineWindow::GetOutputSizeLevel() const @@ -510,7 +510,7 @@ void ScOutlineWindow::DataChanged( const DataChangedEvent& rDCEvt ) void ScOutlineWindow::SetEntryAreaClipRegion() { - SetClipRegion( vcl::Region(Rectangle( + SetClipRegion( vcl::Region(tools::Rectangle( GetPoint( 0, mnMainFirstPos ), GetPoint( GetOutputSizeLevel() - 1, mnMainLastPos )))); } @@ -541,7 +541,7 @@ void ScOutlineWindow::DrawImageRel(long nLevelPos, long nEntryPos, sal_uInt16 nI SetLineColor(); SetFillColor( GetBackground().GetColor() ); Point aPos( GetPoint( nLevelPos, nEntryPos ) ); - DrawRect( Rectangle( aPos, rImage.GetSizePixel() ) ); + DrawRect( tools::Rectangle( aPos, rImage.GetSizePixel() ) ); DrawImage( aPos, rImage ); } @@ -574,7 +574,7 @@ void ScOutlineWindow::ShowFocus() if ( GetImagePos( mnFocusLevel, mnFocusEntry, aPos ) ) { aPos += Point( 1, 1 ); - maFocusRect = Rectangle( aPos, Size( SC_OL_BITMAPSIZE - 2, SC_OL_BITMAPSIZE - 2 ) ); + maFocusRect = tools::Rectangle( aPos, Size( SC_OL_BITMAPSIZE - 2, SC_OL_BITMAPSIZE - 2 ) ); bool bClip = (mnFocusEntry != SC_OL_HEADERENTRY); if ( bClip ) SetEntryAreaClipRegion(); @@ -600,7 +600,7 @@ void ScOutlineWindow::HideFocus() } } -void ScOutlineWindow::Paint( vcl::RenderContext& /*rRenderContext*/, const Rectangle& /* rRect */ ) +void ScOutlineWindow::Paint( vcl::RenderContext& /*rRenderContext*/, const tools::Rectangle& /* rRect */ ) { long nEntriesSign = mbMirrorEntries ? -1 : 1; long nLevelsSign = mbMirrorLevels ? -1 : 1; diff --git a/sc/source/ui/view/output.cxx b/sc/source/ui/view/output.cxx index c7ffa95b37d8..943b4af8fe0e 100644 --- a/sc/source/ui/view/output.cxx +++ b/sc/source/ui/view/output.cxx @@ -812,17 +812,17 @@ void ScOutputData::DrawDocumentBackground() Point aScreenPos = mpDev->PixelToLogic(Point(nScrX, nScrY)); Size aScreenSize = mpDev->PixelToLogic(Size(nScrW - 1,nScrH - 1)); - mpDev->DrawRect(Rectangle(aScreenPos, aScreenSize)); + mpDev->DrawRect(tools::Rectangle(aScreenPos, aScreenSize)); } namespace { static const double lclCornerRectTransparency = 40.0; -void drawDataBars(vcl::RenderContext& rRenderContext, const ScDataBarInfo* pOldDataBarInfo, const Rectangle& rRect, long nOneX, long nOneY) +void drawDataBars(vcl::RenderContext& rRenderContext, const ScDataBarInfo* pOldDataBarInfo, const tools::Rectangle& rRect, long nOneX, long nOneY) { long nPosZero = 0; - Rectangle aPaintRect = rRect; + tools::Rectangle aPaintRect = rRect; aPaintRect.Top() += 2 * nOneY; aPaintRect.Bottom() -= 2 * nOneY; aPaintRect.Left() += 2 * nOneX; @@ -895,7 +895,7 @@ const BitmapEx& getIcon(sc::IconSetBitmapMap & rIconSetBitmapMap, ScIconSetType return ScIconSetFormat::getBitmap(rIconSetBitmapMap, eType, nIndex); } -void drawIconSets(vcl::RenderContext& rRenderContext, const ScIconSetInfo* pOldIconSetInfo, const Rectangle& rRect, long nOneX, long nOneY, +void drawIconSets(vcl::RenderContext& rRenderContext, const ScIconSetInfo* pOldIconSetInfo, const tools::Rectangle& rRect, long nOneX, long nOneY, sc::IconSetBitmapMap & rIconSetBitmapMap) { //long nSize = 16; @@ -907,7 +907,7 @@ void drawIconSets(vcl::RenderContext& rRenderContext, const ScIconSetInfo* pOldI } void drawCells(vcl::RenderContext& rRenderContext, const Color* pColor, const SvxBrushItem* pBackground, const Color*& pOldColor, const SvxBrushItem*& pOldBackground, - Rectangle& rRect, long nPosX, long nLayoutSign, long nOneX, long nOneY, const ScDataBarInfo* pDataBarInfo, const ScDataBarInfo*& pOldDataBarInfo, + tools::Rectangle& rRect, long nPosX, long nLayoutSign, long nOneX, long nOneY, const ScDataBarInfo* pDataBarInfo, const ScDataBarInfo*& pOldDataBarInfo, const ScIconSetInfo* pIconSetInfo, const ScIconSetInfo*& pOldIconSetInfo, sc::IconSetBitmapMap & rIconSetBitmapMap) { @@ -1005,7 +1005,7 @@ void ScOutputData::DrawBackground(vcl::RenderContext& rRenderContext) nOneY = nOneYLogic; } - Rectangle aRect; + tools::Rectangle aRect; long nLayoutSign = bLayoutRTL ? -1 : 1; @@ -1046,7 +1046,7 @@ void ScOutputData::DrawBackground(vcl::RenderContext& rRenderContext) if ( bLayoutRTL ) nPosX += nMirrorW - nOneX; - aRect = Rectangle(nPosX, nPosY - nOneY, nPosX, nPosY - nOneY + nRowHeight); + aRect = tools::Rectangle(nPosX, nPosY - nOneY, nPosX, nPosY - nOneY + nRowHeight); if (bWorksInPixels) aRect = rRenderContext.PixelToLogic(aRect); // internal data in pixels, but we'll be drawing in logic units @@ -1210,7 +1210,7 @@ void ScOutputData::DrawExtraShadow(bool bLeft, bool bTop, bool bRight, bool bBot } // rectangle is in logical orientation - Rectangle aRect( nPosX, nPosY, + tools::Rectangle aRect( nPosX, nPosY, nPosX + ( nThisWidth - 1 ) * nLayoutSign, nPosY + pRowInfo[nArrY].nHeight - 1 ); @@ -1287,7 +1287,7 @@ void ScOutputData::DrawExtraShadow(bool bLeft, bool bTop, bool bRight, bool bBot void ScOutputData::DrawClear() { - Rectangle aRect; + tools::Rectangle aRect; Size aOnePixel = mpDev->PixelToLogic(Size(1,1)); long nOneX = aOnePixel.Width(); long nOneY = aOnePixel.Height(); @@ -1318,7 +1318,7 @@ void ScOutputData::DrawClear() nRowHeight += pRowInfo[nArrY+nSkip].nHeight; // after incrementing } - aRect = Rectangle( Point( nScrX, nPosY ), + aRect = tools::Rectangle( Point( nScrX, nPosY ), Size( nScrW+1-nOneX, nRowHeight+1-nOneY) ); mpDev->DrawRect( aRect ); @@ -1558,7 +1558,7 @@ void ScOutputData::DrawRotatedFrame(vcl::RenderContext& rRenderContext, const Co } long nLayoutSign = bLayoutRTL ? -1 : 1; - Rectangle aClipRect( Point(nScrX, nScrY), Size(nScrW, nScrH) ); + tools::Rectangle aClipRect( Point(nScrX, nScrY), Size(nScrW, nScrH) ); if (bMetaFile) { rRenderContext.Push(); @@ -1903,7 +1903,7 @@ drawinglayer::processor2d::BaseProcessor2D* ScOutputData::CreateProcessor2D( ) vcl::Region ScOutputData::GetChangedAreaRegion() { vcl::Region aRegion; - Rectangle aDrawingRect; + tools::Rectangle aDrawingRect; bool bHad(false); long nPosY = nScrY; SCSIZE nArrY; @@ -1946,7 +1946,7 @@ bool ScOutputData::SetChangedClip() { tools::PolyPolygon aPoly; - Rectangle aDrawingRect; + tools::Rectangle aDrawingRect; aDrawingRect.Left() = nScrX; aDrawingRect.Right() = nScrX+nScrW-1; @@ -2120,7 +2120,7 @@ void ScOutputData::DrawRefMark( SCCOL nRefStartX, SCROW nRefStartY, if (bTop && bBottom && bLeft && bRight) { mpDev->SetFillColor(); - mpDev->DrawRect( Rectangle( nMinX, nMinY, nMaxX, nMaxY ) ); + mpDev->DrawRect( tools::Rectangle( nMinX, nMinY, nMaxX, nMaxY ) ); } else { @@ -2151,10 +2151,10 @@ void ScOutputData::DrawRefMark( SCCOL nRefStartX, SCROW nRefStartY, sal_Int32 aRectMinY2 = nMinY + aRadius; // Draw corner rectangles - Rectangle aLowerRight( aRectMaxX1, aRectMaxY1, aRectMaxX2, aRectMaxY2 ); - Rectangle aUpperLeft ( aRectMinX1, aRectMinY1, aRectMinX2, aRectMinY2 ); - Rectangle aLowerLeft ( aRectMinX1, aRectMaxY1, aRectMinX2, aRectMaxY2 ); - Rectangle aUpperRight( aRectMaxX1, aRectMinY1, aRectMaxX2, aRectMinY2 ); + tools::Rectangle aLowerRight( aRectMaxX1, aRectMaxY1, aRectMaxX2, aRectMaxY2 ); + tools::Rectangle aUpperLeft ( aRectMinX1, aRectMinY1, aRectMinX2, aRectMinY2 ); + tools::Rectangle aLowerLeft ( aRectMinX1, aRectMaxY1, aRectMinX2, aRectMaxY2 ); + tools::Rectangle aUpperRight( aRectMaxX1, aRectMinY1, aRectMaxX2, aRectMinY2 ); mpDev->DrawTransparent( tools::PolyPolygon( tools::Polygon( aLowerRight ) ), lclCornerRectTransparency ); mpDev->DrawTransparent( tools::PolyPolygon( tools::Polygon( aUpperLeft ) ), lclCornerRectTransparency ); @@ -2253,7 +2253,7 @@ void ScOutputData::DrawOneChange( SCCOL nRefStartX, SCROW nRefStartY, if (bTop && bBottom && bLeft && bRight) { mpDev->SetFillColor(); - mpDev->DrawRect( Rectangle( nMinX, nMinY, nMaxX, nMaxY ) ); + mpDev->DrawRect( tools::Rectangle( nMinX, nMinY, nMaxX, nMaxY ) ); } else { @@ -2278,7 +2278,7 @@ void ScOutputData::DrawOneChange( SCCOL nRefStartX, SCROW nRefStartY, { mpDev->SetLineColor(); mpDev->SetFillColor( rColor ); - mpDev->DrawRect( Rectangle( nMinX+nLayoutSign, nMinY+1, nMinX+3*nLayoutSign, nMinY+3 ) ); + mpDev->DrawRect( tools::Rectangle( nMinX+nLayoutSign, nMinY+1, nMinX+3*nLayoutSign, nMinY+3 ) ); } } } @@ -2411,7 +2411,7 @@ void ScOutputData::DrawNoteMarks(vcl::RenderContext& rRenderContext) } } if ( bLayoutRTL ? ( nMarkX >= 0 ) : ( nMarkX < nScrX+nScrW ) ) - rRenderContext.DrawRect( Rectangle( nMarkX-5*nLayoutSign,nPosY,nMarkX+1*nLayoutSign,nPosY+6 ) ); + rRenderContext.DrawRect( tools::Rectangle( nMarkX-5*nLayoutSign,nPosY,nMarkX+1*nLayoutSign,nPosY+6 ) ); } nPosX += pRowInfo[0].pCellInfo[nX+1].nWidth * nLayoutSign; @@ -2478,7 +2478,7 @@ void ScOutputData::AddPDFNotes() } if ( bLayoutRTL ? ( nMarkX >= 0 ) : ( nMarkX < nScrX+nScrW ) ) { - Rectangle aNoteRect( nMarkX, nPosY, nMarkX+nNoteWidth*nLayoutSign, nPosY+nNoteHeight ); + tools::Rectangle aNoteRect( nMarkX, nPosY, nMarkX+nNoteWidth*nLayoutSign, nPosY+nNoteHeight ); const ScPostIt* pNote = mpDoc->GetNote(nMergeX, nMergeY, nTab); // Note title is the cell address (as on printed note pages) @@ -2525,7 +2525,7 @@ void ScOutputData::DrawClipMarks() nInitPosX += nMirrorW - 1; // always in pixels long nLayoutSign = bLayoutRTL ? -1 : 1; - Rectangle aCellRect; + tools::Rectangle aCellRect; long nPosY = nScrY; for (SCSIZE nArrY=1; nArrY+1<nArrCount; nArrY++) { @@ -2575,7 +2575,7 @@ void ScOutputData::DrawClipMarks() if ( bLayoutRTL ) nStartPosX -= nOutWidth - 1; - aCellRect = Rectangle( Point( nStartPosX, nStartPosY ), Size( nOutWidth, nOutHeight ) ); + aCellRect = tools::Rectangle( Point( nStartPosX, nStartPosY ), Size( nOutWidth, nOutHeight ) ); } else { @@ -2599,7 +2599,7 @@ void ScOutputData::DrawClipMarks() if ( bLayoutRTL ) nStartPosX -= nOutWidth - 1; // #i80447# create aCellRect from two points in case nOutWidth is 0 - aCellRect = Rectangle( Point( nStartPosX, nPosY ), + aCellRect = tools::Rectangle( Point( nStartPosX, nPosY ), Point( nStartPosX+nOutWidth-1, nPosY+nOutHeight-1 ) ); } @@ -2615,14 +2615,14 @@ void ScOutputData::DrawClipMarks() if ( pInfo->nClipMark & ( bLayoutRTL ? ScClipMark::Right : ScClipMark::Left ) ) { // visually left - Rectangle aMarkRect = aCellRect; + tools::Rectangle aMarkRect = aCellRect; aMarkRect.Right() = aCellRect.Left()+nMarkPixel-1; SvxFont::DrawArrow( *mpDev, aMarkRect, aMarkSize, aArrowFillCol, true ); } if ( pInfo->nClipMark & ( bLayoutRTL ? ScClipMark::Left : ScClipMark::Right ) ) { // visually right - Rectangle aMarkRect = aCellRect; + tools::Rectangle aMarkRect = aCellRect; aMarkRect.Left() = aCellRect.Right()-nMarkPixel+1; SvxFont::DrawArrow( *mpDev, aMarkRect, aMarkSize, aArrowFillCol, false ); } diff --git a/sc/source/ui/view/output2.cxx b/sc/source/ui/view/output2.cxx index f0060f630b5b..54141905c549 100644 --- a/sc/source/ui/view/output2.cxx +++ b/sc/source/ui/view/output2.cxx @@ -831,7 +831,7 @@ double ScOutputData::GetStretch() // output strings -static void lcl_DoHyperlinkResult( OutputDevice* pDev, const Rectangle& rRect, ScRefCellValue& rCell ) +static void lcl_DoHyperlinkResult( OutputDevice* pDev, const tools::Rectangle& rRect, ScRefCellValue& rCell ) { vcl::PDFExtOutDevData* pPDFData = dynamic_cast< vcl::PDFExtOutDevData* >( pDev->GetExtOutDevData() ); @@ -1442,7 +1442,7 @@ void ScOutputData::DrawStrings( bool bPixelToLogic ) LayoutStrings(bPixelToLogic); } -Rectangle ScOutputData::LayoutStrings(bool bPixelToLogic, bool bPaint, const ScAddress &rAddress) +tools::Rectangle ScOutputData::LayoutStrings(bool bPixelToLogic, bool bPaint, const ScAddress &rAddress) { OSL_ENSURE( mpDev == mpRefDevice || mpDev->GetMapMode().GetMapUnit() == mpRefDevice->GetMapMode().GetMapUnit(), @@ -2070,7 +2070,7 @@ Rectangle ScOutputData::LayoutStrings(bool bPixelToLogic, bool bPaint, const ScA // the area of the text that covers the specified cell if (!bPaint && rAddress.Col() == nX) { - Rectangle aRect; + tools::Rectangle aRect; mpDev->GetTextBoundRect(aRect, aShort); aRect += aDrawTextPos; return aRect; @@ -2114,7 +2114,7 @@ Rectangle ScOutputData::LayoutStrings(bool bPixelToLogic, bool bPaint, const ScA bool bHasURL = pPDFData && aCell.meType == CELLTYPE_FORMULA && aCell.mpFormula->IsHyperLinkCell(); if (bPaint && bHasURL) { - Rectangle aURLRect( aURLStart, aVars.GetTextSize() ); + tools::Rectangle aURLRect( aURLStart, aVars.GetTextSize() ); lcl_DoHyperlinkResult(mpDev, aURLRect, aCell); } } @@ -2127,7 +2127,7 @@ Rectangle ScOutputData::LayoutStrings(bool bPixelToLogic, bool bPaint, const ScA if ( bProgress ) ScProgress::DeleteInterpretProgress(); - return Rectangle(); + return tools::Rectangle(); } ScFieldEditEngine* ScOutputData::CreateOutputEditEngine() @@ -2250,7 +2250,7 @@ static long lcl_GetEditSize( EditEngine& rEngine, bool bWidth, bool bSwap, long return rEngine.GetTextHeight(); } -void ScOutputData::ShrinkEditEngine( EditEngine& rEngine, const Rectangle& rAlignRect, +void ScOutputData::ShrinkEditEngine( EditEngine& rEngine, const tools::Rectangle& rAlignRect, long nLeftM, long nTopM, long nRightM, long nBottomM, bool bWidth, sal_uInt16 nOrient, long nAttrRotate, bool bPixelToLogic, long& rEngineWidth, long& rEngineHeight, long& rNeededPixel, bool& rLeftClip, bool& rRightClip ) @@ -2487,7 +2487,7 @@ void ScOutputData::DrawEditParam::calcMargins(long& rTopM, long& rLeftM, long& r } void ScOutputData::DrawEditParam::calcPaperSize( - Size& rPaperSize, const Rectangle& rAlignRect, double nPPTX, double nPPTY) const + Size& rPaperSize, const tools::Rectangle& rAlignRect, double nPPTX, double nPPTY) const { long nTopM, nLeftM, nBottomM, nRightM; calcMargins(nTopM, nLeftM, nBottomM, nRightM, nPPTX, nPPTY); @@ -2746,7 +2746,7 @@ void ScOutputData::DrawEditParam::adjustForHyperlinkInPDF(Point aURLStart, Outpu else if (mbAsianVertical) aURLStart.X() -= nURLWidth; - Rectangle aURLRect( aURLStart, Size( nURLWidth, nURLHeight ) ); + tools::Rectangle aURLRect( aURLStart, Size( nURLWidth, nURLHeight ) ); lcl_DoHyperlinkResult(pDev, aURLRect, maCell); } @@ -2832,7 +2832,7 @@ void ScOutputData::DrawEditStandard(DrawEditParam& rParam) // use same GetEditArea call as in ScViewData::SetEditEngine Fraction aFract(1,1); - Rectangle aUtilRect = ScEditUtil( mpDoc, rParam.mnCellX, rParam.mnCellY, nTab, Point(0,0), pFmtDevice, + tools::Rectangle aUtilRect = ScEditUtil( mpDoc, rParam.mnCellX, rParam.mnCellY, nTab, Point(0,0), pFmtDevice, HMM_PER_TWIPS, HMM_PER_TWIPS, aFract, aFract ).GetEditArea( rParam.mpPattern, false ); aLogicSize.Width() = aUtilRect.GetWidth(); } @@ -3063,7 +3063,7 @@ void ScOutputData::DrawEditStandard(DrawEditParam& rParam) } } - Rectangle aLogicClip; + tools::Rectangle aLogicClip; if (bClip || bSimClip) { // Clip marks are already handled in GetOutputArea @@ -3249,7 +3249,7 @@ bool ScOutputData::Clip( DrawEditParam& rParam, const Size& aCellSize, ShowClipMarks( rParam, nEngineHeight, aCellSize, bMerged, aAreaParam); } - Rectangle aLogicClip; + tools::Rectangle aLogicClip; if (bClip || bSimClip) { // Clip marks are already handled in GetOutputArea @@ -3853,7 +3853,7 @@ void ScOutputData::DrawEditStacked(DrawEditParam& rParam) // use same GetEditArea call as in ScViewData::SetEditEngine Fraction aFract(1,1); - Rectangle aUtilRect = ScEditUtil( mpDoc, rParam.mnCellX, rParam.mnCellY, nTab, Point(0,0), pFmtDevice, + tools::Rectangle aUtilRect = ScEditUtil( mpDoc, rParam.mnCellX, rParam.mnCellY, nTab, Point(0,0), pFmtDevice, HMM_PER_TWIPS, HMM_PER_TWIPS, aFract, aFract ).GetEditArea( rParam.mpPattern, false ); aLogicSize.Width() = aUtilRect.GetWidth(); } @@ -4038,7 +4038,7 @@ void ScOutputData::DrawEditStacked(DrawEditParam& rParam) } } - Rectangle aLogicClip; + tools::Rectangle aLogicClip; if (bClip || bSimClip) { // Clip marks are already handled in GetOutputArea @@ -4207,7 +4207,7 @@ void ScOutputData::DrawEditAsianVertical(DrawEditParam& rParam) // use same GetEditArea call as in ScViewData::SetEditEngine Fraction aFract(1,1); - Rectangle aUtilRect = ScEditUtil( mpDoc, rParam.mnCellX, rParam.mnCellY, nTab, Point(0,0), pFmtDevice, + tools::Rectangle aUtilRect = ScEditUtil( mpDoc, rParam.mnCellX, rParam.mnCellY, nTab, Point(0,0), pFmtDevice, HMM_PER_TWIPS, HMM_PER_TWIPS, aFract, aFract ).GetEditArea( rParam.mpPattern, false ); aLogicSize.Width() = aUtilRect.GetWidth(); } @@ -4385,7 +4385,7 @@ void ScOutputData::DrawEditAsianVertical(DrawEditParam& rParam) } } - Rectangle aLogicClip; + tools::Rectangle aLogicClip; if (bClip || bSimClip) { // Clip marks are already handled in GetOutputArea @@ -5113,10 +5113,10 @@ void ScOutputData::DrawRotated(bool bPixelToLogic) } if (bPixelToLogic) - aAreaParam.maClipRect = mpRefDevice->PixelToLogic( Rectangle( + aAreaParam.maClipRect = mpRefDevice->PixelToLogic( tools::Rectangle( Point(nClipStartX,nClipStartY), aClipSize ) ); else - aAreaParam.maClipRect = Rectangle(Point(nClipStartX, nClipStartY), + aAreaParam.maClipRect = tools::Rectangle(Point(nClipStartX, nClipStartY), aClipSize ); // Scale = 1 if (bMetaFile) diff --git a/sc/source/ui/view/output3.cxx b/sc/source/ui/view/output3.cxx index beb7e5fa532b..55f2aad1fa5f 100644 --- a/sc/source/ui/view/output3.cxx +++ b/sc/source/ui/view/output3.cxx @@ -38,7 +38,7 @@ // #i72502# Point ScOutputData::PrePrintDrawingLayer(long nLogStX, long nLogStY ) { - Rectangle aRect; + tools::Rectangle aRect; SCCOL nCol; Point aOffset; long nLayoutSign(bLayoutRTL ? -1 : 1); diff --git a/sc/source/ui/view/pfuncache.cxx b/sc/source/ui/view/pfuncache.cxx index 4c4024d187f9..c73a1df51436 100644 --- a/sc/source/ui/view/pfuncache.cxx +++ b/sc/source/ui/view/pfuncache.cxx @@ -116,7 +116,7 @@ void ScPrintFuncCache::InitLocations( const ScMarkData& rMark, OutputDevice* pDe aFunc.DoPrint( aPage, nTabStart, nDisplayStart, false, &aLocData ); ScRange aCellRange; - Rectangle aPixRect; + tools::Rectangle aPixRect; if ( aLocData.GetMainCellRange( aCellRange, aPixRect ) ) aLocations.push_back( ScPrintPageLocation( nRenderer, aCellRange, aPixRect ) ); diff --git a/sc/source/ui/view/preview.cxx b/sc/source/ui/view/preview.cxx index 81af4b4273fe..132267515eb6 100644 --- a/sc/source/ui/view/preview.cxx +++ b/sc/source/ui/view/preview.cxx @@ -372,9 +372,9 @@ void ScPreview::DoPrint( ScPreviewLocationData* pFillLocation ) Size aWinSize = GetOutputSize(); if ( aOffset.X() < 0 ) - DrawRect(Rectangle( 0, 0, -aOffset.X(), aWinSize.Height() )); + DrawRect(tools::Rectangle( 0, 0, -aOffset.X(), aWinSize.Height() )); if ( aOffset.Y() < 0 ) - DrawRect(Rectangle( 0, 0, aWinSize.Width(), -aOffset.Y() )); + DrawRect(tools::Rectangle( 0, 0, aWinSize.Width(), -aOffset.Y() )); } long nLeftMargin = 0; @@ -430,9 +430,9 @@ void ScPreview::DoPrint( ScPreviewLocationData* pFillLocation ) if ( bDoPrint && bPageMargin && pLocationData ) // don't make use of pLocationData while filling it { - Rectangle aPixRect; - Rectangle aRectCellPosition; - Rectangle aRectPosition; + tools::Rectangle aPixRect; + tools::Rectangle aRectCellPosition; + tools::Rectangle aRectPosition; pLocationData->GetMainCellRange( aPageArea, aPixRect ); if( !bLayoutRTL ) { @@ -503,7 +503,7 @@ void ScPreview::DoPrint( ScPreviewLocationData* pFillLocation ) // Draw background first. SetLineColor(); SetFillColor(aBackColor); - DrawRect(Rectangle(0, 0, aWinEnd.X(), aWinEnd.Y())); + DrawRect(tools::Rectangle(0, 0, aWinEnd.X(), aWinEnd.Y())); const ScPatternAttr& rDefPattern = static_cast<const ScPatternAttr&>( @@ -565,7 +565,7 @@ void ScPreview::DoPrint( ScPreviewLocationData* pFillLocation ) Point aColumnTop = LogicToPixel( Point( 0, -aOffset.Y() ) ,aMMMode ); SetLineColor( COL_BLACK ); SetFillColor( COL_BLACK ); - DrawRect( Rectangle( Point( nRight[i] - 2, aColumnTop.Y() ),Point( nRight[i] + 2 , 4 + aColumnTop.Y()) )); + DrawRect( tools::Rectangle( Point( nRight[i] - 2, aColumnTop.Y() ),Point( nRight[i] + 2 , 4 + aColumnTop.Y()) )); DrawLine( Point( nRight[i], aColumnTop.Y() ), Point( nRight[i], 10 + aColumnTop.Y()) ); } SetMapMode( aMMMode ); @@ -577,13 +577,13 @@ void ScPreview::DoPrint( ScPreviewLocationData* pFillLocation ) SetLineColor(); SetFillColor(aBackColor); if (bRight) - DrawRect(Rectangle(nPageEndX,0, aWinEnd.X(),aWinEnd.Y())); + DrawRect(tools::Rectangle(nPageEndX,0, aWinEnd.X(),aWinEnd.Y())); if (bBottom) { if (bRight) - DrawRect(Rectangle(0,nPageEndY, nPageEndX,aWinEnd.Y())); // Corner not duplicated + DrawRect(tools::Rectangle(0,nPageEndY, nPageEndX,aWinEnd.Y())); // Corner not duplicated else - DrawRect(Rectangle(0,nPageEndY, aWinEnd.X(),aWinEnd.Y())); + DrawRect(tools::Rectangle(0,nPageEndY, aWinEnd.X(),aWinEnd.Y())); } } @@ -598,7 +598,7 @@ void ScPreview::DoPrint( ScPreviewLocationData* pFillLocation ) SetLineColor( aBorderColor ); SetFillColor(); - Rectangle aPixel( LogicToPixel( Rectangle( -aOffset.X(), -aOffset.Y(), nPageEndX, nPageEndY ) ) ); + tools::Rectangle aPixel( LogicToPixel( tools::Rectangle( -aOffset.X(), -aOffset.Y(), nPageEndX, nPageEndY ) ) ); --aPixel.Right(); --aPixel.Bottom(); DrawRect( PixelToLogic( aPixel ) ); @@ -609,15 +609,15 @@ void ScPreview::DoPrint( ScPreviewLocationData* pFillLocation ) SetLineColor(); SetFillColor( aBorderColor ); - Rectangle aPixel; + tools::Rectangle aPixel; - aPixel = LogicToPixel( Rectangle( nPageEndX, -aOffset.Y(), nPageEndX, nPageEndY ) ); + aPixel = LogicToPixel( tools::Rectangle( nPageEndX, -aOffset.Y(), nPageEndX, nPageEndY ) ); aPixel.Top() += SC_PREVIEW_SHADOWSIZE; aPixel.Right() += SC_PREVIEW_SHADOWSIZE - 1; aPixel.Bottom() += SC_PREVIEW_SHADOWSIZE - 1; DrawRect( PixelToLogic( aPixel ) ); - aPixel = LogicToPixel( Rectangle( -aOffset.X(), nPageEndY, nPageEndX, nPageEndY ) ); + aPixel = LogicToPixel( tools::Rectangle( -aOffset.X(), nPageEndY, nPageEndX, nPageEndY ) ); aPixel.Left() += SC_PREVIEW_SHADOWSIZE; aPixel.Right() += SC_PREVIEW_SHADOWSIZE - 1; aPixel.Bottom() += SC_PREVIEW_SHADOWSIZE - 1; @@ -626,7 +626,7 @@ void ScPreview::DoPrint( ScPreviewLocationData* pFillLocation ) } } -void ScPreview::Paint( vcl::RenderContext& /*rRenderContext*/, const Rectangle& /* rRect */ ) +void ScPreview::Paint( vcl::RenderContext& /*rRenderContext*/, const tools::Rectangle& /* rRect */ ) { bool bWasInPaint = bInPaint; // nested calls shouldn't be necessary, but allow for now bInPaint = true; @@ -1082,17 +1082,17 @@ void ScPreview::MouseButtonUp( const MouseEvent& rMEvt ) if(( bLeftRulerChange || bRightRulerChange ) && ( aButtonUpPt.X() <= ( 0 - aOffset.X() ) || aButtonUpPt.X() > nWidth * HMM_PER_TWIPS - aOffset.X() ) ) { bMoveRulerAction = false; - Invalidate(Rectangle(0, 0, 10000, 10000)); + Invalidate(tools::Rectangle(0, 0, 10000, 10000)); } else if( bLeftRulerChange && ( aButtonUpPt.X() / HMM_PER_TWIPS > nWidth - aLRItem.GetRight() - aOffset.X() / HMM_PER_TWIPS ) ) { bMoveRulerAction = false; - Invalidate(Rectangle(0, 0, 10000, 10000)); + Invalidate(tools::Rectangle(0, 0, 10000, 10000)); } else if( bRightRulerChange && ( aButtonUpPt.X() / HMM_PER_TWIPS < aLRItem.GetLeft() - aOffset.X() / HMM_PER_TWIPS ) ) { bMoveRulerAction = false; - Invalidate(Rectangle(0, 0, 10000, 10000)); + Invalidate(tools::Rectangle(0, 0, 10000, 10000)); } else if( aButtonDownPt.X() == aButtonUpPt.X() ) { @@ -1130,7 +1130,7 @@ void ScPreview::MouseButtonUp( const MouseEvent& rMEvt ) aPrintFunc.UpdatePages(); } - Rectangle aRect(0,0,10000,10000); + tools::Rectangle aRect(0,0,10000,10000); Invalidate(aRect); aModificator.SetDocumentModified(); bLeftRulerChange = false; @@ -1149,7 +1149,7 @@ void ScPreview::MouseButtonUp( const MouseEvent& rMEvt ) if( ( bTopRulerChange || bBottomRulerChange || bHeaderRulerChange || bFooterRulerChange ) && ( aButtonUpPt.Y() <= ( 0 - aOffset.Y() ) || aButtonUpPt.Y() > nHeight * HMM_PER_TWIPS -aOffset.Y() ) ) { bMoveRulerAction = false; - Invalidate(Rectangle(0, 0, 10000, 10000)); + Invalidate(tools::Rectangle(0, 0, 10000, 10000)); } else if( aButtonDownPt.Y() == aButtonUpPt.Y() ) { @@ -1232,7 +1232,7 @@ void ScPreview::MouseButtonUp( const MouseEvent& rMEvt ) aPrintFunc.UpdatePages(); } - Rectangle aRect(0, 0, 10000, 10000); + tools::Rectangle aRect(0, 0, 10000, 10000); Invalidate(aRect); aModificator.SetDocumentModified(); bTopRulerChange = false; @@ -1289,7 +1289,7 @@ void ScPreview::MouseButtonUp( const MouseEvent& rMEvt ) ScPrintFunc aPrintFunc( this, pDocShell, nTab ); aPrintFunc.UpdatePages(); } - Rectangle aRect(0, 0, 10000, 10000); + tools::Rectangle aRect(0, 0, 10000, 10000); Invalidate(aRect); } bColRulerMove = false; @@ -1567,12 +1567,12 @@ void ScPreview::DrawInvert( long nDragPos, PointerStyle nFlags ) long nWidth = (long) lcl_GetDocPageSize( &pDocShell->GetDocument(), nTab ).Width(); if( nFlags == PointerStyle::HSizeBar || nFlags == PointerStyle::HSplit ) { - Rectangle aRect( nDragPos, -aOffset.Y(), nDragPos + 1,(long)( ( nHeight * HMM_PER_TWIPS ) - aOffset.Y())); + tools::Rectangle aRect( nDragPos, -aOffset.Y(), nDragPos + 1,(long)( ( nHeight * HMM_PER_TWIPS ) - aOffset.Y())); Invert( aRect, InvertFlags::N50 ); } else if( nFlags == PointerStyle::VSizeBar ) { - Rectangle aRect( -aOffset.X(), nDragPos,(long)( ( nWidth * HMM_PER_TWIPS ) - aOffset.X() ), nDragPos + 1 ); + tools::Rectangle aRect( -aOffset.X(), nDragPos,(long)( ( nWidth * HMM_PER_TWIPS ) - aOffset.X() ), nDragPos + 1 ); Invert( aRect, InvertFlags::N50 ); } } diff --git a/sc/source/ui/view/prevloc.cxx b/sc/source/ui/view/prevloc.cxx index 2a562262997c..4c9f6ed18450 100644 --- a/sc/source/ui/view/prevloc.cxx +++ b/sc/source/ui/view/prevloc.cxx @@ -40,12 +40,12 @@ enum ScPreviewLocationType struct ScPreviewLocationEntry { ScPreviewLocationType eType; - Rectangle aPixelRect; + tools::Rectangle aPixelRect; ScRange aCellRange; bool bRepeatCol; bool bRepeatRow; - ScPreviewLocationEntry( ScPreviewLocationType eNewType, const Rectangle& rPixel, const ScRange& rRange, + ScPreviewLocationEntry( ScPreviewLocationType eNewType, const tools::Rectangle& rPixel, const ScRange& rRange, bool bRepCol, bool bRepRow ) : eType( eNewType ), aPixelRect( rPixel ), @@ -90,7 +90,7 @@ void ScPreviewTableInfo::SetRowInfo( SCROW nCount, ScPreviewColRowInfo* pNewInfo nRows = nCount; } -void ScPreviewTableInfo::LimitToArea( const Rectangle& rPixelArea ) +void ScPreviewTableInfo::LimitToArea( const tools::Rectangle& rPixelArea ) { if ( pColInfo ) { @@ -177,10 +177,10 @@ void ScPreviewLocationData::Clear() nDrawRanges = 0; } -void ScPreviewLocationData::AddCellRange( const Rectangle& rRect, const ScRange& rRange, bool bRepCol, bool bRepRow, +void ScPreviewLocationData::AddCellRange( const tools::Rectangle& rRect, const ScRange& rRange, bool bRepCol, bool bRepRow, const MapMode& rDrawMap ) { - Rectangle aPixelRect( pWindow->LogicToPixel( rRect ) ); + tools::Rectangle aPixelRect( pWindow->LogicToPixel( rRect ) ); m_Entries.push_front( o3tl::make_unique<ScPreviewLocationEntry>(SC_PLOC_CELLRANGE, aPixelRect, rRange, bRepCol, bRepRow) ); OSL_ENSURE( nDrawRanges < SC_PREVIEW_MAXRANGES, "too many ranges" ); @@ -209,28 +209,28 @@ void ScPreviewLocationData::AddCellRange( const Rectangle& rRect, const ScRange& } } -void ScPreviewLocationData::AddColHeaders( const Rectangle& rRect, SCCOL nStartCol, SCCOL nEndCol, bool bRepCol ) +void ScPreviewLocationData::AddColHeaders( const tools::Rectangle& rRect, SCCOL nStartCol, SCCOL nEndCol, bool bRepCol ) { SCTAB nTab = 0; //! ? ScRange aRange( nStartCol, 0, nTab, nEndCol, 0, nTab ); - Rectangle aPixelRect( pWindow->LogicToPixel( rRect ) ); + tools::Rectangle aPixelRect( pWindow->LogicToPixel( rRect ) ); m_Entries.push_front( o3tl::make_unique<ScPreviewLocationEntry>(SC_PLOC_COLHEADER, aPixelRect, aRange, bRepCol, false) ); } -void ScPreviewLocationData::AddRowHeaders( const Rectangle& rRect, SCROW nStartRow, SCROW nEndRow, bool bRepRow ) +void ScPreviewLocationData::AddRowHeaders( const tools::Rectangle& rRect, SCROW nStartRow, SCROW nEndRow, bool bRepRow ) { SCTAB nTab = 0; //! ? ScRange aRange( 0, nStartRow, nTab, 0, nEndRow, nTab ); - Rectangle aPixelRect( pWindow->LogicToPixel( rRect ) ); + tools::Rectangle aPixelRect( pWindow->LogicToPixel( rRect ) ); m_Entries.push_front( o3tl::make_unique<ScPreviewLocationEntry>(SC_PLOC_ROWHEADER, aPixelRect, aRange, false, bRepRow) ); } -void ScPreviewLocationData::AddHeaderFooter( const Rectangle& rRect, bool bHeader, bool bLeft ) +void ScPreviewLocationData::AddHeaderFooter( const tools::Rectangle& rRect, bool bHeader, bool bLeft ) { ScRange aRange; //! ? - Rectangle aPixelRect( pWindow->LogicToPixel( rRect ) ); + tools::Rectangle aPixelRect( pWindow->LogicToPixel( rRect ) ); ScPreviewLocationType eType = bHeader ? ( bLeft ? SC_PLOC_LEFTHEADER : SC_PLOC_RIGHTHEADER ) : @@ -239,23 +239,23 @@ void ScPreviewLocationData::AddHeaderFooter( const Rectangle& rRect, bool bHeade m_Entries.push_front( o3tl::make_unique<ScPreviewLocationEntry>(eType, aPixelRect, aRange, false, false) ); } -void ScPreviewLocationData::AddNoteMark( const Rectangle& rRect, const ScAddress& rPos ) +void ScPreviewLocationData::AddNoteMark( const tools::Rectangle& rRect, const ScAddress& rPos ) { ScRange aRange( rPos ); - Rectangle aPixelRect( pWindow->LogicToPixel( rRect ) ); + tools::Rectangle aPixelRect( pWindow->LogicToPixel( rRect ) ); m_Entries.push_front( o3tl::make_unique<ScPreviewLocationEntry>(SC_PLOC_NOTEMARK, aPixelRect, aRange, false, false) ); } -void ScPreviewLocationData::AddNoteText( const Rectangle& rRect, const ScAddress& rPos ) +void ScPreviewLocationData::AddNoteText( const tools::Rectangle& rRect, const ScAddress& rPos ) { ScRange aRange( rPos ); - Rectangle aPixelRect( pWindow->LogicToPixel( rRect ) ); + tools::Rectangle aPixelRect( pWindow->LogicToPixel( rRect ) ); m_Entries.push_front( o3tl::make_unique<ScPreviewLocationEntry>(SC_PLOC_NOTETEXT, aPixelRect, aRange, false, false) ); } -void ScPreviewLocationData::GetDrawRange( sal_uInt16 nPos, Rectangle& rPixelRect, MapMode& rMapMode, sal_uInt8& rRangeId ) const +void ScPreviewLocationData::GetDrawRange( sal_uInt16 nPos, tools::Rectangle& rPixelRect, MapMode& rMapMode, sal_uInt8& rRangeId ) const { OSL_ENSURE( nPos < nDrawRanges, "wrong position" ); if ( nPos < nDrawRanges ) @@ -279,7 +279,7 @@ static ScPreviewLocationEntry* lcl_GetEntryByAddress( return nullptr; } -Rectangle ScPreviewLocationData::GetOffsetPixel( const ScAddress& rCellPos, const ScRange& rRange ) const +tools::Rectangle ScPreviewLocationData::GetOffsetPixel( const ScAddress& rCellPos, const ScRange& rRange ) const { const double nScaleX = HMM_PER_TWIPS; const double nScaleY = HMM_PER_TWIPS; @@ -305,23 +305,23 @@ Rectangle ScPreviewLocationData::GetOffsetPixel( const ScAddress& rCellPos, cons Size aOffsetPixel = pWindow->LogicToPixel( aOffsetLogic, aCellMapMode ); Size aSizePixel = pWindow->LogicToPixel( aSizeLogic, aCellMapMode ); - return Rectangle( Point( aOffsetPixel.Width(), aOffsetPixel.Height() ), aSizePixel ); + return tools::Rectangle( Point( aOffsetPixel.Width(), aOffsetPixel.Height() ), aSizePixel ); } -void ScPreviewLocationData::GetCellPosition( const ScAddress& rCellPos, Rectangle& rCellRect ) const +void ScPreviewLocationData::GetCellPosition( const ScAddress& rCellPos, tools::Rectangle& rCellRect ) const { ScPreviewLocationEntry* pEntry = lcl_GetEntryByAddress( m_Entries, rCellPos, SC_PLOC_CELLRANGE ); if ( pEntry ) { - Rectangle aOffsetRect = GetOffsetPixel( rCellPos, pEntry->aCellRange ); - rCellRect = Rectangle( aOffsetRect.Left() + pEntry->aPixelRect.Left(), + tools::Rectangle aOffsetRect = GetOffsetPixel( rCellPos, pEntry->aCellRange ); + rCellRect = tools::Rectangle( aOffsetRect.Left() + pEntry->aPixelRect.Left(), aOffsetRect.Top() + pEntry->aPixelRect.Top(), aOffsetRect.Right() + pEntry->aPixelRect.Left(), aOffsetRect.Bottom() + pEntry->aPixelRect.Top() ); } } -bool ScPreviewLocationData::HasCellsInRange( const Rectangle& rVisiblePixel ) const +bool ScPreviewLocationData::HasCellsInRange( const tools::Rectangle& rVisiblePixel ) const { for (auto const& it : m_Entries) { @@ -333,7 +333,7 @@ bool ScPreviewLocationData::HasCellsInRange( const Rectangle& rVisiblePixel ) co return false; } -bool ScPreviewLocationData::GetHeaderPosition( Rectangle& rRect ) const +bool ScPreviewLocationData::GetHeaderPosition( tools::Rectangle& rRect ) const { for (auto const& it : m_Entries) { @@ -347,7 +347,7 @@ bool ScPreviewLocationData::GetHeaderPosition( Rectangle& rRect ) const return false; } -bool ScPreviewLocationData::GetFooterPosition( Rectangle& rRect ) const +bool ScPreviewLocationData::GetFooterPosition( tools::Rectangle& rRect ) const { for (auto const& it : m_Entries) { @@ -389,7 +389,7 @@ bool ScPreviewLocationData::IsFooterLeft() const return false; } -long ScPreviewLocationData::GetNoteCountInRange( const Rectangle& rVisiblePixel, bool bNoteMarks ) const +long ScPreviewLocationData::GetNoteCountInRange( const tools::Rectangle& rVisiblePixel, bool bNoteMarks ) const { ScPreviewLocationType eType = bNoteMarks ? SC_PLOC_NOTEMARK : SC_PLOC_NOTETEXT; @@ -403,8 +403,8 @@ long ScPreviewLocationData::GetNoteCountInRange( const Rectangle& rVisiblePixel, return nRet; } -bool ScPreviewLocationData::GetNoteInRange( const Rectangle& rVisiblePixel, long nIndex, bool bNoteMarks, - ScAddress& rCellPos, Rectangle& rNoteRect ) const +bool ScPreviewLocationData::GetNoteInRange( const tools::Rectangle& rVisiblePixel, long nIndex, bool bNoteMarks, + ScAddress& rCellPos, tools::Rectangle& rNoteRect ) const { ScPreviewLocationType eType = bNoteMarks ? SC_PLOC_NOTEMARK : SC_PLOC_NOTETEXT; @@ -426,7 +426,7 @@ bool ScPreviewLocationData::GetNoteInRange( const Rectangle& rVisiblePixel, long return false; } -Rectangle ScPreviewLocationData::GetNoteInRangeOutputRect(const Rectangle& rVisiblePixel, bool bNoteMarks, const ScAddress& aCellPos) const +tools::Rectangle ScPreviewLocationData::GetNoteInRangeOutputRect(const tools::Rectangle& rVisiblePixel, bool bNoteMarks, const ScAddress& aCellPos) const { ScPreviewLocationType eType = bNoteMarks ? SC_PLOC_NOTEMARK : SC_PLOC_NOTETEXT; @@ -441,10 +441,10 @@ Rectangle ScPreviewLocationData::GetNoteInRangeOutputRect(const Rectangle& rVisi } } - return Rectangle(); + return tools::Rectangle(); } -void ScPreviewLocationData::GetTableInfo( const Rectangle& rVisiblePixel, ScPreviewTableInfo& rInfo ) const +void ScPreviewLocationData::GetTableInfo( const tools::Rectangle& rVisiblePixel, ScPreviewTableInfo& rInfo ) const { const double nScaleX = HMM_PER_TWIPS; const double nScaleY = HMM_PER_TWIPS; @@ -467,7 +467,7 @@ void ScPreviewLocationData::GetTableInfo( const Rectangle& rVisiblePixel, ScPrev SCROW nMainRowStart = 0; SCROW nMainRowEnd = 0; - Rectangle aHeaderRect, aRepeatRect, aMainRect; + tools::Rectangle aHeaderRect, aRepeatRect, aMainRect; SCTAB nTab = 0; for (auto const& it : m_Entries) @@ -665,11 +665,11 @@ void ScPreviewLocationData::GetTableInfo( const Rectangle& rVisiblePixel, ScPrev rInfo.LimitToArea( rVisiblePixel ); } -Rectangle ScPreviewLocationData::GetHeaderCellOutputRect(const Rectangle& rVisRect, const ScAddress& rCellPos, bool bColHeader) const +tools::Rectangle ScPreviewLocationData::GetHeaderCellOutputRect(const tools::Rectangle& rVisRect, const ScAddress& rCellPos, bool bColHeader) const { // first a stupid implementation // NN says here should be done more - Rectangle aClipRect; + tools::Rectangle aClipRect; ScPreviewTableInfo aTableInfo; GetTableInfo( rVisRect, aTableInfo ); @@ -687,23 +687,23 @@ Rectangle ScPreviewLocationData::GetHeaderCellOutputRect(const Rectangle& rVisRe const ScPreviewColRowInfo& rRowInfo = aTableInfo.GetRowInfo()[nRow]; if ( rColInfo.bIsHeader || rRowInfo.bIsHeader ) - aClipRect = Rectangle( rColInfo.nPixelStart, rRowInfo.nPixelStart, rColInfo.nPixelEnd, rRowInfo.nPixelEnd ); + aClipRect = tools::Rectangle( rColInfo.nPixelStart, rRowInfo.nPixelStart, rColInfo.nPixelEnd, rRowInfo.nPixelEnd ); } return aClipRect; } -Rectangle ScPreviewLocationData::GetCellOutputRect(const ScAddress& rCellPos) const +tools::Rectangle ScPreviewLocationData::GetCellOutputRect(const ScAddress& rCellPos) const { // first a stupid implementation // NN says here should be done more - Rectangle aRect; + tools::Rectangle aRect; GetCellPosition(rCellPos, aRect); return aRect; } // GetMainCellRange is used for links in PDF export -bool ScPreviewLocationData::GetMainCellRange( ScRange& rRange, Rectangle& rPixRect ) const +bool ScPreviewLocationData::GetMainCellRange( ScRange& rRange, tools::Rectangle& rPixRect ) const { for (auto const& it : m_Entries) { diff --git a/sc/source/ui/view/prevwsh.cxx b/sc/source/ui/view/prevwsh.cxx index 6f6465da4f34..810e60c5fc55 100644 --- a/sc/source/ui/view/prevwsh.cxx +++ b/sc/source/ui/view/prevwsh.cxx @@ -440,7 +440,7 @@ IMPL_LINK( ScPreviewShell, ScrollHandler, ScrollBar*, pScroll, void ) Point aMousePos = pScroll->OutputToNormalizedScreenPixel( pScroll->GetPointerPosPixel() ); Point aPos = pScroll->GetParent()->OutputToNormalizedScreenPixel( pScroll->GetPosPixel() ); OUString aHelpStr; - Rectangle aRect; + tools::Rectangle aRect; QuickHelpFlags nAlign; if( nDelta < 0 ) diff --git a/sc/source/ui/view/printfun.cxx b/sc/source/ui/view/printfun.cxx index 35bde37f9074..6a9b4a35a2f9 100644 --- a/sc/source/ui/view/printfun.cxx +++ b/sc/source/ui/view/printfun.cxx @@ -409,7 +409,7 @@ static void lcl_HidePrint( ScTableInfo& rTabInfo, SCCOL nX1, SCCOL nX2 ) // - Preview of templates void ScPrintFunc::DrawToDev( ScDocument* pDoc, OutputDevice* pDev, double /* nPrintFactor */, - const Rectangle& rBound, ScViewData* pViewData, bool bMetaFile ) + const tools::Rectangle& rBound, ScViewData* pViewData, bool bMetaFile ) { //! evaluate nPrintFactor !!! @@ -437,10 +437,10 @@ void ScPrintFunc::DrawToDev( ScDocument* pDoc, OutputDevice* pDev, double /* nPr MapMode aMode = pDev->GetMapMode(); - Rectangle aRect = rBound; + tools::Rectangle aRect = rBound; if (aRect.Right() < aRect.Left() || aRect.Bottom() < aRect.Top()) - aRect = Rectangle( Point(), pDev->GetOutputSize() ); + aRect = tools::Rectangle( Point(), pDev->GetOutputSize() ); SCCOL nX1 = 0; SCROW nY1 = 0; @@ -475,7 +475,7 @@ void ScPrintFunc::DrawToDev( ScDocument* pDoc, OutputDevice* pDev, double /* nPr long nDevSizeX = aRect.Right()-aRect.Left()+1; long nDevSizeY = aRect.Bottom()-aRect.Top()+1; - Rectangle aLines; + tools::Rectangle aLines; ScRange aRange( nX1,nY1,nTab, nX2,nY2,nTab ); long nTwipsSizeX = 0; @@ -1085,7 +1085,7 @@ void ScPrintFunc::SetDateTime( const Date& rDate, const tools::Time& rTime ) } static void lcl_DrawGraphic( const Graphic &rGraphic, vcl::RenderContext *pOut, - const Rectangle &rGrf, const Rectangle &rOut ) + const tools::Rectangle &rGrf, const tools::Rectangle &rOut ) { const bool bNotInside = !rOut.IsInside( rGrf ); if ( bNotInside ) @@ -1101,7 +1101,7 @@ static void lcl_DrawGraphic( const Graphic &rGraphic, vcl::RenderContext *pOut, } static void lcl_DrawGraphic( const SvxBrushItem &rBrush, vcl::RenderContext *pOut, OutputDevice* pRefDev, - const Rectangle &rOrg, const Rectangle &rOut, + const tools::Rectangle &rOrg, const tools::Rectangle &rOut, OUString const & referer ) { Size aGrfSize(0,0); @@ -1216,7 +1216,7 @@ static void lcl_DrawGraphic( const SvxBrushItem &rBrush, vcl::RenderContext *pOu default: OSL_ENSURE( !pOut, "new Graphic position?" ); } - Rectangle aGrf( aPos,aDrawSize ); + tools::Rectangle aGrf( aPos,aDrawSize ); if ( bDraw && aGrf.IsOver( rOut ) ) { lcl_DrawGraphic( *pGraphic, pOut, aGrf, rOut ); @@ -1252,7 +1252,7 @@ void ScPrintFunc::DrawBorder( long nScrX, long nScrY, long nScrW, long nScrH, nTop += (long) ( pShadow->CalcShadowSpace(SvxShadowItemSide::TOP) * nScaleY ); nBottom += (long) ( pShadow->CalcShadowSpace(SvxShadowItemSide::BOTTOM) * nScaleY ); } - Rectangle aFrameRect( Point(nScrX+nLeft, nScrY+nTop), + tools::Rectangle aFrameRect( Point(nScrX+nLeft, nScrY+nTop), Size(nScrW-nLeft-nRight, nScrH-nTop-nBottom) ); // center of frame, to paint lines through OutputData @@ -1300,34 +1300,34 @@ void ScPrintFunc::DrawBorder( long nScrX, long nScrY, long nScrW, long nScrH, switch (pShadow->GetLocation()) { case SvxShadowLocation::TopLeft: - pDev->DrawRect( Rectangle( + pDev->DrawRect( tools::Rectangle( aFrameRect.Left()-nShadowX, aFrameRect.Top()-nShadowY, aFrameRect.Right()-nShadowX, aFrameRect.Top() ) ); - pDev->DrawRect( Rectangle( + pDev->DrawRect( tools::Rectangle( aFrameRect.Left()-nShadowX, aFrameRect.Top()-nShadowY, aFrameRect.Left(), aFrameRect.Bottom()-nShadowY ) ); break; case SvxShadowLocation::TopRight: - pDev->DrawRect( Rectangle( + pDev->DrawRect( tools::Rectangle( aFrameRect.Left()+nShadowX, aFrameRect.Top()-nShadowY, aFrameRect.Right()+nShadowX, aFrameRect.Top() ) ); - pDev->DrawRect( Rectangle( + pDev->DrawRect( tools::Rectangle( aFrameRect.Right(), aFrameRect.Top()-nShadowY, aFrameRect.Right()+nShadowX, aFrameRect.Bottom()-nShadowY ) ); break; case SvxShadowLocation::BottomLeft: - pDev->DrawRect( Rectangle( + pDev->DrawRect( tools::Rectangle( aFrameRect.Left()-nShadowX, aFrameRect.Bottom(), aFrameRect.Right()-nShadowX, aFrameRect.Bottom()+nShadowY ) ); - pDev->DrawRect( Rectangle( + pDev->DrawRect( tools::Rectangle( aFrameRect.Left()-nShadowX, aFrameRect.Top()+nShadowY, aFrameRect.Left(), aFrameRect.Bottom()+nShadowY ) ); break; case SvxShadowLocation::BottomRight: - pDev->DrawRect( Rectangle( + pDev->DrawRect( tools::Rectangle( aFrameRect.Left()+nShadowX, aFrameRect.Bottom(), aFrameRect.Right()+nShadowX, aFrameRect.Bottom()+nShadowY ) ); - pDev->DrawRect( Rectangle( + pDev->DrawRect( tools::Rectangle( aFrameRect.Right(), aFrameRect.Top()+nShadowY, aFrameRect.Right()+nShadowX, aFrameRect.Bottom()+nShadowY ) ); break; @@ -1395,7 +1395,7 @@ void ScPrintFunc::PrintColHdr( SCCOL nX1, SCCOL nX2, long nScrX, long nScrY ) long nWidth = (long) (nDocW * nScaleX); long nEndX = nPosX + nWidth * nLayoutSign; - pDev->DrawRect( Rectangle( nPosX,nPosY,nEndX,nEndY ) ); + pDev->DrawRect( tools::Rectangle( nPosX,nPosY,nEndX,nEndY ) ); aText = ::ScColToAlpha( nCol); long nTextWidth = pDev->GetTextWidth(aText); @@ -1439,7 +1439,7 @@ void ScPrintFunc::PrintRowHdr( SCROW nY1, SCROW nY2, long nScrX, long nScrY ) long nHeight = (long) (nDocH * nScaleY); long nEndY = nPosY + nHeight; - pDev->DrawRect( Rectangle( nPosX,nPosY,nEndX,nEndY ) ); + pDev->DrawRect( tools::Rectangle( nPosX,nPosY,nEndX,nEndY ) ); aText = OUString::number( nRow+1 ); long nTextWidth = pDev->GetTextWidth(aText); @@ -1470,7 +1470,7 @@ void ScPrintFunc::LocateColHdr( SCCOL nX1, SCCOL nX2, long nScrX, long nScrY, if (nDocW) nPosX += (long) (nDocW * nScaleX); } - Rectangle aCellRect( nScrX, nScrY, nPosX, nEndY ); + tools::Rectangle aCellRect( nScrX, nScrY, nPosX, nEndY ); rLocationData.AddColHeaders( aCellRect, nX1, nX2, bRepCol ); } @@ -1490,7 +1490,7 @@ void ScPrintFunc::LocateRowHdr( SCROW nY1, SCROW nY2, long nScrX, long nScrY, long nPosY = nScrY - nOneY; nPosY += pDoc->GetScaledRowHeight( nY1, nY2, nPrintTab, nScaleY); - Rectangle aCellRect( nScrX, nScrY, nEndX, nPosY ); + tools::Rectangle aCellRect( nScrX, nScrY, nEndX, nPosY ); rLocationData.AddRowHeaders( aCellRect, nY1, nY2, bRepRow ); } @@ -1532,7 +1532,7 @@ void ScPrintFunc::LocateArea( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, long nPosY = nScrY - nOneY; nPosY += pDoc->GetScaledRowHeight( nY1, nY2, nPrintTab, nScaleY); - Rectangle aCellRect( nScrX, nScrY, nPosX, nPosY ); + tools::Rectangle aCellRect( nScrX, nScrY, nPosX, nPosY ); rLocationData.AddCellRange( aCellRect, ScRange( nX1,nY1,nPrintTab, nX2,nY2,nPrintTab ), bRepCol, bRepRow, aDrawMapMode ); } @@ -1615,7 +1615,7 @@ void ScPrintFunc::PrintArea( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, if( aTableParam.bCellContent ) aOutputData.DrawBackground(*pDev); - pDev->SetClipRegion(vcl::Region(Rectangle( + pDev->SetClipRegion(vcl::Region(tools::Rectangle( aPos, Size(aOutputData.GetScrW(), aOutputData.GetScrH())))); pDev->SetClipRegion(); @@ -1794,7 +1794,7 @@ void ScPrintFunc::PrintHF( long nPageNo, bool bHeader, long nStartY, // Clipping for Text - pDev->SetClipRegion(vcl::Region(Rectangle(aStart, aPaperSize))); + pDev->SetClipRegion(vcl::Region(tools::Rectangle(aStart, aPaperSize))); // left @@ -1843,7 +1843,7 @@ void ScPrintFunc::PrintHF( long nPageNo, bool bHeader, long nStartY, if ( pLocationData ) { - Rectangle aHeaderRect( aBorderStart, aBorderSize ); + tools::Rectangle aHeaderRect( aBorderStart, aBorderSize ); pLocationData->AddHeaderFooter( aHeaderRect, bHeader, bLeft ); } } @@ -1904,9 +1904,9 @@ long ScPrintFunc::DoNotes( long nNoteStart, bool bDoPrint, ScPreviewLocationData if ( pLocationData ) { - Rectangle aTextRect( Point( nPosX, nPosY ), Size( aDataSize.Width(), nTextHeight ) ); + tools::Rectangle aTextRect( Point( nPosX, nPosY ), Size( aDataSize.Width(), nTextHeight ) ); pLocationData->AddNoteText( aTextRect, rPos ); - Rectangle aMarkRect( Point( aPageRect.Left(), nPosY ), Size( nMarkLen, nTextHeight ) ); + tools::Rectangle aMarkRect( Point( aPageRect.Left(), nPosY ), Size( nMarkLen, nTextHeight ) ); pLocationData->AddNoteMark( aMarkRect, rPos ); } @@ -1939,14 +1939,14 @@ long ScPrintFunc::PrintNotes( long nPageNo, long nNoteStart, bool bDoPrint, ScPr pDev->SetMapMode(aOffsetMode); pDev->SetLineColor(); pDev->SetFillColor(aBackgroundColor); - pDev->DrawRect(Rectangle(Point(), + pDev->DrawRect(tools::Rectangle(Point(), Size((long)(aPageSize.Width() * nScaleX * 100 / nZoom), (long)(aPageSize.Height() * nScaleY * 100 / nZoom)))); } // adjust aPageRect for left/right page - Rectangle aTempRect = Rectangle( Point(), aPageSize ); + tools::Rectangle aTempRect = tools::Rectangle( Point(), aPageSize ); if (IsMirror(nPageNo)) { aPageRect.Left() = ( aTempRect.Left() + nRightMargin ) * 100 / nZoom; @@ -2008,14 +2008,14 @@ void ScPrintFunc::PrintPage( long nPageNo, SCCOL nX1, SCROW nY1, SCCOL nX2, SCRO pDev->SetMapMode(aOffsetMode); pDev->SetLineColor(); pDev->SetFillColor(aBackgroundColor); - pDev->DrawRect(Rectangle(Point(), + pDev->DrawRect(tools::Rectangle(Point(), Size((long)(aPageSize.Width() * nScaleX * 100 / nZoom), (long)(aPageSize.Height() * nScaleY * 100 / nZoom)))); } // adjust aPageRect for left/right page - Rectangle aTempRect = Rectangle( Point(), aPageSize ); + tools::Rectangle aTempRect = tools::Rectangle( Point(), aPageSize ); if (IsMirror(nPageNo)) { aPageRect.Left() = ( aTempRect.Left() + nRightMargin ) * 100 / nZoom; @@ -2322,7 +2322,7 @@ void ScPrintFunc::PrintPage( long nPageNo, SCCOL nX1, SCROW nY1, SCCOL nX2, SCRO pDev->SetMapMode(aOffsetMode); pDev->SetLineColor( aGridColor ); pDev->SetFillColor(); - pDev->DrawRect( Rectangle( nLeftX, nTopY, nRightX, nBottomY ) ); + pDev->DrawRect( tools::Rectangle( nLeftX, nTopY, nRightX, nBottomY ) ); // nEndX/Y without frame-adaption } @@ -2905,7 +2905,7 @@ Size ScPrintFunc::GetDocPageSize() // Page size in Document-Twips // Calculating Left / Right also in PrintPage - aPageRect = Rectangle( Point(), aPageSize ); + aPageRect = tools::Rectangle( Point(), aPageSize ); aPageRect.Left() = ( aPageRect.Left() + nLeftMargin ) * 100 / nZoom; aPageRect.Right() = ( aPageRect.Right() - nRightMargin ) * 100 / nZoom; aPageRect.Top() = ( aPageRect.Top() + nTopMargin ) * 100 / nZoom + aHdr.nHeight; @@ -2953,7 +2953,7 @@ static void lcl_SetHidden( ScDocument* pDoc, SCTAB nPrintTab, ScPageRowEntry& rP bool bLeftIsEmpty = false; ScRange aTempRange; - Rectangle aTempRect = pDoc->GetMMRect( 0,0, 0,0, 0 ); + tools::Rectangle aTempRect = pDoc->GetMMRect( 0,0, 0,0, 0 ); for (size_t i=0; i<nPagesX; i++) { diff --git a/sc/source/ui/view/select.cxx b/sc/source/ui/view/select.cxx index 014bd6371450..8fd89540a1ff 100644 --- a/sc/source/ui/view/select.cxx +++ b/sc/source/ui/view/select.cxx @@ -64,7 +64,7 @@ sal_uLong ScViewFunctionSet::CalcUpdateInterval( const Size& rWinSize, const Poi { sal_uLong nUpdateInterval = SELENG_AUTOREPEAT_INTERVAL_MAX; vcl::Window* pWin = pEngine->GetWindow(); - Rectangle aScrRect = pWin->GetDesktopRectPixel(); + tools::Rectangle aScrRect = pWin->GetDesktopRectPixel(); Point aRootPos = pWin->OutputToAbsoluteScreenPixel(Point(0,0)); if (bRightScroll) { @@ -318,7 +318,7 @@ bool ScViewFunctionSet::SetCursorAtPoint( const Point& rPointPixel, bool /* bDon pViewData->GetPosFromPixel( aEffPos.X(), aEffPos.Y(), GetWhich(), nPosX, nPosY, true, true ); // with Repair - Rectangle aEditArea = pViewData->GetEditArea(GetWhich(), nPosX, nPosY, + tools::Rectangle aEditArea = pViewData->GetEditArea(GetWhich(), nPosX, nPosY, pEngine->GetWindow(), nullptr, false); diff --git a/sc/source/ui/view/spelldialog.cxx b/sc/source/ui/view/spelldialog.cxx index b01c9de1158b..96d00dcc3935 100644 --- a/sc/source/ui/view/spelldialog.cxx +++ b/sc/source/ui/view/spelldialog.cxx @@ -245,7 +245,7 @@ void ScSpellDialogChildWindow::Init() mpViewShell->MakeEditView( mxEngine.get(), nCol, nRow ); EditView* pEditView = mpViewData->GetEditView( mpViewData->GetActivePart() ); mpViewData->SetSpellingView( pEditView ); - Rectangle aRect( Point( 0, 0 ), Point( 0, 0 ) ); + tools::Rectangle aRect( Point( 0, 0 ), Point( 0, 0 ) ); pEditView->SetOutputArea( aRect ); mxEngine->SetControlWord( EEControlBits::USECHARATTRIBS ); mxEngine->EnableUndo( false ); diff --git a/sc/source/ui/view/tabcont.cxx b/sc/source/ui/view/tabcont.cxx index c492df811bd3..c6aa46fb4a97 100644 --- a/sc/source/ui/view/tabcont.cxx +++ b/sc/source/ui/view/tabcont.cxx @@ -461,7 +461,7 @@ void ScTabControl::StartDrag( sal_Int8 /* nAction */, const Point& rPosPixel ) if (!bDisable) { - vcl::Region aRegion( Rectangle(0,0,0,0) ); + vcl::Region aRegion( tools::Rectangle(0,0,0,0) ); CommandEvent aCEvt( rPosPixel, CommandEventId::StartDrag, true ); // needed for StartDrag if (TabBar::StartDrag( aCEvt, aRegion )) DoDrag( aRegion ); @@ -644,7 +644,7 @@ void ScTabControl::Mirror() TabBar::Mirror(); if( nSelPageIdByMouse != TabBar::PAGE_NOT_FOUND ) { - Rectangle aRect( GetPageRect( GetCurPageId() ) ); + tools::Rectangle aRect( GetPageRect( GetCurPageId() ) ); if( !aRect.IsEmpty() ) SetPointerPosPixel( aRect.Center() ); nSelPageIdByMouse = TabBar::PAGE_NOT_FOUND; // only once after a Select() diff --git a/sc/source/ui/view/tabsplit.cxx b/sc/source/ui/view/tabsplit.cxx index 2ba86b514965..b242a90557cc 100644 --- a/sc/source/ui/view/tabsplit.cxx +++ b/sc/source/ui/view/tabsplit.cxx @@ -54,7 +54,7 @@ void ScTabSplitter::SetFixed(bool bSet) SetPointer(PointerStyle::VSplit); } -void ScTabSplitter::Paint( vcl::RenderContext& rRenderContext, const Rectangle& rRect ) +void ScTabSplitter::Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect ) { rRenderContext.Push(PushFlags::FILLCOLOR | PushFlags::LINECOLOR); const StyleSettings& rStyleSettings = rRenderContext.GetSettings().GetStyleSettings(); @@ -67,7 +67,7 @@ void ScTabSplitter::Paint( vcl::RenderContext& rRenderContext, const Rectangle& { rRenderContext.SetLineColor(rStyleSettings.GetShadowColor()); rRenderContext.SetFillColor(rStyleSettings.GetShadowColor()); - rRenderContext.DrawRect(Rectangle(rRect.Left(), rRect.Top(), rRect.Right(), rRect.Bottom())); + rRenderContext.DrawRect(tools::Rectangle(rRect.Left(), rRect.Top(), rRect.Right(), rRect.Bottom())); // Draw handle rRenderContext.SetLineColor(Color(COL_BLACK)); @@ -76,14 +76,14 @@ void ScTabSplitter::Paint( vcl::RenderContext& rRenderContext, const Rectangle& const long h4 = rRect.GetHeight() / 4; // First xc fraction is truncated, second one is rounded. This will draw a centered line // in handlers with odd width and a centered rectangle in those with even width. - rRenderContext.DrawRect(Rectangle(Point(xc / 2, rRect.Top() + h4), + rRenderContext.DrawRect(tools::Rectangle(Point(xc / 2, rRect.Top() + h4), Point((xc + 1) / 2, rRect.Bottom() - h4))); break; } case SC_SPLIT_NORMAL: rRenderContext.SetLineColor(rStyleSettings.GetShadowColor()); rRenderContext.SetFillColor(rStyleSettings.GetShadowColor()); - rRenderContext.DrawRect(Rectangle(rRect.Left(), rRect.Top(), rRect.Right(), rRect.Bottom())); + rRenderContext.DrawRect(tools::Rectangle(rRect.Left(), rRect.Top(), rRect.Right(), rRect.Bottom())); break; case SC_SPLIT_FIX: // Nothing to draw @@ -98,7 +98,7 @@ void ScTabSplitter::Paint( vcl::RenderContext& rRenderContext, const Rectangle& { rRenderContext.SetLineColor(rStyleSettings.GetShadowColor()); rRenderContext.SetFillColor(rStyleSettings.GetShadowColor()); - rRenderContext.DrawRect(Rectangle(rRect.Left(), rRect.Top(), rRect.Right(), rRect.Bottom())); + rRenderContext.DrawRect(tools::Rectangle(rRect.Left(), rRect.Top(), rRect.Right(), rRect.Bottom())); // Draw handle rRenderContext.SetLineColor(Color(COL_BLACK)); @@ -107,14 +107,14 @@ void ScTabSplitter::Paint( vcl::RenderContext& rRenderContext, const Rectangle& const long w4 = rRect.GetWidth() / 4; // First yc fraction is truncated, second one is rounded. This will draw a centered line // in handlers with odd height and a centered rectangle in those with even height. - DrawRect(Rectangle(Point(rRect.Left() + w4, yc / 2), + DrawRect(tools::Rectangle(Point(rRect.Left() + w4, yc / 2), Point(rRect.Right() - w4, (yc + 1) / 2))); break; } case SC_SPLIT_NORMAL: rRenderContext.SetLineColor(rStyleSettings.GetShadowColor()); rRenderContext.SetFillColor(rStyleSettings.GetShadowColor()); - rRenderContext.DrawRect(Rectangle(rRect.Left(), rRect.Top(), rRect.Right(), rRect.Bottom())); + rRenderContext.DrawRect(tools::Rectangle(rRect.Left(), rRect.Top(), rRect.Right(), rRect.Bottom())); break; case SC_SPLIT_FIX: // Nothing to draw diff --git a/sc/source/ui/view/tabview.cxx b/sc/source/ui/view/tabview.cxx index 117ffbaba80d..c4b50413736b 100644 --- a/sc/source/ui/view/tabview.cxx +++ b/sc/source/ui/view/tabview.cxx @@ -79,7 +79,7 @@ ScCornerButton::~ScCornerButton() { } -void ScCornerButton::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) +void ScCornerButton::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) { const StyleSettings& rStyleSettings = rRenderContext.GetSettings().GetStyleSettings(); SetBackground(rStyleSettings.GetFaceColor()); @@ -109,14 +109,14 @@ void ScCornerButton::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRenderContext.SetLineColor(); rRenderContext.SetFillColor(aCenter); - rRenderContext.DrawRect(Rectangle(nCenterX, nCenterY, nCenterX, nPosY)); - rRenderContext.DrawRect(Rectangle(nCenterX, nCenterY, nDarkX, nCenterY)); + rRenderContext.DrawRect(tools::Rectangle(nCenterX, nCenterY, nCenterX, nPosY)); + rRenderContext.DrawRect(tools::Rectangle(nCenterX, nCenterY, nDarkX, nCenterY)); rRenderContext.SetFillColor(aOuter); - rRenderContext.DrawRect(Rectangle(0, 0, nPosX, nCenterY - 1)); + rRenderContext.DrawRect(tools::Rectangle(0, 0, nPosX, nCenterY - 1)); if (bLayoutRTL) - rRenderContext.DrawRect(Rectangle(nCenterX + 1, nCenterY, nPosX, nPosY)); + rRenderContext.DrawRect(tools::Rectangle(nCenterX + 1, nCenterY, nPosX, nPosY)); else - rRenderContext.DrawRect(Rectangle(0, nCenterY, nCenterX - 1, nPosY)); + rRenderContext.DrawRect(tools::Rectangle(0, nCenterY, nCenterX - 1, nPosY)); } // both buttons have the same look now - only dark right/bottom lines @@ -533,10 +533,10 @@ void ScTabView::DoResize( const Point& rOffset, const Size& rSize, bool bInner ) // SetDragRectPixel also without Scrollbars etc., when already split if ( bHScroll || aViewData.GetHSplitMode() != SC_SPLIT_NONE ) pHSplitter->SetDragRectPixel( - Rectangle( nPosX, nPosY, nPosX+nSizeX, nPosY+nSizeY ), pFrameWin ); + tools::Rectangle( nPosX, nPosY, nPosX+nSizeX, nPosY+nSizeY ), pFrameWin ); if ( bVScroll || aViewData.GetVSplitMode() != SC_SPLIT_NONE ) pVSplitter->SetDragRectPixel( - Rectangle( nPosX, nPosY, nPosX+nSizeX, nPosY+nSizeY ), pFrameWin ); + tools::Rectangle( nPosX, nPosY, nPosX+nSizeX, nPosY+nSizeY ), pFrameWin ); if (bTabControl && ! bHScroll ) { @@ -1080,7 +1080,7 @@ IMPL_LINK( ScTabView, ScrollHdl, ScrollBar*, pScroll, void ) long nScrollPos = GetScrollBarPos( *pScroll ) + nScrollMin; OUString aHelpStr; - Rectangle aRect; + tools::Rectangle aRect; QuickHelpFlags nAlign; if (bHoriz) { @@ -1728,7 +1728,7 @@ Point ScTabView::GetChartInsertPos( const Size& rSize, const ScRange& rCellRange // get the visible rectangle in logic units MapMode aDrawMode = pWin->GetDrawMapMode(); - Rectangle aVisible( pWin->PixelToLogic( Rectangle( Point(0,0), pWin->GetOutputSizePixel() ), aDrawMode ) ); + tools::Rectangle aVisible( pWin->PixelToLogic( tools::Rectangle( Point(0,0), pWin->GetOutputSizePixel() ), aDrawMode ) ); ScDocument* pDoc = aViewData.GetDocument(); SCTAB nTab = aViewData.GetTabNo(); @@ -1749,7 +1749,7 @@ Point ScTabView::GetChartInsertPos( const Size& rSize, const ScRange& rCellRange // get the logic position of the selection - Rectangle aSelection = pDoc->GetMMRect( rCellRange.aStart.Col(), rCellRange.aStart.Row(), + tools::Rectangle aSelection = pDoc->GetMMRect( rCellRange.aStart.Col(), rCellRange.aStart.Row(), rCellRange.aEnd.Col(), rCellRange.aEnd.Row(), nTab ); long nLeftSpace = aSelection.Left() - aVisible.Left(); @@ -1803,7 +1803,7 @@ Point ScTabView::GetChartInsertPos( const Size& rSize, const ScRange& rCellRange // move the position if the object doesn't fit in the screen - Rectangle aCompareRect( aInsertPos, Size( nNeededWidth, nNeededHeight ) ); + tools::Rectangle aCompareRect( aInsertPos, Size( nNeededWidth, nNeededHeight ) ); if ( aCompareRect.Right() > aVisible.Right() ) aInsertPos.X() -= aCompareRect.Right() - aVisible.Right(); if ( aCompareRect.Bottom() > aVisible.Bottom() ) @@ -1823,7 +1823,7 @@ Point ScTabView::GetChartInsertPos( const Size& rSize, const ScRange& rCellRange return aInsertPos; } -Point ScTabView::GetChartDialogPos( const Size& rDialogSize, const Rectangle& rLogicChart ) +Point ScTabView::GetChartDialogPos( const Size& rDialogSize, const tools::Rectangle& rLogicChart ) { // rDialogSize must be in pixels, rLogicChart in 1/100 mm. Return value is in pixels. @@ -1841,11 +1841,11 @@ Point ScTabView::GetChartDialogPos( const Size& rDialogSize, const Rectangle& rL if (pWin) { MapMode aDrawMode = pWin->GetDrawMapMode(); - Rectangle aObjPixel = pWin->LogicToPixel( rLogicChart, aDrawMode ); - Rectangle aObjAbs( pWin->OutputToAbsoluteScreenPixel( aObjPixel.TopLeft() ), + tools::Rectangle aObjPixel = pWin->LogicToPixel( rLogicChart, aDrawMode ); + tools::Rectangle aObjAbs( pWin->OutputToAbsoluteScreenPixel( aObjPixel.TopLeft() ), pWin->OutputToAbsoluteScreenPixel( aObjPixel.BottomRight() ) ); - Rectangle aDesktop = pWin->GetDesktopRectPixel(); + tools::Rectangle aDesktop = pWin->GetDesktopRectPixel(); Size aSpace = pWin->LogicToPixel( Size( 8, 12 ), MapUnit::MapAppFont ); ScDocument* pDoc = aViewData.GetDocument(); @@ -2154,7 +2154,7 @@ void ScTabView::SetNewVisArea() vcl::Window* pActive = pGridWin[aViewData.GetActivePart()]; if (pActive) aViewData.GetViewShell()->VisAreaChanged( - pActive->PixelToLogic(Rectangle(Point(),pActive->GetOutputSizePixel())) ); + pActive->PixelToLogic(tools::Rectangle(Point(),pActive->GetOutputSizePixel())) ); if (pDrawView) pDrawView->VisAreaChanged(); // no window passed on -> for all windows @@ -2305,7 +2305,7 @@ void ScTabView::SetAutoSpellData( SCCOL nPosX, SCROW nPosY, const std::vector<ed } } -OUString ScTabView::getRowColumnHeaders(const Rectangle& rRectangle) +OUString ScTabView::getRowColumnHeaders(const tools::Rectangle& rRectangle) { ScDocument* pDoc = aViewData.GetDocument(); if (!pDoc) @@ -2395,7 +2395,7 @@ OUString ScTabView::getRowColumnHeaders(const Rectangle& rRectangle) // New area extended to the bottom of the sheet after last row // excluding overlapping area with aNewColArea - Rectangle aNewRowArea(0, aOldSize.getHeight(), aOldSize.getWidth(), aNewSize.getHeight()); + tools::Rectangle aNewRowArea(0, aOldSize.getHeight(), aOldSize.getWidth(), aNewSize.getHeight()); // Only invalidate if spreadsheet extended to the bottom if (aNewRowArea.getHeight()) @@ -2521,7 +2521,7 @@ OUString ScTabView::getRowColumnHeaders(const Rectangle& rRectangle) // New area extended to the right of the sheet after last column // including overlapping area with aNewRowArea - Rectangle aNewColArea(aOldSize.getWidth(), 0, aNewSize.getWidth(), aNewSize.getHeight()); + tools::Rectangle aNewColArea(aOldSize.getWidth(), 0, aNewSize.getWidth(), aNewSize.getHeight()); // Only invalidate if spreadsheet extended to the bottom if (aNewColArea.getWidth()) diff --git a/sc/source/ui/view/tabview3.cxx b/sc/source/ui/view/tabview3.cxx index 9c63bdb7d242..84c56659065e 100644 --- a/sc/source/ui/view/tabview3.cxx +++ b/sc/source/ui/view/tabview3.cxx @@ -389,10 +389,10 @@ void ScTabView::SetCursor( SCCOL nPosX, SCROW nPosY, bool bNew ) // New area extended to the right of the sheet after last column // including overlapping area with aNewRowArea - Rectangle aNewColArea(aOldSize.getWidth(), 0, aNewSize.getWidth(), aNewSize.getHeight()); + tools::Rectangle aNewColArea(aOldSize.getWidth(), 0, aNewSize.getWidth(), aNewSize.getHeight()); // New area extended to the bottom of the sheet after last row // excluding overlapping area with aNewColArea - Rectangle aNewRowArea(0, aOldSize.getHeight(), aOldSize.getWidth(), aNewSize.getHeight()); + tools::Rectangle aNewRowArea(0, aOldSize.getHeight(), aOldSize.getWidth(), aNewSize.getHeight()); // Only invalidate if spreadsheet extended to the right if (aNewColArea.getWidth()) @@ -903,7 +903,7 @@ void ScTabView::AlignToCursor( SCsCOL nCurX, SCsROW nCurY, ScFollowMode eMode, if (pCare) { bool bLimit = false; - Rectangle aDlgPixel; + tools::Rectangle aDlgPixel; Size aWinSize; vcl::Window* pWin = GetActiveWin(); if (pWin) @@ -922,7 +922,7 @@ void ScTabView::AlignToCursor( SCsCOL nCurX, SCsROW nCurY, ScFollowMode eMode, Point aStart = aViewData.GetScrPos( nCurX, nCurY, eAlign ); long nCSX, nCSY; aViewData.GetMergeSizePixel( nCurX, nCurY, nCSX, nCSY ); - Rectangle aCursor( aStart, Size( nCSX, nCSY ) ); + tools::Rectangle aCursor( aStart, Size( nCSX, nCSY ) ); if ( aCursor.IsOver( aDlgPixel ) ) bLimit = true; // cell is covered by the dialog } @@ -1873,7 +1873,7 @@ void ScTabView::SetTabNo( SCTAB nTab, bool bNew, bool bExtendSelection, bool bSa ScClient* pClient = static_cast<ScClient*>(aViewData.GetViewShell()->GetIPClient()); if ( pClient && pClient->IsObjectInPlaceActive() ) { - Rectangle aObjArea = pClient->GetObjArea(); + tools::Rectangle aObjArea = pClient->GetObjArea(); if ( nTab == aViewData.GetRefTabNo() ) { // move to its original position @@ -1881,7 +1881,7 @@ void ScTabView::SetTabNo( SCTAB nTab, bool bNew, bool bExtendSelection, bool bSa SdrOle2Obj* pDrawObj = pClient->GetDrawObj(); if ( pDrawObj ) { - Rectangle aRect = pDrawObj->GetLogicRect(); + tools::Rectangle aRect = pDrawObj->GetLogicRect(); MapMode aMapMode( MapUnit::Map100thMM ); Size aOleSize = pDrawObj->GetOrigObjSize( &aMapMode ); aRect.SetSize( aOleSize ); @@ -2090,7 +2090,7 @@ void ScTabView::KillEditView( bool bNoPaint ) SCROW nRow2 = aViewData.GetEditEndRow(); bool bPaint[4]; bool bNotifyAcc = false; - Rectangle aRectangle[4]; + tools::Rectangle aRectangle[4]; bool bExtended = nRow1 != nRow2; // column is painted to the end anyway @@ -2124,7 +2124,7 @@ void ScTabView::KillEditView( bool bNoPaint ) if (comphelper::LibreOfficeKit::isActive()) { - const Rectangle& rInvRect = aRectangle[i]; + const tools::Rectangle& rInvRect = aRectangle[i]; pGridWin[i]->Invalidate(rInvRect); // invalidate other views @@ -2317,7 +2317,7 @@ void ScTabView::PaintArea( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCRO } } - pGridWin[i]->Invalidate( pGridWin[i]->PixelToLogic( Rectangle( aStart,aEnd ) ) ); + pGridWin[i]->Invalidate( pGridWin[i]->PixelToLogic( tools::Rectangle( aStart,aEnd ) ) ); } // #i79909# Calling UpdateAllOverlays here isn't necessary and would lead to overlay calls from a timer, @@ -2560,7 +2560,7 @@ void ScTabView::PaintTopArea( SCCOL nStartCol, SCCOL nEndCol ) else nEndX = aViewData.GetScrPos( nEndCol+1, 0, eWhich ).X() - nLayoutSign; pColBar[eWhich]->Invalidate( - Rectangle( nStartX, 0, nEndX, aWinSize.Height()-1 ) ); + tools::Rectangle( nStartX, 0, nEndX, aWinSize.Height()-1 ) ); } if (pColOutline[eWhich]) pColOutline[eWhich]->Invalidate(); @@ -2612,7 +2612,7 @@ void ScTabView::PaintLeftArea( SCROW nStartRow, SCROW nEndRow ) else nEndY = aViewData.GetScrPos( 0, nEndRow+1, eWhich ).Y() - 1; pRowBar[eWhich]->Invalidate( - Rectangle( 0, nStartY, aWinSize.Width()-1, nEndY ) ); + tools::Rectangle( 0, nStartY, aWinSize.Width()-1, nEndY ) ); } if (pRowOutline[eWhich]) pRowOutline[eWhich]->Invalidate(); @@ -2773,7 +2773,7 @@ void ScTabView::ActivatePart( ScSplitPos eWhich ) pSelEngine->SetWindow(pGridWin[eWhich]); pSelEngine->SetWhich(eWhich); - pSelEngine->SetVisibleArea( Rectangle(Point(), pGridWin[eWhich]->GetOutputSizePixel()) ); + pSelEngine->SetVisibleArea( tools::Rectangle(Point(), pGridWin[eWhich]->GetOutputSizePixel()) ); pGridWin[eOld]->MoveMouseStatus(*pGridWin[eWhich]); @@ -2792,7 +2792,7 @@ void ScTabView::ActivatePart( ScSplitPos eWhich ) pColBar[eNewH]->SetIgnoreMove(false); pHdrSelEng->SetWindow( pColBar[eNewH] ); long nWidth = pColBar[eNewH]->GetOutputSizePixel().Width(); - pHdrSelEng->SetVisibleArea( Rectangle( 0, LONG_MIN, nWidth-1, LONG_MAX ) ); + pHdrSelEng->SetVisibleArea( tools::Rectangle( 0, LONG_MIN, nWidth-1, LONG_MAX ) ); pColBar[eNewH]->CaptureMouse(); } if ( bLeftCap && pRowBar[eNewV] ) @@ -2801,7 +2801,7 @@ void ScTabView::ActivatePart( ScSplitPos eWhich ) pRowBar[eNewV]->SetIgnoreMove(false); pHdrSelEng->SetWindow( pRowBar[eNewV] ); long nHeight = pRowBar[eNewV]->GetOutputSizePixel().Height(); - pHdrSelEng->SetVisibleArea( Rectangle( LONG_MIN, 0, LONG_MAX, nHeight-1 ) ); + pHdrSelEng->SetVisibleArea( tools::Rectangle( LONG_MIN, 0, LONG_MAX, nHeight-1 ) ); pRowBar[eNewV]->CaptureMouse(); } aHdrFunc.SetWhich(eWhich); diff --git a/sc/source/ui/view/tabview4.cxx b/sc/source/ui/view/tabview4.cxx index b93fab31f717..7cfb8ff8fc93 100644 --- a/sc/source/ui/view/tabview4.cxx +++ b/sc/source/ui/view/tabview4.cxx @@ -39,7 +39,7 @@ void ScTabView::HideTip() vcl::Window* pWin = pGridWin[eWhich]; Help::HidePopover(pWin, nTipVisible); nTipVisible = 0; - aTipRectangle = Rectangle(); + aTipRectangle = tools::Rectangle(); nTipAlign = QuickHelpFlags::NONE; sTipString.clear(); sTopParent.clear(); @@ -89,7 +89,7 @@ void ScTabView::ShowRefTip() nFlags = ( nFlags & ~QuickHelpFlags::Top ) | QuickHelpFlags::Bottom; } - Rectangle aRect( pWin->OutputToScreenPixel( aPos ), Size(1,1) ); + tools::Rectangle aRect( pWin->OutputToScreenPixel( aPos ), Size(1,1) ); // Test if changed. if (!nTipVisible || nFlags != nTipAlign || aRect != aTipRectangle || sTipString != aHelp || sTopParent != pWin) @@ -142,7 +142,7 @@ void ScTabView::StopRefMode() { pSelEngine->SetWindow( pGridWin[ eNew ] ); pSelEngine->SetWhich( eNew ); - pSelEngine->SetVisibleArea( Rectangle(Point(), + pSelEngine->SetVisibleArea( tools::Rectangle(Point(), pGridWin[eNew]->GetOutputSizePixel()) ); pGridWin[eOld]->MoveMouseStatus(*pGridWin[eNew]); } @@ -284,7 +284,7 @@ void ScTabView::UpdateRef( SCCOL nCurX, SCROW nCurY, SCTAB nCurZ ) aPos.X() += 8; aPos.Y() += 4; aPos = pWin->OutputToScreenPixel( aPos ); - Rectangle aRect( aPos, aPos ); + tools::Rectangle aRect( aPos, aPos ); QuickHelpFlags nAlign = QuickHelpFlags::Left|QuickHelpFlags::Top; if (!nTipVisible || nAlign != nTipAlign || aRect != aTipRectangle || sTipString != aHelpStr || sTopParent != pWin) { @@ -460,7 +460,7 @@ void ScTabView::InvertHorizontal( ScVSplitPos eWhich, long nDragPos ) ScGridWindow* pWin = pGridWin[i].get(); if (pWin) { - Rectangle aRect( 0,nDragPos, pWin->GetOutputSizePixel().Width()-1,nDragPos+HDR_SLIDERSIZE-1 ); + tools::Rectangle aRect( 0,nDragPos, pWin->GetOutputSizePixel().Width()-1,nDragPos+HDR_SLIDERSIZE-1 ); pWin->Update(); pWin->DoInvertRect( aRect ); // Pixel } @@ -475,7 +475,7 @@ void ScTabView::InvertVertical( ScHSplitPos eWhich, long nDragPos ) ScGridWindow* pWin = pGridWin[i].get(); if (pWin) { - Rectangle aRect( nDragPos,0, nDragPos+HDR_SLIDERSIZE-1,pWin->GetOutputSizePixel().Height()-1 ); + tools::Rectangle aRect( nDragPos,0, nDragPos+HDR_SLIDERSIZE-1,pWin->GetOutputSizePixel().Height()-1 ); pWin->Update(); pWin->DoInvertRect( aRect ); // Pixel } diff --git a/sc/source/ui/view/tabview5.cxx b/sc/source/ui/view/tabview5.cxx index a17a1451c078..4c68fbf8d052 100644 --- a/sc/source/ui/view/tabview5.cxx +++ b/sc/source/ui/view/tabview5.cxx @@ -536,13 +536,13 @@ void ScTabView::ScrollToObject( SdrObject* pDrawObj ) } } -void ScTabView::MakeVisible( const Rectangle& rHMMRect ) +void ScTabView::MakeVisible( const tools::Rectangle& rHMMRect ) { vcl::Window* pWin = GetActiveWin(); Size aWinSize = pWin->GetOutputSizePixel(); SCTAB nTab = aViewData.GetTabNo(); - Rectangle aRect = pWin->LogicToPixel( rHMMRect ); + tools::Rectangle aRect = pWin->LogicToPixel( rHMMRect ); long nScrollX=0, nScrollY=0; // Pixel @@ -655,9 +655,9 @@ void ScTabView::OnLOKNoteStateChanged(const ScPostIt* pNote) const SdrCaptionObj* pCaption = pNote->GetCaption(); if (!pCaption) return; - Rectangle aRect = pCaption->GetLogicRect(); + tools::Rectangle aRect = pCaption->GetLogicRect(); basegfx::B2DRange aTailRange = pCaption->getTailPolygon().getB2DRange(); - Rectangle aTailRect(aTailRange.getMinX(), aTailRange.getMinY(), + tools::Rectangle aTailRect(aTailRange.getMinX(), aTailRange.getMinY(), aTailRange.getMaxX(), aTailRange.getMaxY()); aRect.Union( aTailRect ); @@ -666,7 +666,7 @@ void ScTabView::OnLOKNoteStateChanged(const ScPostIt* pNote) // The value used below is enough to get the tile, where the arrow tip is // placed, invalidated. const int nBorderSize = 200; - Rectangle aInvalidRect = aRect; + tools::Rectangle aInvalidRect = aRect; aInvalidRect.Left() -= nBorderSize; aInvalidRect.Right() += nBorderSize; aInvalidRect.Top() -= nBorderSize; diff --git a/sc/source/ui/view/tabvwsh2.cxx b/sc/source/ui/view/tabvwsh2.cxx index 8f161ed95494..494290092b42 100644 --- a/sc/source/ui/view/tabvwsh2.cxx +++ b/sc/source/ui/view/tabvwsh2.cxx @@ -319,11 +319,11 @@ void ScTabViewShell::ExecDraw(SfxRequest& rReq) sal_uInt32 nDefaultObjectSizeHeight = rAppOpt.GetDefaultObjectSizeHeight(); // calc position and size - Rectangle aVisArea = pWin->PixelToLogic(Rectangle(Point(0,0), pWin->GetOutputSizePixel())); + tools::Rectangle aVisArea = pWin->PixelToLogic(tools::Rectangle(Point(0,0), pWin->GetOutputSizePixel())); Point aPagePos = aVisArea.Center(); aPagePos.X() -= nDefaultObjectSizeWidth / 2; aPagePos.Y() -= nDefaultObjectSizeHeight / 2; - Rectangle aNewObjectRectangle(aPagePos, Size(nDefaultObjectSizeWidth, nDefaultObjectSizeHeight)); + tools::Rectangle aNewObjectRectangle(aPagePos, Size(nDefaultObjectSizeWidth, nDefaultObjectSizeHeight)); ScDrawView* pDrView = GetScDrawView(); diff --git a/sc/source/ui/view/tabvwsh4.cxx b/sc/source/ui/view/tabvwsh4.cxx index 6d7c050402a5..07e63223d429 100644 --- a/sc/source/ui/view/tabvwsh4.cxx +++ b/sc/source/ui/view/tabvwsh4.cxx @@ -423,7 +423,7 @@ void ScTabViewShell::SetZoomFactor( const Fraction &rZoomX, const Fraction &rZoo SfxViewShell::SetZoomFactor( rZoomX, rZoomY ); } -void ScTabViewShell::QueryObjAreaPixel( Rectangle& rRect ) const +void ScTabViewShell::QueryObjAreaPixel( tools::Rectangle& rRect ) const { // adjust to entire cells (in 1/100 mm) @@ -439,7 +439,7 @@ void ScTabViewShell::QueryObjAreaPixel( Rectangle& rRect ) const SCTAB nTab = rViewData.GetTabNo(); bool bNegativePage = pDoc->IsNegativePage( nTab ); - Rectangle aLogicRect = pDoc->GetMMRect( nCol, nRow, nCol, nRow, nTab ); + tools::Rectangle aLogicRect = pDoc->GetMMRect( nCol, nRow, nCol, nRow, nTab ); if ( bNegativePage ) { // use right edge of aLogicRect, and aLogicSize @@ -1464,7 +1464,7 @@ void ScTabViewShell::Construct( TriState nForceDesignMode ) if ( pDocSh->GetCreateMode() == SfxObjectCreateMode::EMBEDDED ) { //TODO/LATER: is there a difference between the two GetVisArea methods? - Rectangle aVisArea = static_cast<const SfxObjectShell*>(pDocSh)->GetVisArea(); + tools::Rectangle aVisArea = static_cast<const SfxObjectShell*>(pDocSh)->GetVisArea(); SCTAB nVisTab = rDoc.GetVisibleTab(); if (!rDoc.HasTable(nVisTab)) @@ -1825,7 +1825,7 @@ void ScTabViewShell::FillFieldData( ScHeaderFieldData& rData ) // eNumType is known by the dialog } -bool ScTabViewShell::GetChartArea( ScRangeListRef& rSource, Rectangle& rDest, SCTAB& rTab ) const +bool ScTabViewShell::GetChartArea( ScRangeListRef& rSource, tools::Rectangle& rDest, SCTAB& rTab ) const { rSource = aChartSource; rDest = aChartPos; diff --git a/sc/source/ui/view/tabvwshb.cxx b/sc/source/ui/view/tabvwshb.cxx index ee81fab78563..3dced2749fd7 100644 --- a/sc/source/ui/view/tabvwshb.cxx +++ b/sc/source/ui/view/tabvwshb.cxx @@ -79,7 +79,7 @@ void ScTabViewShell::ConnectObject( SdrOle2Obj* pObj ) if ( !pClient ) { pClient = new ScClient( this, pWin, GetSdrView()->GetModel(), pObj ); - Rectangle aRect = pObj->GetLogicRect(); + tools::Rectangle aRect = pObj->GetLogicRect(); Size aDrawSize = aRect.GetSize(); Size aOleSize = pObj->GetOrigObjSize(); @@ -113,7 +113,7 @@ public: // XCallback virtual void SAL_CALL notify(const css::uno::Any& /*aData*/) override { - Rectangle aRect = m_pObject->GetLogicRect(); + tools::Rectangle aRect = m_pObject->GetLogicRect(); m_pViewShell->DoDPFieldPopup(aRect.TopLeft(), aRect.GetSize()); } }; @@ -135,12 +135,12 @@ void ScTabViewShell::ActivateObject( SdrOle2Obj* pObj, long nVerb ) if ( !(nErr & ERRCODE_ERROR_MASK) && xObj.is() ) { - Rectangle aRect = pObj->GetLogicRect(); + tools::Rectangle aRect = pObj->GetLogicRect(); { // #i118485# center on BoundRect for activation, // OLE may be sheared/rotated now - const Rectangle& rBoundRect = pObj->GetCurrentBoundRect(); + const tools::Rectangle& rBoundRect = pObj->GetCurrentBoundRect(); const Point aDelta(rBoundRect.Center() - aRect.Center()); aRect.Move(aDelta.X(), aDelta.Y()); } @@ -353,7 +353,7 @@ void ScTabViewShell::ExecDrawIns(SfxRequest& rReq) { const SfxRectangleItem& rRect = static_cast<const SfxRectangleItem&>(rReq.GetArgs()->Get(SID_OBJECTRESIZE)); - Rectangle aRect( pWin->PixelToLogic( rRect.GetValue() ) ); + tools::Rectangle aRect( pWin->PixelToLogic( rRect.GetValue() ) ); if ( pView->AreObjectsMarked() ) { @@ -411,12 +411,12 @@ void ScTabViewShell::ExecDrawIns(SfxRequest& rReq) if(pNewDBField) { - Rectangle aVisArea = pWin->PixelToLogic(Rectangle(Point(0,0), pWin->GetOutputSizePixel())); + tools::Rectangle aVisArea = pWin->PixelToLogic(tools::Rectangle(Point(0,0), pWin->GetOutputSizePixel())); Point aObjPos(aVisArea.Center()); Size aObjSize(pNewDBField->GetLogicRect().GetSize()); aObjPos.X() -= aObjSize.Width() / 2; aObjPos.Y() -= aObjSize.Height() / 2; - Rectangle aNewObjectRectangle(aObjPos, aObjSize); + tools::Rectangle aNewObjectRectangle(aObjPos, aObjSize); pNewDBField->SetLogicRect(aNewObjectRectangle); diff --git a/sc/source/ui/view/tabvwshg.cxx b/sc/source/ui/view/tabvwshg.cxx index 5b2a4dcbcb18..7b739b8be0bd 100644 --- a/sc/source/ui/view/tabvwshg.cxx +++ b/sc/source/ui/view/tabvwshg.cxx @@ -102,7 +102,7 @@ void ScTabViewShell::InsertURLButton( const OUString& rName, const OUString& rUR if ( pDoc->IsNegativePage(nTab) ) aPos.X() -= aSize.Width(); - pObj->SetLogicRect(Rectangle(aPos, aSize)); + pObj->SetLogicRect(tools::Rectangle(aPos, aSize)); // for the old VC-Button the position/size had to be set explicitly once more // that seems not to be needed with UnoControls diff --git a/sc/source/ui/view/tabvwshh.cxx b/sc/source/ui/view/tabvwshh.cxx index 6aa43f3c2ebd..98e125292cc7 100644 --- a/sc/source/ui/view/tabvwshh.cxx +++ b/sc/source/ui/view/tabvwshh.cxx @@ -113,7 +113,7 @@ void ScTabViewShell::ExecuteObject( SfxRequest& rReq ) if (rMarkList.GetMarkCount() == 1) { SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj(); - Rectangle aRect = pObj->GetLogicRect(); + tools::Rectangle aRect = pObj->GetLogicRect(); if ( nSlotId == SID_OBJECT_LEFT ) pDrView->MoveMarkedObj( Size( nNewVal - aRect.Left(), 0 ) ); @@ -194,7 +194,7 @@ void ScTabViewShell::GetObjectState( SfxItemSet& rSet ) if (rMarkList.GetMarkCount() == 1) { SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj(); - Rectangle aRect = pObj->GetLogicRect(); + tools::Rectangle aRect = pObj->GetLogicRect(); long nVal; if ( nWhich == SID_OBJECT_LEFT ) diff --git a/sc/source/ui/view/viewdata.cxx b/sc/source/ui/view/viewdata.cxx index 188d0631f289..0da60a9de675 100644 --- a/sc/source/ui/view/viewdata.cxx +++ b/sc/source/ui/view/viewdata.cxx @@ -959,7 +959,7 @@ void ScViewData::ResetOldCursor() pThisTab->mbOldCursorValid = false; } -Rectangle ScViewData::GetEditArea( ScSplitPos eWhich, SCCOL nPosX, SCROW nPosY, +tools::Rectangle ScViewData::GetEditArea( ScSplitPos eWhich, SCCOL nPosX, SCROW nPosY, vcl::Window* pWin, const ScPatternAttr* pPattern, bool bForceToTop ) { @@ -1046,7 +1046,7 @@ void ScViewData::SetEditEngine( ScSplitPos eWhich, bool bAsianVertical = pNewEngine->IsVertical(); // set by InputHandler - Rectangle aPixRect = ScEditUtil( pDoc, nNewX,nNewY,nTabNo, GetScrPos(nNewX,nNewY,eWhich), + tools::Rectangle aPixRect = ScEditUtil( pDoc, nNewX,nNewY,nTabNo, GetScrPos(nNewX,nNewY,eWhich), pWin, nPPTX,nPPTY,GetZoomX(),GetZoomY() ). GetEditArea( pPattern, true ); @@ -1055,7 +1055,7 @@ void ScViewData::SetEditEngine( ScSplitPos eWhich, if ( GetEditAdjust() == SvxAdjust::Right || bAsianVertical ) aPixRect.Right() += 1; - Rectangle aOutputArea = pWin->PixelToLogic( aPixRect, GetLogicMode() ); + tools::Rectangle aOutputArea = pWin->PixelToLogic( aPixRect, GetLogicMode() ); pEditView[eWhich]->SetOutputArea( aOutputArea ); if ( bActive && eWhich == GetActivePart() ) @@ -1118,7 +1118,7 @@ void ScViewData::SetEditEngine( ScSplitPos eWhich, // (and same line breaks) as for output. Fraction aFract(1,1); - Rectangle aUtilRect = ScEditUtil( pDoc,nNewX,nNewY,nTabNo, Point(0,0), pWin, + tools::Rectangle aUtilRect = ScEditUtil( pDoc,nNewX,nNewY,nTabNo, Point(0,0), pWin, HMM_PER_TWIPS, HMM_PER_TWIPS, aFract, aFract ).GetEditArea( pPattern, false ); aPaperSize.Width() = aUtilRect.GetWidth(); } @@ -1126,7 +1126,7 @@ void ScViewData::SetEditEngine( ScSplitPos eWhich, // sichtbarer Ausschnitt Size aPaper = pNewEngine->GetPaperSize(); - Rectangle aVis = pEditView[eWhich]->GetVisArea(); + tools::Rectangle aVis = pEditView[eWhich]->GetVisArea(); long nDiff = aVis.Right() - aVis.Left(); if ( GetEditAdjust() == SvxAdjust::Right ) { @@ -1233,7 +1233,7 @@ void ScViewData::EditGrowX() SCCOL nRight = nLeft + VisibleCellsX(eHWhich); Size aSize = pEngine->GetPaperSize(); - Rectangle aArea = pCurView->GetOutputArea(); + tools::Rectangle aArea = pCurView->GetOutputArea(); long nOldRight = aArea.Right(); // Margin is already included in the original width. @@ -1341,7 +1341,7 @@ void ScViewData::EditGrowX() { if ( bMoveArea || bGrowCentered || bGrowBackwards || bLayoutRTL ) { - Rectangle aVis = pCurView->GetVisArea(); + tools::Rectangle aVis = pCurView->GetVisArea(); if ( bGrowCentered ) { @@ -1427,7 +1427,7 @@ void ScViewData::EditGrowY( bool bInitial ) SCROW nBottom = GetPosY(eVWhich) + VisibleCellsY(eVWhich); Size aSize = pEngine->GetPaperSize(); - Rectangle aArea = pCurView->GetOutputArea(); + tools::Rectangle aArea = pCurView->GetOutputArea(); long nOldBottom = aArea.Bottom(); long nTextHeight = pEngine->GetTextHeight(); @@ -1496,7 +1496,7 @@ void ScViewData::ResetEditView() lcl_LOKRemoveWindow(GetViewShell(), (ScSplitPos)(i)); pEngine = pEditView[i]->GetEditEngine(); pEngine->RemoveView(pEditView[i]); - pEditView[i]->SetOutputArea( Rectangle() ); + pEditView[i]->SetOutputArea( tools::Rectangle() ); } bEditActive[i] = false; } @@ -2164,7 +2164,7 @@ void ScViewData::SetScreenPos( const Point& rVisAreaStart ) SetCurY( nY1 ); } -void ScViewData::SetScreen( const Rectangle& rVisArea ) +void ScViewData::SetScreen( const tools::Rectangle& rVisArea ) { SetScreenPos( rVisArea.TopLeft() ); diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx index e0d381df6419..a84cc588401d 100644 --- a/sc/source/ui/view/viewfun2.cxx +++ b/sc/source/ui/view/viewfun2.cxx @@ -1894,7 +1894,7 @@ bool ScViewFunc::SearchAndReplace( const SvxSearchItem* pSearchItem, if (pGridWindow) { - std::vector<Rectangle> aLogicRects; + std::vector<tools::Rectangle> aLogicRects; pGridWindow->GetCellSelection(aLogicRects); boost::property_tree::ptree aTree; @@ -1902,7 +1902,7 @@ bool ScViewFunc::SearchAndReplace( const SvxSearchItem* pSearchItem, aTree.put("highlightAll", nCommand == SvxSearchCmd::FIND_ALL); boost::property_tree::ptree aSelections; - for (const Rectangle& rLogicRect : aLogicRects) + for (const tools::Rectangle& rLogicRect : aLogicRects) { boost::property_tree::ptree aSelection; aSelection.put("part", OString::number(nTab).getStr()); diff --git a/sc/source/ui/view/viewfun4.cxx b/sc/source/ui/view/viewfun4.cxx index 02de4e9966a7..1f8bdf5fd9fc 100644 --- a/sc/source/ui/view/viewfun4.cxx +++ b/sc/source/ui/view/viewfun4.cxx @@ -97,7 +97,7 @@ void ScViewFunc::PasteRTF( SCCOL nStartCol, SCROW nStartRow, pEngine->SetPaperSize(Size(100000,100000)); ScopedVclPtrInstance< vcl::Window > aWin( pActWin ); EditView aEditView( pEngine.get(), aWin.get() ); - aEditView.SetOutputArea(Rectangle(0,0,100000,100000)); + aEditView.SetOutputArea(tools::Rectangle(0,0,100000,100000)); // same method now for clipboard or drag&drop // mba: clipboard always must contain absolute URLs (could be from alien source) @@ -519,7 +519,7 @@ void ScViewFunc::DoSheetConversion( const ScConversionParam& rConvParam ) // simulate dummy cell: pEditView = rViewData.GetEditView( rViewData.GetActivePart() ); rViewData.SetSpellingView( pEditView ); - Rectangle aRect( Point( 0, 0 ), Point( 0, 0 ) ); + tools::Rectangle aRect( Point( 0, 0 ), Point( 0, 0 ) ); pEditView->SetOutputArea( aRect ); pEngine->SetControlWord( EEControlBits::USECHARATTRIBS ); pEngine->EnableUndo( false ); @@ -639,7 +639,7 @@ bool ScViewFunc::PasteFile( const Point& rPos, const OUString& rFile, bool bLink if (bLink) // for bLink everything, which is not graphics, as URL { - Rectangle aRect( rPos, Size(0,0) ); + tools::Rectangle aRect( rPos, Size(0,0) ); ScRange aRange = GetViewData().GetDocument()-> GetRange( GetViewData().GetTabNo(), aRect ); SCCOL nPosX = aRange.aStart.Col(); diff --git a/sc/source/ui/view/viewfun5.cxx b/sc/source/ui/view/viewfun5.cxx index 6034d8990fc8..37dd4b2ac28b 100644 --- a/sc/source/ui/view/viewfun5.cxx +++ b/sc/source/ui/view/viewfun5.cxx @@ -424,7 +424,7 @@ bool ScViewFunc::PasteDataFormat( SotClipboardFormatId nFormatId, if (pObj) { Point aInsPos = aPos; - Rectangle aRect(pObj->GetLogicRect()); + tools::Rectangle aRect(pObj->GetLogicRect()); aInsPos.X() -= aRect.GetSize().Width() / 2; aInsPos.Y() -= aRect.GetSize().Height() / 2; if ( aInsPos.X() < 0 ) aInsPos.X() = 0; diff --git a/sc/source/ui/view/viewfun7.cxx b/sc/source/ui/view/viewfun7.cxx index af59f931450a..66049684ddef 100644 --- a/sc/source/ui/view/viewfun7.cxx +++ b/sc/source/ui/view/viewfun7.cxx @@ -347,7 +347,7 @@ bool ScViewFunc::PasteObject( const Point& rPos, const uno::Reference < embed::X Point aInsPos = rPos; if ( GetViewData().GetDocument()->IsNegativePage( GetViewData().GetTabNo() ) ) aInsPos.X() -= aSize.Width(); - Rectangle aRect( aInsPos, aSize ); + tools::Rectangle aRect( aInsPos, aSize ); ScDrawView* pDrView = GetScDrawView(); SdrOle2Obj* pSdrObj = new SdrOle2Obj( aObjRef, aName, aRect ); @@ -428,7 +428,7 @@ bool ScViewFunc::PasteGraphic( const Point& rPos, const Graphic& rGraphic, aPos.X() -= aSize.Width(); GetViewData().GetViewShell()->SetDrawShell( true ); - Rectangle aRect(aPos, aSize); + tools::Rectangle aRect(aPos, aSize); SdrGrafObj* pGrafObj = new SdrGrafObj(rGraphic, aRect); // path was the name of the graphic in history diff --git a/sd/inc/sdpage.hxx b/sd/inc/sdpage.hxx index dd1ed957a895..df89127d80b8 100644 --- a/sd/inc/sdpage.hxx +++ b/sd/inc/sdpage.hxx @@ -169,7 +169,7 @@ public: sd::ShapeList& GetPresentationShapeList() { return maPresentationShapeList; } void EnsureMasterPageDefaultBackground(); - SdrObject* CreatePresObj(PresObjKind eObjKind, bool bVertical, const Rectangle& rRect, bool bInsert=false); + SdrObject* CreatePresObj(PresObjKind eObjKind, bool bVertical, const ::tools::Rectangle& rRect, bool bInsert=false); SdrObject* CreateDefaultPresObj(PresObjKind eObjKind); void DestroyDefaultPresObj(PresObjKind eObjKind); SdrObject* GetPresObj(PresObjKind eObjKind, int nIndex = 1, bool bFuzzySearch = false ); @@ -192,7 +192,7 @@ public: void SetAutoLayout(AutoLayout eLayout, bool bInit=false, bool bCreate=false); AutoLayout GetAutoLayout() const { return meAutoLayout; } void CreateTitleAndLayout(bool bInit=false, bool bCreate=false); - SdrObject* InsertAutoLayoutShape(SdrObject* pObj, PresObjKind eObjKind, bool bVertical, const Rectangle& rRect, bool bInit); + SdrObject* InsertAutoLayoutShape(SdrObject* pObj, PresObjKind eObjKind, bool bVertical, const ::tools::Rectangle& rRect, bool bInit); virtual void NbcInsertObject(SdrObject* pObj, size_t nPos=SAL_MAX_SIZE) override; virtual SdrObject* NbcRemoveObject(size_t nObjNum) override; @@ -253,7 +253,7 @@ public: void setTransitionDuration( double fTranstionDuration ); virtual void Changed(const SdrObject& rObj, SdrUserCallType eType, - const Rectangle& rOldBoundRect) override; + const ::tools::Rectangle& rOldBoundRect) override; void SetLayoutName(const OUString& aName); virtual OUString GetLayoutName() const override { return maLayoutName; } @@ -266,7 +266,7 @@ public: void ConnectLink(); void DisconnectLink(); - void ScaleObjects(const Size& rNewPageSize, const Rectangle& rNewBorderRect, + void ScaleObjects(const Size& rNewPageSize, const ::tools::Rectangle& rNewBorderRect, bool bScaleAllObj); const OUString& GetName() const; @@ -353,10 +353,10 @@ public: /** removes all empty presentation objects from this slide */ void RemoveEmptyPresentationObjects(); - Rectangle GetTitleRect() const; - Rectangle GetLayoutRect() const; + ::tools::Rectangle GetTitleRect() const; + ::tools::Rectangle GetLayoutRect() const; - static void CalculateHandoutAreas( SdDrawDocument& rModel, AutoLayout eLayout, bool bHorizontal, std::vector< Rectangle >& rAreas ); + static void CalculateHandoutAreas( SdDrawDocument& rModel, AutoLayout eLayout, bool bHorizontal, std::vector< ::tools::Rectangle >& rAreas ); /** Set the "precious" flag to the given value. */ diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx index 44de6aa11393..c4dfd192dd09 100644 --- a/sd/qa/unit/import-tests.cxx +++ b/sd/qa/unit/import-tests.cxx @@ -1527,7 +1527,7 @@ void SdImportTest::testTdf103473() const SdrPage *pPage = GetPage(1, xDocShRef); SdrTextObj *const pObj = dynamic_cast<SdrTextObj *const>(pPage->GetObj(0)); CPPUNIT_ASSERT(pObj); - Rectangle aRect = pObj->GetGeoRect(); + ::tools::Rectangle aRect = pObj->GetGeoRect(); CPPUNIT_ASSERT_EQUAL(3629L, aRect.Left()); CPPUNIT_ASSERT_EQUAL(4431L, aRect.Top()); CPPUNIT_ASSERT_EQUAL(8353L, aRect.Right()); diff --git a/sd/qa/unit/tiledrendering/tiledrendering.cxx b/sd/qa/unit/tiledrendering/tiledrendering.cxx index e1a709f3ecc7..0f0110a2e033 100644 --- a/sd/qa/unit/tiledrendering/tiledrendering.cxx +++ b/sd/qa/unit/tiledrendering/tiledrendering.cxx @@ -143,8 +143,8 @@ private: xmlDocPtr parseXmlDump(); uno::Reference<lang::XComponent> mxComponent; - Rectangle m_aInvalidation; - std::vector<Rectangle> m_aSelection; + ::tools::Rectangle m_aInvalidation; + std::vector<::tools::Rectangle> m_aSelection; bool m_bFound; sal_Int32 m_nPart; std::vector<OString> m_aSearchResultSelection; @@ -217,7 +217,7 @@ static std::vector<OUString> lcl_convertSeparated(const OUString& rString, sal_U return aRet; } -static void lcl_convertRectangle(const OUString& rString, Rectangle& rRectangle) +static void lcl_convertRectangle(const OUString& rString, ::tools::Rectangle& rRectangle) { uno::Sequence<OUString> aSeq = comphelper::string::convertCommaSeparated(rString); CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(4), aSeq.getLength()); @@ -244,7 +244,7 @@ void SdTiledRenderingTest::callbackImpl(int nType, const char* pPayload) m_aSelection.clear(); for (const OUString& rString : lcl_convertSeparated(aPayload, static_cast<sal_Unicode>(';'))) { - Rectangle aRectangle; + ::tools::Rectangle aRectangle; lcl_convertRectangle(rString, aRectangle); m_aSelection.push_back(aRectangle); } @@ -324,7 +324,7 @@ void SdTiledRenderingTest::testRegisterCallback() // Check that the top left 256x256px tile would be invalidated. CPPUNIT_ASSERT(!m_aInvalidation.IsEmpty()); - Rectangle aTopLeft(0, 0, 256*15, 256*15); // 1 px = 15 twips, assuming 96 DPI. + ::tools::Rectangle aTopLeft(0, 0, 256*15, 256*15); // 1 px = 15 twips, assuming 96 DPI. CPPUNIT_ASSERT(m_aInvalidation.IsOver(aTopLeft)); } @@ -452,7 +452,7 @@ void SdTiledRenderingTest::testSetGraphicSelection() // Take the bottom center one. SdrHdl* pHdl = pObject->GetHdl(6); CPPUNIT_ASSERT_EQUAL((int)SdrHdlKind::Lower, (int)pHdl->GetKind()); - Rectangle aShapeBefore = pObject->GetSnapRect(); + ::tools::Rectangle aShapeBefore = pObject->GetSnapRect(); // Resize. pXImpressDocument->setGraphicSelection(LOK_SETGRAPHICSELECTION_START, convertMm100ToTwip(pHdl->GetPos().getX()), convertMm100ToTwip(pHdl->GetPos().getY())); pXImpressDocument->setGraphicSelection(LOK_SETGRAPHICSELECTION_END, convertMm100ToTwip(pHdl->GetPos().getX()), convertMm100ToTwip(pHdl->GetPos().getY() + 1000)); @@ -468,7 +468,7 @@ void SdTiledRenderingTest::testSetGraphicSelection() // The second item was -1 here, view shell ID wasn't known. CPPUNIT_ASSERT_EQUAL(ViewShellId(nView1), pListAction->aUndoActions.GetUndoAction(i)->GetViewShellId()); - Rectangle aShapeAfter = pObject->GetSnapRect(); + ::tools::Rectangle aShapeAfter = pObject->GetSnapRect(); // Check that a resize happened, but aspect ratio is not kept. CPPUNIT_ASSERT_EQUAL(aShapeBefore.getWidth(), aShapeAfter.getWidth()); CPPUNIT_ASSERT(aShapeBefore.getHeight() < aShapeAfter.getHeight()); @@ -1312,7 +1312,7 @@ void SdTiledRenderingTest::testTdf102223() SdrView* pView = pViewShell->GetView(); // select contents of cell - Rectangle aRect = pTableObject->GetCurrentBoundRect(); + ::tools::Rectangle aRect = pTableObject->GetCurrentBoundRect(); pXImpressDocument->postMouseEvent(LOK_MOUSEEVENT_MOUSEBUTTONDOWN, convertMm100ToTwip(aRect.getX() + 2), convertMm100ToTwip(aRect.getY() + 2), 1, MOUSE_LEFT, 0); @@ -1405,7 +1405,7 @@ void SdTiledRenderingTest::testTdf103083() SdrView* pView = pViewShell->GetView(); // select contents of bullet item - Rectangle aRect = pTextObject->GetCurrentBoundRect(); + ::tools::Rectangle aRect = pTextObject->GetCurrentBoundRect(); pXImpressDocument->postMouseEvent(LOK_MOUSEEVENT_MOUSEBUTTONDOWN, convertMm100ToTwip(aRect.getX() + 2), convertMm100ToTwip(aRect.getY() + 2), 1, MOUSE_LEFT, 0); @@ -1490,7 +1490,7 @@ void SdTiledRenderingTest::testTdf104405() pView->SdrBeginTextEdit(pTableObject); EditView& rEditView2 = pView->GetTextEditOutlinerView()->GetEditView(); rEditView2.SetSelection(ESelection(0, 0, 0, 3)); // start para, start char, end para, end char. - Rectangle aRect = pTableObject->GetCurrentBoundRect(); + ::tools::Rectangle aRect = pTableObject->GetCurrentBoundRect(); pXImpressDocument->postMouseEvent(LOK_MOUSEEVENT_MOUSEBUTTONDOWN, convertMm100ToTwip(aRect.getX()), convertMm100ToTwip(aRect.getY()), 1, MOUSE_LEFT, 0); diff --git a/sd/source/core/CustomAnimationEffect.cxx b/sd/source/core/CustomAnimationEffect.cxx index e23930d05d4c..aada2ef1acd8 100644 --- a/sd/source/core/CustomAnimationEffect.cxx +++ b/sd/source/core/CustomAnimationEffect.cxx @@ -1550,7 +1550,7 @@ void CustomAnimationEffect::updateSdrPathObjFromPath( SdrPathObj& rPathObj ) aPolyPoly.transform(basegfx::tools::createScaleB2DHomMatrix((double)aPageSize.Width(), (double)aPageSize.Height())); } - const Rectangle aBoundRect( pObj->GetCurrentBoundRect() ); + const ::tools::Rectangle aBoundRect( pObj->GetCurrentBoundRect() ); const Point aCenter( aBoundRect.Center() ); aPolyPoly.transform(basegfx::tools::createTranslateB2DHomMatrix(aCenter.X(), aCenter.Y())); } @@ -1566,7 +1566,7 @@ void CustomAnimationEffect::updatePathFromSdrPathObj( const SdrPathObj& rPathObj SdrObject* pObj = GetSdrObjectFromXShape( getTargetShape() ); if( pObj ) { - Rectangle aBoundRect(0,0,0,0); + ::tools::Rectangle aBoundRect(0,0,0,0); const drawinglayer::primitive2d::Primitive2DContainer xPrimitives(pObj->GetViewContact().getViewIndependentPrimitive2DContainer()); const drawinglayer::geometry::ViewInformation2D aViewInformation2D; @@ -1574,7 +1574,7 @@ void CustomAnimationEffect::updatePathFromSdrPathObj( const SdrPathObj& rPathObj if(!aRange.isEmpty()) { - aBoundRect = Rectangle( + aBoundRect = ::tools::Rectangle( (sal_Int32)floor(aRange.getMinX()), (sal_Int32)floor(aRange.getMinY()), (sal_Int32)ceil(aRange.getMaxX()), (sal_Int32)ceil(aRange.getMaxY())); } diff --git a/sd/source/core/drawdoc2.cxx b/sd/source/core/drawdoc2.cxx index ab81cc4452ee..88aa8dfccb59 100644 --- a/sd/source/core/drawdoc2.cxx +++ b/sd/source/core/drawdoc2.cxx @@ -1047,7 +1047,7 @@ IMapObject* SdDrawDocument::GetHitIMapObject( SdrObject* pObj, Size aGraphSize; Point aRelPoint( rWinPoint ); ImageMap& rImageMap = (ImageMap&) pIMapInfo->GetImageMap(); - const Rectangle& rRect = pObj->GetLogicRect(); + const ::tools::Rectangle& rRect = pObj->GetLogicRect(); bool bObjSupported = false; // execute HitTest diff --git a/sd/source/core/drawdoc3.cxx b/sd/source/core/drawdoc3.cxx index c45d02ec052e..2a29a06b17de 100644 --- a/sd/source/core/drawdoc3.cxx +++ b/sd/source/core/drawdoc3.cxx @@ -858,7 +858,7 @@ bool SdDrawDocument::InsertBookmarkAsPage( if (bScaleObjects) { - Rectangle aBorderRect(nLeft, nUpper, nRight, nLower); + ::tools::Rectangle aBorderRect(nLeft, nUpper, nRight, nLower); pRefPage->ScaleObjects(aSize, aBorderRect, true); } pRefPage->SetSize(aSize); @@ -877,7 +877,7 @@ bool SdDrawDocument::InsertBookmarkAsPage( if (bScaleObjects) { - Rectangle aBorderRect(nNLeft, nNUpper, nNRight, nNLower); + ::tools::Rectangle aBorderRect(nNLeft, nNUpper, nNRight, nNLower); pRefPage->ScaleObjects(aNSize, aBorderRect, true); } @@ -900,7 +900,7 @@ bool SdDrawDocument::InsertBookmarkAsPage( { if (bScaleObjects) { - Rectangle aBorderRect(nLeft, nUpper, nRight, nLower); + ::tools::Rectangle aBorderRect(nLeft, nUpper, nRight, nLower); pRefPage->ScaleObjects(aSize, aBorderRect, true); } pRefPage->SetSize(aSize); @@ -911,7 +911,7 @@ bool SdDrawDocument::InsertBookmarkAsPage( { if (bScaleObjects) { - Rectangle aBorderRect(nNLeft, nNUpper, nNRight, nNLower); + ::tools::Rectangle aBorderRect(nNLeft, nNUpper, nNRight, nNLower); pRefPage->ScaleObjects(aNSize, aBorderRect, true); } pRefPage->SetSize(aNSize); @@ -1088,7 +1088,7 @@ bool SdDrawDocument::InsertBookmarkAsObject( } else { - aObjPos = Rectangle(Point(), pPage->GetSize()).Center(); + aObjPos = ::tools::Rectangle(Point(), pPage->GetSize()).Center(); } size_t nCountBefore = 0; @@ -1761,7 +1761,7 @@ void SdDrawDocument::SetMasterPage(sal_uInt16 nSdPageNum, if (pSourceDoc != this) { Size aSize(rOldMaster.GetSize()); - Rectangle aBorderRect(rOldMaster.GetLftBorder(), + ::tools::Rectangle aBorderRect(rOldMaster.GetLftBorder(), rOldMaster.GetUppBorder(), rOldMaster.GetRgtBorder(), rOldMaster.GetLwrBorder()); @@ -1775,7 +1775,7 @@ void SdDrawDocument::SetMasterPage(sal_uInt16 nSdPageNum, pMaster->SetAutoLayout(pMaster->GetAutoLayout()); aSize = rOldNotesMaster.GetSize(); - Rectangle aNotesBorderRect(rOldNotesMaster.GetLftBorder(), + ::tools::Rectangle aNotesBorderRect(rOldNotesMaster.GetLftBorder(), rOldNotesMaster.GetUppBorder(), rOldNotesMaster.GetRgtBorder(), rOldNotesMaster.GetLwrBorder()); diff --git a/sd/source/core/sdpage.cxx b/sd/source/core/sdpage.cxx index 421e216cfe8c..afb247e441b2 100644 --- a/sd/source/core/sdpage.cxx +++ b/sd/source/core/sdpage.cxx @@ -276,7 +276,7 @@ void SdPage::EnsureMasterPageDefaultBackground() /** creates a presentation object with the given PresObjKind on this page. A user call will be set */ -SdrObject* SdPage::CreatePresObj(PresObjKind eObjKind, bool bVertical, const Rectangle& rRect, bool /* bInsert */ ) +SdrObject* SdPage::CreatePresObj(PresObjKind eObjKind, bool bVertical, const ::tools::Rectangle& rRect, bool /* bInsert */ ) { ::svl::IUndoManager* pUndoManager = pModel ? static_cast<SdDrawDocument*>(pModel)->GetUndoManager() : nullptr; const bool bUndo = pUndoManager && pUndoManager->IsInListAction() && IsInserted(); @@ -340,7 +340,7 @@ SdrObject* SdPage::CreatePresObj(PresObjKind eObjKind, bool bVertical, const Rec Size aSize = aOutDev.PixelToLogic(aSizePix); Point aPnt (0, 0); - Rectangle aRect (aPnt, aSize); + ::tools::Rectangle aRect (aPnt, aSize); pSdrObj = new SdrGrafObj(aGraphic, aRect); aOutDev.Pop(); } @@ -719,7 +719,7 @@ SdStyleSheet* SdPage::getPresentationStyle( sal_uInt32 nHelpId ) const |* \************************************************************************/ -void SdPage::Changed(const SdrObject& rObj, SdrUserCallType eType, const Rectangle& ) +void SdPage::Changed(const SdrObject& rObj, SdrUserCallType eType, const ::tools::Rectangle& ) { if (!maLockAutoLayoutArrangement.isLocked()) { @@ -832,11 +832,11 @@ void SdPage::CreateTitleAndLayout(bool bInit, bool bCreate ) } } - std::vector< Rectangle > aAreas; + std::vector< ::tools::Rectangle > aAreas; CalculateHandoutAreas( *static_cast< SdDrawDocument* >(GetModel() ), pMasterPage->GetAutoLayout(), false, aAreas ); const bool bSkip = pMasterPage->GetAutoLayout() == AUTOLAYOUT_HANDOUT3; - std::vector< Rectangle >::iterator iter( aAreas.begin() ); + std::vector< ::tools::Rectangle >::iterator iter( aAreas.begin() ); while( iter != aAreas.end() ) { @@ -971,17 +971,17 @@ SdrObject* SdPage::CreateDefaultPresObj(PresObjKind eObjKind) if( eObjKind == PRESOBJ_TITLE ) { - Rectangle aTitleRect( GetTitleRect() ); + ::tools::Rectangle aTitleRect( GetTitleRect() ); return CreatePresObj(PRESOBJ_TITLE, false, aTitleRect, true/*bInsert*/); } else if( eObjKind == PRESOBJ_OUTLINE ) { - Rectangle aLayoutRect( GetLayoutRect() ); + ::tools::Rectangle aLayoutRect( GetLayoutRect() ); return CreatePresObj( PRESOBJ_OUTLINE, false, aLayoutRect, true/*bInsert*/); } else if( eObjKind == PRESOBJ_NOTES ) { - Rectangle aLayoutRect( GetLayoutRect() ); + ::tools::Rectangle aLayoutRect( GetLayoutRect() ); return CreatePresObj( PRESOBJ_NOTES, false, aLayoutRect, true/*bInsert*/); } else if( (eObjKind == PRESOBJ_FOOTER) || (eObjKind == PRESOBJ_DATETIME) || (eObjKind == PRESOBJ_SLIDENUMBER) || (eObjKind == PRESOBJ_HEADER ) ) @@ -1014,7 +1014,7 @@ SdrObject* SdPage::CreateDefaultPresObj(PresObjKind eObjKind) } else { - Rectangle aRect( aPos, aSize ); + ::tools::Rectangle aRect( aPos, aSize ); return CreatePresObj( eObjKind, false, aRect, true/*bInsert*/ ); } } @@ -1041,7 +1041,7 @@ SdrObject* SdPage::CreateDefaultPresObj(PresObjKind eObjKind) else aPos.Y() = aPosition.Y() + long( aPageSize.Height() - NOTES_HEADER_FOOTER_HEIGHT ); - Rectangle aRect( aPos, aSize ); + ::tools::Rectangle aRect( aPos, aSize ); return CreatePresObj( eObjKind, false, aRect, true/*bInsert*/ ); } } @@ -1077,9 +1077,9 @@ void SdPage::DestroyDefaultPresObj(PresObjKind eObjKind) |* \************************************************************************/ -Rectangle SdPage::GetTitleRect() const +::tools::Rectangle SdPage::GetTitleRect() const { - Rectangle aTitleRect; + ::tools::Rectangle aTitleRect; if (mePageKind != PageKind::Handout) { @@ -1163,9 +1163,9 @@ Rectangle SdPage::GetTitleRect() const |* \************************************************************************/ -Rectangle SdPage::GetLayoutRect() const +::tools::Rectangle SdPage::GetLayoutRect() const { - Rectangle aLayoutRect; + ::tools::Rectangle aLayoutRect; if (mePageKind != PageKind::Handout) { @@ -1338,10 +1338,10 @@ rtl::OUString enumtoString(AutoLayout aut) return retstr; } -static void CalcAutoLayoutRectangles( SdPage& rPage,Rectangle* rRectangle ,const rtl::OUString& sLayoutType ) +static void CalcAutoLayoutRectangles( SdPage& rPage,::tools::Rectangle* rRectangle ,const rtl::OUString& sLayoutType ) { - Rectangle aTitleRect; - Rectangle aLayoutRect; + ::tools::Rectangle aTitleRect; + ::tools::Rectangle aLayoutRect; if( rPage.GetPageKind() != PageKind::Handout ) { @@ -1424,7 +1424,7 @@ static void CalcAutoLayoutRectangles( SdPage& rPage,Rectangle* rRectangle ,const aSize.Width() = basegfx::fround(aSize.Width() * propvalue[1]); Point aPos( basegfx::fround(aTitlePos.X() +(aSize.Width() * propvalue[2])), basegfx::fround(aTitlePos.Y() + (aSize.Height() * propvalue[3])) ); - rRectangle[count] = Rectangle(aPos, aSize); + rRectangle[count] = ::tools::Rectangle(aPos, aSize); count = count+1; } else @@ -1433,7 +1433,7 @@ static void CalcAutoLayoutRectangles( SdPage& rPage,Rectangle* rRectangle ,const basegfx::fround(aLayoutSize.Height() * propvalue[0]) ); Point aPos( basegfx::fround(aLayoutPos.X() +(aSize.Width() * propvalue[2])), basegfx::fround(aLayoutPos.Y() + (aSize.Height() * propvalue[3])) ); - rRectangle[count] = Rectangle (aPos, aSize); + rRectangle[count] = ::tools::Rectangle (aPos, aSize); count = count+1; } } @@ -1623,7 +1623,7 @@ void SdPage::SetAutoLayout(AutoLayout eLayout, bool bInit, bool bCreate ) return; } - Rectangle aRectangle[MAX_PRESOBJS]; + ::tools::Rectangle aRectangle[MAX_PRESOBJS]; const LayoutDescriptor& aDescriptor = GetLayoutDescriptor( meAutoLayout ); rtl::OUString sLayoutName( enumtoString(meAutoLayout) ); CalcAutoLayoutRectangles( *this, aRectangle, sLayoutName); @@ -1840,7 +1840,7 @@ void SdPage::SetBackgroundFullSize( bool bIn ) |* \************************************************************************/ -void SdPage::ScaleObjects(const Size& rNewPageSize, const Rectangle& rNewBorderRect, bool bScaleAllObj) +void SdPage::ScaleObjects(const Size& rNewPageSize, const ::tools::Rectangle& rNewBorderRect, bool bScaleAllObj) { sd::ScopeLockGuard aGuard( maLockAutoLayoutArrangement ); @@ -1882,7 +1882,7 @@ void SdPage::ScaleObjects(const Size& rNewPageSize, const Rectangle& rNewBorderR Point aBackgroundPos(nLeft, nUpper); Size aBackgroundSize(aNewPageSize); - Rectangle aBorderRect (aBackgroundPos, aBackgroundSize); + ::tools::Rectangle aBorderRect (aBackgroundPos, aBackgroundSize); if (mbScaleObjects) { @@ -2103,7 +2103,7 @@ void SdPage::ScaleObjects(const Size& rNewPageSize, const Rectangle& rNewBorderR } } -SdrObject* convertPresentationObjectImpl(SdPage& rPage, SdrObject* pSourceObj, PresObjKind& eObjKind, bool bVertical, const Rectangle& rRect) +SdrObject* convertPresentationObjectImpl(SdPage& rPage, SdrObject* pSourceObj, PresObjKind& eObjKind, bool bVertical, const ::tools::Rectangle& rRect) { SdDrawDocument* pModel = static_cast< SdDrawDocument* >( rPage.GetModel() ); DBG_ASSERT( pModel, "sd::convertPresentationObjectImpl(), no model on page!" ); @@ -2246,7 +2246,7 @@ SdrObject* convertPresentationObjectImpl(SdPage& rPage, SdrObject* pSourceObj, P @returns A presentation shape that was either found or created with the given parameters */ -SdrObject* SdPage::InsertAutoLayoutShape(SdrObject* pObj, PresObjKind eObjKind, bool bVertical, const Rectangle& rRect, bool bInit) +SdrObject* SdPage::InsertAutoLayoutShape(SdrObject* pObj, PresObjKind eObjKind, bool bVertical, const ::tools::Rectangle& rRect, bool bInit) { ::svl::IUndoManager* pUndoManager = static_cast<SdDrawDocument*>(pModel)->GetUndoManager(); const bool bUndo = pUndoManager && pUndoManager->IsInListAction() && IsInserted(); @@ -2939,7 +2939,7 @@ bool SdPage::RestoreDefaultText( SdrObject* pObj ) && pTextObj->GetOutlinerParaObject() && pTextObj->GetOutlinerParaObject()->IsVertical() != (bool)bVertical) { - Rectangle aObjectRect = pTextObj->GetSnapRect(); + ::tools::Rectangle aObjectRect = pTextObj->GetSnapRect(); pTextObj->GetOutlinerParaObject()->SetVertical(bVertical); pTextObj->SetSnapRect(aObjectRect); } @@ -2955,7 +2955,7 @@ bool SdPage::RestoreDefaultText( SdrObject* pObj ) return bRet; } -void SdPage::CalculateHandoutAreas( SdDrawDocument& rModel, AutoLayout eLayout, bool bHorizontal, std::vector< Rectangle >& rAreas ) +void SdPage::CalculateHandoutAreas( SdDrawDocument& rModel, AutoLayout eLayout, bool bHorizontal, std::vector< ::tools::Rectangle >& rAreas ) { SdPage& rHandoutMaster = *rModel.GetMasterSdPage( 0, PageKind::Handout ); @@ -3107,7 +3107,7 @@ void SdPage::CalculateHandoutAreas( SdDrawDocument& rModel, AutoLayout eLayout, aPos.X() = nStartX; for(sal_uInt16 nCol = 0; nCol < nColCnt; nCol++) { - rAreas[*pOffsets++] = Rectangle(aPos, aSize); + rAreas[*pOffsets++] = ::tools::Rectangle(aPos, aSize); aPos.X() += nOffsetX; } diff --git a/sd/source/filter/eppt/eppt.cxx b/sd/source/filter/eppt/eppt.cxx index 616a4c7478f4..14747c1203a6 100644 --- a/sd/source/filter/eppt/eppt.cxx +++ b/sd/source/filter/eppt/eppt.cxx @@ -1172,7 +1172,7 @@ void PPTWriter::ImplWriteBackground( css::uno::Reference< css::beans::XPropertyS mpPptEscherEx->AddShape( ESCHER_ShpInst_Rectangle, 0xc00 ); // Flags: Connector | Background | HasSpt // #i121183# Use real PageSize in 100th mm - Rectangle aRect(Point(0, 0), Size(maPageSize.Width, maPageSize.Height)); + ::tools::Rectangle aRect(Point(0, 0), Size(maPageSize.Width, maPageSize.Height)); EscherPropertyContainer aPropOpt( mpPptEscherEx->GetGraphicProvider(), mpPicStrm, aRect ); aPropOpt.AddOpt( ESCHER_Prop_fillType, ESCHER_FillSolid ); diff --git a/sd/source/filter/eppt/epptbase.hxx b/sd/source/filter/eppt/epptbase.hxx index ad9becab80bc..ffd031d07553 100644 --- a/sd/source/filter/eppt/epptbase.hxx +++ b/sd/source/filter/eppt/epptbase.hxx @@ -328,7 +328,7 @@ protected: css::uno::Reference< css::drawing::XShape > mXShape; css::awt::Size maSize; css::awt::Point maPosition; - Rectangle maRect; + ::tools::Rectangle maRect; OString mType; bool mbPresObj; bool mbEmptyPresObj; @@ -370,7 +370,7 @@ protected: css::awt::Size MapSize( const css::awt::Size& ); css::awt::Point MapPoint( const css::awt::Point& ); - Rectangle MapRectangle( const css::awt::Rectangle& ); + ::tools::Rectangle MapRectangle( const css::awt::Rectangle& ); bool ContainsOtherShapeThanPlaceholders(); diff --git a/sd/source/filter/eppt/epptso.cxx b/sd/source/filter/eppt/epptso.cxx index 068cc542e8d0..50177d7d737c 100644 --- a/sd/source/filter/eppt/epptso.cxx +++ b/sd/source/filter/eppt/epptso.cxx @@ -111,7 +111,7 @@ sal_uInt16 PPTExBulletProvider::GetId( const OString& rUniqueId, Size& rGraphicS if ( !rUniqueId.isEmpty() ) { - Rectangle aRect; + ::tools::Rectangle aRect; std::unique_ptr<GraphicObject> xGraphicObject(new GraphicObject(rUniqueId)); Graphic aMappedGraphic, aGraphic(xGraphicObject->GetGraphic()); Size aPrefSize( aGraphic.GetPrefSize() ); @@ -832,7 +832,7 @@ void PPTWriter::ImplWritePortions( SvStream& rOut, TextObj& rTextObj ) case css::drawing::FillStyle_GRADIENT : { Point aEmptyPoint; - Rectangle aRect( aEmptyPoint, Size( 28000, 21000 ) ); + ::tools::Rectangle aRect( aEmptyPoint, Size( 28000, 21000 ) ); EscherPropertyContainer aPropOpt( mpPptEscherEx->GetGraphicProvider(), mpPicStrm, aRect ); aPropOpt.CreateGradientProperties( mXPropSet ); aPropOpt.GetOpt( ESCHER_Prop_fillColor, nBackgroundColor ); @@ -855,7 +855,7 @@ void PPTWriter::ImplWritePortions( SvStream& rOut, TextObj& rTextObj ) case css::drawing::FillStyle_GRADIENT : { Point aEmptyPoint; - Rectangle aRect( aEmptyPoint, Size( 28000, 21000 ) ); + ::tools::Rectangle aRect( aEmptyPoint, Size( 28000, 21000 ) ); EscherPropertyContainer aPropOpt( mpPptEscherEx->GetGraphicProvider(), mpPicStrm, aRect ); aPropOpt.CreateGradientProperties( mXBackgroundPropSet ); aPropOpt.GetOpt( ESCHER_Prop_fillColor, nBackgroundColor ); @@ -1022,7 +1022,7 @@ void PPTWriter::ImplFlipBoundingBox( EscherPropertyContainer& rPropOpt ) const long nRotatedWidth(maRect.GetHeight()); const long nRotatedHeight(maRect.GetWidth()); const Size aNewSize(nRotatedWidth, nRotatedHeight); - maRect = Rectangle( Point( aTopLeft.X, aTopLeft.Y ), aNewSize ); + maRect = ::tools::Rectangle( Point( aTopLeft.X, aTopLeft.Y ), aNewSize ); } } @@ -1702,7 +1702,7 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a const css::awt::Size aSize100thmm( mXShape->getSize() ); const css::awt::Point aPoint100thmm( mXShape->getPosition() ); - Rectangle aRect100thmm( Point( aPoint100thmm.X, aPoint100thmm.Y ), Size( aSize100thmm.Width, aSize100thmm.Height ) ); + ::tools::Rectangle aRect100thmm( Point( aPoint100thmm.X, aPoint100thmm.Y ), Size( aSize100thmm.Width, aSize100thmm.Height ) ); EscherPropertyContainer aPropOpt( mpPptEscherEx->GetGraphicProvider(), mpPicStrm, aRect100thmm ); if ( bGroup ) @@ -1744,7 +1744,7 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a auto aRect = o3tl::doAccess<css::awt::Rectangle>(mAny); maPosition = MapPoint( css::awt::Point( aRect->X, aRect->Y ) ); maSize = MapSize( css::awt::Size( aRect->Width, aRect->Height ) ); - maRect = Rectangle( Point( maPosition.X, maPosition.Y ), Size( maSize.Width, maSize.Height ) ); + maRect = ::tools::Rectangle( Point( maPosition.X, maPosition.Y ), Size( maSize.Width, maSize.Height ) ); } mType = "drawing.dontknow"; } @@ -1769,10 +1769,10 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a SdrObject* pObj = GetSdrObjectFromXShape( mXShape ); if ( pObj ) { - Rectangle aBound = pObj->GetCurrentBoundRect(); + ::tools::Rectangle aBound = pObj->GetCurrentBoundRect(); maPosition = MapPoint( css::awt::Point( aBound.Left(), aBound.Top() ) ); maSize = MapSize( css::awt::Size ( aBound.GetWidth(), aBound.GetHeight() ) ); - maRect = Rectangle( Point( maPosition.X, maPosition.Y ), Size( maSize.Width, maSize.Height ) ); + maRect = ::tools::Rectangle( Point( maPosition.X, maPosition.Y ), Size( maSize.Width, maSize.Height ) ); mnAngle = 0; } } @@ -1869,7 +1869,7 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a css::awt::Point aPoint( mXShape->getPosition() ); css::awt::Size aSize( mXShape->getSize() ); css::awt::Point aStart, aEnd, aCenter; - Rectangle aRect( Point( aPoint.X, aPoint.Y ), Size( aSize.Width, aSize.Height ) ); + ::tools::Rectangle aRect( Point( aPoint.X, aPoint.Y ), Size( aSize.Width, aSize.Height ) ); aStart.X = (sal_Int32)( ( cos( (double)( nStartAngle * F_PI18000 ) ) * 100.0 ) ); aStart.Y = - (sal_Int32)( ( sin( (double)( nStartAngle * F_PI18000 ) ) * 100.0 ) ); aEnd.X = (sal_Int32)( ( cos( (double)( nEndAngle * F_PI18000 ) ) * 100.0 ) ); @@ -2864,7 +2864,7 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a if ( mType == "drawing.Line" ) { double fDist = hypot( maRect.GetWidth(), maRect.GetHeight() ); - maRect = Rectangle( Point( aTextRefPoint.X, aTextRefPoint.Y ), + maRect = ::tools::Rectangle( Point( aTextRefPoint.X, aTextRefPoint.Y ), Point( (sal_Int32)( aTextRefPoint.X + fDist ), aTextRefPoint.Y - 1 ) ); ImplCreateTextShape( aPropOpt, aSolverContainer, false ); aPropOpt.AddOpt( ESCHER_Prop_FitTextToShape, 0x60006 ); // Size Shape To Fit Text @@ -2968,7 +2968,7 @@ bool PPTWriter::ImplCreateCellBorder( const CellBorder* pCellBorder, sal_Int32 n //get merged cell's width sal_Int32 GetCellRight( sal_Int32 nColumn, - Rectangle& rect, + ::tools::Rectangle& rect, std::vector< std::pair< sal_Int32, sal_Int32 > >& aColumns, uno::Reference< table::XMergeableCell >& xCell ) { @@ -2985,7 +2985,7 @@ sal_Int32 GetCellRight( sal_Int32 nColumn, } //get merged cell's height sal_Int32 GetCellBottom( sal_Int32 nRow, - Rectangle& rect, + ::tools::Rectangle& rect, std::vector< std::pair< sal_Int32, sal_Int32 > >& aRows, uno::Reference< table::XMergeableCell >& xCell ) { diff --git a/sd/source/filter/eppt/escherex.cxx b/sd/source/filter/eppt/escherex.cxx index 580fbb2b2195..a5a950147e1d 100644 --- a/sd/source/filter/eppt/escherex.cxx +++ b/sd/source/filter/eppt/escherex.cxx @@ -203,7 +203,7 @@ void PptEscherEx::CloseContainer() } } -sal_uInt32 PptEscherEx::EnterGroup( Rectangle* pBoundRect, SvMemoryStream* pClientData ) +sal_uInt32 PptEscherEx::EnterGroup( ::tools::Rectangle* pBoundRect, SvMemoryStream* pClientData ) { sal_uInt32 nShapeId = 0; /* SJ: #Issue 26747# @@ -212,7 +212,7 @@ sal_uInt32 PptEscherEx::EnterGroup( Rectangle* pBoundRect, SvMemoryStream* pClie */ if ( mnGroupLevel < 12 ) { - Rectangle aRect; + ::tools::Rectangle aRect; if ( pBoundRect ) aRect = *pBoundRect; diff --git a/sd/source/filter/eppt/escherex.hxx b/sd/source/filter/eppt/escherex.hxx index 60e1a873e21b..d03c987282ea 100644 --- a/sd/source/filter/eppt/escherex.hxx +++ b/sd/source/filter/eppt/escherex.hxx @@ -54,7 +54,7 @@ class PptEscherEx : public EscherEx void OpenContainer( sal_uInt16 n_EscherContainer, int nRecInstance = 0 ) override; void CloseContainer() override; - sal_uInt32 EnterGroup( Rectangle* pBoundRect, SvMemoryStream* pClientData ); + sal_uInt32 EnterGroup( ::tools::Rectangle* pBoundRect, SvMemoryStream* pClientData ); sal_uInt32 DrawingGroupContainerSize(); void WriteDrawingGroupContainer( SvStream& rSt ); diff --git a/sd/source/filter/eppt/pptx-epptbase.cxx b/sd/source/filter/eppt/pptx-epptbase.cxx index 4a14713b9e60..4b98eae7b143 100644 --- a/sd/source/filter/eppt/pptx-epptbase.cxx +++ b/sd/source/filter/eppt/pptx-epptbase.cxx @@ -681,13 +681,13 @@ awt::Point PPTWriterBase::MapPoint( const awt::Point& rPoint ) return awt::Point( aRet.X(), aRet.Y() ); } -Rectangle PPTWriterBase::MapRectangle( const awt::Rectangle& rRect ) +::tools::Rectangle PPTWriterBase::MapRectangle( const awt::Rectangle& rRect ) { css::awt::Point aPoint( rRect.X, rRect.Y ); css::awt::Size aSize( rRect.Width, rRect.Height ); css::awt::Point aP( MapPoint( aPoint ) ); css::awt::Size aS( MapSize( aSize ) ); - return Rectangle( Point( aP.X, aP.Y ), Size( aS.Width, aS.Height ) ); + return ::tools::Rectangle( Point( aP.X, aP.Y ), Size( aS.Width, aS.Height ) ); } bool PPTWriterBase::GetShapeByIndex( sal_uInt32 nIndex, bool bGroup ) @@ -714,7 +714,7 @@ bool PPTWriterBase::GetShapeByIndex( sal_uInt32 nIndex, bool bGroup ) break; maPosition = MapPoint( mXShape->getPosition() ); maSize = MapSize( mXShape->getSize() ); - maRect = Rectangle( Point( maPosition.X, maPosition.Y ), Size( maSize.Width, maSize.Height ) ); + maRect = ::tools::Rectangle( Point( maPosition.X, maPosition.Y ), Size( maSize.Width, maSize.Height ) ); OStringBuffer aTypeBuffer(OUStringToOString( mXShape->getShapeType(), RTL_TEXTENCODING_UTF8)); diff --git a/sd/source/filter/grf/sdgrffilter.cxx b/sd/source/filter/grf/sdgrffilter.cxx index c94e7ddcfd7b..c1941ec2be74 100644 --- a/sd/source/filter/grf/sdgrffilter.cxx +++ b/sd/source/filter/grf/sdgrffilter.cxx @@ -215,7 +215,7 @@ bool SdGRFFilter::Import() aPos.X() = ( ( aPagSize.Width() - aGrfSize.Width() ) >> 1 ) + pPage->GetLftBorder(); aPos.Y() = ( ( aPagSize.Height() - aGrfSize.Height() ) >> 1 ) + pPage->GetUppBorder(); - pPage->InsertObject( new SdrGrafObj( aGraphic, Rectangle( aPos, aGrfSize ) ) ); + pPage->InsertObject( new SdrGrafObj( aGraphic, ::tools::Rectangle( aPos, aGrfSize ) ) ); bRet = true; } return bRet; diff --git a/sd/source/filter/html/htmlattr.cxx b/sd/source/filter/html/htmlattr.cxx index 13e5f497dd31..782e599861c6 100644 --- a/sd/source/filter/html/htmlattr.cxx +++ b/sd/source/filter/html/htmlattr.cxx @@ -33,11 +33,11 @@ SdHtmlAttrPreview::~SdHtmlAttrPreview() { } -void SdHtmlAttrPreview::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) +void SdHtmlAttrPreview::Paint(vcl::RenderContext& rRenderContext, const ::tools::Rectangle& rRect) { DecorationView aDecoView(&rRenderContext); - Rectangle aTextRect; + ::tools::Rectangle aTextRect; aTextRect.SetSize(GetOutputSize()); rRenderContext.SetLineColor(m_aBackColor); diff --git a/sd/source/filter/html/htmlattr.hxx b/sd/source/filter/html/htmlattr.hxx index 9013f9d3b044..a681040d5d29 100644 --- a/sd/source/filter/html/htmlattr.hxx +++ b/sd/source/filter/html/htmlattr.hxx @@ -34,7 +34,7 @@ public: SdHtmlAttrPreview( vcl::Window* pParent, WinBits nStyle ); virtual ~SdHtmlAttrPreview() override; - virtual void Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) override; + virtual void Paint(vcl::RenderContext& rRenderContext, const ::tools::Rectangle& rRect) override; void SetColors( Color& aBack, Color& aText, Color& aLink, Color& aVLink, Color& aALink ); diff --git a/sd/source/filter/html/htmlex.cxx b/sd/source/filter/html/htmlex.cxx index 0356a6c8937e..41c62c616d5d 100644 --- a/sd/source/filter/html/htmlex.cxx +++ b/sd/source/filter/html/htmlex.cxx @@ -1685,7 +1685,7 @@ bool HtmlExport::CreateHtmlForPresPages() SdAnimationInfo* pInfo = SdDrawDocument::GetAnimationInfo(pObject); SdIMapInfo* pIMapInfo = SdDrawDocument::GetIMapInfo(pObject); - Rectangle aRect(pObject->GetCurrentBoundRect()); + ::tools::Rectangle aRect(pObject->GetCurrentBoundRect()); Point aLogPos(aRect.TopLeft()); bool bIsSquare = aRect.GetWidth() == aRect.GetHeight(); @@ -1740,7 +1740,7 @@ bool HtmlExport::CreateHtmlForPresPages() { case IMAP_OBJ_RECTANGLE: { - Rectangle aArea(static_cast<IMapRectangleObject*>(pArea)-> + ::tools::Rectangle aArea(static_cast<IMapRectangleObject*>(pArea)-> GetRectangle(false)); // conversion into pixel coordinates @@ -2822,7 +2822,7 @@ OUString HtmlExport::CreateHTMLPolygonArea( const ::basegfx::B2DPolyPolygon& rPo } // create area for a rectangle; we expect pixel coordinates -OUString HtmlExport::CreateHTMLRectArea( const Rectangle& rRect, +OUString HtmlExport::CreateHTMLRectArea( const ::tools::Rectangle& rRect, const OUString& rHRef ) { OUString aStr( diff --git a/sd/source/filter/html/htmlex.hxx b/sd/source/filter/html/htmlex.hxx index a9c2939adea3..2af311c78573 100644 --- a/sd/source/filter/html/htmlex.hxx +++ b/sd/source/filter/html/htmlex.hxx @@ -185,7 +185,7 @@ class HtmlExport final static OUString CreateHTMLCircleArea( sal_uLong nRadius, sal_uLong nCenterX, sal_uLong nCenterY, const OUString& rHRef ); static OUString CreateHTMLPolygonArea( const ::basegfx::B2DPolyPolygon& rPolyPoly, Size aShift, double fFactor, const OUString& rHRef ); - static OUString CreateHTMLRectArea( const Rectangle& rRect, + static OUString CreateHTMLRectArea( const ::tools::Rectangle& rRect, const OUString& rHRef ); OUString CreatePageURL( sal_uInt16 nPgNum ); diff --git a/sd/source/filter/ppt/pptin.cxx b/sd/source/filter/ppt/pptin.cxx index 25ea2c450920..f41a220d6b19 100644 --- a/sd/source/filter/ppt/pptin.cxx +++ b/sd/source/filter/ppt/pptin.cxx @@ -555,7 +555,7 @@ bool ImplSdPPTImport::Import() aVisAreaSize = aDocAtom.GetSlidesPageSize(); } Scale( aVisAreaSize ); - pDocShell->SetVisArea( Rectangle( Point(), aVisAreaSize ) ); + pDocShell->SetVisArea( ::tools::Rectangle( Point(), aVisAreaSize ) ); // create master pages: @@ -805,7 +805,7 @@ bool ImplSdPPTImport::Import() { if ( nObjCount++ ) // skipping the first object { - Rectangle aEmpty; + ::tools::Rectangle aEmpty; if (!aHd2.SeekToBegOfRecord(rStCtrl)) break; SdrObject* pImpObj = ImportObj( rStCtrl, static_cast<void*>(&aProcessData), aEmpty, aEmpty ); @@ -1436,7 +1436,7 @@ void ImplSdPPTImport::SetHeaderFooterPageSettings( SdPage* pPage, const PptSlide sal_uInt32 nPosition = pHFE->NeedToImportInstance( i, rSlidePersist ); if ( nPosition ) { - Rectangle aEmpty; + ::tools::Rectangle aEmpty; bVisible = false; rStCtrl.Seek( nPosition ); ProcessData aProcessData( rSlidePersist, SdPageCapsule(pPage) ); @@ -2449,8 +2449,8 @@ SdrObject* ImplSdPPTImport::ApplyTextObj( PPTTextObj* pTextObj, SdrTextObj* pObj SdrObject* pTitleObj = static_cast<SdPage&>(pPage->TRG_GetMasterPage()).GetPresObj( PRESOBJ_TITLE ); SdrObject* pOutlineObj = static_cast<SdPage&>(pPage->TRG_GetMasterPage()).GetPresObj( PRESOBJ_OUTLINE ); - Rectangle aTitleRect; - Rectangle aOutlineRect; + ::tools::Rectangle aTitleRect; + ::tools::Rectangle aOutlineRect; Size aOutlineSize; if ( pTitleObj ) @@ -2460,7 +2460,7 @@ SdrObject* ImplSdPPTImport::ApplyTextObj( PPTTextObj* pTextObj, SdrTextObj* pObj aOutlineRect = pOutlineObj->GetLogicRect(); aOutlineSize = aOutlineRect.GetSize(); } - Rectangle aLogicRect( pPresObj->GetLogicRect() ); + ::tools::Rectangle aLogicRect( pPresObj->GetLogicRect() ); Size aLogicSize( aLogicRect.GetSize() ); switch ( nPlacementId ) @@ -2575,7 +2575,7 @@ SdrObject* ImplSdPPTImport::ApplyTextObj( PPTTextObj* pTextObj, SdrTextObj* pObj return pRet; } -SdrObject* ImplSdPPTImport::ProcessObj( SvStream& rSt, DffObjData& rObjData, void* pData, Rectangle& rTextRect, SdrObject* pRet ) +SdrObject* ImplSdPPTImport::ProcessObj( SvStream& rSt, DffObjData& rObjData, void* pData, ::tools::Rectangle& rTextRect, SdrObject* pRet ) { SdrObject* pObj = SdrPowerPointImport::ProcessObj( rSt, rObjData, pData, rTextRect, pRet ); diff --git a/sd/source/filter/ppt/pptin.hxx b/sd/source/filter/ppt/pptin.hxx index c2a94a62bb51..90c5f6a686cc 100644 --- a/sd/source/filter/ppt/pptin.hxx +++ b/sd/source/filter/ppt/pptin.hxx @@ -63,7 +63,7 @@ class ImplSdPPTImport : public SdrPowerPointImport void FillSdAnimationInfo( SdAnimationInfo* pInfo, PptInteractiveInfoAtom* pIAtom, const OUString& aMacroName ); - virtual SdrObject* ProcessObj( SvStream& rSt, DffObjData& rData, void* pData, Rectangle& rTextRect, SdrObject* pObj ) override; + virtual SdrObject* ProcessObj( SvStream& rSt, DffObjData& rData, void* pData, ::tools::Rectangle& rTextRect, SdrObject* pObj ) override; virtual SdrObject* ApplyTextObj( PPTTextObj* pTextObj, SdrTextObj* pText, SdPageCapsule pPage, SfxStyleSheet*, SfxStyleSheet** ) const override; diff --git a/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx b/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx index 48b701192433..f126e3c82885 100644 --- a/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx +++ b/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx @@ -302,7 +302,7 @@ awt::Rectangle SAL_CALL ThrowIfDisposed (); // Transform visible area into screen coordinates. - ::Rectangle aVisibleArea ( + ::tools::Rectangle aVisibleArea ( maShapeTreeInfo.GetViewForwarder()->GetVisibleArea()); ::Point aPixelTopLeft ( maShapeTreeInfo.GetViewForwarder()->LogicToPixel ( @@ -354,7 +354,7 @@ awt::Size SAL_CALL ThrowIfDisposed (); // Transform visible area into screen coordinates. - ::Rectangle aVisibleArea ( + ::tools::Rectangle aVisibleArea ( maShapeTreeInfo.GetViewForwarder()->GetVisibleArea()); ::Point aPixelTopLeft ( maShapeTreeInfo.GetViewForwarder()->LogicToPixel ( diff --git a/sd/source/ui/accessibility/AccessibleOutlineEditSource.cxx b/sd/source/ui/accessibility/AccessibleOutlineEditSource.cxx index 5a1aa3f7e655..e56a0b050f85 100644 --- a/sd/source/ui/accessibility/AccessibleOutlineEditSource.cxx +++ b/sd/source/ui/accessibility/AccessibleOutlineEditSource.cxx @@ -120,12 +120,12 @@ namespace accessibility return false; } - Rectangle AccessibleOutlineEditSource::GetVisArea() const + ::tools::Rectangle AccessibleOutlineEditSource::GetVisArea() const { if( IsValid() ) { SdrPaintWindow* pPaintWindow = mrView.FindPaintWindow(mrWindow); - Rectangle aVisArea; + ::tools::Rectangle aVisArea; if(pPaintWindow) { @@ -137,7 +137,7 @@ namespace accessibility return mrWindow.LogicToPixel( aVisArea, aMapMode ); } - return Rectangle(); + return ::tools::Rectangle(); } Point AccessibleOutlineEditSource::LogicToPixel( const Point& rPoint, const MapMode& rMapMode ) const diff --git a/sd/source/ui/accessibility/AccessiblePageShape.cxx b/sd/source/ui/accessibility/AccessiblePageShape.cxx index 43513cfdb810..c19d6a40a4c6 100644 --- a/sd/source/ui/accessibility/AccessiblePageShape.cxx +++ b/sd/source/ui/accessibility/AccessiblePageShape.cxx @@ -116,10 +116,10 @@ awt::Rectangle SAL_CALL AccessiblePageShape::getBounds() int y = aPixelPosition.getY() - aParentLocation.Y; // Clip with parent (with coordinates relative to itself). - ::Rectangle aBBox ( + ::tools::Rectangle aBBox ( x, y, x + aPixelSize.getWidth(), y + aPixelSize.getHeight()); awt::Size aParentSize (xParentComponent->getSize()); - ::Rectangle aParentBBox (0,0, aParentSize.Width, aParentSize.Height); + ::tools::Rectangle aParentBBox (0,0, aParentSize.Width, aParentSize.Height); aBBox = aBBox.GetIntersection (aParentBBox); aBoundingBox = awt::Rectangle ( aBBox.getX(), diff --git a/sd/source/ui/accessibility/AccessibleSlideSorterObject.cxx b/sd/source/ui/accessibility/AccessibleSlideSorterObject.cxx index 72f67ba9a098..6f2c5853b352 100644 --- a/sd/source/ui/accessibility/AccessibleSlideSorterObject.cxx +++ b/sd/source/ui/accessibility/AccessibleSlideSorterObject.cxx @@ -298,7 +298,7 @@ awt::Rectangle SAL_CALL AccessibleSlideSorterObject::getBounds() const SolarMutexGuard aSolarGuard; - Rectangle aBBox ( + ::tools::Rectangle aBBox ( mrSlideSorter.GetView().GetLayouter().GetPageObjectLayouter()->GetBoundingBox( mrSlideSorter.GetModel().GetPageDescriptor(mnPageNumber), ::sd::slidesorter::view::PageObjectLayouter::Part::PageObject, @@ -310,7 +310,7 @@ awt::Rectangle SAL_CALL AccessibleSlideSorterObject::getBounds() if (xParentComponent.is()) { awt::Rectangle aParentBBox (xParentComponent->getBounds()); - aBBox.Intersection(Rectangle( + aBBox.Intersection(::tools::Rectangle( aParentBBox.X, aParentBBox.Y, aParentBBox.Width, diff --git a/sd/source/ui/accessibility/AccessibleViewForwarder.cxx b/sd/source/ui/accessibility/AccessibleViewForwarder.cxx index e7db43c6bfe8..5190622366d5 100644 --- a/sd/source/ui/accessibility/AccessibleViewForwarder.cxx +++ b/sd/source/ui/accessibility/AccessibleViewForwarder.cxx @@ -54,9 +54,9 @@ AccessibleViewForwarder::~AccessibleViewForwarder() // empty } -Rectangle AccessibleViewForwarder::GetVisibleArea() const +::tools::Rectangle AccessibleViewForwarder::GetVisibleArea() const { - Rectangle aVisibleArea; + ::tools::Rectangle aVisibleArea; if((sal_uInt32)mnWindowId < mpView->PaintWindowCount()) { @@ -78,7 +78,7 @@ Point AccessibleViewForwarder::LogicToPixel (const Point& rPoint) const { SdrPaintWindow* pPaintWindow = mpView->GetPaintWindow((sal_uInt32)mnWindowId); OutputDevice& rOutDev = pPaintWindow->GetOutputDevice(); - Rectangle aBBox(static_cast<vcl::Window&>(rOutDev).GetWindowExtentsRelative(nullptr)); + ::tools::Rectangle aBBox(static_cast<vcl::Window&>(rOutDev).GetWindowExtentsRelative(nullptr)); return rOutDev.LogicToPixel (rPoint) + aBBox.TopLeft(); } else diff --git a/sd/source/ui/animations/CategoryListBox.cxx b/sd/source/ui/animations/CategoryListBox.cxx index ff1b28c5b7ba..f81b65ecec49 100644 --- a/sd/source/ui/animations/CategoryListBox.cxx +++ b/sd/source/ui/animations/CategoryListBox.cxx @@ -47,7 +47,7 @@ void CategoryListBox::UserDraw( const UserDrawEvent& rUDEvt ) if( ListBox::GetEntryFlags(nItem) & ListBoxEntryFlags::DisableSelection ) { - Rectangle aOutRect( rUDEvt.GetRect() ); + ::tools::Rectangle aOutRect( rUDEvt.GetRect() ); vcl::RenderContext* pDev = rUDEvt.GetRenderContext(); // fill the background diff --git a/sd/source/ui/animations/CustomAnimationList.cxx b/sd/source/ui/animations/CustomAnimationList.cxx index 21e28d46a8e0..ae782622bdc9 100644 --- a/sd/source/ui/animations/CustomAnimationList.cxx +++ b/sd/source/ui/animations/CustomAnimationList.cxx @@ -398,7 +398,7 @@ void CustomAnimationTriggerEntryItem::Paint(const Point& rPos, SvTreeListBox& rD Point aPos(0, rPos.Y()); - Rectangle aOutRect(aPos, aSize); + ::tools::Rectangle aOutRect(aPos, aSize); // fill the background Color aColor(rRenderContext.GetSettings().GetStyleSettings().GetDialogColor()); @@ -941,7 +941,7 @@ void CustomAnimationList::notify_change() mpController->onSelect(); } -void CustomAnimationList::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) +void CustomAnimationList::Paint(vcl::RenderContext& rRenderContext, const ::tools::Rectangle& rRect) { if( mbIgnorePaint ) return; @@ -955,7 +955,7 @@ void CustomAnimationList::Paint(vcl::RenderContext& rRenderContext, const Rectan rRenderContext.SetTextColor(rRenderContext.GetSettings().GetStyleSettings().GetDisableColor()); ::Point aOffset(rRenderContext.LogicToPixel(Point(6, 6), MapUnit::MapAppFont)); - Rectangle aRect(Point(0,0), GetOutputSizePixel()); + ::tools::Rectangle aRect(Point(0,0), GetOutputSizePixel()); aRect.Left() += aOffset.X(); aRect.Top() += aOffset.Y(); diff --git a/sd/source/ui/animations/CustomAnimationList.hxx b/sd/source/ui/animations/CustomAnimationList.hxx index 7b45e88603b7..07303eedbb03 100644 --- a/sd/source/ui/animations/CustomAnimationList.hxx +++ b/sd/source/ui/animations/CustomAnimationList.hxx @@ -74,7 +74,7 @@ public: virtual void SelectHdl() override; virtual bool DoubleClickHdl() override; - virtual void Paint( vcl::RenderContext& rRenderContext, const Rectangle& rRect ) override; + virtual void Paint( vcl::RenderContext& rRenderContext, const ::tools::Rectangle& rRect ) override; virtual VclPtr<PopupMenu> CreateContextMenu() override; virtual void ExecuteContextMenuAction( sal_uInt16 nSelectedPopupEntry ) override; diff --git a/sd/source/ui/animations/motionpathtag.cxx b/sd/source/ui/animations/motionpathtag.cxx index b793469b6c8d..39369192911d 100644 --- a/sd/source/ui/animations/motionpathtag.cxx +++ b/sd/source/ui/animations/motionpathtag.cxx @@ -608,7 +608,7 @@ bool MotionPathTag::OnTabHandles( const KeyEvent& rKEvt ) if( pWindow ) { Point aHdlPosition(pHdl->GetPos()); - Rectangle aVisRect(aHdlPosition - Point(100, 100), Size(200, 200)); + ::tools::Rectangle aVisRect(aHdlPosition - Point(100, 100), Size(200, 200)); mrView.MakeVisible(aVisRect, *pWindow); } } @@ -798,7 +798,7 @@ bool MotionPathTag::MarkPoint(SdrHdl& rHdl, bool bUnmark ) return bRet; } -bool MotionPathTag::MarkPoints(const Rectangle* pRect, bool bUnmark ) +bool MotionPathTag::MarkPoints(const ::tools::Rectangle* pRect, bool bUnmark ) { bool bChgd=false; @@ -940,7 +940,7 @@ void MotionPathTag::addCustomHandles( SdrHdlList& rHandlerList ) } else { - Rectangle aRect(mpPathObj->GetCurrentBoundRect()); + ::tools::Rectangle aRect(mpPathObj->GetCurrentBoundRect()); if(!aRect.IsEmpty()) { diff --git a/sd/source/ui/animations/motionpathtag.hxx b/sd/source/ui/animations/motionpathtag.hxx index ebb6a55c8a71..ef6b06657d7b 100644 --- a/sd/source/ui/animations/motionpathtag.hxx +++ b/sd/source/ui/animations/motionpathtag.hxx @@ -54,7 +54,7 @@ public: virtual sal_uLong GetMarkedPointCount() const override; virtual bool MarkPoint(SdrHdl& rHdl, bool bUnmark) override; virtual void CheckPossibilities() override; - virtual bool MarkPoints(const Rectangle* pRect, bool bUnmark) override; + virtual bool MarkPoints(const ::tools::Rectangle* pRect, bool bUnmark) override; const CustomAnimationEffectPtr& getEffect() const { return mpEffect; } diff --git a/sd/source/ui/annotations/annotationmanager.cxx b/sd/source/ui/annotations/annotationmanager.cxx index 29278b4fdc63..465f83698382 100644 --- a/sd/source/ui/annotations/annotationmanager.cxx +++ b/sd/source/ui/annotations/annotationmanager.cxx @@ -489,11 +489,11 @@ void AnnotationManagerImpl::InsertAnnotation(const OUString& rText) const int page_width = pPage->GetSize().Width(); const int width = 1000; const int height = 800; - Rectangle aTagRect; + ::tools::Rectangle aTagRect; while( true ) { - Rectangle aNewRect( x, y, x + width - 1, y + height - 1 ); + ::tools::Rectangle aNewRect( x, y, x + width - 1, y + height - 1 ); bool bFree = true; for( AnnotationVector::iterator iter = aAnnotations.begin(); iter != aAnnotations.end(); ++iter ) @@ -1089,7 +1089,7 @@ IMPL_LINK(AnnotationManagerImpl,EventMultiplexerListener, } } -void AnnotationManagerImpl::ExecuteAnnotationContextMenu( const Reference< XAnnotation >& xAnnotation, vcl::Window* pParent, const Rectangle& rContextRect, bool bButtonMenu /* = false */ ) +void AnnotationManagerImpl::ExecuteAnnotationContextMenu( const Reference< XAnnotation >& xAnnotation, vcl::Window* pParent, const ::tools::Rectangle& rContextRect, bool bButtonMenu /* = false */ ) { SfxDispatcher* pDispatcher( getDispatcher( mrBase ) ); if( !pDispatcher ) diff --git a/sd/source/ui/annotations/annotationmanagerimpl.hxx b/sd/source/ui/annotations/annotationmanagerimpl.hxx index 242a7fb6dcfc..16312b233425 100644 --- a/sd/source/ui/annotations/annotationmanagerimpl.hxx +++ b/sd/source/ui/annotations/annotationmanagerimpl.hxx @@ -79,7 +79,7 @@ public: void DeleteAnnotationsByAuthor( const OUString& sAuthor ); void DeleteAllAnnotations(); - void ExecuteAnnotationContextMenu( const css::uno::Reference< css::office::XAnnotation >& xAnnotation, vcl::Window* pParent, const Rectangle& rContextRect, bool bButtonMenu = false ); + void ExecuteAnnotationContextMenu( const css::uno::Reference< css::office::XAnnotation >& xAnnotation, vcl::Window* pParent, const ::tools::Rectangle& rContextRect, bool bButtonMenu = false ); static Color GetColorDark(sal_uInt16 aAuthorIndex); static Color GetColorLight(sal_uInt16 aAuthorIndex); diff --git a/sd/source/ui/annotations/annotationtag.cxx b/sd/source/ui/annotations/annotationtag.cxx index 0251af279c9f..78e53f9eff68 100644 --- a/sd/source/ui/annotations/annotationtag.cxx +++ b/sd/source/ui/annotations/annotationtag.cxx @@ -116,7 +116,7 @@ bool AnnotationDragMove::BeginSdrDrag() DragStat().SetShown(!DragStat().IsShown()); maOrigin = GetDragHdl()->GetPos(); - DragStat().SetActionRect(Rectangle(maOrigin,maOrigin)); + DragStat().SetActionRect(::tools::Rectangle(maOrigin,maOrigin)); return true; } @@ -133,7 +133,7 @@ void AnnotationDragMove::MoveSdrDrag(const Point& rNoSnapPnt) DragStat().NextMove(aPnt); GetDragHdl()->SetPos( maOrigin + Point( DragStat().GetDX(), DragStat().GetDY() ) ); Show(); - DragStat().SetActionRect(Rectangle(aPnt,aPnt)); + DragStat().SetActionRect(::tools::Rectangle(aPnt,aPnt)); } } } @@ -351,7 +351,7 @@ bool AnnotationTag::Command( const CommandEvent& rCEvt ) vcl::Window* pWindow = mrView.GetViewShell()->GetActiveWindow(); if( pWindow ) { - Rectangle aContextRect(rCEvt.GetMousePosPixel(),Size(1,1)); + ::tools::Rectangle aContextRect(rCEvt.GetMousePosPixel(),Size(1,1)); mrManager.ExecuteAnnotationContextMenu( mxAnnotation, pWindow, aContextRect ); return true; } @@ -436,7 +436,7 @@ bool AnnotationTag::MarkPoint(SdrHdl& /*rHdl*/, bool /*bUnmark*/ ) return bRet; } -bool AnnotationTag::MarkPoints(const Rectangle* /*pRect*/, bool /*bUnmark*/ ) +bool AnnotationTag::MarkPoints(const ::tools::Rectangle* /*pRect*/, bool /*bUnmark*/ ) { bool bChgd=false; return bChgd; @@ -495,7 +495,7 @@ void AnnotationTag::select() RealPoint2D aPosition( mxAnnotation->getPosition() ); Point aPos( static_cast<long>(aPosition.X * 100.0), static_cast<long>(aPosition.Y * 100.0) ); - Rectangle aVisRect( aPos, pWindow->PixelToLogic(maSize) ); + ::tools::Rectangle aVisRect( aPos, pWindow->PixelToLogic(maSize) ); mrView.MakeVisible(aVisRect, *pWindow); } } @@ -546,7 +546,7 @@ BitmapEx AnnotationTag::CreateAnnotationBitmap( bool bSelected ) } Point aPos; - Rectangle aBorderRect( aPos, maSize ); + ::tools::Rectangle aBorderRect( aPos, maSize ); pVDev->SetLineColor(aBorderColor); pVDev->SetFillColor(maColor); pVDev->DrawRect( aBorderRect ); @@ -573,7 +573,7 @@ void AnnotationTag::OpenPopup( bool bEdit ) aPos.X() += 4; // magic! aPos.Y() += 1; - Rectangle aRect( aPos, maSize ); + ::tools::Rectangle aRect( aPos, maSize ); mpAnnotationWindow.reset( VclPtr<AnnotationWindow>::Create( mrManager, mrView.GetDocSh(), pWindow->GetWindow(GetWindowType::Frame) ) ); mpAnnotationWindow->InitControls(); diff --git a/sd/source/ui/annotations/annotationtag.hxx b/sd/source/ui/annotations/annotationtag.hxx index 2e8f63ccc49a..9419efc0fd2e 100644 --- a/sd/source/ui/annotations/annotationtag.hxx +++ b/sd/source/ui/annotations/annotationtag.hxx @@ -54,7 +54,7 @@ public: virtual sal_uLong GetMarkedPointCount() const override; virtual bool MarkPoint(SdrHdl& rHdl, bool bUnmark) override; virtual void CheckPossibilities() override; - virtual bool MarkPoints(const Rectangle* pRect, bool bUnmark) override; + virtual bool MarkPoints(const ::tools::Rectangle* pRect, bool bUnmark) override; void Move( int nDX, int nDY ); bool OnMove( const KeyEvent& rKEvt ); diff --git a/sd/source/ui/annotations/annotationwindow.cxx b/sd/source/ui/annotations/annotationwindow.cxx index 4e7dfc1fa6f1..18bca50855a1 100644 --- a/sd/source/ui/annotations/annotationwindow.cxx +++ b/sd/source/ui/annotations/annotationwindow.cxx @@ -126,12 +126,12 @@ void AnnotationTextWindow::dispose() Control::dispose(); } -void AnnotationTextWindow::Paint( vcl::RenderContext& /*rRenderContext*/, const Rectangle& rRect) +void AnnotationTextWindow::Paint( vcl::RenderContext& /*rRenderContext*/, const ::tools::Rectangle& rRect) { const bool bHighContrast = Application::GetSettings().GetStyleSettings().GetHighContrastMode(); if ( !bHighContrast ) { - DrawGradient(Rectangle(Point(0,0),PixelToLogic(GetSizePixel())), + DrawGradient(::tools::Rectangle(Point(0,0),PixelToLogic(GetSizePixel())), Gradient(GradientStyle::Linear,mpAnnotationWindow->maColorLight,mpAnnotationWindow->maColor)); } @@ -331,7 +331,7 @@ void AnnotationWindow::InitControls() mpOutlinerView = new OutlinerView ( mpOutliner, mpTextWindow ); mpOutliner->InsertView(mpOutlinerView ); mpTextWindow->SetOutlinerView(mpOutlinerView); - mpOutlinerView->SetOutputArea( PixelToLogic( Rectangle(0,0,1,1) ) ); + mpOutlinerView->SetOutputArea( PixelToLogic( ::tools::Rectangle(0,0,1,1) ) ); //create Scrollbars mpVScrollbar = VclPtr<ScrollBar>::Create(this, WB_3DLOOK |WB_VSCROLL|WB_DRAG); @@ -409,10 +409,10 @@ void AnnotationWindow::DoResize() mpMeta->setPosSizePixel(0,aHeight,GetSizePixel().Width()-METABUTTON_AREA_WIDTH,POSTIT_META_HEIGHT); mpOutliner->SetPaperSize( PixelToLogic( Size(aWidth,aHeight) ) ) ; - mpOutlinerView->SetOutputArea( PixelToLogic( Rectangle(0,0,aWidth,aHeight) ) ); + mpOutlinerView->SetOutputArea( PixelToLogic( ::tools::Rectangle(0,0,aWidth,aHeight) ) ); if (!mpVScrollbar->IsVisible()) { // if we do not have a scrollbar anymore, we want to see the complete text - mpOutlinerView->SetVisArea( PixelToLogic( Rectangle(0,0,aWidth,aHeight) ) ); + mpOutlinerView->SetVisArea( PixelToLogic( ::tools::Rectangle(0,0,aWidth,aHeight) ) ); } mpVScrollbar->setPosSizePixel( 0 + aWidth, 0, GetScrollbarWidth(), aHeight ); mpVScrollbar->SetVisibleSize( PixelToLogic(Size(0,aHeight)).Height() ); @@ -432,7 +432,7 @@ void AnnotationWindow::DoResize() maPopupTriangle.append(basegfx::B2DPoint(aRight.X(),aRight.Y())); maPopupTriangle.append(basegfx::B2DPoint(aBottom.X(),aBottom.Y())); maPopupTriangle.setClosed(true); - maRectMetaButton = PixelToLogic( Rectangle( Point( + maRectMetaButton = PixelToLogic( ::tools::Rectangle( Point( aPos.X()+GetSizePixel().Width()-(METABUTTON_WIDTH+10), aPos.Y()+5 ), Size( METABUTTON_WIDTH, METABUTTON_HEIGHT ) ) ); @@ -632,7 +632,7 @@ void AnnotationWindow::Deactivate() Engine()->GetUndoManager().Clear(); } -void AnnotationWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) +void AnnotationWindow::Paint(vcl::RenderContext& rRenderContext, const ::tools::Rectangle& rRect) { FloatingWindow::Paint(rRenderContext, rRect); @@ -645,7 +645,7 @@ void AnnotationWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangle else SetFillColor(maColor); SetLineColor(); - DrawRect(PixelToLogic(Rectangle(Point(mpMeta->GetPosPixel().X()+mpMeta->GetSizePixel().Width(),mpMeta->GetPosPixel().Y()),Size(METABUTTON_AREA_WIDTH,mpMeta->GetSizePixel().Height())))); + DrawRect(PixelToLogic(::tools::Rectangle(Point(mpMeta->GetPosPixel().X()+mpMeta->GetSizePixel().Width(),mpMeta->GetPosPixel().Y()),Size(METABUTTON_AREA_WIDTH,mpMeta->GetSizePixel().Height())))); if ( bHighContrast ) { @@ -706,7 +706,7 @@ void AnnotationWindow::MouseButtonDown( const MouseEvent& rMEvt ) if (!mbReadonly && maRectMetaButton.IsInside(PixelToLogic(rMEvt.GetPosPixel())) && rMEvt.IsLeft()) { // context menu - Rectangle aRect(LogicToPixel(maRectMetaButton.BottomLeft()),LogicToPixel(maRectMetaButton.BottomLeft())); + ::tools::Rectangle aRect(LogicToPixel(maRectMetaButton.BottomLeft()),LogicToPixel(maRectMetaButton.BottomLeft())); mrManager.ExecuteAnnotationContextMenu( mxAnnotation, static_cast<vcl::Window*>(this), aRect, true ); } } @@ -717,7 +717,7 @@ void AnnotationWindow::Command( const CommandEvent& rCEvt ) { if( mpMeta->IsVisible() &&(mpMeta->GetPosPixel().Y() < rCEvt.GetMousePosPixel().Y()) ) return; - mrManager.ExecuteAnnotationContextMenu( mxAnnotation, this, Rectangle(rCEvt.GetMousePosPixel(),Size(1,1)) ); + mrManager.ExecuteAnnotationContextMenu( mxAnnotation, this, ::tools::Rectangle(rCEvt.GetMousePosPixel(),Size(1,1)) ); } else { diff --git a/sd/source/ui/annotations/annotationwindow.hxx b/sd/source/ui/annotations/annotationwindow.hxx index 3643a070b36b..14f61f2d3520 100644 --- a/sd/source/ui/annotations/annotationwindow.hxx +++ b/sd/source/ui/annotations/annotationwindow.hxx @@ -53,7 +53,7 @@ private: VclPtr<AnnotationWindow> mpAnnotationWindow; protected: - virtual void Paint( vcl::RenderContext& /*rRenderContext*/, const Rectangle& rRect) override; + virtual void Paint( vcl::RenderContext& /*rRenderContext*/, const ::tools::Rectangle& rRect) override; virtual void KeyInput( const KeyEvent& rKeyEvt ) override; virtual void MouseMove( const MouseEvent& rMEvt ) override; virtual void MouseButtonDown( const MouseEvent& rMEvt ) override; @@ -87,7 +87,7 @@ class AnnotationWindow : public FloatingWindow bool mbMouseOverButton; VclPtr<AnnotationTextWindow> mpTextWindow; VclPtr<MultiLineEdit> mpMeta; - Rectangle maRectMetaButton; + ::tools::Rectangle maRectMetaButton; basegfx::B2DPolygon maPopupTriangle; protected: @@ -127,7 +127,7 @@ class AnnotationWindow : public FloatingWindow void ToggleInsMode(); virtual void Deactivate() 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 Command( const CommandEvent& rCEvt ) override; diff --git a/sd/source/ui/dlg/PhotoAlbumDialog.cxx b/sd/source/ui/dlg/PhotoAlbumDialog.cxx index 658c2fd971b3..2422766ccfa0 100644 --- a/sd/source/ui/dlg/PhotoAlbumDialog.cxx +++ b/sd/source/ui/dlg/PhotoAlbumDialog.cxx @@ -759,7 +759,7 @@ void SdPhotoAlbumDialog::createCaption(const awt::Size& aPageSize ) SdPage* pSlide = pDoc->GetSdPage( pDoc->GetSdPageCount(PageKind::Standard)-1, PageKind::Standard ); // try to get existing PresObj - const Rectangle rRect(CapPos,CapSize); + const ::tools::Rectangle rRect(CapPos,CapSize); SdrObject* pSdrObj = pSlide->GetPresObj(PRESOBJ_TITLE); if(!pSdrObj) diff --git a/sd/source/ui/dlg/RemoteDialogClientBox.cxx b/sd/source/ui/dlg/RemoteDialogClientBox.cxx index 7c25286c1b81..f0933ba5e7e9 100644 --- a/sd/source/ui/dlg/RemoteDialogClientBox.cxx +++ b/sd/source/ui/dlg/RemoteDialogClientBox.cxx @@ -168,7 +168,7 @@ void ClientBox::CalcActiveHeight( const long nPos ) m_nActiveHeight = aTextHeight + 2; } -Rectangle ClientBox::GetEntryRect( const long nPos ) const +::tools::Rectangle ClientBox::GetEntryRect( const long nPos ) const { const ::osl::MutexGuard aGuard( m_entriesMutex ); @@ -186,7 +186,7 @@ Rectangle ClientBox::GetEntryRect( const long nPos ) const if ( m_bHasActive && ( nPos < m_nActive ) ) aPos.Y() += m_nActiveHeight - m_nStdHeight; - return Rectangle( aPos, aSize ); + return ::tools::Rectangle( aPos, aSize ); } void ClientBox::DeleteRemoved() @@ -273,7 +273,7 @@ void ClientBox::selectEntry( const long nPos ) guard.clear(); } -void ClientBox::DrawRow(vcl::RenderContext& rRenderContext, const Rectangle& rRect, const TClientBoxEntry& rEntry) +void ClientBox::DrawRow(vcl::RenderContext& rRenderContext, const ::tools::Rectangle& rRect, const TClientBoxEntry& rEntry) { const StyleSettings& rStyleSettings = rRenderContext.GetSettings().GetStyleSettings(); @@ -359,7 +359,7 @@ void ClientBox::RecalcAll() } else { - Rectangle aEntryRect = GetEntryRect( m_nActive ); + ::tools::Rectangle aEntryRect = GetEntryRect( m_nActive ); Size aPinBoxSize( m_aPinBox->GetSizePixel() ); Point aPos( aEntryRect.Left(), @@ -369,7 +369,7 @@ void ClientBox::RecalcAll() if ( !bAlreadyAuthorised ) { - m_sPinTextRect = Rectangle( aPos.X(), aPos.Y(), + m_sPinTextRect = ::tools::Rectangle( aPos.X(), aPos.Y(), aEntryRect.Right(), aEntryRect.Bottom() - TOP_OFFSET); @@ -474,7 +474,7 @@ bool ClientBox::HandleCursorKey( sal_uInt16 nKeyCode ) return true; } -void ClientBox::Paint(vcl::RenderContext& rRenderContext, const Rectangle &/*rPaintRect*/) +void ClientBox::Paint(vcl::RenderContext& rRenderContext, const ::tools::Rectangle &/*rPaintRect*/) { if (!m_bInDelete) DeleteRemoved(); @@ -494,7 +494,7 @@ void ClientBox::Paint(vcl::RenderContext& rRenderContext, const Rectangle &/*rPa for (ITER iIndex = m_vEntries.begin(); iIndex < m_vEntries.end(); ++iIndex) { aSize.Height() = (*iIndex)->m_bActive ? m_nActiveHeight : m_nStdHeight; - Rectangle aEntryRect(aStart, aSize); + ::tools::Rectangle aEntryRect(aStart, aSize); DrawRow(rRenderContext, aEntryRect, *iIndex); aStart.Y() += aSize.Height(); } @@ -701,7 +701,7 @@ void ClientBox::DoScroll( long nDelta ) m_nTopIndex += nDelta; Point aNewSBPt( m_aScrollBar->GetPosPixel() ); - Rectangle aScrRect( Point(), GetOutputSizePixel() ); + ::tools::Rectangle aScrRect( Point(), GetOutputSizePixel() ); aScrRect.Right() -= m_aScrollBar->GetSizePixel().Width(); Scroll( 0, -nDelta, aScrRect ); diff --git a/sd/source/ui/dlg/RemoteDialogClientBox.hxx b/sd/source/ui/dlg/RemoteDialogClientBox.hxx index 597c9e4fca45..156ffc48e5f5 100644 --- a/sd/source/ui/dlg/RemoteDialogClientBox.hxx +++ b/sd/source/ui/dlg/RemoteDialogClientBox.hxx @@ -100,7 +100,7 @@ class ClientBox : public Control VclPtr<NumericBox> m_aPinBox; VclPtr<PushButton> m_aDeauthoriseButton; - Rectangle m_sPinTextRect; + ::tools::Rectangle m_sPinTextRect; VclPtr<ScrollBar> m_aScrollBar; @@ -120,7 +120,7 @@ class ClientBox : public Control void CalcActiveHeight( const long nPos ); long GetTotalHeight() const; void SetupScrollBar(); - void DrawRow(vcl::RenderContext& rRenderContext, const Rectangle& rRect, const TClientBoxEntry& rEntry); + void DrawRow(vcl::RenderContext& rRenderContext, const ::tools::Rectangle& rRect, const TClientBoxEntry& rEntry); bool HandleCursorKey( sal_uInt16 nKeyCode ); void DeleteRemoved(); @@ -133,14 +133,14 @@ public: virtual void dispose() override; void MouseButtonDown( const MouseEvent& rMEvt ) override; - void Paint( vcl::RenderContext& rRenderContext, const Rectangle &rPaintRect ) override; + void Paint( vcl::RenderContext& rRenderContext, const ::tools::Rectangle &rPaintRect ) override; void Resize() override; Size GetOptimalSize() const override; bool EventNotify( NotifyEvent& rNEvt ) override; TClientBoxEntry GetEntryData( long nPos ) { return m_vEntries[ nPos ]; } long GetActiveEntryIndex(); - Rectangle GetEntryRect( const long nPos ) const; + ::tools::Rectangle GetEntryRect( const long nPos ) const; long PointToPos( const Point& rPos ); void DoScroll( long nDelta ); void RecalcAll(); diff --git a/sd/source/ui/dlg/animobjs.cxx b/sd/source/ui/dlg/animobjs.cxx index 9f37ab71f887..7c627c359ac2 100644 --- a/sd/source/ui/dlg/animobjs.cxx +++ b/sd/source/ui/dlg/animobjs.cxx @@ -82,7 +82,7 @@ void SdDisplay::SetBitmapEx( BitmapEx* pBmpEx ) } } -void SdDisplay::Paint( vcl::RenderContext& /*rRenderContext*/, const Rectangle& ) +void SdDisplay::Paint( vcl::RenderContext& /*rRenderContext*/, const ::tools::Rectangle& ) { Point aPt; Size aSize = GetOutputSize(); @@ -530,7 +530,7 @@ void AnimationWindow::UpdateControl(bool const bDisableCtrls) if( pObject ) { ScopedVclPtrInstance< VirtualDevice > pVD; - Rectangle aObjRect( pObject->GetCurrentBoundRect() ); + ::tools::Rectangle aObjRect( pObject->GetCurrentBoundRect() ); Size aObjSize( aObjRect.GetSize() ); Point aOrigin( Point( -aObjRect.Left(), -aObjRect.Top() ) ); MapMode aMap( pVD->GetMapMode() ); @@ -1005,7 +1005,7 @@ void AnimationWindow::CreateAnimObj (::sd::View& rView ) SdrGrafObj* pGrafObj = new SdrGrafObj( Graphic( aAnimation ) ); const Point aOrg( aWindowCenter.X() - ( aMaxSizeLog.Width() >> 1 ), aWindowCenter.Y() - ( aMaxSizeLog.Height() >> 1 ) ); - pGrafObj->SetLogicRect( Rectangle( aOrg, aMaxSizeLog ) ); + pGrafObj->SetLogicRect( ::tools::Rectangle( aOrg, aMaxSizeLog ) ); rView.InsertObjectAtView( pGrafObj, *pPV, SdrInsertFlags::SETDEFLAYER); } else @@ -1018,7 +1018,7 @@ void AnimationWindow::CreateAnimObj (::sd::View& rView ) for (size_t i = 0; i < nCount; ++i) { pClone = pPage->GetObj(i); - Rectangle aRect( pClone->GetSnapRect() ); + ::tools::Rectangle aRect( pClone->GetSnapRect() ); switch( eBA ) { diff --git a/sd/source/ui/dlg/copydlg.cxx b/sd/source/ui/dlg/copydlg.cxx index efcebc1442f1..6c679cd834bc 100644 --- a/sd/source/ui/dlg/copydlg.cxx +++ b/sd/source/ui/dlg/copydlg.cxx @@ -221,7 +221,7 @@ IMPL_LINK_NOARG(CopyDlg, SelectColorHdl, SvxColorListBox&, void) */ IMPL_LINK_NOARG(CopyDlg, SetViewData, Button*, void) { - Rectangle aRect = mpView->GetAllMarkedRect(); + ::tools::Rectangle aRect = mpView->GetAllMarkedRect(); SetMetricValue( *m_pMtrFldMoveX, Fraction( aRect.GetWidth() ) / maUIScale, MapUnit::Map100thMM); diff --git a/sd/source/ui/dlg/dlgsnap.cxx b/sd/source/ui/dlg/dlgsnap.cxx index 342108f3d6b8..c59dac16c704 100644 --- a/sd/source/ui/dlg/dlgsnap.cxx +++ b/sd/source/ui/dlg/dlgsnap.cxx @@ -59,7 +59,7 @@ SdSnapLineDlg::SdSnapLineDlg( SetFieldUnit( *m_pMtrFldY, eUIUnit, true ); // get WorkArea - Rectangle aWorkArea = pView->GetWorkArea(); + ::tools::Rectangle aWorkArea = pView->GetWorkArea(); // determine PoolUnit SfxItemPool* pPool = rInAttrs.GetPool(); diff --git a/sd/source/ui/dlg/docprev.cxx b/sd/source/ui/dlg/docprev.cxx index d757d4bfb322..84cce2aa79e7 100644 --- a/sd/source/ui/dlg/docprev.cxx +++ b/sd/source/ui/dlg/docprev.cxx @@ -123,10 +123,10 @@ void SdDocPreviewWin::ImpPaint( OutputDevice* pVDev ) pVDev->SetLineColor(); pVDev->SetFillColor( Color( aColorConfig.GetColorValue( svtools::APPBACKGROUND ).nColor ) ); - pVDev->DrawRect(Rectangle( Point(0,0 ), pVDev->GetOutputSize())); + pVDev->DrawRect(::tools::Rectangle( Point(0,0 ), pVDev->GetOutputSize())); } -void SdDocPreviewWin::Paint( vcl::RenderContext& /*rRenderContext*/, const Rectangle& rRect ) +void SdDocPreviewWin::Paint( vcl::RenderContext& /*rRenderContext*/, const ::tools::Rectangle& rRect ) { if( (!mxSlideShow.is()) || (!mxSlideShow->isRunning() ) ) { diff --git a/sd/source/ui/dlg/headerfooterdlg.cxx b/sd/source/ui/dlg/headerfooterdlg.cxx index 201282de7bba..06421b0851f7 100644 --- a/sd/source/ui/dlg/headerfooterdlg.cxx +++ b/sd/source/ui/dlg/headerfooterdlg.cxx @@ -68,7 +68,7 @@ private: SdPage* mpMaster; HeaderFooterSettings maSettings; Size maPageSize; - Rectangle maOutRect; + ::tools::Rectangle maOutRect; private: void Paint(vcl::RenderContext& rRenderContext, SdrTextObj* pObj, bool bVisible, bool bDotted = false); @@ -76,7 +76,7 @@ private: public: explicit PresLayoutPreview(vcl::Window* pParent); - virtual void Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) override; + virtual void Paint(vcl::RenderContext& rRenderContext, const ::tools::Rectangle& rRect) override; virtual Size GetOptimalSize() const override; void init(SdPage* pMaster); @@ -757,11 +757,11 @@ void PresLayoutPreview::Paint(vcl::RenderContext& rRenderContext, SdrTextObj* pO } } -void PresLayoutPreview::Paint(vcl::RenderContext& rRenderContext, const Rectangle&) +void PresLayoutPreview::Paint(vcl::RenderContext& rRenderContext, const ::tools::Rectangle&) { rRenderContext.Push(); - maOutRect = Rectangle(Point(0,0), rRenderContext.GetOutputSize()); + maOutRect = ::tools::Rectangle(Point(0,0), rRenderContext.GetOutputSize()); // calculate page size with correct aspect ratio int nWidth, nHeight; diff --git a/sd/source/ui/dlg/vectdlg.cxx b/sd/source/ui/dlg/vectdlg.cxx index 1e991ac179b1..203a423e09a8 100644 --- a/sd/source/ui/dlg/vectdlg.cxx +++ b/sd/source/ui/dlg/vectdlg.cxx @@ -90,9 +90,9 @@ void SdVectorizeDlg::dispose() ModalDialog::dispose(); } -Rectangle SdVectorizeDlg::GetRect( const Size& rDispSize, const Size& rBmpSize ) +::tools::Rectangle SdVectorizeDlg::GetRect( const Size& rDispSize, const Size& rBmpSize ) { - Rectangle aRect; + ::tools::Rectangle aRect; if( rBmpSize.Width() && rBmpSize.Height() && rDispSize.Width() && rDispSize.Height() ) { @@ -114,7 +114,7 @@ Rectangle SdVectorizeDlg::GetRect( const Size& rDispSize, const Size& rBmpSize ) const Point aBmpPos( ( rDispSize.Width() - aBmpSize.Width() ) >> 1, ( rDispSize.Height() - aBmpSize.Height() ) >> 1 ); - aRect = Rectangle( aBmpPos, aBmpSize ); + aRect = ::tools::Rectangle( aBmpPos, aBmpSize ); } return aRect; @@ -122,7 +122,7 @@ Rectangle SdVectorizeDlg::GetRect( const Size& rDispSize, const Size& rBmpSize ) void SdVectorizeDlg::InitPreviewBmp() { - const Rectangle aRect( GetRect( m_pBmpWin->GetSizePixel(), aBmp.GetSizePixel() ) ); + const ::tools::Rectangle aRect( GetRect( m_pBmpWin->GetSizePixel(), aBmp.GetSizePixel() ) ); aPreviewBmp = aBmp; aPreviewBmp.Scale( aRect.GetSize() ); @@ -136,7 +136,7 @@ Bitmap SdVectorizeDlg::GetPreparedBitmap( Bitmap& rBmp, Fraction& rScale ) if( aSizePix.Width() > VECTORIZE_MAX_EXTENT || aSizePix.Height() > VECTORIZE_MAX_EXTENT ) { - const Rectangle aRect( GetRect( Size( VECTORIZE_MAX_EXTENT, VECTORIZE_MAX_EXTENT ), aSizePix ) ); + const ::tools::Rectangle aRect( GetRect( Size( VECTORIZE_MAX_EXTENT, VECTORIZE_MAX_EXTENT ), aSizePix ) ); rScale = Fraction( aSizePix.Width(), aRect.GetWidth() ); aNew.Scale( aRect.GetSize() ); } @@ -244,7 +244,7 @@ void SdVectorizeDlg::AddTile( BitmapReadAccess* pRAcc, GDIMetaFile& rMtf, (sal_uInt8) FRound( nSumG * fMult ), (sal_uInt8) FRound( nSumB * fMult ) ); - Rectangle aRect( Point( nPosX, nPosY ), Size( nWidth + 1, nHeight + 1 ) ); + ::tools::Rectangle aRect( Point( nPosX, nPosY ), Size( nWidth + 1, nHeight + 1 ) ); const Size& rMaxSize = rMtf.GetPrefSize(); aRect = PixelToLogic( aRect, rMtf.GetPrefMapMode() ); diff --git a/sd/source/ui/docshell/docshel2.cxx b/sd/source/ui/docshell/docshel2.cxx index cecf385fd9c7..851ff8c56e72 100644 --- a/sd/source/ui/docshell/docshel2.cxx +++ b/sd/source/ui/docshell/docshel2.cxx @@ -90,7 +90,7 @@ void DrawDocShell::Draw(OutputDevice* pOut, const JobSetup&, sal_uInt16 nAspect) pSelectedPage = mpDoc->GetSdPage(0, PageKind::Standard); } - Rectangle aVisArea = GetVisArea(nAspect); + ::tools::Rectangle aVisArea = GetVisArea(nAspect); pOut->IntersectClipRegion(aVisArea); pView->ShowSdrPage(pSelectedPage); @@ -118,9 +118,9 @@ void DrawDocShell::Draw(OutputDevice* pOut, const JobSetup&, sal_uInt16 nAspect) } } -Rectangle DrawDocShell::GetVisArea(sal_uInt16 nAspect) const +::tools::Rectangle DrawDocShell::GetVisArea(sal_uInt16 nAspect) const { - Rectangle aVisArea; + ::tools::Rectangle aVisArea; if( ( ASPECT_THUMBNAIL == nAspect ) || ( ASPECT_DOCPRINT == nAspect ) ) { @@ -144,7 +144,7 @@ Rectangle DrawDocShell::GetVisArea(sal_uInt16 nAspect) const if (pWin) { - aVisArea = pWin->PixelToLogic(Rectangle(Point(0,0), pWin->GetOutputSizePixel())); + aVisArea = pWin->PixelToLogic(::tools::Rectangle(Point(0,0), pWin->GetOutputSizePixel())); } } @@ -255,7 +255,7 @@ Bitmap DrawDocShell::GetPagePreviewBitmap(SdPage* pPage) pView->SetActiveLayer( pFrameView->GetActiveLayer() ); } - pView->CompleteRedraw( pVDev, vcl::Region(Rectangle(aNullPt, aSize)) ); + pView->CompleteRedraw( pVDev, vcl::Region(::tools::Rectangle(aNullPt, aSize)) ); // IsRedrawReady() always gives sal_True while ( !pView->IsRedrawReady() ) {} delete pView; diff --git a/sd/source/ui/docshell/docshel4.cxx b/sd/source/ui/docshell/docshel4.cxx index 00b7d463329b..0ee9859922cd 100644 --- a/sd/source/ui/docshell/docshel4.cxx +++ b/sd/source/ui/docshell/docshel4.cxx @@ -249,7 +249,7 @@ bool DrawDocShell::InitNew( const css::uno::Reference< css::embed::XStorage >& x { bool bRet = SfxObjectShell::InitNew( xStorage ); - Rectangle aVisArea( Point(0, 0), Size(14100, 10000) ); + ::tools::Rectangle aVisArea( Point(0, 0), Size(14100, 10000) ); SetVisArea(aVisArea); if (bRet) @@ -321,7 +321,7 @@ bool DrawDocShell::Load( SfxMedium& rMedium ) SdPage* pPage = mpDoc->GetSdPage( 0, PageKind::Standard ); if( pPage ) - SetVisArea( Rectangle( pPage->GetAllObjBoundRect() ) ); + SetVisArea( ::tools::Rectangle( pPage->GetAllObjBoundRect() ) ); } FinishedLoading(); @@ -533,7 +533,7 @@ bool DrawDocShell::Save() //TODO/LATER: why this?! if( GetCreateMode() == SfxObjectCreateMode::STANDARD ) - SfxObjectShell::SetVisArea( Rectangle() ); + SfxObjectShell::SetVisArea( ::tools::Rectangle() ); bool bRet = SfxObjectShell::Save(); @@ -583,7 +583,7 @@ bool DrawDocShell::SaveAs( SfxMedium& rMedium ) //TODO/LATER: why this?! if( GetCreateMode() == SfxObjectCreateMode::STANDARD ) - SfxObjectShell::SetVisArea( Rectangle() ); + SfxObjectShell::SetVisArea( ::tools::Rectangle() ); sal_uInt32 nVBWarning = ERRCODE_NONE; bool bRet = SfxObjectShell::SaveAs( rMedium ); diff --git a/sd/source/ui/docshell/sdclient.cxx b/sd/source/ui/docshell/sdclient.cxx index dfe544d35671..68c7dbacb428 100644 --- a/sd/source/ui/docshell/sdclient.cxx +++ b/sd/source/ui/docshell/sdclient.cxx @@ -55,7 +55,7 @@ Client::~Client() * If IP active, then we get this request to increase the visible section of the * object. */ -void Client::RequestNewObjectArea( Rectangle& aObjRect ) +void Client::RequestNewObjectArea( ::tools::Rectangle& aObjRect ) { ::sd::View* pView = mpViewShell->GetView(); @@ -73,14 +73,14 @@ void Client::RequestNewObjectArea( Rectangle& aObjRect ) bPosProtect = pObj->IsMoveProtect(); } - Rectangle aOldRect = GetObjArea(); + ::tools::Rectangle aOldRect = GetObjArea(); if ( bPosProtect ) aObjRect.SetPos( aOldRect.TopLeft() ); if ( bSizeProtect ) aObjRect.SetSize( aOldRect.GetSize() ); - Rectangle aWorkArea( pView->GetWorkArea() ); + ::tools::Rectangle aWorkArea( pView->GetWorkArea() ); if ( !aWorkArea.IsInside(aObjRect) && !bPosProtect && aObjRect != aOldRect ) { // correct position @@ -110,7 +110,7 @@ void Client::ObjectAreaChanged() if(pObj) { // no need to check for changes, this method is called only if the area really changed - Rectangle aNewRectangle(GetScaledObjArea()); + ::tools::Rectangle aNewRectangle(GetScaledObjArea()); // #i118524# if sheared/rotated, center to non-rotated LogicRect pObj->setSuppressSetVisAreaSize(true); @@ -119,7 +119,7 @@ void Client::ObjectAreaChanged() { pObj->SetLogicRect( aNewRectangle ); - const Rectangle& rBoundRect = pObj->GetCurrentBoundRect(); + const ::tools::Rectangle& rBoundRect = pObj->GetCurrentBoundRect(); const Point aDelta(aNewRectangle.Center() - rBoundRect.Center()); aNewRectangle.Move(aDelta.X(), aDelta.Y()); @@ -150,13 +150,13 @@ void Client::ViewChanged() ::sd::View* pView = mpViewShell->GetView(); if (pView) { - Rectangle aLogicRect( pSdrOle2Obj->GetLogicRect() ); + ::tools::Rectangle aLogicRect( pSdrOle2Obj->GetLogicRect() ); Size aLogicSize( aLogicRect.GetWidth(), aLogicRect.GetHeight() ); if( pSdrOle2Obj->IsChart() ) { //charts never should be stretched see #i84323# for example - pSdrOle2Obj->SetLogicRect( Rectangle( aLogicRect.TopLeft(), aLogicSize ) ); + pSdrOle2Obj->SetLogicRect( ::tools::Rectangle( aLogicRect.TopLeft(), aLogicSize ) ); pSdrOle2Obj->BroadcastObjectChange(); return; } @@ -164,7 +164,7 @@ void Client::ViewChanged() // TODO/LEAN: maybe we can do this without requesting the VisualArea? // working with the visual area might need running state, so the object may switch itself to this state MapMode aMap100( MapUnit::Map100thMM ); - Rectangle aVisArea; + ::tools::Rectangle aVisArea; Size aSize = pSdrOle2Obj->GetOrigObjSize( &aMap100 ); aVisArea.SetSize( aSize ); @@ -179,7 +179,7 @@ void Client::ViewChanged() aMap100 ); if( aPixelDiff.Width() || aPixelDiff.Height() ) { - pSdrOle2Obj->SetLogicRect( Rectangle( aLogicRect.TopLeft(), aScaledSize ) ); + pSdrOle2Obj->SetLogicRect( ::tools::Rectangle( aLogicRect.TopLeft(), aScaledSize ) ); pSdrOle2Obj->BroadcastObjectChange(); } else diff --git a/sd/source/ui/func/fucon3d.cxx b/sd/source/ui/func/fucon3d.cxx index 36950090cd20..d26f8fd56531 100644 --- a/sd/source/ui/func/fucon3d.cxx +++ b/sd/source/ui/func/fucon3d.cxx @@ -361,7 +361,7 @@ void FuConstruct3dObject::Activate() FuConstruct::Activate(); } -SdrObject* FuConstruct3dObject::CreateDefaultObject(const sal_uInt16 nID, const Rectangle& rRectangle) +SdrObject* FuConstruct3dObject::CreateDefaultObject(const sal_uInt16 nID, const ::tools::Rectangle& rRectangle) { E3dCompoundObject* p3DObj = ImpCreateBasic3DShape(); @@ -373,7 +373,7 @@ SdrObject* FuConstruct3dObject::CreateDefaultObject(const sal_uInt16 nID, const basegfx::B3DRange aVolume(aObjVol); double fW(aVolume.getWidth()); double fH(aVolume.getHeight()); - Rectangle a3DRect(0, 0, (long)fW, (long)fH); + ::tools::Rectangle a3DRect(0, 0, (long)fW, (long)fH); E3dScene* pScene = new E3dPolyScene(mpView->Get3DDefaultAttributes()); // copied code from E3dView::InitScene @@ -404,7 +404,7 @@ SdrObject* FuConstruct3dObject::CreateDefaultObject(const sal_uInt16 nID, const pScene->SetRectsDirty(); // Take care of restrictions for the rectangle - Rectangle aRect(rRectangle); + ::tools::Rectangle aRect(rRectangle); switch(nID) { diff --git a/sd/source/ui/func/fuconarc.cxx b/sd/source/ui/func/fuconarc.cxx index c71454d82eaa..8860c006b2b7 100644 --- a/sd/source/ui/func/fuconarc.cxx +++ b/sd/source/ui/func/fuconarc.cxx @@ -84,7 +84,7 @@ void FuConstructArc::DoExecute( SfxRequest& rReq ) const SfxUInt32Item* pPhiStart = rReq.GetArg<SfxUInt32Item>(ID_VAL_ANGLESTART); const SfxUInt32Item* pPhiEnd = rReq.GetArg<SfxUInt32Item>(ID_VAL_ANGLEEND); - Rectangle aNewRectangle (pCenterX->GetValue () - pAxisX->GetValue () / 2, + ::tools::Rectangle aNewRectangle (pCenterX->GetValue () - pAxisX->GetValue () / 2, pCenterY->GetValue () - pAxisY->GetValue () / 2, pCenterX->GetValue () + pAxisX->GetValue () / 2, pCenterY->GetValue () + pAxisY->GetValue () / 2); @@ -198,7 +198,7 @@ void FuConstructArc::Activate() FuConstruct::Activate(); } -SdrObject* FuConstructArc::CreateDefaultObject(const sal_uInt16 nID, const Rectangle& rRectangle) +SdrObject* FuConstructArc::CreateDefaultObject(const sal_uInt16 nID, const ::tools::Rectangle& rRectangle) { SdrObject* pObj = SdrObjFactory::MakeNewObject( @@ -209,7 +209,7 @@ SdrObject* FuConstructArc::CreateDefaultObject(const sal_uInt16 nID, const Recta { if( dynamic_cast< const SdrCircObj *>( pObj ) != nullptr) { - Rectangle aRect(rRectangle); + ::tools::Rectangle aRect(rRectangle); if(SID_DRAW_ARC == nID || SID_DRAW_CIRCLEARC == nID || diff --git a/sd/source/ui/func/fuconbez.cxx b/sd/source/ui/func/fuconbez.cxx index a3e09bd49036..18fc19bd1860 100644 --- a/sd/source/ui/func/fuconbez.cxx +++ b/sd/source/ui/func/fuconbez.cxx @@ -284,7 +284,7 @@ void FuConstructBezierPolygon::SetEditMode(sal_uInt16 nMode) rBindings.Invalidate(SID_BEZIER_INSERT); } -SdrObject* FuConstructBezierPolygon::CreateDefaultObject(const sal_uInt16 nID, const Rectangle& rRectangle) +SdrObject* FuConstructBezierPolygon::CreateDefaultObject(const sal_uInt16 nID, const ::tools::Rectangle& rRectangle) { // case SID_DRAW_POLYGON: // case SID_DRAW_POLYGON_NOFILL: diff --git a/sd/source/ui/func/fuconcs.cxx b/sd/source/ui/func/fuconcs.cxx index 208eb37cbd2e..ef7a9e9402b9 100644 --- a/sd/source/ui/func/fuconcs.cxx +++ b/sd/source/ui/func/fuconcs.cxx @@ -236,7 +236,7 @@ const OUString& FuConstructCustomShape::GetShapeType() const return aCustomShape; } -SdrObject* FuConstructCustomShape::CreateDefaultObject(const sal_uInt16, const Rectangle& rRectangle) +SdrObject* FuConstructCustomShape::CreateDefaultObject(const sal_uInt16, const ::tools::Rectangle& rRectangle) { SdrObject* pObj = SdrObjFactory::MakeNewObject( mpView->GetCurrentObjInventor(), mpView->GetCurrentObjIdentifier(), @@ -244,7 +244,7 @@ SdrObject* FuConstructCustomShape::CreateDefaultObject(const sal_uInt16, const R if( pObj ) { - Rectangle aRect( rRectangle ); + ::tools::Rectangle aRect( rRectangle ); if ( doConstructOrthogonal() ) ImpForceQuadratic( aRect ); pObj->SetLogicRect( aRect ); diff --git a/sd/source/ui/func/fuconrec.cxx b/sd/source/ui/func/fuconrec.cxx index ea54683d072f..c35ea41f4857 100644 --- a/sd/source/ui/func/fuconrec.cxx +++ b/sd/source/ui/func/fuconrec.cxx @@ -105,7 +105,7 @@ void FuConstructRectangle::DoExecute( SfxRequest& rReq ) const SfxUInt32Item* pAxisX = rReq.GetArg<SfxUInt32Item>(ID_VAL_AXIS_X); const SfxUInt32Item* pAxisY = rReq.GetArg<SfxUInt32Item>(ID_VAL_AXIS_Y); - Rectangle aNewRectangle (pCenterX->GetValue () - pAxisX->GetValue () / 2, + ::tools::Rectangle aNewRectangle (pCenterX->GetValue () - pAxisX->GetValue () / 2, pCenterY->GetValue () - pAxisY->GetValue () / 2, pCenterX->GetValue () + pAxisX->GetValue () / 2, pCenterY->GetValue () + pAxisY->GetValue () / 2); @@ -123,7 +123,7 @@ void FuConstructRectangle::DoExecute( SfxRequest& rReq ) const SfxUInt32Item* pMouseEndX = rReq.GetArg<SfxUInt32Item>(ID_VAL_MOUSEEND_X); const SfxUInt32Item* pMouseEndY = rReq.GetArg<SfxUInt32Item>(ID_VAL_MOUSEEND_Y); - Rectangle aNewRectangle (pMouseStartX->GetValue (), + ::tools::Rectangle aNewRectangle (pMouseStartX->GetValue (), pMouseStartY->GetValue (), pMouseEndX->GetValue (), pMouseEndY->GetValue ()); @@ -709,7 +709,7 @@ void FuConstructRectangle::SetLineEnds(SfxItemSet& rAttr, SdrObject* pObj) } } -SdrObject* FuConstructRectangle::CreateDefaultObject(const sal_uInt16 nID, const Rectangle& rRectangle) +SdrObject* FuConstructRectangle::CreateDefaultObject(const sal_uInt16 nID, const ::tools::Rectangle& rRectangle) { DBG_ASSERT( (nID != SID_DRAW_FONTWORK) && (nID != SID_DRAW_FONTWORK_VERTICAL ), "FuConstRectangle::CreateDefaultObject can not create Fontwork shapes!" ); @@ -772,7 +772,7 @@ SdrObject* FuConstructRectangle::CreateDefaultObject(const sal_uInt16 nID, const if(pObj) { - Rectangle aRect(rRectangle); + ::tools::Rectangle aRect(rRectangle); if(SID_DRAW_SQUARE == nID || SID_DRAW_SQUARE_NOFILL == nID || diff --git a/sd/source/ui/func/fuconuno.cxx b/sd/source/ui/func/fuconuno.cxx index 75dfd782c90c..84024ff5c4fa 100644 --- a/sd/source/ui/func/fuconuno.cxx +++ b/sd/source/ui/func/fuconuno.cxx @@ -133,7 +133,7 @@ void FuConstructUnoControl::Deactivate() mpWindow->SetPointer( aOldPointer ); } -SdrObject* FuConstructUnoControl::CreateDefaultObject(const sal_uInt16, const Rectangle& rRectangle) +SdrObject* FuConstructUnoControl::CreateDefaultObject(const sal_uInt16, const ::tools::Rectangle& rRectangle) { // case SID_FM_CREATE_CONTROL: diff --git a/sd/source/ui/func/fucopy.cxx b/sd/source/ui/func/fucopy.cxx index 3fb2dc929646..45490d68f8b3 100644 --- a/sd/source/ui/func/fucopy.cxx +++ b/sd/source/ui/func/fucopy.cxx @@ -126,7 +126,7 @@ void FuCopy::DoExecute( SfxRequest& rReq ) } } - Rectangle aRect; + ::tools::Rectangle aRect; sal_Int32 lWidth = 0, lHeight = 0, lSizeX = 0L, lSizeY = 0L, lAngle = 0L; sal_uInt16 nNumber = 0; Color aStartColor, aEndColor; diff --git a/sd/source/ui/func/fudraw.cxx b/sd/source/ui/func/fudraw.cxx index c2929684422e..25b3483b9a24 100644 --- a/sd/source/ui/func/fudraw.cxx +++ b/sd/source/ui/func/fudraw.cxx @@ -285,7 +285,7 @@ bool FuDraw::MouseButtonUp(const MouseEvent& rMEvt) if ( bDragHelpLine ) { - Rectangle aOutputArea(Point(0,0), mpWindow->GetOutputSizePixel()); + ::tools::Rectangle aOutputArea(Point(0,0), mpWindow->GetOutputSizePixel()); if (mpView && !aOutputArea.IsInside(rMEvt.GetPosPixel())) mpView->GetSdrPageView()->DeleteHelpLine(nHelpLine); @@ -917,8 +917,8 @@ bool FuDraw::SetHelpText(SdrObject* pObj, const Point& rPosPixel, const SdrViewE if (!aHelpText.isEmpty()) { bSet = true; - Rectangle aLogicPix = mpWindow->LogicToPixel(pObj->GetLogicRect()); - Rectangle aScreenRect(mpWindow->OutputToScreenPixel(aLogicPix.TopLeft()), + ::tools::Rectangle aLogicPix = mpWindow->LogicToPixel(pObj->GetLogicRect()); + ::tools::Rectangle aScreenRect(mpWindow->OutputToScreenPixel(aLogicPix.TopLeft()), mpWindow->OutputToScreenPixel(aLogicPix.BottomRight())); if (Help::IsBalloonHelpEnabled()) diff --git a/sd/source/ui/func/fuediglu.cxx b/sd/source/ui/func/fuediglu.cxx index f757691a03be..bf7a577a7202 100644 --- a/sd/source/ui/func/fuediglu.cxx +++ b/sd/source/ui/func/fuediglu.cxx @@ -302,7 +302,7 @@ bool FuEditGluePoints::KeyInput(const KeyEvent& rKEvt) nY = 0; } Point centerPoint; - Rectangle rect = mpView->GetMarkedObjRect(); + ::tools::Rectangle rect = mpView->GetMarkedObjRect(); centerPoint = mpWindow->LogicToPixel(rect.Center()); Point aPoint = bBeginInsertPoint? oldPoint:centerPoint; Point ePoint = aPoint + Point(nX,nY); diff --git a/sd/source/ui/func/fuinsert.cxx b/sd/source/ui/func/fuinsert.cxx index f91f0663ff81..5eb0ae16e9ff 100644 --- a/sd/source/ui/func/fuinsert.cxx +++ b/sd/source/ui/func/fuinsert.cxx @@ -174,10 +174,10 @@ void FuInsertGraphic::DoExecute( SfxRequest& rReq ) Point aPos; // For LOK, set position to center of the page if (comphelper::LibreOfficeKit::isActive()) - aPos = Rectangle(aPos, mpView->GetSdrPageView()->GetPage()->GetSize()).Center(); + aPos = ::tools::Rectangle(aPos, mpView->GetSdrPageView()->GetPage()->GetSize()).Center(); else { - Rectangle aRect(aPos, mpWindow->GetOutputSizePixel() ); + ::tools::Rectangle aRect(aPos, mpWindow->GetOutputSizePixel() ); aPos = aRect.Center(); bool bMapModeWasEnabled(mpWindow->IsMapModeEnabled()); mpWindow->EnableMapMode(/*true*/); @@ -264,7 +264,7 @@ void FuInsertClipboard::DoExecute( SfxRequest& ) DrawViewShell* pDrViewSh = nullptr; if (!mpView->InsertData( aDataHelper, - mpWindow->PixelToLogic( Rectangle( Point(), mpWindow->GetOutputSizePixel() ).Center() ), + mpWindow->PixelToLogic( ::tools::Rectangle( Point(), mpWindow->GetOutputSizePixel() ).Center() ), nAction, false, nFormatId )) { pDrViewSh = dynamic_cast<DrawViewShell*>(mpViewShell); @@ -342,7 +342,7 @@ void FuInsertOLE::DoExecute( SfxRequest& rReq ) MapUnit aUnit = VCLUnoHelper::UnoEmbed2VCLMapUnit( xObj->getMapUnit( nAspect ) ); - Rectangle aRect; + ::tools::Rectangle aRect; if( pPickObj ) { aRect = pPickObj->GetLogicRect(); @@ -382,12 +382,12 @@ void FuInsertOLE::DoExecute( SfxRequest& rReq ) } Point aPos; - Rectangle aWinRect(aPos, mpWindow->GetOutputSizePixel() ); + ::tools::Rectangle aWinRect(aPos, mpWindow->GetOutputSizePixel() ); aPos = aWinRect.Center(); aPos = mpWindow->PixelToLogic(aPos); aPos.X() -= aSize.Width() / 2; aPos.Y() -= aSize.Height() / 2; - aRect = Rectangle(aPos, aSize); + aRect = ::tools::Rectangle(aPos, aSize); } SdrOle2Obj* pOleObj = new SdrOle2Obj( svt::EmbeddedObjectRef( xObj, nAspect ), aObjName, aRect ); @@ -585,7 +585,7 @@ void FuInsertOLE::DoExecute( SfxRequest& rReq ) static_cast<SdrOle2Obj*>(pObj)->SetPersistName(aName); static_cast<SdrOle2Obj*>(pObj)->SetName(aName); static_cast<SdrOle2Obj*>(pObj)->SetAspect(nAspect); - Rectangle aRect = static_cast<SdrOle2Obj*>(pObj)->GetLogicRect(); + ::tools::Rectangle aRect = static_cast<SdrOle2Obj*>(pObj)->GetLogicRect(); if ( nAspect == embed::Aspects::MSOLE_ICON ) { @@ -620,7 +620,7 @@ void FuInsertOLE::DoExecute( SfxRequest& rReq ) Point aPnt ((aPageSize.Width() - aSize.Width()) / 2, (aPageSize.Height() - aSize.Height()) / 2); - Rectangle aRect (aPnt, aSize); + ::tools::Rectangle aRect (aPnt, aSize); SdrOle2Obj* pObj = new SdrOle2Obj( aObjRef, aName, aRect); @@ -663,7 +663,7 @@ void FuInsertOLE::DoExecute( SfxRequest& rReq ) } Size aVisSizePixel = mpWindow->GetOutputSizePixel(); - Rectangle aVisAreaWin = mpWindow->PixelToLogic( Rectangle( Point(0,0), aVisSizePixel) ); + ::tools::Rectangle aVisAreaWin = mpWindow->PixelToLogic( ::tools::Rectangle( Point(0,0), aVisSizePixel) ); mpViewShell->VisAreaChanged(aVisAreaWin); mpDocSh->SetVisArea(aVisAreaWin); } @@ -747,7 +747,7 @@ void FuInsertAVMedia::DoExecute( SfxRequest& rReq ) if( mpWindow ) { - aPos = mpWindow->PixelToLogic( Rectangle( aPos, mpWindow->GetOutputSizePixel() ).Center() ); + aPos = mpWindow->PixelToLogic( ::tools::Rectangle( aPos, mpWindow->GetOutputSizePixel() ).Center() ); aPos.X() -= aSize.Width() >> 1; aPos.Y() -= aSize.Height() >> 1; } @@ -823,7 +823,7 @@ void FuInsert3DModel::DoExecute( SfxRequest& ) if( mpWindow ) { - aPos = mpWindow->PixelToLogic( Rectangle( aPos, mpWindow->GetOutputSizePixel() ).Center() ); + aPos = mpWindow->PixelToLogic( ::tools::Rectangle( aPos, mpWindow->GetOutputSizePixel() ).Center() ); aPos.X() -= aSize.Width() >> 1; aPos.Y() -= aSize.Height() >> 1; } diff --git a/sd/source/ui/func/fuinsfil.cxx b/sd/source/ui/func/fuinsfil.cxx index d200cc894a75..d2228597d673 100644 --- a/sd/source/ui/func/fuinsfil.cxx +++ b/sd/source/ui/func/fuinsfil.cxx @@ -527,7 +527,7 @@ void FuInsertFile::InsTextOrRTFinDrMode(SfxMedium* pMedium) aPos.Y() -= aSize.Height() / 2; aSize = mpWindow->PixelToLogic(aSize); aPos = mpWindow->PixelToLogic(aPos); - pTO->SetLogicRect(Rectangle(aPos, aSize)); + pTO->SetLogicRect(::tools::Rectangle(aPos, aSize)); if (pDlg->IsLink()) { diff --git a/sd/source/ui/func/fuoaprms.cxx b/sd/source/ui/func/fuoaprms.cxx index eb7cfae7535a..06486761bb2d 100644 --- a/sd/source/ui/func/fuoaprms.cxx +++ b/sd/source/ui/func/fuoaprms.cxx @@ -660,7 +660,7 @@ void FuObjectAnimationParameters::DoExecute( SfxRequest& rReq ) // push the running object to the end of the curve if (pRunningObj) { - Rectangle aCurRect(pRunningObj->GetLogicRect()); + ::tools::Rectangle aCurRect(pRunningObj->GetLogicRect()); Point aCurCenter(aCurRect.Center()); const ::basegfx::B2DPolyPolygon& rPolyPolygon = pPath->GetPathPoly(); sal_uInt32 nNoOfPolygons(rPolyPolygon.count()); diff --git a/sd/source/ui/func/fupoor.cxx b/sd/source/ui/func/fupoor.cxx index 4e11571eac0b..2771a542fe6e 100644 --- a/sd/source/ui/func/fupoor.cxx +++ b/sd/source/ui/func/fupoor.cxx @@ -142,7 +142,7 @@ void FuPoor::ForceScroll(const Point& aPixPos) !SlideShow::IsRunning( mpViewShell->GetViewShellBase() ) ) { Point aPos = mpWindow->OutputToScreenPixel(aPixPos); - const Rectangle& rRect = mpViewShell->GetAllWindowRect(); + const ::tools::Rectangle& rRect = mpViewShell->GetAllWindowRect(); if ( bNoScrollUntilInside ) { @@ -296,7 +296,7 @@ bool FuPoor::KeyInput(const KeyEvent& rKEvt) if(pHdl) { Point aHdlPosition(pHdl->GetPos()); - Rectangle aVisRect(aHdlPosition - Point(100, 100), Size(200, 200)); + ::tools::Rectangle aVisRect(aHdlPosition - Point(100, 100), Size(200, 200)); mpView->MakeVisible(aVisRect, *mpWindow); } @@ -692,11 +692,11 @@ bool FuPoor::KeyInput(const KeyEvent& rKEvt) if(mpView->IsMoveAllowed()) { // restrict movement to WorkArea - const Rectangle& rWorkArea = mpView->GetWorkArea(); + const ::tools::Rectangle& rWorkArea = mpView->GetWorkArea(); if(!rWorkArea.IsEmpty()) { - Rectangle aMarkRect(mpView->GetMarkedObjRect()); + ::tools::Rectangle aMarkRect(mpView->GetMarkedObjRect()); aMarkRect.Move(nX, nY); if(!aMarkRect.IsInside(rWorkArea)) @@ -767,7 +767,7 @@ bool FuPoor::KeyInput(const KeyEvent& rKEvt) } // make moved handle visible - Rectangle aVisRect(aEndPoint - Point(100, 100), Size(200, 200)); + ::tools::Rectangle aVisRect(aEndPoint - Point(100, 100), Size(200, 200)); mpView->MakeVisible(aVisRect, *mpWindow); } } @@ -939,7 +939,7 @@ void FuPoor::DoPasteUnformatted() if (aDataHelper.GetTransferable().is()) { mpView->InsertData( aDataHelper, - mpWindow->PixelToLogic( Rectangle( Point(), mpWindow->GetOutputSizePixel() ).Center() ), + mpWindow->PixelToLogic( ::tools::Rectangle( Point(), mpWindow->GetOutputSizePixel() ).Center() ), nAction, false, SotClipboardFormatId::STRING); } } @@ -1046,23 +1046,23 @@ void FuPoor::ReceiveRequest(SfxRequest& rReq) } } -SdrObject* FuPoor::CreateDefaultObject(const sal_uInt16, const Rectangle& ) +SdrObject* FuPoor::CreateDefaultObject(const sal_uInt16, const ::tools::Rectangle& ) { // empty base implementation return nullptr; } -void FuPoor::ImpForceQuadratic(Rectangle& rRect) +void FuPoor::ImpForceQuadratic(::tools::Rectangle& rRect) { if(rRect.GetWidth() > rRect.GetHeight()) { - rRect = Rectangle( + rRect = ::tools::Rectangle( Point(rRect.Left() + ((rRect.GetWidth() - rRect.GetHeight()) / 2), rRect.Top()), Size(rRect.GetHeight(), rRect.GetHeight())); } else { - rRect = Rectangle( + rRect = ::tools::Rectangle( Point(rRect.Left(), rRect.Top() + ((rRect.GetHeight() - rRect.GetWidth()) / 2)), Size(rRect.GetWidth(), rRect.GetWidth())); } diff --git a/sd/source/ui/func/fusel.cxx b/sd/source/ui/func/fusel.cxx index d963bddc9ba5..f17998f58024 100644 --- a/sd/source/ui/func/fusel.cxx +++ b/sd/source/ui/func/fusel.cxx @@ -955,7 +955,7 @@ bool FuSelection::KeyInput(const KeyEvent& rKEvt) } Point centerPoint; - Rectangle rect = mpView->GetMarkedObjRect(); + ::tools::Rectangle rect = mpView->GetMarkedObjRect(); centerPoint = mpWindow->LogicToPixel(rect.Center()); Point aPoint = bMovedToCenterPoint? oldPoint:centerPoint; Point ePoint = aPoint + Point(nX,nY); diff --git a/sd/source/ui/func/futext.cxx b/sd/source/ui/func/futext.cxx index 3ff37ad8d469..9f1f57a02df2 100644 --- a/sd/source/ui/func/futext.cxx +++ b/sd/source/ui/func/futext.cxx @@ -1192,8 +1192,8 @@ bool FuText::RequestHelp(const HelpEvent& rHEvt) } if (!aHelpText.isEmpty()) { - Rectangle aLogicPix = mpWindow->LogicToPixel(mxTextObj->GetLogicRect()); - Rectangle aScreenRect(mpWindow->OutputToScreenPixel(aLogicPix.TopLeft()), + ::tools::Rectangle aLogicPix = mpWindow->LogicToPixel(mxTextObj->GetLogicRect()); + ::tools::Rectangle aScreenRect(mpWindow->OutputToScreenPixel(aLogicPix.TopLeft()), mpWindow->OutputToScreenPixel(aLogicPix.BottomRight())); if (Help::IsBalloonHelpEnabled()) @@ -1291,7 +1291,7 @@ void FuText::DoubleClick(const MouseEvent& ) /** Removed the insertion of default text and putting a new text object directly into edit mode. */ -SdrObject* FuText::CreateDefaultObject(const sal_uInt16 nID, const Rectangle& rRectangle) +SdrObject* FuText::CreateDefaultObject(const sal_uInt16 nID, const ::tools::Rectangle& rRectangle) { SdrObject* pObj = SdrObjFactory::MakeNewObject( diff --git a/sd/source/ui/func/fuzoom.cxx b/sd/source/ui/func/fuzoom.cxx index 1cac3823f11c..ae11778b3634 100644 --- a/sd/source/ui/func/fuzoom.cxx +++ b/sd/source/ui/func/fuzoom.cxx @@ -125,7 +125,7 @@ bool FuZoom::MouseMove(const MouseEvent& rMEvt) } else { - Rectangle aRect(aBeginPos, aEndPos); + ::tools::Rectangle aRect(aBeginPos, aEndPos); aZoomRect = aRect; aZoomRect.Justify(); mpViewShell->DrawMarkRect(aZoomRect); @@ -181,7 +181,7 @@ bool FuZoom::MouseButtonUp(const MouseEvent& rMEvt) mpViewShell->GetViewFrame()->GetBindings().Invalidate( SidArrayZoom ); } - Rectangle aVisAreaWin = mpWindow->PixelToLogic(Rectangle(Point(0,0), + ::tools::Rectangle aVisAreaWin = mpWindow->PixelToLogic(::tools::Rectangle(Point(0,0), mpWindow->GetOutputSizePixel())); mpViewShell->GetZoomList()->InsertZoomRect(aVisAreaWin); diff --git a/sd/source/ui/func/smarttag.cxx b/sd/source/ui/func/smarttag.cxx index 0ee180765a9b..02e8ef121c3f 100644 --- a/sd/source/ui/func/smarttag.cxx +++ b/sd/source/ui/func/smarttag.cxx @@ -100,7 +100,7 @@ bool SmartTag::MarkPoint(SdrHdl& /*rHdl*/, bool /*bUnmark*/ ) return false; } -bool SmartTag::MarkPoints(const Rectangle* /*pRect*/, bool /*bUnmark*/ ) +bool SmartTag::MarkPoints(const ::tools::Rectangle* /*pRect*/, bool /*bUnmark*/ ) { return false; } @@ -335,7 +335,7 @@ bool SmartTagSet::MarkPoint(SdrHdl& rHdl, bool bUnmark ) return false; } -bool SmartTagSet::MarkPoints(const Rectangle* pRect, bool bUnmark) +bool SmartTagSet::MarkPoints(const ::tools::Rectangle* pRect, bool bUnmark) { if( mxSelectedTag.is() ) return mxSelectedTag->MarkPoints( pRect, bUnmark ); diff --git a/sd/source/ui/func/undopage.cxx b/sd/source/ui/func/undopage.cxx index 571dac181e70..81eb81f77ce7 100644 --- a/sd/source/ui/func/undopage.cxx +++ b/sd/source/ui/func/undopage.cxx @@ -36,7 +36,7 @@ SdPageFormatUndoAction::~SdPageFormatUndoAction() void SdPageFormatUndoAction::Undo() { - Rectangle aOldBorderRect(mnOldLeft, mnOldUpper, mnOldRight, mnOldLower); + ::tools::Rectangle aOldBorderRect(mnOldLeft, mnOldUpper, mnOldRight, mnOldLower); mpPage->ScaleObjects(maOldSize, aOldBorderRect, mbNewScale); mpPage->SetSize(maOldSize); mpPage->SetLftBorder(mnOldLeft); @@ -54,7 +54,7 @@ void SdPageFormatUndoAction::Undo() void SdPageFormatUndoAction::Redo() { - Rectangle aNewBorderRect(mnNewLeft, mnNewUpper, mnNewRight, mnNewLower); + ::tools::Rectangle aNewBorderRect(mnNewLeft, mnNewUpper, mnNewRight, mnNewLower); mpPage->ScaleObjects(maNewSize, aNewBorderRect, mbNewScale); mpPage->SetSize(maNewSize); mpPage->SetLftBorder(mnNewLeft); diff --git a/sd/source/ui/inc/AccessibleOutlineEditSource.hxx b/sd/source/ui/inc/AccessibleOutlineEditSource.hxx index a4afdc8a21f8..48af77ca7015 100644 --- a/sd/source/ui/inc/AccessibleOutlineEditSource.hxx +++ b/sd/source/ui/inc/AccessibleOutlineEditSource.hxx @@ -65,7 +65,7 @@ namespace accessibility // the view forwarder 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/sd/source/ui/inc/AccessibleViewForwarder.hxx b/sd/source/ui/inc/AccessibleViewForwarder.hxx index 552ec61b9db2..de378a61670b 100644 --- a/sd/source/ui/inc/AccessibleViewForwarder.hxx +++ b/sd/source/ui/inc/AccessibleViewForwarder.hxx @@ -56,7 +56,7 @@ public: @return The rectangle of the visible part of the document. */ - virtual Rectangle GetVisibleArea() const override; + virtual ::tools::Rectangle GetVisibleArea() const override; /** Transform the specified point from internal coordinates to an absolute screen position. diff --git a/sd/source/ui/inc/Client.hxx b/sd/source/ui/inc/Client.hxx index 046d8165c761..65a058966d79 100644 --- a/sd/source/ui/inc/Client.hxx +++ b/sd/source/ui/inc/Client.hxx @@ -36,7 +36,7 @@ class Client : public SfxInPlaceClient SdrGrafObj* pSdrGrafObj; virtual void ObjectAreaChanged() override; - virtual void RequestNewObjectArea( Rectangle& ) override; + virtual void RequestNewObjectArea( ::tools::Rectangle& ) override; virtual void ViewChanged() override; public: diff --git a/sd/source/ui/inc/ClientView.hxx b/sd/source/ui/inc/ClientView.hxx index fd7430ac18b0..1f6a720907a9 100644 --- a/sd/source/ui/inc/ClientView.hxx +++ b/sd/source/ui/inc/ClientView.hxx @@ -41,7 +41,7 @@ public: /* if the view should not do a Invalidate() on the windows, you have to override the following two methods and do something different */ virtual void InvalidateOneWin(vcl::Window& rWin) override; - virtual void InvalidateOneWin(vcl::Window& rWin, const Rectangle& rRect) override; + virtual void InvalidateOneWin(vcl::Window& rWin, const ::tools::Rectangle& rRect) override; }; } // end of namespace sd diff --git a/sd/source/ui/inc/DrawController.hxx b/sd/source/ui/inc/DrawController.hxx index d8e203478df2..98d932e47e1f 100644 --- a/sd/source/ui/inc/DrawController.hxx +++ b/sd/source/ui/inc/DrawController.hxx @@ -116,7 +116,7 @@ public: /** Call this method when the VisArea has changed. */ - void FireVisAreaChanged (const Rectangle& rVisArea) throw(); + void FireVisAreaChanged (const ::tools::Rectangle& rVisArea) throw(); /** Call this method when the selection has changed. */ @@ -288,7 +288,7 @@ private: */ ViewShellBase* mpBase; - Rectangle maLastVisArea; + ::tools::Rectangle maLastVisArea; ::tools::WeakReference<SdrPage> mpCurrentPage; bool mbMasterPageMode; bool mbLayerMode; diff --git a/sd/source/ui/inc/DrawDocShell.hxx b/sd/source/ui/inc/DrawDocShell.hxx index ccb139532641..a4e3deeb5901 100644 --- a/sd/source/ui/inc/DrawDocShell.hxx +++ b/sd/source/ui/inc/DrawDocShell.hxx @@ -91,7 +91,7 @@ public: virtual bool LoadFrom( SfxMedium& rMedium ) override; virtual bool SaveAs( SfxMedium &rMedium ) override; - virtual Rectangle GetVisArea(sal_uInt16 nAspect) const override; + virtual ::tools::Rectangle GetVisArea(sal_uInt16 nAspect) const override; virtual void Draw(OutputDevice*, const JobSetup& rSetup, sal_uInt16 nAspect = ASPECT_CONTENT) override; virtual ::svl::IUndoManager* GetUndoManager() override; diff --git a/sd/source/ui/inc/DrawViewShell.hxx b/sd/source/ui/inc/DrawViewShell.hxx index fbb33d1a0321..4dcffc6ab340 100644 --- a/sd/source/ui/inc/DrawViewShell.hxx +++ b/sd/source/ui/inc/DrawViewShell.hxx @@ -100,7 +100,7 @@ public: virtual void Shutdown() override; void PrePaint() override; - virtual void Paint(const Rectangle& rRect, ::sd::Window* pWin) override; + virtual void Paint(const ::tools::Rectangle& rRect, ::sd::Window* pWin) override; /** Arrange and resize the GUI elements like rulers, sliders, and buttons as well as the actual document view according to the size of @@ -119,12 +119,12 @@ public: virtual void Resize() override; - void ShowMousePosInfo(const Rectangle& rRect, ::sd::Window* pWin); + void ShowMousePosInfo(const ::tools::Rectangle& rRect, ::sd::Window* pWin); virtual void ChangeEditMode (EditMode eMode, bool bIsLayerModeActive); virtual void SetZoom( long nZoom ) override; - virtual void SetZoomRect( const Rectangle& rZoomRect ) override; + virtual void SetZoomRect( const ::tools::Rectangle& rZoomRect ) override; void InsertURLField(const OUString& rURL, const OUString& rText, const OUString& rTarget); void InsertURLButton(const OUString& rURL, const OUString& rText, const OUString& rTarget, @@ -250,7 +250,7 @@ public: //false. void FreshNavigatrEntry(); void FreshNavigatrTree(); - void MakeVisible(const Rectangle& rRect, vcl::Window& rWin); + void MakeVisible(const ::tools::Rectangle& rRect, vcl::Window& rWin); virtual void ReadFrameViewData(FrameView* pView) override; virtual void WriteFrameViewData() override; @@ -289,7 +289,7 @@ public: virtual void WriteUserDataSequence ( css::uno::Sequence < css::beans::PropertyValue >&, bool bBrowse ) override; virtual void ReadUserDataSequence ( const css::uno::Sequence < css::beans::PropertyValue >&, bool bBrowse ) override; - virtual void VisAreaChanged(const Rectangle& rRect) override; + virtual void VisAreaChanged(const ::tools::Rectangle& rRect) override; /** Create an accessible object representing the specified window. @param pWindow @@ -370,7 +370,7 @@ public: protected: DrawView* mpDrawView; SdPage* mpActualPage; - Rectangle maMarkRect; + ::tools::Rectangle maMarkRect; Point maMousePos; bool mbMousePosFreezed; VclPtr<TabControl> maTabControl; diff --git a/sd/source/ui/inc/FrameView.hxx b/sd/source/ui/inc/FrameView.hxx index 8603b1ec7298..15950ba61fe4 100644 --- a/sd/source/ui/inc/FrameView.hxx +++ b/sd/source/ui/inc/FrameView.hxx @@ -79,9 +79,9 @@ public: { mbNoAttribs = bNoAttr; } bool IsNoAttribs() const { return mbNoAttribs; } - void SetVisArea(const Rectangle& rVisArea) + void SetVisArea(const ::tools::Rectangle& rVisArea) { maVisArea = rVisArea; } - const Rectangle& GetVisArea() { return maVisArea; } + const ::tools::Rectangle& GetVisArea() { return maVisArea; } void SetPageKind(PageKind eKind) { mePageKind = eKind; } PageKind GetPageKind() const { return mePageKind; } @@ -179,7 +179,7 @@ private: SdrHelpLineList maHandoutHelpLines; bool mbNoColors; ///< structuring mode bool mbNoAttribs; ///< structuring mode - Rectangle maVisArea; ///< visible area + ::tools::Rectangle maVisArea; ///< visible area PageKind mePageKind; ///< kind of page (standard, notes, handout) sal_uInt16 mnSelectedPage; PageKind mePageKindOnLoad; diff --git a/sd/source/ui/inc/OutlineView.hxx b/sd/source/ui/inc/OutlineView.hxx index 75e5282a04cd..a4d513422390 100644 --- a/sd/source/ui/inc/OutlineView.hxx +++ b/sd/source/ui/inc/OutlineView.hxx @@ -92,7 +92,7 @@ public: /** selects the paragraph for the given page at the outliner view*/ void SetActualPage( SdPage* pActual ); - void Paint (const Rectangle& rRect, ::sd::Window* pWin); + void Paint (const ::tools::Rectangle& rRect, ::sd::Window* pWin); // Callbacks fuer LINKs DECL_LINK( ParagraphInsertedHdl, ::Outliner::ParagraphHdlParam, void ); diff --git a/sd/source/ui/inc/OutlineViewShell.hxx b/sd/source/ui/inc/OutlineViewShell.hxx index 5f46db658ee6..dc79fc1739e7 100644 --- a/sd/source/ui/inc/OutlineViewShell.hxx +++ b/sd/source/ui/inc/OutlineViewShell.hxx @@ -62,7 +62,7 @@ public: virtual void Shutdown() override; - virtual void Paint(const Rectangle& rRect, ::sd::Window* pWin) override; + virtual void Paint(const ::tools::Rectangle& rRect, ::sd::Window* pWin) override; /** Arrange and resize the GUI elements like rulers, sliders, and buttons as well as the actual document view according to the size of @@ -100,7 +100,7 @@ public: void FuSupport(SfxRequest &rReq); virtual void SetZoom(long nZoom) override; - virtual void SetZoomRect(const Rectangle& rZoomRect) override; + virtual void SetZoomRect(const ::tools::Rectangle& rZoomRect) override; void Execute(SfxRequest& rReq); @@ -117,7 +117,7 @@ public: virtual void ReadUserDataSequence ( const css::uno::Sequence < css::beans::PropertyValue >&, bool bBrowse ) override; /** this method is called when the visible area of the view from this viewshell is changed */ - virtual void VisAreaChanged(const Rectangle& rRect) override; + virtual void VisAreaChanged(const ::tools::Rectangle& rRect) override; /** Create an accessible object representing the specified window. @param pWindow diff --git a/sd/source/ui/inc/PresentationViewShell.hxx b/sd/source/ui/inc/PresentationViewShell.hxx index f5dfc5090dc7..6a4f33e28ebe 100644 --- a/sd/source/ui/inc/PresentationViewShell.hxx +++ b/sd/source/ui/inc/PresentationViewShell.hxx @@ -57,10 +57,10 @@ protected: virtual VclPtr<SvxRuler> CreateVRuler(::sd::Window* pWin) override; private: - Rectangle maOldVisArea; + ::tools::Rectangle maOldVisArea; virtual void Activate (bool bIsMDIActivate) override; - virtual void Paint (const Rectangle& rRect, ::sd::Window* pWin) override; + virtual void Paint (const ::tools::Rectangle& rRect, ::sd::Window* pWin) override; }; } // end of namespace sd diff --git a/sd/source/ui/inc/SlideSorter.hxx b/sd/source/ui/inc/SlideSorter.hxx index 0c7dd9554861..87f01e25df8f 100644 --- a/sd/source/ui/inc/SlideSorter.hxx +++ b/sd/source/ui/inc/SlideSorter.hxx @@ -160,7 +160,7 @@ public: */ ViewShellBase* GetViewShellBase() const { return mpViewShellBase;} - void Paint (const Rectangle& rRepaintArea); + void Paint (const ::tools::Rectangle& rRepaintArea); /** Place and size the controls and windows. You may want to call this method when something has changed that for instance affects the diff --git a/sd/source/ui/inc/SlideSorterViewShell.hxx b/sd/source/ui/inc/SlideSorterViewShell.hxx index ae6be10dfbf9..c29b295bfb16 100644 --- a/sd/source/ui/inc/SlideSorterViewShell.hxx +++ b/sd/source/ui/inc/SlideSorterViewShell.hxx @@ -100,12 +100,12 @@ public: factor. */ virtual void SetZoom (long int nZoom) override; - virtual void SetZoomRect (const Rectangle& rZoomRect) override; + virtual void SetZoomRect (const ::tools::Rectangle& rZoomRect) override; /** This is a callback method used by the active window to delegate its Paint() call to. This view shell itself delegates it to the view. */ - virtual void Paint(const Rectangle& rRect, ::sd::Window* pWin) override; + virtual void Paint(const ::tools::Rectangle& rRect, ::sd::Window* pWin) override; /** Place and size the controls and windows. You may want to call this method when something has changed that for instance affects the diff --git a/sd/source/ui/inc/View.hxx b/sd/source/ui/inc/View.hxx index 20c8798fafc6..c179236b97a6 100644 --- a/sd/source/ui/inc/View.hxx +++ b/sd/source/ui/inc/View.hxx @@ -193,7 +193,7 @@ public: virtual bool IsPointMarkable(const SdrHdl& rHdl) const override; virtual bool MarkPoint(SdrHdl& rHdl, bool bUnmark=false) override; virtual void CheckPossibilities() override; - virtual bool MarkPoints(const ::Rectangle* pRect, bool bUnmark) override; + virtual bool MarkPoints(const ::tools::Rectangle* pRect, bool bUnmark) override; using SdrMarkView::MarkPoints; bool ShouldToggleOn( diff --git a/sd/source/ui/inc/ViewShell.hxx b/sd/source/ui/inc/ViewShell.hxx index 3d4dc90cfe67..74ec3b0e6c99 100644 --- a/sd/source/ui/inc/ViewShell.hxx +++ b/sd/source/ui/inc/ViewShell.hxx @@ -170,11 +170,11 @@ public: The rectangle is returned in screen coordinates, i.e. pixel values relative to the upper left corner of the screen?. */ - const Rectangle& GetAllWindowRect(); + const ::tools::Rectangle& GetAllWindowRect(); // Mouse- & Key-Events virtual void PrePaint(); - virtual void Paint (const Rectangle& rRect, ::sd::Window* pWin); + virtual void Paint (const ::tools::Rectangle& rRect, ::sd::Window* pWin); virtual bool KeyInput(const KeyEvent& rKEvt, ::sd::Window* pWin); virtual void MouseMove(const MouseEvent& rMEvt, ::sd::Window* pWin); virtual void MouseButtonUp(const MouseEvent& rMEvt, ::sd::Window* pWin); @@ -202,7 +202,7 @@ public: void ScrollLines(long nX, long nY); virtual void SetZoom(long nZoom); long GetZoom() const; - virtual void SetZoomRect(const Rectangle& rZoomRect); + virtual void SetZoomRect(const ::tools::Rectangle& rZoomRect); void InitWindows(const Point& rViewOrigin, const Size& rViewSize, const Point& rWinPos, bool bUpdate = false); void InvalidateWindows(); @@ -212,7 +212,7 @@ public: */ virtual void UpdatePreview (SdPage* pPage, bool bInit = false); - void DrawMarkRect(const Rectangle& rRect) const; + void DrawMarkRect(const ::tools::Rectangle& rRect) const; void ExecReq( SfxRequest &rReq ); @@ -282,7 +282,7 @@ public: virtual void ReadUserDataSequence ( const css::uno::Sequence < css::beans::PropertyValue >&, bool bBrowse ); /** this method is called when the visible area of the view from this viewshell is changed */ - virtual void VisAreaChanged(const Rectangle& rRect); + virtual void VisAreaChanged(const ::tools::Rectangle& rRect); /** Create an accessible object representing the specified window. Override this method to provide view mode specific objects. The @@ -492,7 +492,7 @@ protected: GetAllWindowRectangle() into screen coordinates (relative to the upper left corner of the screen. */ - Rectangle maAllWindowRectangle; + ::tools::Rectangle maAllWindowRectangle; /// The type of the shell. Returned by GetShellType(). ShellType meShellType; diff --git a/sd/source/ui/inc/ViewShellBase.hxx b/sd/source/ui/inc/ViewShellBase.hxx index 65e481ec0fdc..22a4ab501001 100644 --- a/sd/source/ui/inc/ViewShellBase.hxx +++ b/sd/source/ui/inc/ViewShellBase.hxx @@ -199,7 +199,7 @@ public: /** returns the complete area of the current view relative to the frame window */ - const Rectangle& getClientRectangle() const; + const ::tools::Rectangle& getClientRectangle() const; std::shared_ptr<ToolBarManager> GetToolBarManager() const; std::shared_ptr<FormShellManager> GetFormShellManager() const; diff --git a/sd/source/ui/inc/Window.hxx b/sd/source/ui/inc/Window.hxx index 5c3e08a9a4a6..a2658b72406c 100644 --- a/sd/source/ui/inc/Window.hxx +++ b/sd/source/ui/inc/Window.hxx @@ -83,9 +83,9 @@ public: @return The new zoom factor is returned as integral percent value. */ - long SetZoomRect (const Rectangle& rZoomRect); + long SetZoomRect (const ::tools::Rectangle& rZoomRect); - long GetZoomForRect( const Rectangle& rZoomRect ); + long GetZoomForRect( const ::tools::Rectangle& rZoomRect ); void SetMinZoomAutoCalc (bool bAuto); @@ -170,7 +170,7 @@ protected: virtual void Resize() override; virtual void PrePaint(vcl::RenderContext& rRenderContext) 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 MouseButtonUp(const MouseEvent& rMEvt) override; virtual void MouseButtonDown(const MouseEvent& rMEvt) override; @@ -191,7 +191,7 @@ protected: OUString GetSurroundingText() const override; Selection GetSurroundingTextSelection() const override; /// @see OutputDevice::LogicInvalidate(). - void LogicInvalidate(const Rectangle* pRectangle) override; + void LogicInvalidate(const ::tools::Rectangle* pRectangle) override; FactoryFunction GetUITestFactory() const override; }; diff --git a/sd/source/ui/inc/animobjs.hxx b/sd/source/ui/inc/animobjs.hxx index 31bd6396eda4..6a5876067371 100644 --- a/sd/source/ui/inc/animobjs.hxx +++ b/sd/source/ui/inc/animobjs.hxx @@ -67,7 +67,7 @@ public: SdDisplay(vcl::Window* pWin); virtual ~SdDisplay() override; - virtual void Paint( vcl::RenderContext& rRenderContext, const Rectangle& rRect ) override; + virtual void Paint( vcl::RenderContext& rRenderContext, const ::tools::Rectangle& rRect ) override; void SetBitmapEx( BitmapEx* pBmpEx ); void SetScale( const Fraction& rFrac ); diff --git a/sd/source/ui/inc/docprev.hxx b/sd/source/ui/inc/docprev.hxx index 51f55abc8631..42e329adac1b 100644 --- a/sd/source/ui/inc/docprev.hxx +++ b/sd/source/ui/inc/docprev.hxx @@ -43,7 +43,7 @@ protected: Color maDocumentColor; rtl::Reference< sd::SlideShow > mxSlideShow; - virtual void Paint( vcl::RenderContext& rRenderContext, const Rectangle& rRect ) override; + virtual void Paint( vcl::RenderContext& rRenderContext, const ::tools::Rectangle& rRect ) override; virtual Size GetOptimalSize() const override; static void CalcSizeAndPos( Size& rSize, Point& rPoint ); static void ImpPaint( OutputDevice* pVDev ); diff --git a/sd/source/ui/inc/drawview.hxx b/sd/source/ui/inc/drawview.hxx index d076b8ba942f..2bacf126a94f 100644 --- a/sd/source/ui/inc/drawview.hxx +++ b/sd/source/ui/inc/drawview.hxx @@ -51,7 +51,7 @@ public: bool SetStyleSheet(SfxStyleSheet* pStyleSheet, bool bDontRemoveHardAttr = false) override; - virtual void MakeVisible(const Rectangle& rRect, vcl::Window& rWin) override; + virtual void MakeVisible(const ::tools::Rectangle& rRect, vcl::Window& rWin) override; virtual void HideSdrPage() override; // SdrPageView* pPV); virtual void DeleteMarked() override; // from SdrView diff --git a/sd/source/ui/inc/fucon3d.hxx b/sd/source/ui/inc/fucon3d.hxx index b199ae4263cd..0b0d7db22dcd 100644 --- a/sd/source/ui/inc/fucon3d.hxx +++ b/sd/source/ui/inc/fucon3d.hxx @@ -43,7 +43,7 @@ public: virtual void Activate() override; - virtual SdrObject* CreateDefaultObject(const sal_uInt16 nID, const Rectangle& rRectangle) override; + virtual SdrObject* CreateDefaultObject(const sal_uInt16 nID, const ::tools::Rectangle& rRectangle) override; private: FuConstruct3dObject ( diff --git a/sd/source/ui/inc/fuconarc.hxx b/sd/source/ui/inc/fuconarc.hxx index de3ed819f613..4a2f1239b2ac 100644 --- a/sd/source/ui/inc/fuconarc.hxx +++ b/sd/source/ui/inc/fuconarc.hxx @@ -38,7 +38,7 @@ public: virtual void Activate() override; - virtual SdrObject* CreateDefaultObject(const sal_uInt16 nID, const Rectangle& rRectangle) override; + virtual SdrObject* CreateDefaultObject(const sal_uInt16 nID, const ::tools::Rectangle& rRectangle) override; protected: FuConstructArc ( diff --git a/sd/source/ui/inc/fuconbez.hxx b/sd/source/ui/inc/fuconbez.hxx index f43069632ae0..4530b9de7147 100644 --- a/sd/source/ui/inc/fuconbez.hxx +++ b/sd/source/ui/inc/fuconbez.hxx @@ -46,7 +46,7 @@ public: void SetEditMode(sal_uInt16 nMode); sal_uInt16 GetEditMode() { return nEditMode; } - virtual SdrObject* CreateDefaultObject(const sal_uInt16 nID, const Rectangle& rRectangle) override; + virtual SdrObject* CreateDefaultObject(const sal_uInt16 nID, const ::tools::Rectangle& rRectangle) override; protected: FuConstructBezierPolygon ( diff --git a/sd/source/ui/inc/fuconcs.hxx b/sd/source/ui/inc/fuconcs.hxx index c8b058b33515..a9928e060b0d 100644 --- a/sd/source/ui/inc/fuconcs.hxx +++ b/sd/source/ui/inc/fuconcs.hxx @@ -45,7 +45,7 @@ public: void SetAttributes( SdrObject* pObj ); const OUString& GetShapeType() const; - virtual SdrObject* CreateDefaultObject(const sal_uInt16 nID, const Rectangle& rRectangle) override; + virtual SdrObject* CreateDefaultObject(const sal_uInt16 nID, const ::tools::Rectangle& rRectangle) override; // #i33136# virtual bool doConstructOrthogonal() const override; diff --git a/sd/source/ui/inc/fuconrec.hxx b/sd/source/ui/inc/fuconrec.hxx index 0ab328bb2b0c..87cf6ef92d73 100644 --- a/sd/source/ui/inc/fuconrec.hxx +++ b/sd/source/ui/inc/fuconrec.hxx @@ -50,7 +50,7 @@ public: void SetAttributes(SfxItemSet& rAttr, SdrObject* pObj); void SetLineEnds(SfxItemSet& rAttr, SdrObject* pObj); - virtual SdrObject* CreateDefaultObject(const sal_uInt16 nID, const Rectangle& rRectangle) override; + virtual SdrObject* CreateDefaultObject(const sal_uInt16 nID, const ::tools::Rectangle& rRectangle) override; protected: FuConstructRectangle ( diff --git a/sd/source/ui/inc/fuconuno.hxx b/sd/source/ui/inc/fuconuno.hxx index c0fc3a959b9f..6c7a2862721a 100644 --- a/sd/source/ui/inc/fuconuno.hxx +++ b/sd/source/ui/inc/fuconuno.hxx @@ -45,7 +45,7 @@ public: virtual void Activate() override; virtual void Deactivate() override; - virtual SdrObject* CreateDefaultObject(const sal_uInt16 nID, const Rectangle& rRectangle) override; + virtual SdrObject* CreateDefaultObject(const sal_uInt16 nID, const ::tools::Rectangle& rRectangle) override; protected: FuConstructUnoControl( diff --git a/sd/source/ui/inc/fupoor.hxx b/sd/source/ui/inc/fupoor.hxx index ffa4655545bb..d12615240aad 100644 --- a/sd/source/ui/inc/fupoor.hxx +++ b/sd/source/ui/inc/fupoor.hxx @@ -87,7 +87,7 @@ public: void StartDelayToScrollTimer (); - virtual SdrObject* CreateDefaultObject(const sal_uInt16 nID, const Rectangle& rRectangle); + virtual SdrObject* CreateDefaultObject(const sal_uInt16 nID, const ::tools::Rectangle& rRectangle); /** is called when the current function should be aborted. <p> This is used when a function gets a KEY_ESCAPE but can also @@ -121,7 +121,7 @@ protected: DECL_LINK( DelayHdl, Timer *, void ); - static void ImpForceQuadratic(Rectangle& rRect); + static void ImpForceQuadratic(::tools::Rectangle& rRect); /** Switch to another layer. The layer to switch to is specified by an offset relative to the active layer. With respect to the layer bar diff --git a/sd/source/ui/inc/futext.hxx b/sd/source/ui/inc/futext.hxx index 610628328af8..281af763e1ec 100644 --- a/sd/source/ui/inc/futext.hxx +++ b/sd/source/ui/inc/futext.hxx @@ -57,7 +57,7 @@ public: void DeleteDefaultText(); SdrTextObj* GetTextObj() { return static_cast< SdrTextObj* >( mxTextObj.get() ); } - virtual SdrObject* CreateDefaultObject(const sal_uInt16 nID, const Rectangle& rRectangle) override; + virtual SdrObject* CreateDefaultObject(const sal_uInt16 nID, const ::tools::Rectangle& rRectangle) override; /** is called when the current function should be aborted. <p> This is used when a function gets a KEY_ESCAPE but can also diff --git a/sd/source/ui/inc/fuzoom.hxx b/sd/source/ui/inc/fuzoom.hxx index 02862246de45..4b968d16c59e 100644 --- a/sd/source/ui/inc/fuzoom.hxx +++ b/sd/source/ui/inc/fuzoom.hxx @@ -48,7 +48,7 @@ protected: Point aBeginPosPix; Point aBeginPos; Point aEndPos; - Rectangle aZoomRect; + ::tools::Rectangle aZoomRect; bool bVisible; bool bStartDrag; Pointer aPtr; diff --git a/sd/source/ui/inc/sdxfer.hxx b/sd/source/ui/inc/sdxfer.hxx index 234c4c58bcce..de543234cad9 100644 --- a/sd/source/ui/inc/sdxfer.hxx +++ b/sd/source/ui/inc/sdxfer.hxx @@ -127,7 +127,7 @@ private: INetBookmark* mpBookmark; Graphic* mpGraphic; ImageMap* mpImageMap; - Rectangle maVisArea; + ::tools::Rectangle maVisArea; Point maStartPos; bool mbInternalMove : 1; bool mbOwnDocument : 1; diff --git a/sd/source/ui/inc/slideshow.hxx b/sd/source/ui/inc/slideshow.hxx index 6dba507d431b..ada2329f0df8 100644 --- a/sd/source/ui/inc/slideshow.hxx +++ b/sd/source/ui/inc/slideshow.hxx @@ -48,7 +48,7 @@ class SdDrawDocument; class KeyEvent; class OutputDevice; class Size; -class Rectangle; +namespace tools { class Rectangle; } namespace vcl { class Window; } class SfxRequest; class WorkWindow; @@ -163,7 +163,7 @@ public: void resize( const Size &rSize ); void activate(ViewShellBase& rBase); void deactivate(ViewShellBase& rBase); - void paint( const Rectangle& rRect ); + void paint( const ::tools::Rectangle& rRect ); bool keyInput(const KeyEvent& rKEvt); diff --git a/sd/source/ui/inc/smarttag.hxx b/sd/source/ui/inc/smarttag.hxx index 509ebb07a73a..2dd2db97f4a5 100644 --- a/sd/source/ui/inc/smarttag.hxx +++ b/sd/source/ui/inc/smarttag.hxx @@ -72,7 +72,7 @@ protected: virtual sal_uLong GetMarkedPointCount() const; virtual bool MarkPoint(SdrHdl& rHdl, bool bUnmark); virtual void CheckPossibilities(); - virtual bool MarkPoints(const Rectangle* pRect, bool bUnmark); + virtual bool MarkPoints(const ::tools::Rectangle* pRect, bool bUnmark); virtual void addCustomHandles( SdrHdlList& rHandlerList ); virtual void select(); @@ -137,7 +137,7 @@ public: sal_uLong GetMarkedPointCount() const; static bool IsPointMarkable(const SdrHdl& rHdl); bool MarkPoint(SdrHdl& rHdl, bool bUnmark); - bool MarkPoints(const Rectangle* pRect, bool bUnmark); + bool MarkPoints(const ::tools::Rectangle* pRect, bool bUnmark); void CheckPossibilities(); diff --git a/sd/source/ui/inc/vectdlg.hxx b/sd/source/ui/inc/vectdlg.hxx index 4422687d1934..dbfeee16e9ce 100644 --- a/sd/source/ui/inc/vectdlg.hxx +++ b/sd/source/ui/inc/vectdlg.hxx @@ -65,7 +65,7 @@ class SdVectorizeDlg : public ModalDialog void SaveSettings() const; void InitPreviewBmp(); - static Rectangle GetRect( const Size& rDispSize, const Size& rBmpSize ); + static ::tools::Rectangle GetRect( const Size& rDispSize, const Size& rBmpSize ); Bitmap GetPreparedBitmap( Bitmap& rBmp, Fraction& rScale ); void Calculate( Bitmap& rBmp, GDIMetaFile& rMtf ); void AddTile( BitmapReadAccess* pRAcc, GDIMetaFile& rMtf, diff --git a/sd/source/ui/inc/zoomlist.hxx b/sd/source/ui/inc/zoomlist.hxx index fdd361aa0a77..115e0d36aa92 100644 --- a/sd/source/ui/inc/zoomlist.hxx +++ b/sd/source/ui/inc/zoomlist.hxx @@ -34,9 +34,9 @@ public: ZoomList(ViewShell* pViewShell); - void InsertZoomRect(const Rectangle& rRect); - Rectangle GetNextZoomRect(); - Rectangle GetPreviousZoomRect(); + void InsertZoomRect(const ::tools::Rectangle& rRect); + ::tools::Rectangle GetNextZoomRect(); + ::tools::Rectangle GetPreviousZoomRect(); bool IsNextPossible() const; bool IsPreviousPossible() const; @@ -44,7 +44,7 @@ private: ViewShell* mpViewShell; sal_uInt32 mnCurPos; - std::vector<Rectangle> maRectangles; + std::vector<::tools::Rectangle> maRectangles; }; } // end of namespace sd diff --git a/sd/source/ui/presenter/PresenterCanvas.cxx b/sd/source/ui/presenter/PresenterCanvas.cxx index a17ee1f6a38b..e9905cae8db5 100644 --- a/sd/source/ui/presenter/PresenterCanvas.cxx +++ b/sd/source/ui/presenter/PresenterCanvas.cxx @@ -574,7 +574,7 @@ awt::Point PresenterCanvas::GetOffset (const Reference<awt::XWindow>& rxBaseWind VclPtr<vcl::Window> pSharedWindow = VCLUnoHelper::GetWindow(rxBaseWindow); if (pWindow && pSharedWindow) { - Rectangle aBox = pWindow->GetWindowExtentsRelative(pSharedWindow); + ::tools::Rectangle aBox = pWindow->GetWindowExtentsRelative(pSharedWindow); // Calculate offset of this canvas with respect to the shared // canvas. @@ -599,7 +599,7 @@ awt::Point PresenterCanvas::GetOffset (const Reference<awt::XWindow>& rxBaseWind // Get the bounding box of the window and create a range in the // coordinate system of the child window. - Rectangle aLocalClip; + ::tools::Rectangle aLocalClip; if (maClipRectangle.Width <= 0 || maClipRectangle.Height <= 0) { // No clip rectangle has been set via SetClip by the pane. @@ -609,7 +609,7 @@ awt::Point PresenterCanvas::GetOffset (const Reference<awt::XWindow>& rxBaseWind else { // Use a previously given clip rectangle. - aLocalClip = Rectangle( + aLocalClip = ::tools::Rectangle( maClipRectangle.X + rOffset.X, maClipRectangle.Y + rOffset.Y, maClipRectangle.X + maClipRectangle.Width + rOffset.X, diff --git a/sd/source/ui/presenter/PresenterHelper.cxx b/sd/source/ui/presenter/PresenterHelper.cxx index 72893b7aac5a..5a2990cb01fb 100644 --- a/sd/source/ui/presenter/PresenterHelper.cxx +++ b/sd/source/ui/presenter/PresenterHelper.cxx @@ -446,7 +446,7 @@ awt::Rectangle PresenterHelper::getWindowExtentsRelative ( VclPtr<vcl::Window> pParentWindow = VCLUnoHelper::GetWindow(rxParentWindow); if (pChildWindow && pParentWindow) { - Rectangle aBox (pChildWindow->GetWindowExtentsRelative(pParentWindow)); + ::tools::Rectangle aBox (pChildWindow->GetWindowExtentsRelative(pParentWindow)); return awt::Rectangle(aBox.Left(),aBox.Top(),aBox.GetWidth(),aBox.GetHeight()); } else diff --git a/sd/source/ui/presenter/PresenterTextView.cxx b/sd/source/ui/presenter/PresenterTextView.cxx index ae5d81c9d802..4da4289e0919 100644 --- a/sd/source/ui/presenter/PresenterTextView.cxx +++ b/sd/source/ui/presenter/PresenterTextView.cxx @@ -455,7 +455,7 @@ Reference<rendering::XBitmap> const & PresenterTextView::Implementation::GetBitm MapMode aMapMode (mpOutputDevice->GetMapMode()); aMapMode.SetOrigin(Point(0,0)); mpOutputDevice->SetMapMode(aMapMode); - const Rectangle aWindowBox (Point(0,0), maSize); + const ::tools::Rectangle aWindowBox (Point(0,0), maSize); mpOutputDevice->DrawRect(aWindowBox); mpEditEngine->Clear(); diff --git a/sd/source/ui/sidebar/DocumentHelper.cxx b/sd/source/ui/sidebar/DocumentHelper.cxx index 304516f7d98f..d6d7c9fd7585 100644 --- a/sd/source/ui/sidebar/DocumentHelper.cxx +++ b/sd/source/ui/sidebar/DocumentHelper.cxx @@ -372,7 +372,7 @@ SdPage* DocumentHelper::AddMasterPage ( // Adapt the size of the new master page to that of the pages in // the document. Size aNewSize (rTargetDocument.GetSdPage(0, pMasterPage->GetPageKind())->GetSize()); - Rectangle aBorders ( + ::tools::Rectangle aBorders ( pClonedMasterPage->GetLftBorder(), pClonedMasterPage->GetUppBorder(), pClonedMasterPage->GetRgtBorder(), diff --git a/sd/source/ui/sidebar/LayoutMenu.cxx b/sd/source/ui/sidebar/LayoutMenu.cxx index eac3c34810e7..ab862728f282 100644 --- a/sd/source/ui/sidebar/LayoutMenu.cxx +++ b/sd/source/ui/sidebar/LayoutMenu.cxx @@ -257,7 +257,7 @@ ui::LayoutSize LayoutMenu::GetHeightForWidth (const sal_Int32 nWidth) return ui::LayoutSize(nPreferredHeight,nPreferredHeight,nPreferredHeight); } -void LayoutMenu::Paint (vcl::RenderContext& rRenderContext, const Rectangle& rRect) +void LayoutMenu::Paint (vcl::RenderContext& rRenderContext, const ::tools::Rectangle& rRect) { if (mbSelectionUpdatePending) { @@ -595,7 +595,7 @@ void LayoutMenu::Command (const CommandEvent& rEvent) { if (GetSelectItemId() == (sal_uInt16)-1) return; - Rectangle aBBox (GetItemRect(GetSelectItemId())); + ::tools::Rectangle aBBox (GetItemRect(GetSelectItemId())); aMenuPosition = aBBox.Center(); } @@ -616,7 +616,7 @@ void LayoutMenu::Command (const CommandEvent& rEvent) pMenu->EnableItem(SID_INSERTPAGE_LAYOUT_MENU, false); // Show the menu. - pMenu->Execute(this, Rectangle(aMenuPosition,Size(1,1)), PopupMenuFlags::ExecuteDown); + pMenu->Execute(this, ::tools::Rectangle(aMenuPosition,Size(1,1)), PopupMenuFlags::ExecuteDown); } break; diff --git a/sd/source/ui/sidebar/LayoutMenu.hxx b/sd/source/ui/sidebar/LayoutMenu.hxx index 10ff2674f138..9aa001d066f8 100644 --- a/sd/source/ui/sidebar/LayoutMenu.hxx +++ b/sd/source/ui/sidebar/LayoutMenu.hxx @@ -87,7 +87,7 @@ public: virtual css::ui::LayoutSize GetHeightForWidth (const sal_Int32 nWidth) override; // From vcl::Window - 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; /** Show a context menu when the right mouse button is pressed. diff --git a/sd/source/ui/sidebar/MasterPagesSelector.cxx b/sd/source/ui/sidebar/MasterPagesSelector.cxx index ff733e8dd806..fc9c06ba6da3 100644 --- a/sd/source/ui/sidebar/MasterPagesSelector.cxx +++ b/sd/source/ui/sidebar/MasterPagesSelector.cxx @@ -216,7 +216,7 @@ void MasterPagesSelector::Command (const CommandEvent& rEvent) Point aPosition (rEvent.GetMousePosPixel()); if ( ! rEvent.IsMouseEvent()) { - Rectangle aBBox (PreviewValueSet::GetItemRect(nIndex)); + ::tools::Rectangle aBBox (PreviewValueSet::GetItemRect(nIndex)); aPosition = aBBox.Center(); } @@ -231,7 +231,7 @@ void MasterPagesSelector::Command (const CommandEvent& rEvent) ProcessPopupMenu(*pMenu); // Show the menu. - pMenu->Execute(this, Rectangle(aPosition,Size(1,1)), PopupMenuFlags::ExecuteDown); + pMenu->Execute(this, ::tools::Rectangle(aPosition,Size(1,1)), PopupMenuFlags::ExecuteDown); } } break; diff --git a/sd/source/ui/slideshow/showwin.cxx b/sd/source/ui/slideshow/showwin.cxx index 2ca0044f301f..3fec3df97e44 100644 --- a/sd/source/ui/slideshow/showwin.cxx +++ b/sd/source/ui/slideshow/showwin.cxx @@ -248,7 +248,7 @@ void ShowWindow::MouseButtonUp(const MouseEvent& rMEvt) /** * if FuSlideShow is still available, forward it */ -void ShowWindow::Paint(vcl::RenderContext& /*rRenderContext*/, const Rectangle& rRect) +void ShowWindow::Paint(vcl::RenderContext& /*rRenderContext*/, const ::tools::Rectangle& rRect) { if( (meShowWindowMode == SHOWWINDOWMODE_NORMAL) || (meShowWindowMode == SHOWWINDOWMODE_PREVIEW) ) { @@ -576,7 +576,7 @@ IMPL_LINK( ShowWindow, EventHdl, VclWindowEvent&, rEvent, void ) } } -void ShowWindow::SetPresentationArea( const Rectangle& rPresArea ) +void ShowWindow::SetPresentationArea( const ::tools::Rectangle& rPresArea ) { maPresArea = rPresArea; } diff --git a/sd/source/ui/slideshow/showwindow.hxx b/sd/source/ui/slideshow/showwindow.hxx index 247900892e35..ed23d046513d 100644 --- a/sd/source/ui/slideshow/showwindow.hxx +++ b/sd/source/ui/slideshow/showwindow.hxx @@ -60,7 +60,7 @@ public: const Color& GetBlankColor() const { return maShowBackground.GetColor(); } void SetPreviewMode(); - void SetPresentationArea( const Rectangle& rPresArea ); + void SetPresentationArea( const ::tools::Rectangle& rPresArea ); void SetMouseAutoHide( bool bMouseAutoHide ) { mbMouseAutoHide = bMouseAutoHide; } @@ -74,7 +74,7 @@ public: virtual void MouseMove(const MouseEvent& rMEvt) override; virtual void MouseButtonUp(const MouseEvent& rMEvt) override; virtual void MouseButtonDown(const MouseEvent& rMEvt) override; - virtual void Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) override; + virtual void Paint(vcl::RenderContext& rRenderContext, const ::tools::Rectangle& rRect) override; /// Override the sd::Window's CreateAccessible to create a different accessible object virtual css::uno::Reference<css::accessibility::XAccessible> CreateAccessible() override; @@ -98,7 +98,7 @@ private: sal_Int32 mnRestartPageIndex; ShowWindowMode meShowWindowMode; bool mbShowNavigatorAfterSpecialMode; - Rectangle maPresArea; + ::tools::Rectangle maPresArea; bool mbMouseAutoHide; bool mbMouseCursorHidden; sal_uInt64 mnFirstMouseMove; diff --git a/sd/source/ui/slideshow/slideshow.cxx b/sd/source/ui/slideshow/slideshow.cxx index 23bea3a068ee..42237d0f83cf 100644 --- a/sd/source/ui/slideshow/slideshow.cxx +++ b/sd/source/ui/slideshow/slideshow.cxx @@ -987,7 +987,7 @@ bool SlideShow::keyInput(const KeyEvent& rKEvt) return mxController.is() && mxController->keyInput(rKEvt); } -void SlideShow::paint( const Rectangle& rRect ) +void SlideShow::paint( const ::tools::Rectangle& rRect ) { if( mxController.is() ) mxController->paint( rRect ); diff --git a/sd/source/ui/slideshow/slideshowimpl.cxx b/sd/source/ui/slideshow/slideshowimpl.cxx index 91751a91f24b..e2a7e0dddf85 100644 --- a/sd/source/ui/slideshow/slideshowimpl.cxx +++ b/sd/source/ui/slideshow/slideshowimpl.cxx @@ -696,7 +696,7 @@ void SAL_CALL SlideshowImpl::disposing() if (pActWin) { Size aVisSizePixel = pActWin->GetOutputSizePixel(); - Rectangle aVisAreaWin = pActWin->PixelToLogic( Rectangle( Point(0,0), aVisSizePixel) ); + ::tools::Rectangle aVisAreaWin = pActWin->PixelToLogic( ::tools::Rectangle( Point(0,0), aVisSizePixel) ); mpViewShell->VisAreaChanged(aVisAreaWin); if (mpView) mpView->VisAreaChanged(pActWin); @@ -794,7 +794,7 @@ bool SlideshowImpl::startPreview( } else if( mpViewShell ) { - Rectangle aContentRect (mpViewShell->GetViewShellBase().getClientRectangle()); + ::tools::Rectangle aContentRect (mpViewShell->GetViewShellBase().getClientRectangle()); if (AllSettings::GetLayoutRTL()) { aContentRect.Left() = aContentRect.Right(); @@ -958,7 +958,7 @@ bool SlideshowImpl::startShow( PresentationSettingsEx* pPresSettings ) maPresSize = mpParentWindow->GetSizePixel(); if (!maPresSettings.mbFullScreen) { - const Rectangle& aClientRect = mpViewShell->GetViewShellBase().getClientRectangle(); + const ::tools::Rectangle& aClientRect = mpViewShell->GetViewShellBase().getClientRectangle(); maPresSize = aClientRect.GetSize(); mpShowWindow->SetPosPixel( aClientRect.TopLeft() ); resize( maPresSize ); @@ -1144,7 +1144,7 @@ void SlideshowImpl::onFirstPaint() maUpdateTimer.Start(); } -void SlideshowImpl::paint( const Rectangle& /* rRect */ ) +void SlideshowImpl::paint( const ::tools::Rectangle& /* rRect */ ) { if( mxView.is() ) try { diff --git a/sd/source/ui/slideshow/slideshowimpl.hxx b/sd/source/ui/slideshow/slideshowimpl.hxx index 1aa927160b20..32aace0af8d2 100644 --- a/sd/source/ui/slideshow/slideshowimpl.hxx +++ b/sd/source/ui/slideshow/slideshowimpl.hxx @@ -231,7 +231,7 @@ public: ViewShell* getViewShell() const { return mpViewShell; } - void paint( const Rectangle& rRect ); + void paint( const ::tools::Rectangle& rRect ); bool keyInput(const KeyEvent& rKEvt); void mouseButtonUp(const MouseEvent& rMEvt); diff --git a/sd/source/ui/slideshow/slideshowviewimpl.cxx b/sd/source/ui/slideshow/slideshowviewimpl.cxx index a22e15baa598..1a4f79f81ae8 100644 --- a/sd/source/ui/slideshow/slideshowviewimpl.cxx +++ b/sd/source/ui/slideshow/slideshowviewimpl.cxx @@ -361,7 +361,7 @@ geometry::AffineMatrix2D SAL_CALL SlideShowView::getTransformation( ) mTranslationOffset.Height = aOutputOffset.Y(); mTranslationOffset.Width = aOutputOffset.X(); - maPresentationArea = Rectangle( aOutputOffset, aOutputSize ); + maPresentationArea = ::tools::Rectangle( aOutputOffset, aOutputSize ); mrOutputWindow.SetPresentationArea( maPresentationArea ); // scale presentation into available window rect (minus 10%); center in the window diff --git a/sd/source/ui/slideshow/slideshowviewimpl.hxx b/sd/source/ui/slideshow/slideshowviewimpl.hxx index 4f96a8772394..02dfb2ece249 100644 --- a/sd/source/ui/slideshow/slideshowviewimpl.hxx +++ b/sd/source/ui/slideshow/slideshowviewimpl.hxx @@ -243,7 +243,7 @@ private: mpMouseMotionListeners; SdDrawDocument* mpDoc; bool mbIsMouseMotionListener; - Rectangle maPresentationArea; + ::tools::Rectangle maPresentationArea; AnimationMode meAnimationMode; bool mbFirstPaint; bool mbFullScreen; diff --git a/sd/source/ui/slidesorter/controller/SlideSorterController.cxx b/sd/source/ui/slidesorter/controller/SlideSorterController.cxx index d804ee8fcb20..dfbf1692ef8d 100644 --- a/sd/source/ui/slidesorter/controller/SlideSorterController.cxx +++ b/sd/source/ui/slidesorter/controller/SlideSorterController.cxx @@ -265,7 +265,7 @@ std::shared_ptr<InsertionIndicatorHandler> const & } void SlideSorterController::Paint ( - const Rectangle& rBBox, + const ::tools::Rectangle& rBBox, vcl::Window* pWindow) { if (mnPaintEntranceCount == 0) @@ -371,7 +371,7 @@ bool SlideSorterController::Command ( GetFocusManager().GetFocusedPageDescriptor()); if (pDescriptor.get() != nullptr) { - Rectangle aBBox ( + ::tools::Rectangle aBBox ( mrView.GetLayouter().GetPageObjectLayouter()->GetBoundingBox ( pDescriptor, PageObjectLayouter::Part::PageObject, @@ -663,7 +663,7 @@ void SlideSorterController::UpdateAllPages() mrSlideSorter.GetContentWindow()->Invalidate(); } -void SlideSorterController::Resize (const Rectangle& rAvailableSpace) +void SlideSorterController::Resize (const ::tools::Rectangle& rAvailableSpace) { if (maTotalWindowArea != rAvailableSpace) { @@ -692,7 +692,7 @@ void SlideSorterController::Rearrange (bool bForce) mrView.UpdateOrientation(); // Place the scroll bars. - Rectangle aNewContentArea = GetScrollBarManager().PlaceScrollBars( + ::tools::Rectangle aNewContentArea = GetScrollBarManager().PlaceScrollBars( maTotalWindowArea, mrView.GetOrientation() != view::Layouter::VERTICAL, mrView.GetOrientation() != view::Layouter::HORIZONTAL); @@ -702,7 +702,7 @@ void SlideSorterController::Rearrange (bool bForce) // order to determine whether the window and the view have to be resized. if ( ! bForce) { - Rectangle aCurrentContentArea (pWindow->GetPosPixel(), pWindow->GetOutputSizePixel()); + ::tools::Rectangle aCurrentContentArea (pWindow->GetPosPixel(), pWindow->GetOutputSizePixel()); bSizeHasChanged = (aNewContentArea != aCurrentContentArea); } if (bForce || bSizeHasChanged) diff --git a/sd/source/ui/slidesorter/controller/SlsScrollBarManager.cxx b/sd/source/ui/slidesorter/controller/SlsScrollBarManager.cxx index e06b6359e11c..ccf42d0db77e 100644 --- a/sd/source/ui/slidesorter/controller/SlsScrollBarManager.cxx +++ b/sd/source/ui/slidesorter/controller/SlsScrollBarManager.cxx @@ -105,12 +105,12 @@ void ScrollBarManager::Disconnect() window changes and a second call to the layouter becomes necessary. That call is made anyway after this method returns. */ -Rectangle ScrollBarManager::PlaceScrollBars ( - const Rectangle& rAvailableArea, +::tools::Rectangle ScrollBarManager::PlaceScrollBars ( + const ::tools::Rectangle& rAvailableArea, const bool bIsHorizontalScrollBarAllowed, const bool bIsVerticalScrollBarAllowed) { - Rectangle aRemainingSpace (DetermineScrollBarVisibilities( + ::tools::Rectangle aRemainingSpace (DetermineScrollBarVisibilities( rAvailableArea, bIsHorizontalScrollBarAllowed, bIsVerticalScrollBarAllowed)); @@ -127,7 +127,7 @@ Rectangle ScrollBarManager::PlaceScrollBars ( return aRemainingSpace; } -void ScrollBarManager::PlaceHorizontalScrollBar (const Rectangle& aAvailableArea) +void ScrollBarManager::PlaceHorizontalScrollBar (const ::tools::Rectangle& aAvailableArea) { // Save the current relative position. mnHorizontalPosition = double(mpHorizontalScrollBar->GetThumbPos()) @@ -146,7 +146,7 @@ void ScrollBarManager::PlaceHorizontalScrollBar (const Rectangle& aAvailableArea (long)(0.5 + mnHorizontalPosition * mpHorizontalScrollBar->GetRange().Len())); } -void ScrollBarManager::PlaceVerticalScrollBar (const Rectangle& aArea) +void ScrollBarManager::PlaceVerticalScrollBar (const ::tools::Rectangle& aArea) { const sal_Int32 nThumbPosition (mpVerticalScrollBar->GetThumbPos()); @@ -161,7 +161,7 @@ void ScrollBarManager::PlaceVerticalScrollBar (const Rectangle& aArea) mnVerticalPosition = nThumbPosition / double(mpVerticalScrollBar->GetRange().Len()); } -void ScrollBarManager::PlaceFiller (const Rectangle& aArea) +void ScrollBarManager::PlaceFiller (const ::tools::Rectangle& aArea) { mpScrollBarFiller->SetPosSizePixel( Point( @@ -174,7 +174,7 @@ void ScrollBarManager::PlaceFiller (const Rectangle& aArea) void ScrollBarManager::UpdateScrollBars(bool bUseScrolling) { - Rectangle aModelArea (mrSlideSorter.GetView().GetModelArea()); + ::tools::Rectangle aModelArea (mrSlideSorter.GetView().GetModelArea()); sd::Window *pWindow (mrSlideSorter.GetContentWindow().get()); Size aWindowModelSize (pWindow->PixelToLogic(pWindow->GetSizePixel())); @@ -297,8 +297,8 @@ void ScrollBarManager::SetWindowOrigin ( b) when not showing a scroll bar the area used by the page objects fits into the available area in the scroll bars orientation. */ -Rectangle ScrollBarManager::DetermineScrollBarVisibilities ( - const Rectangle& rAvailableArea, +::tools::Rectangle ScrollBarManager::DetermineScrollBarVisibilities ( + const ::tools::Rectangle& rAvailableArea, const bool bIsHorizontalScrollBarAllowed, const bool bIsVerticalScrollBarAllowed) { @@ -335,7 +335,7 @@ Rectangle ScrollBarManager::DetermineScrollBarVisibilities ( mpScrollBarFiller->Show(bShowVertical && bShowHorizontal); // Adapt the remaining space accordingly. - Rectangle aRemainingSpace (rAvailableArea); + ::tools::Rectangle aRemainingSpace (rAvailableArea); if (bShowVertical) aRemainingSpace.Right() -= mpVerticalScrollBar->GetSizePixel().Width(); if (bShowHorizontal) @@ -347,7 +347,7 @@ Rectangle ScrollBarManager::DetermineScrollBarVisibilities ( bool ScrollBarManager::TestScrollBarVisibilities ( bool bHorizontalScrollBarVisible, bool bVerticalScrollBarVisible, - const Rectangle& rAvailableArea) + const ::tools::Rectangle& rAvailableArea) { model::SlideSorterModel& rModel (mrSlideSorter.GetModel()); @@ -437,8 +437,8 @@ void ScrollBarManager::CalcAutoScrollOffset (const Point& rMouseWindowPosition) int nDy = 0; Size aWindowSize = pWindow->GetOutputSizePixel(); - Rectangle aWindowArea (pWindow->GetPosPixel(), aWindowSize); - Rectangle aViewPixelArea ( + ::tools::Rectangle aWindowArea (pWindow->GetPosPixel(), aWindowSize); + ::tools::Rectangle aViewPixelArea ( pWindow->LogicToPixel(mrSlideSorter.GetView().GetModelArea())); if (aWindowSize.Width() > maScrollBorder.Width() * 3 diff --git a/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx b/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx index 8d17378c7122..504cae72e242 100644 --- a/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx +++ b/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx @@ -786,7 +786,7 @@ SelectionFunction::EventDescriptor::EventDescriptor ( // we can call IsLeaveWindow at the event. Otherwise we have to make an // explicit test. mbIsLeaving = rEvent.IsLeaveWindow() - || ! Rectangle(Point(0,0), + || ! ::tools::Rectangle(Point(0,0), rSlideSorter.GetContentWindow()->GetOutputSizePixel()).IsInside(maMousePosition); } @@ -817,7 +817,7 @@ SelectionFunction::EventDescriptor::EventDescriptor ( // we can call IsLeaveWindow at the event. Otherwise we have to make an // explicit test. mbIsLeaving = rEvent.mbLeaving - || ! Rectangle(Point(0,0), + || ! ::tools::Rectangle(Point(0,0), rSlideSorter.GetContentWindow()->GetOutputSizePixel()).IsInside(maMousePosition); } diff --git a/sd/source/ui/slidesorter/controller/SlsVisibleAreaManager.cxx b/sd/source/ui/slidesorter/controller/SlsVisibleAreaManager.cxx index 03e38021800e..f6dff9e7d4cd 100644 --- a/sd/source/ui/slidesorter/controller/SlsVisibleAreaManager.cxx +++ b/sd/source/ui/slidesorter/controller/SlsVisibleAreaManager.cxx @@ -152,11 +152,11 @@ void VisibleAreaManager::MakeVisible() return ::boost::optional<Point>(); // Get the currently visible area and the model area. - const Rectangle aVisibleArea (pWindow->PixelToLogic( - Rectangle( + const ::tools::Rectangle aVisibleArea (pWindow->PixelToLogic( + ::tools::Rectangle( Point(0,0), pWindow->GetOutputSizePixel()))); - const Rectangle aModelArea (mrSlideSorter.GetView().GetModelArea()); + const ::tools::Rectangle aModelArea (mrSlideSorter.GetView().GetModelArea()); sal_Int32 nVisibleTop (aVisibleArea.Top()); const sal_Int32 nVisibleWidth (aVisibleArea.GetWidth()); @@ -164,7 +164,7 @@ void VisibleAreaManager::MakeVisible() const sal_Int32 nVisibleHeight (aVisibleArea.GetHeight()); // Find the longest run of boxes whose union fits into the visible area. - for (::std::vector<Rectangle>::const_iterator + for (::std::vector<::tools::Rectangle>::const_iterator iBox(maVisibleRequests.begin()), iEnd(maVisibleRequests.end()); iBox!=iEnd; diff --git a/sd/source/ui/slidesorter/inc/controller/SlideSorterController.hxx b/sd/source/ui/slidesorter/inc/controller/SlideSorterController.hxx index 44ae5995e9b9..cee9f9631bd8 100644 --- a/sd/source/ui/slidesorter/inc/controller/SlideSorterController.hxx +++ b/sd/source/ui/slidesorter/inc/controller/SlideSorterController.hxx @@ -83,7 +83,7 @@ public: /** Place and size the scroll bars and the browser window so that the given rectangle is filled. */ - void Resize (const Rectangle& rAvailableSpace); + void Resize (const ::tools::Rectangle& rAvailableSpace); /** Determine which of the UI elements--the scroll bars, the scroll bar filler, the actual slide sorter view--are visible and place them in @@ -124,7 +124,7 @@ public: /** This method forwards the call to the SlideSorterView and executes pending operations like moving selected pages into the visible area. */ - void Paint (const Rectangle& rRect, vcl::Window* pWin); + void Paint (const ::tools::Rectangle& rRect, vcl::Window* pWin); void FuTemporary (SfxRequest& rRequest); void FuPermanent (SfxRequest& rRequest); @@ -261,7 +261,7 @@ private: /** This rectangle in the parent window encloses scroll bars and slide sorter window. It is set when Resize() is called. */ - Rectangle maTotalWindowArea; + ::tools::Rectangle maTotalWindowArea; /** This counter is used to avoid processing of reentrant calls to Paint(). diff --git a/sd/source/ui/slidesorter/inc/controller/SlsScrollBarManager.hxx b/sd/source/ui/slidesorter/inc/controller/SlsScrollBarManager.hxx index 698ab95702ba..a544f4585726 100644 --- a/sd/source/ui/slidesorter/inc/controller/SlsScrollBarManager.hxx +++ b/sd/source/ui/slidesorter/inc/controller/SlsScrollBarManager.hxx @@ -102,8 +102,8 @@ public: Returns the space that remains after the scroll bars are placed. */ - Rectangle PlaceScrollBars ( - const Rectangle& rAvailableArea, + ::tools::Rectangle PlaceScrollBars ( + const ::tools::Rectangle& rAvailableArea, const bool bIsHorizontalScrollBarAllowed, const bool bIsVerticalScrollBarAllowed); @@ -217,8 +217,8 @@ private: The area that is enclosed by the scroll bars is returned. It will be filled with the SlideSorterView. */ - Rectangle DetermineScrollBarVisibilities( - const Rectangle& rAvailableArea, + ::tools::Rectangle DetermineScrollBarVisibilities( + const ::tools::Rectangle& rAvailableArea, const bool bIsHorizontalScrollBarAllowed, const bool bIsVerticalScrollBarAllowed); @@ -233,7 +233,7 @@ private: bool TestScrollBarVisibilities ( bool bHorizontalScrollBarVisible, bool bVerticalScrollBarVisible, - const Rectangle& rAvailableArea); + const ::tools::Rectangle& rAvailableArea); void CalcAutoScrollOffset (const Point& rMouseWindowPosition); bool RepeatAutoScroll(); @@ -242,9 +242,9 @@ private: DECL_LINK(VerticalScrollBarHandler, ScrollBar*, void); DECL_LINK(AutoScrollTimeoutHandler, Timer *, void); - void PlaceHorizontalScrollBar (const Rectangle& aArea); - void PlaceVerticalScrollBar (const Rectangle& aArea); - void PlaceFiller (const Rectangle& aArea); + void PlaceHorizontalScrollBar (const ::tools::Rectangle& aArea); + void PlaceVerticalScrollBar (const ::tools::Rectangle& aArea); + void PlaceFiller (const ::tools::Rectangle& aArea); }; } } } // end of namespace ::sd::slidesorter::controller diff --git a/sd/source/ui/slidesorter/inc/controller/SlsVisibleAreaManager.hxx b/sd/source/ui/slidesorter/inc/controller/SlsVisibleAreaManager.hxx index 7e227b578970..fec1640d6850 100644 --- a/sd/source/ui/slidesorter/inc/controller/SlsVisibleAreaManager.hxx +++ b/sd/source/ui/slidesorter/inc/controller/SlsVisibleAreaManager.hxx @@ -71,7 +71,7 @@ private: area. Cleared on every call to ForgetVisibleRequests() and MakeVisible(). */ - ::std::vector<Rectangle> maVisibleRequests; + ::std::vector<::tools::Rectangle> maVisibleRequests; /** Animation id for a scroll animation that sets the top and left of the visible area to maRequestedVisibleTopLeft. diff --git a/sd/source/ui/slidesorter/inc/model/SlsPageDescriptor.hxx b/sd/source/ui/slidesorter/inc/model/SlsPageDescriptor.hxx index 3b1d0df7c530..949f9f5b6034 100644 --- a/sd/source/ui/slidesorter/inc/model/SlsPageDescriptor.hxx +++ b/sd/source/ui/slidesorter/inc/model/SlsPageDescriptor.hxx @@ -110,9 +110,9 @@ public: VisualState& GetVisualState() { return maVisualState;} - Rectangle GetBoundingBox() const; + ::tools::Rectangle GetBoundingBox() const; Point GetLocation (const bool bIgnoreLocation) const; - void SetBoundingBox (const Rectangle& rBoundingBox); + void SetBoundingBox (const ::tools::Rectangle& rBoundingBox); private: SdPage* mpPage; @@ -124,7 +124,7 @@ private: */ sal_Int32 mnIndex; - Rectangle maBoundingBox; + ::tools::Rectangle maBoundingBox; VisualState maVisualState; bool mbIsSelected : 1; diff --git a/sd/source/ui/slidesorter/inc/view/SlideSorterView.hxx b/sd/source/ui/slidesorter/inc/view/SlideSorterView.hxx index 1b541ca36374..5daf2d4efc89 100644 --- a/sd/source/ui/slidesorter/inc/view/SlideSorterView.hxx +++ b/sd/source/ui/slidesorter/inc/view/SlideSorterView.hxx @@ -85,10 +85,10 @@ public: void RequestRepaint(); void RequestRepaint (const model::SharedPageDescriptor& rDescriptor); - void RequestRepaint (const Rectangle& rRepaintBox); + void RequestRepaint (const ::tools::Rectangle& rRepaintBox); void RequestRepaint (const vcl::Region& rRepaintRegion); - Rectangle GetModelArea(); + ::tools::Rectangle GetModelArea(); /** Return the index of the page that is rendered at the given position. @param rPosition @@ -129,7 +129,7 @@ public: OutputDevice* pDevice, const vcl::Region& rPaintArea, sdr::contact::ViewObjectContactRedirector* pRedirector = nullptr) override; - void Paint (OutputDevice& rDevice, const Rectangle& rRepaintArea); + void Paint (OutputDevice& rDevice, const ::tools::Rectangle& rRepaintArea); virtual void ConfigurationChanged ( utl::ConfigurationBroadcaster* pBroadcaster, diff --git a/sd/source/ui/slidesorter/inc/view/SlsILayerPainter.hxx b/sd/source/ui/slidesorter/inc/view/SlsILayerPainter.hxx index f317f70f900a..35c58de2b285 100644 --- a/sd/source/ui/slidesorter/inc/view/SlsILayerPainter.hxx +++ b/sd/source/ui/slidesorter/inc/view/SlsILayerPainter.hxx @@ -24,7 +24,7 @@ #include <memory> class OutputDevice; -class Rectangle; +namespace tools { class Rectangle; } namespace sd { namespace slidesorter { namespace view { @@ -33,7 +33,7 @@ class ILayerInvalidator public: virtual ~ILayerInvalidator() {} - virtual void Invalidate (const Rectangle& rInvalidationBox) = 0; + virtual void Invalidate (const ::tools::Rectangle& rInvalidationBox) = 0; }; typedef std::shared_ptr<ILayerInvalidator> SharedILayerInvalidator; @@ -46,7 +46,7 @@ public: const SharedILayerInvalidator& rpInvalidator) = 0; virtual void Paint ( OutputDevice& rDevice, - const Rectangle& rRepaintArea) = 0; + const ::tools::Rectangle& rRepaintArea) = 0; }; typedef std::shared_ptr<ILayerPainter> SharedILayerPainter; diff --git a/sd/source/ui/slidesorter/inc/view/SlsInsertionIndicatorOverlay.hxx b/sd/source/ui/slidesorter/inc/view/SlsInsertionIndicatorOverlay.hxx index 8fe353ce73c2..05eb4b876df8 100644 --- a/sd/source/ui/slidesorter/inc/view/SlsInsertionIndicatorOverlay.hxx +++ b/sd/source/ui/slidesorter/inc/view/SlsInsertionIndicatorOverlay.hxx @@ -69,13 +69,13 @@ public: virtual void Paint ( OutputDevice& rDevice, - const Rectangle& rRepaintArea) override; + const ::tools::Rectangle& rRepaintArea) override; bool IsVisible() const { return mbIsVisible;} void Hide(); void Show(); - Rectangle GetBoundingBox() const; + ::tools::Rectangle GetBoundingBox() const; private: SlideSorter& mrSlideSorter; diff --git a/sd/source/ui/slidesorter/inc/view/SlsLayouter.hxx b/sd/source/ui/slidesorter/inc/view/SlsLayouter.hxx index 8860817fc101..d312fe2700ae 100644 --- a/sd/source/ui/slidesorter/inc/view/SlsLayouter.hxx +++ b/sd/source/ui/slidesorter/inc/view/SlsLayouter.hxx @@ -116,14 +116,14 @@ public: /** Return the bounding box in window coordinates of the nIndex-th page object. */ - Rectangle GetPageObjectBox ( + ::tools::Rectangle GetPageObjectBox ( const sal_Int32 nIndex, const bool bIncludeBorderAndGap) const; /** Return the bounding box in model coordinates of the page that contains the given amount of page objects. */ - Rectangle GetTotalBoundingBox() const; + ::tools::Rectangle GetTotalBoundingBox() const; /** Return the index of the first fully or partially visible page object. This takes into account only the vertical dimension. @@ -131,7 +131,7 @@ public: The second index may be larger than the number of existing page objects. */ - Range GetRangeOfVisiblePageObjects (const Rectangle& rVisibleArea) const; + Range GetRangeOfVisiblePageObjects (const ::tools::Rectangle& rVisibleArea) const; /** Return the index of the page object that is rendered at the given point. diff --git a/sd/source/ui/slidesorter/inc/view/SlsPageObjectLayouter.hxx b/sd/source/ui/slidesorter/inc/view/SlsPageObjectLayouter.hxx index 15ff687fcc04..d6df4b7aa381 100644 --- a/sd/source/ui/slidesorter/inc/view/SlsPageObjectLayouter.hxx +++ b/sd/source/ui/slidesorter/inc/view/SlsPageObjectLayouter.hxx @@ -99,7 +99,7 @@ public: Return a position ignoring the slides' location, ie. as if we were the first slide. */ - Rectangle GetBoundingBox ( + ::tools::Rectangle GetBoundingBox ( const model::SharedPageDescriptor& rpPageDescriptor, const Part ePart, const CoordinateSystem eCoordinateSystem, @@ -115,7 +115,7 @@ public: const Image& GetCustomAnimationEffectIcon() const { return maCustomAnimationEffectIcon;} private: - Rectangle GetBoundingBox ( + ::tools::Rectangle GetBoundingBox ( const Point& rPageObjectLocation, const Part ePart, const CoordinateSystem eCoordinateSystem); @@ -123,18 +123,18 @@ private: private: VclPtr<sd::Window> mpWindow; Size maPageObjectSize; - Rectangle maFocusIndicatorBoundingBox; - Rectangle maPageObjectBoundingBox; - Rectangle maPageNumberAreaBoundingBox; - Rectangle maPreviewBoundingBox; - Rectangle maTransitionEffectBoundingBox; - Rectangle maCustomAnimationEffectBoundingBox; + ::tools::Rectangle maFocusIndicatorBoundingBox; + ::tools::Rectangle maPageObjectBoundingBox; + ::tools::Rectangle maPageNumberAreaBoundingBox; + ::tools::Rectangle maPreviewBoundingBox; + ::tools::Rectangle maTransitionEffectBoundingBox; + ::tools::Rectangle maCustomAnimationEffectBoundingBox; const Image maTransitionEffectIcon; const Image maCustomAnimationEffectIcon; const std::shared_ptr<vcl::Font> mpPageNumberFont; Size GetPageNumberAreaSize (const int nPageCount); - Rectangle CalculatePreviewBoundingBox ( + ::tools::Rectangle CalculatePreviewBoundingBox ( Size& rPageObjectSize, const Size& rPreviewModelSize, const sal_Int32 nPageNumberAreaWidth, diff --git a/sd/source/ui/slidesorter/inc/view/SlsPageObjectPainter.hxx b/sd/source/ui/slidesorter/inc/view/SlsPageObjectPainter.hxx index 52c037468b12..8f151e6ff99f 100644 --- a/sd/source/ui/slidesorter/inc/view/SlsPageObjectPainter.hxx +++ b/sd/source/ui/slidesorter/inc/view/SlsPageObjectPainter.hxx @@ -99,7 +99,7 @@ private: void PaintBorder ( OutputDevice& rDevice, const Theme::GradientColorType eColorType, - const Rectangle& rBox) const; + const ::tools::Rectangle& rBox) const; void PaintBackgroundDetail( PageObjectLayouter *pPageObjectLayouter, OutputDevice& rDevice, diff --git a/sd/source/ui/slidesorter/model/SlsPageDescriptor.cxx b/sd/source/ui/slidesorter/model/SlsPageDescriptor.cxx index 105460f53f5e..39211e967b21 100644 --- a/sd/source/ui/slidesorter/model/SlsPageDescriptor.cxx +++ b/sd/source/ui/slidesorter/model/SlsPageDescriptor.cxx @@ -209,9 +209,9 @@ void PageDescriptor::SetCoreSelection() } } -Rectangle PageDescriptor::GetBoundingBox() const +::tools::Rectangle PageDescriptor::GetBoundingBox() const { - Rectangle aBox (maBoundingBox); + ::tools::Rectangle aBox (maBoundingBox); const Point aOffset (maVisualState.GetLocationOffset()); aBox.Move(aOffset.X(), aOffset.Y()); return aBox; @@ -225,7 +225,7 @@ Point PageDescriptor::GetLocation (const bool bIgnoreOffset) const return maBoundingBox.TopLeft() + maVisualState.GetLocationOffset(); } -void PageDescriptor::SetBoundingBox (const Rectangle& rBoundingBox) +void PageDescriptor::SetBoundingBox (const ::tools::Rectangle& rBoundingBox) { maBoundingBox = rBoundingBox; } diff --git a/sd/source/ui/slidesorter/shell/SlideSorter.cxx b/sd/source/ui/slidesorter/shell/SlideSorter.cxx index d7c576b51b42..9a0a758b2370 100644 --- a/sd/source/ui/slidesorter/shell/SlideSorter.cxx +++ b/sd/source/ui/slidesorter/shell/SlideSorter.cxx @@ -53,7 +53,7 @@ public: ContentWindow(vcl::Window& rParent, SlideSorter& rSlideSorter); void SetCurrentFunction (const rtl::Reference<FuPoor>& rpFunction); - virtual void Paint(vcl::RenderContext& /*rRenderContext*/, const Rectangle& rRect) override; + virtual void Paint(vcl::RenderContext& /*rRenderContext*/, const ::tools::Rectangle& rRect) override; virtual void KeyInput (const KeyEvent& rEvent) override; virtual void MouseMove (const MouseEvent& rEvent) override; virtual void MouseButtonUp (const MouseEvent& rEvent) override; @@ -235,7 +235,7 @@ Reference<frame::XController> SlideSorter::GetXController() const return xController; } -void SlideSorter::Paint (const Rectangle& rRepaintArea) +void SlideSorter::Paint (const ::tools::Rectangle& rRepaintArea) { GetController().Paint( rRepaintArea, @@ -356,7 +356,7 @@ void SlideSorter::ArrangeGUIElements ( view::SlideSorterView::DrawLock aLock (*this); GetContentWindow()->EnablePaint (false); - mpSlideSorterController->Resize (Rectangle(aOrigin, rSize)); + mpSlideSorterController->Resize (::tools::Rectangle(aOrigin, rSize)); GetContentWindow()->EnablePaint (true); @@ -444,7 +444,7 @@ void ContentWindow::SetCurrentFunction (const rtl::Reference<FuPoor>& rpFunction mpCurrentFunction = rpFunction; } -void ContentWindow::Paint (vcl::RenderContext& /*rRenderContext*/, const Rectangle& rRect) +void ContentWindow::Paint (vcl::RenderContext& /*rRenderContext*/, const ::tools::Rectangle& rRect) { mrSlideSorter.Paint(rRect); } diff --git a/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx b/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx index 6190a6007168..d56fb3f52389 100644 --- a/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx +++ b/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx @@ -436,7 +436,7 @@ void SlideSorterViewShell::ExecStatusBar (SfxRequest& ) } void SlideSorterViewShell::Paint ( - const Rectangle& rBBox, + const ::tools::Rectangle& rBBox, ::sd::Window* pWindow) { SetActiveWindow (pWindow); @@ -582,12 +582,12 @@ void SlideSorterViewShell::SetZoom (long int ) // the window. } -void SlideSorterViewShell::SetZoomRect (const Rectangle& rZoomRect) +void SlideSorterViewShell::SetZoomRect (const ::tools::Rectangle& rZoomRect) { OSL_ASSERT(mpSlideSorter.get()!=nullptr); Size aPageSize (mpSlideSorter->GetView().GetLayouter().GetPageObjectSize()); - Rectangle aRect(rZoomRect); + ::tools::Rectangle aRect(rZoomRect); if (aRect.GetWidth() < aPageSize.Width()) { diff --git a/sd/source/ui/slidesorter/view/SlideSorterView.cxx b/sd/source/ui/slidesorter/view/SlideSorterView.cxx index dbe84982651a..40a18782ff7f 100644 --- a/sd/source/ui/slidesorter/view/SlideSorterView.cxx +++ b/sd/source/ui/slidesorter/view/SlideSorterView.cxx @@ -89,7 +89,7 @@ namespace { public: explicit Painter (SlideSorterView& rView) : mrView(rView) {} - virtual void Paint (OutputDevice& rDevice, const Rectangle& rRepaintArea) override + virtual void Paint (OutputDevice& rDevice, const ::tools::Rectangle& rRepaintArea) override { mrView.Paint(rDevice,rRepaintArea); } @@ -109,7 +109,7 @@ public: BackgroundPainter(const BackgroundPainter&) = delete; BackgroundPainter& operator=(const BackgroundPainter&) = delete; - virtual void Paint (OutputDevice& rDevice, const Rectangle& rRepaintArea) override + virtual void Paint (OutputDevice& rDevice, const ::tools::Rectangle& rRepaintArea) override { rDevice.SetFillColor(maBackgroundColor); rDevice.SetLineColor(); @@ -404,7 +404,7 @@ void SlideSorterView::Layout () { // Set the model area, i.e. the smallest rectangle that includes all // page objects. - const Rectangle aViewBox (mpLayouter->GetTotalBoundingBox()); + const ::tools::Rectangle aViewBox (mpLayouter->GetTotalBoundingBox()); pWindow->SetViewOrigin (aViewBox.TopLeft()); pWindow->SetViewSize (aViewBox.GetSize()); @@ -448,7 +448,7 @@ void SlideSorterView::DeterminePageObjectVisibilities() // visibility calculation can correctly invalidate it again. mbPageObjectVisibilitiesValid = true; - Rectangle aViewArea (pWindow->PixelToLogic(Rectangle(Point(0,0),pWindow->GetSizePixel()))); + ::tools::Rectangle aViewArea (pWindow->PixelToLogic(::tools::Rectangle(Point(0,0),pWindow->GetSizePixel()))); const Range aRange (mpLayouter->GetRangeOfVisiblePageObjects(aViewArea)); const Range aUnion( ::std::min(maVisiblePageRange.Min(), aRange.Min()), @@ -540,7 +540,7 @@ void SlideSorterView::RequestRepaint() if (pWindow) { mpLayeredDevice->InvalidateAllLayers( - Rectangle( + ::tools::Rectangle( pWindow->PixelToLogic(Point(0,0)), pWindow->PixelToLogic(pWindow->GetSizePixel()))); pWindow->Invalidate(); @@ -553,7 +553,7 @@ void SlideSorterView::RequestRepaint (const model::SharedPageDescriptor& rpDescr RequestRepaint(rpDescriptor->GetBoundingBox()); } -void SlideSorterView::RequestRepaint (const Rectangle& rRepaintBox) +void SlideSorterView::RequestRepaint (const ::tools::Rectangle& rRepaintBox) { sd::Window *pWindow (mrSlideSorter.GetContentWindow().get()); if (pWindow) @@ -573,7 +573,7 @@ void SlideSorterView::RequestRepaint (const vcl::Region& rRepaintRegion) } } -Rectangle SlideSorterView::GetModelArea() +::tools::Rectangle SlideSorterView::GetModelArea() { return mpLayouter->GetTotalBoundingBox(); } @@ -645,7 +645,7 @@ void SlideSorterView::CompleteRedraw ( void SlideSorterView::Paint ( OutputDevice& rDevice, - const Rectangle& rRepaintArea) + const ::tools::Rectangle& rRepaintArea) { if ( ! mpPageObjectPainter) if ( ! GetPageObjectPainter()) @@ -759,7 +759,7 @@ void SlideSorterView::UpdatePageUnderMouse () if (pWindow && pWindow->IsVisible() && ! pWindow->IsMouseCaptured()) { const Window::PointerState aPointerState (pWindow->GetPointerState()); - const Rectangle aWindowBox (pWindow->GetPosPixel(), pWindow->GetSizePixel()); + const ::tools::Rectangle aWindowBox (pWindow->GetPosPixel(), pWindow->GetSizePixel()); if (aWindowBox.IsInside(aPointerState.maPos)) { UpdatePageUnderMouse(aPointerState.maPos); diff --git a/sd/source/ui/slidesorter/view/SlsFramePainter.cxx b/sd/source/ui/slidesorter/view/SlsFramePainter.cxx index b54b666d5924..05c97f6a6c51 100644 --- a/sd/source/ui/slidesorter/view/SlsFramePainter.cxx +++ b/sd/source/ui/slidesorter/view/SlsFramePainter.cxx @@ -55,7 +55,7 @@ FramePainter::~FramePainter() void FramePainter::PaintFrame ( OutputDevice& rDevice, - const Rectangle& rBox) const + const ::tools::Rectangle& rBox) const { if ( ! mbIsValid) return; @@ -214,7 +214,7 @@ void FramePainter::OffsetBitmap::PaintSide ( void FramePainter::OffsetBitmap::PaintCenter ( OutputDevice& rDevice, - const Rectangle& rBox) const + const ::tools::Rectangle& rBox) const { const Size aBitmapSize (maBitmap.GetSizePixel()); for (long nY=rBox.Top(); nY<=rBox.Bottom(); nY+=aBitmapSize.Height()) diff --git a/sd/source/ui/slidesorter/view/SlsFramePainter.hxx b/sd/source/ui/slidesorter/view/SlsFramePainter.hxx index 5ce2ee6d06d0..1fbb22db620d 100644 --- a/sd/source/ui/slidesorter/view/SlsFramePainter.hxx +++ b/sd/source/ui/slidesorter/view/SlsFramePainter.hxx @@ -33,7 +33,7 @@ public: /** Paint a border around the given box by using a set of bitmaps for the corners and sides. */ - void PaintFrame (OutputDevice&rDevice, const Rectangle& rBox) const; + void PaintFrame (OutputDevice&rDevice, const ::tools::Rectangle& rBox) const; /** Special functionality that takes the color from the center bitmap and replaces that color in all bitmaps by the given new @@ -91,7 +91,7 @@ private: */ void PaintCenter ( OutputDevice& rDevice, - const Rectangle& rBox) const; + const ::tools::Rectangle& rBox) const; }; OffsetBitmap maTopLeft; OffsetBitmap maTop; diff --git a/sd/source/ui/slidesorter/view/SlsInsertAnimator.cxx b/sd/source/ui/slidesorter/view/SlsInsertAnimator.cxx index 778fa8d4d4e8..7677b9015d0e 100644 --- a/sd/source/ui/slidesorter/view/SlsInsertAnimator.cxx +++ b/sd/source/ui/slidesorter/view/SlsInsertAnimator.cxx @@ -361,7 +361,7 @@ void PageObjectRun::ResetOffsets (const controller::Animator::AnimationMode eMod maStartOffset[nIndex] = pDescriptor->GetVisualState().GetLocationOffset(); else { - const Rectangle aOldBoundingBox (pDescriptor->GetBoundingBox()); + const ::tools::Rectangle aOldBoundingBox (pDescriptor->GetBoundingBox()); pDescriptor->GetVisualState().SetLocationOffset(Point(0,0)); rView.RequestRepaint(aOldBoundingBox); rView.RequestRepaint(pDescriptor); @@ -409,7 +409,7 @@ void PageObjectRun::operator () (const double nGlobalTime) model::SharedPageDescriptor pDescriptor (rModel.GetPageDescriptor(nIndex)); if ( ! pDescriptor) continue; - const Rectangle aOldBoundingBox (pDescriptor->GetBoundingBox()); + const ::tools::Rectangle aOldBoundingBox (pDescriptor->GetBoundingBox()); pDescriptor->GetVisualState().SetLocationOffset( Blend( maStartOffset[nIndex-mnStartIndex], diff --git a/sd/source/ui/slidesorter/view/SlsInsertionIndicatorOverlay.cxx b/sd/source/ui/slidesorter/view/SlsInsertionIndicatorOverlay.cxx index 9c8b3c98ff93..036ebc2c15a2 100644 --- a/sd/source/ui/slidesorter/view/SlsInsertionIndicatorOverlay.cxx +++ b/sd/source/ui/slidesorter/view/SlsInsertionIndicatorOverlay.cxx @@ -43,9 +43,9 @@ namespace { static const double gnPreviewOffsetScale = 1.0 / 8.0; -Rectangle GrowRectangle (const Rectangle& rBox, const sal_Int32 nOffset) +::tools::Rectangle GrowRectangle (const ::tools::Rectangle& rBox, const sal_Int32 nOffset) { - return Rectangle ( + return ::tools::Rectangle ( rBox.Left() - nOffset, rBox.Top() - nOffset, rBox.Right() + nOffset, @@ -192,7 +192,7 @@ Point InsertionIndicatorOverlay::PaintRepresentatives ( if (rRepresentatives[nIndex].mbIsExcluded) { const vcl::Region aSavedClipRegion (rContent.GetClipRegion()); - rContent.IntersectClipRegion(Rectangle(aPageOffset, rPreviewSize)); + rContent.IntersectClipRegion(::tools::Rectangle(aPageOffset, rPreviewSize)); // Paint bitmap tiled over the preview to mark it as excluded. const sal_Int32 nIconWidth (aExclusionOverlay.GetSizePixel().Width()); const sal_Int32 nIconHeight (aExclusionOverlay.GetSizePixel().Height()); @@ -206,7 +206,7 @@ Point InsertionIndicatorOverlay::PaintRepresentatives ( } // Tone down the bitmap. The further back the darker it becomes. - Rectangle aBox ( + ::tools::Rectangle aBox ( aPageOffset.X(), aPageOffset.Y(), aPageOffset.X()+rPreviewSize.Width()-1, @@ -221,7 +221,7 @@ Point InsertionIndicatorOverlay::PaintRepresentatives ( nTransparency); // Draw border around preview. - Rectangle aBorderBox (GrowRectangle(aBox, 1)); + ::tools::Rectangle aBorderBox (GrowRectangle(aBox, 1)); rContent.SetLineColor(COL_GRAY); rContent.SetFillColor(); rContent.DrawRect(aBorderBox); @@ -249,7 +249,7 @@ void InsertionIndicatorOverlay::PaintPageCount ( // Determine the size of the (painted) text and create a bounding // box that centers the text on the first preview. rDevice.SetFont(*pFont); - Rectangle aTextBox; + ::tools::Rectangle aTextBox; rDevice.GetTextBoundRect(aTextBox, sNumber); Point aTextOffset (aTextBox.TopLeft()); Size aTextSize (aTextBox.GetSize()); @@ -259,7 +259,7 @@ void InsertionIndicatorOverlay::PaintPageCount ( aTextLocation += Point( (rPreviewSize.Width()-aTextBox.GetWidth())/2, (rPreviewSize.Height()-aTextBox.GetHeight())/2); - aTextBox = Rectangle(aTextLocation, aTextSize); + aTextBox = ::tools::Rectangle(aTextLocation, aTextSize); // Paint background, border and text. static const sal_Int32 nBorder = 5; @@ -284,7 +284,7 @@ void InsertionIndicatorOverlay::SetLocation (const Point& rLocation) maIcon.GetSizePixel().Height()/2)); if (maLocation != aTopLeft) { - const Rectangle aOldBoundingBox (GetBoundingBox()); + const ::tools::Rectangle aOldBoundingBox (GetBoundingBox()); maLocation = aTopLeft; @@ -298,7 +298,7 @@ void InsertionIndicatorOverlay::SetLocation (const Point& rLocation) void InsertionIndicatorOverlay::Paint ( OutputDevice& rDevice, - const Rectangle& rRepaintArea) + const ::tools::Rectangle& rRepaintArea) { (void)rRepaintArea; @@ -350,9 +350,9 @@ void InsertionIndicatorOverlay::Hide() } } -Rectangle InsertionIndicatorOverlay::GetBoundingBox() const +::tools::Rectangle InsertionIndicatorOverlay::GetBoundingBox() const { - return Rectangle(maLocation, maIcon.GetSizePixel()); + return ::tools::Rectangle(maLocation, maIcon.GetSizePixel()); } Size InsertionIndicatorOverlay::GetSize() const diff --git a/sd/source/ui/slidesorter/view/SlsLayeredDevice.cxx b/sd/source/ui/slidesorter/view/SlsLayeredDevice.cxx index dcff6a61d45d..276dc2cd791b 100644 --- a/sd/source/ui/slidesorter/view/SlsLayeredDevice.cxx +++ b/sd/source/ui/slidesorter/view/SlsLayeredDevice.cxx @@ -45,7 +45,7 @@ public: { } - virtual void Invalidate (const Rectangle& rInvalidationBox) override + virtual void Invalidate (const ::tools::Rectangle& rInvalidationBox) override { mpLayeredDevice->Invalidate(rInvalidationBox, mnLayer); mpTargetWindow->Invalidate(rInvalidationBox); @@ -60,7 +60,7 @@ private: void DeviceCopy ( vcl::RenderContext& rTargetDevice, vcl::RenderContext& rSourceDevice, - const Rectangle& rBox) + const ::tools::Rectangle& rBox) { rTargetDevice.DrawOutDev( rBox.TopLeft(), @@ -70,7 +70,7 @@ void DeviceCopy ( rSourceDevice); } -void ForAllRectangles (const vcl::Region& rRegion, const std::function<void (const Rectangle&)>& aFunction) +void ForAllRectangles (const vcl::Region& rRegion, const std::function<void (const ::tools::Rectangle&)>& aFunction) { OSL_ASSERT(aFunction); RectangleVector aRectangles; @@ -78,7 +78,7 @@ void ForAllRectangles (const vcl::Region& rRegion, const std::function<void (con if(0 == aRectangles.size()) { - aFunction(Rectangle()); + aFunction(::tools::Rectangle()); } else { @@ -104,12 +104,12 @@ public: Layer& operator=(const Layer&) = delete; void Initialize (sd::Window *pTargetWindow); - void InvalidateRectangle (const Rectangle& rInvalidationBox); + void InvalidateRectangle (const ::tools::Rectangle& rInvalidationBox); void InvalidateRegion (const vcl::Region& rInvalidationRegion); void Validate (const MapMode& rMapMode); void Repaint ( OutputDevice& rTargetDevice, - const Rectangle& rRepaintRectangle); + const ::tools::Rectangle& rRepaintRectangle); void Resize (const Size& rSize); void AddPainter (const SharedILayerPainter& rpPainter); void RemovePainter (const SharedILayerPainter& rpPainter); @@ -121,7 +121,7 @@ private: ::std::vector<SharedILayerPainter> maPainters; vcl::Region maInvalidationRegion; - void ValidateRectangle (const Rectangle& rBox); + void ValidateRectangle (const ::tools::Rectangle& rBox); }; typedef std::shared_ptr<Layer> SharedLayer; @@ -169,7 +169,7 @@ LayeredDevice::~LayeredDevice() } void LayeredDevice::Invalidate ( - const Rectangle& rInvalidationArea, + const ::tools::Rectangle& rInvalidationArea, const sal_Int32 nLayer) { if (nLayer<0 || size_t(nLayer)>=mpLayers->size()) @@ -181,7 +181,7 @@ void LayeredDevice::Invalidate ( (*mpLayers)[nLayer]->InvalidateRectangle(rInvalidationArea); } -void LayeredDevice::InvalidateAllLayers (const Rectangle& rInvalidationArea) +void LayeredDevice::InvalidateAllLayers (const ::tools::Rectangle& rInvalidationArea) { for (size_t nLayer=0; nLayer<mpLayers->size(); ++nLayer) (*mpLayers)[nLayer]->InvalidateRectangle(rInvalidationArea); @@ -260,10 +260,10 @@ void LayeredDevice::Repaint (const vcl::Region& rRepaintRegion) } ForAllRectangles(rRepaintRegion, - [this] (Rectangle const& r) { this->RepaintRectangle(r); }); + [this] (::tools::Rectangle const& r) { this->RepaintRectangle(r); }); } -void LayeredDevice::RepaintRectangle (const Rectangle& rRepaintRectangle) +void LayeredDevice::RepaintRectangle (const ::tools::Rectangle& rRepaintRectangle) { if (mpLayers->empty()) return; @@ -311,8 +311,8 @@ bool LayeredDevice::HandleMapModeChange() if (maSavedMapMode == rMapMode) return false; - const Rectangle aLogicWindowBox ( - mpTargetWindow->PixelToLogic(Rectangle(Point(0,0), mpTargetWindow->GetSizePixel()))); + const ::tools::Rectangle aLogicWindowBox ( + mpTargetWindow->PixelToLogic(::tools::Rectangle(Point(0,0), mpTargetWindow->GetSizePixel()))); if (maSavedMapMode.GetScaleX() != rMapMode.GetScaleX() || maSavedMapMode.GetScaleY() != rMapMode.GetScaleY() || maSavedMapMode.GetMapUnit() != rMapMode.GetMapUnit()) @@ -331,27 +331,27 @@ bool LayeredDevice::HandleMapModeChange() aLogicWindowBox.GetSize()); // Invalidate the area(s) that have been exposed. - const Rectangle aWindowBox (Point(0,0), mpTargetWindow->GetSizePixel()); + const ::tools::Rectangle aWindowBox (Point(0,0), mpTargetWindow->GetSizePixel()); if (aDelta.Y() < 0) - InvalidateAllLayers(mpTargetWindow->PixelToLogic(Rectangle( + InvalidateAllLayers(mpTargetWindow->PixelToLogic(::tools::Rectangle( aWindowBox.Left(), aWindowBox.Bottom()+aDelta.Y(), aWindowBox.Right(), aWindowBox.Bottom()))); else if (aDelta.Y() > 0) - InvalidateAllLayers(mpTargetWindow->PixelToLogic(Rectangle( + InvalidateAllLayers(mpTargetWindow->PixelToLogic(::tools::Rectangle( aWindowBox.Left(), aWindowBox.Top(), aWindowBox.Right(), aWindowBox.Top()+aDelta.Y()))); if (aDelta.X() < 0) - InvalidateAllLayers(mpTargetWindow->PixelToLogic(Rectangle( + InvalidateAllLayers(mpTargetWindow->PixelToLogic(::tools::Rectangle( aWindowBox.Right()+aDelta.X(), aWindowBox.Top(), aWindowBox.Right(), aWindowBox.Bottom()))); else if (aDelta.X() > 0) - InvalidateAllLayers(mpTargetWindow->PixelToLogic(Rectangle( + InvalidateAllLayers(mpTargetWindow->PixelToLogic(::tools::Rectangle( aWindowBox.Left(), aWindowBox.Top(), aWindowBox.Left()+aDelta.X(), @@ -390,7 +390,7 @@ void Layer::Initialize (sd::Window *pTargetWindow) #endif } -void Layer::InvalidateRectangle (const Rectangle& rInvalidationBox) +void Layer::InvalidateRectangle (const ::tools::Rectangle& rInvalidationBox) { maInvalidationRegion.Union(rInvalidationBox); } @@ -410,11 +410,11 @@ void Layer::Validate (const MapMode& rMapMode) mpLayerDevice->SetMapMode(rMapMode); ForAllRectangles( aRegion, - [this] (Rectangle const& r) { return this->ValidateRectangle(r); }); + [this] (::tools::Rectangle const& r) { return this->ValidateRectangle(r); }); } } -void Layer::ValidateRectangle (const Rectangle& rBox) +void Layer::ValidateRectangle (const ::tools::Rectangle& rBox) { if ( ! mpLayerDevice) return; @@ -435,7 +435,7 @@ void Layer::ValidateRectangle (const Rectangle& rBox) void Layer::Repaint ( OutputDevice& rTargetDevice, - const Rectangle& rRepaintRectangle) + const ::tools::Rectangle& rRepaintRectangle) { if (mpLayerDevice) { @@ -455,7 +455,7 @@ void Layer::Resize (const Size& rSize) if (mpLayerDevice) { mpLayerDevice->SetOutputSizePixel(rSize); - maInvalidationRegion = Rectangle(Point(0,0), rSize); + maInvalidationRegion = ::tools::Rectangle(Point(0,0), rSize); } } diff --git a/sd/source/ui/slidesorter/view/SlsLayeredDevice.hxx b/sd/source/ui/slidesorter/view/SlsLayeredDevice.hxx index b6d34433bc5b..487f97963774 100644 --- a/sd/source/ui/slidesorter/view/SlsLayeredDevice.hxx +++ b/sd/source/ui/slidesorter/view/SlsLayeredDevice.hxx @@ -29,7 +29,7 @@ #include <memory> #include <vector> -class Rectangle; +namespace tools { class Rectangle; } namespace sd { namespace slidesorter { namespace view { @@ -46,10 +46,10 @@ public: ~LayeredDevice (); void Invalidate ( - const Rectangle& rInvalidationBox, + const ::tools::Rectangle& rInvalidationBox, const sal_Int32 nLayer); void InvalidateAllLayers ( - const Rectangle& rInvalidationBox); + const ::tools::Rectangle& rInvalidationBox); void InvalidateAllLayers ( const vcl::Region& rInvalidationRegion); @@ -75,7 +75,7 @@ private: ScopedVclPtr<VirtualDevice> mpBackBuffer; MapMode maSavedMapMode; - void RepaintRectangle (const Rectangle& rRepaintRectangle); + void RepaintRectangle (const ::tools::Rectangle& rRepaintRectangle); }; } } } // end of namespace ::sd::slidesorter::view diff --git a/sd/source/ui/slidesorter/view/SlsLayouter.cxx b/sd/source/ui/slidesorter/view/SlsLayouter.cxx index e2d321defa80..1728cc390c3f 100644 --- a/sd/source/ui/slidesorter/view/SlsLayouter.cxx +++ b/sd/source/ui/slidesorter/view/SlsLayouter.cxx @@ -168,33 +168,33 @@ public: /** Return the bounding box of the preview or, when selected, of the page object. Thus, it returns something like a visual bounding box. */ - Rectangle GetInnerBoundingBox ( + ::tools::Rectangle GetInnerBoundingBox ( model::SlideSorterModel& rModel, const sal_Int32 nIndex) const; Range GetValidHorizontalSizeRange() const; Range GetValidVerticalSizeRange() const; - Range GetRangeOfVisiblePageObjects (const Rectangle& aVisibleArea) const; + Range GetRangeOfVisiblePageObjects (const ::tools::Rectangle& aVisibleArea) const; sal_Int32 GetIndex ( const sal_Int32 nRow, const sal_Int32 nColumn, const bool bClampToValidRange) const; - Rectangle GetPageObjectBox ( + ::tools::Rectangle GetPageObjectBox ( const sal_Int32 nIndex, const bool bIncludeBorderAndGap = false) const; - Rectangle GetPageObjectBox ( + ::tools::Rectangle GetPageObjectBox ( const sal_Int32 nRow, const sal_Int32 nColumn) const; - Rectangle AddBorderAndGap ( - const Rectangle& rBoundingBox, + ::tools::Rectangle AddBorderAndGap ( + const ::tools::Rectangle& rBoundingBox, const sal_Int32 nRow, const sal_Int32 nColumn) const; - Rectangle GetTotalBoundingBox() const; + ::tools::Rectangle GetTotalBoundingBox() const; virtual ~Implementation(); @@ -348,14 +348,14 @@ Size Layouter::GetPageObjectSize() const return mpImplementation->maPageObjectSize; } -Rectangle Layouter::GetPageObjectBox ( +::tools::Rectangle Layouter::GetPageObjectBox ( const sal_Int32 nIndex, const bool bIncludeBorderAndGap) const { return mpImplementation->GetPageObjectBox(nIndex, bIncludeBorderAndGap); } -Rectangle Layouter::GetTotalBoundingBox() const +::tools::Rectangle Layouter::GetTotalBoundingBox() const { return mpImplementation->GetTotalBoundingBox(); } @@ -387,7 +387,7 @@ Range Layouter::GetValidVerticalSizeRange() const return mpImplementation->GetValidVerticalSizeRange(); } -Range Layouter::GetRangeOfVisiblePageObjects (const Rectangle& aVisibleArea) const +Range Layouter::GetRangeOfVisiblePageObjects (const ::tools::Rectangle& aVisibleArea) const { return mpImplementation->GetRangeOfVisiblePageObjects(aVisibleArea); } @@ -687,8 +687,8 @@ void Layouter::Implementation::CalculateGeometricPosition ( if (rPosition.IsAtRunStart()) { // Place indicator at the top of the column. - const Rectangle aOuterBox (GetPageObjectBox(nIndex)); - const Rectangle aInnerBox (GetInnerBoundingBox(rModel, nIndex)); + const ::tools::Rectangle aOuterBox (GetPageObjectBox(nIndex)); + const ::tools::Rectangle aInnerBox (GetInnerBoundingBox(rModel, nIndex)); if (bIsVertical) { nLeadingLocation = aOuterBox.Top(); @@ -707,8 +707,8 @@ void Layouter::Implementation::CalculateGeometricPosition ( { // Place indicator at the bottom/right of the column/row. - const Rectangle aOuterBox (GetPageObjectBox(nIndex-1)); - const Rectangle aInnerBox (GetInnerBoundingBox(rModel, nIndex-1)); + const ::tools::Rectangle aOuterBox (GetPageObjectBox(nIndex-1)); + const ::tools::Rectangle aInnerBox (GetInnerBoundingBox(rModel, nIndex-1)); if (bIsVertical) { nLeadingLocation = aInnerBox.Bottom(); @@ -728,8 +728,8 @@ void Layouter::Implementation::CalculateGeometricPosition ( else { // Place indicator between two rows/columns. - const Rectangle aBox1 (GetInnerBoundingBox(rModel, nIndex-1)); - const Rectangle aBox2 (GetInnerBoundingBox(rModel, nIndex)); + const ::tools::Rectangle aBox1 (GetInnerBoundingBox(rModel, nIndex-1)); + const ::tools::Rectangle aBox2 (GetInnerBoundingBox(rModel, nIndex)); if (bIsVertical) { nLeadingLocation = aBox1.Bottom(); @@ -786,13 +786,13 @@ void Layouter::Implementation::CalculateGeometricPosition ( } } -Rectangle Layouter::Implementation::GetInnerBoundingBox ( +::tools::Rectangle Layouter::Implementation::GetInnerBoundingBox ( model::SlideSorterModel& rModel, const sal_Int32 nIndex) const { model::SharedPageDescriptor pDescriptor (rModel.GetPageDescriptor(nIndex)); if ( ! pDescriptor) - return Rectangle(); + return ::tools::Rectangle(); PageObjectLayouter::Part ePart = PageObjectLayouter::Part::Preview; @@ -818,7 +818,7 @@ Range Layouter::Implementation::GetValidVerticalSizeRange() const mnTopBorder + maMaximalSize.Height() + mnBottomBorder); } -Range Layouter::Implementation::GetRangeOfVisiblePageObjects (const Rectangle& aVisibleArea) const +Range Layouter::Implementation::GetRangeOfVisiblePageObjects (const ::tools::Rectangle& aVisibleArea) const { const sal_Int32 nRow0 (GetRowAtPosition(aVisibleArea.Top(), true, GM_NEXT)); const sal_Int32 nCol0 (GetColumnAtPosition(aVisibleArea.Left(),true, GM_NEXT)); @@ -899,25 +899,25 @@ sal_Int32 Layouter::Implementation::GetIndex ( return -1; } -Rectangle Layouter::Implementation::GetPageObjectBox ( +::tools::Rectangle Layouter::Implementation::GetPageObjectBox ( const sal_Int32 nIndex, const bool bIncludeBorderAndGap) const { const sal_Int32 nRow (nIndex / mnColumnCount); const sal_Int32 nColumn (nIndex % mnColumnCount); - const Rectangle aBoundingBox (GetPageObjectBox(nRow,nColumn)); + const ::tools::Rectangle aBoundingBox (GetPageObjectBox(nRow,nColumn)); if (bIncludeBorderAndGap) return AddBorderAndGap(aBoundingBox, nRow, nColumn); else return aBoundingBox; } -Rectangle Layouter::Implementation::GetPageObjectBox ( +::tools::Rectangle Layouter::Implementation::GetPageObjectBox ( const sal_Int32 nRow, const sal_Int32 nColumn) const { - return Rectangle( + return ::tools::Rectangle( Point (mnLeftBorder + nColumn * maPageObjectSize.Width() + (nColumn>0 ? nColumn : 0) * mnHorizontalGap, @@ -927,12 +927,12 @@ Rectangle Layouter::Implementation::GetPageObjectBox ( maPageObjectSize); } -Rectangle Layouter::Implementation::AddBorderAndGap ( - const Rectangle& rBoundingBox, +::tools::Rectangle Layouter::Implementation::AddBorderAndGap ( + const ::tools::Rectangle& rBoundingBox, const sal_Int32 nRow, const sal_Int32 nColumn) const { - Rectangle aBoundingBox (rBoundingBox); + ::tools::Rectangle aBoundingBox (rBoundingBox); if (nColumn == 0) aBoundingBox.Left() = 0; @@ -953,7 +953,7 @@ Rectangle Layouter::Implementation::AddBorderAndGap ( return aBoundingBox; } -Rectangle Layouter::Implementation::GetTotalBoundingBox() const +::tools::Rectangle Layouter::Implementation::GetTotalBoundingBox() const { sal_Int32 nHorizontalSize = 0; sal_Int32 nVerticalSize = 0; @@ -974,7 +974,7 @@ Rectangle Layouter::Implementation::GetTotalBoundingBox() const nVerticalSize += (nRowCount-1) * mnVerticalGap; } - return Rectangle ( + return ::tools::Rectangle ( Point(0,0), Size (nHorizontalSize, nVerticalSize) ); diff --git a/sd/source/ui/slidesorter/view/SlsPageObjectLayouter.cxx b/sd/source/ui/slidesorter/view/SlsPageObjectLayouter.cxx index 119a8cc44560..49dfc8ec1f36 100644 --- a/sd/source/ui/slidesorter/view/SlsPageObjectLayouter.cxx +++ b/sd/source/ui/slidesorter/view/SlsPageObjectLayouter.cxx @@ -60,8 +60,8 @@ PageObjectLayouter::PageObjectLayouter ( Size(rPageSize.Width(), rPageSize.Height()), aPageNumberAreaSize.Width(), nFocusIndicatorWidth); - maFocusIndicatorBoundingBox = Rectangle(Point(0,0), maPageObjectSize); - maPageObjectBoundingBox = Rectangle( + maFocusIndicatorBoundingBox = ::tools::Rectangle(Point(0,0), maPageObjectSize); + maPageObjectBoundingBox = ::tools::Rectangle( Point( nFocusIndicatorWidth, nFocusIndicatorWidth), @@ -69,7 +69,7 @@ PageObjectLayouter::PageObjectLayouter ( maPageObjectSize.Width()-2*nFocusIndicatorWidth, maPageObjectSize.Height()-2*nFocusIndicatorWidth)); - maPageNumberAreaBoundingBox = Rectangle( + maPageNumberAreaBoundingBox = ::tools::Rectangle( Point( std::max(gnLeftPageNumberOffset, sal_Int32(maPreviewBoundingBox.Left() @@ -79,12 +79,12 @@ PageObjectLayouter::PageObjectLayouter ( aPageNumberAreaSize); const Size aIconSize (maTransitionEffectIcon.GetSizePixel()); - maTransitionEffectBoundingBox = Rectangle( + maTransitionEffectBoundingBox = ::tools::Rectangle( Point( (maPreviewBoundingBox.Left() - 2*aIconSize.Width()) / 2, maPreviewBoundingBox.Bottom() - aIconSize.Height()), aIconSize); - maCustomAnimationEffectBoundingBox = Rectangle( + maCustomAnimationEffectBoundingBox = ::tools::Rectangle( Point( (maPreviewBoundingBox.Left() - 2*aIconSize.Width()) / 2, maPreviewBoundingBox.Bottom() - 2*aIconSize.Height()), @@ -95,7 +95,7 @@ PageObjectLayouter::~PageObjectLayouter() { } -Rectangle PageObjectLayouter::CalculatePreviewBoundingBox ( +::tools::Rectangle PageObjectLayouter::CalculatePreviewBoundingBox ( Size& rPageObjectSize, const Size& rPageSize, const sal_Int32 nPageNumberAreaWidth, @@ -151,14 +151,14 @@ Rectangle PageObjectLayouter::CalculatePreviewBoundingBox ( const int nLeft (rPageObjectSize.Width() - gnOuterBorderWidth - nPreviewWidth - nFocusIndicatorWidth - 1); const int nTop ((rPageObjectSize.Height() - nPreviewHeight)/2); - return Rectangle( + return ::tools::Rectangle( nLeft, nTop, nLeft + nPreviewWidth, nTop + nPreviewHeight); } -Rectangle PageObjectLayouter::GetBoundingBox ( +::tools::Rectangle PageObjectLayouter::GetBoundingBox ( const model::SharedPageDescriptor& rpPageDescriptor, const Part ePart, const CoordinateSystem eCoordinateSystem, @@ -171,12 +171,12 @@ Rectangle PageObjectLayouter::GetBoundingBox ( return GetBoundingBox(aLocation, ePart, eCoordinateSystem); } -Rectangle PageObjectLayouter::GetBoundingBox ( +::tools::Rectangle PageObjectLayouter::GetBoundingBox ( const Point& rPageObjectLocation, const Part ePart, const CoordinateSystem eCoordinateSystem) { - Rectangle aBoundingBox; + ::tools::Rectangle aBoundingBox; switch (ePart) { case Part::FocusIndicator: @@ -208,7 +208,7 @@ Rectangle PageObjectLayouter::GetBoundingBox ( if (eCoordinateSystem == WindowCoordinateSystem) aLocation += mpWindow->GetMapMode().GetOrigin(); - return Rectangle( + return ::tools::Rectangle( aBoundingBox.TopLeft() + aLocation, aBoundingBox.BottomRight() + aLocation); } diff --git a/sd/source/ui/slidesorter/view/SlsPageObjectPainter.cxx b/sd/source/ui/slidesorter/view/SlsPageObjectPainter.cxx index ea5fc5bcb2f4..51d361205b36 100644 --- a/sd/source/ui/slidesorter/view/SlsPageObjectPainter.cxx +++ b/sd/source/ui/slidesorter/view/SlsPageObjectPainter.cxx @@ -119,7 +119,7 @@ void PageObjectPainter::PaintBackground ( { rDevice.SetFillColor(pPage->GetPageBackgroundColor(nullptr)); rDevice.SetLineColor(pPage->GetPageBackgroundColor(nullptr)); - const Rectangle aPreviewBox (pPageObjectLayouter->GetBoundingBox( + const ::tools::Rectangle aPreviewBox (pPageObjectLayouter->GetBoundingBox( rpDescriptor, PageObjectLayouter::Part::Preview, PageObjectLayouter::ModelCoordinateSystem)); @@ -132,7 +132,7 @@ void PageObjectPainter::PaintPreview ( OutputDevice& rDevice, const model::SharedPageDescriptor& rpDescriptor) const { - const Rectangle aBox (pPageObjectLayouter->GetBoundingBox( + const ::tools::Rectangle aBox (pPageObjectLayouter->GetBoundingBox( rpDescriptor, PageObjectLayouter::Part::Preview, PageObjectLayouter::ModelCoordinateSystem)); @@ -192,7 +192,7 @@ Bitmap PageObjectPainter::GetPreviewBitmap ( PageObjectLayouter *pPageObjectLayouter = mrLayouter.GetPageObjectLayouter().get(); Bitmap aMarkedPreview (mpCache->GetMarkedPreviewBitmap(pPage)); - const Rectangle aPreviewBox (pPageObjectLayouter->GetBoundingBox( + const ::tools::Rectangle aPreviewBox (pPageObjectLayouter->GetBoundingBox( rpDescriptor, PageObjectLayouter::Part::Preview, PageObjectLayouter::ModelCoordinateSystem)); @@ -218,7 +218,7 @@ void PageObjectPainter::PaintPageNumber ( OutputDevice& rDevice, const model::SharedPageDescriptor& rpDescriptor) const { - const Rectangle aBox (pPageObjectLayouter->GetBoundingBox( + const ::tools::Rectangle aBox (pPageObjectLayouter->GetBoundingBox( rpDescriptor, PageObjectLayouter::Part::PageNumber, PageObjectLayouter::ModelCoordinateSystem)); @@ -274,7 +274,7 @@ void PageObjectPainter::PaintTransitionEffect ( const SdPage* pPage = rpDescriptor->GetPage(); if (pPage!=nullptr && pPage->getTransitionType() > 0) { - const Rectangle aBox (pPageObjectLayouter->GetBoundingBox( + const ::tools::Rectangle aBox (pPageObjectLayouter->GetBoundingBox( rpDescriptor, PageObjectLayouter::Part::TransitionEffectIndicator, PageObjectLayouter::ModelCoordinateSystem)); @@ -296,7 +296,7 @@ void PageObjectPainter::PaintCustomAnimationEffect ( EffectSequence::iterator aEnd = aMainSequence->getEnd(); if ( aIter != aEnd ) { - const Rectangle aBox (pPageObjectLayouter->GetBoundingBox( + const ::tools::Rectangle aBox (pPageObjectLayouter->GetBoundingBox( rpDescriptor, PageObjectLayouter::Part::CustomAnimationEffectIndicator, PageObjectLayouter::ModelCoordinateSystem)); @@ -364,12 +364,12 @@ void PageObjectPainter::PaintBackgroundDetail ( break; } - const Rectangle aFocusSize (pPageObjectLayouter->GetBoundingBox( + const ::tools::Rectangle aFocusSize (pPageObjectLayouter->GetBoundingBox( rpDescriptor, PageObjectLayouter::Part::FocusIndicator, PageObjectLayouter::ModelCoordinateSystem)); - const Rectangle aPageObjectBox (pPageObjectLayouter->GetBoundingBox( + const ::tools::Rectangle aPageObjectBox (pPageObjectLayouter->GetBoundingBox( rpDescriptor, PageObjectLayouter::Part::PageObject, PageObjectLayouter::ModelCoordinateSystem)); @@ -428,18 +428,18 @@ void PageObjectPainter::PaintBackgroundDetail ( // Get bounding box of the preview around which a shadow is painted. // Compensate for the border around the preview. - const Rectangle aBox (pPageObjectLayouter->GetBoundingBox( + const ::tools::Rectangle aBox (pPageObjectLayouter->GetBoundingBox( rpDescriptor, PageObjectLayouter::Part::Preview, PageObjectLayouter::ModelCoordinateSystem)); - Rectangle aFrameBox (aBox.Left()-1,aBox.Top()-1,aBox.Right()+1,aBox.Bottom()+1); + ::tools::Rectangle aFrameBox (aBox.Left()-1,aBox.Top()-1,aBox.Right()+1,aBox.Bottom()+1); mpShadowPainter->PaintFrame(rDevice, aFrameBox); } void PageObjectPainter::PaintBorder ( OutputDevice& rDevice, const Theme::GradientColorType eColorType, - const Rectangle& rBox) const + const ::tools::Rectangle& rBox) const { rDevice.SetFillColor(); const sal_Int32 nBorderWidth (1); diff --git a/sd/source/ui/slidesorter/view/SlsToolTip.cxx b/sd/source/ui/slidesorter/view/SlsToolTip.cxx index cd312e40708d..515520b8371a 100644 --- a/sd/source/ui/slidesorter/view/SlsToolTip.cxx +++ b/sd/source/ui/slidesorter/view/SlsToolTip.cxx @@ -107,7 +107,7 @@ void ToolTip::DoShow() sd::Window *pWindow (mrSlideSorter.GetContentWindow().get()); if (!msCurrentHelpText.isEmpty() && pWindow) { - Rectangle aBox ( + ::tools::Rectangle aBox ( mrSlideSorter.GetView().GetLayouter().GetPageObjectLayouter()->GetBoundingBox( mpDescriptor, PageObjectLayouter::Part::Preview, diff --git a/sd/source/ui/table/TableDesignPane.cxx b/sd/source/ui/table/TableDesignPane.cxx index 09ed83994e95..4a84a52be381 100644 --- a/sd/source/ui/table/TableDesignPane.cxx +++ b/sd/source/ui/table/TableDesignPane.cxx @@ -635,7 +635,7 @@ const Bitmap CreateDesignPreview( const Reference< XIndexAccess >& xTableStyle, if( xCellInfo.get() ) { // fill cell background - const Rectangle aRect( nX, nY, nX + nCellWidth - 1, nY + nCellHeight - 1 ); + const ::tools::Rectangle aRect( nX, nY, nX + nCellWidth - 1, nY + nCellHeight - 1 ); if( xCellInfo->maCellColor.GetColor() != COL_TRANSPARENT ) { diff --git a/sd/source/ui/table/tablefunction.cxx b/sd/source/ui/table/tablefunction.cxx index 2ab095e09c29..69878f2ef874 100644 --- a/sd/source/ui/table/tablefunction.cxx +++ b/sd/source/ui/table/tablefunction.cxx @@ -137,7 +137,7 @@ void DrawViewShell::FuTable(SfxRequest& rReq) nRows = pDlg->getRows(); } - Rectangle aRect; + ::tools::Rectangle aRect; SdrObject* pPickObj = mpView->GetEmptyPresentationObject( PRESOBJ_TABLE ); if( pPickObj ) @@ -150,7 +150,7 @@ void DrawViewShell::FuTable(SfxRequest& rReq) Size aSize( 14100, 2000 ); Point aPos; - Rectangle aWinRect(aPos, GetActiveWindow()->GetOutputSizePixel()); + ::tools::Rectangle aWinRect(aPos, GetActiveWindow()->GetOutputSizePixel()); aWinRect = GetActiveWindow()->PixelToLogic(aWinRect); // make sure that the default size of the table fits on the paper and is inside the viewing area. @@ -160,7 +160,7 @@ void DrawViewShell::FuTable(SfxRequest& rReq) if (comphelper::LibreOfficeKit::isActive()) { // aWinRect is nonsensical in the LOK case - aWinRect = Rectangle(aPos, aMaxSize); + aWinRect = ::tools::Rectangle(aPos, aMaxSize); } else { @@ -184,7 +184,7 @@ void DrawViewShell::FuTable(SfxRequest& rReq) aPos = aWinRect.Center(); aPos.X() -= aSize.Width() / 2; aPos.Y() -= aSize.Height() / 2; - aRect = Rectangle(aPos, aSize); + aRect = ::tools::Rectangle(aPos, aSize); } sdr::table::SdrTableObj* pObj = new sdr::table::SdrTableObj( GetDoc(), aRect, nColumns, nRows ); @@ -275,7 +275,7 @@ void CreateTableFromRTF( SvStream& rStream, SdDrawDocument* pModel ) { Size aSize( 200, 200 ); Point aPos; - Rectangle aRect (aPos, aSize); + ::tools::Rectangle aRect (aPos, aSize); sdr::table::SdrTableObj* pObj = new sdr::table::SdrTableObj( pModel, aRect, 1, 1 ); pObj->NbcSetStyleSheet( pModel->GetDefaultStyleSheet(), true ); OUString sTableStyle; diff --git a/sd/source/ui/tools/PreviewRenderer.cxx b/sd/source/ui/tools/PreviewRenderer.cxx index f174577eef6c..d8096c27e53c 100644 --- a/sd/source/ui/tools/PreviewRenderer.cxx +++ b/sd/source/ui/tools/PreviewRenderer.cxx @@ -170,7 +170,7 @@ Image PreviewRenderer::RenderSubstitution ( mpPreviewDevice->SetMapMode (aMapMode); // Clear the background. - const Rectangle aPaintRectangle ( + const ::tools::Rectangle aPaintRectangle ( Point(0,0), mpPreviewDevice->GetOutputSizePixel()); mpPreviewDevice->EnableMapMode(false); @@ -277,7 +277,7 @@ void PreviewRenderer::PaintPage ( const bool bDisplayPresentationObjects) { // Paint the page. - Rectangle aPaintRectangle (Point(0,0), pPage->GetSize()); + ::tools::Rectangle aPaintRectangle (Point(0,0), pPage->GetSize()); vcl::Region aRegion (aPaintRectangle); // Turn off online spelling and redlining. @@ -321,7 +321,7 @@ void PreviewRenderer::PaintSubstitutionText (const OUString& rSubstitutionText) mpPreviewDevice->SetFont (aFont); // Paint the substitution text. - Rectangle aTextBox ( + ::tools::Rectangle aTextBox ( Point(0,0), mpPreviewDevice->PixelToLogic( mpPreviewDevice->GetOutputSizePixel())); @@ -342,7 +342,7 @@ void PreviewRenderer::PaintFrame() if (mbHasFrame) { // Paint a frame around the preview. - Rectangle aPaintRectangle ( + ::tools::Rectangle aPaintRectangle ( Point(0,0), mpPreviewDevice->GetOutputSizePixel()); mpPreviewDevice->EnableMapMode(false); @@ -454,7 +454,7 @@ Image PreviewRenderer::ScaleBitmap ( // Paint a frame around the preview. mpPreviewDevice->SetLineColor (maFrameColor); mpPreviewDevice->SetFillColor (); - mpPreviewDevice->DrawRect (Rectangle(Point(0,0), aFrameSize)); + mpPreviewDevice->DrawRect (::tools::Rectangle(Point(0,0), aFrameSize)); // Paint the bitmap scaled to the desired width. BitmapEx aScaledBitmap (rBitmapEx.GetBitmap()); diff --git a/sd/source/ui/unoidl/DrawController.cxx b/sd/source/ui/unoidl/DrawController.cxx index db1cd7d559b3..451b239b24b9 100644 --- a/sd/source/ui/unoidl/DrawController.cxx +++ b/sd/source/ui/unoidl/DrawController.cxx @@ -91,7 +91,7 @@ void DrawController::SetSubController ( // Update the internal state. mxSubController = rxSubController; mpPropertyArrayHelper.reset(); - maLastVisArea = Rectangle(); + maLastVisArea = ::tools::Rectangle(); // Inform listeners about the changed state. FireSelectionChangeListener(); @@ -328,7 +328,7 @@ Reference< drawing::XDrawPage > SAL_CALL DrawController::getCurrentPage() return xPage; } -void DrawController::FireVisAreaChanged (const Rectangle& rVisArea) throw() +void DrawController::FireVisAreaChanged (const ::tools::Rectangle& rVisArea) throw() { if( maLastVisArea != rVisArea ) { diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx index ba51319c0108..d68425076e89 100644 --- a/sd/source/ui/unoidl/unomodel.cxx +++ b/sd/source/ui/unoidl/unomodel.cxx @@ -1254,7 +1254,7 @@ void SAL_CALL SdXImpressDocument::setPropertyValue( const OUString& aPropertyNam if( !(aValue >>= aVisArea) || (aVisArea.Width < 0) || (aVisArea.Height < 0) ) throw lang::IllegalArgumentException(); - pEmbeddedObj->SetVisArea( Rectangle( aVisArea.X, aVisArea.Y, aVisArea.X + aVisArea.Width, aVisArea.Y + aVisArea.Height ) ); + pEmbeddedObj->SetVisArea( ::tools::Rectangle( aVisArea.X, aVisArea.Y, aVisArea.X + aVisArea.Width, aVisArea.Y + aVisArea.Height ) ); } break; case WID_MODEL_CONTFOCUS: @@ -1319,7 +1319,7 @@ uno::Any SAL_CALL SdXImpressDocument::getPropertyValue( const OUString& Property if( !pEmbeddedObj ) break; - const Rectangle& aRect = pEmbeddedObj->GetVisArea(); + const ::tools::Rectangle& aRect = pEmbeddedObj->GetVisArea(); awt::Rectangle aVisArea( aRect.Left(), aRect.Top(), aRect.getWidth(), aRect.getHeight() ); aAny <<= aVisArea; } @@ -1508,7 +1508,7 @@ uno::Sequence< beans::PropertyValue > SAL_CALL SdXImpressDocument::getRenderer( } else { - const Rectangle aVisArea( mpDocShell->GetVisArea( embed::Aspects::MSOLE_DOCPRINT ) ); + const ::tools::Rectangle aVisArea( mpDocShell->GetVisArea( embed::Aspects::MSOLE_DOCPRINT ) ); aPageSize = awt::Size( aVisArea.GetWidth(), aVisArea.GetHeight() ); } aRenderer.realloc( 1 ); @@ -1600,7 +1600,7 @@ void ImplPDFExportComments( const uno::Reference< drawing::XDrawPage >& xPage, v sTitle += aStr; aNote.Title = sTitle; aNote.Contents = xText->getString(); - rPDFExtOutDevData.CreateNote( Rectangle( Point( static_cast< long >( aRealPoint2D.X * 100 ), + rPDFExtOutDevData.CreateNote( ::tools::Rectangle( Point( static_cast< long >( aRealPoint2D.X * 100 ), static_cast< long >( aRealPoint2D.Y * 100 ) ), Size( 1000, 1000 ) ), aNote ); } } @@ -1632,11 +1632,11 @@ void ImplPDFExportShapeInteraction( const uno::Reference< drawing::XShape >& xSh { Size aPageSize( rDoc.GetSdPage( 0, PageKind::Standard )->GetSize() ); Point aPoint( 0, 0 ); - Rectangle aPageRect( aPoint, aPageSize ); + ::tools::Rectangle aPageRect( aPoint, aPageSize ); awt::Point aShapePos( xShape->getPosition() ); awt::Size aShapeSize( xShape->getSize() ); - Rectangle aLinkRect( Point( aShapePos.X, aShapePos.Y ), Size( aShapeSize.Width, aShapeSize.Height ) ); + ::tools::Rectangle aLinkRect( Point( aShapePos.X, aShapePos.Y ), Size( aShapeSize.Width, aShapeSize.Height ) ); // Handle linked videos. if (xShape->getShapeType() == "com.sun.star.drawing.MediaShape" || xShape->getShapeType() == "com.sun.star.presentation.MediaShape") @@ -1906,7 +1906,7 @@ void SAL_CALL SdXImpressDocument::render( sal_Int32 nRenderer, const uno::Any& r (pPDFExtOutDevData && pPDFExtOutDevData->GetIsExportHiddenSlides()) ) { std::unique_ptr<::sd::ClientView> pView( new ::sd::ClientView( mpDocShell, pOut ) ); - Rectangle aVisArea = Rectangle( Point(), mpDoc->GetSdPage( (sal_uInt16)nPageNumber - 1, ePageKind )->GetSize() ); + ::tools::Rectangle aVisArea = ::tools::Rectangle( Point(), mpDoc->GetSdPage( (sal_uInt16)nPageNumber - 1, ePageKind )->GetSize() ); vcl::Region aRegion( aVisArea ); ::sd::ViewShell* pOldViewSh = mpDocShell->GetViewShell(); @@ -2123,7 +2123,7 @@ void SAL_CALL SdXImpressDocument::render( sal_Int32 nRenderer, const uno::Any& r Size aPageSize( mpDoc->GetSdPage( 0, PageKind::Standard )->GetSize() ); Point aPoint( 0, 0 ); - Rectangle aPageRect( aPoint, aPageSize ); + ::tools::Rectangle aPageRect( aPoint, aPageSize ); // resolving links found in this page by the method ImpEditEngine::Paint std::vector< vcl::PDFExtOutDevBookmarkEntry >& rBookmarks = pPDFExtOutDevData->GetBookmarks(); @@ -2274,7 +2274,7 @@ void SdXImpressDocument::paintTile( VirtualDevice& rDevice, Point aPoint(nTilePosX, nTilePosY); Size aSize(nTileWidth, nTileHeight); - Rectangle aRect(aPoint, aSize); + ::tools::Rectangle aRect(aPoint, aSize); pViewSh->GetView()->CompleteRedraw(&rDevice, vcl::Region(aRect)); } diff --git a/sd/source/ui/unoidl/unopage.cxx b/sd/source/ui/unoidl/unopage.cxx index 785c771c27af..3fd76478467a 100644 --- a/sd/source/ui/unoidl/unopage.cxx +++ b/sd/source/ui/unoidl/unopage.cxx @@ -509,7 +509,7 @@ SdrObject * SdGenericDrawPage::CreateSdrObject_( const Reference< drawing::XShap eObjKind = PRESOBJ_MEDIA; } - Rectangle aRect( eObjKind == PRESOBJ_TITLE ? GetPage()->GetTitleRect() : GetPage()->GetLayoutRect() ); + ::tools::Rectangle aRect( eObjKind == PRESOBJ_TITLE ? GetPage()->GetTitleRect() : GetPage()->GetLayoutRect() ); const awt::Point aPos( aRect.Left(), aRect.Top() ); xShape->setPosition( aPos ); @@ -1125,7 +1125,7 @@ Any SAL_CALL SdGenericDrawPage::getPropertyValue( const OUString& PropertyName ) Point aPoint; Size aSize( GetPage()->GetSize() ); xMetaFile->AddAction( static_cast<MetaAction*>(new MetaFillColorAction( COL_WHITE, true )), 0 ); - xMetaFile->AddAction( static_cast<MetaAction*>(new MetaRectAction( Rectangle( aPoint, aSize ) )), 1 ); + xMetaFile->AddAction( static_cast<MetaAction*>(new MetaRectAction( ::tools::Rectangle( aPoint, aSize ) )), 1 ); xMetaFile->SetPrefMapMode( MapUnit::Map100thMM ); xMetaFile->SetPrefSize( aSize ); diff --git a/sd/source/ui/view/DocumentRenderer.cxx b/sd/source/ui/view/DocumentRenderer.cxx index 0eba71c93f37..17d9fa3bdbbf 100644 --- a/sd/source/ui/view/DocumentRenderer.cxx +++ b/sd/source/ui/view/DocumentRenderer.cxx @@ -308,7 +308,7 @@ namespace { pView->DrawMarkedObj(rPrinter); else rPrintView.CompleteRedraw(&rPrinter, - vcl::Region(Rectangle(Point(0,0), rPage.GetSize()))); + vcl::Region(::tools::Rectangle(Point(0,0), rPage.GetSize()))); rPrinter.SetMapMode(aOriginalMapMode); @@ -1106,7 +1106,7 @@ namespace { rPrinter.SetMapMode(maMap); // Get and set up the outliner. - const Rectangle aOutRect (rPrinter.GetPageOffset(), rPrinter.GetOutputSize()); + const ::tools::Rectangle aOutRect (rPrinter.GetPageOffset(), rPrinter.GetOutputSize()); Outliner* pOutliner = rDocument.GetInternalOutliner(); const OutlinerMode nSavedOutlMode (pOutliner->GetMode()); const bool bSavedUpdateMode (pOutliner->GetUpdateMode()); @@ -1535,17 +1535,17 @@ private: const bool bDrawLines (eLayout == AUTOLAYOUT_HANDOUT3); - std::vector< Rectangle > aAreas; + std::vector< ::tools::Rectangle > aAreas; SdPage::CalculateHandoutAreas( rModel, eLayout, bHandoutHorizontal, aAreas ); - std::vector< Rectangle >::iterator iter( aAreas.begin() ); + std::vector< ::tools::Rectangle >::iterator iter( aAreas.begin() ); while( iter != aAreas.end() ) { pHandout->NbcInsertObject( new SdrPageObj((*iter++)) ); if( bDrawLines && (iter != aAreas.end()) ) { - Rectangle aRect( (*iter++) ); + ::tools::Rectangle aRect( (*iter++) ); basegfx::B2DPolygon aPoly; aPoly.insert(0, basegfx::B2DPoint( aRect.Left(), aRect.Top() ) ); @@ -1606,7 +1606,7 @@ private: aMap.SetScaleY(Fraction(1,2)); mpPrinter->SetMapMode(aMap); - Rectangle aOutRect(aPageOfs, rInfo.mpPrinter->GetOutputSize()); + ::tools::Rectangle aOutRect(aPageOfs, rInfo.mpPrinter->GetOutputSize()); if( aOutRect.GetWidth() > aOutRect.GetHeight() ) { Size aPaperSize( rInfo.mpPrinter->PixelToLogic( rInfo.mpPrinter->GetPaperSizePixel(), MapMode( MapUnit::Map100thMM ) ) ); @@ -1614,7 +1614,7 @@ private: maPrintSize.Height = aPaperSize.Width(); const long nRotatedWidth = aOutRect.GetHeight(); const long nRotatedHeight = aOutRect.GetWidth(); - aOutRect = Rectangle( Point( aPageOfs.Y(), aPageOfs.X() ), + aOutRect = ::tools::Rectangle( Point( aPageOfs.Y(), aPageOfs.X() ), Size( nRotatedWidth, nRotatedHeight ) ); } diff --git a/sd/source/ui/view/Outliner.cxx b/sd/source/ui/view/Outliner.cxx index 9b4fe138301c..cd38117db3da 100644 --- a/sd/source/ui/view/Outliner.cxx +++ b/sd/source/ui/view/Outliner.cxx @@ -800,11 +800,11 @@ bool SdOutliner::SearchAndReplaceOnce(std::vector<sd::SearchSelection>* pSelecti if (pViewShell && comphelper::LibreOfficeKit::isActive() && mbStringFound) { - std::vector<Rectangle> aLogicRects; + std::vector<::tools::Rectangle> aLogicRects; pOutlinerView->GetSelectionRectangles(aLogicRects); std::vector<OString> aLogicRectStrings; - std::transform(aLogicRects.begin(), aLogicRects.end(), std::back_inserter(aLogicRectStrings), [](const Rectangle& rRectangle) { return rRectangle.toString(); }); + std::transform(aLogicRects.begin(), aLogicRects.end(), std::back_inserter(aLogicRectStrings), [](const ::tools::Rectangle& rRectangle) { return rRectangle.toString(); }); OString sRectangles = comphelper::string::join("; ", aLogicRectStrings); if (!pSelections) @@ -869,7 +869,7 @@ void SdOutliner::DetectChange() SetUpdateMode(false); OutlinerView* pOutlinerView = mpImpl->GetOutlinerView(); if (pOutlinerView != nullptr) - pOutlinerView->SetOutputArea( Rectangle( Point(), Size(1, 1) ) ); + pOutlinerView->SetOutputArea( ::tools::Rectangle( Point(), Size(1, 1) ) ); if (meMode == SPELL) SetPaperSize( Size(1, 1) ); SetText(OUString(), GetParagraph(0)); @@ -1061,7 +1061,7 @@ void SdOutliner::ProvideNextTextObject() SetUpdateMode(false); OutlinerView* pOutlinerView = mpImpl->GetOutlinerView(); if (pOutlinerView != nullptr) - pOutlinerView->SetOutputArea( Rectangle( Point(), Size(1, 1) ) ); + pOutlinerView->SetOutputArea( ::tools::Rectangle( Point(), Size(1, 1) ) ); if (meMode == SPELL) SetPaperSize( Size(1, 1) ); SetText(OUString(), GetParagraph(0)); @@ -1408,7 +1408,7 @@ void SdOutliner::EnterEditMode (bool bGrabFocus) OutlinerView* pOutlinerView = mpImpl->GetOutlinerView(); if (pOutlinerView && mpTextObj) { - pOutlinerView->SetOutputArea( Rectangle( Point(), Size(1, 1))); + pOutlinerView->SetOutputArea( ::tools::Rectangle( Point(), Size(1, 1))); SetPaperSize( mpTextObj->GetLogicRect().GetSize() ); SdrPageView* pPV = mpView->GetSdrPageView(); @@ -1785,7 +1785,7 @@ void SdOutliner::Implementation::ProvideOutlinerView ( rOutliner.InsertView( mpOutlineView ); rOutliner.SetUpdateMode(false); - mpOutlineView->SetOutputArea (Rectangle (Point(), Size(1, 1))); + mpOutlineView->SetOutputArea (::tools::Rectangle (Point(), Size(1, 1))); rOutliner.SetPaperSize( Size(1, 1) ); rOutliner.SetText(OUString(), rOutliner.GetParagraph(0)); diff --git a/sd/source/ui/view/ViewShellBase.cxx b/sd/source/ui/view/ViewShellBase.cxx index c1f7efcdad24..a2263c38c9e6 100644 --- a/sd/source/ui/view/ViewShellBase.cxx +++ b/sd/source/ui/view/ViewShellBase.cxx @@ -138,7 +138,7 @@ public: ::rtl::Reference<ViewTabBar> mpViewTabBar; // contains the complete area of the current view relative to the frame window - Rectangle maClientArea; + ::tools::Rectangle maClientArea; // This is set to true when PrepareClose() is called. bool mbIsClosing; @@ -931,7 +931,7 @@ std::shared_ptr<tools::EventMultiplexer> ViewShellBase::GetEventMultiplexer() return mpImpl->mpEventMultiplexer; } -const Rectangle& ViewShellBase::getClientRectangle() const +const ::tools::Rectangle& ViewShellBase::getClientRectangle() const { return mpImpl->maClientArea; } @@ -1020,7 +1020,7 @@ void ViewShellBase::NotifyCursor(SfxViewShell* pOtherShell) const // Shape text lock. if (OutlinerView* pOutlinerView = pDrawView->GetTextEditOutlinerView()) { - Rectangle aRectangle = pOutlinerView->GetOutputArea(); + ::tools::Rectangle aRectangle = pOutlinerView->GetOutputArea(); vcl::Window* pWin = pThisShell->GetActiveWindow(); if (pWin && pWin->GetMapMode().GetMapUnit() == MapUnit::Map100thMM) aRectangle = OutputDevice::LogicToLogic(aRectangle, MapUnit::Map100thMM, MapUnit::MapTwip); @@ -1157,7 +1157,7 @@ void ViewShellBase::Implementation::ResizePixel ( rSize.Height() - aBaseBorder.Top() - aBaseBorder.Bottom()); mpViewWindow->SetPosSizePixel(aViewWindowPosition, aViewWindowSize); - maClientArea = Rectangle(Point(0,0), aViewWindowSize); + maClientArea = ::tools::Rectangle(Point(0,0), aViewWindowSize); } void ViewShellBase::Implementation::SetPaneVisibility ( diff --git a/sd/source/ui/view/ViewTabBar.cxx b/sd/source/ui/view/ViewTabBar.cxx index 30aa66ddfff9..e09f36fc0a64 100644 --- a/sd/source/ui/view/ViewTabBar.cxx +++ b/sd/source/ui/view/ViewTabBar.cxx @@ -65,7 +65,7 @@ class TabBarControl : public ::TabControl { public: TabBarControl (vcl::Window* pParentWindow, const ::rtl::Reference<ViewTabBar>& rpViewTabBar); - virtual void Paint (vcl::RenderContext& rRenderContext, const Rectangle& rRect) override; + virtual void Paint (vcl::RenderContext& rRenderContext, const ::tools::Rectangle& rRect) override; virtual void ActivatePage() override; private: ::rtl::Reference<ViewTabBar> mpViewTabBar; @@ -550,7 +550,7 @@ TabBarControl::TabBarControl ( { } -void TabBarControl::Paint (vcl::RenderContext& rRenderContext, const Rectangle& rRect) +void TabBarControl::Paint (vcl::RenderContext& rRenderContext, const ::tools::Rectangle& rRect) { Color aOriginalFillColor(rRenderContext.GetFillColor()); Color aOriginalLineColor(rRenderContext.GetLineColor()); diff --git a/sd/source/ui/view/clview.cxx b/sd/source/ui/view/clview.cxx index 986481ad860c..c92c3a16a55f 100644 --- a/sd/source/ui/view/clview.cxx +++ b/sd/source/ui/view/clview.cxx @@ -59,7 +59,7 @@ void ClientView::InvalidateOneWin(vcl::Window& rWin) * to be overridden and properly handled. */ -void ClientView::InvalidateOneWin(vcl::Window& rWin, const Rectangle& rRect) +void ClientView::InvalidateOneWin(vcl::Window& rWin, const ::tools::Rectangle& rRect) { CompleteRedraw(&rWin, vcl::Region(rRect)); } diff --git a/sd/source/ui/view/drawview.cxx b/sd/source/ui/view/drawview.cxx index 355b0a3f1abf..fd74fd14a497 100644 --- a/sd/source/ui/view/drawview.cxx +++ b/sd/source/ui/view/drawview.cxx @@ -489,7 +489,7 @@ void DrawView::CompleteRedraw(OutputDevice* pOutDev, const vcl::Region& rReg, sd * Make passed region visible (scrolling if necessary) */ -void DrawView::MakeVisible(const Rectangle& rRect, vcl::Window& rWin) +void DrawView::MakeVisible(const ::tools::Rectangle& rRect, vcl::Window& rWin) { if (!rRect.IsEmpty() && mpDrawViewShell) { @@ -558,7 +558,7 @@ void DrawView::DeleteMarked() } SdrTextObj* pTextObj = dynamic_cast< SdrTextObj* >( pObj ); bool bVertical = pTextObj && pTextObj->IsVerticalWriting(); - Rectangle aRect( pObj->GetLogicRect() ); + ::tools::Rectangle aRect( pObj->GetLogicRect() ); SdrObject* pNewObj = pPage->InsertAutoLayoutShape( nullptr, ePresObjKind, bVertical, aRect, true ); // pUndoManager should not be NULL (see assert above) diff --git a/sd/source/ui/view/drviews1.cxx b/sd/source/ui/view/drviews1.cxx index 830953a22dcc..1331c26b394d 100644 --- a/sd/source/ui/view/drviews1.cxx +++ b/sd/source/ui/view/drviews1.cxx @@ -287,7 +287,7 @@ void DrawViewShell::SetZoom( long nZoom ) * Set zoom rectangle for active window */ -void DrawViewShell::SetZoomRect( const Rectangle& rZoomRect ) +void DrawViewShell::SetZoomRect( const ::tools::Rectangle& rZoomRect ) { ViewShell::SetZoomRect( rZoomRect ); GetViewFrame()->GetBindings().Invalidate( SID_ATTR_ZOOM ); @@ -932,7 +932,7 @@ bool DrawViewShell::SwitchPage(sal_uInt16 nSelectedPage) // !!! only if we are not in presentation mode (#96279) !!! OSL_ASSERT (GetViewShell()!=nullptr); GetViewShell()->DisconnectAllClients(); - VisAreaChanged(Rectangle(Point(), Size(1, 1))); + VisAreaChanged(::tools::Rectangle(Point(), Size(1, 1))); } if (meEditMode == EditMode::Page) @@ -1090,7 +1090,7 @@ bool DrawViewShell::SwitchPage(sal_uInt16 nSelectedPage) } Size aVisSizePixel = GetActiveWindow()->GetOutputSizePixel(); - Rectangle aVisAreaWin = GetActiveWindow()->PixelToLogic( Rectangle( Point(0,0), aVisSizePixel) ); + ::tools::Rectangle aVisAreaWin = GetActiveWindow()->PixelToLogic( ::tools::Rectangle( Point(0,0), aVisSizePixel) ); VisAreaChanged(aVisAreaWin); mpDrawView->VisAreaChanged(GetActiveWindow()); diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx index 292067501d6b..fa8024e0a8c9 100644 --- a/sd/source/ui/view/drviews2.cxx +++ b/sd/source/ui/view/drviews2.cxx @@ -738,7 +738,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) OSL_ENSURE(pPageView, "DrawViewShell::FuTemporary: SID_CONVERT_TO_BITMAP without SdrPageView (!)"); // fit rectangle of new graphic object to selection's mark rect - Rectangle aAllMarkedRect; + ::tools::Rectangle aAllMarkedRect; rMarkList.TakeBoundRect(pPageView, aAllMarkedRect); pGraphicObj->SetLogicRect(aAllMarkedRect); @@ -1940,13 +1940,13 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) pOutl->SetUpdateMode( false ); Point aPos; - Rectangle aRect( aPos, GetActiveWindow()->GetOutputSizePixel() ); + ::tools::Rectangle aRect( aPos, GetActiveWindow()->GetOutputSizePixel() ); aPos = aRect.Center(); aPos = GetActiveWindow()->PixelToLogic(aPos); aPos.X() -= aSize.Width() / 2; aPos.Y() -= aSize.Height() / 2; - Rectangle aLogicRect(aPos, aSize); + ::tools::Rectangle aLogicRect(aPos, aSize); pRectObj->SetLogicRect(aLogicRect); pRectObj->SetOutlinerParaObject( pOutlParaObject ); mpDrawView->InsertObjectAtView(pRectObj, *mpDrawView->GetSdrPageView()); diff --git a/sd/source/ui/view/drviews3.cxx b/sd/source/ui/view/drviews3.cxx index 3a56d0d0d4fa..4aff2371708d 100644 --- a/sd/source/ui/view/drviews3.cxx +++ b/sd/source/ui/view/drviews3.cxx @@ -334,7 +334,7 @@ void DrawViewShell::ExecCtrl(SfxRequest& rReq) { const SfxRectangleItem& rRect = static_cast<const SfxRectangleItem&>(rReq.GetArgs()->Get(SID_OBJECTRESIZE)); - Rectangle aRect( GetActiveWindow()->PixelToLogic( rRect.GetValue() ) ); + ::tools::Rectangle aRect( GetActiveWindow()->PixelToLogic( rRect.GetValue() ) ); if ( mpDrawView->AreObjectsMarked() ) { @@ -503,7 +503,7 @@ void DrawViewShell::ExecRuler(SfxRequest& rReq) if( mpDrawView->IsTextEdit() ) { - Rectangle aRect = maMarkRect; + ::tools::Rectangle aRect = maMarkRect; aRect.SetPos(aRect.TopLeft() + aPagePos); aRect.Left() = rLRSpace.GetLeft(); aRect.Right() = aViewSize.Width() - rLRSpace.GetRight(); @@ -568,7 +568,7 @@ void DrawViewShell::ExecRuler(SfxRequest& rReq) if( mpDrawView->IsTextEdit() ) { - Rectangle aRect = maMarkRect; + ::tools::Rectangle aRect = maMarkRect; aRect.SetPos(aRect.TopLeft() + aPagePos); aRect.Top() = rULSpace.GetUpper(); aRect.Bottom() = aViewSize.Height() - rULSpace.GetLower(); @@ -626,7 +626,7 @@ void DrawViewShell::ExecRuler(SfxRequest& rReq) case SID_RULER_OBJECT: if (pArgs) { - Rectangle aRect = maMarkRect; + ::tools::Rectangle aRect = maMarkRect; aRect.SetPos(aRect.TopLeft() + aPagePos); const SvxObjectItem& rOI = static_cast<const SvxObjectItem&>( @@ -861,13 +861,13 @@ void DrawViewShell::GetRulerState(SfxItemSet& rSet) const Point aPagePos( GetActiveWindow()->GetViewOrigin() ); Size aPageSize = mpActualPage->GetSize(); - Rectangle aRect(aPagePos, Point( aViewSize.Width() - (aPagePos.X() + aPageSize.Width()), + ::tools::Rectangle aRect(aPagePos, Point( aViewSize.Width() - (aPagePos.X() + aPageSize.Width()), aViewSize.Height() - (aPagePos.Y() + aPageSize.Height()))); if( mpDrawView->IsTextEdit() ) { Point aPnt1 = GetActiveWindow()->GetWinViewPos(); - Rectangle aMinMaxRect = Rectangle( aPnt1, Size(ULONG_MAX, ULONG_MAX) ); + ::tools::Rectangle aMinMaxRect = ::tools::Rectangle( aPnt1, Size(ULONG_MAX, ULONG_MAX) ); rSet.Put( SfxRectangleItem(SID_RULER_LR_MIN_MAX, aMinMaxRect) ); } else @@ -974,7 +974,7 @@ void DrawViewShell::GetRulerState(SfxItemSet& rSet) if( mpDrawView->IsResizeAllowed(true) ) { - Rectangle aResizeRect( maMarkRect ); + ::tools::Rectangle aResizeRect( maMarkRect ); aResizeRect.SetPos(aResizeRect.TopLeft() + aPagePos); SvxObjectItem aObjItem(aResizeRect.Left(), aResizeRect.Right(), diff --git a/sd/source/ui/view/drviews4.cxx b/sd/source/ui/view/drviews4.cxx index 3ce20cdb5796..fc5d537e2796 100644 --- a/sd/source/ui/view/drviews4.cxx +++ b/sd/source/ui/view/drviews4.cxx @@ -304,7 +304,7 @@ void DrawViewShell::MouseMove(const MouseEvent& rMEvt, ::sd::Window* pWin) { if ( mpDrawView->IsAction() ) { - Rectangle aOutputArea(Point(0,0), GetActiveWindow()->GetOutputSizePixel()); + ::tools::Rectangle aOutputArea(Point(0,0), GetActiveWindow()->GetOutputSizePixel()); if ( !aOutputArea.IsInside(rMEvt.GetPosPixel()) ) { @@ -312,7 +312,7 @@ void DrawViewShell::MouseMove(const MouseEvent& rMEvt, ::sd::Window* pWin) if (mpContentWindow.get() != nullptr) { - aOutputArea = Rectangle(Point(0,0), + aOutputArea = ::tools::Rectangle(Point(0,0), mpContentWindow->GetOutputSizePixel()); Point aPos = mpContentWindow->GetPointerPosPixel(); @@ -350,7 +350,7 @@ void DrawViewShell::MouseMove(const MouseEvent& rMEvt, ::sd::Window* pWin) if( !mbMousePosFreezed ) maMousePos = rMEvt.GetPosPixel(); - Rectangle aRect; + ::tools::Rectangle aRect; if ( mbIsRulerDrag ) { @@ -365,7 +365,7 @@ void DrawViewShell::MouseMove(const MouseEvent& rMEvt, ::sd::Window* pWin) } else { - aRect = Rectangle(maMousePos, maMousePos); + aRect = ::tools::Rectangle(maMousePos, maMousePos); } ShowMousePosInfo(aRect, pWin); @@ -415,7 +415,7 @@ void DrawViewShell::MouseButtonUp(const MouseEvent& rMEvt, ::sd::Window* pWin) if (mbIsRulerDrag) { - Rectangle aOutputArea(Point(0,0), GetActiveWindow()->GetOutputSizePixel()); + ::tools::Rectangle aOutputArea(Point(0,0), GetActiveWindow()->GetOutputSizePixel()); if (aOutputArea.IsInside(rMEvt.GetPosPixel())) { @@ -752,7 +752,7 @@ void DrawViewShell::Command(const CommandEvent& rCEvt, ::sd::Window* pWin) //middle of the bounding rect if something is marked if( mpDrawView->AreObjectsMarked() && mpDrawView->GetMarkedObjectList().GetMarkCount() >= 1 ) { - Rectangle aMarkRect; + ::tools::Rectangle aMarkRect; mpDrawView->GetMarkedObjectList().TakeBoundRect(nullptr,aMarkRect); aMenuPos = GetActiveWindow()->LogicToPixel( aMarkRect.Center() ); @@ -780,7 +780,7 @@ void DrawViewShell::Command(const CommandEvent& rCEvt, ::sd::Window* pWin) } } -void DrawViewShell::ShowMousePosInfo(const Rectangle& rRect, +void DrawViewShell::ShowMousePosInfo(const ::tools::Rectangle& rRect, ::sd::Window* pWin) { if (mbHasRulers && pWin ) @@ -896,7 +896,7 @@ void DrawViewShell::ShowSnapLineContextMenu ( const sal_uInt16 nResult = pMenu->Execute( GetActiveWindow(), - Rectangle(rMouseLocation, Size(10,10)), + ::tools::Rectangle(rMouseLocation, Size(10,10)), PopupMenuFlags::ExecuteDown); switch (nResult) { diff --git a/sd/source/ui/view/drviews5.cxx b/sd/source/ui/view/drviews5.cxx index 372de4953ada..bf487fba1762 100644 --- a/sd/source/ui/view/drviews5.cxx +++ b/sd/source/ui/view/drviews5.cxx @@ -347,7 +347,7 @@ void DrawViewShell::WriteFrameViewData() mpFrameView->SetDesignMode( mpDrawView->IsDesignMode() ); Size aVisSizePixel = GetActiveWindow()->GetOutputSizePixel(); - Rectangle aVisArea = GetActiveWindow()->PixelToLogic( Rectangle( Point(0,0), aVisSizePixel) ); + ::tools::Rectangle aVisArea = GetActiveWindow()->PixelToLogic( ::tools::Rectangle( Point(0,0), aVisSizePixel) ); mpFrameView->SetVisArea(aVisArea); if( mePageKind == PageKind::Handout ) @@ -406,7 +406,7 @@ void DrawViewShell::PrePaint() * * Remark: pWin==NULL, if Paint() is called from ShowWindow! */ -void DrawViewShell::Paint(const Rectangle& rRect, ::sd::Window* pWin) +void DrawViewShell::Paint(const ::tools::Rectangle& rRect, ::sd::Window* pWin) { /* This is done before each text edit, so why not do it before every paint. The default language is only used if the outliner only contains one @@ -501,7 +501,7 @@ void DrawViewShell::ReadUserDataSequence ( const css::uno::Sequence < css::beans if( !mbZoomOnPage ) { - const Rectangle aVisArea( mpFrameView->GetVisArea() ); + const ::tools::Rectangle aVisArea( mpFrameView->GetVisArea() ); if ( GetDocSh()->GetCreateMode() == SfxObjectCreateMode::EMBEDDED ) { @@ -523,7 +523,7 @@ void DrawViewShell::ReadUserDataSequence ( const css::uno::Sequence < css::beans ResetActualLayer(); } -void DrawViewShell::VisAreaChanged(const Rectangle& rRect) +void DrawViewShell::VisAreaChanged(const ::tools::Rectangle& rRect) { ViewShell::VisAreaChanged( rRect ); diff --git a/sd/source/ui/view/drviews7.cxx b/sd/source/ui/view/drviews7.cxx index 0e540b7bd7b0..82209d72ca4a 100644 --- a/sd/source/ui/view/drviews7.cxx +++ b/sd/source/ui/view/drviews7.cxx @@ -1326,7 +1326,7 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet ) const SdrGrafObj* pSdrGrafObj = static_cast< const SdrGrafObj* >(pObj); // Current size of the OBJ_GRAF - const Rectangle aRect = pObj->GetLogicRect(); + const ::tools::Rectangle aRect = pObj->GetLogicRect(); const Size aCurrentSizeofObj = aRect.GetSize(); // Original size of the OBJ_GRAF diff --git a/sd/source/ui/view/drviews8.cxx b/sd/source/ui/view/drviews8.cxx index f1c07f6102ed..8c23c9656f3a 100644 --- a/sd/source/ui/view/drviews8.cxx +++ b/sd/source/ui/view/drviews8.cxx @@ -97,7 +97,7 @@ void DrawViewShell::ScannerEvent( const css::lang::EventObject& ) Point aPnt ( ( aPageSize.Width() - aBmpSize.Width() ) >> 1, ( aPageSize.Height() - aBmpSize.Height() ) >> 1 ); aPnt += Point( pPage->GetLftBorder(), pPage->GetUppBorder() ); - Rectangle aRect( aPnt, aBmpSize ); + ::tools::Rectangle aRect( aPnt, aBmpSize ); SdrGrafObj* pGrafObj = nullptr; bool bInsertNewObject = true; diff --git a/sd/source/ui/view/drviews9.cxx b/sd/source/ui/view/drviews9.cxx index 438560f70342..1bf00f00e603 100644 --- a/sd/source/ui/view/drviews9.cxx +++ b/sd/source/ui/view/drviews9.cxx @@ -126,7 +126,7 @@ void DrawViewShell::ExecGallery(SfxRequest& rReq) Point aPnt ((aPageSize.Width() - aSize.Width()) / 2, (aPageSize.Height() - aSize.Height()) / 2); aPnt += Point(pPage->GetLftBorder(), pPage->GetUppBorder()); - Rectangle aRect (aPnt, aSize); + ::tools::Rectangle aRect (aPnt, aSize); SdrGrafObj* pGrafObj = nullptr; diff --git a/sd/source/ui/view/drviewsa.cxx b/sd/source/ui/view/drviewsa.cxx index 2f1968695614..24269c22ef43 100644 --- a/sd/source/ui/view/drviewsa.cxx +++ b/sd/source/ui/view/drviewsa.cxx @@ -249,7 +249,7 @@ void DrawViewShell::Construct(DrawDocShell* pDocSh, PageKind eInitialPageKind) aVisAreaPos = pDocSh->GetVisArea(ASPECT_CONTENT).TopLeft(); } - mpDrawView->SetWorkArea(Rectangle(Point() - aVisAreaPos - aPageOrg, aSize)); + mpDrawView->SetWorkArea(::tools::Rectangle(Point() - aVisAreaPos - aPageOrg, aSize)); // objects can not grow bigger than ViewSize GetDoc()->SetMaxObjSize(aSize); @@ -433,7 +433,7 @@ void DrawViewShell::SetupPage (Size &rSize, { if( bSize ) { - Rectangle aBorderRect(nLeft, nUpper, nRight, nLower); + ::tools::Rectangle aBorderRect(nLeft, nUpper, nRight, nLower); pPage->ScaleObjects(rSize, aBorderRect, bScaleAll); pPage->SetSize(rSize); @@ -466,7 +466,7 @@ void DrawViewShell::SetupPage (Size &rSize, { if( bSize ) { - Rectangle aBorderRect(nLeft, nUpper, nRight, nLower); + ::tools::Rectangle aBorderRect(nLeft, nUpper, nRight, nLower); pPage->ScaleObjects(rSize, aBorderRect, bScaleAll); pPage->SetSize(rSize); } @@ -509,7 +509,7 @@ void DrawViewShell::SetupPage (Size &rSize, aVisAreaPos = GetDocSh()->GetVisArea(ASPECT_CONTENT).TopLeft(); } - GetView()->SetWorkArea(Rectangle(Point() - aVisAreaPos - aPageOrg, aSize)); + GetView()->SetWorkArea(::tools::Rectangle(Point() - aVisAreaPos - aPageOrg, aSize)); UpdateScrollBars(); @@ -585,7 +585,7 @@ void DrawViewShell::GetStatusBarState(SfxItemSet& rSet) aPagePos.X() -= aPageSize.Width() / 2; - Rectangle aFullPageZoomRect( aPagePos, aPageSize ); + ::tools::Rectangle aFullPageZoomRect( aPagePos, aPageSize ); aZoomItem.AddSnappingPoint( pActiveWindow->GetZoomForRect( aFullPageZoomRect ) ); } aZoomItem.AddSnappingPoint(100); @@ -605,7 +605,7 @@ void DrawViewShell::GetStatusBarState(SfxItemSet& rSet) // position- and size items if ( mpDrawView->IsAction() ) { - Rectangle aRect; + ::tools::Rectangle aRect; mpDrawView->TakeActionRect( aRect ); if ( aRect.IsEmpty() ) @@ -627,7 +627,7 @@ void DrawViewShell::GetStatusBarState(SfxItemSet& rSet) { if ( mpDrawView->AreObjectsMarked() ) { - Rectangle aRect = mpDrawView->GetAllMarkedRect(); + ::tools::Rectangle aRect = mpDrawView->GetAllMarkedRect(); pPageView->LogicToPagePos(aRect); // Show the position of the selected shape(s) diff --git a/sd/source/ui/view/drviewse.cxx b/sd/source/ui/view/drviewse.cxx index 8885953bf0e4..0c9eb63b06a7 100644 --- a/sd/source/ui/view/drviewse.cxx +++ b/sd/source/ui/view/drviewse.cxx @@ -276,12 +276,12 @@ void DrawViewShell::FuPermanent(SfxRequest& rReq) if(pNewDBField) { - Rectangle aVisArea = GetActiveWindow()->PixelToLogic(Rectangle(Point(0,0), GetActiveWindow()->GetOutputSizePixel())); + ::tools::Rectangle aVisArea = GetActiveWindow()->PixelToLogic(::tools::Rectangle(Point(0,0), GetActiveWindow()->GetOutputSizePixel())); Point aObjPos(aVisArea.Center()); Size aObjSize(pNewDBField->GetLogicRect().GetSize()); aObjPos.X() -= aObjSize.Width() / 2; aObjPos.Y() -= aObjSize.Height() / 2; - Rectangle aNewObjectRectangle(aObjPos, aObjSize); + ::tools::Rectangle aNewObjectRectangle(aObjPos, aObjSize); pNewDBField->SetLogicRect(aNewObjectRectangle); @@ -589,11 +589,11 @@ void DrawViewShell::FuPermanent(SfxRequest& rReq) sal_uInt32 nDefaultObjectSizeHeight(pOptions->GetDefaultObjectSizeHeight()); // calc position and size - Rectangle aVisArea = GetActiveWindow()->PixelToLogic(Rectangle(Point(0,0), GetActiveWindow()->GetOutputSizePixel())); + ::tools::Rectangle aVisArea = GetActiveWindow()->PixelToLogic(::tools::Rectangle(Point(0,0), GetActiveWindow()->GetOutputSizePixel())); Point aPagePos = aVisArea.Center(); aPagePos.X() -= nDefaultObjectSizeWidth / 2; aPagePos.Y() -= nDefaultObjectSizeHeight / 2; - Rectangle aNewObjectRectangle(aPagePos, Size(nDefaultObjectSizeWidth, nDefaultObjectSizeHeight)); + ::tools::Rectangle aNewObjectRectangle(aPagePos, Size(nDefaultObjectSizeWidth, nDefaultObjectSizeHeight)); SdrPageView* pPageView = mpDrawView->GetSdrPageView(); if(pPageView) @@ -896,7 +896,7 @@ void DrawViewShell::FuSupport(SfxRequest& rReq) if (aDataHelper.GetTransferable().is()) { mpDrawView->InsertData( aDataHelper, - GetActiveWindow()->PixelToLogic( Rectangle( Point(), GetActiveWindow()->GetOutputSizePixel() ).Center() ), + GetActiveWindow()->PixelToLogic( ::tools::Rectangle( Point(), GetActiveWindow()->GetOutputSizePixel() ).Center() ), nAction, false, SotClipboardFormatId::STRING); } } @@ -923,7 +923,7 @@ void DrawViewShell::FuSupport(SfxRequest& rReq) sal_Int8 nAction = DND_ACTION_COPY; if( !mpDrawView->InsertData( aDataHelper, - GetActiveWindow()->PixelToLogic( Rectangle( Point(), GetActiveWindow()->GetOutputSizePixel() ).Center() ), + GetActiveWindow()->PixelToLogic( ::tools::Rectangle( Point(), GetActiveWindow()->GetOutputSizePixel() ).Center() ), nAction, false, nFormat ) ) { INetBookmark aINetBookmark( "", "" ); @@ -1106,9 +1106,9 @@ void DrawViewShell::FuSupport(SfxRequest& rReq) aPagePos.X() -= aPageSize.Width() / 2; - SetZoomRect( Rectangle( aPagePos, aPageSize ) ); + SetZoomRect( ::tools::Rectangle( aPagePos, aPageSize ) ); - Rectangle aVisAreaWin = GetActiveWindow()->PixelToLogic( Rectangle( Point(0,0), + ::tools::Rectangle aVisAreaWin = GetActiveWindow()->PixelToLogic( ::tools::Rectangle( Point(0,0), GetActiveWindow()->GetOutputSizePixel()) ); mpZoomList->InsertZoomRect(aVisAreaWin); } @@ -1123,7 +1123,7 @@ void DrawViewShell::FuSupport(SfxRequest& rReq) { mbZoomOnPage = false; SetZoom( 100 ); - Rectangle aVisAreaWin = GetActiveWindow()->PixelToLogic( Rectangle( Point(0,0), + ::tools::Rectangle aVisAreaWin = GetActiveWindow()->PixelToLogic( ::tools::Rectangle( Point(0,0), GetActiveWindow()->GetOutputSizePixel()) ); mpZoomList->InsertZoomRect(aVisAreaWin); Invalidate( SID_ZOOM_IN ); @@ -1137,7 +1137,7 @@ void DrawViewShell::FuSupport(SfxRequest& rReq) { mbZoomOnPage = false; SetZoom( std::max( (long) ( GetActiveWindow()->GetZoom() / 2 ), (long) GetActiveWindow()->GetMinZoom() ) ); - Rectangle aVisAreaWin = GetActiveWindow()->PixelToLogic( Rectangle( Point(0,0), + ::tools::Rectangle aVisAreaWin = GetActiveWindow()->PixelToLogic( ::tools::Rectangle( Point(0,0), GetActiveWindow()->GetOutputSizePixel()) ); mpZoomList->InsertZoomRect(aVisAreaWin); Invalidate( SID_ZOOM_IN ); @@ -1151,7 +1151,7 @@ void DrawViewShell::FuSupport(SfxRequest& rReq) { mbZoomOnPage = false; SetZoom( std::min( (long) ( GetActiveWindow()->GetZoom() * 2 ), (long) GetActiveWindow()->GetMaxZoom() ) ); - Rectangle aVisAreaWin = GetActiveWindow()->PixelToLogic( Rectangle( Point(0,0), + ::tools::Rectangle aVisAreaWin = GetActiveWindow()->PixelToLogic( ::tools::Rectangle( Point(0,0), GetActiveWindow()->GetOutputSizePixel()) ); mpZoomList->InsertZoomRect(aVisAreaWin); Invalidate( SID_ZOOM_IN ); @@ -1162,7 +1162,7 @@ void DrawViewShell::FuSupport(SfxRequest& rReq) case SID_SIZE_VISAREA: { - Rectangle aVisArea = mpFrameView->GetVisArea(); + ::tools::Rectangle aVisArea = mpFrameView->GetVisArea(); Size aVisAreaSize = aVisArea.GetSize(); if (aVisAreaSize.Height()!=0 && aVisAreaSize.Width()!=0) @@ -1192,9 +1192,9 @@ void DrawViewShell::FuSupport(SfxRequest& rReq) aPos.Y() -= nH / 2; if ( nW && nH ) { - SetZoomRect(Rectangle(aPos, Size(nW, nH))); + SetZoomRect(::tools::Rectangle(aPos, Size(nW, nH))); - Rectangle aVisAreaWin = GetActiveWindow()->PixelToLogic( Rectangle( Point(0,0), + ::tools::Rectangle aVisAreaWin = GetActiveWindow()->PixelToLogic( ::tools::Rectangle( Point(0,0), GetActiveWindow()->GetOutputSizePixel()) ); mpZoomList->InsertZoomRect(aVisAreaWin); } @@ -1215,7 +1215,7 @@ void DrawViewShell::FuSupport(SfxRequest& rReq) if( pPageView ) { - Rectangle aBoundRect( pPageView->GetObjList()->GetAllObjBoundRect() ); + ::tools::Rectangle aBoundRect( pPageView->GetObjList()->GetAllObjBoundRect() ); long nW = (long) (aBoundRect.GetWidth() * 1.03); long nH = (long) (aBoundRect.GetHeight() * 1.03); @@ -1224,9 +1224,9 @@ void DrawViewShell::FuSupport(SfxRequest& rReq) aPos.Y() -= nH / 2; if ( nW && nH ) { - SetZoomRect( Rectangle( aPos, Size( nW, nH ) ) ); + SetZoomRect( ::tools::Rectangle( aPos, Size( nW, nH ) ) ); - Rectangle aVisAreaWin = GetActiveWindow()->PixelToLogic( Rectangle( Point(0,0), + ::tools::Rectangle aVisAreaWin = GetActiveWindow()->PixelToLogic( ::tools::Rectangle( Point(0,0), GetActiveWindow()->GetOutputSizePixel()) ); mpZoomList->InsertZoomRect(aVisAreaWin); } @@ -1454,13 +1454,13 @@ void DrawViewShell::InsertURLField(const OUString& rURL, const OUString& rText, pOutl->SetUpdateMode( false ); Point aPos; - Rectangle aRect(aPos, GetActiveWindow()->GetOutputSizePixel() ); + ::tools::Rectangle aRect(aPos, GetActiveWindow()->GetOutputSizePixel() ); aPos = aRect.Center(); aPos = GetActiveWindow()->PixelToLogic(aPos); aPos.X() -= aSize.Width() / 2; aPos.Y() -= aSize.Height() / 2; - Rectangle aLogicRect(aPos, aSize); + ::tools::Rectangle aLogicRect(aPos, aSize); pRectObj->SetLogicRect(aLogicRect); pRectObj->SetOutlinerParaObject( pOutlParaObject ); mpDrawView->InsertObjectAtView(pRectObj, *mpDrawView->GetSdrPageView()); @@ -1544,14 +1544,14 @@ void DrawViewShell::InsertURLButton(const OUString& rURL, const OUString& rText, } else { - aPos = Rectangle(aPos, GetActiveWindow()->GetOutputSizePixel()).Center(); + aPos = ::tools::Rectangle(aPos, GetActiveWindow()->GetOutputSizePixel()).Center(); aPos = GetActiveWindow()->PixelToLogic(aPos); } Size aSize(4000, 1000); aPos.X() -= aSize.Width() / 2; aPos.Y() -= aSize.Height() / 2; - pUnoCtrl->SetLogicRect(Rectangle(aPos, aSize)); + pUnoCtrl->SetLogicRect(::tools::Rectangle(aPos, aSize)); SdrInsertFlags nOptions = SdrInsertFlags::SETDEFLAYER; diff --git a/sd/source/ui/view/drviewsh.cxx b/sd/source/ui/view/drviewsh.cxx index 2a3dd490dd6d..6fb9e8ac0576 100644 --- a/sd/source/ui/view/drviewsh.cxx +++ b/sd/source/ui/view/drviewsh.cxx @@ -58,7 +58,7 @@ void DrawViewShell::GotoBookmark(const OUString& rBookmark) |* \************************************************************************/ -void DrawViewShell::MakeVisible(const Rectangle& rRect, vcl::Window& rWin) +void DrawViewShell::MakeVisible(const ::tools::Rectangle& rRect, vcl::Window& rWin) { // tdf#98646 check if Rectangle which contains the bounds of the region to // be shown eventually contains values that cause overflows when processing @@ -87,7 +87,7 @@ void DrawViewShell::MakeVisible(const Rectangle& rRect, vcl::Window& rWin) rWin.Push(PushFlags::MAPMODE); rWin.EnableMapMode(); } - Rectangle aVisArea(rWin.PixelToLogic(Rectangle(Point(0,0), aVisSizePixel))); + ::tools::Rectangle aVisArea(rWin.PixelToLogic(::tools::Rectangle(Point(0,0), aVisSizePixel))); if (bTiledRendering) rWin.Pop(); Size aVisAreaSize(aVisArea.GetSize()); @@ -100,7 +100,7 @@ void DrawViewShell::MakeVisible(const Rectangle& rRect, vcl::Window& rWin) // allow a mode for move-only visibility without zooming. const sal_Int32 nPercentBorder(30); - const Rectangle aInnerRectangle( + const ::tools::Rectangle aInnerRectangle( aVisArea.Left() + ((aVisAreaSize.Width() * nPercentBorder) / 200), aVisArea.Top() + ((aVisAreaSize.Height() * nPercentBorder) / 200), aVisArea.Right() - ((aVisAreaSize.Width() * nPercentBorder) / 200), diff --git a/sd/source/ui/view/frmview.cxx b/sd/source/ui/view/frmview.cxx index 357623295654..df7efde02afa 100644 --- a/sd/source/ui/view/frmview.cxx +++ b/sd/source/ui/view/frmview.cxx @@ -205,7 +205,7 @@ FrameView::FrameView(SdDrawDocument* pDrawDoc, FrameView* pFrameView /* = NULK * SetActiveLayer( SD_RESSTR(STR_LAYER_LAYOUT) ); mbNoColors = true; mbNoAttribs = false; - maVisArea = Rectangle( Point(), Size(0, 0) ); + maVisArea = ::tools::Rectangle( Point(), Size(0, 0) ); mePageKind = PageKind::Standard; mePageKindOnLoad = PageKind::Standard; mnSelectedPage = 0; @@ -427,7 +427,7 @@ void FrameView::WriteUserDataSequence ( css::uno::Sequence < css::beans::Propert // aUserData.addValue( sUNO_View_EditModeHandout, makeAny( (sal_Int32)GetViewShEditMode( PageKind::Handout ) ) ); { - const Rectangle aVisArea = GetVisArea(); + const ::tools::Rectangle aVisArea = GetVisArea(); aUserData.addValue( sUNO_View_VisibleAreaTop, makeAny( (sal_Int32)aVisArea.Top() ) ); aUserData.addValue( sUNO_View_VisibleAreaLeft, makeAny( (sal_Int32)aVisArea.Left() ) ); @@ -658,7 +658,7 @@ void FrameView::ReadUserDataSequence ( const css::uno::Sequence < css::beans::Pr sal_Int32 nTop = 0; if( pValue->Value >>= nTop ) { - Rectangle aVisArea( GetVisArea() ); + ::tools::Rectangle aVisArea( GetVisArea() ); aVisArea.Bottom() += nTop - aVisArea.Top(); aVisArea.Top() = nTop; SetVisArea( aVisArea ); @@ -669,7 +669,7 @@ void FrameView::ReadUserDataSequence ( const css::uno::Sequence < css::beans::Pr sal_Int32 nLeft = 0; if( pValue->Value >>= nLeft ) { - Rectangle aVisArea( GetVisArea() ); + ::tools::Rectangle aVisArea( GetVisArea() ); aVisArea.Right() += nLeft - aVisArea.Left(); aVisArea.Left() = nLeft; SetVisArea( aVisArea ); @@ -680,7 +680,7 @@ void FrameView::ReadUserDataSequence ( const css::uno::Sequence < css::beans::Pr sal_Int32 nWidth = 0; if( pValue->Value >>= nWidth ) { - Rectangle aVisArea( GetVisArea() ); + ::tools::Rectangle aVisArea( GetVisArea() ); aVisArea.Right() = aVisArea.Left() + nWidth - 1; SetVisArea( aVisArea ); } @@ -690,7 +690,7 @@ void FrameView::ReadUserDataSequence ( const css::uno::Sequence < css::beans::Pr sal_Int32 nHeight = 0; if( pValue->Value >>= nHeight ) { - Rectangle aVisArea( GetVisArea() ); + ::tools::Rectangle aVisArea( GetVisArea() ); aVisArea.Bottom() = nHeight + aVisArea.Top() - 1; SetVisArea( aVisArea ); } diff --git a/sd/source/ui/view/outlnvs2.cxx b/sd/source/ui/view/outlnvs2.cxx index 5e7ee9db9493..fc1ac93e8383 100644 --- a/sd/source/ui/view/outlnvs2.cxx +++ b/sd/source/ui/view/outlnvs2.cxx @@ -143,7 +143,7 @@ void OutlineViewShell::FuTemporary(SfxRequest &rReq) case SID_ZOOM_OUT: { SetZoom( std::min( (long) ( GetActiveWindow()->GetZoom() * 2 ), (long) GetActiveWindow()->GetMaxZoom() ) ); - Rectangle aVisAreaWin = GetActiveWindow()->PixelToLogic( Rectangle( Point(0,0), + ::tools::Rectangle aVisAreaWin = GetActiveWindow()->PixelToLogic( ::tools::Rectangle( Point(0,0), GetActiveWindow()->GetOutputSizePixel()) ); mpZoomList->InsertZoomRect(aVisAreaWin); Invalidate( SID_ATTR_ZOOM ); @@ -157,7 +157,7 @@ void OutlineViewShell::FuTemporary(SfxRequest &rReq) case SID_SIZE_REAL: { SetZoom( 100 ); - Rectangle aVisAreaWin = GetActiveWindow()->PixelToLogic( Rectangle( Point(0,0), + ::tools::Rectangle aVisAreaWin = GetActiveWindow()->PixelToLogic( ::tools::Rectangle( Point(0,0), GetActiveWindow()->GetOutputSizePixel()) ); mpZoomList->InsertZoomRect(aVisAreaWin); Invalidate( SID_ATTR_ZOOM ); @@ -170,7 +170,7 @@ void OutlineViewShell::FuTemporary(SfxRequest &rReq) case SID_ZOOM_IN: { SetZoom( std::max( (long) ( GetActiveWindow()->GetZoom() / 2 ), (long) GetActiveWindow()->GetMinZoom() ) ); - Rectangle aVisAreaWin = GetActiveWindow()->PixelToLogic( Rectangle( Point(0,0), + ::tools::Rectangle aVisAreaWin = GetActiveWindow()->PixelToLogic( ::tools::Rectangle( Point(0,0), GetActiveWindow()->GetOutputSizePixel()) ); mpZoomList->InsertZoomRect(aVisAreaWin); Invalidate( SID_ATTR_ZOOM ); diff --git a/sd/source/ui/view/outlnvsh.cxx b/sd/source/ui/view/outlnvsh.cxx index 78400790dde2..470a7eed34bc 100644 --- a/sd/source/ui/view/outlnvsh.cxx +++ b/sd/source/ui/view/outlnvsh.cxx @@ -233,7 +233,7 @@ void OutlineViewShell::Shutdown() * Paint method: the event gets forwarded from pWindow to the Viewshell * and the current function */ -void OutlineViewShell::Paint(const Rectangle& rRect, ::sd::Window* pWin) +void OutlineViewShell::Paint(const ::tools::Rectangle& rRect, ::sd::Window* pWin) { if (pOlView) { @@ -260,14 +260,14 @@ void OutlineViewShell::ArrangeGUIElements () // change OuputArea of the OutlinerView OutlinerView* pOutlinerView = pOlView->GetViewByWindow(pWindow); - Rectangle aWin(Point(0,0), pWindow->GetOutputSizePixel()); + ::tools::Rectangle aWin(Point(0,0), pWindow->GetOutputSizePixel()); aWin = pWindow->PixelToLogic(aWin); pOutlinerView->SetOutputArea(aWin); - Rectangle aVis = pOutlinerView->GetVisArea(); + ::tools::Rectangle aVis = pOutlinerView->GetVisArea(); - Rectangle aText = Rectangle(Point(0,0), + ::tools::Rectangle aText = ::tools::Rectangle(Point(0,0), Size(pOlView->GetPaperWidth(), pOlView->GetOutliner().GetTextHeight())); if (aWin.GetHeight() > aText.Bottom()) @@ -499,7 +499,7 @@ void OutlineViewShell::FuSupport(SfxRequest &rReq) if (aDataHelper.GetTransferable().is()) { pOlView->InsertData( aDataHelper, - GetActiveWindow()->PixelToLogic( Rectangle( Point(), GetActiveWindow()->GetOutputSizePixel() ).Center() ), + GetActiveWindow()->PixelToLogic( ::tools::Rectangle( Point(), GetActiveWindow()->GetOutputSizePixel() ).Center() ), nAction, false, SotClipboardFormatId::STRING); } } @@ -1129,7 +1129,7 @@ void OutlineViewShell::SetZoom(long nZoom) { // change OutputArea of OutlinerView OutlinerView* pOutlinerView = pOlView->GetViewByWindow(pWindow); - Rectangle aWin(Point(0,0), pWindow->GetOutputSizePixel()); + ::tools::Rectangle aWin(Point(0,0), pWindow->GetOutputSizePixel()); aWin = pWindow->PixelToLogic(aWin); pOutlinerView->SetOutputArea(aWin); } @@ -1141,7 +1141,7 @@ void OutlineViewShell::SetZoom(long nZoom) /** * Zoom with zoom rectangle. Inform OutlinerView */ -void OutlineViewShell::SetZoomRect(const Rectangle& rZoomRect) +void OutlineViewShell::SetZoomRect(const ::tools::Rectangle& rZoomRect) { ViewShell::SetZoomRect(rZoomRect); @@ -1150,7 +1150,7 @@ void OutlineViewShell::SetZoomRect(const Rectangle& rZoomRect) { // change OutputArea of OutlinerView OutlinerView* pOutlinerView = pOlView->GetViewByWindow(pWindow); - Rectangle aWin(Point(0,0), pWindow->GetOutputSizePixel()); + ::tools::Rectangle aWin(Point(0,0), pWindow->GetOutputSizePixel()); aWin = pWindow->PixelToLogic(aWin); pOutlinerView->SetOutputArea(aWin); } @@ -1822,7 +1822,7 @@ void OutlineViewShell::ReadUserDataSequence ( const css::uno::Sequence < css::be ReadFrameViewData( mpFrameView ); } -void OutlineViewShell::VisAreaChanged(const Rectangle& rRect) +void OutlineViewShell::VisAreaChanged(const ::tools::Rectangle& rRect) { ViewShell::VisAreaChanged( rRect ); diff --git a/sd/source/ui/view/outlview.cxx b/sd/source/ui/view/outlview.cxx index 723e5ff0e5e0..ac3ebfc5d973 100644 --- a/sd/source/ui/view/outlview.cxx +++ b/sd/source/ui/view/outlview.cxx @@ -114,7 +114,7 @@ OutlineView::OutlineView( DrawDocShell& rDocSh, vcl::Window* pWindow, OutlineVie } mpOutlinerView[0] = new OutlinerView(&mrOutliner, pWindow); - Rectangle aNullRect; + ::tools::Rectangle aNullRect; mpOutlinerView[0]->SetOutputArea(aNullRect); mrOutliner.SetUpdateMode(false); mrOutliner.InsertView(mpOutlinerView[0], EE_APPEND); @@ -213,7 +213,7 @@ void OutlineView::DisconnectFromApplication() Application::RemoveEventListener(LINK(this, OutlineView, AppEventListenerHdl)); } -void OutlineView::Paint(const Rectangle& rRect, ::sd::Window* pWin) +void OutlineView::Paint(const ::tools::Rectangle& rRect, ::sd::Window* pWin) { OutlinerView* pOlView = GetViewByWindow(pWin); @@ -232,7 +232,7 @@ void OutlineView::AddWindowToPaintView(OutputDevice* pWin, vcl::Window* pWindow) { bool bAdded = false; bool bValidArea = false; - Rectangle aOutputArea; + ::tools::Rectangle aOutputArea; const Color aWhiteColor( COL_WHITE ); sal_uInt16 nView = 0; @@ -770,11 +770,11 @@ IMPL_LINK_NOARG(OutlineView, StatusEventHdl, EditStatus&, void) { ::sd::Window* pWin = mrOutlineViewShell.GetActiveWindow(); OutlinerView* pOutlinerView = GetViewByWindow(pWin); - Rectangle aVis = pOutlinerView->GetVisArea(); - Rectangle aText = Rectangle(Point(0,0), + ::tools::Rectangle aVis = pOutlinerView->GetVisArea(); + ::tools::Rectangle aText = ::tools::Rectangle(Point(0,0), Size(mnPaperWidth, mrOutliner.GetTextHeight())); - Rectangle aWin(Point(0,0), pWin->GetOutputSizePixel()); + ::tools::Rectangle aWin(Point(0,0), pWin->GetOutputSizePixel()); aWin = pWin->PixelToLogic(aWin); if (!aVis.IsEmpty()) // not when opening diff --git a/sd/source/ui/view/presvish.cxx b/sd/source/ui/view/presvish.cxx index 7d78cddacbcc..a9c63d886caf 100644 --- a/sd/source/ui/view/presvish.cxx +++ b/sd/source/ui/view/presvish.cxx @@ -140,7 +140,7 @@ void PresentationViewShell::Activate( bool bIsMDIActivate ) GetDocSh()->Connect( this ); } -void PresentationViewShell::Paint( const Rectangle& rRect, ::sd::Window* ) +void PresentationViewShell::Paint( const ::tools::Rectangle& rRect, ::sd::Window* ) { rtl::Reference< SlideShow > xSlideShow( SlideShow::GetSlideShow( GetViewShellBase() ) ); if( xSlideShow.is() ) diff --git a/sd/source/ui/view/sdview.cxx b/sd/source/ui/view/sdview.cxx index 34d3ae3cf4bc..2856afa6355c 100644 --- a/sd/source/ui/view/sdview.cxx +++ b/sd/source/ui/view/sdview.cxx @@ -707,7 +707,7 @@ bool View::SdrBeginTextEdit( { if (OutlinerView* pView = GetTextEditOutlinerView()) { - Rectangle aRectangle = pView->GetOutputArea(); + ::tools::Rectangle aRectangle = pView->GetOutputArea(); if (pWin && pWin->GetMapMode().GetMapUnit() == MapUnit::Map100thMM) aRectangle = OutputDevice::LogicToLogic(aRectangle, MapUnit::Map100thMM, MapUnit::MapTwip); OString sRectangle = aRectangle.toString(); @@ -894,7 +894,7 @@ void View::SetMarkedOriginalSize() if ( bOK ) { - Rectangle aDrawRect( pObj->GetLogicRect() ); + ::tools::Rectangle aDrawRect( pObj->GetLogicRect() ); pUndoGroup->AddAction( mrDoc.GetSdrUndoFactory().CreateUndoGeoObject( *pObj ) ); pObj->Resize( aDrawRect.TopLeft(), Fraction( aOleSize.Width(), aDrawRect.GetWidth() ), @@ -907,7 +907,7 @@ void View::SetMarkedOriginalSize() const SdrGrafObj* pSdrGrafObj = static_cast< const SdrGrafObj* >(pObj); const Size aSize = pSdrGrafObj->getOriginalSize( ); pUndoGroup->AddAction( GetModel()->GetSdrUndoFactory().CreateUndoGeoObject(*pObj ) ); - Rectangle aRect( pObj->GetLogicRect() ); + ::tools::Rectangle aRect( pObj->GetLogicRect() ); aRect.SetSize( aSize ); pObj->SetLogicRect( aRect ); bOK = true; @@ -939,7 +939,7 @@ void View::DoConnect(SdrOle2Obj* pObj) if ( !pSdClient ) { pSdClient = new Client(pObj, mpViewSh, pWindow); - Rectangle aRect = pObj->GetLogicRect(); + ::tools::Rectangle aRect = pObj->GetLogicRect(); { // TODO/LEAN: working with visual area can switch object to running state Size aDrawSize = aRect.GetSize(); @@ -1177,7 +1177,7 @@ bool View::MarkPoint(SdrHdl& rHdl, bool bUnmark ) return FmFormView::MarkPoint( rHdl, bUnmark ); } -bool View::MarkPoints(const Rectangle* pRect, bool bUnmark) +bool View::MarkPoints(const ::tools::Rectangle* pRect, bool bUnmark) { if( maSmartTags.MarkPoints( pRect, bUnmark ) ) return true; diff --git a/sd/source/ui/view/sdview2.cxx b/sd/source/ui/view/sdview2.cxx index 0b1cab132db3..c6e7721fd303 100644 --- a/sd/source/ui/view/sdview2.cxx +++ b/sd/source/ui/view/sdview2.cxx @@ -99,7 +99,7 @@ css::uno::Reference< css::datatransfer::XTransferable > View::CreateClipboardDat // #112978# need to use GetAllMarkedBoundRect instead of GetAllMarkedRect to get // fat lines correctly - const Rectangle aMarkRect( GetAllMarkedBoundRect() ); + const ::tools::Rectangle aMarkRect( GetAllMarkedBoundRect() ); TransferableObjectDescriptor aObjDesc; SdrOle2Obj* pSdrOleObj = nullptr; SdrPageView* pPgView = GetSdrPageView(); @@ -200,7 +200,7 @@ css::uno::Reference< css::datatransfer::XTransferable > View::CreateSelectionDat SdTransferable* pTransferable = new SdTransferable( &mrDoc, pWorkView, true ); css::uno::Reference< css::datatransfer::XTransferable > xRet( pTransferable ); TransferableObjectDescriptor aObjDesc; - const Rectangle aMarkRect( GetAllMarkedRect() ); + const ::tools::Rectangle aMarkRect( GetAllMarkedRect() ); OUString aDisplayName; SD_MOD()->pTransferSelection = pTransferable; @@ -319,7 +319,7 @@ void View::DoPaste (vcl::Window* pWindow) sal_Int8 nDnDAction = DND_ACTION_COPY; if( pWindow ) - aPos = pWindow->PixelToLogic( Rectangle( aPos, pWindow->GetOutputSizePixel() ).Center() ); + aPos = pWindow->PixelToLogic( ::tools::Rectangle( aPos, pWindow->GetOutputSizePixel() ).Center() ); DrawViewShell* pDrViewSh = static_cast<DrawViewShell*>( mpDocSh->GetViewShell() ); @@ -458,7 +458,7 @@ sal_Int8 View::AcceptDrop( const AcceptDropEvent& rEvt, DropTargetHelper& rTarge if( pOLV ) { - Rectangle aRect( pOLV->GetOutputArea() ); + ::tools::Rectangle aRect( pOLV->GetOutputArea() ); if (GetMarkedObjectCount() == 1) { @@ -636,7 +636,7 @@ sal_Int8 View::ExecuteDrop( const ExecuteDropEvent& rEvt, if( pOLV ) { - Rectangle aRect( pOLV->GetOutputArea() ); + ::tools::Rectangle aRect( pOLV->GetOutputArea() ); if( GetMarkedObjectCount() == 1 ) { diff --git a/sd/source/ui/view/sdview3.cxx b/sd/source/ui/view/sdview3.cxx index e6fadb143d45..9ae250f5ad36 100644 --- a/sd/source/ui/view/sdview3.cxx +++ b/sd/source/ui/view/sdview3.cxx @@ -114,11 +114,11 @@ SdrObject* ImpGetClone(std::vector<ImpRememberOrigAndClone*>& aConnectorContaine } // restrict movement to WorkArea -void ImpCheckInsertPos(Point& rPos, const Size& rSize, const Rectangle& rWorkArea) +void ImpCheckInsertPos(Point& rPos, const Size& rSize, const ::tools::Rectangle& rWorkArea) { if(!rWorkArea.IsEmpty()) { - Rectangle aMarkRect(Point(rPos.X() - (rSize.Width() / 2), rPos.Y() - (rSize.Height() / 2)), rSize); + ::tools::Rectangle aMarkRect(Point(rPos.X() - (rSize.Width() / 2), rPos.Y() - (rSize.Height() / 2)), rSize); if(!aMarkRect.IsInside(rWorkArea)) { @@ -465,7 +465,7 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper, // source objects, if necessary (#103207) if( pOwnData == SD_MOD()->pTransferSelection ) { - Rectangle aCurBoundRect; + ::tools::Rectangle aCurBoundRect; if( pMarkList->TakeBoundRect( pPV, aCurBoundRect ) ) aCurPos = aCurBoundRect.TopLeft(); @@ -715,10 +715,10 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper, { // replace object SdrObject* pNewObj = pObj->Clone(); - Rectangle aPickObjRect( pPickObj2->GetCurrentBoundRect() ); + ::tools::Rectangle aPickObjRect( pPickObj2->GetCurrentBoundRect() ); Size aPickObjSize( aPickObjRect.GetSize() ); Point aVec( aPickObjRect.TopLeft() ); - Rectangle aObjRect( pNewObj->GetCurrentBoundRect() ); + ::tools::Rectangle aObjRect( pNewObj->GetCurrentBoundRect() ); Size aObjSize( aObjRect.GetSize() ); Fraction aScaleWidth( aPickObjSize.Width(), aObjSize.Width() ); @@ -841,7 +841,7 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper, if( pObj ) { - Rectangle aRect( pObj->GetLogicRect() ); + ::tools::Rectangle aRect( pObj->GetLogicRect() ); Size aSize( aRect.GetSize() ); maDropPos.X() -= ( aSize.Width() >> 1 ); @@ -994,7 +994,7 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper, maDropPos.X() -= std::min( aSize.Width(), aMaxSize.Width() ) >> 1; maDropPos.Y() -= std::min( aSize.Height(), aMaxSize.Height() ) >> 1; - Rectangle aRect( maDropPos, aSize ); + ::tools::Rectangle aRect( maDropPos, aSize ); SdrOle2Obj* pObj = new SdrOle2Obj( aObjRef, aName, aRect ); SdrPageView* pPV = GetSdrPageView(); SdrInsertFlags nOptions = SdrInsertFlags::SETDEFLAYER; @@ -1164,7 +1164,7 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper, maDropPos.X() -= std::min( aSize.Width(), aMaxSize.Width() ) >> 1; maDropPos.Y() -= std::min( aSize.Height(), aMaxSize.Height() ) >> 1; - Rectangle aRect( maDropPos, aSize ); + ::tools::Rectangle aRect( maDropPos, aSize ); SdrOle2Obj* pObj = new SdrOle2Obj( aObjRef, aName, aRect ); SdrPageView* pPV = GetSdrPageView(); SdrInsertFlags nOptions = SdrInsertFlags::SETDEFLAYER; @@ -1404,7 +1404,7 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper, if( pOLV ) { - Rectangle aRect( pOLV->GetOutputArea() ); + ::tools::Rectangle aRect( pOLV->GetOutputArea() ); Point aPos( pOLV->GetWindow()->PixelToLogic( maDropPos ) ); if( aRect.IsInside( aPos ) || ( !bDrag && IsTextEdit() ) ) @@ -1440,7 +1440,7 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper, if( pOLV ) { - Rectangle aRect( pOLV->GetOutputArea() ); + ::tools::Rectangle aRect( pOLV->GetOutputArea() ); Point aPos( pOLV->GetWindow()->PixelToLogic( maDropPos ) ); if( aRect.IsInside( aPos ) || ( !bDrag && IsTextEdit() ) ) diff --git a/sd/source/ui/view/sdview4.cxx b/sd/source/ui/view/sdview4.cxx index 060760ce4948..972ec47696a9 100644 --- a/sd/source/ui/view/sdview4.cxx +++ b/sd/source/ui/view/sdview4.cxx @@ -125,7 +125,7 @@ SdrGrafObj* View::InsertGraphic( const Graphic& rGraphic, sal_Int8& rAction, if ( pNewGrafObj->IsEmptyPresObj() ) { - Rectangle aRect( pNewGrafObj->GetLogicRect() ); + ::tools::Rectangle aRect( pNewGrafObj->GetLogicRect() ); pNewGrafObj->AdjustToMaxRect( aRect ); pNewGrafObj->SetOutlinerParaObject(nullptr); pNewGrafObj->SetEmptyPresObj(false); @@ -192,12 +192,12 @@ SdrGrafObj* View::InsertGraphic( const Graphic& rGraphic, sal_Int8& rAction, MapMode( MapUnit::Map100thMM ) ); } - pNewGrafObj = new SdrGrafObj( rGraphic, Rectangle( rPos, aSize ) ); + pNewGrafObj = new SdrGrafObj( rGraphic, ::tools::Rectangle( rPos, aSize ) ); SdrPage* pPage = pPV->GetPage(); Size aPageSize( pPage->GetSize() ); aPageSize.Width() -= pPage->GetLftBorder() + pPage->GetRgtBorder(); aPageSize.Height() -= pPage->GetUppBorder() + pPage->GetLwrBorder(); - pNewGrafObj->AdjustToMaxRect( Rectangle( Point(), aPageSize ), true ); + pNewGrafObj->AdjustToMaxRect( ::tools::Rectangle( Point(), aPageSize ), true ); SdrInsertFlags nOptions = SdrInsertFlags::SETDEFLAYER; bool bIsPresTarget = false; @@ -223,9 +223,9 @@ SdrGrafObj* View::InsertGraphic( const Graphic& rGraphic, sal_Int8& rAction, if (pImageMap) pNewGrafObj->AppendUserData(new SdIMapInfo(*pImageMap)); - Rectangle aPickObjRect(pPickObj->GetCurrentBoundRect()); + ::tools::Rectangle aPickObjRect(pPickObj->GetCurrentBoundRect()); Size aPickObjSize(aPickObjRect.GetSize()); - Rectangle aObjRect(pNewGrafObj->GetCurrentBoundRect()); + ::tools::Rectangle aObjRect(pNewGrafObj->GetCurrentBoundRect()); Size aObjSize(aObjRect.GetSize()); Fraction aScaleWidth(aPickObjSize.Width(), aObjSize.Width()); @@ -340,7 +340,7 @@ SdrMediaObj* View::InsertMediaObj( const OUString& rMediaURL, const OUString& rM } else if( pPV ) { - Rectangle aRect( rPos, rSize ); + ::tools::Rectangle aRect( rPos, rSize ); if( pPickObj ) aRect = pPickObj->GetLogicRect(); @@ -528,7 +528,7 @@ IMPL_LINK_NOARG(View, DropInsertFileHdl, Timer *, void) } Size aSize( aSz.Width, aSz.Height ); - Rectangle aRect; + ::tools::Rectangle aRect; if (!aSize.Width() || !aSize.Height()) { @@ -536,7 +536,7 @@ IMPL_LINK_NOARG(View, DropInsertFileHdl, Timer *, void) aSize.Height() = 1000; } - aRect = Rectangle( maDropPos, aSize ); + aRect = ::tools::Rectangle( maDropPos, aSize ); SdrOle2Obj* pOleObj = new SdrOle2Obj( svt::EmbeddedObjectRef( xObj, nAspect ), aName, aRect ); SdrInsertFlags nOptions = SdrInsertFlags::SETDEFLAYER; diff --git a/sd/source/ui/view/sdwindow.cxx b/sd/source/ui/view/sdwindow.cxx index b6fc0dafa2ae..9d13093e6144 100644 --- a/sd/source/ui/view/sdwindow.cxx +++ b/sd/source/ui/view/sdwindow.cxx @@ -214,7 +214,7 @@ void Window::PrePaint(vcl::RenderContext& /*rRenderContext*/) mpViewShell->PrePaint(); } -void Window::Paint(vcl::RenderContext& /*rRenderContext*/, const Rectangle& rRect) +void Window::Paint(vcl::RenderContext& /*rRenderContext*/, const ::tools::Rectangle& rRect) { if ( mpViewShell ) mpViewShell->Paint(rRect, this); @@ -386,7 +386,7 @@ void Window::SetZoomIntegral(long nZoom) SetZoomFactor(nZoom); } -long Window::GetZoomForRect( const Rectangle& rZoomRect ) +long Window::GetZoomForRect( const ::tools::Rectangle& rZoomRect ) { long nRetZoom = 100; @@ -445,7 +445,7 @@ long Window::GetZoomForRect( const Rectangle& rZoomRect ) is displayed centered and as large as possible while still being fully visible in the window. */ -long Window::SetZoomRect (const Rectangle& rZoomRect) +long Window::SetZoomRect (const ::tools::Rectangle& rZoomRect) { long nNewZoom = 100; @@ -996,7 +996,7 @@ Selection Window::GetSurroundingTextSelection() const } } -void Window::LogicInvalidate(const Rectangle* pRectangle) +void Window::LogicInvalidate(const ::tools::Rectangle* pRectangle) { DrawViewShell* pDrawViewShell = dynamic_cast<DrawViewShell*>(mpViewShell); if (pDrawViewShell && pDrawViewShell->IsInSwitchPage()) @@ -1007,7 +1007,7 @@ void Window::LogicInvalidate(const Rectangle* pRectangle) sRectangle = "EMPTY"; else { - Rectangle aRectangle(*pRectangle); + ::tools::Rectangle aRectangle(*pRectangle); if (GetMapMode().GetMapUnit() == MapUnit::Map100thMM) aRectangle = OutputDevice::LogicToLogic(aRectangle, MapUnit::Map100thMM, MapUnit::MapTwip); sRectangle = aRectangle.toString(); diff --git a/sd/source/ui/view/viewoverlaymanager.cxx b/sd/source/ui/view/viewoverlaymanager.cxx index 476593a36f64..44aa1f59e3d0 100644 --- a/sd/source/ui/view/viewoverlaymanager.cxx +++ b/sd/source/ui/view/viewoverlaymanager.cxx @@ -190,7 +190,7 @@ void ImageButtonHdl::onMouseEnter(const MouseEvent& rMEvt) aResId.SetRT( RSC_STRING ); OUString aHelpText( aResId ); - Rectangle aScreenRect( pDev->LogicToPixel( GetPos() ), maImageSize ); + ::tools::Rectangle aScreenRect( pDev->LogicToPixel( GetPos() ), maImageSize ); Help::ShowQuickHelp(static_cast< vcl::Window* >( pHdlList->GetView()->GetFirstOutputDevice() ), aScreenRect, aHelpText); } Touch(); @@ -319,7 +319,7 @@ BitmapEx ChangePlaceholderTag::createOverlayImage( int nHighlight ) { SdrObject* pPlaceholder = mxPlaceholderObj.get(); SmartTagReference xThis( this ); - const Rectangle& rSnapRect = pPlaceholder->GetSnapRect(); + const ::tools::Rectangle& rSnapRect = pPlaceholder->GetSnapRect(); OutputDevice* pDev = mrView.GetFirstOutputDevice(); if( pDev == nullptr ) @@ -334,14 +334,14 @@ BitmapEx ChangePlaceholderTag::createOverlayImage( int nHighlight ) aRet.SetSizePixel( Size( aSize.Width() << 1, aSize.Height() << 1 ) ); - const Rectangle aRectSrc( Point( 0, 0 ), aSize ); + const ::tools::Rectangle aRectSrc( Point( 0, 0 ), aSize ); aRet = *(getButtonImage((nHighlight == 0) ? 4 : 0, bLarge)); aRet.Expand( aSize.Width(), aSize.Height(), true ); - aRet.CopyPixel( Rectangle( Point( aSize.Width(), 0 ), aSize ), aRectSrc, getButtonImage((nHighlight == 1) ? 5 : 1, bLarge) ); - aRet.CopyPixel( Rectangle( Point( 0, aSize.Height() ), aSize ), aRectSrc, getButtonImage((nHighlight == 2) ? 6 : 2, bLarge) ); - aRet.CopyPixel( Rectangle( Point( aSize.Width(), aSize.Height() ), aSize ), aRectSrc, getButtonImage((nHighlight == 3) ? 7 : 3, bLarge) ); + aRet.CopyPixel( ::tools::Rectangle( Point( aSize.Width(), 0 ), aSize ), aRectSrc, getButtonImage((nHighlight == 1) ? 5 : 1, bLarge) ); + aRet.CopyPixel( ::tools::Rectangle( Point( 0, aSize.Height() ), aSize ), aRectSrc, getButtonImage((nHighlight == 2) ? 6 : 2, bLarge) ); + aRet.CopyPixel( ::tools::Rectangle( Point( aSize.Width(), aSize.Height() ), aSize ), aRectSrc, getButtonImage((nHighlight == 3) ? 7 : 3, bLarge) ); } return aRet; @@ -353,7 +353,7 @@ void ChangePlaceholderTag::addCustomHandles( SdrHdlList& rHandlerList ) { SdrObject* pPlaceholder = mxPlaceholderObj.get(); SmartTagReference xThis( this ); - const Rectangle& rSnapRect = pPlaceholder->GetSnapRect(); + const ::tools::Rectangle& rSnapRect = pPlaceholder->GetSnapRect(); const Point aPoint; OutputDevice* pDev = mrView.GetFirstOutputDevice(); diff --git a/sd/source/ui/view/viewshe2.cxx b/sd/source/ui/view/viewshe2.cxx index e556e5ef2f2c..c59680375463 100644 --- a/sd/source/ui/view/viewshe2.cxx +++ b/sd/source/ui/view/viewshe2.cxx @@ -162,13 +162,13 @@ void ViewShell::VirtHScrollHdl(ScrollBar* pHScroll) mpContentWindow->SetVisibleXY(fX, -1); - Rectangle aVisArea = GetDocSh()->GetVisArea(ASPECT_CONTENT); + ::tools::Rectangle aVisArea = GetDocSh()->GetVisArea(ASPECT_CONTENT); Point aVisAreaPos = GetActiveWindow()->PixelToLogic( Point(0,0) ); aVisArea.SetPos(aVisAreaPos); GetDocSh()->SetVisArea(aVisArea); Size aVisSizePixel = GetActiveWindow()->GetOutputSizePixel(); - Rectangle aVisAreaWin = GetActiveWindow()->PixelToLogic( Rectangle( Point(0,0), aVisSizePixel) ); + ::tools::Rectangle aVisAreaWin = GetActiveWindow()->PixelToLogic( ::tools::Rectangle( Point(0,0), aVisSizePixel) ); VisAreaChanged(aVisAreaWin); if (pView) @@ -221,13 +221,13 @@ void ViewShell::VirtVScrollHdl(ScrollBar* pVScroll) mpContentWindow->SetVisibleXY(-1, fY); - Rectangle aVisArea = GetDocSh()->GetVisArea(ASPECT_CONTENT); + ::tools::Rectangle aVisArea = GetDocSh()->GetVisArea(ASPECT_CONTENT); Point aVisAreaPos = GetActiveWindow()->PixelToLogic( Point(0,0) ); aVisArea.SetPos(aVisAreaPos); GetDocSh()->SetVisArea(aVisArea); Size aVisSizePixel = GetActiveWindow()->GetOutputSizePixel(); - Rectangle aVisAreaWin = GetActiveWindow()->PixelToLogic( Rectangle( Point(0,0), aVisSizePixel) ); + ::tools::Rectangle aVisAreaWin = GetActiveWindow()->PixelToLogic( ::tools::Rectangle( Point(0,0), aVisSizePixel) ); VisAreaChanged(aVisAreaWin); if (pView) @@ -299,13 +299,13 @@ void ViewShell::Scroll(long nScrollX, long nScrollY) GetActiveWindow()->SetVisibleXY(fX, fY); - Rectangle aVisArea = GetDocSh()->GetVisArea(ASPECT_CONTENT); + ::tools::Rectangle aVisArea = GetDocSh()->GetVisArea(ASPECT_CONTENT); Point aVisAreaPos = GetActiveWindow()->PixelToLogic( Point(0,0) ); aVisArea.SetPos(aVisAreaPos); GetDocSh()->SetVisArea(aVisArea); Size aVisSizePixel = GetActiveWindow()->GetOutputSizePixel(); - Rectangle aVisAreaWin = GetActiveWindow()->PixelToLogic( Rectangle( Point(0,0), aVisSizePixel) ); + ::tools::Rectangle aVisAreaWin = GetActiveWindow()->PixelToLogic( ::tools::Rectangle( Point(0,0), aVisSizePixel) ); VisAreaChanged(aVisAreaWin); ::sd::View* pView = GetView(); @@ -347,7 +347,7 @@ void ViewShell::SetZoom(long nZoom) } Size aVisSizePixel = GetActiveWindow()->GetOutputSizePixel(); - Rectangle aVisAreaWin = GetActiveWindow()->PixelToLogic( Rectangle( Point(0,0), aVisSizePixel) ); + ::tools::Rectangle aVisAreaWin = GetActiveWindow()->PixelToLogic( ::tools::Rectangle( Point(0,0), aVisSizePixel) ); VisAreaChanged(aVisAreaWin); ::sd::View* pView = GetView(); @@ -373,7 +373,7 @@ long ViewShell::GetZoom() const * Set zoom rectangle for active window. Sets all split windows to the same zoom * factor. */ -void ViewShell::SetZoomRect(const Rectangle& rZoomRect) +void ViewShell::SetZoomRect(const ::tools::Rectangle& rZoomRect) { long nZoom = GetActiveWindow()->SetZoomRect(rZoomRect); Fraction aUIScale(nZoom, 100); @@ -403,7 +403,7 @@ void ViewShell::SetZoomRect(const Rectangle& rZoomRect) } Size aVisSizePixel = GetActiveWindow()->GetOutputSizePixel(); - Rectangle aVisAreaWin = GetActiveWindow()->PixelToLogic( Rectangle( Point(0,0), aVisSizePixel) ); + ::tools::Rectangle aVisAreaWin = GetActiveWindow()->PixelToLogic( ::tools::Rectangle( Point(0,0), aVisSizePixel) ); VisAreaChanged(aVisAreaWin); ::sd::View* pView = GetView(); @@ -435,7 +435,7 @@ void ViewShell::InitWindows(const Point& rViewOrigin, const Size& rViewSize, } Size aVisSizePixel = GetActiveWindow()->GetOutputSizePixel(); - Rectangle aVisAreaWin = GetActiveWindow()->PixelToLogic( Rectangle( Point(0,0), aVisSizePixel) ); + ::tools::Rectangle aVisAreaWin = GetActiveWindow()->PixelToLogic( ::tools::Rectangle( Point(0,0), aVisSizePixel) ); VisAreaChanged(aVisAreaWin); ::sd::View* pView = GetView(); @@ -457,7 +457,7 @@ void ViewShell::InvalidateWindows() /** * Draw a selection rectangle with the ?provided pen on all split windows. */ -void ViewShell::DrawMarkRect(const Rectangle& rRect) const +void ViewShell::DrawMarkRect(const ::tools::Rectangle& rRect) const { if (mpContentWindow.get() != nullptr) { @@ -507,7 +507,7 @@ void ViewShell::SetPageSizeAndBorder(PageKind ePageKind, const Size& rNewSize, if (rNewSize.Width() > 0 || nLeft >= 0 || nRight >= 0 || nUpper >= 0 || nLower >= 0) { - Rectangle aNewBorderRect(nLeft, nUpper, nRight, nLower); + ::tools::Rectangle aNewBorderRect(nLeft, nUpper, nRight, nLower); pPage->ScaleObjects(rNewSize, aNewBorderRect, bScaleAll); if (rNewSize.Width() > 0) @@ -555,7 +555,7 @@ void ViewShell::SetPageSizeAndBorder(PageKind ePageKind, const Size& rNewSize, if (rNewSize.Width() > 0 || nLeft >= 0 || nRight >= 0 || nUpper >= 0 || nLower >= 0) { - Rectangle aNewBorderRect(nLeft, nUpper, nRight, nLower); + ::tools::Rectangle aNewBorderRect(nLeft, nUpper, nRight, nLower); pPage->ScaleObjects(rNewSize, aNewBorderRect, bScaleAll); if (rNewSize.Width() > 0) @@ -606,7 +606,7 @@ void ViewShell::SetPageSizeAndBorder(PageKind ePageKind, const Size& rNewSize, ::sd::View* pView = GetView(); if (pView) { - pView->SetWorkArea(Rectangle(Point() - aVisAreaPos - aPageOrg, aViewSize)); + pView->SetWorkArea(::tools::Rectangle(Point() - aVisAreaPos - aPageOrg, aViewSize)); } UpdateScrollBars(); @@ -794,7 +794,7 @@ bool ViewShell::ActivateObject(SdrOle2Obj* pObj, long nVerb) pObj->SetObjRef(xObj); } - Rectangle aRect = pObj->GetLogicRect(); + ::tools::Rectangle aRect = pObj->GetLogicRect(); if ( pObj->GetAspect() != embed::Aspects::MSOLE_ICON ) { @@ -832,12 +832,12 @@ bool ViewShell::ActivateObject(SdrOle2Obj* pObj, long nVerb) pSdClient = new Client(pObj, this, GetActiveWindow()); } - Rectangle aRect = pObj->GetLogicRect(); + ::tools::Rectangle aRect = pObj->GetLogicRect(); { // #i118485# center on BoundRect for activation, // OLE may be sheared/rotated now - const Rectangle& rBoundRect = pObj->GetCurrentBoundRect(); + const ::tools::Rectangle& rBoundRect = pObj->GetCurrentBoundRect(); const Point aDelta(rBoundRect.Center() - aRect.Center()); aRect.Move(aDelta.X(), aDelta.Y()); } @@ -883,7 +883,7 @@ bool ViewShell::ActivateObject(SdrOle2Obj* pObj, long nVerb) /** * @returns enclosing rectangle of all (split-) windows. */ -const Rectangle& ViewShell::GetAllWindowRect() +const ::tools::Rectangle& ViewShell::GetAllWindowRect() { maAllWindowRectangle.SetPos( mpContentWindow->OutputToScreenPixel(Point(0,0))); @@ -984,7 +984,7 @@ void ViewShell::ReadUserDataSequence ( const css::uno::Sequence < css::beans::Pr mpFrameView->ReadUserDataSequence( rSequence, bBrowse ); } -void ViewShell::VisAreaChanged(const Rectangle& rRect) +void ViewShell::VisAreaChanged(const ::tools::Rectangle& rRect) { OSL_ASSERT (GetViewShell()!=nullptr); GetViewShell()->VisAreaChanged(rRect); @@ -1009,7 +1009,7 @@ void ViewShell::SetWinViewPos(const Point& rWinPos) UpdateScrollBars(); Size aVisSizePixel = GetActiveWindow()->GetOutputSizePixel(); - Rectangle aVisAreaWin = GetActiveWindow()->PixelToLogic( Rectangle( Point(0,0), aVisSizePixel) ); + ::tools::Rectangle aVisAreaWin = GetActiveWindow()->PixelToLogic( ::tools::Rectangle( Point(0,0), aVisSizePixel) ); VisAreaChanged(aVisAreaWin); ::sd::View* pView = GetView(); diff --git a/sd/source/ui/view/viewshel.cxx b/sd/source/ui/view/viewshel.cxx index c509e0b547e4..97b709768cb4 100644 --- a/sd/source/ui/view/viewshel.cxx +++ b/sd/source/ui/view/viewshel.cxx @@ -1088,7 +1088,7 @@ void ViewShell::ArrangeGUIElements() } // Windows in the center and rulers at the left and top side. - maAllWindowRectangle = Rectangle( + maAllWindowRectangle = ::tools::Rectangle( maViewPos, Size(maViewSize.Width()-maScrBarWH.Width(), maViewSize.Height()-maScrBarWH.Height())); @@ -1525,7 +1525,7 @@ void ViewShell::PrePaint() { } -void ViewShell::Paint (const Rectangle&, ::sd::Window* ) +void ViewShell::Paint (const ::tools::Rectangle&, ::sd::Window* ) { } diff --git a/sd/source/ui/view/zoomlist.cxx b/sd/source/ui/view/zoomlist.cxx index d4428537e469..f2e30ea8e5a9 100644 --- a/sd/source/ui/view/zoomlist.cxx +++ b/sd/source/ui/view/zoomlist.cxx @@ -36,7 +36,7 @@ ZoomList::ZoomList(ViewShell* pViewShell) { } -void ZoomList::InsertZoomRect(const Rectangle& rRect) +void ZoomList::InsertZoomRect(const ::tools::Rectangle& rRect) { size_t nRectCount = maRectangles.size(); @@ -54,7 +54,7 @@ void ZoomList::InsertZoomRect(const Rectangle& rRect) rBindings.Invalidate( SID_ZOOM_PREV ); } -Rectangle ZoomList::GetNextZoomRect() +::tools::Rectangle ZoomList::GetNextZoomRect() { mnCurPos++; size_t nRectCount = maRectangles.size(); @@ -69,7 +69,7 @@ Rectangle ZoomList::GetNextZoomRect() return maRectangles[mnCurPos]; } -Rectangle ZoomList::GetPreviousZoomRect() +::tools::Rectangle ZoomList::GetPreviousZoomRect() { if (mnCurPos > 0) mnCurPos--; diff --git a/sfx2/source/appl/newhelp.cxx b/sfx2/source/appl/newhelp.cxx index 9364ff5c17c0..061d94622c0a 100644 --- a/sfx2/source/appl/newhelp.cxx +++ b/sfx2/source/appl/newhelp.cxx @@ -2663,7 +2663,7 @@ void SfxHelpWindow_Impl::MakeLayout() if ( aRect.Width > 0 && aRect.Height > 0 ) { - Rectangle aScreenRect = pScreenWin->GetClientWindowExtentsRelative(); + tools::Rectangle aScreenRect = pScreenWin->GetClientWindowExtentsRelative(); Point aNewPos = aScreenRect.TopLeft(); sal_Int32 nDiffWidth = nOldWidth - nWidth; aNewPos.X() += nDiffWidth; diff --git a/sfx2/source/appl/workwin.cxx b/sfx2/source/appl/workwin.cxx index 867e38dcb32c..85683c94d087 100644 --- a/sfx2/source/appl/workwin.cxx +++ b/sfx2/source/appl/workwin.cxx @@ -718,7 +718,7 @@ SvBorder SfxWorkWindow::Arrange_Impl() Point aPos; Size aSize; - Rectangle aTmp( aClientArea ); + tools::Rectangle aTmp( aClientArea ); for (sal_uInt16 n : aSortedList) { @@ -1602,9 +1602,9 @@ void SfxWorkWindow::ConfigChild_Impl(SfxChildIdentifier eChild, if (nPos == USHRT_MAX || !pDockWin) return; - Rectangle aOuterRect( GetTopRect_Impl() ); + tools::Rectangle aOuterRect( GetTopRect_Impl() ); aOuterRect.SetPos( pWorkWin->OutputToScreenPixel( aOuterRect.TopLeft() )); - Rectangle aInnerRect( aOuterRect ); + tools::Rectangle aInnerRect( aOuterRect ); // The current affected window is included in the calculation of // the inner rectangle! @@ -2165,7 +2165,7 @@ void SfxWorkWindow::ResetChildWindows_Impl() // returns the size of the area (client area) of the // parent windows, in which the ChildWindow can be fitted. -Rectangle SfxWorkWindow::GetTopRect_Impl() +tools::Rectangle SfxWorkWindow::GetTopRect_Impl() { return pMasterFrame->GetTopOuterRectPixel_Impl(); } @@ -2346,7 +2346,7 @@ void SfxWorkWindow::EndAutoShow_Impl( Point aPos ) { Point aLocalPos = p->ScreenToOutputPixel( aPos ); Point aEmptyPoint; - Rectangle aRect( aEmptyPoint, p->GetSizePixel() ); + tools::Rectangle aRect( aEmptyPoint, p->GetSizePixel() ); if ( !aRect.IsInside( aLocalPos ) ) p->FadeOut(); } @@ -2361,7 +2361,7 @@ void SfxWorkWindow::ArrangeAutoHideWindows( SfxSplitWindow *pActSplitWin ) if ( pParent ) pParent->ArrangeAutoHideWindows( pActSplitWin ); - Rectangle aArea( aUpperClientArea ); + tools::Rectangle aArea( aUpperClientArea ); for ( sal_uInt16 n=0; n<SFX_SPLITWINDOWS_MAX; n++ ) { // Either dummy window or window in the auto-show-mode are processed @@ -2481,11 +2481,11 @@ void SfxWorkWindow::ArrangeAutoHideWindows( SfxSplitWindow *pActSplitWin ) } } -Rectangle SfxWorkWindow::GetFreeArea( bool bAutoHide ) const +tools::Rectangle SfxWorkWindow::GetFreeArea( bool bAutoHide ) const { if ( bAutoHide ) { - Rectangle aArea( aClientArea ); + tools::Rectangle aArea( aClientArea ); for ( sal_uInt16 n=0; n<SFX_SPLITWINDOWS_MAX; n++ ) { if ( pSplit[n]->IsPinned() || !pSplit[n]->IsVisible() ) diff --git a/sfx2/source/bastyp/sfxhtml.cxx b/sfx2/source/bastyp/sfxhtml.cxx index ef9a0661931e..abf417eb5c09 100644 --- a/sfx2/source/bastyp/sfxhtml.cxx +++ b/sfx2/source/bastyp/sfxhtml.cxx @@ -183,7 +183,7 @@ IMAPOBJ_SETEVENT: case IMAP_OBJ_RECTANGLE: if( aCoords.size() >=4 ) { - Rectangle aRect( aCoords[0], aCoords[1], + tools::Rectangle aRect( aCoords[0], aCoords[1], aCoords[2], aCoords[3] ); IMapRectangleObject aMapRObj( aRect, aHRef, aAlt, OUString(), aTarget, aName, !bNoHRef ); 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; } diff --git a/sfx2/source/dialog/backingwindow.cxx b/sfx2/source/dialog/backingwindow.cxx index 82dc215b778b..966bab0ef268 100644 --- a/sfx2/source/dialog/backingwindow.cxx +++ b/sfx2/source/dialog/backingwindow.cxx @@ -380,25 +380,25 @@ void BackingWindow::checkInstalledModules() mpDBAllButton->Enable(aModuleOpt.IsModuleInstalled( SvtModuleOptions::EModule::DATABASE )); } -void BackingWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangle&) +void BackingWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&) { Resize(); Wallpaper aBack(svtools::ColorConfig().GetColorValue(::svtools::APPBACKGROUND).nColor); - vcl::Region aClip(Rectangle(Point(0, 0), GetOutputSizePixel())); + vcl::Region aClip(tools::Rectangle(Point(0, 0), GetOutputSizePixel())); aClip.Exclude(maStartCentButtons); rRenderContext.Push(PushFlags::CLIPREGION); rRenderContext.IntersectClipRegion(aClip); - rRenderContext.DrawWallpaper(Rectangle(Point(0, 0), GetOutputSizePixel()), aBack); + rRenderContext.DrawWallpaper(tools::Rectangle(Point(0, 0), GetOutputSizePixel()), aBack); rRenderContext.Pop(); ScopedVclPtrInstance<VirtualDevice> pVDev(rRenderContext); pVDev->EnableRTL(rRenderContext.IsRTLEnabled()); pVDev->SetOutputSizePixel(maStartCentButtons.GetSize()); Point aOffset(Point(0, 0) - maStartCentButtons.TopLeft()); - pVDev->DrawWallpaper(Rectangle(aOffset, GetOutputSizePixel()), aBack); + pVDev->DrawWallpaper(tools::Rectangle(aOffset, GetOutputSizePixel()), aBack); rRenderContext.DrawOutDev(maStartCentButtons.TopLeft(), maStartCentButtons.GetSize(), Point(0, 0), maStartCentButtons.GetSize(), @@ -512,7 +512,7 @@ void BackingWindow::setOwningFrame( const css::uno::Reference< css::frame::XFram void BackingWindow::Resize() { - maStartCentButtons = Rectangle( Point(0, 0), GetOutputSizePixel() ); + maStartCentButtons = tools::Rectangle( Point(0, 0), GetOutputSizePixel() ); if (isLayoutEnabled(this)) VclContainer::setLayoutAllocation(*GetWindow(GetWindowType::FirstChild), diff --git a/sfx2/source/dialog/backingwindow.hxx b/sfx2/source/dialog/backingwindow.hxx index 5d3259b6f367..31388537f55c 100644 --- a/sfx2/source/dialog/backingwindow.hxx +++ b/sfx2/source/dialog/backingwindow.hxx @@ -86,7 +86,7 @@ class BackingWindow : public vcl::Window, public VclBuilderContainer std::vector< VclPtr<vcl::Window> > maDndWindows; Color maButtonsTextColor; - Rectangle maStartCentButtons; + tools::Rectangle maStartCentButtons; bool mbInitControls; sal_Int32 mnHideExternalLinks; @@ -118,7 +118,7 @@ public: virtual ~BackingWindow() override; virtual void dispose() override; - virtual void Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) override; + virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) override; virtual void Resize() override; virtual bool PreNotify(NotifyEvent& rNEvt) override; virtual void GetFocus() override; diff --git a/sfx2/source/dialog/basedlgs.cxx b/sfx2/source/dialog/basedlgs.cxx index b58181c9b0e6..7e6c4692553d 100644 --- a/sfx2/source/dialog/basedlgs.cxx +++ b/sfx2/source/dialog/basedlgs.cxx @@ -199,7 +199,7 @@ void SfxModelessDialog::StateChanged( StateChangedType nStateChange ) aPos.Y() += ( aParentSize.Height() - aDlgSize.Height() ) / 2; Point aPoint; - Rectangle aRect = GetDesktopRectPixel(); + tools::Rectangle aRect = GetDesktopRectPixel(); aPoint.X() = aRect.Right() - aDlgSize.Width(); aPoint.Y() = aRect.Bottom() - aDlgSize.Height(); diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx index 4f71efbd3471..68b5eda251a8 100644 --- a/sfx2/source/dialog/dinfdlg.cxx +++ b/sfx2/source/dialog/dinfdlg.cxx @@ -1348,7 +1348,7 @@ void CustomPropertiesDurationField::RequestHelp( const HelpEvent& rHEvt ) if ( rHEvt.GetMode() & HelpEventMode::QUICK ) { Size aSize( GetSizePixel() ); - Rectangle aItemRect( rHEvt.GetMousePosPixel(), aSize ); + tools::Rectangle aItemRect( rHEvt.GetMousePosPixel(), aSize ); if (Help::IsBalloonHelpEnabled()) Help::ShowBalloon( this, rHEvt.GetMousePosPixel(), aItemRect, GetText() ); else @@ -1719,7 +1719,7 @@ bool CustomPropertiesWindow::InitControls( HeaderBar* pHeaderBar, const ScrollBa sal_uInt16 nPos = 0; while ( *pCurrent ) { - Rectangle aRect = pHeaderBar->GetItemRect( pHeaderBar->GetItemId( nPos++ ) ); + tools::Rectangle aRect = pHeaderBar->GetItemRect( pHeaderBar->GetItemId( nPos++ ) ); Size aOrigSize = (*pCurrent)->GetSizePixel(); Point aOrigPos = (*pCurrent)->GetPosPixel(); Size aSize(aOrigSize); diff --git a/sfx2/source/dialog/dockwin.cxx b/sfx2/source/dialog/dockwin.cxx index 284111783c2c..ec7d0a085fa1 100644 --- a/sfx2/source/dialog/dockwin.cxx +++ b/sfx2/source/dialog/dockwin.cxx @@ -652,7 +652,7 @@ void SfxDockingWindow::StartDocking() is used, the behavior can be influenced by the derived classes (see below). This method should if possible not be overwritten. */ -bool SfxDockingWindow::Docking( const Point& rPos, Rectangle& rRect ) +bool SfxDockingWindow::Docking( const Point& rPos, tools::Rectangle& rRect ) { if ( Application::IsInModalMode() ) return true; @@ -749,7 +749,7 @@ bool SfxDockingWindow::Docking( const Point& rPos, Rectangle& rRect ) the parent window. If this method is overridden by a derived class, then SfxDockingWindow::EndDocking() must be called first. */ -void SfxDockingWindow::EndDocking( const Rectangle& rRect, bool bFloatMode ) +void SfxDockingWindow::EndDocking( const tools::Rectangle& rRect, bool bFloatMode ) { if ( !pImpl || !pImpl->bConstructed || IsDockingCanceled() || !pMgr ) return; @@ -1152,7 +1152,7 @@ void SfxDockingWindow::ReleaseChildWindow_Impl() is overridden (see below). */ -SfxChildAlignment SfxDockingWindow::CalcAlignment(const Point& rPos, Rectangle& rRect) +SfxChildAlignment SfxDockingWindow::CalcAlignment(const Point& rPos, tools::Rectangle& rRect) { // calculate hypothetical sizes for different modes Size aFloatingSize(CalcDockingSize(SfxChildAlignment::NOALIGNMENT)); @@ -1194,7 +1194,7 @@ SfxChildAlignment SfxDockingWindow::CalcAlignment(const Point& rPos, Rectangle& nTBBorder = MAX_TOGGLEAREA_WIDTH; // shrink area for floating mode if possible - Rectangle aInRect = GetInnerRect(); + tools::Rectangle aInRect = GetInnerRect(); if ( aInRect.GetWidth() > nLRBorder ) aInRect.Left() += nLRBorder/2; if ( aInRect.GetWidth() > nLRBorder ) @@ -1207,7 +1207,7 @@ SfxChildAlignment SfxDockingWindow::CalcAlignment(const Point& rPos, Rectangle& // calculate alignment resulting from docking rectangle bool bBecomesFloating = false; SfxChildAlignment eDockAlign = pImpl->GetDockAlignment(); - Rectangle aDockingRect( rRect ); + tools::Rectangle aDockingRect( rRect ); if ( !IsFloatingMode() ) { // don't use tracking rectangle for alignment check, because it will be too large @@ -1221,7 +1221,7 @@ SfxChildAlignment SfxDockingWindow::CalcAlignment(const Point& rPos, Rectangle& } Point aPos = aDockingRect.TopLeft(); - Rectangle aIntersect = GetOuterRect().GetIntersection( aDockingRect ); + tools::Rectangle aIntersect = GetOuterRect().GetIntersection( aDockingRect ); if ( aIntersect.IsEmpty() ) // docking rectangle completely outside docking area -> floating mode bBecomesFloating = true; @@ -1229,13 +1229,13 @@ SfxChildAlignment SfxDockingWindow::CalcAlignment(const Point& rPos, Rectangle& { // create a small test rect around the mouse position and use this one // instead of the passed rRect to not dock too easily or by accident - Rectangle aSmallDockingRect; + tools::Rectangle aSmallDockingRect; aSmallDockingRect.SetSize( Size( MAX_TOGGLEAREA_WIDTH, MAX_TOGGLEAREA_HEIGHT ) ); Point aNewPos(rPos); aNewPos.X() -= aSmallDockingRect.GetWidth()/2; aNewPos.Y() -= aSmallDockingRect.GetHeight()/2; aSmallDockingRect.SetPos(rPos); - Rectangle aIntersectRect = aInRect.GetIntersection( aSmallDockingRect ); + tools::Rectangle aIntersectRect = aInRect.GetIntersection( aSmallDockingRect ); if ( aIntersectRect == aSmallDockingRect ) // docking rectangle completely inside (shrunk) inner area -> floating mode bBecomesFloating = true; @@ -1568,12 +1568,12 @@ bool SfxDockingWindow::Close() /** Returns a boundary line to the docked edge and a frame when the Window is in a docked state. In this way SVLOOK is considered. */ -void SfxDockingWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangle& /*rRect*/) +void SfxDockingWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& /*rRect*/) { if (pImpl->bSplitable || IsFloatingMode()) return; - Rectangle aRect(Point(0, 0), GetOutputSizePixel()); + tools::Rectangle aRect(Point(0, 0), GetOutputSizePixel()); switch (GetAlignment()) { case SfxChildAlignment::TOP: diff --git a/sfx2/source/dialog/infobar.cxx b/sfx2/source/dialog/infobar.cxx index 190759b09305..087913f38cf7 100644 --- a/sfx2/source/dialog/infobar.cxx +++ b/sfx2/source/dialog/infobar.cxx @@ -105,19 +105,19 @@ public: GetInfoBarColors(InfoBarType::Warning,m_aBackgroundColor,m_aForegroundColor,m_aMessageColor); } - virtual void Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) override; + virtual void Paint(vcl::RenderContext& rRenderContext, const ::tools::Rectangle& rRect) override; void setBackgroundColor(const basegfx::BColor& rColor); void setForegroundColor(const basegfx::BColor& rColor); }; -void SfxCloseButton::Paint(vcl::RenderContext& rRenderContext, const Rectangle&) +void SfxCloseButton::Paint(vcl::RenderContext& rRenderContext, const ::tools::Rectangle&) { const ViewInformation2D aNewViewInfos; const unique_ptr<BaseProcessor2D> pProcessor( createBaseProcessor2DFromOutputDevice(rRenderContext, aNewViewInfos)); - const Rectangle aRect(Point(0, 0), PixelToLogic(GetSizePixel())); + const ::tools::Rectangle aRect(Point(0, 0), PixelToLogic(GetSizePixel())); drawinglayer::primitive2d::Primitive2DContainer aSeq(2); @@ -230,13 +230,13 @@ void SfxInfoBarWindow::dispose() vcl::Window::dispose(); } -void SfxInfoBarWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rPaintRect) +void SfxInfoBarWindow::Paint(vcl::RenderContext& rRenderContext, const ::tools::Rectangle& rPaintRect) { const ViewInformation2D aNewViewInfos; const unique_ptr<BaseProcessor2D> pProcessor( createBaseProcessor2DFromOutputDevice(rRenderContext, aNewViewInfos)); - const Rectangle aRect(Point(0, 0), PixelToLogic(GetSizePixel())); + const ::tools::Rectangle aRect(Point(0, 0), PixelToLogic(GetSizePixel())); drawinglayer::primitive2d::Primitive2DContainer aSeq(2); diff --git a/sfx2/source/dialog/splitwin.cxx b/sfx2/source/dialog/splitwin.cxx index c84314773fd7..a10861ddefaf 100644 --- a/sfx2/source/dialog/splitwin.cxx +++ b/sfx2/source/dialog/splitwin.cxx @@ -347,7 +347,7 @@ void SfxSplitWindow::StartSplit() pEmptyWin->bSplit = true; } - Rectangle aRect = pWorkWin->GetFreeArea( !bPinned ); + tools::Rectangle aRect = pWorkWin->GetFreeArea( !bPinned ); switch ( GetAlign() ) { case WindowAlign::Left: @@ -987,7 +987,7 @@ bool SfxSplitWindow::CursorIsOverRect() const Point aPos = pEmptyWin->GetParent()->OutputToScreenPixel( pEmptyWin->GetPosPixel() ); Size aSize = pEmptyWin->GetSizePixel(); - Rectangle aRect( aPos, aSize ); + tools::Rectangle aRect( aPos, aSize ); if ( bVisible ) { @@ -1000,7 +1000,7 @@ bool SfxSplitWindow::CursorIsOverRect() const aVisSize.Width() += 2 * nPixel; aVisSize.Height() += 2 * nPixel; - Rectangle aVisRect( aVisPos, aVisSize ); + tools::Rectangle aVisRect( aVisPos, aVisSize ); aRect = aRect.GetUnion( aVisRect ); } diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx index 5133d805ec30..49b17f515691 100644 --- a/sfx2/source/dialog/templdlg.cxx +++ b/sfx2/source/dialog/templdlg.cxx @@ -145,7 +145,7 @@ void StyleLBoxString::Paint( SvLBoxString::InitViewData( &rDevice, const_cast<SvTreeListEntry*>(&rEntry), mpViewData); } - Rectangle aPaintRectangle = pView->GetPaintRectangle(); + tools::Rectangle aPaintRectangle = pView->GetPaintRectangle(); bPainted = pStylePreviewRenderer->render(aPaintRectangle); } } diff --git a/sfx2/source/dialog/titledockwin.cxx b/sfx2/source/dialog/titledockwin.cxx index 5299973e9705..e917c24a4b98 100644 --- a/sfx2/source/dialog/titledockwin.cxx +++ b/sfx2/source/dialog/titledockwin.cxx @@ -143,7 +143,7 @@ namespace sfx2 rRenderContext.SetTextFillColor(); } - void TitledDockingWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangle& i_rArea) + void TitledDockingWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& i_rArea) { const StyleSettings& rStyleSettings = rRenderContext.GetSettings().GetStyleSettings(); @@ -173,15 +173,15 @@ namespace sfx2 int nInnerBottom = nOuterBottom - m_aBorder.Bottom() + 1; // Paint title bar background. - Rectangle aTitleBarBox(Rectangle(nOuterLeft, 0, nOuterRight, nInnerTop - 1)); + tools::Rectangle aTitleBarBox(tools::Rectangle(nOuterLeft, 0, nOuterRight, nInnerTop - 1)); rRenderContext.DrawRect(aTitleBarBox); if (nInnerLeft > nOuterLeft) - rRenderContext.DrawRect(Rectangle(nOuterLeft, nInnerTop, nInnerLeft, nInnerBottom)); + rRenderContext.DrawRect(tools::Rectangle(nOuterLeft, nInnerTop, nInnerLeft, nInnerBottom)); if (nOuterRight > nInnerRight) - rRenderContext.DrawRect(Rectangle(nInnerRight, nInnerTop, nOuterRight, nInnerBottom)); + rRenderContext.DrawRect(tools::Rectangle(nInnerRight, nInnerTop, nOuterRight, nInnerBottom)); if (nInnerBottom < nOuterBottom) - rRenderContext.DrawRect(Rectangle(nOuterLeft, nInnerBottom, nOuterRight, nOuterBottom)); + rRenderContext.DrawRect(tools::Rectangle(nOuterLeft, nInnerBottom, nOuterRight, nOuterBottom)); // Paint bevel border. rRenderContext.SetFillColor(); @@ -251,7 +251,7 @@ namespace sfx2 SfxDockingWindow::StateChanged( i_nType ); } - void TitledDockingWindow::EndDocking( const Rectangle& i_rRect, bool i_bFloatMode ) + void TitledDockingWindow::EndDocking( const tools::Rectangle& i_rRect, bool i_bFloatMode ) { SfxDockingWindow::EndDocking( i_rRect, i_bFloatMode ); diff --git a/sfx2/source/doc/doctemplates.cxx b/sfx2/source/doc/doctemplates.cxx index 24c48d569f2b..75caffce5435 100644 --- a/sfx2/source/doc/doctemplates.cxx +++ b/sfx2/source/doc/doctemplates.cxx @@ -129,7 +129,7 @@ namespace { class WaitWindow_Impl : public WorkWindow { - Rectangle maRect; + tools::Rectangle maRect; OUString maText; const DrawTextFlags mnTextStyle = DrawTextFlags::Center | DrawTextFlags::VCenter | DrawTextFlags::WordBreak | DrawTextFlags::MultiLine; @@ -137,7 +137,7 @@ public: WaitWindow_Impl(); virtual ~WaitWindow_Impl() override; virtual void dispose() override; - virtual void Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) override; + virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) override; }; #define X_OFFSET 15 @@ -2332,7 +2332,7 @@ void SAL_CALL SfxDocTplService::update() WaitWindow_Impl::WaitWindow_Impl() : WorkWindow(nullptr, WB_BORDER | WB_3DLOOK) { - Rectangle aRect = Rectangle(0, 0, 300, 30000); + tools::Rectangle aRect = tools::Rectangle(0, 0, 300, 30000); maText = SfxResId(RID_CNT_STR_WAITING).toString(); maRect = GetTextRect(aRect, maText, mnTextStyle); aRect = maRect; @@ -2359,7 +2359,7 @@ void WaitWindow_Impl::dispose() } -void WaitWindow_Impl::Paint(vcl::RenderContext& rRenderContext, const Rectangle& /*rRect*/) +void WaitWindow_Impl::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& /*rRect*/) { rRenderContext.DrawText(maRect, maText, mnTextStyle); } diff --git a/sfx2/source/doc/new.cxx b/sfx2/source/doc/new.cxx index 21399295814b..82c78426603d 100644 --- a/sfx2/source/doc/new.cxx +++ b/sfx2/source/doc/new.cxx @@ -65,12 +65,12 @@ Size SfxPreviewBase_Impl::GetOptimalSize() const return LogicToPixel(Size(127, 129), MapUnit::MapAppFont); } -void SfxPreviewWin_Impl::ImpPaint(vcl::RenderContext& rRenderContext, const Rectangle& /*rRect*/, GDIMetaFile* pFile) +void SfxPreviewWin_Impl::ImpPaint(vcl::RenderContext& rRenderContext, const tools::Rectangle& /*rRect*/, GDIMetaFile* pFile) { rRenderContext.SetLineColor(); Color aLightGrayCol(COL_LIGHTGRAY); rRenderContext.SetFillColor(aLightGrayCol); - rRenderContext.DrawRect(Rectangle(Point(0,0), rRenderContext.GetOutputSize())); + rRenderContext.DrawRect(tools::Rectangle(Point(0,0), rRenderContext.GetOutputSize())); Size aTmpSize = pFile ? pFile->GetPrefSize() : Size(1, 1); DBG_ASSERT(aTmpSize.Height() != 0 && aTmpSize.Width() != 0, "size of first page is 0, override GetFirstPageSize or set visible-area!"); @@ -104,13 +104,13 @@ void SfxPreviewWin_Impl::ImpPaint(vcl::RenderContext& rRenderContext, const Rect Color aWhiteCol(COL_WHITE); rRenderContext.SetLineColor(aBlackCol); rRenderContext.SetFillColor(aWhiteCol); - rRenderContext.DrawRect(Rectangle(aPoint + Point(FRAME, FRAME), bPoint + Point(FRAME, FRAME))); + rRenderContext.DrawRect(tools::Rectangle(aPoint + Point(FRAME, FRAME), bPoint + Point(FRAME, FRAME))); pFile->WindStart(); pFile->Play(&rRenderContext, aPoint + Point(FRAME, FRAME), aSize); } } -void SfxPreviewWin_Impl::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) +void SfxPreviewWin_Impl::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) { ImpPaint(rRenderContext, rRect, xMetaFile.get()); } diff --git a/sfx2/source/doc/objembed.cxx b/sfx2/source/doc/objembed.cxx index ab90ef7fc015..9ebe0078bd16 100644 --- a/sfx2/source/doc/objembed.cxx +++ b/sfx2/source/doc/objembed.cxx @@ -92,29 +92,29 @@ void SfxObjectShell::OnDocumentPrinterChanged( Printer* /*pNewPrinter*/ ) } -Rectangle SfxObjectShell::GetVisArea( sal_uInt16 nAspect ) const +tools::Rectangle SfxObjectShell::GetVisArea( sal_uInt16 nAspect ) const { if( nAspect == ASPECT_CONTENT ) return pImpl->m_aVisArea; else if( nAspect == ASPECT_THUMBNAIL ) { - Rectangle aRect; + tools::Rectangle aRect; aRect.SetSize( OutputDevice::LogicToLogic( Size( 5000, 5000 ), MapUnit::Map100thMM, GetMapUnit() ) ); return aRect; } - return Rectangle(); + return tools::Rectangle(); } -const Rectangle& SfxObjectShell::GetVisArea() const +const tools::Rectangle& SfxObjectShell::GetVisArea() const { pImpl->m_aVisArea = GetVisArea( ASPECT_CONTENT ); return pImpl->m_aVisArea; } -void SfxObjectShell::SetVisArea( const Rectangle & rVisArea ) +void SfxObjectShell::SetVisArea( const tools::Rectangle & rVisArea ) { if( pImpl->m_aVisArea != rVisArea ) { @@ -132,7 +132,7 @@ void SfxObjectShell::SetVisArea( const Rectangle & rVisArea ) void SfxObjectShell::SetVisAreaSize( const Size & rVisSize ) { - SetVisArea( Rectangle( GetVisArea().TopLeft(), rVisSize ) ); + SetVisArea( tools::Rectangle( GetVisArea().TopLeft(), rVisSize ) ); } @@ -195,7 +195,7 @@ void SfxObjectShell::DoDraw_Impl( OutputDevice* pDev, const JobSetup & rSetup, sal_uInt16 nAspect ) { - Rectangle aVisArea = GetVisArea( nAspect ); + tools::Rectangle aVisArea = GetVisArea( nAspect ); // MapUnit des Ziels MapMode aMapMode( GetMapUnit() ); aMapMode.SetScaleX( rScaleX ); diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx index 75fe7d357dad..36b6be463497 100644 --- a/sfx2/source/doc/sfxbasemodel.cxx +++ b/sfx2/source/doc/sfxbasemodel.cxx @@ -870,7 +870,7 @@ sal_Bool SAL_CALL SfxBaseModel::attachResource( const OUString& Sequence< sal_Int32 > aWinExtent; if ( ( aArgs.get( "WinExtent" ) >>= aWinExtent )&& ( aWinExtent.getLength() == 4 ) ) { - Rectangle aVisArea( aWinExtent[0], aWinExtent[1], aWinExtent[2], aWinExtent[3] ); + tools::Rectangle aVisArea( aWinExtent[0], aWinExtent[1], aWinExtent[2], aWinExtent[3] ); aVisArea = OutputDevice::LogicToLogic( aVisArea, MapUnit::Map100thMM, pObjectShell->GetMapUnit() ); pObjectShell->SetVisArea( aVisArea ); } @@ -961,7 +961,7 @@ Sequence< beans::PropertyValue > SAL_CALL SfxBaseModel::getArgs() // "WinExtent" property should be updated always. // We can store it now to overwrite an old value // since it is not from ItemSet - Rectangle aTmpRect = m_pData->m_pObjectShell->GetVisArea( ASPECT_CONTENT ); + tools::Rectangle aTmpRect = m_pData->m_pObjectShell->GetVisArea( ASPECT_CONTENT ); aTmpRect = OutputDevice::LogicToLogic( aTmpRect, m_pData->m_pObjectShell->GetMapUnit(), MapUnit::Map100thMM ); Sequence< sal_Int32 > aRectSeq(4); @@ -3561,7 +3561,7 @@ void SAL_CALL SfxBaseModel::setVisualAreaSize( sal_Int64 nAspect, const awt::Siz } else { - Rectangle aTmpRect = m_pData->m_pObjectShell->GetVisArea( ASPECT_CONTENT ); + tools::Rectangle aTmpRect = m_pData->m_pObjectShell->GetVisArea( ASPECT_CONTENT ); aTmpRect.SetSize( Size( aSize.Width, aSize.Height ) ); m_pData->m_pObjectShell->SetVisArea( aTmpRect ); } @@ -3574,7 +3574,7 @@ awt::Size SAL_CALL SfxBaseModel::getVisualAreaSize( sal_Int64 /*nAspect*/ ) if ( !m_pData->m_pObjectShell.is() ) throw Exception(); // TODO: error handling - Rectangle aTmpRect = m_pData->m_pObjectShell->GetVisArea( ASPECT_CONTENT ); + tools::Rectangle aTmpRect = m_pData->m_pObjectShell->GetVisArea( ASPECT_CONTENT ); return awt::Size( aTmpRect.GetWidth(), aTmpRect.GetHeight() ); } diff --git a/sfx2/source/inc/objshimp.hxx b/sfx2/source/inc/objshimp.hxx index dc0624253094..a9348c1cfbbd 100644 --- a/sfx2/source/inc/objshimp.hxx +++ b/sfx2/source/inc/objshimp.hxx @@ -118,7 +118,7 @@ struct SfxObjectShell_Impl : public ::sfx2::IMacroDocumentAccess bool m_bEnableSetModified; bool m_bIsModified; - Rectangle m_aVisArea; + tools::Rectangle m_aVisArea; MapUnit m_nMapUnit; bool m_bCreateTempStor; diff --git a/sfx2/source/inc/preview.hxx b/sfx2/source/inc/preview.hxx index ecb3a13121fb..86c8f6fc4bf8 100644 --- a/sfx2/source/inc/preview.hxx +++ b/sfx2/source/inc/preview.hxx @@ -39,13 +39,13 @@ public: class SfxPreviewWin_Impl: public SfxPreviewBase_Impl { protected: - virtual void Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) override; + virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) override; public: SfxPreviewWin_Impl(vcl::Window* pParent, WinBits nStyle) : SfxPreviewBase_Impl(pParent, nStyle) {} - static void ImpPaint(vcl::RenderContext& rRenderContext, const Rectangle& rRect, GDIMetaFile* pFile); + static void ImpPaint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect, GDIMetaFile* pFile); }; #endif diff --git a/sfx2/source/inc/workwin.hxx b/sfx2/source/inc/workwin.hxx index a9a4fbe46e63..d4e229a77464 100644 --- a/sfx2/source/inc/workwin.hxx +++ b/sfx2/source/inc/workwin.hxx @@ -192,8 +192,8 @@ class SfxWorkWindow final std::vector<sal_uInt16> aSortedList; SfxStatBar_Impl aStatBar; std::vector< SfxObjectBar_Impl > aObjBarList; - Rectangle aClientArea; - Rectangle aUpperClientArea; + tools::Rectangle aClientArea; + tools::Rectangle aUpperClientArea; SfxWorkWindow* pParent; VclPtr<SfxSplitWindow> pSplit[SFX_SPLITWINDOWS_MAX]; std::vector<SfxChild_Impl*> @@ -227,7 +227,7 @@ class SfxWorkWindow final void Sort_Impl(); SfxChild_Impl* FindChild_Impl( const vcl::Window& rWindow ) const; bool RequestTopToolSpacePixel_Impl( SvBorder aBorder ); - Rectangle GetTopRect_Impl(); + tools::Rectangle GetTopRect_Impl(); SvBorder Arrange_Impl(); void SaveStatus_Impl(SfxChildWindow*, const SfxChildWinInfo&); static bool IsPluginMode( SfxObjectShell* pObjShell ); @@ -239,7 +239,7 @@ public: { return *pBindings; } vcl::Window* GetWindow() const { return pWorkWin; } - Rectangle GetFreeArea( bool bAutoHide ) const; + tools::Rectangle GetFreeArea( bool bAutoHide ) const; void SetDockingAllowed(bool bSet) { bDockingAllowed = bSet; } void SetInternalDockingAllowed(bool bSet) diff --git a/sfx2/source/notebookbar/DropdownBox.cxx b/sfx2/source/notebookbar/DropdownBox.cxx index 97d63a716ef9..63aba3f33f70 100644 --- a/sfx2/source/notebookbar/DropdownBox.cxx +++ b/sfx2/source/notebookbar/DropdownBox.cxx @@ -188,7 +188,7 @@ IMPL_LINK(DropdownBox, PBClickHdl, Button*, /*pButton*/, void) long x = GetPosPixel().getX(); long y = GetPosPixel().getY() + NOTEBOOK_HEADER_HEIGHT + GetSizePixel().Height(); - Rectangle aRect(x, y, x, y); + tools::Rectangle aRect(x, y, x, y); m_pPopup->StartPopupMode(aRect, FloatWinPopupFlags::Down |FloatWinPopupFlags::GrabFocus diff --git a/sfx2/source/notebookbar/NotebookbarTabControl.cxx b/sfx2/source/notebookbar/NotebookbarTabControl.cxx index a443c045ffa1..e2acfb5ea2c4 100644 --- a/sfx2/source/notebookbar/NotebookbarTabControl.cxx +++ b/sfx2/source/notebookbar/NotebookbarTabControl.cxx @@ -252,7 +252,7 @@ IMPL_LINK(NotebookbarTabControl, OpenNotebookbarPopupMenu, NotebookBar*, pNotebo VCLXMenu* pAwtMenu = VCLXMenu::GetImplementation(xPopupMenu); PopupMenu* pVCLMenu = static_cast<PopupMenu*>(pAwtMenu->GetMenu()); Point aPos(0, NotebookbarTabControl::GetHeaderHeight()); - pVCLMenu->Execute(pNotebookbar, Rectangle(aPos, aPos),PopupMenuFlags::ExecuteDown|PopupMenuFlags::NoMouseUpClose); + pVCLMenu->Execute(pNotebookbar, tools::Rectangle(aPos, aPos),PopupMenuFlags::ExecuteDown|PopupMenuFlags::NoMouseUpClose); Reference<css::lang::XComponent> xComponent(xPopupController, UNO_QUERY); if (xComponent.is()) diff --git a/sfx2/source/notebookbar/PriorityHBox.cxx b/sfx2/source/notebookbar/PriorityHBox.cxx index 596fb5e72912..de2e7b9bb201 100644 --- a/sfx2/source/notebookbar/PriorityHBox.cxx +++ b/sfx2/source/notebookbar/PriorityHBox.cxx @@ -128,7 +128,7 @@ public: VclHBox::Resize(); } - virtual void Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) override + virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) override { if (!m_bInitialized && SfxViewFrame::Current()) { diff --git a/sfx2/source/sidebar/Deck.cxx b/sfx2/source/sidebar/Deck.cxx index f8d4bcfe17e1..3b86130bfa59 100644 --- a/sfx2/source/sidebar/Deck.cxx +++ b/sfx2/source/sidebar/Deck.cxx @@ -97,12 +97,12 @@ VclPtr<DeckTitleBar> Deck::GetTitleBar() const return mpTitleBar; } -Rectangle Deck::GetContentArea() const +tools::Rectangle Deck::GetContentArea() const { const Size aWindowSize (GetSizePixel()); const int nBorderSize (Theme::GetInteger(Theme::Int_DeckBorderSize)); - return Rectangle( + return tools::Rectangle( Theme::GetInteger(Theme::Int_DeckLeftPadding) + nBorderSize, Theme::GetInteger(Theme::Int_DeckTopPadding) + nBorderSize, aWindowSize.Width() - 1 - Theme::GetInteger(Theme::Int_DeckRightPadding) - nBorderSize, @@ -114,7 +114,7 @@ void Deck::ApplySettings(vcl::RenderContext& rRenderContext) rRenderContext.SetBackground(Wallpaper()); } -void Deck::Paint(vcl::RenderContext& rRenderContext, const Rectangle& /*rUpdateArea*/) +void Deck::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& /*rUpdateArea*/) { const Size aWindowSize (GetSizePixel()); const SvBorder aPadding(Theme::GetInteger(Theme::Int_DeckLeftPadding), @@ -123,7 +123,7 @@ void Deck::Paint(vcl::RenderContext& rRenderContext, const Rectangle& /*rUpdateA Theme::GetInteger(Theme::Int_DeckBottomPadding)); // Paint deck background outside the border. - Rectangle aBox(0, 0, aWindowSize.Width() - 1, aWindowSize.Height() - 1); + tools::Rectangle aBox(0, 0, aWindowSize.Width() - 1, aWindowSize.Height() - 1); DrawHelper::DrawBorder(rRenderContext, aBox, aPadding, Theme::GetPaint(Theme::Paint_DeckBackground), Theme::GetPaint(Theme::Paint_DeckBackground)); @@ -314,7 +314,7 @@ Deck::ScrollContainerWindow::ScrollContainerWindow (vcl::Window* pParentWindow) #endif } -void Deck::ScrollContainerWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangle& /*rUpdateArea*/) +void Deck::ScrollContainerWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& /*rUpdateArea*/) { // Paint the separators. const sal_Int32 nSeparatorHeight(Theme::GetInteger(Theme::Int_DeckSeparatorHeight)); diff --git a/sfx2/source/sidebar/DeckLayouter.cxx b/sfx2/source/sidebar/DeckLayouter.cxx index 5c0d60dde254..ba3ed38293f4 100644 --- a/sfx2/source/sidebar/DeckLayouter.cxx +++ b/sfx2/source/sidebar/DeckLayouter.cxx @@ -54,8 +54,8 @@ namespace { : mpPanel(),maLayoutSize(0,0,0),mnDistributedHeight(0),mnWeight(0),mnPanelIndex(0),mbShowTitleBar(true) {} }; - Rectangle LayoutPanels ( - const Rectangle& rContentArea, + tools::Rectangle LayoutPanels ( + const tools::Rectangle& rContentArea, sal_Int32& rMinimalWidth, ::std::vector<LayoutItem>& rLayoutItems, vcl::Window& rScrollClipWindow, @@ -66,7 +66,7 @@ namespace { ::std::vector<LayoutItem>& rLayoutItem, sal_Int32& rAvailableHeight, sal_Int32& rMinimalWidth, - const Rectangle& rContentBox); + const tools::Rectangle& rContentBox); void DistributeHeights ( ::std::vector<LayoutItem>& rLayoutItems, const sal_Int32 nHeightToDistribute, @@ -77,12 +77,12 @@ namespace { const sal_Int32 nWidth, const LayoutMode eMode, vcl::Window& rScrollContainer); - Rectangle PlaceDeckTitle ( + tools::Rectangle PlaceDeckTitle ( vcl::Window& rTittleBar, - const Rectangle& rAvailableSpace); - Rectangle PlaceVerticalScrollBar ( + const tools::Rectangle& rAvailableSpace); + tools::Rectangle PlaceVerticalScrollBar ( ScrollBar& rVerticalScrollBar, - const Rectangle& rAvailableSpace, + const tools::Rectangle& rAvailableSpace, const bool bShowVerticalScrollBar); void SetupVerticalScrollBar( ScrollBar& rVerticalScrollBar, @@ -90,11 +90,11 @@ namespace { const sal_Int32 nVisibleHeight); void UpdateFiller ( vcl::Window& rFiller, - const Rectangle& rBox); + const tools::Rectangle& rBox); } void DeckLayouter::LayoutDeck ( - const Rectangle& rContentArea, + const tools::Rectangle& rContentArea, sal_Int32& rMinimalWidth, SharedPanelContainer& rPanels, vcl::Window& rDeckTitleBar, @@ -105,7 +105,7 @@ void DeckLayouter::LayoutDeck ( { if (rContentArea.GetWidth()<=0 || rContentArea.GetHeight()<=0) return; - Rectangle aBox (PlaceDeckTitle(rDeckTitleBar, rContentArea)); + tools::Rectangle aBox (PlaceDeckTitle(rDeckTitleBar, rContentArea)); if ( ! rPanels.empty()) { @@ -131,8 +131,8 @@ void DeckLayouter::LayoutDeck ( namespace { -Rectangle LayoutPanels ( - const Rectangle& rContentArea, +tools::Rectangle LayoutPanels ( + const tools::Rectangle& rContentArea, sal_Int32& rMinimalWidth, ::std::vector<LayoutItem>& rLayoutItems, vcl::Window& rScrollClipWindow, @@ -140,7 +140,7 @@ Rectangle LayoutPanels ( ScrollBar& rVerticalScrollBar, const bool bShowVerticalScrollBar) { - Rectangle aBox (PlaceVerticalScrollBar(rVerticalScrollBar, rContentArea, bShowVerticalScrollBar)); + tools::Rectangle aBox (PlaceVerticalScrollBar(rVerticalScrollBar, rContentArea, bShowVerticalScrollBar)); const sal_Int32 nWidth (aBox.GetWidth()); @@ -339,7 +339,7 @@ void GetRequestedSizes ( ::std::vector<LayoutItem>& rLayoutItems, sal_Int32& rAvailableHeight, sal_Int32& rMinimalWidth, - const Rectangle& rContentBox) + const tools::Rectangle& rContentBox) { rAvailableHeight = rContentBox.GetHeight(); @@ -483,9 +483,9 @@ void DistributeHeights ( OSL_ASSERT(nRemainingHeightToDistribute==0); } -Rectangle PlaceDeckTitle ( +tools::Rectangle PlaceDeckTitle ( vcl::Window& rDeckTitleBar, - const Rectangle& rAvailableSpace) + const tools::Rectangle& rAvailableSpace) { if (static_cast<DockingWindow*>(rDeckTitleBar.GetParent()->GetParent())->IsFloatingMode()) { @@ -502,7 +502,7 @@ Rectangle PlaceDeckTitle ( rAvailableSpace.GetWidth(), nDeckTitleBarHeight); rDeckTitleBar.Show(); - return Rectangle( + return tools::Rectangle( rAvailableSpace.Left(), rAvailableSpace.Top() + nDeckTitleBarHeight, rAvailableSpace.Right(), @@ -510,9 +510,9 @@ Rectangle PlaceDeckTitle ( } } -Rectangle PlaceVerticalScrollBar ( +tools::Rectangle PlaceVerticalScrollBar ( ScrollBar& rVerticalScrollBar, - const Rectangle& rAvailableSpace, + const tools::Rectangle& rAvailableSpace, const bool bShowVerticalScrollBar) { if (bShowVerticalScrollBar) @@ -524,7 +524,7 @@ Rectangle PlaceVerticalScrollBar ( nScrollBarWidth, rAvailableSpace.GetHeight()); rVerticalScrollBar.Show(); - return Rectangle( + return tools::Rectangle( rAvailableSpace.Left(), rAvailableSpace.Top(), rAvailableSpace.Right() - nScrollBarWidth, @@ -551,7 +551,7 @@ void SetupVerticalScrollBar( void UpdateFiller ( vcl::Window& rFiller, - const Rectangle& rBox) + const tools::Rectangle& rBox) { if (rBox.GetHeight() > 0) { diff --git a/sfx2/source/sidebar/DeckTitleBar.cxx b/sfx2/source/sidebar/DeckTitleBar.cxx index 29067d1a02df..fe4d0b2aae6e 100644 --- a/sfx2/source/sidebar/DeckTitleBar.cxx +++ b/sfx2/source/sidebar/DeckTitleBar.cxx @@ -72,17 +72,17 @@ void DeckTitleBar::SetCloserVisible (const bool bIsCloserVisible) } } -Rectangle DeckTitleBar::GetTitleArea (const Rectangle& rTitleBarBox) +tools::Rectangle DeckTitleBar::GetTitleArea (const tools::Rectangle& rTitleBarBox) { Image aGripImage (Theme::GetImage(Theme::Image_Grip)); - return Rectangle( + return tools::Rectangle( aGripImage.GetSizePixel().Width() + gaLeftGripPadding + gaRightGripPadding, rTitleBarBox.Top(), rTitleBarBox.Right(), rTitleBarBox.Bottom()); } -void DeckTitleBar::PaintDecoration(vcl::RenderContext& /*rRenderContext*/, const Rectangle& /*rTitleBarBox*/) +void DeckTitleBar::PaintDecoration(vcl::RenderContext& /*rRenderContext*/, const tools::Rectangle& /*rTitleBarBox*/) { } diff --git a/sfx2/source/sidebar/DrawHelper.cxx b/sfx2/source/sidebar/DrawHelper.cxx index 7297fc244b23..be369c776c17 100644 --- a/sfx2/source/sidebar/DrawHelper.cxx +++ b/sfx2/source/sidebar/DrawHelper.cxx @@ -24,7 +24,7 @@ namespace sfx2 { namespace sidebar { -void DrawHelper::DrawBorder(vcl::RenderContext& rRenderContext, const Rectangle& rBox, const SvBorder& rBorderSize, +void DrawHelper::DrawBorder(vcl::RenderContext& rRenderContext, const tools::Rectangle& rBox, const SvBorder& rBorderSize, const Paint& rHorizontalPaint, const Paint& rVerticalPaint) { // Draw top line. @@ -60,7 +60,7 @@ void DrawHelper::DrawHorizontalLine(vcl::RenderContext& rRenderContext, const sa break; } case Paint::GradientPaint: - rRenderContext.DrawGradient(Rectangle(nLeft, nY, nRight, nY + nHeight - 1), + rRenderContext.DrawGradient(tools::Rectangle(nLeft, nY, nRight, nY + nHeight - 1), rPaint.GetGradient()); break; @@ -87,7 +87,7 @@ void DrawHelper::DrawVerticalLine(vcl::RenderContext& rRenderContext, const sal_ break; } case Paint::GradientPaint: - rRenderContext.DrawGradient(Rectangle(nX, nTop, nX + nWidth - 1, nBottom), + rRenderContext.DrawGradient(tools::Rectangle(nX, nTop, nX + nWidth - 1, nBottom), rPaint.GetGradient()); break; @@ -97,7 +97,7 @@ void DrawHelper::DrawVerticalLine(vcl::RenderContext& rRenderContext, const sal_ } } -void DrawHelper::DrawRoundedRectangle(vcl::RenderContext& rRenderContext, const Rectangle& rBox, const sal_Int32 nCornerRadius, +void DrawHelper::DrawRoundedRectangle(vcl::RenderContext& rRenderContext, const tools::Rectangle& rBox, const sal_Int32 nCornerRadius, const Color& rBorderColor, const Paint& rFillPaint) { rRenderContext.SetLineColor(rBorderColor); diff --git a/sfx2/source/sidebar/MenuButton.cxx b/sfx2/source/sidebar/MenuButton.cxx index ef749459bc32..0f7403c35446 100644 --- a/sfx2/source/sidebar/MenuButton.cxx +++ b/sfx2/source/sidebar/MenuButton.cxx @@ -38,13 +38,13 @@ MenuButton::MenuButton (vcl::Window* pParentWindow) #endif } -void MenuButton::Paint(vcl::RenderContext& rRenderContext, const Rectangle& /*rUpdateArea*/) +void MenuButton::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& /*rUpdateArea*/) { const bool bIsSelected (IsChecked()); const bool bIsHighlighted (IsMouseOver() || HasFocus()); DrawHelper::DrawRoundedRectangle( rRenderContext, - Rectangle(Point(0,0), GetSizePixel()), + tools::Rectangle(Point(0,0), GetSizePixel()), 3, (bIsHighlighted || bIsSelected ? Theme::GetColor(Theme::Color_TabItemBorder) diff --git a/sfx2/source/sidebar/PanelTitleBar.cxx b/sfx2/source/sidebar/PanelTitleBar.cxx index c52841cc0189..fcb5e8f0ff6a 100644 --- a/sfx2/source/sidebar/PanelTitleBar.cxx +++ b/sfx2/source/sidebar/PanelTitleBar.cxx @@ -101,14 +101,14 @@ void PanelTitleBar::SetMoreOptionsCommand(const OUString& rsCommandName, } } -Rectangle PanelTitleBar::GetTitleArea (const Rectangle& rTitleBarBox) +tools::Rectangle PanelTitleBar::GetTitleArea (const tools::Rectangle& rTitleBarBox) { if (mpPanel != nullptr) { Image aImage (mpPanel->IsExpanded() ? Theme::GetImage(Theme::Image_Expand) : Theme::GetImage(Theme::Image_Collapse)); - return Rectangle( + return tools::Rectangle( aImage.GetSizePixel().Width() + gaLeftIconPadding + gaRightIconPadding, rTitleBarBox.Top(), rTitleBarBox.Right(), @@ -118,7 +118,7 @@ Rectangle PanelTitleBar::GetTitleArea (const Rectangle& rTitleBarBox) return rTitleBarBox; } -void PanelTitleBar::PaintDecoration (vcl::RenderContext& rRenderContext, const Rectangle& /*rTitleBarBox*/) +void PanelTitleBar::PaintDecoration (vcl::RenderContext& rRenderContext, const tools::Rectangle& /*rTitleBarBox*/) { if (mpPanel != nullptr) { diff --git a/sfx2/source/sidebar/SidebarController.cxx b/sfx2/source/sidebar/SidebarController.cxx index 869cc89fa21d..b21be2dfbc05 100644 --- a/sfx2/source/sidebar/SidebarController.cxx +++ b/sfx2/source/sidebar/SidebarController.cxx @@ -94,7 +94,7 @@ SidebarController::SidebarController ( mpParentWindow, rxFrame, [this](const ::rtl::OUString& rsDeckId) { return this->OpenThenToggleDeck(rsDeckId); }, - [this](const Rectangle& rButtonBox,const ::std::vector<TabBar::DeckMenuData>& rMenuData) { return this->ShowPopupMenu(rButtonBox,rMenuData); }, + [this](const tools::Rectangle& rButtonBox,const ::std::vector<TabBar::DeckMenuData>& rMenuData) { return this->ShowPopupMenu(rButtonBox,rMenuData); }, this)), mxFrame(rxFrame), maCurrentContext(OUString(), OUString()), @@ -923,14 +923,14 @@ IMPL_LINK(SidebarController, WindowEventHandler, VclWindowEvent&, rEvent, void) } void SidebarController::ShowPopupMenu ( - const Rectangle& rButtonBox, + const tools::Rectangle& rButtonBox, const ::std::vector<TabBar::DeckMenuData>& rMenuData) const { VclPtr<PopupMenu> pMenu = CreatePopupMenu(rMenuData); pMenu->SetSelectHdl(LINK(const_cast<SidebarController*>(this), SidebarController, OnMenuItemSelected)); // pass toolbox button rect so the menu can stay open on button up - Rectangle aBox (rButtonBox); + tools::Rectangle aBox (rButtonBox); aBox.Move(mpTabBar->GetPosPixel().X(), 0); pMenu->Execute(mpParentWindow, aBox, PopupMenuFlags::ExecuteDown); pMenu.disposeAndClear(); diff --git a/sfx2/source/sidebar/TabBar.cxx b/sfx2/source/sidebar/TabBar.cxx index 1bf3847d1a91..7d4ee1419ef0 100644 --- a/sfx2/source/sidebar/TabBar.cxx +++ b/sfx2/source/sidebar/TabBar.cxx @@ -87,7 +87,7 @@ void TabBar::dispose() vcl::Window::dispose(); } -void TabBar::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rUpdateArea) +void TabBar::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rUpdateArea) { Window::Paint(rRenderContext, rUpdateArea); @@ -398,7 +398,7 @@ IMPL_LINK_NOARG(TabBar, OnToolboxClicked, Button*, void) } maPopupMenuProvider( - Rectangle( + tools::Rectangle( mpMenuButton->GetPosPixel(), mpMenuButton->GetSizePixel()), aMenuData); diff --git a/sfx2/source/sidebar/TabItem.cxx b/sfx2/source/sidebar/TabItem.cxx index 13bc9914ef12..3e0e5f635f86 100644 --- a/sfx2/source/sidebar/TabItem.cxx +++ b/sfx2/source/sidebar/TabItem.cxx @@ -41,13 +41,13 @@ TabItem::TabItem (vcl::Window* pParentWindow) #endif } -void TabItem::Paint(vcl::RenderContext& rRenderContext, const Rectangle& /*UpdateArea*/) +void TabItem::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& /*UpdateArea*/) { const bool bIsSelected (IsChecked()); const bool bIsHighlighted (IsMouseOver() || HasFocus()); DrawHelper::DrawRoundedRectangle( rRenderContext, - Rectangle(Point(0,0), GetSizePixel()), + tools::Rectangle(Point(0,0), GetSizePixel()), Theme::GetInteger(Theme::Int_ButtonCornerRadius), bIsHighlighted||bIsSelected ? Theme::GetColor(Theme::Color_TabItemBorder) diff --git a/sfx2/source/sidebar/Theme.cxx b/sfx2/source/sidebar/Theme.cxx index 1a46180d91c8..7d4e18059b45 100644 --- a/sfx2/source/sidebar/Theme.cxx +++ b/sfx2/source/sidebar/Theme.cxx @@ -1041,7 +1041,7 @@ void Theme::ProcessNewValue ( awt::Rectangle aBox; if (rValue >>= aBox) { - maRectangles[nIndex] = Rectangle( + maRectangles[nIndex] = tools::Rectangle( aBox.X, aBox.Y, aBox.Width, diff --git a/sfx2/source/sidebar/TitleBar.cxx b/sfx2/source/sidebar/TitleBar.cxx index 820764330184..22433123cd4c 100644 --- a/sfx2/source/sidebar/TitleBar.cxx +++ b/sfx2/source/sidebar/TitleBar.cxx @@ -76,14 +76,14 @@ void TitleBar::ApplySettings(vcl::RenderContext& rRenderContext) rRenderContext.SetBackground(maBackgroundPaint.GetWallpaper()); } -void TitleBar::Paint(vcl::RenderContext& rRenderContext, const Rectangle& /*rUpdateArea*/) +void TitleBar::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& /*rUpdateArea*/) { // Paint title bar background. Size aWindowSize (GetSizePixel()); - Rectangle aTitleBarBox(0,0, aWindowSize.Width(), aWindowSize.Height()); + tools::Rectangle aTitleBarBox(0,0, aWindowSize.Width(), aWindowSize.Height()); PaintDecoration(rRenderContext, aTitleBarBox); - const Rectangle aTitleBox(GetTitleArea(aTitleBarBox)); + const tools::Rectangle aTitleBox(GetTitleArea(aTitleBarBox)); PaintTitle(rRenderContext, aTitleBox); PaintFocus(rRenderContext, aTitleBox); } @@ -115,11 +115,11 @@ css::uno::Reference<css::accessibility::XAccessible> TitleBar::CreateAccessible( return AccessibleTitleBar::Create(*this); } -void TitleBar::PaintTitle(vcl::RenderContext& rRenderContext, const Rectangle& rTitleBox) +void TitleBar::PaintTitle(vcl::RenderContext& rRenderContext, const tools::Rectangle& rTitleBox) { rRenderContext.Push(PushFlags::FONT | PushFlags::TEXTCOLOR); - Rectangle aTitleBox(rTitleBox); + tools::Rectangle aTitleBox(rTitleBox); // When there is an icon then paint it at the left of the given // box. @@ -141,7 +141,7 @@ void TitleBar::PaintTitle(vcl::RenderContext& rRenderContext, const Rectangle& r rRenderContext.Pop(); } -void TitleBar::PaintFocus(vcl::RenderContext& rRenderContext, const Rectangle& rFocusBox) +void TitleBar::PaintFocus(vcl::RenderContext& rRenderContext, const tools::Rectangle& rFocusBox) { rRenderContext.Push(PushFlags::FONT | PushFlags::TEXTCOLOR); @@ -149,9 +149,9 @@ void TitleBar::PaintFocus(vcl::RenderContext& rRenderContext, const Rectangle& r aFont.SetWeight(WEIGHT_BOLD); rRenderContext.SetFont(aFont); - const Rectangle aTextBox(rRenderContext.GetTextRect(rFocusBox, msTitle, DrawTextFlags::Left | DrawTextFlags::VCenter)); + const tools::Rectangle aTextBox(rRenderContext.GetTextRect(rFocusBox, msTitle, DrawTextFlags::Left | DrawTextFlags::VCenter)); - const Rectangle aLargerTextBox(aTextBox.Left() - 2, + const tools::Rectangle aLargerTextBox(aTextBox.Left() - 2, aTextBox.Top() - 2, aTextBox.Right() + 2, aTextBox.Bottom() + 2); diff --git a/sfx2/source/statbar/stbitem.cxx b/sfx2/source/statbar/stbitem.cxx index db33fb780cb7..5d1cf9c460bd 100644 --- a/sfx2/source/statbar/stbitem.cxx +++ b/sfx2/source/statbar/stbitem.cxx @@ -360,7 +360,7 @@ void SAL_CALL SfxStatusBarControl::paint( OutputDevice* pOutDev = VCLUnoHelper::GetOutputDevice( xGraphics ); if ( pOutDev ) { - ::Rectangle aRect = VCLRectangle( rOutputRectangle ); + ::tools::Rectangle aRect = VCLRectangle( rOutputRectangle ); UserDrawEvent aUserDrawEvent(nullptr, pOutDev, aRect, pBar->GetCurItemId(), static_cast<sal_uInt16>(nStyle)); Paint( aUserDrawEvent ); } diff --git a/sfx2/source/view/frame.cxx b/sfx2/source/view/frame.cxx index c9872924cb58..cda50d95dab9 100644 --- a/sfx2/source/view/frame.cxx +++ b/sfx2/source/view/frame.cxx @@ -677,11 +677,11 @@ void SfxFrame::SetToolSpaceBorderPixel_Impl( const SvBorder& rBorder ) } } -Rectangle SfxFrame::GetTopOuterRectPixel_Impl() const +tools::Rectangle SfxFrame::GetTopOuterRectPixel_Impl() const { Size aSize( GetWindow().GetOutputSizePixel() ); Point aPoint; - return ( Rectangle ( aPoint, aSize ) ); + return ( tools::Rectangle ( aPoint, aSize ) ); } SfxWorkWindow* SfxFrame::GetWorkWindow_Impl() const diff --git a/sfx2/source/view/ipclient.cxx b/sfx2/source/view/ipclient.cxx index f35b41aa379c..9fe365663211 100644 --- a/sfx2/source/view/ipclient.cxx +++ b/sfx2/source/view/ipclient.cxx @@ -100,7 +100,7 @@ class SfxInPlaceClient_Impl : public ::cppu::WeakImplHelper< embed::XEmbeddedCli { public: Timer m_aTimer; // activation timeout, starts after object connection - Rectangle m_aObjArea; // area of object in coordinate system of the container (without scaling) + tools::Rectangle m_aObjArea; // area of object in coordinate system of the container (without scaling) Fraction m_aScaleWidth; // scaling that was applied to the object when it was not active Fraction m_aScaleHeight; SfxInPlaceClient* m_pClient; @@ -390,7 +390,7 @@ awt::Rectangle SAL_CALL SfxInPlaceClient_Impl::getPlacement() throw uno::RuntimeException(); // apply scaling to object area and convert to pixels - Rectangle aRealObjArea( m_aObjArea ); + tools::Rectangle aRealObjArea( m_aObjArea ); aRealObjArea.SetSize( Size( Fraction( aRealObjArea.GetWidth() ) * m_aScaleWidth, Fraction( aRealObjArea.GetHeight() ) * m_aScaleHeight ) ); @@ -405,7 +405,7 @@ awt::Rectangle SAL_CALL SfxInPlaceClient_Impl::getClipRectangle() throw uno::RuntimeException(); // currently(?) same as placement - Rectangle aRealObjArea( m_aObjArea ); + tools::Rectangle aRealObjArea( m_aObjArea ); aRealObjArea.SetSize( Size( Fraction( aRealObjArea.GetWidth() ) * m_aScaleWidth, Fraction( aRealObjArea.GetHeight() ) * m_aScaleHeight ) ); @@ -438,14 +438,14 @@ void SAL_CALL SfxInPlaceClient_Impl::changedPlacement( const awt::Rectangle& aPo // check if the change is at least one pixel in size awt::Rectangle aOldRect = getPlacement(); - Rectangle aNewPixelRect = VCLRectangle( aPosRect ); - Rectangle aOldPixelRect = VCLRectangle( aOldRect ); + tools::Rectangle aNewPixelRect = VCLRectangle( aPosRect ); + tools::Rectangle aOldPixelRect = VCLRectangle( aOldRect ); if ( aOldPixelRect == aNewPixelRect ) // nothing has changed return; // new scaled object area - Rectangle aNewLogicRect = m_pClient->GetEditWin()->PixelToLogic( aNewPixelRect ); + tools::Rectangle aNewLogicRect = m_pClient->GetEditWin()->PixelToLogic( aNewPixelRect ); // all the size changes in this method should happen without scaling // SfxBooleanFlagGuard aGuard( m_bResizeNoScale, sal_True ); @@ -677,7 +677,7 @@ void SfxInPlaceClient::SetObject( const uno::Reference < embed::XEmbeddedObject } -bool SfxInPlaceClient::SetObjArea( const Rectangle& rArea ) +bool SfxInPlaceClient::SetObjArea( const tools::Rectangle& rArea ) { if( rArea != m_xImp->m_aObjArea ) { @@ -692,14 +692,14 @@ bool SfxInPlaceClient::SetObjArea( const Rectangle& rArea ) } -const Rectangle& SfxInPlaceClient::GetObjArea() const +const tools::Rectangle& SfxInPlaceClient::GetObjArea() const { return m_xImp->m_aObjArea; } -Rectangle SfxInPlaceClient::GetScaledObjArea() const +tools::Rectangle SfxInPlaceClient::GetScaledObjArea() const { - Rectangle aRealObjArea( m_xImp->m_aObjArea ); + tools::Rectangle aRealObjArea( m_xImp->m_aObjArea ); aRealObjArea.SetSize( Size( Fraction( aRealObjArea.GetWidth() ) * m_xImp->m_aScaleWidth, Fraction( aRealObjArea.GetHeight() ) * m_xImp->m_aScaleHeight ) ); return aRealObjArea; @@ -722,7 +722,7 @@ void SfxInPlaceClient::SetSizeScale( const Fraction & rScaleWidth, const Fractio } -void SfxInPlaceClient::SetObjAreaAndScale( const Rectangle& rArea, const Fraction& rScaleWidth, const Fraction& rScaleHeight ) +void SfxInPlaceClient::SetObjAreaAndScale( const tools::Rectangle& rArea, const Fraction& rScaleWidth, const Fraction& rScaleHeight ) { if( rArea != m_xImp->m_aObjArea || m_xImp->m_aScaleWidth != rScaleWidth || m_xImp->m_aScaleHeight != rScaleHeight ) { @@ -754,7 +754,7 @@ void SfxInPlaceClient::Invalidate() // TODO/LATER: do we need both? // the object area is provided in logical coordinates of the window but without scaling applied - Rectangle aRealObjArea( m_xImp->m_aObjArea ); + tools::Rectangle aRealObjArea( m_xImp->m_aObjArea ); aRealObjArea.SetSize( Size( Fraction( aRealObjArea.GetWidth() ) * m_xImp->m_aScaleWidth, Fraction( aRealObjArea.GetHeight() ) * m_xImp->m_aScaleHeight ) ); m_pEditWin->Invalidate( aRealObjArea ); @@ -903,7 +903,7 @@ ErrCode SfxInPlaceClient::DoVerb( long nVerb ) MapMode aClientMap( GetEditWin()->GetMapMode().GetMapUnit() ); Size aNewSize = GetEditWin()->LogicToLogic( Size( aSize.Width, aSize.Height ), &aObjectMap, &aClientMap ); - Rectangle aScaledArea = GetScaledObjArea(); + tools::Rectangle aScaledArea = GetScaledObjArea(); m_xImp->m_aObjArea.SetSize( aNewSize ); m_xImp->m_aScaleWidth = Fraction( aScaledArea.GetWidth(), aNewSize.Width() ); m_xImp->m_aScaleHeight = Fraction( aScaledArea.GetHeight(), aNewSize.Height() ); @@ -957,7 +957,7 @@ void SfxInPlaceClient::ObjectAreaChanged() // dummy implementation } -void SfxInPlaceClient::RequestNewObjectArea( Rectangle& ) +void SfxInPlaceClient::RequestNewObjectArea( tools::Rectangle& ) { // dummy implementation } diff --git a/sfx2/source/view/sfxbasecontroller.cxx b/sfx2/source/view/sfxbasecontroller.cxx index d2d06e7788ae..bb03b8ddf036 100644 --- a/sfx2/source/view/sfxbasecontroller.cxx +++ b/sfx2/source/view/sfxbasecontroller.cxx @@ -922,7 +922,7 @@ awt::Rectangle SAL_CALL SfxBaseController::queryBorderedArea( const awt::Rectang SolarMutexGuard aGuard; if ( m_pData->m_pViewShell ) { - Rectangle aTmpRect = VCLRectangle( aPreliminaryRectangle ); + tools::Rectangle aTmpRect = VCLRectangle( aPreliminaryRectangle ); m_pData->m_pViewShell->QueryObjAreaPixel( aTmpRect ); return AWTRectangle( aTmpRect ); } diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx index 28a77a83a8c1..dc3772038758 100644 --- a/sfx2/source/view/viewfrm.cxx +++ b/sfx2/source/view/viewfrm.cxx @@ -1092,7 +1092,7 @@ void SfxViewFrame::SetBorderPixelImpl else { Point aPoint; - Rectangle aEditArea( aPoint, GetWindow().GetOutputSizePixel() ); + tools::Rectangle aEditArea( aPoint, GetWindow().GetOutputSizePixel() ); aEditArea.Left() += rBorder.Left(); aEditArea.Right() -= rBorder.Right(); aEditArea.Top() += rBorder.Top(); diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx index 86dd7a1c5ece..0ccc006926c3 100644 --- a/sfx2/source/view/viewsh.cxx +++ b/sfx2/source/view/viewsh.cxx @@ -1583,12 +1583,12 @@ void SfxViewShell::DisconnectAllClients() } -void SfxViewShell::QueryObjAreaPixel( Rectangle& ) const +void SfxViewShell::QueryObjAreaPixel( tools::Rectangle& ) const { } -void SfxViewShell::VisAreaChanged(const Rectangle& /*rVisArea*/) +void SfxViewShell::VisAreaChanged(const tools::Rectangle& /*rVisArea*/) { SfxInPlaceClientList *pClients = pImpl->GetIPClientList_Impl(false); if ( !pClients ) @@ -1604,7 +1604,7 @@ void SfxViewShell::VisAreaChanged(const Rectangle& /*rVisArea*/) void SfxViewShell::CheckIPClient_Impl( - SfxInPlaceClient *const pIPClient, const Rectangle& rVisArea) + SfxInPlaceClient *const pIPClient, const tools::Rectangle& rVisArea) { if ( GetObjectShell()->IsInClose() ) return; diff --git a/slideshow/source/engine/rehearsetimingsactivity.cxx b/slideshow/source/engine/rehearsetimingsactivity.cxx index 788f0434597f..d7f6291d9121 100644 --- a/slideshow/source/engine/rehearsetimingsactivity.cxx +++ b/slideshow/source/engine/rehearsetimingsactivity.cxx @@ -162,7 +162,7 @@ RehearseTimingsActivity::RehearseTimingsActivity( const SlideShowContext& rConte blackHole->EnableOutput(false); blackHole->SetFont( maFont ); blackHole->SetMapMode( MapUnit::MapPixel ); - Rectangle rect; + tools::Rectangle rect; const FontMetric metric( blackHole->GetFontMetric() ); blackHole->GetTextBoundRect( rect, "XX:XX:XX" ); maSpriteSizePixel.setX( rect.getWidth() * 12 / 10 ); @@ -439,7 +439,7 @@ void RehearseTimingsActivity::paint( cppcanvas::CanvasSharedPtr const & canvas ) blackHole->EnableOutput(false); blackHole->SetMapMode( MapUnit::MapPixel ); blackHole->SetFont( maFont ); - Rectangle rect = Rectangle( 0,0, + tools::Rectangle rect = tools::Rectangle( 0,0, maSpriteSizePixel.getX(), maSpriteSizePixel.getY()); if (mbDrawPressed) diff --git a/slideshow/source/engine/shapes/drawinglayeranimation.cxx b/slideshow/source/engine/shapes/drawinglayeranimation.cxx index 9eadac3237e7..d4941f8300cf 100644 --- a/slideshow/source/engine/shapes/drawinglayeranimation.cxx +++ b/slideshow/source/engine/shapes/drawinglayeranimation.cxx @@ -226,10 +226,10 @@ private: std::vector< ScrollTextAnimNode > maVector; // the scroll rectangle - Rectangle maScrollRectangleLogic; + tools::Rectangle maScrollRectangleLogic; // the paint rectangle - Rectangle maPaintRectangleLogic; + tools::Rectangle maPaintRectangleLogic; }; diff --git a/slideshow/source/engine/shapes/gdimtftools.cxx b/slideshow/source/engine/shapes/gdimtftools.cxx index fdd383f47f8f..5cdd8d0095ed 100644 --- a/slideshow/source/engine/shapes/gdimtftools.cxx +++ b/slideshow/source/engine/shapes/gdimtftools.cxx @@ -304,7 +304,7 @@ bool getAnimationFromGraphic( VectorOfMtfAnimationFrames& o_rFrames, if( aMask.IsEmpty() ) { - const Rectangle aRect(aEmptyPoint, + const tools::Rectangle aRect(aEmptyPoint, pVDevMask->GetOutputSizePixel()); const Wallpaper aWallpaper(COL_BLACK); pVDevMask->DrawWallpaper(aRect, @@ -331,7 +331,7 @@ bool getAnimationFromGraphic( VectorOfMtfAnimationFrames& o_rFrames, if(aMask.IsEmpty()) { - const Rectangle aRect(rAnimBmp.aPosPix, aContent.GetSizePixel()); + const tools::Rectangle aRect(rAnimBmp.aPosPix, aContent.GetSizePixel()); pVDevMask->SetFillColor(COL_BLACK); pVDevMask->SetLineColor(); pVDevMask->DrawRect(aRect); @@ -415,7 +415,7 @@ bool getRectanglesFromScrollMtf( ::basegfx::B2DRectangle& o_rScrollRect, if (pAct->GetComment().equalsIgnoreAsciiCase("XTEXT_SCROLLRECT")) { o_rScrollRect = vcl::unotools::b2DRectangleFromRectangle( - *reinterpret_cast<Rectangle const *>( + *reinterpret_cast<tools::Rectangle const *>( pAct->GetData() ) ); bScrollRectSet = true; @@ -423,7 +423,7 @@ bool getRectanglesFromScrollMtf( ::basegfx::B2DRectangle& o_rScrollRect, else if (pAct->GetComment().equalsIgnoreAsciiCase("XTEXT_PAINTRECT") ) { o_rPaintRect = vcl::unotools::b2DRectangleFromRectangle( - *reinterpret_cast<Rectangle const *>( + *reinterpret_cast<tools::Rectangle const *>( pAct->GetData() ) ); bPaintRectSet = true; 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 ); diff --git a/svl/source/items/rectitem.cxx b/svl/source/items/rectitem.cxx index 9f50f0681b52..c4d1f7c396f7 100644 --- a/svl/source/items/rectitem.cxx +++ b/svl/source/items/rectitem.cxx @@ -36,7 +36,7 @@ SfxRectangleItem::SfxRectangleItem() } -SfxRectangleItem::SfxRectangleItem( sal_uInt16 nW, const Rectangle& rVal ) : +SfxRectangleItem::SfxRectangleItem( sal_uInt16 nW, const tools::Rectangle& rVal ) : SfxPoolItem( nW ), aVal( rVal ) { @@ -82,7 +82,7 @@ SfxPoolItem* SfxRectangleItem::Clone(SfxItemPool *) const SfxPoolItem* SfxRectangleItem::Create(SvStream &rStream, sal_uInt16 ) const { - Rectangle aStr; + tools::Rectangle aStr; ReadRectangle( rStream, aStr ); return new SfxRectangleItem(Which(), aStr); } diff --git a/svtools/inc/roadmap.hxx b/svtools/inc/roadmap.hxx index 04b20f9eb5e5..ceae5b7ea9e9 100644 --- a/svtools/inc/roadmap.hxx +++ b/svtools/inc/roadmap.hxx @@ -46,7 +46,7 @@ class SVT_DLLPUBLIC ORoadmap : public Control, public RoadmapTypes protected: std::unique_ptr<RoadmapImpl> m_pImpl; // Window overridables - void Paint(vcl::RenderContext& rRenderContext, const Rectangle& _rRect) override; + void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& _rRect) override; void implInit(vcl::RenderContext& rRenderContext); public: diff --git a/svtools/inc/table/gridtablerenderer.hxx b/svtools/inc/table/gridtablerenderer.hxx index b761daca6735..67360c78fc12 100644 --- a/svtools/inc/table/gridtablerenderer.hxx +++ b/svtools/inc/table/gridtablerenderer.hxx @@ -66,28 +66,28 @@ namespace svt { namespace table public: // ITableRenderer overridables virtual void PaintHeaderArea( - OutputDevice& _rDevice, const Rectangle& _rArea, + OutputDevice& _rDevice, const tools::Rectangle& _rArea, bool _bIsColHeaderArea, bool _bIsRowHeaderArea, const StyleSettings& _rStyle ) override; virtual void PaintColumnHeader( ColPos _nCol, bool _bActive, bool _bSelected, - OutputDevice& _rDevice, const Rectangle& _rArea, + OutputDevice& _rDevice, const tools::Rectangle& _rArea, const StyleSettings& _rStyle ) override; virtual void PrepareRow( RowPos _nRow, bool i_hasControlFocus, bool _bSelected, - OutputDevice& _rDevice, const Rectangle& _rRowArea, + OutputDevice& _rDevice, const tools::Rectangle& _rRowArea, const StyleSettings& _rStyle ) override; virtual void PaintRowHeader( bool i_hasControlFocus, bool _bSelected, - OutputDevice& _rDevice, const Rectangle& _rArea, + OutputDevice& _rDevice, const tools::Rectangle& _rArea, const StyleSettings& _rStyle ) override; virtual void PaintCell( ColPos const i_col, bool i_hasControlFocus, bool _bSelected, - OutputDevice& _rDevice, const Rectangle& _rArea, + OutputDevice& _rDevice, const tools::Rectangle& _rArea, const StyleSettings& _rStyle ) override; - virtual void ShowCellCursor( vcl::Window& _rView, const Rectangle& _rCursorRect) override; - virtual void HideCellCursor( vcl::Window& _rView, const Rectangle& _rCursorRect) override; + virtual void ShowCellCursor( vcl::Window& _rView, const tools::Rectangle& _rCursorRect) override; + virtual void HideCellCursor( vcl::Window& _rView, const tools::Rectangle& _rCursorRect) override; virtual bool FitsIntoCell( css::uno::Any const & i_cellContent, - OutputDevice& i_targetDevice, Rectangle const & i_targetArea + OutputDevice& i_targetDevice, tools::Rectangle const & i_targetArea ) const override; virtual bool GetFormattedCellString( css::uno::Any const & i_cellValue, diff --git a/svtools/inc/table/tablecontrol.hxx b/svtools/inc/table/tablecontrol.hxx index 761f4948a8af..00b04baae59d 100644 --- a/svtools/inc/table/tablecontrol.hxx +++ b/svtools/inc/table/tablecontrol.hxx @@ -132,7 +132,7 @@ namespace svt { namespace table // IAccessibleTable - virtual Rectangle GetWindowExtentsRelative( vcl::Window *pRelativeWindow ) const override; + virtual tools::Rectangle GetWindowExtentsRelative( vcl::Window *pRelativeWindow ) const override; virtual void GrabFocus() override; virtual css::uno::Reference< css::accessibility::XAccessible > GetAccessible() override; virtual vcl::Window* GetAccessibleParentWindow() const override; @@ -142,11 +142,11 @@ namespace svt { namespace table virtual long GetRowCount() const override; virtual long GetColumnCount() const override; virtual bool ConvertPointToCellAddress( sal_Int32& _rnRow, sal_Int32& _rnColPos, const Point& _rPoint ) override; - virtual Rectangle calcHeaderRect( bool _bIsColumnBar ) override; - virtual Rectangle calcHeaderCellRect( bool _bIsColumnBar, sal_Int32 nPos) override; - virtual Rectangle calcTableRect() override; - virtual Rectangle calcCellRect( sal_Int32 _nRowPos, sal_Int32 _nColPos ) override; - virtual Rectangle GetFieldCharacterBounds(sal_Int32 _nRow,sal_Int32 _nColumnPos,sal_Int32 nIndex) override; + virtual tools::Rectangle calcHeaderRect( bool _bIsColumnBar ) override; + virtual tools::Rectangle calcHeaderCellRect( bool _bIsColumnBar, sal_Int32 nPos) override; + virtual tools::Rectangle calcTableRect() override; + virtual tools::Rectangle calcCellRect( sal_Int32 _nRowPos, sal_Int32 _nColPos ) override; + virtual tools::Rectangle GetFieldCharacterBounds(sal_Int32 _nRow,sal_Int32 _nColumnPos,sal_Int32 nIndex) override; virtual sal_Int32 GetFieldIndexAtPoint(sal_Int32 _nRow,sal_Int32 _nColumnPos,const Point& _rPoint) override; virtual void FillAccessibleStateSetForCell( ::utl::AccessibleStateSetHelper& _rStateSet, sal_Int32 _nRow, sal_uInt16 _nColumnPos ) const override; virtual OUString GetRowDescription( sal_Int32 _nRow ) const override; diff --git a/svtools/inc/table/tablecontrolinterface.hxx b/svtools/inc/table/tablecontrolinterface.hxx index d9f37e28f69a..ce066b6d525c 100644 --- a/svtools/inc/table/tablecontrolinterface.hxx +++ b/svtools/inc/table/tablecontrolinterface.hxx @@ -222,7 +222,7 @@ namespace svt { namespace table virtual long pixelWidthToAppFont( long const i_pixels ) const = 0; /// shows a tracking rectangle - virtual void showTracking( Rectangle const & i_location, ShowTrackFlags const i_flags ) = 0; + virtual void showTracking( tools::Rectangle const & i_location, ShowTrackFlags const i_flags ) = 0; /// hides a prviously shown tracking rectangle virtual void hideTracking() = 0; diff --git a/svtools/source/brwbox/brwbox1.cxx b/svtools/source/brwbox/brwbox1.cxx index 35ff2825d1be..c76a815ed040 100644 --- a/svtools/source/brwbox/brwbox1.cxx +++ b/svtools/source/brwbox/brwbox1.cxx @@ -382,7 +382,7 @@ void BrowseBox::SetColumnPos( sal_uInt16 nColumnId, sal_uInt16 nPos ) if ( pDataWin->pHeaderBar ) aDataWinSize.Height() += pDataWin->pHeaderBar->GetSizePixel().Height(); - Rectangle aFromRect( GetFieldRect( nColumnId) ); + tools::Rectangle aFromRect( GetFieldRect( nColumnId) ); aFromRect.Right() += 2*MIN_COLUMNWIDTH; sal_uInt16 nNextPos = nOldPos + 1; @@ -390,7 +390,7 @@ void BrowseBox::SetColumnPos( sal_uInt16 nColumnId, sal_uInt16 nPos ) nNextPos = nOldPos - 1; BrowserColumn *pNextCol = pCols[ nNextPos ]; - Rectangle aNextRect(GetFieldRect( pNextCol->GetId() )); + tools::Rectangle aNextRect(GetFieldRect( pNextCol->GetId() )); // move column internally { @@ -404,25 +404,25 @@ void BrowseBox::SetColumnPos( sal_uInt16 nColumnId, sal_uInt16 nPos ) } // determine new column area - Rectangle aToRect( GetFieldRect( nColumnId ) ); + tools::Rectangle aToRect( GetFieldRect( nColumnId ) ); aToRect.Right() += 2*MIN_COLUMNWIDTH; // do scroll, let redraw if( pDataWin->GetBackground().IsScrollable() ) { long nScroll = -aFromRect.GetWidth(); - Rectangle aScrollArea; + tools::Rectangle aScrollArea; if ( nOldPos > nPos ) { long nFrozenWidth = GetFrozenWidth(); if ( aToRect.Left() < nFrozenWidth ) aToRect.Left() = nFrozenWidth; - aScrollArea = Rectangle(Point(aToRect.Left(),0), + aScrollArea = tools::Rectangle(Point(aToRect.Left(),0), Point(aNextRect.Right(),aDataWinSize.Height())); nScroll *= -1; // reverse direction } else - aScrollArea = Rectangle(Point(aNextRect.Left(),0), + aScrollArea = tools::Rectangle(Point(aNextRect.Left(),0), Point(aToRect.Right(),aDataWinSize.Height())); pDataWin->Scroll( nScroll, 0, aScrollArea ); @@ -505,7 +505,7 @@ void BrowseBox::SetColumnTitle( sal_uInt16 nItemId, const OUString& rTitle ) { // redraw visible columns if ( GetUpdateMode() && ( pCol->IsFrozen() || nItemPos > nFirstCol ) ) - Invalidate( Rectangle( Point(0,0), + Invalidate( tools::Rectangle( Point(0,0), Size( GetOutputSizePixel().Width(), GetTitleHeight() ) ) ); } @@ -589,13 +589,13 @@ void BrowseBox::SetColumnWidth( sal_uInt16 nItemId, sal_uLong nWidth ) if( GetBackground().IsScrollable() ) { - Rectangle aScrRect( nX + std::min( (sal_uLong)nOldWidth, nWidth ), 0, + tools::Rectangle aScrRect( nX + std::min( (sal_uLong)nOldWidth, nWidth ), 0, GetSizePixel().Width() , // the header is longer than the datawin pDataWin->GetPosPixel().Y() - 1 ); Control::Scroll( nWidth-nOldWidth, 0, aScrRect, SCROLL_FLAGS ); aScrRect.Bottom() = pDataWin->GetSizePixel().Height(); pDataWin->Scroll( nWidth-nOldWidth, 0, aScrRect, SCROLL_FLAGS ); - Rectangle aInvRect( nX, 0, nX + std::max( nWidth, (sal_uLong)nOldWidth ), USHRT_MAX ); + tools::Rectangle aInvRect( nX, 0, nX + std::max( nWidth, (sal_uLong)nOldWidth ), USHRT_MAX ); Control::Invalidate( aInvRect, InvalidateFlags::NoChildren ); pDataWin->Invalidate( aInvRect ); } @@ -869,7 +869,7 @@ long BrowseBox::ScrollColumns( long nCols ) long nDelta = pCols[ nFirstCol-1 ]->Width(); long nFrozenWidth = GetFrozenWidth(); - Rectangle aScrollRect( Point( nFrozenWidth + nDelta, 0 ), + tools::Rectangle aScrollRect( Point( nFrozenWidth + nDelta, 0 ), Size ( GetOutputSizePixel().Width() - nFrozenWidth - nDelta, GetTitleHeight() - 1 ) ); @@ -881,7 +881,7 @@ long BrowseBox::ScrollColumns( long nCols ) Scroll( -nDelta, 0, aScrollRect, SCROLL_FLAGS ); // invalidate the area of the column which was scrolled out to the left hand side - Rectangle aInvalidateRect( aScrollRect ); + tools::Rectangle aInvalidateRect( aScrollRect ); aInvalidateRect.Left() = nFrozenWidth; aInvalidateRect.Right() = nFrozenWidth + nDelta - 1; Invalidate( aInvalidateRect ); @@ -915,7 +915,7 @@ long BrowseBox::ScrollColumns( long nCols ) long nDelta = pCols[ nFirstCol ]->Width(); long nFrozenWidth = GetFrozenWidth(); - Rectangle aScrollRect( Point( nFrozenWidth, 0 ), + tools::Rectangle aScrollRect( Point( nFrozenWidth, 0 ), Size ( GetOutputSizePixel().Width() - nFrozenWidth, GetTitleHeight() - 1 ) ); @@ -935,10 +935,10 @@ long BrowseBox::ScrollColumns( long nCols ) { if ( GetUpdateMode() ) { - Invalidate( Rectangle( + Invalidate( tools::Rectangle( Point( GetFrozenWidth(), 0 ), Size( GetOutputSizePixel().Width(), GetTitleHeight() ) ) ); - pDataWin->Invalidate( Rectangle( + pDataWin->Invalidate( tools::Rectangle( Point( GetFrozenWidth(), 0 ), pDataWin->GetSizePixel() ) ); } @@ -1044,10 +1044,10 @@ void BrowseBox::RowModified( long nRow, sal_uInt16 nColId ) if ( !GetUpdateMode() ) return; - Rectangle aRect; + tools::Rectangle aRect; if ( nColId == BROWSER_INVALIDID ) // invalidate the whole row - aRect = Rectangle( Point( 0, (nRow-nTopRow) * GetDataRowHeight() ), + aRect = tools::Rectangle( Point( 0, (nRow-nTopRow) * GetDataRowHeight() ), Size( pDataWin->GetSizePixel().Width(), GetDataRowHeight() ) ); else { @@ -1153,7 +1153,7 @@ void BrowseBox::RowInserted( long nRow, long nNumRows, bool bDoPaint, bool bKeep if( pDataWin->GetBackground().IsScrollable() ) { pDataWin->Scroll( 0, GetDataRowHeight() * nNumRows, - Rectangle( Point( 0, nY ), + tools::Rectangle( Point( 0, nY ), Size( aSz.Width(), aSz.Height() - nY ) ), SCROLL_FLAGS ); } @@ -1162,7 +1162,7 @@ void BrowseBox::RowInserted( long nRow, long nNumRows, bool bDoPaint, bool bKeep } else // scroll would cause a repaint, so we must explicitly invalidate - pDataWin->Invalidate( Rectangle( Point( 0, nY ), + pDataWin->Invalidate( tools::Rectangle( Point( 0, nY ), Size( aSz.Width(), nNumRows * GetDataRowHeight() ) ) ); } @@ -1296,7 +1296,7 @@ void BrowseBox::RowRemoved( long nRow, long nNumRows, bool bDoPaint ) if( pDataWin->GetBackground().IsScrollable() ) { pDataWin->Scroll( 0, - (short) GetDataRowHeight() * nNumRows, - Rectangle( Point( 0, nY ), Size( aSz.Width(), + tools::Rectangle( Point( 0, nY ), Size( aSz.Width(), aSz.Height() - nY + nNumRows*GetDataRowHeight() ) ), SCROLL_FLAGS ); } @@ -1306,7 +1306,7 @@ void BrowseBox::RowRemoved( long nRow, long nNumRows, bool bDoPaint ) else { // Repaint the Rect of the deleted row - Rectangle aRect( + tools::Rectangle aRect( Point( 0, (nRow-nTopRow)*GetDataRowHeight() ), Size( pDataWin->GetSizePixel().Width(), nNumRows * GetDataRowHeight() ) ); @@ -1644,13 +1644,13 @@ void BrowseBox::SelectAll() // highlight the row selection if ( !bHideSelect ) { - Rectangle aHighlightRect; + tools::Rectangle aHighlightRect; sal_uInt16 nVisibleRows = (sal_uInt16)(pDataWin->GetOutputSizePixel().Height() / GetDataRowHeight() + 1); for ( long nRow = std::max( nTopRow, uRow.pSel->FirstSelected() ); nRow != BROWSER_ENDOFSELECTION && nRow < nTopRow + nVisibleRows; nRow = uRow.pSel->NextSelected() ) - aHighlightRect.Union( Rectangle( + aHighlightRect.Union( tools::Rectangle( Point( nOfsX, (nRow-nTopRow)*GetDataRowHeight() ), Size( pDataWin->GetSizePixel().Width(), GetDataRowHeight() ) ) ); pDataWin->Invalidate( aHighlightRect ); @@ -1729,7 +1729,7 @@ void BrowseBox::SelectRow( long nRow, bool _bSelect, bool bExpand ) long nOfsX = pFirstCol->GetId() ? 0 : pFirstCol->Width(); // highlight only newly selected part - Rectangle aRect( + tools::Rectangle aRect( Point( nOfsX, (nRow-nTopRow)*GetDataRowHeight() ), Size( pDataWin->GetSizePixel().Width(), GetDataRowHeight() ) ); pDataWin->Invalidate( aRect ); @@ -1800,8 +1800,8 @@ void BrowseBox::SelectColumnPos( sal_uInt16 nNewColPos, bool _bSelect, bool bMak // only highlight painted areas pDataWin->Update(); - Rectangle aFieldRectPix( GetFieldRectPixel( nCurRow, nCurColId, false ) ); - Rectangle aRect( + tools::Rectangle aFieldRectPix( GetFieldRectPixel( nCurRow, nCurColId, false ) ); + tools::Rectangle aRect( Point( aFieldRectPix.Left() - MIN_COLUMNWIDTH, 0 ), Size( pCols[ nNewColPos ]->Width(), pDataWin->GetOutputSizePixel().Height() ) ); @@ -1910,8 +1910,8 @@ void BrowseBox::MakeFieldVisible // calculate column position, field rectangle and painting area sal_uInt16 nColPos = GetColumnPos( nColId ); - Rectangle aFieldRect = GetFieldRectPixel( nRow, nColId, false ); - Rectangle aDataRect = Rectangle( Point(0, 0), pDataWin->GetSizePixel() ); + tools::Rectangle aFieldRect = GetFieldRectPixel( nRow, nColId, false ); + tools::Rectangle aDataRect = tools::Rectangle( Point(0, 0), pDataWin->GetSizePixel() ); // positioned outside on the left? if ( nColPos >= FrozenColCount() && nColPos < nFirstCol ) @@ -1956,12 +1956,12 @@ bool BrowseBox::IsFieldVisible( long nRow, sal_uInt16 nColumnId, if ( nColPos >= FrozenColCount() && nColPos < nFirstCol ) return false; - Rectangle aRect( ImplFieldRectPixel( nRow, nColumnId ) ); + tools::Rectangle aRect( ImplFieldRectPixel( nRow, nColumnId ) ); if ( aRect.IsEmpty() ) return false; // get the visible area - Rectangle aOutRect( Point(0, 0), pDataWin->GetOutputSizePixel() ); + tools::Rectangle aOutRect( Point(0, 0), pDataWin->GetOutputSizePixel() ); if ( bCompletely ) // test if the field is completely visible @@ -1972,12 +1972,12 @@ bool BrowseBox::IsFieldVisible( long nRow, sal_uInt16 nColumnId, } -Rectangle BrowseBox::GetFieldRectPixel( long nRow, sal_uInt16 nColumnId, +tools::Rectangle BrowseBox::GetFieldRectPixel( long nRow, sal_uInt16 nColumnId, bool bRelToBrowser) const { // get the rectangle relative to DataWin - Rectangle aRect( ImplFieldRectPixel( nRow, nColumnId ) ); + tools::Rectangle aRect( ImplFieldRectPixel( nRow, nColumnId ) ); if ( aRect.IsEmpty() ) return aRect; @@ -1989,19 +1989,19 @@ Rectangle BrowseBox::GetFieldRectPixel( long nRow, sal_uInt16 nColumnId, aTopLeft = ScreenToOutputPixel( aTopLeft ); } - return Rectangle( aTopLeft, aRect.GetSize() ); + return tools::Rectangle( aTopLeft, aRect.GetSize() ); } -Rectangle BrowseBox::GetRowRectPixel( long nRow ) const +tools::Rectangle BrowseBox::GetRowRectPixel( long nRow ) const { // get the rectangle relative to DataWin - Rectangle aRect; + tools::Rectangle aRect; if ( nTopRow > nRow ) // row is above visible area return aRect; - aRect = Rectangle( + aRect = tools::Rectangle( Point( 0, GetDataRowHeight() * (nRow-nTopRow) ), Size( pDataWin->GetOutputSizePixel().Width(), GetDataRowHeight() ) ); if ( aRect.TopLeft().Y() > pDataWin->GetOutputSizePixel().Height() ) @@ -2013,11 +2013,11 @@ Rectangle BrowseBox::GetRowRectPixel( long nRow ) const aTopLeft = pDataWin->OutputToScreenPixel( aTopLeft ); aTopLeft = ScreenToOutputPixel( aTopLeft ); - return Rectangle( aTopLeft, aRect.GetSize() ); + return tools::Rectangle( aTopLeft, aRect.GetSize() ); } -Rectangle BrowseBox::ImplFieldRectPixel( long nRow, sal_uInt16 nColumnId ) const +tools::Rectangle BrowseBox::ImplFieldRectPixel( long nRow, sal_uInt16 nColumnId ) const { // compute the X-coordinate relative to DataWin by accumulation @@ -2031,7 +2031,7 @@ Rectangle BrowseBox::ImplFieldRectPixel( long nRow, sal_uInt16 nColumnId ) const nColX += pCols[ nCol ]->Width(); if ( nCol >= pCols.size() || ( nCol >= nFrozenCols && nCol < nFirstCol ) ) - return Rectangle(); + return tools::Rectangle(); // compute the Y-coordinate relative to DataWin long nRowY = GetDataRowHeight(); @@ -2039,7 +2039,7 @@ Rectangle BrowseBox::ImplFieldRectPixel( long nRow, sal_uInt16 nColumnId ) const nRowY = ( nRow - nTopRow ) * GetDataRowHeight(); // assemble the Rectangle relative to DataWin - return Rectangle( + return tools::Rectangle( Point( nColX + MIN_COLUMNWIDTH, nRowY ), Size( pCols[ nCol ]->Width() - 2*MIN_COLUMNWIDTH, GetDataRowHeight() - 1 ) ); @@ -2065,7 +2065,7 @@ long BrowseBox::GetRowAtYPosPixel( long nY, bool bRelToBrowser ) const } -Rectangle BrowseBox::GetFieldRect( sal_uInt16 nColumnId ) const +tools::Rectangle BrowseBox::GetFieldRect( sal_uInt16 nColumnId ) const { return GetFieldRectPixel( nCurRow, nColumnId ); @@ -2102,10 +2102,10 @@ bool BrowseBox::ReserveControlArea(sal_uInt16 nWidth) return false; } -Rectangle BrowseBox::GetControlArea() const +tools::Rectangle BrowseBox::GetControlArea() const { - return Rectangle( + return tools::Rectangle( Point( 0, GetOutputSizePixel().Height() - aHScroll->GetSizePixel().Height() ), Size( GetOutputSizePixel().Width() - aHScroll->GetSizePixel().Width(), aHScroll->GetSizePixel().Height() ) ); diff --git a/svtools/source/brwbox/brwbox2.cxx b/svtools/source/brwbox/brwbox2.cxx index 5902077176c4..af6c7a036236 100644 --- a/svtools/source/brwbox/brwbox2.cxx +++ b/svtools/source/brwbox/brwbox2.cxx @@ -161,7 +161,7 @@ void BrowseBox::StateChanged( StateChangedType nStateChange ) ) // we draw the text in our header bar in a color dependent on the enabled state. So if this state changed // -> redraw - Invalidate(Rectangle(Point(0, 0), Size(GetOutputSizePixel().Width(), GetTitleHeight() - 1))); + Invalidate(tools::Rectangle(Point(0, 0), Size(GetOutputSizePixel().Width(), GetTitleHeight() - 1))); } } @@ -261,20 +261,20 @@ void BrowseBox::ToggleSelection() if ( nRow < nTopRow ) continue; - Rectangle aAddRect( + tools::Rectangle aAddRect( Point( nOfsX, (nRow-nTopRow)*GetDataRowHeight() ), Size( pDataWin->GetSizePixel().Width(), GetDataRowHeight() ) ); if ( aHighlightList.size() && nLastRowInRect == ( nRow - 1 ) ) aHighlightList[ 0 ]->Union( aAddRect ); else - aHighlightList.insert( aHighlightList.begin(), new Rectangle( aAddRect ) ); + aHighlightList.insert( aHighlightList.begin(), new tools::Rectangle( aAddRect ) ); nLastRowInRect = nRow; } // unhighlight the old selection (if any) for ( size_t i = aHighlightList.size(); i > 0; ) { - Rectangle *pRect = aHighlightList[ --i ]; + tools::Rectangle *pRect = aHighlightList[ --i ]; pDataWin->Invalidate( *pRect ); delete pRect; } @@ -285,7 +285,7 @@ void BrowseBox::ToggleSelection() nColId != BROWSER_ENDOFSELECTION; nColId = pColSel->NextSelected() ) { - Rectangle aRect( GetFieldRectPixel(nCurRow, + tools::Rectangle aRect( GetFieldRectPixel(nCurRow, pCols[ nColId ]->GetId(), false ) ); aRect.Left() -= MIN_COLUMNWIDTH; @@ -324,7 +324,7 @@ void BrowseBox::DrawCursor() nCurColId = GetColumnId(1); // calculate cursor rectangle - Rectangle aCursor; + tools::Rectangle aCursor; if ( bColumnCursor ) { aCursor = GetFieldRectPixel( nCurRow, nCurColId, false ); @@ -333,7 +333,7 @@ void BrowseBox::DrawCursor() aCursor.Bottom() += 1; } else - aCursor = Rectangle( + aCursor = tools::Rectangle( Point( ( !pCols.empty() && pCols[ 0 ]->GetId() == 0 ) ? pCols[ 0 ]->Width() : 0, (nCurRow - nTopRow) * GetDataRowHeight() + 1 ), @@ -528,7 +528,7 @@ void BrowseBox::Resize() UpdateScrollbars(); // Control-Area - Rectangle aInvalidArea( GetControlArea() ); + tools::Rectangle aInvalidArea( GetControlArea() ); aInvalidArea.Right() = GetOutputSizePixel().Width(); aInvalidArea.Left() = 0; Invalidate( aInvalidArea ); @@ -548,7 +548,7 @@ void BrowseBox::Resize() } -void BrowseBox::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) +void BrowseBox::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) { // initializations @@ -615,7 +615,7 @@ void BrowseBox::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect { rRenderContext.Push(PushFlags::FILLCOLOR); rRenderContext.SetFillColor(Color(COL_BLACK)); - rRenderContext.DrawRect(Rectangle(Point(nX, 0), Size(pCol->Width(), GetTitleHeight() - 1))); + rRenderContext.DrawRect(tools::Rectangle(Point(nX, 0), Size(pCol->Width(), GetTitleHeight() - 1))); rRenderContext.Pop(); } @@ -631,7 +631,7 @@ void BrowseBox::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect rRenderContext.Push(PushFlags::FILLCOLOR | PushFlags::LINECOLOR); rRenderContext.SetFillColor(aColFace); rRenderContext.SetLineColor(aColFace); - rRenderContext.DrawRect(Rectangle(Point(nX, 0), + rRenderContext.DrawRect(tools::Rectangle(Point(nX, 0), Point(rRect.Right(), GetTitleHeight() - 2 ))); rRenderContext.Pop(); } @@ -749,19 +749,19 @@ void BrowseBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, } // draw our own content (with clipping) - vcl::Region aRegion(Rectangle(aRealPos, aRealSize)); + vcl::Region aRegion(tools::Rectangle(aRealPos, aRealSize)); pDev->SetClipRegion( pDev->PixelToLogic( aRegion ) ); // do we have to paint the background bool bBackground = !(nFlags & DrawFlags::NoBackground) && pDataWin->IsControlBackground(); if ( bBackground ) { - Rectangle aRect( aRealPos, aRealSize ); + tools::Rectangle aRect( aRealPos, aRealSize ); pDev->SetFillColor( pDataWin->GetControlBackground() ); pDev->DrawRect( aRect ); } - ImplPaintData( *pDev, Rectangle( aRealPos, aRealSize ), true, bDrawSelection ); + ImplPaintData( *pDev, tools::Rectangle( aRealPos, aRealSize ), true, bDrawSelection ); // restore the column widths/data row height nDataRowHeight = nOriginalHeight; @@ -781,7 +781,7 @@ void BrowseBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, } -void BrowseBox::ImplPaintData(OutputDevice& _rOut, const Rectangle& _rRect, bool _bForeignDevice, bool _bDrawSelections) +void BrowseBox::ImplPaintData(OutputDevice& _rOut, const tools::Rectangle& _rRect, bool _bForeignDevice, bool _bDrawSelections) { Point aOverallAreaPos = _bForeignDevice ? _rRect.TopLeft() : Point(0,0); Size aOverallAreaSize = _bForeignDevice ? _rRect.GetSize() : pDataWin->GetOutputSizePixel(); @@ -835,7 +835,7 @@ void BrowseBox::ImplPaintData(OutputDevice& _rOut, const Rectangle& _rRect, bool // #73325# don't paint the row outside the painting rectangle (DG) // prepare auto-highlight - Rectangle aRowRect( Point( _rRect.TopLeft().X(), aPos.Y() ), + tools::Rectangle aRowRect( Point( _rRect.TopLeft().X(), aPos.Y() ), Size( _rRect.GetSize().Width(), nDataRowHeigt ) ); bool bRowSelected = _bDrawSelections @@ -884,7 +884,7 @@ void BrowseBox::ImplPaintData(OutputDevice& _rOut, const Rectangle& _rRect, bool _rOut.SetTextColor( rHighlightTextColor ); _rOut.SetFillColor( rHighlightFillColor ); _rOut.SetLineColor(); - Rectangle aFieldRect( aPos, + tools::Rectangle aFieldRect( aPos, Size( pCol->Width(), nDataRowHeigt ) ); _rOut.DrawRect( aFieldRect ); } @@ -912,7 +912,7 @@ void BrowseBox::ImplPaintData(OutputDevice& _rOut, const Rectangle& _rRect, bool aFieldSize.Height() = aOverallAreaBRPos.Y() + 1 - aPos.Y(); } - vcl::Region aClipToField(Rectangle(aPos, aFieldSize)); + vcl::Region aClipToField(tools::Rectangle(aPos, aFieldSize)); _rOut.SetClipRegion(aClipToField); } pCol->Draw( *this, _rOut, aPos ); @@ -971,7 +971,7 @@ void BrowseBox::ImplPaintData(OutputDevice& _rOut, const Rectangle& _rRect, bool // fill rectangle gray below handle column // DG: fill it only until the end of the drawing rect and not to the end, as this may overpaint handle columns _rOut.SetLineColor( Color( COL_BLACK ) ); - _rOut.DrawRect( Rectangle( + _rOut.DrawRect( tools::Rectangle( Point( aOverallAreaPos.X() - 1, aPos.Y() - 1 ), Point( aOverallAreaPos.X() + pCols[ 0 ]->Width() - 1, _rRect.Bottom() + 1) ) ); @@ -1025,7 +1025,7 @@ void BrowseBox::ImplPaintData(OutputDevice& _rOut, const Rectangle& _rRect, bool _rOut.SetLineColor( aOldLineColor ); } -void BrowseBox::PaintData( vcl::Window& rWin, vcl::RenderContext& rRenderContext, const Rectangle& rRect ) +void BrowseBox::PaintData( vcl::Window& rWin, vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect ) { if (!bBootstrapped && IsReallyVisible()) BrowseBox::StateChanged(StateChangedType::InitShow); @@ -1356,7 +1356,7 @@ void BrowseBox::MouseButtonDown( const MouseEvent& rEvt ) else if ( nX < rEvtPos.X() && nR > rEvtPos.X() ) { MouseButtonDown( BrowserMouseEvent( - this, rEvt, -1, nCol, pCol->GetId(), Rectangle() ) ); + this, rEvt, -1, nCol, pCol->GetId(), tools::Rectangle() ) ); return; } nX = nR + 1; @@ -1410,7 +1410,7 @@ void BrowseBox::MouseMove( const MouseEvent& rEvt ) + nResizeX - nOldWidth; // draw new auxiliary line - pDataWin->ShowTracking( Rectangle( Point( nDragX, 0 ), + pDataWin->ShowTracking( tools::Rectangle( Point( nDragX, 0 ), Size( 1, pDataWin->GetSizePixel().Height() ) ), ShowTrackFlags::Split|ShowTrackFlags::TrackWindow ); } @@ -1936,7 +1936,7 @@ void BrowseBox::SetCursorColor(const Color& _rCol) DoShowCursor("SetCursorColor"); } -Rectangle BrowseBox::calcHeaderRect(bool _bIsColumnBar, bool _bOnScreen) +tools::Rectangle BrowseBox::calcHeaderRect(bool _bIsColumnBar, bool _bOnScreen) { vcl::Window* pParent = nullptr; if ( !_bOnScreen ) @@ -1957,37 +1957,37 @@ Rectangle BrowseBox::calcHeaderRect(bool _bIsColumnBar, bool _bOnScreen) nHeight = GetWindowExtentsRelative( pParent ).GetHeight() - aTopLeft.Y() - GetControlArea().GetSize().Height(); } aTopLeft += GetWindowExtentsRelative( pParent ).TopLeft(); - return Rectangle(aTopLeft,Size(nWidth,nHeight)); + return tools::Rectangle(aTopLeft,Size(nWidth,nHeight)); } -Rectangle BrowseBox::calcTableRect(bool _bOnScreen) +tools::Rectangle BrowseBox::calcTableRect(bool _bOnScreen) { vcl::Window* pParent = nullptr; if ( !_bOnScreen ) pParent = GetAccessibleParentWindow(); - Rectangle aRect( GetWindowExtentsRelative( pParent ) ); - Rectangle aRowBar = calcHeaderRect(false, pParent == nullptr); + tools::Rectangle aRect( GetWindowExtentsRelative( pParent ) ); + tools::Rectangle aRowBar = calcHeaderRect(false, pParent == nullptr); long nX = aRowBar.Right() - aRect.Left(); long nY = aRowBar.Top() - aRect.Top(); Size aSize(aRect.GetSize()); - return Rectangle(aRowBar.TopRight(), Size(aSize.Width() - nX, aSize.Height() - nY - aHScroll->GetSizePixel().Height()) ); + return tools::Rectangle(aRowBar.TopRight(), Size(aSize.Width() - nX, aSize.Height() - nY - aHScroll->GetSizePixel().Height()) ); } -Rectangle BrowseBox::GetFieldRectPixelAbs( sal_Int32 _nRowId, sal_uInt16 _nColId, bool /*_bIsHeader*/, bool _bOnScreen ) +tools::Rectangle BrowseBox::GetFieldRectPixelAbs( sal_Int32 _nRowId, sal_uInt16 _nColId, bool /*_bIsHeader*/, bool _bOnScreen ) { vcl::Window* pParent = nullptr; if ( !_bOnScreen ) pParent = GetAccessibleParentWindow(); - Rectangle aRect = GetFieldRectPixel(_nRowId,_nColId,_bOnScreen); + tools::Rectangle aRect = GetFieldRectPixel(_nRowId,_nColId,_bOnScreen); Point aTopLeft = aRect.TopLeft(); aTopLeft += GetWindowExtentsRelative( pParent ).TopLeft(); - return Rectangle(aTopLeft,aRect.GetSize()); + return tools::Rectangle(aTopLeft,aRect.GetSize()); } // ------------------------------------------------------------------------- EOF diff --git a/svtools/source/brwbox/brwbox3.cxx b/svtools/source/brwbox/brwbox3.cxx index e4f7409139d5..153f192e5bad 100644 --- a/svtools/source/brwbox/brwbox3.cxx +++ b/svtools/source/brwbox/brwbox3.cxx @@ -534,7 +534,7 @@ bool BrowseBox::GetGlyphBoundRects( const Point& rOrigin, const OUString& rStr, return Control::GetGlyphBoundRects( rOrigin, rStr, nIndex, nLen, rVector ); } -Rectangle BrowseBox::GetWindowExtentsRelative( vcl::Window *pRelativeWindow ) const +tools::Rectangle BrowseBox::GetWindowExtentsRelative( vcl::Window *pRelativeWindow ) const { return Control::GetWindowExtentsRelative( pRelativeWindow ); } diff --git a/svtools/source/brwbox/datwin.cxx b/svtools/source/brwbox/datwin.cxx index 48aeacd97513..29a4f2a3d6ae 100644 --- a/svtools/source/brwbox/datwin.cxx +++ b/svtools/source/brwbox/datwin.cxx @@ -144,7 +144,7 @@ void BrowserColumn::Draw( BrowseBox& rBox, OutputDevice& rDev, const Point& rPos rDev.SetLineColor( aOldLineColor ); rBox.DoPaintField( rDev, - Rectangle( + tools::Rectangle( Point( rPos.X() + 2, rPos.Y() + 2 ), Size( Width()-1, rBox.GetDataRowHeight()-1 ) ), GetId(), @@ -156,7 +156,7 @@ void BrowserColumn::Draw( BrowseBox& rBox, OutputDevice& rDev, const Point& rPos long nWidth = Width() == LONG_MAX ? rBox.GetDataWindow().GetSizePixel().Width() : Width(); rBox.DoPaintField( rDev, - Rectangle( + tools::Rectangle( Point( rPos.X() + MIN_COLUMNWIDTH, rPos.Y() ), Size( nWidth-2*MIN_COLUMNWIDTH, rBox.GetDataRowHeight()-1 ) ), GetId(), @@ -217,7 +217,7 @@ void BrowserDataWin::dispose() { bInDtor = true; - for (Rectangle* i : aInvalidRegion) + for (tools::Rectangle* i : aInvalidRegion) delete i; aInvalidRegion.clear(); pHeaderBar.clear(); @@ -284,13 +284,13 @@ void BrowserDataWin::DataChanged( const DataChangedEvent& rDCEvt ) } -void BrowserDataWin::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) +void BrowserDataWin::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) { if (!nUpdateLock && GetUpdateMode()) { if (bInPaint) { - aInvalidRegion.push_back(new Rectangle(rRect)); + aInvalidRegion.push_back(new tools::Rectangle(rRect)); return; } bInPaint = true; @@ -300,7 +300,7 @@ void BrowserDataWin::Paint(vcl::RenderContext& rRenderContext, const Rectangle& } else { - aInvalidRegion.push_back(new Rectangle(rRect)); + aInvalidRegion.push_back(new tools::Rectangle(rRect)); } } @@ -333,11 +333,11 @@ BrowseEvent BrowserDataWin::CreateBrowseEvent( const Point& rPosPixel ) nColId = pBox->pCols[ nCol ]->GetId(); // compute the field rectangle and field relative MouseEvent - Rectangle aFieldRect; + tools::Rectangle aFieldRect; if ( nCol < pBox->pCols.size() ) { nColX -= pBox->pCols[ nCol ]->Width(); - aFieldRect = Rectangle( + aFieldRect = tools::Rectangle( Point( nColX, nRelRow * pBox->GetDataRowHeight() ), Size( pBox->pCols[ nCol ]->Width(), pBox->GetDataRowHeight() ) ); @@ -522,7 +522,7 @@ void BrowserDataWin::StartRowDividerDrag( const Point& _rStartPos ) GetParent()->bRowDividerDrag = true; GetParent()->ImplStartTracking(); - Rectangle aDragSplitRect( 0, m_nDragRowDividerLimit, GetOutputSizePixel().Width(), nDragRowDividerCurrentPos ); + tools::Rectangle aDragSplitRect( 0, m_nDragRowDividerLimit, GetOutputSizePixel().Width(), nDragRowDividerCurrentPos ); ShowTracking( aDragSplitRect ); StartTracking(); @@ -565,7 +565,7 @@ void BrowserDataWin::Tracking( const TrackingEvent& rTEvt ) if ( nDragRowDividerCurrentPos < m_nDragRowDividerLimit + GetParent()->QueryMinimumRowHeight() ) nDragRowDividerCurrentPos = m_nDragRowDividerLimit + GetParent()->QueryMinimumRowHeight(); - Rectangle aDragSplitRect( 0, m_nDragRowDividerLimit, GetOutputSizePixel().Width(), nDragRowDividerCurrentPos ); + tools::Rectangle aDragSplitRect( 0, m_nDragRowDividerLimit, GetOutputSizePixel().Width(), nDragRowDividerCurrentPos ); ShowTracking( aDragSplitRect ); } } @@ -589,7 +589,7 @@ void BrowserDataWin::RequestHelp( const HelpEvent& rHEvt ) BrowseEvent::BrowseEvent( vcl::Window* pWindow, long nAbsRow, sal_uInt16 nColumn, sal_uInt16 nColumnId, - const Rectangle& rRect ): + const tools::Rectangle& rRect ): pWin(pWindow), nRow(nAbsRow), aRect(rRect), @@ -609,7 +609,7 @@ BrowserMouseEvent::BrowserMouseEvent( BrowserDataWin *pWindow, BrowserMouseEvent::BrowserMouseEvent( vcl::Window *pWindow, const MouseEvent& rEvt, long nAbsRow, sal_uInt16 nColumn, sal_uInt16 nColumnId, - const Rectangle& rRect ): + const tools::Rectangle& rRect ): MouseEvent(rEvt), BrowseEvent( pWindow, nAbsRow, nColumn, nColumnId, rRect ) { @@ -644,7 +644,7 @@ void BrowserDataWin::SetUpdateMode( bool bMode ) void BrowserDataWin::DoOutstandingInvalidations() { - for (Rectangle* i : aInvalidRegion) { + for (tools::Rectangle* i : aInvalidRegion) { Control::Invalidate( *i ); delete i; } @@ -656,20 +656,20 @@ void BrowserDataWin::Invalidate( InvalidateFlags nFlags ) { if ( !GetUpdateMode() ) { - for (Rectangle* i : aInvalidRegion) + for (tools::Rectangle* i : aInvalidRegion) delete i; aInvalidRegion.clear(); - aInvalidRegion.push_back( new Rectangle( Point( 0, 0 ), GetOutputSizePixel() ) ); + aInvalidRegion.push_back( new tools::Rectangle( Point( 0, 0 ), GetOutputSizePixel() ) ); } else Window::Invalidate( nFlags ); } -void BrowserDataWin::Invalidate( const Rectangle& rRect, InvalidateFlags nFlags ) +void BrowserDataWin::Invalidate( const tools::Rectangle& rRect, InvalidateFlags nFlags ) { if ( !GetUpdateMode() ) - aInvalidRegion.push_back( new Rectangle( rRect ) ); + aInvalidRegion.push_back( new tools::Rectangle( rRect ) ); else Window::Invalidate( rRect, nFlags ); } @@ -697,7 +697,7 @@ void BrowserScrollBar::Tracking( const TrackingEvent& rTEvt ) else aTip += OUString::number(GetRangeMax()); - Rectangle aRect(GetPointerPosPixel(), Size(GetTextWidth(aTip), GetTextHeight())); + tools::Rectangle aRect(GetPointerPosPixel(), Size(GetTextWidth(aTip), GetTextHeight())); Help::ShowQuickHelp(this, aRect, aTip); _nLastPos = nPos; } diff --git a/svtools/source/brwbox/datwin.hxx b/svtools/source/brwbox/datwin.hxx index bc9299ca9445..f9cc4ce3f5f8 100644 --- a/svtools/source/brwbox/datwin.hxx +++ b/svtools/source/brwbox/datwin.hxx @@ -30,13 +30,13 @@ #define MIN_COLUMNWIDTH 2 -typedef ::std::vector< Rectangle* > RectangleList; +typedef ::std::vector< tools::Rectangle* > RectangleList; class ButtonFrame { - Rectangle aRect; - Rectangle aInnerRect; + tools::Rectangle aRect; + tools::Rectangle aInnerRect; OUString aText; bool m_bDrawDisabled; @@ -129,7 +129,7 @@ public: virtual void dispose() override; virtual void DataChanged( const DataChangedEvent& rDCEvt ) 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 Command( const CommandEvent& rEvt ) override; virtual void MouseButtonDown( const MouseEvent& rEvt ) override; @@ -160,7 +160,7 @@ public: void Update(); void DoOutstandingInvalidations(); void Invalidate( InvalidateFlags nFlags = InvalidateFlags::NONE ) override; - void Invalidate( const Rectangle& rRect, InvalidateFlags nFlags = InvalidateFlags::NONE ) override; + void Invalidate( const tools::Rectangle& rRect, InvalidateFlags nFlags = InvalidateFlags::NONE ) override; using Control::Invalidate; protected: diff --git a/svtools/source/brwbox/ebbcontrols.cxx b/svtools/source/brwbox/ebbcontrols.cxx index 0e6248212166..41d5d0896145 100644 --- a/svtools/source/brwbox/ebbcontrols.cxx +++ b/svtools/source/brwbox/ebbcontrols.cxx @@ -294,7 +294,7 @@ namespace svt } - void CheckBoxControl::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rClientRect) + void CheckBoxControl::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rClientRect) { Control::Paint(rRenderContext, rClientRect); if (HasFocus()) diff --git a/svtools/source/brwbox/editbrowsebox.cxx b/svtools/source/brwbox/editbrowsebox.cxx index 61bcb5ea612f..691aefe7da10 100644 --- a/svtools/source/brwbox/editbrowsebox.cxx +++ b/svtools/source/brwbox/editbrowsebox.cxx @@ -228,7 +228,7 @@ namespace svt } } - void EditBrowseBox::PaintField( OutputDevice& rDev, const Rectangle& rRect, + void EditBrowseBox::PaintField( OutputDevice& rDev, const tools::Rectangle& rRect, sal_uInt16 nColumnId ) const { if (nColumnId == HandleColumnId) @@ -294,7 +294,7 @@ namespace svt return Image(aBitmap); } - void EditBrowseBox::PaintStatusCell(OutputDevice& rDev, const Rectangle& rRect) const + void EditBrowseBox::PaintStatusCell(OutputDevice& rDev, const tools::Rectangle& rRect) const { if (nPaintRow < 0) return; @@ -368,7 +368,7 @@ namespace svt { if ( IsEditing() ) { - Rectangle aRect( GetCellRect( nEditRow, nEditCol, false ) ); + tools::Rectangle aRect( GetCellRect( nEditRow, nEditCol, false ) ); CellControllerRef aCellController( Controller() ); ResizeController( aCellController, aRect ); aCellController->GetWindow().GrabFocus(); @@ -845,7 +845,7 @@ namespace svt vcl::Window& rWindow = GetDataWindow(); if ((nEditRow >= 0) && !(GetBrowserFlags() & EditBrowseBoxFlags::NO_HANDLE_COLUMN_CONTENT)) { - Rectangle aRect = GetFieldRectPixel(nEditRow, 0, false ); + tools::Rectangle aRect = GetFieldRectPixel(nEditRow, 0, false ); // status cell should be painted if and only if text is displayed // note: bPaintStatus is mutable, but Solaris has problems with assigning // probably because it is part of a bitfield @@ -880,7 +880,7 @@ namespace svt BrowseBox::ColumnMoved(nId); if (IsEditing()) { - Rectangle aRect( GetCellRect(nEditRow, nEditCol, false)); + tools::Rectangle aRect( GetCellRect(nEditRow, nEditCol, false)); CellControllerRef aControllerRef = Controller(); ResizeController(aControllerRef, aRect); Controller()->GetWindow().GrabFocus(); @@ -921,7 +921,7 @@ namespace svt { if (IsEditing()) { - Rectangle aRect = GetCellRect(nEditRow, nEditCol, false); + tools::Rectangle aRect = GetCellRect(nEditRow, nEditCol, false); ResizeController(aController,aRect); AsynchGetFocus(); } @@ -947,7 +947,7 @@ namespace svt aController = GetController(nRow, nCol); if (aController.is()) { - Rectangle aRect( GetCellRect(nEditRow, nEditCol, false)); + tools::Rectangle aRect( GetCellRect(nEditRow, nEditCol, false)); ResizeController(aController, aRect); InitController(aController, nEditRow, nEditCol); @@ -1015,9 +1015,9 @@ namespace svt } - Rectangle EditBrowseBox::GetCellRect(long nRow, sal_uInt16 nColId, bool bRel) const + tools::Rectangle EditBrowseBox::GetCellRect(long nRow, sal_uInt16 nColId, bool bRel) const { - Rectangle aRect( GetFieldRectPixel(nRow, nColId, bRel)); + tools::Rectangle aRect( GetFieldRectPixel(nRow, nColId, bRel)); if ((GetMode() & BrowserMode::CURSOR_WO_FOCUS) == BrowserMode::CURSOR_WO_FOCUS) { aRect.Top() += 1; @@ -1056,7 +1056,7 @@ namespace svt { if (IsEditing()) { - Rectangle aRect( GetCellRect(nEditRow, nEditCol, false)); + tools::Rectangle aRect( GetCellRect(nEditRow, nEditCol, false)); CellControllerRef aControllerRef = Controller(); ResizeController(aControllerRef, aRect); Controller()->GetWindow().GrabFocus(); @@ -1131,7 +1131,7 @@ namespace svt } - void EditBrowseBox::ResizeController(CellControllerRef& rController, const Rectangle& rRect) + void EditBrowseBox::ResizeController(CellControllerRef& rController, const tools::Rectangle& rRect) { rController->GetWindow().SetPosSizePixel(rRect.TopLeft(), rRect.GetSize()); } @@ -1192,14 +1192,14 @@ namespace svt void EditBrowseBox::InvalidateHandleColumn() { - Rectangle aHdlFieldRect( GetFieldRectPixel( 0, 0 )); - Rectangle aInvalidRect( Point(0,0), GetOutputSizePixel() ); + tools::Rectangle aHdlFieldRect( GetFieldRectPixel( 0, 0 )); + tools::Rectangle aInvalidRect( Point(0,0), GetOutputSizePixel() ); aInvalidRect.Right() = aHdlFieldRect.Right(); Invalidate( aInvalidRect ); } - void EditBrowseBox::PaintTristate(OutputDevice&, const Rectangle& rRect, const TriState& eState, bool _bEnabled) const + void EditBrowseBox::PaintTristate(OutputDevice&, const tools::Rectangle& rRect, const TriState& eState, bool _bEnabled) const { pCheckBoxPaint->GetBox().SetState(eState); pCheckBoxPaint->SetPosSizePixel(rRect.TopLeft(), rRect.GetSize()); diff --git a/svtools/source/brwbox/editbrowsebox2.cxx b/svtools/source/brwbox/editbrowsebox2.cxx index efccd3322f7c..d645eb2d7d00 100644 --- a/svtools/source/brwbox/editbrowsebox2.cxx +++ b/svtools/source/brwbox/editbrowsebox2.cxx @@ -164,9 +164,9 @@ void EditBrowseBox::DetermineFocus( const GetFocusFlags _nGetFocusFlags ) } } -Rectangle EditBrowseBox::GetFieldCharacterBounds(sal_Int32 _nRow,sal_Int32 _nColumnPos,sal_Int32 _nIndex) +tools::Rectangle EditBrowseBox::GetFieldCharacterBounds(sal_Int32 _nRow,sal_Int32 _nColumnPos,sal_Int32 _nIndex) { - Rectangle aRect; + tools::Rectangle aRect; if ( SeekRow(_nRow) ) { CellController* pController = GetController( diff --git a/svtools/source/contnr/iconview.cxx b/svtools/source/contnr/iconview.cxx index 9681fa95e1ab..13921219101b 100644 --- a/svtools/source/contnr/iconview.cxx +++ b/svtools/source/contnr/iconview.cxx @@ -47,7 +47,7 @@ void IconView::Resize() SvTreeListBox::Resize(); } -Rectangle IconView::GetFocusRect( SvTreeListEntry*, long nEntryPos ) +tools::Rectangle IconView::GetFocusRect( SvTreeListEntry*, long nEntryPos ) { Size aSize; aSize.Height() = nEntryHeight; @@ -57,7 +57,7 @@ Rectangle IconView::GetFocusRect( SvTreeListEntry*, long nEntryPos ) aPos.X() = 0; aPos.Y() = 0; - Rectangle aRect; + tools::Rectangle aRect; short nCols = GetColumnsCount(); @@ -85,7 +85,7 @@ void IconView::PaintEntry(SvTreeListEntry& rEntry, long nX, long nY, vcl::RenderContext& rRenderContext) { - Rectangle aRect; // multi purpose + tools::Rectangle aRect; // multi purpose PreparePaint(rRenderContext, rEntry); diff --git a/svtools/source/contnr/iconviewimpl.cxx b/svtools/source/contnr/iconviewimpl.cxx index 5328d50156cc..5b90ca87b795 100644 --- a/svtools/source/contnr/iconviewimpl.cxx +++ b/svtools/source/contnr/iconviewimpl.cxx @@ -43,7 +43,7 @@ void IconViewImpl::CursorUp() ShowCursor( false ); pView->Update(); pStartEntry = pPrevFirstToDraw; - Rectangle aArea( GetVisibleArea() ); + tools::Rectangle aArea( GetVisibleArea() ); aArea.Bottom() -= nEntryHeight; pView->Scroll( 0, nEntryHeight, aArea, ScrollFlags::NoChildren ); pView->Update(); @@ -68,7 +68,7 @@ void IconViewImpl::CursorDown() ShowCursor( false ); pView->Update(); pStartEntry = pNextFirstToDraw; - Rectangle aArea( GetVisibleArea() ); + tools::Rectangle aArea( GetVisibleArea() ); pView->Scroll( 0, -(pView->GetEntryHeight()), aArea, ScrollFlags::NoChildren ); pView->Update(); ShowCursor( true ); @@ -103,7 +103,7 @@ void IconViewImpl::PageDown( sal_uInt16 nDelta ) } else { - Rectangle aArea( GetVisibleArea() ); + tools::Rectangle aArea( GetVisibleArea() ); long nScroll = pView->GetEntryHeight() * static_cast<long>(nRealDelta); nScroll = -nScroll; pView->Update(); @@ -141,7 +141,7 @@ void IconViewImpl::PageUp( sal_uInt16 nDelta ) else { long nEntryHeight = pView->GetEntryHeight(); - Rectangle aArea( GetVisibleArea() ); + tools::Rectangle aArea( GetVisibleArea() ); pView->Update(); pView->Scroll( 0, nEntryHeight*nRealDelta, aArea, ScrollFlags::NoChildren ); pView->Update(); @@ -300,7 +300,7 @@ void IconViewImpl::AdjustScrollBars( Size& rSize ) // adapt Range, VisibleRange etc. // refresh output size, in case we have to scroll - Rectangle aRect; + tools::Rectangle aRect; aRect.SetSize( aOSize ); aSelEng.SetVisibleArea( aRect ); @@ -367,7 +367,7 @@ void IconViewImpl::UpdateAll( bool bInvalidateCompleteView ) pView->Invalidate( GetVisibleArea() ); } -void IconViewImpl::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) +void IconViewImpl::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) { if (!pView->GetVisibleCount()) return; @@ -445,7 +445,7 @@ void IconViewImpl::InvalidateEntry( long nId ) const { if( !(nFlags & LBoxFlags::InPaint )) { - Rectangle aRect( GetVisibleArea() ); + tools::Rectangle aRect( GetVisibleArea() ); long nMaxBottom = aRect.Bottom(); aRect.Top() = nId / pView->GetColumnsCount() * pView->GetEntryHeight(); aRect.Bottom() = aRect.Top(); aRect.Bottom() += pView->GetEntryHeight(); diff --git a/svtools/source/contnr/imivctl.hxx b/svtools/source/contnr/imivctl.hxx index b9c17dd5e991..3b35978460b4 100644 --- a/svtools/source/contnr/imivctl.hxx +++ b/svtools/source/contnr/imivctl.hxx @@ -94,7 +94,7 @@ enum class IcnViewFieldType struct LocalFocus { bool bOn; - Rectangle aRect; + tools::Rectangle aRect; Color aPenColor; LocalFocus() { bOn = false; } @@ -159,8 +159,8 @@ class SvxIconChoiceCtrl_Impl VclPtr<ScrollBar> aVerSBar; VclPtr<ScrollBar> aHorSBar; VclPtr<ScrollBarBox> aScrBarBox; - Rectangle aCurSelectionRect; - std::vector<Rectangle*> aSelectedRectList; + tools::Rectangle aCurSelectionRect; + std::vector<tools::Rectangle*> aSelectedRectList; Idle aEditIdle; // for editing in place Idle aAutoArrangeIdle; Idle aDocRectChangedIdle; @@ -212,7 +212,7 @@ class SvxIconChoiceCtrl_Impl void ShowCursor( bool bShow ); void ImpArrange( bool bKeepPredecessors ); - void AdjustVirtSize( const Rectangle& ); + void AdjustVirtSize( const tools::Rectangle& ); void ResetVirtSize(); void CheckScrollBars(); @@ -251,7 +251,7 @@ class SvxIconChoiceCtrl_Impl SvxIconChoiceCtrlEntry* pEntry1, SvxIconChoiceCtrlEntry* pEntry2, bool bAdd, - std::vector<Rectangle*>* pOtherRects + std::vector<tools::Rectangle*>* pOtherRects ); void SelectRange( @@ -260,7 +260,7 @@ class SvxIconChoiceCtrl_Impl bool bAdd ); - void AddSelectedRect( const Rectangle& ); + void AddSelectedRect( const tools::Rectangle& ); void AddSelectedRect( SvxIconChoiceCtrlEntry* pEntry1, SvxIconChoiceCtrlEntry* pEntry2 @@ -268,9 +268,9 @@ class SvxIconChoiceCtrl_Impl void ClearSelectedRectList(); void ClearColumnList(); - Rectangle CalcMaxTextRect( const SvxIconChoiceCtrlEntry* pEntry ) const; + tools::Rectangle CalcMaxTextRect( const SvxIconChoiceCtrlEntry* pEntry ) const; - void ClipAtVirtOutRect( Rectangle& rRect ) const; + void ClipAtVirtOutRect( tools::Rectangle& rRect ) const; sal_uLong GetPredecessorGrid( const Point& rDocPos) const; void InitPredecessors(); @@ -297,7 +297,7 @@ class SvxIconChoiceCtrl_Impl DECL_LINK(TextEditEndedHdl, LinkParamNone*, void); - void ShowFocus ( Rectangle& rRect ); + void ShowFocus ( tools::Rectangle& rRect ); void DrawFocusRect(vcl::RenderContext& rRenderContext); bool IsMnemonicChar( sal_Unicode cChar, sal_uLong& rPos ) const; @@ -330,7 +330,7 @@ public: bool bAddToSelection = false, bool bSyncPaint = false ); - void Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect); + void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect); bool MouseButtonDown( const MouseEvent& ); bool MouseButtonUp( const MouseEvent& ); bool MouseMove( const MouseEvent&); @@ -372,9 +372,9 @@ public: long nSetMaxVirtHeight ); - Rectangle CalcFocusRect( SvxIconChoiceCtrlEntry* ); - Rectangle CalcBmpRect( SvxIconChoiceCtrlEntry*, const Point* pPos = nullptr ); - Rectangle CalcTextRect( + tools::Rectangle CalcFocusRect( SvxIconChoiceCtrlEntry* ); + tools::Rectangle CalcBmpRect( SvxIconChoiceCtrlEntry*, const Point* pPos = nullptr ); + tools::Rectangle CalcTextRect( SvxIconChoiceCtrlEntry*, const Point* pPos = nullptr, bool bForInplaceEdit = false, @@ -392,18 +392,18 @@ public: ); // recalculates all invalid BoundRects void RecalcAllBoundingRectsSmart(); - const Rectangle& GetEntryBoundRect( SvxIconChoiceCtrlEntry* ); - void InvalidateBoundingRect( Rectangle& rRect ) + const tools::Rectangle& GetEntryBoundRect( SvxIconChoiceCtrlEntry* ); + void InvalidateBoundingRect( tools::Rectangle& rRect ) { rRect.Right() = LONG_MAX; bBoundRectsDirty = true; } - static bool IsBoundingRectValid( const Rectangle& rRect ) { return ( rRect.Right() != LONG_MAX ); } + static bool IsBoundingRectValid( const tools::Rectangle& rRect ) { return ( rRect.Right() != LONG_MAX ); } - void PaintEmphasis(const Rectangle& rRect1, bool bSelected, + void PaintEmphasis(const tools::Rectangle& rRect1, bool bSelected, bool bDropTarget, bool bCursored, vcl::RenderContext& rRenderContext ); - void PaintItem(const Rectangle& rRect, IcnViewFieldType eItem, SvxIconChoiceCtrlEntry* pEntry, + void PaintItem(const tools::Rectangle& rRect, IcnViewFieldType eItem, SvxIconChoiceCtrlEntry* pEntry, sal_uInt16 nPaintFlags, vcl::RenderContext& rRenderContext); // recalculates all BoundingRects if bMustRecalcBoundingRects == true @@ -420,19 +420,19 @@ public: void HideDDIcon(); static bool IsOver( - std::vector<Rectangle*>* pSelectedRectList, - const Rectangle& rEntryBoundRect + std::vector<tools::Rectangle*>* pSelectedRectList, + const tools::Rectangle& rEntryBoundRect ); void SelectRect( - const Rectangle&, + const tools::Rectangle&, bool bAdd, - std::vector<Rectangle*>* pOtherRects + std::vector<tools::Rectangle*>* pOtherRects ); bool IsTextHit( SvxIconChoiceCtrlEntry* pEntry, const Point& rDocPos ); void MakeVisible( - const Rectangle& rDocPos, + const tools::Rectangle& rDocPos, bool bInScrollBarEvent=false ); @@ -458,7 +458,7 @@ public: void SetSelectionMode( SelectionMode eMode ) { eSelectionMode=eMode; } sal_Int32 GetEntryListPos( SvxIconChoiceCtrlEntry* ) const; void InitSettings(); - Rectangle GetOutputRect() const; + tools::Rectangle GetOutputRect() const; void SetEntryPredecessor(SvxIconChoiceCtrlEntry* pEntry,SvxIconChoiceCtrlEntry* pPredecessor); // only delivers valid results when in AutoArrange mode! @@ -473,7 +473,7 @@ public: SvxIconChoiceCtrlEntry* pEntry, bool bKeepHighlightFlags ); - void DrawHighlightFrame(vcl::RenderContext& rRenderContext, const Rectangle& rBmpRect); + void DrawHighlightFrame(vcl::RenderContext& rRenderContext, const tools::Rectangle& rBmpRect); void CallEventListeners( VclEventId nEvent, void* pData ); @@ -537,7 +537,7 @@ typedef sal_uLong GridId; class IcnGridMap_Impl { - Rectangle _aLastOccupiedGrid; + tools::Rectangle _aLastOccupiedGrid; SvxIconChoiceCtrl_Impl* _pView; bool * _pGridMap; sal_uInt16 _nGridCols, _nGridRows; @@ -566,7 +566,7 @@ public: _pGridMap[ nId ] = true; } - Rectangle GetGridRect( GridId ); + tools::Rectangle GetGridRect( GridId ); void GetGridCoord( GridId, sal_uInt16& rGridX, sal_uInt16& rGridY ); static sal_uLong GetGridCount( const Size& rSizePixel, diff --git a/svtools/source/contnr/imivctl1.cxx b/svtools/source/contnr/imivctl1.cxx index 2452e91c5431..8e728c707fd8 100644 --- a/svtools/source/contnr/imivctl1.cxx +++ b/svtools/source/contnr/imivctl1.cxx @@ -295,7 +295,7 @@ void SvxIconChoiceCtrl_Impl::InsertEntry( SvxIconChoiceCtrlEntry* pEntry, size_t if( bUpdateMode ) { FindBoundingRect( pEntry ); - Rectangle aOutputArea( GetOutputRect() ); + tools::Rectangle aOutputArea( GetOutputRect() ); pGridMap->OccupyGrids( pEntry ); if( !aOutputArea.IsOver( pEntry->aRect ) ) return; // is invisible @@ -337,11 +337,11 @@ void SvxIconChoiceCtrl_Impl::CreateAutoMnemonics( MnemonicGenerator* _pGenerator } } -Rectangle SvxIconChoiceCtrl_Impl::GetOutputRect() const +tools::Rectangle SvxIconChoiceCtrl_Impl::GetOutputRect() const { Point aOrigin( pView->GetMapMode().GetOrigin() ); aOrigin *= -1; - return Rectangle( aOrigin, aOutputSize ); + return tools::Rectangle( aOrigin, aOutputSize ); } void SvxIconChoiceCtrl_Impl::SetListPositions() @@ -471,7 +471,7 @@ void SvxIconChoiceCtrl_Impl::ResetVirtSize() VisRectChanged(); } -void SvxIconChoiceCtrl_Impl::AdjustVirtSize( const Rectangle& rRect ) +void SvxIconChoiceCtrl_Impl::AdjustVirtSize( const tools::Rectangle& rRect ) { long nHeightOffs = 0; long nWidthOffs = 0; @@ -563,7 +563,7 @@ void SvxIconChoiceCtrl_Impl::ImpArrange( bool bKeepPredecessors ) static Point aEmptyPoint; bool bOldUpdate = bUpdateMode; - Rectangle aCurOutputArea( GetOutputRect() ); + tools::Rectangle aCurOutputArea( GetOutputRect() ); if( (nWinBits & WB_SMART_ARRANGE) && aCurOutputArea.TopLeft() != aEmptyPoint ) bUpdateMode = false; aAutoArrangeIdle.Stop(); @@ -589,7 +589,7 @@ void SvxIconChoiceCtrl_Impl::ImpArrange( bool bKeepPredecessors ) ShowCursor( true ); } -void SvxIconChoiceCtrl_Impl::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) +void SvxIconChoiceCtrl_Impl::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) { bEndScrollInvalidate = false; @@ -667,7 +667,7 @@ void SvxIconChoiceCtrl_Impl::Paint(vcl::RenderContext& rRenderContext, const Rec while(nCount) { SvxIconChoiceCtrlEntry* pEntry = (*pZOrderList)[nPos]; - const Rectangle& rBoundRect = GetEntryBoundRect(pEntry); + const tools::Rectangle& rBoundRect = GetEntryBoundRect(pEntry); if (rRect.IsOver(rBoundRect)) { PaintEntry(pEntry, rBoundRect.TopLeft(), rRenderContext); @@ -699,13 +699,13 @@ void SvxIconChoiceCtrl_Impl::RepaintSelectedEntries() if (!nCount) return; - Rectangle aOutRect(GetOutputRect()); + tools::Rectangle aOutRect(GetOutputRect()); for (size_t nCur = 0; nCur < nCount; nCur++) { SvxIconChoiceCtrlEntry* pEntry = (*pZOrderList)[nCur]; if (pEntry->GetFlags() & SvxIconViewFlags::SELECTED) { - const Rectangle& rBoundRect = GetEntryBoundRect(pEntry); + const tools::Rectangle& rBoundRect = GetEntryBoundRect(pEntry); if (aOutRect.IsOver(rBoundRect)) pView->Invalidate(rBoundRect); } @@ -751,12 +751,12 @@ bool SvxIconChoiceCtrl_Impl::MouseButtonDown( const MouseEvent& rMEvt) if( rMEvt.IsShift() ) { - Rectangle aRect( GetEntryBoundRect( pAnchor )); + tools::Rectangle aRect( GetEntryBoundRect( pAnchor )); if( pEntry ) aRect.Union( GetEntryBoundRect( pEntry ) ); else { - Rectangle aTempRect( aDocPos, Size(1,1)); + tools::Rectangle aTempRect( aDocPos, Size(1,1)); aRect.Union( aTempRect ); } aCurSelectionRect = aRect; @@ -1039,7 +1039,7 @@ bool SvxIconChoiceCtrl_Impl::KeyInput( const KeyEvent& rKEvt ) SetCursor_Impl( pOldCursor, pNewCursor, bMod1, bShift, true ); if( !pNewCursor ) { - Rectangle aRect( GetEntryBoundRect( pCursor ) ); + tools::Rectangle aRect( GetEntryBoundRect( pCursor ) ); if( aRect.Top()) { aRect.Bottom() -= aRect.Top(); @@ -1094,7 +1094,7 @@ bool SvxIconChoiceCtrl_Impl::KeyInput( const KeyEvent& rKEvt ) SetCursor_Impl( pOldCursor, pNewCursor, bMod1, bShift, true ); if( !pNewCursor ) { - Rectangle aRect( GetEntryBoundRect(pCursor)); + tools::Rectangle aRect( GetEntryBoundRect(pCursor)); if( aRect.Left() ) { aRect.Right() -= aRect.Left(); @@ -1508,7 +1508,7 @@ void SvxIconChoiceCtrl_Impl::SetUpdateMode( bool bUpdate ) } // priorities of the emphasis: bDropTarget => bCursored => bSelected -void SvxIconChoiceCtrl_Impl::PaintEmphasis(const Rectangle& rTextRect, bool bSelected, +void SvxIconChoiceCtrl_Impl::PaintEmphasis(const tools::Rectangle& rTextRect, bool bSelected, bool bDropTarget, bool bCursored, vcl::RenderContext& rRenderContext) { static Color aTransparent(COL_TRANSPARENT); @@ -1552,7 +1552,7 @@ void SvxIconChoiceCtrl_Impl::PaintEmphasis(const Rectangle& rTextRect, bool bSel } -void SvxIconChoiceCtrl_Impl::PaintItem(const Rectangle& rRect, +void SvxIconChoiceCtrl_Impl::PaintItem(const tools::Rectangle& rRect, IcnViewFieldType eItem, SvxIconChoiceCtrlEntry* pEntry, sal_uInt16 nPaintFlags, vcl::RenderContext& rRenderContext ) { @@ -1564,7 +1564,7 @@ void SvxIconChoiceCtrl_Impl::PaintItem(const Rectangle& rRect, if (pEntry->IsFocused()) { - Rectangle aRect (CalcFocusRect(pEntry)); + tools::Rectangle aRect (CalcFocusRect(pEntry)); ShowFocus(aRect); DrawFocusRect(rRenderContext); } @@ -1594,8 +1594,8 @@ void SvxIconChoiceCtrl_Impl::PaintEntry(SvxIconChoiceCtrlEntry* pEntry, const Po rRenderContext.Push(PushFlags::FONT | PushFlags::TEXTCOLOR); OUString aEntryText(SvtIconChoiceCtrl::GetEntryText(pEntry, false)); - Rectangle aTextRect(CalcTextRect(pEntry, &rPos, false, &aEntryText)); - Rectangle aBmpRect(CalcBmpRect(pEntry, &rPos)); + tools::Rectangle aTextRect(CalcTextRect(pEntry, &rPos, false, &aEntryText)); + tools::Rectangle aBmpRect(CalcBmpRect(pEntry, &rPos)); bool bShowSelection = ((bSelected && !bCursored) && !bNoEmphasis && (eSelectionMode != SelectionMode::NONE)); @@ -1629,7 +1629,7 @@ void SvxIconChoiceCtrl_Impl::PaintEntry(SvxIconChoiceCtrlEntry* pEntry, const Po bool bResetClipRegion = false; if (!rRenderContext.IsClipRegion() && (aVerSBar->IsVisible() || aHorSBar->IsVisible())) { - Rectangle aOutputArea(GetOutputRect()); + tools::Rectangle aOutputArea(GetOutputRect()); if (aOutputArea.IsOver(aTextRect) || aOutputArea.IsOver(aBmpRect)) { rRenderContext.SetClipRegion(vcl::Region(aOutputArea)); @@ -1667,7 +1667,7 @@ void SvxIconChoiceCtrl_Impl::PaintEntry(SvxIconChoiceCtrlEntry* pEntry, const Po void SvxIconChoiceCtrl_Impl::SetEntryPos( SvxIconChoiceCtrlEntry* pEntry, const Point& rPos ) { ShowCursor( false ); - Rectangle aBoundRect( GetEntryBoundRect( pEntry )); + tools::Rectangle aBoundRect( GetEntryBoundRect( pEntry )); pView->Invalidate( aBoundRect ); ToTop( pEntry ); if( !IsAutoArrange() ) @@ -1723,7 +1723,7 @@ SvxIconChoiceCtrlEntry* SvxIconChoiceCtrl_Impl::GetEntry( const Point& rDocPos, { if( bHit ) { - Rectangle aRect = CalcBmpRect( pEntry ); + tools::Rectangle aRect = CalcBmpRect( pEntry ); aRect.Top() -= 3; aRect.Bottom() += 3; aRect.Left() -= 3; @@ -1745,12 +1745,12 @@ void SvxIconChoiceCtrl_Impl::MakeEntryVisible( SvxIconChoiceCtrlEntry* pEntry, b { if ( bBound ) { - const Rectangle& rRect = GetEntryBoundRect( pEntry ); + const tools::Rectangle& rRect = GetEntryBoundRect( pEntry ); MakeVisible( rRect ); } else { - Rectangle aRect = CalcBmpRect( pEntry ); + tools::Rectangle aRect = CalcBmpRect( pEntry ); aRect.Union( CalcTextRect( pEntry ) ); aRect.Top() += TBOFFS_BOUND; aRect.Bottom() += TBOFFS_BOUND; @@ -1760,16 +1760,16 @@ void SvxIconChoiceCtrl_Impl::MakeEntryVisible( SvxIconChoiceCtrlEntry* pEntry, b } } -const Rectangle& SvxIconChoiceCtrl_Impl::GetEntryBoundRect( SvxIconChoiceCtrlEntry* pEntry ) +const tools::Rectangle& SvxIconChoiceCtrl_Impl::GetEntryBoundRect( SvxIconChoiceCtrlEntry* pEntry ) { if( !IsBoundingRectValid( pEntry->aRect )) FindBoundingRect( pEntry ); return pEntry->aRect; } -Rectangle SvxIconChoiceCtrl_Impl::CalcBmpRect( SvxIconChoiceCtrlEntry* pEntry, const Point* pPos ) +tools::Rectangle SvxIconChoiceCtrl_Impl::CalcBmpRect( SvxIconChoiceCtrlEntry* pEntry, const Point* pPos ) { - Rectangle aBound = GetEntryBoundRect( pEntry ); + tools::Rectangle aBound = GetEntryBoundRect( pEntry ); if( pPos ) aBound.SetPos( *pPos ); Point aPos( aBound.TopLeft() ); @@ -1779,14 +1779,14 @@ Rectangle SvxIconChoiceCtrl_Impl::CalcBmpRect( SvxIconChoiceCtrlEntry* pEntry, c case WB_ICON: { aPos.X() += ( aBound.GetWidth() - aImageSize.Width() ) / 2; - return Rectangle( aPos, aImageSize ); + return tools::Rectangle( aPos, aImageSize ); } case WB_SMALLICON: case WB_DETAILS: aPos.Y() += ( aBound.GetHeight() - aImageSize.Height() ) / 2; //TODO: determine horizontal distance to bounding rectangle - return Rectangle( aPos, aImageSize ); + return tools::Rectangle( aPos, aImageSize ); default: OSL_FAIL("IconView: Viewmode not set"); @@ -1794,7 +1794,7 @@ Rectangle SvxIconChoiceCtrl_Impl::CalcBmpRect( SvxIconChoiceCtrlEntry* pEntry, c } } -Rectangle SvxIconChoiceCtrl_Impl::CalcTextRect( SvxIconChoiceCtrlEntry* pEntry, +tools::Rectangle SvxIconChoiceCtrl_Impl::CalcTextRect( SvxIconChoiceCtrlEntry* pEntry, const Point* pEntryPos, bool bEdit, const OUString* pStr ) { OUString aEntryText; @@ -1803,12 +1803,12 @@ Rectangle SvxIconChoiceCtrl_Impl::CalcTextRect( SvxIconChoiceCtrlEntry* pEntry, else aEntryText = *pStr; - const Rectangle aMaxTextRect( CalcMaxTextRect( pEntry ) ); - Rectangle aBound( GetEntryBoundRect( pEntry ) ); + const tools::Rectangle aMaxTextRect( CalcMaxTextRect( pEntry ) ); + tools::Rectangle aBound( GetEntryBoundRect( pEntry ) ); if( pEntryPos ) aBound.SetPos( *pEntryPos ); - Rectangle aTextRect( aMaxTextRect ); + tools::Rectangle aTextRect( aMaxTextRect ); if( !bEdit ) aTextRect = pView->GetTextRect( aTextRect, aEntryText, nCurTextDrawFlags ); @@ -1850,7 +1850,7 @@ Rectangle SvxIconChoiceCtrl_Impl::CalcTextRect( SvxIconChoiceCtrlEntry* pEntry, aPos.Y() += (nBoundHeight - aTextSize.Height()) / 2; break; } - return Rectangle( aPos, aTextSize ); + return tools::Rectangle( aPos, aTextSize ); } @@ -1972,7 +1972,7 @@ void SvxIconChoiceCtrl_Impl::FindBoundingRect( SvxIconChoiceCtrlEntry* pEntry ) void SvxIconChoiceCtrl_Impl::SetBoundingRect_Impl( SvxIconChoiceCtrlEntry* pEntry, const Point& rPos, const Size& /*rBoundingSize*/ ) { - Rectangle aGridRect( rPos, Size(nGridDX, nGridDY) ); + tools::Rectangle aGridRect( rPos, Size(nGridDX, nGridDY) ); pEntry->aGridRect = aGridRect; Center( pEntry ); AdjustVirtSize( pEntry->aRect ); @@ -2016,7 +2016,7 @@ void SvxIconChoiceCtrl_Impl::ShowCursor( bool bShow ) pView->HideFocus(); return; } - Rectangle aRect ( CalcFocusRect( pCursor ) ); + tools::Rectangle aRect ( CalcFocusRect( pCursor ) ); /*pView->*/ShowFocus( aRect ); } @@ -2036,8 +2036,8 @@ void SvxIconChoiceCtrl_Impl::HideDDIcon() bool SvxIconChoiceCtrl_Impl::HandleScrollCommand( const CommandEvent& rCmd ) { - Rectangle aDocRect( Point(), aVirtOutputSize ); - Rectangle aVisRect( GetOutputRect() ); + tools::Rectangle aDocRect( Point(), aVirtOutputSize ); + tools::Rectangle aVisRect( GetOutputRect() ); if( aVisRect.IsInside( aDocRect )) return false; Size aDocSize( aDocRect.GetSize() ); @@ -2145,7 +2145,7 @@ void SvxIconChoiceCtrl_Impl::ToTop( SvxIconChoiceCtrlEntry* pEntry ) } } -void SvxIconChoiceCtrl_Impl::ClipAtVirtOutRect( Rectangle& rRect ) const +void SvxIconChoiceCtrl_Impl::ClipAtVirtOutRect( tools::Rectangle& rRect ) const { if( rRect.Bottom() >= aVirtOutputSize.Height() ) rRect.Bottom() = aVirtOutputSize.Height() - 1; @@ -2161,14 +2161,14 @@ void SvxIconChoiceCtrl_Impl::ClipAtVirtOutRect( Rectangle& rRect ) const // visible // bScrBar == true: rectangle was calculated because of a scrollbar event -void SvxIconChoiceCtrl_Impl::MakeVisible( const Rectangle& rRect, bool bScrBar ) +void SvxIconChoiceCtrl_Impl::MakeVisible( const tools::Rectangle& rRect, bool bScrBar ) { - Rectangle aVirtRect( rRect ); + tools::Rectangle aVirtRect( rRect ); ClipAtVirtOutRect( aVirtRect ); Point aOrigin( pView->GetMapMode().GetOrigin() ); // convert to document coordinate aOrigin *= -1; - Rectangle aOutputArea( GetOutputRect() ); + tools::Rectangle aOutputArea( GetOutputRect() ); if( aOutputArea.IsInside( aVirtRect ) ) return; // is already visible @@ -2334,16 +2334,16 @@ void SvxIconChoiceCtrl_Impl::SetGrid( const Size& rSize ) // bounding rectangle. In WB_ICON mode with SvxIconChoiceCtrlTextMode::Full, Bottom is set to // LONG_MAX. -Rectangle SvxIconChoiceCtrl_Impl::CalcMaxTextRect( const SvxIconChoiceCtrlEntry* pEntry ) const +tools::Rectangle SvxIconChoiceCtrl_Impl::CalcMaxTextRect( const SvxIconChoiceCtrlEntry* pEntry ) const { - Rectangle aBoundRect; + tools::Rectangle aBoundRect; // avoid infinite recursion: don't calculate the bounding rectangle here if( IsBoundingRectValid( pEntry->aRect ) ) aBoundRect = pEntry->aRect; else aBoundRect = pEntry->aGridRect; - Rectangle aBmpRect( const_cast<SvxIconChoiceCtrl_Impl*>(this)->CalcBmpRect( + tools::Rectangle aBmpRect( const_cast<SvxIconChoiceCtrl_Impl*>(this)->CalcBmpRect( const_cast<SvxIconChoiceCtrlEntry*>(pEntry) ) ); if( nWinBits & WB_ICON ) { @@ -2429,7 +2429,7 @@ void SvxIconChoiceCtrl_Impl::Scroll( long nDeltaX, long nDeltaY ) aOrigin *= -1; aOrigin.Y() += nDeltaY; aOrigin.X() += nDeltaX; - Rectangle aRect( aOrigin, aOutputSize ); + tools::Rectangle aRect( aOrigin, aOutputSize ); MakeVisible( aRect, true/*bScrollBar*/ ); } @@ -2442,19 +2442,19 @@ const Size& SvxIconChoiceCtrl_Impl::GetItemSize( SvxIconChoiceCtrlEntry*, return aImageSize; // IcnViewFieldType::Image } -Rectangle SvxIconChoiceCtrl_Impl::CalcFocusRect( SvxIconChoiceCtrlEntry* pEntry ) +tools::Rectangle SvxIconChoiceCtrl_Impl::CalcFocusRect( SvxIconChoiceCtrlEntry* pEntry ) { - Rectangle aTextRect( CalcTextRect( pEntry ) ); - Rectangle aBoundRect( GetEntryBoundRect( pEntry ) ); - return Rectangle( + tools::Rectangle aTextRect( CalcTextRect( pEntry ) ); + tools::Rectangle aBoundRect( GetEntryBoundRect( pEntry ) ); + return tools::Rectangle( aBoundRect.Left(), aBoundRect.Top() - 1, aBoundRect.Right() - 1, aTextRect.Bottom() + 1); } // the hot spot is the inner 50% of the rectangle -static Rectangle GetHotSpot( const Rectangle& rRect ) +static tools::Rectangle GetHotSpot( const tools::Rectangle& rRect ) { - Rectangle aResult( rRect ); + tools::Rectangle aResult( rRect ); aResult.Justify(); Size aSize( rRect.GetSize() ); long nDelta = aSize.Width() / 4; @@ -2467,16 +2467,16 @@ static Rectangle GetHotSpot( const Rectangle& rRect ) } void SvxIconChoiceCtrl_Impl::SelectRect( SvxIconChoiceCtrlEntry* pEntry1, SvxIconChoiceCtrlEntry* pEntry2, - bool bAdd, std::vector<Rectangle*>* pOtherRects ) + bool bAdd, std::vector<tools::Rectangle*>* pOtherRects ) { DBG_ASSERT(pEntry1 && pEntry2,"SelectEntry: Invalid Entry-Ptr"); - Rectangle aRect( GetEntryBoundRect( pEntry1 ) ); + tools::Rectangle aRect( GetEntryBoundRect( pEntry1 ) ); aRect.Union( GetEntryBoundRect( pEntry2 ) ); SelectRect( aRect, bAdd, pOtherRects ); } -void SvxIconChoiceCtrl_Impl::SelectRect( const Rectangle& rRect, bool bAdd, - std::vector<Rectangle*>* pOtherRects ) +void SvxIconChoiceCtrl_Impl::SelectRect( const tools::Rectangle& rRect, bool bAdd, + std::vector<tools::Rectangle*>* pOtherRects ) { aCurSelectionRect = rRect; if( !pZOrderList || !pZOrderList->size() ) @@ -2490,7 +2490,7 @@ void SvxIconChoiceCtrl_Impl::SelectRect( const Rectangle& rRect, bool bAdd, pView->Update(); const size_t nCount = pZOrderList->size(); - Rectangle aRect( rRect ); + tools::Rectangle aRect( rRect ); aRect.Justify(); bool bCalcOverlap = (bAdd && pOtherRects && !pOtherRects->empty()); @@ -2507,7 +2507,7 @@ void SvxIconChoiceCtrl_Impl::SelectRect( const Rectangle& rRect, bool bAdd, if( !IsBoundingRectValid( pEntry->aRect )) FindBoundingRect( pEntry ); - Rectangle aBoundRect( GetHotSpot( pEntry->aRect ) ); + tools::Rectangle aBoundRect( GetHotSpot( pEntry->aRect ) ); bool bSelected = pEntry->IsSelected(); bool bOverlaps; @@ -2618,12 +2618,12 @@ void SvxIconChoiceCtrl_Impl::SelectRange( } } -bool SvxIconChoiceCtrl_Impl::IsOver( std::vector<Rectangle*>* pRectList, const Rectangle& rBoundRect ) +bool SvxIconChoiceCtrl_Impl::IsOver( std::vector<tools::Rectangle*>* pRectList, const tools::Rectangle& rBoundRect ) { const sal_uInt16 nCount = pRectList->size(); for( sal_uInt16 nCur = 0; nCur < nCount; nCur++ ) { - Rectangle* pRect = (*pRectList)[ nCur ]; + tools::Rectangle* pRect = (*pRectList)[ nCur ]; if( rBoundRect.IsOver( *pRect )) return true; } @@ -2634,14 +2634,14 @@ void SvxIconChoiceCtrl_Impl::AddSelectedRect( SvxIconChoiceCtrlEntry* pEntry1, SvxIconChoiceCtrlEntry* pEntry2 ) { DBG_ASSERT(pEntry1 && pEntry2,"SelectEntry: Invalid Entry-Ptr"); - Rectangle aRect( GetEntryBoundRect( pEntry1 ) ); + tools::Rectangle aRect( GetEntryBoundRect( pEntry1 ) ); aRect.Union( GetEntryBoundRect( pEntry2 ) ); AddSelectedRect( aRect ); } -void SvxIconChoiceCtrl_Impl::AddSelectedRect( const Rectangle& rRect ) +void SvxIconChoiceCtrl_Impl::AddSelectedRect( const tools::Rectangle& rRect ) { - Rectangle* pRect = new Rectangle( rRect ); + tools::Rectangle* pRect = new tools::Rectangle( rRect ); pRect->Justify(); aSelectedRectList.push_back( pRect ); } @@ -2651,7 +2651,7 @@ void SvxIconChoiceCtrl_Impl::ClearSelectedRectList() const sal_uInt16 nCount = aSelectedRectList.size(); for( sal_uInt16 nCur = 0; nCur < nCount; nCur++ ) { - Rectangle* pRect = aSelectedRectList[ nCur ]; + tools::Rectangle* pRect = aSelectedRectList[ nCur ]; delete pRect; } aSelectedRectList.clear(); @@ -2675,7 +2675,7 @@ IMPL_LINK_NOARG(SvxIconChoiceCtrl_Impl, DocRectChangedHdl, Timer *, void) bool SvxIconChoiceCtrl_Impl::IsTextHit( SvxIconChoiceCtrlEntry* pEntry, const Point& rDocPos ) { - Rectangle aRect( CalcTextRect( pEntry )); + tools::Rectangle aRect( CalcTextRect( pEntry )); if( aRect.IsInside( rDocPos ) ) return true; return false; @@ -2719,7 +2719,7 @@ void SvxIconChoiceCtrl_Impl::SetEntryTextMode( SvxIconChoiceCtrlTextMode eMode, // of the background. But what will we see, if the backgroundcolor is gray ? - We will see // a gray focusrect on a gray background !!! -void SvxIconChoiceCtrl_Impl::ShowFocus ( Rectangle& rRect ) +void SvxIconChoiceCtrl_Impl::ShowFocus ( tools::Rectangle& rRect ) { Color aBkgColor(pView->GetBackground().GetColor()); Color aPenColor; @@ -2820,7 +2820,7 @@ void SvxIconChoiceCtrl_Impl::EditEntry( SvxIconChoiceCtrlEntry* pEntry ) pCurEditedEntry = pEntry; OUString aEntryText( SvtIconChoiceCtrl::GetEntryText( pEntry, true ) ); - Rectangle aRect( CalcTextRect( pEntry, nullptr, true, &aEntryText ) ); + tools::Rectangle aRect( CalcTextRect( pEntry, nullptr, true, &aEntryText ) ); MakeVisible( aRect ); Point aPos( aRect.TopLeft() ); aPos = pView->GetPixelPos( aPos ); @@ -3219,7 +3219,7 @@ SvxIconChoiceCtrlEntry* SvxIconChoiceCtrl_Impl::FindEntryPredecessor( SvxIconCho const Point& rPosTopLeft ) { Point aPos( rPosTopLeft ); //TopLeft - Rectangle aCenterRect( CalcBmpRect( pEntry, &aPos )); + tools::Rectangle aCenterRect( CalcBmpRect( pEntry, &aPos )); Point aNewPos( aCenterRect.Center() ); sal_uLong nGrid = GetPredecessorGrid( aNewPos ); size_t nCount = aEntries.size(); @@ -3277,11 +3277,11 @@ bool SvxIconChoiceCtrl_Impl::RequestHelp( const HelpEvent& rHEvt ) OUString sQuickHelpText = pEntry->GetQuickHelpText(); OUString aEntryText( SvtIconChoiceCtrl::GetEntryText( pEntry, false ) ); - Rectangle aTextRect( CalcTextRect( pEntry, nullptr, false, &aEntryText ) ); + tools::Rectangle aTextRect( CalcTextRect( pEntry, nullptr, false, &aEntryText ) ); if ( ( !aTextRect.IsInside( aPos ) || aEntryText.isEmpty() ) && sQuickHelpText.isEmpty() ) return false; - Rectangle aOptTextRect( aTextRect ); + tools::Rectangle aOptTextRect( aTextRect ); aOptTextRect.Bottom() = LONG_MAX; DrawTextFlags nNewFlags = nCurTextDrawFlags; nNewFlags &= ~DrawTextFlags( DrawTextFlags::Clip | DrawTextFlags::EndEllipsis ); @@ -3343,9 +3343,9 @@ const SvxIconChoiceCtrlColumnInfo* SvxIconChoiceCtrl_Impl::GetColumn( sal_uInt16 return it->second.get(); } -void SvxIconChoiceCtrl_Impl::DrawHighlightFrame(vcl::RenderContext& rRenderContext, const Rectangle& rBmpRect) +void SvxIconChoiceCtrl_Impl::DrawHighlightFrame(vcl::RenderContext& rRenderContext, const tools::Rectangle& rBmpRect) { - Rectangle aBmpRect(rBmpRect); + tools::Rectangle aBmpRect(rBmpRect); long nBorder = 2; if (aImageSize.Width() < 32) nBorder = 1; @@ -3374,7 +3374,7 @@ void SvxIconChoiceCtrl_Impl::SetEntryHighlightFrame( SvxIconChoiceCtrlEntry* pEn if (pCurHighlightFrame) { - Rectangle aInvalidationRect(GetEntryBoundRect(pCurHighlightFrame)); + tools::Rectangle aInvalidationRect(GetEntryBoundRect(pCurHighlightFrame)); aInvalidationRect.expand(5); pCurHighlightFrame = nullptr; pView->Invalidate(aInvalidationRect); @@ -3383,7 +3383,7 @@ void SvxIconChoiceCtrl_Impl::SetEntryHighlightFrame( SvxIconChoiceCtrlEntry* pEn pCurHighlightFrame = pEntry; if (pEntry) { - Rectangle aInvalidationRect(GetEntryBoundRect(pEntry)); + tools::Rectangle aInvalidationRect(GetEntryBoundRect(pEntry)); aInvalidationRect.expand(5); pView->Invalidate(aInvalidationRect); } diff --git a/svtools/source/contnr/imivctl2.cxx b/svtools/source/contnr/imivctl2.cxx index 6506974e1e79..8fc65811fe35 100644 --- a/svtools/source/contnr/imivctl2.cxx +++ b/svtools/source/contnr/imivctl2.cxx @@ -44,7 +44,7 @@ sal_uInt16 IcnCursor_Impl::GetSortListPos( SvxIconChoiceCtrlEntryPtrVec& rList, long nPrevValue = LONG_MIN; while( nCount ) { - const Rectangle& rRect = pView->GetEntryBoundRect( rList[nCurPos] ); + const tools::Rectangle& rRect = pView->GetEntryBoundRect( rList[nCurPos] ); long nCurValue; if( bVertical ) nCurValue = rRect.Top(); @@ -74,7 +74,7 @@ void IcnCursor_Impl::ImplCreate() { SvxIconChoiceCtrlEntry* pEntry = pView->aEntries[ nCur ]; // const Rectangle& rRect = pView->GetEntryBoundRect( pEntry ); - Rectangle rRect( pView->CalcBmpRect( pEntry ) ); + tools::Rectangle rRect( pView->CalcBmpRect( pEntry ) ); short nY = (short)( ((rRect.Top()+rRect.Bottom())/2) / nDeltaHeight ); short nX = (short)( ((rRect.Left()+rRect.Right())/2) / nDeltaWidth ); @@ -122,7 +122,7 @@ SvxIconChoiceCtrlEntry* IcnCursor_Impl::SearchCol(sal_uInt16 nCol, sal_uInt16 nT if( !nCount ) return nullptr; - const Rectangle& rRefRect = pView->GetEntryBoundRect(pCurEntry); + const tools::Rectangle& rRefRect = pView->GetEntryBoundRect(pCurEntry); if( bSimple ) { @@ -137,7 +137,7 @@ SvxIconChoiceCtrlEntry* IcnCursor_Impl::SearchCol(sal_uInt16 nCol, sal_uInt16 nT while( ++it != rList.end() ) { SvxIconChoiceCtrlEntry* pEntry = *it; - const Rectangle& rRect = pView->GetEntryBoundRect( pEntry ); + const tools::Rectangle& rRect = pView->GetEntryBoundRect( pEntry ); if( rRect.Top() > rRefRect.Top() ) return pEntry; } @@ -149,7 +149,7 @@ SvxIconChoiceCtrlEntry* IcnCursor_Impl::SearchCol(sal_uInt16 nCol, sal_uInt16 nT while (it2 != rList.rend()) { SvxIconChoiceCtrlEntry* pEntry = *it2; - const Rectangle& rRect = pView->GetEntryBoundRect( pEntry ); + const tools::Rectangle& rRect = pView->GetEntryBoundRect( pEntry ); if( rRect.Top() < rRefRect.Top() ) return pEntry; ++it2; @@ -171,7 +171,7 @@ SvxIconChoiceCtrlEntry* IcnCursor_Impl::SearchCol(sal_uInt16 nCol, sal_uInt16 nT sal_uInt16 nY = pEntry->nY; if( nY >= nTop && nY <= nBottom ) { - const Rectangle& rRect = pView->GetEntryBoundRect( pEntry ); + const tools::Rectangle& rRect = pView->GetEntryBoundRect( pEntry ); long nDistance = rRect.Top() - rRefRect.Top(); if( nDistance < 0 ) nDistance *= -1; @@ -198,7 +198,7 @@ SvxIconChoiceCtrlEntry* IcnCursor_Impl::SearchRow(sal_uInt16 nRow, sal_uInt16 nL if( !nCount ) return nullptr; - const Rectangle& rRefRect = pView->GetEntryBoundRect(pCurEntry); + const tools::Rectangle& rRefRect = pView->GetEntryBoundRect(pCurEntry); if( bSimple ) { @@ -213,7 +213,7 @@ SvxIconChoiceCtrlEntry* IcnCursor_Impl::SearchRow(sal_uInt16 nRow, sal_uInt16 nL while( ++it != rList.end() ) { SvxIconChoiceCtrlEntry* pEntry = *it; - const Rectangle& rRect = pView->GetEntryBoundRect( pEntry ); + const tools::Rectangle& rRect = pView->GetEntryBoundRect( pEntry ); if( rRect.Left() > rRefRect.Left() ) return pEntry; } @@ -225,7 +225,7 @@ SvxIconChoiceCtrlEntry* IcnCursor_Impl::SearchRow(sal_uInt16 nRow, sal_uInt16 nL while (it2 != rList.rend()) { SvxIconChoiceCtrlEntry* pEntry = *it2; - const Rectangle& rRect = pView->GetEntryBoundRect( pEntry ); + const tools::Rectangle& rRect = pView->GetEntryBoundRect( pEntry ); if( rRect.Left() < rRefRect.Left() ) return pEntry; ++it2; @@ -247,7 +247,7 @@ SvxIconChoiceCtrlEntry* IcnCursor_Impl::SearchRow(sal_uInt16 nRow, sal_uInt16 nL sal_uInt16 nX = pEntry->nX; if( nX >= nLeft && nX <= nRight ) { - const Rectangle& rRect = pView->GetEntryBoundRect( pEntry ); + const tools::Rectangle& rRect = pView->GetEntryBoundRect( pEntry ); long nDistance = rRect.Left() - rRefRect.Left(); if( nDistance < 0 ) nDistance *= -1; @@ -606,14 +606,14 @@ GridId IcnGridMap_Impl::GetGrid( const Point& rDocPos ) return nId; } -Rectangle IcnGridMap_Impl::GetGridRect( GridId nId ) +tools::Rectangle IcnGridMap_Impl::GetGridRect( GridId nId ) { Create(); sal_uInt16 nGridX, nGridY; GetGridCoord( nId, nGridX, nGridY ); const long nLeft = nGridX * _pView->nGridDX+ LROFFS_WINBORDER; const long nTop = nGridY * _pView->nGridDY + TBOFFS_WINBORDER; - return Rectangle( + return tools::Rectangle( nLeft, nTop, nLeft + _pView->nGridDX, nTop + _pView->nGridDY ); diff --git a/svtools/source/contnr/ivctrl.cxx b/svtools/source/contnr/ivctrl.cxx index 4d41497c8cd2..41c113867ffd 100644 --- a/svtools/source/contnr/ivctrl.cxx +++ b/svtools/source/contnr/ivctrl.cxx @@ -112,7 +112,7 @@ OUString SvtIconChoiceCtrl::GetEntryText( SvxIconChoiceCtrlEntry* pEntry, bool ) return pEntry->GetText(); } -void SvtIconChoiceCtrl::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) +void SvtIconChoiceCtrl::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) { _pImpl->Paint(rRenderContext, rRect); } @@ -139,7 +139,7 @@ void SvtIconChoiceCtrl::ArrangeIcons() if ( GetStyle() & WB_ALIGN_TOP ) { Size aFullSize; - Rectangle aEntryRect; + tools::Rectangle aEntryRect; for ( sal_Int32 i = 0; i < GetEntryCount(); i++ ) { @@ -154,7 +154,7 @@ void SvtIconChoiceCtrl::ArrangeIcons() else if ( GetStyle() & WB_ALIGN_LEFT ) { Size aFullSize; - Rectangle aEntryRect; + tools::Rectangle aEntryRect; for ( sal_Int32 i = 0; i < GetEntryCount(); i++ ) { @@ -363,13 +363,13 @@ void SvtIconChoiceCtrl::SetBackground( const Wallpaper& rPaper ) } if( aBackground.IsScrollable() ) { - Rectangle aRect; + tools::Rectangle aRect; aRect.SetSize( Size(32765, 32765) ); aBackground.SetRect( aRect ); } else { - Rectangle aRect( _pImpl->GetOutputRect() ); + tools::Rectangle aRect( _pImpl->GetOutputRect() ); aBackground.SetRect( aRect ); } Control::SetBackground( aBackground ); @@ -396,7 +396,7 @@ void SvtIconChoiceCtrl::SetSelectionMode( SelectionMode eMode ) _pImpl->SetSelectionMode( eMode ); } -Rectangle SvtIconChoiceCtrl::GetBoundingBox( SvxIconChoiceCtrlEntry* pEntry ) const +tools::Rectangle SvtIconChoiceCtrl::GetBoundingBox( SvxIconChoiceCtrlEntry* pEntry ) const { return _pImpl->GetEntryBoundRect( pEntry ); } @@ -407,9 +407,9 @@ void SvtIconChoiceCtrl::FillLayoutData() const const_cast<SvtIconChoiceCtrl*>(this)->Invalidate(); } -Rectangle SvtIconChoiceCtrl::GetEntryCharacterBounds( const sal_Int32 _nEntryPos, const sal_Int32 _nCharacterIndex ) const +tools::Rectangle SvtIconChoiceCtrl::GetEntryCharacterBounds( const sal_Int32 _nEntryPos, const sal_Int32 _nCharacterIndex ) const { - Rectangle aRect; + tools::Rectangle aRect; Pair aEntryCharacterRange = GetLineStartEnd( _nEntryPos ); if ( aEntryCharacterRange.A() + _nCharacterIndex < aEntryCharacterRange.B() ) diff --git a/svtools/source/contnr/simptabl.cxx b/svtools/source/contnr/simptabl.cxx index aa1c614a231d..0d910049248f 100644 --- a/svtools/source/contnr/simptabl.cxx +++ b/svtools/source/contnr/simptabl.cxx @@ -192,7 +192,7 @@ void SvSimpleTable::SetTabs() } } -void SvSimpleTable::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) +void SvSimpleTable::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) { SvHeaderTabListBox::Paint(rRenderContext, rRect); @@ -344,7 +344,7 @@ void SvSimpleTable::HBarDrag() HideTracking(); if(!aHeaderBar->IsItemMode()) { - Rectangle aSizeRect(Point(0,0), + tools::Rectangle aSizeRect(Point(0,0), SvHeaderTabListBox::GetOutputSizePixel()); aSizeRect.Left()=-GetXOffset()+aHeaderBar->GetDragPos(); aSizeRect.Right()=-GetXOffset()+aHeaderBar->GetDragPos(); @@ -389,7 +389,7 @@ IMPL_LINK( SvSimpleTable, StartDragHdl, HeaderBar*, pCtr, void) { if(!aHeaderBar->IsItemMode()) { - Rectangle aSizeRect(Point(0,0), + tools::Rectangle aSizeRect(Point(0,0), SvHeaderTabListBox::GetOutputSizePixel()); aSizeRect.Left()=-GetXOffset()+aHeaderBar->GetDragPos(); aSizeRect.Right()=-GetXOffset()+aHeaderBar->GetDragPos(); diff --git a/svtools/source/contnr/svimpbox.cxx b/svtools/source/contnr/svimpbox.cxx index fb3c17827bee..b47fd58440bb 100644 --- a/svtools/source/contnr/svimpbox.cxx +++ b/svtools/source/contnr/svimpbox.cxx @@ -218,7 +218,7 @@ void SvImpLBox::UpdateContextBmpWidthMax( SvTreeListEntry* pEntry ) } } -void SvImpLBox::CalcCellFocusRect( SvTreeListEntry* pEntry, Rectangle& rRect ) +void SvImpLBox::CalcCellFocusRect( SvTreeListEntry* pEntry, tools::Rectangle& rRect ) { if ( pEntry && bIsCellFocusEnabled ) { @@ -359,7 +359,7 @@ void SvImpLBox::CursorDown() ShowCursor( false ); pView->Update(); pStartEntry = pNextFirstToDraw; - Rectangle aArea( GetVisibleArea() ); + tools::Rectangle aArea( GetVisibleArea() ); pView->Scroll( 0, -(pView->GetEntryHeight()), aArea, ScrollFlags::NoChildren ); pView->Update(); ShowCursor( true ); @@ -380,7 +380,7 @@ void SvImpLBox::CursorUp() ShowCursor( false ); pView->Update(); pStartEntry = pPrevFirstToDraw; - Rectangle aArea( GetVisibleArea() ); + tools::Rectangle aArea( GetVisibleArea() ); aArea.Bottom() -= nEntryHeight; pView->Scroll( 0, nEntryHeight, aArea, ScrollFlags::NoChildren ); pView->Update(); @@ -416,7 +416,7 @@ void SvImpLBox::PageDown( sal_uInt16 nDelta ) } else { - Rectangle aArea( GetVisibleArea() ); + tools::Rectangle aArea( GetVisibleArea() ); long nScroll = pView->GetEntryHeight() * static_cast<long>(nRealDelta); nScroll = -nScroll; pView->Update(); @@ -454,7 +454,7 @@ void SvImpLBox::PageUp( sal_uInt16 nDelta ) else { long nEntryHeight = pView->GetEntryHeight(); - Rectangle aArea( GetVisibleArea() ); + tools::Rectangle aArea( GetVisibleArea() ); pView->Update(); pView->Scroll( 0, nEntryHeight*nRealDelta, aArea, ScrollFlags::NoChildren ); pView->Update(); @@ -535,7 +535,7 @@ void SvImpLBox::InvalidateEntriesFrom( long nY ) const { if( !(nFlags & LBoxFlags::InPaint )) { - Rectangle aRect( GetVisibleArea() ); + tools::Rectangle aRect( GetVisibleArea() ); aRect.Top() = nY; pView->Invalidate( aRect ); } @@ -545,7 +545,7 @@ void SvImpLBox::InvalidateEntry( long nY ) const { if( !(nFlags & LBoxFlags::InPaint )) { - Rectangle aRect( GetVisibleArea() ); + tools::Rectangle aRect( GetVisibleArea() ); long nMaxBottom = aRect.Bottom(); aRect.Top() = nY; aRect.Bottom() = nY; aRect.Bottom() += pView->GetEntryHeight(); @@ -587,7 +587,7 @@ void SvImpLBox::RecalcFocusRect() { pView->HideFocus(); long nY = GetEntryLine( pCursor ); - Rectangle aRect = pView->GetFocusRect( pCursor, nY ); + tools::Rectangle aRect = pView->GetFocusRect( pCursor, nY ); CalcCellFocusRect( pCursor, aRect ); vcl::Region aOldClip( pView->GetClipRegion()); vcl::Region aClipRegion( GetClipRegionRect() ); @@ -683,7 +683,7 @@ void SvImpLBox::ShowCursor( bool bShow ) else { long nY = GetEntryLine( pCursor ); - Rectangle aRect = pView->GetFocusRect( pCursor, nY ); + tools::Rectangle aRect = pView->GetFocusRect( pCursor, nY ); CalcCellFocusRect( pCursor, aRect ); vcl::Region aOldClip( pView->GetClipRegion()); vcl::Region aClipRegion( GetClipRegionRect() ); @@ -743,7 +743,7 @@ void SvImpLBox::KeyLeftRight( long nDelta ) if( !(nFlags & LBoxFlags::InResize) ) { - Rectangle aRect( GetVisibleArea() ); + tools::Rectangle aRect( GetVisibleArea() ); pView->Scroll( -nDelta, 0, aRect, ScrollFlags::NoChildren ); } else @@ -785,7 +785,7 @@ bool SvImpLBox::EntryReallyHit(SvTreeListEntry* pEntry, const Point& rPosPixel, if( pEntry->ItemCount() >= 3 ) return true; - Rectangle aRect( pView->GetFocusRect( pEntry, nLine )); + tools::Rectangle aRect( pView->GetFocusRect( pEntry, nLine )); aRect.Right() = GetOutputSize().Width() - pView->GetMapMode().GetOrigin().X(); SvLBoxContextBmp* pBmp = static_cast<SvLBoxContextBmp*>(pEntry->GetFirstItem(SvLBoxItemType::ContextBmp)); @@ -861,17 +861,17 @@ SvTreeListEntry* SvImpLBox::MakePointVisible(const Point& rPoint) return pEntry; } -Rectangle SvImpLBox::GetClipRegionRect() const +tools::Rectangle SvImpLBox::GetClipRegionRect() const { Point aOrigin( pView->GetMapMode().GetOrigin() ); aOrigin.X() *= -1; // conversion document coordinates - Rectangle aClipRect( aOrigin, aOutputSize ); + tools::Rectangle aClipRect( aOrigin, aOutputSize ); aClipRect.Bottom()++; return aClipRect; } -void SvImpLBox::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) +void SvImpLBox::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) { if (!pView->GetVisibleCount()) return; @@ -1031,7 +1031,7 @@ void SvImpLBox::DrawNet(vcl::RenderContext& rRenderContext) ImplControlValue aControlValue; ControlState nState = ControlState::ENABLED; if (rRenderContext.DrawNativeControl(ControlType::ListNet, ControlPart::Entire, - Rectangle(), nState, aControlValue, OUString())) + tools::Rectangle(), nState, aControlValue, OUString())) { return; } @@ -1230,7 +1230,7 @@ void SvImpLBox::AdjustScrollBars( Size& rSize ) // adapt Range, VisibleRange etc. // refresh output size, in case we have to scroll - Rectangle aRect; + tools::Rectangle aRect; aRect.SetSize( aOSize ); aSelEng.SetVisibleArea( aRect ); @@ -3059,11 +3059,11 @@ void SvImpLBox::EndScroll() } -Rectangle SvImpLBox::GetVisibleArea() const +tools::Rectangle SvImpLBox::GetVisibleArea() const { Point aPos( pView->GetMapMode().GetOrigin() ); aPos.X() *= -1; - Rectangle aRect( aPos, aOutputSize ); + tools::Rectangle aRect( aPos, aOutputSize ); return aRect; } @@ -3139,9 +3139,9 @@ bool SvImpLBox::RequestHelp( const HelpEvent& rHEvt ) aSize.Width() = pNextTab->GetPos() - pTab->GetPos(); bItemClipped = true; } - Rectangle aItemRect( aPos, aSize ); + tools::Rectangle aItemRect( aPos, aSize ); - Rectangle aViewRect( GetVisibleArea() ); + tools::Rectangle aViewRect( GetVisibleArea() ); if( bItemClipped || !aViewRect.IsInside( aItemRect ) ) { @@ -3322,7 +3322,7 @@ void SvImpLBox::ShowFocusRect( const SvTreeListEntry* pEntry ) if( pEntry ) { long nY = GetEntryLine( const_cast<SvTreeListEntry*>(pEntry) ); - Rectangle aRect = pView->GetFocusRect( const_cast<SvTreeListEntry*>(pEntry), nY ); + tools::Rectangle aRect = pView->GetFocusRect( const_cast<SvTreeListEntry*>(pEntry), nY ); vcl::Region aOldClip( pView->GetClipRegion()); vcl::Region aClipRegion( GetClipRegionRect() ); pView->SetClipRegion( aClipRegion ); diff --git a/svtools/source/contnr/svlbitm.cxx b/svtools/source/contnr/svlbitm.cxx index 52c0da1fbacc..6b7d4e4b96df 100644 --- a/svtools/source/contnr/svlbitm.cxx +++ b/svtools/source/contnr/svlbitm.cxx @@ -198,7 +198,7 @@ void SvLBoxString::Paint( nStyle |= DrawTextFlags::PathEllipsis | DrawTextFlags::Center; aSize.Width() = rDev.GetEntryWidth(); } - rRenderContext.DrawText(Rectangle(rPos, aSize), maText, nStyle); + rRenderContext.DrawText(tools::Rectangle(rPos, aSize), maText, nStyle); } SvLBoxItem* SvLBoxString::Create() const @@ -301,7 +301,7 @@ void SvLBoxButton::Paint( Size aSize(pData->Width(), pData->Height()); ImplAdjustBoxSize(aSize, eCtrlType, rRenderContext); ImplControlValue aControlValue; - Rectangle aCtrlRegion( rPos, aSize ); + tools::Rectangle aCtrlRegion( rPos, aSize ); ControlState nState = ControlState::NONE; //states ControlState::DEFAULT, ControlState::PRESSED and ControlState::ROLLOVER are not implemented @@ -340,12 +340,12 @@ void SvLBoxButton::ImplAdjustBoxSize(Size& io_rSize, ControlType i_eType, vcl::R if (rRenderContext.IsNativeControlSupported( i_eType, ControlPart::Entire) ) { ImplControlValue aControlValue; - Rectangle aCtrlRegion( Point( 0, 0 ), io_rSize ); + tools::Rectangle aCtrlRegion( Point( 0, 0 ), io_rSize ); ControlState nState = ControlState::ENABLED; aControlValue.setTristateVal( ButtonValue::On ); - Rectangle aNativeBounds, aNativeContent; + tools::Rectangle aNativeBounds, aNativeContent; bool bNativeOK = rRenderContext.GetNativeControlRegion( i_eType, ControlPart::Entire, aCtrlRegion, diff --git a/svtools/source/contnr/svtabbx.cxx b/svtools/source/contnr/svtabbx.cxx index 965fd15c3397..5e3e5e641081 100644 --- a/svtools/source/contnr/svtabbx.cxx +++ b/svtools/source/contnr/svtabbx.cxx @@ -510,7 +510,7 @@ void SvHeaderTabListBox::dispose() SvTabListBox::dispose(); } -void SvHeaderTabListBox::Paint( vcl::RenderContext& rRenderContext, const Rectangle& rRect ) +void SvHeaderTabListBox::Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect ) { if (m_bFirstPaint) { @@ -776,9 +776,9 @@ OUString SvHeaderTabListBox::GetAccessibleCellText( long _nRow, sal_uInt16 _nCol return GetTabEntryText(_nRow, _nColumnPos); } -Rectangle SvHeaderTabListBox::calcHeaderRect( bool _bIsColumnBar, bool _bOnScreen ) +tools::Rectangle SvHeaderTabListBox::calcHeaderRect( bool _bIsColumnBar, bool _bOnScreen ) { - Rectangle aRect; + tools::Rectangle aRect; if ( _bIsColumnBar ) { vcl::Window* pParent = nullptr; @@ -790,36 +790,36 @@ Rectangle SvHeaderTabListBox::calcHeaderRect( bool _bIsColumnBar, bool _bOnScree return aRect; } -Rectangle SvHeaderTabListBox::calcTableRect( bool _bOnScreen ) +tools::Rectangle SvHeaderTabListBox::calcTableRect( bool _bOnScreen ) { vcl::Window* pParent = nullptr; if ( !_bOnScreen ) pParent = GetAccessibleParentWindow(); - Rectangle aRect( GetWindowExtentsRelative( pParent ) ); + tools::Rectangle aRect( GetWindowExtentsRelative( pParent ) ); return aRect; } -Rectangle SvHeaderTabListBox::GetFieldRectPixelAbs( sal_Int32 _nRow, sal_uInt16 _nColumn, bool _bIsHeader, bool _bOnScreen ) +tools::Rectangle SvHeaderTabListBox::GetFieldRectPixelAbs( sal_Int32 _nRow, sal_uInt16 _nColumn, bool _bIsHeader, bool _bOnScreen ) { DBG_ASSERT( !_bIsHeader || 0 == _nRow, "invalid parameters" ); - Rectangle aRect; + tools::Rectangle aRect; SvTreeListEntry* pEntry = GetEntry( _nRow ); if ( pEntry ) { aRect = _bIsHeader ? calcHeaderRect( true, false ) : GetBoundingRect( pEntry ); Point aTopLeft = aRect.TopLeft(); DBG_ASSERT( m_pImpl->m_pHeaderBar->GetItemCount() > _nColumn, "invalid column" ); - Rectangle aItemRect = m_pImpl->m_pHeaderBar->GetItemRect( m_pImpl->m_pHeaderBar->GetItemId( _nColumn ) ); + tools::Rectangle aItemRect = m_pImpl->m_pHeaderBar->GetItemRect( m_pImpl->m_pHeaderBar->GetItemId( _nColumn ) ); aTopLeft.X() = aItemRect.Left(); Size aSize = aItemRect.GetSize(); - aRect = Rectangle( aTopLeft, aSize ); + aRect = tools::Rectangle( aTopLeft, aSize ); vcl::Window* pParent = nullptr; if ( !_bOnScreen ) pParent = GetAccessibleParentWindow(); aTopLeft = aRect.TopLeft(); aTopLeft += GetWindowExtentsRelative( pParent ).TopLeft(); - aRect = Rectangle( aTopLeft, aRect.GetSize() ); + aRect = tools::Rectangle( aTopLeft, aRect.GetSize() ); } return aRect; @@ -1095,7 +1095,7 @@ bool SvHeaderTabListBox::GetGlyphBoundRects( const Point& rOrigin, const OUStrin return Control::GetGlyphBoundRects( rOrigin, rStr, nIndex, nLen, rVector ); } -Rectangle SvHeaderTabListBox::GetWindowExtentsRelative( vcl::Window *pRelativeWindow ) const +tools::Rectangle SvHeaderTabListBox::GetWindowExtentsRelative( vcl::Window *pRelativeWindow ) const { return Control::GetWindowExtentsRelative( pRelativeWindow ); } @@ -1141,9 +1141,9 @@ Reference< XAccessible > SvHeaderTabListBox::CreateAccessible() return xAccessible; } -Rectangle SvHeaderTabListBox::GetFieldCharacterBounds(sal_Int32,sal_Int32,sal_Int32) +tools::Rectangle SvHeaderTabListBox::GetFieldCharacterBounds(sal_Int32,sal_Int32,sal_Int32) { - Rectangle aRect; + tools::Rectangle aRect; return aRect; } diff --git a/svtools/source/contnr/treelistbox.cxx b/svtools/source/contnr/treelistbox.cxx index 2adf1912ae79..564bbcb5733b 100644 --- a/svtools/source/contnr/treelistbox.cxx +++ b/svtools/source/contnr/treelistbox.cxx @@ -883,7 +883,7 @@ void SvTreeListBox::EnableSelectionAsDropTarget( bool bEnable ) // InplaceEditing // ****************************************************************** -void SvTreeListBox::EditText( const OUString& rStr, const Rectangle& rRect, +void SvTreeListBox::EditText( const OUString& rStr, const tools::Rectangle& rRect, const Selection& rSel ) { delete pEdCtrl; @@ -2397,7 +2397,7 @@ void SvTreeListBox::AdjustEntryHeightAndRecalc() RecalcViewData(); } -void SvTreeListBox::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) +void SvTreeListBox::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) { Control::Paint(rRenderContext, rRect); if (nTreeFlags & SvTreeFlags::RECALCTABS) @@ -2410,7 +2410,7 @@ void SvTreeListBox::Paint(vcl::RenderContext& rRenderContext, const Rectangle& r if (HasFocus()) { long nHeight = rRenderContext.GetTextHeight(); - Rectangle aRect(Point(0, 0), Size(GetSizePixel().Width(), nHeight)); + tools::Rectangle aRect(Point(0, 0), Size(GetSizePixel().Width(), nHeight)); ShowFocus(aRect); } else @@ -2538,7 +2538,7 @@ void SvTreeListBox::EditItemText(SvTreeListEntry* pEntry, SvLBoxString* pItem, c Point aOrigin( GetMapMode().GetOrigin() ); aPos += aOrigin; // convert to win coordinates aSize.Width() -= aOrigin.X(); - Rectangle aRect( aPos, aSize ); + tools::Rectangle aRect( aPos, aSize ); EditText( pItem->GetText(), aRect, rSelection ); } @@ -2704,7 +2704,7 @@ void SvTreeListBox::InvalidateEntry(SvTreeListEntry* pEntry) void SvTreeListBox::PaintEntry1(SvTreeListEntry& rEntry, long nLine, vcl::RenderContext& rRenderContext) { - Rectangle aRect; // multi purpose + tools::Rectangle aRect; // multi purpose bool bHorSBar = pImpl->HasHorScrollBar(); PreparePaint(rRenderContext, rEntry); @@ -2959,7 +2959,7 @@ void SvTreeListBox::PaintEntry1(SvTreeListEntry& rEntry, long nLine, vcl::Render if (rRenderContext.IsNativeControlSupported(ControlType::ListNode, ControlPart::Entire)) { ImplControlValue aControlValue; - Rectangle aCtrlRegion(aPos, pImg->GetSizePixel()); + tools::Rectangle aCtrlRegion(aPos, pImg->GetSizePixel()); ControlState nState = ControlState::NONE; if (IsEnabled()) @@ -3000,10 +3000,10 @@ void SvTreeListBox::PreparePaint(vcl::RenderContext& /*rRenderContext*/, SvTreeL { } -Rectangle SvTreeListBox::GetFocusRect( SvTreeListEntry* pEntry, long nLine ) +tools::Rectangle SvTreeListBox::GetFocusRect( SvTreeListEntry* pEntry, long nLine ) { Size aSize; - Rectangle aRect; + tools::Rectangle aRect; aRect.Top() = nLine; aSize.Height() = GetEntryHeight(); @@ -3343,7 +3343,7 @@ void SvTreeListBox::Invalidate( InvalidateFlags nInvalidateFlags ) pImpl->Invalidate(); } -void SvTreeListBox::Invalidate( const Rectangle& rRect, InvalidateFlags nInvalidateFlags ) +void SvTreeListBox::Invalidate( const tools::Rectangle& rRect, InvalidateFlags nInvalidateFlags ) { if( nFocusWidth == -1 ) // to make sure that the control doesn't show the wrong focus rectangle @@ -3668,7 +3668,7 @@ void SvTreeListBox::EnableList( bool _bEnable ) // call base class method Window::Enable(_bEnable); // then invalidate - Invalidate(Rectangle(Point(), GetSizePixel())); + Invalidate(tools::Rectangle(Point(), GetSizePixel())); } css::uno::Reference< XAccessible > SvTreeListBox::CreateAccessible() @@ -3718,10 +3718,10 @@ void SvTreeListBox::FillAccessibleEntryStateSet( SvTreeListEntry* pEntry, ::utl: } } -Rectangle SvTreeListBox::GetBoundingRect( SvTreeListEntry* pEntry ) +tools::Rectangle SvTreeListBox::GetBoundingRect( SvTreeListEntry* pEntry ) { Point aPos = GetEntryPosition( pEntry ); - Rectangle aRect = GetFocusRect( pEntry, aPos.Y() ); + tools::Rectangle aRect = GetFocusRect( pEntry, aPos.Y() ); return aRect; } diff --git a/svtools/source/contnr/viewdataentry.cxx b/svtools/source/contnr/viewdataentry.cxx index 353d891b38d0..53795b414db2 100644 --- a/svtools/source/contnr/viewdataentry.cxx +++ b/svtools/source/contnr/viewdataentry.cxx @@ -89,12 +89,12 @@ SvViewDataItem& SvViewDataEntry::GetItem(size_t nPos) return maItems[nPos]; } -void SvViewDataEntry::SetPaintRectangle(Rectangle aRectangle) +void SvViewDataEntry::SetPaintRectangle(tools::Rectangle aRectangle) { maPaintRectangle = aRectangle; } -const Rectangle& SvViewDataEntry::GetPaintRectangle() const +const tools::Rectangle& SvViewDataEntry::GetPaintRectangle() const { return maPaintRectangle; } diff --git a/svtools/source/control/accessibleruler.cxx b/svtools/source/control/accessibleruler.cxx index e3fd1b0b2041..d41128d48fdb 100644 --- a/svtools/source/control/accessibleruler.cxx +++ b/svtools/source/control/accessibleruler.cxx @@ -78,7 +78,7 @@ sal_Bool SAL_CALL SvtRulerAccessible::containsPoint( const awt::Point& rPoint ) { // no guard -> done in getBounds() // return GetBoundingBox().IsInside( VCLPoint( rPoint ) ); - return Rectangle( Point( 0, 0 ), GetBoundingBox().GetSize() ).IsInside( VCLPoint( rPoint ) ); + return tools::Rectangle( Point( 0, 0 ), GetBoundingBox().GetSize() ).IsInside( VCLPoint( rPoint ) ); } uno::Reference< XAccessible > SAL_CALL SvtRulerAccessible::getAccessibleAtPoint( const awt::Point& ) @@ -340,23 +340,23 @@ void SAL_CALL SvtRulerAccessible::disposing() } } -Rectangle SvtRulerAccessible::GetBoundingBoxOnScreen() +tools::Rectangle SvtRulerAccessible::GetBoundingBoxOnScreen() { SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard( m_aMutex ); ThrowExceptionIfNotAlive(); - return Rectangle( mpRepr->GetParent()->OutputToAbsoluteScreenPixel( mpRepr->GetPosPixel() ), mpRepr->GetSizePixel() ); + return tools::Rectangle( mpRepr->GetParent()->OutputToAbsoluteScreenPixel( mpRepr->GetPosPixel() ), mpRepr->GetSizePixel() ); } -Rectangle SvtRulerAccessible::GetBoundingBox() +tools::Rectangle SvtRulerAccessible::GetBoundingBox() { SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard( m_aMutex ); ThrowExceptionIfNotAlive(); - return Rectangle( mpRepr->GetPosPixel(), mpRepr->GetSizePixel() ); + return tools::Rectangle( mpRepr->GetPosPixel(), mpRepr->GetSizePixel() ); } void SvtRulerAccessible::ThrowExceptionIfNotAlive() diff --git a/svtools/source/control/calendar.cxx b/svtools/source/control/calendar.cxx index edb5663a6e64..0c2528207a2c 100644 --- a/svtools/source/control/calendar.cxx +++ b/svtools/source/control/calendar.cxx @@ -605,7 +605,7 @@ sal_uInt16 Calendar::ImplHitTest( const Point& rPos, Date& rDate ) const namespace { -void ImplDrawSpinArrow(vcl::RenderContext& rRenderContext, const Rectangle& rRect, bool bPrev) +void ImplDrawSpinArrow(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect, bool bPrev) { long i; long n; @@ -620,7 +620,7 @@ void ImplDrawSpinArrow(vcl::RenderContext& rRenderContext, const Rectangle& rRec n--; nLines = n/2; - Rectangle aRect(Point( rRect.Left() + (nWidth / 2) - (nLines / 2), + tools::Rectangle aRect(Point( rRect.Left() + (nWidth / 2) - (nLines / 2), rRect.Top() + (nHeight / 2) ), Size(1, 1)); if (!bPrev) @@ -654,7 +654,7 @@ void Calendar::ImplDrawSpin(vcl::RenderContext& rRenderContext ) { rRenderContext.SetLineColor(); rRenderContext.SetFillColor(rRenderContext.GetSettings().GetStyleSettings().GetButtonTextColor()); - Rectangle aOutRect = maPrevRect; + tools::Rectangle aOutRect = maPrevRect; aOutRect.Left() += 3; aOutRect.Top() += 3; aOutRect.Right() -= 3; @@ -676,7 +676,7 @@ void Calendar::ImplDrawDate(vcl::RenderContext& rRenderContext, { Color* pTextColor = nullptr; const OUString& rDay = maDayTexts[nDay - 1]; - Rectangle aDateRect(nX, nY, nX + mnDayWidth - 1, nY + mnDayHeight - 1); + tools::Rectangle aDateRect(nX, nY, nX + mnDayWidth - 1, nY + mnDayHeight - 1); bool bSel = false; bool bFocus = false; @@ -784,7 +784,7 @@ void Calendar::ImplDraw(vcl::RenderContext& rRenderContext) // display title bar rRenderContext.SetLineColor(); rRenderContext.SetFillColor(rStyleSettings.GetFaceColor()); - Rectangle aTitleRect(0, nY, aOutSize.Width() - 1, nY + mnDayHeight - DAY_OFFY + TITLE_BORDERY * 2); + tools::Rectangle aTitleRect(0, nY, aOutSize.Width() - 1, nY + mnDayHeight - DAY_OFFY + TITLE_BORDERY * 2); rRenderContext.DrawRect(aTitleRect); Point aTopLeft1(aTitleRect.Left(), aTitleRect.Top()); Point aTopLeft2(aTitleRect.Left(), aTitleRect.Top() + 1); @@ -970,7 +970,7 @@ void Calendar::ImplUpdateDate( const Date& rDate ) { if (IsReallyVisible() && IsUpdateMode()) { - Rectangle aDateRect(GetDateRect(rDate)); + tools::Rectangle aDateRect(GetDateRect(rDate)); if (!aDateRect.IsEmpty()) { Invalidate(aDateRect); @@ -1128,7 +1128,7 @@ void Calendar::ImplUpdate( bool bCalcNew ) void Calendar::ImplInvertDropPos() { - Rectangle aRect = GetDateRect( maDropDate );//this is one Pixel to width and one to heigh + tools::Rectangle aRect = GetDateRect( maDropDate );//this is one Pixel to width and one to heigh aRect.Bottom() = aRect.Top()+mnDayHeight-1; aRect.Right() = aRect.Left()+mnDayWidth-1; Invert( aRect ); @@ -1496,7 +1496,7 @@ void Calendar::KeyInput( const KeyEvent& rKEvt ) } } -void Calendar::Paint( vcl::RenderContext& rRenderContext, const Rectangle& ) +void Calendar::Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& ) { ImplDraw(rRenderContext); } @@ -1526,7 +1526,7 @@ void Calendar::RequestHelp( const HelpEvent& rHEvt ) Date aDate = maCurDate; if ( GetDate( ScreenToOutputPixel( rHEvt.GetMousePosPixel() ), aDate ) ) { - Rectangle aDateRect = GetDateRect( aDate ); + tools::Rectangle aDateRect = GetDateRect( aDate ); Point aPt = OutputToScreenPixel( aDateRect.TopLeft() ); aDateRect.Left() = aPt.X(); aDateRect.Top() = aPt.Y(); @@ -1789,9 +1789,9 @@ bool Calendar::GetDate( const Point& rPos, Date& rDate ) const return false; } -Rectangle Calendar::GetDateRect( const Date& rDate ) const +tools::Rectangle Calendar::GetDateRect( const Date& rDate ) const { - Rectangle aRect; + tools::Rectangle aRect; if ( mbFormat || (rDate < maFirstDate) || (rDate > (maFirstDate+mnDayCount)) ) return aRect; @@ -2237,7 +2237,7 @@ bool CalendarField::ShowDropDown( bool bShow ) } pCalendar->SetCurDate( aDate ); Point aPos( GetParent()->OutputToScreenPixel( GetPosPixel() ) ); - Rectangle aRect( aPos, GetSizePixel() ); + tools::Rectangle aRect( aPos, GetSizePixel() ); aRect.Bottom() -= 1; mpCalendar->SetOutputSizePixel( mpCalendar->CalcWindowSizePixel() ); mpFloatWin->SetOutputSizePixel( mpCalendar->GetSizePixel() ); diff --git a/svtools/source/control/ctrlbox.cxx b/svtools/source/control/ctrlbox.cxx index d13af25aee57..5a230f550bf0 100644 --- a/svtools/source/control/ctrlbox.cxx +++ b/svtools/source/control/ctrlbox.cxx @@ -462,7 +462,7 @@ void LineListBox::ImpGetLine( long nLine1, long nLine2, long nDistance, if ( aVirDev->GetOutputSizePixel() != aVirSize ) aVirDev->SetOutputSizePixel( aVirSize ); aVirDev->SetFillColor( aColorDist ); - aVirDev->DrawRect( Rectangle( Point(), aSize ) ); + aVirDev->DrawRect( tools::Rectangle( Point(), aSize ) ); aVirDev->SetFillColor( aColor1 ); @@ -858,7 +858,7 @@ void FontNameBox::ImplCalcUserItemSize() namespace { - long shrinkFontToFit(OUString &rSampleText, long nH, vcl::Font &rFont, OutputDevice &rDevice, Rectangle &rTextRect) + long shrinkFontToFit(OUString &rSampleText, long nH, vcl::Font &rFont, OutputDevice &rDevice, tools::Rectangle &rTextRect) { long nWidth = 0; @@ -910,7 +910,7 @@ void FontNameBox::UserDraw( const UserDrawEvent& rUDEvt ) pRenderContext->SetTextColor(aTextColor); bool bUsingCorrectFont = true; - Rectangle aTextRect; + tools::Rectangle aTextRect; // Preview the font name OUString sFontName = rFontMetric.GetFamilyName(); diff --git a/svtools/source/control/headbar.cxx b/svtools/source/control/headbar.cxx index 3907c9735db5..9f863884de6b 100644 --- a/svtools/source/control/headbar.cxx +++ b/svtools/source/control/headbar.cxx @@ -158,9 +158,9 @@ long HeaderBar::ImplGetItemPos( sal_uInt16 nPos ) const return nX; } -Rectangle HeaderBar::ImplGetItemRect( sal_uInt16 nPos ) const +tools::Rectangle HeaderBar::ImplGetItemRect( sal_uInt16 nPos ) const { - Rectangle aRect( ImplGetItemPos( nPos ), 0, 0, mnDY-1 ); + tools::Rectangle aRect( ImplGetItemPos( nPos ), 0, 0, mnDY-1 ); aRect.Right() = aRect.Left() + (*mpItemList)[ nPos ]->mnSize - 1; // check for overflow on various systems if ( aRect.Right() > 16000 ) @@ -233,11 +233,11 @@ sal_uInt16 HeaderBar::ImplHitTest( const Point& rPos, void HeaderBar::ImplInvertDrag( sal_uInt16 nStartPos, sal_uInt16 nEndPos ) { - Rectangle aRect1 = ImplGetItemRect( nStartPos ); - Rectangle aRect2 = ImplGetItemRect( nEndPos ); + tools::Rectangle aRect1 = ImplGetItemRect( nStartPos ); + tools::Rectangle aRect2 = ImplGetItemRect( nEndPos ); Point aStartPos = aRect1.Center(); Point aEndPos = aStartPos; - Rectangle aStartRect( aStartPos.X()-2, aStartPos.Y()-2, + tools::Rectangle aStartRect( aStartPos.X()-2, aStartPos.Y()-2, aStartPos.X()+2, aStartPos.Y()+2 ); if ( nEndPos > nStartPos ) @@ -278,13 +278,13 @@ void HeaderBar::ImplInvertDrag( sal_uInt16 nStartPos, sal_uInt16 nEndPos ) } void HeaderBar::ImplDrawItem(vcl::RenderContext& rRenderContext, sal_uInt16 nPos, bool bHigh, - const Rectangle& rItemRect, const Rectangle* pRect, DrawFlags ) + const tools::Rectangle& rItemRect, const tools::Rectangle* pRect, DrawFlags ) { ImplControlValue aControlValue(0); - Rectangle aCtrlRegion; + tools::Rectangle aCtrlRegion; ControlState nState(ControlState::NONE); - Rectangle aRect = rItemRect; + tools::Rectangle aRect = rItemRect; // do not display if there is no space if (aRect.GetWidth() <= 1) @@ -555,7 +555,7 @@ void HeaderBar::ImplDrawItem(vcl::RenderContext& rRenderContext, sal_uInt16 nPos { if (rRenderContext.IsNativeControlSupported(ControlType::ListHeader, ControlPart::Arrow)) { - aCtrlRegion = Rectangle(Point(nArrowX, aRect.Top()), Size(nArrowWidth, aRect.GetHeight())); + aCtrlRegion = tools::Rectangle(Point(nArrowX, aRect.Top()), Size(nArrowWidth, aRect.GetHeight())); // control value passes 1 if arrow points down, 0 otherwise aControlValue.setNumericVal((nBits & HeaderBarItemBits::DOWNARROW) ? 1 : 0); nState |= ControlState::ENABLED; @@ -609,9 +609,9 @@ void HeaderBar::ImplDrawItem(vcl::RenderContext& rRenderContext, sal_uInt16 nPos } void HeaderBar::ImplDrawItem(vcl::RenderContext& rRenderContext, sal_uInt16 nPos, - bool bHigh, const Rectangle* pRect ) + bool bHigh, const tools::Rectangle* pRect ) { - Rectangle aRect = ImplGetItemRect(nPos); + tools::Rectangle aRect = ImplGetItemRect(nPos); ImplDrawItem(rRenderContext, nPos, bHigh, aRect, pRect, DrawFlags::NONE ); } @@ -619,7 +619,7 @@ void HeaderBar::ImplUpdate(sal_uInt16 nPos, bool bEnd) { if (IsVisible() && IsUpdateMode()) { - Rectangle aRect; + tools::Rectangle aRect; size_t nItemCount = mpItemList->size(); if (nPos < nItemCount) aRect = ImplGetItemRect(nPos); @@ -689,7 +689,7 @@ void HeaderBar::ImplStartDrag( const Point& rMousePos, bool bCommand ) Invalidate(); else { - Rectangle aSizeRect( mnDragPos, 0, mnDragPos, mnDragSize+mnDY ); + tools::Rectangle aSizeRect( mnDragPos, 0, mnDragPos, mnDragSize+mnDY ); ShowTracking( aSizeRect, ShowTrackFlags::Split ); } } @@ -707,7 +707,7 @@ void HeaderBar::ImplDrag( const Point& rMousePos ) { bool bNewOutDrag; - Rectangle aItemRect = ImplGetItemRect( nPos ); + tools::Rectangle aItemRect = ImplGetItemRect( nPos ); if ( aItemRect.IsInside( rMousePos ) ) bNewOutDrag = false; else @@ -789,14 +789,14 @@ void HeaderBar::ImplDrag( const Point& rMousePos ) } else { - Rectangle aItemRect = ImplGetItemRect( nPos ); + tools::Rectangle aItemRect = ImplGetItemRect( nPos ); if ( mnDragPos < aItemRect.Left() ) mnDragPos = aItemRect.Left(); if ( (mnDragPos < 0) || (mnDragPos > mnDX-1) ) HideTracking(); else { - Rectangle aSizeRect( mnDragPos, 0, mnDragPos, mnDragSize+mnDY ); + tools::Rectangle aSizeRect( mnDragPos, 0, mnDragPos, mnDragSize+mnDY ); ShowTracking( aSizeRect, ShowTrackFlags::Split ); } } @@ -912,7 +912,7 @@ void HeaderBar::Tracking( const TrackingEvent& rTEvt ) ImplDrag( aMousePos ); } -void HeaderBar::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) +void HeaderBar::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) { if (mnBorderOff1 || mnBorderOff2) { @@ -944,7 +944,7 @@ void HeaderBar::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(); @@ -975,7 +975,7 @@ void HeaderBar::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, } } - Rectangle aItemRect( aRect ); + tools::Rectangle aItemRect( aRect ); size_t nItemCount = mpItemList->size(); for ( size_t i = 0; i < nItemCount; i++ ) { @@ -1020,7 +1020,7 @@ void HeaderBar::RequestHelp( const HelpEvent& rHEvt ) { if ( rHEvt.GetMode() & (HelpEventMode::QUICK | HelpEventMode::BALLOON) ) { - Rectangle aItemRect = GetItemRect( nItemId ); + tools::Rectangle aItemRect = GetItemRect( nItemId ); Point aPt = OutputToScreenPixel( aItemRect.TopLeft() ); aItemRect.Left() = aPt.X(); aItemRect.Top() = aPt.Y(); @@ -1193,7 +1193,7 @@ void HeaderBar::Clear() void HeaderBar::SetOffset( long nNewOffset ) { // move area - Rectangle aRect( 0, mnBorderOff1, mnDX-1, mnDY-mnBorderOff1-mnBorderOff2-1 ); + tools::Rectangle aRect( 0, mnBorderOff1, mnDX-1, mnDY-mnBorderOff1-mnBorderOff2-1 ); long nDelta = mnOffset-nNewOffset; mnOffset = nNewOffset; Scroll( nDelta, 0, aRect ); @@ -1233,9 +1233,9 @@ sal_uInt16 HeaderBar::GetItemId( const Point& rPos ) const return 0; } -Rectangle HeaderBar::GetItemRect( sal_uInt16 nItemId ) const +tools::Rectangle HeaderBar::GetItemRect( sal_uInt16 nItemId ) const { - Rectangle aRect; + tools::Rectangle aRect; sal_uInt16 nPos = GetItemPos( nItemId ); if ( nPos != HEADERBAR_ITEM_NOTFOUND ) aRect = ImplGetItemRect( nPos ); diff --git a/svtools/source/control/hyperlabel.cxx b/svtools/source/control/hyperlabel.cxx index 9fb08798d6bc..ecf89817a862 100644 --- a/svtools/source/control/hyperlabel.cxx +++ b/svtools/source/control/hyperlabel.cxx @@ -142,7 +142,7 @@ namespace svt if ( IsEnabled() && m_pImpl->bInteractive ) { Point aPoint(0,0); - Rectangle rRect(aPoint, Size( m_pImpl->m_aMinSize.Width(), GetSizePixel().Height() ) ); + tools::Rectangle rRect(aPoint, Size( m_pImpl->m_aMinSize.Width(), GetSizePixel().Height() ) ); ShowFocus( rRect ); } } diff --git a/svtools/source/control/roadmap.cxx b/svtools/source/control/roadmap.cxx index 2d5fcbf7bdd0..fcc03d131fb4 100644 --- a/svtools/source/control/roadmap.cxx +++ b/svtools/source/control/roadmap.cxx @@ -546,7 +546,7 @@ bool ORoadmap::SelectRoadmapItemByID( ItemId _nNewID ) return false; } -void ORoadmap::Paint(vcl::RenderContext& rRenderContext, const Rectangle& _rRect) +void ORoadmap::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& _rRect) { if (!m_pImpl->m_bPaintInitialized) implInit(rRenderContext); @@ -575,7 +575,7 @@ void ORoadmap::DrawHeadline(vcl::RenderContext& rRenderContext) Size aOutputSize(GetOutputSizePixel()); // draw it - rRenderContext.DrawText(Rectangle(aTextPos, aOutputSize), GetText(), + rRenderContext.DrawText(tools::Rectangle(aTextPos, aOutputSize), GetText(), DrawTextFlags::Left | DrawTextFlags::Top | DrawTextFlags::MultiLine | DrawTextFlags::WordBreak); rRenderContext.DrawTextLine(aTextPos, aOutputSize.Width(), STRIKEOUT_NONE, LINESTYLE_SINGLE, LINESTYLE_NONE); const StyleSettings& rStyleSettings = rRenderContext.GetSettings().GetStyleSettings(); diff --git a/svtools/source/control/ruler.cxx b/svtools/source/control/ruler.cxx index 81e0bf46863f..ce1e4329ac11 100644 --- a/svtools/source/control/ruler.cxx +++ b/svtools/source/control/ruler.cxx @@ -268,7 +268,7 @@ void Ruler::ImplInit( WinBits nWinBits ) ImplInitSettings( true, true, true ); // Setup the default size - Rectangle aRect; + tools::Rectangle aRect; GetTextBoundRect( aRect, "0123456789" ); long nDefHeight = aRect.GetHeight() + RULER_OFF * 2 + ruler_tab.textoff * 2 + mnBorderWidth; @@ -372,14 +372,14 @@ void Ruler::ImplVDrawRect(vcl::RenderContext& rRenderContext, long nX1, long nY1 } if ( mnWinStyle & WB_HORZ ) - rRenderContext.DrawRect(Rectangle(nX1, nY1, nX2, nY2)); + rRenderContext.DrawRect(tools::Rectangle(nX1, nY1, nX2, nY2)); else - rRenderContext.DrawRect(Rectangle(nY1, nX1, nY2, nX2)); + rRenderContext.DrawRect(tools::Rectangle(nY1, nX1, nY2, nX2)); } void Ruler::ImplVDrawText(vcl::RenderContext& rRenderContext, long nX, long nY, const OUString& rText, long nMin, long nMax) { - Rectangle aRect; + tools::Rectangle aRect; rRenderContext.GetTextBoundRect(aRect, rText); long nShiftX = ( aRect.GetWidth() / 2 ) + aRect.Left(); @@ -405,7 +405,7 @@ void Ruler::ImplInvertLines(vcl::RenderContext& rRenderContext) long nY = (RULER_OFF * 2) + mnVirHeight - 1; // Calculate rectangle - Rectangle aRect; + tools::Rectangle aRect; if (mnWinStyle & WB_HORZ) aRect.Bottom() = nY; else @@ -427,7 +427,7 @@ void Ruler::ImplInvertLines(vcl::RenderContext& rRenderContext) aRect.Top() = n; aRect.Bottom() = n; } - Rectangle aTempRect = aRect; + tools::Rectangle aTempRect = aRect; if (mnWinStyle & WB_HORZ) aTempRect.Bottom() = RULER_OFF - 1; @@ -868,11 +868,11 @@ static void ImplCenterTabPos(Point& rPos, sal_uInt16 nTabStyle) } } -static void lcl_RotateRect_Impl(Rectangle& rRect, const long nReference, bool bRightAligned) +static void lcl_RotateRect_Impl(tools::Rectangle& rRect, const long nReference, bool bRightAligned) { if (!rRect.IsEmpty()) { - Rectangle aTmp(rRect); + tools::Rectangle aTmp(rRect); rRect.Top() = aTmp.Left(); rRect.Bottom() = aTmp.Right(); rRect.Left() = aTmp.Top(); @@ -901,9 +901,9 @@ static void ImplDrawRulerTab(vcl::RenderContext& rRenderContext, const Point& rP // drawn become asymmetric due to the +1 offsets sal_uInt16 DPIOffset = rRenderContext.GetDPIScaleFactor() - 1; - Rectangle aRect1; - Rectangle aRect2; - Rectangle aRect3; + tools::Rectangle aRect1; + tools::Rectangle aRect2; + tools::Rectangle aRect3; aRect3.SetEmpty(); @@ -1377,7 +1377,7 @@ void Ruler::ImplDraw(vcl::RenderContext& rRenderContext) void Ruler::ImplDrawExtra(vcl::RenderContext& rRenderContext) { const StyleSettings& rStyleSettings = rRenderContext.GetSettings().GetStyleSettings(); - Rectangle aRect = maExtraRect; + tools::Rectangle aRect = maExtraRect; bool bEraseRect = false; aRect.Left() += 2; @@ -1510,7 +1510,7 @@ bool Ruler::ImplHitTest( const Point& rPos, RulerSelection* pHitTest, pHitTest->eType = RulerType::DontKnow; // first test the tabs - Rectangle aRect; + tools::Rectangle aRect; if ( !mpData->pTabs.empty() ) { aRect.Bottom() = nHitBottom; @@ -2096,7 +2096,7 @@ void Ruler::Tracking( const TrackingEvent& rTEvt ) ImplDrag( rTEvt.GetMouseEvent().GetPosPixel() ); } -void Ruler::Paint(vcl::RenderContext& rRenderContext, const Rectangle&) +void Ruler::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&) { ImplDraw(rRenderContext); @@ -2159,7 +2159,7 @@ void Ruler::Resize() else if ( mpData->bAutoPageWidth ) { // only at AutoPageWidth muss we redraw - Rectangle aRect; + tools::Rectangle aRect; if ( mnWinStyle & WB_HORZ ) { diff --git a/svtools/source/control/scrwin.cxx b/svtools/source/control/scrwin.cxx index 84ad86e9ff77..7f875a0784cc 100644 --- a/svtools/source/control/scrwin.cxx +++ b/svtools/source/control/scrwin.cxx @@ -350,7 +350,7 @@ void ScrollableWindow::Scroll( long nDeltaX, long nDeltaY, ScrollFlags ) // never scroll the scrollbars itself! Window::Scroll(-nDeltaX, -nDeltaY, - PixelToLogic( Rectangle( Point(0, 0), aOutPixSz ) ) ); + PixelToLogic( tools::Rectangle( Point(0, 0), aOutPixSz ) ) ); } else { diff --git a/svtools/source/control/tabbar.cxx b/svtools/source/control/tabbar.cxx index 3a40a07c1e48..259036550741 100644 --- a/svtools/source/control/tabbar.cxx +++ b/svtools/source/control/tabbar.cxx @@ -53,7 +53,7 @@ private: vcl::RenderContext& mrRenderContext; const StyleSettings& mrStyleSettings; - Rectangle maRect; + tools::Rectangle maRect; Color maSelectedColor; Color maCustomColor; @@ -82,7 +82,7 @@ public: if ((nWinStyle & WB_BORDER) || (nWinStyle & WB_TOPBORDER)) { Size aOutputSize(mrParent.GetOutputSizePixel()); - Rectangle aOutRect = mrParent.GetPageArea(); + tools::Rectangle aOutRect = mrParent.GetPageArea(); // also draw border in 3D for 3D-tabs if (nWinStyle & WB_3DTAB) @@ -121,7 +121,7 @@ public: void drawText(const OUString& aText) { - Rectangle aRect = maRect; + tools::Rectangle aRect = maRect; long nTextWidth = mrRenderContext.GetTextWidth(aText); long nTextHeight = mrRenderContext.GetTextHeight(); Point aPos = aRect.TopLeft(); @@ -139,7 +139,7 @@ public: Point aTopLeft = maRect.TopLeft() + Point(1, 0); Point aTopRight = maRect.TopRight() + Point(-1, 0); - Rectangle aDelRect(aTopLeft, aTopRight); + tools::Rectangle aDelRect(aTopLeft, aTopRight); mrRenderContext.DrawRect(aDelRect); } @@ -148,7 +148,7 @@ public: mrRenderContext.SetFillColor(maCustomColor); mrRenderContext.SetLineColor(maCustomColor); - Rectangle aLineRect(maRect.BottomLeft(), maRect.BottomRight()); + tools::Rectangle aLineRect(maRect.BottomLeft(), maRect.BottomRight()); aLineRect.Top() -= 3; mrRenderContext.DrawRect(aLineRect); @@ -164,7 +164,7 @@ public: } } - void setRect(const Rectangle& rRect) + void setRect(const tools::Rectangle& rRect) { maRect = rRect; } @@ -208,7 +208,7 @@ struct ImplTabBarItem TabBarPageBits mnBits; OUString maText; OUString maHelpText; - Rectangle maRect; + tools::Rectangle maRect; long mnWidth; OString maHelpId; bool mbShort : 1; @@ -313,7 +313,7 @@ private: virtual void MouseButtonDown( const MouseEvent& rMEvt ) override; virtual void Tracking( const TrackingEvent& rTEvt ) override; - virtual void Paint( vcl::RenderContext& /*rRenderContext*/, const Rectangle& rRect ) override; + virtual void Paint( vcl::RenderContext& /*rRenderContext*/, const tools::Rectangle& rRect ) override; Point maStartPos; long mnStartWidth; @@ -366,10 +366,10 @@ void ImplTabSizer::Tracking( const TrackingEvent& rTEvt ) ImplTrack( OutputToScreenPixel( rTEvt.GetMouseEvent().GetPosPixel() ) ); } -void ImplTabSizer::Paint( vcl::RenderContext& rRenderContext, const Rectangle& ) +void ImplTabSizer::Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& ) { DecorationView aDecoView(&rRenderContext); - Rectangle aOutputRect(Point(0, 0), GetOutputSizePixel()); + tools::Rectangle aOutputRect(Point(0, 0), GetOutputSizePixel()); aDecoView.DrawHandle(aOutputRect); } @@ -1143,7 +1143,7 @@ void TabBar::MouseButtonUp(const MouseEvent& rMEvt) Window::MouseButtonUp(rMEvt); } -void TabBar::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rect) +void TabBar::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rect) { if (rRenderContext.IsNativeControlSupported(ControlType::WindowBackground,ControlPart::Entire)) { @@ -1196,7 +1196,7 @@ void TabBar::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rect) if (!pItem->maRect.IsEmpty()) { - Rectangle aRect = pItem->maRect; + tools::Rectangle aRect = pItem->maRect; bool bSelected = pItem->IsSelected(pCurItem); // We disable custom background color in high contrast mode. bool bCustomBgColor = !pItem->IsDefaultTabBgColor() && !rStyleSettings.GetHighContrastMode(); @@ -1384,7 +1384,7 @@ void TabBar::RequestHelp(const HelpEvent& rHEvt) OUString aStr = GetHelpText(nItemId); if (!aStr.isEmpty()) { - Rectangle aItemRect = GetPageRect(nItemId); + tools::Rectangle aItemRect = GetPageRect(nItemId); Point aPt = OutputToScreenPixel(aItemRect.TopLeft()); aItemRect.Left() = aPt.X(); aItemRect.Top() = aPt.Y(); @@ -1416,7 +1416,7 @@ void TabBar::RequestHelp(const HelpEvent& rHEvt) ImplTabBarItem* pItem = mpImpl->mpItemList[nPos]; if (pItem->mbShort || (pItem->maRect.Right() - 5 > mnLastOffX)) { - Rectangle aItemRect = GetPageRect(nItemId); + tools::Rectangle aItemRect = GetPageRect(nItemId); Point aPt = OutputToScreenPixel(aItemRect.TopLeft()); aItemRect.Left() = aPt.X(); aItemRect.Top() = aPt.Y(); @@ -1845,14 +1845,14 @@ sal_uInt16 TabBar::GetPageId(const Point& rPos) const return 0; } -Rectangle TabBar::GetPageRect(sal_uInt16 nPageId) const +tools::Rectangle TabBar::GetPageRect(sal_uInt16 nPageId) const { sal_uInt16 nPos = GetPagePos(nPageId); if (nPos != PAGE_NOT_FOUND) return mpImpl->mpItemList[nPos]->maRect; else - return Rectangle(); + return tools::Rectangle(); } void TabBar::SetCurPageId(sal_uInt16 nPageId) @@ -2069,7 +2069,7 @@ bool TabBar::StartEditMode(sal_uInt16 nPageId) Update(); mpImpl->mpEdit.disposeAndReset(VclPtr<TabBarEdit>::Create(this, WB_CENTER)); - Rectangle aRect = GetPageRect( mnEditId ); + tools::Rectangle aRect = GetPageRect( mnEditId ); long nX = aRect.Left(); long nWidth = aRect.GetWidth(); if (mnEditId != GetCurPageId()) @@ -2361,7 +2361,7 @@ sal_uInt16 TabBar::ShowDropPos(const Point& rPos) // draw immediately, as Paint not possible during Drag and Drop if (nOldFirstPos != mnFirstPos) { - Rectangle aRect(mnOffX, 0, mnLastOffX, maWinSize.Height()); + tools::Rectangle aRect(mnOffX, 0, mnLastOffX, maWinSize.Height()); SetFillColor(GetBackground().GetColor()); DrawRect(aRect); Invalidate(aRect); @@ -2439,7 +2439,7 @@ void TabBar::HideDropPos() pItem = mpImpl->mpItemList[mnDropPos]; nX = pItem->maRect.Left(); // immediately call Paint, as it is not possible during drag and drop - Rectangle aRect( nX-1, nY1, nX+3, nY2 ); + tools::Rectangle aRect( nX-1, nY1, nX+3, nY2 ); vcl::Region aRegion( aRect ); SetClipRegion( aRegion ); Invalidate(aRect); @@ -2450,7 +2450,7 @@ void TabBar::HideDropPos() pItem = mpImpl->mpItemList[mnDropPos - 1]; nX = pItem->maRect.Right(); // immediately call Paint, as it is not possible during drag and drop - Rectangle aRect(nX - 2, nY1, nX + 1, nY2); + tools::Rectangle aRect(nX - 2, nY1, nX + 1, nY2); vcl::Region aRegion(aRect); SetClipRegion(aRegion); Invalidate(aRect); @@ -2527,9 +2527,9 @@ Size TabBar::CalcWindowSizePixel() const return Size(nWidth, GetSettings().GetStyleSettings().GetScrollBarSize()); } -Rectangle TabBar::GetPageArea() const +tools::Rectangle TabBar::GetPageArea() const { - return Rectangle(Point(mnOffX, mnOffY), + return tools::Rectangle(Point(mnOffX, mnOffY), Size(mnLastOffX - mnOffX + 1, GetSizePixel().Height() - mnOffY)); } diff --git a/svtools/source/control/toolbarmenu.cxx b/svtools/source/control/toolbarmenu.cxx index 44d68b3497bd..160df55c8251 100644 --- a/svtools/source/control/toolbarmenu.cxx +++ b/svtools/source/control/toolbarmenu.cxx @@ -517,10 +517,10 @@ static long ImplGetNativeCheckAndRadioSize(vcl::RenderContext& rRenderContext, l rMaxWidth = rCheckHeight = rRadioHeight = 0; 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 (rRenderContext.IsNativeControlSupported(ControlType::MenuPopup, ControlPart::MenuItemCheckMark)) { if (rRenderContext.GetNativeControlRegion(ControlType::MenuPopup, ControlPart::MenuItemCheckMark, @@ -648,11 +648,11 @@ Size ToolbarMenu::implCalcSize() pEntry->mpControl->SetPosPixel( aControlPos ); - pEntry->maRect = Rectangle( aControlPos, aControlSize ); + pEntry->maRect = tools::Rectangle( aControlPos, aControlSize ); } else { - pEntry->maRect = Rectangle( Point( 0, nY ), pEntry->maSize ); + pEntry->maRect = tools::Rectangle( Point( 0, nY ), pEntry->maSize ); } nY += pEntry->maSize.Height(); @@ -774,7 +774,7 @@ void ToolbarMenu::implHighlightEntry(vcl::RenderContext& rRenderContext, int nHi Color oldLineColor; bool bDrawItemRect = true; - Rectangle aItemRect(Point(nX, nY), Size(aSz.Width(), pEntry->maSize.Height())); + tools::Rectangle aItemRect(Point(nX, nY), Size(aSz.Width(), pEntry->maSize.Height())); if (pEntry->mnBits & MenuItemBits::POPUPSELECT) { long nFontHeight = GetTextHeight(); @@ -785,8 +785,8 @@ void ToolbarMenu::implHighlightEntry(vcl::RenderContext& rRenderContext, int nHi { Size aPxSize(GetOutputSizePixel()); rRenderContext.Push(PushFlags::CLIPREGION); - rRenderContext.IntersectClipRegion(Rectangle(Point(nX, nY), Size(aSz.Width(), pEntry->maSize.Height()))); - Rectangle aCtrlRect(Point(nX, 0), Size(aPxSize.Width() - nX, aPxSize.Height())); + rRenderContext.IntersectClipRegion(tools::Rectangle(Point(nX, nY), Size(aSz.Width(), pEntry->maSize.Height()))); + tools::Rectangle aCtrlRect(Point(nX, 0), Size(aPxSize.Width() - nX, aPxSize.Height())); rRenderContext.DrawNativeControl(ControlType::MenuPopup, ControlPart::Entire, aCtrlRect, ControlState::ENABLED, ImplControlValue(), OUString()); if (rRenderContext.IsNativeControlSupported(ControlType::MenuPopup, ControlPart::MenuItem)) @@ -1135,7 +1135,7 @@ void ToolbarMenu::KeyInput( const KeyEvent& rKEvent ) } -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)) @@ -1214,7 +1214,7 @@ void ToolbarMenu::implPaint(vcl::RenderContext& rRenderContext, ToolbarMenuEntry nImageStyle |= DrawImageFlags::Disable; } - Rectangle aOuterCheckRect(Point(aPos.X() + mpImpl->mnCheckPos, aPos.Y()), + tools::Rectangle aOuterCheckRect(Point(aPos.X() + mpImpl->mnCheckPos, aPos.Y()), Size(pEntry->maSize.Height(), pEntry->maSize.Height())); aOuterCheckRect.Left() += 1; aOuterCheckRect.Right() -= 1; @@ -1224,7 +1224,7 @@ void ToolbarMenu::implPaint(vcl::RenderContext& rRenderContext, ToolbarMenuEntry if (bTitle) { // fill the background - Rectangle aRect(aTopLeft, Size(aOutSz.Width(), pEntry->maSize.Height())); + tools::Rectangle aRect(aTopLeft, Size(aOutSz.Width(), pEntry->maSize.Height())); rRenderContext.SetFillColor(rSettings.GetDialogColor()); rRenderContext.SetLineColor(); rRenderContext.DrawRect(aRect); @@ -1269,7 +1269,7 @@ void ToolbarMenu::implPaint(vcl::RenderContext& rRenderContext, ToolbarMenuEntry 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)); rRenderContext.DrawNativeControl(ControlType::MenuPopup, nPart, aCheckRect, nState, ImplControlValue(), OUString()); aPos.setX(aPos.getX() + nCtrlHeight + gfxExtra); @@ -1292,7 +1292,7 @@ void ToolbarMenu::implPaint(vcl::RenderContext& rRenderContext, ToolbarMenuEntry } 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, GetTextColor(), nSymbolStyle); aPos.setX(aPos.getX() + aSymbolSize.getWidth( ) + gfxExtra); } @@ -1334,7 +1334,7 @@ void ToolbarMenu::implPaint(vcl::RenderContext& rRenderContext, ToolbarMenuEntry } } -void ToolbarMenu::Paint(vcl::RenderContext& rRenderContext, const Rectangle&) +void ToolbarMenu::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&) { rRenderContext.SetFillColor(rRenderContext.GetSettings().GetStyleSettings().GetMenuColor()); diff --git a/svtools/source/control/toolbarmenuacc.cxx b/svtools/source/control/toolbarmenuacc.cxx index 410b67e373bb..233ffddff37f 100644 --- a/svtools/source/control/toolbarmenuacc.cxx +++ b/svtools/source/control/toolbarmenuacc.cxx @@ -313,7 +313,7 @@ sal_Bool SAL_CALL ToolbarMenuAcc::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 ); } @@ -756,7 +756,7 @@ sal_Bool SAL_CALL ToolbarMenuEntryAcc::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 ); } @@ -774,9 +774,9 @@ awt::Rectangle SAL_CALL ToolbarMenuEntryAcc::getBounds() if( mpParent ) { - Rectangle aRect( mpParent->maRect ); + tools::Rectangle aRect( mpParent->maRect ); Point aOrigin; - Rectangle aParentRect( aOrigin, mpParent->mrMenu.GetOutputSizePixel() ); + tools::Rectangle aParentRect( aOrigin, mpParent->mrMenu.GetOutputSizePixel() ); aRect.Intersection( aParentRect ); diff --git a/svtools/source/control/toolbarmenuimp.hxx b/svtools/source/control/toolbarmenuimp.hxx index 776dd5548886..0d7bd9f7272e 100644 --- a/svtools/source/control/toolbarmenuimp.hxx +++ b/svtools/source/control/toolbarmenuimp.hxx @@ -72,7 +72,7 @@ public: OUString maText; Image maImage; VclPtr<Control> mpControl; - Rectangle maRect; + tools::Rectangle maRect; css::uno::Reference< css::accessibility::XAccessibleContext > mxAccContext; diff --git a/svtools/source/control/valueacc.cxx b/svtools/source/control/valueacc.cxx index 24991ab1c3c9..8610c3b7f641 100644 --- a/svtools/source/control/valueacc.cxx +++ b/svtools/source/control/valueacc.cxx @@ -383,7 +383,7 @@ sal_Bool SAL_CALL ValueSetAcc::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 ); } @@ -954,7 +954,7 @@ sal_Bool SAL_CALL ValueItemAcc::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 ValueItemAcc::getAccessibleAtPoint( const awt::Point& ) @@ -970,9 +970,9 @@ awt::Rectangle SAL_CALL ValueItemAcc::getBounds() if( mpParent ) { - Rectangle aRect( mpParent->mrParent.GetItemRect(mpParent->mnId) ); + tools::Rectangle aRect( mpParent->mrParent.GetItemRect(mpParent->mnId) ); Point aOrigin; - Rectangle aParentRect( aOrigin, mpParent->mrParent.GetOutputSizePixel() ); + tools::Rectangle aParentRect( aOrigin, mpParent->mrParent.GetOutputSizePixel() ); aRect.Intersection( aParentRect ); diff --git a/svtools/source/control/valueset.cxx b/svtools/source/control/valueset.cxx index 7db07e38d959..ee1ddad8ffd5 100644 --- a/svtools/source/control/valueset.cxx +++ b/svtools/source/control/valueset.cxx @@ -202,7 +202,7 @@ void ValueSet::ImplInitScrollBar() } } -void ValueSet::ImplFormatItem(vcl::RenderContext& rRenderContext, ValueSetItem* pItem, Rectangle aRect) +void ValueSet::ImplFormatItem(vcl::RenderContext& rRenderContext, ValueSetItem* pItem, tools::Rectangle aRect) { WinBits nStyle = GetStyle(); if (nStyle & WB_ITEMBORDER) @@ -635,7 +635,7 @@ void ValueSet::Format(vcl::RenderContext& rRenderContext) } pItem->mbVisible = true; - ImplFormatItem(rRenderContext, pItem, Rectangle(Point(x, y), Size(mnItemWidth, mnItemHeight))); + ImplFormatItem(rRenderContext, pItem, tools::Rectangle(Point(x, y), Size(mnItemWidth, mnItemHeight))); if (!((i + 1) % mnCols)) { @@ -704,13 +704,13 @@ void ValueSet::ImplDrawItemText(vcl::RenderContext& rRenderContext, const OUStri const StyleSettings& rStyleSettings = rRenderContext.GetSettings().GetStyleSettings(); rRenderContext.SetLineColor(); rRenderContext.SetFillColor(rStyleSettings.GetFaceColor()); - rRenderContext.DrawRect(Rectangle(Point(0, nTxtOffset), Point(aWinSize.Width(), aWinSize.Height()))); + rRenderContext.DrawRect(tools::Rectangle(Point(0, nTxtOffset), Point(aWinSize.Width(), aWinSize.Height()))); rRenderContext.SetTextColor(rStyleSettings.GetButtonTextColor()); } else { nTxtOffset += NAME_LINE_HEIGHT+NAME_LINE_OFF_Y; - rRenderContext.Erase(Rectangle(Point(0, nTxtOffset), Point(aWinSize.Width(), aWinSize.Height()))); + rRenderContext.Erase(tools::Rectangle(Point(0, nTxtOffset), Point(aWinSize.Width(), aWinSize.Height()))); } rRenderContext.DrawText(Point((aWinSize.Width() - nTxtWidth) / 2, nTxtOffset + (NAME_OFFSET / 2)), rText); } @@ -739,7 +739,7 @@ void ValueSet::ImplDrawSelect(vcl::RenderContext& rRenderContext) void ValueSet::ImplDrawSelect(vcl::RenderContext& rRenderContext, sal_uInt16 nItemId, const bool bFocus, const bool bDrawSel ) { ValueSetItem* pItem; - Rectangle aRect; + tools::Rectangle aRect; if (nItemId) { const size_t nPos = GetItemPos( nItemId ); @@ -860,7 +860,7 @@ void ValueSet::ImplDrawSelect(vcl::RenderContext& rRenderContext, sal_uInt16 nIt aRect.Top()++; aRect.Right()--; aRect.Bottom()--; - Rectangle aRect2 = aRect; + tools::Rectangle aRect2 = aRect; aRect.Left()++; aRect.Top()++; aRect.Right()--; @@ -897,7 +897,7 @@ void ValueSet::ImplDrawSelect(vcl::RenderContext& rRenderContext, sal_uInt16 nIt void ValueSet::ImplHideSelect( sal_uInt16 nItemId ) { - Rectangle aRect; + tools::Rectangle aRect; const size_t nItemPos = GetItemPos( nItemId ); if ( nItemPos != VALUESET_ITEM_NOTFOUND ) @@ -1419,7 +1419,7 @@ void ValueSet::Command( const CommandEvent& rCommandEvent ) Control::Command( rCommandEvent ); } -void ValueSet::Paint(vcl::RenderContext& rRenderContext, const Rectangle&) +void ValueSet::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&) { if (GetStyle() & WB_FLATVALUESET) { @@ -1428,7 +1428,7 @@ void ValueSet::Paint(vcl::RenderContext& rRenderContext, const Rectangle&) rRenderContext.SetFillColor(rStyleSettings.GetFaceColor()); long nOffY = maVirDev->GetOutputSizePixel().Height(); Size aWinSize(GetOutputSizePixel()); - rRenderContext.DrawRect(Rectangle(Point(0, nOffY ), Point( aWinSize.Width(), aWinSize.Height()))); + rRenderContext.DrawRect(tools::Rectangle(Point(0, nOffY ), Point( aWinSize.Width(), aWinSize.Height()))); } ImplDraw(rRenderContext); @@ -1477,7 +1477,7 @@ void ValueSet::RequestHelp( const HelpEvent& rHelpEvent ) size_t nItemPos = ImplGetItem( aPos ); if ( nItemPos != VALUESET_ITEM_NOTFOUND ) { - Rectangle aItemRect = ImplGetItemRect( nItemPos ); + tools::Rectangle aItemRect = ImplGetItemRect( nItemPos ); Point aPt = OutputToScreenPixel( aItemRect.TopLeft() ); aItemRect.Left() = aPt.X(); aItemRect.Top() = aPt.Y(); @@ -1623,7 +1623,7 @@ void ValueSet::ImplInsertItem( ValueSetItem *const pItem, const size_t nPos ) Invalidate(); } -Rectangle ValueSet::ImplGetItemRect( size_t nPos ) const +tools::Rectangle ValueSet::ImplGetItemRect( size_t nPos ) const { const size_t nVisibleBegin = static_cast<size_t>(mnFirstLine)*mnCols; const size_t nVisibleEnd = nVisibleBegin + static_cast<size_t>(mnVisLines)*mnCols; @@ -1631,7 +1631,7 @@ Rectangle ValueSet::ImplGetItemRect( size_t nPos ) const // Check if the item is inside the range of the displayed ones, // taking into account that last row could be incomplete if ( nPos<nVisibleBegin || nPos>=nVisibleEnd || nPos>=mItemList.size() ) - return Rectangle(); + return tools::Rectangle(); nPos -= nVisibleBegin; @@ -1640,7 +1640,7 @@ Rectangle ValueSet::ImplGetItemRect( size_t nPos ) const const long x = maItemListRect.Left()+col*(mnItemWidth+mnSpacing); const long y = maItemListRect.Top()+row*(mnItemHeight+mnSpacing); - return Rectangle( Point(x, y), Size(mnItemWidth, mnItemHeight) ); + return tools::Rectangle( Point(x, y), Size(mnItemWidth, mnItemHeight) ); } void ValueSet::RemoveItem( sal_uInt16 nItemId ) @@ -1718,14 +1718,14 @@ sal_uInt16 ValueSet::GetItemId( const Point& rPos ) const return 0; } -Rectangle ValueSet::GetItemRect( sal_uInt16 nItemId ) const +tools::Rectangle ValueSet::GetItemRect( sal_uInt16 nItemId ) const { const size_t nPos = GetItemPos( nItemId ); if ( nPos!=VALUESET_ITEM_NOTFOUND && mItemList[nPos]->mbVisible ) return ImplGetItemRect( nPos ); - return Rectangle(); + return tools::Rectangle(); } void ValueSet::EnableFullItemMode( bool bFullMode ) @@ -1942,7 +1942,7 @@ void ValueSet::SetItemImage( sal_uInt16 nItemId, const Image& rImage ) if ( !mbFormat && IsReallyVisible() && IsUpdateMode() ) { - const Rectangle aRect = ImplGetItemRect(nPos); + const tools::Rectangle aRect = ImplGetItemRect(nPos); Invalidate(aRect); } else @@ -1972,7 +1972,7 @@ void ValueSet::SetItemColor( sal_uInt16 nItemId, const Color& rColor ) if ( !mbFormat && IsReallyVisible() && IsUpdateMode() ) { - const Rectangle aRect = ImplGetItemRect(nPos); + const tools::Rectangle aRect = ImplGetItemRect(nPos); Invalidate( aRect ); } else @@ -2003,7 +2003,7 @@ void ValueSet::SetItemData( sal_uInt16 nItemId, void* pData ) { if ( !mbFormat && IsReallyVisible() && IsUpdateMode() ) { - const Rectangle aRect = ImplGetItemRect(nPos); + const tools::Rectangle aRect = ImplGetItemRect(nPos); Invalidate(aRect); } else diff --git a/svtools/source/graphic/grfcache.cxx b/svtools/source/graphic/grfcache.cxx index 2b158698548b..c018a533dc4e 100644 --- a/svtools/source/graphic/grfcache.cxx +++ b/svtools/source/graphic/grfcache.cxx @@ -811,10 +811,10 @@ void GraphicDisplayCacheEntry::Draw( OutputDevice* pOut, const Point& rPt, const { if( maAttr.IsRotated() ) { - tools::Polygon aPoly( Rectangle( rPt, rSz ) ); + tools::Polygon aPoly( tools::Rectangle( rPt, rSz ) ); aPoly.Rotate( rPt, maAttr.GetRotation() % 3600 ); - const Rectangle aRotBoundRect( aPoly.GetBoundRect() ); + const tools::Rectangle aRotBoundRect( aPoly.GetBoundRect() ); pOut->DrawBitmapEx( aRotBoundRect.TopLeft(), aRotBoundRect.GetSize(), *mpBmpEx ); } else diff --git a/svtools/source/graphic/grfmgr.cxx b/svtools/source/graphic/grfmgr.cxx index 3225cdb186fd..07ec46fc0b5d 100644 --- a/svtools/source/graphic/grfmgr.cxx +++ b/svtools/source/graphic/grfmgr.cxx @@ -241,7 +241,7 @@ bool GraphicObject::ImplGetCropParams( OutputDevice* pOut, Point& rPt, Size& rSz if( GetType() != GraphicType::NONE ) { - tools::Polygon aClipPoly( Rectangle( rPt, rSz ) ); + tools::Polygon aClipPoly( tools::Rectangle( rPt, rSz ) ); const sal_uInt16 nRot10 = pAttr->GetRotation() % 3600; const Point aOldOrigin( rPt ); const MapMode aMap100( MapUnit::Map100thMM ); @@ -458,7 +458,7 @@ bool GraphicObject::Draw( OutputDevice* pOut, const Point& rPt, const Size& rSz, bool bRet; // #i29534# Provide output rects for PDF writer - Rectangle aCropRect; + tools::Rectangle aCropRect; if( !( GraphicManagerDrawFlags::USE_DRAWMODE_SETTINGS & nFlags ) ) pOut->SetDrawMode( nOldDrawMode & ~DrawModeFlags( DrawModeFlags::SettingsLine | DrawModeFlags::SettingsFill | DrawModeFlags::SettingsText | DrawModeFlags::SettingsGradient ) ); @@ -523,7 +523,7 @@ bool GraphicObject::Draw( OutputDevice* pOut, const Point& rPt, const Size& rSz, return bRet; } -void GraphicObject::DrawTiled( OutputDevice* pOut, const Rectangle& rArea, const Size& rSize, +void GraphicObject::DrawTiled( OutputDevice* pOut, const tools::Rectangle& rArea, const Size& rSize, const Size& rOffset, GraphicManagerDrawFlags nFlags, int nTileCacheSize1D ) { if( pOut == nullptr || rSize.Width() == 0 || rSize.Height() == 0 ) @@ -703,7 +703,7 @@ Graphic GraphicObject::GetTransformedGraphic( const Size& rDestSize, const MapMo { const MapMode aMtfMapMode( aMtf.GetPrefMapMode() ); - Rectangle aClipRect( aMtfMapMode.GetOrigin().X() + aCropLeftTop.Width(), + tools::Rectangle aClipRect( aMtfMapMode.GetOrigin().X() + aCropLeftTop.Width(), aMtfMapMode.GetOrigin().Y() + aCropLeftTop.Height(), aMtfMapMode.GetOrigin().X() + aSrcSize.Width() - aCropRightBottom.Width(), aMtfMapMode.GetOrigin().Y() + aSrcSize.Height() - aCropRightBottom.Height() ); @@ -740,7 +740,7 @@ Graphic GraphicObject::GetTransformedGraphic( const Size& rDestSize, const MapMo else if( GraphicType::Bitmap == eType ) { BitmapEx aBitmapEx( aTransGraphic.GetBitmapEx() ); - Rectangle aCropRect; + tools::Rectangle aCropRect; // convert crops to pixel if(rAttr.IsCropped()) @@ -797,7 +797,7 @@ Graphic GraphicObject::GetTransformedGraphic( const Size& rDestSize, const MapMo } // setup crop rectangle in pixel - aCropRect = Rectangle( aCropLeftTop.Width(), aCropLeftTop.Height(), + aCropRect = tools::Rectangle( aCropLeftTop.Width(), aCropLeftTop.Height(), aSrcSizePixel.Width() - aCropRightBottom.Width(), aSrcSizePixel.Height() - aCropRightBottom.Height() ); } @@ -811,10 +811,10 @@ Graphic GraphicObject::GetTransformedGraphic( const Size& rDestSize, const MapMo { AnimationBitmap aAnimBmp( aAnim.Get( nFrame ) ); - if( !aCropRect.IsInside( Rectangle(aAnimBmp.aPosPix, aAnimBmp.aSizePix) ) ) + if( !aCropRect.IsInside( tools::Rectangle(aAnimBmp.aPosPix, aAnimBmp.aSizePix) ) ) { // setup actual cropping (relative to frame position) - Rectangle aCropRectRel( aCropRect ); + tools::Rectangle aCropRectRel( aCropRect ); aCropRectRel.Move( -aAnimBmp.aPosPix.X(), -aAnimBmp.aPosPix.Y() ); diff --git a/svtools/source/graphic/grfmgr2.cxx b/svtools/source/graphic/grfmgr2.cxx index 78319de971c5..15ca2242f68f 100644 --- a/svtools/source/graphic/grfmgr2.cxx +++ b/svtools/source/graphic/grfmgr2.cxx @@ -109,10 +109,10 @@ bool GraphicManager::DrawObj( OutputDevice* pOut, const Point& rPt, const Size& if( nRot10 ) { - tools::Polygon aPoly( Rectangle( aPt, aSz ) ); + tools::Polygon aPoly( tools::Rectangle( aPt, aSz ) ); aPoly.Rotate( aPt, nRot10 ); - const Rectangle aRotBoundRect( aPoly.GetBoundRect() ); + const tools::Rectangle aRotBoundRect( aPoly.GetBoundRect() ); aPt = aRotBoundRect.TopLeft(); aSz = aRotBoundRect.GetSize(); } @@ -429,9 +429,9 @@ bool ImplCreateRotatedScaled( const BitmapEx& rBmpEx, const GraphicAttr& rAttrib sal_uInt8 cR0, cG0, cB0, cR1, cG1, cB1; bool bRet = false; - tools::Polygon aPoly( Rectangle( Point(), rUnrotatedSzPix ) ); + tools::Polygon aPoly( tools::Rectangle( Point(), rUnrotatedSzPix ) ); aPoly.Rotate( Point(), nRot10 ); - Rectangle aNewBound( aPoly.GetBoundRect() ); + tools::Rectangle aNewBound( aPoly.GetBoundRect() ); // create horizontal mapping table long x; @@ -885,9 +885,9 @@ bool GraphicManager::ImplCreateOutput( OutputDevice* pOutputDevice, if( nRot10 ) { - tools::Polygon aPoly( Rectangle( rPoint, rSize ) ); + tools::Polygon aPoly( tools::Rectangle( rPoint, rSize ) ); aPoly.Rotate( rPoint, nRot10 ); - const Rectangle aRotBoundRect( aPoly.GetBoundRect() ); + const tools::Rectangle aRotBoundRect( aPoly.GetBoundRect() ); aOutputPointPix = pOutputDevice->LogicToPixel( aRotBoundRect.TopLeft() ); aOutputSizePix = pOutputDevice->LogicToPixel( aRotBoundRect.GetSize() ); } @@ -913,8 +913,8 @@ bool GraphicManager::ImplCreateOutput( OutputDevice* pOutputDevice, if( !pBmpEx ) { Point aPt; - Rectangle aOutRect( aPt, pOutputDevice->GetOutputSizePixel() ); - Rectangle aBmpRect( aOutputPointPix, aOutputSizePix ); + tools::Rectangle aOutRect( aPt, pOutputDevice->GetOutputSizePixel() ); + tools::Rectangle aBmpRect( aOutputPointPix, aOutputSizePix ); if( pOutputDevice->GetOutDevType() == OUTDEV_WINDOW ) { @@ -1078,7 +1078,7 @@ static BitmapEx checkMetadataBitmap( const BitmapEx& rBmpEx, { // crop bitmap to given source rectangle (no // need to copy and convert the whole bitmap) - const Rectangle aCropRect( rSrcPoint, + const tools::Rectangle aCropRect( rSrcPoint, rSrcSize ); aBmpEx.Crop( aCropRect ); } @@ -1612,16 +1612,16 @@ void GraphicManager::ImplDraw( OutputDevice* pOut, const Point& rPt, const Size& if( nRot10 ) { - tools::Polygon aPoly( Rectangle( aOutPt, aOutSz ) ); + tools::Polygon aPoly( tools::Rectangle( aOutPt, aOutSz ) ); aPoly.Rotate( aOutPt, nRot10 ); - const Rectangle aRotBoundRect( aPoly.GetBoundRect() ); + const tools::Rectangle aRotBoundRect( aPoly.GetBoundRect() ); aOutPt = aRotBoundRect.TopLeft(); aOutSz = aRotBoundRect.GetSize(); } pOut->Push( PushFlags::CLIPREGION ); - pOut->IntersectClipRegion( Rectangle( aOutPt, aOutSz ) ); + pOut->IntersectClipRegion( tools::Rectangle( aOutPt, aOutSz ) ); const_cast<GDIMetaFile&>(rMtf).WindStart(); const_cast<GDIMetaFile&>(rMtf).Play( pOut, aOutPt, aOutSz ); @@ -1874,7 +1874,7 @@ bool GraphicObject::ImplRenderTileRecursive( VirtualDevice& rVDev, int nExponent return true; } -bool GraphicObject::ImplDrawTiled( OutputDevice* pOut, const Rectangle& rArea, const Size& rSizePixel, +bool GraphicObject::ImplDrawTiled( OutputDevice* pOut, const tools::Rectangle& rArea, const Size& rSizePixel, const Size& rOffset, const GraphicAttr* pAttr, GraphicManagerDrawFlags nFlags, int nTileCacheSize1D ) { const MapMode aOutMapMode( pOut->GetMapMode() ); @@ -1937,7 +1937,7 @@ bool GraphicObject::ImplDrawTiled( OutputDevice* pOut, const Rectangle& rArea, c else { const Size aOutOffset( pOut->LogicToPixel( rOffset, aOutMapMode ) ); - const Rectangle aOutArea( pOut->LogicToPixel( rArea, aOutMapMode ) ); + const tools::Rectangle aOutArea( pOut->LogicToPixel( rArea, aOutMapMode ) ); // number of invisible (because out-of-area) tiles int nInvisibleTilesX; @@ -2031,7 +2031,7 @@ void GraphicObject::ImplTransformBitmap( BitmapEx& rBmpEx, const GraphicAttr& rAttr, const Size& rCropLeftTop, const Size& rCropRightBottom, - const Rectangle& rCropRect, + const tools::Rectangle& rCropRect, const Size& rDstSize, bool bEnlarge ) const { @@ -2079,7 +2079,7 @@ void GraphicObject::ImplTransformBitmap( BitmapEx& rBmpEx, aBmpEx2.SetSizePixel( Size(nPadTotalWidth, nPadTotalHeight) ); aBmpEx2.Erase( Color(0xFF,0,0,0) ); - aBmpEx2.CopyPixel( Rectangle( Point(nPadLeft, nPadTop), aBmpSize ), Rectangle( Point(0, 0), aBmpSize ), &rBmpEx ); + aBmpEx2.CopyPixel( tools::Rectangle( Point(nPadLeft, nPadTop), aBmpSize ), tools::Rectangle( Point(0, 0), aBmpSize ), &rBmpEx ); rBmpEx = aBmpEx2; } } diff --git a/svtools/source/graphic/provider.cxx b/svtools/source/graphic/provider.cxx index 7b4293631970..542cdb251857 100644 --- a/svtools/source/graphic/provider.cxx +++ b/svtools/source/graphic/provider.cxx @@ -485,7 +485,7 @@ uno::Reference< ::graphic::XGraphic > SAL_CALL GraphicProvider::queryGraphic( co return xRet; } -void ImplCalculateCropRect( ::Graphic& rGraphic, const text::GraphicCrop& rGraphicCropLogic, Rectangle& rGraphicCropPixel ) +void ImplCalculateCropRect( ::Graphic& rGraphic, const text::GraphicCrop& rGraphicCropLogic, tools::Rectangle& rGraphicCropPixel ) { if ( rGraphicCropLogic.Left || rGraphicCropLogic.Top || rGraphicCropLogic.Right || rGraphicCropLogic.Bottom ) { @@ -604,7 +604,7 @@ void ImplApplyFilterData( ::Graphic& rGraphic, uno::Sequence< beans::PropertyVal } else { - Rectangle aCropPixel( Point( 0, 0 ), rGraphic.GetSizePixel() ); + tools::Rectangle aCropPixel( Point( 0, 0 ), rGraphic.GetSizePixel() ); ImplCalculateCropRect( rGraphic, aCropLogic, aCropPixel ); if ( bRemoveCropArea ) { diff --git a/svtools/source/graphic/renderer.cxx b/svtools/source/graphic/renderer.cxx index ee9444c92bc7..1db2117506df 100644 --- a/svtools/source/graphic/renderer.cxx +++ b/svtools/source/graphic/renderer.cxx @@ -86,7 +86,7 @@ private: css::uno::Reference< css::awt::XDevice > mxDevice; VclPtr<OutputDevice> mpOutDev; - Rectangle maDestRect; + tools::Rectangle maDestRect; css::uno::Any maRenderData; }; @@ -230,7 +230,7 @@ void GraphicRendererVCL::_setPropertyValues( const comphelper::PropertyMapEntry* if( *pValues >>= aAWTRect ) { - maDestRect = Rectangle( Point( aAWTRect.X, aAWTRect.Y ), + maDestRect = tools::Rectangle( Point( aAWTRect.X, aAWTRect.Y ), Size( aAWTRect.Width, aAWTRect.Height ) ); } } diff --git a/svtools/source/hatchwindow/hatchwindow.cxx b/svtools/source/hatchwindow/hatchwindow.cxx index 569556443e31..26093b92bdb4 100644 --- a/svtools/source/hatchwindow/hatchwindow.cxx +++ b/svtools/source/hatchwindow/hatchwindow.cxx @@ -67,7 +67,7 @@ void VCLXHatchWindow::initializeWindow( const uno::Reference< awt::XWindowPeer > //pHatchWindow->Show(); } -void VCLXHatchWindow::QueryObjAreaPixel( Rectangle & aRect ) +void VCLXHatchWindow::QueryObjAreaPixel( tools::Rectangle & aRect ) { if ( m_xController.is() ) { @@ -84,7 +84,7 @@ void VCLXHatchWindow::QueryObjAreaPixel( Rectangle & aRect ) } } -void VCLXHatchWindow::RequestObjAreaPixel( const Rectangle & aRect ) +void VCLXHatchWindow::RequestObjAreaPixel( const tools::Rectangle & aRect ) { if ( m_xController.is() ) { diff --git a/svtools/source/hatchwindow/ipwin.cxx b/svtools/source/hatchwindow/ipwin.cxx index 8ec5c97fa338..d714dd3b981e 100644 --- a/svtools/source/hatchwindow/ipwin.cxx +++ b/svtools/source/hatchwindow/ipwin.cxx @@ -42,39 +42,39 @@ SvResizeHelper::SvResizeHelper() |* |* Description: the eight handles to magnify *************************************************************************/ -void SvResizeHelper::FillHandleRectsPixel( Rectangle aRects[ 8 ] ) const +void SvResizeHelper::FillHandleRectsPixel( tools::Rectangle aRects[ 8 ] ) const { // only because of EMPTY_RECT Point aBottomRight = aOuter.BottomRight(); // upper left - aRects[ 0 ] = Rectangle( aOuter.TopLeft(), aBorder ); + aRects[ 0 ] = tools::Rectangle( aOuter.TopLeft(), aBorder ); // upper middle - aRects[ 1 ] = Rectangle( Point( aOuter.Center().X() - aBorder.Width() / 2, + aRects[ 1 ] = tools::Rectangle( Point( aOuter.Center().X() - aBorder.Width() / 2, aOuter.Top() ), aBorder ); // upper right - aRects[ 2 ] = Rectangle( Point( aBottomRight.X() - aBorder.Width() +1, + aRects[ 2 ] = tools::Rectangle( Point( aBottomRight.X() - aBorder.Width() +1, aOuter.Top() ), aBorder ); // middle right - aRects[ 3 ] = Rectangle( Point( aBottomRight.X() - aBorder.Width() +1, + aRects[ 3 ] = tools::Rectangle( Point( aBottomRight.X() - aBorder.Width() +1, aOuter.Center().Y() - aBorder.Height() / 2 ), aBorder ); // lower right - aRects[ 4 ] = Rectangle( Point( aBottomRight.X() - aBorder.Width() +1, + aRects[ 4 ] = tools::Rectangle( Point( aBottomRight.X() - aBorder.Width() +1, aBottomRight.Y() - aBorder.Height() +1 ), aBorder ); // lower middle - aRects[ 5 ] = Rectangle( Point( aOuter.Center().X() - aBorder.Width() / 2, + aRects[ 5 ] = tools::Rectangle( Point( aOuter.Center().X() - aBorder.Width() / 2, aBottomRight.Y() - aBorder.Height() +1), aBorder ); // lower left - aRects[ 6 ] = Rectangle( Point( aOuter.Left(), + aRects[ 6 ] = tools::Rectangle( Point( aOuter.Left(), aBottomRight.Y() - aBorder.Height() +1), aBorder ); // middle left - aRects[ 7 ] = Rectangle( Point( aOuter.Left(), + aRects[ 7 ] = tools::Rectangle( Point( aOuter.Left(), aOuter.Center().Y() - aBorder.Height() / 2 ), aBorder ); } @@ -84,7 +84,7 @@ void SvResizeHelper::FillHandleRectsPixel( Rectangle aRects[ 8 ] ) const |* |* Description: the four edges are calculated *************************************************************************/ -void SvResizeHelper::FillMoveRectsPixel( Rectangle aRects[ 4 ] ) const +void SvResizeHelper::FillMoveRectsPixel( tools::Rectangle aRects[ 4 ] ) const { // upper aRects[ 0 ] = aOuter; @@ -115,14 +115,14 @@ void SvResizeHelper::Draw(vcl::RenderContext& rRenderContext) rRenderContext.SetFillColor( aFillColor ); rRenderContext.SetLineColor(); - Rectangle aMoveRects[ 4 ]; + tools::Rectangle aMoveRects[ 4 ]; FillMoveRectsPixel( aMoveRects ); sal_uInt16 i; for (i = 0; i < 4; i++) rRenderContext.DrawRect(aMoveRects[i]); // draw handles rRenderContext.SetFillColor(aColBlack); - Rectangle aRects[ 8 ]; + tools::Rectangle aRects[ 8 ]; FillHandleRectsPixel(aRects); for (i = 0; i < 8; i++) rRenderContext.DrawRect( aRects[ i ] ); @@ -136,7 +136,7 @@ void SvResizeHelper::Draw(vcl::RenderContext& rRenderContext) *************************************************************************/ void SvResizeHelper::InvalidateBorder( vcl::Window * pWin ) { - Rectangle aMoveRects[ 4 ]; + tools::Rectangle aMoveRects[ 4 ]; FillMoveRectsPixel( aMoveRects ); for(const auto & rMoveRect : aMoveRects) pWin->Invalidate( rMoveRect ); @@ -171,13 +171,13 @@ short SvResizeHelper::SelectMove( vcl::Window * pWin, const Point & rPos ) { if( -1 == nGrab ) { - Rectangle aRects[ 8 ]; + tools::Rectangle aRects[ 8 ]; FillHandleRectsPixel( aRects ); for( sal_uInt16 i = 0; i < 8; i++ ) if( aRects[ i ].IsInside( rPos ) ) return i; // Move-Rect overlaps Handles - Rectangle aMoveRects[ 4 ]; + tools::Rectangle aMoveRects[ 4 ]; FillMoveRectsPixel( aMoveRects ); for(const auto & rMoveRect : aMoveRects) if( rMoveRect.IsInside( rPos ) ) @@ -185,7 +185,7 @@ short SvResizeHelper::SelectMove( vcl::Window * pWin, const Point & rPos ) } else { - Rectangle aRect( GetTrackRectPixel( rPos ) ); + tools::Rectangle aRect( GetTrackRectPixel( rPos ) ); aRect.SetSize( pWin->PixelToLogic( aRect.GetSize() ) ); aRect.SetPos( pWin->PixelToLogic( aRect.TopLeft() ) ); pWin->ShowTracking( aRect ); @@ -193,12 +193,12 @@ short SvResizeHelper::SelectMove( vcl::Window * pWin, const Point & rPos ) return nGrab; } -Point SvResizeHelper::GetTrackPosPixel( const Rectangle & rRect ) const +Point SvResizeHelper::GetTrackPosPixel( const tools::Rectangle & rRect ) const { // not important how the rectangle is returned, it is important // which handle has been touched Point aPos; - Rectangle aRect( rRect ); + tools::Rectangle aRect( rRect ); aRect.Justify(); // only because of EMPTY_RECT Point aBR = aOuter.BottomRight(); @@ -261,9 +261,9 @@ Point SvResizeHelper::GetTrackPosPixel( const Rectangle & rRect ) const |* |* Description *************************************************************************/ -Rectangle SvResizeHelper::GetTrackRectPixel( const Point & rTrackPos ) const +tools::Rectangle SvResizeHelper::GetTrackRectPixel( const Point & rTrackPos ) const { - Rectangle aTrackRect; + tools::Rectangle aTrackRect; if( -1 != nGrab ) { Point aDiff = rTrackPos - aSelPos; @@ -334,7 +334,7 @@ Rectangle SvResizeHelper::GetTrackRectPixel( const Point & rTrackPos ) const return aTrackRect; } -void SvResizeHelper::ValidateRect( Rectangle & rValidate ) const +void SvResizeHelper::ValidateRect( tools::Rectangle & rValidate ) const { switch( nGrab ) { @@ -393,7 +393,7 @@ void SvResizeHelper::ValidateRect( Rectangle & rValidate ) const |* Description *************************************************************************/ bool SvResizeHelper::SelectRelease( vcl::Window * pWin, const Point & rPos, - Rectangle & rOutPosSize ) + tools::Rectangle & rOutPosSize ) { if( -1 != nGrab ) { @@ -440,7 +440,7 @@ SvResizeWindow::SvResizeWindow OSL_ENSURE( pParent != nullptr && pWrapper != nullptr, "Wrong initialization of hatch window!\n" ); SetBackground(); SetAccessibleRole( css::accessibility::AccessibleRole::EMBEDDED_OBJECT ); - m_aResizer.SetOuterRectPixel( Rectangle( Point(), GetOutputSizePixel() ) ); + m_aResizer.SetOuterRectPixel( tools::Rectangle( Point(), GetOutputSizePixel() ) ); } /************************************************************************* @@ -512,7 +512,7 @@ void SvResizeWindow::MouseMove( const MouseEvent & rEvt ) SelectMouse( rEvt.GetPosPixel() ); else { - Rectangle aRect( m_aResizer.GetTrackRectPixel( rEvt.GetPosPixel() ) ); + tools::Rectangle aRect( m_aResizer.GetTrackRectPixel( rEvt.GetPosPixel() ) ); Point aDiff = GetPosPixel(); aRect.SetPos( aRect.TopLeft() + aDiff ); m_aResizer.ValidateRect( aRect ); @@ -534,7 +534,7 @@ void SvResizeWindow::MouseButtonUp( const MouseEvent & rEvt ) { if( m_aResizer.GetGrab() != -1 ) { - Rectangle aRect( m_aResizer.GetTrackRectPixel( rEvt.GetPosPixel() ) ); + tools::Rectangle aRect( m_aResizer.GetTrackRectPixel( rEvt.GetPosPixel() ) ); Point aDiff = GetPosPixel(); aRect.SetPos( aRect.TopLeft() + aDiff ); // aRect -= GetAllBorderPixel(); @@ -542,7 +542,7 @@ void SvResizeWindow::MouseButtonUp( const MouseEvent & rEvt ) m_pWrapper->QueryObjAreaPixel( aRect ); - Rectangle aOutRect; + tools::Rectangle aOutRect; if( m_aResizer.SelectRelease( this, rEvt.GetPosPixel(), aOutRect ) ) { m_nMoveGrab = -1; @@ -574,7 +574,7 @@ void SvResizeWindow::KeyInput( const KeyEvent & rEvt ) void SvResizeWindow::Resize() { m_aResizer.InvalidateBorder( this ); // old area - m_aResizer.SetOuterRectPixel( Rectangle( Point(), GetOutputSizePixel() ) ); + m_aResizer.SetOuterRectPixel( tools::Rectangle( Point(), GetOutputSizePixel() ) ); m_aResizer.InvalidateBorder( this ); // new area } @@ -583,7 +583,7 @@ void SvResizeWindow::Resize() |* |* Description *************************************************************************/ -void SvResizeWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangle & /*rRect*/ ) +void SvResizeWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle & /*rRect*/ ) { m_aResizer.Draw(rRenderContext); } diff --git a/svtools/source/hatchwindow/ipwin.hxx b/svtools/source/hatchwindow/ipwin.hxx index 07da60607b2c..d7637869cd70 100644 --- a/svtools/source/hatchwindow/ipwin.hxx +++ b/svtools/source/hatchwindow/ipwin.hxx @@ -28,7 +28,7 @@ class SvResizeHelper { Size aBorder; - Rectangle aOuter; + tools::Rectangle aOuter; short nGrab; // -1 no Grab, 0 - 7, 8 = Move, see FillHandle... Point aSelPos; public: @@ -42,22 +42,22 @@ public: { aBorder = rBorderP; } - void SetOuterRectPixel(const Rectangle& rRect) + void SetOuterRectPixel(const tools::Rectangle& rRect) { aOuter = rRect; } // Clockwise, start at upper left - void FillHandleRectsPixel( Rectangle aRects[ 8 ] ) const; - void FillMoveRectsPixel( Rectangle aRects[ 4 ] ) const; + void FillHandleRectsPixel( tools::Rectangle aRects[ 8 ] ) const; + void FillMoveRectsPixel( tools::Rectangle aRects[ 4 ] ) const; void Draw(vcl::RenderContext& rRenderContext); void InvalidateBorder( vcl::Window * ); bool SelectBegin( vcl::Window *, const Point & rPos ); short SelectMove( vcl::Window * pWin, const Point & rPos ); - Point GetTrackPosPixel( const Rectangle & rRect ) const; - Rectangle GetTrackRectPixel( const Point & rTrackPos ) const; - void ValidateRect( Rectangle & rValidate ) const; - bool SelectRelease( vcl::Window *, const Point & rPos, Rectangle & rOutPosSize ); + Point GetTrackPosPixel( const tools::Rectangle & rRect ) const; + tools::Rectangle GetTrackRectPixel( const Point & rTrackPos ) const; + void ValidateRect( tools::Rectangle & rValidate ) const; + bool SelectRelease( vcl::Window *, const Point & rPos, tools::Rectangle & rOutPosSize ); void Release( vcl::Window * pWin ); }; @@ -83,7 +83,7 @@ public: virtual void MouseButtonDown( const MouseEvent & rEvt ) override; virtual void KeyInput( const KeyEvent & rEvt ) override; virtual void Resize() override; - virtual void Paint( vcl::RenderContext& /*rRenderContext*/, const Rectangle & ) override; + virtual void Paint( vcl::RenderContext& /*rRenderContext*/, const tools::Rectangle & ) override; virtual bool EventNotify( NotifyEvent& rNEvt ) override; virtual bool PreNotify( NotifyEvent& rNEvt ) override; }; diff --git a/svtools/source/inc/hatchwindow.hxx b/svtools/source/inc/hatchwindow.hxx index e60fac6ccf0b..691f3fc8edb0 100644 --- a/svtools/source/inc/hatchwindow.hxx +++ b/svtools/source/inc/hatchwindow.hxx @@ -41,8 +41,8 @@ public: const css::awt::Rectangle& aBounds, const css::awt::Size& aSize ); - void QueryObjAreaPixel( Rectangle & ); - void RequestObjAreaPixel( const Rectangle & ); + void QueryObjAreaPixel( tools::Rectangle & ); + void RequestObjAreaPixel( const tools::Rectangle & ); void InplaceDeactivate(); void Activated(); void Deactivated(); diff --git a/svtools/source/inc/iconviewimpl.hxx b/svtools/source/inc/iconviewimpl.hxx index 5b6a782cf20e..ca29b20f85b1 100644 --- a/svtools/source/inc/iconviewimpl.hxx +++ b/svtools/source/inc/iconviewimpl.hxx @@ -40,7 +40,7 @@ public: bool IsEntryInView( SvTreeListEntry* pEntry ) const SAL_OVERRIDE; - void Paint( vcl::RenderContext& rRenderContext, const Rectangle& rRect ) SAL_OVERRIDE; + void Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect ) SAL_OVERRIDE; // returns 0 if position is just past the last entry SvTreeListEntry* GetEntry( const Point& rPoint ) const SAL_OVERRIDE; diff --git a/svtools/source/inc/svimpbox.hxx b/svtools/source/inc/svimpbox.hxx index 2503926bcb4f..84a6e5d3a54d 100644 --- a/svtools/source/inc/svimpbox.hxx +++ b/svtools/source/inc/svimpbox.hxx @@ -197,7 +197,7 @@ private: void UpdateContextBmpWidthMax( SvTreeListEntry* pEntry ); void UpdateContextBmpWidthVectorFromMovedEntry( SvTreeListEntry* pEntry ); - void CalcCellFocusRect( SvTreeListEntry* pEntry, Rectangle& rRect ); + void CalcCellFocusRect( SvTreeListEntry* pEntry, tools::Rectangle& rRect ); bool AreChildrenTransient() const { return bAreChildrenTransient; } void SetChildrenNotTransient() { bAreChildrenTransient = false; } @@ -229,7 +229,7 @@ protected: virtual void AdjustScrollBars( Size& rSize ); virtual void InvalidateEntry( long nY ) const; - Rectangle GetVisibleArea() const; + tools::Rectangle GetVisibleArea() const; void SetCursor( SvTreeListEntry* pEntry, bool bForceNoSelect = false ); void BeginScroll(); void EndScroll(); @@ -262,7 +262,7 @@ public: void CollapsingEntry( SvTreeListEntry* pEntry ); void EntrySelected( SvTreeListEntry* pEntry, bool bSelect ); - virtual void Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect); + virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect); void MouseButtonDown( const MouseEvent& ); void MouseButtonUp( const MouseEvent& ); void MouseMove( const MouseEvent&); @@ -326,7 +326,7 @@ public: void EnableAsyncDrag( bool b ) { bAsyncBeginDrag = b; } void SetUpdateMode( bool bMode ); bool GetUpdateMode() const { return bUpdateMode; } - Rectangle GetClipRegionRect() const; + tools::Rectangle GetClipRegionRect() const; bool HasHorScrollBar() const { return aHorSBar->IsVisible(); } void ShowFocusRect( const SvTreeListEntry* pEntry ); void CallEventListeners( VclEventId nEvent, void* pData = nullptr ); diff --git a/svtools/source/misc/embedhlp.cxx b/svtools/source/misc/embedhlp.cxx index 02514dff2abd..dbbea93fc011 100644 --- a/svtools/source/misc/embedhlp.cxx +++ b/svtools/source/misc/embedhlp.cxx @@ -623,7 +623,7 @@ SvStream* EmbeddedObjectRef::GetGraphicStream( bool bUpdate ) const return nullptr; } -void EmbeddedObjectRef::DrawPaintReplacement( const Rectangle &rRect, const OUString &rText, OutputDevice *pOut ) +void EmbeddedObjectRef::DrawPaintReplacement( const tools::Rectangle &rRect, const OUString &rText, OutputDevice *pOut ) { MapMode aMM( MapUnit::MapAppFont ); Size aAppFontSz = pOut->LogicToLogic( Size( 0, 8 ), &aMM, nullptr ); @@ -705,7 +705,7 @@ void EmbeddedObjectRef::DrawPaintReplacement( const Rectangle &rRect, const OUSt pOut->Pop(); } -void EmbeddedObjectRef::DrawShading( const Rectangle &rRect, OutputDevice *pOut ) +void EmbeddedObjectRef::DrawShading( const tools::Rectangle &rRect, OutputDevice *pOut ) { GDIMetaFile * pMtf = pOut->GetConnectMetaFile(); if( pMtf && pMtf->IsRecord() ) diff --git a/svtools/source/misc/imap.cxx b/svtools/source/misc/imap.cxx index 3a0b1533bbf2..7888c8ee5099 100644 --- a/svtools/source/misc/imap.cxx +++ b/svtools/source/misc/imap.cxx @@ -135,7 +135,7 @@ bool IMapObject::IsEqual( const IMapObject& rEqObj ) ( bActive == rEqObj.bActive ) ); } -IMapRectangleObject::IMapRectangleObject( const Rectangle& rRect, +IMapRectangleObject::IMapRectangleObject( const tools::Rectangle& rRect, const OUString& rURL, const OUString& rAltText, const OUString& rDesc, @@ -148,7 +148,7 @@ IMapRectangleObject::IMapRectangleObject( const Rectangle& rRect, ImpConstruct( rRect, bPixelCoords ); } -void IMapRectangleObject::ImpConstruct( const Rectangle& rRect, bool bPixel ) +void IMapRectangleObject::ImpConstruct( const tools::Rectangle& rRect, bool bPixel ) { if ( bPixel ) aRect = Application::GetDefaultDevice()->PixelToLogic( rRect, MapMode( MapUnit::Map100thMM ) ); @@ -204,9 +204,9 @@ bool IMapRectangleObject::IsHit( const Point& rPoint ) const return aRect.IsInside( rPoint ); } -Rectangle IMapRectangleObject::GetRectangle( bool bPixelCoords ) const +tools::Rectangle IMapRectangleObject::GetRectangle( bool bPixelCoords ) const { - Rectangle aNewRect; + tools::Rectangle aNewRect; if ( bPixelCoords ) aNewRect = Application::GetDefaultDevice()->LogicToPixel( aRect, MapMode( MapUnit::Map100thMM ) ); @@ -227,7 +227,7 @@ void IMapRectangleObject::Scale( const Fraction& rFracX, const Fraction& rFracY SCALEPOINT( aBR, rFracX, rFracY ); } - aRect = Rectangle( aTL, aBR ); + aRect = tools::Rectangle( aTL, aBR ); } bool IMapRectangleObject::IsEqual( const IMapRectangleObject& rEqObj ) @@ -469,7 +469,7 @@ tools::Polygon IMapPolygonObject::GetPolygon( bool bPixelCoords ) const return aNewPoly; } -void IMapPolygonObject::SetExtraEllipse( const Rectangle& rEllipse ) +void IMapPolygonObject::SetExtraEllipse( const tools::Rectangle& rEllipse ) { if ( aPoly.GetSize() ) { @@ -505,7 +505,7 @@ void IMapPolygonObject::Scale( const Fraction& rFracX, const Fraction& rFracY ) SCALEPOINT( aBR, rFracX, rFracY ); } - aEllipse = Rectangle( aTL, aBR ); + aEllipse = tools::Rectangle( aTL, aBR ); } } diff --git a/svtools/source/misc/imap2.cxx b/svtools/source/misc/imap2.cxx index 8ca4349421fd..1c86d6d4bd85 100644 --- a/svtools/source/misc/imap2.cxx +++ b/svtools/source/misc/imap2.cxx @@ -270,7 +270,7 @@ void ImageMap::ImpReadCERNLine( const OString& rLine, const OUString& rBaseURL const Point aTopLeft( ImpReadCERNCoords( &pStr ) ); const Point aBottomRight( ImpReadCERNCoords( &pStr ) ); const OUString aURL( ImpReadCERNURL( &pStr, rBaseURL ) ); - const Rectangle aRect( aTopLeft, aBottomRight ); + const tools::Rectangle aRect( aTopLeft, aBottomRight ); IMapRectangleObject* pObj = new IMapRectangleObject( aRect, aURL, OUString(), OUString(), OUString(), OUString() ); maList.push_back( pObj ); @@ -411,7 +411,7 @@ void ImageMap::ImpReadNCSALine( const OString& rLine, const OUString& rBaseURL ) const OUString aURL( ImpReadNCSAURL( &pStr, rBaseURL ) ); const Point aTopLeft( ImpReadNCSACoords( &pStr ) ); const Point aBottomRight( ImpReadNCSACoords( &pStr ) ); - const Rectangle aRect( aTopLeft, aBottomRight ); + const tools::Rectangle aRect( aTopLeft, aBottomRight ); IMapRectangleObject* pObj = new IMapRectangleObject( aRect, aURL, OUString(), OUString(), OUString(), OUString() ); maList.push_back( pObj ); diff --git a/svtools/source/svhtml/htmlout.cxx b/svtools/source/svhtml/htmlout.cxx index baf8cc6dae2c..5199ecec5d22 100644 --- a/svtools/source/svhtml/htmlout.cxx +++ b/svtools/source/svhtml/htmlout.cxx @@ -646,7 +646,7 @@ SvStream& HTMLOutFuncs::Out_ImageMap( SvStream& rStream, const IMapRectangleObject* pRectObj = static_cast<const IMapRectangleObject *>(pObj); pShape = OOO_STRING_SVTOOLS_HTML_SH_rect; - Rectangle aRect( pRectObj->GetRectangle() ); + tools::Rectangle aRect( pRectObj->GetRectangle() ); aCoords = OStringBuffer() .append(static_cast<sal_Int32>(aRect.Left())) diff --git a/svtools/source/table/gridtablerenderer.cxx b/svtools/source/table/gridtablerenderer.cxx index 157cdec4b344..8a486187a8ea 100644 --- a/svtools/source/table/gridtablerenderer.cxx +++ b/svtools/source/table/gridtablerenderer.cxx @@ -87,7 +87,7 @@ namespace svt { namespace table aDevice->SetOutputSizePixel( aBitmapSize ); DecorationView aDecoView(aDevice.get()); - aDecoView.DrawSymbol(Rectangle(aBitmapPos, aBitmapSize), + aDecoView.DrawSymbol(tools::Rectangle(aBitmapPos, aBitmapSize), i_sortAscending ? SymbolType::SPIN_UP : SymbolType::SPIN_DOWN, i_style.GetActiveColor()); @@ -124,9 +124,9 @@ namespace svt { namespace table namespace { - Rectangle lcl_getContentArea( GridTableRenderer_Impl const & i_impl, Rectangle const & i_cellArea ) + tools::Rectangle lcl_getContentArea( GridTableRenderer_Impl const & i_impl, tools::Rectangle const & i_cellArea ) { - Rectangle aContentArea( i_cellArea ); + tools::Rectangle aContentArea( i_cellArea ); if ( i_impl.bUseGridLines ) { --aContentArea.Right(); @@ -134,9 +134,9 @@ namespace svt { namespace table } return aContentArea; } - Rectangle lcl_getTextRenderingArea( Rectangle const & i_contentArea ) + tools::Rectangle lcl_getTextRenderingArea( tools::Rectangle const & i_contentArea ) { - Rectangle aTextArea( i_contentArea ); + tools::Rectangle aTextArea( i_contentArea ); aTextArea.Left() += 2; aTextArea.Right() -= 2; ++aTextArea.Top(); --aTextArea.Bottom(); return aTextArea; @@ -211,7 +211,7 @@ namespace svt { namespace table } - void GridTableRenderer::PaintHeaderArea(vcl::RenderContext& rRenderContext, const Rectangle& _rArea, + void GridTableRenderer::PaintHeaderArea(vcl::RenderContext& rRenderContext, const tools::Rectangle& _rArea, bool _bIsColHeaderArea, bool _bIsRowHeaderArea, const StyleSettings& _rStyle) { OSL_PRECOND(_bIsColHeaderArea || _bIsRowHeaderArea, "GridTableRenderer::PaintHeaderArea: invalid area flags!"); @@ -239,7 +239,7 @@ namespace svt { namespace table void GridTableRenderer::PaintColumnHeader(ColPos _nCol, bool _bActive, bool _bSelected, vcl::RenderContext& rRenderContext, - const Rectangle& _rArea, const StyleSettings& _rStyle) + const tools::Rectangle& _rArea, const StyleSettings& _rStyle) { rRenderContext.Push(PushFlags::LINECOLOR); @@ -252,7 +252,7 @@ namespace svt { namespace table Color const textColor = lcl_getEffectiveColor( m_pImpl->rModel.getTextColor(), _rStyle, &StyleSettings::GetFieldTextColor ); rRenderContext.SetTextColor(textColor); - Rectangle const aTextRect( lcl_getTextRenderingArea( lcl_getContentArea( *m_pImpl, _rArea ) ) ); + tools::Rectangle const aTextRect( lcl_getTextRenderingArea( lcl_getContentArea( *m_pImpl, _rArea ) ) ); DrawTextFlags nDrawTextFlags = lcl_getAlignmentTextDrawFlags( *m_pImpl, _nCol ) | DrawTextFlags::Clip; if (!m_pImpl->rModel.isEnabled()) nDrawTextFlags |= DrawTextFlags::Disable; @@ -303,7 +303,7 @@ namespace svt { namespace table void GridTableRenderer::PrepareRow(RowPos _nRow, bool i_hasControlFocus, bool _bSelected, vcl::RenderContext& rRenderContext, - const Rectangle& _rRowArea, const StyleSettings& _rStyle) + const tools::Rectangle& _rRowArea, const StyleSettings& _rStyle) { // remember the row for subsequent calls to the other ->ITableRenderer methods m_pImpl->nCurrentRow = _nRow; @@ -369,7 +369,7 @@ namespace svt { namespace table void GridTableRenderer::PaintRowHeader(bool /*i_hasControlFocus*/, bool /*_bSelected*/, vcl::RenderContext& rRenderContext, - const Rectangle& _rArea, const StyleSettings& _rStyle) + const tools::Rectangle& _rArea, const StyleSettings& _rStyle) { rRenderContext.Push( PushFlags::LINECOLOR | PushFlags::TEXTCOLOR ); @@ -386,7 +386,7 @@ namespace svt { namespace table _rStyle, &StyleSettings::GetFieldTextColor); rRenderContext.SetTextColor(textColor); - Rectangle const aTextRect(lcl_getTextRenderingArea(lcl_getContentArea(*m_pImpl, _rArea))); + tools::Rectangle const aTextRect(lcl_getTextRenderingArea(lcl_getContentArea(*m_pImpl, _rArea))); DrawTextFlags nDrawTextFlags = lcl_getAlignmentTextDrawFlags(*m_pImpl, 0) | DrawTextFlags::Clip; if (!m_pImpl->rModel.isEnabled()) nDrawTextFlags |= DrawTextFlags::Disable; @@ -401,13 +401,13 @@ namespace svt { namespace table struct GridTableRenderer::CellRenderContext { OutputDevice& rDevice; - Rectangle const aContentArea; + tools::Rectangle const aContentArea; StyleSettings const & rStyle; ColPos const nColumn; bool const bSelected; bool const bHasControlFocus; - CellRenderContext( OutputDevice& i_device, Rectangle const & i_contentArea, + CellRenderContext( OutputDevice& i_device, tools::Rectangle const & i_contentArea, StyleSettings const & i_style, ColPos const i_column, bool const i_selected, bool const i_hasControlFocus ) :rDevice( i_device ) ,aContentArea( i_contentArea ) @@ -421,11 +421,11 @@ namespace svt { namespace table void GridTableRenderer::PaintCell(ColPos const i_column, bool _bSelected, bool i_hasControlFocus, - vcl::RenderContext& rRenderContext, const Rectangle& _rArea, const StyleSettings& _rStyle) + vcl::RenderContext& rRenderContext, const tools::Rectangle& _rArea, const StyleSettings& _rStyle) { rRenderContext.Push(PushFlags::LINECOLOR | PushFlags::FILLCOLOR); - Rectangle const aContentArea(lcl_getContentArea(*m_pImpl, _rArea)); + tools::Rectangle const aContentArea(lcl_getContentArea(*m_pImpl, _rArea)); CellRenderContext const aCellRenderContext(rRenderContext, aContentArea, _rStyle, i_column, _bSelected, i_hasControlFocus); impl_paintCellContent(aCellRenderContext); @@ -536,7 +536,7 @@ namespace svt { namespace table i_context.rDevice.SetTextColor( textColor ); } - Rectangle const textRect( lcl_getTextRenderingArea( i_context.aContentArea ) ); + tools::Rectangle const textRect( lcl_getTextRenderingArea( i_context.aContentArea ) ); DrawTextFlags nDrawTextFlags = lcl_getAlignmentTextDrawFlags( *m_pImpl, i_context.nColumn ) | DrawTextFlags::Clip; if ( !m_pImpl->rModel.isEnabled() ) nDrawTextFlags |= DrawTextFlags::Disable; @@ -544,13 +544,13 @@ namespace svt { namespace table } - void GridTableRenderer::ShowCellCursor( vcl::Window& _rView, const Rectangle& _rCursorRect) + void GridTableRenderer::ShowCellCursor( vcl::Window& _rView, const tools::Rectangle& _rCursorRect) { _rView.ShowFocus( _rCursorRect ); } - void GridTableRenderer::HideCellCursor( vcl::Window& _rView, const Rectangle& _rCursorRect) + void GridTableRenderer::HideCellCursor( vcl::Window& _rView, const tools::Rectangle& _rCursorRect) { (void)_rCursorRect; _rView.HideFocus(); @@ -558,7 +558,7 @@ namespace svt { namespace table bool GridTableRenderer::FitsIntoCell( Any const & i_cellContent, - OutputDevice& i_targetDevice, Rectangle const & i_targetArea ) const + OutputDevice& i_targetDevice, tools::Rectangle const & i_targetArea ) const { if ( !i_cellContent.hasValue() ) return true; @@ -582,7 +582,7 @@ namespace svt { namespace table if ( sText.isEmpty() ) return true; - Rectangle const aTargetArea( lcl_getTextRenderingArea( lcl_getContentArea( *m_pImpl, i_targetArea ) ) ); + tools::Rectangle const aTargetArea( lcl_getTextRenderingArea( lcl_getContentArea( *m_pImpl, i_targetArea ) ) ); long const nTextHeight = i_targetDevice.GetTextHeight(); if ( nTextHeight > aTargetArea.GetHeight() ) diff --git a/svtools/source/table/mousefunction.cxx b/svtools/source/table/mousefunction.cxx index 1cf7f22d829b..0b947b9f5bfb 100644 --- a/svtools/source/table/mousefunction.cxx +++ b/svtools/source/table/mousefunction.cxx @@ -70,7 +70,7 @@ namespace svt { namespace table // show tracking line i_tableControl.hideTracking(); i_tableControl.showTracking( - Rectangle( + tools::Rectangle( Point( aPoint.X(), 0 ), Size( 1, tableSize.Height() ) ), diff --git a/svtools/source/table/tablecontrol.cxx b/svtools/source/table/tablecontrol.cxx index a9604b058464..bd18666c6bd6 100644 --- a/svtools/source/table/tablecontrol.cxx +++ b/svtools/source/table/tablecontrol.cxx @@ -498,7 +498,7 @@ namespace svt { namespace table } - Rectangle TableControl::GetWindowExtentsRelative( vcl::Window *pRelativeWindow ) const + tools::Rectangle TableControl::GetWindowExtentsRelative( vcl::Window *pRelativeWindow ) const { return Control::GetWindowExtentsRelative( pRelativeWindow ); } @@ -600,7 +600,7 @@ namespace svt { namespace table } - Rectangle TableControl::GetFieldCharacterBounds(sal_Int32 _nRow,sal_Int32 _nColumnPos,sal_Int32 nIndex) + tools::Rectangle TableControl::GetFieldCharacterBounds(sal_Int32 _nRow,sal_Int32 _nColumnPos,sal_Int32 nIndex) { (void)_nRow; (void)_nColumnPos; @@ -616,25 +616,25 @@ namespace svt { namespace table } - Rectangle TableControl::calcHeaderRect(bool _bIsColumnBar ) + tools::Rectangle TableControl::calcHeaderRect(bool _bIsColumnBar ) { return m_pImpl->calcHeaderRect( !_bIsColumnBar ); } - Rectangle TableControl::calcHeaderCellRect( bool _bIsColumnBar, sal_Int32 nPos ) + tools::Rectangle TableControl::calcHeaderCellRect( bool _bIsColumnBar, sal_Int32 nPos ) { return m_pImpl->calcHeaderCellRect( _bIsColumnBar, nPos ); } - Rectangle TableControl::calcTableRect() + tools::Rectangle TableControl::calcTableRect() { return m_pImpl->calcTableRect(); } - Rectangle TableControl::calcCellRect( sal_Int32 _nRowPos, sal_Int32 _nColPos ) + tools::Rectangle TableControl::calcCellRect( sal_Int32 _nRowPos, sal_Int32 _nColPos ) { return m_pImpl->calcCellRect( _nRowPos, _nColPos ); } diff --git a/svtools/source/table/tablecontrol_impl.cxx b/svtools/source/table/tablecontrol_impl.cxx index fef8a6e09066..6ac56256baee 100644 --- a/svtools/source/table/tablecontrol_impl.cxx +++ b/svtools/source/table/tablecontrol_impl.cxx @@ -478,7 +478,7 @@ namespace svt { namespace table void TableControl_Impl::impl_invalidateColumn( ColPos const i_column ) { - Rectangle const aAllCellsArea( impl_getAllVisibleCellsArea() ); + tools::Rectangle const aAllCellsArea( impl_getAllVisibleCellsArea() ); const TableColumnGeometry aColumn( *this, aAllCellsArea, i_column ); if ( aColumn.isValid() ) @@ -511,9 +511,9 @@ namespace svt { namespace table } - Rectangle TableControl_Impl::impl_getAllVisibleCellsArea() const + tools::Rectangle TableControl_Impl::impl_getAllVisibleCellsArea() const { - Rectangle aArea( Point( 0, 0 ), Size( 0, 0 ) ); + tools::Rectangle aArea( Point( 0, 0 ), Size( 0, 0 ) ); // determine the right-most border of the last column which is // at least partially visible @@ -547,9 +547,9 @@ namespace svt { namespace table } - Rectangle TableControl_Impl::impl_getAllVisibleDataCellArea() const + tools::Rectangle TableControl_Impl::impl_getAllVisibleDataCellArea() const { - Rectangle aArea( impl_getAllVisibleCellsArea() ); + tools::Rectangle aArea( impl_getAllVisibleCellsArea() ); aArea.Left() = m_nRowHeaderWidthPixel; aArea.Top() = m_nColHeaderHeightPixel; return aArea; @@ -676,7 +676,7 @@ namespace svt { namespace table with the first visible column as given. Partially fitting columns are counted, too, if the respective parameter says so. */ - TableSize lcl_getColumnsVisibleWithin( const Rectangle& _rArea, ColPos _nFirstVisibleColumn, + TableSize lcl_getColumnsVisibleWithin( const tools::Rectangle& _rArea, ColPos _nFirstVisibleColumn, const TableControl_Impl& _rControl, bool _bAcceptPartialRow ) { TableSize visibleColumns = 0; @@ -982,7 +982,7 @@ namespace svt { namespace table // determine the playground for the data cells (excluding headers) // TODO: what if the control is smaller than needed for the headers/scrollbars? - Rectangle aDataCellPlayground( Point( 0, 0 ), m_rAntiImpl.GetOutputSizePixel() ); + tools::Rectangle aDataCellPlayground( Point( 0, 0 ), m_rAntiImpl.GetOutputSizePixel() ); aDataCellPlayground.Left() = m_nRowHeaderWidthPixel; aDataCellPlayground.Top() = m_nColHeaderHeightPixel; @@ -1084,7 +1084,7 @@ namespace svt { namespace table } - void TableControl_Impl::impl_ni_positionChildWindows( Rectangle const & i_dataCellPlayground, + void TableControl_Impl::impl_ni_positionChildWindows( tools::Rectangle const & i_dataCellPlayground, bool const i_verticalScrollbar, bool const i_horizontalScrollbar ) { long const nScrollbarMetrics = m_rAntiImpl.GetSettings().GetStyleSettings().GetScrollBarSize(); @@ -1106,7 +1106,7 @@ namespace svt { namespace table // position it if ( m_pVScroll ) { - Rectangle aScrollbarArea( + tools::Rectangle aScrollbarArea( Point( i_dataCellPlayground.Right() + 1, 0 ), Size( nScrollbarMetrics, i_dataCellPlayground.Bottom() + 1 ) ); @@ -1141,7 +1141,7 @@ namespace svt { namespace table m_pHScroll->SetPageSize( nVisibleUnits - 1 ); } } - Rectangle aScrollbarArea( + tools::Rectangle aScrollbarArea( Point( 0, i_dataCellPlayground.Bottom() + 1 ), Size( i_dataCellPlayground.Right() + 1, nScrollbarMetrics ) ); @@ -1184,7 +1184,7 @@ namespace svt { namespace table } - void TableControl_Impl::doPaintContent(vcl::RenderContext& rRenderContext, const Rectangle& _rUpdateRect) + void TableControl_Impl::doPaintContent(vcl::RenderContext& rRenderContext, const tools::Rectangle& _rUpdateRect) { if (!getModel()) return; @@ -1198,13 +1198,13 @@ namespace svt { namespace table m_nRowCount = m_pModel->getRowCount(); // the area occupied by all (at least partially) visible cells, including // headers - Rectangle const aAllCellsWithHeaders( impl_getAllVisibleCellsArea() ); + tools::Rectangle const aAllCellsWithHeaders( impl_getAllVisibleCellsArea() ); // draw the header column area if (m_pModel->hasColumnHeaders()) { - TableRowGeometry const aHeaderRow(*this, Rectangle(Point(0, 0), aAllCellsWithHeaders.BottomRight()), ROW_COL_HEADERS); - Rectangle const aColRect(aHeaderRow.getRect()); + TableRowGeometry const aHeaderRow(*this, tools::Rectangle(Point(0, 0), aAllCellsWithHeaders.BottomRight()), ROW_COL_HEADERS); + tools::Rectangle const aColRect(aHeaderRow.getRect()); pRenderer->PaintHeaderArea(rRenderContext, aColRect, true, false, rStyle); // Note that strictly, aHeaderRow.getRect() also contains the intersection between column // and row header area. However, below we go to paint this intersection, again, @@ -1221,7 +1221,7 @@ namespace svt { namespace table } } // the area occupied by the row header, if any - Rectangle aRowHeaderArea; + tools::Rectangle aRowHeaderArea; if (m_pModel->hasRowHeaders()) { aRowHeaderArea = aAllCellsWithHeaders; @@ -1240,9 +1240,9 @@ namespace svt { namespace table if (m_pModel->hasColumnHeaders()) { - TableCellGeometry const aIntersection(*this, Rectangle(Point(0, 0), aAllCellsWithHeaders.BottomRight()), + TableCellGeometry const aIntersection(*this, tools::Rectangle(Point(0, 0), aAllCellsWithHeaders.BottomRight()), COL_ROW_HEADERS, ROW_COL_HEADERS); - Rectangle const aInters(aIntersection.getRect()); + tools::Rectangle const aInters(aIntersection.getRect()); pRenderer->PaintHeaderArea(rRenderContext, aInters, true, true, rStyle); } } @@ -1251,7 +1251,7 @@ namespace svt { namespace table TableSize colCount = getModel()->getColumnCount(); // paint all rows - Rectangle const aAllDataCellsArea(impl_getAllVisibleDataCellArea()); + tools::Rectangle const aAllDataCellsArea(impl_getAllVisibleDataCellArea()); for (TableRowGeometry aRowIterator(*this, aAllCellsWithHeaders, getTopRow()); aRowIterator.isValid(); aRowIterator.moveDown()) { if (_rUpdateRect.GetIntersection(aRowIterator.getRect() ).IsEmpty()) @@ -1260,7 +1260,7 @@ namespace svt { namespace table bool const isControlFocused = m_rAntiImpl.HasControlFocus(); bool const isSelectedRow = isRowSelected(aRowIterator.getRow()); - Rectangle const aRect = aRowIterator.getRect().GetIntersection(aAllDataCellsArea); + tools::Rectangle const aRect = aRowIterator.getRect().GetIntersection(aAllDataCellsArea); // give the renderer a chance to prepare the row pRenderer->PrepareRow(aRowIterator.getRow(), isControlFocused, isSelectedRow, rRenderContext, aRect, rStyle); @@ -1268,7 +1268,7 @@ namespace svt { namespace table // paint the row header if (m_pModel->hasRowHeaders()) { - const Rectangle aCurrentRowHeader(aRowHeaderArea.GetIntersection(aRowIterator.getRect())); + const tools::Rectangle aCurrentRowHeader(aRowHeaderArea.GetIntersection(aRowIterator.getRect())); pRenderer->PaintRowHeader(isControlFocused, isSelectedRow, rRenderContext, aCurrentRowHeader, rStyle); } @@ -1677,7 +1677,7 @@ namespace svt { namespace table PTableRenderer pRenderer = !!m_pModel ? m_pModel->getRenderer() : PTableRenderer(); if ( !!pRenderer ) { - Rectangle aCellRect; + tools::Rectangle aCellRect; impl_getCellRect( m_nCurColumn, m_nCurRow, aCellRect ); if ( _bShow ) pRenderer->ShowCellCursor( *m_pDataWindow, aCellRect ); @@ -1687,7 +1687,7 @@ namespace svt { namespace table } - void TableControl_Impl::impl_getCellRect( ColPos _nColumn, RowPos _nRow, Rectangle& _rCellRect ) const + void TableControl_Impl::impl_getCellRect( ColPos _nColumn, RowPos _nRow, tools::Rectangle& _rCellRect ) const { if ( !m_pModel || ( COL_INVALID == _nColumn ) @@ -1822,7 +1822,7 @@ namespace svt { namespace table } - void TableControl_Impl::showTracking( Rectangle const & i_location, ShowTrackFlags const i_flags ) + void TableControl_Impl::showTracking( tools::Rectangle const & i_location, ShowTrackFlags const i_flags ) { m_pDataWindow->ShowTracking( i_location, i_flags ); } @@ -1837,15 +1837,15 @@ namespace svt { namespace table void TableControl_Impl::invalidateSelectedRegion( RowPos _nPrevRow, RowPos _nCurRow ) { // get the visible area of the table control and set the Left and right border of the region to be repainted - Rectangle const aAllCells( impl_getAllVisibleCellsArea() ); + tools::Rectangle const aAllCells( impl_getAllVisibleCellsArea() ); - Rectangle aInvalidateRect; + tools::Rectangle aInvalidateRect; aInvalidateRect.Left() = aAllCells.Left(); aInvalidateRect.Right() = aAllCells.Right(); // if only one row is selected if ( _nPrevRow == _nCurRow ) { - Rectangle aCellRect; + tools::Rectangle aCellRect; impl_getCellRect( m_nCurColumn, _nCurRow, aCellRect ); aInvalidateRect.Top() = aCellRect.Top(); aInvalidateRect.Bottom() = aCellRect.Bottom(); @@ -1853,7 +1853,7 @@ namespace svt { namespace table //if the region is above the current row else if(_nPrevRow < _nCurRow ) { - Rectangle aCellRect; + tools::Rectangle aCellRect; impl_getCellRect( m_nCurColumn, _nPrevRow, aCellRect ); aInvalidateRect.Top() = aCellRect.Top(); impl_getCellRect( m_nCurColumn, _nCurRow, aCellRect ); @@ -1862,7 +1862,7 @@ namespace svt { namespace table //if the region is beneath the current row else { - Rectangle aCellRect; + tools::Rectangle aCellRect; impl_getCellRect( m_nCurColumn, _nCurRow, aCellRect ); aInvalidateRect.Top() = aCellRect.Top(); impl_getCellRect( m_nCurColumn, _nPrevRow, aCellRect ); @@ -1872,7 +1872,7 @@ namespace svt { namespace table invalidateRect(aInvalidateRect); } - void TableControl_Impl::invalidateRect(const Rectangle &rInvalidateRect) + void TableControl_Impl::invalidateRect(const tools::Rectangle &rInvalidateRect) { m_pDataWindow->Invalidate( rInvalidateRect, m_pDataWindow->GetControlBackground().GetTransparency() ? InvalidateFlags::Transparent : InvalidateFlags::NONE ); @@ -1897,9 +1897,9 @@ namespace svt { namespace table RowPos const lastVisibleRow = m_nTopRow + impl_getVisibleRows( true ) - 1; RowPos const lastRow = ( ( i_lastRow == ROW_INVALID ) || ( i_lastRow > lastVisibleRow ) ) ? lastVisibleRow : i_lastRow; - Rectangle aInvalidateRect; + tools::Rectangle aInvalidateRect; - Rectangle const aVisibleCellsArea( impl_getAllVisibleCellsArea() ); + tools::Rectangle const aVisibleCellsArea( impl_getAllVisibleCellsArea() ); TableRowGeometry aRow( *this, aVisibleCellsArea, firstRow, true ); while ( aRow.isValid() && ( aRow.getRow() <= lastRow ) ) { @@ -1962,7 +1962,7 @@ namespace svt { namespace table DBG_ASSERT( m_pDataWindow, "TableControl_Impl::impl_getVisibleColumns: no data window!" ); return lcl_getColumnsVisibleWithin( - Rectangle( Point( 0, 0 ), m_pDataWindow->GetOutputSizePixel() ), + tools::Rectangle( Point( 0, 0 ), m_pDataWindow->GetOutputSizePixel() ), m_nLeftColumn, *this, _bAcceptPartialCol @@ -2059,7 +2059,7 @@ namespace svt { namespace table // scroll the view port, if possible long nPixelDelta = m_nRowHeightPixel * ( m_nTopRow - nOldTopRow ); - Rectangle aDataArea( Point( 0, m_nColHeaderHeightPixel ), m_pDataWindow->GetOutputSizePixel() ); + tools::Rectangle aDataArea( Point( 0, m_nColHeaderHeightPixel ), m_pDataWindow->GetOutputSizePixel() ); if ( m_pDataWindow->GetBackground().IsScrollable() && std::abs( nPixelDelta ) < aDataArea.GetHeight() @@ -2121,7 +2121,7 @@ namespace svt { namespace table // Same for onEndScroll // scroll the view port, if possible - const Rectangle aDataArea( Point( m_nRowHeaderWidthPixel, 0 ), m_pDataWindow->GetOutputSizePixel() ); + const tools::Rectangle aDataArea( Point( m_nRowHeaderWidthPixel, 0 ), m_pDataWindow->GetOutputSizePixel() ); long nPixelDelta = m_aColumnWidths[ nOldLeftColumn ].getStart() @@ -2338,20 +2338,20 @@ namespace svt { namespace table } - Rectangle TableControl_Impl::calcHeaderRect(bool bColHeader) + tools::Rectangle TableControl_Impl::calcHeaderRect(bool bColHeader) { - Rectangle const aRectTableWithHeaders( impl_getAllVisibleCellsArea() ); + tools::Rectangle const aRectTableWithHeaders( impl_getAllVisibleCellsArea() ); Size const aSizeTableWithHeaders( aRectTableWithHeaders.GetSize() ); if ( bColHeader ) - return Rectangle( aRectTableWithHeaders.TopLeft(), Size( aSizeTableWithHeaders.Width(), m_nColHeaderHeightPixel ) ); + return tools::Rectangle( aRectTableWithHeaders.TopLeft(), Size( aSizeTableWithHeaders.Width(), m_nColHeaderHeightPixel ) ); else - return Rectangle( aRectTableWithHeaders.TopLeft(), Size( m_nRowHeaderWidthPixel, aSizeTableWithHeaders.Height() ) ); + return tools::Rectangle( aRectTableWithHeaders.TopLeft(), Size( m_nRowHeaderWidthPixel, aSizeTableWithHeaders.Height() ) ); } - Rectangle TableControl_Impl::calcHeaderCellRect( bool bColHeader, sal_Int32 nPos ) + tools::Rectangle TableControl_Impl::calcHeaderCellRect( bool bColHeader, sal_Int32 nPos ) { - Rectangle const aHeaderRect = calcHeaderRect( bColHeader ); + tools::Rectangle const aHeaderRect = calcHeaderRect( bColHeader ); TableCellGeometry const aGeometry( *this, aHeaderRect, bColHeader ? nPos : COL_ROW_HEADERS, @@ -2361,15 +2361,15 @@ namespace svt { namespace table } - Rectangle TableControl_Impl::calcTableRect() + tools::Rectangle TableControl_Impl::calcTableRect() { return impl_getAllVisibleDataCellArea(); } - Rectangle TableControl_Impl::calcCellRect( sal_Int32 nRow, sal_Int32 nCol ) + tools::Rectangle TableControl_Impl::calcCellRect( sal_Int32 nRow, sal_Int32 nCol ) { - Rectangle aCellRect; + tools::Rectangle aCellRect; impl_getCellRect( nRow, nCol, aCellRect ); return aCellRect; } diff --git a/svtools/source/table/tablecontrol_impl.hxx b/svtools/source/table/tablecontrol_impl.hxx index 9fdd30d180c9..e03942aec4f8 100644 --- a/svtools/source/table/tablecontrol_impl.hxx +++ b/svtools/source/table/tablecontrol_impl.hxx @@ -159,7 +159,7 @@ namespace svt { namespace table /** paints the table control content which intersects with the given rectangle */ - void doPaintContent(vcl::RenderContext& rRenderContext, const Rectangle& _rUpdateRect); + void doPaintContent(vcl::RenderContext& rRenderContext, const tools::Rectangle& _rUpdateRect); /** moves the cursor to the cell with the given coordinates @@ -185,7 +185,7 @@ namespace svt { namespace table /** returns the position of the current row in the selection vector */ static int getRowSelectedNumber(const ::std::vector<RowPos>& selectedRows, RowPos current); - void invalidateRect(const Rectangle &rInvalidateRect); + void invalidateRect(const tools::Rectangle &rInvalidateRect); /** ??? */ void invalidateSelectedRegion( RowPos _nPrevRow, RowPos _nCurRow ); @@ -258,7 +258,7 @@ namespace svt { namespace table virtual void invalidate( TableArea const i_what ) override; virtual long pixelWidthToAppFont( long const i_pixels ) const override; virtual void hideTracking() override; - virtual void showTracking( Rectangle const & i_location, ShowTrackFlags const i_flags ) override; + virtual void showTracking( tools::Rectangle const & i_location, ShowTrackFlags const i_flags ) override; RowPos getRowAtPoint( const Point& rPoint ) const; ColPos getColAtPoint( const Point& rPoint ) const; virtual TableCell hitTest( const Point& rPoint ) const override; @@ -273,10 +273,10 @@ namespace svt { namespace table ScrollBar* getHorzScrollbar() { return m_pHScroll; } ScrollBar* getVertScrollbar() { return m_pVScroll; } - Rectangle calcHeaderRect( bool bColHeader ); - Rectangle calcHeaderCellRect( bool bColHeader, sal_Int32 nPos ); - Rectangle calcTableRect(); - Rectangle calcCellRect( sal_Int32 nRow, sal_Int32 nCol ); + tools::Rectangle calcHeaderRect( bool bColHeader ); + tools::Rectangle calcHeaderCellRect( bool bColHeader, sal_Int32 nPos ); + tools::Rectangle calcTableRect(); + tools::Rectangle calcCellRect( sal_Int32 nRow, sal_Int32 nCol ); // A11Y css::uno::Reference< css::accessibility::XAccessible > @@ -334,7 +334,7 @@ namespace svt { namespace table /** determines the rectangle occupied by the given cell */ - void impl_getCellRect( ColPos _nColumn, RowPos _nRow, Rectangle& _rCellRect ) const; + void impl_getCellRect( ColPos _nColumn, RowPos _nRow, tools::Rectangle& _rCellRect ) const; /** updates all cached model values @@ -382,7 +382,7 @@ namespace svt { namespace table /** positions all child windows, e.g. the both scrollbars, the corner window, and the data window */ void impl_ni_positionChildWindows( - Rectangle const & i_dataCellPlayground, + tools::Rectangle const & i_dataCellPlayground, bool const i_verticalScrollbar, bool const i_horizontalScrollbar ); @@ -428,14 +428,14 @@ namespace svt { namespace table As a result of respecting the partial visibility of rows and columns, the returned area might be larger than the data window's output size. */ - Rectangle impl_getAllVisibleCellsArea() const; + tools::Rectangle impl_getAllVisibleCellsArea() const; /** retrieves the area occupied by all (at least partially) visible data cells. Effectively, the returned area is the same as returned by ->impl_getAllVisibleCellsArea, minus the row and column header areas. */ - Rectangle impl_getAllVisibleDataCellArea() const; + tools::Rectangle impl_getAllVisibleDataCellArea() const; /** retrieves the column which covers the given ordinate */ diff --git a/svtools/source/table/tabledatawindow.cxx b/svtools/source/table/tabledatawindow.cxx index a295b2e3241b..2c3cb1e8ddaa 100644 --- a/svtools/source/table/tabledatawindow.cxx +++ b/svtools/source/table/tabledatawindow.cxx @@ -51,7 +51,7 @@ namespace svt { namespace table Window::dispose(); } - void TableDataWindow::Paint( vcl::RenderContext& rRenderContext, const Rectangle& rUpdateRect ) + void TableDataWindow::Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& rUpdateRect ) { m_rTableControl.doPaintContent(rRenderContext, rUpdateRect); } @@ -91,9 +91,9 @@ namespace svt { namespace table pTableModel->getCellContent( hitCol, hitRow, aCellToolTip ); // use the cell content as tool tip only if it doesn't fit into the cell. - Rectangle const aWindowRect( Point( 0, 0 ), GetOutputSizePixel() ); + tools::Rectangle const aWindowRect( Point( 0, 0 ), GetOutputSizePixel() ); TableCellGeometry const aCell( m_rTableControl, aWindowRect, hitCol, hitRow ); - Rectangle const aCellRect( aCell.getRect() ); + tools::Rectangle const aCellRect( aCell.getRect() ); PTableRenderer const pRenderer = pTableModel->getRenderer(); if ( pRenderer->FitsIntoCell( aCellToolTip, *this, aCellRect ) ) @@ -112,7 +112,7 @@ namespace svt { namespace table // hide the standard (singleton) help window, so we do not have two help windows open at the same time Help::HideBalloonAndQuickHelp(); - Rectangle const aControlScreenRect( + tools::Rectangle const aControlScreenRect( OutputToScreenPixel( Point( 0, 0 ) ), GetOutputSizePixel() ); diff --git a/svtools/source/table/tabledatawindow.hxx b/svtools/source/table/tabledatawindow.hxx index d7786fcdea42..f38ce108ce2c 100644 --- a/svtools/source/table/tabledatawindow.hxx +++ b/svtools/source/table/tabledatawindow.hxx @@ -50,7 +50,7 @@ namespace svt { namespace table } // Window overridables - 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; diff --git a/svtools/source/table/tablegeometry.cxx b/svtools/source/table/tablegeometry.cxx index feeb5b9aec8d..1c07ef4411aa 100644 --- a/svtools/source/table/tablegeometry.cxx +++ b/svtools/source/table/tablegeometry.cxx @@ -29,7 +29,7 @@ namespace svt { namespace table //= TableRowGeometry - TableRowGeometry::TableRowGeometry( TableControl_Impl const & _rControl, Rectangle const & _rBoundaries, + TableRowGeometry::TableRowGeometry( TableControl_Impl const & _rControl, tools::Rectangle const & _rBoundaries, RowPos const _nRow, bool const i_allowVirtualRows ) :TableGeometry( _rControl, _rBoundaries ) ,m_nRowPos( _nRow ) @@ -86,7 +86,7 @@ namespace svt { namespace table //= TableColumnGeometry - TableColumnGeometry::TableColumnGeometry( TableControl_Impl const & _rControl, Rectangle const & _rBoundaries, + TableColumnGeometry::TableColumnGeometry( TableControl_Impl const & _rControl, tools::Rectangle const & _rBoundaries, ColPos const _nCol ) :TableGeometry( _rControl, _rBoundaries ) ,m_nColPos( _nCol ) diff --git a/svtools/source/table/tablegeometry.hxx b/svtools/source/table/tablegeometry.hxx index c6ffba2ce972..f4ac0ca0e6a6 100644 --- a/svtools/source/table/tablegeometry.hxx +++ b/svtools/source/table/tablegeometry.hxx @@ -38,13 +38,13 @@ namespace svt { namespace table { protected: const TableControl_Impl& m_rControl; - const Rectangle& m_rBoundaries; - Rectangle m_aRect; + const tools::Rectangle& m_rBoundaries; + tools::Rectangle m_aRect; protected: TableGeometry( const TableControl_Impl& _rControl, - const Rectangle& _rBoundaries + const tools::Rectangle& _rBoundaries ) :m_rControl( _rControl ) ,m_rBoundaries( _rBoundaries ) @@ -57,7 +57,7 @@ namespace svt { namespace table const TableControl_Impl& getControl() const { return m_rControl; } // status - const Rectangle& getRect() const { return m_aRect; } + const tools::Rectangle& getRect() const { return m_aRect; } bool isValid() const { return !m_aRect.GetIntersection( m_rBoundaries ).IsEmpty(); } }; @@ -73,7 +73,7 @@ namespace svt { namespace table public: TableRowGeometry( TableControl_Impl const & _rControl, - Rectangle const & _rBoundaries, + tools::Rectangle const & _rBoundaries, RowPos const _nRow, bool const i_allowVirtualRows = false // allow rows >= getRowCount()? @@ -100,7 +100,7 @@ namespace svt { namespace table public: TableColumnGeometry( TableControl_Impl const & _rControl, - Rectangle const & _rBoundaries, + tools::Rectangle const & _rBoundaries, ColPos const _nCol ); @@ -128,7 +128,7 @@ namespace svt { namespace table public: TableCellGeometry( TableControl_Impl const & _rControl, - Rectangle const & _rBoundaries, + tools::Rectangle const & _rBoundaries, ColPos const _nCol, RowPos const _nRow ) @@ -146,7 +146,7 @@ namespace svt { namespace table { } - Rectangle getRect() const { return m_aRow.getRect().GetIntersection( m_aCol.getRect() ); } + tools::Rectangle getRect() const { return m_aRow.getRect().GetIntersection( m_aCol.getRect() ); } ColPos getColumn() const { return m_aCol.getCol(); } bool isValid() const { return !getRect().IsEmpty(); } diff --git a/svtools/source/uno/statusbarcontroller.cxx b/svtools/source/uno/statusbarcontroller.cxx index b44e1771ca43..792612a61ca3 100644 --- a/svtools/source/uno/statusbarcontroller.cxx +++ b/svtools/source/uno/statusbarcontroller.cxx @@ -490,9 +490,9 @@ void StatusbarController::bindListener() } } -::Rectangle StatusbarController::getControlRect() const +::tools::Rectangle StatusbarController::getControlRect() const { - ::Rectangle aRect; + ::tools::Rectangle aRect; { SolarMutexGuard aSolarMutexGuard; diff --git a/svtools/source/uno/treecontrolpeer.cxx b/svtools/source/uno/treecontrolpeer.cxx index 36a0c862f7b5..c807b2a2e2c9 100644 --- a/svtools/source/uno/treecontrolpeer.cxx +++ b/svtools/source/uno/treecontrolpeer.cxx @@ -834,7 +834,7 @@ awt::Rectangle SAL_CALL TreeControlPeer::getNodeRect( const Reference< XTreeNode UnoTreeListBoxImpl& rTree = getTreeListBoxOrThrow(); UnoTreeListEntry* pEntry = getEntry( i_Node ); - ::Rectangle aEntryRect( rTree.GetFocusRect( pEntry, rTree.GetEntryPosition( pEntry ).Y() ) ); + ::tools::Rectangle aEntryRect( rTree.GetFocusRect( pEntry, rTree.GetEntryPosition( pEntry ).Y() ) ); return VCLUnoHelper::ConvertToAWTRect( aEntryRect ); } @@ -1507,7 +1507,7 @@ void UnoTreeListItem::Paint( aPos.X() += nWidth; aSize.Width() -= nWidth; } - rRenderContext.DrawText(Rectangle(aPos,aSize),maText, rDev.IsEnabled() ? DrawTextFlags::NONE : DrawTextFlags::Disable); + rRenderContext.DrawText(tools::Rectangle(aPos,aSize),maText, rDev.IsEnabled() ? DrawTextFlags::NONE : DrawTextFlags::Disable); } diff --git a/svtools/source/uno/unoimap.cxx b/svtools/source/uno/unoimap.cxx index 225881757402..c2bf4a7145da 100644 --- a/svtools/source/uno/unoimap.cxx +++ b/svtools/source/uno/unoimap.cxx @@ -207,7 +207,7 @@ SvUnoImageMapObject::SvUnoImageMapObject( const IMapObject& rMapObject, const Sv { case IMAP_OBJ_RECTANGLE: { - const Rectangle aRect( static_cast<const IMapRectangleObject*>(&rMapObject)->GetRectangle(false) ); + const tools::Rectangle aRect( static_cast<const IMapRectangleObject*>(&rMapObject)->GetRectangle(false) ); maBoundary.X = aRect.Left(); maBoundary.Y = aRect.Top(); maBoundary.Width = aRect.GetWidth(); @@ -260,7 +260,7 @@ IMapObject* SvUnoImageMapObject::createIMapObject() const { case IMAP_OBJ_RECTANGLE: { - const Rectangle aRect( maBoundary.X, maBoundary.Y, maBoundary.X + maBoundary.Width - 1, maBoundary.Y + maBoundary.Height - 1 ); + const tools::Rectangle aRect( maBoundary.X, maBoundary.Y, maBoundary.X + maBoundary.Width - 1, maBoundary.Y + maBoundary.Height - 1 ); pNewIMapObject = new IMapRectangleObject( aRect, aURL, aAltText, aDesc, aTarget, aName, mbIsActive, false ); } break; diff --git a/svx/inc/dragmt3d.hxx b/svx/inc/dragmt3d.hxx index 1bf8f9b2bcbd..0966fbf91981 100644 --- a/svx/inc/dragmt3d.hxx +++ b/svx/inc/dragmt3d.hxx @@ -58,7 +58,7 @@ protected: ::std::vector< E3dDragMethodUnit > maGrp; E3dDragConstraint meConstraint; Point maLastPos; - Rectangle maFullBound; + tools::Rectangle maFullBound; bool mbMoveFull; bool mbMovedAtAll; diff --git a/svx/inc/sdr/properties/itemsettools.hxx b/svx/inc/sdr/properties/itemsettools.hxx index fbecdef4f249..cef08ef4907f 100644 --- a/svx/inc/sdr/properties/itemsettools.hxx +++ b/svx/inc/sdr/properties/itemsettools.hxx @@ -24,7 +24,7 @@ class SdrObject; class SfxItemSet; -class Rectangle; +namespace tools { class Rectangle; } class Fraction; // class to remember broadcast start positions @@ -42,7 +42,7 @@ namespace sdr ~ItemChangeBroadcaster(); sal_uInt32 GetRectangleCount() const { return mnCount; } - const Rectangle& GetRectangle(sal_uInt32 nIndex) const; + const tools::Rectangle& GetRectangle(sal_uInt32 nIndex) const; }; } // end of namespace properties } // end of namespace sdr diff --git a/svx/inc/svdibrow.hxx b/svx/inc/svdibrow.hxx index 525e81a588ed..bcfe6a1dcc7b 100644 --- a/svx/inc/svdibrow.hxx +++ b/svx/inc/svdibrow.hxx @@ -61,12 +61,12 @@ private: protected: virtual long GetRowCount() const override; virtual bool SeekRow(long nRow) override; - virtual void PaintField(OutputDevice& rDev, const Rectangle& rRect, sal_uInt16 nColumnId) const override; + virtual void PaintField(OutputDevice& rDev, const tools::Rectangle& rRect, sal_uInt16 nColumnId) const override; virtual void DoubleClick(const BrowserMouseEvent&) override; virtual void KeyInput(const KeyEvent& rEvt) override; virtual void Select() override; void SetDirty(); // is called for example in mode switches - virtual Rectangle GetFieldCharacterBounds(sal_Int32 _nRow,sal_Int32 _nColumnPos,sal_Int32 nIndex) override; + virtual tools::Rectangle GetFieldCharacterBounds(sal_Int32 _nRow,sal_Int32 _nColumnPos,sal_Int32 nIndex) override; virtual sal_Int32 GetFieldIndexAtPoint(sal_Int32 _nRow,sal_Int32 _nColumnPos,const Point& _rPoint) override; public: SdrItemBrowserControl(vcl::Window* pParent); diff --git a/svx/source/accessibility/AccessibleEmptyEditSource.cxx b/svx/source/accessibility/AccessibleEmptyEditSource.cxx index 5b329f48a334..ea020a63dc40 100644 --- a/svx/source/accessibility/AccessibleEmptyEditSource.cxx +++ b/svx/source/accessibility/AccessibleEmptyEditSource.cxx @@ -131,8 +131,8 @@ namespace accessibility sal_Int32 GetFieldCount( sal_Int32 ) const override { return 0; } EFieldInfo GetFieldInfo( sal_Int32, sal_uInt16 ) const override { return EFieldInfo(); } EBulletInfo GetBulletInfo( sal_Int32 ) const override { return EBulletInfo(); } - Rectangle GetCharBounds( sal_Int32, sal_Int32 ) const override { return Rectangle(); } - Rectangle GetParaBounds( sal_Int32 ) const override { return Rectangle(); } + tools::Rectangle GetCharBounds( sal_Int32, sal_Int32 ) const override { return tools::Rectangle(); } + tools::Rectangle GetParaBounds( sal_Int32 ) const override { return tools::Rectangle(); } MapMode GetMapMode() const override { return MapMode(); } OutputDevice* GetRefDevice() const override { return nullptr; } bool GetIndexAtPoint( const Point&, sal_Int32&, sal_Int32& ) const override { return false; } @@ -157,7 +157,7 @@ namespace accessibility sal_Int16 GetDepth( sal_Int32 ) const override { return -1; } bool SetDepth( sal_Int32, sal_Int16 ) override { return true; } - Rectangle GetVisArea() const override { return Rectangle(); } + tools::Rectangle GetVisArea() const override { return tools::Rectangle(); } Point LogicToPixel( const Point& rPoint, const MapMode& /*rMapMode*/ ) const override { return rPoint; } Point PixelToLogic( const Point& rPoint, const MapMode& /*rMapMode*/ ) const override { return rPoint; } diff --git a/svx/source/accessibility/AccessibleFrameSelector.cxx b/svx/source/accessibility/AccessibleFrameSelector.cxx index 02c3aedb571e..105d9b8be162 100644 --- a/svx/source/accessibility/AccessibleFrameSelector.cxx +++ b/svx/source/accessibility/AccessibleFrameSelector.cxx @@ -272,7 +272,7 @@ css::awt::Rectangle AccFrameSelector::getBounds( ) aPos = mpFrameSel->GetPosPixel(); break; default: - const Rectangle aSpot = mpFrameSel->GetClickBoundRect( meBorder ); + const tools::Rectangle aSpot = mpFrameSel->GetClickBoundRect( meBorder ); aPos = aSpot.TopLeft(); aSz = aSpot.GetSize(); } @@ -296,7 +296,7 @@ css::awt::Point AccFrameSelector::getLocation( ) aPos = mpFrameSel->GetPosPixel(); break; default: - const Rectangle aSpot = mpFrameSel->GetClickBoundRect( meBorder ); + const tools::Rectangle aSpot = mpFrameSel->GetClickBoundRect( meBorder ); aPos = aSpot.TopLeft(); } css::awt::Point aRet(aPos.X(), aPos.Y()); @@ -315,7 +315,7 @@ css::awt::Point AccFrameSelector::getLocationOnScreen( ) aPos = mpFrameSel->GetPosPixel(); break; default: - const Rectangle aSpot = mpFrameSel->GetClickBoundRect( meBorder ); + const tools::Rectangle aSpot = mpFrameSel->GetClickBoundRect( meBorder ); aPos = aSpot.TopLeft(); } aPos = mpFrameSel->OutputToAbsoluteScreenPixel( aPos ); @@ -335,7 +335,7 @@ css::awt::Size AccFrameSelector::getSize( ) aSz = mpFrameSel->GetSizePixel(); break; default: - const Rectangle aSpot = mpFrameSel->GetClickBoundRect( meBorder ); + const tools::Rectangle aSpot = mpFrameSel->GetClickBoundRect( meBorder ); aSz = aSpot.GetSize(); } css::awt::Size aRet(aSz.Width(), aSz.Height()); diff --git a/svx/source/accessibility/AccessibleShape.cxx b/svx/source/accessibility/AccessibleShape.cxx index 996fff3283fc..de059e9bb7fd 100644 --- a/svx/source/accessibility/AccessibleShape.cxx +++ b/svx/source/accessibility/AccessibleShape.cxx @@ -597,10 +597,10 @@ awt::Rectangle SAL_CALL AccessibleShape::getBounds() int y = aPixelPosition.getY() - aParentLocation.Y; // Clip with parent (with coordinates relative to itself). - ::Rectangle aBBox ( + ::tools::Rectangle aBBox ( x, y, x + aPixelSize.getWidth(), y + aPixelSize.getHeight()); awt::Size aParentSize (xParentComponent->getSize()); - ::Rectangle aParentBBox (0,0, aParentSize.Width, aParentSize.Height); + ::tools::Rectangle aParentBBox (0,0, aParentSize.Width, aParentSize.Height); aBBox = aBBox.GetIntersection (aParentBBox); aBoundingBox = awt::Rectangle ( aBBox.getX(), diff --git a/svx/source/accessibility/AccessibleTextHelper.cxx b/svx/source/accessibility/AccessibleTextHelper.cxx index c30ec415c6c7..c1c93b18ba6c 100644 --- a/svx/source/accessibility/AccessibleTextHelper.cxx +++ b/svx/source/accessibility/AccessibleTextHelper.cxx @@ -764,19 +764,19 @@ namespace accessibility SvxTextForwarder& rCacheTF = GetTextForwarder(); SvxViewForwarder& rCacheVF = GetViewForwarder(); - Rectangle aViewArea = rCacheVF.GetVisArea(); + tools::Rectangle aViewArea = rCacheVF.GetVisArea(); if( IsActive() ) { // maybe the edit view scrolls, adapt aViewArea - Rectangle aEditViewArea = GetEditViewForwarder().GetVisArea(); + tools::Rectangle aEditViewArea = GetEditViewForwarder().GetVisArea(); aViewArea += aEditViewArea.TopLeft(); // now determine intersection aViewArea.Intersection( aEditViewArea ); } - Rectangle aTmpBB, aParaBB; + tools::Rectangle aTmpBB, aParaBB; bool bFirstChild = true; sal_Int32 nCurrPara; sal_Int32 nParas=rCacheTF.GetParagraphCount(); @@ -1585,7 +1585,7 @@ namespace accessibility DBG_ASSERT(nChild >= 0 && nChild <= USHRT_MAX, "AccessibleTextHelper_Impl::getAccessibleAt: index value overflow"); - Rectangle aParaBounds( rCacheTF.GetParaBounds( nChild ) ); + tools::Rectangle aParaBounds( rCacheTF.GetParaBounds( nChild ) ); if( aParaBounds.IsInside( aLogPoint ) ) return getAccessibleChild( nChild - mnFirstVisibleChild + GetStartIndex() ); diff --git a/svx/source/accessibility/ChildrenManagerImpl.cxx b/svx/source/accessibility/ChildrenManagerImpl.cxx index 6ef89c027654..c4b72ffd70ff 100644 --- a/svx/source/accessibility/ChildrenManagerImpl.cxx +++ b/svx/source/accessibility/ChildrenManagerImpl.cxx @@ -202,7 +202,7 @@ void ChildrenManagerImpl::Update (bool bCreateNewObjectsOnDemand) { if (maShapeTreeInfo.GetViewForwarder() == nullptr) return; - Rectangle aVisibleArea = maShapeTreeInfo.GetViewForwarder()->GetVisibleArea(); + tools::Rectangle aVisibleArea = maShapeTreeInfo.GetViewForwarder()->GetVisibleArea(); // 1. Create a local list of visible shapes. ChildDescriptorListType aChildList; @@ -281,7 +281,7 @@ void ChildrenManagerImpl::CreateListOfVisibleShapes ( OSL_ASSERT (maShapeTreeInfo.GetViewForwarder() != nullptr); - Rectangle aVisibleArea = maShapeTreeInfo.GetViewForwarder()->GetVisibleArea(); + tools::Rectangle aVisibleArea = maShapeTreeInfo.GetViewForwarder()->GetVisibleArea(); // Add the visible shapes for which the accessible objects already exist. AccessibleShapeList::const_iterator aEnd = maAccessibleShapes.end(); @@ -311,7 +311,7 @@ void ChildrenManagerImpl::CreateListOfVisibleShapes ( raDescriptorList.reserve( nShapeCount ); awt::Point aPos; awt::Size aSize; - Rectangle aBoundingBox; + tools::Rectangle aBoundingBox; uno::Reference<drawing::XShape> xShape; for (sal_Int32 i=0; i<nShapeCount; ++i) { @@ -436,11 +436,11 @@ void ChildrenManagerImpl::AddShape (const Reference<drawing::XShape>& rxShape) SolarMutexClearableGuard aGuard; // Test visibility of the shape. - Rectangle aVisibleArea = maShapeTreeInfo.GetViewForwarder()->GetVisibleArea(); + tools::Rectangle aVisibleArea = maShapeTreeInfo.GetViewForwarder()->GetVisibleArea(); awt::Point aPos = rxShape->getPosition(); awt::Size aSize = rxShape->getSize(); - Rectangle aBoundingBox ( + tools::Rectangle aBoundingBox ( aPos.X, aPos.Y, aPos.X + aSize.Width, diff --git a/svx/source/accessibility/ChildrenManagerImpl.hxx b/svx/source/accessibility/ChildrenManagerImpl.hxx index 79c554b7d65a..a15adafd7357 100644 --- a/svx/source/accessibility/ChildrenManagerImpl.hxx +++ b/svx/source/accessibility/ChildrenManagerImpl.hxx @@ -313,7 +313,7 @@ protected: at least partly, to be accessible through this class. Used to detect changes of the visible area after changes of the view forwarder. */ - Rectangle maVisibleArea; + tools::Rectangle maVisibleArea; /** The parent of the shapes. It is used for creating accessible objects for given shapes. diff --git a/svx/source/accessibility/GraphCtlAccessibleContext.cxx b/svx/source/accessibility/GraphCtlAccessibleContext.cxx index 768b58b94e9d..2d85c66c4d63 100644 --- a/svx/source/accessibility/GraphCtlAccessibleContext.cxx +++ b/svx/source/accessibility/GraphCtlAccessibleContext.cxx @@ -203,7 +203,7 @@ Reference< XAccessible > SAL_CALL SvxGraphCtrlAccessibleContext::getAccessibleAt awt::Rectangle SAL_CALL SvxGraphCtrlAccessibleContext::getBounds() { // no guard -> done in GetBoundingBox() - Rectangle aCoreBounds( GetBoundingBox() ); + tools::Rectangle aCoreBounds( GetBoundingBox() ); awt::Rectangle aBounds; aBounds.X = aCoreBounds.getX(); aBounds.Y = aCoreBounds.getY(); @@ -216,7 +216,7 @@ awt::Rectangle SAL_CALL SvxGraphCtrlAccessibleContext::getBounds() awt::Point SAL_CALL SvxGraphCtrlAccessibleContext::getLocation() { // no guard -> done in GetBoundingBox() - Rectangle aRect( GetBoundingBox() ); + tools::Rectangle aRect( GetBoundingBox() ); return awt::Point( aRect.getX(), aRect.getY() ); } @@ -224,7 +224,7 @@ awt::Point SAL_CALL SvxGraphCtrlAccessibleContext::getLocation() awt::Point SAL_CALL SvxGraphCtrlAccessibleContext::getLocationOnScreen() { // no guard -> done in GetBoundingBoxOnScreen() - Rectangle aRect( GetBoundingBoxOnScreen() ); + tools::Rectangle aRect( GetBoundingBoxOnScreen() ); return awt::Point( aRect.getX(), aRect.getY() ); } @@ -232,7 +232,7 @@ awt::Point SAL_CALL SvxGraphCtrlAccessibleContext::getLocationOnScreen() awt::Size SAL_CALL SvxGraphCtrlAccessibleContext::getSize() { // no guard -> done in GetBoundingBox() - Rectangle aRect( GetBoundingBox() ); + tools::Rectangle aRect( GetBoundingBox() ); return awt::Size( aRect.getWidth(), aRect.getHeight() ); } @@ -660,14 +660,14 @@ void SAL_CALL SvxGraphCtrlAccessibleContext::disposing() } -Rectangle SvxGraphCtrlAccessibleContext::GetBoundingBoxOnScreen() +tools::Rectangle SvxGraphCtrlAccessibleContext::GetBoundingBoxOnScreen() { ::SolarMutexGuard aGuard; if( nullptr == mpControl ) throw DisposedException(); - return Rectangle( + return tools::Rectangle( mpControl->GetAccessibleParentWindow()->OutputToAbsoluteScreenPixel( mpControl->GetPosPixel() ), mpControl->GetSizePixel() ); @@ -678,11 +678,11 @@ Rectangle SvxGraphCtrlAccessibleContext::GetBoundingBoxOnScreen() between the absolute coordinates of the bounding boxes of this control and its parent in the accessibility tree. */ -Rectangle SvxGraphCtrlAccessibleContext::GetBoundingBox() +tools::Rectangle SvxGraphCtrlAccessibleContext::GetBoundingBox() { ::SolarMutexGuard aGuard; - Rectangle aBounds ( 0, 0, 0, 0 ); + tools::Rectangle aBounds ( 0, 0, 0, 0 ); vcl::Window* pWindow = mpControl; if (pWindow != nullptr) @@ -691,7 +691,7 @@ Rectangle SvxGraphCtrlAccessibleContext::GetBoundingBox() vcl::Window* pParent = pWindow->GetAccessibleParentWindow(); if (pParent != nullptr) { - Rectangle aParentRect = pParent->GetWindowExtentsRelative (nullptr); + tools::Rectangle aParentRect = pParent->GetWindowExtentsRelative (nullptr); aBounds -= aParentRect.TopLeft(); } } @@ -748,9 +748,9 @@ void SvxGraphCtrlAccessibleContext::Notify( SfxBroadcaster& /*rBC*/, const SfxHi } // IAccessibleViewforwarder -Rectangle SvxGraphCtrlAccessibleContext::GetVisibleArea() const +tools::Rectangle SvxGraphCtrlAccessibleContext::GetVisibleArea() const { - Rectangle aVisArea; + tools::Rectangle aVisArea; if( mpView && mpView->PaintWindowCount()) { @@ -766,7 +766,7 @@ Point SvxGraphCtrlAccessibleContext::LogicToPixel (const Point& rPoint) const { if( mpControl ) { - Rectangle aBBox(mpControl->GetWindowExtentsRelative(nullptr)); + tools::Rectangle aBBox(mpControl->GetWindowExtentsRelative(nullptr)); return mpControl->LogicToPixel (rPoint) + aBBox.TopLeft(); } else diff --git a/svx/source/accessibility/charmapacc.cxx b/svx/source/accessibility/charmapacc.cxx index 7b03438ff273..3292514fd62c 100644 --- a/svx/source/accessibility/charmapacc.cxx +++ b/svx/source/accessibility/charmapacc.cxx @@ -102,7 +102,7 @@ uno::Reference< css::accessibility::XAccessible > SAL_CALL SvxShowCharSetVirtual { const Point aOutPos( mpParent->getScrollBar().GetPosPixel() ); const Size aScrollBar = mpParent->getScrollBar().GetOutputSizePixel(); - Rectangle aRect(aOutPos,aScrollBar); + tools::Rectangle aRect(aOutPos,aScrollBar); if ( aRect.IsInside(VCLPoint(aPoint)) ) xRet = mpParent->getScrollBar().GetAccessible(); @@ -154,12 +154,12 @@ css::awt::Rectangle SvxShowCharSetVirtualAcc::implGetBounds( ) vcl::Window* pWindow = mpParent; if ( pWindow ) { - Rectangle aRect = pWindow->GetWindowExtentsRelative( nullptr ); + tools::Rectangle aRect = pWindow->GetWindowExtentsRelative( nullptr ); aBounds = AWTRectangle( aRect ); vcl::Window* pParent = pWindow->GetAccessibleParentWindow(); if ( pParent ) { - Rectangle aParentRect = pParent->GetWindowExtentsRelative( nullptr ); + tools::Rectangle aParentRect = pParent->GetWindowExtentsRelative( nullptr ); css::awt::Point aParentScreenLoc = AWTPoint( aParentRect.TopLeft() ); aBounds.X -= aParentScreenLoc.X; aBounds.Y -= aParentScreenLoc.Y; @@ -750,9 +750,9 @@ awt::Rectangle SvxShowCharSetItemAcc::implGetBounds( ) if( mpParent ) { - Rectangle aRect( mpParent->maRect ); + tools::Rectangle aRect( mpParent->maRect ); Point aOrigin; - Rectangle aParentRect( aOrigin, mpParent->mrParent.GetOutputSizePixel() ); + tools::Rectangle aParentRect( aOrigin, mpParent->mrParent.GetOutputSizePixel() ); aRect.Intersection( aParentRect ); diff --git a/svx/source/accessibility/svxpixelctlaccessiblecontext.cxx b/svx/source/accessibility/svxpixelctlaccessiblecontext.cxx index ed62e566d250..c93a67537432 100644 --- a/svx/source/accessibility/svxpixelctlaccessiblecontext.cxx +++ b/svx/source/accessibility/svxpixelctlaccessiblecontext.cxx @@ -249,7 +249,7 @@ awt::Point SvxPixelCtlAccessible::getLocation( ) awt::Point SvxPixelCtlAccessible::getLocationOnScreen( ) { ::osl::MutexGuard aGuard( m_aMutex ); - Rectangle rect = mrPixelCtl.GetWindowExtentsRelative(nullptr); + tools::Rectangle rect = mrPixelCtl.GetWindowExtentsRelative(nullptr); return awt::Point(rect.Left(),rect.Top() ); } @@ -460,7 +460,7 @@ uno::Reference<XAccessible> SvxPixelCtlAccessible::CreateChild (long nIndex,Poin uno::Reference<XAccessible> xChild; xChild = new SvxPixelCtlAccessibleChild(mrPixelCtl, bPixelColorOrBG, - Rectangle(mPoint,size), + tools::Rectangle(mPoint,size), this, nIndex); @@ -523,14 +523,14 @@ void SvxPixelCtlAccessibleChild::FireAccessibleEvent ( SvxPixelCtlAccessibleChild::SvxPixelCtlAccessibleChild( SvxPixelCtl& rWindow, bool bPixelColorOrBG, - const Rectangle& rBoundingBox, + const tools::Rectangle& rBoundingBox, const uno::Reference<XAccessible>& rxParent, long nIndexInParent ) : SvxPixelCtlAccessibleChild_BASE( m_aMutex ), mrParentWindow( rWindow ), mxParent(rxParent), m_bPixelColorOrBG(bPixelColorOrBG), - mpBoundingBox( new Rectangle( rBoundingBox ) ), + mpBoundingBox( new tools::Rectangle( rBoundingBox ) ), mnIndexInParent( nIndexInParent ), mnClientId( 0 ) { @@ -557,7 +557,7 @@ sal_Bool SAL_CALL SvxPixelCtlAccessibleChild::containsPoint( const awt::Point& r { // no guard -> done in getBounds() // return GetBoundingBox().IsInside( VCLPoint( rPoint ) ); - return Rectangle( Point( 0, 0 ), GetBoundingBox().GetSize() ).IsInside( VCLPoint( rPoint ) ); + return tools::Rectangle( Point( 0, 0 ), GetBoundingBox().GetSize() ).IsInside( VCLPoint( rPoint ) ); } uno::Reference< XAccessible > SAL_CALL SvxPixelCtlAccessibleChild::getAccessibleAtPoint( const awt::Point& ) @@ -782,17 +782,17 @@ void SvxPixelCtlAccessibleChild::ThrowExceptionIfNotAlive() throw lang::DisposedException(); } -Rectangle SvxPixelCtlAccessibleChild::GetBoundingBoxOnScreen() +tools::Rectangle SvxPixelCtlAccessibleChild::GetBoundingBoxOnScreen() { ::osl::MutexGuard aGuard( m_aMutex ); // no ThrowExceptionIfNotAlive() because its done in GetBoundingBox() - Rectangle aRect( GetBoundingBox() ); + tools::Rectangle aRect( GetBoundingBox() ); - return Rectangle( mrParentWindow.OutputToAbsoluteScreenPixel( aRect.TopLeft() ), aRect.GetSize() ); + return tools::Rectangle( mrParentWindow.OutputToAbsoluteScreenPixel( aRect.TopLeft() ), aRect.GetSize() ); } -Rectangle const & SvxPixelCtlAccessibleChild::GetBoundingBox() +tools::Rectangle const & SvxPixelCtlAccessibleChild::GetBoundingBox() { // no guard necessary, because no one changes mpBoundingBox after creating it ThrowExceptionIfNotAlive(); diff --git a/svx/source/accessibility/svxrectctaccessiblecontext.cxx b/svx/source/accessibility/svxrectctaccessiblecontext.cxx index 3b9eb4300370..2f474038dacc 100644 --- a/svx/source/accessibility/svxrectctaccessiblecontext.cxx +++ b/svx/source/accessibility/svxrectctaccessiblecontext.cxx @@ -146,7 +146,7 @@ sal_Bool SAL_CALL SvxRectCtlAccessibleContext::containsPoint( const awt::Point& { // no guard -> done in getBounds() // return GetBoundingBox().IsInside( VCLPoint( rPoint ) ); - return Rectangle( Point( 0, 0 ), GetBoundingBox().GetSize() ).IsInside( VCLPoint( rPoint ) ); + return tools::Rectangle( Point( 0, 0 ), GetBoundingBox().GetSize() ).IsInside( VCLPoint( rPoint ) ); } Reference< XAccessible > SAL_CALL SvxRectCtlAccessibleContext::getAccessibleAtPoint( const awt::Point& rPoint ) @@ -229,7 +229,7 @@ Reference< XAccessible > SAL_CALL SvxRectCtlAccessibleContext::getAccessibleChil OUString aName(SVX_RESSTR(p->nResIdName)); OUString aDescr(SVX_RESSTR(p->nResIdDescr)); - Rectangle aFocusRect( mpRepr->CalculateFocusRectangle( p->ePoint ) ); + tools::Rectangle aFocusRect( mpRepr->CalculateFocusRectangle( p->ePoint ) ); SvxRectCtlChildAccessibleContext* pChild = new SvxRectCtlChildAccessibleContext( this, *mpRepr, aName, aDescr, aFocusRect, nIndex ); @@ -621,24 +621,24 @@ void SAL_CALL SvxRectCtlAccessibleContext::disposing() } } -Rectangle SvxRectCtlAccessibleContext::GetBoundingBoxOnScreen() +tools::Rectangle SvxRectCtlAccessibleContext::GetBoundingBoxOnScreen() { ::SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard( m_aMutex ); ThrowExceptionIfNotAlive(); - return Rectangle( mpRepr->GetParent()->OutputToScreenPixel( mpRepr->GetPosPixel() ), mpRepr->GetSizePixel() ); + return tools::Rectangle( mpRepr->GetParent()->OutputToScreenPixel( mpRepr->GetPosPixel() ), mpRepr->GetSizePixel() ); } -Rectangle SvxRectCtlAccessibleContext::GetBoundingBox() +tools::Rectangle SvxRectCtlAccessibleContext::GetBoundingBox() { ::SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard( m_aMutex ); ThrowExceptionIfNotAlive(); - return Rectangle( mpRepr->GetPosPixel(), mpRepr->GetSizePixel() ); + return tools::Rectangle( mpRepr->GetPosPixel(), mpRepr->GetSizePixel() ); } void SvxRectCtlAccessibleContext::ThrowExceptionIfNotAlive() @@ -653,14 +653,14 @@ SvxRectCtlChildAccessibleContext::SvxRectCtlChildAccessibleContext( const vcl::Window& rParentWindow, const OUString& rName, const OUString& rDescription, - const Rectangle& rBoundingBox, + const tools::Rectangle& rBoundingBox, long nIndexInParent ) : SvxRectCtlChildAccessibleContext_Base( maMutex ), msDescription( rDescription ), msName( rName ), mxParent(rxParent), - mpBoundingBox( new Rectangle( rBoundingBox ) ), + mpBoundingBox( new tools::Rectangle( rBoundingBox ) ), mrParentWindow( rParentWindow ), mnClientId( 0 ), mnIndexInParent( nIndexInParent ), @@ -689,7 +689,7 @@ Reference< XAccessibleContext> SAL_CALL SvxRectCtlChildAccessibleContext::getAcc sal_Bool SAL_CALL SvxRectCtlChildAccessibleContext::containsPoint( const awt::Point& rPoint ) { // no guard -> done in getBounds() - return Rectangle( Point( 0, 0 ), GetBoundingBox().GetSize() ).IsInside( VCLPoint( rPoint ) ); + return tools::Rectangle( Point( 0, 0 ), GetBoundingBox().GetSize() ).IsInside( VCLPoint( rPoint ) ); } Reference< XAccessible > SAL_CALL SvxRectCtlChildAccessibleContext::getAccessibleAtPoint( const awt::Point& /*rPoint*/ ) @@ -997,17 +997,17 @@ void SvxRectCtlChildAccessibleContext::ThrowExceptionIfNotAlive() throw lang::DisposedException(); } -Rectangle SvxRectCtlChildAccessibleContext::GetBoundingBoxOnScreen() +tools::Rectangle SvxRectCtlChildAccessibleContext::GetBoundingBoxOnScreen() { ::osl::MutexGuard aGuard( maMutex ); // no ThrowExceptionIfNotAlive() because its done in GetBoundingBox() - Rectangle aRect( GetBoundingBox() ); + tools::Rectangle aRect( GetBoundingBox() ); - return Rectangle( mrParentWindow.OutputToScreenPixel( aRect.TopLeft() ), aRect.GetSize() ); + return tools::Rectangle( mrParentWindow.OutputToScreenPixel( aRect.TopLeft() ), aRect.GetSize() ); } -Rectangle const & SvxRectCtlChildAccessibleContext::GetBoundingBox() +tools::Rectangle const & SvxRectCtlChildAccessibleContext::GetBoundingBox() { // no guard necessary, because no one changes mpBoundingBox after creating it ThrowExceptionIfNotAlive(); diff --git a/svx/source/customshapes/EnhancedCustomShape2d.cxx b/svx/source/customshapes/EnhancedCustomShape2d.cxx index c45e41abe3f4..c3c2d4c33099 100644 --- a/svx/source/customshapes/EnhancedCustomShape2d.cxx +++ b/svx/source/customshapes/EnhancedCustomShape2d.cxx @@ -716,7 +716,7 @@ EnhancedCustomShape2d::EnhancedCustomShape2d( SdrObject* pAObj ) : Size aS( pCustomShapeObj->GetLogicRect().GetSize() ); aP.X() -= aS.Width() / 2; aP.Y() -= aS.Height() / 2; - aLogicRect = Rectangle( aP, aS ); + aLogicRect = tools::Rectangle( aP, aS ); OUString sShapeType; const SdrCustomShapeGeometryItem& rGeometryItem = static_cast<const SdrCustomShapeGeometryItem&>(pCustomShapeObj->GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY )); @@ -1086,7 +1086,7 @@ Color EnhancedCustomShape2d::GetColorData( const Color& rFillColor, sal_uInt32 n } } -Rectangle EnhancedCustomShape2d::GetTextRect() const +tools::Rectangle EnhancedCustomShape2d::GetTextRect() const { sal_Int32 nIndex, nSize = seqTextFrames.getLength(); if ( !nSize ) @@ -1106,7 +1106,7 @@ Rectangle EnhancedCustomShape2d::GetTextRect() const aTopLeft.Y() = aLogicRect.GetHeight() - aTopLeft.Y(); aBottomRight.Y() = aLogicRect.GetHeight() - aBottomRight.Y(); } - Rectangle aRect( aTopLeft, aBottomRight ); + tools::Rectangle aRect( aTopLeft, aBottomRight ); SAL_INFO("svx", aRect.GetWidth() << " x " << aRect.GetHeight()); if( aRect.GetWidth() <= 1 || aRect.GetHeight() <= 1 ) return aLogicRect; @@ -1396,9 +1396,9 @@ void EnhancedCustomShape2d::SwapStartAndEndArrow( SdrObject* pObj ) //#108274 pObj->SetMergedItem( aLineEndCenter ); } -static basegfx::B2DPolygon CreateArc( const Rectangle& rRect, const Point& rStart, const Point& rEnd, const bool bClockwise, bool bFullCircle = false ) +static basegfx::B2DPolygon CreateArc( const tools::Rectangle& rRect, const Point& rStart, const Point& rEnd, const bool bClockwise, bool bFullCircle = false ) { - Rectangle aRect( rRect ); + tools::Rectangle aRect( rRect ); Point aStart( rStart ); Point aEnd( rEnd ); @@ -1641,7 +1641,7 @@ void EnhancedCustomShape2d::CreateSubPath( sal_Int32& rSrcPt, sal_Int32& rSegmen fHeight*= fYScale; Point aP( (sal_Int32)( _aCenter.X() - fWidth ), (sal_Int32)( _aCenter.Y() - fHeight ) ); Size aS( (sal_Int32)( fWidth * 2.0 ), (sal_Int32)( fHeight * 2.0 ) ); - Rectangle aRect( aP, aS ); + tools::Rectangle aRect( aP, aS ); if ( aRect.GetWidth() && aRect.GetHeight() ) { double fStartAngle, fEndAngle; @@ -1779,7 +1779,7 @@ void EnhancedCustomShape2d::CreateSubPath( sal_Int32& rSrcPt, sal_Int32& rSegmen sal_uInt32 nXor = bClockwise ? 3 : 2; for ( sal_uInt16 i = 0; ( i < nPntCount ) && ( ( rSrcPt + 3 ) < nCoordSize ); i++ ) { - Rectangle aRect( GetPoint( seqCoordinates[ rSrcPt ], true, true ), GetPoint( seqCoordinates[ rSrcPt + 1 ], true, true ) ); + tools::Rectangle aRect( GetPoint( seqCoordinates[ rSrcPt ], true, true ), GetPoint( seqCoordinates[ rSrcPt + 1 ], true, true ) ); if ( aRect.GetWidth() && aRect.GetHeight() ) { Point aCenter( aRect.Center() ); @@ -1831,7 +1831,7 @@ void EnhancedCustomShape2d::CreateSubPath( sal_Int32& rSrcPt, sal_Int32& rSegmen fWR *= fXScale; fHR *= fYScale; - Rectangle aRect ( Point ( aStartPoint.getX() - fWR*cos(fT) - fWR, aStartPoint.getY() - fHR*sin(fT) - fHR ), + tools::Rectangle aRect ( Point ( aStartPoint.getX() - fWR*cos(fT) - fWR, aStartPoint.getY() - fHR*sin(fT) - fHR ), Point ( aStartPoint.getX() - fWR*cos(fT) + fWR, aStartPoint.getY() - fHR*sin(fT) + fHR) ); Point aEndPoint ( aStartPoint.getX() - fWR*(cos(fT) - cos(fTE)), aStartPoint.getY() - fHR*(sin(fT) - sin(fTE)) ); @@ -2334,7 +2334,7 @@ SdrObject* EnhancedCustomShape2d::CreatePathObj( bool bLineGeometryNeededOnly ) if(pRet) { // move to target position - Rectangle aCurRect(pRet->GetSnapRect()); + tools::Rectangle aCurRect(pRet->GetSnapRect()); aCurRect.Move(aLogicRect.Left(), aLogicRect.Top()); pRet->NbcSetSnapRect(aCurRect); } diff --git a/svx/source/customshapes/EnhancedCustomShape3d.cxx b/svx/source/customshapes/EnhancedCustomShape3d.cxx index a52bfffe4097..d33942b0190f 100644 --- a/svx/source/customshapes/EnhancedCustomShape3d.cxx +++ b/svx/source/customshapes/EnhancedCustomShape3d.cxx @@ -178,7 +178,7 @@ drawing::Direction3D GetDirection3D( const SdrCustomShapeGeometryItem& rItem, co } -EnhancedCustomShape3d::Transformation2D::Transformation2D( const SdrObject* pCustomShape, const Rectangle& /*rBoundRect*/, const double *pM ) +EnhancedCustomShape3d::Transformation2D::Transformation2D( const SdrObject* pCustomShape, const tools::Rectangle& /*rBoundRect*/, const double *pM ) : aCenter( pCustomShape->GetSnapRect().Center() ) , eProjectionMode( drawing::ProjectionMode_PARALLEL ) , fSkewAngle(0.0) @@ -280,7 +280,7 @@ SdrObject* EnhancedCustomShape3d::Create3DObject( const SdrObject* pShape2d, con { bool bIsMirroredX = static_cast<const SdrObjCustomShape*>(pCustomShape)->IsMirroredX(); bool bIsMirroredY = static_cast<const SdrObjCustomShape*>(pCustomShape)->IsMirroredY(); - Rectangle aSnapRect( pCustomShape->GetLogicRect() ); + tools::Rectangle aSnapRect( pCustomShape->GetLogicRect() ); long nObjectRotation = pCustomShape->GetRotateAngle(); if ( nObjectRotation ) { @@ -367,7 +367,7 @@ SdrObject* EnhancedCustomShape3d::Create3DObject( const SdrObject* pShape2d, con } } - Rectangle aBoundRect2d; + tools::Rectangle aBoundRect2d; SdrObjListIter aIter( *pShape2d, SdrIterMode::DeepNoGroups ); const bool bMultipleSubObjects(aIter.Count() > 1); @@ -476,7 +476,7 @@ SdrObject* EnhancedCustomShape3d::Create3DObject( const SdrObject* pShape2d, con } const basegfx::B2DRange aTempRange(basegfx::tools::getRange(aPolyPoly)); - const Rectangle aBoundRect(basegfx::fround(aTempRange.getMinX()), basegfx::fround(aTempRange.getMinY()), basegfx::fround(aTempRange.getMaxX()), basegfx::fround(aTempRange.getMaxY())); + const tools::Rectangle aBoundRect(basegfx::fround(aTempRange.getMinX()), basegfx::fround(aTempRange.getMinY()), basegfx::fround(aTempRange.getMaxX()), basegfx::fround(aTempRange.getMaxY())); aBoundRect2d.Union( aBoundRect ); // #i122777# depth 0 is okay for planes when using double-sided @@ -524,7 +524,7 @@ SdrObject* EnhancedCustomShape3d::Create3DObject( const SdrObject* pShape2d, con (sal_Int32)( (double)( aBoundRect.Top() - aSnapRect.Top() ) * (double)aBmpSize.Height() / (double)aSnapRect.GetHeight() ) ); Size aSize( (sal_Int32)( aBmpSize.Width() * fXScale ), (sal_Int32)( aBmpSize.Height() * fYScale ) ); - Rectangle aCropRect( aPt, aSize ); + tools::Rectangle aCropRect( aPt, aSize ); aFillBmp.Crop( aCropRect ); p3DObj->SetMergedItem(XFillBitmapItem(OUString(), Graphic(aFillBmp))); } @@ -736,7 +736,7 @@ SdrObject* EnhancedCustomShape3d::Create3DObject( const SdrObject* pShape2d, con return pRet; } -Rectangle EnhancedCustomShape3d::CalculateNewSnapRect( const SdrObject* pCustomShape, const Rectangle& rSnapRect, const Rectangle& rBoundRect, const double* pMap ) +tools::Rectangle EnhancedCustomShape3d::CalculateNewSnapRect( const SdrObject* pCustomShape, const tools::Rectangle& rSnapRect, const tools::Rectangle& rBoundRect, const double* pMap ) { const SdrCustomShapeGeometryItem& rGeometryItem = static_cast<const SdrCustomShapeGeometryItem&>(pCustomShape->GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY )); const Point aCenter( rSnapRect.Center() ); diff --git a/svx/source/customshapes/EnhancedCustomShape3d.hxx b/svx/source/customshapes/EnhancedCustomShape3d.hxx index 81c6558065e9..16b5ccffb2ce 100644 --- a/svx/source/customshapes/EnhancedCustomShape3d.hxx +++ b/svx/source/customshapes/EnhancedCustomShape3d.hxx @@ -50,7 +50,7 @@ class EnhancedCustomShape3d public: - Transformation2D( const SdrObject* pCustomShape, const Rectangle& rBoundRect, const double* pMap ); + Transformation2D( const SdrObject* pCustomShape, const tools::Rectangle& rBoundRect, const double* pMap ); basegfx::B3DPolygon ApplySkewSettings( const basegfx::B3DPolygon& rPolygon3D ) const; Point Transform2D( const basegfx::B3DPoint& rPoint ) const; @@ -60,7 +60,7 @@ class EnhancedCustomShape3d friend class Transformation2D; protected: - static Rectangle CalculateNewSnapRect( const SdrObject* pCustomShape, const Rectangle& rSnapRect, const Rectangle& rBoundRect, const double* pMap ); + static tools::Rectangle CalculateNewSnapRect( const SdrObject* pCustomShape, const tools::Rectangle& rSnapRect, const tools::Rectangle& rBoundRect, const double* pMap ); public: static SdrObject* Create3DObject( const SdrObject* pShape2d, const SdrObject* pCustomShape ); diff --git a/svx/source/customshapes/EnhancedCustomShapeEngine.cxx b/svx/source/customshapes/EnhancedCustomShapeEngine.cxx index b5a600816bae..a919f7c2c38e 100644 --- a/svx/source/customshapes/EnhancedCustomShapeEngine.cxx +++ b/svx/source/customshapes/EnhancedCustomShapeEngine.cxx @@ -190,7 +190,7 @@ SdrObject* EnhancedCustomShapeEngine::ImplForceGroupWithText( const SdrObjCustom aTargetItemSet.Put(XFillStyleItem(drawing::FillStyle_NONE)); // get the text bounds and set at text object - Rectangle aTextBounds = pCustoObj->GetSnapRect(); + tools::Rectangle aTextBounds = pCustoObj->GetSnapRect(); SdrObject* pSdrObjCustomShape( GetSdrObjectFromXShape( mxShape ) ); if ( pSdrObjCustomShape ) { @@ -293,7 +293,7 @@ Reference< drawing::XShape > SAL_CALL EnhancedCustomShapeEngine::render() SdrObject::Free( pRenderedShape ); pRenderedShape = pRenderedShape3d; } - Rectangle aRect( pSdrObjCustomShape->GetSnapRect() ); + tools::Rectangle aRect( pSdrObjCustomShape->GetSnapRect() ); const GeoStat& rGeoStat = static_cast<SdrObjCustomShape*>(pSdrObjCustomShape)->GetGeoStat(); if ( rGeoStat.nShearAngle ) @@ -358,7 +358,7 @@ awt::Rectangle SAL_CALL EnhancedCustomShapeEngine::getTextBounds() if ( pSdrObjCustomShape ) { EnhancedCustomShape2d aCustomShape2d( pSdrObjCustomShape ); - Rectangle aRect( aCustomShape2d.GetTextRect() ); + tools::Rectangle aRect( aCustomShape2d.GetTextRect() ); aTextRect.X = aRect.Left(); aTextRect.Y = aRect.Top(); aTextRect.Width = aRect.GetWidth(); @@ -378,7 +378,7 @@ drawing::PolyPolygonBezierCoords SAL_CALL EnhancedCustomShapeEngine::getLineGeom SdrObject* pObj = aCustomShape2d.CreateLineGeometry(); if ( pObj ) { - Rectangle aRect( pSdrObjCustomShape->GetSnapRect() ); + tools::Rectangle aRect( pSdrObjCustomShape->GetSnapRect() ); bool bFlipV = aCustomShape2d.IsFlipVert(); bool bFlipH = aCustomShape2d.IsFlipHorz(); diff --git a/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx b/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx index 076bfd075003..c01ee3d3282b 100644 --- a/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx +++ b/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx @@ -62,19 +62,19 @@ using namespace com::sun::star::uno; struct FWCharacterData // representing a single character { std::vector< tools::PolyPolygon > vOutlines; - Rectangle aBoundRect; + tools::Rectangle aBoundRect; }; struct FWParagraphData // representing a single paragraph { OUString aString; std::vector< FWCharacterData > vCharacters; - Rectangle aBoundRect; + tools::Rectangle aBoundRect; SvxFrameDirection nFrameDirection; }; struct FWTextArea // representing multiple concluding paragraphs { std::vector< FWParagraphData > vParagraphs; - Rectangle aBoundRect; + tools::Rectangle aBoundRect; }; struct FWData // representing the whole text { @@ -279,7 +279,7 @@ void GetTextAreaOutline( const FWData& rFWData, const SdrObject* pCustomShape, F // vertical _> each single character needs to be rotated by 90 sal_Int32 i; sal_Int32 nHeight = 0; - Rectangle aSingleCharacterUnion; + tools::Rectangle aSingleCharacterUnion; for ( i = 0; i < rText.getLength(); i++ ) { FWCharacterData aCharacterData; @@ -364,7 +364,7 @@ void GetTextAreaOutline( const FWData& rFWData, const SdrObject* pCustomShape, F rPolyPoly.Move( 0, nVerticalOffset ); // retrieving the boundrect for the paragraph - Rectangle aBoundRect( rPolyPoly.GetBoundRect() ); + tools::Rectangle aBoundRect( rPolyPoly.GetBoundRect() ); aParagraphIter->aBoundRect.Union( aBoundRect ); } ++aCharacterIter; @@ -374,13 +374,13 @@ void GetTextAreaOutline( const FWData& rFWData, const SdrObject* pCustomShape, F if ( aParagraphIter->aBoundRect.IsEmpty() ) { if ( rTextArea.aBoundRect.IsEmpty() ) - rTextArea.aBoundRect = Rectangle( Point( 0, 0 ), Size( 1, rFWData.nSingleLineHeight ) ); + rTextArea.aBoundRect = tools::Rectangle( Point( 0, 0 ), Size( 1, rFWData.nSingleLineHeight ) ); else rTextArea.aBoundRect.Bottom() += rFWData.nSingleLineHeight; } else { - Rectangle& rParagraphBoundRect = aParagraphIter->aBoundRect; + tools::Rectangle& rParagraphBoundRect = aParagraphIter->aBoundRect; rTextArea.aBoundRect.Union( rParagraphBoundRect ); if ( bSameLetterHeights ) @@ -393,7 +393,7 @@ void GetTextAreaOutline( const FWData& rFWData, const SdrObject* pCustomShape, F std::vector< tools::PolyPolygon >::const_iterator aOutlineIEnd( aCharacterIter->vOutlines.end() ); while( aOutlineIter != aOutlineIEnd ) { - Rectangle aPolyPolyBoundRect( aOutlineIter->GetBoundRect() ); + tools::Rectangle aPolyPolyBoundRect( aOutlineIter->GetBoundRect() ); if (aPolyPolyBoundRect.GetHeight() != rParagraphBoundRect.GetHeight() && aPolyPolyBoundRect.GetHeight()) aOutlineIter->Scale( 1.0, (double)rParagraphBoundRect.GetHeight() / aPolyPolyBoundRect.GetHeight() ); aPolyPolyBoundRect = aOutlineIter->GetBoundRect(); @@ -552,7 +552,7 @@ void CalcDistances( const tools::Polygon& rPoly, std::vector< double >& rDistanc } void InsertMissingOutlinePoints( const tools::Polygon& /*rOutlinePoly*/, const std::vector< double >& rDistances, - const Rectangle& rTextAreaBoundRect, tools::Polygon& rPoly ) + const tools::Rectangle& rTextAreaBoundRect, tools::Polygon& rPoly ) { sal_uInt16 nSize = rPoly.GetSize(); if (nSize == 0) @@ -641,7 +641,7 @@ void FitTextOutlinesToShapeOutlines( const tools::PolyPolygon& aOutlines2d, FWDa sal_uInt16 nOutline2dIdx = 0; while( aTextAreaIter != aTextAreaIEnd ) { - Rectangle rTextAreaBoundRect = aTextAreaIter->aBoundRect; + tools::Rectangle rTextAreaBoundRect = aTextAreaIter->aBoundRect; sal_Int32 nLeft = rTextAreaBoundRect.Left(); sal_Int32 nTop = rTextAreaBoundRect.Top(); sal_Int32 nWidth = rTextAreaBoundRect.GetWidth(); @@ -672,7 +672,7 @@ void FitTextOutlinesToShapeOutlines( const tools::PolyPolygon& aOutlines2d, FWDa while( aOutlineIter != aOutlineIEnd ) { tools::PolyPolygon& rPolyPoly = *aOutlineIter; - Rectangle aBoundRect( rPolyPoly.GetBoundRect() ); + tools::Rectangle aBoundRect( rPolyPoly.GetBoundRect() ); double fx1 = aBoundRect.Left() - nLeft; double fx2 = aBoundRect.Right() - nLeft; double fy1, fy2; diff --git a/svx/source/dialog/_bmpmask.cxx b/svx/source/dialog/_bmpmask.cxx index df7b77d36522..3b56e960416c 100644 --- a/svx/source/dialog/_bmpmask.cxx +++ b/svx/source/dialog/_bmpmask.cxx @@ -75,7 +75,7 @@ public: Invalidate(); } - virtual void Paint( vcl::RenderContext& /*rRenderContext*/, const Rectangle& rRect ) override; + virtual void Paint( vcl::RenderContext& /*rRenderContext*/, const tools::Rectangle& rRect ) override; virtual Size GetOptimalSize() const override { @@ -312,12 +312,12 @@ IMPL_LINK_NOARG(MaskData, ExecHdl, Button*, void) { &aBItem }); } -void ColorWindow::Paint( vcl::RenderContext& rRenderContext, const Rectangle& /*Rect*/) +void ColorWindow::Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& /*Rect*/) { rRenderContext.Push(PushFlags::LINECOLOR | PushFlags::FILLCOLOR); rRenderContext.SetLineColor(aColor); rRenderContext.SetFillColor(aColor); - rRenderContext.DrawRect(Rectangle(Point(), GetSizePixel())); + rRenderContext.DrawRect(tools::Rectangle(Point(), GetSizePixel())); rRenderContext.Pop(); } @@ -965,7 +965,7 @@ GDIMetaFile SvxBmpMask::ImpReplaceTransparency( const GDIMetaFile& rMtf, const C // retrieve one action at the time; first // set the whole area to the replacement color. - pVDev->DrawRect( Rectangle( rPrefMap.GetOrigin(), rPrefSize ) ); + pVDev->DrawRect( tools::Rectangle( rPrefMap.GetOrigin(), rPrefSize ) ); for ( size_t i = 0; i < nActionCount; i++ ) { MetaAction* pAct = rMtf.GetAction( i ); diff --git a/svx/source/dialog/_contdlg.cxx b/svx/source/dialog/_contdlg.cxx index 59e268df1d02..e13d2fe6dc44 100644 --- a/svx/source/dialog/_contdlg.cxx +++ b/svx/source/dialog/_contdlg.cxx @@ -103,7 +103,7 @@ void SvxContourDlg::SetSuperClass( SvxSuperContourDlg& rSuperClass ) } tools::PolyPolygon SvxContourDlg::CreateAutoContour( const Graphic& rGraphic, - const Rectangle* pRect, + const tools::Rectangle* pRect, const sal_uIntPtr nFlags ) { Bitmap aBmp; @@ -589,7 +589,7 @@ IMPL_LINK_NOARG(SvxSuperContourDlg, CreateHdl, Timer *, void) { aCreateIdle.Stop(); - const Rectangle aWorkRect = m_pContourWnd->LogicToPixel( m_pContourWnd->GetWorkRect(), MapMode( MapUnit::Map100thMM ) ); + const tools::Rectangle aWorkRect = m_pContourWnd->LogicToPixel( m_pContourWnd->GetWorkRect(), MapMode( MapUnit::Map100thMM ) ); const Graphic& rGraphic = m_pContourWnd->GetGraphic(); const bool bValid = aWorkRect.Left() != aWorkRect.Right() && aWorkRect.Top() != aWorkRect.Bottom(); @@ -658,7 +658,7 @@ IMPL_LINK( SvxSuperContourDlg, PipetteHdl, ContourWindow&, rWnd, void ) const Color& rOldLineColor = m_pStbStatus->GetLineColor(); const Color& rOldFillColor = m_pStbStatus->GetFillColor(); - Rectangle aRect( m_pStbStatus->GetItemRect( 4 ) ); + tools::Rectangle aRect( m_pStbStatus->GetItemRect( 4 ) ); const Color& rColor = rWnd.GetPipetteColor(); m_pStbStatus->SetLineColor( rColor ); diff --git a/svx/source/dialog/charmap.cxx b/svx/source/dialog/charmap.cxx index f4f2a7f92a6c..21d2dcd50cce 100644 --- a/svx/source/dialog/charmap.cxx +++ b/svx/source/dialog/charmap.cxx @@ -163,7 +163,7 @@ void SvxShowCharSet::MouseButtonUp( const MouseEvent& rMEvt ) if ( bDrag && rMEvt.IsLeft() ) { // released mouse over character map - if ( Rectangle(Point(), GetOutputSize()).IsInside(rMEvt.GetPosPixel())) + if ( tools::Rectangle(Point(), GetOutputSize()).IsInside(rMEvt.GetPosPixel())) aSelectHdl.Call( this ); ReleaseMouse(); bDrag = false; @@ -317,7 +317,7 @@ void SvxShowCharSet::KeyInput(const KeyEvent& rKEvt) } -void SvxShowCharSet::Paint( vcl::RenderContext& rRenderContext, const Rectangle& ) +void SvxShowCharSet::Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& ) { InitSettings(rRenderContext); RecalculateFont(rRenderContext); @@ -337,7 +337,7 @@ void SvxShowCharSet::DeSelect() } // stretch a grid rectangle if its at the edge to fill unused space -Rectangle SvxShowCharSet::getGridRectangle(const Point &rPointUL, const Size &rOutputSize) +tools::Rectangle SvxShowCharSet::getGridRectangle(const Point &rPointUL, const Size &rOutputSize) { long x = rPointUL.X() - 1; long y = rPointUL.Y() - 1; @@ -364,7 +364,7 @@ Rectangle SvxShowCharSet::getGridRectangle(const Point &rPointUL, const Size &rO if (nXDistFromBottom <= 1) aGridSize.Height() += m_nYGap + nXDistFromBottom; - return Rectangle(aPointUL, aGridSize); + return tools::Rectangle(aPointUL, aGridSize); } void SvxShowCharSet::DrawChars_Impl(vcl::RenderContext& rRenderContext, int n1, int n2) @@ -396,7 +396,7 @@ void SvxShowCharSet::DrawChars_Impl(vcl::RenderContext& rRenderContext, int n1, Color aShadowColor(rStyleSettings.GetShadowColor()); int nTextHeight = rRenderContext.GetTextHeight(); - Rectangle aBoundRect; + tools::Rectangle aBoundRect; for (i = n1; i <= n2; ++i) { Point pix = MapIndexToPixel(i); @@ -736,7 +736,7 @@ svx::SvxShowCharSetItem* SvxShowCharSet::ImplGetItem( int _nPos ) buf.appendUtf32( mxFontCharMap->GetCharFromIndex( _nPos ) ); aFind->second->maText = buf.makeStringAndClear(); Point pix = MapIndexToPixel( _nPos ); - aFind->second->maRect = Rectangle( Point( pix.X() + 1, pix.Y() + 1 ), Size(nX-1,nY-1) ); + aFind->second->maRect = tools::Rectangle( Point( pix.X() + 1, pix.Y() + 1 ), Size(nX-1,nY-1) ); } return aFind->second.get(); diff --git a/svx/source/dialog/compressgraphicdialog.cxx b/svx/source/dialog/compressgraphicdialog.cxx index 8da722a22b0a..a622c0a079f2 100644 --- a/svx/source/dialog/compressgraphicdialog.cxx +++ b/svx/source/dialog/compressgraphicdialog.cxx @@ -49,12 +49,12 @@ CompressGraphicsDialog::CompressGraphicsDialog( vcl::Window* pParent, SdrGrafObj m_dResolution ( 96.0 ) { const SdrGrafCropItem& rCrop = static_cast<const SdrGrafCropItem&>( m_pGraphicObj->GetMergedItem(SDRATTR_GRAFCROP) ); - m_aCropRectangle = Rectangle(rCrop.GetLeft(), rCrop.GetTop(), rCrop.GetRight(), rCrop.GetBottom()); + m_aCropRectangle = tools::Rectangle(rCrop.GetLeft(), rCrop.GetTop(), rCrop.GetRight(), rCrop.GetBottom()); Initialize(); } -CompressGraphicsDialog::CompressGraphicsDialog( vcl::Window* pParent, Graphic& rGraphic, Size rViewSize100mm, Rectangle& rCropRectangle, SfxBindings& rBindings ) : +CompressGraphicsDialog::CompressGraphicsDialog( vcl::Window* pParent, Graphic& rGraphic, Size rViewSize100mm, tools::Rectangle& rCropRectangle, SfxBindings& rBindings ) : ModalDialog ( pParent, "CompressGraphicDialog", "svx/ui/compressgraphicdialog.ui" ), m_pGraphicObj ( nullptr ), m_aGraphic ( rGraphic ), @@ -391,7 +391,7 @@ IMPL_LINK_NOARG( CompressGraphicsDialog, CalculateClickHdl, Button*, void ) } } -Rectangle CompressGraphicsDialog::GetScaledCropRectangle() +tools::Rectangle CompressGraphicsDialog::GetScaledCropRectangle() { if ( m_pReduceResolutionCB->IsChecked() ) { @@ -401,7 +401,7 @@ Rectangle CompressGraphicsDialog::GetScaledCropRectangle() double aScaleX = nPixelX / (double) aSize.Width(); double aScaleY = nPixelY / (double) aSize.Height(); - return Rectangle( + return tools::Rectangle( m_aCropRectangle.Left() * aScaleX, m_aCropRectangle.Top() * aScaleY, m_aCropRectangle.Right() * aScaleX, @@ -438,7 +438,7 @@ SdrGrafObj* CompressGraphicsDialog::GetCompressedSdrGrafObj() if ( m_pReduceResolutionCB->IsChecked() ) { - Rectangle aScaledCropedRectangle = GetScaledCropRectangle(); + tools::Rectangle aScaledCropedRectangle = GetScaledCropRectangle(); SdrGrafCropItem aNewCrop( aScaledCropedRectangle.Left(), aScaledCropedRectangle.Top(), diff --git a/svx/source/dialog/connctrl.cxx b/svx/source/dialog/connctrl.cxx index 1e172b430202..13d5004424fb 100644 --- a/svx/source/dialog/connctrl.cxx +++ b/svx/source/dialog/connctrl.cxx @@ -81,7 +81,7 @@ void SvxXConnectionPreview::AdaptSize() SetMapMode( MapUnit::Map100thMM ); OutputDevice* pOD = pView->GetFirstOutputDevice(); // GetWin( 0 ); - Rectangle aRect = pObjList->GetAllObjBoundRect(); + tools::Rectangle aRect = pObjList->GetAllObjBoundRect(); MapMode aMapMode = GetMapMode(); aMapMode.SetMapUnit( pOD->GetMapMode().GetMapUnit() ); @@ -200,7 +200,7 @@ void SvxXConnectionPreview::Construct() AdaptSize(); } -void SvxXConnectionPreview::Paint(vcl::RenderContext& rRenderContext, const Rectangle&) +void SvxXConnectionPreview::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&) { if (pObjList) { diff --git a/svx/source/dialog/contwnd.cxx b/svx/source/dialog/contwnd.cxx index c258847ec408..12934170aea3 100644 --- a/svx/source/dialog/contwnd.cxx +++ b/svx/source/dialog/contwnd.cxx @@ -142,8 +142,8 @@ void ContourWindow::MouseButtonDown( const MouseEvent& rMEvt ) const Point aLogPt( PixelToLogic( rMEvt.GetPosPixel() ) ); SetPolyPolygon( tools::PolyPolygon() ); - aWorkRect = Rectangle( aLogPt, aLogPt ); - Invalidate(Rectangle(Point(), GetGraphicSize())); + aWorkRect = tools::Rectangle( aLogPt, aLogPt ); + Invalidate(tools::Rectangle(Point(), GetGraphicSize())); SetEditMode( true ); } @@ -162,7 +162,7 @@ void ContourWindow::MouseMove( const MouseEvent& rMEvt ) aPipetteColor = GetPixel( aLogPt ); Control::MouseMove( rMEvt ); - if ( aPipetteLink.IsSet() && Rectangle( Point(), GetGraphicSize() ).IsInside( aLogPt ) ) + if ( aPipetteLink.IsSet() && tools::Rectangle( Point(), GetGraphicSize() ).IsInside( aLogPt ) ) { SetPointer( PointerStyle::RefHand ); aPipetteLink.Call( *this ); @@ -175,7 +175,7 @@ void ContourWindow::MouseMove( const MouseEvent& rMEvt ) void ContourWindow::MouseButtonUp(const MouseEvent& rMEvt) { Point aTmpPoint; - const Rectangle aGraphRect( aTmpPoint, GetGraphicSize() ); + const tools::Rectangle aGraphRect( aTmpPoint, GetGraphicSize() ); const Point aLogPt( PixelToLogic( rMEvt.GetPosPixel() ) ); bClickValid = aGraphRect.IsInside( aLogPt ); @@ -215,7 +215,7 @@ void ContourWindow::MouseButtonUp(const MouseEvent& rMEvt) GraphCtrl::MouseButtonUp( rMEvt ); } -void ContourWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) +void ContourWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) { // #i75482# // encapsulate the redraw using Begin/End and use the returned @@ -227,7 +227,7 @@ void ContourWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangle& r rTarget.Push(PushFlags::LINECOLOR |PushFlags::FILLCOLOR); rTarget.SetLineColor(Color(COL_BLACK)); rTarget.SetFillColor(Color(COL_WHITE)); - rTarget.DrawRect( Rectangle( Point(), GetGraphicSize() ) ); + rTarget.DrawRect( tools::Rectangle( Point(), GetGraphicSize() ) ); rTarget.Pop(); if (rGraphic.GetType() != GraphicType::NONE) @@ -237,7 +237,7 @@ void ContourWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangle& r { tools::PolyPolygon _aPolyPoly(2, 2); rTarget.Push(PushFlags::FILLCOLOR); - _aPolyPoly.Insert(Rectangle(Point(), GetGraphicSize())); + _aPolyPoly.Insert(tools::Rectangle(Point(), GetGraphicSize())); _aPolyPoly.Insert(aWorkRect); rTarget.SetFillColor(COL_LIGHTRED); rTarget.DrawTransparent(_aPolyPoly, 50); diff --git a/svx/source/dialog/contwnd.hxx b/svx/source/dialog/contwnd.hxx index 063794eed869..d29ead73c5ef 100644 --- a/svx/source/dialog/contwnd.hxx +++ b/svx/source/dialog/contwnd.hxx @@ -27,7 +27,7 @@ class ContourWindow : public GraphCtrl { tools::PolyPolygon aPolyPoly; Color aPipetteColor; - Rectangle aWorkRect; + tools::Rectangle aWorkRect; Link<ContourWindow&,void> aPipetteLink; Link<ContourWindow&,void> aPipetteClickLink; Link<ContourWindow&,void> aWorkplaceClickLink; @@ -42,7 +42,7 @@ protected: virtual void MouseButtonUp(const MouseEvent& rMEvt) override; virtual void SdrObjCreated( const SdrObject& rObj ) override; virtual void InitSdrModel() override; - virtual void Paint( vcl::RenderContext& rRenderContext, const Rectangle& rRect ) override; + virtual void Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect ) override; virtual Size GetOptimalSize() const override; public: @@ -59,7 +59,7 @@ public: bool IsContourChanged() const; void SetWorkplaceMode( const bool bWorkplace ) { bWorkplaceMode = bWorkplace; } - const Rectangle& GetWorkRect() const { return aWorkRect; } + const tools::Rectangle& GetWorkRect() const { return aWorkRect; } void SetPipetteHdl( const Link<ContourWindow&,void>& rLink ) { aPipetteLink = rLink; } void SetPipetteClickHdl( const Link<ContourWindow&,void>& rLink ) { aPipetteClickLink = rLink; } diff --git a/svx/source/dialog/dialcontrol.cxx b/svx/source/dialog/dialcontrol.cxx index 4f7a240e146b..14d75def2647 100644 --- a/svx/source/dialog/dialcontrol.cxx +++ b/svx/source/dialog/dialcontrol.cxx @@ -86,7 +86,7 @@ void DialControlBmp::DrawElements( const OUString& rText, sal_Int32 nAngle ) long nX = static_cast< long >( mnCenterX - fWidth * fCos - fHeight * fSin ); long nY = static_cast< long >( mnCenterY + fWidth * fSin - fHeight * fCos ); - Rectangle aRect( nX, nY, 2 * mnCenterX - nX, 2 * mnCenterY - nY ); + tools::Rectangle aRect( nX, nY, 2 * mnCenterX - nX, 2 * mnCenterY - nY ); DrawText( aRect, rText, mbEnabled ? DrawTextFlags::NONE : DrawTextFlags::Disable ); } else @@ -110,7 +110,7 @@ void DialControlBmp::DrawElements( const OUString& rText, sal_Int32 nAngle ) long nX = mnCenterX - static_cast< long >( (DIAL_OUTER_WIDTH / 2 - mnCenterX) * fCos ); long nY = mnCenterY - static_cast< long >( (mnCenterY - DIAL_OUTER_WIDTH / 2) * fSin ); long nSize = bMain ? (DIAL_OUTER_WIDTH / 4) : (DIAL_OUTER_WIDTH / 2 - 1); - DrawEllipse( Rectangle( nX - nSize, nY - nSize, nX + nSize, nY + nSize ) ); + DrawEllipse( tools::Rectangle( nX - nSize, nY - nSize, nX + nSize, nY + nSize ) ); } const Color& DialControlBmp::GetBackgroundColor() const @@ -213,7 +213,7 @@ void DialControlBmp::DrawBackground() SetLineColor(); SetFillColor( GetBackgroundColor() ); - DrawEllipse( Rectangle( maRect.Left() + DIAL_OUTER_WIDTH, maRect.Top() + DIAL_OUTER_WIDTH, + DrawEllipse( tools::Rectangle( maRect.Left() + DIAL_OUTER_WIDTH, maRect.Top() + DIAL_OUTER_WIDTH, maRect.Right() - DIAL_OUTER_WIDTH, maRect.Bottom() - DIAL_OUTER_WIDTH ) ); } @@ -273,7 +273,7 @@ void DialControl::Resize() InvalidateControl(); } -void DialControl::Paint(vcl::RenderContext& rRenderContext, const Rectangle&) +void DialControl::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&) { Point aPos; rRenderContext.DrawBitmapEx(aPos, mpImpl->mxBmpBuffered->GetBitmapEx(aPos, mpImpl->maWinSize)); diff --git a/svx/source/dialog/dlgctl3d.cxx b/svx/source/dialog/dlgctl3d.cxx index 80249e75f8eb..5b4a90cb6dab 100644 --- a/svx/source/dialog/dlgctl3d.cxx +++ b/svx/source/dialog/dlgctl3d.cxx @@ -159,11 +159,11 @@ void Svx3DPreviewControl::Resize() Size aObjSize( aSize.Width()*5/6, aSize.Height()*5/6 ); Point aObjPoint( (aSize.Width() - aObjSize.Width()) / 2, (aSize.Height() - aObjSize.Height()) / 2); - Rectangle aRect( aObjPoint, aObjSize); + tools::Rectangle aRect( aObjPoint, aObjSize); mpScene->SetSnapRect( aRect ); } -void Svx3DPreviewControl::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) +void Svx3DPreviewControl::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) { mp3DView->CompleteRedraw(&rRenderContext, vcl::Region(rRect)); } @@ -524,7 +524,7 @@ void Svx3DLightControl::TrySelection(Point aPosPixel) } } -void Svx3DLightControl::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) +void Svx3DLightControl::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) { Svx3DPreviewControl::Paint(rRenderContext, rRect); } @@ -704,7 +704,7 @@ void Svx3DLightControl::Resize() mpFmPage->SetSize(aSize); // set position and size of scene - mpScene->SetSnapRect(Rectangle(Point(0, 0), aSize)); + mpScene->SetSnapRect(tools::Rectangle(Point(0, 0), aSize)); } void Svx3DLightControl::SetObjectType(SvxPreviewObjectType nType) @@ -1208,7 +1208,7 @@ void SvxLightCtl3D::GetFocus() aFocusSize.Width() -= 4; aFocusSize.Height() -= 4; - Rectangle aFocusRect( Point( 2, 2 ), aFocusSize ); + tools::Rectangle aFocusRect( Point( 2, 2 ), aFocusSize ); aFocusRect = maLightControl->PixelToLogic( aFocusRect ); diff --git a/svx/source/dialog/dlgctrl.cxx b/svx/source/dialog/dlgctrl.cxx index 1c26ef988711..dd00bf2ab0ea 100644 --- a/svx/source/dialog/dlgctrl.cxx +++ b/svx/source/dialog/dlgctrl.cxx @@ -233,9 +233,9 @@ void SvxRectCtl::MouseButtonDown( const MouseEvent& rMEvt ) aPtNew = GetApproxLogPtFromPixPt( rMEvt.GetPosPixel() ); - Invalidate( Rectangle( aPtLast - Point( nRadius, nRadius ), + Invalidate( tools::Rectangle( aPtLast - Point( nRadius, nRadius ), aPtLast + Point( nRadius, nRadius ) ) ); - Invalidate( Rectangle( aPtNew - Point( nRadius, nRadius ), + Invalidate( tools::Rectangle( aPtNew - Point( nRadius, nRadius ), aPtNew + Point( nRadius, nRadius ) ) ); eRP = GetRPFromPoint( aPtNew ); @@ -355,7 +355,7 @@ void SvxRectCtl::DataChanged( const DataChangedEvent& rDCEvt ) // the control (rectangle with 9 circles) -void SvxRectCtl::Paint(vcl::RenderContext& rRenderContext, const Rectangle&) +void SvxRectCtl::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&) { InitSettings(rRenderContext); @@ -365,7 +365,7 @@ void SvxRectCtl::Paint(vcl::RenderContext& rRenderContext, const Rectangle&) rRenderContext.SetLineColor(rStyles.GetDialogColor()); rRenderContext.SetFillColor(rStyles.GetDialogColor()); - rRenderContext.DrawRect(Rectangle(Point(0,0), rRenderContext.GetOutputSize())); + rRenderContext.DrawRect(tools::Rectangle(Point(0,0), rRenderContext.GetOutputSize())); if (IsEnabled()) rRenderContext.SetLineColor(rStyles.GetLabelTextColor()); @@ -378,10 +378,10 @@ void SvxRectCtl::Paint(vcl::RenderContext& rRenderContext, const Rectangle&) { Color aOldCol = rRenderContext.GetLineColor(); rRenderContext.SetLineColor(rStyles.GetLightColor()); - rRenderContext.DrawRect(Rectangle(aPtLT + aPtDiff, aPtRB + aPtDiff)); + rRenderContext.DrawRect(tools::Rectangle(aPtLT + aPtDiff, aPtRB + aPtDiff)); rRenderContext.SetLineColor(aOldCol); } - rRenderContext.DrawRect(Rectangle(aPtLT, aPtRB)); + rRenderContext.DrawRect(tools::Rectangle(aPtLT, aPtRB)); rRenderContext.SetFillColor(rRenderContext.GetBackground().GetColor()); @@ -575,8 +575,8 @@ void SvxRectCtl::SetActualRP( RectPoint eNewRP ) { Point aPtLast( SetActualRPWithoutInvalidate( eNewRP ) ); - Invalidate( Rectangle( aPtLast - Point( nRadius, nRadius ), aPtLast + Point( nRadius, nRadius ) ) ); - Invalidate( Rectangle( aPtNew - Point( nRadius, nRadius ), aPtNew + Point( nRadius, nRadius ) ) ); + Invalidate( tools::Rectangle( aPtLast - Point( nRadius, nRadius ), aPtLast + Point( nRadius, nRadius ) ) ); + Invalidate( tools::Rectangle( aPtNew - Point( nRadius, nRadius ), aPtNew + Point( nRadius, nRadius ) ) ); // notify accessibility object about change if( pAccContext.is() ) @@ -604,15 +604,15 @@ void SvxRectCtl::SetState( CTL_STATE nState ) static_cast<SvxTabPage*>(pTabPage)->PointChanged(this, eRP); } -Rectangle SvxRectCtl::CalculateFocusRectangle() const +tools::Rectangle SvxRectCtl::CalculateFocusRectangle() const { Size aDstBtnSize( PixelToLogic( Size( 15, 15 ) ) ); - return Rectangle( aPtNew - Point( aDstBtnSize.Width() >> 1, aDstBtnSize.Height() >> 1 ), aDstBtnSize ); + return tools::Rectangle( aPtNew - Point( aDstBtnSize.Width() >> 1, aDstBtnSize.Height() >> 1 ), aDstBtnSize ); } -Rectangle SvxRectCtl::CalculateFocusRectangle( RectPoint eRectPoint ) const +tools::Rectangle SvxRectCtl::CalculateFocusRectangle( RectPoint eRectPoint ) const { - Rectangle aRet; + tools::Rectangle aRet; RectPoint eOldRectPoint = GetActualRP(); if( eOldRectPoint == eRectPoint ) @@ -713,7 +713,7 @@ long SvxPixelCtl::ShowPosition( const Point &pt) //Invalidate( Rectangle( aPtTl, aPtBr ) ); aFocusPosition.setX(nX); aFocusPosition.setY(nY); - Invalidate(Rectangle(Point(0,0),aRectSize)); + Invalidate(tools::Rectangle(Point(0,0),aRectSize)); vcl::Window *pTabPage = getNonLayoutParent(this); if (pTabPage && WindowType::TABPAGE == pTabPage->GetType()) @@ -796,7 +796,7 @@ void SvxPixelCtl::MouseButtonDown( const MouseEvent& rMEvt ) // Draws the Control (Rectangle with nine circles) -void SvxPixelCtl::Paint( vcl::RenderContext& rRenderContext, const Rectangle& ) +void SvxPixelCtl::Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& ) { if (!aRectSize.Width() || !aRectSize.Height()) return; @@ -838,7 +838,7 @@ void SvxPixelCtl::Paint( vcl::RenderContext& rRenderContext, const Rectangle& ) // Change color: 0 -> Background color rRenderContext.SetFillColor(nLastPixel ? aPixelColor : aBackgroundColor); } - rRenderContext.DrawRect(Rectangle(aPtTl, aPtBr)); + rRenderContext.DrawRect(tools::Rectangle(aPtTl, aPtBr)); } } //Draw visual focus when has focus @@ -857,7 +857,7 @@ void SvxPixelCtl::Paint( vcl::RenderContext& rRenderContext, const Rectangle& ) } //Calculate visual focus rectangle via focus position -Rectangle SvxPixelCtl::implCalFocusRect( const Point& aPosition ) +tools::Rectangle SvxPixelCtl::implCalFocusRect( const Point& aPosition ) { long nLeft,nTop,nRight,nBottom; long i,j; @@ -867,7 +867,7 @@ Rectangle SvxPixelCtl::implCalFocusRect( const Point& aPosition ) nRight = aRectSize.Width() * (j + 1) / nLines - 1; nTop = aRectSize.Height() * i / nLines + 1; nBottom = aRectSize.Height() * (i + 1) / nLines - 1; - return Rectangle(nLeft,nTop,nRight,nBottom); + return tools::Rectangle(nLeft,nTop,nRight,nBottom); } //Solution:Keyboard function @@ -883,7 +883,7 @@ void SvxPixelCtl::KeyInput( const KeyEvent& rKEvt ) aRectSize.Height() *( aFocusPosition.getY() - 1)/ nLines -1 ); Size aRepaintSize( aRectSize.Width() *3/ nLines + 2,aRectSize.Height() *3/ nLines + 2); - Rectangle aRepaintRect( aRepaintPoint, aRepaintSize ); + tools::Rectangle aRepaintRect( aRepaintPoint, aRepaintSize ); bool bFocusPosChanged=false; switch(nCode) { @@ -1693,7 +1693,7 @@ void SvxXLinePreview::SetLineAttributes(const SfxItemSet& rItemSet) } -void SvxXLinePreview::Paint(vcl::RenderContext& rRenderContext, const Rectangle&) +void SvxXLinePreview::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&) { LocalPrePaint(rRenderContext); @@ -1728,14 +1728,14 @@ SvxXRectPreview::SvxXRectPreview(vcl::Window* pParent) InitSettings(true, true); // create RectangleObject - const Rectangle aObjectSize(Point(), GetOutputSize()); + const tools::Rectangle aObjectSize(Point(), GetOutputSize()); mpRectangleObject = new SdrRectObj(aObjectSize); mpRectangleObject->SetModel(&getModel()); } void SvxXRectPreview::Resize() { - const Rectangle aObjectSize(Point(), GetOutputSize()); + const tools::Rectangle aObjectSize(Point(), GetOutputSize()); SdrObject *pOrigObject = mpRectangleObject; if (pOrigObject) { @@ -1766,7 +1766,7 @@ void SvxXRectPreview::SetAttributes(const SfxItemSet& rItemSet) mpRectangleObject->SetMergedItem(XLineStyleItem(drawing::LineStyle_NONE)); } -void SvxXRectPreview::Paint(vcl::RenderContext& rRenderContext, const Rectangle&) +void SvxXRectPreview::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&) { LocalPrePaint(rRenderContext); @@ -1795,12 +1795,12 @@ SvxXShadowPreview::SvxXShadowPreview( vcl::Window* pParent ) aSize.Height() = aSize.Height() / 3; // create RectangleObject - const Rectangle aObjectSize( Point( aSize.Width(), aSize.Height() ), aSize ); + const tools::Rectangle aObjectSize( Point( aSize.Width(), aSize.Height() ), aSize ); mpRectangleObject = new SdrRectObj(aObjectSize); mpRectangleObject->SetModel(&getModel()); // create ShadowObject - const Rectangle aShadowSize( Point( aSize.Width(), aSize.Height() ), aSize ); + const tools::Rectangle aShadowSize( Point( aSize.Width(), aSize.Height() ), aSize ); mpRectangleShadow = new SdrRectObj(aShadowSize); mpRectangleShadow->SetModel(&getModel()); } @@ -1836,7 +1836,7 @@ void SvxXShadowPreview::SetShadowPosition(const Point& rPos) maShadowOffset = rPos; } -void SvxXShadowPreview::Paint(vcl::RenderContext& rRenderContext, const Rectangle&) +void SvxXShadowPreview::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&) { LocalPrePaint(rRenderContext); @@ -1845,7 +1845,7 @@ void SvxXShadowPreview::Paint(vcl::RenderContext& rRenderContext, const Rectangl aSize.Width() = aSize.Width() / 3; aSize.Height() = aSize.Height() / 3; - Rectangle aObjectRect(Point(aSize.Width(), aSize.Height()), aSize); + tools::Rectangle aObjectRect(Point(aSize.Width(), aSize.Height()), aSize); mpRectangleObject->SetSnapRect(aObjectRect); aObjectRect.Move(maShadowOffset.X(), maShadowOffset.Y()); mpRectangleShadow->SetSnapRect(aObjectRect); diff --git a/svx/source/dialog/fntctrl.cxx b/svx/source/dialog/fntctrl.cxx index b7be30bddb3c..213126c069c1 100644 --- a/svx/source/dialog/fntctrl.cxx +++ b/svx/source/dialog/fntctrl.cxx @@ -611,7 +611,7 @@ void SvxFontPrevWindow::UseResourceText() pImpl->mbUseResText = true; } -void SvxFontPrevWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangle&) +void SvxFontPrevWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&) { ApplySettings(rRenderContext); @@ -625,7 +625,7 @@ void SvxFontPrevWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangl const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings(); const Size aLogSize(rRenderContext.GetOutputSize()); - Rectangle aRect(Point(0, 0), aLogSize); + tools::Rectangle aRect(Point(0, 0), aLogSize); rRenderContext.SetLineColor(); rRenderContext.SetFillColor(rStyleSettings.GetWindowColor()); rRenderContext.DrawRect(aRect); @@ -718,7 +718,7 @@ void SvxFontPrevWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangl if (pImpl->mpBackColor) { - Rectangle aRect(Point(0, 0), aLogSize); + tools::Rectangle aRect(Point(0, 0), aLogSize); Color aLineCol = rRenderContext.GetLineColor(); Color aFillCol = rRenderContext.GetFillColor(); rRenderContext.SetLineColor(); @@ -729,7 +729,7 @@ void SvxFontPrevWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangl } if (pImpl->mpColor) { - Rectangle aRect(Point(nX, nY), aTxtSize); + tools::Rectangle aRect(Point(nX, nY), aTxtSize); Color aLineCol = rRenderContext.GetLineColor(); Color aFillCol = rRenderContext.GetFillColor(); rRenderContext.SetLineColor(); diff --git a/svx/source/dialog/framelink.cxx b/svx/source/dialog/framelink.cxx index 73d153e6a526..2de6d3dae281 100644 --- a/svx/source/dialog/framelink.cxx +++ b/svx/source/dialog/framelink.cxx @@ -179,7 +179,7 @@ struct LinePoints explicit LinePoints( const Point& rBeg, const Point& rEnd ) : maBeg( rBeg ), maEnd( rEnd ) {} - explicit LinePoints( const Rectangle& rRect, bool bTLBR ) : + explicit LinePoints( const tools::Rectangle& rRect, bool bTLBR ) : maBeg( bTLBR ? rRect.TopLeft() : rRect.TopRight() ), maEnd( bTLBR ? rRect.BottomRight() : rRect.BottomLeft() ) {} }; @@ -900,7 +900,7 @@ void lclDrawVerFrameBorder( @return A struct containg start and end position of the diagonal line. */ -LinePoints lclGetDiagLineEnds( const Rectangle& rRect, bool bTLBR, long nDiagOffs ) +LinePoints lclGetDiagLineEnds( const tools::Rectangle& rRect, bool bTLBR, long nDiagOffs ) { LinePoints aPoints( rRect, bTLBR ); bool bVert = rRect.GetWidth() < rRect.GetHeight(); @@ -938,10 +938,10 @@ LinePoints lclGetDiagLineEnds( const Rectangle& rRect, bool bTLBR, long nDiagOff The result struct containing modifies for each border of the reference rectangle. */ -void lclPushDiagClipRect( OutputDevice& rDev, const Rectangle& rRect, const DiagLineResult& rResult ) +void lclPushDiagClipRect( OutputDevice& rDev, const tools::Rectangle& rRect, const DiagLineResult& rResult ) { // PixelToLogic() regards internal offset of the output device - Rectangle aClipRect( rRect ); + tools::Rectangle aClipRect( rRect ); aClipRect.Left() += lclToMapUnit( rResult.mnLClip ); aClipRect.Top() += lclToMapUnit( rResult.mnTClip ); aClipRect.Right() += lclToMapUnit( rResult.mnRClip ); @@ -975,7 +975,7 @@ void lclPushDiagClipRect( OutputDevice& rDev, const Rectangle& rRect, const Diag @param bCrossStyle The style of the crossing frame border. Must be a double frame style. */ -void lclPushCrossingClipRegion( OutputDevice& rDev, const Rectangle& rRect, bool bTLBR, const Style& rCrossStyle ) +void lclPushCrossingClipRegion( OutputDevice& rDev, const tools::Rectangle& rRect, bool bTLBR, const Style& rCrossStyle ) { DBG_ASSERT( rCrossStyle.Secn(), "lclGetCrossingClipRegion - use only for double styles" ); LinePoints aLPoints( lclGetDiagLineEnds( rRect, !bTLBR, lclGetPrimEnd( rCrossStyle ) ) ); @@ -1010,7 +1010,7 @@ void lclPushCrossingClipRegion( OutputDevice& rDev, const Rectangle& rRect, bool passed DiagLineResult struct. A one pixel wide line can be drawn dotted. */ void lclDrawDiagLine( - OutputDevice& rDev, const Rectangle& rRect, bool bTLBR, + OutputDevice& rDev, const tools::Rectangle& rRect, bool bTLBR, const DiagLineResult& rResult, long nDiagOffs1, long nDiagOffs2, SvxBorderLineStyle nDashing ) { lclPushDiagClipRect( rDev, rRect, rResult ); @@ -1044,7 +1044,7 @@ void lclDrawDiagLine( Style of the crossing diagonal frame border. */ void lclDrawDiagFrameBorder( - OutputDevice& rDev, const Rectangle& rRect, bool bTLBR, + OutputDevice& rDev, const tools::Rectangle& rRect, bool bTLBR, const Style& rBorder, const DiagBorderResult& rResult, const Style& rCrossStyle, const Color* pForceColor, bool bDiagDblClip ) { @@ -1090,7 +1090,7 @@ void lclDrawDiagFrameBorder( Offsets (sub units) to modify the clipping region of the output device. */ void lclDrawDiagFrameBorders( - OutputDevice& rDev, const Rectangle& rRect, + OutputDevice& rDev, const tools::Rectangle& rRect, const Style& rTLBR, const Style& rBLTR, const DiagBordersResult& rResult, const Color* pForceColor, bool bDiagDblClip ) { @@ -1396,7 +1396,7 @@ basegfx::B2DPoint lcl_PointToB2DPoint( const Point& rPoint ) drawinglayer::primitive2d::Primitive2DContainer CreateClippedBorderPrimitives ( const Point& rStart, const Point& rEnd, const Style& rBorder, - const Rectangle& rClipRect ) + const tools::Rectangle& rClipRect ) { drawinglayer::primitive2d::Primitive2DContainer aSequence( 1 ); basegfx::B2DPolygon aPolygon; @@ -1496,7 +1496,7 @@ void DrawVerFrameBorder( OutputDevice& rDev, void DrawDiagFrameBorders( - OutputDevice& rDev, const Rectangle& rRect, const Style& rTLBR, const Style& rBLTR, + OutputDevice& rDev, const tools::Rectangle& rRect, const Style& rTLBR, const Style& rBLTR, const Style& rTLFromB, const Style& rTLFromR, const Style& rBRFromT, const Style& rBRFromL, const Style& rBLFromT, const Style& rBLFromR, const Style& rTRFromB, const Style& rTRFromL, const Color* pForceColor, bool bDiagDblClip ) diff --git a/svx/source/dialog/framelinkarray.cxx b/svx/source/dialog/framelinkarray.cxx index 3438e9840a4a..079a12b9acb3 100644 --- a/svx/source/dialog/framelinkarray.cxx +++ b/svx/source/dialog/framelinkarray.cxx @@ -708,9 +708,9 @@ void Array::SetClipRange( size_t nFirstCol, size_t nFirstRow, size_t nLastCol, s mxImpl->mnLastClipRow = nLastRow; } -Rectangle Array::GetClipRangeRectangle() const +tools::Rectangle Array::GetClipRangeRectangle() const { - return Rectangle( + return tools::Rectangle( mxImpl->GetColPosition( mxImpl->mnFirstClipCol ), mxImpl->GetRowPosition( mxImpl->mnFirstClipRow ), mxImpl->GetColPosition( mxImpl->mnLastClipCol + 1 ), @@ -808,9 +808,9 @@ Size Array::GetCellSize( size_t nCol, size_t nRow ) const return Size( GetColWidth( nFirstCol, nLastCol ) + 1, GetRowHeight( nFirstRow, nLastRow ) + 1 ); } -Rectangle Array::GetCellRect( size_t nCol, size_t nRow ) const +tools::Rectangle Array::GetCellRect( size_t nCol, size_t nRow ) const { - Rectangle aRect( GetCellPosition( nCol, nRow ), GetCellSize( nCol, nRow ) ); + tools::Rectangle aRect( GetCellPosition( nCol, nRow ), GetCellSize( nCol, nRow ) ); // adjust rectangle for partly visible merged cells const Cell& rCell = CELL( nCol, nRow ); @@ -900,7 +900,7 @@ void Array::DrawRange( drawinglayer::processor2d::BaseProcessor2D* pProcessor, if( (!bOverlapX && !bOverlapY) || (bFirstCol && bFirstRow) || (!bOverlapY && bFirstCol) || (!bOverlapX && bFirstRow) ) { - Rectangle aRect( GetCellRect( nCol, nRow ) ); + tools::Rectangle aRect( GetCellRect( nCol, nRow ) ); if( (aRect.GetWidth() > 1) && (aRect.GetHeight() > 1) ) { size_t _nFirstCol = mxImpl->GetMergedFirstCol( nCol, nRow ); @@ -1105,7 +1105,7 @@ void Array::DrawRange( OutputDevice& rDev, if( (!bOverlapX && !bOverlapY) || (bFirstCol && bFirstRow) || (!bOverlapY && bFirstCol) || (!bOverlapX && bFirstRow) ) { - Rectangle aRect( GetCellRect( nCol, nRow ) ); + tools::Rectangle aRect( GetCellRect( nCol, nRow ) ); if( (aRect.GetWidth() > 1) && (aRect.GetHeight() > 1) ) { size_t _nFirstCol = mxImpl->GetMergedFirstCol( nCol, nRow ); diff --git a/svx/source/dialog/frmsel.cxx b/svx/source/dialog/frmsel.cxx index bd63f944ab4b..0a281acc2c07 100644 --- a/svx/source/dialog/frmsel.cxx +++ b/svx/source/dialog/frmsel.cxx @@ -165,7 +165,7 @@ void FrameBorder::MergeFocusToPolyPolygon( tools::PolyPolygon& rPPoly ) const lclPolyPolyUnion( rPPoly, maFocusArea ); } -void FrameBorder::AddClickRect( const Rectangle& rRect ) +void FrameBorder::AddClickRect( const tools::Rectangle& rRect ) { lclPolyPolyUnion( maClickArea, tools::Polygon( rRect ) ); } @@ -175,7 +175,7 @@ bool FrameBorder::ContainsClickPoint( const Point& rPos ) const return vcl::Region( maClickArea ).IsInside( rPos ); } -Rectangle FrameBorder::GetClickBoundRect() const +tools::Rectangle FrameBorder::GetClickBoundRect() const { return maClickArea.GetBoundRect(); } @@ -400,18 +400,18 @@ void FrameSelectorImpl::InitBorderGeometry() maHor.ClearFocusArea(); maBottom.ClearFocusArea(); - maLeft.AddFocusPolygon( Rectangle( mnLine1 - mnFocusOffs, mnLine1 - mnFocusOffs, mnLine1 + mnFocusOffs, mnLine3 + mnFocusOffs ) ); - maVer.AddFocusPolygon( Rectangle( mnLine2 - mnFocusOffs, mnLine1 - mnFocusOffs, mnLine2 + mnFocusOffs, mnLine3 + mnFocusOffs ) ); - maRight.AddFocusPolygon( Rectangle( mnLine3 - mnFocusOffs, mnLine1 - mnFocusOffs, mnLine3 + mnFocusOffs, mnLine3 + mnFocusOffs ) ); - maTop.AddFocusPolygon( Rectangle( mnLine1 - mnFocusOffs, mnLine1 - mnFocusOffs, mnLine3 + mnFocusOffs, mnLine1 + mnFocusOffs ) ); - maHor.AddFocusPolygon( Rectangle( mnLine1 - mnFocusOffs, mnLine2 - mnFocusOffs, mnLine3 + mnFocusOffs, mnLine2 + mnFocusOffs ) ); - maBottom.AddFocusPolygon( Rectangle( mnLine1 - mnFocusOffs, mnLine3 - mnFocusOffs, mnLine3 + mnFocusOffs, mnLine3 + mnFocusOffs ) ); + maLeft.AddFocusPolygon( tools::Rectangle( mnLine1 - mnFocusOffs, mnLine1 - mnFocusOffs, mnLine1 + mnFocusOffs, mnLine3 + mnFocusOffs ) ); + maVer.AddFocusPolygon( tools::Rectangle( mnLine2 - mnFocusOffs, mnLine1 - mnFocusOffs, mnLine2 + mnFocusOffs, mnLine3 + mnFocusOffs ) ); + maRight.AddFocusPolygon( tools::Rectangle( mnLine3 - mnFocusOffs, mnLine1 - mnFocusOffs, mnLine3 + mnFocusOffs, mnLine3 + mnFocusOffs ) ); + maTop.AddFocusPolygon( tools::Rectangle( mnLine1 - mnFocusOffs, mnLine1 - mnFocusOffs, mnLine3 + mnFocusOffs, mnLine1 + mnFocusOffs ) ); + maHor.AddFocusPolygon( tools::Rectangle( mnLine1 - mnFocusOffs, mnLine2 - mnFocusOffs, mnLine3 + mnFocusOffs, mnLine2 + mnFocusOffs ) ); + maBottom.AddFocusPolygon( tools::Rectangle( mnLine1 - mnFocusOffs, mnLine3 - mnFocusOffs, mnLine3 + mnFocusOffs, mnLine3 + mnFocusOffs ) ); for( nCol = 0, nCols = maArray.GetColCount(); nCol < nCols; ++nCol ) { for( nRow = 0, nRows = maArray.GetRowCount(); nRow < nRows; ++nRow ) { - Rectangle aRect( maArray.GetCellRect( nCol, nRow ) ); + tools::Rectangle aRect( maArray.GetCellRect( nCol, nRow ) ); long nDiagFocusOffsX = frame::GetTLDiagOffset( -mnFocusOffs, mnFocusOffs, maArray.GetHorDiagAngle( nCol, nRow ) ); long nDiagFocusOffsY = frame::GetTLDiagOffset( -mnFocusOffs, mnFocusOffs, maArray.GetVerDiagAngle( nCol, nRow ) ); @@ -450,12 +450,12 @@ void FrameSelectorImpl::InitBorderGeometry() long nClH = mbHor ? nClI : nClO; // additional space dependent of horizontal inner border long nClV = mbVer ? nClI : nClO; // additional space dependent of vertical inner border - maLeft.AddClickRect( Rectangle( mnLine1 - nClO, mnLine1 - nClO, mnLine1 + nClV, mnLine3 + nClO ) ); - maVer.AddClickRect( Rectangle( mnLine2 - nClI, mnLine1 - nClO, mnLine2 + nClI, mnLine3 + nClO ) ); - maRight.AddClickRect( Rectangle( mnLine3 - nClV, mnLine1 - nClO, mnLine3 + nClO, mnLine3 + nClO ) ); - maTop.AddClickRect( Rectangle( mnLine1 - nClO, mnLine1 - nClO, mnLine3 + nClO, mnLine1 + nClH ) ); - maHor.AddClickRect( Rectangle( mnLine1 - nClO, mnLine2 - nClI, mnLine3 + nClO, mnLine2 + nClI ) ); - maBottom.AddClickRect( Rectangle( mnLine1 - nClO, mnLine3 - nClH, mnLine3 + nClO, mnLine3 + nClO ) ); + maLeft.AddClickRect( tools::Rectangle( mnLine1 - nClO, mnLine1 - nClO, mnLine1 + nClV, mnLine3 + nClO ) ); + maVer.AddClickRect( tools::Rectangle( mnLine2 - nClI, mnLine1 - nClO, mnLine2 + nClI, mnLine3 + nClO ) ); + maRight.AddClickRect( tools::Rectangle( mnLine3 - nClV, mnLine1 - nClO, mnLine3 + nClO, mnLine3 + nClO ) ); + maTop.AddClickRect( tools::Rectangle( mnLine1 - nClO, mnLine1 - nClO, mnLine3 + nClO, mnLine1 + nClH ) ); + maHor.AddClickRect( tools::Rectangle( mnLine1 - nClO, mnLine2 - nClI, mnLine3 + nClO, mnLine2 + nClI ) ); + maBottom.AddClickRect( tools::Rectangle( mnLine1 - nClO, mnLine3 - nClH, mnLine3 + nClO, mnLine3 + nClO ) ); /* Diagonal frame borders use the remaining space between outer and inner frame borders. */ if( mbTLBR || mbBLTR ) @@ -465,7 +465,7 @@ void FrameSelectorImpl::InitBorderGeometry() for( nRow = 0, nRows = maArray.GetRowCount(); nRow < nRows; ++nRow ) { // the usable area between horizonal/vertical frame borders of current quadrant - Rectangle aRect( maArray.GetCellRect( nCol, nRow ) ); + tools::Rectangle aRect( maArray.GetCellRect( nCol, nRow ) ); aRect.Left() += nClV + 1; aRect.Right() -= nClV + 1; aRect.Top() += nClH + 1; @@ -476,12 +476,12 @@ void FrameSelectorImpl::InitBorderGeometry() { // single areas Point aMid( aRect.Center() ); - maTLBR.AddClickRect( Rectangle( aRect.TopLeft(), aMid ) ); - maTLBR.AddClickRect( Rectangle( aMid + Point( 1, 1 ), aRect.BottomRight() ) ); - maBLTR.AddClickRect( Rectangle( aRect.Left(), aMid.Y() + 1, aMid.X(), aRect.Bottom() ) ); - maBLTR.AddClickRect( Rectangle( aMid.X() + 1, aRect.Top(), aRect.Right(), aMid.Y() ) ); + maTLBR.AddClickRect( tools::Rectangle( aRect.TopLeft(), aMid ) ); + maTLBR.AddClickRect( tools::Rectangle( aMid + Point( 1, 1 ), aRect.BottomRight() ) ); + maBLTR.AddClickRect( tools::Rectangle( aRect.Left(), aMid.Y() + 1, aMid.X(), aRect.Bottom() ) ); + maBLTR.AddClickRect( tools::Rectangle( aMid.X() + 1, aRect.Top(), aRect.Right(), aMid.Y() ) ); // centered rectangle for both frame borders - Rectangle aMidRect( aRect.TopLeft(), Size( aRect.GetWidth() / 3, aRect.GetHeight() / 3 ) ); + tools::Rectangle aMidRect( aRect.TopLeft(), Size( aRect.GetWidth() / 3, aRect.GetHeight() / 3 ) ); aMidRect.Move( (aRect.GetWidth() - aMidRect.GetWidth()) / 2, (aRect.GetHeight() - aMidRect.GetHeight()) / 2 ); maTLBR.AddClickRect( aMidRect ); maBLTR.AddClickRect( aMidRect ); @@ -537,12 +537,12 @@ void FrameSelectorImpl::DrawBackground() // clear the area mpVirDev->SetLineColor(); mpVirDev->SetFillColor( maBackCol ); - mpVirDev->DrawRect( Rectangle( Point( 0, 0 ), mpVirDev->GetOutputSizePixel() ) ); + mpVirDev->DrawRect( tools::Rectangle( Point( 0, 0 ), mpVirDev->GetOutputSizePixel() ) ); // draw the inner gray (or whatever color) rectangle mpVirDev->SetLineColor(); mpVirDev->SetFillColor( maMarkCol ); - mpVirDev->DrawRect( Rectangle( + mpVirDev->DrawRect( tools::Rectangle( mnLine1 - mnFocusOffs, mnLine1 - mnFocusOffs, mnLine3 + mnFocusOffs, mnLine3 + mnFocusOffs ) ); // draw the white space for enabled frame borders @@ -700,7 +700,7 @@ void FrameSelectorImpl::DrawAllTrackingRects() } else // no frame border selected -> draw tracking rectangle around entire control - aPPoly.Insert( tools::Polygon(Rectangle(maVirDevPos, mpVirDev->GetOutputSizePixel()))); + aPPoly.Insert( tools::Polygon(tools::Rectangle(maVirDevPos, mpVirDev->GetOutputSizePixel()))); aPPoly.Optimize(PolyOptimizeFlags::CLOSE); for(sal_uInt16 nIdx = 0, nCount = aPPoly.Count(); nIdx < nCount; ++nIdx) @@ -1046,9 +1046,9 @@ bool FrameSelector::ContainsClickPoint( const Point& rPos ) const return bContains; } -Rectangle FrameSelector::GetClickBoundRect( FrameBorderType eBorder ) const +tools::Rectangle FrameSelector::GetClickBoundRect( FrameBorderType eBorder ) const { - Rectangle aRect; + tools::Rectangle aRect; const FrameBorder& rBorder = mxImpl->GetBorder( eBorder ); if( rBorder.IsEnabled() ) aRect = rBorder.GetClickBoundRect(); @@ -1056,7 +1056,7 @@ Rectangle FrameSelector::GetClickBoundRect( FrameBorderType eBorder ) const } // virtual functions from base class -void FrameSelector::Paint(vcl::RenderContext& rRenderContext, const Rectangle&) +void FrameSelector::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&) { mxImpl->CopyVirDevToControl(rRenderContext); if (HasFocus()) diff --git a/svx/source/dialog/graphctl.cxx b/svx/source/dialog/graphctl.cxx index bed8deff3823..cdf0e5d05003 100644 --- a/svx/source/dialog/graphctl.cxx +++ b/svx/source/dialog/graphctl.cxx @@ -36,7 +36,7 @@ #include <svx/svdpage.hxx> #include "svx/sdrpaintwindow.hxx" -void GraphCtrlUserCall::Changed( const SdrObject& rObj, SdrUserCallType eType, const Rectangle& /*rOldBoundRect*/ ) +void GraphCtrlUserCall::Changed( const SdrObject& rObj, SdrUserCallType eType, const tools::Rectangle& /*rOldBoundRect*/ ) { switch( eType ) { @@ -149,7 +149,7 @@ void GraphCtrl::InitSdrModel() // Creating a View pView = new GraphCtrlView( pModel, this ); - pView->SetWorkArea( Rectangle( Point(), aGraphSize ) ); + pView->SetWorkArea( tools::Rectangle( Point(), aGraphSize ) ); pView->EnableExtendedMouseEventDispatcher( true ); pView->ShowSdrPage(pView->GetModel()->GetPage(0)); pView->SetFrameDragSingles(); @@ -244,7 +244,7 @@ void GraphCtrl::Resize() Invalidate(); } -void GraphCtrl::Paint( vcl::RenderContext& rRenderContext, const Rectangle& rRect) +void GraphCtrl::Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) { // #i72889# used splitted repaint to be able to paint an own background // even to the buffered view @@ -457,11 +457,11 @@ void GraphCtrl::KeyInput( const KeyEvent& rKEvt ) if(nullptr == pHdl) { // restrict movement to WorkArea - const Rectangle& rWorkArea = pView->GetWorkArea(); + const tools::Rectangle& rWorkArea = pView->GetWorkArea(); if(!rWorkArea.IsEmpty()) { - Rectangle aMarkRect(pView->GetMarkedObjRect()); + tools::Rectangle aMarkRect(pView->GetMarkedObjRect()); aMarkRect.Move(nX, nY); if(!aMarkRect.IsInside(rWorkArea)) @@ -613,7 +613,7 @@ void GraphCtrl::MouseButtonDown( const MouseEvent& rMEvt ) { const Point aLogPt( PixelToLogic( rMEvt.GetPosPixel() ) ); - if ( !Rectangle( Point(), aGraphSize ).IsInside( aLogPt ) && !pView->IsEditMode() ) + if ( !tools::Rectangle( Point(), aGraphSize ).IsInside( aLogPt ) && !pView->IsEditMode() ) Control::MouseButtonDown( rMEvt ); else { @@ -670,7 +670,7 @@ void GraphCtrl::MouseMove(const MouseEvent& rMEvt) if ( aMousePosLink.IsSet() ) { - if ( Rectangle( Point(), aGraphSize ).IsInside( aLogPos ) ) + if ( tools::Rectangle( Point(), aGraphSize ).IsInside( aLogPos ) ) aMousePos = aLogPos; else aMousePos = Point(); diff --git a/svx/source/dialog/imapwnd.cxx b/svx/source/dialog/imapwnd.cxx index 8f52dca70df2..9b4cc00dcd6f 100644 --- a/svx/source/dialog/imapwnd.cxx +++ b/svx/source/dialog/imapwnd.cxx @@ -184,7 +184,7 @@ void IMapWindow::SetTargetList( TargetList& rTargetList ) SdrObject* IMapWindow::CreateObj( const IMapObject* pIMapObj ) { Point aPoint; - Rectangle aClipRect( aPoint, GetGraphicSize() ); + tools::Rectangle aClipRect( aPoint, GetGraphicSize() ); SdrObject* pSdrObj = nullptr; IMapObjectPtr pCloneIMapObj; @@ -193,7 +193,7 @@ SdrObject* IMapWindow::CreateObj( const IMapObject* pIMapObj ) case IMAP_OBJ_RECTANGLE: { const IMapRectangleObject* pIMapRectObj = static_cast<const IMapRectangleObject*>(pIMapObj); - Rectangle aDrawRect( pIMapRectObj->GetRectangle( false ) ); + tools::Rectangle aDrawRect( pIMapRectObj->GetRectangle( false ) ); // clipped on CanvasPane aDrawRect.Intersection( aClipRect ); @@ -209,7 +209,7 @@ SdrObject* IMapWindow::CreateObj( const IMapObject* pIMapObj ) const Point aCenter( pIMapCircleObj->GetCenter( false ) ); const long nRadius = pIMapCircleObj->GetRadius( false ); const Point aOffset( nRadius, nRadius ); - Rectangle aCircle( aCenter - aOffset, aCenter + aOffset ); + tools::Rectangle aCircle( aCenter - aOffset, aCenter + aOffset ); // limited to CanvasPane aCircle.Intersection( aClipRect ); @@ -226,7 +226,7 @@ SdrObject* IMapWindow::CreateObj( const IMapObject* pIMapObj ) // If it actually is an ellipse, then another ellipse is created again if ( pIMapPolyObj->HasExtraEllipse() ) { - Rectangle aDrawRect( pIMapPolyObj->GetExtraEllipse() ); + tools::Rectangle aDrawRect( pIMapPolyObj->GetExtraEllipse() ); // clipped on CanvasPane aDrawRect.Intersection( aClipRect ); @@ -427,7 +427,7 @@ SdrObject* IMapWindow::GetHitSdrObj( const Point& rPosPixel ) const SdrObject* pObj = nullptr; Point aPt = PixelToLogic( rPosPixel ); - if ( Rectangle( Point(), GetGraphicSize() ).IsInside( aPt ) ) + if ( tools::Rectangle( Point(), GetGraphicSize() ).IsInside( aPt ) ) { SdrPage* pPage = pModel->GetPage( 0 ); if ( pPage ) @@ -563,8 +563,8 @@ void IMapWindow::RequestHelp( const HelpEvent& rHEvt ) if ( pIMapObj && !( aStr = pIMapObj->GetURL() ).isEmpty() ) { - Rectangle aLogicPix( LogicToPixel( Rectangle( Point(), GetGraphicSize() ) ) ); - Rectangle aScreenRect( OutputToScreenPixel( aLogicPix.TopLeft() ), + tools::Rectangle aLogicPix( LogicToPixel( tools::Rectangle( Point(), GetGraphicSize() ) ) ); + tools::Rectangle aScreenRect( OutputToScreenPixel( aLogicPix.TopLeft() ), OutputToScreenPixel( aLogicPix.BottomRight() ) ); if ( Help::IsBalloonHelpEnabled() ) @@ -775,7 +775,7 @@ void IMapWindow::CreateDefaultObject() sal_uInt32 nDefaultObjectSizeHeight = aPageSize.Height() / 4; aPagePos.X() += (aPageSize.Width() / 2) - (nDefaultObjectSizeWidth / 2); aPagePos.Y() += (aPageSize.Height() / 2) - (nDefaultObjectSizeHeight / 2); - Rectangle aNewObjectRectangle(aPagePos, Size(nDefaultObjectSizeWidth, nDefaultObjectSizeHeight)); + tools::Rectangle aNewObjectRectangle(aPagePos, Size(nDefaultObjectSizeWidth, nDefaultObjectSizeHeight)); SdrObject* pObj = SdrObjFactory::MakeNewObject( pView->GetCurrentObjInventor(), pView->GetCurrentObjIdentifier(), nullptr, pModel); pObj->SetLogicRect(aNewObjectRectangle); diff --git a/svx/source/dialog/measctrl.cxx b/svx/source/dialog/measctrl.cxx index 78e2a456103d..d9610abb17a9 100644 --- a/svx/source/dialog/measctrl.cxx +++ b/svx/source/dialog/measctrl.cxx @@ -88,7 +88,7 @@ void SvxXMeasurePreview::dispose() Control::dispose(); } -void SvxXMeasurePreview::Paint(vcl::RenderContext& rRenderContext, const Rectangle&) +void SvxXMeasurePreview::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&) { pMeasureObj->SingleObjectPainter(rRenderContext); } diff --git a/svx/source/dialog/pagectrl.cxx b/svx/source/dialog/pagectrl.cxx index f59900ac4332..087b2e2dc6f5 100644 --- a/svx/source/dialog/pagectrl.cxx +++ b/svx/source/dialog/pagectrl.cxx @@ -98,7 +98,7 @@ void SvxPageWindow::dispose() VCL_BUILDER_FACTORY(SvxPageWindow) -void SvxPageWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangle&) +void SvxPageWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&) { Fraction aXScale(aWinSize.Width(), std::max(long(aSize.Width() * 2 + aSize.Width() / 8), 1L)); Fraction aYScale(aWinSize.Height(), std::max(aSize.Height(), 1L)); @@ -165,7 +165,7 @@ void SvxPageWindow::DrawPage(vcl::RenderContext& rRenderContext, const Point& rO rRenderContext.SetLineColor(Color(COL_TRANSPARENT)); rRenderContext.SetFillColor(rDlgColor); Size winSize(rRenderContext.GetOutputSize()); - rRenderContext.DrawRect(Rectangle(Point(0,0), winSize)); + rRenderContext.DrawRect(tools::Rectangle(Point(0,0), winSize)); if (bResetBackground) bResetBackground = false; @@ -179,11 +179,11 @@ void SvxPageWindow::DrawPage(vcl::RenderContext& rRenderContext, const Point& rO if (!bEnabled) { rRenderContext.SetFillColor(rDisableColor); - rRenderContext.DrawRect(Rectangle(rOrg, aTempSize)); + rRenderContext.DrawRect(tools::Rectangle(rOrg, aTempSize)); return; } rRenderContext.SetFillColor(rFieldColor); - rRenderContext.DrawRect(Rectangle(rOrg, aTempSize)); + rRenderContext.DrawRect(tools::Rectangle(rOrg, aTempSize)); long nL = nLeft; long nR = nRight; @@ -195,15 +195,15 @@ void SvxPageWindow::DrawPage(vcl::RenderContext& rRenderContext, const Point& rO nR = nLeft; } - Rectangle aRect; + tools::Rectangle aRect; aRect.Left() = rOrg.X() + nL; aRect.Right() = rOrg.X() + aTempSize.Width() - nR; aRect.Top() = rOrg.Y() + nTop; aRect.Bottom() = rOrg.Y() + aTempSize.Height() - nBottom; - Rectangle aHdRect(aRect); - Rectangle aFtRect(aRect); + tools::Rectangle aHdRect(aRect); + tools::Rectangle aFtRect(aRect); if (bHeader || bFooter) { @@ -325,7 +325,7 @@ void SvxPageWindow::DrawPage(vcl::RenderContext& rRenderContext, const Point& rO long nTH = CELL_HEIGHT * 3; long _nLeft = bHorz ? aRect.Left() + ((nW - nTW) / 2) : aRect.Left(); long _nTop = bVert ? aRect.Top() + ((nH - nTH) / 2) : aRect.Top(); - Rectangle aCellRect(Point(_nLeft, _nTop),Size(CELL_WIDTH, CELL_HEIGHT)); + tools::Rectangle aCellRect(Point(_nLeft, _nTop),Size(CELL_WIDTH, CELL_HEIGHT)); for (sal_uInt16 i = 0; i < 3; ++i) { @@ -346,8 +346,8 @@ void SvxPageWindow::DrawPage(vcl::RenderContext& rRenderContext, const Point& rO void SvxPageWindow::drawFillAttributes(vcl::RenderContext& rRenderContext, const drawinglayer::attribute::SdrAllFillAttributesHelperPtr& rFillAttributes, - const Rectangle& rPaintRange, - const Rectangle& rDefineRange) + const tools::Rectangle& rPaintRange, + const tools::Rectangle& rDefineRange) { const basegfx::B2DRange aPaintRange( rPaintRange.Left(), diff --git a/svx/source/dialog/paraprev.cxx b/svx/source/dialog/paraprev.cxx index 4a9da503e533..4d64c91aebcc 100644 --- a/svx/source/dialog/paraprev.cxx +++ b/svx/source/dialog/paraprev.cxx @@ -50,7 +50,7 @@ Size SvxParaPrevWindow::GetOptimalSize() const return getParagraphPreviewOptimalSize(this); } -void SvxParaPrevWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangle&) +void SvxParaPrevWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&) { DrawParagraph(rRenderContext); } @@ -71,7 +71,7 @@ void SvxParaPrevWindow::DrawParagraph(vcl::RenderContext& rRenderContext) Color aGrayColor(COL_LIGHTGRAY); rRenderContext.SetFillColor(Color(rWinColor)); - rRenderContext.DrawRect(Rectangle(Point(), aWinSize)); + rRenderContext.DrawRect(tools::Rectangle(Point(), aWinSize)); rRenderContext.SetLineColor(); @@ -192,7 +192,7 @@ void SvxParaPrevWindow::DrawParagraph(vcl::RenderContext& rRenderContext) aSiz.Width() = nLW; } - Rectangle aRect(aPnt, aSiz); + tools::Rectangle aRect(aPnt, aSiz); rRenderContext.DrawRect( aRect ); Lines[i] = aRect; diff --git a/svx/source/dialog/rubydialog.cxx b/svx/source/dialog/rubydialog.cxx index 489572f644a8..2b74ef1251f7 100644 --- a/svx/source/dialog/rubydialog.cxx +++ b/svx/source/dialog/rubydialog.cxx @@ -778,7 +778,7 @@ void RubyPreview::dispose() VCL_BUILDER_FACTORY(RubyPreview) -void RubyPreview::Paint(vcl::RenderContext& rRenderContext, const Rectangle& /*rRect*/) +void RubyPreview::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& /*rRect*/) { rRenderContext.Push(PushFlags::MAPMODE); @@ -790,7 +790,7 @@ void RubyPreview::Paint(vcl::RenderContext& rRenderContext, const Rectangle& /*r aSaveFont.SetFontHeight(aWinSize.Height() / 4); rRenderContext.SetFont(aSaveFont); - Rectangle aRect(Point(0, 0), aWinSize); + tools::Rectangle aRect(Point(0, 0), aWinSize); rRenderContext.SetLineColor(); rRenderContext.SetFillColor(aSaveFont.GetFillColor()); rRenderContext.DrawRect(aRect); diff --git a/svx/source/dialog/svxbmpnumvalueset.cxx b/svx/source/dialog/svxbmpnumvalueset.cxx index 18b37372267a..f4c27d362f19 100644 --- a/svx/source/dialog/svxbmpnumvalueset.cxx +++ b/svx/source/dialog/svxbmpnumvalueset.cxx @@ -133,7 +133,7 @@ void SvxNumValueSet::UserDraw( const UserDrawEvent& rUDEvt ) const Color aTextColor(COL_BLACK); vcl::RenderContext* pDev = rUDEvt.GetRenderContext(); - Rectangle aRect = rUDEvt.GetRect(); + tools::Rectangle aRect = rUDEvt.GetRect(); sal_uInt16 nItemId = rUDEvt.GetItemId(); long nRectWidth = aRect.GetWidth(); @@ -487,7 +487,7 @@ void SvxBmpNumValueSet::UserDraw(const UserDrawEvent& rUDEvt) { SvxNumValueSet::UserDraw(rUDEvt); - Rectangle aRect = rUDEvt.GetRect(); + tools::Rectangle aRect = rUDEvt.GetRect(); vcl::RenderContext* pDev = rUDEvt.GetRenderContext(); sal_uInt16 nItemId = rUDEvt.GetItemId(); Point aBLPos = aRect.TopLeft(); diff --git a/svx/source/dialog/svxruler.cxx b/svx/source/dialog/svxruler.cxx index 531d85df393d..ec43c43eb1a8 100644 --- a/svx/source/dialog/svxruler.cxx +++ b/svx/source/dialog/svxruler.cxx @@ -1585,7 +1585,7 @@ void SvxRuler::DrawLine_Impl(long& lTabPosition, int nNew, bool bHorizontal) if(lTabPosition != -1) { pEditWin->InvertTracking( - Rectangle( Point(lTabPosition, -aZero.Y()), + tools::Rectangle( Point(lTabPosition, -aZero.Y()), Point(lTabPosition, -aZero.Y() + nHeight)), ShowTrackFlags::Split | ShowTrackFlags::Clip ); } @@ -1597,7 +1597,7 @@ void SvxRuler::DrawLine_Impl(long& lTabPosition, int nNew, bool bHorizontal) if(mxPagePosItem.get()) lTabPosition += mxPagePosItem->GetPos().X(); pEditWin->InvertTracking( - Rectangle( Point(lTabPosition, -aZero.Y()), + tools::Rectangle( Point(lTabPosition, -aZero.Y()), Point(lTabPosition, -aZero.Y() + nHeight) ), ShowTrackFlags::Clip | ShowTrackFlags::Split ); } @@ -1609,7 +1609,7 @@ void SvxRuler::DrawLine_Impl(long& lTabPosition, int nNew, bool bHorizontal) if(lTabPosition != -1) { pEditWin->InvertTracking( - Rectangle( Point(-aZero.X(), lTabPosition), + tools::Rectangle( Point(-aZero.X(), lTabPosition), Point(-aZero.X() + nWidth, lTabPosition)), ShowTrackFlags::Split | ShowTrackFlags::Clip ); } @@ -1622,7 +1622,7 @@ void SvxRuler::DrawLine_Impl(long& lTabPosition, int nNew, bool bHorizontal) if(mxPagePosItem.get()) lTabPosition += mxPagePosItem->GetPos().Y(); pEditWin->InvertTracking( - Rectangle( Point(-aZero.X(), lTabPosition), + tools::Rectangle( Point(-aZero.X(), lTabPosition), Point(-aZero.X()+nWidth, lTabPosition)), ShowTrackFlags::Clip | ShowTrackFlags::Split ); } diff --git a/svx/source/dialog/swframeexample.cxx b/svx/source/dialog/swframeexample.cxx index 19539641bbc7..8f0a9e5d8fb8 100644 --- a/svx/source/dialog/swframeexample.cxx +++ b/svx/source/dialog/swframeexample.cxx @@ -37,7 +37,7 @@ using namespace ::com::sun::star::text; namespace { -void DrawRect_Impl(vcl::RenderContext& rRenderContext, const Rectangle &rRect, +void DrawRect_Impl(vcl::RenderContext& rRenderContext, const tools::Rectangle &rRect, const Color &rFillColor, const Color &rLineColor) { rRenderContext.SetFillColor(rFillColor); @@ -140,7 +140,7 @@ void SvxSwFrameExample::InitAllRects_Impl(vcl::RenderContext& rRenderContext) nTTxtBorder = 2; nBTxtBorder = 2; } - aPagePrtArea = Rectangle(Point(nLBorder, nTBorder), Point((nOutWPix - 1) - nRBorder, (nOutHPix - 1) - nBBorder)); + aPagePrtArea = tools::Rectangle(Point(nLBorder, nTBorder), Point((nOutWPix - 1) - nRBorder, (nOutHPix - 1) - nBBorder)); // Example text: Preparing for the text output // A line of text @@ -232,7 +232,7 @@ void SvxSwFrameExample::InitAllRects_Impl(vcl::RenderContext& rRenderContext) } } -void SvxSwFrameExample::CalcBoundRect_Impl(Rectangle &rRect) +void SvxSwFrameExample::CalcBoundRect_Impl(tools::Rectangle &rRect) { switch (nAnchor) { @@ -444,19 +444,19 @@ void SvxSwFrameExample::CalcBoundRect_Impl(Rectangle &rRect) } } -Rectangle SvxSwFrameExample::DrawInnerFrame_Impl(vcl::RenderContext& rRenderContext, const Rectangle &rRect, +tools::Rectangle SvxSwFrameExample::DrawInnerFrame_Impl(vcl::RenderContext& rRenderContext, const tools::Rectangle &rRect, const Color &rFillColor, const Color &rBorderColor) { DrawRect_Impl(rRenderContext, rRect, rFillColor, rBorderColor); // Bereich, zu dem relativ positioniert wird, bestimmen - Rectangle aRect(rRect); // aPagePrtArea = Default + tools::Rectangle aRect(rRect); // aPagePrtArea = Default CalcBoundRect_Impl(aRect); if (nAnchor == TextContentAnchorType_AT_FRAME && &rRect == &aPagePrtArea) { // Testabsatz zeichnen - Rectangle aTxt(aTextLine); + tools::Rectangle aTxt(aTextLine); sal_Int32 nStep = aTxt.GetHeight() + 2; sal_uInt16 nLines = static_cast<sal_uInt16>(aParaPrtArea.GetHeight() / (aTextLine.GetHeight() + 2)); @@ -472,7 +472,7 @@ Rectangle SvxSwFrameExample::DrawInnerFrame_Impl(vcl::RenderContext& rRenderCont return aRect; } -void SvxSwFrameExample::Paint(vcl::RenderContext& rRenderContext, const Rectangle&) +void SvxSwFrameExample::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&) { rRenderContext.SetMapMode(MapUnit::MapPixel); @@ -482,7 +482,7 @@ void SvxSwFrameExample::Paint(vcl::RenderContext& rRenderContext, const Rectangl DrawRect_Impl(rRenderContext, aPage, m_aBgCol, m_aBorderCol); // Draw PrintArea - Rectangle aRect = DrawInnerFrame_Impl(rRenderContext, aPagePrtArea, m_aTransColor, m_aPrintAreaCol); + tools::Rectangle aRect = DrawInnerFrame_Impl(rRenderContext, aPagePrtArea, m_aTransColor, m_aPrintAreaCol); if (nAnchor == TextContentAnchorType_AT_FRAME) aRect = DrawInnerFrame_Impl(rRenderContext, aFrameAtFrame, m_aBgCol, m_aBorderCol); @@ -590,9 +590,9 @@ void SvxSwFrameExample::Paint(vcl::RenderContext& rRenderContext, const Rectangl } } - Rectangle aFrmRect(Point(lXPos, lYPos), aFrmSize); + tools::Rectangle aFrmRect(Point(lXPos, lYPos), aFrmSize); - Rectangle* pOuterFrame = &aPage; + tools::Rectangle* pOuterFrame = &aPage; if (nAnchor == TextContentAnchorType_AT_FRAME) pOuterFrame = &aFrameAtFrame; @@ -609,7 +609,7 @@ void SvxSwFrameExample::Paint(vcl::RenderContext& rRenderContext, const Rectangl // Draw Test paragraph const long nTxtLineHeight = aTextLine.GetHeight(); - Rectangle aTxt(aTextLine); + tools::Rectangle aTxt(aTextLine); sal_Int32 nStep; sal_uInt16 nLines; diff --git a/svx/source/engine3d/e3dsceneupdater.cxx b/svx/source/engine3d/e3dsceneupdater.cxx index 0db7d98613ba..a77e7badd5a6 100644 --- a/svx/source/engine3d/e3dsceneupdater.cxx +++ b/svx/source/engine3d/e3dsceneupdater.cxx @@ -99,7 +99,7 @@ E3DModifySceneSnapRectUpdater::~E3DModifySceneSnapRectUpdater() aSnapRange.transform(rVCScene.getObjectTransformation()); // snap to (old) integer - const Rectangle aNewSnapRect( + const tools::Rectangle aNewSnapRect( sal_Int32(floor(aSnapRange.getMinX())), sal_Int32(floor(aSnapRange.getMinY())), sal_Int32(ceil(aSnapRange.getMaxX())), sal_Int32(ceil(aSnapRange.getMaxY()))); diff --git a/svx/source/engine3d/obj3d.cxx b/svx/source/engine3d/obj3d.cxx index da26db574f64..959a39d9e67c 100644 --- a/svx/source/engine3d/obj3d.cxx +++ b/svx/source/engine3d/obj3d.cxx @@ -384,7 +384,7 @@ void E3dObject::NbcMove(const Size& rSize) if(pScene) { //Dimensions of the scene in 3D and 2D for comparison - Rectangle aRect = pScene->GetSnapRect(); + tools::Rectangle aRect = pScene->GetSnapRect(); basegfx::B3DHomMatrix aInvDispTransform; if(GetParentObj()) @@ -435,7 +435,7 @@ SdrObjList* E3dObject::GetSubList() const void E3dObject::RecalcSnapRect() { - maSnapRect = Rectangle(); + maSnapRect = tools::Rectangle(); for(size_t a = 0; a < maSubList.GetObjCount(); ++a) { @@ -652,7 +652,7 @@ void E3dObject::SetTransform(const basegfx::B3DHomMatrix& rMatrix) NbcSetTransform(rMatrix); SetChanged(); BroadcastObjectChange(); - if (pUserCall != nullptr) pUserCall->Changed(*this, SdrUserCallType::Resize, Rectangle()); + if (pUserCall != nullptr) pUserCall->Changed(*this, SdrUserCallType::Resize, tools::Rectangle()); } } @@ -890,7 +890,7 @@ void E3dCompoundObject::RecalcSnapRect() const uno::Sequence< beans::PropertyValue > aEmptyParameters; drawinglayer::geometry::ViewInformation3D aViewInfo3D(aEmptyParameters); E3dScene* pRootScene = fillViewInformation3DForCompoundObject(aViewInfo3D, *this); - maSnapRect = Rectangle(); + maSnapRect = tools::Rectangle(); if(pRootScene) { @@ -920,7 +920,7 @@ void E3dCompoundObject::RecalcSnapRect() aSnapRange.transform(rVCScene.getObjectTransformation()); // snap to integer - maSnapRect = Rectangle( + maSnapRect = tools::Rectangle( sal_Int32(floor(aSnapRange.getMinX())), sal_Int32(floor(aSnapRange.getMinY())), sal_Int32(ceil(aSnapRange.getMaxX())), sal_Int32(ceil(aSnapRange.getMaxY()))); } diff --git a/svx/source/engine3d/scene3d.cxx b/svx/source/engine3d/scene3d.cxx index 609e3dd13991..93d005e663b9 100644 --- a/svx/source/engine3d/scene3d.cxx +++ b/svx/source/engine3d/scene3d.cxx @@ -201,8 +201,8 @@ void E3dScene::SetDefaultAttributes(E3dDefaultAttributes& /*rDefault*/) // Set defaults aCamera.SetViewWindow(-2, -2, 4, 4); aCameraSet.SetDeviceRectangle(-2, 2, -2, 2); - aCamera.SetDeviceWindow(Rectangle(0, 0, 10, 10)); - Rectangle aRect(0, 0, 10, 10); + aCamera.SetDeviceWindow(tools::Rectangle(0, 0, 10, 10)); + tools::Rectangle aRect(0, 0, 10, 10); aCameraSet.SetViewportRectangle(aRect); // set defaults for Camera from ItemPool @@ -287,19 +287,19 @@ void E3dScene::SetBoundRectDirty() } } -void E3dScene::NbcSetSnapRect(const Rectangle& rRect) +void E3dScene::NbcSetSnapRect(const tools::Rectangle& rRect) { SetRectsDirty(); E3dObject::NbcSetSnapRect(rRect); aCamera.SetDeviceWindow(rRect); - aCameraSet.SetViewportRectangle((Rectangle&)rRect); + aCameraSet.SetViewportRectangle((tools::Rectangle&)rRect); ImpCleanup3DDepthMapper(); } void E3dScene::NbcMove(const Size& rSize) { - Rectangle aNewSnapRect = GetSnapRect(); + tools::Rectangle aNewSnapRect = GetSnapRect(); MoveRect(aNewSnapRect, rSize); NbcSetSnapRect(aNewSnapRect); } @@ -307,7 +307,7 @@ void E3dScene::NbcMove(const Size& rSize) void E3dScene::NbcResize(const Point& rRef, const Fraction& rXFact, const Fraction& rYFact) { - Rectangle aNewSnapRect = GetSnapRect(); + tools::Rectangle aNewSnapRect = GetSnapRect(); ResizeRect(aNewSnapRect, rRef, rXFact, rYFact); NbcSetSnapRect(aNewSnapRect); } @@ -336,7 +336,7 @@ void E3dScene::SetCamera(const Camera3D& rNewCamera) // Set perspective GetCameraSet().SetPerspective(aCamera.GetProjection() == ProjectionType::Perspective); - GetCameraSet().SetViewportRectangle((Rectangle&)aCamera.GetDeviceWindow()); + GetCameraSet().SetViewportRectangle((tools::Rectangle&)aCamera.GetDeviceWindow()); ImpCleanup3DDepthMapper(); } @@ -662,7 +662,7 @@ basegfx::B2DPolyPolygon E3dScene::TakeCreatePoly(const SdrDragStat& /*rDrag*/) c bool E3dScene::BegCreate(SdrDragStat& rStat) { rStat.SetOrtho4Possible(); - Rectangle aRect1(rStat.GetStart(), rStat.GetNow()); + tools::Rectangle aRect1(rStat.GetStart(), rStat.GetNow()); aRect1.Justify(); rStat.SetActionRect(aRect1); NbcSetSnapRect(aRect1); @@ -671,7 +671,7 @@ bool E3dScene::BegCreate(SdrDragStat& rStat) bool E3dScene::MovCreate(SdrDragStat& rStat) { - Rectangle aRect1; + tools::Rectangle aRect1; rStat.TakeCreateRect(aRect1); aRect1.Justify(); rStat.SetActionRect(aRect1); @@ -683,7 +683,7 @@ bool E3dScene::MovCreate(SdrDragStat& rStat) bool E3dScene::EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd) { - Rectangle aRect1; + tools::Rectangle aRect1; rStat.TakeCreateRect(aRect1); aRect1.Justify(); NbcSetSnapRect(aRect1); diff --git a/svx/source/engine3d/view3d.cxx b/svx/source/engine3d/view3d.cxx index df28c3c5ba56..a2b0af5f3261 100644 --- a/svx/source/engine3d/view3d.cxx +++ b/svx/source/engine3d/view3d.cxx @@ -365,7 +365,7 @@ SdrModel* E3dView::GetMarkedObjModel() const } SdrModel* pNewModel = nullptr; - Rectangle aSelectedSnapRect; + tools::Rectangle aSelectedSnapRect; // set 3d selection flags at all directly selected objects // and collect SnapRect of selected objects @@ -470,7 +470,7 @@ bool E3dView::Paste( const size_t nObjCount(pSrcPg->GetObjCount()); // calculate offset for paste - Rectangle aR = pSrcPg->GetAllObjBoundRect(); + tools::Rectangle aR = pSrcPg->GetAllObjBoundRect(); Point aDist(aPos - aR.Center()); // Insert sub-objects for scenes @@ -842,7 +842,7 @@ void E3dView::ConvertMarkedObjTo3D(bool bExtrude, const basegfx::B2DPoint& rPnt1 E3dScene* pScene = new E3dPolyScene(Get3DDefaultAttributes()); // Determine rectangle and possibly correct it - Rectangle aRect = GetAllMarkedRect(); + tools::Rectangle aRect = GetAllMarkedRect(); if(aRect.GetWidth() <= 1) aRect.SetSize(Size(500, aRect.GetHeight())); if(aRect.GetHeight() <= 1) @@ -898,7 +898,7 @@ void E3dView::ConvertMarkedObjTo3D(bool bExtrude, const basegfx::B2DPoint& rPnt1 { SdrMark* pMark = GetSdrMarkByIndex(a); SdrObject* pObj = pMark->GetMarkedSdrObj(); - Rectangle aTurnRect = pObj->GetSnapRect(); + tools::Rectangle aTurnRect = pObj->GetSnapRect(); basegfx::B2DPoint aRot; Point aRotPnt; @@ -907,28 +907,28 @@ void E3dView::ConvertMarkedObjTo3D(bool bExtrude, const basegfx::B2DPoint& rPnt1 aRot.setX(-aRot.getX()); aRot *= aInvLatheMat; aRotPnt = Point((long)(aRot.getX() + 0.5), (long)(-aRot.getY() - 0.5)); - aRect.Union(Rectangle(aRotPnt, aRotPnt)); + aRect.Union(tools::Rectangle(aRotPnt, aRotPnt)); aRot = basegfx::B2DPoint(aTurnRect.Left(), -aTurnRect.Bottom()); aRot *= aLatheMat; aRot.setX(-aRot.getX()); aRot *= aInvLatheMat; aRotPnt = Point((long)(aRot.getX() + 0.5), (long)(-aRot.getY() - 0.5)); - aRect.Union(Rectangle(aRotPnt, aRotPnt)); + aRect.Union(tools::Rectangle(aRotPnt, aRotPnt)); aRot = basegfx::B2DPoint(aTurnRect.Right(), -aTurnRect.Top()); aRot *= aLatheMat; aRot.setX(-aRot.getX()); aRot *= aInvLatheMat; aRotPnt = Point((long)(aRot.getX() + 0.5), (long)(-aRot.getY() - 0.5)); - aRect.Union(Rectangle(aRotPnt, aRotPnt)); + aRect.Union(tools::Rectangle(aRotPnt, aRotPnt)); aRot = basegfx::B2DPoint(aTurnRect.Right(), -aTurnRect.Bottom()); aRot *= aLatheMat; aRot.setX(-aRot.getX()); aRot *= aInvLatheMat; aRotPnt = Point((long)(aRot.getX() + 0.5), (long)(-aRot.getY() - 0.5)); - aRect.Union(Rectangle(aRotPnt, aRotPnt)); + aRect.Union(tools::Rectangle(aRotPnt, aRotPnt)); } } @@ -1301,7 +1301,7 @@ E3dScene* E3dView::SetCurrent3DObj(E3dObject* p3DObj) double fW(aVolume.getWidth()); double fH(aVolume.getHeight()); - Rectangle aRect(0,0, (long) fW, (long) fH); + tools::Rectangle aRect(0,0, (long) fW, (long) fH); pScene = new E3dPolyScene(Get3DDefaultAttributes()); @@ -1472,7 +1472,7 @@ void E3dView::End3DCreation(bool bUseDefaultValuesForMirrorAxes) { if(bUseDefaultValuesForMirrorAxes) { - Rectangle aRect = GetAllMarkedRect(); + tools::Rectangle aRect = GetAllMarkedRect(); if(aRect.GetWidth() <= 1) aRect.SetSize(Size(500, aRect.GetHeight())); if(aRect.GetHeight() <= 1) diff --git a/svx/source/engine3d/viewpt3d2.cxx b/svx/source/engine3d/viewpt3d2.cxx index 7c8a73cec03c..9a0769a953bd 100644 --- a/svx/source/engine3d/viewpt3d2.cxx +++ b/svx/source/engine3d/viewpt3d2.cxx @@ -118,7 +118,7 @@ const basegfx::B3DPoint& Viewport3D::GetViewPoint() return aViewPoint; } -void Viewport3D::SetDeviceWindow(const Rectangle& rRect) +void Viewport3D::SetDeviceWindow(const tools::Rectangle& rRect) { long nNewW = rRect.GetWidth(); long nNewH = rRect.GetHeight(); diff --git a/svx/source/fmcomp/fmgridcl.cxx b/svx/source/fmcomp/fmgridcl.cxx index 1c08880b0ef8..8a40701f5bea 100644 --- a/svx/source/fmcomp/fmgridcl.cxx +++ b/svx/source/fmcomp/fmgridcl.cxx @@ -180,7 +180,7 @@ void FmGridHeader::RequestHelp( const HelpEvent& rHEvt ) { if ( rHEvt.GetMode() & (HelpEventMode::QUICK | HelpEventMode::BALLOON) ) { - Rectangle aItemRect = GetItemRect( nItemId ); + tools::Rectangle aItemRect = GetItemRect( nItemId ); Point aPt = OutputToScreenPixel( aItemRect.TopLeft() ); aItemRect.Left() = aPt.X(); aItemRect.Top() = aPt.Y(); @@ -1058,7 +1058,7 @@ void FmGridControl::Command(const CommandEvent& _rEvt) { sal_uInt16 nSelId = GetColumnId( sal::static_int_cast< sal_uInt16 >( FirstSelectedColumn() ) ); - ::Rectangle aColRect( GetFieldRectPixel( 0, nSelId, false ) ); + ::tools::Rectangle aColRect( GetFieldRectPixel( 0, nSelId, false ) ); Point aRelativePos( pMyHeader->ScreenToOutputPixel( OutputToScreenPixel( aColRect.TopCenter() ) ) ); pMyHeader->triggerColumnContextMenu(aRelativePos); diff --git a/svx/source/fmcomp/fmgridif.cxx b/svx/source/fmcomp/fmgridif.cxx index 36b5bf9ee82e..3a8b87f7d5f5 100644 --- a/svx/source/fmcomp/fmgridif.cxx +++ b/svx/source/fmcomp/fmgridif.cxx @@ -1464,7 +1464,7 @@ void FmXGridPeer::propertyChange(const PropertyChangeEvent& evt) if (bWasEditing) pGrid->DeactivateCell(); - ::Rectangle aColRect = pGrid->GetFieldRect(nId); + ::tools::Rectangle aColRect = pGrid->GetFieldRect(nId); aColRect.Top() = 0; aColRect.Bottom() = pGrid->GetSizePixel().Height(); pGrid->Invalidate(aColRect); diff --git a/svx/source/fmcomp/gridcell.cxx b/svx/source/fmcomp/gridcell.cxx index a2a8960146dd..a6485c72fd0a 100644 --- a/svx/source/fmcomp/gridcell.cxx +++ b/svx/source/fmcomp/gridcell.cxx @@ -450,7 +450,7 @@ Reference< css::sdb::XColumn > DbGridColumn::GetCurrentFieldValue() const void DbGridColumn::Paint(OutputDevice& rDev, - const Rectangle& rRect, + const tools::Rectangle& rRect, const DbGridRow* pRow, const Reference< XNumberFormatter >& xFormatter) { @@ -951,7 +951,7 @@ void DbCellControl::AlignControl(sal_Int16 nAlignment) } -void DbCellControl::PaintCell( OutputDevice& _rDev, const Rectangle& _rRect ) +void DbCellControl::PaintCell( OutputDevice& _rDev, const tools::Rectangle& _rRect ) { if ( m_pPainter->GetParent() == &_rDev ) { @@ -978,7 +978,7 @@ void DbCellControl::PaintCell( OutputDevice& _rDev, const Rectangle& _rRect ) } -void DbCellControl::PaintFieldToCell( OutputDevice& _rDev, const Rectangle& _rRect, const Reference< XColumn >& _rxField, const Reference< XNumberFormatter >& _rxFormatter ) +void DbCellControl::PaintFieldToCell( OutputDevice& _rDev, const tools::Rectangle& _rRect, const Reference< XColumn >& _rxField, const Reference< XNumberFormatter >& _rxFormatter ) { m_pPainter->SetText( GetFormatText( _rxField, _rxFormatter ) ); PaintCell( _rDev, _rRect ); @@ -1141,7 +1141,7 @@ CellControllerRef DbTextField::CreateController() const } -void DbTextField::PaintFieldToCell( OutputDevice& _rDev, const Rectangle& _rRect, const Reference< XColumn >& _rxField, const Reference< XNumberFormatter >& _rxFormatter ) +void DbTextField::PaintFieldToCell( OutputDevice& _rDev, const tools::Rectangle& _rRect, const Reference< XColumn >& _rxField, const Reference< XNumberFormatter >& _rxFormatter ) { if ( m_pPainterImplementation ) m_pPainterImplementation->SetText( GetFormatText( _rxField, _rxFormatter ) ); @@ -1680,7 +1680,7 @@ void DbCheckBox::UpdateFromField(const Reference< css::sdb::XColumn >& _rxField, } -void DbCheckBox::PaintFieldToCell(OutputDevice& rDev, const Rectangle& rRect, +void DbCheckBox::PaintFieldToCell(OutputDevice& rDev, const tools::Rectangle& rRect, const Reference< css::sdb::XColumn >& _rxField, const Reference< XNumberFormatter >& xFormatter) { @@ -2677,7 +2677,7 @@ DbFilterField::~DbFilterField() } -void DbFilterField::PaintCell(OutputDevice& rDev, const Rectangle& rRect) +void DbFilterField::PaintCell(OutputDevice& rDev, const tools::Rectangle& rRect) { static const DrawTextFlags nStyle = DrawTextFlags::Clip | DrawTextFlags::VCenter | DrawTextFlags::Left; switch (m_nControlClass) @@ -3486,7 +3486,7 @@ void FmXGridCell::onWindowEvent( const VclEventId _nEventId, const vcl::Window& } -void FmXDataCell::PaintFieldToCell(OutputDevice& rDev, const Rectangle& rRect, +void FmXDataCell::PaintFieldToCell(OutputDevice& rDev, const tools::Rectangle& rRect, const Reference< css::sdb::XColumn >& _rxField, const Reference< XNumberFormatter >& xFormatter) { @@ -3510,7 +3510,7 @@ FmXTextCell::FmXTextCell( DbGridColumn* pColumn, DbCellControl& _rControl ) void FmXTextCell::PaintFieldToCell(OutputDevice& rDev, - const Rectangle& rRect, + const tools::Rectangle& rRect, const Reference< css::sdb::XColumn >& _rxField, const Reference< XNumberFormatter >& xFormatter) { @@ -4563,7 +4563,7 @@ const Sequence<sal_Int8>& FmXFilterCell::getUnoTunnelId() } -void FmXFilterCell::PaintCell( OutputDevice& rDev, const Rectangle& rRect ) +void FmXFilterCell::PaintCell( OutputDevice& rDev, const tools::Rectangle& rRect ) { static_cast< DbFilterField* >( m_pCellControl )->PaintCell( rDev, rRect ); } diff --git a/svx/source/fmcomp/gridctrl.cxx b/svx/source/fmcomp/gridctrl.cxx index e04a5499c314..0dc400b43024 100644 --- a/svx/source/fmcomp/gridctrl.cxx +++ b/svx/source/fmcomp/gridctrl.cxx @@ -424,7 +424,7 @@ sal_uInt16 DbGridControl::NavigationBar::ArrangeControls() { // positioning of the controls // calculate base size - Rectangle aRect(static_cast<DbGridControl*>(GetParent())->GetControlArea()); + tools::Rectangle aRect(static_cast<DbGridControl*>(GetParent())->GetControlArea()); long nH = aRect.GetSize().Height(); long nW = GetParent()->GetOutputSizePixel().Width(); Size aBorder = LogicToPixel(Size(2, 2),MapUnit::MapAppFont); @@ -770,7 +770,7 @@ void DbGridControl::NavigationBar::Resize() ArrangeControls(); } -void DbGridControl::NavigationBar::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) +void DbGridControl::NavigationBar::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) { Control::Paint(rRenderContext, rRect); Point aAbsolutePos = m_aAbsolute->GetPosPixel(); @@ -1198,7 +1198,7 @@ void DbGridControl::ArrangeControls(sal_uInt16& nX, sal_uInt16 nY) // positioning of the controls if (m_bNavigationBar) { - Rectangle aRect(GetControlArea()); + tools::Rectangle aRect(GetControlArea()); m_aBar->SetPosSizePixel(Point(0, nY + 1), Size(aRect.GetSize().Width(), aRect.GetSize().Height() - 1)); nX = m_aBar->ArrangeControls(); } @@ -2034,7 +2034,7 @@ svt::EditBrowseBox::RowStatus DbGridControl::GetRowStatus(long nRow) const return EditBrowseBox::CLEAN; } -void DbGridControl::PaintCell(OutputDevice& rDev, const Rectangle& rRect, sal_uInt16 nColumnId) const +void DbGridControl::PaintCell(OutputDevice& rDev, const tools::Rectangle& rRect, sal_uInt16 nColumnId) const { if (!IsValid(m_xPaintRow)) return; @@ -2043,7 +2043,7 @@ void DbGridControl::PaintCell(OutputDevice& rDev, const Rectangle& rRect, sal_uI DbGridColumn* pColumn = (Location < m_aColumns.size() ) ? m_aColumns[ Location ] : nullptr; if (pColumn) { - Rectangle aArea(rRect); + tools::Rectangle aArea(rRect); if ((GetMode() & BrowserMode::CURSOR_WO_FOCUS) == BrowserMode::CURSOR_WO_FOCUS) { aArea.Top() += 1; @@ -2850,7 +2850,7 @@ void DbGridControl::Command(const CommandEvent& rEvt) { long nRow = FirstSelectedRow( ); - ::Rectangle aRowRect( GetRowRectPixel( nRow ) ); + ::tools::Rectangle aRowRect( GetRowRectPixel( nRow ) ); executeRowContextMenu( nRow, aRowRect.LeftCenter() ); // handled diff --git a/svx/source/form/filtnav.cxx b/svx/source/form/filtnav.cxx index 374324049f97..965b2c0069fe 100644 --- a/svx/source/form/filtnav.cxx +++ b/svx/source/form/filtnav.cxx @@ -988,7 +988,7 @@ void FmFilterItemsString::Paint(const Point& rPos, SvTreeListBox& rDev, vcl::Ren rRenderContext.Push(PushFlags::LINECOLOR); rRenderContext.SetLineColor(rRenderContext.GetTextColor()); - Rectangle aRect(rPos, GetSize(&rDev, &rEntry)); + tools::Rectangle aRect(rPos, GetSize(&rDev, &rEntry)); Point aFirst(rPos.X(), aRect.Bottom() - 6); Point aSecond(aFirst .X() + 2, aFirst.Y() + 3); diff --git a/svx/source/form/fmpage.cxx b/svx/source/form/fmpage.cxx index ed0da03cfac7..bc700454abd2 100644 --- a/svx/source/form/fmpage.cxx +++ b/svx/source/form/fmpage.cxx @@ -198,7 +198,7 @@ bool FmFormPage::RequestHelp( vcl::Window* pWindow, SdrView* pView, if ( !aHelpText.isEmpty() ) { // Hilfe anzeigen - Rectangle aItemRect = pObj->GetCurrentBoundRect(); + tools::Rectangle aItemRect = pObj->GetCurrentBoundRect(); aItemRect = pWindow->LogicToPixel( aItemRect ); Point aPt = pWindow->OutputToScreenPixel( aItemRect.TopLeft() ); aItemRect.Left() = aPt.X(); diff --git a/svx/source/form/fmvwimp.cxx b/svx/source/form/fmvwimp.cxx index 8d8f7200d6f8..d6da352e106f 100644 --- a/svx/source/form/fmvwimp.cxx +++ b/svx/source/form/fmvwimp.cxx @@ -255,7 +255,7 @@ void SAL_CALL FormViewPageWindowAdapter::makeVisible( const Reference< XControl if ( xWindow.is() && m_pViewImpl->getView() && m_pWindow ) { awt::Rectangle aRect = xWindow->getPosSize(); - ::Rectangle aNewRect( aRect.X, aRect.Y, aRect.X + aRect.Width, aRect.Y + aRect.Height ); + ::tools::Rectangle aNewRect( aRect.X, aRect.Y, aRect.X + aRect.Width, aRect.Y + aRect.Height ); aNewRect = m_pWindow->PixelToLogic( aNewRect ); m_pViewImpl->getView()->MakeVisible( aNewRect, *m_pWindow ); } @@ -1005,7 +1005,7 @@ IMPL_LINK_NOARG(FmXFormView, OnAutoFocus, void*, void) if ( pCurrentWindow ) { awt::Rectangle aRect = xControlWindow->getPosSize(); - ::Rectangle aNonUnoRect( aRect.X, aRect.Y, aRect.X + aRect.Width, aRect.Y + aRect.Height ); + ::tools::Rectangle aNonUnoRect( aRect.X, aRect.Y, aRect.X + aRect.Width, aRect.Y + aRect.Height ); m_pView->MakeVisible( pCurrentWindow->PixelToLogic( aNonUnoRect ), *const_cast< vcl::Window* >( pCurrentWindow ) ); } } @@ -1490,7 +1490,7 @@ SdrObject* FmXFormView::implCreateXFormsControl( const svx::OXFormsDescriptor &_ controlSize.Width() = Fraction(controlSize.Width(), 1) * eTargetMode.GetScaleX(); controlSize.Height() = Fraction(controlSize.Height(), 1) * eTargetMode.GetScaleY(); ::Point controlPos( OutputDevice::LogicToLogic( ::Point( controlSize.Width(), 0 ), eSourceMode, eTargetMode ) ); - ::Rectangle controlRect( controlPos, OutputDevice::LogicToLogic( controlSize, eSourceMode, eTargetMode ) ); + ::tools::Rectangle controlRect( controlPos, OutputDevice::LogicToLogic( controlSize, eSourceMode, eTargetMode ) ); pControl->SetLogicRect(controlRect); // set the button label @@ -1608,7 +1608,7 @@ bool FmXFormView::createControlLabelPair( OutputDevice& _rOutDev, sal_Int32 _nXO xLabelModel->setPropertyValue(FM_PROP_NAME, makeAny(sObjectLabel)); } - pLabel->SetLogicRect( ::Rectangle( + pLabel->SetLogicRect( ::tools::Rectangle( OutputDevice::LogicToLogic( ::Point( _nXOffsetMM, _nYOffsetMM ), eSourceMode, eTargetMode ), OutputDevice::LogicToLogic( aRealSize, eSourceMode, eTargetMode ) ) ); @@ -1647,7 +1647,7 @@ bool FmXFormView::createControlLabelPair( OutputDevice& _rOutDev, sal_Int32 _nXO aControlSize.Width() = long(Fraction(aControlSize.Width(), 1) * eTargetMode.GetScaleX()); aControlSize.Height() = long(Fraction(aControlSize.Height(), 1) * eTargetMode.GetScaleY()); - pControl->SetLogicRect( ::Rectangle( + pControl->SetLogicRect( ::tools::Rectangle( OutputDevice::LogicToLogic( ::Point( aRealSize.Width() + _nXOffsetMM, _nYOffsetMM ), eSourceMode, eTargetMode ), OutputDevice::LogicToLogic( aControlSize, eSourceMode, eTargetMode ) ) ); diff --git a/svx/source/form/formcontrolfactory.cxx b/svx/source/form/formcontrolfactory.cxx index b86d281fc42e..d4aeebd3c530 100644 --- a/svx/source/form/formcontrolfactory.cxx +++ b/svx/source/form/formcontrolfactory.cxx @@ -128,7 +128,7 @@ namespace svxform void FormControlFactory::initializeControlModel( const DocumentType _eDocType, const Reference< XPropertySet >& _rxControlModel ) { initializeControlModel( - _eDocType, _rxControlModel, Rectangle() + _eDocType, _rxControlModel, tools::Rectangle() ); } @@ -381,7 +381,7 @@ namespace svxform sal_Int16 FormControlFactory::initializeControlModel( const DocumentType _eDocType, const Reference< XPropertySet >& _rxControlModel, - const Rectangle& _rControlBoundRect ) + const tools::Rectangle& _rControlBoundRect ) { sal_Int16 nClassId = FormComponentType::CONTROL; diff --git a/svx/source/form/navigatortree.cxx b/svx/source/form/navigatortree.cxx index 648b1c3d4344..3ff0d2000906 100644 --- a/svx/source/form/navigatortree.cxx +++ b/svx/source/form/navigatortree.cxx @@ -2077,7 +2077,7 @@ namespace svxform } } // while ( aIter.IsMore() ) // make the mark visible - ::Rectangle aMarkRect( pFormView->GetAllMarkedRect()); + ::tools::Rectangle aMarkRect( pFormView->GetAllMarkedRect()); for ( sal_uInt32 i = 0; i < pFormView->PaintWindowCount(); ++i ) { SdrPaintWindow* pPaintWindow = pFormView->GetPaintWindow( i ); @@ -2145,7 +2145,7 @@ namespace svxform if ( bPaint ) { // make the mark visible - ::Rectangle aMarkRect( pFormView->GetAllMarkedRect()); + ::tools::Rectangle aMarkRect( pFormView->GetAllMarkedRect()); for ( sal_uInt32 i = 0; i < pFormView->PaintWindowCount(); ++i ) { SdrPaintWindow* pPaintWindow = pFormView->GetPaintWindow( i ); diff --git a/svx/source/gallery2/GalleryControl.cxx b/svx/source/gallery2/GalleryControl.cxx index 80822893f9f0..0857cdb57431 100644 --- a/svx/source/gallery2/GalleryControl.cxx +++ b/svx/source/gallery2/GalleryControl.cxx @@ -146,7 +146,7 @@ void GalleryControl::Resize() Size( nSplitSize, aNewSize.Height() ) ); mpSplitter->SetDragRectPixel( - Rectangle( + tools::Rectangle( Point( nFrameLen2, 0 ), Size( aNewSize.Width() - ( nFrameLen2 << 1 ) - nSplitSize, aNewSize.Height() ) ) ); @@ -165,7 +165,7 @@ void GalleryControl::Resize() Size( aNewSize.Width(), nSplitSize ) ); mpSplitter->SetDragRectPixel( - Rectangle( + tools::Rectangle( Point( 0, nFrameLen2 ), Size( aNewSize.Width(), aNewSize.Height() - ( nFrameLen2 << 1 ) - nSplitSize ) )); diff --git a/svx/source/gallery2/galbrws1.cxx b/svx/source/gallery2/galbrws1.cxx index 7201c6e21698..04c76bc2fbbd 100644 --- a/svx/source/gallery2/galbrws1.cxx +++ b/svx/source/gallery2/galbrws1.cxx @@ -591,7 +591,7 @@ IMPL_LINK_NOARG(GalleryBrowser1, ShowContextMenuHdl, void*, void) aMenu->SetSelectHdl( LINK( this, GalleryBrowser1, PopupMenuHdl ) ); aMenu->RemoveDisabledEntries(); - const Rectangle aThemesRect( mpThemes->GetPosPixel(), mpThemes->GetOutputSizePixel() ); + const tools::Rectangle aThemesRect( mpThemes->GetPosPixel(), mpThemes->GetOutputSizePixel() ); Point aSelPos( mpThemes->GetBoundingRectangle( mpThemes->GetSelectEntryPos() ).Center() ); aSelPos.X() = std::max( std::min( aSelPos.X(), aThemesRect.Right() ), aThemesRect.Left() ); diff --git a/svx/source/gallery2/galctrl.cxx b/svx/source/gallery2/galctrl.cxx index f7f9edbdcde2..6260869d827b 100644 --- a/svx/source/gallery2/galctrl.cxx +++ b/svx/source/gallery2/galctrl.cxx @@ -91,7 +91,7 @@ void GalleryPreview::DataChanged( const DataChangedEvent& rDCEvt ) Window::DataChanged( rDCEvt ); } -bool GalleryPreview::ImplGetGraphicCenterRect( const Graphic& rGraphic, Rectangle& rResultRect ) const +bool GalleryPreview::ImplGetGraphicCenterRect( const Graphic& rGraphic, tools::Rectangle& rResultRect ) const { const Size aWinSize( GetOutputSizePixel() ); Size aNewSize( LogicToPixel( rGraphic.GetPrefSize(), rGraphic.GetPrefMapMode() ) ); @@ -117,14 +117,14 @@ bool GalleryPreview::ImplGetGraphicCenterRect( const Graphic& rGraphic, Rectangl const Point aNewPos( ( aWinSize.Width() - aNewSize.Width() ) >> 1, ( aWinSize.Height() - aNewSize.Height() ) >> 1 ); - rResultRect = Rectangle( aNewPos, aNewSize ); + rResultRect = tools::Rectangle( aNewPos, aNewSize ); bRet = true; } return bRet; } -void GalleryPreview::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) +void GalleryPreview::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) { Window::Paint(rRenderContext, rRect); @@ -297,7 +297,7 @@ void GalleryIconView::UserDraw(const UserDrawEvent& rUDEvt) if (nId && mpTheme) { - const Rectangle& rRect = rUDEvt.GetRect(); + const tools::Rectangle& rRect = rUDEvt.GetRect(); const Size aSize(rRect.GetWidth(), rRect.GetHeight()); BitmapEx aBitmapEx; Size aPreparedSize; @@ -451,10 +451,10 @@ OUString GalleryListView::GetCellText(long _nRow, sal_uInt16 /*nColumnId*/) cons return sRet; } -Rectangle GalleryListView::GetFieldCharacterBounds(sal_Int32 _nRow,sal_Int32 _nColumnPos,sal_Int32 nIndex) +tools::Rectangle GalleryListView::GetFieldCharacterBounds(sal_Int32 _nRow,sal_Int32 _nColumnPos,sal_Int32 nIndex) { DBG_ASSERT(_nColumnPos >= 0 && _nColumnPos <= USHRT_MAX, "GalleryListView::GetFieldCharacterBounds: _nColumnId overflow"); - Rectangle aRect; + tools::Rectangle aRect; if ( SeekRow(_nRow) ) { SvxFont aFont( GetFont() ); @@ -481,7 +481,7 @@ sal_Int32 GalleryListView::GetFieldIndexAtPoint(sal_Int32 _nRow,sal_Int32 _nColu return nRet; } -void GalleryListView::PaintField(vcl::RenderContext& rDev, const Rectangle& rRect, sal_uInt16 /*nColumnId*/) const +void GalleryListView::PaintField(vcl::RenderContext& rDev, const tools::Rectangle& rRect, sal_uInt16 /*nColumnId*/) const { rDev.Push( PushFlags::CLIPREGION ); rDev.IntersectClipRegion( rRect ); diff --git a/svx/source/gallery2/galobj.cxx b/svx/source/gallery2/galobj.cxx index a24c0fa7eba9..10bc1b9e21cd 100644 --- a/svx/source/gallery2/galobj.cxx +++ b/svx/source/gallery2/galobj.cxx @@ -478,7 +478,7 @@ bool SgaObjectSvDraw::CreateThumb( const FmFormModel& rModel ) if(pPage) { - const Rectangle aObjRect(pPage->GetAllObjBoundRect()); + const tools::Rectangle aObjRect(pPage->GetAllObjBoundRect()); if(aObjRect.GetWidth() && aObjRect.GetHeight()) { diff --git a/svx/source/inc/GraphCtlAccessibleContext.hxx b/svx/source/inc/GraphCtlAccessibleContext.hxx index 4ccc2221d0ae..3b5e142caaf9 100644 --- a/svx/source/inc/GraphCtlAccessibleContext.hxx +++ b/svx/source/inc/GraphCtlAccessibleContext.hxx @@ -55,7 +55,7 @@ namespace com { namespace sun { namespace star { namespace awt { class XFocusListener; } } } } -class Rectangle; +namespace tools { class Rectangle; } class GraphCtrl; class SdrObject; class SdrModel; @@ -151,7 +151,7 @@ public: virtual void SAL_CALL deselectAccessibleChild( sal_Int32 nSelectedChildIndex ) override; // IAccessibleViewforwarder - virtual Rectangle GetVisibleArea() const override; + virtual tools::Rectangle GetVisibleArea() const override; virtual Point LogicToPixel (const Point& rPoint) const override; virtual Size LogicToPixel (const Size& rSize) const override; @@ -177,12 +177,12 @@ protected: When the object is already disposed then a <type>DisposedException</type> is thrown. */ - Rectangle GetBoundingBoxOnScreen(); + tools::Rectangle GetBoundingBoxOnScreen(); /// Return the object's current bounding box relative to the parent object. /// /// @throws css::uno::RuntimeException - Rectangle GetBoundingBox(); + tools::Rectangle GetBoundingBox(); virtual void SAL_CALL disposing() final override; diff --git a/svx/source/inc/charmapacc.hxx b/svx/source/inc/charmapacc.hxx index afc9181fec91..6783b5504752 100644 --- a/svx/source/inc/charmapacc.hxx +++ b/svx/source/inc/charmapacc.hxx @@ -100,7 +100,7 @@ namespace svx SvxShowCharSet& mrParent; sal_uInt16 mnId; OUString maText; - Rectangle maRect; + tools::Rectangle maRect; rtl::Reference<SvxShowCharSetItemAcc> m_xItem; SvxShowCharSetAcc* m_pParent; diff --git a/svx/source/inc/formcontrolfactory.hxx b/svx/source/inc/formcontrolfactory.hxx index 020a457a50c2..0f21051f2da6 100644 --- a/svx/source/inc/formcontrolfactory.hxx +++ b/svx/source/inc/formcontrolfactory.hxx @@ -33,7 +33,7 @@ #include <memory> class SdrUnoObj; -class Rectangle; +namespace tools { class Rectangle; } namespace comphelper { class ComponentContext; @@ -66,7 +66,7 @@ namespace svxform sal_Int16 initializeControlModel( const DocumentType _eDocType, const css::uno::Reference< css::beans::XPropertySet >& _rxControlModel, - const Rectangle& _rControlBoundRect + const tools::Rectangle& _rControlBoundRect ); sal_Int16 initializeControlModel( const DocumentType _eDocType, const SdrUnoObj& _rObject ); diff --git a/svx/source/inc/frmselimpl.hxx b/svx/source/inc/frmselimpl.hxx index 0bb1e12b17ae..736a81dd2644 100644 --- a/svx/source/inc/frmselimpl.hxx +++ b/svx/source/inc/frmselimpl.hxx @@ -69,9 +69,9 @@ public: void MergeFocusToPolyPolygon( tools::PolyPolygon& rPPoly ) const; void ClearClickArea() { maClickArea.Clear(); } - void AddClickRect( const Rectangle& rRect ); + void AddClickRect( const tools::Rectangle& rRect ); bool ContainsClickPoint( const Point& rPos ) const; - Rectangle GetClickBoundRect() const; + tools::Rectangle GetClickBoundRect() const; void SetKeyboardNeighbors(FrameBorderType eLeft, FrameBorderType eRight, FrameBorderType eTop, FrameBorderType eBottom); diff --git a/svx/source/inc/gridcell.hxx b/svx/source/inc/gridcell.hxx index 418719bccc7c..69993985f1da 100644 --- a/svx/source/inc/gridcell.hxx +++ b/svx/source/inc/gridcell.hxx @@ -140,7 +140,7 @@ public: // Zeichnen eines Feldes an einer Position, ist ein View gesetzt // uebernimmt dieser das Zeichnen, z.B. fuer CheckBoxen void Paint(OutputDevice& rDev, - const Rectangle& rRect, + const tools::Rectangle& rRect, const DbGridRow* pRow, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter); @@ -292,8 +292,8 @@ public: virtual void UpdateFromField(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter) = 0; // Painten eines Zellinhalts im vorgegeben Rechteck - virtual void PaintFieldToCell( OutputDevice& rDev, const Rectangle& rRect, const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter); - virtual void PaintCell( OutputDevice& _rDev, const Rectangle& _rRect ); + virtual void PaintFieldToCell( OutputDevice& rDev, const tools::Rectangle& rRect, const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter); + virtual void PaintCell( OutputDevice& _rDev, const tools::Rectangle& _rRect ); void ImplInitWindow( vcl::Window& rParent, const InitWindowFacet _eInitWhat ); @@ -397,7 +397,7 @@ public: virtual OUString GetFormatText(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter, Color** ppColor = nullptr) override; virtual void UpdateFromField(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter) override; virtual ::svt::CellControllerRef CreateController() const override; - virtual void PaintFieldToCell( OutputDevice& _rDev, const Rectangle& _rRect, + virtual void PaintFieldToCell( OutputDevice& _rDev, const tools::Rectangle& _rRect, const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& _rxFormatter ) override; @@ -445,7 +445,7 @@ public: virtual void Init( vcl::Window& rParent, const css::uno::Reference< css::sdbc::XRowSet >& xCursor ) override; virtual void UpdateFromField(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter) override; virtual ::svt::CellControllerRef CreateController() const override; - virtual void PaintFieldToCell(OutputDevice& rDev, const Rectangle& rRect, + virtual void PaintFieldToCell(OutputDevice& rDev, const tools::Rectangle& rRect, const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter) override; virtual OUString GetFormatText(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter, Color** ppColor = nullptr) override; @@ -676,7 +676,7 @@ public: virtual void Init( vcl::Window& rParent, const css::uno::Reference< css::sdbc::XRowSet >& xCursor ) override; virtual ::svt::CellControllerRef CreateController() const override; - virtual void PaintCell(OutputDevice& rDev, const Rectangle& rRect) override; + virtual void PaintCell(OutputDevice& rDev, const tools::Rectangle& rRect) override; virtual void Update() override; virtual OUString GetFormatText(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter, Color** ppColor = nullptr) override; virtual void UpdateFromField(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter) override; @@ -813,7 +813,7 @@ public: } virtual void PaintFieldToCell(OutputDevice& rDev, - const Rectangle& rRect, + const tools::Rectangle& rRect, const css::uno::Reference< css::sdb::XColumn >& xField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter); @@ -848,7 +848,7 @@ public: FmXTextCell( DbGridColumn* pColumn, DbCellControl& _rControl ); virtual void PaintFieldToCell(OutputDevice& rDev, - const Rectangle& rRect, + const tools::Rectangle& rRect, const css::uno::Reference< css::sdb::XColumn >& xField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter) override; @@ -1085,7 +1085,7 @@ public: static const css::uno::Sequence<sal_Int8>& getUnoTunnelId(); // painting the filter text - void PaintCell(OutputDevice& rDev, const Rectangle& rRect); + void PaintCell(OutputDevice& rDev, const tools::Rectangle& rRect); void Update(){m_pCellControl->Update();} // OComponentHelper diff --git a/svx/source/inc/svxpixelctlaccessiblecontext.hxx b/svx/source/inc/svxpixelctlaccessiblecontext.hxx index 76d626de9d09..827fab99a0b2 100644 --- a/svx/source/inc/svxpixelctlaccessiblecontext.hxx +++ b/svx/source/inc/svxpixelctlaccessiblecontext.hxx @@ -69,14 +69,14 @@ class SvxPixelCtlAccessibleChild : SvxPixelCtl& mrParentWindow; css::uno::Reference< css::accessibility::XAccessible > mxParent; bool m_bPixelColorOrBG;//Pixel Color Or BackGround Color - Rectangle* mpBoundingBox; + tools::Rectangle* mpBoundingBox; /// index of child in parent long mnIndexInParent; public: SvxPixelCtlAccessibleChild( SvxPixelCtl& rWindow, bool bPixelColorOrBG, - const Rectangle& rBounds, + const tools::Rectangle& rBounds, const css::uno::Reference< css::accessibility::XAccessible >& xParent, long nIndexInParent ); virtual ~SvxPixelCtlAccessibleChild() override; @@ -129,10 +129,10 @@ public: virtual void SAL_CALL disposing() override; /// @throws css::uno::RuntimeException - Rectangle GetBoundingBoxOnScreen(); + tools::Rectangle GetBoundingBoxOnScreen(); /// @throws css::uno::RuntimeException - Rectangle const & GetBoundingBox(); + tools::Rectangle const & GetBoundingBox(); /// @returns true if it's disposed or in disposing inline bool IsAlive() const; diff --git a/svx/source/inc/svxrectctaccessiblecontext.hxx b/svx/source/inc/svxrectctaccessiblecontext.hxx index 7238478c269d..1a71e781d2ef 100644 --- a/svx/source/inc/svxrectctaccessiblecontext.hxx +++ b/svx/source/inc/svxrectctaccessiblecontext.hxx @@ -53,7 +53,7 @@ namespace com { namespace sun { namespace star { namespace awt { class XFocusListener; } } } } -class Rectangle; +namespace tools { class Rectangle; } class SvxRectCtl; class SvxRectCtlChildAccessibleContext; namespace vcl { class Window; } @@ -222,12 +222,12 @@ protected: /// @Return the object's current bounding box relative to the desktop. /// /// @throws css::uno::RuntimeException - Rectangle GetBoundingBoxOnScreen(); + tools::Rectangle GetBoundingBoxOnScreen(); /// @Return the object's current bounding box relative to the parent object. /// /// @throws css::uno::RuntimeException - Rectangle GetBoundingBox(); + tools::Rectangle GetBoundingBox(); virtual void SAL_CALL disposing() override; @@ -286,7 +286,7 @@ public: const css::uno::Reference< css::accessibility::XAccessible>& rxParent, const vcl::Window& rParentWindow, const OUString& rName, const OUString& rDescription, - const Rectangle& rBoundingBox, + const tools::Rectangle& rBoundingBox, long nIndexInParent ); protected: virtual ~SvxRectCtlChildAccessibleContext() override; @@ -401,10 +401,10 @@ public: protected: /// @throws css::uno::RuntimeException - Rectangle GetBoundingBoxOnScreen(); + tools::Rectangle GetBoundingBoxOnScreen(); /// @throws css::uno::RuntimeException - Rectangle const & GetBoundingBox(); + tools::Rectangle const & GetBoundingBox(); void CommitChange( const css::accessibility::AccessibleEventObject& rEvent ); @@ -437,7 +437,7 @@ private: mxParent; /// Bounding box - Rectangle* mpBoundingBox; + tools::Rectangle* mpBoundingBox; /// window of parent const vcl::Window& mrParentWindow; diff --git a/svx/source/sdr/contact/objectcontactofpageview.cxx b/svx/source/sdr/contact/objectcontactofpageview.cxx index 7720c5fa13d5..8643cfd30324 100644 --- a/svx/source/sdr/contact/objectcontactofpageview.cxx +++ b/svx/source/sdr/contact/objectcontactofpageview.cxx @@ -194,7 +194,7 @@ namespace sdr // OD 2009-03-05 #i99876# perform the same also for SW on printing. // fdo#78149 same thing also needed for plain MetaFile // export, so why not do it always - const Rectangle aLogicClipRectangle(rDisplayInfo.GetRedrawArea().GetBoundRect()); + const tools::Rectangle aLogicClipRectangle(rDisplayInfo.GetRedrawArea().GetBoundRect()); aViewRange = basegfx::B2DRange( aLogicClipRectangle.Left(), aLogicClipRectangle.Top(), @@ -209,7 +209,7 @@ namespace sdr if(!rDisplayInfo.GetRedrawArea().IsEmpty()) { // get logic clip range and create discrete one - const Rectangle aLogicClipRectangle(rDisplayInfo.GetRedrawArea().GetBoundRect()); + const tools::Rectangle aLogicClipRectangle(rDisplayInfo.GetRedrawArea().GetBoundRect()); basegfx::B2DRange aLogicClipRange( aLogicClipRectangle.Left(), aLogicClipRectangle.Top(), aLogicClipRectangle.Right(), aLogicClipRectangle.Bottom()); diff --git a/svx/source/sdr/contact/viewcontactofe3dscene.cxx b/svx/source/sdr/contact/viewcontactofe3dscene.cxx index 902cf3a0782b..18f99ccc0445 100644 --- a/svx/source/sdr/contact/viewcontactofe3dscene.cxx +++ b/svx/source/sdr/contact/viewcontactofe3dscene.cxx @@ -245,7 +245,7 @@ void ViewContactOfE3dScene::createViewInformation3D(const basegfx::B3DRange& rCo void ViewContactOfE3dScene::createObjectTransformation() { // create 2d Object Transformation from relative point in 2d scene to world - Rectangle aRectangle = GetE3dScene().GetSnapRect(); + tools::Rectangle aRectangle = GetE3dScene().GetSnapRect(); // Hack for calc, transform position of object according // to current zoom so as objects relative position to grid // appears stable diff --git a/svx/source/sdr/contact/viewcontactofgraphic.cxx b/svx/source/sdr/contact/viewcontactofgraphic.cxx index 89b763deb3ef..991a9b1667f8 100644 --- a/svx/source/sdr/contact/viewcontactofgraphic.cxx +++ b/svx/source/sdr/contact/viewcontactofgraphic.cxx @@ -320,7 +320,7 @@ namespace sdr // take unrotated snap rect for position and size. Directly use model data, not getBoundRect() or getSnapRect() // which will use the primitive data we just create in the near future - Rectangle rRectangle = GetGrafObject().GetGeoRect(); + tools::Rectangle rRectangle = GetGrafObject().GetGeoRect(); // Hack for calc, transform position of object according // to current zoom so as objects relative position to grid // appears stable diff --git a/svx/source/sdr/contact/viewcontactofgroup.cxx b/svx/source/sdr/contact/viewcontactofgroup.cxx index 54d3b01511c3..19224da02d7b 100644 --- a/svx/source/sdr/contact/viewcontactofgroup.cxx +++ b/svx/source/sdr/contact/viewcontactofgroup.cxx @@ -71,7 +71,7 @@ namespace sdr else { // append an invisible outline for the cases where no visible content exists - Rectangle aCurrentBoundRect(GetSdrObjGroup().GetLastBoundRect()); + tools::Rectangle aCurrentBoundRect(GetSdrObjGroup().GetLastBoundRect()); // Hack for calc, transform position of object according // to current zoom so as objects relative position to grid // appears stable diff --git a/svx/source/sdr/contact/viewcontactofpageobj.cxx b/svx/source/sdr/contact/viewcontactofpageobj.cxx index 9ef99daf4ad4..9913b4d59391 100644 --- a/svx/source/sdr/contact/viewcontactofpageobj.cxx +++ b/svx/source/sdr/contact/viewcontactofpageobj.cxx @@ -69,7 +69,7 @@ drawinglayer::primitive2d::Primitive2DContainer ViewContactOfPageObj::createView // create graphical visualisation data. Since this is the view-independent version which should not be used, // create a replacement graphic visualisation here. Use GetLastBoundRect to access the model data directly // which is aOutRect for SdrPageObj. - const Rectangle aModelRectangle(GetPageObj().GetLastBoundRect()); + const tools::Rectangle aModelRectangle(GetPageObj().GetLastBoundRect()); const basegfx::B2DRange aModelRange(aModelRectangle.Left(), aModelRectangle.Top(), aModelRectangle.Right(), aModelRectangle.Bottom()); const basegfx::B2DPolygon aOutline(basegfx::tools::createPolygonFromRect(aModelRange)); const basegfx::BColor aYellow(1.0, 1.0, 0.0); diff --git a/svx/source/sdr/contact/viewcontactofsdrcaptionobj.cxx b/svx/source/sdr/contact/viewcontactofsdrcaptionobj.cxx index cfe70426dac5..cc6f93b366b8 100644 --- a/svx/source/sdr/contact/viewcontactofsdrcaptionobj.cxx +++ b/svx/source/sdr/contact/viewcontactofsdrcaptionobj.cxx @@ -63,7 +63,7 @@ namespace sdr false)); // take unrotated snap rect (direct model data) for position and size - Rectangle rRectangle = rCaptionObj.GetGeoRect(); + tools::Rectangle rRectangle = rCaptionObj.GetGeoRect(); // Hack for calc, transform position of object according // to current zoom so as objects relative position to grid // appears stable diff --git a/svx/source/sdr/contact/viewcontactofsdrcircobj.cxx b/svx/source/sdr/contact/viewcontactofsdrcircobj.cxx index 7e595c16b02e..50bc75980a2f 100644 --- a/svx/source/sdr/contact/viewcontactofsdrcircobj.cxx +++ b/svx/source/sdr/contact/viewcontactofsdrcircobj.cxx @@ -50,7 +50,7 @@ namespace sdr false)); // take unrotated snap rect (direct model data) for position and size - Rectangle aRectangle = GetCircObj().GetGeoRect(); + tools::Rectangle aRectangle = GetCircObj().GetGeoRect(); // Hack for calc, transform position of object according // to current zoom so as objects relative position to grid // appears stable diff --git a/svx/source/sdr/contact/viewcontactofsdrmediaobj.cxx b/svx/source/sdr/contact/viewcontactofsdrmediaobj.cxx index a7869c2a0fbd..47b55fd16ffc 100644 --- a/svx/source/sdr/contact/viewcontactofsdrmediaobj.cxx +++ b/svx/source/sdr/contact/viewcontactofsdrmediaobj.cxx @@ -100,7 +100,7 @@ drawinglayer::primitive2d::Primitive2DContainer ViewContactOfSdrMediaObj::create { // create range using the model data directly. This is in SdrTextObj::aRect which i will access using // GetGeoRect() to not trigger any calculations. It's the unrotated geometry which is okay for MediaObjects ATM. - Rectangle aRectangle(GetSdrMediaObj().GetGeoRect()); + tools::Rectangle aRectangle(GetSdrMediaObj().GetGeoRect()); // Hack for calc, transform position of object according // to current zoom so as objects relative position to grid // appears stable diff --git a/svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx b/svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx index 62f097b3cc70..f13dc1eafe42 100644 --- a/svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx +++ b/svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx @@ -45,9 +45,9 @@ namespace sdr basegfx::B2DRange ViewContactOfSdrObjCustomShape::getCorrectedTextBoundRect() const { - Rectangle aObjectBound(GetCustomShapeObj().GetGeoRect()); + tools::Rectangle aObjectBound(GetCustomShapeObj().GetGeoRect()); aObjectBound += GetCustomShapeObj().GetGridOffset(); - Rectangle aTextBound(aObjectBound); + tools::Rectangle aTextBound(aObjectBound); GetCustomShapeObj().GetTextBounds(aTextBound); aTextBound += GetCustomShapeObj().GetGridOffset(); basegfx::B2DRange aTextRange(aTextBound.Left(), aTextBound.Top(), aTextBound.Right(), aTextBound.Bottom()); @@ -153,7 +153,7 @@ namespace sdr { // take unrotated snap rect as default, then get the // unrotated text box. Rotation needs to be done centered - Rectangle aObjectBound(GetCustomShapeObj().GetGeoRect()); + tools::Rectangle aObjectBound(GetCustomShapeObj().GetGeoRect()); // hack for calc grid sync aObjectBound += GetCustomShapeObj().GetGridOffset(); const basegfx::B2DRange aObjectRange(aObjectBound.Left(), aObjectBound.Top(), aObjectBound.Right(), aObjectBound.Bottom()); diff --git a/svx/source/sdr/contact/viewcontactofsdrole2obj.cxx b/svx/source/sdr/contact/viewcontactofsdrole2obj.cxx index 630c869a43c8..874b982c1dbf 100644 --- a/svx/source/sdr/contact/viewcontactofsdrole2obj.cxx +++ b/svx/source/sdr/contact/viewcontactofsdrole2obj.cxx @@ -60,7 +60,7 @@ ViewContactOfSdrOle2Obj::~ViewContactOfSdrOle2Obj() basegfx::B2DHomMatrix ViewContactOfSdrOle2Obj::createObjectTransform() const { // take unrotated snap rect (direct model data) for position and size - Rectangle rRectangle = GetOle2Obj().GetGeoRect(); + tools::Rectangle rRectangle = GetOle2Obj().GetGeoRect(); // Hack for calc, transform position of object according // to current zoom so as objects relative position to grid // appears stable diff --git a/svx/source/sdr/contact/viewcontactofsdrrectobj.cxx b/svx/source/sdr/contact/viewcontactofsdrrectobj.cxx index 523b814f20fc..13742d358c17 100644 --- a/svx/source/sdr/contact/viewcontactofsdrrectobj.cxx +++ b/svx/source/sdr/contact/viewcontactofsdrrectobj.cxx @@ -47,7 +47,7 @@ drawinglayer::primitive2d::Primitive2DContainer ViewContactOfSdrRectObj::createV false)); // take unrotated snap rect (direct model data) for position and size - Rectangle rRectangle = GetRectObj().GetGeoRect(); + tools::Rectangle rRectangle = GetRectObj().GetGeoRect(); // Hack for calc, transform position of object according // to current zoom so as objects relative position to grid // appears stable diff --git a/svx/source/sdr/contact/viewcontactofunocontrol.cxx b/svx/source/sdr/contact/viewcontactofunocontrol.cxx index 821444d70523..7df1f041631d 100644 --- a/svx/source/sdr/contact/viewcontactofunocontrol.cxx +++ b/svx/source/sdr/contact/viewcontactofunocontrol.cxx @@ -94,7 +94,7 @@ namespace sdr { namespace contact { // create range. Use model data directly, not getBoundRect()/getSnapRect; these will use // the primitive data themselves in the long run. Use SdrUnoObj's (which is a SdrRectObj) // call to GetGeoRect() to access SdrTextObj::aRect directly and without executing anything - Rectangle aRectangle(GetSdrUnoObj().GetGeoRect()); + tools::Rectangle aRectangle(GetSdrUnoObj().GetGeoRect()); // Hack for calc, transform position of object according // to current zoom so as objects relative position to grid // appears stable diff --git a/svx/source/sdr/contact/viewobjectcontactofpageobj.cxx b/svx/source/sdr/contact/viewobjectcontactofpageobj.cxx index dfe57ea6e18b..a6c3e63ba912 100644 --- a/svx/source/sdr/contact/viewobjectcontactofpageobj.cxx +++ b/svx/source/sdr/contact/viewobjectcontactofpageobj.cxx @@ -197,7 +197,7 @@ drawinglayer::primitive2d::Primitive2DContainer ViewObjectContactOfPageObj::crea // get PageObject's geometry basegfx::B2DHomMatrix aPageObjectTransform; { - const Rectangle aPageObjectModelData(rPageObject.GetLastBoundRect()); + const tools::Rectangle aPageObjectModelData(rPageObject.GetLastBoundRect()); const basegfx::B2DRange aPageObjectBound( aPageObjectModelData.Left(), aPageObjectModelData.Top(), aPageObjectModelData.Right(), aPageObjectModelData.Bottom()); diff --git a/svx/source/sdr/contact/viewobjectcontactofsdrmediaobj.cxx b/svx/source/sdr/contact/viewobjectcontactofsdrmediaobj.cxx index 1c095b02af69..a239c3b303e3 100644 --- a/svx/source/sdr/contact/viewobjectcontactofsdrmediaobj.cxx +++ b/svx/source/sdr/contact/viewobjectcontactofsdrmediaobj.cxx @@ -103,7 +103,7 @@ void ViewObjectContactOfSdrMediaObj::updateMediaItem( ::avmedia::MediaItem& rIte basegfx::B2DRange aViewRange(getObjectRange()); aViewRange.transform(GetObjectContact().getViewInformation2D().getViewTransformation()); - const Rectangle aViewRectangle( + const tools::Rectangle aViewRectangle( (sal_Int32)floor(aViewRange.getMinX()), (sal_Int32)floor(aViewRange.getMinY()), (sal_Int32)ceil(aViewRange.getMaxX()), (sal_Int32)ceil(aViewRange.getMaxY())); diff --git a/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx b/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx index ebcbc95caf72..f84880d1f53e 100644 --- a/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx +++ b/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx @@ -193,8 +193,8 @@ namespace sdr { namespace contact { void addWindowListener( const Reference< XWindowListener >& _l ) const { m_xControlWindow->addWindowListener( _l ); } void removeWindowListener( const Reference< XWindowListener >& _l ) const { m_xControlWindow->removeWindowListener( _l ); } - void setPosSize( const Rectangle& _rPosSize ) const; - Rectangle + void setPosSize( const tools::Rectangle& _rPosSize ) const; + tools::Rectangle getPosSize() const; void setZoom( const ::basegfx::B2DVector& _rScale ) const; ::basegfx::B2DVector @@ -217,13 +217,13 @@ namespace sdr { namespace contact { return _rControl == Reference< XInterface >( _rxCompare, UNO_QUERY ); } - void ControlHolder::setPosSize( const Rectangle& _rPosSize ) const + void ControlHolder::setPosSize( const tools::Rectangle& _rPosSize ) const { // no check whether we're valid, this is the responsibility of the caller // don't call setPosSize when pos/size did not change // #i104181# / 2009-08-18 / frank.schoenheit@sun.com - ::Rectangle aCurrentRect( getPosSize() ); + ::tools::Rectangle aCurrentRect( getPosSize() ); if ( aCurrentRect != _rPosSize ) { m_xControlWindow->setPosSize( @@ -234,7 +234,7 @@ namespace sdr { namespace contact { } - ::Rectangle ControlHolder::getPosSize() const + ::tools::Rectangle ControlHolder::getPosSize() const { // no check whether we're valid, this is the responsibility of the caller return VCLUnoHelper::ConvertToVCLRect( m_xControlWindow->getPosSize() ); @@ -283,7 +283,7 @@ namespace sdr { namespace contact { /** positions a control, and sets its zoom mode, using a given transformation and output device */ - void adjustControlGeometry_throw( const ControlHolder& _rControl, const Rectangle& _rLogicBoundingRect, + void adjustControlGeometry_throw( const ControlHolder& _rControl, const tools::Rectangle& _rLogicBoundingRect, const basegfx::B2DHomMatrix& _rViewTransformation, const ::basegfx::B2DHomMatrix& _rZoomLevelNormalization ) { OSL_PRECOND( _rControl.is(), "UnoControlContactHelper::adjustControlGeometry_throw: illegal control!" ); @@ -306,7 +306,7 @@ namespace sdr { namespace contact { ::basegfx::B2DPoint aBottomRight( _rLogicBoundingRect.Right(), _rLogicBoundingRect.Bottom() ); aBottomRight *= _rViewTransformation; - const Rectangle aPaintRectPixel( (long)aTopLeft.getX(), (long)aTopLeft.getY(), (long)aBottomRight.getX(), (long)aBottomRight.getY() ); + const tools::Rectangle aPaintRectPixel( (long)aTopLeft.getX(), (long)aTopLeft.getY(), (long)aBottomRight.getX(), (long)aBottomRight.getY() ); _rControl.setPosSize( aPaintRectPixel ); // determine the scale from the current view transformation, and the normalization matrix @@ -927,7 +927,7 @@ namespace sdr { namespace contact { if ( getUnoObject( pUnoObject ) ) { Point aGridOffset = pUnoObject->GetGridOffset(); - Rectangle aRect( pUnoObject->GetLogicRect() ); + tools::Rectangle aRect( pUnoObject->GetLogicRect() ); // Hack for calc, transform position of object according // to current zoom so as objects relative position to grid // appears stable @@ -1097,7 +1097,7 @@ namespace sdr { namespace contact { // knit the model and the control _out_rControl.setModel( xControlModel ); Point aGridOffset = _rUnoObject.GetGridOffset(); - Rectangle aRect( _rUnoObject.GetLogicRect() ); + tools::Rectangle aRect( _rUnoObject.GetLogicRect() ); // Hack for calc, transform position of object according // to current zoom so as objects relative position to grid // appears stable @@ -1500,7 +1500,7 @@ namespace sdr { namespace contact { // Do use model data directly to create the correct geometry. Do NOT // use getBoundRect()/getSnapRect() here; these will use the sequence of // primitives themselves in the long run. - Rectangle aSdrGeoData( _rVOC.GetSdrUnoObj().GetGeoRect() ); + tools::Rectangle aSdrGeoData( _rVOC.GetSdrUnoObj().GetGeoRect() ); Point aGridOffset = _rVOC.GetSdrUnoObj().GetGridOffset(); // Hack for calc, transform position of object according // to current zoom so as objects relative position to grid diff --git a/svx/source/sdr/overlay/overlaymanager.cxx b/svx/source/sdr/overlay/overlaymanager.cxx index 043d4cacc9d5..4ffd872cd7f0 100644 --- a/svx/source/sdr/overlay/overlaymanager.cxx +++ b/svx/source/sdr/overlay/overlaymanager.cxx @@ -246,7 +246,7 @@ namespace sdr //ImpCheckMapModeChange(); // paint members - const Rectangle aRegionBoundRect(rRegion.GetBoundRect()); + const tools::Rectangle aRegionBoundRect(rRegion.GetBoundRect()); const basegfx::B2DRange aRegionRange( aRegionBoundRect.Left(), aRegionBoundRect.Top(), aRegionBoundRect.Right(), aRegionBoundRect.Bottom()); @@ -303,7 +303,7 @@ namespace sdr { // assume AA needs one pixel more and invalidate one pixel more const double fDiscreteOne(getDiscreteOne()); - const Rectangle aInvalidateRectangle( + const tools::Rectangle aInvalidateRectangle( (sal_Int32)floor(rRange.getMinX() - fDiscreteOne), (sal_Int32)floor(rRange.getMinY() - fDiscreteOne), (sal_Int32)ceil(rRange.getMaxX() + fDiscreteOne), @@ -316,7 +316,7 @@ namespace sdr { // #i77674# transform to rectangle. Use floor/ceil to get all covered // discrete pixels, see #i75163# and OverlayManagerBuffered::invalidateRange - const Rectangle aInvalidateRectangle( + const tools::Rectangle aInvalidateRectangle( (sal_Int32)floor(rRange.getMinX()), (sal_Int32)floor(rRange.getMinY()), (sal_Int32)ceil(rRange.getMaxX()), (sal_Int32)ceil(rRange.getMaxY())); diff --git a/svx/source/sdr/overlay/overlaymanagerbuffered.cxx b/svx/source/sdr/overlay/overlaymanagerbuffered.cxx index 939daf397fff..8a7f8d55630c 100644 --- a/svx/source/sdr/overlay/overlaymanagerbuffered.cxx +++ b/svx/source/sdr/overlay/overlaymanagerbuffered.cxx @@ -101,7 +101,7 @@ namespace sdr void OverlayManagerBuffered::ImpRestoreBackground() const { - const Rectangle aRegionRectanglePixel( + const tools::Rectangle aRegionRectanglePixel( maBufferRememberedRangePixel.getMinX(), maBufferRememberedRangePixel.getMinY(), maBufferRememberedRangePixel.getMaxX(), maBufferRememberedRangePixel.getMaxY()); const vcl::Region aRegionPixel(aRegionRectanglePixel); @@ -175,7 +175,7 @@ namespace sdr } // also limit to buffer size - const Rectangle aBufferDeviceRectanglePixel(Point(), mpBufferDevice->GetOutputSizePixel()); + const tools::Rectangle aBufferDeviceRectanglePixel(Point(), mpBufferDevice->GetOutputSizePixel()); aRegion.Intersect(aBufferDeviceRectanglePixel); // MapModes off @@ -256,7 +256,7 @@ namespace sdr mpOutputBufferDevice->SetAntialiasing(mpBufferDevice->GetAntialiasing()); // calculate sizes - Rectangle aRegionRectanglePixel( + tools::Rectangle aRegionRectanglePixel( maBufferRememberedRangePixel.getMinX(), maBufferRememberedRangePixel.getMinY(), maBufferRememberedRangePixel.getMaxX(), maBufferRememberedRangePixel.getMaxY()); @@ -347,7 +347,7 @@ namespace sdr { vcl::Window& rWindow = static_cast< vcl::Window& >(mrOutputDevice); - const Rectangle aRegionRectanglePixel( + const tools::Rectangle aRegionRectanglePixel( maBufferRememberedRangePixel.getMinX(), maBufferRememberedRangePixel.getMinY(), maBufferRememberedRangePixel.getMaxX(), diff --git a/svx/source/sdr/properties/attributeproperties.cxx b/svx/source/sdr/properties/attributeproperties.cxx index 5dad59138d08..d18959eb4ca1 100644 --- a/svx/source/sdr/properties/attributeproperties.cxx +++ b/svx/source/sdr/properties/attributeproperties.cxx @@ -577,7 +577,7 @@ namespace sdr // Get old BoundRect. Do this after the style change is handled // in the ItemSet parts because GetBoundRect() may calculate a new - Rectangle aBoundRect = rObj.GetLastBoundRect(); + tools::Rectangle aBoundRect = rObj.GetLastBoundRect(); rObj.SetRectsDirty(true); diff --git a/svx/source/sdr/properties/itemsettools.cxx b/svx/source/sdr/properties/itemsettools.cxx index 64c70eb47307..7e5e2bf97484 100644 --- a/svx/source/sdr/properties/itemsettools.cxx +++ b/svx/source/sdr/properties/itemsettools.cxx @@ -57,7 +57,7 @@ namespace sdr } else { - mpData = new Rectangle(rObj.GetLastBoundRect()); + mpData = new tools::Rectangle(rObj.GetLastBoundRect()); mnCount = 1L; } } @@ -70,12 +70,12 @@ namespace sdr } else { - delete static_cast<Rectangle*>(mpData); + delete static_cast<tools::Rectangle*>(mpData); } } - const Rectangle& ItemChangeBroadcaster::GetRectangle(sal_uInt32 nIndex) const + const tools::Rectangle& ItemChangeBroadcaster::GetRectangle(sal_uInt32 nIndex) const { if(mnCount > 1) { @@ -83,7 +83,7 @@ namespace sdr } else { - return *static_cast<Rectangle*>(mpData); + return *static_cast<tools::Rectangle*>(mpData); } } } // end of namespace properties diff --git a/svx/source/sidebar/line/LinePropertyPanelBase.cxx b/svx/source/sidebar/line/LinePropertyPanelBase.cxx index 7a57b4dce02e..9f7465a6fe1e 100644 --- a/svx/source/sidebar/line/LinePropertyPanelBase.cxx +++ b/svx/source/sidebar/line/LinePropertyPanelBase.cxx @@ -75,8 +75,8 @@ void FillLineEndListBox(ListBox& rListBoxStart, ListBox& rListBoxEnd, const XLin Bitmap aCopyEnd(aBitmap); const Size aBmpSize(aCopyStart.GetSizePixel()); - const Rectangle aCropRectStart(Point(), Size(aBmpSize.Width() / 2, aBmpSize.Height())); - const Rectangle aCropRectEnd(Point(aBmpSize.Width() / 2, 0), Size(aBmpSize.Width() / 2, aBmpSize.Height())); + const tools::Rectangle aCropRectStart(Point(), Size(aBmpSize.Width() / 2, aBmpSize.Height())); + const tools::Rectangle aCropRectEnd(Point(aBmpSize.Width() / 2, 0), Size(aBmpSize.Width() / 2, aBmpSize.Height())); aCopyStart.Crop(aCropRectStart); rListBoxStart.InsertEntry( @@ -104,7 +104,7 @@ void FillLineEndListBox(ListBox& rListBoxStart, ListBox& rListBoxEnd, const XLin // take solid line bitmap and crop it to the size of // line cap entries Bitmap aCopyZero( rBitmapZero ); - const Rectangle aCropZero( Point(), aImgSize ); + const tools::Rectangle aCropZero( Point(), aImgSize ); aCopyZero.Crop( aCropZero ); // make it 1st item in list diff --git a/svx/source/sidebar/line/LineWidthValueSet.cxx b/svx/source/sidebar/line/LineWidthValueSet.cxx index 7b406b4575a6..637fa8fb9ed4 100644 --- a/svx/source/sidebar/line/LineWidthValueSet.cxx +++ b/svx/source/sidebar/line/LineWidthValueSet.cxx @@ -86,7 +86,7 @@ void LineWidthValueSet::SetCusEnable(bool bEnable) void LineWidthValueSet::UserDraw( const UserDrawEvent& rUDEvt ) { - Rectangle aRect = rUDEvt.GetRect(); + tools::Rectangle aRect = rUDEvt.GetRect(); vcl::RenderContext* pDev = rUDEvt.GetRenderContext(); sal_uInt16 nItemId = rUDEvt.GetItemId(); @@ -113,7 +113,7 @@ void LineWidthValueSet::UserDraw( const UserDrawEvent& rUDEvt ) Point aImgStart(aBLPos.X() + 5, aBLPos.Y() + ( nRectHeight - 23 ) / 2); pDev->DrawImage(aImgStart, imgCus); // Point aStart(aImgStart.X() + 14 + 20 , aBLPos.Y() + nRectHeight/6); - Rectangle aStrRect = aRect; + tools::Rectangle aStrRect = aRect; aStrRect.Top() += nRectHeight/6; aStrRect.Bottom() -= nRectHeight/6; aStrRect.Left() += imgCus.GetSizePixel().Width() + 20; @@ -130,7 +130,7 @@ void LineWidthValueSet::UserDraw( const UserDrawEvent& rUDEvt ) if( nSelItem == nItemId ) { Color aBackColor(50,107,197); - Rectangle aBackRect = aRect; + tools::Rectangle aBackRect = aRect; aBackRect.Top() += 3; aBackRect.Bottom() -= 2; pDev->SetFillColor(aBackColor); diff --git a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx index 46982bab7442..7ca72f4def9d 100644 --- a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx +++ b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx @@ -1031,11 +1031,11 @@ void PosSizePropertyPanel::SetPosSizeMinMax() SdrPageView* pPV = mpView->GetSdrPageView(); if (!pPV) return; - Rectangle aTmpRect(mpView->GetAllMarkedRect()); + tools::Rectangle aTmpRect(mpView->GetAllMarkedRect()); pPV->LogicToPagePos(aTmpRect); maRect = basegfx::B2DRange(aTmpRect.Left(), aTmpRect.Top(), aTmpRect.Right(), aTmpRect.Bottom()); - Rectangle aTmpRect2(mpView->GetWorkArea()); + tools::Rectangle aTmpRect2(mpView->GetWorkArea()); pPV->LogicToPagePos(aTmpRect2); maWorkArea = basegfx::B2DRange(aTmpRect2.Left(), aTmpRect2.Top(), aTmpRect2.Right(), aTmpRect2.Bottom()); diff --git a/svx/source/sidebar/tools/ValueSetWithTextControl.cxx b/svx/source/sidebar/tools/ValueSetWithTextControl.cxx index 7f1834173f93..1f8fe0d9569a 100644 --- a/svx/source/sidebar/tools/ValueSetWithTextControl.cxx +++ b/svx/source/sidebar/tools/ValueSetWithTextControl.cxx @@ -53,7 +53,7 @@ void ValueSetWithTextControl::AddItem( void ValueSetWithTextControl::UserDraw( const UserDrawEvent& rUDEvt ) { - const Rectangle aRect = rUDEvt.GetRect(); + const tools::Rectangle aRect = rUDEvt.GetRect(); vcl::RenderContext* pDev = rUDEvt.GetRenderContext(); pDev->Push(); const sal_uInt16 nItemId = rUDEvt.GetItemId(); @@ -71,7 +71,7 @@ void ValueSetWithTextControl::UserDraw( const UserDrawEvent& rUDEvt ) //draw background if ( GetSelectItemId() == nItemId ) { - Rectangle aBackRect = aRect; + tools::Rectangle aBackRect = aRect; aBackRect.Top() += 3; aBackRect.Bottom() -= 2; pDev->SetFillColor( sfx2::sidebar::Theme::GetColor( sfx2::sidebar::Theme::Color_Highlight ) ); @@ -92,7 +92,7 @@ void ValueSetWithTextControl::UserDraw( const UserDrawEvent& rUDEvt ) aFont.SetColor( GetSettings().GetStyleSettings().GetFieldTextColor() ); } - Rectangle aStrRect = aRect; + tools::Rectangle aStrRect = aRect; aStrRect.Top() += nRectHeight/4; aStrRect.Bottom() -= nRectHeight/4; diff --git a/svx/source/stbctrls/modctrl.cxx b/svx/source/stbctrls/modctrl.cxx index 2476d1481ad9..2f4eb634f68d 100644 --- a/svx/source/stbctrls/modctrl.cxx +++ b/svx/source/stbctrls/modctrl.cxx @@ -123,7 +123,7 @@ void SvxModifyControl::_repaint() * * @return Point top-left corner of the centered image position */ -Point centerImage(const Rectangle& rBoundingRect, const Image& rImg) +Point centerImage(const tools::Rectangle& rBoundingRect, const Image& rImg) { Size aImgSize = rImg.GetSizePixel(); Size aRectSize = rBoundingRect.GetSize(); @@ -137,7 +137,7 @@ Point centerImage(const Rectangle& rBoundingRect, const Image& rImg) void SvxModifyControl::Paint( const UserDrawEvent& rUsrEvt ) { vcl::RenderContext* pDev = rUsrEvt.GetRenderContext(); - Rectangle aRect(rUsrEvt.GetRect()); + tools::Rectangle aRect(rUsrEvt.GetRect()); ImplData::ModificationState state = mxImpl->mnModState; Point aPt = centerImage(aRect, mxImpl->maImages[state]); diff --git a/svx/source/stbctrls/modctrl_internal.hxx b/svx/source/stbctrls/modctrl_internal.hxx index 753bf95a6725..21af209b72f7 100644 --- a/svx/source/stbctrls/modctrl_internal.hxx +++ b/svx/source/stbctrls/modctrl_internal.hxx @@ -19,7 +19,7 @@ #ifndef INCLUDED_SVX_SOURCE_STBCTRLS_MODCTRL_INTERNAL_HXX #define INCLUDED_SVX_SOURCE_STBCTRLS_MODCTRL_INTERNAL_HXX -Point centerImage(const Rectangle& rBoundingRect, const Image& rImg); +Point centerImage(const tools::Rectangle& rBoundingRect, const Image& rImg); #endif // INCLUDED_SVX_SOURCE_STBCTRLS_MODCTRL_INTERNAL_HXX diff --git a/svx/source/stbctrls/pszctrl.cxx b/svx/source/stbctrls/pszctrl.cxx index 4fafe04060e4..a6cc6bb0aec0 100644 --- a/svx/source/stbctrls/pszctrl.cxx +++ b/svx/source/stbctrls/pszctrl.cxx @@ -342,7 +342,7 @@ void SvxPosSizeStatusBarControl::Paint( const UserDrawEvent& rUsrEvt ) { vcl::RenderContext* pDev = rUsrEvt.GetRenderContext(); - const Rectangle& rRect = rUsrEvt.GetRect(); + const tools::Rectangle& rRect = rUsrEvt.GetRect(); StatusBar& rBar = GetStatusBar(); Point aItemPos = rBar.GetItemTextPos( GetId() ); Color aOldLineColor = pDev->GetLineColor(); @@ -365,7 +365,7 @@ void SvxPosSizeStatusBarControl::Paint( const UserDrawEvent& rUsrEvt ) OUString aStr = GetMetricStr_Impl( pImpl->aPos.X()); aStr += " / "; aStr += GetMetricStr_Impl( pImpl->aPos.Y()); - Rectangle aRect(aPnt, Point(nSizePosX, rRect.Bottom())); + tools::Rectangle aRect(aPnt, Point(nSizePosX, rRect.Bottom())); pDev->DrawRect(aRect); vcl::Region aOrigRegion(pDev->GetClipRegion()); pDev->SetClipRegion(vcl::Region(aRect)); @@ -384,7 +384,7 @@ void SvxPosSizeStatusBarControl::Paint( const UserDrawEvent& rUsrEvt ) aStr = GetMetricStr_Impl( pImpl->aSize.Width() ); aStr += " x "; aStr += GetMetricStr_Impl( pImpl->aSize.Height() ); - aRect = Rectangle(aDrwPnt, rRect.BottomRight()); + aRect = tools::Rectangle(aDrwPnt, rRect.BottomRight()); pDev->DrawRect(aRect); aOrigRegion = pDev->GetClipRegion(); pDev->SetClipRegion(vcl::Region(aRect)); @@ -392,7 +392,7 @@ void SvxPosSizeStatusBarControl::Paint( const UserDrawEvent& rUsrEvt ) pDev->SetClipRegion(aOrigRegion); } else - pDev->DrawRect( Rectangle( aPnt, rRect.BottomRight() ) ); + pDev->DrawRect( tools::Rectangle( aPnt, rRect.BottomRight() ) ); } else if ( pImpl->bTable ) { diff --git a/svx/source/stbctrls/selctrl.cxx b/svx/source/stbctrls/selctrl.cxx index c6ef39f929b8..af230c55dac9 100644 --- a/svx/source/stbctrls/selctrl.cxx +++ b/svx/source/stbctrls/selctrl.cxx @@ -126,9 +126,9 @@ bool SvxSelectionModeControl::MouseButtonDown( const MouseEvent& rEvt ) void SvxSelectionModeControl::Paint( const UserDrawEvent& rUsrEvt ) { - const Rectangle aControlRect = getControlRect(); + const tools::Rectangle aControlRect = getControlRect(); vcl::RenderContext* pDev = rUsrEvt.GetRenderContext(); - Rectangle aRect = rUsrEvt.GetRect(); + tools::Rectangle aRect = rUsrEvt.GetRect(); Size aImgSize( maImage.GetSizePixel() ); diff --git a/svx/source/stbctrls/xmlsecctrl.cxx b/svx/source/stbctrls/xmlsecctrl.cxx index e8047c2e57fc..ba706e8e506e 100644 --- a/svx/source/stbctrls/xmlsecctrl.cxx +++ b/svx/source/stbctrls/xmlsecctrl.cxx @@ -124,7 +124,7 @@ void XmlSecStatusBarControl::Paint( const UserDrawEvent& rUsrEvt ) { vcl::RenderContext* pDev = rUsrEvt.GetRenderContext(); - Rectangle aRect = rUsrEvt.GetRect(); + tools::Rectangle aRect = rUsrEvt.GetRect(); Color aOldLineColor = pDev->GetLineColor(); Color aOldFillColor = pDev->GetFillColor(); diff --git a/svx/source/stbctrls/zoomctrl.cxx b/svx/source/stbctrls/zoomctrl.cxx index be7eb431daff..384a0f9ed13e 100644 --- a/svx/source/stbctrls/zoomctrl.cxx +++ b/svx/source/stbctrls/zoomctrl.cxx @@ -185,7 +185,7 @@ SvxZoomPageStatusBarControl::SvxZoomPageStatusBarControl(sal_uInt16 _nSlotId, void SvxZoomPageStatusBarControl::Paint(const UserDrawEvent& rUsrEvt) { vcl::RenderContext* pDev = rUsrEvt.GetRenderContext(); - Rectangle aRect = rUsrEvt.GetRect(); + tools::Rectangle aRect = rUsrEvt.GetRect(); Point aPt = centerImage(aRect, maImage); pDev->DrawImage(aPt, maImage); } diff --git a/svx/source/stbctrls/zoomsliderctrl.cxx b/svx/source/stbctrls/zoomsliderctrl.cxx index c9187ecbc3fa..b137bf37a201 100644 --- a/svx/source/stbctrls/zoomsliderctrl.cxx +++ b/svx/source/stbctrls/zoomsliderctrl.cxx @@ -229,10 +229,10 @@ void SvxZoomSliderControl::Paint( const UserDrawEvent& rUsrEvt ) if ( !mxImpl->mbValuesSet ) return; - const Rectangle aControlRect = getControlRect(); + const tools::Rectangle aControlRect = getControlRect(); vcl::RenderContext* pDev = rUsrEvt.GetRenderContext(); - Rectangle aRect = rUsrEvt.GetRect(); - Rectangle aSlider = aRect; + tools::Rectangle aRect = rUsrEvt.GetRect(); + tools::Rectangle aSlider = aRect; long nSliderHeight = 2 * pDev->GetDPIScaleFactor(); long nSnappingHeight = 4 * pDev->GetDPIScaleFactor(); @@ -258,7 +258,7 @@ void SvxZoomSliderControl::Paint( const UserDrawEvent& rUsrEvt ) { long nSnapPosX = aRect.Left() + *aSnappingPointIter; - pDev->DrawRect( Rectangle( nSnapPosX - 1, aSlider.Top() - nSnappingHeight, + pDev->DrawRect( tools::Rectangle( nSnapPosX - 1, aSlider.Top() - nSnappingHeight, nSnapPosX, aSlider.Bottom() + nSnappingHeight ) ); } @@ -291,7 +291,7 @@ bool SvxZoomSliderControl::MouseButtonDown( const MouseEvent & rEvt ) if ( !mxImpl->mbValuesSet ) return true; - const Rectangle aControlRect = getControlRect(); + const tools::Rectangle aControlRect = getControlRect(); const Point aPoint = rEvt.GetPosPixel(); const sal_Int32 nXDiff = aPoint.X() - aControlRect.Left(); @@ -341,7 +341,7 @@ bool SvxZoomSliderControl::MouseMove( const MouseEvent & rEvt ) return true; const short nButtons = rEvt.GetButtons(); - const Rectangle aControlRect = getControlRect(); + const tools::Rectangle aControlRect = getControlRect(); const Point aPoint = rEvt.GetPosPixel(); const sal_Int32 nXDiff = aPoint.X() - aControlRect.Left(); diff --git a/svx/source/styles/CommonStylePreviewRenderer.cxx b/svx/source/styles/CommonStylePreviewRenderer.cxx index 3c4b607841f7..fdb41ecbec42 100644 --- a/svx/source/styles/CommonStylePreviewRenderer.cxx +++ b/svx/source/styles/CommonStylePreviewRenderer.cxx @@ -151,7 +151,7 @@ bool CommonStylePreviewRenderer::recalculate() vcl::Font aOldFont(mrOutputDev.GetFont()); mrOutputDev.SetFont(*pFont); - Rectangle aTextRect; + tools::Rectangle aTextRect; mrOutputDev.GetTextBoundRect(aTextRect, mpStyle->GetName()); if (aTextRect.Bottom() > mnMaxHeight) { @@ -180,7 +180,7 @@ Size CommonStylePreviewRenderer::getRenderSize() return maPixelSize; } -bool CommonStylePreviewRenderer::render(const Rectangle& aRectangle, RenderAlign eRenderAlign) +bool CommonStylePreviewRenderer::render(const tools::Rectangle& aRectangle, RenderAlign eRenderAlign) { const OUString& rText = msRenderText.isEmpty() ? maStyleName : msRenderText; diff --git a/svx/source/svdraw/gradtrns.cxx b/svx/source/svdraw/gradtrns.cxx index 0ea08d95e646..b25ae340d0e4 100644 --- a/svx/source/svdraw/gradtrns.cxx +++ b/svx/source/svdraw/gradtrns.cxx @@ -46,7 +46,7 @@ void GradTransformer::GradToVec(GradTransGradient& rG, GradTransVector& rV, cons } // calc the basic positions - const Rectangle aObjectSnapRectangle(pObj->GetSnapRect()); + const tools::Rectangle aObjectSnapRectangle(pObj->GetSnapRect()); const basegfx::B2DRange aRange(aObjectSnapRectangle.Left(), aObjectSnapRectangle.Top(), aObjectSnapRectangle.Right(), aObjectSnapRectangle.Bottom()); const basegfx::B2DPoint aCenter(aRange.getCenter()); basegfx::B2DPoint aStartPos, aEndPos; @@ -198,7 +198,7 @@ void GradTransformer::VecToGrad(GradTransVector& rV, GradTransGradient& rG, Grad } // calc the basic positions - const Rectangle aObjectSnapRectangle(pObj->GetSnapRect()); + const tools::Rectangle aObjectSnapRectangle(pObj->GetSnapRect()); const basegfx::B2DRange aRange(aObjectSnapRectangle.Left(), aObjectSnapRectangle.Top(), aObjectSnapRectangle.Right(), aObjectSnapRectangle.Bottom()); const basegfx::B2DPoint aCenter(aRange.getCenter()); basegfx::B2DPoint aStartPos(rV.maPositionA); diff --git a/svx/source/svdraw/sdrpagewindow.cxx b/svx/source/svdraw/sdrpagewindow.cxx index 2fdb7db20e49..add2130a32be 100644 --- a/svx/source/svdraw/sdrpagewindow.cxx +++ b/svx/source/svdraw/sdrpagewindow.cxx @@ -423,7 +423,7 @@ void SdrPageWindow::InvalidatePageWindow(const basegfx::B2DRange& rRange) aDiscreteRange.grow(1.0); } - const Rectangle aVCLDiscreteRectangle( + const tools::Rectangle aVCLDiscreteRectangle( static_cast<long>(floor(aDiscreteRange.getMinX())), static_cast<long>(floor(aDiscreteRange.getMinY())), static_cast<long>(ceil(aDiscreteRange.getMaxX())), diff --git a/svx/source/svdraw/sdrpaintwindow.cxx b/svx/source/svdraw/sdrpaintwindow.cxx index 8105a65ce05a..c3fc94e02c9f 100644 --- a/svx/source/svdraw/sdrpaintwindow.cxx +++ b/svx/source/svdraw/sdrpaintwindow.cxx @@ -38,7 +38,7 @@ class CandidateMgr std::set<VclPtr<vcl::Window> > m_aDeletedCandidates; DECL_LINK(WindowEventListener, VclWindowEvent&, void); public: - void PaintTransparentChildren(vcl::Window & rWindow, Rectangle const& rPixelRect); + void PaintTransparentChildren(vcl::Window & rWindow, tools::Rectangle const& rPixelRect); ~CandidateMgr(); }; @@ -62,7 +62,7 @@ CandidateMgr::~CandidateMgr() } } -void PaintTransparentChildren(vcl::Window & rWindow, Rectangle const& rPixelRect) +void PaintTransparentChildren(vcl::Window & rWindow, tools::Rectangle const& rPixelRect) { if (!rWindow.IsChildTransparentModeEnabled()) return; @@ -71,14 +71,14 @@ void PaintTransparentChildren(vcl::Window & rWindow, Rectangle const& rPixelRect aManager.PaintTransparentChildren(rWindow, rPixelRect); } -void CandidateMgr::PaintTransparentChildren(vcl::Window & rWindow, Rectangle const& rPixelRect) +void CandidateMgr::PaintTransparentChildren(vcl::Window & rWindow, tools::Rectangle const& rPixelRect) { vcl::Window * pCandidate = rWindow.GetWindow( GetWindowType::FirstChild ); while (pCandidate) { if (pCandidate->IsPaintTransparent()) { - const Rectangle aCandidatePosSizePixel( + const tools::Rectangle aCandidatePosSizePixel( pCandidate->GetPosPixel(), pCandidate->GetSizePixel()); @@ -268,10 +268,10 @@ rtl::Reference< sdr::overlay::OverlayManager > const & SdrPaintWindow::GetOverla return mxOverlayManager; } -Rectangle SdrPaintWindow::GetVisibleArea() const +tools::Rectangle SdrPaintWindow::GetVisibleArea() const { Size aVisSizePixel(GetOutputDevice().GetOutputSizePixel()); - return Rectangle(GetOutputDevice().PixelToLogic(Rectangle(Point(0,0), aVisSizePixel))); + return tools::Rectangle(GetOutputDevice().PixelToLogic(tools::Rectangle(Point(0,0), aVisSizePixel))); } bool SdrPaintWindow::OutputToRecordingMetaFile() const diff --git a/svx/source/svdraw/svdcrtv.cxx b/svx/source/svdraw/svdcrtv.cxx index 2b3ff4203766..28c6a9cad4ea 100644 --- a/svx/source/svdraw/svdcrtv.cxx +++ b/svx/source/svdraw/svdcrtv.cxx @@ -243,14 +243,14 @@ void SdrCreateView::BrkAction() BrkCreateObj(); } -void SdrCreateView::TakeActionRect(Rectangle& rRect) const +void SdrCreateView::TakeActionRect(tools::Rectangle& rRect) const { if (pAktCreate!=nullptr) { rRect=maDragStat.GetActionRect(); if (rRect.IsEmpty()) { - rRect=Rectangle(maDragStat.GetPrev(),maDragStat.GetNow()); + rRect=tools::Rectangle(maDragStat.GetPrev(),maDragStat.GetNow()); } } else @@ -376,7 +376,7 @@ void SdrCreateView::SetCurrentObj(sal_uInt16 nIdent, SdrInventor nInvent) } bool SdrCreateView::ImpBegCreateObj(SdrInventor nInvent, sal_uInt16 nIdent, const Point& rPnt, OutputDevice* pOut, - short nMinMov, const Rectangle& rLogRect, SdrObject* pPreparedFactoryObject) + short nMinMov, const tools::Rectangle& rLogRect, SdrObject* pPreparedFactoryObject) { bool bRet=false; UnmarkAllObj(); @@ -459,7 +459,7 @@ bool SdrCreateView::ImpBegCreateObj(SdrInventor nInvent, sal_uInt16 nIdent, cons if (!rLogRect.IsEmpty()) pAktCreate->NbcSetLogicRect(rLogRect); // make sure drag start point is inside WorkArea - const Rectangle& rWorkArea = GetWorkArea(); + const tools::Rectangle& rWorkArea = GetWorkArea(); if(!rWorkArea.IsEmpty()) { @@ -508,7 +508,7 @@ bool SdrCreateView::ImpBegCreateObj(SdrInventor nInvent, sal_uInt16 nIdent, cons bool SdrCreateView::BegCreateObj(const Point& rPnt, OutputDevice* pOut, short nMinMov) { - return ImpBegCreateObj(nAktInvent,nAktIdent,rPnt,pOut,nMinMov,Rectangle(), nullptr); + return ImpBegCreateObj(nAktInvent,nAktIdent,rPnt,pOut,nMinMov,tools::Rectangle(), nullptr); } bool SdrCreateView::BegCreatePreparedObject(const Point& rPnt, sal_Int16 nMinMov, SdrObject* pPreparedFactoryObject) @@ -522,14 +522,14 @@ bool SdrCreateView::BegCreatePreparedObject(const Point& rPnt, sal_Int16 nMinMov nIdent = pPreparedFactoryObject->GetObjIdentifier(); } - return ImpBegCreateObj(nInvent, nIdent, rPnt, nullptr, nMinMov, Rectangle(), pPreparedFactoryObject); + return ImpBegCreateObj(nInvent, nIdent, rPnt, nullptr, nMinMov, tools::Rectangle(), pPreparedFactoryObject); } bool SdrCreateView::BegCreateCaptionObj(const Point& rPnt, const Size& rObjSiz, OutputDevice* pOut, short nMinMov) { return ImpBegCreateObj(SdrInventor::Default,OBJ_CAPTION,rPnt,pOut,nMinMov, - Rectangle(rPnt,Size(rObjSiz.Width()+1,rObjSiz.Height()+1)), nullptr); + tools::Rectangle(rPnt,Size(rObjSiz.Width()+1,rObjSiz.Height()+1)), nullptr); } void SdrCreateView::MovCreateObj(const Point& rPnt) @@ -779,11 +779,11 @@ void SdrCreateView::ShowCreateObj(/*OutputDevice* pOut, sal_Bool bFull*/) { // ensure object has some size, necessary for SdrTextObj because // there are still untested divisions by that sizes - Rectangle aCurrentSnapRect(pAktCreate->GetSnapRect()); + tools::Rectangle aCurrentSnapRect(pAktCreate->GetSnapRect()); if(!(aCurrentSnapRect.GetWidth() > 1 && aCurrentSnapRect.GetHeight() > 1)) { - Rectangle aNewRect(maDragStat.GetStart(), maDragStat.GetStart() + Point(2, 2)); + tools::Rectangle aNewRect(maDragStat.GetStart(), maDragStat.GetStart() + Point(2, 2)); pAktCreate->NbcSetSnapRect(aNewRect); } } diff --git a/svx/source/svdraw/svddrag.cxx b/svx/source/svdraw/svddrag.cxx index 75c046a1326b..d527c9865d8e 100644 --- a/svx/source/svdraw/svddrag.cxx +++ b/svx/source/svdraw/svddrag.cxx @@ -53,7 +53,7 @@ void SdrDragStat::Reset() mbEndDragChangesLayout=false; bMouseIsUp=false; Clear(true); - aActionRect=Rectangle(); + aActionRect=tools::Rectangle(); } void SdrDragStat::Reset(const Point& rPnt) @@ -124,9 +124,9 @@ Fraction SdrDragStat::GetYFact() const return Fraction(nMul,nDiv); } -void SdrDragStat::TakeCreateRect(Rectangle& rRect) const +void SdrDragStat::TakeCreateRect(tools::Rectangle& rRect) const { - rRect=Rectangle(GetStart(),GetNow()); + rRect=tools::Rectangle(GetStart(),GetNow()); if (GetPointCount()>=2) { Point aBtmRgt(GetPoint(1)); rRect.Right()=aBtmRgt.X(); diff --git a/svx/source/svdraw/svddrgm1.hxx b/svx/source/svdraw/svddrgm1.hxx index 46f3e53020dd..94de57531ff0 100644 --- a/svx/source/svdraw/svddrgm1.hxx +++ b/svx/source/svdraw/svddrgm1.hxx @@ -139,7 +139,7 @@ public: class SdrDragCrook : public SdrDragMethod { private: - Rectangle aMarkRect; + tools::Rectangle aMarkRect; Point aMarkCenter; Point aCenter; Point aStart; @@ -187,7 +187,7 @@ public: class SdrDragDistort : public SdrDragMethod { private: - Rectangle aMarkRect; + tools::Rectangle aMarkRect; XPolygon aDistortedRect; sal_uInt16 nPolyPt; bool bContortionAllowed; diff --git a/svx/source/svdraw/svddrgmt.cxx b/svx/source/svdraw/svddrgmt.cxx index 5d16e8b95e07..b46d6ae7e0c8 100644 --- a/svx/source/svdraw/svddrgmt.cxx +++ b/svx/source/svdraw/svddrgmt.cxx @@ -450,7 +450,7 @@ void SdrDragMethod::createSdrDragEntries_PolygonDrag() if(bNoPolygons) { - const Rectangle aR(getSdrDragView().GetSdrPageView()->MarkSnap()); + const tools::Rectangle aR(getSdrDragView().GetSdrPageView()->MarkSnap()); const basegfx::B2DRange aNewRectangle(aR.Left(), aR.Top(), aR.Right(), aR.Bottom()); basegfx::B2DPolygon aNewPolygon(basegfx::tools::createPolygonFromRect(aNewRectangle)); @@ -800,7 +800,7 @@ void SdrDragMethod::CreateOverlayGeometry(sdr::overlay::OverlayManager& rOverlay // add DragStripes if necessary (help lines cross the page when dragging) if(getSdrDragView().IsDragStripes()) { - Rectangle aActionRectangle; + tools::Rectangle aActionRectangle; getSdrDragView().TakeActionRect(aActionRectangle); const basegfx::B2DPoint aTopLeft(aActionRectangle.Left(), aActionRectangle.Top()); @@ -965,12 +965,12 @@ bool SdrDragMovHdl::BeginSdrDrag() return false; } - DragStat().SetActionRect(Rectangle(pH1->GetPos(),pH2->GetPos())); + DragStat().SetActionRect(tools::Rectangle(pH1->GetPos(),pH2->GetPos())); } else { Point aPt(GetDragHdl()->GetPos()); - DragStat().SetActionRect(Rectangle(aPt,aPt)); + DragStat().SetActionRect(tools::Rectangle(aPt,aPt)); } return true; @@ -1017,7 +1017,7 @@ void SdrDragMovHdl::MoveSdrDrag(const Point& rNoSnapPnt) pHM->Touch(); Show(); - DragStat().SetActionRect(Rectangle(pH1->GetPos(),pH2->GetPos())); + DragStat().SetActionRect(tools::Rectangle(pH1->GetPos(),pH2->GetPos())); } } else @@ -1083,7 +1083,7 @@ void SdrDragMovHdl::MoveSdrDrag(const Point& rNoSnapPnt) pHM->Touch(); Show(); - DragStat().SetActionRect(Rectangle(aPnt,aPnt)); + DragStat().SetActionRect(tools::Rectangle(aPnt,aPnt)); } } } @@ -1377,7 +1377,7 @@ bool SdrDragObjOwn::EndSdrDrag(bool /*bCopy*/) // in its SdrTableObj::endSpecialDrag, so currently not possible. OTOH it uses // a CreateUndoGeoObject(), so maybe setting SetEndDragChangesAttributes is okay. I // will test this now - Rectangle aBoundRect0; + tools::Rectangle aBoundRect0; if(pObj->GetUserCall()) { @@ -1561,7 +1561,7 @@ void SdrDragMove::MoveSdrDrag(const Point& rNoSnapPnt_) bXSnapped=false; bYSnapped=false; Point aNoSnapPnt(rNoSnapPnt_); - const Rectangle& aSR=GetMarkedRect(); + const tools::Rectangle& aSR=GetMarkedRect(); long nMovedx=aNoSnapPnt.X()-DragStat().GetStart().X(); long nMovedy=aNoSnapPnt.Y()-DragStat().GetStart().Y(); Point aLO(aSR.TopLeft()); aLO.X()+=nMovedx; aLO.Y()+=nMovedy; @@ -1586,18 +1586,18 @@ void SdrDragMove::MoveSdrDrag(const Point& rNoSnapPnt_) if (DragStat().CheckMinMoved(aNoSnapPnt)) { Point aPt1(aPnt); - Rectangle aLR(getSdrDragView().GetWorkArea()); + tools::Rectangle aLR(getSdrDragView().GetWorkArea()); bool bWorkArea=!aLR.IsEmpty(); bool bDragLimit=IsDragLimit(); if (bDragLimit || bWorkArea) { - Rectangle aSR2(GetMarkedRect()); + tools::Rectangle aSR2(GetMarkedRect()); Point aD(aPt1-DragStat().GetStart()); if (bDragLimit) { - Rectangle aR2(GetDragLimitRect()); + tools::Rectangle aR2(GetDragLimitRect()); if (bWorkArea) aLR.Intersection(aR2); @@ -1653,7 +1653,7 @@ void SdrDragMove::MoveSdrDrag(const Point& rNoSnapPnt_) { const SdrObject* pObj=pM->GetMarkedSdrObj(); const SdrGluePointList* pGPL=pObj->GetGluePointList(); - Rectangle aBound(pObj->GetCurrentBoundRect()); + tools::Rectangle aBound(pObj->GetCurrentBoundRect()); for (SdrUShortCont::const_iterator it = rPts.begin(); it != rPts.end(); ++it) { @@ -1683,7 +1683,7 @@ void SdrDragMove::MoveSdrDrag(const Point& rNoSnapPnt_) { Hide(); DragStat().NextMove(aPt1); - Rectangle aAction(GetMarkedRect()); + tools::Rectangle aAction(GetMarkedRect()); aAction.Move(DragStat().GetDX(),DragStat().GetDY()); DragStat().SetActionRect(aAction); Show(); @@ -1819,7 +1819,7 @@ bool SdrDragResize::BeginSdrDrag() if (pRef1!=nullptr && pRef2!=nullptr) { - DragStat().Ref1()=Rectangle(pRef1->GetPos(),pRef2->GetPos()).Center(); + DragStat().Ref1()=tools::Rectangle(pRef1->GetPos(),pRef2->GetPos()).Center(); } else { @@ -1848,17 +1848,17 @@ void SdrDragResize::MoveSdrDrag(const Point& rNoSnapPnt) Point aStart(DragStat().GetStart()); Point aRef(DragStat().GetRef1()); Fraction aMaxFact(0x7FFFFFFF,1); - Rectangle aLR(getSdrDragView().GetWorkArea()); + tools::Rectangle aLR(getSdrDragView().GetWorkArea()); bool bWorkArea=!aLR.IsEmpty(); bool bDragLimit=IsDragLimit(); if (bDragLimit || bWorkArea) { - Rectangle aSR(GetMarkedRect()); + tools::Rectangle aSR(GetMarkedRect()); if (bDragLimit) { - Rectangle aR2(GetDragLimitRect()); + tools::Rectangle aR2(GetDragLimitRect()); if (bWorkArea) aLR.Intersection(aR2); @@ -2812,14 +2812,14 @@ void SdrDragCrook::TakeSdrDragComment(OUString& rStr) const #define DRAG_CROOK_RASTER_MAXIMUM (15) #define DRAG_CROOK_RASTER_DISTANCE (30) -basegfx::B2DPolyPolygon impCreateDragRaster(SdrPageView& rPageView, const Rectangle& rMarkRect) +basegfx::B2DPolyPolygon impCreateDragRaster(SdrPageView& rPageView, const tools::Rectangle& rMarkRect) { basegfx::B2DPolyPolygon aRetval; if(rPageView.PageWindowCount()) { OutputDevice& rOut = (rPageView.GetPageWindow(0)->GetPaintWindow().GetOutputDevice()); - Rectangle aPixelSize = rOut.LogicToPixel(rMarkRect); + tools::Rectangle aPixelSize = rOut.LogicToPixel(rMarkRect); sal_uInt32 nHorDiv(aPixelSize.GetWidth() / DRAG_CROOK_RASTER_DISTANCE); sal_uInt32 nVerDiv(aPixelSize.GetHeight() / DRAG_CROOK_RASTER_DISTANCE); @@ -2946,7 +2946,7 @@ void SdrDragCrook::MovAllPoints(basegfx::B2DPolyPolygon& rTarget) { nLast=n1st; while (nLast<nPolyCount && aTempPolyPoly[nLast].GetPointCount()!=0) nLast++; - Rectangle aBound(aTempPolyPoly[n1st].GetBoundRect()); + tools::Rectangle aBound(aTempPolyPoly[n1st].GetBoundRect()); sal_uInt16 i; for (i=n1st+1; i<nLast; i++) @@ -3295,7 +3295,7 @@ void SdrDragCrook::applyCurrentTransformationToSdrObject(SdrObject& rTarget) if (bDoCrook) { - const Rectangle aLocalMarkRect(getSdrDragView().GetMarkedObjRect()); + const tools::Rectangle aLocalMarkRect(getSdrDragView().GetMarkedObjRect()); const bool bLocalRotate(!bContortion && eMode == SdrCrookMode::Rotate && getSdrDragView().IsRotateAllowed()); SdrEditView::ImpCrookObj(&rTarget,aCenter,aRad,eMode,bVertical,!bContortion,bLocalRotate,aLocalMarkRect); @@ -3624,7 +3624,7 @@ bool SdrDragCrop::EndSdrDrag(bool /*bCopy*/) if (pRef1==nullptr || pRef2==nullptr) return false; - Rectangle rect(pRef1->GetPos(),pRef2->GetPos()); + tools::Rectangle rect(pRef1->GetPos(),pRef2->GetPos()); Point aEnd(DragStat().GetNow()); Point aStart(DragStat().GetStart()); @@ -3940,12 +3940,12 @@ bool SdrDragCrop::EndSdrDrag(bool /*bCopy*/) aRangeNewNoShearNoRotate.transform(aMatrixOriginalNoShearNoRotate * aDiscreteChangeMatrix); // extract the old Rectangle structures - Rectangle aOldRect( + tools::Rectangle aOldRect( basegfx::fround(aRangeOriginalNoShearNoRotate.getMinX()), basegfx::fround(aRangeOriginalNoShearNoRotate.getMinY()), basegfx::fround(aRangeOriginalNoShearNoRotate.getMaxX()), basegfx::fround(aRangeOriginalNoShearNoRotate.getMaxY())); - Rectangle aNewRect( + tools::Rectangle aNewRect( basegfx::fround(aRangeNewNoShearNoRotate.getMinX()), basegfx::fround(aRangeNewNoShearNoRotate.getMinY()), basegfx::fround(aRangeNewNoShearNoRotate.getMaxX()), diff --git a/svx/source/svdraw/svddrgv.cxx b/svx/source/svdraw/svddrgv.cxx index 65a92c50c8b7..787e7434ef9e 100644 --- a/svx/source/svdraw/svddrgv.cxx +++ b/svx/source/svdraw/svddrgv.cxx @@ -120,7 +120,7 @@ void SdrDragView::BrkAction() BrkDragObj(); } -void SdrDragView::TakeActionRect(Rectangle& rRect) const +void SdrDragView::TakeActionRect(tools::Rectangle& rRect) const { if (mpCurrentSdrDragMethod) { @@ -139,7 +139,7 @@ void SdrDragView::TakeActionRect(Rectangle& rRect) const } else { - rRect = Rectangle( + rRect = tools::Rectangle( basegfx::fround(aBoundRange.getMinX()), basegfx::fround(aBoundRange.getMinY()), basegfx::fround(aBoundRange.getMaxX()), basegfx::fround(aBoundRange.getMaxY())); } @@ -147,7 +147,7 @@ void SdrDragView::TakeActionRect(Rectangle& rRect) const } if (rRect.IsEmpty()) { - rRect=Rectangle(maDragStat.GetNow(),maDragStat.GetNow()); + rRect=tools::Rectangle(maDragStat.GetNow(),maDragStat.GetNow()); } } else @@ -158,7 +158,7 @@ void SdrDragView::TakeActionRect(Rectangle& rRect) const bool SdrDragView::TakeDragObjAnchorPos(Point& rPos, bool bTR ) const { - Rectangle aR; + tools::Rectangle aR; TakeActionRect(aR); rPos = bTR ? aR.TopRight() : aR.TopLeft(); if (GetMarkedObjectCount()==1 && IsDragObj() && // only on single selection @@ -192,7 +192,7 @@ bool SdrDragView::TakeDragObjAnchorPos(Point& rPos, bool bTR ) const } -bool SdrDragView::TakeDragLimit(SdrDragMode /*eMode*/, Rectangle& /*rRect*/) const +bool SdrDragView::TakeDragLimit(SdrDragMode /*eMode*/, tools::Rectangle& /*rRect*/) const { return false; } diff --git a/svx/source/svdraw/svdedtv.cxx b/svx/source/svdraw/svdedtv.cxx index 97bd8a7b9287..6cdd8e926f6d 100644 --- a/svx/source/svdraw/svdedtv.cxx +++ b/svx/source/svdraw/svdedtv.cxx @@ -662,8 +662,8 @@ void SdrEditView::ForceMarkedObjToAnotherPage() for (size_t nm=0; nm<GetMarkedObjectCount(); ++nm) { SdrMark* pM=GetSdrMarkByIndex(nm); SdrObject* pObj=pM->GetMarkedSdrObj(); - Rectangle aObjRect(pObj->GetCurrentBoundRect()); - Rectangle aPgRect(pM->GetPageView()->GetPageRect()); + tools::Rectangle aObjRect(pObj->GetCurrentBoundRect()); + tools::Rectangle aPgRect(pM->GetPageView()->GetPageRect()); if (!aObjRect.IsOver(aPgRect)) { bool bFnd=false; SdrPageView* pPV = GetSdrPageView(); diff --git a/svx/source/svdraw/svdedtv1.cxx b/svx/source/svdraw/svdedtv1.cxx index dddb0bd0ee98..dcef2d237b0a 100644 --- a/svx/source/svdraw/svdedtv1.cxx +++ b/svx/source/svdraw/svdedtv1.cxx @@ -66,13 +66,13 @@ // EditView -void SdrEditView::SetMarkedObjRect(const Rectangle& rRect) +void SdrEditView::SetMarkedObjRect(const tools::Rectangle& rRect) { DBG_ASSERT(!rRect.IsEmpty(),"SetMarkedObjRect() with an empty Rect does not make sense."); if (rRect.IsEmpty()) return; const size_t nCount=GetMarkedObjectCount(); if (nCount==0) return; - Rectangle aR0(GetMarkedObjRect()); + tools::Rectangle aR0(GetMarkedObjRect()); DBG_ASSERT(!aR0.IsEmpty(),"SetMarkedObjRect(): GetMarkedObjRect() is empty."); if (aR0.IsEmpty()) return; long x0=aR0.Left(); @@ -97,7 +97,7 @@ void SdrEditView::SetMarkedObjRect(const Rectangle& rRect) if( bUndo ) AddUndo( GetModel()->GetSdrUndoFactory().CreateUndoGeoObject(*pO)); - Rectangle aR1(pO->GetSnapRect()); + tools::Rectangle aR1(pO->GetSnapRect()); if (!aR1.IsEmpty()) { if (aR1==aR0) @@ -500,7 +500,7 @@ void SdrEditView::ShearMarkedObj(const Point& rRef, long nAngle, bool bVShear, b } void SdrEditView::ImpCrookObj(SdrObject* pO, const Point& rRef, const Point& rRad, - SdrCrookMode eMode, bool bVertical, bool bNoContortion, bool bRotate, const Rectangle& rMarkRect) + SdrCrookMode eMode, bool bVertical, bool bNoContortion, bool bRotate, const tools::Rectangle& rMarkRect) { SdrPathObj* pPath=dynamic_cast<SdrPathObj*>( pO ); bool bDone = false; @@ -580,7 +580,7 @@ void SdrEditView::ImpCrookObj(SdrObject* pO, const Point& rRef, const Point& rRa void SdrEditView::CrookMarkedObj(const Point& rRef, const Point& rRad, SdrCrookMode eMode, bool bVertical, bool bNoContortion, bool bCopy) { - Rectangle aMarkRect(GetMarkedObjRect()); + tools::Rectangle aMarkRect(GetMarkedObjRect()); const bool bUndo = IsUndoEnabled(); bool bRotate=bNoContortion && eMode==SdrCrookMode::Rotate && IsRotateAllowed(); @@ -621,7 +621,7 @@ void SdrEditView::CrookMarkedObj(const Point& rRef, const Point& rRad, SdrCrookM EndUndo(); } -void SdrEditView::ImpDistortObj(SdrObject* pO, const Rectangle& rRef, const XPolygon& rDistortedRect, bool bNoContortion) +void SdrEditView::ImpDistortObj(SdrObject* pO, const tools::Rectangle& rRef, const XPolygon& rDistortedRect, bool bNoContortion) { SdrPathObj* pPath = dynamic_cast<SdrPathObj*>( pO ); @@ -655,7 +655,7 @@ void SdrEditView::ImpDistortObj(SdrObject* pO, const Rectangle& rRef, const XPol } } -void SdrEditView::DistortMarkedObj(const Rectangle& rRef, const XPolygon& rDistortedRect, bool bNoContortion, bool bCopy) +void SdrEditView::DistortMarkedObj(const tools::Rectangle& rRef, const XPolygon& rDistortedRect, bool bNoContortion, bool bCopy) { const bool bUndo = IsUndoEnabled(); @@ -679,7 +679,7 @@ void SdrEditView::DistortMarkedObj(const Rectangle& rRef, const XPolygon& rDisto if( bUndo ) AddUndo( GetModel()->GetSdrUndoFactory().CreateUndoGeoObject(*pO)); - Rectangle aRefRect(rRef); + tools::Rectangle aRefRect(rRef); const SdrObjList* pOL=pO->GetSubList(); if (bNoContortion || pOL==nullptr) { ImpDistortObj(pO,aRefRect,rDistortedRect,bNoContortion); @@ -699,7 +699,7 @@ void SdrEditView::DistortMarkedObj(const Rectangle& rRef, const XPolygon& rDisto void SdrEditView::SetNotPersistAttrToMarked(const SfxItemSet& rAttr, bool /*bReplaceAll*/) { // bReplaceAll has no effect here - Rectangle aAllSnapRect(GetMarkedObjRect()); + tools::Rectangle aAllSnapRect(GetMarkedObjRect()); const SfxPoolItem *pPoolItem=nullptr; if (rAttr.GetItemState(SDRATTR_TRANSFORMREF1X,true,&pPoolItem)==SfxItemState::SET) { long n=static_cast<const SdrTransformRef1XItem*>(pPoolItem)->GetValue(); @@ -739,7 +739,7 @@ void SdrEditView::SetNotPersistAttrToMarked(const SfxItemSet& rAttr, bool /*bRep bAllHgt=true; bDoIt=true; } if (bDoIt) { - Rectangle aRect(aAllSnapRect); // TODO: change this for PolyPt's and GluePt's!!! + tools::Rectangle aRect(aAllSnapRect); // TODO: change this for PolyPt's and GluePt's!!! if (bAllPosX) aRect.Move(nAllPosX-aRect.Left(),0); if (bAllPosY) aRect.Move(0,nAllPosY-aRect.Top()); if (bAllWdt) aRect.Right()=aAllSnapRect.Left()+nAllWdt; @@ -786,7 +786,7 @@ void SdrEditView::MergeNotPersistAttrFromMarked(SfxItemSet& rAttr, bool /*bOnlyH { // bOnlyHardAttr has no effect here. // TODO: Take into account the origin and PvPos. - Rectangle aAllSnapRect(GetMarkedObjRect()); // TODO: change this for PolyPt's and GluePt's!!! + tools::Rectangle aAllSnapRect(GetMarkedObjRect()); // TODO: change this for PolyPt's and GluePt's!!! long nAllSnapPosX=aAllSnapRect.Left(); long nAllSnapPosY=aAllSnapRect.Top(); long nAllSnapWdt=aAllSnapRect.GetWidth()-1; @@ -807,8 +807,8 @@ void SdrEditView::MergeNotPersistAttrFromMarked(SfxItemSet& rAttr, bool /*bOnlyH long nLogicHgt=0; bool bLogicHgtDC=false,bLogicHgtDiff=false; long nRotAngle=0; bool bRotAngleDC=false; long nShrAngle=0; bool bShrAngleDC=false; - Rectangle aSnapRect; - Rectangle aLogicRect; + tools::Rectangle aSnapRect; + tools::Rectangle aLogicRect; const size_t nMarkCount=GetMarkedObjectCount(); for (size_t nm=0; nm<nMarkCount; ++nm) { const SdrMark* pM=GetSdrMarkByIndex(nm); @@ -819,8 +819,8 @@ void SdrEditView::MergeNotPersistAttrFromMarked(SfxItemSet& rAttr, bool /*bOnlyH bSizProtect=pObj->IsResizeProtect(); bPrintable =pObj->IsPrintable(); bVisible = pObj->IsVisible(); - Rectangle aSnapRect2(pObj->GetSnapRect()); - Rectangle aLogicRect2(pObj->GetLogicRect()); + tools::Rectangle aSnapRect2(pObj->GetSnapRect()); + tools::Rectangle aLogicRect2(pObj->GetLogicRect()); nSnapPosX=aSnapRect2.Left(); nSnapPosY=aSnapRect2.Top(); nSnapWdt=aSnapRect2.GetWidth()-1; @@ -1133,7 +1133,7 @@ void SdrEditView::SetAttrToMarked(const SfxItemSet& rAttr, bool bReplaceAll) if(!aCharWhichIds.empty()) { - Rectangle aOldBoundRect = pTextObj->GetLastBoundRect(); + tools::Rectangle aOldBoundRect = pTextObj->GetLastBoundRect(); // #110094#-14 pTextObj->SendRepaintBroadcast(pTextObj->GetBoundRect()); pTextObj->RemoveOutlinerCharacterAttribs( aCharWhichIds ); @@ -1284,7 +1284,7 @@ SfxItemSet SdrEditView::GetGeoAttrFromMarked() const if (AreObjectsMarked()) { SfxItemSet aMarkAttr(GetAttrFromMarked(false)); // because of AutoGrowHeight and corner radius - Rectangle aRect(GetMarkedObjRect()); + tools::Rectangle aRect(GetMarkedObjRect()); // restore position to that before calc hack aRect -= GetGridOffset(); @@ -1434,7 +1434,7 @@ SfxItemSet SdrEditView::GetGeoAttrFromMarked() const return aRetSet; } -Point ImpGetPoint(const Rectangle& rRect, RectPoint eRP) +Point ImpGetPoint(const tools::Rectangle& rRect, RectPoint eRP) { switch(eRP) { case RectPoint::LT: return rRect.TopLeft(); @@ -1452,7 +1452,7 @@ Point ImpGetPoint(const Rectangle& rRect, RectPoint eRP) void SdrEditView::SetGeoAttrToMarked(const SfxItemSet& rAttr) { - Rectangle aRect(GetMarkedObjRect()); + tools::Rectangle aRect(GetMarkedObjRect()); if(GetSdrPageView()) { @@ -1790,7 +1790,7 @@ void SdrEditView::AlignMarkedObjects(SdrHorAlign eHor, SdrVertAlign eVert) BegUndo(aStr); } - Rectangle aBound; + tools::Rectangle aBound; const size_t nMarkCount=GetMarkedObjectCount(); bool bHasFixed=false; for (size_t nm=0; nm<nMarkCount; ++nm) @@ -1801,7 +1801,7 @@ void SdrEditView::AlignMarkedObjects(SdrHorAlign eHor, SdrVertAlign eVert) pObj->TakeObjInfo(aInfo); if (!aInfo.bMoveAllowed || pObj->IsMoveProtect()) { - Rectangle aObjRect(pObj->GetSnapRect()); + tools::Rectangle aObjRect(pObj->GetSnapRect()); aBound.Union(aObjRect); bHasFixed=true; } @@ -1825,7 +1825,7 @@ void SdrEditView::AlignMarkedObjects(SdrHorAlign eHor, SdrVertAlign eVert) } else { - aBound=Rectangle(pPage->GetLftBorder(),pPage->GetUppBorder(), + aBound=tools::Rectangle(pPage->GetLftBorder(),pPage->GetUppBorder(), pPage->GetWdt()-pPage->GetRgtBorder(), pPage->GetHgt()-pPage->GetLwrBorder()); } @@ -1846,7 +1846,7 @@ void SdrEditView::AlignMarkedObjects(SdrHorAlign eHor, SdrVertAlign eVert) { long nXMov=0; long nYMov=0; - Rectangle aObjRect(pObj->GetSnapRect()); + tools::Rectangle aObjRect(pObj->GetSnapRect()); switch (eVert) { case SdrVertAlign::Top : nYMov=aBound.Top() -aObjRect.Top() ; break; diff --git a/svx/source/svdraw/svdedtv2.cxx b/svx/source/svdraw/svdedtv2.cxx index cfd03d34b76a..671f1d4591e8 100644 --- a/svx/source/svdraw/svdedtv2.cxx +++ b/svx/source/svdraw/svdedtv2.cxx @@ -91,7 +91,7 @@ void SdrEditView::MovMarkedToTop() pOL0=pOL; } const size_t nNowPos = pObj->GetOrdNumDirect(); - const Rectangle& rBR=pObj->GetCurrentBoundRect(); + const tools::Rectangle& rBR=pObj->GetCurrentBoundRect(); size_t nCmpPos = nNowPos+1; SdrObject* pMaxObj=GetMaxToTopObj(pObj); if (pMaxObj!=nullptr) @@ -178,7 +178,7 @@ void SdrEditView::MovMarkedToBtm() pOL0=pOL; } const size_t nNowPos = pObj->GetOrdNumDirect(); - const Rectangle& rBR=pObj->GetCurrentBoundRect(); + const tools::Rectangle& rBR=pObj->GetCurrentBoundRect(); size_t nCmpPos = nNowPos; if (nCmpPos>0) --nCmpPos; @@ -1207,7 +1207,7 @@ void SdrEditView::EqualizeMarkedObjects(bool bWidth) continue; SdrMark* pM = rMarkList.GetMark(a); SdrObject* pObj = pM->GetMarkedSdrObj(); - Rectangle aLogicRect(pObj->GetLogicRect()); + tools::Rectangle aLogicRect(pObj->GetLogicRect()); Size aLogicRectSize(aLogicRect.GetSize()); if (bWidth) aLogicRectSize.Width() = aLastRectSize.Width(); @@ -1622,7 +1622,7 @@ void SdrEditView::ImpDismantleOneObject(const SdrObject* pObj, SdrObjList& rOL, aTargetItemSet.Put(XFillStyleItem(drawing::FillStyle_NONE)); // get the text bounds and set at text object - Rectangle aTextBounds = pCustomShape->GetSnapRect(); + tools::Rectangle aTextBounds = pCustomShape->GetSnapRect(); if(pCustomShape->GetTextBounds(aTextBounds)) { pTextObj->SetSnapRect(aTextBounds); @@ -2038,7 +2038,7 @@ void SdrEditView::DoImportMarkedMtf(SvdProgressInfo *pProgrInfo) SdrGrafObj* pGraf= dynamic_cast<SdrGrafObj*>( pObj ); SdrOle2Obj* pOle2= dynamic_cast<SdrOle2Obj*>( pObj ); sal_uIntPtr nInsAnz=0; - Rectangle aLogicRect; + tools::Rectangle aLogicRect; if (pGraf && (pGraf->HasGDIMetaFile() || pGraf->isEmbeddedSvg())) { diff --git a/svx/source/svdraw/svdedxv.cxx b/svx/source/svdraw/svdedxv.cxx index f015928901e0..436c5740094e 100644 --- a/svx/source/svdraw/svdedxv.cxx +++ b/svx/source/svdraw/svdedxv.cxx @@ -204,7 +204,7 @@ void SdrObjEditView::HideSdrPage() SdrGlueEditView::HideSdrPage(); } -void SdrObjEditView::TakeActionRect(Rectangle& rRect) const +void SdrObjEditView::TakeActionRect(tools::Rectangle& rRect) const { if (IsMacroObj()) { rRect=pMacroObj->GetCurrentBoundRect(); @@ -245,14 +245,14 @@ void SdrObjEditView::ModelHasChanged() bool bColorChg=false; bool bContourFrame=pTextObj->IsContourTextFrame(); EVAnchorMode eNewAnchor(ANCHOR_VCENTER_HCENTER); - Rectangle aOldArea(aMinTextEditArea); + tools::Rectangle aOldArea(aMinTextEditArea); aOldArea.Union(aTextEditArea); Color aNewColor; { // check area Size aPaperMin1; Size aPaperMax1; - Rectangle aEditArea1; - Rectangle aMinArea1; + tools::Rectangle aEditArea1; + tools::Rectangle aMinArea1; pTextObj->TakeTextEditArea(&aPaperMin1,&aPaperMax1,&aEditArea1,&aMinArea1); Point aPvOfs(pTextObj->GetTextEditOffset()); @@ -263,7 +263,7 @@ void SdrObjEditView::ModelHasChanged() aMinArea1 += pTextObj->GetGridOffset(); aEditArea1.Move(aPvOfs.X(),aPvOfs.Y()); aMinArea1.Move(aPvOfs.X(),aPvOfs.Y()); - Rectangle aNewArea(aMinArea1); + tools::Rectangle aNewArea(aMinArea1); aNewArea.Union(aEditArea1); if (aNewArea!=aOldArea || aEditArea1!=aTextEditArea || aMinArea1!=aMinTextEditArea || @@ -283,7 +283,7 @@ void SdrObjEditView::ModelHasChanged() EEControlBits nStat=pTextEditOutliner->GetControlWord(); nStat&=~EEControlBits::AUTOPAGESIZE; pTextEditOutliner->SetControlWord(nStat); - Rectangle aAnchorRect; + tools::Rectangle aAnchorRect; pTextObj->TakeTextAnchorRect(aAnchorRect); pTextObj->ImpSetContourPolygon(*pTextEditOutliner,aAnchorRect, true); } @@ -330,7 +330,7 @@ void SdrObjEditView::ModelHasChanged() OutlinerView* pOLV=pTextEditOutliner->GetView(nOV); { // invalidate old OutlinerView area vcl::Window* pWin=pOLV->GetWindow(); - Rectangle aTmpRect(aOldArea); + tools::Rectangle aTmpRect(aOldArea); sal_uInt16 nPixSiz=pOLV->GetInvalidateMore()+1; Size aMore(pWin->PixelToLogic(Size(nPixSiz,nPixSiz))); aTmpRect.Left()-=aMore.Width(); @@ -372,7 +372,7 @@ void SdrObjEditView::TextEditDrawing(SdrPaintWindow& rPaintWindow) const if(nViewCount) { const vcl::Region& rRedrawRegion = rPaintWindow.GetRedrawRegion(); - const Rectangle aCheckRect(rRedrawRegion.GetBoundRect()); + const tools::Rectangle aCheckRect(rRedrawRegion.GetBoundRect()); for(sal_uInt32 i(0); i < nViewCount; i++) { @@ -394,15 +394,15 @@ void SdrObjEditView::TextEditDrawing(SdrPaintWindow& rPaintWindow) const } } -void SdrObjEditView::ImpPaintOutlinerView(OutlinerView& rOutlView, const Rectangle& rRect, OutputDevice& rTargetDevice) const +void SdrObjEditView::ImpPaintOutlinerView(OutlinerView& rOutlView, const tools::Rectangle& rRect, OutputDevice& rTargetDevice) const { const SdrTextObj* pText = dynamic_cast<SdrTextObj*>( GetTextEditObject() ); bool bTextFrame(pText && pText->IsTextFrame()); bool bFitToSize(pTextEditOutliner->GetControlWord() & EEControlBits::STRETCHING); bool bModifyMerk(pTextEditOutliner->IsModified()); - Rectangle aBlankRect(rOutlView.GetOutputArea()); + tools::Rectangle aBlankRect(rOutlView.GetOutputArea()); aBlankRect.Union(aMinTextEditArea); - Rectangle aPixRect(rTargetDevice.LogicToPixel(aBlankRect)); + tools::Rectangle aPixRect(rTargetDevice.LogicToPixel(aBlankRect)); // in the tiled rendering case, the setup is incomplete, and we very // easily get an empty rRect on input - that will cause that everything is @@ -467,9 +467,9 @@ void SdrObjEditView::ImpInvalidateOutlinerView(OutlinerView& rOutlView) const if(bTextFrame && !bFitToSize) { - Rectangle aBlankRect(rOutlView.GetOutputArea()); + tools::Rectangle aBlankRect(rOutlView.GetOutputArea()); aBlankRect.Union(aMinTextEditArea); - Rectangle aPixRect(pWin->LogicToPixel(aBlankRect)); + tools::Rectangle aPixRect(pWin->LogicToPixel(aBlankRect)); sal_uInt16 nPixSiz(rOutlView.GetInvalidateMore() - 1); aPixRect.Left()--; @@ -490,7 +490,7 @@ void SdrObjEditView::ImpInvalidateOutlinerView(OutlinerView& rOutlView) const if (aPixRect.Bottom()>nMaxY) aPixRect.Bottom()=nMaxY; } - Rectangle aOuterPix(aPixRect); + tools::Rectangle aOuterPix(aPixRect); aOuterPix.Left()-=nPixSiz; aOuterPix.Top()-=nPixSiz; aOuterPix.Right()+=nPixSiz; @@ -827,8 +827,8 @@ bool SdrObjEditView::SdrBeginTextEdit( // but aMinTextEditArea has to happen, too (therefore leaving this in right now) pTextObj->TakeTextEditArea(nullptr,nullptr,&aTextEditArea,&aMinTextEditArea); - Rectangle aTextRect; - Rectangle aAnchorRect; + tools::Rectangle aTextRect; + tools::Rectangle aAnchorRect; pTextObj->TakeTextRect(*pTextEditOutliner, aTextRect, true, &aAnchorRect /* Give true here, not false */); @@ -1078,7 +1078,7 @@ SdrEndTextEditKind SdrObjEditView::SdrEndTextEdit(bool bDontDeleteReally) pTextEditOutliner=nullptr; pTextEditOutlinerView=nullptr; pTextEditCursorMerker=nullptr; - aTextEditArea=Rectangle(); + aTextEditArea=tools::Rectangle(); if (pTEOutliner!=nullptr) { @@ -1202,7 +1202,7 @@ SdrEndTextEditKind SdrObjEditView::SdrEndTextEdit(bool bDontDeleteReally) OutlinerView* pOLV=pTEOutliner->GetView(i); sal_uInt16 nMorePix=pOLV->GetInvalidateMore() + 10; vcl::Window* pWin=pOLV->GetWindow(); - Rectangle aRect(pOLV->GetOutputArea()); + tools::Rectangle aRect(pOLV->GetOutputArea()); pTEOutliner->RemoveView(i); if (!bTextEditDontDelete || i!=0) { @@ -1320,7 +1320,7 @@ bool SdrObjEditView::IsTextEditHit(const Point& rHit) const bool bOk=false; if(mxTextEditObj.is()) { - Rectangle aEditArea; + tools::Rectangle aEditArea; OutlinerView* pOLV=pTextEditOutliner->GetView(0); if (pOLV!=nullptr) { @@ -1353,7 +1353,7 @@ bool SdrObjEditView::IsTextEditFrameHit(const Point& rHit) const vcl::Window* pWin=pOLV->GetWindow(); if (pText!=nullptr && pText->IsTextFrame() && pOLV!=nullptr && pWin!=nullptr) { sal_uInt16 nPixSiz=pOLV->GetInvalidateMore(); - Rectangle aEditArea(aMinTextEditArea); + tools::Rectangle aEditArea(aMinTextEditArea); aEditArea.Union(pOLV->GetOutputArea()); if (!aEditArea.IsInside(rHit)) { Size aSiz(pWin->PixelToLogic(Size(nPixSiz,nPixSiz))); @@ -1447,7 +1447,7 @@ bool SdrObjEditView::MouseButtonDown(const MouseEvent& rMEvt, vcl::Window* pWin) Point aPixPos(rMEvt.GetPosPixel()); if (pWin) { - Rectangle aR(pWin->LogicToPixel(pTextEditOutlinerView->GetOutputArea())); + tools::Rectangle aR(pWin->LogicToPixel(pTextEditOutlinerView->GetOutputArea())); if (aPixPos.X()<aR.Left ()) aPixPos.X()=aR.Left (); if (aPixPos.X()>aR.Right ()) aPixPos.X()=aR.Right (); if (aPixPos.Y()<aR.Top ()) aPixPos.Y()=aR.Top (); @@ -1480,7 +1480,7 @@ bool SdrObjEditView::MouseButtonUp(const MouseEvent& rMEvt, vcl::Window* pWin) } if (bPostIt && pWin) { Point aPixPos(rMEvt.GetPosPixel()); - Rectangle aR(pWin->LogicToPixel(pTextEditOutlinerView->GetOutputArea())); + tools::Rectangle aR(pWin->LogicToPixel(pTextEditOutlinerView->GetOutputArea())); if (aPixPos.X()<aR.Left ()) aPixPos.X()=aR.Left (); if (aPixPos.X()>aR.Right ()) aPixPos.X()=aR.Right (); if (aPixPos.Y()<aR.Top ()) aPixPos.Y()=aR.Top (); @@ -1514,7 +1514,7 @@ bool SdrObjEditView::MouseMove(const MouseEvent& rMEvt, vcl::Window* pWin) } if (bPostIt) { Point aPixPos(rMEvt.GetPosPixel()); - Rectangle aR(pTextEditOutlinerView->GetOutputArea()); + tools::Rectangle aR(pTextEditOutlinerView->GetOutputArea()); if (pWin) aR = pWin->LogicToPixel(aR); else if (pTextEditWin) @@ -1553,7 +1553,7 @@ bool SdrObjEditView::Command(const CommandEvent& rCEvt, vcl::Window* pWin) if (bPostIt) { Point aPixPos(rCEvt.GetMousePosPixel()); if (rCEvt.IsMouseEvent() && pWin) { - Rectangle aR(pWin->LogicToPixel(pTextEditOutlinerView->GetOutputArea())); + tools::Rectangle aR(pWin->LogicToPixel(pTextEditOutlinerView->GetOutputArea())); if (aPixPos.X()<aR.Left ()) aPixPos.X()=aR.Left (); if (aPixPos.X()>aR.Right ()) aPixPos.X()=aR.Right (); if (aPixPos.Y()<aR.Top ()) aPixPos.Y()=aR.Top (); @@ -1618,7 +1618,7 @@ void SdrObjEditView::ImpMakeTextCursorAreaVisible() if (pCsr!=nullptr) { Size aSiz(pCsr->GetSize()); if (aSiz.Width()!=0 && aSiz.Height()!=0) { - MakeVisible(Rectangle(pCsr->GetPos(),aSiz),*pTextEditWin); + MakeVisible(tools::Rectangle(pCsr->GetPos(),aSiz),*pTextEditWin); } } } @@ -1953,7 +1953,7 @@ void SdrObjEditView::ImpMacroUp(const Point& rUpPos) aHitRec.pVisiLayer=&pMacroPV->GetVisibleLayers(); aHitRec.pPageView=pMacroPV; aHitRec.pOut=pMacroWin.get(); - pMacroObj->PaintMacro(*pMacroWin,Rectangle(),aHitRec); + pMacroObj->PaintMacro(*pMacroWin,tools::Rectangle(),aHitRec); bMacroDown=false; } } @@ -1970,7 +1970,7 @@ void SdrObjEditView::ImpMacroDown(const Point& rDownPos) aHitRec.pPageView=pMacroPV; aHitRec.bDown=true; aHitRec.pOut=pMacroWin.get(); - pMacroObj->PaintMacro(*pMacroWin,Rectangle(),aHitRec); + pMacroObj->PaintMacro(*pMacroWin,tools::Rectangle(),aHitRec); bMacroDown=true; } } diff --git a/svx/source/svdraw/svdetc.cxx b/svx/source/svdraw/svdetc.cxx index 74cb4343adcb..9187f2c1d386 100644 --- a/svx/source/svdraw/svdetc.cxx +++ b/svx/source/svdraw/svdetc.cxx @@ -653,7 +653,7 @@ namespace } Color impCalcBackgroundColor( - const Rectangle& rArea, + const tools::Rectangle& rArea, const SdrPageView& rTextEditPV, const SdrPage& rPage) { @@ -803,7 +803,7 @@ Color GetTextEditBackgroundColor(const SdrObjEditView& rView) if(pPg) { - Rectangle aSnapRect( pText->GetSnapRect() ); + tools::Rectangle aSnapRect( pText->GetSnapRect() ); aSnapRect.Move(aPvOfs.X(), aPvOfs.Y()); return impCalcBackgroundColor(aSnapRect, *pTextEditPV, *pPg); diff --git a/svx/source/svdraw/svdfmtf.cxx b/svx/source/svdraw/svdfmtf.cxx index adf930c3fba5..5b53f4ad2d54 100644 --- a/svx/source/svdraw/svdfmtf.cxx +++ b/svx/source/svdraw/svdfmtf.cxx @@ -76,7 +76,7 @@ using namespace com::sun::star; ImpSdrGDIMetaFileImport::ImpSdrGDIMetaFileImport( SdrModel& rModel, SdrLayerID nLay, - const Rectangle& rRect) + const tools::Rectangle& rRect) : maTmpList(), mpVD(VclPtr<VirtualDevice>::Create()), maScaleRect(rRect), @@ -994,7 +994,7 @@ void ImpSdrGDIMetaFileImport::ImportText( const Point& rPos, const OUString& rSt else if ( eAlg == ALIGN_BOTTOM ) aPos.Y() -= nTextHeight; - Rectangle aTextRect( aPos, aSize ); + tools::Rectangle aTextRect( aPos, aSize ); SdrRectObj* pText =new SdrRectObj( OBJ_TEXT, aTextRect ); pText->SetMergedItem ( makeSdrTextUpperDistItem (0)); @@ -1062,7 +1062,7 @@ void ImpSdrGDIMetaFileImport::DoAction(MetaStretchTextAction& rAct) void ImpSdrGDIMetaFileImport::DoAction(MetaBmpAction& rAct) { - Rectangle aRect(rAct.GetPoint(),rAct.GetBitmap().GetSizePixel()); + tools::Rectangle aRect(rAct.GetPoint(),rAct.GetBitmap().GetSizePixel()); aRect.Right()++; aRect.Bottom()++; SdrGrafObj* pGraf=new SdrGrafObj(Graphic(rAct.GetBitmap()),aRect); @@ -1074,7 +1074,7 @@ void ImpSdrGDIMetaFileImport::DoAction(MetaBmpAction& rAct) void ImpSdrGDIMetaFileImport::DoAction(MetaBmpScaleAction& rAct) { - Rectangle aRect(rAct.GetPoint(),rAct.GetSize()); + tools::Rectangle aRect(rAct.GetPoint(),rAct.GetSize()); aRect.Right()++; aRect.Bottom()++; SdrGrafObj* pGraf=new SdrGrafObj(Graphic(rAct.GetBitmap()),aRect); @@ -1086,7 +1086,7 @@ void ImpSdrGDIMetaFileImport::DoAction(MetaBmpScaleAction& rAct) void ImpSdrGDIMetaFileImport::DoAction(MetaBmpExAction& rAct) { - Rectangle aRect(rAct.GetPoint(),rAct.GetBitmapEx().GetSizePixel()); + tools::Rectangle aRect(rAct.GetPoint(),rAct.GetBitmapEx().GetSizePixel()); aRect.Right()++; aRect.Bottom()++; SdrGrafObj* pGraf=new SdrGrafObj( rAct.GetBitmapEx(), aRect ); @@ -1098,7 +1098,7 @@ void ImpSdrGDIMetaFileImport::DoAction(MetaBmpExAction& rAct) void ImpSdrGDIMetaFileImport::DoAction(MetaBmpExScaleAction& rAct) { - Rectangle aRect(rAct.GetPoint(),rAct.GetSize()); + tools::Rectangle aRect(rAct.GetPoint(),rAct.GetSize()); aRect.Right()++; aRect.Bottom()++; SdrGrafObj* pGraf=new SdrGrafObj( rAct.GetBitmapEx(), aRect ); @@ -1274,12 +1274,12 @@ void ImpSdrGDIMetaFileImport::DoAction(MetaTextRectAction& rAct) void ImpSdrGDIMetaFileImport::DoAction(MetaBmpScalePartAction& rAct) { - Rectangle aRect(rAct.GetDestPoint(), rAct.GetDestSize()); + tools::Rectangle aRect(rAct.GetDestPoint(), rAct.GetDestSize()); Bitmap aBitmap(rAct.GetBitmap()); aRect.Right()++; aRect.Bottom()++; - aBitmap.Crop(Rectangle(rAct.GetSrcPoint(), rAct.GetSrcSize())); + aBitmap.Crop(tools::Rectangle(rAct.GetSrcPoint(), rAct.GetSrcSize())); SdrGrafObj* pGraf = new SdrGrafObj(aBitmap, aRect); // This action is not creating line and fill, set directly, do not use SetAttributes(..) @@ -1290,12 +1290,12 @@ void ImpSdrGDIMetaFileImport::DoAction(MetaBmpScalePartAction& rAct) void ImpSdrGDIMetaFileImport::DoAction(MetaBmpExScalePartAction& rAct) { - Rectangle aRect(rAct.GetDestPoint(),rAct.GetDestSize()); + tools::Rectangle aRect(rAct.GetDestPoint(),rAct.GetDestSize()); BitmapEx aBitmapEx(rAct.GetBitmapEx()); aRect.Right()++; aRect.Bottom()++; - aBitmapEx.Crop(Rectangle(rAct.GetSrcPoint(), rAct.GetSrcSize())); + aBitmapEx.Crop(tools::Rectangle(rAct.GetSrcPoint(), rAct.GetSrcSize())); SdrGrafObj* pGraf = new SdrGrafObj(aBitmapEx, aRect); // This action is not creating line and fill, set directly, do not use SetAttributes(..) @@ -1306,7 +1306,7 @@ void ImpSdrGDIMetaFileImport::DoAction(MetaBmpExScalePartAction& rAct) void ImpSdrGDIMetaFileImport::DoAction(MetaMaskAction& rAct) { - Rectangle aRect(rAct.GetPoint(), rAct.GetBitmap().GetSizePixel()); + tools::Rectangle aRect(rAct.GetPoint(), rAct.GetBitmap().GetSizePixel()); BitmapEx aBitmapEx(rAct.GetBitmap(), rAct.GetColor()); aRect.Right()++; aRect.Bottom()++; @@ -1320,7 +1320,7 @@ void ImpSdrGDIMetaFileImport::DoAction(MetaMaskAction& rAct) void ImpSdrGDIMetaFileImport::DoAction(MetaMaskScaleAction& rAct) { - Rectangle aRect(rAct.GetPoint(), rAct.GetSize()); + tools::Rectangle aRect(rAct.GetPoint(), rAct.GetSize()); BitmapEx aBitmapEx(rAct.GetBitmap(), rAct.GetColor()); aRect.Right()++; aRect.Bottom()++; @@ -1334,11 +1334,11 @@ void ImpSdrGDIMetaFileImport::DoAction(MetaMaskScaleAction& rAct) void ImpSdrGDIMetaFileImport::DoAction(MetaMaskScalePartAction& rAct) { - Rectangle aRect(rAct.GetDestPoint(), rAct.GetDestSize()); + tools::Rectangle aRect(rAct.GetDestPoint(), rAct.GetDestSize()); BitmapEx aBitmapEx(rAct.GetBitmap(), rAct.GetColor()); aRect.Right()++; aRect.Bottom()++; - aBitmapEx.Crop(Rectangle(rAct.GetSrcPoint(), rAct.GetSrcSize())); + aBitmapEx.Crop(tools::Rectangle(rAct.GetSrcPoint(), rAct.GetSrcSize())); SdrGrafObj* pGraf = new SdrGrafObj(aBitmapEx, aRect); // This action is not creating line and fill, set directly, do not use SetAttributes(..) @@ -1385,7 +1385,7 @@ void ImpSdrGDIMetaFileImport::DoAction(MetaGradientAction& rAct) aRange.transform(aTransform); const Gradient& rGradient = rAct.GetGradient(); SdrRectObj* pRect = new SdrRectObj( - Rectangle( + tools::Rectangle( floor(aRange.getMinX()), floor(aRange.getMinY()), ceil(aRange.getMaxX()), @@ -1492,7 +1492,7 @@ void ImpSdrGDIMetaFileImport::DoAction(MetaFloatTransparentAction& rAct) if(rMtf.GetActionSize()) { - const Rectangle aRect(rAct.GetPoint(),rAct.GetSize()); + const tools::Rectangle aRect(rAct.GetPoint(),rAct.GetSize()); // convert metafile sub-content to BitmapEx BitmapEx aBitmapEx( @@ -1553,7 +1553,7 @@ void ImpSdrGDIMetaFileImport::DoAction(MetaFloatTransparentAction& rAct) ScopedVclPtrInstance< VirtualDevice > pVDev; pVDev->SetOutputSizePixel(aBitmapEx.GetBitmap().GetSizePixel()); - pVDev->DrawGradient(Rectangle(Point(0, 0), pVDev->GetOutputSizePixel()), rGradient); + pVDev->DrawGradient(tools::Rectangle(Point(0, 0), pVDev->GetOutputSizePixel()), rGradient); aNewMask = AlphaMask(pVDev->GetBitmap(Point(0, 0), pVDev->GetOutputSizePixel())); bHasNewMask = true; diff --git a/svx/source/svdraw/svdfmtf.hxx b/svx/source/svdraw/svdfmtf.hxx index e8440da97246..b6b4b7e0df26 100644 --- a/svx/source/svdraw/svdfmtf.hxx +++ b/svx/source/svdraw/svdfmtf.hxx @@ -44,7 +44,7 @@ class ImpSdrGDIMetaFileImport protected: ::std::vector< SdrObject* > maTmpList; ScopedVclPtr<VirtualDevice> mpVD; - Rectangle maScaleRect; + tools::Rectangle maScaleRect; size_t mnMapScalingOfs; // from here on, not edited with MapScaling SfxItemSet* mpLineAttr; SfxItemSet* mpFillAttr; @@ -161,7 +161,7 @@ public: ImpSdrGDIMetaFileImport( SdrModel& rModel, SdrLayerID nLay, - const Rectangle& rRect); + const tools::Rectangle& rRect); ~ImpSdrGDIMetaFileImport(); size_t DoImport( diff --git a/svx/source/svdraw/svdglue.cxx b/svx/source/svdraw/svdglue.cxx index 0b73f7f65897..7563fa3bc57c 100644 --- a/svx/source/svdraw/svdglue.cxx +++ b/svx/source/svdraw/svdglue.cxx @@ -46,8 +46,8 @@ void SdrGluePoint::SetReallyAbsolute(bool bOn, const SdrObject& rObj) Point SdrGluePoint::GetAbsolutePos(const SdrObject& rObj) const { if (bReallyAbsolute) return aPos; - Rectangle aSnap(rObj.GetSnapRect()); - Rectangle aBound(rObj.GetSnapRect()); + tools::Rectangle aSnap(rObj.GetSnapRect()); + tools::Rectangle aBound(rObj.GetSnapRect()); Point aPt(aPos); Point aOfs(aSnap.Center()); @@ -90,7 +90,7 @@ void SdrGluePoint::SetAbsolutePos(const Point& rNewPos, const SdrObject& rObj) aPos=rNewPos; return; } - Rectangle aSnap(rObj.GetSnapRect()); + tools::Rectangle aSnap(rObj.GetSnapRect()); Point aPt(rNewPos); Point aOfs(aSnap.Center()); @@ -258,7 +258,7 @@ void SdrGluePoint::Invalidate(vcl::Window& rWin, const SdrObject* pObj) const rWin.EnableMapMode(false); Size aSiz( aGlueHalfSize ); - Rectangle aRect(aPt.X()-aSiz.Width(),aPt.Y()-aSiz.Height(), + tools::Rectangle aRect(aPt.X()-aSiz.Width(),aPt.Y()-aSiz.Height(), aPt.X()+aSiz.Width(),aPt.Y()+aSiz.Height()); // do not erase background, that causes flicker (!) @@ -271,7 +271,7 @@ bool SdrGluePoint::IsHit(const Point& rPnt, const OutputDevice& rOut, const SdrO { Point aPt(pObj!=nullptr ? GetAbsolutePos(*pObj) : GetPos()); Size aSiz=rOut.PixelToLogic(aGlueHalfSize); - Rectangle aRect(aPt.X()-aSiz.Width(),aPt.Y()-aSiz.Height(),aPt.X()+aSiz.Width(),aPt.Y()+aSiz.Height()); + tools::Rectangle aRect(aPt.X()-aSiz.Width(),aPt.Y()-aSiz.Height(),aPt.X()+aSiz.Width(),aPt.Y()+aSiz.Height()); return aRect.IsInside(rPnt); } diff --git a/svx/source/svdraw/svdhdl.cxx b/svx/source/svdraw/svdhdl.cxx index 174b964f8c59..16a28661adb6 100644 --- a/svx/source/svdraw/svdhdl.cxx +++ b/svx/source/svdraw/svdhdl.cxx @@ -87,7 +87,7 @@ class SdrHdlBitmapSet ::std::vector< BitmapEx > maRealMarkers; // helpers - BitmapEx& impGetOrCreateTargetBitmap(sal_uInt16 nIndex, const Rectangle& rRectangle); + BitmapEx& impGetOrCreateTargetBitmap(sal_uInt16 nIndex, const tools::Rectangle& rRectangle); public: explicit SdrHdlBitmapSet(); @@ -107,7 +107,7 @@ SdrHdlBitmapSet::SdrHdlBitmapSet() { } -BitmapEx& SdrHdlBitmapSet::impGetOrCreateTargetBitmap(sal_uInt16 nIndex, const Rectangle& rRectangle) +BitmapEx& SdrHdlBitmapSet::impGetOrCreateTargetBitmap(sal_uInt16 nIndex, const tools::Rectangle& rRectangle) { BitmapEx& rTargetBitmap = maRealMarkers[nIndex]; @@ -135,17 +135,17 @@ const BitmapEx& SdrHdlBitmapSet::GetBitmapEx(BitmapMarkerKind eKindOfMarker, sal } case BitmapMarkerKind::Rect_9x9: { - return impGetOrCreateTargetBitmap((1 * INDEX_COUNT) + nInd, Rectangle(Point(7, nYPos), Size(9, 9))); + return impGetOrCreateTargetBitmap((1 * INDEX_COUNT) + nInd, tools::Rectangle(Point(7, nYPos), Size(9, 9))); } case BitmapMarkerKind::Rect_7x7: { - return impGetOrCreateTargetBitmap((0 * INDEX_COUNT) + nInd, Rectangle(Point(0, nYPos), Size(7, 7))); + return impGetOrCreateTargetBitmap((0 * INDEX_COUNT) + nInd, tools::Rectangle(Point(0, nYPos), Size(7, 7))); } case BitmapMarkerKind::Rect_11x11: { - return impGetOrCreateTargetBitmap((2 * INDEX_COUNT) + nInd, Rectangle(Point(16, nYPos), Size(11, 11))); + return impGetOrCreateTargetBitmap((2 * INDEX_COUNT) + nInd, tools::Rectangle(Point(16, nYPos), Size(11, 11))); } case BitmapMarkerKind::Rect_13x13: @@ -156,27 +156,27 @@ const BitmapEx& SdrHdlBitmapSet::GetBitmapEx(BitmapMarkerKind eKindOfMarker, sal { case 0: { - return impGetOrCreateTargetBitmap(nIndex, Rectangle(Point(72, 66), Size(13, 13))); + return impGetOrCreateTargetBitmap(nIndex, tools::Rectangle(Point(72, 66), Size(13, 13))); } case 1: { - return impGetOrCreateTargetBitmap(nIndex, Rectangle(Point(85, 66), Size(13, 13))); + return impGetOrCreateTargetBitmap(nIndex, tools::Rectangle(Point(85, 66), Size(13, 13))); } case 2: { - return impGetOrCreateTargetBitmap(nIndex, Rectangle(Point(72, 79), Size(13, 13))); + return impGetOrCreateTargetBitmap(nIndex, tools::Rectangle(Point(72, 79), Size(13, 13))); } case 3: { - return impGetOrCreateTargetBitmap(nIndex, Rectangle(Point(85, 79), Size(13, 13))); + return impGetOrCreateTargetBitmap(nIndex, tools::Rectangle(Point(85, 79), Size(13, 13))); } case 4: { - return impGetOrCreateTargetBitmap(nIndex, Rectangle(Point(98, 79), Size(13, 13))); + return impGetOrCreateTargetBitmap(nIndex, tools::Rectangle(Point(98, 79), Size(13, 13))); } default: // case 5: { - return impGetOrCreateTargetBitmap(nIndex, Rectangle(Point(98, 66), Size(13, 13))); + return impGetOrCreateTargetBitmap(nIndex, tools::Rectangle(Point(98, 66), Size(13, 13))); } } } @@ -184,82 +184,82 @@ const BitmapEx& SdrHdlBitmapSet::GetBitmapEx(BitmapMarkerKind eKindOfMarker, sal case BitmapMarkerKind::Circ_7x7: case BitmapMarkerKind::Customshape_7x7: { - return impGetOrCreateTargetBitmap((4 * INDEX_COUNT) + nInd, Rectangle(Point(27, nYPos), Size(7, 7))); + return impGetOrCreateTargetBitmap((4 * INDEX_COUNT) + nInd, tools::Rectangle(Point(27, nYPos), Size(7, 7))); } case BitmapMarkerKind::Circ_9x9: case BitmapMarkerKind::Customshape_9x9: { - return impGetOrCreateTargetBitmap((5 * INDEX_COUNT) + nInd, Rectangle(Point(34, nYPos), Size(9, 9))); + return impGetOrCreateTargetBitmap((5 * INDEX_COUNT) + nInd, tools::Rectangle(Point(34, nYPos), Size(9, 9))); } case BitmapMarkerKind::Circ_11x11: case BitmapMarkerKind::Customshape_11x11: { - return impGetOrCreateTargetBitmap((6 * INDEX_COUNT) + nInd, Rectangle(Point(43, nYPos), Size(11, 11))); + return impGetOrCreateTargetBitmap((6 * INDEX_COUNT) + nInd, tools::Rectangle(Point(43, nYPos), Size(11, 11))); } case BitmapMarkerKind::Elli_7x9: { - return impGetOrCreateTargetBitmap((7 * INDEX_COUNT) + nInd, Rectangle(Point(54, nYPos), Size(7, 9))); + return impGetOrCreateTargetBitmap((7 * INDEX_COUNT) + nInd, tools::Rectangle(Point(54, nYPos), Size(7, 9))); } case BitmapMarkerKind::Elli_9x11: { - return impGetOrCreateTargetBitmap((8 * INDEX_COUNT) + nInd, Rectangle(Point(61, nYPos), Size(9, 11))); + return impGetOrCreateTargetBitmap((8 * INDEX_COUNT) + nInd, tools::Rectangle(Point(61, nYPos), Size(9, 11))); } case BitmapMarkerKind::Elli_9x7: { - return impGetOrCreateTargetBitmap((9 * INDEX_COUNT) + nInd, Rectangle(Point(70, nYPos), Size(9, 7))); + return impGetOrCreateTargetBitmap((9 * INDEX_COUNT) + nInd, tools::Rectangle(Point(70, nYPos), Size(9, 7))); } case BitmapMarkerKind::Elli_11x9: { - return impGetOrCreateTargetBitmap((10 * INDEX_COUNT) + nInd, Rectangle(Point(79, nYPos), Size(11, 9))); + return impGetOrCreateTargetBitmap((10 * INDEX_COUNT) + nInd, tools::Rectangle(Point(79, nYPos), Size(11, 9))); } case BitmapMarkerKind::RectPlus_7x7: { - return impGetOrCreateTargetBitmap((11 * INDEX_COUNT) + nInd, Rectangle(Point(90, nYPos), Size(7, 7))); + return impGetOrCreateTargetBitmap((11 * INDEX_COUNT) + nInd, tools::Rectangle(Point(90, nYPos), Size(7, 7))); } case BitmapMarkerKind::RectPlus_9x9: { - return impGetOrCreateTargetBitmap((12 * INDEX_COUNT) + nInd, Rectangle(Point(97, nYPos), Size(9, 9))); + return impGetOrCreateTargetBitmap((12 * INDEX_COUNT) + nInd, tools::Rectangle(Point(97, nYPos), Size(9, 9))); } case BitmapMarkerKind::RectPlus_11x11: { - return impGetOrCreateTargetBitmap((13 * INDEX_COUNT) + nInd, Rectangle(Point(106, nYPos), Size(11, 11))); + return impGetOrCreateTargetBitmap((13 * INDEX_COUNT) + nInd, tools::Rectangle(Point(106, nYPos), Size(11, 11))); } case BitmapMarkerKind::Crosshair: { - return impGetOrCreateTargetBitmap((KIND_COUNT * INDEX_COUNT) + 0, Rectangle(Point(0, 68), Size(15, 15))); + return impGetOrCreateTargetBitmap((KIND_COUNT * INDEX_COUNT) + 0, tools::Rectangle(Point(0, 68), Size(15, 15))); } case BitmapMarkerKind::Glue: { - return impGetOrCreateTargetBitmap((KIND_COUNT * INDEX_COUNT) + 1, Rectangle(Point(15, 76), Size(9, 9))); + return impGetOrCreateTargetBitmap((KIND_COUNT * INDEX_COUNT) + 1, tools::Rectangle(Point(15, 76), Size(9, 9))); } case BitmapMarkerKind::Glue_Deselected: { - return impGetOrCreateTargetBitmap((KIND_COUNT * INDEX_COUNT) + 2, Rectangle(Point(15, 67), Size(9, 9))); + return impGetOrCreateTargetBitmap((KIND_COUNT * INDEX_COUNT) + 2, tools::Rectangle(Point(15, 67), Size(9, 9))); } case BitmapMarkerKind::Anchor: // AnchorTR for SW case BitmapMarkerKind::AnchorTR: { - return impGetOrCreateTargetBitmap((KIND_COUNT * INDEX_COUNT) + 3, Rectangle(Point(24, 67), Size(24, 24))); + return impGetOrCreateTargetBitmap((KIND_COUNT * INDEX_COUNT) + 3, tools::Rectangle(Point(24, 67), Size(24, 24))); } // add AnchorPressed to be able to animate anchor control case BitmapMarkerKind::AnchorPressed: case BitmapMarkerKind::AnchorPressedTR: { - return impGetOrCreateTargetBitmap((KIND_COUNT * INDEX_COUNT) + 4, Rectangle(Point(48, 67), Size(24, 24))); + return impGetOrCreateTargetBitmap((KIND_COUNT * INDEX_COUNT) + 4, tools::Rectangle(Point(48, 67), Size(24, 24))); } } } @@ -1760,7 +1760,7 @@ Pointer ImpMeasureHdl::GetPointer() const } -ImpTextframeHdl::ImpTextframeHdl(const Rectangle& rRect) : +ImpTextframeHdl::ImpTextframeHdl(const tools::Rectangle& rRect) : SdrHdl(rRect.TopLeft(),SdrHdlKind::Move), maRect(rRect) { @@ -2349,7 +2349,7 @@ BitmapEx SdrCropHdl::GetBitmapForHandle( const BitmapEx& rBitmap, int nSize ) default: break; } - Rectangle aSourceRect( Point( nX * (nPixelSize) + nOffset, nY * (nPixelSize)), Size(nPixelSize, nPixelSize) ); + tools::Rectangle aSourceRect( Point( nX * (nPixelSize) + nOffset, nY * (nPixelSize)), Size(nPixelSize, nPixelSize) ); BitmapEx aRetval(rBitmap); aRetval.Crop(aSourceRect); diff --git a/svx/source/svdraw/svdhlpln.cxx b/svx/source/svdraw/svdhlpln.cxx index 73bf9c148b09..622ae221b78d 100644 --- a/svx/source/svdraw/svdhlpln.cxx +++ b/svx/source/svdraw/svdhlpln.cxx @@ -54,9 +54,9 @@ bool SdrHelpLine::IsHit(const Point& rPnt, sal_uInt16 nTolLog, const OutputDevic return false; } -Rectangle SdrHelpLine::GetBoundRect(const OutputDevice& rOut) const +tools::Rectangle SdrHelpLine::GetBoundRect(const OutputDevice& rOut) const { - Rectangle aRet(aPos,aPos); + tools::Rectangle aRet(aPos,aPos); Point aOfs(rOut.GetMapMode().GetOrigin()); Size aSiz(rOut.GetOutputSize()); switch (eKind) { diff --git a/svx/source/svdraw/svdibrow.cxx b/svx/source/svdraw/svdibrow.cxx index 41407b648f61..97100753fee4 100644 --- a/svx/source/svdraw/svdibrow.cxx +++ b/svx/source/svdraw/svdibrow.cxx @@ -340,12 +340,12 @@ OUString SdrItemBrowserControl::GetCellText(long _nRow, sal_uInt16 _nColId) cons return sRet; } -void SdrItemBrowserControl::PaintField(OutputDevice& rDev, const Rectangle& rRect, sal_uInt16 nColumnId) const +void SdrItemBrowserControl::PaintField(OutputDevice& rDev, const tools::Rectangle& rRect, sal_uInt16 nColumnId) const { if (nAktPaintRow<0 || static_cast<std::size_t>(nAktPaintRow)>=aList.size()) { return; } - Rectangle aR(rRect); + tools::Rectangle aR(rRect); aR.Bottom()++; ImpItemListRow* pEntry=ImpGetEntry(nAktPaintRow); if (pEntry->bComment) @@ -429,10 +429,10 @@ void SdrItemBrowserControl::SetDirty() aSetDirtyHdl.Call(*this); } -Rectangle SdrItemBrowserControl::GetFieldCharacterBounds(sal_Int32 /*_nRow*/,sal_Int32 /*_nColumnPos*/,sal_Int32 /*nIndex*/) +tools::Rectangle SdrItemBrowserControl::GetFieldCharacterBounds(sal_Int32 /*_nRow*/,sal_Int32 /*_nColumnPos*/,sal_Int32 /*nIndex*/) { // no accessibility implementation required - return Rectangle(); + return tools::Rectangle(); } sal_Int32 SdrItemBrowserControl::GetFieldIndexAtPoint(sal_Int32 /*_nRow*/,sal_Int32 /*_nColumnPos*/,const Point& /*_rPoint*/) @@ -496,7 +496,7 @@ bool SdrItemBrowserControl::BeginChangeEntry(std::size_t nPos) if (pEntry!=nullptr && !pEntry->bComment) { SetMode(MYBROWSEMODE & BrowserMode(~BrowserMode::KEEPHIGHLIGHT)); pEditControl=VclPtr<ImpItemEdit>::Create(&GetDataWindow(),this,0); - Rectangle aRect(GetFieldRectPixel(nPos, ITEMBROWSER_VALUECOL_ID, false)); + tools::Rectangle aRect(GetFieldRectPixel(nPos, ITEMBROWSER_VALUECOL_ID, false)); aRect.Left()+=2; // little offset for the Edit, so it's exact to the pixel aRect.Right()--; pEditControl->SetPosSizePixel(aRect.TopLeft(),aRect.GetSize()); diff --git a/svx/source/svdraw/svdmark.cxx b/svx/source/svdraw/svdmark.cxx index 7a76fd4d1401..7c4747ab0684 100644 --- a/svx/source/svdraw/svdmark.cxx +++ b/svx/source/svdraw/svdmark.cxx @@ -603,10 +603,10 @@ const OUString& SdrMarkList::GetPointMarkDescription(bool bGlue) const return rName; } -bool SdrMarkList::TakeBoundRect(SdrPageView* pPV, Rectangle& rRect) const +bool SdrMarkList::TakeBoundRect(SdrPageView* pPV, tools::Rectangle& rRect) const { bool bFnd(false); - Rectangle aR; + tools::Rectangle aR; for(size_t i = 0; i < GetMarkCount(); ++i) { @@ -634,7 +634,7 @@ bool SdrMarkList::TakeBoundRect(SdrPageView* pPV, Rectangle& rRect) const return bFnd; } -bool SdrMarkList::TakeSnapRect(SdrPageView* pPV, Rectangle& rRect) const +bool SdrMarkList::TakeSnapRect(SdrPageView* pPV, tools::Rectangle& rRect) const { bool bFnd(false); @@ -646,7 +646,7 @@ bool SdrMarkList::TakeSnapRect(SdrPageView* pPV, Rectangle& rRect) const { if(pMark->GetMarkedSdrObj()) { - Rectangle aR(pMark->GetMarkedSdrObj()->GetSnapRect()); + tools::Rectangle aR(pMark->GetMarkedSdrObj()->GetSnapRect()); if(bFnd) { diff --git a/svx/source/svdraw/svdmrkv.cxx b/svx/source/svdraw/svdmrkv.cxx index 4d97d6613cb9..5d007aff7966 100644 --- a/svx/source/svdraw/svdmrkv.cxx +++ b/svx/source/svdraw/svdmrkv.cxx @@ -204,7 +204,7 @@ void SdrMarkView::ModelHasChanged() if (comphelper::LibreOfficeKit::isActive() && GetMarkedObjectCount() > 0) { //TODO: Is MarkedObjRect valid at this point? - Rectangle aSelection(GetMarkedObjRect()); + tools::Rectangle aSelection(GetMarkedObjRect()); OString sSelection; if (aSelection.IsEmpty()) sSelection = "EMPTY"; @@ -286,11 +286,11 @@ void SdrMarkView::BrkAction() BrkMarkGluePoints(); } -void SdrMarkView::TakeActionRect(Rectangle& rRect) const +void SdrMarkView::TakeActionRect(tools::Rectangle& rRect) const { if(IsMarkObj() || IsMarkPoints() || IsMarkGluePoints()) { - rRect = Rectangle(maDragStat.GetStart(), maDragStat.GetNow()); + rRect = tools::Rectangle(maDragStat.GetStart(), maDragStat.GetNow()); } else { @@ -363,7 +363,7 @@ bool SdrMarkView::EndMarkObj() { if(maDragStat.IsMinMoved()) { - Rectangle aRect(maDragStat.GetStart(), maDragStat.GetNow()); + tools::Rectangle aRect(maDragStat.GetStart(), maDragStat.GetNow()); aRect.Justify(); MarkObj(aRect, mpMarkObjOverlay->IsUnmarking()); bRetval = true; @@ -427,7 +427,7 @@ bool SdrMarkView::EndMarkPoints() { if(maDragStat.IsMinMoved()) { - Rectangle aRect(maDragStat.GetStart(), maDragStat.GetNow()); + tools::Rectangle aRect(maDragStat.GetStart(), maDragStat.GetNow()); aRect.Justify(); MarkPoints(&aRect, mpMarkPointsOverlay->IsUnmarking()); @@ -490,7 +490,7 @@ void SdrMarkView::EndMarkGluePoints() { if(maDragStat.IsMinMoved()) { - Rectangle aRect(maDragStat.GetStart(),maDragStat.GetNow()); + tools::Rectangle aRect(maDragStat.GetStart(),maDragStat.GetNow()); aRect.Justify(); MarkGluePoints(&aRect, mpMarkGluePointsOverlay->IsUnmarking()); } @@ -734,11 +734,11 @@ void SdrMarkView::SetMarkHandles(SfxViewShell* pOtherShell) } } - Rectangle aRect(GetMarkedObjRect()); + tools::Rectangle aRect(GetMarkedObjRect()); if (bTiledRendering) { - Rectangle aSelection(aRect); + tools::Rectangle aSelection(aRect); OString sSelection; if (aSelection.IsEmpty()) sSelection = "EMPTY"; @@ -1152,7 +1152,7 @@ void SdrMarkView::ForceRefToMarked() { case SdrDragMode::Rotate: { - Rectangle aR(GetMarkedObjRect()); + tools::Rectangle aR(GetMarkedObjRect()); maRef1 = aR.Center(); break; @@ -1192,7 +1192,7 @@ void SdrMarkView::ForceRefToMarked() if (nTemp>nMinLen) nMinLen=nTemp; } - Rectangle aR(GetMarkedObjBoundRect()); + tools::Rectangle aR(GetMarkedObjBoundRect()); Point aCenter(aR.Center()); long nMarkHgt=aR.GetHeight()-1; long nHgt=nMarkHgt+nObjDst*2; // 20 pixels overlapping above and below @@ -1226,7 +1226,7 @@ void SdrMarkView::ForceRefToMarked() case SdrDragMode::Gradient: case SdrDragMode::Crop: { - Rectangle aRect(GetMarkedObjBoundRect()); + tools::Rectangle aRect(GetMarkedObjBoundRect()); maRef1 = aRect.TopLeft(); maRef2 = aRect.BottomRight(); break; @@ -1540,10 +1540,10 @@ bool SdrMarkView::MarkNextObj(const Point& rPnt, short nTol, bool bPrev) return pFndObj!=nullptr; } -void SdrMarkView::MarkObj(const Rectangle& rRect, bool bUnmark) +void SdrMarkView::MarkObj(const tools::Rectangle& rRect, bool bUnmark) { bool bFnd=false; - Rectangle aR(rRect); + tools::Rectangle aR(rRect); SdrObjList* pObjList; BrkAction(); SdrPageView* pPV = GetSdrPageView(); @@ -1551,11 +1551,11 @@ void SdrMarkView::MarkObj(const Rectangle& rRect, bool bUnmark) if(pPV) { pObjList=pPV->GetObjList(); - Rectangle aFrm1(aR); + tools::Rectangle aFrm1(aR); const size_t nObjCount = pObjList->GetObjCount(); for (size_t nO=0; nO<nObjCount; ++nO) { SdrObject* pObj=pObjList->GetObj(nO); - Rectangle aRect(pObj->GetCurrentBoundRect()); + tools::Rectangle aRect(pObj->GetCurrentBoundRect()); if (aFrm1.IsInside(aRect)) { if (!bUnmark) { if (IsObjMarkable(pObj,pPV)) @@ -1635,7 +1635,7 @@ SdrObject* SdrMarkView::CheckSingleSdrObjectHit(const Point& rPnt, sal_uInt16 nT const bool bOLE(dynamic_cast< const SdrOle2Obj* >(pObj) != nullptr); const bool bTXT(dynamic_cast<const SdrTextObj*>( pObj) != nullptr && static_cast<SdrTextObj*>(pObj)->IsTextFrame()); SdrObject* pRet=nullptr; - Rectangle aRect(pObj->GetCurrentBoundRect()); + tools::Rectangle aRect(pObj->GetCurrentBoundRect()); // hack for calc grid sync aRect += pObj->GetGridOffset(); sal_uInt16 nTol2(nTol); @@ -1889,7 +1889,7 @@ bool SdrMarkView::PickMarkedObj(const Point& rPnt, SdrObject*& rpObj, SdrPageVie SdrMark* pM=GetSdrMarkByIndex(nMarkNum); SdrPageView* pPV=pM->GetPageView(); SdrObject* pObj=pM->GetMarkedSdrObj(); - Rectangle aRect(pObj->GetCurrentBoundRect()); + tools::Rectangle aRect(pObj->GetCurrentBoundRect()); aRect.Left ()-=nTol; aRect.Top ()-=nTol; aRect.Right ()+=nTol; @@ -1974,13 +1974,13 @@ void SdrMarkView::AdjustMarkHdl(SfxViewShell* pOtherShell) SetMarkHandles(pOtherShell); } -Rectangle SdrMarkView::GetMarkedObjBoundRect() const +tools::Rectangle SdrMarkView::GetMarkedObjBoundRect() const { - Rectangle aRect; + tools::Rectangle aRect; for (size_t nm=0; nm<GetMarkedObjectCount(); ++nm) { SdrMark* pM=GetSdrMarkByIndex(nm); SdrObject* pO=pM->GetMarkedSdrObj(); - Rectangle aR1(pO->GetCurrentBoundRect()); + tools::Rectangle aR1(pO->GetCurrentBoundRect()); // Ensure marked area includes the calc offset // ( if applicable ) to sync to grid aR1 += pO->GetGridOffset(); @@ -1996,23 +1996,23 @@ Point SdrMarkView::GetGridOffset() const // calculate the area occupied by the union of each marked object // ( synced to grid ) and compare to the same unsynced area to calculate // the offset. Hopefully that's the sensible thing to do - const Rectangle& aGroupSyncedRect = GetMarkedObjRect(); + const tools::Rectangle& aGroupSyncedRect = GetMarkedObjRect(); aOffset = aGroupSyncedRect.TopLeft() - maMarkedObjRectNoOffset.TopLeft(); return aOffset; } -const Rectangle& SdrMarkView::GetMarkedObjRect() const +const tools::Rectangle& SdrMarkView::GetMarkedObjRect() const { if (mbMarkedObjRectDirty) { const_cast<SdrMarkView*>(this)->mbMarkedObjRectDirty=false; - Rectangle aRect; - Rectangle aRect2; + tools::Rectangle aRect; + tools::Rectangle aRect2; for (size_t nm=0; nm<GetMarkedObjectCount(); ++nm) { SdrMark* pM=GetSdrMarkByIndex(nm); SdrObject* pO = pM->GetMarkedSdrObj(); if (!pO) continue; - Rectangle aR1(pO->GetSnapRect()); + tools::Rectangle aR1(pO->GetSnapRect()); // apply calc offset to marked object rect // ( necessary for handles to be displayed in // correct position ) diff --git a/svx/source/svdraw/svdmrkv1.cxx b/svx/source/svdraw/svdmrkv1.cxx index cd833e7e293e..8f5d5ca41359 100644 --- a/svx/source/svdraw/svdmrkv1.cxx +++ b/svx/source/svdraw/svdmrkv1.cxx @@ -206,7 +206,7 @@ bool SdrMarkView::MarkPoint(SdrHdl& rHdl, bool bUnmark) return bRet; } -bool SdrMarkView::MarkPoints(const Rectangle* pRect, bool bUnmark) +bool SdrMarkView::MarkPoints(const tools::Rectangle* pRect, bool bUnmark) { ForceUndirtyMrkPnt(); bool bChgd=false; @@ -257,7 +257,7 @@ bool SdrMarkView::MarkNextPoint(const Point& /*rPnt*/, bool /*bPrev*/) return false; } -const Rectangle& SdrMarkView::GetMarkedPointsRect() const +const tools::Rectangle& SdrMarkView::GetMarkedPointsRect() const { ForceUndirtyMrkPnt(); if (mbMarkedPointsRectsDirty) ImpSetPointsRects(); @@ -280,17 +280,17 @@ void SdrMarkView::SetPlusHandlesAlwaysVisible(bool bOn) void SdrMarkView::ImpSetPointsRects() const { - Rectangle aPnts; - Rectangle aGlue; + tools::Rectangle aPnts; + tools::Rectangle aGlue; const size_t nHdlAnz=maHdlList.GetHdlCount(); for (size_t nHdlNum=0; nHdlNum<nHdlAnz; ++nHdlNum) { const SdrHdl* pHdl=maHdlList.GetHdl(nHdlNum); SdrHdlKind eKind=pHdl->GetKind(); if ((eKind==SdrHdlKind::Poly && pHdl->IsSelected()) || eKind==SdrHdlKind::Glue) { Point aPt(pHdl->GetPos()); - Rectangle& rR=eKind==SdrHdlKind::Glue ? aGlue : aPnts; + tools::Rectangle& rR=eKind==SdrHdlKind::Glue ? aGlue : aPnts; if (rR.IsEmpty()) { - rR=Rectangle(aPt,aPt); + rR=tools::Rectangle(aPt,aPt); } else { if (aPt.X()<rR.Left ()) rR.Left ()=aPt.X(); if (aPt.X()>rR.Right ()) rR.Right ()=aPt.X(); @@ -412,7 +412,7 @@ bool SdrMarkView::HasMarkedGluePoints() const return bRet; } -bool SdrMarkView::MarkGluePoints(const Rectangle* pRect, bool bUnmark) +bool SdrMarkView::MarkGluePoints(const tools::Rectangle* pRect, bool bUnmark) { if (!IsGluePointEditMode() && !bUnmark) return false; ForceUndirtyMrkPnt(); @@ -561,7 +561,7 @@ bool SdrMarkView::MarkNextGluePoint(const Point& /*rPnt*/, bool /*bPrev*/) return false; } -const Rectangle& SdrMarkView::GetMarkedGluePointsRect() const +const tools::Rectangle& SdrMarkView::GetMarkedGluePointsRect() const { ForceUndirtyMrkPnt(); if (mbMarkedPointsRectsDirty) ImpSetPointsRects(); diff --git a/svx/source/svdraw/svdoashp.cxx b/svx/source/svdraw/svdoashp.cxx index f01c49107472..f0577a8b239e 100644 --- a/svx/source/svdraw/svdoashp.cxx +++ b/svx/source/svdraw/svdoashp.cxx @@ -562,7 +562,7 @@ double SdrObjCustomShape::GetExtraTextRotation( const bool bPreRotation ) const return fExtraTextRotateAngle; } -bool SdrObjCustomShape::GetTextBounds( Rectangle& rTextBound ) const +bool SdrObjCustomShape::GetTextBounds( tools::Rectangle& rTextBound ) const { bool bRet = false; @@ -572,7 +572,7 @@ bool SdrObjCustomShape::GetTextBounds( Rectangle& rTextBound ) const awt::Rectangle aR( xCustomShapeEngine->getTextBounds() ); if ( aR.Width > 1 && aR.Height > 1 ) { - rTextBound = Rectangle( Point( aR.X, aR.Y ), Size( aR.Width, aR.Height ) ); + rTextBound = tools::Rectangle( Point( aR.X, aR.Y ), Size( aR.Width, aR.Height ) ); bRet = true; } } @@ -1407,7 +1407,7 @@ void SdrObjCustomShape::AdaptTextMinSize() else { // recreate from CustomShape-specific TextBounds - Rectangle aTextBound(maRect); + tools::Rectangle aTextBound(maRect); if(GetTextBounds(aTextBound)) { @@ -1427,7 +1427,7 @@ void SdrObjCustomShape::AdaptTextMinSize() } } -void SdrObjCustomShape::NbcSetSnapRect( const Rectangle& rRect ) +void SdrObjCustomShape::NbcSetSnapRect( const tools::Rectangle& rRect ) { maRect = rRect; ImpJustifyRect(maRect); @@ -1440,9 +1440,9 @@ void SdrObjCustomShape::NbcSetSnapRect( const Rectangle& rRect ) SetChanged(); } -void SdrObjCustomShape::SetSnapRect( const Rectangle& rRect ) +void SdrObjCustomShape::SetSnapRect( const tools::Rectangle& rRect ) { - Rectangle aBoundRect0; + tools::Rectangle aBoundRect0; if ( pUserCall ) aBoundRect0 = GetLastBoundRect(); NbcSetSnapRect( rRect ); @@ -1450,7 +1450,7 @@ void SdrObjCustomShape::SetSnapRect( const Rectangle& rRect ) SendUserCall(SdrUserCallType::Resize,aBoundRect0); } -void SdrObjCustomShape::NbcSetLogicRect( const Rectangle& rRect ) +void SdrObjCustomShape::NbcSetLogicRect( const tools::Rectangle& rRect ) { maRect = rRect; ImpJustifyRect(maRect); @@ -1462,9 +1462,9 @@ void SdrObjCustomShape::NbcSetLogicRect( const Rectangle& rRect ) SetChanged(); } -void SdrObjCustomShape::SetLogicRect( const Rectangle& rRect ) +void SdrObjCustomShape::SetLogicRect( const tools::Rectangle& rRect ) { - Rectangle aBoundRect0; + tools::Rectangle aBoundRect0; if ( pUserCall ) aBoundRect0 = GetLastBoundRect(); NbcSetLogicRect(rRect); @@ -1476,7 +1476,7 @@ void SdrObjCustomShape::Move( const Size& rSiz ) { if ( rSiz.Width() || rSiz.Height() ) { - Rectangle aBoundRect0; + tools::Rectangle aBoundRect0; if ( pUserCall ) aBoundRect0 = GetLastBoundRect(); NbcMove(rSiz); @@ -1510,7 +1510,7 @@ void SdrObjCustomShape::NbcMove( const Size& rSiz ) void SdrObjCustomShape::NbcResize( const Point& rRef, const Fraction& rxFact, const Fraction& ryFact ) { // taking care of handles that should not been changed - Rectangle aOld( maRect ); + tools::Rectangle aOld( maRect ); std::vector< SdrCustomShapeInteraction > aInteractionHandles( GetInteractionHandles() ); SdrTextObj::NbcResize( rRef, rxFact, ryFact ); @@ -1750,7 +1750,7 @@ void SdrObjCustomShape::ImpCheckCustomGluePointsAreAdded() if ( aGeo.nRotationAngle ) aPoly.Rotate( maRect.Center(), aGeo.nRotationAngle / 10 ); - Rectangle aBoundRect( aPoly.GetBoundRect() ); + tools::Rectangle aBoundRect( aPoly.GetBoundRect() ); sal_Int32 nXDiff = aBoundRect.Left() - maRect.Left(); sal_Int32 nYDiff = aBoundRect.Top() - maRect.Top(); @@ -1907,13 +1907,13 @@ bool SdrObjCustomShape::beginSpecialDrag(SdrDragStat& rDrag) const return true; } -void SdrObjCustomShape::DragResizeCustomShape( const Rectangle& rNewRect ) +void SdrObjCustomShape::DragResizeCustomShape( const tools::Rectangle& rNewRect ) { - Rectangle aOld( maRect ); + tools::Rectangle aOld( maRect ); bool bOldMirroredX( IsMirroredX() ); bool bOldMirroredY( IsMirroredY() ); - Rectangle aNewRect( rNewRect ); + tools::Rectangle aNewRect( rNewRect ); aNewRect.Justify(); std::vector< SdrCustomShapeInteraction > aInteractionHandles( GetInteractionHandles() ); @@ -2087,7 +2087,7 @@ bool SdrObjCustomShape::applySpecialDrag(SdrDragStat& rDrag) void SdrObjCustomShape::DragCreateObject( SdrDragStat& rStat ) { - Rectangle aRect1; + tools::Rectangle aRect1; rStat.TakeCreateRect( aRect1 ); std::vector< SdrCustomShapeInteraction > aInteractionHandles( GetInteractionHandles() ); @@ -2099,7 +2099,7 @@ void SdrObjCustomShape::DragCreateObject( SdrDragStat& rStat ) { SetMirroredX( aRect1.Left() > aRect1.Right() ); - aRect1 = Rectangle( rStat.GetNow(), Size( nDefaultObjectSizeWidth, nDefaultObjectSizeHeight ) ); + aRect1 = tools::Rectangle( rStat.GetNow(), Size( nDefaultObjectSizeWidth, nDefaultObjectSizeHeight ) ); // subtracting the horizontal difference of the latest handle from shape position if ( !aInteractionHandles.empty() ) { @@ -2200,7 +2200,7 @@ void SdrObjCustomShape::SetVerticalWriting( bool bVertical ) SdrTextVertAdjust eVert = static_cast<const SdrTextVertAdjustItem&>(rSet.Get(SDRATTR_TEXT_VERTADJUST)).GetValue(); // rescue object size - Rectangle aObjectRect = GetSnapRect(); + tools::Rectangle aObjectRect = GetSnapRect(); // prepare ItemSet to set exchanged width and height items SfxItemSet aNewSet(*rSet.GetPool(), @@ -2244,7 +2244,7 @@ void SdrObjCustomShape::SuggestTextFrameSize(Size aSuggestedTextFrameSize) m_aSuggestedTextFrameSize = aSuggestedTextFrameSize; } -bool SdrObjCustomShape::AdjustTextFrameWidthAndHeight(Rectangle& rR, bool bHgt, bool bWdt) const +bool SdrObjCustomShape::AdjustTextFrameWidthAndHeight(tools::Rectangle& rR, bool bHgt, bool bWdt) const { // Either we have text or the application has native text and suggested its size to us. bool bHasText = HasText() || (m_aSuggestedTextFrameSize.Width() != 0 && m_aSuggestedTextFrameSize.Height() != 0); @@ -2254,7 +2254,7 @@ bool SdrObjCustomShape::AdjustTextFrameWidthAndHeight(Rectangle& rR, bool bHgt, bool bHgtGrow=bHgt && IsAutoGrowHeight(); if ( bWdtGrow || bHgtGrow ) { - Rectangle aR0(rR); + tools::Rectangle aR0(rR); long nHgt=0,nMinHgt=0,nMaxHgt=0; long nWdt=0,nMinWdt=0,nMaxWdt=0; Size aSiz(rR.GetSize()); aSiz.Width()--; aSiz.Height()--; @@ -2397,16 +2397,16 @@ bool SdrObjCustomShape::AdjustTextFrameWidthAndHeight(Rectangle& rR, bool bHgt, return false; } -Rectangle SdrObjCustomShape::ImpCalculateTextFrame( const bool bHgt, const bool bWdt ) +tools::Rectangle SdrObjCustomShape::ImpCalculateTextFrame( const bool bHgt, const bool bWdt ) { - Rectangle aReturnValue; + tools::Rectangle aReturnValue; - Rectangle aOldTextRect( maRect ); // <- initial text rectangle + tools::Rectangle aOldTextRect( maRect ); // <- initial text rectangle - Rectangle aNewTextRect( maRect ); // <- new text rectangle returned from the custom shape renderer, + tools::Rectangle aNewTextRect( maRect ); // <- new text rectangle returned from the custom shape renderer, GetTextBounds( aNewTextRect ); // it depends to the current logical shape size - Rectangle aAdjustedTextRect( aNewTextRect ); // <- new text rectangle is being tested by AdjustTextFrameWidthAndHeight to ensure + tools::Rectangle aAdjustedTextRect( aNewTextRect ); // <- new text rectangle is being tested by AdjustTextFrameWidthAndHeight to ensure if ( AdjustTextFrameWidthAndHeight( aAdjustedTextRect, bHgt, bWdt ) ) // that the new text rectangle is matching the current text size from the outliner { if (aAdjustedTextRect != aNewTextRect && aOldTextRect != aAdjustedTextRect && @@ -2430,7 +2430,7 @@ Rectangle SdrObjCustomShape::ImpCalculateTextFrame( const bool bHgt, const bool bool SdrObjCustomShape::NbcAdjustTextFrameWidthAndHeight(bool bHgt, bool bWdt) { - Rectangle aNewTextRect = ImpCalculateTextFrame(bHgt, bWdt); + tools::Rectangle aNewTextRect = ImpCalculateTextFrame(bHgt, bWdt); const bool bRet = !aNewTextRect.IsEmpty() && aNewTextRect != maRect; if (bRet && !mbAdjustingTextFrameWidthAndHeight) { @@ -2464,11 +2464,11 @@ bool SdrObjCustomShape::NbcAdjustTextFrameWidthAndHeight(bool bHgt, bool bWdt) bool SdrObjCustomShape::AdjustTextFrameWidthAndHeight() { - Rectangle aNewTextRect = ImpCalculateTextFrame( true/*bHgt*/, true/*bWdt*/ ); + tools::Rectangle aNewTextRect = ImpCalculateTextFrame( true/*bHgt*/, true/*bWdt*/ ); bool bRet = !aNewTextRect.IsEmpty() && ( aNewTextRect != maRect ); if ( bRet ) { - Rectangle aBoundRect0; + tools::Rectangle aBoundRect0; if ( pUserCall ) aBoundRect0 = GetCurrentBoundRect(); @@ -2498,10 +2498,10 @@ bool SdrObjCustomShape::AdjustTextFrameWidthAndHeight() } return bRet; } -void SdrObjCustomShape::TakeTextEditArea(Size* pPaperMin, Size* pPaperMax, Rectangle* pViewInit, Rectangle* pViewMin) const +void SdrObjCustomShape::TakeTextEditArea(Size* pPaperMin, Size* pPaperMax, tools::Rectangle* pViewInit, tools::Rectangle* pViewMin) const { Size aPaperMin,aPaperMax; - Rectangle aViewInit; + tools::Rectangle aViewInit; TakeTextAnchorRect( aViewInit ); if ( aGeo.nRotationAngle ) { @@ -2593,7 +2593,7 @@ void SdrObjCustomShape::EndTextEdit( SdrOutliner& rOutl ) SdrTextObj::EndTextEdit( rOutl ); InvalidateRenderGeometry(); } -void SdrObjCustomShape::TakeTextAnchorRect( Rectangle& rAnchorRect ) const +void SdrObjCustomShape::TakeTextAnchorRect( tools::Rectangle& rAnchorRect ) const { if ( GetTextBounds( rAnchorRect ) ) { @@ -2618,10 +2618,10 @@ void SdrObjCustomShape::TakeTextAnchorRect( Rectangle& rAnchorRect ) const else SdrTextObj::TakeTextAnchorRect( rAnchorRect ); } -void SdrObjCustomShape::TakeTextRect( SdrOutliner& rOutliner, Rectangle& rTextRect, bool bNoEditText, - Rectangle* pAnchorRect, bool /*bLineWidth*/) const +void SdrObjCustomShape::TakeTextRect( SdrOutliner& rOutliner, tools::Rectangle& rTextRect, bool bNoEditText, + tools::Rectangle* pAnchorRect, bool /*bLineWidth*/) const { - Rectangle aAnkRect; // Rect in which we anchor + tools::Rectangle aAnkRect; // Rect in which we anchor TakeTextAnchorRect(aAnkRect); SdrTextVertAdjust eVAdj=GetTextVerticalAdjust(); SdrTextHorzAdjust eHAdj=GetTextHorizontalAdjust(); @@ -2751,7 +2751,7 @@ void SdrObjCustomShape::TakeTextRect( SdrOutliner& rOutliner, Rectangle& rTextRe *pAnchorRect=aAnkRect; // using rTextRect together with ContourFrame doesn't always work correctly - rTextRect=Rectangle(aTextPos,aTextSiz); + rTextRect=tools::Rectangle(aTextPos,aTextSiz); } void SdrObjCustomShape::NbcSetOutlinerParaObject(OutlinerParaObject* pTextObject) @@ -2871,7 +2871,7 @@ void SdrObjCustomShape::SetPage( SdrPage* pNewPage ) // invalidating rectangles by SetRectsDirty is not sufficient, // AdjustTextFrameWidthAndHeight() also has to be made, both // actions are done by NbcSetSnapRect - Rectangle aTmp( maRect ); //creating temporary rectangle #i61108# + tools::Rectangle aTmp( maRect ); //creating temporary rectangle #i61108# NbcSetSnapRect( aTmp ); } } @@ -2979,7 +2979,7 @@ void SdrObjCustomShape::TRSetBaseGeometry(const basegfx::B2DHomMatrix& rMatrix, if( !aSize.Height() ) aSize.setHeight( 1 ); if( !aSize.Width() ) aSize.setWidth( 1 ); - Rectangle aBaseRect(aPoint, aSize); + tools::Rectangle aBaseRect(aPoint, aSize); SetSnapRect(aBaseRect); // shear? @@ -3022,7 +3022,7 @@ bool SdrObjCustomShape::TRGetBaseGeometry(basegfx::B2DHomMatrix& rMatrix, basegf double fShearX = (aGeo.nShearAngle / 100.0) * F_PI180; // get aRect, this is the unrotated snaprect - Rectangle aRectangle(maRect); + tools::Rectangle aRectangle(maRect); bool bMirroredX = IsMirroredX(); bool bMirroredY = IsMirroredY(); @@ -3034,7 +3034,7 @@ bool SdrObjCustomShape::TRGetBaseGeometry(basegfx::B2DHomMatrix& rMatrix, basegf if ( bMirroredX ) { tools::Polygon aPol = Rect2Poly(maRect, aNewGeo); - Rectangle aBoundRect( aPol.GetBoundRect() ); + tools::Rectangle aBoundRect( aPol.GetBoundRect() ); Point aRef1( ( aBoundRect.Left() + aBoundRect.Right() ) >> 1, aBoundRect.Top() ); Point aRef2( aRef1.X(), aRef1.Y() + 1000 ); @@ -3056,7 +3056,7 @@ bool SdrObjCustomShape::TRGetBaseGeometry(basegfx::B2DHomMatrix& rMatrix, basegf if ( bMirroredY ) { tools::Polygon aPol( Rect2Poly( aRectangle, aNewGeo ) ); - Rectangle aBoundRect( aPol.GetBoundRect() ); + tools::Rectangle aBoundRect( aPol.GetBoundRect() ); Point aRef1( aBoundRect.Left(), ( aBoundRect.Top() + aBoundRect.Bottom() ) >> 1 ); Point aRef2( aRef1.X() + 1000, aRef1.Y() ); diff --git a/svx/source/svdraw/svdoattr.cxx b/svx/source/svdraw/svdoattr.cxx index 964bf6388d9c..1897e2194364 100644 --- a/svx/source/svdraw/svdoattr.cxx +++ b/svx/source/svdraw/svdoattr.cxx @@ -88,7 +88,7 @@ SdrAttrObj::~SdrAttrObj() { } -const Rectangle& SdrAttrObj::GetSnapRect() const +const tools::Rectangle& SdrAttrObj::GetSnapRect() const { if(bSnapRectDirty) { @@ -125,7 +125,7 @@ void SdrAttrObj::Notify(SfxBroadcaster& /*rBC*/, const SfxHint& rHint) if(bDataChg) { - Rectangle aBoundRect = GetLastBoundRect(); + tools::Rectangle aBoundRect = GetLastBoundRect(); SetBoundRectDirty(); SetRectsDirty(true); diff --git a/svx/source/svdraw/svdobj.cxx b/svx/source/svdraw/svdobj.cxx index 998158cbe68d..a275c9d2477a 100644 --- a/svx/source/svdraw/svdobj.cxx +++ b/svx/source/svdraw/svdobj.cxx @@ -145,7 +145,7 @@ SdrObjUserCall::~SdrObjUserCall() { } -void SdrObjUserCall::Changed(const SdrObject& /*rObj*/, SdrUserCallType /*eType*/, const Rectangle& /*rOldBoundRect*/) +void SdrObjUserCall::Changed(const SdrObject& /*rObj*/, SdrUserCallType /*eType*/, const tools::Rectangle& /*rOldBoundRect*/) { } @@ -284,7 +284,7 @@ void SdrObject::ActionChanged() const void SdrObject::SetBoundRectDirty() { - aOutRect = Rectangle(); + aOutRect = tools::Rectangle(); } @@ -826,7 +826,7 @@ void SdrObject::SetNavigationPosition (const sal_uInt32 nNewPosition) // expensive and sometimes problematic (inside a bigger object change you will get // non-useful BoundRects sometimes) I rename that method from GetBoundRect() to // GetCurrentBoundRect(). -const Rectangle& SdrObject::GetCurrentBoundRect() const +const tools::Rectangle& SdrObject::GetCurrentBoundRect() const { if(aOutRect.IsEmpty()) { @@ -840,7 +840,7 @@ const Rectangle& SdrObject::GetCurrentBoundRect() const // the first rectangle for repaints (old and new need to be used) without forcing // a RecalcBoundRect (which may be problematical and expensive sometimes) I add here // a new method for accessing the last BoundRect. -const Rectangle& SdrObject::GetLastBoundRect() const +const tools::Rectangle& SdrObject::GetLastBoundRect() const { return aOutRect; } @@ -864,7 +864,7 @@ void SdrObject::RecalcBoundRect() if(!aRange.isEmpty()) { - aOutRect = Rectangle( + aOutRect = tools::Rectangle( static_cast<long>(floor(aRange.getMinX())), static_cast<long>(floor(aRange.getMinY())), static_cast<long>(ceil(aRange.getMaxX())), @@ -1061,7 +1061,7 @@ OUString SdrObject::GetMetrStr(long nVal) const basegfx::B2DPolyPolygon SdrObject::TakeXorPoly() const { basegfx::B2DPolyPolygon aRetval; - const Rectangle aR(GetCurrentBoundRect()); + const tools::Rectangle aR(GetCurrentBoundRect()); const basegfx::B2DRange aRange(aR.Left(), aR.Top(), aR.Right(), aR.Bottom()); aRetval.append(basegfx::tools::createPolygonFromRect(aRange)); @@ -1163,7 +1163,7 @@ sal_uInt32 SdrObject::GetHdlCount() const SdrHdl* SdrObject::GetHdl(sal_uInt32 nHdlNum) const { SdrHdl* pH=nullptr; - const Rectangle& rR=GetSnapRect(); + const tools::Rectangle& rR=GetSnapRect(); switch (nHdlNum) { case 0: pH=new SdrHdl(rR.TopLeft(), SdrHdlKind::UpperLeft); break; case 1: pH=new SdrHdl(rR.TopCenter(), SdrHdlKind::Upper); break; @@ -1204,10 +1204,10 @@ void SdrObject::addCropHandles(SdrHdlList& /*rTarget*/) const // SdrGrafObj and SwVirtFlyDrawObj } -Rectangle SdrObject::ImpDragCalcRect(const SdrDragStat& rDrag) const +tools::Rectangle SdrObject::ImpDragCalcRect(const SdrDragStat& rDrag) const { - Rectangle aTmpRect(GetSnapRect()); - Rectangle aRect(aTmpRect); + tools::Rectangle aTmpRect(GetSnapRect()); + tools::Rectangle aRect(aTmpRect); const SdrHdl* pHdl=rDrag.GetHdl(); SdrHdlKind eHdl=pHdl==nullptr ? SdrHdlKind::Move : pHdl->GetKind(); bool bEcke=(eHdl==SdrHdlKind::UpperLeft || eHdl==SdrHdlKind::UpperRight || eHdl==SdrHdlKind::LowerLeft || eHdl==SdrHdlKind::LowerRight); @@ -1308,7 +1308,7 @@ bool SdrObject::beginSpecialDrag(SdrDragStat& rDrag) const bool SdrObject::applySpecialDrag(SdrDragStat& rDrag) { - Rectangle aNewRect(ImpDragCalcRect(rDrag)); + tools::Rectangle aNewRect(ImpDragCalcRect(rDrag)); if(aNewRect != GetSnapRect()) { @@ -1334,7 +1334,7 @@ basegfx::B2DPolyPolygon SdrObject::getSpecialDragPoly(const SdrDragStat& /*rDrag bool SdrObject::BegCreate(SdrDragStat& rStat) { rStat.SetOrtho4Possible(); - Rectangle aRect1(rStat.GetStart(), rStat.GetNow()); + tools::Rectangle aRect1(rStat.GetStart(), rStat.GetNow()); aRect1.Justify(); rStat.SetActionRect(aRect1); aOutRect = aRect1; @@ -1369,7 +1369,7 @@ bool SdrObject::BckCreate(SdrDragStat& /*rStat*/) basegfx::B2DPolyPolygon SdrObject::TakeCreatePoly(const SdrDragStat& rDrag) const { - Rectangle aRect1; + tools::Rectangle aRect1; rDrag.TakeCreateRect(aRect1); aRect1.Justify(); @@ -1416,7 +1416,7 @@ void SdrObject::NbcRotate(const Point& rRef, long nAngle, double sn, double cs) { SetGlueReallyAbsolute(true); aOutRect.Move(-rRef.X(),-rRef.Y()); - Rectangle R(aOutRect); + tools::Rectangle R(aOutRect); if (sn==1.0 && cs==0.0) { // 90deg aOutRect.Left() =-R.Bottom(); aOutRect.Right() =-R.Top(); @@ -1444,7 +1444,7 @@ void SdrObject::NbcMirror(const Point& rRef1, const Point& rRef2) { SetGlueReallyAbsolute(true); aOutRect.Move(-rRef1.X(),-rRef1.Y()); - Rectangle R(aOutRect); + tools::Rectangle R(aOutRect); long dx=rRef2.X()-rRef1.X(); long dy=rRef2.Y()-rRef1.Y(); if (dx==0) { // vertical axis @@ -1481,7 +1481,7 @@ void SdrObject::NbcShear(const Point& rRef, long nAngle, double tn, bool bVShear void SdrObject::Move(const Size& rSiz) { if (rSiz.Width()!=0 || rSiz.Height()!=0) { - Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); + tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); NbcMove(rSiz); SetChanged(); BroadcastObjectChange(); @@ -1503,7 +1503,7 @@ void SdrObject::Resize(const Point& rRef, const Fraction& xFact, const Fraction& mpImpl->meRelativeHeightRelation = text::RelOrientation::PAGE_FRAME; mpImpl->mnRelativeHeight.reset(); } - Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); + tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); NbcResize(rRef,xFact,yFact); SetChanged(); BroadcastObjectChange(); @@ -1513,7 +1513,7 @@ void SdrObject::Resize(const Point& rRef, const Fraction& xFact, const Fraction& void SdrObject::Crop(const Point& rRef, const Fraction& xFact, const Fraction& yFact) { - Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); + tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); NbcCrop(rRef, xFact, yFact); SetChanged(); BroadcastObjectChange(); @@ -1523,7 +1523,7 @@ void SdrObject::Crop(const Point& rRef, const Fraction& xFact, const Fraction& y void SdrObject::Rotate(const Point& rRef, long nAngle, double sn, double cs) { if (nAngle!=0) { - Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); + tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); NbcRotate(rRef,nAngle,sn,cs); SetChanged(); BroadcastObjectChange(); @@ -1533,7 +1533,7 @@ void SdrObject::Rotate(const Point& rRef, long nAngle, double sn, double cs) void SdrObject::Mirror(const Point& rRef1, const Point& rRef2) { - Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); + tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); NbcMirror(rRef1,rRef2); SetChanged(); BroadcastObjectChange(); @@ -1543,7 +1543,7 @@ void SdrObject::Mirror(const Point& rRef1, const Point& rRef2) void SdrObject::Shear(const Point& rRef, long nAngle, double tn, bool bVShear) { if (nAngle!=0) { - Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); + tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); NbcShear(rRef,nAngle,tn,bVShear); SetChanged(); BroadcastObjectChange(); @@ -1561,7 +1561,7 @@ void SdrObject::NbcSetRelativePos(const Point& rPnt) void SdrObject::SetRelativePos(const Point& rPnt) { if (rPnt!=GetRelativePos()) { - Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); + tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); NbcSetRelativePos(rPnt); SetChanged(); BroadcastObjectChange(); @@ -1589,7 +1589,7 @@ void SdrObject::NbcSetAnchorPos(const Point& rPnt) void SdrObject::SetAnchorPos(const Point& rPnt) { if (rPnt!=aAnchor) { - Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); + tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); NbcSetAnchorPos(rPnt); SetChanged(); BroadcastObjectChange(); @@ -1606,43 +1606,43 @@ void SdrObject::RecalcSnapRect() { } -const Rectangle& SdrObject::GetSnapRect() const +const tools::Rectangle& SdrObject::GetSnapRect() const { return aOutRect; } -void SdrObject::NbcSetSnapRect(const Rectangle& rRect) +void SdrObject::NbcSetSnapRect(const tools::Rectangle& rRect) { aOutRect=rRect; } -const Rectangle& SdrObject::GetLogicRect() const +const tools::Rectangle& SdrObject::GetLogicRect() const { return GetSnapRect(); } -void SdrObject::NbcSetLogicRect(const Rectangle& rRect) +void SdrObject::NbcSetLogicRect(const tools::Rectangle& rRect) { NbcSetSnapRect(rRect); } -void SdrObject::AdjustToMaxRect( const Rectangle& rMaxRect, bool /* bShrinkOnly = false */ ) +void SdrObject::AdjustToMaxRect( const tools::Rectangle& rMaxRect, bool /* bShrinkOnly = false */ ) { SetLogicRect( rMaxRect ); } -void SdrObject::SetSnapRect(const Rectangle& rRect) +void SdrObject::SetSnapRect(const tools::Rectangle& rRect) { - Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); + tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); NbcSetSnapRect(rRect); SetChanged(); BroadcastObjectChange(); SendUserCall(SdrUserCallType::Resize,aBoundRect0); } -void SdrObject::SetLogicRect(const Rectangle& rRect) +void SdrObject::SetLogicRect(const tools::Rectangle& rRect) { - Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); + tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); NbcSetLogicRect(rRect); SetChanged(); BroadcastObjectChange(); @@ -1686,7 +1686,7 @@ Point SdrObject::GetPoint(sal_uInt32 /*i*/) const void SdrObject::SetPoint(const Point& rPnt, sal_uInt32 i) { - Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); + tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); NbcSetPoint(rPnt, i); SetChanged(); BroadcastObjectChange(); @@ -1763,7 +1763,7 @@ void SdrObject::EndTextEdit(SdrOutliner& /*rOutl*/) void SdrObject::SetOutlinerParaObject(OutlinerParaObject* pTextObject) { - Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); + tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); NbcSetOutlinerParaObject(pTextObject); SetChanged(); BroadcastObjectChange(); @@ -1787,7 +1787,7 @@ void SdrObject::NbcReformatText() void SdrObject::ReformatText() { - Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); + tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); NbcReformatText(); SetChanged(); BroadcastObjectChange(); @@ -1821,7 +1821,7 @@ Pointer SdrObject::GetMacroPointer(const SdrObjMacroHitRec&) const return Pointer(PointerStyle::RefHand); } -void SdrObject::PaintMacro(OutputDevice& rOut, const Rectangle& , const SdrObjMacroHitRec& ) const +void SdrObject::PaintMacro(OutputDevice& rOut, const tools::Rectangle& , const SdrObjMacroHitRec& ) const { const RasterOp eRop(rOut.GetRasterOp()); const basegfx::B2DPolyPolygon aPolyPolygon(TakeXorPoly()); @@ -1920,7 +1920,7 @@ SdrObjGeoData* SdrObject::GetGeoData() const void SdrObject::SetGeoData(const SdrObjGeoData& rGeo) { - Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); + tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); RestGeoData(rGeo); SetChanged(); BroadcastObjectChange(); @@ -1987,7 +1987,7 @@ void SdrObject::SetMergedItemSetAndBroadcast(const SfxItemSet& rSet, bool bClear void SdrObject::ApplyNotPersistAttr(const SfxItemSet& rAttr) { - Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); + tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); NbcApplyNotPersistAttr(rAttr); SetChanged(); BroadcastObjectChange(); @@ -1996,8 +1996,8 @@ void SdrObject::ApplyNotPersistAttr(const SfxItemSet& rAttr) void SdrObject::NbcApplyNotPersistAttr(const SfxItemSet& rAttr) { - const Rectangle& rSnap=GetSnapRect(); - const Rectangle& rLogic=GetLogicRect(); + const tools::Rectangle& rSnap=GetSnapRect(); + const tools::Rectangle& rLogic=GetLogicRect(); Point aRef1(rSnap.Center()); Point aRef2(aRef1); aRef2.Y()++; const SfxPoolItem *pPoolItem=nullptr; @@ -2014,7 +2014,7 @@ void SdrObject::NbcApplyNotPersistAttr(const SfxItemSet& rAttr) aRef2.Y()=static_cast<const SdrTransformRef2YItem*>(pPoolItem)->GetValue(); } - Rectangle aNewSnap(rSnap); + tools::Rectangle aNewSnap(rSnap); if (rAttr.GetItemState(SDRATTR_MOVEX,true,&pPoolItem)==SfxItemState::SET) { long n=static_cast<const SdrMoveXItem*>(pPoolItem)->GetValue(); aNewSnap.Move(n,0); @@ -2127,7 +2127,7 @@ void SdrObject::NbcApplyNotPersistAttr(const SfxItemSet& rAttr) OUString aName=static_cast<const SfxStringItem*>(pPoolItem)->GetValue(); SetName(aName); } - Rectangle aNewLogic(rLogic); + tools::Rectangle aNewLogic(rLogic); if (rAttr.GetItemState(SDRATTR_LOGICSIZEWIDTH,true,&pPoolItem)==SfxItemState::SET) { long n=static_cast<const SdrLogicSizeWidthItem*>(pPoolItem)->GetValue(); aNewLogic.Right()=aNewLogic.Left()+n; @@ -2160,8 +2160,8 @@ static void lcl_SetItem(SfxItemSet& rAttr, bool bMerge, const SfxPoolItem& rItem void SdrObject::TakeNotPersistAttr(SfxItemSet& rAttr) const { - const Rectangle& rSnap=GetSnapRect(); - const Rectangle& rLogic=GetLogicRect(); + const tools::Rectangle& rSnap=GetSnapRect(); + const tools::Rectangle& rLogic=GetLogicRect(); lcl_SetItem(rAttr,false,SdrYesNoItem(SDRATTR_OBJMOVEPROTECT, IsMoveProtect())); lcl_SetItem(rAttr,false,SdrYesNoItem(SDRATTR_OBJSIZEPROTECT, IsResizeProtect())); lcl_SetItem(rAttr,false,SdrObjPrintableItem(IsPrintable())); @@ -2208,7 +2208,7 @@ SfxStyleSheet* SdrObject::GetStyleSheet() const void SdrObject::SetStyleSheet(SfxStyleSheet* pNewStyleSheet, bool bDontRemoveHardAttr) { - Rectangle aBoundRect0; + tools::Rectangle aBoundRect0; if(pUserCall) aBoundRect0 = GetLastBoundRect(); @@ -2239,7 +2239,7 @@ bool SdrObject::IsNode() const SdrGluePoint SdrObject::GetVertexGluePoint(sal_uInt16 nPosNum) const { // #i41936# Use SnapRect for default GluePoints - const Rectangle aR(GetSnapRect()); + const tools::Rectangle aR(GetSnapRect()); Point aPt; switch(nPosNum) @@ -2259,7 +2259,7 @@ SdrGluePoint SdrObject::GetVertexGluePoint(sal_uInt16 nPosNum) const SdrGluePoint SdrObject::GetCornerGluePoint(sal_uInt16 nPosNum) const { - Rectangle aR(GetCurrentBoundRect()); + tools::Rectangle aR(GetCurrentBoundRect()); Point aPt; switch (nPosNum) { case 0 : aPt=aR.TopLeft(); break; @@ -2622,7 +2622,7 @@ void SdrObject::SetInserted(bool bIns) { if (bIns!=IsInserted()) { bInserted=bIns; - Rectangle aBoundRect0(GetLastBoundRect()); + tools::Rectangle aBoundRect0(GetLastBoundRect()); if (bIns) SendUserCall(SdrUserCallType::Inserted,aBoundRect0); else SendUserCall(SdrUserCallType::Removed,aBoundRect0); @@ -2731,7 +2731,7 @@ void SdrObject::SetUserCall(SdrObjUserCall* pUser) } -void SdrObject::SendUserCall(SdrUserCallType eUserCall, const Rectangle& rBoundRect) const +void SdrObject::SendUserCall(SdrUserCallType eUserCall, const tools::Rectangle& rBoundRect) const { SdrObject* pGroup = nullptr; @@ -2936,7 +2936,7 @@ void SdrObject::notifyShapePropertyChange( const svx::ShapeProperty _eProperty ) bool SdrObject::TRGetBaseGeometry(basegfx::B2DHomMatrix& rMatrix, basegfx::B2DPolyPolygon& /*rPolyPolygon*/) const { // any kind of SdrObject, just use SnapRect - Rectangle aRectangle(GetSnapRect()); + tools::Rectangle aRectangle(GetSnapRect()); // convert to transformation values basegfx::B2DTuple aScale(aRectangle.GetWidth(), aRectangle.GetHeight()); @@ -3037,7 +3037,7 @@ void SdrObject::TRSetBaseGeometry(const basegfx::B2DHomMatrix& rMatrix, const ba // build BaseRect Point aPoint(FRound(aTranslate.getX()), FRound(aTranslate.getY())); - Rectangle aBaseRect(aPoint, Size(FRound(aScale.getX()), FRound(aScale.getY()))); + tools::Rectangle aBaseRect(aPoint, Size(FRound(aScale.getX()), FRound(aScale.getY()))); // set BaseRect SetSnapRect(aBaseRect); @@ -3070,7 +3070,7 @@ bool SdrObject::HasLineStyle() const // might be resized -void SdrObject::SetBLIPSizeRectangle( const Rectangle& aRect ) +void SdrObject::SetBLIPSizeRectangle( const tools::Rectangle& aRect ) { maBLIPSizeRectangle = aRect; } @@ -3189,7 +3189,7 @@ SdrObject* SdrObjFactory::MakeNewObject(SdrInventor nInvent, sal_uInt16 nIdent, } SdrObject* SdrObjFactory::MakeNewObject( - SdrInventor nInventor, sal_uInt16 nIdentifier, const Rectangle& rSnapRect, SdrPage* pPage ) + SdrInventor nInventor, sal_uInt16 nIdentifier, const tools::Rectangle& rSnapRect, SdrPage* pPage ) { SdrModel* pModel = pPage ? pPage->GetModel() : nullptr; diff --git a/svx/source/svdraw/svdocapt.cxx b/svx/source/svdraw/svdocapt.cxx index 65822737b2f6..0eb46c8bec69 100644 --- a/svx/source/svdraw/svdocapt.cxx +++ b/svx/source/svdraw/svdocapt.cxx @@ -91,10 +91,10 @@ public: nLineLen =0; bFitLineLen=true; } - void CalcEscPos(const Point& rTail, const Rectangle& rRect, Point& rPt, EscDir& rDir) const; + void CalcEscPos(const Point& rTail, const tools::Rectangle& rRect, Point& rPt, EscDir& rDir) const; }; -void ImpCaptParams::CalcEscPos(const Point& rTailPt, const Rectangle& rRect, Point& rPt, EscDir& rDir) const +void ImpCaptParams::CalcEscPos(const Point& rTailPt, const tools::Rectangle& rRect, Point& rPt, EscDir& rDir) const { Point aTl(rTailPt); // copy locally for performance reasons long nX,nY; @@ -199,7 +199,7 @@ SdrCaptionObj::SdrCaptionObj(): { } -SdrCaptionObj::SdrCaptionObj(const Rectangle& rRect, const Point& rTail): +SdrCaptionObj::SdrCaptionObj(const tools::Rectangle& rRect, const Point& rTail): SdrRectObj(OBJ_TEXT,rRect), aTailPoly(3), // default size: 3 points = 2 lines mbSpecialTextBoxShadow(false), @@ -449,7 +449,7 @@ void SdrCaptionObj::ImpRecalcTail() // tail end pos for SdrCaptionType::Type1. This sure was the simplest method // to achieve this, at the cost of making a whole group of const methods // of this object implicitly change the object's position. -void SdrCaptionObj::ImpCalcTail1(const ImpCaptParams& rPara, tools::Polygon& rPoly, Rectangle& rRect) +void SdrCaptionObj::ImpCalcTail1(const ImpCaptParams& rPara, tools::Polygon& rPoly, tools::Rectangle& rRect) { tools::Polygon aPol(2); Point aTl(rPoly[0]); @@ -475,7 +475,7 @@ void SdrCaptionObj::ImpCalcTail1(const ImpCaptParams& rPara, tools::Polygon& rPo rPoly = aPol; } -void SdrCaptionObj::ImpCalcTail2(const ImpCaptParams& rPara, tools::Polygon& rPoly, Rectangle& rRect) +void SdrCaptionObj::ImpCalcTail2(const ImpCaptParams& rPara, tools::Polygon& rPoly, tools::Rectangle& rRect) { // Gap/EscDir/EscPos/Angle tools::Polygon aPol(2); Point aTl(rPoly[0]); @@ -492,7 +492,7 @@ void SdrCaptionObj::ImpCalcTail2(const ImpCaptParams& rPara, tools::Polygon& rPo rPoly=aPol; } -void SdrCaptionObj::ImpCalcTail3(const ImpCaptParams& rPara, tools::Polygon& rPoly, Rectangle& rRect) +void SdrCaptionObj::ImpCalcTail3(const ImpCaptParams& rPara, tools::Polygon& rPoly, tools::Rectangle& rRect) { // Gap/EscDir/EscPos/Angle/LineLen tools::Polygon aPol(3); Point aTl(rPoly[0]); @@ -525,7 +525,7 @@ void SdrCaptionObj::ImpCalcTail3(const ImpCaptParams& rPara, tools::Polygon& rPo rPoly=aPol; } -void SdrCaptionObj::ImpCalcTail(const ImpCaptParams& rPara, tools::Polygon& rPoly, Rectangle& rRect) +void SdrCaptionObj::ImpCalcTail(const ImpCaptParams& rPara, tools::Polygon& rPoly, tools::Rectangle& rRect) { switch (rPara.eType) { case SdrCaptionType::Type1: ImpCalcTail1(rPara,rPoly,rRect); break; @@ -622,12 +622,12 @@ Point SdrCaptionObj::GetRelativePos() const return aTailPoly.GetPoint(0)-aAnchor; } -const Rectangle& SdrCaptionObj::GetLogicRect() const +const tools::Rectangle& SdrCaptionObj::GetLogicRect() const { return maRect; } -void SdrCaptionObj::NbcSetLogicRect(const Rectangle& rRect) +void SdrCaptionObj::NbcSetLogicRect(const tools::Rectangle& rRect) { SdrRectObj::NbcSetLogicRect(rRect); ImpRecalcTail(); @@ -641,7 +641,7 @@ const Point& SdrCaptionObj::GetTailPos() const void SdrCaptionObj::SetTailPos(const Point& rPos) { if (aTailPoly.GetSize()==0 || aTailPoly[0]!=rPos) { - Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); + tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); NbcSetTailPos(rPos); SetChanged(); BroadcastObjectChange(); @@ -786,7 +786,7 @@ void SdrCaptionObj::TRSetBaseGeometry(const basegfx::B2DHomMatrix& rMatrix, cons // build BaseRect Point aPoint(FRound(aTranslate.getX()), FRound(aTranslate.getY())); - Rectangle aBaseRect(aPoint, Size(FRound(aScale.getX()), FRound(aScale.getY()))); + tools::Rectangle aBaseRect(aPoint, Size(FRound(aScale.getX()), FRound(aScale.getY()))); // set BaseRect, but rescue TailPos over this call const Point aTailPoint = GetTailPos(); diff --git a/svx/source/svdraw/svdocirc.cxx b/svx/source/svdraw/svdocirc.cxx index f561e8220062..cce0f010e2b5 100644 --- a/svx/source/svdraw/svdocirc.cxx +++ b/svx/source/svdraw/svdocirc.cxx @@ -52,7 +52,7 @@ using namespace com::sun::star; -Point GetAnglePnt(const Rectangle& rR, long nAngle) +Point GetAnglePnt(const tools::Rectangle& rR, long nAngle) { Point aCenter(rR.Center()); long nWdt=rR.Right()-rR.Left(); @@ -113,7 +113,7 @@ SdrCircObj::SdrCircObj(SdrObjKind eNewKind) bClosedObj=eNewKind!=OBJ_CARC; } -SdrCircObj::SdrCircObj(SdrObjKind eNewKind, const Rectangle& rRect): +SdrCircObj::SdrCircObj(SdrObjKind eNewKind, const tools::Rectangle& rRect): SdrRectObj(rRect) { nStartAngle=0; @@ -122,7 +122,7 @@ SdrCircObj::SdrCircObj(SdrObjKind eNewKind, const Rectangle& rRect): bClosedObj=eNewKind!=OBJ_CARC; } -SdrCircObj::SdrCircObj(SdrObjKind eNewKind, const Rectangle& rRect, long nNewStartWink, long nNewEndWink): +SdrCircObj::SdrCircObj(SdrObjKind eNewKind, const tools::Rectangle& rRect, long nNewStartWink, long nNewEndWink): SdrRectObj(rRect) { long nAngleDif=nNewEndWink-nNewStartWink; @@ -201,7 +201,7 @@ bool SdrCircObj::PaintNeedsXPolyCirc() const return bNeed; } -basegfx::B2DPolygon SdrCircObj::ImpCalcXPolyCirc(const SdrObjKind eCicrleKind, const Rectangle& rRect1, long nStart, long nEnd) const +basegfx::B2DPolygon SdrCircObj::ImpCalcXPolyCirc(const SdrObjKind eCicrleKind, const tools::Rectangle& rRect1, long nStart, long nEnd) const { const basegfx::B2DRange aRange(rRect1.Left(), rRect1.Top(), rRect1.Right(), rRect1.Bottom()); basegfx::B2DPolygon aCircPolygon; @@ -351,7 +351,7 @@ basegfx::B2DPolyPolygon SdrCircObj::TakeXorPoly() const struct ImpCircUser : public SdrDragStatUserData { - Rectangle aR; + tools::Rectangle aR; Point aCenter; Point aP1; Point aP2; @@ -676,7 +676,7 @@ void SdrCircObj::ImpSetCreateParams(SdrDragStat& rStat) bool SdrCircObj::BegCreate(SdrDragStat& rStat) { rStat.SetOrtho4Possible(); - Rectangle aRect1(rStat.GetStart(), rStat.GetNow()); + tools::Rectangle aRect1(rStat.GetStart(), rStat.GetNow()); aRect1.Justify(); rStat.SetActionRect(aRect1); maRect = aRect1; @@ -945,7 +945,7 @@ void SdrCircObj::RestGeoData(const SdrObjGeoData& rGeo) ImpSetCircInfoToAttr(); } -void Union(Rectangle& rR, const Point& rP) +void Union(tools::Rectangle& rR, const Point& rP) { if (rP.X()<rR.Left ()) rR.Left ()=rP.X(); if (rP.X()>rR.Right ()) rR.Right ()=rP.X(); @@ -953,7 +953,7 @@ void Union(Rectangle& rR, const Point& rP) if (rP.Y()>rR.Bottom()) rR.Bottom()=rP.Y(); } -void SdrCircObj::TakeUnrotatedSnapRect(Rectangle& rRect) const +void SdrCircObj::TakeUnrotatedSnapRect(tools::Rectangle& rRect) const { rRect = maRect; if (meCircleKind!=OBJ_CIRC) { @@ -1015,10 +1015,10 @@ void SdrCircObj::RecalcSnapRect() } } -void SdrCircObj::NbcSetSnapRect(const Rectangle& rRect) +void SdrCircObj::NbcSetSnapRect(const tools::Rectangle& rRect) { if (aGeo.nRotationAngle!=0 || aGeo.nShearAngle!=0 || meCircleKind!=OBJ_CIRC) { - Rectangle aSR0(GetSnapRect()); + tools::Rectangle aSR0(GetSnapRect()); long nWdt0=aSR0.Right()-aSR0.Left(); long nHgt0=aSR0.Bottom()-aSR0.Top(); long nWdt1=rRect.Right()-rRect.Left(); diff --git a/svx/source/svdraw/svdoedge.cxx b/svx/source/svdraw/svdoedge.cxx index 86a842841581..e7d04d1fe005 100644 --- a/svx/source/svdraw/svdoedge.cxx +++ b/svx/source/svdraw/svdoedge.cxx @@ -370,7 +370,7 @@ sal_uInt16 SdrEdgeObj::GetObjIdentifier() const return sal_uInt16(OBJ_EDGE); } -const Rectangle& SdrEdgeObj::GetCurrentBoundRect() const +const tools::Rectangle& SdrEdgeObj::GetCurrentBoundRect() const { if(bEdgeTrackDirty) { @@ -380,7 +380,7 @@ const Rectangle& SdrEdgeObj::GetCurrentBoundRect() const return SdrTextObj::GetCurrentBoundRect(); } -const Rectangle& SdrEdgeObj::GetSnapRect() const +const tools::Rectangle& SdrEdgeObj::GetSnapRect() const { if(bEdgeTrackDirty) { @@ -395,7 +395,7 @@ void SdrEdgeObj::RecalcSnapRect() maSnapRect=pEdgeTrack->GetBoundRect(); } -void SdrEdgeObj::TakeUnrotatedSnapRect(Rectangle& rRect) const +void SdrEdgeObj::TakeUnrotatedSnapRect(tools::Rectangle& rRect) const { rRect=GetSnapRect(); } @@ -574,7 +574,7 @@ void SdrEdgeObj::ImpRecalcEdgeTrack() mbSuppressed = false; } - Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetCurrentBoundRect(); + tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetCurrentBoundRect(); SetRectsDirty(); *pEdgeTrack=ImpCalcEdgeTrack(*pEdgeTrack,aCon1,aCon2,&aEdgeInfo); ImpSetEdgeInfoToAttr(); // copy values from aEdgeInfo into the pool @@ -592,7 +592,7 @@ void SdrEdgeObj::ImpRecalcEdgeTrack() SdrEscapeDirection SdrEdgeObj::ImpCalcEscAngle(SdrObject* pObj, const Point& rPt) { if (pObj==nullptr) return SdrEscapeDirection::ALL; - Rectangle aR(pObj->GetSnapRect()); + tools::Rectangle aR(pObj->GetSnapRect()); long dxl=rPt.X()-aR.Left(); long dyo=rPt.Y()-aR.Top(); long dxr=aR.Right()-rPt.X(); @@ -627,7 +627,7 @@ SdrEscapeDirection SdrEdgeObj::ImpCalcEscAngle(SdrObject* pObj, const Point& rPt } } -XPolygon SdrEdgeObj::ImpCalcObjToCenter(const Point& rStPt, long nEscAngle, const Rectangle& rRect, const Point& rMeeting) +XPolygon SdrEdgeObj::ImpCalcObjToCenter(const Point& rStPt, long nEscAngle, const tools::Rectangle& rRect, const Point& rMeeting) { XPolygon aXP; aXP.Insert(XPOLY_APPEND,rStPt,PolyFlags::Normal); @@ -691,10 +691,10 @@ XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const XPolygon& rTrack0, SdrObjConnection& Point aPt1,aPt2; SdrGluePoint aGP1,aGP2; SdrEscapeDirection nEsc1=SdrEscapeDirection::ALL,nEsc2=SdrEscapeDirection::ALL; - Rectangle aBoundRect1; - Rectangle aBoundRect2; - Rectangle aBewareRect1; - Rectangle aBewareRect2; + tools::Rectangle aBoundRect1; + tools::Rectangle aBoundRect2; + tools::Rectangle aBewareRect1; + tools::Rectangle aBewareRect2; // first, get the old corner points if (rTrack0.GetPointCount()!=0) { aPt1=rTrack0[0]; @@ -735,7 +735,7 @@ XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const XPolygon& rTrack0, SdrObjConnection& aBewareRect1.Top()-=nV; aBewareRect1.Bottom()+=nV; } else { - aBoundRect1=Rectangle(aPt1,aPt1); + aBoundRect1=tools::Rectangle(aPt1,aPt1); aBoundRect1.Move(rCon1.aObjOfs.X(),rCon1.aObjOfs.Y()); aBewareRect1=aBoundRect1; } @@ -758,7 +758,7 @@ XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const XPolygon& rTrack0, SdrObjConnection& aBewareRect2.Top()-=nV; aBewareRect2.Bottom()+=nV; } else { - aBoundRect2=Rectangle(aPt2,aPt2); + aBoundRect2=tools::Rectangle(aPt2,aPt2); aBoundRect2.Move(rCon2.aObjOfs.X(),rCon2.aObjOfs.Y()); aBewareRect2=aBoundRect2; } @@ -814,8 +814,8 @@ XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const XPolygon& rTrack0, SdrObjConnection& return aBestXP; } -XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const Point& rPt1, long nAngle1, const Rectangle& rBoundRect1, const Rectangle& rBewareRect1, - const Point& rPt2, long nAngle2, const Rectangle& rBoundRect2, const Rectangle& rBewareRect2, +XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const Point& rPt1, long nAngle1, const tools::Rectangle& rBoundRect1, const tools::Rectangle& rBewareRect1, + const Point& rPt2, long nAngle2, const tools::Rectangle& rBoundRect2, const tools::Rectangle& rBewareRect2, sal_uIntPtr* pnQuality, SdrEdgeInfoRec* pInfo) const { SdrEdgeKind eKind=static_cast<const SdrEdgeKindItem&>(GetObjectItem(SDRATTR_EDGEKIND)).GetValue(); @@ -842,10 +842,10 @@ XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const Point& rPt1, long nAngle1, const Rec } Point aPt1(rPt1); Point aPt2(rPt2); - Rectangle aBoundRect1 (rBoundRect1 ); - Rectangle aBoundRect2 (rBoundRect2 ); - Rectangle aBewareRect1(rBewareRect1); - Rectangle aBewareRect2(rBewareRect2); + tools::Rectangle aBoundRect1 (rBoundRect1 ); + tools::Rectangle aBoundRect2 (rBoundRect2 ); + tools::Rectangle aBewareRect1(rBewareRect1); + tools::Rectangle aBewareRect2(rBewareRect2); Point aMeeting((aPt1.X()+aPt2.X()+1)/2,(aPt1.Y()+aPt2.Y()+1)/2); if (eKind==SdrEdgeKind::OneLine) { XPolygon aXP(2); @@ -998,10 +998,10 @@ XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const Point& rPt1, long nAngle1, const Rec // normalization; be aR1 the one exiting to the right, // be aR2 the one exiting to the left - Rectangle aBewR1(bRts1 ? aBewareRect1 : aBewareRect2); - Rectangle aBewR2(bRts1 ? aBewareRect2 : aBewareRect1); - Rectangle aBndR1(bRts1 ? aBoundRect1 : aBoundRect2); - Rectangle aBndR2(bRts1 ? aBoundRect2 : aBoundRect1); + tools::Rectangle aBewR1(bRts1 ? aBewareRect1 : aBewareRect2); + tools::Rectangle aBewR2(bRts1 ? aBewareRect2 : aBewareRect1); + tools::Rectangle aBndR1(bRts1 ? aBoundRect1 : aBoundRect2); + tools::Rectangle aBndR2(bRts1 ? aBoundRect2 : aBoundRect1); if (aBewR1.Bottom()>aBewR2.Top() && aBewR1.Top()<aBewR2.Bottom()) { // overlap on y axis; cases 2.1, 2.8, 2.9 if (aBewR1.Right()>aBewR2.Left()) { @@ -1060,10 +1060,10 @@ XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const Point& rPt1, long nAngle1, const Rec } } } else if (bVer1) { // both horizontal - Rectangle aBewR1(bUnt1 ? aBewareRect1 : aBewareRect2); - Rectangle aBewR2(bUnt1 ? aBewareRect2 : aBewareRect1); - Rectangle aBndR1(bUnt1 ? aBoundRect1 : aBoundRect2); - Rectangle aBndR2(bUnt1 ? aBoundRect2 : aBoundRect1); + tools::Rectangle aBewR1(bUnt1 ? aBewareRect1 : aBewareRect2); + tools::Rectangle aBewR2(bUnt1 ? aBewareRect2 : aBewareRect1); + tools::Rectangle aBndR1(bUnt1 ? aBoundRect1 : aBoundRect2); + tools::Rectangle aBndR2(bUnt1 ? aBoundRect2 : aBoundRect1); if (aBewR1.Right()>aBewR2.Left() && aBewR1.Left()<aBewR2.Right()) { // overlap on y axis; cases 2.1, 2.8, 2.9 if (aBewR1.Bottom()>aBewR2.Top()) { @@ -1171,8 +1171,8 @@ XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const Point& rPt1, long nAngle1, const Rec */ // case 3.2 - Rectangle aTmpR1(aBewareRect1); - Rectangle aTmpR2(aBewareRect2); + tools::Rectangle aTmpR1(aBewareRect1); + tools::Rectangle aTmpR2(aBewareRect2); if (bBewareOverlap) { // overlapping BewareRects: use BoundRects for checking for case 3.2 aTmpR1=aBoundRect1; @@ -1590,7 +1590,7 @@ void SdrEdgeObj::Notify(SfxBroadcaster& rBC, const SfxHint& rHint) (pSdrHint && pSdrHint->GetKind()==SdrHintKind::ObjectRemoved)) { // broadcasting only, if on the same page - Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetCurrentBoundRect(); + tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetCurrentBoundRect(); ImpDirtyEdgeTrack(); // only redraw here, object hasn't actually changed @@ -1691,7 +1691,7 @@ void SdrEdgeObj::SetEdgeTrackPath( const basegfx::B2DPolyPolygon& rPoly ) bEdgeTrackUserDefined = true; // #i110629# also set aRect and maSnapeRect depending on pEdgeTrack - const Rectangle aPolygonBounds(pEdgeTrack->GetBoundRect()); + const tools::Rectangle aPolygonBounds(pEdgeTrack->GetBoundRect()); maRect = aPolygonBounds; maSnapRect = aPolygonBounds; } @@ -2100,7 +2100,7 @@ bool SdrEdgeObj::ImpFindConnector(const Point& rPt, const SdrPageView& rPV, SdrO sal_uInt16 nMarkHdSiz=rPV.GetView().GetMarkHdlSizePixel(); Size aHalfConSiz(nMarkHdSiz,nMarkHdSiz); aHalfConSiz=pOut->PixelToLogic(aHalfConSiz); - Rectangle aMouseRect(rPt,rPt); + tools::Rectangle aMouseRect(rPt,rPt); aMouseRect.Left() -=aHalfConSiz.Width(); aMouseRect.Top() -=aHalfConSiz.Height(); aMouseRect.Right() +=aHalfConSiz.Width(); @@ -2119,7 +2119,7 @@ bool SdrEdgeObj::ImpFindConnector(const Point& rPt, const SdrPageView& rPV, SdrO (pThis==nullptr || pObj!=static_cast<SdrObject const *>(pThis)) && // don't connect it to itself pObj->IsNode()) { - Rectangle aObjBound(pObj->GetCurrentBoundRect()); + tools::Rectangle aObjBound(pObj->GetCurrentBoundRect()); if (aObjBound.IsOver(aMouseRect)) { aTestCon.ResetVars(); bool bEdge=dynamic_cast<const SdrEdgeObj *>(pObj) != nullptr; // no BestCon for Edge @@ -2194,7 +2194,7 @@ bool SdrEdgeObj::ImpFindConnector(const Point& rPt, const SdrPageView& rPV, SdrO } } if (bFnd) { - Rectangle aMouseRect2(rPt,rPt); + tools::Rectangle aMouseRect2(rPt,rPt); aMouseRect.Left() -=nBoundHitTol; aMouseRect.Top() -=nBoundHitTol; aMouseRect.Right() +=nBoundHitTol; @@ -2209,9 +2209,9 @@ bool SdrEdgeObj::ImpFindConnector(const Point& rPt, const SdrPageView& rPV, SdrO return bFnd; } -void SdrEdgeObj::NbcSetSnapRect(const Rectangle& rRect) +void SdrEdgeObj::NbcSetSnapRect(const tools::Rectangle& rRect) { - const Rectangle aOld(GetSnapRect()); + const tools::Rectangle aOld(GetSnapRect()); if(aOld != rRect) { @@ -2499,7 +2499,7 @@ void SdrEdgeObj::SetTailPoint( bool bTail, const Point& rPt ) */ void SdrEdgeObj::setGluePointIndex( bool bTail, sal_Int32 nIndex /* = -1 */ ) { - Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetCurrentBoundRect(); + tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetCurrentBoundRect(); SdrObjConnection& rConn1 = GetConnection( bTail ); diff --git a/svx/source/svdraw/svdograf.cxx b/svx/source/svdraw/svdograf.cxx index 526202639e90..62f73c21d8b9 100644 --- a/svx/source/svdraw/svdograf.cxx +++ b/svx/source/svdraw/svdograf.cxx @@ -350,7 +350,7 @@ SdrGrafObj::SdrGrafObj() mbSupportTextIndentingOnLineWidthChange = false; } -SdrGrafObj::SdrGrafObj(const Graphic& rGrf, const Rectangle& rRect) +SdrGrafObj::SdrGrafObj(const Graphic& rGrf, const tools::Rectangle& rRect) : SdrRectObj ( rRect ), pGraphicLink ( nullptr ), bMirrored ( false ) @@ -878,7 +878,7 @@ basegfx::B2DPolyPolygon SdrGrafObj::TakeXorPoly() const // take grown rectangle const sal_Int32 nHalfLineWidth(ImpGetLineWdt() / 2); - const Rectangle aGrownRect( + const tools::Rectangle aGrownRect( maRect.Left() - nHalfLineWidth, maRect.Top() - nHalfLineWidth, maRect.Right() + nHalfLineWidth, @@ -1027,7 +1027,7 @@ GDIMetaFile SdrGrafObj::getMetafileFromEmbeddedSvg() const if(isEmbeddedSvg() && GetModel()) { ScopedVclPtrInstance< VirtualDevice > pOut; - const Rectangle aBoundRect(GetCurrentBoundRect()); + const tools::Rectangle aBoundRect(GetCurrentBoundRect()); const MapMode aMap(GetModel()->GetScaleUnit(), Point(), GetModel()->GetScaleFraction(), GetModel()->GetScaleFraction()); pOut->EnableOutput(false); @@ -1221,7 +1221,7 @@ void SdrGrafObj::ImpSetAttrToGrafInfo() SetRectsDirty(); } -void SdrGrafObj::AdjustToMaxRect( const Rectangle& rMaxRect, bool bShrinkOnly ) +void SdrGrafObj::AdjustToMaxRect( const tools::Rectangle& rMaxRect, bool bShrinkOnly ) { Size aSize; Size aMaxSize( rMaxRect.GetSize() ); @@ -1267,7 +1267,7 @@ void SdrGrafObj::AdjustToMaxRect( const Rectangle& rMaxRect, bool bShrinkOnly ) aPos.X() -= aSize.Width() / 2; aPos.Y() -= aSize.Height() / 2; - SetLogicRect( Rectangle( aPos, aSize ) ); + SetLogicRect( tools::Rectangle( aPos, aSize ) ); } } diff --git a/svx/source/svdraw/svdogrp.cxx b/svx/source/svdraw/svdogrp.cxx index 62a368220264..3ba147e89433 100644 --- a/svx/source/svdraw/svdogrp.cxx +++ b/svx/source/svdraw/svdogrp.cxx @@ -218,7 +218,7 @@ SdrObjList* SdrObjGroup::GetSubList() const return pSub.get(); } -const Rectangle& SdrObjGroup::GetCurrentBoundRect() const +const tools::Rectangle& SdrObjGroup::GetCurrentBoundRect() const { // <aOutRect> has to contain the bounding rectangle if ( pSub->GetObjCount()!=0 ) @@ -229,7 +229,7 @@ const Rectangle& SdrObjGroup::GetCurrentBoundRect() const return aOutRect; } -const Rectangle& SdrObjGroup::GetSnapRect() const +const tools::Rectangle& SdrObjGroup::GetSnapRect() const { // <aOutRect> has to contain the bounding rectangle if ( pSub->GetObjCount()!=0 ) @@ -369,9 +369,9 @@ long SdrObjGroup::GetShearAngle(bool /*bVertical*/) const } -void SdrObjGroup::NbcSetSnapRect(const Rectangle& rRect) +void SdrObjGroup::NbcSetSnapRect(const tools::Rectangle& rRect) { - Rectangle aOld(GetSnapRect()); + tools::Rectangle aOld(GetSnapRect()); long nMulX=rRect.Right()-rRect.Left(); long nDivX=aOld.Right()-aOld.Left(); long nMulY=rRect.Bottom()-rRect.Top(); @@ -389,7 +389,7 @@ void SdrObjGroup::NbcSetSnapRect(const Rectangle& rRect) } -void SdrObjGroup::NbcSetLogicRect(const Rectangle& rRect) +void SdrObjGroup::NbcSetLogicRect(const tools::Rectangle& rRect) { NbcSetSnapRect(rRect); } @@ -503,10 +503,10 @@ void SdrObjGroup::NbcSetAnchorPos(const Point& rPnt) } -void SdrObjGroup::SetSnapRect(const Rectangle& rRect) +void SdrObjGroup::SetSnapRect(const tools::Rectangle& rRect) { - Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); - Rectangle aOld(GetSnapRect()); + tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); + tools::Rectangle aOld(GetSnapRect()); long nMulX=rRect.Right()-rRect.Left(); long nDivX=aOld.Right()-aOld.Left(); long nMulY=rRect.Bottom()-rRect.Top(); @@ -528,7 +528,7 @@ void SdrObjGroup::SetSnapRect(const Rectangle& rRect) } -void SdrObjGroup::SetLogicRect(const Rectangle& rRect) +void SdrObjGroup::SetLogicRect(const tools::Rectangle& rRect) { SetSnapRect(rRect); } @@ -537,7 +537,7 @@ void SdrObjGroup::SetLogicRect(const Rectangle& rRect) void SdrObjGroup::Move(const Size& rSiz) { if (rSiz.Width()!=0 || rSiz.Height()!=0) { - Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); + tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); MovePoint(aRefPoint,rSiz); if (pSub->GetObjCount()!=0) { // first move the connectors, then everything else @@ -581,7 +581,7 @@ void SdrObjGroup::Resize(const Point& rRef, const Fraction& xFact, const Fractio NbcMirrorGluePoints(aRef1,aRef2); } } - Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); + tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); ResizePoint(aRefPoint,rRef,xFact,yFact); if (pSub->GetObjCount()!=0) { // move the connectors first, everything else afterwards @@ -611,7 +611,7 @@ void SdrObjGroup::Rotate(const Point& rRef, long nAngle, double sn, double cs) { if (nAngle!=0) { SetGlueReallyAbsolute(true); - Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); + tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); RotatePoint(aRefPoint,rRef,sn,cs); // move the connectors first, everything else afterwards SdrObjList* pOL=pSub.get(); @@ -636,7 +636,7 @@ void SdrObjGroup::Rotate(const Point& rRef, long nAngle, double sn, double cs) void SdrObjGroup::Mirror(const Point& rRef1, const Point& rRef2) { SetGlueReallyAbsolute(true); - Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); + tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); MirrorPoint(aRefPoint,rRef1,rRef2); // implementation missing in SvdEtc! // move the connectors first, everything else afterwards SdrObjList* pOL=pSub.get(); @@ -661,7 +661,7 @@ void SdrObjGroup::Shear(const Point& rRef, long nAngle, double tn, bool bVShear) { if (nAngle!=0) { SetGlueReallyAbsolute(true); - Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); + tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); ShearPoint(aRefPoint,rRef,tn); // move the connectors first, everything else afterwards SdrObjList* pOL=pSub.get(); @@ -685,7 +685,7 @@ void SdrObjGroup::Shear(const Point& rRef, long nAngle, double tn, bool bVShear) void SdrObjGroup::SetAnchorPos(const Point& rPnt) { - Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); + tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); bool bChg=aAnchor!=rPnt; aAnchor=rPnt; Size aSiz(rPnt.X()-aAnchor.X(),rPnt.Y()-aAnchor.Y()); diff --git a/svx/source/svdraw/svdomeas.cxx b/svx/source/svdraw/svdomeas.cxx index c29523910dd3..7f4654b211dd 100644 --- a/svx/source/svdraw/svdomeas.cxx +++ b/svx/source/svdraw/svdomeas.cxx @@ -634,7 +634,7 @@ void SdrMeasureObj::UndirtyText() const } } -void SdrMeasureObj::TakeUnrotatedSnapRect(Rectangle& rRect) const +void SdrMeasureObj::TakeUnrotatedSnapRect(tools::Rectangle& rRect) const { if (bTextDirty) UndirtyText(); ImpMeasureRec aRec; @@ -719,7 +719,7 @@ void SdrMeasureObj::TakeUnrotatedSnapRect(Rectangle& rRect) const } RotatePoint(aTextPos,aPt1b,aMPol.nLineSin,aMPol.nLineCos); aTextSize2.Width()++; aTextSize2.Height()++; // because of the Rect-Ctor's odd behavior - rRect=Rectangle(aTextPos,aTextSize2); + rRect=tools::Rectangle(aTextPos,aTextSize2); rRect.Justify(); const_cast<SdrMeasureObj*>(this)->maRect=rRect; @@ -1294,20 +1294,20 @@ void SdrMeasureObj::NbcSetOutlinerParaObject(OutlinerParaObject* pTextObject) SetTextDirty(); // recalculate text } -void SdrMeasureObj::TakeTextRect( SdrOutliner& rOutliner, Rectangle& rTextRect, bool bNoEditText, - Rectangle* pAnchorRect, bool bLineWidth ) const +void SdrMeasureObj::TakeTextRect( SdrOutliner& rOutliner, tools::Rectangle& rTextRect, bool bNoEditText, + tools::Rectangle* pAnchorRect, bool bLineWidth ) const { if (bTextDirty) UndirtyText(); SdrTextObj::TakeTextRect( rOutliner, rTextRect, bNoEditText, pAnchorRect, bLineWidth ); } -void SdrMeasureObj::TakeTextAnchorRect(Rectangle& rAnchorRect) const +void SdrMeasureObj::TakeTextAnchorRect(tools::Rectangle& rAnchorRect) const { if (bTextDirty) UndirtyText(); SdrTextObj::TakeTextAnchorRect(rAnchorRect); } -void SdrMeasureObj::TakeTextEditArea(Size* pPaperMin, Size* pPaperMax, Rectangle* pViewInit, Rectangle* pViewMin) const +void SdrMeasureObj::TakeTextEditArea(Size* pPaperMin, Size* pPaperMax, tools::Rectangle* pViewInit, tools::Rectangle* pViewMin) const { if (bTextDirty) UndirtyText(); SdrTextObj::TakeTextEditArea(pPaperMin,pPaperMax,pViewInit,pViewMin); @@ -1469,7 +1469,7 @@ void SdrMeasureObj::TRSetBaseGeometry(const basegfx::B2DHomMatrix& rMatrix, cons if(aNewPt1 != aPt1 || aNewPt2 != aPt2) { // set model values and broadcast - Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); + tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); aPt1 = aNewPt1; aPt2 = aNewPt2; diff --git a/svx/source/svdraw/svdomedia.cxx b/svx/source/svdraw/svdomedia.cxx index 993ebd93b213..d80f5206ac17 100644 --- a/svx/source/svdraw/svdomedia.cxx +++ b/svx/source/svdraw/svdomedia.cxx @@ -82,7 +82,7 @@ SdrMediaObj::SdrMediaObj() { } -SdrMediaObj::SdrMediaObj( const Rectangle& rRect ) +SdrMediaObj::SdrMediaObj( const tools::Rectangle& rRect ) : SdrRectObj( rRect ) , m_xImpl( new Impl ) { @@ -182,7 +182,7 @@ const uno::Reference< graphic::XGraphic > SdrMediaObj::getSnapshot() const return m_xImpl->m_xCachedSnapshot; } -void SdrMediaObj::AdjustToMaxRect( const Rectangle& rMaxRect, bool bShrinkOnly /* = false */ ) +void SdrMediaObj::AdjustToMaxRect( const tools::Rectangle& rMaxRect, bool bShrinkOnly /* = false */ ) { Size aSize( Application::GetDefaultDevice()->PixelToLogic( static_cast< sdr::contact::ViewContactOfSdrMediaObj& >( GetViewContact() ).getPreferredSize(), @@ -224,7 +224,7 @@ void SdrMediaObj::AdjustToMaxRect( const Rectangle& rMaxRect, bool bShrinkOnly / aPos.X() -= aSize.Width() / 2; aPos.Y() -= aSize.Height() / 2; - SetLogicRect( Rectangle( aPos, aSize ) ); + SetLogicRect( tools::Rectangle( aPos, aSize ) ); } } diff --git a/svx/source/svdraw/svdoole2.cxx b/svx/source/svdraw/svdoole2.cxx index 030cafcc8490..368417306bac 100644 --- a/svx/source/svdraw/svdoole2.cxx +++ b/svx/source/svdraw/svdoole2.cxx @@ -134,7 +134,7 @@ public: void setWindow(const uno::Reference< awt::XWindow >& _xWindow); private: - Rectangle impl_getScaledRect_nothrow() const; + tools::Rectangle impl_getScaledRect_nothrow() const; // XStateChangeListener virtual void SAL_CALL changingState( const css::lang::EventObject& aEvent, ::sal_Int32 nOldState, ::sal_Int32 nNewState ) override; virtual void SAL_CALL stateChanged( const css::lang::EventObject& aEvent, ::sal_Int32 nOldState, ::sal_Int32 nNewState ) override; @@ -172,9 +172,9 @@ SdrLightEmbeddedClient_Impl::SdrLightEmbeddedClient_Impl( SdrOle2Obj* pObj ) : mpObj( pObj ) { } -Rectangle SdrLightEmbeddedClient_Impl::impl_getScaledRect_nothrow() const +tools::Rectangle SdrLightEmbeddedClient_Impl::impl_getScaledRect_nothrow() const { - Rectangle aLogicRect( mpObj->GetLogicRect() ); + tools::Rectangle aLogicRect( mpObj->GetLogicRect() ); // apply scaling to object area and convert to pixels aLogicRect.SetSize( Size( Fraction( aLogicRect.GetWidth() ) * m_aScaleWidth, Fraction( aLogicRect.GetHeight() ) * m_aScaleHeight ) ); @@ -236,7 +236,7 @@ void SAL_CALL SdrLightEmbeddedClient_Impl::notifyEvent( const document::EventObj MapUnit aObjMapUnit = VCLUnoHelper::UnoEmbed2VCLMapUnit( mpObj->GetObjRef()->getMapUnit( mpObj->GetAspect() ) ); - Rectangle aVisArea; + tools::Rectangle aVisArea; awt::Size aSz; try { @@ -259,7 +259,7 @@ void SAL_CALL SdrLightEmbeddedClient_Impl::notifyEvent( const document::EventObj aVisArea = OutputDevice::LogicToLogic( aVisArea, aObjMapUnit, aContainerMapUnit ); Size aScaledSize( static_cast< long >( m_aScaleWidth * Fraction( aVisArea.GetWidth() ) ), static_cast< long >( m_aScaleHeight * Fraction( aVisArea.GetHeight() ) ) ); - Rectangle aLogicRect( mpObj->GetLogicRect() ); + tools::Rectangle aLogicRect( mpObj->GetLogicRect() ); // react to the change if the difference is bigger than one pixel Size aPixelDiff = @@ -269,7 +269,7 @@ void SAL_CALL SdrLightEmbeddedClient_Impl::notifyEvent( const document::EventObj aContainerMapUnit ); if( aPixelDiff.Width() || aPixelDiff.Height() ) { - mpObj->SetLogicRect( Rectangle( aLogicRect.TopLeft(), aScaledSize ) ); + mpObj->SetLogicRect( tools::Rectangle( aLogicRect.TopLeft(), aScaledSize ) ); mpObj->BroadcastObjectChange(); } else @@ -311,13 +311,13 @@ void SAL_CALL SdrLightEmbeddedClient_Impl::visibilityChanged( sal_Bool /*bVisibl // TODO/LATER: when writer uses this implementation the code could be shared with SfxInPlaceClient_Impl if ( mpObj ) { - Rectangle aLogicRect( mpObj->GetLogicRect() ); + tools::Rectangle aLogicRect( mpObj->GetLogicRect() ); Size aLogicSize( aLogicRect.GetWidth(), aLogicRect.GetHeight() ); if( mpObj->IsChart() ) { //charts never should be stretched see #i84323# for example - mpObj->SetLogicRect( Rectangle( aLogicRect.TopLeft(), aLogicSize ) ); + mpObj->SetLogicRect( tools::Rectangle( aLogicRect.TopLeft(), aLogicSize ) ); mpObj->BroadcastObjectChange(); } // if( mpObj->IsChart() ) } @@ -442,7 +442,7 @@ awt::Rectangle SAL_CALL SdrLightEmbeddedClient_Impl::getPlacement() if ( !mpObj ) throw uno::RuntimeException(); - Rectangle aLogicRect = impl_getScaledRect_nothrow(); + tools::Rectangle aLogicRect = impl_getScaledRect_nothrow(); MapUnit aContainerMapUnit( MapUnit::Map100thMM ); uno::Reference< embed::XVisualObject > xParentVis( mpObj->GetParentXModel(), uno::UNO_QUERY ); if ( xParentVis.is() ) @@ -475,8 +475,8 @@ void SAL_CALL SdrLightEmbeddedClient_Impl::changedPlacement( const awt::Rectangl // check if the change is at least one pixel in size awt::Rectangle aOldRect = getPlacement(); - Rectangle aNewPixelRect = VCLRectangle( aPosRect ); - Rectangle aOldPixelRect = VCLRectangle( aOldRect ); + tools::Rectangle aNewPixelRect = VCLRectangle( aPosRect ); + tools::Rectangle aOldPixelRect = VCLRectangle( aOldRect ); if ( aOldPixelRect == aNewPixelRect ) // nothing has changed return; @@ -487,8 +487,8 @@ void SAL_CALL SdrLightEmbeddedClient_Impl::changedPlacement( const awt::Rectangl if ( xParentVis.is() ) aContainerMapUnit = VCLUnoHelper::UnoEmbed2VCLMapUnit( xParentVis->getMapUnit( mpObj->GetAspect() ) ); - Rectangle aNewLogicRect = Application::GetDefaultDevice()->PixelToLogic(aNewPixelRect,aContainerMapUnit); - Rectangle aLogicRect = impl_getScaledRect_nothrow(); + tools::Rectangle aNewLogicRect = Application::GetDefaultDevice()->PixelToLogic(aNewPixelRect,aContainerMapUnit); + tools::Rectangle aLogicRect = impl_getScaledRect_nothrow(); if ( aNewLogicRect != aLogicRect ) { @@ -510,7 +510,7 @@ void SAL_CALL SdrLightEmbeddedClient_Impl::changedPlacement( const awt::Rectangl aContainerMapUnit ); if( aPixelDiff.Width() || aPixelDiff.Height() ) { - mpObj->SetLogicRect( Rectangle( aLogicRect.TopLeft(), aNewObjSize ) ); + mpObj->SetLogicRect( tools::Rectangle( aLogicRect.TopLeft(), aNewObjSize ) ); mpObj->BroadcastObjectChange(); } else @@ -700,7 +700,7 @@ SdrOle2Obj::SdrOle2Obj( bool bFrame_ ) : { } -SdrOle2Obj::SdrOle2Obj( const svt::EmbeddedObjectRef& rNewObjRef, const OUString& rNewObjName, const Rectangle& rNewRect) : +SdrOle2Obj::SdrOle2Obj( const svt::EmbeddedObjectRef& rNewObjRef, const OUString& rNewObjName, const tools::Rectangle& rNewRect) : SdrRectObj(rNewRect), mpImpl(new SdrOle2ObjImpl(false/*bFrame_*/, rNewObjRef)) { @@ -1644,7 +1644,7 @@ void SdrOle2Obj::ImpSetVisAreaSize() catch( embed::NoVisualAreaSizeException& ) {} - Rectangle aAcceptedVisArea; + tools::Rectangle aAcceptedVisArea; aAcceptedVisArea.SetSize( Size( (long)( Fraction( long( aSz.Width ) ) * aScaleWidth ), (long)( Fraction( long( aSz.Height ) ) * aScaleHeight ) ) ); if (aVisSize != aAcceptedVisArea.GetSize()) @@ -1680,7 +1680,7 @@ void SdrOle2Obj::ImpSetVisAreaSize() { if ( pClient ) { - Rectangle aScaleRect(maRect.TopLeft(), aObjAreaSize); + tools::Rectangle aScaleRect(maRect.TopLeft(), aObjAreaSize); pClient->SetObjAreaAndScale( aScaleRect, aScaleWidth, aScaleHeight); } else @@ -1703,7 +1703,7 @@ void SdrOle2Obj::ImpSetVisAreaSize() Point aBR( maRect.BottomRight() ); Point aTL2( OutputDevice::LogicToLogic( aTL, pModel->GetScaleUnit(), aMapUnit) ); Point aBR2( OutputDevice::LogicToLogic( aBR, pModel->GetScaleUnit(), aMapUnit) ); - Rectangle aNewRect( aTL2, aBR2 ); + tools::Rectangle aNewRect( aTL2, aBR2 ); xVisualObject->setVisualAreaSize( GetAspect(), awt::Size( aNewRect.GetWidth(), aNewRect.GetHeight() ) ); } } @@ -1737,7 +1737,7 @@ void SdrOle2Obj::SetGeoData(const SdrObjGeoData& rGeo) ImpSetVisAreaSize(); } -void SdrOle2Obj::NbcSetSnapRect(const Rectangle& rRect) +void SdrOle2Obj::NbcSetSnapRect(const tools::Rectangle& rRect) { SdrRectObj::NbcSetSnapRect(rRect); @@ -1753,7 +1753,7 @@ void SdrOle2Obj::NbcSetSnapRect(const Rectangle& rRect) } } -void SdrOle2Obj::NbcSetLogicRect(const Rectangle& rRect) +void SdrOle2Obj::NbcSetLogicRect(const tools::Rectangle& rRect) { SdrRectObj::NbcSetLogicRect(rRect); diff --git a/svx/source/svdraw/svdopage.cxx b/svx/source/svdraw/svdopage.cxx index 02f2dfcbceaf..d1117caff580 100644 --- a/svx/source/svdraw/svdopage.cxx +++ b/svx/source/svdraw/svdopage.cxx @@ -74,7 +74,7 @@ SdrPageObj::SdrPageObj(SdrPage* pNewPage) } } -SdrPageObj::SdrPageObj(const Rectangle& rRect, SdrPage* pNewPage) +SdrPageObj::SdrPageObj(const tools::Rectangle& rRect, SdrPage* pNewPage) : mpShownPage(pNewPage) { if(mpShownPage) diff --git a/svx/source/svdraw/svdopath.cxx b/svx/source/svdraw/svdopath.cxx index 91a03fad70a3..595c004b531e 100644 --- a/svx/source/svdraw/svdopath.cxx +++ b/svx/source/svdraw/svdopath.cxx @@ -742,7 +742,7 @@ bool ImpPathForDragAndCreate::movePathDrag( SdrDragStat& rDrag ) const if (bPnt1) rDrag.Now()=aNeuPos1; if (bPnt2) rDrag.Now()=aNeuPos2; } - rDrag.SetActionRect(Rectangle(rDrag.GetNow(),rDrag.GetNow())); + rDrag.SetActionRect(tools::Rectangle(rDrag.GetNow(),rDrag.GetNow())); // specially for IBM: Eliminate points if both adjoining lines form near 180 degrees angle anyway if (!bControl && rDrag.GetView()!=nullptr && rDrag.GetView()->IsEliminatePolyPoints() && @@ -1694,11 +1694,11 @@ static bool lcl_ImpIsLine(const basegfx::B2DPolyPolygon& rPolyPolygon) return (1L == rPolyPolygon.count() && 2L == rPolyPolygon.getB2DPolygon(0L).count()); } -static Rectangle lcl_ImpGetBoundRect(const basegfx::B2DPolyPolygon& rPolyPolygon) +static tools::Rectangle lcl_ImpGetBoundRect(const basegfx::B2DPolyPolygon& rPolyPolygon) { basegfx::B2DRange aRange(basegfx::tools::getRange(rPolyPolygon)); - return Rectangle( + return tools::Rectangle( FRound(aRange.getMinX()), FRound(aRange.getMinY()), FRound(aRange.getMaxX()), FRound(aRange.getMaxY())); } @@ -1720,7 +1720,7 @@ void SdrPathObj::ImpForceLineAngle() aGeo.RecalcTan(); // for SdrTextObj, keep aRect up to date - maRect = Rectangle(aPoint0, aPoint1); + maRect = tools::Rectangle(aPoint0, aPoint1); maRect.Justify(); } } @@ -2415,7 +2415,7 @@ void SdrPathObj::NbcMirror(const Point& rRefPnt1, const Point& rRefPnt2) SdrTextObj::NbcMirror(rRefPnt1,rRefPnt2); } -void SdrPathObj::TakeUnrotatedSnapRect(Rectangle& rRect) const +void SdrPathObj::TakeUnrotatedSnapRect(tools::Rectangle& rRect) const { if(!aGeo.nRotationAngle) { @@ -2441,9 +2441,9 @@ void SdrPathObj::RecalcSnapRect() } } -void SdrPathObj::NbcSetSnapRect(const Rectangle& rRect) +void SdrPathObj::NbcSetSnapRect(const tools::Rectangle& rRect) { - Rectangle aOld(GetSnapRect()); + tools::Rectangle aOld(GetSnapRect()); // Take RECT_EMPTY into account when calculating scale factors long nMulX = (RECT_EMPTY == rRect.Right()) ? 0 : rRect.Right() - rRect.Left(); @@ -2810,7 +2810,7 @@ void SdrPathObj::SetPathPoly(const basegfx::B2DPolyPolygon& rPathPoly) { if(GetPathPoly() != rPathPoly) { - Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); + tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); NbcSetPathPoly(rPathPoly); SetChanged(); BroadcastObjectChange(); @@ -2820,7 +2820,7 @@ void SdrPathObj::SetPathPoly(const basegfx::B2DPolyPolygon& rPathPoly) void SdrPathObj::ToggleClosed() { - Rectangle aBoundRect0; + tools::Rectangle aBoundRect0; if(pUserCall != nullptr) aBoundRect0 = GetLastBoundRect(); ImpSetClosed(!IsClosed()); // set new ObjKind diff --git a/svx/source/svdraw/svdorect.cxx b/svx/source/svdraw/svdorect.cxx index 8e07df00e16c..52b706497f8e 100644 --- a/svx/source/svdraw/svdorect.cxx +++ b/svx/source/svdraw/svdorect.cxx @@ -68,7 +68,7 @@ SdrRectObj::SdrRectObj() bClosedObj=true; } -SdrRectObj::SdrRectObj(const Rectangle& rRect) +SdrRectObj::SdrRectObj(const tools::Rectangle& rRect) : SdrTextObj(rRect), mpXPoly(nullptr) { @@ -85,7 +85,7 @@ SdrRectObj::SdrRectObj(SdrObjKind eNewTextKind) bClosedObj=true; } -SdrRectObj::SdrRectObj(SdrObjKind eNewTextKind, const Rectangle& rRect) +SdrRectObj::SdrRectObj(SdrObjKind eNewTextKind, const tools::Rectangle& rRect) : SdrTextObj(eNewTextKind,rRect), mpXPoly(nullptr) { @@ -119,7 +119,7 @@ void SdrRectObj::SetXPolyDirty() mpXPoly.reset(); } -XPolygon SdrRectObj::ImpCalcXPoly(const Rectangle& rRect1, long nRad1) const +XPolygon SdrRectObj::ImpCalcXPoly(const tools::Rectangle& rRect1, long nRad1) const { XPolygon aXPoly(rRect1,nRad1,nRad1); const sal_uInt16 nPointAnz(aXPoly.GetPointCount()); @@ -194,7 +194,7 @@ sal_uInt16 SdrRectObj::GetObjIdentifier() const else return sal_uInt16(OBJ_RECT); } -void SdrRectObj::TakeUnrotatedSnapRect(Rectangle& rRect) const +void SdrRectObj::TakeUnrotatedSnapRect(tools::Rectangle& rRect) const { rRect = maRect; if (aGeo.nShearAngle!=0) @@ -293,13 +293,13 @@ void SdrRectObj::RecalcSnapRect() } } -void SdrRectObj::NbcSetSnapRect(const Rectangle& rRect) +void SdrRectObj::NbcSetSnapRect(const tools::Rectangle& rRect) { SdrTextObj::NbcSetSnapRect(rRect); SetXPolyDirty(); } -void SdrRectObj::NbcSetLogicRect(const Rectangle& rRect) +void SdrRectObj::NbcSetLogicRect(const tools::Rectangle& rRect) { SdrTextObj::NbcSetLogicRect(rRect); SetXPolyDirty(); @@ -467,7 +467,7 @@ OUString SdrRectObj::getSpecialDragComment(const SdrDragStat& rDrag) const basegfx::B2DPolyPolygon SdrRectObj::TakeCreatePoly(const SdrDragStat& rDrag) const { - Rectangle aRect1; + tools::Rectangle aRect1; rDrag.TakeCreateRect(aRect1); aRect1.Justify(); diff --git a/svx/source/svdraw/svdotext.cxx b/svx/source/svdraw/svdotext.cxx index 25b8d527ae63..abbdb1117585 100644 --- a/svx/source/svdraw/svdotext.cxx +++ b/svx/source/svdraw/svdotext.cxx @@ -103,7 +103,7 @@ SdrTextObj::SdrTextObj() mbInDownScale = false; } -SdrTextObj::SdrTextObj(const Rectangle& rNewRect) +SdrTextObj::SdrTextObj(const tools::Rectangle& rNewRect) : SdrAttrObj(), maRect(rNewRect), mpText(nullptr), @@ -149,7 +149,7 @@ SdrTextObj::SdrTextObj(SdrObjKind eNewTextKind) mbSupportTextIndentingOnLineWidthChange = true; } -SdrTextObj::SdrTextObj(SdrObjKind eNewTextKind, const Rectangle& rNewRect) +SdrTextObj::SdrTextObj(SdrObjKind eNewTextKind, const tools::Rectangle& rNewRect) : SdrAttrObj(), maRect(rNewRect), mpText(nullptr), @@ -204,7 +204,7 @@ void SdrTextObj::FitFrameToTextSize() aNewSize.Width()++; // because of possible rounding errors aNewSize.Width()+=GetTextLeftDistance()+GetTextRightDistance(); aNewSize.Height()+=GetTextUpperDistance()+GetTextLowerDistance(); - Rectangle aNewRect(maRect); + tools::Rectangle aNewRect(maRect); aNewRect.SetSize(aNewSize); ImpJustifyRect(aNewRect); if (aNewRect!=maRect) { @@ -229,7 +229,7 @@ void SdrTextObj::NbcSetText(const OUString& rStr) void SdrTextObj::SetText(const OUString& rStr) { - Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); + tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); NbcSetText(rStr); SetChanged(); BroadcastObjectChange(); @@ -252,7 +252,7 @@ void SdrTextObj::NbcSetText(SvStream& rInput, const OUString& rBaseURL, sal_uInt void SdrTextObj::SetText(SvStream& rInput, const OUString& rBaseURL, sal_uInt16 eFormat) { - Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); + tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); NbcSetText(rInput,rBaseURL,eFormat); SetChanged(); BroadcastObjectChange(); @@ -397,7 +397,7 @@ SdrTextVertAdjust SdrTextObj::GetTextVerticalAdjust(const SfxItemSet& rSet) cons return eRet; } // defaults: TOP for text frame, CENTER for captions of drawing objects -void SdrTextObj::ImpJustifyRect(Rectangle& rRect) +void SdrTextObj::ImpJustifyRect(tools::Rectangle& rRect) { if (!rRect.IsEmpty()) { rRect.Justify(); @@ -581,7 +581,7 @@ void SdrTextObj::AdaptTextMinSize() SetObjectItemSet(aSet); } -void SdrTextObj::ImpSetContourPolygon( SdrOutliner& rOutliner, Rectangle& rAnchorRect, bool bLineWidth ) const +void SdrTextObj::ImpSetContourPolygon( SdrOutliner& rOutliner, tools::Rectangle& rAnchorRect, bool bLineWidth ) const { basegfx::B2DPolyPolygon aXorPolyPolygon(TakeXorPoly()); basegfx::B2DPolyPolygon* pContourPolyPolygon = nullptr; @@ -639,18 +639,18 @@ void SdrTextObj::ImpSetContourPolygon( SdrOutliner& rOutliner, Rectangle& rAncho delete pContourPolyPolygon; } -void SdrTextObj::TakeUnrotatedSnapRect(Rectangle& rRect) const +void SdrTextObj::TakeUnrotatedSnapRect(tools::Rectangle& rRect) const { rRect=maRect; } -void SdrTextObj::TakeTextAnchorRect(Rectangle& rAnchorRect) const +void SdrTextObj::TakeTextAnchorRect(tools::Rectangle& rAnchorRect) const { long nLeftDist=GetTextLeftDistance(); long nRightDist=GetTextRightDistance(); long nUpperDist=GetTextUpperDistance(); long nLowerDist=GetTextLowerDistance(); - Rectangle aAnkRect(maRect); // the rectangle in which we anchor + tools::Rectangle aAnkRect(maRect); // the rectangle in which we anchor bool bFrame=IsTextFrame(); if (!bFrame) { TakeUnrotatedSnapRect(aAnkRect); @@ -679,10 +679,10 @@ void SdrTextObj::TakeTextAnchorRect(Rectangle& rAnchorRect) const rAnchorRect=aAnkRect; } -void SdrTextObj::TakeTextRect( SdrOutliner& rOutliner, Rectangle& rTextRect, bool bNoEditText, - Rectangle* pAnchorRect, bool bLineWidth ) const +void SdrTextObj::TakeTextRect( SdrOutliner& rOutliner, tools::Rectangle& rTextRect, bool bNoEditText, + tools::Rectangle* pAnchorRect, bool bLineWidth ) const { - Rectangle aAnkRect; // the rectangle in which we anchor + tools::Rectangle aAnkRect; // the rectangle in which we anchor TakeTextAnchorRect(aAnkRect); SdrTextVertAdjust eVAdj=GetTextVerticalAdjust(); SdrTextHorzAdjust eHAdj=GetTextHorizontalAdjust(); @@ -846,7 +846,7 @@ void SdrTextObj::TakeTextRect( SdrOutliner& rOutliner, Rectangle& rTextRect, boo *pAnchorRect=aAnkRect; // rTextRect might not be correct in some cases at ContourFrame - rTextRect=Rectangle(aTextPos,aTextSiz); + rTextRect=tools::Rectangle(aTextPos,aTextSiz); if (bContourFrame) rTextRect=aAnkRect; } @@ -1126,8 +1126,8 @@ basegfx::B2DPolyPolygon SdrTextObj::TakeContour() const // in every case SdrOutliner& rOutliner=ImpGetDrawOutliner(); - Rectangle aAnchor2; - Rectangle aR; + tools::Rectangle aAnchor2; + tools::Rectangle aR; TakeTextRect(rOutliner,aR,false,&aAnchor2); rOutliner.Clear(); bool bFitToSize(IsFitToSize()); @@ -1233,9 +1233,9 @@ SdrOutliner& SdrTextObj::ImpGetDrawOutliner() const // Extracted from Paint() void SdrTextObj::ImpSetupDrawOutlinerForPaint( bool bContourFrame, SdrOutliner& rOutliner, - Rectangle& rTextRect, - Rectangle& rAnchorRect, - Rectangle& rPaintRect, + tools::Rectangle& rTextRect, + tools::Rectangle& rAnchorRect, + tools::Rectangle& rPaintRect, Fraction& rFitXKorreg ) const { if (!bContourFrame) @@ -1337,16 +1337,16 @@ void SdrTextObj::ImpAutoFitText( SdrOutliner& rOutliner, const Size& rTextSize, std::min(sal_uInt16(100),nMinStretchY)); } -void SdrTextObj::SetupOutlinerFormatting( SdrOutliner& rOutl, Rectangle& rPaintRect ) const +void SdrTextObj::SetupOutlinerFormatting( SdrOutliner& rOutl, tools::Rectangle& rPaintRect ) const { ImpInitDrawOutliner( rOutl ); UpdateOutlinerFormatting( rOutl, rPaintRect ); } -void SdrTextObj::UpdateOutlinerFormatting( SdrOutliner& rOutl, Rectangle& rPaintRect ) const +void SdrTextObj::UpdateOutlinerFormatting( SdrOutliner& rOutl, tools::Rectangle& rPaintRect ) const { - Rectangle aTextRect; - Rectangle aAnchorRect; + tools::Rectangle aTextRect; + tools::Rectangle aAnchorRect; Fraction aFitXKorreg(1,1); bool bContourFrame=IsContourTextFrame(); @@ -1441,7 +1441,7 @@ void SdrTextObj::ReformatText() { if(GetOutlinerParaObject()) { - Rectangle aBoundRect0; + tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); @@ -1484,7 +1484,7 @@ SdrFitToSizeType SdrTextObj::GetFitToSize() const return eType; } -const Rectangle& SdrTextObj::GetGeoRect() const +const tools::Rectangle& SdrTextObj::GetGeoRect() const { return maRect; } @@ -1549,7 +1549,7 @@ void SdrTextObj::SetVerticalWriting(bool bVertical) SdrTextVertAdjust eVert = static_cast<const SdrTextVertAdjustItem&>(rSet.Get(SDRATTR_TEXT_VERTADJUST)).GetValue(); // rescue object size - Rectangle aObjectRect = GetSnapRect(); + tools::Rectangle aObjectRect = GetSnapRect(); // prepare ItemSet to set exchanged width and height items SfxItemSet aNewSet(*rSet.GetPool(), @@ -1609,7 +1609,7 @@ bool SdrTextObj::TRGetBaseGeometry(basegfx::B2DHomMatrix& rMatrix, basegfx::B2DP double fShearX = (aGeo.nShearAngle / 100.0) * F_PI180; // get aRect, this is the unrotated snaprect - Rectangle aRectangle(maRect); + tools::Rectangle aRectangle(maRect); // fill other values basegfx::B2DTuple aScale(aRectangle.GetWidth(), aRectangle.GetHeight()); @@ -1726,7 +1726,7 @@ void SdrTextObj::TRSetBaseGeometry(const basegfx::B2DHomMatrix& rMatrix, const b // build and set BaseRect (use scale) Point aPoint = Point(); Size aSize(FRound(aScale.getX()), FRound(aScale.getY())); - Rectangle aBaseRect(aPoint, aSize); + tools::Rectangle aBaseRect(aPoint, aSize); SetSnapRect(aBaseRect); // flip? @@ -1851,13 +1851,13 @@ SdrTextAniDirection SdrTextObj::GetTextAniDirection() const // Get necessary data for text scroll animation. ATM base it on a Text-Metafile and a // painting rectangle. Rotation is excluded from the returned values. GDIMetaFile* SdrTextObj::GetTextScrollMetaFileAndRectangle( - Rectangle& rScrollRectangle, Rectangle& rPaintRectangle) + tools::Rectangle& rScrollRectangle, tools::Rectangle& rPaintRectangle) { GDIMetaFile* pRetval = nullptr; SdrOutliner& rOutliner = ImpGetDrawOutliner(); - Rectangle aTextRect; - Rectangle aAnchorRect; - Rectangle aPaintRect; + tools::Rectangle aTextRect; + tools::Rectangle aAnchorRect; + tools::Rectangle aPaintRect; Fraction aFitXKorreg(1,1); bool bContourFrame(IsContourTextFrame()); @@ -1868,7 +1868,7 @@ GDIMetaFile* SdrTextObj::GetTextScrollMetaFileAndRectangle( ImpSetupDrawOutlinerForPaint( bContourFrame, rOutliner, aTextRect, aAnchorRect, aPaintRect, aFitXKorreg ); aGeo.nRotationAngle = nAngle; - Rectangle aScrollFrameRect(aPaintRect); + tools::Rectangle aScrollFrameRect(aPaintRect); const SfxItemSet& rSet = GetObjectItemSet(); SdrTextAniDirection eDirection = static_cast<const SdrTextAniDirectionItem&>(rSet.Get(SDRATTR_TEXT_ANIDIRECTION)).GetValue(); diff --git a/svx/source/svdraw/svdotxat.cxx b/svx/source/svdraw/svdotxat.cxx index 8c6b575df6c4..cf29c117594b 100644 --- a/svx/source/svdraw/svdotxat.cxx +++ b/svx/source/svdraw/svdotxat.cxx @@ -56,7 +56,7 @@ const short PADDING_LENGTH_FOR_STYLE_FAMILY = 5; const sal_Char PADDING_CHARACTER_FOR_STYLE_FAMILY = ' '; } -bool SdrTextObj::AdjustTextFrameWidthAndHeight( Rectangle& rR, bool bHgt, bool bWdt ) const +bool SdrTextObj::AdjustTextFrameWidthAndHeight( tools::Rectangle& rR, bool bHgt, bool bWdt ) const { if (!bTextFrame) // Not a text frame. Bail out. @@ -87,7 +87,7 @@ bool SdrTextObj::AdjustTextFrameWidthAndHeight( Rectangle& rR, bool bHgt, bool b bool bHScroll = bScroll && (eAniDir == SdrTextAniDirection::Left || eAniDir == SdrTextAniDirection::Right); bool bVScroll = bScroll && (eAniDir == SdrTextAniDirection::Up || eAniDir == SdrTextAniDirection::Down); - Rectangle aOldRect = rR; + tools::Rectangle aOldRect = rR; long nHgt = 0, nMinHgt = 0, nMaxHgt = 0; long nWdt = 0, nMinWdt = 0, nMaxWdt = 0; @@ -275,10 +275,10 @@ bool SdrTextObj::NbcAdjustTextFrameWidthAndHeight(bool bHgt, bool bWdt) bool SdrTextObj::AdjustTextFrameWidthAndHeight() { - Rectangle aNeuRect(maRect); + tools::Rectangle aNeuRect(maRect); bool bRet=AdjustTextFrameWidthAndHeight(aNeuRect); if (bRet) { - Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); + tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); maRect = aNeuRect; SetRectsDirty(); if (dynamic_cast<const SdrRectObj *>(this) != nullptr) { // this is a hack diff --git a/svx/source/svdraw/svdotxdr.cxx b/svx/source/svdraw/svdotxdr.cxx index 93b0fad4aac1..4c020a82bfdf 100644 --- a/svx/source/svdraw/svdotxdr.cxx +++ b/svx/source/svdraw/svdotxdr.cxx @@ -68,9 +68,9 @@ bool SdrTextObj::hasSpecialDrag() const return true; } -Rectangle SdrTextObj::ImpDragCalcRect(const SdrDragStat& rDrag) const +tools::Rectangle SdrTextObj::ImpDragCalcRect(const SdrDragStat& rDrag) const { - Rectangle aTmpRect(maRect); + tools::Rectangle aTmpRect(maRect); const SdrHdl* pHdl=rDrag.GetHdl(); SdrHdlKind eHdl=pHdl==nullptr ? SdrHdlKind::Move : pHdl->GetKind(); bool bEcke=(eHdl==SdrHdlKind::UpperLeft || eHdl==SdrHdlKind::UpperRight || eHdl==SdrHdlKind::LowerLeft || eHdl==SdrHdlKind::LowerRight); @@ -147,7 +147,7 @@ Rectangle SdrTextObj::ImpDragCalcRect(const SdrDragStat& rDrag) const bool SdrTextObj::applySpecialDrag(SdrDragStat& rDrag) { - Rectangle aNewRect(ImpDragCalcRect(rDrag)); + tools::Rectangle aNewRect(ImpDragCalcRect(rDrag)); if(aNewRect.TopLeft() != maRect.TopLeft() && (aGeo.nRotationAngle || aGeo.nShearAngle)) { @@ -183,7 +183,7 @@ OUString SdrTextObj::getSpecialDragComment(const SdrDragStat& /*rDrag*/) const bool SdrTextObj::BegCreate(SdrDragStat& rStat) { rStat.SetOrtho4Possible(); - Rectangle aRect1(rStat.GetStart(), rStat.GetNow()); + tools::Rectangle aRect1(rStat.GetStart(), rStat.GetNow()); aRect1.Justify(); rStat.SetActionRect(aRect1); maRect = aRect1; @@ -192,7 +192,7 @@ bool SdrTextObj::BegCreate(SdrDragStat& rStat) bool SdrTextObj::MovCreate(SdrDragStat& rStat) { - Rectangle aRect1; + tools::Rectangle aRect1; rStat.TakeCreateRect(aRect1); ImpJustifyRect(aRect1); rStat.SetActionRect(aRect1); @@ -230,7 +230,7 @@ bool SdrTextObj::BckCreate(SdrDragStat& /*rStat*/) basegfx::B2DPolyPolygon SdrTextObj::TakeCreatePoly(const SdrDragStat& rDrag) const { - Rectangle aRect1; + tools::Rectangle aRect1; rDrag.TakeCreateRect(aRect1); aRect1.Justify(); diff --git a/svx/source/svdraw/svdotxed.cxx b/svx/source/svdraw/svdotxed.cxx index 5368dc0c0e17..35b34a36c1de 100644 --- a/svx/source/svdraw/svdotxed.cxx +++ b/svx/source/svdraw/svdotxed.cxx @@ -102,8 +102,8 @@ bool SdrTextObj::BegTextEdit(SdrOutliner& rOutl) } if (bFitToSize) { - Rectangle aAnchorRect; - Rectangle aTextRect; + tools::Rectangle aAnchorRect; + tools::Rectangle aTextRect; TakeTextRect(rOutl, aTextRect, false, &aAnchorRect); Fraction aFitXKorreg(1,1); @@ -134,7 +134,7 @@ void ImpUpdateOutlParamsForOverflow(SdrOutliner *pOutl, SdrTextObj *pTextObj) // Code from ImpSetTextEditParams Size aPaperMin; Size aPaperMax; - Rectangle aEditArea; + tools::Rectangle aEditArea; pTextObj->TakeTextEditArea(&aPaperMin,&aPaperMax,&aEditArea,nullptr); pOutl->SetMinAutoPaperSize(aPaperMin); @@ -142,11 +142,11 @@ void ImpUpdateOutlParamsForOverflow(SdrOutliner *pOutl, SdrTextObj *pTextObj) pOutl->SetPaperSize(Size()); } -void SdrTextObj::TakeTextEditArea(Size* pPaperMin, Size* pPaperMax, Rectangle* pViewInit, Rectangle* pViewMin) const +void SdrTextObj::TakeTextEditArea(Size* pPaperMin, Size* pPaperMax, tools::Rectangle* pViewInit, tools::Rectangle* pViewMin) const { bool bFitToSize(IsFitToSize()); Size aPaperMin,aPaperMax; - Rectangle aViewInit; + tools::Rectangle aViewInit; TakeTextAnchorRect(aViewInit); if (aGeo.nRotationAngle!=0) { Point aCenter(aViewInit.Center()); @@ -383,14 +383,14 @@ void SdrTextObj::ImpSetTextEditParams() const if (bUpdMerk) pEdtOutl->SetUpdateMode(false); Size aPaperMin; Size aPaperMax; - Rectangle aEditArea; + tools::Rectangle aEditArea; TakeTextEditArea(&aPaperMin,&aPaperMax,&aEditArea,nullptr); bool bContourFrame=IsContourTextFrame(); pEdtOutl->SetMinAutoPaperSize(aPaperMin); pEdtOutl->SetMaxAutoPaperSize(aPaperMax); pEdtOutl->SetPaperSize(Size()); if (bContourFrame) { - Rectangle aAnchorRect; + tools::Rectangle aAnchorRect; TakeTextAnchorRect(aAnchorRect); ImpSetContourPolygon(*pEdtOutl,aAnchorRect, true); } diff --git a/svx/source/svdraw/svdotxtr.cxx b/svx/source/svdraw/svdotxtr.cxx index 01c5a79225a9..995e4cd0469f 100644 --- a/svx/source/svdraw/svdotxtr.cxx +++ b/svx/source/svdraw/svdotxtr.cxx @@ -40,12 +40,12 @@ using namespace com::sun::star; -void SdrTextObj::NbcSetSnapRect(const Rectangle& rRect) +void SdrTextObj::NbcSetSnapRect(const tools::Rectangle& rRect) { if (aGeo.nRotationAngle!=0 || aGeo.nShearAngle!=0) { // Either the rotation or shear angle exists. - Rectangle aSR0(GetSnapRect()); + tools::Rectangle aSR0(GetSnapRect()); long nWdt0=aSR0.Right()-aSR0.Left(); long nHgt0=aSR0.Bottom()-aSR0.Top(); long nWdt1=rRect.Right()-rRect.Left(); @@ -67,12 +67,12 @@ void SdrTextObj::NbcSetSnapRect(const Rectangle& rRect) } } -const Rectangle& SdrTextObj::GetLogicRect() const +const tools::Rectangle& SdrTextObj::GetLogicRect() const { return maRect; } -void SdrTextObj::NbcSetLogicRect(const Rectangle& rRect) +void SdrTextObj::NbcSetLogicRect(const tools::Rectangle& rRect) { maRect = rRect; ImpJustifyRect(maRect); diff --git a/svx/source/svdraw/svdovirt.cxx b/svx/source/svdraw/svdovirt.cxx index f277a14adca8..00ee676799b3 100644 --- a/svx/source/svdraw/svdovirt.cxx +++ b/svx/source/svdraw/svdovirt.cxx @@ -108,14 +108,14 @@ SdrObjList* SdrVirtObj::GetSubList() const return rRefObj.GetSubList(); } -const Rectangle& SdrVirtObj::GetCurrentBoundRect() const +const tools::Rectangle& SdrVirtObj::GetCurrentBoundRect() const { const_cast<SdrVirtObj*>(this)->aOutRect=rRefObj.GetCurrentBoundRect(); // TODO: Optimize this. const_cast<SdrVirtObj*>(this)->aOutRect+=aAnchor; return aOutRect; } -const Rectangle& SdrVirtObj::GetLastBoundRect() const +const tools::Rectangle& SdrVirtObj::GetLastBoundRect() const { const_cast<SdrVirtObj*>(this)->aOutRect=rRefObj.GetLastBoundRect(); // TODO: Optimize this. const_cast<SdrVirtObj*>(this)->aOutRect+=aAnchor; @@ -368,7 +368,7 @@ void SdrVirtObj::NbcShear(const Point& rRef, long nAngle, double tn, bool bVShea void SdrVirtObj::Move(const Size& rSiz) { if (rSiz.Width()!=0 || rSiz.Height()!=0) { - Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); + tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); NbcMove(rSiz); SetChanged(); BroadcastObjectChange(); @@ -379,7 +379,7 @@ void SdrVirtObj::Move(const Size& rSiz) void SdrVirtObj::Resize(const Point& rRef, const Fraction& xFact, const Fraction& yFact, bool bUnsetRelative) { if (xFact.GetNumerator()!=xFact.GetDenominator() || yFact.GetNumerator()!=yFact.GetDenominator()) { - Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); + tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); rRefObj.Resize(rRef-aAnchor,xFact,yFact, bUnsetRelative); SetRectsDirty(); SendUserCall(SdrUserCallType::Resize,aBoundRect0); @@ -389,7 +389,7 @@ void SdrVirtObj::Resize(const Point& rRef, const Fraction& xFact, const Fraction void SdrVirtObj::Rotate(const Point& rRef, long nAngle, double sn, double cs) { if (nAngle!=0) { - Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); + tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); rRefObj.Rotate(rRef-aAnchor,nAngle,sn,cs); SetRectsDirty(); SendUserCall(SdrUserCallType::Resize,aBoundRect0); @@ -398,7 +398,7 @@ void SdrVirtObj::Rotate(const Point& rRef, long nAngle, double sn, double cs) void SdrVirtObj::Mirror(const Point& rRef1, const Point& rRef2) { - Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); + tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); rRefObj.Mirror(rRef1-aAnchor,rRef2-aAnchor); SetRectsDirty(); SendUserCall(SdrUserCallType::Resize,aBoundRect0); @@ -407,7 +407,7 @@ void SdrVirtObj::Mirror(const Point& rRef1, const Point& rRef2) void SdrVirtObj::Shear(const Point& rRef, long nAngle, double tn, bool bVShear) { if (nAngle!=0) { - Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); + tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); rRefObj.Shear(rRef-aAnchor,nAngle,tn,bVShear); SetRectsDirty(); SendUserCall(SdrUserCallType::Resize,aBoundRect0); @@ -421,18 +421,18 @@ void SdrVirtObj::RecalcSnapRect() aSnapRect+=aAnchor; } -const Rectangle& SdrVirtObj::GetSnapRect() const +const tools::Rectangle& SdrVirtObj::GetSnapRect() const { const_cast<SdrVirtObj*>(this)->aSnapRect=rRefObj.GetSnapRect(); const_cast<SdrVirtObj*>(this)->aSnapRect+=aAnchor; return aSnapRect; } -void SdrVirtObj::SetSnapRect(const Rectangle& rRect) +void SdrVirtObj::SetSnapRect(const tools::Rectangle& rRect) { { - Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); - Rectangle aR(rRect); + tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); + tools::Rectangle aR(rRect); aR-=aAnchor; rRefObj.SetSnapRect(aR); SetRectsDirty(); @@ -440,35 +440,35 @@ void SdrVirtObj::SetSnapRect(const Rectangle& rRect) } } -void SdrVirtObj::NbcSetSnapRect(const Rectangle& rRect) +void SdrVirtObj::NbcSetSnapRect(const tools::Rectangle& rRect) { - Rectangle aR(rRect); + tools::Rectangle aR(rRect); aR-=aAnchor; SetRectsDirty(); rRefObj.NbcSetSnapRect(aR); } -const Rectangle& SdrVirtObj::GetLogicRect() const +const tools::Rectangle& SdrVirtObj::GetLogicRect() const { const_cast<SdrVirtObj*>(this)->aSnapRect=rRefObj.GetLogicRect(); // An abuse of aSnapRect! const_cast<SdrVirtObj*>(this)->aSnapRect+=aAnchor; // If there's trouble, we need another Rectangle Member (or a Heap). return aSnapRect; } -void SdrVirtObj::SetLogicRect(const Rectangle& rRect) +void SdrVirtObj::SetLogicRect(const tools::Rectangle& rRect) { - Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); - Rectangle aR(rRect); + tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); + tools::Rectangle aR(rRect); aR-=aAnchor; rRefObj.SetLogicRect(aR); SetRectsDirty(); SendUserCall(SdrUserCallType::Resize,aBoundRect0); } -void SdrVirtObj::NbcSetLogicRect(const Rectangle& rRect) +void SdrVirtObj::NbcSetLogicRect(const tools::Rectangle& rRect) { - Rectangle aR(rRect); + tools::Rectangle aR(rRect); aR-=aAnchor; SetRectsDirty(); rRefObj.NbcSetLogicRect(aR); @@ -546,7 +546,7 @@ SdrObjGeoData* SdrVirtObj::GetGeoData() const void SdrVirtObj::SetGeoData(const SdrObjGeoData& rGeo) { - Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); + tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); rRefObj.SetGeoData(rGeo); SetRectsDirty(); SendUserCall(SdrUserCallType::Resize,aBoundRect0); @@ -579,7 +579,7 @@ Pointer SdrVirtObj::GetMacroPointer(const SdrObjMacroHitRec& rRec) const return rRefObj.GetMacroPointer(rRec); // TODO: positioning offset } -void SdrVirtObj::PaintMacro(OutputDevice& rOut, const Rectangle& rDirtyRect, const SdrObjMacroHitRec& rRec) const +void SdrVirtObj::PaintMacro(OutputDevice& rOut, const tools::Rectangle& rDirtyRect, const SdrObjMacroHitRec& rRec) const { rRefObj.PaintMacro(rOut,rDirtyRect,rRec); // TODO: positioning offset } diff --git a/svx/source/svdraw/svdpage.cxx b/svx/source/svdraw/svdpage.cxx index 3e48ddc21cac..6a287d67eedb 100644 --- a/svx/source/svdraw/svdpage.cxx +++ b/svx/source/svdraw/svdpage.cxx @@ -294,7 +294,7 @@ void SdrObjList::RecalcObjOrdNums() void SdrObjList::RecalcRects() { - aOutRect=Rectangle(); + aOutRect=tools::Rectangle(); aSnapRect=aOutRect; const size_t nCount = GetObjCount(); for (size_t i=0; i<nCount; ++i) { @@ -592,7 +592,7 @@ SdrObject* SdrObjList::SetObjectOrdNum(size_t nOldObjNum, size_t nNewObjNum) return pObj; } -const Rectangle& SdrObjList::GetAllObjSnapRect() const +const tools::Rectangle& SdrObjList::GetAllObjSnapRect() const { if (bRectsDirty) { const_cast<SdrObjList*>(this)->RecalcRects(); @@ -601,7 +601,7 @@ const Rectangle& SdrObjList::GetAllObjSnapRect() const return aSnapRect; } -const Rectangle& SdrObjList::GetAllObjBoundRect() const +const tools::Rectangle& SdrObjList::GetAllObjBoundRect() const { // #i106183# for deep group hierarchies like in chart2, the invalidates // through the hierarchy are not correct; use a 2nd hint for the needed @@ -1615,7 +1615,7 @@ void SdrPage::TRG_ImpMasterPageRemoved(const SdrPage& rRemovedPage) } } -const SdrPageGridFrameList* SdrPage::GetGridFrameList(const SdrPageView* /*pPV*/, const Rectangle* /*pRect*/) const +const SdrPageGridFrameList* SdrPage::GetGridFrameList(const SdrPageView* /*pPV*/, const tools::Rectangle* /*pRect*/) const { return nullptr; } diff --git a/svx/source/svdraw/svdpagv.cxx b/svx/source/svdraw/svdpagv.cxx index 544bf48ca788..c3f35eb16f94 100644 --- a/svx/source/svdraw/svdpagv.cxx +++ b/svx/source/svdraw/svdpagv.cxx @@ -237,17 +237,17 @@ void SdrPageView::Hide() } } -Rectangle SdrPageView::GetPageRect() const +tools::Rectangle SdrPageView::GetPageRect() const { - if (GetPage()==nullptr) return Rectangle(); - return Rectangle(Point(),Size(GetPage()->GetWdt()+1,GetPage()->GetHgt()+1)); + if (GetPage()==nullptr) return tools::Rectangle(); + return tools::Rectangle(Point(),Size(GetPage()->GetWdt()+1,GetPage()->GetHgt()+1)); } void SdrPageView::InvalidateAllWin() { if(IsVisible() && GetPage()) { - Rectangle aRect(Point(0,0),Size(GetPage()->GetWdt()+1,GetPage()->GetHgt()+1)); + tools::Rectangle aRect(Point(0,0),Size(GetPage()->GetWdt()+1,GetPage()->GetHgt()+1)); aRect.Union(GetPage()->GetAllObjBoundRect()); GetView().InvalidateAllWin(aRect); } @@ -308,7 +308,7 @@ void SdrPageView::setPreparedPageWindow(SdrPageWindow* pKnownTarget) void SdrPageView::DrawLayer(SdrLayerID nID, OutputDevice* pGivenTarget, sdr::contact::ViewObjectContactRedirector* pRedirector, - const Rectangle& rRect, basegfx::B2IRectangle const*const pPageFrame) + const tools::Rectangle& rRect, basegfx::B2IRectangle const*const pPageFrame) { if(GetPage()) { @@ -405,7 +405,7 @@ void SdrPageView::SetDesignMode( bool _bDesignMode ) const } -void SdrPageView::DrawPageViewGrid(OutputDevice& rOut, const Rectangle& rRect, Color aColor) +void SdrPageView::DrawPageViewGrid(OutputDevice& rOut, const tools::Rectangle& rRect, Color aColor) { if (GetPage()==nullptr) return; @@ -555,7 +555,7 @@ void SdrPageView::DrawPageViewGrid(OutputDevice& rOut, const Rectangle& rRect, C { // draw rOut.DrawGrid( - Rectangle( xFinOrg + (a * nx2) + nPointOffset, yBigOrg, x2, y2 ), + tools::Rectangle( xFinOrg + (a * nx2) + nPointOffset, yBigOrg, x2, y2 ), Size( nx1, ny1 ), nGridFlags ); // do a step @@ -580,7 +580,7 @@ void SdrPageView::DrawPageViewGrid(OutputDevice& rOut, const Rectangle& rRect, C { // draw rOut.DrawGrid( - Rectangle( xBigOrg, yFinOrg + (a * ny2) + nPointOffset, x2, y2 ), + tools::Rectangle( xBigOrg, yFinOrg + (a * ny2) + nPointOffset, x2, y2 ), Size( nx1, ny1 ), nGridFlags ); // do a step @@ -703,7 +703,7 @@ void SdrPageView::ImpInvalidateHelpLineArea(sal_uInt16 nNum) const if(pCandidate->OutputToWindow()) { OutputDevice& rOutDev = pCandidate->GetOutputDevice(); - Rectangle aR(rHL.GetBoundRect(rOutDev)); + tools::Rectangle aR(rHL.GetBoundRect(rOutDev)); Size aSiz(rOutDev.PixelToLogic(Size(1,1))); aR.Left() -= aSiz.Width(); aR.Right() += aSiz.Width(); diff --git a/svx/source/svdraw/svdpntv.cxx b/svx/source/svdraw/svdpntv.cxx index bd019285fc13..2164abba3d71 100644 --- a/svx/source/svdraw/svdpntv.cxx +++ b/svx/source/svdraw/svdpntv.cxx @@ -332,7 +332,7 @@ void SdrPaintView::BrkAction() { } -void SdrPaintView::TakeActionRect(Rectangle&) const +void SdrPaintView::TakeActionRect(tools::Rectangle&) const { } @@ -917,7 +917,7 @@ void SdrPaintView::InvalidateAllWin() } } -void SdrPaintView::InvalidateAllWin(const Rectangle& rRect) +void SdrPaintView::InvalidateAllWin(const tools::Rectangle& rRect) { const sal_uInt32 nWindowCount(PaintWindowCount()); @@ -928,11 +928,11 @@ void SdrPaintView::InvalidateAllWin(const Rectangle& rRect) if(pPaintWindow->OutputToWindow()) { OutputDevice& rOutDev = pPaintWindow->GetOutputDevice(); - Rectangle aRect(rRect); + tools::Rectangle aRect(rRect); Point aOrg(rOutDev.GetMapMode().GetOrigin()); aOrg.X()=-aOrg.X(); aOrg.Y()=-aOrg.Y(); - Rectangle aOutRect(aOrg, rOutDev.GetOutputSize()); + tools::Rectangle aOutRect(aOrg, rOutDev.GetOutputSize()); // In case of tiled rendering we want to get all invalidations, so visual area is not interesting. if (aRect.IsOver(aOutRect) || comphelper::LibreOfficeKit::isActive()) @@ -949,7 +949,7 @@ void SdrPaintView::InvalidateOneWin(vcl::Window& rWin) rWin.Invalidate(InvalidateFlags::NoErase); } -void SdrPaintView::InvalidateOneWin(vcl::Window& rWin, const Rectangle& rRect) +void SdrPaintView::InvalidateOneWin(vcl::Window& rWin, const tools::Rectangle& rRect) { // do not erase background, that causes flicker (!) rWin.Invalidate(rRect, InvalidateFlags::NoErase); @@ -1117,7 +1117,7 @@ void SdrPaintView::ShowItemBrowser(bool bShow) } #endif -void SdrPaintView::MakeVisible(const Rectangle& rRect, vcl::Window& rWin) +void SdrPaintView::MakeVisible(const tools::Rectangle& rRect, vcl::Window& rWin) { MapMode aMap(rWin.GetMapMode()); Size aActualSize(rWin.GetOutputSize()); diff --git a/svx/source/svdraw/svdsnpv.cxx b/svx/source/svdraw/svdsnpv.cxx index 7b7feab8ee3e..4923e7de66d3 100644 --- a/svx/source/svdraw/svdsnpv.cxx +++ b/svx/source/svdraw/svdsnpv.cxx @@ -240,10 +240,10 @@ void SdrSnapView::BrkAction() SdrPaintView::BrkAction(); } -void SdrSnapView::TakeActionRect(Rectangle& rRect) const +void SdrSnapView::TakeActionRect(tools::Rectangle& rRect) const { if (IsSetPageOrg() || IsDragHelpLine()) { - rRect=Rectangle(maDragStat.GetNow(),maDragStat.GetNow()); + rRect=tools::Rectangle(maDragStat.GetNow(),maDragStat.GetNow()); } else { SdrPaintView::TakeActionRect(rRect); } @@ -328,7 +328,7 @@ SdrSnap SdrSnapView::SnapPos(Point& rPnt, const SdrPageView* pPV) const while (aIter.IsMore() && (nMaxPointSnapCount>0 || nMaxFrameSnapCount>0)) { SdrObject* pO=aIter.Next(); - Rectangle aRect(pO->GetCurrentBoundRect()); + tools::Rectangle aRect(pO->GetCurrentBoundRect()); aRect.Left ()-=mx; aRect.Right ()+=mx; aRect.Top ()-=my; @@ -350,8 +350,8 @@ SdrSnap SdrSnapView::SnapPos(Point& rPnt, const SdrPageView* pPV) const } } if (bOFrmSnap && nMaxFrameSnapCount>0) { - Rectangle aLog(pO->GetSnapRect()); - Rectangle aR1(aLog); + tools::Rectangle aLog(pO->GetSnapRect()); + tools::Rectangle aR1(aLog); aR1.Left ()-=mx; aR1.Right ()+=mx; aR1.Top ()-=my; diff --git a/svx/source/svdraw/svdtrans.cxx b/svx/source/svdraw/svdtrans.cxx index f79beadd465e..ff598139f19f 100644 --- a/svx/source/svdraw/svdtrans.cxx +++ b/svx/source/svdraw/svdtrans.cxx @@ -32,7 +32,7 @@ void MoveXPoly(XPolygon& rPoly, const Size& S) rPoly.Move(S.Width(),S.Height()); } -void ResizeRect(Rectangle& rRect, const Point& rRef, const Fraction& rxFact, const Fraction& ryFact) +void ResizeRect(tools::Rectangle& rRect, const Point& rRef, const Fraction& rxFact, const Fraction& ryFact) { Fraction aXFact(rxFact); Fraction aYFact(ryFact); @@ -268,7 +268,7 @@ double CrookSlantXPoint(Point& rPnt, Point* pC1, Point* pC2, const Point& rCente double CrookStretchXPoint(Point& rPnt, Point* pC1, Point* pC2, const Point& rCenter, const Point& rRad, double& rSin, double& rCos, bool bVert, - const Rectangle& rRefRect) + const tools::Rectangle& rRefRect) { long y0=rPnt.Y(); CrookSlantXPoint(rPnt,pC1,pC2,rCenter,rRad,rSin,rCos,bVert); @@ -331,7 +331,7 @@ void CrookSlantPoly(XPolygon& rPoly, const Point& rCenter, const Point& rRad, bo } } -void CrookStretchPoly(XPolygon& rPoly, const Point& rCenter, const Point& rRad, bool bVert, const Rectangle& rRefRect) +void CrookStretchPoly(XPolygon& rPoly, const Point& rCenter, const Point& rRad, bool bVert, const tools::Rectangle& rRefRect) { double nSin,nCos; sal_uInt16 nPointAnz=rPoly.GetPointCount(); @@ -371,7 +371,7 @@ void CrookSlantPoly(XPolyPolygon& rPoly, const Point& rCenter, const Point& rRad } } -void CrookStretchPoly(XPolyPolygon& rPoly, const Point& rCenter, const Point& rRad, bool bVert, const Rectangle& rRefRect) +void CrookStretchPoly(XPolyPolygon& rPoly, const Point& rCenter, const Point& rRad, bool bVert, const tools::Rectangle& rRefRect) { sal_uInt16 nPolyCount=rPoly.Count(); for (sal_uInt16 nPolyNum=0; nPolyNum<nPolyCount; nPolyNum++) { @@ -467,7 +467,7 @@ void GeoStat::RecalcTan() } -tools::Polygon Rect2Poly(const Rectangle& rRect, const GeoStat& rGeo) +tools::Polygon Rect2Poly(const tools::Rectangle& rRect, const GeoStat& rGeo) { tools::Polygon aPol(5); aPol[0]=rRect.TopLeft(); @@ -480,7 +480,7 @@ tools::Polygon Rect2Poly(const Rectangle& rRect, const GeoStat& rGeo) return aPol; } -void Poly2Rect(const tools::Polygon& rPol, Rectangle& rRect, GeoStat& rGeo) +void Poly2Rect(const tools::Polygon& rPol, tools::Rectangle& rRect, GeoStat& rGeo) { rGeo.nRotationAngle=GetAngle(rPol[1]-rPol[0]); rGeo.nRotationAngle=NormAngle360(rGeo.nRotationAngle); @@ -518,7 +518,7 @@ void Poly2Rect(const tools::Polygon& rPol, Rectangle& rRect, GeoStat& rGeo) Point aRU(aPt0); aRU.X()+=nWdt; aRU.Y()+=nHgt; - rRect=Rectangle(aPt0,aRU); + rRect=tools::Rectangle(aPt0,aRU); } diff --git a/svx/source/svdraw/svdundo.cxx b/svx/source/svdraw/svdundo.cxx index f04dc32b2b35..b411e935c88e 100644 --- a/svx/source/svdraw/svdundo.cxx +++ b/svx/source/svdraw/svdundo.cxx @@ -380,7 +380,7 @@ void SdrUndoAttrObj::Undo() // losing the geometry size info for the object when it is // laid out again from AdjustTextFrameWidthAndHeight(). This makes // rescuing the size of the object necessary. - const Rectangle aSnapRect = pObj->GetSnapRect(); + const tools::Rectangle aSnapRect = pObj->GetSnapRect(); if(pUndoSet) { @@ -457,7 +457,7 @@ void SdrUndoAttrObj::Redo() sdr::properties::ItemChangeBroadcaster aItemChange(*pObj); - const Rectangle aSnapRect = pObj->GetSnapRect(); + const tools::Rectangle aSnapRect = pObj->GetSnapRect(); if(pRedoSet) { diff --git a/svx/source/svdraw/svdview.cxx b/svx/source/svdraw/svdview.cxx index 2ee34fcdb07e..5f957e81f37c 100644 --- a/svx/source/svdraw/svdview.cxx +++ b/svx/source/svdraw/svdview.cxx @@ -116,7 +116,7 @@ SdrDropMarkerOverlay::SdrDropMarkerOverlay(const SdrView& rView, const SdrObject rObject.TakeXorPoly()); } -SdrDropMarkerOverlay::SdrDropMarkerOverlay(const SdrView& rView, const Rectangle& rRectangle) +SdrDropMarkerOverlay::SdrDropMarkerOverlay(const SdrView& rView, const tools::Rectangle& rRectangle) { basegfx::B2DPolygon aB2DPolygon; @@ -454,8 +454,8 @@ SdrHitKind SdrView::PickAnything(const Point& rLogicPos, SdrViewEvent& rVEvt) co if (bTEHit) { - Rectangle aTextRect; - Rectangle aAnchor; + tools::Rectangle aTextRect; + tools::Rectangle aAnchor; SdrOutliner* pOutliner = &pTextObj->ImpGetDrawOutliner(); if( pTextObj->GetModel() ) pOutliner = &pTextObj->GetModel()->GetHitTestOutliner(); @@ -499,7 +499,7 @@ SdrHitKind SdrView::PickAnything(const Point& rLogicPos, SdrViewEvent& rVEvt) co (IsTextTool() || (IsEditMode() && IsQuickTextEditMode())) && pHitObj->HasTextEdit()) { // Around the TextEditArea there's a border to select without going into text edit mode. - Rectangle aBoundRect(pHitObj->GetCurrentBoundRect()); + tools::Rectangle aBoundRect(pHitObj->GetCurrentBoundRect()); // Force to SnapRect when Fontwork if( dynamic_cast<const SdrTextObj*>( pHitObj) != nullptr && static_cast<SdrTextObj*>(pHitObj)->IsFontwork()) @@ -1370,7 +1370,7 @@ void SdrView::UnmarkAll() else UnmarkAllObj(); } -const Rectangle& SdrView::GetMarkedRect() const +const tools::Rectangle& SdrView::GetMarkedRect() const { if (IsGluePointEditMode() && HasMarkedGluePoints()) { return GetMarkedGluePointsRect(); diff --git a/svx/source/svdraw/svdxcgv.cxx b/svx/source/svdraw/svdxcgv.cxx index ba333fdd4395..0692f647ff66 100644 --- a/svx/source/svdraw/svdxcgv.cxx +++ b/svx/source/svdraw/svdxcgv.cxx @@ -138,7 +138,7 @@ bool SdrExchangeView::Paste(const OUString& rStr, const Point& rPos, SdrObjList* if (!ImpGetPasteLayer(pLst,nLayer)) return false; bool bUnmark = (nOptions & (SdrInsertFlags::DONTMARK|SdrInsertFlags::ADDMARK))==SdrInsertFlags::NONE && !IsTextEdit(); if (bUnmark) UnmarkAllObj(); - Rectangle aTextRect(0,0,500,500); + tools::Rectangle aTextRect(0,0,500,500); SdrPage* pPage=pLst->GetPage(); if (pPage!=nullptr) { aTextRect.SetSize(pPage->GetSize()); @@ -175,7 +175,7 @@ bool SdrExchangeView::Paste(SvStream& rInput, const OUString& rBaseURL, sal_uInt if (!ImpGetPasteLayer(pLst,nLayer)) return false; bool bUnmark=(nOptions&(SdrInsertFlags::DONTMARK|SdrInsertFlags::ADDMARK))==SdrInsertFlags::NONE && !IsTextEdit(); if (bUnmark) UnmarkAllObj(); - Rectangle aTextRect(0,0,500,500); + tools::Rectangle aTextRect(0,0,500,500); SdrPage* pPage=pLst->GetPage(); if (pPage!=nullptr) { aTextRect.SetSize(pPage->GetSize()); @@ -281,7 +281,7 @@ bool SdrExchangeView::Paste( const SdrPage* pSrcPg=pSrcMod->GetPage(nPg); // Use SnapRect, not BoundRect here - Rectangle aR=pSrcPg->GetAllObjSnapRect(); + tools::Rectangle aR=pSrcPg->GetAllObjSnapRect(); if (bResize) ResizeRect(aR,aPt0,aXResize,aYResize); @@ -417,7 +417,7 @@ void SdrExchangeView::ImpPasteObject(SdrObject* pObj, SdrObjList& rLst, const Po long xs=nSizX; long ys=nSizY; Point aPos(rCenter.X()-xs/2,rCenter.Y()-ys/2); - Rectangle aR(aPos.X(),aPos.Y(),aPos.X()+xs,aPos.Y()+ys); + tools::Rectangle aR(aPos.X(),aPos.Y(),aPos.X()+xs,aPos.Y()+ys); pObj->SetLogicRect(aR); rLst.InsertObject(pObj, SAL_MAX_SIZE); @@ -525,7 +525,7 @@ GDIMetaFile SdrExchangeView::GetMarkedObjMetaFile(bool bNoVDevIfOneMtfMarked) co if( AreObjectsMarked() ) { - Rectangle aBound( GetMarkedObjBoundRect() ); + tools::Rectangle aBound( GetMarkedObjBoundRect() ); Size aBoundSize( aBound.GetWidth(), aBound.GetHeight() ); MapMode aMap( mpModel->GetScaleUnit(), Point(), mpModel->GetScaleFraction(), mpModel->GetScaleFraction() ); @@ -632,7 +632,7 @@ Graphic SdrExchangeView::GetObjGraphic( const SdrModel* pModel, const SdrObject* { ScopedVclPtrInstance< VirtualDevice > pOut; GDIMetaFile aMtf; - const Rectangle aBoundRect( pObj->GetCurrentBoundRect() ); + const tools::Rectangle aBoundRect( pObj->GetCurrentBoundRect() ); const MapMode aMap( pModel->GetScaleUnit(), Point(), pModel->GetScaleFraction(), diff --git a/svx/source/table/accessiblecell.cxx b/svx/source/table/accessiblecell.cxx index d34cb90a5bd1..85ae72dd1f3b 100644 --- a/svx/source/table/accessiblecell.cxx +++ b/svx/source/table/accessiblecell.cxx @@ -310,7 +310,7 @@ css::awt::Rectangle SAL_CALL AccessibleCell::getBounds() if( mxCell.is() ) { // Get the cell's bounding box in internal coordinates (in 100th of mm) - const ::Rectangle aCellRect( mxCell->getCellRect() ); + const ::tools::Rectangle aCellRect( mxCell->getCellRect() ); // Transform coordinates from internal to pixel. if (maShapeTreeInfo.GetViewForwarder() == nullptr) @@ -329,9 +329,9 @@ css::awt::Rectangle SAL_CALL AccessibleCell::getBounds() int y = aPixelPosition.getY() - aParentLocation.Y; // Clip with parent (with coordinates relative to itself). - ::Rectangle aBBox ( x, y, x + aPixelSize.getWidth(), y + aPixelSize.getHeight()); + ::tools::Rectangle aBBox ( x, y, x + aPixelSize.getWidth(), y + aPixelSize.getHeight()); awt::Size aParentSize (xParentComponent->getSize()); - ::Rectangle aParentBBox (0,0, aParentSize.Width, aParentSize.Height); + ::tools::Rectangle aParentBBox (0,0, aParentSize.Width, aParentSize.Height); aBBox = aBBox.GetIntersection (aParentBBox); aBoundingBox = awt::Rectangle ( aBBox.getX(), aBBox.getY(), aBBox.getWidth(), aBBox.getHeight()); } diff --git a/svx/source/table/cell.cxx b/svx/source/table/cell.cxx index a5637875a821..41601c98be83 100644 --- a/svx/source/table/cell.cxx +++ b/svx/source/table/cell.cxx @@ -653,7 +653,7 @@ SfxStyleSheet* Cell::GetStyleSheet() const return nullptr; } -void Cell::TakeTextAnchorRect(Rectangle& rAnchorRect) const +void Cell::TakeTextAnchorRect(tools::Rectangle& rAnchorRect) const { rAnchorRect.Left() = maCellRect.Left() + GetTextLeftDistance(); rAnchorRect.Right() = maCellRect.Right() - GetTextRightDistance(); @@ -692,7 +692,7 @@ sal_Int32 Cell::getMinimumHeight() SdrTableObj& rTableObj = dynamic_cast< SdrTableObj& >( GetObject() ); sal_Int32 nMinimumHeight = 0; - Rectangle aTextRect; + tools::Rectangle aTextRect; TakeTextAnchorRect( aTextRect ); Size aSize( aTextRect.GetSize() ); aSize.Height()=0x0FFFFFFF; diff --git a/svx/source/table/cell.hxx b/svx/source/table/cell.hxx index 9b568c584c11..0d599784335a 100644 --- a/svx/source/table/cell.hxx +++ b/svx/source/table/cell.hxx @@ -67,14 +67,14 @@ public: SVX_DLLPRIVATE void cloneFrom( const CellRef& rCell ); - SVX_DLLPRIVATE void setCellRect( ::Rectangle& rCellRect ) { maCellRect = rCellRect; } - SVX_DLLPRIVATE const ::Rectangle& getCellRect() const { return maCellRect; } - SVX_DLLPRIVATE ::Rectangle& getCellRect() { return maCellRect; } + SVX_DLLPRIVATE void setCellRect( ::tools::Rectangle& rCellRect ) { maCellRect = rCellRect; } + SVX_DLLPRIVATE const ::tools::Rectangle& getCellRect() const { return maCellRect; } + SVX_DLLPRIVATE ::tools::Rectangle& getCellRect() { return maCellRect; } OutlinerParaObject* GetEditOutlinerParaObject() const; SVX_DLLPRIVATE void SetStyleSheet( SfxStyleSheet* pStyleSheet, bool bDontRemoveHardAttr ); SVX_DLLPRIVATE virtual SfxStyleSheet* GetStyleSheet() const override; - SVX_DLLPRIVATE void TakeTextAnchorRect(Rectangle& rAnchorRect) const; + SVX_DLLPRIVATE void TakeTextAnchorRect(tools::Rectangle& rAnchorRect) const; SVX_DLLPRIVATE virtual const SfxItemSet& GetItemSet() const override; SVX_DLLPRIVATE void SetMergedItemSetAndBroadcast(const SfxItemSet& rSet, bool bClearAllItems); @@ -212,7 +212,7 @@ private: ::sal_Int32 mnRowSpan; ::sal_Int32 mnColSpan; - Rectangle maCellRect; + tools::Rectangle maCellRect; css::uno::Reference< css::table::XTable > mxTable; }; diff --git a/svx/source/table/svdotable.cxx b/svx/source/table/svdotable.cxx index 3ccbc3e744cd..ce2b7cbd49c2 100644 --- a/svx/source/table/svdotable.cxx +++ b/svx/source/table/svdotable.cxx @@ -146,7 +146,7 @@ SfxItemSet* TableProperties::CreateObjectSpecificItemSet(SfxItemPool& rPool) class TableObjectGeoData : public SdrTextObjGeoData { public: - Rectangle maLogicRect; + tools::Rectangle maLogicRect; }; TableStyleSettings::TableStyleSettings() @@ -203,10 +203,10 @@ public: void SetModel(SdrModel* pOldModel, SdrModel* pNewModel); CellRef getCell( const CellPos& rPos ) const; - void LayoutTable( Rectangle& rArea, bool bFitWidth, bool bFitHeight ); + void LayoutTable( tools::Rectangle& rArea, bool bFitWidth, bool bFitHeight ); void ApplyCellStyles(); - void UpdateCells( Rectangle& rArea ); + void UpdateCells( tools::Rectangle& rArea ); SdrTableObjImpl(); virtual ~SdrTableObjImpl() override; @@ -237,8 +237,8 @@ public: void dumpAsXml(struct _xmlTextWriter* pWriter) const; private: static SdrTableObjImpl* lastLayoutTable; - static Rectangle lastLayoutInputRectangle; - static Rectangle lastLayoutResultRectangle; + static tools::Rectangle lastLayoutInputRectangle; + static tools::Rectangle lastLayoutResultRectangle; static bool lastLayoutFitWidth; static bool lastLayoutFitHeight; static WritingMode lastLayoutMode; @@ -248,8 +248,8 @@ private: }; SdrTableObjImpl* SdrTableObjImpl::lastLayoutTable = nullptr; -Rectangle SdrTableObjImpl::lastLayoutInputRectangle; -Rectangle SdrTableObjImpl::lastLayoutResultRectangle; +tools::Rectangle SdrTableObjImpl::lastLayoutInputRectangle; +tools::Rectangle SdrTableObjImpl::lastLayoutResultRectangle; bool SdrTableObjImpl::lastLayoutFitWidth; bool SdrTableObjImpl::lastLayoutFitHeight; WritingMode SdrTableObjImpl::lastLayoutMode; @@ -684,7 +684,7 @@ sal_Int32 SdrTableObjImpl::getRowCount() const return mxTable.is() ? mxTable->getRowCount() : 0; } -void SdrTableObjImpl::LayoutTable( Rectangle& rArea, bool bFitWidth, bool bFitHeight ) +void SdrTableObjImpl::LayoutTable( tools::Rectangle& rArea, bool bFitWidth, bool bFitHeight ) { if( mpLayouter && mpTableObj->GetModel() ) { @@ -722,7 +722,7 @@ void SdrTableObjImpl::LayoutTable( Rectangle& rArea, bool bFitWidth, bool bFitHe } } -void SdrTableObjImpl::UpdateCells( Rectangle& rArea ) +void SdrTableObjImpl::UpdateCells( tools::Rectangle& rArea ) { if( mpLayouter && mxTable.is() ) { @@ -758,7 +758,7 @@ SdrTableObj::SdrTableObj(SdrModel* _pModel) } -SdrTableObj::SdrTableObj(SdrModel* _pModel, const ::Rectangle& rNewRect, sal_Int32 nColumns, sal_Int32 nRows) +SdrTableObj::SdrTableObj(SdrModel* _pModel, const ::tools::Rectangle& rNewRect, sal_Int32 nColumns, sal_Int32 nRows) : SdrTextObj( rNewRect ) , maLogicRect( rNewRect ) { @@ -1315,7 +1315,7 @@ void SdrTableObj::onEditOutlinerStatusEvent( EditStatus* pEditStatus ) { if( (pEditStatus->GetStatusWord() & EditStatusFlags::TextHeightChanged) && mpImpl.is() && mpImpl->mpLayouter ) { - Rectangle aRect0( maRect ); + tools::Rectangle aRect0( maRect ); maRect = maLogicRect; mpImpl->LayoutTable( maRect, false, false ); SetRectsDirty(); @@ -1380,14 +1380,14 @@ void SdrTableObj::SetModel(SdrModel* pNewModel) } -void SdrTableObj::TakeTextRect( SdrOutliner& rOutliner, Rectangle& rTextRect, bool bNoEditText, Rectangle* pAnchorRect, bool bLineWidth ) const +void SdrTableObj::TakeTextRect( SdrOutliner& rOutliner, tools::Rectangle& rTextRect, bool bNoEditText, tools::Rectangle* pAnchorRect, bool bLineWidth ) const { if( mpImpl.is() ) TakeTextRect( mpImpl->maEditPos, rOutliner, rTextRect, bNoEditText, pAnchorRect, bLineWidth ); } -void SdrTableObj::TakeTextRect( const CellPos& rPos, SdrOutliner& rOutliner, Rectangle& rTextRect, bool bNoEditText, Rectangle* pAnchorRect, bool /*bLineWidth*/ ) const +void SdrTableObj::TakeTextRect( const CellPos& rPos, SdrOutliner& rOutliner, tools::Rectangle& rTextRect, bool bNoEditText, tools::Rectangle* pAnchorRect, bool /*bLineWidth*/ ) const { if( !mpImpl.is()) return; @@ -1396,7 +1396,7 @@ void SdrTableObj::TakeTextRect( const CellPos& rPos, SdrOutliner& rOutliner, Rec if( !xCell.is() ) return; - Rectangle aAnkRect; + tools::Rectangle aAnkRect; TakeTextAnchorRect( rPos, aAnkRect ); SdrTextVertAdjust eVAdj=xCell->GetTextVerticalAdjust(); @@ -1465,7 +1465,7 @@ void SdrTableObj::TakeTextRect( const CellPos& rPos, SdrOutliner& rOutliner, Rec if (pAnchorRect) *pAnchorRect=aAnkRect; - rTextRect=Rectangle(aTextPos,aTextSiz); + rTextRect=tools::Rectangle(aTextPos,aTextSiz); } @@ -1524,7 +1524,7 @@ void SdrTableObj::getActiveCellPos( CellPos& rPos ) const } -void SdrTableObj::getCellBounds( const CellPos& rPos, ::Rectangle& rCellRect ) +void SdrTableObj::getCellBounds( const CellPos& rPos, ::tools::Rectangle& rCellRect ) { if( mpImpl.is() ) { @@ -1535,16 +1535,16 @@ void SdrTableObj::getCellBounds( const CellPos& rPos, ::Rectangle& rCellRect ) } -void SdrTableObj::TakeTextAnchorRect(Rectangle& rAnchorRect) const +void SdrTableObj::TakeTextAnchorRect(tools::Rectangle& rAnchorRect) const { if( mpImpl.is() ) TakeTextAnchorRect( mpImpl->maEditPos, rAnchorRect ); } -void SdrTableObj::TakeTextAnchorRect( const CellPos& rPos, Rectangle& rAnchorRect ) const +void SdrTableObj::TakeTextAnchorRect( const CellPos& rPos, tools::Rectangle& rAnchorRect ) const { - Rectangle aAnkRect(maRect); + tools::Rectangle aAnkRect(maRect); if( mpImpl.is() ) { @@ -1558,17 +1558,17 @@ void SdrTableObj::TakeTextAnchorRect( const CellPos& rPos, Rectangle& rAnchorRec } -void SdrTableObj::TakeTextEditArea(Size* pPaperMin, Size* pPaperMax, Rectangle* pViewInit, Rectangle* pViewMin) const +void SdrTableObj::TakeTextEditArea(Size* pPaperMin, Size* pPaperMax, tools::Rectangle* pViewInit, tools::Rectangle* pViewMin) const { if( mpImpl.is() ) TakeTextEditArea( mpImpl->maEditPos, pPaperMin, pPaperMax, pViewInit, pViewMin ); } -void SdrTableObj::TakeTextEditArea( const CellPos& rPos, Size* pPaperMin, Size* pPaperMax, Rectangle* pViewInit, Rectangle* pViewMin ) const +void SdrTableObj::TakeTextEditArea( const CellPos& rPos, Size* pPaperMin, Size* pPaperMax, tools::Rectangle* pViewInit, tools::Rectangle* pViewMin ) const { Size aPaperMin,aPaperMax; - Rectangle aViewInit; + tools::Rectangle aViewInit; TakeTextAnchorRect( rPos, aViewInit ); Size aAnkSiz(aViewInit.GetSize()); @@ -1701,19 +1701,19 @@ SdrTableObj& SdrTableObj::operator=(const SdrTableObj& rObj) } -const Rectangle& SdrTableObj::GetSnapRect() const +const tools::Rectangle& SdrTableObj::GetSnapRect() const { return maRect; } -void SdrTableObj::NbcSetSnapRect(const Rectangle& rRect) +void SdrTableObj::NbcSetSnapRect(const tools::Rectangle& rRect) { NbcSetLogicRect( rRect ); } -const Rectangle& SdrTableObj::GetLogicRect() const +const tools::Rectangle& SdrTableObj::GetLogicRect() const { return maLogicRect; } @@ -1740,7 +1740,7 @@ bool SdrTableObj::BegTextEdit(SdrOutliner& rOutl) if (bUpdMerk) rOutl.SetUpdateMode(false); Size aPaperMin; Size aPaperMax; - Rectangle aEditArea; + tools::Rectangle aEditArea; TakeTextEditArea(&aPaperMin,&aPaperMax,&aEditArea,nullptr); rOutl.SetMinAutoPaperSize(aPaperMin); @@ -1835,7 +1835,7 @@ void SdrTableObj::NbcSetOutlinerParaObject( OutlinerParaObject* pTextObject) } -void SdrTableObj::NbcSetLogicRect(const Rectangle& rRect) +void SdrTableObj::NbcSetLogicRect(const tools::Rectangle& rRect) { maLogicRect=rRect; ImpJustifyRect(maLogicRect); @@ -1851,9 +1851,9 @@ void SdrTableObj::NbcSetLogicRect(const Rectangle& rRect) } -void SdrTableObj::AdjustToMaxRect( const Rectangle& rMaxRect, bool /* bShrinkOnly = false */ ) +void SdrTableObj::AdjustToMaxRect( const tools::Rectangle& rMaxRect, bool /* bShrinkOnly = false */ ) { - Rectangle aAdjustRect( rMaxRect ); + tools::Rectangle aAdjustRect( rMaxRect ); aAdjustRect.setHeight( GetLogicRect().getHeight() ); SetLogicRect( aAdjustRect ); } @@ -1870,7 +1870,7 @@ void SdrTableObj::NbcMove(const Size& rSiz) void SdrTableObj::NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact) { - Rectangle aOldRect( maLogicRect ); + tools::Rectangle aOldRect( maLogicRect ); ResizeRect(maLogicRect,rRef,xFact,yFact); maRect = maLogicRect; @@ -1881,11 +1881,11 @@ void SdrTableObj::NbcResize(const Point& rRef, const Fraction& xFact, const Frac bool SdrTableObj::AdjustTextFrameWidthAndHeight() { - Rectangle aNeuRect(maLogicRect); + tools::Rectangle aNeuRect(maLogicRect); bool bRet=AdjustTextFrameWidthAndHeight(aNeuRect); if (bRet) { - Rectangle aBoundRect0; + tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); maRect = aNeuRect; @@ -1898,12 +1898,12 @@ bool SdrTableObj::AdjustTextFrameWidthAndHeight() } -bool SdrTableObj::AdjustTextFrameWidthAndHeight(Rectangle& rR, bool bHeight, bool bWidth) const +bool SdrTableObj::AdjustTextFrameWidthAndHeight(tools::Rectangle& rR, bool bHeight, bool bWidth) const { if((pModel == nullptr) || rR.IsEmpty() || !mpImpl.is() || !mpImpl->mxTable.is() ) return false; - Rectangle aRectangle( rR ); + tools::Rectangle aRectangle( rR ); mpImpl->LayoutTable( aRectangle, !bWidth, !bHeight ); if( aRectangle != rR ) @@ -1926,7 +1926,7 @@ void SdrTableObj::NbcReformatText() void SdrTableObj::ReformatText() { - Rectangle aBoundRect0; + tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); NbcReformatText(); @@ -2188,7 +2188,7 @@ bool SdrTableObj::applySpecialDrag(SdrDragStat& rDrag) case SdrHdlKind::Lower: case SdrHdlKind::LowerRight: { - const Rectangle aNewRectangle(ImpDragCalcRect(rDrag)); + const tools::Rectangle aNewRectangle(ImpDragCalcRect(rDrag)); if (aNewRectangle != maRect) { @@ -2257,7 +2257,7 @@ basegfx::B2DPolyPolygon SdrTableObj::getSpecialDragPoly(const SdrDragStat& rDrag bool SdrTableObj::BegCreate(SdrDragStat& rStat) { rStat.SetOrtho4Possible(); - Rectangle aRect1(rStat.GetStart(), rStat.GetNow()); + tools::Rectangle aRect1(rStat.GetStart(), rStat.GetNow()); aRect1.Justify(); rStat.SetActionRect(aRect1); maRect = aRect1; @@ -2267,7 +2267,7 @@ bool SdrTableObj::BegCreate(SdrDragStat& rStat) bool SdrTableObj::MovCreate(SdrDragStat& rStat) { - Rectangle aRect1; + tools::Rectangle aRect1; rStat.TakeCreateRect(aRect1); ImpJustifyRect(aRect1); rStat.SetActionRect(aRect1); @@ -2298,7 +2298,7 @@ bool SdrTableObj::BckCreate(SdrDragStat& /*rStat*/) basegfx::B2DPolyPolygon SdrTableObj::TakeCreatePoly(const SdrDragStat& rDrag) const { - Rectangle aRect1; + tools::Rectangle aRect1; rDrag.TakeCreateRect(aRect1); aRect1.Justify(); diff --git a/svx/source/table/tablecontroller.cxx b/svx/source/table/tablecontroller.cxx index f7d8d7da1fc4..0e53a54d7450 100644 --- a/svx/source/table/tablecontroller.cxx +++ b/svx/source/table/tablecontroller.cxx @@ -2082,7 +2082,7 @@ void SvxTableController::updateSelectionOverlay() { sdr::overlay::OverlayObjectCell::RangeVector aRanges; - Rectangle aStartRect, aEndRect; + tools::Rectangle aStartRect, aEndRect; CellPos aStart,aEnd; getSelectedCells( aStart, aEnd ); pTableObj->getCellBounds( aStart, aStartRect ); @@ -2123,10 +2123,10 @@ void SvxTableController::updateSelectionOverlay() if (pOutDev && comphelper::LibreOfficeKit::isActive()) { // Left edge of aStartRect. - Rectangle aSelectionStart(aStartRect.Left(), aStartRect.Top(), aStartRect.Left(), aStartRect.Bottom()); + tools::Rectangle aSelectionStart(aStartRect.Left(), aStartRect.Top(), aStartRect.Left(), aStartRect.Bottom()); // Right edge of aEndRect. - Rectangle aSelectionEnd(aEndRect.Right(), aEndRect.Top(), aEndRect.Right(), aEndRect.Bottom()); - Rectangle aSelection(a2DRange.getMinX(), a2DRange.getMinY(), a2DRange.getMaxX(), a2DRange.getMaxY()); + tools::Rectangle aSelectionEnd(aEndRect.Right(), aEndRect.Top(), aEndRect.Right(), aEndRect.Bottom()); + tools::Rectangle aSelection(a2DRange.getMinX(), a2DRange.getMinY(), a2DRange.getMaxX(), a2DRange.getMaxY()); if (pOutDev->GetMapMode().GetMapUnit() == MapUnit::Map100thMM) { diff --git a/svx/source/table/tablehandles.cxx b/svx/source/table/tablehandles.cxx index 63b2ac8f4d47..01eb2ce65ae0 100644 --- a/svx/source/table/tablehandles.cxx +++ b/svx/source/table/tablehandles.cxx @@ -238,7 +238,7 @@ drawinglayer::primitive2d::Primitive2DContainer OverlayTableEdge::createOverlayO TableBorderHdl::TableBorderHdl( - const Rectangle& rRect, + const tools::Rectangle& rRect, bool bAnimate) : SdrHdl(rRect.TopLeft(), SdrHdlKind::Move), maRectangle(rRect), diff --git a/svx/source/table/tablehandles.hxx b/svx/source/table/tablehandles.hxx index 48f0f679008e..3b34cfac640d 100644 --- a/svx/source/table/tablehandles.hxx +++ b/svx/source/table/tablehandles.hxx @@ -70,7 +70,7 @@ class TableBorderHdl : public SdrHdl { public: TableBorderHdl( - const Rectangle& rRect, + const tools::Rectangle& rRect, bool bAnimate); virtual Pointer GetPointer() const override; @@ -81,7 +81,7 @@ protected: virtual void CreateB2dIAObject() override; private: - Rectangle maRectangle; + tools::Rectangle maRectangle; bool mbAnimate : 1; }; diff --git a/svx/source/table/tablelayouter.cxx b/svx/source/table/tablelayouter.cxx index efba5de5ef01..ae588b11a5aa 100644 --- a/svx/source/table/tablelayouter.cxx +++ b/svx/source/table/tablelayouter.cxx @@ -496,7 +496,7 @@ typedef std::vector< MergeableCellVector > MergeVector; typedef std::vector< sal_Int32 > Int32Vector; -void TableLayouter::LayoutTableWidth( Rectangle& rArea, bool bFit ) +void TableLayouter::LayoutTableWidth( tools::Rectangle& rArea, bool bFit ) { const sal_Int32 nColCount = getColumnCount(); const sal_Int32 nRowCount = getRowCount(); @@ -648,7 +648,7 @@ void TableLayouter::LayoutTableWidth( Rectangle& rArea, bool bFit ) } -void TableLayouter::LayoutTableHeight( Rectangle& rArea, bool bFit ) +void TableLayouter::LayoutTableHeight( tools::Rectangle& rArea, bool bFit ) { const sal_Int32 nColCount = getColumnCount(); const sal_Int32 nRowCount = getRowCount(); @@ -807,7 +807,7 @@ void TableLayouter::LayoutTableHeight( Rectangle& rArea, bool bFit ) /** try to fit the table into the given rectangle. If the rectangle is to small, it will be grown to fit the table. */ -void TableLayouter::LayoutTable( Rectangle& rRectangle, bool bFitWidth, bool bFitHeight ) +void TableLayouter::LayoutTable( tools::Rectangle& rRectangle, bool bFitWidth, bool bFitHeight ) { if( !mxTable.is() ) return; @@ -837,7 +837,7 @@ void TableLayouter::LayoutTable( Rectangle& rRectangle, bool bFitWidth, bool bFi } -void TableLayouter::updateCells( Rectangle& rRectangle ) +void TableLayouter::updateCells( tools::Rectangle& rRectangle ) { const sal_Int32 nColCount = getColumnCount(); const sal_Int32 nRowCount = getRowCount(); @@ -853,7 +853,7 @@ void TableLayouter::updateCells( Rectangle& rRectangle ) basegfx::B2IRectangle aCellArea; if( getCellArea( xCell, aPos, aCellArea ) ) { - Rectangle aCellRect; + tools::Rectangle aCellRect; aCellRect.Left() = aCellArea.getMinX(); aCellRect.Right() = aCellArea.getMaxX(); aCellRect.Top() = aCellArea.getMinY(); @@ -1034,7 +1034,7 @@ void TableLayouter::UpdateBorderLayout() } -void TableLayouter::DistributeColumns( ::Rectangle& rArea, sal_Int32 nFirstCol, sal_Int32 nLastCol ) +void TableLayouter::DistributeColumns( ::tools::Rectangle& rArea, sal_Int32 nFirstCol, sal_Int32 nLastCol ) { if( mxTable.is() ) try { @@ -1072,7 +1072,7 @@ void TableLayouter::DistributeColumns( ::Rectangle& rArea, sal_Int32 nFirstCol, } -void TableLayouter::DistributeRows( ::Rectangle& rArea, sal_Int32 nFirstRow, sal_Int32 nLastRow ) +void TableLayouter::DistributeRows( ::tools::Rectangle& rArea, sal_Int32 nFirstRow, sal_Int32 nLastRow ) { if( mxTable.is() ) try { diff --git a/svx/source/table/tablelayouter.hxx b/svx/source/table/tablelayouter.hxx index 5798179214dd..cf577e905437 100644 --- a/svx/source/table/tablelayouter.hxx +++ b/svx/source/table/tablelayouter.hxx @@ -31,7 +31,7 @@ #include "svx/svdotable.hxx" -class Rectangle; +namespace tools { class Rectangle; } namespace editeng { @@ -67,7 +67,7 @@ public: if bFitWidth or bFitHeight is set, the model is changed. */ - void LayoutTable( ::Rectangle& rRectangle, bool bFitWidth, bool bFitHeight ); + void LayoutTable( ::tools::Rectangle& rRectangle, bool bFitWidth, bool bFitHeight ); void UpdateBorderLayout(); @@ -89,21 +89,21 @@ public: /** returns the requested borderline in rpBorderLine or a null pointer if there is no border at this edge */ editeng::SvxBorderLine* getBorderLine( sal_Int32 nEdgeX, sal_Int32 nEdgeY, bool bHorizontal )const; - void updateCells( ::Rectangle& rRectangle ); + void updateCells( ::tools::Rectangle& rRectangle ); sal_Int32 getHorizontalEdge( int nEdgeY, sal_Int32* pnMin, sal_Int32* pnMax ); sal_Int32 getVerticalEdge( int nEdgeX , sal_Int32* pnMin, sal_Int32* pnMax); - void DistributeColumns( ::Rectangle& rArea, sal_Int32 nFirstCol, sal_Int32 nLastCol ); - void DistributeRows( ::Rectangle& rArea, sal_Int32 nFirstRow, sal_Int32 nLastRow ); + void DistributeColumns( ::tools::Rectangle& rArea, sal_Int32 nFirstCol, sal_Int32 nLastCol ); + void DistributeRows( ::tools::Rectangle& rArea, sal_Int32 nFirstRow, sal_Int32 nLastRow ); void dumpAsXml(struct _xmlTextWriter* pWriter) const; private: CellRef getCell( const CellPos& rPos ) const; basegfx::B2ITuple getCellSize( const CellRef& xCell, const CellPos& rPos ) const; - void LayoutTableWidth( ::Rectangle& rArea, bool bFit ); - void LayoutTableHeight( ::Rectangle& rArea, bool bFit ); + void LayoutTableWidth( ::tools::Rectangle& rArea, bool bFit ); + void LayoutTableHeight( ::tools::Rectangle& rArea, bool bFit ); bool isValidColumn( sal_Int32 nColumn ) const { return (nColumn >= 0) && (nColumn < static_cast<sal_Int32>( maColumns.size())); } bool isValidRow( sal_Int32 nRow ) const { return (nRow >= 0) && (nRow < static_cast<sal_Int32>( maRows.size())); } diff --git a/svx/source/table/tablertfimporter.cxx b/svx/source/table/tablertfimporter.cxx index 5dad05c6104f..6f217f08c1fc 100644 --- a/svx/source/table/tablertfimporter.cxx +++ b/svx/source/table/tablertfimporter.cxx @@ -346,7 +346,7 @@ void SdrTableRTFParser::FillTable() } } - Rectangle aRect( mrTableObj.GetSnapRect() ); + tools::Rectangle aRect( mrTableObj.GetSnapRect() ); aRect.Right() = aRect.Left() + nLastEdge; mrTableObj.NbcSetSnapRect( aRect ); diff --git a/svx/source/table/viewcontactoftableobj.cxx b/svx/source/table/viewcontactoftableobj.cxx index 24fc6655b86e..fc1adcda3dad 100644 --- a/svx/source/table/viewcontactoftableobj.cxx +++ b/svx/source/table/viewcontactoftableobj.cxx @@ -520,7 +520,7 @@ namespace sdr // create range using the model data directly. This is in SdrTextObj::aRect which i will access using // GetGeoRect() to not trigger any calculations. It's the unrotated geometry. - const Rectangle& rObjectRectangle(rTableObj.GetGeoRect()); + const tools::Rectangle& rObjectRectangle(rTableObj.GetGeoRect()); const basegfx::B2DRange aObjectRange(rObjectRectangle.Left(), rObjectRectangle.Top(), rObjectRectangle.Right(), rObjectRectangle.Bottom()); // for each cell we need potentially a cell primitive and a border primitive @@ -680,7 +680,7 @@ namespace sdr else { // take unrotated snap rect (direct model data) for position and size - const Rectangle& rRectangle = rTableObj.GetGeoRect(); + const tools::Rectangle& rRectangle = rTableObj.GetGeoRect(); const basegfx::B2DRange aObjectRange( rRectangle.Left(), rRectangle.Top(), rRectangle.Right(), rRectangle.Bottom()); diff --git a/svx/source/tbxctrls/SvxPresetListBox.cxx b/svx/source/tbxctrls/SvxPresetListBox.cxx index 89f96da17ec7..0bda5d1831b4 100644 --- a/svx/source/tbxctrls/SvxPresetListBox.cxx +++ b/svx/source/tbxctrls/SvxPresetListBox.cxx @@ -67,7 +67,7 @@ void SvxPresetListBox::Command( const CommandEvent& rEvent ) pMenuWindow->GetPopupModeFlags() | FloatWinPopupFlags::NoMouseUpClose); } pMenu->SetSelectHdl( LINK(this, SvxPresetListBox, OnMenuItemSelected) ); - pMenu->Execute(this,Rectangle(aPos,Size(1,1)),PopupMenuFlags::ExecuteDown); + pMenu->Execute(this,tools::Rectangle(aPos,Size(1,1)),PopupMenuFlags::ExecuteDown); } } break; diff --git a/svx/source/tbxctrls/fontworkgallery.cxx b/svx/source/tbxctrls/fontworkgallery.cxx index 2d34ace6eef1..9b93bc22d008 100644 --- a/svx/source/tbxctrls/fontworkgallery.cxx +++ b/svx/source/tbxctrls/fontworkgallery.cxx @@ -203,12 +203,12 @@ void FontWorkGalleryDialog::insertSelectedFontwork() OutputDevice* pOutDev = mpSdrView->GetFirstOutputDevice(); if( pOutDev ) { - Rectangle aObjRect( pNewObject->GetLogicRect() ); - Rectangle aVisArea = pOutDev->PixelToLogic(Rectangle(Point(0,0), pOutDev->GetOutputSizePixel())); + tools::Rectangle aObjRect( pNewObject->GetLogicRect() ); + tools::Rectangle aVisArea = pOutDev->PixelToLogic(tools::Rectangle(Point(0,0), pOutDev->GetOutputSizePixel())); Point aPagePos = aVisArea.Center(); aPagePos.X() -= aObjRect.GetWidth() / 2; aPagePos.Y() -= aObjRect.GetHeight() / 2; - Rectangle aNewObjectRectangle(aPagePos, aObjRect.GetSize()); + tools::Rectangle aNewObjectRectangle(aPagePos, aObjRect.GetSize()); SdrPageView* pPV = mpSdrView->GetSdrPageView(); pNewObject->SetLogicRect(aNewObjectRectangle); diff --git a/svx/source/tbxctrls/grafctrl.cxx b/svx/source/tbxctrls/grafctrl.cxx index 9a8e4e419ab5..a66609ec79af 100644 --- a/svx/source/tbxctrls/grafctrl.cxx +++ b/svx/source/tbxctrls/grafctrl.cxx @@ -741,7 +741,7 @@ void SvxGrafAttrHelper::ExecuteGrafAttr( SfxRequest& rReq, SdrView& rView ) Size aNewGrfSize( OutputDevice::LogicToLogic( rGrfSize, aMapTwip, aMap100 ) ); Size aOldGrfSize( pObj->GetLogicRect().GetSize() ); - Rectangle aNewRect( aNewOrigin, aNewGrfSize ); + tools::Rectangle aNewRect( aNewOrigin, aNewGrfSize ); Point aOffset( (aNewGrfSize.Width() - aOldGrfSize.Width()) >> 1, (aNewGrfSize.Height() - aOldGrfSize.Height()) >> 1 ); diff --git a/svx/source/tbxctrls/layctrl.cxx b/svx/source/tbxctrls/layctrl.cxx index f552a4864a4a..ee5e69f2fc3f 100644 --- a/svx/source/tbxctrls/layctrl.cxx +++ b/svx/source/tbxctrls/layctrl.cxx @@ -81,7 +81,7 @@ public: void KeyInput( const KeyEvent& rKEvt ) override; virtual void MouseMove( const MouseEvent& rMEvt ) override; virtual void MouseButtonUp( const MouseEvent& rMEvt ) override; - virtual void Paint( vcl::RenderContext& /*rRenderContext*/, const Rectangle& ) override; + virtual void Paint( vcl::RenderContext& /*rRenderContext*/, const tools::Rectangle& ) override; virtual void PopupModeEnd() override; private: @@ -242,7 +242,7 @@ void TableWindow::MouseButtonUp( const MouseEvent& rMEvt ) } -void TableWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangle&) +void TableWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&) { const long nSelectionWidth = mnTablePosX + nCol * mnTableCellWidth; const long nSelectionHeight = mnTablePosY + nLine * mnTableCellHeight; @@ -250,15 +250,15 @@ void TableWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangle&) // the non-selected parts of the table rRenderContext.SetLineColor(aLineColor); rRenderContext.SetFillColor(aFillColor); - rRenderContext.DrawRect(Rectangle(nSelectionWidth, mnTablePosY, mnTableWidth, nSelectionHeight)); - rRenderContext.DrawRect(Rectangle(mnTablePosX, nSelectionHeight, nSelectionWidth, mnTableHeight)); - rRenderContext.DrawRect(Rectangle(nSelectionWidth, nSelectionHeight, mnTableWidth, mnTableHeight)); + rRenderContext.DrawRect(tools::Rectangle(nSelectionWidth, mnTablePosY, mnTableWidth, nSelectionHeight)); + rRenderContext.DrawRect(tools::Rectangle(mnTablePosX, nSelectionHeight, nSelectionWidth, mnTableHeight)); + rRenderContext.DrawRect(tools::Rectangle(nSelectionWidth, nSelectionHeight, mnTableWidth, mnTableHeight)); // the selection if (nCol > 0 && nLine > 0) { rRenderContext.SetFillColor(aHighlightFillColor); - rRenderContext.DrawRect(Rectangle(mnTablePosX, mnTablePosY, nSelectionWidth, nSelectionHeight)); + rRenderContext.DrawRect(tools::Rectangle(mnTablePosX, mnTablePosY, nSelectionWidth, nSelectionHeight)); } // lines inside of the table @@ -302,7 +302,7 @@ void TableWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangle&) rRenderContext.SetLineColor(aLineColor); rRenderContext.SetFillColor(aBackgroundColor); - rRenderContext.DrawRect(Rectangle(nTextX - 2 * nTipBorder, + rRenderContext.DrawRect(tools::Rectangle(nTextX - 2 * nTipBorder, nTextY - 2 * nTipBorder, nTextX + aTextSize.Width() + nTipBorder, nTextY + aTextSize.Height() + nTipBorder)); @@ -345,7 +345,7 @@ void TableWindow::Update( long nNewCol, long nNewLine ) { nCol = nNewCol; nLine = nNewLine; - Invalidate(Rectangle(mnTablePosX, mnTablePosY, mnTableWidth, mnTableHeight)); + Invalidate(tools::Rectangle(mnTablePosX, mnTablePosY, mnTableWidth, mnTableHeight)); } } @@ -401,7 +401,7 @@ public: virtual void MouseMove( const MouseEvent& rMEvt ) override; virtual void MouseButtonDown( const MouseEvent& rMEvt ) override; virtual void MouseButtonUp( const MouseEvent& rMEvt ) override; - virtual void Paint( vcl::RenderContext& /*rRenderContext*/, const Rectangle& ) override; + virtual void Paint( vcl::RenderContext& /*rRenderContext*/, const tools::Rectangle& ) override; virtual void PopupModeEnd() override; }; @@ -489,7 +489,7 @@ void ColumnsWindow::UpdateSize_Impl( long nNewCol ) if ( nNewCol > nWidth ) nNewCol = nWidth; - Invalidate( Rectangle( 0, aWinSize.Height()-nTextHeight+2, + Invalidate( tools::Rectangle( 0, aWinSize.Height()-nTextHeight+2, aWinSize.Width(), aWinSize.Height() ) ); SetOutputSizePixel( Size( nMX*nWidth-1, aWinSize.Height() ) ); } @@ -497,7 +497,7 @@ void ColumnsWindow::UpdateSize_Impl( long nNewCol ) if ( nNewCol != nCol ) { - Invalidate( Rectangle( 0, aWinSize.Height()-nTextHeight+2, + Invalidate( tools::Rectangle( 0, aWinSize.Height()-nTextHeight+2, aWinSize.Width(), aWinSize.Height() ) ); long nMinCol = 0, nMaxCol = 0; @@ -513,7 +513,7 @@ void ColumnsWindow::UpdateSize_Impl( long nNewCol ) nMaxCol = nNewCol; } - Invalidate( Rectangle( nMinCol*nMX-1, 0, + Invalidate( tools::Rectangle( nMinCol*nMX-1, 0, nMaxCol*nMX+1, aWinSize.Height()-nTextHeight+2 ) ); nCol = nNewCol; } @@ -591,7 +591,7 @@ void ColumnsWindow::MouseButtonUp( const MouseEvent& rMEvt ) } -void ColumnsWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangle&) +void ColumnsWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&) { long i; long nLineWidth; @@ -610,7 +610,7 @@ void ColumnsWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangle&) rRenderContext.SetFillColor(aFillColor); } - rRenderContext.DrawRect(Rectangle(i * nMX - 1, -1, i * nMX + nMX, aSize.Height() - nTextHeight + 1)); + rRenderContext.DrawRect(tools::Rectangle(i * nMX - 1, -1, i * nMX + nMX, aSize.Height() - nTextHeight + 1)); long j = 4; while (j < aSize.Height() - nTextHeight - 4) @@ -635,19 +635,19 @@ void ColumnsWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangle&) Size aTextSize(rRenderContext.GetTextWidth(aText), rRenderContext.GetTextHeight()); rRenderContext.DrawText(Point((aSize.Width() - aTextSize.Width()) / 2, aSize.Height() - nTextHeight + 2), aText); - rRenderContext.DrawRect(Rectangle(0, + rRenderContext.DrawRect(tools::Rectangle(0, aSize.Height() - nTextHeight + 2, (aSize.Width() - aTextSize.Width()) / 2 - 1, aSize.Height())); - rRenderContext.DrawRect(Rectangle((aSize.Width() - aTextSize.Width()) / 2 + aTextSize.Width(), + rRenderContext.DrawRect(tools::Rectangle((aSize.Width() - aTextSize.Width()) / 2 + aTextSize.Width(), aSize.Height() - nTextHeight + 2, aSize.Width(), aSize.Height())); rRenderContext.SetLineColor(aLineColor); rRenderContext.SetFillColor(); - rRenderContext.DrawRect(Rectangle( 0, 0, aSize.Width() - 1, aSize.Height() - nTextHeight + 1)); + rRenderContext.DrawRect(tools::Rectangle( 0, 0, aSize.Width() - 1, aSize.Height() - nTextHeight + 1)); } diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx index a4725bc0d533..c70d184c2810 100644 --- a/svx/source/tbxctrls/tbcontrl.cxx +++ b/svx/source/tbxctrls/tbcontrl.cxx @@ -174,8 +174,8 @@ private: void ReleaseFocus(); static Color TestColorsVisible(const Color &FontCol, const Color &BackCol); static void UserDrawEntry(const UserDrawEvent& rUDEvt, const OUString &rStyleName); - void SetupEntry(vcl::RenderContext& rRenderContext, vcl::Window* pParent, sal_Int32 nItem, const Rectangle& rRect, const OUString& rStyleName, bool bIsNotSelected); - static bool AdjustFontForItemHeight(OutputDevice* pDevice, Rectangle& rTextRect, long nHeight); + void SetupEntry(vcl::RenderContext& rRenderContext, vcl::Window* pParent, sal_Int32 nItem, const tools::Rectangle& rRect, const OUString& rStyleName, bool bIsNotSelected); + static bool AdjustFontForItemHeight(OutputDevice* pDevice, tools::Rectangle& rTextRect, long nHeight); void SetOptimalSize(); DECL_LINK( MenuSelectHdl, Menu *, bool ); }; @@ -603,7 +603,7 @@ void SvxStyleBox_Impl::StateChanged( StateChangedType nStateChange ) } } -bool SvxStyleBox_Impl::AdjustFontForItemHeight(OutputDevice* pDevice, Rectangle& rTextRect, long nHeight) +bool SvxStyleBox_Impl::AdjustFontForItemHeight(OutputDevice* pDevice, tools::Rectangle& rTextRect, long nHeight) { if (rTextRect.Bottom() > nHeight) { @@ -637,7 +637,7 @@ void SvxStyleBox_Impl::UserDrawEntry(const UserDrawEvent& rUDEvt, const OUString // italics is present const int nLeftDistance = 8; - Rectangle aTextRect; + tools::Rectangle aTextRect; pDevice->GetTextBoundRect(aTextRect, rStyleName); Point aPos( rUDEvt.GetRect().TopLeft() ); @@ -649,7 +649,7 @@ void SvxStyleBox_Impl::UserDrawEntry(const UserDrawEvent& rUDEvt, const OUString pDevice->DrawText(aPos, rStyleName); } -void SvxStyleBox_Impl::SetupEntry(vcl::RenderContext& rRenderContext, vcl::Window* pParent, sal_Int32 nItem, const Rectangle& rRect, const OUString& rStyleName, bool bIsNotSelected) +void SvxStyleBox_Impl::SetupEntry(vcl::RenderContext& rRenderContext, vcl::Window* pParent, sal_Int32 nItem, const tools::Rectangle& rRect, const OUString& rStyleName, bool bIsNotSelected) { unsigned int nId = rRect.GetHeight() != 0 ? (rRect.getY() / rRect.GetHeight()) : MAX_STYLES_ENTRIES; if (nItem == 0 || nItem == GetEntryCount() - 1) @@ -813,7 +813,7 @@ void SvxStyleBox_Impl::UserDraw( const UserDrawEvent& rUDEvt ) vcl::RenderContext *pDevice = rUDEvt.GetRenderContext(); pDevice->Push(PushFlags::FILLCOLOR | PushFlags::FONT | PushFlags::TEXTCOLOR); - const Rectangle& rRect(rUDEvt.GetRect()); + const tools::Rectangle& rRect(rUDEvt.GetRect()); bool bIsNotSelected = rUDEvt.GetItemId() != GetSelectEntryPos(); SetupEntry(*pDevice, rUDEvt.GetWindow(), nItem, rRect, aStyleName, bIsNotSelected); @@ -836,7 +836,7 @@ IMPL_LINK(SvxStyleBox_Impl, CalcOptimalExtraUserWidth, VclWindowEvent&, event, v for (sal_Int32 i = 0; i < nEntryCount; ++i) { OUString sStyleName(GetEntry(i)); - Rectangle aTextRectForDefaultFont; + tools::Rectangle aTextRectForDefaultFont; GetTextBoundRect(aTextRectForDefaultFont, sStyleName); const long nWidth = aTextRectForDefaultFont.GetWidth(); @@ -850,8 +850,8 @@ IMPL_LINK(SvxStyleBox_Impl, CalcOptimalExtraUserWidth, VclWindowEvent&, event, v OUString sStyleName(GetEntry(i)); Push(PushFlags::FILLCOLOR | PushFlags::FONT | PushFlags::TEXTCOLOR); - SetupEntry(*this /*FIXME rendercontext*/, this, i, Rectangle(0, 0, RECT_MAX, ITEM_HEIGHT), sStyleName, true); - Rectangle aTextRectForActualFont; + SetupEntry(*this /*FIXME rendercontext*/, this, i, tools::Rectangle(0, 0, RECT_MAX, ITEM_HEIGHT), sStyleName, true); + tools::Rectangle aTextRectForActualFont; GetTextBoundRect(aTextRectForActualFont, sStyleName); if (AdjustFontForItemHeight(this, aTextRectForActualFont, ITEM_HEIGHT)) { @@ -3262,7 +3262,7 @@ void SvxColorListBox::ShowPreview(const NamedColor &rColor) VclPtr<VirtualDevice> xDevice = VclPtr<VirtualDevice>::Create(); xDevice->SetOutputSize(aImageSize); - const Rectangle aRect(Point(0, 0), aImageSize); + const tools::Rectangle aRect(Point(0, 0), aImageSize); if (m_bShowNoneButton && rColor.first == COL_NONE_COLOR) { const Color aW(COL_WHITE); diff --git a/svx/source/tbxctrls/tbxcolorupdate.cxx b/svx/source/tbxctrls/tbxcolorupdate.cxx index e452bc1aaedf..157b65db6318 100644 --- a/svx/source/tbxctrls/tbxcolorupdate.cxx +++ b/svx/source/tbxctrls/tbxcolorupdate.cxx @@ -95,7 +95,7 @@ namespace svx long nWidth = std::min(aItemSize.Width(), aSource.GetSizePixel().Width()); long nHeight = std::min(aItemSize.Height(), aSource.GetSizePixel().Height()); - Rectangle aRect(Point(0, 0), Size(nWidth, nHeight)); + tools::Rectangle aRect(Point(0, 0), Size(nWidth, nHeight)); aBmpEx.CopyPixel( aRect, aRect, &aSource ); @@ -149,9 +149,9 @@ namespace svx if (maBmpSize.Width() == maBmpSize.Height()) // tdf#84985 align color bar with icon bottom edge; integer arithmetic e.g. 26 - 26/4 <> 26 * 3/4 - maUpdRect = Rectangle(Point( 0, maBmpSize.Height() - maBmpSize.Height() / 4), Size(maBmpSize.Width(), maBmpSize.Height() / 4)); + maUpdRect = tools::Rectangle(Point( 0, maBmpSize.Height() - maBmpSize.Height() / 4), Size(maBmpSize.Width(), maBmpSize.Height() / 4)); else - maUpdRect = Rectangle(Point( maBmpSize.Height() + 2, 2), Point(maBmpSize.Width() - 3, maBmpSize.Height() - 3)); + maUpdRect = tools::Rectangle(Point( maBmpSize.Height() + 2, 2), Point(maBmpSize.Width() - 3, maBmpSize.Height() - 3)); pBmpAcc->DrawRect(maUpdRect); diff --git a/svx/source/unodraw/UnoGraphicExporter.cxx b/svx/source/unodraw/UnoGraphicExporter.cxx index b2c76da96c76..17eabdd5c360 100644 --- a/svx/source/unodraw/UnoGraphicExporter.cxx +++ b/svx/source/unodraw/UnoGraphicExporter.cxx @@ -223,8 +223,8 @@ namespace { // get hairline and full bound rect to evtl. reduce given target pixel size when // it is known that it will be expanded to get the right and bottom hairlines right - Rectangle aHairlineRect; - const Rectangle aRect(rMtf.GetBoundRect(*Application::GetDefaultDevice(), &aHairlineRect)); + tools::Rectangle aHairlineRect; + const tools::Rectangle aRect(rMtf.GetBoundRect(*Application::GetDefaultDevice(), &aHairlineRect)); if(!aRect.IsEmpty() && !aHairlineRect.IsEmpty()) { @@ -432,7 +432,7 @@ VclPtr<VirtualDevice> GraphicExporter::CreatePageVDev( SdrPage* pPage, sal_uIntP pView->SetHlplVisible( false ); pView->SetGlueVisible( false ); pView->ShowSdrPage(pPage); - vcl::Region aRegion (Rectangle( aPoint, aPageSize ) ); + vcl::Region aRegion (tools::Rectangle( aPoint, aPageSize ) ); ImplExportCheckVisisbilityRedirector aRedirector( mpCurrentPage ); @@ -636,7 +636,7 @@ bool GraphicExporter::GetGraphic( ExportSettings& rSettings, Graphic& aGraphic, if(pCorrectProperties) { - pTempBackgroundShape = new SdrRectObj(Rectangle(Point(0,0), pPage->GetSize())); + pTempBackgroundShape = new SdrRectObj(tools::Rectangle(Point(0,0), pPage->GetSize())); pTempBackgroundShape->SetMergedItemSet(pCorrectProperties->GetItemSet()); pTempBackgroundShape->SetMergedItem(XLineStyleItem(drawing::LineStyle_NONE)); pTempBackgroundShape->NbcSetStyleSheet(pCorrectProperties->GetStyleSheet(), true); @@ -740,7 +740,7 @@ bool GraphicExporter::GetGraphic( ExportSettings& rSettings, Graphic& aGraphic, const Point aNewOrg( pPage->GetLftBorder(), pPage->GetUppBorder() ); aNewSize = Size( aSize.Width() - pPage->GetLftBorder() - pPage->GetRgtBorder(), aSize.Height() - pPage->GetUppBorder() - pPage->GetLwrBorder() ); - const Rectangle aClipRect( aNewOrg, aNewSize ); + const tools::Rectangle aClipRect( aNewOrg, aNewSize ); MapMode aVMap( aMap ); aVDev->Push(); @@ -751,7 +751,7 @@ bool GraphicExporter::GetGraphic( ExportSettings& rSettings, Graphic& aGraphic, // Use new StandardCheckVisisbilityRedirector ImplExportCheckVisisbilityRedirector aRedirector( mpCurrentPage ); - pView->CompleteRedraw(aVDev, vcl::Region(Rectangle(aNewOrg, aNewSize)), &aRedirector); + pView->CompleteRedraw(aVDev, vcl::Region(tools::Rectangle(aNewOrg, aNewSize)), &aRedirector); aVDev->Pop(); @@ -849,8 +849,8 @@ bool GraphicExporter::GetGraphic( ExportSettings& rSettings, Graphic& aGraphic, if( pObj && dynamic_cast<const SdrTextObj*>( pObj) != nullptr && static_cast<SdrTextObj*>(pObj)->HasText() ) { - Rectangle aScrollRectangle; - Rectangle aPaintRectangle; + tools::Rectangle aScrollRectangle; + tools::Rectangle aPaintRectangle; const std::unique_ptr< GDIMetaFile > pMtf( static_cast<SdrTextObj*>(pObj)->GetTextScrollMetaFileAndRectangle( @@ -859,7 +859,7 @@ bool GraphicExporter::GetGraphic( ExportSettings& rSettings, Graphic& aGraphic, // take the larger one of the two rectangles (that // should be the bound rect of the retrieved // metafile) - Rectangle aTextRect; + tools::Rectangle aTextRect; if( aScrollRectangle.IsInside( aPaintRectangle ) ) aTextRect = aScrollRectangle; @@ -880,11 +880,11 @@ bool GraphicExporter::GetGraphic( ExportSettings& rSettings, Graphic& aGraphic, pMtf->AddAction( new MetaCommentAction( "XTEXT_SCROLLRECT", 0, reinterpret_cast<sal_uInt8 const*>(&aScrollRectangle), - sizeof( Rectangle ) ) ); + sizeof( tools::Rectangle ) ) ); pMtf->AddAction( new MetaCommentAction( "XTEXT_PAINTRECT", 0, reinterpret_cast<sal_uInt8 const*>(&aPaintRectangle), - sizeof( Rectangle ) ) ); + sizeof( tools::Rectangle ) ) ); aGraphic = Graphic( *pMtf ); @@ -899,7 +899,7 @@ bool GraphicExporter::GetGraphic( ExportSettings& rSettings, Graphic& aGraphic, ScopedVclPtrInstance< VirtualDevice > aOut; // calculate bound rect for all shapes - Rectangle aBound; + tools::Rectangle aBound; { std::vector< SdrObject* >::iterator aIter = aShapes.begin(); @@ -908,7 +908,7 @@ bool GraphicExporter::GetGraphic( ExportSettings& rSettings, Graphic& aGraphic, while( aIter != aEnd ) { SdrObject* pObj = (*aIter++); - Rectangle aR1(pObj->GetCurrentBoundRect()); + tools::Rectangle aR1(pObj->GetCurrentBoundRect()); if (aBound.IsEmpty()) aBound=aR1; else diff --git a/svx/source/unodraw/unopage.cxx b/svx/source/unodraw/unopage.cxx index 72413a7c328b..e41825f7fb85 100644 --- a/svx/source/unodraw/unopage.cxx +++ b/svx/source/unodraw/unopage.cxx @@ -478,7 +478,7 @@ SdrObject *SvxDrawPage::CreateSdrObject_(const Reference< drawing::XShape > & xS aSize.Width += 1; aSize.Height += 1; awt::Point aPos = xShape->getPosition(); - Rectangle aRect( Point( aPos.X, aPos.Y ), Size( aSize.Width, aSize.Height ) ); + tools::Rectangle aRect( Point( aPos.X, aPos.Y ), Size( aSize.Width, aSize.Height ) ); SdrObject* pNewObj = SdrObjFactory::MakeNewObject(nInventor, nType, aRect, mpPage); if (!pNewObj) diff --git a/svx/source/unodraw/unoshap2.cxx b/svx/source/unodraw/unoshap2.cxx index 201b245b0017..da4453058d24 100644 --- a/svx/source/unodraw/unoshap2.cxx +++ b/svx/source/unodraw/unoshap2.cxx @@ -1639,8 +1639,8 @@ awt::Point SAL_CALL SvxCustomShape::getPosition() bMirroredY = static_cast<SdrObjCustomShape*>(mpObj.get())->IsMirroredY(); } // get aRect, this is the unrotated snaprect - Rectangle aRect(static_cast<SdrObjCustomShape*>(mpObj.get())->GetLogicRect()); - Rectangle aRectangle( aRect ); + tools::Rectangle aRect(static_cast<SdrObjCustomShape*>(mpObj.get())->GetLogicRect()); + tools::Rectangle aRectangle( aRect ); if ( bMirroredX || bMirroredY ) { // we have to retrieve the unmirrored rect @@ -1649,7 +1649,7 @@ awt::Point SAL_CALL SvxCustomShape::getPosition() if ( bMirroredX ) { tools::Polygon aPol( Rect2Poly( aRect, aNewGeo ) ); - Rectangle aBoundRect( aPol.GetBoundRect() ); + tools::Rectangle aBoundRect( aPol.GetBoundRect() ); Point aRef1( ( aBoundRect.Left() + aBoundRect.Right() ) >> 1, aBoundRect.Top() ); Point aRef2( aRef1.X(), aRef1.Y() + 1000 ); @@ -1671,7 +1671,7 @@ awt::Point SAL_CALL SvxCustomShape::getPosition() if ( bMirroredY ) { tools::Polygon aPol( Rect2Poly( aRectangle, aNewGeo ) ); - Rectangle aBoundRect( aPol.GetBoundRect() ); + tools::Rectangle aBoundRect( aPol.GetBoundRect() ); Point aRef1( aBoundRect.Left(), ( aBoundRect.Top() + aBoundRect.Bottom() ) >> 1 ); Point aRef2( aRef1.X() + 1000, aRef1.Y() ); @@ -1743,7 +1743,7 @@ void SAL_CALL SvxCustomShape::setPropertyValue( const OUString& aPropertyName, c if ( bCustomShapeGeometry ) { static_cast<SdrObjCustomShape*>(pObject)->MergeDefaultAttributes(); - Rectangle aRect( pObject->GetSnapRect() ); + tools::Rectangle aRect( pObject->GetSnapRect() ); // #i38892# bool bNeedsMirrorX = static_cast<SdrObjCustomShape*>(pObject)->IsMirroredX() != bMirroredX; diff --git a/svx/source/unodraw/unoshap3.cxx b/svx/source/unodraw/unoshap3.cxx index 94123e1dd8b4..7a7797f64430 100644 --- a/svx/source/unodraw/unoshap3.cxx +++ b/svx/source/unodraw/unoshap3.cxx @@ -283,7 +283,7 @@ static void ConvertObjectToHomogenMatric( E3dObject* pObject, Any& rValue ) struct ImpRememberTransAndRect { basegfx::B3DHomMatrix maMat; - Rectangle maRect; + tools::Rectangle maRect; }; bool Svx3DSceneObject::setPropertyValueImpl( const OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const css::uno::Any& rValue ) @@ -355,7 +355,7 @@ bool Svx3DSceneObject::setPropertyValueImpl( const OUString& rName, const SfxIte aCam.SetPosAndLookAt(aCamPos, aLookAt); aCam.SetFocalLength(fCamFocal / 100.0); aCam.SetDefaults(basegfx::B3DPoint(0.0, 0.0, fCamPosZ), aLookAt, fCamFocal / 100.0); - aCam.SetDeviceWindow(Rectangle(0, 0, (long)fW, (long)fH)); + aCam.SetDeviceWindow(tools::Rectangle(0, 0, (long)fW, (long)fH)); // set at scene pScene->SetCamera(aCam); diff --git a/svx/source/unodraw/unoshap4.cxx b/svx/source/unodraw/unoshap4.cxx index 180cf7f817dd..896b724ccf3c 100644 --- a/svx/source/unodraw/unoshap4.cxx +++ b/svx/source/unodraw/unoshap4.cxx @@ -404,7 +404,7 @@ bool SvxOle2Shape::createObject( const SvGlobalName &aClassName ) aClassName.GetByteSequence(), objArgs, aPersistName)); if( xObj.is() ) { - Rectangle aRect = pOle2Obj->GetLogicRect(); + tools::Rectangle aRect = pOle2Obj->GetLogicRect(); if ( aRect.GetWidth() == 101 && aRect.GetHeight() == 101 ) { // TODO/LATER: is it possible that this method is used to create an iconified object? @@ -472,7 +472,7 @@ void SvxOle2Shape::createLink( const OUString& aLinkURL ) if( xObj.is() ) { - Rectangle aRect = pOle2Obj->GetLogicRect(); + tools::Rectangle aRect = pOle2Obj->GetLogicRect(); if ( aRect.GetWidth() == 101 && aRect.GetHeight() == 101 ) { // default size diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx index c0c75d8e727a..ee49c9913b1b 100644 --- a/svx/source/unodraw/unoshape.cxx +++ b/svx/source/unodraw/unoshape.cxx @@ -681,7 +681,7 @@ uno::Any SvxShape::GetBitmap( bool bMetaFile /* = false */ ) const SdrObject *pTempObj = mpObj.get(); pView->MarkObj(pTempObj,pPageView); - Rectangle aRect(pTempObj->GetCurrentBoundRect()); + tools::Rectangle aRect(pTempObj->GetCurrentBoundRect()); aRect.Justify(); Size aSize(aRect.GetSize()); @@ -1093,7 +1093,7 @@ static bool svx_needLogicRectHack( SdrObject* pObj ) } -static Rectangle svx_getLogicRectHack( SdrObject* pObj ) +static tools::Rectangle svx_getLogicRectHack( SdrObject* pObj ) { if(svx_needLogicRectHack(pObj)) { @@ -1106,7 +1106,7 @@ static Rectangle svx_getLogicRectHack( SdrObject* pObj ) } -static void svx_setLogicRectHack( SdrObject* pObj, const Rectangle& rRect ) +static void svx_setLogicRectHack( SdrObject* pObj, const tools::Rectangle& rRect ) { if(svx_needLogicRectHack(pObj)) { @@ -1125,7 +1125,7 @@ awt::Point SAL_CALL SvxShape::getPosition() if( mpObj.is() && mpModel) { - Rectangle aRect( svx_getLogicRectHack(mpObj.get()) ); + tools::Rectangle aRect( svx_getLogicRectHack(mpObj.get()) ); Point aPt( aRect.Left(), aRect.Top() ); // Position is relative to anchor, so recalc to absolute position @@ -1152,7 +1152,7 @@ void SAL_CALL SvxShape::setPosition( const awt::Point& Position ) // transformation matrix if(dynamic_cast<const E3dCompoundObject* >(mpObj.get()) == nullptr) { - Rectangle aRect( svx_getLogicRectHack(mpObj.get()) ); + tools::Rectangle aRect( svx_getLogicRectHack(mpObj.get()) ); Point aLocalPos( Position.X, Position.Y ); ForceMetricToItemPoolMetric(aLocalPos); @@ -1178,7 +1178,7 @@ awt::Size SAL_CALL SvxShape::getSize() if( mpObj.is() && mpModel) { - Rectangle aRect( svx_getLogicRectHack(mpObj.get()) ); + tools::Rectangle aRect( svx_getLogicRectHack(mpObj.get()) ); Size aObjSize( aRect.getWidth(), aRect.getHeight() ); ForceMetricTo100th_mm(aObjSize); return css::awt::Size( aObjSize.getWidth(), aObjSize.getHeight() ); @@ -1199,9 +1199,9 @@ void SAL_CALL SvxShape::setSize( const awt::Size& rSize ) // scenes it may recalculate the whole scene since in AOO this depends // on the contained geometry (layouted to show all content) const bool b3DConstruction(dynamic_cast< E3dObject* >(mpObj.get()) && mpModel->isLocked()); - Rectangle aRect( + tools::Rectangle aRect( b3DConstruction ? - Rectangle(maPosition.X, maPosition.Y, maSize.Width, maSize.Height) : + tools::Rectangle(maPosition.X, maPosition.Y, maSize.Width, maSize.Height) : svx_getLogicRectHack(mpObj.get()) ); Size aLocalSize( rSize.Width, rSize.Height ); ForceMetricToItemPoolMetric(aLocalSize); @@ -2141,7 +2141,7 @@ bool SvxShape::setPropertyValueImpl( const OUString&, const SfxItemPropertySimpl Size aObjSize( aUnoRect.Width, aUnoRect.Height ); ForceMetricToItemPoolMetric(aTopLeft); ForceMetricToItemPoolMetric(aObjSize); - Rectangle aRect; + tools::Rectangle aRect; aRect.SetPos(aTopLeft); aRect.SetSize(aObjSize); mpObj->SetSnapRect(aRect); @@ -2574,7 +2574,7 @@ bool SvxShape::getPropertyValueImpl( const OUString&, const SfxItemPropertySimpl case OWN_ATTR_FRAMERECT: { - Rectangle aRect( mpObj->GetSnapRect() ); + tools::Rectangle aRect( mpObj->GetSnapRect() ); Point aTopLeft( aRect.TopLeft() ); Size aObjSize( aRect.GetWidth(), aRect.GetHeight() ); ForceMetricTo100th_mm(aTopLeft); @@ -2588,7 +2588,7 @@ bool SvxShape::getPropertyValueImpl( const OUString&, const SfxItemPropertySimpl case OWN_ATTR_BOUNDRECT: { - Rectangle aRect( mpObj->GetCurrentBoundRect() ); + tools::Rectangle aRect( mpObj->GetCurrentBoundRect() ); Point aTopLeft( aRect.TopLeft() ); Size aObjSize( aRect.GetWidth(), aRect.GetHeight() ); ForceMetricTo100th_mm(aTopLeft); diff --git a/svx/source/unodraw/unoshtxt.cxx b/svx/source/unodraw/unoshtxt.cxx index 6d87416e0e93..cb5b73836645 100644 --- a/svx/source/unodraw/unoshtxt.cxx +++ b/svx/source/unodraw/unoshtxt.cxx @@ -142,7 +142,7 @@ public: bool IsValid() const; - Rectangle GetVisArea(); + tools::Rectangle GetVisArea(); Point LogicToPixel( const Point&, const MapMode& rMapMode ); Point PixelToLogic( const Point&, const MapMode& rMapMode ); @@ -504,10 +504,10 @@ void SvxTextEditSourceImpl::SetupOutliner() if( mpObject && mpOutliner ) { SdrTextObj* pTextObj = dynamic_cast<SdrTextObj*>( mpObject ); - Rectangle aPaintRect; + tools::Rectangle aPaintRect; if( pTextObj ) { - Rectangle aBoundRect( pTextObj->GetCurrentBoundRect() ); + tools::Rectangle aBoundRect( pTextObj->GetCurrentBoundRect() ); pTextObj->SetupOutlinerFormatting( *mpOutliner, aPaintRect ); // calc text offset from shape anchor @@ -525,10 +525,10 @@ void SvxTextEditSourceImpl::UpdateOutliner() if( mpObject && mpOutliner ) { SdrTextObj* pTextObj = dynamic_cast<SdrTextObj*>( mpObject ); - Rectangle aPaintRect; + tools::Rectangle aPaintRect; if( pTextObj ) { - Rectangle aBoundRect( pTextObj->GetCurrentBoundRect() ); + tools::Rectangle aBoundRect( pTextObj->GetCurrentBoundRect() ); pTextObj->UpdateOutlinerFormatting( *mpOutliner, aPaintRect ); // calc text offset from shape anchor @@ -734,7 +734,7 @@ SvxDrawOutlinerViewForwarder* SvxTextEditSourceImpl::CreateViewForwarder() SdrTextObj* pTextObj = dynamic_cast<SdrTextObj*>( mpObject ); if( pTextObj ) { - Rectangle aBoundRect( pTextObj->GetCurrentBoundRect() ); + tools::Rectangle aBoundRect( pTextObj->GetCurrentBoundRect() ); OutlinerView& rOutlView = *mpView->GetTextEditOutlinerView(); return new SvxDrawOutlinerViewForwarder( rOutlView, aBoundRect.TopLeft() ); @@ -888,12 +888,12 @@ bool SvxTextEditSourceImpl::IsValid() const return mpView && mpWindow; } -Rectangle SvxTextEditSourceImpl::GetVisArea() +tools::Rectangle SvxTextEditSourceImpl::GetVisArea() { if( IsValid() ) { SdrPaintWindow* pPaintWindow = mpView->FindPaintWindow(*mpWindow); - Rectangle aVisArea; + tools::Rectangle aVisArea; if(pPaintWindow) { @@ -904,7 +904,7 @@ Rectangle SvxTextEditSourceImpl::GetVisArea() SdrTextObj* pTextObj = dynamic_cast<SdrTextObj*>( mpObject ); if( pTextObj ) { - Rectangle aAnchorRect; + tools::Rectangle aAnchorRect; pTextObj->TakeTextAnchorRect( aAnchorRect ); aVisArea.Move( -aAnchorRect.Left(), -aAnchorRect.Top() ); @@ -914,7 +914,7 @@ Rectangle SvxTextEditSourceImpl::GetVisArea() } } - return Rectangle(); + return tools::Rectangle(); } Point SvxTextEditSourceImpl::LogicToPixel( const Point& rPoint, const MapMode& rMapMode ) @@ -1065,7 +1065,7 @@ bool SvxTextEditSource::IsValid() const return mpImpl->IsValid(); } -Rectangle SvxTextEditSource::GetVisArea() const +tools::Rectangle SvxTextEditSource::GetVisArea() const { return mpImpl->GetVisArea(); } diff --git a/svx/source/xoutdev/_xoutbmp.cxx b/svx/source/xoutdev/_xoutbmp.cxx index 95c67332b219..fd105064b55c 100644 --- a/svx/source/xoutdev/_xoutbmp.cxx +++ b/svx/source/xoutdev/_xoutbmp.cxx @@ -520,12 +520,12 @@ Bitmap XOutBitmap::DetectEdges( const Bitmap& rBmp, const sal_uInt8 cThreshold ) tools::Polygon XOutBitmap::GetCountour( const Bitmap& rBmp, const XOutFlags nFlags, const sal_uInt8 cEdgeDetectThreshold, - const Rectangle* pWorkRectPixel ) + const tools::Rectangle* pWorkRectPixel ) { Bitmap aWorkBmp; tools::Polygon aRetPoly; Point aTmpPoint; - Rectangle aWorkRect( aTmpPoint, rBmp.GetSizePixel() ); + tools::Rectangle aWorkRect( aTmpPoint, rBmp.GetSizePixel() ); if( pWorkRectPixel ) aWorkRect.Intersection( *pWorkRectPixel ); diff --git a/svx/source/xoutdev/_xpoly.cxx b/svx/source/xoutdev/_xpoly.cxx index ce8ff47d37cf..a3571abdc914 100644 --- a/svx/source/xoutdev/_xpoly.cxx +++ b/svx/source/xoutdev/_xpoly.cxx @@ -232,7 +232,7 @@ XPolygon::XPolygon( const tools::Polygon& rPoly ) } /// create a rectangle (also with rounded corners) as a Bézier polygon -XPolygon::XPolygon(const Rectangle& rRect, long nRx, long nRy) +XPolygon::XPolygon(const tools::Rectangle& rRect, long nRx, long nRy) : pImpXPolygon( 17 ) { long nWh = (rRect.GetWidth() - 1) / 2; @@ -407,10 +407,10 @@ void XPolygon::Move( long nHorzMove, long nVertMove ) } } -Rectangle XPolygon::GetBoundRect() const +tools::Rectangle XPolygon::GetBoundRect() const { pImpXPolygon->CheckPointDelete(); - Rectangle aRetval; + tools::Rectangle aRetval; if(pImpXPolygon->nPoints) { @@ -421,7 +421,7 @@ Rectangle XPolygon::GetBoundRect() const // correct and never was. const basegfx::B2DRange aPolygonRange(basegfx::tools::getRange(getB2DPolygon())); - aRetval = Rectangle( + aRetval = tools::Rectangle( FRound(aPolygonRange.getMinX()), FRound(aPolygonRange.getMinY()), FRound(aPolygonRange.getMaxX()), FRound(aPolygonRange.getMaxY())); } @@ -781,7 +781,7 @@ void XPolygon::Scale(double fSx, double fSy) * 2: bottom right 3----2 * 3: bottom left */ -void XPolygon::Distort(const Rectangle& rRefRect, +void XPolygon::Distort(const tools::Rectangle& rRefRect, const XPolygon& rDistortedRect) { pImpXPolygon->CheckPointDelete(); @@ -950,10 +950,10 @@ sal_uInt16 XPolyPolygon::Count() const return (sal_uInt16)(pImpXPolyPolygon->aXPolyList.size()); } -Rectangle XPolyPolygon::GetBoundRect() const +tools::Rectangle XPolyPolygon::GetBoundRect() const { size_t nXPoly = pImpXPolyPolygon->aXPolyList.size(); - Rectangle aRect; + tools::Rectangle aRect; for ( size_t n = 0; n < nXPoly; n++ ) { @@ -991,7 +991,7 @@ XPolyPolygon& XPolyPolygon::operator=( XPolyPolygon&& rXPolyPoly ) * 2: bottom right 3----2 * 3: bottom left */ -void XPolyPolygon::Distort(const Rectangle& rRefRect, +void XPolyPolygon::Distort(const tools::Rectangle& rRefRect, const XPolygon& rDistortedRect) { for (size_t i = 0; i < Count(); i++) diff --git a/sw/inc/EnhancedPDFExportHelper.hxx b/sw/inc/EnhancedPDFExportHelper.hxx index 0aab23331921..692e580fae60 100644 --- a/sw/inc/EnhancedPDFExportHelper.hxx +++ b/sw/inc/EnhancedPDFExportHelper.hxx @@ -247,8 +247,8 @@ class SwEnhancedPDFExportHelper static LanguageType GetDefaultLanguage() {return eLanguageDefault; } //scale and position rRectangle if we're scaling due to notes in margins. - Rectangle SwRectToPDFRect(const SwPageFrame* pCurrPage, - const Rectangle& rRectangle) const; + tools::Rectangle SwRectToPDFRect(const SwPageFrame* pCurrPage, + const tools::Rectangle& rRectangle) const; }; #endif diff --git a/sw/inc/PostItMgr.hxx b/sw/inc/PostItMgr.hxx index 83e3ba469af8..137080292eb3 100644 --- a/sw/inc/PostItMgr.hxx +++ b/sw/inc/PostItMgr.hxx @@ -174,7 +174,7 @@ class SwPostItMgr: public SfxListener void AutoScroll(const sw::sidebarwindows::SwSidebarWin* pPostIt,const unsigned long aPage ); bool ScrollbarHit(const unsigned long aPage,const Point &aPoint); bool LayoutByPage( std::list<sw::sidebarwindows::SwSidebarWin*> &aVisiblePostItList, - const Rectangle& rBorder, + const tools::Rectangle& rBorder, long lNeededHeight); void CheckForRemovedPostIts(); bool ArrowEnabled(sal_uInt16 aDirection,unsigned long aPage) const; @@ -233,8 +233,8 @@ class SwPostItMgr: public SfxListener void Rescale(); - Rectangle GetBottomScrollRect(const unsigned long aPage) const; - Rectangle GetTopScrollRect(const unsigned long aPage) const; + tools::Rectangle GetBottomScrollRect(const unsigned long aPage) const; + tools::Rectangle GetTopScrollRect(const unsigned long aPage) const; bool IsHit(const Point &aPointPixel); /// Get the matching window that is responsible for handling mouse events of rPointLogic, if any. @@ -293,7 +293,7 @@ class SwPostItMgr: public SfxListener std::vector< vcl::Window* >* pChildren ); void DrawNotesForPage(OutputDevice *pOutDev, sal_uInt32 nPage); - void PaintTile(OutputDevice& rRenderContext, const Rectangle& rRect); + void PaintTile(OutputDevice& rRenderContext, const tools::Rectangle& rRect); }; #endif diff --git a/sw/inc/SidebarWin.hxx b/sw/inc/SidebarWin.hxx index 95ac4fb1ab31..630fea42c0d5 100644 --- a/sw/inc/SidebarWin.hxx +++ b/sw/inc/SidebarWin.hxx @@ -188,7 +188,7 @@ class SwSidebarWin : public vcl::Window virtual void MouseButtonDown(const MouseEvent& rMouseEvent) override; virtual void MouseButtonUp(const MouseEvent& rMouseEvent) override; virtual void MouseMove(const MouseEvent& rMouseEvent) override; - void PaintTile(vcl::RenderContext& rRenderContext, const Rectangle& rRect); + void PaintTile(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect); /// Is there a matching sub-widget inside this sidebar widget for rPointLogic? bool IsHitWindow(const Point& rPointLogic); /// Allows adjusting the point or mark of the selection to a document coordinate. @@ -196,7 +196,7 @@ class SwSidebarWin : public vcl::Window protected: virtual void LoseFocus() override; - virtual void Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) override; + virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) override; virtual void GetFocus() override; virtual VclPtr<MenuButton> CreateMenuButton() = 0; @@ -242,7 +242,7 @@ class SwSidebarWin : public vcl::Window sw::sidebarwindows::SidebarPosition meSidebarPosition; - Rectangle mPosSize; + tools::Rectangle mPosSize; SwRect mAnchorRect; long mPageBorder; bool mbAnchorRectChanged; diff --git a/sw/inc/accmap.hxx b/sw/inc/accmap.hxx index d59852b671c2..2739b1a78a01 100644 --- a/sw/inc/accmap.hxx +++ b/sw/inc/accmap.hxx @@ -39,7 +39,7 @@ class SwAccessibleParagraph; class SwViewShell; -class Rectangle; +namespace tools { class Rectangle; } class SwFrame; class SwTextFrame; class SwPageFrame; @@ -271,7 +271,7 @@ public: // IAccessibleViewForwarder - virtual Rectangle GetVisibleArea() const override; + virtual tools::Rectangle GetVisibleArea() const override; virtual Point LogicToPixel (const Point& rPoint) const override; virtual Size LogicToPixel (const Size& rSize) const override; @@ -290,7 +290,7 @@ public: // additional Core/Pixel conversions for internal use; also works // for preview Point PixelToCore (const Point& rPoint) const; - Rectangle CoreToPixel (const Rectangle& rRect) const; + tools::Rectangle CoreToPixel (const tools::Rectangle& rRect) const; private: /** get mapping mode for LogicToPixel and PixelToLogic conversions diff --git a/sw/inc/anchoreddrawobject.hxx b/sw/inc/anchoreddrawobject.hxx index 8c0c36e46c2f..870585850960 100644 --- a/sw/inc/anchoreddrawobject.hxx +++ b/sw/inc/anchoreddrawobject.hxx @@ -21,7 +21,7 @@ #include <anchoredobject.hxx> -class Rectangle; +namespace tools { class Rectangle; } /** class for the positioning of drawing objects @@ -35,7 +35,7 @@ class SW_DLLPUBLIC SwAnchoredDrawObject : public SwAnchoredObject bool mbValidPos; // rectangle, keeping the last object rectangle after the positioning - std::unique_ptr<Rectangle> mpLastObjRect; + std::unique_ptr<tools::Rectangle> mpLastObjRect; // boolean, indicating that anchored drawing object hasn't been attached // to a anchor frame yet. Once, it is attached to a anchor frame the @@ -140,9 +140,9 @@ class SW_DLLPUBLIC SwAnchoredDrawObject : public SwAnchoredObject // accessors to the object area and its position virtual const SwRect GetObjRect() const override; // Return value can be NULL. - const Rectangle* GetLastObjRect() const { return mpLastObjRect.get();} + const tools::Rectangle* GetLastObjRect() const { return mpLastObjRect.get();} - void SetLastObjRect( const Rectangle& _rNewObjRect ); + void SetLastObjRect( const tools::Rectangle& _rNewObjRect ); /** adjust positioning and alignment attributes for new anchor frame diff --git a/sw/inc/crsrsh.hxx b/sw/inc/crsrsh.hxx index feafb1a2207a..92cd91a466b2 100644 --- a/sw/inc/crsrsh.hxx +++ b/sw/inc/crsrsh.hxx @@ -397,7 +397,7 @@ public: /* * virtual paint method to make selection visible again after Paint */ - void Paint(vcl::RenderContext& rRenderContext, const Rectangle & rRect) override; + void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle & rRect) override; // Areas inline void SetMark(); diff --git a/sw/inc/dcontact.hxx b/sw/inc/dcontact.hxx index 9021f5b7796d..5276f52ba680 100644 --- a/sw/inc/dcontact.hxx +++ b/sw/inc/dcontact.hxx @@ -284,12 +284,12 @@ class SwDrawVirtObj : public SdrVirtObj virtual void Mirror(const Point& rRef1, const Point& rRef2) override; virtual void Shear(const Point& rRef, long nAngle, double tn, bool bVShear) override; virtual void RecalcSnapRect() override; - virtual const Rectangle& GetSnapRect() const override; - virtual void SetSnapRect(const Rectangle& rRect) override; - virtual void NbcSetSnapRect(const Rectangle& rRect) override; - virtual const Rectangle& GetLogicRect() const override; - virtual void SetLogicRect(const Rectangle& rRect) override; - virtual void NbcSetLogicRect(const Rectangle& rRect) override; + virtual const tools::Rectangle& GetSnapRect() const override; + virtual void SetSnapRect(const tools::Rectangle& rRect) override; + virtual void NbcSetSnapRect(const tools::Rectangle& rRect) override; + virtual const tools::Rectangle& GetLogicRect() const override; + virtual void SetLogicRect(const tools::Rectangle& rRect) override; + virtual void NbcSetLogicRect(const tools::Rectangle& rRect) override; virtual Point GetSnapPoint(sal_uInt32 i) const override; virtual Point GetPoint(sal_uInt32 i) const override; virtual void NbcSetPoint(const Point& rPnt, sal_uInt32 i) override; @@ -301,8 +301,8 @@ class SwDrawVirtObj : public SdrVirtObj virtual void SetLayer(SdrLayerID nLayer) override; virtual void SetBoundRectDirty() override; - virtual const Rectangle& GetCurrentBoundRect() const override; - virtual const Rectangle& GetLastBoundRect() const override; + virtual const tools::Rectangle& GetCurrentBoundRect() const override; + virtual const tools::Rectangle& GetLastBoundRect() const override; }; bool CheckControlLayer( const SdrObject *pObj ); @@ -399,18 +399,18 @@ class SwDrawContact final : public SwContact SdrObject* GetDrawObjectByAnchorFrame( const SwFrame& _rAnchorFrame ); /// Virtual methods of SdrObjUserCall. - virtual void Changed(const SdrObject& rObj, SdrUserCallType eType, const Rectangle& rOldBoundRect) override; + virtual void Changed(const SdrObject& rObj, SdrUserCallType eType, const tools::Rectangle& rOldBoundRect) override; /** Used by Changed() and by UndoDraw. Notifies paragraphs that have to get out of the way. */ - void Changed_(const SdrObject& rObj, SdrUserCallType eType, const Rectangle* pOldBoundRect); + void Changed_(const SdrObject& rObj, SdrUserCallType eType, const tools::Rectangle* pOldBoundRect); /// Moves all SW-connections to new Master) void ChangeMasterObject( SdrObject *pNewMaster ); SwDrawVirtObj* AddVirtObj(); - void NotifyBackgrdOfAllVirtObjs( const Rectangle* pOldBoundRect ); + void NotifyBackgrdOfAllVirtObjs( const tools::Rectangle* pOldBoundRect ); /** get data collection of anchored objects, handled by with contact */ diff --git a/sw/inc/docsh.hxx b/sw/inc/docsh.hxx index f443db828551..b769a1d2600b 100644 --- a/sw/inc/docsh.hxx +++ b/sw/inc/docsh.hxx @@ -174,8 +174,8 @@ public: DECL_LINK( Ole2ModifiedHdl, bool, void ); /// OLE-stuff. - virtual void SetVisArea( const Rectangle &rRect ) override; - virtual Rectangle GetVisArea( sal_uInt16 nAspect ) const override; + virtual void SetVisArea( const tools::Rectangle &rRect ) override; + virtual tools::Rectangle GetVisArea( sal_uInt16 nAspect ) const override; virtual Printer *GetDocumentPrinter() override; virtual OutputDevice* GetDocumentRefDev() override; virtual void OnDocumentPrinterChanged( Printer * pNewPrinter ) override; diff --git a/sw/inc/dpage.hxx b/sw/inc/dpage.hxx index a000e7052426..0d8438c9ea54 100644 --- a/sw/inc/dpage.hxx +++ b/sw/inc/dpage.hxx @@ -46,7 +46,7 @@ public: virtual SdrObject* ReplaceObject( SdrObject* pNewObj, size_t nObjNum ) override; virtual const SdrPageGridFrameList* GetGridFrameList(const SdrPageView* pPV, - const Rectangle *pRect) const override; + const tools::Rectangle *pRect) const override; bool RequestHelp( vcl::Window* pWindow, SdrView* pView, const HelpEvent& rEvt ); diff --git a/sw/inc/fesh.hxx b/sw/inc/fesh.hxx index 5995c6288e83..881ac0e2010d 100644 --- a/sw/inc/fesh.hxx +++ b/sw/inc/fesh.hxx @@ -527,7 +527,7 @@ public: bool EndCreate ( SdrCreateCmd eSdrCreateCmd ); void BreakCreate(); bool IsDrawCreate() const; - void CreateDefaultShape( sal_uInt16 /*SdrObjKind ?*/ eSdrObjectKind, const Rectangle& rRect, sal_uInt16 nSlotId); + void CreateDefaultShape( sal_uInt16 /*SdrObjKind ?*/ eSdrObjectKind, const tools::Rectangle& rRect, sal_uInt16 nSlotId); /// Functions for Rubberbox, ti select Draw-Objects bool BeginMark( const Point &rPos ); diff --git a/sw/inc/pagepreviewlayout.hxx b/sw/inc/pagepreviewlayout.hxx index 8185e8fb96b2..13c53f4f7b39 100644 --- a/sw/inc/pagepreviewlayout.hxx +++ b/sw/inc/pagepreviewlayout.hxx @@ -75,7 +75,7 @@ private: bool mbBookPreviewModeToggled; Size maMaxPageSize; - Rectangle maPreviewDocRect; + tools::Rectangle maPreviewDocRect; SwTwips mnColWidth; SwTwips mnRowHeight; SwTwips mnPreviewLayoutWidth; @@ -90,7 +90,7 @@ private: Point maPaintStartPageOffset; Point maPaintPreviewDocOffset; Point maAdditionalPaintOffset; - Rectangle maPaintedPreviewDocRect; + tools::Rectangle maPaintedPreviewDocRect; sal_uInt16 mnSelectedPageNum; std::vector<PreviewPage*> maPreviewPages; @@ -325,7 +325,7 @@ public: const Point& rProposedStartPos, const Size& _rPxWinSize, sal_uInt16& _onStartPageNum, - Rectangle& _orDocPreviewPaintRect, + tools::Rectangle& _orDocPreviewPaintRect, const bool _bStartWithPageAtFirstCol = true ); @@ -356,7 +356,7 @@ public: @return boolean, indicating, if paint of preview was performed */ - bool Paint(vcl::RenderContext& rRenderContext, const Rectangle& rOutRect) const; + bool Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rOutRect) const; /** repaint pages on page preview @@ -365,7 +365,7 @@ public: @author OD */ - void Repaint(const Rectangle& rInvalidCoreRect) const; + void Repaint(const tools::Rectangle& rInvalidCoreRect) const; /** paint to mark new selected page @@ -550,7 +550,7 @@ public: */ bool SetBookPreviewMode( const bool _bEnableBookPreview, sal_uInt16& _onStartPageNum, - Rectangle& _orDocPreviewPaintRect ); + tools::Rectangle& _orDocPreviewPaintRect ); /** Convert relative to absolute page numbers (see PrintEmptyPages) diff --git a/sw/inc/swcli.hxx b/sw/inc/swcli.hxx index 492b02de3957..546014168399 100644 --- a/sw/inc/swcli.hxx +++ b/sw/inc/swcli.hxx @@ -33,7 +33,7 @@ class SwOleClient : public SfxInPlaceClient bool m_IsOldCheckForOLEInCaption; virtual void ObjectAreaChanged() override; - virtual void RequestNewObjectArea( Rectangle& ) override; + virtual void RequestNewObjectArea( tools::Rectangle& ) override; virtual void ViewChanged() override; public: diff --git a/sw/inc/swrect.hxx b/sw/inc/swrect.hxx index 9bb254515bf2..18bd97149e30 100644 --- a/sw/inc/swrect.hxx +++ b/sw/inc/swrect.hxx @@ -43,7 +43,7 @@ public: inline SwRect( long X, long Y, long Width, long Height ); //SV-SS e.g. SwRect( pWin->GetClipRect() ); - SwRect( const Rectangle &rRect ); + SwRect( const tools::Rectangle &rRect ); //Set-Methods inline void Chg( const Point& rNP, const Size &rNS ); @@ -99,7 +99,7 @@ public: inline SwRect &operator-=( const Point &rPt ); //SV-SS e.g. pWin->DrawRect( aSwRect.SVRect() ); - inline Rectangle SVRect() const; + inline tools::Rectangle SVRect() const; // Output operator for debugging. friend SvStream& WriteSwRect( SvStream &rStream, const SwRect &rRect ); @@ -278,10 +278,10 @@ inline SwRect &SwRect::operator-=( const Point &rPt ) } // other -inline Rectangle SwRect::SVRect() const +inline tools::Rectangle SwRect::SVRect() const { SAL_WARN_IF( IsEmpty(), "sw", "SVRect() without Width or Height" ); - return Rectangle( m_Point.getX(), m_Point.getY(), + return tools::Rectangle( m_Point.getX(), m_Point.getY(), m_Point.getX() + m_Size.getWidth() - 1, //Right() m_Point.getY() + m_Size.getHeight() - 1 ); //Bottom() } diff --git a/sw/inc/textboxhelper.hxx b/sw/inc/textboxhelper.hxx index 70d3cf8f4f75..c2756af9a8d2 100644 --- a/sw/inc/textboxhelper.hxx +++ b/sw/inc/textboxhelper.hxx @@ -28,7 +28,10 @@ class SwFrameFormat; class SwFrameFormats; class SwFormatContent; class SwDoc; +namespace tools +{ class Rectangle; +} class ZSortFly; class SwNode; @@ -74,7 +77,7 @@ public: /// If we have an associated TextFrame, then return that. static SwFrameFormat* getOtherTextBoxFormat(css::uno::Reference<css::drawing::XShape> const& xShape); /// Return the textbox rectangle of a draw shape (in twips). - static Rectangle getTextRectangle(SwFrameFormat* pShape, bool bAbsolute = true); + static tools::Rectangle getTextRectangle(SwFrameFormat* pShape, bool bAbsolute = true); /** * Is the frame format a text box? diff --git a/sw/inc/unotxdoc.hxx b/sw/inc/unotxdoc.hxx index 8e9e22096596..ccbfb62589cd 100644 --- a/sw/inc/unotxdoc.hxx +++ b/sw/inc/unotxdoc.hxx @@ -414,7 +414,7 @@ public: /// @see vcl::ITiledRenderable::isMimeTypeSupported(). virtual bool isMimeTypeSupported() override; /// @see vcl::ITiledRenderable::setClientVisibleArea(). - virtual void setClientVisibleArea(const Rectangle& rRectangle) override; + virtual void setClientVisibleArea(const tools::Rectangle& rRectangle) override; /// @see vcl::ITiledRenderable::getPointer(). virtual Pointer getPointer() override; /// @see vcl::ITiledRenderable::getTrackedChanges(). diff --git a/sw/inc/view.hxx b/sw/inc/view.hxx index bf9f54160477..ae74f418a769 100644 --- a/sw/inc/view.hxx +++ b/sw/inc/view.hxx @@ -176,7 +176,7 @@ class SW_DLLPUBLIC SwView: public SfxViewShell SwTextNode * m_pNumRuleNodeFromDoc; // Moving indent of numrule #i23726# Size m_aDocSz; // current document size - Rectangle m_aVisArea; // visible region + tools::Rectangle m_aVisArea; // visible region VclPtr<SwEditWin> m_pEditWin; SwWrtShell *m_pWrtShell; @@ -272,7 +272,7 @@ class SW_DLLPUBLIC SwView: public SfxViewShell inline long GetXScroll() const; inline long GetYScroll() const; SAL_DLLPRIVATE Point AlignToPixel(const Point& rPt) const; - SAL_DLLPRIVATE void CalcPt( Point* pPt,const Rectangle& rRect, + SAL_DLLPRIVATE void CalcPt( Point* pPt,const tools::Rectangle& rRect, sal_uInt16 nRangeX, sal_uInt16 nRangeY); @@ -413,10 +413,10 @@ public: // hand the handler for text blocks to the shell; create if applicable SwGlossaryHdl* GetGlosHdl(); - const Rectangle& GetVisArea() const { return m_aVisArea; } + const tools::Rectangle& GetVisArea() const { return m_aVisArea; } - bool IsScroll(const Rectangle& rRect) const; - void Scroll( const Rectangle& rRect, + bool IsScroll(const tools::Rectangle& rRect) const; + void Scroll( const tools::Rectangle& rRect, sal_uInt16 nRangeX = USHRT_MAX, sal_uInt16 nRangeY = USHRT_MAX); @@ -442,7 +442,7 @@ public: void DocSzChgd( const Size& rNewSize ); const Size& GetDocSz() const { return m_aDocSz; } - void SetVisArea( const Rectangle&, bool bUpdateScrollbar = true); + void SetVisArea( const tools::Rectangle&, bool bUpdateScrollbar = true); void SetVisArea( const Point&, bool bUpdateScrollbar = true); void CheckVisArea(); diff --git a/sw/inc/viewsh.hxx b/sw/inc/viewsh.hxx index 965d98697f20..c1d62f9a64f7 100644 --- a/sw/inc/viewsh.hxx +++ b/sw/inc/viewsh.hxx @@ -238,7 +238,7 @@ public: void DLPostPaint2(bool bPaintFormLayer); const MapMode& getPrePostMapMode() const { return maPrePostMapMode; } - virtual void Paint(vcl::RenderContext& rRenderContext, const Rectangle &rRect); + virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle &rRect); /** Paint tile. @@ -255,7 +255,7 @@ public: // The passed rect is situated on pixel borders // in order to avoid pixel errors when scrolling. virtual void VisPortChgd( const SwRect & ); - bool SmoothScroll( long lXDiff, long lYDiff, const Rectangle* );//Browser + bool SmoothScroll( long lXDiff, long lYDiff, const tools::Rectangle* );//Browser void EnableSmooth( bool b ) { mbEnableSmooth = b; } const SwRect& VisArea() const; @@ -365,7 +365,7 @@ public: // Printing for OLE 2.0. static void PrtOle2( SwDoc *pDoc, const SwViewOption *pOpt, const SwPrintData& rOptions, - vcl::RenderContext& rRenderContext, const Rectangle& rRect ); + vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect ); // Fill temporary doc with selected text for Print or PDF export. void FillPrtDoc( SwDoc* pPrtDoc, const SfxPrinter* pPrt ); diff --git a/sw/qa/extras/tiledrendering/tiledrendering.cxx b/sw/qa/extras/tiledrendering/tiledrendering.cxx index 4aee6c1d7ff2..cd67c8b28fcb 100644 --- a/sw/qa/extras/tiledrendering/tiledrendering.cxx +++ b/sw/qa/extras/tiledrendering/tiledrendering.cxx @@ -141,7 +141,7 @@ private: SwXTextDocument* createDoc(const char* pName = nullptr); static void callback(int nType, const char* pPayload, void* pData); void callbackImpl(int nType, const char* pPayload); - Rectangle m_aInvalidation; + tools::Rectangle m_aInvalidation; Size m_aDocumentSize; OString m_aTextSelection; bool m_bFound; @@ -277,7 +277,7 @@ void SwTiledRenderingTest::testRegisterCallback() // Check that the top left 256x256px tile would be invalidated. CPPUNIT_ASSERT(!m_aInvalidation.IsEmpty()); - Rectangle aTopLeft(0, 0, 256*15, 256*15); // 1 px = 15 twips, assuming 96 DPI. + tools::Rectangle aTopLeft(0, 0, 256*15, 256*15); // 1 px = 15 twips, assuming 96 DPI. CPPUNIT_ASSERT(m_aInvalidation.IsOver(aTopLeft)); comphelper::LibreOfficeKit::setActive(false); } @@ -388,11 +388,11 @@ void SwTiledRenderingTest::testSetGraphicSelection() // Take the bottom center one. SdrHdl* pHdl = pObject->GetHdl(6); CPPUNIT_ASSERT_EQUAL((int)SdrHdlKind::Lower, (int)pHdl->GetKind()); - Rectangle aShapeBefore = pObject->GetSnapRect(); + tools::Rectangle aShapeBefore = pObject->GetSnapRect(); // Resize. pXTextDocument->setGraphicSelection(LOK_SETGRAPHICSELECTION_START, pHdl->GetPos().getX(), pHdl->GetPos().getY()); pXTextDocument->setGraphicSelection(LOK_SETGRAPHICSELECTION_END, pHdl->GetPos().getX(), pHdl->GetPos().getY() + 1000); - Rectangle aShapeAfter = pObject->GetSnapRect(); + tools::Rectangle aShapeAfter = pObject->GetSnapRect(); // Check that a resize happened, but aspect ratio is not kept. CPPUNIT_ASSERT_EQUAL(aShapeBefore.getWidth(), aShapeAfter.getWidth()); CPPUNIT_ASSERT_EQUAL(aShapeBefore.getHeight() + 1000, aShapeAfter.getHeight()); @@ -646,9 +646,9 @@ class ViewCallback public: bool m_bOwnCursorInvalidated; bool m_bOwnCursorAtOrigin; - Rectangle m_aOwnCursor; + tools::Rectangle m_aOwnCursor; bool m_bViewCursorInvalidated; - Rectangle m_aViewCursor; + tools::Rectangle m_aViewCursor; bool m_bOwnSelectionSet; bool m_bViewSelectionSet; OString m_aViewSelection; @@ -1305,7 +1305,7 @@ void SwTiledRenderingTest::testShapeTextUndoGroupShells() SfxLokHelper::createView(); pXTextDocument->initializeForTiledRendering({}); ViewCallback aView2; - aView2.m_aViewCursor = Rectangle(); + aView2.m_aViewCursor = tools::Rectangle(); aView2.m_bViewSelectionSet = false; aView2.m_bViewLock = false; SfxViewShell::Current()->registerLibreOfficeKitViewCallback(&ViewCallback::callback, &aView2); @@ -1570,7 +1570,7 @@ void SwTiledRenderingTest::testCommentEndTextEdit() SfxViewShell::Current()->registerLibreOfficeKitViewCallback(&ViewCallback::callback, &aView1); pXTextDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 'x', 0); pXTextDocument->postKeyEvent(LOK_KEYEVENT_KEYUP, 'x', 0); - Rectangle aBodyCursor = aView1.m_aOwnCursor; + tools::Rectangle aBodyCursor = aView1.m_aOwnCursor; // Create a comment and type a character there as well. const int nCtrlAltC = KEY_MOD1 + KEY_MOD2 + 512 + 'c' - 'a'; diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx index e5ea84a5d8f0..292d9dec34d2 100644 --- a/sw/qa/extras/uiwriter/uiwriter.cxx +++ b/sw/qa/extras/uiwriter/uiwriter.cxx @@ -3213,7 +3213,7 @@ void SwUiWriterTest::testShapeAnchorUndo() SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell(); SdrPage* pPage = pDoc->getIDocumentDrawModelAccess().GetDrawModel()->GetPage(0); SdrObject* pObject = pPage->GetObj(0); - Rectangle aOrigLogicRect(pObject->GetLogicRect()); + tools::Rectangle aOrigLogicRect(pObject->GetLogicRect()); sw::UndoManager& rUndoManager = pDoc->GetUndoManager(); rUndoManager.StartUndo(SwUndoId::START, nullptr); diff --git a/sw/source/core/access/acccontext.cxx b/sw/source/core/access/acccontext.cxx index 53d5d538a782..cba7854b5c35 100644 --- a/sw/source/core/access/acccontext.cxx +++ b/sw/source/core/access/acccontext.cxx @@ -853,7 +853,7 @@ awt::Rectangle SAL_CALL SwAccessibleContext::getBoundsImpl(bool bRelative) } SwRect aLogBounds( GetBounds( *(GetMap()), GetFrame() ) ); // twip relative to document root - Rectangle aPixBounds( 0, 0, 0, 0 ); + tools::Rectangle aPixBounds( 0, 0, 0, 0 ); if( GetFrame()->IsPageFrame() && static_cast < const SwPageFrame * >( GetFrame() )->IsEmptyPage() ) { diff --git a/sw/source/core/access/accdoc.cxx b/sw/source/core/access/accdoc.cxx index d91b0c9835b8..20114aec7094 100644 --- a/sw/source/core/access/accdoc.cxx +++ b/sw/source/core/access/accdoc.cxx @@ -236,7 +236,7 @@ awt::Rectangle SAL_CALL SwAccessibleDocumentBase::getBounds() throw uno::RuntimeException("no Window", static_cast<cppu::OWeakObject*>(this)); } - Rectangle aPixBounds( pWin->GetWindowExtentsRelative( pWin->GetAccessibleParentWindow() ) ); + tools::Rectangle aPixBounds( pWin->GetWindowExtentsRelative( pWin->GetAccessibleParentWindow() ) ); awt::Rectangle aBox( aPixBounds.Left(), aPixBounds.Top(), aPixBounds.GetWidth(), aPixBounds.GetHeight() ); @@ -307,7 +307,7 @@ sal_Bool SAL_CALL SwAccessibleDocumentBase::containsPoint( throw uno::RuntimeException("no Window", static_cast<cppu::OWeakObject*>(this)); } - Rectangle aPixBounds( pWin->GetWindowExtentsRelative( nullptr ) ); + tools::Rectangle aPixBounds( pWin->GetWindowExtentsRelative( nullptr ) ); aPixBounds.Move(-aPixBounds.Left(), -aPixBounds.Top()); Point aPixPoint( aPoint.X, aPoint.Y ); diff --git a/sw/source/core/access/accframe.cxx b/sw/source/core/access/accframe.cxx index 18f27ec241bd..8a93692db121 100644 --- a/sw/source/core/access/accframe.cxx +++ b/sw/source/core/access/accframe.cxx @@ -231,7 +231,7 @@ SwAccessibleChild SwAccessibleFrame::GetChildAtPixel( const SwRect& rVisArea, SwRect aLogBounds( rLower.GetBounds( rAccMap ) ); if( !aLogBounds.IsEmpty() ) { - Rectangle aPixBounds( rAccMap.CoreToPixel( aLogBounds.SVRect() ) ); + tools::Rectangle aPixBounds( rAccMap.CoreToPixel( aLogBounds.SVRect() ) ); if( aPixBounds.IsInside( rPixPos ) ) aRet = rLower; } @@ -262,7 +262,7 @@ SwAccessibleChild SwAccessibleFrame::GetChildAtPixel( const SwRect& rVisArea, SwRect aLogBounds( rLower.GetBounds( rAccMap ) ); if( !aLogBounds.IsEmpty() ) { - Rectangle aPixBounds( rAccMap.CoreToPixel( aLogBounds.SVRect() ) ); + tools::Rectangle aPixBounds( rAccMap.CoreToPixel( aLogBounds.SVRect() ) ); if( aPixBounds.IsInside( rPixPos ) ) aRet = rLower; } diff --git a/sw/source/core/access/accfrmobj.cxx b/sw/source/core/access/accfrmobj.cxx index b2471797b673..d5c86979364e 100644 --- a/sw/source/core/access/accfrmobj.cxx +++ b/sw/source/core/access/accfrmobj.cxx @@ -277,7 +277,7 @@ SwRect SwAccessibleChild::GetBox( const SwAccessibleMap& rAccMap ) const if (pWin) { aBox = SwRect( pWin->PixelToLogic( - Rectangle( mpWindow->GetPosPixel(), + tools::Rectangle( mpWindow->GetPosPixel(), mpWindow->GetSizePixel() ) ) ); } } diff --git a/sw/source/core/access/accmap.cxx b/sw/source/core/access/accmap.cxx index a5dd93ebd1d7..0e3d01b66f45 100644 --- a/sw/source/core/access/accmap.cxx +++ b/sw/source/core/access/accmap.cxx @@ -638,7 +638,7 @@ public: // helper class that stores preview data class SwAccPreviewData { - typedef std::vector<Rectangle> Rectangles; + typedef std::vector<tools::Rectangle> Rectangles; Rectangles maPreviewRects; Rectangles maLogicRects; @@ -720,12 +720,12 @@ void SwAccPreviewData::Update( const SwAccessibleMap& rAccMap, aPage = (*aPageIter)->pPage; // add preview page rectangle to <maPreviewRects> - Rectangle aPreviewPgRect( (*aPageIter)->aPreviewWinPos, (*aPageIter)->aPageSize ); + tools::Rectangle aPreviewPgRect( (*aPageIter)->aPreviewWinPos, (*aPageIter)->aPageSize ); maPreviewRects.push_back( aPreviewPgRect ); // add logic page rectangle to <maLogicRects> SwRect aLogicPgSwRect( aPage.GetBox( rAccMap ) ); - Rectangle aLogicPgRect( aLogicPgSwRect.SVRect() ); + tools::Rectangle aLogicPgRect( aLogicPgSwRect.SVRect() ); maLogicRects.push_back( aLogicPgRect ); // union visible area with visible part of logic page rectangle if ( (*aPageIter)->bVisible ) @@ -754,7 +754,7 @@ struct ContainsPredicate { const Point& mrPoint; explicit ContainsPredicate( const Point& rPoint ) : mrPoint(rPoint) {} - bool operator() ( const Rectangle& rRect ) const + bool operator() ( const tools::Rectangle& rRect ) const { return rRect.IsInside( mrPoint ); } @@ -3067,7 +3067,7 @@ void SwAccessibleMap::FireEvents() } -Rectangle SwAccessibleMap::GetVisibleArea() const +tools::Rectangle SwAccessibleMap::GetVisibleArea() const { MapMode aSrc( MapUnit::MapTwip ); MapMode aDest( MapUnit::Map100thMM ); @@ -3249,9 +3249,9 @@ static inline long lcl_CorrectCoarseValue(long aCoarseValue, long aFineValue, return aResult; } -static inline void lcl_CorrectRectangle(Rectangle & rRect, - const Rectangle & rSource, - const Rectangle & rInGrid) +static inline void lcl_CorrectRectangle(tools::Rectangle & rRect, + const tools::Rectangle & rSource, + const tools::Rectangle & rInGrid) { rRect.Left() = lcl_CorrectCoarseValue(rRect.Left(), rSource.Left(), rInGrid.Left(), false); @@ -3263,16 +3263,16 @@ static inline void lcl_CorrectRectangle(Rectangle & rRect, rInGrid.Bottom(), true); } -Rectangle SwAccessibleMap::CoreToPixel( const Rectangle& rRect ) const +tools::Rectangle SwAccessibleMap::CoreToPixel( const tools::Rectangle& rRect ) const { - Rectangle aRect; + tools::Rectangle aRect; if( GetShell()->GetWin() ) { MapMode aMapMode; GetMapMode( rRect.TopLeft(), aMapMode ); aRect = GetShell()->GetWin()->LogicToPixel( rRect, aMapMode ); - Rectangle aTmpRect = GetShell()->GetWin()->PixelToLogic( aRect, aMapMode ); + tools::Rectangle aTmpRect = GetShell()->GetWin()->PixelToLogic( aRect, aMapMode ); lcl_CorrectRectangle(aRect, rRect, aTmpRect); } diff --git a/sw/source/core/access/accpara.cxx b/sw/source/core/access/accpara.cxx index f6a577ebf4c0..4af5ec7beeee 100644 --- a/sw/source/core/access/accpara.cxx +++ b/sw/source/core/access/accpara.cxx @@ -1389,7 +1389,7 @@ css::uno::Sequence< css::style::TabStop > SwAccessibleParagraph::GetCurrentTabSt SwRect aTmpRect(0, 0, tabs[0].Position, 0); - Rectangle aScreenRect( GetMap()->CoreToPixel( aTmpRect.SVRect() )); + tools::Rectangle aScreenRect( GetMap()->CoreToPixel( aTmpRect.SVRect() )); SwRect aFrameLogBounds( GetBounds( *(GetMap()) ) ); // twip rel to doc root Point aFramePixPos( GetMap()->CoreToPixel( aFrameLogBounds.SVRect() ).TopLeft() ); @@ -2372,7 +2372,7 @@ awt::Rectangle SwAccessibleParagraph::getCharacterBounds( throw uno::RuntimeException("no Window", static_cast<cppu::OWeakObject*>(this)); } - Rectangle aScreenRect( GetMap()->CoreToPixel( aCoreRect.SVRect() )); + tools::Rectangle aScreenRect( GetMap()->CoreToPixel( aCoreRect.SVRect() )); SwRect aFrameLogBounds( GetBounds( *(GetMap()) ) ); // twip rel to doc root Point aFramePixPos( GetMap()->CoreToPixel( aFrameLogBounds.SVRect() ).TopLeft() ); @@ -3551,7 +3551,7 @@ sal_Int32 SAL_CALL SwAccessibleParagraph::getNumberOfLineWithCaret() throw uno::RuntimeException("no Window", static_cast<cppu::OWeakObject*>(this)); } - Rectangle aScreenRect( GetMap()->CoreToPixel( aCursorCoreRect.SVRect() )); + tools::Rectangle aScreenRect( GetMap()->CoreToPixel( aCursorCoreRect.SVRect() )); SwRect aFrameLogBounds( GetBounds( *(GetMap()) ) ); // twip rel to doc root Point aFramePixPos( GetMap()->CoreToPixel( aFrameLogBounds.SVRect() ).TopLeft() ); diff --git a/sw/source/core/bastyp/swrect.cxx b/sw/source/core/bastyp/swrect.cxx index c40b7a281e15..93937b9f2861 100644 --- a/sw/source/core/bastyp/swrect.cxx +++ b/sw/source/core/bastyp/swrect.cxx @@ -26,7 +26,7 @@ #include <math.h> #include <stdlib.h> -SwRect::SwRect( const Rectangle &rRect ) : +SwRect::SwRect( const tools::Rectangle &rRect ) : m_Point( rRect.Left(), rRect.Top() ) { m_Size.setWidth(rRect.Right() == RECT_EMPTY ? 0 : diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx index b08b066e02b1..8c3020005e86 100644 --- a/sw/source/core/crsr/crsrsh.cxx +++ b/sw/source/core/crsr/crsrsh.cxx @@ -1273,7 +1273,7 @@ bool SwCursorShell::GoPrevCursor() return true; } -void SwCursorShell::Paint(vcl::RenderContext& rRenderContext, const Rectangle &rRect) +void SwCursorShell::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle &rRect) { comphelper::FlagRestorationGuard g(mbSelectAll, StartsWithTable() && ExtendedSelectedAll()); SET_CURR_SHELL( this ); diff --git a/sw/source/core/crsr/viscrs.cxx b/sw/source/core/crsr/viscrs.cxx index 696ddc26213d..dae0a1591a3e 100644 --- a/sw/source/core/crsr/viscrs.cxx +++ b/sw/source/core/crsr/viscrs.cxx @@ -209,7 +209,7 @@ void SwVisibleCursor::SetPosAndShow(SfxViewShell* pViewShell) } // notify about the cursor position & size - Rectangle aSVRect(aRect.Pos().getX(), aRect.Pos().getY(), aRect.Pos().getX() + aRect.SSize().Width(), aRect.Pos().getY() + aRect.SSize().Height()); + tools::Rectangle aSVRect(aRect.Pos().getX(), aRect.Pos().getY(), aRect.Pos().getX() + aRect.SSize().Width(), aRect.Pos().getY() + aRect.SSize().Height()); OString sRect = aSVRect.toString(); if (pViewShell) { @@ -338,7 +338,7 @@ void SwSelPaintRects::Show(std::vector<OString>* pSelectionRectangles) for(size_type a = 0; a < size(); ++a) { const SwRect aNextRect((*this)[a]); - const Rectangle aPntRect(aNextRect.SVRect()); + const tools::Rectangle aPntRect(aNextRect.SVRect()); aNewRanges.push_back(basegfx::B2DRange( aPntRect.Left(), aPntRect.Top(), @@ -451,7 +451,7 @@ void SwSelPaintRects::HighlightInputField() SwRects* pRects = static_cast<SwRects*>(pCursorForInputTextField.get()); for (const SwRect & rNextRect : *pRects) { - const Rectangle aPntRect(rNextRect.SVRect()); + const tools::Rectangle aPntRect(rNextRect.SVRect()); aInputFieldRanges.push_back(basegfx::B2DRange( aPntRect.Left(), aPntRect.Top(), diff --git a/sw/source/core/doc/docfly.cxx b/sw/source/core/doc/docfly.cxx index 7bf6cba8e05e..a39db5f8b0f1 100644 --- a/sw/source/core/doc/docfly.cxx +++ b/sw/source/core/doc/docfly.cxx @@ -776,7 +776,7 @@ bool SwDoc::ChgAnchor( const SdrMarkList& _rMrkList, SwFormatAnchor aNewAnch( _eAnchorType ); SwAnchoredObject *pAnchoredObj = pContact->GetAnchoredObj(pObj); - Rectangle aObjRect(pAnchoredObj->GetObjRect().SVRect()); + tools::Rectangle aObjRect(pAnchoredObj->GetObjRect().SVRect()); const Point aPt( aObjRect.TopLeft() ); switch ( _eAnchorType ) diff --git a/sw/source/core/doc/notxtfrm.cxx b/sw/source/core/doc/notxtfrm.cxx index b232f782d82a..fce675b9225d 100644 --- a/sw/source/core/doc/notxtfrm.cxx +++ b/sw/source/core/doc/notxtfrm.cxx @@ -684,8 +684,8 @@ static void lcl_correctlyAlignRect( SwRect& rAlignedGrfArea, const SwRect& rInAr if(!pOut) return; - Rectangle aPxRect = pOut->LogicToPixel( rInArea.SVRect() ); - Rectangle aNewPxRect( aPxRect ); + tools::Rectangle aPxRect = pOut->LogicToPixel( rInArea.SVRect() ); + tools::Rectangle aNewPxRect( aPxRect ); while( aNewPxRect.Left() < aPxRect.Left() ) { rAlignedGrfArea.Left( rAlignedGrfArea.Left()+1 ); @@ -1038,11 +1038,11 @@ void SwNoTextFrame::PaintPicture( vcl::RenderContext* pOut, const SwRect &rGrfAr uno::Reference < embed::XEmbeddedObject > xObj = pOLENd->GetOLEObj().GetOleRef(); if ( xObj.is() && xObj->getCurrentState() == embed::EmbedStates::ACTIVE ) { - ::svt::EmbeddedObjectRef::DrawShading( Rectangle( aPosition, aSize ), pOut ); + ::svt::EmbeddedObjectRef::DrawShading( tools::Rectangle( aPosition, aSize ), pOut ); } } else - ::svt::EmbeddedObjectRef::DrawPaintReplacement( Rectangle( aPosition, aSize ), pOLENd->GetOLEObj().GetCurrentPersistName(), pOut ); + ::svt::EmbeddedObjectRef::DrawPaintReplacement( tools::Rectangle( aPosition, aSize ), pOLENd->GetOLEObj().GetCurrentPersistName(), pOut ); sal_Int64 nMiscStatus = pOLENd->GetOLEObj().GetOleRef()->getStatus( pOLENd->GetAspect() ); if ( !bPrn && dynamic_cast< const SwCursorShell *>( pShell ) != nullptr && ( diff --git a/sw/source/core/doc/textboxhelper.cxx b/sw/source/core/doc/textboxhelper.cxx index b9f5faccfa3f..718b5fe5f227 100644 --- a/sw/source/core/doc/textboxhelper.cxx +++ b/sw/source/core/doc/textboxhelper.cxx @@ -282,9 +282,9 @@ uno::Any SwTextBoxHelper::queryInterface(SwFrameFormat* pShape, const uno::Type& return aRet; } -Rectangle SwTextBoxHelper::getTextRectangle(SwFrameFormat* pShape, bool bAbsolute) +tools::Rectangle SwTextBoxHelper::getTextRectangle(SwFrameFormat* pShape, bool bAbsolute) { - Rectangle aRet; + tools::Rectangle aRet; aRet.SetEmpty(); auto pCustomShape = dynamic_cast<SdrObjCustomShape*>(pShape->FindRealSdrObject()); if (pCustomShape) @@ -308,7 +308,7 @@ Rectangle SwTextBoxHelper::getTextRectangle(SwFrameFormat* pShape, bool bAbsolut Size aSize(pCustomShape->GetLogicRect().GetSize()); aPoint.X() -= aSize.Width() / 2; aPoint.Y() -= aSize.Height() / 2; - Rectangle aLogicRect(aPoint, aSize); + tools::Rectangle aLogicRect(aPoint, aSize); aRet.Move(-1 * aLogicRect.Left(), -1 * aLogicRect.Top()); } @@ -325,7 +325,7 @@ void SwTextBoxHelper::syncProperty(SwFrameFormat* pShape, const OUString& rPrope SdrObject* pObject = pShape->FindRealSdrObject(); if (pObject) { - Rectangle aRectangle(pObject->GetSnapRect()); + tools::Rectangle aRectangle(pObject->GetSnapRect()); syncProperty(pShape, RES_HORI_ORIENT, MID_HORIORIENT_POSITION, uno::makeAny(static_cast<sal_Int32>(convertTwipToMm100(aRectangle.Left())))); syncProperty(pShape, RES_VERT_ORIENT, MID_VERTORIENT_POSITION, uno::makeAny(static_cast<sal_Int32>(convertTwipToMm100(aRectangle.Top())))); } @@ -524,7 +524,7 @@ void SwTextBoxHelper::syncProperty(SwFrameFormat* pShape, sal_uInt16 nWID, sal_u // Position/size should be the text position/size, not the shape one as-is. if (bAdjustX || bAdjustY || bAdjustSize) { - Rectangle aRect = getTextRectangle(pShape, /*bAbsolute=*/false); + tools::Rectangle aRect = getTextRectangle(pShape, /*bAbsolute=*/false); if (!aRect.IsEmpty()) { if (bAdjustX || bAdjustY) @@ -611,7 +611,7 @@ void SwTextBoxHelper::syncFlyFrameAttr(SwFrameFormat& rShape, SfxItemSet& rSet) auto& rOrient = static_cast<const SwFormatVertOrient&>(*aIter.GetCurItem()); SwFormatVertOrient aOrient(rOrient); - Rectangle aRect = getTextRectangle(&rShape, /*bAbsolute=*/false); + tools::Rectangle aRect = getTextRectangle(&rShape, /*bAbsolute=*/false); if (!aRect.IsEmpty()) aOrient.SetPos(aOrient.GetPos() + aRect.getY()); @@ -631,7 +631,7 @@ void SwTextBoxHelper::syncFlyFrameAttr(SwFrameFormat& rShape, SfxItemSet& rSet) auto& rOrient = static_cast<const SwFormatHoriOrient&>(*aIter.GetCurItem()); SwFormatHoriOrient aOrient(rOrient); - Rectangle aRect = getTextRectangle(&rShape, /*bAbsolute=*/false); + tools::Rectangle aRect = getTextRectangle(&rShape, /*bAbsolute=*/false); if (!aRect.IsEmpty()) aOrient.SetPos(aOrient.GetPos() + aRect.getX()); @@ -648,7 +648,7 @@ void SwTextBoxHelper::syncFlyFrameAttr(SwFrameFormat& rShape, SfxItemSet& rSet) SwFormatHoriOrient aHoriOrient(rShape.GetHoriOrient()); SwFormatFrameSize aSize(pFormat->GetFrameSize()); - Rectangle aRect = getTextRectangle(&rShape, /*bAbsolute=*/false); + tools::Rectangle aRect = getTextRectangle(&rShape, /*bAbsolute=*/false); if (!aRect.IsEmpty()) { aVertOrient.SetPos(aVertOrient.GetPos() + aRect.getY()); diff --git a/sw/source/core/draw/dcontact.cxx b/sw/source/core/draw/dcontact.cxx index 291ae1a58e5e..883cc616db64 100644 --- a/sw/source/core/draw/dcontact.cxx +++ b/sw/source/core/draw/dcontact.cxx @@ -882,7 +882,7 @@ SdrObject* SwDrawContact::GetDrawObjectByAnchorFrame( const SwFrame& _rAnchorFra return pRetDrawObj; } -void SwDrawContact::NotifyBackgrdOfAllVirtObjs(const Rectangle* pOldBoundRect) +void SwDrawContact::NotifyBackgrdOfAllVirtObjs(const tools::Rectangle* pOldBoundRect) { for(auto& rpDrawVirtObj : maDrawVirtObjs) { @@ -916,7 +916,7 @@ void SwDrawContact::NotifyBackgrdOfAllVirtObjs(const Rectangle* pOldBoundRect) /// local method to notify the background for a drawing object - #i26791# static void lcl_NotifyBackgroundOfObj( SwDrawContact& _rDrawContact, const SdrObject& _rObj, - const Rectangle* _pOldObjRect ) + const tools::Rectangle* _pOldObjRect ) { // #i34640# SwAnchoredObject* pAnchoredObj = @@ -950,7 +950,7 @@ static void lcl_NotifyBackgroundOfObj( SwDrawContact& _rDrawContact, void SwDrawContact::Changed( const SdrObject& rObj, SdrUserCallType eType, - const Rectangle& rOldBoundRect ) + const tools::Rectangle& rOldBoundRect ) { // #i26791# - no event handling, if existing <SwViewShell> // is in construction @@ -1085,7 +1085,7 @@ void lcl_textBoxSizeNotify(SwFrameFormat* pFormat) void SwDrawContact::Changed_( const SdrObject& rObj, SdrUserCallType eType, - const Rectangle* pOldBoundRect ) + const tools::Rectangle* pOldBoundRect ) { // suppress handling of nested <SdrObjUserCall> events NestedUserCallHdl aNestedUserCallHdl( this, eType ); @@ -1203,7 +1203,7 @@ void SwDrawContact::Changed_( const SdrObject& rObj, { // #i34748# - If no last object rectangle is // provided by the anchored object, use parameter <pOldBoundRect>. - const Rectangle& aOldObjRect = pAnchoredDrawObj->GetLastObjRect() + const tools::Rectangle& aOldObjRect = pAnchoredDrawObj->GetLastObjRect() ? *(pAnchoredDrawObj->GetLastObjRect()) : *(pOldBoundRect); // #i79400# @@ -1373,8 +1373,8 @@ void SwDrawContact::SwClientNotify(const SwModify& rMod, const SfxHint& rHint) { // determine old object rectangle of 'master' drawing object // for notification - const Rectangle* pOldRect = nullptr; - Rectangle aOldRect; + const tools::Rectangle* pOldRect = nullptr; + tools::Rectangle aOldRect; if(GetAnchorFrame()) { // --> #i36181# - include spacing in object @@ -1606,7 +1606,7 @@ void SwDrawContact::DisconnectFromLayout( bool _bMoveMasterToInvisibleLayer ) !(GetFormat()->GetDoc()->IsInDtor()) && GetAnchorFrame() && !GetAnchorFrame()->IsInDtor() ) { - const Rectangle aOldRect( maAnchoredDrawObj.GetObjRectWithSpaces().SVRect() ); + const tools::Rectangle aOldRect( maAnchoredDrawObj.GetObjRectWithSpaces().SVRect() ); lcl_NotifyBackgroundOfObj( *this, *GetMaster(), &aOldRect ); NotifyBackgrdOfAllVirtObjs( &aOldRect ); } @@ -2267,7 +2267,7 @@ void SwDrawVirtObj::NbcSetAnchorPos(const Point& rPnt) // #i97197# // the methods relevant for positioning -const Rectangle& SwDrawVirtObj::GetCurrentBoundRect() const +const tools::Rectangle& SwDrawVirtObj::GetCurrentBoundRect() const { if(aOutRect.IsEmpty()) { @@ -2277,7 +2277,7 @@ const Rectangle& SwDrawVirtObj::GetCurrentBoundRect() const return aOutRect; } -const Rectangle& SwDrawVirtObj::GetLastBoundRect() const +const tools::Rectangle& SwDrawVirtObj::GetLastBoundRect() const { return aOutRect; } @@ -2286,7 +2286,7 @@ const Point SwDrawVirtObj::GetOffset() const { // do NOT use IsEmpty() here, there is already a useful offset // in the position - if(aOutRect == Rectangle()) + if(aOutRect == tools::Rectangle()) { return Point(); } @@ -2382,7 +2382,7 @@ void SwDrawVirtObj::Resize(const Point& rRef, const Fraction& xFact, const Fract { if(xFact.GetNumerator() != xFact.GetDenominator() || yFact.GetNumerator() != yFact.GetDenominator()) { - Rectangle aBoundRect0; if(pUserCall) aBoundRect0 = GetLastBoundRect(); + tools::Rectangle aBoundRect0; if(pUserCall) aBoundRect0 = GetLastBoundRect(); rRefObj.Resize(rRef - GetOffset(), xFact, yFact, bUnsetRelative); SetRectsDirty(); SendUserCall(SdrUserCallType::Resize, aBoundRect0); @@ -2393,7 +2393,7 @@ void SwDrawVirtObj::Rotate(const Point& rRef, long nAngle, double sn, double cs) { if(nAngle) { - Rectangle aBoundRect0; if(pUserCall) aBoundRect0 = GetLastBoundRect(); + tools::Rectangle aBoundRect0; if(pUserCall) aBoundRect0 = GetLastBoundRect(); rRefObj.Rotate(rRef - GetOffset(), nAngle, sn, cs); SetRectsDirty(); SendUserCall(SdrUserCallType::Resize, aBoundRect0); @@ -2402,7 +2402,7 @@ void SwDrawVirtObj::Rotate(const Point& rRef, long nAngle, double sn, double cs) void SwDrawVirtObj::Mirror(const Point& rRef1, const Point& rRef2) { - Rectangle aBoundRect0; if(pUserCall) aBoundRect0 = GetLastBoundRect(); + tools::Rectangle aBoundRect0; if(pUserCall) aBoundRect0 = GetLastBoundRect(); rRefObj.Mirror(rRef1 - GetOffset(), rRef2 - GetOffset()); SetRectsDirty(); SendUserCall(SdrUserCallType::Resize, aBoundRect0); @@ -2412,7 +2412,7 @@ void SwDrawVirtObj::Shear(const Point& rRef, long nAngle, double tn, bool bVShea { if(nAngle) { - Rectangle aBoundRect0; if(pUserCall) aBoundRect0 = GetLastBoundRect(); + tools::Rectangle aBoundRect0; if(pUserCall) aBoundRect0 = GetLastBoundRect(); rRefObj.Shear(rRef - GetOffset(), nAngle, tn, bVShear); SetRectsDirty(); SendUserCall(SdrUserCallType::Resize, aBoundRect0); @@ -2425,7 +2425,7 @@ void SwDrawVirtObj::RecalcSnapRect() aSnapRect += GetOffset(); } -const Rectangle& SwDrawVirtObj::GetSnapRect() const +const tools::Rectangle& SwDrawVirtObj::GetSnapRect() const { const_cast<SwDrawVirtObj*>(this)->aSnapRect = rRefObj.GetSnapRect(); const_cast<SwDrawVirtObj*>(this)->aSnapRect += GetOffset(); @@ -2433,25 +2433,25 @@ const Rectangle& SwDrawVirtObj::GetSnapRect() const return aSnapRect; } -void SwDrawVirtObj::SetSnapRect(const Rectangle& rRect) +void SwDrawVirtObj::SetSnapRect(const tools::Rectangle& rRect) { - Rectangle aBoundRect0; if(pUserCall) aBoundRect0 = GetLastBoundRect(); - Rectangle aR(rRect); + tools::Rectangle aBoundRect0; if(pUserCall) aBoundRect0 = GetLastBoundRect(); + tools::Rectangle aR(rRect); aR -= GetOffset(); rRefObj.SetSnapRect(aR); SetRectsDirty(); SendUserCall(SdrUserCallType::Resize, aBoundRect0); } -void SwDrawVirtObj::NbcSetSnapRect(const Rectangle& rRect) +void SwDrawVirtObj::NbcSetSnapRect(const tools::Rectangle& rRect) { - Rectangle aR(rRect); + tools::Rectangle aR(rRect); aR -= GetOffset(); SetRectsDirty(); rRefObj.NbcSetSnapRect(aR); } -const Rectangle& SwDrawVirtObj::GetLogicRect() const +const tools::Rectangle& SwDrawVirtObj::GetLogicRect() const { const_cast<SwDrawVirtObj*>(this)->aSnapRect = rRefObj.GetLogicRect(); const_cast<SwDrawVirtObj*>(this)->aSnapRect += GetOffset(); @@ -2459,19 +2459,19 @@ const Rectangle& SwDrawVirtObj::GetLogicRect() const return aSnapRect; } -void SwDrawVirtObj::SetLogicRect(const Rectangle& rRect) +void SwDrawVirtObj::SetLogicRect(const tools::Rectangle& rRect) { - Rectangle aBoundRect0; if(pUserCall) aBoundRect0 = GetLastBoundRect(); - Rectangle aR(rRect); + tools::Rectangle aBoundRect0; if(pUserCall) aBoundRect0 = GetLastBoundRect(); + tools::Rectangle aR(rRect); aR -= GetOffset(); rRefObj.SetLogicRect(aR); SetRectsDirty(); SendUserCall(SdrUserCallType::Resize, aBoundRect0); } -void SwDrawVirtObj::NbcSetLogicRect(const Rectangle& rRect) +void SwDrawVirtObj::NbcSetLogicRect(const tools::Rectangle& rRect) { - Rectangle aR(rRect); + tools::Rectangle aR(rRect); aR -= GetOffset(); rRefObj.NbcSetLogicRect(aR); SetRectsDirty(); diff --git a/sw/source/core/draw/dflyobj.cxx b/sw/source/core/draw/dflyobj.cxx index 4913c148f940..87d24545d790 100644 --- a/sw/source/core/draw/dflyobj.cxx +++ b/sw/source/core/draw/dflyobj.cxx @@ -314,7 +314,7 @@ basegfx::B2DRange SwVirtFlyDrawObj::getOuterBound() const if(pFlyFrame) { - const Rectangle aOuterRectangle(pFlyFrame->Frame().Pos(), pFlyFrame->Frame().SSize()); + const tools::Rectangle aOuterRectangle(pFlyFrame->Frame().Pos(), pFlyFrame->Frame().SSize()); if(!aOuterRectangle.IsEmpty()) { @@ -338,7 +338,7 @@ basegfx::B2DRange SwVirtFlyDrawObj::getInnerBound() const if(pFlyFrame) { - const Rectangle aInnerRectangle(pFlyFrame->Frame().Pos() + pFlyFrame->Prt().Pos(), pFlyFrame->Prt().SSize()); + const tools::Rectangle aInnerRectangle(pFlyFrame->Frame().Pos() + pFlyFrame->Prt().Pos(), pFlyFrame->Prt().SSize()); if(!aInnerRectangle.IsEmpty()) { @@ -488,16 +488,16 @@ void SwVirtFlyDrawObj::SetRect() const if ( GetFlyFrame()->Frame().HasArea() ) const_cast<SwVirtFlyDrawObj*>(this)->aOutRect = GetFlyFrame()->Frame().SVRect(); else - const_cast<SwVirtFlyDrawObj*>(this)->aOutRect = Rectangle(); + const_cast<SwVirtFlyDrawObj*>(this)->aOutRect = tools::Rectangle(); } -const Rectangle& SwVirtFlyDrawObj::GetCurrentBoundRect() const +const tools::Rectangle& SwVirtFlyDrawObj::GetCurrentBoundRect() const { SetRect(); return aOutRect; } -const Rectangle& SwVirtFlyDrawObj::GetLastBoundRect() const +const tools::Rectangle& SwVirtFlyDrawObj::GetLastBoundRect() const { return GetCurrentBoundRect(); } @@ -512,15 +512,15 @@ void SwVirtFlyDrawObj::RecalcSnapRect() SetRect(); } -const Rectangle& SwVirtFlyDrawObj::GetSnapRect() const +const tools::Rectangle& SwVirtFlyDrawObj::GetSnapRect() const { SetRect(); return aOutRect; } -void SwVirtFlyDrawObj::SetSnapRect(const Rectangle& ) +void SwVirtFlyDrawObj::SetSnapRect(const tools::Rectangle& ) { - Rectangle aTmp( GetLastBoundRect() ); + tools::Rectangle aTmp( GetLastBoundRect() ); SetRect(); SetChanged(); BroadcastObjectChange(); @@ -528,20 +528,20 @@ void SwVirtFlyDrawObj::SetSnapRect(const Rectangle& ) pUserCall->Changed(*this, SdrUserCallType::Resize, aTmp); } -void SwVirtFlyDrawObj::NbcSetSnapRect(const Rectangle& ) +void SwVirtFlyDrawObj::NbcSetSnapRect(const tools::Rectangle& ) { SetRect(); } -const Rectangle& SwVirtFlyDrawObj::GetLogicRect() const +const tools::Rectangle& SwVirtFlyDrawObj::GetLogicRect() const { SetRect(); return aOutRect; } -void SwVirtFlyDrawObj::SetLogicRect(const Rectangle& ) +void SwVirtFlyDrawObj::SetLogicRect(const tools::Rectangle& ) { - Rectangle aTmp( GetLastBoundRect() ); + tools::Rectangle aTmp( GetLastBoundRect() ); SetRect(); SetChanged(); BroadcastObjectChange(); @@ -549,14 +549,14 @@ void SwVirtFlyDrawObj::SetLogicRect(const Rectangle& ) pUserCall->Changed(*this, SdrUserCallType::Resize, aTmp); } -void SwVirtFlyDrawObj::NbcSetLogicRect(const Rectangle& ) +void SwVirtFlyDrawObj::NbcSetLogicRect(const tools::Rectangle& ) { SetRect(); } ::basegfx::B2DPolyPolygon SwVirtFlyDrawObj::TakeXorPoly() const { - const Rectangle aSourceRectangle(GetFlyFrame()->Frame().SVRect()); + const tools::Rectangle aSourceRectangle(GetFlyFrame()->Frame().SVRect()); const ::basegfx::B2DRange aSourceRange(aSourceRectangle.Left(), aSourceRectangle.Top(), aSourceRectangle.Right(), aSourceRectangle.Bottom()); ::basegfx::B2DPolyPolygon aRetval; @@ -722,7 +722,7 @@ void SwVirtFlyDrawObj::NbcCrop(const Point& rRef, const Fraction& xFact, const F // Compute old and new rect. This will give us the deformation to apply to // the object to crop - Rectangle aOldRect( aOutRect ); + tools::Rectangle aOldRect( aOutRect ); const long nOldWidth = aOldRect.GetWidth(); const long nOldHeight = aOldRect.GetHeight(); @@ -730,7 +730,7 @@ void SwVirtFlyDrawObj::NbcCrop(const Point& rRef, const Fraction& xFact, const F if (!nOldWidth || !nOldHeight) return; - Rectangle aNewRect( aOutRect ); + tools::Rectangle aNewRect( aOutRect ); ResizeRect( aNewRect, rRef, xFact, yFact ); // Get graphic object size in 100th of mm @@ -751,7 +751,7 @@ void SwVirtFlyDrawObj::NbcCrop(const Point& rRef, const Fraction& xFact, const F pSh->GetCurAttr( aSet ); SwCropGrf aCrop( static_cast<const SwCropGrf&>(aSet.Get(RES_GRFATR_CROPGRF)) ); - Rectangle aCropRectangle( + tools::Rectangle aCropRectangle( convertTwipToMm100(aCrop.GetLeft()), convertTwipToMm100(aCrop.GetTop()), convertTwipToMm100(aCrop.GetRight()), @@ -922,7 +922,7 @@ void SwVirtFlyDrawObj::Crop(const Point& rRef, const Fraction& xFact, const Frac void SwVirtFlyDrawObj::addCropHandles(SdrHdlList& rTarget) const { - Rectangle aRect(GetSnapRect()); + tools::Rectangle aRect(GetSnapRect()); if(!aRect.IsEmpty()) { diff --git a/sw/source/core/draw/dpage.cxx b/sw/source/core/draw/dpage.cxx index b1a2190bf2ba..5c2c42ca8d99 100644 --- a/sw/source/core/draw/dpage.cxx +++ b/sw/source/core/draw/dpage.cxx @@ -118,13 +118,13 @@ void InsertGridFrame( SdrPageGridFrameList *pLst, const SwFrame *pPg ) { SwRect aPrt( pPg->Prt() ); aPrt += pPg->Frame().Pos(); - const Rectangle aUser( aPrt.SVRect() ); - const Rectangle aPaper( pPg->Frame().SVRect() ); + const tools::Rectangle aUser( aPrt.SVRect() ); + const tools::Rectangle aPaper( pPg->Frame().SVRect() ); pLst->Insert( SdrPageGridFrame( aPaper, aUser ) ); } const SdrPageGridFrameList* SwDPage::GetGridFrameList( - const SdrPageView* pPV, const Rectangle *pRect ) const + const SdrPageView* pPV, const tools::Rectangle *pRect ) const { SwViewShell* pSh = static_cast< SwDrawModel* >(GetModel())->GetDoc().getIDocumentLayoutAccess().GetCurrentViewShell(); if(pSh) @@ -236,7 +236,7 @@ bool SwDPage::RequestHelp( vcl::Window* pWindow, SdrView* pView, } // then display the help: - Rectangle aRect( rEvt.GetMousePosPixel(), Size(1,1) ); + tools::Rectangle aRect( rEvt.GetMousePosPixel(), Size(1,1) ); if( rEvt.GetMode() & HelpEventMode::BALLOON ) { Help::ShowBalloon( pWindow, rEvt.GetMousePosPixel(), aRect, sText ); diff --git a/sw/source/core/draw/dview.cxx b/sw/source/core/draw/dview.cxx index 7ef966ca04b3..94192f51b299 100644 --- a/sw/source/core/draw/dview.cxx +++ b/sw/source/core/draw/dview.cxx @@ -648,7 +648,7 @@ void SwDrawView::ObjOrderChanged( SdrObject* pObj, sal_uLong nOldPos, } bool SwDrawView::TakeDragLimit( SdrDragMode eMode, - Rectangle& rRect ) const + tools::Rectangle& rRect ) const { const SdrMarkList &rMrkList = GetMarkedObjectList(); bool bRet = false; @@ -676,7 +676,7 @@ const SwFrame* SwDrawView::CalcAnchor() //Search for paragraph bound objects, otherwise only the //current anchor. Search only if we currently drag. const SwFrame* pAnch; - Rectangle aMyRect; + tools::Rectangle aMyRect; const bool bFly = dynamic_cast< const SwVirtFlyDrawObj *>( pObj ) != nullptr; if ( bFly ) { @@ -712,7 +712,7 @@ const SwFrame* SwDrawView::CalcAnchor() } else { - Rectangle aRect = pObj->GetSnapRect(); + tools::Rectangle aRect = pObj->GetSnapRect(); aPt = bTopRight ? aRect.TopRight() : aRect.TopLeft(); } @@ -796,7 +796,7 @@ void SwDrawView::ModelHasChanged() } } -void SwDrawView::MakeVisible( const Rectangle &rRect, vcl::Window & ) +void SwDrawView::MakeVisible( const tools::Rectangle &rRect, vcl::Window & ) { OSL_ENSURE( rImp.GetShell()->GetWin(), "MakeVisible, unknown Window"); rImp.GetShell()->MakeVisible( SwRect( rRect ) ); diff --git a/sw/source/core/frmedt/fecopy.cxx b/sw/source/core/frmedt/fecopy.cxx index bd4f5e6b1ee0..0453b72d2b5d 100644 --- a/sw/source/core/frmedt/fecopy.cxx +++ b/sw/source/core/frmedt/fecopy.cxx @@ -920,7 +920,7 @@ bool SwFEShell::Paste( SwDoc* pClpDoc ) // Therefore we calculate the absolute position here // and after the insert the anchor of the object // is set to the anchor of the group object. - Rectangle aSnapRect = pNew->GetSnapRect(); + tools::Rectangle aSnapRect = pNew->GetSnapRect(); if( pNew->GetAnchorPos().X() || pNew->GetAnchorPos().Y() ) { const Point aPoint( 0, 0 ); @@ -1371,9 +1371,9 @@ void SwFEShell::Paste( SvStream& rStrm, SwPasteSdr nAction, const Point* pPt ) } SdrObject* pNewObj = pClpObj->Clone(); - Rectangle aOldObjRect( pOldObj->GetCurrentBoundRect() ); + tools::Rectangle aOldObjRect( pOldObj->GetCurrentBoundRect() ); Size aOldObjSize( aOldObjRect.GetSize() ); - Rectangle aNewRect( pNewObj->GetCurrentBoundRect() ); + tools::Rectangle aNewRect( pNewObj->GetCurrentBoundRect() ); Size aNewSize( aNewRect.GetSize() ); Fraction aScaleWidth( aOldObjSize.Width(), aNewSize.Width() ); @@ -1520,7 +1520,7 @@ void SwFEShell::Paste( SvStream& rStrm, SwPasteSdr nAction, const Point* pPt ) } else pObj->SetLayer( GetDoc()->getIDocumentDrawModelAccess().GetHeavenId() ); - const Rectangle &rSnap = pObj->GetSnapRect(); + const tools::Rectangle &rSnap = pObj->GetSnapRect(); const Size aDiff( rSnap.GetWidth()/2, rSnap.GetHeight()/2 ); pView->MoveMarkedObj( aDiff ); ImpEndCreate(); diff --git a/sw/source/core/frmedt/fefly1.cxx b/sw/source/core/frmedt/fefly1.cxx index c495a35abf73..a3f167e1b15d 100644 --- a/sw/source/core/frmedt/fefly1.cxx +++ b/sw/source/core/frmedt/fefly1.cxx @@ -1748,7 +1748,7 @@ bool SwFEShell::ReplaceSdrObj( const OUString& rGrfName, const OUString& rFltNam if( dynamic_cast<const SwVirtFlyDrawObj*>( pObj) == nullptr ) { // then let's do it: - const Rectangle &rBound = pObj->GetSnapRect(); + const tools::Rectangle &rBound = pObj->GetSnapRect(); Point aRelPos( pObj->GetRelativePos() ); const long nWidth = rBound.Right() - rBound.Left(); diff --git a/sw/source/core/frmedt/feshview.cxx b/sw/source/core/frmedt/feshview.cxx index 9df3d900447f..bd2b296d42bc 100644 --- a/sw/source/core/frmedt/feshview.cxx +++ b/sw/source/core/frmedt/feshview.cxx @@ -1754,7 +1754,7 @@ bool SwFEShell::ImpEndCreate() Imp()->GetDrawView()->UnmarkAll(); - const Rectangle &rBound = rSdrObj.GetSnapRect(); + const tools::Rectangle &rBound = rSdrObj.GetSnapRect(); Point aPt( rBound.TopRight() ); // alien identifier should end up on defaults @@ -1783,7 +1783,7 @@ bool SwFEShell::ImpEndCreate() // The crsr should not be too far away bCharBound = true; - Rectangle aRect( aTmp.SVRect() ); + tools::Rectangle aRect( aTmp.SVRect() ); aRect.Left() -= MM50*2; aRect.Top() -= MM50*2; aRect.Right() += MM50*2; @@ -2240,7 +2240,7 @@ void SwFEShell::DelSelectedObj() // For the statusline to request the current conditions Size SwFEShell::GetObjSize() const { - Rectangle aRect; + tools::Rectangle aRect; if ( Imp()->HasDrawView() ) { if ( Imp()->GetDrawView()->IsAction() ) @@ -2256,7 +2256,7 @@ Point SwFEShell::GetAnchorObjDiff() const const SdrView *pView = Imp()->GetDrawView(); OSL_ENSURE( pView, "GetAnchorObjDiff without DrawView?" ); - Rectangle aRect; + tools::Rectangle aRect; if ( Imp()->GetDrawView()->IsAction() ) Imp()->GetDrawView()->TakeActionRect( aRect ); else @@ -2675,7 +2675,7 @@ void SwFEShell::CheckUnboundObjects() SdrObject *pObj = rMrkList.GetMark( i )->GetMarkedSdrObj(); if ( !GetUserCall(pObj) ) { - const Rectangle &rBound = pObj->GetSnapRect(); + const tools::Rectangle &rBound = pObj->GetSnapRect(); const Point aPt( rBound.TopLeft() ); const SwFrame *pPage = GetLayout()->Lower(); const SwFrame *pLast = pPage; @@ -2891,7 +2891,7 @@ long SwFEShell::GetSectionWidth( SwFormat const & rFormat ) const return 0; } - void SwFEShell::CreateDefaultShape( sal_uInt16 /*SdrObjKind ?*/ eSdrObjectKind, const Rectangle& rRect, + void SwFEShell::CreateDefaultShape( sal_uInt16 /*SdrObjKind ?*/ eSdrObjectKind, const tools::Rectangle& rRect, sal_uInt16 nSlotId) { SdrView* pDrawView = GetDrawView(); @@ -2902,19 +2902,19 @@ long SwFEShell::GetSectionWidth( SwFormat const & rFormat ) const if(pObj) { - Rectangle aRect(rRect); + tools::Rectangle aRect(rRect); if(OBJ_CARC == eSdrObjectKind || OBJ_CCUT == eSdrObjectKind) { // force quadratic if(aRect.GetWidth() > aRect.GetHeight()) { - aRect = Rectangle( + aRect = tools::Rectangle( Point(aRect.Left() + ((aRect.GetWidth() - aRect.GetHeight()) / 2), aRect.Top()), Size(aRect.GetHeight(), aRect.GetHeight())); } else { - aRect = Rectangle( + aRect = tools::Rectangle( Point(aRect.Left(), aRect.Top() + ((aRect.GetHeight() - aRect.GetWidth()) / 2)), Size(aRect.GetWidth(), aRect.GetWidth())); } diff --git a/sw/source/core/inc/dflyobj.hxx b/sw/source/core/inc/dflyobj.hxx index 3d097c07e998..9368eb893b07 100644 --- a/sw/source/core/inc/dflyobj.hxx +++ b/sw/source/core/inc/dflyobj.hxx @@ -81,16 +81,16 @@ public: virtual void TakeObjInfo( SdrObjTransformInfoRec& rInfo ) const override; // we treat the size calculation completely on ourself here - virtual const Rectangle& GetCurrentBoundRect() const override; - virtual const Rectangle& GetLastBoundRect() const override; + virtual const tools::Rectangle& GetCurrentBoundRect() const override; + virtual const tools::Rectangle& GetLastBoundRect() const override; virtual void RecalcBoundRect() override; virtual void RecalcSnapRect() override; - virtual const Rectangle& GetSnapRect() const override; - virtual void SetSnapRect(const Rectangle& rRect) override; - virtual void NbcSetSnapRect(const Rectangle& rRect) override; - virtual const Rectangle& GetLogicRect() const override; - virtual void SetLogicRect(const Rectangle& rRect) override; - virtual void NbcSetLogicRect(const Rectangle& rRect) override; + virtual const tools::Rectangle& GetSnapRect() const override; + virtual void SetSnapRect(const tools::Rectangle& rRect) override; + virtual void NbcSetSnapRect(const tools::Rectangle& rRect) override; + virtual const tools::Rectangle& GetLogicRect() const override; + virtual void SetLogicRect(const tools::Rectangle& rRect) override; + virtual void NbcSetLogicRect(const tools::Rectangle& rRect) override; virtual ::basegfx::B2DPolyPolygon TakeXorPoly() const override; virtual void NbcMove (const Size& rSiz) override; virtual void NbcResize(const Point& rRef, const Fraction& xFact, diff --git a/sw/source/core/inc/dview.hxx b/sw/source/core/inc/dview.hxx index 54a74913df63..d5c2bf6bdd23 100644 --- a/sw/source/core/inc/dview.hxx +++ b/sw/source/core/inc/dview.hxx @@ -92,8 +92,8 @@ public: virtual void ObjOrderChanged( SdrObject* pObj, sal_uLong nOldPos, sal_uLong nNewPos ) override; - virtual bool TakeDragLimit(SdrDragMode eMode, Rectangle& rRect) const override; - virtual void MakeVisible( const Rectangle&, vcl::Window &rWin ) override; + virtual bool TakeDragLimit(SdrDragMode eMode, tools::Rectangle& rRect) const override; + virtual void MakeVisible( const tools::Rectangle&, vcl::Window &rWin ) override; virtual void CheckPossibilities() override; const SwViewShellImp &Imp() const { return rImp; } diff --git a/sw/source/core/layout/anchoreddrawobject.cxx b/sw/source/core/layout/anchoreddrawobject.cxx index 5a3ee5cf2ac6..9d450f9a26f7 100644 --- a/sw/source/core/layout/anchoreddrawobject.cxx +++ b/sw/source/core/layout/anchoreddrawobject.cxx @@ -629,12 +629,12 @@ const SwRect SwAnchoredDrawObject::GetObjBoundRect() const // Resize objects with relative width or height if ( !bGroupShape && GetPageFrame( ) && ( GetDrawObj( )->GetRelativeWidth( ) || GetDrawObj()->GetRelativeHeight( ) ) ) { - Rectangle aCurrObjRect = GetDrawObj()->GetCurrentBoundRect(); + tools::Rectangle aCurrObjRect = GetDrawObj()->GetCurrentBoundRect(); long nTargetWidth = aCurrObjRect.GetWidth( ); if ( GetDrawObj( )->GetRelativeWidth( ) ) { - Rectangle aPageRect; + tools::Rectangle aPageRect; if (GetDrawObj()->GetRelativeWidthRelation() == text::RelOrientation::FRAME) // Exclude margins. aPageRect = GetPageFrame()->Prt().SVRect(); @@ -646,7 +646,7 @@ const SwRect SwAnchoredDrawObject::GetObjBoundRect() const long nTargetHeight = aCurrObjRect.GetHeight( ); if ( GetDrawObj( )->GetRelativeHeight( ) ) { - Rectangle aPageRect; + tools::Rectangle aPageRect; if (GetDrawObj()->GetRelativeHeightRelation() == text::RelOrientation::FRAME) // Exclude margins. aPageRect = GetPageFrame()->Prt().SVRect(); @@ -722,11 +722,11 @@ void SwAnchoredDrawObject::AdjustPositioningAttr( const SwFrame* _pNewAnchorFram // --> #i34748# - change return type. // If member <mpLastObjRect> is NULL, create one. -void SwAnchoredDrawObject::SetLastObjRect( const Rectangle& _rNewLastRect ) +void SwAnchoredDrawObject::SetLastObjRect( const tools::Rectangle& _rNewLastRect ) { if ( !mpLastObjRect ) { - mpLastObjRect.reset( new Rectangle ); + mpLastObjRect.reset( new tools::Rectangle ); } *(mpLastObjRect) = _rNewLastRect; } diff --git a/sw/source/core/layout/dumpfilter.cxx b/sw/source/core/layout/dumpfilter.cxx index c4eac12058da..1bf1c37c1465 100644 --- a/sw/source/core/layout/dumpfilter.cxx +++ b/sw/source/core/layout/dumpfilter.cxx @@ -96,7 +96,7 @@ namespace sw // Get sure that the whole layout is processed: set a visible area // even though there isn't any need of it pXDoc->GetDocShell()->GetWrtShell()->StartAction(); - Rectangle aRect( 0, 0, 26000, 21000 ); + tools::Rectangle aRect( 0, 0, 26000, 21000 ); pXDoc->GetDocShell()->SetVisArea( aRect ); pLayout->InvalidateAllContent( SwInvalidateFlags::Size ); pXDoc->GetDocShell()->GetWrtShell()->EndAction(); diff --git a/sw/source/core/layout/layact.cxx b/sw/source/core/layout/layact.cxx index 26ae76bfe086..db26a6f99cbb 100644 --- a/sw/source/core/layout/layact.cxx +++ b/sw/source/core/layout/layact.cxx @@ -2076,7 +2076,7 @@ void SwLayIdle::ShowIdle( ColorData eColorData ) vcl::Window *pWin = pImp->GetShell()->GetWin(); if (pWin && !pWin->SupportsDoubleBuffering()) // FIXME make this work with double-buffering { - Rectangle aRect( 0, 0, 5, 5 ); + tools::Rectangle aRect( 0, 0, 5, 5 ); aRect = pWin->PixelToLogic( aRect ); // Depending on if idle layout is in progress or not, draw a "red square" or a "green square". pWin->Push( PushFlags::FILLCOLOR|PushFlags::LINECOLOR ); diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx index 69510b6aa757..109d4486c475 100644 --- a/sw/source/core/layout/paintfrm.cxx +++ b/sw/source/core/layout/paintfrm.cxx @@ -1248,7 +1248,7 @@ void SwAlignRect( SwRect &rRect, const SwViewShell *pSh, const vcl::RenderContex gProp.pSFlyMetafileOut.get() : pRenderContext; // Hold original rectangle in pixel - const Rectangle aOrgPxRect = pOut->LogicToPixel( rRect.SVRect() ); + const tools::Rectangle aOrgPxRect = pOut->LogicToPixel( rRect.SVRect() ); // Determine pixel-center rectangle in twip const SwRect aPxCenterRect( pOut->PixelToLogic( aOrgPxRect ) ); @@ -1375,7 +1375,7 @@ static void lcl_CompPxPosAndAdjustPos( const vcl::RenderContext& _rOut, */ void SwAlignGrfRect( SwRect *pGrfRect, const vcl::RenderContext &rOut ) { - Rectangle aPxRect = rOut.LogicToPixel( pGrfRect->SVRect() ); + tools::Rectangle aPxRect = rOut.LogicToPixel( pGrfRect->SVRect() ); pGrfRect->Pos( rOut.PixelToLogic( aPxRect.TopLeft() ) ); pGrfRect->SSize( rOut.PixelToLogic( aPxRect.GetSize() ) ); } @@ -2308,18 +2308,18 @@ static void lcl_AdjustRectToPixelSize( SwRect& io_aSwRect, const vcl::RenderCont // local object of class <Rectangle> in Twip coordinates // calculated from given rectangle aligned to pixel centers. - const Rectangle aPxCenterRect = aOut.PixelToLogic( + const tools::Rectangle aPxCenterRect = aOut.PixelToLogic( aOut.LogicToPixel( io_aSwRect.SVRect() ) ); // local constant object of class <Rectangle> representing given rectangle // in pixel. - const Rectangle aOrgPxRect = aOut.LogicToPixel( io_aSwRect.SVRect() ); + const tools::Rectangle aOrgPxRect = aOut.LogicToPixel( io_aSwRect.SVRect() ); // calculate adjusted rectangle from pixel centered rectangle. // Due to rounding differences <aPxCenterRect> doesn't exactly represents // the Twip-centers. Thus, adjust borders by half of pixel width/height plus 1. // Afterwards, adjust calculated Twip-positions of the all borders. - Rectangle aSizedRect = aPxCenterRect; + tools::Rectangle aSizedRect = aPxCenterRect; aSizedRect.Left() -= (aTwipToPxSize.Width()/2 + 1); aSizedRect.Right() += (aTwipToPxSize.Width()/2 + 1); aSizedRect.Top() -= (aTwipToPxSize.Height()/2 + 1); @@ -2349,8 +2349,8 @@ static void lcl_AdjustRectToPixelSize( SwRect& io_aSwRect, const vcl::RenderCont io_aSwRect = SwRect( aSizedRect ); #if OSL_DEBUG_LEVEL > 0 - Rectangle aTestOrgPxRect = aOut.LogicToPixel( io_aSwRect.SVRect() ); - Rectangle aTestNewPxRect = aOut.LogicToPixel( aSizedRect ); + tools::Rectangle aTestOrgPxRect = aOut.LogicToPixel( io_aSwRect.SVRect() ); + tools::Rectangle aTestNewPxRect = aOut.LogicToPixel( aSizedRect ); OSL_ENSURE( aTestOrgPxRect == aTestNewPxRect, "Error in lcl_AlignRectToPixelSize(..): Adjusted rectangle has incorrect position or size"); // check Left() @@ -3830,7 +3830,7 @@ void SwColumnFrame::PaintBreak( ) const drawinglayer::attribute::FontAttribute aFontAttr = drawinglayer::primitive2d::getFontAttributeFromVclFont( aFontSize, aFont, false, false ); - Rectangle aTextRect; + tools::Rectangle aTextRect; pOut->GetTextBoundRect( aTextRect, aBreakText ); long nTextOff = ( nWidth - aTextRect.GetWidth() ) / 2; @@ -6050,7 +6050,7 @@ static void lcl_paintBitmapExToRect(vcl::RenderContext *pOut, const Point& aPoin // The problem is that if we get called multiple times and the color is // partly transparent, then the result will get darker and darker. To avoid // this, always paint the background color before doing the real paint. - Rectangle aRect(aPoint, aSize); + tools::Rectangle aRect(aPoint, aSize); switch (eArea) { @@ -6247,18 +6247,18 @@ static void lcl_paintBitmapExToRect(vcl::RenderContext *pOut, const Point& aPoin if (pMgr && pMgr->ShowNotes() && pMgr->HasNotes()) // do not show anything in print preview { sal_Int32 nScrollerHeight = pMgr->GetSidebarScrollerHeight(); - const Rectangle &aVisRect = _pViewShell->VisArea().SVRect(); + const tools::Rectangle &aVisRect = _pViewShell->VisArea().SVRect(); //draw border and sidepane _pViewShell->GetOut()->SetLineColor(); if (!bRight) { _pViewShell->GetOut()->SetFillColor(COL_NOTES_SIDEPANE_BORDER); - _pViewShell->GetOut()->DrawRect(Rectangle(Point(aPageRect.Left()-pMgr->GetSidebarBorderWidth(),aPageRect.Top()),Size(pMgr->GetSidebarBorderWidth(),aPageRect.Height()))) ; + _pViewShell->GetOut()->DrawRect(tools::Rectangle(Point(aPageRect.Left()-pMgr->GetSidebarBorderWidth(),aPageRect.Top()),Size(pMgr->GetSidebarBorderWidth(),aPageRect.Height()))) ; if (Application::GetSettings().GetStyleSettings().GetHighContrastMode() ) _pViewShell->GetOut()->SetFillColor(COL_BLACK); else _pViewShell->GetOut()->SetFillColor(COL_NOTES_SIDEPANE); - _pViewShell->GetOut()->DrawRect(Rectangle(Point(aPageRect.Left()-pMgr->GetSidebarWidth()-pMgr->GetSidebarBorderWidth(),aPageRect.Top()),Size(pMgr->GetSidebarWidth(),aPageRect.Height()))) ; + _pViewShell->GetOut()->DrawRect(tools::Rectangle(Point(aPageRect.Left()-pMgr->GetSidebarWidth()-pMgr->GetSidebarBorderWidth(),aPageRect.Top()),Size(pMgr->GetSidebarWidth(),aPageRect.Height()))) ; } else { @@ -6282,8 +6282,8 @@ static void lcl_paintBitmapExToRect(vcl::RenderContext *pOut, const Point& aPoin aPointTop = !bRight ? Point(aPageRect.Left() - pMgr->GetSidebarWidth() + _pViewShell->GetOut()->PixelToLogic(Size(2,0)).Width(),aPageRect.Top() + _pViewShell->GetOut()->PixelToLogic(Size(0,2)).Height()) : Point(aPageRect.Right() + pMgr->GetSidebarBorderWidth() + _pViewShell->GetOut()->PixelToLogic(Size(2,0)).Width(),aPageRect.Top() + _pViewShell->GetOut()->PixelToLogic(Size(0,2)).Height()); Size aSize(pMgr->GetSidebarWidth() - _pViewShell->GetOut()->PixelToLogic(Size(4,0)).Width(), _pViewShell->GetOut()->PixelToLogic(Size(0,nScrollerHeight)).Height()) ; - Rectangle aRectBottom(aPointBottom,aSize); - Rectangle aRectTop(aPointTop,aSize); + tools::Rectangle aRectBottom(aPointBottom,aSize); + tools::Rectangle aRectTop(aPointTop,aSize); if (aRectBottom.IsOver(aVisRect)) { @@ -6843,7 +6843,7 @@ static void lcl_RefreshLine( const SwLayoutFrame *pLay, //Is the Obj placed on the line const long nP1OthPt = !bHori ? rP1.X() : rP1.Y(); - const Rectangle &rBound = pObj->GetCurrentBoundRect(); + const tools::Rectangle &rBound = pObj->GetCurrentBoundRect(); const Point aDrPt( rBound.TopLeft() ); const long nDrOthPt = !bHori ? aDrPt.X() : aDrPt.Y(); const Size aDrSz( rBound.GetSize() ); diff --git a/sw/source/core/layout/virtoutp.cxx b/sw/source/core/layout/virtoutp.cxx index 690a166f70f0..5fa2af0aedac 100644 --- a/sw/source/core/layout/virtoutp.cxx +++ b/sw/source/core/layout/virtoutp.cxx @@ -148,7 +148,7 @@ void SwLayVout::Enter( SwViewShell *pShell, SwRect &rRect, bool bOn ) SwRect aTmp( rRect ); aTmp.SSize().Width() += aPixSz.Width()/2 + 1; aTmp.SSize().Height()+= aPixSz.Height()/2 + 1; - Rectangle aTmpRect( pO->LogicToPixel( aTmp.SVRect() ) ); + tools::Rectangle aTmpRect( pO->LogicToPixel( aTmp.SVRect() ) ); OSL_ENSURE( !pSh->GetWin()->IsReallyVisible() || aTmpRect.GetWidth() <= pSh->GetWin()->GetOutputSizePixel().Width() + 2, diff --git a/sw/source/core/ole/ndole.cxx b/sw/source/core/ole/ndole.cxx index 333303daa0a7..7c42aa9dd723 100644 --- a/sw/source/core/ole/ndole.cxx +++ b/sw/source/core/ole/ndole.cxx @@ -890,7 +890,7 @@ const uno::Reference < embed::XEmbeddedObject > SwOLEObj::GetOleRef() if ( !xObj.is() ) { // We could not load this part (probably broken) - Rectangle aArea; + tools::Rectangle aArea; SwFrame *pFrame = pOLENd->getLayoutFrame(nullptr); if ( pFrame ) { diff --git a/sw/source/core/text/EnhancedPDFExportHelper.cxx b/sw/source/core/text/EnhancedPDFExportHelper.cxx index 129770957527..e4639c609222 100644 --- a/sw/source/core/text/EnhancedPDFExportHelper.cxx +++ b/sw/source/core/text/EnhancedPDFExportHelper.cxx @@ -1506,15 +1506,15 @@ SwEnhancedPDFExportHelper::~SwEnhancedPDFExportHelper() { } -Rectangle SwEnhancedPDFExportHelper::SwRectToPDFRect(const SwPageFrame* pCurrPage, - const Rectangle& rRectangle) const +tools::Rectangle SwEnhancedPDFExportHelper::SwRectToPDFRect(const SwPageFrame* pCurrPage, + const tools::Rectangle& rRectangle) const { SwPostItMode nPostItMode = mrPrintData.GetPrintPostIts(); if (nPostItMode != SwPostItMode::InMargins) return rRectangle; //the page has been scaled by 75% and vertically centered, so adjust these //rectangles equivalently - Rectangle aRect(rRectangle); + tools::Rectangle aRect(rRectangle); Size aRectSize(aRect.GetSize()); double fScale = 0.75; aRectSize.Width() = (aRectSize.Width() * fScale); @@ -1609,7 +1609,7 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport() aNote.Contents = pField->GetText(); // Link Export - Rectangle aRect(SwRectToPDFRect(pCurrPage, rNoteRect.SVRect())); + tools::Rectangle aRect(SwRectToPDFRect(pCurrPage, rNoteRect.SVRect())); pPDFExtOutDevData->CreateNote(aRect, aNote, aNotePageNum); } } @@ -1683,7 +1683,7 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport() // Destination Export if ( -1 != nDestPageNum ) { - Rectangle aRect(SwRectToPDFRect(pCurrPage, rDestRect.SVRect())); + tools::Rectangle aRect(SwRectToPDFRect(pCurrPage, rDestRect.SVRect())); nDestId = pPDFExtOutDevData->CreateDest(aRect, nDestPageNum); } } @@ -1707,7 +1707,7 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport() for (sal_Int32 aLinkPageNum : aLinkPageNums) { // Link Export - Rectangle aRect(SwRectToPDFRect(pSelectionPage, rLinkRect.SVRect())); + tools::Rectangle aRect(SwRectToPDFRect(pSelectionPage, rLinkRect.SVRect())); const sal_Int32 nLinkId = pPDFExtOutDevData->CreateLink(aRect, aLinkPageNum); @@ -1768,7 +1768,7 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport() // Destination Export if ( -1 != nDestPageNum ) { - Rectangle aRect(SwRectToPDFRect(pCurrPage, rDestRect.SVRect())); + tools::Rectangle aRect(SwRectToPDFRect(pCurrPage, rDestRect.SVRect())); nDestId = pPDFExtOutDevData->CreateDest(aRect, nDestPageNum); } } @@ -1784,7 +1784,7 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport() // Link Export for (sal_Int32 aLinkPageNum : aLinkPageNums) { - Rectangle aRect(SwRectToPDFRect(pCurrPage, aLinkRect.SVRect())); + tools::Rectangle aRect(SwRectToPDFRect(pCurrPage, aLinkRect.SVRect())); const sal_Int32 nLinkId = pPDFExtOutDevData->CreateLink(aRect, aLinkPageNum); @@ -1828,7 +1828,7 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport() if (!aMediaURL.isEmpty()) { const SwPageFrame* pCurrPage = mrSh.GetLayout()->GetPageAtPos(aSnapRect.Center()); - Rectangle aPDFRect(SwRectToPDFRect(pCurrPage, aSnapRect.SVRect())); + tools::Rectangle aPDFRect(SwRectToPDFRect(pCurrPage, aSnapRect.SVRect())); for (sal_Int32 nScreenPageNum : aScreenPageNums) { sal_Int32 nScreenId = pPDFExtOutDevData->CreateScreen(aPDFRect, nScreenPageNum); @@ -1894,7 +1894,7 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport() if ( -1 != nDestPageNum ) { // Destination Export - Rectangle aRect(SwRectToPDFRect(pCurrPage, rDestRect.SVRect())); + tools::Rectangle aRect(SwRectToPDFRect(pCurrPage, rDestRect.SVRect())); const sal_Int32 nDestId = pPDFExtOutDevData->CreateDest(aRect, nDestPageNum); // #i44368# Links in Header/Footer @@ -1994,7 +1994,7 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport() for (sal_Int32 aLinkPageNum : aLinkPageNums) { // Link Export - Rectangle aRect(SwRectToPDFRect(pCurrPage, aLinkRect.SVRect())); + tools::Rectangle aRect(SwRectToPDFRect(pCurrPage, aLinkRect.SVRect())); const sal_Int32 nLinkId = pPDFExtOutDevData->CreateLink(aRect, aLinkPageNum); @@ -2060,7 +2060,7 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport() if ( -1 != nDestPageNum ) { // Destination Export - Rectangle aRect(SwRectToPDFRect(pCurrPage, rDestRect.SVRect())); + tools::Rectangle aRect(SwRectToPDFRect(pCurrPage, rDestRect.SVRect())); const sal_Int32 nDestId = pPDFExtOutDevData->CreateDest(aRect, nDestPageNum); @@ -2109,7 +2109,7 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport() // Destination Export if ( -1 != nDestPageNum ) { - Rectangle aRect(SwRectToPDFRect(pCurrPage, rDestRect.SVRect())); + tools::Rectangle aRect(SwRectToPDFRect(pCurrPage, rDestRect.SVRect())); pPDFExtOutDevData->CreateNamedDest(sBkName, aRect, nDestPageNum); } } @@ -2145,7 +2145,7 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport() if ( -1 != nDestPageNum ) { - Rectangle aRect(SwRectToPDFRect(pCurrPage, rDestRect.SVRect())); + tools::Rectangle aRect(SwRectToPDFRect(pCurrPage, rDestRect.SVRect())); if ( aIBeg->nLinkId != -1 ) { // Destination Export @@ -2272,7 +2272,7 @@ void SwEnhancedPDFExportHelper::MakeHeaderFooterLinks( vcl::PDFExtOutDevData& rP for (sal_Int32 aHFLinkPageNum : aHFLinkPageNums) { // Link Export - Rectangle aRect(SwRectToPDFRect(pPageFrame, aHFLinkRect.SVRect())); + tools::Rectangle aRect(SwRectToPDFRect(pPageFrame, aHFLinkRect.SVRect())); const sal_Int32 nHFLinkId = rPDFExtOutDevData.CreateLink(aRect, aHFLinkPageNum); diff --git a/sw/source/core/text/blink.cxx b/sw/source/core/text/blink.cxx index 5602fd1024de..fc492ae5723a 100644 --- a/sw/source/core/text/blink.cxx +++ b/sw/source/core/text/blink.cxx @@ -102,7 +102,7 @@ IMPL_LINK_NOARG(SwBlink, Blinker, Timer *, void) nHeight = pTmp->GetPortion()->SvLSize().Height(); } - Rectangle aRefresh( aPos, Size( nWidth, nHeight ) ); + tools::Rectangle aRefresh( aPos, Size( nWidth, nHeight ) ); aRefresh.Right() += ( aRefresh.Bottom()- aRefresh.Top() ) / 8; pTmp->GetRootFrame() ->GetCurrShell()->InvalidateWindows( aRefresh ); diff --git a/sw/source/core/text/inftxt.cxx b/sw/source/core/text/inftxt.cxx index 2f4a79fa1afa..5240a44001d2 100644 --- a/sw/source/core/text/inftxt.cxx +++ b/sw/source/core/text/inftxt.cxx @@ -1046,7 +1046,7 @@ void SwTextPaintInfo::DrawPostIts( const SwLinePortion&, bool bScript ) const if ( GetTextFrame()->IsVertical() ) GetTextFrame()->SwitchHorizontalToVertical( aTmpRect ); - const Rectangle aRect( aTmpRect.SVRect() ); + const tools::Rectangle aRect( aTmpRect.SVRect() ); SwViewOption::PaintPostIts( const_cast<OutputDevice*>(GetOut()), aRect, bScript ); } } @@ -1068,7 +1068,7 @@ void SwTextPaintInfo::DrawCheckBox(const SwFieldFormCheckboxPortion &rPor, bool pOut->Pop(); } const int delta=10; - Rectangle r(aIntersect.Left()+delta, aIntersect.Top()+delta, aIntersect.Right()-delta, aIntersect.Bottom()-delta); + tools::Rectangle r(aIntersect.Left()+delta, aIntersect.Top()+delta, aIntersect.Right()-delta, aIntersect.Bottom()-delta); m_pOut->Push( PushFlags::LINECOLOR | PushFlags::FILLCOLOR ); m_pOut->SetLineColor( Color(0, 0, 0)); m_pOut->SetFillColor(); diff --git a/sw/source/core/text/noteurl.cxx b/sw/source/core/text/noteurl.cxx index 1de13e292764..a8c723cdd742 100644 --- a/sw/source/core/text/noteurl.cxx +++ b/sw/source/core/text/noteurl.cxx @@ -51,7 +51,7 @@ void SwNoteURL::FillImageMap( ImageMap *pMap, const Point &rPos, const SwURLNote &rNote = m_List[i]; SwRect aSwRect( rNote.GetRect() ); aSwRect -= rPos; - Rectangle aRect( OutputDevice::LogicToLogic( aSwRect.SVRect(), + tools::Rectangle aRect( OutputDevice::LogicToLogic( aSwRect.SVRect(), rMap, aMap ) ); IMapRectangleObject aObj( aRect, rNote.GetURL(), OUString(), OUString(), rNote.GetTarget(), OUString(), true, false ); diff --git a/sw/source/core/text/porfly.cxx b/sw/source/core/text/porfly.cxx index b24fe59e84a3..bc88313a1033 100644 --- a/sw/source/core/text/porfly.cxx +++ b/sw/source/core/text/porfly.cxx @@ -354,7 +354,7 @@ void SwFlyCntPortion::SetBase( const SwTextFrame& rFrame, const Point &rBase, { // It has, so look up its text rectangle, and adjust the position // of the textbox accordingly. - Rectangle aTextRectangle = SwTextBoxHelper::getTextRectangle(pShape); + tools::Rectangle aTextRectangle = SwTextBoxHelper::getTextRectangle(pShape); SwFormatHoriOrient aHori(pTextBox->GetHoriOrient()); aHori.SetHoriOrient(css::text::HoriOrientation::NONE); diff --git a/sw/source/core/text/txtdrop.cxx b/sw/source/core/text/txtdrop.cxx index 2410f6c9572e..23f2d7534b71 100644 --- a/sw/source/core/text/txtdrop.cxx +++ b/sw/source/core/text/txtdrop.cxx @@ -753,7 +753,7 @@ void SwDropCapCache::CalcFontSize( SwDropPortion* pDrop, SwTextFormatInfo &rInf // reset pCurrPart to first part pCurrPart = pDrop->GetPart(); bool bFirstGlyphRect = true; - Rectangle aCommonRect, aRect; + tools::Rectangle aCommonRect, aRect; while ( pCurrPart ) { @@ -802,7 +802,7 @@ void SwDropCapCache::CalcFontSize( SwDropPortion* pDrop, SwTextFormatInfo &rInf { // We do not have a window or our window could not // give us glyph boundaries. - aRect = Rectangle( Point( 0, 0 ), Size( 0, nAscent ) ); + aRect = tools::Rectangle( Point( 0, 0 ), Size( 0, nAscent ) ); } } diff --git a/sw/source/core/text/txtpaint.cxx b/sw/source/core/text/txtpaint.cxx index dc34ca0d1fd3..f503b4121699 100644 --- a/sw/source/core/text/txtpaint.cxx +++ b/sw/source/core/text/txtpaint.cxx @@ -69,7 +69,7 @@ void SwSaveClip::ChgClip_( const SwRect &rRect, const SwTextFrame* pFrame, pOut->SetClipRegion(); else { - Rectangle aRect( rRect.SVRect() ); + tools::Rectangle aRect( rRect.SVRect() ); // Having underscores in our line, we enlarged the repaint area // (see frmform.cxx) because for some fonts it could be too small. diff --git a/sw/source/core/text/txtpaint.hxx b/sw/source/core/text/txtpaint.hxx index 5408517e6d94..7959dfa834a0 100644 --- a/sw/source/core/text/txtpaint.hxx +++ b/sw/source/core/text/txtpaint.hxx @@ -70,7 +70,7 @@ public: class DbgRect : public SwDbgOut { public: - DbgRect( OutputDevice* pOut, const Rectangle &rRect, + DbgRect( OutputDevice* pOut, const tools::Rectangle &rRect, const bool bOn = true, ColorData eColor = COL_LIGHTBLUE ); }; @@ -97,7 +97,7 @@ inline DbgBackColor::~DbgBackColor() } } -inline DbgRect::DbgRect( OutputDevice* pOutDev, const Rectangle &rRect, +inline DbgRect::DbgRect( OutputDevice* pOutDev, const tools::Rectangle &rRect, const bool bOn, ColorData eColor ) : SwDbgOut( pOutDev, bOn ) diff --git a/sw/source/core/unocore/unodraw.cxx b/sw/source/core/unocore/unodraw.cxx index b8cbd98c160a..84122febaf3f 100644 --- a/sw/source/core/unocore/unodraw.cxx +++ b/sw/source/core/unocore/unodraw.cxx @@ -2219,8 +2219,8 @@ awt::Point SAL_CALL SwXShape::getPosition() // to the determined attribute position // #i34750#: // consider the layout direction - const Rectangle aMemberObjRect = GetSvxShape()->GetSdrObject()->GetSnapRect(); - const Rectangle aGroupObjRect = pTopGroupObj->GetSnapRect(); + const tools::Rectangle aMemberObjRect = GetSvxShape()->GetSdrObject()->GetSnapRect(); + const tools::Rectangle aGroupObjRect = pTopGroupObj->GetSnapRect(); // #i53320# - relative position of group member and // top group object is always given in horizontal left-to-right layout. awt::Point aOffset( 0, 0 ); @@ -2400,7 +2400,7 @@ awt::Point SwXShape::GetAttrPosition() pObj->GetAnchorPos().Y() == 0 && aAttrPos.X == 0 && aAttrPos.Y == 0 ) { - const Rectangle aObjRect = pObj->GetSnapRect(); + const tools::Rectangle aObjRect = pObj->GetSnapRect(); aAttrPos.X = convertTwipToMm100(aObjRect.Left()); aAttrPos.Y = convertTwipToMm100(aObjRect.Top()); } diff --git a/sw/source/core/view/pagepreviewlayout.cxx b/sw/source/core/view/pagepreviewlayout.cxx index 47c19d92e736..fc023046a74b 100644 --- a/sw/source/core/view/pagepreviewlayout.cxx +++ b/sw/source/core/view/pagepreviewlayout.cxx @@ -286,7 +286,7 @@ bool SwPagePreviewLayout::Prepare( const sal_uInt16 _nProposedStartPageNum, const Point& rProposedStartPos, const Size& _rPxWinSize, sal_uInt16& _onStartPageNum, - Rectangle& _orDocPreviewPaintRect, + tools::Rectangle& _orDocPreviewPaintRect, const bool _bStartWithPageAtFirstCol ) { @@ -694,7 +694,7 @@ bool SwPagePreviewLayout::CalcPreviewDataForPage( const SwPageFrame& _rPage, */ bool SwPagePreviewLayout::SetBookPreviewMode( const bool _bEnableBookPreview, sal_uInt16& _onStartPageNum, - Rectangle& _orDocPreviewPaintRect ) + tools::Rectangle& _orDocPreviewPaintRect ) { if ( mbBookPreview != _bEnableBookPreview) { @@ -893,7 +893,7 @@ struct PreviewPosInsidePagePred { if ( _pPreviewPage->bVisible ) { - Rectangle aPreviewPageRect( _pPreviewPage->aPreviewWinPos, _pPreviewPage->aPageSize ); + tools::Rectangle aPreviewPageRect( _pPreviewPage->aPreviewWinPos, _pPreviewPage->aPageSize ); return aPreviewPageRect.IsInside( mnPreviewPos ); } return false; @@ -999,7 +999,7 @@ public: /** paint prepared preview */ -bool SwPagePreviewLayout::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rOutRect) const +bool SwPagePreviewLayout::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rOutRect) const { PreviewRenderContextGuard aGuard(mrParentViewShell, &rRenderContext); // check environment and parameters @@ -1057,7 +1057,7 @@ bool SwPagePreviewLayout::Paint(vcl::RenderContext& rRenderContext, const Rectan } // prepare data for paint of pages - const Rectangle aPxOutRect( pOutputDev->LogicToPixel(rOutRect) ); + const tools::Rectangle aPxOutRect( pOutputDev->LogicToPixel(rOutRect) ); MapMode aMapMode( pOutputDev->GetMapMode() ); MapMode aSavedMapMode = aMapMode; @@ -1071,10 +1071,10 @@ bool SwPagePreviewLayout::Paint(vcl::RenderContext& rRenderContext, const Rectan if ( !(*aPageIter)->bVisible ) continue; - Rectangle aPageRect( (*aPageIter)->aLogicPos, (*aPageIter)->aPageSize ); + tools::Rectangle aPageRect( (*aPageIter)->aLogicPos, (*aPageIter)->aPageSize ); aMapMode.SetOrigin( (*aPageIter)->aMapOffset ); pOutputDev->SetMapMode( aMapMode ); - Rectangle aPxPaintRect = pOutputDev->LogicToPixel( aPageRect ); + tools::Rectangle aPxPaintRect = pOutputDev->LogicToPixel( aPageRect ); if ( aPxOutRect.IsOver( aPxPaintRect) ) { const SwPageFrame* pPage = (*aPageIter)->pPage; @@ -1112,7 +1112,7 @@ bool SwPagePreviewLayout::Paint(vcl::RenderContext& rRenderContext, const Rectan mrParentViewShell.maVisArea = aPageRect; aPxPaintRect.Intersection( aPxOutRect ); - Rectangle aPaintRect = pOutputDev->PixelToLogic( aPxPaintRect ); + tools::Rectangle aPaintRect = pOutputDev->PixelToLogic( aPxPaintRect ); mrParentViewShell.Paint(rRenderContext, aPaintRect); // --> OD 2007-08-15 #i80691# @@ -1168,7 +1168,7 @@ bool SwPagePreviewLayout::Paint(vcl::RenderContext& rRenderContext, const Rectan OD 18.12.2002 #103492# */ -void SwPagePreviewLayout::Repaint( const Rectangle& rInvalidCoreRect ) const +void SwPagePreviewLayout::Repaint( const tools::Rectangle& rInvalidCoreRect ) const { // check environment and parameters { @@ -1200,11 +1200,11 @@ void SwPagePreviewLayout::Repaint( const Rectangle& rInvalidCoreRect ) const if ( !(*aPageIter)->bVisible ) continue; - Rectangle aPageRect( (*aPageIter)->aLogicPos, (*aPageIter)->aPageSize ); + tools::Rectangle aPageRect( (*aPageIter)->aLogicPos, (*aPageIter)->aPageSize ); if ( rInvalidCoreRect.IsOver( aPageRect ) ) { aPageRect.Intersection(rInvalidCoreRect); - Rectangle aInvalidPreviewRect = aPageRect; + tools::Rectangle aInvalidPreviewRect = aPageRect; aInvalidPreviewRect.SetPos( aInvalidPreviewRect.TopLeft() - (*aPageIter)->aLogicPos + (*aPageIter)->aPreviewWinPos ); @@ -1245,18 +1245,18 @@ void SwPagePreviewLayout::PaintSelectMarkAtPage(vcl::RenderContext& rRenderConte // OD 19.02.2003 #107369# - use aligned page rectangle, as it is used for // page border and shadow paint - see <SwPageFrame::PaintBorderAndShadow(..)> ::SwAlignRect( aPageRect, &mrParentViewShell, pOutputDev ); - Rectangle aPxPageRect = pOutputDev->LogicToPixel( aPageRect.SVRect() ); + tools::Rectangle aPxPageRect = pOutputDev->LogicToPixel( aPageRect.SVRect() ); // draw two rectangle // OD 19.02.2003 #107369# - adjust position of select mark rectangle - Rectangle aRect( aPxPageRect.Left(), aPxPageRect.Top(), + tools::Rectangle aRect( aPxPageRect.Left(), aPxPageRect.Top(), aPxPageRect.Right(), aPxPageRect.Bottom() ); aRect = pOutputDev->PixelToLogic( aRect ); pOutputDev->SetFillColor(); // OD 20.02.2003 #107369# - no fill color pOutputDev->SetLineColor( aSelPgLineColor ); pOutputDev->DrawRect( aRect ); // OD 19.02.2003 #107369# - adjust position of select mark rectangle - aRect = Rectangle( aPxPageRect.Left()+1, aPxPageRect.Top()+1, + aRect = tools::Rectangle( aPxPageRect.Left()+1, aPxPageRect.Top()+1, aPxPageRect.Right()-1, aPxPageRect.Bottom()-1 ); aRect = pOutputDev->PixelToLogic( aRect ); pOutputDev->DrawRect( aRect ); @@ -1291,21 +1291,21 @@ void SwPagePreviewLayout::MarkNewSelectedPage( const sal_uInt16 _nSelectedPage ) SwRect aPageRect( pOldSelectedPreviewPage->aPreviewWinPos, pOldSelectedPreviewPage->aPageSize ); ::SwAlignRect( aPageRect, &mrParentViewShell, pOutputDev ); - Rectangle aPxPageRect = pOutputDev->LogicToPixel( aPageRect.SVRect() ); + tools::Rectangle aPxPageRect = pOutputDev->LogicToPixel( aPageRect.SVRect() ); // invalidate top mark line - Rectangle aInvalPxRect( aPxPageRect.Left(), aPxPageRect.Top(), + tools::Rectangle aInvalPxRect( aPxPageRect.Left(), aPxPageRect.Top(), aPxPageRect.Right(), aPxPageRect.Top()+1 ); mrParentViewShell.GetWin()->Invalidate( pOutputDev->PixelToLogic( aInvalPxRect ) ); // invalidate right mark line - aInvalPxRect = Rectangle( aPxPageRect.Right()-1, aPxPageRect.Top(), + aInvalPxRect = tools::Rectangle( aPxPageRect.Right()-1, aPxPageRect.Top(), aPxPageRect.Right(), aPxPageRect.Bottom() ); mrParentViewShell.GetWin()->Invalidate( pOutputDev->PixelToLogic( aInvalPxRect ) ); // invalidate bottom mark line - aInvalPxRect = Rectangle( aPxPageRect.Left(), aPxPageRect.Bottom()-1, + aInvalPxRect = tools::Rectangle( aPxPageRect.Left(), aPxPageRect.Bottom()-1, aPxPageRect.Right(), aPxPageRect.Bottom() ); mrParentViewShell.GetWin()->Invalidate( pOutputDev->PixelToLogic( aInvalPxRect ) ); // invalidate left mark line - aInvalPxRect = Rectangle( aPxPageRect.Left(), aPxPageRect.Top(), + aInvalPxRect = tools::Rectangle( aPxPageRect.Left(), aPxPageRect.Top(), aPxPageRect.Left()+1, aPxPageRect.Bottom() ); mrParentViewShell.GetWin()->Invalidate( pOutputDev->PixelToLogic( aInvalPxRect ) ); } diff --git a/sw/source/core/view/vdraw.cxx b/sw/source/core/view/vdraw.cxx index ddd003c75465..8ef6860d25ff 100644 --- a/sw/source/core/view/vdraw.cxx +++ b/sw/source/core/view/vdraw.cxx @@ -198,8 +198,8 @@ void SwViewShellImp::NotifySizeChg( const Size &rNewSz ) GetPageView()->GetPage()->SetSize( rNewSz ); // Limitation of the work area - const Rectangle aDocRect( Point( DOCUMENTBORDER, DOCUMENTBORDER ), rNewSz ); - const Rectangle &rOldWork = GetDrawView()->GetWorkArea(); + const tools::Rectangle aDocRect( Point( DOCUMENTBORDER, DOCUMENTBORDER ), rNewSz ); + const tools::Rectangle &rOldWork = GetDrawView()->GetWorkArea(); bool bCheckDrawObjs = false; if ( aDocRect != rOldWork ) { @@ -251,7 +251,7 @@ void SwViewShellImp::NotifySizeChg( const Size &rNewSz ) continue; } - const Rectangle aObjBound( pObj->GetCurrentBoundRect() ); + const tools::Rectangle aObjBound( pObj->GetCurrentBoundRect() ); if ( !aDocRect.IsInside( aObjBound ) ) { Size aSz; diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx index d25ac93e2d3d..95dde86e2a7e 100644 --- a/sw/source/core/view/viewsh.cxx +++ b/sw/source/core/view/viewsh.cxx @@ -139,7 +139,7 @@ lcl_PaintTransparentFormControls(SwViewShell & rShell, SwRect const& rRect) if (rShell.GetWin()) { vcl::Window& rWindow = *(rShell.GetWin()); - const Rectangle aRectanglePixel(rShell.GetOut()->LogicToPixel(rRect.SVRect())); + const tools::Rectangle aRectanglePixel(rShell.GetOut()->LogicToPixel(rRect.SVRect())); PaintTransparentChildren(rWindow, aRectanglePixel); } } @@ -342,9 +342,9 @@ void SwViewShell::ImplEndAction( const bool bIdleEnd ) bool bSizeOK = true; - Rectangle aTmp1( aRect.SVRect() ); + tools::Rectangle aTmp1( aRect.SVRect() ); aTmp1 = GetOut()->LogicToPixel( aTmp1 ); - Rectangle aTmp2( GetOut()->PixelToLogic( aTmp1 ) ); + tools::Rectangle aTmp2( GetOut()->PixelToLogic( aTmp1 ) ); if ( aTmp2.Left() > aRect.Left() ) aTmp1.Left() = std::max( 0L, aTmp1.Left() - 1L ); if ( aTmp2.Top() > aRect.Top() ) @@ -1135,7 +1135,7 @@ void SwViewShell::VisPortChgd( const SwRect &rRect) // ignore objects that are not actually placed on the page if (pObj->IsFormatPossible()) { - const Rectangle &rBound = pObj->GetObjRect().SVRect(); + const tools::Rectangle &rBound = pObj->GetObjRect().SVRect(); if (rBound.Left() != FAR_AWAY) { // OD 03.03.2003 #107927# - use correct datatype const SwTwips nL = std::max( 0L, rBound.Left() - nOfst ); @@ -1150,7 +1150,7 @@ void SwViewShell::VisPortChgd( const SwRect &rRect) } pPage = static_cast<const SwPageFrame*>(pPage->GetNext()); } - Rectangle aRect( aPrevArea.SVRect() ); + tools::Rectangle aRect( aPrevArea.SVRect() ); aRect.Left() = nMinLeft; aRect.Right() = nMaxRight; if( VisArea().IsOver( aPrevArea ) && !mnLockPaint ) @@ -1211,7 +1211,7 @@ void SwViewShell::VisPortChgd( const SwRect &rRect) Imp()->UpdateAccessible(); } -bool SwViewShell::SmoothScroll( long lXDiff, long lYDiff, const Rectangle *pRect ) +bool SwViewShell::SmoothScroll( long lXDiff, long lYDiff, const tools::Rectangle *pRect ) { #if !defined(MACOSX) && !defined(ANDROID) && !defined(IOS) // #i98766# - disable smooth scrolling for Mac @@ -1354,7 +1354,7 @@ bool SwViewShell::SmoothScroll( long lXDiff, long lYDiff, const Rectangle *pRect lScroll = aTmpOldVis.Top() - VisArea().Top(); if ( pRect ) { - Rectangle aTmp( aTmpOldVis.SVRect() ); + tools::Rectangle aTmp( aTmpOldVis.SVRect() ); aTmp.Left() = pRect->Left(); aTmp.Right()= pRect->Right(); GetWin()->Scroll( 0, lScroll, aTmp, ScrollFlags::Children); @@ -1392,12 +1392,12 @@ bool SwViewShell::SmoothScroll( long lXDiff, long lYDiff, const Rectangle *pRect if(!Imp()->m_bStopSmooth) { // start paint on logic base - const Rectangle aTargetLogic(Imp()->m_aSmoothRect.SVRect()); + const tools::Rectangle aTargetLogic(Imp()->m_aSmoothRect.SVRect()); DLPrePaint2(vcl::Region(aTargetLogic)); // get target rectangle in discrete pixels OutputDevice& rTargetDevice = mpTargetPaintWindow->GetTargetOutputDevice(); - const Rectangle aTargetPixel(rTargetDevice.LogicToPixel(aTargetLogic)); + const tools::Rectangle aTargetPixel(rTargetDevice.LogicToPixel(aTargetLogic)); // get source top-left in discrete pixels const Point aSourceTopLeft(pVout->LogicToPixel(aTargetLogic.TopLeft())); @@ -1534,7 +1534,7 @@ void SwViewShell::PaintDesktop_(vcl::RenderContext& /*rRenderContext*/, const Sw for ( auto &rRgn : rRegion ) { - const Rectangle aRectangle(rRgn.SVRect()); + const tools::Rectangle aRectangle(rRgn.SVRect()); // #i93170# // Here we have a real Problem. On the one hand we have the buffering for paint @@ -1720,7 +1720,7 @@ public: }; } -void SwViewShell::Paint(vcl::RenderContext& rRenderContext, const Rectangle &rRect) +void SwViewShell::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle &rRect) { RenderContextGuard aGuard(mpOut, &rRenderContext, this); if ( mnLockPaint ) @@ -1890,7 +1890,7 @@ void SwViewShell::PaintTile(VirtualDevice &rDevice, int contextWidth, int contex GetWin()->EnableMapMode(false); } - Rectangle aOutRect = Rectangle(Point(tilePosX, tilePosY), + tools::Rectangle aOutRect = tools::Rectangle(Point(tilePosX, tilePosY), rDevice.PixelToLogic(Size(contextWidth, contextHeight))); // Make the requested area visible -- we can't use MakeVisible as that will diff --git a/sw/source/core/view/vprint.cxx b/sw/source/core/view/vprint.cxx index b9f516251d1f..21ab2083f50c 100644 --- a/sw/source/core/view/vprint.cxx +++ b/sw/source/core/view/vprint.cxx @@ -580,7 +580,7 @@ bool SwViewShell::PrintOrPDFExport( } void SwViewShell::PrtOle2( SwDoc *pDoc, const SwViewOption *pOpt, const SwPrintData& rOptions, - vcl::RenderContext& rRenderContext, const Rectangle& rRect ) + vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect ) { // For printing a shell is needed. Either the Doc already has one, than we // create a new view, or it has none, than we create the first view. diff --git a/sw/source/filter/html/htmldrawreader.cxx b/sw/source/filter/html/htmldrawreader.cxx index c383adea2bef..dfbd0172b9e1 100644 --- a/sw/source/filter/html/htmldrawreader.cxx +++ b/sw/source/filter/html/htmldrawreader.cxx @@ -513,7 +513,7 @@ void SwHTMLParser::NewMarquee( HTMLTable *pCurTable ) if( aTwipSz.Width() < MINFLY ) aTwipSz.Width() = MINFLY; - m_pMarquee->SetLogicRect( Rectangle( 0, 0, aTwipSz.Width(), aTwipSz.Height() ) ); + m_pMarquee->SetLogicRect( tools::Rectangle( 0, 0, aTwipSz.Width(), aTwipSz.Height() ) ); // und das Objekt in das Dok einfuegen InsertDrawObject( m_pMarquee, aSpace, eVertOri, eHoriOri, aStyleItemSet, @@ -538,8 +538,8 @@ void SwHTMLParser::EndMarquee() { // Da es keine fixe Hoehe gibt, das Text-Objekt erstmal breiter // als den Text machen, damit nicht umgebrochen wird. - const Rectangle& rOldRect = m_pMarquee->GetLogicRect(); - m_pMarquee->SetLogicRect( Rectangle( rOldRect.TopLeft(), + const tools::Rectangle& rOldRect = m_pMarquee->GetLogicRect(); + m_pMarquee->SetLogicRect( tools::Rectangle( rOldRect.TopLeft(), Size( USHRT_MAX, 240 ) ) ); } @@ -575,9 +575,9 @@ void SwHTMLParser::ResizeDrawObject( SdrObject* pObj, SwTwips nWidth ) return; // die alte Groesse - const Rectangle& rOldRect = pObj->GetLogicRect(); + const tools::Rectangle& rOldRect = pObj->GetLogicRect(); Size aNewSz( nWidth, rOldRect.GetSize().Height() ); - pObj->SetLogicRect( Rectangle( rOldRect.TopLeft(), aNewSz ) ); + pObj->SetLogicRect( tools::Rectangle( rOldRect.TopLeft(), aNewSz ) ); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/filter/ww8/escher.hxx b/sw/source/filter/ww8/escher.hxx index 873486be7a29..8d008133835c 100644 --- a/sw/source/filter/ww8/escher.hxx +++ b/sw/source/filter/ww8/escher.hxx @@ -168,7 +168,7 @@ public: virtual void WriteFrameExtraData(const SwFrameFormat& rFormat) override; - EscherExHostAppData* StartShape(const css::uno::Reference< css::drawing::XShape > &, const Rectangle*) override {return &aHostData;} + EscherExHostAppData* StartShape(const css::uno::Reference< css::drawing::XShape > &, const tools::Rectangle*) override {return &aHostData;} private: SwEscherEx(const SwEscherEx&) = delete; SwEscherEx &operator=(const SwEscherEx&) = delete; diff --git a/sw/source/filter/ww8/rtfsdrexport.cxx b/sw/source/filter/ww8/rtfsdrexport.cxx index d76a1f63a3fe..2719453f4080 100644 --- a/sw/source/filter/ww8/rtfsdrexport.cxx +++ b/sw/source/filter/ww8/rtfsdrexport.cxx @@ -81,7 +81,7 @@ void RtfSdrExport::CloseContainer() EscherEx::CloseContainer(); } -sal_uInt32 RtfSdrExport::EnterGroup(const OUString& /*rShapeName*/, const Rectangle* /*pRect*/) +sal_uInt32 RtfSdrExport::EnterGroup(const OUString& /*rShapeName*/, const tools::Rectangle* /*pRect*/) { return GenerateShapeId(); } @@ -129,7 +129,7 @@ inline sal_Int32 impl_GetPointComponent(const sal_uInt8*& pVal, std::size_t& rVe return nRet; } -void RtfSdrExport::Commit(EscherPropertyContainer& rProps, const Rectangle& rRect) +void RtfSdrExport::Commit(EscherPropertyContainer& rProps, const tools::Rectangle& rRect) { if (m_nShapeType == ESCHER_ShpInst_Nil) return; @@ -399,7 +399,7 @@ void RtfSdrExport::Commit(EscherPropertyContainer& rProps, const Rectangle& rRec } } -void RtfSdrExport::AddLineDimensions(const Rectangle& rRectangle) +void RtfSdrExport::AddLineDimensions(const tools::Rectangle& rRectangle) { // We get the position relative to (the current?) character m_aShapeProps.insert(std::pair<OString,OString>("posrelh", "3")); @@ -425,7 +425,7 @@ void RtfSdrExport::AddLineDimensions(const Rectangle& rRectangle) m_aShapeStyle.append(OOO_STRING_SVTOOLS_RTF_SHPBOTTOM).append(rRectangle.Bottom()); } -void RtfSdrExport::AddRectangleDimensions(OStringBuffer& rBuffer, const Rectangle& rRectangle) +void RtfSdrExport::AddRectangleDimensions(OStringBuffer& rBuffer, const tools::Rectangle& rRectangle) { // We get the position relative to (the current?) character m_aShapeProps.insert(std::pair<OString,OString>("posrelh", "3")); diff --git a/sw/source/filter/ww8/rtfsdrexport.hxx b/sw/source/filter/ww8/rtfsdrexport.hxx index a6cb56ef2f07..0f060d1dafff 100644 --- a/sw/source/filter/ww8/rtfsdrexport.hxx +++ b/sw/source/filter/ww8/rtfsdrexport.hxx @@ -83,24 +83,24 @@ protected: using EscherEx::EndShape; void EndShape(sal_Int32 nShapeElement); - virtual void Commit(EscherPropertyContainer& rProps, const Rectangle& rRect) override; + virtual void Commit(EscherPropertyContainer& rProps, const tools::Rectangle& rRect) override; private: virtual void OpenContainer(sal_uInt16 nEscherContainer, int nRecInstance = 0) override; virtual void CloseContainer() override; - virtual sal_uInt32 EnterGroup(const OUString& rShapeName, const Rectangle* pBoundRect) override; + virtual sal_uInt32 EnterGroup(const OUString& rShapeName, const tools::Rectangle* pBoundRect) override; virtual void LeaveGroup() override; virtual void AddShape(sal_uInt32 nShapeType, sal_uInt32 nShapeFlags, sal_uInt32 nShapeId = 0) override; private: /// Add starting and ending point of a line to the m_pShapeAttrList. - void AddLineDimensions(const Rectangle& rRectangle); + void AddLineDimensions(const tools::Rectangle& rRectangle); /// Add position and size to the OStringBuffer. - void AddRectangleDimensions(OStringBuffer& rBuffer, const Rectangle& rRectangle); + void AddRectangleDimensions(OStringBuffer& rBuffer, const tools::Rectangle& rRectangle); /// Exports the pib property of the shape void impl_writeGraphic(); diff --git a/sw/source/filter/ww8/writerhelper.cxx b/sw/source/filter/ww8/writerhelper.cxx index 9aeecca7caf0..eb0bc7cc3b52 100644 --- a/sw/source/filter/ww8/writerhelper.cxx +++ b/sw/source/filter/ww8/writerhelper.cxx @@ -215,7 +215,7 @@ namespace ww8 // #i43447# - determine layout size { SwRect aLayRect( rFormat.FindLayoutRect() ); - Rectangle aRect( aLayRect.SVRect() ); + tools::Rectangle aRect( aLayRect.SVRect() ); // The Object is not rendered (e.g. something in unused // header/footer) - thus, get the values from the format. if ( aLayRect.IsEmpty() ) diff --git a/sw/source/filter/ww8/wrtw8esh.cxx b/sw/source/filter/ww8/wrtw8esh.cxx index c96d61d4961a..2a9d581f5e32 100644 --- a/sw/source/filter/ww8/wrtw8esh.cxx +++ b/sw/source/filter/ww8/wrtw8esh.cxx @@ -722,7 +722,7 @@ void PlcDrawObj::WritePlc( WW8Export& rWrt ) const const SwFrameFormat &rFormat = rFrameFormat.GetFrameFormat(); const SdrObject* pObj = rFormat.FindRealSdrObject(); - Rectangle aRect; + tools::Rectangle aRect; SwFormatVertOrient rVOr = rFormat.GetVertOrient(); SwFormatHoriOrient rHOr = rFormat.GetHoriOrient(); // #i30669# - convert the positioning attributes. @@ -1629,7 +1629,7 @@ void SwBasicEscherEx::WriteGrfBullet(const Graphic& rGrf) aSize = OutputDevice::LogicToLogic( aSize,rGrf.GetPrefMapMode(), aMap100mm ); } Point aEmptyPoint; - Rectangle aRect( aEmptyPoint, aSize ); + tools::Rectangle aRect( aEmptyPoint, aSize ); sal_uInt32 nBlibId = mxGlobal->GetBlibID( *(mxGlobal->QueryPictureStream()), aUniqueId,aRect ); if (nBlibId) aPropOpt.AddOpt(ESCHER_Prop_pib, nBlibId, true); @@ -1717,7 +1717,7 @@ sal_Int32 SwBasicEscherEx::WriteGrfFlyFrame(const SwFrameFormat& rFormat, sal_uI } Point aEmptyPoint; - Rectangle aRect( aEmptyPoint, aSize ); + tools::Rectangle aRect( aEmptyPoint, aSize ); sal_uInt32 nBlibId = mxGlobal->GetBlibID( *QueryPictureStream(), aUniqueId, aRect ); @@ -1943,7 +1943,7 @@ void SwBasicEscherEx::WriteBrushAttr(const SvxBrushItem &rBrush, } Point aEmptyPoint; - Rectangle aRect(aEmptyPoint, aSize); + tools::Rectangle aRect(aEmptyPoint, aSize); sal_uInt32 nBlibId = mxGlobal->GetBlibID( *QueryPictureStream(), aUniqueId, aRect); @@ -3012,7 +3012,7 @@ void SwBasicEscherEx::WriteOLEPicture(EscherPropertyContainer &rPropOpt, OString aId = aGraphicObject.GetUniqueID(); if (!aId.isEmpty()) { - Rectangle aRect = rObj.GetLogicRect(); + tools::Rectangle aRect = rObj.GetLogicRect(); aRect.SetPos(Point(0,0)); aRect.Right() = DrawModelToEmu(aRect.Right()); aRect.Bottom() = DrawModelToEmu(aRect.Bottom()); @@ -3144,7 +3144,7 @@ void SwMSConvertControls::ExportControl(WW8Export &rWW8Wrt, const SdrUnoObj& rFo //I think I painted myself into a little bit of a //corner by trying to use the uno interface for //controls export - Rectangle aRect = rFormObj.GetLogicRect(); + tools::Rectangle aRect = rFormObj.GetLogicRect(); aRect.SetPos(Point(0,0)); awt::Size aSize; aSize.Width = TWIPS_TO_MM(aRect.Right()); diff --git a/sw/source/filter/ww8/wrtww8gr.cxx b/sw/source/filter/ww8/wrtww8gr.cxx index 018bfa829d3b..7fdb12949f5a 100644 --- a/sw/source/filter/ww8/wrtww8gr.cxx +++ b/sw/source/filter/ww8/wrtww8gr.cxx @@ -131,11 +131,11 @@ bool WW8Export::TestOleNeedsGraphic(const SwAttrSet& rSet, // bGraphicNeeded set to true is right / fixes #i51670#. bGraphicNeeded = true; Point aTmpPoint; - Rectangle aRect( aTmpPoint, Size( nX, nY ) ); + tools::Rectangle aRect( aTmpPoint, Size( nX, nY ) ); Graphic aGraph(aWMF); ErrCode nErr = ERRCODE_NONE; - Rectangle aVisArea; + tools::Rectangle aVisArea; sal_Int64 nAspect = embed::Aspects::MSOLE_CONTENT; if ( pOLENd ) nAspect = pOLENd->GetAspect(); diff --git a/sw/source/filter/ww8/ww8graf.cxx b/sw/source/filter/ww8/ww8graf.cxx index bf10e860df31..29efc3460f2b 100644 --- a/sw/source/filter/ww8/ww8graf.cxx +++ b/sw/source/filter/ww8/ww8graf.cxx @@ -346,7 +346,7 @@ SdrObject* SwWW8ImplReader::ReadRect(WW8_DPHEAD* pHd, SfxAllItemSet &rSet) aP1.X() += (sal_Int16)SVBT16ToShort( pHd->dxa ); aP1.Y() += (sal_Int16)SVBT16ToShort( pHd->dya ); - SdrObject* pObj = new SdrRectObj( Rectangle( aP0, aP1 ) ); + SdrObject* pObj = new SdrRectObj( tools::Rectangle( aP0, aP1 ) ); SetStdAttr( rSet, aRect.aLnt, aRect.aShd ); SetFill( rSet, aRect.aFill ); @@ -367,7 +367,7 @@ SdrObject* SwWW8ImplReader::ReadElipse(WW8_DPHEAD* pHd, SfxAllItemSet &rSet) aP1.X() += (sal_Int16)SVBT16ToShort( pHd->dxa ); aP1.Y() += (sal_Int16)SVBT16ToShort( pHd->dya ); - SdrObject* pObj = new SdrCircObj( OBJ_CIRC, Rectangle( aP0, aP1 ) ); + SdrObject* pObj = new SdrCircObj( OBJ_CIRC, tools::Rectangle( aP0, aP1 ) ); SetStdAttr( rSet, aElipse.aLnt, aElipse.aShd ); SetFill( rSet, aElipse.aFill ); @@ -399,7 +399,7 @@ SdrObject* SwWW8ImplReader::ReadArc(WW8_DPHEAD* pHd, SfxAllItemSet &rSet) aP1.X() -= (sal_Int16)SVBT16ToShort( pHd->dxa ); } - SdrObject* pObj = new SdrCircObj( OBJ_SECT, Rectangle( aP0, aP1 ), + SdrObject* pObj = new SdrCircObj( OBJ_SECT, tools::Rectangle( aP0, aP1 ), nW * 9000, ( ( nW + 1 ) & 3 ) * 9000 ); SetStdAttr( rSet, aArc.aLnt, aArc.aShd ); @@ -1127,7 +1127,7 @@ void SwWW8ImplReader::InsertTxbxText(SdrTextObj* pTextObj, SfxItemSet aFlySet( m_rDoc.GetAttrPool(), RES_FRMATR_BEGIN, RES_FRMATR_END-1 ); - Rectangle aInnerDist( pRecord->nDxTextLeft, + tools::Rectangle aInnerDist( pRecord->nDxTextLeft, pRecord->nDyTextTop, pRecord->nDxTextRight, pRecord->nDyTextBottom ); @@ -1212,9 +1212,9 @@ SdrObject* SwWW8ImplReader::ReadTextBox(WW8_DPHEAD* pHd, SfxAllItemSet &rSet) aP1.X() += (sal_Int16)SVBT16ToShort( pHd->dxa ); aP1.Y() += (sal_Int16)SVBT16ToShort( pHd->dya ); - SdrObject* pObj = new SdrRectObj( OBJ_TEXT, Rectangle( aP0, aP1 ) ); + SdrObject* pObj = new SdrRectObj( OBJ_TEXT, tools::Rectangle( aP0, aP1 ) ); pObj->SetModel( m_pDrawModel ); - pObj->NbcSetSnapRect(Rectangle(aP0, aP1)); + pObj->NbcSetSnapRect(tools::Rectangle(aP0, aP1)); Size aSize( (sal_Int16)SVBT16ToShort( pHd->dxa ) , (sal_Int16)SVBT16ToShort( pHd->dya ) ); @@ -1274,9 +1274,9 @@ SdrObject* SwWW8ImplReader::ReadCaptionBox(WW8_DPHEAD* pHd, SfxAllItemSet &rSet) + m_nDrawYOfs2 + (sal_Int16)SVBT16ToShort( xP[1] ) ); xP.reset(); - SdrCaptionObj* pObj = new SdrCaptionObj( Rectangle( aP0, aP1 ), aP2 ); + SdrCaptionObj* pObj = new SdrCaptionObj( tools::Rectangle( aP0, aP1 ), aP2 ); pObj->SetModel( m_pDrawModel ); - pObj->NbcSetSnapRect(Rectangle(aP0, aP1)); + pObj->NbcSetSnapRect(tools::Rectangle(aP0, aP1)); Size aSize( (sal_Int16)SVBT16ToShort( aCallB.dpheadTxbx.dxa ), (sal_Int16)SVBT16ToShort( aCallB.dpheadTxbx.dya ) ); bool bEraseThisObject; @@ -1423,7 +1423,7 @@ void SwWW8ImplReader::ReadGrafLayer1( WW8PLCFspecial* pPF, long nGrafAnchorCp ) { m_pWWZOrder->InsertDrawingObject(pObject, SVBT16ToShort(aDo.dhgt)); - Rectangle aRect(pObject->GetSnapRect()); + tools::Rectangle aRect(pObject->GetSnapRect()); const sal_uInt32 nCntRelTo = 3; @@ -1611,7 +1611,7 @@ sal_Int32 SwWW8ImplReader::MatchSdrBoxIntoFlyBoxItem(const Color& rLineColor, void SwWW8ImplReader::MatchSdrItemsIntoFlySet( SdrObject* pSdrObj, SfxItemSet& rFlySet, MSO_LineStyle eLineStyle, MSO_LineDashing eDashing, MSO_SPT eShapeType, - Rectangle& rInnerDist ) + tools::Rectangle& rInnerDist ) { /* am Rahmen zu setzende Frame-Attribute @@ -1701,7 +1701,7 @@ void SwWW8ImplReader::MatchSdrItemsIntoFlySet( SdrObject* pSdrObj, // Size: SwFormatFrameSize if( SfxItemState::SET != rFlySet.GetItemState(RES_FRM_SIZE, false) ) { - const Rectangle& rSnapRect = pSdrObj->GetSnapRect(); + const tools::Rectangle& rSnapRect = pSdrObj->GetSnapRect(); // if necessary adapt width and position of the framework: The // recorded interior is to remain equally large despite thick edges. rFlySet.Put( SwFormatFrameSize(bFixSize ? ATT_FIX_SIZE : ATT_VAR_SIZE, @@ -2484,7 +2484,7 @@ SwFrameFormat* SwWW8ImplReader::Read_GrafLayer( long nGrafAnchorCp ) if (!m_pMSDffManager->GetModel()) m_pMSDffManager->SetModel(m_pDrawModel, 1440); - Rectangle aRect(pF->nXaLeft, pF->nYaTop, pF->nXaRight, pF->nYaBottom); + tools::Rectangle aRect(pF->nXaLeft, pF->nYaTop, pF->nXaRight, pF->nYaBottom); SvxMSDffImportData aData( aRect ); /* @@ -2873,7 +2873,7 @@ SwFlyFrameFormat* SwWW8ImplReader::ConvertDrawTextToFly(SdrObject* &rpObject, // More attributes can be used in a frame compared to the // Edit-Engine, and it can contain field, OLEs or graphics... - Rectangle aInnerDist(pRecord->nDxTextLeft, pRecord->nDyTextTop, + tools::Rectangle aInnerDist(pRecord->nDxTextLeft, pRecord->nDyTextTop, pRecord->nDxTextRight, pRecord->nDyTextBottom); SwFormatFrameSize aFrameSize(ATT_FIX_SIZE, pF->nXaRight - pF->nXaLeft, pF->nYaBottom - pF->nYaTop); @@ -3000,7 +3000,7 @@ SwFlyFrameFormat* SwWW8ImplReader::ImportReplaceableDrawables( SdrObject* &rpObj { // Note that the escher inner distance only seems to be honoured in // word for textboxes, not for graphics and ole objects. - Rectangle aInnerDist(0, 0, 0, 0); + tools::Rectangle aInnerDist(0, 0, 0, 0); MatchSdrItemsIntoFlySet(rpObject, rFlySet, pRecord->eLineStyle, pRecord->eLineDashing, pRecord->eShapeType, aInnerDist); diff --git a/sw/source/filter/ww8/ww8graf2.cxx b/sw/source/filter/ww8/ww8graf2.cxx index 3f02ec98927d..0c560bebe297 100644 --- a/sw/source/filter/ww8/ww8graf2.cxx +++ b/sw/source/filter/ww8/ww8graf2.cxx @@ -548,8 +548,8 @@ SwFrameFormat* SwWW8ImplReader::ImportGraf(SdrTextObj* pTextObj, m_pDataStream->SeekRel( nNameLen ); } - Rectangle aChildRect; - Rectangle aClientRect( 0,0, aPD.nWidth, aPD.nHeight); + tools::Rectangle aChildRect; + tools::Rectangle aClientRect( 0,0, aPD.nWidth, aPD.nHeight); SvxMSDffImportData aData( aClientRect ); pObject = m_pMSDffManager->ImportObj(*m_pDataStream, &aData, aClientRect, aChildRect ); if (pObject) @@ -583,7 +583,7 @@ SwFrameFormat* SwWW8ImplReader::ImportGraf(SdrTextObj* pTextObj, // object itself, no idea why it's this call (or even // what the call actually does), but that's what // ImportGraf() (called by ImportObj()) uses. - pObject->SetSnapRect( Rectangle( 0, 0, aPD.nWidth, aPD.nHeight )); + pObject->SetSnapRect( tools::Rectangle( 0, 0, aPD.nWidth, aPD.nHeight )); } // A graphic of this type in this location is always @@ -608,7 +608,7 @@ SwFrameFormat* SwWW8ImplReader::ImportGraf(SdrTextObj* pTextObj, } // Modified for i120716,for graf importing from MS Word 2003 // binary format, there is no border distance. - Rectangle aInnerDist(0,0,0,0); + tools::Rectangle aInnerDist(0,0,0,0); MatchSdrItemsIntoFlySet( pObject, aAttrSet, pRecord->eLineStyle, pRecord->eLineDashing, pRecord->eShapeType, aInnerDist ); diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index 908dcd0f7b71..108bf115eee5 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -558,8 +558,8 @@ sal_uInt32 SwMSDffManager::GetFilterFlags() // #i32596# - consider new parameter <_nCalledByGroup> SdrObject* SwMSDffManager::ImportOLE( sal_uInt32 nOLEId, const Graphic& rGrf, - const Rectangle& rBoundRect, - const Rectangle& rVisArea, + const tools::Rectangle& rBoundRect, + const tools::Rectangle& rVisArea, const int _nCalledByGroup, sal_Int64 nAspect ) const { @@ -639,7 +639,7 @@ void SwWW8ImplReader::SetToggleBiDiAttrFlags(sal_uInt16 nFlags) SdrObject* SwMSDffManager::ProcessObj(SvStream& rSt, DffObjData& rObjData, void* pData, - Rectangle& rTextRect, + tools::Rectangle& rTextRect, SdrObject* pObj ) { @@ -833,7 +833,7 @@ SdrObject* SwMSDffManager::ProcessObj(SvStream& rSt, // The vertical paragraph justification are contained within the // BoundRect so calculate it here - Rectangle aNewRect(rTextRect); + tools::Rectangle aNewRect(rTextRect); aNewRect.Bottom() -= nTextTop + nTextBottom; aNewRect.Right() -= nTextLeft + nTextRight; @@ -4309,7 +4309,7 @@ void wwSectionManager::SetSegmentToPageDesc(const wwSection &rSection, if (mrReader.m_pWDop->fUseBackGroundInAllmodes && mrReader.m_pMSDffManager) { - Rectangle aRect(0, 0, 100, 100); // A dummy, we don't care about the size + tools::Rectangle aRect(0, 0, 100, 100); // A dummy, we don't care about the size SvxMSDffImportData aData(aRect); SdrObject* pObject = nullptr; if (mrReader.m_pMSDffManager->GetShape(0x401, pObject, aData)) diff --git a/sw/source/filter/ww8/ww8par.hxx b/sw/source/filter/ww8/ww8par.hxx index 4ed2ce372cf6..1be7bc99c999 100644 --- a/sw/source/filter/ww8/ww8par.hxx +++ b/sw/source/filter/ww8/ww8par.hxx @@ -747,8 +747,8 @@ private: // indicates, if the OLE object is imported inside a group object virtual SdrObject* ImportOLE( sal_uInt32 nOLEId, const Graphic& rGrf, - const Rectangle& rBoundRect, - const Rectangle& rVisArea, + const tools::Rectangle& rBoundRect, + const tools::Rectangle& rVisArea, const int _nCalledByGroup, sal_Int64 nAspect ) const override; @@ -762,7 +762,7 @@ public: void DisableFallbackStream(); void EnableFallbackStream(); protected: - virtual SdrObject* ProcessObj( SvStream& rSt, DffObjData& rObjData, void* pData, Rectangle& rTextRect, SdrObject* pObj ) override; + virtual SdrObject* ProcessObj( SvStream& rSt, DffObjData& rObjData, void* pData, tools::Rectangle& rTextRect, SdrObject* pObj ) override; }; class wwSection @@ -1439,7 +1439,7 @@ private: // them for now static bool SetBorder(SvxBoxItem& rBox, const WW8_BRCVer9* pbrc, short *pSizeArray=nullptr, sal_uInt8 nSetBorders=0xFF); - static void GetBorderDistance(const WW8_BRCVer9* pbrc, Rectangle& rInnerDist); + static void GetBorderDistance(const WW8_BRCVer9* pbrc, tools::Rectangle& rInnerDist); static sal_uInt16 GetParagraphAutoSpace(bool fDontUseHTMLAutoSpacing); static bool SetShadow(SvxShadowItem& rShadow, const short *pSizeArray, const WW8_BRCVer9& aRightBrc); @@ -1452,7 +1452,7 @@ private: MSO_LineStyle eLineStyle, MSO_LineDashing eDashing, MSO_SPT eShapeType, sal_Int32 &rLineWidth, SvxBoxItem& rBox ); void MatchSdrItemsIntoFlySet( SdrObject* pSdrObj, SfxItemSet &aFlySet, - MSO_LineStyle eLineStyle, MSO_LineDashing eDashing, MSO_SPT eShapeType, Rectangle &rInnerDist ); + MSO_LineStyle eLineStyle, MSO_LineDashing eDashing, MSO_SPT eShapeType, tools::Rectangle &rInnerDist ); static void AdjustLRWrapForWordMargins(const SvxMSDffImportRec &rRecord, SvxLRSpaceItem &rLR); static void AdjustULWrapForWordMargins(const SvxMSDffImportRec &rRecord, @@ -1498,10 +1498,10 @@ private: SwFrameFormat* ImportGraf(SdrTextObj* pTextObj = nullptr, SwFrameFormat* pFlyFormat = nullptr); SdrObject* ImportOleBase( Graphic& rGraph, const Graphic* pGrf=nullptr, - const SfxItemSet* pFlySet=nullptr, const Rectangle& aVisArea = Rectangle() ); + const SfxItemSet* pFlySet=nullptr, const tools::Rectangle& aVisArea = tools::Rectangle() ); SwFrameFormat* ImportOle( const Graphic* = nullptr, const SfxItemSet* pFlySet = nullptr, - const SfxItemSet* pGrfSet = nullptr, const Rectangle& aVisArea = Rectangle() ); + const SfxItemSet* pGrfSet = nullptr, const tools::Rectangle& aVisArea = tools::Rectangle() ); SwFlyFrameFormat* InsertOle(SdrOle2Obj &rObject, const SfxItemSet &rFlySet, const SfxItemSet *rGrfSet); diff --git a/sw/source/filter/ww8/ww8par4.cxx b/sw/source/filter/ww8/ww8par4.cxx index b461ebd2f5d4..0761a370804b 100644 --- a/sw/source/filter/ww8/ww8par4.cxx +++ b/sw/source/filter/ww8/ww8par4.cxx @@ -243,7 +243,7 @@ SwFlyFrameFormat* SwWW8ImplReader::InsertOle(SdrOle2Obj &rObject, } SwFrameFormat* SwWW8ImplReader::ImportOle(const Graphic* pGrf, - const SfxItemSet* pFlySet, const SfxItemSet *pGrfSet, const Rectangle& aVisArea ) + const SfxItemSet* pFlySet, const SfxItemSet *pGrfSet, const tools::Rectangle& aVisArea ) { ::SetProgressState(m_nProgress, m_pDocShell); // Update SwFrameFormat* pFormat = nullptr; @@ -331,7 +331,7 @@ bool SwWW8ImplReader::ImportOleWMF(tools::SvRef<SotStorage> xSrc1,GDIMetaFile &r } SdrObject* SwWW8ImplReader::ImportOleBase( Graphic& rGraph, - const Graphic* pGrf, const SfxItemSet* pFlySet, const Rectangle& aVisArea ) + const Graphic* pGrf, const SfxItemSet* pFlySet, const tools::Rectangle& aVisArea ) { if (!m_pStg) { @@ -377,7 +377,7 @@ SdrObject* SwWW8ImplReader::ImportOleBase( Graphic& rGraph, } } // StorageStreams closed again - Rectangle aRect(0, 0, nX, nY); + tools::Rectangle aRect(0, 0, nX, nY); if (pFlySet) { diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx index f12707b2142b..b763a4627143 100644 --- a/sw/source/filter/ww8/ww8par6.cxx +++ b/sw/source/filter/ww8/ww8par6.cxx @@ -1443,9 +1443,9 @@ bool SwWW8ImplReader::SetShadow(SvxShadowItem& rShadow, const short *pSizeArray, } void SwWW8ImplReader::GetBorderDistance(const WW8_BRCVer9* pbrc, - Rectangle& rInnerDist) + tools::Rectangle& rInnerDist) { - rInnerDist = Rectangle( pbrc[ 1 ].dptSpace() * 20, + rInnerDist = tools::Rectangle( pbrc[ 1 ].dptSpace() * 20, pbrc[ 0 ].dptSpace() * 20, pbrc[ 3 ].dptSpace() * 20, pbrc[ 2 ].dptSpace() * 20 ); @@ -4840,7 +4840,7 @@ void SwWW8ImplReader::Read_Border(sal_uInt16 , const sal_uInt8*, short nLen) SetBorder(aBox, aBrcs, &aSizeArray[0], nBorder); - Rectangle aInnerDist; + tools::Rectangle aInnerDist; GetBorderDistance( aBrcs, aInnerDist ); if (nBorder & (1 << WW8_LEFT)) diff --git a/sw/source/filter/xml/xmlexp.cxx b/sw/source/filter/xml/xmlexp.cxx index 12f6bf3fe507..edb7683ff03a 100644 --- a/sw/source/filter/xml/xmlexp.cxx +++ b/sw/source/filter/xml/xmlexp.cxx @@ -348,7 +348,7 @@ void SwXMLExport::GetViewSettings(Sequence<PropertyValue>& aProps) pValue[nIndex++].Value <<= xBox; SwDoc *pDoc = getDoc(); - const Rectangle rRect = + const tools::Rectangle rRect = pDoc->GetDocShell()->GetVisArea( ASPECT_CONTENT ); bool bTwip = pDoc->GetDocShell()->GetMapUnit ( ) == MapUnit::MapTwip; diff --git a/sw/source/filter/xml/xmlimp.cxx b/sw/source/filter/xml/xmlimp.cxx index e8c1de23783c..1a6c33753775 100644 --- a/sw/source/filter/xml/xmlimp.cxx +++ b/sw/source/filter/xml/xmlimp.cxx @@ -961,7 +961,7 @@ void SwXMLImport::SetViewSettings(const Sequence < PropertyValue > & aViewProps) SolarMutexGuard aGuard; SwDoc *pDoc = getDoc(); - Rectangle aRect; + tools::Rectangle aRect; if( pDoc->GetDocShell() ) aRect = pDoc->GetDocShell()->GetVisArea( ASPECT_CONTENT ); //TODO/LATER: why that cast?! diff --git a/sw/source/filter/xml/xmltexti.cxx b/sw/source/filter/xml/xmltexti.cxx index 75809efb4bba..a1c4e991d50c 100644 --- a/sw/source/filter/xml/xmltexti.cxx +++ b/sw/source/filter/xml/xmltexti.cxx @@ -236,7 +236,7 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertOLEObject( SfxItemSet aItemSet( pDoc->GetAttrPool(), RES_FRMATR_BEGIN, RES_FRMATR_END ); Size aTwipSize( 0, 0 ); - Rectangle aVisArea( 0, 0, nWidth, nHeight ); + tools::Rectangle aVisArea( 0, 0, nWidth, nHeight ); lcl_putHeightAndWidth( aItemSet, nHeight, nWidth, &aTwipSize.Height(), &aTwipSize.Width() ); diff --git a/sw/source/ui/chrdlg/drpcps.cxx b/sw/source/ui/chrdlg/drpcps.cxx index c7a0ac320d5c..135469e6f955 100644 --- a/sw/source/ui/chrdlg/drpcps.cxx +++ b/sw/source/ui/chrdlg/drpcps.cxx @@ -92,7 +92,7 @@ class SwDropCapsPict : public Control Size maTextSize; Reference< css::i18n::XBreakIterator > xBreak; - virtual void Paint(vcl::RenderContext& /*rRenderContext*/, const Rectangle &rRect) override; + virtual void Paint(vcl::RenderContext& /*rRenderContext*/, const tools::Rectangle &rRect) override; void CheckScript(); Size CalcTextSize(); inline void InitPrinter(); @@ -343,7 +343,7 @@ void SwDropCapsPict::UpdatePaintSettings() Invalidate(); } -void SwDropCapsPict::Paint(vcl::RenderContext& rRenderContext, const Rectangle& /*rRect*/) +void SwDropCapsPict::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& /*rRect*/) { if (!IsVisible()) return; @@ -355,8 +355,8 @@ void SwDropCapsPict::Paint(vcl::RenderContext& rRenderContext, const Rectangle& Size aOutputSizePixel(GetOutputSizePixel()); - rRenderContext.DrawRect(Rectangle(Point(0, 0), aOutputSizePixel)); - rRenderContext.SetClipRegion(vcl::Region(Rectangle(Point(BORDER, BORDER), + rRenderContext.DrawRect(tools::Rectangle(Point(0, 0), aOutputSizePixel)); + rRenderContext.SetClipRegion(vcl::Region(tools::Rectangle(Point(BORDER, BORDER), Size(aOutputSizePixel.Width () - 2 * BORDER, aOutputSizePixel.Height() - 2 * BORDER)))); @@ -367,7 +367,7 @@ void SwDropCapsPict::Paint(vcl::RenderContext& rRenderContext, const Rectangle& for (int i = 0; i < LINES; ++i) { - rRenderContext.DrawRect(Rectangle(Point(BORDER, nY0 + i * mnTotLineH), + rRenderContext.DrawRect(tools::Rectangle(Point(BORDER, nY0 + i * mnTotLineH), Size(aOutputSizePixel.Width() - 2 * BORDER, mnLineH))); } @@ -377,7 +377,7 @@ void SwDropCapsPict::Paint(vcl::RenderContext& rRenderContext, const Rectangle& if (mpPage && mpPage->m_pDropCapsBox->IsChecked()) { const Size aTextSize(maTextSize.Width() + nDistW, maTextSize.Height()); - rRenderContext.DrawRect(Rectangle(Point(BORDER, nY0), aTextSize)); + rRenderContext.DrawRect(tools::Rectangle(Point(BORDER, nY0), aTextSize)); // draw Text DrawPrev(rRenderContext, Point(BORDER, nY0)); diff --git a/sw/source/ui/config/optload.cxx b/sw/source/ui/config/optload.cxx index 25431a1111cc..caa0b5a51f1b 100644 --- a/sw/source/ui/config/optload.cxx +++ b/sw/source/ui/config/optload.cxx @@ -423,11 +423,11 @@ Size SwCaptionPreview::GetOptimalSize() const return LogicToPixel(Size(106 , 20), MapMode(MapUnit::MapAppFont)); } -void SwCaptionPreview::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) +void SwCaptionPreview::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) { Window::Paint(rRenderContext, rRect); - rRenderContext.DrawRect(Rectangle(Point(0, 0), GetSizePixel())); + rRenderContext.DrawRect(tools::Rectangle(Point(0, 0), GetSizePixel())); rRenderContext.DrawText(Point(4, 6), maText); } diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx index b9e222bc8c52..1aa355027b8f 100644 --- a/sw/source/ui/config/optpage.cxx +++ b/sw/source/ui/config/optpage.cxx @@ -72,7 +72,7 @@ using namespace ::com::sun::star; namespace { -void drawRect(vcl::RenderContext& rRenderContext, const Rectangle &rRect, const Color &rFillColor, const Color &rLineColor) +void drawRect(vcl::RenderContext& rRenderContext, const tools::Rectangle &rRect, const Color &rFillColor, const Color &rLineColor) { rRenderContext.SetFillColor(rFillColor); rRenderContext.SetLineColor(rLineColor); @@ -1588,7 +1588,7 @@ void SwMarkPreview::DataChanged( const DataChangedEvent& rDCEvt ) InitColors(); } -void SwMarkPreview::Paint(vcl::RenderContext& rRenderContext, const Rectangle &/*rRect*/) +void SwMarkPreview::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle &/*rRect*/) { const Size aSz(GetOutputSizePixel()); @@ -1604,7 +1604,7 @@ void SwMarkPreview::Paint(vcl::RenderContext& rRenderContext, const Rectangle &/ const long nTBorder = 4; const long nBBorder = 4; - aLeftPagePrtArea = Rectangle(Point(nLBorder, nTBorder), Point((nOutWPix - 1) - nRBorder, (nOutHPix - 1) - nBBorder)); + aLeftPagePrtArea = tools::Rectangle(Point(nLBorder, nTBorder), Point((nOutWPix - 1) - nRBorder, (nOutHPix - 1) - nBBorder)); const long nWidth = aLeftPagePrtArea.GetWidth(); const long nKorr = (nWidth & 1) != 0 ? 0 : 1; aLeftPagePrtArea.SetSize(Size(nWidth / 2 - (nLBorder + nRBorder) / 2 + nKorr, aLeftPagePrtArea.GetHeight())); @@ -1613,7 +1613,7 @@ void SwMarkPreview::Paint(vcl::RenderContext& rRenderContext, const Rectangle &/ aRightPagePrtArea.Move(aLeftPagePrtArea.GetWidth() + nLBorder + nRBorder + 1, 0); // draw shadow - Rectangle aShadow(aPage); + tools::Rectangle aShadow(aPage); aShadow += Point(3, 3); drawRect(rRenderContext, aShadow, m_aShadowCol, m_aTransCol); @@ -1621,7 +1621,7 @@ void SwMarkPreview::Paint(vcl::RenderContext& rRenderContext, const Rectangle &/ drawRect(rRenderContext, aPage, m_aBgCol, m_aLineCol); // draw separator - Rectangle aPageSeparator(aPage); + tools::Rectangle aPageSeparator(aPage); aPageSeparator.SetSize(Size(2, aPageSeparator.GetHeight())); aPageSeparator.Move(aPage.GetWidth() / 2 - 1, 0); drawRect(rRenderContext, aPageSeparator, m_aLineCol, m_aTransCol); @@ -1629,8 +1629,8 @@ void SwMarkPreview::Paint(vcl::RenderContext& rRenderContext, const Rectangle &/ PaintPage(rRenderContext, aLeftPagePrtArea); PaintPage(rRenderContext, aRightPagePrtArea); - Rectangle aLeftMark(Point(aPage.Left() + 2, aLeftPagePrtArea.Top() + 4), Size(aLeftPagePrtArea.Left() - 4, 2)); - Rectangle aRightMark(Point(aRightPagePrtArea.Right() + 2, aRightPagePrtArea.Bottom() - 6), Size(aLeftPagePrtArea.Left() - 4, 2)); + tools::Rectangle aLeftMark(Point(aPage.Left() + 2, aLeftPagePrtArea.Top() + 4), Size(aLeftPagePrtArea.Left() - 4, 2)); + tools::Rectangle aRightMark(Point(aRightPagePrtArea.Right() + 2, aRightPagePrtArea.Bottom() - 6), Size(aLeftPagePrtArea.Left() - 4, 2)); switch (nMarkPos) { @@ -1658,7 +1658,7 @@ void SwMarkPreview::Paint(vcl::RenderContext& rRenderContext, const Rectangle &/ drawRect(rRenderContext, aRightMark, m_aMarkCol, m_aTransCol); } -void SwMarkPreview::PaintPage(vcl::RenderContext& rRenderContext, const Rectangle &rRect) +void SwMarkPreview::PaintPage(vcl::RenderContext& rRenderContext, const tools::Rectangle &rRect) { // draw PrintArea drawRect(rRenderContext, rRect, m_aTransCol, m_aPrintAreaCol); @@ -1668,7 +1668,7 @@ void SwMarkPreview::PaintPage(vcl::RenderContext& rRenderContext, const Rectangl sal_uLong nRTextBorder = 4; sal_uLong nTTextBorder = 4; - Rectangle aTextLine = rRect; + tools::Rectangle aTextLine = rRect; aTextLine.SetSize(Size(aTextLine.GetWidth(), 2)); aTextLine.Left() += nLTextBorder; aTextLine.Right() -= nRTextBorder; diff --git a/sw/source/ui/dbui/createaddresslistdialog.cxx b/sw/source/ui/dbui/createaddresslistdialog.cxx index 513c8101269b..f5b74e4b9e5e 100644 --- a/sw/source/ui/dbui/createaddresslistdialog.cxx +++ b/sw/source/ui/dbui/createaddresslistdialog.cxx @@ -68,7 +68,7 @@ class SwAddressControl_Impl : public Control DECL_LINK(GotFocusHdl_Impl, Control&, void); DECL_LINK(EditModifyHdl_Impl, Edit&, void); - void MakeVisible(const Rectangle& aRect); + void MakeVisible(const tools::Rectangle& aRect); virtual bool PreNotify( NotifyEvent& rNEvt ) override; virtual void Command( const CommandEvent& rCEvt ) override; @@ -275,12 +275,12 @@ IMPL_LINK(SwAddressControl_Impl, GotFocusHdl_Impl, Control&, rControl, void) Edit* pEdit = static_cast<Edit*>(&rControl); if(GetFocusFlags::Tab & pEdit->GetGetFocusFlags()) { - Rectangle aRect(pEdit->GetPosPixel(), pEdit->GetSizePixel()); + tools::Rectangle aRect(pEdit->GetPosPixel(), pEdit->GetSizePixel()); MakeVisible(aRect); } } -void SwAddressControl_Impl::MakeVisible(const Rectangle & rRect) +void SwAddressControl_Impl::MakeVisible(const tools::Rectangle & rRect) { long nThumb = m_pScrollBar->GetThumbPos(); //determine range of visible positions @@ -320,7 +320,7 @@ void SwAddressControl_Impl::SetCursorTo(std::size_t nElement) { Edit* pEdit = m_aEdits[nElement].get(); pEdit->GrabFocus(); - Rectangle aRect(pEdit->GetPosPixel(), pEdit->GetSizePixel()); + tools::Rectangle aRect(pEdit->GetPosPixel(), pEdit->GetSizePixel()); MakeVisible(aRect); } diff --git a/sw/source/ui/envelp/envlop1.cxx b/sw/source/ui/envelp/envlop1.cxx index c73699fbde24..9e6d710078df 100644 --- a/sw/source/ui/envelp/envlop1.cxx +++ b/sw/source/ui/envelp/envlop1.cxx @@ -66,7 +66,7 @@ void SwEnvPreview::DataChanged( const DataChangedEvent& rDCEvt ) Invalidate(); } -void SwEnvPreview::Paint(vcl::RenderContext& rRenderContext, const Rectangle &) +void SwEnvPreview::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle &) { const StyleSettings& rSettings = rRenderContext.GetSettings().GetStyleSettings(); SetBackground(rRenderContext.GetSettings().GetStyleSettings().GetDialogColor()); @@ -94,7 +94,7 @@ void SwEnvPreview::Paint(vcl::RenderContext& rRenderContext, const Rectangle &) const long nX = (GetOutputSizePixel().Width () - nW) / 2; const long nY = (GetOutputSizePixel().Height() - nH) / 2; rRenderContext.SetFillColor(aBack); - rRenderContext.DrawRect(Rectangle(Point(nX, nY), Size(nW, nH))); + rRenderContext.DrawRect(tools::Rectangle(Point(nX, nY), Size(nW, nH))); // Sender if (rItem.bSend) @@ -105,7 +105,7 @@ void SwEnvPreview::Paint(vcl::RenderContext& rRenderContext, const Rectangle &) const long nSendH = static_cast<long>(f * (rItem.lAddrFromTop - rItem.lSendFromTop - 566)); rRenderContext.SetFillColor(aMedium); - rRenderContext.DrawRect(Rectangle(Point(nSendX, nSendY), Size(nSendW, nSendH))); + rRenderContext.DrawRect(tools::Rectangle(Point(nSendX, nSendY), Size(nSendW, nSendH))); } // Addressee @@ -114,7 +114,7 @@ void SwEnvPreview::Paint(vcl::RenderContext& rRenderContext, const Rectangle &) const long nAddrW = static_cast<long>(f * (nPageW - rItem.lAddrFromLeft - 566)); const long nAddrH = static_cast<long>(f * (nPageH - rItem.lAddrFromTop - 566)); rRenderContext.SetFillColor(aMedium); - rRenderContext.DrawRect(Rectangle(Point(nAddrX, nAddrY), Size(nAddrW, nAddrH))); + rRenderContext.DrawRect(tools::Rectangle(Point(nAddrX, nAddrY), Size(nAddrW, nAddrH))); // Stamp const long nStmpW = static_cast<long>(f * 1417 /* 2,5 cm */); @@ -123,7 +123,7 @@ void SwEnvPreview::Paint(vcl::RenderContext& rRenderContext, const Rectangle &) const long nStmpY = nY + static_cast<long>(f * 566); rRenderContext.SetFillColor(aBack); - rRenderContext.DrawRect(Rectangle(Point(nStmpX, nStmpY), Size(nStmpW, nStmpH))); + rRenderContext.DrawRect(tools::Rectangle(Point(nStmpX, nStmpY), Size(nStmpW, nStmpH))); } SwEnvDlg::SwEnvDlg(vcl::Window* pParent, const SfxItemSet& rSet, diff --git a/sw/source/ui/envelp/labfmt.cxx b/sw/source/ui/envelp/labfmt.cxx index a6673a180c85..d272566ca190 100644 --- a/sw/source/ui/envelp/labfmt.cxx +++ b/sw/source/ui/envelp/labfmt.cxx @@ -144,7 +144,7 @@ Size SwLabPreview::GetOptimalSize() const VCL_BUILDER_FACTORY(SwLabPreview) -void SwLabPreview::Paint(vcl::RenderContext& rRenderContext, const Rectangle&) +void SwLabPreview::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&) { const Size aSz(GetOutputSizePixel()); @@ -202,7 +202,7 @@ void SwLabPreview::Paint(vcl::RenderContext& rRenderContext, const Rectangle&) const long lY3 = lY0 + ROUND(f * (m_aItem.m_lUpper + m_aItem.m_lVDist )); // draw outline (area) - rRenderContext.DrawRect(Rectangle(Point(lX0, lY0), Size(lOutlineW, lOutlineH))); + rRenderContext.DrawRect(tools::Rectangle(Point(lX0, lY0), Size(lOutlineW, lOutlineH))); // draw outline (border) rRenderContext.SetLineColor(rFieldTextColor); @@ -214,13 +214,13 @@ void SwLabPreview::Paint(vcl::RenderContext& rRenderContext, const Rectangle&) rRenderContext.DrawLine(Point(lX0, lY0 + lOutlineH - 1), Point(lX0 + lOutlineW - 1, lY0 + lOutlineH - 1)); // Down // Labels - rRenderContext.SetClipRegion(vcl::Region(Rectangle(Point(lX0, lY0), Size(lOutlineW, lOutlineH)))); + rRenderContext.SetClipRegion(vcl::Region(tools::Rectangle(Point(lX0, lY0), Size(lOutlineW, lOutlineH)))); rRenderContext.SetFillColor(COL_LIGHTGRAYBLUE); const sal_Int32 nRows = std::min<sal_Int32>(2, m_aItem.m_nRows); const sal_Int32 nCols = std::min<sal_Int32>(2, m_aItem.m_nCols); for (sal_Int32 nRow = 0; nRow < nRows; ++nRow) for (sal_Int32 nCol = 0; nCol < nCols; ++nCol) - rRenderContext.DrawRect(Rectangle(Point(lX0 + ROUND(f * (m_aItem.m_lLeft + nCol * m_aItem.m_lHDist)), + rRenderContext.DrawRect(tools::Rectangle(Point(lX0 + ROUND(f * (m_aItem.m_lLeft + nCol * m_aItem.m_lHDist)), lY0 + ROUND(f * (m_aItem.m_lUpper + nRow * m_aItem.m_lVDist))), Size(ROUND(f * m_aItem.m_lWidth), ROUND(f * m_aItem.m_lHeight)))); diff --git a/sw/source/ui/envelp/labfmt.hxx b/sw/source/ui/envelp/labfmt.hxx index 1d26b342da78..4840eba3ba13 100644 --- a/sw/source/ui/envelp/labfmt.hxx +++ b/sw/source/ui/envelp/labfmt.hxx @@ -54,7 +54,7 @@ class SwLabPreview : public vcl::Window SwLabItem m_aItem; - virtual void Paint(vcl::RenderContext& rRenderContext, const Rectangle&) override; + virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&) override; virtual Size GetOptimalSize() const override; diff --git a/sw/source/ui/fldui/FldRefTreeListBox.cxx b/sw/source/ui/fldui/FldRefTreeListBox.cxx index 436b2740a9ca..e5ae1dc91923 100644 --- a/sw/source/ui/fldui/FldRefTreeListBox.cxx +++ b/sw/source/ui/fldui/FldRefTreeListBox.cxx @@ -53,7 +53,7 @@ void SwFieldRefTreeListBox::RequestHelp( const HelpEvent& rHEvt ) aSize.Width() = GetSizePixel().Width() - aPos.X(); aPos = OutputToScreenPixel(aPos); - Rectangle aItemRect( aPos, aSize ); + tools::Rectangle aItemRect( aPos, aSize ); Help::ShowQuickHelp( this, aItemRect, sEntry, QuickHelpFlags::Left|QuickHelpFlags::VCenter ); bCallBase = false; diff --git a/sw/source/ui/fldui/fldtdlg.cxx b/sw/source/ui/fldui/fldtdlg.cxx index cfc424d0bfa2..12a6cb4dbc92 100644 --- a/sw/source/ui/fldui/fldtdlg.cxx +++ b/sw/source/ui/fldui/fldtdlg.cxx @@ -140,7 +140,7 @@ void SwFieldDlg::Initialize(SfxChildWinInfo *pInfo) } Point aPoint; - Rectangle aRect = GetDesktopRectPixel(); + tools::Rectangle aRect = GetDesktopRectPixel(); aPoint.X() = aRect.Right() - aSize.Width(); aPoint.Y() = aRect.Bottom() - aSize.Height(); diff --git a/sw/source/ui/frmdlg/column.cxx b/sw/source/ui/frmdlg/column.cxx index c18867b180ca..88f3ecbbea36 100644 --- a/sw/source/ui/frmdlg/column.cxx +++ b/sw/source/ui/frmdlg/column.cxx @@ -1363,7 +1363,7 @@ void ColumnValueSet::UserDraw(const UserDrawEvent& rUDEvt) vcl::RenderContext* pDev = rUDEvt.GetRenderContext(); const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); - Rectangle aRect = rUDEvt.GetRect(); + tools::Rectangle aRect = rUDEvt.GetRect(); const sal_uInt16 nItemId = rUDEvt.GetItemId(); long nRectWidth = aRect.GetWidth(); long nRectHeight = aRect.GetHeight(); diff --git a/sw/source/ui/frmdlg/frmpage.cxx b/sw/source/ui/frmdlg/frmpage.cxx index c5f236eecd43..dc9d86d4e8cd 100644 --- a/sw/source/ui/frmdlg/frmpage.cxx +++ b/sw/source/ui/frmdlg/frmpage.cxx @@ -2644,7 +2644,7 @@ Size BmpWindow::GetOptimalSize() const VCL_BUILDER_FACTORY_ARGS(BmpWindow, 0) -void BmpWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangle&) +void BmpWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&) { // Setup rRenderContext.SetBackground(); @@ -2685,7 +2685,7 @@ void BmpWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangle&) } // #i119307# clear window background, the graphic might have transparency - rRenderContext.DrawRect(Rectangle(aPntPos, aPntSz)); + rRenderContext.DrawRect(tools::Rectangle(aPntPos, aPntSz)); if (bHorz || bVert) { diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx index 9eb671adafcb..af9ae83a0aff 100644 --- a/sw/source/ui/index/cnttab.cxx +++ b/sw/source/ui/index/cnttab.cxx @@ -164,7 +164,7 @@ class SwEntryBrowseBox : public SwEntryBrowseBox_Base protected: virtual bool SeekRow( long nRow ) override; - virtual void PaintCell(OutputDevice& rDev, const Rectangle& rRect, sal_uInt16 nColId) const override; + virtual void PaintCell(OutputDevice& rDev, const tools::Rectangle& rRect, sal_uInt16 nColId) const override; virtual void InitController(::svt::CellControllerRef& rController, long nRow, sal_uInt16 nCol) override; virtual ::svt::CellController* GetController(long nRow, sal_uInt16 nCol) override; virtual bool SaveModified() override; @@ -1782,7 +1782,7 @@ void SwIdxTreeListBox::RequestHelp( const HelpEvent& rHEvt ) aSize.Width() = GetSizePixel().Width() - aPos.X(); aPos = OutputToScreenPixel(aPos); - Rectangle aItemRect( aPos, aSize ); + tools::Rectangle aItemRect( aPos, aSize ); Help::ShowQuickHelp( this, aItemRect, sEntry, QuickHelpFlags::Left|QuickHelpFlags::VCenter ); } @@ -3420,7 +3420,7 @@ bool SwTokenWindow::CreateQuickHelp(Control* pCtrl, } Point aPos = OutputToScreenPixel(pCtrl->GetPosPixel()); - Rectangle aItemRect( aPos, pCtrl->GetSizePixel() ); + tools::Rectangle aItemRect( aPos, pCtrl->GetSizePixel() ); if ( rToken.eTokenType != TOKEN_TAB_STOP ) { if (!rToken.sCharStyleName.isEmpty()) @@ -3959,7 +3959,7 @@ OUString SwEntryBrowseBox::GetCellText(long nRow, sal_uInt16 nColumn) const } void SwEntryBrowseBox::PaintCell(OutputDevice& rDev, - const Rectangle& rRect, sal_uInt16 nColumnId) const + const tools::Rectangle& rRect, sal_uInt16 nColumnId) const { const DrawTextFlags nStyle = DrawTextFlags::Clip | DrawTextFlags::Center; rDev.DrawText( rRect, GetCellText( m_nCurrentRow, nColumnId ), nStyle ); diff --git a/sw/source/ui/misc/glosbib.cxx b/sw/source/ui/misc/glosbib.cxx index 85ec9bfdc5f9..161e477200f8 100644 --- a/sw/source/ui/misc/glosbib.cxx +++ b/sw/source/ui/misc/glosbib.cxx @@ -425,7 +425,7 @@ void SwGlossaryGroupTLB::RequestHelp( const HelpEvent& rHEvt ) if((aPos.X() + aSize.Width()) > GetSizePixel().Width()) aSize.Width() = GetSizePixel().Width() - aPos.X(); aPos = OutputToScreenPixel(aPos); - Rectangle aItemRect( aPos, aSize ); + tools::Rectangle aItemRect( aPos, aSize ); GlosBibUserData* pData = static_cast<GlosBibUserData*>(pEntry->GetUserData()); const OUString sMsg = pData->sPath + "/" + pData->sGroupName.getToken(0, GLOS_DELIM) diff --git a/sw/source/ui/misc/glossary.cxx b/sw/source/ui/misc/glossary.cxx index d43c566d4a20..8ed1d7c611a4 100644 --- a/sw/source/ui/misc/glossary.cxx +++ b/sw/source/ui/misc/glossary.cxx @@ -882,7 +882,7 @@ void SwGlTreeListBox::RequestHelp( const HelpEvent& rHEvt ) if((aPos.X() + aSize.Width()) > GetSizePixel().Width()) aSize.Width() = GetSizePixel().Width() - aPos.X(); aPos = OutputToScreenPixel(aPos); - Rectangle aItemRect( aPos, aSize ); + tools::Rectangle aItemRect( aPos, aSize ); OUString sMsg; if(!GetParent(pEntry)) { diff --git a/sw/source/ui/misc/outline.cxx b/sw/source/ui/misc/outline.cxx index 5cb3d369d13d..8aa522fc0d87 100644 --- a/sw/source/ui/misc/outline.cxx +++ b/sw/source/ui/misc/outline.cxx @@ -251,7 +251,7 @@ IMPL_LINK( SwOutlineTabDialog, FormHdl, Button *, pBtn, void ) } pFormMenu->SetSelectHdl(LINK(this, SwOutlineTabDialog, MenuSelectHdl)); - pFormMenu->Execute(pBtn, Rectangle(Point(0,0), pBtn->GetSizePixel()), PopupMenuFlags::ExecuteDown); + pFormMenu->Execute(pBtn, tools::Rectangle(Point(0,0), pBtn->GetSizePixel()), PopupMenuFlags::ExecuteDown); } IMPL_LINK( SwOutlineTabDialog, MenuSelectHdl, Menu *, pMenu, bool ) @@ -903,7 +903,7 @@ static long lcl_DrawGraphic(vcl::RenderContext* pVDev, const SwNumFormat &rForma VCL_BUILDER_FACTORY(NumberingPreview) // paint numbering's preview -void NumberingPreview::Paint(vcl::RenderContext& rRenderContext, const Rectangle& /*rRect*/) +void NumberingPreview::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& /*rRect*/) { const Size aSize(rRenderContext.PixelToLogic(GetOutputSizePixel())); @@ -914,7 +914,7 @@ void NumberingPreview::Paint(vcl::RenderContext& rRenderContext, const Rectangle // #101524# OJ pVDev->SetFillColor(rRenderContext.GetSettings().GetStyleSettings().GetWindowColor()); pVDev->SetLineColor(rRenderContext.GetSettings().GetStyleSettings().GetButtonTextColor()); - pVDev->DrawRect(Rectangle(Point(0,0), aSize)); + pVDev->DrawRect(tools::Rectangle(Point(0,0), aSize)); if (pActNum) { @@ -1044,11 +1044,11 @@ void NumberingPreview::Paint(vcl::RenderContext& rRenderContext, const Rectangle nXStart = rFormat.GetIndentAt() / nWidthRelation; } - Rectangle aRect1(Point(nTextXPos, nYStart + nFontHeight / 2), Size(aSize.Width() / 2, 2)); + tools::Rectangle aRect1(Point(nTextXPos, nYStart + nFontHeight / 2), Size(aSize.Width() / 2, 2)); pVDev->SetFillColor(rRenderContext.GetSettings().GetStyleSettings().GetWindowColor()); // Color( COL_BLACK ) ); pVDev->DrawRect(aRect1); - Rectangle aRect2(Point(nXStart, nYStart + nLineHeight + nFontHeight / 2), Size(aSize.Width() / 2, 2)); + tools::Rectangle aRect2(Point(nXStart, nYStart + nLineHeight + nFontHeight / 2), Size(aSize.Width() / 2, 2)); pVDev->DrawRect(aRect2); nYStart += 2 * nLineHeight; } diff --git a/sw/source/ui/table/tautofmt.cxx b/sw/source/ui/table/tautofmt.cxx index e56366234591..0cbfba9f4e72 100644 --- a/sw/source/ui/table/tautofmt.cxx +++ b/sw/source/ui/table/tautofmt.cxx @@ -57,7 +57,7 @@ public: virtual void Resize() override; protected: - virtual void Paint( vcl::RenderContext& rRenderContext, const Rectangle& rRect ) override; + virtual void Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect ) override; private: SwTableAutoFormat aCurData; @@ -82,7 +82,7 @@ private: uno::Reference<i18n::XBreakIterator> m_xBreak; void Init(); - void DoPaint(vcl::RenderContext& rRenderContext, const Rectangle& rRect); + void DoPaint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect); void CalcCellArray(bool bFitWidth); void CalcLineMap(); void PaintCells(vcl::RenderContext& rRenderContext); @@ -706,7 +706,7 @@ MAKENUMSTR: SvtScriptedTextHelper aScriptedText(rRenderContext); Size aStrSize; sal_uInt8 nFormatIndex = GetFormatIndex( nCol, nRow ); - Rectangle cellRect = maArray.GetCellRect( nCol, nRow ); + tools::Rectangle cellRect = maArray.GetCellRect( nCol, nRow ); Point aPos = cellRect.TopLeft(); long nRightX = 0; @@ -885,10 +885,10 @@ void AutoFormatPreview::NotifyChange( const SwTableAutoFormat& rNewData ) bFitWidth = aCurData.IsJustify(); // true; //??? CalcCellArray( bFitWidth ); CalcLineMap(); - Invalidate(Rectangle(Point(0,0), GetSizePixel())); + Invalidate(tools::Rectangle(Point(0,0), GetSizePixel())); } -void AutoFormatPreview::DoPaint(vcl::RenderContext& rRenderContext, const Rectangle& /*rRect*/) +void AutoFormatPreview::DoPaint(vcl::RenderContext& rRenderContext, const tools::Rectangle& /*rRect*/) { DrawModeFlags nOldDrawMode = aVD->GetDrawMode(); if (rRenderContext.GetSettings().GetStyleSettings().GetHighContrastMode()) @@ -920,7 +920,7 @@ void AutoFormatPreview::DoPaint(vcl::RenderContext& rRenderContext, const Rectan aVD->SetOutputSizePixel(theWndSize); oldColor = aVD->GetLineColor(); aVD->SetLineColor(); - aVD->DrawRect(Rectangle(Point(0,0), theWndSize)); + aVD->DrawRect(tools::Rectangle(Point(0,0), theWndSize)); rRenderContext.SetLineColor(oldColor); @@ -934,7 +934,7 @@ void AutoFormatPreview::DoPaint(vcl::RenderContext& rRenderContext, const Rectan aVD->SetDrawMode(nOldDrawMode); } -void AutoFormatPreview::Paint( vcl::RenderContext& rRenderContext, const Rectangle& rRect ) +void AutoFormatPreview::Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect ) { DoPaint(rRenderContext, rRect); } diff --git a/sw/source/uibase/app/docsh.cxx b/sw/source/uibase/app/docsh.cxx index eb1af4860268..2ae8a2992b2e 100644 --- a/sw/source/uibase/app/docsh.cxx +++ b/sw/source/uibase/app/docsh.cxx @@ -816,7 +816,7 @@ void SwDocShell::Draw( OutputDevice* pDev, const JobSetup& rSetup, m_pDoc->getIDocumentDeviceAccess().setJobsetup( rSetup ); } - Rectangle aRect( nAspect == ASPECT_THUMBNAIL ? + tools::Rectangle aRect( nAspect == ASPECT_THUMBNAIL ? GetVisArea( nAspect ) : GetVisArea( ASPECT_CONTENT ) ); pDev->Push(); @@ -837,9 +837,9 @@ void SwDocShell::Draw( OutputDevice* pDev, const JobSetup& rSetup, EnableSetModified(); } -void SwDocShell::SetVisArea( const Rectangle &rRect ) +void SwDocShell::SetVisArea( const tools::Rectangle &rRect ) { - Rectangle aRect( rRect ); + tools::Rectangle aRect( rRect ); if (m_pView) { Size aSz( m_pView->GetDocSz() ); @@ -861,7 +861,7 @@ void SwDocShell::SetVisArea( const Rectangle &rRect ) SfxObjectShell::SetVisArea( aRect ); } -Rectangle SwDocShell::GetVisArea( sal_uInt16 nAspect ) const +tools::Rectangle SwDocShell::GetVisArea( sal_uInt16 nAspect ) const { if ( nAspect == ASPECT_THUMBNAIL ) { @@ -870,7 +870,7 @@ Rectangle SwDocShell::GetVisArea( sal_uInt16 nAspect ) const SwContentNode* pNd = m_pDoc->GetNodes().GoNext( &aIdx ); const SwRect aPageRect = pNd->FindPageFrameRect(); - Rectangle aRect(aPageRect.SVRect()); + tools::Rectangle aRect(aPageRect.SVRect()); // tdf#81219 sanitize - nobody is interested in a thumbnail where's // nothing visible diff --git a/sw/source/uibase/dbui/mailmergehelper.cxx b/sw/source/uibase/dbui/mailmergehelper.cxx index 675a2e031543..5661818f9ddf 100644 --- a/sw/source/uibase/dbui/mailmergehelper.cxx +++ b/sw/source/uibase/dbui/mailmergehelper.cxx @@ -302,12 +302,12 @@ void SwAddressPreview::UpdateScrollBar() } } -void SwAddressPreview::Paint(vcl::RenderContext& rRenderContext, const Rectangle&) +void SwAddressPreview::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&) { const StyleSettings& rSettings = rRenderContext.GetSettings().GetStyleSettings(); rRenderContext.SetFillColor(rSettings.GetWindowColor()); rRenderContext.SetLineColor(Color(COL_TRANSPARENT)); - rRenderContext.DrawRect(Rectangle(Point(0, 0), GetOutputSizePixel())); + rRenderContext.DrawRect(tools::Rectangle(Point(0, 0), GetOutputSizePixel())); Color aPaintColor(IsEnabled() ? rSettings.GetWindowTextColor() : rSettings.GetDisableColor()); rRenderContext.SetLineColor(aPaintColor); vcl::Font aFont(rRenderContext.GetFont()); @@ -430,12 +430,12 @@ void SwAddressPreview::StateChanged( StateChangedType nStateChange ) void SwAddressPreview::DrawText_Impl(vcl::RenderContext& rRenderContext, const OUString& rAddress, const Point& rTopLeft, const Size& rSize, bool bIsSelected) { - rRenderContext.SetClipRegion(vcl::Region(Rectangle(rTopLeft, rSize))); + rRenderContext.SetClipRegion(vcl::Region(tools::Rectangle(rTopLeft, rSize))); if (bIsSelected) { //selection rectangle rRenderContext.SetFillColor(Color(COL_TRANSPARENT)); - rRenderContext.DrawRect(Rectangle(rTopLeft, rSize)); + rRenderContext.DrawRect(tools::Rectangle(rTopLeft, rSize)); } sal_Int32 nHeight = GetTextHeight(); Point aStart = rTopLeft; diff --git a/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx b/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx index 8c564231a15e..fc9e0217105c 100644 --- a/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx +++ b/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx @@ -776,7 +776,7 @@ bool SwSpellDialogChildWindow::FindNextDrawTextError_Impl(SwWrtShell& rSh) aTmpOutliner.InsertView( pOutlView.get() ); Point aPt; Size aSize(1,1); - Rectangle aRect( aPt, aSize ); + tools::Rectangle aRect( aPt, aSize ); pOutlView->SetOutputArea( aRect ); aTmpOutliner.SetText( *pParaObj ); aTmpOutliner.ClearModifyFlag(); diff --git a/sw/source/uibase/docvw/AnnotationMenuButton.cxx b/sw/source/uibase/docvw/AnnotationMenuButton.cxx index ddaae9d1b8e2..38fe8def1a86 100644 --- a/sw/source/uibase/docvw/AnnotationMenuButton.cxx +++ b/sw/source/uibase/docvw/AnnotationMenuButton.cxx @@ -118,7 +118,7 @@ void AnnotationMenuButton::MouseButtonDown( const MouseEvent& rMEvt ) MenuButton::MouseButtonDown(rMEvt); } -void AnnotationMenuButton::Paint(vcl::RenderContext& rRenderContext, const Rectangle& /*rRect*/) +void AnnotationMenuButton::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& /*rRect*/) { bool bHighContrast = rRenderContext.GetSettings().GetStyleSettings().GetHighContrastMode(); @@ -127,7 +127,7 @@ void AnnotationMenuButton::Paint(vcl::RenderContext& rRenderContext, const Recta else rRenderContext.SetFillColor(mrSidebarWin.ColorDark()); rRenderContext.SetLineColor(); - const Rectangle aRect(Rectangle(Point(0, 0), rRenderContext.PixelToLogic(GetSizePixel()))); + const tools::Rectangle aRect(tools::Rectangle(Point(0, 0), rRenderContext.PixelToLogic(GetSizePixel()))); rRenderContext.DrawRect(aRect); if (bHighContrast) @@ -170,7 +170,7 @@ void AnnotationMenuButton::Paint(vcl::RenderContext& rRenderContext, const Recta } else { - Rectangle aSymbolRect(aRect); + tools::Rectangle aSymbolRect(aRect); // 25% distance to the left and right button border const long nBorderDistanceLeftAndRight = ((aSymbolRect.GetWidth() * 250) + 500) / 1000; aSymbolRect.Left() += nBorderDistanceLeftAndRight; diff --git a/sw/source/uibase/docvw/AnnotationMenuButton.hxx b/sw/source/uibase/docvw/AnnotationMenuButton.hxx index 82b4a5f5d088..6a7694d4caae 100644 --- a/sw/source/uibase/docvw/AnnotationMenuButton.hxx +++ b/sw/source/uibase/docvw/AnnotationMenuButton.hxx @@ -40,7 +40,7 @@ class AnnotationMenuButton : public MenuButton // override vcl::Window methods virtual void MouseButtonDown( const MouseEvent& rMEvt ) override; - virtual void Paint( vcl::RenderContext& rRenderContext, const Rectangle& rRect ) override; + virtual void Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect ) override; virtual void KeyInput( const KeyEvent& rKeyEvt ) override; private: diff --git a/sw/source/uibase/docvw/DashedLine.cxx b/sw/source/uibase/docvw/DashedLine.cxx index 7da108fb6dcc..b5a641d84672 100644 --- a/sw/source/uibase/docvw/DashedLine.cxx +++ b/sw/source/uibase/docvw/DashedLine.cxx @@ -29,14 +29,14 @@ SwDashedLine::~SwDashedLine( ) { } -void SwDashedLine::Paint(vcl::RenderContext& rRenderContext, const Rectangle&) +void SwDashedLine::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&) { const drawinglayer::geometry::ViewInformation2D aNewViewInfos; std::unique_ptr<drawinglayer::processor2d::BaseProcessor2D> pProcessor( drawinglayer::processor2d::createBaseProcessor2DFromOutputDevice(rRenderContext, aNewViewInfos)); // Compute the start and end points - const Rectangle aRect(Rectangle(Point(0, 0), rRenderContext.PixelToLogic(GetSizePixel()))); + const tools::Rectangle aRect(tools::Rectangle(Point(0, 0), rRenderContext.PixelToLogic(GetSizePixel()))); double nHalfWidth = double(aRect.Top() + aRect.Bottom()) / 2.0; basegfx::B2DPoint aStart(double(aRect.Left()), nHalfWidth); diff --git a/sw/source/uibase/docvw/FrameControlsManager.cxx b/sw/source/uibase/docvw/FrameControlsManager.cxx index 15d663361d37..a16193227b1d 100644 --- a/sw/source/uibase/docvw/FrameControlsManager.cxx +++ b/sw/source/uibase/docvw/FrameControlsManager.cxx @@ -126,7 +126,7 @@ void SwFrameControlsManager::SetHeaderFooterControl( const SwPageFrame* pPageFra pControl.swap( pNewControl ); } - Rectangle aPageRect = m_pEditWin->LogicToPixel( pPageFrame->Frame().SVRect() ); + tools::Rectangle aPageRect = m_pEditWin->LogicToPixel( pPageFrame->Frame().SVRect() ); SwHeaderFooterWin* pWin = dynamic_cast<SwHeaderFooterWin *>(pControl->GetWindow()); assert( pWin != nullptr) ; diff --git a/sw/source/uibase/docvw/HeaderFooterWin.cxx b/sw/source/uibase/docvw/HeaderFooterWin.cxx index b7c7fecf02c3..f686d8c4fc04 100644 --- a/sw/source/uibase/docvw/HeaderFooterWin.cxx +++ b/sw/source/uibase/docvw/HeaderFooterWin.cxx @@ -80,7 +80,7 @@ namespace return basegfx::tools::hsl2rgb( aHslDark ); } - B2DPolygon lcl_GetPolygon( const Rectangle& rRect, bool bHeader ) + B2DPolygon lcl_GetPolygon( const ::tools::Rectangle& rRect, bool bHeader ) { const double nRadius = 3; const double nKappa((M_SQRT2 - 1.0) * 4.0 / 3.0); @@ -199,9 +199,9 @@ void SwHeaderFooterWin::SetOffset(Point aOffset, long nXLineStart, long nXLineEn m_sLabel = m_sLabel.replaceAt(nPos, 2, pDesc->GetName()); // Compute the text size and get the box position & size from it - Rectangle aTextRect; + ::tools::Rectangle aTextRect; GetTextBoundRect(aTextRect, OUString(m_sLabel)); - Rectangle aTextPxRect = LogicToPixel(aTextRect); + ::tools::Rectangle aTextPxRect = LogicToPixel(aTextRect); FontMetric aFontMetric = GetFontMetric(GetFont()); Size aBoxSize (aTextPxRect.GetWidth() + BUTTON_WIDTH + TEXT_PADDING * 2, aFontMetric.GetLineHeight() + TEXT_PADDING * 2 ); @@ -243,23 +243,23 @@ void SwHeaderFooterWin::ShowAll(bool bShow) bool SwHeaderFooterWin::Contains( const Point &rDocPt ) const { - Rectangle aRect(GetPosPixel(), GetSizePixel()); + ::tools::Rectangle aRect(GetPosPixel(), GetSizePixel()); if (aRect.IsInside(rDocPt)) return true; - Rectangle aLineRect(m_pLine->GetPosPixel(), m_pLine->GetSizePixel()); + ::tools::Rectangle aLineRect(m_pLine->GetPosPixel(), m_pLine->GetSizePixel()); if (aLineRect.IsInside(rDocPt)) return true; return false; } -void SwHeaderFooterWin::Paint(vcl::RenderContext& rRenderContext, const Rectangle&) +void SwHeaderFooterWin::Paint(vcl::RenderContext& rRenderContext, const ::tools::Rectangle&) { // Use pixels for the rest of the drawing SetMapMode(MapMode(MapUnit::MapPixel)); - const Rectangle aRect(Rectangle(Point(0, 0), rRenderContext.PixelToLogic(GetSizePixel()))); + const ::tools::Rectangle aRect(::tools::Rectangle(Point(0, 0), rRenderContext.PixelToLogic(GetSizePixel()))); drawinglayer::primitive2d::Primitive2DContainer aSeq(3); B2DPolygon aPolygon = lcl_GetPolygon(aRect, m_bIsHeader); diff --git a/sw/source/uibase/docvw/PageBreakWin.cxx b/sw/source/uibase/docvw/PageBreakWin.cxx index 2ec1f3f0dae1..dcf4b0801088 100644 --- a/sw/source/uibase/docvw/PageBreakWin.cxx +++ b/sw/source/uibase/docvw/PageBreakWin.cxx @@ -134,9 +134,9 @@ void SwPageBreakWin::dispose() SwFrameMenuButtonBase::dispose(); } -void SwPageBreakWin::Paint(vcl::RenderContext& rRenderContext, const Rectangle&) +void SwPageBreakWin::Paint(vcl::RenderContext& rRenderContext, const ::tools::Rectangle&) { - const Rectangle aRect(Rectangle(Point(0, 0), rRenderContext.PixelToLogic(GetSizePixel()))); + const ::tools::Rectangle aRect(::tools::Rectangle(Point(0, 0), rRenderContext.PixelToLogic(GetSizePixel()))); // Properly paint the control BColor aColor = SwViewOption::GetPageBreakColor().getBColor(); @@ -342,13 +342,13 @@ void SwPageBreakWin::UpdatePosition( const Point* pEvtPt ) while ( pPrevPage && ( ( pPrevPage->Frame().Top( ) == pPageFrame->Frame().Top( ) ) || static_cast< const SwPageFrame* >( pPrevPage )->IsEmptyPage( ) ) ); - Rectangle aBoundRect = GetEditWin()->LogicToPixel( pPageFrame->GetBoundRect(GetEditWin()).SVRect() ); - Rectangle aFrameRect = GetEditWin()->LogicToPixel( pPageFrame->Frame().SVRect() ); + ::tools::Rectangle aBoundRect = GetEditWin()->LogicToPixel( pPageFrame->GetBoundRect(GetEditWin()).SVRect() ); + ::tools::Rectangle aFrameRect = GetEditWin()->LogicToPixel( pPageFrame->Frame().SVRect() ); long nYLineOffset = ( aBoundRect.Top() + aFrameRect.Top() ) / 2; if ( pPrevPage ) { - Rectangle aPrevFrameRect = GetEditWin()->LogicToPixel( pPrevPage->Frame().SVRect() ); + ::tools::Rectangle aPrevFrameRect = GetEditWin()->LogicToPixel( pPrevPage->Frame().SVRect() ); nYLineOffset = ( aPrevFrameRect.Bottom() + aFrameRect.Top() ) / 2; } @@ -369,7 +369,7 @@ void SwPageBreakWin::UpdatePosition( const Point* pEvtPt ) Size aBtnSize( BUTTON_WIDTH + ARROW_WIDTH, BUTTON_HEIGHT ); // Place the button on the left or right? - Rectangle aVisArea = GetEditWin()->LogicToPixel( GetEditWin()->GetView().GetVisArea() ); + ::tools::Rectangle aVisArea = GetEditWin()->LogicToPixel( GetEditWin()->GetView().GetVisArea() ); long nLineLeft = std::max( nPgLeft, aVisArea.Left() ); long nLineRight = std::min( nPgRight, aVisArea.Right() ); @@ -402,11 +402,11 @@ void SwPageBreakWin::ShowAll( bool bShow ) bool SwPageBreakWin::Contains( const Point &rDocPt ) const { - Rectangle aRect( GetPosPixel(), GetSizePixel() ); + ::tools::Rectangle aRect( GetPosPixel(), GetSizePixel() ); if ( aRect.IsInside( rDocPt ) ) return true; - Rectangle aLineRect( m_pLine->GetPosPixel(), m_pLine->GetSizePixel() ); + ::tools::Rectangle aLineRect( m_pLine->GetPosPixel(), m_pLine->GetSizePixel() ); if ( aLineRect.IsInside( rDocPt ) ) return true; diff --git a/sw/source/uibase/docvw/PostItMgr.cxx b/sw/source/uibase/docvw/PostItMgr.cxx index dae084be2eec..c5e3b99d5f1c 100644 --- a/sw/source/uibase/docvw/PostItMgr.cxx +++ b/sw/source/uibase/docvw/PostItMgr.cxx @@ -153,7 +153,7 @@ namespace { const SwPostItField* pField = pWin->GetPostItField(); const SwRect& aRect = pWin->GetAnchorRect(); - const Rectangle aSVRect(aRect.Pos().getX(), + const tools::Rectangle aSVRect(aRect.Pos().getX(), aRect.Pos().getY(), aRect.Pos().getX() + aRect.SSize().Width(), aRect.Pos().getY() + aRect.SSize().Height()); @@ -971,7 +971,7 @@ void SwPostItMgr::DrawNotesForPage(OutputDevice *pOutDev, sal_uInt32 nPage) } } -void SwPostItMgr::PaintTile(OutputDevice& rRenderContext, const Rectangle& /*rRect*/) +void SwPostItMgr::PaintTile(OutputDevice& rRenderContext, const tools::Rectangle& /*rRect*/) { for (SwSidebarItem* pItem : mvPostItFields) { @@ -987,7 +987,7 @@ void SwPostItMgr::PaintTile(OutputDevice& rRenderContext, const Rectangle& /*rRe aMapMode.SetOrigin(aMapMode.GetOrigin() + aOffset); rRenderContext.SetMapMode(aMapMode); Size aSize(rRenderContext.PixelToLogic(pPostIt->GetSizePixel())); - Rectangle aRectangle(Point(0, 0), aSize); + tools::Rectangle aRectangle(Point(0, 0), aSize); pPostIt->PaintTile(rRenderContext, aRectangle); @@ -1089,7 +1089,7 @@ void SwPostItMgr::MakeVisible(const SwSidebarWin* pPostIt ) } if (aPage!=-1) AutoScroll(pPostIt,aPage); - Rectangle aNoteRect (Point(pPostIt->GetPosPixel().X(),pPostIt->GetPosPixel().Y()-5),pPostIt->GetSizePixel()); + tools::Rectangle aNoteRect (Point(pPostIt->GetPosPixel().X(),pPostIt->GetPosPixel().Y()-5),pPostIt->GetSizePixel()); if (!aNoteRect.IsEmpty()) mpWrtShell->MakeVisible(SwRect(mpEditWin->PixelToLogic(aNoteRect))); } @@ -1125,7 +1125,7 @@ Color SwPostItMgr::GetArrowColor(sal_uInt16 aDirection,unsigned long aPage) cons } } -bool SwPostItMgr::LayoutByPage(std::list<SwSidebarWin*> &aVisiblePostItList, const Rectangle& rBorder, long lNeededHeight) +bool SwPostItMgr::LayoutByPage(std::list<SwSidebarWin*> &aVisiblePostItList, const tools::Rectangle& rBorder, long lNeededHeight) { /*** General layout idea:***/ // - if we have space left, we always move the current one up, @@ -1134,7 +1134,7 @@ bool SwPostItMgr::LayoutByPage(std::list<SwSidebarWin*> &aVisiblePostItList, con // - then the real layout starts //rBorder is the page rect - const Rectangle aBorder = mpEditWin->LogicToPixel(rBorder); + const tools::Rectangle aBorder = mpEditWin->LogicToPixel(rBorder); long lTopBorder = aBorder.Top() + 5; long lBottomBorder = aBorder.Bottom() - 5; const long lVisibleHeight = lBottomBorder - lTopBorder; //aBorder.GetHeight() ; @@ -1847,11 +1847,11 @@ bool SwPostItMgr::IsHit(const Point &aPointPixel) const unsigned long nPageNum = SwPostItHelper::getPageInfo( aPageFrame, pLayout, aPoint ); if( nPageNum ) { - Rectangle aRect; + tools::Rectangle aRect; OSL_ENSURE(mPages.size()>nPageNum-1,"SwPostitMgr:: page container size wrong"); aRect = mPages[nPageNum-1]->eSidebarPosition == sw::sidebarwindows::SidebarPosition::LEFT - ? Rectangle(Point(aPageFrame.Left()-GetSidebarWidth()-GetSidebarBorderWidth(),aPageFrame.Top()),Size(GetSidebarWidth(),aPageFrame.Height())) - : Rectangle( Point(aPageFrame.Right()+GetSidebarBorderWidth(),aPageFrame.Top()) , Size(GetSidebarWidth(),aPageFrame.Height())); + ? tools::Rectangle(Point(aPageFrame.Left()-GetSidebarWidth()-GetSidebarBorderWidth(),aPageFrame.Top()),Size(GetSidebarWidth(),aPageFrame.Height())) + : tools::Rectangle( Point(aPageFrame.Right()+GetSidebarBorderWidth(),aPageFrame.Top()) , Size(GetSidebarWidth(),aPageFrame.Height())); if (aRect.IsInside(aPoint)) { // we hit the note's sidebar @@ -1896,24 +1896,24 @@ vcl::Window* SwPostItMgr::IsHitSidebarWindow(const Point& rPointLogic) return pRet; } -Rectangle SwPostItMgr::GetBottomScrollRect(const unsigned long aPage) const +tools::Rectangle SwPostItMgr::GetBottomScrollRect(const unsigned long aPage) const { SwRect aPageRect = mPages[aPage-1]->mPageRect; Point aPointBottom = mPages[aPage-1]->eSidebarPosition == sw::sidebarwindows::SidebarPosition::LEFT ? Point(aPageRect.Left() - GetSidebarWidth() - GetSidebarBorderWidth() + mpEditWin->PixelToLogic(Size(2,0)).Width(),aPageRect.Bottom()- mpEditWin->PixelToLogic(Size(0,2+GetSidebarScrollerHeight())).Height()) : Point(aPageRect.Right() + GetSidebarBorderWidth() + mpEditWin->PixelToLogic(Size(2,0)).Width(),aPageRect.Bottom()- mpEditWin->PixelToLogic(Size(0,2+GetSidebarScrollerHeight())).Height()); Size aSize(GetSidebarWidth() - mpEditWin->PixelToLogic(Size(4,0)).Width(), mpEditWin->PixelToLogic(Size(0,GetSidebarScrollerHeight())).Height()) ; - return Rectangle(aPointBottom,aSize); + return tools::Rectangle(aPointBottom,aSize); } -Rectangle SwPostItMgr::GetTopScrollRect(const unsigned long aPage) const +tools::Rectangle SwPostItMgr::GetTopScrollRect(const unsigned long aPage) const { SwRect aPageRect = mPages[aPage-1]->mPageRect; Point aPointTop = mPages[aPage-1]->eSidebarPosition == sw::sidebarwindows::SidebarPosition::LEFT ? Point(aPageRect.Left() - GetSidebarWidth() -GetSidebarBorderWidth()+ mpEditWin->PixelToLogic(Size(2,0)).Width(),aPageRect.Top() + mpEditWin->PixelToLogic(Size(0,2)).Height()) : Point(aPageRect.Right() + GetSidebarBorderWidth() + mpEditWin->PixelToLogic(Size(2,0)).Width(),aPageRect.Top() + mpEditWin->PixelToLogic(Size(0,2)).Height()); Size aSize(GetSidebarWidth() - mpEditWin->PixelToLogic(Size(4,0)).Width(), mpEditWin->PixelToLogic(Size(0,GetSidebarScrollerHeight())).Height()) ; - return Rectangle(aPointTop,aSize); + return tools::Rectangle(aPointTop,aSize); } //IMPORTANT: if you change the rects here, also change SwPageFrame::PaintNotesSidebar() @@ -1928,8 +1928,8 @@ bool SwPostItMgr::ScrollbarHit(const unsigned long aPage,const Point &aPoint) ? Point(aPageRect.Left() - GetSidebarWidth()-GetSidebarBorderWidth()+ mpEditWin->PixelToLogic(Size(2,0)).Width(),aPageRect.Top() + mpEditWin->PixelToLogic(Size(0,2)).Height()) : Point(aPageRect.Right()+GetSidebarBorderWidth()+ mpEditWin->PixelToLogic(Size(2,0)).Width(),aPageRect.Top() + mpEditWin->PixelToLogic(Size(0,2)).Height()); - Rectangle aRectBottom(GetBottomScrollRect(aPage)); - Rectangle aRectTop(GetTopScrollRect(aPage)); + tools::Rectangle aRectBottom(GetBottomScrollRect(aPage)); + tools::Rectangle aRectTop(GetTopScrollRect(aPage)); if (aRectBottom.IsInside(aPoint)) { diff --git a/sw/source/uibase/docvw/SidebarScrollBar.cxx b/sw/source/uibase/docvw/SidebarScrollBar.cxx index 45e2732b0e62..bb23abe47369 100644 --- a/sw/source/uibase/docvw/SidebarScrollBar.cxx +++ b/sw/source/uibase/docvw/SidebarScrollBar.cxx @@ -30,9 +30,9 @@ SidebarScrollBar::SidebarScrollBar(SwSidebarWin& rSidebarWin, WinBits nStyle, Sw { } -void SidebarScrollBar::LogicInvalidate(const Rectangle* pRectangle) +void SidebarScrollBar::LogicInvalidate(const tools::Rectangle* pRectangle) { - Rectangle aRectangle; + tools::Rectangle aRectangle; if (!pRectangle) { @@ -41,7 +41,7 @@ void SidebarScrollBar::LogicInvalidate(const Rectangle* pRectangle) MapMode aMapMode = GetMapMode(); aMapMode.SetMapUnit(MapUnit::MapTwip); SetMapMode(aMapMode); - aRectangle = Rectangle(Point(0, 0), PixelToLogic(GetSizePixel())); + aRectangle = tools::Rectangle(Point(0, 0), PixelToLogic(GetSizePixel())); Pop(); } else diff --git a/sw/source/uibase/docvw/SidebarScrollBar.hxx b/sw/source/uibase/docvw/SidebarScrollBar.hxx index dabb6e0c508a..19dae0a8b782 100644 --- a/sw/source/uibase/docvw/SidebarScrollBar.hxx +++ b/sw/source/uibase/docvw/SidebarScrollBar.hxx @@ -29,7 +29,7 @@ class SidebarScrollBar : public ScrollBar protected: /// @see OutputDevice::LogicInvalidate(). - void LogicInvalidate(const Rectangle* pRectangle) override; + void LogicInvalidate(const tools::Rectangle* pRectangle) override; void MouseMove(const MouseEvent& rMouseEvent) override; void MouseButtonUp(const MouseEvent& rMouseEvent) override; public: diff --git a/sw/source/uibase/docvw/SidebarTxtControl.cxx b/sw/source/uibase/docvw/SidebarTxtControl.cxx index 5180568227cf..32d43744524e 100644 --- a/sw/source/uibase/docvw/SidebarTxtControl.cxx +++ b/sw/source/uibase/docvw/SidebarTxtControl.cxx @@ -126,7 +126,7 @@ void SidebarTextControl::RequestHelp(const HelpEvent &rEvt) OUString sText = SW_RESSTR( nResId ) + ": " + aContentAtPos.aFnd.pRedl->GetAuthorString() + " - " + GetAppLangDateTimeString( aContentAtPos.aFnd.pRedl->GetTimeStamp() ); - Help::ShowQuickHelp( this,PixelToLogic(Rectangle(rEvt.GetMousePosPixel(),Size(50,10))),sText); + Help::ShowQuickHelp( this,PixelToLogic(tools::Rectangle(rEvt.GetMousePosPixel(),Size(50,10))),sText); } } @@ -138,7 +138,7 @@ void SidebarTextControl::Draw(OutputDevice* pDev, const Point& rPt, const Size& if ( GetTextView() ) { - GetTextView()->GetOutliner()->Draw(pDev, Rectangle(rPt, aSize)); + GetTextView()->GetOutliner()->Draw(pDev, tools::Rectangle(rPt, aSize)); } if ( mrSidebarWin.GetLayoutStatus()==SwPostItHelper::DELETED ) @@ -155,18 +155,18 @@ void SidebarTextControl::Draw(OutputDevice* pDev, const Point& rPt, const Size& } } -void SidebarTextControl::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) +void SidebarTextControl::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) { if (!rRenderContext.GetSettings().GetStyleSettings().GetHighContrastMode()) { if (mrSidebarWin.IsMouseOverSidebarWin() || HasFocus()) { - rRenderContext.DrawGradient(Rectangle(Point(0,0), rRenderContext.PixelToLogic(GetSizePixel())), + rRenderContext.DrawGradient(tools::Rectangle(Point(0,0), rRenderContext.PixelToLogic(GetSizePixel())), Gradient(GradientStyle::Linear, mrSidebarWin.ColorDark(), mrSidebarWin.ColorDark())); } else { - rRenderContext.DrawGradient(Rectangle(Point(0,0), rRenderContext.PixelToLogic(GetSizePixel())), + rRenderContext.DrawGradient(tools::Rectangle(Point(0,0), rRenderContext.PixelToLogic(GetSizePixel())), Gradient(GradientStyle::Linear, mrSidebarWin.ColorLight(), mrSidebarWin.ColorDark())); } } @@ -189,15 +189,15 @@ void SidebarTextControl::Paint(vcl::RenderContext& rRenderContext, const Rectang } } -void SidebarTextControl::LogicInvalidate(const Rectangle* pRectangle) +void SidebarTextControl::LogicInvalidate(const tools::Rectangle* pRectangle) { - Rectangle aRectangle; + tools::Rectangle aRectangle; if (!pRectangle) { Push(PushFlags::MAPMODE); EnableMapMode(); - aRectangle = Rectangle(Point(0, 0), PixelToLogic(GetSizePixel())); + aRectangle = tools::Rectangle(Point(0, 0), PixelToLogic(GetSizePixel())); Pop(); } else @@ -314,7 +314,7 @@ void SidebarTextControl::MouseMove( const MouseEvent& rMEvt ) sURL = SwViewShell::GetShellRes()->aLinkCtrlClick + ": " + sURL; else sURL = SwViewShell::GetShellRes()->aLinkClick + ": " + sURL; - Help::ShowQuickHelp( this,PixelToLogic(Rectangle(GetPosPixel(),Size(50,10))),sURL); + Help::ShowQuickHelp( this,PixelToLogic(tools::Rectangle(GetPosPixel(),Size(50,10))),sURL); } } } diff --git a/sw/source/uibase/docvw/SidebarTxtControl.hxx b/sw/source/uibase/docvw/SidebarTxtControl.hxx index f6e49a4d508a..daf9ab54fba6 100644 --- a/sw/source/uibase/docvw/SidebarTxtControl.hxx +++ b/sw/source/uibase/docvw/SidebarTxtControl.hxx @@ -39,9 +39,9 @@ class SidebarTextControl : public Control SwPostItMgr& mrPostItMgr; protected: - virtual void Paint( vcl::RenderContext& rRenderContext, const Rectangle& rRect) override; + virtual void Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) override; /// @see OutputDevice::LogicInvalidate(). - void LogicInvalidate(const Rectangle* pRectangle) override; + void LogicInvalidate(const tools::Rectangle* pRectangle) override; virtual void Command( const CommandEvent& rCEvt ) override; virtual void LoseFocus() override; virtual void RequestHelp(const HelpEvent &rEvt) override; diff --git a/sw/source/uibase/docvw/SidebarWin.cxx b/sw/source/uibase/docvw/SidebarWin.cxx index 330f0094a007..594a66d41c1d 100644 --- a/sw/source/uibase/docvw/SidebarWin.cxx +++ b/sw/source/uibase/docvw/SidebarWin.cxx @@ -135,7 +135,7 @@ vcl::Window* lcl_getHitWindow(sw::sidebarwindows::SwSidebarWin& rParent, const M Point aPosition(rParent.GetPosPixel()); aPosition.Move(pChild->GetPosPixel().getX(), pChild->GetPosPixel().getY()); Size aSize(rParent.GetSizePixel()); - Rectangle aRectangleLogic(rParent.EditWin().PixelToLogic(aPosition), rParent.EditWin().PixelToLogic(aSize)); + tools::Rectangle aRectangleLogic(rParent.EditWin().PixelToLogic(aPosition), rParent.EditWin().PixelToLogic(aSize)); if (aRectangleLogic.IsInside(rMouseEvent.GetPosPixel())) { pRet = pChild; @@ -276,7 +276,7 @@ void SwSidebarWin::dispose() vcl::Window::dispose(); } -void SwSidebarWin::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) +void SwSidebarWin::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) { Window::Paint(rRenderContext, rRect); @@ -293,7 +293,7 @@ void SwSidebarWin::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rR } rRenderContext.SetLineColor(); - Rectangle aRectangle(Point(mpMetadataAuthor->GetPosPixel().X() + mpMetadataAuthor->GetSizePixel().Width(), + tools::Rectangle aRectangle(Point(mpMetadataAuthor->GetPosPixel().X() + mpMetadataAuthor->GetSizePixel().Width(), mpMetadataAuthor->GetPosPixel().Y()), Size(GetMetaButtonAreaWidth(), mpMetadataAuthor->GetSizePixel().Height() + mpMetadataDate->GetSizePixel().Height())); @@ -306,7 +306,7 @@ void SwSidebarWin::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rR } } -void SwSidebarWin::PaintTile(vcl::RenderContext& rRenderContext, const Rectangle& rRect) +void SwSidebarWin::PaintTile(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) { Paint(rRenderContext, rRect); @@ -367,7 +367,7 @@ void SwSidebarWin::PaintTile(vcl::RenderContext& rRenderContext, const Rectangle bool SwSidebarWin::IsHitWindow(const Point& rPointLogic) { - Rectangle aRectangleLogic(EditWin().PixelToLogic(GetPosPixel()), EditWin().PixelToLogic(GetSizePixel())); + tools::Rectangle aRectangleLogic(EditWin().PixelToLogic(GetPosPixel()), EditWin().PixelToLogic(GetSizePixel())); return aRectangleLogic.IsInside(rPointLogic); } @@ -390,7 +390,7 @@ void SwSidebarWin::Draw(OutputDevice* pDev, const Point& rPt, const Size& rSz, D { pDev->SetFillColor(mColorDark); pDev->SetLineColor(); - pDev->DrawRect( Rectangle( rPt, rSz ) ); + pDev->DrawRect( tools::Rectangle( rPt, rSz ) ); } if (mpMetadataAuthor->IsVisible()) @@ -510,7 +510,7 @@ void SwSidebarWin::MouseButtonUp(const MouseEvent& rMouseEvent) void SwSidebarWin::SetPosSizePixelRect(long nX, long nY, long nWidth, long nHeight, const SwRect& aAnchorRect, const long aPageBorder) { - mPosSize = Rectangle(Point(nX,nY),Size(nWidth,nHeight)); + mPosSize = tools::Rectangle(Point(nX,nY),Size(nWidth,nHeight)); if (!mAnchorRect.IsEmpty() && mAnchorRect != aAnchorRect) mbAnchorRectChanged = true; mAnchorRect = aAnchorRect; @@ -524,7 +524,7 @@ void SwSidebarWin::SetSize( const Size& rNewSize ) void SwSidebarWin::SetVirtualPosSize( const Point& aPoint, const Size& aSize) { - mPosSize = Rectangle(aPoint,aSize); + mPosSize = tools::Rectangle(aPoint,aSize); } void SwSidebarWin::TranslateTopPosition(const long aAmount) @@ -613,7 +613,7 @@ void SwSidebarWin::InitControls() mpOutlinerView = new OutlinerView ( mpOutliner, mpSidebarTextControl ); mpOutlinerView->SetBackgroundColor(COL_TRANSPARENT); mpOutliner->InsertView(mpOutlinerView ); - mpOutlinerView->SetOutputArea( PixelToLogic( Rectangle(0,0,1,1) ) ); + mpOutlinerView->SetOutputArea( PixelToLogic( tools::Rectangle(0,0,1,1) ) ); mpOutlinerView->SetAttribs(DefaultItem()); @@ -927,7 +927,7 @@ void SwSidebarWin::SetPosAndSize() SwRects* pRects(pTmpCursorForAnnotationTextRange.get()); for(SwRect & rNextRect : *pRects) { - const Rectangle aPntRect(rNextRect.SVRect()); + const tools::Rectangle aPntRect(rNextRect.SVRect()); maAnnotationTextRanges.push_back(basegfx::B2DRange( aPntRect.Left(), aPntRect.Top(), aPntRect.Right() + 1, aPntRect.Bottom() + 1)); @@ -1004,9 +1004,9 @@ void SwSidebarWin::DoResize() mpOutliner->SetPaperSize( PixelToLogic( Size(aWidth,aHeight) ) ) ; if (!mpVScrollbar->IsVisible()) { // if we do not have a scrollbar anymore, we want to see the complete text - mpOutlinerView->SetVisArea( PixelToLogic( Rectangle(0,0,aWidth,aHeight) ) ); + mpOutlinerView->SetVisArea( PixelToLogic( tools::Rectangle(0,0,aWidth,aHeight) ) ); } - mpOutlinerView->SetOutputArea( PixelToLogic( Rectangle(0,0,aWidth,aHeight) ) ); + mpOutlinerView->SetOutputArea( PixelToLogic( tools::Rectangle(0,0,aWidth,aHeight) ) ); if (!AllSettings::GetLayoutRTL()) { @@ -1032,11 +1032,11 @@ void SwSidebarWin::DoResize() const Fraction& fy( GetMapMode().GetScaleY() ); const Point aPos( mpMetadataAuthor->GetPosPixel()); - Rectangle aRectMetaButton; + tools::Rectangle aRectMetaButton; if (IsPreview()) { aRectMetaButton = PixelToLogic( - Rectangle( Point( aPos.X()+GetSizePixel().Width()-(METABUTTON_WIDTH*4+10)*fx.GetNumerator()/fx.GetDenominator(), + tools::Rectangle( Point( aPos.X()+GetSizePixel().Width()-(METABUTTON_WIDTH*4+10)*fx.GetNumerator()/fx.GetDenominator(), aPos.Y()+5*fy.GetNumerator()/fy.GetDenominator() ), Size( METABUTTON_WIDTH*4*fx.GetNumerator()/fx.GetDenominator(), METABUTTON_HEIGHT*fy.GetNumerator()/fy.GetDenominator() ) ) ); @@ -1044,14 +1044,14 @@ void SwSidebarWin::DoResize() else { aRectMetaButton = PixelToLogic( - Rectangle( Point( aPos.X()+GetSizePixel().Width()-(METABUTTON_WIDTH+10)*fx.GetNumerator()/fx.GetDenominator(), + tools::Rectangle( Point( aPos.X()+GetSizePixel().Width()-(METABUTTON_WIDTH+10)*fx.GetNumerator()/fx.GetDenominator(), aPos.Y()+5*fy.GetNumerator()/fy.GetDenominator() ), Size( METABUTTON_WIDTH*fx.GetNumerator()/fx.GetDenominator(), METABUTTON_HEIGHT*fy.GetNumerator()/fy.GetDenominator() ) ) ); } { - const Rectangle aRectMetaButtonPixel( LogicToPixel( aRectMetaButton ) ); + const tools::Rectangle aRectMetaButtonPixel( LogicToPixel( aRectMetaButton ) ); mpMenuButton->setPosSizePixel( aRectMetaButtonPixel.Left(), aRectMetaButtonPixel.Top(), aRectMetaButtonPixel.GetWidth(), diff --git a/sw/source/uibase/docvw/edtdd.cxx b/sw/source/uibase/docvw/edtdd.cxx index fa6c3caf8370..59badc65b7ca 100644 --- a/sw/source/uibase/docvw/edtdd.cxx +++ b/sw/source/uibase/docvw/edtdd.cxx @@ -198,7 +198,7 @@ sal_Int8 SwEditWin::ExecuteDrop( const ExecuteDropEvent& rEvt ) if( pObj && nullptr != ( pOLV = rSh.GetDrawView()->GetTextEditOutlinerView() )) { - Rectangle aRect( pOLV->GetOutputArea() ); + tools::Rectangle aRect( pOLV->GetOutputArea() ); aRect.Union( pObj->GetLogicRect() ); const Point aPos = pOLV->GetWindow()->PixelToLogic(rEvt.maPosPixel); if ( aRect.IsInside(aPos) ) @@ -258,7 +258,7 @@ SotExchangeDest SwEditWin::GetDropDestination( const Point& rPixPnt, SdrObject * OutlinerView* pOLV = rSh.GetDrawView()->GetTextEditOutlinerView(); if ( pOLV ) { - Rectangle aRect( pOLV->GetOutputArea() ); + tools::Rectangle aRect( pOLV->GetOutputArea() ); aRect.Union( pObj->GetLogicRect() ); const Point aPos = pOLV->GetWindow()->PixelToLogic( rPixPnt ); if( aRect.IsInside( aPos ) ) @@ -335,7 +335,7 @@ sal_Int8 SwEditWin::AcceptDrop( const AcceptDropEvent& rEvt ) // If the cursor is near the inner boundary // we attempt to scroll towards the desired direction. Point aPoint; - Rectangle aWin(aPoint,GetOutputSizePixel()); + tools::Rectangle aWin(aPoint,GetOutputSizePixel()); const int nMargin = 10; aWin.Left() += nMargin; aWin.Top() += nMargin; diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx index 48be93a38f96..208530981e44 100644 --- a/sw/source/uibase/docvw/edtwin.cxx +++ b/sw/source/uibase/docvw/edtwin.cxx @@ -369,7 +369,7 @@ void SwEditWin::UpdatePointer(const Point &rLPt, sal_uInt16 nModifier ) dynamic_cast<const SwFlyFrameFormat*>( pFormat) ) { //turn on highlight for frame - Rectangle aTmp( pRect->SVRect() ); + tools::Rectangle aTmp( pRect->SVRect() ); if ( !m_pUserMarker ) { @@ -401,7 +401,7 @@ void SwEditWin::UpdatePointer(const Point &rLPt, sal_uInt16 nModifier ) ? PointerStyle::ChainNotAllowed : PointerStyle::Chain; if ( nChainable == SwChainRet::OK ) { - Rectangle aTmp( aRect.SVRect() ); + tools::Rectangle aTmp( aRect.SVRect() ); if ( !m_pUserMarker ) { @@ -626,7 +626,7 @@ IMPL_LINK_NOARG(SwEditWin, TimerHandler, Timer *, void) if ( m_bInsDraw ) { const int nMaxScroll = 40; - m_rView.Scroll( Rectangle(aModPt,Size(1,1)), nMaxScroll, nMaxScroll); + m_rView.Scroll( tools::Rectangle(aModPt,Size(1,1)), nMaxScroll, nMaxScroll); bDone = true; } else if ( g_bFrameDrag ) @@ -667,7 +667,7 @@ IMPL_LINK_NOARG(SwEditWin, TimerHandler, Timer *, void) void SwEditWin::JustifyAreaTimer() { - const Rectangle &rVisArea = GetView().GetVisArea(); + const tools::Rectangle &rVisArea = GetView().GetVisArea(); #ifdef UNX const long coMinLen = 100; #else @@ -3825,7 +3825,7 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt) { Point aDD( SwEditWin::m_nDDStartPosX, SwEditWin::m_nDDStartPosY ); aDD = LogicToPixel( aDD ); - Rectangle aRect( aDD.X()-3, aDD.Y()-3, aDD.X()+3, aDD.Y()+3 ); + tools::Rectangle aRect( aDD.X()-3, aDD.Y()-3, aDD.X()+3, aDD.Y()+3 ); if ( !aRect.IsInside( aPixPt ) ) StopDDTimer( &rSh, aDocPt ); } @@ -4456,7 +4456,7 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt) if ( rMEvt.IsMod1() ) // copy and don't move. { // abort drag, use internal Copy instead - Rectangle aRect; + tools::Rectangle aRect; rSh.GetDrawView()->TakeActionRect( aRect ); if (!aRect.IsEmpty()) { @@ -5595,19 +5595,19 @@ void SwEditWin::Command( const CommandEvent& rCEvt ) { // When the composition does not exist, use Caret rect instead. SwRect aCaretRect ( rSh.GetCharRect() ); - Rectangle aRect( aCaretRect.Left(), aCaretRect.Top(), aCaretRect.Right(), aCaretRect.Bottom() ); + tools::Rectangle aRect( aCaretRect.Left(), aCaretRect.Top(), aCaretRect.Right(), aCaretRect.Bottom() ); rWin.SetCompositionCharRect( &aRect, 1, bVertical ); } else { - std::unique_ptr<Rectangle[]> aRects(new Rectangle[ nSize ]); + std::unique_ptr<tools::Rectangle[]> aRects(new tools::Rectangle[ nSize ]); int nRectIndex = 0; for ( SwIndex nIndex = rStart.nContent; nIndex < rEnd.nContent; ++nIndex ) { const SwPosition aPos( rStart.nNode, nIndex ); SwRect aRect ( rSh.GetCharRect() ); rSh.GetCharRectAt( aRect, &aPos ); - aRects[ nRectIndex ] = Rectangle( aRect.Left(), aRect.Top(), aRect.Right(), aRect.Bottom() ); + aRects[ nRectIndex ] = tools::Rectangle( aRect.Left(), aRect.Top(), aRect.Right(), aRect.Bottom() ); ++nRectIndex; } rWin.SetCompositionCharRect( aRects.get(), nSize, bVertical ); @@ -5662,7 +5662,7 @@ void SwEditWin::SelectMenuPosition(SwWrtShell& rSh, const Point& rMousePos ) bool bVertical = pOutliner->IsVertical(); const EditEngine& rEditEng = pOutliner->GetEditEngine(); Point aEEPos(aDocPos); - const Rectangle& rOutputArea = pOLV->GetOutputArea(); + const tools::Rectangle& rOutputArea = pOLV->GetOutputArea(); // regard vertical mode if(bVertical) { @@ -5955,7 +5955,7 @@ void QuickHelpData::Start( SwWrtShell& rSh, sal_uInt16 nWrdLen ) Point aPt( rWin.OutputToScreenPixel( rWin.LogicToPixel( rSh.GetCharRect().Pos() ))); aPt.Y() -= 3; - nTipId = Help::ShowPopover(&rWin, Rectangle( aPt, Size( 1, 1 )), + nTipId = Help::ShowPopover(&rWin, tools::Rectangle( aPt, Size( 1, 1 )), m_aHelpStrings[ nCurArrPos ], QuickHelpFlags::Left | QuickHelpFlags::Bottom); } @@ -6344,7 +6344,7 @@ Selection SwEditWin::GetSurroundingTextSelection() const } } -void SwEditWin::LogicInvalidate(const Rectangle* pRectangle) +void SwEditWin::LogicInvalidate(const tools::Rectangle* pRectangle) { OString sRectangle; if (!pRectangle) diff --git a/sw/source/uibase/docvw/edtwin2.cxx b/sw/source/uibase/docvw/edtwin2.cxx index 598bf0d8ba66..21b5d2484011 100644 --- a/sw/source/uibase/docvw/edtwin2.cxx +++ b/sw/source/uibase/docvw/edtwin2.cxx @@ -365,7 +365,7 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt) } if (!sText.isEmpty()) { - Rectangle aRect( aFieldRect.SVRect() ); + tools::Rectangle aRect( aFieldRect.SVRect() ); Point aPt( OutputToScreenPixel( LogicToPixel( aRect.TopLeft() ))); aRect.Left() = aPt.X(); aRect.Top() = aPt.Y(); @@ -420,7 +420,7 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt) { sText = SW_RESSTR(nTabRes); Size aTextSize( GetTextWidth(sText), GetTextHeight()); - Rectangle aRect(rEvt.GetMousePosPixel(), aTextSize); + tools::Rectangle aRect(rEvt.GetMousePosPixel(), aTextSize); OUString sDisplayText(ClipLongToolTip(sText)); Help::ShowQuickHelp(this, aRect, sDisplayText); } @@ -442,7 +442,7 @@ void SwEditWin::PrePaint(vcl::RenderContext& /*rRenderContext*/) } } -void SwEditWin::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) +void SwEditWin::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) { SwWrtShell* pWrtShell = GetView().GetWrtShellPtr(); if(!pWrtShell) @@ -450,7 +450,7 @@ void SwEditWin::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect bool bPaintShadowCursor = false; if( m_pShadCursor ) { - Rectangle aRect( m_pShadCursor->GetRect()); + tools::Rectangle aRect( m_pShadCursor->GetRect()); // fully resides inside? if( rRect.IsInside( aRect ) ) { diff --git a/sw/source/uibase/docvw/srcedtw.cxx b/sw/source/uibase/docvw/srcedtw.cxx index 71922d57bfe8..26c6d5bcde8d 100644 --- a/sw/source/uibase/docvw/srcedtw.cxx +++ b/sw/source/uibase/docvw/srcedtw.cxx @@ -490,7 +490,7 @@ void TextViewOutWin::KeyInput( const KeyEvent& rKEvt ) } } -void TextViewOutWin::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) +void TextViewOutWin::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) { pTextView->Paint(rRenderContext, rRect); } diff --git a/sw/source/uibase/frmdlg/colex.cxx b/sw/source/uibase/frmdlg/colex.cxx index 412c0cd9b32d..96a76fe4437e 100644 --- a/sw/source/uibase/frmdlg/colex.cxx +++ b/sw/source/uibase/frmdlg/colex.cxx @@ -230,14 +230,14 @@ void SwColExample::DrawPage(vcl::RenderContext& rRenderContext, const Point& rOr } rRenderContext.SetFillColor(Color(COL_LIGHTGRAY)); - Rectangle aRect; + tools::Rectangle aRect; aRect.Right() = rOrg.X() + GetSize().Width() - nR; aRect.Left() = rOrg.X() + nL; aRect.Top() = rOrg.Y() + GetTop() + GetHdHeight() + GetHdDist(); aRect.Bottom()= rOrg.Y() + GetSize().Height() - GetBottom() - GetFtHeight() - GetFtDist(); rRenderContext.DrawRect(aRect); - const Rectangle aDefineRect(aRect); + const tools::Rectangle aDefineRect(aRect); const drawinglayer::attribute::SdrAllFillAttributesHelperPtr& rFillAttributes = getPageFillAttributes(); if (!rFillAttributes.get() || !rFillAttributes->isUsed()) @@ -373,7 +373,7 @@ SwColumnOnlyExample::SwColumnOnlyExample(vcl::Window* pParent) VCL_BUILDER_FACTORY(SwColumnOnlyExample) -void SwColumnOnlyExample::Paint(vcl::RenderContext& rRenderContext, const Rectangle& /*rRect*/) +void SwColumnOnlyExample::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& /*rRect*/) { const StyleSettings& rStyleSettings = rRenderContext.GetSettings().GetStyleSettings(); const Color& rFieldColor = rStyleSettings.GetFieldColor(); @@ -384,7 +384,7 @@ void SwColumnOnlyExample::Paint(vcl::RenderContext& rRenderContext, const Rectan aGrayColor.Invert(); Size aLogSize(rRenderContext.PixelToLogic(GetOutputSizePixel())); - Rectangle aCompleteRect(Point(0,0), aLogSize); + tools::Rectangle aCompleteRect(Point(0,0), aLogSize); rRenderContext.SetLineColor(rDlgColor); rRenderContext.SetFillColor(rDlgColor); rRenderContext.DrawRect(aCompleteRect); @@ -392,11 +392,11 @@ void SwColumnOnlyExample::Paint(vcl::RenderContext& rRenderContext, const Rectan rRenderContext.SetLineColor(rFieldTextColor); Point aTL((aLogSize.Width() - m_aFrameSize.Width()) / 2, (aLogSize.Height() - m_aFrameSize.Height()) / 2); - Rectangle aRect(aTL, m_aFrameSize); + tools::Rectangle aRect(aTL, m_aFrameSize); //draw a shadow rectangle rRenderContext.SetFillColor(Color(COL_GRAY)); - Rectangle aShadowRect(aRect); + tools::Rectangle aShadowRect(aRect); aShadowRect.Move(aTL.Y(), aTL.Y()); rRenderContext.DrawRect(aShadowRect); @@ -438,7 +438,7 @@ void SwColumnOnlyExample::Paint(vcl::RenderContext& rRenderContext, const Rectan { rRenderContext.DrawRect(aRect); rRenderContext.SetFillColor(rFieldColor); - Rectangle aFrameRect(aTL, m_aFrameSize); + tools::Rectangle aFrameRect(aTL, m_aFrameSize); long nSum = aTL.X(); for (sal_uInt16 i = 0; i < nColCount; i++) { @@ -547,7 +547,7 @@ void SwPageGridExample::DrawPage(vcl::RenderContext& rRenderContext, const Point nR = GetLeft(); } - Rectangle aRect; + tools::Rectangle aRect; aRect.Right() = rOrg.X() + GetSize().Width() - nR; aRect.Left() = rOrg.X() + nL; aRect.Top() = rOrg.Y() + GetTop() + GetHdHeight() + GetHdDist(); @@ -558,11 +558,11 @@ void SwPageGridExample::DrawPage(vcl::RenderContext& rRenderContext, const Point sal_Int32 nRubyHeight = pGridItem->GetRubyHeight() * 3; //detect height of rectangles - Rectangle aRubyRect(aRect.TopLeft(), + tools::Rectangle aRubyRect(aRect.TopLeft(), m_bVertical ? Size(nRubyHeight, aRect.GetHeight()) : Size(aRect.GetWidth(), nRubyHeight)); - Rectangle aCharRect(aRect.TopLeft(), + tools::Rectangle aCharRect(aRect.TopLeft(), m_bVertical ? Size(nBaseHeight, aRect.GetHeight()) : Size(aRect.GetWidth(), nBaseHeight)); diff --git a/sw/source/uibase/inc/DashedLine.hxx b/sw/source/uibase/inc/DashedLine.hxx index a070754aa850..6b01a342b9c9 100644 --- a/sw/source/uibase/inc/DashedLine.hxx +++ b/sw/source/uibase/inc/DashedLine.hxx @@ -22,7 +22,7 @@ public: SwDashedLine( vcl::Window* pParent, Color& ( *pColorFn )() ); virtual ~SwDashedLine( ) override; - virtual void Paint( vcl::RenderContext& rRenderContext, const Rectangle& rRect ) override; + virtual void Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect ) override; }; #endif diff --git a/sw/source/uibase/inc/HeaderFooterWin.hxx b/sw/source/uibase/inc/HeaderFooterWin.hxx index 6e9fec7be6a1..ab4d4d343a6e 100644 --- a/sw/source/uibase/inc/HeaderFooterWin.hxx +++ b/sw/source/uibase/inc/HeaderFooterWin.hxx @@ -35,7 +35,7 @@ public: void SetOffset( Point aOffset, long nXLineStart, long nXLineEnd ); - virtual void Paint( vcl::RenderContext& rRenderContext, const Rectangle& rRect ) override; + virtual void Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect ) override; virtual void MouseButtonDown( const MouseEvent& rMEvt ) override; virtual void Select( ) override; diff --git a/sw/source/uibase/inc/PageBreakWin.hxx b/sw/source/uibase/inc/PageBreakWin.hxx index 0f2e7dc8a04f..21e0bbc60757 100644 --- a/sw/source/uibase/inc/PageBreakWin.hxx +++ b/sw/source/uibase/inc/PageBreakWin.hxx @@ -37,7 +37,7 @@ public: virtual ~SwPageBreakWin() override; virtual void dispose() override; - virtual void Paint( vcl::RenderContext& /*rRenderContext*/, const Rectangle& rRect ) override; + virtual void Paint( vcl::RenderContext& /*rRenderContext*/, const tools::Rectangle& rRect ) override; virtual void Select( ) override; virtual void MouseMove( const MouseEvent& rMEvt ) override; virtual void Activate( ) override; diff --git a/sw/source/uibase/inc/bmpwin.hxx b/sw/source/uibase/inc/bmpwin.hxx index 56bf247e5912..909f6c7be291 100644 --- a/sw/source/uibase/inc/bmpwin.hxx +++ b/sw/source/uibase/inc/bmpwin.hxx @@ -35,7 +35,7 @@ private: bool bVert : 1; bool bGraphic : 1; - virtual void Paint(vcl::RenderContext& /*rRenderContext*/, const Rectangle& rRect) override; + virtual void Paint(vcl::RenderContext& /*rRenderContext*/, const tools::Rectangle& rRect) override; virtual Size GetOptimalSize() const override; diff --git a/sw/source/uibase/inc/chartins.hxx b/sw/source/uibase/inc/chartins.hxx index b610bbece966..bb1c6d860e23 100644 --- a/sw/source/uibase/inc/chartins.hxx +++ b/sw/source/uibase/inc/chartins.hxx @@ -19,7 +19,7 @@ #ifndef INCLUDED_SW_SOURCE_UIBASE_INC_CHARTINS_HXX #define INCLUDED_SW_SOURCE_UIBASE_INC_CHARTINS_HXX -Point SwGetChartDialogPos( const vcl::Window *pParentWin, const Size& rDialogSize, const Rectangle& rLogicChart ); +Point SwGetChartDialogPos( const vcl::Window *pParentWin, const Size& rDialogSize, const tools::Rectangle& rLogicChart ); void SwInsertChart( vcl::Window *pParent, SfxBindings *pBindings ); #endif // INCLUDED_SW_SOURCE_UIBASE_INC_CHARTINS_HXX diff --git a/sw/source/uibase/inc/colex.hxx b/sw/source/uibase/inc/colex.hxx index 869b943a10e3..c1c9ce014004 100644 --- a/sw/source/uibase/inc/colex.hxx +++ b/sw/source/uibase/inc/colex.hxx @@ -99,7 +99,7 @@ private: SwFormatCol m_aCols; protected: - virtual void Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) override; + virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) override; public: SwColumnOnlyExample(vcl::Window*); diff --git a/sw/source/uibase/inc/conttree.hxx b/sw/source/uibase/inc/conttree.hxx index f641f9b5cb14..b21e84508c03 100644 --- a/sw/source/uibase/inc/conttree.hxx +++ b/sw/source/uibase/inc/conttree.hxx @@ -114,7 +114,7 @@ class SwContentTree static bool bIsInDrag; bool m_bIsKeySpace; - Rectangle m_aOldRectangle; + tools::Rectangle m_aOldRectangle; /** * Before any data will be deleted, the last active entry has to be found. @@ -158,7 +158,7 @@ protected: SvTreeListEntry*& rpNewParent, sal_uLong& rNewChildPos ) override; - virtual void Paint( vcl::RenderContext& rRenderContext, const Rectangle& rRect ) override; + virtual void Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect ) override; virtual void MouseButtonDown( const MouseEvent& rMEvt ) override; void EditEntry( SvTreeListEntry* pEntry, EditEntryMode nMode ); diff --git a/sw/source/uibase/inc/edtwin.hxx b/sw/source/uibase/inc/edtwin.hxx index 550842735687..8124664f46c2 100644 --- a/sw/source/uibase/inc/edtwin.hxx +++ b/sw/source/uibase/inc/edtwin.hxx @@ -188,7 +188,7 @@ protected: virtual void DataChanged( const DataChangedEvent& ) override; virtual void PrePaint(vcl::RenderContext& rRenderContext) override; - virtual void Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) override; + virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) override; virtual void GetFocus() override; virtual void LoseFocus() override; @@ -295,7 +295,7 @@ public: virtual void Command( const CommandEvent& rCEvt ) override; /// @see OutputDevice::LogicInvalidate(). - void LogicInvalidate(const Rectangle* pRectangle) override; + void LogicInvalidate(const tools::Rectangle* pRectangle) override; /// Same as MouseButtonDown(), but coordinates are in logic unit. void LogicMouseButtonDown(const MouseEvent& rMouseEvent); /// Same as MouseButtonUp(), but coordinates are in logic unit. diff --git a/sw/source/uibase/inc/envlop.hxx b/sw/source/uibase/inc/envlop.hxx index d454715ec010..2e0c43dec906 100644 --- a/sw/source/uibase/inc/envlop.hxx +++ b/sw/source/uibase/inc/envlop.hxx @@ -42,7 +42,7 @@ class Printer; class SwEnvPreview : public vcl::Window { - void Paint(vcl::RenderContext& rRenderContext, const Rectangle&) override; + void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&) override; public: diff --git a/sw/source/uibase/inc/mailmergehelper.hxx b/sw/source/uibase/inc/mailmergehelper.hxx index 263e77fac52f..0f5a36fb2e63 100644 --- a/sw/source/uibase/inc/mailmergehelper.hxx +++ b/sw/source/uibase/inc/mailmergehelper.hxx @@ -65,7 +65,7 @@ class SW_DLLPUBLIC SwAddressPreview : public vcl::Window void DrawText_Impl(vcl::RenderContext& rRenderContext, const OUString& rAddress, const Point& rTopLeft, const Size& rSize, bool bIsSelected); - virtual void Paint(vcl::RenderContext& rRenderContext, const Rectangle&) override; + virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&) override; virtual void Resize() override; virtual void MouseButtonDown( const MouseEvent& rMEvt ) override; virtual void KeyInput( const KeyEvent& rKEvt ) override; diff --git a/sw/source/uibase/inc/navipi.hxx b/sw/source/uibase/inc/navipi.hxx index 534c3ed78c4a..90a20d6ac7ec 100644 --- a/sw/source/uibase/inc/navipi.hxx +++ b/sw/source/uibase/inc/navipi.hxx @@ -156,7 +156,7 @@ public: bool IsGlobalMode() const {return m_bGlobalMode;} SwView* GetCreateView() const; - void CreateNavigationTool(const Rectangle& rRect, bool bSetFocus, vcl::Window *pParent); + void CreateNavigationTool(const tools::Rectangle& rRect, bool bSetFocus, vcl::Window *pParent); }; class SwNavigationChild : public SfxChildWindowContext diff --git a/sw/source/uibase/inc/numprevw.hxx b/sw/source/uibase/inc/numprevw.hxx index 424b3abe4ffd..eb018c078bd9 100644 --- a/sw/source/uibase/inc/numprevw.hxx +++ b/sw/source/uibase/inc/numprevw.hxx @@ -35,7 +35,7 @@ class NumberingPreview : public vcl::Window sal_uInt16 nActLevel; protected: - virtual void Paint( vcl::RenderContext& /*rRenderContext*/, const Rectangle& rRect ) override; + virtual void Paint( vcl::RenderContext& /*rRenderContext*/, const tools::Rectangle& rRect ) override; public: NumberingPreview(vcl::Window* pParent) diff --git a/sw/source/uibase/inc/olmenu.hxx b/sw/source/uibase/inc/olmenu.hxx index a2077cd3baf8..45bfdf2d5eba 100644 --- a/sw/source/uibase/inc/olmenu.hxx +++ b/sw/source/uibase/inc/olmenu.hxx @@ -95,7 +95,7 @@ public: return *m_xPopupMenu.get(); } - void Execute( const Rectangle& rPopupPos, vcl::Window* pWin ); + void Execute( const tools::Rectangle& rPopupPos, vcl::Window* pWin ); void Execute( sal_uInt16 nId ); }; diff --git a/sw/source/uibase/inc/optload.hxx b/sw/source/uibase/inc/optload.hxx index 728c0f0ce4d4..484c7f6318f0 100644 --- a/sw/source/uibase/inc/optload.hxx +++ b/sw/source/uibase/inc/optload.hxx @@ -113,7 +113,7 @@ public: SwCaptionPreview(vcl::Window* pParent, WinBits nStyle); virtual void ApplySettings(vcl::RenderContext& rRenderContext) override; void SetPreviewText( const OUString& rText ); - virtual void Paint( vcl::RenderContext& rRenderContext, const Rectangle& rRect ) override; + virtual void Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect ) override; virtual Size GetOptimalSize() const override; }; diff --git a/sw/source/uibase/inc/optpage.hxx b/sw/source/uibase/inc/optpage.hxx index aaf35150498e..b963128adcde 100644 --- a/sw/source/uibase/inc/optpage.hxx +++ b/sw/source/uibase/inc/optpage.hxx @@ -286,14 +286,14 @@ class SwMarkPreview : public vcl::Window Color m_aTextCol; // text Color m_aPrintAreaCol; // frame for print area - Rectangle aPage; - Rectangle aLeftPagePrtArea; - Rectangle aRightPagePrtArea; + tools::Rectangle aPage; + tools::Rectangle aLeftPagePrtArea; + tools::Rectangle aRightPagePrtArea; sal_uInt16 nMarkPos; - void Paint(vcl::RenderContext& rRenderContext, const Rectangle&) override; - void PaintPage(vcl::RenderContext& rRenderContext, const Rectangle &rRect); + void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&) override; + void PaintPage(vcl::RenderContext& rRenderContext, const tools::Rectangle &rRect); void InitColors(); protected: diff --git a/sw/source/uibase/inc/pview.hxx b/sw/source/uibase/inc/pview.hxx index 0c3445ff4631..08427f6c778a 100644 --- a/sw/source/uibase/inc/pview.hxx +++ b/sw/source/uibase/inc/pview.hxx @@ -53,7 +53,7 @@ class SwPagePreviewWin : public vcl::Window Fraction maScale; SwPagePreview& mrView; bool mbCalcScaleForPreviewLayout; - Rectangle maPaintedPreviewDocRect; + tools::Rectangle maPaintedPreviewDocRect; SwPagePreviewLayout* mpPgPreviewLayout; void SetPagePreview( sal_uInt8 nRow, sal_uInt8 nCol ); @@ -65,7 +65,7 @@ public: virtual ~SwPagePreviewWin() override; // calls SwViewShell::Paint - virtual void Paint( vcl::RenderContext& rRenderContext, const Rectangle& rRect ) override; + virtual void Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect ) override; virtual void KeyInput( const KeyEvent & ) override; virtual void Command( const CommandEvent& rCEvt ) override; virtual void MouseButtonDown(const MouseEvent& rMEvt) override; @@ -136,7 +136,7 @@ public: void AdjustPreviewToNewZoom( const sal_uInt16 _nZoomFactor, const SvxZoomType _eZoomType ); - const Rectangle& GetPaintedPreviewDocRect() const + const tools::Rectangle& GetPaintedPreviewDocRect() const { return maPaintedPreviewDocRect; } @@ -172,7 +172,7 @@ class SW_DLLPUBLIC SwPagePreview: public SfxViewShell // visible range OUString m_sPageStr; Size m_aDocSize; - Rectangle m_aVisArea; + tools::Rectangle m_aVisArea; // MDI control elements VclPtr<SwScrollbar> m_pHScrollbar; @@ -239,7 +239,7 @@ public: void DocSzChgd(const Size& rNewSize); - void SetVisArea( const Rectangle& ); + void SetVisArea( const tools::Rectangle& ); void ScrollViewSzChg(); void ScrollDocSzChg(); diff --git a/sw/source/uibase/inc/scroll.hxx b/sw/source/uibase/inc/scroll.hxx index a2dc6e31b9ef..d279f73fa54f 100644 --- a/sw/source/uibase/inc/scroll.hxx +++ b/sw/source/uibase/inc/scroll.hxx @@ -41,7 +41,7 @@ public: // changing of document size void DocSzChgd(const Size &rNewSize); // changing of visible region - void ViewPortChgd(const Rectangle &rRectangle); + void ViewPortChgd(const tools::Rectangle &rRectangle); // what is it?? bool IsHoriScroll() const { return bHori; } diff --git a/sw/source/uibase/inc/shdwcrsr.hxx b/sw/source/uibase/inc/shdwcrsr.hxx index 46dae2953a6f..bade87e6d821 100644 --- a/sw/source/uibase/inc/shdwcrsr.hxx +++ b/sw/source/uibase/inc/shdwcrsr.hxx @@ -45,7 +45,7 @@ public: void Paint(); - Rectangle GetRect() const; + tools::Rectangle GetRect() const; }; #endif diff --git a/sw/source/uibase/inc/srcedtw.hxx b/sw/source/uibase/inc/srcedtw.hxx index a94e10af1f33..ef9f90a096f8 100644 --- a/sw/source/uibase/inc/srcedtw.hxx +++ b/sw/source/uibase/inc/srcedtw.hxx @@ -43,7 +43,7 @@ class TextViewOutWin : public vcl::Window TextView* pTextView; 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& rKeyEvt ) override; virtual void MouseMove( const MouseEvent& rMEvt ) override; virtual void MouseButtonDown( const MouseEvent& rMEvt ) override; diff --git a/sw/source/uibase/inc/swruler.hxx b/sw/source/uibase/inc/swruler.hxx index 824eaca10642..c8f1deb12842 100644 --- a/sw/source/uibase/inc/swruler.hxx +++ b/sw/source/uibase/inc/swruler.hxx @@ -40,7 +40,7 @@ public: * Paint the ruler. * \param rRect ignored */ - virtual void Paint( vcl::RenderContext& rRenderContext, const Rectangle& rRect ) override; + virtual void Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect ) override; protected: SwViewShell * mpViewShell; //< Shell to check if there is any comments on doc and their visibility @@ -82,7 +82,7 @@ protected: * It is horizontally aligned to the SideBar panel. * \return The area where the comment control is. */ - Rectangle GetCommentControlRegion(); + tools::Rectangle GetCommentControlRegion(); /** * Paint the comment control on VirtualDevice. diff --git a/sw/source/uibase/lingu/olmenu.cxx b/sw/source/uibase/lingu/olmenu.cxx index b8d3c886f0b3..86aa66d8cc46 100644 --- a/sw/source/uibase/lingu/olmenu.cxx +++ b/sw/source/uibase/lingu/olmenu.cxx @@ -660,7 +660,7 @@ void SwSpellPopup::checkRedline() } } -void SwSpellPopup::Execute( const Rectangle& rWordPos, vcl::Window* pWin ) +void SwSpellPopup::Execute( const tools::Rectangle& rWordPos, vcl::Window* pWin ) { sal_uInt16 nRet = m_xPopupMenu->Execute(pWin, pWin->LogicToPixel(rWordPos)); Execute( nRet ); diff --git a/sw/source/uibase/lingu/sdrhhcwrap.cxx b/sw/source/uibase/lingu/sdrhhcwrap.cxx index 109e6d20d1f6..ee42ddec3339 100644 --- a/sw/source/uibase/lingu/sdrhhcwrap.cxx +++ b/sw/source/uibase/lingu/sdrhhcwrap.cxx @@ -80,7 +80,7 @@ SdrHHCWrapper::SdrHHCWrapper( SwView* pVw, InsertView( pOutlView ); Point aPoint( 0, 0 ); - Rectangle aRect( aPoint, aSize ); + tools::Rectangle aRect( aPoint, aSize ); pOutlView->SetOutputArea( aRect ); // SetText( NULL ); ClearModifyFlag(); @@ -94,7 +94,7 @@ SdrHHCWrapper::~SdrHHCWrapper() OSL_ENSURE( pSdrView, "SdrHHCWrapper without DrawView?" ); pSdrView->SdrEndTextEdit( true ); SetUpdateMode(false); - pOutlView->SetOutputArea( Rectangle( Point(), Size(1, 1) ) ); + pOutlView->SetOutputArea( tools::Rectangle( Point(), Size(1, 1) ) ); } RemoveView( pOutlView ); delete pOutlView; @@ -115,7 +115,7 @@ bool SdrHHCWrapper::ConvertNextDocument() OSL_ENSURE( pSdrView, "SdrHHCWrapper without DrawView?" ); pSdrView->SdrEndTextEdit( true ); SetUpdateMode(false); - pOutlView->SetOutputArea( Rectangle( Point(), Size(1, 1) ) ); + pOutlView->SetOutputArea( tools::Rectangle( Point(), Size(1, 1) ) ); SetPaperSize( Size(1, 1) ); Clear(); pTextObj = nullptr; @@ -151,7 +151,7 @@ bool SdrHHCWrapper::ConvertNextDocument() SdrPageView* pPV = pSdrView->GetSdrPageView(); nDocIndex = n; bNextDoc = true; - pOutlView->SetOutputArea( Rectangle( Point(), Size(1,1))); + pOutlView->SetOutputArea( tools::Rectangle( Point(), Size(1,1))); SetPaperSize( pTextObj->GetLogicRect().GetSize() ); SetUpdateMode(true); pView->GetWrtShell().MakeVisible(pTextObj->GetLogicRect()); diff --git a/sw/source/uibase/misc/swruler.cxx b/sw/source/uibase/misc/swruler.cxx index 6ce0db3ad389..2ed26d26f061 100644 --- a/sw/source/uibase/misc/swruler.cxx +++ b/sw/source/uibase/misc/swruler.cxx @@ -49,17 +49,17 @@ void ImplDrawArrow(vcl::RenderContext& rRenderContext, long nX, long nY, const C rRenderContext.SetFillColor(rColor); if (bPointRight) { - rRenderContext.DrawRect(Rectangle(nX + 0, nY + 0, nX + 0, nY + 6) ); - rRenderContext.DrawRect(Rectangle(nX + 1, nY + 1, nX + 1, nY + 5) ); - rRenderContext.DrawRect(Rectangle(nX + 2, nY + 2, nX + 2, nY + 4) ); - rRenderContext.DrawRect(Rectangle(nX + 3, nY + 3, nX + 3, nY + 3) ); + rRenderContext.DrawRect(tools::Rectangle(nX + 0, nY + 0, nX + 0, nY + 6) ); + rRenderContext.DrawRect(tools::Rectangle(nX + 1, nY + 1, nX + 1, nY + 5) ); + rRenderContext.DrawRect(tools::Rectangle(nX + 2, nY + 2, nX + 2, nY + 4) ); + rRenderContext.DrawRect(tools::Rectangle(nX + 3, nY + 3, nX + 3, nY + 3) ); } else { - rRenderContext.DrawRect(Rectangle(nX + 0, nY + 3, nX + 0, nY + 3)); - rRenderContext.DrawRect(Rectangle(nX + 1, nY + 2, nX + 1, nY + 4)); - rRenderContext.DrawRect(Rectangle(nX + 2, nY + 1, nX + 2, nY + 5)); - rRenderContext.DrawRect(Rectangle(nX + 3, nY + 0, nX + 3, nY + 6)); + rRenderContext.DrawRect(tools::Rectangle(nX + 0, nY + 3, nX + 0, nY + 3)); + rRenderContext.DrawRect(tools::Rectangle(nX + 1, nY + 2, nX + 1, nY + 4)); + rRenderContext.DrawRect(tools::Rectangle(nX + 2, nY + 1, nX + 2, nY + 5)); + rRenderContext.DrawRect(tools::Rectangle(nX + 3, nY + 0, nX + 3, nY + 6)); } } @@ -92,7 +92,7 @@ void SwCommentRuler::dispose() SvxRuler::dispose(); } -void SwCommentRuler::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) +void SwCommentRuler::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) { SvxRuler::Paint(rRenderContext, rRect); @@ -106,7 +106,7 @@ void SwCommentRuler::DrawCommentControl(vcl::RenderContext& rRenderContext) const StyleSettings& rStyleSettings = rRenderContext.GetSettings().GetStyleSettings(); bool bIsCollapsed = ! mpViewShell->GetPostItMgr()->ShowNotes(); - Rectangle aControlRect = GetCommentControlRegion(); + tools::Rectangle aControlRect = GetCommentControlRegion(); maVirDev->SetOutputSizePixel(aControlRect.GetSize()); // Paint comment control background @@ -125,7 +125,7 @@ void SwCommentRuler::DrawCommentControl(vcl::RenderContext& rRenderContext) maVirDev->SetLineColor(); } - maVirDev->DrawRect( Rectangle( Point(), aControlRect.GetSize() ) ); + maVirDev->DrawRect( tools::Rectangle( Point(), aControlRect.GetSize() ) ); // Label and arrow tip OUString aLabel( SW_RESSTR ( STR_COMMENTS_LABEL ) ); @@ -248,7 +248,7 @@ void SwCommentRuler::MouseButtonDown( const MouseEvent& rMEvt ) void SwCommentRuler::Update() { - Rectangle aPreviousControlRect = GetCommentControlRegion(); + tools::Rectangle aPreviousControlRect = GetCommentControlRegion(); SvxRuler::Update(); if (aPreviousControlRect != GetCommentControlRegion()) Invalidate(); @@ -265,7 +265,7 @@ void SwCommentRuler::UpdateCommentHelpText() } // TODO Make Ruler return its central rectangle instead of margins. -Rectangle SwCommentRuler::GetCommentControlRegion() +tools::Rectangle SwCommentRuler::GetCommentControlRegion() { long nLeft = 0; SwPostItMgr *pPostItMgr = mpViewShell->GetPostItMgr(); @@ -274,7 +274,7 @@ Rectangle SwCommentRuler::GetCommentControlRegion() //triggers an update of the uiview, but the result of the ctor hasn't been //set into the mpViewShell yet, so GetPostItMgr is temporarily still NULL if (!pPostItMgr) - return Rectangle(); + return tools::Rectangle(); unsigned long nSidebarWidth = pPostItMgr->GetSidebarWidth(true); //FIXME When the page width is larger then screen, the ruler is misplaced by one pixel @@ -287,7 +287,7 @@ Rectangle SwCommentRuler::GetCommentControlRegion() long nRight = nLeft + nSidebarWidth + pPostItMgr->GetSidebarBorderWidth(true); long nBottom = nTop + GetRulerVirHeight() - 3; - Rectangle aRect(nLeft, nTop, nRight, nBottom); + tools::Rectangle aRect(nLeft, nTop, nRight, nBottom); return aRect; } diff --git a/sw/source/uibase/ribbar/drawbase.cxx b/sw/source/uibase/ribbar/drawbase.cxx index 2fcdd4f0b9ff..d2b2eff39099 100644 --- a/sw/source/uibase/ribbar/drawbase.cxx +++ b/sw/source/uibase/ribbar/drawbase.cxx @@ -602,7 +602,7 @@ void SwDrawBase::CreateDefaultObject() aStartPos.Y() -= 4 * MM50; aEndPos.X() += 8 * MM50; aEndPos.Y() += 4 * MM50; - Rectangle aRect(aStartPos, aEndPos); + tools::Rectangle aRect(aStartPos, aEndPos); m_pSh->CreateDefaultShape( static_cast< sal_uInt16 >(m_pWin->GetSdrDrawMode()), aRect, m_nSlotId); } diff --git a/sw/source/uibase/ribbar/inputwin.cxx b/sw/source/uibase/ribbar/inputwin.cxx index e5363622fa31..81f9b0b3da4f 100644 --- a/sw/source/uibase/ribbar/inputwin.cxx +++ b/sw/source/uibase/ribbar/inputwin.cxx @@ -109,7 +109,7 @@ SwInputWindow::SwInputWindow(vcl::Window* pParent, SfxDispatcher* pDispatcher) Size aSizeTbx = CalcWindowSizePixel(); Size aEditSize = aEdit->GetSizePixel(); - Rectangle aItemRect( GetItemRect(FN_FORMULA_CALC) ); + tools::Rectangle aItemRect( GetItemRect(FN_FORMULA_CALC) ); long nMaxHeight = (aEditSize.Height() > aItemRect.GetHeight()) ? aEditSize.Height() : aItemRect.GetHeight(); if( nMaxHeight+2 > aSizeTbx.Height() ) aSizeTbx.Height() = nMaxHeight+2; diff --git a/sw/source/uibase/shells/annotsh.cxx b/sw/source/uibase/shells/annotsh.cxx index cbd82e01256d..296345a4d3b6 100644 --- a/sw/source/uibase/shells/annotsh.cxx +++ b/sw/source/uibase/shells/annotsh.cxx @@ -608,8 +608,8 @@ void SwAnnotationShell::Exec( SfxRequest &rReq ) aNewAttr.Put(*pNewItem); } - Rectangle aNullRect; - Rectangle aOutRect = pOLV->GetOutputArea(); + tools::Rectangle aNullRect; + tools::Rectangle aOutRect = pOLV->GetOutputArea(); if (aNullRect != aOutRect) pOLV->SetAttribs(aNewAttr); diff --git a/sw/source/uibase/shells/drwtxtsh.cxx b/sw/source/uibase/shells/drwtxtsh.cxx index 1e2407dbce2a..56d203bd19ba 100644 --- a/sw/source/uibase/shells/drwtxtsh.cxx +++ b/sw/source/uibase/shells/drwtxtsh.cxx @@ -162,9 +162,9 @@ void SwDrawTextShell::StateDisableItems( SfxItemSet &rSet ) void SwDrawTextShell::SetAttrToMarked(const SfxItemSet& rAttr) { - Rectangle aNullRect; + tools::Rectangle aNullRect; OutlinerView* pOLV = pSdrView->GetTextEditOutlinerView(); - Rectangle aOutRect = pOLV->GetOutputArea(); + tools::Rectangle aOutRect = pOLV->GetOutputArea(); if (aNullRect != aOutRect) { diff --git a/sw/source/uibase/shells/grfsh.cxx b/sw/source/uibase/shells/grfsh.cxx index 6d92d9bd0b27..777be9f04156 100644 --- a/sw/source/uibase/shells/grfsh.cxx +++ b/sw/source/uibase/shells/grfsh.cxx @@ -157,7 +157,7 @@ void SwGrfShell::Execute(SfxRequest &rReq) SwMirrorGrf aMirror( static_cast<const SwMirrorGrf&>( aSet.Get(RES_GRFATR_MIRRORGRF)) ); SwCropGrf aCrop( static_cast<const SwCropGrf&>( aSet.Get(RES_GRFATR_CROPGRF)) ); - Rectangle aCropRectangle( + tools::Rectangle aCropRectangle( convertTwipToMm100(aCrop.GetLeft()), convertTwipToMm100(aCrop.GetTop()), convertTwipToMm100(aCrop.GetRight()), @@ -170,7 +170,7 @@ void SwGrfShell::Execute(SfxRequest &rReq) { rSh.StartAllAction(); rSh.StartUndo(SwUndoId::START); - Rectangle aScaledCropedRectangle = aDialog->GetScaledCropRectangle(); + tools::Rectangle aScaledCropedRectangle = aDialog->GetScaledCropRectangle(); aCrop.SetLeft( convertMm100ToTwip( aScaledCropedRectangle.Left() )); aCrop.SetTop( convertMm100ToTwip( aScaledCropedRectangle.Top() )); @@ -876,7 +876,7 @@ void SwGrfShell::ExecuteRotation(SfxRequest &rReq) SfxItemSet aSet( rShell.GetAttrPool(), RES_GRFATR_CROPGRF, RES_GRFATR_CROPGRF ); rShell.GetCurAttr( aSet ); SwCropGrf aCrop( static_cast<const SwCropGrf&>( aSet.Get(RES_GRFATR_CROPGRF) ) ); - Rectangle aCropRectangle(aCrop.GetLeft(), aCrop.GetTop(), aCrop.GetRight(), aCrop.GetBottom()); + tools::Rectangle aCropRectangle(aCrop.GetLeft(), aCrop.GetTop(), aCrop.GetRight(), aCrop.GetBottom()); if (rReq.GetSlot() == SID_ROTATE_GRAPHIC_LEFT) { diff --git a/sw/source/uibase/shells/grfshex.cxx b/sw/source/uibase/shells/grfshex.cxx index c32ed1c94bc8..0559e218a322 100644 --- a/sw/source/uibase/shells/grfshex.cxx +++ b/sw/source/uibase/shells/grfshex.cxx @@ -133,7 +133,7 @@ bool SwTextShell::InsertMediaDlg( SfxRequest& rReq ) if (!bRet) { return bRet; } } - SdrMediaObj* pObj = new SdrMediaObj( Rectangle( aPos, aSize ) ); + SdrMediaObj* pObj = new SdrMediaObj( tools::Rectangle( aPos, aSize ) ); pObj->SetModel(rSh.GetDoc()->getIDocumentDrawModelAccess().GetDrawModel()); // set before setURL pObj->setURL( realURL, "" ); diff --git a/sw/source/uibase/sidebar/StylePresetsPanel.cxx b/sw/source/uibase/sidebar/StylePresetsPanel.cxx index 19be3ef44174..a82a478649e1 100644 --- a/sw/source/uibase/sidebar/StylePresetsPanel.cxx +++ b/sw/source/uibase/sidebar/StylePresetsPanel.cxx @@ -43,7 +43,7 @@ namespace sw { namespace sidebar { namespace { void renderPreview(sfx2::StyleManager* pStyleManager, OutputDevice& aOutputDevice, - OUString const & sName, sal_Int32 nHeight, Rectangle& aRect) + OUString const & sName, sal_Int32 nHeight, tools::Rectangle& aRect) { SfxStyleSheetBase* pStyleSheet = pStyleManager->Search(sName, SfxStyleFamily::Para); @@ -88,7 +88,7 @@ BitmapEx GenerateStylePreview(SfxObjectShell& rSource, OUString& aName) long y = 0; { pVirtualDev->SetFillColor(COL_LIGHTGRAY); - Rectangle aNameRect(0, y, nPreviewWidth, nNameHeight); + tools::Rectangle aNameRect(0, y, nPreviewWidth, nNameHeight); pVirtualDev->DrawRect(aNameRect); vcl::Font aFont; @@ -107,18 +107,18 @@ BitmapEx GenerateStylePreview(SfxObjectShell& rSource, OUString& aName) } { - Rectangle aRenderRect(Point(nMargin, y), aSize); + tools::Rectangle aRenderRect(Point(nMargin, y), aSize); renderPreview(pStyleManager, *pVirtualDev.get(), "Title", nTitleHeight, aRenderRect); y += nTitleHeight; } { - Rectangle aRenderRect(Point(nMargin, y), aSize); + tools::Rectangle aRenderRect(Point(nMargin, y), aSize); renderPreview(pStyleManager, *pVirtualDev.get(), "Heading 1", nHeadingHeight, aRenderRect); y += nHeadingHeight; } { - Rectangle aRenderRect(Point(nMargin, y), aSize); + tools::Rectangle aRenderRect(Point(nMargin, y), aSize); renderPreview(pStyleManager, *pVirtualDev.get(), "Text Body", nTextBodyHeight, aRenderRect); } diff --git a/sw/source/uibase/sidebar/ThemePanel.cxx b/sw/source/uibase/sidebar/ThemePanel.cxx index 46e32a973fe6..bd91fef1db4e 100644 --- a/sw/source/uibase/sidebar/ThemePanel.cxx +++ b/sw/source/uibase/sidebar/ThemePanel.cxx @@ -405,10 +405,10 @@ BitmapEx GenerateColorPreview(const svx::ColorSet& rColorSet) for (sal_uInt32 i = 0; i < 12; i += 2) { pVirtualDev->SetFillColor(rColorSet.getColor(i)); - pVirtualDev->DrawRect(Rectangle(x, y1, x + SIZE, y1 + SIZE)); + pVirtualDev->DrawRect(tools::Rectangle(x, y1, x + SIZE, y1 + SIZE)); pVirtualDev->SetFillColor(rColorSet.getColor(i + 1)); - pVirtualDev->DrawRect(Rectangle(x, y2, x + SIZE, y2 + SIZE)); + pVirtualDev->DrawRect(tools::Rectangle(x, y2, x + SIZE, y2 + SIZE)); x += SIZE + BORDER; } diff --git a/sw/source/uibase/table/chartins.cxx b/sw/source/uibase/table/chartins.cxx index 2f7d457cd56c..5689f9517ca9 100644 --- a/sw/source/uibase/table/chartins.cxx +++ b/sw/source/uibase/table/chartins.cxx @@ -56,7 +56,7 @@ using namespace ::com::sun::star; using namespace ::com::sun::star::uno; -Point SwGetChartDialogPos( const vcl::Window *pParentWin, const Size& rDialogSize, const Rectangle& rLogicChart ) +Point SwGetChartDialogPos( const vcl::Window *pParentWin, const Size& rDialogSize, const tools::Rectangle& rLogicChart ) { // positioning code according to spec; similar to Calc fuins2.cxx Point aRet; @@ -64,11 +64,11 @@ Point SwGetChartDialogPos( const vcl::Window *pParentWin, const Size& rDialogSiz OSL_ENSURE( pParentWin, "Window not found" ); if (pParentWin) { - Rectangle aObjPixel = pParentWin->LogicToPixel( rLogicChart, pParentWin->GetMapMode() ); - Rectangle aObjAbs( pParentWin->OutputToAbsoluteScreenPixel( aObjPixel.TopLeft() ), + tools::Rectangle aObjPixel = pParentWin->LogicToPixel( rLogicChart, pParentWin->GetMapMode() ); + tools::Rectangle aObjAbs( pParentWin->OutputToAbsoluteScreenPixel( aObjPixel.TopLeft() ), pParentWin->OutputToAbsoluteScreenPixel( aObjPixel.BottomRight() ) ); - Rectangle aDesktop = pParentWin->GetDesktopRectPixel(); + tools::Rectangle aDesktop = pParentWin->GetDesktopRectPixel(); Size aSpace = pParentWin->LogicToPixel( Size( 8, 12 ), MapUnit::MapAppFont ); bool bLayoutRTL = ::GetActiveView()->GetWrtShell().IsTableRightToLeft(); @@ -208,7 +208,7 @@ void SwInsertChart(vcl::Window* pParent, SfxBindings* pBindings ) SwRect aSwRect; if (pFlyFrameFormat) aSwRect = pFlyFrameFormat->GetAnchoredObj()->GetObjRectWithSpaces(); - Rectangle aRect( aSwRect.SVRect() ); + tools::Rectangle aRect( aSwRect.SVRect() ); Point aDialogPos = SwGetChartDialogPos( &rWrtShell.GetView().GetEditWin(), aDialogSize, aRect ); xDialogProps->setPropertyValue("Position", uno::makeAny( awt::Point(aDialogPos.getX(),aDialogPos.getY()) ) ); diff --git a/sw/source/uibase/uiview/pview.cxx b/sw/source/uibase/uiview/pview.cxx index 0fc2886efe30..8cc1aa5bf376 100644 --- a/sw/source/uibase/uiview/pview.cxx +++ b/sw/source/uibase/uiview/pview.cxx @@ -190,7 +190,7 @@ SwPagePreviewWin::SwPagePreviewWin( vcl::Window *pParent, SwPagePreview& rPView , mpViewShell(nullptr) , mrView(rPView) , mbCalcScaleForPreviewLayout(true) - , maPaintedPreviewDocRect(Rectangle(0,0,0,0)) + , maPaintedPreviewDocRect(tools::Rectangle(0,0,0,0)) , mpPgPreviewLayout(nullptr) { SetOutDevViewType( OutDevViewType::PrintPreview ); @@ -209,7 +209,7 @@ SwPagePreviewWin::~SwPagePreviewWin() { } -void SwPagePreviewWin::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) +void SwPagePreviewWin::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) { if (!mpViewShell || !mpViewShell->GetLayout()) return; @@ -220,7 +220,7 @@ void SwPagePreviewWin::Paint(vcl::RenderContext& rRenderContext, const Rectangl if (!maPxWinSize.Height() || !maPxWinSize.Width()) maPxWinSize = GetOutputSizePixel(); - Rectangle aRect(rRenderContext.LogicToPixel(rRect)); + tools::Rectangle aRect(rRenderContext.LogicToPixel(rRect)); mpPgPreviewLayout->Prepare(1, Point(0,0), maPxWinSize, mnSttPage, maPaintedPreviewDocRect); SetSelectedPage(1); @@ -1290,7 +1290,7 @@ void SwPagePreview::CreateScrollbar( bool bHori ) bool SwPagePreview::ChgPage( int eMvMode, bool bUpdateScrollbar ) { - Rectangle aPixVisArea( m_pViewWin->LogicToPixel( m_aVisArea ) ); + tools::Rectangle aPixVisArea( m_pViewWin->LogicToPixel( m_aVisArea ) ); bool bChg = m_pViewWin->MovePage( eMvMode ) || eMvMode == SwPagePreviewWin::MV_CALC || eMvMode == SwPagePreviewWin::MV_NEWWINSIZE; @@ -1334,7 +1334,7 @@ void SwPagePreview::InnerResizePixel( const Point &rOfst, const Size &rSize, bo { SvBorder aBorder; CalcAndSetBorderPixel( aBorder, true ); - Rectangle aRect( rOfst, rSize ); + tools::Rectangle aRect( rOfst, rSize ); aRect += aBorder; ViewResizePixel( *m_pViewWin, aRect.TopLeft(), aRect.GetSize(), m_pViewWin->GetOutputSizePixel(), @@ -1353,7 +1353,7 @@ void SwPagePreview::OuterResizePixel( const Point &rOfst, const Size &rSize ) Size aTmpSize( m_pViewWin->GetOutputSizePixel() ); Point aBottomRight( m_pViewWin->PixelToLogic( Point( aTmpSize.Width(), aTmpSize.Height() ) ) ); - SetVisArea( Rectangle( Point(), aBottomRight ) ); + SetVisArea( tools::Rectangle( Point(), aBottomRight ) ); // Call of the DocSzChgd-Methode of the scrollbars is necessary, // because from the maximum scroll range half the height of the @@ -1369,11 +1369,11 @@ void SwPagePreview::OuterResizePixel( const Point &rOfst, const Size &rSize ) *m_pVScrollbar, *m_pHScrollbar, *m_pScrollFill ); } -void SwPagePreview::SetVisArea( const Rectangle &rRect ) +void SwPagePreview::SetVisArea( const tools::Rectangle &rRect ) { const Point aTopLeft(AlignToPixel(rRect.TopLeft())); const Point aBottomRight(AlignToPixel(rRect.BottomRight())); - Rectangle aLR(aTopLeft,aBottomRight); + tools::Rectangle aLR(aTopLeft,aBottomRight); if(aLR == m_aVisArea) return; @@ -1436,7 +1436,7 @@ IMPL_LINK( SwPagePreview, ScrollHdl, ScrollBar *, p, void ) Point aPos = pScrollbar->GetParent()->OutputToScreenPixel( pScrollbar->GetPosPixel()); aPos.Y() = pScrollbar->OutputToScreenPixel(pScrollbar->GetPointerPosPixel()).Y(); - Rectangle aRect; + tools::Rectangle aRect; aRect.Left() = aPos.X() -8; aRect.Right() = aRect.Left(); aRect.Top() = aPos.Y(); @@ -1462,7 +1462,7 @@ IMPL_LINK( SwPagePreview, EndScrollHdl, ScrollBar *, p, void ) if( !pScrollbar->IsHoriScroll() ) // scroll vertically { if ( Help::IsQuickHelpEnabled() ) - Help::ShowQuickHelp(pScrollbar, Rectangle(), OUString()); + Help::ShowQuickHelp(pScrollbar, tools::Rectangle(), OUString()); if ( GetViewShell()->PagePreviewLayout()->DoesPreviewLayoutRowsFitIntoWindow() ) { // Scroll how many pages ?? @@ -1608,7 +1608,7 @@ void SwPagePreview::ScrollViewSzChg() } else //vertical scrolling by pixel { - const Rectangle& rDocRect = m_pViewWin->GetPaintedPreviewDocRect(); + const tools::Rectangle& rDocRect = m_pViewWin->GetPaintedPreviewDocRect(); const Size& rPreviewSize = GetViewShell()->PagePreviewLayout()->GetPreviewDocSize(); m_pVScrollbar->SetRangeMax(rPreviewSize.Height()) ; @@ -1628,7 +1628,7 @@ void SwPagePreview::ScrollViewSzChg() } if(m_pHScrollbar) { - const Rectangle& rDocRect = m_pViewWin->GetPaintedPreviewDocRect(); + const tools::Rectangle& rDocRect = m_pViewWin->GetPaintedPreviewDocRect(); const Size& rPreviewSize = GetViewShell()->PagePreviewLayout()->GetPreviewDocSize(); Range aRange(0,0); @@ -1746,7 +1746,7 @@ void SwPagePreviewWin::RepaintCoreRect( const SwRect& rRect ) // #i24183# if ( mpPgPreviewLayout->PreviewLayoutValid() ) { - mpPgPreviewLayout->Repaint( Rectangle( rRect.Pos(), rRect.SSize() ) ); + mpPgPreviewLayout->Repaint( tools::Rectangle( rRect.Pos(), rRect.SSize() ) ); } } diff --git a/sw/source/uibase/uiview/scroll.cxx b/sw/source/uibase/uiview/scroll.cxx index 680af2a0ce1d..e8474e16bab4 100644 --- a/sw/source/uibase/uiview/scroll.cxx +++ b/sw/source/uibase/uiview/scroll.cxx @@ -52,7 +52,7 @@ void SwScrollbar::DocSzChgd( const Size &rSize ) // Will be called after a change of the visible view section. -void SwScrollbar::ViewPortChgd( const Rectangle &rRect ) +void SwScrollbar::ViewPortChgd( const tools::Rectangle &rRect ) { long nThumb, nVisible; if( bHori ) diff --git a/sw/source/uibase/uiview/srcview.cxx b/sw/source/uibase/uiview/srcview.cxx index 9c9995147109..2d0e7093195c 100644 --- a/sw/source/uibase/uiview/srcview.cxx +++ b/sw/source/uibase/uiview/srcview.cxx @@ -148,7 +148,7 @@ static void lcl_PrintHeader( vcl::RenderContext &rOutDev, sal_Int32 nPages, sal_ long nXLeft = nLeftMargin-nBorder; long nXRight = aSz.Width()-RMARGPRN+nBorder; - rOutDev.DrawRect( Rectangle( + rOutDev.DrawRect( tools::Rectangle( Point( nXLeft, nYTop ), Size( nXRight-nXLeft, aSz.Height() - nYTop - BMARGPRN + nBorder ) ) ); diff --git a/sw/source/uibase/uiview/swcli.cxx b/sw/source/uibase/uiview/swcli.cxx index 61f26823cc91..29782e885031 100644 --- a/sw/source/uibase/uiview/swcli.cxx +++ b/sw/source/uibase/uiview/swcli.cxx @@ -40,7 +40,7 @@ SwOleClient::SwOleClient(SwView *pView, SwEditWin *pWin, const svt::EmbeddedObje SetObject( xObj.GetObject() ); } -void SwOleClient::RequestNewObjectArea( Rectangle& aLogRect ) +void SwOleClient::RequestNewObjectArea( tools::Rectangle& aLogRect ) { // The server wants to change the client size. // We put the desired size in the core. The attributes of the frame diff --git a/sw/source/uibase/uiview/view.cxx b/sw/source/uibase/uiview/view.cxx index 0b3e0dfd6561..d630906a3b13 100644 --- a/sw/source/uibase/uiview/view.cxx +++ b/sw/source/uibase/uiview/view.cxx @@ -1077,7 +1077,7 @@ void SwView::WriteUserData( OUString &rUserData, bool bBrowse ) // Then that stored data are not persistent! const SwRect& rRect = m_pWrtShell->GetCharRect(); - const Rectangle& rVis = GetVisArea(); + const tools::Rectangle& rVis = GetVisArea(); rUserData = OUString::number( rRect.Left() ); rUserData += ";"; @@ -1147,7 +1147,7 @@ void SwView::ReadUserData( const OUString &rUserData, bool bBrowse ) { m_pWrtShell->EnableSmooth( false ); - const Rectangle aVis( nLeft, nTop, nRight, nBottom ); + const tools::Rectangle aVis( nLeft, nTop, nRight, nBottom ); sal_Int32 nOff = 0; SvxZoomType eZoom; @@ -1244,7 +1244,7 @@ void SwView::ReadUserDataSequence ( const uno::Sequence < beans::PropertyValue > SET_CURR_SHELL(m_pWrtShell); const beans::PropertyValue *pValue = rSequence.getConstArray(); const SwRect& rRect = m_pWrtShell->GetCharRect(); - const Rectangle &rVis = GetVisArea(); + const tools::Rectangle &rVis = GetVisArea(); const SwViewOption* pVOpt = m_pWrtShell->GetViewOptions(); sal_Int64 nX = rRect.Left(), nY = rRect.Top(), nLeft = rVis.Left(), nTop = rVis.Top(); @@ -1345,7 +1345,7 @@ void SwView::ReadUserDataSequence ( const uno::Sequence < beans::PropertyValue > if (nBottom <= (m_pWrtShell->GetDocSize().Height()+nAdd) ) { m_pWrtShell->EnableSmooth( false ); - const Rectangle aVis( nLeft, nTop, nRight, nBottom ); + const tools::Rectangle aVis( nLeft, nTop, nRight, nBottom ); SvxZoomType eZoom; if ( !m_pWrtShell->GetViewOptions()->getBrowseMode() ) @@ -1466,7 +1466,7 @@ void SwView::ReadUserDataSequence ( const uno::Sequence < beans::PropertyValue > void SwView::WriteUserDataSequence ( uno::Sequence < beans::PropertyValue >& rSequence ) { const SwRect& rRect = m_pWrtShell->GetCharRect(); - const Rectangle& rVis = GetVisArea(); + const tools::Rectangle& rVis = GetVisArea(); std::vector<beans::PropertyValue> aVector; diff --git a/sw/source/uibase/uiview/view2.cxx b/sw/source/uibase/uiview/view2.cxx index 1e885c75eb74..e730e1d49d08 100644 --- a/sw/source/uibase/uiview/view2.cxx +++ b/sw/source/uibase/uiview/view2.cxx @@ -547,7 +547,7 @@ void SwView::Execute(SfxRequest &rReq) case FN_PAGEDOWN: case FN_PAGEDOWN_SEL: { - Rectangle aVis( GetVisArea() ); + tools::Rectangle aVis( GetVisArea() ); SwEditWin& rTmpWin = GetEditWin(); if ( FN_PAGEUP == nSlot || FN_PAGEUP_SEL == nSlot ) PageUpCursor(FN_PAGEUP_SEL == nSlot); diff --git a/sw/source/uibase/uiview/viewdraw.cxx b/sw/source/uibase/uiview/viewdraw.cxx index 78af0533809c..4b4b62e9567e 100644 --- a/sw/source/uibase/uiview/viewdraw.cxx +++ b/sw/source/uibase/uiview/viewdraw.cxx @@ -130,7 +130,7 @@ void SwView::ExecDraw(SfxRequest& rReq) //determine the size of the object if(pObj->IsGroupObject()) { - const Rectangle& rBoundRect = static_cast<SdrObjGroup*>(pObj)->GetCurrentBoundRect(); + const tools::Rectangle& rBoundRect = static_cast<SdrObjGroup*>(pObj)->GetCurrentBoundRect(); aStartPos.X() -= rBoundRect.GetWidth()/2; aStartPos.Y() -= rBoundRect.GetHeight()/2; } diff --git a/sw/source/uibase/uiview/viewling.cxx b/sw/source/uibase/uiview/viewling.cxx index 1b3a9a80aec1..c2ad2042e94d 100644 --- a/sw/source/uibase/uiview/viewling.cxx +++ b/sw/source/uibase/uiview/viewling.cxx @@ -920,7 +920,7 @@ void SwView::ExecFieldPopup( const Point& rPt, IFieldmark *fieldBM ) m_pFieldPopup = VclPtr<SwFieldDialog>::Create( m_pEditWin, fieldBM ); m_pFieldPopup->SetPopupModeEndHdl( LINK( this, SwView, FieldPopupModeEndHdl ) ); - Rectangle aRect( m_pEditWin->OutputToScreenPixel( aPixPos ), Size( 0, 0 ) ); + tools::Rectangle aRect( m_pEditWin->OutputToScreenPixel( aPixPos ), Size( 0, 0 ) ); m_pFieldPopup->StartPopupMode( aRect, FloatWinPopupFlags::Down|FloatWinPopupFlags::GrabFocus ); } diff --git a/sw/source/uibase/uiview/viewport.cxx b/sw/source/uibase/uiview/viewport.cxx index 59dc0a234c96..503a7cae6b7a 100644 --- a/sw/source/uibase/uiview/viewport.cxx +++ b/sw/source/uibase/uiview/viewport.cxx @@ -174,7 +174,7 @@ m_aDocSz = rSz; } //If text has been deleted, it may be that the VisArea points behind the visible range. - Rectangle aNewVisArea( m_aVisArea ); + tools::Rectangle aNewVisArea( m_aVisArea ); bool bModified = false; SwTwips lGreenOffset = IsDocumentBorder() ? DOCUMENTBORDER : DOCUMENTBORDER * 2; SwTwips lTmp = m_aDocSz.Width() + lGreenOffset; @@ -207,7 +207,7 @@ m_aDocSz = rSz; // Set VisArea newly -void SwView::SetVisArea( const Rectangle &rRect, bool bUpdateScrollbar ) +void SwView::SetVisArea( const tools::Rectangle &rRect, bool bUpdateScrollbar ) { Size aOldSz( m_aVisArea.GetSize() ); if (comphelper::LibreOfficeKit::isActive() && m_pWrtShell) @@ -220,7 +220,7 @@ void SwView::SetVisArea( const Rectangle &rRect, bool bUpdateScrollbar ) const SwTwips lMin = IsDocumentBorder() ? DOCUMENTBORDER : 0; // No negative position, no negative size - Rectangle aLR = rRect; + tools::Rectangle aLR = rRect; if( aLR.Top() < lMin ) { aLR.Bottom() += lMin - aLR.Top(); @@ -269,7 +269,7 @@ void SwView::SetVisArea( const Rectangle &rRect, bool bUpdateScrollbar ) { // If the size of VisArea is unchanged, we extend the size of the VisArea // InternalObject on. By that the transport of errors shall be avoided. - Rectangle aVis( m_aVisArea ); + tools::Rectangle aVis( m_aVisArea ); if ( aVis.GetSize() == aOldSz ) aVis.SetSize( GetDocShell()->SfxObjectShell::GetVisArea(ASPECT_CONTENT).GetSize() ); // TODO/LATER: why casting?! @@ -318,7 +318,7 @@ void SwView::SetVisArea( const Point &rPt, bool bUpdateScrollbar ) const long lXDiff = m_aVisArea.Left() - aPt.X(); const long lYDiff = m_aVisArea.Top() - aPt.Y(); - SetVisArea( Rectangle( aPt, + SetVisArea( tools::Rectangle( aPt, Point( m_aVisArea.Right() - lXDiff, m_aVisArea.Bottom() - lYDiff ) ), bUpdateScrollbar); } @@ -332,7 +332,7 @@ void SwView::CheckVisArea() if ( m_aVisArea.Left() != DOCUMENTBORDER || m_aVisArea.Top() != DOCUMENTBORDER ) { - Rectangle aNewVisArea( m_aVisArea ); + tools::Rectangle aNewVisArea( m_aVisArea ); aNewVisArea.Move( DOCUMENTBORDER - m_aVisArea.Left(), DOCUMENTBORDER - m_aVisArea.Top() ); SetVisArea( aNewVisArea ); @@ -349,7 +349,7 @@ void SwView::CheckVisArea() // sal_uInt16 nRange optional accurate indication of the // range by which to scroll if necessary. -void SwView::CalcPt( Point *pPt, const Rectangle &rRect, +void SwView::CalcPt( Point *pPt, const tools::Rectangle &rRect, sal_uInt16 nRangeX, sal_uInt16 nRangeY) { @@ -395,23 +395,23 @@ void SwView::CalcPt( Point *pPt, const Rectangle &rRect, // Scrolling -bool SwView::IsScroll( const Rectangle &rRect ) const +bool SwView::IsScroll( const tools::Rectangle &rRect ) const { return m_bCenterCursor || m_bTopCursor || !m_aVisArea.IsInside(rRect); } -void SwView::Scroll( const Rectangle &rRect, sal_uInt16 nRangeX, sal_uInt16 nRangeY ) +void SwView::Scroll( const tools::Rectangle &rRect, sal_uInt16 nRangeX, sal_uInt16 nRangeY ) { if ( m_aVisArea.IsEmpty() ) return; - Rectangle aOldVisArea( m_aVisArea ); + tools::Rectangle aOldVisArea( m_aVisArea ); long nDiffY = 0; vcl::Window* pCareWn = SwViewShell::GetCareWin(GetWrtShell()); if ( pCareWn ) { - Rectangle aDlgRect( GetEditWin().PixelToLogic( + tools::Rectangle aDlgRect( GetEditWin().PixelToLogic( pCareWn->GetWindowExtentsRelative( &GetEditWin() ) ) ); // Only if the dialogue is not the VisArea right or left: if ( aDlgRect.Left() < m_aVisArea.Right() && @@ -463,7 +463,7 @@ void SwView::Scroll( const Rectangle &rRect, sal_uInt16 nRangeX, sal_uInt16 nRan aSize.Width() = std::min( aSize.Width(), aVisSize.Width() ); aSize.Height()= std::min( aSize.Height(),aVisSize.Height()); - CalcPt( &aPt, Rectangle( rRect.TopLeft(), aSize ), + CalcPt( &aPt, tools::Rectangle( rRect.TopLeft(), aSize ), static_cast< sal_uInt16 >((aVisSize.Width() - aSize.Width()) / 2), static_cast< sal_uInt16 >((aVisSize.Height()- aSize.Height())/ 2) ); @@ -712,7 +712,7 @@ IMPL_LINK( SwView, ScrollHdl, ScrollBar *, p, void ) //QuickHelp: if( m_pWrtShell->GetPageCnt() > 1 ) { - Rectangle aRect; + tools::Rectangle aRect; aRect.Left() = pScrollbar->GetParent()->OutputToScreenPixel( pScrollbar->GetPosPixel() ).X() -8; aRect.Top() = pScrollbar->OutputToScreenPixel( @@ -754,7 +754,7 @@ IMPL_LINK( SwView, EndScrollHdl, ScrollBar *, p, void ) if(nPgNum) { nPgNum = 0; - Help::ShowQuickHelp(pScrollbar, Rectangle(), OUString()); + Help::ShowQuickHelp(pScrollbar, tools::Rectangle(), OUString()); } Point aPos( m_aVisArea.TopLeft() ); bool bBorder = IsDocumentBorder(); @@ -774,7 +774,7 @@ IMPL_LINK( SwView, EndScrollHdl, ScrollBar *, p, void ) void SwView::CalcVisArea( const Size &rOutPixel ) { Point aTopLeft; - Rectangle aRect( aTopLeft, rOutPixel ); + tools::Rectangle aRect( aTopLeft, rOutPixel ); aTopLeft = GetEditWin().PixelToLogic( aTopLeft ); Point aBottomRight( GetEditWin().PixelToLogic( aRect.BottomRight() ) ); @@ -1164,7 +1164,7 @@ bool SwView::UpdateScrollbars() if ( !m_aVisArea.IsEmpty() ) { const bool bBorder = IsDocumentBorder(); - Rectangle aTmpRect( m_aVisArea ); + tools::Rectangle aTmpRect( m_aVisArea ); if ( bBorder ) { Point aPt( DOCUMENTBORDER, DOCUMENTBORDER ); diff --git a/sw/source/uibase/uiview/viewtab.cxx b/sw/source/uibase/uiview/viewtab.cxx index c2727e428106..91d61c453fb5 100644 --- a/sw/source/uibase/uiview/viewtab.cxx +++ b/sw/source/uibase/uiview/viewtab.cxx @@ -1961,7 +1961,7 @@ void SwView::StateTabWin(SfxItemSet& rSet) case SID_RULER_LR_MIN_MAX: { - Rectangle aRectangle; + tools::Rectangle aRectangle; if( ( nFrameType & FrameTypeFlags::COLSECT ) && !IsTabColFromDoc() && ( nFrameType & ( FrameTypeFlags::TABLE|FrameTypeFlags::COLUMN ) ) ) { diff --git a/sw/source/uibase/uno/unotxdoc.cxx b/sw/source/uibase/uno/unotxdoc.cxx index 64b5dff73365..af8853741696 100644 --- a/sw/source/uibase/uno/unotxdoc.cxx +++ b/sw/source/uibase/uno/unotxdoc.cxx @@ -3159,7 +3159,7 @@ bool SwXTextDocument::isMimeTypeSupported() return aDataHelper.GetXTransferable().is() && SwTransferable::IsPaste(*pWrtShell, aDataHelper); } -void SwXTextDocument::setClientVisibleArea(const Rectangle& rRectangle) +void SwXTextDocument::setClientVisibleArea(const tools::Rectangle& rRectangle) { SwView* pView = pDocShell->GetView(); if (!pView) @@ -3242,7 +3242,7 @@ OUString SwXTextDocument::getPostIts() const SwPostItField* pField = pWin->GetPostItField(); const SwRect& aRect = pWin->GetAnchorRect(); - const Rectangle aSVRect(aRect.Pos().getX(), + const tools::Rectangle aSVRect(aRect.Pos().getX(), aRect.Pos().getY(), aRect.Pos().getX() + aRect.SSize().Width(), aRect.Pos().getY() + aRect.SSize().Height()); diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx index f399699081be..8db9a70127b5 100644 --- a/sw/source/uibase/utlui/content.cxx +++ b/sw/source/uibase/utlui/content.cxx @@ -2486,7 +2486,7 @@ void SwContentTree::ShowTree() } void SwContentTree::Paint( vcl::RenderContext& rRenderContext, - const Rectangle& rRect ) + const tools::Rectangle& rRect ) { // Start the update timer on the first paint; avoids // flicker on the first reveal. @@ -2947,7 +2947,7 @@ void SwContentTree::RequestHelp( const HelpEvent& rHEvt ) aSize.Width() = GetSizePixel().Width() - aPos.X(); aPos = OutputToScreenPixel(aPos); - Rectangle aItemRect( aPos, aSize ); + tools::Rectangle aItemRect( aPos, aSize ); if(bBalloon) { aPos.X() += aSize.Width(); @@ -2961,7 +2961,7 @@ void SwContentTree::RequestHelp( const HelpEvent& rHEvt ) } else { - Help::ShowQuickHelp( this, Rectangle(), OUString() ); + Help::ShowQuickHelp( this, tools::Rectangle(), OUString() ); bCallBase = false; } } diff --git a/sw/source/uibase/utlui/glbltree.cxx b/sw/source/uibase/utlui/glbltree.cxx index f18bb5b26e3c..74402e468e7f 100644 --- a/sw/source/uibase/utlui/glbltree.cxx +++ b/sw/source/uibase/utlui/glbltree.cxx @@ -479,7 +479,7 @@ void SwGlobalTree::RequestHelp( const HelpEvent& rHEvt ) aSize.Width() = GetSizePixel().Width() - aEntryPos.X(); aEntryPos = OutputToScreenPixel(aEntryPos); - Rectangle aItemRect( aEntryPos, aSize ); + tools::Rectangle aItemRect( aEntryPos, aSize ); if(Help::IsBalloonHelpEnabled()) { aEntryPos.X() += aSize.Width(); diff --git a/sw/source/uibase/utlui/navipi.cxx b/sw/source/uibase/utlui/navipi.cxx index fe05f73da6a9..9904dd5083db 100644 --- a/sw/source/uibase/utlui/navipi.cxx +++ b/sw/source/uibase/utlui/navipi.cxx @@ -416,12 +416,12 @@ void SwNavHelpToolBox::MouseButtonDown(const MouseEvent &rEvt) ToolBox::MouseButtonDown(rEvt); } -void SwNavigationPI::CreateNavigationTool(const Rectangle& rRect, bool bSetFocus, vcl::Window *pParent) +void SwNavigationPI::CreateNavigationTool(const tools::Rectangle& rRect, bool bSetFocus, vcl::Window *pParent) { Reference< XFrame > xFrame = GetCreateView()->GetViewFrame()->GetFrame().GetFrameInterface(); VclPtrInstance<SwScrollNaviPopup> pPopup(FN_SCROLL_NAVIGATION, xFrame, pParent); - Rectangle aRect(rRect); + tools::Rectangle aRect(rRect); Point aT1 = aRect.TopLeft(); aT1 = pPopup->GetParent()->OutputToScreenPixel(pPopup->GetParent()->AbsoluteScreenToOutputPixel(m_aContentToolBox->OutputToAbsoluteScreenPixel(aT1))); aRect.SetPos(aT1); @@ -636,8 +636,8 @@ SwNavigationPI::SwNavigationPI(SfxBindings* _pBindings, // Double separators are not allowed, so you have to // determine the suitable size differently. - Rectangle aFirstRect = m_aContentToolBox->GetItemRect(m_aContentToolBox->GetItemId("anchor")); - Rectangle aSecondRect = m_aContentToolBox->GetItemRect(m_aContentToolBox->GetItemId("header")); + tools::Rectangle aFirstRect = m_aContentToolBox->GetItemRect(m_aContentToolBox->GetItemId("anchor")); + tools::Rectangle aSecondRect = m_aContentToolBox->GetItemRect(m_aContentToolBox->GetItemId("header")); Size aItemWinSize( aFirstRect.Left() - aSecondRect.Left(), aFirstRect.Bottom() - aFirstRect.Top() ); Size aOptimalSize(m_xEdit->get_preferred_size()); diff --git a/sw/source/uibase/utlui/shdwcrsr.cxx b/sw/source/uibase/utlui/shdwcrsr.cxx index 0fcfa7f3543f..78a4e44a5b74 100644 --- a/sw/source/uibase/utlui/shdwcrsr.cxx +++ b/sw/source/uibase/utlui/shdwcrsr.cxx @@ -97,7 +97,7 @@ void SwShadowCursor::Paint() DrawCursor( aOldPt, nOldHeight, nOldMode ); } -Rectangle SwShadowCursor::GetRect() const +tools::Rectangle SwShadowCursor::GetRect() const { long nH = nOldHeight; Point aPt( aOldPt ); @@ -115,7 +115,7 @@ Rectangle SwShadowCursor::GetRect() const aSz.Width() *= 2; } - return pWin->PixelToLogic( Rectangle( aPt, aSz ) ); + return pWin->PixelToLogic( tools::Rectangle( aPt, aSz ) ); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/uibase/utlui/viewlayoutctrl.cxx b/sw/source/uibase/utlui/viewlayoutctrl.cxx index 89be94c86e40..0c7db9333786 100644 --- a/sw/source/uibase/utlui/viewlayoutctrl.cxx +++ b/sw/source/uibase/utlui/viewlayoutctrl.cxx @@ -87,9 +87,9 @@ void SwViewLayoutControl::StateChanged( sal_uInt16 /*nSID*/, SfxItemState eState void SwViewLayoutControl::Paint( const UserDrawEvent& rUsrEvt ) { vcl::RenderContext* pDev = rUsrEvt.GetRenderContext(); - Rectangle aRect(rUsrEvt.GetRect()); + tools::Rectangle aRect(rUsrEvt.GetRect()); - const Rectangle aControlRect = getControlRect(); + const tools::Rectangle aControlRect = getControlRect(); const bool bSingleColumn = 0 == mpImpl->mnState; const bool bAutomatic = 1 == mpImpl->mnState; @@ -119,7 +119,7 @@ void SwViewLayoutControl::Paint( const UserDrawEvent& rUsrEvt ) bool SwViewLayoutControl::MouseButtonDown( const MouseEvent & rEvt ) { - const Rectangle aRect = getControlRect(); + const tools::Rectangle aRect = getControlRect(); const Point aPoint = rEvt.GetPosPixel(); const long nXDiff = aPoint.X() - aRect.Left(); @@ -167,7 +167,7 @@ bool SwViewLayoutControl::MouseButtonDown( const MouseEvent & rEvt ) bool SwViewLayoutControl::MouseMove( const MouseEvent & rEvt ) { - const Rectangle aRect = getControlRect(); + const tools::Rectangle aRect = getControlRect(); const Point aPoint = rEvt.GetPosPixel(); const long nXDiff = aPoint.X() - aRect.Left(); diff --git a/sw/source/uibase/wrtsh/wrtsh1.cxx b/sw/source/uibase/wrtsh/wrtsh1.cxx index 0cdab48eac0b..a03b62bab3ae 100644 --- a/sw/source/uibase/wrtsh/wrtsh1.cxx +++ b/sw/source/uibase/wrtsh/wrtsh1.cxx @@ -603,7 +603,7 @@ void SwWrtShell::MoveObjectIfActive( svt::EmbeddedObjectRef& xObj, const Point& GetView().FindIPClient( xObj.GetObject(), &(GetView().GetEditWin()) ); if ( pCli ) { - Rectangle aArea = pCli->GetObjArea(); + tools::Rectangle aArea = pCli->GetObjArea(); aArea += rOffset; pCli->SetObjArea( aArea ); } diff --git a/test/source/mtfxmldump.cxx b/test/source/mtfxmldump.cxx index a59375a8c079..c49340f5c926 100644 --- a/test/source/mtfxmldump.cxx +++ b/test/source/mtfxmldump.cxx @@ -374,7 +374,7 @@ void writeSize(XmlWriter& rWriter, Size const& rSize) rWriter.attribute("height", rSize.Height()); } -void writeRectangle(XmlWriter& rWriter, Rectangle const& rRectangle) +void writeRectangle(XmlWriter& rWriter, tools::Rectangle const& rRectangle) { rWriter.attribute("left", rRectangle.Left()); rWriter.attribute("top", rRectangle.Top()); @@ -764,7 +764,7 @@ void MetafileXmlDump::writeXml(const GDIMetaFile& rMetaFile, XmlWriter& rWriter) // FIXME for now we dump only the bounding box; this is // enough for the tests we have, but may need extending to // dumping the real polypolygon in the future - Rectangle aRectangle = pA->GetRegion().GetBoundRect(); + tools::Rectangle aRectangle = pA->GetRegion().GetBoundRect(); writeRectangle(rWriter, aRectangle); rWriter.endElement(); } @@ -775,7 +775,7 @@ void MetafileXmlDump::writeXml(const GDIMetaFile& rMetaFile, XmlWriter& rWriter) MetaISectRectClipRegionAction* pMetaISectRectClipRegionAction = static_cast<MetaISectRectClipRegionAction*>(pAction); rWriter.startElement(sCurrentElementTag); - Rectangle aRectangle = pMetaISectRectClipRegionAction->GetRect(); + tools::Rectangle aRectangle = pMetaISectRectClipRegionAction->GetRect(); writeRectangle(rWriter, aRectangle); rWriter.endElement(); } @@ -789,7 +789,7 @@ void MetafileXmlDump::writeXml(const GDIMetaFile& rMetaFile, XmlWriter& rWriter) // FIXME for now we dump only the bounding box; this is // enough for the tests we have, but may need extending to // dumping the real polypolygon in the future - Rectangle aRectangle = pMetaISectRegionClipRegionAction->GetRegion().GetBoundRect(); + tools::Rectangle aRectangle = pMetaISectRegionClipRegionAction->GetRegion().GetBoundRect(); writeRectangle(rWriter, aRectangle); rWriter.endElement(); } diff --git a/toolkit/source/awt/scrollabledialog.cxx b/toolkit/source/awt/scrollabledialog.cxx index af8c9283d504..2db5c6f2cd17 100644 --- a/toolkit/source/awt/scrollabledialog.cxx +++ b/toolkit/source/awt/scrollabledialog.cxx @@ -95,7 +95,7 @@ void ScrollableDialog::lcl_Scroll( long nX, long nY ) long nYScroll = mnScrollPos.Y() - nY; mnScrollPos = Point( nX, nY ); - Rectangle aScrollableArea( 0, 0, maScrollArea.Width(), maScrollArea.Height() ); + tools::Rectangle aScrollableArea( 0, 0, maScrollArea.Width(), maScrollArea.Height() ); Scroll(nXScroll, nYScroll, aScrollableArea ); // Manually scroll all children ( except the scrollbars ) for ( int index = 0; index < GetChildCount(); ++index ) diff --git a/toolkit/source/awt/vclxaccessiblecomponent.cxx b/toolkit/source/awt/vclxaccessiblecomponent.cxx index 1f8aeb8195a0..ba5c170faa0d 100644 --- a/toolkit/source/awt/vclxaccessiblecomponent.cxx +++ b/toolkit/source/awt/vclxaccessiblecomponent.cxx @@ -679,7 +679,7 @@ uno::Reference< accessibility::XAccessible > VCLXAccessibleComponent::getAccessi uno::Reference< accessibility::XAccessibleComponent > xComp( xAcc->getAccessibleContext(), uno::UNO_QUERY ); if ( xComp.is() ) { - Rectangle aRect = VCLRectangle( xComp->getBounds() ); + tools::Rectangle aRect = VCLRectangle( xComp->getBounds() ); Point aPos = VCLPoint( rPoint ); if ( aRect.IsInside( aPos ) ) { @@ -701,12 +701,12 @@ awt::Rectangle VCLXAccessibleComponent::implGetBounds() VclPtr<vcl::Window> pWindow = GetWindow(); if ( pWindow ) { - Rectangle aRect = pWindow->GetWindowExtentsRelative( nullptr ); + tools::Rectangle aRect = pWindow->GetWindowExtentsRelative( nullptr ); aBounds = AWTRectangle( aRect ); vcl::Window* pParent = pWindow->GetAccessibleParentWindow(); if ( pParent ) { - Rectangle aParentRect = pParent->GetWindowExtentsRelative( nullptr ); + tools::Rectangle aParentRect = pParent->GetWindowExtentsRelative( nullptr ); awt::Point aParentScreenLoc = AWTPoint( aParentRect.TopLeft() ); aBounds.X -= aParentScreenLoc.X; aBounds.Y -= aParentScreenLoc.Y; @@ -753,7 +753,7 @@ awt::Point VCLXAccessibleComponent::getLocationOnScreen( ) awt::Point aPos; if ( GetWindow() ) { - Rectangle aRect = GetWindow()->GetWindowExtentsRelative( nullptr ); + tools::Rectangle aRect = GetWindow()->GetWindowExtentsRelative( nullptr ); aPos.X = aRect.Left(); aPos.Y = aRect.Top(); } diff --git a/toolkit/source/awt/vclxgraphics.cxx b/toolkit/source/awt/vclxgraphics.cxx index 22f026f838c5..dcc587c6c536 100644 --- a/toolkit/source/awt/vclxgraphics.cxx +++ b/toolkit/source/awt/vclxgraphics.cxx @@ -278,7 +278,7 @@ void VCLXGraphics::clear( if( mpOutputDevice ) { - const ::Rectangle aVCLRect = VCLUnoHelper::ConvertToVCLRect( aRect ); + const ::tools::Rectangle aVCLRect = VCLUnoHelper::ConvertToVCLRect( aRect ); mpOutputDevice->Erase( aVCLRect ); } } @@ -326,7 +326,7 @@ void VCLXGraphics::draw( const uno::Reference< awt::XDisplayBitmap >& rxBitmapHa } if(nSourceX || nSourceY || aSz.Width() != nSourceWidth || aSz.Height() != nSourceHeight) - mpOutputDevice->IntersectClipRegion(vcl::Region(Rectangle(nDestX, nDestY, nDestX + nDestWidth - 1, nDestY + nDestHeight - 1))); + mpOutputDevice->IntersectClipRegion(vcl::Region(tools::Rectangle(nDestX, nDestY, nDestX + nDestWidth - 1, nDestY + nDestHeight - 1))); mpOutputDevice->DrawBitmapEx( aPos, aSz, aBmpEx ); } @@ -361,7 +361,7 @@ void VCLXGraphics::drawRect( sal_Int32 x, sal_Int32 y, sal_Int32 width, sal_Int3 if( mpOutputDevice ) { InitOutputDevice( InitOutDevFlags::CLIPREGION|InitOutDevFlags::RASTEROP|InitOutDevFlags::COLORS ); - mpOutputDevice->DrawRect( Rectangle( Point( x, y ), Size( width, height ) ) ); + mpOutputDevice->DrawRect( tools::Rectangle( Point( x, y ), Size( width, height ) ) ); } } @@ -372,7 +372,7 @@ void VCLXGraphics::drawRoundedRect( sal_Int32 x, sal_Int32 y, sal_Int32 width, s if( mpOutputDevice ) { InitOutputDevice( InitOutDevFlags::CLIPREGION|InitOutDevFlags::RASTEROP|InitOutDevFlags::COLORS ); - mpOutputDevice->DrawRect( Rectangle( Point( x, y ), Size( width, height ) ), nHorzRound, nVertRound ); + mpOutputDevice->DrawRect( tools::Rectangle( Point( x, y ), Size( width, height ) ), nHorzRound, nVertRound ); } } @@ -421,7 +421,7 @@ void VCLXGraphics::drawEllipse( sal_Int32 x, sal_Int32 y, sal_Int32 width, sal_I if( mpOutputDevice ) { InitOutputDevice( InitOutDevFlags::CLIPREGION|InitOutDevFlags::RASTEROP|InitOutDevFlags::COLORS ); - mpOutputDevice->DrawEllipse( Rectangle( Point( x, y ), Size( width, height ) ) ); + mpOutputDevice->DrawEllipse( tools::Rectangle( Point( x, y ), Size( width, height ) ) ); } } @@ -432,7 +432,7 @@ void VCLXGraphics::drawArc( sal_Int32 x, sal_Int32 y, sal_Int32 width, sal_Int32 if( mpOutputDevice ) { InitOutputDevice( InitOutDevFlags::CLIPREGION|InitOutDevFlags::RASTEROP|InitOutDevFlags::COLORS ); - mpOutputDevice->DrawArc( Rectangle( Point( x, y ), Size( width, height ) ), Point( x1, y1 ), Point( x2, y2 ) ); + mpOutputDevice->DrawArc( tools::Rectangle( Point( x, y ), Size( width, height ) ), Point( x1, y1 ), Point( x2, y2 ) ); } } @@ -443,7 +443,7 @@ void VCLXGraphics::drawPie( sal_Int32 x, sal_Int32 y, sal_Int32 width, sal_Int32 if( mpOutputDevice ) { InitOutputDevice( InitOutDevFlags::CLIPREGION|InitOutDevFlags::RASTEROP|InitOutDevFlags::COLORS ); - mpOutputDevice->DrawPie( Rectangle( Point( x, y ), Size( width, height ) ), Point( x1, y1 ), Point( x2, y2 ) ); + mpOutputDevice->DrawPie( tools::Rectangle( Point( x, y ), Size( width, height ) ), Point( x1, y1 ), Point( x2, y2 ) ); } } @@ -454,7 +454,7 @@ void VCLXGraphics::drawChord( sal_Int32 x, sal_Int32 y, sal_Int32 width, sal_Int if( mpOutputDevice ) { InitOutputDevice( InitOutDevFlags::CLIPREGION|InitOutDevFlags::RASTEROP|InitOutDevFlags::COLORS ); - mpOutputDevice->DrawChord( Rectangle( Point( x, y ), Size( width, height ) ), Point( x1, y1 ), Point( x2, y2 ) ); + mpOutputDevice->DrawChord( tools::Rectangle( Point( x, y ), Size( width, height ) ), Point( x1, y1 ), Point( x2, y2 ) ); } } @@ -473,7 +473,7 @@ void VCLXGraphics::drawGradient( sal_Int32 x, sal_Int32 y, sal_Int32 width, sal_ aGradient.SetStartIntensity(rGradient.StartIntensity); aGradient.SetEndIntensity(rGradient.EndIntensity); aGradient.SetSteps(rGradient.StepCount); - mpOutputDevice->DrawGradient( Rectangle( Point( x, y ), Size( width, height ) ), aGradient ); + mpOutputDevice->DrawGradient( tools::Rectangle( Point( x, y ), Size( width, height ) ), aGradient ); } } diff --git a/toolkit/source/awt/vclxtoolkit.cxx b/toolkit/source/awt/vclxtoolkit.cxx index e35fd383f5c1..97eba0fde320 100644 --- a/toolkit/source/awt/vclxtoolkit.cxx +++ b/toolkit/source/awt/vclxtoolkit.cxx @@ -743,7 +743,7 @@ css::uno::Reference< css::awt::XWindowPeer > VCLXToolkit::getDesktopWindow( ) css::awt::Rectangle VCLXToolkit::getWorkArea( ) { sal_Int32 nDisplay = Application::GetDisplayBuiltInScreen(); - Rectangle aWorkRect = Application::GetScreenPosSizePixel( nDisplay ); + tools::Rectangle aWorkRect = Application::GetScreenPosSizePixel( nDisplay ); css::awt::Rectangle aNotherRect; aNotherRect.X = aWorkRect.getX(); aNotherRect.Y = aWorkRect.getY(); @@ -1282,7 +1282,7 @@ css::uno::Reference< css::awt::XWindowPeer > VCLXToolkit::ImplCreateWindow( } else if ( !VCLUnoHelper::IsZero( rDescriptor.Bounds ) ) { - Rectangle aRect = VCLRectangle( rDescriptor.Bounds ); + tools::Rectangle aRect = VCLRectangle( rDescriptor.Bounds ); pNewWindow->SetPosSizePixel( aRect.TopLeft(), aRect.GetSize() ); } diff --git a/toolkit/source/awt/vclxwindow.cxx b/toolkit/source/awt/vclxwindow.cxx index 1fcbc5d536b7..bc68c5eee713 100644 --- a/toolkit/source/awt/vclxwindow.cxx +++ b/toolkit/source/awt/vclxwindow.cxx @@ -449,7 +449,7 @@ void VCLXWindow::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) { css::awt::PaintEvent aEvent; aEvent.Source = static_cast<cppu::OWeakObject*>(this); - aEvent.UpdateRect = AWTRectangle( *static_cast<Rectangle*>(rVclWindowEvent.GetData()) ); + aEvent.UpdateRect = AWTRectangle( *static_cast<tools::Rectangle*>(rVclWindowEvent.GetData()) ); aEvent.Count = 0; mpImpl->getPaintListeners().windowPaint( aEvent ); } @@ -984,7 +984,7 @@ css::awt::Rectangle VCLXWindow::getPosSize( ) if( vcl::Window::GetDockingManager()->IsDockable( GetWindow() ) ) aBounds = AWTRectangle( vcl::Window::GetDockingManager()->GetPosSizePixel( GetWindow() ) ); else - aBounds = AWTRectangle( Rectangle( GetWindow()->GetPosPixel(), GetWindow()->GetSizePixel() ) ); + aBounds = AWTRectangle( tools::Rectangle( GetWindow()->GetPosPixel(), GetWindow()->GetSizePixel() ) ); } return aBounds; diff --git a/toolkit/source/controls/dialogcontrol.cxx b/toolkit/source/controls/dialogcontrol.cxx index 382cf55c0941..6861e8732ecf 100644 --- a/toolkit/source/controls/dialogcontrol.cxx +++ b/toolkit/source/controls/dialogcontrol.cxx @@ -1093,7 +1093,7 @@ void UnoFrameControl::ImplSetPosSize( Reference< XControl >& rxCtrl ) if ( !bOwnCtrl && !sTitle.isEmpty() ) { // Adjust Y based on height of Title - ::Rectangle aRect; + ::tools::Rectangle aRect; aRect = pOutDev->GetTextRect( aRect, sTitle ); nY = nY + ( aRect.GetHeight() / 2 ); } diff --git a/toolkit/source/helper/vclunohelper.cxx b/toolkit/source/helper/vclunohelper.cxx index bd3430c980d6..0c2004234bff 100644 --- a/toolkit/source/helper/vclunohelper.cxx +++ b/toolkit/source/helper/vclunohelper.cxx @@ -671,12 +671,12 @@ css::awt::Point VCLUnoHelper::ConvertToAWTPoint(::Point /* VCLPoint */ const& _a return aAWTPoint; } -::Rectangle VCLUnoHelper::ConvertToVCLRect( css::awt::Rectangle const & _rRect ) +::tools::Rectangle VCLUnoHelper::ConvertToVCLRect( css::awt::Rectangle const & _rRect ) { - return ::Rectangle( _rRect.X, _rRect.Y, _rRect.X + _rRect.Width - 1, _rRect.Y + _rRect.Height - 1 ); + return ::tools::Rectangle( _rRect.X, _rRect.Y, _rRect.X + _rRect.Width - 1, _rRect.Y + _rRect.Height - 1 ); } -css::awt::Rectangle VCLUnoHelper::ConvertToAWTRect( ::Rectangle const & _rRect ) +css::awt::Rectangle VCLUnoHelper::ConvertToAWTRect( ::tools::Rectangle const & _rRect ) { return css::awt::Rectangle( _rRect.Left(), _rRect.Top(), _rRect.GetWidth(), _rRect.GetHeight() ); } diff --git a/tools/qa/cppunit/test_rectangle.cxx b/tools/qa/cppunit/test_rectangle.cxx index 4f3fff8afa34..e9a1c719b10f 100644 --- a/tools/qa/cppunit/test_rectangle.cxx +++ b/tools/qa/cppunit/test_rectangle.cxx @@ -30,7 +30,7 @@ public: void Test::test_rectangle() { { - Rectangle aRect(1,1,1,1); + tools::Rectangle aRect(1,1,1,1); CPPUNIT_ASSERT_EQUAL(long(1), aRect.GetWidth()); CPPUNIT_ASSERT_EQUAL(long(1), aRect.GetHeight()); @@ -40,7 +40,7 @@ void Test::test_rectangle() } { - Rectangle aRect(Point(), Size(1,1)); + tools::Rectangle aRect(Point(), Size(1,1)); CPPUNIT_ASSERT_EQUAL(long(0), aRect.Left()); CPPUNIT_ASSERT_EQUAL(long(0), aRect.Top()); diff --git a/tools/source/generic/b3dtrans.cxx b/tools/source/generic/b3dtrans.cxx index d12330145fdf..bc830767c280 100644 --- a/tools/source/generic/b3dtrans.cxx +++ b/tools/source/generic/b3dtrans.cxx @@ -147,7 +147,7 @@ void B3dTransformationSet::Reset() mfRatio = 0.0; - maViewportRectangle = Rectangle(-1, -1, 2, 2); + maViewportRectangle = tools::Rectangle(-1, -1, 2, 2); maVisibleRectangle = maViewportRectangle; mbPerspective = true; @@ -318,7 +318,7 @@ void B3dTransformationSet::SetPerspective(bool bNew) } } -void B3dTransformationSet::SetViewportRectangle(Rectangle const & rRect, Rectangle const & rVisible) +void B3dTransformationSet::SetViewportRectangle(tools::Rectangle const & rRect, tools::Rectangle const & rVisible) { if(rRect != maViewportRectangle || rVisible != maVisibleRectangle) { diff --git a/tools/source/generic/gen.cxx b/tools/source/generic/gen.cxx index 96bbd91a2e4f..834fc6869864 100644 --- a/tools/source/generic/gen.cxx +++ b/tools/source/generic/gen.cxx @@ -42,7 +42,7 @@ SvStream& WritePair( SvStream& rOStream, const Pair& rPair ) return rOStream; } -void Rectangle::SetSize( const Size& rSize ) +void tools::Rectangle::SetSize( const Size& rSize ) { if ( rSize.Width() < 0 ) nRight = nLeft + rSize.Width() +1; @@ -59,7 +59,7 @@ void Rectangle::SetSize( const Size& rSize ) nBottom = RECT_EMPTY; } -Rectangle& Rectangle::Union( const Rectangle& rRect ) +tools::Rectangle& tools::Rectangle::Union( const tools::Rectangle& rRect ) { if ( rRect.IsEmpty() ) return *this; @@ -77,18 +77,18 @@ Rectangle& Rectangle::Union( const Rectangle& rRect ) return *this; } -Rectangle& Rectangle::Intersection( const Rectangle& rRect ) +tools::Rectangle& tools::Rectangle::Intersection( const tools::Rectangle& rRect ) { if ( IsEmpty() ) return *this; if ( rRect.IsEmpty() ) { - *this = Rectangle(); + *this = tools::Rectangle(); return *this; } // Justify rectangle - Rectangle aTmpRect( rRect ); + tools::Rectangle aTmpRect( rRect ); Justify(); aTmpRect.Justify(); @@ -100,12 +100,12 @@ Rectangle& Rectangle::Intersection( const Rectangle& rRect ) // Determine if intersection is empty if ( nRight < nLeft || nBottom < nTop ) - *this = Rectangle(); + *this = tools::Rectangle(); return *this; } -void Rectangle::Justify() +void tools::Rectangle::Justify() { long nHelp; @@ -124,7 +124,7 @@ void Rectangle::Justify() } } -bool Rectangle::IsInside( const Point& rPoint ) const +bool tools::Rectangle::IsInside( const Point& rPoint ) const { if ( IsEmpty() ) return false; @@ -152,7 +152,7 @@ bool Rectangle::IsInside( const Point& rPoint ) const return true; } -bool Rectangle::IsInside( const Rectangle& rRect ) const +bool tools::Rectangle::IsInside( const tools::Rectangle& rRect ) const { if ( IsInside( rRect.TopLeft() ) && IsInside( rRect.BottomRight() ) ) return true; @@ -160,13 +160,15 @@ bool Rectangle::IsInside( const Rectangle& rRect ) const return false; } -bool Rectangle::IsOver( const Rectangle& rRect ) const +bool tools::Rectangle::IsOver( const tools::Rectangle& rRect ) const { // If there's no intersection, they don't overlap return !GetIntersection( rRect ).IsEmpty(); } -SvStream& ReadRectangle( SvStream& rIStream, Rectangle& rRect ) +namespace tools +{ +SvStream& ReadRectangle( SvStream& rIStream, tools::Rectangle& rRect ) { sal_Int32 nTmpL(0), nTmpT(0), nTmpR(0), nTmpB(0); @@ -180,7 +182,7 @@ SvStream& ReadRectangle( SvStream& rIStream, Rectangle& rRect ) return rIStream; } -SvStream& WriteRectangle( SvStream& rOStream, const Rectangle& rRect ) +SvStream& WriteRectangle( SvStream& rOStream, const tools::Rectangle& rRect ) { rOStream.WriteInt32( rRect.nLeft ) .WriteInt32( rRect.nTop ) @@ -189,8 +191,9 @@ SvStream& WriteRectangle( SvStream& rOStream, const Rectangle& rRect ) return rOStream; } +} -OString Rectangle::toString() const +OString tools::Rectangle::toString() const { std::stringstream ss; // Note that this is not just used for debugging output but the diff --git a/tools/source/generic/poly.cxx b/tools/source/generic/poly.cxx index 0faae1a39b27..353638ea984d 100644 --- a/tools/source/generic/poly.cxx +++ b/tools/source/generic/poly.cxx @@ -556,7 +556,7 @@ Polygon::Polygon( const tools::Polygon& rPoly ) mpImplPolygon->mnRefCount++; } -Polygon::Polygon( const Rectangle& rRect ) +Polygon::Polygon( const tools::Rectangle& rRect ) { if ( rRect.IsEmpty() ) @@ -572,13 +572,13 @@ Polygon::Polygon( const Rectangle& rRect ) } } -Polygon::Polygon( const Rectangle& rRect, sal_uInt32 nHorzRound, sal_uInt32 nVertRound ) +Polygon::Polygon( const tools::Rectangle& rRect, sal_uInt32 nHorzRound, sal_uInt32 nVertRound ) { if ( rRect.IsEmpty() ) mpImplPolygon = static_cast<ImplPolygon*>(&aStaticImplPolygon); else { - Rectangle aRect( rRect ); + tools::Rectangle aRect( rRect ); aRect.Justify(); // SJ: i9140 nHorzRound = std::min( nHorzRound, static_cast<sal_uInt32>(labs( aRect.GetWidth() >> 1 )) ); @@ -670,7 +670,7 @@ Polygon::Polygon( const Point& rCenter, long nRadX, long nRadY ) mpImplPolygon = static_cast<ImplPolygon*>(&aStaticImplPolygon); } -Polygon::Polygon( const Rectangle& rBound, const Point& rStart, const Point& rEnd, +Polygon::Polygon( const tools::Rectangle& rBound, const Point& rStart, const Point& rEnd, PolyStyle eStyle, bool bFullCircle ) { const long nWidth = rBound.GetWidth(); @@ -922,7 +922,7 @@ void Polygon::Optimize( PolyOptimizeFlags nOptimizeFlags ) { if( nOptimizeFlags & PolyOptimizeFlags::EDGES ) { - const Rectangle aBound( GetBoundRect() ); + const tools::Rectangle aBound( GetBoundRect() ); const double fArea = ( aBound.GetWidth() + aBound.GetHeight() ) * 0.5; const sal_uInt16 nPercent = 50; @@ -1320,10 +1320,10 @@ void Polygon::Rotate( const Point& rCenter, double fSin, double fCos ) } } -void Polygon::Clip( const Rectangle& rRect ) +void Polygon::Clip( const tools::Rectangle& rRect ) { // #105251# Justify rect before edge filtering - Rectangle aJustifiedRect( rRect ); + tools::Rectangle aJustifiedRect( rRect ); aJustifiedRect.Justify(); sal_uInt16 nSourceSize = mpImplPolygon->mnPoints; @@ -1351,7 +1351,7 @@ void Polygon::Clip( const Rectangle& rRect ) mpImplPolygon = aPolygon.release(); } -Rectangle Polygon::GetBoundRect() const +tools::Rectangle Polygon::GetBoundRect() const { // Removing the assert. Bezier curves have the attribute that each single // curve segment defined by four points can not exit the four-point polygon @@ -1366,7 +1366,7 @@ Rectangle Polygon::GetBoundRect() const sal_uInt16 nCount = mpImplPolygon->mnPoints; if( ! nCount ) - return Rectangle(); + return tools::Rectangle(); long nXMin, nXMax, nYMin, nYMax; @@ -1388,14 +1388,14 @@ Rectangle Polygon::GetBoundRect() const nYMax = pPt->Y(); } - return Rectangle( nXMin, nYMin, nXMax, nYMax ); + return tools::Rectangle( nXMin, nYMin, nXMax, nYMax ); } bool Polygon::IsInside( const Point& rPoint ) const { DBG_ASSERT( !mpImplPolygon->mpFlagAry, "IsInside could fail with beziers!" ); - const Rectangle aBound( GetBoundRect() ); + const tools::Rectangle aBound( GetBoundRect() ); const Line aLine( rPoint, Point( aBound.Right() + 100L, rPoint.Y() ) ); sal_uInt16 nCount = mpImplPolygon->mnPoints; sal_uInt16 nPCounter = 0; diff --git a/tools/source/generic/poly2.cxx b/tools/source/generic/poly2.cxx index 144fe9a4e00e..0c4f7ed9d665 100644 --- a/tools/source/generic/poly2.cxx +++ b/tools/source/generic/poly2.cxx @@ -251,7 +251,7 @@ void PolyPolygon::Optimize( PolyOptimizeFlags nOptimizeFlags ) if( bEdges ) { - const Rectangle aBound( GetBoundRect() ); + const tools::Rectangle aBound( GetBoundRect() ); fArea = ( aBound.GetWidth() + aBound.GetHeight() ) * 0.5; nPercent = 50; @@ -424,7 +424,7 @@ void PolyPolygon::Rotate( const Point& rCenter, double fSin, double fCos ) mpImplPolyPolygon->mpPolyAry[ i ]->Rotate( rCenter, fSin, fCos ); } -void PolyPolygon::Clip( const Rectangle& rRect ) +void PolyPolygon::Clip( const tools::Rectangle& rRect ) { sal_uInt16 nPolyCount = mpImplPolyPolygon->mnCount; sal_uInt16 i; @@ -449,7 +449,7 @@ void PolyPolygon::Clip( const Rectangle& rRect ) } } -Rectangle PolyPolygon::GetBoundRect() const +tools::Rectangle PolyPolygon::GetBoundRect() const { long nXMin=0, nXMax=0, nYMin=0, nYMax=0; bool bFirst = true; @@ -486,9 +486,9 @@ Rectangle PolyPolygon::GetBoundRect() const } if ( !bFirst ) - return Rectangle( nXMin, nYMin, nXMax, nYMax ); + return tools::Rectangle( nXMin, nYMin, nXMax, nYMax ); else - return Rectangle(); + return tools::Rectangle(); } Polygon& PolyPolygon::operator[]( sal_uInt16 nPos ) diff --git a/tools/source/generic/svborder.cxx b/tools/source/generic/svborder.cxx index 8f2bec386c5e..9e4f15133f9c 100644 --- a/tools/source/generic/svborder.cxx +++ b/tools/source/generic/svborder.cxx @@ -19,7 +19,7 @@ #include <tools/svborder.hxx> #include <osl/diagnose.h> -Rectangle & operator += ( Rectangle & rRect, const SvBorder & rBorder ) +tools::Rectangle & operator += ( tools::Rectangle & rRect, const SvBorder & rBorder ) { // call GetSize first due to Empty-Rect Size aS( rRect.GetSize() ); diff --git a/vbahelper/source/vbahelper/vbahelper.cxx b/vbahelper/source/vbahelper/vbahelper.cxx index 43d8c702b0f2..09e2de5fd52a 100644 --- a/vbahelper/source/vbahelper/vbahelper.cxx +++ b/vbahelper/source/vbahelper/vbahelper.cxx @@ -914,7 +914,7 @@ double UserFormGeometryHelper::implGetSize( bool bHeight, bool bOuter ) const { if( const vcl::Window* pWindow = VCLUnoHelper::GetWindow( mxWindow ) ) { - Rectangle aOuterRect = pWindow->GetWindowExtentsRelative( nullptr ); + tools::Rectangle aOuterRect = pWindow->GetWindowExtentsRelative( nullptr ); aSizePixel = awt::Size( aOuterRect.getWidth(), aOuterRect.getHeight() ); } } @@ -938,7 +938,7 @@ void UserFormGeometryHelper::implSetSize( double fSize, bool bHeight, bool bOute { if( const vcl::Window* pWindow = VCLUnoHelper::GetWindow( mxWindow ) ) { - Rectangle aOuterRect = pWindow->GetWindowExtentsRelative( nullptr ); + tools::Rectangle aOuterRect = pWindow->GetWindowExtentsRelative( nullptr ); if( !aOuterRect.IsEmpty() ) { awt::Rectangle aInnerRect = mxWindow->getPosSize(); diff --git a/vcl/backendtest/VisualBackendTest.cxx b/vcl/backendtest/VisualBackendTest.cxx index d419f249eb8c..1d9af127eb24 100644 --- a/vcl/backendtest/VisualBackendTest.cxx +++ b/vcl/backendtest/VisualBackendTest.cxx @@ -51,7 +51,7 @@ using namespace css; -void drawBitmapCentered(Rectangle& rRect, Bitmap aBitmap, vcl::RenderContext& rRenderContext) +void drawBitmapCentered(tools::Rectangle& rRect, Bitmap aBitmap, vcl::RenderContext& rRenderContext) { long nWidth = rRect.GetWidth(); long nHeight = rRect.GetHeight(); @@ -66,7 +66,7 @@ void drawBitmapCentered(Rectangle& rRect, Bitmap aBitmap, vcl::RenderContext& rR rRenderContext.DrawBitmap(aPoint, aBitmap); } -void drawBitmapScaledAndCentered(Rectangle& rRect, Bitmap aBitmap, vcl::RenderContext& rRenderContext, BmpScaleFlag aFlag = BmpScaleFlag::Fast) +void drawBitmapScaledAndCentered(tools::Rectangle& rRect, Bitmap aBitmap, vcl::RenderContext& rRenderContext, BmpScaleFlag aFlag = BmpScaleFlag::Fast) { long nWidth = rRect.GetWidth(); long nHeight = rRect.GetHeight(); @@ -80,7 +80,7 @@ void drawBitmapScaledAndCentered(Rectangle& rRect, Bitmap aBitmap, vcl::RenderCo drawBitmapCentered(rRect, aBitmap, rRenderContext); } -void drawBackgroundRect(Rectangle& rRect, Color aColor, vcl::RenderContext& rRenderContext) +void drawBackgroundRect(tools::Rectangle& rRect, Color aColor, vcl::RenderContext& rRenderContext) { rRenderContext.Push(PushFlags::LINECOLOR | PushFlags::FILLCOLOR); rRenderContext.SetFillColor(aColor); @@ -89,7 +89,7 @@ void drawBackgroundRect(Rectangle& rRect, Color aColor, vcl::RenderContext& rRen rRenderContext.Pop(); } -void assertAndSetBackground(vcl::test::TestResult eResult, Rectangle& rRect, vcl::RenderContext& rRenderContext) +void assertAndSetBackground(vcl::test::TestResult eResult, tools::Rectangle& rRect, vcl::RenderContext& rRenderContext) { if (eResult == vcl::test::TestResult::Passed) drawBackgroundRect(rRect, COL_GREEN, rRenderContext); @@ -157,9 +157,9 @@ public: } } - static std::vector<Rectangle> setupRegions(int nPartitionsX, int nPartitionsY, int nWidth, int nHeight) + static std::vector<tools::Rectangle> setupRegions(int nPartitionsX, int nPartitionsY, int nWidth, int nHeight) { - std::vector<Rectangle> aRegions; + std::vector<tools::Rectangle> aRegions; for (int y = 0; y < nPartitionsY; y++) { @@ -170,7 +170,7 @@ public: long x2 = (x+1) * (nWidth / nPartitionsX); long y2 = (y+1) * (nHeight / nPartitionsY); - aRegions.push_back(Rectangle(x1 + 1, y1 + 1, x2 - 2, y2 - 2)); + aRegions.push_back(tools::Rectangle(x1 + 1, y1 + 1, x2 - 2, y2 - 2)); } } return aRegions; @@ -178,10 +178,10 @@ public: static void testRectangles(vcl::RenderContext& rRenderContext, int nWidth, int nHeight) { - Rectangle aRectangle; + tools::Rectangle aRectangle; size_t index = 0; - std::vector<Rectangle> aRegions = setupRegions(3, 2, nWidth, nHeight); + std::vector<tools::Rectangle> aRegions = setupRegions(3, 2, nWidth, nHeight); aRectangle = aRegions[index++]; { @@ -234,10 +234,10 @@ public: static void testFilledRectangles(vcl::RenderContext& rRenderContext, int nWidth, int nHeight) { - Rectangle aRectangle; + tools::Rectangle aRectangle; size_t index = 0; - std::vector<Rectangle> aRegions = setupRegions(3, 2, nWidth, nHeight); + std::vector<tools::Rectangle> aRegions = setupRegions(3, 2, nWidth, nHeight); aRectangle = aRegions[index++]; { @@ -288,10 +288,10 @@ public: static void testLines(vcl::RenderContext& rRenderContext, int nWidth, int nHeight) { - Rectangle aRectangle; + tools::Rectangle aRectangle; size_t index = 0; - std::vector<Rectangle> aRegions = setupRegions(3, 2, nWidth, nHeight); + std::vector<tools::Rectangle> aRegions = setupRegions(3, 2, nWidth, nHeight); aRectangle = aRegions[index++]; { @@ -339,10 +339,10 @@ public: static void testBitmaps(vcl::RenderContext& rRenderContext, int nWidth, int nHeight) { - Rectangle aRectangle; + tools::Rectangle aRectangle; size_t index = 0; - std::vector<Rectangle> aRegions = setupRegions(2, 2, nWidth, nHeight); + std::vector<tools::Rectangle> aRegions = setupRegions(2, 2, nWidth, nHeight); aRectangle = aRegions[index++]; { @@ -374,7 +374,7 @@ public: } } - virtual void Paint(vcl::RenderContext& rRenderContext, const Rectangle& /*rRect*/) override + virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& /*rRect*/) override { if (mnTest % mnNumberOfTests == mnNumberOfTests - 1) { @@ -427,7 +427,7 @@ public: mpVDev->DrawPolyPolygon(polyPolygon); - Rectangle aGradientRect(Point(200, 200), Size(200 + fTime * 300, 200 + fTime * 300)); + tools::Rectangle aGradientRect(Point(200, 200), Size(200 + fTime * 300, 200 + fTime * 300)); mpVDev->DrawGradient(aGradientRect, Gradient(GradientStyle::Linear, COL_YELLOW, COL_BLUE)); rRenderContext.DrawOutDev(Point(), mpVDev->GetOutputSizePixel(), @@ -445,7 +445,7 @@ public: long nWidth = aSize.Width(); long nHeight = aSize.Height(); - Rectangle aRectangle; + tools::Rectangle aRectangle; size_t index = 0; if (mnTest % mnNumberOfTests == 0) @@ -466,7 +466,7 @@ public: } else if (mnTest % mnNumberOfTests == 4) { - std::vector<Rectangle> aRegions = setupRegions(3, 2, nWidth, nHeight); + std::vector<tools::Rectangle> aRegions = setupRegions(3, 2, nWidth, nHeight); aRectangle = aRegions[index++]; { diff --git a/vcl/backendtest/outputdevice/bitmap.cxx b/vcl/backendtest/outputdevice/bitmap.cxx index c86589ae9171..eaddff1a18a9 100644 --- a/vcl/backendtest/outputdevice/bitmap.cxx +++ b/vcl/backendtest/outputdevice/bitmap.cxx @@ -23,8 +23,8 @@ Bitmap OutputDeviceTestBitmap::setupDrawTransformedBitmap() Bitmap::ScopedWriteAccess aWriteAccess(aBitmap); aWriteAccess->Erase(constFillColor); aWriteAccess->SetLineColor(COL_YELLOW); - aWriteAccess->DrawRect(Rectangle(0, 0, 8, 8)); - aWriteAccess->DrawRect(Rectangle(2, 2, 6, 6)); + aWriteAccess->DrawRect(tools::Rectangle(0, 0, 8, 8)); + aWriteAccess->DrawRect(tools::Rectangle(2, 2, 6, 6)); } initialSetup(13, 13, constBackgroundColor); @@ -48,8 +48,8 @@ Bitmap OutputDeviceTestBitmap::setupDrawBitmap() Bitmap::ScopedWriteAccess aWriteAccess(aBitmap); aWriteAccess->Erase(constFillColor); aWriteAccess->SetLineColor(COL_YELLOW); - aWriteAccess->DrawRect(Rectangle(0, 0, 8, 8)); - aWriteAccess->DrawRect(Rectangle(2, 2, 6, 6)); + aWriteAccess->DrawRect(tools::Rectangle(0, 0, 8, 8)); + aWriteAccess->DrawRect(tools::Rectangle(2, 2, 6, 6)); } initialSetup(13, 13, constBackgroundColor); @@ -70,8 +70,8 @@ Bitmap OutputDeviceTestBitmap::setupDrawBitmapExWithAlpha() Bitmap::ScopedWriteAccess aWriteAccess(aBitmap); aWriteAccess->Erase(COL_WHITE); aWriteAccess->SetLineColor(Color(0xFF, 0xFF, 0x00)); - aWriteAccess->DrawRect(Rectangle(0, 0, 8, 8)); - aWriteAccess->DrawRect(Rectangle(3, 3, 5, 5)); + aWriteAccess->DrawRect(tools::Rectangle(0, 0, 8, 8)); + aWriteAccess->DrawRect(tools::Rectangle(3, 3, 5, 5)); } AlphaMask aAlpha(aBitmapSize); @@ -79,13 +79,13 @@ Bitmap OutputDeviceTestBitmap::setupDrawBitmapExWithAlpha() AlphaMask::ScopedWriteAccess aWriteAccess(aAlpha); aWriteAccess->Erase(COL_WHITE); aWriteAccess->SetLineColor(Color(0x44, 0x44, 0x44)); - aWriteAccess->DrawRect(Rectangle(0, 0, 8, 8)); - aWriteAccess->DrawRect(Rectangle(3, 3, 5, 5)); + aWriteAccess->DrawRect(tools::Rectangle(0, 0, 8, 8)); + aWriteAccess->DrawRect(tools::Rectangle(3, 3, 5, 5)); } initialSetup(13, 13, constBackgroundColor); - Point aPoint(alignToCenter(maVDRectangle, Rectangle(Point(), aBitmapSize)).TopLeft()); + Point aPoint(alignToCenter(maVDRectangle, tools::Rectangle(Point(), aBitmapSize)).TopLeft()); mpVirtualDevice->DrawBitmapEx(aPoint, BitmapEx(aBitmap, aAlpha)); @@ -100,8 +100,8 @@ Bitmap OutputDeviceTestBitmap::setupDrawMask() Bitmap::ScopedWriteAccess aWriteAccess(aBitmap); aWriteAccess->Erase(COL_WHITE); aWriteAccess->SetLineColor(COL_BLACK); - aWriteAccess->DrawRect(Rectangle(0, 0, 8, 8)); - aWriteAccess->DrawRect(Rectangle(3, 3, 5, 5)); + aWriteAccess->DrawRect(tools::Rectangle(0, 0, 8, 8)); + aWriteAccess->DrawRect(tools::Rectangle(3, 3, 5, 5)); } initialSetup(13, 13, constBackgroundColor); diff --git a/vcl/backendtest/outputdevice/common.cxx b/vcl/backendtest/outputdevice/common.cxx index 727fbcc8c767..1252baf3b1b1 100644 --- a/vcl/backendtest/outputdevice/common.cxx +++ b/vcl/backendtest/outputdevice/common.cxx @@ -226,7 +226,7 @@ OutputDeviceTestCommon::OutputDeviceTestCommon() void OutputDeviceTestCommon::initialSetup(long nWidth, long nHeight, Color aColor) { - maVDRectangle = Rectangle(Point(), Size (nWidth, nHeight)); + maVDRectangle = tools::Rectangle(Point(), Size (nWidth, nHeight)); mpVirtualDevice->SetOutputSizePixel(maVDRectangle.GetSize()); mpVirtualDevice->SetBackground(Wallpaper(aColor)); mpVirtualDevice->Erase(); @@ -282,12 +282,12 @@ TestResult OutputDeviceTestCommon::checkRectangles(Bitmap& aBitmap, std::vector< return aReturnValue; } -Rectangle OutputDeviceTestCommon::alignToCenter(Rectangle aRect1, Rectangle aRect2) +tools::Rectangle OutputDeviceTestCommon::alignToCenter(tools::Rectangle aRect1, tools::Rectangle aRect2) { Point aPoint((aRect1.GetWidth() / 2.0) - (aRect2.GetWidth() / 2.0), (aRect1.GetHeight() / 2.0) - (aRect2.GetHeight() / 2.0)); - return Rectangle(aPoint, aRect2.GetSize()); + return tools::Rectangle(aPoint, aRect2.GetSize()); } TestResult OutputDeviceTestCommon::checkDiamond(Bitmap& rBitmap) @@ -295,7 +295,7 @@ TestResult OutputDeviceTestCommon::checkDiamond(Bitmap& rBitmap) return checkDiamondLine(rBitmap, 1, constLineColor); } -void OutputDeviceTestCommon::createDiamondPoints(Rectangle rRect, int nOffset, +void OutputDeviceTestCommon::createDiamondPoints(tools::Rectangle rRect, int nOffset, Point& rPoint1, Point& rPoint2, Point& rPoint3, Point& rPoint4) { @@ -308,7 +308,7 @@ void OutputDeviceTestCommon::createDiamondPoints(Rectangle rRect, int nOffset, rPoint4 = Point(midPointX - nOffset, midPointY ); } -void OutputDeviceTestCommon::createHorizontalVerticalDiagonalLinePoints(Rectangle rRect, +void OutputDeviceTestCommon::createHorizontalVerticalDiagonalLinePoints(tools::Rectangle rRect, Point& rHorizontalLinePoint1, Point& rHorizontalLinePoint2, Point& rVerticalLinePoint1, Point& rVerticalLinePoint2, Point& rDiagonalLinePoint1, Point& rDiagonalLinePoint2) diff --git a/vcl/backendtest/outputdevice/gradient.cxx b/vcl/backendtest/outputdevice/gradient.cxx index 83d45bf8cf4d..b1fdd0a24445 100644 --- a/vcl/backendtest/outputdevice/gradient.cxx +++ b/vcl/backendtest/outputdevice/gradient.cxx @@ -19,7 +19,7 @@ Bitmap OutputDeviceTestGradient::setupLinearGradient() Gradient aGradient(GradientStyle::Linear, Color(0xFF, 0xFF, 0xFF), Color(0x00, 0x00, 0x00)); aGradient.SetAngle(900); - Rectangle aDrawRect(maVDRectangle.Left() + 1, maVDRectangle.Top() + 1, + tools::Rectangle aDrawRect(maVDRectangle.Left() + 1, maVDRectangle.Top() + 1, maVDRectangle.Right() - 1, maVDRectangle.Bottom() - 1); mpVirtualDevice->DrawGradient(aDrawRect, aGradient); @@ -31,7 +31,7 @@ Bitmap OutputDeviceTestGradient::setupRadialGradient() initialSetup(12, 12, constBackgroundColor); Gradient aGradient(GradientStyle::Radial, Color(0xFF, 0xFF, 0xFF), Color(0x00, 0x00, 0x00)); - Rectangle aDrawRect(maVDRectangle.Left() + 1, maVDRectangle.Top() + 1, + tools::Rectangle aDrawRect(maVDRectangle.Left() + 1, maVDRectangle.Top() + 1, maVDRectangle.Right() - 1, maVDRectangle.Bottom() - 1); mpVirtualDevice->DrawGradient(aDrawRect, aGradient); diff --git a/vcl/backendtest/outputdevice/line.cxx b/vcl/backendtest/outputdevice/line.cxx index 4cd39dbfcfe9..1c384c14de3c 100644 --- a/vcl/backendtest/outputdevice/line.cxx +++ b/vcl/backendtest/outputdevice/line.cxx @@ -16,7 +16,7 @@ namespace test { namespace { -void drawLineOffset(OutputDevice& rDevice, Rectangle& rRect, int nOffset) +void drawLineOffset(OutputDevice& rDevice, tools::Rectangle& rRect, int nOffset) { Point aLeftTop (rRect.Left() + nOffset, rRect.Top() + nOffset); Point aRightTop (rRect.Right() - nOffset, rRect.Top() + nOffset); diff --git a/vcl/backendtest/outputdevice/outputdevice.cxx b/vcl/backendtest/outputdevice/outputdevice.cxx index 6f7ed16df824..5ada6edcefec 100644 --- a/vcl/backendtest/outputdevice/outputdevice.cxx +++ b/vcl/backendtest/outputdevice/outputdevice.cxx @@ -32,10 +32,10 @@ Bitmap OutputDeviceTestAnotherOutDev::setupXOR() { initialSetup(13, 13, constBackgroundColor); - Rectangle aDrawRectangle(maVDRectangle); + tools::Rectangle aDrawRectangle(maVDRectangle); aDrawRectangle.shrink(2); - Rectangle aScissorRectangle(maVDRectangle); + tools::Rectangle aScissorRectangle(maVDRectangle); aScissorRectangle.shrink(4); mpVirtualDevice->SetRasterOp(RasterOp::Xor); diff --git a/vcl/backendtest/outputdevice/pixel.cxx b/vcl/backendtest/outputdevice/pixel.cxx index f13690e72209..2ad49e0f2fe8 100644 --- a/vcl/backendtest/outputdevice/pixel.cxx +++ b/vcl/backendtest/outputdevice/pixel.cxx @@ -16,7 +16,7 @@ namespace test { namespace { -void drawPixelOffset(OutputDevice& rDevice, Rectangle& rRect, int nOffset) +void drawPixelOffset(OutputDevice& rDevice, tools::Rectangle& rRect, int nOffset) { for (long x = 0 + nOffset; x < (rRect.GetWidth() - nOffset); ++x) { diff --git a/vcl/backendtest/outputdevice/polygon.cxx b/vcl/backendtest/outputdevice/polygon.cxx index de722c54abe9..a6b3c75a9a13 100644 --- a/vcl/backendtest/outputdevice/polygon.cxx +++ b/vcl/backendtest/outputdevice/polygon.cxx @@ -16,7 +16,7 @@ namespace test { namespace { -void drawPolygonOffset(OutputDevice& rDevice, Rectangle& rRect, int nOffset) +void drawPolygonOffset(OutputDevice& rDevice, tools::Rectangle& rRect, int nOffset) { tools::Polygon aPolygon(4); aPolygon.SetPoint(Point(rRect.Left() + nOffset, rRect.Top() + nOffset), 0); diff --git a/vcl/backendtest/outputdevice/polyline.cxx b/vcl/backendtest/outputdevice/polyline.cxx index 808d7274965b..c449cfb31100 100644 --- a/vcl/backendtest/outputdevice/polyline.cxx +++ b/vcl/backendtest/outputdevice/polyline.cxx @@ -16,7 +16,7 @@ namespace test { namespace { -void drawPolyLineOffset(OutputDevice& rDevice, Rectangle& rRect, int nOffset) +void drawPolyLineOffset(OutputDevice& rDevice, tools::Rectangle& rRect, int nOffset) { tools::Polygon aPolygon(4); aPolygon.SetPoint(Point(rRect.Left() + nOffset, rRect.Top() + nOffset), 0); diff --git a/vcl/backendtest/outputdevice/polypolygon.cxx b/vcl/backendtest/outputdevice/polypolygon.cxx index a6d3a018fbfc..f7f3a53749f5 100644 --- a/vcl/backendtest/outputdevice/polypolygon.cxx +++ b/vcl/backendtest/outputdevice/polypolygon.cxx @@ -17,7 +17,7 @@ namespace test { namespace { -tools::Polygon createPolygonOffset(Rectangle& rRect, int nOffset) +tools::Polygon createPolygonOffset(tools::Rectangle& rRect, int nOffset) { tools::Polygon aPolygon(4); aPolygon.SetPoint(Point(rRect.Left() + nOffset, rRect.Top() + nOffset), 0); diff --git a/vcl/backendtest/outputdevice/rectangle.cxx b/vcl/backendtest/outputdevice/rectangle.cxx index 80ab3cf6f7ee..911d3dccf51d 100644 --- a/vcl/backendtest/outputdevice/rectangle.cxx +++ b/vcl/backendtest/outputdevice/rectangle.cxx @@ -15,9 +15,9 @@ namespace test { namespace { - void drawRectOffset(OutputDevice& rDevice, Rectangle& rRect, int nOffset) + void drawRectOffset(OutputDevice& rDevice, tools::Rectangle& rRect, int nOffset) { - rDevice.DrawRect(Rectangle(rRect.Left() + nOffset, rRect.Top() + nOffset, + rDevice.DrawRect(tools::Rectangle(rRect.Left() + nOffset, rRect.Top() + nOffset, rRect.Right() - nOffset, rRect.Bottom() - nOffset)); } diff --git a/vcl/headless/svpdummies.cxx b/vcl/headless/svpdummies.cxx index 1a3eefb0d23a..46ff2841a961 100644 --- a/vcl/headless/svpdummies.cxx +++ b/vcl/headless/svpdummies.cxx @@ -50,11 +50,11 @@ unsigned int SvpSalSystem::GetDisplayScreenCount() return 1; } -Rectangle SvpSalSystem::GetDisplayScreenPosSizePixel( unsigned int nScreen ) +tools::Rectangle SvpSalSystem::GetDisplayScreenPosSizePixel( unsigned int nScreen ) { - Rectangle aRect; + tools::Rectangle aRect; if( nScreen == 0 ) - aRect = Rectangle( Point(0,0), Size(VIRTUAL_DESKTOP_WIDTH,VIRTUAL_DESKTOP_HEIGHT) ); + aRect = tools::Rectangle( Point(0,0), Size(VIRTUAL_DESKTOP_WIDTH,VIRTUAL_DESKTOP_HEIGHT) ); return aRect; } diff --git a/vcl/headless/svpframe.cxx b/vcl/headless/svpframe.cxx index 962cea02a69f..ef32f7dbae77 100644 --- a/vcl/headless/svpframe.cxx +++ b/vcl/headless/svpframe.cxx @@ -295,9 +295,9 @@ void SvpSalFrame::GetClientSize( long& rWidth, long& rHeight ) rHeight = maGeometry.nHeight; } -void SvpSalFrame::GetWorkArea( Rectangle& rRect ) +void SvpSalFrame::GetWorkArea( tools::Rectangle& rRect ) { - rRect = Rectangle( Point( 0, 0 ), + rRect = tools::Rectangle( Point( 0, 0 ), Size( VIRTUAL_DESKTOP_WIDTH, VIRTUAL_DESKTOP_HEIGHT ) ); } diff --git a/vcl/headless/svptext.cxx b/vcl/headless/svptext.cxx index bdb97a97efc7..3751a0f217e7 100644 --- a/vcl/headless/svptext.cxx +++ b/vcl/headless/svptext.cxx @@ -91,7 +91,7 @@ void SvpSalGraphics::GetGlyphWidths( const PhysicalFontFace* pFont, m_aTextRenderImpl.GetGlyphWidths(pFont, bVertical, rWidths, rUnicodeEnc); } -bool SvpSalGraphics::GetGlyphBoundRect(const GlyphItem& rGlyph, Rectangle& rRect) +bool SvpSalGraphics::GetGlyphBoundRect(const GlyphItem& rGlyph, tools::Rectangle& rRect) { return m_aTextRenderImpl.GetGlyphBoundRect(rGlyph, rRect); } diff --git a/vcl/inc/brdwin.hxx b/vcl/inc/brdwin.hxx index 0911d1c8a412..43341841a399 100644 --- a/vcl/inc/brdwin.hxx +++ b/vcl/inc/brdwin.hxx @@ -124,7 +124,7 @@ public: virtual void MouseMove( const MouseEvent& rMEvt ) override; virtual void MouseButtonDown( const MouseEvent& rMEvt ) override; virtual void Tracking( const TrackingEvent& rTEvt ) override; - virtual void Paint( vcl::RenderContext& rRenderContext, const Rectangle& rRect ) override; + virtual void Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect ) override; virtual void Activate() override; virtual void Deactivate() override; virtual void Resize() override; @@ -138,7 +138,7 @@ public: void InvalidateBorder(); using Window::Draw; - void Draw( const Rectangle& rRect, OutputDevice* pDev, const Point& rPos ); + void Draw( const tools::Rectangle& rRect, OutputDevice* pDev, const Point& rPos ); void SetDisplayActive( bool bActive ); void SetTitleType( BorderWindowTitleType nTitleType, const Size& rSize ); @@ -167,7 +167,7 @@ public: sal_Int32& rRightBorder, sal_Int32& rBottomBorder ) const; long CalcTitleWidth() const; - Rectangle GetMenuRect() const; + tools::Rectangle GetMenuRect() const; virtual Size GetOptimalSize() const override; }; @@ -176,13 +176,13 @@ struct ImplBorderFrameData { VclPtr<ImplBorderWindow> mpBorderWindow; VclPtr<OutputDevice> mpOutDev; - Rectangle maTitleRect; - Rectangle maCloseRect; - Rectangle maRollRect; - Rectangle maDockRect; - Rectangle maMenuRect; - Rectangle maHideRect; - Rectangle maHelpRect; + tools::Rectangle maTitleRect; + tools::Rectangle maCloseRect; + tools::Rectangle maRollRect; + tools::Rectangle maDockRect; + tools::Rectangle maMenuRect; + tools::Rectangle maHideRect; + tools::Rectangle maHelpRect; Point maMouseOff; long mnWidth; long mnHeight; @@ -218,19 +218,19 @@ public: virtual bool MouseMove( const MouseEvent& rMEvt ); virtual bool MouseButtonDown( const MouseEvent& rMEvt ); virtual bool Tracking( const TrackingEvent& rTEvt ); - virtual OUString RequestHelp( const Point& rPos, Rectangle& rHelpRect ); + virtual OUString RequestHelp( const Point& rPos, tools::Rectangle& rHelpRect ); virtual void Init( OutputDevice* pDev, long nWidth, long nHeight ) = 0; virtual void GetBorder( sal_Int32& rLeftBorder, sal_Int32& rTopBorder, sal_Int32& rRightBorder, sal_Int32& rBottomBorder ) const = 0; virtual long CalcTitleWidth() const = 0; virtual void DrawWindow(vcl::RenderContext& rRenderContext, const Point* pOffset = nullptr) = 0; - virtual Rectangle GetMenuRect() const; + virtual tools::Rectangle GetMenuRect() const; static void ImplInitTitle( ImplBorderFrameData* pData ); static BorderWindowHitTest ImplHitTest( ImplBorderFrameData* pData, const Point& rPos ); static bool ImplMouseMove( ImplBorderFrameData* pData, const MouseEvent& rMEvt ); - static OUString ImplRequestHelp( ImplBorderFrameData* pData, const Point& rPos, Rectangle& rHelpRect ); + static OUString ImplRequestHelp( ImplBorderFrameData* pData, const Point& rPos, tools::Rectangle& rHelpRect ); static long ImplCalcTitleWidth( const ImplBorderFrameData* pData ); }; @@ -281,8 +281,8 @@ public: virtual bool MouseMove( const MouseEvent& rMEvt ) override; virtual bool MouseButtonDown( const MouseEvent& rMEvt ) override; virtual bool Tracking( const TrackingEvent& rTEvt ) override; - virtual OUString RequestHelp( const Point& rPos, Rectangle& rHelpRect ) override; - virtual Rectangle GetMenuRect() const override; + virtual OUString RequestHelp( const Point& rPos, tools::Rectangle& rHelpRect ) override; + virtual tools::Rectangle GetMenuRect() const override; virtual void Init( OutputDevice* pDev, long nWidth, long nHeight ) override; virtual void GetBorder( sal_Int32& rLeftBorder, sal_Int32& rTopBorder, diff --git a/vcl/inc/fontsubset.hxx b/vcl/inc/fontsubset.hxx index 58cdb1e1db71..3ec9826b8f80 100644 --- a/vcl/inc/fontsubset.hxx +++ b/vcl/inc/fontsubset.hxx @@ -65,7 +65,7 @@ public: // TODO: make subsetter results private and provide accessor methods ins int m_nAscent; ///< all metrics in PS font units int m_nDescent; int m_nCapHeight; - Rectangle m_aFontBBox; + tools::Rectangle m_aFontBBox; FontType m_nFontType; ///< font-type of subset result private: diff --git a/vcl/inc/headless/svpdummies.hxx b/vcl/inc/headless/svpdummies.hxx index c053720de79a..a14aabe2b447 100644 --- a/vcl/inc/headless/svpdummies.hxx +++ b/vcl/inc/headless/svpdummies.hxx @@ -55,7 +55,7 @@ public: virtual ~SvpSalSystem() override; // get info about the display virtual unsigned int GetDisplayScreenCount() override; - virtual Rectangle GetDisplayScreenPosSizePixel( unsigned int nScreen ) override; + virtual tools::Rectangle GetDisplayScreenPosSizePixel( unsigned int nScreen ) override; virtual int ShowNativeDialog( const OUString& rTitle, const OUString& rMessage, diff --git a/vcl/inc/headless/svpframe.hxx b/vcl/inc/headless/svpframe.hxx index ec0a2b2d55fd..c5245899c748 100644 --- a/vcl/inc/headless/svpframe.hxx +++ b/vcl/inc/headless/svpframe.hxx @@ -83,7 +83,7 @@ public: virtual void SetMaxClientSize( long nWidth, long nHeight ) override; virtual void SetPosSize( long nX, long nY, long nWidth, long nHeight, sal_uInt16 nFlags ) override; virtual void GetClientSize( long& rWidth, long& rHeight ) override; - virtual void GetWorkArea( Rectangle& rRect ) override; + virtual void GetWorkArea( tools::Rectangle& rRect ) override; virtual SalFrame* GetParent() const override; virtual void SetWindowState( const SalFrameState* pState ) override; virtual bool GetWindowState( SalFrameState* pState ) override; diff --git a/vcl/inc/headless/svpgdi.hxx b/vcl/inc/headless/svpgdi.hxx index 64101e338182..56ed365339f2 100644 --- a/vcl/inc/headless/svpgdi.hxx +++ b/vcl/inc/headless/svpgdi.hxx @@ -162,7 +162,7 @@ public: bool bVertical, std::vector< sal_Int32 >& rWidths, Ucs2UIntMap& rUnicodeEnc ) override; - virtual bool GetGlyphBoundRect(const GlyphItem&, Rectangle&) override; + virtual bool GetGlyphBoundRect(const GlyphItem&, tools::Rectangle&) override; virtual bool GetGlyphOutline(const GlyphItem&, basegfx::B2DPolyPolygon&) override; virtual SalLayout* GetTextLayout( ImplLayoutArgs&, int nFallbackLevel ) override; virtual void DrawTextLayout( const CommonSalLayout& ) override; diff --git a/vcl/inc/helpwin.hxx b/vcl/inc/helpwin.hxx index beb72460024d..4d9ea576f0b2 100644 --- a/vcl/inc/helpwin.hxx +++ b/vcl/inc/helpwin.hxx @@ -28,9 +28,9 @@ enum class QuickHelpFlags; class HelpTextWindow : public FloatingWindow { private: - Rectangle maHelpArea; // If next Help for the same rectangle w/ same text, then keep window + tools::Rectangle maHelpArea; // If next Help for the same rectangle w/ same text, then keep window - Rectangle maTextRect; // For wrapped text in QuickHelp + tools::Rectangle maTextRect; // For wrapped text in QuickHelp OUString maHelpText; OUString maStatusText; @@ -44,7 +44,7 @@ private: private: DECL_LINK( TimerHdl, Timer*, void ); - virtual void Paint(vcl::RenderContext& rRenderContext, const Rectangle&) override; + virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&) override; virtual void RequestHelp( const HelpEvent& rHEvt ) override; virtual void ApplySettings(vcl::RenderContext& rRenderContext) override; virtual void StateChanged(StateChangedType nType) override; @@ -64,20 +64,20 @@ public: // Nur merken: void SetStatusText( const OUString& rStatusText ) { maStatusText = rStatusText; } - void SetHelpArea( const Rectangle& rRect ) { maHelpArea = rRect; } + void SetHelpArea( const tools::Rectangle& rRect ) { maHelpArea = rRect; } void ShowHelp( sal_uInt16 nDelayMode ); Size CalcOutSize() const; - const Rectangle& GetHelpArea() const { return maHelpArea; } + const tools::Rectangle& GetHelpArea() const { return maHelpArea; } }; void ImplShowHelpWindow( vcl::Window* pParent, sal_uInt16 nHelpWinStyle, QuickHelpFlags nStyle, const OUString& rHelpText, const OUString& rStatusText, - const Point& rScreenPos, const Rectangle& rHelpArea ); + const Point& rScreenPos, const tools::Rectangle& rHelpArea ); void ImplDestroyHelpWindow( bool bUpdateHideTime ); void ImplSetHelpWindowPos( vcl::Window* pHelpWindow, sal_uInt16 nHelpWinStyle, QuickHelpFlags nStyle, - const Point& rPos, const Rectangle& rHelpArea ); + const Point& rPos, const tools::Rectangle& rHelpArea ); #endif // INCLUDED_VCL_INC_HELPWIN_HXX diff --git a/vcl/inc/listbox.hxx b/vcl/inc/listbox.hxx index 84a9a6cfd054..43fe803bfaf6 100644 --- a/vcl/inc/listbox.hxx +++ b/vcl/inc/listbox.hxx @@ -165,7 +165,7 @@ class ImplListBoxWindow : public Control, public vcl::ISearchableStringList { private: ImplEntryList* mpEntryList; ///< EntryList - Rectangle maFocusRect; + tools::Rectangle maFocusRect; Size maUserItemSize; @@ -230,14 +230,14 @@ protected: virtual void MouseButtonDown( const MouseEvent& rMEvt ) override; virtual void MouseMove( const MouseEvent& rMEvt ) override; virtual void Tracking( const TrackingEvent& rTEvt ) override; - virtual void Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) override; + virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) override; virtual void Resize() override; virtual void GetFocus() override; virtual void LoseFocus() override; bool SelectEntries( sal_Int32 nSelect, LB_EVENT_TYPE eLET, bool bShift = false, bool bCtrl = false, bool bSelectPosChange = false ); void ImplPaint(vcl::RenderContext& rRenderContext, sal_Int32 nPos); - void ImplDoPaint(vcl::RenderContext& rRenderContext, const Rectangle& rRect); + void ImplDoPaint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect); void ImplCalcMetrics(); void ImplUpdateEntryMetrics( ImplEntryType& rEntry ); void ImplCallSelect(); @@ -311,7 +311,7 @@ public: bool IsMouseMoveSelect() const { return mbMouseMoveSelect||mbStackMode; } Size CalcSize(sal_Int32 nMaxLines) const; - Rectangle GetBoundingRectangle( sal_Int32 nItem ) const; + tools::Rectangle GetBoundingRectangle( sal_Int32 nItem ) const; long GetEntryHeight() const { return mnMaxHeight; } long GetMaxEntryWidth() const { return mnMaxWidth; } @@ -512,7 +512,7 @@ private: OUString maString; Image maImage; - Rectangle maFocusRect; + tools::Rectangle maFocusRect; Link<void*,void> maMBDownHdl; Link<UserDrawEvent*, void> maUserDrawHdl; @@ -529,7 +529,7 @@ public: ImplWin( vcl::Window* pParent, WinBits nWinStyle ); virtual void MouseButtonDown( const MouseEvent& rMEvt ) override; - virtual void Paint( vcl::RenderContext& rRenderContext, const Rectangle& rRect ) override; + virtual void Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect ) override; virtual void Resize() override; virtual void GetFocus() override; virtual void LoseFocus() override; @@ -554,7 +554,7 @@ public: bool GetEdgeBlending() const { return mbEdgeBlending; } void SetEdgeBlending(bool bNew) { mbEdgeBlending = bNew; } - virtual void ShowFocus(const Rectangle& rRect) override; + virtual void ShowFocus(const tools::Rectangle& rRect) override; using Control::ImplInitSettings; virtual void ApplySettings(vcl::RenderContext& rRenderContext) override; diff --git a/vcl/inc/opengl/RenderState.hxx b/vcl/inc/opengl/RenderState.hxx index b7b2f18a692b..c0f1b725f1bc 100644 --- a/vcl/inc/opengl/RenderState.hxx +++ b/vcl/inc/opengl/RenderState.hxx @@ -153,13 +153,13 @@ class RenderState StencilState maStencil; BlendState maBlend; - Rectangle maCurrentViewport; + tools::Rectangle maCurrentViewport; public: RenderState() {} - void viewport(Rectangle aViewPort) + void viewport(tools::Rectangle aViewPort) { if (aViewPort != maCurrentViewport) { diff --git a/vcl/inc/opengl/texture.hxx b/vcl/inc/opengl/texture.hxx index 3a06b2a48c77..3485c4f332a1 100644 --- a/vcl/inc/opengl/texture.hxx +++ b/vcl/inc/opengl/texture.hxx @@ -72,7 +72,7 @@ class VCL_DLLPUBLIC OpenGLTexture final private: // if the rect size doesn't match the mpImpl one, this instance // is a sub-area from the real OpenGL texture - Rectangle maRect; + tools::Rectangle maRect; std::shared_ptr<ImplOpenGLTexture> mpImpl; int mnSlotNumber; @@ -85,7 +85,7 @@ private: public: OpenGLTexture(); - OpenGLTexture(const std::shared_ptr<ImplOpenGLTexture>& pImpl, Rectangle aRectangle, int nSlotNumber); + OpenGLTexture(const std::shared_ptr<ImplOpenGLTexture>& pImpl, tools::Rectangle aRectangle, int nSlotNumber); OpenGLTexture( int nWidth, int nHeight, bool bAllocate = true ); OpenGLTexture( int nWidth, int nHeight, int nFormat, int nType, void const * pData ); diff --git a/vcl/inc/openglgdiimpl.hxx b/vcl/inc/openglgdiimpl.hxx index f3d603c0f1be..1f546b0dd240 100644 --- a/vcl/inc/openglgdiimpl.hxx +++ b/vcl/inc/openglgdiimpl.hxx @@ -126,7 +126,7 @@ public: void DrawConvexPolygon( const tools::Polygon& rPolygon, bool blockAA ); void DrawTrapezoid( const basegfx::B2DTrapezoid& trapezoid, bool blockAA ); void DrawRect( long nX, long nY, long nWidth, long nHeight ); - void DrawRect( const Rectangle& rRect ); + void DrawRect( const tools::Rectangle& rRect ); void DrawPolygon( sal_uInt32 nPoints, const SalPoint* pPtAry ); void DrawLineSegment(float x1, float y1, float x2, float y2); void DrawPolyPolygon( const basegfx::B2DPolyPolygon& rPolyPolygon, bool blockAA = false ); @@ -139,9 +139,9 @@ public: void DrawTextureWithMask( OpenGLTexture& rTexture, OpenGLTexture& rMask, const SalTwoRect& rPosAry ); void DrawBlendedTexture( OpenGLTexture& rTexture, OpenGLTexture& rMask, OpenGLTexture& rAlpha, const SalTwoRect& rPosAry ); void DrawMask( OpenGLTexture& rTexture, SalColor nMaskColor, const SalTwoRect& rPosAry ); - void DrawLinearGradient( const Gradient& rGradient, const Rectangle& rRect ); - void DrawAxialGradient( const Gradient& rGradient, const Rectangle& rRect ); - void DrawRadialGradient( const Gradient& rGradient, const Rectangle& rRect ); + void DrawLinearGradient( const Gradient& rGradient, const tools::Rectangle& rRect ); + void DrawAxialGradient( const Gradient& rGradient, const tools::Rectangle& rRect ); + void DrawRadialGradient( const Gradient& rGradient, const tools::Rectangle& rRect ); void DeferredTextDraw(OpenGLTexture& rTexture, const SalColor nMaskColor, const SalTwoRect& rPosAry); void FlushDeferredDrawing(); diff --git a/vcl/inc/osx/salframe.h b/vcl/inc/osx/salframe.h index 94afaf3e9f0e..4b6d486f6be6 100644 --- a/vcl/inc/osx/salframe.h +++ b/vcl/inc/osx/salframe.h @@ -87,7 +87,7 @@ public: std::list<AquaBlinker*> maBlinkers; - Rectangle maInvalidRect; + tools::Rectangle maInvalidRect; InputContextFlags mnICOptions; @@ -118,7 +118,7 @@ public: virtual void SetMaxClientSize( long nWidth, long nHeight ) override; virtual void SetPosSize( long nX, long nY, long nWidth, long nHeight, sal_uInt16 nFlags ) override; virtual void GetClientSize( long& rWidth, long& rHeight ) override; - virtual void GetWorkArea( Rectangle& rRect ) override; + virtual void GetWorkArea( tools::Rectangle& rRect ) override; virtual SalFrame* GetParent() const override; virtual void SetWindowState( const SalFrameState* pState ) override; virtual bool GetWindowState( SalFrameState* pState ) override; @@ -130,7 +130,7 @@ public: virtual void CaptureMouse( bool bMouse ) override; virtual void SetPointerPos( long nX, long nY ) override; virtual void Flush( void ) override; - virtual void Flush( const Rectangle& ) override; + virtual void Flush( const tools::Rectangle& ) override; virtual void SetInputContext( SalInputContext* pContext ) override; virtual void EndExtTextInput( EndExtTextInputFlags nFlags ) override; virtual OUString GetKeyName( sal_uInt16 nKeyCode ) override; @@ -161,7 +161,7 @@ public: void UpdateFrameGeometry(); // trigger painting of the window - void SendPaintEvent( const Rectangle* pRect = nullptr ); + void SendPaintEvent( const tools::Rectangle* pRect = nullptr ); static bool isAlive( const AquaSalFrame* pFrame ) { return GetSalData()->maFrameCheck.find( pFrame ) != GetSalData()->maFrameCheck.end(); } diff --git a/vcl/inc/osx/salmenu.h b/vcl/inc/osx/salmenu.h index f21c750bcc01..4d3ffaaf752e 100644 --- a/vcl/inc/osx/salmenu.h +++ b/vcl/inc/osx/salmenu.h @@ -69,10 +69,10 @@ public: virtual void SetItemImage( unsigned nPos, SalMenuItem* pSalMenuItem, const Image& rImage) override; virtual void SetAccelerator( unsigned nPos, SalMenuItem* pSalMenuItem, const vcl::KeyCode& rKeyCode, const OUString& rKeyName ) override; virtual void GetSystemMenuData( SystemMenuData* pData ) override; - virtual bool ShowNativePopupMenu(FloatingWindow * pWin, const Rectangle& rRect, FloatWinPopupFlags nFlags) override; + virtual bool ShowNativePopupMenu(FloatingWindow * pWin, const tools::Rectangle& rRect, FloatWinPopupFlags nFlags) override; virtual bool AddMenuBarButton( const SalMenuButtonItem& ) override; virtual void RemoveMenuBarButton( sal_uInt16 nId ) override; - virtual Rectangle GetMenuBarButtonRectPixel( sal_uInt16 i_nItemId, SalFrame* i_pReferenceFrame ) override; + virtual tools::Rectangle GetMenuBarButtonRectPixel( sal_uInt16 i_nItemId, SalFrame* i_pReferenceFrame ) override; int getItemIndexByPos( sal_uInt16 nPos ) const; const AquaSalFrame* getFrame() const; diff --git a/vcl/inc/osx/salsys.h b/vcl/inc/osx/salsys.h index e1b18f90d124..c619a99eef4e 100644 --- a/vcl/inc/osx/salsys.h +++ b/vcl/inc/osx/salsys.h @@ -33,7 +33,7 @@ public: // get info about the display virtual unsigned int GetDisplayScreenCount() override; - virtual Rectangle GetDisplayScreenPosSizePixel( unsigned int nScreen ) override; + virtual tools::Rectangle GetDisplayScreenPosSizePixel( unsigned int nScreen ) override; virtual int ShowNativeMessageBox( const OUString& rTitle, const OUString& rMessage) override; diff --git a/vcl/inc/outdev.h b/vcl/inc/outdev.h index 82750c23748a..33fa41255f66 100644 --- a/vcl/inc/outdev.h +++ b/vcl/inc/outdev.h @@ -132,7 +132,7 @@ struct ImplOutDevData { VclPtr<VirtualDevice> mpRotateDev; vcl::ControlLayoutData* mpRecordLayout; - Rectangle maRecordRect; + tools::Rectangle maRecordRect; // #i75163# basegfx::B2DHomMatrix* mpViewTransform; diff --git a/vcl/inc/printdlg.hxx b/vcl/inc/printdlg.hxx index 530275b0088c..b8129dcd8b93 100644 --- a/vcl/inc/printdlg.hxx +++ b/vcl/inc/printdlg.hxx @@ -59,7 +59,7 @@ namespace vcl virtual ~PrintPreviewWindow() override; virtual void dispose() override; - virtual void Paint( vcl::RenderContext& rRenderContext, const Rectangle& rRect ) override; + virtual void Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect ) override; virtual void Command( const CommandEvent& ) override; virtual void Resize() override; virtual void DataChanged( const DataChangedEvent& ) override; @@ -82,7 +82,7 @@ namespace vcl virtual Size GetOptimalSize() const override; - virtual void Paint( vcl::RenderContext& rRenderContext, const Rectangle& ) override; + virtual void Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& ) override; void setValues( NupOrderType i_nOrderMode, int i_nColumns, int i_nRows ) { diff --git a/vcl/inc/quartz/salgdi.h b/vcl/inc/quartz/salgdi.h index 248d07eb37ba..6d29fccb1d6a 100644 --- a/vcl/inc/quartz/salgdi.h +++ b/vcl/inc/quartz/salgdi.h @@ -89,7 +89,7 @@ public: ~CoreTextStyle( void ); void GetFontMetric( ImplFontMetricDataRef& ) const; - bool GetGlyphBoundRect(const GlyphItem&, Rectangle&) const; + bool GetGlyphBoundRect(const GlyphItem&, tools::Rectangle&) const; bool GetGlyphOutline(const GlyphItem&, basegfx::B2DPolyPolygon&) const; hb_font_t* GetHbFont() const { return mpHbFont; } void SetHbFont(hb_font_t* pHbFont) const { mpHbFont = pHbFont; } @@ -292,14 +292,14 @@ public: // native widget rendering methods that require mirroring #ifdef MACOSX - virtual bool hitTestNativeControl( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion, + virtual bool hitTestNativeControl( ControlType nType, ControlPart nPart, const tools::Rectangle& rControlRegion, const Point& aPos, bool& rIsInside ) override; - virtual bool drawNativeControl( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion, + virtual bool drawNativeControl( ControlType nType, ControlPart nPart, const tools::Rectangle& rControlRegion, ControlState nState, const ImplControlValue& aValue, const OUString& aCaption ) override; - virtual bool getNativeControlRegion( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion, ControlState nState, + virtual bool getNativeControlRegion( ControlType nType, ControlPart nPart, const tools::Rectangle& rControlRegion, ControlState nState, const ImplControlValue& aValue, const OUString& aCaption, - Rectangle &rNativeBoundingRegion, Rectangle &rNativeContentRegion ) override; + tools::Rectangle &rNativeBoundingRegion, tools::Rectangle &rNativeContentRegion ) override; #endif // get device resolution @@ -375,7 +375,7 @@ public: std::vector< sal_Int32 >& rWidths, Ucs2UIntMap& rUnicodeEnc ) override; - virtual bool GetGlyphBoundRect(const GlyphItem&, Rectangle&) override; + virtual bool GetGlyphBoundRect(const GlyphItem&, tools::Rectangle&) override; virtual bool GetGlyphOutline(const GlyphItem&, basegfx::B2DPolyPolygon&) override; virtual SalLayout* GetTextLayout( ImplLayoutArgs&, int nFallbackLevel ) override; diff --git a/vcl/inc/regionband.hxx b/vcl/inc/regionband.hxx index 91a13ebffcbf..1fb5db93a410 100644 --- a/vcl/inc/regionband.hxx +++ b/vcl/inc/regionband.hxx @@ -41,7 +41,7 @@ public: RegionBand(); RegionBand(const RegionBand&); RegionBand& operator=(const RegionBand&); - RegionBand(const Rectangle&); + RegionBand(const tools::Rectangle&); ~RegionBand(); bool operator==( const RegionBand& rRegionBand ) const; @@ -70,7 +70,7 @@ public: void Intersect(const RegionBand& rSource); bool Exclude(const RegionBand& rSource); void XOr(const RegionBand& rSource); - Rectangle GetBoundRect() const; + tools::Rectangle GetBoundRect() const; bool IsInside(const Point& rPoint) const; sal_uInt32 getRectangleCount() const; // only users are Region::Intersect, Region::IsRectangle and PSWriter::ImplBmp void GetRegionRectangles(RectangleVector& rTarget) const; diff --git a/vcl/inc/salframe.hxx b/vcl/inc/salframe.hxx index a0a65aa5c48a..4cea89eae3a3 100644 --- a/vcl/inc/salframe.hxx +++ b/vcl/inc/salframe.hxx @@ -147,7 +147,7 @@ public: virtual void SetMaxClientSize( long nWidth, long nHeight ) = 0; virtual void SetPosSize( long nX, long nY, long nWidth, long nHeight, sal_uInt16 nFlags ) = 0; virtual void GetClientSize( long& rWidth, long& rHeight ) = 0; - virtual void GetWorkArea( Rectangle& rRect ) = 0; + virtual void GetWorkArea( tools::Rectangle& rRect ) = 0; virtual SalFrame* GetParent() const = 0; // Note: x will be mirrored at parent if UI mirroring is active SalFrameGeometry GetGeometry(); @@ -175,7 +175,7 @@ public: // flush output buffer virtual void Flush() = 0; - virtual void Flush( const Rectangle& ); + virtual void Flush( const tools::Rectangle& ); virtual void SetInputContext( SalInputContext* pContext ) = 0; virtual void EndExtTextInput( EndExtTextInputFlags nFlags ) = 0; @@ -239,19 +239,19 @@ public: } // return true to indicate tooltips are shown natively, false otherwise - virtual bool ShowTooltip(const OUString& /*rHelpText*/, const Rectangle& /*rHelpArea*/) + virtual bool ShowTooltip(const OUString& /*rHelpText*/, const tools::Rectangle& /*rHelpArea*/) { return false; } // return !0 to indicate popovers are shown natively, 0 otherwise - virtual sal_uIntPtr ShowPopover(const OUString& /*rHelpText*/, const Rectangle& /*rHelpArea*/, QuickHelpFlags /*nFlags*/) + virtual sal_uIntPtr ShowPopover(const OUString& /*rHelpText*/, const tools::Rectangle& /*rHelpArea*/, QuickHelpFlags /*nFlags*/) { return 0; } // return true to indicate popovers are shown natively, false otherwise - virtual bool UpdatePopover(sal_uIntPtr /*nId*/, const OUString& /*rHelpText*/, const Rectangle& /*rHelpArea*/) + virtual bool UpdatePopover(sal_uIntPtr /*nId*/, const OUString& /*rHelpText*/, const tools::Rectangle& /*rHelpArea*/) { return false; } diff --git a/vcl/inc/salgdi.hxx b/vcl/inc/salgdi.hxx index a2b67c07ede3..e914b6493dff 100644 --- a/vcl/inc/salgdi.hxx +++ b/vcl/inc/salgdi.hxx @@ -39,7 +39,7 @@ class FontAttributes; class PhysicalFontFace; class SalLayout; class ImplLayoutArgs; -class Rectangle; +namespace tools { class Rectangle; } class FontSubsetInfo; class OpenGLContext; class OutputDevice; @@ -189,7 +189,7 @@ public: std::vector< sal_Int32 >& rWidths, Ucs2UIntMap& rUnicodeEnc ) = 0; - virtual bool GetGlyphBoundRect(const GlyphItem&, Rectangle&) = 0; + virtual bool GetGlyphBoundRect(const GlyphItem&, tools::Rectangle&) = 0; virtual bool GetGlyphOutline(const GlyphItem&, basegfx::B2DPolyPolygon&) = 0; virtual SalLayout* GetTextLayout( ImplLayoutArgs&, int nFallbackLevel ) = 0; @@ -204,7 +204,7 @@ public: void mirror( long& nX, const OutputDevice *pOutDev ) const; void mirror( long& nX, long& nWidth, const OutputDevice *pOutDev, bool bBack = false ) const; bool mirror( sal_uInt32 nPoints, const SalPoint *pPtAry, SalPoint *pPtAry2, const OutputDevice *pOutDev ) const; - void mirror( Rectangle& rRect, const OutputDevice*, bool bBack = false ) const; + void mirror( tools::Rectangle& rRect, const OutputDevice*, bool bBack = false ) const; void mirror( vcl::Region& rRgn, const OutputDevice *pOutDev ) const; void mirror( ImplControlValue&, const OutputDevice* ) const; basegfx::B2DPoint mirror( const basegfx::B2DPoint& i_rPoint, const OutputDevice *pOutDev ) const; @@ -353,7 +353,7 @@ public: */ bool HitTestNativeScrollbar( ControlPart nPart, - const Rectangle& rControlRegion, + const tools::Rectangle& rControlRegion, const Point& aPos, bool& rIsInside, const OutputDevice *pOutDev ); @@ -366,7 +366,7 @@ public: bool DrawNativeControl( ControlType nType, ControlPart nPart, - const Rectangle& rControlRegion, + const tools::Rectangle& rControlRegion, ControlState nState, const ImplControlValue& aValue, const OUString& aCaption, @@ -380,12 +380,12 @@ public: bool GetNativeControlRegion( ControlType nType, ControlPart nPart, - const Rectangle& rControlRegion, + const tools::Rectangle& rControlRegion, ControlState nState, const ImplControlValue& aValue, const OUString& aCaption, - Rectangle &rNativeBoundingRegion, - Rectangle &rNativeContentRegion, + tools::Rectangle &rNativeBoundingRegion, + tools::Rectangle &rNativeContentRegion, const OutputDevice *pOutDev ); bool BlendBitmap( @@ -540,7 +540,7 @@ protected: */ virtual bool hitTestNativeControl( ControlType eType, ControlPart ePart, - const Rectangle& rBoundingControlRegion, + const tools::Rectangle& rBoundingControlRegion, const Point& aPos, bool& rIsInside ); /** @@ -557,7 +557,7 @@ protected: */ virtual bool drawNativeControl( ControlType eType, ControlPart ePart, - const Rectangle& rBoundingControlRegion, + const tools::Rectangle& rBoundingControlRegion, ControlState eState, const ImplControlValue& aValue, const OUString& aCaption ); @@ -583,12 +583,12 @@ protected: */ virtual bool getNativeControlRegion( ControlType eType, ControlPart ePart, - const Rectangle& rBoundingControlRegion, + const tools::Rectangle& rBoundingControlRegion, ControlState eState, const ImplControlValue& aValue, const OUString& aCaption, - Rectangle &rNativeBoundingRegion, - Rectangle &rNativeContentRegion ); + tools::Rectangle &rNativeBoundingRegion, + tools::Rectangle &rNativeContentRegion ); /** Blend the bitmap with the current buffer */ virtual bool blendBitmap( diff --git a/vcl/inc/sallayout.hxx b/vcl/inc/sallayout.hxx index b1ded19700a4..9dbe269a82b1 100644 --- a/vcl/inc/sallayout.hxx +++ b/vcl/inc/sallayout.hxx @@ -178,7 +178,7 @@ public: virtual int GetNextGlyphs(int nLen, const GlyphItem** pGlyphs, Point& rPos, int&, const PhysicalFontFace** pFallbackFonts = nullptr) const = 0; virtual bool GetOutline( SalGraphics&, basegfx::B2DPolyPolygonVector& ) const; - virtual bool GetBoundRect( SalGraphics&, Rectangle& ) const; + virtual bool GetBoundRect( SalGraphics&, tools::Rectangle& ) const; // reference counting void Release() const; diff --git a/vcl/inc/salmenu.hxx b/vcl/inc/salmenu.hxx index 8b2b5e20335f..169d887068da 100644 --- a/vcl/inc/salmenu.hxx +++ b/vcl/inc/salmenu.hxx @@ -74,7 +74,7 @@ public: virtual void SetItemImage( unsigned nPos, SalMenuItem* pSalMenuItem, const Image& rImage ) = 0; virtual void SetAccelerator( unsigned nPos, SalMenuItem* pSalMenuItem, const vcl::KeyCode& rKeyCode, const OUString& rKeyName ) = 0; virtual void GetSystemMenuData( SystemMenuData* pData ) = 0; - virtual bool ShowNativePopupMenu(FloatingWindow * pWin, const Rectangle& rRect, FloatWinPopupFlags nFlags); + virtual bool ShowNativePopupMenu(FloatingWindow * pWin, const tools::Rectangle& rRect, FloatWinPopupFlags nFlags); virtual void ShowCloseButton(bool bShow); virtual bool AddMenuBarButton( const SalMenuButtonItem& ); // return false if not implemented or failure virtual void RemoveMenuBarButton( sal_uInt16 nId ); @@ -89,7 +89,7 @@ public: // return an empty rectangle if not implemented // return Rectangle( Point( -1, -1 ), Size( 1, 1 ) ) if menu bar buttons implemented // but rectangle cannot be determined - virtual Rectangle GetMenuBarButtonRectPixel( sal_uInt16 i_nItemId, SalFrame* i_pReferenceFrame ); + virtual tools::Rectangle GetMenuBarButtonRectPixel( sal_uInt16 i_nItemId, SalFrame* i_pReferenceFrame ); }; #endif // INCLUDED_VCL_INC_SALMENU_HXX diff --git a/vcl/inc/salsys.hxx b/vcl/inc/salsys.hxx index bc273f07ddee..5e3478e45b2b 100644 --- a/vcl/inc/salsys.hxx +++ b/vcl/inc/salsys.hxx @@ -63,7 +63,7 @@ public: else position relative to whole display size: size of the screen */ - virtual Rectangle GetDisplayScreenPosSizePixel( unsigned int nScreen ) = 0; + virtual tools::Rectangle GetDisplayScreenPosSizePixel( unsigned int nScreen ) = 0; /* Shows a native message box with the specified title, message and button combination. diff --git a/vcl/inc/scrwnd.hxx b/vcl/inc/scrwnd.hxx index be8445e681a8..db002d2290e6 100644 --- a/vcl/inc/scrwnd.hxx +++ b/vcl/inc/scrwnd.hxx @@ -66,7 +66,7 @@ private: protected: - virtual void Paint( vcl::RenderContext& rRenderContext, const Rectangle& rRect ) override; + virtual void Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect ) override; virtual void MouseMove( const MouseEvent& rMEvt ) override; virtual void MouseButtonUp( const MouseEvent& rMEvt ) override; diff --git a/vcl/inc/spin.hxx b/vcl/inc/spin.hxx index 4961ebd7efa9..7b7fbe11bd40 100644 --- a/vcl/inc/spin.hxx +++ b/vcl/inc/spin.hxx @@ -22,18 +22,18 @@ #include <vcl/window.hxx> -class Rectangle; +namespace tools { class Rectangle; } // Draw Spinners as found in a SpinButton. Some themes like gtk3 will draw +- elements here, // so these are only suitable in the context of SpinButtons void ImplDrawSpinButton(vcl::RenderContext& rRenderContext, vcl::Window* pWindow, - const Rectangle& rUpperRect, const Rectangle& rLowerRect, + const tools::Rectangle& rUpperRect, const tools::Rectangle& rLowerRect, bool bUpperIn, bool bLowerIn, bool bUpperEnabled = true, bool bLowerEnabled = true, bool bHorz = false, bool bMirrorHorz = false); // Draw Up/Down buttons suitable for use in any context void ImplDrawUpDownButtons(vcl::RenderContext& rRenderContext, - const Rectangle& rUpperRect, const Rectangle& rLowerRect, + const tools::Rectangle& rUpperRect, const tools::Rectangle& rLowerRect, bool bUpperIn, bool bLowerIn, bool bUpperEnabled, bool bLowerEnabled, bool bHorz, bool bMirrorHorz = false); diff --git a/vcl/inc/test/outputdevice.hxx b/vcl/inc/test/outputdevice.hxx index 0192bf9a4d5a..c75720f53d69 100644 --- a/vcl/inc/test/outputdevice.hxx +++ b/vcl/inc/test/outputdevice.hxx @@ -36,7 +36,7 @@ class VCL_DLLPUBLIC OutputDeviceTestCommon protected: ScopedVclPtr<VirtualDevice> mpVirtualDevice; - Rectangle maVDRectangle; + tools::Rectangle maVDRectangle; static const Color constBackgroundColor; static const Color constLineColor; @@ -55,16 +55,16 @@ public: static TestResult checkRectangles(Bitmap& rBitmap, std::vector<Color>& aExpectedColors); - static void createDiamondPoints(Rectangle rRect, int nOffset, + static void createDiamondPoints(tools::Rectangle rRect, int nOffset, Point& rPoint1, Point& rPoint2, Point& rPoint3, Point& rPoint4); - static void createHorizontalVerticalDiagonalLinePoints(Rectangle rRect, + static void createHorizontalVerticalDiagonalLinePoints(tools::Rectangle rRect, Point& rHorizontalLinePoint1, Point& rHorizontalLinePoint2, Point& rVerticalLinePoint1, Point& rVerticalLinePoint2, Point& rDiagonalLinePoint1, Point& rDiagonalLinePoint2); // tools - static Rectangle alignToCenter(Rectangle aRect1, Rectangle aRect2); + static tools::Rectangle alignToCenter(tools::Rectangle aRect1, tools::Rectangle aRect2); }; diff --git a/vcl/inc/textlayout.hxx b/vcl/inc/textlayout.hxx index a8a4124daafb..ae478847c2dc 100644 --- a/vcl/inc/textlayout.hxx +++ b/vcl/inc/textlayout.hxx @@ -90,11 +90,11 @@ namespace vcl ControlTextRenderer( const Control& _rControl, OutputDevice& _rTargetDevice, OutputDevice& _rReferenceDevice ); ~ControlTextRenderer(); - Rectangle DrawText( const Rectangle& _rRect, + tools::Rectangle DrawText( const tools::Rectangle& _rRect, const OUString& _rText, DrawTextFlags _nStyle, MetricVector* _pVector, OUString* _pDisplayText, const Size* i_pDeviceSize ); - Rectangle GetTextRect( const Rectangle& _rRect, + tools::Rectangle GetTextRect( const tools::Rectangle& _rRect, const OUString& _rText, DrawTextFlags _nStyle, Size* o_pDeviceSize ); private: diff --git a/vcl/inc/textrender.hxx b/vcl/inc/textrender.hxx index 1b04725398ce..ebcb7a081f7c 100644 --- a/vcl/inc/textrender.hxx +++ b/vcl/inc/textrender.hxx @@ -59,7 +59,7 @@ public: std::vector< sal_Int32 >& rWidths, Ucs2UIntMap& rUnicodeEnc ) = 0; - virtual bool GetGlyphBoundRect(const GlyphItem&, Rectangle&) = 0; + virtual bool GetGlyphBoundRect(const GlyphItem&, tools::Rectangle&) = 0; virtual bool GetGlyphOutline(const GlyphItem&, basegfx::B2DPolyPolygon&) = 0; virtual SalLayout* GetTextLayout( ImplLayoutArgs&, int nFallbackLevel ) = 0; virtual void DrawTextLayout(const CommonSalLayout&) = 0; diff --git a/vcl/inc/toolbox.h b/vcl/inc/toolbox.h index f8f798d5a079..18f94aeb5f5e 100644 --- a/vcl/inc/toolbox.h +++ b/vcl/inc/toolbox.h @@ -44,8 +44,8 @@ struct ImplToolItem OUString maHelpText; OUString maCommandStr; OString maHelpId; - Rectangle maRect; - Rectangle maCalcRect; + tools::Rectangle maRect; + tools::Rectangle maCalcRect; /// Widget layout may request size; set it as the minimal size (like, the item will always have at least this size). Size maMinimalItemSize; /// The overall horizontal item size, including one or more of [image size + textlength + dropdown arrow] @@ -87,7 +87,7 @@ struct ImplToolItem // returns the rectangle which contains the drop down arrow // or an empty rect if there is none // bHorz denotes the toolbox alignment - Rectangle GetDropDownRect( bool bHorz ) const; + tools::Rectangle GetDropDownRect( bool bHorz ) const; // returns sal_True if the toolbar item is currently clipped, which can happen for docked toolbars bool IsClipped() const; @@ -128,7 +128,7 @@ struct ImplToolBoxPrivateData // the optional custom menu VclPtr<PopupMenu> mpMenu; - Rectangle maMenuRect; + tools::Rectangle maMenuRect; ToolBoxMenuType maMenuType; ImplSVEvent * mnEventId; diff --git a/vcl/inc/unx/cairotextrender.hxx b/vcl/inc/unx/cairotextrender.hxx index 1cdf405f1dc9..2e6d1a57d63e 100644 --- a/vcl/inc/unx/cairotextrender.hxx +++ b/vcl/inc/unx/cairotextrender.hxx @@ -75,7 +75,7 @@ public: std::vector< sal_Int32 >& rWidths, Ucs2UIntMap& rUnicodeEnc ) override; - virtual bool GetGlyphBoundRect(const GlyphItem&, Rectangle&) override; + virtual bool GetGlyphBoundRect(const GlyphItem&, tools::Rectangle&) override; virtual bool GetGlyphOutline(const GlyphItem&, basegfx::B2DPolyPolygon&) override; virtual SalLayout* GetTextLayout( ImplLayoutArgs&, int nFallbackLevel ) override; virtual void DrawTextLayout(const CommonSalLayout&) override; diff --git a/vcl/inc/unx/genpspgraphics.h b/vcl/inc/unx/genpspgraphics.h index 721efd56245c..b37bb909d1f2 100644 --- a/vcl/inc/unx/genpspgraphics.h +++ b/vcl/inc/unx/genpspgraphics.h @@ -115,7 +115,7 @@ public: bool bVertical, std::vector< sal_Int32 >& rWidths, Ucs2UIntMap& rUnicodeEnc ) override; - virtual bool GetGlyphBoundRect(const GlyphItem&, Rectangle&) override; + virtual bool GetGlyphBoundRect(const GlyphItem&, tools::Rectangle&) override; virtual bool GetGlyphOutline(const GlyphItem&, basegfx::B2DPolyPolygon&) override; virtual SalLayout* GetTextLayout( ImplLayoutArgs&, int nFallbackLevel ) override; virtual void DrawTextLayout( const CommonSalLayout& ) override; diff --git a/vcl/inc/unx/glyphcache.hxx b/vcl/inc/unx/glyphcache.hxx index 8d66fbb23eac..ba889d7d876a 100644 --- a/vcl/inc/unx/glyphcache.hxx +++ b/vcl/inc/unx/glyphcache.hxx @@ -100,14 +100,14 @@ class GlyphData public: GlyphData() : mnLruValue(0) {} - const Rectangle& GetBoundRect() const { return maBoundRect; } - void SetBoundRect(Rectangle r) { maBoundRect = r; } + const tools::Rectangle& GetBoundRect() const { return maBoundRect; } + void SetBoundRect(tools::Rectangle r) { maBoundRect = r; } void SetLruValue( int n ) const { mnLruValue = n; } long GetLruValue() const { return mnLruValue;} private: - Rectangle maBoundRect; + tools::Rectangle maBoundRect; // used by GlyphCache for cache LRU algorithm mutable long mnLruValue; @@ -136,7 +136,7 @@ public: const FontCharMapRef GetFontCharMap() const; bool GetFontCapabilities(vcl::FontCapabilities &) const; - const Rectangle& GetGlyphBoundRect(const GlyphItem& rGlyph); + const tools::Rectangle& GetGlyphBoundRect(const GlyphItem& rGlyph); bool GetGlyphOutline(const GlyphItem& rGlyph, basegfx::B2DPolyPolygon&) const; bool GetAntialiasAdvice() const; hb_font_t* GetHbFont() { return mpHbFont; } diff --git a/vcl/inc/unx/gtk/gtkframe.hxx b/vcl/inc/unx/gtk/gtkframe.hxx index ad615048ec86..5ab7296081b0 100644 --- a/vcl/inc/unx/gtk/gtkframe.hxx +++ b/vcl/inc/unx/gtk/gtkframe.hxx @@ -204,11 +204,11 @@ class GtkSalFrame : public SalFrame Size m_aMaxSize; Size m_aMinSize; - Rectangle m_aRestorePosSize; + tools::Rectangle m_aRestorePosSize; #if GTK_CHECK_VERSION(3,0,0) OUString m_aTooltip; - Rectangle m_aHelpArea; + tools::Rectangle m_aHelpArea; long m_nWidthRequest; long m_nHeightRequest; cairo_region_t* m_pRegion; @@ -341,7 +341,7 @@ class GtkSalFrame : public SalFrame enum class SetType { RetainSize, Fullscreen, UnFullscreen }; - void SetScreen( unsigned int nNewScreen, SetType eType, Rectangle *pSize = nullptr ); + void SetScreen( unsigned int nNewScreen, SetType eType, tools::Rectangle *pSize = nullptr ); public: #if GTK_CHECK_VERSION(3,0,0) @@ -457,7 +457,7 @@ public: virtual void SetMaxClientSize( long nWidth, long nHeight ) override; virtual void SetPosSize( long nX, long nY, long nWidth, long nHeight, sal_uInt16 nFlags ) override; virtual void GetClientSize( long& rWidth, long& rHeight ) override; - virtual void GetWorkArea( Rectangle& rRect ) override; + virtual void GetWorkArea( tools::Rectangle& rRect ) override; virtual SalFrame* GetParent() const override; virtual void SetWindowState( const SalFrameState* pState ) override; virtual bool GetWindowState( SalFrameState* pState ) override; @@ -527,9 +527,9 @@ public: #if GTK_CHECK_VERSION(3,0,0) virtual void SetModal(bool bModal) override; - virtual bool ShowTooltip(const OUString& rHelpText, const Rectangle& rHelpArea) override; - virtual sal_uIntPtr ShowPopover(const OUString& rHelpText, const Rectangle& rHelpArea, QuickHelpFlags nFlags) override; - virtual bool UpdatePopover(sal_uIntPtr nId, const OUString& rHelpText, const Rectangle& rHelpArea) override; + virtual bool ShowTooltip(const OUString& rHelpText, const tools::Rectangle& rHelpArea) override; + virtual sal_uIntPtr ShowPopover(const OUString& rHelpText, const tools::Rectangle& rHelpArea, QuickHelpFlags nFlags) override; + virtual bool UpdatePopover(sal_uIntPtr nId, const OUString& rHelpText, const tools::Rectangle& rHelpArea) override; virtual bool HidePopover(sal_uIntPtr nId) override; #endif diff --git a/vcl/inc/unx/gtk/gtkgdi.hxx b/vcl/inc/unx/gtk/gtkgdi.hxx index bf70ba1694dc..e8b425436b64 100644 --- a/vcl/inc/unx/gtk/gtkgdi.hxx +++ b/vcl/inc/unx/gtk/gtkgdi.hxx @@ -103,17 +103,17 @@ class GtkSalGraphics : public SvpSalGraphics public: GtkSalGraphics( GtkSalFrame *pFrame, GtkWidget *pWindow ); virtual bool drawNativeControl( ControlType nType, ControlPart nPart, - const Rectangle& rControlRegion, + const tools::Rectangle& rControlRegion, ControlState nState, const ImplControlValue& aValue, const OUString& rCaption ) override; virtual bool IsNativeControlSupported( ControlType nType, ControlPart nPart ) override; virtual bool getNativeControlRegion( ControlType nType, ControlPart nPart, - const Rectangle& rControlRegion, + const tools::Rectangle& rControlRegion, ControlState nState, const ImplControlValue& aValue, const OUString& rCaption, - Rectangle &rNativeBoundingRegion, - Rectangle &rNativeContentRegion ) override; + tools::Rectangle &rNativeBoundingRegion, + tools::Rectangle &rNativeContentRegion ) override; #if ENABLE_CAIRO_CANVAS virtual bool SupportsCairo() const override; @@ -203,13 +203,13 @@ private: static GtkStyleContext *mpSeparatorMenuItemStyle; static GtkStyleContext *mpSeparatorMenuItemSeparatorStyle; - static Rectangle NWGetScrollButtonRect( ControlPart nPart, Rectangle aAreaRect ); - static Rectangle NWGetSpinButtonRect( ControlPart nPart, Rectangle aAreaRect); - static Rectangle NWGetComboBoxButtonRect( ControlType nType, ControlPart nPart, Rectangle aAreaRect ); + static tools::Rectangle NWGetScrollButtonRect( ControlPart nPart, tools::Rectangle aAreaRect ); + static tools::Rectangle NWGetSpinButtonRect( ControlPart nPart, tools::Rectangle aAreaRect); + static tools::Rectangle NWGetComboBoxButtonRect( ControlType nType, ControlPart nPart, tools::Rectangle aAreaRect ); static void PaintScrollbar(GtkStyleContext *context, cairo_t *cr, - const Rectangle& rControlRectangle, + const tools::Rectangle& rControlRectangle, ControlType nType, ControlPart nPart, const ImplControlValue& aValue ); @@ -217,29 +217,29 @@ private: cairo_t *cr, ControlType nType, ControlPart nPart, - Rectangle aAreaRect, + tools::Rectangle aAreaRect, ControlState nState ); void PaintSpinButton(GtkStateFlags flags, cairo_t *cr, - const Rectangle& rControlRectangle, + const tools::Rectangle& rControlRectangle, ControlType nType, ControlPart nPart, const ImplControlValue& aValue); static void PaintCombobox(GtkStateFlags flags, cairo_t *cr, - const Rectangle& rControlRectangle, + const tools::Rectangle& rControlRectangle, ControlType nType, ControlPart nPart, const ImplControlValue& aValue); static void PaintCheckOrRadio(cairo_t *cr, GtkStyleContext *context, - const Rectangle& rControlRectangle, + const tools::Rectangle& rControlRectangle, bool bIsCheck, bool bInMenu); static void PaintCheck(cairo_t *cr, GtkStyleContext *context, - const Rectangle& rControlRectangle, bool bInMenu); + const tools::Rectangle& rControlRectangle, bool bInMenu); static void PaintRadio(cairo_t *cr, GtkStyleContext *context, - const Rectangle& rControlRectangle, bool bInMenu); + const tools::Rectangle& rControlRectangle, bool bInMenu); static bool style_loaded; @@ -270,14 +270,14 @@ public: // native widget methods virtual bool IsNativeControlSupported( ControlType nType, ControlPart nPart ) override; - virtual bool hitTestNativeControl( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion, + virtual bool hitTestNativeControl( ControlType nType, ControlPart nPart, const tools::Rectangle& rControlRegion, const Point& aPos, bool& rIsInside ) override; - virtual bool drawNativeControl( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion, + virtual bool drawNativeControl( ControlType nType, ControlPart nPart, const tools::Rectangle& rControlRegion, ControlState nState, const ImplControlValue& aValue, const OUString& rCaption ) override; - virtual bool getNativeControlRegion( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion, ControlState nState, + virtual bool getNativeControlRegion( ControlType nType, ControlPart nPart, const tools::Rectangle& rControlRegion, ControlState nState, const ImplControlValue& aValue, const OUString& rCaption, - Rectangle &rNativeBoundingRegion, Rectangle &rNativeContentRegion ) override; + tools::Rectangle &rNativeBoundingRegion, tools::Rectangle &rNativeContentRegion ) override; //helper methods for frame's UpdateSettings void updateSettings( AllSettings& rSettings ); @@ -296,129 +296,129 @@ public: protected: - GdkX11Pixmap* NWGetPixmapFromScreen( Rectangle srcRect, int nBgColor = 0 ); - bool NWRenderPixmapToScreen( GdkX11Pixmap* pPixmap, GdkX11Pixmap* pMask, Rectangle dstRect ); + GdkX11Pixmap* NWGetPixmapFromScreen( tools::Rectangle srcRect, int nBgColor = 0 ); + bool NWRenderPixmapToScreen( GdkX11Pixmap* pPixmap, GdkX11Pixmap* pMask, tools::Rectangle dstRect ); bool DoDrawNativeControl( GdkDrawable* pDrawable, ControlType nType, ControlPart nPart, - const Rectangle& aCtrlRect, - const std::list< Rectangle >& aClip, + const tools::Rectangle& aCtrlRect, + const std::list< tools::Rectangle >& aClip, ControlState nState, const ImplControlValue& aValue, const OUString& rCaption, ControlCacheKey& rControlCacheKey); bool NWPaintGTKArrow( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart, - const Rectangle& rControlRectangle, - const std::list< Rectangle >& rClipList, + const tools::Rectangle& rControlRectangle, + const std::list< tools::Rectangle >& rClipList, ControlState nState, const ImplControlValue& aValue, const OUString& rCaption ); bool NWPaintGTKListHeader( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart, - const Rectangle& rControlRectangle, - const std::list< Rectangle >& rClipList, + const tools::Rectangle& rControlRectangle, + const std::list< tools::Rectangle >& rClipList, ControlState nState, const ImplControlValue& aValue, const OUString& rCaption ); bool NWPaintGTKFixedLine( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart, - const Rectangle& rControlRectangle, - const std::list< Rectangle >& rClipList, + const tools::Rectangle& rControlRectangle, + const std::list< tools::Rectangle >& rClipList, ControlState nState, const ImplControlValue& aValue, const OUString& rCaption ); bool NWPaintGTKFrame( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart, - const Rectangle& rControlRectangle, - const std::list< Rectangle >& rClipList, + const tools::Rectangle& rControlRectangle, + const std::list< tools::Rectangle >& rClipList, ControlState nState, const ImplControlValue& aValue, const OUString& rCaption ); bool NWPaintGTKWindowBackground( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart, - const Rectangle& rControlRectangle, - const std::list< Rectangle >& rClipList, + const tools::Rectangle& rControlRectangle, + const std::list< tools::Rectangle >& rClipList, ControlState nState, const ImplControlValue& aValue, const OUString& rCaption ); bool NWPaintGTKButtonReal( GtkWidget* button, GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart, - const Rectangle& rControlRectangle, - const std::list< Rectangle >& rClipList, + const tools::Rectangle& rControlRectangle, + const std::list< tools::Rectangle >& rClipList, ControlState nState, const ImplControlValue& aValue, const OUString& rCaption ); bool NWPaintGTKButton( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart, - const Rectangle& rControlRectangle, - const std::list< Rectangle >& rClipList, + const tools::Rectangle& rControlRectangle, + const std::list< tools::Rectangle >& rClipList, ControlState nState, const ImplControlValue& aValue, const OUString& rCaption ); bool NWPaintGTKRadio( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart, - const Rectangle& rControlRectangle, - const std::list< Rectangle >& rClipList, + const tools::Rectangle& rControlRectangle, + const std::list< tools::Rectangle >& rClipList, ControlState nState, const ImplControlValue& aValue, const OUString& rCaption ); bool NWPaintGTKCheck( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart, - const Rectangle& rControlRectangle, - const std::list< Rectangle >& rClipList, + const tools::Rectangle& rControlRectangle, + const std::list< tools::Rectangle >& rClipList, ControlState nState, const ImplControlValue& aValue, const OUString& rCaption ); bool NWPaintGTKScrollbar( ControlType nType, ControlPart nPart, - const Rectangle& rControlRectangle, - const std::list< Rectangle >& rClipList, + const tools::Rectangle& rControlRectangle, + const std::list< tools::Rectangle >& rClipList, ControlState nState, const ImplControlValue& aValue, const OUString& rCaption ); bool NWPaintGTKEditBox( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart, - const Rectangle& rControlRectangle, - const std::list< Rectangle >& rClipList, + const tools::Rectangle& rControlRectangle, + const std::list< tools::Rectangle >& rClipList, ControlState nState, const ImplControlValue& aValue, const OUString& rCaption ); bool NWPaintGTKSpinBox(ControlType nType, ControlPart nPart, - const Rectangle& rControlRectangle, - const std::list< Rectangle >& rClipList, + const tools::Rectangle& rControlRectangle, + const std::list< tools::Rectangle >& rClipList, ControlState nState, const ImplControlValue& aValue, const OUString& rCaption, ControlCacheKey& rControlCacheKey); bool NWPaintGTKComboBox( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart, - const Rectangle& rControlRectangle, - const std::list< Rectangle >& rClipList, + const tools::Rectangle& rControlRectangle, + const std::list< tools::Rectangle >& rClipList, ControlState nState, const ImplControlValue& aValue, const OUString& rCaption ); bool NWPaintGTKTabItem( ControlType nType, ControlPart nPart, - const Rectangle& rControlRectangle, - const std::list< Rectangle >& rClipList, + const tools::Rectangle& rControlRectangle, + const std::list< tools::Rectangle >& rClipList, ControlState nState, const ImplControlValue& aValue, const OUString& rCaption ); bool NWPaintGTKListBox( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart, - const Rectangle& rControlRectangle, - const std::list< Rectangle >& rClipList, + const tools::Rectangle& rControlRectangle, + const std::list< tools::Rectangle >& rClipList, ControlState nState, const ImplControlValue& aValue, const OUString& rCaption ); bool NWPaintGTKToolbar( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart, - const Rectangle& rControlRectangle, - const std::list< Rectangle >& rClipList, + const tools::Rectangle& rControlRectangle, + const std::list< tools::Rectangle >& rClipList, ControlState nState, const ImplControlValue& aValue, const OUString& rCaption ); bool NWPaintGTKMenubar( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart, - const Rectangle& rControlRectangle, - const std::list< Rectangle >& rClipList, + const tools::Rectangle& rControlRectangle, + const std::list< tools::Rectangle >& rClipList, ControlState nState, const ImplControlValue& aValue, const OUString& rCaption ); bool NWPaintGTKPopupMenu( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart, - const Rectangle& rControlRectangle, - const std::list< Rectangle >& rClipList, + const tools::Rectangle& rControlRectangle, + const std::list< tools::Rectangle >& rClipList, ControlState nState, const ImplControlValue& aValue, const OUString& rCaption ); bool NWPaintGTKTooltip( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart, - const Rectangle& rControlRectangle, - const std::list< Rectangle >& rClipList, + const tools::Rectangle& rControlRectangle, + const std::list< tools::Rectangle >& rClipList, ControlState nState, const ImplControlValue& aValue, const OUString& rCaption ); bool NWPaintGTKProgress( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart, - const Rectangle& rControlRectangle, - const std::list< Rectangle >& rClipList, + const tools::Rectangle& rControlRectangle, + const std::list< tools::Rectangle >& rClipList, ControlState nState, const ImplControlValue& aValue, const OUString& rCaption ); bool NWPaintGTKSlider( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart, - const Rectangle& rControlRectangle, - const std::list< Rectangle >& rClipList, + const tools::Rectangle& rControlRectangle, + const std::list< tools::Rectangle >& rClipList, ControlState nState, const ImplControlValue& aValue, const OUString& rCaption ); bool NWPaintGTKListNode( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart, - const Rectangle& rControlRectangle, - const std::list< Rectangle >& rClipList, + const tools::Rectangle& rControlRectangle, + const std::list< tools::Rectangle >& rClipList, ControlState nState, const ImplControlValue& aValue, const OUString& rCaption ); }; diff --git a/vcl/inc/unx/gtk/gtksalmenu.hxx b/vcl/inc/unx/gtk/gtksalmenu.hxx index cf076675dea8..9a5ef3ed67ab 100644 --- a/vcl/inc/unx/gtk/gtksalmenu.hxx +++ b/vcl/inc/unx/gtk/gtksalmenu.hxx @@ -126,7 +126,7 @@ public: gboolean SignalKey(GdkEventKey* pEvent); void ReturnFocus(); - virtual bool ShowNativePopupMenu(FloatingWindow * pWin, const Rectangle& rRect, FloatWinPopupFlags nFlags) override; + virtual bool ShowNativePopupMenu(FloatingWindow * pWin, const tools::Rectangle& rRect, FloatWinPopupFlags nFlags) override; virtual void ShowCloseButton(bool bShow) override; virtual bool CanGetFocus() const override; virtual bool TakeFocus() override; diff --git a/vcl/inc/unx/gtk/gtksys.hxx b/vcl/inc/unx/gtk/gtksys.hxx index b8ebbdf0574d..d888bce5bca3 100644 --- a/vcl/inc/unx/gtk/gtksys.hxx +++ b/vcl/inc/unx/gtk/gtksys.hxx @@ -29,7 +29,7 @@ public: virtual bool IsUnifiedDisplay() override; virtual unsigned int GetDisplayScreenCount() override; virtual unsigned int GetDisplayBuiltInScreen() override; - virtual Rectangle GetDisplayScreenPosSizePixel (unsigned int nScreen) override; + virtual tools::Rectangle GetDisplayScreenPosSizePixel (unsigned int nScreen) override; virtual int ShowNativeDialog (const OUString& rTitle, const OUString& rMessage, const std::list< OUString >& rButtons, diff --git a/vcl/inc/unx/printergfx.hxx b/vcl/inc/unx/printergfx.hxx index 152573e10b9d..59c2f338d2bd 100644 --- a/vcl/inc/unx/printergfx.hxx +++ b/vcl/inc/unx/printergfx.hxx @@ -187,18 +187,18 @@ private: /* bitmap drawing implementation */ - void DrawPS1GrayImage (const PrinterBmp& rBitmap, const Rectangle& rArea); - void writePS2ImageHeader (const Rectangle& rArea, psp::ImageType nType); + void DrawPS1GrayImage (const PrinterBmp& rBitmap, const tools::Rectangle& rArea); + void writePS2ImageHeader (const tools::Rectangle& rArea, psp::ImageType nType); void writePS2Colorspace (const PrinterBmp& rBitmap, psp::ImageType nType); - void DrawPS2GrayImage (const PrinterBmp& rBitmap, const Rectangle& rArea); - void DrawPS2PaletteImage (const PrinterBmp& rBitmap, const Rectangle& rArea); - void DrawPS2TrueColorImage (const PrinterBmp& rBitmap, const Rectangle& rArea); - void DrawPS2MonoImage (const PrinterBmp& rBitmap, const Rectangle& rArea); + void DrawPS2GrayImage (const PrinterBmp& rBitmap, const tools::Rectangle& rArea); + void DrawPS2PaletteImage (const PrinterBmp& rBitmap, const tools::Rectangle& rArea); + void DrawPS2TrueColorImage (const PrinterBmp& rBitmap, const tools::Rectangle& rArea); + void DrawPS2MonoImage (const PrinterBmp& rBitmap, const tools::Rectangle& rArea); /* clip region */ - std::list< Rectangle > maClipRegion; - bool JoinVerticalClipRectangles( std::list< Rectangle >::iterator& it, + std::list< tools::Rectangle > maClipRegion; + bool JoinVerticalClipRectangles( std::list< tools::Rectangle >::iterator& it, Point& aOldPoint, sal_Int32& nColumn ); /* color settings */ @@ -285,7 +285,7 @@ public: void DrawPixel (const Point& rPoint) { DrawPixel (rPoint, maLineColor); } void DrawLine (const Point& rFrom, const Point& rTo); - void DrawRect (const Rectangle& rRectangle); + void DrawRect (const tools::Rectangle& rRectangle); void DrawPolyLine (sal_uInt32 nPoints, const Point* pPath ); void DrawPolygon (sal_uInt32 nPoints, const Point* pPath); void DrawPolyPolygon (sal_uInt32 nPoly, @@ -303,10 +303,10 @@ public: const PolyFlags* const* pFlgAry); // eps - bool DrawEPS ( const Rectangle& rBoundingBox, void* pPtr, sal_uInt32 nSize); + bool DrawEPS ( const tools::Rectangle& rBoundingBox, void* pPtr, sal_uInt32 nSize); // image drawing - void DrawBitmap (const Rectangle& rDest, const Rectangle& rSrc, + void DrawBitmap (const tools::Rectangle& rDest, const tools::Rectangle& rSrc, const PrinterBmp& rBitmap); // font and text handling diff --git a/vcl/inc/unx/saldisp.hxx b/vcl/inc/unx/saldisp.hxx index 44e851a8b981..d28326e389bb 100644 --- a/vcl/inc/unx/saldisp.hxx +++ b/vcl/inc/unx/saldisp.hxx @@ -287,7 +287,7 @@ protected: vcl_sal::WMAdaptor* m_pWMAdaptor; bool m_bXinerama; - std::vector< Rectangle > m_aXineramaScreens; + std::vector< tools::Rectangle > m_aXineramaScreens; std::vector< int > m_aXineramaScreenIndexMap; std::list<SalObject*> m_aSalObjects; @@ -370,7 +370,7 @@ public: { mpKbdExtension = pKbdExtension; } ::vcl_sal::WMAdaptor* getWMAdaptor() const { return m_pWMAdaptor; } bool IsXinerama() const { return m_bXinerama; } - const std::vector< Rectangle >& GetXineramaScreens() const { return m_aXineramaScreens; } + const std::vector< tools::Rectangle >& GetXineramaScreens() const { return m_aXineramaScreens; } ::Window GetRootWindow( SalX11Screen nXScreen ) const { return getDataForScreen( nXScreen ).m_aRoot; } unsigned int GetXScreenCount() const { return m_aScreens.size(); } diff --git a/vcl/inc/unx/salframe.h b/vcl/inc/unx/salframe.h index 69702fc8710d..4263581a979f 100644 --- a/vcl/inc/unx/salframe.h +++ b/vcl/inc/unx/salframe.h @@ -94,7 +94,7 @@ class VCLPLUG_GEN_PUBLIC X11SalFrame : public SalFrame, public NativeWindowHandl int nShowState_; // show state int nWidth_; // client width int nHeight_; // client height - Rectangle maRestorePosSize; + tools::Rectangle maRestorePosSize; SalFrameStyleFlags nStyle_; SalExtStyle mnExtStyle; bool bAlwaysOnTop_; @@ -108,7 +108,7 @@ class VCLPLUG_GEN_PUBLIC X11SalFrame : public SalFrame, public NativeWindowHandl bool m_bSetFocusOnMap; ScreenSaverInhibitor maScreenSaverInhibitor; - Rectangle maPaintRegion; + tools::Rectangle maPaintRegion; Timer maAlwaysOnTopRaiseTimer; @@ -138,10 +138,10 @@ class VCLPLUG_GEN_PUBLIC X11SalFrame : public SalFrame, public NativeWindowHandl bool mPendingSizeEvent; - void GetPosSize( Rectangle &rPosSize ); + void GetPosSize( tools::Rectangle &rPosSize ); void SetSize ( const Size &rSize ); void Center(); - void SetPosSize( const Rectangle &rPosSize ); + void SetPosSize( const tools::Rectangle &rPosSize ); void Minimize(); void Maximize(); void Restore(); @@ -228,7 +228,7 @@ public: virtual void SetMaxClientSize( long nWidth, long nHeight ) override; virtual void SetPosSize( long nX, long nY, long nWidth, long nHeight, sal_uInt16 nFlags ) override; virtual void GetClientSize( long& rWidth, long& rHeight ) override; - virtual void GetWorkArea( Rectangle& rRect ) override; + virtual void GetWorkArea( tools::Rectangle& rRect ) override; virtual SalFrame* GetParent() const override; virtual void SetWindowState( const SalFrameState* pState ) override; virtual bool GetWindowState( SalFrameState* pState ) override; diff --git a/vcl/inc/unx/salgdi.h b/vcl/inc/unx/salgdi.h index 90d3fd6b3f70..87f9d6e83176 100644 --- a/vcl/inc/unx/salgdi.h +++ b/vcl/inc/unx/salgdi.h @@ -141,7 +141,7 @@ public: std::vector< sal_Int32 >& rWidths, Ucs2UIntMap& rUnicodeEnc ) override; - virtual bool GetGlyphBoundRect(const GlyphItem&, Rectangle&) override; + virtual bool GetGlyphBoundRect(const GlyphItem&, tools::Rectangle&) override; virtual bool GetGlyphOutline(const GlyphItem&, basegfx::B2DPolyPolygon&) override; virtual SalLayout* GetTextLayout( ImplLayoutArgs&, int nFallbackLevel ) override; virtual void DrawTextLayout( const CommonSalLayout& ) override; diff --git a/vcl/inc/unx/wmadaptor.hxx b/vcl/inc/unx/wmadaptor.hxx index fbd87f96a8ef..4e9c2769ee7e 100644 --- a/vcl/inc/unx/wmadaptor.hxx +++ b/vcl/inc/unx/wmadaptor.hxx @@ -132,7 +132,7 @@ protected: Atom m_aWMAtoms[ NetAtomMax]; int m_nDesktops; bool m_bEqualWorkAreas; - ::std::vector< Rectangle > + ::std::vector< tools::Rectangle > m_aWMWorkAreas; bool m_bEnableAlwaysOnTopWorks; bool m_bLegacyPartialFullscreen; @@ -179,7 +179,7 @@ public: /* * gets the specified workarea */ - const Rectangle& getWorkArea( int n ) const + const tools::Rectangle& getWorkArea( int n ) const { return m_aWMWorkAreas[n]; } /* diff --git a/vcl/inc/unx/x11/x11sys.hxx b/vcl/inc/unx/x11/x11sys.hxx index a5937fe074f9..8e209014e262 100644 --- a/vcl/inc/unx/x11/x11sys.hxx +++ b/vcl/inc/unx/x11/x11sys.hxx @@ -35,7 +35,7 @@ public: virtual unsigned int GetDisplayScreenCount() override; virtual bool IsUnifiedDisplay() override; virtual unsigned int GetDisplayBuiltInScreen() override; - virtual Rectangle GetDisplayScreenPosSizePixel( unsigned int nScreen ) override; + virtual tools::Rectangle GetDisplayScreenPosSizePixel( unsigned int nScreen ) override; virtual int ShowNativeDialog( const OUString& rTitle, const OUString& rMessage, const std::list< OUString >& rButtons, diff --git a/vcl/inc/wall2.hxx b/vcl/inc/wall2.hxx index 52393dd937a4..cce5d03919ec 100644 --- a/vcl/inc/wall2.hxx +++ b/vcl/inc/wall2.hxx @@ -28,7 +28,7 @@ private: Color maColor; std::unique_ptr<BitmapEx> mpBitmap; std::unique_ptr<Gradient> mpGradient; - std::unique_ptr<Rectangle> mpRect; + std::unique_ptr<tools::Rectangle> mpRect; WallpaperStyle meStyle; std::unique_ptr<BitmapEx> mpCache; diff --git a/vcl/inc/win/salframe.h b/vcl/inc/win/salframe.h index 3c3fa0eb0c77..177a28cbf9cf 100644 --- a/vcl/inc/win/salframe.h +++ b/vcl/inc/win/salframe.h @@ -99,7 +99,7 @@ public: virtual void SetMaxClientSize( long nWidth, long nHeight ) override; virtual void SetPosSize( long nX, long nY, long nWidth, long nHeight, sal_uInt16 nFlags ) override; virtual void GetClientSize( long& rWidth, long& rHeight ) override; - virtual void GetWorkArea( Rectangle& rRect ) override; + virtual void GetWorkArea( tools::Rectangle& rRect ) override; virtual SalFrame* GetParent() const override; virtual void SetWindowState( const SalFrameState* pState ) override; virtual bool GetWindowState( SalFrameState* pState ) override; diff --git a/vcl/inc/win/salgdi.h b/vcl/inc/win/salgdi.h index 3af90cbefae3..a1076e0c7d1e 100644 --- a/vcl/inc/win/salgdi.h +++ b/vcl/inc/win/salgdi.h @@ -268,14 +268,14 @@ protected: virtual bool drawEPS( long nX, long nY, long nWidth, long nHeight, void* pPtr, sal_uIntPtr nSize ) override; // native widget rendering methods that require mirroring - virtual bool hitTestNativeControl( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion, + virtual bool hitTestNativeControl( ControlType nType, ControlPart nPart, const tools::Rectangle& rControlRegion, const Point& aPos, bool& rIsInside ) override; - virtual bool drawNativeControl( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion, + virtual bool drawNativeControl( ControlType nType, ControlPart nPart, const tools::Rectangle& rControlRegion, ControlState nState, const ImplControlValue& aValue, const OUString& aCaption ) override; - virtual bool getNativeControlRegion( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion, ControlState nState, + virtual bool getNativeControlRegion( ControlType nType, ControlPart nPart, const tools::Rectangle& rControlRegion, ControlState nState, const ImplControlValue& aValue, const OUString& aCaption, - Rectangle &rNativeBoundingRegion, Rectangle &rNativeContentRegion ) override; + tools::Rectangle &rNativeBoundingRegion, tools::Rectangle &rNativeContentRegion ) override; virtual bool blendBitmap( const SalTwoRect&, const SalBitmap& rBitmap ) override; @@ -377,7 +377,7 @@ public: std::vector< sal_Int32 >& rWidths, Ucs2UIntMap& rUnicodeEnc ) override; - virtual bool GetGlyphBoundRect(const GlyphItem&, Rectangle&) override; + virtual bool GetGlyphBoundRect(const GlyphItem&, tools::Rectangle&) override; virtual bool GetGlyphOutline(const GlyphItem&, basegfx::B2DPolyPolygon&) override; virtual SalLayout* GetTextLayout( ImplLayoutArgs&, int nFallbackLevel ) override; diff --git a/vcl/inc/win/salsys.h b/vcl/inc/win/salsys.h index ec9424b318e6..03f627b5abb2 100644 --- a/vcl/inc/win/salsys.h +++ b/vcl/inc/win/salsys.h @@ -31,11 +31,11 @@ public: struct DisplayMonitor { OUString m_aName; - Rectangle m_aArea; + tools::Rectangle m_aArea; DisplayMonitor() {} DisplayMonitor( const OUString& rName, - const Rectangle& rArea ) + const tools::Rectangle& rArea ) : m_aName( rName ), m_aArea( rArea ) { @@ -51,7 +51,7 @@ public: virtual unsigned int GetDisplayScreenCount() override; virtual unsigned int GetDisplayBuiltInScreen() override; - virtual Rectangle GetDisplayScreenPosSizePixel( unsigned int nScreen ) override; + virtual tools::Rectangle GetDisplayScreenPosSizePixel( unsigned int nScreen ) override; virtual int ShowNativeMessageBox( const OUString& rTitle, const OUString& rMessage) override; bool initMonitors(); diff --git a/vcl/inc/win/winlayout.hxx b/vcl/inc/win/winlayout.hxx index 35c17cc6fea0..eb1004ca142c 100644 --- a/vcl/inc/win/winlayout.hxx +++ b/vcl/inc/win/winlayout.hxx @@ -44,7 +44,7 @@ const int GLYPH_OFFSET_RATIO = GLYPH_SPACE_RATIO * 2; struct OpenGLGlyphDrawElement { - Rectangle maLocation; + tools::Rectangle maLocation; int maLeftOverhangs; OpenGLTexture maTexture; int mnBaselineOffset; @@ -217,7 +217,7 @@ public: SalGraphics &rGraphics, HDC hDC) override; - inline bool BindDC(HDC hDC, Rectangle const & rRect = Rectangle(0, 0, 0, 0)) { + inline bool BindDC(HDC hDC, tools::Rectangle const & rRect = tools::Rectangle(0, 0, 0, 0)) { RECT const rc = { rRect.Left(), rRect.Top(), rRect.Right(), rRect.Bottom() }; return SUCCEEDED(mpRT->BindDC(hDC, &rc)); } @@ -225,7 +225,7 @@ public: bool BindFont(HDC hDC) /*override*/; bool ReleaseFont() /*override*/; - std::vector<Rectangle> GetGlyphInkBoxes(uint16_t * pGid, uint16_t * pGidEnd) const /*override*/; + std::vector<tools::Rectangle> GetGlyphInkBoxes(uint16_t * pGid, uint16_t * pGidEnd) const /*override*/; ID2D1RenderTarget * GetRenderTarget() const { return mpRT; } IDWriteFontFace * GetFontFace() const { return mpFontFace; } float GetEmHeight() const { return mlfEmHeight; } diff --git a/vcl/inc/window.h b/vcl/inc/window.h index 6553b18eb40c..0825ccfed464 100644 --- a/vcl/inc/window.h +++ b/vcl/inc/window.h @@ -85,13 +85,13 @@ struct ImplWinData { OUString* mpExtOldText; ExtTextInputAttr* mpExtOldAttrAry; - Rectangle* mpCursorRect; + tools::Rectangle* mpCursorRect; long mnCursorExtWidth; bool mbVertical; - Rectangle* mpCompositionCharRects; + tools::Rectangle* mpCompositionCharRects; long mnCompositionCharRects; - Rectangle* mpFocusRect; - Rectangle* mpTrackRect; + tools::Rectangle* mpFocusRect; + tools::Rectangle* mpTrackRect; ShowTrackFlags mnTrackFlags; sal_uInt16 mnIsTopWindow; bool mbMouseOver; //< tracks mouse over for native widget paint effect @@ -154,7 +154,7 @@ struct ImplFrameData bool mbInternalDragGestureRecognizer; VclPtr<VirtualDevice> mpBuffer; ///< Buffer for the double-buffering bool mbInBufferedPaint; ///< PaintHelper is in the process of painting into this buffer. - Rectangle maBufferedRect; ///< Rectangle in the buffer that has to be painted to the screen. + tools::Rectangle maBufferedRect; ///< Rectangle in the buffer that has to be painted to the screen. ImplFrameData( vcl::Window *pWindow ); }; @@ -378,12 +378,12 @@ class PaintBufferGuard AllSettings maSettings; long mnOutOffX; long mnOutOffY; - Rectangle m_aPaintRect; + tools::Rectangle m_aPaintRect; public: PaintBufferGuard(ImplFrameData* pFrameData, vcl::Window* pWindow); ~PaintBufferGuard(); /// If this is called, then the dtor will also copy rRectangle to the window from the buffer, before restoring the state. - void SetPaintRect(const Rectangle& rRectangle); + void SetPaintRect(const tools::Rectangle& rRectangle); /// Returns either the frame's buffer or the window, in case of no buffering. vcl::RenderContext* GetRenderContext(); }; diff --git a/vcl/opengl/FixedTextureAtlas.cxx b/vcl/opengl/FixedTextureAtlas.cxx index 33a5a1360374..aeece80a7760 100644 --- a/vcl/opengl/FixedTextureAtlas.cxx +++ b/vcl/opengl/FixedTextureAtlas.cxx @@ -119,7 +119,7 @@ OpenGLTexture FixedTextureAtlasManager::Reserve(int nWidth, int nHeight) int nX = (nSlot % mWidthFactor) * mSubTextureSize; int nY = (nSlot / mWidthFactor) * mSubTextureSize; - Rectangle aRectangle(Point(nX, nY), Size(nWidth, nHeight)); + tools::Rectangle aRectangle(Point(nX, nY), Size(nWidth, nHeight)); return OpenGLTexture(pFixedTexture->mpTexture, aRectangle, nSlot); } diff --git a/vcl/opengl/PackedTextureAtlas.cxx b/vcl/opengl/PackedTextureAtlas.cxx index bad17587762d..dc6d0db4c76f 100644 --- a/vcl/opengl/PackedTextureAtlas.cxx +++ b/vcl/opengl/PackedTextureAtlas.cxx @@ -19,26 +19,26 @@ struct Node { - Rectangle mRectangle; + tools::Rectangle mRectangle; std::unique_ptr<Node> mLeftNode; std::unique_ptr<Node> mRightNode; bool mOccupied; explicit Node(int nWidth, int nHeight); - explicit Node(Rectangle& aRectangle); + explicit Node(tools::Rectangle& aRectangle); bool isLeaf(); Node* insert(int nWidth, int nHeight, int nPadding); }; Node::Node(int nWidth, int nHeight) - : mRectangle(Rectangle(Point(), Size(nWidth, nHeight))) + : mRectangle(tools::Rectangle(Point(), Size(nWidth, nHeight))) , mLeftNode() , mRightNode() , mOccupied(false) {} -Node::Node(Rectangle& aRectangle) +Node::Node(tools::Rectangle& aRectangle) : mRectangle(aRectangle) , mLeftNode() , mRightNode() @@ -83,20 +83,20 @@ Node* Node::insert(int nWidth, int nHeight, int nPadding) int dw = mRectangle.GetWidth() - nWidth; int dh = mRectangle.GetHeight() - nHeight; - Rectangle aLeftRect; - Rectangle aRightRect; + tools::Rectangle aLeftRect; + tools::Rectangle aRightRect; if (dw > dh) { - aLeftRect = Rectangle(Point(mRectangle.Left(), mRectangle.Top()), + aLeftRect = tools::Rectangle(Point(mRectangle.Left(), mRectangle.Top()), Size(nWidth, mRectangle.GetHeight())); - aRightRect = Rectangle(Point(nPadding + mRectangle.Left() + nWidth, mRectangle.Top()), + aRightRect = tools::Rectangle(Point(nPadding + mRectangle.Left() + nWidth, mRectangle.Top()), Size(mRectangle.GetWidth() - nWidth - nPadding, mRectangle.GetHeight())); } else { - aLeftRect = Rectangle(Point(mRectangle.Left(), mRectangle.Top()), + aLeftRect = tools::Rectangle(Point(mRectangle.Left(), mRectangle.Top()), Size(mRectangle.GetWidth(), nHeight)); - aRightRect = Rectangle(Point(mRectangle.Left(), nPadding + mRectangle.Top() + nHeight), + aRightRect = tools::Rectangle(Point(mRectangle.Left(), nPadding + mRectangle.Top() + nHeight), Size(mRectangle.GetWidth(), mRectangle.GetHeight() - nHeight - nPadding)); } diff --git a/vcl/opengl/gdiimpl.cxx b/vcl/opengl/gdiimpl.cxx index c483fb094f4d..9e1bc471d13f 100644 --- a/vcl/opengl/gdiimpl.cxx +++ b/vcl/opengl/gdiimpl.cxx @@ -222,7 +222,7 @@ void OpenGLSalGraphicsImpl::InitializePreDrawState(XOROption eOpt) CheckOffscreenTexture(); CHECK_GL_ERROR(); - mpContext->state().viewport(Rectangle(Point(0, 0), Size(GetWidth(), GetHeight()))); + mpContext->state().viewport(tools::Rectangle(Point(0, 0), Size(GetWidth(), GetHeight()))); ImplInitClipRegion(); CHECK_GL_ERROR(); @@ -355,7 +355,7 @@ void OpenGLSalGraphicsImpl::ImplInitClipRegion() if (mbUseScissor) { - Rectangle aRect(maClipRegion.GetBoundRect()); + tools::Rectangle aRect(maClipRegion.GetBoundRect()); mpContext->state().scissor().set(aRect.Left(), GetHeight() - aRect.Bottom() - 1, aRect.GetWidth(), aRect.GetHeight()); mpContext->state().scissor().enable(); } @@ -867,7 +867,7 @@ void OpenGLSalGraphicsImpl::DrawRect( long nX, long nY, long nWidth, long nHeigh DrawConvexPolygon( 4, aPoints, true ); } -void OpenGLSalGraphicsImpl::DrawRect( const Rectangle& rRect ) +void OpenGLSalGraphicsImpl::DrawRect( const tools::Rectangle& rRect ) { long nX1( rRect.Left() ); long nY1( rRect.Top() ); @@ -927,7 +927,7 @@ void OpenGLSalGraphicsImpl::DrawRegionBand( const RegionBand& rRegion ) aVertices.push_back(GLfloat(pt.X())); \ aVertices.push_back(GLfloat(pt.Y())); - for(Rectangle & rRect : aRects) + for(tools::Rectangle & rRect : aRects) { rRect.Bottom() += 1; rRect.Right() += 1; @@ -1412,7 +1412,7 @@ void OpenGLSalGraphicsImpl::FlushDeferredDrawing() VCL_GL_INFO("End FlushDeferredDrawing"); } -void OpenGLSalGraphicsImpl::DrawLinearGradient( const Gradient& rGradient, const Rectangle& rRect ) +void OpenGLSalGraphicsImpl::DrawLinearGradient( const Gradient& rGradient, const tools::Rectangle& rRect ) { OpenGLZone aZone; @@ -1425,7 +1425,7 @@ void OpenGLSalGraphicsImpl::DrawLinearGradient( const Gradient& rGradient, const nFactor = rGradient.GetEndIntensity(); mpProgram->SetColorWithIntensity( "end_color", aEndCol, nFactor ); - Rectangle aBoundRect; + tools::Rectangle aBoundRect; Point aCenter; rGradient.GetBoundRect( rRect, aBoundRect, aCenter ); tools::Polygon aPoly( aBoundRect ); @@ -1438,7 +1438,7 @@ void OpenGLSalGraphicsImpl::DrawLinearGradient( const Gradient& rGradient, const DrawConvexPolygon( aPoly, true ); } -void OpenGLSalGraphicsImpl::DrawAxialGradient( const Gradient& rGradient, const Rectangle& rRect ) +void OpenGLSalGraphicsImpl::DrawAxialGradient( const Gradient& rGradient, const tools::Rectangle& rRect ) { OpenGLZone aZone; @@ -1465,7 +1465,7 @@ void OpenGLSalGraphicsImpl::DrawAxialGradient( const Gradient& rGradient, const * */ - Rectangle aRect; + tools::Rectangle aRect; Point aCenter; rGradient.GetBoundRect( rRect, aRect, aCenter ); @@ -1490,7 +1490,7 @@ void OpenGLSalGraphicsImpl::DrawAxialGradient( const Gradient& rGradient, const DrawConvexPolygon( aPoly, true ); } -void OpenGLSalGraphicsImpl::DrawRadialGradient( const Gradient& rGradient, const Rectangle& rRect ) +void OpenGLSalGraphicsImpl::DrawRadialGradient( const Gradient& rGradient, const tools::Rectangle& rRect ) { OpenGLZone aZone; @@ -1503,7 +1503,7 @@ void OpenGLSalGraphicsImpl::DrawRadialGradient( const Gradient& rGradient, const nFactor = rGradient.GetEndIntensity(); mpProgram->SetColorWithIntensity( "end_color", aEndCol, nFactor ); - Rectangle aRect; + tools::Rectangle aRect; Point aCenter; rGradient.GetBoundRect( rRect, aRect, aCenter ); @@ -1962,7 +1962,7 @@ bool OpenGLSalGraphicsImpl::drawAlphaRect( bool OpenGLSalGraphicsImpl::drawGradient(const tools::PolyPolygon& rPolyPoly, const Gradient& rGradient) { - Rectangle aBoundRect( rPolyPoly.GetBoundRect() ); + tools::Rectangle aBoundRect( rPolyPoly.GetBoundRect() ); VCL_GL_INFO("::drawGradient " << rPolyPoly.GetBoundRect()); @@ -2116,7 +2116,7 @@ void OpenGLSalGraphicsImpl::doFlush() CHECK_GL_ERROR(); mpWindowContext->state().sync(); - mpWindowContext->state().viewport(Rectangle(Point(0, 0), Size(GetWidth(), GetHeight()))); + mpWindowContext->state().viewport(tools::Rectangle(Point(0, 0), Size(GetWidth(), GetHeight()))); mpWindowContext->state().scissor().disable(); mpWindowContext->state().stencil().disable(); diff --git a/vcl/opengl/texture.cxx b/vcl/opengl/texture.cxx index 002d03f8bea0..9a3584c4f9cf 100644 --- a/vcl/opengl/texture.cxx +++ b/vcl/opengl/texture.cxx @@ -253,7 +253,7 @@ OpenGLTexture::OpenGLTexture() : { } -OpenGLTexture::OpenGLTexture(const std::shared_ptr<ImplOpenGLTexture>& rpImpl, Rectangle aRectangle, int nSlotNumber) +OpenGLTexture::OpenGLTexture(const std::shared_ptr<ImplOpenGLTexture>& rpImpl, tools::Rectangle aRectangle, int nSlotNumber) : maRect(aRectangle) , mpImpl(rpImpl) , mnSlotNumber(nSlotNumber) @@ -297,7 +297,7 @@ OpenGLTexture::OpenGLTexture( const OpenGLTexture& rTexture ) OpenGLTexture::OpenGLTexture( const OpenGLTexture& rTexture, int nX, int nY, int nWidth, int nHeight ) { - maRect = Rectangle( Point( rTexture.maRect.Left() + nX, rTexture.maRect.Top() + nY ), + maRect = tools::Rectangle( Point( rTexture.maRect.Left() + nX, rTexture.maRect.Top() + nY ), Size( nWidth, nHeight ) ); mpImpl = rTexture.mpImpl; mnSlotNumber = rTexture.mnSlotNumber; diff --git a/vcl/osx/salframe.cxx b/vcl/osx/salframe.cxx index ca4a5d9928d7..28284b4a73fc 100644 --- a/vcl/osx/salframe.cxx +++ b/vcl/osx/salframe.cxx @@ -364,7 +364,7 @@ void AquaSalFrame::initShow() mbInitShow = false; if( ! mbPositioned && ! mbFullScreen ) { - Rectangle aScreenRect; + tools::Rectangle aScreenRect; GetWorkArea( aScreenRect ); if( mpParent ) // center relative to parent { @@ -396,7 +396,7 @@ void AquaSalFrame::initShow() [AquaA11yFactory registerView: mpNSView]; } -void AquaSalFrame::SendPaintEvent( const Rectangle* pRect ) +void AquaSalFrame::SendPaintEvent( const tools::Rectangle* pRect ) { SalPaintEvent aPaintEvt( 0, 0, maGeometry.nWidth, maGeometry.nHeight, true ); if( pRect ) @@ -905,7 +905,7 @@ void AquaSalFrame::Flush() } } -void AquaSalFrame::Flush( const Rectangle& rRect ) +void AquaSalFrame::Flush( const tools::Rectangle& rRect ) { if( !(mbGraphics && mpGraphics && mpNSView && mbShown) ) return; @@ -1336,7 +1336,7 @@ void AquaSalFrame::SetPosSize(long nX, long nY, long nWidth, long nHeight, sal_u } } -void AquaSalFrame::GetWorkArea( Rectangle& rRect ) +void AquaSalFrame::GetWorkArea( tools::Rectangle& rRect ) { if ( !mpNSWindow ) return; diff --git a/vcl/osx/salmenu.cxx b/vcl/osx/salmenu.cxx index c567f9ecbed2..1915cc3e8e32 100644 --- a/vcl/osx/salmenu.cxx +++ b/vcl/osx/salmenu.cxx @@ -319,7 +319,7 @@ AquaSalMenu::~AquaSalMenu() } } -bool AquaSalMenu::ShowNativePopupMenu(FloatingWindow * pWin, const Rectangle& rRect, FloatWinPopupFlags nFlags) +bool AquaSalMenu::ShowNativePopupMenu(FloatingWindow * pWin, const tools::Rectangle& rRect, FloatWinPopupFlags nFlags) { // do not use native popup menu when AQUA_NATIVE_MENUS is set to false if( ! VisibleMenuBar() ) { @@ -854,26 +854,26 @@ void AquaSalMenu::RemoveMenuBarButton( sal_uInt16 i_nId ) statusLayout(); } -Rectangle AquaSalMenu::GetMenuBarButtonRectPixel( sal_uInt16 i_nItemId, SalFrame* i_pReferenceFrame ) +tools::Rectangle AquaSalMenu::GetMenuBarButtonRectPixel( sal_uInt16 i_nItemId, SalFrame* i_pReferenceFrame ) { if( ! i_pReferenceFrame || ! AquaSalFrame::isAlive( static_cast<AquaSalFrame*>(i_pReferenceFrame) ) ) - return Rectangle(); + return tools::Rectangle(); MenuBarButtonEntry* pEntry = findButtonItem( i_nItemId ); if( ! pEntry ) - return Rectangle(); + return tools::Rectangle(); NSStatusItem* pItem = SalData::getStatusItem(); if( ! pItem ) - return Rectangle(); + return tools::Rectangle(); NSView* pNSView = [pItem view]; if( ! pNSView ) - return Rectangle(); + return tools::Rectangle(); NSWindow* pNSWin = [pNSView window]; if( ! pNSWin ) - return Rectangle(); + return tools::Rectangle(); NSRect aRect = [pNSWin convertRectToScreen:[pNSWin frame]]; @@ -882,7 +882,7 @@ Rectangle AquaSalMenu::GetMenuBarButtonRectPixel( sal_uInt16 i_nItemId, SalFrame aRect.origin.x -= i_pReferenceFrame->maGeometry.nX; aRect.origin.y -= i_pReferenceFrame->maGeometry.nY + aRect.size.height; - return Rectangle( Point(static_cast<long int>(aRect.origin.x), + return tools::Rectangle( Point(static_cast<long int>(aRect.origin.x), static_cast<long int>(aRect.origin.y) ), Size( static_cast<long int>(aRect.size.width), diff --git a/vcl/osx/salnativewidgets.cxx b/vcl/osx/salnativewidgets.cxx index 31824cd754a1..7c91d058c292 100644 --- a/vcl/osx/salnativewidgets.cxx +++ b/vcl/osx/salnativewidgets.cxx @@ -47,9 +47,9 @@ class AquaBlinker : public Timer { AquaSalFrame* mpFrame; - Rectangle maInvalidateRect; + tools::Rectangle maInvalidateRect; - AquaBlinker( AquaSalFrame* pFrame, const Rectangle& rRect ) + AquaBlinker( AquaSalFrame* pFrame, const tools::Rectangle& rRect ) : mpFrame( pFrame ), maInvalidateRect( rRect ) { mpFrame->maBlinkers.push_back( this ); @@ -57,7 +57,7 @@ class AquaBlinker : public Timer public: - static void Blink( AquaSalFrame*, const Rectangle&, int nTimeout = 80 ); + static void Blink( AquaSalFrame*, const tools::Rectangle&, int nTimeout = 80 ); virtual void Invoke() override { @@ -71,7 +71,7 @@ class AquaBlinker : public Timer } }; -void AquaBlinker::Blink( AquaSalFrame* pFrame, const Rectangle& rRect, int nTimeout ) +void AquaBlinker::Blink( AquaSalFrame* pFrame, const tools::Rectangle& rRect, int nTimeout ) { // prevent repeated paints from triggering themselves all the time for( std::list< AquaBlinker* >::const_iterator it = pFrame->maBlinkers.begin(); @@ -87,7 +87,7 @@ void AquaBlinker::Blink( AquaSalFrame* pFrame, const Rectangle& rRect, int nTime // Helper returns an HIRect -static HIRect ImplGetHIRectFromRectangle(Rectangle aRect) +static HIRect ImplGetHIRectFromRectangle(tools::Rectangle aRect) { HIRect aHIRect; aHIRect.origin.x = static_cast<float>(aRect.Left()); @@ -118,7 +118,7 @@ static ThemeButtonValue ImplGetButtonValue( ButtonValue aButtonValue ) } static bool AquaGetScrollRect( /* TODO: int nScreen, */ ControlPart nPart, - const Rectangle& rControlRect, Rectangle& rResultRect ) + const tools::Rectangle& rControlRect, tools::Rectangle& rResultRect ) { bool bRetVal = true; rResultRect = rControlRect; @@ -285,12 +285,12 @@ bool AquaSalGraphics::IsNativeControlSupported( ControlType nType, ControlPart n return bOk; } -bool AquaSalGraphics::hitTestNativeControl( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion, +bool AquaSalGraphics::hitTestNativeControl( ControlType nType, ControlPart nPart, const tools::Rectangle& rControlRegion, const Point& rPos, bool& rIsInside ) { if ( nType == ControlType::Scrollbar ) { - Rectangle aRect; + tools::Rectangle aRect; bool bValid = AquaGetScrollRect( /* TODO: m_nScreen */ nPart, rControlRegion, aRect ); rIsInside = bValid && aRect.IsInside( rPos ); return bValid; @@ -334,7 +334,7 @@ UInt32 AquaSalGraphics::getTrackState( ControlState nState ) bool AquaSalGraphics::drawNativeControl(ControlType nType, ControlPart nPart, - const Rectangle& rControlRegion, + const tools::Rectangle& rControlRegion, ControlState nState, const ImplControlValue& aValue, const OUString& ) @@ -346,7 +346,7 @@ bool AquaSalGraphics::drawNativeControl(ControlType nType, CGContextSaveGState( mrContext ); - Rectangle buttonRect = rControlRegion; + tools::Rectangle buttonRect = rControlRegion; HIRect rc = ImplGetHIRectFromRectangle(buttonRect); switch( nType ) @@ -938,7 +938,7 @@ bool AquaSalGraphics::drawNativeControl(ControlType nType, else if((nUpperState & ControlState::ROLLOVER)||(nLowerState & ControlState::ROLLOVER)) aSpinInfo.state = kThemeStateRollover; - Rectangle aSpinRect( pSpinButtonVal->maUpperRect ); + tools::Rectangle aSpinRect( pSpinButtonVal->maUpperRect ); aSpinRect.Union( pSpinButtonVal->maLowerRect ); HIRect buttonRc = ImplGetHIRectFromRectangle(aSpinRect); @@ -1034,7 +1034,7 @@ bool AquaSalGraphics::drawNativeControl(ControlType nType, if( mxClipPath ) aRect = CGPathGetBoundingBox( mxClipPath ); if( aRect.size.width != 0 && aRect.size.height != 0 ) - buttonRect.Intersection( Rectangle( Point( static_cast<long int>(aRect.origin.x), + buttonRect.Intersection( tools::Rectangle( Point( static_cast<long int>(aRect.origin.x), static_cast<long int>(aRect.origin.y) ), Size( static_cast<long int>(aRect.size.width), static_cast<long int>(aRect.size.height) ) ) ); @@ -1045,14 +1045,14 @@ bool AquaSalGraphics::drawNativeControl(ControlType nType, return bOK; } -bool AquaSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion, ControlState /*nState*/, +bool AquaSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPart, const tools::Rectangle& rControlRegion, ControlState /*nState*/, const ImplControlValue& aValue, const OUString&, - Rectangle &rNativeBoundingRegion, Rectangle &rNativeContentRegion ) + tools::Rectangle &rNativeBoundingRegion, tools::Rectangle &rNativeContentRegion ) { bool toReturn = false; - Rectangle aCtrlBoundRect( rControlRegion ); + tools::Rectangle aCtrlBoundRect( rControlRegion ); short x = aCtrlBoundRect.Left(); short y = aCtrlBoundRect.Top(); short w, h; @@ -1067,14 +1067,14 @@ bool AquaSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPa { w = 19; // taken from HIG h = aCtrlBoundRect.GetHeight(); - rNativeBoundingRegion = rNativeContentRegion = Rectangle( Point( x, y ), Size( w, h ) ); + rNativeBoundingRegion = rNativeContentRegion = tools::Rectangle( Point( x, y ), Size( w, h ) ); toReturn = true; } else if( nPart == ControlPart::ThumbVert ) { w = aCtrlBoundRect.GetWidth(); h = 18; // taken from HIG - rNativeBoundingRegion = rNativeContentRegion = Rectangle( Point( x, y ), Size( w, h ) ); + rNativeBoundingRegion = rNativeContentRegion = tools::Rectangle( Point( x, y ), Size( w, h ) ); toReturn = true; } } @@ -1082,7 +1082,7 @@ bool AquaSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPa case ControlType::Scrollbar: { - Rectangle aRect; + tools::Rectangle aRect; if( AquaGetScrollRect( /* m_nScreen */ nPart, aCtrlBoundRect, aRect ) ) { toReturn = true; @@ -1112,15 +1112,15 @@ bool AquaSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPa } - rNativeContentRegion = Rectangle( Point( x, y ), Size( w, h + nBorderCleanup) ); - rNativeBoundingRegion = Rectangle( Point( x, y ), Size( w, h ) ); + rNativeContentRegion = tools::Rectangle( Point( x, y ), Size( w, h + nBorderCleanup) ); + rNativeBoundingRegion = tools::Rectangle( Point( x, y ), Size( w, h ) ); toReturn = true; } break; case ControlType::Progress: { - Rectangle aRect( aCtrlBoundRect ); + tools::Rectangle aRect( aCtrlBoundRect ); if( aRect.GetHeight() < 16 ) aRect.Bottom() = aRect.Top() + 9; // values taken from HIG for medium progress else @@ -1133,7 +1133,7 @@ bool AquaSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPa case ControlType::IntroProgress: { - Rectangle aRect( aCtrlBoundRect ); + tools::Rectangle aRect( aCtrlBoundRect ); aRect.Bottom() = aRect.Top() + INTRO_PROGRESS_HEIGHT; // values taken from HIG for medium progress rNativeBoundingRegion = aRect; rNativeContentRegion = aRect; @@ -1146,8 +1146,8 @@ bool AquaSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPa w = aCtrlBoundRect.GetWidth() + 2*TAB_TEXT_OFFSET - 2*VCL_TAB_TEXT_OFFSET; h = TAB_HEIGHT_NORMAL+2; - rNativeContentRegion = Rectangle( Point( x, y ), Size( w, h ) ); - rNativeBoundingRegion = Rectangle( Point( x, y ), Size( w, h ) ); + rNativeContentRegion = tools::Rectangle( Point( x, y ), Size( w, h ) ); + rNativeBoundingRegion = tools::Rectangle( Point( x, y ), Size( w, h ) ); toReturn = true; @@ -1162,8 +1162,8 @@ bool AquaSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPa if( h < aCtrlBoundRect.GetHeight() ) h = aCtrlBoundRect.GetHeight(); - rNativeContentRegion = Rectangle( Point( x+FOCUS_RING_WIDTH, y+FOCUS_RING_WIDTH ), Size( w-2*(FOCUS_RING_WIDTH+1), h-2*(FOCUS_RING_WIDTH+1) ) ); - rNativeBoundingRegion = Rectangle( Point( x, y ), Size( w, h ) ); + rNativeContentRegion = tools::Rectangle( Point( x+FOCUS_RING_WIDTH, y+FOCUS_RING_WIDTH ), Size( w-2*(FOCUS_RING_WIDTH+1), h-2*(FOCUS_RING_WIDTH+1) ) ); + rNativeBoundingRegion = tools::Rectangle( Point( x, y ), Size( w, h ) ); toReturn = true; } @@ -1176,8 +1176,8 @@ bool AquaSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPa w = aCtrlBoundRect.GetWidth(); h = COMBOBOX_HEIGHT_NORMAL;//listboxes and comboxes have the same height - rNativeContentRegion = Rectangle( Point( x+FOCUS_RING_WIDTH, y+FOCUS_RING_WIDTH ), Size( w-2*FOCUS_RING_WIDTH, h ) ); - rNativeBoundingRegion = Rectangle( Point( x, y ), Size( w, h+2*FOCUS_RING_WIDTH ) ); + rNativeContentRegion = tools::Rectangle( Point( x+FOCUS_RING_WIDTH, y+FOCUS_RING_WIDTH ), Size( w-2*FOCUS_RING_WIDTH, h ) ); + rNativeBoundingRegion = tools::Rectangle( Point( x, y ), Size( w, h+2*FOCUS_RING_WIDTH ) ); toReturn = true; } @@ -1192,8 +1192,8 @@ bool AquaSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPa y += FOCUS_RING_WIDTH; w = DROPDOWN_BUTTON_WIDTH; - rNativeContentRegion = Rectangle( Point( x, y ), Size( w, h ) ); - rNativeBoundingRegion = Rectangle( Point( x, y ), Size( w+FOCUS_RING_WIDTH, h+2*FOCUS_RING_WIDTH ) ); + rNativeContentRegion = tools::Rectangle( Point( x, y ), Size( w, h ) ); + rNativeBoundingRegion = tools::Rectangle( Point( x, y ), Size( w+FOCUS_RING_WIDTH, h+2*FOCUS_RING_WIDTH ) ); toReturn = true; } @@ -1211,8 +1211,8 @@ bool AquaSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPa w -= 9; // HIG specifies 9 units distance between dropdown button area and content h -= 4; // don't draw into lower border - rNativeContentRegion = Rectangle( Point( x, y ), Size( w, h ) ); - rNativeBoundingRegion = Rectangle( Point( x, y ), Size( w+FOCUS_RING_WIDTH, h+2*FOCUS_RING_WIDTH ) ); + rNativeContentRegion = tools::Rectangle( Point( x, y ), Size( w, h ) ); + rNativeBoundingRegion = tools::Rectangle( Point( x, y ), Size( w+FOCUS_RING_WIDTH, h+2*FOCUS_RING_WIDTH ) ); toReturn = true; } @@ -1225,8 +1225,8 @@ bool AquaSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPa w = 3+2*FOCUS_RING_WIDTH+SPIN_BUTTON_SPACE+SPIN_BUTTON_WIDTH; h = TEXT_EDIT_HEIGHT_NORMAL; - rNativeContentRegion = Rectangle( Point( x+FOCUS_RING_WIDTH, y ), Size( w-2*FOCUS_RING_WIDTH, h ) ); - rNativeBoundingRegion = Rectangle( Point( x, y ), Size( w, h+2*FOCUS_RING_WIDTH ) ); + rNativeContentRegion = tools::Rectangle( Point( x+FOCUS_RING_WIDTH, y ), Size( w-2*FOCUS_RING_WIDTH, h ) ); + rNativeBoundingRegion = tools::Rectangle( Point( x, y ), Size( w, h+2*FOCUS_RING_WIDTH ) ); toReturn = true; } @@ -1238,8 +1238,8 @@ bool AquaSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPa w -= 8; // offset for left and right rounded border h -= 4; // don't draw into upper or lower border - rNativeContentRegion = Rectangle( Point( x + FOCUS_RING_WIDTH, y + FOCUS_RING_WIDTH ), Size( w - 2* FOCUS_RING_WIDTH, h ) ); - rNativeBoundingRegion = Rectangle( Point( x, y ), Size( w, h+2*FOCUS_RING_WIDTH ) ); + rNativeContentRegion = tools::Rectangle( Point( x + FOCUS_RING_WIDTH, y + FOCUS_RING_WIDTH ), Size( w - 2* FOCUS_RING_WIDTH, h ) ); + rNativeBoundingRegion = tools::Rectangle( Point( x, y ), Size( w, h+2*FOCUS_RING_WIDTH ) ); toReturn = true; } @@ -1252,8 +1252,8 @@ bool AquaSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPa w = SPIN_BUTTON_WIDTH + 2*CLIP_FUZZ; h = SPIN_UPPER_BUTTON_HEIGHT + 2*CLIP_FUZZ; - rNativeContentRegion = Rectangle( Point( x, y ), Size( w, h ) ); - rNativeBoundingRegion = Rectangle( Point( x, y ), Size( w, h ) ); + rNativeContentRegion = tools::Rectangle( Point( x, y ), Size( w, h ) ); + rNativeBoundingRegion = tools::Rectangle( Point( x, y ), Size( w, h ) ); toReturn = true; } @@ -1263,8 +1263,8 @@ bool AquaSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPa w = SPIN_BUTTON_WIDTH + 2*CLIP_FUZZ; h = SPIN_LOWER_BUTTON_HEIGHT + 2*CLIP_FUZZ; - rNativeContentRegion = Rectangle( Point( x, y ), Size( w, h ) ); - rNativeBoundingRegion = Rectangle( Point( x, y ), Size( w, h ) ); + rNativeContentRegion = tools::Rectangle( Point( x, y ), Size( w, h ) ); + rNativeBoundingRegion = tools::Rectangle( Point( x, y ), Size( w, h ) ); toReturn = true; } @@ -1276,7 +1276,7 @@ bool AquaSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPa if( ( nPart == ControlPart::Border ) && !( nFlags & (DrawFrameFlags::Menu | DrawFrameFlags::WindowBorder | DrawFrameFlags::BorderWindowBorder) ) ) { - Rectangle aRect(aCtrlBoundRect); + tools::Rectangle aRect(aCtrlBoundRect); if( nStyle == DrawFrameStyle::DoubleIn ) { aRect.Left() += 1; @@ -1308,8 +1308,8 @@ bool AquaSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPa w=10; h=10;//dimensions of the mark (10px font) - rNativeContentRegion = Rectangle( Point( x, y ), Size( w, h ) ); - rNativeBoundingRegion = Rectangle( Point( x, y ), Size( w, h ) ); + rNativeContentRegion = tools::Rectangle( Point( x, y ), Size( w, h ) ); + rNativeBoundingRegion = tools::Rectangle( Point( x, y ), Size( w, h ) ); toReturn = true; } diff --git a/vcl/osx/salsys.cxx b/vcl/osx/salsys.cxx index c4d454abed93..e7870ef79bd3 100644 --- a/vcl/osx/salsys.cxx +++ b/vcl/osx/salsys.cxx @@ -38,10 +38,10 @@ unsigned int AquaSalSystem::GetDisplayScreenCount() return pScreens ? [pScreens count] : 1; } -Rectangle AquaSalSystem::GetDisplayScreenPosSizePixel( unsigned int nScreen ) +tools::Rectangle AquaSalSystem::GetDisplayScreenPosSizePixel( unsigned int nScreen ) { NSArray* pScreens = [NSScreen screens]; - Rectangle aRet; + tools::Rectangle aRet; NSScreen* pScreen = nil; if( pScreens && nScreen < [pScreens count] ) pScreen = [pScreens objectAtIndex: nScreen]; @@ -51,7 +51,7 @@ Rectangle AquaSalSystem::GetDisplayScreenPosSizePixel( unsigned int nScreen ) if( pScreen ) { NSRect aFrame = [pScreen frame]; - aRet = Rectangle( Point( static_cast<long int>(aFrame.origin.x), static_cast<long int>(aFrame.origin.y) ), + aRet = tools::Rectangle( Point( static_cast<long int>(aFrame.origin.x), static_cast<long int>(aFrame.origin.y) ), Size( static_cast<long int>(aFrame.size.width), static_cast<long int>(aFrame.size.height) ) ); } return aRet; diff --git a/vcl/qa/cppunit/BitmapTest.cxx b/vcl/qa/cppunit/BitmapTest.cxx index f6d69d6cba5d..f55a5b607617 100644 --- a/vcl/qa/cppunit/BitmapTest.cxx +++ b/vcl/qa/cppunit/BitmapTest.cxx @@ -112,8 +112,8 @@ void BitmapTest::testScale() Bitmap::ScopedWriteAccess aWriteAccess(aBitmap24Bit); aWriteAccess->Erase(COL_WHITE); aWriteAccess->SetLineColor(COL_BLACK); - aWriteAccess->DrawRect(Rectangle(1, 1, 8, 8)); - aWriteAccess->DrawRect(Rectangle(3, 3, 6, 6)); + aWriteAccess->DrawRect(tools::Rectangle(1, 1, 8, 8)); + aWriteAccess->DrawRect(tools::Rectangle(3, 3, 6, 6)); } BitmapSymmetryCheck aBitmapSymmetryCheck; diff --git a/vcl/qa/cppunit/canvasbitmaptest.cxx b/vcl/qa/cppunit/canvasbitmaptest.cxx index ff3479cdce13..211a75b1ab57 100644 --- a/vcl/qa/cppunit/canvasbitmaptest.cxx +++ b/vcl/qa/cppunit/canvasbitmaptest.cxx @@ -656,7 +656,7 @@ void CanvasBitmapTest::runTest() aWhite = Color(COL_WHITE); } pAcc->SetFillColor(COL_GREEN); - pAcc->FillRect(Rectangle(0,0,100,100)); + pAcc->FillRect(tools::Rectangle(0,0,100,100)); pAcc->SetPixel(0,0,aWhite); pAcc->SetPixel(0,1,aBlack); pAcc->SetPixel(0,2,aWhite); @@ -674,7 +674,7 @@ void CanvasBitmapTest::runTest() if( pAcc.get() ) { pAcc->SetFillColor(COL_BLACK); - pAcc->FillRect(Rectangle(0,0,100,100)); + pAcc->FillRect(tools::Rectangle(0,0,100,100)); pAcc->SetPixel(0,0,BitmapColor(1)); pAcc->SetPixel(0,1,BitmapColor(0)); pAcc->SetPixel(0,2,BitmapColor(1)); @@ -692,7 +692,7 @@ void CanvasBitmapTest::runTest() if( pAcc ) { pAcc->SetFillColor(COL_BLACK); - pAcc->FillRect(Rectangle(0,0,100,100)); + pAcc->FillRect(tools::Rectangle(0,0,100,100)); pAcc->SetPixel(0,0,BitmapColor(255)); pAcc->SetPixel(0,1,BitmapColor(0)); pAcc->SetPixel(0,2,BitmapColor(255)); diff --git a/vcl/qa/cppunit/complextext.cxx b/vcl/qa/cppunit/complextext.cxx index f785b4a60591..f2c33363fb92 100644 --- a/vcl/qa/cppunit/complextext.cxx +++ b/vcl/qa/cppunit/complextext.cxx @@ -85,20 +85,20 @@ void VclComplexTextTest::testArabic() // exact bounding rectangle, not essentially the same as text width/height #if defined(MACOSX) || defined(_WIN32) // FIXME: fails on some Linux tinderboxes, might be a FreeType issue. - Rectangle aBoundRect; + tools::Rectangle aBoundRect; pOutDev->GetTextBoundRect(aBoundRect, aOneTwoThree); - CPPUNIT_ASSERT_EQUAL(Rectangle(0, 1, 71, 15), aBoundRect); + CPPUNIT_ASSERT_EQUAL(tools::Rectangle(0, 1, 71, 15), aBoundRect); #endif // normal orientation - Rectangle aInput; - Rectangle aRect = pOutDev->GetTextRect( aInput, aOneTwoThree ); + tools::Rectangle aInput; + tools::Rectangle aRect = pOutDev->GetTextRect( aInput, aOneTwoThree ); // now rotate 270 degress vcl::Font aRotated( aFont ); aRotated.SetOrientation( 2700 ); pOutDev->SetFont( aRotated ); - Rectangle aRectRot = pOutDev->GetTextRect( aInput, aOneTwoThree ); + tools::Rectangle aRectRot = pOutDev->GetTextRect( aInput, aOneTwoThree ); // Check that we did do the rotation ... #if 0 diff --git a/vcl/qa/cppunit/svm/svmtest.cxx b/vcl/qa/cppunit/svm/svmtest.cxx index f90b1992d536..619fa07e684d 100644 --- a/vcl/qa/cppunit/svm/svmtest.cxx +++ b/vcl/qa/cppunit/svm/svmtest.cxx @@ -343,7 +343,7 @@ void SvmTest::testRect() pVirtualDev->SetLineColor(Color(0x123456)); pVirtualDev->SetFillColor(Color(0x654321)); - pVirtualDev->DrawRect(Rectangle(Point(1, 2), Size(4, 4))); + pVirtualDev->DrawRect(tools::Rectangle(Point(1, 2), Size(4, 4))); checkRect(writeAndRead(aGDIMetaFile, "rect.svm")); } @@ -371,7 +371,7 @@ void SvmTest::testRoundRect() pVirtualDev->SetLineColor(Color(0x123456)); pVirtualDev->SetFillColor(Color(0x654321)); - pVirtualDev->DrawRect(Rectangle(Point(1, 2), Size(4, 4)), 1, 2); + pVirtualDev->DrawRect(tools::Rectangle(Point(1, 2), Size(4, 4)), 1, 2); checkRoundRect(writeAndRead(aGDIMetaFile, "roundrect.svm")); } @@ -398,7 +398,7 @@ void SvmTest::testEllipse() pVirtualDev->SetLineColor(Color(0x123456)); pVirtualDev->SetFillColor(Color(0x654321)); - pVirtualDev->DrawEllipse(Rectangle(Point(1, 2), Size(4, 4))); + pVirtualDev->DrawEllipse(tools::Rectangle(Point(1, 2), Size(4, 4))); checkEllipse(writeAndRead(aGDIMetaFile, "ellipse.svm")); } @@ -428,7 +428,7 @@ void SvmTest::testArc() pVirtualDev->SetLineColor(Color(0x123456)); pVirtualDev->SetFillColor(Color(0x654321)); - pVirtualDev->DrawArc(Rectangle(Point(1, 2), Size(4, 4)), Point(10, 11), Point(12, 13)); + pVirtualDev->DrawArc(tools::Rectangle(Point(1, 2), Size(4, 4)), Point(10, 11), Point(12, 13)); checkArc(writeAndRead(aGDIMetaFile, "arc.svm")); } @@ -458,7 +458,7 @@ void SvmTest::testPie() pVirtualDev->SetLineColor(Color(0x123456)); pVirtualDev->SetFillColor(Color(0x654321)); - pVirtualDev->DrawPie(Rectangle(Point(11, 12), Size(4, 4)), Point(20, 21), Point(22, 23)); + pVirtualDev->DrawPie(tools::Rectangle(Point(11, 12), Size(4, 4)), Point(20, 21), Point(22, 23)); checkPie(writeAndRead(aGDIMetaFile, "pie.svm")); } @@ -488,7 +488,7 @@ void SvmTest::testChord() pVirtualDev->SetLineColor(Color(0x123456)); pVirtualDev->SetFillColor(Color(0x654321)); - pVirtualDev->DrawChord(Rectangle(Point(21, 22), Size(4, 4)), Point(30, 31), Point(32, 33)); + pVirtualDev->DrawChord(tools::Rectangle(Point(21, 22), Size(4, 4)), Point(30, 31), Point(32, 33)); checkChord(writeAndRead(aGDIMetaFile, "chord.svm")); } @@ -729,7 +729,7 @@ void SvmTest::testTextRect() GDIMetaFile aGDIMetaFile; ScopedVclPtrInstance<VirtualDevice> pVirtualDev; setupBaseVirtualDevice(*pVirtualDev.get(), aGDIMetaFile); - pVirtualDev->DrawText(Rectangle(Point(0,0), Size(5,5)), "123456", DrawTextFlags::Center); + pVirtualDev->DrawText(tools::Rectangle(Point(0,0), Size(5,5)), "123456", DrawTextFlags::Center); checkTextRect(writeAndRead(aGDIMetaFile, "textrectangle.svm")); } diff --git a/vcl/quartz/ctfonts.cxx b/vcl/quartz/ctfonts.cxx index 42e1169a37aa..7c5b528634d5 100644 --- a/vcl/quartz/ctfonts.cxx +++ b/vcl/quartz/ctfonts.cxx @@ -152,7 +152,7 @@ SAL_WNODEPRECATED_DECLARATIONS_POP } } -bool CoreTextStyle::GetGlyphBoundRect(const GlyphItem& rGlyph, Rectangle& rRect ) const +bool CoreTextStyle::GetGlyphBoundRect(const GlyphItem& rGlyph, tools::Rectangle& rRect ) const { CGGlyph nCGGlyph = rGlyph.maGlyphId; CTFontRef aCTFontRef = static_cast<CTFontRef>(CFDictionaryGetValue( mpStyleDict, kCTFontAttributeName )); @@ -170,7 +170,7 @@ bool CoreTextStyle::GetGlyphBoundRect(const GlyphItem& rGlyph, Rectangle& rRect long yMin = floor(aCGRect.origin.y); long xMax = ceil(aCGRect.origin.x + aCGRect.size.width); long yMax = ceil(aCGRect.origin.y + aCGRect.size.height); - rRect = Rectangle(xMin, -yMax, xMax, -yMin); + rRect = tools::Rectangle(xMin, -yMax, xMax, -yMin); return true; } diff --git a/vcl/quartz/salgdi.cxx b/vcl/quartz/salgdi.cxx index 5c24d2290937..e998403fe6ac 100644 --- a/vcl/quartz/salgdi.cxx +++ b/vcl/quartz/salgdi.cxx @@ -389,7 +389,7 @@ bool AquaSalGraphics::GetGlyphOutline(const GlyphItem& rGlyph, basegfx::B2DPolyP return false; } -bool AquaSalGraphics::GetGlyphBoundRect(const GlyphItem& rGlyph, Rectangle& rRect ) +bool AquaSalGraphics::GetGlyphBoundRect(const GlyphItem& rGlyph, tools::Rectangle& rRect ) { const int nFallbackLevel = rGlyph.mnFallbackLevel; if (nFallbackLevel < MAX_FALLBACK && mpTextStyle[nFallbackLevel]) @@ -856,7 +856,7 @@ void AquaSalGraphics::RefreshRect(float lX, float lY, float lWidth, float lHeigh // Rounding down x and width can accumulate a rounding error of up to 2 // The decrementing of x, the rounding error and the antialiasing border // require that the width and the height need to be increased by four - const Rectangle aVclRect(Point(static_cast<long int>(lX-1), + const tools::Rectangle aVclRect(Point(static_cast<long int>(lX-1), static_cast<long int>(lY-1) ), Size( static_cast<long int>(lWidth+4), static_cast<long int>(lHeight+4) ) ); diff --git a/vcl/quartz/salgdicommon.cxx b/vcl/quartz/salgdicommon.cxx index 11d831bd861b..2f36c76d4303 100644 --- a/vcl/quartz/salgdicommon.cxx +++ b/vcl/quartz/salgdicommon.cxx @@ -237,7 +237,7 @@ bool AquaSalGraphics::CreateFontSubset( const OUString& rToFile, rInfo.m_nFontType = FontType::SFNT_TTF; rInfo.m_aPSName = OUString( aTTInfo.psname, std::strlen(aTTInfo.psname), RTL_TEXTENCODING_UTF8 ); - rInfo.m_aFontBBox = Rectangle( Point( aTTInfo.xMin, aTTInfo.yMin ), + rInfo.m_aFontBBox = tools::Rectangle( Point( aTTInfo.xMin, aTTInfo.yMin ), Point( aTTInfo.xMax, aTTInfo.yMax ) ); rInfo.m_nCapHeight = aTTInfo.yMax; // Well ... rInfo.m_nAscent = aTTInfo.winAscent; @@ -895,7 +895,7 @@ void AquaSalGraphics::drawLine( long nX1, long nY1, long nX2, long nY2 ) SAL_INFO( "vcl.cg", "CGContextDrawPath(" << mrContext << ",kCGPathStroke)" ); CGContextDrawPath( mrContext, kCGPathStroke ); - Rectangle aRefreshRect( nX1, nY1, nX2, nY2 ); + tools::Rectangle aRefreshRect( nX1, nY1, nX2, nY2 ); (void) aRefreshRect; // Is a call to RefreshRect( aRefreshRect ) missing here? diff --git a/vcl/source/app/help.cxx b/vcl/source/app/help.cxx index e6f3c8a4f215..39980c25a501 100644 --- a/vcl/source/app/help.cxx +++ b/vcl/source/app/help.cxx @@ -148,7 +148,7 @@ bool Help::IsBalloonHelpEnabled() } bool Help::ShowBalloon( vcl::Window* pParent, - const Point& rScreenPos, const Rectangle& rRect, + const Point& rScreenPos, const tools::Rectangle& rRect, const OUString& rHelpText ) { ImplShowHelpWindow( pParent, HELPWINSTYLE_BALLOON, QuickHelpFlags::NONE, @@ -173,7 +173,7 @@ bool Help::IsQuickHelpEnabled() } bool Help::ShowQuickHelp( vcl::Window* pParent, - const Rectangle& rScreenRect, + const tools::Rectangle& rScreenRect, const OUString& rHelpText, const OUString& rLongHelpText, QuickHelpFlags nStyle ) @@ -192,7 +192,7 @@ void Help::HideBalloonAndQuickHelp() ImplDestroyHelpWindow( bIsVisible ); } -sal_uIntPtr Help::ShowPopover(vcl::Window* pParent, const Rectangle& rScreenRect, +sal_uIntPtr Help::ShowPopover(vcl::Window* pParent, const tools::Rectangle& rScreenRect, const OUString& rText, QuickHelpFlags nStyle) { sal_uIntPtr nId = pParent->ImplGetFrame()->ShowPopover(rText, rScreenRect, nStyle); @@ -212,7 +212,7 @@ sal_uIntPtr Help::ShowPopover(vcl::Window* pParent, const Rectangle& rScreenRect return nId; } -void Help::UpdatePopover(sal_uIntPtr nId, vcl::Window* pParent, const Rectangle& rScreenRect, +void Help::UpdatePopover(sal_uIntPtr nId, vcl::Window* pParent, const tools::Rectangle& rScreenRect, const OUString& rText) { if (pParent->ImplGetFrame()->UpdatePopover(nId, rText, rScreenRect)) @@ -343,7 +343,7 @@ void HelpTextWindow::SetHelpText( const OUString& rHelpText ) aSize.Width() = GetCtrlTextWidth( maHelpText ); else aSize.Width() = GetTextWidth( maHelpText ); - maTextRect = Rectangle( Point( HELPTEXTMARGIN_QUICK, HELPTEXTMARGIN_QUICK ), aSize ); + maTextRect = tools::Rectangle( Point( HELPTEXTMARGIN_QUICK, HELPTEXTMARGIN_QUICK ), aSize ); } else // HELPWINSTYLE_BALLOON { @@ -355,12 +355,12 @@ void HelpTextWindow::SetHelpText( const OUString& rHelpText ) OUString aXXX = aBuf.makeStringAndClear(); long nWidth = GetTextWidth( aXXX ); Size aTmpSize( nWidth, 0x7FFFFFFF ); - Rectangle aTry1( aTmpPoint, aTmpSize ); + tools::Rectangle aTry1( aTmpPoint, aTmpSize ); DrawTextFlags nDrawFlags = DrawTextFlags::MultiLine | DrawTextFlags::WordBreak | DrawTextFlags::Left | DrawTextFlags::Top; if ( mnStyle & QuickHelpFlags::CtrlText ) nDrawFlags |= DrawTextFlags::Mnemonic; - Rectangle aTextRect = GetTextRect( aTry1, maHelpText, nDrawFlags ); + tools::Rectangle aTextRect = GetTextRect( aTry1, maHelpText, nDrawFlags ); // get a better width later... maTextRect = aTextRect; @@ -381,13 +381,13 @@ void HelpTextWindow::ImplShow() Update(); } -void HelpTextWindow::Paint( vcl::RenderContext& rRenderContext, const Rectangle& ) +void HelpTextWindow::Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& ) { // paint native background bool bNativeOK = false; if (rRenderContext.IsNativeControlSupported(ControlType::Tooltip, ControlPart::Entire)) { - Rectangle aCtrlRegion(Point(0, 0), GetOutputSizePixel()); + tools::Rectangle aCtrlRegion(Point(0, 0), GetOutputSizePixel()); ImplControlValue aControlValue; bNativeOK = rRenderContext.DrawNativeControl(ControlType::Tooltip, ControlPart::Entire, aCtrlRegion, ControlState::NONE, aControlValue, OUString()); @@ -414,14 +414,14 @@ void HelpTextWindow::Paint( vcl::RenderContext& rRenderContext, const Rectangle& if (!bNativeOK) { Size aSz = GetOutputSizePixel(); - rRenderContext.DrawRect(Rectangle(Point(), aSz)); + rRenderContext.DrawRect(tools::Rectangle(Point(), aSz)); if (mnHelpWinStyle == HELPWINSTYLE_BALLOON) { aSz.Width() -= 2; aSz.Height() -= 2; Color aColor(rRenderContext.GetLineColor()); rRenderContext.SetLineColor(COL_GRAY); - rRenderContext.DrawRect(Rectangle(Point(1, 1), aSz)); + rRenderContext.DrawRect(tools::Rectangle(Point(1, 1), aSz)); rRenderContext.SetLineColor(aColor); } } @@ -493,7 +493,7 @@ OUString HelpTextWindow::GetText() const void ImplShowHelpWindow( vcl::Window* pParent, sal_uInt16 nHelpWinStyle, QuickHelpFlags nStyle, const OUString& rHelpText, const OUString& rStatusText, - const Point& rScreenPos, const Rectangle& rHelpArea ) + const Point& rScreenPos, const tools::Rectangle& rHelpArea ) { if (pParent->ImplGetFrame()->ShowTooltip(rHelpText, rHelpArea)) { @@ -533,7 +533,7 @@ void ImplShowHelpWindow( vcl::Window* pParent, sal_uInt16 nHelpWinStyle, QuickHe if (bTextChanged) { vcl::Window * pWindow = pHelpWin->GetParent()->ImplGetFrameWindow(); - Rectangle aInvRect( pHelpWin->GetWindowExtentsRelative( pWindow ) ); + tools::Rectangle aInvRect( pHelpWin->GetWindowExtentsRelative( pWindow ) ); if( pHelpWin->IsVisible() ) pWindow->Invalidate( aInvRect ); @@ -578,7 +578,7 @@ void ImplDestroyHelpWindow( bool bUpdateHideTime ) { vcl::Window * pWindow = pHelpWin->GetParent()->ImplGetFrameWindow(); // find out screen area covered by system help window - Rectangle aInvRect( pHelpWin->GetWindowExtentsRelative( pWindow ) ); + tools::Rectangle aInvRect( pHelpWin->GetWindowExtentsRelative( pWindow ) ); if( pHelpWin->IsVisible() ) pWindow->Invalidate( aInvRect ); pSVData->maHelpData.mpHelpWin = nullptr; @@ -591,11 +591,11 @@ void ImplDestroyHelpWindow( bool bUpdateHideTime ) } void ImplSetHelpWindowPos( vcl::Window* pHelpWin, sal_uInt16 nHelpWinStyle, QuickHelpFlags nStyle, - const Point& rPos, const Rectangle& rHelpArea ) + const Point& rPos, const tools::Rectangle& rHelpArea ) { Point aPos = rPos; Size aSz = pHelpWin->GetSizePixel(); - Rectangle aScreenRect = pHelpWin->ImplGetFrameWindow()->GetDesktopRectPixel(); + tools::Rectangle aScreenRect = pHelpWin->ImplGetFrameWindow()->GetDesktopRectPixel(); aPos = pHelpWin->GetParent()->ImplGetFrameWindow()->OutputToAbsoluteScreenPixel( aPos ); // get mouse screen coords Point aMousePos( pHelpWin->GetParent()->ImplGetFrameWindow()->GetPointerPosPixel() ); @@ -627,7 +627,7 @@ void ImplSetHelpWindowPos( vcl::Window* pHelpWin, sal_uInt16 nHelpWinStyle, Quic if ( nStyle & QuickHelpFlags::NoAutoPos ) { // convert help area to screen coords - Rectangle devHelpArea( + tools::Rectangle devHelpArea( pHelpWin->GetParent()->ImplGetFrameWindow()->OutputToAbsoluteScreenPixel( rHelpArea.TopLeft() ), pHelpWin->GetParent()->ImplGetFrameWindow()->OutputToAbsoluteScreenPixel( rHelpArea.BottomRight() ) ); @@ -678,7 +678,7 @@ void ImplSetHelpWindowPos( vcl::Window* pHelpWin, sal_uInt16 nHelpWinStyle, Quic // the popup must not appear under the mouse // otherwise it would directly be closed due to a focus change... */ - Rectangle aHelpRect( aPos, aSz ); + tools::Rectangle aHelpRect( aPos, aSz ); if( aHelpRect.IsInside( aMousePos ) ) { Point delta(2,2); diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx index 12cee864feda..dec8bdb64683 100644 --- a/vcl/source/app/salvtables.cxx +++ b/vcl/source/app/salvtables.cxx @@ -50,7 +50,7 @@ void SalFrame::SetCallback( vcl::Window* pWindow, SALFRAMEPROC pProc ) // default to full-frame flushes // on ports where partial-flushes are much cheaper this method should be overridden -void SalFrame::Flush( const Rectangle& ) +void SalFrame::Flush( const tools::Rectangle& ) { Flush(); } @@ -139,7 +139,7 @@ SalMenu::~SalMenu() { } -bool SalMenu::ShowNativePopupMenu(FloatingWindow *, const Rectangle&, FloatWinPopupFlags ) +bool SalMenu::ShowNativePopupMenu(FloatingWindow *, const tools::Rectangle&, FloatWinPopupFlags ) { return false; } @@ -157,9 +157,9 @@ void SalMenu::RemoveMenuBarButton( sal_uInt16 ) { } -Rectangle SalMenu::GetMenuBarButtonRectPixel( sal_uInt16, SalFrame* ) +tools::Rectangle SalMenu::GetMenuBarButtonRectPixel( sal_uInt16, SalFrame* ) { - return Rectangle(); + return tools::Rectangle(); } SalMenuItem::~SalMenuItem() diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx index 1dc3e6012036..eeeb25e0a283 100644 --- a/vcl/source/app/svapp.cxx +++ b/vcl/source/app/svapp.cxx @@ -1276,14 +1276,14 @@ unsigned int Application::GetDisplayExternalScreen() return nExternal; } -Rectangle Application::GetScreenPosSizePixel( unsigned int nScreen ) +tools::Rectangle Application::GetScreenPosSizePixel( unsigned int nScreen ) { SalSystem* pSys = ImplGetSalSystem(); - return pSys ? pSys->GetDisplayScreenPosSizePixel( nScreen ) : Rectangle(); + return pSys ? pSys->GetDisplayScreenPosSizePixel( nScreen ) : tools::Rectangle(); } namespace { -unsigned long calcDistSquare( const Point& i_rPoint, const Rectangle& i_rRect ) +unsigned long calcDistSquare( const Point& i_rPoint, const tools::Rectangle& i_rRect ) { const Point aRectCenter( (i_rRect.Left() + i_rRect.Right())/2, (i_rRect.Top() + i_rRect.Bottom())/ 2 ); @@ -1293,7 +1293,7 @@ unsigned long calcDistSquare( const Point& i_rPoint, const Rectangle& i_rRect ) } } -unsigned int Application::GetBestScreen( const Rectangle& i_rRect ) +unsigned int Application::GetBestScreen( const tools::Rectangle& i_rRect ) { if( !IsUnifiedDisplay() ) return GetDisplayBuiltInScreen(); @@ -1303,12 +1303,12 @@ unsigned int Application::GetBestScreen( const Rectangle& i_rRect ) unsigned long nOverlap = 0; for( unsigned int i = 0; i < nScreens; i++ ) { - const Rectangle aCurScreenRect( GetScreenPosSizePixel( i ) ); + const tools::Rectangle aCurScreenRect( GetScreenPosSizePixel( i ) ); // if a screen contains the rectangle completely it is obviously the best screen if( aCurScreenRect.IsInside( i_rRect ) ) return i; // next the screen which contains most of the area of the rect is the best - Rectangle aIntersection( aCurScreenRect.GetIntersection( i_rRect ) ); + tools::Rectangle aIntersection( aCurScreenRect.GetIntersection( i_rRect ) ); if( ! aIntersection.IsEmpty() ) { const unsigned long nCurOverlap( aIntersection.GetWidth() * aIntersection.GetHeight() ); @@ -1328,7 +1328,7 @@ unsigned int Application::GetBestScreen( const Rectangle& i_rRect ) unsigned long nDist = ULONG_MAX; for( unsigned int i = 0; i < nScreens; i++ ) { - const Rectangle aCurScreenRect( GetScreenPosSizePixel( i ) ); + const tools::Rectangle aCurScreenRect( GetScreenPosSizePixel( i ) ); const unsigned long nCurDist( calcDistSquare( aCenter, aCurScreenRect ) ); if( nCurDist < nDist ) { diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx index e94df630f4db..64c078e070fa 100644 --- a/vcl/source/control/button.cxx +++ b/vcl/source/control/button.cxx @@ -73,7 +73,7 @@ class ImplCommonButtonData public: ImplCommonButtonData(); - Rectangle maFocusRect; + tools::Rectangle maFocusRect; long mnSeparatorX; DrawButtonFlags mnButtonState; bool mbSmallSymbol; @@ -200,7 +200,7 @@ ImageAlign Button::GetImageAlign() const return mpButtonData->meImageAlign; } -void Button::SetFocusRect( const Rectangle& rFocusRect ) +void Button::SetFocusRect( const tools::Rectangle& rFocusRect ) { ImplSetFocusRect( rFocusRect ); } @@ -247,7 +247,7 @@ DrawTextFlags Button::ImplGetTextStyle(OUString& rText, WinBits nWinStyle, DrawF void Button::ImplDrawAlignedImage(OutputDevice* pDev, Point& rPos, Size& rSize, sal_uLong nImageSep, DrawFlags nDrawFlags, - DrawTextFlags nTextStyle, Rectangle *pSymbolRect, + DrawTextFlags nTextStyle, tools::Rectangle *pSymbolRect, bool bAddImageSep) { OUString aText(GetText()); @@ -260,7 +260,7 @@ void Button::ImplDrawAlignedImage(OutputDevice* pDev, Point& rPos, return; WinBits nWinStyle = GetStyle(); - Rectangle aOutRect( rPos, rSize ); + tools::Rectangle aOutRect( rPos, rSize ); ImageAlign eImageAlign = mpButtonData->meImageAlign; Size aImageSize = mpButtonData->maImage.GetSizePixel(); @@ -300,8 +300,8 @@ void Button::ImplDrawAlignedImage(OutputDevice* pDev, Point& rPos, Size aMax; Point aImagePos = rPos; Point aTextPos = rPos; - Rectangle aUnion = Rectangle(aImagePos, aImageSize); - Rectangle aSymbol; + tools::Rectangle aUnion = tools::Rectangle(aImagePos, aImageSize); + tools::Rectangle aSymbol; long nSymbolHeight = 0; if (bDrawText || bHasSymbol) @@ -309,7 +309,7 @@ void Button::ImplDrawAlignedImage(OutputDevice* pDev, Point& rPos, // Get the size of the text output area ( the symbol will be drawn in // this area as well, so the symbol rectangle will be calculated here, too ) - Rectangle aRect = Rectangle(Point(), rSize); + tools::Rectangle aRect = tools::Rectangle(Point(), rSize); Size aTSSize; if (bHasSymbol) @@ -320,14 +320,14 @@ void Button::ImplDrawAlignedImage(OutputDevice* pDev, Point& rPos, if (mpButtonData->mbSmallSymbol) nSymbolHeight = nSymbolHeight * 3 / 4; - aSymbol = Rectangle(Point(), Size(nSymbolHeight, nSymbolHeight)); + aSymbol = tools::Rectangle(Point(), Size(nSymbolHeight, nSymbolHeight)); ImplCalcSymbolRect(aSymbol); aRect.Left() += 3 * nSymbolHeight / 2; aTSSize.Width() = 3 * nSymbolHeight / 2; } else { - aSymbol = Rectangle(Point(), rSize); + aSymbol = tools::Rectangle(Point(), rSize); ImplCalcSymbolRect(aSymbol); aTSSize.Width() = aSymbol.GetWidth(); } @@ -433,8 +433,8 @@ void Button::ImplDrawAlignedImage(OutputDevice* pDev, Point& rPos, aTextPos.X() = rPos.X() + (aMax.Width() - aTSSize.Width()) / 2; aTextPos.Y() = rPos.Y() + (aMax.Height() - aTSSize.Height()) / 2; } - aUnion = Rectangle(aImagePos, aImageSize); - aUnion.Union(Rectangle(aTextPos, aTSSize)); + aUnion = tools::Rectangle(aImagePos, aImageSize); + aUnion.Union(tools::Rectangle(aTextPos, aTSSize)); } // Now place the combination of text and image in the output area of the button @@ -479,11 +479,11 @@ void Button::ImplDrawAlignedImage(OutputDevice* pDev, Point& rPos, if (mpButtonData->meSymbolAlign == SymbolAlign::RIGHT) { Point aRightPos = Point(aTextPos.X() + aTextSize.Width() + aSymbolSize.Width() / 2, aTextPos.Y()); - *pSymbolRect = Rectangle(aRightPos, aSymbolSize); + *pSymbolRect = tools::Rectangle(aRightPos, aSymbolSize); } else { - *pSymbolRect = Rectangle(aTextPos, aSymbolSize); + *pSymbolRect = tools::Rectangle(aTextPos, aSymbolSize); aTextPos.X() += 3 * nSymbolHeight / 2; } if (mpButtonData->mbSmallSymbol) @@ -508,20 +508,20 @@ void Button::ImplDrawAlignedImage(OutputDevice* pDev, Point& rPos, if (bDrawText) { - const Rectangle aTOutRect(aTextPos, aTextSize); + const tools::Rectangle aTOutRect(aTextPos, aTextSize); ImplSetFocusRect(aTOutRect); DrawControlText(*pDev, aTOutRect, aText, nTextStyle, nullptr, nullptr, &aDeviceTextSize); } else { - ImplSetFocusRect(Rectangle(aImagePos, aImageSize)); + ImplSetFocusRect(tools::Rectangle(aImagePos, aImageSize)); } } -void Button::ImplSetFocusRect(const Rectangle &rFocusRect) +void Button::ImplSetFocusRect(const tools::Rectangle &rFocusRect) { - Rectangle aFocusRect = rFocusRect; - Rectangle aOutputRect = Rectangle(Point(), GetOutputSizePixel()); + tools::Rectangle aFocusRect = rFocusRect; + tools::Rectangle aOutputRect = tools::Rectangle(Point(), GetOutputSizePixel()); if (!aFocusRect.IsEmpty()) { @@ -543,7 +543,7 @@ void Button::ImplSetFocusRect(const Rectangle &rFocusRect) mpButtonData->maFocusRect = aFocusRect; } -const Rectangle& Button::ImplGetFocusRect() const +const tools::Rectangle& Button::ImplGetFocusRect() const { return mpButtonData->maFocusRect; } @@ -726,7 +726,7 @@ void PushButton::ImplInitSettings( bool bFont, } void PushButton::ImplDrawPushButtonFrame(vcl::RenderContext& rRenderContext, - Rectangle& rRect, DrawButtonFlags nStyle) + tools::Rectangle& rRect, DrawButtonFlags nStyle) { if (!(GetStyle() & (WB_RECTSTYLE | WB_SMALLSTYLE))) { @@ -759,7 +759,7 @@ bool PushButton::ImplHitTestPushButton( vcl::Window* pDev, const Point& rPos ) { Point aTempPoint; - Rectangle aTestRect( aTempPoint, pDev->GetOutputSizePixel() ); + tools::Rectangle aTestRect( aTempPoint, pDev->GetOutputSizePixel() ); return aTestRect.IsInside( rPos ); } @@ -811,25 +811,25 @@ static void ImplDrawBtnDropDownArrow( OutputDevice* pDev, pDev->SetFillColor( Color( COL_BLACK ) ); else pDev->SetFillColor( rColor ); - pDev->DrawRect( Rectangle( nX+0, nY+0, nX+6, nY+0 ) ); - pDev->DrawRect( Rectangle( nX+1, nY+1, nX+5, nY+1 ) ); - pDev->DrawRect( Rectangle( nX+2, nY+2, nX+4, nY+2 ) ); - pDev->DrawRect( Rectangle( nX+3, nY+3, nX+3, nY+3 ) ); + pDev->DrawRect( tools::Rectangle( nX+0, nY+0, nX+6, nY+0 ) ); + pDev->DrawRect( tools::Rectangle( nX+1, nY+1, nX+5, nY+1 ) ); + pDev->DrawRect( tools::Rectangle( nX+2, nY+2, nX+4, nY+2 ) ); + pDev->DrawRect( tools::Rectangle( nX+3, nY+3, nX+3, nY+3 ) ); if ( bBlack ) { pDev->SetFillColor( rColor ); - pDev->DrawRect( Rectangle( nX+2, nY+1, nX+4, nY+1 ) ); - pDev->DrawRect( Rectangle( nX+3, nY+2, nX+3, nY+2 ) ); + pDev->DrawRect( tools::Rectangle( nX+2, nY+1, nX+4, nY+1 ) ); + pDev->DrawRect( tools::Rectangle( nX+3, nY+2, nX+3, nY+2 ) ); } pDev->SetLineColor( aOldLineColor ); pDev->SetFillColor( aOldFillColor ); } void PushButton::ImplDrawPushButtonContent(OutputDevice* pDev, DrawFlags nDrawFlags, - const Rectangle& rRect, bool bMenuBtnSep) + const tools::Rectangle& rRect, bool bMenuBtnSep) { const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); - Rectangle aInRect = rRect; + tools::Rectangle aInRect = rRect; Color aColor; OUString aText = PushButton::GetText(); // PushButton:: because of MoreButton DrawTextFlags nTextStyle = ImplGetTextStyle( nDrawFlags ); @@ -869,7 +869,7 @@ void PushButton::ImplDrawPushButtonContent(OutputDevice* pDev, DrawFlags nDrawFl mnDDStyle == PushButtonDropdownStyle::SplitMenuButton ) { long nSeparatorX = 0; - Rectangle aSymbolRect = aInRect; + tools::Rectangle aSymbolRect = aInRect; if ( !aText.isEmpty() && ! (ImplGetButtonState() & DrawButtonFlags::NoText) ) { // calculate symbol size @@ -903,7 +903,7 @@ void PushButton::ImplDrawPushButtonContent(OutputDevice* pDev, DrawFlags nDrawFl } else { - Rectangle aSymbolRect; + tools::Rectangle aSymbolRect; ImplDrawAlignedImage( pDev, aPos, aSize, nImageSep, nDrawFlags, nTextStyle, IsSymbol() ? &aSymbolRect : nullptr, true ); @@ -944,8 +944,8 @@ void PushButton::ImplDrawPushButton(vcl::RenderContext& rRenderContext) DrawButtonFlags nButtonStyle = ImplGetButtonState(); Point aPoint; Size aOutSz(GetOutputSizePixel()); - Rectangle aRect(aPoint, aOutSz); - Rectangle aInRect = aRect; + tools::Rectangle aRect(aPoint, aOutSz); + tools::Rectangle aInRect = aRect; bool bNativeOK = false; // adjust style if button should be rendered 'pressed' @@ -1042,7 +1042,7 @@ void PushButton::ImplDrawPushButton(vcl::RenderContext& rRenderContext) if (bNativeOK) { PushButtonValue aControlValue; - Rectangle aCtrlRegion(aInRect); + tools::Rectangle aCtrlRegion(aInRect); ControlState nState = ControlState::NONE; if (mbPressed || IsChecked() || mbIsActive) @@ -1107,7 +1107,7 @@ void PushButton::ImplDrawPushButton(vcl::RenderContext& rRenderContext) // draw PushButtonFrame, aInRect has content size afterwards if (GetStyle() & WB_FLATBUTTON) { - Rectangle aTempRect(aInRect); + tools::Rectangle aTempRect(aInRect); if (bRollOver) ImplDrawPushButtonFrame(rRenderContext, aTempRect, nButtonStyle); aInRect.Left() += 2; @@ -1139,11 +1139,11 @@ void PushButton::ImplSetDefButton( bool bSet ) if ( IsNativeControlSupported(ControlType::Pushbutton, ControlPart::Entire) ) { - Rectangle aBound, aCont; - Rectangle aCtrlRect( 0, 0, 80, 20 ); // use a constant size to avoid accumulating + tools::Rectangle aBound, aCont; + tools::Rectangle aCtrlRect( 0, 0, 80, 20 ); // use a constant size to avoid accumulating // will not work if the theme has dynamic adornment sizes ImplControlValue aControlValue; - Rectangle aCtrlRegion( aCtrlRect ); + tools::Rectangle aCtrlRegion( aCtrlRect ); ControlState nState = ControlState::DEFAULT|ControlState::ENABLED; // get native size of a 'default' button @@ -1354,7 +1354,7 @@ void PushButton::FillLayoutData() const const_cast<PushButton*>(this)->Invalidate(); } -void PushButton::Paint(vcl::RenderContext& rRenderContext, const Rectangle&) +void PushButton::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&) { ImplDrawPushButton(rRenderContext); } @@ -1364,7 +1364,7 @@ void PushButton::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, { Point aPos = pDev->LogicToPixel( rPos ); Size aSize = pDev->LogicToPixel( rSize ); - Rectangle aRect( aPos, aSize ); + tools::Rectangle aRect( aPos, aSize ); vcl::Font aFont = GetDrawPixelFont( pDev ); pDev->Push(); @@ -1527,7 +1527,7 @@ bool PushButton::PreNotify( NotifyEvent& rNEvt ) { // only paint the button part to avoid flickering of the combobox text Point aPt; - Rectangle aClipRect( aPt, GetOutputSizePixel() ); + tools::Rectangle aClipRect( aPt, GetOutputSizePixel() ); aClipRect.SetPos(pBorder->ScreenToOutputPixel(OutputToScreenPixel(aClipRect.TopLeft()))); pBorder->Invalidate( aClipRect ); } @@ -1648,7 +1648,7 @@ Size PushButton::CalcMinimumSize() const } if ( !PushButton::GetText().isEmpty() && ! (ImplGetButtonState() & DrawButtonFlags::NoText) ) { - Size textSize = GetTextRect( Rectangle( Point(), Size( 0x7fffffff, 0x7fffffff ) ), + Size textSize = GetTextRect( tools::Rectangle( Point(), Size( 0x7fffffff, 0x7fffffff ) ), PushButton::GetText(), ImplGetTextStyle( DrawFlags::NONE ) ).GetSize(); aSize.Width() += textSize.Width(); aSize.Height() = std::max( aSize.Height(), long( textSize.Height() * 1.15 ) ); @@ -1684,12 +1684,12 @@ bool PushButton::set_property(const OString &rKey, const OString &rValue) return true; } -void PushButton::ShowFocus(const Rectangle& rRect) +void PushButton::ShowFocus(const tools::Rectangle& rRect) { if (IsNativeControlSupported(ControlType::Pushbutton, ControlPart::Focus)) { ImplControlValue aControlValue; - Rectangle aInRect(Point(), GetOutputSizePixel()); + tools::Rectangle aInRect(Point(), GetOutputSizePixel()); GetOutDev()->DrawNativeControl(ControlType::Pushbutton, ControlPart::Focus, aInRect, ControlState::FOCUSED, aControlValue, OUString()); } @@ -1909,7 +1909,7 @@ void RadioButton::ImplDrawRadioButtonState(vcl::RenderContext& rRenderContext) if (!maImage && rRenderContext.IsNativeControlSupported(ControlType::Radiobutton, ControlPart::Entire)) { ImplControlValue aControlValue( mbChecked ? ButtonValue::On : ButtonValue::Off ); - Rectangle aCtrlRect(maStateRect.TopLeft(), maStateRect.GetSize()); + tools::Rectangle aCtrlRect(maStateRect.TopLeft(), maStateRect.GetSize()); ControlState nState = ControlState::NONE; if (ImplGetButtonState() & DrawButtonFlags::Pressed) @@ -1949,7 +1949,7 @@ void RadioButton::ImplDrawRadioButtonState(vcl::RenderContext& rRenderContext) DecorationView aDecoView(&rRenderContext); const StyleSettings& rStyleSettings = rRenderContext.GetSettings().GetStyleSettings(); - Rectangle aImageRect = maStateRect; + tools::Rectangle aImageRect = maStateRect; Size aImageSize = maImage.GetSizePixel(); bool bEnabled = IsEnabled(); DrawFrameStyle nButtonStyle = DrawFrameStyle::DoubleIn; @@ -2015,14 +2015,14 @@ void RadioButton::ImplDrawRadioButtonState(vcl::RenderContext& rRenderContext) void RadioButton::ImplDraw( OutputDevice* pDev, DrawFlags nDrawFlags, const Point& rPos, const Size& rSize, - const Size& rImageSize, Rectangle& rStateRect, - Rectangle& rMouseRect ) + const Size& rImageSize, tools::Rectangle& rStateRect, + tools::Rectangle& rMouseRect ) { WinBits nWinStyle = GetStyle(); OUString aText( GetText() ); pDev->Push( PushFlags::CLIPREGION ); - pDev->IntersectClipRegion( Rectangle( rPos, rSize ) ); + pDev->IntersectClipRegion( tools::Rectangle( rPos, rSize ) ); // no image radio button if ( !maImage ) @@ -2050,7 +2050,7 @@ void RadioButton::ImplDraw( OutputDevice* pDev, DrawFlags nDrawFlags, ImplDrawAlignedImage( pDev, aPos, aSize, 1, nDrawFlags, nTextStyle ); - rMouseRect = Rectangle( aPos, aSize ); + rMouseRect = tools::Rectangle( aPos, aSize ); rMouseRect.Left() = rPos.X(); rStateRect.Left() = rPos.X(); @@ -2105,7 +2105,7 @@ void RadioButton::ImplDraw( OutputDevice* pDev, DrawFlags nDrawFlags, { bool bTopImage = (nWinStyle & WB_TOP) != 0; Size aImageSize = maImage.GetSizePixel(); - Rectangle aImageRect( rPos, rSize ); + tools::Rectangle aImageRect( rPos, rSize ); long nTextHeight = pDev->GetTextHeight(); long nTextWidth = pDev->GetCtrlTextWidth( aText ); @@ -2422,7 +2422,7 @@ void RadioButton::FillLayoutData() const const_cast<RadioButton*>(this)->Invalidate(); } -void RadioButton::Paint( vcl::RenderContext& rRenderContext, const Rectangle& ) +void RadioButton::Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& ) { ImplDrawRadioButton(rRenderContext); } @@ -2439,8 +2439,8 @@ void RadioButton::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize Size aBrd1Size = pDev->LogicToPixel( Size( 20, 20 ), aResMapMode ); Size aBrd2Size = pDev->LogicToPixel( Size( 60, 60 ), aResMapMode ); vcl::Font aFont = GetDrawPixelFont( pDev ); - Rectangle aStateRect; - Rectangle aMouseRect; + tools::Rectangle aStateRect; + tools::Rectangle aMouseRect; aImageSize.Width() = CalcZoom( aImageSize.Width() ); aImageSize.Height() = CalcZoom( aImageSize.Height() ); @@ -2722,9 +2722,9 @@ Size RadioButton::ImplGetRadioImageSize() const if( IsNativeControlSupported( ControlType::Radiobutton, ControlPart::Entire ) ) { ImplControlValue aControlValue; - Rectangle aCtrlRegion( Point( 0, 0 ), GetSizePixel() ); + tools::Rectangle aCtrlRegion( Point( 0, 0 ), GetSizePixel() ); ControlState nState = ControlState::DEFAULT|ControlState::ENABLED; - Rectangle aBoundingRgn, aContentRgn; + tools::Rectangle aBoundingRgn, aContentRgn; // get native size of a radio button if( GetNativeControlRegion( ControlType::Radiobutton, ControlPart::Entire, aCtrlRegion, @@ -2836,8 +2836,8 @@ void RadioButton::ImplSetMinimumNWFSize() ImplControlValue aControlValue; Size aCurSize( GetSizePixel() ); - Rectangle aCtrlRegion( Point( 0, 0 ), aCurSize ); - Rectangle aBoundingRgn, aContentRgn; + tools::Rectangle aCtrlRegion( Point( 0, 0 ), aCurSize ); + tools::Rectangle aBoundingRgn, aContentRgn; // get native size of a radiobutton if( GetNativeControlRegion( ControlType::Radiobutton, ControlPart::Entire, aCtrlRegion, @@ -2873,7 +2873,7 @@ Size RadioButton::CalcMinimumSize() const { bool bTopImage = (GetStyle() & WB_TOP) != 0; - Size aTextSize = GetTextRect( Rectangle( Point(), Size( 0x7fffffff, 0x7fffffff ) ), + Size aTextSize = GetTextRect( tools::Rectangle( Point(), Size( 0x7fffffff, 0x7fffffff ) ), aText, FixedText::ImplGetTextStyle( GetStyle() ) ).GetSize(); aSize.Width()+=2; // for focus rect @@ -2902,12 +2902,12 @@ Size RadioButton::GetOptimalSize() const return CalcMinimumSize(); } -void RadioButton::ShowFocus(const Rectangle& rRect) +void RadioButton::ShowFocus(const tools::Rectangle& rRect) { if (IsNativeControlSupported(ControlType::Radiobutton, ControlPart::Focus)) { ImplControlValue aControlValue; - Rectangle aInRect(Point(0, 0), GetSizePixel()); + tools::Rectangle aInRect(Point(0, 0), GetSizePixel()); aInRect.Left() = rRect.Left(); // exclude the radio element itself from the focusrect @@ -3001,7 +3001,7 @@ void CheckBox::ImplDrawCheckBoxState(vcl::RenderContext& rRenderContext) if (bNativeOK) { ImplControlValue aControlValue(meState == TRISTATE_TRUE ? ButtonValue::On : ButtonValue::Off); - Rectangle aCtrlRegion(maStateRect); + tools::Rectangle aCtrlRegion(maStateRect); ControlState nState = ControlState::NONE; if (HasFocus()) @@ -3044,14 +3044,14 @@ void CheckBox::ImplDrawCheckBoxState(vcl::RenderContext& rRenderContext) void CheckBox::ImplDraw( OutputDevice* pDev, DrawFlags nDrawFlags, const Point& rPos, const Size& rSize, - const Size& rImageSize, Rectangle& rStateRect, - Rectangle& rMouseRect ) + const Size& rImageSize, tools::Rectangle& rStateRect, + tools::Rectangle& rMouseRect ) { WinBits nWinStyle = GetStyle(); OUString aText( GetText() ); pDev->Push( PushFlags::CLIPREGION | PushFlags::LINECOLOR ); - pDev->IntersectClipRegion( Rectangle( rPos, rSize ) ); + pDev->IntersectClipRegion( tools::Rectangle( rPos, rSize ) ); long nLineY = rPos.Y() + (rSize.Height()-1)/2; if ( ( !aText.isEmpty() && ! (ImplGetButtonState() & DrawButtonFlags::NoText) ) || @@ -3078,7 +3078,7 @@ void CheckBox::ImplDraw( OutputDevice* pDev, DrawFlags nDrawFlags, ImplDrawAlignedImage( pDev, aPos, aSize, 1, nDrawFlags, nTextStyle ); nLineY = aPos.Y() + aSize.Height()/2; - rMouseRect = Rectangle( aPos, aSize ); + rMouseRect = tools::Rectangle( aPos, aSize ); rMouseRect.Left() = rPos.X(); rStateRect.Left() = rPos.X(); rStateRect.Top() = rMouseRect.Top(); @@ -3292,7 +3292,7 @@ void CheckBox::FillLayoutData() const const_cast<CheckBox*>(this)->Invalidate(); } -void CheckBox::Paint(vcl::RenderContext& rRenderContext, const Rectangle&) +void CheckBox::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&) { ImplDrawCheckBox(rRenderContext); } @@ -3308,8 +3308,8 @@ void CheckBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, Size aBrd2Size = pDev->LogicToPixel( Size( 30, 30 ), aResMapMode ); long nCheckWidth = pDev->LogicToPixel( Size( 20, 20 ), aResMapMode ).Width(); vcl::Font aFont = GetDrawPixelFont( pDev ); - Rectangle aStateRect; - Rectangle aMouseRect; + tools::Rectangle aStateRect; + tools::Rectangle aMouseRect; aImageSize.Width() = CalcZoom( aImageSize.Width() ); aImageSize.Height() = CalcZoom( aImageSize.Height() ); @@ -3587,9 +3587,9 @@ Size CheckBox::ImplGetCheckImageSize() const if( IsNativeControlSupported( ControlType::Checkbox, ControlPart::Entire ) ) { ImplControlValue aControlValue; - Rectangle aCtrlRegion( Point( 0, 0 ), GetSizePixel() ); + tools::Rectangle aCtrlRegion( Point( 0, 0 ), GetSizePixel() ); ControlState nState = ControlState::DEFAULT|ControlState::ENABLED; - Rectangle aBoundingRgn, aContentRgn; + tools::Rectangle aBoundingRgn, aContentRgn; // get native size of a check box if( GetNativeControlRegion( ControlType::Checkbox, ControlPart::Entire, aCtrlRegion, @@ -3682,8 +3682,8 @@ void CheckBox::ImplSetMinimumNWFSize() ImplControlValue aControlValue; Size aCurSize( GetSizePixel() ); - Rectangle aCtrlRegion( Point( 0, 0 ), aCurSize ); - Rectangle aBoundingRgn, aContentRgn; + tools::Rectangle aCtrlRegion( Point( 0, 0 ), aCurSize ); + tools::Rectangle aBoundingRgn, aContentRgn; // get native size of a radiobutton if( GetNativeControlRegion( ControlType::Checkbox, ControlPart::Entire, aCtrlRegion, @@ -3714,7 +3714,7 @@ Size CheckBox::CalcMinimumSize( long nMaxWidth ) const nMaxWidth-=2; nMaxWidth -= ImplGetImageToTextDistance(); - Size aTextSize = GetTextRect( Rectangle( Point(), Size( nMaxWidth > 0 ? nMaxWidth : 0x7fffffff, 0x7fffffff ) ), + Size aTextSize = GetTextRect( tools::Rectangle( Point(), Size( nMaxWidth > 0 ? nMaxWidth : 0x7fffffff, 0x7fffffff ) ), aText, FixedText::ImplGetTextStyle( GetStyle() ) ).GetSize(); aSize.Width()+=2; // for focus rect aSize.Width() += ImplGetImageToTextDistance(); @@ -3740,12 +3740,12 @@ Size CheckBox::GetOptimalSize() const return CalcMinimumSize(); } -void CheckBox::ShowFocus(const Rectangle& rRect) +void CheckBox::ShowFocus(const tools::Rectangle& rRect) { if (IsNativeControlSupported(ControlType::Checkbox, ControlPart::Focus)) { ImplControlValue aControlValue; - Rectangle aInRect(Point(0, 0), GetSizePixel()); + tools::Rectangle aInRect(Point(0, 0), GetSizePixel()); aInRect.Left() = rRect.Left(); // exclude the checkbox itself from the focusrect @@ -3810,10 +3810,10 @@ void DisclosureButton::ImplDrawCheckBoxState(vcl::RenderContext& rRenderContext) for ControlType::ListNode would have to be implemented and taken into account */ - Rectangle aStateRect(GetStateRect()); + tools::Rectangle aStateRect(GetStateRect()); ImplControlValue aControlValue(GetState() == TRISTATE_TRUE ? ButtonValue::On : ButtonValue::Off); - Rectangle aCtrlRegion(aStateRect); + tools::Rectangle aCtrlRegion(aStateRect); ControlState nState = ControlState::NONE; if (HasFocus()) diff --git a/vcl/source/control/combobox.cxx b/vcl/source/control/combobox.cxx index 84d1edcf9e5c..01eac4eb3d07 100644 --- a/vcl/source/control/combobox.cxx +++ b/vcl/source/control/combobox.cxx @@ -151,8 +151,8 @@ void ComboBox::ImplCalcEditHeight() if ( !IsDropDownBox() ) m_pImpl->m_nDDHeight += 4; - Rectangle aCtrlRegion( Point( 0, 0 ), Size( 10, 10 ) ); - Rectangle aBoundRegion, aContentRegion; + tools::Rectangle aCtrlRegion( Point( 0, 0 ), Size( 10, 10 ) ); + tools::Rectangle aBoundRegion, aContentRegion; ImplControlValue aControlValue; ControlType aType = IsDropDownBox() ? ControlType::Combobox : ControlType::Editbox; if( GetNativeControlRegion( aType, ControlPart::Entire, @@ -1005,10 +1005,10 @@ long ComboBox::getMaxWidthScrollBarAndDownButton() const vcl::Window *pBorder = GetWindow( GetWindowType::Border ); ImplControlValue aControlValue; Point aPoint; - Rectangle aContent, aBound; + tools::Rectangle aContent, aBound; // use the full extent of the control - Rectangle aArea( aPoint, pBorder->GetOutputSizePixel() ); + tools::Rectangle aArea( aPoint, pBorder->GetOutputSizePixel() ); if ( GetNativeControlRegion(ControlType::Combobox, ControlPart::ButtonDown, aArea, ControlState::NONE, aControlValue, OUString(), aBound, aContent) ) @@ -1161,7 +1161,7 @@ void ComboBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, D bool bBackground = !(nFlags & DrawFlags::NoBackground) && IsControlBackground(); if ( bBorder || bBackground ) { - Rectangle aRect( aPos, aSize ); + tools::Rectangle aRect( aPos, aSize ); // aRect.Top() += nEditHeight; if ( bBorder ) { @@ -1210,14 +1210,14 @@ void ComboBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, D } } - Rectangle aClip( aPos, aSize ); + tools::Rectangle aClip( aPos, aSize ); pDev->IntersectClipRegion( aClip ); sal_Int32 nLines = static_cast<sal_Int32>( nTextHeight > 0 ? (aSize.Height()-nEditHeight)/nTextHeight : 1 ); if ( !nLines ) nLines = 1; const sal_Int32 nTEntry = IsReallyVisible() ? m_pImpl->m_pImplLB->GetTopEntry() : 0; - Rectangle aTextRect( aPos, aSize ); + tools::Rectangle aTextRect( aPos, aSize ); aTextRect.Left() += 3*nOnePixel; aTextRect.Right() -= 3*nOnePixel; @@ -1323,11 +1323,11 @@ void ComboBox::SetProminentEntryType( ProminentEntry eType ) m_pImpl->m_pImplLB->SetProminentEntryType( eType ); } -Rectangle ComboBox::GetDropDownPosSizePixel() const +tools::Rectangle ComboBox::GetDropDownPosSizePixel() const { return m_pImpl->m_pFloatWin ? m_pImpl->m_pFloatWin->GetWindowExtentsRelative(const_cast<ComboBox*>(this)) - : Rectangle(); + : tools::Rectangle(); } const Wallpaper& ComboBox::GetDisplayBackground() const @@ -1380,10 +1380,10 @@ void ComboBox::SetNoSelection() m_pImpl->m_pSubEdit->SetText( OUString() ); } -Rectangle ComboBox::GetBoundingRectangle( sal_Int32 nItem ) const +tools::Rectangle ComboBox::GetBoundingRectangle( sal_Int32 nItem ) const { - Rectangle aRect = m_pImpl->m_pImplLB->GetMainWindow()->GetBoundingRectangle( nItem ); - Rectangle aOffset = m_pImpl->m_pImplLB->GetMainWindow()->GetWindowExtentsRelative( static_cast<vcl::Window*>(const_cast<ComboBox *>(this)) ); + tools::Rectangle aRect = m_pImpl->m_pImplLB->GetMainWindow()->GetBoundingRectangle( nItem ); + tools::Rectangle aOffset = m_pImpl->m_pImplLB->GetMainWindow()->GetWindowExtentsRelative( static_cast<vcl::Window*>(const_cast<ComboBox *>(this)) ); aRect.Move( aOffset.TopLeft().X(), aOffset.TopLeft().Y() ); return aRect; } @@ -1443,10 +1443,10 @@ ComboBoxBounds ComboBox::Impl::calcComboBoxDropDownComponentBounds( vcl::Window *pBorder = m_rThis.GetWindow( GetWindowType::Border ); ImplControlValue aControlValue; Point aPoint; - Rectangle aContent, aBound; + tools::Rectangle aContent, aBound; // use the full extent of the control - Rectangle aArea( aPoint, rBorderOutSz ); + tools::Rectangle aArea( aPoint, rBorderOutSz ); if (m_rThis.GetNativeControlRegion(ControlType::Combobox, ControlPart::ButtonDown, aArea, ControlState::NONE, aControlValue, OUString(), aBound, aContent) ) diff --git a/vcl/source/control/ctrl.cxx b/vcl/source/control/ctrl.cxx index aadff32a5953..229051b58ae6 100644 --- a/vcl/source/control/ctrl.cxx +++ b/vcl/source/control/ctrl.cxx @@ -106,16 +106,16 @@ ControlLayoutData::ControlLayoutData() : m_pParent( nullptr ) { } -Rectangle ControlLayoutData::GetCharacterBounds( long nIndex ) const +tools::Rectangle ControlLayoutData::GetCharacterBounds( long nIndex ) const { - return (nIndex >= 0 && nIndex < (long) m_aUnicodeBoundRects.size()) ? m_aUnicodeBoundRects[ nIndex ] : Rectangle(); + return (nIndex >= 0 && nIndex < (long) m_aUnicodeBoundRects.size()) ? m_aUnicodeBoundRects[ nIndex ] : tools::Rectangle(); } -Rectangle Control::GetCharacterBounds( long nIndex ) const +tools::Rectangle Control::GetCharacterBounds( long nIndex ) const { if( !HasLayoutData() ) FillLayoutData(); - return mpControlData->mpLayoutData ? mpControlData->mpLayoutData->GetCharacterBounds( nIndex ) : Rectangle(); + return mpControlData->mpLayoutData ? mpControlData->mpLayoutData->GetCharacterBounds( nIndex ) : tools::Rectangle(); } long ControlLayoutData::GetIndexForPoint( const Point& rPoint ) const @@ -289,10 +289,10 @@ void Control::AppendLayoutData( const Control& rSubControl ) const for( n = 1; n < nLines; n++ ) mpControlData->mpLayoutData->m_aLineIndices.push_back( rSubControl.mpControlData->mpLayoutData->m_aLineIndices[n] + nCurrentIndex ); int nRectangles = rSubControl.mpControlData->mpLayoutData->m_aUnicodeBoundRects.size(); - Rectangle aRel = const_cast<Control&>(rSubControl).GetWindowExtentsRelative( const_cast<Control*>(this) ); + tools::Rectangle aRel = const_cast<Control&>(rSubControl).GetWindowExtentsRelative( const_cast<Control*>(this) ); for( n = 0; n < nRectangles; n++ ) { - Rectangle aRect = rSubControl.mpControlData->mpLayoutData->m_aUnicodeBoundRects[n]; + tools::Rectangle aRect = rSubControl.mpControlData->mpLayoutData->m_aUnicodeBoundRects[n]; aRect.Move( aRel.Left(), aRel.Top() ); mpControlData->mpLayoutData->m_aUnicodeBoundRects.push_back( aRect ); } @@ -329,7 +329,7 @@ void Control::ImplClearLayoutData() const mpControlData->mpLayoutData.reset(); } -void Control::ImplDrawFrame( OutputDevice* pDev, Rectangle& rRect ) +void Control::ImplDrawFrame( OutputDevice* pDev, tools::Rectangle& rRect ) { // use a deco view to draw the frame // However, since there happens a lot of magic there, we need to fake some (style) settings @@ -413,7 +413,7 @@ void Control::ImplInitSettings(const bool, const bool) ApplySettings(*this); } -Rectangle Control::DrawControlText( OutputDevice& _rTargetDevice, const Rectangle& rRect, const OUString& _rStr, +tools::Rectangle Control::DrawControlText( OutputDevice& _rTargetDevice, const tools::Rectangle& rRect, const OUString& _rStr, DrawTextFlags _nStyle, MetricVector* _pVector, OUString* _pDisplayText, const Size* i_pDeviceSize ) const { OUString rPStr = _rStr; @@ -430,7 +430,7 @@ Rectangle Control::DrawControlText( OutputDevice& _rTargetDevice, const Rectangl if ( !mpControlData->mpReferenceDevice || ( mpControlData->mpReferenceDevice == &_rTargetDevice ) ) { - const Rectangle aRet = _rTargetDevice.GetTextRect(rRect, rPStr, nPStyle); + const tools::Rectangle aRet = _rTargetDevice.GetTextRect(rRect, rPStr, nPStyle); _rTargetDevice.DrawText(aRet, rPStr, nPStyle, _pVector, _pDisplayText); return aRet; } @@ -439,7 +439,7 @@ Rectangle Control::DrawControlText( OutputDevice& _rTargetDevice, const Rectangl return aRenderer.DrawText(rRect, rPStr, nPStyle, _pVector, _pDisplayText, i_pDeviceSize); } -Rectangle Control::GetControlTextRect( OutputDevice& _rTargetDevice, const Rectangle & rRect, +tools::Rectangle Control::GetControlTextRect( OutputDevice& _rTargetDevice, const tools::Rectangle & rRect, const OUString& _rStr, DrawTextFlags _nStyle, Size* o_pDeviceSize ) const { OUString rPStr = _rStr; @@ -456,7 +456,7 @@ Rectangle Control::GetControlTextRect( OutputDevice& _rTargetDevice, const Recta if ( !mpControlData->mpReferenceDevice || ( mpControlData->mpReferenceDevice == &_rTargetDevice ) ) { - Rectangle aRet = _rTargetDevice.GetTextRect( rRect, rPStr, nPStyle ); + tools::Rectangle aRet = _rTargetDevice.GetTextRect( rRect, rPStr, nPStyle ); if (o_pDeviceSize) { *o_pDeviceSize = aRet.GetSize(); diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx index 95dc4d916c10..fa559c150117 100644 --- a/vcl/source/control/edit.cxx +++ b/vcl/source/control/edit.cxx @@ -473,7 +473,7 @@ long Edit::ImplGetTextYPosition() const return ( GetOutputSizePixel().Height() - GetTextHeight() ) / 2; } -void Edit::ImplRepaint(vcl::RenderContext& rRenderContext, const Rectangle& rRectangle) +void Edit::ImplRepaint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRectangle) { if (!IsReallyVisible()) return; @@ -522,7 +522,7 @@ void Edit::ImplRepaint(vcl::RenderContext& rRenderContext, const Rectangle& rRec rRenderContext.Push(PushFlags::FILLCOLOR | PushFlags::LINECOLOR); rRenderContext.SetLineColor(); rRenderContext.SetFillColor(GetControlBackground()); - rRenderContext.DrawRect(Rectangle(aPos, Size(GetOutputSizePixel().Width() - 2 * mnXOffset, GetOutputSizePixel().Height()))); + rRenderContext.DrawRect(tools::Rectangle(aPos, Size(GetOutputSizePixel().Width() - 2 * mnXOffset, GetOutputSizePixel().Height()))); rRenderContext.Pop(); rRenderContext.SetTextFillColor(GetControlBackground()); @@ -557,7 +557,7 @@ void Edit::ImplRepaint(vcl::RenderContext& rRenderContext, const Rectangle& rRec // selection is highlighted for(sal_Int32 i = 0; i < nLen; ++i) { - Rectangle aRect(aPos, Size(10, nTH)); + tools::Rectangle aRect(aPos, Size(10, nTH)); aRect.Left() = pDX[2 * i] + mnXOffset + ImplGetExtraXOffset(); aRect.Right() = pDX[2 * i + 1] + mnXOffset + ImplGetExtraXOffset(); aRect.Justify(); @@ -635,7 +635,7 @@ void Edit::ImplRepaint(vcl::RenderContext& rRenderContext, const Rectangle& rRec int nIndex = i; while (nIndex < mpIMEInfos->nLen && mpIMEInfos->pAttribs[nIndex] == nAttr) // #112631# check nIndex before using it { - Rectangle aRect( aPos, Size( 10, nTH ) ); + tools::Rectangle aRect( aPos, Size( 10, nTH ) ); aRect.Left() = pDX[2 * (nIndex + mpIMEInfos->nPos)] + mnXOffset + ImplGetExtraXOffset(); aRect.Right() = pDX[2 * (nIndex + mpIMEInfos->nPos) + 1] + mnXOffset + ImplGetExtraXOffset(); aRect.Justify(); @@ -983,13 +983,13 @@ ControlType Edit::ImplGetNativeControlType() const return nCtrl; } -void Edit::ImplClearBackground(vcl::RenderContext& rRenderContext, const Rectangle& rRectangle, long nXStart, long nXEnd ) +void Edit::ImplClearBackground(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRectangle, long nXStart, long nXEnd ) { /* * note: at this point the cursor must be switched off already */ Point aTmpPoint; - Rectangle aRect(aTmpPoint, GetOutputSizePixel()); + tools::Rectangle aRect(aTmpPoint, GetOutputSizePixel()); aRect.Left() = nXStart; aRect.Right() = nXEnd; @@ -1011,7 +1011,7 @@ void Edit::ImplPaintBorder(vcl::RenderContext& rRenderContext, long nXStart, lon return; Point aTmpPoint; - Rectangle aRect(aTmpPoint, GetOutputSizePixel()); + tools::Rectangle aRect(aTmpPoint, GetOutputSizePixel()); aRect.Left() = nXStart; aRect.Right() = nXEnd; @@ -1040,7 +1040,7 @@ void Edit::ImplPaintBorder(vcl::RenderContext& rRenderContext, long nXStart, lon // need to mirror in case border is not RTL but edit is (or vice versa) // mirror - Rectangle aBounds(aClipRgn.GetBoundRect()); + tools::Rectangle aBounds(aClipRgn.GetBoundRect()); int xNew = GetOutputSizePixel().Width() - aBounds.GetWidth() - aBounds.Left(); aClipRgn.Move(xNew - aBounds.Left(), 0); @@ -1060,13 +1060,13 @@ void Edit::ImplPaintBorder(vcl::RenderContext& rRenderContext, long nXStart, lon vcl::Region oldRgn(pBorder->GetClipRegion()); pBorder->SetClipRegion(aClipRgn); - pBorder->Paint(*pBorder, Rectangle()); + pBorder->Paint(*pBorder, tools::Rectangle()); pBorder->SetClipRegion(oldRgn); } else { - pBorder->Paint(*pBorder, Rectangle()); + pBorder->Paint(*pBorder, tools::Rectangle()); } } } @@ -1719,7 +1719,7 @@ void Edit::FillLayoutData() const const_cast<Edit*>(this)->Invalidate(); } -void Edit::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRectangle) +void Edit::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRectangle) { if (!mpSubEdit) ImplRepaint(rRenderContext, rRectangle); @@ -1759,7 +1759,7 @@ void Edit::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, DrawF bool bBackground = !(nFlags & DrawFlags::NoBackground) && IsControlBackground(); if ( bBorder || bBackground ) { - Rectangle aRect( aPos, aSize ); + tools::Rectangle aRect( aPos, aSize ); if ( bBorder ) { ImplDrawFrame( pDev, aRect ); @@ -1790,7 +1790,7 @@ void Edit::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, DrawF const long nOnePixel = GetDrawPixel( pDev, 1 ); const long nOffX = 3*nOnePixel; DrawTextFlags nTextStyle = DrawTextFlags::VCenter; - Rectangle aTextRect( aPos, aSize ); + tools::Rectangle aTextRect( aPos, aSize ); if ( GetStyle() & WB_CENTER ) nTextStyle |= DrawTextFlags::Center; @@ -1812,7 +1812,7 @@ void Edit::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, DrawF ((nOffY+nTextHeight) > aSize.Height()) || ((nOffX+nTextWidth) > aSize.Width()) ) { - Rectangle aClip( aPos, aSize ); + tools::Rectangle aClip( aPos, aSize ); if ( nTextHeight > aSize.Height() ) aClip.Bottom() += nTextHeight-aSize.Height()+1; // prevent HP printers from 'optimizing' pDev->IntersectClipRegion( aClip ); @@ -2146,10 +2146,10 @@ void Edit::Command( const CommandEvent& rCEvt ) long nTH = GetTextHeight(); Point aPos( mnXOffset, ImplGetTextYPosition() ); - std::unique_ptr<Rectangle[]> aRects(new Rectangle[ mpIMEInfos->nLen ]); + std::unique_ptr<tools::Rectangle[]> aRects(new tools::Rectangle[ mpIMEInfos->nLen ]); for ( int nIndex = 0; nIndex < mpIMEInfos->nLen; ++nIndex ) { - Rectangle aRect( aPos, Size( 10, nTH ) ); + tools::Rectangle aRect( aPos, Size( 10, nTH ) ); aRect.Left() = pDX[2*(nIndex+mpIMEInfos->nPos)] + mnXOffset + ImplGetExtraXOffset(); aRects[ nIndex ] = aRect; } @@ -2282,7 +2282,7 @@ void Edit::ImplShowDDCursor() { long nTextWidth = GetTextWidth( maText.toString(), 0, mpDDInfo->nDropPos ); long nTextHeight = GetTextHeight(); - Rectangle aCursorRect( Point( nTextWidth + mnXOffset, (GetOutputSize().Height()-nTextHeight)/2 ), Size( 2, nTextHeight ) ); + tools::Rectangle aCursorRect( Point( nTextWidth + mnXOffset, (GetOutputSize().Height()-nTextHeight)/2 ), Size( 2, nTextHeight ) ); mpDDInfo->aCursor.SetWindow( this ); mpDDInfo->aCursor.SetPos( aCursorRect.TopLeft() ); mpDDInfo->aCursor.SetSize( aCursorRect.GetSize() ); @@ -2725,8 +2725,8 @@ Size Edit::CalcMinimumSizeForText(const OUString &rString) const // ask NWF what if it has an opinion, too ImplControlValue aControlValue; - Rectangle aRect( Point( 0, 0 ), aSize ); - Rectangle aContent, aBound; + tools::Rectangle aRect( Point( 0, 0 ), aSize ); + tools::Rectangle aContent, aBound; if (GetNativeControlRegion(eCtrlType, ControlPart::Entire, aRect, ControlState::NONE, aControlValue, OUString(), aBound, aContent)) { diff --git a/vcl/source/control/fixed.cxx b/vcl/source/control/fixed.cxx index da3202945acf..42b6cc1ef1ab 100644 --- a/vcl/source/control/fixed.cxx +++ b/vcl/source/control/fixed.cxx @@ -182,7 +182,7 @@ void FixedText::ImplDraw(OutputDevice* pDev, DrawFlags nDrawFlags, if( bFillLayout ) (mpControlData->mpLayoutData->m_aDisplayText).clear(); - const Rectangle aRect(aPos, rSize); + const tools::Rectangle aRect(aPos, rSize); DrawControlText(*pDev, aRect, aText, nTextStyle, bFillLayout ? &mpControlData->mpLayoutData->m_aUnicodeBoundRects : nullptr, bFillLayout ? &mpControlData->mpLayoutData->m_aDisplayText : nullptr); @@ -213,7 +213,7 @@ void FixedText::ApplySettings(vcl::RenderContext& rRenderContext) } } -void FixedText::Paint( vcl::RenderContext& rRenderContext, const Rectangle& ) +void FixedText::Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& ) { ImplDraw(&rRenderContext, DrawFlags::NONE, Point(), GetOutputSizePixel()); } @@ -240,7 +240,7 @@ void FixedText::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, bool bBackground = !(nFlags & DrawFlags::NoBackground) && IsControlBackground(); if ( bBorder || bBackground ) { - Rectangle aRect( aPos, aSize ); + tools::Rectangle aRect( aPos, aSize ); if ( bBorder ) { ImplDrawFrame( pDev, aRect ); @@ -321,7 +321,7 @@ Size FixedText::getTextDimensions(Control const *pControl, const OUString &rTxt, if ( !( pControl->GetStyle() & WB_NOLABEL ) ) nStyle |= DrawTextFlags::Mnemonic; - return pControl->GetTextRect(Rectangle( Point(), Size(nMaxWidth, 0x7fffffff)), + return pControl->GetTextRect(tools::Rectangle( Point(), Size(nMaxWidth, 0x7fffffff)), rTxt, nStyle).GetSize(); } @@ -545,7 +545,7 @@ void FixedLine::ImplDraw(vcl::RenderContext& rRenderContext) else { DrawTextFlags nStyle = DrawTextFlags::Mnemonic | DrawTextFlags::Left | DrawTextFlags::VCenter | DrawTextFlags::EndEllipsis; - Rectangle aRect(0, 0, aOutSize.Width(), aOutSize.Height()); + tools::Rectangle aRect(0, 0, aOutSize.Width(), aOutSize.Height()); const StyleSettings& rStyleSettings = rRenderContext.GetSettings().GetStyleSettings(); if (nWinStyle & WB_CENTER) nStyle |= DrawTextFlags::Center; @@ -604,7 +604,7 @@ void FixedLine::ApplySettings(vcl::RenderContext& rRenderContext) } } -void FixedLine::Paint(vcl::RenderContext& rRenderContext, const Rectangle&) +void FixedLine::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&) { ImplDraw(rRenderContext); } @@ -736,7 +736,7 @@ void FixedBitmap::ApplySettings(vcl::RenderContext& rRenderContext) } } -void FixedBitmap::Paint(vcl::RenderContext& rRenderContext, const Rectangle&) +void FixedBitmap::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&) { ImplDraw(&rRenderContext, DrawFlags::NONE, Point(), GetOutputSizePixel()); } @@ -746,7 +746,7 @@ void FixedBitmap::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize { Point aPos = pDev->LogicToPixel( rPos ); Size aSize = pDev->LogicToPixel( rSize ); - Rectangle aRect( aPos, aSize ); + tools::Rectangle aRect( aPos, aSize ); pDev->Push(); pDev->SetMapMode(); @@ -881,7 +881,7 @@ void FixedImage::ApplySettings(vcl::RenderContext& rRenderContext) } -void FixedImage::Paint(vcl::RenderContext& rRenderContext, const Rectangle&) +void FixedImage::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&) { ImplDraw(&rRenderContext, DrawFlags::NONE, Point(), GetOutputSizePixel()); } @@ -896,7 +896,7 @@ void FixedImage::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, { Point aPos = pDev->LogicToPixel( rPos ); Size aSize = pDev->LogicToPixel( rSize ); - Rectangle aRect( aPos, aSize ); + tools::Rectangle aRect( aPos, aSize ); pDev->Push(); pDev->SetMapMode(); diff --git a/vcl/source/control/fixedhyper.cxx b/vcl/source/control/fixedhyper.cxx index 6843485e14f1..052973d92ef4 100644 --- a/vcl/source/control/fixedhyper.cxx +++ b/vcl/source/control/fixedhyper.cxx @@ -102,14 +102,14 @@ void FixedHyperlink::RequestHelp( const HelpEvent& rHEvt ) void FixedHyperlink::GetFocus() { SetTextColor( Color( COL_LIGHTRED ) ); - Invalidate(Rectangle(Point(), GetSizePixel())); - ShowFocus( Rectangle( Point( 1, 1 ), Size( m_nTextLen + 4, GetSizePixel().Height() - 2 ) ) ); + Invalidate(tools::Rectangle(Point(), GetSizePixel())); + ShowFocus( tools::Rectangle( Point( 1, 1 ), Size( m_nTextLen + 4, GetSizePixel().Height() - 2 ) ) ); } void FixedHyperlink::LoseFocus() { SetTextColor( GetControlForeground() ); - Invalidate(Rectangle(Point(), GetSizePixel())); + Invalidate(tools::Rectangle(Point(), GetSizePixel())); HideFocus(); } diff --git a/vcl/source/control/group.cxx b/vcl/source/control/group.cxx index 48d3ffdbdfc6..9d8070cc9b01 100644 --- a/vcl/source/control/group.cxx +++ b/vcl/source/control/group.cxx @@ -99,7 +99,7 @@ void GroupBox::ImplDraw( OutputDevice* pDev, DrawFlags nDrawFlags, long nTextOff; const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); OUString aText( GetText() ); - Rectangle aRect( rPos, rSize ); + tools::Rectangle aRect( rPos, rSize ); DrawTextFlags nTextStyle = DrawTextFlags::Left | DrawTextFlags::Top | DrawTextFlags::EndEllipsis | DrawTextFlags::Mnemonic; if ( GetStyle() & WB_NOLABEL ) @@ -188,7 +188,7 @@ void GroupBox::FillLayoutData() const const_cast<GroupBox*>(this)->ImplDraw( const_cast<GroupBox*>(this), DrawFlags::NONE, Point(), GetOutputSizePixel(), true ); } -void GroupBox::Paint( vcl::RenderContext& rRenderContext, const Rectangle& ) +void GroupBox::Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& ) { ImplDraw(&rRenderContext, DrawFlags::NONE, Point(), GetOutputSizePixel()); } diff --git a/vcl/source/control/imgctrl.cxx b/vcl/source/control/imgctrl.cxx index 625706f13a4a..f3d1942eabd6 100644 --- a/vcl/source/control/imgctrl.cxx +++ b/vcl/source/control/imgctrl.cxx @@ -47,7 +47,7 @@ void ImageControl::Resize() namespace { - Size lcl_calcPaintSize( const Rectangle& _rPaintRect, const Size& _rBitmapSize ) + Size lcl_calcPaintSize( const tools::Rectangle& _rPaintRect, const Size& _rBitmapSize ) { const Size aPaintSize = _rPaintRect.GetSize(); @@ -58,7 +58,7 @@ namespace return Size( long( _rBitmapSize.Width() * nRatioMin ), long( _rBitmapSize.Height() * nRatioMin ) ); } - Point lcl_centerWithin( const Rectangle& _rArea, const Size& _rObjectSize ) + Point lcl_centerWithin( const tools::Rectangle& _rArea, const Size& _rObjectSize ) { Point aPos( _rArea.TopLeft() ); aPos.X() += ( _rArea.GetWidth() - _rObjectSize.Width() ) / 2; @@ -77,7 +77,7 @@ void ImageControl::ImplDraw(OutputDevice& rDev, DrawFlags nDrawFlags, const Poin } const Image& rImage( GetModeImage() ); - const Rectangle aDrawRect( rPos, rSize ); + const tools::Rectangle aDrawRect( rPos, rSize ); if (!rImage) { OUString sText( GetText() ); @@ -127,7 +127,7 @@ void ImageControl::ImplDraw(OutputDevice& rDev, DrawFlags nDrawFlags, const Poin } // switch ( mnScaleMode ) } -void ImageControl::Paint(vcl::RenderContext& rRenderContext, const Rectangle& /*rRect*/) +void ImageControl::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& /*rRect*/) { ImplDraw(rRenderContext, DrawFlags::NONE, Point(), GetOutputSizePixel()); @@ -136,7 +136,7 @@ void ImageControl::Paint(vcl::RenderContext& rRenderContext, const Rectangle& /* vcl::Window* pBorderWindow = GetWindow(GetWindowType::Border); bool bFlat = (GetBorderStyle() == WindowBorderStyle::MONO); - Rectangle aRect(Point(0,0), pBorderWindow->GetOutputSizePixel()); + tools::Rectangle aRect(Point(0,0), pBorderWindow->GetOutputSizePixel()); Color oldLineCol = pBorderWindow->GetLineColor(); Color oldFillCol = pBorderWindow->GetFillColor(); pBorderWindow->SetFillColor(); @@ -157,7 +157,7 @@ void ImageControl::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSiz { const Point aPos = pDev->LogicToPixel( rPos ); const Size aSize = pDev->LogicToPixel( rSize ); - Rectangle aRect( aPos, aSize ); + tools::Rectangle aRect( aPos, aSize ); pDev->Push(); pDev->SetMapMode(); diff --git a/vcl/source/control/imp_listbox.cxx b/vcl/source/control/imp_listbox.cxx index c824c628b896..96baf7ac1a4f 100644 --- a/vcl/source/control/imp_listbox.cxx +++ b/vcl/source/control/imp_listbox.cxx @@ -628,7 +628,7 @@ void ImplListBoxWindow::ImplUpdateEntryMetrics( ImplEntryType& rEntry ) // set the current size to a large number // GetTextRect should shrink it to the actual size aCurSize.Height() = 0x7fffff; - Rectangle aTextRect( Point( 0, 0 ), aCurSize ); + tools::Rectangle aTextRect( Point( 0, 0 ), aCurSize ); aTextRect = GetTextRect( aTextRect, rEntry.maStr, DrawTextFlags::WordBreak | DrawTextFlags::MultiLine ); aMetrics.nTextWidth = aTextRect.GetWidth(); if( aMetrics.nTextWidth > mnMaxTxtWidth ) @@ -895,7 +895,7 @@ void ImplListBoxWindow::MouseMove( const MouseEvent& rMEvt ) else if ( ( ( !mbMulti && IsMouseMoveSelect() ) || mbStackMode ) && mpEntryList->GetEntryCount() ) { Point aPoint; - Rectangle aRect( aPoint, GetOutputSizePixel() ); + tools::Rectangle aRect( aPoint, GetOutputSizePixel() ); if( aRect.IsInside( rMEvt.GetPosPixel() ) ) { if ( IsMouseMoveSelect() ) @@ -1166,7 +1166,7 @@ bool ImplListBoxWindow::SelectEntries( sal_Int32 nSelect, LB_EVENT_TYPE eLET, bo void ImplListBoxWindow::Tracking( const TrackingEvent& rTEvt ) { Point aPoint; - Rectangle aRect( aPoint, GetOutputSizePixel() ); + tools::Rectangle aRect( aPoint, GetOutputSizePixel() ); bool bInside = aRect.IsInside( rTEvt.GetMouseEvent().GetPosPixel() ); if( rTEvt.IsTrackingCanceled() || rTEvt.IsTrackingEnded() ) // MouseButtonUp @@ -1700,7 +1700,7 @@ void ImplListBoxWindow::ImplPaint(vcl::RenderContext& rRenderContext, sal_Int32 long nWidth = GetOutputSizePixel().Width(); long nY = mpEntryList->GetAddedHeight(nPos, mnTop); - Rectangle aRect(Point(0, nY), Size(nWidth, pEntry->mnHeight)); + tools::Rectangle aRect(Point(0, nY), Size(nWidth, pEntry->mnHeight)); if (mpEntryList->IsEntryPosSelected(nPos)) { @@ -1806,7 +1806,7 @@ void ImplListBoxWindow::DrawEntry(vcl::RenderContext& rRenderContext, sal_Int32 if ((pEntry->mnFlags & ListBoxEntryFlags::MultiLine)) nMaxWidth = GetOutputSizePixel().Width() - 2 * mnBorder; - Rectangle aTextRect(Point(mnBorder - mnLeft, nY), + tools::Rectangle aTextRect(Point(mnBorder - mnLeft, nY), Size(nMaxWidth, pEntry->mnHeight)); if (!bDrawTextAtImagePos && (mpEntryList->HasEntryImage(nPos) || IsUserDrawEnabled())) @@ -1852,10 +1852,10 @@ void ImplListBoxWindow::DrawEntry(vcl::RenderContext& rRenderContext, sal_Int32 void ImplListBoxWindow::FillLayoutData() const { mpControlData->mpLayoutData.reset( new vcl::ControlLayoutData ); - const_cast<ImplListBoxWindow*>(this)->Invalidate(Rectangle(Point(0, 0), GetOutputSize())); + const_cast<ImplListBoxWindow*>(this)->Invalidate(tools::Rectangle(Point(0, 0), GetOutputSize())); } -void ImplListBoxWindow::ImplDoPaint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) +void ImplListBoxWindow::ImplDoPaint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) { sal_Int32 nCount = mpEntryList->GetEntryCount(); @@ -1885,7 +1885,7 @@ void ImplListBoxWindow::ImplDoPaint(vcl::RenderContext& rRenderContext, const Re ImplShowFocusRect(); } -void ImplListBoxWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) +void ImplListBoxWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) { ImplDoPaint(rRenderContext, rRect); } @@ -2030,12 +2030,12 @@ Size ImplListBoxWindow::CalcSize(sal_Int32 nMaxLines) const return aSz; } -Rectangle ImplListBoxWindow::GetBoundingRectangle( sal_Int32 nItem ) const +tools::Rectangle ImplListBoxWindow::GetBoundingRectangle( sal_Int32 nItem ) const { const ImplEntryType* pEntry = mpEntryList->GetEntryPtr( nItem ); Size aSz( GetSizePixel().Width(), pEntry ? pEntry->mnHeight : GetEntryHeight() ); long nY = mpEntryList->GetAddedHeight( nItem, GetTopEntry() ) + GetEntryList()->GetMRUCount()*GetEntryHeight(); - Rectangle aRect( Point( 0, nY ), aSz ); + tools::Rectangle aRect( Point( 0, nY ), aSz ); return aRect; } @@ -2644,7 +2644,7 @@ void ImplWin::ImplDraw(vcl::RenderContext& rRenderContext, bool bLayout) sal_Int32 nLeft, nTop, nRight, nBottom; pWin->GetBorder( nLeft, nTop, nRight, nBottom ); Point aPoint( -nLeft, -nTop ); - Rectangle aCtrlRegion( aPoint - GetPosPixel(), pWin->GetSizePixel() ); + tools::Rectangle aCtrlRegion( aPoint - GetPosPixel(), pWin->GetSizePixel() ); bool bMouseOver = false; vcl::Window *pChild = pWin->GetWindow( GetWindowType::FirstChild ); @@ -2658,7 +2658,7 @@ void ImplWin::ImplDraw(vcl::RenderContext& rRenderContext, bool bLayout) WinBits nParentStyle = pWin->GetStyle(); if( ! (nParentStyle & WB_BORDER) || (nParentStyle & WB_NOBORDER) ) { - Rectangle aParentRect( Point( 0, 0 ), pWin->GetSizePixel() ); + tools::Rectangle aParentRect( Point( 0, 0 ), pWin->GetSizePixel() ); pWin->DrawNativeControl( ControlType::Listbox, ControlPart::Entire, aParentRect, nState, aControlValue, OUString() ); } @@ -2751,7 +2751,7 @@ void ImplWin::ApplySettings(vcl::RenderContext& rRenderContext) rRenderContext.SetBackground(rStyleSettings.GetFieldColor()); } -void ImplWin::Paint( vcl::RenderContext& rRenderContext, const Rectangle& ) +void ImplWin::Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& ) { ImplDraw(rRenderContext); } @@ -2812,7 +2812,7 @@ void ImplWin::DrawEntry(vcl::RenderContext& rRenderContext, bool bDrawImage, boo else nTextStyle |= DrawTextFlags::Left; - Rectangle aTextRect( Point( nBorder, 0 ), Size( aOutSz.Width()-2*nBorder, aOutSz.Height() ) ); + tools::Rectangle aTextRect( Point( nBorder, 0 ), Size( aOutSz.Width()-2*nBorder, aOutSz.Height() ) ); if ( !bDrawTextAtImagePos && ( bImage || IsUserDrawEnabled() ) ) { @@ -2869,14 +2869,14 @@ void ImplWin::LoseFocus() Control::LoseFocus(); } -void ImplWin::ShowFocus(const Rectangle& rRect) +void ImplWin::ShowFocus(const tools::Rectangle& rRect) { if (IsNativeControlSupported(ControlType::Listbox, ControlPart::Focus)) { ImplControlValue aControlValue; vcl::Window *pWin = GetParent(); - Rectangle aParentRect(Point(0, 0), pWin->GetSizePixel()); + tools::Rectangle aParentRect(Point(0, 0), pWin->GetSizePixel()); pWin->DrawNativeControl(ControlType::Listbox, ControlPart::Focus, aParentRect, ControlState::FOCUSED, aControlValue, OUString()); } @@ -2962,7 +2962,7 @@ void ImplListBoxFloatingWindow::setPosSizePixel( long nX, long nY, long nWidth, aPos.Y() = nY; sal_uInt16 nIndex; - SetPosPixel( ImplCalcPos( this, Rectangle( aPos, GetParent()->GetSizePixel() ), FloatWinPopupFlags::Down, nIndex ) ); + SetPosPixel( ImplCalcPos( this, tools::Rectangle( aPos, GetParent()->GetSizePixel() ), FloatWinPopupFlags::Down, nIndex ) ); } // if( !IsReallyVisible() ) @@ -3082,7 +3082,7 @@ void ImplListBoxFloatingWindow::StartFloat( bool bStartTracking ) aSz.Width() -= nLeft + nRight; aSz.Height() -= nTop + nBottom; } - Rectangle aRect( aPos, aSz ); + tools::Rectangle aRect( aPos, aSz ); // check if the control's parent is un-mirrored which is the case for form controls in a mirrored UI // where the document is unmirrored diff --git a/vcl/source/control/listbox.cxx b/vcl/source/control/listbox.cxx index eedb2cbe4110..c05c63b8dea2 100644 --- a/vcl/source/control/listbox.cxx +++ b/vcl/source/control/listbox.cxx @@ -106,9 +106,9 @@ void ListBox::ImplInit( vcl::Window* pParent, WinBits nStyle ) IsNativeControlSupported( ControlType::Listbox, ControlPart::Entire ) ) { ImplControlValue aControlValue; - Rectangle aCtrlRegion( Point( 0, 0 ), Size( 20, mnDDHeight ) ); - Rectangle aBoundingRgn( aCtrlRegion ); - Rectangle aContentRgn( aCtrlRegion ); + tools::Rectangle aCtrlRegion( Point( 0, 0 ), Size( 20, mnDDHeight ) ); + tools::Rectangle aBoundingRgn( aCtrlRegion ); + tools::Rectangle aContentRgn( aCtrlRegion ); if( GetNativeControlRegion( ControlType::Listbox, ControlPart::Entire, aCtrlRegion, ControlState::ENABLED, aControlValue, OUString(), aBoundingRgn, aContentRgn ) ) @@ -347,7 +347,7 @@ void ListBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, Dr bool bBackground = !(nFlags & DrawFlags::NoBackground) && IsControlBackground(); if ( bBorder || bBackground ) { - Rectangle aRect( aPos, aSize ); + tools::Rectangle aRect( aPos, aSize ); if ( bBorder ) { ImplDrawFrame( pDev, aRect ); @@ -380,7 +380,7 @@ void ListBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, Dr const long nOnePixel = GetDrawPixel( pDev, 1 ); const long nOffX = 3*nOnePixel; DrawTextFlags nTextStyle = DrawTextFlags::VCenter; - Rectangle aTextRect( aPos, aSize ); + tools::Rectangle aTextRect( aPos, aSize ); if ( GetStyle() & WB_CENTER ) nTextStyle |= DrawTextFlags::Center; @@ -404,7 +404,7 @@ void ListBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, Dr ((nOffY+nTextHeight) > aSize.Height()) || ((nOffX+nTextWidth) > aSize.Width()) ) { - Rectangle aClip( aPos, aSize ); + tools::Rectangle aClip( aPos, aSize ); if ( nTextHeight > aSize.Height() ) aClip.Bottom() += nTextHeight-aSize.Height()+1; // So that HP Printers don't optimize this away pDev->IntersectClipRegion( aClip ); @@ -416,7 +416,7 @@ void ListBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, Dr { long nTextHeight = pDev->GetTextHeight(); sal_uInt16 nLines = ( nTextHeight > 0 ) ? (sal_uInt16)(aSize.Height() / nTextHeight) : 1; - Rectangle aClip( aPos, aSize ); + tools::Rectangle aClip( aPos, aSize ); pDev->IntersectClipRegion( aClip ); @@ -430,7 +430,7 @@ void ListBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, Dr if ( bSelected ) { pDev->SetFillColor( COL_BLACK ); - pDev->DrawRect( Rectangle( Point( aPos.X(), aPos.Y() + n*nTextHeight ), + pDev->DrawRect( tools::Rectangle( Point( aPos.X(), aPos.Y() + n*nTextHeight ), Point( aPos.X() + aSize.Width(), aPos.Y() + (n+1)*nTextHeight + 2*nOnePixel ) ) ); pDev->SetFillColor(); pDev->SetTextColor( COL_WHITE ); @@ -580,10 +580,10 @@ void ListBox::Resize() vcl::Window *pBorder = GetWindow( GetWindowType::Border ); ImplControlValue aControlValue; Point aPoint; - Rectangle aContent, aBound; + tools::Rectangle aContent, aBound; // Use the full extent of the control - Rectangle aArea( aPoint, pBorder->GetOutputSizePixel() ); + tools::Rectangle aArea( aPoint, pBorder->GetOutputSizePixel() ); if ( GetNativeControlRegion( ControlType::Listbox, ControlPart::ButtonDown, aArea, ControlState::NONE, aControlValue, OUString(), aBound, aContent) ) @@ -1125,10 +1125,10 @@ bool ListBox::IsInDropDown() const return mpFloatWin && mpFloatWin->IsInPopupMode(); } -Rectangle ListBox::GetBoundingRectangle( sal_Int32 nItem ) const +tools::Rectangle ListBox::GetBoundingRectangle( sal_Int32 nItem ) const { - Rectangle aRect = mpImplLB->GetMainWindow()->GetBoundingRectangle( nItem ); - Rectangle aOffset = mpImplLB->GetMainWindow()->GetWindowExtentsRelative( static_cast<vcl::Window*>(const_cast<ListBox *>(this)) ); + tools::Rectangle aRect = mpImplLB->GetMainWindow()->GetBoundingRectangle( nItem ); + tools::Rectangle aOffset = mpImplLB->GetMainWindow()->GetWindowExtentsRelative( static_cast<vcl::Window*>(const_cast<ListBox *>(this)) ); aRect.Move( aOffset.TopLeft().X(), aOffset.TopLeft().Y() ); return aRect; } @@ -1184,9 +1184,9 @@ Size ListBox::CalcMinimumSize() const // See how large the edit area inside is to estimate what is needed for the dropdown ImplControlValue aControlValue; Point aPoint; - Rectangle aContent, aBound; + tools::Rectangle aContent, aBound; Size aTestSize( 100, 20 ); - Rectangle aArea( aPoint, aTestSize ); + tools::Rectangle aArea( aPoint, aTestSize ); if( GetNativeControlRegion( ControlType::Listbox, ControlPart::SubEdit, aArea, ControlState::NONE, aControlValue, OUString(), aBound, aContent) ) { @@ -1202,8 +1202,8 @@ Size ListBox::CalcMinimumSize() const if (IsDropDownBox()) // Check minimum height of dropdown box { ImplControlValue aControlValue; - Rectangle aRect( Point( 0, 0 ), aSz ); - Rectangle aContent, aBound; + tools::Rectangle aRect( Point( 0, 0 ), aSz ); + tools::Rectangle aContent, aBound; if( GetNativeControlRegion( ControlType::Listbox, ControlPart::Entire, aRect, ControlState::NONE, aControlValue, OUString(), aBound, aContent) ) { @@ -1388,9 +1388,9 @@ void ListBox::EnableMirroring() mpImplLB->EnableMirroring(); } -Rectangle ListBox::GetDropDownPosSizePixel() const +tools::Rectangle ListBox::GetDropDownPosSizePixel() const { - return mpFloatWin ? mpFloatWin->GetWindowExtentsRelative( const_cast<ListBox*>(this) ) : Rectangle(); + return mpFloatWin ? mpFloatWin->GetWindowExtentsRelative( const_cast<ListBox*>(this) ) : tools::Rectangle(); } const Wallpaper& ListBox::GetDisplayBackground() const diff --git a/vcl/source/control/menubtn.cxx b/vcl/source/control/menubtn.cxx index cc30eb548cc5..79d09a6687f9 100644 --- a/vcl/source/control/menubtn.cxx +++ b/vcl/source/control/menubtn.cxx @@ -49,13 +49,13 @@ void MenuButton::ExecuteMenu() if (mpMenu) { Point aPos(0, 1); - Rectangle aRect(aPos, aSize ); + tools::Rectangle aRect(aPos, aSize ); mnCurItemId = mpMenu->Execute(this, aRect, PopupMenuFlags::ExecuteDown); } else { Point aPos(GetParent()->OutputToScreenPixel(GetPosPixel())); - Rectangle aRect(aPos, aSize ); + tools::Rectangle aRect(aPos, aSize ); mpFloatingWindow->StartPopupMode(aRect, FloatWinPopupFlags::Down | FloatWinPopupFlags::GrabFocus); } SetPressed(false); diff --git a/vcl/source/control/morebtn.cxx b/vcl/source/control/morebtn.cxx index 9509e152e21f..cb66fcd005c1 100644 --- a/vcl/source/control/morebtn.cxx +++ b/vcl/source/control/morebtn.cxx @@ -108,7 +108,7 @@ void MoreButton::Click() // Adapt dialogbox Point aPos( pParent->GetPosPixel() ); - Rectangle aDeskRect( pParent->ImplGetFrameWindow()->GetDesktopRectPixel() ); + tools::Rectangle aDeskRect( pParent->ImplGetFrameWindow()->GetDesktopRectPixel() ); aSize.Height() += nDeltaPixel; if ( (aPos.Y()+aSize.Height()) > aDeskRect.Bottom() ) diff --git a/vcl/source/control/notebookbar.cxx b/vcl/source/control/notebookbar.cxx index a96a86d1ac27..3706c090a703 100644 --- a/vcl/source/control/notebookbar.cxx +++ b/vcl/source/control/notebookbar.cxx @@ -175,7 +175,7 @@ void NotebookBar::UpdateBackground() else SetBackground(rStyleSettings.GetMenuBarColor()); - Invalidate(Rectangle(Point(0,0), GetSizePixel())); + Invalidate(tools::Rectangle(Point(0,0), GetSizePixel())); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/source/control/prgsbar.cxx b/vcl/source/control/prgsbar.cxx index 67619d8d85a7..240756b921d5 100644 --- a/vcl/source/control/prgsbar.cxx +++ b/vcl/source/control/prgsbar.cxx @@ -147,10 +147,10 @@ void ProgressBar::ImplDrawProgress(vcl::RenderContext& rRenderContext, sal_uInt1 ::DrawProgress(this, rRenderContext, maPos, PROGRESSBAR_OFFSET, mnPrgsWidth, mnPrgsHeight, nOldPerc * 100, nNewPerc * 100, mnPercentCount, - Rectangle(Point(), GetSizePixel())); + tools::Rectangle(Point(), GetSizePixel())); } -void ProgressBar::Paint(vcl::RenderContext& rRenderContext, const Rectangle& /*rRect*/) +void ProgressBar::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& /*rRect*/) { ImplDrawProgress(rRenderContext, mnPreviousPercent, mnPercent); } diff --git a/vcl/source/control/scrbar.cxx b/vcl/source/control/scrbar.cxx index 85207710d4b6..40dfd14aa0f8 100644 --- a/vcl/source/control/scrbar.cxx +++ b/vcl/source/control/scrbar.cxx @@ -241,8 +241,8 @@ void ScrollBar::ImplCalc( bool bUpdate ) { Size aOldSize = getCurrentCalcSize(); - const Rectangle aControlRegion( Point(0,0), aSize ); - Rectangle aBtn1Region, aBtn2Region, aTrackRegion, aBoundingRegion; + const tools::Rectangle aControlRegion( Point(0,0), aSize ); + tools::Rectangle aBtn1Region, aBtn2Region, aTrackRegion, aBoundingRegion; if ( GetStyle() & WB_HORZ ) { @@ -267,7 +267,7 @@ void ScrollBar::ImplCalc( bool bUpdate ) aControlRegion, ControlState::NONE, ImplControlValue(), OUString(), aBoundingRegion, aTrackRegion ) ) maTrackRect = aTrackRegion; else - maTrackRect = Rectangle( maBtn1Rect.TopRight(), maBtn2Rect.BottomLeft() ); + maTrackRect = tools::Rectangle( maBtn1Rect.TopRight(), maBtn2Rect.BottomLeft() ); // Check if available space is big enough for thumb ( min thumb size = ScrBar width/height ) mnThumbPixRange = maTrackRect.Right() - maTrackRect.Left(); @@ -308,7 +308,7 @@ void ScrollBar::ImplCalc( bool bUpdate ) aControlRegion, ControlState::NONE, ImplControlValue(), OUString(), aBoundingRegion, aTrackRegion ) ) maTrackRect = aTrackRegion; else - maTrackRect = Rectangle( maBtn1Rect.BottomLeft()+Point(0,1), maBtn2Rect.TopRight() ); + maTrackRect = tools::Rectangle( maBtn1Rect.BottomLeft()+Point(0,1), maBtn2Rect.TopRight() ); // Check if available space is big enough for thumb mnThumbPixRange = maTrackRect.Bottom() - maTrackRect.Top(); @@ -454,7 +454,7 @@ bool ScrollBar::ImplDrawNative(vcl::RenderContext& rRenderContext, sal_uInt16 nD if (IsMouseOver()) { - Rectangle* pRect = ImplFindPartRect(GetPointerPosPixel()); + tools::Rectangle* pRect = ImplFindPartRect(GetPointerPosPixel()); if (pRect) { if (pRect == &maThumbRect) @@ -470,14 +470,14 @@ bool ScrollBar::ImplDrawNative(vcl::RenderContext& rRenderContext, sal_uInt16 nD } } - Rectangle aCtrlRegion; + tools::Rectangle aCtrlRegion; aCtrlRegion.Union(maBtn1Rect); aCtrlRegion.Union(maBtn2Rect); aCtrlRegion.Union(maPage1Rect); aCtrlRegion.Union(maPage2Rect); aCtrlRegion.Union(maThumbRect); - Rectangle aRequestedRegion(Point(0,0), GetOutputSizePixel()); + tools::Rectangle aRequestedRegion(Point(0,0), GetOutputSizePixel()); // if the actual native control region is smaller then the region that // we requested the control to draw in, then draw a background rectangle // to avoid drawing artifacts in the uncovered region @@ -499,8 +499,8 @@ bool ScrollBar::ImplDrawNative(vcl::RenderContext& rRenderContext, sal_uInt16 nD { ControlPart part1 = bHorz ? ControlPart::TrackHorzLeft : ControlPart::TrackVertUpper; ControlPart part2 = bHorz ? ControlPart::TrackHorzRight : ControlPart::TrackVertLower; - Rectangle aCtrlRegion1(maPage1Rect); - Rectangle aCtrlRegion2(maPage2Rect); + tools::Rectangle aCtrlRegion1(maPage1Rect); + tools::Rectangle aCtrlRegion2(maPage2Rect); ControlState nState1 = (IsEnabled() ? ControlState::ENABLED : ControlState::NONE) | (HasFocus() ? ControlState::FOCUSED : ControlState::NONE); ControlState nState2 = nState1; @@ -510,7 +510,7 @@ bool ScrollBar::ImplDrawNative(vcl::RenderContext& rRenderContext, sal_uInt16 nD if (IsMouseOver()) { - Rectangle* pRect = ImplFindPartRect(GetPointerPosPixel()); + tools::Rectangle* pRect = ImplFindPartRect(GetPointerPosPixel()); if (pRect) { if (pRect == &maPage1Rect) @@ -530,8 +530,8 @@ bool ScrollBar::ImplDrawNative(vcl::RenderContext& rRenderContext, sal_uInt16 nD { ControlPart part1 = bHorz ? ControlPart::ButtonLeft : ControlPart::ButtonUp; ControlPart part2 = bHorz ? ControlPart::ButtonRight : ControlPart::ButtonDown; - Rectangle aCtrlRegion1(maBtn1Rect); - Rectangle aCtrlRegion2(maBtn2Rect); + tools::Rectangle aCtrlRegion1(maBtn1Rect); + tools::Rectangle aCtrlRegion2(maBtn2Rect); ControlState nState1 = HasFocus() ? ControlState::FOCUSED : ControlState::NONE; ControlState nState2 = nState1; @@ -550,7 +550,7 @@ bool ScrollBar::ImplDrawNative(vcl::RenderContext& rRenderContext, sal_uInt16 nD if (IsMouseOver()) { - Rectangle* pRect = ImplFindPartRect(GetPointerPosPixel()); + tools::Rectangle* pRect = ImplFindPartRect(GetPointerPosPixel()); if (pRect) { if (pRect == &maBtn1Rect) @@ -569,7 +569,7 @@ bool ScrollBar::ImplDrawNative(vcl::RenderContext& rRenderContext, sal_uInt16 nD if ((nDrawFlags & SCRBAR_DRAW_THUMB) && !maThumbRect.IsEmpty()) { ControlState nState = IsEnabled() ? ControlState::ENABLED : ControlState::NONE; - Rectangle aCtrlRegion(maThumbRect); + tools::Rectangle aCtrlRegion(maThumbRect); if (mnStateFlags & SCRBAR_STATE_THUMB_DOWN) nState |= ControlState::PRESSED; @@ -579,7 +579,7 @@ bool ScrollBar::ImplDrawNative(vcl::RenderContext& rRenderContext, sal_uInt16 nD if (IsMouseOver()) { - Rectangle* pRect = ImplFindPartRect(GetPointerPosPixel()); + tools::Rectangle* pRect = ImplFindPartRect(GetPointerPosPixel()); if (pRect) { if (pRect == &maThumbRect) @@ -597,7 +597,7 @@ bool ScrollBar::ImplDrawNative(vcl::RenderContext& rRenderContext, sal_uInt16 nD void ScrollBar::ImplDraw(vcl::RenderContext& rRenderContext) { DecorationView aDecoView(&rRenderContext); - Rectangle aTempRect; + tools::Rectangle aTempRect; DrawButtonFlags nStyle; const StyleSettings& rStyleSettings = rRenderContext.GetSettings().GetStyleSettings(); SymbolType eSymbolType; @@ -741,7 +741,7 @@ void ScrollBar::ImplDoMouseAction( const Point& rMousePos, bool bCallAction ) bool bIsInside = false; Point aPoint( 0, 0 ); - Rectangle aControlRegion( aPoint, GetOutputSizePixel() ); + tools::Rectangle aControlRegion( aPoint, GetOutputSizePixel() ); switch ( meScrollType ) { @@ -869,7 +869,7 @@ void ScrollBar::MouseButtonDown( const MouseEvent& rMEvt ) bool bDragToMouse = false; Point aPoint( 0, 0 ); - Rectangle aControlRegion( aPoint, GetOutputSizePixel() ); + tools::Rectangle aControlRegion( aPoint, GetOutputSizePixel() ); if ( HitTestNativeScrollbar( bHorizontal? (IsRTLEnabled()? ControlPart::ButtonRight: ControlPart::ButtonLeft): ControlPart::ButtonUp, aControlRegion, rMousePos, bIsInside )? @@ -1102,7 +1102,7 @@ void ScrollBar::ApplySettings(vcl::RenderContext& rRenderContext) rRenderContext.SetBackground(); } -void ScrollBar::Paint(vcl::RenderContext& rRenderContext, const Rectangle&) +void ScrollBar::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&) { ImplDraw(rRenderContext); } @@ -1125,7 +1125,7 @@ IMPL_LINK_NOARG(ScrollBar, ImplAutoTimerHdl, Timer *, void) void ScrollBar::ImplInvert() { - Rectangle aRect( maThumbRect ); + tools::Rectangle aRect( maThumbRect ); if( aRect.getWidth() > 4 ) { aRect.Left() += 2; @@ -1217,13 +1217,13 @@ void ScrollBar::DataChanged( const DataChangedEvent& rDCEvt ) } } -Rectangle* ScrollBar::ImplFindPartRect( const Point& rPt ) +tools::Rectangle* ScrollBar::ImplFindPartRect( const Point& rPt ) { bool bHorizontal = ( GetStyle() & WB_HORZ ) != 0; bool bIsInside = false; Point aPoint( 0, 0 ); - Rectangle aControlRegion( aPoint, GetOutputSizePixel() ); + tools::Rectangle aControlRegion( aPoint, GetOutputSizePixel() ); if( HitTestNativeScrollbar( bHorizontal? (IsRTLEnabled()? ControlPart::ButtonRight: ControlPart::ButtonLeft): ControlPart::ButtonUp, aControlRegion, rPt, bIsInside )? @@ -1268,8 +1268,8 @@ bool ScrollBar::PreNotify( NotifyEvent& rNEvt ) // Trigger a redraw if mouse over state has changed if( IsNativeControlSupported(ControlType::Scrollbar, ControlPart::Entire) ) { - Rectangle* pRect = ImplFindPartRect( GetPointerPosPixel() ); - Rectangle* pLastRect = ImplFindPartRect( GetLastPointerPosPixel() ); + tools::Rectangle* pRect = ImplFindPartRect( GetPointerPosPixel() ); + tools::Rectangle* pLastRect = ImplFindPartRect( GetLastPointerPosPixel() ); if( pRect != pLastRect || pMouseEvt->IsLeaveWindow() || pMouseEvt->IsEnterWindow() ) { vcl::Region aRgn( GetActiveClipRegion() ); @@ -1421,7 +1421,7 @@ Size ScrollBar::GetOptimalSize() const Size ScrollBar::getCurrentCalcSize() const { - Rectangle aCtrlRegion; + tools::Rectangle aCtrlRegion; aCtrlRegion.Union(maBtn1Rect); aCtrlRegion.Union(maBtn2Rect); aCtrlRegion.Union(maPage1Rect); diff --git a/vcl/source/control/slider.cxx b/vcl/source/control/slider.cxx index 5c16e5a96dba..51e894b280c7 100644 --- a/vcl/source/control/slider.cxx +++ b/vcl/source/control/slider.cxx @@ -110,7 +110,7 @@ void Slider::ImplInitSettings() void Slider::ImplUpdateRects( bool bUpdate ) { - Rectangle aOldThumbRect = maThumbRect; + tools::Rectangle aOldThumbRect = maThumbRect; bool bInvalidateAll = false; if ( mnThumbPixRange ) @@ -138,8 +138,8 @@ void Slider::ImplUpdateRects( bool bUpdate ) else maChannel2Rect.SetEmpty(); - const Rectangle aControlRegion( Rectangle( Point(0,0), Size( SLIDER_THUMB_SIZE, 10 ) ) ); - Rectangle aThumbBounds, aThumbContent; + const tools::Rectangle aControlRegion( tools::Rectangle( Point(0,0), Size( SLIDER_THUMB_SIZE, 10 ) ) ); + tools::Rectangle aThumbBounds, aThumbContent; if ( GetNativeControlRegion( ControlType::Slider, ControlPart::ThumbHorz, aControlRegion, ControlState::NONE, ImplControlValue(), OUString(), aThumbBounds, aThumbContent ) ) @@ -172,8 +172,8 @@ void Slider::ImplUpdateRects( bool bUpdate ) else maChannel2Rect.SetEmpty(); - const Rectangle aControlRegion( Rectangle( Point(0,0), Size( 10, SLIDER_THUMB_SIZE ) ) ); - Rectangle aThumbBounds, aThumbContent; + const tools::Rectangle aControlRegion( tools::Rectangle( Point(0,0), Size( 10, SLIDER_THUMB_SIZE ) ) ); + tools::Rectangle aThumbBounds, aThumbContent; if ( GetNativeControlRegion( ControlType::Slider, ControlPart::ThumbVert, aControlRegion, ControlState::NONE, ImplControlValue(), OUString(), aThumbBounds, aThumbContent ) ) @@ -341,7 +341,7 @@ void Slider::ImplDraw(vcl::RenderContext& rRenderContext) sldValue.mnThumbState |= ControlState::ROLLOVER; } - const Rectangle aCtrlRegion(Point(0,0), GetOutputSizePixel()); + const tools::Rectangle aCtrlRegion(Point(0,0), GetOutputSizePixel()); bool bNativeOK = rRenderContext.DrawNativeControl(ControlType::Slider, nPart, aCtrlRegion, nState, sldValue, OUString()); if (bNativeOK) return; @@ -349,7 +349,7 @@ void Slider::ImplDraw(vcl::RenderContext& rRenderContext) if (!maChannel1Rect.IsEmpty()) { long nRectSize; - Rectangle aRect = maChannel1Rect; + tools::Rectangle aRect = maChannel1Rect; rRenderContext.SetLineColor(rStyleSettings.GetShadowColor()); if (GetStyle() & WB_HORZ) { @@ -393,7 +393,7 @@ void Slider::ImplDraw(vcl::RenderContext& rRenderContext) if (!maChannel2Rect.IsEmpty()) { long nRectSize; - Rectangle aRect = maChannel2Rect; + tools::Rectangle aRect = maChannel2Rect; rRenderContext.SetLineColor(rStyleSettings.GetLightColor()); if (GetStyle() & WB_HORZ) { @@ -452,7 +452,7 @@ void Slider::ImplDraw(vcl::RenderContext& rRenderContext) bool Slider::ImplIsPageUp( const Point& rPos ) { Size aSize = GetOutputSizePixel(); - Rectangle aRect = maChannel1Rect; + tools::Rectangle aRect = maChannel1Rect; if ( GetStyle() & WB_HORZ ) { aRect.Top() = 0; @@ -469,7 +469,7 @@ bool Slider::ImplIsPageUp( const Point& rPos ) bool Slider::ImplIsPageDown( const Point& rPos ) { Size aSize = GetOutputSizePixel(); - Rectangle aRect = maChannel2Rect; + tools::Rectangle aRect = maChannel2Rect; if ( GetStyle() & WB_HORZ ) { aRect.Top() = 0; @@ -809,7 +809,7 @@ void Slider::KeyInput( const KeyEvent& rKEvt ) Control::KeyInput( rKEvt ); } -void Slider::Paint(vcl::RenderContext& rRenderContext, const Rectangle& /*rRect*/) +void Slider::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& /*rRect*/) { ImplDraw(rRenderContext); } diff --git a/vcl/source/control/spinbtn.cxx b/vcl/source/control/spinbtn.cxx index 6294549bc917..1899000f7d90 100644 --- a/vcl/source/control/spinbtn.cxx +++ b/vcl/source/control/spinbtn.cxx @@ -104,16 +104,16 @@ void SpinButton::Resize() Size aSize(GetOutputSizePixel()); Point aTmpPoint; - Rectangle aRect(aTmpPoint, aSize); + tools::Rectangle aRect(aTmpPoint, aSize); if (mbHorz) { - maLowerRect = Rectangle(0, 0, aSize.Width() / 2, aSize.Height() - 1); - maUpperRect = Rectangle(maLowerRect.TopRight(), aRect.BottomRight()); + maLowerRect = tools::Rectangle(0, 0, aSize.Width() / 2, aSize.Height() - 1); + maUpperRect = tools::Rectangle(maLowerRect.TopRight(), aRect.BottomRight()); } else { - maUpperRect = Rectangle(0, 0, aSize.Width() - 1, aSize.Height() / 2); - maLowerRect = Rectangle(maUpperRect.BottomLeft(), aRect.BottomRight()); + maUpperRect = tools::Rectangle(0, 0, aSize.Width() - 1, aSize.Height() / 2); + maLowerRect = tools::Rectangle(maUpperRect.BottomLeft(), aRect.BottomRight()); } ImplCalcFocusRect(ImplIsUpperEnabled() || !ImplIsLowerEnabled()); @@ -142,17 +142,17 @@ void SpinButton::Draw(OutputDevice* pDev, const Point& rPos, const Size& rSize, pDev->SetSettings( aSettings ); } - Rectangle aRect( Point( 0, 0 ), aSize ); - Rectangle aLowerRect, aUpperRect; + tools::Rectangle aRect( Point( 0, 0 ), aSize ); + tools::Rectangle aLowerRect, aUpperRect; if ( mbHorz ) { - aLowerRect = Rectangle( 0, 0, aSize.Width()/2, aSize.Height()-1 ); - aUpperRect = Rectangle( aLowerRect.TopRight(), aRect.BottomRight() ); + aLowerRect = tools::Rectangle( 0, 0, aSize.Width()/2, aSize.Height()-1 ); + aUpperRect = tools::Rectangle( aLowerRect.TopRight(), aRect.BottomRight() ); } else { - aUpperRect = Rectangle( 0, 0, aSize.Width()-1, aSize.Height()/2 ); - aLowerRect = Rectangle( aUpperRect.BottomLeft(), aRect.BottomRight() ); + aUpperRect = tools::Rectangle( 0, 0, aSize.Width()-1, aSize.Height()/2 ); + aLowerRect = tools::Rectangle( aUpperRect.BottomLeft(), aRect.BottomRight() ); } aUpperRect += aPos; @@ -164,7 +164,7 @@ void SpinButton::Draw(OutputDevice* pDev, const Point& rPos, const Size& rSize, pDev->Pop(); } -void SpinButton::Paint(vcl::RenderContext& rRenderContext, const Rectangle& /*rRect*/) +void SpinButton::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& /*rRect*/) { HideFocus(); @@ -427,7 +427,7 @@ void SpinButton::ImplCalcFocusRect( bool _bUpper ) mbUpperIsFocused = _bUpper; } -Rectangle* SpinButton::ImplFindPartRect( const Point& rPt ) +tools::Rectangle* SpinButton::ImplFindPartRect( const Point& rPt ) { if( maUpperRect.IsInside( rPt ) ) return &maUpperRect; @@ -449,8 +449,8 @@ bool SpinButton::PreNotify( NotifyEvent& rNEvt ) if (IsNativeControlSupported(ControlType::Spinbox, ControlPart::Entire) || IsNativeControlSupported(ControlType::Spinbox, ControlPart::AllButtons) ) { - Rectangle* pRect = ImplFindPartRect( GetPointerPosPixel() ); - Rectangle* pLastRect = ImplFindPartRect( GetLastPointerPosPixel() ); + tools::Rectangle* pRect = ImplFindPartRect( GetPointerPosPixel() ); + tools::Rectangle* pLastRect = ImplFindPartRect( GetLastPointerPosPixel() ); if (pRect != pLastRect || (pMouseEvt->IsLeaveWindow() || pMouseEvt->IsEnterWindow())) { vcl::Region aRgn(GetActiveClipRegion()); diff --git a/vcl/source/control/spinfld.cxx b/vcl/source/control/spinfld.cxx index c006140571a3..84fb780d50f6 100644 --- a/vcl/source/control/spinfld.cxx +++ b/vcl/source/control/spinfld.cxx @@ -32,7 +32,7 @@ namespace { void ImplGetSpinbuttonValue(vcl::Window* pWin, - const Rectangle& rUpperRect, const Rectangle& rLowerRect, + const tools::Rectangle& rUpperRect, const tools::Rectangle& rLowerRect, bool bUpperIn, bool bLowerIn, bool bUpperEnabled, bool bLowerEnabled, bool bHorz, SpinbuttonValue& rValue ) { @@ -82,7 +82,7 @@ bool ImplDrawNativeSpinfield(vcl::RenderContext& rRenderContext, vcl::Window* pW rRenderContext.IsNativeControlSupported(ControlType::Spinbox, rSpinbuttonValue.mnLowerPart)) { // only paint the embedded spin buttons, all buttons are painted at once - Rectangle aUpperAndLowerButtons( rSpinbuttonValue.maUpperRect.GetUnion( rSpinbuttonValue.maLowerRect ) ); + tools::Rectangle aUpperAndLowerButtons( rSpinbuttonValue.maUpperRect.GetUnion( rSpinbuttonValue.maLowerRect ) ); bNativeOK = rRenderContext.DrawNativeControl(ControlType::Spinbox, ControlPart::AllButtons, aUpperAndLowerButtons, ControlState::ENABLED, rSpinbuttonValue, OUString()); } @@ -92,14 +92,14 @@ bool ImplDrawNativeSpinfield(vcl::RenderContext& rRenderContext, vcl::Window* pW vcl::Window* pBorder = pWin->GetWindow(GetWindowType::Border); // to not overwrite everything, set the button region as clipregion to the border window - Rectangle aClipRect(rSpinbuttonValue.maLowerRect); + tools::Rectangle aClipRect(rSpinbuttonValue.maLowerRect); aClipRect.Union(rSpinbuttonValue.maUpperRect); vcl::RenderContext* pContext = &rRenderContext; vcl::Region oldRgn; Point aPt; Size aSize(pBorder->GetOutputSizePixel()); // the size of the border window, i.e., the whole control - Rectangle aNatRgn(aPt, aSize); + tools::Rectangle aNatRgn(aPt, aSize); if (!pWin->SupportsDoubleBuffering()) { @@ -112,7 +112,7 @@ bool ImplDrawNativeSpinfield(vcl::RenderContext& rRenderContext, vcl::Window* pW pContext = pBorder; } - Rectangle aBound, aContent; + tools::Rectangle aBound, aContent; if (!ImplGetSVData()->maNWFData.mbCanDrawWidgetAnySize && pContext->GetNativeControlRegion(ControlType::Spinbox, ControlPart::Entire, aNatRgn, ControlState::NONE, rSpinbuttonValue, @@ -121,7 +121,7 @@ bool ImplDrawNativeSpinfield(vcl::RenderContext& rRenderContext, vcl::Window* pW aSize = aContent.GetSize(); } - Rectangle aRgn(aPt, aSize); + tools::Rectangle aRgn(aPt, aSize); if (pWin->SupportsDoubleBuffering()) { // convert from borderwin space, to the pWin's space @@ -144,7 +144,7 @@ bool ImplDrawNativeSpinbuttons(vcl::RenderContext& rRenderContext, const Spinbut if (rRenderContext.IsNativeControlSupported(ControlType::SpinButtons, ControlPart::Entire)) { - Rectangle aArea = rSpinbuttonValue.maUpperRect.GetUnion(rSpinbuttonValue.maLowerRect); + tools::Rectangle aArea = rSpinbuttonValue.maUpperRect.GetUnion(rSpinbuttonValue.maLowerRect); // only paint the standalone spin buttons, all buttons are painted at once bNativeOK = rRenderContext.DrawNativeControl(ControlType::SpinButtons, ControlPart::AllButtons, aArea, ControlState::ENABLED, rSpinbuttonValue, OUString()); @@ -155,7 +155,7 @@ bool ImplDrawNativeSpinbuttons(vcl::RenderContext& rRenderContext, const Spinbut } void ImplDrawSpinButton(vcl::RenderContext& rRenderContext, vcl::Window* pWindow, - const Rectangle& rUpperRect, const Rectangle& rLowerRect, + const tools::Rectangle& rUpperRect, const tools::Rectangle& rLowerRect, bool bUpperIn, bool bLowerIn, bool bUpperEnabled, bool bLowerEnabled, bool bHorz, bool bMirrorHorz) { @@ -205,7 +205,7 @@ void ImplDrawSpinButton(vcl::RenderContext& rRenderContext, vcl::Window* pWindow } void ImplDrawUpDownButtons(vcl::RenderContext& rRenderContext, - const Rectangle& rUpperRect, const Rectangle& rLowerRect, + const tools::Rectangle& rUpperRect, const tools::Rectangle& rLowerRect, bool bUpperIn, bool bLowerIn, bool bUpperEnabled, bool bLowerEnabled, bool bHorz, bool bMirrorHorz) { @@ -229,14 +229,14 @@ void ImplDrawUpDownButtons(vcl::RenderContext& rRenderContext, if (bUpperIn) nStyle |= DrawButtonFlags::Pressed; - Rectangle aUpRect = aDecoView.DrawButton(rUpperRect, nStyle); + tools::Rectangle aUpRect = aDecoView.DrawButton(rUpperRect, nStyle); nStyle = DrawButtonFlags::NoLeftLightBorder; // draw lower/right Button if (bLowerIn) nStyle |= DrawButtonFlags::Pressed; - Rectangle aLowRect = aDecoView.DrawButton(rLowerRect, nStyle); + tools::Rectangle aLowRect = aDecoView.DrawButton(rLowerRect, nStyle); // make use of additional default edge aUpRect.Left()--; @@ -403,7 +403,7 @@ void SpinField::MouseButtonDown( const MouseEvent& rMEvt ) { // put DropDownButton to the right mbInDropDown = ShowDropDown( !mbInDropDown ); - Invalidate(Rectangle(Point(), GetOutputSizePixel())); + Invalidate(tools::Rectangle(Point(), GetOutputSizePixel())); } if (mbUpperIn || mbLowerIn) @@ -519,7 +519,7 @@ bool SpinField::EventNotify(NotifyEvent& rNEvt) else if ((nMod == KEY_MOD2) && !mbInDropDown && (GetStyle() & WB_DROPDOWN)) { mbInDropDown = ShowDropDown(true); - Invalidate(Rectangle(Point(), GetOutputSizePixel())); + Invalidate(tools::Rectangle(Point(), GetOutputSizePixel())); bDone = true; } } @@ -584,7 +584,7 @@ void SpinField::FillLayoutData() const Edit::FillLayoutData(); } -void SpinField::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) +void SpinField::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) { if (mbSpin) { @@ -600,7 +600,7 @@ void SpinField::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect DrawButtonFlags nStyle = DrawButtonFlags::NoLightBorder; if (mbInDropDown) nStyle |= DrawButtonFlags::Pressed; - Rectangle aInnerRect = aView.DrawButton(maDropDownRect, nStyle); + tools::Rectangle aInnerRect = aView.DrawButton(maDropDownRect, nStyle); SymbolType eSymbol = SymbolType::SPIN_DOWN; DrawSymbolFlags nSymbolStyle = IsEnabled() ? DrawSymbolFlags::NONE : DrawSymbolFlags::Disable; @@ -610,8 +610,8 @@ void SpinField::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect Edit::Paint(rRenderContext, rRect); } -void SpinField::ImplCalcButtonAreas(OutputDevice* pDev, const Size& rOutSz, Rectangle& rDDArea, - Rectangle& rSpinUpArea, Rectangle& rSpinDownArea) +void SpinField::ImplCalcButtonAreas(OutputDevice* pDev, const Size& rOutSz, tools::Rectangle& rDDArea, + tools::Rectangle& rSpinUpArea, tools::Rectangle& rSpinDownArea) { const StyleSettings& rStyleSettings = pDev->GetSettings().GetStyleSettings(); @@ -624,7 +624,7 @@ void SpinField::ImplCalcButtonAreas(OutputDevice* pDev, const Size& rOutSz, Rect nW = GetDrawPixel( pDev, nW ); aDropDownSize = Size( CalcZoom( nW ), aSize.Height() ); aSize.Width() -= aDropDownSize.Width(); - rDDArea = Rectangle( Point( aSize.Width(), 0 ), aDropDownSize ); + rDDArea = tools::Rectangle( Point( aSize.Width(), 0 ), aDropDownSize ); rDDArea.Top()--; } else @@ -640,7 +640,7 @@ void SpinField::ImplCalcButtonAreas(OutputDevice* pDev, const Size& rOutSz, Rect nBottom1--; bool bNativeRegionOK = false; - Rectangle aContentUp, aContentDown; + tools::Rectangle aContentUp, aContentDown; if ((pDev->GetOutDevType() == OUTDEV_WINDOW) && // there is just no useful native support for spinfields with dropdown @@ -652,11 +652,11 @@ void SpinField::ImplCalcButtonAreas(OutputDevice* pDev, const Size& rOutSz, Rect // get the system's spin button size ImplControlValue aControlValue; - Rectangle aBound; + tools::Rectangle aBound; Point aPoint; // use the full extent of the control - Rectangle aArea( aPoint, pBorder->GetOutputSizePixel() ); + tools::Rectangle aArea( aPoint, pBorder->GetOutputSizePixel() ); bNativeRegionOK = pWin->GetNativeControlRegion(ControlType::Spinbox, ControlPart::ButtonUp, @@ -682,8 +682,8 @@ void SpinField::ImplCalcButtonAreas(OutputDevice* pDev, const Size& rOutSz, Rect { aSize.Width() -= CalcZoom( GetDrawPixel( pDev, rStyleSettings.GetSpinSize() ) ); - rSpinUpArea = Rectangle( aSize.Width(), 0, rOutSz.Width()-aDropDownSize.Width()-1, nBottom1 ); - rSpinDownArea = Rectangle( rSpinUpArea.Left(), nTop2, rSpinUpArea.Right(), nBottom2 ); + rSpinUpArea = tools::Rectangle( aSize.Width(), 0, rOutSz.Width()-aDropDownSize.Width()-1, nBottom1 ); + rSpinDownArea = tools::Rectangle( rSpinUpArea.Left(), nTop2, rSpinUpArea.Right(), nBottom2 ); } } else @@ -707,11 +707,11 @@ void SpinField::Resize() ImplControlValue aControlValue; Point aPoint; - Rectangle aContent, aBound; + tools::Rectangle aContent, aBound; // use the full extent of the control vcl::Window *pBorder = GetWindow( GetWindowType::Border ); - Rectangle aArea( aPoint, pBorder->GetOutputSizePixel() ); + tools::Rectangle aArea( aPoint, pBorder->GetOutputSizePixel() ); // adjust position and size of the edit field if (GetNativeControlRegion(ControlType::Spinbox, ControlPart::SubEdit, aArea, ControlState::NONE, @@ -748,7 +748,7 @@ void SpinField::Resize() mpEdit->SetSizePixel(aSize); if (GetStyle() & WB_SPIN) - Invalidate(Rectangle(maUpperRect.TopLeft(), maLowerRect.BottomRight())); + Invalidate(tools::Rectangle(maUpperRect.TopLeft(), maLowerRect.BottomRight())); if (GetStyle() & WB_DROPDOWN) Invalidate(maDropDownRect); } @@ -825,7 +825,7 @@ void SpinField::DataChanged( const DataChangedEvent& rDCEvt ) } } -Rectangle* SpinField::ImplFindPartRect(const Point& rPt) +tools::Rectangle* SpinField::ImplFindPartRect(const Point& rPt) { if (maUpperRect.IsInside(rPt)) return &maUpperRect; @@ -847,8 +847,8 @@ bool SpinField::PreNotify(NotifyEvent& rNEvt) if( IsNativeControlSupported(ControlType::Spinbox, ControlPart::Entire) || IsNativeControlSupported(ControlType::Spinbox, ControlPart::AllButtons) ) { - Rectangle* pRect = ImplFindPartRect( GetPointerPosPixel() ); - Rectangle* pLastRect = ImplFindPartRect( GetLastPointerPosPixel() ); + tools::Rectangle* pRect = ImplFindPartRect( GetPointerPosPixel() ); + tools::Rectangle* pLastRect = ImplFindPartRect( GetLastPointerPosPixel() ); if( pRect != pLastRect || (pMouseEvt->IsLeaveWindow() || pMouseEvt->IsEnterWindow()) ) { // FIXME: this is currently only on OS X @@ -886,7 +886,7 @@ bool SpinField::PreNotify(NotifyEvent& rNEvt) void SpinField::EndDropDown() { mbInDropDown = false; - Invalidate(Rectangle(Point(), GetOutputSizePixel())); + Invalidate(tools::Rectangle(Point(), GetOutputSizePixel())); } bool SpinField::ShowDropDown( bool ) @@ -903,8 +903,8 @@ Size SpinField::CalcMinimumSizeForText(const OUString &rString) const if ( GetStyle() & WB_SPIN ) { ImplControlValue aControlValue; - Rectangle aArea( Point(), Size(100, aSz.Height())); - Rectangle aEntireBound, aEntireContent, aEditBound, aEditContent; + tools::Rectangle aArea( Point(), Size(100, aSz.Height())); + tools::Rectangle aEntireBound, aEntireContent, aEditBound, aEditContent; if ( GetNativeControlRegion(ControlType::Spinbox, ControlPart::Entire, aArea, ControlState::NONE, aControlValue, OUString(), aEntireBound, aEntireContent) && @@ -986,7 +986,7 @@ void SpinField::Draw(OutputDevice* pDev, const Point& rPos, const Size& rSize, D pDev->SetSettings(aSettings); } - Rectangle aDD, aUp, aDown; + tools::Rectangle aDD, aUp, aDown; ImplCalcButtonAreas(pDev, aSize, aDD, aUp, aDown); aDD.Move(aPos.X(), aPos.Y()); aUp.Move(aPos.X(), aPos.Y()); @@ -1003,7 +1003,7 @@ void SpinField::Draw(OutputDevice* pDev, const Point& rPos, const Size& rSize, D { DecorationView aView( pDev ); DrawButtonFlags nStyle = DrawButtonFlags::NoLightBorder; - Rectangle aInnerRect = aView.DrawButton( aDD, nStyle ); + tools::Rectangle aInnerRect = aView.DrawButton( aDD, nStyle ); SymbolType eSymbol = SymbolType::SPIN_DOWN; DrawSymbolFlags nSymbolStyle = (IsEnabled() || (nFlags & DrawFlags::NoDisable)) ? DrawSymbolFlags::NONE : DrawSymbolFlags::Disable; aView.DrawSymbol(aInnerRect, eSymbol, aButtonTextColor, nSymbolStyle); diff --git a/vcl/source/control/tabctrl.cxx b/vcl/source/control/tabctrl.cxx index 52afe6b4924f..2df0fbfd5028 100644 --- a/vcl/source/control/tabctrl.cxx +++ b/vcl/source/control/tabctrl.cxx @@ -51,7 +51,7 @@ struct ImplTabItem OUString maHelpText; OString maHelpId; OString maTabName; - Rectangle maRect; + tools::Rectangle maRect; sal_uInt16 mnLine; bool mbFullVisible; bool mbEnabled; @@ -232,9 +232,9 @@ Size TabControl::ImplGetItemSize( ImplTabItem* pItem, long nMaxWidth ) aSize.Width() += TAB_TABOFFSET_X*2; aSize.Height() += TAB_TABOFFSET_Y*2; - Rectangle aCtrlRegion( Point( 0, 0 ), aSize ); - Rectangle aBoundingRgn, aContentRgn; - const TabitemValue aControlValue(Rectangle(TAB_TABOFFSET_X, TAB_TABOFFSET_Y, + tools::Rectangle aCtrlRegion( Point( 0, 0 ), aSize ); + tools::Rectangle aBoundingRgn, aContentRgn; + const TabitemValue aControlValue(tools::Rectangle(TAB_TABOFFSET_X, TAB_TABOFFSET_Y, aSize.Width() - TAB_TABOFFSET_X * 2, aSize.Height() - TAB_TABOFFSET_Y * 2)); if(GetNativeControlRegion( ControlType::TabItem, ControlPart::Entire, aCtrlRegion, @@ -425,7 +425,7 @@ bool TabControl::ImplPlaceTabs( long nWidth ) nLinePosAry[nLines] = nPos; } - Rectangle aNewRect( Point( nX, nY ), aSize ); + tools::Rectangle aNewRect( Point( nX, nY ), aSize ); if ( mbSmallInvalidate && (it->maRect != aNewRect) ) mbSmallInvalidate = false; it->maRect = aNewRect; @@ -523,7 +523,7 @@ bool TabControl::ImplPlaceTabs( long nWidth ) return true; } -Rectangle TabControl::ImplGetTabRect( sal_uInt16 nItemPos, long nWidth, long nHeight ) +tools::Rectangle TabControl::ImplGetTabRect( sal_uInt16 nItemPos, long nWidth, long nHeight ) { Size aWinSize = Control::GetOutputSizePixel(); if ( nWidth < 0 ) @@ -536,8 +536,8 @@ Rectangle TabControl::ImplGetTabRect( sal_uInt16 nItemPos, long nWidth, long nHe long nW = nWidth-TAB_OFFSET*2; long nH = nHeight-TAB_OFFSET*2; return (nW > 0 && nH > 0) - ? Rectangle( Point( TAB_OFFSET, TAB_OFFSET ), Size( nW, nH ) ) - : Rectangle(); + ? tools::Rectangle( Point( TAB_OFFSET, TAB_OFFSET ), Size( nW, nH ) ) + : tools::Rectangle(); } if ( nItemPos == TAB_PAGERECT ) @@ -548,19 +548,19 @@ Rectangle TabControl::ImplGetTabRect( sal_uInt16 nItemPos, long nWidth, long nHe else nLastPos = 0; - Rectangle aRect = ImplGetTabRect( nLastPos, nWidth, nHeight ); + tools::Rectangle aRect = ImplGetTabRect( nLastPos, nWidth, nHeight ); long nW = nWidth-TAB_OFFSET*2; long nH = nHeight-aRect.Bottom()-TAB_OFFSET*2; aRect = (nW > 0 && nH > 0) - ? Rectangle( Point( TAB_OFFSET, aRect.Bottom()+TAB_OFFSET ), Size( nW, nH ) ) - : Rectangle(); + ? tools::Rectangle( Point( TAB_OFFSET, aRect.Bottom()+TAB_OFFSET ), Size( nW, nH ) ) + : tools::Rectangle(); return aRect; } nWidth -= 1; if ( (nWidth <= 0) || (nHeight <= 0) ) - return Rectangle(); + return tools::Rectangle(); if ( mbFormat || (mnLastWidth != nWidth) || (mnLastHeight != nHeight) ) { @@ -570,14 +570,14 @@ Rectangle TabControl::ImplGetTabRect( sal_uInt16 nItemPos, long nWidth, long nHe bool bRet = ImplPlaceTabs( nWidth ); if ( !bRet ) - return Rectangle(); + return tools::Rectangle(); mnLastWidth = nWidth; mnLastHeight = nHeight; mbFormat = false; } - return size_t(nItemPos) < mpTabCtrlData->maItemList.size() ? mpTabCtrlData->maItemList[nItemPos].maRect : Rectangle(); + return size_t(nItemPos) < mpTabCtrlData->maItemList.size() ? mpTabCtrlData->maItemList[nItemPos].maRect : tools::Rectangle(); } void TabControl::ImplChangeTabPage( sal_uInt16 nId, sal_uInt16 nOldId ) @@ -593,7 +593,7 @@ void TabControl::ImplChangeTabPage( sal_uInt16 nId, sal_uInt16 nOldId ) if ( IsReallyVisible() && IsUpdateMode() ) { sal_uInt16 nPos = GetPagePos( nId ); - Rectangle aRect = ImplGetTabRect( nPos ); + tools::Rectangle aRect = ImplGetTabRect( nPos ); if ( !pOldItem || !pItem || (pOldItem->mnLine != pItem->mnLine) ) { @@ -619,7 +619,7 @@ void TabControl::ImplChangeTabPage( sal_uInt16 nId, sal_uInt16 nOldId ) if ( pOldPage == pPage ) return; - Rectangle aRect = ImplGetTabRect( TAB_PAGERECT ); + tools::Rectangle aRect = ImplGetTabRect( TAB_PAGERECT ); if ( pOldPage ) { @@ -632,7 +632,7 @@ void TabControl::ImplChangeTabPage( sal_uInt16 nId, sal_uInt16 nOldId ) { if ( ( GetStyle() & WB_NOBORDER ) ) { - Rectangle aRectNoTab(Point(0, 0), GetSizePixel()); + tools::Rectangle aRectNoTab(Point(0, 0), GetSizePixel()); pPage->SetPosSizePixel( aRectNoTab.TopLeft(), aRectNoTab.GetSize() ); } else @@ -685,11 +685,11 @@ bool TabControl::ImplPosCurTabPage() { if ( ( GetStyle() & WB_NOBORDER ) ) { - Rectangle aRectNoTab(Point(0, 0), GetSizePixel()); + tools::Rectangle aRectNoTab(Point(0, 0), GetSizePixel()); pItem->mpTabPage->SetPosSizePixel( aRectNoTab.TopLeft(), aRectNoTab.GetSize() ); return true; } - Rectangle aRect = ImplGetTabRect( TAB_PAGERECT ); + tools::Rectangle aRect = ImplGetTabRect( TAB_PAGERECT ); pItem->mpTabPage->SetPosSizePixel( aRect.TopLeft(), aRect.GetSize() ); return true; } @@ -720,7 +720,7 @@ void TabControl::ImplShowFocus() return; sal_uInt16 nCurPos = GetPagePos( mnCurPageId ); - Rectangle aRect = ImplGetTabRect( nCurPos ); + tools::Rectangle aRect = ImplGetTabRect( nCurPos ); const ImplTabItem& rItem = mpTabCtrlData->maItemList[ nCurPos ]; Size aTabSize = aRect.GetSize(); Size aImageSize( 0, 0 ); @@ -764,14 +764,14 @@ void TabControl::ImplShowFocus() ShowFocus( aRect ); } -void TabControl::ImplDrawItem(vcl::RenderContext& rRenderContext, ImplTabItem* pItem, const Rectangle& rCurRect, +void TabControl::ImplDrawItem(vcl::RenderContext& rRenderContext, ImplTabItem* pItem, const tools::Rectangle& rCurRect, bool bFirstInGroup, bool bLastInGroup, bool /* bIsCurrentItem */ ) { if (pItem->maRect.IsEmpty()) return; const StyleSettings& rStyleSettings = rRenderContext.GetSettings().GetStyleSettings(); - Rectangle aRect = pItem->maRect; + tools::Rectangle aRect = pItem->maRect; long nLeftBottom = aRect.Bottom(); long nRightBottom = aRect.Bottom(); bool bLeftBorder = true; @@ -844,7 +844,7 @@ void TabControl::ImplDrawItem(vcl::RenderContext& rRenderContext, ImplTabItem* p bNativeOK = rRenderContext.IsNativeControlSupported(ControlType::TabItem, ControlPart::Entire); if ( bNativeOK ) { - TabitemValue tiValue(Rectangle(pItem->maRect.Left() + TAB_TABOFFSET_X, + TabitemValue tiValue(tools::Rectangle(pItem->maRect.Left() + TAB_TABOFFSET_X, pItem->maRect.Top() + TAB_TABOFFSET_Y, pItem->maRect.Right() - TAB_TABOFFSET_X, pItem->maRect.Bottom() - TAB_TABOFFSET_Y)); @@ -857,7 +857,7 @@ void TabControl::ImplDrawItem(vcl::RenderContext& rRenderContext, ImplTabItem* p if (bLastInGroup) tiValue.mnAlignment |= TabitemFlags::LastInGroup; - Rectangle aCtrlRegion( pItem->maRect ); + tools::Rectangle aCtrlRegion( pItem->maRect ); bNativeOK = rRenderContext.DrawNativeControl(ControlType::TabItem, ControlPart::Entire, aCtrlRegion, nState, tiValue, OUString() ); } @@ -940,7 +940,7 @@ void TabControl::ImplDrawItem(vcl::RenderContext& rRenderContext, ImplTabItem* p Color aOldColor(rRenderContext.GetTextColor()); rRenderContext.SetTextColor(aColor); - const Rectangle aOutRect(nXPos + aImageSize.Width(), nYPos, + const tools::Rectangle aOutRect(nXPos + aImageSize.Width(), nYPos, nXPos + aImageSize.Width() + nTextWidth, nYPos + nTextHeight); DrawControlText(rRenderContext, aOutRect, pItem->maFormatText, nStyle, nullptr, nullptr); @@ -1041,18 +1041,18 @@ void TabControl::KeyInput( const KeyEvent& rKEvt ) Control::KeyInput( rKEvt ); } -void TabControl::Paint( vcl::RenderContext& rRenderContext, const Rectangle& rRect) +void TabControl::Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) { if (!(GetStyle() & WB_NOBORDER)) ImplPaint(rRenderContext, rRect); } -void TabControl::ImplPaint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) +void TabControl::ImplPaint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) { HideFocus(); // reformat if needed - Rectangle aRect = ImplGetTabRect(TAB_PAGERECT); + tools::Rectangle aRect = ImplGetTabRect(TAB_PAGERECT); // find current item ImplTabItem* pCurItem = nullptr; @@ -1068,7 +1068,7 @@ void TabControl::ImplPaint(vcl::RenderContext& rRenderContext, const Rectangle& // Draw the TabPage border const StyleSettings& rStyleSettings = rRenderContext.GetSettings().GetStyleSettings(); - Rectangle aCurRect; + tools::Rectangle aCurRect; aRect.Left() -= TAB_OFFSET; aRect.Top() -= TAB_OFFSET; aRect.Right() += TAB_OFFSET; @@ -1110,7 +1110,7 @@ void TabControl::ImplPaint(vcl::RenderContext& rRenderContext, const Rectangle& if (rRenderContext.IsNativeControlSupported(ControlType::TabHeader, ControlPart::Entire)) { - Rectangle aHeaderRect(aRect.Left(), 0, aRect.Right(), aRect.Top()); + tools::Rectangle aHeaderRect(aRect.Left(), 0, aRect.Right(), aRect.Top()); aClipRgn = rRenderContext.GetActiveClipRegion(); aClipRgn.Intersect(aHeaderRect); @@ -1280,7 +1280,7 @@ void TabControl::setAllocation(const Size &rAllocation) if ( mbSmallInvalidate ) { - Rectangle aRect = ImplGetTabRect( TAB_PAGERECT ); + tools::Rectangle aRect = ImplGetTabRect( TAB_PAGERECT ); aRect.Left() -= TAB_OFFSET+TAB_BORDER_LEFT; aRect.Top() -= TAB_OFFSET+TAB_BORDER_TOP; aRect.Right() += TAB_OFFSET+TAB_BORDER_RIGHT; @@ -1363,7 +1363,7 @@ void TabControl::RequestHelp( const HelpEvent& rHEvt ) OUString aStr = GetHelpText( nItemId ); if ( !aStr.isEmpty() ) { - Rectangle aItemRect = ImplGetTabRect( GetPagePos( nItemId ) ); + tools::Rectangle aItemRect = ImplGetTabRect( GetPagePos( nItemId ) ); Point aPt = OutputToScreenPixel( aItemRect.TopLeft() ); aItemRect.Left() = aPt.X(); aItemRect.Top() = aPt.Y(); @@ -1394,7 +1394,7 @@ void TabControl::RequestHelp( const HelpEvent& rHEvt ) const OUString& rStr = pItem->maText; if ( rStr != pItem->maFormatText ) { - Rectangle aItemRect = ImplGetTabRect( GetPagePos( nItemId ) ); + tools::Rectangle aItemRect = ImplGetTabRect( GetPagePos( nItemId ) ); Point aPt = OutputToScreenPixel( aItemRect.TopLeft() ); aItemRect.Left() = aPt.X(); aItemRect.Top() = aPt.Y(); @@ -1419,7 +1419,7 @@ void TabControl::RequestHelp( const HelpEvent& rHEvt ) // show tooltip if not text but image is set and helptext is available if ( !rHelpText.isEmpty() && pItem->maText.isEmpty() && !!pItem->maTabImage ) { - Rectangle aItemRect = ImplGetTabRect( GetPagePos( nItemId ) ); + tools::Rectangle aItemRect = ImplGetTabRect( GetPagePos( nItemId ) ); Point aPt = OutputToScreenPixel( aItemRect.TopLeft() ); aItemRect.Left() = aPt.X(); aItemRect.Top() = aPt.Y(); @@ -1521,7 +1521,7 @@ void TabControl::DataChanged( const DataChangedEvent& rDCEvt ) } } -Rectangle* TabControl::ImplFindPartRect( const Point& rPt ) +tools::Rectangle* TabControl::ImplFindPartRect( const Point& rPt ) { ImplTabItem* pFoundItem = nullptr; int nFound = 0; @@ -1550,8 +1550,8 @@ bool TabControl::PreNotify( NotifyEvent& rNEvt ) // trigger redraw if mouse over state has changed if( IsNativeControlSupported(ControlType::TabItem, ControlPart::Entire) ) { - Rectangle* pRect = ImplFindPartRect( GetPointerPosPixel() ); - Rectangle* pLastRect = ImplFindPartRect( GetLastPointerPosPixel() ); + tools::Rectangle* pRect = ImplFindPartRect( GetPointerPosPixel() ); + tools::Rectangle* pLastRect = ImplFindPartRect( GetLastPointerPosPixel() ); if( pRect != pLastRect || (pMouseEvt->IsLeaveWindow() || pMouseEvt->IsEnterWindow()) ) { vcl::Region aClipRgn; @@ -1560,7 +1560,7 @@ bool TabControl::PreNotify( NotifyEvent& rNEvt ) // allow for slightly bigger tabitems // as used by gtk // TODO: query for the correct sizes - Rectangle aRect(*pLastRect); + tools::Rectangle aRect(*pLastRect); aRect.Left()-=2; aRect.Right()+=2; aRect.Top()-=3; @@ -1571,7 +1571,7 @@ bool TabControl::PreNotify( NotifyEvent& rNEvt ) // allow for slightly bigger tabitems // as used by gtk // TODO: query for the correct sizes - Rectangle aRect(*pRect); + tools::Rectangle aRect(*pRect); aRect.Left()-=2; aRect.Right()+=2; aRect.Top()-=3; @@ -1613,7 +1613,7 @@ void TabControl::SetTabPageSizePixel( const Size& rSize ) Size aNewSize( rSize ); aNewSize.Width() += TAB_OFFSET*2; - Rectangle aRect = ImplGetTabRect( TAB_PAGERECT, + tools::Rectangle aRect = ImplGetTabRect( TAB_PAGERECT, aNewSize.Width(), aNewSize.Height() ); aNewSize.Height() += aRect.Top()+TAB_OFFSET; Window::SetOutputSizePixel( aNewSize ); @@ -1621,7 +1621,7 @@ void TabControl::SetTabPageSizePixel( const Size& rSize ) Size TabControl::GetTabPageSizePixel() const { - Rectangle aRect = const_cast<TabControl*>(this)->ImplGetTabRect( TAB_PAGERECT ); + tools::Rectangle aRect = const_cast<TabControl*>(this)->ImplGetTabRect( TAB_PAGERECT ); return aRect.GetSize(); } @@ -2026,9 +2026,9 @@ void TabControl::SetPageImage( sal_uInt16 i_nPageId, const Image& i_rImage ) } } -Rectangle TabControl::GetCharacterBounds( sal_uInt16 nPageId, long nIndex ) const +tools::Rectangle TabControl::GetCharacterBounds( sal_uInt16 nPageId, long nIndex ) const { - Rectangle aRet; + tools::Rectangle aRet; if( !HasLayoutData() || ! mpTabCtrlData->maLayoutPageIdToLine.size() ) FillLayoutData(); @@ -2085,9 +2085,9 @@ void TabControl::FillLayoutData() const const_cast<TabControl*>(this)->Invalidate(); } -Rectangle TabControl::GetTabBounds( sal_uInt16 nPageId ) const +tools::Rectangle TabControl::GetTabBounds( sal_uInt16 nPageId ) const { - Rectangle aRet; + tools::Rectangle aRet; ImplTabItem* pItem = ImplGetItem( nPageId ); if(pItem) @@ -2157,7 +2157,7 @@ Size TabControl::calculateRequisition() const TabControl* pThis = const_cast<TabControl*>(this); sal_uInt16 nPos = it - mpTabCtrlData->maItemList.begin(); - Rectangle aTabRect = pThis->ImplGetTabRect(nPos, aOptimalPageSize.Width(), LONG_MAX); + tools::Rectangle aTabRect = pThis->ImplGetTabRect(nPos, aOptimalPageSize.Width(), LONG_MAX); if (aTabRect.Bottom() > nTabLabelsBottom) nTabLabelsBottom = aTabRect.Bottom(); if (aTabRect.Right() > nTabLabelsRight) @@ -2419,7 +2419,7 @@ bool NotebookbarTabControlBase::ImplPlaceTabs( long nWidth ) if( !it->maText.isEmpty() && aSize.getWidth() < 100) aSize.Width() = 100; - Rectangle aNewRect( Point( nX, nY ), aSize ); + tools::Rectangle aNewRect( Point( nX, nY ), aSize ); if ( mbSmallInvalidate && (it->maRect != aNewRect) ) mbSmallInvalidate = false; @@ -2539,12 +2539,12 @@ bool NotebookbarTabControlBase::ImplPlaceTabs( long nWidth ) return true; } -void NotebookbarTabControlBase::ImplPaint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) +void NotebookbarTabControlBase::ImplPaint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) { HideFocus(); // reformat if needed - Rectangle aRect = ImplGetTabRect(TAB_PAGERECT); + tools::Rectangle aRect = ImplGetTabRect(TAB_PAGERECT); // find current item ImplTabItem* pCurItem = nullptr; @@ -2560,7 +2560,7 @@ void NotebookbarTabControlBase::ImplPaint(vcl::RenderContext& rRenderContext, co // Draw the TabPage border const StyleSettings& rStyleSettings = rRenderContext.GetSettings().GetStyleSettings(); - Rectangle aCurRect; + tools::Rectangle aCurRect; aRect.Left() -= TAB_OFFSET; aRect.Top() -= TAB_OFFSET; aRect.Right() += TAB_OFFSET; @@ -2602,7 +2602,7 @@ void NotebookbarTabControlBase::ImplPaint(vcl::RenderContext& rRenderContext, co if (rRenderContext.IsNativeControlSupported(ControlType::TabHeader, ControlPart::Entire)) { - Rectangle aHeaderRect(aRect.Left(), 0, aRect.Right(), aRect.Top()); + tools::Rectangle aHeaderRect(aRect.Left(), 0, aRect.Right(), aRect.Top()); aClipRgn = rRenderContext.GetActiveClipRegion(); aClipRgn.Intersect(aHeaderRect); @@ -2781,7 +2781,7 @@ Size NotebookbarTabControlBase::calculateRequisition() const NotebookbarTabControlBase* pThis = const_cast<NotebookbarTabControlBase*>(this); sal_uInt16 nPos = it - mpTabCtrlData->maItemList.begin(); - Rectangle aTabRect = pThis->ImplGetTabRect(nPos, aOptimalPageSize.Width(), LONG_MAX); + tools::Rectangle aTabRect = pThis->ImplGetTabRect(nPos, aOptimalPageSize.Width(), LONG_MAX); if (aTabRect.Bottom() > nTabLabelsBottom) { nTabLabelsBottom = aTabRect.Bottom(); diff --git a/vcl/source/edit/texteng.cxx b/vcl/source/edit/texteng.cxx index 5ff7af0e9d29..b143b93835f9 100644 --- a/vcl/source/edit/texteng.cxx +++ b/vcl/source/edit/texteng.cxx @@ -841,11 +841,11 @@ TextPaM TextEngine::ImpInsertParaBreak( const TextPaM& rPaM ) return aPaM; } -Rectangle TextEngine::PaMtoEditCursor( const TextPaM& rPaM, bool bSpecial ) +tools::Rectangle TextEngine::PaMtoEditCursor( const TextPaM& rPaM, bool bSpecial ) { SAL_WARN_IF( !GetUpdateMode(), "vcl", "PaMtoEditCursor: GetUpdateMode()" ); - Rectangle aEditCursor; + tools::Rectangle aEditCursor; long nY = 0; if ( !mbHasMultiLineParas ) @@ -867,7 +867,7 @@ Rectangle TextEngine::PaMtoEditCursor( const TextPaM& rPaM, bool bSpecial ) return aEditCursor; } -Rectangle TextEngine::GetEditCursor( const TextPaM& rPaM, bool bSpecial, bool bPreferPortionStart ) +tools::Rectangle TextEngine::GetEditCursor( const TextPaM& rPaM, bool bSpecial, bool bPreferPortionStart ) { if ( !IsFormatted() && !IsFormatting() ) FormatAndUpdate(); @@ -906,7 +906,7 @@ Rectangle TextEngine::GetEditCursor( const TextPaM& rPaM, bool bSpecial, bool bP nY -= mnCharHeight; } - Rectangle aEditCursor; + tools::Rectangle aEditCursor; aEditCursor.Top() = nY; nY += mnCharHeight; @@ -1475,9 +1475,9 @@ void TextEngine::UpdateViews( TextView* pCurView ) { pView->HideCursor(); - Rectangle aClipRect( maInvalidRect ); + tools::Rectangle aClipRect( maInvalidRect ); const Size aOutSz = pView->GetWindow()->GetOutputSizePixel(); - const Rectangle aVisArea( pView->GetStartDocPos(), aOutSz ); + const tools::Rectangle aVisArea( pView->GetStartDocPos(), aOutSz ); aClipRect.Intersection( aVisArea ); if ( !aClipRect.IsEmpty() ) { @@ -1496,7 +1496,7 @@ void TextEngine::UpdateViews( TextView* pCurView ) pCurView->ShowCursor( pCurView->IsAutoScroll() ); } - maInvalidRect = Rectangle(); + maInvalidRect = tools::Rectangle(); } IMPL_LINK_NOARG(TextEngine, IdleFormatHdl, Timer *, void) @@ -1532,7 +1532,7 @@ void TextEngine::FormatDoc() long nY = 0; bool bGrow = false; - maInvalidRect = Rectangle(); // clear + maInvalidRect = tools::Rectangle(); // clear for ( sal_uInt32 nPara = 0; nPara < mpTEParaPortions->Count(); ++nPara ) { TEParaPortion* pTEParaPortion = mpTEParaPortions->GetObject( nPara ); @@ -1553,7 +1553,7 @@ void TextEngine::FormatDoc() ? mnMaxTextWidth : std::numeric_limits<long>::max(); const Range aInvRange( GetInvalidYOffsets( nPara ) ); - maInvalidRect = Rectangle( Point( 0, nY+aInvRange.Min() ), + maInvalidRect = tools::Rectangle( Point( 0, nY+aInvRange.Min() ), Size( nWidth, aInvRange.Len() ) ); } else @@ -1904,7 +1904,7 @@ void TextEngine::RecalcTextPortion( sal_uInt32 nPara, sal_Int32 nStartPos, sal_I } } -void TextEngine::ImpPaint( OutputDevice* pOutDev, const Point& rStartPos, Rectangle const* pPaintArea, TextSelection const* pSelection ) +void TextEngine::ImpPaint( OutputDevice* pOutDev, const Point& rStartPos, tools::Rectangle const* pPaintArea, TextSelection const* pSelection ) { if ( !GetUpdateMode() ) return; @@ -2035,7 +2035,7 @@ void TextEngine::ImpPaint( OutputDevice* pOutDev, const Point& rStartPos, Rectan // for HideSelection() only Range, pSelection = 0. if ( pSelStart ) { - const Rectangle aTabArea( aTmpPos, Point( aTmpPos.X()+nTxtWidth, aTmpPos.Y()+mnCharHeight-1 ) ); + const tools::Rectangle aTabArea( aTmpPos, Point( aTmpPos.X()+nTxtWidth, aTmpPos.Y()+mnCharHeight-1 ) ); bool bDone = false; if ( pSelStart ) { diff --git a/vcl/source/edit/textview.cxx b/vcl/source/edit/textview.cxx index bbb842ed9d04..cff429cdb828 100644 --- a/vcl/source/edit/textview.cxx +++ b/vcl/source/edit/textview.cxx @@ -292,7 +292,7 @@ void TextView::DeleteSelected() ShowCursor(); } -void TextView::ImpPaint(vcl::RenderContext& rRenderContext, const Point& rStartPos, Rectangle const* pPaintArea, TextSelection const* pSelection) +void TextView::ImpPaint(vcl::RenderContext& rRenderContext, const Point& rStartPos, tools::Rectangle const* pPaintArea, TextSelection const* pSelection) { if (!mpImpl->mbPaintSelection) { @@ -317,12 +317,12 @@ void TextView::ImpPaint(vcl::RenderContext& rRenderContext, const Point& rStartP mpImpl->mpTextEngine->ImpPaint(&rRenderContext, rStartPos, pPaintArea, pSelection); } -void TextView::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) +void TextView::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) { ImpPaint(rRenderContext, rRect); } -void TextView::ImpPaint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) +void TextView::ImpPaint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) { if ( !mpImpl->mpTextEngine->GetUpdateMode() || mpImpl->mpTextEngine->IsInUndo() ) return; @@ -347,7 +347,7 @@ void TextView::ImpHighlight( const TextSelection& rSel ) SAL_WARN_IF( mpImpl->mpTextEngine->mpIdleFormatter->IsActive(), "vcl", "ImpHighlight: Not formatted!" ); - Rectangle aVisArea( mpImpl->maStartDocPos, mpImpl->mpWindow->GetOutputSizePixel() ); + tools::Rectangle aVisArea( mpImpl->maStartDocPos, mpImpl->mpWindow->GetOutputSizePixel() ); long nY = 0; const sal_uInt32 nStartPara = aSel.GetStart().GetPara(); const sal_uInt32 nEndPara = aSel.GetEnd().GetPara(); @@ -379,7 +379,7 @@ void TextView::ImpHighlight( const TextSelection& rSel ) if ( nEndIndex < nStartIndex ) nEndIndex = nStartIndex; - Rectangle aTmpRect( mpImpl->mpTextEngine->GetEditCursor( TextPaM( nPara, nStartIndex ), false ) ); + tools::Rectangle aTmpRect( mpImpl->mpTextEngine->GetEditCursor( TextPaM( nPara, nStartIndex ), false ) ); aTmpRect.Top() += nY; aTmpRect.Bottom() += nY; Point aTopLeft( aTmpRect.TopLeft() ); @@ -396,7 +396,7 @@ void TextView::ImpHighlight( const TextSelection& rSel ) Point aPnt1( GetWindowPos( aTopLeft ) ); Point aPnt2( GetWindowPos( aBottomRight ) ); - Rectangle aRect( aPnt1, aPnt2 ); + tools::Rectangle aRect( aPnt1, aPnt2 ); mpImpl->mpWindow->Invert( aRect ); } } @@ -941,7 +941,7 @@ void TextView::Command( const CommandEvent& rCEvt ) if ( mpImpl->mpTextEngine->mpIMEInfos && mpImpl->mpTextEngine->mpIMEInfos->nLen ) { TextPaM aPaM( GetSelection().GetEnd() ); - Rectangle aR1 = mpImpl->mpTextEngine->PaMtoEditCursor( aPaM ); + tools::Rectangle aR1 = mpImpl->mpTextEngine->PaMtoEditCursor( aPaM ); sal_Int32 nInputEnd = mpImpl->mpTextEngine->mpIMEInfos->aPos.GetIndex() + mpImpl->mpTextEngine->mpIMEInfos->nLen; @@ -953,7 +953,7 @@ void TextView::Command( const CommandEvent& rCEvt ) TextLine& rLine = pParaPortion->GetLines()[ nLine ]; if ( nInputEnd > rLine.GetEnd() ) nInputEnd = rLine.GetEnd(); - Rectangle aR2 = mpImpl->mpTextEngine->PaMtoEditCursor( TextPaM( aPaM.GetPara(), nInputEnd ) ); + tools::Rectangle aR2 = mpImpl->mpTextEngine->PaMtoEditCursor( TextPaM( aPaM.GetPara(), nInputEnd ) ); long nWidth = aR2.Left()-aR1.Right(); aR1.Move( -GetStartDocPos().X(), -GetStartDocPos().Y() ); @@ -1568,7 +1568,7 @@ TextPaM TextView::CursorEndOfDoc() TextPaM TextView::PageUp( const TextPaM& rPaM ) { - Rectangle aRect = mpImpl->mpTextEngine->PaMtoEditCursor( rPaM ); + tools::Rectangle aRect = mpImpl->mpTextEngine->PaMtoEditCursor( rPaM ); Point aTopLeft = aRect.TopLeft(); aTopLeft.Y() -= mpImpl->mpWindow->GetOutputSizePixel().Height() * 9/10; aTopLeft.X() += 1; @@ -1581,7 +1581,7 @@ TextPaM TextView::PageUp( const TextPaM& rPaM ) TextPaM TextView::PageDown( const TextPaM& rPaM ) { - Rectangle aRect = mpImpl->mpTextEngine->PaMtoEditCursor( rPaM ); + tools::Rectangle aRect = mpImpl->mpTextEngine->PaMtoEditCursor( rPaM ); Point aBottomRight = aRect.BottomRight(); aBottomRight.Y() += mpImpl->mpWindow->GetOutputSizePixel().Height() * 9/10; aBottomRight.X() += 1; @@ -1607,7 +1607,7 @@ void TextView::ImpShowCursor( bool bGotoCursor, bool bForceVisCursor, bool bSpec mpImpl->mpTextEngine->FormatAndUpdate( this ); TextPaM aPaM( mpImpl->maSelection.GetEnd() ); - Rectangle aEditCursor = mpImpl->mpTextEngine->PaMtoEditCursor( aPaM, bSpecial ); + tools::Rectangle aEditCursor = mpImpl->mpTextEngine->PaMtoEditCursor( aPaM, bSpecial ); // Remember that we placed the cursor behind the last character of a line mpImpl->mbCursorAtEndOfLine = false; @@ -1814,7 +1814,7 @@ void TextView::ImpShowDDCursor() { if ( !mpImpl->mpDDInfo->mbVisCursor ) { - Rectangle aCursor = mpImpl->mpTextEngine->PaMtoEditCursor( mpImpl->mpDDInfo->maDropPos, true ); + tools::Rectangle aCursor = mpImpl->mpTextEngine->PaMtoEditCursor( mpImpl->mpDDInfo->maDropPos, true ); aCursor.Right()++; aCursor.SetPos( GetWindowPos( aCursor.TopLeft() ) ); diff --git a/vcl/source/edit/vclmedit.cxx b/vcl/source/edit/vclmedit.cxx index 46319e33cfdf..4301ae5c167c 100644 --- a/vcl/source/edit/vclmedit.cxx +++ b/vcl/source/edit/vclmedit.cxx @@ -59,7 +59,7 @@ public: virtual void Command( const CommandEvent& rCEvt ) override; - virtual void Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) override; + virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) override; virtual void Resize() override; virtual void GetFocus() override; @@ -805,7 +805,7 @@ void TextWindow::KeyInput( const KeyEvent& rKEvent ) Window::KeyInput( rKEvent ); } -void TextWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) +void TextWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) { mpExtTextView->Paint(rRenderContext, rRect); } @@ -1393,7 +1393,7 @@ void VclMultiLineEdit::Draw( OutputDevice* pDev, const Point& rPos, const Size& bool bBackground = !(nFlags & DrawFlags::NoBackground) && IsControlBackground(); if ( bBorder || bBackground ) { - Rectangle aRect( aPos, aSize ); + tools::Rectangle aRect( aPos, aSize ); if ( bBorder ) { DecorationView aDecoView( pDev ); @@ -1435,7 +1435,7 @@ void VclMultiLineEdit::Draw( OutputDevice* pDev, const Point& rPos, const Size& // Clipping? if ( ( nOffY < 0 ) || ( (nOffY+aTextSz.Height()) > aSize.Height() ) || ( (nOffX+aTextSz.Width()) > aSize.Width() ) ) { - Rectangle aClip( aPos, aSize ); + tools::Rectangle aClip( aPos, aSize ); if ( aTextSz.Height() > aSize.Height() ) aClip.Bottom() += aTextSz.Height() - aSize.Height() + 1; // so that HP-printer does not 'optimize-away' pDev->IntersectClipRegion( aClip ); diff --git a/vcl/source/filter/jpeg/JpegReader.cxx b/vcl/source/filter/jpeg/JpegReader.cxx index 86dda22fc806..58a79babeb46 100644 --- a/vcl/source/filter/jpeg/JpegReader.cxx +++ b/vcl/source/filter/jpeg/JpegReader.cxx @@ -249,7 +249,7 @@ Graphic JPEGReader::CreateIntermediateGraphic(long nLines) { Bitmap::ScopedWriteAccess pAccess(maIncompleteAlpha); pAccess->SetFillColor(Color(COL_BLACK)); - pAccess->FillRect(Rectangle(Point(0, mnLastLines), Size(pAccess->Width(), nNewLines))); + pAccess->FillRect(tools::Rectangle(Point(0, mnLastLines), Size(pAccess->Width(), nNewLines))); } aGraphic = BitmapEx(maBitmap, maIncompleteAlpha); diff --git a/vcl/source/filter/sgfbram.cxx b/vcl/source/filter/sgfbram.cxx index 335ee7017623..5f9f6d551847 100644 --- a/vcl/source/filter/sgfbram.cxx +++ b/vcl/source/filter/sgfbram.cxx @@ -435,7 +435,7 @@ bool SgfFilterVect(SvStream& rInp, SgfHeader& rHead, SgfEntry&, GDIMetaFile& rMt aOutDev->DrawLine(aP0,aP1); break; // line case 2: break; // circle case 3: break; // text - case 5: aOutDev->DrawRect(Rectangle(aP0,aP1)); break; // rectangle (solid) + case 5: aOutDev->DrawRect(tools::Rectangle(aP0,aP1)); break; // rectangle (solid) } } aP0=aP1; diff --git a/vcl/source/filter/sgvmain.cxx b/vcl/source/filter/sgvmain.cxx index 0bfc0a3ef74e..55ebb2ff9853 100644 --- a/vcl/source/filter/sgvmain.cxx +++ b/vcl/source/filter/sgvmain.cxx @@ -442,7 +442,7 @@ void DrawSlideRect(sal_Int16 x1, sal_Int16 y1, sal_Int16 x2, sal_Int16 y2, ObjAr Int1=100-F.FIntens; Int2=F.FIntens; if (Int1==Int2) { SgfAreaColorIntens(F.FMuster,(sal_uInt8)Col1,(sal_uInt8)Col2,(sal_uInt8)Int2,rOut); - rOut.DrawRect(Rectangle(x1,y1,x2,y2)); + rOut.DrawRect(tools::Rectangle(x1,y1,x2,y2)); } else { b0=Int1; switch (F.FBFarbe & 0x38) { @@ -453,13 +453,13 @@ void DrawSlideRect(sal_Int16 x1, sal_Int16 y1, sal_Int16 x2, sal_Int16 y2, ObjAr b=Int1+sal_Int16((sal_Int32)(Int2-Int1)*(sal_Int32)(i-y1) /(sal_Int32)(y2-y1+1)); if (b!=b0) { SgfAreaColorIntens(F.FMuster,(sal_uInt8)Col1,(sal_uInt8)Col2,(sal_uInt8)b0,rOut); - rOut.DrawRect(Rectangle(x1,i0,x2,i-1)); + rOut.DrawRect(tools::Rectangle(x1,i0,x2,i-1)); i0=i; b0=b; } i++; } SgfAreaColorIntens(F.FMuster,(sal_uInt8)Col1,(sal_uInt8)Col2,(sal_uInt8)Int2,rOut); - rOut.DrawRect(Rectangle(x1,i0,x2,y2)); + rOut.DrawRect(tools::Rectangle(x1,i0,x2,y2)); } break; case 0x28: { // horizontal i0=x1; @@ -468,20 +468,20 @@ void DrawSlideRect(sal_Int16 x1, sal_Int16 y1, sal_Int16 x2, sal_Int16 y2, ObjAr b=Int1+sal_Int16((sal_Int32)(Int2-Int1)*(sal_Int32)(i-x1) /(sal_Int32)(x2-x1+1)); if (b!=b0) { SgfAreaColorIntens(F.FMuster,(sal_uInt8)Col1,(sal_uInt8)Col2,(sal_uInt8)b0,rOut); - rOut.DrawRect(Rectangle(i0,y1,i-1,y2)); + rOut.DrawRect(tools::Rectangle(i0,y1,i-1,y2)); i0=i; b0=b; } i++; } SgfAreaColorIntens(F.FMuster,(sal_uInt8)Col1,(sal_uInt8)Col2,(sal_uInt8)Int2,rOut); - rOut.DrawRect(Rectangle(i0,y1,x2,y2)); + rOut.DrawRect(tools::Rectangle(i0,y1,x2,y2)); } break; case 0x18: case 0x38: { // circle vcl::Region ClipMerk=rOut.GetClipRegion(); double a; - rOut.SetClipRegion(vcl::Region(Rectangle(x1,y1,x2,y2))); + rOut.SetClipRegion(vcl::Region(tools::Rectangle(x1,y1,x2,y2))); cx=(x1+x2) /2; cy=(y1+y2) /2; dx=x2-x1+1; @@ -495,13 +495,13 @@ void DrawSlideRect(sal_Int16 x1, sal_Int16 y1, sal_Int16 x2, sal_Int16 y2, ObjAr b=Int1+sal_Int16((sal_Int32(Int2-Int1)*sal_Int32(i)) /sal_Int32(MaxR)); if (b!=b0) { SgfAreaColorIntens(F.FMuster,(sal_uInt8)Col1,(sal_uInt8)Col2,(sal_uInt8)b0,rOut); - rOut.DrawEllipse(Rectangle(cx-i0,cy-i0,cx+i0,cy+i0)); + rOut.DrawEllipse(tools::Rectangle(cx-i0,cy-i0,cx+i0,cy+i0)); i0=i; b0=b; } i--; } SgfAreaColorIntens(F.FMuster,(sal_uInt8)Col1,(sal_uInt8)Col2,(sal_uInt8)Int1,rOut); - rOut.DrawEllipse(Rectangle(cx-i0,cy-i0,cx+i0,cy+i0)); + rOut.DrawEllipse(tools::Rectangle(cx-i0,cy-i0,cx+i0,cy+i0)); rOut.SetClipRegion(ClipMerk); } break; // circle } @@ -515,13 +515,13 @@ void RectType::Draw(OutputDevice& rOut) if (RotationAngle==0) { if ((F.FBFarbe & 0x38)==0 || Radius!=0) { SetLine(L,rOut); - rOut.DrawRect(Rectangle(Pos1.x,Pos1.y,Pos2.x,Pos2.y),Radius,Radius); + rOut.DrawRect(tools::Rectangle(Pos1.x,Pos1.y,Pos2.x,Pos2.y),Radius,Radius); } else { DrawSlideRect(Pos1.x,Pos1.y,Pos2.x,Pos2.y,F,rOut); if (L.LMuster!=0) { SetLine(L,rOut); rOut.SetFillColor(); - rOut.DrawRect(Rectangle(Pos1.x,Pos1.y,Pos2.x,Pos2.y)); + rOut.DrawRect(tools::Rectangle(Pos1.x,Pos1.y,Pos2.x,Pos2.y)); } } } else { @@ -590,7 +590,7 @@ void DrawSlideCirc(sal_Int16 cx, sal_Int16 cy, sal_Int16 rx, sal_Int16 ry, ObjAr Int1=100-F.FIntens; Int2=F.FIntens; if (Int1==Int2) { SgfAreaColorIntens(F.FMuster,(sal_uInt8)Col1,(sal_uInt8)Col2,(sal_uInt8)Int2,rOut); - rOut.DrawEllipse(Rectangle(x1,y1,x2,y2)); + rOut.DrawEllipse(tools::Rectangle(x1,y1,x2,y2)); } else { b0=Int1; switch (F.FBFarbe & 0x38) { @@ -602,15 +602,15 @@ void DrawSlideCirc(sal_Int16 cx, sal_Int16 cy, sal_Int16 rx, sal_Int16 ry, ObjAr b=Int1+sal_Int16((sal_Int32)(Int2-Int1)*(sal_Int32)(i-y1) /(sal_Int32)(y2-y1+1)); if (b!=b0) { SgfAreaColorIntens(F.FMuster,(sal_uInt8)Col1,(sal_uInt8)Col2,(sal_uInt8)b0,rOut); - rOut.SetClipRegion(vcl::Region(Rectangle(x1,i0,x2,i-1))); - rOut.DrawEllipse(Rectangle(x1,y1,x2,y2)); + rOut.SetClipRegion(vcl::Region(tools::Rectangle(x1,i0,x2,i-1))); + rOut.DrawEllipse(tools::Rectangle(x1,y1,x2,y2)); i0=i; b0=b; } i++; } SgfAreaColorIntens(F.FMuster,(sal_uInt8)Col1,(sal_uInt8)Col2,(sal_uInt8)Int2,rOut); - rOut.SetClipRegion(vcl::Region(Rectangle(x1,i0,x2,y2))); - rOut.DrawEllipse(Rectangle(x1,y1,x2,y2)); + rOut.SetClipRegion(vcl::Region(tools::Rectangle(x1,i0,x2,y2))); + rOut.DrawEllipse(tools::Rectangle(x1,y1,x2,y2)); rOut.SetClipRegion(ClipMerk); } break; case 0x28: { // horizontal @@ -621,15 +621,15 @@ void DrawSlideCirc(sal_Int16 cx, sal_Int16 cy, sal_Int16 rx, sal_Int16 ry, ObjAr b=Int1+sal_Int16((sal_Int32)(Int2-Int1)*(sal_Int32)(i-x1) /(sal_Int32)(x2-x1+1)); if (b!=b0) { SgfAreaColorIntens(F.FMuster,(sal_uInt8)Col1,(sal_uInt8)Col2,(sal_uInt8)b0,rOut); - rOut.SetClipRegion(vcl::Region(Rectangle(i0,y1,i-1,y2))); - rOut.DrawEllipse(Rectangle(x1,y1,x2,y2)); + rOut.SetClipRegion(vcl::Region(tools::Rectangle(i0,y1,i-1,y2))); + rOut.DrawEllipse(tools::Rectangle(x1,y1,x2,y2)); i0=i; b0=b; } i++; } SgfAreaColorIntens(F.FMuster,(sal_uInt8)Col1,(sal_uInt8)Col2,(sal_uInt8)Int2,rOut); - rOut.SetClipRegion(vcl::Region(Rectangle(i0,y1,x2,y2))); - rOut.DrawEllipse(Rectangle(x1,y1,x2,y2)); + rOut.SetClipRegion(vcl::Region(tools::Rectangle(i0,y1,x2,y2))); + rOut.DrawEllipse(tools::Rectangle(x1,y1,x2,y2)); rOut.SetClipRegion(ClipMerk); } break; @@ -648,13 +648,13 @@ void DrawSlideCirc(sal_Int16 cx, sal_Int16 cy, sal_Int16 rx, sal_Int16 ry, ObjAr sal_Int32 temp=sal_Int32(i0)*sal_Int32(ry)/sal_Int32(rx); sal_Int16 j0=sal_Int16(temp); SgfAreaColorIntens(F.FMuster,(sal_uInt8)Col1,(sal_uInt8)Col2,(sal_uInt8)b0,rOut); - rOut.DrawEllipse(Rectangle(cx-i0,cy-j0,cx+i0,cy+j0)); + rOut.DrawEllipse(tools::Rectangle(cx-i0,cy-j0,cx+i0,cy+j0)); i0=i; b0=b; } i--; } SgfAreaColorIntens(F.FMuster,(sal_uInt8)Col1,(sal_uInt8)Col2,(sal_uInt8)Int1,rOut); - rOut.DrawEllipse(Rectangle(cx-i0,cy-i0,cx+i0,cy+i0)); + rOut.DrawEllipse(tools::Rectangle(cx-i0,cy-i0,cx+i0,cy+i0)); } break; // circle } } @@ -662,7 +662,7 @@ void DrawSlideCirc(sal_Int16 cx, sal_Int16 cy, sal_Int16 rx, sal_Int16 ry, ObjAr void CircType::Draw(OutputDevice& rOut) { - Rectangle aRect(Center.x-Radius.x,Center.y-Radius.y,Center.x+Radius.x,Center.y+Radius.y); + tools::Rectangle aRect(Center.x-Radius.x,Center.y-Radius.y,Center.x+Radius.x,Center.y+Radius.y); if (L.LMuster!=0) L.LMuster=1; // no line pattern here, only on or off SetArea(F,rOut); diff --git a/vcl/source/filter/wmf/emfwr.cxx b/vcl/source/filter/wmf/emfwr.cxx index 7eb9c63103bb..0091aa1e8fe9 100644 --- a/vcl/source/filter/wmf/emfwr.cxx +++ b/vcl/source/filter/wmf/emfwr.cxx @@ -602,9 +602,9 @@ void EMFWriter::ImplWriteSize( const Size& rSize) m_rStm.WriteInt32( aSize.Width() ).WriteInt32( aSize.Height() ); } -void EMFWriter::ImplWriteRect( const Rectangle& rRect ) +void EMFWriter::ImplWriteRect( const tools::Rectangle& rRect ) { - const Rectangle aRect( OutputDevice::LogicToLogic ( rRect, maVDev->GetMapMode(), maDestMapMode )); + const tools::Rectangle aRect( OutputDevice::LogicToLogic ( rRect, maVDev->GetMapMode(), maDestMapMode )); m_rStm .WriteInt32( aRect.Left() ) .WriteInt32( aRect.Top() ) @@ -780,7 +780,7 @@ void EMFWriter::ImplWriteBmpRecord( const Bitmap& rBmp, const Point& rPt, const Size aBmpSizePixel( rBmp.GetSizePixel() ); ImplBeginRecord( WIN_EMR_STRETCHDIBITS ); - ImplWriteRect( Rectangle( rPt, rSz ) ); + ImplWriteRect( tools::Rectangle( rPt, rSz ) ); ImplWritePoint( rPt ); m_rStm.WriteInt32( 0 ).WriteInt32( 0 ).WriteInt32( aBmpSizePixel.Width() ).WriteInt32( aBmpSizePixel.Height() ); @@ -872,7 +872,7 @@ void EMFWriter::ImplWriteTextRecord( const Point& rPos, const OUString& rText, c // write text record ImplBeginRecord( WIN_EMR_EXTTEXTOUTW ); - ImplWriteRect( Rectangle( rPos, Size( nNormWidth, maVDev->GetTextHeight() ) ) ); + ImplWriteRect( tools::Rectangle( rPos, Size( nNormWidth, maVDev->GetTextHeight() ) ) ); m_rStm.WriteUInt32( 1 ); m_rStm.WriteInt32( 0 ).WriteInt32( 0 ); ImplWritePoint( rPos ); @@ -1253,7 +1253,7 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf ) const MetaBmpScalePartAction* pA = static_cast<const MetaBmpScalePartAction*>(pAction); Bitmap aTmp( pA->GetBitmap() ); - if( aTmp.Crop( Rectangle( pA->GetSrcPoint(), pA->GetSrcSize() ) ) ) + if( aTmp.Crop( tools::Rectangle( pA->GetSrcPoint(), pA->GetSrcSize() ) ) ) ImplWriteBmpRecord( aTmp, pA->GetDestPoint(), pA->GetDestSize(), WIN_SRCCOPY ); } break; @@ -1298,7 +1298,7 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf ) { const MetaBmpExScalePartAction* pA = static_cast<const MetaBmpExScalePartAction*>(pAction); BitmapEx aBmpEx( pA->GetBitmapEx() ); - aBmpEx.Crop( Rectangle( pA->GetSrcPoint(), pA->GetSrcSize() ) ); + aBmpEx.Crop( tools::Rectangle( pA->GetSrcPoint(), pA->GetSrcSize() ) ); Bitmap aBmp( aBmpEx.GetBitmap() ); Bitmap aMsk( aBmpEx.GetMask() ); diff --git a/vcl/source/filter/wmf/emfwr.hxx b/vcl/source/filter/wmf/emfwr.hxx index c34ad63358c2..0e01db54dcf8 100644 --- a/vcl/source/filter/wmf/emfwr.hxx +++ b/vcl/source/filter/wmf/emfwr.hxx @@ -73,7 +73,7 @@ private: void ImplWriteExtent( long nExtent ); void ImplWritePoint( const Point& rPoint ); void ImplWriteSize( const Size& rSize); - void ImplWriteRect( const Rectangle& rRect ); + void ImplWriteRect( const tools::Rectangle& rRect ); void ImplWritePath( const tools::PolyPolygon& rPolyPoly, bool bClose ); void ImplWritePolygonRecord( const tools::Polygon& rPoly, bool bClose ); void ImplWritePolyPolygonRecord( const tools::PolyPolygon& rPolyPoly ); diff --git a/vcl/source/filter/wmf/enhwmf.cxx b/vcl/source/filter/wmf/enhwmf.cxx index 6249b41c748d..d07e96fe394e 100644 --- a/vcl/source/filter/wmf/enhwmf.cxx +++ b/vcl/source/filter/wmf/enhwmf.cxx @@ -386,7 +386,7 @@ bool ImplReadRegion( tools::PolyPolygon& rPolyPoly, SvStream& rStream, sal_uInt3 rStream.ReadInt32(nx2); rStream.ReadInt32(ny2); - Rectangle aRectangle(Point(nx1, ny1), Point(nx2, ny2)); + tools::Rectangle aRectangle(Point(nx1, ny1), Point(nx2, ny2)); tools::Polygon aPolygon(aRectangle); tools::PolyPolygon aPolyPolyOr1(aPolygon); @@ -1141,7 +1141,7 @@ bool EnhWMFReader::ReadEnhWMF() { sal_uInt32 nStartX, nStartY, nEndX, nEndY; pWMF->ReadInt32( nX32 ).ReadInt32( nY32 ).ReadInt32( nx32 ).ReadInt32( ny32 ).ReadUInt32( nStartX ).ReadUInt32( nStartY ).ReadUInt32( nEndX ).ReadUInt32( nEndY ); - const Rectangle aRect( ReadRectangle( nX32, nY32, nx32, ny32 )); + const tools::Rectangle aRect( ReadRectangle( nX32, nY32, nx32, ny32 )); // #i73608# OutputDevice deviates from WMF // semantics. start==end means full ellipse here. @@ -1249,7 +1249,7 @@ bool EnhWMFReader::ReadEnhWMF() .ReadUInt32( offBitsSrc ).ReadUInt32( cbBitsSrc ).ReadInt32( cxSrc ).ReadInt32( cySrc ) ; sal_uInt32 dwRop = SRCAND|SRCINVERT; - Rectangle aRect( Point( xDest, yDest ), Size( cxDest+1, cyDest+1 ) ); + tools::Rectangle aRect( Point( xDest, yDest ), Size( cxDest+1, cyDest+1 ) ); if ( (cbBitsSrc > (SAL_MAX_UINT32 - 14)) || ((SAL_MAX_UINT32 - 14) - cbBitsSrc < cbBmiSrc) ) bStatus = false; @@ -1345,7 +1345,7 @@ bool EnhWMFReader::ReadEnhWMF() ( xSrc + cxSrc < aBitmapEx.GetSizePixel().Width() ) && ( ySrc + cySrc < aBitmapEx.GetSizePixel().Height() ) ) { - const Rectangle aCropRect( Point( xSrc, ySrc ), Size( cxSrc, cySrc ) ); + const tools::Rectangle aCropRect( Point( xSrc, ySrc ), Size( cxSrc, cySrc ) ); aBitmapEx.Crop( aCropRect ); } @@ -1388,7 +1388,7 @@ bool EnhWMFReader::ReadEnhWMF() cxSrc = cySrc = 0; Bitmap aBitmap; - Rectangle aRect( Point( xDest, yDest ), Size( cxDest, cyDest ) ); + tools::Rectangle aRect( Point( xDest, yDest ), Size( cxDest, cyDest ) ); if ( (cbBitsSrc > (SAL_MAX_UINT32 - 14)) || ((SAL_MAX_UINT32 - 14) - cbBitsSrc < cbBmiSrc) ) bStatus = false; @@ -1419,7 +1419,7 @@ bool EnhWMFReader::ReadEnhWMF() ( xSrc + cxSrc <= aBitmap.GetSizePixel().Width() ) && ( ySrc + cySrc <= aBitmap.GetSizePixel().Height() ) ) { - Rectangle aCropRect( Point( xSrc, ySrc ), Size( cxSrc, cySrc ) ); + tools::Rectangle aCropRect( Point( xSrc, ySrc ), Size( cxSrc, cySrc ) ); aBitmap.Crop( aCropRect ); } aBmpSaveList.emplace_back(new BSaveStruct(aBitmap, aRect, dwRop)); @@ -1451,7 +1451,7 @@ bool EnhWMFReader::ReadEnhWMF() .ReadInt32( cyDest ); Bitmap aBitmap; - Rectangle aRect( Point( xDest, yDest ), Size( cxDest, cyDest ) ); + tools::Rectangle aRect( Point( xDest, yDest ), Size( cxDest, cyDest ) ); if ( ((SAL_MAX_UINT32 - 14) < cbBitsSrc) || ((SAL_MAX_UINT32 - 14) - cbBitsSrc < cbBmiSrc ) @@ -1486,7 +1486,7 @@ bool EnhWMFReader::ReadEnhWMF() ( xSrc + cxSrc <= aBitmap.GetSizePixel().Width() ) && ( ySrc + cySrc <= aBitmap.GetSizePixel().Height() ) ) { - Rectangle aCropRect( Point( xSrc, ySrc ), Size( cxSrc, cySrc ) ); + tools::Rectangle aCropRect( Point( xSrc, ySrc ), Size( cxSrc, cySrc ) ); aBitmap.Crop( aCropRect ); } aBmpSaveList.emplace_back(new BSaveStruct(aBitmap, aRect, dwRop)); @@ -1836,10 +1836,10 @@ bool EnhWMFReader::ReadHeader() // Start reading the EMR_HEADER Header object // bound size (RectL object, see [MS-WMF] section 2.2.2.19) - Rectangle rclBounds = ReadRectangle(); // rectangle in logical units + tools::Rectangle rclBounds = ReadRectangle(); // rectangle in logical units // picture frame size (RectL object) - Rectangle rclFrame = ReadRectangle(); // rectangle in device units 1/100th mm + tools::Rectangle rclFrame = ReadRectangle(); // rectangle in device units 1/100th mm pWMF->ReadUInt32( nSignature ); @@ -1924,21 +1924,21 @@ bool EnhWMFReader::ReadHeader() return true; } -Rectangle EnhWMFReader::ReadRectangle() +tools::Rectangle EnhWMFReader::ReadRectangle() { sal_Int32 nLeft, nTop, nRight, nBottom; pWMF->ReadInt32(nLeft); pWMF->ReadInt32(nTop); pWMF->ReadInt32(nRight); pWMF->ReadInt32(nBottom); - return Rectangle(nLeft, nTop, nRight, nBottom); + return tools::Rectangle(nLeft, nTop, nRight, nBottom); } -Rectangle EnhWMFReader::ReadRectangle( sal_Int32 x1, sal_Int32 y1, sal_Int32 x2, sal_Int32 y2 ) +tools::Rectangle EnhWMFReader::ReadRectangle( sal_Int32 x1, sal_Int32 y1, sal_Int32 x2, sal_Int32 y2 ) { Point aTL ( Point( x1, y1 ) ); Point aBR( Point( --x2, --y2 ) ); - return Rectangle( aTL, aBR ); + return tools::Rectangle( aTL, aBR ); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/source/filter/wmf/winmtf.cxx b/vcl/source/filter/wmf/winmtf.cxx index cb53a11135d0..cf88ff61736d 100644 --- a/vcl/source/filter/wmf/winmtf.cxx +++ b/vcl/source/filter/wmf/winmtf.cxx @@ -41,13 +41,13 @@ #define EMFP_DEBUG(x) #endif -void WinMtfClipPath::intersectClipRect( const Rectangle& rRect ) +void WinMtfClipPath::intersectClipRect( const tools::Rectangle& rRect ) { maClip.intersectRange( vcl::unotools::b2DRectangleFromRectangle(rRect)); } -void WinMtfClipPath::excludeClipRect( const Rectangle& rRect ) +void WinMtfClipPath::excludeClipRect( const tools::Rectangle& rRect ) { maClip.subtractRange( vcl::unotools::b2DRectangleFromRectangle(rRect)); @@ -488,9 +488,9 @@ Size WinMtfOutput::ImplMap(const Size& rSz, bool bDoWorldTransform) return Size(); } -Rectangle WinMtfOutput::ImplMap( const Rectangle& rRect ) +tools::Rectangle WinMtfOutput::ImplMap( const tools::Rectangle& rRect ) { - return Rectangle( ImplMap( rRect.TopLeft() ), ImplMap( rRect.GetSize() ) ); + return tools::Rectangle( ImplMap( rRect.TopLeft() ), ImplMap( rRect.GetSize() ) ); } void WinMtfOutput::ImplMap( vcl::Font& rFont ) @@ -769,7 +769,7 @@ void WinMtfOutput::DeleteObject( sal_Int32 nIndex ) } } -void WinMtfOutput::IntersectClipRect( const Rectangle& rRect ) +void WinMtfOutput::IntersectClipRect( const tools::Rectangle& rRect ) { mbClipNeedsUpdate=true; if ((rRect.Left()-rRect.Right()==0) && (rRect.Top()-rRect.Bottom()==0)) @@ -779,7 +779,7 @@ void WinMtfOutput::IntersectClipRect( const Rectangle& rRect ) aClipPath.intersectClipRect( ImplMap( rRect ) ); } -void WinMtfOutput::ExcludeClipRect( const Rectangle& rRect ) +void WinMtfOutput::ExcludeClipRect( const tools::Rectangle& rRect ) { mbClipNeedsUpdate=true; aClipPath.excludeClipRect( ImplMap( rRect ) ); @@ -1069,7 +1069,7 @@ void WinMtfOutput::LineTo( const Point& rPoint, bool bRecordPath ) maActPos = aDest; } -void WinMtfOutput::DrawRect( const Rectangle& rRect, bool bEdge ) +void WinMtfOutput::DrawRect( const tools::Rectangle& rRect, bool bEdge ) { UpdateClipRegion(); UpdateFillStyle(); @@ -1107,7 +1107,7 @@ void WinMtfOutput::DrawRect( const Rectangle& rRect, bool bEdge ) } } -void WinMtfOutput::DrawRoundRect( const Rectangle& rRect, const Size& rSize ) +void WinMtfOutput::DrawRoundRect( const tools::Rectangle& rRect, const Size& rSize ) { UpdateClipRegion(); UpdateLineStyle(); @@ -1115,7 +1115,7 @@ void WinMtfOutput::DrawRoundRect( const Rectangle& rRect, const Size& rSize ) mpGDIMetaFile->AddAction( new MetaRoundRectAction( ImplMap( rRect ), labs( ImplMap( rSize ).Width() ), labs( ImplMap( rSize ).Height() ) ) ); } -void WinMtfOutput::DrawEllipse( const Rectangle& rRect ) +void WinMtfOutput::DrawEllipse( const tools::Rectangle& rRect ) { UpdateClipRegion(); UpdateFillStyle(); @@ -1137,13 +1137,13 @@ void WinMtfOutput::DrawEllipse( const Rectangle& rRect ) } } -void WinMtfOutput::DrawArc( const Rectangle& rRect, const Point& rStart, const Point& rEnd, bool bTo ) +void WinMtfOutput::DrawArc( const tools::Rectangle& rRect, const Point& rStart, const Point& rEnd, bool bTo ) { UpdateClipRegion(); UpdateLineStyle(); UpdateFillStyle(); - Rectangle aRect( ImplMap( rRect ) ); + tools::Rectangle aRect( ImplMap( rRect ) ); Point aStart( ImplMap( rStart ) ); Point aEnd( ImplMap( rEnd ) ); @@ -1166,12 +1166,12 @@ void WinMtfOutput::DrawArc( const Rectangle& rRect, const Point& rStart, const P maActPos = aEnd; } -void WinMtfOutput::DrawPie( const Rectangle& rRect, const Point& rStart, const Point& rEnd ) +void WinMtfOutput::DrawPie( const tools::Rectangle& rRect, const Point& rStart, const Point& rEnd ) { UpdateClipRegion(); UpdateFillStyle(); - Rectangle aRect( ImplMap( rRect ) ); + tools::Rectangle aRect( ImplMap( rRect ) ); Point aStart( ImplMap( rStart ) ); Point aEnd( ImplMap( rEnd ) ); @@ -1189,12 +1189,12 @@ void WinMtfOutput::DrawPie( const Rectangle& rRect, const Point& rStart, const P } } -void WinMtfOutput::DrawChord( const Rectangle& rRect, const Point& rStart, const Point& rEnd ) +void WinMtfOutput::DrawChord( const tools::Rectangle& rRect, const Point& rStart, const Point& rEnd ) { UpdateClipRegion(); UpdateFillStyle(); - Rectangle aRect( ImplMap( rRect ) ); + tools::Rectangle aRect( ImplMap( rRect ) ); Point aStart( ImplMap( rStart ) ); Point aEnd( ImplMap( rEnd ) ); @@ -1670,7 +1670,7 @@ void WinMtfOutput::ResolveBitmapActions( std::vector<std::unique_ptr<BSaveStruct size_t nObjectStartIndex = nObjects - nObjectsLeft; BSaveStruct* pSave = rSaveList[nObjectStartIndex].get(); - Rectangle aRect( pSave->aOutRect ); + tools::Rectangle aRect( pSave->aOutRect ); for ( i = nObjectStartIndex; i < nObjects; ) { @@ -1992,12 +1992,12 @@ void WinMtfOutput::ScaleWinExt( double fX, double fY ) mnWinExtY = FRound( mnWinExtY * fY ); } -void WinMtfOutput::SetrclBounds( const Rectangle& rRect ) +void WinMtfOutput::SetrclBounds( const tools::Rectangle& rRect ) { mrclBounds = rRect; } -void WinMtfOutput::SetrclFrame( const Rectangle& rRect ) +void WinMtfOutput::SetrclFrame( const tools::Rectangle& rRect ) { mrclFrame = rRect; } diff --git a/vcl/source/filter/wmf/winmtf.hxx b/vcl/source/filter/wmf/winmtf.hxx index d6e161d9e6a8..c7402f50ff95 100644 --- a/vcl/source/filter/wmf/winmtf.hxx +++ b/vcl/source/filter/wmf/winmtf.hxx @@ -249,8 +249,8 @@ public: WinMtfClipPath(): maClip() {}; void setClipPath( const tools::PolyPolygon& rPolyPolygon, sal_Int32 nClippingMode ); - void intersectClipRect( const Rectangle& rRect ); - void excludeClipRect( const Rectangle& rRect ); + void intersectClipRect( const tools::Rectangle& rRect ); + void excludeClipRect( const tools::Rectangle& rRect ); void moveClipRegion( const Size& rSize ); void setDefaultClipPath(); @@ -416,16 +416,16 @@ struct SaveStruct struct BSaveStruct { BitmapEx aBmpEx; - Rectangle aOutRect; + tools::Rectangle aOutRect; sal_uInt32 nWinRop; - BSaveStruct(const Bitmap& rBmp, const Rectangle& rOutRect, sal_uInt32 nRop) + BSaveStruct(const Bitmap& rBmp, const tools::Rectangle& rOutRect, sal_uInt32 nRop) : aBmpEx(rBmp) , aOutRect(rOutRect) , nWinRop(nRop) {} - BSaveStruct(const BitmapEx& rBmpEx, const Rectangle& rOutRect, sal_uInt32 nRop) + BSaveStruct(const BitmapEx& rBmpEx, const tools::Rectangle& rOutRect, sal_uInt32 nRop) : aBmpEx(rBmpEx) , aOutRect(rOutRect) , nWinRop(nRop) @@ -484,8 +484,8 @@ class WinMtfOutput final sal_Int32 mnPixX, mnPixY; // Reference Device in pixel sal_Int32 mnMillX, mnMillY; // Reference Device in Mill - Rectangle mrclFrame; // rectangle in logical units 1/100th mm - Rectangle mrclBounds; + tools::Rectangle mrclFrame; // rectangle in logical units 1/100th mm + tools::Rectangle mrclBounds; GDIMetaFile* mpGDIMetaFile; @@ -495,7 +495,7 @@ class WinMtfOutput final Point ImplMap( const Point& rPt ); Point ImplScale( const Point& rPt ); Size ImplMap( const Size& rSize, bool bDoWorldTransform = true); - Rectangle ImplMap( const Rectangle& rRectangle ); + tools::Rectangle ImplMap( const tools::Rectangle& rRectangle ); void ImplMap( vcl::Font& rFont ); tools::Polygon& ImplMap( tools::Polygon& rPolygon ); tools::PolyPolygon& ImplMap( tools::PolyPolygon& rPolyPolygon ); @@ -519,8 +519,8 @@ public: void SetWinExt( const Size& rSize , bool bIsEMF = false); void ScaleWinExt( double fX, double fY ); - void SetrclBounds( const Rectangle& rRect ); - void SetrclFrame( const Rectangle& rRect ); + void SetrclBounds( const tools::Rectangle& rRect ); + void SetrclFrame( const tools::Rectangle& rRect ); void SetRefPix( const Size& rSize ); void SetRefMill( const Size& rSize ); @@ -562,22 +562,22 @@ public: void MoveTo( const Point& rPoint, bool bRecordPath = false ); void LineTo( const Point& rPoint, bool bRecordPath = false ); void DrawPixel( const Point& rSource, const Color& rColor ); - void DrawRect( const Rectangle& rRect, bool bEdge = true ); - void DrawRoundRect( const Rectangle& rRect, const Size& rSize ); - void DrawEllipse( const Rectangle& rRect ); + void DrawRect( const tools::Rectangle& rRect, bool bEdge = true ); + void DrawRoundRect( const tools::Rectangle& rRect, const Size& rSize ); + void DrawEllipse( const tools::Rectangle& rRect ); void DrawArc( - const Rectangle& rRect, + const tools::Rectangle& rRect, const Point& rStartAngle, const Point& rEndAngle, bool bDrawTo = false ); void DrawPie( - const Rectangle& rRect, + const tools::Rectangle& rRect, const Point& rStartAngle, const Point& rEndAngle ); void DrawChord( - const Rectangle& rRect, + const tools::Rectangle& rRect, const Point& rStartAngle, const Point& rEndAngle ); @@ -605,8 +605,8 @@ public: void ResolveBitmapActions( std::vector<std::unique_ptr<BSaveStruct>>& rSaveList ); - void IntersectClipRect( const Rectangle& rRect ); - void ExcludeClipRect( const Rectangle& rRect ); + void IntersectClipRect( const tools::Rectangle& rRect ); + void ExcludeClipRect( const tools::Rectangle& rRect ); void MoveClipRegion( const Size& rSize ); void SetClipPath( const tools::PolyPolygon& rPolyPoly, @@ -659,7 +659,7 @@ class EnhWMFReader : public WinMtf bool ReadHeader(); // reads and converts the rectangle - static Rectangle ReadRectangle( sal_Int32, sal_Int32, sal_Int32, sal_Int32 ); + static tools::Rectangle ReadRectangle( sal_Int32, sal_Int32, sal_Int32, sal_Int32 ); public: EnhWMFReader(SvStream& rStreamWMF, GDIMetaFile& rGDIMetaFile, FilterConfigItem* pConfigItem = nullptr); @@ -672,7 +672,7 @@ private: template <class T> tools::Polygon ReadPolygon(sal_uInt32 nStartIndex, sal_uInt32 nPoints); template <class T, class Drawer> void ReadAndDrawPolygon(Drawer drawer, const bool skipFirst); - Rectangle ReadRectangle(); + tools::Rectangle ReadRectangle(); void ReadEMFPlusComment(sal_uInt32 length, bool& bHaveDC); }; @@ -708,9 +708,9 @@ private: Point ReadPoint(); // reads and converts a point (first X then Y) Point ReadYX(); // reads and converts a point (first Y then X) - Rectangle ReadRectangle(); // reads and converts a rectangle + tools::Rectangle ReadRectangle(); // reads and converts a rectangle Size ReadYXExt(); - void GetPlaceableBound( Rectangle& rSize, SvStream* pStrm ); + void GetPlaceableBound( tools::Rectangle& rSize, SvStream* pStrm ); public: diff --git a/vcl/source/filter/wmf/winwmf.cxx b/vcl/source/filter/wmf/winwmf.cxx index a03781ff3568..94783f8879d4 100644 --- a/vcl/source/filter/wmf/winwmf.cxx +++ b/vcl/source/filter/wmf/winwmf.cxx @@ -112,7 +112,7 @@ #define W_META_CREATEBITMAP 0x06FE #define W_META_CREATEREGION 0x06FF -static void GetWinExtMax( const Point& rSource, Rectangle& rPlaceableBound, const sal_Int16 nMapMode ) +static void GetWinExtMax( const Point& rSource, tools::Rectangle& rPlaceableBound, const sal_Int16 nMapMode ) { Point aSource( rSource ); if ( nMapMode == MM_HIMETRIC ) @@ -127,7 +127,7 @@ static void GetWinExtMax( const Point& rSource, Rectangle& rPlaceableBound, cons rPlaceableBound.Bottom() = aSource.Y(); } -static void GetWinExtMax( const Rectangle& rSource, Rectangle& rPlaceableBound, const sal_Int16 nMapMode ) +static void GetWinExtMax( const tools::Rectangle& rSource, tools::Rectangle& rPlaceableBound, const sal_Int16 nMapMode ) { GetWinExtMax( rSource.TopLeft(), rPlaceableBound, nMapMode ); GetWinExtMax( rSource.BottomRight(), rPlaceableBound, nMapMode ); @@ -147,14 +147,14 @@ inline Point WMFReader::ReadYX() return Point( nX, nY ); } -Rectangle WMFReader::ReadRectangle() +tools::Rectangle WMFReader::ReadRectangle() { Point aBR, aTL; aBR = ReadYX(); aTL = ReadYX(); aBR.X()--; aBR.Y()--; - return Rectangle( aTL, aBR ); + return tools::Rectangle( aTL, aBR ); } Size WMFReader::ReadYXExt() @@ -306,7 +306,7 @@ void WMFReader::ReadRecordParams( sal_uInt16 nFunc ) { Point aEnd( ReadYX() ); Point aStart( ReadYX() ); - Rectangle aRect( ReadRectangle() ); + tools::Rectangle aRect( ReadRectangle() ); aRect.Justify(); pOut->DrawArc( aRect, aStart, aEnd ); } @@ -316,7 +316,7 @@ void WMFReader::ReadRecordParams( sal_uInt16 nFunc ) { Point aEnd( ReadYX() ); Point aStart( ReadYX() ); - Rectangle aRect( ReadRectangle() ); + tools::Rectangle aRect( ReadRectangle() ); aRect.Justify(); // #i73608# OutputDevice deviates from WMF @@ -332,7 +332,7 @@ void WMFReader::ReadRecordParams( sal_uInt16 nFunc ) { Point aEnd( ReadYX() ); Point aStart( ReadYX() ); - Rectangle aRect( ReadRectangle() ); + tools::Rectangle aRect( ReadRectangle() ); aRect.Justify(); pOut->DrawChord( aRect, aStart, aEnd ); } @@ -538,12 +538,12 @@ void WMFReader::ReadRecordParams( sal_uInt16 nFunc ) { sal_Int32 nOriginalTextLen = nLen; sal_Int32 nOriginalBlockLen = ( nOriginalTextLen + 1 ) &~ 1; - Rectangle aRect; + tools::Rectangle aRect; if( nOptions & ETO_CLIPPED ) { const Point aPt1( ReadPoint() ); const Point aPt2( ReadPoint() ); - aRect = Rectangle( aPt1, aPt2 ); + aRect = tools::Rectangle( aPt1, aPt2 ); } auto nRemainingSize = pWMF->remainingSize(); @@ -699,10 +699,10 @@ void WMFReader::ReadRecordParams( sal_uInt16 nFunc ) ( ( nSx + nSxe ) <= aBmp.GetSizePixel().Width() ) && ( ( nSy + nSye <= aBmp.GetSizePixel().Height() ) ) ) { - Rectangle aCropRect( Point( nSx, nSy ), Size( nSxe, nSye ) ); + tools::Rectangle aCropRect( Point( nSx, nSy ), Size( nSxe, nSye ) ); aBmp.Crop( aCropRect ); } - Rectangle aDestRect( aPoint, Size( nSxe, nSye ) ); + tools::Rectangle aDestRect( aPoint, Size( nSxe, nSye ) ); aBmpSaveList.emplace_back(new BSaveStruct(aBmp, aDestRect, nWinROP)); } } @@ -741,7 +741,7 @@ void WMFReader::ReadRecordParams( sal_uInt16 nFunc ) Size aDestSize( ReadYXExt() ); if ( aDestSize.Width() && aDestSize.Height() ) // #92623# do not try to read buggy bitmaps { - Rectangle aDestRect( ReadYX(), aDestSize ); + tools::Rectangle aDestRect( ReadYX(), aDestSize ); if ( nWinROP != PATCOPY ) ReadDIB(aBmp, *pWMF, false); @@ -750,7 +750,7 @@ void WMFReader::ReadRecordParams( sal_uInt16 nFunc ) ( ( nSx + nSxe ) <= aBmp.GetSizePixel().Width() ) && ( ( nSy + nSye <= aBmp.GetSizePixel().Height() ) ) ) { - Rectangle aCropRect( Point( nSx, nSy ), Size( nSxe, nSye ) ); + tools::Rectangle aCropRect( Point( nSx, nSy ), Size( nSxe, nSye ) ); aBmp.Crop( aCropRect ); } aBmpSaveList.emplace_back(new BSaveStruct(aBmp, aDestRect, nWinROP)); @@ -978,7 +978,7 @@ void WMFReader::ReadRecordParams( sal_uInt16 nFunc ) pWMF->ReadUInt32( nROP ); Size aSize = ReadYXExt(); nOldROP = pOut->SetRasterOp( (WMFRasterOp)nROP ); - pOut->DrawRect( Rectangle( ReadYX(), aSize ), false ); + pOut->DrawRect( tools::Rectangle( ReadYX(), aSize ), false ); pOut->SetRasterOp( nOldROP ); } break; @@ -1192,7 +1192,7 @@ bool WMFReader::ReadHeader() if (!pWMF->good()) return false; - Rectangle aPlaceableBound; + tools::Rectangle aPlaceableBound; bool bPlaceable = nPlaceableMetaKey == 0x9ac6cdd7L; @@ -1236,7 +1236,7 @@ bool WMFReader::ReadHeader() && (pExternalHeader->mapMode == MM_ISOTROPIC || pExternalHeader->mapMode == MM_ANISOTROPIC)) { // #n417818#: If we have an external header then overwrite the bounds! - Rectangle aExtRect(0, 0, + tools::Rectangle aExtRect(0, 0, (double) pExternalHeader->xExt * 567 * nUnitsPerInch / 1440000, (double) pExternalHeader->yExt * 567 * nUnitsPerInch / 1440000); aPlaceableBound = aExtRect; @@ -1259,7 +1259,7 @@ bool WMFReader::ReadHeader() { double fRatio = aPlaceableBound.GetWidth() / fMaxWidth; - aPlaceableBound = Rectangle( + aPlaceableBound = tools::Rectangle( aPlaceableBound.Left() / fRatio, aPlaceableBound.Top() / fRatio, aPlaceableBound.Right() / fRatio, @@ -1398,7 +1398,7 @@ void WMFReader::ReadWMF() if( bEMFAvailable ) { pOut->AddFromGDIMetaFile( aMeta ); - pOut->SetrclFrame( Rectangle( Point(0, 0), aMeta.GetPrefSize())); + pOut->SetrclFrame( tools::Rectangle( Point(0, 0), aMeta.GetPrefSize())); // the stream needs to be set to the wmf end position, // otherwise the GfxLink that is created will be incorrect @@ -1435,11 +1435,11 @@ void WMFReader::ReadWMF() pWMF->Seek( nStartPos ); } -void WMFReader::GetPlaceableBound( Rectangle& rPlaceableBound, SvStream* pStm ) +void WMFReader::GetPlaceableBound( tools::Rectangle& rPlaceableBound, SvStream* pStm ) { bool bRet = true; - Rectangle aBound; + tools::Rectangle aBound; aBound.Left() = RECT_MAX; aBound.Top() = RECT_MAX; aBound.Right() = RECT_MIN; @@ -1738,7 +1738,7 @@ void WMFReader::GetPlaceableBound( Rectangle& rPlaceableBound, SvStream* pStm ) Size aDestSize( ReadYXExt() ); if ( aDestSize.Width() && aDestSize.Height() ) // #92623# do not try to read buggy bitmaps { - Rectangle aDestRect( ReadYX(), aDestSize ); + tools::Rectangle aDestRect( ReadYX(), aDestSize ); GetWinExtMax( aDestRect, aBound, nMapMode ); bBoundsDetermined = true; } @@ -1751,7 +1751,7 @@ void WMFReader::GetPlaceableBound( Rectangle& rPlaceableBound, SvStream* pStm ) sal_uInt32 nROP; pStm->ReadUInt32( nROP ); Size aSize = ReadYXExt(); - GetWinExtMax( Rectangle( ReadYX(), aSize ), aBound, nMapMode ); + GetWinExtMax( tools::Rectangle( ReadYX(), aSize ), aBound, nMapMode ); bBoundsDetermined = true; } break; @@ -1781,14 +1781,14 @@ void WMFReader::GetPlaceableBound( Rectangle& rPlaceableBound, SvStream* pStm ) { if (aWinExt) { - rPlaceableBound = Rectangle(aWinOrg, *aWinExt); + rPlaceableBound = tools::Rectangle(aWinOrg, *aWinExt); SAL_INFO("vcl.wmf", "Window dimension " " t: " << rPlaceableBound.Left() << " l: " << rPlaceableBound.Top() << " b: " << rPlaceableBound.Right() << " r: " << rPlaceableBound.Bottom()); } else if (aViewportExt) { - rPlaceableBound = Rectangle(aViewportOrg, *aViewportExt); + rPlaceableBound = tools::Rectangle(aViewportOrg, *aViewportExt); SAL_INFO("vcl.wmf", "Viewport dimension " " t: " << rPlaceableBound.Left() << " l: " << rPlaceableBound.Top() << " b: " << rPlaceableBound.Right() << " r: " << rPlaceableBound.Bottom()); diff --git a/vcl/source/filter/wmf/wmfwr.cxx b/vcl/source/filter/wmf/wmfwr.cxx index 969a6f74d5a0..7950f105ee20 100644 --- a/vcl/source/filter/wmf/wmfwr.cxx +++ b/vcl/source/filter/wmf/wmfwr.cxx @@ -243,7 +243,7 @@ void WMFWriter::WriteHeightWidth(const Size & rSize) pWMF->WriteInt16( aSz.Height() ).WriteInt16( aSz.Width() ); } -void WMFWriter::WriteRectangle(const Rectangle & rRect) +void WMFWriter::WriteRectangle(const tools::Rectangle & rRect) { WritePointYX(Point(rRect.Right()+1,rRect.Bottom()+1)); WritePointYX(rRect.TopLeft()); @@ -278,7 +278,7 @@ void WMFWriter::UpdateRecordHeader() pWMF->Seek(nPos); } -void WMFWriter::WMFRecord_Arc(const Rectangle & rRect, const Point & rStartPt, const Point & rEndPt) +void WMFWriter::WMFRecord_Arc(const tools::Rectangle & rRect, const Point & rStartPt, const Point & rEndPt) { WriteRecordHeader(0x0000000b,W_META_ARC); WritePointYX(rEndPt); @@ -286,7 +286,7 @@ void WMFWriter::WMFRecord_Arc(const Rectangle & rRect, const Point & rStartPt, c WriteRectangle(rRect); } -void WMFWriter::WMFRecord_Chord(const Rectangle & rRect, const Point & rStartPt, const Point & rEndPt) +void WMFWriter::WMFRecord_Chord(const tools::Rectangle & rRect, const Point & rStartPt, const Point & rEndPt) { WriteRecordHeader(0x0000000b,W_META_CHORD); WritePointYX(rEndPt); @@ -411,7 +411,7 @@ void WMFWriter::WMFRecord_DeleteObject(sal_uInt16 nObjectHandle) pWMF->WriteUInt16( nObjectHandle ); } -void WMFWriter::WMFRecord_Ellipse(const Rectangle & rRect) +void WMFWriter::WMFRecord_Ellipse(const tools::Rectangle & rRect) { WriteRecordHeader(0x00000007,W_META_ELLIPSE); WriteRectangle(rRect); @@ -605,7 +605,7 @@ void WMFWriter::WMFRecord_MoveTo(const Point & rPoint) WritePointYX(rPoint); } -void WMFWriter::WMFRecord_Pie(const Rectangle & rRect, const Point & rStartPt, const Point & rEndPt) +void WMFWriter::WMFRecord_Pie(const tools::Rectangle & rRect, const Point & rStartPt, const Point & rEndPt) { WriteRecordHeader(0x0000000b,W_META_PIE); WritePointYX(rEndPt); @@ -668,7 +668,7 @@ void WMFWriter::WMFRecord_PolyPolygon(const tools::PolyPolygon & rPolyPoly) UpdateRecordHeader(); } -void WMFWriter::WMFRecord_Rectangle(const Rectangle & rRect) +void WMFWriter::WMFRecord_Rectangle(const tools::Rectangle & rRect) { WriteRecordHeader( 0x00000007,W_META_RECTANGLE ); WriteRectangle( rRect ); @@ -680,7 +680,7 @@ void WMFWriter::WMFRecord_RestoreDC() pWMF->WriteInt16( -1 ); } -void WMFWriter::WMFRecord_RoundRect(const Rectangle & rRect, long nHorzRound, long nVertRound) +void WMFWriter::WMFRecord_RoundRect(const tools::Rectangle & rRect, long nHorzRound, long nVertRound) { WriteRecordHeader(0x00000009,W_META_ROUNDRECT); WriteHeightWidth(Size(nHorzRound,nVertRound)); @@ -838,7 +838,7 @@ void WMFWriter::TrueTextOut(const Point & rPoint, const OString& rString) UpdateRecordHeader(); } -void WMFWriter::WMFRecord_IntersectClipRect( const Rectangle& rRect ) +void WMFWriter::WMFRecord_IntersectClipRect( const tools::Rectangle& rRect ) { WriteRecordHeader( 0x00000007, W_META_INTERSECTCLIPRECT ); WriteRectangle(rRect); @@ -1238,7 +1238,7 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF ) const MetaBmpScalePartAction* pA = static_cast<const MetaBmpScalePartAction*>(pMA); Bitmap aTmp( pA->GetBitmap() ); - if( aTmp.Crop( Rectangle( pA->GetSrcPoint(), pA->GetSrcSize() ) ) ) + if( aTmp.Crop( tools::Rectangle( pA->GetSrcPoint(), pA->GetSrcSize() ) ) ) WMFRecord_StretchDIB( pA->GetDestPoint(), pA->GetDestSize(), aTmp ); } break; @@ -1283,7 +1283,7 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF ) { const MetaBmpExScalePartAction* pA = static_cast<const MetaBmpExScalePartAction*>(pMA); BitmapEx aBmpEx( pA->GetBitmapEx() ); - aBmpEx.Crop( Rectangle( pA->GetSrcPoint(), pA->GetSrcSize() ) ); + aBmpEx.Crop( tools::Rectangle( pA->GetSrcPoint(), pA->GetSrcSize() ) ); Bitmap aBmp( aBmpEx.GetBitmap() ); Bitmap aMsk( aBmpEx.GetMask() ); diff --git a/vcl/source/filter/wmf/wmfwr.hxx b/vcl/source/filter/wmf/wmfwr.hxx index c7d130e4020e..8410275c5466 100644 --- a/vcl/source/filter/wmf/wmfwr.hxx +++ b/vcl/source/filter/wmf/wmfwr.hxx @@ -123,7 +123,7 @@ private: sal_Int32 ScaleWidth( sal_Int32 nDX ); void WriteSize(const Size & rSize); void WriteHeightWidth(const Size & rSize); - void WriteRectangle(const Rectangle & rRect); + void WriteRectangle(const tools::Rectangle & rRect); void WriteColor(const Color & rColor); void WriteRecordHeader(sal_uInt32 nSizeWords, sal_uInt16 nType); @@ -135,13 +135,13 @@ private: // nSizeWords was unknown upon calling WriteRecordHeader(..) // if needed it inserts a BYTE 0 to make number of bytes even - void WMFRecord_Arc(const Rectangle& rRect, const Point& rStartPt, const Point& rEndPt); - void WMFRecord_Chord(const Rectangle& rRect, const Point& rStartPt, const Point& rEndPt); + void WMFRecord_Arc(const tools::Rectangle& rRect, const Point& rStartPt, const Point& rEndPt); + void WMFRecord_Chord(const tools::Rectangle& rRect, const Point& rStartPt, const Point& rEndPt); void WMFRecord_CreateBrushIndirect(const Color& rColor); void WMFRecord_CreateFontIndirect(const vcl::Font& rFont); void WMFRecord_CreatePenIndirect(const Color& rColor, const LineInfo& rLineInfo ); void WMFRecord_DeleteObject(sal_uInt16 nObjectHandle); - void WMFRecord_Ellipse(const Rectangle& rRect); + void WMFRecord_Ellipse(const tools::Rectangle& rRect); void WMFRecord_Escape( sal_uInt32 nEsc, sal_uInt32 nLen, const sal_Int8* pData ); bool WMFRecord_Escape_Unicode( const Point& rPoint, const OUString& rStr, const long* pDXAry ); void WMFRecord_ExtTextOut(const Point& rPoint, const OUString& rString, const long* pDXAry); @@ -151,13 +151,13 @@ private: void TrueTextOut(const Point& rPoint, const OString& rString); void WMFRecord_LineTo(const Point & rPoint); void WMFRecord_MoveTo(const Point & rPoint); - void WMFRecord_Pie(const Rectangle & rRect, const Point & rStartPt, const Point & rEndPt); + void WMFRecord_Pie(const tools::Rectangle & rRect, const Point & rStartPt, const Point & rEndPt); void WMFRecord_Polygon(const tools::Polygon & rPoly); void WMFRecord_PolyLine(const tools::Polygon & rPoly); void WMFRecord_PolyPolygon(const tools::PolyPolygon & rPolyPoly); - void WMFRecord_Rectangle(const Rectangle & rRect); + void WMFRecord_Rectangle(const tools::Rectangle & rRect); void WMFRecord_RestoreDC(); - void WMFRecord_RoundRect(const Rectangle & rRect, long nHorzRound, long nVertRound); + void WMFRecord_RoundRect(const tools::Rectangle & rRect, long nHorzRound, long nVertRound); void WMFRecord_SaveDC(); void WMFRecord_SelectObject(sal_uInt16 nObjectHandle); void WMFRecord_SetBkMode(bool bTransparent); @@ -170,7 +170,7 @@ private: void WMFRecord_SetWindowOrg(const Point & rPoint); void WMFRecord_StretchDIB(const Point & rPoint, const Size & rSize, const Bitmap & rBitmap, sal_uInt32 nROP = 0UL ); void WMFRecord_TextOut(const Point & rPoint, const OUString & rString); - void WMFRecord_IntersectClipRect( const Rectangle& rRect); + void WMFRecord_IntersectClipRect( const tools::Rectangle& rRect); sal_uInt16 AllocHandle(); void FreeHandle(sal_uInt16 nObjectHandle); diff --git a/vcl/source/font/fontmetric.cxx b/vcl/source/font/fontmetric.cxx index 08153093dd1d..b397684136e0 100644 --- a/vcl/source/font/fontmetric.cxx +++ b/vcl/source/font/fontmetric.cxx @@ -325,7 +325,7 @@ void ImplFontMetricData::ImplInitTextLineSize( const OutputDevice* pDev ) if (MsLangId::isCJK(rFont.GetLanguage())) { const OUString sFullstop( sal_Unicode( 0x3001 ) ); // Fullwidth fullstop - Rectangle aRect; + tools::Rectangle aRect; pDev->GetTextBoundRect( aRect, sFullstop ); const sal_uInt16 nH = rFont.GetFontSize().Height(); const sal_uInt16 nB = aRect.Left(); diff --git a/vcl/source/fontsubset/cff.cxx b/vcl/source/fontsubset/cff.cxx index ca6115686d8a..f7d3cdd3d8ca 100644 --- a/vcl/source/fontsubset/cff.cxx +++ b/vcl/source/fontsubset/cff.cxx @@ -2103,7 +2103,7 @@ bool CffSubsetterContext::emitAsType1( Type1Emitter& rEmitter, fXFactor = 1000.0F * maFontMatrix[0]; fYFactor = 1000.0F * maFontMatrix[3]; } - rFSInfo.m_aFontBBox = Rectangle( Point( static_cast<sal_Int32>(maFontBBox[0] * fXFactor), + rFSInfo.m_aFontBBox = tools::Rectangle( Point( static_cast<sal_Int32>(maFontBBox[0] * fXFactor), static_cast<sal_Int32>(maFontBBox[1] * fYFactor) ), Point( static_cast<sal_Int32>(maFontBBox[2] * fXFactor), static_cast<sal_Int32>(maFontBBox[3] * fYFactor) ) ); diff --git a/vcl/source/gdi/animate.cxx b/vcl/source/gdi/animate.cxx index 72ea051ba2fe..bf3f42e937f1 100644 --- a/vcl/source/gdi/animate.cxx +++ b/vcl/source/gdi/animate.cxx @@ -161,7 +161,7 @@ void Animation::Clear() bool Animation::IsTransparent() const { Point aPoint; - Rectangle aRect( aPoint, maGlobalSize ); + tools::Rectangle aRect( aPoint, maGlobalSize ); bool bRet = false; // If some small bitmap needs to be replaced by the background, @@ -171,7 +171,7 @@ bool Animation::IsTransparent() const for(const AnimationBitmap* pAnimBmp : maList) { if( Disposal::Back == pAnimBmp->eDisposal - && Rectangle( pAnimBmp->aPosPix, pAnimBmp->aSizePix ) != aRect + && tools::Rectangle( pAnimBmp->aPosPix, pAnimBmp->aSizePix ) != aRect ) { bRet = true; @@ -466,9 +466,9 @@ bool Animation::Insert( const AnimationBitmap& rStepBmp ) if( !IsInAnimation() ) { Point aPoint; - Rectangle aGlobalRect( aPoint, maGlobalSize ); + tools::Rectangle aGlobalRect( aPoint, maGlobalSize ); - maGlobalSize = aGlobalRect.Union( Rectangle( rStepBmp.aPosPix, rStepBmp.aSizePix ) ).GetSize(); + maGlobalSize = aGlobalRect.Union( tools::Rectangle( rStepBmp.aPosPix, rStepBmp.aSizePix ) ).GetSize(); maList.push_back( new AnimationBitmap( rStepBmp ) ); // As a start, we make the first BitmapEx the replacement BitmapEx diff --git a/vcl/source/gdi/bitmap.cxx b/vcl/source/gdi/bitmap.cxx index 6ec5a842f30a..ec534784c3d8 100644 --- a/vcl/source/gdi/bitmap.cxx +++ b/vcl/source/gdi/bitmap.cxx @@ -438,7 +438,7 @@ bool Bitmap::Erase(const Color& rFillColor) else { Point aTmpPoint; - const Rectangle aRect( aTmpPoint, Size( pWriteAcc->Width(), pWriteAcc->Height() ) ); + const tools::Rectangle aRect( aTmpPoint, Size( pWriteAcc->Width(), pWriteAcc->Height() ) ); pWriteAcc->SetFillColor( rFillColor ); pWriteAcc->FillRect( aRect ); } @@ -638,11 +638,11 @@ bool Bitmap::Rotate( long nAngle10, const Color& rFillColor ) else { Point aTmpPoint; - Rectangle aTmpRectangle( aTmpPoint, aSizePix ); + tools::Rectangle aTmpRectangle( aTmpPoint, aSizePix ); tools::Polygon aPoly( aTmpRectangle ); aPoly.Rotate( aTmpPoint, (sal_uInt16) nAngle10 ); - Rectangle aNewBound( aPoly.GetBoundRect() ); + tools::Rectangle aNewBound( aPoly.GetBoundRect() ); const Size aNewSizePix( aNewBound.GetSize() ); Bitmap aNewBmp( aNewSizePix, GetBitCount(), &pReadAcc->GetPalette() ); ScopedWriteAccess pWriteAcc(aNewBmp); @@ -717,13 +717,13 @@ bool Bitmap::Rotate( long nAngle10, const Color& rFillColor ) return bRet; }; -bool Bitmap::Crop( const Rectangle& rRectPixel ) +bool Bitmap::Crop( const tools::Rectangle& rRectPixel ) { const Size aSizePix( GetSizePixel() ); - Rectangle aRect( rRectPixel ); + tools::Rectangle aRect( rRectPixel ); bool bRet = false; - aRect.Intersection( Rectangle( Point(), aSizePix ) ); + aRect.Intersection( tools::Rectangle( Point(), aSizePix ) ); if( !aRect.IsEmpty() && aSizePix != aRect.GetSize()) { @@ -732,7 +732,7 @@ bool Bitmap::Crop( const Rectangle& rRectPixel ) if( pReadAcc ) { Point aTmpPoint; - const Rectangle aNewRect( aTmpPoint, aRect.GetSize() ); + const tools::Rectangle aNewRect( aTmpPoint, aRect.GetSize() ); Bitmap aNewBmp( aNewRect.GetSize(), GetBitCount(), &pReadAcc->GetPalette() ); ScopedWriteAccess pWriteAcc(aNewBmp); @@ -761,14 +761,14 @@ bool Bitmap::Crop( const Rectangle& rRectPixel ) return bRet; }; -bool Bitmap::CopyPixel( const Rectangle& rRectDst, - const Rectangle& rRectSrc, const Bitmap* pBmpSrc ) +bool Bitmap::CopyPixel( const tools::Rectangle& rRectDst, + const tools::Rectangle& rRectSrc, const Bitmap* pBmpSrc ) { const Size aSizePix( GetSizePixel() ); - Rectangle aRectDst( rRectDst ); + tools::Rectangle aRectDst( rRectDst ); bool bRet = false; - aRectDst.Intersection( Rectangle( Point(), aSizePix ) ); + aRectDst.Intersection( tools::Rectangle( Point(), aSizePix ) ); if( !aRectDst.IsEmpty() ) { @@ -776,7 +776,7 @@ bool Bitmap::CopyPixel( const Rectangle& rRectDst, { Bitmap* pSrc = const_cast<Bitmap*>(pBmpSrc); const Size aCopySizePix( pSrc->GetSizePixel() ); - Rectangle aRectSrc( rRectSrc ); + tools::Rectangle aRectSrc( rRectSrc ); const sal_uInt16 nSrcBitCount = pBmpSrc->GetBitCount(); const sal_uInt16 nDstBitCount = GetBitCount(); @@ -829,7 +829,7 @@ bool Bitmap::CopyPixel( const Rectangle& rRectDst, } } - aRectSrc.Intersection( Rectangle( Point(), aCopySizePix ) ); + aRectSrc.Intersection( tools::Rectangle( Point(), aCopySizePix ) ); if( !aRectSrc.IsEmpty() ) { @@ -882,9 +882,9 @@ bool Bitmap::CopyPixel( const Rectangle& rRectDst, } else { - Rectangle aRectSrc( rRectSrc ); + tools::Rectangle aRectSrc( rRectSrc ); - aRectSrc.Intersection( Rectangle( Point(), aSizePix ) ); + aRectSrc.Intersection( tools::Rectangle( Point(), aSizePix ) ); if( !aRectSrc.IsEmpty() && ( aRectSrc != aRectDst ) ) { @@ -938,16 +938,16 @@ bool Bitmap::CopyPixel( const Rectangle& rRectDst, return bRet; } -bool Bitmap::CopyPixel_AlphaOptimized( const Rectangle& rRectDst, const Rectangle& rRectSrc, +bool Bitmap::CopyPixel_AlphaOptimized( const tools::Rectangle& rRectDst, const tools::Rectangle& rRectSrc, const Bitmap* pBmpSrc ) { // Note: this code is copied from Bitmap::CopyPixel but avoids any palette lookups // This optimization is possible because the palettes of AlphaMasks are always identical (8bit GreyPalette, see ctor) const Size aSizePix( GetSizePixel() ); - Rectangle aRectDst( rRectDst ); + tools::Rectangle aRectDst( rRectDst ); bool bRet = false; - aRectDst.Intersection( Rectangle( Point(), aSizePix ) ); + aRectDst.Intersection( tools::Rectangle( Point(), aSizePix ) ); if( !aRectDst.IsEmpty() ) { @@ -955,9 +955,9 @@ bool Bitmap::CopyPixel_AlphaOptimized( const Rectangle& rRectDst, const Rectangl { Bitmap* pSrc = const_cast<Bitmap*>(pBmpSrc); const Size aCopySizePix( pSrc->GetSizePixel() ); - Rectangle aRectSrc( rRectSrc ); + tools::Rectangle aRectSrc( rRectSrc ); - aRectSrc.Intersection( Rectangle( Point(), aCopySizePix ) ); + aRectSrc.Intersection( tools::Rectangle( Point(), aCopySizePix ) ); if( !aRectSrc.IsEmpty() ) { @@ -989,9 +989,9 @@ bool Bitmap::CopyPixel_AlphaOptimized( const Rectangle& rRectDst, const Rectangl } else { - Rectangle aRectSrc( rRectSrc ); + tools::Rectangle aRectSrc( rRectSrc ); - aRectSrc.Intersection( Rectangle( Point(), aSizePix ) ); + aRectSrc.Intersection( tools::Rectangle( Point(), aSizePix ) ); if( !aRectSrc.IsEmpty() && ( aRectSrc != aRectDst ) ) { @@ -1299,13 +1299,13 @@ Bitmap Bitmap::CreateMask( const Color& rTransColor, sal_uLong nTol ) const return aNewBmp; } -vcl::Region Bitmap::CreateRegion( const Color& rColor, const Rectangle& rRect ) const +vcl::Region Bitmap::CreateRegion( const Color& rColor, const tools::Rectangle& rRect ) const { vcl::Region aRegion; - Rectangle aRect( rRect ); + tools::Rectangle aRect( rRect ); ScopedReadAccess pReadAcc(const_cast<Bitmap&>(*this)); - aRect.Intersection( Rectangle( Point(), GetSizePixel() ) ); + aRect.Intersection( tools::Rectangle( Point(), GetSizePixel() ) ); aRect.Justify(); if( pReadAcc ) @@ -1356,7 +1356,7 @@ vcl::Region Bitmap::CreateRegion( const Color& rColor, const Rectangle& rRect ) // need to write aLine, it's different from the next line if(aLine.size()) { - Rectangle aSubRect; + tools::Rectangle aSubRect; // enter y values and proceed ystart aSubRect.Top() = nYStart; @@ -1379,7 +1379,7 @@ vcl::Region Bitmap::CreateRegion( const Color& rColor, const Rectangle& rRect ) // write last line if used if(aLine.size()) { - Rectangle aSubRect; + tools::Rectangle aSubRect; // enter y values aSubRect.Top() = nYStart; diff --git a/vcl/source/gdi/bitmapex.cxx b/vcl/source/gdi/bitmapex.cxx index 8e0f7f0e22b4..1231ab165367 100644 --- a/vcl/source/gdi/bitmapex.cxx +++ b/vcl/source/gdi/bitmapex.cxx @@ -81,8 +81,8 @@ BitmapEx::BitmapEx( const BitmapEx& rBitmapEx, Point aSrc, Size aSize ) else if( rBitmapEx.IsTransparent() ) aMask = Bitmap( aSize, rBitmapEx.aMask.GetBitCount() ); - Rectangle aDestRect( Point( 0, 0 ), aSize ); - Rectangle aSrcRect( aSrc, aSize ); + tools::Rectangle aDestRect( Point( 0, 0 ), aSize ); + tools::Rectangle aSrcRect( aSrc, aSize ); CopyPixel( aDestRect, aSrcRect, &rBitmapEx ); } @@ -447,7 +447,7 @@ bool BitmapEx::Rotate( long nAngle10, const Color& rFillColor ) return bRet; } -bool BitmapEx::Crop( const Rectangle& rRectPixel ) +bool BitmapEx::Crop( const tools::Rectangle& rRectPixel ) { bool bRet = false; @@ -500,7 +500,7 @@ bool BitmapEx::Expand( sal_uLong nDX, sal_uLong nDY, bool bExpandTransparent ) return bRet; } -bool BitmapEx::CopyPixel( const Rectangle& rRectDst, const Rectangle& rRectSrc, +bool BitmapEx::CopyPixel( const tools::Rectangle& rRectDst, const tools::Rectangle& rRectSrc, const BitmapEx* pBmpExSrc ) { bool bRet = false; @@ -693,7 +693,7 @@ BitmapEx BitmapEx:: AutoScaleBitmap(BitmapEx & aBitmap, const long aStandardSize } Size aStdSize( aStandardSize, aStandardSize ); - Rectangle aRect(aEmptyPoint, aStdSize ); + tools::Rectangle aRect(aEmptyPoint, aStdSize ); ScopedVclPtrInstance< VirtualDevice > aVirDevice(*Application::GetDefaultDevice(), DeviceFormat::DEFAULT, DeviceFormat::BITMASK); diff --git a/vcl/source/gdi/bmpacc3.cxx b/vcl/source/gdi/bmpacc3.cxx index 754a4bb6cc53..f8aeb5c99bf9 100644 --- a/vcl/source/gdi/bmpacc3.cxx +++ b/vcl/source/gdi/bmpacc3.cxx @@ -85,7 +85,7 @@ void BitmapWriteAccess::Erase( const Color& rColor ) // use the canonical method to clear the bitmap BitmapColor* pOldFillColor = mpFillColor ? new BitmapColor(*mpFillColor) : nullptr; const Point aPoint; - const Rectangle aRect(aPoint, maBitmap.GetSizePixel()); + const tools::Rectangle aRect(aPoint, maBitmap.GetSizePixel()); SetFillColor(rColor); FillRect(aRect); @@ -229,13 +229,13 @@ void BitmapWriteAccess::DrawLine( const Point& rStart, const Point& rEnd ) } } -void BitmapWriteAccess::FillRect( const Rectangle& rRect ) +void BitmapWriteAccess::FillRect( const tools::Rectangle& rRect ) { if (mpFillColor) { const BitmapColor& rFillColor = *mpFillColor.get(); Point aPoint; - Rectangle aRect(aPoint, maBitmap.GetSizePixel()); + tools::Rectangle aRect(aPoint, maBitmap.GetSizePixel()); aRect.Intersection(rRect); @@ -257,7 +257,7 @@ void BitmapWriteAccess::FillRect( const Rectangle& rRect ) } } -void BitmapWriteAccess::DrawRect( const Rectangle& rRect ) +void BitmapWriteAccess::DrawRect( const tools::Rectangle& rRect ) { if (mpFillColor) FillRect(rRect); diff --git a/vcl/source/gdi/gdimetafiletools.cxx b/vcl/source/gdi/gdimetafiletools.cxx index 5bb96bef602a..6cbdcdc0734f 100644 --- a/vcl/source/gdi/gdimetafiletools.cxx +++ b/vcl/source/gdi/gdimetafiletools.cxx @@ -313,7 +313,7 @@ void clipMetafileContentAgainstOwnRegions(GDIMetaFile& rSource) case MetaActionType::ISECTRECTCLIPREGION : { const MetaISectRectClipRegionAction* pA = static_cast< const MetaISectRectClipRegionAction* >(pAction); - const Rectangle& rRect = pA->GetRect(); + const tools::Rectangle& rRect = pA->GetRect(); if(!rRect.IsEmpty() && aClips.size() && aClips.back().count()) { @@ -501,7 +501,7 @@ void clipMetafileContentAgainstOwnRegions(GDIMetaFile& rSource) case MetaActionType::RECT : { const MetaRectAction* pA = static_cast< const MetaRectAction* >(pAction); - const Rectangle& rRect = pA->GetRect(); + const tools::Rectangle& rRect = pA->GetRect(); if(rRect.IsEmpty()) { @@ -526,7 +526,7 @@ void clipMetafileContentAgainstOwnRegions(GDIMetaFile& rSource) case MetaActionType::ROUNDRECT : { const MetaRoundRectAction* pA = static_cast< const MetaRoundRectAction* >(pAction); - const Rectangle& rRect = pA->GetRect(); + const tools::Rectangle& rRect = pA->GetRect(); if(rRect.IsEmpty()) { @@ -565,7 +565,7 @@ void clipMetafileContentAgainstOwnRegions(GDIMetaFile& rSource) case MetaActionType::ELLIPSE : { const MetaEllipseAction* pA = static_cast< const MetaEllipseAction* >(pAction); - const Rectangle& rRect = pA->GetRect(); + const tools::Rectangle& rRect = pA->GetRect(); if(rRect.IsEmpty()) { @@ -591,7 +591,7 @@ void clipMetafileContentAgainstOwnRegions(GDIMetaFile& rSource) case MetaActionType::ARC : { const MetaArcAction* pA = static_cast< const MetaArcAction* >(pAction); - const Rectangle& rRect = pA->GetRect(); + const tools::Rectangle& rRect = pA->GetRect(); if(rRect.IsEmpty()) { @@ -617,7 +617,7 @@ void clipMetafileContentAgainstOwnRegions(GDIMetaFile& rSource) case MetaActionType::PIE : { const MetaPieAction* pA = static_cast< const MetaPieAction* >(pAction); - const Rectangle& rRect = pA->GetRect(); + const tools::Rectangle& rRect = pA->GetRect(); if(rRect.IsEmpty()) { @@ -643,7 +643,7 @@ void clipMetafileContentAgainstOwnRegions(GDIMetaFile& rSource) case MetaActionType::CHORD : { const MetaChordAction* pA = static_cast< const MetaChordAction* >(pAction); - const Rectangle& rRect = pA->GetRect(); + const tools::Rectangle& rRect = pA->GetRect(); if(rRect.IsEmpty()) { @@ -799,7 +799,7 @@ void clipMetafileContentAgainstOwnRegions(GDIMetaFile& rSource) else { BitmapEx aCroppedBitmapEx(rBitmapEx); - const Rectangle aCropRectangle(pA->GetSrcPoint(), pA->GetSrcSize()); + const tools::Rectangle aCropRectangle(pA->GetSrcPoint(), pA->GetSrcSize()); if(aCropRectangle.IsEmpty()) { @@ -833,7 +833,7 @@ void clipMetafileContentAgainstOwnRegions(GDIMetaFile& rSource) else { Bitmap aCroppedBitmap(rBitmap); - const Rectangle aCropRectangle(pA->GetSrcPoint(), pA->GetSrcSize()); + const tools::Rectangle aCropRectangle(pA->GetSrcPoint(), pA->GetSrcSize()); if(aCropRectangle.IsEmpty()) { @@ -964,7 +964,7 @@ void clipMetafileContentAgainstOwnRegions(GDIMetaFile& rSource) case MetaActionType::GRADIENT : { const MetaGradientAction* pA = static_cast< const MetaGradientAction* >(pAction); - const Rectangle& rRect = pA->GetRect(); + const tools::Rectangle& rRect = pA->GetRect(); if(rRect.IsEmpty()) { diff --git a/vcl/source/gdi/gdimtf.cxx b/vcl/source/gdi/gdimtf.cxx index 320e9a1f7af4..3c673b91e7c5 100644 --- a/vcl/source/gdi/gdimtf.cxx +++ b/vcl/source/gdi/gdimtf.cxx @@ -748,9 +748,9 @@ void GDIMetaFile::Scale( const Fraction& rScaleX, const Fraction& rScaleY ) Scale( (double) rScaleX, (double) rScaleY ); } -void GDIMetaFile::Clip( const Rectangle& i_rClipRect ) +void GDIMetaFile::Clip( const tools::Rectangle& i_rClipRect ) { - Rectangle aCurRect( i_rClipRect ); + tools::Rectangle aCurRect( i_rClipRect ); ScopedVclPtrInstance< VirtualDevice > aMapVDev; aMapVDev->EnableOutput( false ); @@ -847,7 +847,7 @@ void GDIMetaFile::Rotate( long nAngle10 ) const double fAngle = F_PI1800 * nAngle10; const double fSin = sin( fAngle ); const double fCos = cos( fAngle ); - Rectangle aRect=Rectangle( Point(), GetPrefSize() ); + tools::Rectangle aRect=tools::Rectangle( Point(), GetPrefSize() ); tools::Polygon aPoly( aRect ); aPoly.Rotate( Point(), fSin, fCos ); @@ -855,7 +855,7 @@ void GDIMetaFile::Rotate( long nAngle10 ) aMapVDev->EnableOutput( false ); aMapVDev->SetMapMode( GetPrefMapMode() ); - const Rectangle aNewBound( aPoly.GetBoundRect() ); + const tools::Rectangle aNewBound( aPoly.GetBoundRect() ); const Point aOrigin( GetPrefMapMode().GetOrigin().X(), GetPrefMapMode().GetOrigin().Y() ); const Size aOffset( -aNewBound.Left(), -aNewBound.Top() ); @@ -1001,8 +1001,8 @@ void GDIMetaFile::Rotate( long nAngle10 ) case( MetaActionType::BMPSCALE ): { MetaBmpScaleAction* pAct = static_cast<MetaBmpScaleAction*>(pAction); - tools::Polygon aBmpPoly( ImplGetRotatedPolygon( Rectangle( pAct->GetPoint(), pAct->GetSize() ), aRotAnchor, aRotOffset, fSin, fCos ) ); - Rectangle aBmpRect( aBmpPoly.GetBoundRect() ); + tools::Polygon aBmpPoly( ImplGetRotatedPolygon( tools::Rectangle( pAct->GetPoint(), pAct->GetSize() ), aRotAnchor, aRotOffset, fSin, fCos ) ); + tools::Rectangle aBmpRect( aBmpPoly.GetBoundRect() ); BitmapEx aBmpEx( pAct->GetBitmap() ); aBmpEx.Rotate( nAngle10, Color( COL_TRANSPARENT ) ); @@ -1014,11 +1014,11 @@ void GDIMetaFile::Rotate( long nAngle10 ) case( MetaActionType::BMPSCALEPART ): { MetaBmpScalePartAction* pAct = static_cast<MetaBmpScalePartAction*>(pAction); - tools::Polygon aBmpPoly( ImplGetRotatedPolygon( Rectangle( pAct->GetDestPoint(), pAct->GetDestSize() ), aRotAnchor, aRotOffset, fSin, fCos ) ); - Rectangle aBmpRect( aBmpPoly.GetBoundRect() ); + tools::Polygon aBmpPoly( ImplGetRotatedPolygon( tools::Rectangle( pAct->GetDestPoint(), pAct->GetDestSize() ), aRotAnchor, aRotOffset, fSin, fCos ) ); + tools::Rectangle aBmpRect( aBmpPoly.GetBoundRect() ); BitmapEx aBmpEx( pAct->GetBitmap() ); - aBmpEx.Crop( Rectangle( pAct->GetSrcPoint(), pAct->GetSrcSize() ) ); + aBmpEx.Crop( tools::Rectangle( pAct->GetSrcPoint(), pAct->GetSrcSize() ) ); aBmpEx.Rotate( nAngle10, Color( COL_TRANSPARENT ) ); aMtf.AddAction( new MetaBmpExScaleAction( aBmpRect.TopLeft(), aBmpRect.GetSize(), aBmpEx ) ); @@ -1028,8 +1028,8 @@ void GDIMetaFile::Rotate( long nAngle10 ) case( MetaActionType::BMPEXSCALE ): { MetaBmpExScaleAction* pAct = static_cast<MetaBmpExScaleAction*>(pAction); - tools::Polygon aBmpPoly( ImplGetRotatedPolygon( Rectangle( pAct->GetPoint(), pAct->GetSize() ), aRotAnchor, aRotOffset, fSin, fCos ) ); - Rectangle aBmpRect( aBmpPoly.GetBoundRect() ); + tools::Polygon aBmpPoly( ImplGetRotatedPolygon( tools::Rectangle( pAct->GetPoint(), pAct->GetSize() ), aRotAnchor, aRotOffset, fSin, fCos ) ); + tools::Rectangle aBmpRect( aBmpPoly.GetBoundRect() ); BitmapEx aBmpEx( pAct->GetBitmapEx() ); aBmpEx.Rotate( nAngle10, Color( COL_TRANSPARENT ) ); @@ -1041,11 +1041,11 @@ void GDIMetaFile::Rotate( long nAngle10 ) case( MetaActionType::BMPEXSCALEPART ): { MetaBmpExScalePartAction* pAct = static_cast<MetaBmpExScalePartAction*>(pAction); - tools::Polygon aBmpPoly( ImplGetRotatedPolygon( Rectangle( pAct->GetDestPoint(), pAct->GetDestSize() ), aRotAnchor, aRotOffset, fSin, fCos ) ); - Rectangle aBmpRect( aBmpPoly.GetBoundRect() ); + tools::Polygon aBmpPoly( ImplGetRotatedPolygon( tools::Rectangle( pAct->GetDestPoint(), pAct->GetDestSize() ), aRotAnchor, aRotOffset, fSin, fCos ) ); + tools::Rectangle aBmpRect( aBmpPoly.GetBoundRect() ); BitmapEx aBmpEx( pAct->GetBitmapEx() ); - aBmpEx.Crop( Rectangle( pAct->GetSrcPoint(), pAct->GetSrcSize() ) ); + aBmpEx.Crop( tools::Rectangle( pAct->GetSrcPoint(), pAct->GetSrcSize() ) ); aBmpEx.Rotate( nAngle10, Color( COL_TRANSPARENT ) ); aMtf.AddAction( new MetaBmpExScaleAction( aBmpRect.TopLeft(), aBmpRect.GetSize(), aBmpEx ) ); @@ -1182,8 +1182,8 @@ void GDIMetaFile::Rotate( long nAngle10 ) { MetaFloatTransparentAction* pAct = static_cast<MetaFloatTransparentAction*>(pAction); GDIMetaFile aTransMtf( pAct->GetGDIMetaFile() ); - tools::Polygon aMtfPoly( ImplGetRotatedPolygon( Rectangle( pAct->GetPoint(), pAct->GetSize() ), aRotAnchor, aRotOffset, fSin, fCos ) ); - Rectangle aMtfRect( aMtfPoly.GetBoundRect() ); + tools::Polygon aMtfPoly( ImplGetRotatedPolygon( tools::Rectangle( pAct->GetPoint(), pAct->GetSize() ), aRotAnchor, aRotOffset, fSin, fCos ) ); + tools::Rectangle aMtfRect( aMtfPoly.GetBoundRect() ); aTransMtf.Rotate( nAngle10 ); aMtf.AddAction( new MetaFloatTransparentAction( aTransMtf, aMtfRect.TopLeft(), aMtfRect.GetSize(), @@ -1195,8 +1195,8 @@ void GDIMetaFile::Rotate( long nAngle10 ) { MetaEPSAction* pAct = static_cast<MetaEPSAction*>(pAction); GDIMetaFile aEPSMtf( pAct->GetSubstitute() ); - tools::Polygon aEPSPoly( ImplGetRotatedPolygon( Rectangle( pAct->GetPoint(), pAct->GetSize() ), aRotAnchor, aRotOffset, fSin, fCos ) ); - Rectangle aEPSRect( aEPSPoly.GetBoundRect() ); + tools::Polygon aEPSPoly( ImplGetRotatedPolygon( tools::Rectangle( pAct->GetPoint(), pAct->GetSize() ), aRotAnchor, aRotOffset, fSin, fCos ) ); + tools::Rectangle aEPSRect( aEPSPoly.GetBoundRect() ); aEPSMtf.Rotate( nAngle10 ); aMtf.AddAction( new MetaEPSAction( aEPSRect.TopLeft(), aEPSRect.GetSize(), @@ -1298,12 +1298,12 @@ void GDIMetaFile::Rotate( long nAngle10 ) } } -static void ImplActionBounds( Rectangle& o_rOutBounds, - const Rectangle& i_rInBounds, - const std::vector<Rectangle>& i_rClipStack, - Rectangle* o_pHairline ) +static void ImplActionBounds( tools::Rectangle& o_rOutBounds, + const tools::Rectangle& i_rInBounds, + const std::vector<tools::Rectangle>& i_rClipStack, + tools::Rectangle* o_pHairline ) { - Rectangle aBounds( i_rInBounds ); + tools::Rectangle aBounds( i_rInBounds ); if( ! i_rInBounds.IsEmpty() && ! i_rClipStack.empty() && ! i_rClipStack.back().IsEmpty() ) aBounds.Intersection( i_rClipStack.back() ); if( ! aBounds.IsEmpty() ) @@ -1323,7 +1323,7 @@ static void ImplActionBounds( Rectangle& o_rOutBounds, } } -Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHairline ) const +tools::Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, tools::Rectangle* pHairline ) const { GDIMetaFile aMtf; ScopedVclPtrInstance< VirtualDevice > aMapVDev( i_rReference ); @@ -1331,13 +1331,13 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai aMapVDev->EnableOutput( false ); aMapVDev->SetMapMode( GetPrefMapMode() ); - std::vector<Rectangle> aClipStack( 1, Rectangle() ); + std::vector<tools::Rectangle> aClipStack( 1, tools::Rectangle() ); std::vector<PushFlags> aPushFlagStack; - Rectangle aBound; + tools::Rectangle aBound; if(pHairline) - *pHairline = Rectangle(); + *pHairline = tools::Rectangle(); const sal_uLong nCount(GetActionSize()); @@ -1345,7 +1345,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai { MetaAction* pAction = GetAction(a); const MetaActionType nActionType = pAction->GetType(); - Rectangle* pUseHairline = (pHairline && aMapVDev->IsLineColor()) ? pHairline : nullptr; + tools::Rectangle* pUseHairline = (pHairline && aMapVDev->IsLineColor()) ? pHairline : nullptr; switch( nActionType ) { @@ -1353,7 +1353,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai { MetaPixelAction* pAct = static_cast<MetaPixelAction*>(pAction); ImplActionBounds( aBound, - Rectangle( OutputDevice::LogicToLogic( pAct->GetPoint(), aMapVDev->GetMapMode(), GetPrefMapMode() ), + tools::Rectangle( OutputDevice::LogicToLogic( pAct->GetPoint(), aMapVDev->GetMapMode(), GetPrefMapMode() ), aMapVDev->PixelToLogic( Size( 1, 1 ), GetPrefMapMode() ) ), aClipStack, pUseHairline ); } @@ -1363,7 +1363,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai { MetaPointAction* pAct = static_cast<MetaPointAction*>(pAction); ImplActionBounds( aBound, - Rectangle( OutputDevice::LogicToLogic( pAct->GetPoint(), aMapVDev->GetMapMode(), GetPrefMapMode() ), + tools::Rectangle( OutputDevice::LogicToLogic( pAct->GetPoint(), aMapVDev->GetMapMode(), GetPrefMapMode() ), aMapVDev->PixelToLogic( Size( 1, 1 ), GetPrefMapMode() ) ), aClipStack, pUseHairline ); } @@ -1373,7 +1373,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai { MetaLineAction* pAct = static_cast<MetaLineAction*>(pAction); Point aP1( pAct->GetStartPoint() ), aP2( pAct->GetEndPoint() ); - Rectangle aRect( aP1, aP2 ); + tools::Rectangle aRect( aP1, aP2 ); aRect.Justify(); if(pUseHairline) @@ -1439,7 +1439,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai case( MetaActionType::POLYLINE ): { MetaPolyLineAction* pAct = static_cast<MetaPolyLineAction*>(pAction); - Rectangle aRect( pAct->GetPolygon().GetBoundRect() ); + tools::Rectangle aRect( pAct->GetPolygon().GetBoundRect() ); if(pUseHairline) { @@ -1456,7 +1456,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai case( MetaActionType::POLYGON ): { MetaPolygonAction* pAct = static_cast<MetaPolygonAction*>(pAction); - Rectangle aRect( pAct->GetPolygon().GetBoundRect() ); + tools::Rectangle aRect( pAct->GetPolygon().GetBoundRect() ); ImplActionBounds( aBound, OutputDevice::LogicToLogic( aRect, aMapVDev->GetMapMode(), GetPrefMapMode() ), aClipStack, pUseHairline ); } break; @@ -1464,7 +1464,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai case( MetaActionType::POLYPOLYGON ): { MetaPolyPolygonAction* pAct = static_cast<MetaPolyPolygonAction*>(pAction); - Rectangle aRect( pAct->GetPolyPolygon().GetBoundRect() ); + tools::Rectangle aRect( pAct->GetPolyPolygon().GetBoundRect() ); ImplActionBounds( aBound, OutputDevice::LogicToLogic( aRect, aMapVDev->GetMapMode(), GetPrefMapMode() ), aClipStack, pUseHairline ); } break; @@ -1472,7 +1472,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai case( MetaActionType::TEXT ): { MetaTextAction* pAct = static_cast<MetaTextAction*>(pAction); - Rectangle aRect; + tools::Rectangle aRect; // hdu said base = index aMapVDev->GetTextBoundRect( aRect, pAct->GetText(), pAct->GetIndex(), pAct->GetIndex(), pAct->GetLen() ); Point aPt( pAct->GetPoint() ); @@ -1484,7 +1484,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai case( MetaActionType::TEXTARRAY ): { MetaTextArrayAction* pAct = static_cast<MetaTextArrayAction*>(pAction); - Rectangle aRect; + tools::Rectangle aRect; // hdu said base = index aMapVDev->GetTextBoundRect( aRect, pAct->GetText(), pAct->GetIndex(), pAct->GetIndex(), pAct->GetLen(), 0, pAct->GetDXArray() ); @@ -1497,7 +1497,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai case( MetaActionType::STRETCHTEXT ): { MetaStretchTextAction* pAct = static_cast<MetaStretchTextAction*>(pAction); - Rectangle aRect; + tools::Rectangle aRect; // hdu said base = index aMapVDev->GetTextBoundRect( aRect, pAct->GetText(), pAct->GetIndex(), pAct->GetIndex(), pAct->GetLen(), pAct->GetWidth() ); @@ -1514,7 +1514,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai static const sal_Unicode pStr[] = { 0xc4, 0x67, 0 }; OUString aStr( pStr ); - Rectangle aRect; + tools::Rectangle aRect; aMapVDev->GetTextBoundRect( aRect, aStr, 0, 0, aStr.getLength() ); Point aPt( pAct->GetStartPoint() ); aRect.Move( aPt.X(), aPt.Y() ); @@ -1526,7 +1526,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai case( MetaActionType::BMPSCALE ): { MetaBmpScaleAction* pAct = static_cast<MetaBmpScaleAction*>(pAction); - Rectangle aRect( pAct->GetPoint(), pAct->GetSize() ); + tools::Rectangle aRect( pAct->GetPoint(), pAct->GetSize() ); ImplActionBounds( aBound, OutputDevice::LogicToLogic( aRect, aMapVDev->GetMapMode(), GetPrefMapMode() ), aClipStack, nullptr ); } break; @@ -1534,7 +1534,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai case( MetaActionType::BMPSCALEPART ): { MetaBmpScalePartAction* pAct = static_cast<MetaBmpScalePartAction*>(pAction); - Rectangle aRect( pAct->GetDestPoint(), pAct->GetDestSize() ); + tools::Rectangle aRect( pAct->GetDestPoint(), pAct->GetDestSize() ); ImplActionBounds( aBound, OutputDevice::LogicToLogic( aRect, aMapVDev->GetMapMode(), GetPrefMapMode() ), aClipStack, nullptr ); } break; @@ -1542,7 +1542,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai case( MetaActionType::BMPEXSCALE ): { MetaBmpExScaleAction* pAct = static_cast<MetaBmpExScaleAction*>(pAction); - Rectangle aRect( pAct->GetPoint(), pAct->GetSize() ); + tools::Rectangle aRect( pAct->GetPoint(), pAct->GetSize() ); ImplActionBounds( aBound, OutputDevice::LogicToLogic( aRect, aMapVDev->GetMapMode(), GetPrefMapMode() ), aClipStack, nullptr ); } break; @@ -1550,7 +1550,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai case( MetaActionType::BMPEXSCALEPART ): { MetaBmpExScalePartAction* pAct = static_cast<MetaBmpExScalePartAction*>(pAction); - Rectangle aRect( pAct->GetDestPoint(), pAct->GetDestSize() ); + tools::Rectangle aRect( pAct->GetDestPoint(), pAct->GetDestSize() ); ImplActionBounds( aBound, OutputDevice::LogicToLogic( aRect, aMapVDev->GetMapMode(), GetPrefMapMode() ), aClipStack, nullptr ); } break; @@ -1558,7 +1558,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai case( MetaActionType::GRADIENT ): { MetaGradientAction* pAct = static_cast<MetaGradientAction*>(pAction); - Rectangle aRect( pAct->GetRect() ); + tools::Rectangle aRect( pAct->GetRect() ); ImplActionBounds( aBound, OutputDevice::LogicToLogic( aRect, aMapVDev->GetMapMode(), GetPrefMapMode() ), aClipStack, nullptr ); } break; @@ -1566,7 +1566,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai case( MetaActionType::GRADIENTEX ): { MetaGradientExAction* pAct = static_cast<MetaGradientExAction*>(pAction); - Rectangle aRect( pAct->GetPolyPolygon().GetBoundRect() ); + tools::Rectangle aRect( pAct->GetPolyPolygon().GetBoundRect() ); ImplActionBounds( aBound, OutputDevice::LogicToLogic( aRect, aMapVDev->GetMapMode(), GetPrefMapMode() ), aClipStack, nullptr ); } break; @@ -1580,7 +1580,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai case( MetaActionType::HATCH ): { MetaHatchAction* pAct = static_cast<MetaHatchAction*>(pAction); - Rectangle aRect( pAct->GetPolyPolygon().GetBoundRect() ); + tools::Rectangle aRect( pAct->GetPolyPolygon().GetBoundRect() ); ImplActionBounds( aBound, OutputDevice::LogicToLogic( aRect, aMapVDev->GetMapMode(), GetPrefMapMode() ), aClipStack, nullptr ); } break; @@ -1588,7 +1588,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai case( MetaActionType::Transparent ): { MetaTransparentAction* pAct = static_cast<MetaTransparentAction*>(pAction); - Rectangle aRect( pAct->GetPolyPolygon().GetBoundRect() ); + tools::Rectangle aRect( pAct->GetPolyPolygon().GetBoundRect() ); ImplActionBounds( aBound, OutputDevice::LogicToLogic( aRect, aMapVDev->GetMapMode(), GetPrefMapMode() ), aClipStack, nullptr ); } break; @@ -1598,7 +1598,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai MetaFloatTransparentAction* pAct = static_cast<MetaFloatTransparentAction*>(pAction); // MetaFloatTransparentAction is defined limiting its content Metafile // to its geometry definition(Point, Size), so use these directly - const Rectangle aRect( pAct->GetPoint(), pAct->GetSize() ); + const tools::Rectangle aRect( pAct->GetPoint(), pAct->GetSize() ); ImplActionBounds( aBound, OutputDevice::LogicToLogic( aRect, aMapVDev->GetMapMode(), GetPrefMapMode() ), aClipStack, nullptr ); } break; @@ -1606,7 +1606,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai case( MetaActionType::EPS ): { MetaEPSAction* pAct = static_cast<MetaEPSAction*>(pAction); - Rectangle aRect( pAct->GetPoint(), pAct->GetSize() ); + tools::Rectangle aRect( pAct->GetPoint(), pAct->GetSize() ); ImplActionBounds( aBound, OutputDevice::LogicToLogic( aRect, aMapVDev->GetMapMode(), GetPrefMapMode() ), aClipStack, nullptr ); } break; @@ -1617,14 +1617,14 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai if( pAct->IsClipping() ) aClipStack.back() = OutputDevice::LogicToLogic( pAct->GetRegion().GetBoundRect(), aMapVDev->GetMapMode(), GetPrefMapMode() ); else - aClipStack.back() = Rectangle(); + aClipStack.back() = tools::Rectangle(); } break; case( MetaActionType::ISECTRECTCLIPREGION ): { MetaISectRectClipRegionAction* pAct = static_cast<MetaISectRectClipRegionAction*>(pAction); - Rectangle aRect( OutputDevice::LogicToLogic( pAct->GetRect(), aMapVDev->GetMapMode(), GetPrefMapMode() ) ); + tools::Rectangle aRect( OutputDevice::LogicToLogic( pAct->GetRect(), aMapVDev->GetMapMode(), GetPrefMapMode() ) ); if( aClipStack.back().IsEmpty() ) aClipStack.back() = aRect; else @@ -1635,7 +1635,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai case( MetaActionType::ISECTREGIONCLIPREGION ): { MetaISectRegionClipRegionAction* pAct = static_cast<MetaISectRegionClipRegionAction*>(pAction); - Rectangle aRect( OutputDevice::LogicToLogic( pAct->GetRegion().GetBoundRect(), aMapVDev->GetMapMode(), GetPrefMapMode() ) ); + tools::Rectangle aRect( OutputDevice::LogicToLogic( pAct->GetRegion().GetBoundRect(), aMapVDev->GetMapMode(), GetPrefMapMode() ) ); if( aClipStack.back().IsEmpty() ) aClipStack.back() = aRect; else @@ -1646,7 +1646,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai case( MetaActionType::BMP ): { MetaBmpAction* pAct = static_cast<MetaBmpAction*>(pAction); - Rectangle aRect( pAct->GetPoint(), aMapVDev->PixelToLogic( pAct->GetBitmap().GetSizePixel() ) ); + tools::Rectangle aRect( pAct->GetPoint(), aMapVDev->PixelToLogic( pAct->GetBitmap().GetSizePixel() ) ); ImplActionBounds( aBound, OutputDevice::LogicToLogic( aRect, aMapVDev->GetMapMode(), GetPrefMapMode() ), aClipStack, nullptr ); } break; @@ -1654,7 +1654,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai case( MetaActionType::BMPEX ): { MetaBmpExAction* pAct = static_cast<MetaBmpExAction*>(pAction); - Rectangle aRect( pAct->GetPoint(), aMapVDev->PixelToLogic( pAct->GetBitmapEx().GetSizePixel() ) ); + tools::Rectangle aRect( pAct->GetPoint(), aMapVDev->PixelToLogic( pAct->GetBitmapEx().GetSizePixel() ) ); ImplActionBounds( aBound, OutputDevice::LogicToLogic( aRect, aMapVDev->GetMapMode(), GetPrefMapMode() ), aClipStack, nullptr ); } break; @@ -1662,7 +1662,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai case( MetaActionType::MASK ): { MetaMaskAction* pAct = static_cast<MetaMaskAction*>(pAction); - Rectangle aRect( pAct->GetPoint(), aMapVDev->PixelToLogic( pAct->GetBitmap().GetSizePixel() ) ); + tools::Rectangle aRect( pAct->GetPoint(), aMapVDev->PixelToLogic( pAct->GetBitmap().GetSizePixel() ) ); ImplActionBounds( aBound, OutputDevice::LogicToLogic( aRect, aMapVDev->GetMapMode(), GetPrefMapMode() ), aClipStack, nullptr ); } break; @@ -1670,7 +1670,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai case( MetaActionType::MASKSCALE ): { MetaMaskScalePartAction* pAct = static_cast<MetaMaskScalePartAction*>(pAction); - Rectangle aRect( pAct->GetDestPoint(), pAct->GetDestSize() ); + tools::Rectangle aRect( pAct->GetDestPoint(), pAct->GetDestSize() ); ImplActionBounds( aBound, OutputDevice::LogicToLogic( aRect, aMapVDev->GetMapMode(), GetPrefMapMode() ), aClipStack, nullptr ); } break; @@ -1678,7 +1678,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai case( MetaActionType::MASKSCALEPART ): { MetaMaskScalePartAction* pAct = static_cast<MetaMaskScalePartAction*>(pAction); - Rectangle aRect( pAct->GetDestPoint(), pAct->GetDestSize() ); + tools::Rectangle aRect( pAct->GetDestPoint(), pAct->GetDestSize() ); ImplActionBounds( aBound, OutputDevice::LogicToLogic( aRect, aMapVDev->GetMapMode(), GetPrefMapMode() ), aClipStack, nullptr ); } break; @@ -1686,7 +1686,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai case( MetaActionType::WALLPAPER ): { MetaWallpaperAction* pAct = static_cast<MetaWallpaperAction*>(pAction); - Rectangle aRect( pAct->GetRect() ); + tools::Rectangle aRect( pAct->GetRect() ); ImplActionBounds( aBound, OutputDevice::LogicToLogic( aRect, aMapVDev->GetMapMode(), GetPrefMapMode() ), aClipStack, nullptr ); } break; @@ -1694,7 +1694,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai case( MetaActionType::TEXTRECT ): { MetaTextRectAction* pAct = static_cast<MetaTextRectAction*>(pAction); - Rectangle aRect( pAct->GetRect() ); + tools::Rectangle aRect( pAct->GetRect() ); ImplActionBounds( aBound, OutputDevice::LogicToLogic( aRect, aMapVDev->GetMapMode(), GetPrefMapMode() ), aClipStack, nullptr ); } break; @@ -1721,7 +1721,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai aPushFlagStack.push_back( pAct->GetFlags() ); if( aPushFlagStack.back() & PushFlags::CLIPREGION ) { - Rectangle aRect( aClipStack.back() ); + tools::Rectangle aRect( aClipStack.back() ); aClipStack.push_back( aRect ); } } @@ -1948,7 +1948,7 @@ void GDIMetaFile::ImplExchangeColors( ColorExchangeFnc pFncCol, const void* pCol { MetaWallpaperAction* pAct = static_cast<MetaWallpaperAction*>(pAction); Wallpaper aWall( pAct->GetWallpaper() ); - const Rectangle& rRect = pAct->GetRect(); + const tools::Rectangle& rRect = pAct->GetRect(); aWall.SetColor( pFncCol( aWall.GetColor(), pColParam ) ); diff --git a/vcl/source/gdi/gradient.cxx b/vcl/source/gdi/gradient.cxx index 69ac7b7f9339..7de77e20dc7f 100644 --- a/vcl/source/gdi/gradient.cxx +++ b/vcl/source/gdi/gradient.cxx @@ -145,9 +145,9 @@ void Gradient::SetSteps( sal_uInt16 nSteps ) mpImplGradient->mnStepCount = nSteps; } -void Gradient::GetBoundRect( const Rectangle& rRect, Rectangle& rBoundRect, Point& rCenter ) const +void Gradient::GetBoundRect( const tools::Rectangle& rRect, tools::Rectangle& rBoundRect, Point& rCenter ) const { - Rectangle aRect( rRect ); + tools::Rectangle aRect( rRect ); sal_uInt16 nAngle = GetAngle() % 3600; if( GetStyle() == GradientStyle::Linear || GetStyle() == GradientStyle::Axial ) diff --git a/vcl/source/gdi/graph.cxx b/vcl/source/gdi/graph.cxx index 69be7c08b8b9..54bcc706f987 100644 --- a/vcl/source/gdi/graph.cxx +++ b/vcl/source/gdi/graph.cxx @@ -45,7 +45,7 @@ void ImplDrawDefault( OutputDevice* pOutDev, const OUString* pText, Point aPoint( rDestPt.X() + nPixelWidth, rDestPt.Y() + nPixelWidth ); Size aSize( rDestSize.Width() - ( nPixelWidth << 1 ), rDestSize.Height() - ( nPixelWidth << 1 ) ); bool bFilled = ( pBitmap != nullptr || pBitmapEx != nullptr || pFont != nullptr ); - Rectangle aBorderRect( aPoint, aSize ); + tools::Rectangle aBorderRect( aPoint, aSize ); pOutDev->Push(); diff --git a/vcl/source/gdi/impanmvw.cxx b/vcl/source/gdi/impanmvw.cxx index 185fee4b95f3..45928c4dbec3 100644 --- a/vcl/source/gdi/impanmvw.cxx +++ b/vcl/source/gdi/impanmvw.cxx @@ -180,7 +180,7 @@ void ImplAnimView::drawToPos( sal_uLong nPos ) pRenderContext->DrawOutDev( maDispPt, maDispSz, Point(), maSzPix, *aVDev.get() ); if (pGuard) - pGuard->SetPaintRect(Rectangle(maDispPt, maDispSz)); + pGuard->SetPaintRect(tools::Rectangle(maDispPt, maDispSz)); if (xOldClip) pRenderContext->SetClipRegion(*xOldClip); @@ -198,10 +198,10 @@ void ImplAnimView::draw( sal_uLong nPos, VirtualDevice* pVDev ) pRenderContext = pGuard->GetRenderContext(); } - Rectangle aOutRect( pRenderContext->PixelToLogic( Point() ), pRenderContext->GetOutputSize() ); + tools::Rectangle aOutRect( pRenderContext->PixelToLogic( Point() ), pRenderContext->GetOutputSize() ); // check, if output lies out of display - if( aOutRect.Intersection( Rectangle( maDispPt, maDispSz ) ).IsEmpty() ) + if( aOutRect.Intersection( tools::Rectangle( maDispPt, maDispSz ) ).IsEmpty() ) setMarked( true ); else if( !mbPause ) { @@ -292,7 +292,7 @@ void ImplAnimView::draw( sal_uLong nPos, VirtualDevice* pVDev ) pRenderContext->DrawOutDev( maDispPt, maDispSz, Point(), maSzPix, *pDev ); if (pGuard) - pGuard->SetPaintRect(Rectangle(maDispPt, maDispSz)); + pGuard->SetPaintRect(tools::Rectangle(maDispPt, maDispSz)); if( xOldClip) { diff --git a/vcl/source/gdi/impgraph.cxx b/vcl/source/gdi/impgraph.cxx index ee81b1447a0a..92d29e547068 100644 --- a/vcl/source/gdi/impgraph.cxx +++ b/vcl/source/gdi/impgraph.cxx @@ -489,8 +489,8 @@ Bitmap ImpGraphic::ImplGetBitmap(const GraphicConversionParameters& rParameters) if(GraphicType::GdiMetafile == ImplGetType()) { // get hairline and full bound rect - Rectangle aHairlineRect; - const Rectangle aRect(maMetaFile.GetBoundRect(*aVDev.get(), &aHairlineRect)); + tools::Rectangle aHairlineRect; + const tools::Rectangle aRect(maMetaFile.GetBoundRect(*aVDev.get(), &aHairlineRect)); if(!aRect.IsEmpty() && !aHairlineRect.IsEmpty()) { diff --git a/vcl/source/gdi/impvect.cxx b/vcl/source/gdi/impvect.cxx index 8f2cf84e6d9a..0de467a03d38 100644 --- a/vcl/source/gdi/impvect.cxx +++ b/vcl/source/gdi/impvect.cxx @@ -741,7 +741,7 @@ void ImplLimitPolyPoly( tools::PolyPolygon& rPolyPoly ) for( sal_uInt16 i = 0, nCount = rPolyPoly.Count(); i < nCount; i++ ) { - const Rectangle aBound( rPolyPoly[ i ].GetBoundRect() ); + const tools::Rectangle aBound( rPolyPoly[ i ].GetBoundRect() ); if( aBound.GetWidth() > nReduce && aBound.GetHeight() > nReduce ) { @@ -881,7 +881,7 @@ void ImplCalculate( ImplVectMap* pMap, tools::PolyPolygon& rPolyPoly, sal_uInt8 { if( cReduce ) { - const Rectangle aBound( rPoly.GetBoundRect() ); + const tools::Rectangle aBound( rPoly.GetBoundRect() ); if( aBound.GetWidth() > cReduce && aBound.GetHeight() > cReduce ) rPolyPoly.Insert( rPoly ); diff --git a/vcl/source/gdi/metaact.cxx b/vcl/source/gdi/metaact.cxx index 0f277234cdca..1ce4182bafa4 100644 --- a/vcl/source/gdi/metaact.cxx +++ b/vcl/source/gdi/metaact.cxx @@ -113,7 +113,7 @@ inline void ImplScalePoint( Point& rPt, double fScaleX, double fScaleY ) rPt.Y() = FRound( fScaleY * rPt.Y() ); } -inline void ImplScaleRect( Rectangle& rRect, double fScaleX, double fScaleY ) +inline void ImplScaleRect( tools::Rectangle& rRect, double fScaleX, double fScaleY ) { Point aTL( rRect.TopLeft() ); Point aBR( rRect.BottomRight() ); @@ -121,7 +121,7 @@ inline void ImplScaleRect( Rectangle& rRect, double fScaleX, double fScaleY ) ImplScalePoint( aTL, fScaleX, fScaleY ); ImplScalePoint( aBR, fScaleX, fScaleY ); - rRect = Rectangle( aTL, aBR ); + rRect = tools::Rectangle( aTL, aBR ); rRect.Justify(); } @@ -446,7 +446,7 @@ MetaRectAction::MetaRectAction() : MetaRectAction::~MetaRectAction() {} -MetaRectAction::MetaRectAction( const Rectangle& rRect ) : +MetaRectAction::MetaRectAction( const tools::Rectangle& rRect ) : MetaAction ( MetaActionType::RECT ), maRect ( rRect ) {} @@ -495,7 +495,7 @@ MetaRoundRectAction::MetaRoundRectAction() : MetaRoundRectAction::~MetaRoundRectAction() {} -MetaRoundRectAction::MetaRoundRectAction( const Rectangle& rRect, +MetaRoundRectAction::MetaRoundRectAction( const tools::Rectangle& rRect, sal_uInt32 nHorzRound, sal_uInt32 nVertRound ) : MetaAction ( MetaActionType::ROUNDRECT ), maRect ( rRect ), @@ -548,7 +548,7 @@ MetaEllipseAction::MetaEllipseAction() : MetaEllipseAction::~MetaEllipseAction() {} -MetaEllipseAction::MetaEllipseAction( const Rectangle& rRect ) : +MetaEllipseAction::MetaEllipseAction( const tools::Rectangle& rRect ) : MetaAction ( MetaActionType::ELLIPSE ), maRect ( rRect ) {} @@ -595,7 +595,7 @@ MetaArcAction::MetaArcAction() : MetaArcAction::~MetaArcAction() {} -MetaArcAction::MetaArcAction( const Rectangle& rRect, +MetaArcAction::MetaArcAction( const tools::Rectangle& rRect, const Point& rStart, const Point& rEnd ) : MetaAction ( MetaActionType::ARC ), maRect ( rRect ), @@ -653,7 +653,7 @@ MetaPieAction::MetaPieAction() : MetaPieAction::~MetaPieAction() {} -MetaPieAction::MetaPieAction( const Rectangle& rRect, +MetaPieAction::MetaPieAction( const tools::Rectangle& rRect, const Point& rStart, const Point& rEnd ) : MetaAction ( MetaActionType::PIE ), maRect ( rRect ), @@ -711,7 +711,7 @@ MetaChordAction::MetaChordAction() : MetaChordAction::~MetaChordAction() {} -MetaChordAction::MetaChordAction( const Rectangle& rRect, +MetaChordAction::MetaChordAction( const tools::Rectangle& rRect, const Point& rStart, const Point& rEnd ) : MetaAction ( MetaActionType::CHORD ), maRect ( rRect ), @@ -1313,7 +1313,7 @@ MetaTextRectAction::MetaTextRectAction() : MetaTextRectAction::~MetaTextRectAction() {} -MetaTextRectAction::MetaTextRectAction( const Rectangle& rRect, +MetaTextRectAction::MetaTextRectAction( const tools::Rectangle& rRect, const OUString& rStr, DrawTextFlags nStyle ) : MetaAction ( MetaActionType::TEXTRECT ), maRect ( rRect ), @@ -1538,7 +1538,7 @@ void MetaBmpScaleAction::Move( long nHorzMove, long nVertMove ) void MetaBmpScaleAction::Scale( double fScaleX, double fScaleY ) { - Rectangle aRectangle(maPt, maSz); + tools::Rectangle aRectangle(maPt, maSz); ImplScaleRect( aRectangle, fScaleX, fScaleY ); maPt = aRectangle.TopLeft(); maSz = aRectangle.GetSize(); @@ -1601,7 +1601,7 @@ void MetaBmpScalePartAction::Move( long nHorzMove, long nVertMove ) void MetaBmpScalePartAction::Scale( double fScaleX, double fScaleY ) { - Rectangle aRectangle(maDstPt, maDstSz); + tools::Rectangle aRectangle(maDstPt, maDstSz); ImplScaleRect( aRectangle, fScaleX, fScaleY ); maDstPt = aRectangle.TopLeft(); maDstSz = aRectangle.GetSize(); @@ -1718,7 +1718,7 @@ void MetaBmpExScaleAction::Move( long nHorzMove, long nVertMove ) void MetaBmpExScaleAction::Scale( double fScaleX, double fScaleY ) { - Rectangle aRectangle(maPt, maSz); + tools::Rectangle aRectangle(maPt, maSz); ImplScaleRect( aRectangle, fScaleX, fScaleY ); maPt = aRectangle.TopLeft(); maSz = aRectangle.GetSize(); @@ -1781,7 +1781,7 @@ void MetaBmpExScalePartAction::Move( long nHorzMove, long nVertMove ) void MetaBmpExScalePartAction::Scale( double fScaleX, double fScaleY ) { - Rectangle aRectangle(maDstPt, maDstSz); + tools::Rectangle aRectangle(maDstPt, maDstSz); ImplScaleRect( aRectangle, fScaleX, fScaleY ); maDstPt = aRectangle.TopLeft(); maDstSz = aRectangle.GetSize(); @@ -1903,7 +1903,7 @@ void MetaMaskScaleAction::Move( long nHorzMove, long nVertMove ) void MetaMaskScaleAction::Scale( double fScaleX, double fScaleY ) { - Rectangle aRectangle(maPt, maSz); + tools::Rectangle aRectangle(maPt, maSz); ImplScaleRect( aRectangle, fScaleX, fScaleY ); maPt = aRectangle.TopLeft(); maSz = aRectangle.GetSize(); @@ -1968,7 +1968,7 @@ void MetaMaskScalePartAction::Move( long nHorzMove, long nVertMove ) void MetaMaskScalePartAction::Scale( double fScaleX, double fScaleY ) { - Rectangle aRectangle(maDstPt, maDstSz); + tools::Rectangle aRectangle(maDstPt, maDstSz); ImplScaleRect( aRectangle, fScaleX, fScaleY ); maDstPt = aRectangle.TopLeft(); maDstSz = aRectangle.GetSize(); @@ -2007,7 +2007,7 @@ MetaGradientAction::MetaGradientAction() : MetaGradientAction::~MetaGradientAction() {} -MetaGradientAction::MetaGradientAction( const Rectangle& rRect, const Gradient& rGradient ) : +MetaGradientAction::MetaGradientAction( const tools::Rectangle& rRect, const Gradient& rGradient ) : MetaAction ( MetaActionType::GRADIENT ), maRect ( rRect ), maGradient ( rGradient ) @@ -2173,7 +2173,7 @@ MetaWallpaperAction::MetaWallpaperAction() : MetaWallpaperAction::~MetaWallpaperAction() {} -MetaWallpaperAction::MetaWallpaperAction( const Rectangle& rRect, +MetaWallpaperAction::MetaWallpaperAction( const tools::Rectangle& rRect, const Wallpaper& rPaper ) : MetaAction ( MetaActionType::WALLPAPER ), maRect ( rRect ), @@ -2278,7 +2278,7 @@ MetaISectRectClipRegionAction::MetaISectRectClipRegionAction() : MetaISectRectClipRegionAction::~MetaISectRectClipRegionAction() {} -MetaISectRectClipRegionAction::MetaISectRectClipRegionAction( const Rectangle& rRect ) : +MetaISectRectClipRegionAction::MetaISectRectClipRegionAction( const tools::Rectangle& rRect ) : MetaAction ( MetaActionType::ISECTRECTCLIPREGION ), maRect ( rRect ) {} @@ -3029,7 +3029,7 @@ void MetaFloatTransparentAction::Move( long nHorzMove, long nVertMove ) void MetaFloatTransparentAction::Scale( double fScaleX, double fScaleY ) { - Rectangle aRectangle(maPoint, maSize); + tools::Rectangle aRectangle(maPoint, maSize); ImplScaleRect( aRectangle, fScaleX, fScaleY ); maPoint = aRectangle.TopLeft(); maSize = aRectangle.GetSize(); @@ -3090,7 +3090,7 @@ void MetaEPSAction::Move( long nHorzMove, long nVertMove ) void MetaEPSAction::Scale( double fScaleX, double fScaleY ) { - Rectangle aRectangle(maPoint, maSize); + tools::Rectangle aRectangle(maPoint, maSize); ImplScaleRect( aRectangle, fScaleX, fScaleY ); maPoint = aRectangle.TopLeft(); maSize = aRectangle.GetSize(); diff --git a/vcl/source/gdi/pdfextoutdevdata.cxx b/vcl/source/gdi/pdfextoutdevdata.cxx index 6defb59564ac..0175d5faea91 100644 --- a/vcl/source/gdi/pdfextoutdevdata.cxx +++ b/vcl/source/gdi/pdfextoutdevdata.cxx @@ -65,7 +65,7 @@ struct PDFExtOutDevDataSync struct PDFLinkDestination { - Rectangle mRect; + tools::Rectangle mRect; MapMode mMapMode; sal_Int32 mPageNr; PDFWriter::DestAreaType mAreaType; @@ -75,7 +75,7 @@ struct GlobalSyncData { std::deque< PDFExtOutDevDataSync::Action > mActions; std::deque< MapMode > mParaMapModes; - std::deque< Rectangle > mParaRects; + std::deque< tools::Rectangle > mParaRects; std::deque< sal_Int32 > mParaInts; std::deque< sal_uInt32 > mParauInts; std::deque< OUString > mParaOUStrings; @@ -281,7 +281,7 @@ void GlobalSyncData::PlayGlobalActions( PDFWriter& rWriter ) struct PageSyncData { std::deque< PDFExtOutDevDataSync > mActions; - std::deque< Rectangle > mParaRects; + std::deque< tools::Rectangle > mParaRects; std::deque< sal_Int32 > mParaInts; std::deque< OUString > mParaOUStrings; std::deque< PDFWriter::StructElement > mParaStructElements; @@ -424,7 +424,7 @@ bool PageSyncData::PlaySyncPageAct( PDFWriter& rWriter, sal_uInt32& rCurGDIMtfAc break; case PDFExtOutDevDataSync::EndGroupGfxLink : { - Rectangle aOutputRect, aVisibleOutputRect; + tools::Rectangle aOutputRect, aVisibleOutputRect; Graphic aGraphic( mGraphics.front() ); mGraphics.pop_front(); @@ -609,7 +609,7 @@ void PDFExtOutDevData::PlayGlobalActions( PDFWriter& rWriter ) all actions will be played after the last page was recorded */ //--->i56629 -sal_Int32 PDFExtOutDevData::CreateNamedDest(const OUString& sDestName, const Rectangle& rRect, sal_Int32 nPageNr ) +sal_Int32 PDFExtOutDevData::CreateNamedDest(const OUString& sDestName, const tools::Rectangle& rRect, sal_Int32 nPageNr ) { mpGlobalSyncData->mActions.push_back( PDFExtOutDevDataSync::CreateNamedDest ); mpGlobalSyncData->mParaOUStrings.push_back( sDestName ); @@ -629,7 +629,7 @@ sal_Int32 PDFExtOutDevData::RegisterDest() return nLinkDestID; } -void PDFExtOutDevData::DescribeRegisteredDest( sal_Int32 nDestId, const Rectangle& rRect, sal_Int32 nPageNr, PDFWriter::DestAreaType eType ) +void PDFExtOutDevData::DescribeRegisteredDest( sal_Int32 nDestId, const tools::Rectangle& rRect, sal_Int32 nPageNr, PDFWriter::DestAreaType eType ) { OSL_PRECOND( nDestId != -1, "PDFExtOutDevData::DescribeRegisteredDest: invalid destination Id!" ); PDFLinkDestination aLinkDestination; @@ -639,7 +639,7 @@ void PDFExtOutDevData::DescribeRegisteredDest( sal_Int32 nDestId, const Rectangl aLinkDestination.mAreaType = eType; mpGlobalSyncData->mFutureDestinations[ nDestId ] = aLinkDestination; } -sal_Int32 PDFExtOutDevData::CreateDest( const Rectangle& rRect, sal_Int32 nPageNr, PDFWriter::DestAreaType eType ) +sal_Int32 PDFExtOutDevData::CreateDest( const tools::Rectangle& rRect, sal_Int32 nPageNr, PDFWriter::DestAreaType eType ) { mpGlobalSyncData->mActions.push_back( PDFExtOutDevDataSync::CreateDest ); mpGlobalSyncData->mParaRects.push_back( rRect ); @@ -648,7 +648,7 @@ sal_Int32 PDFExtOutDevData::CreateDest( const Rectangle& rRect, sal_Int32 nPageN mpGlobalSyncData->mParaDestAreaTypes.push_back( eType ); return mpGlobalSyncData->mCurId++; } -sal_Int32 PDFExtOutDevData::CreateLink( const Rectangle& rRect, sal_Int32 nPageNr ) +sal_Int32 PDFExtOutDevData::CreateLink( const tools::Rectangle& rRect, sal_Int32 nPageNr ) { mpGlobalSyncData->mActions.push_back( PDFExtOutDevDataSync::CreateLink ); mpGlobalSyncData->mParaRects.push_back( rRect ); @@ -657,7 +657,7 @@ sal_Int32 PDFExtOutDevData::CreateLink( const Rectangle& rRect, sal_Int32 nPageN return mpGlobalSyncData->mCurId++; } -sal_Int32 PDFExtOutDevData::CreateScreen(const Rectangle& rRect, sal_Int32 nPageNr) +sal_Int32 PDFExtOutDevData::CreateScreen(const tools::Rectangle& rRect, sal_Int32 nPageNr) { mpGlobalSyncData->mActions.push_back(PDFExtOutDevDataSync::CreateScreen); mpGlobalSyncData->mParaRects.push_back(rRect); @@ -703,7 +703,7 @@ sal_Int32 PDFExtOutDevData::CreateOutlineItem( sal_Int32 nParent, const OUString mpGlobalSyncData->mParaInts.push_back( nDestID ); return mpGlobalSyncData->mCurId++; } -void PDFExtOutDevData::CreateNote( const Rectangle& rRect, const PDFNote& rNote, sal_Int32 nPageNr ) +void PDFExtOutDevData::CreateNote( const tools::Rectangle& rRect, const PDFNote& rNote, sal_Int32 nPageNr ) { mpGlobalSyncData->mActions.push_back( PDFExtOutDevDataSync::CreateNote ); mpGlobalSyncData->mParaRects.push_back( rRect ); @@ -767,7 +767,7 @@ bool PDFExtOutDevData::SetStructureAttributeNumerical( PDFWriter::StructAttribut mpPageSyncData->mParaInts.push_back( nValue ); return true; } -void PDFExtOutDevData::SetStructureBoundingBox( const Rectangle& rRect ) +void PDFExtOutDevData::SetStructureBoundingBox( const tools::Rectangle& rRect ) { mpPageSyncData->PushAction( mrOutDev, PDFExtOutDevDataSync::SetStructureBoundingBox ); mpPageSyncData->mParaRects.push_back( rRect ); @@ -798,8 +798,8 @@ void PDFExtOutDevData::BeginGroup() void PDFExtOutDevData::EndGroup( const Graphic& rGraphic, sal_uInt8 nTransparency, - const Rectangle& rOutputRect, - const Rectangle& rVisibleOutputRect ) + const tools::Rectangle& rOutputRect, + const tools::Rectangle& rVisibleOutputRect ) { mpPageSyncData->PushAction( mrOutDev, PDFExtOutDevDataSync::EndGroupGfxLink ); mpPageSyncData->mGraphics.push_back( rGraphic ); @@ -810,8 +810,8 @@ void PDFExtOutDevData::EndGroup( const Graphic& rGraphic, // Avoids expensive de-compression and re-compression of large images. bool PDFExtOutDevData::HasAdequateCompression( const Graphic &rGraphic, - const Rectangle & /* rOutputRect */, - const Rectangle & /* rVisibleOutputRect */ ) const + const tools::Rectangle & /* rOutputRect */, + const tools::Rectangle & /* rVisibleOutputRect */ ) const { bool bReduceResolution = false; diff --git a/vcl/source/gdi/pdfwriter.cxx b/vcl/source/gdi/pdfwriter.cxx index bd204cf1379f..ec612820e15d 100644 --- a/vcl/source/gdi/pdfwriter.cxx +++ b/vcl/source/gdi/pdfwriter.cxx @@ -109,7 +109,7 @@ void PDFWriter::DrawStretchText( } void PDFWriter::DrawText( - const Rectangle& rRect, + const tools::Rectangle& rRect, const OUString& rStr, DrawTextFlags nStyle ) { @@ -136,32 +136,32 @@ void PDFWriter::DrawPolyLine( const tools::Polygon& rPoly ) xImplementation->drawPolyLine( rPoly ); } -void PDFWriter::DrawRect( const Rectangle& rRect ) +void PDFWriter::DrawRect( const tools::Rectangle& rRect ) { xImplementation->drawRectangle( rRect ); } -void PDFWriter::DrawRect( const Rectangle& rRect, sal_uLong nHorzRound, sal_uLong nVertRound ) +void PDFWriter::DrawRect( const tools::Rectangle& rRect, sal_uLong nHorzRound, sal_uLong nVertRound ) { xImplementation->drawRectangle( rRect, nHorzRound, nVertRound ); } -void PDFWriter::DrawEllipse( const Rectangle& rRect ) +void PDFWriter::DrawEllipse( const tools::Rectangle& rRect ) { xImplementation->drawEllipse( rRect ); } -void PDFWriter::DrawArc( const Rectangle& rRect, const Point& rStart, const Point& rStop ) +void PDFWriter::DrawArc( const tools::Rectangle& rRect, const Point& rStart, const Point& rStop ) { xImplementation->drawArc( rRect, rStart, rStop, false, false ); } -void PDFWriter::DrawPie( const Rectangle& rRect, const Point& rStart, const Point& rStop ) +void PDFWriter::DrawPie( const tools::Rectangle& rRect, const Point& rStart, const Point& rStop ) { xImplementation->drawArc( rRect, rStart, rStop, true, false ); } -void PDFWriter::DrawChord( const Rectangle& rRect, const Point& rStart, const Point& rStop ) +void PDFWriter::DrawChord( const tools::Rectangle& rRect, const Point& rStart, const Point& rStop ) { xImplementation->drawArc( rRect, rStart, rStop, false, true ); } @@ -201,7 +201,7 @@ void PDFWriter::DrawHatch( const tools::PolyPolygon& rPolyPoly, const Hatch& rHa xImplementation->drawHatch( rPolyPoly, rHatch ); } -void PDFWriter::DrawGradient( const Rectangle& rRect, const Gradient& rGradient ) +void PDFWriter::DrawGradient( const tools::Rectangle& rRect, const Gradient& rGradient ) { xImplementation->drawGradient( rRect, rGradient ); } @@ -214,7 +214,7 @@ void PDFWriter::DrawGradient( const tools::PolyPolygon& rPolyPoly, const Gradien xImplementation->pop(); } -void PDFWriter::DrawWallpaper( const Rectangle& rRect, const Wallpaper& rWallpaper ) +void PDFWriter::DrawWallpaper( const tools::Rectangle& rRect, const Wallpaper& rWallpaper ) { xImplementation->drawWallpaper( rRect, rWallpaper ); } @@ -229,7 +229,7 @@ void PDFWriter::BeginTransparencyGroup() xImplementation->beginTransparencyGroup(); } -void PDFWriter::EndTransparencyGroup( const Rectangle& rRect, sal_uInt16 nTransparentPercent ) +void PDFWriter::EndTransparencyGroup( const tools::Rectangle& rRect, sal_uInt16 nTransparentPercent ) { xImplementation->endTransparencyGroup( rRect, nTransparentPercent ); } @@ -279,7 +279,7 @@ void PDFWriter::IntersectClipRegion( const basegfx::B2DPolyPolygon& rRegion ) xImplementation->intersectClipRegion( rRegion ); } -void PDFWriter::IntersectClipRegion( const Rectangle& rRect ) +void PDFWriter::IntersectClipRegion( const tools::Rectangle& rRect ) { xImplementation->intersectClipRegion( rRect ); } @@ -334,31 +334,31 @@ void PDFWriter::SetTextAlign( ::TextAlign eAlign ) xImplementation->setTextAlign( eAlign ); } -void PDFWriter::DrawJPGBitmap( SvStream& rStreamData, bool bIsTrueColor, const Size& rSrcSizePixel, const Rectangle& rTargetArea, const Bitmap& rMask, const Graphic& rGraphic ) +void PDFWriter::DrawJPGBitmap( SvStream& rStreamData, bool bIsTrueColor, const Size& rSrcSizePixel, const tools::Rectangle& rTargetArea, const Bitmap& rMask, const Graphic& rGraphic ) { xImplementation->drawJPGBitmap( rStreamData, bIsTrueColor, rSrcSizePixel, rTargetArea, rMask, rGraphic ); } -sal_Int32 PDFWriter::CreateLink( const Rectangle& rRect, sal_Int32 nPageNr ) +sal_Int32 PDFWriter::CreateLink( const tools::Rectangle& rRect, sal_Int32 nPageNr ) { return xImplementation->createLink( rRect, nPageNr ); } -sal_Int32 PDFWriter::CreateScreen(const Rectangle& rRect, sal_Int32 nPageNr) +sal_Int32 PDFWriter::CreateScreen(const tools::Rectangle& rRect, sal_Int32 nPageNr) { return xImplementation->createScreen(rRect, nPageNr); } -sal_Int32 PDFWriter::RegisterDestReference( sal_Int32 nDestId, const Rectangle& rRect, sal_Int32 nPageNr, DestAreaType eType ) +sal_Int32 PDFWriter::RegisterDestReference( sal_Int32 nDestId, const tools::Rectangle& rRect, sal_Int32 nPageNr, DestAreaType eType ) { return xImplementation->registerDestReference( nDestId, rRect, nPageNr, eType ); } //--->i56629 -sal_Int32 PDFWriter::CreateNamedDest( const OUString& sDestName, const Rectangle& rRect, sal_Int32 nPageNr, PDFWriter::DestAreaType eType ) +sal_Int32 PDFWriter::CreateNamedDest( const OUString& sDestName, const tools::Rectangle& rRect, sal_Int32 nPageNr, PDFWriter::DestAreaType eType ) { return xImplementation->createNamedDest( sDestName, rRect, nPageNr, eType ); } -sal_Int32 PDFWriter::CreateDest( const Rectangle& rRect, sal_Int32 nPageNr, PDFWriter::DestAreaType eType ) +sal_Int32 PDFWriter::CreateDest( const tools::Rectangle& rRect, sal_Int32 nPageNr, PDFWriter::DestAreaType eType ) { return xImplementation->createDest( rRect, nPageNr, eType ); } @@ -393,7 +393,7 @@ sal_Int32 PDFWriter::CreateOutlineItem( sal_Int32 nParent, const OUString& rText return xImplementation->createOutlineItem( nParent, rText, nDestID ); } -void PDFWriter::CreateNote( const Rectangle& rRect, const PDFNote& rNote, sal_Int32 nPageNr ) +void PDFWriter::CreateNote( const tools::Rectangle& rRect, const PDFNote& rNote, sal_Int32 nPageNr ) { xImplementation->createNote( rRect, rNote, nPageNr ); } @@ -423,7 +423,7 @@ bool PDFWriter::SetStructureAttributeNumerical( enum StructAttribute eAttr, sal_ return xImplementation->setStructureAttributeNumerical( eAttr, nValue ); } -void PDFWriter::SetStructureBoundingBox( const Rectangle& rRect ) +void PDFWriter::SetStructureBoundingBox( const tools::Rectangle& rRect ) { xImplementation->setStructureBoundingBox( rRect ); } diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index 50712b80086e..8e6815db1fd3 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -1404,7 +1404,7 @@ void PDFWriterImpl::PDFPage::appendPixelPoint( const basegfx::B2DPoint& rPoint, appendDouble( fValue, rBuffer, nLog10Divisor ); } -void PDFWriterImpl::PDFPage::appendRect( const Rectangle& rRect, OStringBuffer& rBuffer ) const +void PDFWriterImpl::PDFPage::appendRect( const tools::Rectangle& rRect, OStringBuffer& rBuffer ) const { appendPoint( rRect.BottomLeft() + Point( 0, 1 ), rBuffer ); rBuffer.append( ' ' ); @@ -1414,7 +1414,7 @@ void PDFWriterImpl::PDFPage::appendRect( const Rectangle& rRect, OStringBuffer& rBuffer.append( " re" ); } -void PDFWriterImpl::PDFPage::convertRect( Rectangle& rRect ) const +void PDFWriterImpl::PDFPage::convertRect( tools::Rectangle& rRect ) const { Point aLL = lcl_convert( m_pWriter->m_aGraphicsStack.front().m_aMapMode, m_pWriter->m_aMapMode, @@ -2934,7 +2934,7 @@ std::map< sal_Int32, sal_Int32 > PDFWriterImpl::emitSystemFont( const PhysicalFo aInfo.m_nAscent = 1000; aInfo.m_nDescent = 200; aInfo.m_nCapHeight = 1000; - aInfo.m_aFontBBox = Rectangle( Point( -200, -200 ), Size( 1700, 1700 ) ); + aInfo.m_aFontBBox = tools::Rectangle( Point( -200, -200 ), Size( 1700, 1700 ) ); aInfo.m_aPSName = pFont->GetFamilyName(); sal_Int32 pWidths[256]; memset( pWidths, 0, sizeof(pWidths) ); @@ -4243,7 +4243,7 @@ Font PDFWriterImpl::drawFieldBorder( PDFWidget& rIntern, if( nDelta < 1 ) nDelta = 1; setLineColor( Color( COL_TRANSPARENT ) ); - Rectangle aRect = rIntern.m_aRect; + tools::Rectangle aRect = rIntern.m_aRect; setFillColor( rSettings.GetLightBorderColor() ); drawRectangle( aRect ); aRect.Left() += nDelta; aRect.Top() += nDelta; @@ -4251,11 +4251,11 @@ Font PDFWriterImpl::drawFieldBorder( PDFWidget& rIntern, setFillColor( rSettings.GetFieldColor() ); drawRectangle( aRect ); setFillColor( rSettings.GetLightColor() ); - drawRectangle( Rectangle( Point( aRect.Left(), aRect.Bottom()-nDelta ), aRect.BottomRight() ) ); - drawRectangle( Rectangle( Point( aRect.Right()-nDelta, aRect.Top() ), aRect.BottomRight() ) ); + drawRectangle( tools::Rectangle( Point( aRect.Left(), aRect.Bottom()-nDelta ), aRect.BottomRight() ) ); + drawRectangle( tools::Rectangle( Point( aRect.Right()-nDelta, aRect.Top() ), aRect.BottomRight() ) ); setFillColor( rSettings.GetDarkShadowColor() ); - drawRectangle( Rectangle( aRect.TopLeft(), Point( aRect.Left()+nDelta, aRect.Bottom() ) ) ); - drawRectangle( Rectangle( aRect.TopLeft(), Point( aRect.Right(), aRect.Top()+nDelta ) ) ); + drawRectangle( tools::Rectangle( aRect.TopLeft(), Point( aRect.Left()+nDelta, aRect.Bottom() ) ) ); + drawRectangle( tools::Rectangle( aRect.TopLeft(), Point( aRect.Right(), aRect.Top()+nDelta ) ) ); } else { @@ -4395,7 +4395,7 @@ void PDFWriterImpl::createDefaultCheckBoxAppearance( PDFWidget& rBox, const PDFW if( nDelta < 1 ) nDelta = 1; - Rectangle aCheckRect, aTextRect; + tools::Rectangle aCheckRect, aTextRect; { aCheckRect.Left() = rBox.m_aRect.Left() + nDelta; aCheckRect.Top() = rBox.m_aRect.Top() + (rBox.m_aRect.GetHeight()-aFontSize.Height())/2; @@ -4499,7 +4499,7 @@ void PDFWriterImpl::createDefaultRadioButtonAppearance( PDFWidget& rBox, const P if( nDelta < 1 ) nDelta = 1; - Rectangle aCheckRect, aTextRect; + tools::Rectangle aCheckRect, aTextRect; { aCheckRect.Left() = rBox.m_aRect.Left() + nDelta; aCheckRect.Top() = rBox.m_aRect.Top() + (rBox.m_aRect.GetHeight()-aFontSize.Height())/2; @@ -8727,7 +8727,7 @@ void PDFWriterImpl::drawLayout( SalLayout& rLayout, const OUString& rText, bool // The rectangle is the bounding box of the text, but also includes // ascent / descent to match the on-screen rendering. - Rectangle aRectangle; + tools::Rectangle aRectangle; // This is the top left of the text without ascent / descent. aRectangle.SetPos(m_pReferenceDevice->PixelToLogic(rLayout.GetDrawPosition())); aRectangle.setY(aRectangle.getY() - aRefDevFontMetric.GetAscent()); @@ -8823,8 +8823,8 @@ void PDFWriterImpl::drawLayout( SalLayout& rLayout, const OUString& rText, bool if( m_aCurrentPDFState.m_aFont.GetEmphasisMark() & FontEmphasisMark::Style ) { tools::PolyPolygon aEmphPoly; - Rectangle aEmphRect1; - Rectangle aEmphRect2; + tools::Rectangle aEmphRect1; + tools::Rectangle aEmphRect2; long nEmphYOff; long nEmphWidth; long nEmphHeight; @@ -8906,7 +8906,7 @@ void PDFWriterImpl::drawLayout( SalLayout& rLayout, const OUString& rText, bool void PDFWriterImpl::drawEmphasisMark( long nX, long nY, const tools::PolyPolygon& rPolyPoly, bool bPolyLine, - const Rectangle& rRect1, const Rectangle& rRect2 ) + const tools::Rectangle& rRect1, const tools::Rectangle& rRect2 ) { // TODO: pass nWidth as width of this mark // long nWidth = 0; @@ -8929,14 +8929,14 @@ void PDFWriterImpl::drawEmphasisMark( long nX, long nY, if ( !rRect1.IsEmpty() ) { - Rectangle aRect( Point( nX+rRect1.Left(), + tools::Rectangle aRect( Point( nX+rRect1.Left(), nY+rRect1.Top() ), rRect1.GetSize() ); drawRectangle( aRect ); } if ( !rRect2.IsEmpty() ) { - Rectangle aRect( Point( nX+rRect2.Left(), + tools::Rectangle aRect( Point( nX+rRect2.Left(), nY+rRect2.Top() ), rRect2.GetSize() ); drawRectangle( aRect ); @@ -8991,7 +8991,7 @@ void PDFWriterImpl::drawStretchText( const Point& rPos, sal_uLong nWidth, const } } -void PDFWriterImpl::drawText( const Rectangle& rRect, const OUString& rOrigStr, DrawTextFlags nStyle ) +void PDFWriterImpl::drawText( const tools::Rectangle& rRect, const OUString& rOrigStr, DrawTextFlags nStyle ) { long nWidth = rRect.GetWidth(); long nHeight = rRect.GetHeight(); @@ -9512,7 +9512,7 @@ void PDFWriterImpl::drawStrikeoutChar( const Point& rPos, long nWidth, FontStrik push( PushFlags::CLIPREGION ); FontMetric aRefDevFontMetric = m_pReferenceDevice->GetFontMetric(); - Rectangle aRect; + tools::Rectangle aRect; aRect.Left() = rPos.X(); aRect.Right() = aRect.Left()+nWidth; aRect.Bottom() = rPos.Y()+aRefDevFontMetric.GetDescent(); @@ -9772,7 +9772,7 @@ void PDFWriterImpl::pushResource( ResourceKind eKind, const OString& rResource, } } -void PDFWriterImpl::beginRedirect( SvStream* pStream, const Rectangle& rTargetRect ) +void PDFWriterImpl::beginRedirect( SvStream* pStream, const tools::Rectangle& rTargetRect ) { push( PushFlags::ALL ); @@ -9832,10 +9832,10 @@ void PDFWriterImpl::beginTransparencyGroup() { updateGraphicsState(); if( m_aContext.Version >= PDFWriter::PDFVersion::PDF_1_4 ) - beginRedirect( new SvMemoryStream( 1024, 1024 ), Rectangle() ); + beginRedirect( new SvMemoryStream( 1024, 1024 ), tools::Rectangle() ); } -void PDFWriterImpl::endTransparencyGroup( const Rectangle& rBoundingBox, sal_uInt32 nTransparentPercent ) +void PDFWriterImpl::endTransparencyGroup( const tools::Rectangle& rBoundingBox, sal_uInt32 nTransparentPercent ) { SAL_WARN_IF( nTransparentPercent > 100, "vcl.pdfwriter", "invalid alpha value" ); nTransparentPercent = nTransparentPercent % 100; @@ -9875,7 +9875,7 @@ void PDFWriterImpl::endTransparencyGroup( const Rectangle& rBoundingBox, sal_uIn } } -void PDFWriterImpl::drawRectangle( const Rectangle& rRect ) +void PDFWriterImpl::drawRectangle( const tools::Rectangle& rRect ) { MARK( "drawRectangle" ); @@ -9899,7 +9899,7 @@ void PDFWriterImpl::drawRectangle( const Rectangle& rRect ) writeBuffer( aLine.getStr(), aLine.getLength() ); } -void PDFWriterImpl::drawRectangle( const Rectangle& rRect, sal_uInt32 nHorzRound, sal_uInt32 nVertRound ) +void PDFWriterImpl::drawRectangle( const tools::Rectangle& rRect, sal_uInt32 nHorzRound, sal_uInt32 nVertRound ) { MARK( "drawRectangle with rounded edges" ); @@ -9989,7 +9989,7 @@ void PDFWriterImpl::drawRectangle( const Rectangle& rRect, sal_uInt32 nHorzRound writeBuffer( aLine.getStr(), aLine.getLength() ); } -void PDFWriterImpl::drawEllipse( const Rectangle& rRect ) +void PDFWriterImpl::drawEllipse( const tools::Rectangle& rRect ) { MARK( "drawEllipse" ); @@ -10059,7 +10059,7 @@ void PDFWriterImpl::drawEllipse( const Rectangle& rRect ) writeBuffer( aLine.getStr(), aLine.getLength() ); } -static double calcAngle( const Rectangle& rRect, const Point& rPoint ) +static double calcAngle( const tools::Rectangle& rRect, const Point& rPoint ) { Point aOrigin((rRect.Left()+rRect.Right()+1)/2, (rRect.Top()+rRect.Bottom()+1)/2); @@ -10078,7 +10078,7 @@ static double calcAngle( const Rectangle& rRect, const Point& rPoint ) return atan2( fY, fX ); } -void PDFWriterImpl::drawArc( const Rectangle& rRect, const Point& rStart, const Point& rStop, bool bWithPie, bool bWithChord ) +void PDFWriterImpl::drawArc( const tools::Rectangle& rRect, const Point& rStart, const Point& rStop, bool bWithPie, bool bWithChord ) { MARK( "drawArc" ); @@ -10387,7 +10387,7 @@ void PDFWriterImpl::drawPolyLine( const tools::Polygon& rPoly, const PDFWriter:: if( rInfo.m_fTransparency != 0.0 ) { // FIXME: actually this may be incorrect with bezier polygons - Rectangle aBoundRect( rPoly.GetBoundRect() ); + tools::Rectangle aBoundRect( rPoly.GetBoundRect() ); // avoid clipping with thick lines if( rInfo.m_fLineWidth > 0.0 ) { @@ -10582,7 +10582,7 @@ bool PDFWriterImpl::writeGradientFunction( GradientEmit& rObject ) aDev->SetDrawMode( aDev->GetDrawMode() | ( DrawModeFlags::GrayLine | DrawModeFlags::GrayFill | DrawModeFlags::GrayText | DrawModeFlags::GrayBitmap | DrawModeFlags::GrayGradient ) ); - aDev->DrawGradient( Rectangle( Point( 0, 0 ), rObject.m_aSize ), rObject.m_aGradient ); + aDev->DrawGradient( tools::Rectangle( Point( 0, 0 ), rObject.m_aSize ), rObject.m_aGradient ); Bitmap aSample = aDev->GetBitmap( Point( 0, 0 ), rObject.m_aSize ); Bitmap::ScopedReadAccess pAccess(aSample); @@ -10714,12 +10714,12 @@ bool PDFWriterImpl::writeGradientFunction( GradientEmit& rObject ) // Determination of shading axis // See: OutputDevice::ImplDrawLinearGradient for reference - Rectangle aRect; + tools::Rectangle aRect; aRect.Left() = aRect.Top() = 0; aRect.Right() = aSize.Width(); aRect.Bottom() = aSize.Height(); - Rectangle aBoundRect; + tools::Rectangle aBoundRect; Point aCenter; sal_uInt16 nAngle = rObject.m_aGradient.GetAngle() % 3600; rObject.m_aGradient.GetBoundRect( aRect, aBoundRect, aCenter ); @@ -11573,7 +11573,7 @@ void PDFWriterImpl::createEmbeddedFile(const Graphic& rGraphic, ReferenceXObject rEmit.m_aPixelSize = rGraphic.GetBitmap().GetPrefSize(); } -void PDFWriterImpl::drawJPGBitmap( SvStream& rDCTData, bool bIsTrueColor, const Size& rSizePixel, const Rectangle& rTargetArea, const Bitmap& rMask, const Graphic& rGraphic ) +void PDFWriterImpl::drawJPGBitmap( SvStream& rDCTData, bool bIsTrueColor, const Size& rSizePixel, const tools::Rectangle& rTargetArea, const Bitmap& rMask, const Graphic& rGraphic ) { MARK( "drawJPGBitmap" ); @@ -11810,7 +11810,7 @@ sal_Int32 PDFWriterImpl::createGradient( const Gradient& rGradient, const Size& return it->m_nObject; } -void PDFWriterImpl::drawGradient( const Rectangle& rRect, const Gradient& rGradient ) +void PDFWriterImpl::drawGradient( const tools::Rectangle& rRect, const Gradient& rGradient ) { MARK( "drawGradient (Rectangle)" ); @@ -11873,7 +11873,7 @@ void PDFWriterImpl::drawHatch( const tools::PolyPolygon& rPolyPoly, const Hatch& } } -void PDFWriterImpl::drawWallpaper( const Rectangle& rRect, const Wallpaper& rWall ) +void PDFWriterImpl::drawWallpaper( const tools::Rectangle& rRect, const Wallpaper& rWall ) { MARK( "drawWallpaper" ); @@ -11891,7 +11891,7 @@ void PDFWriterImpl::drawWallpaper( const Rectangle& rRect, const Wallpaper& rWal getMapMode(), getReferenceDevice(), aBitmap.GetPrefSize() ); - Rectangle aRect( rRect ); + tools::Rectangle aRect( rRect ); if( rWall.IsRect() ) { aRect = rWall.GetRect(); @@ -11949,7 +11949,7 @@ void PDFWriterImpl::drawWallpaper( const Rectangle& rRect, const Wallpaper& rWal // convert to page coordinates; this needs to be done here // since the emit does not know the page anymore - Rectangle aConvertRect( aBmpPos, aBmpSize ); + tools::Rectangle aConvertRect( aBmpPos, aBmpSize ); m_aPages.back().convertRect( aConvertRect ); OStringBuffer aNameBuf(16); @@ -11968,7 +11968,7 @@ void PDFWriterImpl::drawWallpaper( const Rectangle& rRect, const Wallpaper& rWal m_aTilings.push_back( TilingEmit() ); m_aTilings.back().m_nObject = createObject(); - m_aTilings.back().m_aRectangle = Rectangle( Point( 0, 0 ), aConvertRect.GetSize() ); + m_aTilings.back().m_aRectangle = tools::Rectangle( Point( 0, 0 ), aConvertRect.GetSize() ); m_aTilings.back().m_pTilingStream = new SvMemoryStream(); m_aTilings.back().m_pTilingStream->WriteBytes( aTilingStream.getStr(), aTilingStream.getLength() ); @@ -12249,7 +12249,7 @@ void PDFWriterImpl::moveClipRegion( sal_Int32 nX, sal_Int32 nY ) } } -void PDFWriterImpl::intersectClipRegion( const Rectangle& rRect ) +void PDFWriterImpl::intersectClipRegion( const tools::Rectangle& rRect ) { basegfx::B2DPolyPolygon aRect( basegfx::tools::createPolygonFromRect( basegfx::B2DRectangle( rRect.Left(), rRect.Top(), rRect.Right(), rRect.Bottom() ) ) ); @@ -12275,7 +12275,7 @@ bool PDFWriterImpl::intersectClipRegion( const basegfx::B2DPolyPolygon& rRegion return true; } -void PDFWriterImpl::createNote( const Rectangle& rRect, const PDFNote& rNote, sal_Int32 nPageNr ) +void PDFWriterImpl::createNote( const tools::Rectangle& rRect, const PDFNote& rNote, sal_Int32 nPageNr ) { if( nPageNr < 0 ) nPageNr = m_nCurrentPage; @@ -12294,7 +12294,7 @@ void PDFWriterImpl::createNote( const Rectangle& rRect, const PDFNote& rNote, sa m_aPages[ nPageNr ].m_aAnnotations.push_back( m_aNotes.back().m_nObject ); } -sal_Int32 PDFWriterImpl::createLink( const Rectangle& rRect, sal_Int32 nPageNr ) +sal_Int32 PDFWriterImpl::createLink( const tools::Rectangle& rRect, sal_Int32 nPageNr ) { if( nPageNr < 0 ) nPageNr = m_nCurrentPage; @@ -12317,7 +12317,7 @@ sal_Int32 PDFWriterImpl::createLink( const Rectangle& rRect, sal_Int32 nPageNr ) return nRet; } -sal_Int32 PDFWriterImpl::createScreen(const Rectangle& rRect, sal_Int32 nPageNr) +sal_Int32 PDFWriterImpl::createScreen(const tools::Rectangle& rRect, sal_Int32 nPageNr) { if (nPageNr < 0) nPageNr = m_nCurrentPage; @@ -12340,7 +12340,7 @@ sal_Int32 PDFWriterImpl::createScreen(const Rectangle& rRect, sal_Int32 nPageNr) return nRet; } -sal_Int32 PDFWriterImpl::createNamedDest( const OUString& sDestName, const Rectangle& rRect, sal_Int32 nPageNr, PDFWriter::DestAreaType eType ) +sal_Int32 PDFWriterImpl::createNamedDest( const OUString& sDestName, const tools::Rectangle& rRect, sal_Int32 nPageNr, PDFWriter::DestAreaType eType ) { if( nPageNr < 0 ) nPageNr = m_nCurrentPage; @@ -12361,7 +12361,7 @@ sal_Int32 PDFWriterImpl::createNamedDest( const OUString& sDestName, const Recta return nRet; } -sal_Int32 PDFWriterImpl::createDest( const Rectangle& rRect, sal_Int32 nPageNr, PDFWriter::DestAreaType eType ) +sal_Int32 PDFWriterImpl::createDest( const tools::Rectangle& rRect, sal_Int32 nPageNr, PDFWriter::DestAreaType eType ) { if( nPageNr < 0 ) nPageNr = m_nCurrentPage; @@ -12381,7 +12381,7 @@ sal_Int32 PDFWriterImpl::createDest( const Rectangle& rRect, sal_Int32 nPageNr, return nRet; } -sal_Int32 PDFWriterImpl::registerDestReference( sal_Int32 nDestId, const Rectangle& rRect, sal_Int32 nPageNr, PDFWriter::DestAreaType eType ) +sal_Int32 PDFWriterImpl::registerDestReference( sal_Int32 nDestId, const tools::Rectangle& rRect, sal_Int32 nPageNr, PDFWriter::DestAreaType eType ) { return m_aDestinationIdTranslation[ nDestId ] = createDest( rRect, nPageNr, eType ); } @@ -13206,7 +13206,7 @@ bool PDFWriterImpl::setStructureAttributeNumerical( enum PDFWriter::StructAttrib return bInsert; } -void PDFWriterImpl::setStructureBoundingBox( const Rectangle& rRect ) +void PDFWriterImpl::setStructureBoundingBox( const tools::Rectangle& rRect ) { sal_Int32 nPageNr = m_nCurrentPage; if( nPageNr < 0 || nPageNr >= (sal_Int32)m_aPages.size() || !m_aContext.Tagged ) @@ -13455,7 +13455,7 @@ sal_Int32 PDFWriterImpl::createControl( const PDFWriter::AnyWidget& rControl, sa createDefaultRadioButtonAppearance( rNewWidget, rBtn ); // union rect of radio group - Rectangle aRect = rNewWidget.m_aRect; + tools::Rectangle aRect = rNewWidget.m_aRect; m_aPages[ nPageNr ].convertRect( aRect ); rRadioButton.m_aRect.Union( aRect ); } @@ -13539,7 +13539,7 @@ sal_Int32 PDFWriterImpl::createControl( const PDFWriter::AnyWidget& rControl, sa { sigHidden = true; - rNewWidget.m_aRect = Rectangle(0, 0, 0, 0); + rNewWidget.m_aRect = tools::Rectangle(0, 0, 0, 0); m_nSignatureObject = createObject(); rNewWidget.m_aValue = OUString::number( m_nSignatureObject ); diff --git a/vcl/source/gdi/pdfwriter_impl.hxx b/vcl/source/gdi/pdfwriter_impl.hxx index fad0d6c5bce0..4562ac984439 100644 --- a/vcl/source/gdi/pdfwriter_impl.hxx +++ b/vcl/source/gdi/pdfwriter_impl.hxx @@ -164,9 +164,9 @@ public: // appends a B2DPoint without further transformation void appendPixelPoint( const basegfx::B2DPoint& rPoint, OStringBuffer& rBuffer ) const; // appends a rectangle - void appendRect( const Rectangle& rRect, OStringBuffer& rBuffer ) const; + void appendRect( const tools::Rectangle& rRect, OStringBuffer& rBuffer ) const; // converts a rectangle to 10th points page space - void convertRect( Rectangle& rRect ) const; + void convertRect( tools::Rectangle& rRect ) const; // appends a polygon optionally closing it void appendPolygon( const tools::Polygon& rPoly, OStringBuffer& rBuffer, bool bClose = true ) const; // appends a polygon optionally closing it @@ -282,7 +282,7 @@ public: struct TilingEmit { sal_Int32 m_nObject; - Rectangle m_aRectangle; + tools::Rectangle m_aRectangle; Size m_aCellSize; SvtGraphicFill::Transform m_aTransform; ResourceDict m_aResources; @@ -300,7 +300,7 @@ public: sal_Int32 m_nObject; sal_Int32 m_nExtGStateObject; double m_fAlpha; - Rectangle m_aBoundRect; + tools::Rectangle m_aBoundRect; SvMemoryStream* m_pContentStream; SvMemoryStream* m_pSoftMaskStream; @@ -378,7 +378,7 @@ public: { sal_Int32 m_nPage; PDFWriter::DestAreaType m_eType; - Rectangle m_aRect; + tools::Rectangle m_aRect; }; //--->i56629 @@ -387,7 +387,7 @@ public: OUString m_aDestName; sal_Int32 m_nPage; PDFWriter::DestAreaType m_eType; - Rectangle m_aRect; + tools::Rectangle m_aRect; }; struct PDFOutlineEntry @@ -412,7 +412,7 @@ public: struct PDFAnnotation { sal_Int32 m_nObject; - Rectangle m_aRect; + tools::Rectangle m_aRect; sal_Int32 m_nPage; PDFAnnotation() @@ -563,7 +563,7 @@ public: std::list< sal_Int32 > m_aChildren; // indexes into structure vector std::list< PDFStructureElementKid > m_aKids; PDFStructAttributes m_aAttributes; - Rectangle m_aBBox; + tools::Rectangle m_aBBox; OUString m_aActualText; OUString m_aAltText; css::lang::Locale m_aLocale; @@ -731,7 +731,7 @@ private: { SvStream* m_pStream; MapMode m_aMapMode; - Rectangle m_aTargetRect; + tools::Rectangle m_aTargetRect; ResourceDict m_aResourceDict; }; std::list< StreamRedirect > m_aOutputStreams; @@ -995,7 +995,7 @@ i12626 bool writeBuffer( const void* pBuffer, sal_uInt64 nBytes ); void beginCompression(); void endCompression(); - void beginRedirect( SvStream* pStream, const Rectangle& ); + void beginRedirect( SvStream* pStream, const tools::Rectangle& ); SvStream* endRedirect(); void endPage(); @@ -1013,7 +1013,7 @@ i12626 bool checkEmitStructure(); /* draws an emphasis mark */ - void drawEmphasisMark( long nX, long nY, const tools::PolyPolygon& rPolyPoly, bool bPolyLine, const Rectangle& rRect1, const Rectangle& rRect2 ); + void drawEmphasisMark( long nX, long nY, const tools::PolyPolygon& rPolyPoly, bool bPolyLine, const tools::Rectangle& rRect1, const tools::Rectangle& rRect2 ); /* true if PDF/A-1a or PDF/A-1b is output */ bool m_bIsPDF_A1; @@ -1174,7 +1174,7 @@ public: void moveClipRegion( sal_Int32 nX, sal_Int32 nY ); - void intersectClipRegion( const Rectangle& rRect ); + void intersectClipRegion( const tools::Rectangle& rRect ); bool intersectClipRegion( const basegfx::B2DPolyPolygon& rRegion ); @@ -1201,7 +1201,7 @@ public: void drawTextArray( const Point& rPos, const OUString& rText, const long* pDXArray, sal_Int32 nIndex, sal_Int32 nLen ); void drawStretchText( const Point& rPos, sal_uLong nWidth, const OUString& rText, sal_Int32 nIndex, sal_Int32 nLen ); - void drawText( const Rectangle& rRect, const OUString& rOrigStr, DrawTextFlags nStyle ); + void drawText( const tools::Rectangle& rRect, const OUString& rOrigStr, DrawTextFlags nStyle ); void drawTextLine( const Point& rPos, long nWidth, FontStrikeout eStrikeout, FontLineStyle eUnderline, FontLineStyle eOverline, bool bUnderlineAbove ); void drawWaveTextLine( OStringBuffer& aLine, long nWidth, FontLineStyle eTextLine, Color aColor, bool bIsAbove ); void drawStraightTextLine( OStringBuffer& aLine, long nWidth, FontLineStyle eTextLine, Color aColor, bool bIsAbove ); @@ -1218,28 +1218,28 @@ public: void drawPixel( const Point& rPt, const Color& rColor ); - void drawRectangle( const Rectangle& rRect ); - void drawRectangle( const Rectangle& rRect, sal_uInt32 nHorzRound, sal_uInt32 nVertRound ); - void drawEllipse( const Rectangle& rRect ); - void drawArc( const Rectangle& rRect, const Point& rStart, const Point& rStop, bool bWithPie, bool bWidthChord ); + void drawRectangle( const tools::Rectangle& rRect ); + void drawRectangle( const tools::Rectangle& rRect, sal_uInt32 nHorzRound, sal_uInt32 nVertRound ); + void drawEllipse( const tools::Rectangle& rRect ); + void drawArc( const tools::Rectangle& rRect, const Point& rStart, const Point& rStop, bool bWithPie, bool bWidthChord ); void drawBitmap( const Point& rDestPoint, const Size& rDestSize, const Bitmap& rBitmap, const Graphic& rGraphic ); void drawBitmap( const Point& rDestPoint, const Size& rDestSize, const BitmapEx& rBitmap ); - void drawJPGBitmap( SvStream& rDCTData, bool bIsTrueColor, const Size& rSizePixel, const Rectangle& rTargetArea, const Bitmap& rMask, const Graphic& rGraphic ); + void drawJPGBitmap( SvStream& rDCTData, bool bIsTrueColor, const Size& rSizePixel, const tools::Rectangle& rTargetArea, const Bitmap& rMask, const Graphic& rGraphic ); /// Stores the original PDF data from rGraphic as an embedded file. void createEmbeddedFile(const Graphic& rGraphic, ReferenceXObjectEmit& rEmit, sal_Int32 nBitmapObject); - void drawGradient( const Rectangle& rRect, const Gradient& rGradient ); + void drawGradient( const tools::Rectangle& rRect, const Gradient& rGradient ); void drawHatch( const tools::PolyPolygon& rPolyPoly, const Hatch& rHatch ); - void drawWallpaper( const Rectangle& rRect, const Wallpaper& rWall ); + void drawWallpaper( const tools::Rectangle& rRect, const Wallpaper& rWall ); void drawTransparent( const tools::PolyPolygon& rPolyPoly, sal_uInt32 nTransparentPercent ); void beginTransparencyGroup(); - void endTransparencyGroup( const Rectangle& rBoundingBox, sal_uInt32 nTransparentPercent ); + void endTransparencyGroup( const tools::Rectangle& rBoundingBox, sal_uInt32 nTransparentPercent ); void emitComment( const char* pComment ); //--->i56629 named destinations - sal_Int32 createNamedDest( const OUString& sDestName, const Rectangle& rRect, sal_Int32 nPageNr, PDFWriter::DestAreaType eType ); + sal_Int32 createNamedDest( const OUString& sDestName, const tools::Rectangle& rRect, sal_Int32 nPageNr, PDFWriter::DestAreaType eType ); //--->i59651 //emits output intent @@ -1249,15 +1249,15 @@ public: sal_Int32 emitDocumentMetadata(); // links - sal_Int32 createLink( const Rectangle& rRect, sal_Int32 nPageNr ); - sal_Int32 createDest( const Rectangle& rRect, sal_Int32 nPageNr, PDFWriter::DestAreaType eType ); - sal_Int32 registerDestReference( sal_Int32 nDestId, const Rectangle& rRect, sal_Int32 nPageNr, PDFWriter::DestAreaType eType ); + sal_Int32 createLink( const tools::Rectangle& rRect, sal_Int32 nPageNr ); + sal_Int32 createDest( const tools::Rectangle& rRect, sal_Int32 nPageNr, PDFWriter::DestAreaType eType ); + sal_Int32 registerDestReference( sal_Int32 nDestId, const tools::Rectangle& rRect, sal_Int32 nPageNr, PDFWriter::DestAreaType eType ); void setLinkDest( sal_Int32 nLinkId, sal_Int32 nDestId ); void setLinkURL( sal_Int32 nLinkId, const OUString& rURL ); void setLinkPropertyId( sal_Int32 nLinkId, sal_Int32 nPropertyId ); // screens - sal_Int32 createScreen(const Rectangle& rRect, sal_Int32 nPageNr); + sal_Int32 createScreen(const tools::Rectangle& rRect, sal_Int32 nPageNr); void setScreenURL(sal_Int32 nScreenId, const OUString& rURL); void setScreenStream(sal_Int32 nScreenId, const OUString& rURL); @@ -1268,14 +1268,14 @@ public: void setOutlineItemDest( sal_Int32 nItem, sal_Int32 nDestID ); // notes - void createNote( const Rectangle& rRect, const PDFNote& rNote, sal_Int32 nPageNr ); + void createNote( const tools::Rectangle& rRect, const PDFNote& rNote, sal_Int32 nPageNr ); // structure elements sal_Int32 beginStructureElement( PDFWriter::StructElement eType, const OUString& rAlias ); void endStructureElement(); bool setCurrentStructureElement( sal_Int32 nElement ); bool setStructureAttribute( enum PDFWriter::StructAttribute eAttr, enum PDFWriter::StructAttributeValue eVal ); bool setStructureAttributeNumerical( enum PDFWriter::StructAttribute eAttr, sal_Int32 nValue ); - void setStructureBoundingBox( const Rectangle& rRect ); + void setStructureBoundingBox( const tools::Rectangle& rRect ); void setActualText( const OUString& rText ); void setAlternateText( const OUString& rText ); diff --git a/vcl/source/gdi/pdfwriter_impl2.cxx b/vcl/source/gdi/pdfwriter_impl2.cxx index bc5cb346b47f..828ae3e2f66a 100644 --- a/vcl/source/gdi/pdfwriter_impl2.cxx +++ b/vcl/source/gdi/pdfwriter_impl2.cxx @@ -243,7 +243,7 @@ void PDFWriterImpl::implWriteBitmapEx( const Point& i_rPoint, const Size& i_rSiz } } if ( bUseJPGCompression ) - m_rOuterFace.DrawJPGBitmap( aStrm, bTrueColorJPG, aSizePixel, Rectangle( aPoint, aSize ), aMask, i_Graphic ); + m_rOuterFace.DrawJPGBitmap( aStrm, bTrueColorJPG, aSizePixel, tools::Rectangle( aPoint, aSize ), aMask, i_Graphic ); else if ( aBitmapEx.IsTransparent() ) m_rOuterFace.DrawBitmapEx( aPoint, aSize, aBitmapEx ); else @@ -423,7 +423,7 @@ void PDFWriterImpl::playMetafile( const GDIMetaFile& i_rMtf, vcl::PDFExtOutDevDa const sal_uInt16 nTransPercent = aTransCol.GetLuminance() * 100 / 255; m_rOuterFace.BeginTransparencyGroup(); playMetafile( aTmpMtf, nullptr, i_rContext, pDummyVDev ); - m_rOuterFace.EndTransparencyGroup( Rectangle( rPos, rSize ), nTransPercent ); + m_rOuterFace.EndTransparencyGroup( tools::Rectangle( rPos, rSize ), nTransPercent ); } else { @@ -476,7 +476,7 @@ void PDFWriterImpl::playMetafile( const GDIMetaFile& i_rMtf, vcl::PDFExtOutDevDa // create mask bitmap xVDev->SetLineColor( COL_BLACK ); xVDev->SetFillColor( COL_BLACK ); - xVDev->DrawRect( Rectangle( aPoint, aDstSize ) ); + xVDev->DrawRect( tools::Rectangle( aPoint, aDstSize ) ); xVDev->SetDrawMode( DrawModeFlags::WhiteLine | DrawModeFlags::WhiteFill | DrawModeFlags::WhiteText | DrawModeFlags::WhiteBitmap | DrawModeFlags::WhiteGradient ); aTmpMtf.WindStart(); @@ -488,7 +488,7 @@ void PDFWriterImpl::playMetafile( const GDIMetaFile& i_rMtf, vcl::PDFExtOutDevDa // create alpha mask from gradient xVDev->SetDrawMode( DrawModeFlags::GrayGradient ); - xVDev->DrawGradient( Rectangle( aPoint, aDstSize ), rTransparenceGradient ); + xVDev->DrawGradient( tools::Rectangle( aPoint, aDstSize ), rTransparenceGradient ); xVDev->SetDrawMode( DrawModeFlags::Default ); xVDev->EnableMapMode( false ); xVDev->DrawMask( aPoint, aDstSizePixel, aMask, Color( COL_WHITE ) ); @@ -812,7 +812,7 @@ void PDFWriterImpl::playMetafile( const GDIMetaFile& i_rMtf, vcl::PDFExtOutDevDa { const MetaBmpScalePartAction* pA = static_cast<const MetaBmpScalePartAction*>(pAction); BitmapEx aBitmapEx( pA->GetBitmap() ); - aBitmapEx.Crop( Rectangle( pA->GetSrcPoint(), pA->GetSrcSize() ) ); + aBitmapEx.Crop( tools::Rectangle( pA->GetSrcPoint(), pA->GetSrcSize() ) ); Graphic aGraphic = i_pOutDevData ? i_pOutDevData->GetCurrentGraphic() : Graphic(); implWriteBitmapEx( pA->GetDestPoint(), pA->GetDestSize(), aBitmapEx, aGraphic, pDummyVDev, i_rContext ); } @@ -841,7 +841,7 @@ void PDFWriterImpl::playMetafile( const GDIMetaFile& i_rMtf, vcl::PDFExtOutDevDa { const MetaBmpExScalePartAction* pA = static_cast<const MetaBmpExScalePartAction*>(pAction); BitmapEx aBitmapEx( pA->GetBitmapEx() ); - aBitmapEx.Crop( Rectangle( pA->GetSrcPoint(), pA->GetSrcSize() ) ); + aBitmapEx.Crop( tools::Rectangle( pA->GetSrcPoint(), pA->GetSrcSize() ) ); Graphic aGraphic = i_pOutDevData ? i_pOutDevData->GetCurrentGraphic() : Graphic(); implWriteBitmapEx( pA->GetDestPoint(), pA->GetDestSize(), aBitmapEx, aGraphic, pDummyVDev, i_rContext ); } diff --git a/vcl/source/gdi/print.cxx b/vcl/source/gdi/print.cxx index 8bb043a3991c..7941632b89fc 100644 --- a/vcl/source/gdi/print.cxx +++ b/vcl/source/gdi/print.cxx @@ -240,7 +240,7 @@ void Printer::EmulateDrawTransparent ( const tools::PolyPolygon& rPolyPoly, // #110958# Restore disabled alpha VDev mpAlphaVDev = pOldAlphaVDev; - Rectangle aPolyRect( LogicToPixel( rPolyPoly ).GetBoundRect() ); + tools::Rectangle aPolyRect( LogicToPixel( rPolyPoly ).GetBoundRect() ); const Size aDPISize( LogicToPixel( Size( 1, 1 ), MapUnit::MapInch ) ); const long nBaseExtent = std::max( FRound( aDPISize.Width() / 300. ), 1L ); long nMove; @@ -270,14 +270,14 @@ void Printer::EmulateDrawTransparent ( const tools::PolyPolygon& rPolyPoly, if(nMove) { - Rectangle aRect( aPolyRect.TopLeft(), Size( aPolyRect.GetWidth(), nBaseExtent ) ); + tools::Rectangle aRect( aPolyRect.TopLeft(), Size( aPolyRect.GetWidth(), nBaseExtent ) ); while( aRect.Top() <= aPolyRect.Bottom() ) { DrawRect( aRect ); aRect.Move( 0, nMove ); } - aRect = Rectangle( aPolyRect.TopLeft(), Size( nBaseExtent, aPolyRect.GetHeight() ) ); + aRect = tools::Rectangle( aPolyRect.TopLeft(), Size( nBaseExtent, aPolyRect.GetHeight() ) ); while( aRect.Left() <= aPolyRect.Right() ) { DrawRect( aRect ); @@ -739,7 +739,7 @@ void Printer::DrawDeviceMask( const Bitmap& rMask, const Color& rMaskColor, Point aPt; Point aDestPt( LogicToPixel( rDestPt ) ); Size aDestSz( LogicToPixel( rDestSize ) ); - Rectangle aSrcRect( rSrcPtPixel, rSrcSizePixel ); + tools::Rectangle aSrcRect( rSrcPtPixel, rSrcSizePixel ); aSrcRect.Justify(); @@ -768,7 +768,7 @@ void Printer::DrawDeviceMask( const Bitmap& rMask, const Color& rMaskColor, } // source cropped? - if( aSrcRect != Rectangle( aPt, aMask.GetSizePixel() ) ) + if( aSrcRect != tools::Rectangle( aPt, aMask.GetSizePixel() ) ) aMask.Crop( aSrcRect ); // destination mirrored @@ -799,7 +799,7 @@ void Printer::DrawDeviceMask( const Bitmap& rMask, const Color& rMaskColor, pMapY[ nY ] = aDestPt.Y() + FRound( (double) aDestSz.Height() * nY / nSrcHeight ); // walk through all rectangles of mask - const vcl::Region aWorkRgn(aMask.CreateRegion(COL_BLACK, Rectangle(Point(), aMask.GetSizePixel()))); + const vcl::Region aWorkRgn(aMask.CreateRegion(COL_BLACK, tools::Rectangle(Point(), aMask.GetSizePixel()))); RectangleVector aRectangles; aWorkRgn.GetRegionRectangles(aRectangles); @@ -810,7 +810,7 @@ void Printer::DrawDeviceMask( const Bitmap& rMask, const Color& rMaskColor, pMapX[aRectIter->Right() + 1] - aMapPt.X(), // pMapX[L + W] -> L + ((R - L) + 1) -> R + 1 pMapY[aRectIter->Bottom() + 1] - aMapPt.Y()); // same for Y - DrawRect(Rectangle(aMapPt, aMapSz)); + DrawRect(tools::Rectangle(aMapPt, aMapSz)); } Pop(); @@ -1749,7 +1749,7 @@ bool Printer::UsePolyPolygonForComplexGradient() void Printer::ClipAndDrawGradientMetafile ( const Gradient &rGradient, const tools::PolyPolygon &rPolyPoly ) { - const Rectangle aBoundRect( rPolyPoly.GetBoundRect() ); + const tools::Rectangle aBoundRect( rPolyPoly.GetBoundRect() ); Push( PushFlags::CLIPREGION ); IntersectClipRegion(vcl::Region(rPolyPoly)); diff --git a/vcl/source/gdi/print2.cxx b/vcl/source/gdi/print2.cxx index e794c07c6a4f..42c96e8f6064 100644 --- a/vcl/source/gdi/print2.cxx +++ b/vcl/source/gdi/print2.cxx @@ -58,7 +58,7 @@ struct ConnectedComponents {} ComponentList aComponentList; - Rectangle aBounds; + tools::Rectangle aBounds; Color aBgColor; bool bIsSpecial; bool bIsFullyTransparent; @@ -125,9 +125,9 @@ bool DoesActionHandleTransparency( const MetaAction& rAct ) /** Check whether rCurrRect rectangle fully covers io_rPrevRect - if yes, return true and update o_rBgColor */ -bool checkRect( Rectangle& io_rPrevRect, +bool checkRect( tools::Rectangle& io_rPrevRect, Color& o_rBgColor, - const Rectangle& rCurrRect, + const tools::Rectangle& rCurrRect, OutputDevice& rMapModeVDev ) { // shape needs to fully cover previous content, and have uniform @@ -393,24 +393,24 @@ bool ImplIsNotTransparent( const MetaAction& rAct, const OutputDevice& rOut ) } // #i10613# Extracted from ImplCheckRect::ImplCreate -Rectangle ImplCalcActionBounds( const MetaAction& rAct, const OutputDevice& rOut ) +tools::Rectangle ImplCalcActionBounds( const MetaAction& rAct, const OutputDevice& rOut ) { - Rectangle aActionBounds; + tools::Rectangle aActionBounds; switch( rAct.GetType() ) { case MetaActionType::PIXEL: - aActionBounds = Rectangle( static_cast<const MetaPixelAction&>(rAct).GetPoint(), Size( 1, 1 ) ); + aActionBounds = tools::Rectangle( static_cast<const MetaPixelAction&>(rAct).GetPoint(), Size( 1, 1 ) ); break; case MetaActionType::POINT: - aActionBounds = Rectangle( static_cast<const MetaPointAction&>(rAct).GetPoint(), Size( 1, 1 ) ); + aActionBounds = tools::Rectangle( static_cast<const MetaPointAction&>(rAct).GetPoint(), Size( 1, 1 ) ); break; case MetaActionType::LINE: { const MetaLineAction& rMetaLineAction = static_cast<const MetaLineAction&>(rAct); - aActionBounds = Rectangle( rMetaLineAction.GetStartPoint(), rMetaLineAction.GetEndPoint() ); + aActionBounds = tools::Rectangle( rMetaLineAction.GetStartPoint(), rMetaLineAction.GetEndPoint() ); aActionBounds.Justify(); const long nLineWidth(rMetaLineAction.GetLineInfo().GetWidth()); if(nLineWidth) @@ -436,7 +436,7 @@ Rectangle ImplCalcActionBounds( const MetaAction& rAct, const OutputDevice& rOut case MetaActionType::ELLIPSE: { - const Rectangle& rRect = static_cast<const MetaEllipseAction&>(rAct).GetRect(); + const tools::Rectangle& rRect = static_cast<const MetaEllipseAction&>(rAct).GetRect(); aActionBounds = tools::Polygon( rRect.Center(), rRect.GetWidth() >> 1, rRect.GetHeight() >> 1 ).GetBoundRect(); @@ -486,47 +486,47 @@ Rectangle ImplCalcActionBounds( const MetaAction& rAct, const OutputDevice& rOut break; case MetaActionType::BMP: - aActionBounds = Rectangle( static_cast<const MetaBmpAction&>(rAct).GetPoint(), + aActionBounds = tools::Rectangle( static_cast<const MetaBmpAction&>(rAct).GetPoint(), rOut.PixelToLogic( static_cast<const MetaBmpAction&>(rAct).GetBitmap().GetSizePixel() ) ); break; case MetaActionType::BMPSCALE: - aActionBounds = Rectangle( static_cast<const MetaBmpScaleAction&>(rAct).GetPoint(), + aActionBounds = tools::Rectangle( static_cast<const MetaBmpScaleAction&>(rAct).GetPoint(), static_cast<const MetaBmpScaleAction&>(rAct).GetSize() ); break; case MetaActionType::BMPSCALEPART: - aActionBounds = Rectangle( static_cast<const MetaBmpScalePartAction&>(rAct).GetDestPoint(), + aActionBounds = tools::Rectangle( static_cast<const MetaBmpScalePartAction&>(rAct).GetDestPoint(), static_cast<const MetaBmpScalePartAction&>(rAct).GetDestSize() ); break; case MetaActionType::BMPEX: - aActionBounds = Rectangle( static_cast<const MetaBmpExAction&>(rAct).GetPoint(), + aActionBounds = tools::Rectangle( static_cast<const MetaBmpExAction&>(rAct).GetPoint(), rOut.PixelToLogic( static_cast<const MetaBmpExAction&>(rAct).GetBitmapEx().GetSizePixel() ) ); break; case MetaActionType::BMPEXSCALE: - aActionBounds = Rectangle( static_cast<const MetaBmpExScaleAction&>(rAct).GetPoint(), + aActionBounds = tools::Rectangle( static_cast<const MetaBmpExScaleAction&>(rAct).GetPoint(), static_cast<const MetaBmpExScaleAction&>(rAct).GetSize() ); break; case MetaActionType::BMPEXSCALEPART: - aActionBounds = Rectangle( static_cast<const MetaBmpExScalePartAction&>(rAct).GetDestPoint(), + aActionBounds = tools::Rectangle( static_cast<const MetaBmpExScalePartAction&>(rAct).GetDestPoint(), static_cast<const MetaBmpExScalePartAction&>(rAct).GetDestSize() ); break; case MetaActionType::MASK: - aActionBounds = Rectangle( static_cast<const MetaMaskAction&>(rAct).GetPoint(), + aActionBounds = tools::Rectangle( static_cast<const MetaMaskAction&>(rAct).GetPoint(), rOut.PixelToLogic( static_cast<const MetaMaskAction&>(rAct).GetBitmap().GetSizePixel() ) ); break; case MetaActionType::MASKSCALE: - aActionBounds = Rectangle( static_cast<const MetaMaskScaleAction&>(rAct).GetPoint(), + aActionBounds = tools::Rectangle( static_cast<const MetaMaskScaleAction&>(rAct).GetPoint(), static_cast<const MetaMaskScaleAction&>(rAct).GetSize() ); break; case MetaActionType::MASKSCALEPART: - aActionBounds = Rectangle( static_cast<const MetaMaskScalePartAction&>(rAct).GetDestPoint(), + aActionBounds = tools::Rectangle( static_cast<const MetaMaskScalePartAction&>(rAct).GetDestPoint(), static_cast<const MetaMaskScalePartAction&>(rAct).GetDestSize() ); break; @@ -551,12 +551,12 @@ Rectangle ImplCalcActionBounds( const MetaAction& rAct, const OutputDevice& rOut break; case MetaActionType::FLOATTRANSPARENT: - aActionBounds = Rectangle( static_cast<const MetaFloatTransparentAction&>(rAct).GetPoint(), + aActionBounds = tools::Rectangle( static_cast<const MetaFloatTransparentAction&>(rAct).GetPoint(), static_cast<const MetaFloatTransparentAction&>(rAct).GetSize() ); break; case MetaActionType::EPS: - aActionBounds = Rectangle( static_cast<const MetaEPSAction&>(rAct).GetPoint(), + aActionBounds = tools::Rectangle( static_cast<const MetaEPSAction&>(rAct).GetPoint(), static_cast<const MetaEPSAction&>(rAct).GetSize() ); break; @@ -591,7 +591,7 @@ Rectangle ImplCalcActionBounds( const MetaAction& rAct, const OutputDevice& rOut 0, rTextAct.GetDXArray() ); if( pSalLayout ) { - Rectangle aBoundRect( const_cast<OutputDevice&>(rOut).ImplGetTextBoundRect( *pSalLayout ) ); + tools::Rectangle aBoundRect( const_cast<OutputDevice&>(rOut).ImplGetTextBoundRect( *pSalLayout ) ); aActionBounds = rOut.PixelToLogic( aBoundRect ); pSalLayout->Release(); } @@ -621,7 +621,7 @@ Rectangle ImplCalcActionBounds( const MetaAction& rAct, const OutputDevice& rOut rTextAct.GetWidth() ); if( pSalLayout ) { - Rectangle aBoundRect( const_cast<OutputDevice&>(rOut).ImplGetTextBoundRect( *pSalLayout ) ); + tools::Rectangle aBoundRect( const_cast<OutputDevice&>(rOut).ImplGetTextBoundRect( *pSalLayout ) ); aActionBounds = rOut.PixelToLogic( aBoundRect ); pSalLayout->Release(); } @@ -647,7 +647,7 @@ Rectangle ImplCalcActionBounds( const MetaAction& rAct, const OutputDevice& rOut return rOut.LogicToPixel( aActionBounds ); } else - return Rectangle(); + return tools::Rectangle(); } } // end anon namespace @@ -751,10 +751,10 @@ bool OutputDevice::RemoveTransparenciesFromMetaFile( const GDIMetaFile& rInMtf, Point aPageOffset = pThis->GetPageOffsetPixel(); aPageOffset = Point( 0, 0 ) - aPageOffset; Size aSize = pThis->GetPaperSizePixel(); - aBackgroundComponent.aBounds = Rectangle( aPageOffset, aSize ); + aBackgroundComponent.aBounds = tools::Rectangle( aPageOffset, aSize ); } else - aBackgroundComponent.aBounds = Rectangle( Point( 0, 0 ), GetOutputSizePixel() ); + aBackgroundComponent.aBounds = tools::Rectangle( Point( 0, 0 ), GetOutputSizePixel() ); } while( pCurrAct && bStillBackground ) { @@ -876,10 +876,10 @@ bool OutputDevice::RemoveTransparenciesFromMetaFile( const GDIMetaFile& rInMtf, pCurrAct->Execute( aMapModeVDev.get() ); // cache bounds of current action - const Rectangle aBBCurrAct( ImplCalcActionBounds(*pCurrAct, *aMapModeVDev.get()) ); + const tools::Rectangle aBBCurrAct( ImplCalcActionBounds(*pCurrAct, *aMapModeVDev.get()) ); // accumulate collected bounds here, initialize with current action - Rectangle aTotalBounds( aBBCurrAct ); // thus, + tools::Rectangle aTotalBounds( aBBCurrAct ); // thus, // aTotalComponents.aBounds // is // empty @@ -1123,7 +1123,7 @@ bool OutputDevice::RemoveTransparenciesFromMetaFile( const GDIMetaFile& rInMtf, aPageOffset = Point( 0, 0 ) - aPageOffset; aTmpSize = pThis->GetPaperSizePixel(); } - const Rectangle aOutputRect( aPageOffset, aTmpSize ); + const tools::Rectangle aOutputRect( aPageOffset, aTmpSize ); bool bTiling = dynamic_cast<Printer*>(this) != nullptr; // iterate over all aCCList members and generate bitmaps for the special ones @@ -1131,7 +1131,7 @@ bool OutputDevice::RemoveTransparenciesFromMetaFile( const GDIMetaFile& rInMtf, { if( aCurr->bIsSpecial ) { - Rectangle aBoundRect( aCurr->aBounds ); + tools::Rectangle aBoundRect( aCurr->aBounds ); aBoundRect.Intersection( aOutputRect ); const double fBmpArea( (double) aBoundRect.GetWidth() * aBoundRect.GetHeight() ); @@ -1177,7 +1177,7 @@ bool OutputDevice::RemoveTransparenciesFromMetaFile( const GDIMetaFile& rInMtf, if( ( aDstPtPix.X() + aDstSzPix.Width() - 1 ) > aBoundRect.Right() ) aDstSzPix.Width() = aBoundRect.Right() - aDstPtPix.X() + 1; - if( !Rectangle( aDstPtPix, aDstSzPix ).Intersection( aBoundRect ).IsEmpty() && + if( !tools::Rectangle( aDstPtPix, aDstSzPix ).Intersection( aBoundRect ).IsEmpty() && aPaintVDev->SetOutputSizePixel( aDstSzPix ) ) { aPaintVDev->Push(); @@ -1340,7 +1340,7 @@ bool OutputDevice::RemoveTransparenciesFromMetaFile( const GDIMetaFile& rInMtf, return bTransparent; } -void Printer::DrawGradientEx( OutputDevice* pOut, const Rectangle& rRect, const Gradient& rGradient ) +void Printer::DrawGradientEx( OutputDevice* pOut, const tools::Rectangle& rRect, const Gradient& rGradient ) { const PrinterOptions& rPrinterOptions = GetPrinterOptions(); diff --git a/vcl/source/gdi/print3.cxx b/vcl/source/gdi/print3.cxx index 28ebd80b9473..7ad7ce34f8be 100644 --- a/vcl/source/gdi/print3.cxx +++ b/vcl/source/gdi/print3.cxx @@ -1022,7 +1022,7 @@ PrinterController::PageSize PrinterController::getPageFile( int i_nUnfilteredPag return aPageSize; } -static void appendSubPage( GDIMetaFile& o_rMtf, const Rectangle& i_rClipRect, GDIMetaFile& io_rSubPage, bool i_bDrawBorder ) +static void appendSubPage( GDIMetaFile& o_rMtf, const tools::Rectangle& i_rClipRect, GDIMetaFile& io_rSubPage, bool i_bDrawBorder ) { // intersect all clipregion actions with our clip rect io_rSubPage.WindStart(); @@ -1048,7 +1048,7 @@ static void appendSubPage( GDIMetaFile& o_rMtf, const Rectangle& i_rClipRect, GD o_rMtf.AddAction( new MetaPushAction( PushFlags::LINECOLOR | PushFlags::FILLCOLOR | PushFlags::CLIPREGION | PushFlags::MAPMODE ) ); o_rMtf.AddAction( new MetaMapModeAction( MapMode( MapUnit::Map100thMM ) ) ); - Rectangle aBorderRect( i_rClipRect ); + tools::Rectangle aBorderRect( i_rClipRect ); o_rMtf.AddAction( new MetaLineColorAction( Color( COL_BLACK ), true ) ); o_rMtf.AddAction( new MetaFillColorAction( Color( COL_TRANSPARENT ), false ) ); o_rMtf.AddAction( new MetaRectAction( aBorderRect ) ); @@ -1183,7 +1183,7 @@ PrinterController::PageSize PrinterController::getFilteredPageFile( int i_nFilte aPageFile.Move( nX, nY, mpImplData->mxPrinter->GetDPIX(), mpImplData->mxPrinter->GetDPIY() ); aPageFile.WindStart(); // calculate border rectangle - Rectangle aSubPageRect( Point( nX, nY ), + tools::Rectangle aSubPageRect( Point( nX, nY ), Size( long(double(aPageSize.aSize.Width())*fScale), long(double(aPageSize.aSize.Height())*fScale) ) ); diff --git a/vcl/source/gdi/region.cxx b/vcl/source/gdi/region.cxx index b6ed3e1ef2c0..fd256020c76f 100644 --- a/vcl/source/gdi/region.cxx +++ b/vcl/source/gdi/region.cxx @@ -183,7 +183,7 @@ namespace /** Convert a general polygon (one for which ImplIsPolygonRectilinear() returns <FALSE/>) to bands. */ - std::unique_ptr<RegionBand> ImplGeneralPolygonToBands(const tools::PolyPolygon& rPolyPoly, const Rectangle& rPolygonBoundingBox) + std::unique_ptr<RegionBand> ImplGeneralPolygonToBands(const tools::PolyPolygon& rPolyPoly, const tools::Rectangle& rPolygonBoundingBox) { long nLineID = 0; @@ -246,7 +246,7 @@ std::unique_ptr<RegionBand> ImplCreateRegionBandFromPolyPolygon(const tools::Pol if(aPolyPolygon.Count()) { - const Rectangle aRect(aPolyPolygon.GetBoundRect()); + const tools::Rectangle aRect(aPolyPolygon.GetBoundRect()); if(!aRect.IsEmpty()) { @@ -316,7 +316,7 @@ Region::Region(bool bIsNull) { } -Region::Region(const Rectangle& rRect) +Region::Region(const tools::Rectangle& rRect) : mpB2DPolyPolygon(), mpPolyPolygon(), mpRegionBand(), @@ -392,7 +392,7 @@ void vcl::Region::ImplCreatePolyPolyRegion( const tools::PolyPolygon& rPolyPoly if(nPolyCount) { // polypolygon empty? -> empty region - const Rectangle aRect(rPolyPoly.GetBoundRect()); + const tools::Rectangle aRect(rPolyPoly.GetBoundRect()); if(!aRect.IsEmpty()) { @@ -514,7 +514,7 @@ void vcl::Region::Scale( double fScaleX, double fScaleY ) } } -bool vcl::Region::Union( const Rectangle& rRect ) +bool vcl::Region::Union( const tools::Rectangle& rRect ) { if(rRect.IsEmpty()) { @@ -595,7 +595,7 @@ bool vcl::Region::Union( const Rectangle& rRect ) return true; } -bool vcl::Region::Intersect( const Rectangle& rRect ) +bool vcl::Region::Intersect( const tools::Rectangle& rRect ) { if ( rRect.IsEmpty() ) { @@ -687,7 +687,7 @@ bool vcl::Region::Intersect( const Rectangle& rRect ) return true; } -bool vcl::Region::Exclude( const Rectangle& rRect ) +bool vcl::Region::Exclude( const tools::Rectangle& rRect ) { if ( rRect.IsEmpty() ) { @@ -767,7 +767,7 @@ bool vcl::Region::Exclude( const Rectangle& rRect ) return true; } -bool vcl::Region::XOr( const Rectangle& rRect ) +bool vcl::Region::XOr( const tools::Rectangle& rRect ) { if ( rRect.IsEmpty() ) { @@ -1232,19 +1232,19 @@ bool vcl::Region::XOr( const vcl::Region& rRegion ) return true; } -Rectangle vcl::Region::GetBoundRect() const +tools::Rectangle vcl::Region::GetBoundRect() const { if(IsEmpty()) { // no internal data? -> region is empty! - return Rectangle(); + return tools::Rectangle(); } if(IsNull()) { // error; null region has no BoundRect // OSL_ENSURE(false, "Region::GetBoundRect error: null region has unlimited bound rect, not representable (!)"); - return Rectangle(); + return tools::Rectangle(); } // prefer double precision source @@ -1255,12 +1255,12 @@ Rectangle vcl::Region::GetBoundRect() const if(aRange.isEmpty()) { // emulate PolyPolygon::GetBoundRect() when empty polygon - return Rectangle(); + return tools::Rectangle(); } else { // #i122149# corrected rounding, no need for ceil() and floor() here - return Rectangle( + return tools::Rectangle( basegfx::fround(aRange.getMinX()), basegfx::fround(aRange.getMinY()), basegfx::fround(aRange.getMaxX()), basegfx::fround(aRange.getMaxY())); } @@ -1276,7 +1276,7 @@ Rectangle vcl::Region::GetBoundRect() const return getRegionBand()->GetBoundRect(); } - return Rectangle(); + return tools::Rectangle(); } const tools::PolyPolygon vcl::Region::GetAsPolyPolygon() const @@ -1385,7 +1385,7 @@ bool vcl::Region::IsInside( const Point& rPoint ) const return false; } -bool vcl::Region::IsOver( const Rectangle& rRect ) const +bool vcl::Region::IsOver( const tools::Rectangle& rRect ) const { if(IsEmpty()) { @@ -1466,7 +1466,7 @@ Region& vcl::Region::operator=( vcl::Region&& rRegion ) return *this; } -Region& vcl::Region::operator=( const Rectangle& rRect ) +Region& vcl::Region::operator=( const tools::Rectangle& rRect ) { mpB2DPolyPolygon.reset(); mpPolyPolygon.reset(); @@ -1695,7 +1695,7 @@ void vcl::Region::GetRegionRectangles(RectangleVector& rTarget) const } } -static inline bool ImplPolygonRectTest( const tools::Polygon& rPoly, Rectangle* pRectOut = nullptr ) +static inline bool ImplPolygonRectTest( const tools::Polygon& rPoly, tools::Rectangle* pRectOut = nullptr ) { bool bIsRect = false; const Point* pPoints = rPoly.GetConstPointAry(); @@ -1779,7 +1779,7 @@ vcl::Region vcl::Region::GetRegionFromPolyPolygon( const tools::PolyPolygon& rPo } vcl::Region aResult; - Rectangle aRect; + tools::Rectangle aRect; for( int i = 0; i < nPolygons; i++ ) { diff --git a/vcl/source/gdi/regionband.cxx b/vcl/source/gdi/regionband.cxx index abd6fc4c365c..e7d1163bdb26 100644 --- a/vcl/source/gdi/regionband.cxx +++ b/vcl/source/gdi/regionband.cxx @@ -61,7 +61,7 @@ RegionBand& RegionBand::operator=(const RegionBand& rRef) return *this; } -RegionBand::RegionBand(const Rectangle& rRect) +RegionBand::RegionBand(const tools::Rectangle& rRect) : mpFirstBand(nullptr), mpLastCheckedBand(nullptr) { @@ -1155,7 +1155,7 @@ bool RegionBand::Exclude(const RegionBand& rSource) return true; } -Rectangle RegionBand::GetBoundRect() const +tools::Rectangle RegionBand::GetBoundRect() const { // get the boundaries of the first band @@ -1176,7 +1176,7 @@ Rectangle RegionBand::GetBoundRect() const pBand = pBand->mpNextBand; } - return Rectangle( nXLeft, nYTop, nXRight, nYBottom ); + return tools::Rectangle( nXLeft, nYTop, nXRight, nYBottom ); } void RegionBand::XOr(const RegionBand& rSource) @@ -1234,7 +1234,7 @@ void RegionBand::GetRegionRectangles(RectangleVector& rTarget) const // clear result vector rTarget.clear(); ImplRegionBand* pCurrRectBand = mpFirstBand; - Rectangle aRectangle; + tools::Rectangle aRectangle; while(pCurrRectBand) { diff --git a/vcl/source/gdi/salgdilayout.cxx b/vcl/source/gdi/salgdilayout.cxx index 6c607b0cfb23..7a30d990ebbd 100644 --- a/vcl/source/gdi/salgdilayout.cxx +++ b/vcl/source/gdi/salgdilayout.cxx @@ -258,7 +258,7 @@ void SalGraphics::mirror( vcl::Region& rRgn, const OutputDevice *pOutDev ) const } } -void SalGraphics::mirror( Rectangle& rRect, const OutputDevice *pOutDev, bool bBack ) const +void SalGraphics::mirror( tools::Rectangle& rRect, const OutputDevice *pOutDev, bool bBack ) const { long nWidth = rRect.GetWidth(); long x = rRect.Left(); @@ -639,13 +639,13 @@ bool SalGraphics::DrawEPS( long nX, long nY, long nWidth, long nHeight, void* pP return drawEPS( nX, nY, nWidth, nHeight, pPtr, nSize ); } -bool SalGraphics::HitTestNativeScrollbar( ControlPart nPart, const Rectangle& rControlRegion, +bool SalGraphics::HitTestNativeScrollbar( ControlPart nPart, const tools::Rectangle& rControlRegion, const Point& aPos, bool& rIsInside, const OutputDevice *pOutDev ) { if( (m_nLayout & SalLayoutFlags::BiDiRtl) || (pOutDev && pOutDev->IsRTLEnabled()) ) { Point pt( aPos ); - Rectangle rgn( rControlRegion ); + tools::Rectangle rgn( rControlRegion ); mirror( pt.X(), pOutDev ); mirror( rgn, pOutDev ); return hitTestNativeControl( ControlType::Scrollbar, nPart, rgn, pt, rIsInside ); @@ -690,14 +690,14 @@ void SalGraphics::mirror( ImplControlValue& rVal, const OutputDevice* pOutDev ) } } -bool SalGraphics::DrawNativeControl( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion, +bool SalGraphics::DrawNativeControl( ControlType nType, ControlPart nPart, const tools::Rectangle& rControlRegion, ControlState nState, const ImplControlValue& aValue, const OUString& aCaption, const OutputDevice *pOutDev ) { if( (m_nLayout & SalLayoutFlags::BiDiRtl) || (pOutDev && pOutDev->IsRTLEnabled()) ) { - Rectangle rgn( rControlRegion ); - Rectangle aNull; + tools::Rectangle rgn( rControlRegion ); + tools::Rectangle aNull; if (rgn != aNull) mirror(rgn, pOutDev); std::unique_ptr< ImplControlValue > mirrorValue( aValue.clone()); @@ -709,13 +709,13 @@ bool SalGraphics::DrawNativeControl( ControlType nType, ControlPart nPart, const return drawNativeControl( nType, nPart, rControlRegion, nState, aValue, aCaption ); } -bool SalGraphics::GetNativeControlRegion( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion, ControlState nState, +bool SalGraphics::GetNativeControlRegion( ControlType nType, ControlPart nPart, const tools::Rectangle& rControlRegion, ControlState nState, const ImplControlValue& aValue, const OUString& aCaption, - Rectangle &rNativeBoundingRegion, Rectangle &rNativeContentRegion, const OutputDevice *pOutDev ) + tools::Rectangle &rNativeBoundingRegion, tools::Rectangle &rNativeContentRegion, const OutputDevice *pOutDev ) { if( (m_nLayout & SalLayoutFlags::BiDiRtl) || (pOutDev && pOutDev->IsRTLEnabled()) ) { - Rectangle rgn( rControlRegion ); + tools::Rectangle rgn( rControlRegion ); mirror( rgn, pOutDev ); std::unique_ptr< ImplControlValue > mirrorValue( aValue.clone()); mirror( *mirrorValue, pOutDev ); diff --git a/vcl/source/gdi/sallayout.cxx b/vcl/source/gdi/sallayout.cxx index 85ed62226ee4..764ad4ce75e1 100644 --- a/vcl/source/gdi/sallayout.cxx +++ b/vcl/source/gdi/sallayout.cxx @@ -693,12 +693,12 @@ bool SalLayout::GetOutline( SalGraphics& rSalGraphics, return (bAllOk && bOneOk); } -bool SalLayout::GetBoundRect( SalGraphics& rSalGraphics, Rectangle& rRect ) const +bool SalLayout::GetBoundRect( SalGraphics& rSalGraphics, tools::Rectangle& rRect ) const { bool bRet = false; rRect.SetEmpty(); - Rectangle aRectangle; + tools::Rectangle aRectangle; Point aPos; const GlyphItem* pGlyph; diff --git a/vcl/source/gdi/salnativewidgets-none.cxx b/vcl/source/gdi/salnativewidgets-none.cxx index afe6c2e6dab9..6de0ace197c7 100644 --- a/vcl/source/gdi/salnativewidgets-none.cxx +++ b/vcl/source/gdi/salnativewidgets-none.cxx @@ -29,22 +29,22 @@ bool SalGraphics::IsNativeControlSupported( ControlType, ControlPart ) } bool SalGraphics::hitTestNativeControl( ControlType, ControlPart, - const Rectangle&, const Point&, bool& ) + const tools::Rectangle&, const Point&, bool& ) { return false; } bool SalGraphics::drawNativeControl( ControlType, ControlPart, - const Rectangle&, ControlState, + const tools::Rectangle&, ControlState, const ImplControlValue&, const OUString& ) { return false; } bool SalGraphics::getNativeControlRegion( ControlType, ControlPart, - const Rectangle&, ControlState, + const tools::Rectangle&, ControlState, const ImplControlValue&, - const OUString&, Rectangle&, Rectangle& ) + const OUString&, tools::Rectangle&, tools::Rectangle& ) { return false; } diff --git a/vcl/source/gdi/svmconverter.cxx b/vcl/source/gdi/svmconverter.cxx index cb0f87ac387e..08428e876fc2 100644 --- a/vcl/source/gdi/svmconverter.cxx +++ b/vcl/source/gdi/svmconverter.cxx @@ -36,7 +36,7 @@ #include <o3tl/make_unique.hxx> // Inlines -void ImplReadRect( SvStream& rIStm, Rectangle& rRect ) +void ImplReadRect( SvStream& rIStm, tools::Rectangle& rRect ) { Point aTL; Point aBR; @@ -44,10 +44,10 @@ void ImplReadRect( SvStream& rIStm, Rectangle& rRect ) ReadPair( rIStm, aTL ); ReadPair( rIStm, aBR ); - rRect = Rectangle( aTL, aBR ); + rRect = tools::Rectangle( aTL, aBR ); } -void ImplWriteRect( SvStream& rOStm, const Rectangle& rRect ) +void ImplWriteRect( SvStream& rOStm, const tools::Rectangle& rRect ) { WritePair( rOStm, rRect.TopLeft() ); WritePair( rOStm, rRect.BottomRight() ); @@ -550,7 +550,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf ) bool bFatLine = false; tools::Polygon aActionPoly; - Rectangle aRect; + tools::Rectangle aRect; Point aPt, aPt1; Size aSz; Color aActionColor; @@ -1149,7 +1149,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf ) case 1: { - Rectangle aRegRect; + tools::Rectangle aRegRect; ImplReadRect( rIStm, aRegRect ); aRegion = vcl::Region( aRegRect ); @@ -2079,7 +2079,7 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf, { const MetaClipRegionAction* pAct = static_cast<const MetaClipRegionAction*>(pAction); const vcl::Region& rRegion = pAct->GetRegion(); - Rectangle aClipRect; + tools::Rectangle aClipRect; rOStm.WriteInt16( GDI_CLIPREGION_ACTION ); rOStm.WriteInt32( 24 ); diff --git a/vcl/source/gdi/textlayout.cxx b/vcl/source/gdi/textlayout.cxx index e41887d24e01..5c0d0efa9595 100644 --- a/vcl/source/gdi/textlayout.cxx +++ b/vcl/source/gdi/textlayout.cxx @@ -84,8 +84,8 @@ namespace vcl public: // equivalents to the respective OutputDevice methods, which take the reference device into account - Rectangle DrawText( const Rectangle& _rRect, const OUString& _rText, DrawTextFlags _nStyle, MetricVector* _pVector, OUString* _pDisplayText, const Size* i_pDeviceSize ); - Rectangle GetTextRect( const Rectangle& _rRect, const OUString& _rText, DrawTextFlags _nStyle, Size* o_pDeviceSize ); + tools::Rectangle DrawText( const tools::Rectangle& _rRect, const OUString& _rText, DrawTextFlags _nStyle, MetricVector* _pVector, OUString* _pDisplayText, const Size* i_pDeviceSize ); + tools::Rectangle GetTextRect( const tools::Rectangle& _rRect, const OUString& _rText, DrawTextFlags _nStyle, Size* o_pDeviceSize ); private: long GetTextArray( const OUString& _rText, long* _pDXAry, sal_Int32 _nStartIndex, sal_Int32 _nLength ) const; @@ -96,7 +96,7 @@ namespace vcl const Fraction m_aZoom; const bool m_bRTLEnabled; - Rectangle m_aCompleteTextRect; + tools::Rectangle m_aCompleteTextRect; }; ReferenceDeviceTextLayout::ReferenceDeviceTextLayout( const Control& _rControl, OutputDevice& _rTargetDevice, @@ -218,7 +218,7 @@ namespace vcl m_rTargetDevice.DrawTextArray( _rStartPoint, _rText, pCharWidths.get(), _nStartIndex, _nLength ); pCharWidths.reset(); - m_aCompleteTextRect.Union( Rectangle( _rStartPoint, Size( nTextWidth, m_rTargetDevice.GetTextHeight() ) ) ); + m_aCompleteTextRect.Union( tools::Rectangle( _rStartPoint, Size( nTextWidth, m_rTargetDevice.GetTextHeight() ) ) ); } void ReferenceDeviceTextLayout::GetCaretPositions( const OUString& _rText, long* _pCaretXArray, @@ -244,11 +244,11 @@ namespace vcl return true; } - Rectangle ReferenceDeviceTextLayout::DrawText( const Rectangle& _rRect, const OUString& _rText, DrawTextFlags _nStyle, + tools::Rectangle ReferenceDeviceTextLayout::DrawText( const tools::Rectangle& _rRect, const OUString& _rText, DrawTextFlags _nStyle, MetricVector* _pVector, OUString* _pDisplayText, const Size* i_pDeviceSize ) { if ( _rText.isEmpty() ) - return Rectangle(); + return tools::Rectangle(); // determine text layout mode from the RTL-ness of the control whose text we render ComplexTextLayoutFlags nTextLayoutMode = m_bRTLEnabled ? ComplexTextLayoutFlags::BiDiRtl : ComplexTextLayoutFlags::Default; @@ -259,7 +259,7 @@ namespace vcl // our caller gives us the left border of the draw position, regardless of script type, text layout, // and the like in our ctor, we set the map mode of the target device from pixel to twip, but our caller doesn't know this, // but passed pixel coordinates. So, adjust the rect. - Rectangle aRect( m_rTargetDevice.PixelToLogic( _rRect ) ); + tools::Rectangle aRect( m_rTargetDevice.PixelToLogic( _rRect ) ); if (i_pDeviceSize) { //if i_pDeviceSize is passed in here, it was the original pre logic-to-pixel size of _rRect @@ -270,7 +270,7 @@ namespace vcl m_aCompleteTextRect.SetEmpty(); m_rTargetDevice.DrawText( aRect, _rText, _nStyle, _pVector, _pDisplayText, this ); - Rectangle aTextRect = m_aCompleteTextRect; + tools::Rectangle aTextRect = m_aCompleteTextRect; if ( aTextRect.IsEmpty() && !aRect.IsEmpty() ) { @@ -302,10 +302,10 @@ namespace vcl return aTextRect; } - Rectangle ReferenceDeviceTextLayout::GetTextRect( const Rectangle& _rRect, const OUString& _rText, DrawTextFlags _nStyle, Size* o_pDeviceSize ) + tools::Rectangle ReferenceDeviceTextLayout::GetTextRect( const tools::Rectangle& _rRect, const OUString& _rText, DrawTextFlags _nStyle, Size* o_pDeviceSize ) { if ( _rText.isEmpty() ) - return Rectangle(); + return tools::Rectangle(); // determine text layout mode from the RTL-ness of the control whose text we render ComplexTextLayoutFlags nTextLayoutMode = m_bRTLEnabled ? ComplexTextLayoutFlags::BiDiRtl : ComplexTextLayoutFlags::Default; @@ -316,9 +316,9 @@ namespace vcl // our caller gives us the left border of the draw position, regardless of script type, text layout, // and the like in our ctor, we set the map mode of the target device from pixel to twip, but our caller doesn't know this, // but passed pixel coordinates. So, adjust the rect. - Rectangle aRect( m_rTargetDevice.PixelToLogic( _rRect ) ); + tools::Rectangle aRect( m_rTargetDevice.PixelToLogic( _rRect ) ); - Rectangle aTextRect = m_rTargetDevice.GetTextRect( aRect, _rText, _nStyle, nullptr, this ); + tools::Rectangle aTextRect = m_rTargetDevice.GetTextRect( aRect, _rText, _nStyle, nullptr, this ); //if o_pDeviceSize is available, stash the pre logic-to-pixel size in it if (o_pDeviceSize) @@ -342,13 +342,13 @@ namespace vcl { } - Rectangle ControlTextRenderer::DrawText( const Rectangle& _rRect, const OUString& _rText, DrawTextFlags _nStyle, + tools::Rectangle ControlTextRenderer::DrawText( const tools::Rectangle& _rRect, const OUString& _rText, DrawTextFlags _nStyle, MetricVector* _pVector, OUString* _pDisplayText, const Size* i_pDeviceSize ) { return m_pImpl->DrawText( _rRect, _rText, _nStyle, _pVector, _pDisplayText, i_pDeviceSize ); } - Rectangle ControlTextRenderer::GetTextRect( const Rectangle& _rRect, const OUString& _rText, DrawTextFlags _nStyle, Size* o_pDeviceSize = nullptr ) + tools::Rectangle ControlTextRenderer::GetTextRect( const tools::Rectangle& _rRect, const OUString& _rText, DrawTextFlags _nStyle, Size* o_pDeviceSize = nullptr ) { return m_pImpl->GetTextRect( _rRect, _rText, _nStyle, o_pDeviceSize ); } diff --git a/vcl/source/gdi/virdev.cxx b/vcl/source/gdi/virdev.cxx index 06560be47f08..52bb9f566873 100644 --- a/vcl/source/gdi/virdev.cxx +++ b/vcl/source/gdi/virdev.cxx @@ -377,7 +377,7 @@ bool VirtualDevice::InnerImplSetOutputSizePixel( const Size& rNewSize, bool bEra // #i32109#: Fill opaque areas correctly (without relying on // fill/linecolor state) -void VirtualDevice::ImplFillOpaqueRectangle( const Rectangle& rRect ) +void VirtualDevice::ImplFillOpaqueRectangle( const tools::Rectangle& rRect ) { // Set line and fill color to black (->opaque), // fill rect with that (linecolor, too, because of diff --git a/vcl/source/gdi/wall.cxx b/vcl/source/gdi/wall.cxx index b3f6fa2fa0b0..1e9ecd37dd2c 100644 --- a/vcl/source/gdi/wall.cxx +++ b/vcl/source/gdi/wall.cxx @@ -47,7 +47,7 @@ ImplWallpaper::ImplWallpaper( const ImplWallpaper& rImplWallpaper ) : mpGradient = o3tl::make_unique<Gradient>( *rImplWallpaper.mpGradient ); if ( rImplWallpaper.mpRect ) - mpRect = o3tl::make_unique<Rectangle>( *rImplWallpaper.mpRect ); + mpRect = o3tl::make_unique<tools::Rectangle>( *rImplWallpaper.mpRect ); } @@ -77,7 +77,7 @@ SvStream& ReadImplWallpaper( SvStream& rIStm, ImplWallpaper& rImplWallpaper ) if( bRect ) { - rImplWallpaper.mpRect = o3tl::make_unique<Rectangle>(); + rImplWallpaper.mpRect = o3tl::make_unique<tools::Rectangle>(); ReadRectangle( rIStm, *rImplWallpaper.mpRect ); } @@ -300,7 +300,7 @@ Gradient Wallpaper::ImplGetApplicationGradient() return g; } -void Wallpaper::SetRect( const Rectangle& rRect ) +void Wallpaper::SetRect( const tools::Rectangle& rRect ) { if ( rRect.IsEmpty() ) { @@ -311,16 +311,16 @@ void Wallpaper::SetRect( const Rectangle& rRect ) if ( mpImplWallpaper->mpRect ) *(mpImplWallpaper->mpRect) = rRect; else - mpImplWallpaper->mpRect = o3tl::make_unique<Rectangle>( rRect ); + mpImplWallpaper->mpRect = o3tl::make_unique<tools::Rectangle>( rRect ); } } -Rectangle Wallpaper::GetRect() const +tools::Rectangle Wallpaper::GetRect() const { if ( mpImplWallpaper->mpRect ) return *(mpImplWallpaper->mpRect); else - return Rectangle(); + return tools::Rectangle(); } bool Wallpaper::IsRect() const diff --git a/vcl/source/helper/canvasbitmap.cxx b/vcl/source/helper/canvasbitmap.cxx index 0bef43295f86..05d99ecb1238 100644 --- a/vcl/source/helper/canvasbitmap.cxx +++ b/vcl/source/helper/canvasbitmap.cxx @@ -448,7 +448,7 @@ uno::Sequence< sal_Int8 > SAL_CALL VclCanvasBitmap::getData( rendering::IntegerB bitmapLayout = getMemoryLayout(); - const ::Rectangle aRequestedArea( vcl::unotools::rectangleFromIntegerRectangle2D(rect) ); + const ::tools::Rectangle aRequestedArea( vcl::unotools::rectangleFromIntegerRectangle2D(rect) ); if( aRequestedArea.IsEmpty() ) return uno::Sequence< sal_Int8 >(); @@ -466,7 +466,7 @@ uno::Sequence< sal_Int8 > SAL_CALL VclCanvasBitmap::getData( rendering::IntegerB } uno::Sequence< sal_Int8 > aRet; - Rectangle aRequestedBytes( aRequestedArea ); + tools::Rectangle aRequestedBytes( aRequestedArea ); // adapt to byte boundaries aRequestedBytes.Left() = aRequestedArea.Left()*m_nBitsPerOutputPixel/8; diff --git a/vcl/source/helper/canvastools.cxx b/vcl/source/helper/canvastools.cxx index a986f6a5e1cb..2f7e8d60635e 100644 --- a/vcl/source/helper/canvastools.cxx +++ b/vcl/source/helper/canvastools.cxx @@ -348,7 +348,7 @@ namespace vcl return pointFromB2IPoint(basegfx::fround(rPoint)); } - ::Rectangle rectangleFromB2DRectangle( const basegfx::B2DRange& rRect ) + ::tools::Rectangle rectangleFromB2DRectangle( const basegfx::B2DRange& rRect ) { return rectangleFromB2IRectangle(basegfx::fround(rRect)); } @@ -364,15 +364,15 @@ namespace vcl return basegfx::B2IPoint(rPoint.X(), rPoint.Y()); } - Rectangle rectangleFromB2IRectangle( const basegfx::B2IRange& rRect ) + tools::Rectangle rectangleFromB2IRectangle( const basegfx::B2IRange& rRect ) { - return ::Rectangle( rRect.getMinX(), + return ::tools::Rectangle( rRect.getMinX(), rRect.getMinY(), rRect.getMaxX(), rRect.getMaxY() ); } - basegfx::B2IRectangle b2IRectangleFromRectangle(Rectangle const& rRect) + basegfx::B2IRectangle b2IRectangleFromRectangle(tools::Rectangle const& rRect) { return basegfx::B2IRectangle(rRect.Left(), rRect.Top(), rRect.Right(), rRect.Bottom()); @@ -390,7 +390,7 @@ namespace vcl rPoint.Y() ); } - basegfx::B2DRange b2DRectangleFromRectangle( const ::Rectangle& rRect ) + basegfx::B2DRange b2DRectangleFromRectangle( const ::tools::Rectangle& rRect ) { return basegfx::B2DRange( rRect.Left(), rRect.Top(), @@ -416,9 +416,9 @@ namespace vcl rPoint.Y ); } - Rectangle rectangleFromIntegerRectangle2D( const geometry::IntegerRectangle2D& rRectangle ) + tools::Rectangle rectangleFromIntegerRectangle2D( const geometry::IntegerRectangle2D& rRectangle ) { - return Rectangle( rRectangle.X1, rRectangle.Y1, + return tools::Rectangle( rRectangle.X1, rRectangle.Y1, rRectangle.X2, rRectangle.Y2 ); } diff --git a/vcl/source/opengl/OpenGLContext.cxx b/vcl/source/opengl/OpenGLContext.cxx index d031f9c01848..72e7f3cbc32d 100644 --- a/vcl/source/opengl/OpenGLContext.cxx +++ b/vcl/source/opengl/OpenGLContext.cxx @@ -694,7 +694,7 @@ OpenGLFramebuffer* OpenGLContext::AcquireFramebuffer( const OpenGLTexture& rText BindFramebuffer( pFramebuffer ); pFramebuffer->AttachTexture( rTexture ); - state().viewport(Rectangle(Point(), Size(rTexture.GetWidth(), rTexture.GetHeight()))); + state().viewport(tools::Rectangle(Point(), Size(rTexture.GetWidth(), rTexture.GetHeight()))); return pFramebuffer; } diff --git a/vcl/source/outdev/bitmap.cxx b/vcl/source/outdev/bitmap.cxx index 8593a3f3f7ca..4ae3c84d37ce 100644 --- a/vcl/source/outdev/bitmap.cxx +++ b/vcl/source/outdev/bitmap.cxx @@ -71,7 +71,7 @@ void OutputDevice::DrawBitmap( const Point& rDestPt, const Size& rDestSize, } if ( RasterOp::Invert == meRasterOp ) { - DrawRect( Rectangle( rDestPt, rDestSize ) ); + DrawRect( tools::Rectangle( rDestPt, rDestSize ) ); return; } @@ -93,7 +93,7 @@ void OutputDevice::DrawBitmap( const Point& rDestPt, const Size& rDestSize, Push( PushFlags::LINECOLOR | PushFlags::FILLCOLOR ); SetLineColor( aCol ); SetFillColor( aCol ); - DrawRect( Rectangle( rDestPt, rDestSize ) ); + DrawRect( tools::Rectangle( rDestPt, rDestSize ) ); Pop(); return; } @@ -168,7 +168,7 @@ void OutputDevice::DrawBitmap( const Point& rDestPt, const Size& rDestSize, if( mpAlphaVDev ) { // #i32109#: Make bitmap area opaque - mpAlphaVDev->ImplFillOpaqueRectangle( Rectangle(rDestPt, rDestSize) ); + mpAlphaVDev->ImplFillOpaqueRectangle( tools::Rectangle(rDestPt, rDestSize) ); } } @@ -181,8 +181,8 @@ Bitmap OutputDevice::GetDownsampledBitmap( const Size& rDstSz, if( !aBmp.IsEmpty() ) { Point aPoint; - const Rectangle aBmpRect( aPoint, aBmp.GetSizePixel() ); - Rectangle aSrcRect( rSrcPt, rSrcSz ); + const tools::Rectangle aBmpRect( aPoint, aBmp.GetSizePixel() ); + tools::Rectangle aSrcRect( rSrcPt, rSrcSz ); // do cropping if necessary if( aSrcRect.Intersection( aBmpRect ) != aBmpRect ) @@ -297,7 +297,7 @@ void OutputDevice::DrawBitmapEx( const Point& rDestPt, const Size& rDestSize, if ( RasterOp::Invert == meRasterOp ) { - DrawRect( Rectangle( rDestPt, rDestSize ) ); + DrawRect( tools::Rectangle( rDestPt, rDestSize ) ); return; } @@ -394,7 +394,7 @@ Bitmap OutputDevice::GetBitmap( const Point& rSrcPt, const Size& rSize ) const { if ( nWidth > 0 && nHeight > 0 && nX <= (mnOutWidth + mnOutOffX) && nY <= (mnOutHeight + mnOutOffY)) { - Rectangle aRect( Point( nX, nY ), Size( nWidth, nHeight ) ); + tools::Rectangle aRect( Point( nX, nY ), Size( nWidth, nHeight ) ); bool bClipped = false; // X-Coordinate outside of draw area? @@ -552,7 +552,7 @@ void OutputDevice::DrawDeviceBitmap( const Point& rDestPt, const Size& rDestSize // Note the call to ImplPixelToDevicePixel(), since // aPosAry already contains the mnOutOff-offsets, they // also have to be applied to the region - Rectangle aClipRegionBounds( ImplPixelToDevicePixel(maRegion).GetBoundRect() ); + tools::Rectangle aClipRegionBounds( ImplPixelToDevicePixel(maRegion).GetBoundRect() ); // TODO: Also respect scaling (that's a bit tricky, // since the source points have to move fractional @@ -567,7 +567,7 @@ void OutputDevice::DrawDeviceBitmap( const Point& rDestPt, const Size& rDestSize aPosAry.mnDestHeight == aPosAry.mnSrcHeight) { // now intersect dest rect with clip region - aClipRegionBounds.Intersection(Rectangle(aPosAry.mnDestX, + aClipRegionBounds.Intersection(tools::Rectangle(aPosAry.mnDestX, aPosAry.mnDestY, aPosAry.mnDestX + aPosAry.mnDestWidth - 1, aPosAry.mnDestY + aPosAry.mnDestHeight - 1)); @@ -617,7 +617,7 @@ void OutputDevice::DrawDeviceBitmap( const Point& rDestPt, const Size& rDestSize if (mpAlphaVDev) { // #i32109#: Make bitmap area opaque - mpAlphaVDev->ImplFillOpaqueRectangle( Rectangle(rDestPt, rDestSize) ); + mpAlphaVDev->ImplFillOpaqueRectangle( tools::Rectangle(rDestPt, rDestSize) ); } } } @@ -632,7 +632,7 @@ void OutputDevice::DrawDeviceAlphaBitmap( const Bitmap& rBmp, const AlphaMask& r Point aOutPt(LogicToPixel(rDestPt)); Size aOutSz(LogicToPixel(rDestSize)); - Rectangle aDstRect(Point(), GetOutputSizePixel()); + tools::Rectangle aDstRect(Point(), GetOutputSizePixel()); const bool bHMirr = aOutSz.Width() < 0; const bool bVMirr = aOutSz.Height() < 0; @@ -651,7 +651,7 @@ void OutputDevice::DrawDeviceAlphaBitmap( const Bitmap& rBmp, const AlphaMask& r aOutPt.Y() -= aOutSz.Height() - 1L; } - if (!aDstRect.Intersection(Rectangle(aOutPt, aOutSz)).IsEmpty()) + if (!aDstRect.Intersection(tools::Rectangle(aOutPt, aOutSz)).IsEmpty()) { static const char* pDisableNative = getenv( "SAL_DISABLE_NATIVE_ALPHA"); // #i83087# Naturally, system alpha blending cannot work with @@ -696,8 +696,8 @@ void OutputDevice::DrawDeviceAlphaBitmap( const Bitmap& rBmp, const AlphaMask& r #if HAVE_FEATURE_OPENGL assert(!OpenGLHelper::isVCLOpenGLEnabled()); #endif - Rectangle aBmpRect(Point(), rBmp.GetSizePixel()); - if (!aBmpRect.Intersection(Rectangle(rSrcPtPixel, rSrcSizePixel)).IsEmpty()) + tools::Rectangle aBmpRect(Point(), rBmp.GetSizePixel()); + if (!aBmpRect.Intersection(tools::Rectangle(rSrcPtPixel, rSrcSizePixel)).IsEmpty()) { Point auxOutPt(LogicToPixel(rDestPt)); Size auxOutSz(LogicToPixel(rDestSize)); @@ -718,7 +718,7 @@ struct LinearScaleContext std::unique_ptr<long[]> mpMapXOffset; std::unique_ptr<long[]> mpMapYOffset; - LinearScaleContext(Rectangle& aDstRect, Rectangle& aBitmapRect, + LinearScaleContext(tools::Rectangle& aDstRect, tools::Rectangle& aBitmapRect, Size& aOutSize, long nOffX, long nOffY) : mpMapX(new long[aDstRect.GetWidth()]) @@ -882,7 +882,7 @@ struct TradScaleContext std::unique_ptr<long[]> mpMapX; std::unique_ptr<long[]> mpMapY; - TradScaleContext(Rectangle& aDstRect, Rectangle& aBitmapRect, + TradScaleContext(tools::Rectangle& aDstRect, tools::Rectangle& aBitmapRect, Size& aOutSize, long nOffX, long nOffY) : mpMapX(new long[aDstRect.GetWidth()]) @@ -925,7 +925,7 @@ private: } // end anonymous namespace -void OutputDevice::DrawDeviceAlphaBitmapSlowPath(const Bitmap& rBitmap, const AlphaMask& rAlpha, Rectangle aDstRect, Rectangle aBmpRect, Size& aOutSize, Point& aOutPoint) +void OutputDevice::DrawDeviceAlphaBitmapSlowPath(const Bitmap& rBitmap, const AlphaMask& rAlpha, tools::Rectangle aDstRect, tools::Rectangle aBmpRect, Size& aOutSize, Point& aOutPoint) { assert(!is_double_buffered_window()); @@ -1107,7 +1107,7 @@ bool OutputDevice::TransformAndReduceBitmapExToTargetRange( if(IsClipRegion()) { - const Rectangle aRegionRectangle(GetActiveClipRegion().GetBoundRect()); + const tools::Rectangle aRegionRectangle(GetActiveClipRegion().GetBoundRect()); aOutPixel.intersect( // caution! Range from rectangle, one too much (!) basegfx::B2DRange( @@ -1389,7 +1389,7 @@ Bitmap OutputDevice::BlendBitmapWithAlpha( Bitmap& aBmp, BitmapReadAccess* pP, BitmapReadAccess* pA, - const Rectangle& aDstRect, + const tools::Rectangle& aDstRect, const sal_Int32 nOffY, const sal_Int32 nDstHeight, const sal_Int32 nOffX, @@ -1489,7 +1489,7 @@ Bitmap OutputDevice::BlendBitmap( const sal_Int32 nDstHeight, const sal_Int32 nOffX, const sal_Int32 nDstWidth, - const Rectangle& aBmpRect, + const tools::Rectangle& aBmpRect, const Size& aOutSz, const bool bHMirr, const bool bVMirr, diff --git a/vcl/source/outdev/clipping.cxx b/vcl/source/outdev/clipping.cxx index 9396f262362b..5b6d71d4a3f1 100644 --- a/vcl/source/outdev/clipping.cxx +++ b/vcl/source/outdev/clipping.cxx @@ -103,13 +103,13 @@ void OutputDevice::MoveClipRegion( long nHorzMove, long nVertMove ) mpAlphaVDev->MoveClipRegion( nHorzMove, nVertMove ); } -void OutputDevice::IntersectClipRegion( const Rectangle& rRect ) +void OutputDevice::IntersectClipRegion( const tools::Rectangle& rRect ) { if ( mpMetaFile ) mpMetaFile->AddAction( new MetaISectRectClipRegionAction( rRect ) ); - Rectangle aRect = LogicToPixel( rRect ); + tools::Rectangle aRect = LogicToPixel( rRect ); maRegion.Intersect( aRect ); mbClipRegion = true; mbInitClipRegion = true; @@ -157,7 +157,7 @@ void OutputDevice::InitClipRegion() // Perform actual rect clip against outdev // dimensions, to generate empty clips whenever one of the // values is completely off the device. - Rectangle aDeviceBounds( mnOutOffX, mnOutOffY, + tools::Rectangle aDeviceBounds( mnOutOffX, mnOutOffY, mnOutOffX+GetOutputWidthPixel()-1, mnOutOffY+GetOutputHeightPixel()-1 ); aRegion.Intersect( aDeviceBounds ); @@ -195,7 +195,7 @@ vcl::Region OutputDevice::GetActiveClipRegion() const return GetClipRegion(); } -void OutputDevice::ClipToPaintRegion(Rectangle& /*rDstRect*/) +void OutputDevice::ClipToPaintRegion(tools::Rectangle& /*rDstRect*/) { // this is only used in Window, but we still need it as it's called // on in other clipping functions diff --git a/vcl/source/outdev/curvedshapes.cxx b/vcl/source/outdev/curvedshapes.cxx index 3c931c87f2f5..675543f04197 100644 --- a/vcl/source/outdev/curvedshapes.cxx +++ b/vcl/source/outdev/curvedshapes.cxx @@ -25,7 +25,7 @@ #include <salgdi.hxx> -void OutputDevice::DrawEllipse( const Rectangle& rRect ) +void OutputDevice::DrawEllipse( const tools::Rectangle& rRect ) { assert(!is_double_buffered_window()); @@ -35,7 +35,7 @@ void OutputDevice::DrawEllipse( const Rectangle& rRect ) if ( !IsDeviceOutputNecessary() || (!mbLineColor && !mbFillColor) || ImplIsRecordLayout() ) return; - Rectangle aRect( ImplLogicToDevicePixel( rRect ) ); + tools::Rectangle aRect( ImplLogicToDevicePixel( rRect ) ); if ( aRect.IsEmpty() ) return; @@ -72,7 +72,7 @@ void OutputDevice::DrawEllipse( const Rectangle& rRect ) mpAlphaVDev->DrawEllipse( rRect ); } -void OutputDevice::DrawArc( const Rectangle& rRect, +void OutputDevice::DrawArc( const tools::Rectangle& rRect, const Point& rStartPt, const Point& rEndPt ) { assert(!is_double_buffered_window()); @@ -83,7 +83,7 @@ void OutputDevice::DrawArc( const Rectangle& rRect, if ( !IsDeviceOutputNecessary() || !mbLineColor || ImplIsRecordLayout() ) return; - Rectangle aRect( ImplLogicToDevicePixel( rRect ) ); + tools::Rectangle aRect( ImplLogicToDevicePixel( rRect ) ); if ( aRect.IsEmpty() ) return; @@ -116,7 +116,7 @@ void OutputDevice::DrawArc( const Rectangle& rRect, mpAlphaVDev->DrawArc( rRect, rStartPt, rEndPt ); } -void OutputDevice::DrawPie( const Rectangle& rRect, +void OutputDevice::DrawPie( const tools::Rectangle& rRect, const Point& rStartPt, const Point& rEndPt ) { assert(!is_double_buffered_window()); @@ -127,7 +127,7 @@ void OutputDevice::DrawPie( const Rectangle& rRect, if ( !IsDeviceOutputNecessary() || (!mbLineColor && !mbFillColor) || ImplIsRecordLayout() ) return; - Rectangle aRect( ImplLogicToDevicePixel( rRect ) ); + tools::Rectangle aRect( ImplLogicToDevicePixel( rRect ) ); if ( aRect.IsEmpty() ) return; @@ -167,7 +167,7 @@ void OutputDevice::DrawPie( const Rectangle& rRect, mpAlphaVDev->DrawPie( rRect, rStartPt, rEndPt ); } -void OutputDevice::DrawChord( const Rectangle& rRect, +void OutputDevice::DrawChord( const tools::Rectangle& rRect, const Point& rStartPt, const Point& rEndPt ) { assert(!is_double_buffered_window()); @@ -178,7 +178,7 @@ void OutputDevice::DrawChord( const Rectangle& rRect, if ( !IsDeviceOutputNecessary() || (!mbLineColor && !mbFillColor) || ImplIsRecordLayout() ) return; - Rectangle aRect( ImplLogicToDevicePixel( rRect ) ); + tools::Rectangle aRect( ImplLogicToDevicePixel( rRect ) ); if ( aRect.IsEmpty() ) return; diff --git a/vcl/source/outdev/font.cxx b/vcl/source/outdev/font.cxx index a28fba0c0220..554bec061e50 100644 --- a/vcl/source/outdev/font.cxx +++ b/vcl/source/outdev/font.cxx @@ -287,7 +287,7 @@ SystemFontData OutputDevice::GetSysFontData(int nFallbacklevel) const #endif // ENABLE_CAIRO_CANVAS void OutputDevice::ImplGetEmphasisMark( tools::PolyPolygon& rPolyPoly, bool& rPolyLine, - Rectangle& rRect1, Rectangle& rRect2, + tools::Rectangle& rRect1, tools::Rectangle& rRect2, long& rYOff, long& rWidth, FontEmphasisMark eEmphasis, long nHeight, short /*nOrient*/ ) @@ -349,7 +349,7 @@ void OutputDevice::ImplGetEmphasisMark( tools::PolyPolygon& rPolyPoly, bool& rPo if ( !nDotSize ) nDotSize = 1; if ( nDotSize <= 2 ) - rRect1 = Rectangle( Point(), Size( nDotSize, nDotSize ) ); + rRect1 = tools::Rectangle( Point(), Size( nDotSize, nDotSize ) ); else { long nRad = nDotSize/2; @@ -366,7 +366,7 @@ void OutputDevice::ImplGetEmphasisMark( tools::PolyPolygon& rPolyPoly, bool& rPo if ( !nDotSize ) nDotSize = 1; if ( nDotSize <= 2 ) - rRect1 = Rectangle( Point(), Size( nDotSize, nDotSize ) ); + rRect1 = tools::Rectangle( Point(), Size( nDotSize, nDotSize ) ); else { long nRad = nDotSize/2; @@ -392,7 +392,7 @@ void OutputDevice::ImplGetEmphasisMark( tools::PolyPolygon& rPolyPoly, bool& rPo if ( !nDotSize ) nDotSize = 1; if ( nDotSize <= 2 ) - rRect1 = Rectangle( Point(), Size( nDotSize, nDotSize ) ); + rRect1 = tools::Rectangle( Point(), Size( nDotSize, nDotSize ) ); else { long nRad = nDotSize/2; @@ -411,13 +411,13 @@ void OutputDevice::ImplGetEmphasisMark( tools::PolyPolygon& rPolyPoly, bool& rPo { if ( nDotSize == 1 ) { - rRect1 = Rectangle( Point(), Size( nDotSize, nDotSize ) ); + rRect1 = tools::Rectangle( Point(), Size( nDotSize, nDotSize ) ); rWidth = nDotSize; } else { - rRect1 = Rectangle( Point(), Size( 1, 1 ) ); - rRect2 = Rectangle( Point( 1, 1 ), Size( 1, 1 ) ); + rRect1 = tools::Rectangle( Point(), Size( 1, 1 ) ); + rRect2 = tools::Rectangle( Point( 1, 1 ), Size( 1, 1 ) ); } } else @@ -429,7 +429,7 @@ void OutputDevice::ImplGetEmphasisMark( tools::PolyPolygon& rPolyPoly, bool& rPo aPoly.Scale( dScale, dScale ); tools::Polygon aTemp; aPoly.AdaptiveSubdivide( aTemp ); - Rectangle aBoundRect = aTemp.GetBoundRect(); + tools::Rectangle aBoundRect = aTemp.GetBoundRect(); rWidth = aBoundRect.GetWidth(); nDotSize = aBoundRect.GetHeight(); rPolyPoly.Insert( aTemp ); @@ -1193,7 +1193,7 @@ void OutputDevice::SetFontOrientation( LogicalFontInstance* const pFontInstance void OutputDevice::ImplDrawEmphasisMark( long nBaseX, long nX, long nY, const tools::PolyPolygon& rPolyPoly, bool bPolyLine, - const Rectangle& rRect1, const Rectangle& rRect2 ) + const tools::Rectangle& rRect1, const tools::Rectangle& rRect2 ) { if( IsRTLEnabled() ) // --- RTL --- mirror at basex @@ -1220,14 +1220,14 @@ void OutputDevice::ImplDrawEmphasisMark( long nBaseX, long nX, long nY, if ( !rRect1.IsEmpty() ) { - Rectangle aRect( Point( nX+rRect1.Left(), + tools::Rectangle aRect( Point( nX+rRect1.Left(), nY+rRect1.Top() ), rRect1.GetSize() ); DrawRect( aRect ); } if ( !rRect2.IsEmpty() ) { - Rectangle aRect( Point( nX+rRect2.Left(), + tools::Rectangle aRect( Point( nX+rRect2.Left(), nY+rRect2.Top() ), rRect2.GetSize() ); DrawRect( aRect ); @@ -1245,8 +1245,8 @@ void OutputDevice::ImplDrawEmphasisMarks( SalLayout& rSalLayout ) FontEmphasisMark nEmphasisMark = ImplGetEmphasisMarkStyle( maFont ); tools::PolyPolygon aPolyPoly; - Rectangle aRect1; - Rectangle aRect2; + tools::Rectangle aRect1; + tools::Rectangle aRect2; long nEmphasisYOff; long nEmphasisWidth; long nEmphasisHeight; @@ -1286,7 +1286,7 @@ void OutputDevice::ImplDrawEmphasisMarks( SalLayout& rSalLayout ) aOffset += Point( nEmphasisWidth2, nEmphasisHeight2 ); Point aOutPoint; - Rectangle aRectangle; + tools::Rectangle aRectangle; const GlyphItem* pGlyph; int nStart = 0; while (rSalLayout.GetNextGlyphs(1, &pGlyph, aOutPoint, nStart)) @@ -1477,7 +1477,7 @@ bool OutputDevice::GetGlyphBoundRects( const Point& rOrigin, const OUString& rSt nLen = rStr.getLength() - nIndex; } - Rectangle aRect; + tools::Rectangle aRect; for( int i = 0; i < nLen; i++ ) { if( !GetTextBoundRect( aRect, rStr, nIndex, nIndex + i, 1 ) ) diff --git a/vcl/source/outdev/gradient.cxx b/vcl/source/outdev/gradient.cxx index 7c14e0a7b149..24e7e098f2e7 100644 --- a/vcl/source/outdev/gradient.cxx +++ b/vcl/source/outdev/gradient.cxx @@ -31,7 +31,7 @@ #define GRADIENT_DEFAULT_STEPCOUNT 0 -void OutputDevice::DrawGradient( const Rectangle& rRect, +void OutputDevice::DrawGradient( const tools::Rectangle& rRect, const Gradient& rGradient ) { assert(!is_double_buffered_window()); @@ -84,12 +84,12 @@ void OutputDevice::DrawGradient( const tools::PolyPolygon& rPolyPoly, return; // Clip and then draw the gradient - if( !Rectangle( PixelToLogic( Point() ), GetOutputSize() ).IsEmpty() ) + if( !tools::Rectangle( PixelToLogic( Point() ), GetOutputSize() ).IsEmpty() ) { - const Rectangle aBoundRect( rPolyPoly.GetBoundRect() ); + const tools::Rectangle aBoundRect( rPolyPoly.GetBoundRect() ); // convert rectangle to pixels - Rectangle aRect( ImplLogicToDevicePixel( aBoundRect ) ); + tools::Rectangle aRect( ImplLogicToDevicePixel( aBoundRect ) ); aRect.Justify(); // do nothing if the rectangle is empty @@ -155,7 +155,7 @@ void OutputDevice::DrawGradient( const tools::PolyPolygon& rPolyPoly, void OutputDevice::ClipAndDrawGradientMetafile ( const Gradient &rGradient, const tools::PolyPolygon &rPolyPoly ) { - const Rectangle aBoundRect( rPolyPoly.GetBoundRect() ); + const tools::Rectangle aBoundRect( rPolyPoly.GetBoundRect() ); const bool bOldOutput = IsOutputEnabled(); EnableOutput( false ); @@ -188,7 +188,7 @@ void OutputDevice::DrawGradientToMetafile ( const tools::PolyPolygon& rPolyPoly, SetGrayscaleColors( aGradient ); } - const Rectangle aBoundRect( rPolyPoly.GetBoundRect() ); + const tools::Rectangle aBoundRect( rPolyPoly.GetBoundRect() ); if ( rPolyPoly.IsRect() ) { @@ -208,10 +208,10 @@ void OutputDevice::DrawGradientToMetafile ( const tools::PolyPolygon& rPolyPoly, return; // Clip and then draw the gradient - if( !Rectangle( PixelToLogic( Point() ), GetOutputSize() ).IsEmpty() ) + if( !tools::Rectangle( PixelToLogic( Point() ), GetOutputSize() ).IsEmpty() ) { // convert rectangle to pixels - Rectangle aRect( ImplLogicToDevicePixel( aBoundRect ) ); + tools::Rectangle aRect( ImplLogicToDevicePixel( aBoundRect ) ); aRect.Justify(); // do nothing if the rectangle is empty @@ -258,14 +258,14 @@ namespace } } -void OutputDevice::DrawLinearGradient( const Rectangle& rRect, +void OutputDevice::DrawLinearGradient( const tools::Rectangle& rRect, const Gradient& rGradient, const tools::PolyPolygon* pClixPolyPoly ) { assert(!is_double_buffered_window()); // get BoundRect of rotated rectangle - Rectangle aRect; + tools::Rectangle aRect; Point aCenter; sal_uInt16 nAngle = rGradient.GetAngle() % 3600; @@ -277,7 +277,7 @@ void OutputDevice::DrawLinearGradient( const Rectangle& rRect, { fBorder /= 2.0; } - Rectangle aMirrorRect = aRect; // used in style axial + tools::Rectangle aMirrorRect = aRect; // used in style axial aMirrorRect.Top() = ( aRect.Top() + aRect.Bottom() ) / 2; if ( !bLinear ) { @@ -322,7 +322,7 @@ void OutputDevice::DrawLinearGradient( const Rectangle& rRect, sal_uInt8 nBlue; // Create border - Rectangle aBorderRect = aRect; + tools::Rectangle aBorderRect = aRect; tools::Polygon aPoly( 4 ); if (fBorder > 0.0) { @@ -446,7 +446,7 @@ bool OutputDevice::is_double_buffered_window() const return pWindow && pWindow->SupportsDoubleBuffering(); } -void OutputDevice::DrawComplexGradient( const Rectangle& rRect, +void OutputDevice::DrawComplexGradient( const tools::Rectangle& rRect, const Gradient& rGradient, const tools::PolyPolygon* pClixPolyPoly ) { @@ -459,7 +459,7 @@ void OutputDevice::DrawComplexGradient( const Rectangle& rRect, // can print polygons on top of each other. std::unique_ptr<tools::PolyPolygon> xPolyPoly; - Rectangle aRect; + tools::Rectangle aRect; Point aCenter; Color aStartCol( rGradient.GetStartColor() ); Color aEndCol( rGradient.GetEndColor() ); @@ -527,7 +527,7 @@ void OutputDevice::DrawComplexGradient( const Rectangle& rRect, else { // extend rect, to avoid missing bounding line - Rectangle aExtRect( rRect ); + tools::Rectangle aExtRect( rRect ); aExtRect.Left() -= 1; aExtRect.Top() -= 1; @@ -613,13 +613,13 @@ void OutputDevice::DrawComplexGradient( const Rectangle& rRect, } } -void OutputDevice::DrawLinearGradientToMetafile( const Rectangle& rRect, +void OutputDevice::DrawLinearGradientToMetafile( const tools::Rectangle& rRect, const Gradient& rGradient ) { assert(!is_double_buffered_window()); // get BoundRect of rotated rectangle - Rectangle aRect; + tools::Rectangle aRect; Point aCenter; sal_uInt16 nAngle = rGradient.GetAngle() % 3600; @@ -631,7 +631,7 @@ void OutputDevice::DrawLinearGradientToMetafile( const Rectangle& rRect, { fBorder /= 2.0; } - Rectangle aMirrorRect = aRect; // used in style axial + tools::Rectangle aMirrorRect = aRect; // used in style axial aMirrorRect.Top() = ( aRect.Top() + aRect.Bottom() ) / 2; if ( !bLinear ) { @@ -676,7 +676,7 @@ void OutputDevice::DrawLinearGradientToMetafile( const Rectangle& rRect, sal_uInt8 nBlue; // Create border - Rectangle aBorderRect = aRect; + tools::Rectangle aBorderRect = aRect; tools::Polygon aPoly( 4 ); if (fBorder > 0.0) { @@ -793,7 +793,7 @@ void OutputDevice::DrawLinearGradientToMetafile( const Rectangle& rRect, } } -void OutputDevice::DrawComplexGradientToMetafile( const Rectangle& rRect, +void OutputDevice::DrawComplexGradientToMetafile( const tools::Rectangle& rRect, const Gradient& rGradient ) { assert(!is_double_buffered_window()); @@ -805,7 +805,7 @@ void OutputDevice::DrawComplexGradientToMetafile( const Rectangle& rRect, // can print polygons on top of each other. std::unique_ptr<tools::PolyPolygon> xPolyPoly; - Rectangle aRect; + tools::Rectangle aRect; Point aCenter; Color aStartCol( rGradient.GetStartColor() ); Color aEndCol( rGradient.GetEndColor() ); @@ -934,7 +934,7 @@ long OutputDevice::GetGradientStepCount( long nMinRect ) return nInc; } -long OutputDevice::GetGradientSteps( const Gradient& rGradient, const Rectangle& rRect, bool bMtf, bool bComplex ) +long OutputDevice::GetGradientSteps( const Gradient& rGradient, const tools::Rectangle& rRect, bool bMtf, bool bComplex ) { // calculate step count long nStepCount = rGradient.GetSteps(); @@ -1013,11 +1013,11 @@ void OutputDevice::SetGrayscaleColors( Gradient &rGradient ) rGradient.SetEndColor( aEndCol ); } -void OutputDevice::AddGradientActions( const Rectangle& rRect, const Gradient& rGradient, +void OutputDevice::AddGradientActions( const tools::Rectangle& rRect, const Gradient& rGradient, GDIMetaFile& rMtf ) { - Rectangle aRect( rRect ); + tools::Rectangle aRect( rRect ); aRect.Justify(); diff --git a/vcl/source/outdev/hatch.cxx b/vcl/source/outdev/hatch.cxx index 39312eabea63..f0712911f637 100644 --- a/vcl/source/outdev/hatch.cxx +++ b/vcl/source/outdev/hatch.cxx @@ -166,7 +166,7 @@ void OutputDevice::DrawHatch( const tools::PolyPolygon& rPolyPoly, const Hatch& } else { - Rectangle aRect( rPolyPoly.GetBoundRect() ); + tools::Rectangle aRect( rPolyPoly.GetBoundRect() ); const long nLogPixelWidth = ImplDevicePixelToLogicWidth( 1 ); const long nWidth = ImplDevicePixelToLogicWidth( std::max( ImplLogicWidthToDevicePixel( rHatch.GetDistance() ), 3L ) ); std::unique_ptr<Point[]> pPtBuffer(new Point[ HATCH_MAXPOINTS ]); @@ -213,7 +213,7 @@ void OutputDevice::DrawHatch( const tools::PolyPolygon& rPolyPoly, const Hatch& } } -void OutputDevice::CalcHatchValues( const Rectangle& rRect, long nDist, sal_uInt16 nAngle10, +void OutputDevice::CalcHatchValues( const tools::Rectangle& rRect, long nDist, sal_uInt16 nAngle10, Point& rPt1, Point& rPt2, Size& rInc, Point& rEndPt1 ) { Point aRef; diff --git a/vcl/source/outdev/map.cxx b/vcl/source/outdev/map.cxx index 72d5f928d914..c2c65b341ece 100644 --- a/vcl/source/outdev/map.cxx +++ b/vcl/source/outdev/map.cxx @@ -511,18 +511,18 @@ Size OutputDevice::ImplLogicToDevicePixel( const Size& rLogicSize ) const maThresRes.mnThresLogToPixY ) ); } -Rectangle OutputDevice::ImplLogicToDevicePixel( const Rectangle& rLogicRect ) const +tools::Rectangle OutputDevice::ImplLogicToDevicePixel( const tools::Rectangle& rLogicRect ) const { if ( rLogicRect.IsEmpty() ) return rLogicRect; if ( !mbMap ) { - return Rectangle( rLogicRect.Left()+mnOutOffX, rLogicRect.Top()+mnOutOffY, + return tools::Rectangle( rLogicRect.Left()+mnOutOffX, rLogicRect.Top()+mnOutOffY, rLogicRect.Right()+mnOutOffX, rLogicRect.Bottom()+mnOutOffY ); } - return Rectangle( ImplLogicToPixel( rLogicRect.Left()+maMapRes.mnMapOfsX, mnDPIX, + return tools::Rectangle( ImplLogicToPixel( rLogicRect.Left()+maMapRes.mnMapOfsX, mnDPIX, maMapRes.mnMapScNumX, maMapRes.mnMapScDenomX, maThresRes.mnThresLogToPixX )+mnOutOffX+mnOutOffOrigX, ImplLogicToPixel( rLogicRect.Top()+maMapRes.mnMapOfsY, mnDPIY, @@ -619,18 +619,18 @@ LineInfo OutputDevice::ImplLogicToDevicePixel( const LineInfo& rLineInfo ) const return aInfo; } -Rectangle OutputDevice::ImplDevicePixelToLogic( const Rectangle& rPixelRect ) const +tools::Rectangle OutputDevice::ImplDevicePixelToLogic( const tools::Rectangle& rPixelRect ) const { if ( rPixelRect.IsEmpty() ) return rPixelRect; if ( !mbMap ) { - return Rectangle( rPixelRect.Left()-mnOutOffX, rPixelRect.Top()-mnOutOffY, + return tools::Rectangle( rPixelRect.Left()-mnOutOffX, rPixelRect.Top()-mnOutOffY, rPixelRect.Right()-mnOutOffX, rPixelRect.Bottom()-mnOutOffY ); } - return Rectangle( ImplPixelToLogic( rPixelRect.Left()-mnOutOffX-mnOutOffOrigX, mnDPIX, + return tools::Rectangle( ImplPixelToLogic( rPixelRect.Left()-mnOutOffX-mnOutOffOrigX, mnDPIX, maMapRes.mnMapScNumX, maMapRes.mnMapScDenomX, maThresRes.mnThresPixToLogX )-maMapRes.mnMapOfsX, ImplPixelToLogic( rPixelRect.Top()-mnOutOffY-mnOutOffOrigY, mnDPIY, @@ -985,13 +985,13 @@ Size OutputDevice::LogicToPixel( const Size& rLogicSize ) const maThresRes.mnThresLogToPixY ) ); } -Rectangle OutputDevice::LogicToPixel( const Rectangle& rLogicRect ) const +tools::Rectangle OutputDevice::LogicToPixel( const tools::Rectangle& rLogicRect ) const { if ( !mbMap || rLogicRect.IsEmpty() ) return rLogicRect; - return Rectangle( ImplLogicToPixel( rLogicRect.Left() + maMapRes.mnMapOfsX, mnDPIX, + return tools::Rectangle( ImplLogicToPixel( rLogicRect.Left() + maMapRes.mnMapOfsX, mnDPIX, maMapRes.mnMapScNumX, maMapRes.mnMapScDenomX, maThresRes.mnThresLogToPixX )+mnOutOffOrigX, ImplLogicToPixel( rLogicRect.Top() + maMapRes.mnMapOfsY, mnDPIY, @@ -1132,7 +1132,7 @@ Size OutputDevice::LogicToPixel( const Size& rLogicSize, aThresRes.mnThresLogToPixY ) ); } -Rectangle OutputDevice::LogicToPixel( const Rectangle& rLogicRect, +tools::Rectangle OutputDevice::LogicToPixel( const tools::Rectangle& rLogicRect, const MapMode& rMapMode ) const { @@ -1144,7 +1144,7 @@ Rectangle OutputDevice::LogicToPixel( const Rectangle& rLogicRect, ImplThresholdRes aThresRes; ImplCalcMapResolution( rMapMode, mnDPIX, mnDPIY, aMapRes, aThresRes ); - return Rectangle( ImplLogicToPixel( rLogicRect.Left() + aMapRes.mnMapOfsX, mnDPIX, + return tools::Rectangle( ImplLogicToPixel( rLogicRect.Left() + aMapRes.mnMapOfsX, mnDPIX, aMapRes.mnMapScNumX, aMapRes.mnMapScDenomX, aThresRes.mnThresLogToPixX )+mnOutOffOrigX, ImplLogicToPixel( rLogicRect.Top() + aMapRes.mnMapOfsY, mnDPIY, @@ -1230,13 +1230,13 @@ Size OutputDevice::PixelToLogic( const Size& rDeviceSize ) const maThresRes.mnThresPixToLogY ) ); } -Rectangle OutputDevice::PixelToLogic( const Rectangle& rDeviceRect ) const +tools::Rectangle OutputDevice::PixelToLogic( const tools::Rectangle& rDeviceRect ) const { if ( !mbMap || rDeviceRect.IsEmpty() ) return rDeviceRect; - return Rectangle( ImplPixelToLogic( rDeviceRect.Left(), mnDPIX, + return tools::Rectangle( ImplPixelToLogic( rDeviceRect.Left(), mnDPIX, maMapRes.mnMapScNumX, maMapRes.mnMapScDenomX, maThresRes.mnThresPixToLogX ) - maMapRes.mnMapOfsX - mnOutOffLogicX, ImplPixelToLogic( rDeviceRect.Top(), mnDPIY, @@ -1379,7 +1379,7 @@ Size OutputDevice::PixelToLogic( const Size& rDeviceSize, aThresRes.mnThresPixToLogY ) ); } -Rectangle OutputDevice::PixelToLogic( const Rectangle& rDeviceRect, +tools::Rectangle OutputDevice::PixelToLogic( const tools::Rectangle& rDeviceRect, const MapMode& rMapMode ) const { @@ -1392,7 +1392,7 @@ Rectangle OutputDevice::PixelToLogic( const Rectangle& rDeviceRect, ImplThresholdRes aThresRes; ImplCalcMapResolution( rMapMode, mnDPIX, mnDPIY, aMapRes, aThresRes ); - return Rectangle( ImplPixelToLogic( rDeviceRect.Left(), mnDPIX, + return tools::Rectangle( ImplPixelToLogic( rDeviceRect.Left(), mnDPIX, aMapRes.mnMapScNumX, aMapRes.mnMapScDenomX, aThresRes.mnThresPixToLogX ) - aMapRes.mnMapOfsX - mnOutOffLogicX, ImplPixelToLogic( rDeviceRect.Top(), mnDPIY, @@ -1735,13 +1735,13 @@ Size OutputDevice::LogicToLogic( const Size& rSzSource, aMapResSource.mnMapScDenomY, aMapResDest.mnMapScNumY ) ); } -Rectangle OutputDevice::LogicToLogic( const Rectangle& rRectSource, +tools::Rectangle OutputDevice::LogicToLogic( const tools::Rectangle& rRectSource, const MapMode* pMapModeSource, const MapMode* pMapModeDest ) const { ENTER1( rRectSource, pMapModeSource, pMapModeDest ); - return Rectangle( fn5( rRectSource.Left() + aMapResSource.mnMapOfsX, + return tools::Rectangle( fn5( rRectSource.Left() + aMapResSource.mnMapOfsX, aMapResSource.mnMapScNumX, aMapResDest.mnMapScDenomX, aMapResSource.mnMapScDenomX, aMapResDest.mnMapScNumX ) - aMapResDest.mnMapOfsX, @@ -1878,7 +1878,7 @@ basegfx::B2DHomMatrix OutputDevice::LogicToLogic(const MapMode& rMapModeSource, return aTransform; } -Rectangle OutputDevice::LogicToLogic( const Rectangle& rRectSource, +tools::Rectangle OutputDevice::LogicToLogic( const tools::Rectangle& rRectSource, const MapMode& rMapModeSource, const MapMode& rMapModeDest ) { @@ -1893,7 +1893,7 @@ Rectangle OutputDevice::LogicToLogic( const Rectangle& rRectSource, { ENTER3( eUnitSource, eUnitDest ); - return Rectangle( fn3( rRectSource.Left(), nNumerator, nDenominator ), + return tools::Rectangle( fn3( rRectSource.Left(), nNumerator, nDenominator ), fn3( rRectSource.Top(), nNumerator, nDenominator ), fn3( rRectSource.Right(), nNumerator, nDenominator ), fn3( rRectSource.Bottom(), nNumerator, nDenominator ) ); @@ -1902,7 +1902,7 @@ Rectangle OutputDevice::LogicToLogic( const Rectangle& rRectSource, { ENTER4( rMapModeSource, rMapModeDest ); - return Rectangle( fn5( rRectSource.Left() + aMapResSource.mnMapOfsX, + return tools::Rectangle( fn5( rRectSource.Left() + aMapResSource.mnMapOfsX, aMapResSource.mnMapScNumX, aMapResDest.mnMapScDenomX, aMapResSource.mnMapScDenomX, aMapResDest.mnMapScNumX ) - aMapResDest.mnMapOfsX, diff --git a/vcl/source/outdev/mask.cxx b/vcl/source/outdev/mask.cxx index 73af2869fff0..5ce47c676e84 100644 --- a/vcl/source/outdev/mask.cxx +++ b/vcl/source/outdev/mask.cxx @@ -56,7 +56,7 @@ void OutputDevice::DrawMask( const Point& rDestPt, const Size& rDestSize, if( RasterOp::Invert == meRasterOp ) { - DrawRect( Rectangle( rDestPt, rDestSize ) ); + DrawRect( tools::Rectangle( rDestPt, rDestSize ) ); return; } diff --git a/vcl/source/outdev/nativecontrols.cxx b/vcl/source/outdev/nativecontrols.cxx index 01bcb85f78a3..5dc1fd8c417d 100644 --- a/vcl/source/outdev/nativecontrols.cxx +++ b/vcl/source/outdev/nativecontrols.cxx @@ -170,7 +170,7 @@ bool OutputDevice::IsNativeControlSupported( ControlType nType, ControlPart nPar bool OutputDevice::HitTestNativeScrollbar( ControlPart nPart, - const Rectangle& rControlRegion, + const tools::Rectangle& rControlRegion, const Point& aPos, bool& rIsInside ) const { @@ -182,7 +182,7 @@ bool OutputDevice::HitTestNativeScrollbar( return false; Point aWinOffs( mnOutOffX, mnOutOffY ); - Rectangle screenRegion( rControlRegion ); + tools::Rectangle screenRegion( rControlRegion ); screenRegion.Move( aWinOffs.X(), aWinOffs.Y()); return mpGraphics->HitTestNativeScrollbar( nPart, screenRegion, Point( aPos.X() + mnOutOffX, aPos.Y() + mnOutOffY ), @@ -270,7 +270,7 @@ static std::shared_ptr< ImplControlValue > TransformControlValue( const ImplCont } bool OutputDevice::DrawNativeControl( ControlType nType, ControlPart nPart, - const Rectangle& rControlRegion, + const tools::Rectangle& rControlRegion, ControlState nState, const ImplControlValue& aValue, const OUString& aCaption ) @@ -298,7 +298,7 @@ bool OutputDevice::DrawNativeControl( ControlType nType, // Convert the coordinates from relative to Window-absolute, so we draw // in the correct place in platform code std::shared_ptr< ImplControlValue > aScreenCtrlValue( TransformControlValue( aValue, *this ) ); - Rectangle screenRegion( ImplLogicToDevicePixel( rControlRegion ) ); + tools::Rectangle screenRegion( ImplLogicToDevicePixel( rControlRegion ) ); vcl::Region aTestRegion( GetActiveClipRegion() ); aTestRegion.Intersect( rControlRegion ); @@ -315,12 +315,12 @@ bool OutputDevice::DrawNativeControl( ControlType nType, bool OutputDevice::GetNativeControlRegion( ControlType nType, ControlPart nPart, - const Rectangle& rControlRegion, + const tools::Rectangle& rControlRegion, ControlState nState, const ImplControlValue& aValue, const OUString& aCaption, - Rectangle &rNativeBoundingRegion, - Rectangle &rNativeContentRegion ) const + tools::Rectangle &rNativeBoundingRegion, + tools::Rectangle &rNativeContentRegion ) const { if( !EnableNativeWidget( *this ) ) return false; @@ -332,7 +332,7 @@ bool OutputDevice::GetNativeControlRegion( ControlType nType, // Convert the coordinates from relative to Window-absolute, so we draw // in the correct place in platform code std::shared_ptr< ImplControlValue > aScreenCtrlValue( TransformControlValue( aValue, *this ) ); - Rectangle screenRegion( ImplLogicToDevicePixel( rControlRegion ) ); + tools::Rectangle screenRegion( ImplLogicToDevicePixel( rControlRegion ) ); bool bRet = mpGraphics->GetNativeControlRegion(nType, nPart, screenRegion, nState, *aScreenCtrlValue, aCaption, rNativeBoundingRegion, diff --git a/vcl/source/outdev/outdev.cxx b/vcl/source/outdev/outdev.cxx index c4be8b67f630..31449f224342 100644 --- a/vcl/source/outdev/outdev.cxx +++ b/vcl/source/outdev/outdev.cxx @@ -419,7 +419,7 @@ void OutputDevice::DrawOutDev( const Point& rDestPt, const Size& rDestSize, if ( RasterOp::Invert == meRasterOp ) { - DrawRect( Rectangle( rDestPt, rDestSize ) ); + DrawRect( tools::Rectangle( rDestPt, rDestSize ) ); return; } @@ -454,7 +454,7 @@ void OutputDevice::DrawOutDev( const Point& rDestPt, const Size& rDestSize, ImplLogicXToDevicePixel(rDestPt.X()), ImplLogicYToDevicePixel(rDestPt.Y()), nDestWidth, nDestHeight); - const Rectangle aSrcOutRect( Point( mnOutOffX, mnOutOffY ), + const tools::Rectangle aSrcOutRect( Point( mnOutOffX, mnOutOffY ), Size( mnOutWidth, mnOutHeight ) ); AdjustTwoRect( aPosAry, aSrcOutRect ); @@ -476,7 +476,7 @@ void OutputDevice::DrawOutDev( const Point& rDestPt, const Size& rDestSize, if ( RasterOp::Invert == meRasterOp ) { - DrawRect( Rectangle( rDestPt, rDestSize ) ); + DrawRect( tools::Rectangle( rDestPt, rDestSize ) ); return; } @@ -520,7 +520,7 @@ void OutputDevice::DrawOutDev( const Point& rDestPt, const Size& rDestSize, drawOutDevDirect( &rOutDev, aPosAry ); // #i32109#: make destination rectangle opaque - source has no alpha - mpAlphaVDev->ImplFillOpaqueRectangle( Rectangle(rDestPt, rDestSize) ); + mpAlphaVDev->ImplFillOpaqueRectangle( tools::Rectangle(rDestPt, rDestSize) ); } } else @@ -570,7 +570,7 @@ void OutputDevice::CopyArea( const Point& rDestPt, ImplLogicXToDevicePixel(rDestPt.X()), ImplLogicYToDevicePixel(rDestPt.Y()), nSrcWidth, nSrcHeight); - const Rectangle aSrcOutRect( Point( mnOutOffX, mnOutOffY ), + const tools::Rectangle aSrcOutRect( Point( mnOutOffX, mnOutOffY ), Size( mnOutWidth, mnOutHeight ) ); AdjustTwoRect( aPosAry, aSrcOutRect ); @@ -641,7 +641,7 @@ void OutputDevice::drawOutDevDirect( const OutputDevice* pSrcDev, SalTwoRect& rP } // #102532# Offset only has to be pseudo window offset - const Rectangle aSrcOutRect( Point( pSrcDev->mnOutOffX, pSrcDev->mnOutOffY ), + const tools::Rectangle aSrcOutRect( Point( pSrcDev->mnOutOffX, pSrcDev->mnOutOffY ), Size( pSrcDev->mnOutWidth, pSrcDev->mnOutHeight ) ); AdjustTwoRect( rPosAry, aSrcOutRect ); @@ -693,7 +693,7 @@ void OutputDevice::ReMirror( Point &rPoint ) const { rPoint.X() = mnOutOffX + mnOutWidth - 1 - rPoint.X() + mnOutOffX; } -void OutputDevice::ReMirror( Rectangle &rRect ) const +void OutputDevice::ReMirror( tools::Rectangle &rRect ) const { long nWidth = rRect.Right() - rRect.Left(); @@ -754,7 +754,7 @@ bool OutputDevice::DrawEPS( const Point& rPoint, const Size& rSize, if( mbOutputClipped ) return bDrawn; - Rectangle aRect( ImplLogicToDevicePixel( Rectangle( rPoint, rSize ) ) ); + tools::Rectangle aRect( ImplLogicToDevicePixel( tools::Rectangle( rPoint, rSize ) ) ); if( !aRect.IsEmpty() ) { diff --git a/vcl/source/outdev/rect.cxx b/vcl/source/outdev/rect.cxx index 61cbeaa4f4af..30ca92c1f7db 100644 --- a/vcl/source/outdev/rect.cxx +++ b/vcl/source/outdev/rect.cxx @@ -30,7 +30,7 @@ #include "salgdi.hxx" -void OutputDevice::DrawRect( const Rectangle& rRect ) +void OutputDevice::DrawRect( const tools::Rectangle& rRect ) { assert(!is_double_buffered_window()); @@ -40,7 +40,7 @@ void OutputDevice::DrawRect( const Rectangle& rRect ) if ( !IsDeviceOutputNecessary() || (!mbLineColor && !mbFillColor) || ImplIsRecordLayout() ) return; - Rectangle aRect( ImplLogicToDevicePixel( rRect ) ); + tools::Rectangle aRect( ImplLogicToDevicePixel( rRect ) ); if ( aRect.IsEmpty() ) return; @@ -68,7 +68,7 @@ void OutputDevice::DrawRect( const Rectangle& rRect ) mpAlphaVDev->DrawRect( rRect ); } -void OutputDevice::DrawRect( const Rectangle& rRect, +void OutputDevice::DrawRect( const tools::Rectangle& rRect, sal_uLong nHorzRound, sal_uLong nVertRound ) { assert(!is_double_buffered_window()); @@ -79,7 +79,7 @@ void OutputDevice::DrawRect( const Rectangle& rRect, if ( !IsDeviceOutputNecessary() || (!mbLineColor && !mbFillColor) || ImplIsRecordLayout() ) return; - const Rectangle aRect( ImplLogicToDevicePixel( rRect ) ); + const tools::Rectangle aRect( ImplLogicToDevicePixel( rRect ) ); if ( aRect.IsEmpty() ) return; @@ -129,13 +129,13 @@ void OutputDevice::DrawRect( const Rectangle& rRect, mpAlphaVDev->DrawRect( rRect, nHorzRound, nVertRound ); } -void OutputDevice::Invert( const Rectangle& rRect, InvertFlags nFlags ) +void OutputDevice::Invert( const tools::Rectangle& rRect, InvertFlags nFlags ) { assert(!is_double_buffered_window()); if ( !IsDeviceOutputNecessary() ) return; - Rectangle aRect( ImplLogicToDevicePixel( rRect ) ); + tools::Rectangle aRect( ImplLogicToDevicePixel( rRect ) ); if ( aRect.IsEmpty() ) return; @@ -218,18 +218,18 @@ void OutputDevice::DrawCheckered(const Point& rPos, const Size& rSize, sal_uInt3 const sal_uInt32 nBottom(std::min(nMaxY, nY + nLen)); SetFillColor(((x & 0x0001) ^ (y & 0x0001)) ? aStart : aEnd); - DrawRect(Rectangle(nX, nY, nRight, nBottom)); + DrawRect(tools::Rectangle(nX, nY, nRight, nBottom)); } } Pop(); } -void OutputDevice::DrawGrid( const Rectangle& rRect, const Size& rDist, DrawGridFlags nFlags ) +void OutputDevice::DrawGrid( const tools::Rectangle& rRect, const Size& rDist, DrawGridFlags nFlags ) { assert(!is_double_buffered_window()); - Rectangle aDstRect( PixelToLogic( Point() ), GetOutputSize() ); + tools::Rectangle aDstRect( PixelToLogic( Point() ), GetOutputSize() ); aDstRect.Intersection( rRect ); if( aDstRect.IsEmpty() || ImplIsRecordLayout() ) @@ -351,11 +351,11 @@ BmpMirrorFlags AdjustTwoRect( SalTwoRect& rTwoRect, const Size& rSizePix ) ( ( rTwoRect.mnSrcX + rTwoRect.mnSrcWidth ) > rSizePix.Width() ) || ( ( rTwoRect.mnSrcY + rTwoRect.mnSrcHeight ) > rSizePix.Height() ) ) { - const Rectangle aSourceRect( Point( rTwoRect.mnSrcX, rTwoRect.mnSrcY ), + const tools::Rectangle aSourceRect( Point( rTwoRect.mnSrcX, rTwoRect.mnSrcY ), Size( rTwoRect.mnSrcWidth, rTwoRect.mnSrcHeight ) ); - Rectangle aCropRect( aSourceRect ); + tools::Rectangle aCropRect( aSourceRect ); - aCropRect.Intersection( Rectangle( Point(), rSizePix ) ); + aCropRect.Intersection( tools::Rectangle( Point(), rSizePix ) ); if( aCropRect.IsEmpty() ) { @@ -385,16 +385,16 @@ BmpMirrorFlags AdjustTwoRect( SalTwoRect& rTwoRect, const Size& rSizePix ) return nMirrFlags; } -void AdjustTwoRect( SalTwoRect& rTwoRect, const Rectangle& rValidSrcRect ) +void AdjustTwoRect( SalTwoRect& rTwoRect, const tools::Rectangle& rValidSrcRect ) { if( ( rTwoRect.mnSrcX < rValidSrcRect.Left() ) || ( rTwoRect.mnSrcX >= rValidSrcRect.Right() ) || ( rTwoRect.mnSrcY < rValidSrcRect.Top() ) || ( rTwoRect.mnSrcY >= rValidSrcRect.Bottom() ) || ( ( rTwoRect.mnSrcX + rTwoRect.mnSrcWidth ) > rValidSrcRect.Right() ) || ( ( rTwoRect.mnSrcY + rTwoRect.mnSrcHeight ) > rValidSrcRect.Bottom() ) ) { - const Rectangle aSourceRect( Point( rTwoRect.mnSrcX, rTwoRect.mnSrcY ), + const tools::Rectangle aSourceRect( Point( rTwoRect.mnSrcX, rTwoRect.mnSrcY ), Size( rTwoRect.mnSrcWidth, rTwoRect.mnSrcHeight ) ); - Rectangle aCropRect( aSourceRect ); + tools::Rectangle aCropRect( aSourceRect ); aCropRect.Intersection( rValidSrcRect ); diff --git a/vcl/source/outdev/text.cxx b/vcl/source/outdev/text.cxx index ad835c29dbf5..5cf1ca62fd74 100644 --- a/vcl/source/outdev/text.cxx +++ b/vcl/source/outdev/text.cxx @@ -132,7 +132,7 @@ void OutputDevice::ImplDrawTextRect( long nBaseX, long nBaseY, nX += nBaseX; nY += nBaseY; // inflate because polygons are drawn smaller - Rectangle aRect( Point( nX, nY ), Size( nWidth+1, nHeight+1 ) ); + tools::Rectangle aRect( Point( nX, nY ), Size( nWidth+1, nHeight+1 ) ); tools::Polygon aPoly( aRect ); aPoly.Rotate( Point( nBaseX, nBaseY ), mpFontInstance->mnOrientation ); ImplDrawPolygon( aPoly ); @@ -166,7 +166,7 @@ void OutputDevice::ImplDrawTextBackground( const SalLayout& rSalLayout ) mpFontInstance->mnLineHeight+mnEmphasisAscent+mnEmphasisDescent ); } -Rectangle OutputDevice::ImplGetTextBoundRect( const SalLayout& rSalLayout ) +tools::Rectangle OutputDevice::ImplGetTextBoundRect( const SalLayout& rSalLayout ) { Point aPoint = rSalLayout.GetDrawPosition(); long nX = aPoint.X(); @@ -194,14 +194,14 @@ Rectangle OutputDevice::ImplGetTextBoundRect( const SalLayout& rSalLayout ) else { // inflate by +1+1 because polygons are drawn smaller - Rectangle aRect( Point( nX, nY ), Size( nWidth+1, nHeight+1 ) ); + tools::Rectangle aRect( Point( nX, nY ), Size( nWidth+1, nHeight+1 ) ); tools::Polygon aPoly( aRect ); aPoly.Rotate( Point( nBaseX, nBaseY ), mpFontInstance->mnOrientation ); return aPoly.GetBoundRect(); } } - return Rectangle( Point( nX, nY ), Size( nWidth, nHeight ) ); + return tools::Rectangle( Point( nX, nY ), Size( nWidth, nHeight ) ); } bool OutputDevice::ImplDrawRotateText( SalLayout& rSalLayout ) @@ -209,7 +209,7 @@ bool OutputDevice::ImplDrawRotateText( SalLayout& rSalLayout ) long nX = rSalLayout.DrawBase().X(); long nY = rSalLayout.DrawBase().Y(); - Rectangle aBoundRect; + tools::Rectangle aBoundRect; rSalLayout.DrawBase() = Point( 0, 0 ); rSalLayout.DrawOffset() = Point( 0, 0 ); if( !rSalLayout.GetBoundRect( *mpGraphics, aBoundRect ) ) @@ -218,7 +218,7 @@ bool OutputDevice::ImplDrawRotateText( SalLayout& rSalLayout ) long nRight = rSalLayout.GetTextWidth(); long nTop = mpFontInstance->mxFontMetric->GetAscent() + mnEmphasisAscent; long nHeight = mpFontInstance->mnLineHeight + mnEmphasisAscent + mnEmphasisDescent; - aBoundRect = Rectangle( 0, -nTop, nRight, nHeight - nTop ); + aBoundRect = tools::Rectangle( 0, -nTop, nRight, nHeight - nTop ); } // cache virtual device for rotation @@ -829,7 +829,7 @@ void OutputDevice::DrawText( const Point& rStartPt, const OUString& rStr, { vcl::Region aClip( GetClipRegion() ); if( meOutDevType == OUTDEV_WINDOW ) - aClip.Intersect( Rectangle( Point(), GetOutputSize() ) ); + aClip.Intersect( tools::Rectangle( Point(), GetOutputSize() ) ); if (mpOutDevData->mpRecordLayout) { mpOutDevData->mpRecordLayout->m_aLineIndices.push_back( mpOutDevData->mpRecordLayout->m_aDisplayText.getLength() ); @@ -1465,7 +1465,7 @@ sal_Int32 OutputDevice::GetTextBreak( const OUString& rStr, long nTextWidth, return nRetVal; } -void OutputDevice::ImplDrawText( OutputDevice& rTargetDevice, const Rectangle& rRect, +void OutputDevice::ImplDrawText( OutputDevice& rTargetDevice, const tools::Rectangle& rRect, const OUString& rOrigStr, DrawTextFlags nStyle, MetricVector* pVector, OUString* pDisplayText, vcl::ITextLayout& _rLayout ) @@ -1730,7 +1730,7 @@ void OutputDevice::ImplDrawText( OutputDevice& rTargetDevice, const Rectangle& r } } -void OutputDevice::AddTextRectActions( const Rectangle& rRect, +void OutputDevice::AddTextRectActions( const tools::Rectangle& rRect, const OUString& rOrigStr, DrawTextFlags nStyle, GDIMetaFile& rMtf ) @@ -1763,7 +1763,7 @@ void OutputDevice::AddTextRectActions( const Rectangle& rRect, mpMetaFile = pMtf; } -void OutputDevice::DrawText( const Rectangle& rRect, const OUString& rOrigStr, DrawTextFlags nStyle, +void OutputDevice::DrawText( const tools::Rectangle& rRect, const OUString& rOrigStr, DrawTextFlags nStyle, MetricVector* pVector, OUString* pDisplayText, vcl::ITextLayout* _pTextLayout ) { @@ -1808,13 +1808,13 @@ void OutputDevice::DrawText( const Rectangle& rRect, const OUString& rOrigStr, D mpAlphaVDev->DrawText( rRect, rOrigStr, nStyle, pVector, pDisplayText ); } -Rectangle OutputDevice::GetTextRect( const Rectangle& rRect, +tools::Rectangle OutputDevice::GetTextRect( const tools::Rectangle& rRect, const OUString& rStr, DrawTextFlags nStyle, TextRectInfo* pInfo, const vcl::ITextLayout* _pTextLayout ) const { - Rectangle aRect = rRect; + tools::Rectangle aRect = rRect; sal_Int32 nLines; long nWidth = rRect.GetWidth(); long nMaxWidth; @@ -2332,7 +2332,7 @@ SystemTextLayoutData OutputDevice::GetSysTextLayoutData(const Point& rStartPt, c return aSysLayoutData; } -bool OutputDevice::GetTextBoundRect( Rectangle& rRect, +bool OutputDevice::GetTextBoundRect( tools::Rectangle& rRect, const OUString& rStr, sal_Int32 nBase, sal_Int32 nIndex, sal_Int32 nLen, sal_uLong nLayoutWidth, const long* pDXAry ) const @@ -2361,7 +2361,7 @@ bool OutputDevice::GetTextBoundRect( Rectangle& rRect, } pSalLayout = ImplLayout( rStr, nIndex, nLen, aPoint, nLayoutWidth, pDXAry ); - Rectangle aPixelRect; + tools::Rectangle aPixelRect; if( pSalLayout ) { bRet = pSalLayout->GetBoundRect( *mpGraphics, aPixelRect ); diff --git a/vcl/source/outdev/textline.cxx b/vcl/source/outdev/textline.cxx index ba974d525b63..409f4fc108d4 100644 --- a/vcl/source/outdev/textline.cxx +++ b/vcl/source/outdev/textline.cxx @@ -644,7 +644,7 @@ void OutputDevice::ImplDrawStrikeoutChar( long nBaseX, long nBaseY, pLayout->DrawBase() = Point( nBaseX+mnTextOffX, nBaseY+mnTextOffY ); - Rectangle aPixelRect; + tools::Rectangle aPixelRect; aPixelRect.Left() = nBaseX+mnTextOffX; aPixelRect.Right() = aPixelRect.Left()+nWidth; aPixelRect.Bottom() = nBaseY+mpFontInstance->mxFontMetric->GetDescent(); diff --git a/vcl/source/outdev/transparent.cxx b/vcl/source/outdev/transparent.cxx index c1c3a639bff1..91dfec3b24cc 100644 --- a/vcl/source/outdev/transparent.cxx +++ b/vcl/source/outdev/transparent.cxx @@ -119,7 +119,7 @@ void OutputDevice::ImplPrintTransparent( const Bitmap& rBmp, const Bitmap& rMask { Point aDestPt( LogicToPixel( rDestPt ) ); Size aDestSz( LogicToPixel( rDestSize ) ); - Rectangle aSrcRect( rSrcPtPixel, rSrcSizePixel ); + tools::Rectangle aSrcRect( rSrcPtPixel, rSrcSizePixel ); aSrcRect.Justify(); @@ -148,7 +148,7 @@ void OutputDevice::ImplPrintTransparent( const Bitmap& rBmp, const Bitmap& rMask } // source cropped? - if( aSrcRect != Rectangle( Point(), aPaint.GetSizePixel() ) ) + if( aSrcRect != tools::Rectangle( Point(), aPaint.GetSizePixel() ) ) { aPaint.Crop( aSrcRect ); aMask.Crop( aSrcRect ); @@ -185,7 +185,7 @@ void OutputDevice::ImplPrintTransparent( const Bitmap& rBmp, const Bitmap& rMask pMapY[ nY ] = aDestPt.Y() + FRound( (double) aDestSz.Height() * nY / nSrcHeight ); // walk through all rectangles of mask - const vcl::Region aWorkRgn(aMask.CreateRegion(COL_BLACK, Rectangle(Point(), aMask.GetSizePixel()))); + const vcl::Region aWorkRgn(aMask.CreateRegion(COL_BLACK, tools::Rectangle(Point(), aMask.GetSizePixel()))); RectangleVector aRectangles; aWorkRgn.GetRegionRectangles(aRectangles); @@ -389,9 +389,9 @@ void OutputDevice::EmulateDrawTransparent ( const tools::PolyPolygon& rPolyPoly, mpMetaFile = nullptr; tools::PolyPolygon aPolyPoly( LogicToPixel( rPolyPoly ) ); - Rectangle aPolyRect( aPolyPoly.GetBoundRect() ); + tools::Rectangle aPolyRect( aPolyPoly.GetBoundRect() ); Point aPoint; - Rectangle aDstRect( aPoint, GetOutputSizePixel() ); + tools::Rectangle aDstRect( aPoint, GetOutputSizePixel() ); aDstRect.Intersection( aPolyRect ); @@ -421,8 +421,8 @@ void OutputDevice::EmulateDrawTransparent ( const tools::PolyPolygon& rPolyPoly, if ( mbInitFillColor ) InitFillColor(); - Rectangle aLogicPolyRect( rPolyPoly.GetBoundRect() ); - Rectangle aPixelRect( ImplLogicToDevicePixel( aLogicPolyRect ) ); + tools::Rectangle aLogicPolyRect( rPolyPoly.GetBoundRect() ); + tools::Rectangle aPixelRect( ImplLogicToDevicePixel( aLogicPolyRect ) ); if( !mbOutputClipped ) { @@ -686,9 +686,9 @@ void OutputDevice::DrawTransparent( const GDIMetaFile& rMtf, const Point& rPos, else { GDIMetaFile* pOldMetaFile = mpMetaFile; - Rectangle aOutRect( LogicToPixel( rPos ), LogicToPixel( rSize ) ); + tools::Rectangle aOutRect( LogicToPixel( rPos ), LogicToPixel( rSize ) ); Point aPoint; - Rectangle aDstRect( aPoint, GetOutputSizePixel() ); + tools::Rectangle aDstRect( aPoint, GetOutputSizePixel() ); mpMetaFile = nullptr; aDstRect.Intersection( aOutRect ); @@ -746,7 +746,7 @@ void OutputDevice::DrawTransparent( const GDIMetaFile& rMtf, const Point& rPos, // create alpha mask from gradient and get as Bitmap xVDev->EnableMapMode(bBufferMapModeEnabled); xVDev->SetDrawMode(DrawModeFlags::GrayGradient); - xVDev->DrawGradient(Rectangle(rPos, rSize), rTransparenceGradient); + xVDev->DrawGradient(tools::Rectangle(rPos, rSize), rTransparenceGradient); xVDev->SetDrawMode(DrawModeFlags::Default); xVDev->EnableMapMode(false); @@ -781,7 +781,7 @@ void OutputDevice::DrawTransparent( const GDIMetaFile& rMtf, const Point& rPos, // create mask bitmap xVDev->SetLineColor( COL_BLACK ); xVDev->SetFillColor( COL_BLACK ); - xVDev->DrawRect( Rectangle( xVDev->PixelToLogic( Point() ), xVDev->GetOutputSize() ) ); + xVDev->DrawRect( tools::Rectangle( xVDev->PixelToLogic( Point() ), xVDev->GetOutputSize() ) ); xVDev->SetDrawMode( DrawModeFlags::WhiteLine | DrawModeFlags::WhiteFill | DrawModeFlags::WhiteText | DrawModeFlags::WhiteBitmap | DrawModeFlags::WhiteGradient ); const_cast<GDIMetaFile&>(rMtf).WindStart(); @@ -793,7 +793,7 @@ void OutputDevice::DrawTransparent( const GDIMetaFile& rMtf, const Point& rPos, // create alpha mask from gradient xVDev->SetDrawMode( DrawModeFlags::GrayGradient ); - xVDev->DrawGradient( Rectangle( rPos, rSize ), rTransparenceGradient ); + xVDev->DrawGradient( tools::Rectangle( rPos, rSize ), rTransparenceGradient ); xVDev->SetDrawMode( DrawModeFlags::Default ); xVDev->EnableMapMode( false ); xVDev->DrawMask( Point(), xVDev->GetOutputSizePixel(), aMask, Color( COL_WHITE ) ); diff --git a/vcl/source/outdev/wallpaper.cxx b/vcl/source/outdev/wallpaper.cxx index e4d89716f28d..452cb12f4df6 100644 --- a/vcl/source/outdev/wallpaper.cxx +++ b/vcl/source/outdev/wallpaper.cxx @@ -25,7 +25,7 @@ #include <wall2.hxx> -void OutputDevice::DrawWallpaper( const Rectangle& rRect, +void OutputDevice::DrawWallpaper( const tools::Rectangle& rRect, const Wallpaper& rWallpaper ) { assert(!is_double_buffered_window()); @@ -38,7 +38,7 @@ void OutputDevice::DrawWallpaper( const Rectangle& rRect, if ( rWallpaper.GetStyle() != WallpaperStyle::NONE ) { - Rectangle aRect = LogicToPixel( rRect ); + tools::Rectangle aRect = LogicToPixel( rRect ); aRect.Justify(); if ( !aRect.IsEmpty() ) @@ -80,7 +80,7 @@ void OutputDevice::DrawColorWallpaper( long nX, long nY, bool bMap = mbMap; EnableMapMode( false ); - DrawRect( Rectangle( Point( nX, nY ), Size( nWidth, nHeight ) ) ); + DrawRect( tools::Rectangle( Point( nX, nY ), Size( nWidth, nHeight ) ) ); SetLineColor( aOldLineColor ); SetFillColor( aOldFillColor ); EnableMapMode( bMap ); @@ -170,7 +170,7 @@ void OutputDevice::DrawBitmapWallpaper( long nX, long nY, // calc pos and size if( rWallpaper.IsRect() ) { - const Rectangle aBound( LogicToPixel( rWallpaper.GetRect() ) ); + const tools::Rectangle aBound( LogicToPixel( rWallpaper.GetRect() ) ); aPos = aBound.TopLeft(); aSize = aBound.GetSize(); } @@ -183,7 +183,7 @@ void OutputDevice::DrawBitmapWallpaper( long nX, long nY, mpMetaFile = nullptr; EnableMapMode( false ); Push( PushFlags::CLIPREGION ); - IntersectClipRegion( Rectangle( Point( nX, nY ), Size( nWidth, nHeight ) ) ); + IntersectClipRegion( tools::Rectangle( Point( nX, nY ), Size( nWidth, nHeight ) ) ); switch( eStyle ) { @@ -286,11 +286,11 @@ void OutputDevice::DrawBitmapWallpaper( long nX, long nY, { const Size aBmpSize( aBmpEx.GetSizePixel() ); const Point aTmpPoint; - const Rectangle aOutRect( aTmpPoint, GetOutputSizePixel() ); - const Rectangle aColRect( Point( nX, nY ), Size( nWidth, nHeight ) ); - Rectangle aWorkRect; + const tools::Rectangle aOutRect( aTmpPoint, GetOutputSizePixel() ); + const tools::Rectangle aColRect( Point( nX, nY ), Size( nWidth, nHeight ) ); + tools::Rectangle aWorkRect; - aWorkRect = Rectangle( 0, 0, aOutRect.Right(), aPos.Y() - 1L ); + aWorkRect = tools::Rectangle( 0, 0, aOutRect.Right(), aPos.Y() - 1L ); aWorkRect.Justify(); aWorkRect.Intersection( aColRect ); if( !aWorkRect.IsEmpty() ) @@ -300,7 +300,7 @@ void OutputDevice::DrawBitmapWallpaper( long nX, long nY, rWallpaper ); } - aWorkRect = Rectangle( 0, aPos.Y(), aPos.X() - 1L, aPos.Y() + aBmpSize.Height() - 1L ); + aWorkRect = tools::Rectangle( 0, aPos.Y(), aPos.X() - 1L, aPos.Y() + aBmpSize.Height() - 1L ); aWorkRect.Justify(); aWorkRect.Intersection( aColRect ); if( !aWorkRect.IsEmpty() ) @@ -310,7 +310,7 @@ void OutputDevice::DrawBitmapWallpaper( long nX, long nY, rWallpaper ); } - aWorkRect = Rectangle( aPos.X() + aBmpSize.Width(), aPos.Y(), + aWorkRect = tools::Rectangle( aPos.X() + aBmpSize.Width(), aPos.Y(), aOutRect.Right(), aPos.Y() + aBmpSize.Height() - 1L ); aWorkRect.Justify(); aWorkRect.Intersection( aColRect ); @@ -321,7 +321,7 @@ void OutputDevice::DrawBitmapWallpaper( long nX, long nY, rWallpaper ); } - aWorkRect = Rectangle( 0, aPos.Y() + aBmpSize.Height(), + aWorkRect = tools::Rectangle( 0, aPos.Y() + aBmpSize.Height(), aOutRect.Right(), aOutRect.Bottom() ); aWorkRect.Justify(); aWorkRect.Intersection( aColRect ); @@ -349,16 +349,16 @@ void OutputDevice::DrawGradientWallpaper( long nX, long nY, { assert(!is_double_buffered_window()); - Rectangle aBound; + tools::Rectangle aBound; GDIMetaFile* pOldMetaFile = mpMetaFile; const bool bOldMap = mbMap; - aBound = Rectangle( Point( nX, nY ), Size( nWidth, nHeight ) ); + aBound = tools::Rectangle( Point( nX, nY ), Size( nWidth, nHeight ) ); mpMetaFile = nullptr; EnableMapMode( false ); Push( PushFlags::CLIPREGION ); - IntersectClipRegion( Rectangle( Point( nX, nY ), Size( nWidth, nHeight ) ) ); + IntersectClipRegion( tools::Rectangle( Point( nX, nY ), Size( nWidth, nHeight ) ) ); DrawGradient( aBound, rWallpaper.GetGradient() ); diff --git a/vcl/source/window/brdwin.cxx b/vcl/source/window/brdwin.cxx index 6a174b89521f..bd466a7004a8 100644 --- a/vcl/source/window/brdwin.cxx +++ b/vcl/source/window/brdwin.cxx @@ -44,7 +44,7 @@ using namespace ::com::sun::star::uno; namespace vcl { -void Window::ImplCalcSymbolRect( Rectangle& rRect ) +void Window::ImplCalcSymbolRect( tools::Rectangle& rRect ) { // Add border, not shown in the non-default representation, // as we want to use it for small buttons @@ -65,24 +65,24 @@ void Window::ImplCalcSymbolRect( Rectangle& rRect ) } /* namespace vcl */ static void ImplDrawBrdWinSymbol( vcl::RenderContext* pDev, - const Rectangle& rRect, SymbolType eSymbol ) + const tools::Rectangle& rRect, SymbolType eSymbol ) { // we leave 5% room between the symbol and the button border DecorationView aDecoView( pDev ); - Rectangle aTempRect = rRect; + tools::Rectangle aTempRect = rRect; vcl::Window::ImplCalcSymbolRect( aTempRect ); aDecoView.DrawSymbol( aTempRect, eSymbol, pDev->GetSettings().GetStyleSettings().GetButtonTextColor() ); } static void ImplDrawBrdWinSymbolButton( vcl::RenderContext* pDev, - const Rectangle& rRect, + const tools::Rectangle& rRect, SymbolType eSymbol, DrawButtonFlags nState ) { bool bMouseOver(nState & DrawButtonFlags::Highlight); nState &= ~DrawButtonFlags::Highlight; - Rectangle aTempRect; + tools::Rectangle aTempRect; vcl::Window *pWin = dynamic_cast< vcl::Window* >(pDev); if( pWin ) { @@ -129,14 +129,14 @@ bool ImplBorderWindowView::Tracking( const TrackingEvent& ) return false; } -OUString ImplBorderWindowView::RequestHelp( const Point&, Rectangle& ) +OUString ImplBorderWindowView::RequestHelp( const Point&, tools::Rectangle& ) { return OUString(); } -Rectangle ImplBorderWindowView::GetMenuRect() const +tools::Rectangle ImplBorderWindowView::GetMenuRect() const { - return Rectangle(); + return tools::Rectangle(); } void ImplBorderWindowView::ImplInitTitle(ImplBorderFrameData* pData) @@ -291,7 +291,7 @@ bool ImplBorderWindowView::ImplMouseMove( ImplBorderFrameData* pData, const Mous OUString ImplBorderWindowView::ImplRequestHelp( ImplBorderFrameData* pData, const Point& rPos, - Rectangle& rHelpRect ) + tools::Rectangle& rHelpRect ) { sal_uInt16 nHelpId = 0; OUString aHelpStr; @@ -489,8 +489,8 @@ void ImplSmallBorderWindowView::Init( OutputDevice* pDev, long nWidth, long nHei Size aMinSize( mnWidth - mnLeftBorder - mnRightBorder, mnHeight - mnTopBorder - mnBottomBorder ); if( aMinSize.Width() < 10 ) aMinSize.setWidth( 10 ); if( aMinSize.Height() < 10 ) aMinSize.setHeight( 10 ); - Rectangle aCtrlRegion( Point(mnLeftBorder, mnTopBorder), aMinSize ); - Rectangle aBounds, aContent; + tools::Rectangle aCtrlRegion( Point(mnLeftBorder, mnTopBorder), aMinSize ); + tools::Rectangle aBounds, aContent; if( pWin->GetNativeControlRegion( aCtrlType, ControlPart::Entire, aCtrlRegion, ControlState::ENABLED, aControlValue, OUString(), aBounds, aContent ) ) @@ -547,8 +547,8 @@ void ImplSmallBorderWindowView::Init( OutputDevice* pDev, long nWidth, long nHei nFlags |= DrawFrameFlags::Mono; DecorationView aDecoView( mpOutDev ); - Rectangle aRect( 0, 0, 10, 10 ); - Rectangle aCalcRect = aDecoView.DrawFrame( aRect, nStyle, nFlags ); + tools::Rectangle aRect( 0, 0, 10, 10 ); + tools::Rectangle aCalcRect = aDecoView.DrawFrame( aRect, nStyle, nFlags ); mnLeftBorder = aCalcRect.Left(); mnTopBorder = aCalcRect.Top(); mnRightBorder = aRect.Right()-aCalcRect.Right(); @@ -690,10 +690,10 @@ void ImplSmallBorderWindowView::DrawWindow(vcl::RenderContext& rRenderContext, c nState |= ControlState::ROLLOVER; Point aPoint; - Rectangle aCtrlRegion(aPoint, Size(mnWidth, mnHeight)); + tools::Rectangle aCtrlRegion(aPoint, Size(mnWidth, mnHeight)); - Rectangle aBoundingRgn(aPoint, Size(mnWidth, mnHeight)); - Rectangle aContentRgn(aCtrlRegion); + tools::Rectangle aBoundingRgn(aPoint, Size(mnWidth, mnHeight)); + tools::Rectangle aContentRgn(aCtrlRegion); if (!ImplGetSVData()->maNWFData.mbCanDrawWidgetAnySize && rRenderContext.GetNativeControlRegion(aCtrlType, aCtrlPart, aCtrlRegion, nState, aControlValue, OUString(), @@ -710,7 +710,7 @@ void ImplSmallBorderWindowView::DrawWindow(vcl::RenderContext& rRenderContext, c { Edit* pEdit = static_cast<Edit*>(pCtrl)->GetSubEdit(); if (pEdit && !pEdit->SupportsDoubleBuffering()) - pCtrl->Paint(*pCtrl, Rectangle()); // make sure the buttons are also drawn as they might overwrite the border + pCtrl->Paint(*pCtrl, tools::Rectangle()); // make sure the buttons are also drawn as they might overwrite the border } } @@ -736,7 +736,7 @@ void ImplSmallBorderWindowView::DrawWindow(vcl::RenderContext& rRenderContext, c DecorationView aDecoView(&rRenderContext); Point aTmpPoint; - Rectangle aInRect(aTmpPoint, Size(mnWidth, mnHeight)); + tools::Rectangle aInRect(aTmpPoint, Size(mnWidth, mnHeight)); aDecoView.DrawFrame(aInRect, nStyle, nFlags); } @@ -1150,14 +1150,14 @@ bool ImplStdBorderWindowView::Tracking( const TrackingEvent& rTEvt ) { maFrameData.mnTrackX = aPos.X(); maFrameData.mnTrackY = aPos.Y(); - pBorderWindow->ShowTracking( Rectangle( pBorderWindow->ScreenToOutputPixel( aPos ), pBorderWindow->GetOutputSizePixel() ), ShowTrackFlags::Big ); + pBorderWindow->ShowTracking( tools::Rectangle( pBorderWindow->ScreenToOutputPixel( aPos ), pBorderWindow->GetOutputSizePixel() ), ShowTrackFlags::Big ); } } else { Point aOldPos = pBorderWindow->GetPosPixel(); Size aSize = pBorderWindow->GetSizePixel(); - Rectangle aNewRect( aOldPos, aSize ); + tools::Rectangle aNewRect( aOldPos, aSize ); long nOldWidth = aSize.Width(); long nOldHeight = aSize.Height(); long nBorderWidth = maFrameData.mnLeftBorder+maFrameData.mnRightBorder; @@ -1261,7 +1261,7 @@ bool ImplStdBorderWindowView::Tracking( const TrackingEvent& rTEvt ) maFrameData.mnTrackY = aNewRect.Top(); maFrameData.mnTrackWidth = aNewRect.GetWidth(); maFrameData.mnTrackHeight = aNewRect.GetHeight(); - pBorderWindow->ShowTracking( Rectangle( pBorderWindow->ScreenToOutputPixel( aNewRect.TopLeft() ), aNewRect.GetSize() ), ShowTrackFlags::Big ); + pBorderWindow->ShowTracking( tools::Rectangle( pBorderWindow->ScreenToOutputPixel( aNewRect.TopLeft() ), aNewRect.GetSize() ), ShowTrackFlags::Big ); } } } @@ -1270,12 +1270,12 @@ bool ImplStdBorderWindowView::Tracking( const TrackingEvent& rTEvt ) return true; } -OUString ImplStdBorderWindowView::RequestHelp( const Point& rPos, Rectangle& rHelpRect ) +OUString ImplStdBorderWindowView::RequestHelp( const Point& rPos, tools::Rectangle& rHelpRect ) { return ImplRequestHelp( &maFrameData, rPos, rHelpRect ); } -Rectangle ImplStdBorderWindowView::GetMenuRect() const +tools::Rectangle ImplStdBorderWindowView::GetMenuRect() const { return maFrameData.maMenuRect; } @@ -1286,8 +1286,8 @@ void ImplStdBorderWindowView::Init( OutputDevice* pDev, long nWidth, long nHeigh ImplBorderWindow* pBorderWindow = maFrameData.mpBorderWindow; const StyleSettings& rStyleSettings = pDev->GetSettings().GetStyleSettings(); DecorationView aDecoView( pDev ); - Rectangle aRect( 0, 0, 10, 10 ); - Rectangle aCalcRect = aDecoView.DrawFrame( aRect, DrawFrameStyle::DoubleOut, DrawFrameFlags::NoDraw ); + tools::Rectangle aRect( 0, 0, 10, 10 ); + tools::Rectangle aCalcRect = aDecoView.DrawFrame( aRect, DrawFrameStyle::DoubleOut, DrawFrameFlags::NoDraw ); pData->mpOutDev = pDev; pData->mnWidth = nWidth; @@ -1335,7 +1335,7 @@ void ImplStdBorderWindowView::Init( OutputDevice* pDev, long nWidth, long nHeigh long const nItemBottom = pData->maTitleRect.Bottom() - 2; auto addSquareOnRight = [&nRight, nItemTop, nItemBottom]( - Rectangle & rect, long gap) + tools::Rectangle & rect, long gap) { rect.Top() = nItemTop; rect.Bottom() = nItemBottom; @@ -1412,7 +1412,7 @@ void ImplStdBorderWindowView::DrawWindow(vcl::RenderContext& rRenderContext, con ImplBorderFrameData* pData = &maFrameData; ImplBorderWindow* pBorderWindow = pData->mpBorderWindow; Point aTmpPoint = pOffset ? Point(*pOffset) : Point(); - Rectangle aInRect( aTmpPoint, Size( pData->mnWidth, pData->mnHeight ) ); + tools::Rectangle aInRect( aTmpPoint, Size( pData->mnWidth, pData->mnHeight ) ); const StyleSettings& rStyleSettings = rRenderContext.GetSettings().GetStyleSettings(); DecorationView aDecoView(&rRenderContext); Color aFaceColor(rStyleSettings.GetFaceColor()); @@ -1430,7 +1430,7 @@ void ImplStdBorderWindowView::DrawWindow(vcl::RenderContext& rRenderContext, con if (pWin) { vcl::Region aClipRgn(aInRect); - Rectangle aItemClipRect(pWin->ImplGetItemEdgeClipRect()); + tools::Rectangle aItemClipRect(pWin->ImplGetItemEdgeClipRect()); if (!aItemClipRect.IsEmpty()) { aItemClipRect.SetPos(pData->mpBorderWindow->AbsoluteScreenToOutputPixel(aItemClipRect.TopLeft())); @@ -1459,13 +1459,13 @@ void ImplStdBorderWindowView::DrawWindow(vcl::RenderContext& rRenderContext, con if (nBorderSize) { rRenderContext.SetFillColor(rStyleSettings.GetFaceColor()); - rRenderContext.DrawRect(Rectangle(Point(aInRect.Left(), aInRect.Top()), + rRenderContext.DrawRect(tools::Rectangle(Point(aInRect.Left(), aInRect.Top()), Size(aInRect.GetWidth(), nBorderSize))); - rRenderContext.DrawRect(Rectangle(Point(aInRect.Left(), aInRect.Top() + nBorderSize), + rRenderContext.DrawRect(tools::Rectangle(Point(aInRect.Left(), aInRect.Top() + nBorderSize), Size(nBorderSize, aInRect.GetHeight() - nBorderSize))); - rRenderContext.DrawRect(Rectangle(Point(aInRect.Left(), aInRect.Bottom() - nBorderSize + 1), + rRenderContext.DrawRect(tools::Rectangle(Point(aInRect.Left(), aInRect.Bottom() - nBorderSize + 1), Size(aInRect.GetWidth(), nBorderSize))); - rRenderContext.DrawRect(Rectangle(Point(aInRect.Right()-nBorderSize + 1, aInRect.Top() + nBorderSize), + rRenderContext.DrawRect(tools::Rectangle(Point(aInRect.Right()-nBorderSize + 1, aInRect.Top() + nBorderSize), Size(nBorderSize, aInRect.GetHeight() - nBorderSize))); } @@ -1481,7 +1481,7 @@ void ImplStdBorderWindowView::DrawWindow(vcl::RenderContext& rRenderContext, con rRenderContext.SetFillColor(aFaceColor); rRenderContext.SetTextColor(rStyleSettings.GetButtonTextColor()); - Rectangle aTitleRect(pData->maTitleRect); + tools::Rectangle aTitleRect(pData->maTitleRect); if(pOffset) aTitleRect.Move(pOffset->X(), pOffset->Y()); rRenderContext.DrawRect(aTitleRect); @@ -1520,28 +1520,28 @@ void ImplStdBorderWindowView::DrawWindow(vcl::RenderContext& rRenderContext, con if (!pData->maCloseRect.IsEmpty()) { - Rectangle aSymbolRect(pData->maCloseRect); + tools::Rectangle aSymbolRect(pData->maCloseRect); if (pOffset) aSymbolRect.Move(pOffset->X(), pOffset->Y()); ImplDrawBrdWinSymbolButton(&rRenderContext, aSymbolRect, SymbolType::CLOSE, pData->mnCloseState); } if (!pData->maDockRect.IsEmpty()) { - Rectangle aSymbolRect(pData->maDockRect); + tools::Rectangle aSymbolRect(pData->maDockRect); if (pOffset) aSymbolRect.Move(pOffset->X(), pOffset->Y()); ImplDrawBrdWinSymbolButton(&rRenderContext, aSymbolRect, SymbolType::DOCK, pData->mnDockState); } if (!pData->maMenuRect.IsEmpty()) { - Rectangle aSymbolRect(pData->maMenuRect); + tools::Rectangle aSymbolRect(pData->maMenuRect); if (pOffset) aSymbolRect.Move(pOffset->X(), pOffset->Y()); ImplDrawBrdWinSymbolButton(&rRenderContext, aSymbolRect, SymbolType::MENU, pData->mnMenuState); } if (!pData->maHideRect.IsEmpty()) { - Rectangle aSymbolRect(pData->maHideRect); + tools::Rectangle aSymbolRect(pData->maHideRect); if (pOffset) aSymbolRect.Move(pOffset->X(), pOffset->Y()); ImplDrawBrdWinSymbolButton(&rRenderContext, aSymbolRect, SymbolType::HIDE, pData->mnHideState); @@ -1553,7 +1553,7 @@ void ImplStdBorderWindowView::DrawWindow(vcl::RenderContext& rRenderContext, con eType = SymbolType::ROLLDOWN; else eType = SymbolType::ROLLUP; - Rectangle aSymbolRect(pData->maRollRect); + tools::Rectangle aSymbolRect(pData->maRollRect); if (pOffset) aSymbolRect.Move(pOffset->X(), pOffset->Y()); ImplDrawBrdWinSymbolButton(&rRenderContext, aSymbolRect, eType, pData->mnRollState); @@ -1561,7 +1561,7 @@ void ImplStdBorderWindowView::DrawWindow(vcl::RenderContext& rRenderContext, con if (!pData->maHelpRect.IsEmpty()) { - Rectangle aSymbolRect(pData->maHelpRect); + tools::Rectangle aSymbolRect(pData->maHelpRect); if (pOffset) aSymbolRect.Move(pOffset->X(), pOffset->Y()); ImplDrawBrdWinSymbolButton(&rRenderContext, aSymbolRect, SymbolType::HELP, pData->mnHelpState); @@ -1692,13 +1692,13 @@ void ImplBorderWindow::Tracking( const TrackingEvent& rTEvt ) mpBorderView->Tracking( rTEvt ); } -void ImplBorderWindow::Paint( vcl::RenderContext& rRenderContext, const Rectangle& ) +void ImplBorderWindow::Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& ) { if (mpBorderView) mpBorderView->DrawWindow(rRenderContext); } -void ImplBorderWindow::Draw( const Rectangle&, OutputDevice* pOutDev, const Point& rPos ) +void ImplBorderWindow::Draw( const tools::Rectangle&, OutputDevice* pOutDev, const Point& rPos ) { if (mpBorderView) mpBorderView->DrawWindow(*pOutDev, &rPos); @@ -1725,7 +1725,7 @@ void ImplBorderWindow::RequestHelp( const HelpEvent& rHEvt ) if ( rHEvt.GetMode() & (HelpEventMode::BALLOON | HelpEventMode::QUICK) && !rHEvt.KeyboardActivated() ) { Point aMousePosPixel = ScreenToOutputPixel( rHEvt.GetMousePosPixel() ); - Rectangle aHelpRect; + tools::Rectangle aHelpRect; OUString aHelpStr( mpBorderView->RequestHelp( aMousePosPixel, aHelpRect ) ); // retrieve rectangle @@ -1904,7 +1904,7 @@ void ImplBorderWindow::InvalidateBorder() mpBorderView->GetBorder( nLeftBorder, nTopBorder, nRightBorder, nBottomBorder ); if ( nLeftBorder || nTopBorder || nRightBorder || nBottomBorder ) { - Rectangle aWinRect( Point( 0, 0 ), GetOutputSizePixel() ); + tools::Rectangle aWinRect( Point( 0, 0 ), GetOutputSizePixel() ); vcl::Region aRegion( aWinRect ); aWinRect.Left() += nLeftBorder; aWinRect.Top() += nTopBorder; @@ -2039,7 +2039,7 @@ long ImplBorderWindow::CalcTitleWidth() const return mpBorderView->CalcTitleWidth(); } -Rectangle ImplBorderWindow::GetMenuRect() const +tools::Rectangle ImplBorderWindow::GetMenuRect() const { return mpBorderView->GetMenuRect(); } diff --git a/vcl/source/window/clipping.cxx b/vcl/source/window/clipping.cxx index 13989cd09b49..d87bafd74de3 100644 --- a/vcl/source/window/clipping.cxx +++ b/vcl/source/window/clipping.cxx @@ -112,7 +112,7 @@ vcl::Region Window::GetWindowClipRegionPixel() const const_cast<vcl::Window*>(this)->ImplInitWinClipRegion(); aWinClipRegion = mpWindowImpl->maWinClipRegion; - Rectangle aWinRect( Point( mnOutOffX, mnOutOffY ), Size( mnOutWidth, mnOutHeight ) ); + tools::Rectangle aWinRect( Point( mnOutOffX, mnOutOffY ), Size( mnOutWidth, mnOutHeight ) ); vcl::Region aWinRegion( aWinRect ); if ( aWinRegion == aWinClipRegion ) @@ -140,7 +140,7 @@ vcl::Region Window::GetActiveClipRegion() const return PixelToLogic( aRegion ); } -void Window::ClipToPaintRegion(Rectangle& rDstRect) +void Window::ClipToPaintRegion(tools::Rectangle& rDstRect) { const vcl::Region aPaintRgn(GetPaintRegion()); @@ -165,7 +165,7 @@ void Window::ImplClipBoundaries( vcl::Region& rRegion, bool bThis, bool bOverlap { // clip to frame if required if ( !mpWindowImpl->mbFrame ) - rRegion.Intersect( Rectangle( Point( 0, 0 ), Size( mpWindowImpl->mpFrameWindow->mnOutWidth, mpWindowImpl->mpFrameWindow->mnOutHeight ) ) ); + rRegion.Intersect( tools::Rectangle( Point( 0, 0 ), Size( mpWindowImpl->mpFrameWindow->mnOutWidth, mpWindowImpl->mpFrameWindow->mnOutHeight ) ) ); if ( bOverlaps && !rRegion.IsEmpty() ) { @@ -242,7 +242,7 @@ void Window::ImplClipSiblings( vcl::Region& rRegion ) void Window::ImplInitWinClipRegion() { // Build Window Region - mpWindowImpl->maWinClipRegion = Rectangle( Point( mnOutOffX, mnOutOffY ), + mpWindowImpl->maWinClipRegion = tools::Rectangle( Point( mnOutOffX, mnOutOffY ), Size( mnOutWidth, mnOutHeight ) ); if ( mpWindowImpl->mbWinRegion ) mpWindowImpl->maWinClipRegion.Intersect( ImplPixelToDevicePixel( mpWindowImpl->maWinRegion ) ); @@ -319,7 +319,7 @@ bool Window::ImplSysObjClip( const vcl::Region* pOldRegion ) } vcl::Region aRegion = *pWinChildClipRegion; - Rectangle aWinRect( Point( mnOutOffX, mnOutOffY ), Size( mnOutWidth, mnOutHeight ) ); + tools::Rectangle aWinRect( Point( mnOutOffX, mnOutOffY ), Size( mnOutWidth, mnOutHeight ) ); vcl::Region aWinRectRegion( aWinRect ); if ( aRegion == aWinRectRegion ) @@ -504,7 +504,7 @@ void Window::ImplIntersectWindowClipRegion( vcl::Region& rRegion ) void Window::ImplIntersectWindowRegion( vcl::Region& rRegion ) { - rRegion.Intersect( Rectangle( Point( mnOutOffX, mnOutOffY ), + rRegion.Intersect( tools::Rectangle( Point( mnOutOffX, mnOutOffY ), Size( mnOutWidth, mnOutHeight ) ) ); if ( mpWindowImpl->mbWinRegion ) rRegion.Intersect( ImplPixelToDevicePixel( mpWindowImpl->maWinRegion ) ); @@ -515,7 +515,7 @@ void Window::ImplExcludeWindowRegion( vcl::Region& rRegion ) if ( mpWindowImpl->mbWinRegion ) { Point aPoint( mnOutOffX, mnOutOffY ); - vcl::Region aRegion( Rectangle( aPoint, + vcl::Region aRegion( tools::Rectangle( aPoint, Size( mnOutWidth, mnOutHeight ) ) ); aRegion.Intersect( ImplPixelToDevicePixel( mpWindowImpl->maWinRegion ) ); rRegion.Exclude( aRegion ); @@ -523,7 +523,7 @@ void Window::ImplExcludeWindowRegion( vcl::Region& rRegion ) else { Point aPoint( mnOutOffX, mnOutOffY ); - rRegion.Exclude( Rectangle( aPoint, + rRegion.Exclude( tools::Rectangle( aPoint, Size( mnOutWidth, mnOutHeight ) ) ); } } @@ -606,7 +606,7 @@ void Window::ImplCalcOverlapRegionOverlaps( const vcl::Region& rInterRegion, vcl ImplIntersectAndUnionOverlapWindows( rInterRegion, rRegion ); } -void Window::ImplCalcOverlapRegion( const Rectangle& rSourceRect, vcl::Region& rRegion, +void Window::ImplCalcOverlapRegion( const tools::Rectangle& rSourceRect, vcl::Region& rRegion, bool bChildren, bool bSiblings ) { vcl::Region aRegion( rSourceRect ); @@ -636,7 +636,7 @@ void Window::ImplCalcOverlapRegion( const Rectangle& rSourceRect, vcl::Region& r if ( pWindow && !pWindow->mpWindowImpl->mbFrame ) { aTempRegion = aRegion; - aTempRegion.Exclude( Rectangle( Point( 0, 0 ), Size( mpWindowImpl->mpFrameWindow->mnOutWidth, mpWindowImpl->mpFrameWindow->mnOutHeight ) ) ); + aTempRegion.Exclude( tools::Rectangle( Point( 0, 0 ), Size( mpWindowImpl->mpFrameWindow->mnOutWidth, mpWindowImpl->mpFrameWindow->mnOutHeight ) ) ); rRegion.Union( aTempRegion ); } @@ -682,7 +682,7 @@ void Window::SaveBackground( const Point& rPos, const Size& rSize, const Point aPixPos( LogicToPixel( rPos ) ); aClip.Move( -mnOutOffX, -mnOutOffY ); - aClip.Intersect( Rectangle( aPixPos, LogicToPixel( rSize ) ) ); + aClip.Intersect( tools::Rectangle( aPixPos, LogicToPixel( rSize ) ) ); if ( !aClip.IsEmpty() ) { diff --git a/vcl/source/window/cursor.cxx b/vcl/source/window/cursor.cxx index 163c6b6289a4..819db146bc5e 100644 --- a/vcl/source/window/cursor.cxx +++ b/vcl/source/window/cursor.cxx @@ -49,7 +49,7 @@ static void ImplCursorInvert( ImplCursorData* pData ) if (bDoubleBuffering) pGuard.reset(new PaintBufferGuard(pWindow->ImplGetWindowImpl()->mpFrameData, pWindow)); vcl::RenderContext* pRenderContext = bDoubleBuffering ? pGuard->GetRenderContext() : pWindow; - Rectangle aPaintRect; + tools::Rectangle aPaintRect; bool bMapMode = pRenderContext->IsMapModeEnabled(); pRenderContext->EnableMapMode( false ); InvertFlags nInvertStyle; @@ -58,7 +58,7 @@ static void ImplCursorInvert( ImplCursorData* pData ) else nInvertStyle = InvertFlags::NONE; - Rectangle aRect( pData->maPixPos, pData->maPixSize ); + tools::Rectangle aRect( pData->maPixPos, pData->maPixSize ); if ( pData->mnDirection != CursorDirection::NONE || pData->mnOrientation || pData->mnPixSlant ) { tools::Polygon aPoly( aRect ); diff --git a/vcl/source/window/decoview.cxx b/vcl/source/window/decoview.cxx index 70589e9f05dc..4a84622b7ea6 100644 --- a/vcl/source/window/decoview.cxx +++ b/vcl/source/window/decoview.cxx @@ -32,7 +32,7 @@ using namespace std; namespace { -long AdjustRectToSquare( Rectangle &rRect ) +long AdjustRectToSquare( tools::Rectangle &rRect ) { const long nWidth = rRect.GetWidth(); const long nHeight = rRect.GetHeight(); @@ -53,7 +53,7 @@ long AdjustRectToSquare( Rectangle &rRect ) return nSide; } -void ImplDrawSymbol( OutputDevice* pDev, Rectangle nRect, const SymbolType eType ) +void ImplDrawSymbol( OutputDevice* pDev, tools::Rectangle nRect, const SymbolType eType ) { const long nSide = AdjustRectToSquare( nRect ); @@ -80,7 +80,7 @@ void ImplDrawSymbol( OutputDevice* pDev, Rectangle nRect, const SymbolType eType pDev->DrawLine( Point( aCenter.X()-i, nRect.Top() ), Point( aCenter.X()+i, nRect.Top() ) ); } - pDev->DrawRect( Rectangle( aCenter.X()-n8, nRect.Top()+1, + pDev->DrawRect( tools::Rectangle( aCenter.X()-n8, nRect.Top()+1, aCenter.X()+n8, nRect.Bottom() ) ); break; @@ -92,7 +92,7 @@ void ImplDrawSymbol( OutputDevice* pDev, Rectangle nRect, const SymbolType eType pDev->DrawLine( Point( aCenter.X()-i, nRect.Bottom() ), Point( aCenter.X()+i, nRect.Bottom() ) ); } - pDev->DrawRect( Rectangle( aCenter.X()-n8, nRect.Top(), + pDev->DrawRect( tools::Rectangle( aCenter.X()-n8, nRect.Top(), aCenter.X()+n8, nRect.Bottom()-1 ) ); break; @@ -104,7 +104,7 @@ void ImplDrawSymbol( OutputDevice* pDev, Rectangle nRect, const SymbolType eType pDev->DrawLine( Point( nRect.Left(), aCenter.Y()-i ), Point( nRect.Left(), aCenter.Y()+i ) ); } - pDev->DrawRect( Rectangle( nRect.Left()+1, aCenter.Y()-n8, + pDev->DrawRect( tools::Rectangle( nRect.Left()+1, aCenter.Y()-n8, nRect.Right(), aCenter.Y()+n8 ) ); break; @@ -116,7 +116,7 @@ void ImplDrawSymbol( OutputDevice* pDev, Rectangle nRect, const SymbolType eType pDev->DrawLine( Point( nRect.Right(), aCenter.Y()-i ), Point( nRect.Right(), aCenter.Y()+i ) ); } - pDev->DrawRect( Rectangle( nRect.Left(), aCenter.Y()-n8, + pDev->DrawRect( tools::Rectangle( nRect.Left(), aCenter.Y()-n8, nRect.Right()-1, aCenter.Y()+n8 ) ); break; @@ -270,7 +270,7 @@ void ImplDrawSymbol( OutputDevice* pDev, Rectangle nRect, const SymbolType eType Point( nRect.Right(), nRect.Bottom() ) ); SAL_FALLTHROUGH; case SymbolType::ROLLUP: - pDev->DrawRect( Rectangle( nRect.Left(), nRect.Top(), + pDev->DrawRect( tools::Rectangle( nRect.Left(), nRect.Top(), nRect.Right(), nRect.Top()+n8 ) ); break; @@ -314,7 +314,7 @@ void ImplDrawSymbol( OutputDevice* pDev, Rectangle nRect, const SymbolType eType case SymbolType::FLOAT: nRect.Right() -= n4; nRect.Top() += n4+1; - pDev->DrawRect( Rectangle( nRect.Left(), nRect.Top(), + pDev->DrawRect( tools::Rectangle( nRect.Left(), nRect.Top(), nRect.Right(), nRect.Top()+n8 ) ); pDev->DrawLine( Point( nRect.Left(), nRect.Top()+n8 ), Point( nRect.Left(), nRect.Bottom() ) ); @@ -326,7 +326,7 @@ void ImplDrawSymbol( OutputDevice* pDev, Rectangle nRect, const SymbolType eType nRect.Top() -= n4+1; nRect.Left() += n4; nRect.Bottom() -= n4+1; - pDev->DrawRect( Rectangle( nRect.Left(), nRect.Top(), + pDev->DrawRect( tools::Rectangle( nRect.Left(), nRect.Top(), nRect.Right(), nRect.Top()+n8 ) ); pDev->DrawLine( Point( nRect.Left(), nRect.Top()+n8 ), Point( nRect.Left(), nRect.Bottom() ) ); @@ -348,14 +348,14 @@ void ImplDrawSymbol( OutputDevice* pDev, Rectangle nRect, const SymbolType eType break; case SymbolType::HIDE: - pDev->DrawRect( Rectangle( nRect.Left()+n8, nRect.Bottom()-n8, + pDev->DrawRect( tools::Rectangle( nRect.Left()+n8, nRect.Bottom()-n8, nRect.Right()-n8, nRect.Bottom() ) ); break; case SymbolType::PLUS: - pDev->DrawRect( Rectangle( nRect.Left(), aCenter.Y()-n8/2, + pDev->DrawRect( tools::Rectangle( nRect.Left(), aCenter.Y()-n8/2, nRect.Right()+1, aCenter.Y()+n8/2+1 ) ); - pDev->DrawRect( Rectangle( aCenter.X()-n8/2, nRect.Top(), + pDev->DrawRect( tools::Rectangle( aCenter.X()-n8/2, nRect.Top(), aCenter.X()+n8/2+1, nRect.Bottom()+1 ) ); break; case SymbolType::DONTKNOW: @@ -364,7 +364,7 @@ void ImplDrawSymbol( OutputDevice* pDev, Rectangle nRect, const SymbolType eType } } -void ImplDrawDPILineRect( OutputDevice *const pDev, Rectangle& rRect, +void ImplDrawDPILineRect( OutputDevice *const pDev, tools::Rectangle& rRect, const Color *const pColor, const bool bRound = false ) { long nLineWidth = pDev->GetDPIX()/300; @@ -398,11 +398,11 @@ void ImplDrawDPILineRect( OutputDevice *const pDev, Rectangle& rRect, const long nHeight = rRect.GetHeight(); pDev->SetLineColor(); pDev->SetFillColor( *pColor ); - pDev->DrawRect( Rectangle( rRect.TopLeft(), Size( nWidth, nLineHeight ) ) ); - pDev->DrawRect( Rectangle( rRect.TopLeft(), Size( nLineWidth, nHeight ) ) ); - pDev->DrawRect( Rectangle( Point( rRect.Left(), rRect.Bottom()-nLineHeight ), + pDev->DrawRect( tools::Rectangle( rRect.TopLeft(), Size( nWidth, nLineHeight ) ) ); + pDev->DrawRect( tools::Rectangle( rRect.TopLeft(), Size( nLineWidth, nHeight ) ) ); + pDev->DrawRect( tools::Rectangle( Point( rRect.Left(), rRect.Bottom()-nLineHeight ), Size( nWidth, nLineHeight ) ) ); - pDev->DrawRect( Rectangle( Point( rRect.Right()-nLineWidth, rRect.Top() ), + pDev->DrawRect( tools::Rectangle( Point( rRect.Right()-nLineWidth, rRect.Top() ), Size( nLineWidth, nHeight ) ) ); } } @@ -413,7 +413,7 @@ void ImplDrawDPILineRect( OutputDevice *const pDev, Rectangle& rRect, rRect.Bottom() -= nLineHeight; } -void ImplDraw2ColorFrame( OutputDevice *const pDev, Rectangle& rRect, +void ImplDraw2ColorFrame( OutputDevice *const pDev, tools::Rectangle& rRect, const Color& rLeftTopColor, const Color& rRightBottomColor ) { pDev->SetLineColor( rLeftTopColor ); @@ -430,7 +430,7 @@ void ImplDraw2ColorFrame( OutputDevice *const pDev, Rectangle& rRect, --rRect.Bottom(); } -void ImplDrawButton( OutputDevice *const pDev, Rectangle aFillRect, +void ImplDrawButton( OutputDevice *const pDev, tools::Rectangle aFillRect, const DrawButtonFlags nStyle ) { const StyleSettings& rStyleSettings = pDev->GetSettings().GetStyleSettings(); @@ -460,16 +460,16 @@ void ImplDrawButton( OutputDevice *const pDev, Rectangle aFillRect, pDev->SetLineColor(); pDev->SetFillColor( aBlackColor ); - const Rectangle aOrigFillRect(aFillRect); + const tools::Rectangle aOrigFillRect(aFillRect); if ( nStyle & (DrawButtonFlags::Pressed | DrawButtonFlags::Checked) ) { // shrink fill rect aFillRect.Left() += aBrdSize.Width(); aFillRect.Top() += aBrdSize.Height(); // draw top and left borders (aOrigFillRect-aFillRect) - pDev->DrawRect( Rectangle( aOrigFillRect.Left(), aOrigFillRect.Top(), + pDev->DrawRect( tools::Rectangle( aOrigFillRect.Left(), aOrigFillRect.Top(), aOrigFillRect.Right(), aFillRect.Top()-1 ) ); - pDev->DrawRect( Rectangle( aOrigFillRect.Left(), aOrigFillRect.Top(), + pDev->DrawRect( tools::Rectangle( aOrigFillRect.Left(), aOrigFillRect.Top(), aFillRect.Left()-1, aOrigFillRect.Bottom() ) ); } else @@ -478,9 +478,9 @@ void ImplDrawButton( OutputDevice *const pDev, Rectangle aFillRect, aFillRect.Right() -= aBrdSize.Width(); aFillRect.Bottom() -= aBrdSize.Height(); // draw bottom and right borders (aOrigFillRect-aFillRect) - pDev->DrawRect( Rectangle( aOrigFillRect.Left(), aFillRect.Bottom()+1, + pDev->DrawRect( tools::Rectangle( aOrigFillRect.Left(), aFillRect.Bottom()+1, aOrigFillRect.Right(), aOrigFillRect.Bottom() ) ); - pDev->DrawRect( Rectangle( aFillRect.Right()+1, aOrigFillRect.Top(), + pDev->DrawRect( tools::Rectangle( aFillRect.Right()+1, aOrigFillRect.Top(), aOrigFillRect.Right(), aOrigFillRect.Bottom() ) ); } @@ -561,7 +561,7 @@ void ImplDrawButton( OutputDevice *const pDev, Rectangle aFillRect, } } -void ImplDrawFrame( OutputDevice *const pDev, Rectangle& rRect, +void ImplDrawFrame( OutputDevice *const pDev, tools::Rectangle& rRect, const StyleSettings& rStyleSettings, DrawFrameStyle nStyle, DrawFrameFlags nFlags ) { vcl::Window *const pWin = (pDev->GetOutDevType()==OUTDEV_WINDOW) ? static_cast<vcl::Window*>(pDev) : nullptr; @@ -600,8 +600,8 @@ void ImplDrawFrame( OutputDevice *const pDev, Rectangle& rRect, DrawFrameFlags::BorderWindowBorder : DrawFrameFlags::NONE); ImplControlValue aControlValue( nControlFlags ); - Rectangle aBound, aContent; - Rectangle aNatRgn( rRect ); + tools::Rectangle aBound, aContent; + tools::Rectangle aNatRgn( rRect ); if( pWin->GetNativeControlRegion(ControlType::Frame, ControlPart::Border, aNatRgn, ControlState::NONE, aControlValue, OUString(), aBound, aContent) ) { @@ -684,10 +684,10 @@ void ImplDrawFrame( OutputDevice *const pDev, Rectangle& rRect, case DrawFrameStyle::Group: pDev->SetFillColor(); pDev->SetLineColor( rStyleSettings.GetLightColor() ); - pDev->DrawRect( Rectangle( rRect.Left()+1, rRect.Top()+1, + pDev->DrawRect( tools::Rectangle( rRect.Left()+1, rRect.Top()+1, rRect.Right(), rRect.Bottom() ) ); pDev->SetLineColor( rStyleSettings.GetShadowColor() ); - pDev->DrawRect( Rectangle( rRect.Left(), rRect.Top(), + pDev->DrawRect( tools::Rectangle( rRect.Left(), rRect.Top(), rRect.Right()-1, rRect.Bottom()-1 ) ); // adjust target rectangle @@ -776,11 +776,11 @@ DecorationView::DecorationView(OutputDevice* pOutDev) : mpOutDev(pOutDev) {} -void DecorationView::DrawSymbol( const Rectangle& rRect, SymbolType eType, +void DecorationView::DrawSymbol( const tools::Rectangle& rRect, SymbolType eType, const Color& rColor, DrawSymbolFlags nStyle ) { const StyleSettings& rStyleSettings = mpOutDev->GetSettings().GetStyleSettings(); - const Rectangle aRect = mpOutDev->LogicToPixel( rRect ); + const tools::Rectangle aRect = mpOutDev->LogicToPixel( rRect ); const Color aOldLineColor = mpOutDev->GetLineColor(); const Color aOldFillColor = mpOutDev->GetFillColor(); const bool bOldMapMode = mpOutDev->IsMapModeEnabled(); @@ -819,11 +819,11 @@ void DecorationView::DrawSymbol( const Rectangle& rRect, SymbolType eType, mpOutDev->EnableMapMode( bOldMapMode ); } -void DecorationView::DrawFrame( const Rectangle& rRect, +void DecorationView::DrawFrame( const tools::Rectangle& rRect, const Color& rLeftTopColor, const Color& rRightBottomColor ) { - Rectangle aRect = mpOutDev->LogicToPixel( rRect ); + tools::Rectangle aRect = mpOutDev->LogicToPixel( rRect ); const Color aOldLineColor = mpOutDev->GetLineColor(); const bool bOldMapMode = mpOutDev->IsMapModeEnabled(); mpOutDev->EnableMapMode( false ); @@ -832,7 +832,7 @@ void DecorationView::DrawFrame( const Rectangle& rRect, mpOutDev->EnableMapMode( bOldMapMode ); } -void DecorationView::DrawHighlightFrame( const Rectangle& rRect, +void DecorationView::DrawHighlightFrame( const tools::Rectangle& rRect, DrawHighlightFrameStyle nStyle ) { const StyleSettings& rStyleSettings = mpOutDev->GetSettings().GetStyleSettings(); @@ -880,9 +880,9 @@ void DecorationView::DrawHighlightFrame( const Rectangle& rRect, DrawFrame( rRect, aLightColor, aShadowColor ); } -Rectangle DecorationView::DrawFrame( const Rectangle& rRect, DrawFrameStyle nStyle, DrawFrameFlags nFlags ) +tools::Rectangle DecorationView::DrawFrame( const tools::Rectangle& rRect, DrawFrameStyle nStyle, DrawFrameFlags nFlags ) { - Rectangle aRect = rRect; + tools::Rectangle aRect = rRect; bool bOldMap = mpOutDev->IsMapModeEnabled(); if ( bOldMap ) { @@ -913,14 +913,14 @@ Rectangle DecorationView::DrawFrame( const Rectangle& rRect, DrawFrameStyle nSty return aRect; } -Rectangle DecorationView::DrawButton( const Rectangle& rRect, DrawButtonFlags nStyle ) +tools::Rectangle DecorationView::DrawButton( const tools::Rectangle& rRect, DrawButtonFlags nStyle ) { if ( rRect.IsEmpty() ) { return rRect; } - Rectangle aRect = rRect; + tools::Rectangle aRect = rRect; const bool bOldMap = mpOutDev->IsMapModeEnabled(); if ( bOldMap ) @@ -1003,7 +1003,7 @@ void DecorationView::DrawSeparator( const Point& rStart, const Point& rStop, boo bool nativeSupported = pWin->IsNativeControlSupported( ControlType::Fixedline, nPart ); ImplControlValue aValue; ControlState nState = ControlState::NONE; - Rectangle aRect(rStart,rStop); + tools::Rectangle aRect(rStart,rStop); if(nativeSupported && pWin->DrawNativeControl(ControlType::Fixedline,nPart,aRect,nState,aValue,OUString())) return; } @@ -1033,7 +1033,7 @@ void DecorationView::DrawSeparator( const Point& rStart, const Point& rStop, boo mpOutDev->Pop(); } -void DecorationView::DrawHandle(const Rectangle& rRect) +void DecorationView::DrawHandle(const tools::Rectangle& rRect) { const StyleSettings& rStyleSettings = mpOutDev->GetSettings().GetStyleSettings(); @@ -1054,8 +1054,8 @@ void DecorationView::DrawHandle(const Rectangle& rRect) for (long i = 1; i <= nNumberOfPoints; i++) { - Rectangle aLocation; - aLocation = Rectangle(nHalfWidth - nRadius, + tools::Rectangle aLocation; + aLocation = tools::Rectangle(nHalfWidth - nRadius, round(fDistance * i) - nRadius, nHalfWidth + nRadius, round(fDistance * i) + nRadius); diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx index 2371d88fe73a..e66155d1cc60 100644 --- a/vcl/source/window/dialog.cxx +++ b/vcl/source/window/dialog.cxx @@ -1161,7 +1161,7 @@ void Dialog::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, Dra else { pDev->SetFillColor( aWallpaper.GetColor() ); - pDev->DrawRect( Rectangle( aPos, aSize ) ); + pDev->DrawRect( tools::Rectangle( aPos, aSize ) ); } if (!( GetStyle() & WB_NOBORDER )) @@ -1172,7 +1172,7 @@ void Dialog::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, Dra aImplWin->SetDisplayActive( true ); aImplWin->InitView(); - aImplWin->Draw( Rectangle( aPos, aSize ), pDev, aPos ); + aImplWin->Draw( tools::Rectangle( aPos, aSize ), pDev, aPos ); } pDev->Pop(); diff --git a/vcl/source/window/dockingarea.cxx b/vcl/source/window/dockingarea.cxx index f23fc4da10b6..3ed68fc7a1ec 100644 --- a/vcl/source/window/dockingarea.cxx +++ b/vcl/source/window/dockingarea.cxx @@ -138,7 +138,7 @@ void DockingAreaWindow::ApplySettings(vcl::RenderContext& rRenderContext) if (pMenubarWin) nMenubarHeight = pMenubarWin->GetOutputHeightPixel(); } - aWallpaper.SetRect(Rectangle(Point(0, -nMenubarHeight), + aWallpaper.SetRect(tools::Rectangle(Point(0, -nMenubarHeight), Size(rRenderContext.GetOutputWidthPixel(), rRenderContext.GetOutputHeightPixel() + nMenubarHeight))); @@ -155,7 +155,7 @@ void DockingAreaWindow::ApplySettings(vcl::RenderContext& rRenderContext) } -void DockingAreaWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangle&) +void DockingAreaWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&) { const StyleSettings rSetting = rRenderContext.GetSettings().GetStyleSettings(); @@ -179,7 +179,7 @@ void DockingAreaWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangl else if (!ImplGetSVData()->maNWFData.mbDockingAreaSeparateTB) { // draw a single toolbar background covering the whole docking area - Rectangle aCtrlRegion(Point(), GetOutputSizePixel()); + tools::Rectangle aCtrlRegion(Point(), GetOutputSizePixel()); rRenderContext.DrawNativeControl(ControlType::Toolbar, IsHorizontal() ? ControlPart::DrawBackgroundHorz : ControlPart::DrawBackgroundVert, aCtrlRegion, nState, aControlValue, OUString() ); @@ -195,7 +195,7 @@ void DockingAreaWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangl { Point aPos = pChild->GetPosPixel(); Size aSize = pChild->GetSizePixel(); - Rectangle aRect(aPos, aSize); + tools::Rectangle aRect(aPos, aSize); rRenderContext.SetLineColor(rRenderContext.GetSettings().GetStyleSettings().GetLightColor()); rRenderContext.DrawLine(aRect.TopLeft(), aRect.TopRight()); @@ -229,7 +229,7 @@ void DockingAreaWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangl std::map<int, int>::const_iterator it; for (it = ranges.begin(); it != ranges.end(); ++it) { - Rectangle aTBRect; + tools::Rectangle aTBRect; if (IsHorizontal()) { aTBRect.Left() = 0; diff --git a/vcl/source/window/dockmgr.cxx b/vcl/source/window/dockmgr.cxx index 2c92d7d984a3..a68d5b1fbd6d 100644 --- a/vcl/source/window/dockmgr.cxx +++ b/vcl/source/window/dockmgr.cxx @@ -46,7 +46,7 @@ private: Idle maDockIdle; Idle maEndDockIdle; Point maDockPos; - Rectangle maDockRect; + tools::Rectangle maDockRect; bool mbInMove; ImplSVEvent * mnLastUserEvent; @@ -169,7 +169,7 @@ IMPL_LINK_NOARG(ImplDockFloatWin2, DockingHdl, void*, void) vcl::Window *pBorder = GetWindow( GetWindowType::Border ); if( pBorder != this ) { - Rectangle aBorderRect( Point(), pBorder->GetSizePixel() ); + tools::Rectangle aBorderRect( Point(), pBorder->GetSizePixel() ); sal_Int32 nLeft, nTop, nRight, nBottom; GetBorder( nLeft, nTop, nRight, nBottom ); // limit borderrect to the caption part only and without the resizing borders @@ -192,7 +192,7 @@ IMPL_LINK_NOARG(ImplDockFloatWin2, DockingHdl, void*, void) bRealMove ) { maDockPos = Point( pDockingArea->OutputToScreenPixel( pDockingArea->AbsoluteScreenToOutputPixel( OutputToAbsoluteScreenPixel( Point() ) ) ) ); - maDockRect = Rectangle( maDockPos, mpDockWin->GetSizePixel() ); + maDockRect = tools::Rectangle( maDockPos, mpDockWin->GetSizePixel() ); // mouse pos in screen pixels Point aMousePos = pDockingArea->OutputToScreenPixel( aState.maPos ); @@ -417,12 +417,12 @@ void DockingManager::SetPosSizePixel( vcl::Window *pWindow, long nX, long nY, pWrapper->setPosSizePixel( nX, nY, nWidth, nHeight, nFlags ); } -Rectangle DockingManager::GetPosSizePixel( const vcl::Window *pWindow ) +tools::Rectangle DockingManager::GetPosSizePixel( const vcl::Window *pWindow ) { - Rectangle aRect; + tools::Rectangle aRect; ImplDockingWindowWrapper* pWrapper = GetDockingWindowWrapper( pWindow ); if( pWrapper ) - aRect = Rectangle( pWrapper->GetPosPixel(), pWrapper->GetSizePixel() ); + aRect = tools::Rectangle( pWrapper->GetPosPixel(), pWrapper->GetSizePixel() ); return aRect; } @@ -443,14 +443,14 @@ public: virtual void dispose() override; virtual css::uno::Reference< css::accessibility::XAccessible > CreateAccessible() override; - virtual void Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) override; + virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) override; virtual void MouseMove( const MouseEvent& rMEvt ) override; virtual void MouseButtonDown( const MouseEvent& rMEvt ) override; virtual void MouseButtonUp( const MouseEvent& rMEvt ) override; virtual void Tracking( const TrackingEvent& rTEvt ) override; virtual void Resize() override; - Rectangle GetDragRect() const; + tools::Rectangle GetDragRect() const; Point GetToolboxPosition() const; void DrawGrip(vcl::RenderContext& rRenderContext); void DrawBorder(vcl::RenderContext& rRenderContext); @@ -513,11 +513,11 @@ void ImplPopupFloatWin::Resize() ImplSetBorder(); } -Rectangle ImplPopupFloatWin::GetDragRect() const +tools::Rectangle ImplPopupFloatWin::GetDragRect() const { if( !hasGrip() ) - return Rectangle(); - return Rectangle( 1, 1, GetOutputSizePixel().Width() - 1, + return tools::Rectangle(); + return tools::Rectangle( 1, 1, GetOutputSizePixel().Width() - 1, 2 + ToolBox::ImplGetDragWidth( *this, false ) ); } @@ -530,11 +530,11 @@ Point ImplPopupFloatWin::GetToolboxPosition() const void ImplPopupFloatWin::DrawBorder(vcl::RenderContext& rRenderContext) { rRenderContext.SetFillColor(); - Rectangle aRect( Point(), GetOutputSizePixel() ); + tools::Rectangle aRect( Point(), GetOutputSizePixel() ); vcl::Region oldClipRgn( GetClipRegion( ) ); vcl::Region aClipRgn( aRect ); - Rectangle aItemClipRect( ImplGetItemEdgeClipRect() ); + tools::Rectangle aItemClipRect( ImplGetItemEdgeClipRect() ); if( !aItemClipRect.IsEmpty() ) { aItemClipRect.SetPos( AbsoluteScreenToOutputPixel( aItemClipRect.TopLeft() ) ); @@ -575,7 +575,7 @@ void ImplPopupFloatWin::DrawGrip(vcl::RenderContext& rRenderContext) rRenderContext.SetFillColor(); } -void ImplPopupFloatWin::Paint(vcl::RenderContext& rRenderContext, const Rectangle&) +void ImplPopupFloatWin::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&) { DrawBorder(rRenderContext); if (hasGrip()) @@ -737,7 +737,7 @@ bool ImplDockingWindowWrapper::ImplStartDocking( const Point& rPos ) // mouse pos in screen pixels Point aMousePos = pDockingArea->OutputToScreenPixel( aState.maPos ); Point aDockPos = Point( pDockingArea->AbsoluteScreenToOutputPixel( GetWindow()->OutputToAbsoluteScreenPixel( GetWindow()->GetPosPixel() ) ) ); - Rectangle aDockRect( aDockPos, GetWindow()->GetSizePixel() ); + tools::Rectangle aDockRect( aDockPos, GetWindow()->GetSizePixel() ); StartDocking( aMousePos, aDockRect ); GetWindow()->ImplUpdateAll(); @@ -759,11 +759,11 @@ void ImplDockingWindowWrapper::Tracking( const TrackingEvent& rTEvt ) if ( rTEvt.IsTrackingCanceled() ) { mbDockCanceled = true; - EndDocking( Rectangle( Point( mnTrackX, mnTrackY ), Size( mnTrackWidth, mnTrackHeight ) ), mbLastFloatMode ); + EndDocking( tools::Rectangle( Point( mnTrackX, mnTrackY ), Size( mnTrackWidth, mnTrackHeight ) ), mbLastFloatMode ); mbDockCanceled = false; } else - EndDocking( Rectangle( Point( mnTrackX, mnTrackY ), Size( mnTrackWidth, mnTrackHeight ) ), mbLastFloatMode ); + EndDocking( tools::Rectangle( Point( mnTrackX, mnTrackY ), Size( mnTrackWidth, mnTrackHeight ) ), mbLastFloatMode ); } // Docking only upon non-synthetic MouseEvents else if ( !rTEvt.GetMouseEvent().IsSynthetic() || rTEvt.GetMouseEvent().IsModifierChanged() ) @@ -783,8 +783,8 @@ void ImplDockingWindowWrapper::Tracking( const TrackingEvent& rTEvt ) aMousePos.X() -= maMouseOff.X(); aMousePos.Y() -= maMouseOff.Y(); Point aPos = GetWindow()->ImplOutputToFrame( aMousePos ); - Rectangle aTrackRect( aPos, Size( mnTrackWidth, mnTrackHeight ) ); - Rectangle aCompRect = aTrackRect; + tools::Rectangle aTrackRect( aPos, Size( mnTrackWidth, mnTrackHeight ) ); + tools::Rectangle aCompRect = aTrackRect; aPos.X() += maMouseOff.X(); aPos.Y() += maMouseOff.Y(); @@ -817,7 +817,7 @@ void ImplDockingWindowWrapper::Tracking( const TrackingEvent& rTEvt ) nTrackStyle = ShowTrackFlags::Object; else nTrackStyle = ShowTrackFlags::Big; - Rectangle aShowTrackRect = aTrackRect; + tools::Rectangle aShowTrackRect = aTrackRect; aShowTrackRect.SetPos( GetWindow()->ImplFrameToOutput( aShowTrackRect.TopLeft() ) ); GetWindow()->ShowTracking( aShowTrackRect, nTrackStyle ); @@ -834,7 +834,7 @@ void ImplDockingWindowWrapper::Tracking( const TrackingEvent& rTEvt ) } } -void ImplDockingWindowWrapper::StartDocking( const Point& rPoint, Rectangle& rRect ) +void ImplDockingWindowWrapper::StartDocking( const Point& rPoint, tools::Rectangle& rRect ) { DockingData data( rPoint, rRect, IsFloatingMode() ); @@ -842,7 +842,7 @@ void ImplDockingWindowWrapper::StartDocking( const Point& rPoint, Rectangle& rRe mbDocking = true; } -bool ImplDockingWindowWrapper::Docking( const Point& rPoint, Rectangle& rRect ) +bool ImplDockingWindowWrapper::Docking( const Point& rPoint, tools::Rectangle& rRect ) { DockingData data( rPoint, rRect, IsFloatingMode() ); @@ -851,9 +851,9 @@ bool ImplDockingWindowWrapper::Docking( const Point& rPoint, Rectangle& rRect ) return data.mbFloating; } -void ImplDockingWindowWrapper::EndDocking( const Rectangle& rRect, bool bFloatMode ) +void ImplDockingWindowWrapper::EndDocking( const tools::Rectangle& rRect, bool bFloatMode ) { - Rectangle aRect( rRect ); + tools::Rectangle aRect( rRect ); bool bOrigDockCanceled = mbDockCanceled; if (bFloatMode && !StyleSettings::GetDockingFloatsSupported()) @@ -1220,7 +1220,7 @@ bool ImplDockingWindowWrapper::IsFloatingMode() const return (mpFloatWin != nullptr); } -void ImplDockingWindowWrapper::SetDragArea( const Rectangle& rRect ) +void ImplDockingWindowWrapper::SetDragArea( const tools::Rectangle& rRect ) { maDragArea = rRect; } diff --git a/vcl/source/window/dockwin.cxx b/vcl/source/window/dockwin.cxx index ced4ec955b36..4f61ff8aed92 100644 --- a/vcl/source/window/dockwin.cxx +++ b/vcl/source/window/dockwin.cxx @@ -58,7 +58,7 @@ private: sal_uInt64 mnLastTicks; Idle maDockIdle; Point maDockPos; - Rectangle maDockRect; + tools::Rectangle maDockRect; bool mbInMove; ImplSVEvent * mnLastUserEvent; @@ -160,7 +160,7 @@ IMPL_LINK_NOARG(ImplDockFloatWin, DockingHdl, void*, void) if( ! mpDockWin->IsDocking() ) mpDockWin->StartDocking(); - maDockRect = Rectangle( maDockPos, mpDockWin->GetSizePixel() ); + maDockRect = tools::Rectangle( maDockPos, mpDockWin->GetSizePixel() ); // mouse pos also in screen pixels Point aMousePos = mpDockWin->GetParent()->OutputToScreenPixel( aState.maPos ); @@ -420,7 +420,7 @@ void DockingWindow::Tracking( const TrackingEvent& rTEvt ) if ( rTEvt.IsTrackingCanceled() ) { StartDocking(); - Rectangle aRect( Point( mnTrackX, mnTrackY ), Size( mnTrackWidth, mnTrackHeight ) ); + tools::Rectangle aRect( Point( mnTrackX, mnTrackY ), Size( mnTrackWidth, mnTrackHeight ) ); EndDocking( aRect, mbStartFloat ); } } @@ -430,11 +430,11 @@ void DockingWindow::Tracking( const TrackingEvent& rTEvt ) if ( rTEvt.IsTrackingCanceled() ) { mbDockCanceled = true; - EndDocking( Rectangle( Point( mnTrackX, mnTrackY ), Size( mnTrackWidth, mnTrackHeight ) ), mbLastFloatMode ); + EndDocking( tools::Rectangle( Point( mnTrackX, mnTrackY ), Size( mnTrackWidth, mnTrackHeight ) ), mbLastFloatMode ); mbDockCanceled = false; } else - EndDocking( Rectangle( Point( mnTrackX, mnTrackY ), Size( mnTrackWidth, mnTrackHeight ) ), mbLastFloatMode ); + EndDocking( tools::Rectangle( Point( mnTrackX, mnTrackY ), Size( mnTrackWidth, mnTrackHeight ) ), mbLastFloatMode ); } } // dock only for non-synthetic MouseEvents @@ -455,8 +455,8 @@ void DockingWindow::Tracking( const TrackingEvent& rTEvt ) aMousePos.X() -= maMouseOff.X(); aMousePos.Y() -= maMouseOff.Y(); Point aFramePos = ImplOutputToFrame( aMousePos ); - Rectangle aTrackRect( aFramePos, Size( mnTrackWidth, mnTrackHeight ) ); - Rectangle aCompRect = aTrackRect; + tools::Rectangle aTrackRect( aFramePos, Size( mnTrackWidth, mnTrackHeight ) ); + tools::Rectangle aCompRect = aTrackRect; aFramePos.X() += maMouseOff.X(); aFramePos.Y() += maMouseOff.Y(); if ( mbDragFull ) @@ -502,7 +502,7 @@ void DockingWindow::Tracking( const TrackingEvent& rTEvt ) nTrackStyle = ShowTrackFlags::Big; else nTrackStyle = ShowTrackFlags::Object; - Rectangle aShowTrackRect = aTrackRect; + tools::Rectangle aShowTrackRect = aTrackRect; aShowTrackRect.SetPos( ImplFrameToOutput( aShowTrackRect.TopLeft() ) ); ShowTracking( aShowTrackRect, nTrackStyle ); @@ -578,12 +578,12 @@ void DockingWindow::StartDocking() mbDocking = true; } -bool DockingWindow::Docking( const Point&, Rectangle& ) +bool DockingWindow::Docking( const Point&, tools::Rectangle& ) { return IsFloatingMode(); } -void DockingWindow::EndDocking( const Rectangle& rRect, bool bFloatMode ) +void DockingWindow::EndDocking( const tools::Rectangle& rRect, bool bFloatMode ) { bool bOrigDockCanceled = mbDockCanceled; if (bFloatMode && !StyleSettings::GetDockingFloatsSupported()) diff --git a/vcl/source/window/floatwin.cxx b/vcl/source/window/floatwin.cxx index 4337969fc07f..9b27d56b6617 100644 --- a/vcl/source/window/floatwin.cxx +++ b/vcl/source/window/floatwin.cxx @@ -39,7 +39,7 @@ public: ImplData(); VclPtr<ToolBox> mpBox; - Rectangle maItemEdgeClipRect; // used to clip the common edge between a toolbar item and the border of this window + tools::Rectangle maItemEdgeClipRect; // used to clip the common edge between a toolbar item and the border of this window }; FloatingWindow::ImplData::ImplData() @@ -47,7 +47,7 @@ FloatingWindow::ImplData::ImplData() mpBox = nullptr; } -Rectangle& FloatingWindow::ImplGetItemEdgeClipRect() +tools::Rectangle& FloatingWindow::ImplGetItemEdgeClipRect() { return mpImplData->maItemEdgeClipRect; } @@ -225,19 +225,19 @@ void FloatingWindow::dispose() SystemWindow::dispose(); } -Point FloatingWindow::CalcFloatingPosition( vcl::Window* pWindow, const Rectangle& rRect, FloatWinPopupFlags nFlags, sal_uInt16& rArrangeIndex ) +Point FloatingWindow::CalcFloatingPosition( vcl::Window* pWindow, const tools::Rectangle& rRect, FloatWinPopupFlags nFlags, sal_uInt16& rArrangeIndex ) { return ImplCalcPos( pWindow, rRect, nFlags, rArrangeIndex ); } Point FloatingWindow::ImplCalcPos( vcl::Window* pWindow, - const Rectangle& rRect, FloatWinPopupFlags nFlags, + const tools::Rectangle& rRect, FloatWinPopupFlags nFlags, sal_uInt16& rArrangeIndex ) { // get window position Point aPos; Size aSize = ::isLayoutEnabled(pWindow) ? pWindow->get_preferred_size() : pWindow->GetSizePixel(); - Rectangle aScreenRect = pWindow->ImplGetFrameWindow()->GetDesktopRectPixel(); + tools::Rectangle aScreenRect = pWindow->ImplGetFrameWindow()->GetDesktopRectPixel(); FloatingWindow *pFloatingWindow = dynamic_cast<FloatingWindow*>( pWindow ); // convert.... @@ -245,15 +245,15 @@ Point FloatingWindow::ImplCalcPos( vcl::Window* pWindow, if ( pW->mpWindowImpl->mpRealParent ) pW = pW->mpWindowImpl->mpRealParent; - Rectangle normRect( rRect ); // rRect is already relative to top-level window + tools::Rectangle normRect( rRect ); // rRect is already relative to top-level window normRect.SetPos( pW->ScreenToOutputPixel( normRect.TopLeft() ) ); bool bRTL = AllSettings::GetLayoutRTL(); - Rectangle devRect( pW->OutputToAbsoluteScreenPixel( normRect.TopLeft() ), + tools::Rectangle devRect( pW->OutputToAbsoluteScreenPixel( normRect.TopLeft() ), pW->OutputToAbsoluteScreenPixel( normRect.BottomRight() ) ); - Rectangle devRectRTL( devRect ); + tools::Rectangle devRectRTL( devRect ); if( bRTL ) // create a rect that can be compared to desktop coordinates devRectRTL = pW->ImplOutputToUnmirroredAbsoluteScreenPixel( normRect ); @@ -431,7 +431,7 @@ Point FloatingWindow::ImplCalcPos( vcl::Window* pWindow, if( pFloatingWindow ) { pFloatingWindow->mpImplData->maItemEdgeClipRect = - Rectangle( e1, e2 ); + tools::Rectangle( e1, e2 ); } // caller expects coordinates relative to top-level win @@ -451,7 +451,7 @@ Point FloatingWindow::ImplConvertToAbsPos(vcl::Window* pReference, const Point& // --- RTL --- re-mirror back to get device coordinates pWindowOutDev->ReMirror( aAbsolute ); - Rectangle aRect( pReference->ScreenToOutputPixel(aAbsolute), Size(1,1) ) ; + tools::Rectangle aRect( pReference->ScreenToOutputPixel(aAbsolute), Size(1,1) ) ; aRect = pReference->ImplOutputToUnmirroredAbsoluteScreenPixel( aRect ); aAbsolute = aRect.TopLeft(); } @@ -462,9 +462,9 @@ Point FloatingWindow::ImplConvertToAbsPos(vcl::Window* pReference, const Point& return aAbsolute; } -Rectangle FloatingWindow::ImplConvertToAbsPos(vcl::Window* pReference, const Rectangle& rRect) +tools::Rectangle FloatingWindow::ImplConvertToAbsPos(vcl::Window* pReference, const tools::Rectangle& rRect) { - Rectangle aFloatRect = rRect; + tools::Rectangle aFloatRect = rRect; const OutputDevice *pParentWinOutDev = pReference->GetOutDev(); @@ -498,7 +498,7 @@ FloatingWindow* FloatingWindow::ImplFloatHitTest( vcl::Window* pReference, const vcl::Window *pBorderWin = pWin->GetWindow( GetWindowType::Border ); Point aPt; // the top-left corner in output coordinates ie (0,0) - Rectangle devRect( pBorderWin->ImplOutputToUnmirroredAbsoluteScreenPixel( Rectangle( aPt, pBorderWin->GetSizePixel()) ) ) ; + tools::Rectangle devRect( pBorderWin->ImplOutputToUnmirroredAbsoluteScreenPixel( tools::Rectangle( aPt, pBorderWin->GetSizePixel()) ) ) ; if ( devRect.IsInside( aAbsolute ) ) { rHitTest = HITTEST_WINDOW; @@ -651,7 +651,7 @@ void FloatingWindow::SetTitleType( FloatWinTitleType nTitle ) } } -void FloatingWindow::StartPopupMode( const Rectangle& rRect, FloatWinPopupFlags nFlags ) +void FloatingWindow::StartPopupMode( const tools::Rectangle& rRect, FloatWinPopupFlags nFlags ) { if ( IsRollUp() ) RollDown(); @@ -717,7 +717,7 @@ void FloatingWindow::StartPopupMode( ToolBox* pBox, FloatWinPopupFlags nFlags ) pBox->ImplFloatControl( true, this ); // retrieve some data from the ToolBox - Rectangle aRect = nItemId ? pBox->GetItemRect( nItemId ) : pBox->GetOverflowRect(); + tools::Rectangle aRect = nItemId ? pBox->GetItemRect( nItemId ) : pBox->GetOverflowRect(); Point aPos; // convert to parent's screen coordinates aPos = GetParent()->OutputToScreenPixel( GetParent()->AbsoluteScreenToOutputPixel( pBox->OutputToAbsoluteScreenPixel( aRect.TopLeft() ) ) ); diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx index 785ec06f13bb..d5a61d4e42f0 100644 --- a/vcl/source/window/layout.cxx +++ b/vcl/source/window/layout.cxx @@ -2585,7 +2585,7 @@ void VclVPaned::arrange(const Size& rAllocation, long nFirstHeight, long nSecond void VclVPaned::setAllocation(const Size& rAllocation) { //supporting "shrink" could be done by adjusting the allowed drag rectangle - m_pSplitter->SetDragRectPixel(Rectangle(Point(0, 0), rAllocation)); + m_pSplitter->SetDragRectPixel(tools::Rectangle(Point(0, 0), rAllocation)); Size aSplitterSize(rAllocation.Width(), getLayoutRequisition(*m_pSplitter).Height()); const long nHeight = rAllocation.Height() - aSplitterSize.Height(); @@ -2646,7 +2646,7 @@ Size VclVPaned::calculateRequisition() const Size getLegacyBestSizeForChildren(const vcl::Window &rWindow) { - Rectangle aBounds; + tools::Rectangle aBounds; for (const vcl::Window* pChild = rWindow.GetWindow(GetWindowType::FirstChild); pChild; pChild = pChild->GetWindow(GetWindowType::Next)) @@ -2654,7 +2654,7 @@ Size getLegacyBestSizeForChildren(const vcl::Window &rWindow) if (!pChild->IsVisible()) continue; - Rectangle aChildBounds(pChild->GetPosPixel(), pChild->GetSizePixel()); + tools::Rectangle aChildBounds(pChild->GetPosPixel(), pChild->GetSizePixel()); aBounds.Union(aChildBounds); } diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx index 76a64324ae8b..cda664076440 100644 --- a/vcl/source/window/menu.cxx +++ b/vcl/source/window/menu.cxx @@ -77,7 +77,7 @@ struct MenuLayoutData : public ControlLayoutData { std::vector< sal_uInt16 > m_aLineItemIds; std::vector< sal_uInt16 > m_aLineItemPositions; - std::map< sal_uInt16, Rectangle > m_aVisibleItemBoundRects; + std::map< sal_uInt16, tools::Rectangle > m_aVisibleItemBoundRects; }; } @@ -981,7 +981,7 @@ void Menu::EnableItem( sal_uInt16 nItemId, bool bEnable ) MenuItemData* pData = pItemList->GetDataFromPos( n ); if ( n == nPos ) { - pWin->Invalidate( Rectangle( Point( nX, 0 ), Size( pData->aSz.Width(), pData->aSz.Height() ) ) ); + pWin->Invalidate( tools::Rectangle( Point( nX, 0 ), Size( pData->aSz.Width(), pData->aSz.Height() ) ) ); break; } nX += pData->aSz.Width(); @@ -1368,10 +1368,10 @@ Size Menu::ImplGetNativeCheckAndRadioSize(vcl::RenderContext& rRenderContext, lo if (!IsMenuBar()) { ImplControlValue aVal; - Rectangle aNativeBounds; - Rectangle aNativeContent; + tools::Rectangle aNativeBounds; + tools::Rectangle aNativeContent; - Rectangle aCtrlRegion(Rectangle(Point(), Size(100, 15))); + tools::Rectangle aCtrlRegion(tools::Rectangle(Point(), Size(100, 15))); if (rRenderContext.IsNativeControlSupported(ControlType::MenuPopup, ControlPart::MenuItemCheckMark)) { if (rRenderContext.GetNativeControlRegion(ControlType::MenuPopup, ControlPart::MenuItemCheckMark, @@ -1399,9 +1399,9 @@ Size Menu::ImplGetNativeCheckAndRadioSize(vcl::RenderContext& rRenderContext, lo bool Menu::ImplGetNativeSubmenuArrowSize(vcl::RenderContext& rRenderContext, Size& rArrowSize, long& rArrowSpacing) { ImplControlValue aVal; - Rectangle aNativeBounds; - Rectangle aNativeContent; - Rectangle aCtrlRegion(Rectangle(Point(), Size(100, 15))); + tools::Rectangle aNativeBounds; + tools::Rectangle aNativeContent; + tools::Rectangle aCtrlRegion(tools::Rectangle(Point(), Size(100, 15))); if (rRenderContext.IsNativeControlSupported(ControlType::MenuPopup, ControlPart::SubmenuArrow)) { if (rRenderContext.GetNativeControlRegion(ControlType::MenuPopup, ControlPart::SubmenuArrow, @@ -1592,7 +1592,7 @@ Size Menu::ImplCalcSize( vcl::Window* pWin ) pWin->SetFont(aFont); // Compute text bounding box - Rectangle aTextBoundRect; + tools::Rectangle aTextBoundRect; pWin->GetTextBoundRect(aTextBoundRect, aTitleText); // Vertically, one height of char + extra space for decoration @@ -1612,7 +1612,7 @@ Size Menu::ImplCalcSize( vcl::Window* pWin ) // TODO: move GetScreenNumber from SystemWindow to Window ? // currently we rely on internal privileges unsigned int nDisplayScreen = pWin->ImplGetWindowImpl()->mpFrame->maGeometry.nDisplayScreenNumber; - Rectangle aDispRect( Application::GetScreenPosSizePixel( nDisplayScreen ) ); + tools::Rectangle aDispRect( Application::GetScreenPosSizePixel( nDisplayScreen ) ); long nScreenWidth = aDispRect.GetWidth() >= 800 ? aDispRect.GetWidth() : 800; if( nMaxWidth > nScreenWidth/2 ) nMaxWidth = nScreenWidth/2; @@ -1643,10 +1643,10 @@ Size Menu::ImplCalcSize( vcl::Window* pWin ) if( pWindow->IsNativeControlSupported( ControlType::Menubar, ControlPart::Entire ) ) { ImplControlValue aVal; - Rectangle aNativeBounds; - Rectangle aNativeContent; + tools::Rectangle aNativeBounds; + tools::Rectangle aNativeContent; Point tmp( 0, 0 ); - Rectangle aCtrlRegion( tmp, Size( 100, 15 ) ); + tools::Rectangle aCtrlRegion( tmp, Size( 100, 15 ) ); if( pWindow->GetNativeControlRegion( ControlType::Menubar, ControlPart::Entire, aCtrlRegion, @@ -1676,13 +1676,13 @@ Size Menu::ImplCalcSize( vcl::Window* pWin ) return aSz; } -static void ImplPaintCheckBackground(vcl::RenderContext& rRenderContext, vcl::Window& rWindow, const Rectangle& i_rRect, bool i_bHighlight) +static void ImplPaintCheckBackground(vcl::RenderContext& rRenderContext, vcl::Window& rWindow, const tools::Rectangle& i_rRect, bool i_bHighlight) { bool bNativeOk = false; if (rRenderContext.IsNativeControlSupported(ControlType::Toolbar, ControlPart::Button)) { ImplControlValue aControlValue; - Rectangle aCtrlRegion( i_rRect ); + tools::Rectangle aCtrlRegion( i_rRect ); ControlState nState = ControlState::PRESSED | ControlState::ENABLED; aControlValue.setTristateVal(ButtonValue::On); @@ -1720,7 +1720,7 @@ static OUString getShortenedString( const OUString& i_rLong, vcl::RenderContext& return aNonMnem; } -void Menu::ImplPaintMenuTitle(vcl::RenderContext& rRenderContext, const Rectangle& rRect ) const +void Menu::ImplPaintMenuTitle(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect ) const { // Save previous graphical settings, set new one rRenderContext.Push(PushFlags::FONT | PushFlags::FILLCOLOR); @@ -1734,7 +1734,7 @@ void Menu::ImplPaintMenuTitle(vcl::RenderContext& rRenderContext, const Rectangl rRenderContext.SetFont(aFont); // Draw background rectangle - Rectangle aBgRect(rRect); + tools::Rectangle aBgRect(rRect); int nOuterSpaceX = ImplGetSVData()->maNWFData.mnMenuFormatBorderX; aBgRect.setX(aBgRect.getX() + SPACE_AROUND_TITLE); aBgRect.setWidth(aBgRect.getWidth() - 2 * SPACE_AROUND_TITLE - 2 * nOuterSpaceX); @@ -1744,7 +1744,7 @@ void Menu::ImplPaintMenuTitle(vcl::RenderContext& rRenderContext, const Rectangl // Draw the text centered Point aTextTopLeft(aBgRect.TopLeft()); - Rectangle aTextBoundRect; + tools::Rectangle aTextBoundRect; rRenderContext.GetTextBoundRect( aTextBoundRect, aTitleText ); aTextTopLeft.X() += (aBgRect.getWidth() - aTextBoundRect.GetSize().Width()) / 2; aTextTopLeft.Y() += (aBgRect.GetHeight() - aTextBoundRect.GetSize().Height()) / 2 @@ -1792,7 +1792,7 @@ void Menu::ImplPaint(vcl::RenderContext& rRenderContext, // Paint title if (!pThisItemOnly && !IsMenuBar() && nTitleHeight > 0) - ImplPaintMenuTitle(rRenderContext, Rectangle(aTopLeft, aOutSz)); + ImplPaintMenuTitle(rRenderContext, tools::Rectangle(aTopLeft, aOutSz)); for (size_t n = 0; n < nCount; n++) { @@ -1864,7 +1864,7 @@ void Menu::ImplPaint(vcl::RenderContext& rRenderContext, aMpos.X() += nSepPad; Size aSz(pData->aSz); aSz.Width() = aOutSz.Width() - 2*nOuterSpaceX - 2 * nSepPad; - Rectangle aItemRect(aMpos, aSz); + tools::Rectangle aItemRect(aMpos, aSz); MenupopupValue aVal(nTextPos - GUTTERBORDER, aItemRect); bNativeOk = rRenderContext.DrawNativeControl(ControlType::MenuPopup, ControlPart::Separator, aItemRect, nState, aVal, OUString()); @@ -1882,7 +1882,7 @@ void Menu::ImplPaint(vcl::RenderContext& rRenderContext, } } - Rectangle aOuterCheckRect(Point(aPos.X()+nImgOrChkPos, aPos.Y()), + tools::Rectangle aOuterCheckRect(Point(aPos.X()+nImgOrChkPos, aPos.Y()), Size(pData->aSz.Height(), pData->aSz.Height())); aOuterCheckRect.Left() += 1; aOuterCheckRect.Right() -= 1; @@ -1924,10 +1924,10 @@ void Menu::ImplPaint(vcl::RenderContext& rRenderContext, aTmpPos.X() = aOuterCheckRect.Left() + (aOuterCheckRect.GetWidth() - nCtrlHeight) / 2; aTmpPos.Y() = aOuterCheckRect.Top() + (aOuterCheckRect.GetHeight() - nCtrlHeight) / 2; - Rectangle aCheckRect(aTmpPos, Size(nCtrlHeight, nCtrlHeight)); + tools::Rectangle aCheckRect(aTmpPos, Size(nCtrlHeight, nCtrlHeight)); Size aSz(pData->aSz); aSz.Width() = aOutSz.Width() - 2 * nOuterSpaceX; - Rectangle aItemRect(aPos, aSz); + tools::Rectangle aItemRect(aPos, aSz); MenupopupValue aVal(nTextPos - GUTTERBORDER, aItemRect); rRenderContext.DrawNativeControl(ControlType::MenuPopup, nPart, aCheckRect, nState, aVal, OUString()); @@ -1950,7 +1950,7 @@ void Menu::ImplPaint(vcl::RenderContext& rRenderContext, } aTmpPos.X() = aOuterCheckRect.Left() + (aOuterCheckRect.GetWidth() - aSymbolSize.Width()) / 2; aTmpPos.Y() = aOuterCheckRect.Top() + (aOuterCheckRect.GetHeight() - aSymbolSize.Height()) / 2; - Rectangle aRect(aTmpPos, aSymbolSize); + tools::Rectangle aRect(aTmpPos, aSymbolSize); aDecoView.DrawSymbol(aRect, eSymbol, rRenderContext.GetTextColor(), nSymbolStyle); } } @@ -2063,7 +2063,7 @@ void Menu::ImplPaint(vcl::RenderContext& rRenderContext, aTmpPos.Y() = aPos.Y() + ( pData->aSz.Height() - aTmpSz.Height() ) / 2; aTmpPos.Y() += nExtra / 2; - Rectangle aItemRect(aTmpPos, aTmpSz); + tools::Rectangle aItemRect(aTmpPos, aTmpSz); MenupopupValue aVal(nTextPos - GUTTERBORDER, aItemRect); bNativeOk = rRenderContext.DrawNativeControl(ControlType::MenuPopup, ControlPart::SubmenuArrow, aItemRect, nState, aVal, OUString()); @@ -2079,11 +2079,11 @@ void Menu::ImplPaint(vcl::RenderContext& rRenderContext, rRenderContext.SetTextColor(rSettings.GetMenuTextColor()); Point aTmpPos2(aPos); aTmpPos2.X() = aOutSz.Width() - nFontHeight - nFontHeight/4; - aDecoView.DrawFrame(Rectangle(aTmpPos2, Size(nFontHeight + nFontHeight / 4, + aDecoView.DrawFrame(tools::Rectangle(aTmpPos2, Size(nFontHeight + nFontHeight / 4, pData->aSz.Height())), DrawFrameStyle::Group); } - aDecoView.DrawSymbol(Rectangle(aTmpPos, Size(nFontHeight / 2, nFontHeight / 2)), + aDecoView.DrawSymbol(tools::Rectangle(aTmpPos, Size(nFontHeight / 2, nFontHeight / 2)), SymbolType::SPIN_RIGHT, rRenderContext.GetTextColor(), nSymbolStyle); } } @@ -2101,9 +2101,9 @@ void Menu::ImplPaint(vcl::RenderContext& rRenderContext, if( bLayout ) { if (!IsMenuBar()) - mpLayoutData->m_aVisibleItemBoundRects[ n ] = Rectangle(aTopLeft, Size(aOutSz.Width(), pData->aSz.Height())); + mpLayoutData->m_aVisibleItemBoundRects[ n ] = tools::Rectangle(aTopLeft, Size(aOutSz.Width(), pData->aSz.Height())); else - mpLayoutData->m_aVisibleItemBoundRects[ n ] = Rectangle(aTopLeft, pData->aSz); + mpLayoutData->m_aVisibleItemBoundRects[ n ] = tools::Rectangle(aTopLeft, pData->aSz); } } @@ -2117,7 +2117,7 @@ void Menu::ImplPaint(vcl::RenderContext& rRenderContext, { Size aLogoSz = pLogo->aBitmap.GetSizePixel(); - Rectangle aRect(Point(), Point(aLogoSz.Width() - 1, aOutSz.Height())); + tools::Rectangle aRect(Point(), Point(aLogoSz.Width() - 1, aOutSz.Height())); if (rRenderContext.GetColorCount() >= 256) { Gradient aGrad(GradientStyle::Linear, pLogo->aStartColor, pLogo->aEndColor); @@ -2283,7 +2283,7 @@ void Menu::ImplFillLayoutData() const } } -Rectangle Menu::GetCharacterBounds( sal_uInt16 nItemID, long nIndex ) const +tools::Rectangle Menu::GetCharacterBounds( sal_uInt16 nItemID, long nIndex ) const { long nItemIndex = -1; if( ! mpLayoutData ) @@ -2299,7 +2299,7 @@ Rectangle Menu::GetCharacterBounds( sal_uInt16 nItemID, long nIndex ) const } } } - return (mpLayoutData && nItemIndex != -1) ? mpLayoutData->GetCharacterBounds( nItemIndex+nIndex ) : Rectangle(); + return (mpLayoutData && nItemIndex != -1) ? mpLayoutData->GetCharacterBounds( nItemIndex+nIndex ) : tools::Rectangle(); } long Menu::GetIndexForPoint( const Point& rPoint, sal_uInt16& rItemID ) const @@ -2326,15 +2326,15 @@ long Menu::GetIndexForPoint( const Point& rPoint, sal_uInt16& rItemID ) const return nIndex; } -Rectangle Menu::GetBoundingRectangle( sal_uInt16 nPos ) const +tools::Rectangle Menu::GetBoundingRectangle( sal_uInt16 nPos ) const { - Rectangle aRet; + tools::Rectangle aRet; if (!mpLayoutData ) ImplFillLayoutData(); if (mpLayoutData) { - std::map< sal_uInt16, Rectangle >::const_iterator it = mpLayoutData->m_aVisibleItemBoundRects.find( nPos ); + std::map< sal_uInt16, tools::Rectangle >::const_iterator it = mpLayoutData->m_aVisibleItemBoundRects.find( nPos ); if( it != mpLayoutData->m_aVisibleItemBoundRects.end() ) aRet = it->second; } @@ -2707,10 +2707,10 @@ void MenuBar::RemoveMenuBarButton( sal_uInt16 nId ) pMenuWin->RemoveMenuBarButton(nId); } -Rectangle MenuBar::GetMenuBarButtonRectPixel( sal_uInt16 nId ) +tools::Rectangle MenuBar::GetMenuBarButtonRectPixel( sal_uInt16 nId ) { MenuBarWindow* pMenuWin = getMenuBarWindow(); - return pMenuWin ? pMenuWin->GetMenuBarButtonRectPixel(nId) : Rectangle(); + return pMenuWin ? pMenuWin->GetMenuBarButtonRectPixel(nId) : tools::Rectangle(); } bool MenuBar::HandleMenuButtonEvent( Menu *, sal_uInt16 i_nButtonId ) @@ -2845,10 +2845,10 @@ void PopupMenu::SetSelectedEntry( sal_uInt16 nId ) sal_uInt16 PopupMenu::Execute( vcl::Window* pExecWindow, const Point& rPopupPos ) { - return Execute( pExecWindow, Rectangle( rPopupPos, rPopupPos ), PopupMenuFlags::ExecuteDown ); + return Execute( pExecWindow, tools::Rectangle( rPopupPos, rPopupPos ), PopupMenuFlags::ExecuteDown ); } -sal_uInt16 PopupMenu::Execute( vcl::Window* pExecWindow, const Rectangle& rRect, PopupMenuFlags nFlags ) +sal_uInt16 PopupMenu::Execute( vcl::Window* pExecWindow, const tools::Rectangle& rRect, PopupMenuFlags nFlags ) { ENSURE_OR_RETURN( pExecWindow, "PopupMenu::Execute: need a non-NULL window!", 0 ); @@ -2886,7 +2886,7 @@ void PopupMenu::ImplFlushPendingSelect() } } -sal_uInt16 PopupMenu::ImplExecute( const VclPtr<vcl::Window>& pW, const Rectangle& rRect, FloatWinPopupFlags nPopupModeFlags, Menu* pSFrom, bool bPreSelectFirst ) +sal_uInt16 PopupMenu::ImplExecute( const VclPtr<vcl::Window>& pW, const tools::Rectangle& rRect, FloatWinPopupFlags nPopupModeFlags, Menu* pSFrom, bool bPreSelectFirst ) { if ( !pSFrom && ( PopupMenu::IsInExecute() || !GetItemCount() ) ) return 0; @@ -2920,7 +2920,7 @@ sal_uInt16 PopupMenu::ImplExecute( const VclPtr<vcl::Window>& pW, const Rectangl } SAL_WARN_IF( ImplGetWindow(), "vcl", "Win?!" ); - Rectangle aRect( rRect ); + tools::Rectangle aRect( rRect ); aRect.SetPos( pW->OutputToScreenPixel( aRect.TopLeft() ) ); WinBits nStyle = WB_BORDER; @@ -2986,7 +2986,7 @@ sal_uInt16 PopupMenu::ImplExecute( const VclPtr<vcl::Window>& pW, const Rectangl Size aSz = ImplCalcSize( pWin ); - Rectangle aDesktopRect(pWin->GetDesktopRectPixel()); + tools::Rectangle aDesktopRect(pWin->GetDesktopRectPixel()); if( Application::GetScreenCount() > 1 && Application::IsUnifiedDisplay() ) { vcl::Window* pDeskW = pWindow->GetWindow( GetWindowType::RealParent ); @@ -2994,7 +2994,7 @@ sal_uInt16 PopupMenu::ImplExecute( const VclPtr<vcl::Window>& pW, const Rectangl pDeskW = pWindow; Point aDesktopTL( pDeskW->OutputToAbsoluteScreenPixel( aRect.TopLeft() ) ); aDesktopRect = Application::GetScreenPosSizePixel( - Application::GetBestScreen( Rectangle( aDesktopTL, aRect.GetSize() ) )); + Application::GetBestScreen( tools::Rectangle( aDesktopTL, aRect.GetSize() ) )); } long nMaxHeight = aDesktopRect.GetHeight(); @@ -3009,7 +3009,7 @@ sal_uInt16 PopupMenu::ImplExecute( const VclPtr<vcl::Window>& pW, const Rectangl if ( pRef->GetParent() ) pRef = pRef->GetParent(); - Rectangle devRect( pRef->OutputToAbsoluteScreenPixel( aRect.TopLeft() ), + tools::Rectangle devRect( pRef->OutputToAbsoluteScreenPixel( aRect.TopLeft() ), pRef->OutputToAbsoluteScreenPixel( aRect.BottomRight() ) ); long nHeightAbove = devRect.Top() - aDesktopRect.Top(); diff --git a/vcl/source/window/menubarwindow.cxx b/vcl/source/window/menubarwindow.cxx index 876edcdc51d7..e1f50c0b5632 100644 --- a/vcl/source/window/menubarwindow.cxx +++ b/vcl/source/window/menubarwindow.cxx @@ -102,8 +102,8 @@ void DecoToolBox::SetImages( long nMaxHeight, bool bForce ) aBmpExDst.Erase( aEraseColor ); aBmpExDst.SetSizePixel( Size( lastSize, lastSize ) ); - Rectangle aSrcRect( Point(0,0), maImage.GetSizePixel() ); - Rectangle aDestRect( Point((lastSize - maImage.GetSizePixel().Width())/2, + tools::Rectangle aSrcRect( Point(0,0), maImage.GetSizePixel() ); + tools::Rectangle aDestRect( Point((lastSize - maImage.GetSizePixel().Width())/2, (lastSize - maImage.GetSizePixel().Height())/2 ), maImage.GetSizePixel() ); @@ -320,7 +320,7 @@ void MenuBarWindow::ImplCreatePopup( bool bPreSelectFirst ) // #99071# do not grab the focus, otherwise it will be restored to the menubar // when the frame is reactivated later //GrabFocus(); - pActivePopup->ImplExecute( this, Rectangle( aItemTopLeft, aItemBottomRight ), FloatWinPopupFlags::Down | FloatWinPopupFlags::NoHorzPlacement, pMenu, bPreSelectFirst ); + pActivePopup->ImplExecute( this, tools::Rectangle( aItemTopLeft, aItemBottomRight ), FloatWinPopupFlags::Down | FloatWinPopupFlags::NoHorzPlacement, pMenu, bPreSelectFirst ); // does not have a window, if aborted before or if there are no entries if ( pActivePopup->ImplGetFloatingWindow() ) pActivePopup->ImplGetFloatingWindow()->AddPopupModeWindow( this ); @@ -569,7 +569,7 @@ static void ImplAddNWFSeparator(vcl::RenderContext& rRenderContext, const Size& rRenderContext.SetLineColor(rRenderContext.GetSettings().GetStyleSettings().GetSeparatorColor()); Point aPt; - Rectangle aRect(aPt, rSize); + tools::Rectangle aRect(aPt, rSize); rRenderContext.DrawLine(aRect.BottomLeft(), aRect.BottomRight()); } } @@ -589,7 +589,7 @@ void MenuBarWindow::HighlightItem(vcl::RenderContext& rRenderContext, sal_uInt16 if (pData->eType != MenuItemType::SEPARATOR) { // #107747# give menuitems the height of the menubar - Rectangle aRect = Rectangle(Point(nX, 1), Size(pData->aSz.Width(), GetOutputSizePixel().Height() - 2)); + tools::Rectangle aRect = tools::Rectangle(Point(nX, 1), Size(pData->aSz.Width(), GetOutputSizePixel().Height() - 2)); rRenderContext.Push(PushFlags::CLIPREGION); rRenderContext.IntersectClipRegion(aRect); bool bRollover, bHighlight; @@ -614,7 +614,7 @@ void MenuBarWindow::HighlightItem(vcl::RenderContext& rRenderContext, sal_uInt16 Erase(rRenderContext); else { - Rectangle aBgRegion(Point(), GetOutputSizePixel()); + tools::Rectangle aBgRegion(Point(), GetOutputSizePixel()); rRenderContext.DrawNativeControl(ControlType::Menubar, ControlPart::Entire, aBgRegion, ControlState::ENABLED, aControlValue, OUString()); } @@ -649,9 +649,9 @@ void MenuBarWindow::HighlightItem(vcl::RenderContext& rRenderContext, sal_uInt16 } } -Rectangle MenuBarWindow::ImplGetItemRect( sal_uInt16 nPos ) +tools::Rectangle MenuBarWindow::ImplGetItemRect( sal_uInt16 nPos ) { - Rectangle aRect; + tools::Rectangle aRect; if( pMenu ) { long nX = 0; @@ -663,7 +663,7 @@ Rectangle MenuBarWindow::ImplGetItemRect( sal_uInt16 nPos ) { if ( pData->eType != MenuItemType::SEPARATOR ) // #107747# give menuitems the height of the menubar - aRect = Rectangle( Point( nX, 1 ), Size( pData->aSz.Width(), GetOutputSizePixel().Height()-2 ) ); + aRect = tools::Rectangle( Point( nX, 1 ), Size( pData->aSz.Width(), GetOutputSizePixel().Height()-2 ) ); break; } @@ -848,7 +848,7 @@ bool MenuBarWindow::HandleKeyEvent( const KeyEvent& rKEvent, bool bFromMenu ) return bDone; } -void MenuBarWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangle&) +void MenuBarWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&) { if (!pMenu) return; @@ -872,7 +872,7 @@ void MenuBarWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangle&) else { Point aPt; - Rectangle aCtrlRegion( aPt, GetOutputSizePixel() ); + tools::Rectangle aCtrlRegion( aPt, GetOutputSizePixel() ); rRenderContext.DrawNativeControl(ControlType::Menubar, ControlPart::Entire, aCtrlRegion, ControlState::ENABLED, aMenubarValue, OUString()); @@ -963,7 +963,7 @@ void MenuBarWindow::RequestHelp( const HelpEvent& rHEvt ) if ( rHEvt.GetMode() & (HelpEventMode::CONTEXT | HelpEventMode::EXTENDED) ) ChangeHighlightItem( ITEMPOS_INVALID, true ); - Rectangle aHighlightRect( ImplGetItemRect( nHighlightedItem ) ); + tools::Rectangle aHighlightRect( ImplGetItemRect( nHighlightedItem ) ); if( !ImplHandleHelpEvent( this, pMenu, nId, rHEvt, aHighlightRect ) ) Window::RequestHelp( rHEvt ); } @@ -1143,18 +1143,18 @@ void MenuBarWindow::SetMenuBarButtonHighlightHdl( sal_uInt16 nId, const Link<Men it->second.m_aHighlightLink = rLink; } -Rectangle MenuBarWindow::GetMenuBarButtonRectPixel( sal_uInt16 nId ) +tools::Rectangle MenuBarWindow::GetMenuBarButtonRectPixel( sal_uInt16 nId ) { - Rectangle aRect; + tools::Rectangle aRect; if( m_aAddButtons.find( nId ) != m_aAddButtons.end() ) { if( pMenu->mpSalMenu ) { aRect = pMenu->mpSalMenu->GetMenuBarButtonRectPixel( nId, ImplGetWindowImpl()->mpFrame ); - if( aRect == Rectangle( Point( -1, -1 ), Size( 1, 1 ) ) ) + if( aRect == tools::Rectangle( Point( -1, -1 ), Size( 1, 1 ) ) ) { // system menu button is somewhere but location cannot be determined - return Rectangle(); + return tools::Rectangle(); } } diff --git a/vcl/source/window/menubarwindow.hxx b/vcl/source/window/menubarwindow.hxx index 86f0192785ec..e1e3d36cb8b9 100644 --- a/vcl/source/window/menubarwindow.hxx +++ b/vcl/source/window/menubarwindow.hxx @@ -92,7 +92,7 @@ private: sal_uInt16 ImplFindEntry( const Point& rMousePos ) const; void ImplCreatePopup( bool bPreSelectFirst ); bool HandleKeyEvent(const KeyEvent& rKEvent, bool bFromMenu = true); - Rectangle ImplGetItemRect( sal_uInt16 nPos ); + tools::Rectangle ImplGetItemRect( sal_uInt16 nPos ); void ImplInitStyleSettings(); @@ -118,7 +118,7 @@ public: virtual void MouseButtonDown( const MouseEvent& rMEvt ) override; virtual void MouseButtonUp( const MouseEvent& rMEvt ) override; virtual void KeyInput( const KeyEvent& rKEvent ) override; - virtual void Paint( vcl::RenderContext& rRenderContext, const Rectangle& rRect ) override; + virtual void Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect ) override; virtual void Resize() override; virtual void RequestHelp( const HelpEvent& rHEvt ) override; @@ -136,7 +136,7 @@ public: /// Add an arbitrary button to the menubar that will appear next to the close button. sal_uInt16 AddMenuBarButton(const Image&, const Link<MenuBar::MenuBarButtonCallbackArg&,bool>&, const OUString&); void SetMenuBarButtonHighlightHdl(sal_uInt16 nId, const Link<MenuBar::MenuBarButtonCallbackArg&,bool>&); - Rectangle GetMenuBarButtonRectPixel(sal_uInt16 nId); + tools::Rectangle GetMenuBarButtonRectPixel(sal_uInt16 nId); void RemoveMenuBarButton(sal_uInt16 nId); bool HandleMenuButtonEvent(sal_uInt16 i_nButtonId); void SetMBWHideAccel(bool val) { mbHideAccel = val; } diff --git a/vcl/source/window/menufloatingwindow.cxx b/vcl/source/window/menufloatingwindow.cxx index 67d430cd9e3d..2c27e57ec775 100644 --- a/vcl/source/window/menufloatingwindow.cxx +++ b/vcl/source/window/menufloatingwindow.cxx @@ -98,7 +98,7 @@ void MenuFloatingWindow::doShutdown() // so this can be taken into account if the commandhandler performs a scroll operation if( GetParent() ) { - Rectangle aInvRect( GetWindowExtentsRelative( GetParent() ) ); + tools::Rectangle aInvRect( GetWindowExtentsRelative( GetParent() ) ); GetParent()->Invalidate( aInvRect ); } pMenu = nullptr; @@ -168,7 +168,7 @@ vcl::Region MenuFloatingWindow::ImplCalcClipRegion( bool bIncludeLogo ) const { Size aOutSz = GetOutputSizePixel(); Point aPos; - Rectangle aRect( aPos, aOutSz ); + tools::Rectangle aRect( aPos, aOutSz ); aRect.Top() += nScrollerHeight; aRect.Bottom() -= nScrollerHeight; @@ -177,7 +177,7 @@ vcl::Region MenuFloatingWindow::ImplCalcClipRegion( bool bIncludeLogo ) const vcl::Region aRegion(aRect); if ( pMenu && pMenu->pLogo && bIncludeLogo && nScrollerHeight ) - aRegion.Union( Rectangle( Point(), Size( pMenu->pLogo->aBitmap.GetSizePixel().Width(), aOutSz.Height() ) ) ); + aRegion.Union( tools::Rectangle( Point(), Size( pMenu->pLogo->aBitmap.GetSizePixel().Width(), aOutSz.Height() ) ) ); return aRegion; } @@ -354,7 +354,7 @@ IMPL_LINK( MenuFloatingWindow, HighlightChanged, Timer*, pTimer, void ) Menu* pTest = pActivePopup; FloatWinPopupFlags nOldFlags = GetPopupModeFlags(); SetPopupModeFlags( GetPopupModeFlags() | FloatWinPopupFlags::NoAppFocusClose ); - sal_uInt16 nRet = pActivePopup->ImplExecute( this, Rectangle( aItemTopLeft, aItemBottomRight ), FloatWinPopupFlags::Right, pMenu, pTimer == nullptr ); + sal_uInt16 nRet = pActivePopup->ImplExecute( this, tools::Rectangle( aItemTopLeft, aItemBottomRight ), FloatWinPopupFlags::Right, pMenu, pTimer == nullptr ); SetPopupModeFlags( nOldFlags ); // nRet != 0, wenn es waerend Activate() abgeschossen wurde... @@ -780,7 +780,7 @@ void MenuFloatingWindow::InvalidateItem(sal_uInt16 nPos) if (n == nPos) { Size aWidth( GetSizePixel() ); - Rectangle aRect(Point(0, nY), Size(aWidth.Width(), nHeight)); + tools::Rectangle aRect(Point(0, nY), Size(aWidth.Width(), nHeight)); Invalidate( aRect ); } nY += nHeight; @@ -816,7 +816,7 @@ void MenuFloatingWindow::RenderHighlightItem(vcl::RenderContext& rRenderContext, Color oldLineColor; bool bDrawItemRect = true; - Rectangle aItemRect(Point(nX + nOuterSpaceX, nY), Size(aSz.Width() - 2 * nOuterSpaceX, pData->aSz.Height())); + tools::Rectangle aItemRect(Point(nX + nOuterSpaceX, nY), Size(aSz.Width() - 2 * nOuterSpaceX, pData->aSz.Height())); if (pData->nBits & MenuItemBits::POPUPSELECT) { long nFontHeight = GetTextHeight(); @@ -827,8 +827,8 @@ void MenuFloatingWindow::RenderHighlightItem(vcl::RenderContext& rRenderContext, { Size aPxSize(GetOutputSizePixel()); rRenderContext.Push(PushFlags::CLIPREGION); - rRenderContext.IntersectClipRegion(Rectangle(Point(nX, nY), Size(aSz.Width(), pData->aSz.Height()))); - Rectangle aCtrlRect(Point(nX, 0), Size(aPxSize.Width()-nX, aPxSize.Height())); + rRenderContext.IntersectClipRegion(tools::Rectangle(Point(nX, nY), Size(aSz.Width(), pData->aSz.Height()))); + tools::Rectangle aCtrlRect(Point(nX, 0), Size(aPxSize.Width()-nX, aPxSize.Height())); MenupopupValue aVal(pMenu->nTextPos-GUTTERBORDER, aItemRect); rRenderContext.DrawNativeControl(ControlType::MenuPopup, ControlPart::Entire, aCtrlRect, ControlState::ENABLED, aVal, OUString()); @@ -873,12 +873,12 @@ void MenuFloatingWindow::RenderHighlightItem(vcl::RenderContext& rRenderContext, } } -Rectangle MenuFloatingWindow::ImplGetItemRect( sal_uInt16 nPos ) +tools::Rectangle MenuFloatingWindow::ImplGetItemRect( sal_uInt16 nPos ) { if( ! pMenu ) - return Rectangle(); + return tools::Rectangle(); - Rectangle aRect; + tools::Rectangle aRect; Size aSz = GetOutputSizePixel(); long nStartY = ImplGetStartY(); long nY = nScrollerHeight+nStartY; @@ -896,7 +896,7 @@ Rectangle MenuFloatingWindow::ImplGetItemRect( sal_uInt16 nPos ) SAL_WARN_IF( !pMenu->ImplIsVisible( n ), "vcl", "ImplGetItemRect: Item not visible!" ); if ( pData->eType != MenuItemType::SEPARATOR ) { - aRect = Rectangle( Point( nX, nY ), Size( aSz.Width(), pData->aSz.Height() ) ); + aRect = tools::Rectangle( Point( nX, nY ), Size( aSz.Width(), pData->aSz.Height() ) ); if ( pData->nBits & MenuItemBits::POPUPSELECT ) { long nFontHeight = GetTextHeight(); @@ -1166,7 +1166,7 @@ void MenuFloatingWindow::KeyInput( const KeyEvent& rKEvent ) } } -void MenuFloatingWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangle &rPaintRect) +void MenuFloatingWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle &rPaintRect) { if (!pMenu) return; @@ -1182,7 +1182,7 @@ void MenuFloatingWindow::Paint(vcl::RenderContext& rRenderContext, const Rectang aPxSize.Width() -= nX; ImplControlValue aVal(pMenu->nTextPos - GUTTERBORDER); rRenderContext.DrawNativeControl(ControlType::MenuPopup, ControlPart::Entire, - Rectangle(Point(nX, 0), aPxSize), + tools::Rectangle(Point(nX, 0), aPxSize), ControlState::ENABLED, aVal, OUString()); InitMenuClipRegion(rRenderContext); } @@ -1209,7 +1209,7 @@ void MenuFloatingWindow::ImplDrawScroller(vcl::RenderContext& rRenderContext, bo Size aOutSz(GetOutputSizePixel()); long nY = bUp ? 0 : (aOutSz.Height() - nScrollerHeight); long nX = pMenu->pLogo ? pMenu->pLogo->aBitmap.GetSizePixel().Width() : 0; - Rectangle aRect(Point(nX, nY), Size(aOutSz.Width() - nX, nScrollerHeight)); + tools::Rectangle aRect(Point(nX, nY), Size(aOutSz.Width() - nX, nScrollerHeight)); DecorationView aDecoView(&rRenderContext); SymbolType eSymbol = bUp ? SymbolType::SPIN_UP : SymbolType::SPIN_DOWN; @@ -1230,7 +1230,7 @@ void MenuFloatingWindow::RequestHelp( const HelpEvent& rHEvt ) vcl::Window* pW = this; // #102618# Get item rect before destroying the window in EndExecute() call - Rectangle aHighlightRect( ImplGetItemRect( nHighlightedItem ) ); + tools::Rectangle aHighlightRect( ImplGetItemRect( nHighlightedItem ) ); if ( rHEvt.GetMode() & (HelpEventMode::CONTEXT | HelpEventMode::EXTENDED) ) { diff --git a/vcl/source/window/menufloatingwindow.hxx b/vcl/source/window/menufloatingwindow.hxx index 97d676e2f6bb..d53a92964fe3 100644 --- a/vcl/source/window/menufloatingwindow.hxx +++ b/vcl/source/window/menufloatingwindow.hxx @@ -79,7 +79,7 @@ protected: void ImplCursorUpDown( bool bUp, bool bHomeEnd = false ); void ImplHighlightItem( const MouseEvent& rMEvt, bool bMBDown ); long ImplGetStartY() const; - Rectangle ImplGetItemRect( sal_uInt16 nPos ); + tools::Rectangle ImplGetItemRect( sal_uInt16 nPos ); void RenderHighlightItem( vcl::RenderContext& rRenderContext, sal_uInt16 nPos ); long GetInitialItemY( long *pOptStartY = nullptr ) const; void InvalidateItem( sal_uInt16 nPos ); @@ -96,7 +96,7 @@ public: virtual void MouseButtonUp(const MouseEvent& rMEvt) override; virtual void KeyInput(const KeyEvent& rKEvent) override; virtual void Command(const CommandEvent& rCEvt) override; - virtual void Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) override; + virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) override; virtual void RequestHelp( const HelpEvent& rHEvt ) override; virtual void Resize() override; diff --git a/vcl/source/window/menuwindow.cxx b/vcl/source/window/menuwindow.cxx index 83ca0b610975..baa81fbbdb99 100644 --- a/vcl/source/window/menuwindow.cxx +++ b/vcl/source/window/menuwindow.cxx @@ -38,7 +38,7 @@ static sal_uLong ImplChangeTipTimeout( sal_uLong nTimeout, vcl::Window *pWindow } bool MenuWindow::ImplHandleHelpEvent(vcl::Window* pMenuWindow, Menu* pMenu, sal_uInt16 nHighlightedItem, - const HelpEvent& rHEvt, const Rectangle &rHighlightRect) + const HelpEvent& rHEvt, const tools::Rectangle &rHighlightRect) { if( ! pMenu ) return false; @@ -61,7 +61,7 @@ bool MenuWindow::ImplHandleHelpEvent(vcl::Window* pMenuWindow, Menu* pMenu, sal_ else aPos = rHEvt.GetMousePosPixel(); - Rectangle aRect( aPos, Size() ); + tools::Rectangle aRect( aPos, Size() ); if (!pMenu->GetHelpText(nId).isEmpty()) Help::ShowBalloon( pMenuWindow, aPos, aRect, pMenu->GetHelpText( nId ) ); else @@ -77,7 +77,7 @@ bool MenuWindow::ImplHandleHelpEvent(vcl::Window* pMenuWindow, Menu* pMenu, sal_ else if ( ( rHEvt.GetMode() &HelpEventMode::QUICK ) && pMenuWindow ) { Point aPos = rHEvt.GetMousePosPixel(); - Rectangle aRect( aPos, Size() ); + tools::Rectangle aRect( aPos, Size() ); // give user a chance to read the full filename sal_uLong oldTimeout=ImplChangeTipTimeout( 60000, pMenuWindow ); // call always, even when strlen==0 to correctly remove tip diff --git a/vcl/source/window/menuwindow.hxx b/vcl/source/window/menuwindow.hxx index a61b41ec0ea6..8fa78e138007 100644 --- a/vcl/source/window/menuwindow.hxx +++ b/vcl/source/window/menuwindow.hxx @@ -29,7 +29,7 @@ class HelpEvent; class Image; class Menu; class MenuBar; -class Rectangle; +namespace tools { class Rectangle; } namespace vcl { class Window; } /** Common ancestor for MenuFloatingWindow and MenuBarWindow. @@ -53,7 +53,7 @@ class MenuWindow protected: /// Show the appropriate help tooltip. static bool ImplHandleHelpEvent(vcl::Window* pMenuWindow, Menu* pMenu, sal_uInt16 nHighlightedItem, - const HelpEvent& rHEvt, const Rectangle &rHighlightRect); + const HelpEvent& rHEvt, const tools::Rectangle &rHighlightRect); }; #endif // INCLUDED_VCL_SOURCE_WINDOW_MENUWINDOW_HXX diff --git a/vcl/source/window/mouse.cxx b/vcl/source/window/mouse.cxx index 7efe8741bb7c..090b2e3e73fd 100644 --- a/vcl/source/window/mouse.cxx +++ b/vcl/source/window/mouse.cxx @@ -59,7 +59,7 @@ WindowHitTest Window::ImplHitTest( const Point& rFramePos ) const OutputDevice *pOutDev = GetOutDev(); pOutDev->ReMirror( aFramePos ); } - Rectangle aRect( Point( mnOutOffX, mnOutOffY ), Size( mnOutWidth, mnOutHeight ) ); + tools::Rectangle aRect( Point( mnOutOffX, mnOutOffY ), Size( mnOutWidth, mnOutHeight ) ); if ( !aRect.IsInside( aFramePos ) ) return WindowHitTest::NONE; if ( mpWindowImpl->mbWinRegion ) @@ -84,7 +84,7 @@ bool Window::ImplTestMousePointerSet() return true; // if the mouse is over the window, switch it - Rectangle aClientRect( Point( 0, 0 ), GetOutputSizePixel() ); + tools::Rectangle aClientRect( Point( 0, 0 ), GetOutputSizePixel() ); if ( aClientRect.IsInside( GetPointerPosPixel() ) ) return true; @@ -177,7 +177,7 @@ IMPL_LINK_NOARG(Window, ImplGenerateMouseMoveHdl, void*, void) } } -void Window::ImplInvertFocus( const Rectangle& rRect ) +void Window::ImplInvertFocus( const tools::Rectangle& rRect ) { InvertTracking( rRect, ShowTrackFlags::Small | ShowTrackFlags::TrackWindow ); } diff --git a/vcl/source/window/msgbox.cxx b/vcl/source/window/msgbox.cxx index 81862e62aa4f..1686a9378fda 100644 --- a/vcl/source/window/msgbox.cxx +++ b/vcl/source/window/msgbox.cxx @@ -175,8 +175,8 @@ void MessBox::ImplPosControls() } TextRectInfo aTextInfo; - Rectangle aRect( 0, 0, 30000, 30000 ); - Rectangle aFormatRect; + tools::Rectangle aRect( 0, 0, 30000, 30000 ); + tools::Rectangle aFormatRect; Point aTextPos( IMPL_DIALOG_OFFSET, IMPL_DIALOG_OFFSET+IMPL_MSGBOX_OFFSET_EXTRA_Y ); Size aImageSize; Size aPageSize; diff --git a/vcl/source/window/openglwin.cxx b/vcl/source/window/openglwin.cxx index 7d20fd777ad4..1deb2e47618f 100644 --- a/vcl/source/window/openglwin.cxx +++ b/vcl/source/window/openglwin.cxx @@ -88,7 +88,7 @@ OpenGLContext& OpenGLWindow::getContext() return mxImpl->getContext(); } -void OpenGLWindow::Paint(vcl::RenderContext& /*rRenderContext*/, const Rectangle&) +void OpenGLWindow::Paint(vcl::RenderContext& /*rRenderContext*/, const tools::Rectangle&) { if(mpRenderer) mpRenderer->update(); diff --git a/vcl/source/window/paint.cxx b/vcl/source/window/paint.cxx index 955153bc9ef7..d321ed97b916 100644 --- a/vcl/source/window/paint.cxx +++ b/vcl/source/window/paint.cxx @@ -122,7 +122,7 @@ PaintBufferGuard::~PaintBufferGuard() } else { - Rectangle aRectanglePixel = m_pWindow->LogicToPixel(m_aPaintRect); + tools::Rectangle aRectanglePixel = m_pWindow->LogicToPixel(m_aPaintRect); aPaintRectSize = m_pWindow->PixelToLogic(aRectanglePixel.GetSize()); } @@ -142,7 +142,7 @@ PaintBufferGuard::~PaintBufferGuard() mpFrameData->mpBuffer->SetBackground(); } -void PaintBufferGuard::SetPaintRect(const Rectangle& rRectangle) +void PaintBufferGuard::SetPaintRect(const tools::Rectangle& rRectangle) { m_aPaintRect = rRectangle; } @@ -160,8 +160,8 @@ class PaintHelper private: VclPtr<vcl::Window> m_pWindow; vcl::Region* m_pChildRegion; - Rectangle m_aSelectionRect; - Rectangle m_aPaintRect; + tools::Rectangle m_aSelectionRect; + tools::Rectangle m_aPaintRect; vcl::Region m_aPaintRegion; ImplPaintFlags m_nPaintFlags; bool m_bPop : 1; @@ -173,11 +173,11 @@ public: { m_bPop = true; } - void SetPaintRect(const Rectangle& rRect) + void SetPaintRect(const tools::Rectangle& rRect) { m_aPaintRect = rRect; } - void SetSelectionRect(const Rectangle& rRect) + void SetSelectionRect(const tools::Rectangle& rRect) { m_aSelectionRect = rRect; } @@ -224,7 +224,7 @@ void PaintHelper::StartBufferedPaint() assert(!pFrameData->mbInBufferedPaint); pFrameData->mbInBufferedPaint = true; - pFrameData->maBufferedRect = Rectangle(); + pFrameData->maBufferedRect = tools::Rectangle(); m_bStartedBufferedPaint = true; } @@ -310,7 +310,7 @@ namespace vcl { void RenderTools::DrawSelectionBackground(vcl::RenderContext& rRenderContext, vcl::Window& rWindow, - const Rectangle& rRect, sal_uInt16 nHighlight, + const tools::Rectangle& rRect, sal_uInt16 nHighlight, bool bChecked, bool bDrawBorder, bool bDrawExtBorderOnly, Color* pSelectionTextColor, long nCornerRadius, Color* pPaintColor) { @@ -350,7 +350,7 @@ void RenderTools::DrawSelectionBackground(vcl::RenderContext& rRenderContext, vc aSelectionBorderColor.DecreaseLuminance(128); } - Rectangle aRect(rRect); + tools::Rectangle aRect(rRect); if (bDrawExtBorderOnly) { aRect.Left() -= 1; @@ -474,7 +474,7 @@ void Window::PushPaintHelper(PaintHelper *pHelper, vcl::RenderContext& rRenderCo // restore Paint-Region vcl::Region &rPaintRegion = pHelper->GetPaintRegion(); rPaintRegion = mpWindowImpl->maInvalidateRegion; - Rectangle aPaintRect = rPaintRegion.GetBoundRect(); + tools::Rectangle aPaintRect = rPaintRegion.GetBoundRect(); // - RTL - re-mirror paint rect and region at this window if (ImplIsAntiparallel()) @@ -554,7 +554,7 @@ PaintHelper::~PaintHelper() { PaintBuffer(); pFrameData->mbInBufferedPaint = false; - pFrameData->maBufferedRect = Rectangle(); + pFrameData->maBufferedRect = tools::Rectangle(); } // #98943# draw toolbox selection @@ -797,7 +797,7 @@ void Window::ImplInvalidate( const vcl::Region* pRegion, InvalidateFlags nFlags ImplInvalidateFrameRegion( nullptr, nFlags ); else { - Rectangle aRect( Point( mnOutOffX, mnOutOffY ), Size( mnOutWidth, mnOutHeight ) ); + tools::Rectangle aRect( Point( mnOutOffX, mnOutOffY ), Size( mnOutWidth, mnOutHeight ) ); vcl::Region aRegion( aRect ); if ( pRegion ) { @@ -836,7 +836,7 @@ void Window::ImplInvalidate( const vcl::Region* pRegion, InvalidateFlags nFlags pOpaqueWindow->Update(); // start painting at the opaque parent } -void Window::ImplMoveInvalidateRegion( const Rectangle& rRect, +void Window::ImplMoveInvalidateRegion( const tools::Rectangle& rRect, long nHorzScroll, long nVertScroll, bool bChildren ) { @@ -859,7 +859,7 @@ void Window::ImplMoveInvalidateRegion( const Rectangle& rRect, } } -void Window::ImplMoveAllInvalidateRegions( const Rectangle& rRect, +void Window::ImplMoveAllInvalidateRegions( const tools::Rectangle& rRect, long nHorzScroll, long nVertScroll, bool bChildren ) { @@ -908,7 +908,7 @@ void Window::ImplValidateFrameRegion( const vcl::Region* pRegion, ValidateFlags vcl::Region aChildRegion = mpWindowImpl->maInvalidateRegion; if ( mpWindowImpl->mnPaintFlags & ImplPaintFlags::PaintAll ) { - Rectangle aRect( Point( mnOutOffX, mnOutOffY ), Size( mnOutWidth, mnOutHeight ) ); + tools::Rectangle aRect( Point( mnOutOffX, mnOutOffY ), Size( mnOutWidth, mnOutHeight ) ); aChildRegion = aRect; } vcl::Window* pChild = mpWindowImpl->mpFirstChild; @@ -920,7 +920,7 @@ void Window::ImplValidateFrameRegion( const vcl::Region* pRegion, ValidateFlags } if ( mpWindowImpl->mnPaintFlags & ImplPaintFlags::PaintAll ) { - Rectangle aRect( Point( mnOutOffX, mnOutOffY ), Size( mnOutWidth, mnOutHeight ) ); + tools::Rectangle aRect( Point( mnOutOffX, mnOutOffY ), Size( mnOutWidth, mnOutHeight ) ); mpWindowImpl->maInvalidateRegion = aRect; } mpWindowImpl->maInvalidateRegion.Exclude( *pRegion ); @@ -953,7 +953,7 @@ void Window::ImplValidate() ImplValidateFrameRegion( nullptr, nFlags ); else { - Rectangle aRect( Point( mnOutOffX, mnOutOffY ), Size( mnOutWidth, mnOutHeight ) ); + tools::Rectangle aRect( Point( mnOutOffX, mnOutOffY ), Size( mnOutWidth, mnOutHeight ) ); vcl::Region aRegion( aRect ); ImplClipBoundaries( aRegion, true, true ); if ( nFlags & ValidateFlags::NoChildren ) @@ -976,7 +976,7 @@ void Window::ImplUpdateAll() if ( mpWindowImpl->mpFrameWindow->mpWindowImpl->mbPaintFrame ) { Point aPoint( 0, 0 ); - vcl::Region aRegion( Rectangle( aPoint, Size( mnOutWidth, mnOutHeight ) ) ); + vcl::Region aRegion( tools::Rectangle( aPoint, Size( mnOutWidth, mnOutHeight ) ) ); ImplInvalidateOverlapFrameRegion( aRegion ); if ( mpWindowImpl->mbFrame || (mpWindowImpl->mpBorderWindow && mpWindowImpl->mpBorderWindow->mpWindowImpl->mbFrame) ) bFlush = true; @@ -999,9 +999,9 @@ void Window::PostPaint(vcl::RenderContext& /*rRenderContext*/) { } -void Window::Paint(vcl::RenderContext& /*rRenderContext*/, const Rectangle& rRect) +void Window::Paint(vcl::RenderContext& /*rRenderContext*/, const tools::Rectangle& rRect) { - CallEventListeners(VclEventId::WindowPaint, const_cast<Rectangle *>(&rRect)); + CallEventListeners(VclEventId::WindowPaint, const_cast<tools::Rectangle *>(&rRect)); } void Window::SetPaintTransparent( bool bTransparent ) @@ -1037,7 +1037,7 @@ void Window::SetWindowRegionPixel() if ( IsReallyVisible() ) { - Rectangle aRect( Point( mnOutOffX, mnOutOffY ), Size( mnOutWidth, mnOutHeight ) ); + tools::Rectangle aRect( Point( mnOutOffX, mnOutOffY ), Size( mnOutWidth, mnOutHeight ) ); vcl::Region aRegion( aRect ); ImplInvalidateParentFrameRegion( aRegion ); } @@ -1119,7 +1119,7 @@ void Window::SetWindowRegionPixel( const vcl::Region& rRegion ) if ( IsReallyVisible() ) { - Rectangle aRect( Point( mnOutOffX, mnOutOffY ), Size( mnOutWidth, mnOutHeight ) ); + tools::Rectangle aRect( Point( mnOutOffX, mnOutOffY ), Size( mnOutWidth, mnOutHeight ) ); vcl::Region aRegion( aRect ); ImplInvalidateParentFrameRegion( aRegion ); } @@ -1169,18 +1169,18 @@ void Window::Invalidate( InvalidateFlags nFlags ) LogicInvalidate(nullptr); } -void Window::Invalidate( const Rectangle& rRect, InvalidateFlags nFlags ) +void Window::Invalidate( const tools::Rectangle& rRect, InvalidateFlags nFlags ) { if ( !comphelper::LibreOfficeKit::isActive() && (!IsDeviceOutputNecessary() || !mnOutWidth || !mnOutHeight) ) return; OutputDevice *pOutDev = GetOutDev(); - Rectangle aRect = pOutDev->ImplLogicToDevicePixel( rRect ); + tools::Rectangle aRect = pOutDev->ImplLogicToDevicePixel( rRect ); if ( !aRect.IsEmpty() ) { vcl::Region aRegion( aRect ); ImplInvalidate( &aRegion, nFlags ); - Rectangle aLogicRectangle(rRect); + tools::Rectangle aLogicRectangle(rRect); LogicInvalidate(&aLogicRectangle); } } @@ -1201,7 +1201,7 @@ void Window::Invalidate( const vcl::Region& rRegion, InvalidateFlags nFlags ) if ( !aRegion.IsEmpty() ) { ImplInvalidate( &aRegion, nFlags ); - Rectangle aLogicRectangle = rRegion.GetBoundRect(); + tools::Rectangle aLogicRectangle = rRegion.GetBoundRect(); LogicInvalidate(&aLogicRectangle); } } @@ -1257,7 +1257,7 @@ void Window::Update() if ( mpWindowImpl->mpFrameWindow->mpWindowImpl->mbPaintFrame ) { Point aPoint( 0, 0 ); - vcl::Region aRegion( Rectangle( aPoint, Size( mnOutWidth, mnOutHeight ) ) ); + vcl::Region aRegion( tools::Rectangle( aPoint, Size( mnOutWidth, mnOutHeight ) ) ); ImplInvalidateOverlapFrameRegion( aRegion ); if ( mpWindowImpl->mbFrame || (mpWindowImpl->mpBorderWindow && mpWindowImpl->mpBorderWindow->mpWindowImpl->mbFrame) ) bFlush = true; @@ -1380,7 +1380,7 @@ void Window::ImplPaintToDevice( OutputDevice* i_pTargetOutDev, const Point& i_rP SetRefPoint(); SetLayoutMode( GetLayoutMode() ); SetDigitLanguage( GetDigitLanguage() ); - Rectangle aPaintRect( Point( 0, 0 ), GetOutputSizePixel() ); + tools::Rectangle aPaintRect( Point( 0, 0 ), GetOutputSizePixel() ); aClipRegion.Intersect( aPaintRect ); SetClipRegion( aClipRegion ); @@ -1480,7 +1480,7 @@ void Window::Erase(vcl::RenderContext& rRenderContext) ControlPart aCtrlPart = ImplGetWindowImpl()->mnNativeBackground; if (aCtrlPart != ControlPart::NONE && ! IsControlBackground()) { - Rectangle aCtrlRegion(Point(), GetOutputSizePixel()); + tools::Rectangle aCtrlRegion(Point(), GetOutputSizePixel()); ControlState nState = ControlState::NONE; if (IsEnabled()) @@ -1504,7 +1504,7 @@ void Window::Erase(vcl::RenderContext& rRenderContext) mpAlphaVDev->Erase(); } -void Window::ImplScroll( const Rectangle& rRect, +void Window::ImplScroll( const tools::Rectangle& rRect, long nHorzScroll, long nVertScroll, ScrollFlags nFlags ) { if ( !IsDeviceOutputNecessary() ) @@ -1539,7 +1539,7 @@ void Window::ImplScroll( const Rectangle& rRect, // --- RTL --- check if this window requires special action bool bReMirror = ( ImplIsAntiparallel() ); - Rectangle aRectMirror( rRect ); + tools::Rectangle aRectMirror( rRect ); if( bReMirror ) { // --- RTL --- make sure the invalidate region of this window is @@ -1561,7 +1561,7 @@ void Window::ImplScroll( const Rectangle& rRect, aInvalidateRegion.Move(bReMirror ? -nHorzScroll : nHorzScroll, nVertScroll); } - Rectangle aDestRect(aRectMirror); + tools::Rectangle aDestRect(aRectMirror); aDestRect.Move(bReMirror ? -nHorzScroll : nHorzScroll, nVertScroll); vcl::Region aWinInvalidateRegion(aRectMirror); if (!SupportsDoubleBuffering()) @@ -1575,7 +1575,7 @@ void Window::ImplScroll( const Rectangle& rRect, aInvalidateRegion.Union(aWinInvalidateRegion); Point aPoint( mnOutOffX, mnOutOffY ); - vcl::Region aRegion( Rectangle( aPoint, Size( mnOutWidth, mnOutHeight ) ) ); + vcl::Region aRegion( tools::Rectangle( aPoint, Size( mnOutWidth, mnOutHeight ) ) ); if ( nFlags & ScrollFlags::Clip ) aRegion.Intersect( rRect ); if ( mpWindowImpl->mbWinRegion ) diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx index 0600e9f3d375..ad623fb09830 100644 --- a/vcl/source/window/printdlg.cxx +++ b/vcl/source/window/printdlg.cxx @@ -165,7 +165,7 @@ void PrintDialog::PrintPreviewWindow::Resize() } -void PrintDialog::PrintPreviewWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangle&) +void PrintDialog::PrintPreviewWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&) { long nTextHeight = maHorzDim->GetTextHeight(); Size aSize(GetSizePixel()); @@ -178,7 +178,7 @@ void PrintDialog::PrintPreviewWindow::Paint(vcl::RenderContext& rRenderContext, rRenderContext.Push(); Font aFont(rRenderContext.GetSettings().GetStyleSettings().GetLabelFont()); SetZoomedPointFont(rRenderContext, aFont); - Rectangle aTextRect(aOffset + Point(2, 2), Size(maPreviewSize.Width() - 4, maPreviewSize.Height() - 4)); + tools::Rectangle aTextRect(aOffset + Point(2, 2), Size(maPreviewSize.Width() - 4, maPreviewSize.Height() - 4)); rRenderContext.DrawText(aTextRect, maReplacementString, DrawTextFlags::Center | DrawTextFlags::VCenter | DrawTextFlags::WordBreak | DrawTextFlags::MultiLine); @@ -191,7 +191,7 @@ void PrintDialog::PrintPreviewWindow::Paint(vcl::RenderContext& rRenderContext, rRenderContext.DrawBitmap(aOffset, aPreviewBitmap); } - Rectangle aFrameRect(aOffset + Point(-1, -1), Size(maPreviewSize.Width() + 2, maPreviewSize.Height() + 2)); + tools::Rectangle aFrameRect(aOffset + Point(-1, -1), Size(maPreviewSize.Width() + 2, maPreviewSize.Height() + 2)); DecorationView aDecorationView(&rRenderContext); aDecorationView.DrawFrame(aFrameRect, DrawFrameStyle::Group); } @@ -319,7 +319,7 @@ Size PrintDialog::ShowNupOrderWindow::GetOptimalSize() const return Size(70, 70); } -void PrintDialog::ShowNupOrderWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangle& i_rRect) +void PrintDialog::ShowNupOrderWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& i_rRect) { Window::Paint(rRenderContext, i_rRect); @@ -373,7 +373,7 @@ void PrintDialog::ShowNupOrderWindow::Paint(vcl::RenderContext& rRenderContext, nY * aSubSize.Height() + nDeltaY), aPageText); } DecorationView aDecorationView(&rRenderContext); - aDecorationView.DrawFrame(Rectangle(Point(0, 0), aOutSize), DrawFrameStyle::Group); + aDecorationView.DrawFrame(tools::Rectangle(Point(0, 0), aOutSize), DrawFrameStyle::Group); } PrintDialog::NUpTabPage::NUpTabPage( VclBuilder *pUIBuilder ) diff --git a/vcl/source/window/scrwnd.cxx b/vcl/source/window/scrwnd.cxx index 7f377fcd7ae0..a904064348f0 100644 --- a/vcl/source/window/scrwnd.cxx +++ b/vcl/source/window/scrwnd.cxx @@ -109,7 +109,7 @@ void ImplWheelWindow::ImplSetRegion( const Bitmap& rRegionBmp ) Point aPos( GetPointerPosPixel() ); const Size aSize( rRegionBmp.GetSizePixel() ); Point aPoint; - const Rectangle aRect( aPoint, aSize ); + const tools::Rectangle aRect( aPoint, aSize ); maCenter = maLastMousePos = aPos; aPos.X() -= aSize.Width() >> 1; @@ -307,7 +307,7 @@ PointerStyle ImplWheelWindow::ImplGetMousePointer( long nDistX, long nDistY ) return eStyle; } -void ImplWheelWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangle&) +void ImplWheelWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&) { ImplDrawWheel(rRenderContext); } diff --git a/vcl/source/window/split.cxx b/vcl/source/window/split.cxx index 8d607d6f9858..d597a0e15594 100644 --- a/vcl/source/window/split.cxx +++ b/vcl/source/window/split.cxx @@ -110,7 +110,7 @@ void Splitter::ImplSplitMousePos( Point& rPos ) void Splitter::ImplDrawSplitter() { - Rectangle aInvRect( maDragRect ); + tools::Rectangle aInvRect( maDragRect ); if ( mbHorzSplit ) { @@ -443,7 +443,7 @@ void Splitter::EndSplit() maEndSplitHdl.Call( this ); } -void Splitter::SetDragRectPixel( const Rectangle& rDragRect, vcl::Window* _pRefWin ) +void Splitter::SetDragRectPixel( const tools::Rectangle& rDragRect, vcl::Window* _pRefWin ) { maDragRect = rDragRect; if ( !_pRefWin ) @@ -669,7 +669,7 @@ void Splitter::DataChanged( const DataChangedEvent& rDCEvt ) } } -void Splitter::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rPaintRect) +void Splitter::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rPaintRect) { rRenderContext.DrawRect(rPaintRect); diff --git a/vcl/source/window/splitwin.cxx b/vcl/source/window/splitwin.cxx index eb796b695e07..883fa98c3c61 100644 --- a/vcl/source/window/splitwin.cxx +++ b/vcl/source/window/splitwin.cxx @@ -412,7 +412,7 @@ static sal_uInt16 ImplFindItem( ImplSplitSet* pSet, const Point& rPos, { Point aPoint( rItems[i]->mnLeft, rItems[i]->mnTop ); Size aSize( rItems[i]->mnWidth, rItems[i]->mnHeight ); - Rectangle aRect( aPoint, aSize ); + tools::Rectangle aRect( aPoint, aSize ); if ( bRows ) { if ( bDown ) @@ -823,7 +823,7 @@ void SplitWindow::ImplCalcSet2( SplitWindow* pWindow, ImplSplitSet* pSet, bool b (rItems[i]->mnOldWidth != rItems[i]->mnWidth) || (rItems[i]->mnOldHeight != rItems[i]->mnHeight) ) { - Rectangle aRect; + tools::Rectangle aRect; // invalidate old rectangle if ( bRows ) @@ -941,7 +941,7 @@ static void ImplCalcLogSize( std::vector< ImplSplitItem* > rItems, size_t nItems } } -void SplitWindow::ImplDrawBack(vcl::RenderContext& rRenderContext, const Rectangle& rRect, +void SplitWindow::ImplDrawBack(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect, const Wallpaper* pWall, const Bitmap* pBitmap) { if (pBitmap) @@ -980,7 +980,7 @@ void SplitWindow::ImplDrawBack(vcl::RenderContext& rRenderContext, ImplSplitSet* { if (pSet->mpBitmap) { - Rectangle aRect(mnLeftBorder, mnTopBorder, + tools::Rectangle aRect(mnLeftBorder, mnTopBorder, mnDX - mnRightBorder - 1, mnDY - mnBottomBorder - 1); @@ -997,7 +997,7 @@ void SplitWindow::ImplDrawBack(vcl::RenderContext& rRenderContext, ImplSplitSet* { Point aPoint(rItems[i]->mnLeft, rItems[i]->mnTop); Size aSize(rItems[i]->mnWidth, rItems[i]->mnHeight); - Rectangle aRect(aPoint, aSize); + tools::Rectangle aRect(aPoint, aSize); ImplDrawBack(rRenderContext, aRect, pSet->mpWallpaper, pSet->mpBitmap); } } @@ -1246,7 +1246,7 @@ sal_uInt16 SplitWindow::ImplTestSplit( SplitWindow* pWindow, const Point& rPos, void SplitWindow::ImplDrawSplitTracking(const Point& rPos) { - Rectangle aRect; + tools::Rectangle aRect; if (mnSplitTest & SPLIT_HORZ) { @@ -1607,7 +1607,7 @@ void SplitWindow::ImplSplitMousePos( Point& rMousePos ) } } -void SplitWindow::ImplGetButtonRect( Rectangle& rRect, long nEx, bool bTest ) const +void SplitWindow::ImplGetButtonRect( tools::Rectangle& rRect, long nEx, bool bTest ) const { long nSplitSize = mpMainSet->mnSplitSize-1; if (mbFadeOut || mbFadeIn) @@ -1675,9 +1675,9 @@ void SplitWindow::ImplGetButtonRect( Rectangle& rRect, long nEx, bool bTest ) co } } -void SplitWindow::ImplGetFadeInRect( Rectangle& rRect, bool bTest ) const +void SplitWindow::ImplGetFadeInRect( tools::Rectangle& rRect, bool bTest ) const { - Rectangle aRect; + tools::Rectangle aRect; if ( mbFadeIn ) ImplGetButtonRect( aRect, 0, bTest ); @@ -1685,9 +1685,9 @@ void SplitWindow::ImplGetFadeInRect( Rectangle& rRect, bool bTest ) const rRect = aRect; } -void SplitWindow::ImplGetFadeOutRect( Rectangle& rRect, bool ) const +void SplitWindow::ImplGetFadeOutRect( tools::Rectangle& rRect, bool ) const { - Rectangle aRect; + tools::Rectangle aRect; if ( mbFadeOut ) ImplGetButtonRect( aRect, 0, false ); @@ -1695,7 +1695,7 @@ void SplitWindow::ImplGetFadeOutRect( Rectangle& rRect, bool ) const rRect = aRect; } -void SplitWindow::ImplDrawGrip(vcl::RenderContext& rRenderContext, const Rectangle& rRect, bool bHorizontal, bool bLeft) +void SplitWindow::ImplDrawGrip(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect, bool bHorizontal, bool bLeft) { const StyleSettings& rStyleSettings = rRenderContext.GetSettings().GetStyleSettings(); @@ -1780,7 +1780,7 @@ void SplitWindow::ImplDrawFadeIn(vcl::RenderContext& rRenderContext) { if (mbFadeIn) { - Rectangle aTempRect; + tools::Rectangle aTempRect; ImplGetFadeInRect(aTempRect); bool bLeft = true; @@ -1805,7 +1805,7 @@ void SplitWindow::ImplDrawFadeOut(vcl::RenderContext& rRenderContext) { if (mbFadeOut) { - Rectangle aTempRect; + tools::Rectangle aTempRect; ImplGetFadeOutRect(aTempRect); bool bLeft = true; @@ -2045,7 +2045,7 @@ void SplitWindow::MouseButtonDown( const MouseEvent& rMEvt ) } Point aMousePosPixel = rMEvt.GetPosPixel(); - Rectangle aTestRect; + tools::Rectangle aTestRect; mbFadeNoButtonMode = false; @@ -2089,8 +2089,8 @@ void SplitWindow::MouseMove( const MouseEvent& rMEvt ) sal_uInt16 nTempSplitPos; sal_uInt16 nSplitTest = ImplTestSplit( this, aPos, nTemp, &pTempSplitSet, nTempSplitPos ); PointerStyle eStyle = PointerStyle::Arrow; - Rectangle aFadeInRect; - Rectangle aFadeOutRect; + tools::Rectangle aFadeInRect; + tools::Rectangle aFadeOutRect; ImplGetFadeInRect( aFadeInRect ); ImplGetFadeOutRect( aFadeOutRect ); @@ -2131,7 +2131,7 @@ void SplitWindow::Tracking( const TrackingEvent& rTEvt ) } else { - Rectangle aTestRect; + tools::Rectangle aTestRect; ImplGetFadeInRect( aTestRect, true ); bool bNewPressed = aTestRect.IsInside( aMousePosPixel ); if ( bNewPressed != mbFadeInPressed ) @@ -2157,7 +2157,7 @@ void SplitWindow::Tracking( const TrackingEvent& rTEvt ) } else { - Rectangle aTestRect; + tools::Rectangle aTestRect; ImplGetFadeOutRect( aTestRect, true ); bool bNewPressed = aTestRect.IsInside( aMousePosPixel ); if ( !bNewPressed ) @@ -2270,8 +2270,8 @@ bool SplitWindow::PreNotify( NotifyEvent& rNEvt ) if( !pMouseEvt->GetButtons() && !pMouseEvt->IsSynthetic() && !pMouseEvt->IsModifierChanged() ) { // trigger redraw if mouse over state has changed - Rectangle aFadeInRect; - Rectangle aFadeOutRect; + tools::Rectangle aFadeInRect; + tools::Rectangle aFadeOutRect; ImplGetFadeInRect( aFadeInRect ); ImplGetFadeOutRect( aFadeOutRect ); @@ -2290,7 +2290,7 @@ bool SplitWindow::PreNotify( NotifyEvent& rNEvt ) return Window::PreNotify( rNEvt ); } -void SplitWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangle&) +void SplitWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&) { if (mnWinStyle & WB_BORDER) ImplDrawBorder(rRenderContext); @@ -2326,7 +2326,7 @@ void SplitWindow::RequestHelp( const HelpEvent& rHEvt ) if ( rHEvt.GetMode() & (HelpEventMode::BALLOON | HelpEventMode::QUICK) && !rHEvt.KeyboardActivated() ) { Point aMousePosPixel = ScreenToOutputPixel( rHEvt.GetMousePosPixel() ); - Rectangle aHelpRect; + tools::Rectangle aHelpRect; sal_uInt16 nHelpResId = 0; ImplGetFadeInRect( aHelpRect, true ); diff --git a/vcl/source/window/stacking.cxx b/vcl/source/window/stacking.cxx index ce70ebaf2428..1aa805e0fdee 100644 --- a/vcl/source/window/stacking.cxx +++ b/vcl/source/window/stacking.cxx @@ -219,7 +219,7 @@ void Window::ImplCalcToTop( ImplCalcToTopData* pPrevData ) { // calculate region, where the window overlaps with other windows Point aPoint( mnOutOffX, mnOutOffY ); - vcl::Region aRegion( Rectangle( aPoint, + vcl::Region aRegion( tools::Rectangle( aPoint, Size( mnOutWidth, mnOutHeight ) ) ); vcl::Region aInvalidateRegion; ImplCalcOverlapRegionOverlaps( aRegion, aInvalidateRegion ); @@ -559,7 +559,7 @@ void Window::SetZOrder( vcl::Window* pRefWindow, ZOrderFlags nFlags ) { // Invalidate all windows which are next to each other // Is INCOMPLETE !!! - Rectangle aWinRect( Point( mnOutOffX, mnOutOffY ), Size( mnOutWidth, mnOutHeight ) ); + tools::Rectangle aWinRect( Point( mnOutOffX, mnOutOffY ), Size( mnOutWidth, mnOutHeight ) ); vcl::Window* pWindow = nullptr; if ( ImplIsOverlapWindow() ) { @@ -573,7 +573,7 @@ void Window::SetZOrder( vcl::Window* pRefWindow, ZOrderFlags nFlags ) { if ( pWindow == this ) break; - Rectangle aCompRect( Point( pWindow->mnOutOffX, pWindow->mnOutOffY ), + tools::Rectangle aCompRect( Point( pWindow->mnOutOffX, pWindow->mnOutOffY ), Size( pWindow->mnOutWidth, pWindow->mnOutHeight ) ); if ( aWinRect.IsOver( aCompRect ) ) pWindow->Invalidate( InvalidateFlags::Children | InvalidateFlags::NoTransparent ); @@ -586,7 +586,7 @@ void Window::SetZOrder( vcl::Window* pRefWindow, ZOrderFlags nFlags ) { if ( pWindow != this ) { - Rectangle aCompRect( Point( pWindow->mnOutOffX, pWindow->mnOutOffY ), + tools::Rectangle aCompRect( Point( pWindow->mnOutOffX, pWindow->mnOutOffY ), Size( pWindow->mnOutWidth, pWindow->mnOutHeight ) ); if ( aWinRect.IsOver( aCompRect ) ) { diff --git a/vcl/source/window/status.cxx b/vcl/source/window/status.cxx index 764665c0a1ae..9b27520a6fbc 100644 --- a/vcl/source/window/status.cxx +++ b/vcl/source/window/status.cxx @@ -292,9 +292,9 @@ void StatusBar::ImplFormat() mbFormat = false; } -Rectangle StatusBar::ImplGetItemRectPos( sal_uInt16 nPos ) const +tools::Rectangle StatusBar::ImplGetItemRectPos( sal_uInt16 nPos ) const { - Rectangle aRect; + tools::Rectangle aRect; ImplStatusItem* pItem; pItem = ( nPos < mpItemList.size() ) ? mpItemList[ nPos ] : nullptr; if ( pItem ) @@ -329,7 +329,7 @@ sal_uInt16 StatusBar::ImplGetFirstVisiblePos() const void StatusBar::ImplDrawText(vcl::RenderContext& rRenderContext) { // prevent item box from being overwritten - Rectangle aTextRect; + tools::Rectangle aTextRect; aTextRect.Left() = STATUSBAR_OFFSET_X + 1; aTextRect.Top() = mnTextY; if (mbVisibleItems && (GetStyle() & WB_RIGHT)) @@ -352,7 +352,7 @@ void StatusBar::ImplDrawText(vcl::RenderContext& rRenderContext) void StatusBar::ImplDrawItem(vcl::RenderContext& rRenderContext, bool bOffScreen, sal_uInt16 nPos) { - Rectangle aRect = ImplGetItemRectPos(nPos); + tools::Rectangle aRect = ImplGetItemRectPos(nPos); if (aRect.IsEmpty()) return; @@ -360,7 +360,7 @@ void StatusBar::ImplDrawItem(vcl::RenderContext& rRenderContext, bool bOffScreen // compute output region ImplStatusItem* pItem = mpItemList[nPos]; long nW = mpImplData->mnItemBorderWidth + 1; - Rectangle aTextRect(aRect.Left() + nW, aRect.Top() + nW, + tools::Rectangle aTextRect(aRect.Left() + nW, aRect.Top() + nW, aRect.Right() - nW, aRect.Bottom() - nW); Size aTextRectSize(aTextRect.GetSize()); @@ -396,7 +396,7 @@ void StatusBar::ImplDrawItem(vcl::RenderContext& rRenderContext, bool bOffScreen { mbInUserDraw = true; mpImplData->mpVirDev->EnableRTL( IsRTLEnabled() ); - UserDrawEvent aODEvt(this, mpImplData->mpVirDev, Rectangle(Point(), aTextRectSize), pItem->mnId); + UserDrawEvent aODEvt(this, mpImplData->mpVirDev, tools::Rectangle(Point(), aTextRectSize), pItem->mnId); UserDraw(aODEvt); mpImplData->mpVirDev->EnableRTL(false); mbInUserDraw = false; @@ -450,7 +450,7 @@ void StatusBar::ImplDrawItem(vcl::RenderContext& rRenderContext, bool bOffScreen void DrawProgress(vcl::Window* pWindow, vcl::RenderContext& rRenderContext, const Point& rPos, long nOffset, long nPrgsWidth, long nPrgsHeight, sal_uInt16 nPercent1, sal_uInt16 nPercent2, sal_uInt16 nPercentCount, - const Rectangle& rFramePosSize) + const tools::Rectangle& rFramePosSize) { if (rRenderContext.IsNativeControlSupported(ControlType::Progress, ControlPart::Entire)) { @@ -459,8 +459,8 @@ void DrawProgress(vcl::Window* pWindow, vcl::RenderContext& rRenderContext, cons long nFullWidth = (nPrgsWidth + nOffset) * (10000 / nPercentCount); long nPerc = (nPercent2 > 10000) ? 10000 : nPercent2; ImplControlValue aValue(nFullWidth * long(nPerc) / 10000); - Rectangle aDrawRect(rPos, Size(nFullWidth, nPrgsHeight)); - Rectangle aControlRegion(aDrawRect); + tools::Rectangle aDrawRect(rPos, Size(nFullWidth, nPrgsHeight)); + tools::Rectangle aControlRegion(aDrawRect); if(bNeedErase) { @@ -480,7 +480,7 @@ void DrawProgress(vcl::Window* pWindow, vcl::RenderContext& rRenderContext, cons // restore transparent background Point aTL(pWindow->OutputToAbsoluteScreenPixel(rFramePosSize.TopLeft())); aTL = pEraseWindow->AbsoluteScreenToOutputPixel(aTL); - Rectangle aRect(aTL, rFramePosSize.GetSize()); + tools::Rectangle aRect(aTL, rFramePosSize.GetSize()); pEraseWindow->Invalidate(aRect, InvalidateFlags::NoChildren | InvalidateFlags::NoClipChildren | InvalidateFlags::Transparent); @@ -509,7 +509,7 @@ void DrawProgress(vcl::Window* pWindow, vcl::RenderContext& rRenderContext, cons // compute rectangle long nDX = nPrgsWidth + nOffset; long nLeft = rPos.X() + ((nPerc1 - 1) * nDX); - Rectangle aRect(nLeft, rPos.Y(), nLeft + nPrgsWidth, rPos.Y() + nPrgsHeight); + tools::Rectangle aRect(nLeft, rPos.Y(), nLeft + nPrgsWidth, rPos.Y() + nPrgsHeight); do { @@ -534,7 +534,7 @@ void DrawProgress(vcl::Window* pWindow, vcl::RenderContext& rRenderContext, cons // compute rectangle long nDX = nPrgsWidth + nOffset; long nLeft = rPos.X() + (nPerc1 * nDX); - Rectangle aRect(nLeft, rPos.Y(), nLeft + nPrgsWidth, rPos.Y() + nPrgsHeight); + tools::Rectangle aRect(nLeft, rPos.Y(), nLeft + nPrgsWidth, rPos.Y() + nPrgsHeight); do { @@ -614,8 +614,8 @@ void StatusBar::ImplCalcProgressRect() if( IsNativeControlSupported( ControlType::Progress, ControlPart::Entire ) ) { ImplControlValue aValue; - Rectangle aControlRegion( Rectangle( (const Point&)Point(), maPrgsFrameRect.GetSize() ) ); - Rectangle aNativeControlRegion, aNativeContentRegion; + tools::Rectangle aControlRegion( tools::Rectangle( (const Point&)Point(), maPrgsFrameRect.GetSize() ) ); + tools::Rectangle aNativeControlRegion, aNativeContentRegion; if( (bNativeOK = GetNativeControlRegion( ControlType::Progress, ControlPart::Entire, aControlRegion, ControlState::ENABLED, aValue, OUString(), aNativeControlRegion, aNativeContentRegion ) ) ) @@ -671,7 +671,7 @@ void StatusBar::MouseButtonDown( const MouseEvent& rMEvt ) } } -void StatusBar::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) +void StatusBar::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) { if (mbFormat) ImplFormat(); @@ -757,7 +757,7 @@ void StatusBar::RequestHelp( const HelpEvent& rHEvt ) if ( nItemId ) { - Rectangle aItemRect = GetItemRect( nItemId ); + tools::Rectangle aItemRect = GetItemRect( nItemId ); Point aPt = OutputToScreenPixel( aItemRect.TopLeft() ); aItemRect.Left() = aPt.X(); aItemRect.Top() = aPt.Y(); @@ -1040,7 +1040,7 @@ sal_uInt16 StatusBar::GetItemId( const Point& rPos ) const for ( nPos = 0; nPos < nItemCount; nPos++ ) { // get rectangle - Rectangle aRect = ImplGetItemRectPos( nPos ); + tools::Rectangle aRect = ImplGetItemRectPos( nPos ); if ( aRect.IsInside( rPos ) ) return mpItemList[ nPos ]->mnId; } @@ -1049,9 +1049,9 @@ sal_uInt16 StatusBar::GetItemId( const Point& rPos ) const return 0; } -Rectangle StatusBar::GetItemRect( sal_uInt16 nItemId ) const +tools::Rectangle StatusBar::GetItemRect( sal_uInt16 nItemId ) const { - Rectangle aRect; + tools::Rectangle aRect; if ( AreItemsVisible() && !mbFormat ) { @@ -1081,9 +1081,9 @@ Point StatusBar::GetItemTextPos( sal_uInt16 nItemId ) const { // get rectangle ImplStatusItem* pItem = mpItemList[ nPos ]; - Rectangle aRect = ImplGetItemRectPos( nPos ); + tools::Rectangle aRect = ImplGetItemRectPos( nPos ); long nW = mpImplData->mnItemBorderWidth + 1; - Rectangle aTextRect( aRect.Left()+nW, aRect.Top()+nW, + tools::Rectangle aTextRect( aRect.Left()+nW, aRect.Top()+nW, aRect.Right()-nW, aRect.Bottom()-nW ); Point aPos = ImplGetItemTextPos( aTextRect.GetSize(), Size( GetTextWidth( pItem->maText ), GetTextHeight() ), @@ -1156,7 +1156,7 @@ void StatusBar::SetItemText( sal_uInt16 nItemId, const OUString& rText ) // re-draw item if StatusBar is visible and UpdateMode active if ( pItem->mbVisible && !mbFormat && ImplIsItemUpdate() ) { - Rectangle aRect = ImplGetItemRectPos(nPos); + tools::Rectangle aRect = ImplGetItemRectPos(nPos); Invalidate(aRect); Update(); } @@ -1209,7 +1209,7 @@ void StatusBar::SetItemData( sal_uInt16 nItemId, void* pNewData ) if ( (pItem->mnBits & StatusBarItemBits::UserDraw) && pItem->mbVisible && !mbFormat && ImplIsItemUpdate() ) { - Rectangle aRect = ImplGetItemRectPos(nPos); + tools::Rectangle aRect = ImplGetItemRectPos(nPos); Invalidate(aRect, InvalidateFlags::NoErase); Update(); } @@ -1239,7 +1239,7 @@ void StatusBar::RedrawItem(sal_uInt16 nItemId) if (pItem && (pItem->mnBits & StatusBarItemBits::UserDraw) && pItem->mbVisible && ImplIsItemUpdate()) { - Rectangle aRect = ImplGetItemRectPos(nPos); + tools::Rectangle aRect = ImplGetItemRectPos(nPos); Invalidate(aRect); Update(); } @@ -1421,8 +1421,8 @@ Size StatusBar::CalcWindowSizePixel() const if( IsNativeControlSupported( ControlType::Progress, ControlPart::Entire ) ) { ImplControlValue aValue; - Rectangle aControlRegion( (const Point&)Point(), Size( nCalcWidth, nMinHeight ) ); - Rectangle aNativeControlRegion, aNativeContentRegion; + tools::Rectangle aControlRegion( (const Point&)Point(), Size( nCalcWidth, nMinHeight ) ); + tools::Rectangle aNativeControlRegion, aNativeContentRegion; if( GetNativeControlRegion( ControlType::Progress, ControlPart::Entire, aControlRegion, ControlState::ENABLED, aValue, OUString(), aNativeControlRegion, aNativeContentRegion ) ) @@ -1435,8 +1435,8 @@ Size StatusBar::CalcWindowSizePixel() const IsNativeControlSupported( ControlType::Frame, ControlPart::Border ) ) { ImplControlValue aControlValue( static_cast<long>(DrawFrameFlags::NoDraw) ); - Rectangle aBound, aContent; - Rectangle aNatRgn( Point( 0, 0 ), Size( 150, 50 ) ); + tools::Rectangle aBound, aContent; + tools::Rectangle aNatRgn( Point( 0, 0 ), Size( 150, 50 ) ); if( GetNativeControlRegion(ControlType::Frame, ControlPart::Border, aNatRgn, ControlState::NONE, aControlValue, OUString(), aBound, aContent) ) { diff --git a/vcl/source/window/syswin.cxx b/vcl/source/window/syswin.cxx index 192b85e4c8a8..6656f122ecd3 100644 --- a/vcl/source/window/syswin.cxx +++ b/vcl/source/window/syswin.cxx @@ -594,7 +594,7 @@ static OString ImplWindowStateToStr(const WindowStateData& rData) void SystemWindow::ImplMoveToScreen( long& io_rX, long& io_rY, long i_nWidth, long i_nHeight, vcl::Window* i_pConfigureWin ) { - Rectangle aScreenRect; + tools::Rectangle aScreenRect; if( !Application::IsUnifiedDisplay() ) aScreenRect = Application::GetScreenPosSizePixel( GetScreenNumber() ); else @@ -698,7 +698,7 @@ void SystemWindow::SetWindowStateData( const WindowStateData& rData ) if( !((rData.GetMask() & WindowStateMask::State) && (nState & WindowStateState::Maximized)) ) if( rData.GetMask() & (WindowStateMask::Pos|WindowStateMask::Width|WindowStateMask::Height) ) { - Rectangle aDesktop = GetDesktopRectPixel(); + tools::Rectangle aDesktop = GetDesktopRectPixel(); ImplSVData *pSVData = ImplGetSVData(); vcl::Window *pWin = pSVData->maWinData.mpFirstFrame; bool bWrapped = false; diff --git a/vcl/source/window/tabpage.cxx b/vcl/source/window/tabpage.cxx index a929a333830d..59c5a653681c 100644 --- a/vcl/source/window/tabpage.cxx +++ b/vcl/source/window/tabpage.cxx @@ -128,7 +128,7 @@ void TabPage::DataChanged( const DataChangedEvent& rDCEvt ) } } -void TabPage::Paint( vcl::RenderContext& rRenderContext, const Rectangle& ) +void TabPage::Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& ) { // draw native tabpage only inside tabcontrols, standalone tabpages look ugly (due to bad dialog design) if( IsNativeControlSupported(ControlType::TabBody, ControlPart::Entire) && GetParent() && (GetParent()->GetType() == WindowType::TABCONTROL) ) @@ -143,7 +143,7 @@ void TabPage::Paint( vcl::RenderContext& rRenderContext, const Rectangle& ) nState |= ControlState::FOCUSED; // pass the whole window region to NWF as the tab body might be a gradient or bitmap // that has to be scaled properly, clipping makes sure that we do not paint too much - Rectangle aCtrlRegion( Point(), GetOutputSizePixel() ); + tools::Rectangle aCtrlRegion( Point(), GetOutputSizePixel() ); rRenderContext.DrawNativeControl( ControlType::TabBody, part, aCtrlRegion, nState, aControlValue, OUString() ); } @@ -170,7 +170,7 @@ void TabPage::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, Dr pDev->SetFillColor( GetSettings().GetStyleSettings().GetDialogColor() ); else pDev->SetFillColor( aWallpaper.GetColor() ); - pDev->DrawRect( Rectangle( aPos, aSize ) ); + pDev->DrawRect( tools::Rectangle( aPos, aSize ) ); } pDev->Pop(); diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx index 9614d223598b..d026b94b7c6e 100644 --- a/vcl/source/window/toolbox.cxx +++ b/vcl/source/window/toolbox.cxx @@ -90,8 +90,8 @@ class ImplTBDragMgr private: VclPtr<ToolBox> mpDragBox; Point maMouseOff; - Rectangle maRect; - Rectangle maStartRect; + tools::Rectangle maRect; + tools::Rectangle maStartRect; Accelerator maAccel; sal_uInt16 mnLineMode; ToolBox::ImplToolItems::size_type mnStartLines; @@ -103,7 +103,7 @@ private: public: ImplTBDragMgr(); - void StartDragging( ToolBox* pDragBox, const Point& rPos, const Rectangle& rRect, sal_uInt16 nLineMode ); + void StartDragging( ToolBox* pDragBox, const Point& rPos, const tools::Rectangle& rRect, sal_uInt16 nLineMode ); void Dragging( const Point& rPos ); void EndDragging( bool bOK = true ); DECL_LINK( SelectHdl, Accelerator&, void ); @@ -126,8 +126,8 @@ int ToolBox::ImplGetDragWidth( const vcl::RenderContext& rRenderContext, bool bH ImplControlValue aControlValue; Point aPoint; - Rectangle aContent, aBound; - Rectangle aArea( aPoint, rRenderContext.GetOutputSizePixel() ); + tools::Rectangle aContent, aBound; + tools::Rectangle aArea( aPoint, rRenderContext.GetOutputSizePixel() ); if ( rRenderContext.GetNativeControlRegion(ControlType::Toolbar, bHorz ? ControlPart::ThumbVert : ControlPart::ThumbHorz, @@ -168,13 +168,13 @@ void ToolBox::ImplUpdateDragArea() const if( pWrapper ) { if ( ImplIsFloatingMode() || pWrapper->IsLocked() ) - pWrapper->SetDragArea( Rectangle() ); + pWrapper->SetDragArea( tools::Rectangle() ); else { if( meAlign == WindowAlign::Top || meAlign == WindowAlign::Bottom ) - pWrapper->SetDragArea( Rectangle( 0, 0, ImplGetDragWidth(), GetOutputSizePixel().Height() ) ); + pWrapper->SetDragArea( tools::Rectangle( 0, 0, ImplGetDragWidth(), GetOutputSizePixel().Height() ) ); else - pWrapper->SetDragArea( Rectangle( 0, 0, GetOutputSizePixel().Width(), ImplGetDragWidth() ) ); + pWrapper->SetDragArea( tools::Rectangle( 0, 0, GetOutputSizePixel().Width(), ImplGetDragWidth() ) ); } } } @@ -240,7 +240,7 @@ void ToolBox::ImplCheckUpdate() } void ToolBox::ImplDrawGrip(vcl::RenderContext& rRenderContext, - const Rectangle &aDragArea, int nDragWidth, WindowAlign eAlign, bool bHorz) + const tools::Rectangle &aDragArea, int nDragWidth, WindowAlign eAlign, bool bHorz) { bool bNativeOk = false; const ControlPart ePart = bHorz ? ControlPart::ThumbVert : ControlPart::ThumbHorz; @@ -251,7 +251,7 @@ void ToolBox::ImplDrawGrip(vcl::RenderContext& rRenderContext, aToolbarValue.maGripRect = aDragArea; Point aPt; - Rectangle aCtrlRegion(aPt, aSz); + tools::Rectangle aCtrlRegion(aPt, aSz); ControlState nState = ControlState::ENABLED; bNativeOk = rRenderContext.DrawNativeControl( ControlType::Toolbar, ePart, @@ -275,7 +275,7 @@ void ToolBox::ImplDrawGrip(vcl::RenderContext& rRenderContext, while (i <= height) { int x = nDragWidth / 2; - rRenderContext.DrawEllipse(Rectangle(Point(x, i), Size(2 * fScaleFactor, 2 * fScaleFactor))); + rRenderContext.DrawEllipse(tools::Rectangle(Point(x, i), Size(2 * fScaleFactor, 2 * fScaleFactor))); i += 4 * fScaleFactor; } } @@ -287,7 +287,7 @@ void ToolBox::ImplDrawGrip(vcl::RenderContext& rRenderContext, while (i <= width) { int y = nDragWidth / 2; - rRenderContext.DrawEllipse(Rectangle(Point(i, y), Size(2 * fScaleFactor, 2 * fScaleFactor))); + rRenderContext.DrawEllipse(tools::Rectangle(Point(i, y), Size(2 * fScaleFactor, 2 * fScaleFactor))); i += 4 * fScaleFactor; } } @@ -398,31 +398,31 @@ void ToolBox::ImplDrawGradientBackground(vcl::RenderContext& rRenderContext, Imp { long y = 0; - rRenderContext.DrawGradient(Rectangle(0, y, aTopLineSz.Width(), y + aTopLineSz.Height()), g); + rRenderContext.DrawGradient(tools::Rectangle(0, y, aTopLineSz.Width(), y + aTopLineSz.Height()), g); y += aTopLineSz.Height(); while (y < (mnDY - aBottomLineSz.Height())) { - rRenderContext.DrawGradient(Rectangle(0, y, aLineSz.Width(), y + aLineSz.Height()), g); + rRenderContext.DrawGradient(tools::Rectangle(0, y, aLineSz.Width(), y + aLineSz.Height()), g); y += aLineSz.Height(); } - rRenderContext.DrawGradient(Rectangle(0, y, aBottomLineSz.Width(), y + aBottomLineSz.Height()), g); + rRenderContext.DrawGradient(tools::Rectangle(0, y, aBottomLineSz.Width(), y + aBottomLineSz.Height()), g); } else { long x = 0; - rRenderContext.DrawGradient(Rectangle(x, 0, x + aTopLineSz.Width(), aTopLineSz.Height()), g); + rRenderContext.DrawGradient(tools::Rectangle(x, 0, x + aTopLineSz.Width(), aTopLineSz.Height()), g); x += aTopLineSz.Width(); while (x < (mnDX - aBottomLineSz.Width())) { - rRenderContext.DrawGradient(Rectangle(x, 0, x + aLineSz.Width(), aLineSz.Height()), g); + rRenderContext.DrawGradient(tools::Rectangle(x, 0, x + aLineSz.Width(), aLineSz.Height()), g); x += aLineSz.Width(); } - rRenderContext.DrawGradient(Rectangle( x, 0, x + aBottomLineSz.Width(), aBottomLineSz.Height()), g); + rRenderContext.DrawGradient(tools::Rectangle( x, 0, x + aBottomLineSz.Width(), aBottomLineSz.Height()), g); } if( bLineColor ) @@ -434,7 +434,7 @@ bool ToolBox::ImplDrawNativeBackground(vcl::RenderContext& rRenderContext, const { // use NWF Point aPt; - Rectangle aCtrlRegion(aPt, GetOutputSizePixel()); + tools::Rectangle aCtrlRegion(aPt, GetOutputSizePixel()); ControlState nState = ControlState::ENABLED; return rRenderContext.DrawNativeControl( ControlType::Toolbar, mbHorz ? ControlPart::DrawBackgroundHorz : ControlPart::DrawBackgroundVert, @@ -470,7 +470,7 @@ void ToolBox::ImplDrawConstantBackground(vcl::RenderContext& rRenderContext, con } } -void ToolBox::ImplDrawBackground(vcl::RenderContext& rRenderContext, const Rectangle& rRect) +void ToolBox::ImplDrawBackground(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) { // execute pending paint requests ImplCheckUpdate(); @@ -522,7 +522,7 @@ void ToolBox::ImplDrawBackground(vcl::RenderContext& rRenderContext, const Recta rRenderContext.Pop(); } -void ToolBox::ImplErase(vcl::RenderContext& rRenderContext, const Rectangle &rRect, bool bHighlight, bool bHasOpenPopup) +void ToolBox::ImplErase(vcl::RenderContext& rRenderContext, const tools::Rectangle &rRect, bool bHighlight, bool bHasOpenPopup) { // the background of non NWF buttons is painted in a constant color // to have the same highlight color (transparency in DrawSelectionBackground()) @@ -941,7 +941,7 @@ sal_uInt16 ToolBox::ImplTestLineSize( const Point& rPos ) const return 0; } -void ToolBox::ImplLineSizing( const Point& rPos, Rectangle& rRect, sal_uInt16 nLineMode ) +void ToolBox::ImplLineSizing( const Point& rPos, tools::Rectangle& rRect, sal_uInt16 nLineMode ) { bool bHorz; long nOneLineSize; @@ -1046,7 +1046,7 @@ ImplTBDragMgr::ImplTBDragMgr() } void ImplTBDragMgr::StartDragging( ToolBox* pToolBox, - const Point& rPos, const Rectangle& rRect, + const Point& rPos, const tools::Rectangle& rRect, sal_uInt16 nDragLineMode ) { mpDragBox = pToolBox; @@ -1437,10 +1437,10 @@ bool ToolBox::ImplCalcItem() mnWinHeight = 0; // determine minimum size necessary in NWF { - Rectangle aRect( Point( 0, 0 ), Size( nMinWidth, nMinHeight ) ); - Rectangle aReg( aRect ); + tools::Rectangle aRect( Point( 0, 0 ), Size( nMinWidth, nMinHeight ) ); + tools::Rectangle aReg( aRect ); ImplControlValue aVal; - Rectangle aNativeBounds, aNativeContent; + tools::Rectangle aNativeBounds, aNativeContent; if( IsNativeControlSupported( ControlType::Toolbar, ControlPart::Button ) ) { if( GetNativeControlRegion( ControlType::Toolbar, ControlPart::Button, @@ -1466,7 +1466,7 @@ bool ToolBox::ImplCalcItem() // also calculate the area for comboboxes, drop down list boxes and spinfields // as these are often inserted into toolboxes; set mnWinHeight to the // greater of those values to prevent toolbar flickering (#i103385#) - aRect = Rectangle( Point( 0, 0 ), Size( nMinWidth, nMinHeight ) ); + aRect = tools::Rectangle( Point( 0, 0 ), Size( nMinWidth, nMinHeight ) ); aReg = aRect; if( GetNativeControlRegion( ControlType::Combobox, ControlPart::Entire, aReg, @@ -1478,7 +1478,7 @@ bool ToolBox::ImplCalcItem() if( aRect.GetHeight() > mnWinHeight ) mnWinHeight = aRect.GetHeight(); } - aRect = Rectangle( Point( 0, 0 ), Size( nMinWidth, nMinHeight ) ); + aRect = tools::Rectangle( Point( 0, 0 ), Size( nMinWidth, nMinHeight ) ); aReg = aRect; if( GetNativeControlRegion( ControlType::Listbox, ControlPart::Entire, aReg, @@ -1490,7 +1490,7 @@ bool ToolBox::ImplCalcItem() if( aRect.GetHeight() > mnWinHeight ) mnWinHeight = aRect.GetHeight(); } - aRect = Rectangle( Point( 0, 0 ), Size( nMinWidth, nMinHeight ) ); + aRect = tools::Rectangle( Point( 0, 0 ), Size( nMinWidth, nMinHeight ) ); aReg = aRect; if( GetNativeControlRegion( ControlType::Spinbox, ControlPart::Entire, aReg, @@ -1974,7 +1974,7 @@ void ToolBox::ImplFormat( bool bResize ) mpData->ImplClearLayoutData(); // recalculate positions and sizes - Rectangle aEmptyRect; + tools::Rectangle aEmptyRect; long nLineSize; long nLeft; long nTop; @@ -1993,7 +1993,7 @@ void ToolBox::ImplFormat( bool bResize ) ImplCalcBorder( meAlign, mnLeftBorder, mnTopBorder, mnRightBorder, mnBottomBorder ); // update drag area (where the 'grip' will be placed) - Rectangle aOldDragRect; + tools::Rectangle aOldDragRect; if( pWrapper ) aOldDragRect = pWrapper->GetDragArea(); ImplUpdateDragArea(); @@ -2125,9 +2125,9 @@ void ToolBox::ImplFormat( bool bResize ) nFormatLine = 1; // save old scroll rectangles and reset them - Rectangle aOldLowerRect = maLowerRect; - Rectangle aOldUpperRect = maUpperRect; - Rectangle aOldMenubuttonRect = mpData->maMenubuttonItem.maRect; + tools::Rectangle aOldLowerRect = maLowerRect; + tools::Rectangle aOldUpperRect = maUpperRect; + tools::Rectangle aOldMenubuttonRect = mpData->maMenubuttonItem.maRect; maUpperRect = aEmptyRect; maLowerRect = aEmptyRect; mpData->maMenubuttonItem.maRect = aEmptyRect; @@ -2370,7 +2370,7 @@ void ToolBox::ImplFormat( bool bResize ) { if ( bMustFullPaint ) { - maPaintRect = Rectangle( mnLeftBorder, mnTopBorder, + maPaintRect = tools::Rectangle( mnLeftBorder, mnTopBorder, mnDX-mnRightBorder, mnDY-mnBottomBorder ); } else @@ -2458,7 +2458,7 @@ IMPL_LINK_NOARG(ToolBox, ImplUpdateHdl, Timer *, void) ImplFormat(); } -static void ImplDrawMoreIndicator(vcl::RenderContext& rRenderContext, const Rectangle& rRect, bool bSetColor, bool bRotate ) +static void ImplDrawMoreIndicator(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect, bool bSetColor, bool bRotate ) { rRenderContext.Push(PushFlags::FILLCOLOR | PushFlags::LINECOLOR); rRenderContext.SetLineColor(); @@ -2490,9 +2490,9 @@ static void ImplDrawMoreIndicator(vcl::RenderContext& rRenderContext, const Rect long y = rRect.Top() + (rRect.getHeight() - height)/2 + 1; while( height >= 1) { - rRenderContext.DrawRect( Rectangle( x, y, x + linewidth, y ) ); + rRenderContext.DrawRect( tools::Rectangle( x, y, x + linewidth, y ) ); x += space; - rRenderContext.DrawRect( Rectangle( x, y, x + linewidth, y ) ); + rRenderContext.DrawRect( tools::Rectangle( x, y, x + linewidth, y ) ); x -= space; y++; if( height <= heightOrig / 2 + 1) x--; @@ -2515,9 +2515,9 @@ static void ImplDrawMoreIndicator(vcl::RenderContext& rRenderContext, const Rect long y = rRect.Top() + (rRect.getHeight() - height)/2 + 1; while( width >= 1) { - rRenderContext.DrawRect( Rectangle( x, y, x, y + linewidth ) ); + rRenderContext.DrawRect( tools::Rectangle( x, y, x, y + linewidth ) ); y += space; - rRenderContext.DrawRect( Rectangle( x, y, x, y + linewidth ) ); + rRenderContext.DrawRect( tools::Rectangle( x, y, x, y + linewidth ) ); y -= space; x++; if( width <= widthOrig / 2 + 1) y--; @@ -2529,7 +2529,7 @@ static void ImplDrawMoreIndicator(vcl::RenderContext& rRenderContext, const Rect rRenderContext.Pop(); } -static void ImplDrawDropdownArrow(vcl::RenderContext& rRenderContext, const Rectangle& rDropDownRect, bool bSetColor, bool bRotate ) +static void ImplDrawDropdownArrow(vcl::RenderContext& rRenderContext, const tools::Rectangle& rDropDownRect, bool bSetColor, bool bRotate ) { bool bLineColor = rRenderContext.IsLineColor(); bool bFillColor = rRenderContext.IsFillColor(); @@ -2556,7 +2556,7 @@ static void ImplDrawDropdownArrow(vcl::RenderContext& rRenderContext, const Rect long y = rDropDownRect.Top() + (rDropDownRect.getHeight() - height)/2; while( width >= 1) { - rRenderContext.DrawRect( Rectangle( x, y, x+width-1, y ) ); + rRenderContext.DrawRect( tools::Rectangle( x, y, x+width-1, y ) ); y++; x++; width -= 2; @@ -2571,7 +2571,7 @@ static void ImplDrawDropdownArrow(vcl::RenderContext& rRenderContext, const Rect long y = rDropDownRect.Top() + (rDropDownRect.getHeight() - height)/2; while( height >= 1) { - rRenderContext.DrawRect( Rectangle( x, y, x, y+height-1 ) ); + rRenderContext.DrawRect( tools::Rectangle( x, y, x, y+height-1 ) ); y++; x++; height -= 2; @@ -2646,7 +2646,7 @@ void ToolBox::ImplDrawSpin(vcl::RenderContext& rRenderContext) false/*bUpperIn*/, false/*bLowerIn*/, bTmpUpper, bTmpLower, !mbHorz); } -void ToolBox::ImplDrawSeparator(vcl::RenderContext& rRenderContext, ImplToolItems::size_type nPos, const Rectangle& rRect) +void ToolBox::ImplDrawSeparator(vcl::RenderContext& rRenderContext, ImplToolItems::size_type nPos, const tools::Rectangle& rRect) { if ( nPos >= mpData->m_aItems.size() - 1 ) // no separator if it's the last item @@ -2692,7 +2692,7 @@ void ToolBox::ImplDrawSeparator(vcl::RenderContext& rRenderContext, ImplToolItem } } -void ToolBox::ImplDrawButton(vcl::RenderContext& rRenderContext, const Rectangle &rRect, sal_uInt16 highlight, +void ToolBox::ImplDrawButton(vcl::RenderContext& rRenderContext, const tools::Rectangle &rRect, sal_uInt16 highlight, bool bChecked, bool bEnabled, bool bIsWindow ) { // draws toolbar button background either native or using a coloured selection @@ -2761,7 +2761,7 @@ void ToolBox::ImplDrawItem(vcl::RenderContext& rRenderContext, ImplToolItems::si ((pItem->mnBits & ToolBoxItemBits::DROPDOWNONLY) != ToolBoxItemBits::DROPDOWNONLY) ) || ( ( pItem->mnBits & ToolBoxItemBits::DROPDOWN) && ( meTextPosition == ToolBoxTextPosition::Bottom ) ) ) { - Rectangle aArrowRect = pItem->GetDropDownRect( mbHorz && ( meTextPosition == ToolBoxTextPosition::Right ) ); + tools::Rectangle aArrowRect = pItem->GetDropDownRect( mbHorz && ( meTextPosition == ToolBoxTextPosition::Right ) ); if( aArrowRect.Top() == pItem->maRect.Top() ) // dropdown arrow on right side aBtnSize.Width() -= aArrowRect.GetWidth(); else if ( !( (meTextPosition == ToolBoxTextPosition::Bottom) @@ -2772,7 +2772,7 @@ void ToolBox::ImplDrawItem(vcl::RenderContext& rRenderContext, ImplToolItems::si /* Compute the button/separator rectangle here, we'll need it for * both the buttons and the separators. */ - Rectangle aButtonRect( pItem->maRect.TopLeft(), aBtnSize ); + tools::Rectangle aButtonRect( pItem->maRect.TopLeft(), aBtnSize ); long nOffX = SMALLBUTTON_OFF_NORMAL_X; long nOffY = SMALLBUTTON_OFF_NORMAL_Y; long nImageOffX = 0; @@ -2960,7 +2960,7 @@ void ToolBox::ImplDrawItem(vcl::RenderContext& rRenderContext, ImplToolItems::si // paint optional drop down arrow if ( pItem->mnBits & ToolBoxItemBits::DROPDOWN ) { - Rectangle aDropDownRect( pItem->GetDropDownRect( mbHorz && ( meTextPosition == ToolBoxTextPosition::Right ) ) ); + tools::Rectangle aDropDownRect( pItem->GetDropDownRect( mbHorz && ( meTextPosition == ToolBoxTextPosition::Right ) ) ); bool bSetColor = true; if ( !pItem->mbEnabled || !IsEnabled() ) { @@ -2990,7 +2990,7 @@ void ToolBox::ImplDrawFloatwinBorder(vcl::RenderContext& rRenderContext, ImplToo { if ( !pItem->maRect.IsEmpty() ) { - Rectangle aRect( mpFloatWin->ImplGetItemEdgeClipRect() ); + tools::Rectangle aRect( mpFloatWin->ImplGetItemEdgeClipRect() ); aRect.SetPos( AbsoluteScreenToOutputPixel( aRect.TopLeft() ) ); rRenderContext.SetLineColor(rRenderContext.GetSettings().GetStyleSettings().GetShadowColor()); Point p1, p2; @@ -3649,7 +3649,7 @@ void ToolBox::MouseButtonDown( const MouseEvent& rMEvt ) aPos = ScreenToOutputPixel( aPos ); // start dragging - pMgr->StartDragging( this, aMousePos, Rectangle( aPos, aSize ), + pMgr->StartDragging( this, aMousePos, tools::Rectangle( aPos, aSize ), nLineMode ); return; } @@ -3720,12 +3720,12 @@ void ToolBox::InvalidateSpin(bool bUpperIn, bool bLowerIn) Invalidate(maLowerRect); } -void ToolBox::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rPaintRect) +void ToolBox::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rPaintRect) { if( mpData->mbIsPaintLocked ) return; - if (rPaintRect == Rectangle(0, 0, mnDX-1, mnDY-1)) + if (rPaintRect == tools::Rectangle(0, 0, mnDX-1, mnDY-1)) mbFullPaint = true; ImplFormat(); mbFullPaint = false; @@ -3824,7 +3824,7 @@ void ToolBox::Resize() if (!aExpandables.empty()) { //Get how big the optimal size is - Rectangle aBounds; + tools::Rectangle aBounds; for (const ImplToolItem & rItem : mpData->m_aItems) { aBounds.Union( rItem.maRect ); @@ -3864,17 +3864,17 @@ void ToolBox::Resize() if ( mnRightBorder ) { if ( nOldDX > mnDX ) - Invalidate( Rectangle( mnDX-mnRightBorder-1, 0, mnDX, mnDY ) ); + Invalidate( tools::Rectangle( mnDX-mnRightBorder-1, 0, mnDX, mnDY ) ); else - Invalidate( Rectangle( nOldDX-mnRightBorder-1, 0, nOldDX, nOldDY ) ); + Invalidate( tools::Rectangle( nOldDX-mnRightBorder-1, 0, nOldDX, nOldDY ) ); } if ( mnBottomBorder ) { if ( nOldDY > mnDY ) - Invalidate( Rectangle( 0, mnDY-mnBottomBorder-1, mnDX, mnDY ) ); + Invalidate( tools::Rectangle( 0, mnDY-mnBottomBorder-1, mnDX, mnDY ) ); else - Invalidate( Rectangle( 0, nOldDY-mnBottomBorder-1, nOldDX, nOldDY ) ); + Invalidate( tools::Rectangle( 0, nOldDY-mnBottomBorder-1, nOldDX, nOldDY ) ); } } } @@ -3917,7 +3917,7 @@ void ToolBox::RequestHelp( const HelpEvent& rHEvt ) return; else nItemId = mnHighItemId; - Rectangle aRect( GetItemRect( nItemId ) ); + tools::Rectangle aRect( GetItemRect( nItemId ) ); if( aRect.IsEmpty() ) return; else @@ -3929,7 +3929,7 @@ void ToolBox::RequestHelp( const HelpEvent& rHEvt ) if ( rHEvt.GetMode() & (HelpEventMode::BALLOON | HelpEventMode::QUICK) ) { // get rectangle - Rectangle aTempRect = GetItemRect( nItemId ); + tools::Rectangle aTempRect = GetItemRect( nItemId ); Point aPt = OutputToScreenPixel( aTempRect.TopLeft() ); aTempRect.Left() = aPt.X(); aTempRect.Top() = aPt.Y(); @@ -4079,7 +4079,7 @@ void ToolBox::Command( const CommandEvent& rCEvt ) } else if ( rCEvt.GetCommand() == CommandEventId::ContextMenu ) { - ExecuteCustomMenu( Rectangle( rCEvt.GetMousePosPixel(), rCEvt.GetMousePosPixel() ) ); + ExecuteCustomMenu( tools::Rectangle( rCEvt.GetMousePosPixel(), rCEvt.GetMousePosPixel() ) ); return; } @@ -4231,7 +4231,7 @@ void ToolBox::StartDocking() DockingWindow::StartDocking(); } -bool ToolBox::Docking( const Point& rPos, Rectangle& rRect ) +bool ToolBox::Docking( const Point& rPos, tools::Rectangle& rRect ) { // do nothing during dragging, it was calculated before if ( mbDragging ) @@ -4242,7 +4242,7 @@ bool ToolBox::Docking( const Point& rPos, Rectangle& rRect ) DockingWindow::Docking( rPos, rRect ); // if the mouse is outside the area, it can only become a floating window - Rectangle aDockingRect( rRect ); + tools::Rectangle aDockingRect( rRect ); if ( !ImplIsFloatingMode() ) { // don't use tracking rectangle for alignment check, because it will be too large @@ -4256,10 +4256,10 @@ bool ToolBox::Docking( const Point& rPos, Rectangle& rRect ) aDockingRect.SetPos( ImplGetFrameWindow()->GetPointerPosPixel() ); } - Rectangle aIntersection = maOutDockRect.GetIntersection( aDockingRect ); + tools::Rectangle aIntersection = maOutDockRect.GetIntersection( aDockingRect ); if ( !aIntersection.IsEmpty() ) { - Rectangle aInRect = maInDockRect; + tools::Rectangle aInRect = maInDockRect; Size aDockSize; aDockSize.Width() = ImplCalcSize( mnLines, TB_CALCMODE_VERT ).Width(); aDockSize.Height() = ImplCalcSize( mnLines, TB_CALCMODE_HORZ ).Height(); @@ -4282,7 +4282,7 @@ bool ToolBox::Docking( const Point& rPos, Rectangle& rRect ) // if the mouse is outside the Dock area, it can only // become a floating window - Rectangle aIntersect = aInRect.GetIntersection( aDockingRect ); + tools::Rectangle aIntersect = aInRect.GetIntersection( aDockingRect ); if ( aIntersect == aDockingRect ) bFloatMode = true; else @@ -4355,7 +4355,7 @@ bool ToolBox::Docking( const Point& rPos, Rectangle& rRect ) return bFloatMode; } -void ToolBox::EndDocking( const Rectangle& rRect, bool bFloatMode ) +void ToolBox::EndDocking( const tools::Rectangle& rRect, bool bFloatMode ) { if ( !IsDockingCanceled() ) { diff --git a/vcl/source/window/toolbox2.cxx b/vcl/source/window/toolbox2.cxx index b2d708dfbb32..19cc5a029648 100644 --- a/vcl/source/window/toolbox2.cxx +++ b/vcl/source/window/toolbox2.cxx @@ -241,9 +241,9 @@ void ImplToolItem::DetermineButtonDrawStyle( ButtonType eButtonType, bool& rbIma } } -Rectangle ImplToolItem::GetDropDownRect( bool bHorz ) const +tools::Rectangle ImplToolItem::GetDropDownRect( bool bHorz ) const { - Rectangle aRect; + tools::Rectangle aRect; if( (mnBits & ToolBoxItemBits::DROPDOWN) && !maRect.IsEmpty() ) { aRect = maRect; @@ -281,7 +281,7 @@ void ToolBox::ImplInvalidate( bool bNewCalc, bool bFullPaint ) // do we need to redraw? if ( IsReallyVisible() && IsUpdateMode() ) { - Invalidate( Rectangle( mnLeftBorder, mnTopBorder, + Invalidate( tools::Rectangle( mnLeftBorder, mnTopBorder, mnDX-mnRightBorder-1, mnDY-mnBottomBorder-1 ) ); mpIdle->Stop(); } @@ -310,7 +310,7 @@ void ToolBox::ImplUpdateItem( ImplToolItems::size_type nIndex ) if ( nIndex == ITEM_NOTFOUND ) { // #i52217# no immediate draw as this might lead to paint problems - Invalidate( Rectangle( mnLeftBorder, mnTopBorder, mnDX-mnRightBorder-1, mnDY-mnBottomBorder-1 ) ); + Invalidate( tools::Rectangle( mnLeftBorder, mnTopBorder, mnDX-mnRightBorder-1, mnDY-mnBottomBorder-1 ) ); } else { @@ -801,12 +801,12 @@ sal_uInt16 ToolBox::GetItemId(const OUString &rCommand) const return 0; } -Point ToolBox::ImplGetPopupPosition( const Rectangle& rRect, const Size& rSize ) const +Point ToolBox::ImplGetPopupPosition( const tools::Rectangle& rRect, const Size& rSize ) const { Point aPos; if( !rRect.IsEmpty() ) { - Rectangle aScreen = GetDesktopRectPixel(); + tools::Rectangle aScreen = GetDesktopRectPixel(); // the popup should be positioned so that it will not cover // the item rect and that it fits the desktop @@ -855,7 +855,7 @@ Point ToolBox::ImplGetPopupPosition( const Rectangle& rRect, const Size& rSize ) return aPos; } -Rectangle ToolBox::GetItemRect( sal_uInt16 nItemId ) +tools::Rectangle ToolBox::GetItemRect( sal_uInt16 nItemId ) { if ( mbCalc || mbFormat ) ImplFormat(); @@ -864,7 +864,7 @@ Rectangle ToolBox::GetItemRect( sal_uInt16 nItemId ) return GetItemPosRect( nPos ); } -Rectangle ToolBox::GetItemPosRect( ImplToolItems::size_type nPos ) +tools::Rectangle ToolBox::GetItemPosRect( ImplToolItems::size_type nPos ) { if ( mbCalc || mbFormat ) ImplFormat(); @@ -872,10 +872,10 @@ Rectangle ToolBox::GetItemPosRect( ImplToolItems::size_type nPos ) if ( nPos < mpData->m_aItems.size() ) return mpData->m_aItems[nPos].maRect; else - return Rectangle(); + return tools::Rectangle(); } -Rectangle ToolBox::GetOverflowRect() const +tools::Rectangle ToolBox::GetOverflowRect() const { return mpData->maMenubuttonItem.maRect; } @@ -1346,7 +1346,7 @@ bool ToolBox::IsItemReallyVisible( sal_uInt16 nItemId ) const { // is the item on the visible area of the toolbox? bool bRet = false; - Rectangle aRect( mnLeftBorder, mnTopBorder, mnDX-mnRightBorder, mnDY-mnBottomBorder ); + tools::Rectangle aRect( mnLeftBorder, mnTopBorder, mnDX-mnRightBorder, mnDY-mnBottomBorder ); ImplToolItem* pItem = ImplGetItem( nItemId ); if ( pItem && pItem->mbVisible && @@ -1491,7 +1491,7 @@ OUString ToolBox::GetDisplayText() const return mpData->m_pLayoutData ? OUString(mpData->m_pLayoutData->m_aDisplayText) : OUString(); } -Rectangle ToolBox::GetCharacterBounds( sal_uInt16 nItemID, long nIndex ) +tools::Rectangle ToolBox::GetCharacterBounds( sal_uInt16 nItemID, long nIndex ) { long nItemIndex = -1; if( ! mpData->m_pLayoutData ) @@ -1507,7 +1507,7 @@ Rectangle ToolBox::GetCharacterBounds( sal_uInt16 nItemID, long nIndex ) } } } - return (mpData->m_pLayoutData && nItemIndex != -1) ? mpData->m_pLayoutData->GetCharacterBounds( nItemIndex+nIndex ) : Rectangle(); + return (mpData->m_pLayoutData && nItemIndex != -1) ? mpData->m_pLayoutData->GetCharacterBounds( nItemIndex+nIndex ) : tools::Rectangle(); } long ToolBox::GetIndexForPoint( const Point& rPoint, sal_uInt16& rItemID ) @@ -1693,7 +1693,7 @@ IMPL_LINK_NOARG(ToolBox, ImplCallExecuteCustomMenu, void*, void) bool bBorderDel = false; VclPtr<vcl::Window> pWin = this; - Rectangle aMenuRect = mpData->maMenuRect; + tools::Rectangle aMenuRect = mpData->maMenuRect; mpData->maMenuRect.SetEmpty(); VclPtr<ImplBorderWindow> pBorderWin; if( aMenuRect.IsEmpty() && IsFloatingMode() ) @@ -1708,7 +1708,7 @@ IMPL_LINK_NOARG(ToolBox, ImplCallExecuteCustomMenu, void*, void) } } - sal_uInt16 uId = GetMenu()->Execute( pWin, Rectangle( ImplGetPopupPosition( aMenuRect, Size() ), Size() ), + sal_uInt16 uId = GetMenu()->Execute( pWin, tools::Rectangle( ImplGetPopupPosition( aMenuRect, Size() ), Size() ), PopupMenuFlags::ExecuteDown | PopupMenuFlags::NoMouseUpClose ); if ( pWin->IsDisposed() ) @@ -1729,7 +1729,7 @@ IMPL_LINK_NOARG(ToolBox, ImplCallExecuteCustomMenu, void*, void) } } -void ToolBox::ExecuteCustomMenu( const Rectangle& rRect ) +void ToolBox::ExecuteCustomMenu( const tools::Rectangle& rRect ) { if( IsMenuEnabled() ) { diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx index c0186a7049ff..6bf40c96f20b 100644 --- a/vcl/source/window/window.cxx +++ b/vcl/source/window/window.cxx @@ -1211,9 +1211,9 @@ void Window::ImplInitAppFontData( vcl::Window* pWindow ) // of control sizes, if yes, make app font scalings larger // so dialog positioning is not completely off ImplControlValue aControlValue; - Rectangle aCtrlRegion( Point(), Size( nTextWidth < 10 ? 10 : nTextWidth, nTextHeight < 10 ? 10 : nTextHeight ) ); - Rectangle aBoundingRgn( aCtrlRegion ); - Rectangle aContentRgn( aCtrlRegion ); + tools::Rectangle aCtrlRegion( Point(), Size( nTextWidth < 10 ? 10 : nTextWidth, nTextHeight < 10 ? 10 : nTextHeight ) ); + tools::Rectangle aBoundingRgn( aCtrlRegion ); + tools::Rectangle aContentRgn( aCtrlRegion ); if( pWindow->GetNativeControlRegion( ControlType::Editbox, ControlPart::Entire, aCtrlRegion, ControlState::ENABLED, aControlValue, OUString(), aBoundingRgn, aContentRgn ) ) @@ -1248,7 +1248,7 @@ void Window::CopyDeviceArea( SalTwoRect& aPosAry, bool bWindowInvalidate ) if (bWindowInvalidate) { - const Rectangle aSrcRect(Point(aPosAry.mnSrcX, aPosAry.mnSrcY), + const tools::Rectangle aSrcRect(Point(aPosAry.mnSrcX, aPosAry.mnSrcY), Size(aPosAry.mnSrcWidth, aPosAry.mnSrcHeight)); ImplMoveAllInvalidateRegions(aSrcRect, @@ -1454,7 +1454,7 @@ void Window::ImplPosSizeWindow( long nX, long nY, if ( IsReallyVisible() ) { - Rectangle aOldWinRect( Point( nOldOutOffX, nOldOutOffY ), + tools::Rectangle aOldWinRect( Point( nOldOutOffX, nOldOutOffY ), Size( nOldOutWidth, nOldOutHeight ) ); pOldRegion = new vcl::Region( aOldWinRect ); if ( mpWindowImpl->mbWinRegion ) @@ -1542,7 +1542,7 @@ void Window::ImplPosSizeWindow( long nX, long nY, if ( bCopyBits && !pOverlapRegion ) { pOverlapRegion = new vcl::Region(); - ImplCalcOverlapRegion( Rectangle( Point( mnOutOffX, mnOutOffY ), + ImplCalcOverlapRegion( tools::Rectangle( Point( mnOutOffX, mnOutOffY ), Size( mnOutWidth, mnOutHeight ) ), *pOverlapRegion, false, true ); } @@ -1560,7 +1560,7 @@ void Window::ImplPosSizeWindow( long nX, long nY, if ( bCopyBits && !pOverlapRegion ) { pOverlapRegion = new vcl::Region(); - ImplCalcOverlapRegion( Rectangle( Point( mnOutOffX, mnOutOffY ), + ImplCalcOverlapRegion( tools::Rectangle( Point( mnOutOffX, mnOutOffY ), Size( mnOutWidth, mnOutHeight ) ), *pOverlapRegion, false, true ); } @@ -1646,7 +1646,7 @@ void Window::ImplPosSizeWindow( long nX, long nY, if ( bCopyBits && bParentPaint && !HasPaintEvent() ) { Point aPoint( mnOutOffX, mnOutOffY ); - vcl::Region aRegion( Rectangle( aPoint, + vcl::Region aRegion( tools::Rectangle( aPoint, Size( mnOutWidth, mnOutHeight ) ) ); if ( mpWindowImpl->mbWinRegion ) aRegion.Intersect( ImplPixelToDevicePixel( mpWindowImpl->maWinRegion ) ); @@ -1659,7 +1659,7 @@ void Window::ImplPosSizeWindow( long nX, long nY, if ( !aRegion.IsEmpty() ) { // adapt Paint areas - ImplMoveAllInvalidateRegions( Rectangle( Point( nOldOutOffX, nOldOutOffY ), + ImplMoveAllInvalidateRegions( tools::Rectangle( Point( nOldOutOffX, nOldOutOffY ), Size( nOldOutWidth, nOldOutHeight ) ), mnOutOffX-nOldOutOffX, mnOutOffY-nOldOutOffY, true ); @@ -1698,7 +1698,7 @@ void Window::ImplPosSizeWindow( long nX, long nY, else { Point aPoint( mnOutOffX, mnOutOffY ); - vcl::Region aRegion( Rectangle( aPoint, + vcl::Region aRegion( tools::Rectangle( aPoint, Size( mnOutWidth, mnOutHeight ) ) ); aRegion.Exclude( *pOldRegion ); if ( mpWindowImpl->mbWinRegion ) @@ -1875,7 +1875,7 @@ void Window::RequestHelp( const HelpEvent& rHEvt ) Point aPos = GetPosPixel(); if ( ImplGetParent() && !ImplIsOverlapWindow() ) aPos = ImplGetParent()->OutputToScreenPixel( aPos ); - Rectangle aRect( aPos, GetSizePixel() ); + tools::Rectangle aRect( aPos, GetSizePixel() ); Help::ShowBalloon( this, rHEvt.GetMousePosPixel(), aRect, rStr ); } @@ -1890,7 +1890,7 @@ void Window::RequestHelp( const HelpEvent& rHEvt ) Point aPos = GetPosPixel(); if ( ImplGetParent() && !ImplIsOverlapWindow() ) aPos = ImplGetParent()->OutputToScreenPixel( aPos ); - Rectangle aRect( aPos, GetSizePixel() ); + tools::Rectangle aRect( aPos, GetSizePixel() ); OUString aHelpText; if ( !rStr.isEmpty() ) aHelpText = GetHelpText(); @@ -2102,7 +2102,7 @@ void Window::EndExtTextInput() ImplGetFrame()->EndExtTextInput( EndExtTextInputFlags::Complete ); } -void Window::SetCursorRect( const Rectangle* pRect, long nExtTextInputWidth ) +void Window::SetCursorRect( const tools::Rectangle* pRect, long nExtTextInputWidth ) { ImplWinData* pWinData = ImplGetWinData(); @@ -2119,14 +2119,14 @@ void Window::SetCursorRect( const Rectangle* pRect, long nExtTextInputWidth ) else { if ( pRect ) - pWinData->mpCursorRect = new Rectangle( *pRect ); + pWinData->mpCursorRect = new tools::Rectangle( *pRect ); } pWinData->mnCursorExtWidth = nExtTextInputWidth; } -const Rectangle* Window::GetCursorRect() const +const tools::Rectangle* Window::GetCursorRect() const { ImplWinData* pWinData = ImplGetWinData(); @@ -2140,7 +2140,7 @@ long Window::GetCursorExtTextInputWidth() const return pWinData->mnCursorExtWidth; } -void Window::SetCompositionCharRect( const Rectangle* pRect, long nCompositionLength, bool bVertical ) { +void Window::SetCompositionCharRect( const tools::Rectangle* pRect, long nCompositionLength, bool bVertical ) { ImplWinData* pWinData = ImplGetWinData(); delete[] pWinData->mpCompositionCharRects; @@ -2149,7 +2149,7 @@ void Window::SetCompositionCharRect( const Rectangle* pRect, long nCompositionLe pWinData->mnCompositionCharRects = nCompositionLength; if ( pRect && (nCompositionLength > 0) ) { - pWinData->mpCompositionCharRects = new Rectangle[nCompositionLength]; + pWinData->mpCompositionCharRects = new tools::Rectangle[nCompositionLength]; for (long i = 0; i < nCompositionLength; ++i) pWinData->mpCompositionCharRects[i] = pRect[i]; } @@ -2252,7 +2252,7 @@ void Window::Show(bool bVisible, ShowFlags nFlags) * invalidated. Workaround: invalidate an area on the parent, too */ const int workaround_border = 5; - Rectangle aBounds( aInvRegion.GetBoundRect() ); + tools::Rectangle aBounds( aInvRegion.GetBoundRect() ); aBounds.Left() -= workaround_border; aBounds.Top() -= workaround_border; aBounds.Right() += workaround_border; @@ -2759,7 +2759,7 @@ void Window::setPosSizePixel( long nX, long nY, if( pParent && pParent->ImplIsAntiparallel() ) { // --- RTL --- (re-mirror at parent window) - Rectangle aRect( Point ( nX, nY ), Size( nWidth, nHeight ) ); + tools::Rectangle aRect( Point ( nX, nY ), Size( nWidth, nHeight ) ); const OutputDevice *pParentOutDev = pParent->GetOutDev(); pParentOutDev->ReMirror( aRect ); nX = aRect.Left(); @@ -2845,9 +2845,9 @@ Point Window::GetPosPixel() const return mpWindowImpl->maPos; } -Rectangle Window::GetDesktopRectPixel() const +tools::Rectangle Window::GetDesktopRectPixel() const { - Rectangle rRect; + tools::Rectangle rRect; mpWindowImpl->mpFrameWindow->mpWindowImpl->mpFrame->GetWorkArea( rRect ); return rRect; } @@ -2921,7 +2921,7 @@ Point Window::AbsoluteScreenToOutputPixel( const Point& rPos ) const return p; } -Rectangle Window::ImplOutputToUnmirroredAbsoluteScreenPixel( const Rectangle &rRect ) const +tools::Rectangle Window::ImplOutputToUnmirroredAbsoluteScreenPixel( const tools::Rectangle &rRect ) const { // this method creates unmirrored screen coordinates to be compared with the desktop // and is used for positioning of RTL popup windows correctly on the screen @@ -2935,22 +2935,22 @@ Rectangle Window::ImplOutputToUnmirroredAbsoluteScreenPixel( const Rectangle &rR p2.X() = g.nX+g.nWidth-p2.X(); p2.Y() += g.nY; - return Rectangle( p1, p2 ); + return tools::Rectangle( p1, p2 ); } -Rectangle Window::GetWindowExtentsRelative( vcl::Window *pRelativeWindow ) const +tools::Rectangle Window::GetWindowExtentsRelative( vcl::Window *pRelativeWindow ) const { // with decoration return ImplGetWindowExtentsRelative( pRelativeWindow, false ); } -Rectangle Window::GetClientWindowExtentsRelative() const +tools::Rectangle Window::GetClientWindowExtentsRelative() const { // without decoration return ImplGetWindowExtentsRelative( nullptr, true ); } -Rectangle Window::ImplGetWindowExtentsRelative( vcl::Window *pRelativeWindow, bool bClientOnly ) const +tools::Rectangle Window::ImplGetWindowExtentsRelative( vcl::Window *pRelativeWindow, bool bClientOnly ) const { SalFrameGeometry g = mpWindowImpl->mpFrame->GetGeometry(); // make sure we use the extent of our border window, @@ -2975,23 +2975,23 @@ Rectangle Window::ImplGetWindowExtentsRelative( vcl::Window *pRelativeWindow, bo vcl::Window *pRelWin = (!bClientOnly && pRelativeWindow->mpWindowImpl->mpBorderWindow) ? pRelativeWindow->mpWindowImpl->mpBorderWindow.get() : pRelativeWindow; aPos = pRelWin->AbsoluteScreenToOutputPixel( aPos ); } - return Rectangle( aPos, aSize ); + return tools::Rectangle( aPos, aSize ); } void Window::Scroll( long nHorzScroll, long nVertScroll, ScrollFlags nFlags ) { - ImplScroll( Rectangle( Point( mnOutOffX, mnOutOffY ), + ImplScroll( tools::Rectangle( Point( mnOutOffX, mnOutOffY ), Size( mnOutWidth, mnOutHeight ) ), nHorzScroll, nVertScroll, nFlags & ~ScrollFlags::Clip ); } void Window::Scroll( long nHorzScroll, long nVertScroll, - const Rectangle& rRect, ScrollFlags nFlags ) + const tools::Rectangle& rRect, ScrollFlags nFlags ) { OutputDevice *pOutDev = GetOutDev(); - Rectangle aRect = pOutDev->ImplLogicToDevicePixel( rRect ); - aRect.Intersection( Rectangle( Point( mnOutOffX, mnOutOffY ), Size( mnOutWidth, mnOutHeight ) ) ); + tools::Rectangle aRect = pOutDev->ImplLogicToDevicePixel( rRect ); + aRect.Intersection( tools::Rectangle( Point( mnOutOffX, mnOutOffY ), Size( mnOutWidth, mnOutHeight ) ) ); if ( !aRect.IsEmpty() ) ImplScroll( aRect, nHorzScroll, nVertScroll, nFlags ); } @@ -2999,7 +2999,7 @@ void Window::Scroll( long nHorzScroll, long nVertScroll, void Window::Flush() { - const Rectangle aWinRect( Point( mnOutOffX, mnOutOffY ), Size( mnOutWidth, mnOutHeight ) ); + const tools::Rectangle aWinRect( Point( mnOutOffX, mnOutOffY ), Size( mnOutWidth, mnOutHeight ) ); mpWindowImpl->mpFrame->Flush( aWinRect ); } @@ -3295,7 +3295,7 @@ Reference< XClipboard > Window::GetPrimarySelection() return static_cast < XClipboard * > (nullptr); } -void Window::RecordLayoutData( vcl::ControlLayoutData* pLayout, const Rectangle& rRect ) +void Window::RecordLayoutData( vcl::ControlLayoutData* pLayout, const tools::Rectangle& rRect ) { assert(mpOutDevData); mpOutDevData->mpRecordLayout = pLayout; @@ -3304,7 +3304,7 @@ void Window::RecordLayoutData( vcl::ControlLayoutData* pLayout, const Rectangle& mpOutDevData->mpRecordLayout = nullptr; } -void Window::DrawSelectionBackground( const Rectangle& rRect, +void Window::DrawSelectionBackground( const tools::Rectangle& rRect, sal_uInt16 highlight, bool bChecked, bool bDrawBorder @@ -3336,7 +3336,7 @@ void Window::DrawSelectionBackground( const Rectangle& rRect, aSelectionBorderCol = aSelectionFillCol; } - Rectangle aRect( rRect ); + tools::Rectangle aRect( rRect ); Color oldFillCol = GetFillColor(); Color oldLineCol = GetLineColor(); diff --git a/vcl/source/window/window2.cxx b/vcl/source/window/window2.cxx index 9882ce3e3e77..a88d1c0c8a40 100644 --- a/vcl/source/window/window2.cxx +++ b/vcl/source/window/window2.cxx @@ -49,7 +49,7 @@ using namespace com::sun::star; namespace vcl { -void Window::ShowFocus( const Rectangle& rRect ) +void Window::ShowFocus( const tools::Rectangle& rRect ) { if( mpWindowImpl->mbInShowFocus ) return; @@ -77,7 +77,7 @@ void Window::ShowFocus( const Rectangle& rRect ) ImplInvertFocus( rRect ); } if ( !pWinData->mpFocusRect ) - pWinData->mpFocusRect = new Rectangle( rRect ); + pWinData->mpFocusRect = new tools::Rectangle( rRect ); else *(pWinData->mpFocusRect) = rRect; mpWindowImpl->mbFocusVisible = true; @@ -127,7 +127,7 @@ void Window::HideFocus() mpWindowImpl->mbInHideFocus = false; } -void Window::ShowTracking( const Rectangle& rRect, ShowTrackFlags nFlags ) +void Window::ShowTracking( const tools::Rectangle& rRect, ShowTrackFlags nFlags ) { ImplWinData* pWinData = ImplGetWinData(); @@ -146,7 +146,7 @@ void Window::ShowTracking( const Rectangle& rRect, ShowTrackFlags nFlags ) } if ( !pWinData->mpTrackRect ) - pWinData->mpTrackRect = new Rectangle( rRect ); + pWinData->mpTrackRect = new tools::Rectangle( rRect ); else *(pWinData->mpTrackRect) = rRect; pWinData->mnTrackFlags = nFlags; @@ -164,10 +164,10 @@ void Window::HideTracking() } } -void Window::InvertTracking( const Rectangle& rRect, ShowTrackFlags nFlags ) +void Window::InvertTracking( const tools::Rectangle& rRect, ShowTrackFlags nFlags ) { OutputDevice *pOutDev = GetOutDev(); - Rectangle aRect( pOutDev->ImplLogicToDevicePixel( rRect ) ); + tools::Rectangle aRect( pOutDev->ImplLogicToDevicePixel( rRect ) ); if ( aRect.IsEmpty() ) return; @@ -202,7 +202,7 @@ void Window::InvertTracking( const Rectangle& rRect, ShowTrackFlags nFlags ) if ( nFlags & ShowTrackFlags::Clip ) { Point aPoint( mnOutOffX, mnOutOffY ); - vcl::Region aRegion( Rectangle( aPoint, + vcl::Region aRegion( tools::Rectangle( aPoint, Size( mnOutWidth, mnOutHeight ) ) ); ImplClipBoundaries( aRegion, false, false ); pOutDev->SelectClipRegion( aRegion, pGraphics ); @@ -266,7 +266,7 @@ void Window::InvertTracking( const tools::Polygon& rPoly, ShowTrackFlags nFlags if ( nFlags & ShowTrackFlags::Clip ) { Point aPoint( mnOutOffX, mnOutOffY ); - vcl::Region aRegion( Rectangle( aPoint, + vcl::Region aRegion( tools::Rectangle( aPoint, Size( mnOutWidth, mnOutHeight ) ) ); ImplClipBoundaries( aRegion, false, false ); pOutDev->SelectClipRegion( aRegion, pGraphics ); diff --git a/vcl/source/window/winproc.cxx b/vcl/source/window/winproc.cxx index 567f1c969412..17ada9bc8752 100644 --- a/vcl/source/window/winproc.cxx +++ b/vcl/source/window/winproc.cxx @@ -1240,7 +1240,7 @@ static bool ImplHandleEndExtTextInput( vcl::Window* /* pWindow */ ) } static void ImplHandleExtTextInputPos( vcl::Window* pWindow, - Rectangle& rRect, long& rInputWidth, + tools::Rectangle& rRect, long& rInputWidth, bool * pVertical ) { ImplSVData* pSVData = ImplGetSVData(); @@ -1259,7 +1259,7 @@ static void ImplHandleExtTextInputPos( vcl::Window* pWindow, { const OutputDevice *pChildOutDev = pChild->GetOutDev(); ImplCallCommand( pChild, CommandEventId::CursorPos ); - const Rectangle* pRect = pChild->GetCursorRect(); + const tools::Rectangle* pRect = pChild->GetCursorRect(); if ( pRect ) rRect = pChildOutDev->ImplLogicToDevicePixel( *pRect ); else @@ -1271,10 +1271,10 @@ static void ImplHandleExtTextInputPos( vcl::Window* pWindow, Size aSize = pChild->LogicToPixel( pCursor->GetSize() ); if ( !aSize.Width() ) aSize.Width() = pChild->GetSettings().GetStyleSettings().GetCursorSize(); - rRect = Rectangle( aPos, aSize ); + rRect = tools::Rectangle( aPos, aSize ); } else - rRect = Rectangle( Point( pChild->GetOutOffXPixel(), pChild->GetOutOffYPixel() ), Size() ); + rRect = tools::Rectangle( Point( pChild->GetOutOffXPixel(), pChild->GetOutOffYPixel() ), Size() ); } rInputWidth = pChild->ImplLogicWidthToDevicePixel( pChild->GetCursorExtTextInputWidth() ); if ( !rInputWidth ) @@ -1573,7 +1573,7 @@ static bool ImplHandleLongPress(vcl::Window *pWindow, const SalLongPressEvent& r return aHandler.HandleEvent(); } -static void ImplHandlePaint( vcl::Window* pWindow, const Rectangle& rBoundRect, bool bImmediateUpdate ) +static void ImplHandlePaint( vcl::Window* pWindow, const tools::Rectangle& rBoundRect, bool bImmediateUpdate ) { // system paint events must be checked for re-mirroring pWindow->ImplGetWindowImpl()->mnPaintFlags |= ImplPaintFlags::CheckRtl; @@ -2157,7 +2157,7 @@ static void ImplHandleSalSettings( SalEvent nEvent ) static void ImplHandleSalExtTextInputPos( vcl::Window* pWindow, SalExtTextInputPosEvent* pEvt ) { - Rectangle aCursorRect; + tools::Rectangle aCursorRect; ImplHandleExtTextInputPos( pWindow, aCursorRect, pEvt->mnExtWidth, &pEvt->mbVertical ); if ( aCursorRect.IsEmpty() ) { @@ -2283,8 +2283,8 @@ static void ImplHandleSalQueryCharPosition( vcl::Window *pWindow, if ( pWinData->mpCompositionCharRects && pEvt->mnCharPos < static_cast<sal_uLong>( pWinData->mnCompositionCharRects ) ) { const OutputDevice *pChildOutDev = pChild->GetOutDev(); - const Rectangle& aRect = pWinData->mpCompositionCharRects[ pEvt->mnCharPos ]; - Rectangle aDeviceRect = pChildOutDev->ImplLogicToDevicePixel( aRect ); + const tools::Rectangle& aRect = pWinData->mpCompositionCharRects[ pEvt->mnCharPos ]; + tools::Rectangle aDeviceRect = pChildOutDev->ImplLogicToDevicePixel( aRect ); Point aAbsScreenPos = pChild->OutputToAbsoluteScreenPixel( pChild->ScreenToOutputPixel(aDeviceRect.TopLeft()) ); pEvt->mnCursorBoundX = aAbsScreenPos.X(); pEvt->mnCursorBoundY = aAbsScreenPos.Y(); @@ -2429,7 +2429,7 @@ bool ImplWindowFrameProc( vcl::Window* _pWindow, SalEvent nEvent, const void* pE const_cast<SalPaintEvent *>(pPaintEvt)->mnBoundX = pSalFrame->maGeometry.nWidth-pPaintEvt->mnBoundWidth-pPaintEvt->mnBoundX; } - Rectangle aBoundRect( Point( pPaintEvt->mnBoundX, pPaintEvt->mnBoundY ), + tools::Rectangle aBoundRect( Point( pPaintEvt->mnBoundX, pPaintEvt->mnBoundY ), Size( pPaintEvt->mnBoundWidth, pPaintEvt->mnBoundHeight ) ); ImplHandlePaint( pWindow, aBoundRect, pPaintEvt->mbImmediateUpdate ); } diff --git a/vcl/unx/generic/app/saldisp.cxx b/vcl/unx/generic/app/saldisp.cxx index 0a586297083e..8fa71a19a9da 100644 --- a/vcl/unx/generic/app/saldisp.cxx +++ b/vcl/unx/generic/app/saldisp.cxx @@ -2251,7 +2251,7 @@ void SalDisplay::addXineramaScreenUnique( int i, long i_nX, long i_nY, long i_nW } } m_aXineramaScreenIndexMap[i] = m_aXineramaScreens.size(); - m_aXineramaScreens.push_back( Rectangle( Point( i_nX, i_nY ), Size( i_nWidth, i_nHeight ) ) ); + m_aXineramaScreens.push_back( tools::Rectangle( Point( i_nX, i_nY ), Size( i_nWidth, i_nHeight ) ) ); } void SalDisplay::InitXinerama() @@ -2270,7 +2270,7 @@ void SalDisplay::InitXinerama() { if( nFramebuffers > 1 ) { - m_aXineramaScreens = std::vector<Rectangle>(); + m_aXineramaScreens = std::vector<tools::Rectangle>(); m_aXineramaScreenIndexMap = std::vector<int>(nFramebuffers); for( int i = 0; i < nFramebuffers; i++ ) { diff --git a/vcl/unx/generic/app/wmadaptor.cxx b/vcl/unx/generic/app/wmadaptor.cxx index 559bc1cf3770..7b4cc062f854 100644 --- a/vcl/unx/generic/app/wmadaptor.cxx +++ b/vcl/unx/generic/app/wmadaptor.cxx @@ -234,8 +234,8 @@ WMAdaptor::WMAdaptor( SalDisplay* pDisplay ) : // default desktops m_nDesktops = 1; - m_aWMWorkAreas = ::std::vector< Rectangle > - ( 1, Rectangle( Point(), m_pSalDisplay->GetScreenSize( m_pSalDisplay->GetDefaultXScreen() ) ) ); + m_aWMWorkAreas = ::std::vector< tools::Rectangle > + ( 1, tools::Rectangle( Point(), m_pSalDisplay->GetScreenSize( m_pSalDisplay->GetDefaultXScreen() ) ) ); m_bEqualWorkAreas = true; memset( m_aWMAtoms, 0, sizeof( m_aWMAtoms ) ); @@ -457,7 +457,7 @@ NetWMAdaptor::NetWMAdaptor( SalDisplay* pSalDisplay ) : && nItems == 4*(unsigned)m_nDesktops ) { - m_aWMWorkAreas = ::std::vector< Rectangle > ( m_nDesktops ); + m_aWMWorkAreas = ::std::vector< tools::Rectangle > ( m_nDesktops ); long* pValues = reinterpret_cast<long*>(pProperty); for( int i = 0; i < m_nDesktops; i++ ) { @@ -465,7 +465,7 @@ NetWMAdaptor::NetWMAdaptor( SalDisplay* pSalDisplay ) : pValues[4*i+1] ); Size aSize( pValues[4*i+2], pValues[4*i+3] ); - Rectangle aWorkArea( aPoint, aSize ); + tools::Rectangle aWorkArea( aPoint, aSize ); m_aWMWorkAreas[i] = aWorkArea; if( aWorkArea != m_aWMWorkAreas[0] ) m_bEqualWorkAreas = false; @@ -1134,9 +1134,9 @@ void NetWMAdaptor::setNetWMState( X11SalFrame* pFrame ) const if( nCurrent < 0 ) nCurrent = 0; } - Rectangle aPosSize = m_aWMWorkAreas[nCurrent]; + tools::Rectangle aPosSize = m_aWMWorkAreas[nCurrent]; const SalFrameGeometry& rGeom( pFrame->GetUnmirroredGeometry() ); - aPosSize = Rectangle( Point( aPosSize.Left() + rGeom.nLeftDecoration, + aPosSize = tools::Rectangle( Point( aPosSize.Left() + rGeom.nLeftDecoration, aPosSize.Top() + rGeom.nTopDecoration ), Size( aPosSize.GetWidth() - rGeom.nLeftDecoration @@ -1224,9 +1224,9 @@ void GnomeWMAdaptor::setGnomeWMState( X11SalFrame* pFrame ) const if( nCurrent < 0 ) nCurrent = 0; } - Rectangle aPosSize = m_aWMWorkAreas[nCurrent]; + tools::Rectangle aPosSize = m_aWMWorkAreas[nCurrent]; const SalFrameGeometry& rGeom( pFrame->GetUnmirroredGeometry() ); - aPosSize = Rectangle( Point( aPosSize.Left() + rGeom.nLeftDecoration, + aPosSize = tools::Rectangle( Point( aPosSize.Left() + rGeom.nLeftDecoration, aPosSize.Top() + rGeom.nTopDecoration ), Size( aPosSize.GetWidth() - rGeom.nLeftDecoration @@ -1448,7 +1448,7 @@ void WMAdaptor::maximizeFrame( X11SalFrame* pFrame, bool bHorizontal, bool bVert if( m_pSalDisplay->IsXinerama() ) { Point aMed( aTL.X() + rGeom.nWidth/2, aTL.Y() + rGeom.nHeight/2 ); - const std::vector< Rectangle >& rScreens = m_pSalDisplay->GetXineramaScreens(); + const std::vector< tools::Rectangle >& rScreens = m_pSalDisplay->GetXineramaScreens(); for(const auto & rScreen : rScreens) if( rScreen.IsInside( aMed ) ) { @@ -1457,7 +1457,7 @@ void WMAdaptor::maximizeFrame( X11SalFrame* pFrame, bool bHorizontal, bool bVert break; } } - Rectangle aTarget( aTL, + tools::Rectangle aTarget( aTL, Size( aScreenSize.Width() - rGeom.nLeftDecoration - rGeom.nTopDecoration, aScreenSize.Height() - rGeom.nTopDecoration - rGeom.nBottomDecoration ) ); @@ -1488,7 +1488,7 @@ void WMAdaptor::maximizeFrame( X11SalFrame* pFrame, bool bHorizontal, bool bVert rGeom.nY : pFrame->maRestorePosSize.Top(); } - Rectangle aRestore( Point( rGeom.nX, rGeom.nY ), Size( rGeom.nWidth, rGeom.nHeight ) ); + tools::Rectangle aRestore( Point( rGeom.nX, rGeom.nY ), Size( rGeom.nWidth, rGeom.nHeight ) ); if( pFrame->bMapped_ ) { XSetInputFocus( m_pDisplay, @@ -1516,7 +1516,7 @@ void WMAdaptor::maximizeFrame( X11SalFrame* pFrame, bool bHorizontal, bool bVert else { pFrame->SetPosSize( pFrame->maRestorePosSize ); - pFrame->maRestorePosSize = Rectangle(); + pFrame->maRestorePosSize = tools::Rectangle(); pFrame->nWidth_ = rGeom.nWidth; pFrame->nHeight_ = rGeom.nHeight; } @@ -1577,12 +1577,12 @@ void NetWMAdaptor::maximizeFrame( X11SalFrame* pFrame, bool bHorizontal, bool bV setNetWMState( pFrame ); } if( !bHorizontal && !bVertical ) - pFrame->maRestorePosSize = Rectangle(); + pFrame->maRestorePosSize = tools::Rectangle(); else if( pFrame->maRestorePosSize.IsEmpty() ) { const SalFrameGeometry& rGeom( pFrame->GetUnmirroredGeometry() ); pFrame->maRestorePosSize = - Rectangle( Point( rGeom.nX, rGeom.nY ), Size( rGeom.nWidth, rGeom.nHeight ) ); + tools::Rectangle( Point( rGeom.nX, rGeom.nY ), Size( rGeom.nWidth, rGeom.nHeight ) ); } } else @@ -1631,12 +1631,12 @@ void GnomeWMAdaptor::maximizeFrame( X11SalFrame* pFrame, bool bHorizontal, bool setGnomeWMState( pFrame ); if( !bHorizontal && !bVertical ) - pFrame->maRestorePosSize = Rectangle(); + pFrame->maRestorePosSize = tools::Rectangle(); else if( pFrame->maRestorePosSize.IsEmpty() ) { const SalFrameGeometry& rGeom( pFrame->GetUnmirroredGeometry() ); pFrame->maRestorePosSize = - Rectangle( Point( rGeom.nX, rGeom.nY ), Size( rGeom.nWidth, rGeom.nHeight ) ); + tools::Rectangle( Point( rGeom.nX, rGeom.nY ), Size( rGeom.nWidth, rGeom.nHeight ) ); } } else @@ -1815,14 +1815,14 @@ int NetWMAdaptor::handlePropertyNotify( X11SalFrame* pFrame, XPropertyEvent* pEv } if( ! (pFrame->mbMaximizedHorz || pFrame->mbMaximizedVert ) ) - pFrame->maRestorePosSize = Rectangle(); + pFrame->maRestorePosSize = tools::Rectangle(); else { const SalFrameGeometry& rGeom = pFrame->GetUnmirroredGeometry(); // the current geometry may already be changed by the corresponding // ConfigureNotify, but this cannot be helped pFrame->maRestorePosSize = - Rectangle( Point( rGeom.nX, rGeom.nY ), + tools::Rectangle( Point( rGeom.nX, rGeom.nY ), Size( rGeom.nWidth, rGeom.nHeight ) ); } } @@ -1881,14 +1881,14 @@ int GnomeWMAdaptor::handlePropertyNotify( X11SalFrame* pFrame, XPropertyEvent* p } if( ! (pFrame->mbMaximizedHorz || pFrame->mbMaximizedVert ) ) - pFrame->maRestorePosSize = Rectangle(); + pFrame->maRestorePosSize = tools::Rectangle(); else { const SalFrameGeometry& rGeom = pFrame->GetUnmirroredGeometry(); // the current geometry may already be changed by the corresponding // ConfigureNotify, but this cannot be helped pFrame->maRestorePosSize = - Rectangle( Point( rGeom.nX, rGeom.nY ), + tools::Rectangle( Point( rGeom.nX, rGeom.nY ), Size( rGeom.nWidth, rGeom.nHeight ) ); } } @@ -2047,7 +2047,7 @@ void NetWMAdaptor::showFullScreen( X11SalFrame* pFrame, bool bFullScreen ) const m_pSalDisplay->GetRootWindow( pFrame->GetScreenNumber() ), &aRoot, &aChild, &root_x, &root_y, &lx, &ly, &mask ); - const std::vector< Rectangle >& rScreens = m_pSalDisplay->GetXineramaScreens(); + const std::vector< tools::Rectangle >& rScreens = m_pSalDisplay->GetXineramaScreens(); Point aMousePoint( root_x, root_y ); for(const auto & rScreen : rScreens) { diff --git a/vcl/unx/generic/fontmanager/fontmanager.cxx b/vcl/unx/generic/fontmanager/fontmanager.cxx index 5efceb8bec49..012876db03a3 100644 --- a/vcl/unx/generic/fontmanager/fontmanager.cxx +++ b/vcl/unx/generic/fontmanager/fontmanager.cxx @@ -1090,7 +1090,7 @@ bool PrintFontManager::createFontSubset( int xMin, yMin, xMax, yMax; getFontBoundingBox( nFont, xMin, yMin, xMax, yMax ); - rInfo.m_aFontBBox = Rectangle( Point( xMin, yMin ), Size( xMax-xMin, yMax-yMin ) ); + rInfo.m_aFontBBox = tools::Rectangle( Point( xMin, yMin ), Size( xMax-xMin, yMax-yMin ) ); rInfo.m_nCapHeight = yMax; // Well ... // fill in glyph advance widths diff --git a/vcl/unx/generic/gdi/cairotextrender.cxx b/vcl/unx/generic/gdi/cairotextrender.cxx index 11cedcc66701..6321f64e1c64 100644 --- a/vcl/unx/generic/gdi/cairotextrender.cxx +++ b/vcl/unx/generic/gdi/cairotextrender.cxx @@ -425,7 +425,7 @@ void CairoTextRender::GetFontMetric( ImplFontMetricDataRef& rxFontMetric, int nF mpFreetypeFont[nFallbackLevel]->GetFontMetric(rxFontMetric); } -bool CairoTextRender::GetGlyphBoundRect(const GlyphItem& rGlyph, Rectangle& rRect) +bool CairoTextRender::GetGlyphBoundRect(const GlyphItem& rGlyph, tools::Rectangle& rRect) { const int nLevel = rGlyph.mnFallbackLevel; if( nLevel >= MAX_FALLBACK ) @@ -435,7 +435,7 @@ bool CairoTextRender::GetGlyphBoundRect(const GlyphItem& rGlyph, Rectangle& rRec if( !pSF ) return false; - Rectangle aRect = pSF->GetGlyphBoundRect(rGlyph); + tools::Rectangle aRect = pSF->GetGlyphBoundRect(rGlyph); if ( pSF->mnCos != 0x10000 && pSF->mnSin != 0 ) { diff --git a/vcl/unx/generic/gdi/font.cxx b/vcl/unx/generic/gdi/font.cxx index b4141e07efad..2e8dd081cf35 100644 --- a/vcl/unx/generic/gdi/font.cxx +++ b/vcl/unx/generic/gdi/font.cxx @@ -106,7 +106,7 @@ X11SalGraphics::GetFontMetric( ImplFontMetricDataRef &rxFontMetric, int nFallbac mxTextRenderImpl->GetFontMetric(rxFontMetric, nFallbackLevel); } -bool X11SalGraphics::GetGlyphBoundRect(const GlyphItem& rGlyph, Rectangle& rRect) +bool X11SalGraphics::GetGlyphBoundRect(const GlyphItem& rGlyph, tools::Rectangle& rRect) { return mxTextRenderImpl->GetGlyphBoundRect(rGlyph, rRect); } diff --git a/vcl/unx/generic/gdi/openglx11cairotextrender.cxx b/vcl/unx/generic/gdi/openglx11cairotextrender.cxx index 2710b6a0ed10..08618195a036 100644 --- a/vcl/unx/generic/gdi/openglx11cairotextrender.cxx +++ b/vcl/unx/generic/gdi/openglx11cairotextrender.cxx @@ -26,7 +26,7 @@ cairo_t* OpenGLX11CairoTextRender::getCairoContext() OpenGLSalGraphicsImpl *pImpl = dynamic_cast< OpenGLSalGraphicsImpl* >(mrParent.GetImpl()); if( pImpl ) { - Rectangle aClipRect = pImpl->getClipRegion().GetBoundRect(); + tools::Rectangle aClipRect = pImpl->getClipRegion().GetBoundRect(); if( aClipRect.GetWidth() == 0 || aClipRect.GetHeight() == 0 ) { aClipRect.setWidth( GetWidth() ); @@ -46,7 +46,7 @@ void OpenGLX11CairoTextRender::getSurfaceOffset( double& nDX, double& nDY ) OpenGLSalGraphicsImpl *pImpl = dynamic_cast< OpenGLSalGraphicsImpl* >(mrParent.GetImpl()); if( pImpl ) { - Rectangle aClipRect = pImpl->getClipRegion().GetBoundRect(); + tools::Rectangle aClipRect = pImpl->getClipRegion().GetBoundRect(); nDX = -aClipRect.Left(); nDY = -aClipRect.Top(); } @@ -69,7 +69,7 @@ void OpenGLX11CairoTextRender::releaseCairoContext(cairo_t* cr) unsigned char *pSrc = cairo_image_surface_get_data( pSurface ); // XXX: lfrb: GLES 2.0 doesn't support GL_UNSIGNED_INT_8_8_8_8_REV - Rectangle aClipRect = pImpl->getClipRegion().GetBoundRect(); + tools::Rectangle aClipRect = pImpl->getClipRegion().GetBoundRect(); SalTwoRect aRect(0, 0, nWidth, nHeight, aClipRect.Left(), aClipRect.Top(), nWidth, nHeight); diff --git a/vcl/unx/generic/glyphs/freetype_glyphcache.cxx b/vcl/unx/generic/glyphs/freetype_glyphcache.cxx index c24dd5f3e050..c4341fe27176 100644 --- a/vcl/unx/generic/glyphs/freetype_glyphcache.cxx +++ b/vcl/unx/generic/glyphs/freetype_glyphcache.cxx @@ -650,7 +650,7 @@ void FreetypeFont::InitGlyphData(const GlyphItem& rGlyph, GlyphData& rGD ) const FT_BBox aBbox; FT_Glyph_Get_CBox( pGlyphFT, FT_GLYPH_BBOX_PIXELS, &aBbox ); - rGD.SetBoundRect(Rectangle(aBbox.xMin, -aBbox.yMax, aBbox.xMax, -aBbox.yMin)); + rGD.SetBoundRect(tools::Rectangle(aBbox.xMin, -aBbox.yMax, aBbox.xMax, -aBbox.yMin)); FT_Done_Glyph( pGlyphFT ); } diff --git a/vcl/unx/generic/glyphs/glyphcache.cxx b/vcl/unx/generic/glyphs/glyphcache.cxx index b72a0a0cd4a1..f5978ba35c2f 100644 --- a/vcl/unx/generic/glyphs/glyphcache.cxx +++ b/vcl/unx/generic/glyphs/glyphcache.cxx @@ -314,7 +314,7 @@ long FreetypeFont::Release() const return --mnRefCount; } -const Rectangle& FreetypeFont::GetGlyphBoundRect(const GlyphItem& rGlyph) +const tools::Rectangle& FreetypeFont::GetGlyphBoundRect(const GlyphItem& rGlyph) { // usually the GlyphData is cached GlyphList::iterator it = maGlyphList.find(rGlyph.maGlyphId); diff --git a/vcl/unx/generic/print/bitmap_gfx.cxx b/vcl/unx/generic/print/bitmap_gfx.cxx index e28064d6f543..0573001edb06 100644 --- a/vcl/unx/generic/print/bitmap_gfx.cxx +++ b/vcl/unx/generic/print/bitmap_gfx.cxx @@ -407,7 +407,7 @@ LZWEncoder::EncodeByte (sal_uInt8 nByte ) */ void -PrinterGfx::DrawBitmap (const Rectangle& rDest, const Rectangle& rSrc, +PrinterGfx::DrawBitmap (const tools::Rectangle& rDest, const tools::Rectangle& rSrc, const PrinterBmp& rBitmap) { double fScaleX = (double)rDest.GetWidth(); @@ -468,7 +468,7 @@ PrinterGfx::DrawBitmap (const Rectangle& rDest, const Rectangle& rSrc, */ void -PrinterGfx::DrawPS1GrayImage (const PrinterBmp& rBitmap, const Rectangle& rArea) +PrinterGfx::DrawPS1GrayImage (const PrinterBmp& rBitmap, const tools::Rectangle& rArea) { sal_uInt32 nWidth = rArea.GetWidth(); sal_uInt32 nHeight = rArea.GetHeight(); @@ -515,7 +515,7 @@ PrinterGfx::DrawPS1GrayImage (const PrinterBmp& rBitmap, const Rectangle& rArea) */ void -PrinterGfx::writePS2ImageHeader (const Rectangle& rArea, psp::ImageType nType) +PrinterGfx::writePS2ImageHeader (const tools::Rectangle& rArea, psp::ImageType nType) { sal_Int32 nChar = 0; sal_Char pImage [512]; @@ -591,7 +591,7 @@ PrinterGfx::writePS2Colorspace(const PrinterBmp& rBitmap, psp::ImageType nType) } void -PrinterGfx::DrawPS2GrayImage (const PrinterBmp& rBitmap, const Rectangle& rArea) +PrinterGfx::DrawPS2GrayImage (const PrinterBmp& rBitmap, const tools::Rectangle& rArea) { writePS2Colorspace(rBitmap, psp::ImageType::GrayScaleImage); writePS2ImageHeader(rArea, psp::ImageType::GrayScaleImage); @@ -609,7 +609,7 @@ PrinterGfx::DrawPS2GrayImage (const PrinterBmp& rBitmap, const Rectangle& rArea) } void -PrinterGfx::DrawPS2MonoImage (const PrinterBmp& rBitmap, const Rectangle& rArea) +PrinterGfx::DrawPS2MonoImage (const PrinterBmp& rBitmap, const tools::Rectangle& rArea) { writePS2Colorspace(rBitmap, psp::ImageType::MonochromeImage); writePS2ImageHeader(rArea, psp::ImageType::MonochromeImage); @@ -640,7 +640,7 @@ PrinterGfx::DrawPS2MonoImage (const PrinterBmp& rBitmap, const Rectangle& rArea) } void -PrinterGfx::DrawPS2PaletteImage (const PrinterBmp& rBitmap, const Rectangle& rArea) +PrinterGfx::DrawPS2PaletteImage (const PrinterBmp& rBitmap, const tools::Rectangle& rArea) { writePS2Colorspace(rBitmap, psp::ImageType::PaletteImage); writePS2ImageHeader(rArea, psp::ImageType::PaletteImage); @@ -658,7 +658,7 @@ PrinterGfx::DrawPS2PaletteImage (const PrinterBmp& rBitmap, const Rectangle& rAr } void -PrinterGfx::DrawPS2TrueColorImage (const PrinterBmp& rBitmap, const Rectangle& rArea) +PrinterGfx::DrawPS2TrueColorImage (const PrinterBmp& rBitmap, const tools::Rectangle& rArea) { writePS2Colorspace(rBitmap, psp::ImageType::TrueColorImage); writePS2ImageHeader(rArea, psp::ImageType::TrueColorImage); diff --git a/vcl/unx/generic/print/common_gfx.cxx b/vcl/unx/generic/print/common_gfx.cxx index df32ef2a2ebb..1d9a1ca9b659 100644 --- a/vcl/unx/generic/print/common_gfx.cxx +++ b/vcl/unx/generic/print/common_gfx.cxx @@ -160,21 +160,21 @@ void PrinterGfx::UnionClipRegion (sal_Int32 nX,sal_Int32 nY,sal_Int32 nDX,sal_Int32 nDY) { if( nDX && nDY ) - maClipRegion.push_back (Rectangle(Point(nX,nY ), Size(nDX,nDY))); + maClipRegion.push_back (tools::Rectangle(Point(nX,nY ), Size(nDX,nDY))); } bool -PrinterGfx::JoinVerticalClipRectangles( std::list< Rectangle >::iterator& it, +PrinterGfx::JoinVerticalClipRectangles( std::list< tools::Rectangle >::iterator& it, Point& rOldPoint, sal_Int32& rColumn ) { bool bSuccess = false; - std::list< Rectangle >::iterator tempit, nextit; + std::list< tools::Rectangle >::iterator tempit, nextit; nextit = it; ++nextit; std::list< Point > leftside, rightside; - Rectangle aLastRect( *it ); + tools::Rectangle aLastRect( *it ); leftside.push_back( Point( it->Left(), it->Top() ) ); rightside.push_back( Point( it->Right()+1, it->Top() ) ); while( nextit != maClipRegion.end() ) @@ -274,7 +274,7 @@ PrinterGfx::EndSetClipRegion() Point aOldPoint (0, 0); sal_Int32 nColumn = 0; - std::list< Rectangle >::iterator it = maClipRegion.begin(); + std::list< tools::Rectangle >::iterator it = maClipRegion.begin(); while( it != maClipRegion.end() ) { // try to concatenate adjacent rectangles @@ -301,7 +301,7 @@ PrinterGfx::EndSetClipRegion() */ void -PrinterGfx::DrawRect (const Rectangle& rRectangle ) +PrinterGfx::DrawRect (const tools::Rectangle& rRectangle ) { char pRect [128]; sal_Int32 nChar = 0; @@ -1053,7 +1053,7 @@ PrinterGfx::PSShowGlyph (const unsigned char nGlyphId) } bool -PrinterGfx::DrawEPS( const Rectangle& rBoundingBox, void* pPtr, sal_uInt32 nSize ) +PrinterGfx::DrawEPS( const tools::Rectangle& rBoundingBox, void* pPtr, sal_uInt32 nSize ) { if( nSize == 0 ) return true; diff --git a/vcl/unx/generic/print/genpspgraphics.cxx b/vcl/unx/generic/print/genpspgraphics.cxx index 9c20ac6d1fb2..be31508dc179 100644 --- a/vcl/unx/generic/print/genpspgraphics.cxx +++ b/vcl/unx/generic/print/genpspgraphics.cxx @@ -398,7 +398,7 @@ void GenPspGraphics::drawLine( long nX1, long nY1, long nX2, long nY2 ) void GenPspGraphics::drawRect( long nX, long nY, long nDX, long nDY ) { - m_pPrinterGfx->DrawRect (Rectangle(Point(nX, nY), Size(nDX, nDY))); + m_pPrinterGfx->DrawRect (tools::Rectangle(Point(nX, nY), Size(nDX, nDY))); } void GenPspGraphics::drawPolyLine( sal_uInt32 nPoints, const SalPoint *pPtAry ) @@ -468,7 +468,7 @@ void GenPspGraphics::invert( sal_uInt32, bool GenPspGraphics::drawEPS( long nX, long nY, long nWidth, long nHeight, void* pPtr, sal_uLong nSize ) { - return m_pPrinterGfx->DrawEPS( Rectangle( Point( nX, nY ), Size( nWidth, nHeight ) ), pPtr, nSize ); + return m_pPrinterGfx->DrawEPS( tools::Rectangle( Point( nX, nY ), Size( nWidth, nHeight ) ), pPtr, nSize ); } void GenPspGraphics::copyBits( const SalTwoRect&, @@ -484,9 +484,9 @@ void GenPspGraphics::copyArea ( long,long,long,long,long,long,bool ) void GenPspGraphics::drawBitmap( const SalTwoRect& rPosAry, const SalBitmap& rSalBitmap ) { - Rectangle aSrc (Point(rPosAry.mnSrcX, rPosAry.mnSrcY), + tools::Rectangle aSrc (Point(rPosAry.mnSrcX, rPosAry.mnSrcY), Size(rPosAry.mnSrcWidth, rPosAry.mnSrcHeight)); - Rectangle aDst (Point(rPosAry.mnDestX, rPosAry.mnDestY), + tools::Rectangle aDst (Point(rPosAry.mnDestX, rPosAry.mnDestY), Size(rPosAry.mnDestWidth, rPosAry.mnDestHeight)); BitmapBuffer* pBuffer= const_cast<SalBitmap&>(rSalBitmap).AcquireBuffer(BitmapAccessMode::Read); @@ -756,7 +756,7 @@ void GenPspGraphics::GetFontMetric(ImplFontMetricDataRef& rxFontMetric, int nFal m_pFreetypeFont[nFallbackLevel]->GetFontMetric(rxFontMetric); } -bool GenPspGraphics::GetGlyphBoundRect(const GlyphItem& rGlyph, Rectangle& rRect) +bool GenPspGraphics::GetGlyphBoundRect(const GlyphItem& rGlyph, tools::Rectangle& rRect) { const int nLevel = rGlyph.mnFallbackLevel; if( nLevel >= MAX_FALLBACK ) diff --git a/vcl/unx/generic/window/salframe.cxx b/vcl/unx/generic/window/salframe.cxx index af37168137bb..0828f68c3587 100644 --- a/vcl/unx/generic/window/salframe.cxx +++ b/vcl/unx/generic/window/salframe.cxx @@ -514,7 +514,7 @@ void X11SalFrame::Init( SalFrameStyleFlags nSalFrameStyle, SalX11Screen nXScreen GetDisplay()->GetRootWindow( m_nXScreen ), &aRoot, &aChild, &root_x, &root_y, &lx, &ly, &mask ); - const std::vector< Rectangle >& rScreens = GetDisplay()->GetXineramaScreens(); + const std::vector< tools::Rectangle >& rScreens = GetDisplay()->GetXineramaScreens(); for(const auto & rScreen : rScreens) if( rScreen.IsInside( Point( root_x, root_y ) ) ) { @@ -1390,7 +1390,7 @@ void X11SalFrame::ToTop( SalFrameToTop nFlags ) } } -void X11SalFrame::GetWorkArea( Rectangle& rWorkArea ) +void X11SalFrame::GetWorkArea( tools::Rectangle& rWorkArea ) { rWorkArea = pDisplay_->getWMAdaptor()->getWorkArea( 0 ); } @@ -1449,7 +1449,7 @@ void X11SalFrame::Center( ) &root_x, &root_y, &x, &y, &mask ); - const std::vector< Rectangle >& rScreens = GetDisplay()->GetXineramaScreens(); + const std::vector< tools::Rectangle >& rScreens = GetDisplay()->GetXineramaScreens(); for(const auto & rScreen : rScreens) if( rScreen.IsInside( Point( root_x, root_y ) ) ) { @@ -1468,7 +1468,7 @@ void X11SalFrame::Center( ) pFrame = pFrame->mpParent; if( pFrame->maGeometry.nWidth < 1 || pFrame->maGeometry.nHeight < 1 ) { - Rectangle aRect; + tools::Rectangle aRect; pFrame->GetPosSize( aRect ); pFrame->maGeometry.nX = aRect.Left(); pFrame->maGeometry.nY = aRect.Top(); @@ -1529,7 +1529,7 @@ void X11SalFrame::Center( ) } Point aPoint(nX, nY); - SetPosSize( Rectangle( aPoint, Size( maGeometry.nWidth, maGeometry.nHeight ) ) ); + SetPosSize( tools::Rectangle( aPoint, Size( maGeometry.nWidth, maGeometry.nHeight ) ) ); } void X11SalFrame::updateScreenNumber() @@ -1537,7 +1537,7 @@ void X11SalFrame::updateScreenNumber() if( GetDisplay()->IsXinerama() && GetDisplay()->GetXineramaScreens().size() > 1 ) { Point aPoint( maGeometry.nX, maGeometry.nY ); - const std::vector<Rectangle>& rScreenRects( GetDisplay()->GetXineramaScreens() ); + const std::vector<tools::Rectangle>& rScreenRects( GetDisplay()->GetXineramaScreens() ); size_t nScreens = rScreenRects.size(); for( size_t i = 0; i < nScreens; i++ ) { @@ -1558,7 +1558,7 @@ void X11SalFrame::SetPosSize( long nX, long nY, long nWidth, long nHeight, sal_u return; // relative positioning in X11SalFrame::SetPosSize - Rectangle aPosSize( Point( maGeometry.nX, maGeometry.nY ), Size( maGeometry.nWidth, maGeometry.nHeight ) ); + tools::Rectangle aPosSize( Point( maGeometry.nX, maGeometry.nY ), Size( maGeometry.nWidth, maGeometry.nHeight ) ); aPosSize.Justify(); if( ! ( nFlags & SAL_FRAME_POSSIZE_X ) ) @@ -1578,7 +1578,7 @@ void X11SalFrame::SetPosSize( long nX, long nY, long nWidth, long nHeight, sal_u if( ! ( nFlags & SAL_FRAME_POSSIZE_HEIGHT ) ) nHeight = aPosSize.GetHeight(); - aPosSize = Rectangle( Point( nX, nY ), Size( nWidth, nHeight ) ); + aPosSize = tools::Rectangle( Point( nX, nY ), Size( nWidth, nHeight ) ); if( ! ( nFlags & ( SAL_FRAME_POSSIZE_X | SAL_FRAME_POSSIZE_Y ) ) ) { @@ -1621,7 +1621,7 @@ void X11SalFrame::SetWindowState( const SalFrameState *pState ) // Request for position or size change if (pState->mnMask & FRAMESTATE_MASK_GEOMETRY) { - Rectangle aPosSize; + tools::Rectangle aPosSize; /* #i44325# * if maximized, set restore size and guess maximized size from last time @@ -1771,7 +1771,7 @@ bool X11SalFrame::GetWindowState( SalFrameState* pState ) else pState->mnState = WindowStateState::Normal; - Rectangle aPosSize; + tools::Rectangle aPosSize; if( maRestorePosSize.IsEmpty() ) GetPosSize( aPosSize ); else @@ -1814,7 +1814,7 @@ void X11SalFrame::SetMenu( SalMenu* ) { } -void X11SalFrame::GetPosSize( Rectangle &rPosSize ) +void X11SalFrame::GetPosSize( tools::Rectangle &rPosSize ) { if( maGeometry.nWidth < 1 || maGeometry.nHeight < 1 ) { @@ -1822,10 +1822,10 @@ void X11SalFrame::GetPosSize( Rectangle &rPosSize ) long w = aScreenSize.Width() - maGeometry.nLeftDecoration - maGeometry.nRightDecoration; long h = aScreenSize.Height() - maGeometry.nTopDecoration - maGeometry.nBottomDecoration; - rPosSize = Rectangle( Point( maGeometry.nX, maGeometry.nY ), Size( w, h ) ); + rPosSize = tools::Rectangle( Point( maGeometry.nX, maGeometry.nY ), Size( w, h ) ); } else - rPosSize = Rectangle( Point( maGeometry.nX, maGeometry.nY ), + rPosSize = tools::Rectangle( Point( maGeometry.nX, maGeometry.nY ), Size( maGeometry.nWidth, maGeometry.nHeight ) ); } @@ -1872,7 +1872,7 @@ void X11SalFrame::SetSize( const Size &rSize ) } } -void X11SalFrame::SetPosSize( const Rectangle &rPosSize ) +void X11SalFrame::SetPosSize( const tools::Rectangle &rPosSize ) { XWindowChanges values; values.x = rPosSize.Left(); @@ -2049,8 +2049,8 @@ void X11SalFrame::SetScreenNumber( unsigned int nNewScreen ) if( nNewScreen >= GetDisplay()->GetXineramaScreens().size() ) return; - Rectangle aOldScreenRect( GetDisplay()->GetXineramaScreens()[maGeometry.nDisplayScreenNumber] ); - Rectangle aNewScreenRect( GetDisplay()->GetXineramaScreens()[nNewScreen] ); + tools::Rectangle aOldScreenRect( GetDisplay()->GetXineramaScreens()[maGeometry.nDisplayScreenNumber] ); + tools::Rectangle aNewScreenRect( GetDisplay()->GetXineramaScreens()[nNewScreen] ); bool bVisible = bMapped_; if( bVisible ) Show( false ); @@ -2108,11 +2108,11 @@ void X11SalFrame::ShowFullScreen( bool bFullScreen, sal_Int32 nScreen ) return; if( bFullScreen ) { - maRestorePosSize = Rectangle( Point( maGeometry.nX, maGeometry.nY ), + maRestorePosSize = tools::Rectangle( Point( maGeometry.nX, maGeometry.nY ), Size( maGeometry.nWidth, maGeometry.nHeight ) ); - Rectangle aRect; + tools::Rectangle aRect; if( nScreen < 0 || nScreen >= static_cast<int>(GetDisplay()->GetXineramaScreens().size()) ) - aRect = Rectangle( Point(0,0), GetDisplay()->GetScreenSize( m_nXScreen ) ); + aRect = tools::Rectangle( Point(0,0), GetDisplay()->GetScreenSize( m_nXScreen ) ); else aRect = GetDisplay()->GetXineramaScreens()[nScreen]; nStyle_ |= SalFrameStyleFlags::PARTIAL_FULLSCREEN; @@ -2139,8 +2139,8 @@ void X11SalFrame::ShowFullScreen( bool bFullScreen, sal_Int32 nScreen ) mbFullScreen = false; nStyle_ &= ~SalFrameStyleFlags::PARTIAL_FULLSCREEN; bool bVisible = bMapped_; - Rectangle aRect = maRestorePosSize; - maRestorePosSize = Rectangle(); + tools::Rectangle aRect = maRestorePosSize; + maRestorePosSize = tools::Rectangle(); if( bVisible ) Show( false ); createNewWindow( None, m_nXScreen ); @@ -3368,7 +3368,7 @@ long X11SalFrame::HandleExposeEvent( XEvent *pEvent ) XSetInputFocus( GetXDisplay(), GetShellWindow(), RevertToNone, CurrentTime ); // width and height are extents, so they are of by one for rectangle - maPaintRegion.Union( Rectangle( Point(aRect.x, aRect.y), Size(aRect.width+1, aRect.height+1) ) ); + maPaintRegion.Union( tools::Rectangle( Point(aRect.x, aRect.y), Size(aRect.width+1, aRect.height+1) ) ); if( nCount ) // wait for last expose rectangle, do not wait for resize timer @@ -3378,7 +3378,7 @@ long X11SalFrame::HandleExposeEvent( XEvent *pEvent ) SalPaintEvent aPEvt( maPaintRegion.Left(), maPaintRegion.Top(), maPaintRegion.GetWidth(), maPaintRegion.GetHeight() ); CallCallback( SalEvent::Paint, &aPEvt ); - maPaintRegion = Rectangle(); + maPaintRegion = tools::Rectangle(); return 1; } diff --git a/vcl/unx/gtk/gtksalframe.cxx b/vcl/unx/gtk/gtksalframe.cxx index 371f9be54f16..07d81cd39751 100644 --- a/vcl/unx/gtk/gtksalframe.cxx +++ b/vcl/unx/gtk/gtksalframe.cxx @@ -1771,7 +1771,7 @@ void GtkSalFrame::GetClientSize( long& rWidth, long& rHeight ) rWidth = rHeight = 0; } -void GtkSalFrame::GetWorkArea( Rectangle& rRect ) +void GtkSalFrame::GetWorkArea( tools::Rectangle& rRect ) { rRect = GetGtkSalData()->GetGtkDisplay()->getWMAdaptor()->getWorkArea( 0 ); } @@ -1808,7 +1808,7 @@ void GtkSalFrame::SetWindowState( const SalFrameState* pState ) updateScreenNumber(); m_nState = GdkWindowState( m_nState | GDK_WINDOW_STATE_MAXIMIZED ); - m_aRestorePosSize = Rectangle( Point( pState->mnX, pState->mnY ), + m_aRestorePosSize = tools::Rectangle( Point( pState->mnX, pState->mnY ), Size( pState->mnWidth, pState->mnHeight ) ); CallCallback( SalEvent::Resize, nullptr ); } @@ -1893,7 +1893,7 @@ bool GtkSalFrame::GetWindowState( SalFrameState* pState ) return true; } -void GtkSalFrame::SetScreen( unsigned int nNewScreen, SetType eType, Rectangle *pSize ) +void GtkSalFrame::SetScreen( unsigned int nNewScreen, SetType eType, tools::Rectangle *pSize ) { if( !m_pWindow ) return; @@ -2081,7 +2081,7 @@ void GtkSalFrame::ShowFullScreen( bool bFullScreen, sal_Int32 nScreen ) if( bFullScreen ) { - m_aRestorePosSize = Rectangle( Point( maGeometry.nX, maGeometry.nY ), + m_aRestorePosSize = tools::Rectangle( Point( maGeometry.nX, maGeometry.nY ), Size( maGeometry.nWidth, maGeometry.nHeight ) ); SetScreen( nScreen, SetType::Fullscreen ); } @@ -2089,7 +2089,7 @@ void GtkSalFrame::ShowFullScreen( bool bFullScreen, sal_Int32 nScreen ) { SetScreen( nScreen, SetType::UnFullscreen, !m_aRestorePosSize.IsEmpty() ? &m_aRestorePosSize : nullptr ); - m_aRestorePosSize = Rectangle(); + m_aRestorePosSize = tools::Rectangle(); } } @@ -3268,7 +3268,7 @@ gboolean GtkSalFrame::signalWindowState( GtkWidget*, GdkEvent* pEvent, gpointer ! (pThis->m_nState & GDK_WINDOW_STATE_MAXIMIZED) ) { pThis->m_aRestorePosSize = - Rectangle( Point( pThis->maGeometry.nX, pThis->maGeometry.nY ), + tools::Rectangle( Point( pThis->maGeometry.nX, pThis->maGeometry.nY ), Size( pThis->maGeometry.nWidth, pThis->maGeometry.nHeight ) ); } pThis->m_nState = pEvent->window_state.new_window_state; @@ -3870,7 +3870,7 @@ gboolean GtkSalFrame::IMHandler::signalIMDeleteSurrounding( GtkIMContext*, gint Size GtkSalDisplay::GetScreenSize( int nDisplayScreen ) { - Rectangle aRect = m_pSys->GetDisplayScreenPosSizePixel( nDisplayScreen ); + tools::Rectangle aRect = m_pSys->GetDisplayScreenPosSizePixel( nDisplayScreen ); return Size( aRect.GetWidth(), aRect.GetHeight() ); } diff --git a/vcl/unx/gtk/gtksalmenu.cxx b/vcl/unx/gtk/gtksalmenu.cxx index d2067719ff2b..f004a055d544 100644 --- a/vcl/unx/gtk/gtksalmenu.cxx +++ b/vcl/unx/gtk/gtksalmenu.cxx @@ -405,7 +405,7 @@ static void MenuPositionFunc(GtkMenu* menu, gint* x, gint* y, gboolean* push_in, } #endif -bool GtkSalMenu::ShowNativePopupMenu(FloatingWindow* pWin, const Rectangle& rRect, +bool GtkSalMenu::ShowNativePopupMenu(FloatingWindow* pWin, const tools::Rectangle& rRect, FloatWinPopupFlags nFlags) { #if GTK_CHECK_VERSION(3,0,0) diff --git a/vcl/unx/gtk/gtksys.cxx b/vcl/unx/gtk/gtksys.cxx index 80831d68737b..5c047e4453a8 100644 --- a/vcl/unx/gtk/gtksys.cxx +++ b/vcl/unx/gtk/gtksys.cxx @@ -250,16 +250,16 @@ unsigned int GtkSalSystem::GetDisplayBuiltInScreen() return idx + _get_primary_monitor (pDefault); } -Rectangle GtkSalSystem::GetDisplayScreenPosSizePixel (unsigned int nScreen) +tools::Rectangle GtkSalSystem::GetDisplayScreenPosSizePixel (unsigned int nScreen) { gint nMonitor; GdkScreen *pScreen; GdkRectangle aRect; pScreen = getScreenMonitorFromIdx (nScreen, nMonitor); if (!pScreen) - return Rectangle(); + return tools::Rectangle(); gdk_screen_get_monitor_geometry (pScreen, nMonitor, &aRect); - return Rectangle (Point(aRect.x, aRect.y), Size(aRect.width, aRect.height)); + return tools::Rectangle (Point(aRect.x, aRect.y), Size(aRect.width, aRect.height)); } // convert ~ to indicate mnemonic to '_' diff --git a/vcl/unx/gtk/salnativewidgets-gtk.cxx b/vcl/unx/gtk/salnativewidgets-gtk.cxx index 162b48535dcb..46ebe46c7e84 100644 --- a/vcl/unx/gtk/salnativewidgets-gtk.cxx +++ b/vcl/unx/gtk/salnativewidgets-gtk.cxx @@ -214,53 +214,53 @@ static void NWConvertVCLStateToGTKState( ControlState nVCLState, GtkStateType* n static void NWAddWidgetToCacheWindow( GtkWidget* widget, SalX11Screen nScreen ); static void NWSetWidgetState( GtkWidget* widget, ControlState nState, GtkStateType nGtkState ); -static void NWCalcArrowRect( const Rectangle& rButton, Rectangle& rArrow ); +static void NWCalcArrowRect( const tools::Rectangle& rButton, tools::Rectangle& rArrow ); /* * Individual helper functions * */ -static Rectangle NWGetButtonArea( SalX11Screen nScreen, ControlType nType, ControlPart nPart, Rectangle aAreaRect, ControlState nState, +static tools::Rectangle NWGetButtonArea( SalX11Screen nScreen, ControlType nType, ControlPart nPart, tools::Rectangle aAreaRect, ControlState nState, const ImplControlValue& aValue, const OUString& rCaption ); -static Rectangle NWGetTabItemRect( SalX11Screen nScreen, Rectangle aAreaRect ); +static tools::Rectangle NWGetTabItemRect( SalX11Screen nScreen, tools::Rectangle aAreaRect ); -static Rectangle NWGetEditBoxPixmapRect( SalX11Screen nScreen, ControlType nType, ControlPart nPart, Rectangle aAreaRect, ControlState nState, +static tools::Rectangle NWGetEditBoxPixmapRect( SalX11Screen nScreen, ControlType nType, ControlPart nPart, tools::Rectangle aAreaRect, ControlState nState, const ImplControlValue& aValue, const OUString& rCaption ); static void NWPaintOneEditBox( SalX11Screen nScreen, GdkDrawable * gdkDrawable, GdkRectangle *gdkRect, - ControlType nType, ControlPart nPart, Rectangle aEditBoxRect, + ControlType nType, ControlPart nPart, tools::Rectangle aEditBoxRect, ControlState nState, const ImplControlValue& aValue, const OUString& rCaption ); -static Rectangle NWGetSpinButtonRect( SalX11Screen nScreen, ControlType nType, ControlPart nPart, Rectangle aAreaRect, ControlState nState, +static tools::Rectangle NWGetSpinButtonRect( SalX11Screen nScreen, ControlType nType, ControlPart nPart, tools::Rectangle aAreaRect, ControlState nState, const ImplControlValue& aValue, const OUString& rCaption ); -static void NWPaintOneSpinButton( SalX11Screen nScreen, GdkPixmap * pixmap, ControlType nType, ControlPart nPart, Rectangle aAreaRect, +static void NWPaintOneSpinButton( SalX11Screen nScreen, GdkPixmap * pixmap, ControlType nType, ControlPart nPart, tools::Rectangle aAreaRect, ControlState nState, const ImplControlValue& aValue, const OUString& rCaption ); -static Rectangle NWGetComboBoxButtonRect( SalX11Screen nScreen, ControlType nType, ControlPart nPart, Rectangle aAreaRect, ControlState nState, +static tools::Rectangle NWGetComboBoxButtonRect( SalX11Screen nScreen, ControlType nType, ControlPart nPart, tools::Rectangle aAreaRect, ControlState nState, const ImplControlValue& aValue, const OUString& rCaption ); -static Rectangle NWGetListBoxButtonRect( SalX11Screen nScreen, ControlType nType, ControlPart nPart, Rectangle aAreaRect, ControlState nState, +static tools::Rectangle NWGetListBoxButtonRect( SalX11Screen nScreen, ControlType nType, ControlPart nPart, tools::Rectangle aAreaRect, ControlState nState, const ImplControlValue& aValue, const OUString& rCaption ); -static Rectangle NWGetListBoxIndicatorRect( SalX11Screen nScreen, ControlType nType, ControlPart nPart, Rectangle aAreaRect, ControlState nState, +static tools::Rectangle NWGetListBoxIndicatorRect( SalX11Screen nScreen, ControlType nType, ControlPart nPart, tools::Rectangle aAreaRect, ControlState nState, const ImplControlValue& aValue, const OUString& rCaption ); -static Rectangle NWGetToolbarRect( SalX11Screen nScreen, +static tools::Rectangle NWGetToolbarRect( SalX11Screen nScreen, ControlType nType, ControlPart nPart, - Rectangle aAreaRect, + tools::Rectangle aAreaRect, ControlState nState, const ImplControlValue& aValue, const OUString& rCaption ); static int getFrameWidth(GtkWidget* widget); -static Rectangle NWGetScrollButtonRect( SalX11Screen nScreen, ControlPart nPart, Rectangle aAreaRect ); +static tools::Rectangle NWGetScrollButtonRect( SalX11Screen nScreen, ControlPart nPart, tools::Rectangle aAreaRect ); /************************************************************************ @@ -339,7 +339,7 @@ class NWPixmapCacheData public: ControlType m_nType; ControlState m_nState; - Rectangle m_pixmapRect; + tools::Rectangle m_pixmapRect; GdkX11Pixmap* m_pixmap; GdkX11Pixmap* m_mask; @@ -363,8 +363,8 @@ public: { delete [] pData; m_idx = 0; m_size = n; pData = new NWPixmapCacheData[m_size]; } int GetSize() const { return m_size; } - bool Find( ControlType aType, ControlState aState, const Rectangle& r_pixmapRect, GdkX11Pixmap** pPixmap, GdkX11Pixmap** pMask ); - void Fill( ControlType aType, ControlState aState, const Rectangle& r_pixmapRect, GdkX11Pixmap* pPixmap, GdkX11Pixmap* pMask ); + bool Find( ControlType aType, ControlState aState, const tools::Rectangle& r_pixmapRect, GdkX11Pixmap** pPixmap, GdkX11Pixmap** pMask ); + void Fill( ControlType aType, ControlState aState, const tools::Rectangle& r_pixmapRect, GdkX11Pixmap* pPixmap, GdkX11Pixmap* pMask ); void ThemeChanged(); }; @@ -413,7 +413,7 @@ void NWPixmapCache::ThemeChanged() pData[i].SetPixmap( nullptr, nullptr ); } -bool NWPixmapCache::Find( ControlType aType, ControlState aState, const Rectangle& r_pixmapRect, GdkX11Pixmap** pPixmap, GdkX11Pixmap** pMask ) +bool NWPixmapCache::Find( ControlType aType, ControlState aState, const tools::Rectangle& r_pixmapRect, GdkX11Pixmap** pPixmap, GdkX11Pixmap** pMask ) { aState &= ~ControlState::CACHING_ALLOWED; // mask clipping flag int i; @@ -433,7 +433,7 @@ bool NWPixmapCache::Find( ControlType aType, ControlState aState, const Rectang return false; } -void NWPixmapCache::Fill( ControlType aType, ControlState aState, const Rectangle& r_pixmapRect, GdkX11Pixmap* pPixmap, GdkX11Pixmap* pMask ) +void NWPixmapCache::Fill( ControlType aType, ControlState aState, const tools::Rectangle& r_pixmapRect, GdkX11Pixmap* pPixmap, GdkX11Pixmap* pMask ) { if( !(aState & ControlState::CACHING_ALLOWED) ) return; @@ -738,7 +738,7 @@ bool GtkSalGraphics::IsNativeControlSupported( ControlType nType, ControlPart nP bool GtkSalGraphics::hitTestNativeControl( ControlType nType, ControlPart nPart, - const Rectangle& rControlRegion, + const tools::Rectangle& rControlRegion, const Point& aPos, bool& rIsInside ) { @@ -762,8 +762,8 @@ bool GtkSalGraphics::hitTestNativeControl( ControlType nType, "has-backward-stepper", &has_backward, "has-secondary-backward-stepper", &has_backward2, nullptr ); - Rectangle aForward; - Rectangle aBackward; + tools::Rectangle aForward; + tools::Rectangle aBackward; rIsInside = false; @@ -839,7 +839,7 @@ bool GtkSalGraphics::hitTestNativeControl( ControlType nType, } bool GtkSalGraphics::drawNativeControl(ControlType nType, ControlPart nPart, - const Rectangle& rControlRegion, ControlState nState, + const tools::Rectangle& rControlRegion, ControlState nState, const ImplControlValue& aValue, const OUString& rCaption) { // get a GC with current clipping region set @@ -855,16 +855,16 @@ bool GtkSalGraphics::drawNativeControl(ControlType nType, ControlPart nPart, GtkSalGraphics::bThemeChanged = false; } - Rectangle aCtrlRect( rControlRegion ); + tools::Rectangle aCtrlRect( rControlRegion ); vcl::Region aClipRegion( m_aClipRegion ); if( aClipRegion.IsNull() ) aClipRegion = aCtrlRect; - Rectangle aPixmapRect; + tools::Rectangle aPixmapRect; // make pixmap a little larger since some themes draw decoration // outside the rectangle, see e.g. checkbox - aPixmapRect = Rectangle(Point( aCtrlRect.Left()-1, aCtrlRect.Top()-1 ), + aPixmapRect = tools::Rectangle(Point( aCtrlRect.Left()-1, aCtrlRect.Top()-1 ), Size( aCtrlRect.GetWidth()+2, aCtrlRect.GetHeight()+2) ); ControlCacheKey aControlCacheKey(nType, nPart, nState, aPixmapRect.GetSize()); @@ -874,7 +874,7 @@ bool GtkSalGraphics::drawNativeControl(ControlType nType, ControlPart nPart, return true; } - std::list< Rectangle > aClip; + std::list< tools::Rectangle > aClip; int nPasses = 0; GdkDrawable* gdkDrawable[2]; std::unique_ptr<GdkX11Pixmap> xPixmap; @@ -908,7 +908,7 @@ bool GtkSalGraphics::drawNativeControl(ControlType nType, ControlPart nPart, gdkDrawable[0] = xPixmap->GetGdkDrawable(); } - aCtrlRect = Rectangle( Point(1,1), aCtrlRect.GetSize() ); + aCtrlRect = tools::Rectangle( Point(1,1), aCtrlRect.GetSize() ); aClip.push_back( aCtrlRect ); } else @@ -920,7 +920,7 @@ bool GtkSalGraphics::drawNativeControl(ControlType nType, ControlPart nPart, for(RectangleVector::const_iterator aRectIter(aRectangles.begin()); aRectIter != aRectangles.end(); ++aRectIter) { - Rectangle aPaintRect = aCtrlRect.GetIntersection(*aRectIter); + tools::Rectangle aPaintRect = aCtrlRect.GetIntersection(*aRectIter); if( aPaintRect.IsEmpty() ) continue; aClip.push_back( aPaintRect ); @@ -954,8 +954,8 @@ bool GtkSalGraphics::DoDrawNativeControl( GdkDrawable* pDrawable, ControlType nType, ControlPart nPart, - const Rectangle& aCtrlRect, - const std::list< Rectangle >& aClip, + const tools::Rectangle& aCtrlRect, + const std::list< tools::Rectangle >& aClip, ControlState nState, const ImplControlValue& aValue, const OUString& rCaption, @@ -1077,12 +1077,12 @@ bool GtkSalGraphics::DoDrawNativeControl( bool GtkSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPart, - const Rectangle& rControlRegion, + const tools::Rectangle& rControlRegion, ControlState nState, const ImplControlValue& aValue, const OUString& rCaption, - Rectangle &rNativeBoundingRegion, - Rectangle &rNativeContentRegion ) + tools::Rectangle &rNativeBoundingRegion, + tools::Rectangle &rNativeContentRegion ) { bool returnVal = false; @@ -1157,8 +1157,8 @@ bool GtkSalGraphics::getNativeControlRegion( ControlType nType, NWEnsureGTKMenubar( m_nXScreen ); GtkRequisition aReq; gtk_widget_size_request( gWidgetData[m_nXScreen].gMenubarWidget, &aReq ); - Rectangle aMenuBarRect = rControlRegion; - aMenuBarRect = Rectangle( aMenuBarRect.TopLeft(), + tools::Rectangle aMenuBarRect = rControlRegion; + aMenuBarRect = tools::Rectangle( aMenuBarRect.TopLeft(), Size( aMenuBarRect.GetWidth(), aReq.height+1 ) ); rNativeBoundingRegion = aMenuBarRect; rNativeContentRegion = rNativeBoundingRegion; @@ -1178,7 +1178,7 @@ bool GtkSalGraphics::getNativeControlRegion( ControlType nType, "indicator_size", &indicator_size, nullptr ); rNativeBoundingRegion = rControlRegion; - Rectangle aIndicatorRect( Point( 0, + tools::Rectangle aIndicatorRect( Point( 0, (rControlRegion.GetHeight()-indicator_size)/2), Size( indicator_size, indicator_size ) ); rNativeContentRegion = aIndicatorRect; @@ -1222,9 +1222,9 @@ bool GtkSalGraphics::getNativeControlRegion( ControlType nType, arrow_extent = static_cast<gint>(arrow_size * arrow_scaling); - rNativeContentRegion = Rectangle( Point( 0, 0 ), + rNativeContentRegion = tools::Rectangle( Point( 0, 0 ), Size( arrow_extent, arrow_extent )); - rNativeBoundingRegion = Rectangle( Point( 0, 0 ), + rNativeBoundingRegion = tools::Rectangle( Point( 0, 0 ), Size( arrow_extent + horizontal_padding, arrow_extent )); returnVal = true; } @@ -1243,7 +1243,7 @@ bool GtkSalGraphics::getNativeControlRegion( ControlType nType, nullptr); indicator_size += 2*indicator_spacing + 2*(focusWidth + focusWidth); rNativeBoundingRegion = rControlRegion; - Rectangle aIndicatorRect( Point( 0, + tools::Rectangle aIndicatorRect( Point( 0, (rControlRegion.GetHeight()-indicator_size)/2), Size( indicator_size, indicator_size ) ); rNativeContentRegion = aIndicatorRect; @@ -1255,9 +1255,9 @@ bool GtkSalGraphics::getNativeControlRegion( ControlType nType, GtkWidget* widget = gWidgetData[m_nXScreen].gEditBoxWidget; GtkRequisition aReq; gtk_widget_size_request( widget, &aReq ); - Rectangle aEditRect = rControlRegion; + tools::Rectangle aEditRect = rControlRegion; long nHeight = (aEditRect.GetHeight() > aReq.height) ? aEditRect.GetHeight() : aReq.height; - aEditRect = Rectangle( aEditRect.TopLeft(), + aEditRect = tools::Rectangle( aEditRect.TopLeft(), Size( aEditRect.GetWidth(), nHeight ) ); rNativeBoundingRegion = aEditRect; rNativeContentRegion = rNativeBoundingRegion; @@ -1273,7 +1273,7 @@ bool GtkSalGraphics::getNativeControlRegion( ControlType nType, "slider-width", &slider_width, "slider-length", &slider_length, nullptr); - Rectangle aRect( rControlRegion ); + tools::Rectangle aRect( rControlRegion ); if( nPart == ControlPart::ThumbHorz ) { aRect.Right() = aRect.Left() + slider_length - 1; @@ -1299,7 +1299,7 @@ bool GtkSalGraphics::getNativeControlRegion( ControlType nType, if( nStyle & DrawFrameFlags::NoDraw ) { - rNativeContentRegion = Rectangle(x1+frameWidth, + rNativeContentRegion = tools::Rectangle(x1+frameWidth, y1+frameWidth, x2-frameWidth, y2-frameWidth); @@ -1379,8 +1379,8 @@ bool GtkSalGraphics::getNativeControlRegion( ControlType nType, bool GtkSalGraphics::NWPaintGTKArrow( GdkDrawable* gdkDrawable, ControlType, ControlPart, - const Rectangle& rControlRectangle, - const std::list< Rectangle >& rClipList, + const tools::Rectangle& rControlRectangle, + const std::list< tools::Rectangle >& rClipList, ControlState nState, const ImplControlValue& aValue, const OUString& ) { @@ -1388,7 +1388,7 @@ bool GtkSalGraphics::NWPaintGTKArrow( GtkStateType stateType(nState&ControlState::PRESSED?GTK_STATE_ACTIVE:GTK_STATE_NORMAL); GdkRectangle clipRect; - for( std::list< Rectangle >::const_iterator it = rClipList.begin(); it != rClipList.end(); ++it ) + for( std::list< tools::Rectangle >::const_iterator it = rClipList.begin(); it != rClipList.end(); ++it ) { clipRect.x = it->Left(); clipRect.y = it->Top(); @@ -1408,8 +1408,8 @@ bool GtkSalGraphics::NWPaintGTKArrow( bool GtkSalGraphics::NWPaintGTKListHeader( GdkDrawable* gdkDrawable, ControlType, ControlPart, - const Rectangle& rControlRectangle, - const std::list< Rectangle >& rClipList, + const tools::Rectangle& rControlRectangle, + const std::list< tools::Rectangle >& rClipList, ControlState nState, const ImplControlValue&, const OUString& ) { @@ -1429,7 +1429,7 @@ bool GtkSalGraphics::NWPaintGTKListHeader( NWSetWidgetState( button, nState, stateType ); GdkRectangle clipRect; - for( std::list< Rectangle >::const_iterator it = rClipList.begin(); it != rClipList.end(); ++it ) + for( std::list< tools::Rectangle >::const_iterator it = rClipList.begin(); it != rClipList.end(); ++it ) { clipRect.x = it->Left(); clipRect.y = it->Top(); @@ -1449,8 +1449,8 @@ bool GtkSalGraphics::NWPaintGTKListHeader( bool GtkSalGraphics::NWPaintGTKFixedLine( GdkDrawable* gdkDrawable, ControlType, ControlPart nPart, - const Rectangle& rControlRectangle, - const std::list< Rectangle >&, + const tools::Rectangle& rControlRectangle, + const std::list< tools::Rectangle >&, ControlState, const ImplControlValue&, const OUString& ) { @@ -1465,8 +1465,8 @@ bool GtkSalGraphics::NWPaintGTKFixedLine( bool GtkSalGraphics::NWPaintGTKFrame( GdkDrawable* gdkDrawable, ControlType, ControlPart, - const Rectangle& rControlRectangle, - const std::list< Rectangle >& rClipList, + const tools::Rectangle& rControlRectangle, + const std::list< tools::Rectangle >& rClipList, ControlState /* nState */, const ImplControlValue& aValue, const OUString& ) { @@ -1479,7 +1479,7 @@ bool GtkSalGraphics::NWPaintGTKFrame( if( nStyle == DrawFrameStyle::Out ) shadowType=GTK_SHADOW_IN; - for( std::list< Rectangle >::const_iterator it = rClipList.begin(); it != rClipList.end(); ++it ) + for( std::list< tools::Rectangle >::const_iterator it = rClipList.begin(); it != rClipList.end(); ++it ) { clipRect.x = it->Left(); clipRect.y = it->Top(); @@ -1532,13 +1532,13 @@ bool GtkSalGraphics::NWPaintGTKFrame( bool GtkSalGraphics::NWPaintGTKWindowBackground( GdkDrawable* gdkDrawable, ControlType, ControlPart, - const Rectangle& rControlRectangle, - const std::list< Rectangle >& rClipList, + const tools::Rectangle& rControlRectangle, + const std::list< tools::Rectangle >& rClipList, ControlState /* nState */, const ImplControlValue&, const OUString& ) { GdkRectangle clipRect; - for( std::list< Rectangle >::const_iterator it = rClipList.begin(); it != rClipList.end(); ++it ) + for( std::list< tools::Rectangle >::const_iterator it = rClipList.begin(); it != rClipList.end(); ++it ) { clipRect.x = it->Left(); clipRect.y = it->Top(); @@ -1560,8 +1560,8 @@ bool GtkSalGraphics::NWPaintGTKButtonReal( GtkWidget* button, GdkDrawable* gdkDrawable, ControlType, ControlPart, - const Rectangle& rControlRectangle, - const std::list< Rectangle >& rClipList, + const tools::Rectangle& rControlRectangle, + const std::list< tools::Rectangle >& rClipList, ControlState nState, const ImplControlValue&, const OUString& ) { @@ -1657,7 +1657,7 @@ bool GtkSalGraphics::NWPaintGTKButtonReal( wi -= 2 * (focusWidth + focusPad); hi -= 2 * (focusWidth + focusPad); } - for( std::list< Rectangle >::const_iterator it = rClipList.begin(); it != rClipList.end(); ++it) + for( std::list< tools::Rectangle >::const_iterator it = rClipList.begin(); it != rClipList.end(); ++it) { clipRect.x = it->Left(); clipRect.y = it->Top(); @@ -1696,8 +1696,8 @@ bool GtkSalGraphics::NWPaintGTKButtonReal( bool GtkSalGraphics::NWPaintGTKButton( GdkDrawable* gdkDrawable, ControlType type, ControlPart part, - const Rectangle& rControlRectangle, - const std::list< Rectangle >& rClipList, + const tools::Rectangle& rControlRectangle, + const std::list< tools::Rectangle >& rClipList, ControlState nState, const ImplControlValue& value, const OUString& string) { @@ -1711,8 +1711,8 @@ bool GtkSalGraphics::NWPaintGTKButton( string ); } -static Rectangle NWGetButtonArea( SalX11Screen nScreen, - ControlType, ControlPart, Rectangle aAreaRect, ControlState nState, +static tools::Rectangle NWGetButtonArea( SalX11Screen nScreen, + ControlType, ControlPart, tools::Rectangle aAreaRect, ControlState nState, const ImplControlValue&, const OUString& ) { gboolean interiorFocus; @@ -1721,7 +1721,7 @@ static Rectangle NWGetButtonArea( SalX11Screen nScreen, GtkBorder aDefBorder; GtkBorder * pBorder; bool bDrawFocus = true; - Rectangle aRect; + tools::Rectangle aRect; gint x, y, w, h; NWEnsureGTKButton( nScreen ); @@ -1757,12 +1757,12 @@ static Rectangle NWGetButtonArea( SalX11Screen nScreen, h += aDefBorder.top + aDefBorder.bottom; } - aRect = Rectangle( Point( x, y ), Size( w, h ) ); + aRect = tools::Rectangle( Point( x, y ), Size( w, h ) ); return aRect; } -static Rectangle NWGetTabItemRect( SalX11Screen nScreen, Rectangle aAreaRect ) +static tools::Rectangle NWGetTabItemRect( SalX11Screen nScreen, tools::Rectangle aAreaRect ) { NWEnsureGTKNotebook( nScreen ); @@ -1781,13 +1781,13 @@ static Rectangle NWGetTabItemRect( SalX11Screen nScreen, Rectangle aAreaRect ) w += xthickness*2; h += ythickness*2; - return Rectangle( Point( x, y ), Size( w, h ) ); + return tools::Rectangle( Point( x, y ), Size( w, h ) ); } bool GtkSalGraphics::NWPaintGTKRadio( GdkDrawable* gdkDrawable, ControlType, ControlPart, - const Rectangle& rControlRectangle, - const std::list< Rectangle >& rClipList, + const tools::Rectangle& rControlRectangle, + const std::list< tools::Rectangle >& rClipList, ControlState nState, const ImplControlValue& aValue, const OUString& ) @@ -1825,7 +1825,7 @@ bool GtkSalGraphics::NWPaintGTKRadio( GdkDrawable* gdkDrawable, GTK_TOGGLE_BUTTON(gWidgetData[m_nXScreen].gRadioWidgetSibling)->active = true; GTK_TOGGLE_BUTTON(gWidgetData[m_nXScreen].gRadioWidget)->active = isChecked; - for( std::list< Rectangle >::const_iterator it = rClipList.begin(); it != rClipList.end(); ++it ) + for( std::list< tools::Rectangle >::const_iterator it = rClipList.begin(); it != rClipList.end(); ++it ) { clipRect.x = it->Left(); clipRect.y = it->Top(); @@ -1842,8 +1842,8 @@ bool GtkSalGraphics::NWPaintGTKRadio( GdkDrawable* gdkDrawable, bool GtkSalGraphics::NWPaintGTKCheck( GdkDrawable* gdkDrawable, ControlType, ControlPart, - const Rectangle& rControlRectangle, - const std::list< Rectangle >& rClipList, + const tools::Rectangle& rControlRectangle, + const std::list< tools::Rectangle >& rClipList, ControlState nState, const ImplControlValue& aValue, const OUString& ) @@ -1870,7 +1870,7 @@ bool GtkSalGraphics::NWPaintGTKCheck( GdkDrawable* gdkDrawable, NWSetWidgetState( gWidgetData[m_nXScreen].gCheckWidget, nState, stateType ); GTK_TOGGLE_BUTTON(gWidgetData[m_nXScreen].gCheckWidget)->active = isChecked; - for( std::list< Rectangle >::const_iterator it = rClipList.begin(); it != rClipList.end(); ++it ) + for( std::list< tools::Rectangle >::const_iterator it = rClipList.begin(); it != rClipList.end(); ++it ) { clipRect.x = it->Left(); clipRect.y = it->Top(); @@ -1885,7 +1885,7 @@ bool GtkSalGraphics::NWPaintGTKCheck( GdkDrawable* gdkDrawable, return true; } -static void NWCalcArrowRect( const Rectangle& rButton, Rectangle& rArrow ) +static void NWCalcArrowRect( const tools::Rectangle& rButton, tools::Rectangle& rArrow ) { // Size the arrow appropriately Size aSize( rButton.GetWidth()/2, rButton.GetHeight()/2 ); @@ -1898,8 +1898,8 @@ static void NWCalcArrowRect( const Rectangle& rButton, Rectangle& rArrow ) } bool GtkSalGraphics::NWPaintGTKScrollbar( ControlType, ControlPart nPart, - const Rectangle& rControlRectangle, - const std::list< Rectangle >&, + const tools::Rectangle& rControlRectangle, + const std::list< tools::Rectangle >&, ControlState nState, const ImplControlValue& aValue, const OUString& ) @@ -1907,24 +1907,24 @@ bool GtkSalGraphics::NWPaintGTKScrollbar( ControlType, ControlPart nPart, assert(aValue.getType() == ControlType::Scrollbar); const ScrollbarValue& rScrollbarVal = static_cast<const ScrollbarValue&>(aValue); GdkX11Pixmap* pixmap = nullptr; - Rectangle pixmapRect, scrollbarRect; + tools::Rectangle pixmapRect, scrollbarRect; GtkStateType stateType; GtkShadowType shadowType; GtkScrollbar * scrollbarWidget; GtkStyle * style; GtkAdjustment* scrollbarValues = nullptr; GtkOrientation scrollbarOrientation; - Rectangle thumbRect = rScrollbarVal.maThumbRect; - Rectangle button11BoundRect = rScrollbarVal.maButton1Rect; // backward - Rectangle button22BoundRect = rScrollbarVal.maButton2Rect; // forward - Rectangle button12BoundRect = rScrollbarVal.maButton1Rect; // secondary forward - Rectangle button21BoundRect = rScrollbarVal.maButton2Rect; // secondary backward + tools::Rectangle thumbRect = rScrollbarVal.maThumbRect; + tools::Rectangle button11BoundRect = rScrollbarVal.maButton1Rect; // backward + tools::Rectangle button22BoundRect = rScrollbarVal.maButton2Rect; // forward + tools::Rectangle button12BoundRect = rScrollbarVal.maButton1Rect; // secondary forward + tools::Rectangle button21BoundRect = rScrollbarVal.maButton2Rect; // secondary backward GtkArrowType button1Type; // backward GtkArrowType button2Type; // forward gchar * scrollbarTagH = const_cast<gchar *>("hscrollbar"); gchar * scrollbarTagV = const_cast<gchar *>("vscrollbar"); gchar * scrollbarTag = nullptr; - Rectangle arrowRect; + tools::Rectangle arrowRect; gint slider_width = 0; gint stepper_size = 0; gint stepper_spacing = 0; @@ -2217,7 +2217,7 @@ bool GtkSalGraphics::NWPaintGTKScrollbar( ControlType, ControlPart nPart, return bRet; } -static Rectangle NWGetScrollButtonRect( SalX11Screen nScreen, ControlPart nPart, Rectangle aAreaRect ) +static tools::Rectangle NWGetScrollButtonRect( SalX11Screen nScreen, ControlPart nPart, tools::Rectangle aAreaRect ) { gint slider_width; gint stepper_size; @@ -2245,7 +2245,7 @@ static Rectangle NWGetScrollButtonRect( SalX11Screen nScreen, ControlPart nPa "has-secondary-backward-stepper", &has_backward2, nullptr ); gint buttonWidth; gint buttonHeight; - Rectangle buttonRect; + tools::Rectangle buttonRect; gint nFirst = 0; gint nSecond = 0; @@ -2300,20 +2300,20 @@ static Rectangle NWGetScrollButtonRect( SalX11Screen nScreen, ControlPart nPa bool GtkSalGraphics::NWPaintGTKEditBox( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart, - const Rectangle& rControlRectangle, - const std::list< Rectangle >& rClipList, + const tools::Rectangle& rControlRectangle, + const std::list< tools::Rectangle >& rClipList, ControlState nState, const ImplControlValue& aValue, const OUString& rCaption ) { - Rectangle pixmapRect; + tools::Rectangle pixmapRect; GdkRectangle clipRect; // Find the overall bounding rect of the buttons's drawing area, // plus its actual draw rect excluding adornment pixmapRect = NWGetEditBoxPixmapRect( m_nXScreen, nType, nPart, rControlRectangle, nState, aValue, rCaption ); - for( std::list< Rectangle >::const_iterator it = rClipList.begin(); it != rClipList.end(); ++it ) + for( std::list< tools::Rectangle >::const_iterator it = rClipList.begin(); it != rClipList.end(); ++it ) { clipRect.x = it->Left(); clipRect.y = it->Top(); @@ -2330,15 +2330,15 @@ bool GtkSalGraphics::NWPaintGTKEditBox( GdkDrawable* gdkDrawable, * the bounding rectangle of the edit box including * any focus requirements. */ -static Rectangle NWGetEditBoxPixmapRect(SalX11Screen nScreen, +static tools::Rectangle NWGetEditBoxPixmapRect(SalX11Screen nScreen, ControlType, ControlPart, - Rectangle aAreaRect, + tools::Rectangle aAreaRect, ControlState, const ImplControlValue&, const OUString& ) { - Rectangle pixmapRect = aAreaRect; + tools::Rectangle pixmapRect = aAreaRect; gboolean interiorFocus; gint focusWidth; @@ -2368,7 +2368,7 @@ static void NWPaintOneEditBox( SalX11Screen nScreen, GdkRectangle * gdkRect, ControlType nType, ControlPart, - Rectangle aEditBoxRect, + tools::Rectangle aEditBoxRect, ControlState nState, const ImplControlValue&, const OUString& ) @@ -2432,21 +2432,21 @@ static void NWPaintOneEditBox( SalX11Screen nScreen, } bool GtkSalGraphics::NWPaintGTKSpinBox(ControlType nType, ControlPart nPart, - const Rectangle& rControlRectangle, - const std::list< Rectangle >&, + const tools::Rectangle& rControlRectangle, + const std::list< tools::Rectangle >&, ControlState nState, const ImplControlValue& aValue, const OUString& rCaption, ControlCacheKey& rControlCacheKey) { - Rectangle pixmapRect; + tools::Rectangle pixmapRect; GtkStateType stateType; GtkShadowType shadowType; const SpinbuttonValue * pSpinVal = (aValue.getType() == ControlType::SpinButtons) ? static_cast<const SpinbuttonValue *>(&aValue) : nullptr; - Rectangle upBtnRect; + tools::Rectangle upBtnRect; ControlPart upBtnPart = ControlPart::ButtonUp; ControlState upBtnState = ControlState::ENABLED; - Rectangle downBtnRect; + tools::Rectangle downBtnRect; ControlPart downBtnPart = ControlPart::ButtonDown; ControlState downBtnState = ControlState::ENABLED; @@ -2482,7 +2482,7 @@ bool GtkSalGraphics::NWPaintGTKSpinBox(ControlType nType, ControlPart nPart, if ( (nType==ControlType::Spinbox) && (nPart!=ControlPart::AllButtons) ) { // Draw an edit field for SpinBoxes and ComboBoxes - Rectangle aEditBoxRect( pixmapRect ); + tools::Rectangle aEditBoxRect( pixmapRect ); aEditBoxRect.SetSize( Size( pixmapRect.GetWidth() - upBtnRect.GetWidth(), aEditBoxRect.GetHeight() ) ); if( AllSettings::GetLayoutRTL() ) aEditBoxRect.setX( upBtnRect.GetWidth() ); @@ -2498,7 +2498,7 @@ bool GtkSalGraphics::NWPaintGTKSpinBox(ControlType nType, ControlPart nPart, if ( shadowType != GTK_SHADOW_NONE ) { - Rectangle shadowRect( upBtnRect ); + tools::Rectangle shadowRect( upBtnRect ); shadowRect.Union( downBtnRect ); gtk_paint_box( gWidgetData[m_nXScreen].gSpinButtonWidget->style, gdkPixmap, GTK_STATE_NORMAL, shadowType, nullptr, @@ -2515,16 +2515,16 @@ bool GtkSalGraphics::NWPaintGTKSpinBox(ControlType nType, ControlPart nPart, return true; } -static Rectangle NWGetSpinButtonRect( SalX11Screen nScreen, +static tools::Rectangle NWGetSpinButtonRect( SalX11Screen nScreen, ControlType, ControlPart nPart, - Rectangle aAreaRect, + tools::Rectangle aAreaRect, ControlState, const ImplControlValue&, const OUString& ) { gint buttonSize; - Rectangle buttonRect; + tools::Rectangle buttonRect; NWEnsureGTKSpinButton( nScreen ); @@ -2567,15 +2567,15 @@ static void NWPaintOneSpinButton( SalX11Screen nScreen, GdkPixmap* pixmap, ControlType nType, ControlPart nPart, - Rectangle aAreaRect, + tools::Rectangle aAreaRect, ControlState nState, const ImplControlValue& aValue, const OUString& rCaption ) { - Rectangle buttonRect; + tools::Rectangle buttonRect; GtkStateType stateType; GtkShadowType shadowType; - Rectangle arrowRect; + tools::Rectangle arrowRect; gint arrowSize; NWEnsureGTKSpinButton( nScreen ); @@ -2606,17 +2606,17 @@ static void NWPaintOneSpinButton( SalX11Screen nScreen, bool GtkSalGraphics::NWPaintGTKComboBox( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart, - const Rectangle& rControlRectangle, - const std::list< Rectangle >& rClipList, + const tools::Rectangle& rControlRectangle, + const std::list< tools::Rectangle >& rClipList, ControlState nState, const ImplControlValue& aValue, const OUString& rCaption ) { - Rectangle pixmapRect; - Rectangle buttonRect; + tools::Rectangle pixmapRect; + tools::Rectangle buttonRect; GtkStateType stateType; GtkShadowType shadowType; - Rectangle arrowRect; + tools::Rectangle arrowRect; gint x,y; GdkRectangle clipRect; @@ -2639,7 +2639,7 @@ bool GtkSalGraphics::NWPaintGTKComboBox( GdkDrawable* gdkDrawable, if( nPart == ControlPart::ButtonDown ) buttonRect.Left() += 1; - Rectangle aEditBoxRect( pixmapRect ); + tools::Rectangle aEditBoxRect( pixmapRect ); aEditBoxRect.SetSize( Size( pixmapRect.GetWidth() - buttonRect.GetWidth(), aEditBoxRect.GetHeight() ) ); if( AllSettings::GetLayoutRTL() ) aEditBoxRect.SetPos( Point( x + buttonRect.GetWidth() , y ) ); @@ -2650,7 +2650,7 @@ bool GtkSalGraphics::NWPaintGTKComboBox( GdkDrawable* gdkDrawable, arrowRect.SetPos( Point( buttonRect.Left() + (gint)((buttonRect.GetWidth() - arrowRect.GetWidth()) / 2), buttonRect.Top() + (gint)((buttonRect.GetHeight() - arrowRect.GetHeight()) / 2) ) ); - for( std::list< Rectangle >::const_iterator it = rClipList.begin(); it != rClipList.end(); ++it ) + for( std::list< tools::Rectangle >::const_iterator it = rClipList.begin(); it != rClipList.end(); ++it ) { clipRect.x = it->Left(); clipRect.y = it->Top(); @@ -2682,15 +2682,15 @@ bool GtkSalGraphics::NWPaintGTKComboBox( GdkDrawable* gdkDrawable, return true; } -static Rectangle NWGetComboBoxButtonRect( SalX11Screen nScreen, +static tools::Rectangle NWGetComboBoxButtonRect( SalX11Screen nScreen, ControlType, ControlPart nPart, - Rectangle aAreaRect, + tools::Rectangle aAreaRect, ControlState, const ImplControlValue&, const OUString& ) { - Rectangle aButtonRect; + tools::Rectangle aButtonRect; gint nArrowWidth; gint nButtonWidth; gint nFocusWidth; @@ -2739,8 +2739,8 @@ static Rectangle NWGetComboBoxButtonRect( SalX11Screen nScreen, } bool GtkSalGraphics::NWPaintGTKTabItem( ControlType nType, ControlPart, - const Rectangle& rControlRectangle, - const std::list< Rectangle >&, + const tools::Rectangle& rControlRectangle, + const std::list< tools::Rectangle >&, ControlState nState, const ImplControlValue& aValue, const OUString& ) @@ -2748,8 +2748,8 @@ bool GtkSalGraphics::NWPaintGTKTabItem( ControlType nType, ControlPart, OSL_ASSERT( nType != ControlType::TabItem || aValue.getType() == ControlType::TabItem ); GdkX11Pixmap * pixmap; GdkX11Pixmap * mask; - Rectangle pixmapRect; - Rectangle tabRect; + tools::Rectangle pixmapRect; + tools::Rectangle tabRect; GtkStateType stateType; GtkShadowType shadowType; if( ! gWidgetData[ m_nXScreen ].gCacheTabItems ) @@ -2892,13 +2892,13 @@ bool GtkSalGraphics::NWPaintGTKTabItem( ControlType nType, ControlPart, bool GtkSalGraphics::NWPaintGTKListBox( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart, - const Rectangle& rControlRectangle, - const std::list< Rectangle >& rClipList, + const tools::Rectangle& rControlRectangle, + const std::list< tools::Rectangle >& rClipList, ControlState nState, const ImplControlValue& aValue, const OUString& rCaption ) { - Rectangle aIndicatorRect; + tools::Rectangle aIndicatorRect; GtkStateType stateType; GtkShadowType shadowType; gint bInteriorFocus; @@ -2931,7 +2931,7 @@ bool GtkSalGraphics::NWPaintGTKListBox( GdkDrawable* gdkDrawable, nullptr); } - for( std::list< Rectangle >::const_iterator it = rClipList.begin(); it != rClipList.end(); ++it ) + for( std::list< tools::Rectangle >::const_iterator it = rClipList.begin(); it != rClipList.end(); ++it ) { clipRect.x = it->Left(); clipRect.y = it->Top(); @@ -2969,8 +2969,8 @@ bool GtkSalGraphics::NWPaintGTKListBox( GdkDrawable* gdkDrawable, bool GtkSalGraphics::NWPaintGTKToolbar( GdkDrawable* gdkDrawable, ControlType, ControlPart nPart, - const Rectangle& rControlRectangle, - const std::list< Rectangle >& rClipList, + const tools::Rectangle& rControlRectangle, + const std::list< tools::Rectangle >& rClipList, ControlState nState, const ImplControlValue& aValue, const OUString& string) { @@ -3047,7 +3047,7 @@ bool GtkSalGraphics::NWPaintGTKToolbar( if( nPart != ControlPart::Button ) { - for( std::list< Rectangle >::const_iterator it = rClipList.begin(); it != rClipList.end(); ++it ) + for( std::list< tools::Rectangle >::const_iterator it = rClipList.begin(); it != rClipList.end(); ++it ) { clipRect.x = it->Left(); clipRect.y = it->Top(); @@ -3138,7 +3138,7 @@ bool GtkSalGraphics::NWPaintGTKToolbar( } /// Converts a VCL Rectangle to a GdkRectangle. -static void lcl_rectangleToGdkRectangle(const Rectangle& rRectangle, GdkRectangle& rGdkRectangle) +static void lcl_rectangleToGdkRectangle(const tools::Rectangle& rRectangle, GdkRectangle& rGdkRectangle) { rGdkRectangle.x = rRectangle.Left(); rGdkRectangle.y = rRectangle.Top(); @@ -3149,8 +3149,8 @@ static void lcl_rectangleToGdkRectangle(const Rectangle& rRectangle, GdkRectangl bool GtkSalGraphics::NWPaintGTKMenubar( GdkDrawable* gdkDrawable, ControlType, ControlPart nPart, - const Rectangle& rControlRectangle, - const std::list< Rectangle >& rClipList, + const tools::Rectangle& rControlRectangle, + const std::list< tools::Rectangle >& rClipList, ControlState nState, const ImplControlValue&, const OUString& ) { @@ -3178,7 +3178,7 @@ bool GtkSalGraphics::NWPaintGTKMenubar( } } - for( std::list< Rectangle >::const_iterator it = rClipList.begin(); it != rClipList.end(); ++it ) + for( std::list< tools::Rectangle >::const_iterator it = rClipList.begin(); it != rClipList.end(); ++it ) { lcl_rectangleToGdkRectangle(*it, clipRect); @@ -3236,8 +3236,8 @@ bool GtkSalGraphics::NWPaintGTKMenubar( bool GtkSalGraphics::NWPaintGTKPopupMenu( GdkDrawable* gdkDrawable, ControlType, ControlPart nPart, - const Rectangle& rControlRectangle, - const std::list< Rectangle >& rClipList, + const tools::Rectangle& rControlRectangle, + const std::list< tools::Rectangle >& rClipList, ControlState nState, const ImplControlValue&, const OUString& ) { @@ -3275,7 +3275,7 @@ bool GtkSalGraphics::NWPaintGTKPopupMenu( if ( nState & ControlState::ENABLED ) GTK_WIDGET_SET_FLAGS( gWidgetData[m_nXScreen].gMenuWidget, GTK_SENSITIVE ); - for( std::list< Rectangle >::const_iterator it = rClipList.begin(); it != rClipList.end(); ++it ) + for( std::list< tools::Rectangle >::const_iterator it = rClipList.begin(); it != rClipList.end(); ++it ) { clipRect.x = it->Left(); clipRect.y = it->Top(); @@ -3401,8 +3401,8 @@ bool GtkSalGraphics::NWPaintGTKPopupMenu( bool GtkSalGraphics::NWPaintGTKTooltip( GdkDrawable* gdkDrawable, ControlType, ControlPart, - const Rectangle& rControlRectangle, - const std::list< Rectangle >& rClipList, + const tools::Rectangle& rControlRectangle, + const std::list< tools::Rectangle >& rClipList, ControlState, const ImplControlValue&, const OUString& ) { @@ -3416,7 +3416,7 @@ bool GtkSalGraphics::NWPaintGTKTooltip( w = rControlRectangle.GetWidth(); h = rControlRectangle.GetHeight(); - for( std::list< Rectangle >::const_iterator it = rClipList.begin(); it != rClipList.end(); ++it ) + for( std::list< tools::Rectangle >::const_iterator it = rClipList.begin(); it != rClipList.end(); ++it ) { clipRect.x = it->Left(); clipRect.y = it->Top(); @@ -3439,14 +3439,14 @@ bool GtkSalGraphics::NWPaintGTKTooltip( bool GtkSalGraphics::NWPaintGTKListNode( GdkDrawable*, ControlType, ControlPart, - const Rectangle& rControlRectangle, - const std::list< Rectangle >&, + const tools::Rectangle& rControlRectangle, + const std::list< tools::Rectangle >&, ControlState nState, const ImplControlValue& rValue, const OUString& ) { NWEnsureGTKTreeView( m_nXScreen ); - Rectangle aRect( rControlRectangle ); + tools::Rectangle aRect( rControlRectangle ); aRect.Left() -= 2; aRect.Right() += 2; aRect.Top() -= 2; @@ -3489,8 +3489,8 @@ bool GtkSalGraphics::NWPaintGTKListNode( bool GtkSalGraphics::NWPaintGTKProgress( GdkDrawable*, ControlType, ControlPart, - const Rectangle& rControlRectangle, - const std::list< Rectangle >&, + const tools::Rectangle& rControlRectangle, + const std::list< tools::Rectangle >&, ControlState, const ImplControlValue& rValue, const OUString& ) { @@ -3499,7 +3499,7 @@ bool GtkSalGraphics::NWPaintGTKProgress( gint w, h; w = rControlRectangle.GetWidth(); h = rControlRectangle.GetHeight(); - Rectangle aRect( Point( 0, 0 ), Size( w, h ) ); + tools::Rectangle aRect( Point( 0, 0 ), Size( w, h ) ); long nProgressWidth = rValue.getNumericVal(); @@ -3554,8 +3554,8 @@ bool GtkSalGraphics::NWPaintGTKProgress( bool GtkSalGraphics::NWPaintGTKSlider( GdkDrawable*, ControlType, ControlPart nPart, - const Rectangle& rControlRectangle, - const std::list< Rectangle >&, + const tools::Rectangle& rControlRectangle, + const std::list< tools::Rectangle >&, ControlState nState, const ImplControlValue& rValue, const OUString& ) { @@ -3640,15 +3640,15 @@ static int getFrameWidth(GtkWidget* widget) return widget->style->xthickness; } -static Rectangle NWGetListBoxButtonRect( SalX11Screen nScreen, +static tools::Rectangle NWGetListBoxButtonRect( SalX11Screen nScreen, ControlType, ControlPart nPart, - Rectangle aAreaRect, + tools::Rectangle aAreaRect, ControlState, const ImplControlValue&, const OUString& ) { - Rectangle aPartRect; + tools::Rectangle aPartRect; GtkRequisition *pIndicatorSize = nullptr; GtkBorder *pIndicatorSpacing = nullptr; gint width = 13; // GTK+ default @@ -3693,7 +3693,7 @@ static Rectangle NWGetListBoxButtonRect( SalX11Screen nScreen, aPartPos.X() = aAreaRect.Left(); break; } - aPartRect = Rectangle( aPartPos, aPartSize ); + aPartRect = tools::Rectangle( aPartPos, aPartSize ); if ( pIndicatorSize ) gtk_requisition_free( pIndicatorSize ); @@ -3703,15 +3703,15 @@ static Rectangle NWGetListBoxButtonRect( SalX11Screen nScreen, return aPartRect; } -static Rectangle NWGetListBoxIndicatorRect( SalX11Screen nScreen, +static tools::Rectangle NWGetListBoxIndicatorRect( SalX11Screen nScreen, ControlType, ControlPart, - Rectangle aAreaRect, + tools::Rectangle aAreaRect, ControlState, const ImplControlValue&, const OUString& ) { - Rectangle aIndicatorRect; + tools::Rectangle aIndicatorRect; GtkRequisition *pIndicatorSize = nullptr; GtkBorder *pIndicatorSpacing = nullptr; gint width = 13; // GTK+ default @@ -3753,23 +3753,23 @@ static Rectangle NWGetListBoxIndicatorRect( SalX11Screen nScreen, return aIndicatorRect; } -static Rectangle NWGetToolbarRect( SalX11Screen nScreen, +static tools::Rectangle NWGetToolbarRect( SalX11Screen nScreen, ControlType, ControlPart nPart, - Rectangle aAreaRect, + tools::Rectangle aAreaRect, ControlState, const ImplControlValue&, const OUString& ) { - Rectangle aRet; + tools::Rectangle aRet; if( nPart == ControlPart::DrawBackgroundHorz || nPart == ControlPart::DrawBackgroundVert ) aRet = aAreaRect; else if( nPart == ControlPart::ThumbHorz ) - aRet = Rectangle( Point( 0, 0 ), Size( aAreaRect.GetWidth(), 10 ) ); + aRet = tools::Rectangle( Point( 0, 0 ), Size( aAreaRect.GetWidth(), 10 ) ); else if( nPart == ControlPart::ThumbVert ) - aRet = Rectangle( Point( 0, 0 ), Size( 10, aAreaRect.GetHeight() ) ); + aRet = tools::Rectangle( Point( 0, 0 ), Size( 10, aAreaRect.GetHeight() ) ); else if( nPart == ControlPart::Button ) { aRet = aAreaRect; @@ -4191,7 +4191,7 @@ void GtkSalGraphics::updateSettings( AllSettings& rSettings ) * Create a GdkPixmap filled with the contents of an area of an Xlib window ************************************************************************/ -GdkX11Pixmap* GtkSalGraphics::NWGetPixmapFromScreen( Rectangle srcRect, int nBgColor ) +GdkX11Pixmap* GtkSalGraphics::NWGetPixmapFromScreen( tools::Rectangle srcRect, int nBgColor ) { GdkX11Pixmap* pPixmap; int nDepth = vcl_sal::getSalDisplay(GetGenericData())->GetVisual( m_nXScreen ).GetDepth(); @@ -4221,7 +4221,7 @@ GdkX11Pixmap* GtkSalGraphics::NWGetPixmapFromScreen( Rectangle srcRect, int nBgC * Copy an alpha pixmap to screen using a gc with clipping ************************************************************************/ -bool GtkSalGraphics::NWRenderPixmapToScreen( GdkX11Pixmap* pPixmap, GdkX11Pixmap* pMask, Rectangle dstRect ) +bool GtkSalGraphics::NWRenderPixmapToScreen( GdkX11Pixmap* pPixmap, GdkX11Pixmap* pMask, tools::Rectangle dstRect ) { return RenderPixmapToScreen( pPixmap, pMask, dstRect.Left(), dstRect.Top() ); } diff --git a/vcl/unx/gtk3/gtk3gtkframe.cxx b/vcl/unx/gtk3/gtk3gtkframe.cxx index 7ae0b9c0915b..1459f669fcca 100644 --- a/vcl/unx/gtk3/gtk3gtkframe.cxx +++ b/vcl/unx/gtk3/gtk3gtkframe.cxx @@ -1663,16 +1663,16 @@ void GtkSalFrame::GetClientSize( long& rWidth, long& rHeight ) rWidth = rHeight = 0; } -void GtkSalFrame::GetWorkArea( Rectangle& rRect ) +void GtkSalFrame::GetWorkArea( tools::Rectangle& rRect ) { GdkScreen *pScreen = gtk_window_get_screen(GTK_WINDOW(m_pWindow)); - Rectangle aRetRect; + tools::Rectangle aRetRect; int max = gdk_screen_get_n_monitors (pScreen); for (int i = 0; i < max; ++i) { GdkRectangle aRect; gdk_screen_get_monitor_workarea(pScreen, i, &aRect); - Rectangle aMonitorRect(aRect.x, aRect.y, aRect.x+aRect.width, aRect.y+aRect.height); + tools::Rectangle aMonitorRect(aRect.x, aRect.y, aRect.x+aRect.width, aRect.y+aRect.height); aRetRect.Union(aMonitorRect); } rRect = aRetRect; @@ -1706,7 +1706,7 @@ void GtkSalFrame::SetWindowState( const SalFrameState* pState ) updateScreenNumber(); m_nState = GdkWindowState( m_nState | GDK_WINDOW_STATE_MAXIMIZED ); - m_aRestorePosSize = Rectangle( Point( pState->mnX, pState->mnY ), + m_aRestorePosSize = tools::Rectangle( Point( pState->mnX, pState->mnY ), Size( pState->mnWidth, pState->mnHeight ) ); } else if( pState->mnMask & (WindowStateMask::X | WindowStateMask::Y | @@ -1766,11 +1766,11 @@ namespace rHeight = height; } - Rectangle GetPosAndSize(GtkWindow *pWindow) + tools::Rectangle GetPosAndSize(GtkWindow *pWindow) { long nX, nY, nWidth, nHeight; GetPosAndSize(pWindow, nX, nY, nWidth, nHeight); - return Rectangle(nX, nY, nX + nWidth, nY + nHeight); + return tools::Rectangle(nX, nY, nX + nWidth, nY + nHeight); } } @@ -1808,7 +1808,7 @@ bool GtkSalFrame::GetWindowState( SalFrameState* pState ) return true; } -void GtkSalFrame::SetScreen( unsigned int nNewScreen, SetType eType, Rectangle *pSize ) +void GtkSalFrame::SetScreen( unsigned int nNewScreen, SetType eType, tools::Rectangle *pSize ) { if( !m_pWindow ) return; @@ -2011,7 +2011,7 @@ void GtkSalFrame::ShowFullScreen( bool bFullScreen, sal_Int32 nScreen ) { SetScreen( nScreen, SetType::UnFullscreen, !m_aRestorePosSize.IsEmpty() ? &m_aRestorePosSize : nullptr ); - m_aRestorePosSize = Rectangle(); + m_aRestorePosSize = tools::Rectangle(); } } @@ -2460,7 +2460,7 @@ gboolean GtkSalFrame::signalTooltipQuery(GtkWidget*, gint /*x*/, gint /*y*/, return true; } -bool GtkSalFrame::ShowTooltip(const OUString& rHelpText, const Rectangle& rHelpArea) +bool GtkSalFrame::ShowTooltip(const OUString& rHelpText, const tools::Rectangle& rHelpArea) { m_aTooltip = rHelpText; m_aHelpArea = rHelpArea; @@ -2471,7 +2471,7 @@ bool GtkSalFrame::ShowTooltip(const OUString& rHelpText, const Rectangle& rHelpA #if GTK_CHECK_VERSION(3,12,0) namespace { - void set_pointing_to(GtkPopover *pPopOver, const Rectangle& rHelpArea) + void set_pointing_to(GtkPopover *pPopOver, const tools::Rectangle& rHelpArea) { GdkRectangle aRect; aRect.x = rHelpArea.Left(); @@ -2497,7 +2497,7 @@ namespace } #endif -sal_uIntPtr GtkSalFrame::ShowPopover(const OUString& rHelpText, const Rectangle& rHelpArea, QuickHelpFlags nFlags) +sal_uIntPtr GtkSalFrame::ShowPopover(const OUString& rHelpText, const tools::Rectangle& rHelpArea, QuickHelpFlags nFlags) { #if GTK_CHECK_VERSION(3,12,0) GtkWidget *pWidget = gtk_popover_new(getMouseEventWidget()); @@ -2529,7 +2529,7 @@ sal_uIntPtr GtkSalFrame::ShowPopover(const OUString& rHelpText, const Rectangle& #endif } -bool GtkSalFrame::UpdatePopover(sal_uIntPtr nId, const OUString& rHelpText, const Rectangle& rHelpArea) +bool GtkSalFrame::UpdatePopover(sal_uIntPtr nId, const OUString& rHelpText, const tools::Rectangle& rHelpArea) { #if GTK_CHECK_VERSION(3,12,0) GtkWidget *pWidget = reinterpret_cast<GtkWidget*>(nId); @@ -4097,7 +4097,7 @@ gboolean GtkSalFrame::IMHandler::signalIMDeleteSurrounding( GtkIMContext*, gint Size GtkSalDisplay::GetScreenSize( int nDisplayScreen ) { - Rectangle aRect = m_pSys->GetDisplayScreenPosSizePixel( nDisplayScreen ); + tools::Rectangle aRect = m_pSys->GetDisplayScreenPosSizePixel( nDisplayScreen ); return Size( aRect.GetWidth(), aRect.GetHeight() ); } diff --git a/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx b/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx index 731f5a83b8a8..fc0e94149545 100644 --- a/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx +++ b/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx @@ -152,7 +152,7 @@ enum class RenderType { Focus }; -static void NWCalcArrowRect( const Rectangle& rButton, Rectangle& rArrow ) +static void NWCalcArrowRect( const tools::Rectangle& rButton, tools::Rectangle& rArrow ) { // Size the arrow appropriately Size aSize( rButton.GetWidth()/2, rButton.GetHeight()/2 ); @@ -164,7 +164,7 @@ static void NWCalcArrowRect( const Rectangle& rButton, Rectangle& rArrow ) ) ); } -Rectangle GtkSalGraphics::NWGetSpinButtonRect( ControlPart nPart, Rectangle aAreaRect) +tools::Rectangle GtkSalGraphics::NWGetSpinButtonRect( ControlPart nPart, tools::Rectangle aAreaRect) { gint w, h; gtk_icon_size_lookup (GTK_ICON_SIZE_MENU, &w, &h); @@ -180,11 +180,11 @@ Rectangle GtkSalGraphics::NWGetSpinButtonRect( ControlPart nPart, Rectangle aAre gint buttonHeight = icon_size + padding.top + padding.bottom + border.top + border.bottom; - Rectangle buttonRect; + tools::Rectangle buttonRect; buttonRect.SetSize(Size(buttonWidth, buttonHeight)); buttonRect.setY(aAreaRect.Top()); buttonRect.Bottom() = buttonRect.Top() + aAreaRect.GetHeight(); - Rectangle partRect(buttonRect); + tools::Rectangle partRect(buttonRect); if ( nPart == ControlPart::ButtonUp ) { if (AllSettings::GetLayoutRTL()) @@ -239,9 +239,9 @@ namespace } } -Rectangle GtkSalGraphics::NWGetScrollButtonRect( ControlPart nPart, Rectangle aAreaRect ) +tools::Rectangle GtkSalGraphics::NWGetScrollButtonRect( ControlPart nPart, tools::Rectangle aAreaRect ) { - Rectangle buttonRect; + tools::Rectangle buttonRect; gboolean has_forward; gboolean has_forward2; @@ -398,14 +398,14 @@ namespace parent_styles_context_set_state(context, flags); } - Rectangle render_common(GtkStyleContext *pContext, cairo_t *cr, const Rectangle &rIn, GtkStateFlags flags) + tools::Rectangle render_common(GtkStyleContext *pContext, cairo_t *cr, const tools::Rectangle &rIn, GtkStateFlags flags) { if (!pContext) return rIn; gtk_style_context_set_state(pContext, flags); - Rectangle aRect(rIn); + tools::Rectangle aRect(rIn); GtkBorder margin; gtk_style_context_get_margin(pContext, gtk_style_context_get_state(pContext), &margin); @@ -434,7 +434,7 @@ namespace void GtkSalGraphics::PaintScrollbar(GtkStyleContext *context, cairo_t *cr, - const Rectangle& rControlRectangle, + const tools::Rectangle& rControlRectangle, ControlType nType, ControlPart nPart, const ImplControlValue& rValue ) @@ -443,17 +443,17 @@ void GtkSalGraphics::PaintScrollbar(GtkStyleContext *context, { assert(rValue.getType() == ControlType::Scrollbar); const ScrollbarValue& rScrollbarVal = static_cast<const ScrollbarValue&>(rValue); - Rectangle scrollbarRect; + tools::Rectangle scrollbarRect; GtkStateFlags stateFlags; GtkOrientation scrollbarOrientation; - Rectangle thumbRect = rScrollbarVal.maThumbRect; - Rectangle button11BoundRect = rScrollbarVal.maButton1Rect; // backward - Rectangle button22BoundRect = rScrollbarVal.maButton2Rect; // forward - Rectangle button12BoundRect = rScrollbarVal.maButton1Rect; // secondary forward - Rectangle button21BoundRect = rScrollbarVal.maButton2Rect; // secondary backward + tools::Rectangle thumbRect = rScrollbarVal.maThumbRect; + tools::Rectangle button11BoundRect = rScrollbarVal.maButton1Rect; // backward + tools::Rectangle button22BoundRect = rScrollbarVal.maButton2Rect; // forward + tools::Rectangle button12BoundRect = rScrollbarVal.maButton1Rect; // secondary forward + tools::Rectangle button21BoundRect = rScrollbarVal.maButton2Rect; // secondary backward gdouble arrow1Angle; // backward gdouble arrow2Angle; // forward - Rectangle arrowRect; + tools::Rectangle arrowRect; gint slider_width = 0; gint stepper_size = 0; @@ -708,18 +708,18 @@ void GtkSalGraphics::PaintScrollbar(GtkStyleContext *context, // ----------------- TROUGH // trackrect matches that of ScrollBar::ImplCalc - Rectangle aTrackRect(Point(0, 0), scrollbarRect.GetSize()); + tools::Rectangle aTrackRect(Point(0, 0), scrollbarRect.GetSize()); if (nPart == ControlPart::DrawBackgroundHorz) { - Rectangle aBtn1Rect = NWGetScrollButtonRect(ControlPart::ButtonLeft, aTrackRect); - Rectangle aBtn2Rect = NWGetScrollButtonRect(ControlPart::ButtonRight, aTrackRect); + tools::Rectangle aBtn1Rect = NWGetScrollButtonRect(ControlPart::ButtonLeft, aTrackRect); + tools::Rectangle aBtn2Rect = NWGetScrollButtonRect(ControlPart::ButtonRight, aTrackRect); aTrackRect.Left() = aBtn1Rect.Right(); aTrackRect.Right() = aBtn2Rect.Left(); } else { - Rectangle aBtn1Rect = NWGetScrollButtonRect(ControlPart::ButtonUp, aTrackRect); - Rectangle aBtn2Rect = NWGetScrollButtonRect(ControlPart::ButtonDown, aTrackRect); + tools::Rectangle aBtn1Rect = NWGetScrollButtonRect(ControlPart::ButtonUp, aTrackRect); + tools::Rectangle aBtn2Rect = NWGetScrollButtonRect(ControlPart::ButtonDown, aTrackRect); aTrackRect.Top() = aBtn1Rect.Bottom() + 1; aTrackRect.Bottom() = aBtn2Rect.Top(); } @@ -763,17 +763,17 @@ void GtkSalGraphics::PaintScrollbar(GtkStyleContext *context, (void)nType; OSL_ASSERT( rValue.getType() == ControlType::Scrollbar ); const ScrollbarValue& rScrollbarVal = static_cast<const ScrollbarValue&>(rValue); - Rectangle scrollbarRect; + tools::Rectangle scrollbarRect; GtkStateFlags stateFlags; GtkOrientation scrollbarOrientation; - Rectangle thumbRect = rScrollbarVal.maThumbRect; - Rectangle button11BoundRect = rScrollbarVal.maButton1Rect; // backward - Rectangle button22BoundRect = rScrollbarVal.maButton2Rect; // forward - Rectangle button12BoundRect = rScrollbarVal.maButton1Rect; // secondary forward - Rectangle button21BoundRect = rScrollbarVal.maButton2Rect; // secondary backward + tools::Rectangle thumbRect = rScrollbarVal.maThumbRect; + tools::Rectangle button11BoundRect = rScrollbarVal.maButton1Rect; // backward + tools::Rectangle button22BoundRect = rScrollbarVal.maButton2Rect; // forward + tools::Rectangle button12BoundRect = rScrollbarVal.maButton1Rect; // secondary forward + tools::Rectangle button21BoundRect = rScrollbarVal.maButton2Rect; // secondary backward gdouble arrow1Angle; // backward gdouble arrow2Angle; // forward - Rectangle arrowRect; + tools::Rectangle arrowRect; gint slider_width = 0; gint stepper_size = 0; gint trough_border = 0; @@ -1055,14 +1055,14 @@ void GtkSalGraphics::PaintOneSpinButton( GtkStyleContext *context, cairo_t *cr, ControlType nType, ControlPart nPart, - Rectangle aAreaRect, + tools::Rectangle aAreaRect, ControlState nState ) { (void)nType; GtkBorder padding, border; GtkStateFlags stateFlags = NWConvertVCLStateToGTKState(nState); - Rectangle buttonRect = NWGetSpinButtonRect( nPart, aAreaRect ); + tools::Rectangle buttonRect = NWGetSpinButtonRect( nPart, aAreaRect ); gtk_style_context_set_state(context, stateFlags); @@ -1087,7 +1087,7 @@ void GtkSalGraphics::PaintOneSpinButton( GtkStyleContext *context, iconWidth = gdk_pixbuf_get_width(pixbuf); iconHeight = gdk_pixbuf_get_height(pixbuf); - Rectangle arrowRect; + tools::Rectangle arrowRect; arrowRect.SetSize(Size(iconWidth, iconHeight)); arrowRect.setX( buttonRect.Left() + (buttonRect.GetWidth() - arrowRect.GetWidth()) / 2 ); arrowRect.setY( buttonRect.Top() + (buttonRect.GetHeight() - arrowRect.GetHeight()) / 2 ); @@ -1102,7 +1102,7 @@ void GtkSalGraphics::PaintOneSpinButton( GtkStyleContext *context, void GtkSalGraphics::PaintSpinButton(GtkStateFlags flags, cairo_t *cr, - const Rectangle& rControlRectangle, + const tools::Rectangle& rControlRectangle, ControlType nType, ControlPart nPart, const ImplControlValue& rValue ) @@ -1146,13 +1146,13 @@ void GtkSalGraphics::PaintSpinButton(GtkStateFlags flags, #define FALLBACK_ARROW_SIZE 11 * 0.85 -Rectangle GtkSalGraphics::NWGetComboBoxButtonRect( ControlType nType, +tools::Rectangle GtkSalGraphics::NWGetComboBoxButtonRect( ControlType nType, ControlPart nPart, - Rectangle aAreaRect ) + tools::Rectangle aAreaRect ) { (void)nType; (void)nPart; - Rectangle aButtonRect; + tools::Rectangle aButtonRect; GtkBorder padding; gtk_style_context_get_padding( mpButtonStyle, gtk_style_context_get_state(mpButtonStyle), &padding); @@ -1196,14 +1196,14 @@ Rectangle GtkSalGraphics::NWGetComboBoxButtonRect( ControlType nType, } void GtkSalGraphics::PaintCombobox( GtkStateFlags flags, cairo_t *cr, - const Rectangle& rControlRectangle, + const tools::Rectangle& rControlRectangle, ControlType nType, ControlPart nPart, const ImplControlValue& /*rValue*/ ) { - Rectangle areaRect; - Rectangle buttonRect; - Rectangle arrowRect; + tools::Rectangle areaRect; + tools::Rectangle buttonRect; + tools::Rectangle arrowRect; // Find the overall bounding rect of the buttons's drawing area, // plus its actual draw rect excluding adornment @@ -1211,7 +1211,7 @@ void GtkSalGraphics::PaintCombobox( GtkStateFlags flags, cairo_t *cr, buttonRect = NWGetComboBoxButtonRect( nType, ControlPart::ButtonDown, areaRect ); - Rectangle aEditBoxRect( areaRect ); + tools::Rectangle aEditBoxRect( areaRect ); aEditBoxRect.SetSize( Size( areaRect.GetWidth() - buttonRect.GetWidth(), aEditBoxRect.GetHeight() ) ); if (AllSettings::GetLayoutRTL()) aEditBoxRect.SetPos( Point( areaRect.Left() + buttonRect.GetWidth(), areaRect.Top() ) ); @@ -1238,7 +1238,7 @@ void GtkSalGraphics::PaintCombobox( GtkStateFlags flags, cairo_t *cr, buttonRect.Top() + (gint)((buttonRect.GetHeight() - arrowRect.GetHeight()) / 2) ) ); - Rectangle aRect(Point(0, 0), Size(areaRect.GetWidth(), areaRect.GetHeight())); + tools::Rectangle aRect(Point(0, 0), Size(areaRect.GetWidth(), areaRect.GetHeight())); if (nType == ControlType::Combobox) { @@ -1246,7 +1246,7 @@ void GtkSalGraphics::PaintCombobox( GtkStateFlags flags, cairo_t *cr, { render_common(mpComboboxStyle, cr, aRect, flags); render_common(mpComboboxBoxStyle, cr, aRect, flags); - Rectangle aEntryRect(Point(aEditBoxRect.Left() - areaRect.Left(), + tools::Rectangle aEntryRect(Point(aEditBoxRect.Left() - areaRect.Left(), aEditBoxRect.Top() - areaRect.Top()), Size(aEditBoxRect.GetWidth(), aEditBoxRect.GetHeight())); @@ -1259,7 +1259,7 @@ void GtkSalGraphics::PaintCombobox( GtkStateFlags flags, cairo_t *cr, gtk_style_context_set_junction_sides(mpComboboxEntryStyle, eJuncSides); } - Rectangle aButtonRect(Point(buttonRect.Left() - areaRect.Left(), buttonRect.Top() - areaRect.Top()), + tools::Rectangle aButtonRect(Point(buttonRect.Left() - areaRect.Left(), buttonRect.Top() - areaRect.Top()), Size(buttonRect.GetWidth(), buttonRect.GetHeight())); GtkJunctionSides eJuncSides = gtk_style_context_get_junction_sides(mpComboboxButtonStyle); if (AllSettings::GetLayoutRTL()) @@ -2121,7 +2121,7 @@ namespace } void GtkSalGraphics::PaintCheckOrRadio(cairo_t *cr, GtkStyleContext *context, - const Rectangle& rControlRectangle, bool bIsCheck, bool bInMenu) + const tools::Rectangle& rControlRectangle, bool bIsCheck, bool bInMenu) { gint indicator_size; gtk_style_context_get_style(context, "indicator-size", &indicator_size, nullptr); @@ -2141,13 +2141,13 @@ void GtkSalGraphics::PaintCheckOrRadio(cairo_t *cr, GtkStyleContext *context, } void GtkSalGraphics::PaintCheck(cairo_t *cr, GtkStyleContext *context, - const Rectangle& rControlRectangle, bool bInMenu) + const tools::Rectangle& rControlRectangle, bool bInMenu) { PaintCheckOrRadio(cr, context, rControlRectangle, true, bInMenu); } void GtkSalGraphics::PaintRadio(cairo_t *cr, GtkStyleContext *context, - const Rectangle& rControlRectangle, bool bInMenu) + const tools::Rectangle& rControlRectangle, bool bInMenu) { PaintCheckOrRadio(cr, context, rControlRectangle, false, bInMenu); } @@ -2160,7 +2160,7 @@ static gfloat getArrowSize(GtkStyleContext* context) return arrow_size; } -bool GtkSalGraphics::drawNativeControl( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion, +bool GtkSalGraphics::drawNativeControl( ControlType nType, ControlPart nPart, const tools::Rectangle& rControlRegion, ControlState nState, const ImplControlValue& rValue, const OUString& ) { @@ -2547,7 +2547,7 @@ bool GtkSalGraphics::drawNativeControl( ControlType nType, ControlPart nPart, co nX += initial_gap/2; nWidth -= initial_gap; } - Rectangle aRect(Point(nX, nY), Size(nWidth, nHeight)); + tools::Rectangle aRect(Point(nX, nY), Size(nWidth, nHeight)); render_common(mpNotebookHeaderTabsTabStyle, cr, aRect, flags); break; } @@ -2568,15 +2568,15 @@ bool GtkSalGraphics::drawNativeControl( ControlType nType, ControlPart nPart, co return true; } -Rectangle GetWidgetSize(const Rectangle& rControlRegion, GtkWidget* widget) +tools::Rectangle GetWidgetSize(const tools::Rectangle& rControlRegion, GtkWidget* widget) { GtkRequisition aReq; gtk_widget_get_preferred_size(widget, nullptr, &aReq); long nHeight = (rControlRegion.GetHeight() > aReq.height) ? rControlRegion.GetHeight() : aReq.height; - return Rectangle(rControlRegion.TopLeft(), Size(rControlRegion.GetWidth(), nHeight)); + return tools::Rectangle(rControlRegion.TopLeft(), Size(rControlRegion.GetWidth(), nHeight)); } -Rectangle AdjustRectForTextBordersPadding(GtkStyleContext* pStyle, long nContentWidth, long nContentHeight, const Rectangle& rControlRegion) +tools::Rectangle AdjustRectForTextBordersPadding(GtkStyleContext* pStyle, long nContentWidth, long nContentHeight, const tools::Rectangle& rControlRegion) { GtkBorder border; gtk_style_context_get_border(pStyle, gtk_style_context_get_state(pStyle), &border); @@ -2590,17 +2590,17 @@ Rectangle AdjustRectForTextBordersPadding(GtkStyleContext* pStyle, long nContent gint nWidgetWidth = nContentWidth + padding.left + padding.right + border.left + border.right; nWidgetWidth = std::max<gint>(nWidgetWidth, rControlRegion.GetWidth()); - Rectangle aEditRect(rControlRegion.TopLeft(), Size(nWidgetWidth, nWidgetHeight)); + tools::Rectangle aEditRect(rControlRegion.TopLeft(), Size(nWidgetWidth, nWidgetHeight)); return aEditRect; } -bool GtkSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion, ControlState, +bool GtkSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPart, const tools::Rectangle& rControlRegion, ControlState, const ImplControlValue& rValue, const OUString&, - Rectangle &rNativeBoundingRegion, Rectangle &rNativeContentRegion ) + tools::Rectangle &rNativeBoundingRegion, tools::Rectangle &rNativeContentRegion ) { /* TODO: all this functions needs improvements */ - Rectangle aEditRect = rControlRegion; + tools::Rectangle aEditRect = rControlRegion; gint indicator_size, indicator_spacing, point; if(((nType == ControlType::Checkbox) || (nType == ControlType::Radiobutton)) && @@ -2624,7 +2624,7 @@ bool GtkSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPar indicator_size += 2*indicator_spacing + border.left + padding.left + border.right + padding.right; - Rectangle aIndicatorRect( Point( 0, + tools::Rectangle aIndicatorRect( Point( 0, (rControlRegion.GetHeight()-indicator_size)/2), Size( indicator_size, indicator_size ) ); rNativeContentRegion = aIndicatorRect; @@ -2646,7 +2646,7 @@ bool GtkSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPar nullptr ); point = MAX(0, rControlRegion.GetHeight() - indicator_size); - aEditRect = Rectangle( Point( 0, point / 2), + aEditRect = tools::Rectangle( Point( 0, point / 2), Size( indicator_size, indicator_size ) ); } else if (nPart == ControlPart::Separator) @@ -2659,13 +2659,13 @@ bool GtkSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPar "separator-height", &separator_height, nullptr); - aEditRect = Rectangle( aEditRect.TopLeft(), + aEditRect = tools::Rectangle( aEditRect.TopLeft(), Size( aEditRect.GetWidth(), wide_separators ? separator_height : 1 ) ); } else if (nPart == ControlPart::SubmenuArrow) { gfloat arrow_size = getArrowSize(mpMenuItemArrowStyle); - aEditRect = Rectangle( aEditRect.TopLeft(), + aEditRect = tools::Rectangle( aEditRect.TopLeft(), Size( arrow_size, arrow_size ) ); } } @@ -2687,7 +2687,7 @@ bool GtkSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPar ((nPart==ControlPart::ButtonUp) || (nPart==ControlPart::ButtonDown) || (nPart==ControlPart::SubEdit)) ) { - Rectangle aControlRegion(GetWidgetSize(rControlRegion, gSpinBox)); + tools::Rectangle aControlRegion(GetWidgetSize(rControlRegion, gSpinBox)); aEditRect = NWGetSpinButtonRect(nPart, aControlRegion); } else if ( (nType==ControlType::Combobox) && @@ -2719,7 +2719,7 @@ bool GtkSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPar else if (nType == ControlType::TabItem && nPart == ControlPart::Entire) { const TabitemValue& rTabitemValue = static_cast<const TabitemValue&>(rValue); - const Rectangle& rTabitemRect = rTabitemValue.getContentRect(); + const tools::Rectangle& rTabitemRect = rTabitemValue.getContentRect(); aEditRect = AdjustRectForTextBordersPadding(mpNotebookHeaderTabsTabStyle, rTabitemRect.GetWidth(), rTabitemRect.GetHeight(), rControlRegion); @@ -2742,7 +2742,7 @@ bool GtkSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPar int y2 = aEditRect.Bottom(); rNativeBoundingRegion = aEditRect; - rNativeContentRegion = Rectangle(x1 + (padding.left + border.left), + rNativeContentRegion = tools::Rectangle(x1 + (padding.left + border.left), y1 + (padding.top + border.top), x2 - (padding.right + border.right), y2 - (padding.bottom + border.bottom)); diff --git a/vcl/unx/x11/x11sys.cxx b/vcl/unx/x11/x11sys.cxx index e4f4b2955726..69a626274a0c 100644 --- a/vcl/unx/x11/x11sys.cxx +++ b/vcl/unx/x11/x11sys.cxx @@ -60,13 +60,13 @@ unsigned int X11SalSystem::GetDisplayBuiltInScreen() return pSalDisp->GetDefaultXScreen().getXScreen(); } -Rectangle X11SalSystem::GetDisplayScreenPosSizePixel( unsigned int nScreen ) +tools::Rectangle X11SalSystem::GetDisplayScreenPosSizePixel( unsigned int nScreen ) { - Rectangle aRet; + tools::Rectangle aRet; SalDisplay* pSalDisp = vcl_sal::getSalDisplay(GetGenericData()); if( pSalDisp->IsXinerama() ) { - const std::vector< Rectangle >& rScreens = pSalDisp->GetXineramaScreens(); + const std::vector< tools::Rectangle >& rScreens = pSalDisp->GetXineramaScreens(); // we shouldn't be able to pick a screen > number of screens available assert(nScreen < rScreens.size() ); @@ -78,7 +78,7 @@ Rectangle X11SalSystem::GetDisplayScreenPosSizePixel( unsigned int nScreen ) { const SalDisplay::ScreenData& rScreen = pSalDisp->getDataForScreen( SalX11Screen( nScreen ) ); - aRet = Rectangle( Point( 0, 0 ), rScreen.m_aSize ); + aRet = tools::Rectangle( Point( 0, 0 ), rScreen.m_aSize ); } return aRet; diff --git a/vcl/win/app/salinfo.cxx b/vcl/win/app/salinfo.cxx index 15a71e3177d9..5b9fa323c528 100644 --- a/vcl/win/app/salinfo.cxx +++ b/vcl/win/app/salinfo.cxx @@ -66,7 +66,7 @@ bool WinSalSystem::handleMonitorCallback( sal_IntPtr hMonitor, sal_IntPtr, sal_I if( it != m_aDeviceNameToMonitor.end() ) { DisplayMonitor& rMon( m_aMonitors[ it->second ] ); - rMon.m_aArea = Rectangle( Point( aInfo.rcMonitor.left, + rMon.m_aArea = tools::Rectangle( Point( aInfo.rcMonitor.left, aInfo.rcMonitor.top ), Size( aInfo.rcMonitor.right - aInfo.rcMonitor.left, aInfo.rcMonitor.bottom - aInfo.rcMonitor.top ) ); @@ -94,7 +94,7 @@ bool WinSalSystem::initMonitors() int w = GetSystemMetrics( SM_CXSCREEN ); int h = GetSystemMetrics( SM_CYSCREEN ); m_aMonitors.push_back( DisplayMonitor( OUString(), - Rectangle( Point(), Size( w, h ) ) ) ); + tools::Rectangle( Point(), Size( w, h ) ) ) ); m_aDeviceNameToMonitor[ OUString() ] = 0; m_nPrimary = 0; } @@ -119,7 +119,7 @@ bool WinSalSystem::initMonitors() aDeviceStringCount[ aDeviceString ]++; m_aDeviceNameToMonitor[ aDeviceName ] = m_aMonitors.size(); m_aMonitors.push_back( DisplayMonitor( aDeviceString, - Rectangle() ) ); + tools::Rectangle() ) ); } } HDC aDesktopRC = GetDC( nullptr ); @@ -159,10 +159,10 @@ unsigned int WinSalSystem::GetDisplayBuiltInScreen() return m_nPrimary; } -Rectangle WinSalSystem::GetDisplayScreenPosSizePixel( unsigned int nScreen ) +tools::Rectangle WinSalSystem::GetDisplayScreenPosSizePixel( unsigned int nScreen ) { initMonitors(); - return (nScreen < m_aMonitors.size()) ? m_aMonitors[nScreen].m_aArea : Rectangle(); + return (nScreen < m_aMonitors.size()) ? m_aMonitors[nScreen].m_aArea : tools::Rectangle(); } int WinSalSystem::ShowNativeMessageBox(const OUString& rTitle, const OUString& rMessage) diff --git a/vcl/win/gdi/salfont.cxx b/vcl/win/gdi/salfont.cxx index 65b828ad5fa2..aa3eac7c56a5 100644 --- a/vcl/win/gdi/salfont.cxx +++ b/vcl/win/gdi/salfont.cxx @@ -1346,7 +1346,7 @@ void WinSalGraphics::ClearDevFontCache() //anything to do here ? } -bool WinSalGraphics::GetGlyphBoundRect(const GlyphItem& rGlyph, Rectangle& rRect) +bool WinSalGraphics::GetGlyphBoundRect(const GlyphItem& rGlyph, tools::Rectangle& rRect) { HDC hDC = getHDC(); @@ -1365,7 +1365,7 @@ bool WinSalGraphics::GetGlyphBoundRect(const GlyphItem& rGlyph, Rectangle& rRect if( nSize == GDI_ERROR ) return false; - rRect = Rectangle( Point( +aGM.gmptGlyphOrigin.x, -aGM.gmptGlyphOrigin.y ), + rRect = tools::Rectangle( Point( +aGM.gmptGlyphOrigin.x, -aGM.gmptGlyphOrigin.y ), Size( aGM.gmBlackBoxX, aGM.gmBlackBoxY ) ); rRect.Right() += 1; rRect.Bottom() += 1; @@ -1683,7 +1683,7 @@ bool WinSalGraphics::CreateFontSubset( const OUString& rToFile, rInfo.m_aPSName = ImplSalGetUniString( aTTInfo.psname ); rInfo.m_nAscent = aTTInfo.winAscent; rInfo.m_nDescent = aTTInfo.winDescent; - rInfo.m_aFontBBox = Rectangle( Point( aTTInfo.xMin, aTTInfo.yMin ), + rInfo.m_aFontBBox = tools::Rectangle( Point( aTTInfo.xMin, aTTInfo.yMin ), Point( aTTInfo.xMax, aTTInfo.yMax ) ); rInfo.m_nCapHeight = aTTInfo.yMax; // Well ... diff --git a/vcl/win/gdi/salnativewidgets-luna.cxx b/vcl/win/gdi/salnativewidgets-luna.cxx index 0c5e80253e05..b0ea1a9b275d 100644 --- a/vcl/win/gdi/salnativewidgets-luna.cxx +++ b/vcl/win/gdi/salnativewidgets-luna.cxx @@ -335,7 +335,7 @@ bool WinSalGraphics::IsNativeControlSupported( ControlType nType, ControlPart nP bool WinSalGraphics::hitTestNativeControl( ControlType, ControlPart, - const Rectangle&, + const tools::Rectangle&, const Point&, bool& ) { @@ -358,19 +358,19 @@ bool ImplDrawTheme( HTHEME hTheme, HDC hDC, int iPart, int iState, RECT rc, cons return (hr == S_OK); } -Rectangle ImplGetThemeRect( HTHEME hTheme, HDC hDC, int iPart, int iState, const Rectangle& /* aRect */, THEMESIZE eTS = TS_TRUE ) +tools::Rectangle ImplGetThemeRect( HTHEME hTheme, HDC hDC, int iPart, int iState, const tools::Rectangle& /* aRect */, THEMESIZE eTS = TS_TRUE ) { SIZE aSz; HRESULT hr = vsAPI.GetThemePartSize( hTheme, hDC, iPart, iState, nullptr, eTS, &aSz ); // TS_TRUE returns optimal size if( hr == S_OK ) - return Rectangle( 0, 0, aSz.cx, aSz.cy ); + return tools::Rectangle( 0, 0, aSz.cx, aSz.cy ); else - return Rectangle(); + return tools::Rectangle(); } // Helper functions -void ImplConvertSpinbuttonValues( ControlPart nControlPart, const ControlState& rState, const Rectangle& rRect, +void ImplConvertSpinbuttonValues( ControlPart nControlPart, const ControlState& rState, const tools::Rectangle& rRect, int* pLunaPart, int *pLunaState, RECT *pRect ) { if( nControlPart == ControlPart::ButtonDown ) @@ -1001,7 +1001,7 @@ bool ImplDrawNativeControl( HDC hDC, HTHEME hTheme, RECT rc, iPart = (nPart == ControlPart::TrackHorzArea) ? TKP_TRACK : TKP_TRACKVERT; iState = (nPart == ControlPart::TrackHorzArea) ? static_cast<int>(TRS_NORMAL) : static_cast<int>(TRVS_NORMAL); - Rectangle aTrackRect = ImplGetThemeRect( hTheme, hDC, iPart, iState, Rectangle() ); + tools::Rectangle aTrackRect = ImplGetThemeRect( hTheme, hDC, iPart, iState, tools::Rectangle() ); RECT aTRect = rc; if( nPart == ControlPart::TrackHorzArea ) { @@ -1120,8 +1120,8 @@ bool ImplDrawNativeControl( HDC hDC, HTHEME hTheme, RECT rc, rc.right -= aValue.getNumericVal()+1; else rc.left += aValue.getNumericVal()+1; - Rectangle aRect( ImplGetThemeRect( hTheme, hDC, - MENU_POPUPSEPARATOR, 0, Rectangle( rc.left, rc.top, rc.right, rc.bottom ) ) ); + tools::Rectangle aRect( ImplGetThemeRect( hTheme, hDC, + MENU_POPUPSEPARATOR, 0, tools::Rectangle( rc.left, rc.top, rc.right, rc.bottom ) ) ); // center the separator inside the passed rectangle long nDY = ((rc.bottom - rc.top + 1) - aRect.GetHeight()) / 2; rc.top += nDY; @@ -1136,7 +1136,7 @@ bool ImplDrawNativeControl( HDC hDC, HTHEME hTheme, RECT rc, bool WinSalGraphics::drawNativeControl( ControlType nType, ControlPart nPart, - const Rectangle& rControlRegion, + const tools::Rectangle& rControlRegion, ControlState nState, const ImplControlValue& aValue, const OUString& aCaption ) @@ -1144,8 +1144,8 @@ bool WinSalGraphics::drawNativeControl( ControlType nType, bool bOk = false; HTHEME hTheme = nullptr; - Rectangle buttonRect = rControlRegion; - Rectangle cacheRect = rControlRegion; + tools::Rectangle buttonRect = rControlRegion; + tools::Rectangle cacheRect = rControlRegion; Size keySize = cacheRect.GetSize(); WinOpenGLSalGraphicsImpl* pImpl = dynamic_cast<WinOpenGLSalGraphicsImpl*>(mpImpl.get()); @@ -1153,8 +1153,8 @@ bool WinSalGraphics::drawNativeControl( ControlType nType, // tdf#95618 - A few controls render outside the region they're given. if (pImpl && nType == ControlType::TabItem) { - Rectangle rNativeBoundingRegion; - Rectangle rNativeContentRegion; + tools::Rectangle rNativeBoundingRegion; + tools::Rectangle rNativeContentRegion; if (getNativeControlRegion(nType, nPart, rControlRegion, nState, aValue, aCaption, rNativeBoundingRegion, rNativeContentRegion)) { @@ -1296,12 +1296,12 @@ bool WinSalGraphics::drawNativeControl( ControlType nType, bool WinSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPart, - const Rectangle& rControlRegion, + const tools::Rectangle& rControlRegion, ControlState nState, const ImplControlValue& rControlValue, const OUString&, - Rectangle &rNativeBoundingRegion, - Rectangle &rNativeContentRegion ) + tools::Rectangle &rNativeBoundingRegion, + tools::Rectangle &rNativeContentRegion ) { bool bRet = FALSE; @@ -1320,11 +1320,11 @@ bool WinSalGraphics::getNativeControlRegion( ControlType nType, HTHEME hTheme = getThemeHandle( mhWnd, L"Rebar"); if( hTheme ) { - Rectangle aRect( ImplGetThemeRect( hTheme, hDC, nPart == ControlPart::ThumbHorz ? RP_GRIPPERVERT : RP_GRIPPER, + tools::Rectangle aRect( ImplGetThemeRect( hTheme, hDC, nPart == ControlPart::ThumbHorz ? RP_GRIPPERVERT : RP_GRIPPER, 0, rControlRegion.GetBoundRect() ) ); if( nPart == ControlPart::ThumbHorz && !aRect.IsEmpty() ) { - Rectangle aVertRect( 0, 0, aRect.getHeight(), aRect.getWidth() ); + tools::Rectangle aVertRect( 0, 0, aRect.getHeight(), aRect.getWidth() ); rNativeContentRegion = aVertRect; } else @@ -1340,7 +1340,7 @@ bool WinSalGraphics::getNativeControlRegion( ControlType nType, HTHEME hTheme = getThemeHandle( mhWnd, L"Toolbar"); if( hTheme ) { - Rectangle aRect( ImplGetThemeRect( hTheme, hDC, TP_SPLITBUTTONDROPDOWN, + tools::Rectangle aRect( ImplGetThemeRect( hTheme, hDC, TP_SPLITBUTTONDROPDOWN, TS_HOT, rControlRegion ) ); rNativeContentRegion = aRect; rNativeBoundingRegion = rNativeContentRegion; @@ -1354,7 +1354,7 @@ bool WinSalGraphics::getNativeControlRegion( ControlType nType, HTHEME hTheme = getThemeHandle( mhWnd, L"Progress"); if( hTheme ) { - Rectangle aRect( ImplGetThemeRect( hTheme, hDC, PP_BAR, + tools::Rectangle aRect( ImplGetThemeRect( hTheme, hDC, PP_BAR, 0, rControlRegion ) ); rNativeContentRegion = aRect; rNativeBoundingRegion = rNativeContentRegion; @@ -1367,8 +1367,8 @@ bool WinSalGraphics::getNativeControlRegion( ControlType nType, HTHEME hTheme = getThemeHandle( mhWnd, L"Combobox"); if( hTheme ) { - Rectangle aBoxRect( rControlRegion ); - Rectangle aRect( ImplGetThemeRect( hTheme, hDC, CP_DROPDOWNBUTTON, + tools::Rectangle aBoxRect( rControlRegion ); + tools::Rectangle aRect( ImplGetThemeRect( hTheme, hDC, CP_DROPDOWNBUTTON, CBXS_NORMAL, aBoxRect ) ); if( aRect.GetHeight() > aBoxRect.GetHeight() ) aBoxRect.Bottom() = aBoxRect.Top() + aRect.GetHeight(); @@ -1387,8 +1387,8 @@ bool WinSalGraphics::getNativeControlRegion( ControlType nType, if( hTheme ) { // get border size - Rectangle aBoxRect( rControlRegion ); - Rectangle aRect( ImplGetThemeRect( hTheme, hDC, EP_BACKGROUNDWITHBORDER, + tools::Rectangle aBoxRect( rControlRegion ); + tools::Rectangle aRect( ImplGetThemeRect( hTheme, hDC, EP_BACKGROUNDWITHBORDER, EBWBS_HOT, aBoxRect ) ); // ad app font height NONCLIENTMETRICSW aNonClientMetrics; @@ -1423,8 +1423,8 @@ bool WinSalGraphics::getNativeControlRegion( ControlType nType, nPart == ControlPart::MenuItemRadioMark ) { HTHEME hTheme = getThemeHandle( mhWnd, L"Menu"); - Rectangle aBoxRect( rControlRegion ); - Rectangle aRect( ImplGetThemeRect( hTheme, hDC, + tools::Rectangle aBoxRect( rControlRegion ); + tools::Rectangle aRect( ImplGetThemeRect( hTheme, hDC, MENU_POPUPCHECK, MC_CHECKMARKNORMAL, aBoxRect ) ); @@ -1445,11 +1445,11 @@ bool WinSalGraphics::getNativeControlRegion( ControlType nType, { int iPart = (nPart == ControlPart::ThumbHorz) ? TKP_THUMB : TKP_THUMBVERT; int iState = (nPart == ControlPart::ThumbHorz) ? static_cast<int>(TUS_NORMAL) : static_cast<int>(TUVS_NORMAL); - Rectangle aThumbRect = ImplGetThemeRect( hTheme, hDC, iPart, iState, Rectangle() ); + tools::Rectangle aThumbRect = ImplGetThemeRect( hTheme, hDC, iPart, iState, tools::Rectangle() ); if( nPart == ControlPart::ThumbHorz ) { long nW = aThumbRect.GetWidth(); - Rectangle aRect( rControlRegion ); + tools::Rectangle aRect( rControlRegion ); aRect.Right() = aRect.Left() + nW - 1; rNativeContentRegion = aRect; rNativeBoundingRegion = rNativeContentRegion; @@ -1457,7 +1457,7 @@ bool WinSalGraphics::getNativeControlRegion( ControlType nType, else { long nH = aThumbRect.GetHeight(); - Rectangle aRect( rControlRegion ); + tools::Rectangle aRect( rControlRegion ); aRect.Bottom() = aRect.Top() + nH - 1; rNativeContentRegion = aRect; rNativeBoundingRegion = rNativeContentRegion; @@ -1468,7 +1468,7 @@ bool WinSalGraphics::getNativeControlRegion( ControlType nType, if ( ( nType == ControlType::TabItem ) && ( nPart == ControlPart::Entire ) ) { - Rectangle aControlRect( rControlRegion ); + tools::Rectangle aControlRect( rControlRegion ); rNativeContentRegion = aControlRect; --aControlRect.Bottom(); diff --git a/vcl/win/gdi/winlayout.cxx b/vcl/win/gdi/winlayout.cxx index b41ad598acbb..3f12664b8d96 100644 --- a/vcl/win/gdi/winlayout.cxx +++ b/vcl/win/gdi/winlayout.cxx @@ -80,7 +80,7 @@ bool WinFontInstance::CacheGlyphToAtlas(HDC hDC, HFONT hFont, int nGlyphIndex, S std::vector<WORD> aGlyphIndices(1); aGlyphIndices[0] = nGlyphIndex; // Fetch the ink boxes and calculate the size of the atlas. - Rectangle bounds(0, 0, 0, 0); + tools::Rectangle bounds(0, 0, 0, 0); auto aInkBoxes = pTxt->GetGlyphInkBoxes(aGlyphIndices.data(), aGlyphIndices.data() + 1); for (auto &box : aInkBoxes) bounds.Union(box + Point(bounds.Right(), 0)); @@ -142,7 +142,7 @@ bool WinFontInstance::CacheGlyphToAtlas(HDC hDC, HFONT hFont, int nGlyphIndex, S aDC.fill(MAKE_SALCOLOR(0xff, 0xff, 0xff)); - pTxt->BindDC(aDC.getCompatibleHDC(), Rectangle(0, 0, nBitmapWidth, nBitmapHeight)); + pTxt->BindDC(aDC.getCompatibleHDC(), tools::Rectangle(0, 0, nBitmapWidth, nBitmapHeight)); auto pRT = pTxt->GetRenderTarget(); ID2D1SolidColorBrush* pBrush = nullptr; @@ -353,7 +353,7 @@ bool D2DWriteTextOutRenderer::operator ()(CommonSalLayout const &rLayout, return ExTextOutRenderer()(rLayout, rGraphics, hDC); } - Rectangle bounds; + tools::Rectangle bounds; bool succeeded = rLayout.GetBoundRect(rGraphics, bounds); succeeded &= BindDC(hDC, bounds); // Update the bounding rect. @@ -435,19 +435,19 @@ bool D2DWriteTextOutRenderer::ReleaseFont() // The inkboxes returned have their origin on the baseline, to a -ve value // of Top() means the glyph extends abs(Top()) many pixels above the // baseline, and +ve means the ink starts that many pixels below. -std::vector<Rectangle> D2DWriteTextOutRenderer::GetGlyphInkBoxes(uint16_t * pGid, uint16_t * pGidEnd) const +std::vector<tools::Rectangle> D2DWriteTextOutRenderer::GetGlyphInkBoxes(uint16_t * pGid, uint16_t * pGidEnd) const { ptrdiff_t nGlyphs = pGidEnd - pGid; - if (nGlyphs < 0) return std::vector<Rectangle>(); + if (nGlyphs < 0) return std::vector<tools::Rectangle>(); DWRITE_FONT_METRICS aFontMetrics; mpFontFace->GetMetrics(&aFontMetrics); std::vector<DWRITE_GLYPH_METRICS> metrics(nGlyphs); if (!SUCCEEDED(mpFontFace->GetDesignGlyphMetrics(pGid, nGlyphs, metrics.data()))) - return std::vector<Rectangle>(); + return std::vector<tools::Rectangle>(); - std::vector<Rectangle> aOut(nGlyphs); + std::vector<tools::Rectangle> aOut(nGlyphs); auto pOut = aOut.begin(); for (auto &m : metrics) { @@ -566,7 +566,7 @@ bool WinSalGraphics::DrawCachedGlyphs(const CommonSalLayout& rLayout) { HDC hDC = getHDC(); - Rectangle aRect; + tools::Rectangle aRect; rLayout.GetBoundRect(*this, aRect); COLORREF color = GetTextColor(hDC); @@ -657,7 +657,7 @@ void WinSalGraphics::DrawTextLayout(const CommonSalLayout& rLayout) // TODO: check the performance of this 2nd approach at some stage and // switch to that if it performs well. - Rectangle aRect; + tools::Rectangle aRect; rLayout.GetBoundRect(*this, aRect); WinOpenGLSalGraphicsImpl *pImpl = dynamic_cast<WinOpenGLSalGraphicsImpl*>(mpImpl.get()); diff --git a/vcl/win/window/salframe.cxx b/vcl/win/window/salframe.cxx index b0347461a2a2..4932ecdabdac 100644 --- a/vcl/win/window/salframe.cxx +++ b/vcl/win/window/salframe.cxx @@ -766,7 +766,7 @@ static void ImplSalCalcFullScreenSize( const WinSalFrame* pFrame, sal_Int32 nMonitors = Application::GetScreenCount(); if( (pFrame->mnDisplay >= 0) && (pFrame->mnDisplay < nMonitors) ) { - Rectangle aRect = Application::GetScreenPosSizePixel( pFrame->mnDisplay ); + tools::Rectangle aRect = Application::GetScreenPosSizePixel( pFrame->mnDisplay ); nScreenX = aRect.Left(); nScreenY = aRect.Top(); nScreenDX = aRect.getWidth()+1; // difference between java/awt convention and vcl @@ -774,7 +774,7 @@ static void ImplSalCalcFullScreenSize( const WinSalFrame* pFrame, } else { - Rectangle aCombined = Application::GetScreenPosSizePixel( 0 ); + tools::Rectangle aCombined = Application::GetScreenPosSizePixel( 0 ); for( sal_Int32 i = 1 ; i < nMonitors ; i++ ) { aCombined.Union( Application::GetScreenPosSizePixel( i ) ); @@ -1606,7 +1606,7 @@ bool WinSalFrame::SetPluginParent( SystemParentData* pNewParent ) return true; } -void WinSalFrame::GetWorkArea( Rectangle &rRect ) +void WinSalFrame::GetWorkArea( tools::Rectangle &rRect ) { RECT aRect; ImplSalGetWorkArea( mhWnd, &aRect, nullptr ); diff --git a/vcl/workben/icontest.cxx b/vcl/workben/icontest.cxx index 32d6ae8c05fe..a321d5392dc6 100644 --- a/vcl/workben/icontest.cxx +++ b/vcl/workben/icontest.cxx @@ -76,7 +76,7 @@ public: virtual void dispose() override { mpFixedBitmap.clear(); WorkWindow::dispose(); } void LoadGraphic( const OUString& sImageFile ); - virtual void Paint( vcl::RenderContext& /*rRenderContext*/, const Rectangle& rRect ) override; + virtual void Paint( vcl::RenderContext& /*rRenderContext*/, const tools::Rectangle& rRect ) override; virtual void Resize() override; }; @@ -101,7 +101,7 @@ void MyWorkWindow::LoadGraphic( const OUString& sImageFile ) } } -void MyWorkWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) +void MyWorkWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) { std::cout << "==> Paint! " << mnPaintCount++ << " (vcl) " << GetSizePixel() << " " << getTimeNow() - mnStartTime << std::endl; diff --git a/vcl/workben/mtfdemo.cxx b/vcl/workben/mtfdemo.cxx index 3c842f9da649..6cc3b440913b 100644 --- a/vcl/workben/mtfdemo.cxx +++ b/vcl/workben/mtfdemo.cxx @@ -55,10 +55,10 @@ public: } } - virtual void Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) override; + virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) override; }; -void DemoMtfWin::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) +void DemoMtfWin::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) { maMtf.Play(this, maMtf.GetActionSize()); diff --git a/vcl/workben/outdevgrind.cxx b/vcl/workben/outdevgrind.cxx index 6c0bf652d70b..c86039c09590 100644 --- a/vcl/workben/outdevgrind.cxx +++ b/vcl/workben/outdevgrind.cxx @@ -71,7 +71,7 @@ class TestWindow : public Dialog Show(); } - virtual void Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) override; + virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) override; }; typedef std::function<void (OutputDevice*)> functor_type; @@ -95,8 +95,8 @@ void setupMethodStubs( functor_vector_type& res ) const Point aPt3(0,0); const Point aPt4(450,450); - const Rectangle aRect(aPt1,aPt2); - const Rectangle aRect2(aPt3,aPt4); + const tools::Rectangle aRect(aPt1,aPt2); + const tools::Rectangle aRect2(aPt3,aPt4); const tools::Polygon aPoly(aRect); const tools::Polygon aPoly2(aRect2); tools::PolyPolygon aPolyPoly(aPoly); @@ -614,7 +614,7 @@ void outDevGrind(vcl::RenderContext& rTarget) functor_vector_type aMethods; setupMethodStubs( aMethods ); - const Rectangle aClipRect(10,10,1000,1000); + const tools::Rectangle aClipRect(10,10,1000,1000); const tools::Polygon aPoly1( aClipRect ); tools::Polygon aPoly2( aClipRect ); aPoly2.Rotate(aClipRect.Center(),450); @@ -665,7 +665,7 @@ void outDevGrind(vcl::RenderContext& rTarget) } } -void TestWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangle&) +void TestWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&) { outDevGrind(rRenderContext); fflush(stdout); diff --git a/vcl/workben/svptest.cxx b/vcl/workben/svptest.cxx index 24ff69d988ed..2e679bb7f756 100644 --- a/vcl/workben/svptest.cxx +++ b/vcl/workben/svptest.cxx @@ -85,7 +85,7 @@ class MyWin : public WorkWindow public: MyWin( vcl::Window* pParent, WinBits nWinStyle ); - virtual void Paint( vcl::RenderContext& /*rRenderContext*/, const Rectangle& rRect ) override; + virtual void Paint( vcl::RenderContext& /*rRenderContext*/, const tools::Rectangle& rRect ) override; }; void Main() @@ -194,7 +194,7 @@ static Color approachColor( const Color& rFrom, const Color& rTo ) } #define DELTA 5.0 -void MyWin::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) +void MyWin::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) { WorkWindow::Paint(rRenderContext, rRect); @@ -209,14 +209,14 @@ void MyWin::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) Point aP1(aPaperSize.Width() / 48, 0), aP2(aPaperSize.Width() / 40, 0); Point aPoint; - rRenderContext.DrawRect(Rectangle(Point(0, 0), aPaperSize)); - rRenderContext.DrawRect(Rectangle(Point(100, 100), + rRenderContext.DrawRect(tools::Rectangle(Point(0, 0), aPaperSize)); + rRenderContext.DrawRect(tools::Rectangle(Point(100, 100), Size(aPaperSize.Width() - 200, aPaperSize.Height() - 200))); - rRenderContext.DrawRect(Rectangle(Point(200, 200), + rRenderContext.DrawRect(tools::Rectangle(Point(200, 200), Size(aPaperSize.Width() - 400, aPaperSize.Height() - 400))); - rRenderContext.DrawRect(Rectangle(Point(300, 300), + rRenderContext.DrawRect(tools::Rectangle(Point(300, 300), Size(aPaperSize.Width() - 600, aPaperSize.Height() - 600))); @@ -240,14 +240,14 @@ void MyWin::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) aPrintText.append( "SVP test program" ); - rRenderContext.DrawText(Rectangle(Point((aPaperSize.Width() - 4000) / 2, 2000), + rRenderContext.DrawText(tools::Rectangle(Point((aPaperSize.Width() - 4000) / 2, 2000), Size(aPaperSize.Width() - 2100 - nMaxWidth, aPaperSize.Height() - 4000)), aPrintText.makeStringAndClear(), DrawTextFlags::MultiLine); } rRenderContext.SetFillColor(); - DrawRect(Rectangle(Point(aPaperSize.Width() - 4000, 1000), + DrawRect(tools::Rectangle(Point(aPaperSize.Width() - 4000, 1000), Size(3000, 3000))); rRenderContext.DrawBitmap(Point(aPaperSize.Width() - 4000, 1000), Size( 3000,3000 ), @@ -264,22 +264,22 @@ void MyWin::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) Gradient aGradient(GradientStyle::Linear, aBlack, aWhite); aGradient.SetAngle(900); - rRenderContext.DrawGradient(Rectangle(Point(1000, 4500), + rRenderContext.DrawGradient(tools::Rectangle(Point(1000, 4500), Size(aPaperSize.Width() - 2000, 500)), aGradient); aGradient.SetStartColor(aDarkRed); aGradient.SetEndColor(aLightBlue); - rRenderContext.DrawGradient(Rectangle(Point(1000, 5300), + rRenderContext.DrawGradient(tools::Rectangle(Point(1000, 5300), Size(aPaperSize.Width() - 2000, 500)), aGradient); aGradient.SetStartColor(aDarkBlue); aGradient.SetEndColor(aLightGreen); - rRenderContext.DrawGradient(Rectangle(Point(1000, 6100), + rRenderContext.DrawGradient(tools::Rectangle(Point(1000, 6100), Size(aPaperSize.Width() - 2000, 500)), aGradient); aGradient.SetStartColor(aDarkGreen); aGradient.SetEndColor(aLightRed); - rRenderContext.DrawGradient(Rectangle(Point(1000, 6900), + rRenderContext.DrawGradient(tools::Rectangle(Point(1000, 6900), Size(aPaperSize.Width() - 2000, 500)), aGradient); diff --git a/vcl/workben/vcldemo.cxx b/vcl/workben/vcldemo.cxx index 66fd7cff8316..b80ed6c5a2d8 100644 --- a/vcl/workben/vcldemo.cxx +++ b/vcl/workben/vcldemo.cxx @@ -107,7 +107,7 @@ class DemoRenderer virtual ~RegionRenderer() {} virtual OUString getName() = 0; virtual sal_uInt16 getAccelerator() = 0; - virtual void RenderRegion(OutputDevice &rDev, Rectangle r, + virtual void RenderRegion(OutputDevice &rDev, tools::Rectangle r, const RenderContext &rCtx) = 0; // repeating count for profiling (to exceed the poor time resolution on Windows) virtual sal_uInt16 getTestRepeatCount() = 0; @@ -179,24 +179,24 @@ public: bool MouseButtonDown(const MouseEvent& rMEvt); void KeyInput(const KeyEvent& rKEvt); - static std::vector<Rectangle> partition(const Rectangle &rRect, int nX, int nY) + static std::vector<tools::Rectangle> partition(const tools::Rectangle &rRect, int nX, int nY) { - std::vector<Rectangle> aRegions = partition(rRect.GetSize(), nX, nY); + std::vector<tools::Rectangle> aRegions = partition(rRect.GetSize(), nX, nY); for (auto it = aRegions.begin(); it != aRegions.end(); ++it) it->Move(rRect.Left(), rRect.Top()); return aRegions; } - static std::vector<Rectangle> partition(const RenderContext &rCtx, int nX, int nY) + static std::vector<tools::Rectangle> partition(const RenderContext &rCtx, int nX, int nY) { return partition(rCtx.maSize, nX, nY); } - static std::vector<Rectangle> partition(Size aSize, int nX, int nY) + static std::vector<tools::Rectangle> partition(Size aSize, int nX, int nY) { - Rectangle r; - std::vector<Rectangle> aRegions; + tools::Rectangle r; + std::vector<tools::Rectangle> aRegions; // Make small cleared area for these guys long nBorderSize = std::min(aSize.Height() / 32, aSize.Width() / 32); @@ -216,7 +216,7 @@ public: return aRegions; } - static void clearRects(OutputDevice &rDev, std::vector<Rectangle> &rRects) + static void clearRects(OutputDevice &rDev, std::vector<tools::Rectangle> &rRects) { for (size_t i = 0; i < rRects.size(); i++) { @@ -233,7 +233,7 @@ public: } } - static void drawBackground(OutputDevice &rDev, const Rectangle& r) + static void drawBackground(OutputDevice &rDev, const tools::Rectangle& r) { rDev.Erase(); Gradient aGradient; @@ -246,7 +246,7 @@ public: struct DrawLines : public RegionRenderer { RENDER_DETAILS(lines,KEY_L,100) - virtual void RenderRegion(OutputDevice &rDev, Rectangle r, + virtual void RenderRegion(OutputDevice &rDev, tools::Rectangle r, const RenderContext &rCtx) override { if (rCtx.meStyle == RENDER_EXPANDED) @@ -254,7 +254,7 @@ public: AntialiasingFlags nOldAA = rDev.GetAntialiasing(); rDev.SetAntialiasing(AntialiasingFlags::EnableB2dDraw); - std::vector<Rectangle> aRegions(DemoRenderer::partition(rCtx, 4, 4)); + std::vector<tools::Rectangle> aRegions(DemoRenderer::partition(rCtx, 4, 4)); DemoRenderer::clearRects(rDev, aRegions); #if 0 // FIXME: get this through to the backend ... @@ -296,7 +296,7 @@ public: }; rDev.SetLineColor(Color(COL_BLACK)); basegfx::B2DPolygon aPoly; - Rectangle aSub(aRegions[i]); + tools::Rectangle aSub(aRegions[i]); for (size_t j = 0; j < SAL_N_ELEMENTS(aPoints); j++) { aPoly.append(basegfx::B2DPoint(aSub.Left() + aSub.GetWidth() * aPoints[j].nX, @@ -334,16 +334,16 @@ public: { RENDER_DETAILS(text,KEY_T,1) - virtual void RenderRegion(OutputDevice &rDev, Rectangle r, + virtual void RenderRegion(OutputDevice &rDev, tools::Rectangle r, const RenderContext &rCtx) override { if (rCtx.meStyle == RENDER_EXPANDED) { - std::vector<Rectangle> aToplevelRegions( + std::vector<tools::Rectangle> aToplevelRegions( DemoRenderer::partition(rCtx, 1, 3)); - std::vector<Rectangle> aSubRegions( + std::vector<tools::Rectangle> aSubRegions( DemoRenderer::partition(aToplevelRegions[0], 4, 2)); - Rectangle aBottom(aToplevelRegions[1].TopLeft(), + tools::Rectangle aBottom(aToplevelRegions[1].TopLeft(), aToplevelRegions[2].BottomRight()); DemoRenderer::clearRects(rDev,aSubRegions); struct { @@ -381,7 +381,7 @@ public: } } - static void drawText (OutputDevice &rDev, Rectangle r, bool bClip, bool bArabicText, bool bRotate) + static void drawText (OutputDevice &rDev, tools::Rectangle r, bool bClip, bool bArabicText, bool bRotate) { rDev.SetClipRegion( vcl::Region(r) ); @@ -430,7 +430,7 @@ public: if (bClip && !bRotate) { // only show the first quarter of the text - Rectangle aRect( r.TopLeft(), Size( r.GetWidth()/2, r.GetHeight()/2 ) ); + tools::Rectangle aRect( r.TopLeft(), Size( r.GetWidth()/2, r.GetHeight()/2 ) ); rDev.SetClipRegion( vcl::Region( aRect ) ); } @@ -459,7 +459,7 @@ public: if (bRotate) { - Rectangle aFontRect = r; + tools::Rectangle aFontRect = r; int nHeight = r.GetHeight(); @@ -476,7 +476,7 @@ public: if (bClip) { - Rectangle aClipRect( Point( r.Left(), r.Top() + ( r.GetHeight()/2 ) ) , Size( r.GetWidth()/2, r.GetHeight()/2 ) ); + tools::Rectangle aClipRect( Point( r.Left(), r.Top() + ( r.GetHeight()/2 ) ) , Size( r.GetWidth()/2, r.GetHeight()/2 ) ); rDev.SetClipRegion( vcl::Region( aClipRect ) ); } else @@ -492,7 +492,7 @@ public: rDev.SetClipRegion(); } - static void drawComplex (OutputDevice &rDev, Rectangle r) + static void drawComplex (OutputDevice &rDev, tools::Rectangle r) { const unsigned char pInvalid[] = { 0xfe, 0x1f, 0 }; const unsigned char pDiacritic1[] = { 0x61, 0xcc, 0x8a, 0xcc, 0x8c, 0 }; @@ -558,7 +558,7 @@ public: // Legend vcl::Font aIndexFont("sans", Size(0,20)); aIndexFont.SetColor(COL_BLACK); - Rectangle aTextRect; + tools::Rectangle aTextRect; rDev.SetFont(aIndexFont); OUString aText = OUString::number(i) + "."; rDev.DrawText(aPos, aText); @@ -613,7 +613,7 @@ public: { rDev.Push(); { - Rectangle aTextRect; + tools::Rectangle aTextRect; rDev.DrawText(aPos,aText); @@ -626,7 +626,7 @@ public: if (aTextRect.GetHeight() > nMaxTextHeight) nMaxTextHeight = aTextRect.GetHeight(); // This should intersect with the text - Rectangle aInnerRect( + tools::Rectangle aInnerRect( aTextRect.Left()+1, aTextRect.Top()+1, aTextRect.Right()-1, aTextRect.Bottom()-1); rDev.SetLineColor(COL_WHITE); @@ -661,17 +661,17 @@ public: struct DrawCheckered : public RegionRenderer { RENDER_DETAILS(checks,KEY_C,20) - virtual void RenderRegion(OutputDevice &rDev, Rectangle r, + virtual void RenderRegion(OutputDevice &rDev, tools::Rectangle r, const RenderContext &rCtx) override { if (rCtx.meStyle == RENDER_EXPANDED) { - std::vector<Rectangle> aRegions(DemoRenderer::partition(rCtx, 2, 2)); + std::vector<tools::Rectangle> aRegions(DemoRenderer::partition(rCtx, 2, 2)); for (size_t i = 0; i < aRegions.size(); i++) { vcl::Region aRegion; - Rectangle aSub(aRegions[i]); - Rectangle aSmaller(aSub); + tools::Rectangle aSub(aRegions[i]); + tools::Rectangle aSmaller(aSub); aSmaller.Move(10,10); aSmaller.setWidth(aSmaller.getWidth()-20); aSmaller.setHeight(aSmaller.getHeight()-24); @@ -696,7 +696,7 @@ public: tools::PolyPolygon aPolyPoly; sal_Int32 nTW = aSub.GetWidth()/6; sal_Int32 nTH = aSub.GetHeight()/6; - Rectangle aTiny(Point(4, 4), Size(nTW*2, nTH*2)); + tools::Rectangle aTiny(Point(4, 4), Size(nTW*2, nTH*2)); aPolyPoly.Insert( tools::Polygon(aTiny)); aTiny.Move(nTW*3, nTH*3); aPolyPoly.Insert( tools::Polygon(aTiny)); @@ -723,14 +723,14 @@ public: { RENDER_DETAILS(poly,KEY_P,20) DrawCheckered maCheckered; - virtual void RenderRegion(OutputDevice &rDev, Rectangle r, + virtual void RenderRegion(OutputDevice &rDev, tools::Rectangle r, const RenderContext &rCtx) override { maCheckered.RenderRegion(rDev, r, rCtx); long nDx = r.GetWidth()/20; long nDy = r.GetHeight()/20; - Rectangle aShrunk(r); + tools::Rectangle aShrunk(r); aShrunk.Move(nDx, nDy); aShrunk.SetSize(Size(r.GetWidth()-nDx*2, r.GetHeight()-nDy*2)); @@ -746,17 +746,17 @@ public: struct DrawEllipse : public RegionRenderer { RENDER_DETAILS(ellipse,KEY_E,500) - static void doInvert(OutputDevice &rDev, const Rectangle &r, + static void doInvert(OutputDevice &rDev, const tools::Rectangle &r, InvertFlags nFlags) { rDev.Invert(r, nFlags); if (r.GetWidth() > 10 && r.GetHeight() > 10) { - Rectangle aSmall(r.Center()-Point(4,4), Size(8,8)); + tools::Rectangle aSmall(r.Center()-Point(4,4), Size(8,8)); rDev.Invert(aSmall,nFlags); } } - virtual void RenderRegion(OutputDevice &rDev, Rectangle r, + virtual void RenderRegion(OutputDevice &rDev, tools::Rectangle r, const RenderContext &rCtx) override { rDev.SetLineColor(Color(COL_RED)); @@ -777,12 +777,12 @@ public: struct DrawGradient : public RegionRenderer { RENDER_DETAILS(gradient,KEY_G,50) - virtual void RenderRegion(OutputDevice &rDev, Rectangle r, + virtual void RenderRegion(OutputDevice &rDev, tools::Rectangle r, const RenderContext &rCtx) override { if (rCtx.meStyle == RENDER_EXPANDED) { - std::vector<Rectangle> aRegions(DemoRenderer::partition(rCtx,5, 4)); + std::vector<tools::Rectangle> aRegions(DemoRenderer::partition(rCtx,5, 4)); sal_uInt32 nStartCols[] = { COL_RED, COL_RED, COL_RED, COL_GREEN, COL_GREEN, COL_BLUE, COL_BLUE, COL_BLUE, COL_CYAN, COL_CYAN, @@ -822,7 +822,7 @@ public: assert(aRegions.size() <= SAL_N_ELEMENTS(nBorders)); for (size_t i = 0; i < aRegions.size(); i++) { - Rectangle aSub = aRegions[i]; + tools::Rectangle aSub = aRegions[i]; Gradient aGradient; aGradient.SetStartColor(Color(nStartCols[i])); aGradient.SetEndColor(Color(nEndCols[i])); @@ -850,14 +850,14 @@ public: // Simulate Page Borders rendering - which ultimately should // be done with a shader / gradient - static void SimulateBorderStretch(OutputDevice &rDev, const Rectangle& r) + static void SimulateBorderStretch(OutputDevice &rDev, const tools::Rectangle& r) { BitmapEx aPageShadowMask("sw/res/page-shadow-mask.png"); BitmapEx aRight(aPageShadowMask); sal_Int32 nSlice = (aPageShadowMask.GetSizePixel().Width() - 3) / 4; // a width x 1 slice - aRight.Crop(Rectangle(Point((nSlice * 3) + 3, (nSlice * 2) + 1), + aRight.Crop(tools::Rectangle(Point((nSlice * 3) + 3, (nSlice * 2) + 1), Size(nSlice, 1))); AlphaMask aAlphaMask(aRight.GetBitmap()); Bitmap aBlockColor = Bitmap(aAlphaMask.GetSizePixel(), 24); @@ -888,12 +888,12 @@ public: // An offset background for alpha rendering rDev.SetFillColor(COL_BLUE); - Rectangle aSurround(r.Center(), Size(aPageShadowMask.GetSizePixel())); + tools::Rectangle aSurround(r.Center(), Size(aPageShadowMask.GetSizePixel())); rDev.DrawRect(aSurround); rDev.DrawBitmapEx(aRenderPt, aWhole); } - virtual void RenderRegion(OutputDevice &rDev, Rectangle r, + virtual void RenderRegion(OutputDevice &rDev, tools::Rectangle r, const RenderContext &rCtx) override { Bitmap aBitmap(rCtx.mpDemoRenderer->maIntroBW); @@ -908,7 +908,7 @@ public: { RENDER_DETAILS(bitmapex,KEY_X,2) DrawCheckered maCheckered; - virtual void RenderRegion(OutputDevice &rDev, Rectangle r, + virtual void RenderRegion(OutputDevice &rDev, tools::Rectangle r, const RenderContext &rCtx) override { maCheckered.RenderRegion(rDev, r, rCtx); @@ -925,7 +925,7 @@ public: struct DrawPolyPolygons : public RegionRenderer { RENDER_DETAILS(polypoly,KEY_N,100) - virtual void RenderRegion(OutputDevice &rDev, Rectangle r, + virtual void RenderRegion(OutputDevice &rDev, tools::Rectangle r, const RenderContext &) override { struct { @@ -946,7 +946,7 @@ public: { for (int y = 0; y < 2; y++) { - Rectangle aSubRect(r); + tools::Rectangle aSubRect(r); aSubRect.Move(x * r.GetWidth()/3, y * r.GetHeight()/3); aSubRect.SetSize(Size(r.GetWidth()/2, r.GetHeight()/4)); tools::Polygon aPoly(SAL_N_ELEMENTS(aPoints)); @@ -976,17 +976,17 @@ public: struct DrawClipped : public RegionRenderer { RENDER_DETAILS(clip,KEY_D,10) - virtual void RenderRegion(OutputDevice &rDev, Rectangle r, + virtual void RenderRegion(OutputDevice &rDev, tools::Rectangle r, const RenderContext &) override { - std::vector<Rectangle> aRegions(DemoRenderer::partition(r, 2, 2)); + std::vector<tools::Rectangle> aRegions(DemoRenderer::partition(r, 2, 2)); const int nLimits[] = { 4, -100 }; for (int i = 0; i < 2; ++i) { sal_uInt16 nHue = 0; rDev.Push(PushFlags::CLIPREGION); - Rectangle aOuter = aRegions[i]; - Rectangle aInner = aOuter; + tools::Rectangle aOuter = aRegions[i]; + tools::Rectangle aInner = aOuter; while (aInner.GetWidth() > nLimits[i] && aInner.GetHeight() > nLimits[i]) { aInner.expand(-1); @@ -1000,8 +1000,8 @@ public: { sal_uInt16 nHue = 0; - Rectangle aOuter = aRegions[2]; - std::vector<Rectangle> aPieces(DemoRenderer::partition(aOuter, 2, 2)); + tools::Rectangle aOuter = aRegions[2]; + std::vector<tools::Rectangle> aPieces(DemoRenderer::partition(aOuter, 2, 2)); for (int j = 0; j < std::min(aOuter.GetWidth(), aOuter.GetHeight())/5; ++j) { rDev.Push(PushFlags::CLIPREGION); @@ -1025,8 +1025,8 @@ public: { sal_uInt16 nHue = 0; - Rectangle aOuter = aRegions[3]; - std::vector<Rectangle> aPieces(DemoRenderer::partition(aOuter, 2, 2)); + tools::Rectangle aOuter = aRegions[3]; + std::vector<tools::Rectangle> aPieces(DemoRenderer::partition(aOuter, 2, 2)); bool bDone = false; for (int j = 0; !bDone; ++j) { @@ -1088,7 +1088,7 @@ public: RENDER_AS_ALPHA_OUTDEV }; - static void SizeAndRender(OutputDevice &rDev, const Rectangle& r, RenderType eType, + static void SizeAndRender(OutputDevice &rDev, const tools::Rectangle& r, RenderType eType, const RenderContext &rCtx) { ScopedVclPtr<VirtualDevice> pNested; @@ -1099,7 +1099,7 @@ public: pNested = VclPtr<VirtualDevice>::Create(rDev,DeviceFormat::DEFAULT,DeviceFormat::DEFAULT).get(); pNested->SetOutputSizePixel(r.GetSize()); - Rectangle aWhole(Point(0,0), r.GetSize()); + tools::Rectangle aWhole(Point(0,0), r.GetSize()); // mini me rCtx.mpDemoRenderer->drawToDevice(*pNested, r.GetSize(), true); @@ -1122,7 +1122,7 @@ public: *pNested); } } - virtual void RenderRegion(OutputDevice &rDev, Rectangle r, + virtual void RenderRegion(OutputDevice &rDev, tools::Rectangle r, const RenderContext &rCtx) override { // avoid infinite recursion @@ -1131,7 +1131,7 @@ public: if (rCtx.meStyle == RENDER_EXPANDED) { - std::vector<Rectangle> aRegions(DemoRenderer::partition(rCtx,2, 2)); + std::vector<tools::Rectangle> aRegions(DemoRenderer::partition(rCtx,2, 2)); DemoRenderer::clearRects(rDev, aRegions); RenderType eRenderTypes[] = { RENDER_AS_BITMAP, RENDER_AS_OUTDEV, @@ -1148,7 +1148,7 @@ public: { RENDER_DETAILS(xor,KEY_X,1) - virtual void RenderRegion(OutputDevice &rDev, Rectangle r, + virtual void RenderRegion(OutputDevice &rDev, tools::Rectangle r, const RenderContext &rCtx) override { // avoid infinite recursion @@ -1228,7 +1228,7 @@ public: } } - void doDrawIcons(OutputDevice &rDev, Rectangle r, bool bExpanded) + void doDrawIcons(OutputDevice &rDev, tools::Rectangle r, bool bExpanded) { long nMaxH = 0; Point p(r.LeftCenter()); @@ -1363,7 +1363,7 @@ public: return BitmapEx(aRecovered, aMask); } - virtual void RenderRegion(OutputDevice &rDev, Rectangle r, + virtual void RenderRegion(OutputDevice &rDev, tools::Rectangle r, const RenderContext &rCtx) override { if (rCtx.meStyle == RENDER_EXPANDED) @@ -1424,7 +1424,7 @@ public: struct FetchDrawBitmap : public RegionRenderer { RENDER_DETAILS(fetchdraw,KEY_F,50) - virtual void RenderRegion(OutputDevice &rDev, Rectangle r, + virtual void RenderRegion(OutputDevice &rDev, tools::Rectangle r, const RenderContext &) override { Bitmap aBitmap(rDev.GetBitmap(Point(0,0),rDev.GetOutputSizePixel())); @@ -1433,14 +1433,14 @@ public: } }; - void drawThumbs(vcl::RenderContext& rDev, Rectangle aRect, bool bVDev) + void drawThumbs(vcl::RenderContext& rDev, tools::Rectangle aRect, bool bVDev) { RenderContext aCtx; aCtx.meStyle = RENDER_THUMB; aCtx.mbVDev = bVDev; aCtx.mpDemoRenderer = this; aCtx.maSize = aRect.GetSize(); - std::vector<Rectangle> aRegions(partition(aRect, mnSegmentsX, mnSegmentsY)); + std::vector<tools::Rectangle> aRegions(partition(aRect, mnSegmentsX, mnSegmentsY)); DemoRenderer::clearRects(rDev, aRegions); for (size_t i = 0; i < maRenderers.size(); i++) { @@ -1474,7 +1474,7 @@ public: aCtx.mbVDev = bVDev; aCtx.mpDemoRenderer = this; aCtx.maSize = aSize; - Rectangle aWholeWin(Point(0,0), rDev.GetOutputSizePixel()); + tools::Rectangle aWholeWin(Point(0,0), rDev.GetOutputSizePixel()); drawBackground(rDev, aWholeWin); @@ -1578,7 +1578,7 @@ bool DemoRenderer::MouseButtonDown(const MouseEvent& rMEvt) } // click on a region to zoom into it - std::vector<Rectangle> aRegions(partition(GetSizePixel(), mnSegmentsX, mnSegmentsY)); + std::vector<tools::Rectangle> aRegions(partition(GetSizePixel(), mnSegmentsX, mnSegmentsY)); for (size_t i = 0; i < aRegions.size(); i++) { if (aRegions[i].IsInside(rMEvt.GetPosPixel())) @@ -1782,7 +1782,7 @@ public: mrRenderer.SetSizePixel(GetSizePixel()); mrRenderer.KeyInput(rKEvt); } - virtual void Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) override + virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) override { mrRenderer.SetSizePixel(GetSizePixel()); fprintf(stderr, "DemoWin::Paint(%ld,%ld,%ld,%ld)\n", rRect.getX(), rRect.getY(), rRect.getWidth(), rRect.getHeight()); @@ -1894,11 +1894,11 @@ public: mpBar.disposeAndClear(); WorkWindow::dispose(); } - virtual void Paint(vcl::RenderContext& rRenderContext, const Rectangle&) override + virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&) override { - Rectangle aWholeSize(Point(0, 0),GetOutputSizePixel()); + tools::Rectangle aWholeSize(Point(0, 0),GetOutputSizePixel()); vcl::Region aClip(aWholeSize); - Rectangle aExclude(Rectangle(Point(50,50),Size(100,100))); + tools::Rectangle aExclude(tools::Rectangle(Point(50,50),Size(100,100))); aClip.Exclude(aExclude); Wallpaper aWallpaper(COL_GREEN); @@ -1912,7 +1912,7 @@ public: pDev->EnableRTL(IsRTLEnabled()); pDev->SetOutputSizePixel(aExclude.GetSize()); - Rectangle aSubRect(aWholeSize); + tools::Rectangle aSubRect(aWholeSize); aSubRect.Move(-aExclude.Left(), -aExclude.Top()); pDev->DrawWallpaper(aSubRect, aWallpaper ); @@ -1973,12 +1973,12 @@ class DemoPopup : public FloatingWindow Update(); } - virtual void Paint(vcl::RenderContext& /*rRenderContext*/, const Rectangle&) override + virtual void Paint(vcl::RenderContext& /*rRenderContext*/, const tools::Rectangle&) override { // Interestingly in GL mode on Windows, this doesn't render. Size aSize = GetOutputSizePixel(); - Rectangle aTextRect(Point(6, 6), aSize); + tools::Rectangle aTextRect(Point(6, 6), aSize); SetTextColor(COL_BLACK); SetTextAlign(ALIGN_TOP); @@ -1988,12 +1988,12 @@ class DemoPopup : public FloatingWindow SetLineColor(COL_BLACK); SetFillColor(); - DrawRect( Rectangle( Point(), aSize ) ); + DrawRect( tools::Rectangle( Point(), aSize ) ); aSize.Width() -= 2; aSize.Height() -= 2; Color aColor( GetLineColor() ); SetLineColor( ( COL_GRAY ) ); - DrawRect( Rectangle( Point( 1, 1 ), aSize ) ); + DrawRect( tools::Rectangle( Point( 1, 1 ), aSize ) ); SetLineColor( aColor ); } diff --git a/xmloff/source/draw/sdxmlexp.cxx b/xmloff/source/draw/sdxmlexp.cxx index c1336f97d728..75f7608fa237 100644 --- a/xmloff/source/draw/sdxmlexp.cxx +++ b/xmloff/source/draw/sdxmlexp.cxx @@ -197,8 +197,8 @@ class ImpXMLAutoLayoutInfo sal_uInt16 mnType; ImpXMLEXPPageMasterInfo* mpPageMasterInfo; OUString msLayoutName; - Rectangle maTitleRect; - Rectangle maPresRect; + tools::Rectangle maTitleRect; + tools::Rectangle maPresRect; sal_Int32 mnGapX; sal_Int32 mnGapY; @@ -214,8 +214,8 @@ public: const OUString& GetLayoutName() const { return msLayoutName; } void SetLayoutName(const OUString& rNew) { msLayoutName = rNew; } - const Rectangle& GetTitleRectangle() const { return maTitleRect; } - const Rectangle& GetPresRectangle() const { return maPresRect; } + const tools::Rectangle& GetTitleRectangle() const { return maTitleRect; } + const tools::Rectangle& GetPresRectangle() const { return maPresRect; } static bool IsCreateNecessary(sal_uInt16 nTyp); }; @@ -813,9 +813,9 @@ void SdXMLExport::ImpWriteAutoLayoutInfos() } case AUTOLAYOUT_TITLE_2CONTENT : { - Rectangle aLeft(pInfo->GetPresRectangle()); + tools::Rectangle aLeft(pInfo->GetPresRectangle()); aLeft.setWidth(long(aLeft.GetWidth() * 0.488)); - Rectangle aRight(aLeft); + tools::Rectangle aRight(aLeft); aRight.Left() = long(aRight.Left() + aRight.GetWidth() * 1.05); ImpWriteAutoLayoutPlaceholder(XmlPlaceholderTitle, pInfo->GetTitleRectangle()); @@ -825,9 +825,9 @@ void SdXMLExport::ImpWriteAutoLayoutInfos() } case AUTOLAYOUT_TEXTCHART : { - Rectangle aLeft(pInfo->GetPresRectangle()); + tools::Rectangle aLeft(pInfo->GetPresRectangle()); aLeft.setWidth(long(aLeft.GetWidth() * 0.488)); - Rectangle aRight(aLeft); + tools::Rectangle aRight(aLeft); aRight.Left() = long(aRight.Left() + aRight.GetWidth() * 1.05); ImpWriteAutoLayoutPlaceholder(XmlPlaceholderTitle, pInfo->GetTitleRectangle()); @@ -837,9 +837,9 @@ void SdXMLExport::ImpWriteAutoLayoutInfos() } case AUTOLAYOUT_TEXTCLIP : { - Rectangle aLeft(pInfo->GetPresRectangle()); + tools::Rectangle aLeft(pInfo->GetPresRectangle()); aLeft.setWidth(long(aLeft.GetWidth() * 0.488)); - Rectangle aRight(aLeft); + tools::Rectangle aRight(aLeft); aRight.Left() = long(aRight.Left() + aRight.GetWidth() * 1.05); ImpWriteAutoLayoutPlaceholder(XmlPlaceholderTitle, pInfo->GetTitleRectangle()); @@ -849,9 +849,9 @@ void SdXMLExport::ImpWriteAutoLayoutInfos() } case AUTOLAYOUT_CHARTTEXT : { - Rectangle aLeft(pInfo->GetPresRectangle()); + tools::Rectangle aLeft(pInfo->GetPresRectangle()); aLeft.setWidth(long(aLeft.GetWidth() * 0.488)); - Rectangle aRight(aLeft); + tools::Rectangle aRight(aLeft); aRight.Left() = long(aRight.Left() + aRight.GetWidth() * 1.05); ImpWriteAutoLayoutPlaceholder(XmlPlaceholderTitle, pInfo->GetTitleRectangle()); @@ -867,9 +867,9 @@ void SdXMLExport::ImpWriteAutoLayoutInfos() } case AUTOLAYOUT_CLIPTEXT : { - Rectangle aLeft(pInfo->GetPresRectangle()); + tools::Rectangle aLeft(pInfo->GetPresRectangle()); aLeft.setWidth(long(aLeft.GetWidth() * 0.488)); - Rectangle aRight(aLeft); + tools::Rectangle aRight(aLeft); aRight.Left() = long(aRight.Left() + aRight.GetWidth() * 1.05); ImpWriteAutoLayoutPlaceholder(XmlPlaceholderTitle, pInfo->GetTitleRectangle()); @@ -879,9 +879,9 @@ void SdXMLExport::ImpWriteAutoLayoutInfos() } case AUTOLAYOUT_TEXTOBJ : { - Rectangle aLeft(pInfo->GetPresRectangle()); + tools::Rectangle aLeft(pInfo->GetPresRectangle()); aLeft.setWidth(long(aLeft.GetWidth() * 0.488)); - Rectangle aRight(aLeft); + tools::Rectangle aRight(aLeft); aRight.Left() = long(aRight.Left() + aRight.GetWidth() * 1.05); ImpWriteAutoLayoutPlaceholder(XmlPlaceholderTitle, pInfo->GetTitleRectangle()); @@ -897,12 +897,12 @@ void SdXMLExport::ImpWriteAutoLayoutInfos() } case AUTOLAYOUT_TITLE_CONTENT_2CONTENT : { - Rectangle aLeft(pInfo->GetPresRectangle()); + tools::Rectangle aLeft(pInfo->GetPresRectangle()); aLeft.setWidth(long(aLeft.GetWidth() * 0.488)); - Rectangle aRightTop(aLeft); + tools::Rectangle aRightTop(aLeft); aRightTop.Left() = long(aRightTop.Left() + aRightTop.GetWidth() * 1.05); aRightTop.setHeight(long(aRightTop.GetHeight() * 0.477)); - Rectangle aRightBottom(aRightTop); + tools::Rectangle aRightBottom(aRightTop); aRightBottom.Top() = long(aRightBottom.Top() + aRightBottom.GetHeight() * 1.095); ImpWriteAutoLayoutPlaceholder(XmlPlaceholderTitle, pInfo->GetTitleRectangle()); @@ -913,9 +913,9 @@ void SdXMLExport::ImpWriteAutoLayoutInfos() } case AUTOLAYOUT_OBJTEXT : { - Rectangle aLeft(pInfo->GetPresRectangle()); + tools::Rectangle aLeft(pInfo->GetPresRectangle()); aLeft.setWidth(long(aLeft.GetWidth() * 0.488)); - Rectangle aRight(aLeft); + tools::Rectangle aRight(aLeft); aRight.Left() = long(aRight.Left() + aRight.GetWidth() * 1.05); ImpWriteAutoLayoutPlaceholder(XmlPlaceholderTitle, pInfo->GetTitleRectangle()); @@ -925,9 +925,9 @@ void SdXMLExport::ImpWriteAutoLayoutInfos() } case AUTOLAYOUT_TITLE_CONTENT_OVER_CONTENT : { - Rectangle aTop(pInfo->GetPresRectangle()); + tools::Rectangle aTop(pInfo->GetPresRectangle()); aTop.setHeight(long(aTop.GetHeight() * 0.477)); - Rectangle aBottom(aTop); + tools::Rectangle aBottom(aTop); aBottom.Top() = long(aBottom.Top() + aBottom.GetHeight() * 1.095); ImpWriteAutoLayoutPlaceholder(XmlPlaceholderTitle, pInfo->GetTitleRectangle()); @@ -937,12 +937,12 @@ void SdXMLExport::ImpWriteAutoLayoutInfos() } case AUTOLAYOUT_TITLE_2CONTENT_CONTENT : { - Rectangle aLeftTop(pInfo->GetPresRectangle()); + tools::Rectangle aLeftTop(pInfo->GetPresRectangle()); aLeftTop.setWidth(long(aLeftTop.GetWidth() * 0.488)); - Rectangle aRight(aLeftTop); + tools::Rectangle aRight(aLeftTop); aRight.Left() = long(aRight.Left() + aRight.GetWidth() * 1.05); aLeftTop.setHeight(long(aLeftTop.GetHeight() * 0.477)); - Rectangle aLeftBottom(aLeftTop); + tools::Rectangle aLeftBottom(aLeftTop); aLeftBottom.Top() = long(aLeftBottom.Top() + aLeftBottom.GetHeight() * 1.095); ImpWriteAutoLayoutPlaceholder(XmlPlaceholderTitle, pInfo->GetTitleRectangle()); @@ -953,12 +953,12 @@ void SdXMLExport::ImpWriteAutoLayoutInfos() } case AUTOLAYOUT_TITLE_2CONTENT_OVER_CONTENT : { - Rectangle aTopLeft(pInfo->GetPresRectangle()); + tools::Rectangle aTopLeft(pInfo->GetPresRectangle()); aTopLeft.setHeight(long(aTopLeft.GetHeight() * 0.477)); - Rectangle aBottom(aTopLeft); + tools::Rectangle aBottom(aTopLeft); aBottom.Top() = long(aBottom.Top() + aBottom.GetHeight() * 1.095); aTopLeft.setWidth(long(aTopLeft.GetWidth() * 0.488)); - Rectangle aTopRight(aTopLeft); + tools::Rectangle aTopRight(aTopLeft); aTopRight.Left() = long(aTopRight.Left() + aTopRight.GetWidth() * 1.05); ImpWriteAutoLayoutPlaceholder(XmlPlaceholderTitle, pInfo->GetTitleRectangle()); @@ -969,9 +969,9 @@ void SdXMLExport::ImpWriteAutoLayoutInfos() } case AUTOLAYOUT_TEXTOVEROBJ : { - Rectangle aTop(pInfo->GetPresRectangle()); + tools::Rectangle aTop(pInfo->GetPresRectangle()); aTop.setHeight(long(aTop.GetHeight() * 0.477)); - Rectangle aBottom(aTop); + tools::Rectangle aBottom(aTop); aBottom.Top() = long(aBottom.Top() + aBottom.GetHeight() * 1.095); ImpWriteAutoLayoutPlaceholder(XmlPlaceholderTitle, pInfo->GetTitleRectangle()); @@ -981,14 +981,14 @@ void SdXMLExport::ImpWriteAutoLayoutInfos() } case AUTOLAYOUT_TITLE_4CONTENT : { - Rectangle aTopLeft(pInfo->GetPresRectangle()); + tools::Rectangle aTopLeft(pInfo->GetPresRectangle()); aTopLeft.setHeight(long(aTopLeft.GetHeight() * 0.477)); aTopLeft.setWidth(long(aTopLeft.GetWidth() * 0.488)); - Rectangle aBottomLeft(aTopLeft); + tools::Rectangle aBottomLeft(aTopLeft); aBottomLeft.Top() = long(aBottomLeft.Top() + aBottomLeft.GetHeight() * 1.095); - Rectangle aTopRight(aTopLeft); + tools::Rectangle aTopRight(aTopLeft); aTopRight.Left() = long(aTopRight.Left() + aTopRight.GetWidth() * 1.05); - Rectangle aBottomRight(aTopRight); + tools::Rectangle aBottomRight(aTopRight); aBottomRight.Top() = long(aBottomRight.Top() + aBottomRight.GetHeight() * 1.095); ImpWriteAutoLayoutPlaceholder(XmlPlaceholderTitle, pInfo->GetTitleRectangle()); @@ -1055,7 +1055,7 @@ void SdXMLExport::ImpWriteAutoLayoutInfos() for (sal_Int32 b = 0; b < nColCnt; b++) { - Rectangle aTmpRect(aTmpPos, aPartSize); + tools::Rectangle aTmpRect(aTmpPos, aPartSize); ImpWriteAutoLayoutPlaceholder(XmlPlaceholderHandout, aTmpRect); aTmpPos.X() += aPartSize.Width() + nGapX; @@ -1067,9 +1067,9 @@ void SdXMLExport::ImpWriteAutoLayoutInfos() } case AUTOLAYOUT_VTITLE_VCONTENT_OVER_VCONTENT : { - Rectangle aTop(pInfo->GetPresRectangle()); + tools::Rectangle aTop(pInfo->GetPresRectangle()); aTop.setHeight(long(aTop.GetHeight() * 0.488)); - Rectangle aBottom(aTop); + tools::Rectangle aBottom(aTop); aBottom.Top() = long(aBottom.Top() + aBottom.GetHeight() * 1.05); ImpWriteAutoLayoutPlaceholder(XmlPlaceholderVerticalTitle, pInfo->GetTitleRectangle()); @@ -1091,9 +1091,9 @@ void SdXMLExport::ImpWriteAutoLayoutInfos() } case AUTOLAYOUT_TITLE_2VTEXT : { - Rectangle aLeft(pInfo->GetPresRectangle()); + tools::Rectangle aLeft(pInfo->GetPresRectangle()); aLeft.setWidth(long(aLeft.GetWidth() * 0.488)); - Rectangle aRight(aLeft); + tools::Rectangle aRight(aLeft); aRight.Left() = long(aRight.Left() + aRight.GetWidth() * 1.05); ImpWriteAutoLayoutPlaceholder(XmlPlaceholderTitle, pInfo->GetTitleRectangle()); @@ -1109,14 +1109,14 @@ void SdXMLExport::ImpWriteAutoLayoutInfos() case AUTOLAYOUT_4CLIPART : { - Rectangle aTopLeft(pInfo->GetPresRectangle()); + tools::Rectangle aTopLeft(pInfo->GetPresRectangle()); aTopLeft.setHeight(long(aTopLeft.GetHeight() * 0.477)); aTopLeft.setWidth(long(aTopLeft.GetWidth() * 0.488)); - Rectangle aBottomLeft(aTopLeft); + tools::Rectangle aBottomLeft(aTopLeft); aBottomLeft.Top() = long(aBottomLeft.Top() + aBottomLeft.GetHeight() * 1.095); - Rectangle aTopRight(aTopLeft); + tools::Rectangle aTopRight(aTopLeft); aTopRight.Left() = long(aTopRight.Left() + aTopRight.GetWidth() * 1.05); - Rectangle aBottomRight(aTopRight); + tools::Rectangle aBottomRight(aTopRight); aBottomRight.Top() = long(aBottomRight.Top() + aBottomRight.GetHeight() * 1.095); ImpWriteAutoLayoutPlaceholder(XmlPlaceholderTitle, pInfo->GetTitleRectangle()); @@ -1129,19 +1129,19 @@ void SdXMLExport::ImpWriteAutoLayoutInfos() case AUTOLAYOUT_TITLE_6CONTENT : { - Rectangle aTopLeft(pInfo->GetPresRectangle()); + tools::Rectangle aTopLeft(pInfo->GetPresRectangle()); aTopLeft.setHeight(long(aTopLeft.GetHeight() * 0.477)); aTopLeft.setWidth(long(aTopLeft.GetWidth() * 0.322)); - Rectangle aTopCenter(aTopLeft); + tools::Rectangle aTopCenter(aTopLeft); aTopCenter.Left() = long(aTopCenter.Left() + aTopCenter.GetWidth() * 1.05); - Rectangle aTopRight(aTopLeft); + tools::Rectangle aTopRight(aTopLeft); aTopRight.Left() = long(aTopRight.Left() + aTopRight.GetWidth() * 2 * 1.05); - Rectangle aBottomLeft(aTopLeft); + tools::Rectangle aBottomLeft(aTopLeft); aBottomLeft.Top() = long(aBottomLeft.Top() + aBottomLeft.GetHeight() * 1.095); - Rectangle aBottomCenter(aTopCenter); + tools::Rectangle aBottomCenter(aTopCenter); aBottomCenter.Top() = long(aBottomCenter.Top() + aBottomCenter.GetHeight() * 1.095); - Rectangle aBottomRight(aTopRight); + tools::Rectangle aBottomRight(aTopRight); aBottomRight.Top() = long(aBottomRight.Top() + aBottomRight.GetHeight() * 1.095); ImpWriteAutoLayoutPlaceholder(XmlPlaceholderTitle, pInfo->GetTitleRectangle()); @@ -1164,7 +1164,7 @@ void SdXMLExport::ImpWriteAutoLayoutInfos() } } -void SdXMLExport::ImpWriteAutoLayoutPlaceholder(XmlPlaceholder ePl, const Rectangle& rRect) +void SdXMLExport::ImpWriteAutoLayoutPlaceholder(XmlPlaceholder ePl, const tools::Rectangle& rRect) { OUString aStr; OUStringBuffer sStringBuffer; diff --git a/xmloff/source/draw/sdxmlexp_impl.hxx b/xmloff/source/draw/sdxmlexp_impl.hxx index 5d24eacb36fb..3c020e881ee3 100644 --- a/xmloff/source/draw/sdxmlexp_impl.hxx +++ b/xmloff/source/draw/sdxmlexp_impl.hxx @@ -30,7 +30,7 @@ #include <set> #include <vector> -class Rectangle; +namespace tools { class Rectangle; } class ImpXMLEXPPageMasterInfo; class ImpXMLAutoLayoutInfo; @@ -136,7 +136,7 @@ class SdXMLExport : public SvXMLExport bool ImpPrepAutoLayoutInfo(const css::uno::Reference< css::drawing::XDrawPage >& xPage, OUString& rName); void ImpWriteAutoLayoutInfos(); - void ImpWriteAutoLayoutPlaceholder(XmlPlaceholder ePl, const Rectangle& rRect); + void ImpWriteAutoLayoutPlaceholder(XmlPlaceholder ePl, const tools::Rectangle& rRect); void ImpWriteHeaderFooterDecls(); void ImplExportHeaderFooterDeclAttributes( const HeaderFooterPageSettingsImpl& aSettings ); |