[Libreoffice-commits] core.git: 10 commits - chart2/Library_chartcontroller.mk chart2/Library_chartcore.mk chart2/source icon-themes/galaxy include/xmloff xmloff/source

Kohei Yoshida kohei.yoshida at collabora.com
Tue Mar 25 19:52:42 PDT 2014


 chart2/Library_chartcontroller.mk                                    |    1 
 chart2/Library_chartcore.mk                                          |    3 
 chart2/source/chartcore.component                                    |    4 
 chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx    |   11 +
 chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx          |    4 
 chart2/source/controller/chartapiwrapper/WrappedSplineProperties.cxx |    4 
 chart2/source/controller/dialogs/Bitmaps.hrc                         |   11 -
 chart2/source/controller/dialogs/Bitmaps.src                         |   11 +
 chart2/source/controller/dialogs/GL3DBarChartDialogController.cxx    |   54 +++++
 chart2/source/controller/dialogs/GL3DBarChartDialogController.hxx    |   34 +++
 chart2/source/controller/dialogs/Strings_ChartTypes.src              |    8 
 chart2/source/controller/dialogs/tp_ChartType.cxx                    |   11 +
 chart2/source/controller/dialogs/tp_ChartType.hxx                    |    1 
 chart2/source/inc/Strings.hrc                                        |    8 
 chart2/source/inc/macros.hxx                                         |    2 
 chart2/source/inc/servicenames_charttypes.hxx                        |    5 
 chart2/source/model/template/ChartTypeManager.cxx                    |   12 +
 chart2/source/model/template/ChartTypeTemplate.cxx                   |    1 
 chart2/source/model/template/ChartTypeTemplate.hxx                   |    4 
 chart2/source/model/template/GL3DBarChartType.cxx                    |   55 +++++
 chart2/source/model/template/GL3DBarChartType.hxx                    |   47 ++++
 chart2/source/model/template/GL3DBarChartTypeTemplate.cxx            |   96 ++++++++++
 chart2/source/model/template/GL3DBarChartTypeTemplate.hxx            |   47 ++++
 chart2/source/tools/DiagramHelper.cxx                                |    2 
 chart2/source/view/charttypes/AreaChart.cxx                          |    2 
 chart2/source/view/charttypes/GL3DBarChart.cxx                       |   29 +++
 chart2/source/view/charttypes/GL3DBarChart.hxx                       |   30 +++
 chart2/source/view/charttypes/VSeriesPlotter.cxx                     |   18 +
 chart2/source/view/main/PlotterBase.cxx                              |    6 
 icon-themes/galaxy/chart2/res/gl3dbar_roundrect.png                  |binary
 icon-themes/galaxy/chart2/res/typegl3dbar_16.png                     |binary
 include/xmloff/xmltoken.hxx                                          |    1 
 xmloff/source/chart/SchXMLTools.cxx                                  |    8 
 xmloff/source/chart/SchXMLTools.hxx                                  |    1 
 xmloff/source/core/xmltoken.cxx                                      |    1 
 35 files changed, 514 insertions(+), 18 deletions(-)

New commits:
commit 86090ef2fb4ea06f687d9e4474b8bdfda6eb6871
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date:   Tue Mar 25 22:50:02 2014 -0400

    Make the new OpenGL chart type a compile time option.
    
    And it's disabled for now.
    
    Change-Id: I9a513d757960b61e7b2d6009eabf97a75b6c453e

diff --git a/chart2/source/controller/dialogs/tp_ChartType.cxx b/chart2/source/controller/dialogs/tp_ChartType.cxx
index 0a10bae..3a880ec 100644
--- a/chart2/source/controller/dialogs/tp_ChartType.cxx
+++ b/chart2/source/controller/dialogs/tp_ChartType.cxx
@@ -727,7 +727,9 @@ ChartTypeTabPage::ChartTypeTabPage(Window* pParent
         m_aChartTypeDialogControllerList.push_back(new StockChartDialogController() );
     }
     m_aChartTypeDialogControllerList.push_back(new CombiColumnLineChartDialogController() );
+#if ENABLE_GL3D_BARCHART
     m_aChartTypeDialogControllerList.push_back(new GL3DBarChartDialogController());
+#endif
 
     ::std::vector< ChartTypeDialogController* >::const_iterator       aIter = m_aChartTypeDialogControllerList.begin();
     const ::std::vector< ChartTypeDialogController* >::const_iterator aEnd  = m_aChartTypeDialogControllerList.end();
diff --git a/chart2/source/inc/macros.hxx b/chart2/source/inc/macros.hxx
index daf66c4..21e5911 100644
--- a/chart2/source/inc/macros.hxx
+++ b/chart2/source/inc/macros.hxx
@@ -30,6 +30,8 @@
     typeid( ex ).name() << ", Message: " << \
     ex.Message )
 
+#define ENABLE_GL3D_BARCHART 0
+
 #endif
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit 44fc32edcddc7f290e3e5162be9a80917c499ade
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date:   Mon Mar 24 22:20:02 2014 -0400

    Properly import and export the new chart type to and from ODF.
    
    Change-Id: I38e9813c6eb853dfb92b1537cea0b9ad97473b57

diff --git a/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx b/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx
index dea17aa..c7eb4ef 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 1dc2dd1..04670ad 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 053cbe7..1b3bfdc 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;
 }
 
diff --git a/chart2/source/model/template/ChartTypeManager.cxx b/chart2/source/model/template/ChartTypeManager.cxx
index 49775f9..f6ebbee 100644
--- a/chart2/source/model/template/ChartTypeManager.cxx
+++ b/chart2/source/model/template/ChartTypeManager.cxx
@@ -122,6 +122,7 @@ enum TemplateId
     TEMPLATE_STOCKVOLUMELOWHIGHCLOSE,
     TEMPLATE_STOCKVOLUMEOPENLOWHIGHCLOSE,
     TEMPLATE_BUBBLE,
+    TEMPLATE_GL3DBAR,
     TEMPLATE_GL3DBAR_ROUNDED_RECTANGLE,
 //    TEMPLATE_SURFACE,
 //     TEMPLATE_ADDIN,
@@ -198,6 +199,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.GL3DBar",                        TEMPLATE_GL3DBAR )
         ( "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 )
@@ -532,6 +534,9 @@ uno::Reference< uno::XInterface > SAL_CALL ChartTypeManager::createInstance(
                 xTemplate.set( new BubbleChartTypeTemplate( m_xContext, aServiceSpecifier ));
                 break;
 
+            case TEMPLATE_GL3DBAR:
+                xTemplate.set(new GL3DBarChartTypeTemplate(m_xContext, aServiceSpecifier));
+                break;
             case TEMPLATE_GL3DBAR_ROUNDED_RECTANGLE:
                 xTemplate.set(new GL3DBarChartTypeTemplate(m_xContext, aServiceSpecifier));
                 break;
diff --git a/chart2/source/model/template/GL3DBarChartTypeTemplate.cxx b/chart2/source/model/template/GL3DBarChartTypeTemplate.cxx
index e65c8f5..c551111 100644
--- a/chart2/source/model/template/GL3DBarChartTypeTemplate.cxx
+++ b/chart2/source/model/template/GL3DBarChartTypeTemplate.cxx
@@ -19,7 +19,7 @@ namespace chart {
 
 namespace {
 
-const OUString aServiceName("com.sun.star.chart2.BubbleChartTypeTemplate");
+const OUString aServiceName("com.sun.star.chart2.GL3DBarChartTypeTemplate");
 
 }
 
diff --git a/include/xmloff/xmltoken.hxx b/include/xmloff/xmltoken.hxx
index 8935eb4..3a5996a 100644
--- a/include/xmloff/xmltoken.hxx
+++ b/include/xmloff/xmltoken.hxx
@@ -900,6 +900,7 @@ namespace xmloff { namespace token {
         XML_GCD,
         XML_GENERATOR,
         XML_GEQ,
+        XML_GL3DBAR,
         XML_GOURAUD,
         XML_GRADIENT,
         XML_GRADIENT_ANGLE,
diff --git a/xmloff/source/chart/SchXMLTools.cxx b/xmloff/source/chart/SchXMLTools.cxx
index b6fe296..06efa57 100644
--- a/xmloff/source/chart/SchXMLTools.cxx
+++ b/xmloff/source/chart/SchXMLTools.cxx
@@ -140,6 +140,7 @@ static const SvXMLEnumMapEntry aXMLChartClassMap[] =
     { XML_BAR,          XML_CHART_CLASS_BAR     },
     { XML_STOCK,        XML_CHART_CLASS_STOCK   },
     { XML_BUBBLE,       XML_CHART_CLASS_BUBBLE  },
+    { XML_GL3DBAR,      XML_CHART_CLASS_GL3DBAR },
     { XML_SURFACE,      XML_CHART_CLASS_BAR     }, //@todo change this if a surface chart is available
     { XML_ADD_IN,       XML_CHART_CLASS_ADDIN   },
     { XML_TOKEN_INVALID, XML_CHART_CLASS_UNKNOWN }
@@ -191,6 +192,9 @@ const tMakeStringStringMap& lcl_getChartTypeNameMap()
         ( OUString( "com.sun.star.chart.BubbleDiagram" )
         , OUString( "com.sun.star.chart2.BubbleChartType" ) )
 
+        ( OUString( "com.sun.star.chart.GL3DBarDiagram" )
+        , OUString( "com.sun.star.chart2.GL3DBarChartType" ) )
+
         ;
     return g_aChartTypeNameMap;
 }
@@ -268,6 +272,8 @@ OUString GetChartTypeByClassName(
         else
             aResultBuffer.append("Column");
     }
+    else if (IsXMLToken(rClassName, XML_GL3DBAR))
+        aResultBuffer.append("GL3DBar");
     else
         bInternalType = false;
 
@@ -333,6 +339,8 @@ XMLTokenEnum getTokenByChartType(
             else if( (bUseOldNames && aServiceName == "Stock") ||
                      (!bUseOldNames && aServiceName == "CandleStick"))
                 eResult = XML_STOCK;
+            else if (aServiceName == "GL3DBar")
+                eResult = XML_GL3DBAR;
         }
     }
 
diff --git a/xmloff/source/chart/SchXMLTools.hxx b/xmloff/source/chart/SchXMLTools.hxx
index 9c18303..0b6f49a 100644
--- a/xmloff/source/chart/SchXMLTools.hxx
+++ b/xmloff/source/chart/SchXMLTools.hxx
@@ -63,6 +63,7 @@ namespace SchXMLTools
         XML_CHART_CLASS_BAR,
         XML_CHART_CLASS_STOCK,
         XML_CHART_CLASS_BUBBLE,
+        XML_CHART_CLASS_GL3DBAR,
         XML_CHART_CLASS_ADDIN,
         XML_CHART_CLASS_UNKNOWN
     };
diff --git a/xmloff/source/core/xmltoken.cxx b/xmloff/source/core/xmltoken.cxx
index cedae88..e013431 100644
--- a/xmloff/source/core/xmltoken.cxx
+++ b/xmloff/source/core/xmltoken.cxx
@@ -904,6 +904,7 @@ namespace xmloff { namespace token {
         TOKEN( "gcd",                             XML_GCD ),
         TOKEN( "generator",                       XML_GENERATOR ),
         TOKEN( "geq",                             XML_GEQ ),
+        TOKEN( "gl3d-bar",                        XML_GL3DBAR ),
         TOKEN( "gouraud",                         XML_GOURAUD ),
         TOKEN( "gradient",                        XML_GRADIENT ),
         TOKEN( "angle",                           XML_GRADIENT_ANGLE ),
commit 05efb605b36ea340762ef1583b3aea6a6b5cdddb
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date:   Mon Mar 24 17:47:01 2014 -0400

    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

diff --git a/chart2/Library_chartcore.mk b/chart2/Library_chartcore.mk
index 63171f4..6dafd71 100644
--- a/chart2/Library_chartcore.mk
+++ b/chart2/Library_chartcore.mk
@@ -87,6 +87,7 @@ $(eval $(call gb_Library_add_exception_objects,chartcore,\
     chart2/source/view/charttypes/BubbleChart \
     chart2/source/view/charttypes/CandleStickChart \
     chart2/source/view/charttypes/CategoryPositionHelper \
+    chart2/source/view/charttypes/GL3DBarChart \
     chart2/source/view/charttypes/NetChart \
     chart2/source/view/charttypes/PieChart \
     chart2/source/view/charttypes/Splines \
diff --git a/chart2/source/chartcore.component b/chart2/source/chartcore.component
index 5df1a18..4029670 100644
--- a/chart2/source/chartcore.component
+++ b/chart2/source/chartcore.component
@@ -101,6 +101,10 @@
     <service name="com.sun.star.chart2.BubbleChartType"/>
     <service name="com.sun.star.chart2.ChartType"/>
   </implementation>
+  <implementation name="com.sun.star.comp.chart.GL3DBarChartType">
+    <service name="com.sun.star.chart2.GL3DBarChartType"/>
+    <service name="com.sun.star.chart2.ChartType"/>
+  </implementation>
   <implementation name="com.sun.star.comp.chart.CandleStickChartType">
     <service name="com.sun.star.beans.PropertySet"/>
     <service name="com.sun.star.chart2.CandleStickChartType"/>
diff --git a/chart2/source/model/template/GL3DBarChartType.cxx b/chart2/source/model/template/GL3DBarChartType.cxx
index 1dd889d..033c38c 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 4951050..ee9d0ab 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 262828c..e65c8f5 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 47a7b06..56aa220 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,
diff --git a/chart2/source/view/charttypes/AreaChart.cxx b/chart2/source/view/charttypes/AreaChart.cxx
index 2443e20..2cc53b6 100644
--- a/chart2/source/view/charttypes/AreaChart.cxx
+++ b/chart2/source/view/charttypes/AreaChart.cxx
@@ -136,7 +136,7 @@ drawing::Direction3D AreaChart::getPreferredDiagramAspectRatio() const
     drawing::Direction3D aRet(1,-1,1);
     if( m_nDimension == 2 )
         aRet = drawing::Direction3D(-1,-1,-1);
-    else
+    else if (m_pPosHelper)
     {
         drawing::Direction3D aScale( m_pPosHelper->getScaledLogicWidth() );
         aRet.DirectionZ = aScale.DirectionZ*0.2;
diff --git a/chart2/source/view/charttypes/GL3DBarChart.cxx b/chart2/source/view/charttypes/GL3DBarChart.cxx
new file mode 100644
index 0000000..bd0250b
--- /dev/null
+++ b/chart2/source/view/charttypes/GL3DBarChart.cxx
@@ -0,0 +1,29 @@
+/* -*- 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 "GL3DBarChart.hxx"
+
+namespace chart {
+
+GL3DBarChart::GL3DBarChart( const css::uno::Reference<css::chart2::XChartType>& xChartTypeModel ) :
+    VSeriesPlotter(xChartTypeModel, 3, false)
+{
+}
+
+GL3DBarChart::~GL3DBarChart()
+{
+}
+
+void GL3DBarChart::createShapes()
+{
+}
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/view/charttypes/GL3DBarChart.hxx b/chart2/source/view/charttypes/GL3DBarChart.hxx
new file mode 100644
index 0000000..d5ecf77
--- /dev/null
+++ b/chart2/source/view/charttypes/GL3DBarChart.hxx
@@ -0,0 +1,30 @@
+/* -*- 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_GL3DBARCHART_HXX
+#define CHART2_GL3DBARCHART_HXX
+
+#include <VSeriesPlotter.hxx>
+
+namespace chart {
+
+class GL3DBarChart : public VSeriesPlotter
+{
+public:
+    GL3DBarChart( const css::uno::Reference<css::chart2::XChartType>& xChartTypeModel );
+    virtual ~GL3DBarChart();
+
+    virtual void createShapes();
+};
+
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/view/charttypes/VSeriesPlotter.cxx b/chart2/source/view/charttypes/VSeriesPlotter.cxx
index 5202cc1..79e1e28 100644
--- a/chart2/source/view/charttypes/VSeriesPlotter.cxx
+++ b/chart2/source/view/charttypes/VSeriesPlotter.cxx
@@ -51,7 +51,7 @@
 #include "CandleStickChart.hxx"
 #include "BubbleChart.hxx"
 #include "NetChart.hxx"
-
+#include "GL3DBarChart.hxx"
 
 #include <com/sun/star/chart/ErrorBarStyle.hpp>
 #include <com/sun/star/chart/TimeUnit.hpp>
@@ -250,6 +250,9 @@ void VSeriesPlotter::addSeries( VDataSeries* pSeries, sal_Int32 zSlot, sal_Int32
 drawing::Direction3D VSeriesPlotter::getPreferredDiagramAspectRatio() const
 {
     drawing::Direction3D aRet(1.0,1.0,1.0);
+    if (!m_pPosHelper)
+        return aRet;
+
     drawing::Direction3D aScale( m_pPosHelper->getScaledLogicWidth() );
     aRet.DirectionZ = aScale.DirectionZ*0.2;
     if(aRet.DirectionZ>1.0)
@@ -803,6 +806,9 @@ void VSeriesPlotter::createErrorBar(
         if(nErrorBarStyle==::com::sun::star::chart::ErrorBarStyle::NONE)
             return;
 
+        if (!m_pPosHelper)
+            return;
+
         drawing::Position3D aUnscaledLogicPosition(rUnscaledLogicPosition);
         if(nErrorBarStyle==::com::sun::star::chart::ErrorBarStyle::STANDARD_DEVIATION)
         {
@@ -967,6 +973,9 @@ void VSeriesPlotter::createRegressionCurvesShapes( VDataSeries& rVDataSeries,
     if(!xContainer.is())
         return;
 
+    if (!m_pPosHelper)
+        return;
+
     uno::Sequence< uno::Reference< XRegressionCurve > > aCurveList = xContainer->getRegressionCurves();
 
     for(sal_Int32 nN=0; nN<aCurveList.getLength(); nN++)
@@ -1882,7 +1891,7 @@ PlottingPositionHelper& VSeriesPlotter::getPlottingPositionHelper( sal_Int32 nAx
         {
             pRet = aPosIt->second;
         }
-        else
+        else if (m_pPosHelper)
         {
             tSecondaryValueScales::const_iterator aScaleIt = m_aSecondaryValueScales.find( nAxisIndex );
             if( aScaleIt != m_aSecondaryValueScales.end() )
@@ -2434,6 +2443,8 @@ VSeriesPlotter* VSeriesPlotter::createSeriesPlotter(
         pRet = new AreaChart(xChartTypeModel,nDimensionCount,false,true);
     else if( aChartType.equalsIgnoreAsciiCase(CHART2_SERVICE_NAME_CHARTTYPE_BUBBLE) )
         pRet = new BubbleChart(xChartTypeModel,nDimensionCount);
+    else if (aChartType.equalsIgnoreAsciiCase(CHART2_SERVICE_NAME_CHARTTYPE_GL3DBAR))
+        pRet = new GL3DBarChart(xChartTypeModel);
     else if( aChartType.equalsIgnoreAsciiCase(CHART2_SERVICE_NAME_CHARTTYPE_PIE) )
         pRet = new PieChart(xChartTypeModel,nDimensionCount, bExcludingPositioning );
     else if( aChartType.equalsIgnoreAsciiCase(CHART2_SERVICE_NAME_CHARTTYPE_NET) )
diff --git a/chart2/source/view/main/PlotterBase.cxx b/chart2/source/view/main/PlotterBase.cxx
index f38b570..c273899 100644
--- a/chart2/source/view/main/PlotterBase.cxx
+++ b/chart2/source/view/main/PlotterBase.cxx
@@ -60,12 +60,18 @@ PlotterBase::~PlotterBase()
 
 void PlotterBase::setScales( const std::vector< ExplicitScaleData >& rScales, bool bSwapXAndYAxis )
 {
+    if (!m_pPosHelper)
+        return;
+
     OSL_PRECOND(m_nDimension<=static_cast<sal_Int32>(rScales.size()),"Dimension of Plotter does not fit two dimension of given scale sequence");
     m_pPosHelper->setScales( rScales, bSwapXAndYAxis );
 }
 
 void PlotterBase::setTransformationSceneToScreen( const drawing::HomogenMatrix& rMatrix)
 {
+    if (!m_pPosHelper)
+        return;
+
     OSL_PRECOND(m_nDimension==2,"Set this transformation only in case of 2D");
     if(m_nDimension!=2)
         return;
commit b7c3e851465638d4416ca8837937946353561088
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date:   Mon Mar 24 11:54:58 2014 -0400

    Turn this into a regular method.
    
    Change-Id: Idb4dc17971cd37a4cdf99b2c02e61fca14cb3ce2

diff --git a/chart2/source/controller/dialogs/tp_ChartType.cxx b/chart2/source/controller/dialogs/tp_ChartType.cxx
index e4141a8..0a10bae 100644
--- a/chart2/source/controller/dialogs/tp_ChartType.cxx
+++ b/chart2/source/controller/dialogs/tp_ChartType.cxx
@@ -829,6 +829,12 @@ IMPL_LINK_NOARG(ChartTypeTabPage, SelectSubTypeHdl)
 
 IMPL_LINK_NOARG(ChartTypeTabPage, SelectMainTypeHdl)
 {
+    selectMainType();
+    return 0;
+}
+
+void ChartTypeTabPage::selectMainType()
+{
     ChartTypeParameter aParameter( this->getCurrentParamter() );
 
     if( m_pCurrentMainType )
@@ -855,7 +861,6 @@ IMPL_LINK_NOARG(ChartTypeTabPage, SelectMainTypeHdl)
         uno::Reference< beans::XPropertySet > xTemplateProps( this->getCurrentTemplate(), uno::UNO_QUERY );
         m_pCurrentMainType->fillExtraControls(aParameter,m_xChartModel,xTemplateProps);
     }
-    return 0;
 }
 
 void ChartTypeTabPage::showAllControls( ChartTypeDialogController& rTypeController )
diff --git a/chart2/source/controller/dialogs/tp_ChartType.hxx b/chart2/source/controller/dialogs/tp_ChartType.hxx
index 21ea308..ea46e2bb 100644
--- a/chart2/source/controller/dialogs/tp_ChartType.hxx
+++ b/chart2/source/controller/dialogs/tp_ChartType.hxx
@@ -72,6 +72,7 @@ protected:
     virtual void stateChanged( ChangingResource* pResource );
 
     void commitToModel( const ChartTypeParameter& rParameter );
+    void selectMainType();
 
     DECL_LINK( SelectMainTypeHdl, void* );
     DECL_LINK( SelectSubTypeHdl, void* );
commit 45c98588d0f67ee306b89e8666e53d05a9834e09
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date:   Mon Mar 24 11:37:37 2014 -0400

    Crash prevention by checking for NULL.
    
    Change-Id: I10a0c2dcee123b884c563c3e6f83e218747e792a

diff --git a/chart2/source/controller/chartapiwrapper/WrappedSplineProperties.cxx b/chart2/source/controller/chartapiwrapper/WrappedSplineProperties.cxx
index 498bd26..13a7560 100644
--- a/chart2/source/controller/chartapiwrapper/WrappedSplineProperties.cxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedSplineProperties.cxx
@@ -63,7 +63,9 @@ public:
         {
             try
             {
-                ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xChartTypePropertySet( aChartTypes[nN], ::com::sun::star::uno::UNO_QUERY );
+                uno::Reference<beans::XPropertySet> xChartTypePropertySet(aChartTypes[nN], uno::UNO_QUERY);
+                if (!xChartTypePropertySet.is())
+                    continue;
 
                 Any aSingleValue = this->convertInnerToOuterValue( xChartTypePropertySet->getPropertyValue(m_aOwnInnerName) );
                 PROPERTYTYPE aCurValue = PROPERTYTYPE();
commit be1152e0cc8286eaff05274c71843c3457948393
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date:   Fri Mar 21 16:21:58 2014 -0400

    List child type for GL3D bar chart type.
    
    For now there is only one child type.
    
    Change-Id: If39a3e75fdae62f0b20769c21e6a4e235ede941e

diff --git a/chart2/source/controller/dialogs/Bitmaps.hrc b/chart2/source/controller/dialogs/Bitmaps.hrc
index b5fc1e7..643ed3d 100644
--- a/chart2/source/controller/dialogs/Bitmaps.hrc
+++ b/chart2/source/controller/dialogs/Bitmaps.hrc
@@ -199,6 +199,8 @@
 // Bubble Chart Subtypes
 #define BMP_BUBBLE_1            (RID_APP_START + 88)
 
+// GL3D Bar Chart subtypes.
+#define BMP_GL3D_BAR_ROUNDRECT  (RID_APP_START + 106)
 
 //further Images:
 
diff --git a/chart2/source/controller/dialogs/Bitmaps.src b/chart2/source/controller/dialogs/Bitmaps.src
index c088844..49bd2f8 100644
--- a/chart2/source/controller/dialogs/Bitmaps.src
+++ b/chart2/source/controller/dialogs/Bitmaps.src
@@ -97,6 +97,12 @@ Bitmap BMP_BUBBLE_1
 {
     File = "bubble_52x60.png" ;
 };
+
+Bitmap BMP_GL3D_BAR_ROUNDRECT
+{
+    File = "gl3dbar_roundrect.png";
+};
+
 Bitmap BMP_AREAS_2D
 {
     File = "areas_52x60.png" ;
diff --git a/chart2/source/controller/dialogs/GL3DBarChartDialogController.cxx b/chart2/source/controller/dialogs/GL3DBarChartDialogController.cxx
index 907c8f4..053cbe7 100644
--- a/chart2/source/controller/dialogs/GL3DBarChartDialogController.cxx
+++ b/chart2/source/controller/dialogs/GL3DBarChartDialogController.cxx
@@ -12,6 +12,8 @@
 #include <Bitmaps.hrc>
 #include <ResId.hxx>
 
+#include <svtools/valueset.hxx>
+
 namespace chart {
 
 GL3DBarChartDialogController::GL3DBarChartDialogController() {}
@@ -36,6 +38,15 @@ GL3DBarChartDialogController::getTemplateMap() const
     return aMap;
 }
 
+void GL3DBarChartDialogController::fillSubTypeList(
+    ValueSet& rSubTypeList, const ChartTypeParameter& /*rParameter*/ )
+{
+    rSubTypeList.Clear();
+    rSubTypeList.InsertItem(1, Image(Bitmap(SchResId(BMP_GL3D_BAR_ROUNDRECT))));
+
+    rSubTypeList.SetItemText(1, SchResId(STR_GL3D_BAR).toString());
+}
+
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/dialogs/GL3DBarChartDialogController.hxx b/chart2/source/controller/dialogs/GL3DBarChartDialogController.hxx
index 72aac01..e2f31e2 100644
--- a/chart2/source/controller/dialogs/GL3DBarChartDialogController.hxx
+++ b/chart2/source/controller/dialogs/GL3DBarChartDialogController.hxx
@@ -23,6 +23,8 @@ public:
     virtual OUString getName();
     virtual Image getImage();
     virtual const tTemplateServiceChartTypeParameterMap& getTemplateMap() const;
+
+    virtual void fillSubTypeList( ValueSet& rSubTypeList, const ChartTypeParameter& rParameter );
 };
 
 }
diff --git a/chart2/source/controller/dialogs/Strings_ChartTypes.src b/chart2/source/controller/dialogs/Strings_ChartTypes.src
index 3ece3a3..8871780 100644
--- a/chart2/source/controller/dialogs/Strings_ChartTypes.src
+++ b/chart2/source/controller/dialogs/Strings_ChartTypes.src
@@ -144,7 +144,12 @@ String STR_BUBBLE_1
 
 String STR_TYPE_GL3D_BAR
 {
-    Text [ en-US ] = "GL 3D Bar";
+    Text [ en-US ] = "GL3D Bar";
+};
+
+String STR_GL3D_BAR
+{
+    Text [ en-US ] = "GL3D Bar Chart";
 };
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/inc/Strings.hrc b/chart2/source/inc/Strings.hrc
index f102f40..59de25d 100644
--- a/chart2/source/inc/Strings.hrc
+++ b/chart2/source/inc/Strings.hrc
@@ -65,6 +65,7 @@
 #define STR_BUBBLE_1                        (RID_APP_START + 283)
 
 #define STR_TYPE_GL3D_BAR                   (RID_APP_START + 127)
+#define STR_GL3D_BAR                        (RID_APP_START + 128)
 
 //additional strings
 #define STR_TEXT_SEPARATOR                  (RID_APP_START + 20)
diff --git a/chart2/source/model/template/ChartTypeTemplate.cxx b/chart2/source/model/template/ChartTypeTemplate.cxx
index 748d40d..6cc13bc 100644
--- a/chart2/source/model/template/ChartTypeTemplate.cxx
+++ b/chart2/source/model/template/ChartTypeTemplate.cxx
@@ -179,7 +179,6 @@ uno::Reference< XDiagram > SAL_CALL ChartTypeTemplate::createDiagramByDataSource
 }
 
 sal_Bool SAL_CALL ChartTypeTemplate::supportsCategories()
-    throw (uno::RuntimeException, std::exception)
 {
     return sal_True;
 }
diff --git a/chart2/source/model/template/ChartTypeTemplate.hxx b/chart2/source/model/template/ChartTypeTemplate.hxx
index 19278a2..5f551b0 100644
--- a/chart2/source/model/template/ChartTypeTemplate.hxx
+++ b/chart2/source/model/template/ChartTypeTemplate.hxx
@@ -92,8 +92,8 @@ protected:
         const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aArguments )
         throw (::com::sun::star::uno::RuntimeException, std::exception);
     /// denotes if the chart needs categories at the first scale
-    virtual sal_Bool SAL_CALL supportsCategories()
-        throw (::com::sun::star::uno::RuntimeException, std::exception);
+    virtual sal_Bool SAL_CALL supportsCategories();
+
     virtual void SAL_CALL changeDiagram(
         const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XDiagram >& xDiagram )
         throw (::com::sun::star::uno::RuntimeException, std::exception);
diff --git a/chart2/source/model/template/GL3DBarChartTypeTemplate.cxx b/chart2/source/model/template/GL3DBarChartTypeTemplate.cxx
index 306481e..262828c 100644
--- a/chart2/source/model/template/GL3DBarChartTypeTemplate.cxx
+++ b/chart2/source/model/template/GL3DBarChartTypeTemplate.cxx
@@ -8,6 +8,8 @@
  */
 
 #include "GL3DBarChartTypeTemplate.hxx"
+#include <servicenames_charttypes.hxx>
+#include <macros.hxx>
 
 using namespace com::sun::star;
 
@@ -21,14 +23,49 @@ GL3DBarChartTypeTemplate::~GL3DBarChartTypeTemplate() {}
 
 uno::Reference<chart2::XChartType> GL3DBarChartTypeTemplate::getChartTypeForIndex( sal_Int32 /*nChartTypeIndex*/ )
 {
-    return uno::Reference<chart2::XChartType>();
+    uno::Reference<chart2::XChartType> xResult;
+
+    try
+    {
+        uno::Reference<lang::XMultiServiceFactory> xFact(
+            GetComponentContext()->getServiceManager(), uno::UNO_QUERY_THROW);
+
+        xResult.set(xFact->createInstance(CHART2_SERVICE_NAME_CHARTTYPE_GL3DBAR), uno::UNO_QUERY_THROW);
+    }
+    catch (const uno::Exception & ex)
+    {
+        ASSERT_EXCEPTION( ex );
+    }
+
+    return xResult;
 }
 
 uno::Reference<chart2::XChartType>
 GL3DBarChartTypeTemplate::getChartTypeForNewSeries(
-    const uno::Sequence<uno::Reference<chart2::XChartType> >& /*xOldChartTypes*/ )
+    const uno::Sequence<uno::Reference<chart2::XChartType> >& xOldChartTypes )
+{
+    uno::Reference<chart2::XChartType> xResult;
+
+    try
+    {
+        uno::Reference<lang::XMultiServiceFactory> xFact(
+            GetComponentContext()->getServiceManager(), uno::UNO_QUERY_THROW);
+
+        xResult.set(xFact->createInstance(CHART2_SERVICE_NAME_CHARTTYPE_GL3DBAR), uno::UNO_QUERY_THROW);
+
+        ChartTypeTemplate::copyPropertiesFromOldToNewCoordianteSystem(xOldChartTypes, xResult);
+    }
+    catch (const uno::Exception & ex)
+    {
+        ASSERT_EXCEPTION( ex );
+    }
+
+    return xResult;
+}
+
+sal_Bool GL3DBarChartTypeTemplate::supportsCategories()
 {
-    return uno::Reference<chart2::XChartType>();
+    return false;
 }
 
 }
diff --git a/chart2/source/model/template/GL3DBarChartTypeTemplate.hxx b/chart2/source/model/template/GL3DBarChartTypeTemplate.hxx
index 2574329..47a7b06 100644
--- a/chart2/source/model/template/GL3DBarChartTypeTemplate.hxx
+++ b/chart2/source/model/template/GL3DBarChartTypeTemplate.hxx
@@ -34,6 +34,8 @@ public:
     virtual css::uno::Reference<css::chart2::XChartType> SAL_CALL
         getChartTypeForNewSeries(
             const css::uno::Sequence<css::uno::Reference<css::chart2::XChartType> >& xOldChartTypes );
+
+    virtual sal_Bool SAL_CALL supportsCategories();
 };
 
 }
diff --git a/chart2/source/view/charttypes/VSeriesPlotter.cxx b/chart2/source/view/charttypes/VSeriesPlotter.cxx
index 944b31a..5202cc1 100644
--- a/chart2/source/view/charttypes/VSeriesPlotter.cxx
+++ b/chart2/source/view/charttypes/VSeriesPlotter.cxx
@@ -2416,6 +2416,9 @@ VSeriesPlotter* VSeriesPlotter::createSeriesPlotter(
     , sal_Int32 nDimensionCount
     , bool bExcludingPositioning )
 {
+    if (!xChartTypeModel.is())
+        return NULL;
+
     OUString aChartType = xChartTypeModel->getChartType();
 
     VSeriesPlotter* pRet=NULL;
diff --git a/icon-themes/galaxy/chart2/res/gl3dbar_roundrect.png b/icon-themes/galaxy/chart2/res/gl3dbar_roundrect.png
new file mode 100644
index 0000000..729bd3e
Binary files /dev/null and b/icon-themes/galaxy/chart2/res/gl3dbar_roundrect.png differ
commit 56aaa39ff83962286fb7b627d847914f8144b750
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date:   Fri Mar 21 10:55:06 2014 -0400

    Skeleton template class for GL3D bar chart type.
    
    Still very much empty.  It needs to be filled with sub-categories.
    
    Change-Id: Iad7ad34efb264025541b585a92ee2ea7b8fff56f

diff --git a/chart2/Library_chartcore.mk b/chart2/Library_chartcore.mk
index 2e09fe3..63171f4 100644
--- a/chart2/Library_chartcore.mk
+++ b/chart2/Library_chartcore.mk
@@ -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 \
diff --git a/chart2/source/model/template/ChartTypeManager.cxx b/chart2/source/model/template/ChartTypeManager.cxx
index e68744c..49775f9 100644
--- a/chart2/source/model/template/ChartTypeManager.cxx
+++ b/chart2/source/model/template/ChartTypeManager.cxx
@@ -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;
diff --git a/chart2/source/model/template/GL3DBarChartTypeTemplate.cxx b/chart2/source/model/template/GL3DBarChartTypeTemplate.cxx
new file mode 100644
index 0000000..306481e
--- /dev/null
+++ b/chart2/source/model/template/GL3DBarChartTypeTemplate.cxx
@@ -0,0 +1,36 @@
+/* -*- 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: */
diff --git a/chart2/source/model/template/GL3DBarChartTypeTemplate.hxx b/chart2/source/model/template/GL3DBarChartTypeTemplate.hxx
new file mode 100644
index 0000000..2574329
--- /dev/null
+++ b/chart2/source/model/template/GL3DBarChartTypeTemplate.hxx
@@ -0,0 +1,43 @@
+/* -*- 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: */
diff --git a/chart2/source/tools/DiagramHelper.cxx b/chart2/source/tools/DiagramHelper.cxx
index a683903..d21b6df 100644
--- a/chart2/source/tools/DiagramHelper.cxx
+++ b/chart2/source/tools/DiagramHelper.cxx
@@ -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 ];
commit e3ec81a1d3f66b1a76aa865c1be988051db3e25d
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date:   Thu Mar 20 20:53:42 2014 -0400

    Image for the new chart type.
    
    Change-Id: Idba626c947cc7875bdcdf13677f2161c4d5b68c5

diff --git a/icon-themes/galaxy/chart2/res/typegl3dbar_16.png b/icon-themes/galaxy/chart2/res/typegl3dbar_16.png
new file mode 100644
index 0000000..ada848c
Binary files /dev/null and b/icon-themes/galaxy/chart2/res/typegl3dbar_16.png differ
commit be89276e63a29f4e066c7991cdecc97c20794e7c
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date:   Thu Mar 20 20:52:11 2014 -0400

    Add a new chart type "GL 3D Bar" (working name).
    
    Change-Id: I0b0a65bf4f9365a8d522e3c439afe19797b2fdd5

diff --git a/chart2/Library_chartcontroller.mk b/chart2/Library_chartcontroller.mk
index 6a4907f..86c2a04 100644
--- a/chart2/Library_chartcontroller.mk
+++ b/chart2/Library_chartcontroller.mk
@@ -87,6 +87,7 @@ $(eval $(call gb_Library_add_exception_objects,chartcontroller,\
     chart2/source/controller/chartapiwrapper/WrappedTextRotationProperty \
     chart2/source/controller/dialogs/ChangingResource \
     chart2/source/controller/dialogs/ChartTypeDialogController \
+    chart2/source/controller/dialogs/GL3DBarChartDialogController \
     chart2/source/controller/dialogs/DataBrowser \
     chart2/source/controller/dialogs/DataBrowserModel \
     chart2/source/controller/dialogs/DialogModel \
diff --git a/chart2/source/controller/dialogs/Bitmaps.hrc b/chart2/source/controller/dialogs/Bitmaps.hrc
index 6f99eff..b5fc1e7 100644
--- a/chart2/source/controller/dialogs/Bitmaps.hrc
+++ b/chart2/source/controller/dialogs/Bitmaps.hrc
@@ -39,10 +39,11 @@
 #define IMG_TYPE_NET    (RID_APP_START + 8)
 #define IMG_TYPE_STOCK  (RID_APP_START + 9)
 #define IMG_TYPE_COLUMN_LINE  (RID_APP_START + 10)
-#define IMG_STEP_START  (RID_APP_START + 11)
-#define IMG_STEP_END    (RID_APP_START + 12)
-#define IMG_STEP_CENTER_X (RID_APP_START + 13)
-#define IMG_STEP_CENTER_Y (RID_APP_START + 14)
+#define IMG_TYPE_GL3D_BAR (RID_APP_START + 11)
+#define IMG_STEP_START  (RID_APP_START + 12)
+#define IMG_STEP_END    (RID_APP_START + 13)
+#define IMG_STEP_CENTER_X (RID_APP_START + 14)
+#define IMG_STEP_CENTER_Y (RID_APP_START + 15)
 
 
 //Chart Subtypes
diff --git a/chart2/source/controller/dialogs/Bitmaps.src b/chart2/source/controller/dialogs/Bitmaps.src
index 802de33..c088844 100644
--- a/chart2/source/controller/dialogs/Bitmaps.src
+++ b/chart2/source/controller/dialogs/Bitmaps.src
@@ -68,6 +68,11 @@ Image IMG_TYPE_BUBBLE
     ImageBitmap = Bitmap { File = "typebubble_16.png" ; };
     MaskColor = STD_MASKCOLOR;
 };
+Image IMG_TYPE_GL3D_BAR
+{
+    ImageBitmap = Bitmap { File = "typegl3dbar_16.png" ; };
+    MaskColor = STD_MASKCOLOR;
+};
 Image IMG_STEP_START
 {
     ImageBitmap = Bitmap { File = "step_start_30.png" ; };
diff --git a/chart2/source/controller/dialogs/GL3DBarChartDialogController.cxx b/chart2/source/controller/dialogs/GL3DBarChartDialogController.cxx
new file mode 100644
index 0000000..907c8f4
--- /dev/null
+++ b/chart2/source/controller/dialogs/GL3DBarChartDialogController.cxx
@@ -0,0 +1,41 @@
+/* -*- 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 "GL3DBarChartDialogController.hxx"
+#include <Strings.hrc>
+#include <Bitmaps.hrc>
+#include <ResId.hxx>
+
+namespace chart {
+
+GL3DBarChartDialogController::GL3DBarChartDialogController() {}
+
+GL3DBarChartDialogController::~GL3DBarChartDialogController() {}
+
+OUString GL3DBarChartDialogController::getName()
+{
+    return SchResId(STR_TYPE_GL3D_BAR).toString();
+}
+
+Image GL3DBarChartDialogController::getImage()
+{
+    return Image(SchResId(IMG_TYPE_GL3D_BAR));
+}
+
+const tTemplateServiceChartTypeParameterMap&
+GL3DBarChartDialogController::getTemplateMap() const
+{
+    static tTemplateServiceChartTypeParameterMap aMap(
+        "com.sun.star.chart2.template.GL3DBarRoundedRectangle", ChartTypeParameter(1));
+    return aMap;
+}
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/dialogs/GL3DBarChartDialogController.hxx b/chart2/source/controller/dialogs/GL3DBarChartDialogController.hxx
new file mode 100644
index 0000000..72aac01
--- /dev/null
+++ b/chart2/source/controller/dialogs/GL3DBarChartDialogController.hxx
@@ -0,0 +1,32 @@
+/* -*- 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_GL3DBARCHARTDIALOGCONTROLLER_HXX
+#define INCLUDED_CHART2_GL3DBARCHARTDIALOGCONTROLLER_HXX
+
+#include "ChartTypeDialogController.hxx"
+
+namespace chart {
+
+class GL3DBarChartDialogController : public ChartTypeDialogController
+{
+public:
+    GL3DBarChartDialogController();
+    virtual ~GL3DBarChartDialogController();
+
+    virtual OUString getName();
+    virtual Image getImage();
+    virtual const tTemplateServiceChartTypeParameterMap& getTemplateMap() const;
+};
+
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/dialogs/Strings_ChartTypes.src b/chart2/source/controller/dialogs/Strings_ChartTypes.src
index 86ed516..3ece3a3 100644
--- a/chart2/source/controller/dialogs/Strings_ChartTypes.src
+++ b/chart2/source/controller/dialogs/Strings_ChartTypes.src
@@ -142,6 +142,9 @@ String STR_BUBBLE_1
     Text [ en-US ] = "Bubble Chart" ;
 };
 
-
+String STR_TYPE_GL3D_BAR
+{
+    Text [ en-US ] = "GL 3D Bar";
+};
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/dialogs/tp_ChartType.cxx b/chart2/source/controller/dialogs/tp_ChartType.cxx
index d010648..e4141a8 100644
--- a/chart2/source/controller/dialogs/tp_ChartType.cxx
+++ b/chart2/source/controller/dialogs/tp_ChartType.cxx
@@ -25,6 +25,7 @@
 #include "res_BarGeometry.hxx"
 #include "ControllerLockGuard.hxx"
 #include "macros.hxx"
+#include "GL3DBarChartDialogController.hxx"
 
 #include <svtools/controldims.hrc>
 
@@ -726,6 +727,7 @@ ChartTypeTabPage::ChartTypeTabPage(Window* pParent
         m_aChartTypeDialogControllerList.push_back(new StockChartDialogController() );
     }
     m_aChartTypeDialogControllerList.push_back(new CombiColumnLineChartDialogController() );
+    m_aChartTypeDialogControllerList.push_back(new GL3DBarChartDialogController());
 
     ::std::vector< ChartTypeDialogController* >::const_iterator       aIter = m_aChartTypeDialogControllerList.begin();
     const ::std::vector< ChartTypeDialogController* >::const_iterator aEnd  = m_aChartTypeDialogControllerList.end();
diff --git a/chart2/source/inc/Strings.hrc b/chart2/source/inc/Strings.hrc
index 15c1ca8..f102f40 100644
--- a/chart2/source/inc/Strings.hrc
+++ b/chart2/source/inc/Strings.hrc
@@ -64,8 +64,10 @@
 #define STR_TYPE_BUBBLE                     (RID_APP_START + 282)
 #define STR_BUBBLE_1                        (RID_APP_START + 283)
 
+#define STR_TYPE_GL3D_BAR                   (RID_APP_START + 127)
+
 //additional strings
-#define STR_TEXT_SEPARATOR                   (RID_APP_START + 20)
+#define STR_TEXT_SEPARATOR                  (RID_APP_START + 20)
 
 //SchStatisticTabPage and SchDataStatisticsDlg
 //see Strings_Statistic.src
@@ -94,7 +96,7 @@
 #define STR_INVALID_TIME_UNIT               (RID_APP_START + 292)
 
 
-//for range didalog
+//for range dialog
 #define STR_DATA_ROLE_LABEL                 (RID_APP_START + 241)
 #define STR_DATA_ROLE_X                     (RID_APP_START + 242)
 #define STR_DATA_ROLE_Y                     (RID_APP_START + 243)
@@ -272,7 +274,6 @@
 #define STR_BUTTON_UP                       (RID_APP_START + 500)
 #define STR_BUTTON_DOWN                     (RID_APP_START + 501)
 
-
 // ids must not exceed RID_APP_START + 499
 // ids >= RID_APP_START + 500 are defined in glob.hrc
 
commit 349a5b72bf2bc627a79967d61ff7dc07a4ac90b2
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date:   Thu Mar 20 16:30:25 2014 -0400

    Initial skeleton class for the new chart type. Still very much empty.
    
    Change-Id: I5e9eaeb9337d51f59f800f8e676b8bc83b80df70

diff --git a/chart2/Library_chartcore.mk b/chart2/Library_chartcore.mk
index de4c888..2e09fe3 100644
--- a/chart2/Library_chartcore.mk
+++ b/chart2/Library_chartcore.mk
@@ -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 \
diff --git a/chart2/source/inc/servicenames_charttypes.hxx b/chart2/source/inc/servicenames_charttypes.hxx
index 321ba73..20f078c 100644
--- a/chart2/source/inc/servicenames_charttypes.hxx
+++ b/chart2/source/inc/servicenames_charttypes.hxx
@@ -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: */
diff --git a/chart2/source/model/template/GL3DBarChartType.cxx b/chart2/source/model/template/GL3DBarChartType.cxx
new file mode 100644
index 0000000..1dd889d
--- /dev/null
+++ b/chart2/source/model/template/GL3DBarChartType.cxx
@@ -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: */
diff --git a/chart2/source/model/template/GL3DBarChartType.hxx b/chart2/source/model/template/GL3DBarChartType.hxx
new file mode 100644
index 0000000..4951050
--- /dev/null
+++ b/chart2/source/model/template/GL3DBarChartType.hxx
@@ -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: */


More information about the Libreoffice-commits mailing list