Kaydet (Commit) de7c0f31 authored tarafından Kohei Yoshida's avatar Kohei Yoshida

Let's use define constants here rather than string values....

Easier to keep track of their call sites.

Change-Id: I5f874194425ae8f5043bef45cce63a5e1d51a400
üst 0be6a5ef
......@@ -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
......
......@@ -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()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment