summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2014-07-15 18:18:19 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2014-07-15 19:05:06 +0200
commitfc3eb493ac9e8dec35060524db4dc8ca3210631a (patch)
treeee91f13e4806ac8d7eb74469a90de563298799a6 /sw
parent6d3269ad94bbad8abae5703edc86d8888356bf14 (diff)
Related: bnc#875718 DOCX import: fix missing character grab-bag on fields
The problem was that in case: 1) The paragraph only had a single text portion, which was a field and char grab-bag was set on it and 2) The paragraph had a style which also set the character grab-bag then during import the field's gra-bag was set on the paragraph (as it's the only portion) and later the paragraph style overwrote this, in case that had a grab-bag, too. Work this around by ensuring that in case of portion fields (i.e. not ToC, which has its own paragraphs), there are always at least two portions in a paragraph (the second is removed later). This also fixes the fake paragraph problem at the end of the bnc#875718 testcase. (There was an empty paragraph at the end of the document, but not in the file itself.) Change-Id: Ie404bc043d46157ea6157b18c4a46395cf496118
Diffstat (limited to 'sw')
-rw-r--r--sw/qa/extras/ooxmlimport/ooxmlimport.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
index 8d85f1dba7b7..efbfebb33f77 100644
--- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
+++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
@@ -2190,7 +2190,7 @@ DECLARE_OOXMLIMPORT_TEST(testBnc875718, "bnc875718.docx")
// Also check that the footer contents are not in the body text.
uno::Reference<text::XTextDocument> textDocument(mxComponent, uno::UNO_QUERY);
uno::Reference<text::XText> text(textDocument->getText(), uno::UNO_QUERY);
- CPPUNIT_ASSERT_EQUAL( OUString( "Text\n" ), text->getString());
+ CPPUNIT_ASSERT_EQUAL( OUString( "Text" ), text->getString());
}
DECLARE_OOXMLIMPORT_TEST(testCaption, "caption.docx")