summaryrefslogtreecommitdiff
path: root/chart2
diff options
context:
space:
mode:
Diffstat (limited to 'chart2')
-rw-r--r--chart2/source/view/inc/ShapeFactory.hxx3
-rw-r--r--chart2/source/view/main/ShapeFactory.cxx14
2 files changed, 17 insertions, 0 deletions
diff --git a/chart2/source/view/inc/ShapeFactory.hxx b/chart2/source/view/inc/ShapeFactory.hxx
index f2699e5372f1..5b03509a3695 100644
--- a/chart2/source/view/inc/ShapeFactory.hxx
+++ b/chart2/source/view/inc/ShapeFactory.hxx
@@ -25,6 +25,7 @@
#include <com/sun/star/drawing/PointSequenceSequence.hpp>
#include <rtl/ustring.hxx>
+#include <svx/unodraw/SvxTableShape.hxx>
namespace chart { struct VLineProperties; }
namespace com::sun::star::beans { class XPropertySet; }
@@ -212,6 +213,8 @@ public:
const css::uno::Reference< css::beans::XPropertySet > & xTextProperties,
double nRotation, const OUString& aName, sal_Int32 nTextMaxWidth );
+ static rtl::Reference<SvxTableShape> createTable(css::uno::Reference< css::drawing::XShapes >& xTarget);
+
css::uno::Reference< css::drawing::XShape >
createInvisibleRectangle(
const css::uno::Reference< css::drawing::XShapes >& xTarget
diff --git a/chart2/source/view/main/ShapeFactory.cxx b/chart2/source/view/main/ShapeFactory.cxx
index a7011527dfc6..7c2574c5f407 100644
--- a/chart2/source/view/main/ShapeFactory.cxx
+++ b/chart2/source/view/main/ShapeFactory.cxx
@@ -2656,6 +2656,20 @@ void ShapeFactory::removeSubShapes( const uno::Reference< drawing::XShapes >& xS
}
}
+rtl::Reference<SvxTableShape> ShapeFactory::createTable(uno::Reference<drawing::XShapes>& xTarget)
+{
+ if (!xTarget.is())
+ return nullptr;
+
+ //create table shape
+ rtl::Reference<SvxTableShape> xShape = new SvxTableShape(nullptr);
+ xShape->setShapeKind(OBJ_TABLE);
+ uno::Reference<drawing::XShape> xShapeUno(xShape);
+ xTarget->add(xShapeUno);
+
+ return xShape;
+}
+
} //namespace chart
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */