diff options
author | Kohei Yoshida <kohei.yoshida@collabora.com> | 2014-03-24 22:20:02 -0400 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@collabora.com> | 2014-03-25 22:50:50 -0400 |
commit | 44fc32edcddc7f290e3e5162be9a80917c499ade (patch) | |
tree | b62bf9cf371d688d9f127b08df752dcf5deb95f6 /chart2/source/controller | |
parent | 05efb605b36ea340762ef1583b3aea6a6b5cdddb (diff) |
Properly import and export the new chart type to and from ODF.
Change-Id: I38e9813c6eb853dfb92b1537cea0b9ad97473b57
Diffstat (limited to 'chart2/source/controller')
3 files changed, 19 insertions, 2 deletions
diff --git a/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx b/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx index dea17aa52161..c7eb4ef3b6bd 100644 --- a/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx +++ b/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx @@ -91,6 +91,7 @@ enum eServiceType SERVICE_NAME_STOCK_DIAGRAM, SERVICE_NAME_XY_DIAGRAM, SERVICE_NAME_BUBBLE_DIAGRAM, + SERVICE_NAME_GL3DBAR_DIAGRAM, SERVICE_NAME_DASH_TABLE, SERVICE_NAME_GARDIENT_TABLE, @@ -121,6 +122,7 @@ tServiceNameMap & lcl_getStaticServiceNameMap() ( "com.sun.star.chart.StockDiagram", SERVICE_NAME_STOCK_DIAGRAM ) ( "com.sun.star.chart.XYDiagram", SERVICE_NAME_XY_DIAGRAM ) ( "com.sun.star.chart.BubbleDiagram", SERVICE_NAME_BUBBLE_DIAGRAM ) + ( "com.sun.star.chart.GL3DBarDiagram", SERVICE_NAME_GL3DBAR_DIAGRAM ) ( "com.sun.star.drawing.DashTable", SERVICE_NAME_DASH_TABLE ) ( "com.sun.star.drawing.GradientTable", SERVICE_NAME_GARDIENT_TABLE ) @@ -1263,6 +1265,15 @@ uno::Reference< uno::XInterface > SAL_CALL ChartDocumentWrapper::createInstance( bCreateDiagram = true; } break; + case SERVICE_NAME_GL3DBAR_DIAGRAM: + if( xManagerFact.is()) + { + xTemplate.set( + xManagerFact->createInstance("com.sun.star.chart2.template.GL3DBar"), + uno::UNO_QUERY ); + bCreateDiagram = true; + } + break; case SERVICE_NAME_DASH_TABLE: case SERVICE_NAME_GARDIENT_TABLE: diff --git a/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx b/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx index 1dc2dd19fda4..04670ad0f127 100644 --- a/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx +++ b/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx @@ -522,6 +522,9 @@ OUString lcl_getDiagramType( const OUString & rTemplateServiceName ) { const OUString aName( rTemplateServiceName.copy( aPrefix.getLength())); + if (aName.indexOf("GL3DBar") != -1) + return OUString("com.sun.star.chart.GL3DBarDiagram"); + // "Area" "StackedArea" "PercentStackedArea" "ThreeDArea" // "StackedThreeDArea" "PercentStackedThreeDArea" if( aName.indexOf( "Area" ) != -1 ) @@ -597,6 +600,7 @@ const tMakeStringStringMap& lcl_getChartTypeNameMap() ( "com.sun.star.chart2.NetChartType", "com.sun.star.chart.NetDiagram" ) ( "com.sun.star.chart2.CandleStickChartType", "com.sun.star.chart.StockDiagram" ) ( "com.sun.star.chart2.BubbleChartType", "com.sun.star.chart.BubbleDiagram" ) + ( "com.sun.star.chart2.GL3DBarChartType", "com.sun.star.chart.GL3DBarDiagram" ) ; return g_aChartTypeNameMap; } diff --git a/chart2/source/controller/dialogs/GL3DBarChartDialogController.cxx b/chart2/source/controller/dialogs/GL3DBarChartDialogController.cxx index 053cbe744660..1b3bfdc1be71 100644 --- a/chart2/source/controller/dialogs/GL3DBarChartDialogController.cxx +++ b/chart2/source/controller/dialogs/GL3DBarChartDialogController.cxx @@ -33,8 +33,10 @@ Image GL3DBarChartDialogController::getImage() const tTemplateServiceChartTypeParameterMap& GL3DBarChartDialogController::getTemplateMap() const { - static tTemplateServiceChartTypeParameterMap aMap( - "com.sun.star.chart2.template.GL3DBarRoundedRectangle", ChartTypeParameter(1)); + static tTemplateServiceChartTypeParameterMap aMap = + tTemplateServiceChartTypeParameterMap + ("com.sun.star.chart2.template.GL3DBar", ChartTypeParameter(1)) + ("com.sun.star.chart2.template.GL3DBarRoundedRectangle", ChartTypeParameter(2)); return aMap; } |