[Libreoffice-commits] core.git: 8 commits - chart2/inc chart2/Library_chartcontroller.mk chart2/source

Kohei Yoshida kohei.yoshida at collabora.com
Fri Mar 28 21:48:35 PDT 2014


 chart2/Library_chartcontroller.mk                                    |    1 
 chart2/inc/unonames.hxx                                              |   23 +
 chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx          |   13 
 chart2/source/controller/chartapiwrapper/WrappedGL3DProperties.cxx   |  146 ++++++++++
 chart2/source/controller/chartapiwrapper/WrappedGL3DProperties.hxx   |   38 ++
 chart2/source/controller/chartapiwrapper/WrappedSplineProperties.cxx |   20 -
 chart2/source/controller/dialogs/ChartTypeDialogController.cxx       |   33 +-
 chart2/source/controller/dialogs/dlg_ChartType.cxx                   |    8 
 chart2/source/controller/dialogs/tp_ChartType.cxx                    |   10 
 chart2/source/model/main/Diagram.cxx                                 |   14 
 chart2/source/model/template/GL3DBarChartType.cxx                    |    3 
 chart2/source/model/template/GL3DBarChartTypeTemplate.cxx            |  140 +++++++++
 chart2/source/model/template/GL3DBarChartTypeTemplate.hxx            |   25 +
 chart2/source/model/template/LineChartType.cxx                       |    8 
 chart2/source/model/template/LineChartTypeTemplate.cxx               |   28 +
 chart2/source/model/template/ScatterChartType.cxx                    |    8 
 chart2/source/model/template/ScatterChartTypeTemplate.cxx            |   28 +
 chart2/source/view/charttypes/AreaChart.cxx                          |    7 
 chart2/source/view/charttypes/GL3DBarChart.cxx                       |   52 +++
 chart2/source/view/main/ChartView.cxx                                |   36 ++
 20 files changed, 556 insertions(+), 85 deletions(-)

New commits:
commit ffaf640b734885d2844a99cc1fd61c8a6a1d663b
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date:   Fri Mar 28 12:29:13 2014 -0400

    Add API wrapper to handle properties of new GL3D chart type.
    
    Now the new proprety gets properly imported and exported to and from ODF.
    
    Also, more on replacing string literals with define macro constants.
    
    Change-Id: I4b773d68610a8aeaeb239901dac166e4dc2dd80d

diff --git a/chart2/Library_chartcontroller.mk b/chart2/Library_chartcontroller.mk
index 86c2a04..b32d840 100644
--- a/chart2/Library_chartcontroller.mk
+++ b/chart2/Library_chartcontroller.mk
@@ -75,6 +75,7 @@ $(eval $(call gb_Library_add_exception_objects,chartcontroller,\
     chart2/source/controller/chartapiwrapper/WrappedCharacterHeightProperty \
     chart2/source/controller/chartapiwrapper/WrappedDataCaptionProperties \
     chart2/source/controller/chartapiwrapper/WrappedGapwidthProperty \
+    chart2/source/controller/chartapiwrapper/WrappedGL3DProperties \
     chart2/source/controller/chartapiwrapper/WrappedNumberFormatProperty \
     chart2/source/controller/chartapiwrapper/WrappedScaleProperty \
     chart2/source/controller/chartapiwrapper/WrappedScaleTextProperties \
diff --git a/chart2/inc/unonames.hxx b/chart2/inc/unonames.hxx
index a02ba61..9f9d1cb 100644
--- a/chart2/inc/unonames.hxx
+++ b/chart2/inc/unonames.hxx
@@ -15,6 +15,8 @@
 #define CHART_UNONAME_SPLINE_TYPE           "SplineType"
 #define CHART_UNONAME_SPLINE_ORDER          "SplineOrder"
 #define CHART_UNONAME_SPLINE_RESOLUTION     "SplineResolution"
+#define CHART_UNONAME_CURVE_STYLE           "CurveStyle"
+#define CHART_UNONAME_CURVE_RESOLUTION      "CurveResolution"
 
 #endif
 
diff --git a/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx b/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx
index 984a2ef..cb95fd6 100644
--- a/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx
@@ -39,6 +39,7 @@
 #include "WrappedSplineProperties.hxx"
 #include "WrappedStockProperties.hxx"
 #include "WrappedSceneProperty.hxx"
+#include "WrappedGL3DProperties.hxx"
 #include "RelativePositionHelper.hxx"
 #include "ContainerHelper.hxx"
 #include "ControllerLockGuard.hxx"
@@ -471,6 +472,7 @@ private:
         WrappedSplineProperties::addProperties( aProperties );
         WrappedStockProperties::addProperties( aProperties );
         WrappedAutomaticPositionProperties::addProperties( aProperties );
+        WrappedGL3DProperties::addProperties(aProperties);
 
         ::std::sort( aProperties.begin(), aProperties.end(),
                      ::chart::PropertyNameLess() );
@@ -2045,6 +2047,7 @@ const std::vector< WrappedProperty* > DiagramWrapper::createWrappedProperties()
     WrappedSplineProperties::addWrappedProperties( aWrappedProperties, m_spChart2ModelContact );
     WrappedStockProperties::addWrappedProperties( aWrappedProperties, m_spChart2ModelContact );
     WrappedAutomaticPositionProperties::addWrappedProperties( aWrappedProperties );
+    WrappedGL3DProperties::addWrappedProperties(aWrappedProperties, m_spChart2ModelContact);
 
     aWrappedProperties.push_back( new WrappedDataRowSourceProperty( m_spChart2ModelContact ) );
     aWrappedProperties.push_back( new WrappedStackingProperty( StackMode_Y_STACKED,m_spChart2ModelContact ) );
diff --git a/chart2/source/controller/chartapiwrapper/WrappedGL3DProperties.cxx b/chart2/source/controller/chartapiwrapper/WrappedGL3DProperties.cxx
new file mode 100644
index 0000000..a4beaf5
--- /dev/null
+++ b/chart2/source/controller/chartapiwrapper/WrappedGL3DProperties.cxx
@@ -0,0 +1,146 @@
+/* -*- 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 "WrappedGL3DProperties.hxx"
+#include "Chart2ModelContact.hxx"
+#include <unonames.hxx>
+#include <WrappedProperty.hxx>
+#include <DiagramHelper.hxx>
+
+#include <com/sun/star/beans/PropertyAttribute.hpp>
+#include <com/sun/star/chart2/XDiagram.hpp>
+
+using namespace com::sun::star;
+
+namespace chart { namespace wrapper {
+
+namespace {
+
+enum
+{
+    PROP_GL3DCHARTTYPE_ROUNDED_EDGE
+};
+
+class WrappedGL3DProperty : public WrappedProperty
+{
+    uno::Any maDefault;
+    boost::shared_ptr<Chart2ModelContact> mpModelContact;
+
+private:
+    uno::Reference<chart2::XChartType> getChartType() const
+    {
+        uno::Reference<chart2::XDiagram> xDiagram = mpModelContact->getChart2Diagram();
+        uno::Sequence<uno::Reference<chart2::XChartType> > aCTs =
+            DiagramHelper::getChartTypesFromDiagram(xDiagram);
+
+        for (sal_Int32 i = 0; i < aCTs.getLength(); ++i)
+        {
+            uno::Reference<chart2::XChartType> xThisCT = aCTs[i];
+            if (xThisCT->getChartType() == "com.sun.star.chart2.GL3DBarChartType")
+                // Found the right chart type.
+                return xThisCT;
+        }
+
+        return uno::Reference<chart2::XChartType>();
+    }
+
+public:
+    WrappedGL3DProperty( const OUString& rInName, const OUString& rOutName, const uno::Any& rDefault, const boost::shared_ptr<Chart2ModelContact>& pContact ) :
+        WrappedProperty(rInName, rOutName), maDefault(rDefault), mpModelContact(pContact) {}
+
+    virtual ~WrappedGL3DProperty() {}
+
+    virtual uno::Any getPropertyValue( const uno::Reference<beans::XPropertySet>& /*xInnerPS*/ ) const
+        throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
+    {
+        uno::Reference<chart2::XChartType> xCT = getChartType();
+        if (!xCT.is())
+            return uno::Any();
+
+        try
+        {
+            uno::Reference<beans::XPropertySet> xPS(xCT, uno::UNO_QUERY_THROW);
+            return xPS->getPropertyValue(CHART_UNONAME_ROUNDED_EDGE);
+        }
+        catch ( const uno::Exception& )  {}
+
+        return uno::Any();
+    };
+
+    virtual void setPropertyValue(
+        const uno::Any& rOutValue, const uno::Reference<beans::XPropertySet>& /*xInnerPS*/ ) const
+            throw (beans::UnknownPropertyException, beans::PropertyVetoException,
+                   lang::IllegalArgumentException, lang::WrappedTargetException,
+                   uno::RuntimeException)
+    {
+        uno::Reference<chart2::XChartType> xCT = getChartType();
+        if (!xCT.is())
+            return;
+
+        try
+        {
+            uno::Reference<beans::XPropertySet> xPS(xCT, uno::UNO_QUERY_THROW);
+            return xPS->setPropertyValue(CHART_UNONAME_ROUNDED_EDGE, rOutValue);
+        }
+        catch ( const uno::Exception& )  {}
+    }
+
+    virtual void setPropertyToDefault( const uno::Reference<beans::XPropertyState>& /*xInnerPropState*/ ) const
+        throw (beans::UnknownPropertyException, uno::RuntimeException)
+    {
+        uno::Reference<chart2::XChartType> xCT = getChartType();
+        if (!xCT.is())
+            return;
+
+        try
+        {
+            uno::Reference<beans::XPropertySet> xPS(xCT, uno::UNO_QUERY_THROW);
+            return xPS->setPropertyValue(CHART_UNONAME_ROUNDED_EDGE, maDefault);
+        }
+        catch ( const uno::Exception& )  {}
+    }
+
+    virtual uno::Any getPropertyDefault( const uno::Reference<beans::XPropertyState>& /*xInnerPS*/ ) const
+        throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
+    {
+        return maDefault;
+    }
+
+    virtual beans::PropertyState getPropertyState( const uno::Reference<beans::XPropertyState>& /*xInnerPS*/ ) const
+                        throw (beans::UnknownPropertyException, uno::RuntimeException)
+    {
+        return beans::PropertyState_DIRECT_VALUE;
+    }
+};
+
+}
+
+void WrappedGL3DProperties::addProperties( std::vector<css::beans::Property> & rOutProps )
+{
+    rOutProps.push_back(
+        beans::Property(
+            CHART_UNONAME_ROUNDED_EDGE,
+            PROP_GL3DCHARTTYPE_ROUNDED_EDGE,
+            ::getCppuBooleanType(),
+            beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT
+        )
+    );
+}
+
+void WrappedGL3DProperties::addWrappedProperties(
+    std::vector<WrappedProperty*>& rList, const boost::shared_ptr<Chart2ModelContact>& pChart2ModelContact )
+{
+    rList.push_back(
+        new WrappedGL3DProperty(
+            CHART_UNONAME_ROUNDED_EDGE, CHART_UNONAME_ROUNDED_EDGE, uno::makeAny(false), pChart2ModelContact));
+}
+
+}}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/chartapiwrapper/WrappedGL3DProperties.hxx b/chart2/source/controller/chartapiwrapper/WrappedGL3DProperties.hxx
new file mode 100644
index 0000000..90034a0
--- /dev/null
+++ b/chart2/source/controller/chartapiwrapper/WrappedGL3DProperties.hxx
@@ -0,0 +1,38 @@
+/* -*- 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_WRAPPEDGL3DPROPERTIES_HXX
+#define CHART2_WRAPPEDGL3DPROPERTIES_HXX
+
+#include <vector>
+#include <boost/shared_ptr.hpp>
+
+#include <com/sun/star/beans/Property.hpp>
+
+namespace chart {
+
+class WrappedProperty;
+
+namespace wrapper {
+
+class Chart2ModelContact;
+
+class WrappedGL3DProperties
+{
+public:
+    static void addProperties( std::vector<css::beans::Property> & rOutProps );
+    static void addWrappedProperties(
+        std::vector<WrappedProperty*>& rList, const boost::shared_ptr<Chart2ModelContact>& pChart2ModelContact );
+};
+
+}}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/chartapiwrapper/WrappedSplineProperties.cxx b/chart2/source/controller/chartapiwrapper/WrappedSplineProperties.cxx
index 4adf8ea..13cb3cf 100644
--- a/chart2/source/controller/chartapiwrapper/WrappedSplineProperties.cxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedSplineProperties.cxx
@@ -212,16 +212,16 @@ void WrappedSplineProperties::addWrappedProperties( std::vector< WrappedProperty
     rList.push_back( new WrappedSplineTypeProperty( spChart2ModelContact ) );
     rList.push_back(
         new WrappedSplineProperty<sal_Int32>(
-            CHART_UNONAME_SPLINE_ORDER, "SplineOrder", // same name ?
+            CHART_UNONAME_SPLINE_ORDER, CHART_UNONAME_SPLINE_ORDER,
             uno::makeAny(sal_Int32(3)), spChart2ModelContact));
     rList.push_back(
         new WrappedSplineProperty<sal_Int32>(
-            CHART_UNONAME_SPLINE_RESOLUTION, "CurveResolution",
+            CHART_UNONAME_SPLINE_RESOLUTION, CHART_UNONAME_CURVE_RESOLUTION,
             uno::makeAny(sal_Int32(20)), spChart2ModelContact));
 }
 
 WrappedSplineTypeProperty::WrappedSplineTypeProperty( ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact )
-    : WrappedSplineProperty<sal_Int32>(CHART_UNONAME_SPLINE_TYPE, "CurveStyle", uno::makeAny(sal_Int32(0)), spChart2ModelContact )
+    : WrappedSplineProperty<sal_Int32>(CHART_UNONAME_SPLINE_TYPE, CHART_UNONAME_CURVE_STYLE, uno::makeAny(sal_Int32(0)), spChart2ModelContact )
 {
 }
 WrappedSplineTypeProperty::~WrappedSplineTypeProperty()
diff --git a/chart2/source/controller/dialogs/ChartTypeDialogController.cxx b/chart2/source/controller/dialogs/ChartTypeDialogController.cxx
index c31ffc8..ee1d899 100644
--- a/chart2/source/controller/dialogs/ChartTypeDialogController.cxx
+++ b/chart2/source/controller/dialogs/ChartTypeDialogController.cxx
@@ -146,9 +146,9 @@ ChartTypeParameter ChartTypeDialogController::getChartTypeParameterForService(
     {
         try
         {
-            xTemplateProps->getPropertyValue( "CurveStyle" ) >>= aRet.eCurveStyle;
-            xTemplateProps->getPropertyValue( "CurveResolution" ) >>= aRet.nCurveResolution;
-            xTemplateProps->getPropertyValue( "SplineOrder" ) >>= aRet.nSplineOrder;
+            xTemplateProps->getPropertyValue( CHART_UNONAME_CURVE_STYLE ) >>= aRet.eCurveStyle;
+            xTemplateProps->getPropertyValue( CHART_UNONAME_CURVE_RESOLUTION ) >>= aRet.nCurveResolution;
+            xTemplateProps->getPropertyValue( CHART_UNONAME_SPLINE_ORDER ) >>= aRet.nSplineOrder;
         }
         catch( uno::Exception & ex )
         {
@@ -291,9 +291,9 @@ uno::Reference< XChartTypeTemplate > ChartTypeDialogController::getCurrentTempla
             {
                 try
                 {
-                    xTemplateProps->setPropertyValue( "CurveStyle" , uno::makeAny(rParameter.eCurveStyle) );
-                    xTemplateProps->setPropertyValue( "CurveResolution" , uno::makeAny(rParameter.nCurveResolution) );
-                    xTemplateProps->setPropertyValue( "SplineOrder" , uno::makeAny(rParameter.nSplineOrder) );
+                    xTemplateProps->setPropertyValue( CHART_UNONAME_CURVE_STYLE , uno::makeAny(rParameter.eCurveStyle) );
+                    xTemplateProps->setPropertyValue( CHART_UNONAME_CURVE_RESOLUTION , uno::makeAny(rParameter.nCurveResolution) );
+                    xTemplateProps->setPropertyValue( CHART_UNONAME_SPLINE_ORDER , uno::makeAny(rParameter.nSplineOrder) );
                 }
                 catch( uno::Exception & ex )
                 {
diff --git a/chart2/source/model/template/LineChartType.cxx b/chart2/source/model/template/LineChartType.cxx
index 7733ed5..d1b9185 100644
--- a/chart2/source/model/template/LineChartType.cxx
+++ b/chart2/source/model/template/LineChartType.cxx
@@ -22,6 +22,8 @@
 #include "macros.hxx"
 #include "servicenames_charttypes.hxx"
 #include "ContainerHelper.hxx"
+#include <unonames.hxx>
+
 #include <com/sun/star/beans/PropertyAttribute.hpp>
 #include <com/sun/star/chart2/CurveStyle.hpp>
 
@@ -47,20 +49,20 @@ void lcl_AddPropertiesToVector(
     ::std::vector< Property > & rOutProperties )
 {
     rOutProperties.push_back(
-        Property( "CurveStyle",
+        Property( CHART_UNONAME_CURVE_STYLE,
                   PROP_LINECHARTTYPE_CURVE_STYLE,
                   ::getCppuType( reinterpret_cast< const chart2::CurveStyle * >(0)),
                   beans::PropertyAttribute::BOUND
                   | beans::PropertyAttribute::MAYBEDEFAULT ));
 
     rOutProperties.push_back(
-        Property( "CurveResolution",
+        Property( CHART_UNONAME_CURVE_RESOLUTION,
                   PROP_LINECHARTTYPE_CURVE_RESOLUTION,
                   ::getCppuType( reinterpret_cast< const sal_Int32 * >(0)),
                   beans::PropertyAttribute::BOUND
                   | beans::PropertyAttribute::MAYBEDEFAULT ));
     rOutProperties.push_back(
-        Property( "SplineOrder",
+        Property( CHART_UNONAME_SPLINE_ORDER,
                   PROP_LINECHARTTYPE_SPLINE_ORDER,
                   ::getCppuType( reinterpret_cast< const sal_Int32 * >(0)),
                   beans::PropertyAttribute::BOUND
diff --git a/chart2/source/model/template/LineChartTypeTemplate.cxx b/chart2/source/model/template/LineChartTypeTemplate.cxx
index 14ba91c..591f259 100644
--- a/chart2/source/model/template/LineChartTypeTemplate.cxx
+++ b/chart2/source/model/template/LineChartTypeTemplate.cxx
@@ -23,10 +23,12 @@
 #include "servicenames_charttypes.hxx"
 #include "ContainerHelper.hxx"
 #include "DataSeriesHelper.hxx"
+#include "PropertyHelper.hxx"
+#include <unonames.hxx>
+
 #include <com/sun/star/chart2/SymbolStyle.hpp>
 #include <com/sun/star/chart2/Symbol.hpp>
 #include <com/sun/star/drawing/LineStyle.hpp>
-#include "PropertyHelper.hxx"
 #include <com/sun/star/beans/PropertyAttribute.hpp>
 
 #include <algorithm>
@@ -54,19 +56,19 @@ void lcl_AddPropertiesToVector(
     ::std::vector< Property > & rOutProperties )
 {
     rOutProperties.push_back(
-        Property( "CurveStyle",
+        Property( CHART_UNONAME_CURVE_STYLE,
                   PROP_LINECHARTTYPE_TEMPLATE_CURVE_STYLE,
                   ::getCppuType( reinterpret_cast< const chart2::CurveStyle * >(0)),
                   beans::PropertyAttribute::BOUND
                   | beans::PropertyAttribute::MAYBEDEFAULT ));
     rOutProperties.push_back(
-        Property( "CurveResolution",
+        Property( CHART_UNONAME_CURVE_RESOLUTION,
                   PROP_LINECHARTTYPE_TEMPLATE_CURVE_RESOLUTION,
                   ::getCppuType( reinterpret_cast< const sal_Int32 * >(0)),
                   beans::PropertyAttribute::BOUND
                   | beans::PropertyAttribute::MAYBEDEFAULT ));
     rOutProperties.push_back(
-        Property( "SplineOrder",
+        Property( CHART_UNONAME_SPLINE_ORDER,
                   PROP_LINECHARTTYPE_TEMPLATE_SPLINE_ORDER,
                   ::getCppuType( reinterpret_cast< const sal_Int32 * >(0)),
                   beans::PropertyAttribute::BOUND
@@ -273,9 +275,9 @@ sal_Bool SAL_CALL LineChartTypeTemplate::matchesTemplate(
             uno::Reference< beans::XPropertySet > xChartTypeProp(
                 DiagramHelper::getChartTypeByIndex( xDiagram, 0 ),
                 uno::UNO_QUERY_THROW );
-            setFastPropertyValue_NoBroadcast( PROP_LINECHARTTYPE_TEMPLATE_CURVE_STYLE, xChartTypeProp->getPropertyValue("CurveStyle") );
-            setFastPropertyValue_NoBroadcast( PROP_LINECHARTTYPE_TEMPLATE_CURVE_RESOLUTION, xChartTypeProp->getPropertyValue("CurveResolution") );
-            setFastPropertyValue_NoBroadcast( PROP_LINECHARTTYPE_TEMPLATE_SPLINE_ORDER, xChartTypeProp->getPropertyValue("SplineOrder") );
+            setFastPropertyValue_NoBroadcast( PROP_LINECHARTTYPE_TEMPLATE_CURVE_STYLE, xChartTypeProp->getPropertyValue(CHART_UNONAME_CURVE_STYLE) );
+            setFastPropertyValue_NoBroadcast( PROP_LINECHARTTYPE_TEMPLATE_CURVE_RESOLUTION, xChartTypeProp->getPropertyValue(CHART_UNONAME_CURVE_RESOLUTION) );
+            setFastPropertyValue_NoBroadcast( PROP_LINECHARTTYPE_TEMPLATE_SPLINE_ORDER, xChartTypeProp->getPropertyValue(CHART_UNONAME_SPLINE_ORDER) );
         }
         catch( const uno::Exception & ex )
         {
@@ -301,11 +303,11 @@ Reference< chart2::XChartType > LineChartTypeTemplate::getChartTypeForIndex( sal
         if( xCTProp.is())
         {
             xCTProp->setPropertyValue(
-                "CurveStyle", getFastPropertyValue( PROP_LINECHARTTYPE_TEMPLATE_CURVE_STYLE ));
+                CHART_UNONAME_CURVE_STYLE, getFastPropertyValue( PROP_LINECHARTTYPE_TEMPLATE_CURVE_STYLE ));
             xCTProp->setPropertyValue(
-                "CurveResolution", getFastPropertyValue( PROP_LINECHARTTYPE_TEMPLATE_CURVE_RESOLUTION ));
+                CHART_UNONAME_CURVE_RESOLUTION, getFastPropertyValue( PROP_LINECHARTTYPE_TEMPLATE_CURVE_RESOLUTION ));
             xCTProp->setPropertyValue(
-                "SplineOrder", getFastPropertyValue( PROP_LINECHARTTYPE_TEMPLATE_SPLINE_ORDER ));
+                CHART_UNONAME_SPLINE_ORDER, getFastPropertyValue( PROP_LINECHARTTYPE_TEMPLATE_SPLINE_ORDER ));
         }
     }
     catch( const uno::Exception & ex )
@@ -335,11 +337,11 @@ Reference< chart2::XChartType > SAL_CALL LineChartTypeTemplate::getChartTypeForN
         if( xCTProp.is())
         {
             xCTProp->setPropertyValue(
-                "CurveStyle", getFastPropertyValue( PROP_LINECHARTTYPE_TEMPLATE_CURVE_STYLE ));
+                CHART_UNONAME_CURVE_STYLE, getFastPropertyValue( PROP_LINECHARTTYPE_TEMPLATE_CURVE_STYLE ));
             xCTProp->setPropertyValue(
-                "CurveResolution", getFastPropertyValue( PROP_LINECHARTTYPE_TEMPLATE_CURVE_RESOLUTION ));
+                CHART_UNONAME_CURVE_RESOLUTION, getFastPropertyValue( PROP_LINECHARTTYPE_TEMPLATE_CURVE_RESOLUTION ));
             xCTProp->setPropertyValue(
-                "SplineOrder", getFastPropertyValue( PROP_LINECHARTTYPE_TEMPLATE_SPLINE_ORDER ));
+                CHART_UNONAME_SPLINE_ORDER, getFastPropertyValue( PROP_LINECHARTTYPE_TEMPLATE_SPLINE_ORDER ));
         }
     }
     catch( const uno::Exception & ex )
diff --git a/chart2/source/model/template/ScatterChartType.cxx b/chart2/source/model/template/ScatterChartType.cxx
index 9f33147..7d83da3 100644
--- a/chart2/source/model/template/ScatterChartType.cxx
+++ b/chart2/source/model/template/ScatterChartType.cxx
@@ -25,6 +25,8 @@
 #include "CartesianCoordinateSystem.hxx"
 #include "AxisHelper.hxx"
 #include "AxisIndexDefines.hxx"
+#include <unonames.hxx>
+
 #include <com/sun/star/beans/PropertyAttribute.hpp>
 #include <com/sun/star/chart2/AxisType.hpp>
 #include <com/sun/star/chart2/CurveStyle.hpp>
@@ -51,20 +53,20 @@ void lcl_AddPropertiesToVector(
     ::std::vector< Property > & rOutProperties )
 {
     rOutProperties.push_back(
-        Property( "CurveStyle",
+        Property( CHART_UNONAME_CURVE_STYLE,
                   PROP_SCATTERCHARTTYPE_CURVE_STYLE,
                   ::getCppuType( reinterpret_cast< const chart2::CurveStyle * >(0)),
                   beans::PropertyAttribute::BOUND
                   | beans::PropertyAttribute::MAYBEDEFAULT ));
 
     rOutProperties.push_back(
-        Property( "CurveResolution",
+        Property( CHART_UNONAME_CURVE_RESOLUTION,
                   PROP_SCATTERCHARTTYPE_CURVE_RESOLUTION,
                   ::getCppuType( reinterpret_cast< const sal_Int32 * >(0)),
                   beans::PropertyAttribute::BOUND
                   | beans::PropertyAttribute::MAYBEDEFAULT ));
     rOutProperties.push_back(
-        Property( "SplineOrder",
+        Property( CHART_UNONAME_SPLINE_ORDER,
                   PROP_SCATTERCHARTTYPE_SPLINE_ORDER,
                   ::getCppuType( reinterpret_cast< const sal_Int32 * >(0)),
                   beans::PropertyAttribute::BOUND
diff --git a/chart2/source/model/template/ScatterChartTypeTemplate.cxx b/chart2/source/model/template/ScatterChartTypeTemplate.cxx
index c1f8682..371e2a4 100644
--- a/chart2/source/model/template/ScatterChartTypeTemplate.cxx
+++ b/chart2/source/model/template/ScatterChartTypeTemplate.cxx
@@ -25,10 +25,12 @@
 #include "servicenames_charttypes.hxx"
 #include "ContainerHelper.hxx"
 #include "DataSeriesHelper.hxx"
+#include "PropertyHelper.hxx"
+#include <unonames.hxx>
+
 #include <com/sun/star/chart2/SymbolStyle.hpp>
 #include <com/sun/star/chart2/Symbol.hpp>
 #include <com/sun/star/drawing/LineStyle.hpp>
-#include "PropertyHelper.hxx"
 #include <com/sun/star/beans/PropertyAttribute.hpp>
 
 #include <algorithm>
@@ -56,19 +58,19 @@ void lcl_AddPropertiesToVector(
     ::std::vector< Property > & rOutProperties )
 {
     rOutProperties.push_back(
-        Property( "CurveStyle",
+        Property( CHART_UNONAME_CURVE_STYLE,
                   PROP_SCATTERCHARTTYPE_TEMPLATE_CURVE_STYLE,
                   ::getCppuType( reinterpret_cast< const chart2::CurveStyle * >(0)),
                   beans::PropertyAttribute::BOUND
                   | beans::PropertyAttribute::MAYBEDEFAULT ));
     rOutProperties.push_back(
-        Property( "CurveResolution",
+        Property( CHART_UNONAME_CURVE_RESOLUTION,
                   PROP_SCATTERCHARTTYPE_TEMPLATE_CURVE_RESOLUTION,
                   ::getCppuType( reinterpret_cast< const sal_Int32 * >(0)),
                   beans::PropertyAttribute::BOUND
                   | beans::PropertyAttribute::MAYBEDEFAULT ));
     rOutProperties.push_back(
-        Property( "SplineOrder",
+        Property( CHART_UNONAME_SPLINE_ORDER,
                   PROP_SCATTERCHARTTYPE_TEMPLATE_SPLINE_ORDER,
                   ::getCppuType( reinterpret_cast< const sal_Int32 * >(0)),
                   beans::PropertyAttribute::BOUND
@@ -307,9 +309,9 @@ sal_Bool SAL_CALL ScatterChartTypeTemplate::matchesTemplate(
             uno::Reference< beans::XPropertySet > xChartTypeProp(
                 DiagramHelper::getChartTypeByIndex( xDiagram, 0 ),
                 uno::UNO_QUERY_THROW );
-            setFastPropertyValue_NoBroadcast( PROP_SCATTERCHARTTYPE_TEMPLATE_CURVE_STYLE, xChartTypeProp->getPropertyValue("CurveStyle") );
-            setFastPropertyValue_NoBroadcast( PROP_SCATTERCHARTTYPE_TEMPLATE_CURVE_RESOLUTION, xChartTypeProp->getPropertyValue("CurveResolution") );
-            setFastPropertyValue_NoBroadcast( PROP_SCATTERCHARTTYPE_TEMPLATE_SPLINE_ORDER, xChartTypeProp->getPropertyValue("SplineOrder") );
+            setFastPropertyValue_NoBroadcast( PROP_SCATTERCHARTTYPE_TEMPLATE_CURVE_STYLE, xChartTypeProp->getPropertyValue(CHART_UNONAME_CURVE_STYLE) );
+            setFastPropertyValue_NoBroadcast( PROP_SCATTERCHARTTYPE_TEMPLATE_CURVE_RESOLUTION, xChartTypeProp->getPropertyValue(CHART_UNONAME_CURVE_RESOLUTION) );
+            setFastPropertyValue_NoBroadcast( PROP_SCATTERCHARTTYPE_TEMPLATE_SPLINE_ORDER, xChartTypeProp->getPropertyValue(CHART_UNONAME_SPLINE_ORDER) );
         }
         catch( const uno::Exception & ex )
         {
@@ -335,11 +337,11 @@ Reference< chart2::XChartType > ScatterChartTypeTemplate::getChartTypeForIndex(
         if( xCTProp.is())
         {
             xCTProp->setPropertyValue(
-                "CurveStyle", getFastPropertyValue( PROP_SCATTERCHARTTYPE_TEMPLATE_CURVE_STYLE ));
+                CHART_UNONAME_CURVE_STYLE, getFastPropertyValue( PROP_SCATTERCHARTTYPE_TEMPLATE_CURVE_STYLE ));
             xCTProp->setPropertyValue(
-                "CurveResolution", getFastPropertyValue( PROP_SCATTERCHARTTYPE_TEMPLATE_CURVE_RESOLUTION ));
+                CHART_UNONAME_CURVE_RESOLUTION, getFastPropertyValue( PROP_SCATTERCHARTTYPE_TEMPLATE_CURVE_RESOLUTION ));
             xCTProp->setPropertyValue(
-                "SplineOrder", getFastPropertyValue( PROP_SCATTERCHARTTYPE_TEMPLATE_SPLINE_ORDER ));
+                CHART_UNONAME_SPLINE_ORDER, getFastPropertyValue( PROP_SCATTERCHARTTYPE_TEMPLATE_SPLINE_ORDER ));
         }
     }
     catch( const uno::Exception & ex )
@@ -369,11 +371,11 @@ Reference< chart2::XChartType > SAL_CALL ScatterChartTypeTemplate::getChartTypeF
         if( xCTProp.is())
         {
             xCTProp->setPropertyValue(
-                "CurveStyle", getFastPropertyValue( PROP_SCATTERCHARTTYPE_TEMPLATE_CURVE_STYLE ));
+                CHART_UNONAME_CURVE_STYLE, getFastPropertyValue( PROP_SCATTERCHARTTYPE_TEMPLATE_CURVE_STYLE ));
             xCTProp->setPropertyValue(
-                "CurveResolution", getFastPropertyValue( PROP_SCATTERCHARTTYPE_TEMPLATE_CURVE_RESOLUTION ));
+                CHART_UNONAME_CURVE_RESOLUTION, getFastPropertyValue( PROP_SCATTERCHARTTYPE_TEMPLATE_CURVE_RESOLUTION ));
             xCTProp->setPropertyValue(
-                "SplineOrder", getFastPropertyValue( PROP_SCATTERCHARTTYPE_TEMPLATE_SPLINE_ORDER ));
+                CHART_UNONAME_SPLINE_ORDER, getFastPropertyValue( PROP_SCATTERCHARTTYPE_TEMPLATE_SPLINE_ORDER ));
         }
     }
     catch( const uno::Exception & ex )
diff --git a/chart2/source/view/charttypes/AreaChart.cxx b/chart2/source/view/charttypes/AreaChart.cxx
index 2cc53b6..ce557ad 100644
--- a/chart2/source/view/charttypes/AreaChart.cxx
+++ b/chart2/source/view/charttypes/AreaChart.cxx
@@ -30,6 +30,7 @@
 #include "Clipping.hxx"
 #include "Stripe.hxx"
 #include "DateHelper.hxx"
+#include <unonames.hxx>
 
 #include <com/sun/star/chart2/Symbol.hpp>
 #include <com/sun/star/chart/DataLabelPlacement.hpp>
@@ -76,9 +77,9 @@ AreaChart::AreaChart( const uno::Reference<XChartType>& xChartTypeModel
     {
         if( m_xChartTypeModelProps.is() )
         {
-            m_xChartTypeModelProps->getPropertyValue("CurveStyle") >>= m_eCurveStyle;
-            m_xChartTypeModelProps->getPropertyValue("CurveResolution") >>= m_nCurveResolution;
-            m_xChartTypeModelProps->getPropertyValue("SplineOrder") >>= m_nSplineOrder;
+            m_xChartTypeModelProps->getPropertyValue(CHART_UNONAME_CURVE_STYLE) >>= m_eCurveStyle;
+            m_xChartTypeModelProps->getPropertyValue(CHART_UNONAME_CURVE_RESOLUTION) >>= m_nCurveResolution;
+            m_xChartTypeModelProps->getPropertyValue(CHART_UNONAME_SPLINE_ORDER) >>= m_nSplineOrder;
         }
     }
     catch( uno::Exception& e )
commit de7c0f31b5773296c8af6692e7155119209d07ef
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date:   Fri Mar 28 12:11:43 2014 -0400

    Let's use define constants here rather than string values....
    
    Easier to keep track of their call sites.
    
    Change-Id: I5f874194425ae8f5043bef45cce63a5e1d51a400

diff --git a/chart2/inc/unonames.hxx b/chart2/inc/unonames.hxx
index 6f800f8..a02ba61 100644
--- a/chart2/inc/unonames.hxx
+++ b/chart2/inc/unonames.hxx
@@ -10,8 +10,11 @@
 #ifndef CHART2_UNONAMES_HXX
 #define CHART2_UNONAMES_HXX
 
-#define CHART_UNONAME_SORT_BY_XVALUES "SortByXValues"
-#define CHART_UNONAME_ROUNDED_EDGE "RoundedEdge"
+#define CHART_UNONAME_SORT_BY_XVALUES       "SortByXValues"
+#define CHART_UNONAME_ROUNDED_EDGE          "RoundedEdge"
+#define CHART_UNONAME_SPLINE_TYPE           "SplineType"
+#define CHART_UNONAME_SPLINE_ORDER          "SplineOrder"
+#define CHART_UNONAME_SPLINE_RESOLUTION     "SplineResolution"
 
 #endif
 
diff --git a/chart2/source/controller/chartapiwrapper/WrappedSplineProperties.cxx b/chart2/source/controller/chartapiwrapper/WrappedSplineProperties.cxx
index 3edef79..4adf8ea 100644
--- a/chart2/source/controller/chartapiwrapper/WrappedSplineProperties.cxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedSplineProperties.cxx
@@ -21,6 +21,8 @@
 #include "macros.hxx"
 #include "FastPropertyIdRanges.hxx"
 #include "DiagramHelper.hxx"
+#include <unonames.hxx>
+
 #include <com/sun/star/chart2/CurveStyle.hpp>
 #include <com/sun/star/beans/PropertyAttribute.hpp>
 
@@ -182,21 +184,21 @@ enum
 void WrappedSplineProperties::addProperties( ::std::vector< Property > & rOutProperties )
 {
     rOutProperties.push_back(
-        Property( "SplineType",
+        Property( CHART_UNONAME_SPLINE_TYPE,
                   PROP_CHART_SPLINE_TYPE,
                   ::getCppuType( reinterpret_cast< sal_Int32 * >(0)),
                   beans::PropertyAttribute::BOUND
                   | beans::PropertyAttribute::MAYBEDEFAULT
                   | beans::PropertyAttribute::MAYBEVOID ));
     rOutProperties.push_back(
-        Property( "SplineOrder",
+        Property( CHART_UNONAME_SPLINE_ORDER,
                   PROP_CHART_SPLINE_ORDER,
                   ::getCppuType( reinterpret_cast< sal_Int32 * >(0)),
                   beans::PropertyAttribute::BOUND
                   | beans::PropertyAttribute::MAYBEDEFAULT
                   | beans::PropertyAttribute::MAYBEVOID ));
     rOutProperties.push_back(
-        Property( "SplineResolution",
+        Property( CHART_UNONAME_SPLINE_RESOLUTION,
                   PROP_CHART_SPLINE_RESOLUTION,
                   ::getCppuType( reinterpret_cast< sal_Int32 * >(0)),
                   beans::PropertyAttribute::BOUND
@@ -208,12 +210,18 @@ void WrappedSplineProperties::addWrappedProperties( std::vector< WrappedProperty
                                     , ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact )
 {
     rList.push_back( new WrappedSplineTypeProperty( spChart2ModelContact ) );
-    rList.push_back( new WrappedSplineProperty<sal_Int32>( "SplineOrder", "SplineOrder", uno::makeAny(sal_Int32(3)), spChart2ModelContact ) );
-    rList.push_back( new WrappedSplineProperty<sal_Int32>( "SplineResolution", "CurveResolution", uno::makeAny(sal_Int32(20)), spChart2ModelContact ) );
+    rList.push_back(
+        new WrappedSplineProperty<sal_Int32>(
+            CHART_UNONAME_SPLINE_ORDER, "SplineOrder", // same name ?
+            uno::makeAny(sal_Int32(3)), spChart2ModelContact));
+    rList.push_back(
+        new WrappedSplineProperty<sal_Int32>(
+            CHART_UNONAME_SPLINE_RESOLUTION, "CurveResolution",
+            uno::makeAny(sal_Int32(20)), spChart2ModelContact));
 }
 
 WrappedSplineTypeProperty::WrappedSplineTypeProperty( ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact )
-    : WrappedSplineProperty<sal_Int32>( "SplineType", "CurveStyle", uno::makeAny(sal_Int32(0)), spChart2ModelContact )
+    : WrappedSplineProperty<sal_Int32>(CHART_UNONAME_SPLINE_TYPE, "CurveStyle", uno::makeAny(sal_Int32(0)), spChart2ModelContact )
 {
 }
 WrappedSplineTypeProperty::~WrappedSplineTypeProperty()
commit 0be6a5ef376e1841bf60658b41d0f56d07caf2a3
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date:   Fri Mar 28 09:10:55 2014 -0400

    Transfer back properties from the chart type object to template object.
    
    Change-Id: I3484a2ae0141087835e34e4e174bdc24b3357854

diff --git a/chart2/source/model/template/GL3DBarChartTypeTemplate.cxx b/chart2/source/model/template/GL3DBarChartTypeTemplate.cxx
index 163423a..2239997 100644
--- a/chart2/source/model/template/GL3DBarChartTypeTemplate.cxx
+++ b/chart2/source/model/template/GL3DBarChartTypeTemplate.cxx
@@ -125,6 +125,27 @@ uno::Reference<chart2::XChartType> GL3DBarChartTypeTemplate::getChartTypeForInde
     return xResult;
 }
 
+sal_Bool SAL_CALL GL3DBarChartTypeTemplate::matchesTemplate(
+    const css::uno::Reference<css::chart2::XDiagram>& xDiagram,
+    sal_Bool bAdaptProperties )
+    throw (css::uno::RuntimeException, std::exception)
+{
+    bool bResult = ChartTypeTemplate::matchesTemplate(xDiagram, bAdaptProperties);
+
+    if (bResult && bAdaptProperties)
+    {
+        uno::Reference<chart2::XChartType> xChartType = DiagramHelper::getChartTypeByIndex(xDiagram, 0);
+        uno::Reference<beans::XPropertySet> xPS(xChartType, uno::UNO_QUERY);
+        if (xPS.is())
+        {
+            setFastPropertyValue_NoBroadcast(
+                PROP_GL3DCHARTTYPE_ROUNDED_EDGE, xPS->getPropertyValue(CHART_UNONAME_ROUNDED_EDGE));
+        }
+    }
+
+    return bResult;
+}
+
 uno::Reference<chart2::XChartType>
 GL3DBarChartTypeTemplate::getChartTypeForNewSeries( const uno::Sequence<uno::Reference<chart2::XChartType> >& /*xOldChartTypes*/ )
     throw (::css::uno::RuntimeException, ::std::exception)
diff --git a/chart2/source/model/template/GL3DBarChartTypeTemplate.hxx b/chart2/source/model/template/GL3DBarChartTypeTemplate.hxx
index ba4943a..1651dec 100644
--- a/chart2/source/model/template/GL3DBarChartTypeTemplate.hxx
+++ b/chart2/source/model/template/GL3DBarChartTypeTemplate.hxx
@@ -38,6 +38,11 @@ public:
 
     // XChartTypeTemplate
 
+    virtual sal_Bool SAL_CALL matchesTemplate(
+        const css::uno::Reference<css::chart2::XDiagram>& xDiagram,
+        sal_Bool bAdaptProperties )
+        throw (css::uno::RuntimeException, std::exception);
+
     virtual css::uno::Reference<css::chart2::XChartType> SAL_CALL
         getChartTypeForNewSeries( const css::uno::Sequence<css::uno::Reference<css::chart2::XChartType> >& xOldChartTypes )
             throw (::css::uno::RuntimeException, ::std::exception) SAL_OVERRIDE;
commit cd1e89728218eeb1e6d478d9bd925e207cb83f0b
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date:   Fri Mar 28 09:10:22 2014 -0400

    Too long a line.
    
    Change-Id: I0b8f1b3b55cf0374ce1ff81d7798ea60848208d4

diff --git a/chart2/source/controller/dialogs/dlg_ChartType.cxx b/chart2/source/controller/dialogs/dlg_ChartType.cxx
index ea9a496..657225f 100644
--- a/chart2/source/controller/dialogs/dlg_ChartType.cxx
+++ b/chart2/source/controller/dialogs/dlg_ChartType.cxx
@@ -43,7 +43,13 @@ ChartTypeDialog::ChartTypeDialog( Window* pParent
     , m_xChartModel(xChartModel)
     , m_xCC( xContext )
 {
-    m_pChartTypeTabPage = new ChartTypeTabPage(get_content_area(),uno::Reference< XChartDocument >::query(m_xChartModel),m_xCC,true/*live update*/,true/*hide title description*/);
+    m_pChartTypeTabPage = new ChartTypeTabPage(
+        get_content_area(),
+        uno::Reference<XChartDocument>::query(m_xChartModel),
+        m_xCC,
+        true/*live update*/,
+        true/*hide title description*/);
+
     m_pChartTypeTabPage->initializePage();
     m_pChartTypeTabPage->Show();
  }
commit ef15c946998af91a88896d29903cb997a5e78ede
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date:   Thu Mar 27 22:04:28 2014 -0400

    Trying to move this RoundedEdge property from Diagram to GL3DBarChartType.
    
    Then things stop working. Go figure.
    
    Change-Id: I38893b20104537a64d279063c7b7dd708efb0d2f

diff --git a/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx b/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx
index 3160e3e..984a2ef 100644
--- a/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx
@@ -446,13 +446,6 @@ void lcl_AddPropertiesToVector(
                   ::getCppuType( reinterpret_cast< const OUString * >(0)),
                   beans::PropertyAttribute::BOUND
                   | beans::PropertyAttribute::MAYBEVOID ));
-
-    rOutProperties.push_back(
-         Property( CHART_UNONAME_ROUNDED_EDGE,
-                   PROP_DIAGRAM_ROUNDED_EDGE,
-                   ::getCppuBooleanType(),
-                   beans::PropertyAttribute::BOUND
-                   | beans::PropertyAttribute::MAYBEVOID));
 }
 
 struct StaticDiagramWrapperPropertyArray_Initializer
diff --git a/chart2/source/controller/dialogs/ChartTypeDialogController.cxx b/chart2/source/controller/dialogs/ChartTypeDialogController.cxx
index 031c468..c31ffc8 100644
--- a/chart2/source/controller/dialogs/ChartTypeDialogController.cxx
+++ b/chart2/source/controller/dialogs/ChartTypeDialogController.cxx
@@ -162,9 +162,15 @@ ChartTypeParameter ChartTypeDialogController::getChartTypeParameterForService(
         }
         catch( uno::Exception& ex )
         {
-            //not all templates need to support CGeometry3D
+            //not all templates need to support Geometry3D
             ex.Context.is();//to have debug information without compilation warnings
         }
+
+        try
+        {
+            xTemplateProps->getPropertyValue(CHART_UNONAME_ROUNDED_EDGE) >>= aRet.mbRoundedEdge;
+        }
+        catch ( const uno::Exception& ) {}
     }
     return aRet;
 }
@@ -303,6 +309,15 @@ uno::Reference< XChartTypeTemplate > ChartTypeDialogController::getCurrentTempla
                     //not all templates need to support Geometry3D
                     ex.Context.is();//to have debug information without compilation warnings
                 }
+
+                try
+                {
+                    xTemplateProps->setPropertyValue(CHART_UNONAME_ROUNDED_EDGE, uno::makeAny(rParameter.mbRoundedEdge));
+                }
+                catch ( const uno::Exception& )
+                {
+                }
+
                 try
                 {
                     this->setTemplateProperties( xTemplateProps );
@@ -343,7 +358,6 @@ bool ChartTypeDialogController::commitToModel( const ChartTypeParameter& rParame
         if (xDiaProp.is())
         {
             xDiaProp->setPropertyValue(CHART_UNONAME_SORT_BY_XVALUES, uno::makeAny(rParameter.bSortByXValues));
-            xDiaProp->setPropertyValue(CHART_UNONAME_ROUNDED_EDGE, uno::makeAny(rParameter.mbRoundedEdge));
         }
     }
     return false;
diff --git a/chart2/source/controller/dialogs/tp_ChartType.cxx b/chart2/source/controller/dialogs/tp_ChartType.cxx
index 5e111b8..0e313b6 100644
--- a/chart2/source/controller/dialogs/tp_ChartType.cxx
+++ b/chart2/source/controller/dialogs/tp_ChartType.cxx
@@ -834,7 +834,6 @@ void ChartTypeTabPage::stateChanged( ChangingResource* /*pResource*/ )
     {
         uno::Reference<beans::XPropertySet> xPropSet(xDiagram, uno::UNO_QUERY_THROW);
         xPropSet->getPropertyValue(CHART_UNONAME_SORT_BY_XVALUES) >>= aParameter.bSortByXValues;
-        xPropSet->getPropertyValue(CHART_UNONAME_ROUNDED_EDGE) >>= aParameter.mbRoundedEdge;
     }
     catch ( const uno::Exception& ex )
     {
@@ -901,7 +900,6 @@ void ChartTypeTabPage::selectMainType()
         {
             uno::Reference<beans::XPropertySet> xPropSet(xDiagram, uno::UNO_QUERY_THROW);
             xPropSet->getPropertyValue(CHART_UNONAME_SORT_BY_XVALUES) >>= aParameter.bSortByXValues;
-            xPropSet->getPropertyValue(CHART_UNONAME_ROUNDED_EDGE) >>= aParameter.mbRoundedEdge;
         }
         catch ( const uno::Exception& ex )
         {
@@ -986,7 +984,6 @@ void ChartTypeTabPage::initializePage()
             {
                 uno::Reference<beans::XPropertySet> xPropSet(xDiagram, uno::UNO_QUERY_THROW);
                 xPropSet->getPropertyValue(CHART_UNONAME_SORT_BY_XVALUES) >>= aParameter.bSortByXValues;
-                xPropSet->getPropertyValue(CHART_UNONAME_ROUNDED_EDGE) >>= aParameter.mbRoundedEdge;
             }
             catch (const uno::Exception& ex)
             {
diff --git a/chart2/source/model/main/Diagram.cxx b/chart2/source/model/main/Diagram.cxx
index 6c75a3f..f6beaa4 100644
--- a/chart2/source/model/main/Diagram.cxx
+++ b/chart2/source/model/main/Diagram.cxx
@@ -77,8 +77,7 @@ enum
     PROP_DIAGRAM_DATATABLEHBORDER,
     PROP_DIAGRAM_DATATABLEVBORDER,
     PROP_DIAGRAM_DATATABLEOUTLINE,
-    PROP_DIAGRAM_EXTERNALDATA,
-    PROP_DIAGRAM_ROUNDED_EDGE
+    PROP_DIAGRAM_EXTERNALDATA
 };
 
 void lcl_AddPropertiesToVector(
@@ -199,12 +198,6 @@ void lcl_AddPropertiesToVector(
                   PROP_DIAGRAM_EXTERNALDATA,
                   ::getCppuType( reinterpret_cast< const OUString   * >(0)),
                   beans::PropertyAttribute::MAYBEVOID ));
-
-   rOutProperties.push_back(
-        Property( CHART_UNONAME_ROUNDED_EDGE,
-                  PROP_DIAGRAM_ROUNDED_EDGE,
-                  ::getCppuBooleanType(),
-                  beans::PropertyAttribute::MAYBEVOID));
 }
 
 struct StaticDiagramDefaults_Initializer
@@ -227,7 +220,6 @@ private:
         ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_DIAGRAM_DATATABLEHBORDER, false );
         ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_DIAGRAM_DATATABLEVBORDER, false );
         ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_DIAGRAM_DATATABLEOUTLINE, false );
-        ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_DIAGRAM_ROUNDED_EDGE, false );
         ::chart::PropertyHelper::setPropertyValueDefault< sal_Int32 >( rOutMap, PROP_DIAGRAM_STARTING_ANGLE, 90 );
         ::chart::PropertyHelper::setPropertyValueDefault< sal_Int32 >( rOutMap, PROP_DIAGRAM_3DRELATIVEHEIGHT, 100 );
          ::chart::SceneProperties::AddDefaultsToMap( rOutMap );
diff --git a/chart2/source/model/template/GL3DBarChartTypeTemplate.cxx b/chart2/source/model/template/GL3DBarChartTypeTemplate.cxx
index 7f07028..163423a 100644
--- a/chart2/source/model/template/GL3DBarChartTypeTemplate.cxx
+++ b/chart2/source/model/template/GL3DBarChartTypeTemplate.cxx
@@ -11,14 +11,90 @@
 #include "GL3DBarChartType.hxx"
 
 #include <servicenames_charttypes.hxx>
+#include <PropertyHelper.hxx>
+#include <DiagramHelper.hxx>
+#include <unonames.hxx>
 #include <macros.hxx>
 
+#include <com/sun/star/beans/Property.hpp>
+#include <com/sun/star/beans/PropertyAttribute.hpp>
+
 using namespace com::sun::star;
 
 namespace chart {
 
+namespace {
+
+enum
+{
+    PROP_GL3DCHARTTYPE_ROUNDED_EDGE
+};
+
+struct DefaultsInitializer
+{
+    tPropertyValueMap* operator()()
+    {
+        static tPropertyValueMap aStaticDefaults;
+
+        if (aStaticDefaults.empty())
+            addDefaults(aStaticDefaults);
+
+        return &aStaticDefaults;
+    }
+private:
+
+    void addDefaults( tPropertyValueMap & rOutMap )
+    {
+        PropertyHelper::setPropertyValueDefault(rOutMap, PROP_GL3DCHARTTYPE_ROUNDED_EDGE, false);
+    }
+};
+
+struct Defaults : public rtl::StaticAggregate<tPropertyValueMap, DefaultsInitializer> {};
+
+struct InfoHelperInitializer
+{
+    cppu::OPropertyArrayHelper* operator()()
+    {
+        static cppu::OPropertyArrayHelper aHelper(getProperties());
+        return &aHelper;
+    }
+
+    uno::Sequence<beans::Property> getProperties()
+    {
+        uno::Sequence<beans::Property> aRet(1);
+
+        aRet[0] = beans::Property(
+            CHART_UNONAME_ROUNDED_EDGE,
+            PROP_GL3DCHARTTYPE_ROUNDED_EDGE,
+            ::getCppuBooleanType(),
+            beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT);
+
+        return aRet;
+    }
+};
+
+struct InfoHelper : public rtl::StaticAggregate<cppu::OPropertyArrayHelper, InfoHelperInitializer> {};
+
+struct ChartTypeInfoInitializer
+{
+    uno::Reference<beans::XPropertySetInfo>* operator()()
+    {
+        static uno::Reference<beans::XPropertySetInfo> xPropertySetInfo;
+
+        if (!xPropertySetInfo.is())
+            xPropertySetInfo = cppu::OPropertySetHelper::createPropertySetInfo(*InfoHelper::get());
+
+        return &xPropertySetInfo;
+    }
+};
+
+struct ChartTypeInfo : public rtl::StaticAggregate<uno::Reference<beans::XPropertySetInfo>, ChartTypeInfoInitializer> {};
+
+}
+
 GL3DBarChartTypeTemplate::GL3DBarChartTypeTemplate(
     const uno::Reference<uno::XComponentContext>& xContext, const OUString& rServiceName ) :
+    property::OPropertySet(m_aMutex),
     ChartTypeTemplate(xContext, rServiceName) {}
 
 GL3DBarChartTypeTemplate::~GL3DBarChartTypeTemplate() {}
@@ -33,6 +109,13 @@ uno::Reference<chart2::XChartType> GL3DBarChartTypeTemplate::getChartTypeForInde
             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())
+        {
+            xCTProp->setPropertyValue(
+                CHART_UNONAME_ROUNDED_EDGE, getFastPropertyValue(PROP_GL3DCHARTTYPE_ROUNDED_EDGE));
+        }
     }
     catch (const uno::Exception & ex)
     {
@@ -43,24 +126,29 @@ uno::Reference<chart2::XChartType> GL3DBarChartTypeTemplate::getChartTypeForInde
 }
 
 uno::Reference<chart2::XChartType>
-GL3DBarChartTypeTemplate::getChartTypeForNewSeries( const uno::Sequence<uno::Reference<chart2::XChartType> >& xOldChartTypes )
+GL3DBarChartTypeTemplate::getChartTypeForNewSeries( const uno::Sequence<uno::Reference<chart2::XChartType> >& /*xOldChartTypes*/ )
     throw (::css::uno::RuntimeException, ::std::exception)
 {
     uno::Reference<chart2::XChartType> xResult;
 
     try
     {
-        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()));
+        uno::Reference<beans::XPropertySet> xCTProp(xResult, uno::UNO_QUERY);
+        if (xCTProp.is())
+        {
+            bool bVal = false;
+            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
-        ChartTypeTemplate::copyPropertiesFromOldToNewCoordianteSystem(xOldChartTypes, xResult);
     }
     catch (const uno::Exception & ex)
     {
@@ -76,6 +164,27 @@ sal_Bool GL3DBarChartTypeTemplate::supportsCategories()
     return false;
 }
 
+css::uno::Any GL3DBarChartTypeTemplate::GetDefaultValue( sal_Int32 nHandle ) const
+    throw (css::beans::UnknownPropertyException)
+{
+    const tPropertyValueMap& rDefaults = *Defaults::get();
+    tPropertyValueMap::const_iterator it = rDefaults.find(nHandle);
+    return it == rDefaults.end() ? uno::Any() : it->second;
+}
+
+cppu::IPropertyArrayHelper& GL3DBarChartTypeTemplate::getInfoHelper()
+{
+    return *InfoHelper::get();
+}
+
+css::uno::Reference<css::beans::XPropertySetInfo> GL3DBarChartTypeTemplate::getPropertySetInfo()
+    throw (css::uno::RuntimeException, std::exception)
+{
+    return *ChartTypeInfo::get();
+}
+
+IMPLEMENT_FORWARD_XINTERFACE2(GL3DBarChartTypeTemplate, ChartTypeTemplate, OPropertySet)
+
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/model/template/GL3DBarChartTypeTemplate.hxx b/chart2/source/model/template/GL3DBarChartTypeTemplate.hxx
index 78e7a74..ba4943a 100644
--- a/chart2/source/model/template/GL3DBarChartTypeTemplate.hxx
+++ b/chart2/source/model/template/GL3DBarChartTypeTemplate.hxx
@@ -13,13 +13,20 @@
 #include <MutexContainer.hxx>
 #include <ChartTypeTemplate.hxx>
 #include <OPropertySet.hxx>
+#include <MutexContainer.hxx>
 #include <ServiceMacros.hxx>
 
+#include <comphelper/uno3.hxx>
+
 namespace chart {
 
-class GL3DBarChartTypeTemplate : public ChartTypeTemplate
+class GL3DBarChartTypeTemplate :
+    public MutexContainer, public property::OPropertySet, public ChartTypeTemplate
 {
 public:
+
+    DECLARE_XINTERFACE()
+
     GL3DBarChartTypeTemplate(
         const css::uno::Reference<
             css::uno::XComponentContext>& xContext,
@@ -37,6 +44,17 @@ public:
 
     virtual sal_Bool SAL_CALL supportsCategories()
         throw (::css::uno::RuntimeException, ::std::exception) SAL_OVERRIDE;
+
+    // OPropertySet
+    virtual css::uno::Any GetDefaultValue( sal_Int32 nHandle ) const
+        throw (css::beans::UnknownPropertyException);
+
+    virtual cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper();
+
+    // XPropertySet
+    virtual css::uno::Reference<css::beans::XPropertySetInfo> SAL_CALL
+        getPropertySetInfo()
+            throw (css::uno::RuntimeException, std::exception);
 };
 
 }
diff --git a/chart2/source/view/charttypes/GL3DBarChart.cxx b/chart2/source/view/charttypes/GL3DBarChart.cxx
index 7b02bcc..62f189a 100644
--- a/chart2/source/view/charttypes/GL3DBarChart.cxx
+++ b/chart2/source/view/charttypes/GL3DBarChart.cxx
@@ -8,6 +8,7 @@
  */
 
 #include "GL3DBarChart.hxx"
+#include <unonames.hxx>
 
 #include <com/sun/star/chart2/data/XDataSequence.hpp>
 #include <com/sun/star/chart2/data/LabelOrigin.hpp>
@@ -27,6 +28,18 @@ GL3DBarChart::~GL3DBarChart()
 
 void GL3DBarChart::createShapes()
 {
+    fprintf(stdout, "GL3DBarChart::createShapes:   type = '%s'\n",
+            rtl::OUStringToOString(m_xChartTypeModel->getChartType(), RTL_TEXTENCODING_UTF8).getStr());
+
+    uno::Reference<beans::XPropertySet> xPropSet(m_xChartTypeModel, uno::UNO_QUERY);
+    if (xPropSet.is())
+    {
+        bool bRoundedEdge = false;
+        if (xPropSet->getPropertyValue(CHART_UNONAME_ROUNDED_EDGE) >>= bRoundedEdge)
+            fprintf(stdout, "GL3DBarChart::createShapes:   rounded edge = %d (%p)\n", bRoundedEdge, m_xChartTypeModel.get());
+    }
+
+#if 0
     if (m_pExplicitCategoriesProvider)
     {
         uno::Reference<chart2::data::XDataSequence> xCats = m_pExplicitCategoriesProvider->getOriginalCategories();
@@ -56,13 +69,11 @@ void GL3DBarChart::createShapes()
                 rtl::OUStringToOString(pSeries->getSeriesParticle(), RTL_TEXTENCODING_UTF8).getStr());
 
         uno::Sequence<double> aXValues = pSeries->getAllX();
-        for (size_t j = 0; j < aXValues.getLength(); ++j)
-            fprintf(stdout, "GL3DBarChart::createShapes:     x = %g\n", aXValues[j]);
-
         uno::Sequence<double> aYValues = pSeries->getAllY();
-        for (size_t j = 0; j < aYValues.getLength(); ++j)
-            fprintf(stdout, "GL3DBarChart::createShapes:     y = %g\n", aYValues[j]);
+        for (size_t j = 0; j < aXValues.getLength(); ++j)
+            fprintf(stdout, "GL3DBarChart::createShapes:     (x=%g,y=%g)\n", aXValues[j], aYValues[j]);
     }
+#endif
 }
 
 }
commit 91e1497abc4fd2817b56eb1e77ddd8fd2691a199
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date:   Thu Mar 27 15:34:27 2014 -0400

    Some debugging output of GL chart.
    
    Change-Id: Ia216358085378b449626f9c9f36e63a65b7a2669

diff --git a/chart2/source/view/charttypes/GL3DBarChart.cxx b/chart2/source/view/charttypes/GL3DBarChart.cxx
index bd0250b..7b02bcc 100644
--- a/chart2/source/view/charttypes/GL3DBarChart.cxx
+++ b/chart2/source/view/charttypes/GL3DBarChart.cxx
@@ -9,6 +9,11 @@
 
 #include "GL3DBarChart.hxx"
 
+#include <com/sun/star/chart2/data/XDataSequence.hpp>
+#include <com/sun/star/chart2/data/LabelOrigin.hpp>
+
+using namespace com::sun::star;
+
 namespace chart {
 
 GL3DBarChart::GL3DBarChart( const css::uno::Reference<css::chart2::XChartType>& xChartTypeModel ) :
@@ -22,6 +27,42 @@ GL3DBarChart::~GL3DBarChart()
 
 void GL3DBarChart::createShapes()
 {
+    if (m_pExplicitCategoriesProvider)
+    {
+        uno::Reference<chart2::data::XDataSequence> xCats = m_pExplicitCategoriesProvider->getOriginalCategories();
+
+        OUString aSrcRange = xCats->getSourceRangeRepresentation();
+
+        fprintf(stdout, "GL3DBarChart::createShapes:   source range = '%s'\n", rtl::OUStringToOString(aSrcRange, RTL_TEXTENCODING_UTF8).getStr());
+
+        uno::Sequence<OUString> aCats = m_pExplicitCategoriesProvider->getSimpleCategories();
+        for (sal_Int32 i = 0; i < aCats.getLength(); ++i)
+            fprintf(stdout, "GL3DBarChart::createShapes:   category = '%s'\n", rtl::OUStringToOString(aCats[i], RTL_TEXTENCODING_UTF8).getStr());
+    }
+
+    uno::Sequence<OUString> aSeriesNames = getSeriesNames();
+    fprintf(stdout, "GL3DBarChart::createShapes:   series name count = %d\n", aSeriesNames.getLength());
+    for (sal_Int32 i = 0; i < aSeriesNames.getLength(); ++i)
+        fprintf(stdout, "GL3DBarChart::createShapes:   name = '%s'\n", rtl::OUStringToOString(aSeriesNames[i], RTL_TEXTENCODING_UTF8).getStr());
+
+    std::vector<VDataSeries*> aAllSeries = getAllSeries();
+    fprintf(stdout, "GL3DBarChart::createShapes:   series count = %d\n", aAllSeries.size());
+    for (size_t i = 0, n = aAllSeries.size(); i < n; ++i)
+    {
+        const VDataSeries* pSeries = aAllSeries[i];
+        fprintf(stdout, "GL3DBarChart::createShapes:   series %d: cid = '%s'  particle = '%s'\n",
+                i,
+                rtl::OUStringToOString(pSeries->getCID(), RTL_TEXTENCODING_UTF8).getStr(),
+                rtl::OUStringToOString(pSeries->getSeriesParticle(), RTL_TEXTENCODING_UTF8).getStr());
+
+        uno::Sequence<double> aXValues = pSeries->getAllX();
+        for (size_t j = 0; j < aXValues.getLength(); ++j)
+            fprintf(stdout, "GL3DBarChart::createShapes:     x = %g\n", aXValues[j]);
+
+        uno::Sequence<double> aYValues = pSeries->getAllY();
+        for (size_t j = 0; j < aYValues.getLength(); ++j)
+            fprintf(stdout, "GL3DBarChart::createShapes:     y = %g\n", aYValues[j]);
+    }
 }
 
 }
commit 68e20faf3f05038301269870f61205785227450a
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date:   Thu Mar 27 13:47:15 2014 -0400

    Start using common symbols for textural UNO property names.
    
    This will make it easier to track all uses of a UNO property name using
    symbol database lookup, which is much faster and more accurate than grepping.
    
    Change-Id: I8c2857504c29bcce01eb8c1f406dcbfb24331510

diff --git a/chart2/inc/unonames.hxx b/chart2/inc/unonames.hxx
new file mode 100644
index 0000000..6f800f8
--- /dev/null
+++ b/chart2/inc/unonames.hxx
@@ -0,0 +1,18 @@
+/* -*- 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_UNONAMES_HXX
+#define CHART2_UNONAMES_HXX
+
+#define CHART_UNONAME_SORT_BY_XVALUES "SortByXValues"
+#define CHART_UNONAME_ROUNDED_EDGE "RoundedEdge"
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx b/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx
index 5ea89aa..3160e3e 100644
--- a/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx
@@ -47,6 +47,7 @@
 #include <comphelper/InlineContainer.hxx>
 #include "WrappedAutomaticPositionProperties.hxx"
 #include "CommonConverters.hxx"
+#include <unonames.hxx>
 
 #include <com/sun/star/beans/PropertyAttribute.hpp>
 #include <com/sun/star/chart2/XTitled.hpp>
@@ -230,7 +231,7 @@ void lcl_AddPropertiesToVector(
 
     //new for XY charts
     rOutProperties.push_back(
-        Property( "SortByXValues",
+        Property( CHART_UNONAME_SORT_BY_XVALUES,
                   PROP_DIAGRAM_SORT_BY_X_VALUES,
                   ::getBooleanCppuType(),
                   beans::PropertyAttribute::BOUND
@@ -447,7 +448,7 @@ void lcl_AddPropertiesToVector(
                   | beans::PropertyAttribute::MAYBEVOID ));
 
     rOutProperties.push_back(
-         Property( "RoundedEdge",
+         Property( CHART_UNONAME_ROUNDED_EDGE,
                    PROP_DIAGRAM_ROUNDED_EDGE,
                    ::getCppuBooleanType(),
                    beans::PropertyAttribute::BOUND
diff --git a/chart2/source/controller/dialogs/ChartTypeDialogController.cxx b/chart2/source/controller/dialogs/ChartTypeDialogController.cxx
index 4ade1fd..031c468 100644
--- a/chart2/source/controller/dialogs/ChartTypeDialogController.cxx
+++ b/chart2/source/controller/dialogs/ChartTypeDialogController.cxx
@@ -27,6 +27,7 @@
 #include "DiagramHelper.hxx"
 #include "ControllerLockGuard.hxx"
 #include "AxisHelper.hxx"
+#include <unonames.hxx>
 
 #include <com/sun/star/chart2/DataPointGeometry3D.hpp>
 #include <com/sun/star/chart2/PieChartOffsetMode.hpp>
@@ -341,8 +342,8 @@ bool ChartTypeDialogController::commitToModel( const ChartTypeParameter& rParame
         uno::Reference<beans::XPropertySet> xDiaProp(xDiagram, uno::UNO_QUERY);
         if (xDiaProp.is())
         {
-            xDiaProp->setPropertyValue("SortByXValues" , uno::makeAny(rParameter.bSortByXValues));
-            xDiaProp->setPropertyValue("RoundedEdge", uno::makeAny(rParameter.mbRoundedEdge));
+            xDiaProp->setPropertyValue(CHART_UNONAME_SORT_BY_XVALUES, uno::makeAny(rParameter.bSortByXValues));
+            xDiaProp->setPropertyValue(CHART_UNONAME_ROUNDED_EDGE, uno::makeAny(rParameter.mbRoundedEdge));
         }
     }
     return false;
diff --git a/chart2/source/controller/dialogs/tp_ChartType.cxx b/chart2/source/controller/dialogs/tp_ChartType.cxx
index 104fe0e..5e111b8 100644
--- a/chart2/source/controller/dialogs/tp_ChartType.cxx
+++ b/chart2/source/controller/dialogs/tp_ChartType.cxx
@@ -26,6 +26,7 @@
 #include "ControllerLockGuard.hxx"
 #include "macros.hxx"
 #include "GL3DBarChartDialogController.hxx"
+#include <unonames.hxx>
 
 #include <svtools/controldims.hrc>
 
@@ -832,8 +833,8 @@ void ChartTypeTabPage::stateChanged( ChangingResource* /*pResource*/ )
     try
     {
         uno::Reference<beans::XPropertySet> xPropSet(xDiagram, uno::UNO_QUERY_THROW);
-        xPropSet->getPropertyValue("SortByXValues") >>= aParameter.bSortByXValues;
-        xPropSet->getPropertyValue("RoundedEdge") >>= aParameter.mbRoundedEdge;
+        xPropSet->getPropertyValue(CHART_UNONAME_SORT_BY_XVALUES) >>= aParameter.bSortByXValues;
+        xPropSet->getPropertyValue(CHART_UNONAME_ROUNDED_EDGE) >>= aParameter.mbRoundedEdge;
     }
     catch ( const uno::Exception& ex )
     {
@@ -899,8 +900,8 @@ void ChartTypeTabPage::selectMainType()
         try
         {
             uno::Reference<beans::XPropertySet> xPropSet(xDiagram, uno::UNO_QUERY_THROW);
-            xPropSet->getPropertyValue("SortByXValues") >>= aParameter.bSortByXValues;
-            xPropSet->getPropertyValue("RoundedEdge") >>= aParameter.mbRoundedEdge;
+            xPropSet->getPropertyValue(CHART_UNONAME_SORT_BY_XVALUES) >>= aParameter.bSortByXValues;
+            xPropSet->getPropertyValue(CHART_UNONAME_ROUNDED_EDGE) >>= aParameter.mbRoundedEdge;
         }
         catch ( const uno::Exception& ex )
         {
@@ -984,8 +985,8 @@ void ChartTypeTabPage::initializePage()
             try
             {
                 uno::Reference<beans::XPropertySet> xPropSet(xDiagram, uno::UNO_QUERY_THROW);
-                xPropSet->getPropertyValue("SortByXValues") >>= aParameter.bSortByXValues;
-                xPropSet->getPropertyValue("RoundedEdge") >>= aParameter.mbRoundedEdge;
+                xPropSet->getPropertyValue(CHART_UNONAME_SORT_BY_XVALUES) >>= aParameter.bSortByXValues;
+                xPropSet->getPropertyValue(CHART_UNONAME_ROUNDED_EDGE) >>= aParameter.mbRoundedEdge;
             }
             catch (const uno::Exception& ex)
             {
diff --git a/chart2/source/model/main/Diagram.cxx b/chart2/source/model/main/Diagram.cxx
index 157df26..6c75a3f 100644
--- a/chart2/source/model/main/Diagram.cxx
+++ b/chart2/source/model/main/Diagram.cxx
@@ -31,6 +31,8 @@
 #include "SceneProperties.hxx"
 #include "DisposeHelper.hxx"
 #include "BaseGFXHelper.hxx"
+#include <unonames.hxx>
+
 #include <basegfx/numeric/ftools.hxx>
 #include <rtl/instance.hxx>
 #include <com/sun/star/beans/PropertyAttribute.hpp>
@@ -104,7 +106,7 @@ void lcl_AddPropertiesToVector(
                   | beans::PropertyAttribute::MAYBEDEFAULT ));
 
     rOutProperties.push_back(
-        Property( "SortByXValues",
+        Property( CHART_UNONAME_SORT_BY_XVALUES,
                   PROP_DIAGRAM_SORT_BY_X_VALUES,
                   ::getBooleanCppuType(),
                   beans::PropertyAttribute::BOUND
@@ -199,7 +201,7 @@ void lcl_AddPropertiesToVector(
                   beans::PropertyAttribute::MAYBEVOID ));
 
    rOutProperties.push_back(
-        Property( "RoundedEdge",
+        Property( CHART_UNONAME_ROUNDED_EDGE,
                   PROP_DIAGRAM_ROUNDED_EDGE,
                   ::getCppuBooleanType(),
                   beans::PropertyAttribute::MAYBEVOID));
diff --git a/chart2/source/model/template/GL3DBarChartType.cxx b/chart2/source/model/template/GL3DBarChartType.cxx
index 4dc4e46..4e8868c 100644
--- a/chart2/source/model/template/GL3DBarChartType.cxx
+++ b/chart2/source/model/template/GL3DBarChartType.cxx
@@ -10,6 +10,7 @@
 #include "GL3DBarChartType.hxx"
 #include <servicenames_charttypes.hxx>
 #include <PropertyHelper.hxx>
+#include <unonames.hxx>
 
 #include <com/sun/star/beans/Property.hpp>
 #include <com/sun/star/beans/PropertyAttribute.hpp>
@@ -59,7 +60,7 @@ struct InfoHelperInitializer
         uno::Sequence<beans::Property> aRet(1);
 
         aRet[0] = beans::Property(
-            "RoundedEdge",
+            CHART_UNONAME_ROUNDED_EDGE,
             PROP_GL3DCHARTTYPE_ROUNDED_EDGE,
             ::getCppuBooleanType(),
             beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT);
diff --git a/chart2/source/view/main/ChartView.cxx b/chart2/source/view/main/ChartView.cxx
index 0490567..ae0929d 100644
--- a/chart2/source/view/main/ChartView.cxx
+++ b/chart2/source/view/main/ChartView.cxx
@@ -47,6 +47,7 @@
 #include "DataSeriesHelper.hxx"
 #include "DateHelper.hxx"
 #include "defines.hxx"
+#include <unonames.hxx>
 
 #include <rtl/uuid.h>
 #include <comphelper/scopeguard.hxx>
@@ -141,7 +142,7 @@ void debugGL3DOutput( ChartModel& rModel )
     {
         uno::Reference<beans::XPropertySet> xPropSet(xDiagram, uno::UNO_QUERY_THROW);
         bool bRoundedEdge = false;
-        xPropSet->getPropertyValue("RoundedEdge") >>= bRoundedEdge;
+        xPropSet->getPropertyValue(CHART_UNONAME_ROUNDED_EDGE) >>= bRoundedEdge;
 
         fprintf(stdout, "GL3D: rounded edge = %d\n", bRoundedEdge);
     }
@@ -628,7 +629,7 @@ void SeriesPlotterContainer::initializeCooSysAndSeriesPlotter(
     try
     {
         uno::Reference< beans::XPropertySet > xDiaProp( xDiagram, uno::UNO_QUERY_THROW );
-        xDiaProp->getPropertyValue( "SortByXValues" ) >>= bSortByXValues;
+        xDiaProp->getPropertyValue(CHART_UNONAME_SORT_BY_XVALUES) >>= bSortByXValues;
         xDiaProp->getPropertyValue( "ConnectBars" ) >>= bConnectBars;
         xDiaProp->getPropertyValue( "GroupBarsPerAxis" ) >>= bGroupBarsPerAxis;
         xDiaProp->getPropertyValue( "IncludeHiddenCells" ) >>= bIncludeHiddenCells;
commit 801e399f95a4da6101c8570455860fd537a90b95
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date:   Thu Mar 27 10:35:15 2014 -0400

    Add a means to debug the internal state of the diagram object.
    
    Until we can render this new GL chart for real.
    
    Change-Id: Iaf1a5fb903572c33d512705c9073b3795187f89b

diff --git a/chart2/source/view/main/ChartView.cxx b/chart2/source/view/main/ChartView.cxx
index 67404e0..0490567 100644
--- a/chart2/source/view/main/ChartView.cxx
+++ b/chart2/source/view/main/ChartView.cxx
@@ -121,9 +121,34 @@ using ::com::sun::star::uno::Reference;
 using ::com::sun::star::uno::Sequence;
 using ::com::sun::star::uno::Any;
 
-namespace
+namespace {
+
+class theExplicitValueProviderUnoTunnelId  : public rtl::Static<UnoTunnelIdInit, theExplicitValueProviderUnoTunnelId> {};
+
+#if ENABLE_GL3D_BARCHART
+
+/**
+ * Only used for initial debugging of the new GL chart (until we can
+ * visualize it).
+ */
+void debugGL3DOutput( ChartModel& rModel )
 {
-    class theExplicitValueProviderUnoTunnelId  : public rtl::Static< UnoTunnelIdInit, theExplicitValueProviderUnoTunnelId > {};
+    uno::Reference<XDiagram> xDiagram = rModel.getFirstDiagram();
+    if (!xDiagram.is())
+        return;
+
+    try
+    {
+        uno::Reference<beans::XPropertySet> xPropSet(xDiagram, uno::UNO_QUERY_THROW);
+        bool bRoundedEdge = false;
+        xPropSet->getPropertyValue("RoundedEdge") >>= bRoundedEdge;
+
+        fprintf(stdout, "GL3D: rounded edge = %d\n", bRoundedEdge);
+    }
+    catch (...) {}
+}
+
+#endif
 
 }
 
@@ -2381,6 +2406,10 @@ void ChartView::createShapes()
         maTimeBased.bTimeBased = true;
     }
 
+#if ENABLE_GL3D_BARCHART
+    debugGL3DOutput(mrChartModel);
+#endif
+
     //make sure add-in is refreshed after creating the shapes
     const ::comphelper::ScopeGuard aGuard( boost::bind( &ChartView::impl_refreshAddIn, this ) );
     if( impl_AddInDrawsAllByItself() )


More information about the Libreoffice-commits mailing list