diff options
author | Justin Luth <justin_luth@sil.org> | 2018-03-26 19:07:18 +0300 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2020-05-18 12:36:49 +0200 |
commit | 568093e40db9a876b832f67dbacff8161743e2aa (patch) | |
tree | 325771a6793b1fbaff4fcef63e2657a92f9e2077 /sw | |
parent | 195f4f6840d105ae6cb9c16bd499924fa3d99f1e (diff) |
tdf#112886 ooxmlimport: skip useless footnote placeholder
Inserting the 0x02 placeholder as the first entry in the line
interferes with the aesthetic tab code. lcl_text
has code to ignore that placeholder, but lcl_utext
doesn't. Ignoring at lcl_utext has the same affect as
not processing it at all. Only .docx adds 0x02, so
it should be fairly safe to avoid the 0x02 completely.
Nothing was detected missing by skipping the placeholder.
All of the code was inherited from OOo.
Change-Id: Ie8840e5946fec89f270fef5523c88ee5051ca8ef
Reviewed-on: https://gerrit.libreoffice.org/51912
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Justin Luth <justin_luth@sil.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
(cherry picked from commit 3138abfb052a4241cfca4b8d430c139cca50a85c)
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmlexport10.cxx | 4 | ||||
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmlexport9.cxx | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx index 6b28bde331b9..524ee54831b6 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx @@ -962,9 +962,9 @@ DECLARE_OOXMLEXPORT_TEST(testTdf90810, "tdf90810short.docx") // Original document doesn't have a leading tab in the footnote, but the // export adds one unconditionally. if (mbExported) - CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(91), sFootnoteText.getLength()); - else CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(90), sFootnoteText.getLength()); + else + CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(89), sFootnoteText.getLength()); } DECLARE_OOXMLEXPORT_TEST(testTdf89165, "tdf89165.docx") diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx index a4fed8cb3d16..1e3b6bbfa21d 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx @@ -930,7 +930,7 @@ DECLARE_OOXMLEXPORT_TEST(testTdf105095, "tdf105095.docx") uno::Reference<text::XTextRange> xTextRange(xFootnotes->getByIndex(0), uno::UNO_QUERY); // This failed, tab between the footnote number and the footnote content // was lost on import. - CPPUNIT_ASSERT(xTextRange->getString().endsWith("\tfootnote")); + CPPUNIT_ASSERT_EQUAL( OUString("\tfootnote"), xTextRange->getString() ); } DECLARE_OOXMLEXPORT_TEST( testActiveXTextfield, "activex_textbox.docx" ) |