diff options
author | Kohei Yoshida <kohei.yoshida@collabora.com> | 2014-03-24 17:47:01 -0400 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@collabora.com> | 2014-03-25 22:50:50 -0400 |
commit | 05efb605b36ea340762ef1583b3aea6a6b5cdddb (patch) | |
tree | bda32d32b165bc566c4b0ab24b4d10da8d3c6cfd /chart2/source/model | |
parent | b7c3e851465638d4416ca8837937946353561088 (diff) |
Add a new skeleton plotter for the GL3D bar chart.
It plots absolutely nothing. It's just a place holder for now.
Change-Id: I6eb9cc23481391b83f6946a8b49a6176c5b29cd7
Diffstat (limited to 'chart2/source/model')
4 files changed, 35 insertions, 6 deletions
diff --git a/chart2/source/model/template/GL3DBarChartType.cxx b/chart2/source/model/template/GL3DBarChartType.cxx index 1dd889d4a8ba..033c38c4a2b4 100644 --- a/chart2/source/model/template/GL3DBarChartType.cxx +++ b/chart2/source/model/template/GL3DBarChartType.cxx @@ -15,7 +15,14 @@ using namespace com::sun::star; namespace chart { GL3DBarChartType::GL3DBarChartType( const uno::Reference<uno::XComponentContext>& xContext ) : - ChartType(xContext) {} + ChartType(xContext) +{ +} + +GL3DBarChartType::GL3DBarChartType( const GL3DBarChartType& rOther ) : + ChartType(rOther) +{ +} GL3DBarChartType::~GL3DBarChartType() {} @@ -30,9 +37,6 @@ uno::Sequence<OUString> GL3DBarChartType::getSupportedServiceNames_Static() return aServices; } -GL3DBarChartType::GL3DBarChartType( const GL3DBarChartType& rOther ) : - ChartType(rOther) {} - OUString SAL_CALL GL3DBarChartType::getChartType() throw (::com::sun::star::uno::RuntimeException, std::exception) { diff --git a/chart2/source/model/template/GL3DBarChartType.hxx b/chart2/source/model/template/GL3DBarChartType.hxx index 49510508bb3a..ee9d0ab69b50 100644 --- a/chart2/source/model/template/GL3DBarChartType.hxx +++ b/chart2/source/model/template/GL3DBarChartType.hxx @@ -22,7 +22,7 @@ namespace chart { class GL3DBarChartType : public ChartType { public: - GL3DBarChartType( const com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext>& xContext ); + GL3DBarChartType( const css::uno::Reference<css::uno::XComponentContext>& xContext ); virtual ~GL3DBarChartType(); APPHELPER_XSERVICEINFO_DECL() diff --git a/chart2/source/model/template/GL3DBarChartTypeTemplate.cxx b/chart2/source/model/template/GL3DBarChartTypeTemplate.cxx index 262828c2c8aa..e65c8f562c48 100644 --- a/chart2/source/model/template/GL3DBarChartTypeTemplate.cxx +++ b/chart2/source/model/template/GL3DBarChartTypeTemplate.cxx @@ -8,6 +8,8 @@ */ #include "GL3DBarChartTypeTemplate.hxx" +#include "GL3DBarChartType.hxx" + #include <servicenames_charttypes.hxx> #include <macros.hxx> @@ -15,6 +17,12 @@ using namespace com::sun::star; namespace chart { +namespace { + +const OUString aServiceName("com.sun.star.chart2.BubbleChartTypeTemplate"); + +} + GL3DBarChartTypeTemplate::GL3DBarChartTypeTemplate( const uno::Reference<uno::XComponentContext>& xContext, const OUString& rServiceName ) : ChartTypeTemplate(xContext, rServiceName) {} @@ -51,8 +59,13 @@ GL3DBarChartTypeTemplate::getChartTypeForNewSeries( uno::Reference<lang::XMultiServiceFactory> xFact( GetComponentContext()->getServiceManager(), uno::UNO_QUERY_THROW); +#if 1 + // I gave up trying to use UNO just to instantiate this little thing... + xResult.set(new GL3DBarChartType(GetComponentContext())); +#else + // This never works for me. xResult.set(xFact->createInstance(CHART2_SERVICE_NAME_CHARTTYPE_GL3DBAR), uno::UNO_QUERY_THROW); - +#endif ChartTypeTemplate::copyPropertiesFromOldToNewCoordianteSystem(xOldChartTypes, xResult); } catch (const uno::Exception & ex) @@ -68,6 +81,16 @@ sal_Bool GL3DBarChartTypeTemplate::supportsCategories() return false; } +uno::Sequence<OUString> GL3DBarChartTypeTemplate::getSupportedServiceNames_Static() +{ + uno::Sequence<OUString> aServices(2); + aServices[0] = aServiceName; + aServices[1] = "com.sun.star.chart2.ChartTypeTemplate"; + return aServices; +} + +APPHELPER_XSERVICEINFO_IMPL(GL3DBarChartTypeTemplate, aServiceName); + } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/chart2/source/model/template/GL3DBarChartTypeTemplate.hxx b/chart2/source/model/template/GL3DBarChartTypeTemplate.hxx index 47a7b06cf2d7..56aa2208f3cb 100644 --- a/chart2/source/model/template/GL3DBarChartTypeTemplate.hxx +++ b/chart2/source/model/template/GL3DBarChartTypeTemplate.hxx @@ -20,6 +20,8 @@ namespace chart { class GL3DBarChartTypeTemplate : public ChartTypeTemplate { public: + APPHELPER_XSERVICEINFO_DECL() + GL3DBarChartTypeTemplate( const css::uno::Reference< css::uno::XComponentContext>& xContext, |