diff options
author | Vasily Melenchuk <vasily.melenchuk@cib.de> | 2021-10-23 11:48:07 +0200 |
---|---|---|
committer | Vasily Melenchuk <vasily.melenchuk@cib.de> | 2021-10-23 21:28:25 +0200 |
commit | b66ed4cb3707800b8bd9ab0f397c226037e10fbf (patch) | |
tree | 627d0b6b73078ba2481265cb1692c0abda38e9f5 /sw | |
parent | 911c74d0ec05a2b216936e3f58900a4aea137146 (diff) |
tdf#145215: docx: do not initialize prefix/suffix and include levels
On DOCX import we do not need to provide prefix, suffix and included
levels: these values are calculated in SvxNumberFormat out from list
format. Moreover these values are incorrect and do not correspond
not to DOCX data nor to internal writer representation of list level.
Change-Id: I91ec9de679e67056ba3746f2e1a0bd923532d76c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124090
Tested-by: Jenkins
Reviewed-by: Vasily Melenchuk <vasily.melenchuk@cib.de>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/uitest/chapterNumbering/tdf145215.py | 34 | ||||
-rw-r--r-- | sw/qa/uitest/data/tdf145215.docx | bin | 0 -> 37477 bytes |
2 files changed, 34 insertions, 0 deletions
diff --git a/sw/qa/uitest/chapterNumbering/tdf145215.py b/sw/qa/uitest/chapterNumbering/tdf145215.py new file mode 100644 index 000000000000..31d7437d72aa --- /dev/null +++ b/sw/qa/uitest/chapterNumbering/tdf145215.py @@ -0,0 +1,34 @@ +# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*- +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# + +from uitest.framework import UITestCase +from uitest.uihelper.common import get_url_for_data_file, get_state_as_dict + +class Tdf145215(UITestCase): + + def test_tdf145215(self): + with self.ui_test.load_file(get_url_for_data_file("tdf145215.docx")) as writer_doc: + with self.ui_test.execute_dialog_through_command(".uno:ChapterNumberingDialog") as xDialog: + xTab = xDialog.getChild("tabcontrol") + + # Select level "4" + xLevel = xDialog.getChild("level") + xLevel2 = xLevel.getChild("3") + xLevel2.executeAction("SELECT", tuple()) + self.assertEqual("4", get_state_as_dict(xLevel)['SelectEntryText']) + + # Check value for show upper levels + xSubLevels = xDialog.getChild("sublevelsnf") + self.assertEqual(get_state_as_dict(xSubLevels)["Text"], "1") + + # Check field value (there is only one field) + textfields = writer_doc.getTextFields() + for textfield in textfields: + self.assertTrue(textfield.supportsService("com.sun.star.text.TextField.GetReference")) + self.assertEqual(textfield.CurrentPresentation, "1.2.1(i)") + +# vim: set shiftwidth=4 softtabstop=4 expandtab: diff --git a/sw/qa/uitest/data/tdf145215.docx b/sw/qa/uitest/data/tdf145215.docx Binary files differnew file mode 100644 index 000000000000..b91d13b286c8 --- /dev/null +++ b/sw/qa/uitest/data/tdf145215.docx |