summaryrefslogtreecommitdiff
path: root/basctl/source/basicide/baside2.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-02-16 13:01:37 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-02-16 19:50:47 +0100
commitbddd6c77811e0489a5632437116f5eec356cc397 (patch)
tree761111e37f065d040a6d63ef1098de2afce16eae /basctl/source/basicide/baside2.cxx
parenteb5563e7e636a9856d4f1cc23d00a21193b9d0cc (diff)
Revert "loplugin:changetoolsgen in avmedia..basic" and reapply plugin
because I (a) forgot to insert parentheses which changes the meaning of some expressions and (b) I now use the AdjustFoo calls when changing unary operations, which reads much better This reverts commit 1adb1a320a7e9832a41545bde13fd59d27ce7954. Change-Id: I52924b35008c8e4b44c8a6b6657cc3a1ac513886 Reviewed-on: https://gerrit.libreoffice.org/49848 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'basctl/source/basicide/baside2.cxx')
-rw-r--r--basctl/source/basicide/baside2.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/basctl/source/basicide/baside2.cxx b/basctl/source/basicide/baside2.cxx
index 43d7d0fd9f19..7edd29b9bbb7 100644
--- a/basctl/source/basicide/baside2.cxx
+++ b/basctl/source/basicide/baside2.cxx
@@ -131,7 +131,7 @@ void lcl_PrintHeader( Printer* pPrinter, sal_uInt16 nPages, sal_uInt16 nCurPage,
{
aFont.SetWeight( WEIGHT_NORMAL );
pPrinter->SetFont( aFont );
- aPos.setX( aPos.X() + pPrinter->GetTextWidth( rTitle ) );
+ aPos.AdjustX(pPrinter->GetTextWidth( rTitle ) );
if( bOutput )
{
@@ -810,8 +810,8 @@ sal_Int32 ModulWindow::FormatAndPrint( Printer* pPrinter, sal_Int32 nPrintPage )
}
Size aPaperSz = pPrinter->GetOutputSize();
- aPaperSz.setWidth( aPaperSz.Width() - (Print::nLeftMargin + Print::nRightMargin) );
- aPaperSz.setHeight( aPaperSz.Height() - (Print::nTopMargin + Print::nBottomMargin) );
+ aPaperSz.AdjustWidth( -(Print::nLeftMargin + Print::nRightMargin) );
+ aPaperSz.AdjustHeight( -(Print::nTopMargin + Print::nBottomMargin) );
// nLinepPage is not correct if there's a line break
sal_Int32 nLinespPage = aPaperSz.Height()/nLineHeight;
@@ -835,7 +835,7 @@ sal_Int32 ModulWindow::FormatAndPrint( Printer* pPrinter, sal_Int32 nPrintPage )
sal_Int32 nBeginIndex = nLine*nCharspLine;
sal_Int32 nCopyCount = std::min<sal_Int32>(nCharspLine, aLine.getLength()-nBeginIndex);
OUString aTmpLine = aLine.copy(nBeginIndex, nCopyCount);
- aPos.setY( aPos.Y() + nLineHeight );
+ aPos.AdjustY(nLineHeight );
if ( aPos.Y() > ( aPaperSz.Height() + Print::nTopMargin ) )
{
nCurPage++;
@@ -845,7 +845,7 @@ sal_Int32 ModulWindow::FormatAndPrint( Printer* pPrinter, sal_Int32 nPrintPage )
if( nCurPage-1 == nPrintPage )
pPrinter->DrawText( aPos, aTmpLine );
}
- aPos.setY( aPos.Y() + 10 ); // nParaSpace
+ aPos.AdjustY(10 ); // nParaSpace
}
pPrinter->SetFont( aOldFont );