[Libreoffice-commits] core.git: Branch 'private/moggi/chart-opengl2' - chart2/source
Markus Mohrhard
markus.mohrhard at googlemail.com
Fri Dec 27 10:21:54 PST 2013
chart2/source/view/main/DummyXShape.cxx | 40 ++++++++++++++++++++++++++++++--
1 file changed, 38 insertions(+), 2 deletions(-)
New commits:
commit 27353da6081bcd30fcb4131ae1a0ba75ed0e6905
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date: Fri Dec 27 21:19:59 2013 +0100
also set line properties to the internal properties
Change-Id: I385fc04853d2da33c2ee6c81833289f75c4176bb
diff --git a/chart2/source/view/main/DummyXShape.cxx b/chart2/source/view/main/DummyXShape.cxx
index 7e09cbc..2601a38 100644
--- a/chart2/source/view/main/DummyXShape.cxx
+++ b/chart2/source/view/main/DummyXShape.cxx
@@ -22,6 +22,7 @@
#include <vcl/window.hxx>
#include <tools/gen.hxx>
+#include <editeng/unoprnms.hxx>
#include <algorithm>
@@ -348,14 +349,49 @@ DummyCircle::DummyCircle(const awt::Point& rPos, const awt::Size& rSize)
setSize(rSize);
}
-DummyLine3D::DummyLine3D(const drawing::PolyPolygonShape3D& rPoints, const VLineProperties& ):
+namespace {
+
+void setProperties( const VLineProperties& rLineProperties, std::map<OUString, uno::Any>& rTargetProps )
+{
+ //Transparency
+ if(rLineProperties.Transparence.hasValue())
+ rTargetProps.insert(std::pair<OUString, uno::Any>(
+ UNO_NAME_LINETRANSPARENCE, rLineProperties.Transparence));
+
+ //LineStyle
+ if(rLineProperties.LineStyle.hasValue())
+ rTargetProps.insert(std::pair<OUString, uno::Any>(
+ UNO_NAME_LINESTYLE, rLineProperties.LineStyle));
+
+ //LineWidth
+ if(rLineProperties.Width.hasValue())
+ rTargetProps.insert(std::pair<OUString, uno::Any>(
+ UNO_NAME_LINEWIDTH, rLineProperties.Width));
+
+ //LineColor
+ if(rLineProperties.Color.hasValue())
+ rTargetProps.insert(std::pair<OUString, uno::Any>(
+ UNO_NAME_LINECOLOR, rLineProperties.Transparence));
+
+ //LineDashName
+ if(rLineProperties.DashName.hasValue())
+ rTargetProps.insert(std::pair<OUString, uno::Any>(
+ "LineDashName", rLineProperties.DashName));
+}
+
+}
+
+DummyLine3D::DummyLine3D(const drawing::PolyPolygonShape3D& rPoints, const VLineProperties& rLineProperties):
maPoints(rPoints)
{
+ setProperties(rLineProperties, maProperties);
}
-DummyLine2D::DummyLine2D(const drawing::PointSequenceSequence& rPoints, const VLineProperties* ):
+DummyLine2D::DummyLine2D(const drawing::PointSequenceSequence& rPoints, const VLineProperties* pLineProperties):
maPoints(rPoints)
{
+ if(pLineProperties)
+ setProperties(*pLineProperties, maProperties);
}
DummyLine2D::DummyLine2D(const awt::Size& rSize, const awt::Point& rPosition)
More information about the Libreoffice-commits
mailing list