summaryrefslogtreecommitdiff
path: root/sc/source/ui/view
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/source/ui/view
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/source/ui/view')
-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
31 files changed, 598 insertions, 596 deletions
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);