diff options
author | Justin Luth <jluth@mail.com> | 2022-09-20 14:28:19 -0400 |
---|---|---|
committer | Justin Luth <jluth@mail.com> | 2022-09-21 19:27:44 +0200 |
commit | 8f5f0c754222425af019a9fdc1ba47d72c541d9e (patch) | |
tree | e2c4689fee3e37ef0897275a7842ea945d46c0d7 /sc/source/filter/xml | |
parent | f41868a5dcdb1982c1e3064dd985d894eaba0074 (diff) |
tdf#75702 ODS import: send text:line-break to editeng
A cell with a line-break specified is no longer a simple string,
so send the string to editeng where it can be properly displayed.
This already works fine for XLS and XLSX.
This change effectively means that text:line-break
will disappear, and become two separate paragraphs.
Given the nature of spreadsheets, the precidence in
various other patches and the failure to properly
display without this, I think I'm fine with
unilaterally changing one paragraph into two.
Change-Id: I7abcbc6f698a4cb319aea5465a8b0393cf63f31f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140262
Tested-by: Jenkins
Reviewed-by: Justin Luth <jluth@mail.com>
Diffstat (limited to 'sc/source/filter/xml')
-rw-r--r-- | sc/source/filter/xml/xmlcelli.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sc/source/filter/xml/xmlcelli.cxx b/sc/source/filter/xml/xmlcelli.cxx index e7a8037cd7eb..29450409e608 100644 --- a/sc/source/filter/xml/xmlcelli.cxx +++ b/sc/source/filter/xml/xmlcelli.cxx @@ -47,6 +47,7 @@ #include "editattributemap.hxx" #include <tokenarray.hxx> #include <scmatrix.hxx> +#include <stringutil.hxx> #include <documentimport.hxx> #include <externalrefmgr.hxx> @@ -612,7 +613,7 @@ void ScXMLTableRowCellContext::PushParagraphEnd() } mpEditEngine->InsertParagraph(mpEditEngine->GetParagraphCount(), maParagraph.makeStringAndClear()); } - else if (mbHasFormatRuns) + else if (mbHasFormatRuns || ScStringUtil::isMultiline(maParagraph)) { mpEditEngine->Clear(); mpEditEngine->SetTextCurrentDefaults(maParagraph.makeStringAndClear()); |