summaryrefslogtreecommitdiff
path: root/emfio
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-02-13 15:49:10 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-02-14 07:27:50 +0100
commit2096aac8b958db66b3ddce16b06dca87edc8ba0a (patch)
tree68f5972ea90c5f434deaa1e29f5ce1e710634fa4 /emfio
parenta9ca38bdf7ff9d15529b5903e640987fc14c0fa7 (diff)
loplugin:changetoolsgen in editeng..extensions
Change-Id: I476fd8b988216a300c57fcf184ea3742139363fe Reviewed-on: https://gerrit.libreoffice.org/49656 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'emfio')
-rw-r--r--emfio/source/reader/emfreader.cxx4
-rw-r--r--emfio/source/reader/mtftools.cxx18
-rw-r--r--emfio/source/reader/wmfreader.cxx32
3 files changed, 27 insertions, 27 deletions
diff --git a/emfio/source/reader/emfreader.cxx b/emfio/source/reader/emfreader.cxx
index 38b26086993d..1d62fb1e342d 100644
--- a/emfio/source/reader/emfreader.cxx
+++ b/emfio/source/reader/emfreader.cxx
@@ -927,8 +927,8 @@ namespace emfio
sal_Int32 nTmpW(0), nTmpH(0);
mpInputStream->ReadUInt32( nStyle ).ReadInt32( nTmpW ).ReadInt32( nTmpH );
- aSize.Width() = nTmpW;
- aSize.Height() = nTmpH;
+ aSize.setWidth( nTmpW );
+ aSize.setHeight( nTmpH );
if ( aSize.Width() )
aLineInfo.SetWidth( aSize.Width() );
diff --git a/emfio/source/reader/mtftools.cxx b/emfio/source/reader/mtftools.cxx
index efbfe52364f7..b265849f24e6 100644
--- a/emfio/source/reader/mtftools.cxx
+++ b/emfio/source/reader/mtftools.cxx
@@ -288,12 +288,12 @@ namespace emfio
if (nHeight)
{
double fHeight = (static_cast<double>(aFontSize.Height()) * rFont.lfHeight ) / nHeight;
- aFontSize.Height() = static_cast<sal_Int32>( fHeight + 0.5 );
+ aFontSize.setHeight( static_cast<sal_Int32>( fHeight + 0.5 ) );
}
}
// Convert height to positive
- aFontSize.Height() = std::abs(aFontSize.Height());
+ aFontSize.setHeight( std::abs(aFontSize.Height()) );
aFont.SetFontSize(aFontSize);
};
@@ -511,7 +511,7 @@ namespace emfio
const auto nHeight = aFontSize.Height();
if (nHeight < 0)
- aFontSize.Height() = o3tl::saturating_toggle_sign(nHeight);
+ aFontSize.setHeight( o3tl::saturating_toggle_sign(nHeight) );
rFont.SetFontSize( aFontSize );
@@ -755,7 +755,7 @@ namespace emfio
if ( pLineStyle->aLineInfo.GetStyle() == LineStyle::Dash )
{
- aSize.Width() += 1;
+ aSize.setWidth( aSize.Width() + 1 );
long nDotLen = ImplMap( aSize ).Width();
pLineStyle->aLineInfo.SetDistance( nDotLen );
pLineStyle->aLineInfo.SetDotLen( nDotLen );
@@ -1517,8 +1517,8 @@ namespace emfio
// check whether there is a font rotation applied via transformation
Point aP1( ImplMap( Point() ) );
Point aP2( ImplMap( Point( 0, 100 ) ) );
- aP2.X() -= aP1.X();
- aP2.Y() -= aP1.Y();
+ aP2.setX( aP2.X() - aP1.X() );
+ aP2.setY( aP2.Y() - aP1.Y() );
double fX = aP2.X();
double fY = aP2.Y();
if ( fX )
@@ -1549,16 +1549,16 @@ namespace emfio
if( nLen > 1 )
nTextWidth += pDXArry[ nLen - 2 ];
// tdf#39894: We should consider the distance to next character cell origin
- aActPosDelta.X() = pDXArry[ nLen - 1 ];
+ aActPosDelta.setX( pDXArry[ nLen - 1 ] );
if ( pDYArry )
{
- aActPosDelta.Y() = pDYArry[ nLen - 1 ];
+ aActPosDelta.setY( pDYArry[ nLen - 1 ] );
}
}
else
{
nTextWidth = pVDev->GetTextWidth( rText );
- aActPosDelta.X() = nTextWidth;
+ aActPosDelta.setX( nTextWidth );
}
if( mnTextAlign & TA_UPDATECP )
diff --git a/emfio/source/reader/wmfreader.cxx b/emfio/source/reader/wmfreader.cxx
index eed575ef2bed..bd584af39fde 100644
--- a/emfio/source/reader/wmfreader.cxx
+++ b/emfio/source/reader/wmfreader.cxx
@@ -120,15 +120,15 @@ namespace
{
Point aSource(rSource);
if (nMapMode == MM_HIMETRIC)
- aSource.Y() = -rSource.Y();
+ aSource.setY( -rSource.Y() );
if (aSource.X() < rPlaceableBound.Left())
- rPlaceableBound.Left() = aSource.X();
+ rPlaceableBound.SetLeft( aSource.X() );
if (aSource.X() > rPlaceableBound.Right())
- rPlaceableBound.Right() = aSource.X();
+ rPlaceableBound.SetRight( aSource.X() );
if (aSource.Y() < rPlaceableBound.Top())
- rPlaceableBound.Top() = aSource.Y();
+ rPlaceableBound.SetTop( aSource.Y() );
if (aSource.Y() > rPlaceableBound.Bottom())
- rPlaceableBound.Bottom() = aSource.Y();
+ rPlaceableBound.SetBottom( aSource.Y() );
}
void GetWinExtMax(const tools::Rectangle& rSource, tools::Rectangle& rPlaceableBound, const sal_Int16 nMapMode)
@@ -160,7 +160,7 @@ namespace emfio
Point aBR, aTL;
aBR = ReadYX();
aTL = ReadYX();
- aBR.X()--;
+ aBR.setX( --aBR.X() );
aBR.Y()--;
return tools::Rectangle( aTL, aBR );
}
@@ -1111,8 +1111,8 @@ namespace emfio
aMemoryStream.ReadInt32( nTmpX )
.ReadInt32( nTmpY )
.ReadUInt32( nStringLen );
- aPt.X() = nTmpX;
- aPt.Y() = nTmpY;
+ aPt.setX( nTmpX );
+ aPt.setY( nTmpY );
if ( ( static_cast< sal_uInt64 >( nStringLen ) * sizeof( sal_Unicode ) ) < ( nEscLen - aMemoryStream.Tell() ) )
{
@@ -1257,13 +1257,13 @@ namespace emfio
// BoundRect
mpInputStream->ReadInt16( nVal );
- aPlaceableBound.Left() = nVal;
+ aPlaceableBound.SetLeft( nVal );
mpInputStream->ReadInt16( nVal );
- aPlaceableBound.Top() = nVal;
+ aPlaceableBound.SetTop( nVal );
mpInputStream->ReadInt16( nVal );
- aPlaceableBound.Right() = nVal;
+ aPlaceableBound.SetRight( nVal );
mpInputStream->ReadInt16( nVal );
- aPlaceableBound.Bottom() = nVal;
+ aPlaceableBound.SetBottom( nVal );
// inch
mpInputStream->ReadUInt16( mnUnitsPerInch );
@@ -1839,10 +1839,10 @@ namespace emfio
}
else
{
- rPlaceableBound.Left() = 0;
- rPlaceableBound.Top() = 0;
- rPlaceableBound.Right() = aMaxWidth;
- rPlaceableBound.Bottom() = aMaxWidth;
+ rPlaceableBound.SetLeft( 0 );
+ rPlaceableBound.SetTop( 0 );
+ rPlaceableBound.SetRight( aMaxWidth );
+ rPlaceableBound.SetBottom( aMaxWidth );
SAL_INFO("vcl.wmf", "Default dimension "
" t: " << rPlaceableBound.Left() << " l: " << rPlaceableBound.Top()
<< " b: " << rPlaceableBound.Right() << " r: " << rPlaceableBound.Bottom());