diff options
author | Andreas Heinisch <andreas.heinisch@yahoo.de> | 2022-12-07 11:03:01 +0000 |
---|---|---|
committer | Andreas Heinisch <andreas.heinisch@yahoo.de> | 2022-12-07 12:21:47 +0000 |
commit | 36a554e1f1c4e924a2cbc2df5a4f164fa31e3d6b (patch) | |
tree | b39e25f2c2b967cb781807b77ec85c715eb67bff /sw | |
parent | d193d65635de197efe32d97a99540a31a5455c41 (diff) |
Revert "tdf#53023 - Remove last empty paragraph from auto text"
This reverts commit ce64398653a896c8a48dd6cabe2b75d9c025873d.
Reason for revert: UI-Tests hang
Change-Id: Ib4b576e66da8642f3ffe8774e92a7e7c2c527b08
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143717
Tested-by: Jenkins
Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
Diffstat (limited to 'sw')
-rwxr-xr-x | sw/qa/uitest/writer_tests3/tdf53023.py | 38 | ||||
-rw-r--r-- | sw/source/core/doc/docglos.cxx | 7 |
2 files changed, 0 insertions, 45 deletions
diff --git a/sw/qa/uitest/writer_tests3/tdf53023.py b/sw/qa/uitest/writer_tests3/tdf53023.py deleted file mode 100755 index ca95fcb62f46..000000000000 --- a/sw/qa/uitest/writer_tests3/tdf53023.py +++ /dev/null @@ -1,38 +0,0 @@ -# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*- -# -# This file is part of the LibreOffice project. -# -# 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 type_text -from libreoffice.uno.propertyvalue import mkPropertyValues - -class tdf53023(UITestCase): - - def test_tdf53023_autotext_new_paragraph(self): - with self.ui_test.create_doc_in_start_center("writer") as document: - # Insert a test text and select it - xWriterDoc = self.xUITest.getTopFocusWindow() - xWriterEdit = xWriterDoc.getChild("writer_edit") - type_text(xWriterEdit, "This is a test") - xWriterEdit.executeAction("TYPE", mkPropertyValues({"KEYCODE":"CTRL+A"})) - - # Create auto text entry from the previously inserted text and insert it - with self.ui_test.execute_dialog_through_command(".uno:EditGlossary") as xEditGlossaryDlg: - xCategory = xEditGlossaryDlg.getChild("category") - xMyAutoText = xCategory.getChild("2") - xMyAutoText.executeAction("SELECT", tuple()) - xAutoTextName = xEditGlossaryDlg.getChild("name") - type_text(xAutoTextName, "Test") - xEditMenu = xEditGlossaryDlg.getChild("autotext") - xEditMenu.executeAction("OPENFROMLIST", mkPropertyValues({"POS": "1"})) - - # Without the fix in place, this test would have failed with - # AssertionError: 'This is a test' != 'This is a test\r\n' - self.assertEqual("This is a test", document.Text.String) - -# vim: set shiftwidth=4 softtabstop=4 expandtab: diff --git a/sw/source/core/doc/docglos.cxx b/sw/source/core/doc/docglos.cxx index 2993a774ad25..306564c2a1f5 100644 --- a/sw/source/core/doc/docglos.cxx +++ b/sw/source/core/doc/docglos.cxx @@ -142,13 +142,6 @@ bool SwDoc::InsertGlossary( SwTextBlocks& rBlock, const OUString& rEntry, { SwDoc* pGDoc = rBlock.GetDoc(); - // tdf#53023 - remove the last empty paragraph (check SwXMLTextBlockParContext dtor) - if (mbInsOnlyTextGlssry) - { - SwPaM aPaM(*pGDoc->GetNodes()[pGDoc->GetNodes().GetEndOfContent().GetIndex() - 1]); - pGDoc->getIDocumentContentOperations().DelFullPara(aPaM); - } - // Update all fixed fields, with the right DocInfo. // FIXME: UGLY: Because we cannot limit the range in which to do // field updates, we must update the fixed fields at the glossary |