[Libreoffice-commits] core.git: oox/source reportdesign/source

Noel Grandin noel.grandin at collabora.co.uk
Thu Feb 15 06:31:19 UTC 2018


 oox/source/export/shapes.cxx                    |    4 -
 reportdesign/source/core/sdr/RptObject.cxx      |    4 -
 reportdesign/source/ui/report/DesignView.cxx    |    4 -
 reportdesign/source/ui/report/EndMarker.cxx     |    2 
 reportdesign/source/ui/report/ReportSection.cxx |    6 -
 reportdesign/source/ui/report/ReportWindow.cxx  |    6 -
 reportdesign/source/ui/report/ScrollHelper.cxx  |   12 +--
 reportdesign/source/ui/report/SectionWindow.cxx |   12 +--
 reportdesign/source/ui/report/StartMarker.cxx   |   18 ++--
 reportdesign/source/ui/report/ViewsWindow.cxx   |   94 ++++++++++++------------
 reportdesign/source/ui/report/dlgedfunc.cxx     |   14 +--
 11 files changed, 88 insertions(+), 88 deletions(-)

New commits:
commit 457220bc2c0142c5b6f4135cb688ccfc99fec792
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date:   Wed Feb 14 09:38:40 2018 +0200

    loplugin:changetoolsgen in oox,reportdesign
    
    Change-Id: I8112ae6bb92ef96b4229ab53b7002ae3c0ba865c
    Reviewed-on: https://gerrit.libreoffice.org/49702
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/oox/source/export/shapes.cxx b/oox/source/export/shapes.cxx
index e922a3bce934..72f2eac304ba 100644
--- a/oox/source/export/shapes.cxx
+++ b/oox/source/export/shapes.cxx
@@ -386,9 +386,9 @@ awt::Size ShapeExport::MapSize( const awt::Size& rSize ) const
     Size aRetSize( OutputDevice::LogicToLogic( Size( rSize.Width, rSize.Height ), maMapModeSrc, maMapModeDest ) );
 
     if ( !aRetSize.Width() )
-        aRetSize.Width()++;
+        aRetSize.setWidth( ++aRetSize.Width() );
     if ( !aRetSize.Height() )
-        aRetSize.Height()++;
+        aRetSize.setHeight( ++aRetSize.Height() );
     return awt::Size( aRetSize.Width(), aRetSize.Height() );
 }
 
diff --git a/reportdesign/source/core/sdr/RptObject.cxx b/reportdesign/source/core/sdr/RptObject.cxx
index a63018c1ab9d..37a0f763b51b 100644
--- a/reportdesign/source/core/sdr/RptObject.cxx
+++ b/reportdesign/source/core/sdr/RptObject.cxx
@@ -681,7 +681,7 @@ void OUnoObject::NbcMove( const Size& rSize )
             int nNewY = m_xReportComponent->getPositionY() + rSize.Height();
             if (nNewY < 0 && !bUndoMode)
             {
-                aUndoSize.Height() = abs(nNewY);
+                aUndoSize.setHeight( abs(nNewY) );
                 bPositionFixed = true;
                 nNewY = 0;
             }
@@ -961,7 +961,7 @@ void OOle2Obj::NbcMove( const Size& rSize )
             int nNewY = m_xReportComponent->getPositionY() + rSize.Height();
             if (nNewY < 0 && !bUndoMode)
             {
-                aUndoSize.Height() = abs(nNewY);
+                aUndoSize.setHeight( abs(nNewY) );
                 bPositionFixed = true;
                 nNewY = 0;
             }
diff --git a/reportdesign/source/ui/report/DesignView.cxx b/reportdesign/source/ui/report/DesignView.cxx
index 1170439603ee..b7d5c3fbac60 100644
--- a/reportdesign/source/ui/report/DesignView.cxx
+++ b/reportdesign/source/ui/report/DesignView.cxx
@@ -237,11 +237,11 @@ void ODesignView::resizeDocumentView(tools::Rectangle& _rPlayground)
             Point aTaskPanePos(nSplitPos + nSplitterWidth, _rPlayground.Top());
             if (m_pTaskPane && m_pTaskPane->IsVisible() && m_pPropWin)
             {
-                aTaskPanePos.X() = aPlaygroundSize.Width() - m_pTaskPane->GetSizePixel().Width();
+                aTaskPanePos.setX( aPlaygroundSize.Width() - m_pTaskPane->GetSizePixel().Width() );
                 sal_Int32 nMinWidth = m_pPropWin->getMinimumSize().Width();
                 if ( nMinWidth > (aPlaygroundSize.Width() - aTaskPanePos.X()) )
                 {
-                    aTaskPanePos.X() = aPlaygroundSize.Width() - nMinWidth;
+                    aTaskPanePos.setX( aPlaygroundSize.Width() - nMinWidth );
                 }
                 nSplitPos = aTaskPanePos.X() - nSplitterWidth;
                 getController().setSplitPos(nSplitPos);
diff --git a/reportdesign/source/ui/report/EndMarker.cxx b/reportdesign/source/ui/report/EndMarker.cxx
index fba16afca43c..fc1f2703f7f6 100644
--- a/reportdesign/source/ui/report/EndMarker.cxx
+++ b/reportdesign/source/ui/report/EndMarker.cxx
@@ -48,7 +48,7 @@ void OEndMarker::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangl
     const long nCornerSpace = long(aCornerSpace);
 
     Size aSize = GetSizePixel();
-    aSize.Width() += nCornerSpace;
+    aSize.setWidth( aSize.Width() + nCornerSpace );
     tools::Rectangle aWholeRect(Point(-nCornerSpace,0),aSize);
     tools::PolyPolygon aPoly;
     aPoly.Insert( tools::Polygon(aWholeRect,nCornerSpace,nCornerSpace));
diff --git a/reportdesign/source/ui/report/ReportSection.cxx b/reportdesign/source/ui/report/ReportSection.cxx
index 99f93cc72455..de5a0e726aca 100644
--- a/reportdesign/source/ui/report/ReportSection.cxx
+++ b/reportdesign/source/ui/report/ReportSection.cxx
@@ -758,12 +758,12 @@ sal_Int8 OReportSection::ExecuteDrop( const ExecuteDropEvent& _rEvt )
         m_pView->UnmarkAll();
         const tools::Rectangle& rRect = m_pView->GetWorkArea();
         if ( aDropPos.X() < rRect.Left() )
-            aDropPos.X() = rRect.Left();
+            aDropPos.setX( rRect.Left() );
         else if ( aDropPos.X() > rRect.Right() )
-            aDropPos.X() = rRect.Right();
+            aDropPos.setX( rRect.Right() );
 
         if ( aDropPos.Y() > rRect.Bottom() )
-            aDropPos.Y() = rRect.Bottom();
+            aDropPos.setY( rRect.Bottom() );
 
         uno::Sequence<beans::PropertyValue> aValues;
         if ( !bMultipleFormat )
diff --git a/reportdesign/source/ui/report/ReportWindow.cxx b/reportdesign/source/ui/report/ReportWindow.cxx
index eeb793f71b89..54f5db8c7955 100644
--- a/reportdesign/source/ui/report/ReportWindow.cxx
+++ b/reportdesign/source/ui/report/ReportWindow.cxx
@@ -182,7 +182,7 @@ void OReportWindow::Resize()
         nLeftMargin     = m_aViewsWindow->LogicToPixel(Size(nLeftMargin,0)).Width();
         nRightMargin    = m_aViewsWindow->LogicToPixel(Size(nRightMargin,0)).Width();
 
-        aPageSize.Height() = m_aHRuler->GetSizePixel().Height();
+        aPageSize.setHeight( m_aHRuler->GetSizePixel().Height() );
 
         const long nTermp(m_aViewsWindow->getTotalHeight() + aPageSize.Height());
         long nSectionsHeight = ::std::max<long>(nTermp,aTotalOutputSize.Height());
@@ -192,10 +192,10 @@ void OReportWindow::Resize()
         m_aHRuler->SetMargin1(0);
         m_aHRuler->SetMargin2(aPageSize.Width() - nLeftMargin - nRightMargin);
 
-        aStartPoint.Y() += aPageSize.Height();
+        aStartPoint.setY( aStartPoint.Y() + aPageSize.Height() );
         nSectionsHeight -= aStartPoint.Y();
 
-        aStartPoint.X() = aOffset.X();
+        aStartPoint.setX( aOffset.X() );
 
         m_aViewsWindow->SetPosSizePixel(aStartPoint,Size(aTotalOutputSize.Width(),nSectionsHeight));
     }
diff --git a/reportdesign/source/ui/report/ScrollHelper.cxx b/reportdesign/source/ui/report/ScrollHelper.cxx
index ef3864852066..d43921fdfb42 100644
--- a/reportdesign/source/ui/report/ScrollHelper.cxx
+++ b/reportdesign/source/ui/report/ScrollHelper.cxx
@@ -106,8 +106,8 @@ void OScrollWindowHelper::initialize()
 
 void OScrollWindowHelper::setTotalSize(sal_Int32 _nWidth ,sal_Int32 _nHeight)
 {
-    m_aTotalPixelSize.Width() = _nWidth;
-    m_aTotalPixelSize.Height() = _nHeight;
+    m_aTotalPixelSize.setWidth( _nWidth );
+    m_aTotalPixelSize.setHeight( _nHeight );
 
     // now set the ranges without start marker
     Fraction aStartWidth(REPORT_STARTMARKER_WIDTH * m_pParent->getController().getZoomValue(),100);
@@ -125,7 +125,7 @@ Size OScrollWindowHelper::ResizeScrollBars()
     if ( aOutPixSz.Width() == 0 || aOutPixSz.Height() == 0 )
         return aOutPixSz;
 
-    aOutPixSz.Height() -= m_aReportWindow->getRulerHeight();
+    aOutPixSz.setHeight( aOutPixSz.Height() - m_aReportWindow->getRulerHeight() );
     // determine the size of the output-area and if we need scrollbars
     const long nScrSize = GetSettings().GetStyleSettings().GetScrollBarSize();
     bool bVVisible = false; // by default no vertical-ScrollBar
@@ -139,7 +139,7 @@ Size OScrollWindowHelper::ResizeScrollBars()
         if ( aOutPixSz.Width() < m_aTotalPixelSize.Width() && !bHVisible )
         {
             bHVisible = true;
-            aOutPixSz.Height() -= nScrSize;
+            aOutPixSz.setHeight( aOutPixSz.Height() - nScrSize );
             bChanged = true;
         }
 
@@ -147,14 +147,14 @@ Size OScrollWindowHelper::ResizeScrollBars()
         if ( aOutPixSz.Height() < m_aTotalPixelSize.Height() && !bVVisible )
         {
             bVVisible = true;
-            aOutPixSz.Width() -= nScrSize;
+            aOutPixSz.setWidth( aOutPixSz.Width() - nScrSize );
             bChanged = true;
         }
 
     }
     while ( bChanged );   // until no visibility has changed
 
-    aOutPixSz.Height() += m_aReportWindow->getRulerHeight();
+    aOutPixSz.setHeight( aOutPixSz.Height() + m_aReportWindow->getRulerHeight() );
 
     // show or hide scrollbars
     m_aVScroll->Show( bVVisible );
diff --git a/reportdesign/source/ui/report/SectionWindow.cxx b/reportdesign/source/ui/report/SectionWindow.cxx
index 0df5e873121c..c80d20a364aa 100644
--- a/reportdesign/source/ui/report/SectionWindow.cxx
+++ b/reportdesign/source/ui/report/SectionWindow.cxx
@@ -231,7 +231,7 @@ void OSectionWindow::Resize()
     long nEndWidth = long(REPORT_ENDMARKER_WIDTH * GetMapMode().GetScaleX());
 
     const Point aThumbPos = m_pParent->getView()->getThumbPos();
-    aOutputSize.Width() -= aThumbPos.X();
+    aOutputSize.setWidth( aOutputSize.Width() - aThumbPos.X() );
     aOutputSize.Height() -=  m_aSplitter->GetSizePixel().Height();
 
     if ( m_aStartMarker->isCollapsed() )
@@ -252,20 +252,20 @@ void OSectionWindow::Resize()
         const uno::Reference< report::XSection> xSection = m_aReportSection->getSection();
         Size aSectionSize = LogicToPixel( Size( 0,xSection->getHeight() ) );
         Point aReportPos(nStartWidth,0);
-        aSectionSize.Width() = aOutputSize.Width() - nStartWidth;
+        aSectionSize.setWidth( aOutputSize.Width() - nStartWidth );
         if ( bShowEndMarker )
-            aSectionSize.Width() -= nEndWidth;
+            aSectionSize.setWidth( aSectionSize.Width() - nEndWidth );
 
         m_aReportSection->SetPosSizePixel(aReportPos,aSectionSize);
 
         // set splitter
-        aReportPos.Y() += aSectionSize.Height();
+        aReportPos.setY( aReportPos.Y() + aSectionSize.Height() );
         m_aSplitter->SetPosSizePixel(aReportPos,Size(aSectionSize.Width(),m_aSplitter->GetSizePixel().Height()));
-        aSectionSize.Height() = static_cast<long>(1000 * static_cast<double>(GetMapMode().GetScaleY()));
+        aSectionSize.setHeight( static_cast<long>(1000 * static_cast<double>(GetMapMode().GetScaleY())) );
         m_aSplitter->SetDragRectPixel( tools::Rectangle(Point(nStartWidth,0),aSectionSize));
 
         // set end marker
-        aReportPos.X() += aSectionSize.Width();
+        aReportPos.setX( aReportPos.X() + aSectionSize.Width() );
         aReportPos.Y() = 0;
         m_aEndMarker->Show(bShowEndMarker);
         m_aEndMarker->SetPosSizePixel(aReportPos,Size(nEndWidth,aOutputSize.Height()));
diff --git a/reportdesign/source/ui/report/StartMarker.cxx b/reportdesign/source/ui/report/StartMarker.cxx
index c3dce09bfdc8..06b90386d8ec 100644
--- a/reportdesign/source/ui/report/StartMarker.cxx
+++ b/reportdesign/source/ui/report/StartMarker.cxx
@@ -114,7 +114,7 @@ void OStartMarker::Paint(vcl::RenderContext& rRenderContext, const tools::Rectan
     {
         const long nVRulerWidth = m_aVRuler->GetSizePixel().Width();
         long nSize = aSize.Width() - nVRulerWidth;
-        aSize.Width() += nCornerWidth;
+        aSize.setWidth( aSize.Width() + nCornerWidth );
         rRenderContext.SetClipRegion(vcl::Region(rRenderContext.PixelToLogic(tools::Rectangle(Point(),
                                                                              Size(nSize, aSize.Height())))));
     }
@@ -230,8 +230,8 @@ void OStartMarker::Resize()
 
     Size aImageSize = m_aImage->GetImage().GetSizePixel();
     const MapMode& rMapMode = GetMapMode();
-    aImageSize.Width() = long(aImageSize.Width() * static_cast<double>(rMapMode.GetScaleX()));
-    aImageSize.Height() = long(aImageSize.Height() * static_cast<double>(rMapMode.GetScaleY()));
+    aImageSize.setWidth( long(aImageSize.Width() * static_cast<double>(rMapMode.GetScaleX())) );
+    aImageSize.setHeight( long(aImageSize.Height() * static_cast<double>(rMapMode.GetScaleY())) );
 
     long nExtraWidth = long(REPORT_EXTRA_SPACE * rMapMode.GetScaleX());
 
@@ -239,8 +239,8 @@ void OStartMarker::Resize()
     const long nHeight = ::std::max<sal_Int32>(nOutputHeight - 2*aPos.Y(),LogicToPixel(Size(0,m_aText->GetTextHeight())).Height());
     m_aText->SetPosSizePixel(aPos,Size(aRulerPos.X() - aPos.X(),nHeight));
 
-    aPos.X() = nExtraWidth;
-    aPos.Y() += static_cast<sal_Int32>((LogicToPixel(Size(0,m_aText->GetTextHeight())).Height() - aImageSize.Height()) * 0.5) ;
+    aPos.setX( nExtraWidth );
+    aPos.setY( aPos.Y() + static_cast<sal_Int32>((LogicToPixel(Size(0,m_aText->GetTextHeight())).Height() - aImageSize.Height()) * 0.5) ) ;
     m_aImage->SetPosSizePixel(aPos,aImageSize);
 }
 
@@ -272,11 +272,11 @@ void OStartMarker::RequestHelp( const HelpEvent& rHEvt )
         // show help
         tools::Rectangle aItemRect(rHEvt.GetMousePosPixel(),Size(GetSizePixel().Width(),getMinHeight()));
         Point aPt = OutputToScreenPixel( aItemRect.TopLeft() );
-        aItemRect.Left()   = aPt.X();
-        aItemRect.Top()    = aPt.Y();
+        aItemRect.SetLeft( aPt.X() );
+        aItemRect.SetTop( aPt.Y() );
         aPt = OutputToScreenPixel( aItemRect.BottomRight() );
-        aItemRect.Right()  = aPt.X();
-        aItemRect.Bottom() = aPt.Y();
+        aItemRect.SetRight( aPt.X() );
+        aItemRect.SetBottom( aPt.Y() );
         if( rHEvt.GetMode() == HelpEventMode::BALLOON )
             Help::ShowBalloon( this, aItemRect.Center(), aItemRect, m_aText->GetText());
         else
diff --git a/reportdesign/source/ui/report/ViewsWindow.cxx b/reportdesign/source/ui/report/ViewsWindow.cxx
index 7ddf204eddac..080b74700d8c 100644
--- a/reportdesign/source/ui/report/ViewsWindow.cxx
+++ b/reportdesign/source/ui/report/ViewsWindow.cxx
@@ -124,22 +124,22 @@ bool lcl_getNewRectSize(const tools::Rectangle& _aObjRect,long& _nXMov, long& _n
                                     {
                                         if ( aNewRect.Left() < aIntersectionRect.Left() )
                                         {
-                                            aNewRect.Right() = aIntersectionRect.Left();
+                                            aNewRect.SetRight( aIntersectionRect.Left() );
                                         }
                                         else if ( aNewRect.Left() < aIntersectionRect.Right() )
                                         {
-                                            aNewRect.Left() = aIntersectionRect.Right();
+                                            aNewRect.SetLeft( aIntersectionRect.Right() );
                                         }
                                     }
                                     else if ( _nControlModification == ControlModification::HEIGHT_GREATEST )
                                     {
                                         if ( aNewRect.Top() < aIntersectionRect.Top() )
                                         {
-                                            aNewRect.Bottom() = aIntersectionRect.Top();
+                                            aNewRect.SetBottom( aIntersectionRect.Top() );
                                         }
                                         else if ( aNewRect.Top() < aIntersectionRect.Bottom() )
                                         {
-                                            aNewRect.Top() = aIntersectionRect.Bottom();
+                                            aNewRect.SetTop( aIntersectionRect.Bottom() );
                                         }
                                     }
                                     nYTemp = aNewRect.getHeight();
@@ -196,20 +196,20 @@ void OViewsWindow::impl_resizeSectionWindow(OSectionWindow& _rSectionWindow,Poin
     const uno::Reference< report::XSection> xSection = _rSectionWindow.getReportSection().getSection();
 
     Size aSectionSize = _rSectionWindow.LogicToPixel( Size( 0,xSection->getHeight() ) );
-    aSectionSize.Width() = getView()->GetTotalWidth();
+    aSectionSize.setWidth( getView()->GetTotalWidth() );
 
     const sal_Int32 nMinHeight = _rSectionWindow.getStartMarker().getMinHeight();
     if ( _rSectionWindow.getStartMarker().isCollapsed() || nMinHeight > aSectionSize.Height() )
     {
-        aSectionSize.Height() = nMinHeight;
+        aSectionSize.setHeight( nMinHeight );
     }
     const StyleSettings& rSettings = GetSettings().GetStyleSettings();
-    aSectionSize.Height() += static_cast<long>(rSettings.GetSplitSize() * static_cast<double>(_rSectionWindow.GetMapMode().GetScaleY()));
+    aSectionSize.setHeight( aSectionSize.Height() + static_cast<long>(rSettings.GetSplitSize() * static_cast<double>(_rSectionWindow.GetMapMode().GetScaleY())) );
 
     if ( _bSet )
         _rSectionWindow.SetPosSizePixel(_rStartPoint,aSectionSize);
 
-    _rStartPoint.Y() += aSectionSize.Height();
+    _rStartPoint.setY( _rStartPoint.Y() + aSectionSize.Height() );
 }
 
 
@@ -261,7 +261,7 @@ void OViewsWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Rectan
     Size aOut(GetOutputSizePixel());
     long nStartWidth = long(REPORT_STARTMARKER_WIDTH * rRenderContext.GetMapMode().GetScaleX());
 
-    aOut.Width() -= nStartWidth;
+    aOut.setWidth( aOut.Width() - nStartWidth );
     aOut = rRenderContext.PixelToLogic(aOut);
 
     tools::Rectangle aRect(rRenderContext.PixelToLogic(Point(nStartWidth,0)), aOut);
@@ -1023,7 +1023,7 @@ void OViewsWindow::BegDragObj_createInvisibleObjectAtPosition(const tools::Recta
             rView.MarkObj( pNewObj, rView.GetSdrPageView() );
         }
         const long nSectionHeight = rReportSection.PixelToLogic(rReportSection.GetOutputSizePixel()).Height();
-        aNewPos.Y() -= nSectionHeight;
+        aNewPos.setY( aNewPos.Y() - nSectionHeight );
     }
 }
 
@@ -1045,7 +1045,7 @@ void OViewsWindow::BegDragObj(const Point& _aPnt, SdrHdl* _pHdl,const OSectionVi
         if (pView == _pSection)
             break;
         const long nSectionHeight = rReportSection.PixelToLogic(rReportSection.GetOutputSizePixel()).Height();
-        aAbsolutePnt.Y() +=  nSectionHeight;
+        aAbsolutePnt.setY( aAbsolutePnt.Y() +  nSectionHeight );
     }
     m_aDragDelta = Point(SAL_MAX_INT32, SAL_MAX_INT32);
     SAL_INFO(
@@ -1078,8 +1078,8 @@ void OViewsWindow::BegDragObj(const Point& _aPnt, SdrHdl* _pHdl,const OSectionVi
                     tools::Rectangle aRect( pObj->GetCurrentBoundRect() );
                     aRect.Move(0, aNewObjPos.Y());
 
-                    aLeftTop.X() = ::std::min( aRect.Left(), aLeftTop.X() );
-                    aLeftTop.Y() = ::std::min( aRect.Top(), aLeftTop.Y() );
+                    aLeftTop.setX( ::std::min( aRect.Left(), aLeftTop.X() ) );
+                    aLeftTop.setY( ::std::min( aRect.Top(), aLeftTop.Y() ) );
 
                     SAL_INFO(
                         "reportdesign",
@@ -1092,17 +1092,17 @@ void OViewsWindow::BegDragObj(const Point& _aPnt, SdrHdl* _pHdl,const OSectionVi
         }
         ++nViewCount;
         tools::Rectangle aClipRect = rView.GetWorkArea();
-        aClipRect.Top() = -aNewObjPos.Y();
+        aClipRect.SetTop( -aNewObjPos.Y() );
         rView.SetWorkArea( aClipRect );
 
         const long nSectionHeight = rReportSection.PixelToLogic(rReportSection.GetOutputSizePixel()).Height();
-        aNewObjPos.Y() += nSectionHeight;
+        aNewObjPos.setY( aNewObjPos.Y() + nSectionHeight );
     }
 
     const sal_Int32 nDeltaX = std::abs(aLeftTop.X() - aAbsolutePnt.X());
     const sal_Int32 nDeltaY = std::abs(aLeftTop.Y() - aAbsolutePnt.Y());
-    m_aDragDelta.X() = nDeltaX;
-    m_aDragDelta.Y() = nDeltaY;
+    m_aDragDelta.setX( nDeltaX );
+    m_aDragDelta.setY( nDeltaY );
 
     Point aNewPos = aAbsolutePnt;
 
@@ -1128,7 +1128,7 @@ void OViewsWindow::BegDragObj(const Point& _aPnt, SdrHdl* _pHdl,const OSectionVi
         rReportSection.getSectionView().BegDragObj(aNewPos, nullptr, pHdl, nDrgLog);
 
         const long nSectionHeight = rReportSection.PixelToLogic(rReportSection.GetOutputSizePixel()).Height();
-        aNewPos.Y() -= nSectionHeight;
+        aNewPos.setY( aNewPos.Y() - nSectionHeight );
     }
 }
 
@@ -1157,11 +1157,11 @@ void OViewsWindow::BegMarkObj(const Point& _aPnt,const OSectionView* _pSection)
         else if ( bAdd )
         {
             const long nSectionHeight = rReportSection.PixelToLogic(rReportSection.GetOutputSizePixel()).Height();
-            aNewPos.Y() += nSectionHeight;
+            aNewPos.setY( aNewPos.Y() + nSectionHeight );
         }
         else
         {
-            aNewPos.Y() -= nLastSectionHeight;
+            aNewPos.setY( aNewPos.Y() - nLastSectionHeight );
         }
         rReportSection.getSectionView().BegMarkObj ( aNewPos );
         nLastSectionHeight = rReportSection.PixelToLogic(rReportSection.GetOutputSizePixel()).Height();
@@ -1189,7 +1189,7 @@ OSectionView* OViewsWindow::getSectionRelativeToPosition(const OSectionView* _pS
         {
             OReportSection& rReportSection = (*aIter)->getReportSection();
             const sal_Int32 nHeight = rReportSection.PixelToLogic(rReportSection.GetOutputSizePixel()).Height();
-            _rPnt.Y() += nHeight;
+            _rPnt.setY( _rPnt.Y() + nHeight );
             if ( (nCount -1) > 0 && (_rPnt.Y() < 0) )
                 --aIter;
         }
@@ -1206,7 +1206,7 @@ OSectionView* OViewsWindow::getSectionRelativeToPosition(const OSectionView* _pS
             const long nHeight = rReportSection.PixelToLogic(rReportSection.GetOutputSizePixel()).Height();
             if ( (_rPnt.Y() - nHeight) < 0  )
                 break;
-            _rPnt.Y() -= nHeight;
+            _rPnt.setY( _rPnt.Y() - nHeight );
         }
         if ( aIter != aEnd )
             pSection = &(*aIter)->getReportSection().getSectionView();
@@ -1270,9 +1270,9 @@ void OViewsWindow::EndDragObj(bool _bControlKeyPressed, const OSectionView* _pSe
                 const sal_Int32 nPaperWidth  = getStyleProperty<awt::Size>(xReportDefinition,PROPERTY_PAPERSIZE).Width;
 
                 if ( aNewPos.X() < nLeftMargin )
-                    aNewPos.X() = nLeftMargin;
+                    aNewPos.setX( nLeftMargin );
                 if ( aNewPos.Y() < 0 )
-                    aNewPos.Y() = 0;
+                    aNewPos.setY( 0 );
 
                 Point aPrevious;
                 for (beans::NamedValue const & namedVal : aAllreadyCopiedObjects)
@@ -1291,20 +1291,20 @@ void OViewsWindow::EndDragObj(bool _bControlKeyPressed, const OSectionView* _pSe
 
                         if ( aNewPos.X() < nLeftMargin )
                         {
-                            aNewPos.X() = nLeftMargin;
+                            aNewPos.setX( nLeftMargin );
                         }
                         else if ( (aNewPos.X() + aSize.Width) > (nPaperWidth - nRightMargin) )
                         {
-                            aNewPos.X() = nPaperWidth - nRightMargin - aSize.Width;
+                            aNewPos.setX( nPaperWidth - nRightMargin - aSize.Width );
                         }
                         if ( aNewPos.Y() < 0 )
                         {
-                            aNewPos.Y() = 0;
+                            aNewPos.setY( 0 );
                         }
                         if ( aNewPos.X() < 0 )
                         {
                             aSize.Width += aNewPos.X();
-                            aNewPos.X()= 0;
+                            aNewPos.setX( 0 );
                             xRC->setSize(aSize);
                         }
                         xRC->setPosition(AWTPoint(aNewPos));
@@ -1361,7 +1361,7 @@ void OViewsWindow::MovAction(const Point& _aPnt,const OSectionView* _pSection, b
         if ( &rReportSection.getSectionView() == _pSection )
             break;
         const long nSectionHeight = (*aIter)->PixelToLogic(rReportSection.GetOutputSizePixel()).Height();
-        aCurrentSectionPos.Y() += nSectionHeight;
+        aCurrentSectionPos.setY( aCurrentSectionPos.Y() + nSectionHeight );
     }
     aRealMousePos += aCurrentSectionPos;
 
@@ -1376,17 +1376,17 @@ void OViewsWindow::MovAction(const Point& _aPnt,const OSectionView* _pSection, b
         if (_bControlKeySet)
         {
             tools::Rectangle aClipRect = rView.GetWorkArea();
-            aClipRect.Top() = aCurrentSectionPos.Y() - aPosForWorkArea.Y();
-            aClipRect.Bottom() = aClipRect.Top() + nSectionHeight;
+            aClipRect.SetTop( aCurrentSectionPos.Y() - aPosForWorkArea.Y() );
+            aClipRect.SetBottom( aClipRect.Top() + nSectionHeight );
             rView.SetWorkArea( aClipRect );
         }
         else
         {
             tools::Rectangle aClipRect = rView.GetWorkArea();
-            aClipRect.Top() = -aPosForWorkArea.Y();
+            aClipRect.SetTop( -aPosForWorkArea.Y() );
             rView.SetWorkArea( aClipRect );
         }
-        aPosForWorkArea.Y() += nSectionHeight;
+        aPosForWorkArea.setY( aPosForWorkArea.Y() + nSectionHeight );
     }
 
 
@@ -1401,7 +1401,7 @@ void OViewsWindow::MovAction(const Point& _aPnt,const OSectionView* _pSection, b
         }
         rReportSection.getSectionView().MovAction ( aRealMousePos );
         const long nSectionHeight = (*aIter)->PixelToLogic((*aIter)->GetOutputSizePixel()).Height();
-        aRealMousePos.Y() -= nSectionHeight;
+        aRealMousePos.setY( aRealMousePos.Y() - nSectionHeight );
     }
 }
 
@@ -1491,12 +1491,12 @@ void OViewsWindow::handleKey(const vcl::KeyCode& _rCode)
                 {
                     // restrict movement to work area
                     tools::Rectangle rWorkArea = rView.GetWorkArea();
-                    rWorkArea.Right()++;
+                    rWorkArea.SetRight( ++rWorkArea.Right() );
 
                     if ( !rWorkArea.IsEmpty() )
                     {
                         if ( rWorkArea.Top() < 0 )
-                            rWorkArea.Top() = 0;
+                            rWorkArea.SetTop( 0 );
                         tools::Rectangle aMarkRect( rView.GetMarkedObjRect() );
                         aMarkRect.Move( nX, nY );
 
@@ -1534,26 +1534,26 @@ void OViewsWindow::handleKey(const vcl::KeyCode& _rCode)
                                     Point aPos;
                                     if ( nCode == KEY_UP )
                                     {
-                                        aPos.X() = aMarkRect.Left();
-                                        aPos.Y() = aOver.Top() - aMarkRect.getHeight();
+                                        aPos.setX( aMarkRect.Left() );
+                                        aPos.setY( aOver.Top() - aMarkRect.getHeight() );
                                         nY += (aPos.Y() - aMarkRect.Top());
                                     }
                                     else if ( nCode == KEY_DOWN )
                                     {
-                                        aPos.X() = aMarkRect.Left();
-                                        aPos.Y() = aOver.Bottom();
+                                        aPos.setX( aMarkRect.Left() );
+                                        aPos.setY( aOver.Bottom() );
                                         nY += (aPos.Y() - aMarkRect.Top());
                                     }
                                     else if ( nCode == KEY_LEFT )
                                     {
-                                        aPos.X() = aOver.Left() - aMarkRect.getWidth();
-                                        aPos.Y() = aMarkRect.Top();
+                                        aPos.setX( aOver.Left() - aMarkRect.getWidth() );
+                                        aPos.setY( aMarkRect.Top() );
                                         nX += (aPos.X() - aMarkRect.Left());
                                     }
                                     else if ( nCode == KEY_RIGHT )
                                     {
-                                        aPos.X() = aOver.Right();
-                                        aPos.Y() = aMarkRect.Top();
+                                        aPos.setX( aOver.Right() );
+                                        aPos.setY( aMarkRect.Top() );
                                         nX += (aPos.X() - aMarkRect.Left());
                                     }
 
@@ -1618,8 +1618,8 @@ void OViewsWindow::handleKey(const vcl::KeyCode& _rCode)
                             case SdrHdlKind::UpperLeft:
                             case SdrHdlKind::LowerLeft:
                             case SdrHdlKind::Upper:
-                                aNewRect.Left() += nX;
-                                aNewRect.Top()  += nY;
+                                aNewRect.SetLeft( aNewRect.Left() + nX );
+                                aNewRect.SetTop( aNewRect.Top() + nY );
                                 break;
                             case SdrHdlKind::UpperRight:
                             case SdrHdlKind::Right:
@@ -1707,7 +1707,7 @@ void OViewsWindow::zoom(const Fraction& _aZoom)
     Resize();
 
     Size aOut = GetOutputSizePixel();
-    aOut.Width() = long(aStartWidth);
+    aOut.setWidth( long(aStartWidth) );
     aOut = PixelToLogic(aOut);
 
     tools::Rectangle aRect(PixelToLogic(Point(0,0)),aOut);
diff --git a/reportdesign/source/ui/report/dlgedfunc.cxx b/reportdesign/source/ui/report/dlgedfunc.cxx
index dd6cd925d460..1f81381d3619 100644
--- a/reportdesign/source/ui/report/dlgedfunc.cxx
+++ b/reportdesign/source/ui/report/dlgedfunc.cxx
@@ -77,16 +77,16 @@ void DlgEdFunc::ForceScroll( const Point& rPos )
     Fraction aStartWidth(long(REPORT_STARTMARKER_WIDTH));
     aStartWidth *= m_pParent->GetMapMode().GetScaleX();
 
-    aOut.Width() -= static_cast<long>(aStartWidth);
+    aOut.setWidth( aOut.Width() - static_cast<long>(aStartWidth) );
     aOut.Height() = m_pParent->GetOutputSizePixel().Height();
 
     Point aPos = pScrollWindow->getThumbPos();
-    aPos.X() *= 0.5;
+    aPos.setX( aPos.X() * 0.5 );
     aPos.Y() *= 0.5;
     tools::Rectangle aOutRect( aPos, aOut );
     aOutRect = m_pParent->PixelToLogic( aOutRect );
     tools::Rectangle aWorkArea(Point(), pScrollWindow->getTotalSize());
-    aWorkArea.Right() -= static_cast<long>(aStartWidth);
+    aWorkArea.SetRight( aWorkArea.Right() - static_cast<long>(aStartWidth) );
     aWorkArea = pScrollWindow->PixelToLogic( aWorkArea );
     if( !aOutRect.IsInside( rPos ) && aWorkArea.IsInside( rPos ) )
     {
@@ -520,14 +520,14 @@ void DlgEdFunc::checkMovementAllowed(const MouseEvent& rMEvt)
             // Don't allow points smaller 0
             if (bControlKeyPressed && (aPnt.Y() < 0))
             {
-                aPnt.Y() = 0;
+                aPnt.setY( 0 );
             }
             if (m_rView.IsDragResize())
             {
                 // we resize the object don't resize to above sections
                 if ( aPnt.Y() < 0 )
                 {
-                    aPnt.Y() = 0;
+                    aPnt.setY( 0 );
                 }
             }
             m_pParent->getSectionWindow()->getViewsWindow()->EndDragObj( bControlKeyPressed, &m_rView, aPnt );
@@ -758,7 +758,7 @@ bool DlgEdFuncInsert::MouseMove( const MouseEvent& rMEvt )
             // we resize the object don't resize to above sections
             if ( aPos.Y() < 0 )
             {
-                aPos.Y() = 0;
+                aPos.setY( 0 );
             }
         }
         bIsSetPoint = setMovementPointer(rMEvt);
@@ -876,7 +876,7 @@ bool DlgEdFuncSelect::MouseMove( const MouseEvent& rMEvt )
                 // we resize the object don't resize to above sections
                 if ( aPnt.Y() < 0 )
                 {
-                    aPnt.Y() = 0;
+                    aPnt.setY( 0 );
                 }
             }
             // drag or resize an object


More information about the Libreoffice-commits mailing list