diff options
author | Andreas Heinisch <andreas.heinisch@yahoo.de> | 2022-12-07 14:30:59 +0100 |
---|---|---|
committer | Andreas Heinisch <andreas.heinisch@yahoo.de> | 2022-12-07 14:43:31 +0000 |
commit | 3772f18266c3347e8fd60eb8f058d65328c400b4 (patch) | |
tree | b0f90ce5beb591fa03c4d07a7a3e2805fe1c688d /sw/source/core/doc | |
parent | 39bb374ad949ed10b71d7f5327607df5bcdd05a6 (diff) |
tdf#53023 - Remove last empty paragraph from auto text
Remove the last empty paragraph before inserting an auto text.
The carriage return at the end of it is appended in
SwXMLTextBlockParContext::~SwXMLTextBlockParContext()
which can't be removed without introducing side effects.
In order to compensate for the change, a paragraph has been
added to the existing only text auto texts.
Patch was reverted due to a hang of the ui test. It seems that
selecting an entire text using mkPropertyValues({"KEYCODE":"CTRL+A"}))
does not work anymore.
Change-Id: I08f612d50f496c8d7f891c773ddedf27c3d80864
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143781
Tested-by: Jenkins
Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
Diffstat (limited to 'sw/source/core/doc')
-rw-r--r-- | sw/source/core/doc/docglos.cxx | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sw/source/core/doc/docglos.cxx b/sw/source/core/doc/docglos.cxx index 306564c2a1f5..2993a774ad25 100644 --- a/sw/source/core/doc/docglos.cxx +++ b/sw/source/core/doc/docglos.cxx @@ -142,6 +142,13 @@ 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 |