summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
Diffstat (limited to 'oox')
-rw-r--r--oox/inc/drawingml/textrun.hxx1
-rw-r--r--oox/source/drawingml/chart/titleconverter.cxx2
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 );