summaryrefslogtreecommitdiff
path: root/sw/qa/extras
diff options
context:
space:
mode:
authorJustin Luth <justin_luth@sil.org>2018-05-10 15:36:11 +0300
committerMiklos Vajna <vmiklos@collabora.co.uk>2018-05-16 11:24:47 +0200
commit8920d865ee148518bf71f71ce1866b24cc17c07e (patch)
treec968259350ad10d6c1e17cf5eadfda5bfefa7cbe /sw/qa/extras
parentea19b96b6beb0ce2f25705339d1d6342dc38b283 (diff)
tdf#117504 ooxmlimport: check paragraph props for actual style
m_sCurrentParaStyleName sounds like a nice idea, and has been around since the initial fork, but by the time finishParagraph() rolls around, the chances that it is still accurate are rather low. Anything that contains a paragraph (like comments, textboxes, shapes, tables, flys etc) might have modified that value. This fix queries the current paragraph itself to see if PROP_PARA_STYLE_NAME is set, which it typically is by lcl_startParagraphGroup() except when IsInShape(). If it isn't specified, then fallback to the previous result, which still may not be accurate, but at least it won't be a regression. It is too late in the development cycle to look into fully eliminating m_sCurrentParaStyleName. I hope to investigate that in the 6.2 development cycle. Change-Id: I124688d864f553dd5778b3593f511cc41d31c262 Reviewed-on: https://gerrit.libreoffice.org/54085 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'sw/qa/extras')
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf117504_numberingIndent.docxbin0 -> 17711 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport12.cxx6
2 files changed, 6 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/tdf117504_numberingIndent.docx b/sw/qa/extras/ooxmlexport/data/tdf117504_numberingIndent.docx
new file mode 100644
index 000000000000..091718984540
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf117504_numberingIndent.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport12.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport12.cxx
index 878fd2ebf0de..4fda4e47a930 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport12.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport12.cxx
@@ -725,6 +725,12 @@ DECLARE_OOXMLEXPORT_TEST(testObjectCrossReference, "object_cross_reference.odt")
CPPUNIT_ASSERT_EQUAL(sal_uInt16(21), nIndex);
}
+DECLARE_OOXMLEXPORT_TEST(testTdf117504_numberingIndent, "tdf117504_numberingIndent.docx")
+{
+ OUString sName = getProperty<OUString>(getParagraph(1), "NumberingStyleName");
+ CPPUNIT_ASSERT_MESSAGE("Paragraph has numbering style", !sName.isEmpty());
+}
+
DECLARE_OOXMLEXPORT_TEST(testWatermark, "watermark.docx")
{
uno::Reference<drawing::XShape> xShape(getShape(1), uno::UNO_QUERY);