diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-03-22 09:49:34 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-03-22 17:15:34 +0000 |
commit | 53a3d028e6931e4443cfe8cdf18909f6bfd8e2f4 (patch) | |
tree | f87ce03db44c09a9e3ce721e30cb1b6d6613a116 /chart2/source/view/main | |
parent | f02ec0d8489404966596cb0e949bf969e8e66fa2 (diff) |
use more concrete type in chart2
Change-Id: I568530c1db0add697f7f257a4e5560a3e50919f3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149290
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'chart2/source/view/main')
-rw-r--r-- | chart2/source/view/main/VLegend.cxx | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/chart2/source/view/main/VLegend.cxx b/chart2/source/view/main/VLegend.cxx index 061cbb39976d..27bf869b8663 100644 --- a/chart2/source/view/main/VLegend.cxx +++ b/chart2/source/view/main/VLegend.cxx @@ -23,6 +23,7 @@ #include <PropertyMapper.hxx> #include <ChartModel.hxx> #include <ObjectIdentifier.hxx> +#include <FormattedString.hxx> #include <RelativePositionHelper.hxx> #include <ShapeFactory.hxx> #include <RelativeSizeHelper.hxx> @@ -160,22 +161,22 @@ awt::Size lcl_createTextShapes( try { OUString aLabelString; - Sequence< Reference< XFormattedString2 > > aLabelSeq = rEntry.aLabel; - for( sal_Int32 i = 0; i < aLabelSeq.getLength(); ++i ) + const std::vector< rtl::Reference< ::chart::FormattedString > > & rLabelSeq = rEntry.aLabel; + for( size_t i = 0; i < rLabelSeq.size(); ++i ) { // todo: support more than one text range if( i == 1 ) break; // tdf#150034 limit legend label text - if (aLabelSeq[i]->getString().getLength() > 520) + if (rLabelSeq[i]->getString().getLength() > 520) { - sal_Int32 nIndex = aLabelSeq[i]->getString().indexOf(' ', 500); - aLabelSeq[i]->setString( - aLabelSeq[i]->getString().copy(0, nIndex > 500 ? nIndex : 500)); + sal_Int32 nIndex = rLabelSeq[i]->getString().indexOf(' ', 500); + rLabelSeq[i]->setString( + rLabelSeq[i]->getString().copy(0, nIndex > 500 ? nIndex : 500)); } - aLabelString += aLabelSeq[i]->getString(); + aLabelString += rLabelSeq[i]->getString(); // workaround for Issue #i67540# if( aLabelString.isEmpty()) aLabelString = " "; |