diff options
author | Kohei Yoshida <kohei.yoshida@collabora.com> | 2014-03-20 16:30:25 -0400 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@collabora.com> | 2014-03-25 22:50:48 -0400 |
commit | 349a5b72bf2bc627a79967d61ff7dc07a4ac90b2 (patch) | |
tree | 44605d07ab186db8f64a4c0a9413fd655458510a /chart2 | |
parent | 003a27a14d5cf65fe0b528b6d6015e37a64dbb8e (diff) |
Initial skeleton class for the new chart type. Still very much empty.
Change-Id: I5e9eaeb9337d51f59f800f8e676b8bc83b80df70
Diffstat (limited to 'chart2')
-rw-r--r-- | chart2/Library_chartcore.mk | 1 | ||||
-rw-r--r-- | chart2/source/inc/servicenames_charttypes.hxx | 5 | ||||
-rw-r--r-- | chart2/source/model/template/GL3DBarChartType.cxx | 51 | ||||
-rw-r--r-- | chart2/source/model/template/GL3DBarChartType.hxx | 47 |
4 files changed, 102 insertions, 2 deletions
diff --git a/chart2/Library_chartcore.mk b/chart2/Library_chartcore.mk index de4c8886a539..2e09fe3c2463 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 321ba73e9c96..20f078cde57a 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 000000000000..1dd889d4a8ba --- /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 000000000000..49510508bb3a --- /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: */ |