[Libreoffice-commits] core.git: Branch 'libreoffice-6-3' - sc/source
Miklos Vajna (via logerrit)
logerrit at kemper.freedesktop.org
Wed Jul 24 19:36:54 UTC 2019
sc/source/ui/drawfunc/futext3.cxx | 5 +++++
1 file changed, 5 insertions(+)
New commits:
commit f5f894e1608a75dffc07ddb3644b566fee1b6848
Author: Miklos Vajna <vmiklos at collabora.com>
AuthorDate: Mon Jul 22 13:58:57 2019 +0200
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Wed Jul 24 21:35:47 2019 +0200
tdf#106000 sc ui: fix missing invalidation when cancelling note creation
Regression from commit dca01def7885ad69cf66edd75cf8207a5adb64f9
(refactor ListBox/ComboBox to use RenderContext, 2015-05-07),
invalidating the area of note anchors worked like this in the past:
- user ended text edit of a new, empty comment
- the Calc shell was updated from shape text edit to the tab view, which
called ImplListBoxWindow::SelectEntry()
- this called ImplPaint(), which invoked maUserDrawHdl (if it was set)
- and at the end this invoked ScViewFunc::UpdateSelectionArea(), all
triggered by the font name and font size listboxes
So the update of the cell of the former note depended on the presence of
font name/size listboxes, by accident.
This broke, because ImplListBoxWindow::SelectEntry() now calls
Invalidate(), and Paint() calls ImplDoPaint(), which doesn't invoke
maUserDrawHdl anymore. Fix the problem by invalidating the cell
explicitly, so in case the user customizes the toolbar to not have these
listboxes, the behavior is still correct.
Do this in FuText::StopEditMode(), because there we know the position of
the deleted note and that's where we delete the matching SdrCaptionObj
(via the RemoveLastUndoAction()).
(cherry picked from commit d001492faddb0b95356c7744aa4d193aacb38d7d)
Change-Id: Iaa4b609477ac6c7f23efc575fddac6e39aa6a7b5
Reviewed-on: https://gerrit.libreoffice.org/76128
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/sc/source/ui/drawfunc/futext3.cxx b/sc/source/ui/drawfunc/futext3.cxx
index 5c1d3a6ed00b..cbdcefb7d893 100644
--- a/sc/source/ui/drawfunc/futext3.cxx
+++ b/sc/source/ui/drawfunc/futext3.cxx
@@ -157,6 +157,11 @@ void FuText::StopEditMode()
if( bNewNote && bDeleteNote )
{
pUndoMgr->RemoveLastUndoAction();
+
+ // Make sure the former area of the note anchor is invalidated.
+ ScRangeList aRangeList(aNotePos);
+ ScMarkData aMarkData(aRangeList);
+ rViewShell.UpdateSelectionArea(aMarkData);
}
else if( bNewNote || bDeleteNote )
{
More information about the Libreoffice-commits
mailing list