summaryrefslogtreecommitdiff
path: root/chart2/source/model/main/FormattedString.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'chart2/source/model/main/FormattedString.cxx')
-rw-r--r--chart2/source/model/main/FormattedString.cxx40
1 files changed, 40 insertions, 0 deletions
diff --git a/chart2/source/model/main/FormattedString.cxx b/chart2/source/model/main/FormattedString.cxx
index 0a89c555a0e1..8d1eff75349b 100644
--- a/chart2/source/model/main/FormattedString.cxx
+++ b/chart2/source/model/main/FormattedString.cxx
@@ -95,6 +95,8 @@ namespace chart
FormattedString::FormattedString() :
::property::OPropertySet( m_aMutex ),
m_aString(),
+ m_aType(chart2::DataPointCustomLabelFieldType::DataPointCustomLabelFieldType_TEXT),
+ m_aGuid(),
m_xModifyEventForwarder( ModifyListenerHelper::createModifyEventForwarder())
{}
@@ -103,6 +105,8 @@ FormattedString::FormattedString( const FormattedString & rOther ) :
impl::FormattedString_Base(),
::property::OPropertySet( rOther, m_aMutex ),
m_aString( rOther.m_aString ),
+ m_aType(rOther.m_aType),
+ m_aGuid(rOther.m_aGuid),
m_xModifyEventForwarder( ModifyListenerHelper::createModifyEventForwarder())
{}
@@ -133,6 +137,41 @@ void SAL_CALL FormattedString::setString( const OUString& String )
}
+// ____ XDataPointCustomLabelField ____
+css::chart2::DataPointCustomLabelFieldType SAL_CALL FormattedString::getFieldType()
+{
+ MutexGuard aGuard(GetMutex());
+ return m_aType;
+}
+
+void SAL_CALL
+FormattedString::setFieldType(const css::chart2::DataPointCustomLabelFieldType Type)
+{
+ {
+ MutexGuard aGuard(GetMutex());
+ m_aType = Type;
+ }
+ //don't keep the mutex locked while calling out
+ fireModifyEvent();
+}
+
+OUString SAL_CALL FormattedString::getGuid()
+{
+ MutexGuard aGuard( GetMutex());
+ return m_aGuid;
+}
+
+void SAL_CALL FormattedString::setGuid( const OUString& guid )
+{
+ {
+ MutexGuard aGuard( GetMutex());
+ m_aGuid= guid;
+ }
+ //don't keep the mutex locked while calling out
+ fireModifyEvent();
+
+}
+
// ____ XModifyBroadcaster ____
void SAL_CALL FormattedString::addModifyListener( const uno::Reference< util::XModifyListener >& aListener )
{
@@ -226,6 +265,7 @@ sal_Bool SAL_CALL FormattedString::supportsService( const OUString& rServiceName
css::uno::Sequence< OUString > SAL_CALL FormattedString::getSupportedServiceNames()
{
return {
+ "com.sun.star.chart2.DataPointCustomLabelField",
"com.sun.star.chart2.FormattedString",
"com.sun.star.beans.PropertySet" };
}