diff options
author | Vasily Melenchuk <vasily.melenchuk@cib.de> | 2018-11-01 17:37:21 +0100 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2019-01-17 13:39:58 +0100 |
commit | 6da534c3bd944509d0666e8c6a94c3c707fbc006 (patch) | |
tree | 8d7e109be2f826c1cf927424cfcd2cd65c9f4f44 /oox | |
parent | 69b2edd7cb1f9c6ee767f618b671e46794922dc7 (diff) |
tdf#121205: Convert <a:br> to newline chars in chart title
Reviewed-on: https://gerrit.libreoffice.org/62752
Tested-by: Jenkins
Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
(cherry picked from commit 57d4cd80dcaf01fe4897d79d89e906d355410243)
Reviewed-on: https://gerrit.libreoffice.org/62990
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
(cherry picked from commit a1ea94fde40b82d0ec7ec842bf44cdeeea676aca)
Change-Id: I43d14025c48878c5bc035d492623f4fc52426e5e
Diffstat (limited to 'oox')
-rw-r--r-- | oox/inc/drawingml/textrun.hxx | 1 | ||||
-rw-r--r-- | oox/source/drawingml/chart/titleconverter.cxx | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/oox/inc/drawingml/textrun.hxx b/oox/inc/drawingml/textrun.hxx index 2f660a8cf306..8d3e2c499bc6 100644 --- a/oox/inc/drawingml/textrun.hxx +++ b/oox/inc/drawingml/textrun.hxx @@ -41,6 +41,7 @@ public: const TextCharacterProperties& getTextCharacterProperties() const { return maTextCharacterProperties; } void setLineBreak() { mbIsLineBreak = true; } + bool isLineBreak() const { return mbIsLineBreak; } virtual sal_Int32 insertAt( const ::oox::core::XmlFilterBase& rFilterBase, diff --git a/oox/source/drawingml/chart/titleconverter.cxx b/oox/source/drawingml/chart/titleconverter.cxx index daa1f2d8cb57..a4bb1ec70944 100644 --- a/oox/source/drawingml/chart/titleconverter.cxx +++ b/oox/source/drawingml/chart/titleconverter.cxx @@ -85,7 +85,7 @@ Sequence< Reference< XFormattedString > > TextConverter::createStringSequence( for( TextRunVector::const_iterator aRIt = rTextPara.getRuns().begin(), aREnd = rTextPara.getRuns().end(); aRIt != aREnd; ++aRIt ) { const TextRun& rTextRun = **aRIt; - bool bAddNewLine = (aRIt + 1 == aREnd) && (aPIt + 1 != aPEnd); + bool bAddNewLine = ((aRIt + 1 == aREnd) && (aPIt + 1 != aPEnd)) || rTextRun.isLineBreak(); Reference< XFormattedString > xFmtStr = appendFormattedString( aStringVec, rTextRun.getText(), bAddNewLine ); PropertySet aPropSet( xFmtStr ); TextCharacterProperties aRunProps( rParaProps ); |