summaryrefslogtreecommitdiff
path: root/chart2/source/tools/ErrorBar.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'chart2/source/tools/ErrorBar.cxx')
-rw-r--r--chart2/source/tools/ErrorBar.cxx62
1 files changed, 23 insertions, 39 deletions
diff --git a/chart2/source/tools/ErrorBar.cxx b/chart2/source/tools/ErrorBar.cxx
index d894b16a3ff4..3d049a44527f 100644
--- a/chart2/source/tools/ErrorBar.cxx
+++ b/chart2/source/tools/ErrorBar.cxx
@@ -33,7 +33,7 @@
#include <com/sun/star/util/Color.hpp>
#include <com/sun/star/drawing/LineJoint.hpp>
-#include <tools/diagnose_ex.h>
+#include <comphelper/diagnose_ex.hxx>
#include <sal/log.hxx>
using namespace ::com::sun::star;
@@ -41,7 +41,7 @@ using namespace ::com::sun::star;
namespace
{
-constexpr OUStringLiteral lcl_aServiceName = u"com.sun.star.comp.chart2.ErrorBar";
+constexpr OUString lcl_aServiceName = u"com.sun.star.comp.chart2.ErrorBar"_ustr;
bool lcl_isInternalData( const uno::Reference< chart2::data::XLabeledDataSequence > & xLSeq )
{
@@ -53,22 +53,21 @@ const SfxItemPropertySet* GetErrorBarPropertySet()
{
static const SfxItemPropertyMapEntry aErrorBarPropertyMap_Impl[] =
{
- {u"ShowPositiveError",0,cppu::UnoType<bool>::get(), 0, 0},
- {u"ShowNegativeError",1,cppu::UnoType<bool>::get(), 0, 0},
- {u"PositiveError",2,cppu::UnoType<double>::get(),0,0},
- {u"NegativeError",3,cppu::UnoType<double>::get(), 0, 0},
- {u"PercentageError",4,cppu::UnoType<double>::get(), 0, 0},
- {u"ErrorBarStyle",5,cppu::UnoType<sal_Int32>::get(),0,0},
- {u"ErrorBarRangePositive",6,cppu::UnoType<OUString>::get(),0,0}, // read-only for export
- {u"ErrorBarRangeNegative",7,cppu::UnoType<OUString>::get(),0,0}, // read-only for export
- {u"Weight",8,cppu::UnoType<double>::get(),0,0},
- {u"LineStyle",9,cppu::UnoType<css::drawing::LineStyle>::get(),0,0},
- {u"LineDash",10,cppu::UnoType<drawing::LineDash>::get(),0,0},
- {u"LineWidth",11,cppu::UnoType<sal_Int32>::get(),0,0},
- {u"LineColor",12,cppu::UnoType<css::util::Color>::get(),0,0},
- {u"LineTransparence",13,cppu::UnoType<sal_Int16>::get(),0,0},
- {u"LineJoint",14,cppu::UnoType<css::drawing::LineJoint>::get(),0,0},
- { u"", 0, css::uno::Type(), 0, 0 }
+ {u"ShowPositiveError"_ustr,0,cppu::UnoType<bool>::get(), 0, 0},
+ {u"ShowNegativeError"_ustr,1,cppu::UnoType<bool>::get(), 0, 0},
+ {u"PositiveError"_ustr,2,cppu::UnoType<double>::get(),0,0},
+ {u"NegativeError"_ustr,3,cppu::UnoType<double>::get(), 0, 0},
+ {u"PercentageError"_ustr,4,cppu::UnoType<double>::get(), 0, 0},
+ {u"ErrorBarStyle"_ustr,5,cppu::UnoType<sal_Int32>::get(),0,0},
+ {u"ErrorBarRangePositive"_ustr,6,cppu::UnoType<OUString>::get(),0,0}, // read-only for export
+ {u"ErrorBarRangeNegative"_ustr,7,cppu::UnoType<OUString>::get(),0,0}, // read-only for export
+ {u"Weight"_ustr,8,cppu::UnoType<double>::get(),0,0},
+ {u"LineStyle"_ustr,9,cppu::UnoType<css::drawing::LineStyle>::get(),0,0},
+ {u"LineDash"_ustr,10,cppu::UnoType<drawing::LineDash>::get(),0,0},
+ {u"LineWidth"_ustr,11,cppu::UnoType<sal_Int32>::get(),0,0},
+ {u"LineColor"_ustr,12,cppu::UnoType<css::util::Color>::get(),0,0},
+ {u"LineTransparence"_ustr,13,cppu::UnoType<sal_Int16>::get(),0,0},
+ {u"LineJoint"_ustr,14,cppu::UnoType<css::drawing::LineJoint>::get(),0,0},
};
static SfxItemPropertySet aPropSet( aErrorBarPropertyMap_Impl );
return &aPropSet;
@@ -91,7 +90,7 @@ ErrorBar::ErrorBar() :
mfNegativeError(0),
mfWeight(1),
meStyle(css::chart::ErrorBarStyle::NONE),
- m_xModifyEventForwarder( ModifyListenerHelper::createModifyEventForwarder())
+ m_xModifyEventForwarder( new ModifyEventForwarder() )
{}
ErrorBar::ErrorBar( const ErrorBar & rOther ) :
@@ -109,7 +108,7 @@ ErrorBar::ErrorBar( const ErrorBar & rOther ) :
mfNegativeError(rOther.mfNegativeError),
mfWeight(rOther.mfWeight),
meStyle(rOther.meStyle),
- m_xModifyEventForwarder( ModifyListenerHelper::createModifyEventForwarder())
+ m_xModifyEventForwarder( new ModifyEventForwarder() )
{
if( ! rOther.m_aDataSequences.empty())
{
@@ -363,9 +362,10 @@ beans::PropertyState ErrorBar::getPropertyState( const OUString& rPropName )
uno::Sequence< beans::PropertyState > ErrorBar::getPropertyStates( const uno::Sequence< OUString >& rPropNames )
{
uno::Sequence< beans::PropertyState > aRet( rPropNames.getLength() );
+ auto aRetRange = asNonConstRange(aRet);
for(sal_Int32 i = 0; i < rPropNames.getLength(); ++i)
{
- aRet[i] = getPropertyState(rPropNames[i]);
+ aRetRange[i] = getPropertyState(rPropNames[i]);
}
return aRet;
}
@@ -400,28 +400,12 @@ void ErrorBar::removeVetoableChangeListener( const OUString&, const css::uno::Re
// ____ XModifyBroadcaster ____
void SAL_CALL ErrorBar::addModifyListener( const uno::Reference< util::XModifyListener >& aListener )
{
- try
- {
- uno::Reference< util::XModifyBroadcaster > xBroadcaster( m_xModifyEventForwarder, uno::UNO_QUERY_THROW );
- xBroadcaster->addModifyListener( aListener );
- }
- catch( const uno::Exception & )
- {
- DBG_UNHANDLED_EXCEPTION("chart2");
- }
+ m_xModifyEventForwarder->addModifyListener( aListener );
}
void SAL_CALL ErrorBar::removeModifyListener( const uno::Reference< util::XModifyListener >& aListener )
{
- try
- {
- uno::Reference< util::XModifyBroadcaster > xBroadcaster( m_xModifyEventForwarder, uno::UNO_QUERY_THROW );
- xBroadcaster->removeModifyListener( aListener );
- }
- catch( const uno::Exception & )
- {
- DBG_UNHANDLED_EXCEPTION("chart2");
- }
+ m_xModifyEventForwarder->removeModifyListener( aListener );
}
// ____ XModifyListener ____