[Libreoffice-commits] core.git: sc/source
Noel Grandin
noel.grandin at collabora.co.uk
Wed Feb 14 13:18:24 UTC 2018
sc/source/core/data/column2.cxx | 8
sc/source/core/data/documen3.cxx | 42 +--
sc/source/core/data/documen9.cxx | 4
sc/source/core/data/drwlayer.cxx | 108 ++++-----
sc/source/core/data/postit.cxx | 32 +-
sc/source/core/tool/detfunc.cxx | 28 +-
sc/source/core/tool/editutil.cxx | 6
sc/source/filter/excel/xiescher.cxx | 16 -
sc/source/filter/excel/xiview.cxx | 4
sc/source/filter/excel/xlescher.cxx | 4
sc/source/filter/html/htmlexp.cxx | 4
sc/source/filter/html/htmlexp2.cxx | 8
sc/source/filter/html/htmlimp.cxx | 4
sc/source/filter/html/htmlpars.cxx | 12 -
sc/source/filter/rtf/eeimpars.cxx | 16 -
sc/source/filter/xml/XMLTableShapeImportHelper.cxx | 4
sc/source/ui/Accessibility/AccessibleCsvControl.cxx | 6
sc/source/ui/app/client.cxx | 20 -
sc/source/ui/app/inputhdl.cxx | 2
sc/source/ui/app/inputwin.cxx | 28 +-
sc/source/ui/app/transobj.cxx | 4
sc/source/ui/cctrl/cbuttonw.cxx | 36 +--
sc/source/ui/cctrl/checklistmenu.cxx | 40 +--
sc/source/ui/cctrl/dpcontrol.cxx | 2
sc/source/ui/cctrl/tbzoomsliderctrl.cxx | 40 +--
sc/source/ui/condformat/condformatdlg.cxx | 8
sc/source/ui/condformat/condformatdlgentry.cxx | 2
sc/source/ui/dbgui/csvgrid.cxx | 8
sc/source/ui/dbgui/csvruler.cxx | 4
sc/source/ui/docshell/docsh4.cxx | 4
sc/source/ui/docshell/docsh6.cxx | 12 -
sc/source/ui/drawfunc/fuconstr.cxx | 4
sc/source/ui/drawfunc/fuins1.cxx | 26 +-
sc/source/ui/drawfunc/fuins2.cxx | 10
sc/source/ui/miscdlgs/acredlin.cxx | 2
sc/source/ui/miscdlgs/anyrefdg.cxx | 8
sc/source/ui/miscdlgs/autofmt.cxx | 14 -
sc/source/ui/miscdlgs/solveroptions.cxx | 2
sc/source/ui/namedlg/namemgrtable.cxx | 2
sc/source/ui/navipi/content.cxx | 2
sc/source/ui/navipi/navipi.cxx | 2
sc/source/ui/navipi/scenwnd.cxx | 4
sc/source/ui/pagedlg/tphfedit.cxx | 6
sc/source/ui/sidebar/CellLineStyleValueSet.cxx | 6
sc/source/ui/unoobj/TablePivotCharts.cxx | 8
sc/source/ui/unoobj/chartuno.cxx | 8
sc/source/ui/unoobj/viewuno.cxx | 2
sc/source/ui/view/drawview.cxx | 8
sc/source/ui/view/gridwin.cxx | 124 +++++------
sc/source/ui/view/gridwin2.cxx | 2
sc/source/ui/view/gridwin3.cxx | 2
sc/source/ui/view/gridwin4.cxx | 82 +++----
sc/source/ui/view/gridwin5.cxx | 4
sc/source/ui/view/hdrcont.cxx | 38 +--
sc/source/ui/view/hintwin.cxx | 2
sc/source/ui/view/invmerge.cxx | 14 -
sc/source/ui/view/notemark.cxx | 8
sc/source/ui/view/output.cxx | 70 +++---
sc/source/ui/view/output2.cxx | 222 ++++++++++----------
sc/source/ui/view/output3.cxx | 28 +-
sc/source/ui/view/preview.cxx | 36 +--
sc/source/ui/view/prevloc.cxx | 24 +-
sc/source/ui/view/prevwsh.cxx | 72 +++---
sc/source/ui/view/printfun.cxx | 124 +++++------
sc/source/ui/view/reffact.cxx | 8
sc/source/ui/view/select.cxx | 4
sc/source/ui/view/tabview.cxx | 94 ++++----
sc/source/ui/view/tabview2.cxx | 18 -
sc/source/ui/view/tabview3.cxx | 50 ++--
sc/source/ui/view/tabview4.cxx | 6
sc/source/ui/view/tabview5.cxx | 8
sc/source/ui/view/tabvwsh2.cxx | 4
sc/source/ui/view/tabvwsh4.cxx | 14 -
sc/source/ui/view/tabvwshb.cxx | 4
sc/source/ui/view/tabvwshg.cxx | 2
sc/source/ui/view/viewdata.cxx | 86 +++----
sc/source/ui/view/viewfun5.cxx | 12 -
sc/source/ui/view/viewfun7.cxx | 24 +-
78 files changed, 910 insertions(+), 906 deletions(-)
New commits:
commit 95fab7cbf2f0576d0f728bed8898b7ff769d90e6
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date: Wed Feb 14 10:30:46 2018 +0200
loplugin:changetoolsgen in sc
Change-Id: Ic24332cac65e665b55b9e1bbaf09ee56066875fd
Reviewed-on: https://gerrit.libreoffice.org/49703
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/sc/source/core/data/column2.cxx b/sc/source/core/data/column2.cxx
index 75da42621238..78bf67a9c1c8 100644
--- a/sc/source/core/data/column2.cxx
+++ b/sc/source/core/data/column2.cxx
@@ -282,8 +282,8 @@ long ScColumn::GetNeededSize(
if ( eOrient != SvxCellOrientation::Standard )
{
long nTemp = aSize.Width();
- aSize.Width() = aSize.Height();
- aSize.Height() = nTemp;
+ aSize.setWidth( aSize.Height() );
+ aSize.setHeight( nTemp );
}
else if ( nRotate )
{
@@ -398,7 +398,7 @@ long ScColumn::GetNeededSize(
Size aPaper = Size( 1000000, 1000000 );
if ( eOrient==SvxCellOrientation::Stacked && !bAsianVertical )
- aPaper.Width() = 1;
+ aPaper.setWidth( 1 );
else if (bBreak)
{
double fWidthFactor = nPPTX;
@@ -427,7 +427,7 @@ long ScColumn::GetNeededSize(
if ( pFlag->HasAutoFilter() && !bTextWysiwyg )
nDocWidth -= long(rZoomX*20);
- aPaper.Width() = nDocWidth;
+ aPaper.setWidth( nDocWidth );
if ( !bTextWysiwyg )
aPaper = pDev->PixelToLogic( aPaper, aHMMMode );
diff --git a/sc/source/core/data/documen3.cxx b/sc/source/core/data/documen3.cxx
index 02df3af02fa3..12a8a525e785 100644
--- a/sc/source/core/data/documen3.cxx
+++ b/sc/source/core/data/documen3.cxx
@@ -1698,18 +1698,18 @@ tools::Rectangle ScDocument::GetEmbeddedRect() const // 1/100 mm
SCCOL i;
for (i=0; i<aEmbedRange.aStart.Col(); i++)
- aRect.Left() += pTable->GetColWidth(i);
- aRect.Top() += pTable->GetRowHeight( 0, aEmbedRange.aStart.Row() - 1);
- aRect.Right() = aRect.Left();
+ aRect.SetLeft( aRect.Left() + pTable->GetColWidth(i) );
+ aRect.SetTop( aRect.Top() + pTable->GetRowHeight( 0, aEmbedRange.aStart.Row() - 1) );
+ aRect.SetRight( aRect.Left() );
for (i=aEmbedRange.aStart.Col(); i<=aEmbedRange.aEnd.Col(); i++)
- aRect.Right() += pTable->GetColWidth(i);
- aRect.Bottom() = aRect.Top();
- aRect.Bottom() += pTable->GetRowHeight( aEmbedRange.aStart.Row(), aEmbedRange.aEnd.Row());
-
- aRect.Left() = static_cast<long>( aRect.Left() * HMM_PER_TWIPS );
- aRect.Right() = static_cast<long>( aRect.Right() * HMM_PER_TWIPS );
- aRect.Top() = static_cast<long>( aRect.Top() * HMM_PER_TWIPS );
- aRect.Bottom() = static_cast<long>( aRect.Bottom() * HMM_PER_TWIPS );
+ aRect.SetRight( aRect.Right() + pTable->GetColWidth(i) );
+ aRect.SetBottom( aRect.Top() );
+ aRect.SetBottom( aRect.Bottom() + pTable->GetRowHeight( aEmbedRange.aStart.Row(), aEmbedRange.aEnd.Row()) );
+
+ aRect.SetLeft( static_cast<long>( aRect.Left() * HMM_PER_TWIPS ) );
+ aRect.SetRight( static_cast<long>( aRect.Right() * HMM_PER_TWIPS ) );
+ aRect.SetTop( static_cast<long>( aRect.Top() * HMM_PER_TWIPS ) );
+ aRect.SetBottom( static_cast<long>( aRect.Bottom() * HMM_PER_TWIPS ) );
}
return aRect;
}
@@ -1970,20 +1970,20 @@ tools::Rectangle ScDocument::GetMMRect( SCCOL nStartCol, SCROW nStartRow, SCCOL
tools::Rectangle aRect;
for (i=0; i<nStartCol; i++)
- aRect.Left() += GetColWidth(i,nTab, bHiddenAsZero );
- aRect.Top() += GetRowHeight( 0, nStartRow-1, nTab, bHiddenAsZero );
+ aRect.SetLeft( aRect.Left() + GetColWidth(i,nTab, bHiddenAsZero ) );
+ aRect.SetTop( aRect.Top() + GetRowHeight( 0, nStartRow-1, nTab, bHiddenAsZero ) );
- aRect.Right() = aRect.Left();
- aRect.Bottom() = aRect.Top();
+ aRect.SetRight( aRect.Left() );
+ aRect.SetBottom( aRect.Top() );
for (i=nStartCol; i<=nEndCol; i++)
- aRect.Right() += GetColWidth(i,nTab, bHiddenAsZero);
- aRect.Bottom() += GetRowHeight( nStartRow, nEndRow, nTab, bHiddenAsZero );
+ aRect.SetRight( aRect.Right() + GetColWidth(i,nTab, bHiddenAsZero) );
+ aRect.SetBottom( aRect.Bottom() + GetRowHeight( nStartRow, nEndRow, nTab, bHiddenAsZero ) );
- aRect.Left() = static_cast<long>(aRect.Left() * HMM_PER_TWIPS);
- aRect.Right() = static_cast<long>(aRect.Right() * HMM_PER_TWIPS);
- aRect.Top() = static_cast<long>(aRect.Top() * HMM_PER_TWIPS);
- aRect.Bottom() = static_cast<long>(aRect.Bottom() * HMM_PER_TWIPS);
+ aRect.SetLeft( static_cast<long>(aRect.Left() * HMM_PER_TWIPS) );
+ aRect.SetRight( static_cast<long>(aRect.Right() * HMM_PER_TWIPS) );
+ aRect.SetTop( static_cast<long>(aRect.Top() * HMM_PER_TWIPS) );
+ aRect.SetBottom( static_cast<long>(aRect.Bottom() * HMM_PER_TWIPS) );
if ( IsNegativePage( nTab ) )
ScDrawLayer::MirrorRectRTL( aRect );
diff --git a/sc/source/core/data/documen9.cxx b/sc/source/core/data/documen9.cxx
index 3d9ae0ce967b..8cc833062bf8 100644
--- a/sc/source/core/data/documen9.cxx
+++ b/sc/source/core/data/documen9.cxx
@@ -468,8 +468,8 @@ bool ScDocument::IsPrintEmpty( SCTAB nTab, SCCOL nStartCol, SCROW nStartRow,
for (i=nStartCol; i<=nEndCol; i++)
nRight += GetColWidth(i,nTab);
- aMMRect.Left() = static_cast<long>(nLeft * HMM_PER_TWIPS);
- aMMRect.Right() = static_cast<long>(nRight * HMM_PER_TWIPS);
+ aMMRect.SetLeft( static_cast<long>(nLeft * HMM_PER_TWIPS) );
+ aMMRect.SetRight( static_cast<long>(nRight * HMM_PER_TWIPS) );
}
else
aMMRect = GetMMRect( nStartCol, nStartRow, nEndCol, nEndRow, nTab );
diff --git a/sc/source/core/data/drwlayer.cxx b/sc/source/core/data/drwlayer.cxx
index 7c1893dedd87..66cb65b18e2f 100644
--- a/sc/source/core/data/drwlayer.cxx
+++ b/sc/source/core/data/drwlayer.cxx
@@ -607,9 +607,9 @@ namespace
{
tools::Rectangle aRect = rNew;
if (aRect.Bottom() == aRect.Top())
- aRect.Bottom() = aRect.Top()+1;
+ aRect.SetBottom( aRect.Top()+1 );
if (aRect.Right() == aRect.Left())
- aRect.Right() = aRect.Left()+1;
+ aRect.SetRight( aRect.Left()+1 );
return aRect;
}
@@ -619,9 +619,9 @@ namespace
long nHeight = static_cast<long>(rDoc.GetRowHeight( nRow, nTab ) * HMM_PER_TWIPS);
long nWidth = static_cast<long>(rDoc.GetColWidth( nCol, nTab ) * HMM_PER_TWIPS);
if (aAvailableDiff.Y() > nHeight)
- aAvailableDiff.Y() = nHeight;
+ aAvailableDiff.setY( nHeight );
if (aAvailableDiff.X() > nWidth)
- aAvailableDiff.X() = nWidth;
+ aAvailableDiff.setX( nWidth );
return aAvailableDiff;
}
@@ -663,7 +663,7 @@ void ScDrawLayer::ResizeLastRectFromAnchor( const SdrObject* pObj, ScDrawObjData
else
{
if ( bNegativePage )
- aPos.X() = -aPos.X() - rData.maLastRect.GetWidth();
+ aPos.setX( -aPos.X() - rData.maLastRect.GetWidth() );
// shouldn't we initialise maLastRect with the object rectangle ?
rData.maLastRect.SetPos( aPos );
}
@@ -715,10 +715,10 @@ void ScDrawLayer::RecalcPos( SdrObject* pObj, ScDrawObjData& rData, bool bNegati
Size aSize( TwipsToHmm( pDoc->GetColWidth( nCol1, nTab1) ),
TwipsToHmm( pDoc->GetRowHeight( nRow1, nTab1) ) );
tools::Rectangle aRect( aPos, aSize );
- aRect.Left() -= 250;
- aRect.Right() += 250;
- aRect.Top() -= 70;
- aRect.Bottom() += 70;
+ aRect.SetLeft( aRect.Left() - 250 );
+ aRect.SetRight( aRect.Right() + 250 );
+ aRect.SetTop( aRect.Top() - 70 );
+ aRect.SetBottom( aRect.Bottom() + 70 );
if ( bNegativePage )
MirrorRectRTL( aRect );
@@ -746,14 +746,14 @@ void ScDrawLayer::RecalcPos( SdrObject* pObj, ScDrawObjData& rData, bool bNegati
{
Point aPos( pDoc->GetColOffset( nCol1, nTab1 ), pDoc->GetRowOffset( nRow1, nTab1 ) );
if (!pDoc->ColHidden(nCol1, nTab1, nullptr, &nLastCol))
- aPos.X() += pDoc->GetColWidth( nCol1, nTab1 ) / 4;
+ aPos.setX( aPos.X() + pDoc->GetColWidth( nCol1, nTab1 ) / 4 );
if (!pDoc->RowHidden(nRow1, nTab1, nullptr, &nLastRow))
- aPos.Y() += pDoc->GetRowHeight( nRow1, nTab1 ) / 2;
+ aPos.setY( aPos.Y() + pDoc->GetRowHeight( nRow1, nTab1 ) / 2 );
TwipsToMM( aPos.X() );
TwipsToMM( aPos.Y() );
Point aStartPos = aPos;
if ( bNegativePage )
- aStartPos.X() = -aStartPos.X(); // don't modify aPos - used below
+ aStartPos.setX( -aStartPos.X() ); // don't modify aPos - used below
if ( pObj->GetPoint( 0 ) != aStartPos )
{
if (bRecording)
@@ -767,9 +767,9 @@ void ScDrawLayer::RecalcPos( SdrObject* pObj, ScDrawObjData& rData, bool bNegati
{
Point aEndPos( aPos.X() + DET_ARROW_OFFSET, aPos.Y() - DET_ARROW_OFFSET );
if (aEndPos.Y() < 0)
- aEndPos.Y() += (2 * DET_ARROW_OFFSET);
+ aEndPos.setY( aEndPos.Y() + (2 * DET_ARROW_OFFSET) );
if ( bNegativePage )
- aEndPos.X() = -aEndPos.X();
+ aEndPos.setX( -aEndPos.X() );
if ( pObj->GetPoint( 1 ) != aEndPos )
{
if (bRecording)
@@ -784,14 +784,14 @@ void ScDrawLayer::RecalcPos( SdrObject* pObj, ScDrawObjData& rData, bool bNegati
{
Point aPos( pDoc->GetColOffset( nCol2, nTab2 ), pDoc->GetRowOffset( nRow2, nTab2 ) );
if (!pDoc->ColHidden(nCol2, nTab2, nullptr, &nLastCol))
- aPos.X() += pDoc->GetColWidth( nCol2, nTab2 ) / 4;
+ aPos.setX( aPos.X() + pDoc->GetColWidth( nCol2, nTab2 ) / 4 );
if (!pDoc->RowHidden(nRow2, nTab2, nullptr, &nLastRow))
- aPos.Y() += pDoc->GetRowHeight( nRow2, nTab2 ) / 2;
+ aPos.setY( aPos.Y() + pDoc->GetRowHeight( nRow2, nTab2 ) / 2 );
TwipsToMM( aPos.X() );
TwipsToMM( aPos.Y() );
Point aEndPos = aPos;
if ( bNegativePage )
- aEndPos.X() = -aEndPos.X(); // don't modify aPos - used below
+ aEndPos.setX( -aEndPos.X() ); // don't modify aPos - used below
if ( pObj->GetPoint( 1 ) != aEndPos )
{
if (bRecording)
@@ -805,11 +805,11 @@ void ScDrawLayer::RecalcPos( SdrObject* pObj, ScDrawObjData& rData, bool bNegati
{
Point aStartPos( aPos.X() - DET_ARROW_OFFSET, aPos.Y() - DET_ARROW_OFFSET );
if (aStartPos.X() < 0)
- aStartPos.X() += (2 * DET_ARROW_OFFSET);
+ aStartPos.setX( aStartPos.X() + (2 * DET_ARROW_OFFSET) );
if (aStartPos.Y() < 0)
- aStartPos.Y() += (2 * DET_ARROW_OFFSET);
+ aStartPos.setY( aStartPos.Y() + (2 * DET_ARROW_OFFSET) );
if ( bNegativePage )
- aStartPos.X() = -aStartPos.X();
+ aStartPos.setX( -aStartPos.X() );
if ( pObj->GetPoint( 0 ) != aStartPos )
{
if (bRecording)
@@ -849,10 +849,10 @@ void ScDrawLayer::RecalcPos( SdrObject* pObj, ScDrawObjData& rData, bool bNegati
aRect = pDoc->GetMMRect(nCol1, nRow1, nCol1 , nRow1, nTab1);
if (bNegativePage)
- aPoint.X() = aRect.Right();
+ aPoint.setX( aRect.Right() );
else
- aPoint.X() = aRect.Left();
- aPoint.Y() = aRect.Top();
+ aPoint.setX( aRect.Left() );
+ aPoint.setY( aRect.Top() );
pObj->TRGetBaseGeometry(aOriginalMatrix, aPolyPolygon);
aOriginalMatrix.decompose(aScale, aTranslate, fRotate, fShearX);
@@ -1174,25 +1174,25 @@ void ScDrawLayer::MoveArea( SCTAB nTab, SCCOL nCol1,SCROW nRow1, SCCOL nCol2,SCR
if (nDx > 0)
for (SCCOL s=0; s<nDx; s++)
- aMove.X() += pDoc->GetColWidth(s+nCol1,nTab);
+ aMove.setX( aMove.X() + pDoc->GetColWidth(s+nCol1,nTab) );
else
for (SCCOL s=-1; s>=nDx; s--)
- aMove.X() -= pDoc->GetColWidth(s+nCol1,nTab);
+ aMove.setX( aMove.X() - pDoc->GetColWidth(s+nCol1,nTab) );
if (nDy > 0)
- aMove.Y() += pDoc->GetRowHeight( nRow1, nRow1+nDy-1, nTab);
+ aMove.setY( aMove.Y() + pDoc->GetRowHeight( nRow1, nRow1+nDy-1, nTab) );
else
- aMove.Y() -= pDoc->GetRowHeight( nRow1+nDy, nRow1-1, nTab);
+ aMove.setY( aMove.Y() - pDoc->GetRowHeight( nRow1+nDy, nRow1-1, nTab) );
if ( bNegativePage )
- aMove.X() = -aMove.X();
+ aMove.setX( -aMove.X() );
Point aTopLeft = aRect.TopLeft(); // Beginning when zoomed out
if (bInsDel)
{
if ( aMove.X() != 0 && nDx < 0 ) // nDx counts cells, sign is independent of RTL
- aTopLeft.X() += aMove.X();
+ aTopLeft.setX( aTopLeft.X() + aMove.X() );
if ( aMove.Y() < 0 )
- aTopLeft.Y() += aMove.Y();
+ aTopLeft.setY( aTopLeft.Y() + aMove.Y() );
}
// Detectiv arrows: Adjust cell position
@@ -1217,20 +1217,20 @@ bool ScDrawLayer::HasObjectsInRows( SCTAB nTab, SCROW nStartRow, SCROW nEndRow )
tools::Rectangle aTestRect;
- aTestRect.Top() += pDoc->GetRowHeight( 0, nStartRow-1, nTab);
+ aTestRect.SetTop( aTestRect.Top() + pDoc->GetRowHeight( 0, nStartRow-1, nTab) );
if (nEndRow==MAXROW)
aTestRect.Bottom() = MAXMM;
else
{
- aTestRect.Bottom() = aTestRect.Top();
- aTestRect.Bottom() += pDoc->GetRowHeight( nStartRow, nEndRow, nTab);
+ aTestRect.SetBottom( aTestRect.Top() );
+ aTestRect.SetBottom( aTestRect.Bottom() + pDoc->GetRowHeight( nStartRow, nEndRow, nTab) );
TwipsToMM( aTestRect.Bottom() );
}
TwipsToMM( aTestRect.Top() );
- aTestRect.Left() = 0;
+ aTestRect.SetLeft( 0 );
aTestRect.Right() = MAXMM;
bool bNegativePage = pDoc->IsNegativePage( nTab );
@@ -1714,8 +1714,8 @@ void ScDrawLayer::MirrorRectRTL( tools::Rectangle& rRect )
{
// mirror and swap left/right
long nTemp = rRect.Left();
- rRect.Left() = -rRect.Right();
- rRect.Right() = -nTemp;
+ rRect.SetLeft( -rRect.Right() );
+ rRect.SetRight( -nTemp );
}
tools::Rectangle ScDrawLayer::GetCellRect( const ScDocument& rDoc, const ScAddress& rPos, bool bMergedCell )
@@ -1727,9 +1727,9 @@ tools::Rectangle ScDrawLayer::GetCellRect( const ScDocument& rDoc, const ScAddre
// find top left position of passed cell address
Point aTopLeft;
for( SCCOL nCol = 0; nCol < rPos.Col(); ++nCol )
- aTopLeft.X() += rDoc.GetColWidth( nCol, rPos.Tab() );
+ aTopLeft.setX( aTopLeft.X() + rDoc.GetColWidth( nCol, rPos.Tab() ) );
if( rPos.Row() > 0 )
- aTopLeft.Y() += rDoc.GetRowHeight( 0, rPos.Row() - 1, rPos.Tab() );
+ aTopLeft.setY( aTopLeft.Y() + rDoc.GetRowHeight( 0, rPos.Row() - 1, rPos.Tab() ) );
// find bottom-right position of passed cell address
ScAddress aEndPos = rPos;
@@ -1743,14 +1743,14 @@ tools::Rectangle ScDrawLayer::GetCellRect( const ScDocument& rDoc, const ScAddre
}
Point aBotRight = aTopLeft;
for( SCCOL nCol = rPos.Col(); nCol <= aEndPos.Col(); ++nCol )
- aBotRight.X() += rDoc.GetColWidth( nCol, rPos.Tab() );
- aBotRight.Y() += rDoc.GetRowHeight( rPos.Row(), aEndPos.Row(), rPos.Tab() );
+ aBotRight.setX( aBotRight.X() + rDoc.GetColWidth( nCol, rPos.Tab() ) );
+ aBotRight.setY( aBotRight.Y() + rDoc.GetRowHeight( rPos.Row(), aEndPos.Row(), rPos.Tab() ) );
// twips -> 1/100 mm
- aTopLeft.X() = static_cast< long >( aTopLeft.X() * HMM_PER_TWIPS );
- aTopLeft.Y() = static_cast< long >( aTopLeft.Y() * HMM_PER_TWIPS );
- aBotRight.X() = static_cast< long >( aBotRight.X() * HMM_PER_TWIPS );
- aBotRight.Y() = static_cast< long >( aBotRight.Y() * HMM_PER_TWIPS );
+ aTopLeft.setX( static_cast< long >( aTopLeft.X() * HMM_PER_TWIPS ) );
+ aTopLeft.setY( static_cast< long >( aTopLeft.Y() * HMM_PER_TWIPS ) );
+ aBotRight.setX( static_cast< long >( aBotRight.X() * HMM_PER_TWIPS ) );
+ aBotRight.setY( static_cast< long >( aBotRight.Y() * HMM_PER_TWIPS ) );
aCellRect = tools::Rectangle( aTopLeft, aBotRight );
if( rDoc.IsNegativePage( rPos.Tab() ) )
@@ -1939,20 +1939,20 @@ void ScDrawLayer::GetCellAnchorFromPosition( const SdrObject &rObj, ScDrawObjDat
rAnchor.maStart = aRange.aStart;
aCellRect = rDoc.GetMMRect( aRange.aStart.Col(), aRange.aStart.Row(),
aRange.aStart.Col(), aRange.aStart.Row(), aRange.aStart.Tab(), bHiddenAsZero );
- rAnchor.maStartOffset.Y() = aObjRect.Top()-aCellRect.Top();
+ rAnchor.maStartOffset.setY( aObjRect.Top()-aCellRect.Top() );
if (!rDoc.IsNegativePage(nTab))
- rAnchor.maStartOffset.X() = aObjRect.Left()-aCellRect.Left();
+ rAnchor.maStartOffset.setX( aObjRect.Left()-aCellRect.Left() );
else
- rAnchor.maStartOffset.X() = aCellRect.Right()-aObjRect.Right();
+ rAnchor.maStartOffset.setX( aCellRect.Right()-aObjRect.Right() );
rAnchor.maEnd = aRange.aEnd;
aCellRect = rDoc.GetMMRect( aRange.aEnd.Col(), aRange.aEnd.Row(),
aRange.aEnd.Col(), aRange.aEnd.Row(), aRange.aEnd.Tab(), bHiddenAsZero );
- rAnchor.maEndOffset.Y() = aObjRect.Bottom()-aCellRect.Top();
+ rAnchor.maEndOffset.setY( aObjRect.Bottom()-aCellRect.Top() );
if (!rDoc.IsNegativePage(nTab))
- rAnchor.maEndOffset.X() = aObjRect.Right()-aCellRect.Left();
+ rAnchor.maEndOffset.setX( aObjRect.Right()-aCellRect.Left() );
else
- rAnchor.maEndOffset.X() = aCellRect.Right()-aObjRect.Left();
+ rAnchor.maEndOffset.setX( aCellRect.Right()-aObjRect.Left() );
}
@@ -1967,11 +1967,11 @@ void ScDrawLayer::UpdateCellAnchorFromPositionEnd( const SdrObject &rObj, ScDraw
tools::Rectangle aCellRect;
aCellRect = rDoc.GetMMRect( aRange.aEnd.Col(), aRange.aEnd.Row(),
aRange.aEnd.Col(), aRange.aEnd.Row(), aRange.aEnd.Tab() );
- pAnchor->maEndOffset.Y() = aObjRect.Bottom()-aCellRect.Top();
+ pAnchor->maEndOffset.setY( aObjRect.Bottom()-aCellRect.Top() );
if (!rDoc.IsNegativePage(nTab))
- pAnchor->maEndOffset.X() = aObjRect.Right()-aCellRect.Left();
+ pAnchor->maEndOffset.setX( aObjRect.Right()-aCellRect.Left() );
else
- pAnchor->maEndOffset.X() = aCellRect.Right()-aObjRect.Left();
+ pAnchor->maEndOffset.setX( aCellRect.Right()-aObjRect.Left() );
}
bool ScDrawLayer::IsCellAnchored( const SdrObject& rObj )
@@ -2157,7 +2157,7 @@ IMapObject* ScDrawLayer::GetHitIMapObject( const SdrObject* pObj,
// Reverse mirroring
if ( static_cast<const SdrGrafObjGeoData*>( pGrafObj->GetGeoData() )->bMirrored )
- aRelPoint.X() = aLogRect.Right() + aLogRect.Left() - aRelPoint.X();
+ aRelPoint.setX( aLogRect.Right() + aLogRect.Left() - aRelPoint.X() );
// Possible Unshear:
if ( rGeo.nShearAngle )
diff --git a/sc/source/core/data/postit.cxx b/sc/source/core/data/postit.cxx
index aa342cac0fe9..e0dbbe124750 100644
--- a/sc/source/core/data/postit.cxx
+++ b/sc/source/core/data/postit.cxx
@@ -235,21 +235,21 @@ void ScCaptionCreator::FitCaptionToRect( const tools::Rectangle* pVisRect )
// tail position
Point aTailPos = mxCaption->GetTailPos();
- aTailPos.X() = ::std::max( ::std::min( aTailPos.X(), rVisRect.Right() ), rVisRect.Left() );
- aTailPos.Y() = ::std::max( ::std::min( aTailPos.Y(), rVisRect.Bottom() ), rVisRect.Top() );
+ aTailPos.setX( ::std::max( ::std::min( aTailPos.X(), rVisRect.Right() ), rVisRect.Left() ) );
+ aTailPos.setY( ::std::max( ::std::min( aTailPos.Y(), rVisRect.Bottom() ), rVisRect.Top() ) );
mxCaption->SetTailPos( aTailPos );
// caption rectangle
tools::Rectangle aCaptRect = mxCaption->GetLogicRect();
Point aCaptPos = aCaptRect.TopLeft();
// move textbox inside right border of visible area
- aCaptPos.X() = ::std::min< long >( aCaptPos.X(), rVisRect.Right() - aCaptRect.GetWidth() );
+ aCaptPos.setX( ::std::min< long >( aCaptPos.X(), rVisRect.Right() - aCaptRect.GetWidth() ) );
// move textbox inside left border of visible area (this may move it outside on right side again)
- aCaptPos.X() = ::std::max< long >( aCaptPos.X(), rVisRect.Left() );
+ aCaptPos.setX( ::std::max< long >( aCaptPos.X(), rVisRect.Left() ) );
// move textbox inside bottom border of visible area
- aCaptPos.Y() = ::std::min< long >( aCaptPos.Y(), rVisRect.Bottom() - aCaptRect.GetHeight() );
+ aCaptPos.setY( ::std::min< long >( aCaptPos.Y(), rVisRect.Bottom() - aCaptRect.GetHeight() ) );
// move textbox inside top border of visible area (this may move it outside on bottom side again)
- aCaptPos.Y() = ::std::max< long >( aCaptPos.Y(), rVisRect.Top() );
+ aCaptPos.setY( ::std::max< long >( aCaptPos.Y(), rVisRect.Top() ) );
// update caption
aCaptRect.SetPos( aCaptPos );
mxCaption->SetLogicRect( aCaptRect );
@@ -299,21 +299,21 @@ void ScCaptionCreator::AutoPlaceCaption( const tools::Rectangle* pVisRect )
bool bPreferRight = bFitsRight && (!mbNegPage || !bFitsLeft);
// move to left, if left is preferred, or if neither left nor right fit and there is more space to the left
if( bPreferLeft || (!bPreferRight && (nLeftSpace > nRightSpace)) )
- aCaptPos.X() = maCellRect.Left() - SC_NOTECAPTION_CELLDIST - nWidth;
+ aCaptPos.setX( maCellRect.Left() - SC_NOTECAPTION_CELLDIST - nWidth );
else // to right
- aCaptPos.X() = maCellRect.Right() + SC_NOTECAPTION_CELLDIST;
+ aCaptPos.setX( maCellRect.Right() + SC_NOTECAPTION_CELLDIST );
// Y position according to top cell border
- aCaptPos.Y() = maCellRect.Top() + SC_NOTECAPTION_OFFSET_Y;
+ aCaptPos.setY( maCellRect.Top() + SC_NOTECAPTION_OFFSET_Y );
}
else // top or bottom placement
{
// X position
- aCaptPos.X() = maCellRect.Left() + SC_NOTECAPTION_OFFSET_X;
+ aCaptPos.setX( maCellRect.Left() + SC_NOTECAPTION_OFFSET_X );
// top placement, if possible
if( bFitsTop )
- aCaptPos.Y() = maCellRect.Top() - SC_NOTECAPTION_CELLDIST - nHeight;
+ aCaptPos.setY( maCellRect.Top() - SC_NOTECAPTION_CELLDIST - nHeight );
else // bottom placement
- aCaptPos.Y() = maCellRect.Bottom() + SC_NOTECAPTION_CELLDIST;
+ aCaptPos.setY( maCellRect.Bottom() + SC_NOTECAPTION_CELLDIST );
}
// update textbox position in note caption object
@@ -365,8 +365,8 @@ Point ScCaptionCreator::CalcTailPos( bool bTailFront )
bool bTailLeft = bTailFront != mbNegPage;
Point aTailPos = bTailLeft ? maCellRect.TopLeft() : maCellRect.TopRight();
// move caption point 1/10 mm inside cell
- if( bTailLeft ) aTailPos.X() += 10; else aTailPos.X() -= 10;
- aTailPos.Y() += 10;
+ if( bTailLeft ) aTailPos.setX( aTailPos.X() + 10 ); else aTailPos.setX( aTailPos.X() - 10 );
+ aTailPos.setY( aTailPos.Y() + 10 );
return aTailPos;
}
@@ -1253,8 +1253,8 @@ ScPostIt* ScNoteUtil::CreateNoteFromObjectData(
{
tools::Rectangle aCellRect = ScDrawLayer::GetCellRect( rDoc, rPos, true );
bool bNegPage = rDoc.IsNegativePage( rPos.Tab() );
- rInitData.maCaptionOffset.X() = bNegPage ? (aCellRect.Left() - rCaptionRect.Right()) : (rCaptionRect.Left() - aCellRect.Right());
- rInitData.maCaptionOffset.Y() = rCaptionRect.Top() - aCellRect.Top();
+ rInitData.maCaptionOffset.setX( bNegPage ? (aCellRect.Left() - rCaptionRect.Right()) : (rCaptionRect.Left() - aCellRect.Right()) );
+ rInitData.maCaptionOffset.setY( rCaptionRect.Top() - aCellRect.Top() );
rInitData.maCaptionSize = rCaptionRect.GetSize();
}
diff --git a/sc/source/core/tool/detfunc.cxx b/sc/source/core/tool/detfunc.cxx
index 780e643ce79f..a87714d79bf0 100644
--- a/sc/source/core/tool/detfunc.cxx
+++ b/sc/source/core/tool/detfunc.cxx
@@ -316,20 +316,20 @@ Point ScDetectiveFunc::GetDrawPos( SCCOL nCol, SCROW nRow, DrawPosMode eMode ) c
++nRow;
break;
case DrawPosMode::DetectiveArrow:
- aPos.X() += pDoc->GetColWidth( nCol, nTab ) / 4;
- aPos.Y() += pDoc->GetRowHeight( nRow, nTab ) / 2;
+ aPos.setX( aPos.X() + pDoc->GetColWidth( nCol, nTab ) / 4 );
+ aPos.setY( aPos.Y() + pDoc->GetRowHeight( nRow, nTab ) / 2 );
break;
}
for ( SCCOL i = 0; i < nCol; ++i )
- aPos.X() += pDoc->GetColWidth( i, nTab );
- aPos.Y() += pDoc->GetRowHeight( 0, nRow - 1, nTab );
+ aPos.setX( aPos.X() + pDoc->GetColWidth( i, nTab ) );
+ aPos.setY( aPos.Y() + pDoc->GetRowHeight( 0, nRow - 1, nTab ) );
- aPos.X() = static_cast< long >( aPos.X() * HMM_PER_TWIPS );
- aPos.Y() = static_cast< long >( aPos.Y() * HMM_PER_TWIPS );
+ aPos.setX( static_cast< long >( aPos.X() * HMM_PER_TWIPS ) );
+ aPos.setY( static_cast< long >( aPos.Y() * HMM_PER_TWIPS ) );
if ( pDoc->IsNegativePage( nTab ) )
- aPos.X() *= -1;
+ aPos.setX( aPos.X() * -1 );
return aPos;
}
@@ -476,9 +476,9 @@ bool ScDetectiveFunc::InsertArrow( SCCOL nCol, SCROW nRow,
aStartPos = Point( aEndPos.X() - 1000 * nPageSign, aEndPos.Y() - 1000 );
if (aStartPos.X() * nPageSign < 0)
- aStartPos.X() += 2000 * nPageSign;
+ aStartPos.setX( aStartPos.X() + 2000 * nPageSign );
if (aStartPos.Y() < 0)
- aStartPos.Y() += 2000;
+ aStartPos.setY( aStartPos.Y() + 2000 );
}
SfxItemSet& rAttrSet = bFromOtherTab ? rData.GetFromTabSet() : rData.GetArrowSet();
@@ -545,7 +545,7 @@ bool ScDetectiveFunc::InsertToOtherTab( SCCOL nStartCol, SCROW nStartRow,
Point aStartPos = GetDrawPos( nStartCol, nStartRow, DrawPosMode::DetectiveArrow );
Point aEndPos = Point( aStartPos.X() + 1000 * nPageSign, aStartPos.Y() - 1000 );
if (aEndPos.Y() < 0)
- aEndPos.Y() += 2000;
+ aEndPos.setY( aEndPos.Y() + 2000 );
SfxItemSet& rAttrSet = rData.GetToTabSet();
if (bArea)
@@ -620,10 +620,10 @@ void ScDetectiveFunc::DrawCircle( SCCOL nCol, SCROW nRow, ScDetectiveData& rData
SdrPage* pPage = pModel->GetPage(static_cast<sal_uInt16>(nTab));
tools::Rectangle aRect = GetDrawRect( nCol, nRow );
- aRect.Left() -= 250;
- aRect.Right() += 250;
- aRect.Top() -= 70;
- aRect.Bottom() += 70;
+ aRect.SetLeft( aRect.Left() - 250 );
+ aRect.SetRight( aRect.Right() + 250 );
+ aRect.SetTop( aRect.Top() - 70 );
+ aRect.SetBottom( aRect.Bottom() + 70 );
SdrCircObj* pCircle = new SdrCircObj( OBJ_CIRC, aRect );
SfxItemSet& rAttrSet = rData.GetCircleSet();
diff --git a/sc/source/core/tool/editutil.cxx b/sc/source/core/tool/editutil.cxx
index fd1d87701944..baaee13ba8db 100644
--- a/sc/source/core/tool/editutil.cxx
+++ b/sc/source/core/tool/editutil.cxx
@@ -310,7 +310,7 @@ tools::Rectangle ScEditUtil::GetEditArea( const ScPatternAttr* pPattern, bool bF
SvxCellHorJustify::Left )
nIndent = pPattern->GetItem(ATTR_INDENT).GetValue();
long nPixDifX = static_cast<long>( ( pMargin->GetLeftMargin() + nIndent ) * nPPTX );
- aStartPos.X() += nPixDifX * nLayoutSign;
+ aStartPos.setX( aStartPos.X() + nPixDifX * nLayoutSign );
nCellX -= nPixDifX + static_cast<long>( pMargin->GetRightMargin() * nPPTX ); // due to line feed, etc.
// align vertical position to the one in the table
@@ -356,11 +356,11 @@ tools::Rectangle ScEditUtil::GetEditArea( const ScPatternAttr* pPattern, bool bF
}
}
- aStartPos.Y() += nPixDifY;
+ aStartPos.setY( aStartPos.Y() + nPixDifY );
nCellY -= nPixDifY;
if ( bLayoutRTL )
- aStartPos.X() -= nCellX - 2; // excluding grid on both sides
+ aStartPos.setX( aStartPos.X() - nCellX - 2 ); // excluding grid on both sides
// -1 -> don't overwrite grid
return tools::Rectangle( aStartPos, Size(nCellX-1,nCellY-1) );
diff --git a/sc/source/filter/excel/xiescher.cxx b/sc/source/filter/excel/xiescher.cxx
index 39b50fc22432..63284f9076d2 100644
--- a/sc/source/filter/excel/xiescher.cxx
+++ b/sc/source/filter/excel/xiescher.cxx
@@ -1257,26 +1257,26 @@ SdrObjectPtr XclImpArcObj::DoCreateSdrObj( XclImpDffConverter& rDffConv, const t
case EXC_OBJ_ARC_TR:
nStartAngle = 0;
nEndAngle = 9000;
- aNewRect.Left() -= rAnchorRect.GetWidth();
- aNewRect.Bottom() += rAnchorRect.GetHeight();
+ aNewRect.SetLeft( aNewRect.Left() - rAnchorRect.GetWidth() );
+ aNewRect.SetBottom( aNewRect.Bottom() + rAnchorRect.GetHeight() );
break;
case EXC_OBJ_ARC_TL:
nStartAngle = 9000;
nEndAngle = 18000;
- aNewRect.Right() += rAnchorRect.GetWidth();
- aNewRect.Bottom() += rAnchorRect.GetHeight();
+ aNewRect.SetRight( aNewRect.Right() + rAnchorRect.GetWidth() );
+ aNewRect.SetBottom( aNewRect.Bottom() + rAnchorRect.GetHeight() );
break;
case EXC_OBJ_ARC_BL:
nStartAngle = 18000;
nEndAngle = 27000;
- aNewRect.Right() += rAnchorRect.GetWidth();
- aNewRect.Top() -= rAnchorRect.GetHeight();
+ aNewRect.SetRight( aNewRect.Right() + rAnchorRect.GetWidth() );
+ aNewRect.SetTop( aNewRect.Top() - rAnchorRect.GetHeight() );
break;
case EXC_OBJ_ARC_BR:
nStartAngle = 27000;
nEndAngle = 0;
- aNewRect.Left() -= rAnchorRect.GetWidth();
- aNewRect.Top() -= rAnchorRect.GetHeight();
+ aNewRect.SetLeft( aNewRect.Left() - rAnchorRect.GetWidth() );
+ aNewRect.SetTop( aNewRect.Top() - rAnchorRect.GetHeight() );
break;
}
SdrObjKind eObjKind = maFillData.IsFilled() ? OBJ_SECT : OBJ_CARC;
diff --git a/sc/source/filter/excel/xiview.cxx b/sc/source/filter/excel/xiview.cxx
index 4a1360bfaf26..e654fc7d3492 100644
--- a/sc/source/filter/excel/xiview.cxx
+++ b/sc/source/filter/excel/xiview.cxx
@@ -257,8 +257,8 @@ void XclImpTabViewSettings::Finalize()
else
{
// split window: position is in twips
- rTabSett.maSplitPos.X() = static_cast< long >( maData.mnSplitX );
- rTabSett.maSplitPos.Y() = static_cast< long >( maData.mnSplitY );
+ rTabSett.maSplitPos.setX( static_cast< long >( maData.mnSplitX ) );
+ rTabSett.maSplitPos.setY( static_cast< long >( maData.mnSplitY ) );
}
// grid color
diff --git a/sc/source/filter/excel/xlescher.cxx b/sc/source/filter/excel/xlescher.cxx
index eb70bc590ce7..13de797854b4 100644
--- a/sc/source/filter/excel/xlescher.cxx
+++ b/sc/source/filter/excel/xlescher.cxx
@@ -122,8 +122,8 @@ void lclGetRowFromY(
void lclMirrorRectangle( tools::Rectangle& rRect )
{
long nLeft = rRect.Left();
- rRect.Left() = -rRect.Right();
- rRect.Right() = -nLeft;
+ rRect.SetLeft( -rRect.Right() );
+ rRect.SetRight( -nLeft );
}
sal_uInt16 lclGetEmbeddedScale( long nPageSize, sal_Int32 nPageScale, long nPos, double fPosScale )
diff --git a/sc/source/filter/html/htmlexp.cxx b/sc/source/filter/html/htmlexp.cxx
index 46a25549db44..b342d37b8509 100644
--- a/sc/source/filter/html/htmlexp.cxx
+++ b/sc/source/filter/html/htmlexp.cxx
@@ -287,9 +287,9 @@ Size ScHTMLExport::MMToPixel( const Size& rSize )
aSize = pAppWin->LogicToPixel( rSize, MapMode( MapUnit::Map100thMM ) );
// If there's something there should also be a Pixel
if ( !aSize.Width() && rSize.Width() )
- aSize.Width() = 1;
+ aSize.setWidth( 1 );
if ( !aSize.Height() && rSize.Height() )
- aSize.Height() = 1;
+ aSize.setHeight( 1 );
return aSize;
}
diff --git a/sc/source/filter/html/htmlexp2.cxx b/sc/source/filter/html/htmlexp2.cxx
index 1838e4c89e42..d8c1a8b36ccf 100644
--- a/sc/source/filter/html/htmlexp2.cxx
+++ b/sc/source/filter/html/htmlexp2.cxx
@@ -101,10 +101,10 @@ void ScHTMLExport::FillGraphList( const SdrPage* pPage, SCTAB nTab,
aSpace = MMToPixel( Size(
aCellRect.GetWidth() - aObjRect.GetWidth(),
aCellRect.GetHeight() - aObjRect.GetHeight() ));
- aSpace.Width() += (nCol2-nCol1) * (nCellSpacing+1);
- aSpace.Height() += (nRow2-nRow1) * (nCellSpacing+1);
- aSpace.Width() /= 2;
- aSpace.Height() /= 2;
+ aSpace.setWidth( aSpace.Width() + (nCol2-nCol1) * (nCellSpacing+1) );
+ aSpace.setHeight( aSpace.Height() + (nRow2-nRow1) * (nCellSpacing+1) );
+ aSpace.setWidth( aSpace.Width() / 2 );
+ aSpace.setHeight( aSpace.Height() / 2 );
}
aGraphList.emplace_back( pObject,
aR, aSize, bInCell, aSpace );
diff --git a/sc/source/filter/html/htmlimp.cxx b/sc/source/filter/html/htmlimp.cxx
index e689c0e18492..927398fcf907 100644
--- a/sc/source/filter/html/htmlimp.cxx
+++ b/sc/source/filter/html/htmlimp.cxx
@@ -82,8 +82,8 @@ ScHTMLImport::ScHTMLImport( ScDocument* pDocP, const OUString& rBaseURL, const S
OSL_FAIL("PageSize Null ?!?!?");
aPageSize = SvxPaperInfo::GetPaperSize( PAPER_A4 );
}
- aPageSize.Width() -= nLeftMargin + nRightMargin;
- aPageSize.Height() -= nTopMargin + nBottomMargin;
+ aPageSize.setWidth( aPageSize.Width() - nLeftMargin + nRightMargin );
+ aPageSize.setHeight( aPageSize.Height() - nTopMargin + nBottomMargin );
aPageSize = pDefaultDev->LogicToPixel( aPageSize, MapMode( MapUnit::MapTwip ) );
}
else
diff --git a/sc/source/filter/html/htmlpars.cxx b/sc/source/filter/html/htmlpars.cxx
index 7c3b5d80723d..fd596fbcf173 100644
--- a/sc/source/filter/html/htmlpars.cxx
+++ b/sc/source/filter/html/htmlpars.cxx
@@ -281,7 +281,7 @@ ErrCode ScHTMLLayoutParser::Read( SvStream& rStream, const OUString& rBaseURL )
Size aSize;
for ( sal_uInt16 j = 1; j < nCount; j++ )
{
- aSize.Width() = maColOffset[j] - nOff;
+ aSize.setWidth( maColOffset[j] - nOff );
aSize = pDefaultDev->PixelToLogic( aSize, MapMode( MapUnit::MapTwip ) );
maColWidths[ j-1 ] = aSize.Width();
nOff = maColOffset[j];
@@ -763,7 +763,7 @@ void ScHTMLLayoutParser::SetWidths()
{
sal_uInt16 nMax = static_cast<sal_uInt16>(pLocalColOffset->back());
if ( aPageSize.Width() < nMax )
- aPageSize.Width() = nMax;
+ aPageSize.setWidth( nMax );
}
for ( size_t i = nFirstTableCell, nListSize = maList.size(); i < nListSize; ++i )
{
@@ -1319,22 +1319,22 @@ void ScHTMLLayoutParser::Image( HtmlImportInfo* pInfo )
break;
case HtmlOptionId::WIDTH:
{
- pImage->aSize.Width() = static_cast<long>(rOption.GetNumber());
+ pImage->aSize.setWidth( static_cast<long>(rOption.GetNumber()) );
}
break;
case HtmlOptionId::HEIGHT:
{
- pImage->aSize.Height() = static_cast<long>(rOption.GetNumber());
+ pImage->aSize.setHeight( static_cast<long>(rOption.GetNumber()) );
}
break;
case HtmlOptionId::HSPACE:
{
- pImage->aSpace.X() = static_cast<long>(rOption.GetNumber());
+ pImage->aSpace.setX( static_cast<long>(rOption.GetNumber()) );
}
break;
case HtmlOptionId::VSPACE:
{
- pImage->aSpace.Y() = static_cast<long>(rOption.GetNumber());
+ pImage->aSpace.setY( static_cast<long>(rOption.GetNumber()) );
}
break;
default: break;
diff --git a/sc/source/filter/rtf/eeimpars.cxx b/sc/source/filter/rtf/eeimpars.cxx
index b07ddecf9ae5..d8b770a79243 100644
--- a/sc/source/filter/rtf/eeimpars.cxx
+++ b/sc/source/filter/rtf/eeimpars.cxx
@@ -504,8 +504,8 @@ bool ScEEImport::GraphicSize( SCCOL nCol, SCROW nRow, ScEEParseEntry* pE )
if ( pI->pGraphic )
bHasGraphics = true;
Size aSizePix = pI->aSize;
- aSizePix.Width() += 2 * pI->aSpace.X();
- aSizePix.Height() += 2 * pI->aSpace.Y();
+ aSizePix.setWidth( aSizePix.Width() + 2 * pI->aSpace.X() );
+ aSizePix.setHeight( aSizePix.Height() + 2 * pI->aSpace.Y() );
Size aLogicSize = pDefaultDev->PixelToLogic( aSizePix, MapMode( MapUnit::MapTwip ) );
if ( nDir & nHorizontal )
nWidth += aLogicSize.Width();
@@ -579,15 +579,15 @@ void ScEEImport::InsertGraphic( SCCOL nCol, SCROW nRow, SCTAB nTab,
ScHTMLImage* pI = pImage.get();
if ( nDir & nHorizontal )
{ // Horizontal
- aInsertPos.X() += aLogicSize.Width();
- aInsertPos.X() += aSpace.X();
- aInsertPos.Y() = aCellInsertPos.Y();
+ aInsertPos.setX( aInsertPos.X() + aLogicSize.Width() );
+ aInsertPos.setX( aInsertPos.X() + aSpace.X() );
+ aInsertPos.setY( aCellInsertPos.Y() );
}
else
{ // Vertical
- aInsertPos.X() = aCellInsertPos.X();
- aInsertPos.Y() += aLogicSize.Height();
- aInsertPos.Y() += aSpace.Y();
+ aInsertPos.setX( aCellInsertPos.X() );
+ aInsertPos.setY( aInsertPos.Y() + aLogicSize.Height() );
+ aInsertPos.setY( aInsertPos.Y() + aSpace.Y() );
}
// Add offset of Spacing
aSpace = pDefaultDev->PixelToLogic( pI->aSpace, MapMode( MapUnit::Map100thMM ) );
diff --git a/sc/source/filter/xml/XMLTableShapeImportHelper.cxx b/sc/source/filter/xml/XMLTableShapeImportHelper.cxx
index 2a7347cd2dbf..eeceb168ecdf 100644
--- a/sc/source/filter/xml/XMLTableShapeImportHelper.cxx
+++ b/sc/source/filter/xml/XMLTableShapeImportHelper.cxx
@@ -119,14 +119,14 @@ void XMLTableShapeImportHelper::finishShape(
static_cast<ScXMLImport&>(mrImporter).
GetMM100UnitConverter().convertMeasureToCore(
nEndX, rValue);
- aAnchor.maEndOffset.X() = nEndX;
+ aAnchor.maEndOffset.setX( nEndX );
}
else if (IsXMLToken(aLocalName, XML_END_Y))
{
static_cast<ScXMLImport&>(mrImporter).
GetMM100UnitConverter().convertMeasureToCore(
nEndY, rValue);
- aAnchor.maEndOffset.Y() = nEndY;
+ aAnchor.maEndOffset.setY( nEndY );
}
else if (IsXMLToken(aLocalName, XML_TABLE_BACKGROUND))
if (IsXMLToken(rValue, XML_TRUE))
diff --git a/sc/source/ui/Accessibility/AccessibleCsvControl.cxx b/sc/source/ui/Accessibility/AccessibleCsvControl.cxx
index 3b4cef34f065..59544f0d85e4 100644
--- a/sc/source/ui/Accessibility/AccessibleCsvControl.cxx
+++ b/sc/source/ui/Accessibility/AccessibleCsvControl.cxx
@@ -1525,11 +1525,11 @@ tools::Rectangle ScAccessibleCsvCell::implGetBoundingBox() const
tools::Rectangle aClipRect( Point( 0, 0 ), rGrid.GetSizePixel() );
if( mnColumn != CSV_COLUMN_HEADER )
{
- aClipRect.Left() = rGrid.GetFirstX();
- aClipRect.Right() = rGrid.GetLastX();
+ aClipRect.SetLeft( rGrid.GetFirstX() );
+ aClipRect.SetRight( rGrid.GetLastX() );
}
if( mnLine != CSV_LINE_HEADER )
- aClipRect.Top() = rGrid.GetHdrHeight();
+ aClipRect.SetTop( rGrid.GetHdrHeight() );
tools::Rectangle aRect( implGetRealPos(), implGetRealSize() );
aRect.Intersection( aClipRect );
diff --git a/sc/source/ui/app/client.cxx b/sc/source/ui/app/client.cxx
index a46ca516a599..11b2edcdaf4e 100644
--- a/sc/source/ui/app/client.cxx
+++ b/sc/source/ui/app/client.cxx
@@ -105,35 +105,35 @@ void ScClient::RequestNewObjectArea( tools::Rectangle& aLogicRect )
Size aSize = pPage->GetSize();
if ( aSize.Width() < 0 )
{
- aPos.X() = aSize.Width() + 1; // negative
- aSize.Width() = -aSize.Width(); // positive
+ aPos.setX( aSize.Width() + 1 ); // negative
+ aSize.setWidth( -aSize.Width() ); // positive
}
tools::Rectangle aPageRect( aPos, aSize );
if (aLogicRect.Right() > aPageRect.Right())
{
long nDiff = aLogicRect.Right() - aPageRect.Right();
- aLogicRect.Left() -= nDiff;
- aLogicRect.Right() -= nDiff;
+ aLogicRect.SetLeft( aLogicRect.Left() - nDiff );
+ aLogicRect.SetRight( aLogicRect.Right() - nDiff );
}
if (aLogicRect.Bottom() > aPageRect.Bottom())
{
long nDiff = aLogicRect.Bottom() - aPageRect.Bottom();
- aLogicRect.Top() -= nDiff;
- aLogicRect.Bottom() -= nDiff;
+ aLogicRect.SetTop( aLogicRect.Top() - nDiff );
+ aLogicRect.SetBottom( aLogicRect.Bottom() - nDiff );
}
if (aLogicRect.Left() < aPageRect.Left())
{
long nDiff = aLogicRect.Left() - aPageRect.Left();
- aLogicRect.Right() -= nDiff;
- aLogicRect.Left() -= nDiff;
+ aLogicRect.SetRight( aLogicRect.Right() - nDiff );
+ aLogicRect.SetLeft( aLogicRect.Left() - nDiff );
}
if (aLogicRect.Top() < aPageRect.Top())
{
long nDiff = aLogicRect.Top() - aPageRect.Top();
- aLogicRect.Bottom() -= nDiff;
- aLogicRect.Top() -= nDiff;
+ aLogicRect.SetBottom( aLogicRect.Bottom() - nDiff );
+ aLogicRect.SetTop( aLogicRect.Top() - nDiff );
}
}
}
diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx
index 80620aa35383..5a9bf32ad918 100644
--- a/sc/source/ui/app/inputhdl.cxx
+++ b/sc/source/ui/app/inputhdl.cxx
@@ -1097,7 +1097,7 @@ void ScInputHandler::ShowTipBelow( const OUString& rText )
if ( pCur )
{
Point aLogicPos = pCur->GetPos();
- aLogicPos.Y() += pCur->GetHeight();
+ aLogicPos.setY( aLogicPos.Y() + pCur->GetHeight() );
aPos = pTipVisibleSecParent->LogicToPixel( aLogicPos );
}
aPos = pTipVisibleSecParent->OutputToScreenPixel( aPos );
diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx
index 815b83692952..550f5cff6d62 100644
--- a/sc/source/ui/app/inputwin.cxx
+++ b/sc/source/ui/app/inputwin.cxx
@@ -451,7 +451,7 @@ void ScInputWindow::Resize()
aTextWindow.Resize();
Size aSize = GetSizePixel();
- aSize.Height() = CalcWindowSizePixel().Height() + ADDITIONAL_BORDER;
+ aSize.setHeight( CalcWindowSizePixel().Height() + ADDITIONAL_BORDER );
ScInputBarGroup* pGroupBar = dynamic_cast<ScInputBarGroup*>(pRuntimeWindow.get());
if (pGroupBar)
{
@@ -462,7 +462,7 @@ void ScInputWindow::Resize()
// then the largest item ( e.g. the GroupBar window ) will actually be
// positioned such that the toolbar will cut off the bottom of that item
if (pGroupBar->GetNumLines() > 1)
- aSize.Height() += pGroupBar->GetVertOffset() + ADDITIONAL_SPACE;
+ aSize.setHeight( aSize.Height() + pGroupBar->GetVertOffset() + ADDITIONAL_SPACE );
}
SetSizePixel(aSize);
Invalidate();
@@ -686,7 +686,7 @@ void ScInputWindow::MouseMove( const MouseEvent& rMEvt )
if (aPosPixel.Y() >= mnMaxY)
{
bResetPointerPos = true;
- aPosPixel.Y() = mnMaxY;
+ aPosPixel.setY( mnMaxY );
} // or expanding down
else if (GetOutputSizePixel().Height() - aPosPixel.Y() < -nResizeThreshold)
{
@@ -701,7 +701,7 @@ void ScInputWindow::MouseMove( const MouseEvent& rMEvt )
if (bResetPointerPos)
{
- aPosPixel.Y() = GetOutputSizePixel().Height();
+ aPosPixel.setY( GetOutputSizePixel().Height() );
SetPointerPosPixel(aPosPixel);
}
}
@@ -817,17 +817,17 @@ void ScInputBarGroup::Resize()
long nLeft = GetPosPixel().X();
Size aSize = GetSizePixel();
- aSize.Width() = std::max(long(nWidth - nLeft - LEFT_OFFSET), long(0));
+ aSize.setWidth( std::max(long(nWidth - nLeft - LEFT_OFFSET), long(0)) );
maScrollbar->SetPosPixel(Point( aSize.Width() - maButton->GetSizePixel().Width(), maButton->GetSizePixel().Height() ) );
Size aTmpSize( aSize );
- aTmpSize.Width() = aTmpSize.Width() - maButton->GetSizePixel().Width() - BUTTON_OFFSET;
+ aTmpSize.setWidth( aTmpSize.Width() - maButton->GetSizePixel().Width() - BUTTON_OFFSET );
maTextWnd->SetSizePixel(aTmpSize);
maTextWnd->Resize();
- aSize.Height() = maTextWnd->GetSizePixel().Height();
+ aSize.setHeight( maTextWnd->GetSizePixel().Height() );
SetSizePixel(aSize);
@@ -836,7 +836,7 @@ void ScInputBarGroup::Resize()
maButton->SetSymbol( SymbolType::SPIN_UP );
maButton->SetQuickHelpText( ScResId( SCSTR_QHELP_COLLAPSE_FORMULA ) );
Size scrollSize = maButton->GetSizePixel();
- scrollSize.Height() = maTextWnd->GetSizePixel().Height() - maButton->GetSizePixel().Height();
+ scrollSize.setHeight( maTextWnd->GetSizePixel().Height() - maButton->GetSizePixel().Height() );
maScrollbar->SetSizePixel( scrollSize );
Size aOutSz = maTextWnd->GetOutputSize();
@@ -1047,7 +1047,7 @@ void ScTextWnd::Resize()
// parent/container window
Size aTextBoxSize = GetSizePixel();
- aTextBoxSize.Height() = GetPixelHeightForLines( mnLines );
+ aTextBoxSize.setHeight( GetPixelHeightForLines( mnLines ) );
SetSizePixel( aTextBoxSize );
if (mpEditView)
@@ -1173,8 +1173,8 @@ static void lcl_ModifyRTLVisArea( EditView* pEditView )
tools::Rectangle aVisArea = pEditView->GetVisArea();
Size aPaper = pEditView->GetEditEngine()->GetPaperSize();
long nDiff = aPaper.Width() - aVisArea.Right();
- aVisArea.Left() += nDiff;
- aVisArea.Right() += nDiff;
+ aVisArea.SetLeft( aVisArea.Left() + nDiff );
+ aVisArea.SetRight( aVisArea.Right() + nDiff );
pEditView->SetVisArea(aVisArea);
}
@@ -1295,7 +1295,7 @@ ScTextWnd::ScTextWnd(ScInputBarGroup* pParent, ScTabViewShell* pViewSh)
Size aSize(1,TBX_WINDOW_HEIGHT);
Size aMinEditSize( Edit::GetMinimumEditSize() );
if( aMinEditSize.Height() > aSize.Height() )
- aSize.Height() = aMinEditSize.Height();
+ aSize.setHeight( aMinEditSize.Height() );
SetSizePixel(aSize);
SetBackground(aBgColor);
@@ -1789,8 +1789,8 @@ ScPosWnd::ScPosWnd( vcl::Window* pParent ) :
set_id("pos_window");
Size aSize( GetTextWidth( "GW99999:GW99999" ),
GetTextHeight() );
- aSize.Width() += 25; // FIXME: ??
- aSize.Height() = CalcWindowSizePixel(11); // Functions: 10 MRU + "others..."
+ aSize.setWidth( aSize.Width() + 25 ); // FIXME: ??
+ aSize.setHeight( CalcWindowSizePixel(11) ); // Functions: 10 MRU + "others..."
SetSizePixel( aSize );
FillRangeNames();
diff --git a/sc/source/ui/app/transobj.cxx b/sc/source/ui/app/transobj.cxx
index 9089f7875812..0ebf47ef3e7d 100644
--- a/sc/source/ui/app/transobj.cxx
+++ b/sc/source/ui/app/transobj.cxx
@@ -740,8 +740,8 @@ void ScTransferObj::InitDocShell(bool bLimitToPageSize)
nPosX = static_cast<long>( nPosX * HMM_PER_TWIPS );
nPosY = static_cast<long>( nPosY * HMM_PER_TWIPS );
- aPaperSize.Width() *= 2; // limit OLE object to double of page size
- aPaperSize.Height() *= 2;
+ aPaperSize.setWidth( aPaperSize.Width() * 2 ); // limit OLE object to double of page size
+ aPaperSize.setHeight( aPaperSize.Height() * 2 );
long nSizeX = 0;
long nSizeY = 0;
diff --git a/sc/source/ui/cctrl/cbuttonw.cxx b/sc/source/ui/cctrl/cbuttonw.cxx
index d354b933d9bc..74d18d4fec84 100644
--- a/sc/source/ui/cctrl/cbuttonw.cxx
+++ b/sc/source/ui/cctrl/cbuttonw.cxx
@@ -44,7 +44,7 @@ void ScDDComboBoxButton::SetOutputDevice( OutputDevice* pOutputDevice )
void ScDDComboBoxButton::SetOptSizePixel()
{
aBtnSize = pOut->LogicToPixel(Size(8, 11), MapMode(MapUnit::MapAppFont));
- aBtnSize.Width() = std::max(aBtnSize.Width(), pOut->GetSettings().GetStyleSettings().GetScrollBarSize());
+ aBtnSize.setWidth( std::max(aBtnSize.Width(), pOut->GetSettings().GetStyleSettings().GetScrollBarSize()) );
}
void ScDDComboBoxButton::Draw( const Point& rAt,
@@ -68,16 +68,16 @@ void ScDDComboBoxButton::Draw( const Point& rAt,
tools::Rectangle aInnerRect=aDecoView.DrawButton( aBtnRect, DrawButtonFlags::Default );
- aInnerRect.Left() += 1;
- aInnerRect.Top() += 1;
- aInnerRect.Right() -= 1;
- aInnerRect.Bottom() -= 1;
+ aInnerRect.SetLeft( aInnerRect.Left() + 1 );
+ aInnerRect.SetTop( aInnerRect.Top() + 1 );
+ aInnerRect.SetRight( aInnerRect.Right() - 1 );
+ aInnerRect.SetBottom( aInnerRect.Bottom() - 1 );
Size aInnerSize = aInnerRect.GetSize();
Point aInnerCenter = aInnerRect.Center();
- aInnerRect.Top() = aInnerCenter.Y() - (aInnerSize.Width()>>1);
- aInnerRect.Bottom()= aInnerCenter.Y() + (aInnerSize.Width()>>1);
+ aInnerRect.SetTop( aInnerCenter.Y() - (aInnerSize.Width()>>1) );
+ aInnerRect.SetBottom( aInnerCenter.Y() + (aInnerSize.Width()>>1) );
ImpDrawArrow( aInnerRect );
@@ -102,12 +102,12 @@ void ScDDComboBoxButton::ImpDrawArrow( const tools::Rectangle& rRect )
Size aSize = aPixRect.GetSize();
Size aSize3;
- aSize3.Width() = aSize.Width() >> 1;
- aSize3.Height() = aSize.Height() >> 1;
+ aSize3.setWidth( aSize.Width() >> 1 );
+ aSize3.setHeight( aSize.Height() >> 1 );
Size aSize4;
- aSize4.Width() = aSize.Width() >> 2;
- aSize4.Height() = aSize.Height() >> 2;
+ aSize4.setWidth( aSize.Width() >> 2 );
+ aSize4.setHeight( aSize.Height() >> 2 );
tools::Rectangle aTempRect = aPixRect;
@@ -116,10 +116,10 @@ void ScDDComboBoxButton::ImpDrawArrow( const tools::Rectangle& rRect )
pOut->SetFillColor( aColor );
pOut->SetLineColor( aColor );
- aTempRect.Left() = aCenter.X() - aSize4.Width();
- aTempRect.Right() = aCenter.X() + aSize4.Width();
- aTempRect.Top() = aCenter.Y() - aSize3.Height();
- aTempRect.Bottom() = aCenter.Y() - 1;
+ aTempRect.SetLeft( aCenter.X() - aSize4.Width() );
+ aTempRect.SetRight( aCenter.X() + aSize4.Width() );
+ aTempRect.SetTop( aCenter.Y() - aSize3.Height() );
+ aTempRect.SetBottom( aCenter.Y() - 1 );
pOut->DrawRect( aTempRect );
@@ -128,8 +128,10 @@ void ScDDComboBoxButton::ImpDrawArrow( const tools::Rectangle& rRect )
while( aPos1.X() <= aPos2.X() )
{
pOut->DrawLine( aPos1, aPos2 );
- aPos1.X()++; aPos2.X()--;
- aPos1.Y()++; aPos2.Y()++;
+ aPos1.setX( ++aPos1.X() );
+ aPos2.setX( --aPos2.X() );
+ aPos1.setY( ++aPos1.Y() );
+ aPos2.setY( ++aPos2.Y() );
}
pOut->DrawLine( Point( aCenter.X() - aSize3.Width(), aPos1.Y()+1 ),
diff --git a/sc/source/ui/cctrl/checklistmenu.cxx b/sc/source/ui/cctrl/checklistmenu.cxx
index 43c607a2f15f..1bc8a827008f 100644
--- a/sc/source/ui/cctrl/checklistmenu.cxx
+++ b/sc/source/ui/cctrl/checklistmenu.cxx
@@ -344,8 +344,8 @@ Size ScMenuFloatingWindow::getMenuSize() const
Point aPos;
Size aSize;
getMenuItemPosSize(nLastPos, aPos, aSize);
- aPos.X() += nTextWidth + 15;
- aPos.Y() += aSize.Height() + 5;
+ aPos.setX( aPos.X() + nTextWidth + 15 );
+ aPos.setY( aPos.Y() + aSize.Height() + 5 );
return Size(aPos.X(), aPos.Y());
}
@@ -369,8 +369,8 @@ void ScMenuFloatingWindow::drawMenuItem(vcl::RenderContext& rRenderContext, size
{
long nFontHeight = maLabelFont.GetFontHeight();
Point aMarkerPos = aPos;
- aMarkerPos.Y() += aSize.Height() / 2 - nFontHeight / 4 + 1;
- aMarkerPos.X() += aSize.Width() - nFontHeight + nFontHeight / 4;
+ aMarkerPos.setY( aMarkerPos.Y() + aSize.Height() / 2 - nFontHeight / 4 + 1 );
+ aMarkerPos.setX( aMarkerPos.X() + aSize.Width() - nFontHeight + nFontHeight / 4 );
Size aMarkerSize(nFontHeight / 2, nFontHeight / 2);
aDecoView.DrawSymbol(tools::Rectangle(aMarkerPos, aMarkerSize), SymbolType::SPIN_RIGHT, GetTextColor());
}
@@ -410,7 +410,7 @@ void ScMenuFloatingWindow::drawSeparator(vcl::RenderContext& rRenderContext, siz
{
const StyleSettings& rStyle = rRenderContext.GetSettings().GetStyleSettings();
Point aTmpPos = aPos;
- aTmpPos.Y() += aSize.Height() / 2;
+ aTmpPos.setY( aTmpPos.Y() + aSize.Height() / 2 );
rRenderContext.SetLineColor(rStyle.GetShadowColor());
rRenderContext.DrawLine(aTmpPos, Point(aSize.Width() + aTmpPos.X(), aTmpPos.Y()));
++aTmpPos.Y();
@@ -728,7 +728,7 @@ void ScMenuFloatingWindow::getMenuItemPosSize(size_t nPos, Point& rPos, Size& rS
Point aPos1(nLeftMargin, nTopMargin);
rPos = aPos1;
for (size_t i = 0; i < nPos; ++i)
- rPos.Y() += maMenuItems[i].mbSeparator ? nSepHeight : nMenuItemHeight;
+ rPos.setY( rPos.Y() + (maMenuItems[i].mbSeparator ? nSepHeight : nMenuItemHeight) );
Size aWndSize = GetSizePixel();
sal_uInt16 nH = maMenuItems[nPos].mbSeparator ? nSepHeight : nMenuItemHeight;
@@ -979,12 +979,12 @@ void ScCheckListMenuWindow::getSectionPosSize(
case LISTBOX_AREA_INNER:
{
rPos = Point(nListBoxMargin, nTopMargin + nMenuHeight + nMenuListMargin + nSearchBoxHeight + nSearchBoxMargin);
- rPos.X() += nListBoxInnerPadding;
- rPos.Y() += nListBoxInnerPadding;
+ rPos.setX( rPos.X() + nListBoxInnerPadding );
+ rPos.setY( rPos.Y() + nListBoxInnerPadding );
rSize = Size(nListBoxWidth, nListBoxHeight);
- rSize.Width() -= nListBoxInnerPadding*2;
- rSize.Height() -= nListBoxInnerPadding*2;
+ rSize.setWidth( rSize.Width() - nListBoxInnerPadding*2 );
+ rSize.setHeight( rSize.Height() - nListBoxInnerPadding*2 );
}
break;
case SINGLE_BTN_AREA:
@@ -997,8 +997,8 @@ void ScCheckListMenuWindow::getSectionPosSize(
{
long h = std::min(maChkToggleAll->CalcMinimumSize().Height(), 26L);
rPos = Point(nListBoxMargin, nSingleBtnAreaY);
- rPos.X() += 5;
- rPos.Y() += (nSingleItemBtnAreaHeight - h)/2;
+ rPos.setX( rPos.X() + 5 );
+ rPos.setY( rPos.Y() + (nSingleItemBtnAreaHeight - h)/2 );
rSize = Size(70, h);
}
break;
@@ -1006,8 +1006,8 @@ void ScCheckListMenuWindow::getSectionPosSize(
{
long h = 26 * fScaleFactor;
rPos = Point(nListBoxMargin, nSingleBtnAreaY);
- rPos.X() += nListBoxWidth - h - 10 - h - 10;
- rPos.Y() += (nSingleItemBtnAreaHeight - h)/2;
+ rPos.setX( rPos.X() + nListBoxWidth - h - 10 - h - 10 );
+ rPos.setY( rPos.Y() + (nSingleItemBtnAreaHeight - h)/2 );
rSize = Size(h, h);
}
break;
@@ -1015,8 +1015,8 @@ void ScCheckListMenuWindow::getSectionPosSize(
{
long h = 26 * fScaleFactor;
rPos = Point(nListBoxMargin, nSingleBtnAreaY);
- rPos.X() += nListBoxWidth - h - 10;
- rPos.Y() += (nSingleItemBtnAreaHeight - h)/2;
+ rPos.setX( rPos.X() + nListBoxWidth - h - 10 );
+ rPos.setY( rPos.Y() + (nSingleItemBtnAreaHeight - h)/2 );
rSize = Size(h, h);
}
break;
@@ -1047,11 +1047,11 @@ void ScCheckListMenuWindow::packWindow()
if (maWndSize.Width() < maMenuSize.Width())
// Widen the window to fit the menu items.
- maWndSize.Width() = maMenuSize.Width();
+ maWndSize.setWidth( maMenuSize.Width() );
// Set proper window height based on the number of menu items.
if (maWndSize.Height() < maMenuSize.Height()*2.8)
- maWndSize.Height() = maMenuSize.Height()*2.8;
+ maWndSize.setHeight( maMenuSize.Height()*2.8 );
// TODO: Make sure the window height never exceeds the height of the
// screen. Also do adjustment based on the number of check box items.
@@ -1988,7 +1988,7 @@ void ScCheckListMenuWindow::launch(const tools::Rectangle& rRect)
{
// In RTL mode, the logical "left" is visual "right".
long nLeft = aRect.Left() - aRect.GetWidth();
- aRect.Left() = nLeft;
+ aRect.SetLeft( nLeft );
}
else if (maWndSize.Width() < aRect.GetWidth())
{
@@ -1996,7 +1996,7 @@ void ScCheckListMenuWindow::launch(const tools::Rectangle& rRect)
// Simulate right-aligned launch by modifying the target rectangle
// size.
long nDiff = aRect.GetWidth() - maWndSize.Width();
- aRect.Left() += nDiff;
+ aRect.SetLeft( aRect.Left() + nDiff );
}
StartPopupMode(aRect, (FloatWinPopupFlags::Down | FloatWinPopupFlags::GrabFocus));
diff --git a/sc/source/ui/cctrl/dpcontrol.cxx b/sc/source/ui/cctrl/dpcontrol.cxx
index e1fabdb3540c..5667522e2161 100644
--- a/sc/source/ui/cctrl/dpcontrol.cxx
+++ b/sc/source/ui/cctrl/dpcontrol.cxx
@@ -64,7 +64,7 @@ void ScDPFieldButton::setBoundingBox(const Point& rPos, const Size& rSize, bool
if (bLayoutRTL)
{
// rPos is the logical-left position, adjust maPos to visual-left (inside the cell border)
- maPos.X() -= maSize.Width() - 1;
+ maPos.setX( maPos.X() - maSize.Width() - 1 );
}
}
diff --git a/sc/source/ui/cctrl/tbzoomsliderctrl.cxx b/sc/source/ui/cctrl/tbzoomsliderctrl.cxx
index 7b6d58282db2..832eef885a8e 100644
--- a/sc/source/ui/cctrl/tbzoomsliderctrl.cxx
+++ b/sc/source/ui/cctrl/tbzoomsliderctrl.cxx
@@ -399,22 +399,22 @@ void ScZoomSliderWnd::DoPaint(vcl::RenderContext& rRenderContext)
tools::Rectangle aSlider = aRect;
- aSlider.Top() += (aSliderWindowSize.Height() - nSliderHeight) / 2 - 1;
- aSlider.Bottom() = aSlider.Top() + nSliderHeight;
- aSlider.Left() += nSliderXOffset;
- aSlider.Right() -= nSliderXOffset;
+ aSlider.SetTop( aSlider.Top() + (aSliderWindowSize.Height() - nSliderHeight) / 2 - 1 );
+ aSlider.SetBottom( aSlider.Top() + nSliderHeight );
+ aSlider.SetLeft( aSlider.Left() + nSliderXOffset );
+ aSlider.SetRight( aSlider.Right() - nSliderXOffset );
tools::Rectangle aFirstLine(aSlider);
- aFirstLine.Bottom() = aFirstLine.Top();
+ aFirstLine.SetBottom( aFirstLine.Top() );
tools::Rectangle aSecondLine(aSlider);
- aSecondLine.Top() = aSecondLine.Bottom();
+ aSecondLine.SetTop( aSecondLine.Bottom() );
tools::Rectangle aLeft(aSlider);
- aLeft.Right() = aLeft.Left();
+ aLeft.SetRight( aLeft.Left() );
tools::Rectangle aRight(aSlider);
- aRight.Left() = aRight.Right();
+ aRight.SetLeft( aRight.Right() );
// draw VirtualDevice's background color
Color aStartColor = rRenderContext.GetSettings().GetStyleSettings().GetFaceColor();
@@ -448,32 +448,32 @@ void ScZoomSliderWnd::DoPaint(vcl::RenderContext& rRenderContext)
{
pVDev->SetLineColor(Color(COL_GRAY));
tools::Rectangle aSnapping(aRect);
- aSnapping.Bottom() = aSlider.Top();
- aSnapping.Top() = aSnapping.Bottom() - nSnappingHeight;
- aSnapping.Left() += *aSnappingPointIter;
- aSnapping.Right() = aSnapping.Left();
+ aSnapping.SetBottom( aSlider.Top() );
+ aSnapping.SetTop( aSnapping.Bottom() - nSnappingHeight );
+ aSnapping.SetLeft( aSnapping.Left() + *aSnappingPointIter );
+ aSnapping.SetRight( aSnapping.Left() );
pVDev->DrawRect(aSnapping);
- aSnapping.Top() += nSnappingHeight + nSliderHeight;
- aSnapping.Bottom() += nSnappingHeight + nSliderHeight;
+ aSnapping.SetTop( aSnapping.Top() + nSnappingHeight + nSliderHeight );
+ aSnapping.SetBottom( aSnapping.Bottom() + nSnappingHeight + nSliderHeight );
pVDev->DrawRect(aSnapping);
}
// draw slider button
Point aImagePoint = aRect.TopLeft();
- aImagePoint.X() += Zoom2Offset(mpImpl->mnCurrentZoom);
- aImagePoint.X() -= nButtonWidth / 2;
- aImagePoint.Y() += (aSliderWindowSize.Height() - nButtonHeight) / 2;
+ aImagePoint.setX( aImagePoint.X() + Zoom2Offset(mpImpl->mnCurrentZoom) );
+ aImagePoint.setX( aImagePoint.X() - nButtonWidth / 2 );
+ aImagePoint.setY( aImagePoint.Y() + (aSliderWindowSize.Height() - nButtonHeight) / 2 );
pVDev->DrawImage(aImagePoint, mpImpl->maSliderButton);
// draw decrease button
aImagePoint = aRect.TopLeft();
- aImagePoint.X() += (nSliderXOffset - nIncDecWidth) / 2;
- aImagePoint.Y() += (aSliderWindowSize.Height() - nIncDecHeight) / 2;
+ aImagePoint.setX( aImagePoint.X() + (nSliderXOffset - nIncDecWidth) / 2 );
+ aImagePoint.setY( aImagePoint.Y() + (aSliderWindowSize.Height() - nIncDecHeight) / 2 );
pVDev->DrawImage(aImagePoint, mpImpl->maDecreaseButton);
// draw increase button
- aImagePoint.X() = aRect.TopLeft().X() + aSliderWindowSize.Width() - nIncDecWidth - (nSliderXOffset - nIncDecWidth) / 2;
+ aImagePoint.setX( aRect.TopLeft().X() + aSliderWindowSize.Width() - nIncDecWidth - (nSliderXOffset - nIncDecWidth) / 2 );
pVDev->DrawImage(aImagePoint, mpImpl->maIncreaseButton);
rRenderContext.DrawOutDev(Point(0, 0), aSliderWindowSize, Point(0, 0), aSliderWindowSize, *pVDev);
diff --git a/sc/source/ui/condformat/condformatdlg.cxx b/sc/source/ui/condformat/condformatdlg.cxx
index caf22a5bcdd9..7c4332814ca4 100644
--- a/sc/source/ui/condformat/condformatdlg.cxx
+++ b/sc/source/ui/condformat/condformatdlg.cxx
@@ -232,12 +232,12 @@ void ScCondFormatList::RecalcAll()
item->SetPosPixel(aPoint);
Size aSize = item->GetSizePixel();
if(mbHasScrollBar)
- aSize.Width() = aCtrlSize.Width() - nSrcBarSize;
+ aSize.setWidth( aCtrlSize.Width() - nSrcBarSize );
else
- aSize.Width() = aCtrlSize.Width();
+ aSize.setWidth( aCtrlSize.Width() );
item->SetSizePixel(aSize);
- aPoint.Y() += item->GetSizePixel().Height();
+ aPoint.setY( aPoint.Y() + item->GetSizePixel().Height() );
}
}
@@ -245,7 +245,7 @@ void ScCondFormatList::DoScroll(long nDelta)
{
Point aNewPoint = mpScrollBar->GetPosPixel();
tools::Rectangle aRect(Point(), GetOutputSize());
- aRect.Right() -= mpScrollBar->GetSizePixel().Width();
+ aRect.SetRight( aRect.Right() - mpScrollBar->GetSizePixel().Width() );
Scroll( 0, -nDelta, aRect );
mpScrollBar->SetPosPixel(aNewPoint);
}
diff --git a/sc/source/ui/condformat/condformatdlgentry.cxx b/sc/source/ui/condformat/condformatdlgentry.cxx
index 48e77718a9c0..00b3937373bc 100644
--- a/sc/source/ui/condformat/condformatdlgentry.cxx
+++ b/sc/source/ui/condformat/condformatdlgentry.cxx
@@ -115,7 +115,7 @@ void ScCondFrmtEntry::SetHeight()
{
Size aSize = GetSizePixel();
const long nPad = LogicToPixel(Size(0, 2), MapMode(MapUnit::MapAppFont)).getHeight();
- aSize.Height() = nMaxHeight + nPad;
+ aSize.setHeight( nMaxHeight + nPad );
SetSizePixel(aSize);
}
}
diff --git a/sc/source/ui/dbgui/csvgrid.cxx b/sc/source/ui/dbgui/csvgrid.cxx
index 978aa8710fcf..4e1f4c33f9d6 100644
--- a/sc/source/ui/dbgui/csvgrid.cxx
+++ b/sc/source/ui/dbgui/csvgrid.cxx
@@ -1195,7 +1195,7 @@ void ScCsvGrid::ImplDrawRowHeaders()
mpBackgrDev->DrawRect( aRect );
mpBackgrDev->SetFillColor( maHeaderBackColor );
- aRect.Bottom() = GetY( GetLastVisLine() + 1 );
+ aRect.SetBottom( GetY( GetLastVisLine() + 1 ) );
mpBackgrDev->DrawRect( aRect );
// line numbers
@@ -1219,7 +1219,7 @@ void ScCsvGrid::ImplDrawRowHeaders()
}
else
mpBackgrDev->DrawLine( aRect.TopRight(), aRect.BottomRight() );
- aRect.Top() = GetHdrHeight();
+ aRect.SetTop( GetHdrHeight() );
mpBackgrDev->DrawGrid( aRect, Size( 1, GetLineHeight() ), DrawGridFlags::HorzLines );
}
@@ -1351,8 +1351,8 @@ void ScCsvGrid::ImplInvertCursor( sal_Int32 nPos )
sal_Int32 nX = GetX( nPos ) - 1;
tools::Rectangle aRect( Point( nX, 0 ), Size( 3, GetHdrHeight() ) );
ImplInvertRect( *mpGridDev.get(), aRect );
- aRect.Top() = GetHdrHeight() + 1;
- aRect.Bottom() = GetY( GetLastVisLine() + 1 );
+ aRect.SetTop( GetHdrHeight() + 1 );
+ aRect.SetBottom( GetY( GetLastVisLine() + 1 ) );
ImplInvertRect( *mpGridDev.get(), aRect );
}
}
diff --git a/sc/source/ui/dbgui/csvruler.cxx b/sc/source/ui/dbgui/csvruler.cxx
index 4bad68cdae50..6087719ab139 100644
--- a/sc/source/ui/dbgui/csvruler.cxx
+++ b/sc/source/ui/dbgui/csvruler.cxx
@@ -545,8 +545,8 @@ void ScCsvRuler::ImplDrawArea( sal_Int32 nPosX, sal_Int32 nWidth )
maBackgrDev->DrawRect( aRect );
aRect = maActiveRect;
- aRect.Left() = std::max( GetFirstX(), nPosX );
- aRect.Right() = std::min( std::min( GetX( GetPosCount() ), GetLastX() ), nPosX + nWidth - sal_Int32( 1 ) );
+ aRect.SetLeft( std::max( GetFirstX(), nPosX ) );
+ aRect.SetRight( std::min( std::min( GetX( GetPosCount() ), GetLastX() ), nPosX + nWidth - sal_Int32( 1 ) ) );
if( aRect.Left() <= aRect.Right() )
{
maBackgrDev->SetFillColor( maActiveColor );
diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx
index bde0d7b6f4e9..fc4f8829ada7 100644
--- a/sc/source/ui/docshell/docsh4.cxx
+++ b/sc/source/ui/docshell/docsh4.cxx
@@ -2056,8 +2056,8 @@ tools::Rectangle ScDocShell::GetVisArea( sal_uInt16 nAspect ) const
tools::Rectangle aArea( 0,0, SC_PREVIEW_SIZE_X, SC_PREVIEW_SIZE_Y);
if (aSize.Width() > aSize.Height())
{
- aArea.Right() = SC_PREVIEW_SIZE_Y;
- aArea.Bottom() = SC_PREVIEW_SIZE_X;
+ aArea.SetRight( SC_PREVIEW_SIZE_Y );
+ aArea.SetBottom( SC_PREVIEW_SIZE_X );
}
bool bNegativePage = aDocument.IsNegativePage( aDocument.GetVisibleTab() );
diff --git a/sc/source/ui/docshell/docsh6.cxx b/sc/source/ui/docshell/docsh6.cxx
index f14c8bd8f8b7..508ea9f5b882 100644
--- a/sc/source/ui/docshell/docsh6.cxx
+++ b/sc/source/ui/docshell/docsh6.cxx
@@ -64,10 +64,10 @@ void ScDocShell::SetVisArea( const tools::Rectangle & rVisArea )
static void lcl_SetTopRight( tools::Rectangle& rRect, const Point& rPos )
{
Size aSize = rRect.GetSize();
- rRect.Right() = rPos.X();
- rRect.Left() = rPos.X() - aSize.Width() + 1;
- rRect.Top() = rPos.Y();
- rRect.Bottom() = rPos.Y() + aSize.Height() - 1;
+ rRect.SetRight( rPos.X() );
+ rRect.SetLeft( rPos.X() - aSize.Width() + 1 );
+ rRect.SetTop( rPos.Y() );
+ rRect.SetBottom( rPos.Y() + aSize.Height() - 1 );
}
void ScDocShell::SetVisAreaOrSize( const tools::Rectangle& rVisArea )
@@ -88,12 +88,12 @@ void ScDocShell::SetVisAreaOrSize( const tools::Rectangle& rVisArea )
Point aNewPos( 0, std::max( aArea.Top(), long(0) ) );
if ( bNegativePage )
{
- aNewPos.X() = std::min( aArea.Right(), long(0) );
+ aNewPos.setX( std::min( aArea.Right(), long(0) ) );
lcl_SetTopRight( aArea, aNewPos );
}
else
{
- aNewPos.X() = std::max( aArea.Left(), long(0) );
+ aNewPos.setX( std::max( aArea.Left(), long(0) ) );
aArea.SetPos( aNewPos );
}
}
diff --git a/sc/source/ui/drawfunc/fuconstr.cxx b/sc/source/ui/drawfunc/fuconstr.cxx
index 0c21daabc48e..7060d0143f76 100644
--- a/sc/source/ui/drawfunc/fuconstr.cxx
+++ b/sc/source/ui/drawfunc/fuconstr.cxx
@@ -66,8 +66,8 @@ Point FuConstruct::CurrentGridSyncOffsetAndPos( Point& rInOutPos )
ScRange aRange = pDoc->GetRange( pView->GetTab(), aObjRect );
ScAddress aOldStt = aRange.aStart;
Point aOldPos( pDoc->GetColOffset( aOldStt.Col(), aOldStt.Tab() ), pDoc->GetRowOffset( aOldStt.Row(), aOldStt.Tab() ) );
- aOldPos.X() = sc::TwipsToHMM( aOldPos.X() );
- aOldPos.Y() = sc::TwipsToHMM( aOldPos.Y() );
+ aOldPos.setX( sc::TwipsToHMM( aOldPos.X() ) );
+ aOldPos.setY( sc::TwipsToHMM( aOldPos.Y() ) );
ScSplitPos eWhich = rViewData.GetActivePart();
ScGridWindow* pGridWin = rViewData.GetActiveWin();
// and equiv screen pos
diff --git a/sc/source/ui/drawfunc/fuins1.cxx b/sc/source/ui/drawfunc/fuins1.cxx
index 4097a6ec6848..9098405242f1 100644
--- a/sc/source/ui/drawfunc/fuins1.cxx
+++ b/sc/source/ui/drawfunc/fuins1.cxx
@@ -61,8 +61,8 @@ void ScLimitSizeOnDrawPage( Size& rSize, Point& rPos, const Size& rPage )
if ( bNegative )
{
// make everything positive temporarily
- aPageSize.Width() = -aPageSize.Width();
- rPos.X() = -rPos.X() - rSize.Width();
+ aPageSize.setWidth( -aPageSize.Width() );
+ rPos.setX( -rPos.X() - rSize.Width() );
}
if ( rSize.Width() > aPageSize.Width() || rSize.Height() > aPageSize.Height() )
@@ -72,28 +72,28 @@ void ScLimitSizeOnDrawPage( Size& rSize, Point& rPos, const Size& rPage )
if ( fX < fY )
{
- rSize.Width() = aPageSize.Width();
- rSize.Height() = static_cast<long>( rSize.Height() * fX );
+ rSize.setWidth( aPageSize.Width() );
+ rSize.setHeight( static_cast<long>( rSize.Height() * fX ) );
}
else
{
- rSize.Height() = aPageSize.Height();
- rSize.Width() = static_cast<long>( rSize.Width() * fY );
+ rSize.setHeight( aPageSize.Height() );
+ rSize.setWidth( static_cast<long>( rSize.Width() * fY ) );
}
if (!rSize.Width())
- rSize.Width() = 1;
+ rSize.setWidth( 1 );
if (!rSize.Height())
- rSize.Height() = 1;
+ rSize.setHeight( 1 );
}
if ( rPos.X() + rSize.Width() > aPageSize.Width() )
- rPos.X() = aPageSize.Width() - rSize.Width();
+ rPos.setX( aPageSize.Width() - rSize.Width() );
if ( rPos.Y() + rSize.Height() > aPageSize.Height() )
- rPos.Y() = aPageSize.Height() - rSize.Height();
+ rPos.setY( aPageSize.Height() - rSize.Height() );
if ( bNegative )
- rPos.X() = -rPos.X() - rSize.Width(); // back to real position
+ rPos.setX( -rPos.X() - rSize.Width() ); // back to real position
}
static void lcl_InsertGraphic( const Graphic& rGraphic,
@@ -155,7 +155,7 @@ static void lcl_InsertGraphic( const Graphic& rGraphic,
ScViewData& rData = pViewSh->GetViewData();
if ( rData.GetDocument()->IsNegativePage( rData.GetTabNo() ) )
- aInsertPos.X() -= aLogicSize.Width(); // move position to left edge
+ aInsertPos.setX( aInsertPos.X() - aLogicSize.Width() ); // move position to left edge
ScLimitSizeOnDrawPage( aLogicSize, aInsertPos, pPage->GetSize() );
@@ -208,7 +208,7 @@ static void lcl_InsertMedia( const OUString& rMediaURL, bool bApi,
ScLimitSizeOnDrawPage( aSize, aInsertPos, pPage->GetSize() );
if( rData.GetDocument()->IsNegativePage( rData.GetTabNo() ) )
- aInsertPos.X() -= aSize.Width();
+ aInsertPos.setX( aInsertPos.X() - aSize.Width() );
OUString realURL;
if (bLink)
diff --git a/sc/source/ui/drawfunc/fuins2.cxx b/sc/source/ui/drawfunc/fuins2.cxx
index 08466129371d..33ae6cc58639 100644
--- a/sc/source/ui/drawfunc/fuins2.cxx
+++ b/sc/source/ui/drawfunc/fuins2.cxx
@@ -325,8 +325,8 @@ FuInsertOLE::FuInsertOLE(ScTabViewShell* pViewSh, vcl::Window* pWin, ScDrawView*
if (aSize.Height() == 0 || aSize.Width() == 0)
{
// rectangle with balanced edge ratio
- aSize.Width() = 5000;
- aSize.Height() = 5000;
+ aSize.setWidth( 5000 );
+ aSize.setHeight( 5000 );
Size aTmp = OutputDevice::LogicToLogic(aSize, MapMode(MapUnit::Map100thMM), MapMode(aMapUnit));
aSz.Width = aTmp.Width();
aSz.Height = aTmp.Height();
@@ -349,7 +349,7 @@ FuInsertOLE::FuInsertOLE(ScTabViewShell* pViewSh, vcl::Window* pWin, ScDrawView*
Point aPnt = pViewSh->GetInsertPos();
if ( rData.GetDocument()->IsNegativePage( rData.GetTabNo() ) )
- aPnt.X() -= aSize.Width(); // move position to left edge
+ aPnt.setX( aPnt.X() - aSize.Width() ); // move position to left edge
tools::Rectangle aRect (aPnt, aSize);
SdrOle2Obj* pObj = new SdrOle2Obj( aObjRef, aName, aRect);
SdrPageView* pPV = pView->GetSdrPageView();
@@ -506,8 +506,8 @@ FuInsertChart::FuInsertChart(ScTabViewShell* pViewSh, vcl::Window* pWin, ScDrawV
bool bSizeCh = false;
if (aSize.Height() <= 0 || aSize.Width() <= 0)
{
- aSize.Width() = 5000;
- aSize.Height() = 5000;
+ aSize.setWidth( 5000 );
+ aSize.setHeight( 5000 );
bSizeCh = true;
}
if (bSizeCh)
diff --git a/sc/source/ui/miscdlgs/acredlin.cxx b/sc/source/ui/miscdlgs/acredlin.cxx
index 45c75bcd007f..c8b162a493e1 100644
--- a/sc/source/ui/miscdlgs/acredlin.cxx
+++ b/sc/source/ui/miscdlgs/acredlin.cxx
@@ -884,7 +884,7 @@ IMPL_LINK( ScAcceptChgDlg, RefInfoHandle, const OUString*, pResult, void)
{
vcl::Window* pWin=pWnd->GetWindow();
Size aWinSize=pWin->GetSizePixel();
- aWinSize.Width()=GetSizePixel().Width();
+ aWinSize.setWidth(GetSizePixel().Width() );
SetPosSizePixel(pWin->GetPosPixel(),aWinSize);
Invalidate();
}
diff --git a/sc/source/ui/miscdlgs/anyrefdg.cxx b/sc/source/ui/miscdlgs/anyrefdg.cxx
index bab95aa80539..d6d6948cf631 100644
--- a/sc/source/ui/miscdlgs/anyrefdg.cxx
+++ b/sc/source/ui/miscdlgs/anyrefdg.cxx
@@ -542,16 +542,16 @@ void ScFormulaReferenceHelper::RefInputStart( formula::RefEdit* pEdit, formula::
long nOffset = 0;
if (pRefBtn)
{
- aNewEditSize.Width() -= pRefBtn->GetSizePixel().Width();
- aNewEditSize.Width() -= aOldButtonPos.X() - (aOldEditPos.X()+aOldEditSize.Width());
+ aNewEditSize.setWidth( aNewEditSize.Width() - pRefBtn->GetSizePixel().Width() );
+ aNewEditSize.setWidth( aNewEditSize.Width() - aOldButtonPos.X() - (aOldEditPos.X()+aOldEditSize.Width()) );
long nHeight = pRefBtn->GetSizePixel().Height();
if ( nHeight > aOldEditSize.Height() )
{
- aNewDlgSize.Height() = nHeight;
+ aNewDlgSize.setHeight( nHeight );
nOffset = (nHeight-aOldEditSize.Height()) / 2;
}
- aNewEditSize.Width() -= nOffset;
+ aNewEditSize.setWidth( aNewEditSize.Width() - nOffset );
}
pRefEdit->SetPosSizePixel(Point(nOffset, nOffset), aNewEditSize);
diff --git a/sc/source/ui/miscdlgs/autofmt.cxx b/sc/source/ui/miscdlgs/autofmt.cxx
index 6295da610567..305683182e84 100644
--- a/sc/source/ui/miscdlgs/autofmt.cxx
+++ b/sc/source/ui/miscdlgs/autofmt.cxx
@@ -308,7 +308,7 @@ void ScAutoFmtPreview::DrawString(vcl::RenderContext& rRenderContext, size_t nCo
// vertical (always center):
- aPos.Y() += (mnRowHeight - static_cast<sal_uInt16>(aStrSize.Height())) / 2;
+ aPos.setY( aPos.Y() + (mnRowHeight - static_cast<sal_uInt16>(aStrSize.Height())) / 2 );
// horizontal
@@ -323,12 +323,12 @@ void ScAutoFmtPreview::DrawString(vcl::RenderContext& rRenderContext, size_t nCo
aPos.X() += FRAME_OFFSET;
break;
case SvxCellHorJustify::Right:
- aPos.X() += nRightX;
+ aPos.setX( aPos.X() + nRightX );
break;
case SvxCellHorJustify::Block:
case SvxCellHorJustify::Repeat:
case SvxCellHorJustify::Center:
- aPos.X() += nHorPos;
+ aPos.setX( aPos.X() + nHorPos );
break;
// coverity[dead_error_line] - following conditions exist to avoid compiler warning
case SvxCellHorJustify::Standard:
@@ -350,7 +350,7 @@ void ScAutoFmtPreview::DrawString(vcl::RenderContext& rRenderContext, size_t nCo
else
{
// Numbers/Dates right adjusted
- aPos.X() += nRightX;
+ aPos.setX( aPos.X() + nRightX );
}
}
aScriptedText.DrawText(aPos);
@@ -448,8 +448,8 @@ void ScAutoFmtPreview::CalcCellArray( bool bFitWidthP )
maArray.SetYOffset( 2 );
maArray.SetAllRowHeights( mnRowHeight );
- aPrvSize.Width() = maArray.GetWidth() + 4;
- aPrvSize.Height() = maArray.GetHeight() + 4;
+ aPrvSize.setWidth( maArray.GetWidth() + 4 );
+ aPrvSize.setHeight( maArray.GetHeight() + 4 );
}
inline void lclSetStyleFromBorder( svx::frame::Style& rStyle, const ::editeng::SvxBorderLine* pBorder )
@@ -525,7 +525,7 @@ void ScAutoFmtPreview::DoPaint(vcl::RenderContext& rRenderContext)
Point aPos((aWndSize.Width() - aPrvSize.Width()) / 2, (aWndSize.Height() - aPrvSize.Height()) / 2);
if (AllSettings::GetLayoutRTL())
- aPos.X() = -aPos.X();
+ aPos.setX( -aPos.X() );
rRenderContext.DrawOutDev(aPos, aWndSize, Point(), aWndSize, *aVD.get());
aVD->SetDrawMode(nOldDrawMode);
}
diff --git a/sc/source/ui/miscdlgs/solveroptions.cxx b/sc/source/ui/miscdlgs/solveroptions.cxx
index d9e8ef4bdce6..ebc906b12f88 100644
--- a/sc/source/ui/miscdlgs/solveroptions.cxx
+++ b/sc/source/ui/miscdlgs/solveroptions.cxx
@@ -90,7 +90,7 @@ void ScSolverOptionsString::Paint(const Point& rPos, SvTreeListBox& /*rDev*/, vc
rRenderContext.DrawText(rPos, aNormalStr);
Point aNewPos(rPos);
- aNewPos.X() += rRenderContext.GetTextWidth(aNormalStr);
+ aNewPos.setX( aNewPos.X() + rRenderContext.GetTextWidth(aNormalStr) );
vcl::Font aOldFont(rRenderContext.GetFont());
vcl::Font aFont(aOldFont);
aFont.SetWeight(WEIGHT_BOLD);
diff --git a/sc/source/ui/namedlg/namemgrtable.cxx b/sc/source/ui/namedlg/namemgrtable.cxx
index d9b07db3396c..5979ea12c4c0 100644
--- a/sc/source/ui/namedlg/namemgrtable.cxx
+++ b/sc/source/ui/namedlg/namemgrtable.cxx
@@ -297,7 +297,7 @@ IMPL_LINK_NOARG(ScRangeManagerTable, HeaderEndDragHdl, HeaderBar*, void)
SetTab(0, 0);
SetTab(1, PixelToLogic( aSz, MapMode(MapUnit::MapAppFont) ).Width() );
- aSz.Width() += nItemRangeSize;
+ aSz.setWidth( aSz.Width() + nItemRangeSize );
SetTab(2, PixelToLogic( aSz, MapMode(MapUnit::MapAppFont) ).Width() );
}
diff --git a/sc/source/ui/navipi/content.cxx b/sc/source/ui/navipi/content.cxx
index 6f662e16cc4e..151918c2303e 100644
--- a/sc/source/ui/navipi/content.cxx
+++ b/sc/source/ui/navipi/content.cxx
@@ -735,7 +735,7 @@ void ScContentTree::RequestHelp( const HelpEvent& rHEvt )
if( pItem )
{
aPos = GetEntryPosition( pEntry );
- aPos.X() = GetTabPos( pEntry, pTab );
+ aPos.setX( GetTabPos( pEntry, pTab ) );
aPos = OutputToScreenPixel(aPos);
Size aSize( pItem->GetSize( this, pEntry ) );
diff --git a/sc/source/ui/navipi/navipi.cxx b/sc/source/ui/navipi/navipi.cxx
index 2593dd68e6af..90851ec16417 100644
--- a/sc/source/ui/navipi/navipi.cxx
+++ b/sc/source/ui/navipi/navipi.cxx
@@ -930,7 +930,7 @@ void ScNavigatorDlg::SetListMode(NavListMode eMode)
{
Size aOptimalSize(GetOptimalSize());
Size aNewSize(pNav->GetOutputSizePixel());
- aNewSize.Height() = eMode == NAV_LMODE_NONE ? aOptimalSize.Height() : aExpandedSize.Height();
+ aNewSize.setHeight( eMode == NAV_LMODE_NONE ? aOptimalSize.Height() : aExpandedSize.Height() );
pNav->SetMinOutputSizePixel(aOptimalSize);
pNav->SetOutputSizePixel(aNewSize);
}
diff --git a/sc/source/ui/navipi/scenwnd.cxx b/sc/source/ui/navipi/scenwnd.cxx
index 9038acb74664..ded3e3f46353 100644
--- a/sc/source/ui/navipi/scenwnd.cxx
+++ b/sc/source/ui/navipi/scenwnd.cxx
@@ -275,10 +275,10 @@ void ScScenarioWindow::Resize()
Size aSize(GetSizePixel());
long nHeight = aSize.Height() / 2;
- aSize.Height() = nHeight;
+ aSize.setHeight( nHeight );
aLbScenario->SetSizePixel(aSize);
- aSize.Height() -= 4;
+ aSize.setHeight( aSize.Height() - 4 );
aEdComment->SetPosSizePixel(Point(0, nHeight + 4), aSize);
}
diff --git a/sc/source/ui/pagedlg/tphfedit.cxx b/sc/source/ui/pagedlg/tphfedit.cxx
index 786dad811bbe..a9d6c3eaf18b 100644
--- a/sc/source/ui/pagedlg/tphfedit.cxx
+++ b/sc/source/ui/pagedlg/tphfedit.cxx
@@ -79,7 +79,7 @@ ScEditWindow::ScEditWindow( vcl::Window* pParent, WinBits nBits, ScEditWindowLoc
SetBackground( aBgColor );
Size aSize( GetOutputSize() );
- aSize.Height() *= 4;
+ aSize.setHeight( aSize.Height() * 4 );
pEdEngine = new ScHeaderEditEngine( EditEngine::CreatePool() );
pEdEngine->SetPaperSize( aSize );
@@ -106,7 +106,7 @@ void ScEditWindow::Resize()
{
Size aOutputSize(GetOutputSize());
Size aSize(aOutputSize);
- aSize.Height() *= 4;
+ aSize.setHeight( aSize.Height() * 4 );
pEdEngine->SetPaperSize(aSize);
pEdView->SetOutputArea(tools::Rectangle(Point(0,0), aOutputSize));
Control::Resize();
@@ -399,7 +399,7 @@ void ScExtIButton::StartPopup()
SetPressed( true );
EndSelection();
Point aPoint(0,0);
- aPoint.Y()=GetOutputSizePixel().Height();
+ aPoint.setY(GetOutputSizePixel().Height() );
nSelected = pPopupMenu->Execute( this, aPoint );
diff --git a/sc/source/ui/sidebar/CellLineStyleValueSet.cxx b/sc/source/ui/sidebar/CellLineStyleValueSet.cxx
index d6a0f765cb89..ed7df82d1556 100644
--- a/sc/source/ui/sidebar/CellLineStyleValueSet.cxx
+++ b/sc/source/ui/sidebar/CellLineStyleValueSet.cxx
@@ -87,15 +87,15 @@ void CellLineStyleValueSet::UserDraw( const UserDrawEvent& rUDEvt )
vcl::Font aFont(OutputDevice::GetDefaultFont(DefaultFontType::UI_SANS, MsLangId::getSystemLanguage(), GetDefaultFontFlags::OnlyOne));
Size aSize = aFont.GetFontSize();
- aSize.Height() = nRectHeight*3/5;
+ aSize.setHeight( nRectHeight*3/5 );
aFont.SetFontSize( aSize );
if( nSelItem == nItemId )
{
Color aBackColor(50,107,197);
tools::Rectangle aBackRect = aRect;
- aBackRect.Top() += 3;
- aBackRect.Bottom() -= 2;
+ aBackRect.SetTop( aBackRect.Top() + 3 );
+ aBackRect.SetBottom( aBackRect.Bottom() - 2 );
pDev->SetFillColor(aBackColor);
pDev->DrawRect(aBackRect);
}
diff --git a/sc/source/ui/unoobj/TablePivotCharts.cxx b/sc/source/ui/unoobj/TablePivotCharts.cxx
index 5cc607327bcf..a8c19f342abc 100644
--- a/sc/source/ui/unoobj/TablePivotCharts.cxx
+++ b/sc/source/ui/unoobj/TablePivotCharts.cxx
@@ -106,17 +106,17 @@ void SAL_CALL TablePivotCharts::addNewByName(OUString const & rName,
Point aRectPos(aRect.X, aRect.Y);
bool bLayoutRTL = rDoc.IsLayoutRTL(m_nTab);
if ((aRectPos.X() < 0 && !bLayoutRTL) || (aRectPos.X() > 0 && bLayoutRTL))
- aRectPos.X() = 0;
+ aRectPos.setX( 0 );
if (aRectPos.Y() < 0)
- aRectPos.Y() = 0;
+ aRectPos.setY( 0 );
Size aRectSize(aRect.Width, aRect.Height);
if (aRectSize.Width() <= 0)
- aRectSize.Width() = 5000; // default size
+ aRectSize.setWidth( 5000 ); // default size
if (aRectSize.Height() <= 0)
- aRectSize.Height() = 5000;
+ aRectSize.setHeight( 5000 );
::tools::Rectangle aInsRect(aRectPos, aRectSize);
diff --git a/sc/source/ui/unoobj/chartuno.cxx b/sc/source/ui/unoobj/chartuno.cxx
index 105d4e0fbc04..1c7cb5672562 100644
--- a/sc/source/ui/unoobj/chartuno.cxx
+++ b/sc/source/ui/unoobj/chartuno.cxx
@@ -181,17 +181,17 @@ void SAL_CALL ScChartsObj::addNewByName( const OUString& rName,
Point aRectPos( aRect.X, aRect.Y );
bool bLayoutRTL = rDoc.IsLayoutRTL( nTab );
if ( ( aRectPos.X() < 0 && !bLayoutRTL ) || ( aRectPos.X() > 0 && bLayoutRTL ) )
- aRectPos.X() = 0;
+ aRectPos.setX( 0 );
if (aRectPos.Y() < 0)
- aRectPos.Y() = 0;
+ aRectPos.setY( 0 );
Size aRectSize( aRect.Width, aRect.Height );
if (aRectSize.Width() <= 0)
- aRectSize.Width() = 5000; // Default-Groesse
+ aRectSize.setWidth( 5000 ); // Default-Groesse
if (aRectSize.Height() <= 0)
- aRectSize.Height() = 5000;
+ aRectSize.setHeight( 5000 );
tools::Rectangle aInsRect( aRectPos, aRectSize );
sal_Int64 nAspect(embed::Aspects::MSOLE_CONTENT);
diff --git a/sc/source/ui/unoobj/viewuno.cxx b/sc/source/ui/unoobj/viewuno.cxx
index e2b27fc09b9e..992b0b16d9f0 100644
--- a/sc/source/ui/unoobj/viewuno.cxx
+++ b/sc/source/ui/unoobj/viewuno.cxx
@@ -398,7 +398,7 @@ awt::Rectangle ScViewPaneBase::GetVisArea() const
if ( pDoc->IsLayoutRTL( aCell.Tab() ) )
{
aVisPos = aCellRect.TopRight();
- aVisPos.X() -= aVisSize.Width();
+ aVisPos.setX( aVisPos.X() - aVisSize.Width() );
}
tools::Rectangle aVisRect( aVisPos, aVisSize );
aVisArea = AWTRectangle(aVisRect);
diff --git a/sc/source/ui/view/drawview.cxx b/sc/source/ui/view/drawview.cxx
index 8c34b9dd3128..f797f4ed1c13 100644
--- a/sc/source/ui/view/drawview.cxx
+++ b/sc/source/ui/view/drawview.cxx
@@ -270,8 +270,8 @@ void ScDrawView::UpdateWorkArea()
if ( aPageSize.Width() < 0 )
{
// RTL: from max.negative (left) to zero (right)
- aNewArea.Right() = 0;
- aNewArea.Left() = aPageSize.Width() + 1;
+ aNewArea.SetRight( 0 );
+ aNewArea.SetLeft( aPageSize.Width() + 1 );
}
SetWorkArea( aNewArea );
}
@@ -950,8 +950,8 @@ void ScDrawView::SyncForGrid( SdrObject* pObj )
MapMode aDrawMode = pGridWin->GetDrawMapMode();
// find pos anchor position
Point aOldPos( pDoc->GetColOffset( aOldStt.Col(), aOldStt.Tab() ), pDoc->GetRowOffset( aOldStt.Row(), aOldStt.Tab() ) );
- aOldPos.X() = sc::TwipsToHMM( aOldPos.X() );
- aOldPos.Y() = sc::TwipsToHMM( aOldPos.Y() );
+ aOldPos.setX( sc::TwipsToHMM( aOldPos.X() ) );
+ aOldPos.setY( sc::TwipsToHMM( aOldPos.Y() ) );
// find position of same point on the screen ( e.g. grid )
Point aCurPos = pViewData->GetScrPos( aOldStt.Col(), aOldStt.Row(), eWhich, true );
Point aCurPosHmm = pGridWin->PixelToLogic(aCurPos, aDrawMode );
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index c401fe3f5021..12ea86d53ca6 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -909,10 +909,10 @@ void ScGridWindow::DoScenarioMenu( const ScRange& rScenRange )
nSizeY = ScViewData::ToPixel(pDoc->GetRowHeight(nRow, nTab), pViewData->GetPPTY());
Point aPos = pViewData->GetScrPos( nCol, nRow, eWhich );
if ( bLayoutRTL )
- aPos.X() -= nSizeX;
+ aPos.setX( aPos.X() - nSizeX );
tools::Rectangle aCellRect( OutputToScreenPixel(aPos), Size(nSizeX,nSizeY) );
- aCellRect.Top() -= nSizeY;
- aCellRect.Bottom() -= nSizeY - 1;
+ aCellRect.SetTop( aCellRect.Top() - nSizeY );
+ aCellRect.SetBottom( aCellRect.Bottom() - nSizeY - 1 );
// Place the ListBox directly below the black line of the cell grid
// (It looks odd if the line gets hidden...)
@@ -987,7 +987,7 @@ void ScGridWindow::DoScenarioMenu( const ScRange& rScenRange )
long nNewX = aCellRect.Left() - nDiff;
if ( nNewX < 0 )
nNewX = 0;
- aCellRect.Left() = nNewX;
+ aCellRect.SetLeft( nNewX );
}
}
@@ -1033,12 +1033,12 @@ void ScGridWindow::LaunchDataSelectMenu( SCCOL nCol, SCROW nRow )
pViewData->GetMergeSizePixel( nCol, nRow, nSizeX, nSizeY );
Point aPos = pViewData->GetScrPos( nCol, nRow, eWhich );
if ( bLayoutRTL )
- aPos.X() -= nSizeX;
+ aPos.setX( aPos.X() - nSizeX );
tools::Rectangle aCellRect( OutputToScreenPixel(aPos), Size(nSizeX,nSizeY) );
- aPos.X() -= 1;
- aPos.Y() += nSizeY - 1;
+ aPos.setX( aPos.X() - 1 );
+ aPos.setY( aPos.Y() + nSizeY - 1 );
mpFilterFloat.reset(VclPtr<ScFilterFloatingWindow>::Create(this, WinBits(WB_BORDER)));
mpFilterFloat->SetPopupModeEndHdl(LINK( this, ScGridWindow, PopupModeEndHdl));
@@ -1080,9 +1080,9 @@ void ScGridWindow::LaunchDataSelectMenu( SCCOL nCol, SCROW nRow )
Size aSize( nSizeX, nHeight );
if ( aSize.Height() > aParentSize.Height() )
- aSize.Height() = aParentSize.Height();
+ aSize.setHeight( aParentSize.Height() );
if ( aPos.Y() + aSize.Height() > aParentSize.Height() )
- aPos.Y() = aParentSize.Height() - aSize.Height();
+ aPos.setY( aParentSize.Height() - aSize.Height() );
mpFilterBox->SetSizePixel(aSize);
mpFilterBox->Show(); // Show has to be before SetUpdateMode !!!
@@ -1299,8 +1299,8 @@ bool ScGridWindow::TestMouse( const MouseEvent& rMEvt, bool bAction )
Point aMousePos = rMEvt.GetPosPixel();
if ( bLayoutRTL )
{
- aStartPos.X() += 2;
- aEndPos.X() += 2;
+ aStartPos.setX( aStartPos.X() + 2 );
+ aEndPos.setX( aEndPos.X() + 2 );
}
bool bTop = ( aMousePos.X() >= aStartPos.X()-3 && aMousePos.X() <= aStartPos.X()+1 &&
aMousePos.Y() >= aStartPos.Y()-3 && aMousePos.Y() <= aStartPos.Y()+1 );
@@ -2634,7 +2634,7 @@ static void lcl_SetTextCursorPos( ScViewData* pViewData, ScSplitPos eWhich, vcl:
SCCOL nCol = pViewData->GetCurX();
SCROW nRow = pViewData->GetCurY();
tools::Rectangle aEditArea = pViewData->GetEditArea( eWhich, nCol, nRow, pWin, nullptr, true );
- aEditArea.Right() = aEditArea.Left();
+ aEditArea.SetRight( aEditArea.Left() );
aEditArea = pWin->PixelToLogic( aEditArea );
pWin->SetCursorRect( &aEditArea );
}
@@ -2852,8 +2852,8 @@ void ScGridWindow::Command( const CommandEvent& rCEvt )
Point aLogicPos = pCur->GetPos();
// use the position right of the cursor (spell popup is opened if
// the cursor is before the word, but not if behind it)
- aLogicPos.X() += pCur->GetWidth();
- aLogicPos.Y() += pCur->GetHeight() / 2; // center vertically
+ aLogicPos.setX( aLogicPos.X() + pCur->GetWidth() );
+ aLogicPos.setY( aLogicPos.Y() + pCur->GetHeight() / 2 ); // center vertically
aMenuPos = LogicToPixel( aLogicPos );
}
}
@@ -2893,8 +2893,8 @@ void ScGridWindow::Command( const CommandEvent& rCEvt )
long nSizeYPix;
pViewData->GetMergeSizePixel( nCurX, nCurY, nSizeXPix, nSizeYPix );
// fdo#55432 take the correct position for RTL sheet
- aMenuPos.X() += bLayoutIsRTL ? -nSizeXPix : nSizeXPix;
- aMenuPos.Y() += nSizeYPix;
+ aMenuPos.setX( aMenuPos.X() + (bLayoutIsRTL ? -nSizeXPix : nSizeXPix) );
+ aMenuPos.setY( aMenuPos.Y() + nSizeYPix );
ScTabViewShell* pViewSh = pViewData->GetViewShell();
if (pViewSh)
@@ -2952,8 +2952,8 @@ void ScGridWindow::SelectForContextMenu( const Point& rPosPixel, SCCOL nCellX, S
{
aTextPos -= aOutputArea.TopRight();
long nTemp = -aTextPos.X();
- aTextPos.X() = aTextPos.Y();
- aTextPos.Y() = nTemp;
+ aTextPos.setX( aTextPos.Y() );
+ aTextPos.setY( nTemp );
}
else
aTextPos -= aOutputArea.TopLeft();
@@ -3001,8 +3001,8 @@ void ScGridWindow::SelectForContextMenu( const Point& rPosPixel, SCCOL nCellX, S
{
aTextPos -= aOutputArea.TopRight();
long nTemp = -aTextPos.X();
- aTextPos.X() = aTextPos.Y();
- aTextPos.Y() = nTemp;
+ aTextPos.setX( aTextPos.Y() );
+ aTextPos.setY( nTemp );
}
else
aTextPos -= aOutputArea.TopLeft();
@@ -4417,9 +4417,9 @@ void ScGridWindow::UpdateEditViewPos()
{
tools::Rectangle aRect = pView->GetOutputArea();
long nHeight = aRect.Bottom() - aRect.Top();
- aRect.Top() = PixelToLogic(GetOutputSizePixel(), pViewData->GetLogicMode()).
- Height() * 2;
- aRect.Bottom() = aRect.Top() + nHeight;
+ aRect.SetTop( PixelToLogic(GetOutputSizePixel(), pViewData->GetLogicMode()).
+ Height() * 2 );
+ aRect.SetBottom( aRect.Top() + nHeight );
pView->SetOutputArea( aRect );
pView->HideCursor();
}
@@ -4494,7 +4494,7 @@ void ScGridWindow::UpdateFormulas()
{
long nEndPixel = pViewData->GetScrPos( nX2+1, nPosY, eWhich ).X();
nMirrorWidth = aScrPos.X() - nEndPixel;
- aScrPos.X() = nEndPixel + 1;
+ aScrPos.setX( nEndPixel + 1 );
}
long nScrX = aScrPos.X();
@@ -4632,8 +4632,8 @@ bool ScGridWindow::HitRangeFinder( const Point& rMouse, RfCorner& rCorner,
long nSizeYPix;
pViewData->GetMergeSizePixel( nPosX, nPosY, nSizeXPix, nSizeYPix );
- aCellEnd.X() += nSizeXPix * nLayoutSign;
- aCellEnd.Y() += nSizeYPix;
+ aCellEnd.setX( aCellEnd.X() + nSizeXPix * nLayoutSign );
+ aCellEnd.setY( aCellEnd.Y() + nSizeYPix );
bool bCornerHorizontalRight;
bool bCornerHorizontalLeft;
@@ -5109,7 +5109,7 @@ bool ScGridWindow::GetEditUrl( const Point& rPos,
}
if (bBreak)
- aPaperSize.Width() = nThisColLogic;
+ aPaperSize.setWidth( nThisColLogic );
pEngine->SetPaperSize( aPaperSize );
std::unique_ptr<EditTextObject> pTextObj;
@@ -5143,9 +5143,9 @@ bool ScGridWindow::GetEditUrl( const Point& rPos,
nStartX += (nThisColLogic - nTextWidth) / 2;
}
- aLogicEdit.Left() = nStartX;
+ aLogicEdit.SetLeft( nStartX );
if (!bBreak)
- aLogicEdit.Right() = nStartX + nTextWidth;
+ aLogicEdit.SetRight( nStartX + nTextWidth );
// There is one glitch when dealing with a hyperlink cell and
// the cell content is NUMERIC. This defaults to right aligned and
@@ -5153,10 +5153,10 @@ bool ScGridWindow::GetEditUrl( const Point& rPos,
if (aCell.meType == CELLTYPE_FORMULA && aCell.mpFormula->IsValue() &&
eHorJust == SvxCellHorJustify::Standard)
{
- aLogicEdit.Right() = aLogicEdit.Left() + nThisColLogic - 1;
- aLogicEdit.Left() = aLogicEdit.Right() - nTextWidth;
+ aLogicEdit.SetRight( aLogicEdit.Left() + nThisColLogic - 1 );
+ aLogicEdit.SetLeft( aLogicEdit.Right() - nTextWidth );
}
- aLogicEdit.Bottom() = aLogicEdit.Top() + nTextHeight;
+ aLogicEdit.SetBottom( aLogicEdit.Top() + nTextHeight );
Point aLogicClick = PixelToLogic(rPos,aEditMode);
if ( aLogicEdit.IsInside(aLogicClick) )
@@ -5272,12 +5272,12 @@ bool ScGridWindow::HasScenarioButton( const Point& rPosPixel, ScRange& rScenRang
{
aButtonPos = pViewData->GetScrPos( aRange.aEnd.Col()+1, aRange.aStart.Row(),
eWhich, true );
- aButtonPos.Y() -= nBHeight;
+ aButtonPos.setY( aButtonPos.Y() - nBHeight );
}
if ( bLayoutRTL )
- aButtonPos.X() -= nHSpace - 1;
+ aButtonPos.setX( aButtonPos.X() - nHSpace - 1 );
else
- aButtonPos.X() -= nBWidth - nHSpace; // same for top or bottom
+ aButtonPos.setX( aButtonPos.X() - nBWidth - nHSpace ); // same for top or bottom
tools::Rectangle aButRect( aButtonPos, Size(nBWidth,nBHeight) );
if ( aButRect.IsInside( rPosPixel ) )
@@ -5740,8 +5740,8 @@ static void updateLibreOfficeKitSelection(const ScViewData* pViewData, const std
// We explicitly create a copy, since we need to expand
// the rectangle before coordinate conversion
tools::Rectangle aRectangle(rRectangle);
- aRectangle.Right() += 1;
- aRectangle.Bottom() += 1;
+ aRectangle.SetRight( aRectangle.Right() + 1 );
+ aRectangle.SetBottom( aRectangle.Bottom() + 1 );
aBoundingBox.Union(aRectangle);
@@ -5858,7 +5858,7 @@ void ScGridWindow::UpdateCursorOverlay()
pViewData->GetMergeSizePixel( nX, nY, nSizeXPix, nSizeYPix );
if (bLayoutRTL)
- aScrPos.X() -= nSizeXPix - 2; // move instead of mirroring
+ aScrPos.setX( aScrPos.X() - nSizeXPix - 2 ); // move instead of mirroring
// show the cursor as 4 (thin) rectangles
tools::Rectangle aRect(aScrPos, Size(nSizeXPix - 1, nSizeYPix - 1));
@@ -5868,24 +5868,24 @@ void ScGridWindow::UpdateCursorOverlay()
long aCursorWidth = 1 * fScaleFactor;
tools::Rectangle aLeft = aRect;
- aLeft.Top() -= aCursorWidth;
- aLeft.Bottom() += aCursorWidth;
- aLeft.Right() = aLeft.Left();
- aLeft.Left() -= aCursorWidth;
+ aLeft.SetTop( aLeft.Top() - aCursorWidth );
+ aLeft.SetBottom( aLeft.Bottom() + aCursorWidth );
+ aLeft.SetRight( aLeft.Left() );
+ aLeft.SetLeft( aLeft.Left() - aCursorWidth );
tools::Rectangle aRight = aRect;
- aRight.Top() -= aCursorWidth;
- aRight.Bottom() += aCursorWidth;
- aRight.Left() = aRight.Right();
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list