From 53ad646f54f8aa33b86c696c04500fd08ea6f3b6 Mon Sep 17 00:00:00 2001 From: Matteo Casalin Date: Sun, 28 Oct 2012 23:23:53 +0100 Subject: Enforce use of accessors on gen.hxx structures Change-Id: Icd1b2937fdeaba6de1877258731f53ddf996002e Reviewed-on: https://gerrit.libreoffice.org/936 Reviewed-by: Michael Stahl Tested-by: Michael Stahl --- filter/source/flash/swfwriter1.cxx | 2 +- filter/source/flash/swfwriter2.cxx | 18 +++++++++++------- filter/source/graphicfilter/epict/epict.cxx | 8 ++++---- 3 files changed, 16 insertions(+), 12 deletions(-) (limited to 'filter/source') diff --git a/filter/source/flash/swfwriter1.cxx b/filter/source/flash/swfwriter1.cxx index cce56ee7c4db..3efc36c70c95 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 4b4c7a54137e..b951064dfbcd 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 f8934c1ae4b9..e62bca119ceb 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() -- cgit