Kaydet (Commit) 56aaa39f authored tarafından Kohei Yoshida's avatar Kohei Yoshida

Skeleton template class for GL3D bar chart type.

Still very much empty.  It needs to be filled with sub-categories.

Change-Id: Iad7ad34efb264025541b585a92ee2ea7b8fff56f
üst e3ec81a1
......@@ -154,6 +154,7 @@ $(eval $(call gb_Library_add_exception_objects,chartcore,\
chart2/source/model/template/DataInterpreter \
chart2/source/model/template/FilledNetChartType \
chart2/source/model/template/GL3DBarChartType \
chart2/source/model/template/GL3DBarChartTypeTemplate \
chart2/source/model/template/LineChartType \
chart2/source/model/template/LineChartTypeTemplate \
chart2/source/model/template/NetChartType \
......
......@@ -33,6 +33,7 @@
#include "StockChartTypeTemplate.hxx"
#include "NetChartTypeTemplate.hxx"
#include "BubbleChartTypeTemplate.hxx"
#include "GL3DBarChartTypeTemplate.hxx"
#include <cppuhelper/component_context.hxx>
#include <comphelper/InlineContainer.hxx>
#include <com/sun/star/container/XContentEnumerationAccess.hpp>
......@@ -121,6 +122,7 @@ enum TemplateId
TEMPLATE_STOCKVOLUMELOWHIGHCLOSE,
TEMPLATE_STOCKVOLUMEOPENLOWHIGHCLOSE,
TEMPLATE_BUBBLE,
TEMPLATE_GL3DBAR_ROUNDED_RECTANGLE,
// TEMPLATE_SURFACE,
// TEMPLATE_ADDIN,
TEMPLATE_NOT_FOUND = 0xffff
......@@ -196,6 +198,7 @@ const tTemplateMapType & lcl_DefaultChartTypeMap()
( "com.sun.star.chart2.template.StockVolumeLowHighClose", TEMPLATE_STOCKVOLUMELOWHIGHCLOSE )
( "com.sun.star.chart2.template.StockVolumeOpenLowHighClose", TEMPLATE_STOCKVOLUMEOPENLOWHIGHCLOSE )
( "com.sun.star.chart2.template.Bubble", TEMPLATE_BUBBLE )
( "com.sun.star.chart2.template.GL3DBarRoundedRectangle", TEMPLATE_GL3DBAR_ROUNDED_RECTANGLE )
// ( "com.sun.star.chart2.template.Surface", TEMPLATE_SURFACE )
// ( "com.sun.star.chart2.template.Addin", TEMPLATE_ADDIN )
);
......@@ -529,6 +532,10 @@ uno::Reference< uno::XInterface > SAL_CALL ChartTypeManager::createInstance(
xTemplate.set( new BubbleChartTypeTemplate( m_xContext, aServiceSpecifier ));
break;
case TEMPLATE_GL3DBAR_ROUNDED_RECTANGLE:
xTemplate.set(new GL3DBarChartTypeTemplate(m_xContext, aServiceSpecifier));
break;
// case TEMPLATE_SURFACE:
// case TEMPLATE_ADDIN:
// break;
......
/* -*- 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 "GL3DBarChartTypeTemplate.hxx"
using namespace com::sun::star;
namespace chart {
GL3DBarChartTypeTemplate::GL3DBarChartTypeTemplate(
const uno::Reference<uno::XComponentContext>& xContext, const OUString& rServiceName ) :
ChartTypeTemplate(xContext, rServiceName) {}
GL3DBarChartTypeTemplate::~GL3DBarChartTypeTemplate() {}
uno::Reference<chart2::XChartType> GL3DBarChartTypeTemplate::getChartTypeForIndex( sal_Int32 /*nChartTypeIndex*/ )
{
return uno::Reference<chart2::XChartType>();
}
uno::Reference<chart2::XChartType>
GL3DBarChartTypeTemplate::getChartTypeForNewSeries(
const uno::Sequence<uno::Reference<chart2::XChartType> >& /*xOldChartTypes*/ )
{
return uno::Reference<chart2::XChartType>();
}
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* -*- 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 CHART2_GL3DBARCHARTTYPETEMPLATE_HXX
#define CHART2_GL3DBARCHARTTYPETEMPLATE_HXX
#include <MutexContainer.hxx>
#include <ChartTypeTemplate.hxx>
#include <OPropertySet.hxx>
#include <ServiceMacros.hxx>
namespace chart {
class GL3DBarChartTypeTemplate : public ChartTypeTemplate
{
public:
GL3DBarChartTypeTemplate(
const css::uno::Reference<
css::uno::XComponentContext>& xContext,
const OUString& rServiceName );
virtual ~GL3DBarChartTypeTemplate();
virtual css::uno::Reference<css::chart2::XChartType> getChartTypeForIndex( sal_Int32 nChartTypeIndex );
// XChartTypeTemplate
virtual css::uno::Reference<css::chart2::XChartType> SAL_CALL
getChartTypeForNewSeries(
const css::uno::Sequence<css::uno::Reference<css::chart2::XChartType> >& xOldChartTypes );
};
}
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -112,7 +112,7 @@ DiagramHelper::tTemplateWithServiceName
Reference< XChartTypeTemplate > xTempl(
xChartTypeManager->createInstance( aServiceNames[ i ] ), uno::UNO_QUERY_THROW );
if( xTempl->matchesTemplate( xDiagram, sal_True ))
if (xTempl.is() && xTempl->matchesTemplate(xDiagram, true))
{
aResult.first = xTempl;
aResult.second = aServiceNames[ i ];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment