summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Stahl <michael.stahl@allotropia.de>2021-09-08 12:00:22 +0200
committerThorsten Behrens <thorsten.behrens@allotropia.de>2021-09-09 10:57:25 +0200
commit58d98eda287b68404c98900f65b146f53b016778 (patch)
tree3ba26af18bb2b40415c43eeb5580267de39c762c
parent04ea0000d124a7ee9a5ced435725966162133147 (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> (cherry picked from commit 73c8bd42650dafc38c87b5e6dc1ef222d4f6175c) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121768 Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
-rw-r--r--cui/source/dialogs/SpellDialog.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/cui/source/dialogs/SpellDialog.cxx b/cui/source/dialogs/SpellDialog.cxx
index b583fa03768e..7b17b25e71f2 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();
}