summaryrefslogtreecommitdiff
path: root/sw/qa/extras
diff options
context:
space:
mode:
authorJustin Luth <justin_luth@sil.org>2020-09-10 18:32:49 +0200
committerJustin Luth <justin_luth@sil.org>2020-09-10 21:30:53 +0200
commit23126db6e0ca3eb51748b6f579d066f20536d27b (patch)
treeed32ee875603c5a66ee047ac81412b1f4593b011 /sw/qa/extras
parentefbfdd935e319817b0680a7115a5061604262d1c (diff)
Revert "tdf#59674 Word export: set a tabstop at numbering IndentAt"
This reverts commit 5ad17c85dc93973c0cbb1d633b9eed144f0677de for the benefit of all mankind, and specifically tdf#136644. Reason for revert: LO's UI for this is totally messed up, so I want to completely get out of anything to do with numbering/bullets. It is inconsistent with how it handles default tab stops (delete all when none are shown and things act different), it doesn't always increment levels properly, and does all kinds of weird things. Change-Id: Ifaf8c3a7c9ac30b7103b82dd119cb4629f0b2578 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102415 Tested-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Justin Luth <justin_luth@sil.org>
Diffstat (limited to 'sw/qa/extras')
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport14.cxx25
-rw-r--r--sw/qa/extras/ww8export/data/tdf59674_numberingTabStop.odtbin14840 -> 0 bytes
-rw-r--r--sw/qa/extras/ww8export/ww8export3.cxx12
3 files changed, 17 insertions, 20 deletions
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx
index fcbda86665cd..b8e7a3d27614 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx
@@ -327,19 +327,28 @@ DECLARE_OOXMLEXPORT_TEST(testTdf134260, "tdf134260.docx")
// - Expected: 0
// - Actual : 1270
- auto xNumLevels
- = getProperty<uno::Reference<container::XIndexAccess>>(getParagraph(3), "NumberingRules");
+ auto xNum1Levels
+ = getProperty<uno::Reference<container::XIndexAccess>>(getParagraph(1), "NumberingRules");
+
+ CPPUNIT_ASSERT_EQUAL(
+ sal_Int32(0),
+ comphelper::SequenceAsHashMap(xNum1Levels->getByIndex(0))["ListtabStopPosition"]
+ .get<sal_Int32>());
+
+ auto xNum2Levels
+ = getProperty<uno::Reference<container::XIndexAccess>>(getParagraph(2), "NumberingRules");
- sal_Int32 nTabPosExpected = mbExported ? 1270 : 0;
CPPUNIT_ASSERT_EQUAL(
- nTabPosExpected,
- comphelper::SequenceAsHashMap(xNumLevels->getByIndex(0))["ListtabStopPosition"]
+ sal_Int32(0),
+ comphelper::SequenceAsHashMap(xNum2Levels->getByIndex(0))["ListtabStopPosition"]
.get<sal_Int32>());
- nTabPosExpected = mbExported ? 2598 : 0;
+ auto xNum3Levels
+ = getProperty<uno::Reference<container::XIndexAccess>>(getParagraph(3), "NumberingRules");
+
CPPUNIT_ASSERT_EQUAL(
- nTabPosExpected,
- comphelper::SequenceAsHashMap(xNumLevels->getByIndex(1))["ListtabStopPosition"]
+ sal_Int32(0),
+ comphelper::SequenceAsHashMap(xNum3Levels->getByIndex(0))["ListtabStopPosition"]
.get<sal_Int32>());
}
diff --git a/sw/qa/extras/ww8export/data/tdf59674_numberingTabStop.odt b/sw/qa/extras/ww8export/data/tdf59674_numberingTabStop.odt
deleted file mode 100644
index 5edcbaebcf93..000000000000
--- a/sw/qa/extras/ww8export/data/tdf59674_numberingTabStop.odt
+++ /dev/null
Binary files differ
diff --git a/sw/qa/extras/ww8export/ww8export3.cxx b/sw/qa/extras/ww8export/ww8export3.cxx
index 757e24b40555..b5a9d336cf74 100644
--- a/sw/qa/extras/ww8export/ww8export3.cxx
+++ b/sw/qa/extras/ww8export/ww8export3.cxx
@@ -147,18 +147,6 @@ CPPUNIT_TEST_FIXTURE(SwModelTestBase, testChicagoNumberingFootnote)
CPPUNIT_ASSERT_EQUAL(nExpected, nActual);
}
-DECLARE_WW8EXPORT_TEST(testTdf59674_numberingTabStop, "tdf59674_numberingTabStop.odt")
-{
- // This bug is mainly for MS Word. The round-trip looked fine in LO. Test exporting a non-useless value.
- auto xNum1Levels = getProperty<uno::Reference<container::XIndexAccess>>(getParagraph(2), "NumberingRules");
- sal_Int32 nTabPos2 = comphelper::SequenceAsHashMap(xNum1Levels->getByIndex(0))["ListtabStopPosition"].get<sal_Int32>();
- xNum1Levels.set(getProperty<uno::Reference<container::XIndexAccess>>(getParagraph(3), "NumberingRules"));
- sal_Int32 nTabPos3 = comphelper::SequenceAsHashMap(xNum1Levels->getByIndex(0))["ListtabStopPosition"].get<sal_Int32>();
-
- CPPUNIT_ASSERT_EQUAL(sal_Int32(1281), nTabPos2);
- CPPUNIT_ASSERT_EQUAL(sal_Int32(5001), nTabPos3); //previously 640
-}
-
DECLARE_WW8EXPORT_TEST(testdf79553_lineNumbers, "tdf79553_lineNumbers.doc")
{
bool bValue = false;