summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--chart2/source/model/template/GL3DBarChartTypeTemplate.cxx12
-rw-r--r--chart2/source/model/template/_serviceregistration_charttypes.cxx9
2 files changed, 12 insertions, 9 deletions
diff --git a/chart2/source/model/template/GL3DBarChartTypeTemplate.cxx b/chart2/source/model/template/GL3DBarChartTypeTemplate.cxx
index 4440db517071..5f373bacbc6f 100644
--- a/chart2/source/model/template/GL3DBarChartTypeTemplate.cxx
+++ b/chart2/source/model/template/GL3DBarChartTypeTemplate.cxx
@@ -154,9 +154,9 @@ GL3DBarChartTypeTemplate::getChartTypeForNewSeries( const uno::Sequence<uno::Ref
try
{
-#if 1
- // I gave up trying to use UNO just to instantiate this little thing...
- xResult.set(new GL3DBarChartType(GetComponentContext()));
+ uno::Reference<lang::XMultiServiceFactory> xFact(
+ GetComponentContext()->getServiceManager(), uno::UNO_QUERY_THROW);
+ xResult.set(xFact->createInstance(CHART2_SERVICE_NAME_CHARTTYPE_GL3DBAR), uno::UNO_QUERY_THROW);
uno::Reference<beans::XPropertySet> xCTProp(xResult, uno::UNO_QUERY);
if (xCTProp.is())
{
@@ -164,12 +164,6 @@ GL3DBarChartTypeTemplate::getChartTypeForNewSeries( const uno::Sequence<uno::Ref
getFastPropertyValue(PROP_GL3DCHARTTYPE_ROUNDED_EDGE) >>= bVal;
xCTProp->setPropertyValue(CHART_UNONAME_ROUNDED_EDGE, uno::makeAny(bVal));
}
-#else
- // This never works for me.
- uno::Reference<lang::XMultiServiceFactory> xFact(
- GetComponentContext()->getServiceManager(), uno::UNO_QUERY_THROW);
- xResult.set(xFact->createInstance(CHART2_SERVICE_NAME_CHARTTYPE_GL3DBAR), uno::UNO_QUERY_THROW);
-#endif
}
catch (const uno::Exception & ex)
{
diff --git a/chart2/source/model/template/_serviceregistration_charttypes.cxx b/chart2/source/model/template/_serviceregistration_charttypes.cxx
index 299f1623136b..52b829b56f71 100644
--- a/chart2/source/model/template/_serviceregistration_charttypes.cxx
+++ b/chart2/source/model/template/_serviceregistration_charttypes.cxx
@@ -23,6 +23,7 @@
#include "BarChartType.hxx"
#include "CandleStickChartType.hxx"
#include "ColumnChartType.hxx"
+#include "GL3DBarChartType.hxx"
#include "LineChartType.hxx"
#include "NetChartType.hxx"
#include "FilledNetChartType.hxx"
@@ -114,6 +115,14 @@ static const struct ::cppu::ImplementationEntry g_entries_chart2_charttypes[] =
, 0
, 0
}
+ ,{
+ ::chart::GL3DBarChartType::create
+ , ::chart::GL3DBarChartType::getImplementationName_Static
+ , ::chart::GL3DBarChartType::getSupportedServiceNames_Static
+ , ::cppu::createSingleComponentFactory
+ , 0
+ , 0
+ }
,{ 0, 0, 0, 0, 0, 0 }
};