summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorJustin Luth <justin_luth@sil.org>2017-10-28 13:01:11 +0300
committerJustin Luth <justin_luth@sil.org>2017-10-31 05:07:13 +0100
commit0d6b4f5f6946cdadfe2a09946df90fa08f3588d0 (patch)
tree321f67aae06e3ef2ce948261df76d4577223100a /sw
parent45f76baf6d7f38849e2972b7d0931f4046723f7e (diff)
tdf#82065 strict docx import: add support for LN_CT_Ind_start
Change-Id: Iaddd9e852388f5bb076c4bc6f8eee8a256581033 Reviewed-on: https://gerrit.libreoffice.org/43985 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Justin Luth <justin_luth@sil.org>
Diffstat (limited to 'sw')
-rwxr-xr-xsw/qa/extras/ooxmlexport/data/tdf82065_Ind_start_strict.docxbin0 -> 12533 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport11.cxx20
2 files changed, 20 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/tdf82065_Ind_start_strict.docx b/sw/qa/extras/ooxmlexport/data/tdf82065_Ind_start_strict.docx
new file mode 100755
index 000000000000..6cbdbdc97c23
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf82065_Ind_start_strict.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
index 861f863cc54d..bb368bccbfcc 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
@@ -46,6 +46,26 @@ DECLARE_OOXMLEXPORT_TEST(testTdf92524_autoColor, "tdf92524_autoColor.doc")
CPPUNIT_ASSERT_EQUAL(COL_AUTO, getProperty<sal_uInt32>(getParagraph(1), "ParaBackColor"));
}
+DECLARE_OOXMLEXPORT_TEST(testTdf82065_Ind_start_strict, "tdf82065_Ind_start_strict.docx")
+{
+ uno::Reference<beans::XPropertySet> xPropertySet(getStyles("NumberingStyles")->getByName("WWNum1"), uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xLevels(xPropertySet->getPropertyValue("NumberingRules"), uno::UNO_QUERY);
+ uno::Sequence<beans::PropertyValue> aProps;
+ xLevels->getByIndex(0) >>= aProps; // 1st level
+ bool bFoundIndentAt = false;
+ for (int i = 0; i < aProps.getLength(); ++i)
+ {
+ const beans::PropertyValue& rProp = aProps[i];
+
+ if (rProp.Name == "IndentAt")
+ {
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("IndentAt", sal_uInt32(6001), rProp.Value.get<sal_uInt32>() );
+ bFoundIndentAt = true;
+ }
+ }
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("IndentAt defined", true, bFoundIndentAt);
+}
+
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */