diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2013-10-17 12:23:05 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2013-11-19 13:47:38 +0100 |
commit | a715ebeee9d3a88c7c0155d629277f1ee2705bf2 (patch) | |
tree | 4d49c77213e7384064e249ab056806fbb9d2d19b /chart2 | |
parent | 0aa94225baf8e55303d0b3cc23cabbec050a3e4e (diff) |
add a few property cases
Change-Id: Idd77baf2f84550f1a29e5eaf9afb4aa454e79154
Diffstat (limited to 'chart2')
-rw-r--r-- | chart2/source/view/inc/DummyXShape.hxx | 6 | ||||
-rw-r--r-- | chart2/source/view/main/DummyXShape.cxx | 34 |
2 files changed, 32 insertions, 8 deletions
diff --git a/chart2/source/view/inc/DummyXShape.hxx b/chart2/source/view/inc/DummyXShape.hxx index 30b627da4407..924c43f98c8d 100644 --- a/chart2/source/view/inc/DummyXShape.hxx +++ b/chart2/source/view/inc/DummyXShape.hxx @@ -130,13 +130,15 @@ public: virtual DummyChart* getRootShape(); +protected: + + std::map<OUString, uno::Any> maProperties; + private: OUString maName; 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; diff --git a/chart2/source/view/main/DummyXShape.cxx b/chart2/source/view/main/DummyXShape.cxx index 1451605ba4be..4d93079caf74 100644 --- a/chart2/source/view/main/DummyXShape.cxx +++ b/chart2/source/view/main/DummyXShape.cxx @@ -203,14 +203,34 @@ void DummyXShape::setParent( const uno::Reference< uno::XInterface >& xParent ) mxParent = xParent; } +namespace { + +void setProperties( uno::Reference< beans::XPropertySet > xPropSet, const tPropertyNameMap& rPropertyNameMap, + std::map<OUString, uno::Any>& rTargetMap ) +{ + tNameSequence aNames; + tAnySequence aValues; + PropertyMapper::getMultiPropertyLists( aNames, aValues, + xPropSet, rPropertyNameMap ); + + sal_Int32 nSize = std::min(aNames.getLength(), aValues.getLength()); + for(sal_Int32 i = 0; i < nSize; ++i) + { + rTargetMap[aNames[i]] = aValues[i]; + } +} + +} + DummyCube::DummyCube(const drawing::Position3D &rPos, const drawing::Direction3D& rSize, - sal_Int32 nRotateZAngleHundredthDegree, const uno::Reference< beans::XPropertySet > , - const tPropertyNameMap& , bool bRounded ): + sal_Int32 nRotateZAngleHundredthDegree, const uno::Reference< beans::XPropertySet > xPropSet, + const tPropertyNameMap& rPropertyNameMap, bool bRounded ): mnRotateZAngleHundredthDegree(nRotateZAngleHundredthDegree), mbRounded(bRounded) { setPosition(Position3DToAWTPoint(rPos)); setSize(Direction3DToAWTSize(rSize)); + setProperties(xPropSet, rPropertyNameMap, maProperties); } DummyCylinder::DummyCylinder(const drawing::Position3D& rPos, const drawing::Direction3D& rSize, @@ -222,13 +242,14 @@ DummyCylinder::DummyCylinder(const drawing::Position3D& rPos, const drawing::Dir } DummyPyramid::DummyPyramid(const drawing::Position3D& rPos, const drawing::Direction3D& rSize, - double fTopHeight, bool bRotateZ, uno::Reference< beans::XPropertySet > , - const tPropertyNameMap& ): + double fTopHeight, bool bRotateZ, uno::Reference< beans::XPropertySet > xPropSet, + const tPropertyNameMap& rPropertyNameMap): mfTopHeight(fTopHeight), mbRotateZ(bRotateZ) { setPosition(Position3DToAWTPoint(rPos)); setSize(Direction3DToAWTSize(rSize)); + setProperties(xPropSet, rPropertyNameMap, maProperties); } DummyCone::DummyCone(const drawing::Position3D& rPos, const drawing::Direction3D& rSize, @@ -266,14 +287,15 @@ DummyPieSegment::DummyPieSegment(double fUnitCircleStartAngleDegree, double fUni { } -DummyStripe::DummyStripe(const Stripe& rStripe, uno::Reference< beans::XPropertySet > , - const tPropertyNameMap& , sal_Bool bDoubleSided, +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) { + setProperties(xPropSet, rPropertyNameMap, maProperties); } DummyArea3D::DummyArea3D(const drawing::PolyPolygonShape3D& rShape, double fDepth): |