summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--filter/source/flash/swfwriter1.cxx4
-rw-r--r--filter/source/graphicfilter/eps/eps.cxx6
-rw-r--r--filter/source/graphicfilter/ios2met/ios2met.cxx4
-rw-r--r--filter/source/msfilter/escherex.cxx4
-rw-r--r--filter/source/msfilter/eschesdo.cxx12
-rw-r--r--filter/source/msfilter/msdffimp.cxx16
-rw-r--r--filter/source/msfilter/svdfppt.cxx14
-rw-r--r--filter/source/svg/svgwriter.cxx11
-rw-r--r--forms/source/richtext/richtextimplcontrol.cxx12
-rw-r--r--forms/source/solar/control/navtoolbar.cxx2
-rw-r--r--formula/source/ui/dlg/structpg.cxx2
-rw-r--r--fpicker/source/office/PlacesListBox.cxx2
-rw-r--r--fpicker/source/office/RemoteFilesDialog.cxx2
-rw-r--r--fpicker/source/office/iodlg.cxx2
-rw-r--r--framework/source/layoutmanager/layoutmanager.cxx2
-rw-r--r--framework/source/layoutmanager/toolbarlayoutmanager.cxx8
16 files changed, 51 insertions, 52 deletions
diff --git a/filter/source/flash/swfwriter1.cxx b/filter/source/flash/swfwriter1.cxx
index 4b627d50e4bc..90464d195b25 100644
--- a/filter/source/flash/swfwriter1.cxx
+++ b/filter/source/flash/swfwriter1.cxx
@@ -550,11 +550,11 @@ void Writer::Impl_writeText( const Point& rPos, const OUString& rText, const lon
switch( aOldFont.GetAlignment() )
{
case ALIGN_TOP:
- aBaseLinePos.setY( aBaseLinePos.Y() + aMetric.GetAscent() );
+ aBaseLinePos.AdjustY(aMetric.GetAscent() );
break;
case ALIGN_BOTTOM:
- aBaseLinePos.setY( aBaseLinePos.Y() - aMetric.GetDescent() );
+ aBaseLinePos.AdjustY( -(aMetric.GetDescent()) );
break;
default:
diff --git a/filter/source/graphicfilter/eps/eps.cxx b/filter/source/graphicfilter/eps/eps.cxx
index 20497d5c71a6..4a47345a14b5 100644
--- a/filter/source/graphicfilter/eps/eps.cxx
+++ b/filter/source/graphicfilter/eps/eps.cxx
@@ -1140,7 +1140,7 @@ void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev )
MapMode aMapMode( aSubstitute.GetPrefMapMode() );
Size aOutSize( OutputDevice::LogicToLogic( aSize, rVDev.GetMapMode(), aMapMode ) );
Point aOrigin( OutputDevice::LogicToLogic( aPoint, rVDev.GetMapMode(), aMapMode ) );
- aOrigin.setY( aOrigin.Y() + aOutSize.Height() );
+ aOrigin.AdjustY(aOutSize.Height() );
aMapMode.SetOrigin( aOrigin );
aMapMode.SetScaleX( Fraction(aOutSize.Width() / ( nBoundingBox[ 2 ] - nBoundingBox[ 0 ] )) );
aMapMode.SetScaleY( Fraction(aOutSize.Height() / ( nBoundingBox[ 3 ] - nBoundingBox[ 1 ] )) );
@@ -2083,9 +2083,9 @@ void PSWriter::ImplSetAttrForText( const Point& rPoint )
if ( eTextAlign != ALIGN_BASELINE )
{ // PostScript does not know about FontAlignment
if ( eTextAlign == ALIGN_TOP ) // -> so I assume that
- aPoint.setY( aPoint.Y() + ( aSize.Height() * 4 / 5 ) ); // the area under the baseline
+ aPoint.AdjustY( aSize.Height() * 4 / 5 ); // the area under the baseline
else if ( eTextAlign == ALIGN_BOTTOM ) // is about 20% of the font size
- aPoint.setY( aPoint.Y() - ( aSize.Height() / 5 ) );
+ aPoint.AdjustY( -( aSize.Height() / 5 ) );
}
ImplMoveTo( aPoint );
if ( nRotation )
diff --git a/filter/source/graphicfilter/ios2met/ios2met.cxx b/filter/source/graphicfilter/ios2met/ios2met.cxx
index 3cd9cdbeddbc..7a1255ba2d98 100644
--- a/filter/source/graphicfilter/ios2met/ios2met.cxx
+++ b/filter/source/graphicfilter/ios2met/ios2met.cxx
@@ -894,8 +894,8 @@ void OS2METReader::ReadRelLine(bool bGivenPos, sal_uInt16 nOrderLen)
tools::Polygon aPolygon(nPolySize);
for (i=0; i<nPolySize; i++) {
sal_Int8 nsignedbyte;
- pOS2MET->ReadSChar( nsignedbyte ); aP0.setX( aP0.X() + static_cast<sal_Int32>(nsignedbyte) );
- pOS2MET->ReadSChar( nsignedbyte ); aP0.setY( aP0.Y() - static_cast<sal_Int32>(nsignedbyte) );
+ pOS2MET->ReadSChar( nsignedbyte ); aP0.X()+=static_cast<sal_Int32>(nsignedbyte);
+ pOS2MET->ReadSChar( nsignedbyte ); aP0.Y()-=static_cast<sal_Int32>(nsignedbyte);
aCalcBndRect.Union(tools::Rectangle(aP0,Size(1,1)));
aPolygon.SetPoint(aP0,i);
}
diff --git a/filter/source/msfilter/escherex.cxx b/filter/source/msfilter/escherex.cxx
index b710b53af3e2..8d4b055f6a24 100644
--- a/filter/source/msfilter/escherex.cxx
+++ b/filter/source/msfilter/escherex.cxx
@@ -2020,8 +2020,8 @@ bool EscherPropertyContainer::CreatePolygonProperties(
for (sal_uInt16 i = 0; i < nPoints; ++i) // write points from polygon to buffer
{
Point aPoint = aPolygon[ i ];
- aPoint.setX( aPoint.X() - rGeoRect.X );
- aPoint.setY( aPoint.Y() - rGeoRect.Y );
+ aPoint.AdjustX( -(rGeoRect.X) );
+ aPoint.AdjustY( -(rGeoRect.Y) );
*pPtr++ = static_cast<sal_uInt8>( aPoint.X() );
*pPtr++ = static_cast<sal_uInt8>( aPoint.X() >> 8 );
diff --git a/filter/source/msfilter/eschesdo.cxx b/filter/source/msfilter/eschesdo.cxx
index 30288d914e4c..1fb1f5a91472 100644
--- a/filter/source/msfilter/eschesdo.cxx
+++ b/filter/source/msfilter/eschesdo.cxx
@@ -88,9 +88,9 @@ Size ImplEESdrWriter::ImplMapSize( const Size& rSize )
Size aRetSize( OutputDevice::LogicToLogic( rSize, maMapModeSrc, maMapModeDest ) );
if ( !aRetSize.Width() )
- aRetSize.setWidth( ++aRetSize.Width() );
+ aRetSize.AdjustWidth( 1 );
if ( !aRetSize.Height() )
- aRetSize.setHeight( ++aRetSize.Height() );
+ aRetSize.AdjustHeight( 1 );
return aRetSize;
}
@@ -378,10 +378,10 @@ sal_uInt32 ImplEESdrWriter::ImplWriteShape( ImplEESdrObject& rObj,
const tools::Rectangle& rRect = aRect100thmm;
aCenter.setX( rRect.Left() + ( rRect.GetWidth() / 2 ) );
aCenter.setY( rRect.Top() + ( rRect.GetHeight() / 2 ) );
- aStart.setX( aStart.X() + aCenter.X() );
- aStart.setY( aStart.Y() + aCenter.Y() );
- aEnd.setX( aEnd.X() + aCenter.X() );
- aEnd.setY( aEnd.Y() + aCenter.Y() );
+ aStart.AdjustX(aCenter.X() );
+ aStart.AdjustY(aCenter.Y() );
+ aEnd.AdjustX(aCenter.X() );
+ aEnd.AdjustY(aCenter.Y() );
tools::Polygon aPolygon( rRect, aStart, aEnd, ePolyKind );
if( rObj.GetAngle() )
{
diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx
index dbe93bf2a624..1f112475f331 100644
--- a/filter/source/msfilter/msdffimp.cxx
+++ b/filter/source/msfilter/msdffimp.cxx
@@ -3108,8 +3108,8 @@ void SvxMSDffManager::Scale( sal_Int32& rVal ) const
void SvxMSDffManager::Scale( Point& rPos ) const
{
- rPos.setX( rPos.X() + nMapXOfs );
- rPos.setY( rPos.Y() + nMapYOfs );
+ rPos.AdjustX(nMapXOfs );
+ rPos.AdjustY(nMapYOfs );
if ( bNeedMap )
{
rPos.setX( BigMulDiv( rPos.X(), nMapMul, nMapDiv ) );
@@ -4624,8 +4624,8 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r
Point aP( aObjData.aBoundRect.Center() );
Size aS( aObjData.aBoundRect.GetSize() );
- aP.setX( aP.X() - aS.Width() / 2 );
- aP.setY( aP.Y() - aS.Height() / 2 );
+ aP.AdjustX( -(aS.Width() / 2) );
+ aP.AdjustY( -(aS.Height() / 2) );
tools::Rectangle aLogicRect( aP, aS );
fYOfs = fXOfs = 0.0;
@@ -5246,8 +5246,8 @@ SdrObject* SvxMSDffManager::ProcessObj(SvStream& rSt,
// the vertical paragraph indents are part of the BoundRect,
// here we 'remove' them by calculating
tools::Rectangle aNewRect(rTextRect);
- aNewRect.SetBottom( aNewRect.Bottom() - nTextTop + nTextBottom );
- aNewRect.SetRight( aNewRect.Right() - nTextLeft + nTextRight );
+ aNewRect.AdjustBottom( -(nTextTop + nTextBottom) );
+ aNewRect.AdjustRight( -(nTextLeft + nTextRight) );
// Only if it's a simple textbox may Writer replace
// the object with a frame, otherwise
@@ -5379,8 +5379,8 @@ SdrObject* SvxMSDffManager::ProcessObj(SvStream& rSt,
rTextRect.GetWidth() : rTextRect.GetHeight();
nMinWH /= 2;
Point aPivot(rTextRect.TopLeft());
- aPivot.setX( aPivot.X() + nMinWH );
- aPivot.setY( aPivot.Y() + nMinWH );
+ aPivot.AdjustX(nMinWH );
+ aPivot.AdjustY(nMinWH );
double a = nTextRotationAngle * nPi180;
pTextObj->NbcRotate(aPivot, nTextRotationAngle, sin(a), cos(a));
}
diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx
index b8e4da7c50ea..28401d7cc4e6 100644
--- a/filter/source/msfilter/svdfppt.cxx
+++ b/filter/source/msfilter/svdfppt.cxx
@@ -1143,8 +1143,8 @@ SdrObject* SdrEscherImport::ProcessObj( SvStream& rSt, DffObjData& rObjData, voi
if ( eTVA == SDRTEXTVERTADJUST_BLOCK )
{
Size aTextSize( pText->GetTextSize() );
- aTextSize.setWidth( aTextSize.Width() + nTextLeft + nTextRight );
- aTextSize.setHeight( aTextSize.Height() + nTextTop + nTextBottom );
+ aTextSize.AdjustWidth(nTextLeft + nTextRight );
+ aTextSize.AdjustHeight(nTextTop + nTextBottom );
if ( rTextRect.GetHeight() < aTextSize.Height() )
pTObj->SetMergedItem( SdrTextVertAdjustItem( SDRTEXTVERTADJUST_CENTER ) );
}
@@ -1154,8 +1154,8 @@ SdrObject* SdrEscherImport::ProcessObj( SvStream& rSt, DffObjData& rObjData, voi
if ( eTHA == SDRTEXTHORZADJUST_BLOCK )
{
Size aTextSize( pText->GetTextSize() );
- aTextSize.setWidth( aTextSize.Width() + nTextLeft + nTextRight );
- aTextSize.setHeight( aTextSize.Height() + nTextTop + nTextBottom );
+ aTextSize.AdjustWidth(nTextLeft + nTextRight );
+ aTextSize.AdjustHeight(nTextTop + nTextBottom );
if ( rTextRect.GetWidth() < aTextSize.Width() )
pTObj->SetMergedItem( SdrTextHorzAdjustItem( SDRTEXTHORZADJUST_CENTER ) );
}
@@ -2503,8 +2503,8 @@ Size SdrPowerPointImport::GetPageSize() const
aRet.setWidth( BigMulDiv( aRet.Width(), nInchMul, nInchDiv ) );
aRet.setHeight( BigMulDiv( aRet.Height(), nInchMul, nInchDiv ) );
}
- aRet.setWidth( aRet.Width() + 5 ); aRet.setWidth( aRet.Width() / 10 ); aRet.setWidth( aRet.Width() * 10 );
- aRet.setHeight( aRet.Height() + 5 ); aRet.setHeight( aRet.Height() / 10 ); aRet.setHeight( aRet.Height() * 10 );
+ aRet.AdjustWidth(5 ); aRet.setWidth( aRet.Width() / 10 ); aRet.setWidth( aRet.Width() * 10 );
+ aRet.AdjustHeight(5 ); aRet.setHeight( aRet.Height() / 10 ); aRet.setHeight( aRet.Height() * 10 );
if ( bInch )
{
aRet.setWidth( BigMulDiv( aRet.Width(), nInchDiv, nInchMul ) );
@@ -5671,7 +5671,7 @@ void PPTPortionObj::ApplyTo( SfxItemSet& rSet, SdrPowerPointImport& rManager, T
if ( aSize.Width() && aSize.Height() )
{
if ( aSize.Width () > 64 )
- aSize.Width () = 64;
+ aSize.setWidth( 64 );
if ( aSize.Height() > 64 )
aSize.setHeight( 64 );
diff --git a/filter/source/svg/svgwriter.cxx b/filter/source/svg/svgwriter.cxx
index bd3a50df0cc0..a080e1c6a1f6 100644
--- a/filter/source/svg/svgwriter.cxx
+++ b/filter/source/svg/svgwriter.cxx
@@ -1612,9 +1612,9 @@ void SVGTextWriter::implWriteTextPortion( const Point& rPos,
const vcl::Font& rFont = mpVDev->GetFont();
if( rFont.GetAlignment() == ALIGN_TOP )
- aBaseLinePos.setY( aBaseLinePos.Y() + aMetric.GetAscent() );
+ aBaseLinePos.AdjustY(aMetric.GetAscent() );
else if( rFont.GetAlignment() == ALIGN_BOTTOM )
- aBaseLinePos.setY( aBaseLinePos.Y() - aMetric.GetDescent() );
+ aBaseLinePos.AdjustY( -(aMetric.GetDescent()) );
implMap( rPos, aPos );
@@ -2250,8 +2250,7 @@ void SVGActionWriter::ImplWriteGradientLinear( const tools::PolyPolygon& rPolyPo
// Setting x value of a gradient vector to rotation center to
// place a gradient vector in a target polygon.
// This would help editing it in SVG editors like inkscape.
- aPoly[ 0 ].setX( aCenter.X() );
- aPoly[ 1 ].setX( aCenter.X() );
+ aPoly[ 0 ].X() = aPoly[ 1 ].X() = aCenter.X();
aPoly[ 0 ].setY( aRect.Top() );
aPoly[ 1 ].setY( aRect.Bottom() );
aPoly.Rotate( aCenter, nAngle );
@@ -2543,9 +2542,9 @@ void SVGActionWriter::ImplWriteText( const Point& rPos, const OUString& rText,
const vcl::Font& rFont = mpVDev->GetFont();
if( rFont.GetAlignment() == ALIGN_TOP )
- aBaseLinePos.setY( aBaseLinePos.Y() + aMetric.GetAscent() );
+ aBaseLinePos.AdjustY(aMetric.GetAscent() );
else if( rFont.GetAlignment() == ALIGN_BOTTOM )
- aBaseLinePos.setY( aBaseLinePos.Y() - aMetric.GetDescent() );
+ aBaseLinePos.AdjustY( -(aMetric.GetDescent()) );
ImplMap( rPos, aPos );
diff --git a/forms/source/richtext/richtextimplcontrol.cxx b/forms/source/richtext/richtextimplcontrol.cxx
index 003e11b03145..ed3cce56bc2c 100644
--- a/forms/source/richtext/richtextimplcontrol.cxx
+++ b/forms/source/richtext/richtextimplcontrol.cxx
@@ -545,10 +545,10 @@ namespace frm
{
void lcl_inflate( tools::Rectangle& _rRect, long _nInflateX, long _nInflateY )
{
- _rRect.SetLeft( _rRect.Left() - _nInflateX );
- _rRect.SetRight( _rRect.Right() + _nInflateX );
- _rRect.SetTop( _rRect.Top() - _nInflateY );
- _rRect.SetBottom( _rRect.Bottom() + _nInflateY );
+ _rRect.AdjustLeft( -_nInflateX );
+ _rRect.AdjustRight(_nInflateX );
+ _rRect.AdjustTop( -_nInflateY );
+ _rRect.AdjustBottom(_nInflateY );
}
}
@@ -594,8 +594,8 @@ namespace frm
tools::Rectangle aPlayground( aPos, aSize );
Size aOnePixel( _pDev->PixelToLogic( Size( 1, 1 ) ) );
- aPlayground.SetRight( aPlayground.Right() - aOnePixel.Width() );
- aPlayground.SetBottom( aPlayground.Bottom() - aOnePixel.Height() );
+ aPlayground.AdjustRight( -(aOnePixel.Width()) );
+ aPlayground.AdjustBottom( -(aOnePixel.Height()) );
// background
_pDev->SetLineColor();
diff --git a/forms/source/solar/control/navtoolbar.cxx b/forms/source/solar/control/navtoolbar.cxx
index dc8de707c0c4..f80952e44162 100644
--- a/forms/source/solar/control/navtoolbar.cxx
+++ b/forms/source/solar/control/navtoolbar.cxx
@@ -634,7 +634,7 @@ namespace frm
}
Size aSize( _pItemWindow->GetTextWidth( sItemText ), /* _pItemWindow->GetSizePixel( ).Height() */ _pItemWindow->GetTextHeight() + 4 );
- aSize.setWidth( aSize.Width() + 6 );
+ aSize.AdjustWidth(6 );
_pItemWindow->SetSizePixel( aSize );
m_pToolbar->SetItemWindow( _nItemId, _pItemWindow );
diff --git a/formula/source/ui/dlg/structpg.cxx b/formula/source/ui/dlg/structpg.cxx
index a40ba94a5df6..8f42601f5c53 100644
--- a/formula/source/ui/dlg/structpg.cxx
+++ b/formula/source/ui/dlg/structpg.cxx
@@ -37,7 +37,7 @@ StructListBox::StructListBox(vcl::Window* pParent, WinBits nBits ):
vcl::Font aFont( GetFont() );
Size aSize = aFont.GetFontSize();
- aSize.setHeight( aSize.Height() - 2 );
+ aSize.Height() -= 2;
aFont.SetFontSize( aSize );
SetFont( aFont );
}
diff --git a/fpicker/source/office/PlacesListBox.cxx b/fpicker/source/office/PlacesListBox.cxx
index b4ea90e3bdd4..8a7156c1019b 100644
--- a/fpicker/source/office/PlacesListBox.cxx
+++ b/fpicker/source/office/PlacesListBox.cxx
@@ -160,7 +160,7 @@ void PlacesListBox::SetSizePixel( const Size& rNewSize )
{
Control::SetSizePixel( rNewSize );
Size aListSize( rNewSize );
- aListSize.setHeight( aListSize.Height() - 26 + 18 );
+ aListSize.AdjustHeight( -(26 + 18) );
mpImpl->SetSizePixel( aListSize );
sal_Int32 nBtnY = rNewSize.Height() - 26;
diff --git a/fpicker/source/office/RemoteFilesDialog.cxx b/fpicker/source/office/RemoteFilesDialog.cxx
index 971f409b563e..d70723eb7634 100644
--- a/fpicker/source/office/RemoteFilesDialog.cxx
+++ b/fpicker/source/office/RemoteFilesDialog.cxx
@@ -1033,7 +1033,7 @@ IMPL_LINK_NOARG( RemoteFilesDialog, SplitHdl, Splitter*, void )
sal_Int32 nNewX = nSplitPos + m_pSplitter->GetSizePixel().Width();
fileViewPos.setX( nNewX );
Size fileViewSize = m_pFileView->GetSizePixel();
- fileViewSize.setWidth( fileViewSize.Width() - ( nNewX - nOldX ) );
+ fileViewSize.AdjustWidth( -( nNewX - nOldX ) );
m_pFileView->SetPosSizePixel( fileViewPos, fileViewSize );
m_pSplitter->SetPosPixel( Point( placeSize.Width(), m_pSplitter->GetPosPixel().Y() ) );
diff --git a/fpicker/source/office/iodlg.cxx b/fpicker/source/office/iodlg.cxx
index 647879d9c5eb..f8b5e1dd5d7f 100644
--- a/fpicker/source/office/iodlg.cxx
+++ b/fpicker/source/office/iodlg.cxx
@@ -2755,7 +2755,7 @@ IMPL_LINK_NOARG( SvtFileDialog, Split_Hdl, Splitter*, void )
sal_Int32 nNewX = nSplitPos + _pSplitter->GetSizePixel().Width();
fileViewPos.setX( nNewX );
Size fileViewSize = _pFileView->GetSizePixel();
- fileViewSize.setWidth( fileViewSize.Width() - ( nNewX - nOldX ) );
+ fileViewSize.AdjustWidth( -( nNewX - nOldX ) );
_pFileView->SetPosSizePixel( fileViewPos, fileViewSize );
_pSplitter->SetPosPixel( Point( placeSize.Width(), _pSplitter->GetPosPixel().Y() ) );
diff --git a/framework/source/layoutmanager/layoutmanager.cxx b/framework/source/layoutmanager/layoutmanager.cxx
index fcccda24afb7..f03b50500827 100644
--- a/framework/source/layoutmanager/layoutmanager.cxx
+++ b/framework/source/layoutmanager/layoutmanager.cxx
@@ -2336,7 +2336,7 @@ bool LayoutManager::implts_doLayout( bool bForceRequestBorderSpace, bool bOuterR
// don't contain the status bar!
aStatusBarSize = implts_getStatusBarSize();
aContainerSize = implts_getContainerWindowOutputSize();
- aContainerSize.setHeight( aContainerSize.Height() - aStatusBarSize.Height() );
+ aContainerSize.AdjustHeight( -(aStatusBarSize.Height()) );
if ( m_xToolbarManager.is() )
m_xToolbarManager->doLayout(aContainerSize);
diff --git a/framework/source/layoutmanager/toolbarlayoutmanager.cxx b/framework/source/layoutmanager/toolbarlayoutmanager.cxx
index 9243f6e6fe6c..c261e2bc23ae 100644
--- a/framework/source/layoutmanager/toolbarlayoutmanager.cxx
+++ b/framework/source/layoutmanager/toolbarlayoutmanager.cxx
@@ -2576,10 +2576,10 @@ void ToolbarLayoutManager::implts_setLayoutInProgress( bool bInProgress )
{
::tools::Rectangle aRect( rRect );
- aRect.SetLeft( aRect.Left() - nHotZoneOffset );
- aRect.SetTop( aRect.Top() - nHotZoneOffset );
- aRect.SetRight( aRect.Right() + nHotZoneOffset );
- aRect.SetBottom( aRect.Bottom() + nHotZoneOffset );
+ aRect.AdjustLeft( -nHotZoneOffset );
+ aRect.AdjustTop( -nHotZoneOffset );
+ aRect.AdjustRight(nHotZoneOffset );
+ aRect.AdjustBottom(nHotZoneOffset );
return aRect;
}