Initial skeleton class for the new chart type. Still very much empty.

Change-Id: I5e9eaeb9337d51f59f800f8e676b8bc83b80df70
This commit is contained in:
Kohei Yoshida
2014-03-20 16:30:25 -04:00
parent 003a27a14d
commit 349a5b72bf
4 changed files with 102 additions and 2 deletions

View File

@@ -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 \

View File

@@ -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: */

View File

@@ -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: */

View File

@@ -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: */