chart2/inc/unonames.hxx | 7 ++- chart2/source/controller/chartapiwrapper/WrappedSplineProperties.cxx | 20 +++++++--- 2 files changed, 19 insertions(+), 8 deletions(-)
New commits: commit 57ed781d20fa23b4627fc10e148b83ec839a9497 Author: Kohei Yoshida <kohei.yosh...@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 13a7560..baa7683 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() _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits