summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-02-14 10:30:46 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-02-14 14:17:53 +0100
commit95fab7cbf2f0576d0f728bed8898b7ff769d90e6 (patch)
tree980278716de65d8ce15bef5d76ef085da5a950a1 /sc
parent603d1773a2dfea6b347f44ddacef478577098caf (diff)
loplugin:changetoolsgen in sc
Change-Id: Ic24332cac65e665b55b9e1bbaf09ee56066875fd Reviewed-on: https://gerrit.libreoffice.org/49703 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/data/column2.cxx8
-rw-r--r--sc/source/core/data/documen3.cxx42
-rw-r--r--sc/source/core/data/documen9.cxx4
-rw-r--r--sc/source/core/data/drwlayer.cxx108
-rw-r--r--sc/source/core/data/postit.cxx32
-rw-r--r--sc/source/core/tool/detfunc.cxx28
-rw-r--r--sc/source/core/tool/editutil.cxx6
-rw-r--r--sc/source/filter/excel/xiescher.cxx16
-rw-r--r--sc/source/filter/excel/xiview.cxx4
-rw-r--r--sc/source/filter/excel/xlescher.cxx4
-rw-r--r--sc/source/filter/html/htmlexp.cxx4
-rw-r--r--sc/source/filter/html/htmlexp2.cxx8
-rw-r--r--sc/source/filter/html/htmlimp.cxx4
-rw-r--r--sc/source/filter/html/htmlpars.cxx12
-rw-r--r--sc/source/filter/rtf/eeimpars.cxx16
-rw-r--r--sc/source/filter/xml/XMLTableShapeImportHelper.cxx4
-rw-r--r--sc/source/ui/Accessibility/AccessibleCsvControl.cxx6
-rw-r--r--sc/source/ui/app/client.cxx20
-rw-r--r--sc/source/ui/app/inputhdl.cxx2
-rw-r--r--sc/source/ui/app/inputwin.cxx28
-rw-r--r--sc/source/ui/app/transobj.cxx4
-rw-r--r--sc/source/ui/cctrl/cbuttonw.cxx36
-rw-r--r--sc/source/ui/cctrl/checklistmenu.cxx40
-rw-r--r--sc/source/ui/cctrl/dpcontrol.cxx2
-rw-r--r--sc/source/ui/cctrl/tbzoomsliderctrl.cxx40
-rw-r--r--sc/source/ui/condformat/condformatdlg.cxx8
-rw-r--r--sc/source/ui/condformat/condformatdlgentry.cxx2
-rw-r--r--sc/source/ui/dbgui/csvgrid.cxx8
-rw-r--r--sc/source/ui/dbgui/csvruler.cxx4
-rw-r--r--sc/source/ui/docshell/docsh4.cxx4
-rw-r--r--sc/source/ui/docshell/docsh6.cxx12
-rw-r--r--sc/source/ui/drawfunc/fuconstr.cxx4
-rw-r--r--sc/source/ui/drawfunc/fuins1.cxx26
-rw-r--r--sc/source/ui/drawfunc/fuins2.cxx10
-rw-r--r--sc/source/ui/miscdlgs/acredlin.cxx2
-rw-r--r--sc/source/ui/miscdlgs/anyrefdg.cxx8
-rw-r--r--sc/source/ui/miscdlgs/autofmt.cxx14
-rw-r--r--sc/source/ui/miscdlgs/solveroptions.cxx2
-rw-r--r--sc/source/ui/namedlg/namemgrtable.cxx2
-rw-r--r--sc/source/ui/navipi/content.cxx2
-rw-r--r--sc/source/ui/navipi/navipi.cxx2
-rw-r--r--sc/source/ui/navipi/scenwnd.cxx4
-rw-r--r--sc/source/ui/pagedlg/tphfedit.cxx6
-rw-r--r--sc/source/ui/sidebar/CellLineStyleValueSet.cxx6
-rw-r--r--sc/source/ui/unoobj/TablePivotCharts.cxx8
-rw-r--r--sc/source/ui/unoobj/chartuno.cxx8
-rw-r--r--sc/source/ui/unoobj/viewuno.cxx2
-rw-r--r--sc/source/ui/view/drawview.cxx8
-rw-r--r--sc/source/ui/view/gridwin.cxx124
-rw-r--r--sc/source/ui/view/gridwin2.cxx2
-rw-r--r--sc/source/ui/view/gridwin3.cxx2
-rw-r--r--sc/source/ui/view/gridwin4.cxx82
-rw-r--r--sc/source/ui/view/gridwin5.cxx4
-rw-r--r--sc/source/ui/view/hdrcont.cxx38
-rw-r--r--sc/source/ui/view/hintwin.cxx2
-rw-r--r--sc/source/ui/view/invmerge.cxx14
-rw-r--r--sc/source/ui/view/notemark.cxx8
-rw-r--r--sc/source/ui/view/output.cxx70
-rw-r--r--sc/source/ui/view/output2.cxx222
-rw-r--r--sc/source/ui/view/output3.cxx28
-rw-r--r--sc/source/ui/view/preview.cxx36
-rw-r--r--sc/source/ui/view/prevloc.cxx24
-rw-r--r--sc/source/ui/view/prevwsh.cxx72
-rw-r--r--sc/source/ui/view/printfun.cxx124
-rw-r--r--sc/source/ui/view/reffact.cxx8
-rw-r--r--sc/source/ui/view/select.cxx4
-rw-r--r--sc/source/ui/view/tabview.cxx94
-rw-r--r--sc/source/ui/view/tabview2.cxx18
-rw-r--r--sc/source/ui/view/tabview3.cxx50
-rw-r--r--sc/source/ui/view/tabview4.cxx6
-rw-r--r--sc/source/ui/view/tabview5.cxx8
-rw-r--r--sc/source/ui/view/tabvwsh2.cxx4
-rw-r--r--sc/source/ui/view/tabvwsh4.cxx14
-rw-r--r--sc/source/ui/view/tabvwshb.cxx4
-rw-r--r--sc/source/ui/view/tabvwshg.cxx2
-rw-r--r--sc/source/ui/view/viewdata.cxx86
-rw-r--r--sc/source/ui/view/viewfun5.cxx12
-rw-r--r--sc/source/ui/view/viewfun7.cxx24
78 files changed, 910 insertions, 906 deletions
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();
- aRight.Right() += aCursorWidth;
+ aRight.SetTop( aRight.Top() - aCursorWidth );
+ aRight.SetBottom( aRight.Bottom() + aCursorWidth );
+ aRight.SetLeft( aRight.Right() );
+ aRight.SetRight( aRight.Right() + aCursorWidth );
tools::Rectangle aTop = aRect;
- aTop.Bottom() = aTop.Top();
- aTop.Top() -= aCursorWidth;
+ aTop.SetBottom( aTop.Top() );
+ aTop.SetTop( aTop.Top() - aCursorWidth );
tools::Rectangle aBottom = aRect;
- aBottom.Top() = aBottom.Bottom();
- aBottom.Bottom() += aCursorWidth;
+ aBottom.SetTop( aBottom.Bottom() );
+ aBottom.SetBottom( aBottom.Bottom() + aCursorWidth );
aPixelRects.push_back(aLeft);
aPixelRects.push_back(aRight);
@@ -6062,12 +6062,12 @@ void ScGridWindow::UpdateAutoFillOverlay()
pViewData->GetMergeSizePixel( nX, nY, nSizeXPix, nSizeYPix );
if (bLayoutRTL)
- aFillPos.X() -= nSizeXPix - 2 + (aFillHandleSize.Width() / 2);
+ aFillPos.setX( aFillPos.X() - nSizeXPix - 2 + (aFillHandleSize.Width() / 2) );
else
- aFillPos.X() += nSizeXPix - (aFillHandleSize.Width() / 2);
+ aFillPos.setX( aFillPos.X() + nSizeXPix - (aFillHandleSize.Width() / 2) );
- aFillPos.Y() += nSizeYPix;
- aFillPos.Y() -= (aFillHandleSize.Height() / 2);
+ aFillPos.setY( aFillPos.Y() + nSizeYPix );
+ aFillPos.setY( aFillPos.Y() - (aFillHandleSize.Height() / 2) );
tools::Rectangle aFillRect(aFillPos, aFillHandleSize);
@@ -6160,7 +6160,7 @@ void ScGridWindow::UpdateDragRectOverlay()
nSizeXPix += ScViewData::ToPixel( pDoc->GetColWidth( static_cast<SCCOL>(i), nTab ), nPPTX );
else
{
- aScrPos.X() -= nLayoutSign;
+ aScrPos.setX( aScrPos.X() - nLayoutSign );
nSizeXPix += 2;
}
@@ -6169,18 +6169,18 @@ void ScGridWindow::UpdateDragRectOverlay()
nSizeYPix += ScViewData::ToPixel( pDoc->GetRowHeight( i, nTab ), nPPTY );
else
{
- aScrPos.Y() -= 1;
+ aScrPos.setY( aScrPos.Y() - 1 );
nSizeYPix += 2;
}
- aScrPos.X() -= 2 * nLayoutSign;
- aScrPos.Y() -= 2;
+ aScrPos.setX( aScrPos.X() - 2 * nLayoutSign );
+ aScrPos.setY( aScrPos.Y() - 2 );
tools::Rectangle aRect( aScrPos.X(), aScrPos.Y(),
aScrPos.X() + ( nSizeXPix + 2 ) * nLayoutSign, aScrPos.Y() + nSizeYPix + 2 );
if ( bLayoutRTL )
{
- aRect.Left() = aRect.Right(); // end position is left
- aRect.Right() = aScrPos.X();
+ aRect.SetLeft( aRect.Right() ); // end position is left
+ aRect.SetRight( aScrPos.X() );
}
if ( meDragInsertMode == INS_CELLSDOWN )
@@ -6312,8 +6312,8 @@ void ScGridWindow::UpdateShrinkOverlay()
aRange.aStart.Row(), eWhich );
Point aEnd = pViewData->GetScrPos( aRange.aEnd.Col()+1,
aRange.aEnd.Row()+1, eWhich );
- aEnd.X() -= 1;
- aEnd.Y() -= 1;
+ aEnd.setX( aEnd.X() - 1 );
+ aEnd.setY( aEnd.Y() - 1 );
aPixRect = tools::Rectangle( aStart,aEnd );
}
diff --git a/sc/source/ui/view/gridwin2.cxx b/sc/source/ui/view/gridwin2.cxx
index 52ebd2804052..9cde192c663d 100644
--- a/sc/source/ui/view/gridwin2.cxx
+++ b/sc/source/ui/view/gridwin2.cxx
@@ -115,7 +115,7 @@ bool ScGridWindow::DoAutoFilterButton( SCCOL nCol, SCROW nRow, const MouseEvent&
aDiffPix -= aScrPos;
bool bLayoutRTL = pDoc->IsLayoutRTL( nTab );
if ( bLayoutRTL )
- aDiffPix.X() = -aDiffPix.X();
+ aDiffPix.setX( -aDiffPix.X() );
long nSizeX, nSizeY;
pViewData->GetMergeSizePixel( nCol, nRow, nSizeX, nSizeY );
diff --git a/sc/source/ui/view/gridwin3.cxx b/sc/source/ui/view/gridwin3.cxx
index 897051a02098..337bb7a72beb 100644
--- a/sc/source/ui/view/gridwin3.cxx
+++ b/sc/source/ui/view/gridwin3.cxx
@@ -272,7 +272,7 @@ MapMode ScGridWindow::GetDrawMapMode( bool bForce )
if ( bNegativePage )
{
// RTL uses negative positions for drawing objects
- aStartPos.X() = -aStartPos.X() + GetOutputSizePixel().Width() - 1;
+ aStartPos.setX( -aStartPos.X() + GetOutputSizePixel().Width() - 1 );
}
aDrawMode.SetOrigin( PixelToLogic( aStartPos, aDrawMode ) );
diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx
index cab9d42deb39..33383e6be68e 100644
--- a/sc/source/ui/view/gridwin4.cxx
+++ b/sc/source/ui/view/gridwin4.cxx
@@ -70,8 +70,8 @@
static void lcl_LimitRect( tools::Rectangle& rRect, const tools::Rectangle& rVisible )
{
- if ( rRect.Top() < rVisible.Top()-1 ) rRect.Top() = rVisible.Top()-1;
- if ( rRect.Bottom() > rVisible.Bottom()+1 ) rRect.Bottom() = rVisible.Bottom()+1;
+ if ( rRect.Top() < rVisible.Top()-1 ) rRect.SetTop( rVisible.Top()-1 );
+ if ( rRect.Bottom() > rVisible.Bottom()+1 ) rRect.SetBottom( rVisible.Bottom()+1 );
// The header row must be drawn also when the inner rectangle is not visible,
// that is why there is no return value anymore.
@@ -89,8 +89,8 @@ static void lcl_DrawOneFrame( vcl::RenderContext* pDev, const tools::Rectangle&
tools::Rectangle aInner = rInnerPixel;
if ( bLayoutRTL )
{
- aInner.Left() = rInnerPixel.Right();
- aInner.Right() = rInnerPixel.Left();
+ aInner.SetLeft( rInnerPixel.Right() );
+ aInner.SetRight( rInnerPixel.Left() );
}
tools::Rectangle aVisible( Point(0,0), pDev->GetOutputSizePixel() );
@@ -99,10 +99,10 @@ static void lcl_DrawOneFrame( vcl::RenderContext* pDev, const tools::Rectangle&
tools::Rectangle aOuter = aInner;
long nHor = static_cast<long>( SC_SCENARIO_HSPACE * nPPTX );
long nVer = static_cast<long>( SC_SCENARIO_VSPACE * nPPTY );
- aOuter.Left() -= nHor;
- aOuter.Right() += nHor;
- aOuter.Top() -= nVer;
- aOuter.Bottom() += nVer;
+ aOuter.SetLeft( aOuter.Left() - nHor );
+ aOuter.SetRight( aOuter.Right() + nHor );
+ aOuter.SetTop( aOuter.Top() - nVer );
+ aOuter.SetBottom( aOuter.Bottom() + nVer );
// use ScPatternAttr::GetFont only for font size
vcl::Font aAttrFont;
@@ -119,9 +119,9 @@ static void lcl_DrawOneFrame( vcl::RenderContext* pDev, const tools::Rectangle&
Size aTextSize( pDev->GetTextWidth( rTitle ), pDev->GetTextHeight() );
if ( bTextBelow )
- aOuter.Bottom() += aTextSize.Height();
+ aOuter.SetBottom( aOuter.Bottom() + aTextSize.Height() );
else
- aOuter.Top() -= aTextSize.Height();
+ aOuter.SetTop( aOuter.Top() - aTextSize.Height() );
pDev->SetLineColor();
pDev->SetFillColor( rColor );
@@ -220,10 +220,10 @@ static void lcl_DrawScenarioFrames( OutputDevice* pDev, ScViewData* pViewData, S
Point aEndPos = pViewData->GetScrPos(
aRange.aEnd.Col()+1, aRange.aEnd.Row()+1, eWhich, true );
// on the grid:
- aStartPos.X() -= nLayoutSign;
- aStartPos.Y() -= 1;
- aEndPos.X() -= nLayoutSign;
- aEndPos.Y() -= 1;
+ aStartPos.setX( aStartPos.X() - nLayoutSign );
+ aStartPos.setY( aStartPos.Y() - 1 );
+ aEndPos.setX( aEndPos.X() - nLayoutSign );
+ aEndPos.setY( aEndPos.Y() - 1 );
bool bTextBelow = ( aRange.aStart.Row() == 0 );
@@ -345,8 +345,8 @@ void ScGridWindow::Paint( vcl::RenderContext& /*rRenderContext*/, const tools::R
{
// mirror and swap
long nWidth = GetSizePixel().Width();
- aMirroredPixel.Left() = nWidth - 1 - aPixRect.Right();
- aMirroredPixel.Right() = nWidth - 1 - aPixRect.Left();
+ aMirroredPixel.SetLeft( nWidth - 1 - aPixRect.Right() );
+ aMirroredPixel.SetRight( nWidth - 1 - aPixRect.Left() );
}
long nScrX = ScViewData::ToPixel( pDoc->GetColWidth( nX1, nTab ), nPPTX );
@@ -433,7 +433,7 @@ void ScGridWindow::Draw( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, ScUpdateMod
{
long nEndPixel = pViewData->GetScrPos( nX2+1, maVisibleRange.mnRow1, eWhich ).X();
nMirrorWidth = aScrPos.X() - nEndPixel;
- aScrPos.X() = nEndPixel + 1;
+ aScrPos.setX( nEndPixel + 1 );
}
long nScrX = aScrPos.X();
@@ -605,18 +605,18 @@ void ScGridWindow::DrawContent(OutputDevice &rDevice, const ScTableInfo& rTableI
{
if(bLayoutRTL)
{
- aDrawingRectPixel.Left() = 0;
+ aDrawingRectPixel.SetLeft( 0 );
}
else
{
- aDrawingRectPixel.Right() = GetOutputSizePixel().getWidth();
+ aDrawingRectPixel.SetRight( GetOutputSizePixel().getWidth() );
}
}
// correct for border (bottom)
if(MAXROW == nY2)
{
- aDrawingRectPixel.Bottom() = GetOutputSizePixel().getHeight();
+ aDrawingRectPixel.SetBottom( GetOutputSizePixel().getHeight() );
}
// get logic positions
@@ -670,23 +670,23 @@ void ScGridWindow::DrawContent(OutputDevice &rDevice, const ScTableInfo& rTableI
{
tools::Rectangle aDrawRect( aPixRect );
if ( bLayoutRTL )
- aDrawRect.Right() = nScrX - 1;
+ aDrawRect.SetRight( nScrX - 1 );
else
- aDrawRect.Left() = nScrX + aOutputData.GetScrW();
+ aDrawRect.SetLeft( nScrX + aOutputData.GetScrW() );
if (aDrawRect.Right() >= aDrawRect.Left())
pContentDev->DrawRect( aDrawRect );
}
if ( nY2==MAXROW )
{
tools::Rectangle aDrawRect( aPixRect );
- aDrawRect.Top() = nScrY + aOutputData.GetScrH();
+ aDrawRect.SetTop( nScrY + aOutputData.GetScrH() );
if ( nX2==MAXCOL )
{
// no double painting of the corner
if ( bLayoutRTL )
- aDrawRect.Left() = nScrX;
+ aDrawRect.SetLeft( nScrX );
else
- aDrawRect.Right() = nScrX + aOutputData.GetScrW() - 1;
+ aDrawRect.SetRight( nScrX + aOutputData.GetScrW() - 1 );
}
if (aDrawRect.Bottom() >= aDrawRect.Top())
pContentDev->DrawRect( aDrawRect );
@@ -928,8 +928,8 @@ void ScGridWindow::DrawContent(OutputDevice &rDevice, const ScTableInfo& rTableI
// don't overwrite grid
long nLayoutSign = bLayoutRTL ? -1 : 1;
- aEnd.X() -= 2 * nLayoutSign;
- aEnd.Y() -= 2;
+ aEnd.setX( aEnd.X() - 2 * nLayoutSign );
+ aEnd.setY( aEnd.Y() - 2 );
tools::Rectangle aBackground(aStart, aEnd);
@@ -982,8 +982,8 @@ void ScGridWindow::DrawContent(OutputDevice &rDevice, const ScTableInfo& rTableI
// don't overwrite grid
long nLayoutSign = bLayoutRTL ? -1 : 1;
- aEnd.X() -= 2 * nLayoutSign;
- aEnd.Y() -= 2;
+ aEnd.setX( aEnd.X() - 2 * nLayoutSign );
+ aEnd.setY( aEnd.Y() - 2 );
// toggle the cursor off if its on to ensure the cursor invert
// background logic remains valid after the background is cleared on
@@ -1385,16 +1385,16 @@ void ScGridWindow::DrawPagePreview( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2,
aRange.aStart.Col(), aRange.aStart.Row(), eWhich, true );
Point aEnd = pViewData->GetScrPos(
aRange.aEnd.Col() + 1, aRange.aEnd.Row() + 1, eWhich, true );
- aStart.X() -= 2;
- aStart.Y() -= 2;
+ aStart.setX( aStart.X() - 2 );
+ aStart.setY( aStart.Y() - 2 );
// Prevent overflows:
- if ( aStart.X() < -10 ) aStart.X() = -10;
- if ( aStart.Y() < -10 ) aStart.Y() = -10;
+ if ( aStart.X() < -10 ) aStart.setX( -10 );
+ if ( aStart.Y() < -10 ) aStart.setY( -10 );
if ( aEnd.X() > aWinSize.Width() + 10 )
- aEnd.X() = aWinSize.Width() + 10;
+ aEnd.setX( aWinSize.Width() + 10 );
if ( aEnd.Y() > aWinSize.Height() + 10 )
- aEnd.Y() = aWinSize.Height() + 10;
+ aEnd.setY( aWinSize.Height() + 10 );
rRenderContext.DrawRect( tools::Rectangle( aStart, Point(aEnd.X(),aStart.Y()+2) ) );
rRenderContext.DrawRect( tools::Rectangle( aStart, Point(aStart.X()+2,aEnd.Y()) ) );
@@ -1709,19 +1709,19 @@ tools::Rectangle ScGridWindow::GetListValButtonRect( const ScAddress& rButtonPos
nAvailable = ScViewData::ToPixel( pDoc->GetColWidth( nNextCol, nTab ), pViewData->GetPPTX() );
if ( nAvailable < aBtnSize.Width() )
- aBtnSize.Width() = nAvailable;
+ aBtnSize.setWidth( nAvailable );
if ( nCellSizeY < aBtnSize.Height() )
- aBtnSize.Height() = nCellSizeY;
+ aBtnSize.setHeight( nCellSizeY );
Point aPos = pViewData->GetScrPos( nCol, nRow, eWhich, true );
- aPos.X() += nCellSizeX * nLayoutSign; // start of next cell
+ aPos.setX( aPos.X() + nCellSizeX * nLayoutSign ); // start of next cell
if (!bNextCell)
- aPos.X() -= aBtnSize.Width() * nLayoutSign; // right edge of cell if next cell not available
- aPos.Y() += nCellSizeY - aBtnSize.Height();
+ aPos.setX( aPos.X() - aBtnSize.Width() * nLayoutSign ); // right edge of cell if next cell not available
+ aPos.setY( aPos.Y() + nCellSizeY - aBtnSize.Height() );
// X remains at the left edge
if ( bLayoutRTL )
- aPos.X() -= aBtnSize.Width()-1; // align right edge of button with cell border
+ aPos.setX( aPos.X() - aBtnSize.Width()-1 ); // align right edge of button with cell border
return tools::Rectangle( aPos, aBtnSize );
}
diff --git a/sc/source/ui/view/gridwin5.cxx b/sc/source/ui/view/gridwin5.cxx
index 3f4fc29c776f..9ad2595aba08 100644
--- a/sc/source/ui/view/gridwin5.cxx
+++ b/sc/source/ui/view/gridwin5.cxx
@@ -200,9 +200,9 @@ bool ScGridWindow::ShowNoteMarker( SCCOL nPosX, SCROW nPosY, bool bKeyboard )
Size aLeftSize = pLeft->PixelToLogic( pLeft->GetOutputSizePixel(), aMapMode );
Point aOrigin = aMapMode.GetOrigin();
if( (this == pRight) || (this == pDiagonal) )
- aOrigin.X() += aLeftSize.Width();
+ aOrigin.setX( aOrigin.X() + aLeftSize.Width() );
if( (this == pBottom) || (this == pDiagonal) )
- aOrigin.Y() += aLeftSize.Height();
+ aOrigin.setY( aOrigin.Y() + aLeftSize.Height() );
aMapMode.SetOrigin( aOrigin );
mpNoteMarker.reset(new ScNoteMarker(pLeft, pRight, pBottom, pDiagonal,
diff --git a/sc/source/ui/view/hdrcont.cxx b/sc/source/ui/view/hdrcont.cxx
index 75c149543cd0..bdb7594ee712 100644
--- a/sc/source/ui/view/hdrcont.cxx
+++ b/sc/source/ui/view/hdrcont.cxx
@@ -82,8 +82,8 @@ ScHeaderControl::ScHeaderControl( vcl::Window* pParent, SelectionEngine* pSelect
Size aSize = LogicToPixel( Size(
GetTextWidth("8888"),
GetTextHeight() ) );
- aSize.Width() += 4; // place for highlight border
- aSize.Height() += 3;
+ aSize.setWidth( aSize.Width() + 4 ); // place for highlight border
+ aSize.setHeight( aSize.Height() + 3 );
SetSizePixel( aSize );
nWidth = nSmallWidth = aSize.Width();
@@ -118,13 +118,13 @@ void ScHeaderControl::DoPaint( SCCOLROW nStart, SCCOLROW nEnd )
tools::Rectangle aRect( Point(0,0), GetOutputSizePixel() );
if ( bVertical )
{
- aRect.Top() = GetScrPos( nStart )-nLayoutSign; // extra pixel for line at top of selection
- aRect.Bottom() = GetScrPos( nEnd+1 )-nLayoutSign;
+ aRect.SetTop( GetScrPos( nStart )-nLayoutSign ); // extra pixel for line at top of selection
+ aRect.SetBottom( GetScrPos( nEnd+1 )-nLayoutSign );
}
else
{
- aRect.Left() = GetScrPos( nStart )-nLayoutSign; // extra pixel for line left of selection
- aRect.Right() = GetScrPos( nEnd+1 )-nLayoutSign;
+ aRect.SetLeft( GetScrPos( nStart )-nLayoutSign ); // extra pixel for line left of selection
+ aRect.SetRight( GetScrPos( nEnd+1 )-nLayoutSign );
}
Invalidate(aRect);
}
@@ -533,21 +533,21 @@ void ScHeaderControl::Paint( vcl::RenderContext& /*rRenderContext*/, const tools
bBoldSet = bMark;
}
aString = GetEntryText( nEntryNo );
- aTextSize.Width() = GetTextWidth( aString );
- aTextSize.Height() = GetTextHeight();
+ aTextSize.setWidth( GetTextWidth( aString ) );
+ aTextSize.setHeight( GetTextHeight() );
Point aTxtPos(aScrPos);
if (bVertical)
{
- aTxtPos.X() += (nBarSize-aTextSize.Width())/2;
- aTxtPos.Y() += (nSizePix*nLayoutSign-aTextSize.Height())/2;
+ aTxtPos.setX( aTxtPos.X() + (nBarSize-aTextSize.Width())/2 );
+ aTxtPos.setY( aTxtPos.Y() + (nSizePix*nLayoutSign-aTextSize.Height())/2 );
if ( bMirrored )
- aTxtPos.X() += 1; // dark border is left instead of right
+ aTxtPos.setX( aTxtPos.X() + 1 ); // dark border is left instead of right
}
else
{
- aTxtPos.X() += (nSizePix*nLayoutSign-aTextSize.Width()+1)/2;
- aTxtPos.Y() += (nBarSize-aTextSize.Height())/2;
+ aTxtPos.setX( aTxtPos.X() + (nSizePix*nLayoutSign-aTextSize.Width()+1)/2 );
+ aTxtPos.setY( aTxtPos.Y() + (nBarSize-aTextSize.Height())/2 );
}
DrawText( aTxtPos, aString );
}
@@ -954,20 +954,20 @@ void ScHeaderControl::ShowDragHelp()
if (!bVertical)
{
// above
- aRect.Left() = aMousePos.X();
- aRect.Top() = aPos.Y() - 4;
+ aRect.SetLeft( aMousePos.X() );
+ aRect.SetTop( aPos.Y() - 4 );
nAlign = QuickHelpFlags::Bottom|QuickHelpFlags::Center;
}
else
{
// top right
- aRect.Left() = aPos.X() + aSize.Width() + 8;
- aRect.Top() = aMousePos.Y() - 2;
+ aRect.SetLeft( aPos.X() + aSize.Width() + 8 );
+ aRect.SetTop( aMousePos.Y() - 2 );
nAlign = QuickHelpFlags::Left|QuickHelpFlags::Bottom;
}
- aRect.Right() = aRect.Left();
- aRect.Bottom() = aRect.Top();
+ aRect.SetRight( aRect.Left() );
+ aRect.SetBottom( aRect.Top() );
Help::ShowQuickHelp(this, aRect, aHelpStr, nAlign);
}
diff --git a/sc/source/ui/view/hintwin.cxx b/sc/source/ui/view/hintwin.cxx
index 4013a0cd3697..63fbcb98c1e3 100644
--- a/sc/source/ui/view/hintwin.cxx
+++ b/sc/source/ui/view/hintwin.cxx
@@ -128,7 +128,7 @@ drawinglayer::primitive2d::Primitive2DContainer ScOverlayHint::createOverlaySequ
const drawinglayer::primitive2d::Primitive2DReference aMessage(pMessage);
aSeq.push_back(aMessage);
- aLineStart.Y() += nLineHeight;
+ aLineStart.setY( aLineStart.Y() + nLineHeight );
}
rRange.expand(basegfx::B2DTuple(rRange.getMaxX() + aHintMargin.Width(),
diff --git a/sc/source/ui/view/invmerge.cxx b/sc/source/ui/view/invmerge.cxx
index 647b09f02dc5..446e4fb2d93e 100644
--- a/sc/source/ui/view/invmerge.cxx
+++ b/sc/source/ui/view/invmerge.cxx
@@ -65,8 +65,8 @@ void ScInvertMerger::Flush()
{
// extend first rectangle
nBottom = aOtherRect.Bottom();
- aCompRect.Bottom() = nBottom;
- (*pRects)[nComparePos].Bottom() = nBottom;
+ aCompRect.SetBottom( nBottom );
+ (*pRects)[nComparePos].SetBottom( nBottom );
// remove second rectangle
pRects->erase( pRects->begin() + nOtherPos );
@@ -109,7 +109,7 @@ void ScInvertMerger::FlushLine()
aLineRect.Top() == aTotalRect.Bottom() + 1 )
{
// extend total rect
- aTotalRect.Bottom() = aLineRect.Bottom();
+ aTotalRect.SetBottom( aLineRect.Bottom() );
}
else
{
@@ -126,8 +126,8 @@ void ScInvertMerger::AddRect( const tools::Rectangle& rRect )
tools::Rectangle aJustified = rRect;
if ( rRect.Left() > rRect.Right() ) // switch for RTL layout
{
- aJustified.Left() = rRect.Right();
- aJustified.Right() = rRect.Left();
+ aJustified.SetLeft( rRect.Right() );
+ aJustified.SetRight( rRect.Left() );
}
if ( aLineRect.IsEmpty() )
@@ -143,12 +143,12 @@ void ScInvertMerger::AddRect( const tools::Rectangle& rRect )
// try to extend line rect
if ( aJustified.Left() == aLineRect.Right() + 1 )
{
- aLineRect.Right() = aJustified.Right();
+ aLineRect.SetRight( aJustified.Right() );
bDone = true;
}
else if ( aJustified.Right() + 1 == aLineRect.Left() ) // for RTL layout
{
- aLineRect.Left() = aJustified.Left();
+ aLineRect.SetLeft( aJustified.Left() );
bDone = true;
}
}
diff --git a/sc/source/ui/view/notemark.cxx b/sc/source/ui/view/notemark.cxx
index 47c9db0dacf5..8b41d42b4f06 100644
--- a/sc/source/ui/view/notemark.cxx
+++ b/sc/source/ui/view/notemark.cxx
@@ -54,9 +54,9 @@ ScNoteMarker::ScNoteMarker( vcl::Window* pWin, vcl::Window* pRight, vcl::Window*
{
Size aSizePixel = pWindow->GetOutputSizePixel();
if( pRightWin )
- aSizePixel.Width() += pRightWin->GetOutputSizePixel().Width();
+ aSizePixel.setWidth( aSizePixel.Width() + pRightWin->GetOutputSizePixel().Width() );
if( pBottomWin )
- aSizePixel.Height() += pBottomWin->GetOutputSizePixel().Height();
+ aSizePixel.setHeight( aSizePixel.Height() + pBottomWin->GetOutputSizePixel().Height() );
tools::Rectangle aVisPixel( Point( 0, 0 ), aSizePixel );
aVisRect = pWindow->PixelToLogic( aVisPixel, aMapMode );
@@ -144,8 +144,8 @@ static MapMode lcl_MoveMapMode( const MapMode& rMap, const Size& rMove )
{
MapMode aNew = rMap;
Point aOrigin = aNew.GetOrigin();
- aOrigin.X() -= rMove.Width();
- aOrigin.Y() -= rMove.Height();
+ aOrigin.setX( aOrigin.X() - rMove.Width() );
+ aOrigin.setY( aOrigin.Y() - rMove.Height() );
aNew.SetOrigin(aOrigin);
return aNew;
}
diff --git a/sc/source/ui/view/output.cxx b/sc/source/ui/view/output.cxx
index 40beadf11610..5bb9df7a5eb2 100644
--- a/sc/source/ui/view/output.cxx
+++ b/sc/source/ui/view/output.cxx
@@ -831,10 +831,10 @@ void drawDataBars(vcl::RenderContext& rRenderContext, const ScDataBarInfo* pOldD
{
long nPosZero = 0;
tools::Rectangle aPaintRect = rRect;
- aPaintRect.Top() += 2 * nOneY;
- aPaintRect.Bottom() -= 2 * nOneY;
- aPaintRect.Left() += 2 * nOneX;
- aPaintRect.Right() -= 2 * nOneX;
+ aPaintRect.SetTop( aPaintRect.Top() + 2 * nOneY );
+ aPaintRect.SetBottom( aPaintRect.Bottom() - 2 * nOneY );
+ aPaintRect.SetLeft( aPaintRect.Left() + 2 * nOneX );
+ aPaintRect.SetRight( aPaintRect.Right() - 2 * nOneX );
if(pOldDataBarInfo->mnZero)
{
// need to calculate null point in cell
@@ -848,15 +848,15 @@ void drawDataBars(vcl::RenderContext& rRenderContext, const ScDataBarInfo* pOldD
if(pOldDataBarInfo->mnLength < 0)
{
- aPaintRect.Right() = nPosZero;
+ aPaintRect.SetRight( nPosZero );
long nLength = nPosZero - aPaintRect.Left();
- aPaintRect.Left() = nPosZero + static_cast<long>(nLength * pOldDataBarInfo->mnLength/100.0);
+ aPaintRect.SetLeft( nPosZero + static_cast<long>(nLength * pOldDataBarInfo->mnLength/100.0) );
}
else if(pOldDataBarInfo->mnLength > 0)
{
- aPaintRect.Left() = nPosZero;
+ aPaintRect.SetLeft( nPosZero );
long nLength = aPaintRect.Right() - nPosZero;
- aPaintRect.Right() = nPosZero + static_cast<long>(nLength * pOldDataBarInfo->mnLength/100.0);
+ aPaintRect.SetRight( nPosZero + static_cast<long>(nLength * pOldDataBarInfo->mnLength/100.0) );
}
else
return;
@@ -926,7 +926,7 @@ void drawCells(vcl::RenderContext& rRenderContext, const Color* pColor, const Sv
// we can here fall back to pointer comparison
if (pOldColor && (pBackground || pOldColor != pColor || pOldDataBarInfo || pDataBarInfo || pIconSetInfo || pOldIconSetInfo))
{
- rRect.Right() = nPosX-nSignedOneX;
+ rRect.SetRight( nPosX-nSignedOneX );
if( !pOldColor->GetTransparency() )
{
rRenderContext.SetFillColor( *pOldColor );
@@ -937,12 +937,12 @@ void drawCells(vcl::RenderContext& rRenderContext, const Color* pColor, const Sv
if( pOldIconSetInfo )
drawIconSets(rRenderContext, pOldIconSetInfo, rRect, nOneX, nOneY, rIconSetBitmapMap);
- rRect.Left() = nPosX - nSignedOneX;
+ rRect.SetLeft( nPosX - nSignedOneX );
}
if ( pOldBackground && (pColor ||pBackground != pOldBackground || pOldDataBarInfo || pDataBarInfo || pIconSetInfo || pOldIconSetInfo) )
{
- rRect.Right() = nPosX-nSignedOneX;
+ rRect.SetRight( nPosX-nSignedOneX );
if (pOldBackground) // ==0 if hidden
{
Color aBackCol = pOldBackground->GetColor();
@@ -957,13 +957,13 @@ void drawCells(vcl::RenderContext& rRenderContext, const Color* pColor, const Sv
if( pOldIconSetInfo )
drawIconSets(rRenderContext, pOldIconSetInfo, rRect, nOneX, nOneY, rIconSetBitmapMap);
- rRect.Left() = nPosX - nSignedOneX;
+ rRect.SetLeft( nPosX - nSignedOneX );
}
if (!pOldBackground && !pOldColor && (pDataBarInfo || pIconSetInfo))
{
- rRect.Right() = nPosX -nSignedOneX;
- rRect.Left() = nPosX - nSignedOneX;
+ rRect.SetRight( nPosX -nSignedOneX );
+ rRect.SetLeft( nPosX - nSignedOneX );
}
if(pColor)
@@ -1252,31 +1252,31 @@ void ScOutputData::DrawExtraShadow(bool bLeft, bool bTop, bool bRight, bool bBot
ePart == SC_SHADOW_CORNER)
{
if (eLoc == SvxShadowLocation::TopLeft || eLoc == SvxShadowLocation::TopRight)
- aRect.Top() = aRect.Bottom() - nSizeY;
+ aRect.SetTop( aRect.Bottom() - nSizeY );
else
- aRect.Bottom() = aRect.Top() + nSizeY;
+ aRect.SetBottom( aRect.Top() + nSizeY );
}
if (ePart == SC_SHADOW_VERT || ePart == SC_SHADOW_VSTART ||
ePart == SC_SHADOW_CORNER)
{
if (eLoc == SvxShadowLocation::TopLeft || eLoc == SvxShadowLocation::BottomLeft)
- aRect.Left() = aRect.Right() - nSizeX;
+ aRect.SetLeft( aRect.Right() - nSizeX );
else
- aRect.Right() = aRect.Left() + nSizeX;
+ aRect.SetRight( aRect.Left() + nSizeX );
}
if (ePart == SC_SHADOW_HSTART)
{
if (eLoc == SvxShadowLocation::TopLeft || eLoc == SvxShadowLocation::BottomLeft)
- aRect.Right() -= nSizeX;
+ aRect.SetRight( aRect.Right() - nSizeX );
else
- aRect.Left() += nSizeX;
+ aRect.SetLeft( aRect.Left() + nSizeX );
}
if (ePart == SC_SHADOW_VSTART)
{
if (eLoc == SvxShadowLocation::TopLeft || eLoc == SvxShadowLocation::TopRight)
- aRect.Bottom() -= nSizeY;
+ aRect.SetBottom( aRect.Bottom() - nSizeY );
else
- aRect.Top() += nSizeY;
+ aRect.SetTop( aRect.Top() + nSizeY );
}
//! merge rectangles?
@@ -1711,8 +1711,8 @@ vcl::Region ScOutputData::GetChangedAreaRegion()
long nPosY = nScrY;
SCSIZE nArrY;
- aDrawingRect.Left() = nScrX;
- aDrawingRect.Right() = nScrX+nScrW-1;
+ aDrawingRect.SetLeft( nScrX );
+ aDrawingRect.SetRight( nScrX+nScrW-1 );
for(nArrY=1; nArrY+1<nArrCount; nArrY++)
{
@@ -1722,11 +1722,11 @@ vcl::Region ScOutputData::GetChangedAreaRegion()
{
if(!bHad)
{
- aDrawingRect.Top() = nPosY;
+ aDrawingRect.SetTop( nPosY );
bHad = true;
}
- aDrawingRect.Bottom() = nPosY + pRowInfo[nArrY].nHeight - 1;
+ aDrawingRect.SetBottom( nPosY + pRowInfo[nArrY].nHeight - 1 );
}
else if(bHad)
{
@@ -1750,8 +1750,8 @@ bool ScOutputData::SetChangedClip()
tools::PolyPolygon aPoly;
tools::Rectangle aDrawingRect;
- aDrawingRect.Left() = nScrX;
- aDrawingRect.Right() = nScrX+nScrW-1;
+ aDrawingRect.SetLeft( nScrX );
+ aDrawingRect.SetRight( nScrX+nScrW-1 );
bool bHad = false;
long nPosY = nScrY;
@@ -1764,10 +1764,10 @@ bool ScOutputData::SetChangedClip()
{
if (!bHad)
{
- aDrawingRect.Top() = nPosY;
+ aDrawingRect.SetTop( nPosY );
bHad = true;
}
- aDrawingRect.Bottom() = nPosY + pRowInfo[nArrY].nHeight - 1;
+ aDrawingRect.SetBottom( nPosY + pRowInfo[nArrY].nHeight - 1 );
}
else if (bHad)
{
@@ -2405,11 +2405,11 @@ void ScOutputData::DrawClipMarks()
Point( nStartPosX+nOutWidth-1, nPosY+nOutHeight-1 ) );
}
- aCellRect.Bottom() -= 1; // don't paint over the cell grid
+ aCellRect.SetBottom( aCellRect.Bottom() - 1 ); // don't paint over the cell grid
if ( bLayoutRTL )
- aCellRect.Left() += 1;
+ aCellRect.SetLeft( aCellRect.Left() + 1 );
else
- aCellRect.Right() -= 1;
+ aCellRect.SetRight( aCellRect.Right() - 1 );
long nMarkPixel = static_cast<long>( SC_CLIPMARK_SIZE * mnPPTX );
Size aMarkSize( nMarkPixel, (nMarkPixel-1)*2 );
@@ -2418,14 +2418,14 @@ void ScOutputData::DrawClipMarks()
{
// visually left
tools::Rectangle aMarkRect = aCellRect;
- aMarkRect.Right() = aCellRect.Left()+nMarkPixel-1;
+ aMarkRect.SetRight( aCellRect.Left()+nMarkPixel-1 );
SvxFont::DrawArrow( *mpDev, aMarkRect, aMarkSize, aArrowFillCol, true );
}
if ( pInfo->nClipMark & ( bLayoutRTL ? ScClipMark::Left : ScClipMark::Right ) )
{
// visually right
tools::Rectangle aMarkRect = aCellRect;
- aMarkRect.Left() = aCellRect.Right()-nMarkPixel+1;
+ aMarkRect.SetLeft( aCellRect.Right()-nMarkPixel+1 );
SvxFont::DrawArrow( *mpDev, aMarkRect, aMarkSize, aArrowFillCol, false );
}
}
diff --git a/sc/source/ui/view/output2.cxx b/sc/source/ui/view/output2.cxx
index bf00ea6d0f86..8767a91e6559 100644
--- a/sc/source/ui/view/output2.cxx
+++ b/sc/source/ui/view/output2.cxx
@@ -694,21 +694,21 @@ void ScDrawStringsVars::SetAutoText( const OUString& rAutoText )
OutputDevice* pRefDevice = pOutput->mpRefDevice;
OutputDevice* pFmtDevice = pOutput->pFmtDevice;
- aTextSize.Width() = pFmtDevice->GetTextWidth( aString );
- aTextSize.Height() = pFmtDevice->GetTextHeight();
+ aTextSize.setWidth( pFmtDevice->GetTextWidth( aString ) );
+ aTextSize.setHeight( pFmtDevice->GetTextHeight() );
if ( !pRefDevice->GetConnectMetaFile() || pRefDevice->GetOutDevType() == OUTDEV_PRINTER )
{
double fMul = pOutput->GetStretch();
- aTextSize.Width() = static_cast<long>(aTextSize.Width() / fMul + 0.5);
+ aTextSize.setWidth( static_cast<long>(aTextSize.Width() / fMul + 0.5) );
}
- aTextSize.Height() = aMetric.GetAscent() + aMetric.GetDescent();
+ aTextSize.setHeight( aMetric.GetAscent() + aMetric.GetDescent() );
if ( GetOrient() != SvxCellOrientation::Standard )
{
long nTemp = aTextSize.Height();
- aTextSize.Height() = aTextSize.Width();
- aTextSize.Width() = nTemp;
+ aTextSize.setHeight( aTextSize.Width() );
+ aTextSize.setWidth( nTemp );
}
nOriginalWidth = aTextSize.Width();
@@ -764,21 +764,21 @@ void ScDrawStringsVars::TextChanged()
{
OutputDevice* pRefDevice = pOutput->mpRefDevice;
OutputDevice* pFmtDevice = pOutput->pFmtDevice;
- aTextSize.Width() = pFmtDevice->GetTextWidth( aString );
- aTextSize.Height() = pFmtDevice->GetTextHeight();
+ aTextSize.setWidth( pFmtDevice->GetTextWidth( aString ) );
+ aTextSize.setHeight( pFmtDevice->GetTextHeight() );
if ( !pRefDevice->GetConnectMetaFile() || pRefDevice->GetOutDevType() == OUTDEV_PRINTER )
{
double fMul = pOutput->GetStretch();
- aTextSize.Width() = static_cast<long>(aTextSize.Width() / fMul + 0.5);
+ aTextSize.setWidth( static_cast<long>(aTextSize.Width() / fMul + 0.5) );
}
- aTextSize.Height() = aMetric.GetAscent() + aMetric.GetDescent();
+ aTextSize.setHeight( aMetric.GetAscent() + aMetric.GetDescent() );
if ( GetOrient() != SvxCellOrientation::Standard )
{
long nTemp = aTextSize.Height();
- aTextSize.Height() = aTextSize.Width();
- aTextSize.Width() = nTemp;
+ aTextSize.setHeight( aTextSize.Width() );
+ aTextSize.setWidth( nTemp );
}
nOriginalWidth = aTextSize.Width();
@@ -1237,10 +1237,10 @@ void ScOutputData::GetOutputArea( SCCOL nX, SCSIZE nArrY, long nPosX, long nPosY
// rAlignRect is the single cell or merged area, used for alignment.
- rParam.maAlignRect.Left() = nCellPosX;
- rParam.maAlignRect.Right() = nCellPosX + ( nMergeSizeX - 1 ) * nLayoutSign;
- rParam.maAlignRect.Top() = nCellPosY;
- rParam.maAlignRect.Bottom() = nCellPosY + nMergeSizeY - 1;
+ rParam.maAlignRect.SetLeft( nCellPosX );
+ rParam.maAlignRect.SetRight( nCellPosX + ( nMergeSizeX - 1 ) * nLayoutSign );
+ rParam.maAlignRect.SetTop( nCellPosY );
+ rParam.maAlignRect.SetBottom( nCellPosY + nMergeSizeY - 1 );
// rClipRect is all cells that are used for output.
// For merged cells this is the same as rAlignRect, otherwise neighboring cells can also be used.
@@ -1286,7 +1286,7 @@ void ScOutputData::GetOutputArea( SCCOL nX, SCSIZE nArrY, long nPosX, long nPosY
++nRightX;
long nAdd = static_cast<long>( mpDoc->GetColWidth( nRightX, nTab ) * mnPPTX );
nRightMissing -= nAdd;
- rParam.maClipRect.Right() += nAdd * nLayoutSign;
+ rParam.maClipRect.SetRight( rParam.maClipRect.Right() + nAdd * nLayoutSign );
if ( rThisRowInfo.nRowNo == nCellY && nRightX >= nX1 && nRightX <= nX2 )
rThisRowInfo.pCellInfo[nRightX].bHideGrid = true;
@@ -1300,7 +1300,7 @@ void ScOutputData::GetOutputArea( SCCOL nX, SCSIZE nArrY, long nPosX, long nPosY
--nLeftX;
long nAdd = static_cast<long>( mpDoc->GetColWidth( nLeftX, nTab ) * mnPPTX );
nLeftMissing -= nAdd;
- rParam.maClipRect.Left() -= nAdd * nLayoutSign;
+ rParam.maClipRect.SetLeft( rParam.maClipRect.Left() - nAdd * nLayoutSign );
}
}
@@ -1311,14 +1311,14 @@ void ScOutputData::GetOutputArea( SCCOL nX, SCSIZE nArrY, long nPosX, long nPosY
rThisRowInfo.pCellInfo[nRightX+1].nClipMark |= ScClipMark::Right;
bAnyClipped = true;
long nMarkPixel = static_cast<long>( SC_CLIPMARK_SIZE * mnPPTX );
- rParam.maClipRect.Right() -= nMarkPixel * nLayoutSign;
+ rParam.maClipRect.SetRight( rParam.maClipRect.Right() - nMarkPixel * nLayoutSign );
}
if ( nLeftMissing > 0 && bMarkClipped && nLeftX >= nX1 && nLeftX <= nX2 && !bBreak && !bCellIsValue )
{
rThisRowInfo.pCellInfo[nLeftX+1].nClipMark |= ScClipMark::Left;
bAnyClipped = true;
long nMarkPixel = static_cast<long>( SC_CLIPMARK_SIZE * mnPPTX );
- rParam.maClipRect.Left() += nMarkPixel * nLayoutSign;
+ rParam.maClipRect.SetLeft( rParam.maClipRect.Left() + nMarkPixel * nLayoutSign );
}
rParam.mbLeftClip = ( nLeftMissing > 0 );
@@ -1345,8 +1345,8 @@ void ScOutputData::GetOutputArea( SCCOL nX, SCSIZE nArrY, long nPosX, long nPosY
// content fits even in the remaining area without the filter button
// -> align within that remaining area
- rParam.maAlignRect.Right() -= nFilter * nLayoutSign;
- rParam.maClipRect.Right() -= nFilter * nLayoutSign;
+ rParam.maAlignRect.SetRight( rParam.maAlignRect.Right() - nFilter * nLayoutSign );
+ rParam.maClipRect.SetRight( rParam.maClipRect.Right() - nFilter * nLayoutSign );
// if a number doesn't fit, don't hide part of the number behind the button
// -> set clip flags, so "###" replacement is used (but also within the smaller area)
@@ -1932,13 +1932,13 @@ tools::Rectangle ScOutputData::LayoutStrings(bool bPixelToLogic, bool bPaint, co
// columns are cut off when performing a non-proportional resize
if (!bHClip)
{
- aAreaParam.maClipRect.Left() = nScrX;
- aAreaParam.maClipRect.Right() = nScrX+nScrW;
+ aAreaParam.maClipRect.SetLeft( nScrX );
+ aAreaParam.maClipRect.SetRight( nScrX+nScrW );
}
if (!bVClip)
{
- aAreaParam.maClipRect.Top() = nScrY;
- aAreaParam.maClipRect.Bottom() = nScrY+nScrH;
+ aAreaParam.maClipRect.SetTop( nScrY );
+ aAreaParam.maClipRect.SetBottom( nScrY+nScrH );
}
// aClipRect is not used after SetClipRegion/IntersectClipRegion,
@@ -1983,13 +1983,13 @@ tools::Rectangle ScOutputData::LayoutStrings(bool bPixelToLogic, bool bPaint, co
{
// undo text width adjustment in pixels
if (bRightAdjusted)
- aDrawTextPos.X() += aVars.GetTextSize().Width();
+ aDrawTextPos.setX( aDrawTextPos.X() + aVars.GetTextSize().Width() );
aDrawTextPos = mpRefDevice->PixelToLogic( aDrawTextPos );
// redo text width adjustment in logic units
if (bRightAdjusted)
- aDrawTextPos.X() -= aVars.GetOriginalWidth();
+ aDrawTextPos.setX( aDrawTextPos.X() - aVars.GetOriginalWidth() );
}
// in Metafiles always use DrawTextArray to ensure that positions are
@@ -2468,22 +2468,22 @@ void ScOutputData::DrawEditParam::calcPaperSize(
if (isVerticallyOriented())
{
- rPaperSize.Width() = rAlignRect.GetHeight() - nTopM - nBottomM;
- rPaperSize.Height() = rAlignRect.GetWidth() - nLeftM - nRightM;
+ rPaperSize.setWidth( rAlignRect.GetHeight() - nTopM - nBottomM );
+ rPaperSize.setHeight( rAlignRect.GetWidth() - nLeftM - nRightM );
}
else
{
- rPaperSize.Width() = rAlignRect.GetWidth() - nLeftM - nRightM;
- rPaperSize.Height() = rAlignRect.GetHeight() - nTopM - nBottomM;
+ rPaperSize.setWidth( rAlignRect.GetWidth() - nLeftM - nRightM );
+ rPaperSize.setHeight( rAlignRect.GetHeight() - nTopM - nBottomM );
}
if (mbAsianVertical)
{
- rPaperSize.Height() = rAlignRect.GetHeight() - nTopM - nBottomM;
+ rPaperSize.setHeight( rAlignRect.GetHeight() - nTopM - nBottomM );
// Subtract some extra value from the height or else the text would go
// outside the cell area. The value of 5 is arbitrary, and is based
// entirely on heuristics.
- rPaperSize.Height() -= 5;
+ rPaperSize.setHeight( rPaperSize.Height() - 5 );
}
}
@@ -2539,17 +2539,17 @@ void ScOutputData::DrawEditParam::calcStartPosForVertical(
{
// vertical adjustment is within the EditEngine
if (mbPixelToLogic)
- rLogicStart.Y() += pRefDevice->PixelToLogic(Size(0,nTopM)).Height();
+ rLogicStart.setY( rLogicStart.Y() + pRefDevice->PixelToLogic(Size(0,nTopM)).Height() );
else
- rLogicStart.Y() += nTopM;
+ rLogicStart.setY( rLogicStart.Y() + nTopM );
switch (meHorJustResult)
{
case SvxCellHorJustify::Center:
- rLogicStart.X() += (nCellWidth - nEngineWidth) / 2;
+ rLogicStart.setX( rLogicStart.X() + (nCellWidth - nEngineWidth) / 2 );
break;
case SvxCellHorJustify::Right:
- rLogicStart.X() += nCellWidth - nEngineWidth;
+ rLogicStart.setX( rLogicStart.X() + nCellWidth - nEngineWidth );
break;
default:
; // do nothing
@@ -2701,7 +2701,7 @@ void ScOutputData::DrawEditParam::adjustForHyperlinkInPDF(Point aURLStart, const
if (isVerticallyOriented())
std::swap( nURLWidth, nURLHeight );
else if (mbAsianVertical)
- aURLStart.X() -= nURLWidth;
+ aURLStart.setX( aURLStart.X() - nURLWidth );
tools::Rectangle aURLRect( aURLStart, Size( nURLWidth, nURLHeight ) );
lcl_DoHyperlinkResult(pDev, aURLRect, maCell);
@@ -2712,12 +2712,12 @@ bool ScOutputData::AdjustAreaParamClipRect(OutputAreaParam& rAreaParam)
{
if( rAreaParam.maClipRect.Left() < nScrX )
{
- rAreaParam.maClipRect.Left() = nScrX;
+ rAreaParam.maClipRect.SetLeft( nScrX );
rAreaParam.mbLeftClip = true;
}
if( rAreaParam.maClipRect.Right() > nScrX + nScrW )
{
- rAreaParam.maClipRect.Right() = nScrX + nScrW; //! minus one?
+ rAreaParam.maClipRect.SetRight( nScrX + nScrW ); //! minus one?
rAreaParam.mbRightClip = true;
}
@@ -2725,12 +2725,12 @@ bool ScOutputData::AdjustAreaParamClipRect(OutputAreaParam& rAreaParam)
if( rAreaParam.maClipRect.Top() < nScrY )
{
- rAreaParam.maClipRect.Top() = nScrY;
+ rAreaParam.maClipRect.SetTop( nScrY );
bVClip = true;
}
if( rAreaParam.maClipRect.Bottom() > nScrY + nScrH )
{
- rAreaParam.maClipRect.Bottom() = nScrY + nScrH; //! minus one?
+ rAreaParam.maClipRect.SetBottom( nScrY + nScrH ); //! minus one?
bVClip = true;
}
return bVClip;
@@ -2878,7 +2878,7 @@ void ScOutputData::DrawEditStandard(DrawEditParam& rParam)
Fraction aFract(1,1);
tools::Rectangle aUtilRect = ScEditUtil( mpDoc, rParam.mnCellX, rParam.mnCellY, nTab, Point(0,0), pFmtDevice,
HMM_PER_TWIPS, HMM_PER_TWIPS, aFract, aFract ).GetEditArea( rParam.mpPattern, false );
- aLogicSize.Width() = aUtilRect.GetWidth();
+ aLogicSize.setWidth( aUtilRect.GetWidth() );
}
rParam.mpEngine->SetPaperSize(aLogicSize);
}
@@ -2977,7 +2977,7 @@ void ScOutputData::DrawEditStandard(DrawEditParam& rParam)
if (eOutHorJust != SvxCellHorJustify::Left)
{
- aPaperSize.Width() = nNeededPixel + 1;
+ aPaperSize.setWidth( nNeededPixel + 1 );
if (rParam.mbPixelToLogic)
rParam.mpEngine->SetPaperSize(mpRefDevice->PixelToLogic(aPaperSize));
else
@@ -3064,7 +3064,7 @@ void ScOutputData::DrawEditStandard(DrawEditParam& rParam)
long nMarkPixel = static_cast<long>( SC_CLIPMARK_SIZE * mnPPTX );
if ( aAreaParam.maClipRect.Right() - nMarkPixel > aAreaParam.maClipRect.Left() )
- aAreaParam.maClipRect.Right() -= nMarkPixel;
+ aAreaParam.maClipRect.SetRight( aAreaParam.maClipRect.Right() - nMarkPixel );
}
}
@@ -3095,29 +3095,29 @@ void ScOutputData::DrawEditStandard(DrawEditParam& rParam)
//! only converting margin?
if (rParam.mbPixelToLogic)
- aLogicStart.Y() += mpRefDevice->PixelToLogic( Size(0, nTopM +
+ aLogicStart.setY( aLogicStart.Y() + mpRefDevice->PixelToLogic( Size(0, nTopM +
mpRefDevice->LogicToPixel(aCellSize).Height() -
mpRefDevice->LogicToPixel(Size(0,nEngineHeight)).Height()
- )).Height();
+ )).Height() );
else
- aLogicStart.Y() += nTopM + aCellSize.Height() - nEngineHeight;
+ aLogicStart.setY( aLogicStart.Y() + nTopM + aCellSize.Height() - nEngineHeight );
}
else if (rParam.meVerJust==SvxCellVerJustify::Center)
{
if (rParam.mbPixelToLogic)
- aLogicStart.Y() += mpRefDevice->PixelToLogic( Size(0, nTopM + (
+ aLogicStart.setY( aLogicStart.Y() + mpRefDevice->PixelToLogic( Size(0, nTopM + (
mpRefDevice->LogicToPixel(aCellSize).Height() -
mpRefDevice->LogicToPixel(Size(0,nEngineHeight)).Height() )
- / 2)).Height();
+ / 2)).Height() );
else
- aLogicStart.Y() += nTopM + (aCellSize.Height() - nEngineHeight) / 2;
+ aLogicStart.setY( aLogicStart.Y() + nTopM + (aCellSize.Height() - nEngineHeight) / 2 );
}
else // top
{
if (rParam.mbPixelToLogic)
- aLogicStart.Y() += mpRefDevice->PixelToLogic(Size(0,nTopM)).Height();
+ aLogicStart.setY( aLogicStart.Y() + mpRefDevice->PixelToLogic(Size(0,nTopM)).Height() );
else
- aLogicStart.Y() += nTopM;
+ aLogicStart.setY( aLogicStart.Y() + nTopM );
}
aURLStart = aLogicStart; // copy before modifying for orientation
@@ -3169,7 +3169,7 @@ void ScOutputData::ShowClipMarks( DrawEditParam& rParam, long nEngineHeight, con
const long nMarkPixel = static_cast<long>( SC_CLIPMARK_SIZE * mnPPTX );
if ( aAreaParam.maClipRect.Right() - nMarkPixel > aAreaParam.maClipRect.Left() )
- aAreaParam.maClipRect.Right() -= nMarkPixel;
+ aAreaParam.maClipRect.SetRight( aAreaParam.maClipRect.Right() - nMarkPixel );
}
}
@@ -3390,10 +3390,10 @@ void ScOutputData::DrawEditBottomTop(DrawEditParam& rParam)
if (rParam.meHorJustResult == SvxCellHorJustify::Block || rParam.mbBreak)
{
Size aPSize = rParam.mpEngine->GetPaperSize();
- aPSize.Width() = aCellSize.Height();
+ aPSize.setWidth( aCellSize.Height() );
rParam.mpEngine->SetPaperSize(aPSize);
- aLogicStart.Y() +=
- rParam.mbBreak ? aPSize.Width() : nEngineHeight;
+ aLogicStart.setY( aLogicStart.Y() +
+ (rParam.mbBreak ? aPSize.Width() : nEngineHeight) );
}
else
{
@@ -3403,7 +3403,7 @@ void ScOutputData::DrawEditBottomTop(DrawEditParam& rParam)
// Set the paper width to be the width of the text.
Size aPSize = rParam.mpEngine->GetPaperSize();
- aPSize.Width() = rParam.mpEngine->CalcTextWidth();
+ aPSize.setWidth( rParam.mpEngine->CalcTextWidth() );
rParam.mpEngine->SetPaperSize(aPSize);
long nGap = 0;
@@ -3421,8 +3421,8 @@ void ScOutputData::DrawEditBottomTop(DrawEditParam& rParam)
}
// First, align text to bottom.
- aLogicStart.Y() += aCellSize.Height();
- aLogicStart.Y() += nTopOffset;
+ aLogicStart.setY( aLogicStart.Y() + aCellSize.Height() );
+ aLogicStart.setY( aLogicStart.Y() + nTopOffset );
switch (rParam.meVerJust)
{
@@ -3432,12 +3432,12 @@ void ScOutputData::DrawEditBottomTop(DrawEditParam& rParam)
break;
case SvxCellVerJustify::Center:
// center it.
- aLogicStart.Y() -= nGap / 2;
+ aLogicStart.setY( aLogicStart.Y() - nGap / 2 );
break;
case SvxCellVerJustify::Block:
case SvxCellVerJustify::Top:
// align to top
- aLogicStart.Y() -= nGap;
+ aLogicStart.setY( aLogicStart.Y() - nGap );
break;
default:
;
@@ -3635,12 +3635,12 @@ void ScOutputData::DrawEditTopBottom(DrawEditParam& rParam)
if (rParam.meHorJustResult != SvxCellHorJustify::Block)
{
- aLogicStart.X() += nEngineWidth;
+ aLogicStart.setX( aLogicStart.X() + nEngineWidth );
if (!rParam.mbBreak)
{
// Set the paper width to text size.
Size aPSize = rParam.mpEngine->GetPaperSize();
- aPSize.Width() = rParam.mpEngine->CalcTextWidth();
+ aPSize.setWidth( rParam.mpEngine->CalcTextWidth() );
rParam.mpEngine->SetPaperSize(aPSize);
long nGap = 0;
@@ -3656,18 +3656,18 @@ void ScOutputData::DrawEditTopBottom(DrawEditParam& rParam)
nGap = aPSize.Width() - aCellSize.Height();
nTopOffset = nTopM;
}
- aLogicStart.Y() += nTopOffset;
+ aLogicStart.setY( aLogicStart.Y() + nTopOffset );
switch (rParam.meVerJust)
{
case SvxCellVerJustify::Standard:
case SvxCellVerJustify::Bottom:
// align to bottom
- aLogicStart.Y() -= nGap;
+ aLogicStart.setY( aLogicStart.Y() - nGap );
break;
case SvxCellVerJustify::Center:
// center it.
- aLogicStart.Y() -= nGap / 2;
+ aLogicStart.setY( aLogicStart.Y() - nGap / 2 );
break;
case SvxCellVerJustify::Block:
case SvxCellVerJustify::Top:
@@ -3752,7 +3752,7 @@ void ScOutputData::DrawEditStacked(DrawEditParam& rParam)
Fraction aFract(1,1);
tools::Rectangle aUtilRect = ScEditUtil( mpDoc, rParam.mnCellX, rParam.mnCellY, nTab, Point(0,0), pFmtDevice,
HMM_PER_TWIPS, HMM_PER_TWIPS, aFract, aFract ).GetEditArea( rParam.mpPattern, false );
- aLogicSize.Width() = aUtilRect.GetWidth();
+ aLogicSize.setWidth( aUtilRect.GetWidth() );
}
rParam.mpEngine->SetPaperSize(aLogicSize);
}
@@ -3810,7 +3810,7 @@ void ScOutputData::DrawEditStacked(DrawEditParam& rParam)
if ( eOutHorJust != SvxCellHorJustify::Left )
{
- aPaperSize.Width() = nNeededPixel + 1;
+ aPaperSize.setWidth( nNeededPixel + 1 );
if (rParam.mbPixelToLogic)
rParam.mpEngine->SetPaperSize(mpRefDevice->PixelToLogic(aPaperSize));
else
@@ -3897,7 +3897,7 @@ void ScOutputData::DrawEditStacked(DrawEditParam& rParam)
long nMarkPixel = static_cast<long>( SC_CLIPMARK_SIZE * mnPPTX );
if ( aAreaParam.maClipRect.Right() - nMarkPixel > aAreaParam.maClipRect.Left() )
- aAreaParam.maClipRect.Right() -= nMarkPixel;
+ aAreaParam.maClipRect.SetRight( aAreaParam.maClipRect.Right() - nMarkPixel );
}
}
@@ -3920,35 +3920,35 @@ void ScOutputData::DrawEditStacked(DrawEditParam& rParam)
//! only converting margin?
if (rParam.mbPixelToLogic)
- aLogicStart.Y() += mpRefDevice->PixelToLogic( Size(0, nTopM +
+ aLogicStart.setY( aLogicStart.Y() + mpRefDevice->PixelToLogic( Size(0, nTopM +
mpRefDevice->LogicToPixel(aCellSize).Height() -
mpRefDevice->LogicToPixel(Size(0,nEngineHeight)).Height()
- )).Height();
+ )).Height() );
else
- aLogicStart.Y() += nTopM + aCellSize.Height() - nEngineHeight;
+ aLogicStart.setY( aLogicStart.Y() + nTopM + aCellSize.Height() - nEngineHeight );
}
else if (rParam.meVerJust==SvxCellVerJustify::Center)
{
if (rParam.mbPixelToLogic)
- aLogicStart.Y() += mpRefDevice->PixelToLogic( Size(0, nTopM + (
+ aLogicStart.setY( aLogicStart.Y() + mpRefDevice->PixelToLogic( Size(0, nTopM + (
mpRefDevice->LogicToPixel(aCellSize).Height() -
mpRefDevice->LogicToPixel(Size(0,nEngineHeight)).Height() )
- / 2)).Height();
+ / 2)).Height() );
else
- aLogicStart.Y() += nTopM + (aCellSize.Height() - nEngineHeight) / 2;
+ aLogicStart.setY( aLogicStart.Y() + nTopM + (aCellSize.Height() - nEngineHeight) / 2 );
}
else // top
{
if (rParam.mbPixelToLogic)
- aLogicStart.Y() += mpRefDevice->PixelToLogic(Size(0,nTopM)).Height();
+ aLogicStart.setY( aLogicStart.Y() + mpRefDevice->PixelToLogic(Size(0,nTopM)).Height() );
else
- aLogicStart.Y() += nTopM;
+ aLogicStart.setY( aLogicStart.Y() + nTopM );
}
aURLStart = aLogicStart; // copy before modifying for orientation
Size aPaperLogic = rParam.mpEngine->GetPaperSize();
- aPaperLogic.Width() = nEngineWidth;
+ aPaperLogic.setWidth( nEngineWidth );
rParam.mpEngine->SetPaperSize(aPaperLogic);
// bMoveClipped handling has been replaced by complete alignment
@@ -4047,7 +4047,7 @@ void ScOutputData::DrawEditAsianVertical(DrawEditParam& rParam)
Fraction aFract(1,1);
tools::Rectangle aUtilRect = ScEditUtil( mpDoc, rParam.mnCellX, rParam.mnCellY, nTab, Point(0,0), pFmtDevice,
HMM_PER_TWIPS, HMM_PER_TWIPS, aFract, aFract ).GetEditArea( rParam.mpPattern, false );
- aLogicSize.Width() = aUtilRect.GetWidth();
+ aLogicSize.setWidth( aUtilRect.GetWidth() );
}
rParam.mpEngine->SetPaperSize(aLogicSize);
}
@@ -4109,7 +4109,7 @@ void ScOutputData::DrawEditAsianVertical(DrawEditParam& rParam)
if (eOutHorJust != SvxCellHorJustify::Left)
{
- aPaperSize.Width() = nNeededPixel + 1;
+ aPaperSize.setWidth( nNeededPixel + 1 );
if (rParam.mbPixelToLogic)
rParam.mpEngine->SetPaperSize(mpRefDevice->PixelToLogic(aPaperSize));
else
@@ -4184,7 +4184,7 @@ void ScOutputData::DrawEditAsianVertical(DrawEditParam& rParam)
long nMarkPixel = static_cast<long>( SC_CLIPMARK_SIZE * mnPPTX );
if ( aAreaParam.maClipRect.Right() - nMarkPixel > aAreaParam.maClipRect.Left() )
- aAreaParam.maClipRect.Right() -= nMarkPixel;
+ aAreaParam.maClipRect.SetRight( aAreaParam.maClipRect.Right() - nMarkPixel );
}
}
@@ -4206,18 +4206,18 @@ void ScOutputData::DrawEditAsianVertical(DrawEditParam& rParam)
// horizontal alignment
if (rParam.meHorJustResult==SvxCellHorJustify::Right)
- aLogicStart.X() += nAvailWidth - nEngineWidth;
+ aLogicStart.setX( aLogicStart.X() + nAvailWidth - nEngineWidth );
else if (rParam.meHorJustResult==SvxCellHorJustify::Center)
- aLogicStart.X() += (nAvailWidth - nEngineWidth) / 2;
+ aLogicStart.setX( aLogicStart.X() + (nAvailWidth - nEngineWidth) / 2 );
// paper size is subtracted below
- aLogicStart.X() += nEngineWidth;
+ aLogicStart.setX( aLogicStart.X() + nEngineWidth );
// vertical adjustment is within the EditEngine
if (rParam.mbPixelToLogic)
- aLogicStart.Y() += mpRefDevice->PixelToLogic(Size(0,nTopM)).Height();
+ aLogicStart.setY( aLogicStart.Y() + mpRefDevice->PixelToLogic(Size(0,nTopM)).Height() );
else
- aLogicStart.Y() += nTopM;
+ aLogicStart.setY( aLogicStart.Y() + nTopM );
aURLStart = aLogicStart; // copy before modifying for orientation
@@ -4226,7 +4226,7 @@ void ScOutputData::DrawEditAsianVertical(DrawEditParam& rParam)
// with SetVertical, the start position is top left of
// the whole output area, not the text itself
- aLogicStart.X() -= rParam.mpEngine->GetPaperSize().Width();
+ aLogicStart.setX( aLogicStart.X() - rParam.mpEngine->GetPaperSize().Width() );
rParam.mpEngine->Draw(mpDev, aLogicStart);
}
@@ -4650,7 +4650,7 @@ void ScOutputData::DrawRotated(bool bPixelToLogic)
Size aPaperSize( 1000000, 1000000 );
if (eOrient==SvxCellOrientation::Stacked)
- aPaperSize.Width() = nOutWidth; // to center
+ aPaperSize.setWidth( nOutWidth ); // to center
else if (bBreak)
{
if (nAttrRotate)
@@ -4659,12 +4659,12 @@ void ScOutputData::DrawRotated(bool bPixelToLogic)
//! of rows, as long as the rows can not be outputted individually
//! offsetted -> therefore unlimited, so no wrapping.
//! With offset rows the following would be correct:
- aPaperSize.Width() = static_cast<long>(nOutHeight / fabs(nSin));
+ aPaperSize.setWidth( static_cast<long>(nOutHeight / fabs(nSin)) );
}
else if (eOrient == SvxCellOrientation::Standard)
- aPaperSize.Width() = nOutWidth;
+ aPaperSize.setWidth( nOutWidth );
else
- aPaperSize.Width() = nOutHeight - 1;
+ aPaperSize.setWidth( nOutHeight - 1 );
}
if (bPixelToLogic)
pEngine->SetPaperSize(mpRefDevice->PixelToLogic(aPaperSize));
@@ -4742,7 +4742,7 @@ void ScOutputData::DrawRotated(bool bPixelToLogic)
--nSteps;
// set paper width and get new text height
- aPaperSize.Width() = nNewWidth;
+ aPaperSize.setWidth( nNewWidth );
if (bPixelToLogic)
pEngine->SetPaperSize(mpRefDevice->PixelToLogic(aPaperSize));
else
@@ -4859,7 +4859,7 @@ void ScOutputData::DrawRotated(bool bPixelToLogic)
{
long nDif = nScrX - nStartX;
nClipStartX = nScrX;
- aClipSize.Width() -= nDif;
+ aClipSize.setWidth( aClipSize.Width() - nDif );
}
}
@@ -4870,7 +4870,7 @@ void ScOutputData::DrawRotated(bool bPixelToLogic)
{
long nDif = nRowPosY - nClipStartY;
nClipStartY = nRowPosY;
- aClipSize.Height() -= nDif;
+ aClipSize.setHeight( aClipSize.Height() - nDif );
}
}
@@ -4878,7 +4878,7 @@ void ScOutputData::DrawRotated(bool bPixelToLogic)
{
// only clip rotated output text at the page border
nClipStartX = nScrX;
- aClipSize.Width() = nScrW;
+ aClipSize.setWidth( nScrW );
}
if (bPixelToLogic)
@@ -4932,7 +4932,7 @@ void ScOutputData::DrawRotated(bool bPixelToLogic)
pEngine->SetDefaultItem(
SvxAdjustItem( eSvxAdjust, EE_PARA_JUST ) );
- aPaperSize.Width() = nOutWidth;
+ aPaperSize.setWidth( nOutWidth );
if (bPixelToLogic)
pEngine->SetPaperSize(mpRefDevice->PixelToLogic(aPaperSize));
else
@@ -4945,20 +4945,20 @@ void ScOutputData::DrawRotated(bool bPixelToLogic)
{
// rotated text is centered by default
if (eHorJust==SvxCellHorJustify::Right)
- aLogicStart.X() += nAvailWidth - nEngineWidth;
+ aLogicStart.setX( aLogicStart.X() + nAvailWidth - nEngineWidth );
else if (eHorJust==SvxCellHorJustify::Center ||
eHorJust==SvxCellHorJustify::Standard)
- aLogicStart.X() += (nAvailWidth - nEngineWidth) / 2;
+ aLogicStart.setX( aLogicStart.X() + (nAvailWidth - nEngineWidth) / 2 );
}
}
if ( bLayoutRTL )
{
if (bPixelToLogic)
- aLogicStart.X() -= mpRefDevice->PixelToLogic(
- Size( nCellWidth, 0 ) ).Width();
+ aLogicStart.setX( aLogicStart.X() - mpRefDevice->PixelToLogic(
+ Size( nCellWidth, 0 ) ).Width() );
else
- aLogicStart.X() -= nCellWidth;
+ aLogicStart.setX( aLogicStart.X() - nCellWidth );
}
if ( eOrient==SvxCellOrientation::Standard ||
@@ -4968,23 +4968,23 @@ void ScOutputData::DrawRotated(bool bPixelToLogic)
eVerJust==SvxCellVerJustify::Standard)
{
if (bPixelToLogic)
- aLogicStart.Y() += mpRefDevice->PixelToLogic( Size(0,
+ aLogicStart.setY( aLogicStart.Y() + mpRefDevice->PixelToLogic( Size(0,
mpRefDevice->LogicToPixel(aCellSize).Height() -
mpRefDevice->LogicToPixel(Size(0,nEngineHeight)).Height()
- )).Height();
+ )).Height() );
else
- aLogicStart.Y() += aCellSize.Height() - nEngineHeight;
+ aLogicStart.setY( aLogicStart.Y() + aCellSize.Height() - nEngineHeight );
}
else if (eVerJust==SvxCellVerJustify::Center)
{
if (bPixelToLogic)
- aLogicStart.Y() += mpRefDevice->PixelToLogic( Size(0,(
+ aLogicStart.setY( aLogicStart.Y() + mpRefDevice->PixelToLogic( Size(0,(
mpRefDevice->LogicToPixel(aCellSize).Height() -
mpRefDevice->LogicToPixel(Size(0,nEngineHeight)).Height())
- / 2)).Height();
+ / 2)).Height() );
else
- aLogicStart.Y() += (aCellSize.Height() - nEngineHeight) / 2;
+ aLogicStart.setY( aLogicStart.Y() + (aCellSize.Height() - nEngineHeight) / 2 );
}
}
@@ -5042,8 +5042,8 @@ void ScOutputData::DrawRotated(bool bPixelToLogic)
nAddX += ( nUp * nCos / fabs(nSin) );
}
- aLogicStart.X() += static_cast<long>(nAddX);
- aLogicStart.Y() += static_cast<long>(nAddY);
+ aLogicStart.setX( aLogicStart.X() + static_cast<long>(nAddX) );
+ aLogicStart.setY( aLogicStart.Y() + static_cast<long>(nAddY) );
}
// bSimClip is not used here (because nOriVal is set)
diff --git a/sc/source/ui/view/output3.cxx b/sc/source/ui/view/output3.cxx
index 37da03f697b8..0cb1c9bdd5e9 100644
--- a/sc/source/ui/view/output3.cxx
+++ b/sc/source/ui/view/output3.cxx
@@ -44,34 +44,36 @@ Point ScOutputData::PrePrintDrawingLayer(long nLogStX, long nLogStY )
long nLayoutSign(bLayoutRTL ? -1 : 1);
for (nCol=0; nCol<nX1; nCol++)
- aOffset.X() -= mpDoc->GetColWidth( nCol, nTab ) * nLayoutSign;
- aOffset.Y() -= mpDoc->GetRowHeight( 0, nY1-1, nTab );
+ aOffset.setX( aOffset.X() - mpDoc->GetColWidth( nCol, nTab ) * nLayoutSign );
+ aOffset.setY( aOffset.Y() - mpDoc->GetRowHeight( 0, nY1-1, nTab ) );
long nDataWidth = 0;
for (nCol=nX1; nCol<=nX2; nCol++)
nDataWidth += mpDoc->GetColWidth( nCol, nTab );
if ( bLayoutRTL )
- aOffset.X() += nDataWidth;
+ aOffset.setX( aOffset.X() + nDataWidth );
- aRect.Left() = aRect.Right() = -aOffset.X();
- aRect.Top() = aRect.Bottom() = -aOffset.Y();
+ aRect.SetLeft( -aOffset.X() );
+ aRect.SetRight( -aOffset.X() );
+ aRect.SetTop( -aOffset.Y() );
+ aRect.SetBottom( -aOffset.Y() );
Point aMMOffset( aOffset );
- aMMOffset.X() = static_cast<long>(aMMOffset.X() * HMM_PER_TWIPS);
- aMMOffset.Y() = static_cast<long>(aMMOffset.Y() * HMM_PER_TWIPS);
+ aMMOffset.setX( static_cast<long>(aMMOffset.X() * HMM_PER_TWIPS) );
+ aMMOffset.setY( static_cast<long>(aMMOffset.Y() * HMM_PER_TWIPS) );
if (!bMetaFile)
aMMOffset += Point( nLogStX, nLogStY );
for (nCol=nX1; nCol<=nX2; nCol++)
- aRect.Right() += mpDoc->GetColWidth( nCol, nTab );
- aRect.Bottom() += mpDoc->GetRowHeight( nY1, nY2, nTab );
+ aRect.SetRight( aRect.Right() + mpDoc->GetColWidth( nCol, nTab ) );
+ aRect.SetBottom( aRect.Bottom() + mpDoc->GetRowHeight( nY1, nY2, nTab ) );
- aRect.Left() = static_cast<long>(aRect.Left() * HMM_PER_TWIPS);
- aRect.Top() = static_cast<long>(aRect.Top() * HMM_PER_TWIPS);
- aRect.Right() = static_cast<long>(aRect.Right() * HMM_PER_TWIPS);
- aRect.Bottom() = static_cast<long>(aRect.Bottom() * HMM_PER_TWIPS);
+ aRect.SetLeft( static_cast<long>(aRect.Left() * HMM_PER_TWIPS) );
+ aRect.SetTop( static_cast<long>(aRect.Top() * HMM_PER_TWIPS) );
+ aRect.SetRight( static_cast<long>(aRect.Right() * HMM_PER_TWIPS) );
+ aRect.SetBottom( static_cast<long>(aRect.Bottom() * HMM_PER_TWIPS) );
if(pViewShell || pDrawView)
{
diff --git a/sc/source/ui/view/preview.cxx b/sc/source/ui/view/preview.cxx
index 8fa2d8e3bd0b..6833b9ffb210 100644
--- a/sc/source/ui/view/preview.cxx
+++ b/sc/source/ui/view/preview.cxx
@@ -460,8 +460,8 @@ void ScPreview::DoPrint( ScPreviewLocationData* pFillLocation )
if (nPrinted) // if not, draw everything grey
{
aLocalPageSize = pPrintFunc->GetPageSize();
- aLocalPageSize.Width() = static_cast<long>(aLocalPageSize.Width() * HMM_PER_TWIPS );
- aLocalPageSize.Height() = static_cast<long>(aLocalPageSize.Height() * HMM_PER_TWIPS );
+ aLocalPageSize.setWidth( static_cast<long>(aLocalPageSize.Width() * HMM_PER_TWIPS ) );
+ aLocalPageSize.setHeight( static_cast<long>(aLocalPageSize.Height() * HMM_PER_TWIPS ) );
nLeftMargin = static_cast<long>( nLeftMargin * HMM_PER_TWIPS );
nRightMargin = static_cast<long>( nRightMargin * HMM_PER_TWIPS );
@@ -610,14 +610,14 @@ void ScPreview::DoPrint( ScPreviewLocationData* pFillLocation )
aPixel = LogicToPixel( tools::Rectangle( nPageEndX, -aOffset.Y(), nPageEndX, nPageEndY ) );
aPixel.Top() += SC_PREVIEW_SHADOWSIZE;
- aPixel.Right() += SC_PREVIEW_SHADOWSIZE - 1;
- aPixel.Bottom() += SC_PREVIEW_SHADOWSIZE - 1;
+ aPixel.SetRight( aPixel.Right() + SC_PREVIEW_SHADOWSIZE - 1 );
+ aPixel.SetBottom( aPixel.Bottom() + SC_PREVIEW_SHADOWSIZE - 1 );
DrawRect( PixelToLogic( aPixel ) );
aPixel = LogicToPixel( tools::Rectangle( -aOffset.X(), nPageEndY, nPageEndX, nPageEndY ) );
aPixel.Left() += SC_PREVIEW_SHADOWSIZE;
- aPixel.Right() += SC_PREVIEW_SHADOWSIZE - 1;
- aPixel.Bottom() += SC_PREVIEW_SHADOWSIZE - 1;
+ aPixel.SetRight( aPixel.Right() + SC_PREVIEW_SHADOWSIZE - 1 );
+ aPixel.SetBottom( aPixel.Bottom() + SC_PREVIEW_SHADOWSIZE - 1 );
DrawRect( PixelToLogic( aPixel ) );
}
}
@@ -815,8 +815,8 @@ sal_uInt16 ScPreview::GetOptimalZoom(bool bWidthOnly)
// but some additional margin is introduced by integer scale values
// -> add only 0.10cm, so there is some margin in all cases.
Size aMarginSize( LogicToPixel(Size(100, 100), MapMode(MapUnit::Map100thMM)) );
- aWinSize.Width() -= 2 * aMarginSize.Width();
- aWinSize.Height() -= 2 * aMarginSize.Height();
+ aWinSize.setWidth( aWinSize.Width() - 2 * aMarginSize.Width() );
+ aWinSize.setHeight( aWinSize.Height() - 2 * aMarginSize.Height() );
Size aLocalPageSize = lcl_GetDocPageSize( &pDocShell->GetDocument(), nTab );
if ( aLocalPageSize.Width() && aLocalPageSize.Height() )
@@ -847,7 +847,7 @@ void ScPreview::SetXOffset( long nX )
if (bValid)
{
long nDif = LogicToPixel(aOffset).X() - LogicToPixel(Point(nX,0)).X();
- aOffset.X() = nX;
+ aOffset.setX( nX );
if (nDif && !bInSetZoom)
{
MapMode aOldMode = GetMapMode();
@@ -858,7 +858,7 @@ void ScPreview::SetXOffset( long nX )
}
else
{
- aOffset.X() = nX;
+ aOffset.setX( nX );
if (!bInSetZoom)
Invalidate();
}
@@ -874,7 +874,7 @@ void ScPreview::SetYOffset( long nY )
if (bValid)
{
long nDif = LogicToPixel(aOffset).Y() - LogicToPixel(Point(0,nY)).Y();
- aOffset.Y() = nY;
+ aOffset.setY( nY );
if (nDif && !bInSetZoom)
{
MapMode aOldMode = GetMapMode();
@@ -885,7 +885,7 @@ void ScPreview::SetYOffset( long nY )
}
else
{
- aOffset.Y() = nY;
+ aOffset.setY( nY );
if (!bInSetZoom)
Invalidate();
}
@@ -1192,8 +1192,8 @@ void ScPreview::MouseButtonUp( const MouseEvent& rMEvt )
{
const SfxItemSet& rHeaderSet = static_cast<const SvxSetItem*>(pItem)->GetItemSet();
Size aHeaderSize = rHeaderSet.Get(ATTR_PAGE_SIZE).GetSize();
- aHeaderSize.Height() = static_cast<long>( aButtonUpPt.Y() / HMM_PER_TWIPS + aOffset.Y() / HMM_PER_TWIPS - aULItem.GetUpper());
- aHeaderSize.Height() = aHeaderSize.Height() * 100 / mnScale;
+ aHeaderSize.setHeight( static_cast<long>( aButtonUpPt.Y() / HMM_PER_TWIPS + aOffset.Y() / HMM_PER_TWIPS - aULItem.GetUpper()) );
+ aHeaderSize.setHeight( aHeaderSize.Height() * 100 / mnScale );
SvxSetItem aNewHeader( rStyleSet.Get(ATTR_PAGE_HEADERSET) );
aNewHeader.GetItemSet().Put( SvxSizeItem( ATTR_PAGE_SIZE, aHeaderSize ) );
rStyleSet.Put( aNewHeader );
@@ -1207,8 +1207,8 @@ void ScPreview::MouseButtonUp( const MouseEvent& rMEvt )
{
const SfxItemSet& rFooterSet = static_cast<const SvxSetItem*>(pItem)->GetItemSet();
Size aFooterSize = rFooterSet.Get(ATTR_PAGE_SIZE).GetSize();
- aFooterSize.Height() = static_cast<long>( nHeight - aButtonUpPt.Y() / HMM_PER_TWIPS - aOffset.Y() / HMM_PER_TWIPS - aULItem.GetLower() );
- aFooterSize.Height() = aFooterSize.Height() * 100 / mnScale;
+ aFooterSize.setHeight( static_cast<long>( nHeight - aButtonUpPt.Y() / HMM_PER_TWIPS - aOffset.Y() / HMM_PER_TWIPS - aULItem.GetLower() ) );
+ aFooterSize.setHeight( aFooterSize.Height() * 100 / mnScale );
SvxSetItem aNewFooter( rStyleSet.Get(ATTR_PAGE_FOOTERSET) );
aNewFooter.GetItemSet().Put( SvxSizeItem( ATTR_PAGE_SIZE, aFooterSize ) );
rStyleSet.Put( aNewFooter );
@@ -1546,7 +1546,7 @@ void ScPreview::DragMove( long nDragMovePos, PointerStyle nFlags )
if( nDragMovePos != aButtonDownChangePoint.X() )
{
DrawInvert( aButtonDownChangePoint.X(), nFlags );
- aButtonDownChangePoint.X() = nPos;
+ aButtonDownChangePoint.setX( nPos );
DrawInvert( aButtonDownChangePoint.X(), nFlags );
}
}
@@ -1555,7 +1555,7 @@ void ScPreview::DragMove( long nDragMovePos, PointerStyle nFlags )
if( nDragMovePos != aButtonDownChangePoint.Y() )
{
DrawInvert( aButtonDownChangePoint.Y(), nFlags );
- aButtonDownChangePoint.Y() = nPos;
+ aButtonDownChangePoint.setY( nPos );
DrawInvert( aButtonDownChangePoint.Y(), nFlags );
}
}
diff --git a/sc/source/ui/view/prevloc.cxx b/sc/source/ui/view/prevloc.cxx
index 4161242f5ff2..7c58d2134cd3 100644
--- a/sc/source/ui/view/prevloc.cxx
+++ b/sc/source/ui/view/prevloc.cxx
@@ -476,32 +476,32 @@ void ScPreviewLocationData::GetTableInfo( const tools::Rectangle& rVisiblePixel,
bHasRepCols = true;
nRepeatColStart = it->aCellRange.aStart.Col();
nRepeatColEnd = it->aCellRange.aEnd.Col();
- aRepeatRect.Left() = it->aPixelRect.Left();
- aRepeatRect.Right() = it->aPixelRect.Right();
+ aRepeatRect.SetLeft( it->aPixelRect.Left() );
+ aRepeatRect.SetRight( it->aPixelRect.Right() );
}
else
{
bHasMainCols = true;
nMainColStart = it->aCellRange.aStart.Col();
nMainColEnd = it->aCellRange.aEnd.Col();
- aMainRect.Left() = it->aPixelRect.Left();
- aMainRect.Right() = it->aPixelRect.Right();
+ aMainRect.SetLeft( it->aPixelRect.Left() );
+ aMainRect.SetRight( it->aPixelRect.Right() );
}
if ( it->bRepeatRow )
{
bHasRepRows = true;
nRepeatRowStart = it->aCellRange.aStart.Row();
nRepeatRowEnd = it->aCellRange.aEnd.Row();
- aRepeatRect.Top() = it->aPixelRect.Top();
- aRepeatRect.Bottom() = it->aPixelRect.Bottom();
+ aRepeatRect.SetTop( it->aPixelRect.Top() );
+ aRepeatRect.SetBottom( it->aPixelRect.Bottom() );
}
else
{
bHasMainRows = true;
nMainRowStart = it->aCellRange.aStart.Row();
nMainRowEnd = it->aCellRange.aEnd.Row();
- aMainRect.Top() = it->aPixelRect.Top();
- aMainRect.Bottom() = it->aPixelRect.Bottom();
+ aMainRect.SetTop( it->aPixelRect.Top() );
+ aMainRect.SetBottom( it->aPixelRect.Bottom() );
}
nTab = it->aCellRange.aStart.Tab(); //! store separately?
}
@@ -509,15 +509,15 @@ void ScPreviewLocationData::GetTableInfo( const tools::Rectangle& rVisiblePixel,
{
// row headers result in an additional column
bHasHeaderCol = true;
- aHeaderRect.Left() = it->aPixelRect.Left();
- aHeaderRect.Right() = it->aPixelRect.Right();
+ aHeaderRect.SetLeft( it->aPixelRect.Left() );
+ aHeaderRect.SetRight( it->aPixelRect.Right() );
}
else if ( it->eType == SC_PLOC_COLHEADER )
{
// column headers result in an additional row
bHasHeaderRow = true;
- aHeaderRect.Top() = it->aPixelRect.Top();
- aHeaderRect.Bottom() = it->aPixelRect.Bottom();
+ aHeaderRect.SetTop( it->aPixelRect.Top() );
+ aHeaderRect.SetBottom( it->aPixelRect.Bottom() );
}
}
diff --git a/sc/source/ui/view/prevwsh.cxx b/sc/source/ui/view/prevwsh.cxx
index bf6f282aa4e1..c94ed163ce5d 100644
--- a/sc/source/ui/view/prevwsh.cxx
+++ b/sc/source/ui/view/prevwsh.cxx
@@ -246,8 +246,8 @@ bool ScPreviewShell::GetPageSize( Size& aPageSize )
const SfxItemSet* pParamSet = &pStyleSheet->GetItemSet();
aPageSize = pParamSet->Get(ATTR_PAGE_SIZE).GetSize();
- aPageSize.Width() = static_cast<long>(aPageSize.Width() * HMM_PER_TWIPS );
- aPageSize.Height() = static_cast<long>(aPageSize.Height() * HMM_PER_TWIPS );
+ aPageSize.setWidth( static_cast<long>(aPageSize.Width() * HMM_PER_TWIPS ) );
+ aPageSize.setHeight( static_cast<long>(aPageSize.Height() * HMM_PER_TWIPS ) );
return true;
}
@@ -278,13 +278,13 @@ void ScPreviewShell::UpdateNeededScrollBars( bool bFromZoom )
{
if ( bVert )
{
- aWindowPixelSize.Width() += nBarH;
- aWindowSize.Width() += aHeightOffSet;
+ aWindowPixelSize.setWidth( aWindowPixelSize.Width() + nBarH );
+ aWindowSize.setWidth( aWindowSize.Width() + aHeightOffSet );
}
if ( bHori )
{
- aWindowPixelSize.Height() += nBarW;
- aWindowSize.Height() += aWidthOffSet;
+ aWindowPixelSize.setHeight( aWindowPixelSize.Height() + nBarW );
+ aWindowSize.setHeight( aWindowSize.Height() + aWidthOffSet );
}
}
@@ -308,9 +308,9 @@ void ScPreviewShell::UpdateNeededScrollBars( bool bFromZoom )
// make room for needed scrollbars ( and reduce the size
// of the preview appropriately )
if ( bHori )
- aWindowPixelSize.Height() -= nBarW;
+ aWindowPixelSize.setHeight( aWindowPixelSize.Height() - nBarW );
if ( bVert )
- aWindowPixelSize.Width() -= nBarH;
+ aWindowPixelSize.setWidth( aWindowPixelSize.Width() - nBarH );
pPreview->SetSizePixel( aWindowPixelSize );
pHorScroll->SetPosSizePixel( Point( aPos.X(), aPos.Y() + aWindowPixelSize.Height() ),
@@ -344,19 +344,19 @@ void ScPreviewShell::UpdateScrollBars()
if ( nMaxPos<0 )
{
// page smaller than window -> center (but put scrollbar to 0)
- aOfs.X() = 0;
+ aOfs.setX( 0 );
pPreview->SetXOffset( nMaxPos / 2 );
}
else if (aOfs.X() < 0)
{
// page larger than window -> never use negative offset
- aOfs.X() = 0;
+ aOfs.setX( 0 );
pPreview->SetXOffset( 0 );
}
else if (aOfs.X() > nMaxPos)
{
// limit offset to align with right edge of window
- aOfs.X() = nMaxPos;
+ aOfs.setX( nMaxPos );
pPreview->SetXOffset(nMaxPos);
}
pHorScroll->SetThumbPos( aOfs.X() );
@@ -374,7 +374,7 @@ void ScPreviewShell::UpdateScrollBars()
if ( nMaxVertPos < 0 )
{
// page smaller than window -> center (but put scrollbar to 0)
- aOfs.Y() = 0;
+ aOfs.setY( 0 );
pPreview->SetYOffset( nMaxVertPos / 2 );
pVerScroll->SetThumbPos( nPageNo * aWindowSize.Height() );
pVerScroll->SetRange( Range( 0, aWindowSize.Height() * nTotalPages ));
@@ -383,7 +383,7 @@ void ScPreviewShell::UpdateScrollBars()
{
// page larger than window -> never use negative offset
pVerScroll->SetRange( Range( 0, aPageSize.Height() ) );
- aOfs.Y() = 0;
+ aOfs.setY( 0 );
pPreview->SetYOffset( 0 );
pVerScroll->SetThumbPos( aOfs.Y() );
}
@@ -391,7 +391,7 @@ void ScPreviewShell::UpdateScrollBars()
{
// limit offset to align with window bottom
pVerScroll->SetRange( Range( 0, aPageSize.Height() ) );
- aOfs.Y() = nMaxVertPos;
+ aOfs.setY( nMaxVertPos );
pPreview->SetYOffset( nMaxVertPos );
pVerScroll->SetThumbPos( aOfs.Y() );
}
@@ -459,10 +459,10 @@ IMPL_LINK( ScPreviewShell, ScrollHandler, ScrollBar*, pScroll, void )
" / " + OUString::number( nTotalPages );
}
- aRect.Left() = aPos.X() - 8;
- aRect.Top() = aMousePos.Y();
- aRect.Right() = aRect.Left();
- aRect.Bottom() = aRect.Top();
+ aRect.SetLeft( aPos.X() - 8 );
+ aRect.SetTop( aMousePos.Y() );
+ aRect.SetRight( aRect.Left() );
+ aRect.SetBottom( aRect.Top() );
nAlign = QuickHelpFlags::Bottom|QuickHelpFlags::Center;
Help::ShowQuickHelp( pScroll->GetParent(), aRect, aHelpStr, nAlign );
}
@@ -975,8 +975,8 @@ void ScPreviewShell::DoScroll( sal_uInt16 nMode )
long nVLine = pVerScroll->GetLineSize();
long nVPage = pVerScroll->GetPageSize();
- aCurPos.X() = pHorScroll->GetThumbPos();
- aCurPos.Y() = pVerScroll->GetThumbPos();
+ aCurPos.setX( pHorScroll->GetThumbPos() );
+ aCurPos.setY( pVerScroll->GetThumbPos() );
aPrevPos = aCurPos;
long nThumbPos = pVerScroll->GetThumbPos();
@@ -997,7 +997,7 @@ void ScPreviewShell::DoScroll( sal_uInt16 nMode )
}
}
else
- aCurPos.Y() -= nVLine;
+ aCurPos.setY( aCurPos.Y() - nVLine );
break;
case SID_CURSORDOWN:
if( nMaxVertPos<0 )
@@ -1020,13 +1020,13 @@ void ScPreviewShell::DoScroll( sal_uInt16 nMode )
}
}
else
- aCurPos.Y() += nVLine;
+ aCurPos.setY( aCurPos.Y() + nVLine );
break;
case SID_CURSORLEFT:
- aCurPos.X() -= nHLine;
+ aCurPos.setX( aCurPos.X() - nHLine );
break;
case SID_CURSORRIGHT:
- aCurPos.X() += nHLine;
+ aCurPos.setX( aCurPos.X() + nHLine );
break;
case SID_CURSORPAGEUP:
if( nThumbPos==0 || nMaxVertPos<0 )
@@ -1038,11 +1038,11 @@ void ScPreviewShell::DoScroll( sal_uInt16 nMode )
SfxViewFrame* pSfxViewFrame = GetViewFrame();
SfxRequest aSfxRequest( pSfxViewFrame, SID_PREVIEW_PREVIOUS );
Execute( aSfxRequest );
- aCurPos.Y() = nVRange;
+ aCurPos.setY( nVRange );
}
}
else
- aCurPos.Y() -= nVPage;
+ aCurPos.setY( aCurPos.Y() - nVPage );
break;
case SID_CURSORPAGEDOWN:
if( (std::abs(nVPage+nThumbPos-nRangeMax)<10) || nMaxVertPos<0 )
@@ -1061,11 +1061,11 @@ void ScPreviewShell::DoScroll( sal_uInt16 nMode )
SfxViewFrame* pSfxViewFrame = GetViewFrame();
SfxRequest aSfxRequest( pSfxViewFrame, SID_PREVIEW_NEXT );
Execute( aSfxRequest );
- aCurPos.Y() = 0;
+ aCurPos.setY( 0 );
}
}
else
- aCurPos.Y() += nVPage;
+ aCurPos.setY( aCurPos.Y() + nVPage );
break;
case SID_CURSORHOME:
if( nMaxVertPos<0 )
@@ -1081,8 +1081,8 @@ void ScPreviewShell::DoScroll( sal_uInt16 nMode )
}
else
{
- aCurPos.Y() = 0;
- aCurPos.X() = 0;
+ aCurPos.setY( 0 );
+ aCurPos.setX( 0 );
}
break;
case SID_CURSOREND:
@@ -1101,8 +1101,8 @@ void ScPreviewShell::DoScroll( sal_uInt16 nMode )
}
else
{
- aCurPos.Y() = nVRange;
- aCurPos.X() = nHRange;
+ aCurPos.setY( nVRange );
+ aCurPos.setX( nHRange );
}
break;
}
@@ -1110,13 +1110,13 @@ void ScPreviewShell::DoScroll( sal_uInt16 nMode )
// nHRange-nHPage might be negative, that's why we check for < 0 afterwards
if( aCurPos.Y() > (nVRange-nVPage) )
- aCurPos.Y() = (nVRange-nVPage);
+ aCurPos.setY( nVRange-nVPage );
if( aCurPos.Y() < 0 )
- aCurPos.Y() = 0;
+ aCurPos.setY( 0 );
if( aCurPos.X() > (nHRange-nHPage) )
- aCurPos.X() = (nHRange-nHPage);
+ aCurPos.setX( nHRange-nHPage );
if( aCurPos.X() < 0 )
- aCurPos.X() = 0;
+ aCurPos.setX( 0 );
if( nMaxVertPos>=0 )
{
diff --git a/sc/source/ui/view/printfun.cxx b/sc/source/ui/view/printfun.cxx
index 2282d7ec9ebe..d4cd3a898cb2 100644
--- a/sc/source/ui/view/printfun.cxx
+++ b/sc/source/ui/view/printfun.cxx
@@ -1092,17 +1092,17 @@ void ScPrintFunc::InitParam( const ScPrintOptions* pOptions )
Size ScPrintFunc::GetDataSize() const
{
Size aSize = aPageSize;
- aSize.Width() -= nLeftMargin + nRightMargin;
- aSize.Height() -= nTopMargin + nBottomMargin;
- aSize.Height() -= aHdr.nHeight + aFtr.nHeight;
+ aSize.setWidth( aSize.Width() - nLeftMargin + nRightMargin );
+ aSize.setHeight( aSize.Height() - nTopMargin + nBottomMargin );
+ aSize.setHeight( aSize.Height() - aHdr.nHeight + aFtr.nHeight );
return aSize;
}
void ScPrintFunc::GetScaleData( Size& rPhysSize, long& rDocHdr, long& rDocFtr )
{
rPhysSize = aPageSize;
- rPhysSize.Width() -= nLeftMargin + nRightMargin;
- rPhysSize.Height() -= nTopMargin + nBottomMargin;
+ rPhysSize.setWidth( rPhysSize.Width() - nLeftMargin + nRightMargin );
+ rPhysSize.setHeight( rPhysSize.Height() - nTopMargin + nBottomMargin );
rDocHdr = aHdr.nHeight;
rDocFtr = aFtr.nHeight;
@@ -1158,31 +1158,31 @@ static void lcl_DrawGraphic( const SvxBrushItem &rBrush, vcl::RenderContext *pOu
{
case GPOS_LT: aPos = rOrg.TopLeft();
break;
- case GPOS_MT: aPos.Y() = rOrg.Top();
- aPos.X() = rOrg.Left() + rOrg.GetSize().Width()/2 - aGrfSize.Width()/2;
+ case GPOS_MT: aPos.setY( rOrg.Top() );
+ aPos.setX( rOrg.Left() + rOrg.GetSize().Width()/2 - aGrfSize.Width()/2 );
break;
- case GPOS_RT: aPos.Y() = rOrg.Top();
- aPos.X() = rOrg.Right() - aGrfSize.Width();
+ case GPOS_RT: aPos.setY( rOrg.Top() );
+ aPos.setX( rOrg.Right() - aGrfSize.Width() );
break;
- case GPOS_LM: aPos.Y() = rOrg.Top() + rOrg.GetSize().Height()/2 - aGrfSize.Height()/2;
- aPos.X() = rOrg.Left();
+ case GPOS_LM: aPos.setY( rOrg.Top() + rOrg.GetSize().Height()/2 - aGrfSize.Height()/2 );
+ aPos.setX( rOrg.Left() );
break;
- case GPOS_MM: aPos.Y() = rOrg.Top() + rOrg.GetSize().Height()/2 - aGrfSize.Height()/2;
- aPos.X() = rOrg.Left() + rOrg.GetSize().Width()/2 - aGrfSize.Width()/2;
+ case GPOS_MM: aPos.setY( rOrg.Top() + rOrg.GetSize().Height()/2 - aGrfSize.Height()/2 );
+ aPos.setX( rOrg.Left() + rOrg.GetSize().Width()/2 - aGrfSize.Width()/2 );
break;
- case GPOS_RM: aPos.Y() = rOrg.Top() + rOrg.GetSize().Height()/2 - aGrfSize.Height()/2;
- aPos.X() = rOrg.Right() - aGrfSize.Width();
+ case GPOS_RM: aPos.setY( rOrg.Top() + rOrg.GetSize().Height()/2 - aGrfSize.Height()/2 );
+ aPos.setX( rOrg.Right() - aGrfSize.Width() );
break;
- case GPOS_LB: aPos.Y() = rOrg.Bottom() - aGrfSize.Height();
- aPos.X() = rOrg.Left();
+ case GPOS_LB: aPos.setY( rOrg.Bottom() - aGrfSize.Height() );
+ aPos.setX( rOrg.Left() );
break;
- case GPOS_MB: aPos.Y() = rOrg.Bottom() - aGrfSize.Height();
- aPos.X() = rOrg.Left() + rOrg.GetSize().Width()/2 - aGrfSize.Width()/2;
+ case GPOS_MB: aPos.setY( rOrg.Bottom() - aGrfSize.Height() );
+ aPos.setX( rOrg.Left() + rOrg.GetSize().Width()/2 - aGrfSize.Width()/2 );
break;
- case GPOS_RB: aPos.Y() = rOrg.Bottom() - aGrfSize.Height();
- aPos.X() = rOrg.Right() - aGrfSize.Width();
+ case GPOS_RB: aPos.setY( rOrg.Bottom() - aGrfSize.Height() );
+ aPos.setX( rOrg.Right() - aGrfSize.Width() );
break;
case GPOS_AREA:
@@ -1537,12 +1537,12 @@ void ScPrintFunc::LocateArea( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2,
SCCOL nCol;
Point aTwipOffset;
for (nCol=0; nCol<nX1; nCol++)
- aTwipOffset.X() -= pDoc->GetColWidth( nCol, nPrintTab );
- aTwipOffset.Y() -= pDoc->GetRowHeight( 0, nY1-1, nPrintTab );
+ aTwipOffset.setX( aTwipOffset.X() - pDoc->GetColWidth( nCol, nPrintTab ) );
+ aTwipOffset.setY( aTwipOffset.Y() - pDoc->GetRowHeight( 0, nY1-1, nPrintTab ) );
Point aMMOffset( aTwipOffset );
- aMMOffset.X() = static_cast<long>(aMMOffset.X() * HMM_PER_TWIPS);
- aMMOffset.Y() = static_cast<long>(aMMOffset.Y() * HMM_PER_TWIPS);
+ aMMOffset.setX( static_cast<long>(aMMOffset.X() * HMM_PER_TWIPS) );
+ aMMOffset.setY( static_cast<long>(aMMOffset.Y() * HMM_PER_TWIPS) );
aMMOffset += Point( nLogStX, nLogStY );
MapMode aDrawMapMode( MapUnit::Map100thMM, aMMOffset, aLogicMode.GetScaleX(), aLogicMode.GetScaleY() );
@@ -1763,20 +1763,20 @@ void ScPrintFunc::PrintHF( long nPageNo, bool bHeader, long nStartY,
{
long nLeft = lcl_LineTotal( rParam.pBorder->GetLeft() ) + rParam.pBorder->GetDistance(SvxBoxItemLine::LEFT);
long nTop = lcl_LineTotal( rParam.pBorder->GetTop() ) + rParam.pBorder->GetDistance(SvxBoxItemLine::TOP);
- aStart.X() += nLeft;
- aStart.Y() += nTop;
- aPaperSize.Width() -= nLeft + lcl_LineTotal( rParam.pBorder->GetRight() ) + rParam.pBorder->GetDistance(SvxBoxItemLine::RIGHT);
- aPaperSize.Height() -= nTop + lcl_LineTotal( rParam.pBorder->GetBottom() ) + rParam.pBorder->GetDistance(SvxBoxItemLine::BOTTOM);
+ aStart.setX( aStart.X() + nLeft );
+ aStart.setY( aStart.Y() + nTop );
+ aPaperSize.setWidth( aPaperSize.Width() - nLeft + lcl_LineTotal( rParam.pBorder->GetRight() ) + rParam.pBorder->GetDistance(SvxBoxItemLine::RIGHT) );
+ aPaperSize.setHeight( aPaperSize.Height() - nTop + lcl_LineTotal( rParam.pBorder->GetBottom() ) + rParam.pBorder->GetDistance(SvxBoxItemLine::BOTTOM) );
}
if ( rParam.pShadow && rParam.pShadow->GetLocation() != SvxShadowLocation::NONE )
{
long nLeft = rParam.pShadow->CalcShadowSpace(SvxShadowItemSide::LEFT);
long nTop = rParam.pShadow->CalcShadowSpace(SvxShadowItemSide::TOP);
- aStart.X() += nLeft;
- aStart.Y() += nTop;
- aPaperSize.Width() -= nLeft + rParam.pShadow->CalcShadowSpace(SvxShadowItemSide::RIGHT);
- aPaperSize.Height() -= nTop + rParam.pShadow->CalcShadowSpace(SvxShadowItemSide::BOTTOM);
+ aStart.setX( aStart.X() + nLeft );
+ aStart.setY( aStart.Y() + nTop );
+ aPaperSize.setWidth( aPaperSize.Width() - nLeft + rParam.pShadow->CalcShadowSpace(SvxShadowItemSide::RIGHT) );
+ aPaperSize.setHeight( aPaperSize.Height() - nTop + rParam.pShadow->CalcShadowSpace(SvxShadowItemSide::BOTTOM) );
}
aFieldData.nPageNo = nPageNo+aTableParam.nFirstPageNo;
@@ -1809,7 +1809,7 @@ void ScPrintFunc::PrintHF( long nPageNo, bool bHeader, long nStartY,
if (nMaxHeight < rParam.nManHeight-rParam.nDistance)
nMaxHeight = rParam.nManHeight-rParam.nDistance; // configured Minimum
- aBorderSize.Height() = nMaxHeight;
+ aBorderSize.setHeight( nMaxHeight );
}
if ( bDoPrint )
@@ -1836,7 +1836,7 @@ void ScPrintFunc::PrintHF( long nPageNo, bool bHeader, long nStartY,
Point aDraw = aStart;
long nDif = aPaperSize.Height() - static_cast<long>(pEditEngine->GetTextHeight());
if (nDif > 0)
- aDraw.Y() += nDif / 2;
+ aDraw.setY( aDraw.Y() + nDif / 2 );
pEditEngine->Draw( pDev, aDraw );
}
@@ -1850,7 +1850,7 @@ void ScPrintFunc::PrintHF( long nPageNo, bool bHeader, long nStartY,
Point aDraw = aStart;
long nDif = aPaperSize.Height() - static_cast<long>(pEditEngine->GetTextHeight());
if (nDif > 0)
- aDraw.Y() += nDif / 2;
+ aDraw.setY( aDraw.Y() + nDif / 2 );
pEditEngine->Draw( pDev, aDraw );
}
@@ -1864,7 +1864,7 @@ void ScPrintFunc::PrintHF( long nPageNo, bool bHeader, long nStartY,
Point aDraw = aStart;
long nDif = aPaperSize.Height() - static_cast<long>(pEditEngine->GetTextHeight());
if (nDif > 0)
- aDraw.Y() += nDif / 2;
+ aDraw.setY( aDraw.Y() + nDif / 2 );
pEditEngine->Draw( pDev, aDraw );
}
@@ -1897,7 +1897,7 @@ long ScPrintFunc::DoNotes( long nNoteStart, bool bDoPrint, ScPreviewLocationData
Size aDataSize = aPageRect.GetSize();
if ( nMarkLen > aDataSize.Width() / 2 ) // everything much too small?
nMarkLen = aDataSize.Width() / 2; // split the page appropriately
- aDataSize.Width() -= nMarkLen;
+ aDataSize.setWidth( aDataSize.Width() - nMarkLen );
pEditEngine->SetPaperSize( aDataSize );
long nPosX = aPageRect.Left() + nMarkLen;
@@ -1979,13 +1979,13 @@ long ScPrintFunc::PrintNotes( long nPageNo, long nNoteStart, bool bDoPrint, ScPr
tools::Rectangle aTempRect = tools::Rectangle( Point(), aPageSize );
if (IsMirror(nPageNo))
{
- aPageRect.Left() = ( aTempRect.Left() + nRightMargin ) * 100 / nZoom;
- aPageRect.Right() = ( aTempRect.Right() - nLeftMargin ) * 100 / nZoom;
+ aPageRect.SetLeft( ( aTempRect.Left() + nRightMargin ) * 100 / nZoom );
+ aPageRect.SetRight( ( aTempRect.Right() - nLeftMargin ) * 100 / nZoom );
}
else
{
- aPageRect.Left() = ( aTempRect.Left() + nLeftMargin ) * 100 / nZoom;
- aPageRect.Right() = ( aTempRect.Right() - nRightMargin ) * 100 / nZoom;
+ aPageRect.SetLeft( ( aTempRect.Left() + nLeftMargin ) * 100 / nZoom );
+ aPageRect.SetRight( ( aTempRect.Right() - nRightMargin ) * 100 / nZoom );
}
if ( pPrinter && bDoPrint )
@@ -2048,13 +2048,13 @@ void ScPrintFunc::PrintPage( long nPageNo, SCCOL nX1, SCROW nY1, SCCOL nX2, SCRO
tools::Rectangle aTempRect = tools::Rectangle( Point(), aPageSize );
if (IsMirror(nPageNo))
{
- aPageRect.Left() = ( aTempRect.Left() + nRightMargin ) * 100 / nZoom;
- aPageRect.Right() = ( aTempRect.Right() - nLeftMargin ) * 100 / nZoom;
+ aPageRect.SetLeft( ( aTempRect.Left() + nRightMargin ) * 100 / nZoom );
+ aPageRect.SetRight( ( aTempRect.Right() - nLeftMargin ) * 100 / nZoom );
}
else
{
- aPageRect.Left() = ( aTempRect.Left() + nLeftMargin ) * 100 / nZoom;
- aPageRect.Right() = ( aTempRect.Right() - nRightMargin ) * 100 / nZoom;
+ aPageRect.SetLeft( ( aTempRect.Left() + nLeftMargin ) * 100 / nZoom );
+ aPageRect.SetRight( ( aTempRect.Right() - nRightMargin ) * 100 / nZoom );
}
if ( aAreaParam.bRepeatCol )
@@ -2617,8 +2617,8 @@ void ScPrintFunc::ApplyPrintSettings()
// this leads to non WYSIWIG but at least it prints!
// #i21775#
long nTemp = aEnumSize.Width();
- aEnumSize.Width() = aEnumSize.Height();
- aEnumSize.Height() = nTemp;
+ aEnumSize.setWidth( aEnumSize.Height() );
+ aEnumSize.setHeight( nTemp );
}
Paper ePaper = SvxPaperInfo::GetSvxPaper( aEnumSize, MapUnit::MapTwip );
sal_uInt16 nPaperBin = pParamSet->Get(ATTR_PAGE_PAPERBIN).GetValue();
@@ -2936,34 +2936,34 @@ Size ScPrintFunc::GetDocPageSize()
// Calculating Left / Right also in PrintPage
aPageRect = tools::Rectangle( Point(), aPageSize );
- aPageRect.Left() = ( aPageRect.Left() + nLeftMargin ) * 100 / nZoom;
- aPageRect.Right() = ( aPageRect.Right() - nRightMargin ) * 100 / nZoom;
- aPageRect.Top() = ( aPageRect.Top() + nTopMargin ) * 100 / nZoom + aHdr.nHeight;
- aPageRect.Bottom() = ( aPageRect.Bottom() - nBottomMargin ) * 100 / nZoom - aFtr.nHeight;
+ aPageRect.SetLeft( ( aPageRect.Left() + nLeftMargin ) * 100 / nZoom );
+ aPageRect.SetRight( ( aPageRect.Right() - nRightMargin ) * 100 / nZoom );
+ aPageRect.SetTop( ( aPageRect.Top() + nTopMargin ) * 100 / nZoom + aHdr.nHeight );
+ aPageRect.SetBottom( ( aPageRect.Bottom() - nBottomMargin ) * 100 / nZoom - aFtr.nHeight );
Size aDocPageSize = aPageRect.GetSize();
if (aTableParam.bHeaders)
{
- aDocPageSize.Width() -= long(PRINT_HEADER_WIDTH);
- aDocPageSize.Height() -= long(PRINT_HEADER_HEIGHT);
+ aDocPageSize.setWidth( aDocPageSize.Width() - long(PRINT_HEADER_WIDTH) );
+ aDocPageSize.setHeight( aDocPageSize.Height() - long(PRINT_HEADER_HEIGHT) );
}
if (pBorderItem)
{
- aDocPageSize.Width() -= lcl_LineTotal(pBorderItem->GetLeft()) +
+ aDocPageSize.setWidth( aDocPageSize.Width() - lcl_LineTotal(pBorderItem->GetLeft()) +
lcl_LineTotal(pBorderItem->GetRight()) +
pBorderItem->GetDistance(SvxBoxItemLine::LEFT) +
- pBorderItem->GetDistance(SvxBoxItemLine::RIGHT);
- aDocPageSize.Height() -= lcl_LineTotal(pBorderItem->GetTop()) +
+ pBorderItem->GetDistance(SvxBoxItemLine::RIGHT) );
+ aDocPageSize.setHeight( aDocPageSize.Height() - lcl_LineTotal(pBorderItem->GetTop()) +
lcl_LineTotal(pBorderItem->GetBottom()) +
pBorderItem->GetDistance(SvxBoxItemLine::TOP) +
- pBorderItem->GetDistance(SvxBoxItemLine::BOTTOM);
+ pBorderItem->GetDistance(SvxBoxItemLine::BOTTOM) );
}
if (pShadowItem && pShadowItem->GetLocation() != SvxShadowLocation::NONE)
{
- aDocPageSize.Width() -= pShadowItem->CalcShadowSpace(SvxShadowItemSide::LEFT) +
- pShadowItem->CalcShadowSpace(SvxShadowItemSide::RIGHT);
- aDocPageSize.Height() -= pShadowItem->CalcShadowSpace(SvxShadowItemSide::TOP) +
- pShadowItem->CalcShadowSpace(SvxShadowItemSide::BOTTOM);
+ aDocPageSize.setWidth( aDocPageSize.Width() - pShadowItem->CalcShadowSpace(SvxShadowItemSide::LEFT) +
+ pShadowItem->CalcShadowSpace(SvxShadowItemSide::RIGHT) );
+ aDocPageSize.setHeight( aDocPageSize.Height() - pShadowItem->CalcShadowSpace(SvxShadowItemSide::TOP) +
+ pShadowItem->CalcShadowSpace(SvxShadowItemSide::BOTTOM) );
}
return aDocPageSize;
}
diff --git a/sc/source/ui/view/reffact.cxx b/sc/source/ui/view/reffact.cxx
index 2213e91a8df7..5b4a6044a217 100644
--- a/sc/source/ui/view/reffact.cxx
+++ b/sc/source/ui/view/reffact.cxx
@@ -154,10 +154,10 @@ ScSimpleRefDlgWrapper::ScSimpleRefDlgWrapper( vcl::Window* pParentP,
if(pInfo!=nullptr && bScSimpleRefFlag)
{
- pInfo->aPos.X()=nScSimpleRefX;
- pInfo->aPos.Y()=nScSimpleRefY;
- pInfo->aSize.Height()=nScSimpleRefHeight;
- pInfo->aSize.Width()=nScSimpleRefWidth;
+ pInfo->aPos.setX(nScSimpleRefX );
+ pInfo->aPos.setY(nScSimpleRefY );
+ pInfo->aSize.setHeight(nScSimpleRefHeight );
+ pInfo->aSize.setWidth(nScSimpleRefWidth );
}
SetWindow(nullptr);
diff --git a/sc/source/ui/view/select.cxx b/sc/source/ui/view/select.cxx
index a7da3ed68196..3783027f4052 100644
--- a/sc/source/ui/view/select.cxx
+++ b/sc/source/ui/view/select.cxx
@@ -303,9 +303,9 @@ void ScViewFunctionSet::SetCursorAtPoint( const Point& rPointPixel, bool /* bDon
Point aEffPos = rPointPixel;
if ( aEffPos.X() == 0 )
- aEffPos.X() = -1;
+ aEffPos.setX( -1 );
if ( aEffPos.Y() == 0 )
- aEffPos.Y() = -1;
+ aEffPos.setY( -1 );
// Scrolling
Size aWinSize = pEngine->GetWindow()->GetOutputSizePixel();
diff --git a/sc/source/ui/view/tabview.cxx b/sc/source/ui/view/tabview.cxx
index 5ac05cb0841d..97f3f0c735d4 100644
--- a/sc/source/ui/view/tabview.cxx
+++ b/sc/source/ui/view/tabview.cxx
@@ -290,7 +290,7 @@ static void lcl_SetPosSize( vcl::Window& rWindow, const Point& rPos, const Size&
Point aNewPos = rPos;
if ( bLayoutRTL )
{
- aNewPos.X() = nTotalWidth - rPos.X() - rSize.Width();
+ aNewPos.setX( nTotalWidth - rPos.X() - rSize.Width() );
if ( aNewPos == rWindow.GetPosPixel() && rSize.Width() != rWindow.GetSizePixel().Width() )
{
// Document windows are manually painted right-to-left, so they need to
@@ -566,7 +566,7 @@ void ScTabView::DoResize( const Point& rOffset, const Size& rSize, bool bInner )
if( bVScroll )
{
Size aVScrSize = aVScrollBottom->GetSizePixel();
- aVScrSize.Height() -= nBarY;
+ aVScrSize.setHeight( aVScrSize.Height() - nBarY );
aVScrollBottom->SetSizePixel( aVScrSize );
}
}
@@ -882,7 +882,7 @@ void ScTabView::SetTabBarWidth( long nNewWidth )
if ( aSize.Width() != nNewWidth )
{
- aSize.Width() = nNewWidth;
+ aSize.setWidth( nNewWidth );
pTabControl->SetSizePixel( aSize );
}
}
@@ -954,16 +954,16 @@ Point ScTabView::GetGridOffset() const
// Outline-Controls
if (bVOutline && pRowOutline[SC_SPLIT_BOTTOM])
- aPos.X() += pRowOutline[SC_SPLIT_BOTTOM]->GetDepthSize();
+ aPos.setX( aPos.X() + pRowOutline[SC_SPLIT_BOTTOM]->GetDepthSize() );
if (bHOutline && pColOutline[SC_SPLIT_LEFT])
- aPos.Y() += pColOutline[SC_SPLIT_LEFT]->GetDepthSize();
+ aPos.setY( aPos.Y() + pColOutline[SC_SPLIT_LEFT]->GetDepthSize() );
if (bHeaders) // column/row headers
{
if (pRowBar[SC_SPLIT_BOTTOM])
- aPos.X() += pRowBar[SC_SPLIT_BOTTOM]->GetSizePixel().Width();
+ aPos.setX( aPos.X() + pRowBar[SC_SPLIT_BOTTOM]->GetSizePixel().Width() );
if (pColBar[SC_SPLIT_LEFT])
- aPos.Y() += pColBar[SC_SPLIT_LEFT]->GetSizePixel().Height();
+ aPos.setY( aPos.Y() + pColBar[SC_SPLIT_LEFT]->GetSizePixel().Height() );
}
return aPos;
@@ -1067,7 +1067,7 @@ IMPL_LINK( ScTabView, ScrollHdl, ScrollBar*, pScroll, void )
the child position. Need to mirror mouse position before. */
Point aMousePos = pScroll->GetPointerPosPixel();
if( pScroll->IsRTLEnabled() != pScroll->GetParent()->IsRTLEnabled() )
- aMousePos.X() = aSize.Width() - aMousePos.X() - 1;
+ aMousePos.setX( aSize.Width() - aMousePos.X() - 1 );
aMousePos = pScroll->OutputToNormalizedScreenPixel( aMousePos );
// convert top-left position of scrollbar to screen position
@@ -1089,8 +1089,8 @@ IMPL_LINK( ScTabView, ScrollHdl, ScrollBar*, pScroll, void )
aHelpStr = ScGlobal::GetRscString(STR_COLUMN) +
" " + ScColToAlpha(static_cast<SCCOL>(nScrollPos));
- aRect.Left() = aMousePos.X();
- aRect.Top() = aPos.Y() - 4;
+ aRect.SetLeft( aMousePos.X() );
+ aRect.SetTop( aPos.Y() - 4 );
nAlign = QuickHelpFlags::Bottom|QuickHelpFlags::Center;
}
else
@@ -1099,12 +1099,12 @@ IMPL_LINK( ScTabView, ScrollHdl, ScrollBar*, pScroll, void )
" " + OUString::number(nScrollPos + 1);
// show quicktext always inside sheet area
- aRect.Left() = bLayoutRTL ? (aPos.X() + aSize.Width() + 8) : (aPos.X() - 8);
- aRect.Top() = aMousePos.Y();
+ aRect.SetLeft( bLayoutRTL ? (aPos.X() + aSize.Width() + 8) : (aPos.X() - 8) );
+ aRect.SetTop( aMousePos.Y() );
nAlign = (bLayoutRTL ? QuickHelpFlags::Left : QuickHelpFlags::Right) | QuickHelpFlags::VCenter;
}
- aRect.Right() = aRect.Left();
- aRect.Bottom() = aRect.Top();
+ aRect.SetRight( aRect.Left() );
+ aRect.SetBottom( aRect.Top() );
Help::ShowQuickHelp(pScroll->GetParent(), aRect, aHelpStr, nAlign);
}
@@ -1741,13 +1741,13 @@ Point ScTabView::GetChartInsertPos( const Size& rSize, const ScRange& rCellRange
long nDocY = static_cast<long>( static_cast<double>(pDoc->GetRowOffset( MAXROW + 1, nTab )) * HMM_PER_TWIPS );
if ( aVisible.Left() * nLayoutSign > nDocX * nLayoutSign )
- aVisible.Left() = nDocX;
+ aVisible.SetLeft( nDocX );
if ( aVisible.Right() * nLayoutSign > nDocX * nLayoutSign )
- aVisible.Right() = nDocX;
+ aVisible.SetRight( nDocX );
if ( aVisible.Top() > nDocY )
- aVisible.Top() = nDocY;
+ aVisible.SetTop( nDocY );
if ( aVisible.Bottom() > nDocY )
- aVisible.Bottom() = nDocY;
+ aVisible.SetBottom( nDocY );
// get the logic position of the selection
@@ -1770,57 +1770,57 @@ Point ScTabView::GetChartInsertPos( const Size& rSize, const ScRange& rCellRange
bool bPutLeft = bFitLeft && ( bLayoutRTL || !bFitRight );
if ( bPutLeft )
- aInsertPos.X() = aSelection.Left() - nNeededWidth;
+ aInsertPos.setX( aSelection.Left() - nNeededWidth );
else
- aInsertPos.X() = aSelection.Right() + 1;
+ aInsertPos.setX( aSelection.Right() + 1 );
// align with top of selection (is moved again if it doesn't fit)
- aInsertPos.Y() = std::max( aSelection.Top(), aVisible.Top() );
+ aInsertPos.setY( std::max( aSelection.Top(), aVisible.Top() ) );
}
else if ( nTopSpace >= nNeededHeight || nBottomSpace >= nNeededHeight )
{
// second preference: completely above or below the selection
if ( nBottomSpace > nNeededHeight ) // bottom is preferred
- aInsertPos.Y() = aSelection.Bottom() + 1;
+ aInsertPos.setY( aSelection.Bottom() + 1 );
else
- aInsertPos.Y() = aSelection.Top() - nNeededHeight;
+ aInsertPos.setY( aSelection.Top() - nNeededHeight );
// align with (logic) left edge of selection (moved again if it doesn't fit)
if ( bLayoutRTL )
- aInsertPos.X() = std::min( aSelection.Right(), aVisible.Right() ) - nNeededWidth + 1;
+ aInsertPos.setX( std::min( aSelection.Right(), aVisible.Right() ) - nNeededWidth + 1 );
else
- aInsertPos.X() = std::max( aSelection.Left(), aVisible.Left() );
+ aInsertPos.setX( std::max( aSelection.Left(), aVisible.Left() ) );
}
else
{
// place to the (logic) right of the selection and move so it fits
if ( bLayoutRTL )
- aInsertPos.X() = aSelection.Left() - nNeededWidth;
+ aInsertPos.setX( aSelection.Left() - nNeededWidth );
else
- aInsertPos.X() = aSelection.Right() + 1;
- aInsertPos.Y() = std::max( aSelection.Top(), aVisible.Top() );
+ aInsertPos.setX( aSelection.Right() + 1 );
+ aInsertPos.setY( std::max( aSelection.Top(), aVisible.Top() ) );
}
// move the position if the object doesn't fit in the screen
tools::Rectangle aCompareRect( aInsertPos, Size( nNeededWidth, nNeededHeight ) );
if ( aCompareRect.Right() > aVisible.Right() )
- aInsertPos.X() -= aCompareRect.Right() - aVisible.Right();
+ aInsertPos.setX( aInsertPos.X() - aCompareRect.Right() - aVisible.Right() );
if ( aCompareRect.Bottom() > aVisible.Bottom() )
- aInsertPos.Y() -= aCompareRect.Bottom() - aVisible.Bottom();
+ aInsertPos.setY( aInsertPos.Y() - aCompareRect.Bottom() - aVisible.Bottom() );
if ( aInsertPos.X() < aVisible.Left() )
- aInsertPos.X() = aVisible.Left();
+ aInsertPos.setX( aVisible.Left() );
if ( aInsertPos.Y() < aVisible.Top() )
- aInsertPos.Y() = aVisible.Top();
+ aInsertPos.setY( aVisible.Top() );
// nNeededWidth / nNeededHeight includes all borders - move aInsertPos to the
// object position, inside the border
- aInsertPos.X() += nBorder;
- aInsertPos.Y() += nBorder;
+ aInsertPos.setX( aInsertPos.X() + nBorder );
+ aInsertPos.setY( aInsertPos.Y() + nBorder );
}
return aInsertPos;
}
@@ -1860,14 +1860,14 @@ Point ScTabView::GetChartDialogPos( const Size& rDialogSize, const tools::Rectan
{
// first preference: below the chart
- aRet.Y() = aObjAbs.Bottom() + aSpace.Height();
+ aRet.setY( aObjAbs.Bottom() + aSpace.Height() );
bCenterHor = true;
}
else if ( aObjAbs.Top() - aDesktop.Top() >= rDialogSize.Height() + aSpace.Height() )
{
// second preference: above the chart
- aRet.Y() = aObjAbs.Top() - rDialogSize.Height() - aSpace.Height();
+ aRet.setY( aObjAbs.Top() - rDialogSize.Height() - aSpace.Height() );
bCenterHor = true;
}
else
@@ -1880,32 +1880,32 @@ Point ScTabView::GetChartDialogPos( const Size& rDialogSize, const tools::Rectan
// if both fit, prefer right in RTL mode, left otherwise
bool bPutRight = bFitRight && ( bLayoutRTL || !bFitLeft );
if ( bPutRight )
- aRet.X() = aObjAbs.Right() + aSpace.Width();
+ aRet.setX( aObjAbs.Right() + aSpace.Width() );
else
- aRet.X() = aObjAbs.Left() - rDialogSize.Width() - aSpace.Width();
+ aRet.setX( aObjAbs.Left() - rDialogSize.Width() - aSpace.Width() );
// center vertically
- aRet.Y() = aObjAbs.Top() + ( aObjAbs.GetHeight() - rDialogSize.Height() ) / 2;
+ aRet.setY( aObjAbs.Top() + ( aObjAbs.GetHeight() - rDialogSize.Height() ) / 2 );
}
else
{
// doesn't fit on any edge - put at the bottom of the screen
- aRet.Y() = aDesktop.Bottom() - rDialogSize.Height();
+ aRet.setY( aDesktop.Bottom() - rDialogSize.Height() );
bCenterHor = true;
}
}
if ( bCenterHor )
- aRet.X() = aObjAbs.Left() + ( aObjAbs.GetWidth() - rDialogSize.Width() ) / 2;
+ aRet.setX( aObjAbs.Left() + ( aObjAbs.GetWidth() - rDialogSize.Width() ) / 2 );
// limit to screen (centering might lead to invalid positions)
if ( aRet.X() + rDialogSize.Width() - 1 > aDesktop.Right() )
- aRet.X() = aDesktop.Right() - rDialogSize.Width() + 1;
+ aRet.setX( aDesktop.Right() - rDialogSize.Width() + 1 );
if ( aRet.X() < aDesktop.Left() )
- aRet.X() = aDesktop.Left();
+ aRet.setX( aDesktop.Left() );
if ( aRet.Y() + rDialogSize.Height() - 1 > aDesktop.Bottom() )
- aRet.Y() = aDesktop.Bottom() - rDialogSize.Height() + 1;
+ aRet.setY( aDesktop.Bottom() - rDialogSize.Height() + 1 );
if ( aRet.Y() < aDesktop.Top() )
- aRet.Y() = aDesktop.Top();
+ aRet.setY( aDesktop.Top() );
}
return aRet;
@@ -1956,14 +1956,14 @@ void ScTabView::FreezeSplitters( bool bFreeze, SplitMethod eSplitMetod)
if (eOldV != SC_SPLIT_NONE || eOldH != SC_SPLIT_NONE)
{
if ( eOldV != SC_SPLIT_NONE && (eSplitMetod == SC_SPLIT_METHOD_FIRST_ROW || eSplitMetod == SC_SPLIT_METHOD_CURSOR))
- aSplit.Y() = aViewData.GetVSplitPos() - aWinStart.Y();
+ aSplit.setY( aViewData.GetVSplitPos() - aWinStart.Y() );
if ( eOldH != SC_SPLIT_NONE && (eSplitMetod == SC_SPLIT_METHOD_FIRST_COL || eSplitMetod == SC_SPLIT_METHOD_CURSOR))
{
long nSplitPos = aViewData.GetHSplitPos();
if ( bLayoutRTL )
nSplitPos = pFrameWin->GetOutputSizePixel().Width() - nSplitPos - 1;
- aSplit.X() = nSplitPos - aWinStart.X();
+ aSplit.setX( nSplitPos - aWinStart.X() );
}
aViewData.GetPosFromPixel( aSplit.X(), aSplit.Y(), ePos, nPosX, nPosY );
diff --git a/sc/source/ui/view/tabview2.cxx b/sc/source/ui/view/tabview2.cxx
index dbd1f892a45e..a9b4160e0d68 100644
--- a/sc/source/ui/view/tabview2.cxx
+++ b/sc/source/ui/view/tabview2.cxx
@@ -1245,9 +1245,9 @@ sal_uInt16 ScTabView::CalcZoom( SvxZoomType eType, sal_uInt16 nOldZoom )
// for frozen panes, use sum of both parts for calculation
if ( nFixPosX != 0 )
- aWinSize.Width() += GetGridWidth( SC_SPLIT_LEFT );
+ aWinSize.setWidth( aWinSize.Width() + GetGridWidth( SC_SPLIT_LEFT ) );
if ( nFixPosY != 0 )
- aWinSize.Height() += GetGridHeight( SC_SPLIT_TOP );
+ aWinSize.setHeight( aWinSize.Height() + GetGridHeight( SC_SPLIT_TOP ) );
ScDocShell* pDocSh = aViewData.GetDocShell();
double nPPTX = ScGlobal::nScreenPPTX / pDocSh->GetOutputFactor();
@@ -1321,13 +1321,13 @@ sal_uInt16 ScTabView::CalcZoom( SvxZoomType eType, sal_uInt16 nOldZoom )
GetOutputSizePixel().Width();
if ( eHMode == SC_SPLIT_FIX )
{
- aWinSize.Width() += nOtherWidth;
+ aWinSize.setWidth( aWinSize.Width() + nOtherWidth );
for ( SCCOL nCol = aViewData.GetPosX(SC_SPLIT_LEFT);
nCol < aViewData.GetFixPosX(); nCol++ )
- aPageSize.Width() += pDoc->GetColWidth( nCol, nCurTab );
+ aPageSize.setWidth( aPageSize.Width() + pDoc->GetColWidth( nCol, nCurTab ) );
}
else if ( nOtherWidth > aWinSize.Width() )
- aWinSize.Width() = nOtherWidth;
+ aWinSize.setWidth( nOtherWidth );
}
ScSplitMode eVMode = aViewData.GetVSplitMode();
if ( eVMode != SC_SPLIT_NONE && pGridWin[SC_SPLIT_TOPLEFT] )
@@ -1336,13 +1336,13 @@ sal_uInt16 ScTabView::CalcZoom( SvxZoomType eType, sal_uInt16 nOldZoom )
GetOutputSizePixel().Height();
if ( eVMode == SC_SPLIT_FIX )
{
- aWinSize.Height() += nOtherHeight;
- aPageSize.Height() += pDoc->GetRowHeight(
+ aWinSize.setHeight( aWinSize.Height() + nOtherHeight );
+ aPageSize.setHeight( aPageSize.Height() + pDoc->GetRowHeight(
aViewData.GetPosY(SC_SPLIT_TOP),
- aViewData.GetFixPosY()-1, nCurTab);
+ aViewData.GetFixPosY()-1, nCurTab) );
}
else if ( nOtherHeight > aWinSize.Height() )
- aWinSize.Height() = nOtherHeight;
+ aWinSize.setHeight( nOtherHeight );
}
double nPPTX = ScGlobal::nScreenPPTX / aViewData.GetDocShell()->GetOutputFactor();
diff --git a/sc/source/ui/view/tabview3.cxx b/sc/source/ui/view/tabview3.cxx
index b346f3904b27..497b2a8f821c 100644
--- a/sc/source/ui/view/tabview3.cxx
+++ b/sc/source/ui/view/tabview3.cxx
@@ -606,11 +606,11 @@ Point calcHintWindowPosition(
{
// The frame has enough height. Take it.
Point aPos = rCellPos;
- aPos.X() += rCellSize.Width() + nMargin;
+ aPos.setX( aPos.X() + rCellSize.Width() + nMargin );
if (aPos.Y() + rHintWndSize.Height() > rFrameWndSize.Height())
{
// Push the hint window up a bit to make it fit.
- aPos.Y() = rFrameWndSize.Height() - rHintWndSize.Height();
+ aPos.setY( rFrameWndSize.Height() - rHintWndSize.Height() );
}
return aPos;
}
@@ -623,11 +623,11 @@ Point calcHintWindowPosition(
{
// The frame has enough width. Take it.
Point aPos = rCellPos;
- aPos.Y() += rCellSize.Height() + nMargin;
+ aPos.setY( aPos.Y() + rCellSize.Height() + nMargin );
if (aPos.X() + rHintWndSize.Width() > rFrameWndSize.Width())
{
// Move the hint window to the left to make it fit.
- aPos.X() = rFrameWndSize.Width() - rHintWndSize.Width();
+ aPos.setX( rFrameWndSize.Width() - rHintWndSize.Width() );
}
return aPos;
}
@@ -640,11 +640,11 @@ Point calcHintWindowPosition(
{
// The frame is high enough. Take it.
Point aPos = rCellPos;
- aPos.X() -= rHintWndSize.Width() + nMargin;
+ aPos.setX( aPos.X() - rHintWndSize.Width() + nMargin );
if (aPos.Y() + rHintWndSize.Height() > rFrameWndSize.Height())
{
// Push the hint window up a bit to make it fit.
- aPos.Y() = rFrameWndSize.Height() - rHintWndSize.Height();
+ aPos.setY( rFrameWndSize.Height() - rHintWndSize.Height() );
}
return aPos;
}
@@ -657,11 +657,11 @@ Point calcHintWindowPosition(
{
// The frame is wide enough. Take it.
Point aPos = rCellPos;
- aPos.Y() -= rHintWndSize.Height() + nMargin;
+ aPos.setY( aPos.Y() - rHintWndSize.Height() + nMargin );
if (aPos.X() + rHintWndSize.Width() > rFrameWndSize.Width())
{
// Move the hint window to the left to make it fit.
- aPos.X() = rFrameWndSize.Width() - rHintWndSize.Width();
+ aPos.setX( rFrameWndSize.Width() - rHintWndSize.Width() );
}
return aPos;
}
@@ -673,8 +673,8 @@ Point calcHintWindowPosition(
{
// Right margin is good enough.
Point aPos = rCellPos;
- aPos.X() += nMargin + rCellSize.Width();
- aPos.Y() = 0;
+ aPos.setX( aPos.X() + nMargin + rCellSize.Width() );
+ aPos.setY( 0 );
return aPos;
}
@@ -682,8 +682,8 @@ Point calcHintWindowPosition(
{
// Bottom margin is good enough.
Point aPos = rCellPos;
- aPos.Y() += nMargin + rCellSize.Height();
- aPos.X() = 0;
+ aPos.setY( aPos.Y() + nMargin + rCellSize.Height() );
+ aPos.setX( 0 );
return aPos;
}
@@ -691,8 +691,8 @@ Point calcHintWindowPosition(
{
// Left margin is good enough.
Point aPos = rCellPos;
- aPos.X() -= rHintWndSize.Width() + nMargin;
- aPos.Y() = 0;
+ aPos.setX( aPos.X() - rHintWndSize.Width() + nMargin );
+ aPos.setY( 0 );
return aPos;
}
@@ -700,15 +700,15 @@ Point calcHintWindowPosition(
{
// Top margin is good enough.
Point aPos = rCellPos;
- aPos.Y() -= rHintWndSize.Height() + nMargin;
- aPos.X() = 0;
+ aPos.setY( aPos.Y() - rHintWndSize.Height() + nMargin );
+ aPos.setX( 0 );
return aPos;
}
// None of the above. Hopeless. At least try not to cover the current
// cell.
Point aPos = rCellPos;
- aPos.X() += rCellSize.Width();
+ aPos.setX( aPos.X() + rCellSize.Width() );
return aPos;
}
@@ -2317,22 +2317,22 @@ void ScTabView::PaintArea( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCRO
// Remember that wsd expects int and that aEnd.X() is
// in pixels and will be converted in twips, before performing
// the lok callback, so we need to avoid that an overflow occurs.
- aEnd.X() = bLayoutRTL ? 0 : std::numeric_limits<int>::max() / 1000;
+ aEnd.setX( bLayoutRTL ? 0 : std::numeric_limits<int>::max() / 1000 );
}
else
{
- aEnd.X() = bLayoutRTL ? 0 : pGridWin[i]->GetOutputSizePixel().Width();
+ aEnd.setX( bLayoutRTL ? 0 : pGridWin[i]->GetOutputSizePixel().Width() );
}
}
- aEnd.X() -= nLayoutSign;
- aEnd.Y() -= 1;
+ aEnd.setX( aEnd.X() - nLayoutSign );
+ aEnd.setY( aEnd.Y() - 1 );
// #i85232# include area below cells (could be done in GetScrPos?)
if ( eMode == ScUpdateMode::All && nRow2 >= MAXROW && !bIsTiledRendering )
- aEnd.Y() = pGridWin[i]->GetOutputSizePixel().Height();
+ aEnd.setY( pGridWin[i]->GetOutputSizePixel().Height() );
- aStart.X() -= nLayoutSign; // include change marks
- aStart.Y() -= 1;
+ aStart.setX( aStart.X() - nLayoutSign ); // include change marks
+ aStart.setY( aStart.Y() - 1 );
bool bMarkClipped = aViewData.GetOptions().GetOption( VOPT_CLIPMARKS );
if (bMarkClipped)
@@ -2343,7 +2343,7 @@ void ScTabView::PaintArea( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCRO
//! aViewData.GetTabNo(),
//! 0, nRow1, nCol1-1, nRow2 ) )
long nMarkPixel = static_cast<long>( SC_CLIPMARK_SIZE * aViewData.GetPPTX() );
- aStart.X() -= nMarkPixel * nLayoutSign;
+ aStart.setX( aStart.X() - nMarkPixel * nLayoutSign );
}
pGridWin[i]->Invalidate( pGridWin[i]->PixelToLogic( tools::Rectangle( aStart,aEnd ) ) );
diff --git a/sc/source/ui/view/tabview4.cxx b/sc/source/ui/view/tabview4.cxx
index 1fede34f367b..f4f92f4b2c7d 100644
--- a/sc/source/ui/view/tabview4.cxx
+++ b/sc/source/ui/view/tabview4.cxx
@@ -86,7 +86,7 @@ void ScTabView::ShowRefTip()
nEndY+1 == aViewData.GetEditViewRow() )
{
// then align at the upper border of edited cell
- aPos.Y() -= 2; // the three from above
+ aPos.setY( aPos.Y() - 2 ); // the three from above
nFlags = ( nFlags & ~QuickHelpFlags::Top ) | QuickHelpFlags::Bottom;
}
@@ -282,8 +282,8 @@ void ScTabView::UpdateRef( SCCOL nCurX, SCROW nCurY, SCTAB nCurZ )
SCCOL nAddX = ( nEndX >= aMarkRange.aEnd.Col() ) ? 1 : 0;
SCROW nAddY = ( nEndY >= aMarkRange.aEnd.Row() ) ? 1 : 0;
Point aPos = aViewData.GetScrPos( nEndX+nAddX, nEndY+nAddY, aViewData.GetActivePart() );
- aPos.X() += 8;
- aPos.Y() += 4;
+ aPos.setX( aPos.X() + 8 );
+ aPos.setY( aPos.Y() + 4 );
aPos = pWin->OutputToScreenPixel( aPos );
tools::Rectangle aRect( aPos, aPos );
QuickHelpFlags nAlign = QuickHelpFlags::Left|QuickHelpFlags::Top;
diff --git a/sc/source/ui/view/tabview5.cxx b/sc/source/ui/view/tabview5.cxx
index e11c0ffa6352..74058cbb6eb9 100644
--- a/sc/source/ui/view/tabview5.cxx
+++ b/sc/source/ui/view/tabview5.cxx
@@ -667,10 +667,10 @@ void ScTabView::OnLOKNoteStateChanged(const ScPostIt* pNote)
// placed, invalidated.
const int nBorderSize = 200;
tools::Rectangle aInvalidRect = aRect;
- aInvalidRect.Left() -= nBorderSize;
- aInvalidRect.Right() += nBorderSize;
- aInvalidRect.Top() -= nBorderSize;
- aInvalidRect.Bottom() += nBorderSize;
+ aInvalidRect.SetLeft( aInvalidRect.Left() - nBorderSize );
+ aInvalidRect.SetRight( aInvalidRect.Right() + nBorderSize );
+ aInvalidRect.SetTop( aInvalidRect.Top() - nBorderSize );
+ aInvalidRect.SetBottom( aInvalidRect.Bottom() + nBorderSize );
SfxViewShell* pViewShell = SfxViewShell::GetFirst();
while (pViewShell)
diff --git a/sc/source/ui/view/tabvwsh2.cxx b/sc/source/ui/view/tabvwsh2.cxx
index 4655bd7aa371..dfcc14b4838e 100644
--- a/sc/source/ui/view/tabvwsh2.cxx
+++ b/sc/source/ui/view/tabvwsh2.cxx
@@ -321,8 +321,8 @@ void ScTabViewShell::ExecDraw(SfxRequest& rReq)
// calc position and size
tools::Rectangle aVisArea = pWin->PixelToLogic(tools::Rectangle(Point(0,0), pWin->GetOutputSizePixel()));
Point aPagePos = aVisArea.Center();
- aPagePos.X() -= nDefaultObjectSizeWidth / 2;
- aPagePos.Y() -= nDefaultObjectSizeHeight / 2;
+ aPagePos.setX( aPagePos.X() - nDefaultObjectSizeWidth / 2 );
+ aPagePos.setY( aPagePos.Y() - nDefaultObjectSizeHeight / 2 );
tools::Rectangle aNewObjectRectangle(aPagePos, Size(nDefaultObjectSizeWidth, nDefaultObjectSizeHeight));
ScDrawView* pDrView = GetScDrawView();
diff --git a/sc/source/ui/view/tabvwsh4.cxx b/sc/source/ui/view/tabvwsh4.cxx
index 55caac70a18f..c01208394702 100644
--- a/sc/source/ui/view/tabvwsh4.cxx
+++ b/sc/source/ui/view/tabvwsh4.cxx
@@ -348,8 +348,8 @@ void ScTabViewShell::InnerResizePixel( const Point &rOfs, const Size &rSize, boo
Size aObjSize = GetObjectShell()->GetVisArea().GetSize();
Size aSize( rSize );
- aSize.Width() -= (aBorder.Left() + aBorder.Right());
- aSize.Height() -= (aBorder.Top() + aBorder.Bottom());
+ aSize.setWidth( aSize.Width() - (aBorder.Left() + aBorder.Right()) );
+ aSize.setHeight( aSize.Height() - (aBorder.Top() + aBorder.Bottom()) );
if ( aObjSize.Width() > 0 && aObjSize.Height() > 0 )
{
@@ -359,8 +359,8 @@ void ScTabViewShell::InnerResizePixel( const Point &rOfs, const Size &rSize, boo
}
Point aPos( rOfs );
- aPos.X() += aBorder.Left();
- aPos.Y() += aBorder.Top();
+ aPos.setX( aPos.X() + aBorder.Left() );
+ aPos.setY( aPos.Y() + aBorder.Top() );
GetWindow()->SetPosSizePixel( aPos, aSize );
}
else
@@ -368,8 +368,8 @@ void ScTabViewShell::InnerResizePixel( const Point &rOfs, const Size &rSize, boo
SvBorder aBorder;
GetBorderSize( aBorder, rSize );
SetBorderPixel( aBorder );
- aNewSize.Width() += aBorder.Left() + aBorder.Right();
- aNewSize.Height() += aBorder.Top() + aBorder.Bottom();
+ aNewSize.setWidth( aNewSize.Width() + aBorder.Left() + aBorder.Right() );
+ aNewSize.setHeight( aNewSize.Height() + aBorder.Top() + aBorder.Bottom() );
}
DoResize( rOfs, aNewSize, true ); // rSize = size of gridwin
@@ -444,7 +444,7 @@ void ScTabViewShell::QueryObjAreaPixel( tools::Rectangle& rRect ) const
if ( bNegativePage )
{
// use right edge of aLogicRect, and aLogicSize
- aLogicRect.Left() = aLogicRect.Right() - aLogicSize.Width() + 1; // Right() is set below
+ aLogicRect.SetLeft( aLogicRect.Right() - aLogicSize.Width() + 1 ); // Right() is set below
}
aLogicRect.SetSize( aLogicSize );
diff --git a/sc/source/ui/view/tabvwshb.cxx b/sc/source/ui/view/tabvwshb.cxx
index 8d644bb0eeec..5a87843532c5 100644
--- a/sc/source/ui/view/tabvwshb.cxx
+++ b/sc/source/ui/view/tabvwshb.cxx
@@ -435,8 +435,8 @@ void ScTabViewShell::ExecDrawIns(SfxRequest& rReq)
tools::Rectangle aVisArea = pWin->PixelToLogic(tools::Rectangle(Point(0,0), pWin->GetOutputSizePixel()));
Point aObjPos(aVisArea.Center());
Size aObjSize(pNewDBField->GetLogicRect().GetSize());
- aObjPos.X() -= aObjSize.Width() / 2;
- aObjPos.Y() -= aObjSize.Height() / 2;
+ aObjPos.setX( aObjPos.X() - aObjSize.Width() / 2 );
+ aObjPos.setY( aObjPos.Y() - aObjSize.Height() / 2 );
tools::Rectangle aNewObjectRectangle(aObjPos, aObjSize);
pNewDBField->SetLogicRect(aNewObjectRectangle);
diff --git a/sc/source/ui/view/tabvwshg.cxx b/sc/source/ui/view/tabvwshg.cxx
index 538ac000aed4..81eb9c9d6396 100644
--- a/sc/source/ui/view/tabvwshg.cxx
+++ b/sc/source/ui/view/tabvwshg.cxx
@@ -103,7 +103,7 @@ void ScTabViewShell::InsertURLButton( const OUString& rName, const OUString& rUR
Size aSize = GetActiveWin()->PixelToLogic(Size(140, 20));
if ( pDoc->IsNegativePage(nTab) )
- aPos.X() -= aSize.Width();
+ aPos.setX( aPos.X() - aSize.Width() );
pObj->SetLogicRect(tools::Rectangle(aPos, aSize));
diff --git a/sc/source/ui/view/viewdata.cxx b/sc/source/ui/view/viewdata.cxx
index 8d7a3140f4d4..258bd0a90926 100644
--- a/sc/source/ui/view/viewdata.cxx
+++ b/sc/source/ui/view/viewdata.cxx
@@ -1524,7 +1524,7 @@ void ScViewData::SetEditEngine( ScSplitPos eWhich,
// when right-aligned, leave space for the cursor
// in vertical mode, editing is always right-aligned
if ( GetEditAdjust() == SvxAdjust::Right || bAsianVertical )
- aPixRect.Right() += 1;
+ aPixRect.SetRight( aPixRect.Right() + 1 );
tools::Rectangle aOutputArea = pWin->PixelToLogic( aPixRect, GetLogicMode() );
pEditView[eWhich]->SetOutputArea( aOutputArea );
@@ -1591,7 +1591,7 @@ void ScViewData::SetEditEngine( ScSplitPos eWhich,
Fraction aFract(1,1);
tools::Rectangle aUtilRect = ScEditUtil( pDoc,nNewX,nNewY,nTabNo, Point(0,0), pWin,
HMM_PER_TWIPS, HMM_PER_TWIPS, aFract, aFract ).GetEditArea( pPattern, false );
- aPaperSize.Width() = aUtilRect.GetWidth();
+ aPaperSize.setWidth( aUtilRect.GetWidth() );
}
pNewEngine->SetPaperSize( aPaperSize );
@@ -1601,20 +1601,20 @@ void ScViewData::SetEditEngine( ScSplitPos eWhich,
long nDiff = aVis.Right() - aVis.Left();
if ( GetEditAdjust() == SvxAdjust::Right )
{
- aVis.Right() = aPaper.Width() - 1;
+ aVis.SetRight( aPaper.Width() - 1 );
bMoveArea = !bLayoutRTL;
}
else if ( GetEditAdjust() == SvxAdjust::Center )
{
- aVis.Right() = ( aPaper.Width() - 1 + nDiff ) / 2;
+ aVis.SetRight( ( aPaper.Width() - 1 + nDiff ) / 2 );
bMoveArea = true; // always
}
else
{
- aVis.Right() = nDiff;
+ aVis.SetRight( nDiff );
bMoveArea = bLayoutRTL;
}
- aVis.Left() = aVis.Right() - nDiff;
+ aVis.SetLeft( aVis.Right() - nDiff );
// #i49561# Important note:
// The set offset of the visible area of the EditView for centered and
// right alignment in horizontal layout is consider by instances of
@@ -1744,15 +1744,15 @@ void ScViewData::EditGrowX()
nLogicRight = pWin->PixelToLogic(Size(nRightPix,0)).Width();
}
- aArea.Left() -= bLayoutRTL ? nLogicRight : nLogicLeft;
- aArea.Right() += bLayoutRTL ? nLogicLeft : nLogicRight;
+ aArea.SetLeft( aArea.Left() - (bLayoutRTL ? nLogicRight : nLogicLeft) );
+ aArea.SetRight( aArea.Right() + (bLayoutRTL ? nLogicLeft : nLogicRight) );
if ( aArea.Right() > aArea.Left() + aSize.Width() - 1 )
{
long nCenter = ( aArea.Left() + aArea.Right() ) / 2;
long nHalf = aSize.Width() / 2;
- aArea.Left() = nCenter - nHalf + 1;
- aArea.Right() = nCenter + aSize.Width() - nHalf - 1;
+ aArea.SetLeft( nCenter - nHalf + 1 );
+ aArea.SetRight( nCenter + aSize.Width() - nHalf - 1 );
}
bChanged = true;
@@ -1768,16 +1768,16 @@ void ScViewData::EditGrowX()
long nPix = ToPixel( pLocalDoc->GetColWidth( nEditStartCol, nTabNo ), nPPTX );
long nLogicWidth = pWin->PixelToLogic(Size(nPix,0)).Width();
if ( !bLayoutRTL )
- aArea.Left() -= nLogicWidth;
+ aArea.SetLeft( aArea.Left() - nLogicWidth );
else
- aArea.Right() += nLogicWidth;
+ aArea.SetRight( aArea.Right() + nLogicWidth );
if ( aArea.Right() > aArea.Left() + aSize.Width() - 1 )
{
if ( !bLayoutRTL )
- aArea.Left() = aArea.Right() - aSize.Width() + 1;
+ aArea.SetLeft( aArea.Right() - aSize.Width() + 1 );
else
- aArea.Right() = aArea.Left() + aSize.Width() - 1;
+ aArea.SetRight( aArea.Left() + aSize.Width() - 1 );
}
bChanged = true;
@@ -1791,16 +1791,16 @@ void ScViewData::EditGrowX()
long nPix = ToPixel( pLocalDoc->GetColWidth( nEditEndCol, nTabNo ), nPPTX );
long nLogicWidth = pWin->PixelToLogic(Size(nPix,0)).Width();
if ( bLayoutRTL )
- aArea.Left() -= nLogicWidth;
+ aArea.SetLeft( aArea.Left() - nLogicWidth );
else
- aArea.Right() += nLogicWidth;
+ aArea.SetRight( aArea.Right() + nLogicWidth );
if ( aArea.Right() > aArea.Left() + aSize.Width() - 1 )
{
if ( bLayoutRTL )
- aArea.Left() = aArea.Right() - aSize.Width() + 1;
+ aArea.SetLeft( aArea.Right() - aSize.Width() + 1 );
else
- aArea.Right() = aArea.Left() + aSize.Width() - 1;
+ aArea.SetRight( aArea.Left() + aSize.Width() - 1 );
}
bChanged = true;
@@ -1821,8 +1821,8 @@ void ScViewData::EditGrowX()
long nCenter = aSize.Width() / 2;
long nVisSize = aArea.GetWidth();
- aVis.Left() = nCenter - nVisSize / 2;
- aVis.Right() = aVis.Left() + nVisSize - 1;
+ aVis.SetLeft( nCenter - nVisSize / 2 );
+ aVis.SetRight( aVis.Left() + nVisSize - 1 );
}
else if ( bGrowToLeft )
{
@@ -1830,8 +1830,8 @@ void ScViewData::EditGrowX()
pEngine->SetDefaultItem( SvxAdjustItem( SvxAdjust::Right, EE_PARA_JUST ) );
- aVis.Right() = aSize.Width() - 1;
- aVis.Left() = aSize.Width() - aArea.GetWidth(); // with the new, increased area
+ aVis.SetRight( aSize.Width() - 1 );
+ aVis.SetLeft( aSize.Width() - aArea.GetWidth() ); // with the new, increased area
}
else
{
@@ -1840,8 +1840,8 @@ void ScViewData::EditGrowX()
pEngine->SetDefaultItem( SvxAdjustItem( SvxAdjust::Left, EE_PARA_JUST ) );
long nMove = aVis.Left();
- aVis.Left() = 0;
- aVis.Right() -= nMove;
+ aVis.SetLeft( 0 );
+ aVis.SetRight( aVis.Right() - nMove );
}
pCurView->SetVisArea( aVis );
bMoveArea = false;
@@ -1855,11 +1855,11 @@ void ScViewData::EditGrowX()
// the whole text will move, and may not even obscure all of the original display.
if ( bUnevenGrow )
{
- aArea.Left() = pWin->PixelToLogic( Point(0,0) ).X();
- aArea.Right() = pWin->PixelToLogic( aScrSize ).Width();
+ aArea.SetLeft( pWin->PixelToLogic( Point(0,0) ).X() );
+ aArea.SetRight( pWin->PixelToLogic( aScrSize ).Width() );
}
else if ( !bAsianVertical && !bGrowToLeft && !bGrowCentered )
- aArea.Left() = nOldRight;
+ aArea.SetLeft( nOldRight );
pWin->Invalidate(aArea);
// invalidate other views
@@ -1925,11 +1925,11 @@ void ScViewData::EditGrowY( bool bInitial )
++nEditEndRow;
ScDocument* pLocalDoc = GetDocument();
long nPix = ToPixel( pLocalDoc->GetRowHeight( nEditEndRow, nTabNo ), nPPTY );
- aArea.Bottom() += pWin->PixelToLogic(Size(0,nPix)).Height();
+ aArea.SetBottom( aArea.Bottom() + pWin->PixelToLogic(Size(0,nPix)).Height() );
if ( aArea.Bottom() > aArea.Top() + aSize.Height() - 1 )
{
- aArea.Bottom() = aArea.Top() + aSize.Height() - 1;
+ aArea.SetBottom( aArea.Top() + aSize.Height() - 1 );
bMaxReached = true; // don't occupy more cells beyond paper size
}
@@ -1947,7 +1947,7 @@ void ScViewData::EditGrowY( bool bInitial )
pCurView->SetControlWord( nControl | EVControlBits::AUTOSCROLL );
}
- aArea.Top() = nOldBottom;
+ aArea.SetTop( nOldBottom );
pWin->Invalidate(aArea);
// invalidate other views
@@ -2111,8 +2111,8 @@ Point ScViewData::GetScrPos( SCCOL nWhereX, SCROW nWhereY, ScSplitPos eWhich,
if (pView)
{
- const_cast<ScViewData*>(this)->aScrSize.Width() = pView->GetGridWidth(eWhichX);
- const_cast<ScViewData*>(this)->aScrSize.Height() = pView->GetGridHeight(eWhichY);
+ const_cast<ScViewData*>(this)->aScrSize.setWidth( pView->GetGridWidth(eWhichX) );
+ const_cast<ScViewData*>(this)->aScrSize.setHeight( pView->GetGridHeight(eWhichY) );
}
sal_uInt16 nTSize;
@@ -2237,7 +2237,7 @@ SCCOL ScViewData::CellsAtX( SCCOL nPosX, SCCOL nDir, ScHSplitPos eWhichX, sal_uI
OSL_ENSURE( nDir==1 || nDir==-1, "wrong CellsAt call" );
if (pView)
- const_cast<ScViewData*>(this)->aScrSize.Width() = pView->GetGridWidth(eWhichX);
+ const_cast<ScViewData*>(this)->aScrSize.setWidth( pView->GetGridWidth(eWhichX) );
SCCOL nX;
sal_uInt16 nScrPosX = 0;
@@ -2279,7 +2279,7 @@ SCROW ScViewData::CellsAtY( SCROW nPosY, SCROW nDir, ScVSplitPos eWhichY, sal_uI
OSL_ENSURE( nDir==1 || nDir==-1, "wrong CellsAt call" );
if (pView)
- const_cast<ScViewData*>(this)->aScrSize.Height() = pView->GetGridHeight(eWhichY);
+ const_cast<ScViewData*>(this)->aScrSize.setHeight( pView->GetGridHeight(eWhichY) );
if (nScrSizeY == SC_SIZE_NONE) nScrSizeY = static_cast<sal_uInt16>(aScrSize.Height());
@@ -2382,7 +2382,7 @@ void ScViewData::GetPosFromPixel( long nClickX, long nClickY, ScSplitPos eWhich,
{
// mirror horizontal position
if (pView)
- aScrSize.Width() = pView->GetGridWidth(eHWhich);
+ aScrSize.setWidth( pView->GetGridWidth(eHWhich) );
nClickX = aScrSize.Width() - 1 - nClickX;
}
@@ -2427,14 +2427,14 @@ void ScViewData::GetPosFromPixel( long nClickX, long nClickY, ScSplitPos eWhich,
if ( rPosX == nStartPosX && nClickX > 0 )
{
if (pView)
- aScrSize.Width() = pView->GetGridWidth(eHWhich);
+ aScrSize.setWidth( pView->GetGridWidth(eHWhich) );
if ( nClickX > aScrSize.Width() )
++rPosX;
}
if ( rPosY == nStartPosY && nClickY > 0 )
{
if (pView)
- aScrSize.Height() = pView->GetGridHeight(eVWhich);
+ aScrSize.setHeight( pView->GetGridHeight(eVWhich) );
if ( nClickY > aScrSize.Height() )
++rPosY;
}
@@ -2691,8 +2691,8 @@ void ScViewData::SetScreen( const tools::Rectangle& rVisArea )
// here without GetOutputFactor(), since it's for the output into a Metafile
aScrSize = rVisArea.GetSize();
- aScrSize.Width() = static_cast<long>( aScrSize.Width() * ScGlobal::nScreenPPTX / HMM_PER_TWIPS );
- aScrSize.Height() = static_cast<long>( aScrSize.Height() * ScGlobal::nScreenPPTY / HMM_PER_TWIPS );
+ aScrSize.setWidth( static_cast<long>( aScrSize.Width() * ScGlobal::nScreenPPTX / HMM_PER_TWIPS ) );
+ aScrSize.setHeight( static_cast<long>( aScrSize.Height() * ScGlobal::nScreenPPTY / HMM_PER_TWIPS ) );
}
ScDocFunc& ScViewData::GetDocFunc() const
@@ -2767,8 +2767,8 @@ void ScViewData::UpdateScreenZoom( const Fraction& rNewX, const Fraction& rNewY
aHeight *= Fraction( aScrSize.Height(),1 );
aHeight /= aOldY;
- aScrSize.Width() = static_cast<long>(aWidth);
- aScrSize.Height() = static_cast<long>(aHeight);
+ aScrSize.setWidth( static_cast<long>(aWidth) );
+ aScrSize.setHeight( static_cast<long>(aHeight) );
}
void ScViewData::CalcPPT()
@@ -3031,7 +3031,7 @@ void ScViewData::WriteExtOptions( ScExtDocOptions& rDocOpt ) const
rSplitPos = Point( bHSplit ? pViewTab->nHSplitPos : 0, bVSplit ? pViewTab->nVSplitPos : 0 );
rSplitPos = Application::GetDefaultDevice()->PixelToLogic( rSplitPos, MapMode( MapUnit::MapTwip ) );
if( pDocShell )
- rSplitPos.X() = static_cast<long>(static_cast<double>(rSplitPos.X()) / pDocShell->GetOutputFactor());
+ rSplitPos.setX( static_cast<long>(static_cast<double>(rSplitPos.X()) / pDocShell->GetOutputFactor()) );
}
else if( bFrozen )
{
@@ -3171,7 +3171,7 @@ void ScViewData::ReadExtOptions( const ScExtDocOptions& rDocOpt )
if( pDocShell && SC_MOD()->GetInputOptions().GetTextWysiwyg())
{
double nFactor = pDocShell->GetOutputFactor();
- aPixel.X() = static_cast<long>( aPixel.X() * nFactor + 0.5 );
+ aPixel.setX( static_cast<long>( aPixel.X() * nFactor + 0.5 ) );
}
bHSplit = bHSplit && aPixel.X() > 0;
diff --git a/sc/source/ui/view/viewfun5.cxx b/sc/source/ui/view/viewfun5.cxx
index 3f4db0cfba59..3f9489c57950 100644
--- a/sc/source/ui/view/viewfun5.cxx
+++ b/sc/source/ui/view/viewfun5.cxx
@@ -428,10 +428,10 @@ bool ScViewFunc::PasteDataFormat( SotClipboardFormatId nFormatId,
{
Point aInsPos = aPos;
tools::Rectangle aRect(pObj->GetLogicRect());
- aInsPos.X() -= aRect.GetSize().Width() / 2;
- aInsPos.Y() -= aRect.GetSize().Height() / 2;
- if ( aInsPos.X() < 0 ) aInsPos.X() = 0;
- if ( aInsPos.Y() < 0 ) aInsPos.Y() = 0;
+ aInsPos.setX( aInsPos.X() - aRect.GetSize().Width() / 2 );
+ aInsPos.setY( aInsPos.Y() - aRect.GetSize().Height() / 2 );
+ if ( aInsPos.X() < 0 ) aInsPos.setX( 0 );
+ if ( aInsPos.Y() < 0 ) aInsPos.setY( 0 );
aRect.SetPos(aInsPos);
pObj->SetLogicRect(aRect);
@@ -607,8 +607,8 @@ bool ScViewFunc::PasteDataFormat( SotClipboardFormatId nFormatId,
PasteFile( aPos, aFile, bLink );
- aPos.X() += 400;
- aPos.Y() += 400;
+ aPos.setX( aPos.X() + 400 );
+ aPos.setY( aPos.Y() + 400 );
}
bRet = true;
}
diff --git a/sc/source/ui/view/viewfun7.cxx b/sc/source/ui/view/viewfun7.cxx
index af02d1adc969..bf50a0739c87 100644
--- a/sc/source/ui/view/viewfun7.cxx
+++ b/sc/source/ui/view/viewfun7.cxx
@@ -59,16 +59,16 @@ static void lcl_AdjustInsertPos( ScViewData* pData, Point& rPos, Size& rSize )
OSL_ENSURE(pPage,"pPage ???");
Size aPgSize( pPage->GetSize() );
if (aPgSize.Width() < 0)
- aPgSize.Width() = -aPgSize.Width();
+ aPgSize.setWidth( -aPgSize.Width() );
long x = aPgSize.Width() - rPos.X() - rSize.Width();
long y = aPgSize.Height() - rPos.Y() - rSize.Height();
// if necessary: adjustments (80/200) for pixel approx. errors
if( x < 0 )
- rPos.X() += x + 80;
+ rPos.setX( rPos.X() + x + 80 );
if( y < 0 )
- rPos.Y() += y + 200;
- rPos.X() += rSize.Width() / 2; // position at paste is center
- rPos.Y() += rSize.Height() / 2;
+ rPos.setY( rPos.Y() + y + 200 );
+ rPos.setX( rPos.X() + rSize.Width() / 2 ); // position at paste is center
+ rPos.setY( rPos.Y() + rSize.Height() / 2 );
}
void ScViewFunc::PasteDraw( const Point& rLogicPos, SdrModel* pModel,
@@ -102,13 +102,13 @@ void ScViewFunc::PasteDraw( const Point& rLogicPos, SdrModel* pModel,
aPos -= aDragStartDiff;
if ( bNegativePage )
{
- if (aPos.X() > 0) aPos.X() = 0;
+ if (aPos.X() > 0) aPos.setX( 0 );
}
else
{
- if (aPos.X() < 0) aPos.X() = 0;
+ if (aPos.X() < 0) aPos.setX( 0 );
}
- if (aPos.Y() < 0) aPos.Y() = 0;
+ if (aPos.Y() < 0) aPos.setY( 0 );
}
ScDrawView* pScDrawView = GetScDrawView();
@@ -335,8 +335,8 @@ bool ScViewFunc::PasteObject( const Point& rPos, const uno::Reference < embed::X
if( aSize.Height() == 0 || aSize.Width() == 0 )
{
OSL_FAIL("SvObjectDescriptor::GetSize == 0");
- aSize.Width() = 5000;
- aSize.Height() = 5000;
+ aSize.setWidth( 5000 );
+ aSize.setHeight( 5000 );
aSize = OutputDevice::LogicToLogic(aSize, MapMode(aMap100), MapMode(aMapObj));
aSz.Width = aSize.Width();
aSz.Height = aSize.Height();
@@ -347,7 +347,7 @@ bool ScViewFunc::PasteObject( const Point& rPos, const uno::Reference < embed::X
// don't call AdjustInsertPos
Point aInsPos = rPos;
if ( GetViewData().GetDocument()->IsNegativePage( GetViewData().GetTabNo() ) )
- aInsPos.X() -= aSize.Width();
+ aInsPos.setX( aInsPos.X() - aSize.Width() );
tools::Rectangle aRect( aInsPos, aSize );
ScDrawView* pDrView = GetScDrawView();
@@ -426,7 +426,7 @@ bool ScViewFunc::PasteGraphic( const Point& rPos, const Graphic& rGraphic,
Size aSize = pWin->LogicToLogic( rGraphic.GetPrefSize(), &aSourceMap, &aDestMap );
if ( GetViewData().GetDocument()->IsNegativePage( GetViewData().GetTabNo() ) )
- aPos.X() -= aSize.Width();
+ aPos.setX( aPos.X() - aSize.Width() );
GetViewData().GetViewShell()->SetDrawShell( true );
tools::Rectangle aRect(aPos, aSize);