loplugin:changetoolsgen in filter..framework

Change-Id: I622da8a0c096c74efd97326451c4576b230f0483
Reviewed-on: https://gerrit.libreoffice.org/49701
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
Noel Grandin
2018-02-14 11:38:00 +01:00
parent e2372907c9
commit bf8a6cacd0
25 changed files with 176 additions and 175 deletions
+25 -25
View File
@@ -57,8 +57,8 @@ Point Writer::map( const Point& rPoint ) const
// AS: Produces a 'possible loss of data' warning that we can't fix without
// hurting code readability.
retPoint.X() = static_cast<long>( retPoint.X() * mnDocXScale );
retPoint.Y() = static_cast<long>( retPoint.Y() * mnDocYScale );
retPoint.setX( static_cast<long>( retPoint.X() * mnDocXScale ) );
retPoint.setY( static_cast<long>( retPoint.Y() * mnDocYScale ) );
return retPoint;
}
@@ -72,8 +72,8 @@ Size Writer::map( const Size& rSize ) const
// AS: Produces a 'possible loss of data' warning that we can't fix without
// hurting code readability.
retSize.Width() = static_cast<long>( retSize.Width() * mnDocXScale );
retSize.Height() = static_cast<long>( retSize.Height() * mnDocYScale );
retSize.setWidth( static_cast<long>( retSize.Width() * mnDocXScale ) );
retSize.setHeight( static_cast<long>( retSize.Height() * mnDocYScale ) );
return retSize;
}
@@ -521,7 +521,7 @@ void Writer::Impl_writeText( const Point& rPos, const OUString& rText, const lon
if( nLen > 1 )
{
aNormSize.Width() = pDX[ nLen - 2 ] + mpVDev->GetTextWidth( OUString(rText[nLen - 1]) );
aNormSize.setWidth( pDX[ nLen - 2 ] + mpVDev->GetTextWidth( OUString(rText[nLen - 1]) ) );
if( nWidth && aNormSize.Width() && ( nWidth != aNormSize.Width() ) )
{
@@ -550,11 +550,11 @@ void Writer::Impl_writeText( const Point& rPos, const OUString& rText, const lon
switch( aOldFont.GetAlignment() )
{
case ALIGN_TOP:
aBaseLinePos.Y() += aMetric.GetAscent();
aBaseLinePos.setY( aBaseLinePos.Y() + aMetric.GetAscent() );
break;
case ALIGN_BOTTOM:
aBaseLinePos.Y() -= aMetric.GetDescent();
aBaseLinePos.setY( aBaseLinePos.Y() - aMetric.GetDescent() );
break;
default:
@@ -664,14 +664,14 @@ void Writer::Impl_writeText( const Point& rPos, const OUString& rText, const lon
if( aOldFont.GetStrikeout() != STRIKEOUT_NONE )
{
aPoly[ 0 ].X() = aBaseLinePos.X();
aPoly[ 0 ].Y() = aBaseLinePos.Y() - FRound( aMetric.GetAscent() * 0.26 ) - nLineHeight;
aPoly[ 1 ].X() = aPoly[ 0 ].X() + aNormSize.Width() - 1;
aPoly[ 1 ].Y() = aPoly[ 0 ].Y();
aPoly[ 2 ].X() = aPoly[ 1 ].X();
aPoly[ 2 ].Y() = aPoly[ 1 ].Y() + nLineHeight - 1;
aPoly[ 3 ].X() = aPoly[ 0 ].X();
aPoly[ 3 ].Y() = aPoly[ 2 ].Y();
aPoly[ 0 ].setX( aBaseLinePos.X() );
aPoly[ 0 ].setY( aBaseLinePos.Y() - FRound( aMetric.GetAscent() * 0.26 ) - nLineHeight );
aPoly[ 1 ].setX( aPoly[ 0 ].X() + aNormSize.Width() - 1 );
aPoly[ 1 ].setY( aPoly[ 0 ].Y() );
aPoly[ 2 ].setX( aPoly[ 1 ].X() );
aPoly[ 2 ].setY( aPoly[ 1 ].Y() + nLineHeight - 1 );
aPoly[ 3 ].setX( aPoly[ 0 ].X() );
aPoly[ 3 ].setY( aPoly[ 2 ].Y() );
Impl_writePolygon( aPoly, true, aTextColor, aTextColor );
}
@@ -680,14 +680,14 @@ void Writer::Impl_writeText( const Point& rPos, const OUString& rText, const lon
// but it looks good to me.
if( aOldFont.GetUnderline() != LINESTYLE_NONE )
{
aPoly[ 0 ].X() = aBaseLinePos.X();
aPoly[ 0 ].Y() = static_cast<long>(aBaseLinePos.Y() + 1.5*nLineHeight);
aPoly[ 1 ].X() = aPoly[ 0 ].X() + aNormSize.Width() - 1;
aPoly[ 1 ].Y() = aPoly[ 0 ].Y();
aPoly[ 2 ].X() = aPoly[ 1 ].X();
aPoly[ 2 ].Y() = aPoly[ 1 ].Y() + nLineHeight - 1;
aPoly[ 3 ].X() = aPoly[ 0 ].X();
aPoly[ 3 ].Y() = aPoly[ 2 ].Y();
aPoly[ 0 ].setX( aBaseLinePos.X() );
aPoly[ 0 ].setY( static_cast<long>(aBaseLinePos.Y() + 1.5*nLineHeight) );
aPoly[ 1 ].setX( aPoly[ 0 ].X() + aNormSize.Width() - 1 );
aPoly[ 1 ].setY( aPoly[ 0 ].Y() );
aPoly[ 2 ].setX( aPoly[ 1 ].X() );
aPoly[ 2 ].setY( aPoly[ 1 ].Y() + nLineHeight - 1 );
aPoly[ 3 ].setX( aPoly[ 0 ].X() );
aPoly[ 3 ].setY( aPoly[ 2 ].Y() );
Impl_writePolygon( aPoly, true, aTextColor, aTextColor );
}
@@ -1540,8 +1540,8 @@ void Writer::Impl_writeActions( const GDIMetaFile& rMtf )
if( fScaleX != 1.0 || fScaleY != 1.0 )
{
aTmpMtf.Scale( fScaleX, fScaleY );
aSrcPt.X() = FRound( aSrcPt.X() * fScaleX );
aSrcPt.Y() = FRound( aSrcPt.Y() * fScaleY );
aSrcPt.setX( FRound( aSrcPt.X() * fScaleX ) );
aSrcPt.setY( FRound( aSrcPt.Y() * fScaleY ) );
}
nMoveX = aDestPt.X() - aSrcPt.X();
+2 -2
View File
@@ -438,8 +438,8 @@ sal_uInt16 FlashFont::getGlyph( sal_uInt16 nChar, VirtualDevice* pVDev )
for( n = 0; n < nSize; n++ )
{
Point aPoint( rPoly[n] );
aPoint.X() = static_cast<long>((double(aPoint.X()) * 1024.0 ) / double(aOldFont.GetFontHeight()));
aPoint.Y() = static_cast<long>((double(aPoint.Y()) * 1024.0 ) / double(aOldFont.GetFontHeight()));
aPoint.setX( static_cast<long>((double(aPoint.X()) * 1024.0 ) / double(aOldFont.GetFontHeight())) );
aPoint.setY( static_cast<long>((double(aPoint.Y()) * 1024.0 ) / double(aOldFont.GetFontHeight())) );
rPoly[n] = aPoint;
}
Writer::Impl_addPolygon( maGlyphData, rPoly, true );
+6 -6
View File
@@ -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.Y() += aOutSize.Height();
aOrigin.setY( aOrigin.Y() + aOutSize.Height() );
aMapMode.SetOrigin( aOrigin );
aMapMode.SetScaleX( Fraction(aOutSize.Width() / ( nBoundingBox[ 2 ] - nBoundingBox[ 0 ] )) );
aMapMode.SetScaleY( Fraction(aOutSize.Height() / ( nBoundingBox[ 3 ] - nBoundingBox[ 1 ] )) );
@@ -1182,8 +1182,8 @@ void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev )
if( fScaleX != 1.0 || fScaleY != 1.0 )
{
aTmpMtf.Scale( fScaleX, fScaleY );
aSrcPt.X() = FRound( aSrcPt.X() * fScaleX );
aSrcPt.Y() = FRound( aSrcPt.Y() * fScaleY );
aSrcPt.setX( FRound( aSrcPt.X() * fScaleX ) );
aSrcPt.setY( FRound( aSrcPt.Y() * fScaleY ) );
}
nMoveX = aDestPt.X() - aSrcPt.X();
@@ -1949,7 +1949,7 @@ void PSWriter::ImplBmp( Bitmap const * pBitmap, Bitmap const * pMaskBitmap, cons
if ( nHeightLeft )
{
nHeightLeft++;
aSourcePos.Y() = static_cast<long>( rPoint.Y() + ( nYHeightOrg * ( nHeightOrg - nHeightLeft ) ) / nHeightOrg );
aSourcePos.setY( static_cast<long>( rPoint.Y() + ( nYHeightOrg * ( nHeightOrg - nHeightLeft ) ) / nHeightOrg ) );
}
}
}
@@ -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.Y() += ( aSize.Height() * 4 / 5 ); // the area under the baseline
aPoint.setY( aPoint.Y() + ( aSize.Height() * 4 / 5 ) ); // the area under the baseline
else if ( eTextAlign == ALIGN_BOTTOM ) // is about 20% of the font size
aPoint.Y() -= ( aSize.Height() / 5 );
aPoint.setY( aPoint.Y() - ( aSize.Height() / 5 ) );
}
ImplMoveTo( aPoint );
if ( nRotation )
+4 -4
View File
@@ -834,8 +834,8 @@ bool DXF2GDIMetaFile::Convert(const DXFRepresentation & rDXF, GDIMetaFile & rMTF
pDXF->aBoundingBox.fMaxY*fScale,
-pDXF->aBoundingBox.fMinZ*fScale));
}
aPrefSize.Width() =static_cast<long>(fWidth*fScale+1.5);
aPrefSize.Height()=static_cast<long>(fHeight*fScale+1.5);
aPrefSize.setWidth(static_cast<long>(fWidth*fScale+1.5) );
aPrefSize.setHeight(static_cast<long>(fHeight*fScale+1.5) );
}
}
else {
@@ -856,8 +856,8 @@ bool DXF2GDIMetaFile::Convert(const DXFRepresentation & rDXF, GDIMetaFile & rMTF
)
);
}
aPrefSize.Width() =static_cast<long>(fWidth*fScale+1.5);
aPrefSize.Height()=static_cast<long>(fHeight*fScale+1.5);
aPrefSize.setWidth(static_cast<long>(fWidth*fScale+1.5) );
aPrefSize.setHeight(static_cast<long>(fHeight*fScale+1.5) );
}
if (bStatus)
+2 -2
View File
@@ -152,8 +152,8 @@ void DXFTransform::Transform(const DXFVector & rSrc, DXFVector & rTgt) const
void DXFTransform::Transform(const DXFVector & rSrc, Point & rTgt) const
{
rTgt.X()=static_cast<long>( rSrc.fx * aMX.fx + rSrc.fy * aMY.fx + rSrc.fz * aMZ.fx + aMP.fx + 0.5 );
rTgt.Y()=static_cast<long>( rSrc.fx * aMX.fy + rSrc.fy * aMY.fy + rSrc.fz * aMZ.fy + aMP.fy + 0.5 );
rTgt.setX(static_cast<long>( rSrc.fx * aMX.fx + rSrc.fy * aMY.fx + rSrc.fz * aMZ.fx + aMP.fx + 0.5 ) );
rTgt.setY(static_cast<long>( rSrc.fx * aMX.fy + rSrc.fy * aMY.fy + rSrc.fz * aMZ.fy + aMP.fy + 0.5 ) );
}
+10 -10
View File
@@ -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.X()+=static_cast<sal_Int32>(nsignedbyte);
pOS2MET->ReadSChar( nsignedbyte ); aP0.Y()-=static_cast<sal_Int32>(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) );
aCalcBndRect.Union(tools::Rectangle(aP0,Size(1,1)));
aPolygon.SetPoint(aP0,i);
}
@@ -979,8 +979,8 @@ void OS2METReader::ReadBitBlt()
pOS2MET->ReadUInt32( nID );
pOS2MET->SeekRel(4);
aP1=ReadPoint(); aP2=ReadPoint();
if (aP1.X() > aP2.X()) { auto nt=aP1.X(); aP1.X()=aP2.X(); aP2.X()=nt; }
if (aP1.Y() > aP2.Y()) { auto nt=aP1.Y(); aP1.Y()=aP2.Y(); aP2.Y()=nt; }
if (aP1.X() > aP2.X()) { auto nt=aP1.X(); aP1.setX(aP2.X() ); aP2.setX(nt ); }
if (aP1.Y() > aP2.Y()) { auto nt=aP1.Y(); aP1.setY(aP2.Y() ); aP2.setY(nt ); }
aSize=Size(aP2.X()-aP1.X(),aP2.Y()-aP1.Y());
pB=pBitmapList;
@@ -2102,8 +2102,8 @@ void OS2METReader::ReadOrder(sal_uInt16 nOrderID, sal_uInt16 nOrderLen)
case GOrdSMkCel: {
sal_uInt8 nbyte;
sal_uInt16 nLen=nOrderLen;
aAttr.aMrkCellSize.Width()=ReadCoord(bCoord32);
aAttr.aMrkCellSize.Height()=ReadCoord(bCoord32);
aAttr.aMrkCellSize.setWidth(ReadCoord(bCoord32) );
aAttr.aMrkCellSize.setHeight(ReadCoord(bCoord32) );
if (bCoord32) nLen-=8; else nLen-=4;
if (nLen>=2) {
pOS2MET->ReadUChar( nbyte );
@@ -2217,10 +2217,10 @@ void OS2METReader::ReadDsc(sal_uInt16 nDscID)
y2=nt;
}
aBoundingRect.Left() = x1;
aBoundingRect.Right() = x2;
aBoundingRect.Top() = y1;
aBoundingRect.Bottom() = y2;
aBoundingRect.SetLeft( x1 );
aBoundingRect.SetRight( x2 );
aBoundingRect.SetTop( y1 );
aBoundingRect.SetBottom( y2 );
// no output beside this bounding rect
pVirDev->IntersectClipRegion( tools::Rectangle( Point(), aBoundingRect.GetSize() ) );
+6 -6
View File
@@ -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.X() -= rGeoRect.X;
aPoint.Y() -= rGeoRect.Y;
aPoint.setX( aPoint.X() - rGeoRect.X );
aPoint.setY( aPoint.Y() - rGeoRect.Y );
*pPtr++ = static_cast<sal_uInt8>( aPoint.X() );
*pPtr++ = static_cast<sal_uInt8>( aPoint.X() >> 8 );
@@ -2128,9 +2128,9 @@ sal_Int32 lcl_GetConnectorAdjustValue ( const XPolygon& rPoly, sal_uInt16 nIndex
Point aStart = rPoly[0];
Point aEnd = rPoly[k-1];
if ( aEnd.Y() == aStart.Y() )
aEnd.Y() = aStart.Y() +4;
aEnd.setY( aStart.Y() +4 );
if ( aEnd.X() == aStart.X() )
aEnd.X() = aStart.X() +4;
aEnd.setX( aStart.X() +4 );
bool bVertical = ( rPoly[1].X()-aStart.X() ) == 0 ;
// vertical and horizon alternate
@@ -2179,8 +2179,8 @@ void lcl_Rotate(sal_Int32 nAngle, Point center, Point& pt)
}
sal_Int32 x0 =pt.X()-center.X();
sal_Int32 y0 =pt.Y()-center.Y();
pt.X()=center.X()+ x0*cs-y0*sn;
pt.Y()=center.Y()+ y0*cs+x0*sn;
pt.setX(center.X()+ x0*cs-y0*sn );
pt.setY(center.Y()+ y0*cs+x0*sn );
}
/*
FlipV defines that the shape will be flipped vertically about the center of its bounding box.
+12 -12
View File
@@ -88,9 +88,9 @@ Size ImplEESdrWriter::ImplMapSize( const Size& rSize )
Size aRetSize( OutputDevice::LogicToLogic( rSize, maMapModeSrc, maMapModeDest ) );
if ( !aRetSize.Width() )
aRetSize.Width()++;
aRetSize.setWidth( ++aRetSize.Width() );
if ( !aRetSize.Height() )
aRetSize.Height()++;
aRetSize.setHeight( ++aRetSize.Height() );
return aRetSize;
}
@@ -371,17 +371,17 @@ sal_uInt32 ImplEESdrWriter::ImplWriteShape( ImplEESdrObject& rObj,
nEndAngle = *o3tl::doAccess<sal_Int32>(rObj.GetUsrAny());
Point aStart, aEnd, aCenter;
aStart.X() = static_cast<sal_Int32>( cos( nStartAngle * F_PI18000 ) * 100.0 );
aStart.Y() = - static_cast<sal_Int32>( sin( nStartAngle * F_PI18000 ) * 100.0 );
aEnd.X() = static_cast<sal_Int32>( cos( nEndAngle * F_PI18000 ) * 100.0 );
aEnd.Y() = - static_cast<sal_Int32>( sin( nEndAngle * F_PI18000 ) * 100.0 );
aStart.setX( static_cast<sal_Int32>( cos( nStartAngle * F_PI18000 ) * 100.0 ) );
aStart.setY( - static_cast<sal_Int32>( sin( nStartAngle * F_PI18000 ) * 100.0 ) );
aEnd.setX( static_cast<sal_Int32>( cos( nEndAngle * F_PI18000 ) * 100.0 ) );
aEnd.setY( - static_cast<sal_Int32>( sin( nEndAngle * F_PI18000 ) * 100.0 ) );
const tools::Rectangle& rRect = aRect100thmm;
aCenter.X() = rRect.Left() + ( rRect.GetWidth() / 2 );
aCenter.Y() = rRect.Top() + ( rRect.GetHeight() / 2 );
aStart.X() += aCenter.X();
aStart.Y() += aCenter.Y();
aEnd.X() += aCenter.X();
aEnd.Y() += aCenter.Y();
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() );
tools::Polygon aPolygon( rRect, aStart, aEnd, ePolyKind );
if( rObj.GetAngle() )
{
+28 -28
View File
@@ -3108,12 +3108,12 @@ void SvxMSDffManager::Scale( sal_Int32& rVal ) const
void SvxMSDffManager::Scale( Point& rPos ) const
{
rPos.X() += nMapXOfs;
rPos.Y() += nMapYOfs;
rPos.setX( rPos.X() + nMapXOfs );
rPos.setY( rPos.Y() + nMapYOfs );
if ( bNeedMap )
{
rPos.X() = BigMulDiv( rPos.X(), nMapMul, nMapDiv );
rPos.Y() = BigMulDiv( rPos.Y(), nMapMul, nMapDiv );
rPos.setX( BigMulDiv( rPos.X(), nMapMul, nMapDiv ) );
rPos.setY( BigMulDiv( rPos.Y(), nMapMul, nMapDiv ) );
}
}
@@ -3121,8 +3121,8 @@ void SvxMSDffManager::Scale( Size& rSiz ) const
{
if ( bNeedMap )
{
rSiz.Width() = BigMulDiv( rSiz.Width(), nMapMul, nMapDiv );
rSiz.Height() = BigMulDiv( rSiz.Height(), nMapMul, nMapDiv );
rSiz.setWidth( BigMulDiv( rSiz.Width(), nMapMul, nMapDiv ) );
rSiz.setHeight( BigMulDiv( rSiz.Height(), nMapMul, nMapDiv ) );
}
}
@@ -4542,8 +4542,8 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r
sal_Int32 nX = 0, nY = 0;
seqCoordinates[ nPtNum ].First.Value >>= nX;
seqCoordinates[ nPtNum ].Second.Value >>= nY;
aP.X() = nX;
aP.Y() = nY;
aP.setX( nX );
aP.setY( nY );
aXP[ static_cast<sal_uInt16>(nPtNum) ] = aP;
}
aPolyBoundRect = tools::Rectangle( aXP.GetBoundRect() );
@@ -4620,8 +4620,8 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r
Point aP( aObjData.aBoundRect.Center() );
Size aS( aObjData.aBoundRect.GetSize() );
aP.X() -= aS.Width() / 2;
aP.Y() -= aS.Height() / 2;
aP.setX( aP.X() - aS.Width() / 2 );
aP.setY( aP.Y() - aS.Height() / 2 );
tools::Rectangle aLogicRect( aP, aS );
fYOfs = fXOfs = 0.0;
@@ -4773,8 +4773,8 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r
if ( nSpFlags & ShapeFlag::FlipH )
{
sal_Int32 n = aPoint1.X();
aPoint1.X() = aPoint2.X();
aPoint2.X() = n;
aPoint1.setX( aPoint2.X() );
aPoint2.setX( n );
// #i120437# reset hor filp
nSpFlags &= ~ShapeFlag::FlipH;
@@ -4782,8 +4782,8 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r
if ( nSpFlags & ShapeFlag::FlipV )
{
sal_Int32 n = aPoint1.Y();
aPoint1.Y() = aPoint2.Y();
aPoint2.Y() = n;
aPoint1.setY( aPoint2.Y() );
aPoint2.setY( n );
// #i120437# reset ver filp
nSpFlags &= ~ShapeFlag::FlipV;
@@ -5201,8 +5201,8 @@ SdrObject* SvxMSDffManager::ProcessObj(SvStream& rSt,
case 9000:
{
long nWidth = rTextRect.GetWidth();
rTextRect.Right() = rTextRect.Left() + rTextRect.GetHeight();
rTextRect.Bottom() = rTextRect.Top() + nWidth;
rTextRect.SetRight( rTextRect.Left() + rTextRect.GetHeight() );
rTextRect.SetBottom( rTextRect.Top() + nWidth );
sal_Int32 nOldTextLeft = nTextLeft;
sal_Int32 nOldTextRight = nTextRight;
@@ -5218,8 +5218,8 @@ SdrObject* SvxMSDffManager::ProcessObj(SvStream& rSt,
case 27000:
{
long nWidth = rTextRect.GetWidth();
rTextRect.Right() = rTextRect.Left() + rTextRect.GetHeight();
rTextRect.Bottom() = rTextRect.Top() + nWidth;
rTextRect.SetRight( rTextRect.Left() + rTextRect.GetHeight() );
rTextRect.SetBottom( rTextRect.Top() + nWidth );
sal_Int32 nOldTextLeft = nTextLeft;
sal_Int32 nOldTextRight = nTextRight;
@@ -5242,8 +5242,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.Bottom() -= nTextTop + nTextBottom;
aNewRect.Right() -= nTextLeft + nTextRight;
aNewRect.SetBottom( aNewRect.Bottom() - nTextTop + nTextBottom );
aNewRect.SetRight( aNewRect.Right() - nTextLeft + nTextRight );
// Only if it's a simple textbox may Writer replace
// the object with a frame, otherwise
@@ -5375,8 +5375,8 @@ SdrObject* SvxMSDffManager::ProcessObj(SvStream& rSt,
rTextRect.GetWidth() : rTextRect.GetHeight();
nMinWH /= 2;
Point aPivot(rTextRect.TopLeft());
aPivot.X() += nMinWH;
aPivot.Y() += nMinWH;
aPivot.setX( aPivot.X() + nMinWH );
aPivot.setY( aPivot.Y() + nMinWH );
double a = nTextRotationAngle * nPi180;
pTextObj->NbcRotate(aPivot, nTextRotationAngle, sin(a), cos(a));
}
@@ -5481,8 +5481,8 @@ SdrObject* SvxMSDffManager::ProcessObj(SvStream& rSt,
nX = nSmallX;
nY = nSmallY;
}
(*(pTextImpRec->pWrapPolygon))[i].X() = nX;
(*(pTextImpRec->pWrapPolygon))[i].Y() = nY;
(*(pTextImpRec->pWrapPolygon))[i].setX( nX );
(*(pTextImpRec->pWrapPolygon))[i].setY( nY );
}
}
}
@@ -6413,12 +6413,12 @@ bool SvxMSDffManager::GetBLIPDirect( SvStream& rBLIPStream, Graphic& rData, tool
// read in size of metafile in EMUS
sal_Int32 width(0), height(0);
rBLIPStream.ReadInt32( width ).ReadInt32( height );
aMtfSize100.Width() = width;
aMtfSize100.Height() = height;
aMtfSize100.setWidth( width );
aMtfSize100.setHeight( height );
// scale to 1/100mm
aMtfSize100.Width() /= 360;
aMtfSize100.Height() /= 360;
aMtfSize100.setWidth( aMtfSize100.Width() / 360 );
aMtfSize100.setHeight( aMtfSize100.Height() / 360 );
if ( pVisArea ) // seem that we currently are skipping the visarea position
*pVisArea = tools::Rectangle( Point(), aMtfSize100 );
+15 -15
View File
@@ -283,11 +283,11 @@ SvStream& ReadPptDocumentAtom(SvStream& rIn, PptDocumentAtom& rAtom)
.ReadSChar( nShowComments );
// clamp dodgy data to avoid overflow in later calculations
const sal_Int32 nPageClamp = SAL_MAX_INT32/5;
rAtom.aSlidesPageSize.Width() = basegfx::clamp<sal_Int32>(nSlideX, -nPageClamp, nPageClamp);
rAtom.aSlidesPageSize.Height() = basegfx::clamp<sal_Int32>(nSlideY, -nPageClamp, nPageClamp);
rAtom.aSlidesPageSize.setWidth( basegfx::clamp<sal_Int32>(nSlideX, -nPageClamp, nPageClamp) );
rAtom.aSlidesPageSize.setHeight( basegfx::clamp<sal_Int32>(nSlideY, -nPageClamp, nPageClamp) );
const sal_Int32 nNoteClamp = 65536;
rAtom.aNotesPageSize.Width() = basegfx::clamp<sal_Int32>(nNoticeX, -nNoteClamp, nNoteClamp);
rAtom.aNotesPageSize.Height() = basegfx::clamp<sal_Int32>(nNoticeY, -nNoteClamp, nNoteClamp);
rAtom.aNotesPageSize.setWidth( basegfx::clamp<sal_Int32>(nNoticeX, -nNoteClamp, nNoteClamp) );
rAtom.aNotesPageSize.setHeight( basegfx::clamp<sal_Int32>(nNoticeY, -nNoteClamp, nNoteClamp) );
rAtom.eSlidesPageFormat = static_cast<PptPageFormat>(nSlidePageFormat);
rAtom.bEmbeddedTrueType = nEmbeddedTrueType;
rAtom.bTitlePlaceholdersOmitted = nTitlePlaceHoldersOmitted;
@@ -1143,8 +1143,8 @@ SdrObject* SdrEscherImport::ProcessObj( SvStream& rSt, DffObjData& rObjData, voi
if ( eTVA == SDRTEXTVERTADJUST_BLOCK )
{
Size aTextSize( pText->GetTextSize() );
aTextSize.Width() += nTextLeft + nTextRight;
aTextSize.Height() += nTextTop + nTextBottom;
aTextSize.setWidth( aTextSize.Width() + nTextLeft + nTextRight );
aTextSize.setHeight( aTextSize.Height() + 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.Width() += nTextLeft + nTextRight;
aTextSize.Height() += nTextTop + nTextBottom;
aTextSize.setWidth( aTextSize.Width() + nTextLeft + nTextRight );
aTextSize.setHeight( aTextSize.Height() + nTextTop + nTextBottom );
if ( rTextRect.GetWidth() < aTextSize.Width() )
pTObj->SetMergedItem( SdrTextHorzAdjustItem( SDRTEXTHORZADJUST_CENTER ) );
}
@@ -2500,15 +2500,15 @@ Size SdrPowerPointImport::GetPageSize() const
Fraction aFact(GetMapFactor(eMap,MapUnit::Map100thMM).X());
nInchMul = aFact.GetNumerator();
nInchDiv = aFact.GetDenominator();
aRet.Width() = BigMulDiv( aRet.Width(), nInchMul, nInchDiv );
aRet.Height() = BigMulDiv( aRet.Height(), nInchMul, nInchDiv );
aRet.setWidth( BigMulDiv( aRet.Width(), nInchMul, nInchDiv ) );
aRet.setHeight( BigMulDiv( aRet.Height(), nInchMul, nInchDiv ) );
}
aRet.Width() += 5; aRet.Width() /= 10; aRet.Width()*=10;
aRet.Height() += 5; aRet.Height() /= 10; aRet.Height()*=10;
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 );
if ( bInch )
{
aRet.Width() = BigMulDiv( aRet.Width(), nInchDiv, nInchMul );
aRet.Height() = BigMulDiv( aRet.Height(), nInchDiv, nInchMul );
aRet.setWidth( BigMulDiv( aRet.Width(), nInchDiv, nInchMul ) );
aRet.setHeight( BigMulDiv( aRet.Height(), nInchDiv, nInchMul ) );
}
}
return aRet;
@@ -5673,7 +5673,7 @@ void PPTPortionObj::ApplyTo( SfxItemSet& rSet, SdrPowerPointImport& rManager, T
if ( aSize.Width () > 64 )
aSize.Width () = 64;
if ( aSize.Height() > 64 )
aSize.Height() = 64;
aSize.setHeight( 64 );
Bitmap::ScopedReadAccess pAcc(aBmp);
if( pAcc )
+19 -18
View File
@@ -1612,9 +1612,9 @@ void SVGTextWriter::implWriteTextPortion( const Point& rPos,
const vcl::Font& rFont = mpVDev->GetFont();
if( rFont.GetAlignment() == ALIGN_TOP )
aBaseLinePos.Y() += aMetric.GetAscent();
aBaseLinePos.setY( aBaseLinePos.Y() + aMetric.GetAscent() );
else if( rFont.GetAlignment() == ALIGN_BOTTOM )
aBaseLinePos.Y() -= aMetric.GetDescent();
aBaseLinePos.setY( aBaseLinePos.Y() - aMetric.GetDescent() );
implMap( rPos, aPos );
@@ -2250,9 +2250,10 @@ 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 ].X() = aPoly[ 1 ].X() = aCenter.X();
aPoly[ 0 ].Y() = aRect.Top();
aPoly[ 1 ].Y() = aRect.Bottom();
aPoly[ 0 ].setX( aCenter.X() );
aPoly[ 1 ].setX( aCenter.X() );
aPoly[ 0 ].setY( aRect.Top() );
aPoly[ 1 ].setY( aRect.Bottom() );
aPoly.Rotate( aCenter, nAngle );
mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrX1, OUString::number( aPoly[ 0 ].X() ) );
@@ -2393,8 +2394,8 @@ void SVGActionWriter::ImplWriteMask( GDIMetaFile& rMtf,
if( fScaleX != 1.0 || fScaleY != 1.0 )
{
rMtf.Scale( fScaleX, fScaleY );
aSrcPt.X() = FRound( aSrcPt.X() * fScaleX );
aSrcPt.Y() = FRound( aSrcPt.Y() * fScaleY );
aSrcPt.setX( FRound( aSrcPt.X() * fScaleX ) );
aSrcPt.setY( FRound( aSrcPt.Y() * fScaleY ) );
}
nMoveX = rDestPt.X() - aSrcPt.X();
@@ -2542,9 +2543,9 @@ void SVGActionWriter::ImplWriteText( const Point& rPos, const OUString& rText,
const vcl::Font& rFont = mpVDev->GetFont();
if( rFont.GetAlignment() == ALIGN_TOP )
aBaseLinePos.Y() += aMetric.GetAscent();
aBaseLinePos.setY( aBaseLinePos.Y() + aMetric.GetAscent() );
else if( rFont.GetAlignment() == ALIGN_BOTTOM )
aBaseLinePos.Y() -= aMetric.GetDescent();
aBaseLinePos.setY( aBaseLinePos.Y() - aMetric.GetDescent() );
ImplMap( rPos, aPos );
@@ -2607,7 +2608,7 @@ void SVGActionWriter::ImplWriteText( const Point& rPos, const OUString& rText,
{
if( nLen > 1 )
{
aNormSize.Width() = pDX[ nLen - 2 ] + mpVDev->GetTextWidth( OUString(rText[nLen - 1]) );
aNormSize.setWidth( pDX[ nLen - 2 ] + mpVDev->GetTextWidth( OUString(rText[nLen - 1]) ) );
if( nWidth && aNormSize.Width() && ( nWidth != aNormSize.Width() ) )
{
@@ -2683,10 +2684,10 @@ void SVGActionWriter::ImplWriteText( const Point& rPos, const OUString& rText,
{
const long nYLinePos = aBaseLinePos.Y() - FRound( aMetric.GetAscent() * 0.26 );
aPoly[ 0 ].X() = aBaseLinePos.X(); aPoly[ 0 ].Y() = nYLinePos - ( nLineHeight >> 1 );
aPoly[ 1 ].X() = aBaseLinePos.X() + aNormSize.Width() - 1; aPoly[ 1 ].Y() = aPoly[ 0 ].Y();
aPoly[ 2 ].X() = aPoly[ 1 ].X(); aPoly[ 2 ].Y() = aPoly[ 0 ].Y() + nLineHeight - 1;
aPoly[ 3 ].X() = aPoly[ 0 ].X(); aPoly[ 3 ].Y() = aPoly[ 2 ].Y();
aPoly[ 0 ].setX( aBaseLinePos.X() ); aPoly[ 0 ].setY( nYLinePos - ( nLineHeight >> 1 ) );
aPoly[ 1 ].setX( aBaseLinePos.X() + aNormSize.Width() - 1 ); aPoly[ 1 ].setY( aPoly[ 0 ].Y() );
aPoly[ 2 ].setX( aPoly[ 1 ].X() ); aPoly[ 2 ].setY( aPoly[ 0 ].Y() + nLineHeight - 1 );
aPoly[ 3 ].setX( aPoly[ 0 ].X() ); aPoly[ 3 ].setY( aPoly[ 2 ].Y() );
ImplWritePolyPolygon( aPoly, false );
}
@@ -2695,10 +2696,10 @@ void SVGActionWriter::ImplWriteText( const Point& rPos, const OUString& rText,
{
const long nYLinePos = aBaseLinePos.Y() + ( nLineHeight << 1 );
aPoly[ 0 ].X() = aBaseLinePos.X(); aPoly[ 0 ].Y() = nYLinePos - ( nLineHeight >> 1 );
aPoly[ 1 ].X() = aBaseLinePos.X() + aNormSize.Width() - 1; aPoly[ 1 ].Y() = aPoly[ 0 ].Y();
aPoly[ 2 ].X() = aPoly[ 1 ].X(); aPoly[ 2 ].Y() = aPoly[ 0 ].Y() + nLineHeight - 1;
aPoly[ 3 ].X() = aPoly[ 0 ].X(); aPoly[ 3 ].Y() = aPoly[ 2 ].Y();
aPoly[ 0 ].setX( aBaseLinePos.X() ); aPoly[ 0 ].setY( nYLinePos - ( nLineHeight >> 1 ) );
aPoly[ 1 ].setX( aBaseLinePos.X() + aNormSize.Width() - 1 ); aPoly[ 1 ].setY( aPoly[ 0 ].Y() );
aPoly[ 2 ].setX( aPoly[ 1 ].X() ); aPoly[ 2 ].setY( aPoly[ 0 ].Y() + nLineHeight - 1 );
aPoly[ 3 ].setX( aPoly[ 0 ].X() ); aPoly[ 3 ].setY( aPoly[ 2 ].Y() );
ImplWritePolyPolygon( aPoly, false );
}
@@ -1339,8 +1339,8 @@ Size SvxPathControl::GetOptimalSize() const
Size aDefSize(LogicToPixel(Size(150, 0), MapMode(MapUnit::MapAppFont)));
Size aOptSize(m_pVBox->GetOptimalSize());
long nRowHeight(GetTextHeight());
aOptSize.Height() = nRowHeight * 10;
aOptSize.Width() = std::max(aDefSize.Width(), aOptSize.Width());
aOptSize.setHeight( nRowHeight * 10 );
aOptSize.setWidth( std::max(aDefSize.Width(), aOptSize.Width()) );
return aOptSize;
}
@@ -1434,7 +1434,7 @@ IMPL_LINK( XMLFilterListBox, HeaderEndDrag_Impl, HeaderBar*, pBar, void )
for ( sal_uInt16 i = 1; i <= nTabs; ++i )
{
long nW = m_pHeaderBar->GetItemSize(i);
aSz.Width() = nW + nTmpSz;
aSz.setWidth( nW + nTmpSz );
nTmpSz += nW;
SetTab( i, PixelToLogic( aSz, MapMode(MapUnit::MapAppFont) ).Width() );
}
@@ -409,8 +409,8 @@ namespace frm
// the size of the viewport - note that the viewport does *not* occupy all the place
// which is left when subtracting the scrollbar width/height
Size aViewportPlaygroundPixel( aPlaygroundSizePixel );
aViewportPlaygroundPixel.Width() = ::std::max( long( 10 ), long( aViewportPlaygroundPixel.Width() - nScrollBarWidth ) );
aViewportPlaygroundPixel.Height() = ::std::max( long( 10 ), long( aViewportPlaygroundPixel.Height() - nScrollBarHeight ) );
aViewportPlaygroundPixel.setWidth( ::std::max( long( 10 ), long( aViewportPlaygroundPixel.Width() - nScrollBarWidth ) ) );
aViewportPlaygroundPixel.setHeight( ::std::max( long( 10 ), long( aViewportPlaygroundPixel.Height() - nScrollBarHeight ) ) );
Size aViewportPlaygroundLogic( m_pViewport->PixelToLogic( aViewportPlaygroundPixel ) );
const long nOffset = 2;
@@ -545,10 +545,10 @@ namespace frm
{
void lcl_inflate( tools::Rectangle& _rRect, long _nInflateX, long _nInflateY )
{
_rRect.Left() -= _nInflateX;
_rRect.Right() += _nInflateX;
_rRect.Top() -= _nInflateY;
_rRect.Bottom() += _nInflateY;
_rRect.SetLeft( _rRect.Left() - _nInflateX );
_rRect.SetRight( _rRect.Right() + _nInflateX );
_rRect.SetTop( _rRect.Top() - _nInflateY );
_rRect.SetBottom( _rRect.Bottom() + _nInflateY );
}
}
@@ -594,8 +594,8 @@ namespace frm
tools::Rectangle aPlayground( aPos, aSize );
Size aOnePixel( _pDev->PixelToLogic( Size( 1, 1 ) ) );
aPlayground.Right() -= aOnePixel.Width();
aPlayground.Bottom() -= aOnePixel.Height();
aPlayground.SetRight( aPlayground.Right() - aOnePixel.Width() );
aPlayground.SetBottom( aPlayground.Bottom() - aOnePixel.Height() );
// background
_pDev->SetLineColor();
+1 -1
View File
@@ -634,7 +634,7 @@ namespace frm
}
Size aSize( _pItemWindow->GetTextWidth( sItemText ), /* _pItemWindow->GetSizePixel( ).Height() */ _pItemWindow->GetTextHeight() + 4 );
aSize.Width() += 6;
aSize.setWidth( aSize.Width() + 6 );
_pItemWindow->SetSizePixel( aSize );
m_pToolbar->SetItemWindow( _nItemId, _pItemWindow );
+1 -1
View File
@@ -37,7 +37,7 @@ StructListBox::StructListBox(vcl::Window* pParent, WinBits nBits ):
vcl::Font aFont( GetFont() );
Size aSize = aFont.GetFontSize();
aSize.Height() -= 2;
aSize.setHeight( aSize.Height() - 2 );
aFont.SetFontSize( aSize );
SetFont( aFont );
}
+1 -1
View File
@@ -160,7 +160,7 @@ void PlacesListBox::SetSizePixel( const Size& rNewSize )
{
Control::SetSizePixel( rNewSize );
Size aListSize( rNewSize );
aListSize.Height() -= 26 + 18;
aListSize.setHeight( aListSize.Height() - 26 + 18 );
mpImpl->SetSizePixel( aListSize );
sal_Int32 nBtnY = rNewSize.Height() - 26;
+5 -5
View File
@@ -83,7 +83,7 @@ class FileViewContainer : public vcl::Window
// Resize the Splitter to fit the height
Size splitterNewSize = m_pSplitter->GetSizePixel();
splitterNewSize.Height() = aSize.Height();
splitterNewSize.setHeight( aSize.Height() );
m_pSplitter->SetSizePixel( splitterNewSize );
sal_Int32 nMinX = m_pTreeView->GetPosPixel().X();
sal_Int32 nMaxX = m_pFileView->GetPosPixel().X() + m_pFileView->GetSizePixel().Width() - nMinX;
@@ -91,7 +91,7 @@ class FileViewContainer : public vcl::Window
// Resize the tree list box to fit the height of the FileView
Size placesNewSize( m_pTreeView->GetSizePixel() );
placesNewSize.Height() = aSize.Height();
placesNewSize.setHeight( aSize.Height() );
m_pTreeView->SetSizePixel( placesNewSize );
}
@@ -1024,16 +1024,16 @@ IMPL_LINK_NOARG( RemoteFilesDialog, SplitHdl, Splitter*, void )
// Resize the tree list box
sal_Int32 nPlaceX = m_pTreeView->GetPosPixel().X();
Size placeSize = m_pTreeView->GetSizePixel();
placeSize.Width() = nSplitPos - nPlaceX;
placeSize.setWidth( nSplitPos - nPlaceX );
m_pTreeView->SetSizePixel( placeSize );
// Change Pos and size of the fileview
Point fileViewPos = m_pFileView->GetPosPixel();
sal_Int32 nOldX = fileViewPos.X();
sal_Int32 nNewX = nSplitPos + m_pSplitter->GetSizePixel().Width();
fileViewPos.X() = nNewX;
fileViewPos.setX( nNewX );
Size fileViewSize = m_pFileView->GetSizePixel();
fileViewSize.Width() -= ( nNewX - nOldX );
fileViewSize.setWidth( fileViewSize.Width() - ( nNewX - nOldX ) );
m_pFileView->SetPosSizePixel( fileViewPos, fileViewSize );
m_pSplitter->SetPosPixel( Point( placeSize.Width(), m_pSplitter->GetPosPixel().Y() ) );
+5 -5
View File
@@ -391,7 +391,7 @@ public:
// Resize the Splitter to fit the height
Size splitterNewSize = _pSplitter->GetSizePixel( );
splitterNewSize.Height() = aSize.Height();
splitterNewSize.setHeight( aSize.Height() );
_pSplitter->SetSizePixel( splitterNewSize );
sal_Int32 nMinX = pImpl->_pPlaces->GetPosPixel( ).X( );
sal_Int32 nMaxX = _pFileView->GetPosPixel( ).X( ) + _pFileView->GetSizePixel( ).Width() - nMinX;
@@ -399,7 +399,7 @@ public:
// Resize the places list box to fit the height of the FileView
Size placesNewSize(pImpl->_pPlaces->GetSizePixel());
placesNewSize.Height() = aSize.Height();
placesNewSize.setHeight( aSize.Height() );
pImpl->_pPlaces->SetSizePixel( placesNewSize );
}
@@ -2746,16 +2746,16 @@ IMPL_LINK_NOARG( SvtFileDialog, Split_Hdl, Splitter*, void )
// Resize the places list
sal_Int32 nPlaceX = pImpl->_pPlaces->GetPosPixel( ).X();
Size placeSize = pImpl->_pPlaces->GetSizePixel( );
placeSize.Width() = nSplitPos - nPlaceX;
placeSize.setWidth( nSplitPos - nPlaceX );
pImpl->_pPlaces->SetSizePixel( placeSize );
// Change Pos and size of the fileview
Point fileViewPos = _pFileView->GetPosPixel();
sal_Int32 nOldX = fileViewPos.X();
sal_Int32 nNewX = nSplitPos + _pSplitter->GetSizePixel().Width();
fileViewPos.X() = nNewX;
fileViewPos.setX( nNewX );
Size fileViewSize = _pFileView->GetSizePixel();
fileViewSize.Width() -= ( nNewX - nOldX );
fileViewSize.setWidth( fileViewSize.Width() - ( nNewX - nOldX ) );
_pFileView->SetPosSizePixel( fileViewPos, fileViewSize );
_pSplitter->SetPosPixel( Point( placeSize.Width(), _pSplitter->GetPosPixel().Y() ) );
+4 -4
View File
@@ -236,10 +236,10 @@ css::awt::Rectangle putRectangleValueToAWT( const ::tools::Rectangle& rRect )
::tools::Rectangle putAWTToRectangle( const css::awt::Rectangle& rRect )
{
::tools::Rectangle aRect;
aRect.Left() = rRect.X;
aRect.Top() = rRect.Y;
aRect.Right() = rRect.Width;
aRect.Bottom() = rRect.Height;
aRect.SetLeft( rRect.X );
aRect.SetTop( rRect.Y );
aRect.SetRight( rRect.Width );
aRect.SetBottom( rRect.Height );
return aRect;
}
@@ -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.Height() -= aStatusBarSize.Height();
aContainerSize.setHeight( aContainerSize.Height() - aStatusBarSize.Height() );
if ( m_xToolbarManager.is() )
m_xToolbarManager->doLayout(aContainerSize);
@@ -334,13 +334,13 @@ tools::Rectangle ToolbarLayoutManager::implts_calcDockingArea()
nSize += aRowColumnSizes[i][j];
if ( i == sal_Int32(ui::DockingArea_DOCKINGAREA_TOP) )
aBorderSpace.Top() = nSize;
aBorderSpace.SetTop( nSize );
else if ( i == sal_Int32(ui::DockingArea_DOCKINGAREA_BOTTOM) )
aBorderSpace.Bottom() = nSize;
aBorderSpace.SetBottom( nSize );
else if ( i == sal_Int32(ui::DockingArea_DOCKINGAREA_LEFT) )
aBorderSpace.Left() = nSize;
aBorderSpace.SetLeft( nSize );
else
aBorderSpace.Right() = nSize;
aBorderSpace.SetRight( nSize );
}
}
@@ -1834,9 +1834,9 @@ void ToolbarLayoutManager::implts_getUIElementVectorCopy( UIElementVector& rCopy
aReadLock.clear();
if ( xTopDockingAreaWindow.is() )
aSize.Width() = xTopDockingAreaWindow->getPosSize().Height;
aSize.setWidth( xTopDockingAreaWindow->getPosSize().Height );
if ( xBottomDockingAreaWindow.is() )
aSize.Height() = xBottomDockingAreaWindow->getPosSize().Height;
aSize.setHeight( xBottomDockingAreaWindow->getPosSize().Height );
return aSize;
}
@@ -2576,10 +2576,10 @@ void ToolbarLayoutManager::implts_setLayoutInProgress( bool bInProgress )
{
::tools::Rectangle aRect( rRect );
aRect.Left() -= nHotZoneOffset;
aRect.Top() -= nHotZoneOffset;
aRect.Right() += nHotZoneOffset;
aRect.Bottom() += nHotZoneOffset;
aRect.SetLeft( aRect.Left() - nHotZoneOffset );
aRect.SetTop( aRect.Top() - nHotZoneOffset );
aRect.SetRight( aRect.Right() + nHotZoneOffset );
aRect.SetBottom( aRect.Bottom() + nHotZoneOffset );
return aRect;
}
@@ -3087,9 +3087,9 @@ void ToolbarLayoutManager::implts_setTrackingRect( ui::DockingArea eDockingArea,
{
::Point aPoint( rTrackingRect.TopLeft());
if ( isHorizontalDockingArea( eDockingArea ))
aPoint.X() = rMousePos.X();
aPoint.setX( rMousePos.X() );
else
aPoint.Y() = rMousePos.Y();
aPoint.setY( rMousePos.Y() );
rTrackingRect.SetPos( aPoint );
}
@@ -63,7 +63,7 @@ BitmapEx ImageList::GetAsHorizontalStrip() const
sal_uInt16 nCount = GetImageCount();
if( !nCount )
return BitmapEx();
aSize.Width() *= nCount;
aSize.setWidth( aSize.Width() * nCount );
// Load any stragglers
for (sal_uInt16 nIdx = 0; nIdx < nCount; nIdx++)
@@ -106,7 +106,7 @@ void ImageList::InsertFromHorizontalStrip( const BitmapEx &rBitmapEx,
Size aSize( rBitmapEx.GetSizePixel() );
DBG_ASSERT (rBitmapEx.GetSizePixel().Width() % nItems == 0,
"ImageList::InsertFromHorizontalStrip - very odd size");
aSize.Width() /= nItems;
aSize.setWidth( aSize.Width() / nItems );
ImplInit( nItems, aSize );
for (sal_uInt16 nIdx = 0; nIdx < nItems; nIdx++)
@@ -130,7 +130,7 @@ void SAL_CALL AddonsToolBarWrapper::initialize( const Sequence< Any >& aArgument
pToolBar->EnableCustomize();
::Size aActSize( pToolBar->GetSizePixel() );
::Size aSize( pToolBar->CalcWindowSizePixel() );
aSize.Width() = aActSize.Width();
aSize.setWidth( aActSize.Width() );
pToolBar->SetSizePixel( aSize );
}
}
@@ -1563,7 +1563,7 @@ IMPL_LINK( ToolBarManager, MenuButton, ToolBox*, pToolBar, void )
::Size aActSize( pOverflowToolBar->GetSizePixel() );
::Size aSize( pOverflowToolBar->CalcWindowSizePixel() );
aSize.Width() = aActSize.Width();
aSize.setWidth( aActSize.Width() );
pOverflowToolBar->SetOutputSizePixel( aSize );
aSize = pOverflowToolBar->CalcPopupWindowSizePixel();
@@ -170,7 +170,7 @@ void SAL_CALL ToolBarWrapper::initialize( const Sequence< Any >& aArguments )
pToolBar->EnableCustomize();
::Size aActSize( pToolBar->GetSizePixel() );
::Size aSize( pToolBar->CalcWindowSizePixel() );
aSize.Width() = aActSize.Width();
aSize.setWidth( aActSize.Width() );
pToolBar->SetOutputSizePixel( aSize );
}
}
@@ -185,7 +185,7 @@ void SAL_CALL ToolBarWrapper::initialize( const Sequence< Any >& aArguments )
pToolBar->EnableCustomize();
::Size aActSize( pToolBar->GetSizePixel() );
::Size aSize( pToolBar->CalcWindowSizePixel() );
aSize.Width() = aActSize.Width();
aSize.setWidth( aActSize.Width() );
pToolBar->SetOutputSizePixel( aSize );
}
}