summaryrefslogtreecommitdiff
path: root/chart2/source/tools/CachedDataSequence.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'chart2/source/tools/CachedDataSequence.cxx')
-rw-r--r--chart2/source/tools/CachedDataSequence.cxx32
1 files changed, 10 insertions, 22 deletions
diff --git a/chart2/source/tools/CachedDataSequence.cxx b/chart2/source/tools/CachedDataSequence.cxx
index 0ca95f9ebdf2..7ddc9a010408 100644
--- a/chart2/source/tools/CachedDataSequence.cxx
+++ b/chart2/source/tools/CachedDataSequence.cxx
@@ -23,7 +23,6 @@
#include <comphelper/sequenceashashmap.hxx>
#include <cppuhelper/supportsservice.hxx>
-#include <tools/diagnose_ex.h>
#include <algorithm>
@@ -35,14 +34,11 @@ using ::com::sun::star::uno::Any;
using ::osl::MutexGuard;
// necessary for MS compiler
-using ::comphelper::OPropertyContainer;
-using ::comphelper::OMutexAndBroadcastHelper;
-using ::comphelper::OPropertyArrayUsageHelper;
using ::chart::impl::CachedDataSequence_Base;
namespace
{
-constexpr OUStringLiteral lcl_aServiceName = u"com.sun.star.comp.chart.CachedDataSequence";
+constexpr OUString lcl_aServiceName = u"com.sun.star.comp.chart.CachedDataSequence"_ustr;
enum
{
@@ -56,26 +52,20 @@ namespace chart
{
CachedDataSequence::CachedDataSequence()
- : OPropertyContainer( GetBroadcastHelper()),
- CachedDataSequence_Base( GetMutex()),
- m_eCurrentDataType( NUMERICAL ),
+ : m_eCurrentDataType( NUMERICAL ),
m_xModifyEventForwarder( new ModifyEventForwarder() )
{
registerProperties();
}
CachedDataSequence::CachedDataSequence( const Reference< uno::XComponentContext > & /*xContext*/ )
- : OPropertyContainer( GetBroadcastHelper()),
- CachedDataSequence_Base( GetMutex()),
- m_eCurrentDataType( MIXED ),
+ : m_eCurrentDataType( MIXED ),
m_xModifyEventForwarder( new ModifyEventForwarder() )
{
registerProperties();
}
CachedDataSequence::CachedDataSequence( const OUString & rSingleText )
- : OPropertyContainer( GetBroadcastHelper()),
- CachedDataSequence_Base( GetMutex()),
- m_eCurrentDataType( TEXTUAL ),
+ : m_eCurrentDataType( TEXTUAL ),
m_aTextualSequence({rSingleText}),
m_xModifyEventForwarder( new ModifyEventForwarder() )
{
@@ -83,9 +73,7 @@ CachedDataSequence::CachedDataSequence( const OUString & rSingleText )
}
CachedDataSequence::CachedDataSequence( const CachedDataSequence & rSource )
- : OPropertyContainer( GetBroadcastHelper()),
- CachedDataSequence_Base( GetMutex()),
- m_nNumberFormatKey( rSource.m_nNumberFormatKey ),
+ : m_nNumberFormatKey( rSource.m_nNumberFormatKey ),
m_sRole( rSource.m_sRole ),
m_eCurrentDataType( rSource.m_eCurrentDataType ),
m_xModifyEventForwarder( new ModifyEventForwarder() )
@@ -216,8 +204,8 @@ Sequence< Any > CachedDataSequence::Impl_getMixedData() const
return aResult;
}
-IMPLEMENT_FORWARD_XINTERFACE2( CachedDataSequence, CachedDataSequence_Base, OPropertyContainer )
-IMPLEMENT_FORWARD_XTYPEPROVIDER2( CachedDataSequence, CachedDataSequence_Base, OPropertyContainer )
+IMPLEMENT_FORWARD_XINTERFACE2( CachedDataSequence, CachedDataSequence_Base, comphelper::OPropertyContainer2 )
+IMPLEMENT_FORWARD_XTYPEPROVIDER2( CachedDataSequence, CachedDataSequence_Base, comphelper::OPropertyContainer2 )
// ____ XPropertySet ____
Reference< beans::XPropertySetInfo > SAL_CALL CachedDataSequence::getPropertySetInfo()
@@ -264,7 +252,7 @@ css::uno::Sequence< OUString > SAL_CALL CachedDataSequence::getSupportedServiceN
// ________ XNumericalDataSequence ________
Sequence< double > SAL_CALL CachedDataSequence::getNumericalData()
{
- MutexGuard aGuard( GetMutex() );
+ std::unique_lock aGuard( m_aMutex );
if( m_eCurrentDataType == NUMERICAL )
return m_aNumericalSequence;
@@ -275,7 +263,7 @@ Sequence< double > SAL_CALL CachedDataSequence::getNumericalData()
// ________ XTextualDataSequence ________
Sequence< OUString > SAL_CALL CachedDataSequence::getTextualData()
{
- MutexGuard aGuard( GetMutex() );
+ std::unique_lock aGuard( m_aMutex );
if( m_eCurrentDataType == TEXTUAL )
return m_aTextualSequence;
@@ -286,7 +274,7 @@ Sequence< OUString > SAL_CALL CachedDataSequence::getTextualData()
// ________ XDataSequence ________
Sequence< Any > SAL_CALL CachedDataSequence::getData()
{
- MutexGuard aGuard( GetMutex() );
+ std::unique_lock aGuard( m_aMutex );
return Impl_getMixedData();
}