[Libreoffice-commits] .: filter/source sc/qa sd/source svx/source sw/source tools/inc vcl/aqua vcl/ios vcl/source vcl/win vcl/workben

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Tue Nov 20 11:33:10 PST 2012


 filter/source/flash/swfwriter1.cxx               |    2 
 filter/source/flash/swfwriter2.cxx               |   18 ++++---
 filter/source/graphicfilter/epict/epict.cxx      |    8 +--
 sc/qa/unit/ucalc.cxx                             |    4 -
 sd/source/filter/eppt/pptx-text.cxx              |    4 -
 sd/source/filter/html/htmlattr.cxx               |    4 -
 sd/source/ui/animations/CustomAnimationList.cxx  |    8 +--
 sd/source/ui/annotations/annotationmanager.cxx   |    8 +--
 sd/source/ui/dlg/headerfooterdlg.cxx             |    8 +--
 sd/source/ui/slideshow/slideshowimpl.cxx         |    4 -
 sd/source/ui/unoidl/unomodel.cxx                 |    2 
 sd/source/ui/view/frmview.cxx                    |   12 ++---
 svx/source/accessibility/ChildrenManagerImpl.cxx |    8 +--
 svx/source/dialog/dlgctrl.cxx                    |   18 +++----
 svx/source/svdraw/svddrgmt.cxx                   |   10 ++--
 svx/source/table/cell.cxx                        |    8 +--
 svx/source/table/svdotable.cxx                   |    4 -
 svx/source/table/tablelayouter.cxx               |   12 ++---
 svx/source/table/tablertfimporter.cxx            |    2 
 sw/source/core/access/accmap.cxx                 |   16 +++----
 sw/source/core/bastyp/swrect.cxx                 |    4 -
 sw/source/core/layout/paintfrm.cxx               |   52 +++++++++++------------
 sw/source/ui/uiview/viewport.cxx                 |   18 ++++---
 tools/inc/tools/gen.hxx                          |   18 ++++---
 tools/inc/tools/vector2d.hxx                     |   14 +++---
 vcl/aqua/source/window/salframe.cxx              |    8 +--
 vcl/aqua/source/window/salmenu.cxx               |    2 
 vcl/ios/source/window/salframe.cxx               |    8 +--
 vcl/source/control/button.cxx                    |    2 
 vcl/source/control/imgctrl.cxx                   |    8 +--
 vcl/source/control/tabctrl.cxx                   |   12 ++---
 vcl/source/gdi/outdev.cxx                        |    6 +-
 vcl/source/gdi/outdev3.cxx                       |    8 +--
 vcl/source/gdi/pdfwriter_impl.cxx                |    8 +--
 vcl/source/window/brdwin.cxx                     |   14 +++---
 vcl/source/window/dockmgr.cxx                    |   36 ++++++++-------
 vcl/source/window/splitwin.cxx                   |    8 +--
 vcl/source/window/syswin.cxx                     |    8 +--
 vcl/source/window/window.cxx                     |   10 ++--
 vcl/win/source/window/salframe.cxx               |    8 +--
 vcl/workben/vcldemo.cxx                          |    4 -
 41 files changed, 214 insertions(+), 202 deletions(-)

New commits:
commit 53ad646f54f8aa33b86c696c04500fd08ea6f3b6
Author: Matteo Casalin <matteo.casalin at gmx.com>
Date:   Sun Oct 28 23:23:53 2012 +0100

    Enforce use of accessors on gen.hxx structures
    
    Change-Id: Icd1b2937fdeaba6de1877258731f53ddf996002e
    Reviewed-on: https://gerrit.libreoffice.org/936
    Reviewed-by: Michael Stahl <mstahl at redhat.com>
    Tested-by: Michael Stahl <mstahl at redhat.com>

diff --git a/filter/source/flash/swfwriter1.cxx b/filter/source/flash/swfwriter1.cxx
index cce56ee..3efc36c 100644
--- a/filter/source/flash/swfwriter1.cxx
+++ b/filter/source/flash/swfwriter1.cxx
@@ -1162,7 +1162,7 @@ void Writer::Impl_writeLine( const Point& rPt1, const Point& rPt2, const Color*
 
 void Writer::Impl_writeRect( const Rectangle& rRect, long nRadX, long nRadY )
 {
-    if( (rRect.nTop == rRect.nBottom) || (rRect.nLeft == rRect.nRight) )
+    if( (rRect.Top() == rRect.Bottom()) || (rRect.Left() == rRect.Right()) )
     {
         Color aColor( mpVDev->GetFillColor() );
         Impl_writeLine( rRect.TopLeft(), rRect.BottomRight(), &aColor );
diff --git a/filter/source/flash/swfwriter2.cxx b/filter/source/flash/swfwriter2.cxx
index 4b4c7a5..b951064 100644
--- a/filter/source/flash/swfwriter2.cxx
+++ b/filter/source/flash/swfwriter2.cxx
@@ -252,23 +252,27 @@ void Tag::writeRect( SvStream& rOut, const Rectangle& rRect )
 
     sal_Int32 minX, minY, maxX, maxY;
 
-    if( rRect.nLeft < rRect.nRight )
+    if( rRect.Left() < rRect.Right() )
     {
-        minX = rRect.nLeft; maxX = rRect.nRight;
+        minX = rRect.Left();
+        maxX = rRect.Right();
     }
     else
     {
-        maxX = rRect.nLeft; minX = rRect.nRight;
+        maxX = rRect.Left();
+        minX = rRect.Right();
     }
 
 
-    if( rRect.nTop < rRect.nBottom )
+    if( rRect.Top() < rRect.Bottom() )
     {
-        minY = rRect.nTop; maxY = rRect.nBottom;
+        minY = rRect.Top();
+        maxY = rRect.Bottom();
     }
     else
     {
-        maxY = rRect.nTop; minY = rRect.nBottom;
+        maxY = rRect.Top();
+        minY = rRect.Bottom();
     }
 
     // AS: Figure out the maximum nubmer of bits required to represent any of the
@@ -665,7 +669,7 @@ void FillStyle::Impl_addGradient( Tag* pTag ) const
     case  GradientStyle_FORCE_EQUAL_SIZE: break;
     }
 
-    m.translate( maBoundRect.nLeft, maBoundRect.nTop );
+    m.translate( maBoundRect.Left(), maBoundRect.Top() );
 
     pTag->addMatrix( m );
 
diff --git a/filter/source/graphicfilter/epict/epict.cxx b/filter/source/graphicfilter/epict/epict.cxx
index f8934c1..e62bca1 100644
--- a/filter/source/graphicfilter/epict/epict.cxx
+++ b/filter/source/graphicfilter/epict/epict.cxx
@@ -327,8 +327,8 @@ Rectangle PictWriter::MapRectangle( const Rectangle& rRect )
     Size    aSize = OutputDevice::LogicToLogic( rRect.GetSize(), aSrcMapMode, aTargetMapMode );
     Rectangle aRect( aPoint, aSize );
     aRect.Justify();
-    aRect.nBottom++;
-    aRect.nRight++;
+    ++aRect.Bottom();
+    ++aRect.Right();
     return aRect;
 }
 
@@ -717,8 +717,8 @@ void PictWriter::WriteOpcode_FontName(const Font & rFont)
 void PictWriter::WriteOpcode_ClipRect( const Rectangle& rRect )
 {
     Rectangle aRect( MapRectangle( rRect ) );
-    aRect.nBottom++;
-    aRect.nRight++;
+    ++aRect.Bottom();
+    ++aRect.Right();
     *pPict  << (sal_uInt16)1    // opcode 1
             << (sal_uInt16)10   // data size
             << (sal_Int16)aRect.Top() << (sal_Int16)aRect.Left()
diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx
index 59a70f8..e3de176 100644
--- a/sc/qa/unit/ucalc.cxx
+++ b/sc/qa/unit/ucalc.cxx
@@ -4232,9 +4232,9 @@ void Test::testGraphicsInGroup()
         m_pDoc->ShowRows(0, 100, 0, false);
         m_pDoc->SetDrawPageSize(0);
         CPPUNIT_ASSERT_MESSAGE("Left and Right should be unchanged",
-            aOrigRect.nLeft == rNewRect.nLeft && aOrigRect.nRight == rNewRect.nRight);
+            aOrigRect.Left() == rNewRect.Left() && aOrigRect.Right() == rNewRect.Right());
         CPPUNIT_ASSERT_MESSAGE("Height should be minimum allowed height",
-            (rNewRect.nBottom - rNewRect.nTop) <= 1);
+            (rNewRect.Bottom() - rNewRect.Top()) <= 1);
         m_pDoc->ShowRows(0, 100, 0, true);
         m_pDoc->SetDrawPageSize(0);
         CPPUNIT_ASSERT_MESSAGE("Should not change when page anchored", aOrigRect == rNewRect);
diff --git a/sd/source/filter/eppt/pptx-text.cxx b/sd/source/filter/eppt/pptx-text.cxx
index bd8d8d4..76e7202 100644
--- a/sd/source/filter/eppt/pptx-text.cxx
+++ b/sd/source/filter/eppt/pptx-text.cxx
@@ -820,8 +820,8 @@ void ParagraphObj::ImplGetNumberingLevel( PPTExBulletProvider& rBuProv, sal_Int1
                                 // don't cast awt::Size to Size as on 64-bits they are not the same.
                                 ::com::sun::star::awt::Size aSize;
                                 pPropValue[ i ].Value >>= aSize;
-                                aBuGraSize.nA = aSize.Width;
-                                aBuGraSize.nB = aSize.Height;
+                                aBuGraSize.A() = aSize.Width;
+                                aBuGraSize.B() = aSize.Height;
                             }
                         }
                         else if ( aPropName == "StartWith" )
diff --git a/sd/source/filter/html/htmlattr.cxx b/sd/source/filter/html/htmlattr.cxx
index 1f56f0c..1d29675 100644
--- a/sd/source/filter/html/htmlattr.cxx
+++ b/sd/source/filter/html/htmlattr.cxx
@@ -54,8 +54,8 @@ void SdHtmlAttrPreview::Paint( const Rectangle& rRect )
     DrawRect(rRect);
     SetFillColor();
 
-    int nHeight = (aTextRect.nBottom - aTextRect.nTop) >> 2;
-    aTextRect.nBottom =  nHeight + aTextRect.nTop;
+    int nHeight = (aTextRect.Bottom() - aTextRect.Top()) >> 2;
+    aTextRect.Bottom() =  nHeight + aTextRect.Top();
 
     SetTextColor(m_aTextColor);
     DrawText( aTextRect, String(SdResId(STR_HTMLATTR_TEXT)),
diff --git a/sd/source/ui/animations/CustomAnimationList.cxx b/sd/source/ui/animations/CustomAnimationList.cxx
index 5a7200f..0df9767 100644
--- a/sd/source/ui/animations/CustomAnimationList.cxx
+++ b/sd/source/ui/animations/CustomAnimationList.cxx
@@ -436,10 +436,10 @@ void CustomAnimationTriggerEntryItem::Paint( const Point& rPos, SvTreeListBox& r
     int nVertBorder = (( aSize.Height() - rDev.GetTextHeight()) >> 1);
     int nHorzBorder = rDev.LogicToPixel( Size( 3, 3 ), MAP_APPFONT ).Width();
 
-    aOutRect.nLeft += nHorzBorder;
-    aOutRect.nRight -= nHorzBorder;
-    aOutRect.nTop += nVertBorder;
-    aOutRect.nBottom -= nVertBorder;
+    aOutRect.Left() += nHorzBorder;
+    aOutRect.Right() -= nHorzBorder;
+    aOutRect.Top() += nVertBorder;
+    aOutRect.Bottom() -= nVertBorder;
 
     rDev.DrawText (aOutRect, rDev.GetEllipsisString( maDescription, aOutRect.GetWidth() ) );
     rDev.Pop();
diff --git a/sd/source/ui/annotations/annotationmanager.cxx b/sd/source/ui/annotations/annotationmanager.cxx
index bae35a7..8678116 100644
--- a/sd/source/ui/annotations/annotationmanager.cxx
+++ b/sd/source/ui/annotations/annotationmanager.cxx
@@ -395,10 +395,10 @@ void AnnotationManagerImpl::InsertAnnotation()
                    for( AnnotationVector::iterator iter = aAnnotations.begin(); iter != aAnnotations.end(); ++iter )
                    {
                        RealPoint2D aPoint( (*iter)->getPosition() );
-                       aTagRect.nLeft   = sal::static_int_cast< long >( aPoint.X * 100.0 );
-                       aTagRect.nTop    = sal::static_int_cast< long >( aPoint.Y * 100.0 );
-                       aTagRect.nRight  = aTagRect.nLeft + width - 1;
-                       aTagRect.nBottom = aTagRect.nTop + height - 1;
+                       aTagRect.Left()   = sal::static_int_cast< long >( aPoint.X * 100.0 );
+                       aTagRect.Top()    = sal::static_int_cast< long >( aPoint.Y * 100.0 );
+                       aTagRect.Right()  = aTagRect.Left() + width - 1;
+                       aTagRect.Bottom() = aTagRect.Top() + height - 1;
 
                        if( aNewRect.IsOver( aTagRect ) )
                        {
diff --git a/sd/source/ui/dlg/headerfooterdlg.cxx b/sd/source/ui/dlg/headerfooterdlg.cxx
index 183f297..74da198 100644
--- a/sd/source/ui/dlg/headerfooterdlg.cxx
+++ b/sd/source/ui/dlg/headerfooterdlg.cxx
@@ -906,10 +906,10 @@ void PresLayoutPreview::Paint( const Rectangle& )
         nWidth = long( (double)(nHeight * maPageSize.Width()) / (double)maPageSize.Height() );
     }
 
-    maOutRect.nLeft += (maOutRect.GetWidth() - nWidth) >> 1;
-    maOutRect.nRight = maOutRect.nLeft + nWidth - 1;
-    maOutRect.nTop += (maOutRect.GetHeight() - nHeight) >> 1;
-    maOutRect.nBottom = maOutRect.nTop + nHeight - 1;
+    maOutRect.Left() += (maOutRect.GetWidth() - nWidth) >> 1;
+    maOutRect.Right() = maOutRect.Left() + nWidth - 1;
+    maOutRect.Top() += (maOutRect.GetHeight() - nHeight) >> 1;
+    maOutRect.Bottom() = maOutRect.Top() + nHeight - 1;
 
     // draw decoration frame
     DecorationView aDecoView( this );
diff --git a/sd/source/ui/slideshow/slideshowimpl.cxx b/sd/source/ui/slideshow/slideshowimpl.cxx
index e0d3c9a..f6c7a14 100644
--- a/sd/source/ui/slideshow/slideshowimpl.cxx
+++ b/sd/source/ui/slideshow/slideshowimpl.cxx
@@ -858,8 +858,8 @@ bool SlideshowImpl::startPreview(
             Rectangle aContentRect (mpViewShell->GetViewShellBase().getClientRectangle());
             if (Application::GetSettings().GetLayoutRTL())
             {
-                aContentRect.nLeft = aContentRect.nRight;
-                aContentRect.nRight += aContentRect.nRight;
+                aContentRect.Left() = aContentRect.Right();
+                aContentRect.Right() += aContentRect.Right();
             }
             maPresSize = aContentRect.GetSize();
             mpShowWindow->SetPosPixel( aContentRect.TopLeft() );
diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx
index 88b43ad..a89fe11 100644
--- a/sd/source/ui/unoidl/unomodel.cxx
+++ b/sd/source/ui/unoidl/unomodel.cxx
@@ -1300,7 +1300,7 @@ uno::Any SAL_CALL SdXImpressDocument::getPropertyValue( const OUString& Property
                     break;
 
                 const Rectangle& aRect = pEmbeddedObj->GetVisArea();
-                awt::Rectangle aVisArea( aRect.nLeft, aRect.nTop, aRect.getWidth(), aRect.getHeight() );
+                awt::Rectangle aVisArea( aRect.Left(), aRect.Top(), aRect.getWidth(), aRect.getHeight() );
                 aAny <<= aVisArea;
             }
             break;
diff --git a/sd/source/ui/view/frmview.cxx b/sd/source/ui/view/frmview.cxx
index 47f80be..e49d3d3 100644
--- a/sd/source/ui/view/frmview.cxx
+++ b/sd/source/ui/view/frmview.cxx
@@ -758,8 +758,8 @@ void FrameView::ReadUserDataSequence ( const ::com::sun::star::uno::Sequence < :
                 if( pValue->Value >>= nTop )
                 {
                     Rectangle aVisArea( GetVisArea() );
-                    aVisArea.nBottom += nTop - aVisArea.nTop;
-                    aVisArea.nTop = nTop;
+                    aVisArea.Bottom() += nTop - aVisArea.Top();
+                    aVisArea.Top() = nTop;
                     SetVisArea( aVisArea );
                 }
             }
@@ -769,8 +769,8 @@ void FrameView::ReadUserDataSequence ( const ::com::sun::star::uno::Sequence < :
                 if( pValue->Value >>= nLeft )
                 {
                     Rectangle aVisArea( GetVisArea() );
-                    aVisArea.nRight += nLeft - aVisArea.nLeft;
-                    aVisArea.nLeft = nLeft;
+                    aVisArea.Right() += nLeft - aVisArea.Left();
+                    aVisArea.Left() = nLeft;
                     SetVisArea( aVisArea );
                 }
             }
@@ -780,7 +780,7 @@ void FrameView::ReadUserDataSequence ( const ::com::sun::star::uno::Sequence < :
                 if( pValue->Value >>= nWidth )
                 {
                     Rectangle aVisArea( GetVisArea() );
-                    aVisArea.nRight = aVisArea.nLeft + nWidth - 1;
+                    aVisArea.Right() = aVisArea.Left() + nWidth - 1;
                     SetVisArea( aVisArea );
                 }
             }
@@ -790,7 +790,7 @@ void FrameView::ReadUserDataSequence ( const ::com::sun::star::uno::Sequence < :
                 if( pValue->Value >>= nHeight )
                 {
                     Rectangle aVisArea( GetVisArea() );
-                    aVisArea.nBottom = nHeight + aVisArea.nTop - 1;
+                    aVisArea.Bottom() = nHeight + aVisArea.Top() - 1;
                     SetVisArea( aVisArea );
                 }
             }
diff --git a/svx/source/accessibility/ChildrenManagerImpl.cxx b/svx/source/accessibility/ChildrenManagerImpl.cxx
index e409eef..d9a92b0 100644
--- a/svx/source/accessibility/ChildrenManagerImpl.cxx
+++ b/svx/source/accessibility/ChildrenManagerImpl.cxx
@@ -305,10 +305,10 @@ void ChildrenManagerImpl::CreateListOfVisibleShapes (
             aPos = xShape->getPosition();
             aSize = xShape->getSize();
 
-            aBoundingBox.nLeft = aPos.X;
-            aBoundingBox.nTop = aPos.Y;
-            aBoundingBox.nRight = aPos.X + aSize.Width;
-            aBoundingBox.nBottom = aPos.Y + aSize.Height;
+            aBoundingBox.Left() = aPos.X;
+            aBoundingBox.Top() = aPos.Y;
+            aBoundingBox.Right() = aPos.X + aSize.Width;
+            aBoundingBox.Bottom() = aPos.Y + aSize.Height;
 
             // Insert shape if it is visible, i.e. its bounding box overlaps
             // the visible area.
diff --git a/svx/source/dialog/dlgctrl.cxx b/svx/source/dialog/dlgctrl.cxx
index c37687a..3b138e7 100644
--- a/svx/source/dialog/dlgctrl.cxx
+++ b/svx/source/dialog/dlgctrl.cxx
@@ -968,7 +968,7 @@ void HatchingLB::UserDraw( const UserDrawEvent& rUDEvt )
     {
         // Draw gradient with borderrectangle
         const Rectangle& rDrawRect = rUDEvt.GetRect();
-        Rectangle aRect( rDrawRect.nLeft+1, rDrawRect.nTop+1, rDrawRect.nLeft+33, rDrawRect.nBottom-1 );
+        Rectangle aRect( rDrawRect.Left()+1, rDrawRect.Top()+1, rDrawRect.Left()+33, rDrawRect.Bottom()-1 );
 
         sal_Int32 nId = rUDEvt.GetItemId();
         if( nId >= 0 && nId <= mpList->Count() )
@@ -995,7 +995,7 @@ void HatchingLB::UserDraw( const UserDrawEvent& rUDEvt )
             pDevice->SetDrawMode( nOldDrawMode );
 
             // Draw name
-            pDevice->DrawText( Point( aRect.nRight+7, aRect.nTop-1 ), mpList->GetHatch( rUDEvt.GetItemId() )->GetName() );
+            pDevice->DrawText( Point( aRect.Right()+7, aRect.Top()-1 ), mpList->GetHatch( rUDEvt.GetItemId() )->GetName() );
         }
     }
 }
@@ -1087,7 +1087,7 @@ void GradientLB::UserDraw( const UserDrawEvent& rUDEvt )
     {
         // Draw gradient with borderrectangle
         const Rectangle& rDrawRect = rUDEvt.GetRect();
-        Rectangle aRect( rDrawRect.nLeft+1, rDrawRect.nTop+1, rDrawRect.nLeft+33, rDrawRect.nBottom-1 );
+        Rectangle aRect( rDrawRect.Left()+1, rDrawRect.Top()+1, rDrawRect.Left()+33, rDrawRect.Bottom()-1 );
 
         sal_Int32 nId = rUDEvt.GetItemId();
         if( nId >= 0 && nId <= mpList->Count() )
@@ -1127,7 +1127,7 @@ void GradientLB::UserDraw( const UserDrawEvent& rUDEvt )
             pDevice->DrawRect( aRect );
 
             // Draw name
-            pDevice->DrawText( Point( aRect.nRight+7, aRect.nTop-1 ), mpList->GetGradient( rUDEvt.GetItemId() )->GetName() );
+            pDevice->DrawText( Point( aRect.Right()+7, aRect.Top()-1 ), mpList->GetGradient( rUDEvt.GetItemId() )->GetName() );
         }
     }
 }
@@ -1268,20 +1268,20 @@ void BitmapLB::UserDraw( const UserDrawEvent& rUDEvt )
     {
         // Draw bitmap
         const Rectangle& rDrawRect = rUDEvt.GetRect();
-        Rectangle aRect( rDrawRect.nLeft+1, rDrawRect.nTop+1, rDrawRect.nLeft+33, rDrawRect.nBottom-1 );
+        Rectangle aRect( rDrawRect.Left()+1, rDrawRect.Top()+1, rDrawRect.Left()+33, rDrawRect.Bottom()-1 );
 
         sal_Int32 nId = rUDEvt.GetItemId();
         if( nId >= 0 && nId <= mpList->Count() )
         {
-            Rectangle aClipRect( rDrawRect.nLeft+1, rDrawRect.nTop+1, rDrawRect.nRight-1, rDrawRect.nBottom-1 );
+            Rectangle aClipRect( rDrawRect.Left()+1, rDrawRect.Top()+1, rDrawRect.Right()-1, rDrawRect.Bottom()-1 );
 
             OutputDevice* pDevice = rUDEvt.GetDevice();
             pDevice->SetClipRegion( Region( aClipRect ) );
 
             aBitmap = mpList->GetBitmap( nId )->GetXBitmap().GetBitmap();
 
-            long nPosBaseX = aRect.nLeft;
-            long nPosBaseY = aRect.nTop;
+            long nPosBaseX = aRect.Left();
+            long nPosBaseY = aRect.Top();
 
             if( aBitmap.GetSizePixel().Width() > 8 ||
                 aBitmap.GetSizePixel().Height() > 8 )
@@ -1303,7 +1303,7 @@ void BitmapLB::UserDraw( const UserDrawEvent& rUDEvt )
             pDevice->SetClipRegion();
 
             // Draw name
-            pDevice->DrawText( Point( aRect.nRight+7, aRect.nTop-1 ), mpList->GetBitmap( nId )->GetName() );
+            pDevice->DrawText( Point( aRect.Right()+7, aRect.Top()-1 ), mpList->GetBitmap( nId )->GetName() );
         }
     }
 }
diff --git a/svx/source/svdraw/svddrgmt.cxx b/svx/source/svdraw/svddrgmt.cxx
index c16bbdb..578251b 100644
--- a/svx/source/svdraw/svddrgmt.cxx
+++ b/svx/source/svdraw/svddrgmt.cxx
@@ -3577,7 +3577,7 @@ bool SdrDragCrop::EndSdrDrag(bool bCopy)
     else
         aGraphicSize = Application::GetDefaultDevice()->LogicToLogic( aGraphicSize, rGraphicObject.GetPrefMapMode(), aMapMode100thmm);
 
-    if( aGraphicSize.nA == 0 || aGraphicSize.nB == 0 )
+    if( aGraphicSize.A() == 0 || aGraphicSize.B() == 0 )
         return false;
 
     const SdrGrafCropItem& rOldCrop = (const SdrGrafCropItem&)pObj->GetMergedItem(SDRATTR_GRAFCROP);
@@ -3613,10 +3613,10 @@ bool SdrDragCrop::EndSdrDrag(bool bCopy)
         aNewRect = Rectangle(aNewRect.TopLeft() - (aNewRect.BottomRight() - aNewRect.TopLeft()), aNewRect.TopLeft());
     }
 
-    sal_Int32 nDiffLeft = aNewRect.nLeft - aOldRect.nLeft;
-    sal_Int32 nDiffTop = aNewRect.nTop - aOldRect.nTop;
-    sal_Int32 nDiffRight = aNewRect.nRight - aOldRect.nRight;
-    sal_Int32 nDiffBottom = aNewRect.nBottom - aOldRect.nBottom;
+    sal_Int32 nDiffLeft = aNewRect.Left() - aOldRect.Left();
+    sal_Int32 nDiffTop = aNewRect.Top() - aOldRect.Top();
+    sal_Int32 nDiffRight = aNewRect.Right() - aOldRect.Right();
+    sal_Int32 nDiffBottom = aNewRect.Bottom() - aOldRect.Bottom();
 
     sal_Int32 nLeftCrop = static_cast<sal_Int32>( rOldCrop.GetLeft() + nDiffLeft * fScaleX );
     sal_Int32 nTopCrop = static_cast<sal_Int32>( rOldCrop.GetTop() + nDiffTop * fScaleY );
diff --git a/svx/source/table/cell.cxx b/svx/source/table/cell.cxx
index 7878426..b759820 100644
--- a/svx/source/table/cell.cxx
+++ b/svx/source/table/cell.cxx
@@ -590,10 +590,10 @@ const Rectangle& Cell::GetCurrentBoundRect() const
 
 void Cell::TakeTextAnchorRect(Rectangle& rAnchorRect) const
 {
-    rAnchorRect.nLeft = maCellRect.nLeft + GetTextLeftDistance();
-    rAnchorRect.nRight = maCellRect.nRight - GetTextRightDistance();
-    rAnchorRect.nTop = maCellRect.nTop + GetTextUpperDistance();
-    rAnchorRect.nBottom = maCellRect.nBottom - GetTextLowerDistance();
+    rAnchorRect.Left() = maCellRect.Left() + GetTextLeftDistance();
+    rAnchorRect.Right() = maCellRect.Right() - GetTextRightDistance();
+    rAnchorRect.Top() = maCellRect.Top() + GetTextUpperDistance();
+    rAnchorRect.Bottom() = maCellRect.Bottom() - GetTextLowerDistance();
 }
 
 // -----------------------------------------------------------------------------
diff --git a/svx/source/table/svdotable.cxx b/svx/source/table/svdotable.cxx
index c8be6a5..6d12c9b 100644
--- a/svx/source/table/svdotable.cxx
+++ b/svx/source/table/svdotable.cxx
@@ -1040,8 +1040,8 @@ TableHitKind SdrTableObj::CheckTableHit( const Point& rPos, sal_Int32& rnX, sal_
     const sal_Int32 nColCount = mpImpl->getColumnCount();
     const sal_Int32 nRowCount = mpImpl->getRowCount();
 
-    sal_Int32 nX = rPos.X() + nTol - aRect.nLeft;
-    sal_Int32 nY = rPos.Y() + nTol - aRect.nTop;
+    sal_Int32 nX = rPos.X() + nTol - aRect.Left();
+    sal_Int32 nY = rPos.Y() + nTol - aRect.Top();
 
     if( (nX < 0) || (nX > (aRect.GetWidth() + nTol)) || (nY < 0) || (nY > (aRect.GetHeight() + nTol) ) )
         return SDRTABLEHIT_NONE;
diff --git a/svx/source/table/tablelayouter.cxx b/svx/source/table/tablelayouter.cxx
index 2a806f0..e5f3ea8 100644
--- a/svx/source/table/tablelayouter.cxx
+++ b/svx/source/table/tablelayouter.cxx
@@ -864,11 +864,11 @@ void TableLayouter::updateCells( Rectangle& rRectangle )
                 getCellArea( aPos, aCellArea );
 
                 Rectangle aCellRect;
-                aCellRect.nLeft = aCellArea.getMinX();
-                aCellRect.nRight = aCellArea.getMaxX();
-                aCellRect.nTop = aCellArea.getMinY();
-                aCellRect.nBottom = aCellArea.getMaxY();
-                aCellRect.Move( rRectangle.nLeft, rRectangle.nTop );
+                aCellRect.Left() = aCellArea.getMinX();
+                aCellRect.Right() = aCellArea.getMaxX();
+                aCellRect.Top() = aCellArea.getMinY();
+                aCellRect.Bottom() = aCellArea.getMaxY();
+                aCellRect.Move( rRectangle.Left(), rRectangle.Top() );
                 xCell->setCellRect( aCellRect );
             }
         }
@@ -1115,7 +1115,7 @@ void TableLayouter::DistributeRows( ::Rectangle& rArea, sal_Int32 nFirstRow, sal
         if( nHeight < nMinHeight )
         {
             sal_Int32 nNeededHeight = nRows * nMinHeight;
-            rArea.nBottom += nNeededHeight - nAllHeight;
+            rArea.Bottom() += nNeededHeight - nAllHeight;
             nHeight = nMinHeight;
             nAllHeight = nRows * nMinHeight;
         }
diff --git a/svx/source/table/tablertfimporter.cxx b/svx/source/table/tablertfimporter.cxx
index a0f6b8a..38a060a 100644
--- a/svx/source/table/tablertfimporter.cxx
+++ b/svx/source/table/tablertfimporter.cxx
@@ -296,7 +296,7 @@ void SdrTableRTFParser::FillTable()
         }
 
         Rectangle aRect( mrTableObj.GetSnapRect() );
-        aRect.nRight = aRect.nLeft + nLastEdge;
+        aRect.Right() = aRect.Left() + nLastEdge;
         mrTableObj.NbcSetSnapRect( aRect );
 
     }
diff --git a/sw/source/core/access/accmap.cxx b/sw/source/core/access/accmap.cxx
index a96de1a..48d6ccd 100644
--- a/sw/source/core/access/accmap.cxx
+++ b/sw/source/core/access/accmap.cxx
@@ -2502,14 +2502,14 @@ static inline void lcl_CorrectRectangle(Rectangle & rRect,
                                         const Rectangle & rSource,
                                         const Rectangle & rInGrid)
 {
-    rRect.nLeft = lcl_CorrectCoarseValue(rRect.nLeft, rSource.nLeft,
-                                         rInGrid.nLeft, false);
-    rRect.nTop = lcl_CorrectCoarseValue(rRect.nTop, rSource.nTop,
-                                        rInGrid.nTop, false);
-    rRect.nRight = lcl_CorrectCoarseValue(rRect.nRight, rSource.nRight,
-                                          rInGrid.nRight, true);
-    rRect.nBottom = lcl_CorrectCoarseValue(rRect.nBottom, rSource.nBottom,
-                                           rInGrid.nBottom, true);
+    rRect.Left() = lcl_CorrectCoarseValue(rRect.Left(), rSource.Left(),
+                                          rInGrid.Left(), false);
+    rRect.Top() = lcl_CorrectCoarseValue(rRect.Top(), rSource.Top(),
+                                         rInGrid.Top(), false);
+    rRect.Right() = lcl_CorrectCoarseValue(rRect.Right(), rSource.Right(),
+                                           rInGrid.Right(), true);
+    rRect.Bottom() = lcl_CorrectCoarseValue(rRect.Bottom(), rSource.Bottom(),
+                                            rInGrid.Bottom(), true);
 }
 
 Rectangle SwAccessibleMap::CoreToPixel( const Rectangle& rRect ) const
diff --git a/sw/source/core/bastyp/swrect.cxx b/sw/source/core/bastyp/swrect.cxx
index e49c31c..670713e 100644
--- a/sw/source/core/bastyp/swrect.cxx
+++ b/sw/source/core/bastyp/swrect.cxx
@@ -229,9 +229,9 @@ void SwRect::SetBottomAndHeight( long nBottom, long nNew )
 void SwRect::SetUpperLeftCorner(  const Point& rNew )
     { m_Point = rNew; }
 void SwRect::SetUpperRightCorner(  const Point& rNew )
-    { m_Point = Point(rNew.nA - m_Size.getWidth(), rNew.nB); }
+    { m_Point = Point(rNew.A() - m_Size.getWidth(), rNew.B()); }
 void SwRect::SetLowerLeftCorner(  const Point& rNew )
-    { m_Point = Point(rNew.nA, rNew.nB - m_Size.getHeight()); }
+    { m_Point = Point(rNew.A(), rNew.B() - m_Size.getHeight()); }
 
 #ifdef DBG_UTIL
 SvStream &operator<<( SvStream &rStream, const SwRect &rRect )
diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx
index 717a253..cee1587 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -6343,15 +6343,6 @@ void SwLayoutFrm::RefreshLaySubsidiary( const SwPageFrm *pPage,
 |*************************************************************************/
 
 //Paints the desired line and pays attention to not overpaint any flys.
-
-typedef long Size::* SizePtr;
-typedef long Point::* PointPtr;
-
-PointPtr pX = &Point::nA;
-PointPtr pY = &Point::nB;
-SizePtr pWidth = &Size::nA;
-SizePtr pHeight = &Size::nB;
-
 // OD 18.11.2002 #99672# - new parameter <_pSubsLines>
 static void lcl_RefreshLine( const SwLayoutFrm *pLay,
                                   const SwPageFrm *pPage,
@@ -6363,14 +6354,19 @@ static void lcl_RefreshLine( const SwLayoutFrm *pLay,
     //In which direction do we loop? Can only be horizontal or vertical.
     OSL_ENSURE( ((rP1.X() == rP2.X()) || (rP1.Y() == rP2.Y())),
             "Sloped subsidiary lines are not allowed." );
-    const PointPtr pDirPt = rP1.X() == rP2.X() ? pY : pX;
-    const PointPtr pOthPt = pDirPt == pX ? pY : pX;
-    const SizePtr pDirSz = pDirPt == pX ? pWidth : pHeight;
-    const SizePtr pOthSz = pDirSz == pWidth ? pHeight : pWidth;
-    Point aP1( rP1 ),
-          aP2( rP2 );
 
-    while ( aP1.*pDirPt < aP2.*pDirPt )
+    const bool bHori = rP1.Y() == rP2.Y();
+
+    // use pointers to member function in order to unify flow
+    typedef long& (Point:: *pmfPt)();
+    const pmfPt pmfPtX = &Point::X;
+    const pmfPt pmfPtY = &Point::Y;
+    const pmfPt pDirPt = bHori ? pmfPtX : pmfPtY;
+
+    Point aP1( rP1 );
+    Point aP2( rP2 );
+
+    while ( (aP1.*pDirPt)() < (aP2.*pDirPt)() )
     {
         //If the starting point lies in a fly, it is directly set behind the
         //fly.
@@ -6421,24 +6417,28 @@ static void lcl_RefreshLine( const SwLayoutFrm *pLay,
             }
 
             //Is the Obj placed on the line
+            const long nP1OthPt = !bHori ? rP1.X() : rP1.Y();
             const Rectangle &rBound = pObj->GetCurrentBoundRect();
             const Point aDrPt( rBound.TopLeft() );
+            const long nDrOthPt = !bHori ? aDrPt.X() : aDrPt.Y();
             const Size  aDrSz( rBound.GetSize() );
-            if ( rP1.*pOthPt >= aDrPt.*pOthPt &&
-                 rP1.*pOthPt <= (aDrPt.*pOthPt + aDrSz.*pOthSz) )
+            const long nDrOthSz = !bHori ? aDrSz.Width() : aDrSz.Height();
+
+            if ( nP1OthPt >= nDrOthPt && nP1OthPt <= nDrOthPt + nDrOthSz )
             {
-                if ( aP1.*pDirPt >= aDrPt.*pDirPt &&
-                         aP1.*pDirPt <= (aDrPt.*pDirPt + aDrSz.*pDirSz) )
-                    aP1.*pDirPt = aDrPt.*pDirPt + aDrSz.*pDirSz;
+                const long nDrDirPt = bHori ? aDrPt.X() : aDrPt.Y();
+                const long nDrDirSz = bHori ? aDrSz.Width() : aDrSz.Height();
+
+                if ( (aP1.*pDirPt)() >= nDrDirPt && (aP1.*pDirPt)() <= nDrDirPt + nDrDirSz )
+                    (aP1.*pDirPt)() = nDrDirPt + nDrDirSz;
 
-                if ( aP2.*pDirPt >= aDrPt.*pDirPt &&
-                     aP1.*pDirPt < (aDrPt.*pDirPt - 1) )
-                    aP2.*pDirPt = aDrPt.*pDirPt - 1;
+                if ( (aP2.*pDirPt)() >= nDrDirPt && (aP1.*pDirPt)() < (nDrDirPt - 1) )
+                    (aP2.*pDirPt)() = nDrDirPt - 1;
             }
             aIter.Next();
         }
 
-        if ( aP1.*pDirPt < aP2.*pDirPt )
+        if ( (aP1.*pDirPt)() < (aP2.*pDirPt)() )
         {
             SwRect aRect( aP1, aP2 );
             // OD 18.11.2002 #99672# - use parameter <_pSubsLines> instead of
@@ -6447,7 +6447,7 @@ static void lcl_RefreshLine( const SwLayoutFrm *pLay,
                     0, nSubColor );
         }
         aP1 = aP2;
-        aP1.*pDirPt += 1;
+        (aP1.*pDirPt)() += 1;
         aP2 = rP2;
     }
 }
diff --git a/sw/source/ui/uiview/viewport.cxx b/sw/source/ui/uiview/viewport.cxx
index 6b0b806..967b410 100644
--- a/sw/source/ui/uiview/viewport.cxx
+++ b/sw/source/ui/uiview/viewport.cxx
@@ -89,14 +89,13 @@ static void lcl_GetPos(SwView* pView,
     const Size aDocSz( rSh.GetDocSize() );
 
     const long lBorder = bBorder ? DOCUMENTBORDER : DOCUMENTBORDER * 2;
-    sal_Bool bHori = pScrollbar->IsHoriScroll();
+    const bool bHori = pScrollbar->IsHoriScroll();
 
     const long lPos = pScrollbar->GetThumbPos() + (bBorder ? DOCUMENTBORDER : 0);
-    long Point:: *pPt = bHori ? &Point::nA : &Point::nB;
-    long Size::  *pSz = bHori ? &Size::nA  : &Size::nB;
 
-    long lDelta = lPos - rSh.VisArea().Pos().*pPt;
-    const long lSize = aDocSz.*pSz + lBorder;
+    long lDelta = lPos - (bHori ? rSh.VisArea().Pos().X() : rSh.VisArea().Pos().Y());
+
+    const long lSize = (bHori ? aDocSz.A() : aDocSz.B()) + lBorder;
     // sollte rechts oder unten zuviel Wiese sein, dann muss
     // diese von der VisArea herausgerechnet werden!
     long nTmp = pView->GetVisArea().Right()+lDelta;
@@ -106,9 +105,12 @@ static void lcl_GetPos(SwView* pView,
     if ( !bHori && nTmp > lSize )
         lDelta -= nTmp - lSize;
 
-    rPos.*pPt += lDelta;
-    if ( bBorder && rPos.*pPt < DOCUMENTBORDER )
-        rPos.*pPt = DOCUMENTBORDER;
+    // use a reference to access/moodify the correct coordinate
+    // returned by accessors to non-const object
+    long & rCoord = bHori ? rPos.X() : rPos.Y();
+    rCoord += lDelta;
+    if ( bBorder && rCoord < DOCUMENTBORDER )
+        rCoord = DOCUMENTBORDER;
 }
 
 /*--------------------------------------------------------------------
diff --git a/tools/inc/tools/gen.hxx b/tools/inc/tools/gen.hxx
index 7c93792..6c93e2b 100644
--- a/tools/inc/tools/gen.hxx
+++ b/tools/inc/tools/gen.hxx
@@ -31,9 +31,6 @@ class SvStream;
 class SAL_WARN_UNUSED Pair
 {
 public:
-    long                nA;
-    long                nB;
-
                         Pair();
                         Pair( long nA, long nB );
 
@@ -48,6 +45,10 @@ public:
 
     TOOLS_DLLPUBLIC friend SvStream&    operator>>( SvStream& rIStream, Pair& rPair );
     TOOLS_DLLPUBLIC friend SvStream&    operator<<( SvStream& rOStream, const Pair& rPair );
+
+protected:
+    long                nA;
+    long                nB;
 };
 
 inline Pair::Pair()
@@ -329,11 +330,6 @@ inline void Selection::Justify()
 class TOOLS_DLLPUBLIC SAL_WARN_UNUSED Rectangle
 {
 public:
-    long                nLeft;
-    long                nTop;
-    long                nRight;
-    long                nBottom;
-
                         Rectangle();
                         Rectangle( const Point& rLT, const Point& rRB );
                         Rectangle( long nLeft, long nTop,
@@ -404,6 +400,12 @@ public:
     void                setY( long n ) { nBottom += n-nTop; nTop = n; }
     void                setWidth( long n ) { nRight = nLeft + n; }
     void                setHeight( long n ) { nBottom = nTop + n; }
+
+private:
+    long                nLeft;
+    long                nTop;
+    long                nRight;
+    long                nBottom;
 };
 
 inline Rectangle::Rectangle()
diff --git a/tools/inc/tools/vector2d.hxx b/tools/inc/tools/vector2d.hxx
index 50c6bc8..d3d1c5c 100644
--- a/tools/inc/tools/vector2d.hxx
+++ b/tools/inc/tools/vector2d.hxx
@@ -33,7 +33,7 @@ public:
     inline Vector2D() : mfX( 0.0 ), mfY( 0.0 ) {}
     inline Vector2D( double fX, double fY ) : mfX( fX ), mfY( fY ) {}
     inline Vector2D( const Vector2D& rVec ) : mfX( rVec.mfX ), mfY( rVec.mfY ) {}
-    inline Vector2D( const Pair& rPair ) : mfX( rPair.nA ), mfY( rPair.nB ) {};
+    inline Vector2D( const Pair& rPair ) : mfX( rPair.A() ), mfY( rPair.B() ) {};
     inline ~Vector2D() {}
 
     inline const double& X() const { return mfX; }
@@ -79,13 +79,13 @@ public:
     inline sal_Bool     operator!=( const Vector2D& rVec ) const { return !( *this == rVec ); }
 
     inline Vector2D&    operator=( const Vector2D& rVec ) { mfX = rVec.mfX, mfY = rVec.mfY; return *this; }
-    inline Vector2D&    operator=( const Pair& rPair ) { mfX = rPair.nA, mfY = rPair.nB; return *this; }
-    inline Vector2D&    operator-=( const Pair& rPair ) { mfX -= rPair.nA, mfY -= rPair.nB; return *this; }
-    inline Vector2D&    operator+=( const Pair& rPair ) { mfX += rPair.nA, mfY += rPair.nB; return *this; }
-    inline Vector2D&    operator*=( const Pair& rPair ) { mfX *= rPair.nA, mfY *= rPair.nB; return *this; }
-    inline Vector2D&    operator/=( const Pair& rPair ) { mfX /= rPair.nA, mfY /= rPair.nB; return *this; }
+    inline Vector2D&    operator=( const Pair& rPair ) { mfX = rPair.A(), mfY = rPair.B(); return *this; }
+    inline Vector2D&    operator-=( const Pair& rPair ) { mfX -= rPair.A(), mfY -= rPair.B(); return *this; }
+    inline Vector2D&    operator+=( const Pair& rPair ) { mfX += rPair.A(), mfY += rPair.B(); return *this; }
+    inline Vector2D&    operator*=( const Pair& rPair ) { mfX *= rPair.A(), mfY *= rPair.B(); return *this; }
+    inline Vector2D&    operator/=( const Pair& rPair ) { mfX /= rPair.A(), mfY /= rPair.B(); return *this; }
 
-    inline sal_Bool     operator==( const Pair& rPair ) const { return( mfX == rPair.nA && mfY == rPair.nB ); }
+    inline sal_Bool     operator==( const Pair& rPair ) const { return( mfX == rPair.A() && mfY == rPair.B() ); }
     inline sal_Bool     operator!=( const Pair& rPair ) const { return !( *this == rPair ); }
 
     inline sal_Bool     IsPositive( Vector2D& rVec ) const { return( ( mfX * rVec.mfY - mfY * rVec.mfX ) >= 0.0 ); }
diff --git a/vcl/aqua/source/window/salframe.cxx b/vcl/aqua/source/window/salframe.cxx
index 3215941..614660d 100644
--- a/vcl/aqua/source/window/salframe.cxx
+++ b/vcl/aqua/source/window/salframe.cxx
@@ -1442,10 +1442,10 @@ void AquaSalFrame::GetWorkArea( Rectangle& rRect )
         pScreen = [NSScreen mainScreen];
     NSRect aRect = [pScreen visibleFrame];
     CocoaToVCL( aRect );
-    rRect.nLeft     = static_cast<long>(aRect.origin.x);
-    rRect.nTop      = static_cast<long>(aRect.origin.y);
-    rRect.nRight    = static_cast<long>(aRect.origin.x + aRect.size.width - 1);
-    rRect.nBottom   = static_cast<long>(aRect.origin.y + aRect.size.height - 1);
+    rRect.Left()     = static_cast<long>(aRect.origin.x);
+    rRect.Top()      = static_cast<long>(aRect.origin.y);
+    rRect.Right()    = static_cast<long>(aRect.origin.x + aRect.size.width - 1);
+    rRect.Bottom()   = static_cast<long>(aRect.origin.y + aRect.size.height - 1);
 }
 
 SalPointerState AquaSalFrame::GetPointerState()
diff --git a/vcl/aqua/source/window/salmenu.cxx b/vcl/aqua/source/window/salmenu.cxx
index 96889a9..dda138c 100644
--- a/vcl/aqua/source/window/salmenu.cxx
+++ b/vcl/aqua/source/window/salmenu.cxx
@@ -370,7 +370,7 @@ bool AquaSalMenu::ShowNativePopupMenu(FloatingWindow * pWin, const Rectangle& rR
     removeUnusedItemsRunner( pCopyMenu );
 
     // create frame rect
-    NSRect displayPopupFrame = NSMakeRect( rRect.nLeft+(offset-1), rRect.nTop+(offset+1), popupFrame.size.width, 0 );
+    NSRect displayPopupFrame = NSMakeRect( rRect.Left()+(offset-1), rRect.Top()+(offset+1), popupFrame.size.width, 0 );
     pParentAquaSalFrame->VCLToCocoa(displayPopupFrame, false);
 
     // do the same strange semantics as vcl popup windows to arrive at a frame geometry
diff --git a/vcl/ios/source/window/salframe.cxx b/vcl/ios/source/window/salframe.cxx
index 08562e3..91b0909 100644
--- a/vcl/ios/source/window/salframe.cxx
+++ b/vcl/ios/source/window/salframe.cxx
@@ -860,10 +860,10 @@ void IosSalFrame::GetWorkArea( Rectangle& rRect )
         pScreen = [UIScreen mainScreen];
     CGRect aRect = [pScreen applicationFrame];
     CocoaTouchToVCL( aRect );
-    rRect.nLeft     = static_cast<long>(aRect.origin.x);
-    rRect.nTop      = static_cast<long>(aRect.origin.y);
-    rRect.nRight    = static_cast<long>(aRect.origin.x + aRect.size.width - 1);
-    rRect.nBottom   = static_cast<long>(aRect.origin.y + aRect.size.height - 1);
+    rRect.Left()     = static_cast<long>(aRect.origin.x);
+    rRect.Top()      = static_cast<long>(aRect.origin.y);
+    rRect.Right()    = static_cast<long>(aRect.origin.x + aRect.size.width - 1);
+    rRect.Bottom()   = static_cast<long>(aRect.origin.y + aRect.size.height - 1);
 }
 
 SalPointerState IosSalFrame::GetPointerState()
diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx
index f27de4e..b71ca99 100644
--- a/vcl/source/control/button.cxx
+++ b/vcl/source/control/button.cxx
@@ -829,7 +829,7 @@ void PushButton::ImplDrawPushButtonContent( OutputDevice* pDev, sal_uLong nDrawF
     sal_uInt16                  nTextStyle = ImplGetTextStyle( nDrawFlags );
     sal_uInt16                  nStyle;
 
-    if( aInRect.nRight < aInRect.nLeft || aInRect.nBottom < aInRect.nTop )
+    if( aInRect.Right() < aInRect.Left() || aInRect.Bottom() < aInRect.Top() )
         aInRect.SetEmpty();
 
     pDev->Push( PUSH_CLIPREGION );
diff --git a/vcl/source/control/imgctrl.cxx b/vcl/source/control/imgctrl.cxx
index 3c28bb8..0f0369c 100644
--- a/vcl/source/control/imgctrl.cxx
+++ b/vcl/source/control/imgctrl.cxx
@@ -166,10 +166,10 @@ void ImageControl::Paint( const Rectangle& /*rRect*/ )
         pWin->SetFillColor();
         pWin->SetLineColor( bFlat ? COL_WHITE : COL_BLACK );
         pWin->DrawRect( aRect );
-        aRect.nLeft++;
-        aRect.nRight--;
-        aRect.nTop++;
-        aRect.nBottom--;
+        ++aRect.Left();
+        --aRect.Right();
+        ++aRect.Top();
+        --aRect.Bottom();
         pWin->SetLineColor( bFlat ? COL_BLACK : COL_WHITE );
         pWin->DrawRect( aRect );
         pWin->SetLineColor( oldLineCol );
diff --git a/vcl/source/control/tabctrl.cxx b/vcl/source/control/tabctrl.cxx
index dd04873..4e1afc2 100644
--- a/vcl/source/control/tabctrl.cxx
+++ b/vcl/source/control/tabctrl.cxx
@@ -1553,9 +1553,9 @@ long TabControl::PreNotify( NotifyEvent& rNEvt )
                         // as used by gtk
                         // TODO: query for the correct sizes
                         Rectangle aRect(*pLastRect);
-                        aRect.nLeft-=2;
-                        aRect.nRight+=2;
-                        aRect.nTop-=3;
+                        aRect.Left()-=2;
+                        aRect.Right()+=2;
+                        aRect.Top()-=3;
                         aClipRgn.Union( aRect );
                     }
                     if( pRect )
@@ -1564,9 +1564,9 @@ long TabControl::PreNotify( NotifyEvent& rNEvt )
                         // as used by gtk
                         // TODO: query for the correct sizes
                         Rectangle aRect(*pRect);
-                        aRect.nLeft-=2;
-                        aRect.nRight+=2;
-                        aRect.nTop-=3;
+                        aRect.Left()-=2;
+                        aRect.Right()+=2;
+                        aRect.Top()-=3;
                         aClipRgn.Union( aRect );
                     }
                     if( !aClipRgn.IsEmpty() )
diff --git a/vcl/source/gdi/outdev.cxx b/vcl/source/gdi/outdev.cxx
index f266bf7..d34cea9 100644
--- a/vcl/source/gdi/outdev.cxx
+++ b/vcl/source/gdi/outdev.cxx
@@ -530,14 +530,14 @@ void    OutputDevice::ImplReMirror( Point &rPoint ) const
 }
 void    OutputDevice::ImplReMirror( Rectangle &rRect ) const
 {
-    long nWidth = rRect.nRight - rRect.nLeft;
+    long nWidth = rRect.Right() - rRect.Left();
 
     //long lc_x = rRect.nLeft - mnOutOffX;    // normalize
     //lc_x = mnOutWidth - nWidth - 1 - lc_x;  // mirror
     //rRect.nLeft = lc_x + mnOutOffX;         // re-normalize
 
-    rRect.nLeft = mnOutOffX + mnOutWidth - nWidth - 1 - rRect.nLeft + mnOutOffX;
-    rRect.nRight = rRect.nLeft + nWidth;
+    rRect.Left() = mnOutOffX + mnOutWidth - nWidth - 1 - rRect.Left() + mnOutOffX;
+    rRect.Right() = rRect.Left() + nWidth;
 }
 void    OutputDevice::ImplReMirror( Region &rRegion ) const
 {
diff --git a/vcl/source/gdi/outdev3.cxx b/vcl/source/gdi/outdev3.cxx
index d3cfb45..00b9cc3 100644
--- a/vcl/source/gdi/outdev3.cxx
+++ b/vcl/source/gdi/outdev3.cxx
@@ -4178,10 +4178,10 @@ void OutputDevice::ImplDrawStrikeoutChar( long nBaseX, long nBaseY,
     pLayout->DrawBase() = Point( nBaseX+mnTextOffX, nBaseY+mnTextOffY );
 
     Rectangle aPixelRect;
-    aPixelRect.nLeft = nBaseX+mnTextOffX;
-    aPixelRect.nRight = aPixelRect.nLeft+nWidth;
-    aPixelRect.nBottom = nBaseY+mpFontEntry->maMetric.mnDescent;
-    aPixelRect.nTop = nBaseY-mpFontEntry->maMetric.mnAscent;
+    aPixelRect.Left() = nBaseX+mnTextOffX;
+    aPixelRect.Right() = aPixelRect.Left()+nWidth;
+    aPixelRect.Bottom() = nBaseY+mpFontEntry->maMetric.mnDescent;
+    aPixelRect.Top() = nBaseY-mpFontEntry->maMetric.mnAscent;
 
     if (mpFontEntry->mnOrientation)
     {
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index 73c349c..e93b111 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -8645,10 +8645,10 @@ void PDFWriterImpl::drawStrikeoutChar( const Point& rPos, long nWidth, FontStrik
     push( PUSH_CLIPREGION );
     FontMetric aRefDevFontMetric = m_pReferenceDevice->GetFontMetric();
     Rectangle aRect;
-    aRect.nLeft = rPos.X();
-    aRect.nRight = aRect.nLeft+nWidth;
-    aRect.nBottom = rPos.Y()+aRefDevFontMetric.GetDescent();
-    aRect.nTop = rPos.Y()-aRefDevFontMetric.GetAscent();
+    aRect.Left() = rPos.X();
+    aRect.Right() = aRect.Left()+nWidth;
+    aRect.Bottom() = rPos.Y()+aRefDevFontMetric.GetDescent();
+    aRect.Top() = rPos.Y()-aRefDevFontMetric.GetAscent();
 
     ImplFontEntry* pFontEntry = m_pReferenceDevice->mpFontEntry;
     if (pFontEntry->mnOrientation)
diff --git a/vcl/source/window/brdwin.cxx b/vcl/source/window/brdwin.cxx
index 34ae191..9fea710 100644
--- a/vcl/source/window/brdwin.cxx
+++ b/vcl/source/window/brdwin.cxx
@@ -134,10 +134,10 @@ static void ImplDrawBrdWinSymbolButton( OutputDevice* pDev,
                                             sal_True, sal_False );
         }
         aTempRect = rRect;
-        aTempRect.nLeft+=3;
-        aTempRect.nRight-=4;
-        aTempRect.nTop+=3;
-        aTempRect.nBottom-=4;
+        aTempRect.Left()+=3;
+        aTempRect.Right()-=4;
+        aTempRect.Top()+=3;
+        aTempRect.Bottom()-=4;
     }
     else
     {
@@ -1690,8 +1690,10 @@ void ImplStdBorderWindowView::DrawWindow( sal_uInt16 nDrawFlags, OutputDevice* p
         pDev->SetLineColor( aFrameColor );
         pDev->SetFillColor();
         pDev->DrawRect( aInRect );
-        aInRect.nLeft++; aInRect.nRight--;
-        aInRect.nTop++; aInRect.nBottom--;
+        ++aInRect.Left();
+        --aInRect.Right();
+        ++aInRect.Top();
+        --aInRect.Bottom();
 
         // restore
         if ( pData->mnTitleType == BORDERWINDOW_TITLE_POPUP )
diff --git a/vcl/source/window/dockmgr.cxx b/vcl/source/window/dockmgr.cxx
index e523025..c48a7f8 100644
--- a/vcl/source/window/dockmgr.cxx
+++ b/vcl/source/window/dockmgr.cxx
@@ -190,9 +190,9 @@ IMPL_LINK_NOARG(ImplDockFloatWin2, DockingHdl)
             sal_Int32 nLeft, nTop, nRight, nBottom;
             GetBorder( nLeft, nTop, nRight, nBottom );
             // limit borderrect to the caption part only and without the resizing borders
-            aBorderRect.nBottom = aBorderRect.nTop + nTop;
-            aBorderRect.nLeft += nLeft;
-            aBorderRect.nRight -= nRight;
+            aBorderRect.Bottom() = aBorderRect.Top() + nTop;
+            aBorderRect.Left() += nLeft;
+            aBorderRect.Right() -= nRight;
 
             PointerState aBorderState = pBorder->GetPointerState();
             if( aBorderRect.IsInside( aBorderState.maPos ) )
@@ -675,10 +675,10 @@ void ImplPopupFloatWin::DrawGrip()
 
     // draw background
     Rectangle aRect( GetDragRect() );
-    aRect.nTop      += POPUP_DRAGBORDER;
-    aRect.nBottom   -= POPUP_DRAGBORDER;
-    aRect.nLeft+=3;
-    aRect.nRight-=3;
+    aRect.Top()      += POPUP_DRAGBORDER;
+    aRect.Bottom()   -= POPUP_DRAGBORDER;
+    aRect.Left()+=3;
+    aRect.Right()-=3;
 
     if( mbHighlight )
     {
@@ -701,16 +701,18 @@ void ImplPopupFloatWin::DrawGrip()
         aLineInfo.SetDashLen( 12 );
         aLineInfo.SetDashCount( 1 );
 
-        aRect.nLeft+=2; aRect.nRight-=2;
+        aRect.Left()+=2;
+        aRect.Right()-=2;
 
-        aRect.nTop+=2;
-        aRect.nBottom = aRect.nTop;
+        aRect.Top()+=2;
+        aRect.Bottom() = aRect.Top();
         SetLineColor( GetSettings().GetStyleSettings().GetDarkShadowColor() );
         DrawLine( aRect.TopLeft(), aRect.TopRight(), aLineInfo );
 
         if( !mbHighlight )
         {
-            aRect.nTop++; aRect.nBottom++;
+            ++aRect.Top();
+            ++aRect.Bottom();
             SetLineColor( GetSettings().GetStyleSettings().GetLightColor() );
             DrawLine( aRect.TopLeft(), aRect.TopRight(), aLineInfo );
         }
@@ -718,8 +720,8 @@ void ImplPopupFloatWin::DrawGrip()
 #else
         // draw several grip lines
         SetFillColor( GetSettings().GetStyleSettings().GetShadowColor() );
-        aRect.nTop++;
-        aRect.nBottom = aRect.nTop;
+        aRect.Top()++;
+        aRect.Bottom() = aRect.Top();
 
         int width = POPUP_DRAGWIDTH;
         while( width >= aRect.getWidth() )
@@ -727,15 +729,15 @@ void ImplPopupFloatWin::DrawGrip()
         if( width <= 0 )
             width = aRect.getWidth();
         //aRect.nLeft = aRect.nLeft + (aRect.getWidth() - width) / 2;
-        aRect.nLeft = (aRect.nLeft + aRect.nRight - width) / 2;
-        aRect.nRight = aRect.nLeft + width;
+        aRect.Left() = (aRect.Left() + aRect.Right() - width) / 2;
+        aRect.Right() = aRect.Left() + width;
 
         int i=0;
         while( i< POPUP_DRAGGRIP )
         {
             DrawRect( aRect );
-            aRect.nTop+=2;
-            aRect.nBottom+=2;
+            aRect.Top()+=2;
+            aRect.Bottom()+=2;
             i+=2;
         }
 #endif
diff --git a/vcl/source/window/splitwin.cxx b/vcl/source/window/splitwin.cxx
index 22d2646..e3eb5c1 100644
--- a/vcl/source/window/splitwin.cxx
+++ b/vcl/source/window/splitwin.cxx
@@ -1973,9 +1973,9 @@ void SplitWindow::ImplDrawGrip( const Rectangle& rRect, sal_Bool bHorz, sal_Bool
     if( bHorz )
     {
         int width = (int) (0.5 * rRect.getWidth() + 0.5);
-        int i = rRect.nLeft + (rRect.getWidth() - width) / 2;
+        int i = rRect.Left() + (rRect.getWidth() - width) / 2;
         width += i;
-        const int y = rRect.nTop + 1;
+        const int y = rRect.Top() + 1;
         ImplDrawFadeArrow( Point( i-8, y), bHorz, bLeft );
         while( i <= width )
         {
@@ -1996,9 +1996,9 @@ void SplitWindow::ImplDrawGrip( const Rectangle& rRect, sal_Bool bHorz, sal_Bool
     else
     {
         int height = (int) (0.5 * rRect.getHeight() + 0.5);
-        int i = rRect.nTop + (rRect.getHeight() - height) / 2;
+        int i = rRect.Top() + (rRect.getHeight() - height) / 2;
         height += i;
-        const int x = rRect.nLeft + 1;
+        const int x = rRect.Left() + 1;
         ImplDrawFadeArrow( Point( x, i-8), bHorz, bLeft );
         while( i <= height )
         {
diff --git a/vcl/source/window/syswin.cxx b/vcl/source/window/syswin.cxx
index 835d874..6338236 100644
--- a/vcl/source/window/syswin.cxx
+++ b/vcl/source/window/syswin.cxx
@@ -718,15 +718,15 @@ void SystemWindow::SetWindowStateData( const WindowStateData& rData )
                         if( abs(g.nX-aState.mnX) < 2 && abs(g.nY-aState.mnY) < 5 )
                         {
                             long displacement = g.nTopDecoration ? g.nTopDecoration : 20;
-                            if( (unsigned long) (aState.mnX + displacement + aState.mnWidth + g.nRightDecoration) > (unsigned long) aDesktop.nRight ||
-                                (unsigned long) (aState.mnY + displacement + aState.mnHeight + g.nBottomDecoration) > (unsigned long) aDesktop.nBottom )
+                            if( (unsigned long) (aState.mnX + displacement + aState.mnWidth + g.nRightDecoration) > (unsigned long) aDesktop.Right() ||
+                                (unsigned long) (aState.mnY + displacement + aState.mnHeight + g.nBottomDecoration) > (unsigned long) aDesktop.Bottom() )
                             {
                                 // displacing would leave screen
                                 aState.mnX = g.nLeftDecoration ? g.nLeftDecoration : 10; // should result in (0,0)
                                 aState.mnY = displacement;
                                 if( bWrapped ||
-                                    (unsigned long) (aState.mnX + displacement + aState.mnWidth + g.nRightDecoration) > (unsigned long) aDesktop.nRight ||
-                                    (unsigned long) (aState.mnY + displacement + aState.mnHeight + g.nBottomDecoration) > (unsigned long) aDesktop.nBottom )
+                                    (unsigned long) (aState.mnX + displacement + aState.mnWidth + g.nRightDecoration) > (unsigned long) aDesktop.Right() ||
+                                    (unsigned long) (aState.mnY + displacement + aState.mnHeight + g.nBottomDecoration) > (unsigned long) aDesktop.Bottom() )
                                     break;  // further displacement not possible -> break
                                 // avoid endless testing
                                 bWrapped = sal_True;
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index 661462e..22c35fa 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -7101,7 +7101,7 @@ void Window::setPosSizePixel( long nX, long nY,
                 // --- RTL --- (re-mirror at parent window)
                 Rectangle aRect( Point ( nX, nY ), Size( nWidth, nHeight ) );
                 GetParent()->ImplReMirror( aRect );
-                nX = aRect.nLeft;
+                nX = aRect.Left();
             }
         }
         if( !(nFlags & WINDOW_POSSIZE_X) && bHasValidSize && pWindow->mpWindowImpl->mpFrame->maGeometry.nWidth )
@@ -9103,10 +9103,10 @@ void Window::DrawSelectionBackground( const Rectangle& rRect,
     Rectangle aRect( rRect );
     if( bDrawExtBorderOnly )
     {
-        aRect.nLeft     -= 1;
-        aRect.nTop      -= 1;
-        aRect.nRight    += 1;
-        aRect.nBottom   += 1;
+        --aRect.Left();
+        --aRect.Top();
+        ++aRect.Right();
+        ++aRect.Bottom();
     }
     Color oldFillCol = GetFillColor();
     Color oldLineCol = GetLineColor();
diff --git a/vcl/win/source/window/salframe.cxx b/vcl/win/source/window/salframe.cxx
index 33ea85a..4fb8e6c 100644
--- a/vcl/win/source/window/salframe.cxx
+++ b/vcl/win/source/window/salframe.cxx
@@ -1691,10 +1691,10 @@ void WinSalFrame::GetWorkArea( Rectangle &rRect )
 {
     RECT aRect;
     ImplSalGetWorkArea( mhWnd, &aRect, NULL );
-    rRect.nLeft     = aRect.left;
-    rRect.nRight    = aRect.right-1;
-    rRect.nTop      = aRect.top;
-    rRect.nBottom   = aRect.bottom-1;
+    rRect.Left()     = aRect.left;
+    rRect.Right()    = aRect.right-1;
+    rRect.Top()      = aRect.top;
+    rRect.Bottom()   = aRect.bottom-1;
 }
 
 // -----------------------------------------------------------------------
diff --git a/vcl/workben/vcldemo.cxx b/vcl/workben/vcldemo.cxx
index 76b7723..34a2c9a 100644
--- a/vcl/workben/vcldemo.cxx
+++ b/vcl/workben/vcldemo.cxx
@@ -152,9 +152,9 @@ void MyWin::Paint( const Rectangle& rRect )
     DrawRect( r );
 
     for(int i=0; i<aSz.Height(); i+=15)
-        DrawLine( Point(r.nLeft, r.nTop+i), Point(r.nRight, r.nBottom-i) );
+        DrawLine( Point(r.Left(), r.Top()+i), Point(r.Right(), r.Bottom()-i) );
     for(int i=0; i<aSz.Width(); i+=15)
-        DrawLine( Point(r.nLeft+i, r.nBottom), Point(r.nRight-i, r.nTop) );
+        DrawLine( Point(r.Left()+i, r.Bottom()), Point(r.Right()-i, r.Top()) );
 
     SetTextColor( Color( COL_WHITE ) );
     Font aFont( String( RTL_CONSTASCII_USTRINGPARAM( "Times" ) ), Size( 0, 25 ) );


More information about the Libreoffice-commits mailing list