[Libreoffice-commits] core.git: Branch 'private/kohei/new-chart-type-skeleton' - chart2/Library_chartcore.mk chart2/source

Kohei Yoshida kohei.yoshida at collabora.com
Thu Mar 20 13:30:13 PDT 2014


 chart2/Library_chartcore.mk                       |    1 
 chart2/source/inc/servicenames_charttypes.hxx     |    5 +-
 chart2/source/model/template/GL3DBarChartType.cxx |   51 ++++++++++++++++++++++
 chart2/source/model/template/GL3DBarChartType.hxx |   47 ++++++++++++++++++++
 4 files changed, 102 insertions(+), 2 deletions(-)

New commits:
commit 36ba7000e840f6d144a995a01beafd10eee73ff1
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date:   Thu Mar 20 16:30:25 2014 -0400

    Initial skeleton class for the new chart type. Still very much empty.
    
    Change-Id: I5e9eaeb9337d51f59f800f8e676b8bc83b80df70

diff --git a/chart2/Library_chartcore.mk b/chart2/Library_chartcore.mk
index de4c888..2e09fe3 100644
--- a/chart2/Library_chartcore.mk
+++ b/chart2/Library_chartcore.mk
@@ -153,6 +153,7 @@ $(eval $(call gb_Library_add_exception_objects,chartcore,\
     chart2/source/model/template/ColumnLineDataInterpreter \
     chart2/source/model/template/DataInterpreter \
     chart2/source/model/template/FilledNetChartType \
+    chart2/source/model/template/GL3DBarChartType \
     chart2/source/model/template/LineChartType \
     chart2/source/model/template/LineChartTypeTemplate \
     chart2/source/model/template/NetChartType \
diff --git a/chart2/source/inc/servicenames_charttypes.hxx b/chart2/source/inc/servicenames_charttypes.hxx
index 321ba73..20f078c 100644
--- a/chart2/source/inc/servicenames_charttypes.hxx
+++ b/chart2/source/inc/servicenames_charttypes.hxx
@@ -19,8 +19,7 @@
 #ifndef INCLUDED_CHART2_SOURCE_INC_SERVICENAMES_CHARTTYPES_HXX
 #define INCLUDED_CHART2_SOURCE_INC_SERVICENAMES_CHARTTYPES_HXX
 
-namespace chart
-{
+namespace chart {
 
 #define CHART2_SERVICE_NAME_CHARTTYPE_AREA OUString( "com.sun.star.chart2.AreaChartType" )
 #define CHART2_SERVICE_NAME_CHARTTYPE_BAR OUString( "com.sun.star.chart2.BarChartType" )
@@ -32,8 +31,10 @@ namespace chart
 #define CHART2_SERVICE_NAME_CHARTTYPE_FILLED_NET OUString( "com.sun.star.chart2.FilledNetChartType" )
 #define CHART2_SERVICE_NAME_CHARTTYPE_CANDLESTICK OUString( "com.sun.star.chart2.CandleStickChartType" )
 #define CHART2_SERVICE_NAME_CHARTTYPE_BUBBLE OUString( "com.sun.star.chart2.BubbleChartType" )
+#define CHART2_SERVICE_NAME_CHARTTYPE_GL3DBAR OUString( "com.sun.star.chart2.GL3DBarChartType" )
 
 } //namespace chart
+
 #endif
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/model/template/GL3DBarChartType.cxx b/chart2/source/model/template/GL3DBarChartType.cxx
new file mode 100644
index 0000000..1dd889d
--- /dev/null
+++ b/chart2/source/model/template/GL3DBarChartType.cxx
@@ -0,0 +1,51 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include "GL3DBarChartType.hxx"
+#include <servicenames_charttypes.hxx>
+
+using namespace com::sun::star;
+
+namespace chart {
+
+GL3DBarChartType::GL3DBarChartType( const uno::Reference<uno::XComponentContext>& xContext ) :
+    ChartType(xContext) {}
+
+GL3DBarChartType::~GL3DBarChartType() {}
+
+APPHELPER_XSERVICEINFO_IMPL(
+    GL3DBarChartType, OUString("com.sun.star.comp.chart.GL3DBarChartType") );
+
+uno::Sequence<OUString> GL3DBarChartType::getSupportedServiceNames_Static()
+{
+    uno::Sequence<OUString> aServices(2);
+    aServices[0] = CHART2_SERVICE_NAME_CHARTTYPE_GL3DBAR;
+    aServices[1] = "com.sun.star.chart2.ChartType";
+    return aServices;
+}
+
+GL3DBarChartType::GL3DBarChartType( const GL3DBarChartType& rOther ) :
+    ChartType(rOther) {}
+
+OUString SAL_CALL GL3DBarChartType::getChartType()
+        throw (::com::sun::star::uno::RuntimeException, std::exception)
+{
+    return CHART2_SERVICE_NAME_CHARTTYPE_GL3DBAR;
+}
+
+com::sun::star::uno::Reference<com::sun::star::util::XCloneable>
+GL3DBarChartType::createClone()
+    throw (com::sun::star::uno::RuntimeException, std::exception)
+{
+    return uno::Reference<util::XCloneable>(new GL3DBarChartType(*this));
+}
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/model/template/GL3DBarChartType.hxx b/chart2/source/model/template/GL3DBarChartType.hxx
new file mode 100644
index 0000000..4951050
--- /dev/null
+++ b/chart2/source/model/template/GL3DBarChartType.hxx
@@ -0,0 +1,47 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef INCLUDED_CHART2_GL3DBARCHARTTYPE_HXX
+#define INCLUDED_CHART2_GL3DBARCHARTTYPE_HXX
+
+#include "ChartType.hxx"
+#include "ServiceMacros.hxx"
+
+namespace chart {
+
+/**
+ * Chart type that represents 3 dimensional data content in 3D space using
+ * OpenGL.
+ */
+class GL3DBarChartType : public ChartType
+{
+public:
+    GL3DBarChartType( const com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext>& xContext );
+    virtual ~GL3DBarChartType();
+
+    APPHELPER_XSERVICEINFO_DECL()
+
+    APPHELPER_SERVICE_FACTORY_HELPER( GL3DBarChartType )
+
+protected:
+    GL3DBarChartType( const GL3DBarChartType& rOther );
+
+    virtual OUString SAL_CALL getChartType()
+        throw (com::sun::star::uno::RuntimeException, std::exception);
+
+    virtual com::sun::star::uno::Reference<com::sun::star::util::XCloneable>
+        SAL_CALL createClone()
+            throw (com::sun::star::uno::RuntimeException, std::exception);
+};
+
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */


More information about the Libreoffice-commits mailing list