diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2017-03-30 20:27:55 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2017-03-31 06:27:11 +0000 |
commit | a5a571307fb3306b74ab46b085cde6388270a770 (patch) | |
tree | 66d4ce12bb5236c50ab6a5d253bc8c6d8b5d292d /reportdesign | |
parent | spelling in comments: minmal -> minimal (diff) | |
download | core-a5a571307fb3306b74ab46b085cde6388270a770.tar.gz core-a5a571307fb3306b74ab46b085cde6388270a770.zip |
tdf#82580 tools: rename Rectangle to tools::Rectangle
Mostly generated using
make check COMPILER_EXTERNAL_TOOL=1 CCACHE_PREFIX=clang-rename-wrapper RENAME_ARGS="-qualified-name=Rectangle -new-name=tools::Rectangle"
Except some modules have their own foo::tools namespace, so there have
to use ::tools::Rectangle. This commit just moves the class from the
global namespace, it does not update pre/postwin.h yet.
Change-Id: I42b2de3c6f769fcf28cfe086f98eb31e42a305f2
Reviewed-on: https://gerrit.libreoffice.org/35923
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to 'reportdesign')
22 files changed, 103 insertions, 103 deletions
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 ) |