[Libreoffice-commits] core.git: chart2/source

Stephan Bergmann sbergman at redhat.com
Wed Jan 29 02:31:19 PST 2014


 chart2/source/view/inc/DummyXShape.hxx         |   57 ++++--------------------
 chart2/source/view/main/DummyXShape.cxx        |   58 +++++++------------------
 chart2/source/view/main/OpenGLRender.hxx       |   12 -----
 chart2/source/view/main/OpenglShapeFactory.cxx |   54 ++++++++++-------------
 4 files changed, 52 insertions(+), 129 deletions(-)

New commits:
commit 9cec5ab4f650b491460321bcded598a66de7b8c7
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Wed Jan 29 11:30:26 2014 +0100

    -Werror,-Wunused-private-field
    
    Change-Id: I49890f014052604092e8c0b91a8acc4d592376eb

diff --git a/chart2/source/view/inc/DummyXShape.hxx b/chart2/source/view/inc/DummyXShape.hxx
index 2916aae..66b5225 100644
--- a/chart2/source/view/inc/DummyXShape.hxx
+++ b/chart2/source/view/inc/DummyXShape.hxx
@@ -185,7 +185,6 @@ private:
     OUString maName;
 
     com::sun::star::uno::Reference< com::sun::star::uno::XInterface > mxParent;
-    DummyXShape* mpParent;
 
 };
 
@@ -193,44 +192,28 @@ class DummyCube : public DummyXShape
 {
 public:
     DummyCube(const drawing::Position3D &rPos, const drawing::Direction3D& rSize,
-            sal_Int32 nRotateZAngleHundredthDegree, const uno::Reference< beans::XPropertySet > xPropSet,
-            const tPropertyNameMap& rPropertyNameMap, bool bRounded );
-
-private:
-    sal_Int32 mnRotateZAngleHundredthDegree;
-    bool mbRounded;
+            const uno::Reference< beans::XPropertySet > xPropSet,
+            const tPropertyNameMap& rPropertyNameMap );
 };
 
 class DummyCylinder : public DummyXShape
 {
 public:
-    DummyCylinder(const drawing::Position3D&, const drawing::Direction3D& rSize,
-            sal_Int32 nRotateZAngleHundredthDegree );
-private:
-    sal_Int32 mnRotateZAngleHundredthDegree;
+    DummyCylinder(const drawing::Position3D&, const drawing::Direction3D& rSize );
 };
 
 class DummyPyramid : public DummyXShape
 {
 public:
     DummyPyramid(const drawing::Position3D& rPosition, const drawing::Direction3D& rSize,
-            double fTopHeight, bool bRotateZ, uno::Reference< beans::XPropertySet > xPropSet,
+            uno::Reference< beans::XPropertySet > xPropSet,
             const tPropertyNameMap& rPropertyNameMap );
-
-private:
-    double mfTopHeight;
-    bool mbRotateZ;
 };
 
 class DummyCone : public DummyXShape
 {
 public:
-    DummyCone(const drawing::Position3D& rPosition, const drawing::Direction3D& rSize,
-            double fTopHeight, sal_Int32 nRotateZAngleHundredthDegree);
-
-private:
-    sal_Int32 mnRotateZAngleHundredthDegree;
-    double mfTopHeight;
+    DummyCone(const drawing::Position3D& rPosition, const drawing::Direction3D& rSize);
 };
 
 class DummyPieSegment2D : public DummyXShape
@@ -253,45 +236,30 @@ private:
 class DummyPieSegment : public DummyXShape
 {
 public:
-    DummyPieSegment(double fUnitCircleStartAngleDegree, double fUnitCircleWidthAngleDegree,
-            double fUnitCircleInnerRadius, double fUnitCircleOuterRadius,
-            const drawing::Direction3D& rOffset, const drawing::HomogenMatrix& rUnitCircleToScene,
-            double fDepth);
+    DummyPieSegment(
+            const drawing::Direction3D& rOffset, const drawing::HomogenMatrix& rUnitCircleToScene);
 
 private:
-    double mfUnitCircleStartAngleDegree;
-    double mfUnitCircleWidthAngleDegree;
-    double mfUnitCircleInnerRadius;
-    double mfUnitCircleOuterRadius;
-
     drawing::Direction3D maOffset;
     drawing::HomogenMatrix maUnitCircleToScene;
-
-    double mfDepth;
 };
 
 class DummyStripe : public DummyXShape
 {
 public:
     DummyStripe(const Stripe& rStripe, uno::Reference< beans::XPropertySet > xPropSet,
-            const tPropertyNameMap& rPropertyNameMap, sal_Bool bDoubleSided,
-            short nRotatedTexture, bool bFlatNormals );
+            const tPropertyNameMap& rPropertyNameMap );
 
 private:
     Stripe maStripe;
-
-    bool mbDoubleSided;
-    short mnRotatedTexture;
-    bool mbFlatNormals;
 };
 
 class DummyArea3D : public DummyXShape
 {
 public:
-    DummyArea3D(const drawing::PolyPolygonShape3D& rShape, double fDepth);
+    DummyArea3D(const drawing::PolyPolygonShape3D& rShape);
 
 private:
-    double mfDepth;
     drawing::PolyPolygonShape3D maShapes;
 };
 
@@ -310,13 +278,12 @@ class DummySymbol2D : public DummyXShape
 {
 public:
     DummySymbol2D(const drawing::Position3D& rPosition, const drawing::Direction3D& rSize,
-            sal_Int32 nStandardSymbol, sal_Int32 nBorderColor, sal_Int32 nFillColor);
+            sal_Int32 nStandardSymbol, sal_Int32 nFillColor);
     void render();
 private:
     drawing::Position3D mrPosition;
     drawing::Direction3D mrSize;
     sal_Int32 mnStandardSymbol;
-    sal_Int32 mnBorderColor;
     sal_Int32 mnFillColor;
 };
 
@@ -391,13 +358,11 @@ class DummyFormattedText : public DummyXShape
 public:
     DummyFormattedText(uno::Sequence< uno::Reference<
         chart2::XFormattedString > >& rFormattedString,
-        uno::Reference< beans::XPropertySet > xPropSet, double fRotation);
+        uno::Reference< beans::XPropertySet > xPropSet);
 
 private:
     com::sun::star::uno::Sequence< com::sun::star::uno::Reference<
         chart2::XFormattedString > > maFormattedString;
-
-    double mfRotation;
 };
 
 
diff --git a/chart2/source/view/main/DummyXShape.cxx b/chart2/source/view/main/DummyXShape.cxx
index 6b18a2f..5e5eb59 100644
--- a/chart2/source/view/main/DummyXShape.cxx
+++ b/chart2/source/view/main/DummyXShape.cxx
@@ -87,8 +87,7 @@ void debugProperties(std::map<OUString, uno::Any>& rProperties)
 
 }
 
-DummyXShape::DummyXShape():
-    mpParent(NULL)
+DummyXShape::DummyXShape()
 {
 }
 
@@ -308,39 +307,30 @@ void setProperties( const tNameSequence& rNames, const tAnySequence& rValues,
 }
 
 DummyCube::DummyCube(const drawing::Position3D &rPos, const drawing::Direction3D& rSize,
-        sal_Int32 nRotateZAngleHundredthDegree, const uno::Reference< beans::XPropertySet > xPropSet,
-        const tPropertyNameMap& rPropertyNameMap, bool bRounded ):
-    mnRotateZAngleHundredthDegree(nRotateZAngleHundredthDegree),
-    mbRounded(bRounded)
+        const uno::Reference< beans::XPropertySet > xPropSet,
+        const tPropertyNameMap& rPropertyNameMap )
 {
     setPosition(Position3DToAWTPoint(rPos));
     setSize(Direction3DToAWTSize(rSize));
     setProperties(xPropSet, rPropertyNameMap, maProperties);
 }
 
-DummyCylinder::DummyCylinder(const drawing::Position3D& rPos, const drawing::Direction3D& rSize,
-            sal_Int32 nRotateZAngleHundredthDegree ):
-    mnRotateZAngleHundredthDegree(nRotateZAngleHundredthDegree)
+DummyCylinder::DummyCylinder(const drawing::Position3D& rPos, const drawing::Direction3D& rSize )
 {
     setPosition(Position3DToAWTPoint(rPos));
     setSize(Direction3DToAWTSize(rSize));
 }
 
 DummyPyramid::DummyPyramid(const drawing::Position3D& rPos, const drawing::Direction3D& rSize,
-        double fTopHeight, bool bRotateZ, uno::Reference< beans::XPropertySet > xPropSet,
-        const tPropertyNameMap& rPropertyNameMap):
-    mfTopHeight(fTopHeight),
-    mbRotateZ(bRotateZ)
+        uno::Reference< beans::XPropertySet > xPropSet,
+        const tPropertyNameMap& rPropertyNameMap)
 {
     setPosition(Position3DToAWTPoint(rPos));
     setSize(Direction3DToAWTSize(rSize));
     setProperties(xPropSet, rPropertyNameMap, maProperties);
 }
 
-DummyCone::DummyCone(const drawing::Position3D& rPos, const drawing::Direction3D& rSize,
-        double fTopHeight, sal_Int32 nRotateZAngleHundredthDegree):
-    mnRotateZAngleHundredthDegree(nRotateZAngleHundredthDegree),
-    mfTopHeight(fTopHeight)
+DummyCone::DummyCone(const drawing::Position3D& rPos, const drawing::Direction3D& rSize)
 {
     setPosition(Position3DToAWTPoint(rPos));
     setSize(Direction3DToAWTSize(rSize));
@@ -388,33 +378,21 @@ void DummyPieSegment2D::render()
 
 }
 
-DummyPieSegment::DummyPieSegment(double fUnitCircleStartAngleDegree, double fUnitCircleWidthAngleDegree,
-        double fUnitCircleInnerRadius, double fUnitCircleOuterRadius,
-        const drawing::Direction3D& rOffset, const drawing::HomogenMatrix& rUnitCircleToScene,
-        double fDepth ):
-    mfUnitCircleStartAngleDegree(fUnitCircleStartAngleDegree),
-    mfUnitCircleWidthAngleDegree(fUnitCircleWidthAngleDegree),
-    mfUnitCircleInnerRadius(fUnitCircleInnerRadius),
-    mfUnitCircleOuterRadius(fUnitCircleOuterRadius),
+DummyPieSegment::DummyPieSegment(
+        const drawing::Direction3D& rOffset, const drawing::HomogenMatrix& rUnitCircleToScene ):
     maOffset(rOffset),
-    maUnitCircleToScene(rUnitCircleToScene),
-    mfDepth(fDepth)
+    maUnitCircleToScene(rUnitCircleToScene)
 {
 }
 
 DummyStripe::DummyStripe(const Stripe& rStripe, uno::Reference< beans::XPropertySet > xPropSet,
-        const tPropertyNameMap& rPropertyNameMap, sal_Bool bDoubleSided,
-        short nRotatedTexture, bool bFlatNormals ):
-    maStripe(rStripe),
-    mbDoubleSided(bDoubleSided),
-    mnRotatedTexture(nRotatedTexture),
-    mbFlatNormals(bFlatNormals)
+        const tPropertyNameMap& rPropertyNameMap ):
+    maStripe(rStripe)
 {
     setProperties(xPropSet, rPropertyNameMap, maProperties);
 }
 
-DummyArea3D::DummyArea3D(const drawing::PolyPolygonShape3D& rShape, double fDepth):
-    mfDepth(fDepth),
+DummyArea3D::DummyArea3D(const drawing::PolyPolygonShape3D& rShape):
     maShapes(rShape)
 {
 }
@@ -452,11 +430,10 @@ void DummyArea2D::render()
 }
 
 DummySymbol2D::DummySymbol2D(const drawing::Position3D& rPos, const drawing::Direction3D& rSize,
-        sal_Int32 nStandardSymbol, sal_Int32 nBorderColor, sal_Int32 nFillColor):
+        sal_Int32 nStandardSymbol, sal_Int32 nFillColor):
     mrPosition(rPos),
     mrSize(rSize),
     mnStandardSymbol(nStandardSymbol),
-    mnBorderColor(nBorderColor),
     mnFillColor(nFillColor)
 {
     setPosition(Position3DToAWTPoint(rPos));
@@ -812,9 +789,8 @@ void DummyText::setPropertyValue( const OUString& rName, const uno::Any& rValue)
 
 DummyFormattedText::DummyFormattedText(uno::Sequence< uno::Reference<
         chart2::XFormattedString > >& rFormattedString,
-        uno::Reference< beans::XPropertySet > , double fRotation):
-    maFormattedString(rFormattedString),
-    mfRotation(fRotation)
+        uno::Reference< beans::XPropertySet >):
+    maFormattedString(rFormattedString)
 {
 }
 
@@ -994,7 +970,7 @@ bool DummyChart::initWindow()
 
     GLWin.dpy = reinterpret_cast<Display*>(sysData->pDisplay);
 
-    if( glXQueryExtension( GLWin.dpy, NULL, NULL ) == false )
+    if( !glXQueryExtension( GLWin.dpy, NULL, NULL ) )
         return false;
 
     GLWin.win = sysData->aWindow;
diff --git a/chart2/source/view/main/OpenGLRender.hxx b/chart2/source/view/main/OpenGLRender.hxx
index 76217ac..23e842d 100755
--- a/chart2/source/view/main/OpenGLRender.hxx
+++ b/chart2/source/view/main/OpenGLRender.hxx
@@ -220,20 +220,10 @@ private:
 
     GLint m_MatrixID;
 
-    GLint m_VertexID;
-
-    GLint m_ColorID;
-
     GLint m_RenderVertexID;
 
     GLint m_RenderTexCoordID;
 
-    GLint m_Line2DVertexID;
-
-    GLint m_Line2DWholeVertexID;
-
-    GLint m_Line2DColorID;
-
     GLint m_RenderTexID;
 
     GLuint m_RenderVertexBuf;
@@ -261,8 +251,6 @@ private:
     com::sun::star::uno::Reference< com::sun::star::drawing::XShape > mxRenderTarget;
     bool mbArbMultisampleSupported;
     int m_iArbMultisampleFormat;
-    GLint m_iSampleBufs;
-    GLint m_iSamples;
 
     glm::vec4 m_2DColor;
     GLuint m_frameBufferMS;
diff --git a/chart2/source/view/main/OpenglShapeFactory.cxx b/chart2/source/view/main/OpenglShapeFactory.cxx
index 95b9d66..062e987 100644
--- a/chart2/source/view/main/OpenglShapeFactory.cxx
+++ b/chart2/source/view/main/OpenglShapeFactory.cxx
@@ -143,14 +143,14 @@ uno::Reference<drawing::XShape>
         OpenglShapeFactory::createCube(
             const uno::Reference<drawing::XShapes>& xTarget
             , const drawing::Position3D& rPosition, const drawing::Direction3D& rSize
-            , sal_Int32 nRotateZAngleHundredthDegree
+            , sal_Int32
             , const uno::Reference< beans::XPropertySet >& xSourceProp
             , const tPropertyNameMap& rPropertyNameMap
-            , bool bRounded )
+            , bool )
 {
     dummy::DummyCube* pCube = new dummy::DummyCube(rPosition, rSize,
-            nRotateZAngleHundredthDegree, xSourceProp,
-            rPropertyNameMap, bRounded);
+            xSourceProp,
+            rPropertyNameMap);
     xTarget->add(pCube);
     return pCube;
 }
@@ -159,10 +159,9 @@ uno::Reference<drawing::XShape>
         OpenglShapeFactory::createCylinder(
             const uno::Reference<drawing::XShapes>& xTarget
           , const drawing::Position3D& rPosition, const drawing::Direction3D& rSize
-          , sal_Int32 nRotateZAngleHundredthDegree )
+          , sal_Int32 )
 {
-    dummy::DummyCylinder* pCylinder = new dummy::DummyCylinder( rPosition, rSize,
-            nRotateZAngleHundredthDegree );
+    dummy::DummyCylinder* pCylinder = new dummy::DummyCylinder( rPosition, rSize );
     xTarget->add(pCylinder);
     return pCylinder;
 }
@@ -171,12 +170,11 @@ uno::Reference<drawing::XShape>
         OpenglShapeFactory::createPyramid(
             const uno::Reference<drawing::XShapes>& xTarget
           , const drawing::Position3D& rPosition, const drawing::Direction3D& rSize
-          , double fTopHeight, bool bRotateZ
+          , double, bool
           , const uno::Reference< beans::XPropertySet >& xSourceProp
           , const tPropertyNameMap& rPropertyNameMap )
 {
     dummy::DummyPyramid* pPyramid = new dummy::DummyPyramid(rPosition, rSize,
-            fTopHeight, bRotateZ,
             xSourceProp, rPropertyNameMap );
     xTarget->add(pPyramid);
     return pPyramid;
@@ -186,10 +184,9 @@ uno::Reference<drawing::XShape>
         OpenglShapeFactory::createCone(
             const uno::Reference<drawing::XShapes>& xTarget
           , const drawing::Position3D& rPosition, const drawing::Direction3D& rSize
-          , double fTopHeight, sal_Int32 nRotateZAngleHundredthDegree )
+          , double, sal_Int32 )
 {
-    dummy::DummyCone* pCone = new dummy::DummyCone(rPosition, rSize, fTopHeight,
-            nRotateZAngleHundredthDegree);
+    dummy::DummyCone* pCone = new dummy::DummyCone(rPosition, rSize);
     xTarget->add(pCone);
     return pCone;
 }
@@ -212,15 +209,14 @@ uno::Reference< drawing::XShape >
 uno::Reference< drawing::XShape >
         OpenglShapeFactory::createPieSegment(
                     const uno::Reference< drawing::XShapes >& xTarget
-                    , double fUnitCircleStartAngleDegree, double fUnitCircleWidthAngleDegree
-                    , double fUnitCircleInnerRadius, double fUnitCircleOuterRadius
+                    , double, double
+                    , double, double
                     , const drawing::Direction3D& rOffset
                     , const drawing::HomogenMatrix& rUnitCircleToScene
-                    , double fDepth )
+                    , double )
 {
-    dummy::DummyPieSegment* pSegment = new dummy::DummyPieSegment(fUnitCircleStartAngleDegree,
-            fUnitCircleWidthAngleDegree, fUnitCircleInnerRadius, fUnitCircleOuterRadius,
-            rOffset, rUnitCircleToScene, fDepth);
+    dummy::DummyPieSegment* pSegment = new dummy::DummyPieSegment(
+            rOffset, rUnitCircleToScene);
 
     xTarget->add(pSegment);
     return pSegment;
@@ -231,14 +227,12 @@ uno::Reference< drawing::XShape >
                     , const Stripe& rStripe
                     , const uno::Reference< beans::XPropertySet >& xSourceProp
                     , const tPropertyNameMap& rPropertyNameMap
-                    , sal_Bool bDoubleSided
-                    , short nRotatedTexture
-                    , bool bFlatNormals )
+                    , sal_Bool
+                    , short
+                    , bool )
 {
     dummy::DummyStripe* pStripe = new dummy::DummyStripe(rStripe,
-            xSourceProp, rPropertyNameMap,
-            bDoubleSided, nRotatedTexture,
-            bFlatNormals);
+            xSourceProp, rPropertyNameMap);
     xTarget->add(pStripe);
     return pStripe;
 }
@@ -246,9 +240,9 @@ uno::Reference< drawing::XShape >
 uno::Reference< drawing::XShape >
         OpenglShapeFactory::createArea3D( const uno::Reference< drawing::XShapes >& xTarget
                     , const drawing::PolyPolygonShape3D& rPolyPolygon
-                    , double fDepth )
+                    , double )
 {
-    dummy::DummyArea3D* pArea = new dummy::DummyArea3D(rPolyPolygon, fDepth);
+    dummy::DummyArea3D* pArea = new dummy::DummyArea3D(rPolyPolygon);
     xTarget->add(pArea);
     return pArea;
 }
@@ -268,11 +262,11 @@ uno::Reference< drawing::XShape >
                     , const drawing::Position3D& rPosition
                     , const drawing::Direction3D& rSize
                     , sal_Int32 nStandardSymbol
-                    , sal_Int32 nBorderColor
+                    , sal_Int32
                     , sal_Int32 nFillColor )
 {
     dummy::DummySymbol2D* pSymbol = new dummy::DummySymbol2D(rPosition, rSize,
-            nStandardSymbol, nBorderColor, nFillColor);
+            nStandardSymbol, nFillColor);
     xTarget->add(pSymbol);
     return pSymbol;
 }
@@ -418,10 +412,10 @@ uno::Reference< drawing::XShape >
                 const awt::Size& rSize, const awt::Point& rPos,
                 uno::Sequence< uno::Reference< chart2::XFormattedString > >& rFormattedString,
                 const uno::Reference< beans::XPropertySet > xPropSet,
-                double fRotation, const OUString& rName)
+                double, const OUString& rName)
 {
     dummy::DummyFormattedText* pText = new dummy::DummyFormattedText( rFormattedString,
-            xPropSet, fRotation );
+            xPropSet );
     pText->setPosition(rPos);
     pText->setSize(rSize);
     pText->setName(rName);


More information about the Libreoffice-commits mailing list