summaryrefslogtreecommitdiff
path: root/editeng/source/outliner/outliner.cxx
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 /editeng/source/outliner/outliner.cxx
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 'editeng/source/outliner/outliner.cxx')
-rw-r--r--editeng/source/outliner/outliner.cxx96
1 files changed, 48 insertions, 48 deletions
diff --git a/editeng/source/outliner/outliner.cxx b/editeng/source/outliner/outliner.cxx
index f83ec948ee52..2c15120b5c85 100644
--- a/editeng/source/outliner/outliner.cxx
+++ b/editeng/source/outliner/outliner.cxx
@@ -670,7 +670,7 @@ void Outliner::ImplCheckNumBulletItem( sal_Int32 nPara )
{
Paragraph* pPara = pParaList->GetParagraph( nPara );
if (pPara)
- pPara->aBulSize.Width() = -1;
+ pPara->aBulSize.setWidth( -1 );
}
void Outliner::ImplSetLevelDependentStyleSheet( sal_Int32 nPara )
@@ -908,24 +908,24 @@ void Outliner::PaintBullet( sal_Int32 nPara, const Point& rStartPos,
if ( !bVertical )
{
// aTextPos.Y() = rStartPos.Y() + aBulletArea.Bottom();
- aTextPos.Y() = rStartPos.Y() + ( bSymbol ? aBulletArea.Bottom() : aParaInfos.nFirstLineMaxAscent );
+ aTextPos.setY( rStartPos.Y() + ( bSymbol ? aBulletArea.Bottom() : aParaInfos.nFirstLineMaxAscent ) );
if ( !bRightToLeftPara )
- aTextPos.X() = rStartPos.X() + aBulletArea.Left();
+ aTextPos.setX( rStartPos.X() + aBulletArea.Left() );
else
- aTextPos.X() = rStartPos.X() + GetPaperSize().Width() - aBulletArea.Right();
+ aTextPos.setX( rStartPos.X() + GetPaperSize().Width() - aBulletArea.Right() );
}
else
{
if (bTopToBottom)
{
// aTextPos.X() = rStartPos.X() - aBulletArea.Bottom();
- aTextPos.X() = rStartPos.X() - (bSymbol ? aBulletArea.Bottom() : aParaInfos.nFirstLineMaxAscent);
- aTextPos.Y() = rStartPos.Y() + aBulletArea.Left();
+ aTextPos.setX( rStartPos.X() - (bSymbol ? aBulletArea.Bottom() : aParaInfos.nFirstLineMaxAscent) );
+ aTextPos.setY( rStartPos.Y() + aBulletArea.Left() );
}
else
{
- aTextPos.X() = rStartPos.X() + (bSymbol ? aBulletArea.Bottom() : aParaInfos.nFirstLineMaxAscent);
- aTextPos.Y() = rStartPos.Y() + aBulletArea.Left();
+ aTextPos.setX( rStartPos.X() + (bSymbol ? aBulletArea.Bottom() : aParaInfos.nFirstLineMaxAscent) );
+ aTextPos.setY( rStartPos.Y() + aBulletArea.Left() );
}
}
@@ -940,8 +940,8 @@ void Outliner::PaintBullet( sal_Int32 nPara, const Point& rStartPos,
// Translation...
aTextPos -= rOrigin;
// Rotation...
- aRotatedPos.X()=static_cast<long>(nCos*aTextPos.X() + nSin*aTextPos.Y());
- aRotatedPos.Y()=static_cast<long>(- (nSin*aTextPos.X() - nCos*aTextPos.Y()));
+ aRotatedPos.setX(static_cast<long>(nCos*aTextPos.X() + nSin*aTextPos.Y()) );
+ aRotatedPos.setY(static_cast<long>(- (nSin*aTextPos.X() - nCos*aTextPos.Y())) );
aTextPos = aRotatedPos;
// Translation...
aTextPos += rOrigin;
@@ -967,7 +967,7 @@ void Outliner::PaintBullet( sal_Int32 nPara, const Point& rStartPos,
{
// aTextPos is Bottom, go to Baseline
FontMetric aMetric(pOutDev->GetFontMetric());
- aTextPos.Y() -= aMetric.GetDescent();
+ aTextPos.setY( aTextPos.Y() - aMetric.GetDescent() );
}
DrawingText(aTextPos, pPara->GetText(), 0, pPara->GetText().getLength(), pBuf.get(),
@@ -987,23 +987,23 @@ void Outliner::PaintBullet( sal_Int32 nPara, const Point& rStartPos,
Point aBulletPos;
if ( !bVertical )
{
- aBulletPos.Y() = rStartPos.Y() + aBulletArea.Top();
+ aBulletPos.setY( rStartPos.Y() + aBulletArea.Top() );
if ( !bRightToLeftPara )
- aBulletPos.X() = rStartPos.X() + aBulletArea.Left();
+ aBulletPos.setX( rStartPos.X() + aBulletArea.Left() );
else
- aBulletPos.X() = rStartPos.X() + GetPaperSize().Width() - aBulletArea.Right();
+ aBulletPos.setX( rStartPos.X() + GetPaperSize().Width() - aBulletArea.Right() );
}
else
{
if (bTopToBottom)
{
- aBulletPos.X() = rStartPos.X() - aBulletArea.Bottom();
- aBulletPos.Y() = rStartPos.Y() + aBulletArea.Left();
+ aBulletPos.setX( rStartPos.X() - aBulletArea.Bottom() );
+ aBulletPos.setY( rStartPos.Y() + aBulletArea.Left() );
}
else
{
- aBulletPos.X() = rStartPos.X() + aBulletArea.Top();
- aBulletPos.Y() = rStartPos.Y() - aBulletArea.Right();
+ aBulletPos.setX( rStartPos.X() + aBulletArea.Top() );
+ aBulletPos.setY( rStartPos.Y() - aBulletArea.Right() );
}
}
@@ -1041,20 +1041,20 @@ void Outliner::PaintBullet( sal_Int32 nPara, const Point& rStartPos,
Point aStartPos, aEndPos;
if ( !bVertical )
{
- aStartPos.Y() = rStartPos.Y() + aBulletArea.Bottom();
+ aStartPos.setY( rStartPos.Y() + aBulletArea.Bottom() );
if ( !bRightToLeftPara )
- aStartPos.X() = rStartPos.X() + aBulletArea.Right();
+ aStartPos.setX( rStartPos.X() + aBulletArea.Right() );
else
- aStartPos.X() = rStartPos.X() + GetPaperSize().Width() - aBulletArea.Left();
+ aStartPos.setX( rStartPos.X() + GetPaperSize().Width() - aBulletArea.Left() );
aEndPos = aStartPos;
- aEndPos.X() += nWidth;
+ aEndPos.setX( aEndPos.X() + nWidth );
}
else
{
- aStartPos.X() = rStartPos.X() - aBulletArea.Bottom();
- aStartPos.Y() = rStartPos.Y() + aBulletArea.Right();
+ aStartPos.setX( rStartPos.X() - aBulletArea.Bottom() );
+ aStartPos.setY( rStartPos.Y() + aBulletArea.Right() );
aEndPos = aStartPos;
- aEndPos.Y() += nWidth;
+ aEndPos.setY( aEndPos.Y() + nWidth );
}
const Color& rOldLineColor = pOutDev->GetLineColor();
@@ -1072,10 +1072,10 @@ void Outliner::InvalidateBullet(sal_Int32 nPara)
{
Point aPos( pView->pEditView->GetWindowPosTopLeft(nPara ) );
tools::Rectangle aRect( pView->GetOutputArea() );
- aRect.Right() = aPos.X();
- aRect.Top() = aPos.Y();
- aRect.Bottom() = aPos.Y();
- aRect.Bottom() += nLineHeight;
+ aRect.SetRight( aPos.X() );
+ aRect.SetTop( aPos.Y() );
+ aRect.SetBottom( aPos.Y() );
+ aRect.SetBottom( aRect.Bottom() + nLineHeight );
pView->GetWindow()->Invalidate( aRect );
}
@@ -1411,8 +1411,8 @@ Size Outliner::ImplGetBulletSize( sal_Int32 nPara )
vcl::Font aBulletFont( ImpCalcBulletFont( nPara ) );
vcl::Font aRefFont( pRefDev->GetFont());
pRefDev->SetFont( aBulletFont );
- pPara->aBulSize.Width() = pRefDev->GetTextWidth( aBulletText );
- pPara->aBulSize.Height() = pRefDev->GetTextHeight();
+ pPara->aBulSize.setWidth( pRefDev->GetTextWidth( aBulletText ) );
+ pPara->aBulSize.setHeight( pRefDev->GetTextHeight() );
pRefDev->SetFont( aRefFont );
}
else
@@ -1510,7 +1510,7 @@ tools::Rectangle Outliner::ImpCalcBulletArea( sal_Int32 nPara, bool bAdjust, boo
const short nSpaceBefore = pFmt->GetAbsLSpace() + pFmt->GetFirstLineOffset();
const SvxLRSpaceItem& rLR = pEditEngine->GetParaAttrib( nPara, bOutlineMode ? EE_PARA_OUTLLRSPACE : EE_PARA_LRSPACE );
- aTopLeft.X() = rLR.GetTextLeft() + rLR.GetTextFirstLineOfst() + nSpaceBefore;
+ aTopLeft.setX( rLR.GetTextLeft() + rLR.GetTextFirstLineOfst() + nSpaceBefore );
long nBulletWidth = std::max( static_cast<long>(-rLR.GetTextFirstLineOfst()), static_cast<long>((-pFmt->GetFirstLineOffset()) + pFmt->GetCharTextDistance()) );
if ( nBulletWidth < aBulletSize.Width() ) // The Bullet creates its space
@@ -1523,7 +1523,7 @@ tools::Rectangle Outliner::ImpCalcBulletArea( sal_Int32 nPara, bool bAdjust, boo
if ( ( !pEditEngine->IsRightToLeft( nPara ) && ( rItem.GetAdjust() != SvxAdjust::Left ) ) ||
( pEditEngine->IsRightToLeft( nPara ) && ( rItem.GetAdjust() != SvxAdjust::Right ) ) )
{
- aTopLeft.X() = pEditEngine->GetFirstLineStartX( nPara ) - nBulletWidth;
+ aTopLeft.setX( pEditEngine->GetFirstLineStartX( nPara ) - nBulletWidth );
}
}
@@ -1531,10 +1531,10 @@ tools::Rectangle Outliner::ImpCalcBulletArea( sal_Int32 nPara, bool bAdjust, boo
ParagraphInfos aInfos = pEditEngine->GetParagraphInfos( nPara );
if ( aInfos.bValid )
{
- aTopLeft.Y() = /* aInfos.nFirstLineOffset + */ // nFirstLineOffset is already added to the StartPos (PaintBullet) from the EditEngine
+ aTopLeft.setY( /* aInfos.nFirstLineOffset + */ // nFirstLineOffset is already added to the StartPos (PaintBullet) from the EditEngine
aInfos.nFirstLineHeight - aInfos.nFirstLineTextHeight
+ aInfos.nFirstLineTextHeight / 2
- - aBulletSize.Height() / 2;
+ - aBulletSize.Height() / 2 );
// may prefer to print out on the baseline ...
if( ( pFmt->GetNumberingType() != SVX_NUM_NUMBER_NONE ) && ( pFmt->GetNumberingType() != SVX_NUM_BITMAP ) && ( pFmt->GetNumberingType() != SVX_NUM_CHAR_SPECIAL ) )
{
@@ -1546,8 +1546,8 @@ tools::Rectangle Outliner::ImpCalcBulletArea( sal_Int32 nPara, bool bAdjust, boo
pRefDev->SetFont( aBulletFont );
FontMetric aMetric( pRefDev->GetFontMetric() );
// Leading on the first line ...
- aTopLeft.Y() = /* aInfos.nFirstLineOffset + */ aInfos.nFirstLineMaxAscent;
- aTopLeft.Y() -= aMetric.GetAscent();
+ aTopLeft.setY( /* aInfos.nFirstLineOffset + */ aInfos.nFirstLineMaxAscent );
+ aTopLeft.setY( aTopLeft.Y() - aMetric.GetAscent() );
pRefDev->SetFont( aOldFont );
}
}
@@ -1556,15 +1556,15 @@ tools::Rectangle Outliner::ImpCalcBulletArea( sal_Int32 nPara, bool bAdjust, boo
// Horizontal:
if( pFmt->GetNumAdjust() == SvxAdjust::Right )
{
- aTopLeft.X() += nBulletWidth - aBulletSize.Width();
+ aTopLeft.setX( aTopLeft.X() + nBulletWidth - aBulletSize.Width() );
}
else if( pFmt->GetNumAdjust() == SvxAdjust::Center )
{
- aTopLeft.X() += ( nBulletWidth - aBulletSize.Width() ) / 2;
+ aTopLeft.setX( aTopLeft.X() + ( nBulletWidth - aBulletSize.Width() ) / 2 );
}
if ( aTopLeft.X() < 0 ) // then push
- aTopLeft.X() = 0;
+ aTopLeft.setX( 0 );
aBulletArea = tools::Rectangle( aTopLeft, aBulletSize );
}
@@ -1572,22 +1572,22 @@ tools::Rectangle Outliner::ImpCalcBulletArea( sal_Int32 nPara, bool bAdjust, boo
{
Size aBulletSize( aBulletArea.GetSize() );
Point aBulletDocPos( aBulletArea.TopLeft() );
- aBulletDocPos.Y() += pEditEngine->GetDocPosTopLeft( nPara ).Y();
+ aBulletDocPos.setY( aBulletDocPos.Y() + pEditEngine->GetDocPosTopLeft( nPara ).Y() );
Point aBulletPos( aBulletDocPos );
if ( IsVertical() )
{
- aBulletPos.Y() = aBulletDocPos.X();
- aBulletPos.X() = GetPaperSize().Width() - aBulletDocPos.Y();
+ aBulletPos.setY( aBulletDocPos.X() );
+ aBulletPos.setX( GetPaperSize().Width() - aBulletDocPos.Y() );
// Rotate:
- aBulletPos.X() -= aBulletSize.Height();
+ aBulletPos.setX( aBulletPos.X() - aBulletSize.Height() );
Size aSz( aBulletSize );
- aBulletSize.Width() = aSz.Height();
- aBulletSize.Height() = aSz.Width();
+ aBulletSize.setWidth( aSz.Height() );
+ aBulletSize.setHeight( aSz.Width() );
}
else if ( pEditEngine->IsRightToLeft( nPara ) )
{
- aBulletPos.X() = GetPaperSize().Width() - aBulletDocPos.X() - aBulletSize.Width();
+ aBulletPos.setX( GetPaperSize().Width() - aBulletDocPos.X() - aBulletSize.Width() );
}
aBulletArea = tools::Rectangle( aBulletPos, aBulletSize );
@@ -1896,7 +1896,7 @@ void Outliner::SetFlatMode( bool bFlat )
if( bFlat != pEditEngine->IsFlatMode() )
{
for ( sal_Int32 nPara = pParaList->GetParagraphCount(); nPara; )
- pParaList->GetParagraph( --nPara )->aBulSize.Width() = -1;
+ pParaList->GetParagraph( --nPara )->aBulSize.setWidth( -1 );
pEditEngine->SetFlatMode( bFlat );
}