chart2/source/controller/dialogs/tp_DataSource.cxx | 3 +++ sc/source/ui/unoobj/chart2uno.cxx | 3 ++- xmloff/source/chart/SchXMLSeries2Context.cxx | 8 ++++++++ 3 files changed, 13 insertions(+), 1 deletion(-)
New commits: commit b030440833e39bc15a72a2db4b2e782b882e0baa Author: Ouyang Leyan <ouyang.le...@hotmail.com> AuthorDate: Sat Nov 21 15:42:19 2020 +0100 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Mon Nov 23 15:38:14 2020 +0100 tdf#134059 Always include hidden cells in chart series label Change-Id: I92ff60b26af713a49fefd8b2ce8042f4e8e4d179 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106317 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> (cherry picked from commit fd5f3b212a38ec6ef35d2686ce5a7cc39cb7d377) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106240 Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/chart2/source/controller/dialogs/tp_DataSource.cxx b/chart2/source/controller/dialogs/tp_DataSource.cxx index 6ac626957517..90eb974ca0d5 100644 --- a/chart2/source/controller/dialogs/tp_DataSource.cxx +++ b/chart2/source/controller/dialogs/tp_DataSource.cxx @@ -841,6 +841,9 @@ bool DataSourceTabPage::updateModelFromControl(const weld::Entry* pField) aRange = xNewSeq->getSourceRangeRepresentation(); Reference< beans::XPropertySet > xProp( xNewSeq, uno::UNO_QUERY_THROW ); xProp->setPropertyValue( "Role" , uno::Any( OUString(lcl_aLabelRole) )); + + //Labels should always include hidden cells, regardless of the setting chosen + xProp->setPropertyValue( "IncludeHiddenCells", uno::Any(true)); xLabeledSeq->setLabel( xNewSeq ); } } diff --git a/sc/source/ui/unoobj/chart2uno.cxx b/sc/source/ui/unoobj/chart2uno.cxx index ffbcba6c234f..004729176c2e 100644 --- a/sc/source/ui/unoobj/chart2uno.cxx +++ b/sc/source/ui/unoobj/chart2uno.cxx @@ -1031,7 +1031,8 @@ uno::Reference< chart2::data::XLabeledDataSequence > lcl_createLabeledDataSequen } if ( bHasLabel ) { - uno::Reference< chart2::data::XDataSequence > xLabelSeq( new ScChart2DataSequence( pDoc, std::move(aLabelTokens), bIncludeHiddenCells ) ); + //Labels should always include hidden cells, regardless of the bIncludeHiddenCells setting + uno::Reference< chart2::data::XDataSequence > xLabelSeq( new ScChart2DataSequence( pDoc, std::move(aLabelTokens), true ) ); xResult->setLabel( xLabelSeq ); } } diff --git a/xmloff/source/chart/SchXMLSeries2Context.cxx b/xmloff/source/chart/SchXMLSeries2Context.cxx index 434018276e93..992a03d64113 100644 --- a/xmloff/source/chart/SchXMLSeries2Context.cxx +++ b/xmloff/source/chart/SchXMLSeries2Context.cxx @@ -480,6 +480,14 @@ void SchXMLSeries2Context::StartElement( const uno::Reference< xml::sax::XAttrib xSequenceLabel.set(SchXMLTools::CreateDataSequenceWithoutConvert(aSeriesLabelString, mxNewDoc)); } } + + //Labels should always include hidden cells + Reference<beans::XPropertySet> xSeqLabelProp(xSequenceLabel, uno::UNO_QUERY); + if (xSeqLabelProp.is() && xSeqLabelProp->getPropertySetInfo()->hasPropertyByName("IncludeHiddenCells")) + { + xSeqLabelProp->setPropertyValue( "IncludeHiddenCells", uno::Any(true)); + } + xLabeledSeq->setLabel(xSequenceLabel); // Note: Even if we have no label, we have to register the label _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits