[Libreoffice-commits] core.git: Branch 'feature/chart-opengl2' - chart2/source
Markus Mohrhard
markus.mohrhard at googlemail.com
Thu Jan 9 11:55:35 PST 2014
chart2/source/view/inc/AbstractShapeFactory.hxx | 2 +-
chart2/source/view/inc/DummyXShape.hxx | 15 +++++++++++++++
chart2/source/view/inc/OpenglShapeFactory.hxx | 2 +-
chart2/source/view/inc/ShapeFactory.hxx | 2 +-
chart2/source/view/main/DummyXShape.cxx | 10 ++++++++++
chart2/source/view/main/OpenglShapeFactory.cxx | 19 ++++++++++++-------
chart2/source/view/main/ShapeFactory.cxx | 2 +-
7 files changed, 41 insertions(+), 11 deletions(-)
New commits:
commit 0bd4386f1a865364a709c91c259b2a79b2d0a90b
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date: Thu Jan 9 20:54:15 2014 +0100
add inital code for formatted strings
Change-Id: Ib82ee310f0eb326aefbb2c499a0aedb399f5a635
diff --git a/chart2/source/view/inc/AbstractShapeFactory.hxx b/chart2/source/view/inc/AbstractShapeFactory.hxx
index 08c2a11..7efc30e 100644
--- a/chart2/source/view/inc/AbstractShapeFactory.hxx
+++ b/chart2/source/view/inc/AbstractShapeFactory.hxx
@@ -205,7 +205,7 @@ public:
createText( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes >& xTarget2D,
const com::sun::star::awt::Size& rSize,
const com::sun::star::awt::Point& rPosition,
- com::sun::star::uno::Sequence< com::sun::star::uno::Reference< com::sun::star::chart2::XFormattedString > > xFormattedString,
+ com::sun::star::uno::Sequence< com::sun::star::uno::Reference< com::sun::star::chart2::XFormattedString > >& xFormattedString,
const com::sun::star::uno::Reference<
com::sun::star::beans::XPropertySet > xTextProperties,
double nRotation, const OUString& aName ) = 0;
diff --git a/chart2/source/view/inc/DummyXShape.hxx b/chart2/source/view/inc/DummyXShape.hxx
index 71a8b20..91ec6d4 100644
--- a/chart2/source/view/inc/DummyXShape.hxx
+++ b/chart2/source/view/inc/DummyXShape.hxx
@@ -47,6 +47,7 @@
#include <com/sun/star/graphic/XGraphic.hpp>
#include <com/sun/star/drawing/HomogenMatrix.hpp>
#include <com/sun/star/drawing/PointSequenceSequence.hpp>
+#include <com/sun/star/chart2/XFormattedString.hpp>
#include "PropertyMapper.hxx"
#include "VLineProperties.hxx"
@@ -386,6 +387,20 @@ private:
uno::Any maTrans;
};
+class DummyFormattedText : public DummyXShape
+{
+public:
+ DummyFormattedText(uno::Sequence< uno::Reference<
+ chart2::XFormattedString > >& rFormattedString,
+ uno::Reference< beans::XPropertySet > xPropSet, double fRotation);
+
+private:
+ com::sun::star::uno::Sequence< com::sun::star::uno::Reference<
+ chart2::XFormattedString > > maFormattedString;
+
+ double mfRotation;
+};
+
class DummyXShapes : public DummyXShape, public com::sun::star::drawing::XShapes
{
diff --git a/chart2/source/view/inc/OpenglShapeFactory.hxx b/chart2/source/view/inc/OpenglShapeFactory.hxx
index 4f7c624..c7eb7a4 100644
--- a/chart2/source/view/inc/OpenglShapeFactory.hxx
+++ b/chart2/source/view/inc/OpenglShapeFactory.hxx
@@ -152,7 +152,7 @@ public:
createText( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes >& xTarget2D,
const com::sun::star::awt::Size& rSize,
const com::sun::star::awt::Point& rPosition,
- com::sun::star::uno::Sequence< com::sun::star::uno::Reference< com::sun::star::chart2::XFormattedString > > xFormattedString,
+ com::sun::star::uno::Sequence< com::sun::star::uno::Reference< com::sun::star::chart2::XFormattedString > >& xFormattedString,
const com::sun::star::uno::Reference<
com::sun::star::beans::XPropertySet > xTextProperties,
double nRotation, const OUString& aName );
diff --git a/chart2/source/view/inc/ShapeFactory.hxx b/chart2/source/view/inc/ShapeFactory.hxx
index 5c5dc22..259e923 100644
--- a/chart2/source/view/inc/ShapeFactory.hxx
+++ b/chart2/source/view/inc/ShapeFactory.hxx
@@ -164,7 +164,7 @@ public:
createText( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes >& xTarget2D,
const com::sun::star::awt::Size& rSize,
const com::sun::star::awt::Point& rPosition,
- com::sun::star::uno::Sequence< com::sun::star::uno::Reference< com::sun::star::chart2::XFormattedString > > xFormattedString,
+ com::sun::star::uno::Sequence< com::sun::star::uno::Reference< com::sun::star::chart2::XFormattedString > >& xFormattedString,
const com::sun::star::uno::Reference<
com::sun::star::beans::XPropertySet > xTextProperties,
double nRotation, const OUString& aName );
diff --git a/chart2/source/view/main/DummyXShape.cxx b/chart2/source/view/main/DummyXShape.cxx
index f17dc2a..2979189 100644
--- a/chart2/source/view/main/DummyXShape.cxx
+++ b/chart2/source/view/main/DummyXShape.cxx
@@ -624,6 +624,16 @@ void DummyText::render()
pChart->m_GLRender.RenderTextShape();
}
+DummyFormattedText::DummyFormattedText(uno::Sequence< uno::Reference<
+ chart2::XFormattedString > >& rFormattedString,
+ uno::Reference< beans::XPropertySet > , double fRotation):
+ maFormattedString(rFormattedString),
+ mfRotation(fRotation)
+{
+}
+
+
+
DummyGroup3D::DummyGroup3D(const OUString& rName)
{
setName(rName);
diff --git a/chart2/source/view/main/OpenglShapeFactory.cxx b/chart2/source/view/main/OpenglShapeFactory.cxx
index e5cd043..8bb327e 100644
--- a/chart2/source/view/main/OpenglShapeFactory.cxx
+++ b/chart2/source/view/main/OpenglShapeFactory.cxx
@@ -411,14 +411,19 @@ uno::Reference< drawing::XShape >
uno::Reference< drawing::XShape >
- OpenglShapeFactory::createText( const uno::Reference< drawing::XShapes >& ,
- const awt::Size& , const awt::Point& ,
- uno::Sequence< uno::Reference< chart2::XFormattedString > > ,
- const uno::Reference< beans::XPropertySet > ,
- double , const OUString& )
+ OpenglShapeFactory::createText( const uno::Reference< drawing::XShapes >& xTarget,
+ 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)
{
- // how the hell should we support that?
- return uno::Reference< drawing::XShape >();
+ dummy::DummyFormattedText* pText = new dummy::DummyFormattedText( rFormattedString,
+ xPropSet, fRotation );
+ pText->setPosition(rPos);
+ pText->setSize(rSize);
+ pText->setName(rName);
+ xTarget->add(pText);
+ return pText;
}
void OpenglShapeFactory::render(uno::Reference< drawing::XShapes > xRootShape)
diff --git a/chart2/source/view/main/ShapeFactory.cxx b/chart2/source/view/main/ShapeFactory.cxx
index 6a595e1..2c0c922 100644
--- a/chart2/source/view/main/ShapeFactory.cxx
+++ b/chart2/source/view/main/ShapeFactory.cxx
@@ -2127,7 +2127,7 @@ uno::Reference< drawing::XShape >
ShapeFactory::createText( const uno::Reference< drawing::XShapes >& xTarget,
const awt::Size& rSize,
const awt::Point& rPos,
- uno::Sequence< uno::Reference< chart2::XFormattedString > > xFormattedString,
+ uno::Sequence< uno::Reference< chart2::XFormattedString > >& xFormattedString,
const uno::Reference<
beans::XPropertySet > xTextProperties,
double nRotation, const OUString& aName )
More information about the Libreoffice-commits
mailing list