summaryrefslogtreecommitdiff
path: root/chart2
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2014-01-09 20:54:15 +0100
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2014-01-29 08:09:38 +0100
commitf85199ddea2649ebd5aaded9d6944cc019327ef8 (patch)
tree37a857887cbb7abc93823019487ef4d65aa032fe /chart2
parentd2bf85d10bd9dcdd6a0b9258527fe3b68d4a401f (diff)
add inital code for formatted strings
Change-Id: Ib82ee310f0eb326aefbb2c499a0aedb399f5a635
Diffstat (limited to 'chart2')
-rw-r--r--chart2/source/view/inc/AbstractShapeFactory.hxx2
-rw-r--r--chart2/source/view/inc/DummyXShape.hxx15
-rw-r--r--chart2/source/view/inc/OpenglShapeFactory.hxx2
-rw-r--r--chart2/source/view/inc/ShapeFactory.hxx2
-rw-r--r--chart2/source/view/main/DummyXShape.cxx10
-rw-r--r--chart2/source/view/main/OpenglShapeFactory.cxx19
-rw-r--r--chart2/source/view/main/ShapeFactory.cxx2
7 files changed, 41 insertions, 11 deletions
diff --git a/chart2/source/view/inc/AbstractShapeFactory.hxx b/chart2/source/view/inc/AbstractShapeFactory.hxx
index 078b6eeaf671..b875399991b0 100644
--- a/chart2/source/view/inc/AbstractShapeFactory.hxx
+++ b/chart2/source/view/inc/AbstractShapeFactory.hxx
@@ -206,7 +206,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 71a8b204b444..91ec6d42af51 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 c7188f5f6bc4..7b8331eab108 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 3eec724a6ff1..e8fb9ef70114 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 1c360af17245..dcfb4119517f 100644
--- a/chart2/source/view/main/DummyXShape.cxx
+++ b/chart2/source/view/main/DummyXShape.cxx
@@ -618,6 +618,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 92d8c955a340..ec9f3e9488db 100644
--- a/chart2/source/view/main/OpenglShapeFactory.cxx
+++ b/chart2/source/view/main/OpenglShapeFactory.cxx
@@ -413,14 +413,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 a040fd2894ee..2f7afb8a24f9 100644
--- a/chart2/source/view/main/ShapeFactory.cxx
+++ b/chart2/source/view/main/ShapeFactory.cxx
@@ -2136,7 +2136,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 )