[Libreoffice-commits] .: binfilter/bf_sch binfilter/inc
Joseph Powers
jpowers at kemper.freedesktop.org
Sun Jan 16 10:13:46 PST 2011
binfilter/bf_sch/source/core/sch_chtmod3d.cxx | 661 ++++++++++++--------------
binfilter/bf_sch/source/core/sch_chtscene.cxx | 76 +-
binfilter/inc/bf_sch/chtmodel.hxx | 2
3 files changed, 355 insertions(+), 384 deletions(-)
New commits:
commit 28464edd3564f7dc4a4cf6b830c6b43fc6ebb886
Author: Joseph Powers <jpowers27 at cox.net>
Date: Sun Jan 16 10:13:16 2011 -0800
Remove DECLARE_LIST(DescrList, E3dLabelObj*)
diff --git a/binfilter/bf_sch/source/core/sch_chtmod3d.cxx b/binfilter/bf_sch/source/core/sch_chtmod3d.cxx
index 1f5a355..8ca737e 100644
--- a/binfilter/bf_sch/source/core/sch_chtmod3d.cxx
+++ b/binfilter/bf_sch/source/core/sch_chtmod3d.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -82,7 +82,7 @@ namespace binfilter {
/*N*/ SdrTextObj *pXAxisTitleObj = NULL;
/*N*/ SdrTextObj *pYAxisTitleObj = NULL;
/*N*/ SdrTextObj *pZAxisTitleObj = NULL;
-/*N*/
+/*N*/
/*N*/ if (bShowXAxisTitle)
/*N*/ {
/*N*/ pXAxisTitleObj = CreateTitle (pXAxisTitleAttr, CHOBJID_DIAGRAM_TITLE_X_AXIS,
@@ -118,12 +118,12 @@ namespace binfilter {
/*N*/ rRect.Right() -= GetOutputSize(*pZAxisTitleObj).Width() + 200;
/*N*/ }
/*N*/ }
-/*N*/
+/*N*/
/*N*/ SdrPage* pPage=GetPage(0);
/*N*/ if (pXAxisTitleObj) pPage->NbcInsertObject( pXAxisTitleObj );
/*N*/ if (pYAxisTitleObj) pPage->NbcInsertObject( pYAxisTitleObj );
/*N*/ if (pZAxisTitleObj) pPage->NbcInsertObject( pZAxisTitleObj );
-/*N*/
+/*N*/
/*N*/ // this should resize the scene according to the space needed
/*N*/ // by the titles. However this results in strange effects like
/*N*/ // constant resizing until the scene has 0 size and also the title
@@ -153,9 +153,9 @@ namespace binfilter {
/*N*/ pChartXAxis->GetItemSet()->Put(SfxBoolItem(SCHATTR_AXIS_LOGARITHM,bXLogarithm));
/*N*/ pChartYAxis->GetItemSet()->Put(SfxBoolItem(SCHATTR_AXIS_LOGARITHM,bYLogarithm));
/*N*/ pChartZAxis->GetItemSet()->Put(SfxBoolItem(SCHATTR_AXIS_LOGARITHM,bZLogarithm));
-/*N*/
+/*N*/
/*N*/ String aNumStr;
-/*N*/
+/*N*/
/*N*/ E3dObject* pXGridMainGroup = bShowXGridMain
/*N*/ ? Create3DObject (CHOBJID_DIAGRAM_X_GRID_MAIN_GROUP)
/*N*/ : 0;
@@ -184,38 +184,38 @@ namespace binfilter {
/*N*/ ? Create3DAxisObj( CHOBJID_DIAGRAM_Z_AXIS )
/*N*/ : 0;
/*N*/ Polygon3D aRect3D;
-/*N*/
+/*N*/
/*N*/ pChartXAxis->Initialise(rRect,bSwitchColRow,eStackMode,bPercent,FALSE);
/*N*/ pChartYAxis->Initialise(rRect,bSwitchColRow,eStackMode,bPercent,FALSE);
/*N*/ pChartZAxis->Initialise(rRect,bSwitchColRow,eStackMode,bPercent,FALSE);
-/*N*/
+/*N*/
/*N*/ pChartXAxis->CalcValueSteps();
/*N*/ pChartYAxis->CalcValueSteps();
/*N*/ pChartZAxis->CalcValueSteps();
-/*N*/
+/*N*/
/*N*/ //Vorlaeufige Notloesung, entsprechende Stellen sollen noch geaendert werden, daher bitte kein Search&Repleace statt der #defs!
/*N*/ #define fOriginY pChartYAxis->GetOrigin()
/*N*/ #define fMinValueY pChartYAxis->GetMin()
/*N*/ #define fMaxValueY pChartYAxis->GetMax()
/*N*/ #define fValueStepMainY pChartYAxis->GetStep()
/*N*/ #define fValueStepHelpY pChartYAxis->GetHelpStep()
-/*N*/
+/*N*/
/*N*/ //ToDo: vorlaeufig
/*N*/ SfxItemSet* pXAxisAttr=&GetAttr(CHOBJID_DIAGRAM_X_AXIS);
/*N*/ SfxItemSet* pYAxisAttr=&GetAttr(CHOBJID_DIAGRAM_Y_AXIS);
/*N*/ SfxItemSet* pZAxisAttr=&GetAttr(CHOBJID_DIAGRAM_Z_AXIS);
-/*N*/
+/*N*/
/*N*/ SvxChartTextOrient eDescrOrient = ((const SvxChartTextOrientItem&)pXAxisAttr->Get(SCHATTR_TEXT_ORIENT)).GetValue();
/*N*/ SvxChartTextOrient eValueOrient = ((const SvxChartTextOrientItem&)pYAxisAttr->Get(SCHATTR_TEXT_ORIENT)).GetValue();
-/*N*/
+/*N*/
/*N*/ Size aMaxValueSizeY = pChartYAxis->CalcMaxTextSize(eValueOrient);
/*N*/ Size aMaxValueSizeX = pChartXAxis->CalcMaxTextSize(eDescrOrient);
-/*N*/
+/*N*/
/*N*/ Size aMaxDescrSizeY = CalcMaxDescrSize( TRUE, eValueOrient, bPercent, CHAXIS_AXIS_Y );
/*N*/ Size aMaxDescrSizeX = CalcMaxDescrSize( FALSE, eDescrOrient, bPercent, CHAXIS_AXIS_X );
-/*N*/
+/*N*/
/*N*/ short nV, i;
-/*N*/
+/*N*/
/*N*/ long nRowCnt = bFlatChart
/*N*/ ? 1
/*N*/ : GetRowCount();
@@ -225,23 +225,23 @@ namespace binfilter {
/*N*/ long nColumnCnt = bPartDescr
/*N*/ ? nBackColCnt
/*N*/ : nBackColCnt - 1;
-/*N*/
-/*N*/
+/*N*/
+/*N*/
/*N*/ // FG: Diese Variable ist ein reiner Zwischenspeicher damit in der Chartscene bei FitInSnapRect
/*N*/ // die Achsentitel gemaess dieses Parameters gesetzt werden koennen.
/*N*/ bSwitch3DColRow = bSwitchColRow;
-/*N*/
-/*N*/ aXDescrList.Clear();
-/*N*/ aYDescrList.Clear();
-/*N*/ aZDescrList.Clear();
-/*N*/
+/*N*/
+/*N*/ aXDescrList.clear();
+/*N*/ aYDescrList.clear();
+/*N*/ aZDescrList.clear();
+/*N*/
/*N*/ E3dDefaultAttributes aDefltAttr3D;
-/*N*/
+/*N*/
/*N*/ Matrix4D aShift;
/*N*/ aShift.Translate(-(aSizeVec/500.0));//Wände etwas verschieben...
-/*N*/
+/*N*/
/*N*/ const double fFloorWidth = 100.0;
-/*N*/
+/*N*/
/*N*/ for (nV = 0; nV < 3; nV++)
/*N*/ {
/*N*/ switch (nV)
@@ -257,30 +257,29 @@ namespace binfilter {
/*N*/ aPos[nV] -= aSizeVec[nV];
/*N*/ aRect3D[3] = aPos;
/*N*/ aPos[nV + 1] -= aSizeVec[nV + 1];
-/*N*/
+/*N*/
/*N*/ E3dPolygonObj *pWallObj = new SchE3dPolygonObj(aDefltAttr3D, aRect3D);
-/*N*/
+/*N*/
/*N*/ pWallObj->SetModel (this);
/*N*/ pWallObj->InsertUserData(new SchObjectId(CHOBJID_DIAGRAM_WALL));
/*N*/ rScene.Insert3DObj(pWallObj);
-/*N*/
-/*N*/ //-/ pWallObj->NbcSetAttributes(*pDiagramWallAttr, FALSE);
+/*N*/
/*N*/ pWallObj->SetItemSet(*pDiagramWallAttr);
-/*N*/
+/*N*/
/*N*/ pWallObj->NbcSetTransform(aShift);
-/*N*/
+/*N*/
/*N*/ if (!nV)
/*N*/ {
/*N*/ // X-Achse zeichnen
/*N*/ Vector3D aLine3D [2] = { aRect3D [0], aRect3D [1] };
-/*N*/
+/*N*/
/*N*/ //#47500#
/*N*/ if (pXAxisGroup && pChartXAxis->IsVisible())
/*N*/ {
/*N*/ Create3DPolyObject (pXAxisAttr, new SchE3dPolygonObj (aDefltAttr3D, aLine3D[0], aLine3D[1]),
/*N*/ CHOBJID_LINE, pXAxisGroup);
/*N*/ }
-/*N*/
+/*N*/
/*N*/ if( pYGridMainGroup || pYGridHelpGroup )
/*N*/ {
/*N*/ // Y-Anteile
@@ -289,7 +288,7 @@ namespace binfilter {
/*N*/ Vector3D aLclLine3D [2] = { aRect3D [0], aRect3D [1] };
/*N*/ long nStepMainY = (long) aSizeVec.Y () / nColumnCnt;
/*N*/ long nStepHelpY = nStepMainY / 2;
-/*N*/
+/*N*/
/*N*/ // hauptgitter auf der X-Ebene, parallel zur X-Achse
/*N*/ for (i = 0; i <= nColumnCnt; i++)
/*N*/ {
@@ -298,7 +297,7 @@ namespace binfilter {
/*N*/ if( pYGridMainGroup )
/*N*/ Create3DPolyObject (pYGridMainAttr, new SchE3dPolygonObj (aDefltAttr3D, aLclLine3D[0], aLclLine3D[1]),
/*N*/ CHOBJID_DIAGRAM_Y_GRID_MAIN, pYGridMainGroup);
-/*N*/
+/*N*/
/*N*/ // hilfsgitter auf der X-Ebene, parallel zur X-Achse
/*N*/ if (pYGridHelpGroup && (i < nColumnCnt))
/*N*/ {
@@ -313,10 +312,10 @@ namespace binfilter {
/*N*/ {
/*N*/ aLine3D [0] = aRect3D[0];
/*N*/ aLine3D [1] = aRect3D[3];
-/*N*/
+/*N*/
/*N*/ long nStepMainX = (long) aSizeVec.X () / nColumnCnt;
/*N*/ long nStepHelpX = nStepMainX / 2;
-/*N*/
+/*N*/
/*N*/ // hauptgitter auf der X-Ebene, parallel zur Y-Achse
/*N*/ for (i = 0; i <= nColumnCnt; i++)
/*N*/ {
@@ -325,7 +324,7 @@ namespace binfilter {
/*N*/ if( pYGridMainGroup )
/*N*/ Create3DPolyObject (pYGridMainAttr, new SchE3dPolygonObj (aDefltAttr3D, aLine3D[0], aLine3D[1]),
/*N*/ CHOBJID_DIAGRAM_Y_GRID_MAIN, pYGridMainGroup);
-/*N*/
+/*N*/
/*N*/ // hilfsgitter auf der X-Ebene, parallel zur Y-Achse
/*N*/ if (pYGridHelpGroup && (i < nColumnCnt))
/*N*/ {
@@ -342,24 +341,24 @@ namespace binfilter {
/*N*/ {
/*N*/ // Y-Achse zeichnen
/*N*/ Vector3D aLine3D [2] = { aRect3D [0], aRect3D [1] };
-/*N*/
+/*N*/
/*N*/ // Z-Anteile
/*N*/ //#47500#
/*N*/ if (pYAxisGroup && pChartYAxis->IsVisible()) Create3DPolyObject (pYAxisAttr, new SchE3dPolygonObj (aDefltAttr3D, aLine3D[0], aLine3D[1]),
/*N*/ CHOBJID_LINE, pYAxisGroup);
-/*N*/
+/*N*/
/*N*/ // hauptgitter auf der Z-Ebene, parallel zur Z-Achse
/*N*/ if( pZGridMainGroup || pZGridHelpGroup )
/*N*/ {
/*N*/ Vector3D aLclLine3D [2] = { aRect3D[2], aRect3D[3] };
/*N*/ long nStepMainZ = (long) aSizeVec.Z () / nRowCnt;
/*N*/ long nStepHelpZ = nStepMainZ / 2;
-/*N*/
+/*N*/
/*N*/ BOOL bCreateGridLine = ( (aLclLine3D[ 0 ].X() != aLclLine3D[ 1 ].X()) ||
/*N*/ (aLclLine3D[ 0 ].Y() != aLclLine3D[ 1 ].Y()) );
/*N*/ // Z() values become equal in the for loop
/*N*/ // => start and end points would be equal if !bCreateGridLine
-/*N*/
+/*N*/
/*N*/ for (i = 0; i <= nRowCnt; i++)
/*N*/ {
/*N*/ aLclLine3D[0].Z() =
@@ -367,7 +366,7 @@ namespace binfilter {
/*N*/ if( pZGridMainGroup && bCreateGridLine )
/*N*/ Create3DPolyObject( pZGridMainAttr, new SchE3dPolygonObj( aDefltAttr3D, aLclLine3D[0], aLclLine3D[1] ),
/*N*/ CHOBJID_DIAGRAM_Z_GRID_MAIN, pZGridMainGroup );
-/*N*/
+/*N*/
/*N*/ // hilfsgitter auf der Z-Ebene, parallel zur Z-Achse
/*N*/ if (pZGridHelpGroup && (i < nRowCnt))
/*N*/ {
@@ -380,62 +379,62 @@ namespace binfilter {
/*N*/ }
/*N*/ }
/*N*/ }
-/*N*/
+/*N*/
/*N*/ Vector3D aLine3D [2] = { aRect3D[0], aRect3D[(nV || (!nV && bSwitchColRow))
/*N*/ ? 3
/*N*/ : 1] };
/*N*/ double fAct = fMinValueY;
-/*N*/
+/*N*/
/*N*/ SfxItemSet aYTextAttr ((const SfxItemSet &) *pYAxisAttr);
/*N*/ aYTextAttr.Put(XLineStyleItem (XLINE_NONE));
/*N*/ aYTextAttr.Put(XLineWidthItem (0));
-/*N*/
+/*N*/
/*N*/ // create Y grid. Attention: Some variables are called XGrid...
/*N*/ if (fMinValueY != fMaxValueY)
/*N*/ while (fAct <= fMaxValueY)
/*N*/ {
/*N*/ double fFact = pChartYAxis->CalcFact(fAct);
-/*N*/
+/*N*/
/*N*/ if (bSwitchColRow)
/*N*/ {
/*N*/ // create major gridline
/*N*/ aLine3D[0].X() = aLine3D[1].X() = fFact * aSizeVec.X();
-/*N*/
+/*N*/
/*N*/ if (pXGridMainGroup)
/*N*/ Create3DPolyObject(pXGridMainAttr, new SchE3dPolygonObj(aDefltAttr3D,
/*N*/ aLine3D[0], aLine3D[1]),CHOBJID_DIAGRAM_X_GRID_MAIN,pXGridMainGroup);
-/*N*/
+/*N*/
/*N*/ if (pYAxisGroup && pChartYAxis->HasDescription() && nV)
/*N*/ {
/*N*/ Color *pTextColor = NULL;
/*N*/ SvxColorItem *pOldTextColor = NULL;
-/*N*/
+/*N*/
/*N*/ pNumFormatter->GetOutputString((bPercent)?fAct/100.0:fAct,
/*N*/ GetNumFmt(CHOBJID_DIAGRAM_Y_AXIS,bPercent), aNumStr, &pTextColor);
-/*N*/
+/*N*/
/*N*/ if( pTextColor ) // BM #60999#
/*N*/ {
/*?*/ pOldTextColor = (SvxColorItem*)(aYTextAttr.GetItem( EE_CHAR_COLOR ));
/*?*/ aYTextAttr.Put(SvxColorItem( *pTextColor ));
/*N*/ }
-/*N*/
+/*N*/
/*N*/ SdrTextObj *pTextObj = CreateTextObj(CHOBJID_TEXT, Point (),aNumStr,
/*N*/ aYTextAttr, FALSE,CHADJUST_TOP_RIGHT);
-/*N*/
+/*N*/
/*N*/ if( pOldTextColor )
/*N*/ {
/*?*/ aYTextAttr.Put( *pOldTextColor );
/*N*/ }
-/*N*/
+/*N*/
/*N*/ E3dLabelObj *pE3DLabel = new E3dLabelObj(aLine3D[1],pTextObj);
-/*N*/ aYDescrList.Insert(pE3DLabel,LIST_APPEND);
+/*N*/ aYDescrList.push_back( pE3DLabel );
/*N*/ }
/*N*/ }
/*N*/ else
/*N*/ {
/*N*/ // create major gridline
/*N*/ aLine3D[0].Y() = aLine3D[1].Y() = fFact * aSizeVec.Y();
-/*N*/
+/*N*/
/*N*/ if(pXGridMainGroup)
/*N*/ Create3DPolyObject(pXGridMainAttr,new SchE3dPolygonObj(aDefltAttr3D,
/*N*/ aLine3D[0],aLine3D[1]),CHOBJID_DIAGRAM_X_GRID_MAIN, pXGridMainGroup);
@@ -444,38 +443,38 @@ namespace binfilter {
/*N*/ {
/*N*/ Color *pTextColor = NULL;
/*N*/ SvxColorItem *pOldTextColor = NULL;
-/*N*/
+/*N*/
/*N*/ pNumFormatter->GetOutputString((bPercent)?fAct/100.0:fAct,
/*N*/ GetNumFmt(CHOBJID_DIAGRAM_Y_AXIS,bPercent), aNumStr, &pTextColor);
-/*N*/
+/*N*/
/*N*/ if( pTextColor ) // BM #60999#
/*N*/ {
/*?*/ pOldTextColor = (SvxColorItem*)(aYTextAttr.GetItem( EE_CHAR_COLOR ));
/*?*/ aYTextAttr.Put(SvxColorItem( *pTextColor ));
/*N*/ }
-/*N*/
+/*N*/
/*N*/ // erzeuge das 3D-textobjekt
/*N*/ SdrTextObj *pTextObj = CreateTextObj(CHOBJID_TEXT, Point (),
/*N*/ aNumStr,
/*N*/ aYTextAttr, FALSE,CHADJUST_CENTER_RIGHT);
-/*N*/
+/*N*/
/*N*/ if( pOldTextColor )
/*N*/ {
/*?*/ aYTextAttr.Put( *pOldTextColor );
/*N*/ }
-/*N*/
+/*N*/
/*N*/ E3dLabelObj *pE3DLabel = new E3dLabelObj(aLine3D [1],pTextObj);
-/*N*/ aYDescrList.Insert(pE3DLabel,LIST_APPEND);
+/*N*/ aYDescrList.push_back( pE3DLabel );
/*N*/ }
-/*N*/
+/*N*/
/*N*/ }
-/*N*/
+/*N*/
/*N*/ IncValue(fAct, fValueStepMainY, bYLogarithm);
/*N*/ }
-/*N*/
+/*N*/
/*N*/ fAct = fMinValueY;
/*N*/ double fActMain = fAct; // This is used for calculating the positions of main grid lines.
-/*N*/
+/*N*/
/*N*/ if (pXGridHelpGroup && (fMinValueY != fMaxValueY))
/*N*/ {
/*?*/ IncValue(fAct, fValueStepHelpY, FALSE);
@@ -485,7 +484,7 @@ namespace binfilter {
/*?*/ {
/*?*/ double fPos = pChartYAxis->CalcFact(fAct ) * aSizeVec.X();
/*?*/ if (fPos > aSizeVec.X()) break;
-/*?*/
+/*?*/
/*?*/ // If there is a main grid then ommit creating help grid lines coinciding with main grid lines.
/*?*/ if (pXGridMainGroup)
/*?*/ {
@@ -499,12 +498,12 @@ namespace binfilter {
/*?*/ continue;
/*?*/ }
/*?*/ }
-/*?*/
+/*?*/
/*?*/ aLine3D[0].X() =
/*?*/ aLine3D[1].X() = fPos;
/*?*/ Create3DPolyObject (pXGridHelpAttr, new SchE3dPolygonObj (aDefltAttr3D, aLine3D[0], aLine3D[1]),
/*?*/ CHOBJID_DIAGRAM_X_GRID_HELP, pXGridHelpGroup);
-/*?*/
+/*?*/
/*?*/ // In case of a help grid with a main grid, draw only every other line.
/*?*/ IncValue(fAct, fValueStepHelpY, FALSE);
/*?*/ }
@@ -515,7 +514,7 @@ namespace binfilter {
/*?*/ {
/*?*/ double fPos = pChartYAxis->CalcFact(fAct ) * aSizeVec.Y();
/*?*/ if (fPos > aSizeVec.Y()) break;
-/*?*/
+/*?*/
/*?*/ // If there is a main grid then ommit creating help grid lines coinciding with main grid lines.
/*?*/ if (pXGridMainGroup)
/*?*/ {
@@ -529,12 +528,12 @@ namespace binfilter {
/*?*/ continue;
/*?*/ }
/*?*/ }
-/*?*/
+/*?*/
/*?*/ aLine3D[0].Y() =
/*?*/ aLine3D[1].Y() = fPos;
/*?*/ Create3DPolyObject (pXGridHelpAttr, new SchE3dPolygonObj (aDefltAttr3D, aLine3D[0], aLine3D[1]),
/*?*/ CHOBJID_DIAGRAM_X_GRID_HELP, pXGridHelpGroup);
-/*?*/
+/*?*/
/*?*/ // In case of a help grid with a main grid, draw only every other line.
/*?*/ IncValue(fAct, fValueStepHelpY, FALSE);
/*N*/ }
@@ -542,7 +541,7 @@ namespace binfilter {
/*N*/ }
/*N*/ break;
/*N*/ }
-/*N*/
+/*N*/
/*N*/ case 2: // floor
/*N*/ {
/*N*/ // BM: create 'thick' floor
@@ -550,67 +549,66 @@ namespace binfilter {
/*N*/ PolyPolygon aPolyPolygon;
/*N*/ Polygon aPoly( aRect );
/*N*/ aPolyPolygon.Insert( aPoly );
-/*N*/
+/*N*/
/*N*/ E3dExtrudeObj* pFloorObj = new SchE3dExtrudeObj( aDefltAttr3D, aPolyPolygon, fFloorWidth );
/*N*/ Matrix4D aMatrix;
/*N*/ aMatrix.RotateX( 90.0 * F_PI180 );
/*N*/ aMatrix.TranslateZ( aSizeVec.Z() );
/*N*/ aMatrix.Translate( aPos );
-/*N*/
+/*N*/
/*N*/ pFloorObj->SetModel( this );
/*N*/ pFloorObj->InsertUserData( new SchObjectId( CHOBJID_DIAGRAM_FLOOR ) );
/*N*/ rScene.Insert3DObj( pFloorObj );
-/*N*/
-/*N*/ //-/ pFloorObj->NbcSetAttributes( *pDiagramFloorAttr, FALSE );
+/*N*/
/*N*/ pFloorObj->SetItemSet(*pDiagramFloorAttr);
-/*N*/
+/*N*/
/*N*/ pFloorObj->NbcSetTransform( aMatrix * aShift );
-/*N*/
+/*N*/
/*N*/ Vector3D aEndPos( aPos );
/*N*/ aEndPos.Z() += aSizeVec.Z();
-/*N*/
+/*N*/
/*N*/ Vector3D aLine3D [2] = { aPos, aEndPos };
-/*N*/
+/*N*/
/*N*/ SfxItemSet aXTextAttr ((const SfxItemSet &) *pXAxisAttr);
/*N*/ aXTextAttr.Put(XLineStyleItem (XLINE_NONE));
/*N*/ aXTextAttr.Put(XLineWidthItem (0));
-/*N*/
+/*N*/
/*N*/ //#47500#
/*N*/ if (pZAxisGroup && pChartZAxis->IsVisible()) Create3DPolyObject( pZAxisAttr, new SchE3dPolygonObj (aDefltAttr3D, aLine3D[0], aLine3D[1]),
/*N*/ CHOBJID_LINE, pZAxisGroup );
-/*N*/
+/*N*/
/*N*/ if (bSwitchColRow)
/*N*/ {
/*N*/ long nStepMainY = (long) aSizeVec.Y () / nColumnCnt;
/*N*/ long nStepHelpY = nStepMainY / 2;
-/*N*/
+/*N*/
/*N*/ for (i = 0; i <= nColumnCnt; i++)
/*N*/ {
/*N*/ // erzeuge hilfslinie
/*N*/ aLine3D[0].Y() =
/*N*/ aLine3D[1].Y() = aPos.Y() + nStepMainY * i;
-/*N*/
+/*N*/
/*N*/ if (pYGridMainGroup) Create3DPolyObject (pYGridMainAttr, new SchE3dPolygonObj (aDefltAttr3D, aLine3D[0], aLine3D[1]),
/*N*/ CHOBJID_DIAGRAM_Y_GRID_MAIN, pYGridMainGroup);
-/*N*/
+/*N*/
/*N*/ if ((i < nColumnCnt) && pXAxisGroup && pChartXAxis->HasDescription())
/*N*/ {
/*N*/ // bei tiefen diagrammtypen muessen die beschriftungen auf halbem abstand
/*N*/ // untergebracht sein
/*N*/ Vector3D aTextPos = aLine3D[1];
-/*N*/
+/*N*/
/*N*/ if (bPartDescr) aTextPos.Y() += nStepHelpY / 2;
-/*N*/
-/*N*/
+/*N*/
+/*N*/
/*N*/ SdrTextObj *pTextObj = CreateTextObj(CHOBJID_TEXT,
/*N*/ Point (),ColText(i),
/*N*/ aXTextAttr, FALSE,CHADJUST_CENTER_RIGHT);
/*N*/ E3dLabelObj *pE3DLabel = new E3dLabelObj
/*N*/ (aTextPos,pTextObj );
/*N*/ pE3DLabel->SetMarkProtect(TRUE);
-/*N*/ aXDescrList.Insert(pE3DLabel,LIST_APPEND);
+/*N*/ aXDescrList.push_back( pE3DLabel );
/*N*/ }
-/*N*/
+/*N*/
/*N*/ // hilfslinien koennen mit erzeugt werden
/*N*/ if (pYGridHelpGroup && (i < nColumnCnt))
/*N*/ {
@@ -625,33 +623,33 @@ namespace binfilter {
/*N*/ {
/*N*/ long nStepMainX = (long) aSizeVec.X () / nColumnCnt;
/*N*/ long nStepHelpX = nStepMainX / 2;
-/*N*/
+/*N*/
/*N*/ for (i = 0; i <= nColumnCnt; i++)
/*N*/ {
/*N*/ // erzeuge hilfslinie
/*N*/ aLine3D[0].X() =
/*N*/ aLine3D[1].X() = aPos.X() + nStepMainX * i;
-/*N*/
+/*N*/
/*N*/ if (pYGridMainGroup) Create3DPolyObject (pYGridMainAttr, new SchE3dPolygonObj (aDefltAttr3D, aLine3D[0], aLine3D[1]),
/*N*/ CHOBJID_DIAGRAM_Y_GRID_MAIN, pYGridMainGroup);
-/*N*/
+/*N*/
/*N*/ if ((i < nColumnCnt) && pXAxisGroup && pChartXAxis->HasDescription())
/*N*/ {
/*N*/ // bei tiefen diagrammtypen muessen die beschriftungen auf halbem abstand
/*N*/ // untergebracht sein
/*N*/ Vector3D aTextPos = aLine3D[1];
-/*N*/
+/*N*/
/*N*/ if (bPartDescr) aTextPos.X() += nStepHelpX;
-/*N*/
-/*N*/
+/*N*/
+/*N*/
/*N*/ SdrTextObj *pTextObj = CreateTextObj(CHOBJID_TEXT,
/*N*/ Point (),ColText(i),
/*N*/ aXTextAttr, FALSE,CHADJUST_TOP_RIGHT);
/*N*/ E3dLabelObj *pE3DLabel = new E3dLabelObj (aTextPos,pTextObj );
/*N*/ pE3DLabel->SetMarkProtect(TRUE);
-/*N*/ aXDescrList.Insert(pE3DLabel,LIST_APPEND);
+/*N*/ aXDescrList.push_back( pE3DLabel );
/*N*/ }
-/*N*/
+/*N*/
/*N*/ // hilfslinien koennen mit erzeugt werden
/*N*/ if (pYGridHelpGroup && (i < nColumnCnt))
/*N*/ {
@@ -662,51 +660,51 @@ namespace binfilter {
/*N*/ }
/*N*/ }
/*N*/ }
-/*N*/
+/*N*/
/*N*/ aLine3D[ 0 ] =
/*N*/ aLine3D[ 1 ] = aEndPos;
/*N*/ aLine3D[ 1 ].X() += aSizeVec.X();
-/*N*/
+/*N*/
/*N*/ SfxItemSet aZTextAttr ((const SfxItemSet &) *pZAxisAttr);
/*N*/ aZTextAttr.Put(XLineStyleItem (XLINE_NONE));
/*N*/ aZTextAttr.Put(XLineWidthItem (0));
-/*N*/
+/*N*/
/*N*/ long nStepMainZ = (long) aSizeVec.Z () / nRowCnt;
/*N*/ long nStepHelpZ = nStepMainZ / 2;
-/*N*/
+/*N*/
/*N*/ BOOL bCreateGridLine = ( (aLine3D[ 0 ].X() != aLine3D[ 1 ].X()) ||
/*N*/ (aLine3D[ 0 ].Y() != aLine3D[ 1 ].Y()) );
/*N*/ // Z() values become equal in the for loop
/*N*/ // => start and end points would be equal
-/*N*/
+/*N*/
/*N*/ for (i = 0; i <= nRowCnt; i++)
/*N*/ {
/*N*/ // create main gridline
/*N*/ aLine3D[0].Z() =
/*N*/ aLine3D[1].Z() = aPos.Z() + nStepMainZ * i;
-/*N*/
+/*N*/
/*N*/ if( pZGridMainGroup && bCreateGridLine )
/*N*/ Create3DPolyObject( pZGridMainAttr, new SchE3dPolygonObj( aDefltAttr3D, aLine3D[ 0 ], aLine3D[ 1 ] ),
/*N*/ CHOBJID_DIAGRAM_Z_GRID_MAIN, pZGridMainGroup );
-/*N*/
+/*N*/
/*N*/ // bei tiefen diagrammtypen muessen die beschriftungen auf halbem abstand
/*N*/ // untergebracht sein
/*N*/ Vector3D aTextPos = aLine3D[1];
-/*N*/
+/*N*/
/*N*/ if (bPartDescr) aTextPos.Z () += nStepHelpZ;
-/*N*/
+/*N*/
/*N*/ if ((i < nRowCnt) && (nRowCnt > 1) && pZAxisGroup && pChartZAxis->HasDescription())
/*N*/ {
-/*N*/
+/*N*/
/*N*/ SdrTextObj *pTextObj=CreateTextObj(CHOBJID_TEXT, Point (),
/*N*/ RowText(nRowCnt - 1 - i), aZTextAttr,
/*N*/ FALSE, CHADJUST_TOP_LEFT) ;
-/*N*/
+/*N*/
/*N*/ E3dLabelObj *pE3DLabel = new E3dLabelObj(aTextPos,pTextObj);
/*N*/ pE3DLabel->SetMarkProtect(TRUE);
-/*N*/ aZDescrList.Insert(pE3DLabel,(ULONG)0);//ZListe umgekehrt füllen
+/*N*/ aZDescrList.insert( aZDescrList.begin(), pE3DLabel );//ZListe umgekehrt füllen
/*N*/ }
-/*N*/
+/*N*/
/*N*/ if (pZGridHelpGroup && (i < nRowCnt))
/*N*/ {
/*?*/ aLine3D[0].Z() += nStepHelpZ;
@@ -716,16 +714,16 @@ namespace binfilter {
/*?*/ CHOBJID_DIAGRAM_Z_GRID_HELP, pZGridHelpGroup );
/*N*/ }
/*N*/ }
-/*N*/
+/*N*/
/*N*/ break;
/*N*/ }
/*N*/ }
/*N*/ }
-/*N*/
+/*N*/
/*N*/ pScene->InsertAllTitleText (aXDescrList, pXAxisGroup,SCH_AXIS_ID_X);
/*N*/ pScene->InsertAllTitleText (aYDescrList, pYAxisGroup,SCH_AXIS_ID_Y);
/*N*/ pScene->InsertAllTitleText (aZDescrList, pZAxisGroup,SCH_AXIS_ID_Z);
-/*N*/
+/*N*/
/*N*/ if (pXGridHelpGroup) rScene.Insert3DObj(pXGridHelpGroup);
/*N*/ if (pYGridHelpGroup) rScene.Insert3DObj(pYGridHelpGroup);
/*N*/ if (pZGridHelpGroup) rScene.Insert3DObj(pZGridHelpGroup);
@@ -735,7 +733,7 @@ namespace binfilter {
/*N*/ if (pXAxisGroup) rScene.Insert3DObj(pXAxisGroup);
/*N*/ if (pYAxisGroup) rScene.Insert3DObj(pYAxisGroup);
/*N*/ if (pZAxisGroup) rScene.Insert3DObj(pZAxisGroup);
-/*N*/
+/*N*/
/*N*/ //TVM: aus FitInSnapRect
/*N*/ //TVM: Bound statt Logic
/*N*/ Position3DAxisTitles(rScene.GetBoundRect());
@@ -750,10 +748,10 @@ namespace binfilter {
/*N*/ SdrObjGroup* ChartModel::Create3DDeepChart(Rectangle &rRect)
/*N*/ {
/*N*/ const long nGapWidth = 10;
-/*N*/
+/*N*/
/*N*/ pScene = CreateScene (rRect, *aLightVec, fSpotIntensity, aSpotColor,
/*N*/ fAmbientIntensity, aAmbientColor);
-/*N*/
+/*N*/
/*N*/ Vector3D aTextPos3D;
/*N*/ Polygon3D aRect3D(4);
/*N*/ Polygon3D aTriangle3D(3);
@@ -761,9 +759,9 @@ namespace binfilter {
/*N*/ Polygon3D aBackSide;
/*N*/ BOOL bSwitchColRow = IsBar();
/*N*/ E3dDefaultAttributes aDefltAttr3D;
-/*N*/
+/*N*/
/*N*/ CreateAndInsert3DAxesTitles (rRect, bSwitchColRow);
-/*N*/
+/*N*/
/*N*/ long nX = 0;
/*N*/ long nY = 0;
/*N*/ long nW = FIXED_SIZE_FOR_3D_CHART_VOLUME;
@@ -772,9 +770,9 @@ namespace binfilter {
/*N*/ long nColCnt = GetColCount();
/*N*/ long nRowCnt = GetRowCount();
/*N*/ short nCol, nRow;
-/*N*/
+/*N*/
/*N*/ Polygon aFrontExtrude(1+nColCnt*2);
-/*N*/
+/*N*/
/*N*/ long nGapX = nW * nGapWidth / 1000;
/*N*/ long nGapY = nH * nGapWidth / 1000;
/*N*/ long nGapZ = nZ * nGapWidth / 1000;
@@ -782,9 +780,9 @@ namespace binfilter {
/*N*/ long nPartWidth;
/*N*/ long nBarWidthX;
/*N*/ long nBarWidthZ = nPartDepth - nGapZ * 2;
-/*N*/
+/*N*/
/*N*/ BOOL bLogarithm = ((const SfxBoolItem&) pChartYAxis->GetItemSet()->Get(SCHATTR_AXIS_LOGARITHM)).GetValue();
-/*N*/
+/*N*/
/*N*/ BOOL bPartDescr;
/*N*/ long nDepth = ((eChartStyle == CHSTYLE_3D_BAR) ||
/*N*/ (eChartStyle == CHSTYLE_3D_COLUMN) ||
@@ -792,7 +790,7 @@ namespace binfilter {
/*N*/ (eChartStyle == CHSTYLE_3D_AREA))
/*N*/ ? -nZ
/*N*/ : nPartDepth;
-/*N*/
+/*N*/
/*N*/ nPartWidth = (eChartStyle == CHSTYLE_3D_BAR)
/*N*/ ? nH / nColCnt
/*N*/ : ((eChartStyle == CHSTYLE_3D_COLUMN)
@@ -804,7 +802,7 @@ namespace binfilter {
/*N*/ ? nPartWidth - nGapY * 2
/*N*/ : nPartWidth - nGapX * 2;
/*N*/ bPartDescr = TRUE;
-/*N*/
+/*N*/
/*N*/ Camera3D aCam(pScene->GetCamera());
/*N*/ Vector3D aCamPos(nX + nW/2, nH/2, nW/2);
/*N*/ Vector3D aLookAt(nX + nW/2, nH/2, nDepth/2);
@@ -815,25 +813,25 @@ namespace binfilter {
/*N*/ aCam.RotateAroundLookAt(DEG2RAD((double)nYAngle / 10.0), DEG2RAD((double)nXAngle / 10.0));
/*N*/ aCam.SetAspectMapping(AS_HOLD_SIZE);
/*N*/ pScene->SetCamera(aCam);
-/*N*/
+/*N*/
/*N*/ nY = 0;
-/*N*/
+/*N*/
/*N*/ Vector3D a3DPos(nX, nY, nDepth);
/*N*/ Vector3D a3DSize(nW, nH, -nDepth);
-/*N*/
+/*N*/
/*N*/ Create3DBackplanes(rRect, a3DPos, a3DSize, *pScene,
/*N*/ bPartDescr, FALSE, bLogarithm, FALSE, CHSTACK_NONE, FALSE, FALSE,
/*N*/ bSwitchColRow);
-/*N*/
+/*N*/
/*N*/ nY = (long)(pChartYAxis->CalcFactOrigin() * nH);
/*N*/ a3DPos = Vector3D(0, nY, nDepth - nBarWidthZ + nPartDepth - nGapZ);
-/*N*/
+/*N*/
/*N*/ DataDescription aDescription;
-/*N*/
+/*N*/
/*N*/ for (nRow = nRowCnt-1; nRow >= 0; nRow--)
/*N*/ {
/*N*/ E3dScene* pStripe = NULL;
-/*N*/
+/*N*/
/*N*/ // create row-groups. Insertion into main scene is done at the end of
/*N*/ // the for loop (#109628#)
/*N*/ E3dScene* pRowGroup = Create3DScene (CHOBJID_DIAGRAM_ROWGROUP);
@@ -841,48 +839,48 @@ namespace binfilter {
/*N*/ // top-level scene
/*N*/ pRowGroup->SetItemSet( pScene->GetItemSet() );
/*N*/ pRowGroup->InsertUserData(new SchDataRow(nRow));
-/*N*/
+/*N*/
/*N*/ if ( eChartStyle == CHSTYLE_3D_STRIPE )
/*N*/ pStripe = pRowGroup;
-/*N*/
+/*N*/
/*N*/ a3DPos.X() = nX;
/*N*/ a3DPos.Y() = nY;
-/*N*/
+/*N*/
/*N*/ switch(eChartStyle)
/*N*/ {
/*N*/ case CHSTYLE_3D_COLUMN:
-/*N*/
+/*N*/
/*N*/ a3DPos.X() += nGapX;
/*N*/ break;
-/*N*/
+/*N*/
/*N*/ case CHSTYLE_3D_BAR:
-/*N*/
+/*N*/
/*N*/ // #67333# the y axis of bar charts is not interrested in negative values
/*N*/ a3DPos.Y() = nGapY; // += nGapY;
/*N*/ break;
-/*N*/
+/*N*/
/*N*/ default:
-/*N*/
+/*N*/
/*?*/ aBackSide[0] = a3DPos;
/*?*/ aFrontSide[0] = a3DPos;
/*?*/ aFrontSide[0].Z() += nBarWidthZ;
-/*?*/
+/*?*/
/*?*/ aFrontExtrude[0] =Point((long)a3DPos.X(),(long)-a3DPos.Y());
/*N*/ break;
/*N*/ }
-/*N*/
+/*N*/
/*N*/ Vector3D aLastValue;
/*N*/ short nPoints = 0;
-/*N*/
+/*N*/
/*N*/ for (nCol = 0; nCol < nColCnt; nCol++)
/*N*/ {
/*N*/ double fData = GetData(nCol, nRow);
-/*N*/
+/*N*/
/*N*/ SfxItemSet aDataPointAttr(GetFullDataPointAttr(nCol, nRow));
-/*N*/
+/*N*/
/*N*/ SvxChartDataDescr eDescr = ((const SvxChartDataDescrItem&)aDataPointAttr.
/*N*/ Get(SCHATTR_DATADESCR_DESCR)).GetValue();
-/*N*/
+/*N*/
/*N*/ BOOL bShowDataDescrLocal = (eDescr != CHDESCR_NONE) && bShowDataDescr && // bShowDataDescr is class member
/*N*/ fData != DBL_MIN;
/*N*/ if( bShowDataDescrLocal )
@@ -890,12 +888,12 @@ namespace binfilter {
/**************************************************************
* DataDescription erforderlich
**************************************************************/
-/*N*/
+/*N*/
/*?*/ aDescription.eDescr = eDescr;
/*?*/ aDescription.bSymbol = ((const SfxBoolItem&)aDataPointAttr.
/*?*/ Get(SCHATTR_DATADESCR_SHOW_SYM)).GetValue();
/*N*/ }
-/*N*/
+/*N*/
/*N*/ if (eChartStyle == CHSTYLE_3D_COLUMN)
/*N*/ {
/*N*/ double fTop, fBottom;
@@ -909,19 +907,19 @@ namespace binfilter {
/*N*/ fTop = fData;
/*N*/ fBottom = fOriginY;
/*N*/ }
-/*N*/
+/*N*/
/*N*/ long nTop = Min((long)(pChartYAxis->CalcFact(fTop) * nH), nH);
/*N*/ long nBottom = Max((long)(pChartYAxis->CalcFact(fBottom) * nH), 0L);
-/*N*/
+/*N*/
/*N*/ if( fData != DBL_MIN )
/*N*/ {
/*N*/ long nBarHeight = nTop - nBottom + 1;
/*N*/ a3DPos.Y() = nBottom;
-/*N*/
+/*N*/
/*N*/ if( nTop > nBottom )
/*N*/ pRowGroup->Insert3DObj(Create3DBar(a3DPos, Vector3D(nBarWidthX, nBarHeight, nBarWidthZ), nCol, nRow,
/*N*/ aDataPointAttr, FALSE,0,pChartYAxis->CalcFactOrigin()*(double)nH,0));
-/*N*/
+/*N*/
/*N*/ if( bShowDataDescrLocal )
/*N*/ {
/*?*/ aDescription.aTextPos3D = a3DPos;
@@ -952,28 +950,28 @@ namespace binfilter {
/*N*/ fRight = fData;
/*N*/ fLeft = fOriginY;
/*N*/ }
-/*N*/
+/*N*/
/*N*/ long nRight = Min((long)(pChartYAxis->CalcFact(fRight) * nW), nW);
/*N*/ long nLeft = Max((long)(pChartYAxis->CalcFact(fLeft) * nW), 0L);
-/*N*/
+/*N*/
/*N*/ if( fData != DBL_MIN )
/*N*/ {
/*N*/ long nBarWidth = nRight - nLeft + 1;
/*N*/ a3DPos.X() = nLeft;
-/*N*/
+/*N*/
/*N*/ if( nRight > nLeft )
/*N*/ pRowGroup->Insert3DObj(Create3DBar(a3DPos, Vector3D(nBarWidth, nBarWidthX, nBarWidthZ), nCol, nRow,
/*N*/ aDataPointAttr,FALSE,0,pChartYAxis->CalcFactOrigin()*(double)nW,0));
-/*N*/
+/*N*/
/*N*/ if (bShowDataDescrLocal)
/*N*/ {
/*?*/ aDescription.aTextPos3D = a3DPos;
-/*?*/
+/*?*/
/*?*/ // #67379# corrected orientation of description
/*?*/ aDescription.aTextPos3D.X() += (fData<0)? 0: nBarWidth;
/*?*/ aDescription.aTextPos3D.Y() += nBarWidthX / 2;
/*?*/ aDescription.aTextPos3D.Z() += nBarWidthZ / 2;
-/*?*/
+/*?*/
/*?*/ aDescription.fValue = GetData(nCol, nRow, // #67378#
/*?*/ ((aDescription.eDescr == CHDESCR_PERCENT) ||
/*?*/ (aDescription.eDescr == CHDESCR_TEXTANDPERCENT)) );
@@ -990,11 +988,11 @@ namespace binfilter {
/*?*/ long nPos = (long)(pChartYAxis->CalcFact(fData ) * nH);
/*?*/ if (nPos < 0L) nPos = 0L;
/*?*/ else if (nPos > nH) nPos = nH;
-/*?*/
+/*?*/
/*?*/ const SfxItemSet& rDataRowAttr = GetDataRowAttr(nRow);
-/*?*/
+/*?*/
/*?*/ a3DPos.Y() = nPos;
-/*?*/
+/*?*/
/*?*/ switch (eChartStyle)
/*?*/ {
/*?*/ case CHSTYLE_3D_STRIPE:
@@ -1002,13 +1000,13 @@ namespace binfilter {
/*?*/ {
/*?*/ UINT16 nRev = nColCnt + 1 - nPoints;
/*?*/ BOOL bValidData = TRUE;
-/*?*/
+/*?*/
/*?*/ if ((eChartStyle == CHSTYLE_3D_AREA) && (fData == DBL_MIN))
/*?*/ {
/*?*/ fData = 0.0;
/*?*/ bValidData = FALSE;
/*?*/ }
-/*?*/
+/*?*/
/*?*/ if (fData != DBL_MIN)
/*?*/ {
/*?*/ //Stripes:
@@ -1017,7 +1015,7 @@ namespace binfilter {
/*?*/ aBackSide[nPoints] = a3DPos;
/*?*/ //Area:
/*?*/ aFrontExtrude[nRev] = Point((long)a3DPos.X(),(long)-a3DPos.Y());
-/*?*/
+/*?*/
/*?*/ if (!nPoints)
/*?*/ {
/*?*/ //Stripes:
@@ -1039,17 +1037,16 @@ namespace binfilter {
/*?*/ aRect3D[2] = aFrontSide[nRev];
/*?*/ aRect3D[3] = aBackSide[nPoints];
/*?*/ E3dPolygonObj *pPolyObj=new SchE3dPolygonObj (aDefltAttr3D, aRect3D);
-/*?*/
-/*?*/ //-/ pPolyObj->SetDoubleSided(TRUE); //Neu 18.5.98
+/*?*/
/*?*/ pPolyObj->SetItem(Svx3DDoubleSidedItem(TRUE)); //Neu 18.5.98
-/*?*/
+/*?*/
/*?*/ Create3DPolyObject (&rDataRowAttr,pPolyObj,CHOBJID_AREA, pStripe);
/*?*/ }
/*?*/ }
/*?*/ nPoints ++;
/*?*/ }
/*?*/ else bValidData = FALSE;
-/*?*/
+/*?*/
/*?*/ if (nPoints && (eChartStyle==CHSTYLE_3D_AREA) && (nCol==nColCnt-1))
/*?*/ {
/*?*/ Vector3D aFill = (fData == DBL_MIN) ? aLastValue : a3DPos;
@@ -1061,7 +1058,7 @@ namespace binfilter {
/*?*/ aFrontSide[nColCnt+1-nFill].Z() += nBarWidthZ;
/*?*/ aFrontExtrude[nColCnt+1-nFill]=Point((long)aFill.X(),0);
/*?*/ }
-/*?*/
+/*?*/
/*?*/ if (nColCnt > 1)
/*?*/ {
/*?*/ PolyPolygon aPolyPoly;
@@ -1074,13 +1071,13 @@ namespace binfilter {
/*?*/ Create3DExtrudePolyObj(&rDataRowAttr,pExtrudeObj,CHOBJID_AREA,pRowGroup);
/*?*/ }
/*?*/ } //Area
-/*?*/
+/*?*/
/*?*/ if (fData == DBL_MIN) nPoints = 0;
-/*?*/
+/*?*/
/*?*/ if (bShowDataDescrLocal)
/*?*/ {
/*?*/ aDescription.aTextPos3D = aFrontSide[nRev];
-/*?*/
+/*?*/
/*?*/ if (bValidData)
/*?*/ {
/*?*/ if ((aDescription.eDescr == CHDESCR_PERCENT) ||
@@ -1097,13 +1094,13 @@ namespace binfilter {
/*?*/ {
/*?*/ aDescription.fValue = DBL_MIN;
/*?*/ }
-/*?*/
+/*?*/
/*?*/ aDescription.eAdjust = CHADJUST_CENTER_CENTER;
/*?*/ }
-/*?*/
+/*?*/
/*?*/ break;
/*?*/ }
-/*?*/
+/*?*/
/*?*/ case CHSTYLE_3D_SURFACE:
/*?*/ if (nColCnt > 1)
/*?*/ {
@@ -1120,10 +1117,10 @@ namespace binfilter {
/*?*/ aTriangle3D[3].Z() -= nPartDepth;
/*?*/ aTriangle3D[3].Y() =
/*?*/ (long)(pChartYAxis->CalcFact(GetData(nCol+1, nRow)) * nH);
-/*?*/
+/*?*/
/*?*/ Create3DPolyObject (&rDataRowAttr, new SchE3dPolygonObj (aDefltAttr3D, aTriangle3D, TRUE, TRUE),
/*?*/ CHOBJID_AREA, pRowGroup);
-/*?*/
+/*?*/
/*?*/ aTriangle3D[0] = aTriangle3D[1];
/*?*/ aTriangle3D[1] = aTriangle3D[2];
/*?*/ aTriangle3D[2] = a3DPos;
@@ -1134,18 +1131,18 @@ namespace binfilter {
default: break;
/*?*/ }
/*?*/ }
-/*N*/
+/*N*/
/*N*/ aLastValue = a3DPos;
/*N*/ if (eChartStyle == CHSTYLE_3D_BAR) a3DPos.Y() += nPartWidth;
/*N*/ else a3DPos.X() += nPartWidth;
-/*N*/
+/*N*/
/*N*/ if( pScene && bShowDataDescrLocal )
/*N*/ {
/*?*/ DBG_BF_ASSERT(0, "STRIP"); //STRIP001 /*?*/ CreateDataDescr( aDescription, nCol, nRow, NULL, FALSE, TRUE );
/*N*/ }
-/*N*/
+/*N*/
/*N*/ }// end for nCol
-/*N*/
+/*N*/
/*N*/ // #109628# insert row groups into main scene only if they contain data
/*N*/ // points
/*N*/ if( pRowGroup->GetSubList()->GetObjCount() > 0 )
@@ -1153,13 +1150,9 @@ namespace binfilter {
/*?*/ pScene->Insert3DObj( pRowGroup );
/*N*/ }
- /*Dirty3D (nColCnt, nRow, TRUE, pDescription, (eDataDescr != CHDESCR_NONE) && bShowDataDescr
- ? pScene
- : NULL);
- */
/*N*/ a3DPos.Z() += nPartDepth;
/*N*/ }//end for nRow
-/*N*/
+/*N*/
/*N*/ return (SdrObjGroup*) pScene;
/*N*/ }
@@ -1172,22 +1165,22 @@ namespace binfilter {
/*N*/ SdrObjGroup* ChartModel::Create3DFlatChart(Rectangle &rRect)
/*N*/ {
/*N*/ const long nGapWidth = 10;
-/*N*/
+/*N*/
/*N*/ pScene = CreateScene (rRect, *aLightVec, fSpotIntensity, aSpotColor,
/*N*/ fAmbientIntensity, aAmbientColor);
-/*N*/
+/*N*/
/*N*/ Vector3D aTextPos3D;
-/*N*/
+/*N*/
/*N*/ Polygon3D aFrontSide;
-/*N*/
+/*N*/
/*N*/ BOOL bSwitchColRow = IsBar();
/*N*/ E3dDefaultAttributes aDefltAttr3D;
-/*N*/
+/*N*/
/*N*/ CreateAndInsert3DAxesTitles (rRect, bSwitchColRow);
-/*N*/
+/*N*/
/*N*/ BOOL bPercent = IsPercent();
-/*N*/
-/*N*/
+/*N*/
+/*N*/
/*N*/ USHORT eStackMode;
/*N*/ switch (eChartStyle)
/*N*/ {
@@ -1197,17 +1190,17 @@ namespace binfilter {
/*N*/ case CHSTYLE_3D_PERCENTFLATBAR:
/*N*/ eStackMode = CHSTACK_MINMAX;
/*N*/ break;
-/*N*/
+/*N*/
/*N*/ case CHSTYLE_3D_STACKEDAREA:
/*N*/ case CHSTYLE_3D_PERCENTAREA:
/*N*/ eStackMode = CHSTACK_OVERLAP;
/*N*/ break;
-/*N*/
+/*N*/
/*N*/ default:
/*N*/ eStackMode = CHSTACK_NONE;
/*N*/ break;
/*N*/ }
-/*N*/
+/*N*/
/*N*/ long nX = 0;
/*N*/ long nY = 0;
/*N*/ long nW = FIXED_SIZE_FOR_3D_CHART_VOLUME;
@@ -1215,7 +1208,7 @@ namespace binfilter {
/*N*/ long nColCnt = GetColCount();
/*N*/ long nRowCnt = GetRowCount();
/*N*/ long nCol, nRow;
-/*N*/
+/*N*/
/*N*/ long nGapX = nW * nGapWidth / 1000;
/*N*/ long nGapY = nH * nGapWidth / 1000;
/*N*/ long nGapZ = nW * nGapWidth / 1000;
@@ -1225,14 +1218,13 @@ namespace binfilter {
/*N*/ long nBarWidthX;
/*N*/ long nBarWidthZ = nPartDepth - nGapZ * 2;
/*N*/ long nDepth = -nPartDepth;
-/*N*/
+/*N*/
/*N*/ SfxItemSet* pYAxisAttr = pChartYAxis->GetItemSet();
-/*N*/ // BOOL bLogarithm = ((const SfxBoolItem&) pYAxisAttr->Get(SCHATTR_Y_AXIS_LOGARITHM)).GetValue();
/*N*/ BOOL bLogarithm = ((const SfxBoolItem&) pYAxisAttr->Get(SCHATTR_AXIS_LOGARITHM)).GetValue();
/*N*/ BOOL bPartDescr;
-/*N*/
+/*N*/
/*N*/ Polygon aFrontExtrude(1+nColCnt*2);
-/*N*/
+/*N*/
/*N*/ switch (eChartStyle)
/*N*/ {
/*N*/ case CHSTYLE_3D_STACKEDAREA:
@@ -1260,7 +1252,7 @@ namespace binfilter {
/*N*/ break;
/*N*/ }
/*N*/ }
-/*N*/
+/*N*/
/*N*/ Camera3D aCam(pScene->GetCamera());
/*N*/ Vector3D aCamPos(nX + nW/2, nH/2, nW/2);
/*N*/ Vector3D aLookAt(nX + nW/2, nH/2, nDepth/2);
@@ -1271,52 +1263,52 @@ namespace binfilter {
/*N*/ aCam.RotateAroundLookAt(DEG2RAD((double)nYAngle / 10.0), DEG2RAD((double)nXAngle / 10.0));
/*N*/ aCam.SetAspectMapping(AS_HOLD_SIZE);
/*N*/ pScene->SetCamera(aCam);
-/*N*/
+/*N*/
/*N*/ nY = 0;
/*N*/ Vector3D a3DPos(nX, nY, nDepth);
/*N*/ Vector3D a3DSize(nW, nH, -nDepth);
-/*N*/
+/*N*/
/*N*/ Create3DBackplanes(rRect, a3DPos, a3DSize, *pScene,
/*N*/ bPartDescr, FALSE, bLogarithm, FALSE, eStackMode, bPercent, TRUE,
/*N*/ bSwitchColRow);
-/*N*/
+/*N*/
/*N*/ a3DPos = Vector3D(nX, nY, nDepth - nBarWidthZ + nPartDepth - nGapZ);
-/*N*/
+/*N*/
/*N*/ switch (eChartStyle)
/*N*/ {
/*N*/ case CHSTYLE_3D_STACKEDAREA:
/*N*/ case CHSTYLE_3D_PERCENTAREA:
/*N*/ {
/*N*/ DataDescription* pDescription = NULL;
-/*N*/
+/*N*/
/*N*/ double* fOldData = new double[nColCnt];
/*N*/ a3DPos.Z() += nBarWidthZ;
-/*N*/
+/*N*/
/*N*/ for (nRow = 0; nRow < nRowCnt; nRow++)
/*N*/ {
/*N*/ E3dScene* pRowGroup = Create3DScene (CHOBJID_DIAGRAM_ROWGROUP);
/*N*/ pScene->Insert3DObj(pRowGroup);
-/*N*/
+/*N*/
/*N*/ pRowGroup->InsertUserData(new SchDataRow((short)nRow));
-/*N*/
+/*N*/
/*N*/ const SfxItemSet& rDataRowAttr = GetDataRowAttr(nRow);
-/*N*/
+/*N*/
/*N*/ for (nCol = 0; nCol < nColCnt; nCol++)
/*N*/ {
/*N*/ double fData = fabs(GetData(nCol, nRow, bPercent));
/*N*/ SfxItemSet aDataPointAttr (GetFullDataPointAttr(nCol, nRow));
/*N*/ BOOL bValidData;
-/*N*/
+/*N*/
/*N*/ if (fData == DBL_MIN)
/*N*/ {
/*?*/ fData = 0.0;
/*?*/ bValidData = FALSE;
/*N*/ }
/*N*/ else bValidData = TRUE;
-/*N*/
+/*N*/
/*N*/ SvxChartDataDescr eDescr = ((const SvxChartDataDescrItem&)aDataPointAttr.
/*N*/ Get(SCHATTR_DATADESCR_DESCR)).GetValue();
-/*N*/
+/*N*/
/*N*/ if( (eDescr != CHDESCR_NONE) && bShowDataDescr)
/*N*/ {
/******************************************************
@@ -1326,16 +1318,15 @@ namespace binfilter {
/*?*/ {
/*?*/ // DataDescription noch nicht vorhanden -> erzeugen
/*?*/ DBG_BF_ASSERT(0, "STRIP"); //STRIP001 pDescription = new DataDescription [nColCnt];
-/*?*/ //STRIP001 ClearDataDescription(pDescription,nColCnt);
/*?*/ }
-/*?*/
+/*?*/
/*?*/ pDescription [nCol].eDescr = eDescr;
/*?*/ pDescription [nCol].bSymbol = ((const SfxBoolItem&)aDataPointAttr.
/*?*/ Get(SCHATTR_DATADESCR_SHOW_SYM)).GetValue();
/*N*/ }
-/*N*/
+/*N*/
/*N*/ long nRev = nColCnt * 2 - 1 - nCol;
-/*N*/
+/*N*/
/*N*/ if (!nRow)
/*N*/ {
/*N*/ a3DPos.Y() = Min((long)(pChartYAxis->CalcFact(fData) * nH), nH);
@@ -1355,14 +1346,14 @@ namespace binfilter {
/*N*/ aFrontExtrude[(UINT16)nCol] = aFrontExtrude[(UINT16)nRev];
/*N*/ aFrontExtrude[(UINT16)nRev]=Point((long)a3DPos.X(),(long)-a3DPos.Y());
/*N*/ }
-/*N*/
+/*N*/
/*N*/ fOldData[nCol] = fData;
-/*N*/
+/*N*/
/*N*/ if (pDescription)
/*N*/ {
/*?*/ pDescription [nCol].aTextPos3D = aFrontSide[(UINT16)nRev];
/*?*/ pDescription [nCol].aTextPos3D.Y() -= (aFrontSide[(UINT16)nRev].Y() - aFrontSide[(UINT16)nCol].Y()) / 2;
-/*?*/
+/*?*/
/*?*/ if (bValidData)
/*?*/ {
/*?*/ if ((pDescription [nCol].eDescr == CHDESCR_PERCENT) ||
@@ -1379,25 +1370,25 @@ namespace binfilter {
/*?*/ {
/*?*/ pDescription [nCol].fValue = DBL_MIN;
/*?*/ }
-/*?*/
+/*?*/
/*?*/ pDescription [nCol].eAdjust = CHADJUST_CENTER_CENTER;
-/*?*/
+/*?*/
/*?*/ if( eDescr != CHDESCR_NONE && bValidData )
/*?*/ {
/*?*/ DBG_BF_ASSERT(0, "STRIP"); //STRIP001 CreateDataDescr( pDescription[ nCol ], nCol, nRow, NULL, FALSE, TRUE );
/*?*/ }
/*N*/ }
-/*N*/
+/*N*/
/*N*/ a3DPos.X() += nPartWidth;
/*N*/ } //end for nCol
-/*N*/
+/*N*/
/*N*/ if (nColCnt > 1)
/*N*/ {
-/*N*/
+/*N*/
/*N*/ PolyPolygon aPolyPoly;
/*N*/ aFrontExtrude[nColCnt*2]=aFrontExtrude[0];//.SetClosed(TRUE);
/*N*/ aPolyPoly.Insert(aFrontExtrude);
-/*N*/
+/*N*/
/*N*/ E3dExtrudeObj* pExtrudeObj= new SchE3dExtrudeObj(aDefltAttr3D, aPolyPoly,nBarWidthZ);
/*N*/ Matrix4D aMatrix;
/*N*/ aMatrix.Translate(Vector3D(0,0,nDepth - nBarWidthZ + nPartDepth - nGapZ )); //-(double)nBarWidthZ
@@ -1407,23 +1398,23 @@ namespace binfilter {
/*N*/ }
/*N*/ a3DPos.X() = nX;
/*N*/ }//end for nRow
-/*N*/
+/*N*/
/*N*/ delete[] fOldData;
/*N*/ delete[] pDescription;
/*N*/ break;
/*N*/ } // end case Area's
-/*N*/
+/*N*/
/*N*/ default:
/*N*/ {
/*N*/ DataDescription* pDescription = NULL;
-/*N*/
+/*N*/
/*N*/ if (bSwitchColRow) a3DPos.Y() += nGapY;
/*N*/ else a3DPos.X() += nGapX;
-/*N*/
+/*N*/
/*N*/ // #100288# same structure as all other charts (no stacked and special groups)
/*N*/ // create groups for all series
/*N*/ E3dScene ** pDataGroup = new E3dScene * [ nRowCnt ];
-/*N*/
+/*N*/
/*N*/ // create 3d sub-scenes for each data series. Insertion into the
/*N*/ // main scene is done at the end of the for loop (#109628#)
/*N*/ for( nRow = 0; nRow < nRowCnt; nRow++ )
@@ -1431,19 +1422,19 @@ namespace binfilter {
/*N*/ pDataGroup[ nRow ] = Create3DScene( CHOBJID_DIAGRAM_ROWGROUP );
/*N*/ pDataGroup[ nRow ]->InsertUserData( new SchDataRow( static_cast< short >( nRow ) ));
/*N*/ }
-/*N*/
+/*N*/
/*N*/ for (nCol = 0; nCol < nColCnt; nCol++)
/*N*/ {
/*N*/ double fDataTop = fOriginY;
/*N*/ double fDataBottom = fOriginY;
-/*N*/
+/*N*/
/*N*/ //Vor-Berechnung des Maximalen/Minimalen Zeichenpunktes
/*N*/ double fPreBottom=fOriginY;
/*N*/ double fPreTop =fOriginY;
/*N*/ double fPreTopPos,fPreBottomPos,fPreOriPos;
/*N*/ double fTop,fBottom,fMin,fMax,fMin2,fMax2;
/*N*/ fMin2=fMax2=fOriginY;
-/*N*/
+/*N*/
/*N*/ for (nRow = 0; nRow < nRowCnt; nRow++)
/*N*/ {
/*N*/ double fData=GetData(nCol, nRow, bPercent);
@@ -1485,7 +1476,7 @@ namespace binfilter {
/*N*/ else
/*N*/ fMax2+=fData; //right,bottom
/*N*/ }
-/*N*/
+/*N*/
/*N*/ double fR = (double)( IsBar()? nW: nH );
/*N*/ fPreTopPos = pChartYAxis->CalcFact( fMin2 ) * fR;
/*N*/ if( fR < fPreTopPos )
@@ -1494,15 +1485,15 @@ namespace binfilter {
/*N*/ if( fPreBottomPos < 0.0 )
/*N*/ fPreBottomPos = 0.0;
/*N*/ fPreOriPos = pChartYAxis->CalcFactOrigin() * fR;
-/*N*/
+/*N*/
/*N*/ for (nRow = 0; nRow < nRowCnt; nRow++)
/*N*/ {
/*N*/ double fData = GetData(nCol, nRow, bPercent);
/*N*/ SfxItemSet aDataPointAttr(GetFullDataPointAttr(nCol, nRow));
-/*N*/
+/*N*/
/*N*/ SvxChartDataDescr eDescr = ((const SvxChartDataDescrItem&)aDataPointAttr.
/*N*/ Get(SCHATTR_DATADESCR_DESCR)).GetValue();
-/*N*/
+/*N*/
/*N*/ if( (eDescr != CHDESCR_NONE) && bShowDataDescr)
/*N*/ {
/******************************************************
@@ -1513,12 +1504,12 @@ namespace binfilter {
/*?*/ // DataDescription noch nicht vorhanden -> erzeugen
/*?*/ DBG_BF_ASSERT(0, "STRIP"); //STRIP001 pDescription = new DataDescription [nRowCnt];
/*?*/ }
-/*?*/
+/*?*/
/*?*/ pDescription [nRow].eDescr = eDescr;
/*?*/ pDescription [nRow].bSymbol = ((const SfxBoolItem&)aDataPointAttr.
/*N*/ Get(SCHATTR_DATADESCR_SHOW_SYM)).GetValue();
/*N*/ }
-/*N*/
+/*N*/
/*N*/ switch (eChartStyle)
/*N*/ {
/*N*/ case CHSTYLE_3D_FLATCOLUMN:
@@ -1526,7 +1517,7 @@ namespace binfilter {
/*N*/ {
/*N*/ double fLclTop;
/*N*/ double fLclBottom;
-/*N*/
+/*N*/
/*N*/ if (fData < fOriginY)
/*N*/ {
/*?*/ fLclTop = fOriginY;
@@ -1537,25 +1528,25 @@ namespace binfilter {
/*N*/ fLclTop = fData;
/*N*/ fLclBottom = fOriginY;
/*N*/ }
-/*N*/
+/*N*/
/*N*/ long nBottom = Max ((long) (pChartYAxis->CalcFact(fLclBottom) * nH),0L);
/*N*/ long nTop = Min ((long) (pChartYAxis->CalcFact(fLclTop) * nH),nH);
-/*N*/
+/*N*/
/*N*/ {
/*N*/ long nBarHeight = nTop - nBottom + 1;
/*N*/ a3DPos.Y() = nBottom;
-/*N*/
+/*N*/
/*N*/ if (nTop > nBottom)
/*N*/ pDataGroup[ nRow ]->Insert3DObj(Create3DBar(a3DPos, Vector3D(nBarWidthX, nBarHeight, nBarWidthZ), nCol, nRow,
/*N*/ aDataPointAttr,TRUE,0,fPreOriPos,0));
-/*N*/
+/*N*/
/*N*/ if (pDescription)
/*N*/ {
/*?*/ pDescription [nRow].aTextPos3D = a3DPos;
/*?*/ pDescription [nRow].aTextPos3D.X() += nBarWidthX / 2;
/*?*/ pDescription [nRow].aTextPos3D.Y() += (fData<0)? 0: nBarHeight;
/*?*/ pDescription [nRow].aTextPos3D.Z() += nBarWidthZ;
-/*?*/
+/*?*/
/*?*/ if ((pDescription [nRow].eDescr == CHDESCR_PERCENT) ||
/*?*/ (pDescription [nRow].eDescr == CHDESCR_TEXTANDPERCENT))
/*?*/ {
@@ -1565,7 +1556,7 @@ namespace binfilter {
/*?*/ {
/*?*/ pDescription [nRow].fValue = GetData(nCol,nRow,FALSE);//#55586# fData;
/*?*/ }
-/*?*/
+/*?*/
/*?*/ pDescription [nRow].eAdjust = CHADJUST_CENTER_CENTER;
/*N*/ }
/*N*/ }
@@ -1574,16 +1565,16 @@ namespace binfilter {
/*N*/ {
/*?*/ pDescription [nRow].fValue = DBL_MIN;
/*N*/ }
-/*N*/
+/*N*/
/*N*/ a3DPos.X() += nBarWidthX;
/*N*/ break;
-/*N*/
+/*N*/
/*N*/ case CHSTYLE_3D_FLATBAR:
/*N*/ if (fData != DBL_MIN)
/*N*/ {
/*N*/ double fRight;
/*N*/ double fLeft;
-/*N*/
+/*N*/
/*N*/ if (fData < fOriginY)
/*N*/ {
/*?*/ fRight = fOriginY;
@@ -1594,25 +1585,25 @@ namespace binfilter {
/*N*/ fLeft = fOriginY;
/*N*/ fRight = fData;
/*N*/ }
-/*N*/
+/*N*/
/*N*/ long nLeft = Max ((long) (pChartYAxis->CalcFact(fLeft) * nW),0L);
/*N*/ long nRight = Min ((long)(pChartYAxis->CalcFact(fRight) * nW),nW);
-/*N*/
+/*N*/
/*N*/ {
/*N*/ long nBarWidth = nRight - nLeft + 1;
/*N*/ a3DPos.X() = nLeft;
-/*N*/
+/*N*/
/*N*/ if (nRight > nLeft)
/*N*/ pDataGroup[ nRow ]->Insert3DObj(Create3DBar(a3DPos, Vector3D(nBarWidth, nBarWidthX, nBarWidthZ), nCol, nRow,
/*N*/ aDataPointAttr,TRUE,0,fPreOriPos,0));
-/*N*/
+/*N*/
/*N*/ if (pDescription)
/*N*/ {
/*?*/ pDescription [nRow].aTextPos3D = a3DPos;
/*?*/ pDescription [nRow].aTextPos3D.X() += (fData<0)? 0: nBarWidth;
/*?*/ pDescription [nRow].aTextPos3D.Y() += nBarWidthX / 2;
/*?*/ pDescription [nRow].aTextPos3D.Z() += nBarWidthZ;
-/*?*/
+/*?*/
/*?*/ if ((pDescription [nRow].eDescr == CHDESCR_PERCENT) ||
/*?*/ (pDescription [nRow].eDescr == CHDESCR_TEXTANDPERCENT))
/*?*/ {
@@ -1622,7 +1613,7 @@ namespace binfilter {
/*?*/ {
/*?*/ pDescription [nRow].fValue = GetData(nCol,nRow,FALSE);//#55586# fData;
/*?*/ }
-/*?*/
+/*?*/
/*?*/ pDescription [nRow].eAdjust = CHADJUST_CENTER_CENTER;
/*N*/ }
/*N*/ }
@@ -1631,17 +1622,17 @@ namespace binfilter {
/*N*/ {
/*?*/ pDescription [nRow].fValue = DBL_MIN;
/*N*/ }
-/*N*/
+/*N*/
/*N*/ a3DPos.Y() += nBarWidthX;
/*N*/ break;
-/*N*/
+/*N*/
/*N*/ case CHSTYLE_3D_STACKEDFLATCOLUMN:
/*N*/ case CHSTYLE_3D_PERCENTFLATCOLUMN:
/*N*/ if (fData != DBL_MIN)
/*N*/ {
/*?*/ double fLclTop;
/*?*/ double fLclBottom;
-/*?*/
+/*?*/
/*?*/ if (fData < fOriginY)
/*?*/ {
/*?*/ fLclTop = fDataBottom;
@@ -1656,25 +1647,25 @@ namespace binfilter {
/*N*/ else fDataTop += fData;
/*N*/ fLclTop = fDataTop;
/*N*/ }
-/*N*/
+/*N*/
/*N*/ long nTop = Min((long)(pChartYAxis->CalcFact(fLclTop) * nH), nH);
/*N*/ long nBottom = Max((long)(pChartYAxis->CalcFact(fLclBottom) * nH),0L);
-/*N*/
+/*N*/
/*N*/ {
/*N*/ long nBarHeight = nTop - nBottom + 1;
/*N*/ a3DPos.Y() = nBottom;
-/*N*/
+/*N*/
/*N*/ if (nTop > nBottom)
/*N*/ pDataGroup[ nRow ]->Insert3DObj(Create3DBar(a3DPos, Vector3D(nColWidthX, nBarHeight, nBarWidthZ), nCol, nRow,
/*N*/ aDataPointAttr,TRUE,fPreBottomPos,fPreOriPos,fPreTopPos));
-/*N*/
+/*N*/
/*N*/ if (pDescription)
/*?*/ {
/*?*/ pDescription [nRow].aTextPos3D = a3DPos;
/*?*/ pDescription [nRow].aTextPos3D.X() += nColWidthX / 2;
/*?*/ pDescription [nRow].aTextPos3D.Y() += nBarHeight / 2;
/*?*/ pDescription [nRow].aTextPos3D.Z() += nBarWidthZ;
-/*?*/
+/*?*/
/*?*/ if ((pDescription [nRow].eDescr == CHDESCR_PERCENT) ||
/*?*/ (pDescription [nRow].eDescr == CHDESCR_TEXTANDPERCENT))
/*?*/ {
@@ -1684,7 +1675,7 @@ namespace binfilter {
/*?*/ {
/*?*/ pDescription [nRow].fValue = GetData(nCol,nRow,FALSE);//#55586# fData;
/*?*/ }
-/*?*/
+/*?*/
/*?*/ pDescription [nRow].eAdjust = CHADJUST_CENTER_CENTER;
/*N*/ }
/*N*/ }
@@ -1694,14 +1685,14 @@ namespace binfilter {
/*?*/ pDescription [nRow].fValue = DBL_MIN;
/*N*/ }
/*N*/ break;
-/*N*/
+/*N*/
/*N*/ case CHSTYLE_3D_STACKEDFLATBAR:
/*N*/ case CHSTYLE_3D_PERCENTFLATBAR:
/*N*/ if (fData != DBL_MIN)
/*N*/ {
/*N*/ double fRight;
/*N*/ double fLeft;
-/*N*/
+/*N*/
/*N*/ if (fData < fOriginY)
/*N*/ {
/*?*/ fRight = fDataBottom;
@@ -1716,25 +1707,25 @@ namespace binfilter {
/*N*/ else fDataTop += fData;
/*N*/ fRight = fDataTop;
/*N*/ }
-/*N*/
+/*N*/
/*N*/ long nRight = Min((long)(pChartYAxis->CalcFact(fRight) * nW), nW);
/*N*/ long nLeft = Max((long) (pChartYAxis->CalcFact(fLeft ) * nW), 0L);
-/*N*/
+/*N*/
/*N*/ {
/*N*/ long nBarWidth = nRight - nLeft + 1;
/*N*/ a3DPos.X() = nLeft;
-/*N*/
+/*N*/
/*N*/ if (nRight > nLeft)
/*N*/ pDataGroup[ nRow ]->Insert3DObj(Create3DBar(a3DPos, Vector3D(nBarWidth, nColWidthX, nBarWidthZ), nCol, nRow,
/*N*/ aDataPointAttr,TRUE,fPreBottomPos,fPreOriPos,fPreTopPos));
-/*N*/
+/*N*/
/*N*/ if (pDescription)
/*N*/ {
/*?*/ pDescription [nRow].aTextPos3D = a3DPos;
/*?*/ pDescription [nRow].aTextPos3D.X() += nBarWidth / 2;
/*?*/ pDescription [nRow].aTextPos3D.Y() += nColWidthX / 2;
/*?*/ pDescription [nRow].aTextPos3D.Z() += nBarWidthZ;
-/*?*/
+/*?*/
/*?*/ if ((pDescription [nRow].eDescr == CHDESCR_PERCENT) ||
/*?*/ (pDescription [nRow].eDescr == CHDESCR_TEXTANDPERCENT))
/*?*/ {
@@ -1744,7 +1735,7 @@ namespace binfilter {
/*?*/ {
/*?*/ pDescription [nRow].fValue = GetData(nCol,nRow,FALSE);//#55586# fData;
/*?*/ }
-/*?*/
+/*?*/
/*?*/ pDescription [nRow].eAdjust = CHADJUST_CENTER_CENTER;
/*N*/ }
/*N*/ }
@@ -1757,11 +1748,7 @@ namespace binfilter {
default: break;
/*N*/ }
/*N*/ }
-/*N*/
-/*N*/ //Dirty3D (nRowCnt, nCol, TRUE, pDescription, (eDataDescr != CHDESCR_NONE)&& bShowDataDescr
-/*N*/ // ? pScene
-/*N*/ // : NULL);
-/*N*/
+/*N*/
/*N*/ // BM: moved here from Dirty3D.
/*N*/ if( pDescription )
/*N*/ {
@@ -1773,7 +1760,7 @@ namespace binfilter {
/*?*/ }
/*N*/ }
/*N*/ }
-/*N*/
+/*N*/
/*N*/ if (bSwitchColRow)
/*N*/ {
/*N*/ a3DPos.Y() += nBarWidthX ? nGapY * 2 : nPartWidth;
@@ -1785,7 +1772,7 @@ namespace binfilter {
/*N*/ a3DPos.Y() = 0;
/*N*/ }
/*N*/ }
-/*N*/
+/*N*/
/*N*/ // insert the data series sub-scenes if they contain any data points
/*N*/ // (inserting empty scenes may corrupt the camera parameters of the
/*N*/ // main scene. See #109628#)
@@ -1795,14 +1782,14 @@ namespace binfilter {
/*?*/ if( pDataGroup[ nRow ]->GetSubList()->GetObjCount() > 0 )
/*?*/ pScene->Insert3DObj( pDataGroup[ nRow ] );
/*N*/ }
-/*N*/
+/*N*/
/*N*/ delete[] pDescription;
/*N*/ delete[] pDataGroup;
-/*N*/
+/*N*/
/*N*/ break;
/*N*/ }
/*N*/ }
-/*N*/
+/*N*/
/*N*/ return (SdrObjGroup*) pScene;
/*N*/ }
@@ -1815,44 +1802,44 @@ namespace binfilter {
/*N*/ SdrObjGroup* ChartModel::Create3DNewPieChart(Rectangle &rRect)
/*N*/ {
/*N*/ SdrObjList *pList=NULL;
-/*N*/
+/*N*/
/*N*/ pChartYAxis->SetPercentMode( FALSE ); // percent is calculated using the row rather than the column
-/*N*/
+/*N*/
/*N*/ pScene = CreateScene (rRect, *aLightVec, fSpotIntensity, aSpotColor,
/*N*/ fAmbientIntensity, aAmbientColor);
/*N*/ const long nSize=FIXED_SIZE_FOR_3D_CHART_VOLUME;
-/*N*/
+/*N*/
/*N*/ long nW = nSize;
/*N*/ long nH = nSize;
/*N*/ long nZ = nSize;//(nSize * 4) / 6;
-/*N*/
+/*N*/
/*N*/ //erweiterung auf Donuts emöglichen!
/*N*/ long nColCnt = GetColCount();
/*N*/ const short nRowCnt=1;// long nRowCnt = GetRowCount();
/*N*/ const short nRow=0;
/*N*/ short nCol;//, nRow;
-/*N*/
+/*N*/
/*N*/ long nZExtrude=nZ/3;
-/*N*/
+/*N*/
/*N*/ Camera3D aCam(pScene->GetCamera());
/*N*/ const long nDepth=-nZ;
-/*N*/
+/*N*/
/*N*/ Vector3D aCamPos(0,0,nW/2);
/*N*/ Vector3D aLookAt(0,0,nDepth/2);
/*N*/ aCam.SetViewWindow(-nW/2, -nH/2, nW, nH);
/*N*/ aCam.SetDefaults(aCamPos, aLookAt, 80, DEG2RAD(-(double)nZAngle / 10.0));
/*N*/ aCam.Reset();
/*N*/ aCam.SetProjection(eProjection);
-/*N*/
+/*N*/
/*N*/ aCam.SetAspectMapping(AS_HOLD_SIZE);
/*N*/ pScene->SetCamera(aCam);
/*N*/ pScene->SetTransform(aSceneMatrix);
-/*N*/
+/*N*/
/*N*/ // Pie charts may not have titles of axes.
/*N*/ bShowXAxisTitle = FALSE;
/*N*/ bShowYAxisTitle = FALSE;
/*N*/ bShowZAxisTitle = FALSE;
-/*N*/
+/*N*/
/*N*/ // Max. bestimmen
/*N*/ double fTotal=0.0;
/*N*/ long nSegments=0;
@@ -1867,22 +1854,22 @@ namespace binfilter {
/*N*/ }
/*N*/ if(!nSegments || fTotal == 0.0)
/*N*/ return (SdrObjGroup*) pScene;
-/*N*/
+/*N*/
/*N*/ Rectangle aPieRect;
/*N*/ aPieRect=Rectangle(Point(-nW/2,-nH/2),Size(nW,nH)); // rect in which the pie is drawn
-/*N*/
+/*N*/
/*N*/ const long nMaxAngle=36000;
/*N*/ long nPos=0;
/*N*/ E3dDefaultAttributes aDefltAttr3D;
-/*N*/
+/*N*/
/*N*/ long nEndAngle=0;
/*N*/ long nStartAngle=0;
-/*N*/
+/*N*/
/*N*/ ChartDataDescription aDescr(nColCnt,nRowCnt,pList,this,bShowDataDescr);
-/*N*/
+/*N*/
/*N*/ Point aCenter = aPieRect.Center();
/*N*/ Size aPieRectSize = aPieRect.GetSize();
-/*N*/
+/*N*/
/*N*/ for (nCol = 0; nCol < nColCnt; nCol++)
/*N*/ {
/*N*/ double fValue = fabs(GetData( nCol,nRow));
@@ -1892,16 +1879,16 @@ namespace binfilter {
/*N*/ SfxItemSet aDataPointAttr(GetFullDataPointAttr(nCol,nRow));
/*N*/ nStartAngle=nEndAngle;
/*N*/ nEndAngle+=(long)((fValue/fTotal)*nMaxAngle);
-/*N*/
+/*N*/
/*N*/ // for last segment use exact value to avoid accumulated errors
/*N*/ if( nPos == nSegments )
/*N*/ nEndAngle = 36000;
-/*N*/
+/*N*/
/*N*/ if(nEndAngle>nMaxAngle)
/*N*/ nEndAngle-=nMaxAngle;
-/*N*/
+/*N*/
/*N*/ XPolyPolygon aPolyPolygon;
-/*N*/
+/*N*/
/*N*/ // if the angle of the sector is too small the conversion method produces an error
/*N*/ // especially as angles are rounded to integers / 10
/*N*/ if( nEndAngle - nStartAngle < 10 ) // approximate as triangle
@@ -1911,12 +1898,12 @@ namespace binfilter {
/*?*/ fAngleEnd = (double)(nEndAngle) * F_PI / 18000.0,
/*?*/ fRadiusX = (double)(aPieRectSize.Width()) / 2.0,
/*?*/ fRadiusY = (double)(aPieRectSize.Height()) / 2.0;
-/*?*/
+/*?*/
/*?*/ aPoly[ 0 ] = aCenter;
/*?*/ aPoly[ 1 ] = Point( (long)(aCenter.X() + fRadiusX * cos( fAngleStart )), (long)(aCenter.Y() - fRadiusY * sin( fAngleStart )) );
/*?*/ aPoly[ 2 ] = Point( (long)(aCenter.X() + fRadiusX * cos( fAngleEnd )), (long)(aCenter.Y() - fRadiusY * sin( fAngleEnd )) );
/*?*/ aPoly[ 3 ] = aCenter;
-/*?*/
+/*?*/
/*?*/ aPolyPolygon.Insert( aPoly );
/*N*/ }
/*N*/ else // create a polygon
@@ -1924,11 +1911,11 @@ namespace binfilter {
/*N*/ SdrCircObj aSegment( OBJ_SECT, aPieRect, nStartAngle, nEndAngle);
/*N*/ GetPage(0)->NbcInsertObject( &aSegment, 0 );
/*N*/ SdrPathObj* pTmp = (SdrPathObj*)aSegment.ConvertToPolyObj( FALSE, FALSE );
-/*N*/
+/*N*/
/*N*/ // Add two extra points near the end of the arc so that
/*N*/ // the lighting of the 3d object is smoothed
/*N*/ XPolygon aPoly( pTmp->GetPathPoly().GetObject(0) );
-/*N*/
+/*N*/
/*N*/ long nEnd = aPoly.GetPointCount();
/*N*/ if( nEnd > 3 )
/*N*/ {
@@ -1942,37 +1929,35 @@ namespace binfilter {
/*N*/ aPoly.Insert( 2, aP1, XPOLY_NORMAL );
/*N*/ }
/*N*/ aPolyPolygon.Insert( aPoly );
-/*N*/
+/*N*/
/*N*/ GetPage( 0 )->RemoveObject( 0 );
/*N*/ }
-/*N*/
+/*N*/
/*N*/ SchE3dExtrudeObj* pObj=new SchE3dExtrudeObj(aDefltAttr3D,
/*N*/ aPolyPolygon,nZExtrude);
-/*N*/
+/*N*/
/*N*/ DBG_ASSERT( pObj, "couldn't create extrude object" );
-/*N*/
+/*N*/
/*N*/ // default attributes reset the texture projection items so set them explicitly
/*N*/ // use object specific projection in y direction
-/*N*/ //-/ pObj->SetUseStdTextureY( FALSE );
/*N*/ pObj->SetItem( Svx3DTextureProjectionYItem( 0 ));
/*N*/ pObj->SetItem( Svx3DDoubleSidedItem( TRUE ));
-/*N*/
+/*N*/
/*N*/ pScene->Insert3DObj(pObj);
/*N*/ pObj->InsertUserData(new SchDataPoint(nCol, nRow));
/*N*/ pObj->InsertUserData (new SchObjectId (CHOBJID_DIAGRAM_DATA));
/*N*/ pObj->SetMoveProtect(TRUE);
/*N*/ pObj->SetResizeProtect(TRUE);
/*N*/ pObj->SetModel(this);
-/*N*/
-/*N*/ //-/ pObj->NbcSetAttributes(aDataPointAttr,FALSE);
+/*N*/
/*N*/ pObj->SetItemSet(aDataPointAttr);
-/*N*/
-/*N*/
+/*N*/
+/*N*/
/*N*/ Matrix4D aMatrix;
/*N*/ aMatrix.TranslateZ(-nZExtrude/2);
/*N*/ pObj->NbcSetTransform(aMatrix);
-/*N*/
-/*N*/
+/*N*/
+/*N*/
/*N*/ if(aDescr.Enabled())
/*N*/ {
/*N*/ DataDescription* pDescr=aDescr.Insert(nCol,nRow,aDataPointAttr,Point(0,0),FALSE,CHADJUST_BOTTOM_CENTER,pChartYAxis);
@@ -1982,7 +1967,7 @@ namespace binfilter {
/*N*/ }
/*N*/ }
/*N*/ aDescr.Build3D(pScene);
-/*N*/
+/*N*/
/*N*/ return (SdrObjGroup*) pScene;
/*N*/ }
@@ -1996,18 +1981,18 @@ namespace binfilter {
/*N*/ {
/*N*/ SdrPage *pPage = GetPage (0);
/*N*/ Size aPageSize = pPage->GetSize();
-/*N*/
+/*N*/
/*N*/ if (bShowXAxisTitle)
/*N*/ {
/*N*/ SdrObject *pXAxisTitleObj = GetObjWithId(CHOBJID_DIAGRAM_TITLE_X_AXIS, *pPage);
/*N*/ if (pXAxisTitleObj != NULL)
/*N*/ {
/*N*/ Rectangle aXAxisOutRect = pXAxisTitleObj->GetBoundRect();
-/*N*/
+/*N*/
/*N*/ Point aXAxesTitlePosition (rSceneRect.Left () + (int) (rSceneRect.GetWidth () / 2),
/*N*/ Min ((long) aChartRect.Bottom(),
/*N*/ (long) (rSceneRect.Bottom () + aXAxisOutRect.GetHeight()) ));
-/*N*/
+/*N*/
/*N*/ if (GetXAxisTitleHasBeenMoved() && GetUseRelativePositions() &&
/*N*/ (aXAxesTitlePosition.X() > 0) && (aXAxesTitlePosition.Y() > 0))
/*N*/ {
@@ -2029,17 +2014,17 @@ namespace binfilter {
/*N*/ SetTextPos((SdrTextObj &) *pXAxisTitleObj, aXAxesTitlePosition,pXAxisTitleAttr);
/*N*/ }
/*N*/ }
-/*N*/
+/*N*/
/*N*/ if (bShowYAxisTitle)
/*N*/ {
/*N*/ SdrObject *pYAxisTitleObj = GetObjWithId(CHOBJID_DIAGRAM_TITLE_Y_AXIS, *pPage);
/*N*/ if (pYAxisTitleObj != NULL)
/*N*/ {
/*N*/ Rectangle aYAxisOutRect = pYAxisTitleObj->GetBoundRect();
-/*N*/
+/*N*/
/*N*/ Point aYAxesTitlePosition (Max (1l, (long) (rSceneRect.Left () - 2 * aYAxisOutRect.GetWidth ())),
/*N*/ Max (1l, (long) (rSceneRect.Top () + rSceneRect.GetHeight () / 2)));
-/*N*/
+/*N*/
/*N*/ if (GetYAxisTitleHasBeenMoved() && GetUseRelativePositions() &&
/*N*/ (aYAxesTitlePosition.X() >= 0) && (aYAxesTitlePosition.Y() > 0))
/*N*/ {
@@ -2061,22 +2046,22 @@ namespace binfilter {
/*N*/ }
/*N*/ SetTextPos((SdrTextObj &) *pYAxisTitleObj, aYAxesTitlePosition,pYAxisTitleAttr);
/*N*/ }
-/*N*/
+/*N*/
/*N*/ }
-/*N*/
+/*N*/
/*N*/ if (bShowZAxisTitle)
/*N*/ {
/*N*/ SdrObject *pZAxisTitleObj = GetObjWithId(CHOBJID_DIAGRAM_TITLE_Z_AXIS, *pPage);
/*N*/ if (pZAxisTitleObj != NULL)
/*N*/ {
/*N*/ Rectangle aZAxisOutRect = pZAxisTitleObj->GetBoundRect();
-/*N*/
-/*N*/
+/*N*/
+/*N*/
/*N*/ Point aZAxesTitlePosition( (long)(0.95 * rSceneRect.Right()),
/*N*/ (long)Min ((long) aChartRect.Bottom(),
/*N*/ (long) (rSceneRect.Bottom () - aZAxisOutRect.GetHeight())));
-/*N*/
-/*N*/
+/*N*/
+/*N*/
/*N*/ if (GetZAxisTitleHasBeenMoved() && GetUseRelativePositions() &&
/*N*/ (aZAxesTitlePosition.X() > 0) && (aZAxesTitlePosition.Y() > 0))
/*N*/ {
@@ -2093,14 +2078,12 @@ namespace binfilter {
/*N*/ }
/*N*/ SetTextPos((SdrTextObj &) *pZAxisTitleObj, aZAxesTitlePosition,pZAxisTitleAttr);
/*N*/ }
-/*N*/
+/*N*/
/*N*/ }
-/*N*/
+/*N*/
/*N*/ aInitialSizefor3d = aInitialSize;
/*N*/ }
-
-
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_sch/source/core/sch_chtscene.cxx b/binfilter/bf_sch/source/core/sch_chtscene.cxx
index 7d06884..21a8d1f 100644
--- a/binfilter/bf_sch/source/core/sch_chtscene.cxx
+++ b/binfilter/bf_sch/source/core/sch_chtscene.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -80,7 +80,7 @@ namespace binfilter {
/*N*/ {
/*N*/ // untransformiertes BoundVolume holen und parent rufen
/*N*/ Volume3D aNewVol = E3dScene::FitInSnapRect();
-/*N*/
+/*N*/
/*N*/ // Groesse etwas anpassen, umPlatz am Rand des Charts fu schaffen
/*N*/ aNewVol.MinVec () = Vector3D (
/*N*/ aNewVol.MinVec ().X () * 1.2,
@@ -90,9 +90,7 @@ namespace binfilter {
/*N*/ aNewVol.MaxVec ().X () * 1.2,
/*N*/ aNewVol.MaxVec ().Y () * 1.2,
/*N*/ aNewVol.MaxVec ().Z ());
-/*N*/
-/*N*/ //pDoc->Position3DAxisTitles(GetLogicRect());
-/*N*/
+/*N*/
/*N*/ SetRectsDirty(FALSE);
/*N*/ return aNewVol;
/*N*/ }
@@ -118,12 +116,10 @@ namespace binfilter {
/*N*/ {
/*N*/ // FileFormat 5.0
/*N*/ // Die SubList der ChartScene wird nun nicht mehr geschrieben
-/*N*/
-/*N*/ //pSub->GetPage()->SetObjectsNotPersistent(TRUE);
-/*N*/
+/*N*/
/*N*/ // Scene schreiben
/*N*/ E3dPolyScene::WriteData(rOut);
-/*N*/
+/*N*/
/*N*/ //pSub->GetPage()->SetObjectsNotPersistent(FALSE);
/*N*/ }
/*N*/ else
@@ -151,9 +147,10 @@ namespace binfilter {
/*N*/ long nAxisId)
/*N*/ {
/*N*/ Rectangle aOldRect;
-/*N*/
-/*N*/ for (E3dLabelObj *pLabel = rList.First (); pLabel; pLabel = rList.Next ())
-/*N*/ {
+/*N*/
+ for ( size_t i = 0, n = rList.size(); i < n; ++i )
+ {
+ E3dLabelObj *pLabel = rList[ i ];
/*N*/ Insert3DObj(pLabel);
/*N*/ pLabel->InsertUserData (new SchAxisId (nAxisId));
/*N*/ }
@@ -163,27 +160,27 @@ namespace binfilter {
/*N*/ const SdrObject* pObj = p3DObj->Get2DLabelObj();
/*N*/ // View- Abmessungen des Labels holen
/*N*/ Rectangle aRect = pObj->GetLogicRect();
-/*N*/
+/*N*/
/*N*/ // Position des Objektes in Weltkoordinaten ermitteln
/*N*/ Vector3D aObjPos = p3DObj->GetFullTransform() * p3DObj->GetPosition();
/*N*/ aObjPos = rCamSet.WorldToViewCoor(aObjPos);
/*N*/ Point aPoint((long)(aObjPos.X() + 0.5), (long)(aObjPos.Y() + 0.5));
-/*N*/
+/*N*/
/*N*/ // Relative Position des Labels in View-Koordinaten
/*N*/ Point aRelPosOne = pObj->GetRelativePos();
/*N*/ aRelPosOne += aPoint;
-/*N*/
+/*N*/
/*N*/ aRect.SetPos(aRelPosOne);
/*N*/ return aRect;
/*N*/ }
/*N*/ void ChartScene::ReduceDescrList(DescrList & aList)
/*N*/ {
-/*N*/
+/*N*/
/*N*/ Rectangle aIntersect(0,0,0,0);
/*N*/ Rectangle aPrevRect(0,0,0,0);
/*N*/ Rectangle aNextRect(0,0,0,0);
-/*N*/
+/*N*/
/*N*/ //Transformation berechnen, die später im Paint ausgeführt wird,
/*N*/ //(Derzeit sind die Labelobject-Positionen unbekannt)
/*N*/ Rectangle aBound(GetSnapRect());
@@ -194,21 +191,21 @@ namespace binfilter {
/*N*/ rSet.SetFrontClippingPlane(aVolume.MinVec().Z());
/*N*/ rSet.SetBackClippingPlane(aVolume.MaxVec().Z());
/*N*/ rSet.SetViewportRectangle(aBound);
-/*N*/
-/*N*/
-/*N*/ E3dLabelObj *p3DObj=aList.First();
+/*N*/
+ size_t i = 0;
+/*N*/ E3dLabelObj *p3DObj = aList.empty() ? NULL : aList[ 0 ];
/*N*/ E3dLabelObj *pOld3DObj=p3DObj;
/*N*/ BOOL bGetCurrent=FALSE;
-/*N*/
+/*N*/
/*N*/ if(p3DObj)
/*N*/ {
/*N*/ const SdrTextObj* pObj = (const SdrTextObj*)p3DObj->Get2DLabelObj();
-/*N*/
+/*N*/
/*N*/ //Es reicht, die Rotation des ersten Elements zu ermitteln,
/*N*/ //alle in der Liste sind gleichermaßen gedreht
/*N*/ //GetRotateAngle() gibt 100tel, gebraucht werden 10tel Grad.
/*N*/ long nAngle = pObj->GetRotateAngle()/10;
-/*N*/
+/*N*/
/*N*/ aPrevRect=Get3DDescrRect(p3DObj,rSet);
/*N*/ if(nAngle!=0)
/*N*/ {
@@ -220,21 +217,22 @@ namespace binfilter {
/*?*/ aPoly.Rotate(Point(0,0),(USHORT)(3600 - nAngle));
/*?*/ aPrevRect=aPoly.GetBoundRect();
/*N*/ }
-/*N*/
+/*N*/
/*N*/ while(p3DObj)
/*N*/ {
/*N*/ //nächstes Objekt holen, abhängig davon, ob das zuletzt behandelte
/*N*/ //entfernt wurde oder nicht (bGetCurrent)
/*N*/ if(bGetCurrent)
/*N*/ {
-/*?*/ p3DObj=aList.GetCurObject();
+/*?*/ p3DObj = aList[ i ];
/*N*/ }
/*N*/ else
/*N*/ {
-/*N*/ p3DObj=aList.Next();
+ ++i;
+ p3DObj = ( i < aList.size() ) ? aList[ i ] : NULL;
/*N*/ }
/*N*/ bGetCurrent=FALSE;
-/*N*/
+/*N*/
/*N*/ //Da insbesondere bei Remove() des letzten Objects sowohl Next()
/*N*/ //als auch GetCurObject() den alten Pointer zurückgeben,
/*N*/ //wird getestet, ob tatsächlich verschiedene Objekte vorliegen
@@ -242,9 +240,9 @@ namespace binfilter {
/*N*/ if(p3DObj && p3DObj!=pOld3DObj)
/*N*/ {
/*N*/ pOld3DObj=p3DObj;
-/*N*/
+/*N*/
/*N*/ aNextRect=Get3DDescrRect(p3DObj,rSet);
-/*N*/
+/*N*/
/*N*/ if(nAngle!=0)
/*N*/ {
/*?*/ //Um TopLeft drehen (wie oben):
@@ -254,7 +252,7 @@ namespace binfilter {
/*?*/ aPoly.Rotate(Point(0,0),(USHORT)(3600 - nAngle));
/*?*/ aNextRect=aPoly.GetBoundRect();
/*N*/ }
-/*N*/
+/*N*/
/*N*/ aIntersect=aNextRect.GetIntersection(aPrevRect);
/*N*/ if( ! (aIntersect.IsEmpty())
/*N*/ && ( (aIntersect.GetHeight()>aNextRect.GetHeight()/100)
@@ -267,16 +265,6 @@ namespace binfilter {
/*N*/ {
/*N*/ //aus der Page streichen
/*N*/ pParent->Remove3DObj(p3DObj);
-/*N*/
-/*N*/
-/*N*/ //Die Objekte koennen ruhig in der Liste verbleiben, löschen führt
-/*N*/ //nur zu Problemen
-/*N*/
-/*N*/ //Da das Object entfernt wurde, darf nicht Next gerufen werden.
-/*N*/ //bGetCurrent=TRUE;
-/*N*/ //und aus der Liste streichen
-/*N*/ //aList.Remove();
-/*N*/ //delete p3DObj; (íst offenbar bei Remove() schon geschehen ???)
/*N*/ }
/*N*/ else
/*N*/ {
@@ -290,7 +278,7 @@ namespace binfilter {
/*N*/ }
/*N*/ }
/*N*/ }
-/*N*/
+/*N*/
/*N*/ }
/*N*/ void ChartScene::Initialize()
@@ -298,16 +286,16 @@ namespace binfilter {
/*N*/ // #66930# BM activate second light source and deactivate first one
/*N*/ // reason: the first light source is in contrast to the other seven
/*N*/ // lightsources specular by default
-/*N*/
+/*N*/
/*N*/ // Note: Use items at the scene instead of methods at the subobjects
/*N*/ // otherwise settings get overwritten later
-/*N*/
+/*N*/
/*N*/ // copy lightsource 1 (Base3DLight0) to lightsource 2
/*N*/ // color
/*N*/ SetItem( Svx3DLightcolor2Item( GetLightGroup().GetIntensity( Base3DMaterialDiffuse, Base3DLight0 )));
/*N*/ // direction
/*N*/ SetItem( Svx3DLightDirection2Item( GetLightGroup().GetDirection( Base3DLight0 )));
-/*N*/
+/*N*/
/*N*/ // enable light source 2
/*N*/ SetItem( Svx3DLightOnOff2Item( TRUE ));
/*N*/ // disable light source 1
diff --git a/binfilter/inc/bf_sch/chtmodel.hxx b/binfilter/inc/bf_sch/chtmodel.hxx
index a835181..7dae863 100644
--- a/binfilter/inc/bf_sch/chtmodel.hxx
+++ b/binfilter/inc/bf_sch/chtmodel.hxx
@@ -98,7 +98,7 @@ struct DataDescription;
class SchRectObj;
typedef ::std::vector< SfxItemSet* > ItemSetList;
-DECLARE_LIST(DescrList, E3dLabelObj*)
+typedef ::std::vector< E3dLabelObj* > DescrList;
#define VERTICAL_LINE aLine[0].Y() = rRect.Bottom(); aLine[1].Y() = rRect.Top();
#define HORIZONTAL_LINE aLine[0].X() = rRect.Left(); aLine[1].X() = rRect.Right();
More information about the Libreoffice-commits
mailing list