summaryrefslogtreecommitdiff
path: root/chart2
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2013-10-16 00:36:23 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2013-11-19 13:47:38 +0100
commit4813b13542371619f483fd4ed173cecd84e74574 (patch)
tree8d058d7a8a82958414fbaa562b1b3ef14e63066e /chart2
parent22c8bb9e0fbd3bead8e72316d82b5dedf9659b2c (diff)
make the shapes explicit in the backend
Change-Id: Idf92176c66cefde3022cec2990c9711a1b49a111
Diffstat (limited to 'chart2')
-rw-r--r--chart2/source/view/inc/DummyXShape.hxx236
-rw-r--r--chart2/source/view/main/DummyXShape.cxx20
-rw-r--r--chart2/source/view/main/OpenglShapeFactory.cxx283
3 files changed, 426 insertions, 113 deletions
diff --git a/chart2/source/view/inc/DummyXShape.hxx b/chart2/source/view/inc/DummyXShape.hxx
index ef117abd2a3b..0e5c4f74db43 100644
--- a/chart2/source/view/inc/DummyXShape.hxx
+++ b/chart2/source/view/inc/DummyXShape.hxx
@@ -14,7 +14,6 @@
#include <com/sun/star/drawing/XShape.hpp>
#include <com/sun/star/drawing/XShapes.hpp>
-#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/beans/XMultiPropertySet.hpp>
#include <com/sun/star/container/XNamed.hpp>
#include <com/sun/star/container/XChild.hpp>
@@ -24,10 +23,41 @@
#include <com/sun/star/uno/Type.h>
#include <com/sun/star/uno/Any.h>
#include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/drawing/CircleKind.hpp>
+#include <com/sun/star/drawing/DoubleSequence.hpp>
+#include <com/sun/star/drawing/FlagSequence.hpp>
+#include <com/sun/star/drawing/FillStyle.hpp>
+#include <com/sun/star/drawing/LineStyle.hpp>
+#include <com/sun/star/drawing/NormalsKind.hpp>
+#include <com/sun/star/drawing/PointSequence.hpp>
+#include <com/sun/star/drawing/PolygonKind.hpp>
+#include <com/sun/star/drawing/PolyPolygonBezierCoords.hpp>
+#include <com/sun/star/drawing/ProjectionMode.hpp>
+#include <com/sun/star/drawing/ShadeMode.hpp>
+#include <com/sun/star/drawing/TextFitToSizeType.hpp>
+#include <com/sun/star/drawing/TextHorizontalAdjust.hpp>
+#include <com/sun/star/drawing/TextureProjectionMode.hpp>
+#include <com/sun/star/drawing/TextVerticalAdjust.hpp>
+#include <com/sun/star/text/XText.hpp>
+#include <com/sun/star/uno/Any.hxx>
+#include <com/sun/star/drawing/PolyPolygonShape3D.hpp>
+#include <com/sun/star/drawing/Direction3D.hpp>
+#include <com/sun/star/drawing/Position3D.hpp>
+#include <com/sun/star/graphic/XGraphic.hpp>
+#include <com/sun/star/drawing/HomogenMatrix.hpp>
+#include <com/sun/star/drawing/PointSequenceSequence.hpp>
+
+#include "PropertyMapper.hxx"
+#include "VLineProperties.hxx"
+#include "Stripe.hxx"
#include <rtl/ustring.hxx>
#include <vector>
+#include <map>
+
+using namespace com::sun::star;
namespace chart {
@@ -105,20 +135,193 @@ private:
com::sun::star::awt::Point maPosition;
com::sun::star::awt::Size maSize;
+ std::map<OUString, uno::Any> maProperties;
+
com::sun::star::uno::Reference< com::sun::star::uno::XInterface > mxParent;
DummyXShape* mpParent;
};
-class DummyChart : public DummyXShape
+class DummyCube : public DummyXShape
{
public:
- virtual DummyChart* getRootShape();
+ DummyCube(const drawing::Position3D &rPos, const drawing::Direction3D& rSize,
+ sal_Int32 nRotateZAngleHundredthDegree, const uno::Reference< beans::XPropertySet > xPropSet,
+ const tPropertyNameMap& rPropertyNaemMap, bool bRounded );
- OpenglContext* getGlContext() { return mpContext; }
+private:
+ sal_Int32 mnRotateZAngleHundredthDegree;
+ bool mbRounded;
+};
+class DummyCylinder : public DummyXShape
+{
+public:
+ DummyCylinder(const drawing::Position3D&, const drawing::Direction3D& rSize,
+ sal_Int32 nRotateZAngleHundredthDegree );
private:
- OpenglContext* mpContext;
+ sal_Int32 mnRotateZAngleHundredthDegree;
+ bool mbRounded;
+};
+
+class DummyPyramid : public DummyXShape
+{
+public:
+ DummyPyramid(const drawing::Position3D& rPosition, const drawing::Direction3D& rSize,
+ double fTopHeight, bool bRotateZ, uno::Reference< beans::XPropertySet > xPropSet,
+ const tPropertyNameMap& rPropertyNameMap );
+
+private:
+ double mfTopHeight;
+ bool bRotateZ;
+};
+
+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;
+};
+
+class DummyPieSegment2D : public DummyXShape
+{
+public:
+ DummyPieSegment2D(double fUnitCircleStartAngleDegree, double fUnitCircleWidthAngleDegree,
+ double fUnitCircleInnerRadius, double fUnitCircleOuterRadius,
+ const drawing::Direction3D& rOffset, const drawing::HomogenMatrix& rUnitCircleToScene);
+
+private:
+ double mfUnitCircleStartAngleDegree;
+ double mfUnitCircleWidthAngleDegree;
+ double mfUnitCircleInnerRadius;
+ double mfUnitCircleOuterRadius;
+
+ drawing::Direction3D maOffset;
+ drawing::HomogenMatrix maUnitCircleToScene;
+};
+
+class DummyPieSegment : public DummyXShape
+{
+public:
+ DummyPieSegment(double fUnitCircleStartAngleDegree, double fUnitCircleWidthAngleDegree,
+ double fUnitCircleInnerRadius, double fUnitCircleOuterRadius,
+ const drawing::Direction3D& rOffset, const drawing::HomogenMatrix& rUnitCircleToScene,
+ double fDepth);
+
+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 );
+
+private:
+ Stripe maStripe;
+
+ bool mbDoubleSided;
+ short mnRotatedTexture;
+ bool mbFlatNormals;
+};
+
+class DummyArea3D : public DummyXShape
+{
+public:
+ DummyArea3D(const drawing::PolyPolygonShape3D& rShape, double fDepth);
+
+private:
+ double mfDepth;
+ drawing::PolyPolygonShape3D maShapes;
+};
+
+class DummyArea2D : public DummyXShape
+{
+public:
+ DummyArea2D(const drawing::PolyPolygonShape3D& rShape);
+
+private:
+ drawing::PolyPolygonShape3D maShapes;
+};
+
+class DummySymbol2D : public DummyXShape
+{
+public:
+ DummySymbol2D(const drawing::Position3D& rPosition, const drawing::Direction3D& rSize,
+ sal_Int32 nStandardSymbol, sal_Int32 nBorderColor, sal_Int32 nFillColor);
+
+private:
+ sal_Int32 mnStandardSymbol;
+};
+
+class DummyGraphic2D : public DummyXShape
+{
+public:
+ DummyGraphic2D(const drawing::Position3D& rPosition, const drawing::Direction3D& rSize,
+ const uno::Reference< graphic::XGraphic > xGraphic );
+
+private:
+ uno::Reference< graphic::XGraphic > mxGraphic;
+};
+
+class DummyCircle : public DummyXShape
+{
+public:
+ DummyCircle(const awt::Point& rPosition, const awt::Size& rSize);
+
+};
+
+class DummyLine3D : public DummyXShape
+{
+public:
+ DummyLine3D(const drawing::PolyPolygonShape3D& rPoints, const VLineProperties& rProperties);
+
+private:
+ drawing::PolyPolygonShape3D maPoints;
+};
+
+class DummyLine2D : public DummyXShape
+{
+public:
+ DummyLine2D(const drawing::PointSequenceSequence& rPoints, const VLineProperties* pProperties);
+ DummyLine2D(const awt::Size& rSize, const awt::Point& rPosition);
+
+private:
+ drawing::PointSequenceSequence maPoints;
+};
+
+class DummyRectangle : public DummyXShape
+{
+public:
+ DummyRectangle();
+ DummyRectangle(const awt::Size& rSize);
+ DummyRectangle(const awt::Size& rSize, const awt::Point& rPoint, const tNameSequence& rNames,
+ const tAnySequence& rValues );
+};
+
+class DummyText : public DummyXShape
+{
+public:
+ DummyText(const OUString& rText, const tNameSequence& rNames,
+ const tAnySequence& rValues, const uno::Any& rTrans );
+
+private:
+ OUString aText;
+ uno::Any aTrans;
};
@@ -147,6 +350,29 @@ private:
std::vector<DummyXShape*> maShapes;
};
+class DummyChart : public DummyXShapes
+{
+public:
+ virtual DummyChart* getRootShape();
+
+ OpenglContext* getGlContext() { return mpContext; }
+
+private:
+ OpenglContext* mpContext;
+};
+
+class DummyGroup2D : public DummyXShapes
+{
+public:
+ DummyGroup2D(const OUString& rName);
+};
+
+class DummyGroup3D : public DummyXShapes
+{
+public:
+ DummyGroup3D(const OUString& rName);
+};
+
}
}
diff --git a/chart2/source/view/main/DummyXShape.cxx b/chart2/source/view/main/DummyXShape.cxx
index 2e208f29bf1c..c14bb6ec0a63 100644
--- a/chart2/source/view/main/DummyXShape.cxx
+++ b/chart2/source/view/main/DummyXShape.cxx
@@ -70,18 +70,23 @@ uno::Reference< beans::XPropertySetInfo > DummyXShape::getPropertySetInfo()
return uno::Reference< beans::XPropertySetInfo >();
}
-void DummyXShape::setPropertyValue( const OUString& rName, const uno::Any& )
+void DummyXShape::setPropertyValue( const OUString& rName, const uno::Any& rValue)
throw(beans::UnknownPropertyException, beans::PropertyVetoException,
lang::IllegalArgumentException, lang::WrappedTargetException,
uno::RuntimeException)
{
SAL_DEBUG("DummyXShape::setProperty: " << rName << " " << "Any");
+ maProperties[rName] = rValue;
}
uno::Any DummyXShape::getPropertyValue( const OUString& rName )
throw(beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
{
SAL_DEBUG("DummyXShape::getPropertyValue: " << rName);
+ std::map<OUString, uno::Any>::iterator itr = maProperties.find(rName);
+ if(itr != maProperties.end())
+ return itr->second;
+
return uno::Any();
}
@@ -113,10 +118,19 @@ throw (beans::PropertyVetoException, lang::IllegalArgumentException,
}
uno::Sequence< uno::Any > DummyXShape::getPropertyValues(
- const uno::Sequence< OUString >& )
+ const uno::Sequence< OUString >& rNames)
throw (uno::RuntimeException)
{
- return uno::Sequence< uno::Any >();
+ uno::Sequence< uno::Any > aValues(rNames.getLength());
+ for(sal_Int32 i = 0; i < rNames.getLength(); ++i)
+ {
+ OUString aName = rNames[i];
+
+ std::map<OUString, uno::Any>::iterator itr = maProperties.find(aName);
+ if(itr != maProperties.end())
+ aValues[i] = itr->second;
+ }
+ return aValues;
}
void DummyXShape::addPropertiesChangeListener( const uno::Sequence< OUString >& , const uno::Reference< beans::XPropertiesChangeListener >& ) throw (uno::RuntimeException)
diff --git a/chart2/source/view/main/OpenglShapeFactory.cxx b/chart2/source/view/main/OpenglShapeFactory.cxx
index e39136ae0a24..52fa4079603c 100644
--- a/chart2/source/view/main/OpenglShapeFactory.cxx
+++ b/chart2/source/view/main/OpenglShapeFactory.cxx
@@ -60,216 +60,288 @@ namespace chart
using dummy::DummyXShape;
using dummy::DummyXShapes;
+using dummy::DummyCylinder;
+using dummy::DummyRectangle;
+using dummy::DummyPyramid;
+using dummy::DummyCone;
namespace opengl {
uno::Reference< drawing::XShapes > OpenglShapeFactory::getOrCreateChartRootShape(
const uno::Reference< drawing::XDrawPage>& )
{
- return new DummyChart();
+ return new dummy::DummyChart();
}
// methods for 3D shape creation
uno::Reference<drawing::XShape>
OpenglShapeFactory::createCube(
- const uno::Reference<drawing::XShapes>&
- , const drawing::Position3D& , const drawing::Direction3D&
- , sal_Int32
- , const uno::Reference< beans::XPropertySet >&
- , const tPropertyNameMap&
- , bool )
+ const uno::Reference<drawing::XShapes>& xTarget
+ , const drawing::Position3D& rPosition, const drawing::Direction3D& rSize
+ , sal_Int32 nRotateZAngleHundredthDegree
+ , const uno::Reference< beans::XPropertySet >& xSourceProp
+ , const tPropertyNameMap& rPropertyNameMap
+ , bool bRounded )
{
- return new DummyXShape();
+ dummy::DummyCube* pCube = new dummy::DummyCube(rPosition, rSize,
+ nRotateZAngleHundredthDegree, xSourceProp,
+ rPropertyNameMap, bRounded);
+ xTarget->add(pCube);
+ return pCube;
}
uno::Reference<drawing::XShape>
OpenglShapeFactory::createCylinder(
- const uno::Reference<drawing::XShapes>&
- , const drawing::Position3D& , const drawing::Direction3D&
- , sal_Int32 )
+ const uno::Reference<drawing::XShapes>& xTarget
+ , const drawing::Position3D& rPosition, const drawing::Direction3D& rSize
+ , sal_Int32 nRotateZAngleHundredthDegree )
{
- return new DummyXShape();
+ dummy::DummyCylinder* pCylinder = new dummy::DummyCylinder( rPosition, rSize,
+ nRotateZAngleHundredthDegree );
+ xTarget->add(pCylinder);
+ return pCylinder;
}
uno::Reference<drawing::XShape>
OpenglShapeFactory::createPyramid(
- const uno::Reference<drawing::XShapes>&
- , const drawing::Position3D& , const drawing::Direction3D&
- , double , bool
- , const uno::Reference< beans::XPropertySet >&
- , const tPropertyNameMap& )
+ const uno::Reference<drawing::XShapes>& xTarget
+ , const drawing::Position3D& rPosition, const drawing::Direction3D& rSize
+ , double fTopHeight, bool bRotateZ
+ , const uno::Reference< beans::XPropertySet >& xSourceProp
+ , const tPropertyNameMap& rPropertyNameMap )
{
- return new DummyXShape();
+ dummy::DummyPyramid* pPyramid = new dummy::DummyPyramid(rPosition, rSize,
+ fTopHeight, bRotateZ,
+ xSourceProp, rPropertyNameMap );
+ xTarget->add(pPyramid);
+ return pPyramid;
}
uno::Reference<drawing::XShape>
OpenglShapeFactory::createCone(
- const uno::Reference<drawing::XShapes>&
- , const drawing::Position3D& , const drawing::Direction3D&
- , double , sal_Int32 )
+ const uno::Reference<drawing::XShapes>& xTarget
+ , const drawing::Position3D& rPosition, const drawing::Direction3D& rSize
+ , double fTopHeight, sal_Int32 nRotateZAngleHundredthDegree )
{
- return new DummyXShape();
+ dummy::DummyCone* pCone = new dummy::DummyCone(rPosition, rSize, fTopHeight,
+ nRotateZAngleHundredthDegree);
+ xTarget->add(pCone);
+ return pCone;
}
uno::Reference< drawing::XShape >
OpenglShapeFactory::createPieSegment2D(
- const uno::Reference< drawing::XShapes >&
- , double , double
- , double , double
- , const drawing::Direction3D&
- , const drawing::HomogenMatrix& )
+ const uno::Reference< drawing::XShapes >& xTarget
+ , double fUnitCircleStartAngleDegree, double fUnitCircleWidthAngleDegree
+ , double fUnitCircleInnerRadius, double fUnitCircleOuterRadius
+ , const drawing::Direction3D& rOffset
+ , const drawing::HomogenMatrix& rUnitCircleToScene )
{
- return new DummyXShape();
+ dummy::DummyPieSegment2D* pSegment = new dummy::DummyPieSegment2D(fUnitCircleStartAngleDegree,
+ fUnitCircleWidthAngleDegree, fUnitCircleInnerRadius, fUnitCircleOuterRadius,
+ rOffset, rUnitCircleToScene);
+ xTarget->add(pSegment);
+ return pSegment;
}
uno::Reference< drawing::XShape >
OpenglShapeFactory::createPieSegment(
- const uno::Reference< drawing::XShapes >&
- , double , double
- , double , double
- , const drawing::Direction3D&
- , const drawing::HomogenMatrix&
- , double )
+ const uno::Reference< drawing::XShapes >& xTarget
+ , double fUnitCircleStartAngleDegree, double fUnitCircleWidthAngleDegree
+ , double fUnitCircleInnerRadius, double fUnitCircleOuterRadius
+ , const drawing::Direction3D& rOffset
+ , const drawing::HomogenMatrix& rUnitCircleToScene
+ , double fDepth )
{
- return new DummyXShape();
+ dummy::DummyPieSegment* pSegment = new dummy::DummyPieSegment(fUnitCircleStartAngleDegree,
+ fUnitCircleWidthAngleDegree, fUnitCircleInnerRadius, fUnitCircleOuterRadius,
+ rOffset, rUnitCircleToScene, fDepth);
+
+ xTarget->add(pSegment);
+ return pSegment;
}
uno::Reference< drawing::XShape >
- OpenglShapeFactory::createStripe( const uno::Reference< drawing::XShapes >&
- , const Stripe&
- , const uno::Reference< beans::XPropertySet >&
- , const tPropertyNameMap&
- , sal_Bool
- , short
- , bool )
+ OpenglShapeFactory::createStripe( const uno::Reference< drawing::XShapes >& xTarget
+ , const Stripe& rStripe
+ , const uno::Reference< beans::XPropertySet >& xSourceProp
+ , const tPropertyNameMap& rPropertyNameMap
+ , sal_Bool bDoubleSided
+ , short nRotatedTexture
+ , bool bFlatNormals )
{
- return new DummyXShape();
+ dummy::DummyStripe* pStripe = new dummy::DummyStripe(rStripe,
+ xSourceProp, rPropertyNameMap,
+ bDoubleSided, nRotatedTexture,
+ bFlatNormals);
+ xTarget->add(pStripe);
+ return pStripe;
}
uno::Reference< drawing::XShape >
- OpenglShapeFactory::createArea3D( const uno::Reference< drawing::XShapes >&
- , const drawing::PolyPolygonShape3D&
- , double )
+ OpenglShapeFactory::createArea3D( const uno::Reference< drawing::XShapes >& xTarget
+ , const drawing::PolyPolygonShape3D& rPolyPolygon
+ , double fDepth )
{
- return new DummyXShape();
+ dummy::DummyArea3D* pArea = new dummy::DummyArea3D(rPolyPolygon, fDepth);
+ xTarget->add(pArea);
+ return pArea;
}
uno::Reference< drawing::XShape >
- OpenglShapeFactory::createArea2D( const uno::Reference< drawing::XShapes >&
- , const drawing::PolyPolygonShape3D& )
+ OpenglShapeFactory::createArea2D( const uno::Reference< drawing::XShapes >& xTarget
+ , const drawing::PolyPolygonShape3D& rPolyPolygon )
{
- return new DummyXShape();
+ dummy::DummyArea2D* pArea = new dummy::DummyArea2D(rPolyPolygon);
+ xTarget->add(pArea);
+ return pArea;
}
uno::Reference< drawing::XShape >
OpenglShapeFactory::createSymbol2D(
- const uno::Reference< drawing::XShapes >&
- , const drawing::Position3D&
- , const drawing::Direction3D&
- , sal_Int32
- , sal_Int32
- , sal_Int32 )
+ const uno::Reference< drawing::XShapes >& xTarget
+ , const drawing::Position3D& rPosition
+ , const drawing::Direction3D& rSize
+ , sal_Int32 nStandardSymbol
+ , sal_Int32 nBorderColor
+ , sal_Int32 nFillColor )
{
- return new DummyXShape();
+ dummy::DummySymbol2D* pSymbol = new dummy::DummySymbol2D(rPosition, rSize,
+ nStandardSymbol, nBorderColor, nFillColor);
+ xTarget->add(pSymbol);
+ return pSymbol;
}
uno::Reference< drawing::XShape >
OpenglShapeFactory::createGraphic2D(
- const uno::Reference< drawing::XShapes >&
- , const drawing::Position3D&
- , const drawing::Direction3D&
- , const uno::Reference< graphic::XGraphic >& )
+ const uno::Reference< drawing::XShapes >& xTarget
+ , const drawing::Position3D& rPosition
+ , const drawing::Direction3D& rSize
+ , const uno::Reference< graphic::XGraphic >& xGraphic )
{
- return new DummyXShape();
+ dummy::DummyGraphic2D* pGraphic = new dummy::DummyGraphic2D(rPosition, rSize,
+ xGraphic);
+ xTarget->add(pGraphic);
+ return pGraphic;
}
uno::Reference< drawing::XShapes >
- OpenglShapeFactory::createGroup2D( const uno::Reference< drawing::XShapes >&
- , OUString )
+ OpenglShapeFactory::createGroup2D( const uno::Reference< drawing::XShapes >& xTarget
+ , OUString aName)
{
- return new DummyXShapes();
+ dummy::DummyGroup2D* pNewShape = new dummy::DummyGroup2D(aName);
+ xTarget->add(pNewShape);
+ return pNewShape;
}
uno::Reference< drawing::XShapes >
- OpenglShapeFactory::createGroup3D( const uno::Reference< drawing::XShapes >&
- , OUString )
+ OpenglShapeFactory::createGroup3D( const uno::Reference< drawing::XShapes >& xTarget
+ , OUString aName )
{
- return new DummyXShapes();
+ dummy::DummyGroup3D* pNewShape = new dummy::DummyGroup3D(aName);
+ xTarget->add(pNewShape);
+ return pNewShape;
}
uno::Reference< drawing::XShape >
- OpenglShapeFactory::createCircle2D( const uno::Reference< drawing::XShapes >&
- , const drawing::Position3D&
- , const drawing::Direction3D& )
+ OpenglShapeFactory::createCircle2D( const uno::Reference< drawing::XShapes >& xTarget
+ , const drawing::Position3D& rPosition
+ , const drawing::Direction3D& rSize )
{
- return new DummyXShape();
+ drawing::Position3D aCenterPosition(
+ rPosition.PositionX - (rSize.DirectionX / 2.0),
+ rPosition.PositionY - (rSize.DirectionY / 2.0),
+ rPosition.PositionZ );
+ dummy::DummyCircle* pCircle = new dummy::DummyCircle(Position3DToAWTPoint( aCenterPosition ),
+ Direction3DToAWTSize( rSize ));
+ xTarget->add(pCircle);
+ return pCircle;
}
uno::Reference< drawing::XShape >
- OpenglShapeFactory::createCircle( const uno::Reference< drawing::XShapes >&
- , const awt::Size&
- , const awt::Point& )
+ OpenglShapeFactory::createCircle( const uno::Reference< drawing::XShapes >& xTarget
+ , const awt::Size& rSize
+ , const awt::Point& rPosition )
{
- return new DummyXShape();
+ dummy::DummyCircle* pCircle = new dummy::DummyCircle(rPosition, rSize);
+ xTarget->add(pCircle);
+ return pCircle;
}
uno::Reference< drawing::XShape >
- OpenglShapeFactory::createLine3D( const uno::Reference< drawing::XShapes >&
- , const drawing::PolyPolygonShape3D&
- , const VLineProperties& )
+ OpenglShapeFactory::createLine3D( const uno::Reference< drawing::XShapes >& xTarget
+ , const drawing::PolyPolygonShape3D& rPoints
+ , const VLineProperties& rLineProperties )
{
- return new DummyXShape();
+ dummy::DummyLine3D* pLine = new dummy::DummyLine3D(rPoints, rLineProperties);
+ xTarget->add(pLine);
+ return pLine;
}
uno::Reference< drawing::XShape >
- OpenglShapeFactory::createLine2D( const uno::Reference< drawing::XShapes >&
- , const drawing::PointSequenceSequence&
- , const VLineProperties* )
+ OpenglShapeFactory::createLine2D( const uno::Reference< drawing::XShapes >& xTarget
+ , const drawing::PointSequenceSequence& rPoints
+ , const VLineProperties* pLineProperties )
{
- return new DummyXShape();
+ dummy::DummyLine2D* pLine = new dummy::DummyLine2D(rPoints, pLineProperties);
+ xTarget->add(pLine);
+ return pLine;
}
uno::Reference< drawing::XShape >
- OpenglShapeFactory::createLine ( const uno::Reference< drawing::XShapes >& ,
- const awt::Size& , const awt::Point& )
+ OpenglShapeFactory::createLine ( const uno::Reference< drawing::XShapes >& xTarget,
+ const awt::Size& rSize, const awt::Point& rPosition )
{
- return new DummyXShape();
+ dummy::DummyLine2D* pLine = new dummy::DummyLine2D(rSize, rPosition);
+ xTarget->add(pLine);
+ return pLine;
}
uno::Reference< drawing::XShape > OpenglShapeFactory::createInvisibleRectangle(
- const uno::Reference< drawing::XShapes >&
- , const awt::Size& )
+ const uno::Reference< drawing::XShapes >& xTarget
+ , const awt::Size& rSize )
{
- return new DummyXShape();
+ dummy::DummyRectangle* pRectangle = new dummy::DummyRectangle(rSize);
+ xTarget->add(pRectangle);
+ return pRectangle;
}
uno::Reference< drawing::XShape > OpenglShapeFactory::createRectangle(
- const uno::Reference< drawing::XShapes >&
- , const awt::Size&
- , const awt::Point&
- , const tNameSequence&
- , const tAnySequence& )
+ const uno::Reference< drawing::XShapes >& xTarget
+ , const awt::Size& rSize
+ , const awt::Point& rPosition
+ , const tNameSequence& rPropNames
+ , const tAnySequence& rPropValues )
{
- return new DummyXShape();
+ dummy::DummyRectangle* pRectangle = new dummy::DummyRectangle(rSize, rPosition,
+ rPropNames, rPropValues);
+
+ xTarget->add(pRectangle);
+ return pRectangle;
}
uno::Reference< drawing::XShape >
OpenglShapeFactory::createRectangle(
const uno::Reference<
- drawing::XShapes >& )
+ drawing::XShapes >& xTarget)
{
- return new DummyXShape();
+ dummy::DummyRectangle* pRectangle = new dummy::DummyRectangle();
+ xTarget->add(pRectangle);
+ return pRectangle;
}
uno::Reference< drawing::XShape >
- OpenglShapeFactory::createText( const uno::Reference< drawing::XShapes >&
- , const OUString&
- , const tNameSequence&
- , const tAnySequence&
- , const uno::Any& )
+ OpenglShapeFactory::createText( const uno::Reference< drawing::XShapes >& xTarget
+ , const OUString& rText
+ , const tNameSequence& rPropNames
+ , const tAnySequence& rPropValues
+ , const uno::Any& rATransformation )
{
- return new DummyXShape();
+ dummy::DummyText* pText = new dummy::DummyText( rText, rPropNames, rPropValues,
+ rATransformation );
+ xTarget->add(pText);
+ return pText;
}
@@ -280,7 +352,8 @@ uno::Reference< drawing::XShape >
const uno::Reference< beans::XPropertySet > ,
double , const OUString& )
{
- return new DummyXShape();
+ // how the hell should we support that?
+ return uno::Reference< drawing::XShape >();
}
void OpenglShapeFactory::createSeries( const uno::Reference<