summaryrefslogtreecommitdiff
path: root/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx')
-rw-r--r--chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx220
1 files changed, 110 insertions, 110 deletions
diff --git a/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx b/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx
index e49239935c6d..fe2552f7f5b4 100644
--- a/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx
@@ -19,8 +19,11 @@
#include "DataSeriesPointWrapper.hxx"
#include "Chart2ModelContact.hxx"
+#include <ChartType.hxx>
#include <ChartTypeHelper.hxx>
#include <DiagramHelper.hxx>
+#include <DataSeries.hxx>
+#include <DataSeriesProperties.hxx>
#include <LinePropertiesHelper.hxx>
#include <FillProperties.hxx>
#include <CharacterProperties.hxx>
@@ -37,6 +40,7 @@
#include "WrappedTextRotationProperty.hxx"
#include <unonames.hxx>
+#include <o3tl/safeint.hxx>
#include <rtl/math.hxx>
#include <algorithm>
@@ -45,6 +49,7 @@
#include <com/sun/star/chart/ChartAxisAssign.hpp>
#include <com/sun/star/chart/ChartErrorCategory.hpp>
#include <com/sun/star/chart/ChartSymbolType.hpp>
+#include <com/sun/star/chart2/XDataSeries.hpp>
#include <com/sun/star/drawing/LineJoint.hpp>
#include <com/sun/star/drawing/LineStyle.hpp>
#include <com/sun/star/drawing/FillStyle.hpp>
@@ -55,6 +60,7 @@
using namespace ::com::sun::star;
using namespace ::chart::wrapper;
+using namespace ::chart::DataSeriesProperties;
using ::com::sun::star::uno::Reference;
using ::com::sun::star::uno::Sequence;
@@ -243,30 +249,16 @@ uno::Sequence< Property > lcl_GetPropertySequence( DataSeriesPointWrapper::eType
return comphelper::containerToSequence( aProperties );
}
-struct StaticSeriesWrapperPropertyArray_Initializer
+const Sequence< Property >& StaticSeriesWrapperPropertyArray()
{
- Sequence< Property >* operator()()
- {
- static Sequence< Property > aPropSeq( lcl_GetPropertySequence( DataSeriesPointWrapper::DATA_SERIES ) );
- return &aPropSeq;
- }
+ static Sequence< Property > aPropSeq( lcl_GetPropertySequence( DataSeriesPointWrapper::DATA_SERIES ) );
+ return aPropSeq;
};
-struct StaticSeriesWrapperPropertyArray : public rtl::StaticAggregate< Sequence< Property >, StaticSeriesWrapperPropertyArray_Initializer >
-{
-};
-
-struct StaticPointWrapperPropertyArray_Initializer
-{
- Sequence< Property >* operator()()
- {
- static Sequence< Property > aPropSeq( lcl_GetPropertySequence( DataSeriesPointWrapper::DATA_POINT ) );
- return &aPropSeq;
- }
-};
-
-struct StaticPointWrapperPropertyArray : public rtl::StaticAggregate< Sequence< Property >, StaticPointWrapperPropertyArray_Initializer >
+const Sequence< Property >& StaticPointWrapperPropertyArray()
{
+ static Sequence< Property > aPropSeq( lcl_GetPropertySequence( DataSeriesPointWrapper::DATA_POINT ) );
+ return aPropSeq;
};
//PROP_SERIES_ATTACHED_AXIS
@@ -287,7 +279,7 @@ protected:
WrappedAttachedAxisProperty::WrappedAttachedAxisProperty(
const std::shared_ptr<Chart2ModelContact>& spChart2ModelContact )
- : WrappedProperty("Axis",OUString())
+ : WrappedProperty(u"Axis"_ustr,OUString())
, m_spChart2ModelContact( spChart2ModelContact )
{
}
@@ -303,8 +295,8 @@ Any WrappedAttachedAxisProperty::getPropertyValue( const Reference< beans::XProp
{
Any aRet;
- uno::Reference< chart2::XDataSeries > xDataSeries( xInnerPropertySet, uno::UNO_QUERY );
- bool bAttachedToMainAxis = ::chart::DiagramHelper::isSeriesAttachedToMainAxis( xDataSeries );
+ rtl::Reference< ::chart::DataSeries > xDataSeries( dynamic_cast<::chart::DataSeries*>(xInnerPropertySet.get()) );
+ bool bAttachedToMainAxis = xDataSeries->isAttachedToMainAxis();
if( bAttachedToMainAxis )
aRet <<= css::chart::ChartAxisAssign::PRIMARY_Y;
else
@@ -314,20 +306,20 @@ Any WrappedAttachedAxisProperty::getPropertyValue( const Reference< beans::XProp
void WrappedAttachedAxisProperty::setPropertyValue( const Any& rOuterValue, const Reference< beans::XPropertySet >& xInnerPropertySet ) const
{
- uno::Reference< chart2::XDataSeries > xDataSeries( xInnerPropertySet, uno::UNO_QUERY );
+ rtl::Reference< ::chart::DataSeries > xDataSeries( dynamic_cast<::chart::DataSeries*>(xInnerPropertySet.get()) );
sal_Int32 nChartAxisAssign = css::chart::ChartAxisAssign::PRIMARY_Y;
if( ! (rOuterValue >>= nChartAxisAssign) )
- throw lang::IllegalArgumentException("Property Axis requires value of type sal_Int32", nullptr, 0 );
+ throw lang::IllegalArgumentException(u"Property Axis requires value of type sal_Int32"_ustr, nullptr, 0 );
bool bNewAttachedToMainAxis = nChartAxisAssign == css::chart::ChartAxisAssign::PRIMARY_Y;
- bool bOldAttachedToMainAxis = ::chart::DiagramHelper::isSeriesAttachedToMainAxis( xDataSeries );
+ bool bOldAttachedToMainAxis = xDataSeries->isAttachedToMainAxis();
if( bNewAttachedToMainAxis != bOldAttachedToMainAxis)
{
rtl::Reference< ::chart::Diagram > xDiagram( m_spChart2ModelContact->getDiagram() );
if( xDiagram.is() )
- ::chart::DiagramHelper::attachSeriesToAxis( bNewAttachedToMainAxis, xDataSeries, xDiagram, m_spChart2ModelContact->m_xContext, false );
+ xDiagram->attachSeriesToAxis( bNewAttachedToMainAxis, xDataSeries, m_spChart2ModelContact->m_xContext, false );
}
}
@@ -342,7 +334,7 @@ protected:
};
WrappedSegmentOffsetProperty::WrappedSegmentOffsetProperty() :
- WrappedProperty("SegmentOffset","Offset")
+ WrappedProperty(u"SegmentOffset"_ustr,u"Offset"_ustr)
{}
Any WrappedSegmentOffsetProperty::convertInnerToOuterValue( const Any& rInnerValue ) const
@@ -387,7 +379,7 @@ protected:
WrappedLineColorProperty::WrappedLineColorProperty(
DataSeriesPointWrapper* pDataSeriesPointWrapper )
- : WrappedSeriesAreaOrLineProperty("LineColor","BorderColor","Color", pDataSeriesPointWrapper )
+ : WrappedSeriesAreaOrLineProperty(u"LineColor"_ustr,u"BorderColor"_ustr,u"Color"_ustr, pDataSeriesPointWrapper )
, m_pDataSeriesPointWrapper( pDataSeriesPointWrapper )
, m_aDefaultValue(uno::Any(sal_Int32( 0x0099ccff ))) // blue 8
{
@@ -428,7 +420,7 @@ protected:
WrappedLineStyleProperty::WrappedLineStyleProperty(
DataSeriesPointWrapper* pDataSeriesPointWrapper )
- : WrappedSeriesAreaOrLineProperty("LineStyle","BorderStyle", "LineStyle", pDataSeriesPointWrapper )
+ : WrappedSeriesAreaOrLineProperty(u"LineStyle"_ustr,u"BorderStyle"_ustr, u"LineStyle"_ustr, pDataSeriesPointWrapper )
, m_pDataSeriesPointWrapper( pDataSeriesPointWrapper )
{
}
@@ -454,9 +446,8 @@ void WrappedLineStyleProperty::setPropertyToDefault( const Reference< beans::XPr
namespace chart::wrapper
{
-DataSeriesPointWrapper::DataSeriesPointWrapper(const std::shared_ptr<Chart2ModelContact>& spChart2ModelContact)
- : m_spChart2ModelContact( spChart2ModelContact )
- , m_aEventListenerContainer( m_aMutex )
+DataSeriesPointWrapper::DataSeriesPointWrapper( std::shared_ptr<Chart2ModelContact> spChart2ModelContact)
+ : m_spChart2ModelContact( std::move(spChart2ModelContact) )
, m_eType( DATA_SERIES )
, m_nSeriesIndexInNewAPI( -1 )
, m_nPointIndex( -1 )
@@ -473,14 +464,18 @@ void SAL_CALL DataSeriesPointWrapper::initialize( const uno::Sequence< uno::Any
m_nPointIndex = -1;
if( aArguments.hasElements() )
{
- aArguments[0] >>= m_xDataSeries;
+ uno::Reference<chart2::XDataSeries> xTmp;
+ aArguments[0] >>= xTmp;
+ auto p = dynamic_cast<DataSeries*>(xTmp.get());
+ assert(p);
+ m_xDataSeries = p;
if( aArguments.getLength() >= 2 )
aArguments[1] >>= m_nPointIndex;
}
if( !m_xDataSeries.is() )
throw uno::Exception(
- "DataSeries index invalid", static_cast< ::cppu::OWeakObject * >( this ));
+ u"DataSeries index invalid"_ustr, static_cast< ::cppu::OWeakObject * >( this ));
//todo: check upper border of point index
@@ -493,9 +488,8 @@ void SAL_CALL DataSeriesPointWrapper::initialize( const uno::Sequence< uno::Any
DataSeriesPointWrapper::DataSeriesPointWrapper(eType _eType,
sal_Int32 nSeriesIndexInNewAPI ,
sal_Int32 nPointIndex, //ignored for series
- const std::shared_ptr<Chart2ModelContact>& spChart2ModelContact)
- : m_spChart2ModelContact( spChart2ModelContact )
- , m_aEventListenerContainer( m_aMutex )
+ std::shared_ptr<Chart2ModelContact> spChart2ModelContact)
+ : m_spChart2ModelContact( std::move(spChart2ModelContact) )
, m_eType( _eType )
, m_nSeriesIndexInNewAPI( nSeriesIndexInNewAPI )
, m_nPointIndex( (_eType == DATA_POINT) ? nPointIndex : -1 )
@@ -510,8 +504,9 @@ DataSeriesPointWrapper::~DataSeriesPointWrapper()
// ____ XComponent ____
void SAL_CALL DataSeriesPointWrapper::dispose()
{
+ std::unique_lock g(m_aMutex);
uno::Reference< uno::XInterface > xSource( static_cast< ::cppu::OWeakObject* >( this ) );
- m_aEventListenerContainer.disposeAndClear( lang::EventObject( xSource ) );
+ m_aEventListenerContainer.disposeAndClear( g, lang::EventObject( xSource ) );
m_xDataSeries.clear();
clearWrappedPropertySet();
@@ -520,13 +515,15 @@ void SAL_CALL DataSeriesPointWrapper::dispose()
void SAL_CALL DataSeriesPointWrapper::addEventListener(
const uno::Reference< lang::XEventListener >& xListener )
{
- m_aEventListenerContainer.addInterface( xListener );
+ std::unique_lock g(m_aMutex);
+ m_aEventListenerContainer.addInterface( g, xListener );
}
void SAL_CALL DataSeriesPointWrapper::removeEventListener(
const uno::Reference< lang::XEventListener >& aListener )
{
- m_aEventListenerContainer.removeInterface( aListener );
+ std::unique_lock g(m_aMutex);
+ m_aEventListenerContainer.removeInterface( g, aListener );
}
// ____ XEventListener ____
@@ -536,24 +533,25 @@ void SAL_CALL DataSeriesPointWrapper::disposing( const lang::EventObject& /*Sour
bool DataSeriesPointWrapper::isSupportingAreaProperties()
{
- Reference< chart2::XDataSeries > xSeries( getDataSeries() );
+ rtl::Reference< DataSeries > xSeries( getDataSeries() );
rtl::Reference< ::chart::Diagram > xDiagram( m_spChart2ModelContact->getDiagram() );
- Reference< chart2::XChartType > xChartType( DiagramHelper::getChartTypeOfSeries( xDiagram, xSeries ) );
- sal_Int32 nDimensionCount = DiagramHelper::getDimension( xDiagram );
-
- return ChartTypeHelper::isSupportingAreaProperties( xChartType, nDimensionCount );
+ rtl::Reference< ::chart::ChartType > xChartType( xDiagram->getChartTypeOfSeries( xSeries ) );
+ if (!xChartType.is())
+ return false;
+ sal_Int32 nDimensionCount = xDiagram->getDimension();
+ return xChartType->isSupportingAreaProperties(nDimensionCount);
}
-Reference< chart2::XDataSeries > DataSeriesPointWrapper::getDataSeries()
+rtl::Reference< DataSeries > DataSeriesPointWrapper::getDataSeries()
{
- Reference< chart2::XDataSeries > xSeries( m_xDataSeries );
+ rtl::Reference< DataSeries > xSeries = m_xDataSeries;
if( !xSeries.is() )
{
rtl::Reference< ::chart::Diagram > xDiagram( m_spChart2ModelContact->getDiagram() );
- std::vector< uno::Reference< chart2::XDataSeries > > aSeriesList(
- ::chart::DiagramHelper::getDataSeriesFromDiagram( xDiagram ) );
+ std::vector< rtl::Reference< DataSeries > > aSeriesList =
+ xDiagram->getDataSeries();
- if( m_nSeriesIndexInNewAPI >= 0 && m_nSeriesIndexInNewAPI < static_cast<sal_Int32>(aSeriesList.size()) )
+ if( m_nSeriesIndexInNewAPI >= 0 && o3tl::make_unsigned(m_nSeriesIndexInNewAPI) < aSeriesList.size() )
xSeries = aSeriesList[m_nSeriesIndexInNewAPI];
}
@@ -564,7 +562,7 @@ Reference< beans::XPropertySet > DataSeriesPointWrapper::getDataPointProperties(
{
Reference< beans::XPropertySet > xPointProp;
- Reference< chart2::XDataSeries > xSeries( getDataSeries() );
+ rtl::Reference< DataSeries > xSeries( getDataSeries() );
// may throw an IllegalArgumentException
if( xSeries.is() )
@@ -579,8 +577,8 @@ void DataSeriesPointWrapper::updateReferenceSize()
Reference< beans::XPropertySet > xProp = getInnerPropertySet();
if( xProp.is() )
{
- if( xProp->getPropertyValue("ReferencePageSize").hasValue() )
- xProp->setPropertyValue("ReferencePageSize", uno::Any(
+ if( xProp->getPropertyValue(u"ReferencePageSize"_ustr).hasValue() )
+ xProp->setPropertyValue(u"ReferencePageSize"_ustr, uno::Any(
m_spChart2ModelContact->GetPageSize() ));
}
}
@@ -589,7 +587,7 @@ Any DataSeriesPointWrapper::getReferenceSize()
Any aRet;
Reference< beans::XPropertySet > xProp = getInnerPropertySet();
if( xProp.is() )
- aRet = xProp->getPropertyValue("ReferencePageSize");
+ aRet = xProp->getPropertyValue(u"ReferencePageSize"_ustr);
return aRet;
}
awt::Size DataSeriesPointWrapper::getCurrentSizeForReference()
@@ -607,7 +605,7 @@ beans::PropertyState SAL_CALL DataSeriesPointWrapper::getPropertyState( const OU
{
if (rPropertyName == "SymbolBitmap" || rPropertyName == "SymbolBitmapURL")
{
- uno::Any aAny = WrappedPropertySet::getPropertyValue("SymbolType");
+ uno::Any aAny = WrappedPropertySet::getPropertyValue(u"SymbolType"_ustr);
sal_Int32 nVal = css::chart::ChartSymbolType::NONE;
if (aAny >>= nVal)
{
@@ -622,9 +620,10 @@ beans::PropertyState SAL_CALL DataSeriesPointWrapper::getPropertyState( const OU
{
if( rPropertyName == "FillColor")
{
- Reference< beans::XPropertySet > xSeriesProp( getDataSeries(), uno::UNO_QUERY );
+ rtl::Reference< DataSeries > xSeries = getDataSeries();
bool bVaryColorsByPoint = false;
- if( xSeriesProp.is() && (xSeriesProp->getPropertyValue("VaryColorsByPoint") >>= bVaryColorsByPoint)
+ // "VaryColorsByPoint"
+ if( xSeries.is() && (xSeries->getFastPropertyValue(PROP_DATASERIES_VARY_COLORS_BY_POINT) >>= bVaryColorsByPoint)
&& bVaryColorsByPoint )
return beans::PropertyState_DIRECT_VALUE;
}
@@ -683,7 +682,7 @@ Any SAL_CALL DataSeriesPointWrapper::getPropertyDefault( const OUString& rProper
if( nHandle > 0 )
{
//always take the series current value as default for points
- Reference< beans::XPropertySet > xInnerPropertySet( getDataSeries(), uno::UNO_QUERY );
+ rtl::Reference< DataSeries > xInnerPropertySet = getDataSeries();
if( xInnerPropertySet.is() )
{
const WrappedProperty* pWrappedProperty = getWrappedProperty( rPropertyName );
@@ -704,16 +703,16 @@ Any SAL_CALL DataSeriesPointWrapper::getPropertyDefault( const OUString& rProper
Reference< beans::XPropertySet > DataSeriesPointWrapper::getInnerPropertySet()
{
if( m_eType == DATA_SERIES )
- return Reference< beans::XPropertySet >( getDataSeries(), uno::UNO_QUERY );
+ return getDataSeries();
return getDataPointProperties();
}
const Sequence< beans::Property >& DataSeriesPointWrapper::getPropertySequence()
{
if( m_eType == DATA_SERIES )
- return *StaticSeriesWrapperPropertyArray::get();
+ return StaticSeriesWrapperPropertyArray();
else
- return *StaticPointWrapperPropertyArray::get();
+ return StaticPointWrapperPropertyArray();
}
std::vector< std::unique_ptr<WrappedProperty> > DataSeriesPointWrapper::createWrappedProperties()
@@ -737,38 +736,38 @@ std::vector< std::unique_ptr<WrappedProperty> > DataSeriesPointWrapper::createWr
//add unnamed line properties (different inner names here)
- aWrappedProperties.emplace_back( new WrappedProperty("FillColor","Color") );
+ aWrappedProperties.emplace_back( new WrappedProperty(u"FillColor"_ustr,u"Color"_ustr) );
aWrappedProperties.emplace_back( new WrappedLineStyleProperty( this ) );
aWrappedProperties.emplace_back( new WrappedLineColorProperty( this ) );
- aWrappedProperties.emplace_back( new WrappedSeriesAreaOrLineProperty("LineDashName","BorderDashName","LineDashName", this ) );
- aWrappedProperties.emplace_back( new WrappedSeriesAreaOrLineProperty("LineTransparence","BorderTransparency","Transparency", this ) );
- aWrappedProperties.emplace_back( new WrappedSeriesAreaOrLineProperty("LineWidth","BorderWidth","LineWidth", this ) );
- aWrappedProperties.emplace_back( new WrappedSeriesAreaOrLineProperty("LineCap","LineCap","LineCap", this ) );
- aWrappedProperties.emplace_back( new WrappedProperty("FillStyle","FillStyle" ) );
- aWrappedProperties.emplace_back( new WrappedProperty("FillTransparence","Transparency") );
-
- aWrappedProperties.emplace_back( new WrappedIgnoreProperty("LineJoint", uno::Any( drawing::LineJoint_ROUND ) ) );
- aWrappedProperties.emplace_back( new WrappedProperty("FillTransparenceGradientName","TransparencyGradientName") );
- aWrappedProperties.emplace_back( new WrappedProperty("FillGradientName","GradientName") );
- aWrappedProperties.emplace_back( new WrappedProperty("FillGradientStepCount","GradientStepCount") );
- aWrappedProperties.emplace_back( new WrappedProperty("FillHatchName","HatchName") );
- aWrappedProperties.emplace_back( new WrappedProperty("FillBitmapName","FillBitmapName") );
- aWrappedProperties.emplace_back( new WrappedProperty("FillBackground","FillBackground") );
+ aWrappedProperties.emplace_back( new WrappedSeriesAreaOrLineProperty(u"LineDashName"_ustr,u"BorderDashName"_ustr,u"LineDashName"_ustr, this ) );
+ aWrappedProperties.emplace_back( new WrappedSeriesAreaOrLineProperty(u"LineTransparence"_ustr,u"BorderTransparency"_ustr,u"Transparency"_ustr, this ) );
+ aWrappedProperties.emplace_back( new WrappedSeriesAreaOrLineProperty(u"LineWidth"_ustr,u"BorderWidth"_ustr,u"LineWidth"_ustr, this ) );
+ aWrappedProperties.emplace_back( new WrappedSeriesAreaOrLineProperty(u"LineCap"_ustr,u"LineCap"_ustr,u"LineCap"_ustr, this ) );
+ aWrappedProperties.emplace_back( new WrappedProperty(u"FillStyle"_ustr,u"FillStyle"_ustr ) );
+ aWrappedProperties.emplace_back( new WrappedProperty(u"FillTransparence"_ustr,u"Transparency"_ustr) );
+
+ aWrappedProperties.emplace_back( new WrappedIgnoreProperty(u"LineJoint"_ustr, uno::Any( drawing::LineJoint_ROUND ) ) );
+ aWrappedProperties.emplace_back( new WrappedProperty(u"FillTransparenceGradientName"_ustr,u"TransparencyGradientName"_ustr) );
+ aWrappedProperties.emplace_back( new WrappedProperty(u"FillGradientName"_ustr,u"GradientName"_ustr) );
+ aWrappedProperties.emplace_back( new WrappedProperty(u"FillGradientStepCount"_ustr,u"GradientStepCount"_ustr) );
+ aWrappedProperties.emplace_back( new WrappedProperty(u"FillHatchName"_ustr,u"HatchName"_ustr) );
+ aWrappedProperties.emplace_back( new WrappedProperty(u"FillBitmapName"_ustr,u"FillBitmapName"_ustr) );
+ aWrappedProperties.emplace_back( new WrappedProperty(u"FillBackground"_ustr,u"FillBackground"_ustr) );
//bitmap properties
- aWrappedProperties.emplace_back( new WrappedProperty("FillBitmapMode","FillBitmapMode") );
- aWrappedProperties.emplace_back( new WrappedProperty("FillBitmapSizeX","FillBitmapSizeX") );
- aWrappedProperties.emplace_back( new WrappedProperty("FillBitmapSizeY","FillBitmapSizeY") );
- aWrappedProperties.emplace_back( new WrappedProperty("FillBitmapLogicalSize","FillBitmapLogicalSize") );
- aWrappedProperties.emplace_back( new WrappedProperty("FillBitmapOffsetX","FillBitmapOffsetX") );
- aWrappedProperties.emplace_back( new WrappedProperty("FillBitmapOffsetY","FillBitmapOffsetY") );
- aWrappedProperties.emplace_back( new WrappedProperty("FillBitmapRectanglePoint","FillBitmapRectanglePoint") );
- aWrappedProperties.emplace_back( new WrappedProperty("FillBitmapPositionOffsetX","FillBitmapPositionOffsetX") );
- aWrappedProperties.emplace_back( new WrappedProperty("FillBitmapPositionOffsetY","FillBitmapPositionOffsetY") );
-
- aWrappedProperties.emplace_back( new WrappedProperty("SolidType","Geometry3D") );
+ aWrappedProperties.emplace_back( new WrappedProperty(u"FillBitmapMode"_ustr,u"FillBitmapMode"_ustr) );
+ aWrappedProperties.emplace_back( new WrappedProperty(u"FillBitmapSizeX"_ustr,u"FillBitmapSizeX"_ustr) );
+ aWrappedProperties.emplace_back( new WrappedProperty(u"FillBitmapSizeY"_ustr,u"FillBitmapSizeY"_ustr) );
+ aWrappedProperties.emplace_back( new WrappedProperty(u"FillBitmapLogicalSize"_ustr,u"FillBitmapLogicalSize"_ustr) );
+ aWrappedProperties.emplace_back( new WrappedProperty(u"FillBitmapOffsetX"_ustr,u"FillBitmapOffsetX"_ustr) );
+ aWrappedProperties.emplace_back( new WrappedProperty(u"FillBitmapOffsetY"_ustr,u"FillBitmapOffsetY"_ustr) );
+ aWrappedProperties.emplace_back( new WrappedProperty(u"FillBitmapRectanglePoint"_ustr,u"FillBitmapRectanglePoint"_ustr) );
+ aWrappedProperties.emplace_back( new WrappedProperty(u"FillBitmapPositionOffsetX"_ustr,u"FillBitmapPositionOffsetX"_ustr) );
+ aWrappedProperties.emplace_back( new WrappedProperty(u"FillBitmapPositionOffsetY"_ustr,u"FillBitmapPositionOffsetY"_ustr) );
+
+ aWrappedProperties.emplace_back( new WrappedProperty(u"SolidType"_ustr,u"Geometry3D"_ustr) );
aWrappedProperties.emplace_back( new WrappedSegmentOffsetProperty() );
- aWrappedProperties.emplace_back( new WrappedProperty("D3DPercentDiagonal","PercentDiagonal") );
+ aWrappedProperties.emplace_back( new WrappedProperty(u"D3DPercentDiagonal"_ustr,u"PercentDiagonal"_ustr) );
aWrappedProperties.emplace_back( new WrappedTextRotationProperty() );
@@ -780,11 +779,11 @@ void SAL_CALL DataSeriesPointWrapper::setPropertyValue( const OUString& rPropert
if(rPropertyName == "Lines")
{
if( ! (rValue >>= m_bLinesAllowed) )
- throw lang::IllegalArgumentException("Property Lines requires value of type sal_Bool", nullptr, 0 );
+ throw lang::IllegalArgumentException(u"Property Lines requires value of type sal_Bool"_ustr, nullptr, 0 );
}
sal_Int32 nHandle = getInfoHelper().getHandleByName( rPropertyName );
- static const sal_Int32 nErrorCategoryHandle = getInfoHelper().getHandleByName("ErrorCategory");
+ static const sal_Int32 nErrorCategoryHandle = getInfoHelper().getHandleByName(u"ErrorCategory"_ustr);
if( nErrorCategoryHandle == nHandle )
{
css::chart::ChartErrorCategory aNewValue = css::chart::ChartErrorCategory_NONE;
@@ -794,16 +793,16 @@ void SAL_CALL DataSeriesPointWrapper::setPropertyValue( const OUString& rPropert
switch(aNewValue)
{
case css::chart::ChartErrorCategory_CONSTANT_VALUE:
- aHigh = getPropertyValue("ConstantErrorHigh");
- aLow = getPropertyValue("ConstantErrorLow");
+ aHigh = getPropertyValue(u"ConstantErrorHigh"_ustr);
+ aLow = getPropertyValue(u"ConstantErrorLow"_ustr);
bSetHighAndLowValues = true;
break;
case css::chart::ChartErrorCategory_PERCENT:
- aHigh = aLow = getPropertyValue("PercentageError");
+ aHigh = aLow = getPropertyValue(u"PercentageError"_ustr);
bSetHighAndLowValues = true;
break;
case css::chart::ChartErrorCategory_ERROR_MARGIN:
- aHigh = aLow = getPropertyValue("ErrorMargin");
+ aHigh = aLow = getPropertyValue(u"ErrorMargin"_ustr);
bSetHighAndLowValues = true;
break;
default:
@@ -817,14 +816,14 @@ void SAL_CALL DataSeriesPointWrapper::setPropertyValue( const OUString& rPropert
switch(aNewValue)
{
case css::chart::ChartErrorCategory_CONSTANT_VALUE:
- setPropertyValue("ConstantErrorHigh",aHigh);
- setPropertyValue("ConstantErrorLow",aLow);
+ setPropertyValue(u"ConstantErrorHigh"_ustr,aHigh);
+ setPropertyValue(u"ConstantErrorLow"_ustr,aLow);
break;
case css::chart::ChartErrorCategory_PERCENT:
- setPropertyValue("PercentageError",aHigh);
+ setPropertyValue(u"PercentageError"_ustr,aHigh);
break;
case css::chart::ChartErrorCategory_ERROR_MARGIN:
- setPropertyValue("ErrorMargin",aHigh);
+ setPropertyValue(u"ErrorMargin"_ustr,aHigh);
break;
default:
break;
@@ -841,13 +840,14 @@ Any SAL_CALL DataSeriesPointWrapper::getPropertyValue( const OUString& rProperty
{
if( rPropertyName == "FillColor" )
{
- Reference< beans::XPropertySet > xSeriesProp( getDataSeries(), uno::UNO_QUERY );
+ rtl::Reference< DataSeries > xSeries = getDataSeries();
bool bVaryColorsByPoint = false;
- if( xSeriesProp.is() && (xSeriesProp->getPropertyValue("VaryColorsByPoint") >>= bVaryColorsByPoint)
+ // "VaryColorsByPoint"
+ if( xSeries.is() && (xSeries->getFastPropertyValue(PROP_DATASERIES_VARY_COLORS_BY_POINT) >>= bVaryColorsByPoint)
&& bVaryColorsByPoint )
{
uno::Reference< beans::XPropertyState > xPointState( DataSeriesPointWrapper::getDataPointProperties(), uno::UNO_QUERY );
- if( xPointState.is() && xPointState->getPropertyState("Color") == beans::PropertyState_DEFAULT_VALUE )
+ if( xPointState.is() && xPointState->getPropertyState(u"Color"_ustr) == beans::PropertyState_DEFAULT_VALUE )
{
rtl::Reference< ::chart::Diagram > xDiagram( m_spChart2ModelContact->getDiagram() );
if( xDiagram.is() )
@@ -865,7 +865,7 @@ Any SAL_CALL DataSeriesPointWrapper::getPropertyValue( const OUString& rProperty
OUString SAL_CALL DataSeriesPointWrapper::getImplementationName()
{
- return "com.sun.star.comp.chart.DataSeries";
+ return u"com.sun.star.comp.chart.DataSeries"_ustr;
}
sal_Bool SAL_CALL DataSeriesPointWrapper::supportsService( const OUString& rServiceName )
@@ -876,13 +876,13 @@ sal_Bool SAL_CALL DataSeriesPointWrapper::supportsService( const OUString& rServ
css::uno::Sequence< OUString > SAL_CALL DataSeriesPointWrapper::getSupportedServiceNames()
{
return {
- "com.sun.star.chart.ChartDataRowProperties",
- "com.sun.star.chart.ChartDataPointProperties",
- "com.sun.star.xml.UserDefinedAttributesSupplier",
- "com.sun.star.beans.PropertySet",
- "com.sun.star.drawing.FillProperties",
- "com.sun.star.drawing.LineProperties",
- "com.sun.star.style.CharacterProperties"
+ u"com.sun.star.chart.ChartDataRowProperties"_ustr,
+ u"com.sun.star.chart.ChartDataPointProperties"_ustr,
+ u"com.sun.star.xml.UserDefinedAttributesSupplier"_ustr,
+ u"com.sun.star.beans.PropertySet"_ustr,
+ u"com.sun.star.drawing.FillProperties"_ustr,
+ u"com.sun.star.drawing.LineProperties"_ustr,
+ u"com.sun.star.style.CharacterProperties"_ustr
};
}