diff options
author | Michael Stahl <michael.stahl@allotropia.de> | 2021-09-08 12:00:22 +0200 |
---|---|---|
committer | Michael Stahl <michael.stahl@allotropia.de> | 2021-09-08 13:33:48 +0200 |
commit | 73c8bd42650dafc38c87b5e6dc1ef222d4f6175c (patch) | |
tree | 33635ff633f80904a64d4d26a4957ec272e65c80 | |
parent | 28ac9bd1d8ff19e1b60c64a205220167baf5085f (diff) |
cui: fix spell check dialog pointlessly modifying text shape
In Impress, closing the spell check dialog without doing any changes
will replace the entire text of a shape, creating an
sd::UndoObjectSetText and messing up the formatting.
Apparently in commit bbb1428e3666acc7503d86704bbf1e1a4ac04795
a check of the modified flag was removed, but it's not obvious why,
so add it back, which appears to fix the problem.
Change-Id: I8ce6c75f097baa82f11f7b1c813262845001ae7f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121807
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
-rw-r--r-- | cui/source/dialogs/SpellDialog.cxx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/cui/source/dialogs/SpellDialog.cxx b/cui/source/dialogs/SpellDialog.cxx index 22072108293c..6adadba8441d 100644 --- a/cui/source/dialogs/SpellDialog.cxx +++ b/cui/source/dialogs/SpellDialog.cxx @@ -904,7 +904,10 @@ IMPL_LINK_NOARG(SpellDialog, ModifyHdl, LinkParamNone*, void) IMPL_LINK_NOARG(SpellDialog, CancelHdl, weld::Button&, void) { //apply changes and ignored text parts first - if there are any - rParent.ApplyChangedSentence(m_xSentenceED->CreateSpellPortions(), false); + if (m_xSentenceED->IsModified()) + { + rParent.ApplyChangedSentence(m_xSentenceED->CreateSpellPortions(), false); + } Close(); } |