diff options
author | Philipp Riemer <ruderphilipp@gmail.com> | 2013-08-21 15:15:47 +0200 |
---|---|---|
committer | Philipp Riemer <ruderphilipp@gmail.com> | 2013-08-21 21:18:24 +0200 |
commit | 349c91c8ec6afc1f5c8499529d559af34d115a76 (patch) | |
tree | 85fe850119defc86a9884178df316fa50c380c48 | |
parent | 962c5052eec48774255f3115f88170c3ebb246b0 (diff) |
fdo#62475 , fdo#39468: remove visual noise and translate German comments in svx/source/xoutdev/
-rw-r--r-- | svx/source/xoutdev/_xoutbmp.cxx | 15 | ||||
-rw-r--r-- | svx/source/xoutdev/_xpoly.cxx | 548 | ||||
-rw-r--r-- | svx/source/xoutdev/xattr.cxx | 1199 | ||||
-rw-r--r-- | svx/source/xoutdev/xattr2.cxx | 232 | ||||
-rw-r--r-- | svx/source/xoutdev/xattrbmp.cxx | 112 | ||||
-rw-r--r-- | svx/source/xoutdev/xexch.cxx | 40 | ||||
-rw-r--r-- | svx/source/xoutdev/xpool.cxx | 28 | ||||
-rw-r--r-- | svx/source/xoutdev/xtabbtmp.cxx | 1 | ||||
-rw-r--r-- | svx/source/xoutdev/xtabcolr.cxx | 1 | ||||
-rw-r--r-- | svx/source/xoutdev/xtable.cxx | 7 |
10 files changed, 164 insertions, 2019 deletions
diff --git a/svx/source/xoutdev/_xoutbmp.cxx b/svx/source/xoutdev/_xoutbmp.cxx index 9d382fbfb8e6..92fb745927e3 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 6dd8462b606c..85cbcd754634 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 bc9940d5c34b..01588b87d3c0 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 { return ( NameOrIndex::operator==(rItem) ) && @@ -3667,15 +2980,11 @@ int XFillFloatTransparenceItem::operator==( const SfxPoolItem& rItem ) const ( bEnabled == ( (XFillFloatTransparenceItem&) rItem ).bEnabled ); } -//------------------------------------------------------------------------ - SfxPoolItem* XFillFloatTransparenceItem::Clone( SfxItemPool* /*pPool*/) const { return new XFillFloatTransparenceItem( *this ); } -//------------------------------------------------------------------------ - sal_uInt16 XFillFloatTransparenceItem::GetVersion( sal_uInt16 nFileFormatVersion ) const { // !!! if version number of this object must be increased, please !!! @@ -3683,22 +2992,16 @@ sal_uInt16 XFillFloatTransparenceItem::GetVersion( sal_uInt16 nFileFormatVersion return XFillGradientItem::GetVersion( nFileFormatVersion ); } -//------------------------------------------------------------------------ - bool XFillFloatTransparenceItem::QueryValue( ::com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId ) const { return XFillGradientItem::QueryValue( rVal, nMemberId ); } -//------------------------------------------------------------------------ - bool XFillFloatTransparenceItem::PutValue( const ::com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId ) { return XFillGradientItem::PutValue( rVal, nMemberId ); } -//------------------------------------------------------------------------ - SfxItemPresentation XFillFloatTransparenceItem::GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreUnit, SfxMapUnit ePresUnit, OUString& rText, @@ -3747,15 +3050,7 @@ XFillFloatTransparenceItem* XFillFloatTransparenceItem::checkForUniqueItem( SdrM return (XFillFloatTransparenceItem*)this; } -// ------------- // class XHatch -// ------------- - -/************************************************************************* -|* -|* XHatch::XHatch(XHatchStyle, const Color&, long, long) -|* -*************************************************************************/ XHatch::XHatch(const Color& rCol, XHatchStyle eTheStyle, long nTheDistance, long nTheAngle) : @@ -3766,12 +3061,6 @@ XHatch::XHatch(const Color& rCol, XHatchStyle eTheStyle, long nTheDistance, { } -/************************************************************************* -|* -|* int XHatch::operator==(const SfxPoolItem& rItem) const -|* -*************************************************************************/ - bool XHatch::operator==(const XHatch& rHatch) const { return ( eStyle == rHatch.eStyle && @@ -3780,18 +3069,9 @@ bool XHatch::operator==(const XHatch& rHatch) const nAngle == rHatch.nAngle ); } - -// ----------------------- // class XFillHatchItem -// ----------------------- -TYPEINIT1_AUTOFACTORY(XFillHatchItem, NameOrIndex); -/************************************************************************* -|* -|* XFillHatchItem::XFillHatchItem(const XubString& rName, -|* const XHatch& rTheHatch) -|* -*************************************************************************/ +TYPEINIT1_AUTOFACTORY(XFillHatchItem, NameOrIndex); XFillHatchItem::XFillHatchItem(const XubString& rName, const XHatch& rTheHatch) : @@ -3800,24 +3080,12 @@ XFillHatchItem::XFillHatchItem(const XubString& rName, { } -/************************************************************************* -|* -|* XFillHatchItem::XFillHatchItem(const XFillHatchItem& rItem) -|* -*************************************************************************/ - XFillHatchItem::XFillHatchItem(const XFillHatchItem& rItem) : NameOrIndex(rItem), aHatch(rItem.aHatch) { } -/************************************************************************* -|* -|* XFillHatchItem::XFillHatchItem(SvStream& rIn) -|* -*************************************************************************/ - XFillHatchItem::XFillHatchItem(SvStream& rIn) : NameOrIndex(XATTR_FILLHATCH, rIn), aHatch(COL_BLACK) @@ -3843,54 +3111,28 @@ XFillHatchItem::XFillHatchItem(SvStream& rIn) : } } -//************************************************************************* - XFillHatchItem::XFillHatchItem(SfxItemPool* /*pPool*/, const XHatch& rTheHatch) : NameOrIndex( XATTR_FILLHATCH, -1 ), aHatch(rTheHatch) { } -/************************************************************************* -|* -|* XFillHatchItem::Clone(SfxItemPool* pPool) const -|* -*************************************************************************/ - SfxPoolItem* XFillHatchItem::Clone(SfxItemPool* /*pPool*/) const { return new XFillHatchItem(*this); } -/************************************************************************* -|* -|* int XFillHatchItem::operator==(const SfxPoolItem& rItem) const -|* -*************************************************************************/ - int XFillHatchItem::operator==(const SfxPoolItem& rItem) const { return ( NameOrIndex::operator==(rItem) && aHatch == ((const XFillHatchItem&) rItem).aHatch ); } -/************************************************************************* -|* -|* SfxPoolItem* XFillHatchItem::Create(SvStream& rIn, sal_uInt16 nVer) const -|* -*************************************************************************/ - SfxPoolItem* XFillHatchItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) const { return new XFillHatchItem(rIn); } -/************************************************************************* -|* -|* SfxPoolItem* XFillHatchItem::Store(SvStream& rOut) const -|* -*************************************************************************/ - SvStream& XFillHatchItem::Store( SvStream& rOut, sal_uInt16 nItemVersion ) const { NameOrIndex::Store( rOut, nItemVersion ); @@ -3911,12 +3153,6 @@ SvStream& XFillHatchItem::Store( SvStream& rOut, sal_uInt16 nItemVersion ) const return rOut; } -/************************************************************************* -|* -|* const XHatch& XFillHatchItem::GetValue(const XHatchList* pTable) const -|* -*************************************************************************/ - const XHatch& XFillHatchItem::GetHatchValue() const // GetValue -> GetHatchValue { //if (!IsIndex()) @@ -3926,8 +3162,6 @@ const XHatch& XFillHatchItem::GetHatchValue() const // GetValue -> GetHatchValue return aHatch; } -//------------------------------------------------------------------------ - SfxItemPresentation XFillHatchItem::GetPresentation ( SfxItemPresentation ePres, @@ -3950,22 +3184,17 @@ SfxItemPresentation XFillHatchItem::GetPresentation } } -//------------------------------------------------------------------------ - bool XFillHatchItem::HasMetrics() const { return true; } -//------------------------------------------------------------------------ - bool XFillHatchItem::ScaleMetrics(long nMul, long nDiv) { aHatch.SetDistance( ScaleMetricValue( aHatch.GetDistance(), nMul, nDiv ) ); return true; } -// ----------------------------------------------------------------------- bool XFillHatchItem::QueryValue( ::com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId ) const { // sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); @@ -4027,7 +3256,6 @@ bool XFillHatchItem::QueryValue( ::com::sun::star::uno::Any& rVal, sal_uInt8 nMe return true; } -// ----------------------------------------------------------------------- bool XFillHatchItem::PutValue( const ::com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId ) { // sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); @@ -4147,54 +3375,27 @@ XFillHatchItem* XFillHatchItem::checkForUniqueItem( SdrModel* pModel ) const return (XFillHatchItem*)this; } -//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -// FormText-Attribute -//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +// --- form text attributes --- -//------------------------- // class XFormTextStyleItem -//------------------------- -TYPEINIT1_AUTOFACTORY(XFormTextStyleItem, SfxEnumItem); -/************************************************************************* -|* -|* XFormTextStyleItem::XFormTextStyleItem() -|* -*************************************************************************/ +TYPEINIT1_AUTOFACTORY(XFormTextStyleItem, SfxEnumItem); XFormTextStyleItem::XFormTextStyleItem(XFormTextStyle eTheStyle) : SfxEnumItem(XATTR_FORMTXTSTYLE, sal::static_int_cast< sal_uInt16 >(eTheStyle)) { } -/************************************************************************* -|* -|* XFormTextStyleItem::XFormTextStyleItem(SvStream& rIn) -|* -*************************************************************************/ - XFormTextStyleItem::XFormTextStyleItem(SvStream& rIn) : SfxEnumItem(XATTR_FORMTXTSTYLE, rIn) { } -/************************************************************************* -|* -|* XFormTextStyleItem::Clone(SfxItemPool* pPool) const -|* -*************************************************************************/ - SfxPoolItem* XFormTextStyleItem::Clone(SfxItemPool* /*pPool*/) const { return new XFormTextStyleItem( *this ); } -/************************************************************************* -|* -|* SfxPoolItem* XFormTextStyleItem::Create(SvStream& rIn, sal_uInt16 nVer) const -|* -*************************************************************************/ - SfxPoolItem* XFormTextStyleItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) const { return new XFormTextStyleItem(rIn); @@ -4222,50 +3423,25 @@ bool XFormTextStyleItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberId*/ return true; } -//------------------------- // class XFormTextAdjustItem -//------------------------- -TYPEINIT1_AUTOFACTORY(XFormTextAdjustItem, SfxEnumItem); -/************************************************************************* -|* -|* XFormTextAdjustItem::XFormTextAdjustItem() -|* -*************************************************************************/ +TYPEINIT1_AUTOFACTORY(XFormTextAdjustItem, SfxEnumItem); XFormTextAdjustItem::XFormTextAdjustItem(XFormTextAdjust eTheAdjust) : SfxEnumItem(XATTR_FORMTXTADJUST, sal::static_int_cast< sal_uInt16 >(eTheAdjust)) { } -/************************************************************************* -|* -|* XFormTextAdjustItem::XFormTextAdjustItem(SvStream& rIn) -|* -*************************************************************************/ - XFormTextAdjustItem::XFormTextAdjustItem(SvStream& rIn) : SfxEnumItem(XATTR_FORMTXTADJUST, rIn) { } -/************************************************************************* -|* -|* XFormTextAdjustItem::Clone(SfxItemPool* pPool) const -|* -*************************************************************************/ - SfxPoolItem* XFormTextAdjustItem::Clone(SfxItemPool* /*pPool*/) const { return new XFormTextAdjustItem( *this ); } -/************************************************************************* -|* -|* SfxPoolItem* XFormTextAdjustItem::Create(SvStream& rIn, sal_uInt16 nVer) const -|* -*************************************************************************/ - SfxPoolItem* XFormTextAdjustItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) const { return new XFormTextAdjustItem(rIn); @@ -4293,215 +3469,105 @@ bool XFormTextAdjustItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberId* return true; } -//---------------------------- // class XFormTextDistanceItem -//---------------------------- -TYPEINIT1_AUTOFACTORY(XFormTextDistanceItem, SfxMetricItem); -/************************************************************************* -|* -|* XFormTextDistanceItem::XFormTextDistanceItem() -|* -*************************************************************************/ +TYPEINIT1_AUTOFACTORY(XFormTextDistanceItem, SfxMetricItem); XFormTextDistanceItem::XFormTextDistanceItem(long nDist) : SfxMetricItem(XATTR_FORMTXTDISTANCE, nDist) { } -/************************************************************************* -|* -|* XFormTextDistanceItem::XFormTextDistanceItem(SvStream& rIn) -|* -*************************************************************************/ - XFormTextDistanceItem::XFormTextDistanceItem(SvStream& rIn) : SfxMetricItem(XATTR_FORMTXTDISTANCE, rIn) { } -/************************************************************************* -|* -|* XFormTextDistanceItem::Clone(SfxItemPool* pPool) const -|* -*************************************************************************/ - SfxPoolItem* XFormTextDistanceItem::Clone(SfxItemPool* /*pPool*/) const { return new XFormTextDistanceItem(*this); } -/************************************************************************* -|* -|* SfxPoolItem* XFormTextDistanceItem::Create(SvStream& rIn, sal_uInt16 nVer) const -|* -*************************************************************************/ - SfxPoolItem* XFormTextDistanceItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) const { return new XFormTextDistanceItem(rIn); } -//------------------------- // class XFormTextStartItem -//------------------------- -TYPEINIT1_AUTOFACTORY(XFormTextStartItem, SfxMetricItem); -/************************************************************************* -|* -|* XFormTextStartItem::XFormTextStartItem(long nStart) -|* -*************************************************************************/ +TYPEINIT1_AUTOFACTORY(XFormTextStartItem, SfxMetricItem); XFormTextStartItem::XFormTextStartItem(long nStart) : SfxMetricItem(XATTR_FORMTXTSTART, nStart) { } -/************************************************************************* -|* -|* XFormTextStartItem::XFormTextStartItem(SvStream& rIn) -|* -*************************************************************************/ - XFormTextStartItem::XFormTextStartItem(SvStream& rIn) : SfxMetricItem(XATTR_FORMTXTSTART, rIn) { } -/************************************************************************* -|* -|* XFormTextStartItem::Clone(SfxItemPool* pPool) const -|* -*************************************************************************/ - SfxPoolItem* XFormTextStartItem::Clone(SfxItemPool* /*pPool*/) const { return new XFormTextStartItem(*this); } -/************************************************************************* -|* -|* SfxPoolItem* XFormTextStartItem::Create(SvStream& rIn, sal_uInt16 nVer) const -|* -*************************************************************************/ - SfxPoolItem* XFormTextStartItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) const { return new XFormTextStartItem(rIn); } -// ------------------------- // class XFormTextMirrorItem -// ------------------------- -TYPEINIT1_AUTOFACTORY(XFormTextMirrorItem, SfxBoolItem); -/************************************************************************* -|* -|* XFormTextMirrorItem::XFormTextMirrorItem(sal_Bool bMirror) -|* -*************************************************************************/ +TYPEINIT1_AUTOFACTORY(XFormTextMirrorItem, SfxBoolItem); XFormTextMirrorItem::XFormTextMirrorItem(sal_Bool bMirror) : SfxBoolItem(XATTR_FORMTXTMIRROR, bMirror) { } -/************************************************************************* -|* -|* XFormTextMirrorItem::XFormTextMirrorItem(SvStream& rIn) -|* -*************************************************************************/ - XFormTextMirrorItem::XFormTextMirrorItem(SvStream& rIn) : SfxBoolItem(XATTR_FORMTXTMIRROR, rIn) { } -/************************************************************************* -|* -|* XFormTextMirrorItem::Clone(SfxItemPool* pPool) const -|* -*************************************************************************/ - SfxPoolItem* XFormTextMirrorItem::Clone(SfxItemPool* /*pPool*/) const { return new XFormTextMirrorItem(*this); } -/************************************************************************* -|* -|* SfxPoolItem* XFormTextMirrorItem::Create(SvStream& rIn, sal_uInt16 nVer) -|* const -|* -*************************************************************************/ - SfxPoolItem* XFormTextMirrorItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) const { return new XFormTextMirrorItem(rIn); } - -// -------------------------- // class XFormTextOutlineItem -// -------------------------- -TYPEINIT1_AUTOFACTORY(XFormTextOutlineItem, SfxBoolItem); -/************************************************************************* -|* -|* XFormTextOutlineItem::XFormTextOutlineItem() -|* -*************************************************************************/ +TYPEINIT1_AUTOFACTORY(XFormTextOutlineItem, SfxBoolItem); XFormTextOutlineItem::XFormTextOutlineItem(sal_Bool bOutline) : SfxBoolItem(XATTR_FORMTXTOUTLINE, bOutline) { } -/************************************************************************* -|* -|* XFormTextOutlineItem::XFormTextOutlineItem(SvStream& rIn) -|* -*************************************************************************/ - XFormTextOutlineItem::XFormTextOutlineItem(SvStream& rIn) : SfxBoolItem(XATTR_FORMTXTOUTLINE, rIn) { } -/************************************************************************* -|* -|* XFormTextOutlineItem::Clone(SfxItemPool* pPool) const -|* -*************************************************************************/ - SfxPoolItem* XFormTextOutlineItem::Clone(SfxItemPool* /*pPool*/) const { return new XFormTextOutlineItem(*this); } -/************************************************************************* -|* -|* SfxPoolItem* XFormTextOutlineItem::Create(SvStream& rIn, sal_uInt16 nVer) -|* const -|* -*************************************************************************/ - SfxPoolItem* XFormTextOutlineItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) const { return new XFormTextOutlineItem(rIn); } -//-------------------------- // class XFormTextShadowItem -//-------------------------- -TYPEINIT1_AUTOFACTORY(XFormTextShadowItem, SfxEnumItem); -/************************************************************************* -|* -|* XFormTextShadowItem::XFormTextShadowItem() -|* -*************************************************************************/ +TYPEINIT1_AUTOFACTORY(XFormTextShadowItem, SfxEnumItem); XFormTextShadowItem::XFormTextShadowItem(XFormTextShadow eFormTextShadow) : SfxEnumItem( @@ -4509,34 +3575,16 @@ XFormTextShadowItem::XFormTextShadowItem(XFormTextShadow eFormTextShadow) : { } -/************************************************************************* -|* -|* XFormTextShadowItem::XFormTextShadowItem(SvStream& rIn) -|* -*************************************************************************/ - XFormTextShadowItem::XFormTextShadowItem(SvStream& rIn) : SfxEnumItem(XATTR_FORMTXTSHADOW, rIn) { } -/************************************************************************* -|* -|* XFormTextShadowItem::Clone(SfxItemPool* pPool) const -|* -*************************************************************************/ - SfxPoolItem* XFormTextShadowItem::Clone(SfxItemPool* /*pPool*/) const { return new XFormTextShadowItem( *this ); } -/************************************************************************* -|* -|* SfxPoolItem* XFormTextShadowItem::Create(SvStream& rIn, sal_uInt16 nVer) const -|* -*************************************************************************/ - SfxPoolItem* XFormTextShadowItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) const { return new XFormTextShadowItem(rIn); @@ -4564,16 +3612,9 @@ bool XFormTextShadowItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberId* return true; } -// ------------------------------- // class XFormTextShadowColorItem -// ------------------------------- -TYPEINIT1_AUTOFACTORY(XFormTextShadowColorItem, XColorItem); -/************************************************************************* -|* -|* XFormTextShadowColorItem::XFormTextShadowColorItem(const XubString& rName, const Color& rTheColor) -|* -*************************************************************************/ +TYPEINIT1_AUTOFACTORY(XFormTextShadowColorItem, XColorItem); XFormTextShadowColorItem::XFormTextShadowColorItem(const XubString& rName, const Color& rTheColor) : @@ -4581,246 +3622,126 @@ XFormTextShadowColorItem::XFormTextShadowColorItem(const XubString& rName, { } -/************************************************************************* -|* -|* XFormTextShadowColorItem::XFormTextShadowColorItem(SvStream& rIn) -|* -*************************************************************************/ - XFormTextShadowColorItem::XFormTextShadowColorItem(SvStream& rIn) : XColorItem(XATTR_FORMTXTSHDWCOLOR, rIn) { } -/************************************************************************* -|* -|* XFormTextShadowColorItem::Clone(SfxItemPool* pPool) const -|* -*************************************************************************/ - SfxPoolItem* XFormTextShadowColorItem::Clone(SfxItemPool* /*pPool*/) const { return new XFormTextShadowColorItem(*this); } -/************************************************************************* -|* -|* SfxPoolItem* XFormTextShadowColorItem::Create(SvStream& rIn, sal_uInt16 nVer) const -|* -*************************************************************************/ - SfxPoolItem* XFormTextShadowColorItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) const { return new XFormTextShadowColorItem(rIn); } -//------------------------------ // class XFormTextShadowXValItem -//------------------------------ -TYPEINIT1_AUTOFACTORY(XFormTextShadowXValItem, SfxMetricItem); -/************************************************************************* -|* -|* XFormTextShadowXValItem::XFormTextShadowXValItem(long) -|* -*************************************************************************/ +TYPEINIT1_AUTOFACTORY(XFormTextShadowXValItem, SfxMetricItem); XFormTextShadowXValItem::XFormTextShadowXValItem(long nVal) : SfxMetricItem(XATTR_FORMTXTSHDWXVAL, nVal) { } -/************************************************************************* -|* -|* XFormTextShadowXValItem::XFormTextShadowXValItem(SvStream& rIn) -|* -*************************************************************************/ - XFormTextShadowXValItem::XFormTextShadowXValItem(SvStream& rIn) : SfxMetricItem(XATTR_FORMTXTSHDWXVAL, rIn) { } -/************************************************************************* -|* -|* XFormTextShadowXValItem::Clone(SfxItemPool* pPool) const -|* -*************************************************************************/ - SfxPoolItem* XFormTextShadowXValItem::Clone(SfxItemPool* /*pPool*/) const { return new XFormTextShadowXValItem(*this); } -/************************************************************************* -|* -|* SfxPoolItem* XFormTextShadowXValItem::Create(SvStream& rIn, sal_uInt16 nVer) const -|* -*************************************************************************/ - SfxPoolItem* XFormTextShadowXValItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) const { return new XFormTextShadowXValItem(rIn); } -//------------------------------ // class XFormTextShadowYValItem -//------------------------------ -TYPEINIT1_AUTOFACTORY(XFormTextShadowYValItem, SfxMetricItem); -/************************************************************************* -|* -|* XFormTextShadowYValItem::XFormTextShadowYValItem(long) -|* -*************************************************************************/ +TYPEINIT1_AUTOFACTORY(XFormTextShadowYValItem, SfxMetricItem); XFormTextShadowYValItem::XFormTextShadowYValItem(long nVal) : SfxMetricItem(XATTR_FORMTXTSHDWYVAL, nVal) { } -/************************************************************************* -|* -|* XFormTextShadowYValItem::XFormTextShadowYValItem(SvStream& rIn) -|* -*************************************************************************/ - XFormTextShadowYValItem::XFormTextShadowYValItem(SvStream& rIn) : SfxMetricItem(XATTR_FORMTXTSHDWYVAL, rIn) { } -/************************************************************************* -|* -|* XFormTextShadowYValItem::Clone(SfxItemPool* pPool) const -|* -*************************************************************************/ - SfxPoolItem* XFormTextShadowYValItem::Clone(SfxItemPool* /*pPool*/) const { return new XFormTextShadowYValItem(*this); } -/************************************************************************* -|* -|* SfxPoolItem* XFormTextShadowYValItem::Create(SvStream& rIn, sal_uInt16 nVer) const -|* -*************************************************************************/ - SfxPoolItem* XFormTextShadowYValItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) const { return new XFormTextShadowYValItem(rIn); } -// -------------------------- // class XFormTextHideFormItem -// -------------------------- -TYPEINIT1_AUTOFACTORY(XFormTextHideFormItem, SfxBoolItem); -/************************************************************************* -|* -|* XFormTextHideFormItem::XFormTextHideFormItem() -|* -*************************************************************************/ +TYPEINIT1_AUTOFACTORY(XFormTextHideFormItem, SfxBoolItem); XFormTextHideFormItem::XFormTextHideFormItem(sal_Bool bHide) : SfxBoolItem(XATTR_FORMTXTHIDEFORM, bHide) { } -/************************************************************************* -|* -|* XFormTextHideFormItem::XFormTextHideFormItem(SvStream& rIn) -|* -*************************************************************************/ - XFormTextHideFormItem::XFormTextHideFormItem(SvStream& rIn) : SfxBoolItem(XATTR_FORMTXTHIDEFORM, rIn) { } -/************************************************************************* -|* -|* XFormTextHideFormItem::Clone(SfxItemPool* pPool) const -|* -*************************************************************************/ - SfxPoolItem* XFormTextHideFormItem::Clone(SfxItemPool* /*pPool*/) const { return new XFormTextHideFormItem(*this); } -/************************************************************************* -|* -|* SfxPoolItem* XFormTextHideFormItem::Create(SvStream& rIn, sal_uInt16 nVer) -|* const -|* -*************************************************************************/ - SfxPoolItem* XFormTextHideFormItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) const { return new XFormTextHideFormItem(rIn); } - - -//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -// SetItems -//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +// --- SetItems --- TYPEINIT1(XLineAttrSetItem, SfxSetItem); -/************************************************************************* -|* -|* Konstruktoren fuer Linienattribute-SetItem -|* -\************************************************************************/ - +/// a line attribute set item XLineAttrSetItem::XLineAttrSetItem( SfxItemSet* pItemSet ) : SfxSetItem( XATTRSET_LINE, pItemSet) { } -/************************************************************************/ - XLineAttrSetItem::XLineAttrSetItem( SfxItemPool* pItemPool ) : SfxSetItem( XATTRSET_LINE, new SfxItemSet( *pItemPool, XATTR_LINE_FIRST, XATTR_LINE_LAST)) { } -/************************************************************************/ - XLineAttrSetItem::XLineAttrSetItem( const XLineAttrSetItem& rLineAttr ) : SfxSetItem( rLineAttr ) { } -/************************************************************************/ - XLineAttrSetItem::XLineAttrSetItem( const XLineAttrSetItem& rLineAttr, SfxItemPool* pItemPool) : SfxSetItem( rLineAttr, pItemPool ) { } -/************************************************************************* -|* -|* Clone-Funktion -|* -\************************************************************************/ - SfxPoolItem* XLineAttrSetItem::Clone( SfxItemPool* pPool ) const { return new XLineAttrSetItem( *this, pPool ); } -/************************************************************************* -|* -|* SetItem aus Stream erzeugen -|* -\************************************************************************/ - +/// create a set item out of a stream SfxPoolItem* XLineAttrSetItem::Create( SvStream& rStream, sal_uInt16 /*nVersion*/) const { SfxItemSet *pSet2 = new SfxItemSet( *GetItemSet().GetPool(), @@ -4829,12 +3750,7 @@ SfxPoolItem* XLineAttrSetItem::Create( SvStream& rStream, sal_uInt16 /*nVersion* return new XLineAttrSetItem( pSet2 ); } -/************************************************************************* -|* -|* SetItem in Stream speichern -|* -\************************************************************************/ - +/// save a set item in a stream SvStream& XLineAttrSetItem::Store( SvStream& rStream, sal_uInt16 nItemVersion ) const { return SfxSetItem::Store( rStream, nItemVersion ); @@ -4843,57 +3759,35 @@ SvStream& XLineAttrSetItem::Store( SvStream& rStream, sal_uInt16 nItemVersion ) TYPEINIT1(XFillAttrSetItem, SfxSetItem); -/************************************************************************* -|* -|* Konstruktoren fuer Fuellattribute-SetItem -|* -\************************************************************************/ - +/// fill attribute set item XFillAttrSetItem::XFillAttrSetItem( SfxItemSet* pItemSet ) : SfxSetItem( XATTRSET_FILL, pItemSet) { } -/************************************************************************/ - XFillAttrSetItem::XFillAttrSetItem( SfxItemPool* pItemPool ) : SfxSetItem( XATTRSET_FILL, new SfxItemSet( *pItemPool, XATTR_FILL_FIRST, XATTR_FILL_LAST)) { } -/************************************************************************/ - XFillAttrSetItem::XFillAttrSetItem( const XFillAttrSetItem& rFillAttr ) : SfxSetItem( rFillAttr ) { } -/************************************************************************/ - XFillAttrSetItem::XFillAttrSetItem( const XFillAttrSetItem& rFillAttr, SfxItemPool* pItemPool ) : SfxSetItem( rFillAttr, pItemPool ) { } -/************************************************************************* -|* -|* Clone-Funktion -|* -\************************************************************************/ - SfxPoolItem* XFillAttrSetItem::Clone( SfxItemPool* pPool ) const { return new XFillAttrSetItem( *this, pPool ); } -/************************************************************************* -|* -|* SetItem aus Stream erzeugen -|* -\************************************************************************/ - +/// create a set item out of a stream SfxPoolItem* XFillAttrSetItem::Create( SvStream& rStream, sal_uInt16 /*nVersion*/) const { SfxItemSet *pSet2 = new SfxItemSet( *GetItemSet().GetPool(), @@ -4902,12 +3796,7 @@ SfxPoolItem* XFillAttrSetItem::Create( SvStream& rStream, sal_uInt16 /*nVersion* return new XFillAttrSetItem( pSet2 ); } -/************************************************************************* -|* -|* SetItem in Stream speichern -|* -\************************************************************************/ - +/// save a set item in a stream SvStream& XFillAttrSetItem::Store( SvStream& rStream, sal_uInt16 nItemVersion ) const { return SfxSetItem::Store( rStream, nItemVersion ); diff --git a/svx/source/xoutdev/xattr2.cxx b/svx/source/xoutdev/xattr2.cxx index a697fba53b32..c7a94993e0a8 100644 --- a/svx/source/xoutdev/xattr2.cxx +++ b/svx/source/xoutdev/xattr2.cxx @@ -29,59 +29,30 @@ #include <svx/xdef.hxx> #include <svx/AffineMatrixItem.hxx> -/************************************************************************/ - -//------------------------------ // class XLineTransparenceItem -//------------------------------ -TYPEINIT1_AUTOFACTORY(XLineTransparenceItem, SfxUInt16Item); -/************************************************************************* -|* -|* XLineTransparenceItem::XLineTransparenceItem(sal_uInt16) -|* -*************************************************************************/ +TYPEINIT1_AUTOFACTORY(XLineTransparenceItem, SfxUInt16Item); XLineTransparenceItem::XLineTransparenceItem(sal_uInt16 nLineTransparence) : SfxUInt16Item(XATTR_LINETRANSPARENCE, nLineTransparence) { } -/************************************************************************* -|* -|* XLineTransparenceItem::XLineTransparenceItem(SvStream& rIn) -|* -*************************************************************************/ - XLineTransparenceItem::XLineTransparenceItem(SvStream& rIn) : SfxUInt16Item(XATTR_LINETRANSPARENCE, rIn) { } -/************************************************************************* -|* -|* XLineTransparenceItem::Clone(SfxItemPool* pPool) const -|* -*************************************************************************/ - SfxPoolItem* XLineTransparenceItem::Clone(SfxItemPool* /*pPool*/) const { return new XLineTransparenceItem(*this); } -/************************************************************************* -|* -|* SfxPoolItem* XLineTransparenceItem::Create(SvStream& rIn, sal_uInt16 nVer) const -|* -*************************************************************************/ - SfxPoolItem* XLineTransparenceItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) const { return new XLineTransparenceItem(rIn); } -//------------------------------------------------------------------------ - SfxItemPresentation XLineTransparenceItem::GetPresentation ( SfxItemPresentation ePres, @@ -106,35 +77,25 @@ SfxItemPresentation XLineTransparenceItem::GetPresentation } } -//----------------------- // class XLineJointItem - -//----------------------- TYPEINIT1_AUTOFACTORY(XLineJointItem, SfxEnumItem); -// ----------------------------------------------------------------------------- - XLineJointItem::XLineJointItem( com::sun::star::drawing::LineJoint eLineJoint ) : SfxEnumItem(XATTR_LINEJOINT, sal::static_int_cast< sal_uInt16 >(eLineJoint)) { } -// ----------------------------------------------------------------------------- - XLineJointItem::XLineJointItem( SvStream& rIn ) : SfxEnumItem( XATTR_LINEJOINT, rIn ) { } -// ----------------------------------------------------------------------------- - sal_uInt16 XLineJointItem::GetVersion( sal_uInt16 /*nFileFormatVersion*/) const { return 1; } -// ----------------------------------------------------------------------------- - SfxPoolItem* XLineJointItem::Create( SvStream& rIn, sal_uInt16 nVer ) const { XLineJointItem* pRet = new XLineJointItem( rIn ); @@ -145,15 +106,11 @@ SfxPoolItem* XLineJointItem::Create( SvStream& rIn, sal_uInt16 nVer ) const return pRet; } -// ----------------------------------------------------------------------------- - SfxPoolItem* XLineJointItem::Clone(SfxItemPool* /*pPool*/) const { return new XLineJointItem( *this ); } -// ----------------------------------------------------------------------------- - SfxItemPresentation XLineJointItem::GetPresentation( SfxItemPresentation ePres, SfxMapUnit /*eCoreUnit*/, SfxMapUnit /*ePresUnit*/, OUString& rText, const IntlWrapper*) const { @@ -205,8 +162,6 @@ SfxItemPresentation XLineJointItem::GetPresentation( SfxItemPresentation ePres, } } -// ----------------------------------------------------------------------------- - bool XLineJointItem::QueryValue( ::com::sun::star::uno::Any& rVal, sal_uInt8 /*nMemberId*/) const { const ::com::sun::star::drawing::LineJoint eJoint = GetValue(); @@ -214,8 +169,6 @@ bool XLineJointItem::QueryValue( ::com::sun::star::uno::Any& rVal, sal_uInt8 /*n return true; } -// ----------------------------------------------------------------------------- - bool XLineJointItem::PutValue( const ::com::sun::star::uno::Any& rVal, sal_uInt8 /*nMemberId*/) { ::com::sun::star::drawing::LineJoint eUnoJoint; @@ -234,17 +187,13 @@ bool XLineJointItem::PutValue( const ::com::sun::star::uno::Any& rVal, sal_uInt8 return true; } -// ----------------------------------------------------------------------------- - sal_uInt16 XLineJointItem::GetValueCount() const { // don't forget to update the api interface also return 5; } -//--------------------- // class AffineMatrixItem -//--------------------- TYPEINIT1_AUTOFACTORY(AffineMatrixItem, SfxPoolItem); @@ -352,35 +301,25 @@ const com::sun::star::geometry::AffineMatrix2D& AffineMatrixItem::GetAffineMatri return maMatrix; } -//----------------------- // class XLineCapItem - -//----------------------- TYPEINIT1_AUTOFACTORY(XLineCapItem, SfxEnumItem); -// ----------------------------------------------------------------------------- - XLineCapItem::XLineCapItem(com::sun::star::drawing::LineCap eLineCap) : SfxEnumItem(XATTR_LINECAP, sal::static_int_cast< sal_uInt16 >(eLineCap)) { } -// ----------------------------------------------------------------------------- - XLineCapItem::XLineCapItem( SvStream& rIn ) : SfxEnumItem(XATTR_LINECAP, rIn) { } -// ----------------------------------------------------------------------------- - sal_uInt16 XLineCapItem::GetVersion( sal_uInt16 /*nFileFormatVersion*/) const { return 1; } -// ----------------------------------------------------------------------------- - SfxPoolItem* XLineCapItem::Create( SvStream& rIn, sal_uInt16 nVer ) const { XLineCapItem* pRet = new XLineCapItem( rIn ); @@ -391,15 +330,11 @@ SfxPoolItem* XLineCapItem::Create( SvStream& rIn, sal_uInt16 nVer ) const return pRet; } -// ----------------------------------------------------------------------------- - SfxPoolItem* XLineCapItem::Clone(SfxItemPool* /*pPool*/) const { return new XLineCapItem( *this ); } -// ----------------------------------------------------------------------------- - SfxItemPresentation XLineCapItem::GetPresentation( SfxItemPresentation ePres, SfxMapUnit /*eCoreUnit*/, SfxMapUnit /*ePresUnit*/, OUString& rText, const IntlWrapper*) const { @@ -439,8 +374,6 @@ SfxItemPresentation XLineCapItem::GetPresentation( SfxItemPresentation ePres, Sf } } -// ----------------------------------------------------------------------------- - bool XLineCapItem::QueryValue( ::com::sun::star::uno::Any& rVal, sal_uInt8 /*nMemberId*/) const { const com::sun::star::drawing::LineCap eCap(GetValue()); @@ -448,8 +381,6 @@ bool XLineCapItem::QueryValue( ::com::sun::star::uno::Any& rVal, sal_uInt8 /*nMe return true; } -// ----------------------------------------------------------------------------- - bool XLineCapItem::PutValue( const ::com::sun::star::uno::Any& rVal, sal_uInt8 /*nMemberId*/) { com::sun::star::drawing::LineCap eUnoCap; @@ -476,16 +407,12 @@ bool XLineCapItem::PutValue( const ::com::sun::star::uno::Any& rVal, sal_uInt8 / return true; } -// ----------------------------------------------------------------------------- - sal_uInt16 XLineCapItem::GetValueCount() const { // don't forget to update the api interface also return 3; } -// ----------------------------------------------------------------------------- - com::sun::star::drawing::LineCap XLineCapItem::GetValue() const { const com::sun::star::drawing::LineCap eRetval((com::sun::star::drawing::LineCap)SfxEnumItem::GetValue()); @@ -496,57 +423,30 @@ com::sun::star::drawing::LineCap XLineCapItem::GetValue() const return eRetval; } -//------------------------------ // class XFillTransparenceItem -//------------------------------ -TYPEINIT1_AUTOFACTORY(XFillTransparenceItem, SfxUInt16Item); -/************************************************************************* -|* -|* XFillTransparenceItem::XFillTransparenceItem(sal_uInt16) -|* -*************************************************************************/ +TYPEINIT1_AUTOFACTORY(XFillTransparenceItem, SfxUInt16Item); XFillTransparenceItem::XFillTransparenceItem(sal_uInt16 nFillTransparence) : SfxUInt16Item(XATTR_FILLTRANSPARENCE, nFillTransparence) { } -/************************************************************************* -|* -|* XFillTransparenceItem::XFillTransparenceItem(SvStream& rIn) -|* -*************************************************************************/ - XFillTransparenceItem::XFillTransparenceItem(SvStream& rIn) : SfxUInt16Item(XATTR_FILLTRANSPARENCE, rIn) { } -/************************************************************************* -|* -|* XFillTransparenceItem::Clone(SfxItemPool* pPool) const -|* -*************************************************************************/ - SfxPoolItem* XFillTransparenceItem::Clone(SfxItemPool* /*pPool*/) const { return new XFillTransparenceItem(*this); } -/************************************************************************* -|* -|* SfxPoolItem* XFillTransparenceItem::Create(SvStream& rIn, sal_uInt16 nVer) const -|* -*************************************************************************/ - SfxPoolItem* XFillTransparenceItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) const { return new XFillTransparenceItem(rIn); } -//------------------------------------------------------------------------ - SfxItemPresentation XFillTransparenceItem::GetPresentation ( SfxItemPresentation ePres, @@ -571,107 +471,54 @@ SfxItemPresentation XFillTransparenceItem::GetPresentation } } -//------------------------------ // class XFormTextShadowTranspItem -//------------------------------ -TYPEINIT1_AUTOFACTORY(XFormTextShadowTranspItem, SfxUInt16Item); -/************************************************************************* -|* -|* XFormTextShadowTranspItem::XFormTextShadowTranspItem(sal_uInt16) -|* -*************************************************************************/ +TYPEINIT1_AUTOFACTORY(XFormTextShadowTranspItem, SfxUInt16Item); XFormTextShadowTranspItem::XFormTextShadowTranspItem(sal_uInt16 nShdwTransparence) : SfxUInt16Item(XATTR_FORMTXTSHDWTRANSP, nShdwTransparence) { } -/************************************************************************* -|* -|* XFormTextShadowTranspItem::XFormTextShadowTranspItem(SvStream& rIn) -|* -*************************************************************************/ - XFormTextShadowTranspItem::XFormTextShadowTranspItem(SvStream& rIn) : SfxUInt16Item(XATTR_FORMTXTSHDWTRANSP, rIn) { } -/************************************************************************* -|* -|* XFormTextShadowTranspItem::Clone(SfxItemPool* pPool) const -|* -*************************************************************************/ - SfxPoolItem* XFormTextShadowTranspItem::Clone(SfxItemPool* /*pPool*/) const { return new XFormTextShadowTranspItem(*this); } -/************************************************************************* -|* -|* SfxPoolItem* XFormTextShadowTranspItem::Create(SvStream& rIn, sal_uInt16 nVer) const -|* -*************************************************************************/ - SfxPoolItem* XFormTextShadowTranspItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) const { return new XFormTextShadowTranspItem(rIn); } - -//------------------------------ // class XFillGradientStepCountItem -//------------------------------ -TYPEINIT1_AUTOFACTORY(XGradientStepCountItem, SfxUInt16Item); -/************************************************************************* -|* -|* XGradientStepCountItem::XGradientStepCountItem( sal_uInt16 ) -|* -*************************************************************************/ +TYPEINIT1_AUTOFACTORY(XGradientStepCountItem, SfxUInt16Item); XGradientStepCountItem::XGradientStepCountItem( sal_uInt16 nStepCount ) : SfxUInt16Item( XATTR_GRADIENTSTEPCOUNT, nStepCount ) { } -/************************************************************************* -|* -|* XGradientStepCountItem::XGradientStepCountItem( SvStream& rIn ) -|* -*************************************************************************/ - XGradientStepCountItem::XGradientStepCountItem( SvStream& rIn ) : SfxUInt16Item( XATTR_GRADIENTSTEPCOUNT, rIn ) { } -/************************************************************************* -|* -|* XGradientStepCountItem::Clone( SfxItemPool* pPool ) const -|* -*************************************************************************/ - SfxPoolItem* XGradientStepCountItem::Clone( SfxItemPool* /*pPool*/) const { return new XGradientStepCountItem( *this ); } -/************************************************************************* -|* -|* SfxPoolItem* XGradientStepCountItem::Create(SvStream& rIn, sal_uInt16 nVer) const -|* -*************************************************************************/ - SfxPoolItem* XGradientStepCountItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) const { return new XGradientStepCountItem( rIn ); } -//------------------------------------------------------------------------ - SfxItemPresentation XGradientStepCountItem::GetPresentation ( SfxItemPresentation ePres, @@ -696,10 +543,8 @@ SfxItemPresentation XGradientStepCountItem::GetPresentation } } - -//------------------------------ // class XFillBmpTileItem -//------------------------------ + TYPEINIT1_AUTOFACTORY( XFillBmpTileItem, SfxBoolItem ); XFillBmpTileItem::XFillBmpTileItem( sal_Bool bTile ) : @@ -744,10 +589,8 @@ SfxItemPresentation XFillBmpTileItem::GetPresentation } } - -//------------------------------ // class XFillBmpTilePosItem -//------------------------------ + TYPEINIT1_AUTOFACTORY( XFillBmpPosItem, SfxEnumItem ); XFillBmpPosItem::XFillBmpPosItem( RECT_POINT eRP ) : @@ -797,10 +640,8 @@ sal_uInt16 XFillBmpPosItem::GetValueCount() const return 9; } - -//------------------------------ // class XFillBmpTileSizeXItem -//------------------------------ + TYPEINIT1_AUTOFACTORY( XFillBmpSizeXItem, SfxMetricItem ); XFillBmpSizeXItem::XFillBmpSizeXItem( long nSizeX ) : @@ -850,10 +691,8 @@ bool XFillBmpSizeXItem::HasMetrics() const return GetValue() > 0L; } - -//------------------------------ // class XFillBmpTileSizeYItem -//------------------------------ + TYPEINIT1_AUTOFACTORY( XFillBmpSizeYItem, SfxMetricItem ); XFillBmpSizeYItem::XFillBmpSizeYItem( long nSizeY ) : @@ -903,10 +742,8 @@ bool XFillBmpSizeYItem::HasMetrics() const return GetValue() > 0L; } - -//------------------------------ // class XFillBmpTileLogItem -//------------------------------ + TYPEINIT1_AUTOFACTORY( XFillBmpSizeLogItem, SfxBoolItem ); XFillBmpSizeLogItem::XFillBmpSizeLogItem( sal_Bool bLog ) : @@ -951,10 +788,8 @@ SfxItemPresentation XFillBmpSizeLogItem::GetPresentation } } - -//------------------------------ // class XFillBmpTileOffXItem -//------------------------------ + TYPEINIT1_AUTOFACTORY( XFillBmpTileOffsetXItem, SfxUInt16Item ); XFillBmpTileOffsetXItem::XFillBmpTileOffsetXItem( sal_uInt16 nOffX ) : @@ -999,10 +834,8 @@ SfxItemPresentation XFillBmpTileOffsetXItem::GetPresentation } } - -//------------------------------ // class XFillBmpTileOffYItem -//------------------------------ + TYPEINIT1_AUTOFACTORY( XFillBmpTileOffsetYItem, SfxUInt16Item ); XFillBmpTileOffsetYItem::XFillBmpTileOffsetYItem( sal_uInt16 nOffY ) : @@ -1047,10 +880,8 @@ SfxItemPresentation XFillBmpTileOffsetYItem::GetPresentation } } - -//------------------------------ // class XFillBmpStretchItem -//------------------------------ + TYPEINIT1_AUTOFACTORY( XFillBmpStretchItem, SfxBoolItem ); XFillBmpStretchItem::XFillBmpStretchItem( sal_Bool bStretch ) : @@ -1095,10 +926,8 @@ SfxItemPresentation XFillBmpStretchItem::GetPresentation } } - -//------------------------------ // class XFillBmpTileOffPosXItem -//------------------------------ + TYPEINIT1_AUTOFACTORY( XFillBmpPosOffsetXItem, SfxUInt16Item ); XFillBmpPosOffsetXItem::XFillBmpPosOffsetXItem( sal_uInt16 nOffPosX ) : @@ -1143,10 +972,8 @@ SfxItemPresentation XFillBmpPosOffsetXItem::GetPresentation } } - -//------------------------------ // class XFillBmpTileOffPosYItem -//------------------------------ + TYPEINIT1_AUTOFACTORY( XFillBmpPosOffsetYItem, SfxUInt16Item ); XFillBmpPosOffsetYItem::XFillBmpPosOffsetYItem( sal_uInt16 nOffPosY ) : @@ -1191,57 +1018,30 @@ SfxItemPresentation XFillBmpPosOffsetYItem::GetPresentation } } -//-------------------------- // class XFillBackgroundItem -//-------------------------- -TYPEINIT1_AUTOFACTORY(XFillBackgroundItem, SfxBoolItem); -/************************************************************************* -|* -|* XFillBackgroundItem::XFillBackgroundItem( sal_Bool ) -|* -*************************************************************************/ +TYPEINIT1_AUTOFACTORY(XFillBackgroundItem, SfxBoolItem); XFillBackgroundItem::XFillBackgroundItem( sal_Bool bFill ) : SfxBoolItem( XATTR_FILLBACKGROUND, bFill ) { } -/************************************************************************* -|* -|* XFillBackgroundItem::XFillBackgroundItem( SvStream& rIn ) -|* -*************************************************************************/ - XFillBackgroundItem::XFillBackgroundItem( SvStream& rIn ) : SfxBoolItem( XATTR_FILLBACKGROUND, rIn ) { } -/************************************************************************* -|* -|* XFillBackgroundItem::Clone( SfxItemPool* pPool ) const -|* -*************************************************************************/ - SfxPoolItem* XFillBackgroundItem::Clone( SfxItemPool* /*pPool*/) const { return new XFillBackgroundItem( *this ); } -/************************************************************************* -|* -|* SfxPoolItem* XFillBackgroundItem::Create(SvStream& rIn, sal_uInt16 nVer) const -|* -*************************************************************************/ - SfxPoolItem* XFillBackgroundItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) const { return new XFillBackgroundItem( rIn ); } -//------------------------------------------------------------------------ - SfxItemPresentation XFillBackgroundItem::GetPresentation( SfxItemPresentation ePres, SfxMapUnit /*eCoreUnit*/, SfxMapUnit /*ePresUnit*/, OUString& rText, const IntlWrapper*) const { @@ -1260,6 +1060,4 @@ SfxItemPresentation XFillBackgroundItem::GetPresentation( SfxItemPresentation eP } } - - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/xoutdev/xattrbmp.cxx b/svx/source/xoutdev/xattrbmp.cxx index 78e56e87eea2..5af0223eaada 100644 --- a/svx/source/xoutdev/xattrbmp.cxx +++ b/svx/source/xoutdev/xattrbmp.cxx @@ -42,12 +42,6 @@ using namespace ::com::sun::star; -/************************************************************************* -|* -|* XOBitmap::XOBitmap( Bitmap aBitmap ) -|* -*************************************************************************/ - XOBitmap::XOBitmap( const Bitmap& rBmp ) : eType ( XBITMAP_IMPORT ), aGraphicObject ( rBmp ), @@ -56,12 +50,6 @@ XOBitmap::XOBitmap( const Bitmap& rBmp ) : { } -/************************************************************************* -|* -|* XOBitmap::XOBitmap( const XOBitmap& rXBmp ) -|* -*************************************************************************/ - XOBitmap::XOBitmap( const XOBitmap& rXBmp ) : pPixelArray ( NULL ) { @@ -84,23 +72,11 @@ XOBitmap::XOBitmap( const XOBitmap& rXBmp ) : } } -/************************************************************************* -|* -|* XOBitmap::XOBitmap( Bitmap aBitmap ) -|* -*************************************************************************/ - XOBitmap::~XOBitmap() { delete [] pPixelArray; } -/************************************************************************* -|* -|* XOBitmap& XOBitmap::operator=( const XOBitmap& rXBmp ) -|* -*************************************************************************/ - XOBitmap& XOBitmap::operator=( const XOBitmap& rXBmp ) { eType = rXBmp.eType; @@ -123,12 +99,6 @@ XOBitmap& XOBitmap::operator=( const XOBitmap& rXBmp ) return( *this ); } -/************************************************************************* -|* -|* int XOBitmap::operator==( const XOBitmap& rXOBitmap ) const -|* -*************************************************************************/ - int XOBitmap::operator==( const XOBitmap& rXOBitmap ) const { if( eType != rXOBitmap.eType || @@ -153,23 +123,11 @@ int XOBitmap::operator==( const XOBitmap& rXOBitmap ) const return( sal_True ); } -/************************************************************************* -|* -|* Bitmap XOBitmap::GetBitmap() -|* -*************************************************************************/ - Bitmap XOBitmap::GetBitmap() const { return GetGraphicObject().GetGraphic().GetBitmap(); } -/************************************************************************* -|* -|* Bitmap XOBitmap::GetGraphicObject() -|* -*************************************************************************/ - const GraphicObject& XOBitmap::GetGraphicObject() const { if( bGraphicDirty ) @@ -178,21 +136,12 @@ const GraphicObject& XOBitmap::GetGraphicObject() const return aGraphicObject; } -/************************************************************************* -|* -|* void XOBitmap::Bitmap2Array() -|* -|* Beschreibung Umwandlung der Bitmap in Array, Hinter- u. -|* Vordergrundfarbe -|* -*************************************************************************/ - void XOBitmap::Bitmap2Array() { VirtualDevice aVD; bool bPixelColor = false; const Bitmap aBitmap( GetBitmap() ); - const sal_uInt16 nLines = 8; // von Type abhaengig + const sal_uInt16 nLines = 8; // type dependent if( !pPixelArray ) pPixelArray = new sal_uInt16[ nLines * nLines ]; @@ -201,8 +150,7 @@ void XOBitmap::Bitmap2Array() aVD.DrawBitmap( Point(), aBitmap ); aPixelColor = aBckgrColor = aVD.GetPixel( Point() ); - // Aufbau des Arrays und Ermittlung der Vorder-, bzw. - // Hintergrundfarbe + // create array and determine foreground and background color for( sal_uInt16 i = 0; i < nLines; i++ ) { for( sal_uInt16 j = 0; j < nLines; j++ ) @@ -222,26 +170,18 @@ void XOBitmap::Bitmap2Array() } } -/************************************************************************* -|* -|* void XOBitmap::Array2Bitmap() -|* -|* Beschreibung Umwandlung des Arrays, Hinter- u. -|* Vordergrundfarbe in eine Bitmap -|* -*************************************************************************/ - +/// convert array, fore- and background color into a bitmap void XOBitmap::Array2Bitmap() { VirtualDevice aVD; - sal_uInt16 nLines = 8; // von Type abhaengig + sal_uInt16 nLines = 8; // type dependent if( !pPixelArray ) return; aVD.SetOutputSizePixel( Size( nLines, nLines ) ); - // Aufbau der Bitmap + // create bitmap for( sal_uInt16 i = 0; i < nLines; i++ ) { for( sal_uInt16 j = 0; j < nLines; j++ ) @@ -257,12 +197,9 @@ void XOBitmap::Array2Bitmap() bGraphicDirty = sal_False; } -// ----------------------- // class XFillBitmapItem -// ----------------------- -TYPEINIT1_AUTOFACTORY(XFillBitmapItem, NameOrIndex); -////////////////////////////////////////////////////////////////////////////// +TYPEINIT1_AUTOFACTORY(XFillBitmapItem, NameOrIndex); XFillBitmapItem::XFillBitmapItem(const XubString& rName, const GraphicObject& rGraphicObject) : NameOrIndex(XATTR_FILLBITMAP, rName), @@ -270,16 +207,12 @@ XFillBitmapItem::XFillBitmapItem(const XubString& rName, const GraphicObject& rG { } -////////////////////////////////////////////////////////////////////////////// - XFillBitmapItem::XFillBitmapItem(const XFillBitmapItem& rItem) : NameOrIndex(rItem), maGraphicObject(rItem.maGraphicObject) { } -////////////////////////////////////////////////////////////////////////////// - Bitmap createHistorical8x8FromArray(const sal_uInt16* pArray, Color aColorPix, Color aColorBack) { BitmapPalette aPalette(2); @@ -313,8 +246,6 @@ Bitmap createHistorical8x8FromArray(const sal_uInt16* pArray, Color aColorPix, C return aBitmap; } -////////////////////////////////////////////////////////////////////////////// - bool SVX_DLLPUBLIC isHistorical8x8(const BitmapEx& rBitmapEx, BitmapColor& o_rBack, BitmapColor& o_rFront) { if(!rBitmapEx.IsTransparent()) @@ -346,8 +277,6 @@ bool SVX_DLLPUBLIC isHistorical8x8(const BitmapEx& rBitmapEx, BitmapColor& o_rBa return false; } -////////////////////////////////////////////////////////////////////////////// - XFillBitmapItem::XFillBitmapItem(SvStream& rIn, sal_uInt16 nVer) : NameOrIndex(XATTR_FILLBITMAP, rIn) { @@ -355,7 +284,7 @@ XFillBitmapItem::XFillBitmapItem(SvStream& rIn, sal_uInt16 nVer) { if(0 == nVer) { - // Behandlung der alten Bitmaps + // work with the old bitmap Bitmap aBmp; ReadDIB(aBmp, rIn, true); @@ -405,38 +334,28 @@ XFillBitmapItem::XFillBitmapItem(SvStream& rIn, sal_uInt16 nVer) } } -////////////////////////////////////////////////////////////////////////////// - XFillBitmapItem::XFillBitmapItem(SfxItemPool* /*pPool*/, const GraphicObject& rGraphicObject) : NameOrIndex( XATTR_FILLBITMAP, -1), maGraphicObject(rGraphicObject) { } -////////////////////////////////////////////////////////////////////////////// - SfxPoolItem* XFillBitmapItem::Clone(SfxItemPool* /*pPool*/) const { return new XFillBitmapItem(*this); } -////////////////////////////////////////////////////////////////////////////// - int XFillBitmapItem::operator==(const SfxPoolItem& rItem) const { return (NameOrIndex::operator==(rItem) && maGraphicObject == ((const XFillBitmapItem&)rItem).maGraphicObject); } -////////////////////////////////////////////////////////////////////////////// - SfxPoolItem* XFillBitmapItem::Create(SvStream& rIn, sal_uInt16 nVer) const { return new XFillBitmapItem( rIn, nVer ); } -////////////////////////////////////////////////////////////////////////////// - SvStream& XFillBitmapItem::Store( SvStream& rOut, sal_uInt16 nItemVersion ) const { NameOrIndex::Store(rOut, nItemVersion); @@ -449,30 +368,21 @@ SvStream& XFillBitmapItem::Store( SvStream& rOut, sal_uInt16 nItemVersion ) cons return rOut; } -////////////////////////////////////////////////////////////////////////////// - const GraphicObject& XFillBitmapItem::GetGraphicObject() const { return maGraphicObject; } -////////////////////////////////////////////////////////////////////////////// - void XFillBitmapItem::SetGraphicObject(const GraphicObject& rGraphicObject) { maGraphicObject = rGraphicObject; } -////////////////////////////////////////////////////////////////////////////// - sal_uInt16 XFillBitmapItem::GetVersion(sal_uInt16 /*nFileFormatVersion*/) const { - // version three return(2); } -////////////////////////////////////////////////////////////////////////////// - SfxItemPresentation XFillBitmapItem::GetPresentation( SfxItemPresentation ePres, SfxMapUnit /*eCoreUnit*/, @@ -494,8 +404,6 @@ SfxItemPresentation XFillBitmapItem::GetPresentation( } } -////////////////////////////////////////////////////////////////////////////// - bool XFillBitmapItem::QueryValue(::com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId) const { nMemberId &= ~CONVERT_TWIPS; @@ -557,8 +465,6 @@ bool XFillBitmapItem::QueryValue(::com::sun::star::uno::Any& rVal, sal_uInt8 nMe return true; } -////////////////////////////////////////////////////////////////////////////// - bool XFillBitmapItem::PutValue( const ::com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId ) { nMemberId &= ~CONVERT_TWIPS; @@ -629,8 +535,6 @@ bool XFillBitmapItem::PutValue( const ::com::sun::star::uno::Any& rVal, sal_uInt return (bSetName || bSetURL || bSetBitmap); } -////////////////////////////////////////////////////////////////////////////// - sal_Bool XFillBitmapItem::CompareValueFunc( const NameOrIndex* p1, const NameOrIndex* p2 ) { const GraphicObject& aGraphicObjectA(((XFillBitmapItem*)p1)->GetGraphicObject()); @@ -639,8 +543,6 @@ sal_Bool XFillBitmapItem::CompareValueFunc( const NameOrIndex* p1, const NameOrI return aGraphicObjectA == aGraphicObjectB; } -////////////////////////////////////////////////////////////////////////////// - XFillBitmapItem* XFillBitmapItem::checkForUniqueItem( SdrModel* pModel ) const { if( pModel ) diff --git a/svx/source/xoutdev/xexch.cxx b/svx/source/xoutdev/xexch.cxx index a0c1783c50da..76bffee80513 100644 --- a/svx/source/xoutdev/xexch.cxx +++ b/svx/source/xoutdev/xexch.cxx @@ -30,47 +30,25 @@ TYPEINIT1_AUTOFACTORY( XFillExchangeData, SvDataCopyStream ); - -/************************************************************************* -|* -|* Default-Ctor (Fuer Assign()) -|* -*************************************************************************/ +/// default CTOR, for Assign() XFillExchangeData::XFillExchangeData() : pXFillAttrSetItem( NULL ), pPool( NULL ) { } - -/************************************************************************* -|* -|* Ctor -|* -*************************************************************************/ XFillExchangeData::XFillExchangeData( const XFillAttrSetItem rXFillAttrSetItem ) : pXFillAttrSetItem( (XFillAttrSetItem*) rXFillAttrSetItem.Clone( rXFillAttrSetItem.GetItemSet().GetPool() ) ), pPool( rXFillAttrSetItem.GetItemSet().GetPool() ) { } - -/************************************************************************* -|* -|* Dtor -|* -*************************************************************************/ XFillExchangeData::~XFillExchangeData() { delete pXFillAttrSetItem; } -/****************************************************************************** -|* -|* Binaer-Export (z.Z. ohne Versionsverwaltung, da nicht persistent!) -|* -\******************************************************************************/ - +/// binary export (currently w/o version control because it is not persistent) SvStream& operator<<( SvStream& rOStm, const XFillExchangeData& rData ) { if( rData.pXFillAttrSetItem ) @@ -108,13 +86,7 @@ SvStream& operator<<( SvStream& rOStm, const XFillExchangeData& rData ) return rOStm; } - -/****************************************************************************** -|* -|* Binaer-Import (z.Z. ohne Versionsverwaltung, da nicht persistent!) -|* -\******************************************************************************/ - +/// binary export (currently w/o version control because it is not persistent) SvStream& operator>>( SvStream& rIStm, XFillExchangeData& rData ) { DBG_ASSERT( rData.pPool, "XFillExchangeData has no pool" ); @@ -154,12 +126,6 @@ SvStream& operator>>( SvStream& rIStm, XFillExchangeData& rData ) return rIStm; } -/************************************************************************* -|* -|* XBitmap& XBitmap::operator=( const XBitmap& rXBmp ) -|* -*************************************************************************/ - XFillExchangeData& XFillExchangeData::operator=( const XFillExchangeData& rData ) { delete pXFillAttrSetItem; diff --git a/svx/source/xoutdev/xpool.cxx b/svx/source/xoutdev/xpool.cxx index 84a4194f48d6..57b2aaee8a70 100644 --- a/svx/source/xoutdev/xpool.cxx +++ b/svx/source/xoutdev/xpool.cxx @@ -24,12 +24,6 @@ #include <svx/svxids.hrc> #include <svl/itemset.hxx> -/************************************************************************* -|* -|* Constructor -|* -\************************************************************************/ - XOutdevItemPool::XOutdevItemPool( SfxItemPool* _pMaster, sal_uInt16 nAttrStart, @@ -170,13 +164,7 @@ XOutdevItemPool::XOutdevItemPool( } } -/************************************************************************* -|* -|* copy ctor, sorgt dafuer, dass die static defaults gecloned werden -|* (Parameter 2 = sal_True) -|* -\************************************************************************/ - +// copy ctor, clones all static defaults XOutdevItemPool::XOutdevItemPool(const XOutdevItemPool& rPool) : SfxItemPool(rPool, sal_True), mppLocalPoolDefaults(0L), @@ -184,23 +172,11 @@ XOutdevItemPool::XOutdevItemPool(const XOutdevItemPool& rPool) { } -/************************************************************************* -|* -|* Clone() -|* -\************************************************************************/ - SfxItemPool* XOutdevItemPool::Clone() const { return new XOutdevItemPool(*this); } -/************************************************************************* -|* -|* Destruktor -|* -\************************************************************************/ - XOutdevItemPool::~XOutdevItemPool() { Delete(); @@ -211,7 +187,7 @@ XOutdevItemPool::~XOutdevItemPool() SfxPoolItem** ppDefaultItem = mppLocalPoolDefaults; for(sal_uInt16 i(GetLastWhich() - GetFirstWhich() + 1); i; --i, ++ppDefaultItem) { - if ( *ppDefaultItem ) //Teile schon von abgel. Klasse abgeraeumt! + if ( *ppDefaultItem ) // these parts might be already cleaned up from a derived class { SetRefCount( **ppDefaultItem, 0 ); delete *ppDefaultItem; diff --git a/svx/source/xoutdev/xtabbtmp.cxx b/svx/source/xoutdev/xtabbtmp.cxx index 961c501b3356..011cf6a7b37c 100644 --- a/svx/source/xoutdev/xtabbtmp.cxx +++ b/svx/source/xoutdev/xtabbtmp.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "svx/XPropertyTable.hxx" #include <vcl/virdev.hxx> diff --git a/svx/source/xoutdev/xtabcolr.cxx b/svx/source/xoutdev/xtabcolr.cxx index 3c77b50b2730..a6e1d9debc9c 100644 --- a/svx/source/xoutdev/xtabcolr.cxx +++ b/svx/source/xoutdev/xtabcolr.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "svx/XPropertyTable.hxx" #include <unotools/pathoptions.hxx> diff --git a/svx/source/xoutdev/xtable.cxx b/svx/source/xoutdev/xtable.cxx index 5fd2d5e558e5..2044bb52db54 100644 --- a/svx/source/xoutdev/xtable.cxx +++ b/svx/source/xoutdev/xtable.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include <svx/XPropertyTable.hxx> #include "xmlxtexp.hxx" #include "xmlxtimp.hxx" @@ -37,7 +36,6 @@ Color RGB_Color( ColorData nColorName ) return aRGBColor; } -////////////////////////////////////////////////////////////////////////////// // class XColorEntry XColorEntry::XColorEntry(const Color& rColor, const String& rName) @@ -52,7 +50,6 @@ aColor(rOther.aColor) { } -////////////////////////////////////////////////////////////////////////////// // class XLineEndEntry XLineEndEntry::XLineEndEntry(const basegfx::B2DPolyPolygon& rB2DPolyPolygon, const String& rName) @@ -67,7 +64,6 @@ XLineEndEntry::XLineEndEntry(const XLineEndEntry& rOther) { } -////////////////////////////////////////////////////////////////////////////// // class XDashEntry XDashEntry::XDashEntry(const XDash& rDash, const String& rName) @@ -82,7 +78,6 @@ aDash(rOther.aDash) { } -////////////////////////////////////////////////////////////////////////////// // class XHatchEntry XHatchEntry::XHatchEntry(const XHatch& rHatch, const String& rName) @@ -97,7 +92,6 @@ XHatchEntry::XHatchEntry(const XHatchEntry& rOther) { } -////////////////////////////////////////////////////////////////////////////// // class XGradientEntry XGradientEntry::XGradientEntry(const XGradient& rGradient, const String& rName) @@ -112,7 +106,6 @@ XGradientEntry::XGradientEntry(const XGradientEntry& rOther) { } -////////////////////////////////////////////////////////////////////////////// // class XBitmapEntry XBitmapEntry::XBitmapEntry(const GraphicObject& rGraphicObject, const String& rName) |