[Libreoffice-commits] core.git: 2 commits - svx/source
Philipp Riemer
ruderphilipp at gmail.com
Wed Aug 21 12:18:52 PDT 2013
svx/source/xoutdev/_xoutbmp.cxx | 17
svx/source/xoutdev/_xpoly.cxx | 553 ++----------------
svx/source/xoutdev/xattr.cxx | 1227 +---------------------------------------
svx/source/xoutdev/xattr2.cxx | 232 -------
svx/source/xoutdev/xattrbmp.cxx | 112 ---
svx/source/xoutdev/xexch.cxx | 40 -
svx/source/xoutdev/xpool.cxx | 28
svx/source/xoutdev/xtabbtmp.cxx | 1
svx/source/xoutdev/xtabcolr.cxx | 1
svx/source/xoutdev/xtable.cxx | 9
10 files changed, 164 insertions(+), 2056 deletions(-)
New commits:
commit e8c0708ee9d0c01cbe0bdcb38ac14e34bdceef32
Author: Philipp Riemer <ruderphilipp at gmail.com>
Date: Wed Aug 21 15:16:54 2013 +0200
remove code that was commented out long time ago
diff --git a/svx/source/xoutdev/_xoutbmp.cxx b/svx/source/xoutdev/_xoutbmp.cxx
index 92fb745..d386c36 100644
--- a/svx/source/xoutdev/_xoutbmp.cxx
+++ b/svx/source/xoutdev/_xoutbmp.cxx
@@ -499,11 +499,9 @@ Polygon XOutBitmap::GetCountour( const Bitmap& rBmp, const sal_uIntPtr nFlags,
const long nStartX1 = aWorkRect.Left() + 1L;
const long nEndX1 = aWorkRect.Right();
const long nStartX2 = nEndX1 - 1L;
-// const long nEndX2 = nStartX1 - 1L;
const long nStartY1 = aWorkRect.Top() + 1L;
const long nEndY1 = aWorkRect.Bottom();
const long nStartY2 = nEndY1 - 1L;
-// const long nEndY2 = nStartY1 - 1L;
Point* pPoints1 = NULL;
Point* pPoints2 = NULL;
long nX, nY;
diff --git a/svx/source/xoutdev/_xpoly.cxx b/svx/source/xoutdev/_xpoly.cxx
index 85cbcd7..a0f6f93 100644
--- a/svx/source/xoutdev/_xpoly.cxx
+++ b/svx/source/xoutdev/_xpoly.cxx
@@ -657,11 +657,6 @@ void XPolygon::CalcSmoothJoin(sal_uInt16 nCenter, sal_uInt16 nDrag, sal_uInt16 n
{
CheckReference();
-// sal_uInt16 nMaxPnt = pImpXPolygon->nPoints - 1;
-
-// if ( nCenter == nMaxPnt ) nPnt = 1;
-// else if ( nCenter == 0 ) nPnt = nMaxPnt - 1;
-
// If nPoint is no control point, i.e. cannot be moved, than
// move nDrag instead on the line between nCenter and nPnt
if ( !IsControl(nPnt) )
diff --git a/svx/source/xoutdev/xattr.cxx b/svx/source/xoutdev/xattr.cxx
index 01588b8..4d33be8 100644
--- a/svx/source/xoutdev/xattr.cxx
+++ b/svx/source/xoutdev/xattr.cxx
@@ -769,7 +769,6 @@ bool XLineDashItem::ScaleMetrics(long nMul, long nDiv)
bool XLineDashItem::QueryValue( ::com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId ) const
{
-// sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS);
nMemberId &= ~CONVERT_TWIPS;
switch ( nMemberId )
@@ -871,7 +870,6 @@ bool XLineDashItem::QueryValue( ::com::sun::star::uno::Any& rVal, sal_uInt8 nMem
bool XLineDashItem::PutValue( const ::com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId )
{
-// sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS);
nMemberId &= ~CONVERT_TWIPS;
switch ( nMemberId )
@@ -1335,10 +1333,6 @@ SvStream& XLineStartItem::Store( SvStream& rOut, sal_uInt16 nItemVersion ) const
basegfx::B2DPolyPolygon XLineStartItem::GetLineStartValue() const
{
- //if (!IsIndex())
- // return maPolyPolygon;
- //else
- // return pTable->GetLineEnd(GetIndex())->GetLineEnd();
return maPolyPolygon;
}
@@ -1366,7 +1360,6 @@ SfxItemPresentation XLineStartItem::GetPresentation
bool XLineStartItem::QueryValue( ::com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId ) const
{
-// sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS);
nMemberId &= ~CONVERT_TWIPS;
if( nMemberId == MID_NAME )
{
@@ -1385,7 +1378,6 @@ bool XLineStartItem::QueryValue( ::com::sun::star::uno::Any& rVal, sal_uInt8 nMe
bool XLineStartItem::PutValue( const ::com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId )
{
-// sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS);
nMemberId &= ~CONVERT_TWIPS;
if( nMemberId == MID_NAME )
{
@@ -1699,10 +1691,6 @@ SvStream& XLineEndItem::Store( SvStream& rOut, sal_uInt16 nItemVersion ) const
basegfx::B2DPolyPolygon XLineEndItem::GetLineEndValue() const
{
- //if (!IsIndex())
- // return maPolyPolygon;
- //else
- // return pTable->GetLineEnd(GetIndex())->GetLineEnd();
return maPolyPolygon;
}
@@ -1951,7 +1939,6 @@ SfxItemPresentation XLineEndItem::GetPresentation
bool XLineEndItem::QueryValue( ::com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId ) const
{
-// sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS);
nMemberId &= ~CONVERT_TWIPS;
if( nMemberId == MID_NAME )
{
@@ -1969,7 +1956,6 @@ bool XLineEndItem::QueryValue( ::com::sun::star::uno::Any& rVal, sal_uInt8 nMemb
bool XLineEndItem::PutValue( const ::com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId )
{
-// sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS);
nMemberId &= ~CONVERT_TWIPS;
if( nMemberId == MID_NAME )
{
@@ -2700,7 +2686,6 @@ SfxItemPresentation XFillGradientItem::GetPresentation
bool XFillGradientItem::QueryValue( ::com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId ) const
{
- //sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS);
nMemberId &= ~CONVERT_TWIPS;
switch ( nMemberId )
{
@@ -2777,7 +2762,6 @@ bool XFillGradientItem::QueryValue( ::com::sun::star::uno::Any& rVal, sal_uInt8
bool XFillGradientItem::PutValue( const ::com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId )
{
-// sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS);
nMemberId &= ~CONVERT_TWIPS;
switch ( nMemberId )
@@ -3155,10 +3139,6 @@ SvStream& XFillHatchItem::Store( SvStream& rOut, sal_uInt16 nItemVersion ) const
const XHatch& XFillHatchItem::GetHatchValue() const // GetValue -> GetHatchValue
{
- //if (!IsIndex())
- // return aHatch;
- //else
- // return pTable->GetHatch(GetIndex())->GetHatch();
return aHatch;
}
@@ -3197,7 +3177,6 @@ bool XFillHatchItem::ScaleMetrics(long nMul, long nDiv)
bool XFillHatchItem::QueryValue( ::com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId ) const
{
-// sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS);
nMemberId &= ~CONVERT_TWIPS;
switch ( nMemberId )
@@ -3258,7 +3237,6 @@ bool XFillHatchItem::QueryValue( ::com::sun::star::uno::Any& rVal, sal_uInt8 nMe
bool XFillHatchItem::PutValue( const ::com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId )
{
-// sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS);
nMemberId &= ~CONVERT_TWIPS;
switch ( nMemberId )
@@ -3406,14 +3384,12 @@ sal_uInt16 XFormTextStyleItem::GetValueCount() const
return 5;
}
-// #FontWork#
bool XFormTextStyleItem::QueryValue( uno::Any& rVal, sal_uInt8 /*nMemberId*/) const
{
rVal <<= (sal_Int32)GetValue();
return true;
}
-// #FontWork#
bool XFormTextStyleItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberId*/)
{
sal_Int32 nValue = 0;
@@ -3452,14 +3428,12 @@ sal_uInt16 XFormTextAdjustItem::GetValueCount() const
return 4;
}
-// #FontWork#
bool XFormTextAdjustItem::QueryValue( uno::Any& rVal, sal_uInt8 /*nMemberId*/) const
{
rVal <<= (sal_Int32)GetValue();
return true;
}
-// #FontWork#
bool XFormTextAdjustItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberId*/)
{
sal_Int32 nValue = 0;
@@ -3595,14 +3569,12 @@ sal_uInt16 XFormTextShadowItem::GetValueCount() const
return 3;
}
-// #FontWork#
bool XFormTextShadowItem::QueryValue( uno::Any& rVal, sal_uInt8 /*nMemberId*/) const
{
rVal <<= (sal_Int32)GetValue();
return true;
}
-// #FontWork#
bool XFormTextShadowItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberId*/)
{
sal_Int32 nValue = 0;
diff --git a/svx/source/xoutdev/xtable.cxx b/svx/source/xoutdev/xtable.cxx
index 2044bb5..d020410 100644
--- a/svx/source/xoutdev/xtable.cxx
+++ b/svx/source/xoutdev/xtable.cxx
@@ -120,8 +120,6 @@ XBitmapEntry::XBitmapEntry(const XBitmapEntry& rOther)
{
}
-// static int count = 0;
-
XPropertyList::XPropertyList(
XPropertyListType type,
const String& rPath
commit 349c91c8ec6afc1f5c8499529d559af34d115a76
Author: Philipp Riemer <ruderphilipp at gmail.com>
Date: Wed Aug 21 15:15:47 2013 +0200
fdo#62475 , fdo#39468: remove visual noise and translate German comments in svx/source/xoutdev/
diff --git a/svx/source/xoutdev/_xoutbmp.cxx b/svx/source/xoutdev/_xoutbmp.cxx
index 9d382fb..92fb745 100644
--- a/svx/source/xoutdev/_xoutbmp.cxx
+++ b/svx/source/xoutdev/_xoutbmp.cxx
@@ -58,11 +58,10 @@ Animation XOutBitmap::MirrorAnimation( const Animation& rAnimation, sal_Bool bHM
{
AnimationBitmap aAnimBmp( aNewAnim.Get( i ) );
- // BitmapEx spiegeln
+ // mirror the BitmapEx
aAnimBmp.aBmpEx.Mirror( nMirrorFlags );
- // Die Positionen innerhalb der Gesamtbitmap
- // muessen natuerlich auch angepasst werden
+ // Adjust the positions inside the whole bitmap
if( bHMirr )
aAnimBmp.aPosPix.X() = rGlobalSize.Width() - aAnimBmp.aPosPix.X() -
aAnimBmp.aSizePix.Width();
@@ -482,7 +481,7 @@ Polygon XOutBitmap::GetCountour( const Bitmap& rBmp, const sal_uIntPtr nFlags,
if( ( aWorkRect.GetWidth() > 4 ) && ( aWorkRect.GetHeight() > 4 ) )
{
- // falls Flag gesetzt, muessen wir Kanten detektieren
+ // if the flag is set, we need to detect edges
if( nFlags & XOUTBMP_CONTOUR_EDGEDETECT )
aWorkBmp = DetectEdges( rBmp, cEdgeDetectThreshold );
else
@@ -520,7 +519,7 @@ Polygon XOutBitmap::GetCountour( const Bitmap& rBmp, const sal_uIntPtr nFlags,
{
nY = nStartY1;
- // zunaechst Zeile von Links nach Rechts durchlaufen
+ // scan row from left to right
while( nY < nEndY1 )
{
if( aBlack == pAcc->GetPixel( nY, nX ) )
@@ -528,7 +527,7 @@ Polygon XOutBitmap::GetCountour( const Bitmap& rBmp, const sal_uIntPtr nFlags,
pPoints1[ nPolyPos ] = Point( nX, nY );
nY = nStartY2;
- // diese Schleife wird immer gebreaked da hier ja min. ein Pixel ist
+ // this loop always breaks eventually as there is at least one pixel
while( true )
{
if( aBlack == pAcc->GetPixel( nY, nX ) )
@@ -557,7 +556,7 @@ Polygon XOutBitmap::GetCountour( const Bitmap& rBmp, const sal_uIntPtr nFlags,
{
nX = nStartX1;
- // zunaechst Zeile von Links nach Rechts durchlaufen
+ // scan row from left to right
while( nX < nEndX1 )
{
if( aBlack == pAcc->GetPixel( nY, nX ) )
@@ -565,7 +564,7 @@ Polygon XOutBitmap::GetCountour( const Bitmap& rBmp, const sal_uIntPtr nFlags,
pPoints1[ nPolyPos ] = Point( nX, nY );
nX = nStartX2;
- // diese Schleife wird immer gebreaked da hier ja min. ein Pixel ist
+ // this loop always breaks eventually as there is at least one pixel
while( true )
{
if( aBlack == pAcc->GetPixel( nY, nX ) )
diff --git a/svx/source/xoutdev/_xpoly.cxx b/svx/source/xoutdev/_xpoly.cxx
index 6dd8462..85cbcd7 100644
--- a/svx/source/xoutdev/_xpoly.cxx
+++ b/svx/source/xoutdev/_xpoly.cxx
@@ -36,12 +36,6 @@
DBG_NAME(XPolygon);
DBG_NAME(XPolyPolygon);
-/*************************************************************************
-|*
-|* ImpXPolygon::ImpXPolygon()
-|*
-*************************************************************************/
-
ImpXPolygon::ImpXPolygon( sal_uInt16 nInitSize, sal_uInt16 _nResize )
{
pPointAry = NULL;
@@ -55,12 +49,6 @@ ImpXPolygon::ImpXPolygon( sal_uInt16 nInitSize, sal_uInt16 _nResize )
Resize( nInitSize );
}
-/*************************************************************************
-|*
-|* ImpXPolygon::ImpXPolygon()
-|*
-*************************************************************************/
-
ImpXPolygon::ImpXPolygon( const ImpXPolygon& rImpXPoly )
{
( (ImpXPolygon&) rImpXPoly ).CheckPointDelete();
@@ -75,18 +63,12 @@ ImpXPolygon::ImpXPolygon( const ImpXPolygon& rImpXPoly )
Resize( rImpXPoly.nSize );
- // Kopieren
+ // copy
nPoints = rImpXPoly.nPoints;
memcpy( pPointAry, rImpXPoly.pPointAry, nSize*sizeof( Point ) );
memcpy( pFlagAry, rImpXPoly.pFlagAry, nSize );
}
-/*************************************************************************
-|*
-|* ImpXPolygon::~ImpXPolygon()
-|*
-*************************************************************************/
-
ImpXPolygon::~ImpXPolygon()
{
delete[] (char*) pPointAry;
@@ -95,13 +77,6 @@ ImpXPolygon::~ImpXPolygon()
delete[] (char*) pOldPointAry;
}
-/*************************************************************************
-|*
-|* ImpXPolygon::operator==()
-|*
-*************************************************************************/
-
-
bool ImpXPolygon::operator==(const ImpXPolygon& rImpXPoly) const
{
return nPoints==rImpXPoly.nPoints &&
@@ -110,20 +85,14 @@ bool ImpXPolygon::operator==(const ImpXPolygon& rImpXPoly) const
memcmp(pFlagAry,rImpXPoly.pFlagAry,nPoints)==0));
}
-/*************************************************************************
-|*
-|* ImpXPolygon::Resize()
-|*
-|* !!! Polygongroesse aendern - wenn bDeletePoints sal_False, dann den
-|* Point-Array nicht loeschen, sondern in pOldPointAry sichern und
-|* das Flag bDeleteOldPoints setzen. Beim naechsten Zugriff wird
-|* das Array dann geloescht.
-|* Damit wird verhindert, dass bei XPoly[n] = XPoly[0] durch ein
-|* Resize der fuer den rechten Ausdruck verwendete Point-Array
-|* vorzeitig geloescht wird.
-|*
-*************************************************************************/
-
+/** Change polygon size
+ *
+ * @param nNewSize the new size of the polygon
+ * @param bDeletePoints if FALSE, do not delete the point array directly but
+ * wait for the next call before doing so. This prevents
+ * errors with XPoly[n] = XPoly[0] where a resize might
+ * destroy the right side point array too early.
+ */
void ImpXPolygon::Resize( sal_uInt16 nNewSize, sal_Bool bDeletePoints )
{
if( nNewSize == nSize )
@@ -135,23 +104,23 @@ void ImpXPolygon::Resize( sal_uInt16 nNewSize, sal_Bool bDeletePoints )
CheckPointDelete();
pOldPointAry = pPointAry;
- // Neue Groesse auf vielfaches von nResize runden, sofern Objekt
- // nicht neu angelegt wurde (nSize != 0)
+ // Round the new size to a multiple of nResize, if
+ // the object was not newly created (nSize != 0)
if ( nSize != 0 && nNewSize > nSize )
{
- DBG_ASSERT(nResize, "Resize-Versuch trotz nResize = 0 !");
+ DBG_ASSERT(nResize, "Trying to resize but nResize = 0 !");
nNewSize = nSize + ((nNewSize-nSize-1) / nResize + 1) * nResize;
}
- // Punkt Array erzeugen
+ // create point array
nSize = nNewSize;
pPointAry = (Point*)new char[ nSize*sizeof( Point ) ];
memset( pPointAry, 0, nSize*sizeof( Point ) );
- // Flag Array erzeugen
+ // create flag array
pFlagAry = new sal_uInt8[ nSize ];
memset( pFlagAry, 0, nSize );
- // Eventuell umkopieren
+ // copy if needed
if( nOldSize )
{
if( nOldSize < nSize )
@@ -164,7 +133,7 @@ void ImpXPolygon::Resize( sal_uInt16 nNewSize, sal_Bool bDeletePoints )
memcpy( pPointAry, pOldPointAry, nSize*sizeof( Point ) );
memcpy( pFlagAry, pOldFlagAry, nSize );
- // Anzahl der gueltigen Punkte anpassen
+ // adjust number of valid points
if( nPoints > nSize )
nPoints = nSize;
}
@@ -174,13 +143,6 @@ void ImpXPolygon::Resize( sal_uInt16 nNewSize, sal_Bool bDeletePoints )
}
}
-
-/*************************************************************************
-|*
-|* ImpXPolygon::InsertSpace()
-|*
-*************************************************************************/
-
void ImpXPolygon::InsertSpace( sal_uInt16 nPos, sal_uInt16 nCount )
{
CheckPointDelete();
@@ -188,12 +150,11 @@ void ImpXPolygon::InsertSpace( sal_uInt16 nPos, sal_uInt16 nCount )
if ( nPos > nPoints )
nPos = nPoints;
- // Wenn Polygon zu klein dann groesser machen
+ // if the polygon is too small than enlarge it
if( (nPoints + nCount) > nSize )
Resize( nPoints + nCount );
- // Wenn nicht hinter dem letzten Punkt eingefuegt wurde,
- // den Rest nach hinten schieben
+ // If the insert is not at the last position, move everything after backwards
if( nPos < nPoints )
{
sal_uInt16 nMove = nPoints - nPos;
@@ -207,13 +168,6 @@ void ImpXPolygon::InsertSpace( sal_uInt16 nPos, sal_uInt16 nCount )
nPoints = nPoints + nCount;
}
-
-/*************************************************************************
-|*
-|* ImpXPolygon::Remove()
-|*
-*************************************************************************/
-
void ImpXPolygon::Remove( sal_uInt16 nPos, sal_uInt16 nCount )
{
CheckPointDelete();
@@ -234,25 +188,12 @@ void ImpXPolygon::Remove( sal_uInt16 nPos, sal_uInt16 nCount )
}
}
-
-/*************************************************************************
-|*
-|* XPolygon::XPolygon()
-|*
-*************************************************************************/
-
XPolygon::XPolygon( sal_uInt16 nSize, sal_uInt16 nResize )
{
DBG_CTOR(XPolygon,NULL);
pImpXPolygon = new ImpXPolygon( nSize, nResize );
}
-/*************************************************************************
-|*
-|* XPolygon::XPolygon()
-|*
-*************************************************************************/
-
XPolygon::XPolygon( const XPolygon& rXPoly )
{
DBG_CTOR(XPolygon,NULL);
@@ -260,16 +201,7 @@ XPolygon::XPolygon( const XPolygon& rXPoly )
pImpXPolygon->nRefCount++;
}
-/*************************************************************************
- * |*
- * |* XPolygon::XPolygon()
- * |*
- * |* XPolygon aus einem Standardpolygon erstellen
- * |* Ersterstellung 18.01.95 ESO
- * |* Letzte Aenderung 18.01.95 ESO
- * |*
- * *************************************************************************/
-
+/// create a XPolygon out of a standard polygon
XPolygon::XPolygon( const Polygon& rPoly )
{
DBG_CTOR(XPolygon,NULL);
@@ -285,15 +217,7 @@ XPolygon::XPolygon( const Polygon& rPoly )
}
}
-
-/*************************************************************************
-|*
-|* XPolygon::XPolygon()
-|*
-|* Rechteck (auch mit abgerundeten Ecken) als Bezierpolygon erzeugen
-|*
-*************************************************************************/
-
+/// create a rectangle (also with rounded corners) as a Bézier polygon
XPolygon::XPolygon(const Rectangle& rRect, long nRx, long nRy)
{
DBG_CTOR(XPolygon,NULL);
@@ -304,10 +228,10 @@ XPolygon::XPolygon(const Rectangle& rRect, long nRx, long nRy)
if ( nRx > nWh ) nRx = nWh;
if ( nRy > nHh ) nRy = nHh;
- // Rx negativ, damit Umlauf im Uhrzeigersinn erfolgt
+ // negate Rx => circle clockwise
nRx = -nRx;
- // Faktor fuer Kontrollpunkte der Bezierkurven: 8/3 * (sin(45g) - 0.5)
+ // factor for control points of the Bézier curve: 8/3 * (sin(45g) - 0.5)
long nXHdl = (long)(0.552284749 * nRx);
long nYHdl = (long)(0.552284749 * nRy);
sal_uInt16 nPos = 0;
@@ -354,14 +278,7 @@ XPolygon::XPolygon(const Rectangle& rRect, long nRx, long nRy)
pImpXPolygon->nPoints = nPos + 1;
}
-/*************************************************************************
-|*
-|* XPolygon::XPolygon()
-|*
-|* Ellipsen(bogen) als Bezierpolygon erzeugen
-|*
-*************************************************************************/
-
+/// create a ellipse (curve) as Bézier polygon
XPolygon::XPolygon(const Point& rCenter, long nRx, long nRy,
sal_uInt16 nStartAngle, sal_uInt16 nEndAngle, sal_Bool bClose)
{
@@ -372,7 +289,7 @@ XPolygon::XPolygon(const Point& rCenter, long nRx, long nRy,
if ( nEndAngle > 3600 ) nEndAngle %= 3600;
bool bFull = (nStartAngle == 0 && nEndAngle == 3600);
- // Faktor fuer Kontrollpunkte der Bezierkurven: 8/3 * (sin(45g) - 0.5)
+ // factor for control points of the Bézier curve: 8/3 * (sin(45g) - 0.5)
long nXHdl = (long)(0.552284749 * nRx);
long nYHdl = (long)(0.552284749 * nRy);
sal_uInt16 nPos = 0;
@@ -391,7 +308,7 @@ XPolygon::XPolygon(const Point& rCenter, long nRx, long nRy,
} while ( !bLoopEnd );
- // Wenn kein Vollkreis, dann ggf. Enden mit Mittelpunkt verbinden
+ // if not a full circle than connect edges with center point if necessary
if ( !bFull && bClose )
pImpXPolygon->pPointAry[++nPos] = rCenter;
@@ -403,12 +320,6 @@ XPolygon::XPolygon(const Point& rCenter, long nRx, long nRy,
pImpXPolygon->nPoints = nPos + 1;
}
-/*************************************************************************
-|*
-|* XPolygon::~XPolygon()
-|*
-*************************************************************************/
-
XPolygon::~XPolygon()
{
DBG_DTOR(XPolygon,NULL);
@@ -418,14 +329,7 @@ XPolygon::~XPolygon()
delete pImpXPolygon;
}
-/*************************************************************************
-|*
-|* XPolygon::CheckReference()
-|*
-|* Referenzzaehler desImpXPoly pruefen und ggf. von diesem abkoppeln
-|*
-*************************************************************************/
-
+/// check reference counter and decouple if > 1
void XPolygon::CheckReference()
{
if( pImpXPolygon->nRefCount > 1 )
@@ -435,12 +339,6 @@ void XPolygon::CheckReference()
}
}
-/*************************************************************************
-|*
-|* XPolygon::SetPointCount()
-|*
-*************************************************************************/
-
void XPolygon::SetPointCount( sal_uInt16 nPoints )
{
pImpXPolygon->CheckPointDelete();
@@ -458,36 +356,18 @@ void XPolygon::SetPointCount( sal_uInt16 nPoints )
pImpXPolygon->nPoints = nPoints;
}
-/*************************************************************************
-|*
-|* XPolygon::GetSize()
-|*
-*************************************************************************/
-
sal_uInt16 XPolygon::GetSize() const
{
pImpXPolygon->CheckPointDelete();
return pImpXPolygon->nSize;
}
-/*************************************************************************
-|*
-|* XPolygon::GetPointCount()
-|*
-*************************************************************************/
-
sal_uInt16 XPolygon::GetPointCount() const
{
pImpXPolygon->CheckPointDelete();
return pImpXPolygon->nPoints;
}
-/*************************************************************************
-|*
-|* XPolygon::Insert()
-|*
-*************************************************************************/
-
void XPolygon::Insert( sal_uInt16 nPos, const Point& rPt, XPolyFlags eFlags )
{
CheckReference();
@@ -497,12 +377,6 @@ void XPolygon::Insert( sal_uInt16 nPos, const Point& rPt, XPolyFlags eFlags )
pImpXPolygon->pFlagAry[nPos] = (sal_uInt8)eFlags;
}
-/*************************************************************************
-|*
-|* XPolygon::Insert()
-|*
-*************************************************************************/
-
void XPolygon::Insert( sal_uInt16 nPos, const XPolygon& rXPoly )
{
CheckReference();
@@ -520,24 +394,12 @@ void XPolygon::Insert( sal_uInt16 nPos, const XPolygon& rXPoly )
nPoints );
}
-/*************************************************************************
-|*
-|* XPolygon::Remove()
-|*
-*************************************************************************/
-
void XPolygon::Remove( sal_uInt16 nPos, sal_uInt16 nCount )
{
CheckReference();
pImpXPolygon->Remove( nPos, nCount );
}
-/*************************************************************************
-|*
-|* XPolygon::Move()
-|*
-*************************************************************************/
-
void XPolygon::Move( long nHorzMove, long nVertMove )
{
if ( !nHorzMove && !nVertMove )
@@ -545,7 +407,7 @@ void XPolygon::Move( long nHorzMove, long nVertMove )
CheckReference();
- // Punkte verschieben
+ // move points
sal_uInt16 nCount = pImpXPolygon->nPoints;
for ( sal_uInt16 i = 0; i < nCount; i++ )
{
@@ -555,12 +417,6 @@ void XPolygon::Move( long nHorzMove, long nVertMove )
}
}
-/*************************************************************************
-|*
-|* XPolygon::GetBoundRect()
-|*
-*************************************************************************/
-
Rectangle XPolygon::GetBoundRect() const
{
pImpXPolygon->CheckPointDelete();
@@ -583,12 +439,6 @@ Rectangle XPolygon::GetBoundRect() const
return aRetval;
}
-/*************************************************************************
-|*
-|* XPolygon::operator[]()
-|*
-*************************************************************************/
-
const Point& XPolygon::operator[]( sal_uInt16 nPos ) const
{
DBG_ASSERT(nPos < pImpXPolygon->nPoints, "Ungueltiger Index bei const-Arrayzugriff auf XPolygon");
@@ -597,12 +447,6 @@ const Point& XPolygon::operator[]( sal_uInt16 nPos ) const
return pImpXPolygon->pPointAry[nPos];
}
-/*************************************************************************
-|*
-|* XPolygon::operator[]()
-|*
-*************************************************************************/
-
Point& XPolygon::operator[]( sal_uInt16 nPos )
{
pImpXPolygon->CheckPointDelete();
@@ -619,14 +463,6 @@ Point& XPolygon::operator[]( sal_uInt16 nPos )
return pImpXPolygon->pPointAry[nPos];
}
-/*************************************************************************
-|*
-|* XPolygon::operator=()
-|*
-|* Beschreibung Zuweisungsoperator
-|*
-*************************************************************************/
-
XPolygon& XPolygon::operator=( const XPolygon& rXPoly )
{
pImpXPolygon->CheckPointDelete();
@@ -642,14 +478,6 @@ XPolygon& XPolygon::operator=( const XPolygon& rXPoly )
return *this;
}
-/*************************************************************************
-|*
-|* XPolygon::operator==()
-|*
-|* Beschreibung Gleichheitsoperator
-|*
-*************************************************************************/
-
sal_Bool XPolygon::operator==( const XPolygon& rXPoly ) const
{
pImpXPolygon->CheckPointDelete();
@@ -657,14 +485,6 @@ sal_Bool XPolygon::operator==( const XPolygon& rXPoly ) const
return *rXPoly.pImpXPolygon == *pImpXPolygon;
}
-/*************************************************************************
-|*
-|* XPolygon::operator!=()
-|*
-|* Beschreibung Ungleichheitsoperator
-|*
-*************************************************************************/
-
sal_Bool XPolygon::operator!=( const XPolygon& rXPoly ) const
{
pImpXPolygon->CheckPointDelete();
@@ -672,28 +492,14 @@ sal_Bool XPolygon::operator!=( const XPolygon& rXPoly ) const
return *rXPoly.pImpXPolygon != *pImpXPolygon;
}
-/*************************************************************************
-|*
-|* XPolygon::GetFlags()
-|*
-|* Flags fuer den Punkt an der Position nPos zurueckgeben
-|*
-*************************************************************************/
-
+/// get the flags for the point at the given position
XPolyFlags XPolygon::GetFlags( sal_uInt16 nPos ) const
{
pImpXPolygon->CheckPointDelete();
return (XPolyFlags) pImpXPolygon->pFlagAry[nPos];
}
-/*************************************************************************
-|*
-|* XPolygon::SetFlags()
-|*
-|* Flags fuer den Punkt an der Position nPos setzen
-|*
-*************************************************************************/
-
+/// set the flags for the point at the given position
void XPolygon::SetFlags( sal_uInt16 nPos, XPolyFlags eFlags )
{
pImpXPolygon->CheckPointDelete();
@@ -701,41 +507,24 @@ void XPolygon::SetFlags( sal_uInt16 nPos, XPolyFlags eFlags )
pImpXPolygon->pFlagAry[nPos] = (sal_uInt8) eFlags;
}
-/*************************************************************************
-|*
-|* XPolygon::IsControl()
-|*
-|* Kurzform zur Abfrage des CONTROL-Flags
-|*
-*************************************************************************/
-
+/// short path to read the CONTROL flag directly (TODO: better explain what the sense behind this flag is!)
sal_Bool XPolygon::IsControl(sal_uInt16 nPos) const
{
return ( (XPolyFlags) pImpXPolygon->pFlagAry[nPos] == XPOLY_CONTROL );
}
-/*************************************************************************
-|*
-|* XPolygon::IsSmooth()
-|*
-|* Kurzform zur Abfrage von SMOOTH- und SYMMTR-Flag
-|*
-*************************************************************************/
-
+/// short path to read the SMOOTH and SYMMTR flag directly (TODO: better explain what the sense behind these flags is!)
sal_Bool XPolygon::IsSmooth(sal_uInt16 nPos) const
{
XPolyFlags eFlag = (XPolyFlags) pImpXPolygon->pFlagAry[nPos];
return ( eFlag == XPOLY_SMOOTH || eFlag == XPOLY_SYMMTR );
}
-/*************************************************************************
-|*
-|* XPolygon::CalcDistance()
-|*
-|* Abstand zwischen zwei Punkten berechnen
-|*
-*************************************************************************/
-
+/** calculate the euclidean distance between two points
+ *
+ * @param nP1 The first point
+ * @param nP2 The second point
+ */
double XPolygon::CalcDistance(sal_uInt16 nP1, sal_uInt16 nP2)
{
const Point& rP1 = pImpXPolygon->pPointAry[nP1];
@@ -745,14 +534,6 @@ double XPolygon::CalcDistance(sal_uInt16 nP1, sal_uInt16 nP2)
return sqrt(fDx * fDx + fDy * fDy);
}
-/*************************************************************************
-|*
-|* XPolygon::SubdivideBezier()
-|*
-|* Bezierkurve unterteilen
-|*
-*************************************************************************/
-
void XPolygon::SubdivideBezier(sal_uInt16 nPos, sal_Bool bCalcFirst, double fT)
{
Point* pPoints = pImpXPolygon->pPointAry;
@@ -799,8 +580,7 @@ void XPolygon::SubdivideBezier(sal_uInt16 nPos, sal_Bool bCalcFirst, double fT)
fT * pPoints[nIdx+1].Y());
}
-/************************************************************************/
-
+/// Generate a Bézier arc
void XPolygon::GenBezArc(const Point& rCenter, long nRx, long nRy,
long nXHdl, long nYHdl, sal_uInt16 nStart, sal_uInt16 nEnd,
sal_uInt16 nQuad, sal_uInt16 nFirst)
@@ -845,8 +625,6 @@ void XPolygon::GenBezArc(const Point& rCenter, long nRx, long nRy,
SetFlags(nFirst+2, XPOLY_CONTROL);
}
-/************************************************************************/
-
sal_Bool XPolygon::CheckAngles(sal_uInt16& nStart, sal_uInt16 nEnd, sal_uInt16& nA1, sal_uInt16& nA2)
{
if ( nStart == 3600 ) nStart = 0;
@@ -860,25 +638,21 @@ sal_Bool XPolygon::CheckAngles(sal_uInt16& nStart, sal_uInt16 nEnd, sal_uInt16&
nA1 = nStart - nMin;
nStart = nMax;
- // sal_True zurueck, falls letztes Segment berechnet wurde
+ // returns true when the last segment was calculated
return (nStPrev < nEnd && nStart >= nEnd);
}
-/*************************************************************************
-|*
-|* XPolygon::CalcSmoothJoin()
-|*
-|* glatten Uebergang zu einer Bezierkurve berechnen, indem der
-|* entsprechende Punkt auf die Verbindungslinie von zwei anderen
-|* Punkten projiziert wird
-|* Center = End- bzw. Anfangspunkt der Bezierkurve
-|* Drag = der bewegte Punkt, der die Verschiebung von Pnt vorgibt
-|* Pnt = der zu modifizierende Punkt
-|* Wenn Center am Anfang bzw. Ende des Polygons liegt, wird Pnt
-|* auf die entgegengesetzte Seite verlegt
-|*
-\************************************************************************/
-
+/** Calculate a smooth transition to connect two Bézier curves
+ *
+ * This is done by projecting the corresponding point onto a line between
+ * two other points.
+ *
+ * @param nCenter The point at the end or beginning of the curve.
+ * If nCenter is at the end of the polygon the point is moved
+ * to the opposite side.
+ * @param nDrag The moved point that specifies the relocation.
+ * @param nPnt The point to modify.
+ */
void XPolygon::CalcSmoothJoin(sal_uInt16 nCenter, sal_uInt16 nDrag, sal_uInt16 nPnt)
{
CheckReference();
@@ -888,8 +662,8 @@ void XPolygon::CalcSmoothJoin(sal_uInt16 nCenter, sal_uInt16 nDrag, sal_uInt16 n
// if ( nCenter == nMaxPnt ) nPnt = 1;
// else if ( nCenter == 0 ) nPnt = nMaxPnt - 1;
- // Wenn nPnt kein Control-Punkt, d.h. nicht verschiebbar, dann
- // statt dessen nDrag auf der Achse nCenter-nPnt verschieben
+ // If nPoint is no control point, i.e. cannot be moved, than
+ // move nDrag instead on the line between nCenter and nPnt
if ( !IsControl(nPnt) )
{
sal_uInt16 nTmp = nDrag;
@@ -903,7 +677,7 @@ void XPolygon::CalcSmoothJoin(sal_uInt16 nCenter, sal_uInt16 nDrag, sal_uInt16 n
if ( fDiv )
{
double fRatio = CalcDistance(nCenter, nPnt) / fDiv;
- // bei SMOOTH bisherige Laenge beibehalten
+ // keep the length if SMOOTH
if ( GetFlags(nCenter) == XPOLY_SMOOTH || !IsControl(nDrag) )
{
aDiff.X() = (long) (fRatio * aDiff.X());
@@ -913,17 +687,12 @@ void XPolygon::CalcSmoothJoin(sal_uInt16 nCenter, sal_uInt16 nDrag, sal_uInt16 n
}
}
-/*************************************************************************
-|*
-|* XPolygon::CalcTangent()
-|*
-|* Tangente fuer den Uebergang zwischen zwei Bezierkurven berechnen
-|* Center = End- bzw. Anfangspunkt der Bezierkurven
-|* Prev = vorheriger Zugpunkt
-|* Next = naechster Zugpunkt
-|*
-\************************************************************************/
-
+/** Calculate tangent between two Bézier curves
+ *
+ * @param nCenter start or end point of the curves
+ * @param nPrev previous reference point
+ * @param nNext next reference point
+ */
void XPolygon::CalcTangent(sal_uInt16 nCenter, sal_uInt16 nPrev, sal_uInt16 nNext)
{
CheckReference();
@@ -939,7 +708,7 @@ void XPolygon::CalcTangent(sal_uInt16 nCenter, sal_uInt16 nPrev, sal_uInt16 nNex
double fNextLen = CalcDistance(nCenter, nNext) / fAbsLen;
double fPrevLen = CalcDistance(nCenter, nPrev) / fAbsLen;
- // bei SYMMTR gleiche Laenge fuer beide Seiten
+ // same length for both sides if SYMMTR
if ( GetFlags(nCenter) == XPOLY_SYMMTR )
{
fPrevLen = (fNextLen + fPrevLen) / 2;
@@ -952,14 +721,7 @@ void XPolygon::CalcTangent(sal_uInt16 nCenter, sal_uInt16 nPrev, sal_uInt16 nNex
}
}
-/*************************************************************************
-|*
-|* XPolygon::PointsToBezier()
-|*
-|* wandelt vier Polygonpunkte in eine Bezierkurve durch diese Punkte um
-|*
-\************************************************************************/
-
+/// convert four polygon points into a Bézier curve
void XPolygon::PointsToBezier(sal_uInt16 nFirst)
{
double nFullLength, nPart1Length, nPart2Length;
@@ -1028,14 +790,7 @@ void XPolygon::PointsToBezier(sal_uInt16 nFirst)
SetFlags(nFirst+2, XPOLY_CONTROL);
}
-/*************************************************************************
-|*
-|* XPolygon::Scale()
-|*
-|* XPolygon in X- und/oder Y-Richtung skalieren
-|*
-*************************************************************************/
-
+/// scale in X- and/or Y-direction
void XPolygon::Scale(double fSx, double fSy)
{
pImpXPolygon->CheckPointDelete();
@@ -1051,20 +806,16 @@ void XPolygon::Scale(double fSx, double fSy)
}
}
-/*************************************************************************
-|*
-|* XPolygon::Distort()
-|*
-|* XPolygon verzerren, indem die Koordinaten relativ zu einem
-|* Referenzrechteck in ein beliebiges Viereck skaliert werden
-|* Zuordnung der Viereck-Punkte im Polygon zum Referenzrechteck:
-|* 0: links oben 0----1
-|* 1: rechts oben | |
-|* 2: rechts unten 3----2
-|* 3: links unten
-|*
-*************************************************************************/
-
+/**
+ * Distort a polygon by scaling its coordinates relative to a reference
+ * rectangle into an arbitrary rectangle.
+ *
+ * Mapping between polygon corners and reference rectangle:
+ * 0: top left 0----1
+ * 1: top right | |
+ * 2: bottom right 3----2
+ * 3: bottom left
+ */
void XPolygon::Distort(const Rectangle& rRefRect,
const XPolygon& rDistortedRect)
{
@@ -1084,7 +835,7 @@ void XPolygon::Distort(const Rectangle& rRefRect,
long X1, X2, X3, X4;
long Y1, Y2, Y3, Y4;
DBG_ASSERT(rDistortedRect.pImpXPolygon->nPoints >= 4,
- "Distort-Rechteck zu klein");
+ "Distort: rectangle to small");
X1 = rDistortedRect[0].X();
Y1 = rDistortedRect[0].Y();
@@ -1145,37 +896,18 @@ XPolygon::XPolygon(const basegfx::B2DPolygon& rPolygon)
}
}
-//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-//+--------------- XPolyPolygon -----------------------------------------+
-//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-/*************************************************************************
-|*
-|* ImpXPolyPolygon::ImpXPolyPolygon()
-|*
-|* Beschreibung Erzeugt das XPolygon-Array
-|*
-*************************************************************************/
+// XPolyPolygon
ImpXPolyPolygon::ImpXPolyPolygon( const ImpXPolyPolygon& rImpXPolyPoly ) :
aXPolyList( rImpXPolyPoly.aXPolyList )
{
nRefCount = 1;
- // Einzelne Elemente duplizieren
+ // duplicate elements
for ( size_t i = 0, n = aXPolyList.size(); i < n; ++i )
aXPolyList[ i ] = new XPolygon( *aXPolyList[ i ] );
}
-
-/*************************************************************************
-|*
-|* ImpXPolyPolygon::~ImpXPolyPolygon()
-|*
-|* Beschreibung Loescht das Polygon-Array
-|*
-*************************************************************************/
-
ImpXPolyPolygon::~ImpXPolyPolygon()
{
for ( size_t i = 0, n = aXPolyList.size(); i < n; ++i )
@@ -1183,12 +915,6 @@ ImpXPolyPolygon::~ImpXPolyPolygon()
aXPolyList.clear();
}
-/*************************************************************************
-|*
-|* ImpXPolyPolygon::operator==()
-|*
-*************************************************************************/
-
bool ImpXPolyPolygon::operator==(const ImpXPolyPolygon& rImpXPolyPoly) const
{
size_t nAnz = aXPolyList.size();
@@ -1203,24 +929,12 @@ bool ImpXPolyPolygon::operator==(const ImpXPolyPolygon& rImpXPolyPoly) const
return bEq;
}
-/*************************************************************************
-|*
-|* XPolyPolygon::XPolyPolygon()
-|*
-*************************************************************************/
-
XPolyPolygon::XPolyPolygon( sal_uInt16 /*nInitSize*/, sal_uInt16 /*nResize*/ )
{
DBG_CTOR(XPolyPolygon,NULL);
pImpXPolyPolygon = new ImpXPolyPolygon();
}
-/*************************************************************************
-|*
-|* XPolyPolygon::XPolyPolygon()
-|*
-*************************************************************************/
-
XPolyPolygon::XPolyPolygon( const XPolyPolygon& rXPolyPoly )
{
DBG_CTOR(XPolyPolygon,NULL);
@@ -1228,12 +942,6 @@ XPolyPolygon::XPolyPolygon( const XPolyPolygon& rXPolyPoly )
pImpXPolyPolygon->nRefCount++;
}
-/*************************************************************************
-|*
-|* XPolyPolygon::~XPolyPolygon()
-|*
-*************************************************************************/
-
XPolyPolygon::~XPolyPolygon()
{
DBG_DTOR(XPolyPolygon,NULL);
@@ -1243,14 +951,7 @@ XPolyPolygon::~XPolyPolygon()
delete pImpXPolyPolygon;
}
-/*************************************************************************
-|*
-|* XPolygon::CheckReference()
-|*
-|* Referenzzaehler desImpXPolyPoly pruefen und ggf. von diesem abkoppeln
-|*
-*************************************************************************/
-
+/// check reference counter and decouple if > 1
void XPolyPolygon::CheckReference()
{
if( pImpXPolyPolygon->nRefCount > 1 )
@@ -1260,12 +961,6 @@ void XPolyPolygon::CheckReference()
}
}
-/*************************************************************************
-|*
-|* XPolyPolygon::Insert()
-|*
-*************************************************************************/
-
void XPolyPolygon::Insert( const XPolygon& rXPoly, sal_uInt16 nPos )
{
CheckReference();
@@ -1280,14 +975,7 @@ void XPolyPolygon::Insert( const XPolygon& rXPoly, sal_uInt16 nPos )
pImpXPolyPolygon->aXPolyList.push_back( pXPoly );
}
-/*************************************************************************
-|*
-|* XPolyPolygon::Insert()
-|*
-|* saemtliche XPolygone aus einem XPolyPolygon einfuegen
-|*
-*************************************************************************/
-
+/// insert all XPolygons of a XPolyPolygon
void XPolyPolygon::Insert( const XPolyPolygon& rXPolyPoly, sal_uInt16 nPos )
{
CheckReference();
@@ -1308,12 +996,6 @@ void XPolyPolygon::Insert( const XPolyPolygon& rXPolyPoly, sal_uInt16 nPos )
}
}
-/*************************************************************************
-|*
-|* XPolyPolygon::Remove()
-|*
-*************************************************************************/
-
XPolygon XPolyPolygon::Remove( sal_uInt16 nPos )
{
CheckReference();
@@ -1326,25 +1008,11 @@ XPolygon XPolyPolygon::Remove( sal_uInt16 nPos )
return aXPoly;
}
-
-/*************************************************************************
-|*
-|* XPolyPolygon::GetObject()
-|*
-*************************************************************************/
-
const XPolygon& XPolyPolygon::GetObject( sal_uInt16 nPos ) const
{
return *(pImpXPolyPolygon->aXPolyList[ nPos ]);
}
-
-/*************************************************************************
-|*
-|* XPolyPolygon::Clear()
-|*
-*************************************************************************/
-
void XPolyPolygon::Clear()
{
if ( pImpXPolyPolygon->nRefCount > 1 )
@@ -1360,24 +1028,11 @@ void XPolyPolygon::Clear()
}
}
-
-/*************************************************************************
-|*
-|* XPolyPolygon::Count()
-|*
-*************************************************************************/
-
sal_uInt16 XPolyPolygon::Count() const
{
return (sal_uInt16)(pImpXPolyPolygon->aXPolyList.size());
}
-/*************************************************************************
-|*
-|* XPolyPolygon::GetBoundRect()
-|*
-*************************************************************************/
-
Rectangle XPolyPolygon::GetBoundRect() const
{
size_t nXPoly = pImpXPolyPolygon->aXPolyList.size();
@@ -1392,25 +1047,12 @@ Rectangle XPolyPolygon::GetBoundRect() const
return aRect;
}
-
-/*************************************************************************
-|*
-|* XPolyPolygon::operator[]()
-|*
-*************************************************************************/
-
XPolygon& XPolyPolygon::operator[]( sal_uInt16 nPos )
{
CheckReference();
return *( pImpXPolyPolygon->aXPolyList[ nPos ] );
}
-/*************************************************************************
-|*
-|* XPolyPolygon::operator=()
-|*
-*************************************************************************/
-
XPolyPolygon& XPolyPolygon::operator=( const XPolyPolygon& rXPolyPoly )
{
rXPolyPoly.pImpXPolyPolygon->nRefCount++;
@@ -1424,46 +1066,28 @@ XPolyPolygon& XPolyPolygon::operator=( const XPolyPolygon& rXPolyPoly )
return *this;
}
-
-/*************************************************************************
-|*
-|* XPolyPolygon::operator==()
-|*
-*************************************************************************/
-
sal_Bool XPolyPolygon::operator==( const XPolyPolygon& rXPolyPoly ) const
{
if (pImpXPolyPolygon==rXPolyPoly.pImpXPolyPolygon) return sal_True;
return *pImpXPolyPolygon == *rXPolyPoly.pImpXPolyPolygon;
}
-
-/*************************************************************************
-|*
-|* XPolyPolygon::operator!=()
-|*
-*************************************************************************/
-
sal_Bool XPolyPolygon::operator!=( const XPolyPolygon& rXPolyPoly ) const
{
if (pImpXPolyPolygon==rXPolyPoly.pImpXPolyPolygon) return sal_False;
return *pImpXPolyPolygon != *rXPolyPoly.pImpXPolyPolygon;
}
-/*************************************************************************
-|*
-|* XPolygon::Distort()
-|*
-|* XPolygon verzerren, indem die Koordinaten relativ zu einem
-|* Referenzrechteck in ein beliebiges Viereck skaliert werden
-|* Zuordnung der Viereck-Punkte im Polygon zum Referenzrechteck:
-|* 0: links oben 0----1
-|* 1: rechts oben | |
-|* 2: rechts unten 3----2
-|* 3: links unten
-|*
-*************************************************************************/
-
+/**
+ * Distort a polygon by scaling its coordinates relative to a reference
+ * rectangle into an arbitrary rectangle.
+ *
+ * Mapping between polygon corners and reference rectangle:
+ * 0: top left 0----1
+ * 1: top right | |
+ * 2: bottom right 3----2
+ * 3: bottom left
+ */
void XPolyPolygon::Distort(const Rectangle& rRefRect,
const XPolygon& rDistortedRect)
{
diff --git a/svx/source/xoutdev/xattr.cxx b/svx/source/xoutdev/xattr.cxx
index bc9940d..01588b8 100644
--- a/svx/source/xoutdev/xattr.cxx
+++ b/svx/source/xoutdev/xattr.cxx
@@ -60,12 +60,8 @@ using namespace ::com::sun::star;
#define TWIP_TO_MM100(TWIP) ((TWIP) >= 0 ? (((TWIP)*127L+36L)/72L) : (((TWIP)*127L-36L)/72L))
#define MM100_TO_TWIP(MM100) ((MM100) >= 0 ? (((MM100)*72L+63L)/127L) : (((MM100)*72L-63L)/127L))
-/************************************************************************/
-
#define VCLTOSVCOL( rCol ) (sal_uInt16)((((sal_uInt16)(rCol))<<8)|(rCol))
-/************************************************************************/
-
TYPEINIT1_AUTOFACTORY(NameOrIndex, SfxStringItem);
long ScaleMetricValue( long nVal, long nMul, long nDiv )
@@ -75,104 +71,56 @@ long ScaleMetricValue( long nVal, long nMul, long nDiv )
aVal *= nMul;
if ( aVal.IsNeg() != ( nDiv < 0 ) )
- aVal-=nDiv/2; // fuer korrektes Runden
+ aVal-=nDiv/2; // for correct rounding
else
- aVal+=nDiv/2; // fuer korrektes Runden
+ aVal+=nDiv/2; // for correct rounding
aVal/=nDiv;
return long( aVal );
}
-/*************************************************************************
-|*
-|* NameOrIndex::NameOrIndex(sal_uInt16 nWhich, sal_Int32 nIndex)
-|*
-*************************************************************************/
-
NameOrIndex::NameOrIndex(sal_uInt16 _nWhich, sal_Int32 nIndex) :
SfxStringItem(_nWhich, OUString()),
nPalIndex(nIndex)
{
}
-/*************************************************************************
-|*
-|* NameOrIndex::NameOrIndex(sal_uInt16 nWhich, const String& rName)
-|*
-*************************************************************************/
-
NameOrIndex::NameOrIndex(sal_uInt16 _nWhich, const XubString& rName) :
SfxStringItem(_nWhich, rName),
nPalIndex(-1)
{
}
-/*************************************************************************
-|*
-|* NameOrIndex::NameOrIndex(sal_uInt16 nWhich, SvStream& rIn)
-|*
-*************************************************************************/
-
NameOrIndex::NameOrIndex(sal_uInt16 _nWhich, SvStream& rIn) :
SfxStringItem(_nWhich, rIn)
{
rIn >> nPalIndex;
}
-/*************************************************************************
-|*
-|* NameOrIndex::NameOrIndex(const NameOrIndex& rNameOrIndex)
-|*
-*************************************************************************/
-
NameOrIndex::NameOrIndex(const NameOrIndex& rNameOrIndex) :
SfxStringItem(rNameOrIndex),
nPalIndex(rNameOrIndex.nPalIndex)
{
}
-/*************************************************************************
-|*
-|* int NameOrIndex::operator==(const SfxPoolItem& rItem) const
-|*
-*************************************************************************/
-
int NameOrIndex::operator==(const SfxPoolItem& rItem) const
{
return ( SfxStringItem::operator==(rItem) &&
((const NameOrIndex&) rItem).nPalIndex == nPalIndex );
}
-/*************************************************************************
-|*
-|* SfxPoolItem* NameOrIndex::Clone(SfxItemPool* pPool) const
-|*
-*************************************************************************/
-
SfxPoolItem* NameOrIndex::Clone(SfxItemPool* /*pPool*/) const
{
return new NameOrIndex(*this);
}
-/*************************************************************************
-|*
-|* SfxPoolItem* NameOrIndex::Create(SvStream& rIn, sal_uInt16 nVer) const
-|*
-*************************************************************************/
-
SfxPoolItem* NameOrIndex::Create(SvStream& rIn, sal_uInt16 /*nVer*/) const
{
return new NameOrIndex(Which(), rIn);
}
-/*************************************************************************
-|*
-|* SvStream* NameOrIndex::Store(SvStream& rIn) const
-|*
-*************************************************************************/
-
SvStream& NameOrIndex::Store( SvStream& rOut, sal_uInt16 nItemVersion ) const
{
SfxStringItem::Store( rOut, nItemVersion );
@@ -309,18 +257,9 @@ String NameOrIndex::CheckNamedItem( const NameOrIndex* pCheckItem, const sal_uIn
return aUniqueName;
}
-//*************************************************************************
-
-// -------------------
// class XColorItem
-// -------------------
-TYPEINIT1_AUTOFACTORY(XColorItem, NameOrIndex);
-/*************************************************************************
-|*
-|* XColorItem::XColorItem(sal_uInt16 nWhich, sal_Int32 nIndex, const Color& rTheColor)
-|*
-\************************************************************************/
+TYPEINIT1_AUTOFACTORY(XColorItem, NameOrIndex);
XColorItem::XColorItem(sal_uInt16 _nWhich, sal_Int32 nIndex, const Color& rTheColor) :
NameOrIndex(_nWhich, nIndex),
@@ -328,12 +267,6 @@ XColorItem::XColorItem(sal_uInt16 _nWhich, sal_Int32 nIndex, const Color& rTheCo
{
}
-/*************************************************************************
-|*
-|* XColorItem::XColorItem(sal_uInt16 nWhich, const String& rName, const Color& rTheColor)
-|*
-\************************************************************************/
-
XColorItem::XColorItem(sal_uInt16 _nWhich, const XubString& rName, const Color& rTheColor) :
NameOrIndex(_nWhich, rName),
aColor(rTheColor)
@@ -346,24 +279,12 @@ XColorItem::XColorItem(sal_uInt16 _nWhich, const Color& rTheColor)
{
}
-/*************************************************************************
-|*
-|* XColorItem::XColorItem(const XColorItem& rItem)
-|*
-\************************************************************************/
-
XColorItem::XColorItem(const XColorItem& rItem) :
NameOrIndex(rItem),
aColor(rItem.aColor)
{
}
-/*************************************************************************
-|*
-|* XColorItem::XColorItem(sal_uInt16 nWhich, SvStream& rIn)
-|*
-\************************************************************************/
-
XColorItem::XColorItem(sal_uInt16 _nWhich, SvStream& rIn) :
NameOrIndex(_nWhich, rIn)
{
@@ -373,46 +294,22 @@ XColorItem::XColorItem(sal_uInt16 _nWhich, SvStream& rIn) :
}
}
-/*************************************************************************
-|*
-|* XColorItem::Clone(SfxItemPool* pPool) const
-|*
-\************************************************************************/
-
SfxPoolItem* XColorItem::Clone(SfxItemPool* /*pPool*/) const
{
return new XColorItem(*this);
}
-/*************************************************************************
-|*
-|* int XColorItem::operator==(const SfxPoolItem& rItem) const
-|*
-\************************************************************************/
-
int XColorItem::operator==(const SfxPoolItem& rItem) const
{
return ( NameOrIndex::operator==(rItem) &&
((const XColorItem&) rItem).aColor == aColor );
}
-/*************************************************************************
-|*
-|* SfxPoolItem* XColorItem::Create(SvStream& rIn, sal_uInt16 nVer) const
-|*
-\************************************************************************/
-
SfxPoolItem* XColorItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) const
{
return new XColorItem(Which(), rIn);
}
-/*************************************************************************
-|*
-|* SfxPoolItem* XColorItem::Store(SvStream& rOut) const
-|*
-\************************************************************************/
-
SvStream& XColorItem::Store( SvStream& rOut, sal_uInt16 nItemVersion ) const
{
NameOrIndex::Store( rOut, nItemVersion );
@@ -425,12 +322,6 @@ SvStream& XColorItem::Store( SvStream& rOut, sal_uInt16 nItemVersion ) const
return rOut;
}
-/*************************************************************************
-|*
-|* const XColor& XColorItem::GetColorValue(const XColorList* pTable) const
-|*
-\************************************************************************/
-
const Color& XColorItem::GetColorValue(const XColorList* pTable) const
{
if (!IsIndex())
@@ -455,62 +346,32 @@ bool XColorItem::PutValue( const ::com::sun::star::uno::Any& rVal, sal_uInt8 /*n
return true;
}
+// --- line attributes ---
-//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-// Linienattribute
-//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-//---------------------
// class XLineStyleItem
-//---------------------
-TYPEINIT1_AUTOFACTORY(XLineStyleItem, SfxEnumItem);
-/*************************************************************************
-|*
-|* XLineStyleItem::XLineStyleItem(XLineStyle eTheLineStyle)
-|*
-*************************************************************************/
+TYPEINIT1_AUTOFACTORY(XLineStyleItem, SfxEnumItem);
XLineStyleItem::XLineStyleItem(XLineStyle eTheLineStyle) :
SfxEnumItem(XATTR_LINESTYLE, sal::static_int_cast< sal_uInt16 >(eTheLineStyle))
{
}
-/*************************************************************************
-|*
-|* XLineStyleItem::XLineStyleItem(SvStream& rIn)
-|*
-*************************************************************************/
-
XLineStyleItem::XLineStyleItem(SvStream& rIn) :
SfxEnumItem(XATTR_LINESTYLE, rIn)
{
}
-/*************************************************************************
-|*
-|* XLineStyleItem::Clone(SfxItemPool* pPool) const
-|*
-*************************************************************************/
-
SfxPoolItem* XLineStyleItem::Clone(SfxItemPool* /*pPool*/) const
{
return new XLineStyleItem( *this );
}
-/*************************************************************************
-|*
-|* SfxPoolItem* XLineStyleItem::Create(SvStream& rIn, sal_uInt16 nVer) const
-|*
-*************************************************************************/
-
SfxPoolItem* XLineStyleItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) const
{
return new XLineStyleItem(rIn);
}
-//------------------------------------------------------------------------
-
SfxItemPresentation XLineStyleItem::GetPresentation
(
SfxItemPresentation ePres,
@@ -572,22 +433,12 @@ bool XLineStyleItem::PutValue( const ::com::sun::star::uno::Any& rVal, sal_uInt8
return true;
}
-//------------------------------------------------------------------------
-
sal_uInt16 XLineStyleItem::GetValueCount() const
{
return 3;
}
-
-// ------------
// class XDash
-// ------------
-/*************************************************************************
-|*
-|* XDash::XDash(XDashStyle, sal_uInt16, sal_uIntPtr, sal_uInt16, sal_uIntPtr, sal_uIntPtr)
-|*
-*************************************************************************/
XDash::XDash(XDashStyle eTheDash, sal_uInt16 nTheDots, sal_uIntPtr nTheDotLen,
sal_uInt16 nTheDashes, sal_uIntPtr nTheDashLen, sal_uIntPtr nTheDistance) :
@@ -600,12 +451,6 @@ XDash::XDash(XDashStyle eTheDash, sal_uInt16 nTheDots, sal_uIntPtr nTheDotLen,
{
}
-/*************************************************************************
-|*
-|* int XDash::operator==(const SfxPoolItem& rItem) const
-|*
-*************************************************************************/
-
bool XDash::operator==(const XDash& rDash) const
{
return ( eDash == rDash.eDash &&
@@ -620,6 +465,7 @@ bool XDash::operator==(const XDash& rDash) const
// dashes, dots and empty passages. It returns the complete length of the full DashDot
// sequence and fills the given vetor of doubles accordingly (also resizing, so deleting it).
static double SMALLEST_DASH_WIDTH(26.95);
+
double XDash::CreateDotDashArray(::std::vector< double >& rDotDashArray, double fLineWidth) const
{
double fFullDotDashLen(0.0);
@@ -808,16 +654,9 @@ double XDash::CreateDotDashArray(::std::vector< double >& rDotDashArray, double
return fFullDotDashLen;
}
-// -------------------
// class XLineDashItem
-// -------------------
-TYPEINIT1_AUTOFACTORY(XLineDashItem, NameOrIndex);
-/*************************************************************************
-|*
-|* XLineDashItem::XLineDashItem(const String& rName, const XDash& rTheDash)
-|*
-*************************************************************************/
+TYPEINIT1_AUTOFACTORY(XLineDashItem, NameOrIndex);
XLineDashItem::XLineDashItem(const XubString& rName, const XDash& rTheDash) :
NameOrIndex(XATTR_LINEDASH, rName),
@@ -825,24 +664,12 @@ XLineDashItem::XLineDashItem(const XubString& rName, const XDash& rTheDash) :
{
}
-/*************************************************************************
-|*
-|* XLineDashItem::XLineDashItem(const XLineDashItem& rItem)
-|*
-*************************************************************************/
-
XLineDashItem::XLineDashItem(const XLineDashItem& rItem) :
NameOrIndex(rItem),
aDash(rItem.aDash)
{
}
-/*************************************************************************
-|*
-|* XLineDashItem::XLineDashItem(SvStream& rIn)
-|*
-*************************************************************************/
-
XLineDashItem::XLineDashItem(SvStream& rIn) :
NameOrIndex(XATTR_LINEDASH, rIn)
{
@@ -861,54 +688,28 @@ XLineDashItem::XLineDashItem(SvStream& rIn) :
}
}
-//*************************************************************************
-
XLineDashItem::XLineDashItem(SfxItemPool* /*pPool*/, const XDash& rTheDash)
: NameOrIndex( XATTR_LINEDASH, -1 ),
aDash(rTheDash)
{
}
-/*************************************************************************
-|*
-|* XLineDashItem::Clone(SfxItemPool* pPool) const
-|*
-*************************************************************************/
-
SfxPoolItem* XLineDashItem::Clone(SfxItemPool* /*pPool*/) const
{
return new XLineDashItem(*this);
}
-/*************************************************************************
-|*
-|* int XLineDashItem::operator==(const SfxPoolItem& rItem) const
-|*
-*************************************************************************/
-
int XLineDashItem::operator==(const SfxPoolItem& rItem) const
{
return ( NameOrIndex::operator==(rItem) &&
aDash == ((const XLineDashItem&) rItem).aDash );
}
-/*************************************************************************
-|*
-|* SfxPoolItem* XLineDashItem::Create(SvStream& rIn, sal_uInt16 nVer) const
-|*
-*************************************************************************/
-
SfxPoolItem* XLineDashItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) const
{
return new XLineDashItem(rIn);
}
-/*************************************************************************
-|*
-|* SfxPoolItem* XLineDashItem::Store(SvStream& rOut) const
-|*
-*************************************************************************/
-
SvStream& XLineDashItem::Store( SvStream& rOut, sal_uInt16 nItemVersion ) const
{
NameOrIndex::Store( rOut, nItemVersion );
@@ -926,19 +727,11 @@ SvStream& XLineDashItem::Store( SvStream& rOut, sal_uInt16 nItemVersion ) const
return rOut;
}
-/*************************************************************************
-|*
-|* const XDash& XLineDashItem::GetValue() const
-|*
-*************************************************************************/
-
const XDash& XLineDashItem::GetDashValue() const
{
return aDash;
}
-//------------------------------------------------------------------------
-
SfxItemPresentation XLineDashItem::GetPresentation
(
SfxItemPresentation ePres,
@@ -961,15 +754,11 @@ SfxItemPresentation XLineDashItem::GetPresentation
}
}
-//------------------------------------------------------------------------
-
bool XLineDashItem::HasMetrics() const
{
return true;
}
-//------------------------------------------------------------------------
-
bool XLineDashItem::ScaleMetrics(long nMul, long nDiv)
{
aDash.SetDotLen( ScaleMetricValue( aDash.GetDotLen(), nMul, nDiv ) );
@@ -1249,57 +1038,30 @@ XLineDashItem* XLineDashItem::checkForUniqueItem( SdrModel* pModel ) const
return (XLineDashItem*)this;
}
-// -------------------
// class XLineWidthItem
-// -------------------
-TYPEINIT1_AUTOFACTORY(XLineWidthItem, SfxMetricItem);
-/*************************************************************************
-|*
-|* XLineWidthItem::XLineWidthItem(long nWidth)
-|*
-*************************************************************************/
+TYPEINIT1_AUTOFACTORY(XLineWidthItem, SfxMetricItem);
XLineWidthItem::XLineWidthItem(long nWidth) :
SfxMetricItem(XATTR_LINEWIDTH, nWidth)
{
}
-/*************************************************************************
-|*
-|* XLineWidthItem::XLineWidthItem(SvStream& rIn)
-|*
-*************************************************************************/
-
XLineWidthItem::XLineWidthItem(SvStream& rIn) :
SfxMetricItem(XATTR_LINEWIDTH, rIn)
{
}
-/*************************************************************************
-|*
-|* XLineWidthItem::Clone(SfxItemPool* pPool) const
-|*
-*************************************************************************/
-
SfxPoolItem* XLineWidthItem::Clone(SfxItemPool* /*pPool*/) const
{
return new XLineWidthItem(*this);
}
-/*************************************************************************
-|*
-|* SfxPoolItem* XLineWidthItem::Create(SvStream& rIn, sal_uInt16 nVer) const
-|*
-*************************************************************************/
-
SfxPoolItem* XLineWidthItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) const
{
return new XLineWidthItem(rIn);
}
-//------------------------------------------------------------------------
-
SfxItemPresentation XLineWidthItem::GetPresentation
(
SfxItemPresentation ePres,
@@ -1345,68 +1107,35 @@ bool XLineWidthItem::PutValue( const ::com::sun::star::uno::Any& rVal, sal_uInt8
return true;
}
-// -------------------
// class XLineColorItem
-// -------------------
-TYPEINIT1_AUTOFACTORY(XLineColorItem, XColorItem);
-/*************************************************************************
-|*
-|* XLineColorItem::XLineColorItem(sal_Int32 nIndex, const Color& rTheColor)
-|*
-*************************************************************************/
+TYPEINIT1_AUTOFACTORY(XLineColorItem, XColorItem);
XLineColorItem::XLineColorItem(sal_Int32 nIndex, const Color& rTheColor) :
XColorItem(XATTR_LINECOLOR, nIndex, rTheColor)
{
}
-/*************************************************************************
-|*
-|* XLineColorItem::XLineColorItem(const XubString& rName, const Color& rTheColor)
-|*
-*************************************************************************/
-
XLineColorItem::XLineColorItem(const XubString& rName, const Color& rTheColor) :
XColorItem(XATTR_LINECOLOR, rName, rTheColor)
{
}
-/*************************************************************************
-|*
-|* XLineColorItem::XLineColorItem(SvStream& rIn)
-|*
-*************************************************************************/
-
XLineColorItem::XLineColorItem(SvStream& rIn) :
XColorItem(XATTR_LINECOLOR, rIn)
{
}
-/*************************************************************************
-|*
-|* XLineColorItem::Clone(SfxItemPool* pPool) const
-|*
-*************************************************************************/
-
SfxPoolItem* XLineColorItem::Clone(SfxItemPool* /*pPool*/) const
{
return new XLineColorItem(*this);
}
-/*************************************************************************
-|*
-|* SfxPoolItem* XLineColorItem::Create(SvStream& rIn, sal_uInt16 nVer) const
-|*
-*************************************************************************/
-
SfxPoolItem* XLineColorItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) const
{
return new XLineColorItem(rIn);
}
-//------------------------------------------------------------------------
-
SfxItemPresentation XLineColorItem::GetPresentation
(
SfxItemPresentation ePres,
@@ -1445,8 +1174,7 @@ bool XLineColorItem::PutValue( const ::com::sun::star::uno::Any& rVal, sal_uInt8
return true;
}
-//////////////////////////////////////////////////////////////////////////////
-// tooling for simple spooling B2DPolygon to file and back
+// --- tooling for simple spooling B2DPolygon to file and back ---
namespace
{
@@ -1542,55 +1270,27 @@ namespace
}
}
-//////////////////////////////////////////////////////////////////////////////
-
-// -----------------------
// class XLineStartItem
-// -----------------------
-TYPEINIT1_AUTOFACTORY(XLineStartItem, NameOrIndex);
-/*************************************************************************
-|*
-|* XLineStartItem::XLineStartItem(sal_Int32 nIndex)
-|*
-*************************************************************************/
+TYPEINIT1_AUTOFACTORY(XLineStartItem, NameOrIndex);
XLineStartItem::XLineStartItem(sal_Int32 nIndex)
: NameOrIndex(XATTR_LINESTART, nIndex)
{
}
-/*************************************************************************
-|*
-|* XLineStartItem::XLineStartItem(const XubString& rName,
-|* const basegfx::B2DPolyPolygon& rXPolygon)
-|*
-*************************************************************************/
-
XLineStartItem::XLineStartItem(const XubString& rName, const basegfx::B2DPolyPolygon& rPolyPolygon)
: NameOrIndex(XATTR_LINESTART, rName),
maPolyPolygon(rPolyPolygon)
{
}
-/*************************************************************************
-|*
-|* XLineStartItem::XLineStartItem(const XLineStartItem& rItem)
-|*
-*************************************************************************/
-
XLineStartItem::XLineStartItem(const XLineStartItem& rItem)
: NameOrIndex(rItem),
maPolyPolygon(rItem.maPolyPolygon)
{
}
-/*************************************************************************
-|*
-|* XLineStartItem::XLineStartItem(SvStream& rIn)
-|*
-*************************************************************************/
-
XLineStartItem::XLineStartItem(SvStream& rIn) :
NameOrIndex(XATTR_LINESTART, rIn)
{
@@ -1600,53 +1300,27 @@ XLineStartItem::XLineStartItem(SvStream& rIn) :
}
}
-//*************************************************************************
-
XLineStartItem::XLineStartItem(SfxItemPool* /*pPool*/, const basegfx::B2DPolyPolygon& rPolyPolygon)
: NameOrIndex( XATTR_LINESTART, -1 ),
maPolyPolygon(rPolyPolygon)
{
}
-/*************************************************************************
-|*
-|* XLineStartItem::Clone(SfxItemPool* pPool) const
-|*
-*************************************************************************/
-
SfxPoolItem* XLineStartItem::Clone(SfxItemPool* /*pPool*/) const
{
return new XLineStartItem(*this);
}
-/*************************************************************************
-|*
-|* int XLineStartItem::operator==(const SfxPoolItem& rItem) const
-|*
-*************************************************************************/
-
int XLineStartItem::operator==(const SfxPoolItem& rItem) const
{
return ( NameOrIndex::operator==(rItem) && ((const XLineStartItem&) rItem).maPolyPolygon == maPolyPolygon );
}
-/*************************************************************************
-|*
-|* SfxPoolItem* XLineStartItem::Create(SvStream& rIn, sal_uInt16 nVer) const
-|*
-*************************************************************************/
-
SfxPoolItem* XLineStartItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) const
{
return new XLineStartItem(rIn);
}
-/*************************************************************************
-|*
-|* SfxPoolItem* XLineStartItem::Store(SvStream& rOut) const
-|*
-*************************************************************************/
-
SvStream& XLineStartItem::Store( SvStream& rOut, sal_uInt16 nItemVersion ) const
{
NameOrIndex::Store( rOut, nItemVersion );
@@ -1659,12 +1333,6 @@ SvStream& XLineStartItem::Store( SvStream& rOut, sal_uInt16 nItemVersion ) const
return rOut;
}
-/*************************************************************************
-|*
-|* const basegfx::B2DPolyPolygon& XLineStartItem::GetValue() const
-|*
-*************************************************************************/
-
basegfx::B2DPolyPolygon XLineStartItem::GetLineStartValue() const
{
//if (!IsIndex())
@@ -1674,8 +1342,6 @@ basegfx::B2DPolyPolygon XLineStartItem::GetLineStartValue() const
return maPolyPolygon;
}
-//------------------------------------------------------------------------
-
SfxItemPresentation XLineStartItem::GetPresentation
(
SfxItemPresentation ePres,
@@ -1968,53 +1634,27 @@ XLineStartItem* XLineStartItem::checkForUniqueItem( SdrModel* pModel ) const
return (XLineStartItem*)this;
}
-// ---------------------
// class XLineEndItem
-// ---------------------
-TYPEINIT1_AUTOFACTORY(XLineEndItem, NameOrIndex);
-/*************************************************************************
-|*
-|* XLineEndItem::XLineEndItem(sal_Int32 nIndex)
-|*
-*************************************************************************/
+TYPEINIT1_AUTOFACTORY(XLineEndItem, NameOrIndex);
XLineEndItem::XLineEndItem(sal_Int32 nIndex)
: NameOrIndex(XATTR_LINEEND, nIndex)
{
}
-/*************************************************************************
-|*
-|* XLineEndItem::XLineEndItem(const XubString& rName,
-|* const basegfx::B2DPolyPolygon& rXPolygon)
-|*
-*************************************************************************/
-
XLineEndItem::XLineEndItem(const XubString& rName, const basegfx::B2DPolyPolygon& rPolyPolygon)
: NameOrIndex(XATTR_LINEEND, rName),
maPolyPolygon(rPolyPolygon)
{
}
-/*************************************************************************
-|*
-|* XLineEndItem::XLineEndItem(const XLineEndItem& rItem)
-|*
-*************************************************************************/
-
XLineEndItem::XLineEndItem(const XLineEndItem& rItem)
: NameOrIndex(rItem),
maPolyPolygon(rItem.maPolyPolygon)
{
}
-/*************************************************************************
-|*
-|* XLineEndItem::XLineEndItem(SvStream& rIn)
-|*
-*************************************************************************/
-
XLineEndItem::XLineEndItem(SvStream& rIn) :
NameOrIndex(XATTR_LINEEND, rIn)
{
@@ -2024,53 +1664,27 @@ XLineEndItem::XLineEndItem(SvStream& rIn) :
}
}
-//*************************************************************************
-
XLineEndItem::XLineEndItem(SfxItemPool* /*pPool*/, const basegfx::B2DPolyPolygon& rPolyPolygon)
: NameOrIndex( XATTR_LINEEND, -1 ),
maPolyPolygon(rPolyPolygon)
{
}
-/*************************************************************************
-|*
-|* XLineEndItem::Clone(SfxItemPool* pPool) const
-|*
-*************************************************************************/
-
SfxPoolItem* XLineEndItem::Clone(SfxItemPool* /*pPool*/) const
{
return new XLineEndItem(*this);
}
-/*************************************************************************
-|*
-|* int XLineEndItem::operator==(const SfxPoolItem& rItem) const
-|*
-*************************************************************************/
-
int XLineEndItem::operator==(const SfxPoolItem& rItem) const
{
return ( NameOrIndex::operator==(rItem) && ((const XLineEndItem&) rItem).maPolyPolygon == maPolyPolygon );
}
-/*************************************************************************
-|*
-|* SfxPoolItem* XLineEndItem::Create(SvStream& rIn, sal_uInt16 nVer) const
-|*
-*************************************************************************/
-
SfxPoolItem* XLineEndItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) const
{
return new XLineEndItem(rIn);
}
-/*************************************************************************
-|*
-|* SfxPoolItem* XLineEndItem::Store(SvStream& rOut) const
-|*
-*************************************************************************/
-
SvStream& XLineEndItem::Store( SvStream& rOut, sal_uInt16 nItemVersion ) const
{
NameOrIndex::Store( rOut, nItemVersion );
@@ -2083,12 +1697,6 @@ SvStream& XLineEndItem::Store( SvStream& rOut, sal_uInt16 nItemVersion ) const
return rOut;
}
-/*************************************************************************
-|*
-|* const basegfx::B2DPolyPolygon& XLineEndItem::GetValue() const
-|*
-*************************************************************************/
-
basegfx::B2DPolyPolygon XLineEndItem::GetLineEndValue() const
{
//if (!IsIndex())
@@ -2098,7 +1706,6 @@ basegfx::B2DPolyPolygon XLineEndItem::GetLineEndValue() const
return maPolyPolygon;
}
-
/** this function searches in both the models pool and the styles pool for XLineStartItem
and XLineEndItem with the same value or name and returns an item with the value of
this item and a unique name for an item with this value. */
@@ -2320,9 +1927,6 @@ XLineEndItem* XLineEndItem::checkForUniqueItem( SdrModel* pModel ) const
return (XLineEndItem*)this;
}
-
-//------------------------------------------------------------------------
-
SfxItemPresentation XLineEndItem::GetPresentation
(
SfxItemPresentation ePres,
@@ -2393,58 +1997,30 @@ bool XLineEndItem::PutValue( const ::com::sun::star::uno::Any& rVal, sal_uInt8 n
return true;
}
-// ----------------------------
// class XLineStartWidthItem
-// ----------------------------
-TYPEINIT1_AUTOFACTORY(XLineStartWidthItem, SfxMetricItem);
-/*************************************************************************
-|*
-|* XLineStartWidthItem::XLineStartWidthItem(sal_Int32 nWidth)
-|*
-*************************************************************************/
+TYPEINIT1_AUTOFACTORY(XLineStartWidthItem, SfxMetricItem);
XLineStartWidthItem::XLineStartWidthItem(long nWidth) :
SfxMetricItem(XATTR_LINESTARTWIDTH, nWidth)
{
}
-/*************************************************************************
-|*
-|* XLineStartWidthItem::XLineStartWidthItem(SvStream& rIn)
-|*
-*************************************************************************/
-
XLineStartWidthItem::XLineStartWidthItem(SvStream& rIn) :
SfxMetricItem(XATTR_LINESTARTWIDTH, rIn)
{
}
-/*************************************************************************
-|*
-|* XLineStartWidthItem::Clone(SfxItemPool* pPool) const
-|*
-*************************************************************************/
-
SfxPoolItem* XLineStartWidthItem::Clone(SfxItemPool* /*pPool*/) const
{
return new XLineStartWidthItem(*this);
}
-/*************************************************************************
-|*
-|* SfxPoolItem* XLineStartWidthItem::Create(SvStream& rIn, sal_uInt16 nVer)
-|* const
-|*
-*************************************************************************/
-
SfxPoolItem* XLineStartWidthItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) const
{
return new XLineStartWidthItem(rIn);
}
-//------------------------------------------------------------------------
-
SfxItemPresentation XLineStartWidthItem::GetPresentation
(
SfxItemPresentation ePres,
@@ -2483,59 +2059,30 @@ bool XLineStartWidthItem::PutValue( const ::com::sun::star::uno::Any& rVal, sal_
return true;
}
-
-
-// --------------------------
// class XLineEndWidthItem
-// --------------------------
-TYPEINIT1_AUTOFACTORY(XLineEndWidthItem, SfxMetricItem);
-/*************************************************************************
-|*
-|* XLineEndWidthItem::XLineEndWidthItem(long nWidth)
-|*
-*************************************************************************/
+TYPEINIT1_AUTOFACTORY(XLineEndWidthItem, SfxMetricItem);
XLineEndWidthItem::XLineEndWidthItem(long nWidth) :
SfxMetricItem(XATTR_LINEENDWIDTH, nWidth)
{
}
-/*************************************************************************
-|*
-|* XLineEndWidthItem::XLineEndWidthItem(SvStream& rIn)
-|*
-*************************************************************************/
-
XLineEndWidthItem::XLineEndWidthItem(SvStream& rIn) :
SfxMetricItem(XATTR_LINEENDWIDTH, rIn)
{
}
-/*************************************************************************
-|*
-|* XLineEndWidthItem::Clone(SfxItemPool* pPool) const
-|*
-*************************************************************************/
-
SfxPoolItem* XLineEndWidthItem::Clone(SfxItemPool* /*pPool*/) const
{
return new XLineEndWidthItem(*this);
}
-/*************************************************************************
-|*
-|* SfxPoolItem* XLineEndWidthItem::Create(SvStream& rIn, sal_uInt16 nVer) const
-|*
-*************************************************************************/
-
SfxPoolItem* XLineEndWidthItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) const
{
return new XLineEndWidthItem(rIn);
}
-//------------------------------------------------------------------------
-
SfxItemPresentation XLineEndWidthItem::GetPresentation
(
SfxItemPresentation ePres,
@@ -2574,59 +2121,30 @@ bool XLineEndWidthItem::PutValue( const ::com::sun::star::uno::Any& rVal, sal_uI
return true;
}
-
-// -----------------------------
// class XLineStartCenterItem
-// -----------------------------
-TYPEINIT1_AUTOFACTORY(XLineStartCenterItem, SfxBoolItem);
-/*************************************************************************
-|*
-|* XLineStartCenterItem::XLineStartCenterItem(sal_Bool bStartCenter)
-|*
-*************************************************************************/
+TYPEINIT1_AUTOFACTORY(XLineStartCenterItem, SfxBoolItem);
XLineStartCenterItem::XLineStartCenterItem(sal_Bool bStartCenter) :
SfxBoolItem(XATTR_LINESTARTCENTER, bStartCenter)
{
}
-/*************************************************************************
-|*
-|* XLineStartCenterItem::XLineStartCenterItem(SvStream& rIn)
-|*
-*************************************************************************/
-
XLineStartCenterItem::XLineStartCenterItem(SvStream& rIn) :
SfxBoolItem(XATTR_LINESTARTCENTER, rIn)
{
}
-/*************************************************************************
-|*
-|* XLineStartCenterItem::Clone(SfxItemPool* pPool) const
-|*
-*************************************************************************/
-
SfxPoolItem* XLineStartCenterItem::Clone(SfxItemPool* /*pPool*/) const
{
return new XLineStartCenterItem(*this);
}
-/*************************************************************************
-|*
-|* SfxPoolItem* XLineStartCenterItem::Create(SvStream& rIn, sal_uInt16 nVer)
-|* const
-|*
-*************************************************************************/
-
SfxPoolItem* XLineStartCenterItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) const
{
return new XLineStartCenterItem(rIn);
}
-//------------------------------------------------------------------------
-
SfxItemPresentation XLineStartCenterItem::GetPresentation
(
SfxItemPresentation ePres,
@@ -2666,59 +2184,30 @@ bool XLineStartCenterItem::PutValue( const ::com::sun::star::uno::Any& rVal, sal
return true;
}
-
-// ---------------------------
// class XLineEndCenterItem
-// ---------------------------
-TYPEINIT1_AUTOFACTORY(XLineEndCenterItem, SfxBoolItem);
-/*************************************************************************
-|*
-|* XLineEndCenterItem::XLineEndCenterItem(sal_Bool bEndCenter)
-|*
-*************************************************************************/
+TYPEINIT1_AUTOFACTORY(XLineEndCenterItem, SfxBoolItem);
XLineEndCenterItem::XLineEndCenterItem(sal_Bool bEndCenter) :
SfxBoolItem(XATTR_LINEENDCENTER, bEndCenter)
{
}
-/*************************************************************************
-|*
-|* XLineEndCenterItem::XLineEndCenterItem(SvStream& rIn)
-|*
-*************************************************************************/
-
XLineEndCenterItem::XLineEndCenterItem(SvStream& rIn) :
SfxBoolItem(XATTR_LINEENDCENTER, rIn)
{
}
-/*************************************************************************
-|*
-|* XLineEndCenterItem::Clone(SfxItemPool* pPool) const
-|*
-*************************************************************************/
-
SfxPoolItem* XLineEndCenterItem::Clone(SfxItemPool* /*pPool*/) const
{
return new XLineEndCenterItem(*this);
}
-/*************************************************************************
-|*
-|* SfxPoolItem* XLineEndCenterItem::Create(SvStream& rIn, sal_uInt16 nVer)
-|* const
-|*
-*************************************************************************/
-
SfxPoolItem* XLineEndCenterItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) const
{
return new XLineEndCenterItem(rIn);
}
-//------------------------------------------------------------------------
-
SfxItemPresentation XLineEndCenterItem::GetPresentation
(
SfxItemPresentation ePres,
@@ -2758,21 +2247,11 @@ bool XLineEndCenterItem::PutValue( const ::com::sun::star::uno::Any& rVal, sal_u
return true;
}
+// --- fill attributes ---
-//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-// Fuellattribute
-//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-// --------------------
// class XFillStyleItem
-// --------------------
-TYPEINIT1_AUTOFACTORY(XFillStyleItem, SfxEnumItem);
-/*************************************************************************
-|*
-|* XFillStyleItem::XFillStyleItem(XFillStyle eFillStyle)
-|*
-*************************************************************************/
+TYPEINIT1_AUTOFACTORY(XFillStyleItem, SfxEnumItem);
XFillStyleItem::XFillStyleItem(XFillStyle eFillStyle) :
SfxEnumItem(XATTR_FILLSTYLE, sal::static_int_cast< sal_uInt16 >(eFillStyle))
@@ -2784,41 +2263,21 @@ XFillStyleItem::XFillStyleItem(XFillStyle eFillStyle, sal_uInt16 nWhich_) :
{
}
-/*************************************************************************
-|*
-|* XFillStyleItem::XFillStyleItem(SvStream& rIn)
-|*
-*************************************************************************/
-
XFillStyleItem::XFillStyleItem(SvStream& rIn) :
SfxEnumItem(XATTR_FILLSTYLE, rIn)
{
}
-/*************************************************************************
-|*
-|* XFillStyleItem::Clone(SfxItemPool* pPool) const
-|*
-*************************************************************************/
-
SfxPoolItem* XFillStyleItem::Clone(SfxItemPool* /*pPool*/) const
{
return new XFillStyleItem( *this );
}
-/*************************************************************************
-|*
-|* SfxPoolItem* XFillStyleItem::Create(SvStream& rIn, sal_uInt16 nVer) const
-|*
-*************************************************************************/
-
SfxPoolItem* XFillStyleItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) const
{
return new XFillStyleItem(rIn);
}
-//------------------------------------------------------------------------
-
SfxItemPresentation XFillStyleItem::GetPresentation
(
SfxItemPresentation ePres,
@@ -2867,14 +2326,11 @@ SfxItemPresentation XFillStyleItem::GetPresentation
}
}
-//------------------------------------------------------------------------
-
sal_uInt16 XFillStyleItem::GetValueCount() const
{
return 5;
}
-// -----------------------------------------------------------------------
bool XFillStyleItem::QueryValue( ::com::sun::star::uno::Any& rVal, sal_uInt8 /*nMemberId*/) const
{
::com::sun::star::drawing::FillStyle eFS = (::com::sun::star::drawing::FillStyle)GetValue();
@@ -2884,7 +2340,6 @@ bool XFillStyleItem::QueryValue( ::com::sun::star::uno::Any& rVal, sal_uInt8 /*n
return true;
}
-// -----------------------------------------------------------------------
bool XFillStyleItem::PutValue( const ::com::sun::star::uno::Any& rVal, sal_uInt8 /*nMemberId*/)
{
::com::sun::star::drawing::FillStyle eFS;
@@ -2902,69 +2357,35 @@ bool XFillStyleItem::PutValue( const ::com::sun::star::uno::Any& rVal, sal_uInt8
return true;
}
-
-// -------------------
// class XFillColorItem
-// -------------------
-TYPEINIT1_AUTOFACTORY(XFillColorItem, XColorItem);
-/*************************************************************************
-|*
-|* XFillColorItem::XFillColorItem(sal_Int32 nIndex, const Color& rTheColor)
-|*
-*************************************************************************/
+TYPEINIT1_AUTOFACTORY(XFillColorItem, XColorItem);
XFillColorItem::XFillColorItem(sal_Int32 nIndex, const Color& rTheColor) :
XColorItem(XATTR_FILLCOLOR, nIndex, rTheColor)
{
}
-/*************************************************************************
-|*
-|* XFillColorItem::XFillColorItem(const XubString& rName, const Color& rTheColor)
-|*
-*************************************************************************/
-
XFillColorItem::XFillColorItem(const XubString& rName, const Color& rTheColor) :
XColorItem(XATTR_FILLCOLOR, rName, rTheColor)
{
}
-/*************************************************************************
-|*
-|* XFillColorItem::XFillColorItem(SvStream& rIn)
-|*
-*************************************************************************/
-
XFillColorItem::XFillColorItem(SvStream& rIn) :
XColorItem(XATTR_FILLCOLOR, rIn)
{
}
-/*************************************************************************
-|*
-|* XFillColorItem::Clone(SfxItemPool* pPool) const
-|*
-*************************************************************************/
-
SfxPoolItem* XFillColorItem::Clone(SfxItemPool* /*pPool*/) const
{
return new XFillColorItem(*this);
}
-/*************************************************************************
-|*
-|* SfxPoolItem* XFillColorItem::Create(SvStream& rIn, sal_uInt16 nVer) const
-|*
-*************************************************************************/
-
SfxPoolItem* XFillColorItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) const
{
return new XFillColorItem(rIn);
}
-//------------------------------------------------------------------------
-
SfxItemPresentation XFillColorItem::GetPresentation
(
SfxItemPresentation ePres,
@@ -2987,8 +2408,6 @@ SfxItemPresentation XFillColorItem::GetPresentation
}
}
-// -----------------------------------------------------------------------
-
bool XFillColorItem::QueryValue( ::com::sun::star::uno::Any& rVal, sal_uInt8 /*nMemberId*/) const
{
rVal <<= (sal_Int32)GetColorValue().GetRGBColor();
@@ -2996,8 +2415,6 @@ bool XFillColorItem::QueryValue( ::com::sun::star::uno::Any& rVal, sal_uInt8 /*n
return true;
}
-// -----------------------------------------------------------------------
-
bool XFillColorItem::PutValue( const ::com::sun::star::uno::Any& rVal, sal_uInt8 /*nMemberId*/)
{
sal_Int32 nValue = 0;
@@ -3008,9 +2425,8 @@ bool XFillColorItem::PutValue( const ::com::sun::star::uno::Any& rVal, sal_uInt8
return true;
}
-// -----------------------------
// class XSecondaryFillColorItem
-// -----------------------------
+
TYPEINIT1_AUTOFACTORY(XSecondaryFillColorItem, XColorItem);
XSecondaryFillColorItem::XSecondaryFillColorItem(const XubString& rName, const Color& rTheColor) :
@@ -3035,10 +2451,12 @@ SfxPoolItem* XSecondaryFillColorItem::Create( SvStream& rIn, sal_uInt16 nVer ) c
else
return new XSecondaryFillColorItem( String(), Color(0,184,255) );
}
+
sal_uInt16 XSecondaryFillColorItem::GetVersion( sal_uInt16 /*nFileFormatVersion*/ ) const
{
return 2;
}
+
SfxItemPresentation XSecondaryFillColorItem::GetPresentation
(
SfxItemPresentation ePres,
@@ -3061,15 +2479,7 @@ SfxItemPresentation XSecondaryFillColorItem::GetPresentation
}
}
-// ----------------
// class XGradient
-// ----------------
-
-/*************************************************************************
-|*
-|* XGradient::XGradient()
-|*
-*************************************************************************/
XGradient::XGradient() :
eStyle( XGRAD_LINEAR ),
@@ -3085,13 +2495,6 @@ XGradient::XGradient() :
{
}
-/*************************************************************************
-|*
-|* XGradient::XGradient(XGradientStyle, const Color&, const Color&,
-|* long, sal_uInt16, sal_uInt16, sal_uInt16)
-|*
-*************************************************************************/
-
XGradient::XGradient(const Color& rStart, const Color& rEnd,
XGradientStyle eTheStyle, long nTheAngle, sal_uInt16 nXOfs,
sal_uInt16 nYOfs, sal_uInt16 nTheBorder,
@@ -3110,12 +2513,6 @@ XGradient::XGradient(const Color& rStart, const Color& rEnd,
{
}
-/*************************************************************************
-|*
-|* int XGradient::operator==(const SfxPoolItem& rItem) const
-|*
-*************************************************************************/
-
bool XGradient::operator==(const XGradient& rGradient) const
{
return ( eStyle == rGradient.eStyle &&
@@ -3146,17 +2543,9 @@ Gradient XGradient::VclGradient() const
return aGradient;
}
-// -----------------------
// class XFillGradientItem
-// -----------------------
-TYPEINIT1_AUTOFACTORY(XFillGradientItem, NameOrIndex);
-/*************************************************************************
-|*
-|* XFillGradientItem::XFillGradientItem(sal_Int32 nIndex,
-|* const XGradient& rTheGradient)
-|*
-*************************************************************************/
+TYPEINIT1_AUTOFACTORY(XFillGradientItem, NameOrIndex);
XFillGradientItem::XFillGradientItem(sal_Int32 nIndex,
const XGradient& rTheGradient) :
@@ -3165,13 +2554,6 @@ XFillGradientItem::XFillGradientItem(sal_Int32 nIndex,
{
}
-/*************************************************************************
-|*
-|* XFillGradientItem::XFillGradientItem(const XubString& rName,
-|* const XGradient& rTheGradient)
-|*
-*************************************************************************/
-
XFillGradientItem::XFillGradientItem(const OUString& rName,
const XGradient& rTheGradient, sal_uInt16 nWhich)
: NameOrIndex(nWhich, rName)
@@ -3179,24 +2561,12 @@ XFillGradientItem::XFillGradientItem(const OUString& rName,
{
}
-/*************************************************************************
-|*
-|* XFillGradientItem::XFillGradientItem(const XFillGradientItem& rItem)
-|*
-*************************************************************************/
-
XFillGradientItem::XFillGradientItem(const XFillGradientItem& rItem) :
NameOrIndex(rItem),
aGradient(rItem.aGradient)
{
}
-/*************************************************************************
-|*
-|* XFillGradientItem::XFillGradientItem(SvStream& rIn)
-|*
-*************************************************************************/
-
XFillGradientItem::XFillGradientItem(SvStream& rIn, sal_uInt16 nVer) :
NameOrIndex(XATTR_FILLGRADIENT, rIn),
aGradient(COL_BLACK, COL_WHITE)
@@ -3230,8 +2600,7 @@ XFillGradientItem::XFillGradientItem(SvStream& rIn, sal_uInt16 nVer) :
rIn >> nUSTemp; aGradient.SetStartIntens(nUSTemp);
rIn >> nUSTemp; aGradient.SetEndIntens(nUSTemp);
- // bei neueren Versionen wird zusaetzlich
- // die Schrittweite mit eingelesen
+ // for newer versions consider the step width as well
if (nVer >= 1)
{
rIn >> nUSTemp; aGradient.SetSteps(nUSTemp);
@@ -3239,54 +2608,28 @@ XFillGradientItem::XFillGradientItem(SvStream& rIn, sal_uInt16 nVer) :
}
}
-//*************************************************************************
-
XFillGradientItem::XFillGradientItem( const XGradient& rTheGradient )
: NameOrIndex( XATTR_FILLGRADIENT, -1 ),
aGradient(rTheGradient)
{
}
-/*************************************************************************
-|*
-|* XFillGradientItem::Clone(SfxItemPool* pPool) const
-|*
-*************************************************************************/
-
SfxPoolItem* XFillGradientItem::Clone(SfxItemPool* /*pPool*/) const
{
return new XFillGradientItem(*this);
}
-/*************************************************************************
-|*
-|* int XFillGradientItem::operator==(const SfxPoolItem& rItem) const
-|*
-*************************************************************************/
-
int XFillGradientItem::operator==(const SfxPoolItem& rItem) const
{
return ( NameOrIndex::operator==(rItem) &&
aGradient == ((const XFillGradientItem&) rItem).aGradient );
}
-/*************************************************************************
-|*
-|* SfxPoolItem* XFillGradientItem::Create(SvStream& rIn, sal_uInt16 nVer) const
-|*
-*************************************************************************/
-
SfxPoolItem* XFillGradientItem::Create(SvStream& rIn, sal_uInt16 nVer) const
{
return new XFillGradientItem(rIn, nVer);
}
-/*************************************************************************
-|*
-|* SfxPoolItem* XFillGradientItem::Store(SvStream& rOut) const
-|*
-*************************************************************************/
-
SvStream& XFillGradientItem::Store( SvStream& rOut, sal_uInt16 nItemVersion ) const
{
NameOrIndex::Store( rOut, nItemVersion );
@@ -3316,13 +2659,6 @@ SvStream& XFillGradientItem::Store( SvStream& rOut, sal_uInt16 nItemVersion ) co
return rOut;
}
-/*************************************************************************
-|*
-|* const XGradient& XFillGradientItem::GetValue(const XGradientList* pTable)
-|* const
-|*
-*************************************************************************/
-
const XGradient& XFillGradientItem::GetGradientValue() const // GetValue -> GetGradientValue
{
if (!IsIndex())
@@ -3332,13 +2668,6 @@ const XGradient& XFillGradientItem::GetGradientValue() const // GetValue -> GetG
return aGradient;
}
-
-/*************************************************************************
-|*
-|* sal_uInt16 XFillGradientItem::GetVersion() const
-|*
-*************************************************************************/
-
sal_uInt16 XFillGradientItem::GetVersion( sal_uInt16 /*nFileFormatVersion*/) const
{
// !!! this version number also represents the version number of superclasses
@@ -3347,8 +2676,6 @@ sal_uInt16 XFillGradientItem::GetVersion( sal_uInt16 /*nFileFormatVersion*/) con
return 1;
}
-//------------------------------------------------------------------------
-
SfxItemPresentation XFillGradientItem::GetPresentation
(
SfxItemPresentation ePres,
@@ -3371,7 +2698,6 @@ SfxItemPresentation XFillGradientItem::GetPresentation
}
}
-// -----------------------------------------------------------------------
bool XFillGradientItem::QueryValue( ::com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId ) const
{
//sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS);
@@ -3449,7 +2775,6 @@ bool XFillGradientItem::QueryValue( ::com::sun::star::uno::Any& rVal, sal_uInt8
return true;
}
-// -----------------------------------------------------------------------
bool XFillGradientItem::PutValue( const ::com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId )
{
// sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS);
@@ -3617,22 +2942,16 @@ XFillGradientItem* XFillGradientItem::checkForUniqueItem( SdrModel* pModel ) con
return (XFillGradientItem*)this;
}
-// ----------------------------------
// class XFillFloatTransparenceItem -
-// ----------------------------------
TYPEINIT1_AUTOFACTORY( XFillFloatTransparenceItem, XFillGradientItem );
-// -----------------------------------------------------------------------------
-
XFillFloatTransparenceItem::XFillFloatTransparenceItem() :
bEnabled( sal_False )
{
SetWhich( XATTR_FILLFLOATTRANSPARENCE );
}
-//------------------------------------------------------------------------
-
XFillFloatTransparenceItem::XFillFloatTransparenceItem(const XubString& rName, const XGradient& rGradient, sal_Bool bEnable ) :
XFillGradientItem ( rName, rGradient ),
bEnabled ( bEnable )
@@ -3640,8 +2959,6 @@ XFillFloatTransparenceItem::XFillFloatTransparenceItem(const XubString& rName, c
SetWhich( XATTR_FILLFLOATTRANSPARENCE );
}
-//------------------------------------------------------------------------
-
XFillFloatTransparenceItem::XFillFloatTransparenceItem( const XFillFloatTransparenceItem& rItem ) :
XFillGradientItem ( rItem ),
bEnabled ( rItem.bEnabled )
@@ -3649,8 +2966,6 @@ XFillFloatTransparenceItem::XFillFloatTransparenceItem( const XFillFloatTranspar
SetWhich( XATTR_FILLFLOATTRANSPARENCE );
}
-//*************************************************************************
-
XFillFloatTransparenceItem::XFillFloatTransparenceItem(SfxItemPool* /*pPool*/, const XGradient& rTheGradient, sal_Bool bEnable )
: XFillGradientItem ( -1, rTheGradient ),
bEnabled ( bEnable )
@@ -3658,8 +2973,6 @@ XFillFloatTransparenceItem::XFillFloatTransparenceItem(SfxItemPool* /*pPool*/, c
SetWhich( XATTR_FILLFLOATTRANSPARENCE );
}
-//------------------------------------------------------------------------
-
int XFillFloatTransparenceItem::operator==( const SfxPoolItem& rItem ) const
{
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list