diff options
Diffstat (limited to 'chart2/source/controller/itemsetwrapper/TextLabelItemConverter.cxx')
-rw-r--r-- | chart2/source/controller/itemsetwrapper/TextLabelItemConverter.cxx | 37 |
1 files changed, 36 insertions, 1 deletions
diff --git a/chart2/source/controller/itemsetwrapper/TextLabelItemConverter.cxx b/chart2/source/controller/itemsetwrapper/TextLabelItemConverter.cxx index 496b25e2692f..bdeffbf6cf3c 100644 --- a/chart2/source/controller/itemsetwrapper/TextLabelItemConverter.cxx +++ b/chart2/source/controller/itemsetwrapper/TextLabelItemConverter.cxx @@ -201,7 +201,8 @@ TextLabelItemConverter::TextLabelItemConverter( mnNumberFormat(nNumberFormat), mnPercentNumberFormat(nPercentNumberFormat), mbDataSeries(bDataSeries), - mbForbidPercentValue(true) + mbForbidPercentValue(true), + m_xSeries(xSeries) { maConverters.emplace_back(new CharacterPropertyItemConverter(rPropertySet, rItemPool, pRefSize, "ReferencePageSize")); @@ -498,6 +499,25 @@ bool TextLabelItemConverter::ApplySpecialItem( sal_uInt16 nWhichId, const SfxIte } } break; + case SCHATTR_DATADESCR_CUSTOM_LEADER_LINES: + { + try + { + bool bNew = static_cast<const SfxBoolItem&>(rItemSet.Get(nWhichId)).GetValue(); + bool bOld = true; + Reference<beans::XPropertySet> xSeriesProp(m_xSeries, uno::UNO_QUERY); + if( (xSeriesProp->getPropertyValue("ShowCustomLeaderLines") >>= bOld) && bOld != bNew ) + { + xSeriesProp->setPropertyValue("ShowCustomLeaderLines", uno::Any(bNew)); + bChanged = true; + } + } + catch (const uno::Exception&) + { + TOOLS_WARN_EXCEPTION("chart2", ""); + } + } + break; } return bChanged; @@ -635,6 +655,21 @@ void TextLabelItemConverter::FillSpecialItem( sal_uInt16 nWhichId, SfxItemSet& r rOutItemSet.Put(SfxBoolItem(nWhichId, mbForbidPercentValue)); } break; + case SCHATTR_DATADESCR_CUSTOM_LEADER_LINES: + { + try + { + bool bValue = true; + Reference<beans::XPropertySet> xSeriesProp(m_xSeries, uno::UNO_QUERY); + if( xSeriesProp->getPropertyValue( "ShowCustomLeaderLines" ) >>= bValue ) + rOutItemSet.Put(SfxBoolItem(nWhichId, bValue)); + } + catch (const uno::Exception&) + { + TOOLS_WARN_EXCEPTION("chart2", ""); + } + } + break; case SCHATTR_STYLE_SYMBOL: { chart2::Symbol aSymbol; |