diff options
author | Ashod Nakashian <ashod.nakashian@collabora.co.uk> | 2020-03-01 14:08:20 -0500 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2020-03-11 13:38:53 +0100 |
commit | 6b84dfabbb5f6930f9ac582f8c1dd9f467fd068c (patch) | |
tree | c188afa2081ffbf1eef7d1069b8ca8bd46e80519 /include/editeng | |
parent | Disable gtk in the build-config when cross-compiling. (diff) | |
download | core-6b84dfabbb5f6930f9ac582f8c1dd9f467fd068c.tar.gz core-6b84dfabbb5f6930f9ac582f8c1dd9f467fd068c.zip |
editeng: lok: send cursor visibility event when restoring update mode
When the default text is removed from a TextBox within a slide,
the cursor visibility is inadvertendly set to false and never
restored (because the LOK notification is disabled due to treating
the ShowCursor during SetUpdateMode as an activation of the TextBox,
and that is supressed to avoid messing up the cursor when creating
a new view).
We add a new flag to SetUpdateMode to flag whether this is an
activation or we are restoring a previously active window (TextBox)
due to a temporary disabling (to clear the default text).
Three unit-tests added not just to check and validate the fix,
but to also simulate two different ways of entering edit mode,
first by single-clicking on the text and then double-clicking
outside the text, but within the TextBox.
Change-Id: Icaaabc2a897f614f5ce162b71fadccff22ecda02
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90301
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'include/editeng')
-rw-r--r-- | include/editeng/editeng.hxx | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/include/editeng/editeng.hxx b/include/editeng/editeng.hxx index 9ef500818133..f3e508db7d91 100644 --- a/include/editeng/editeng.hxx +++ b/include/editeng/editeng.hxx @@ -216,7 +216,11 @@ public: void SetRefMapMode( const MapMode& rMapMode ); MapMode const & GetRefMapMode(); - void SetUpdateMode( bool bUpdate ); + /// Change the update mode per bUpdate and potentially trigger FormatAndUpdate. + /// bRestoring is used for LOK to update cursor visibility, specifically, + /// when true, it means we are restoring the update mode after internally + /// disabling it (f.e. during SetText to set/delete default text in Impress). + void SetUpdateMode(bool bUpdate, bool bRestoring = false); bool GetUpdateMode() const; void SetBackgroundColor( const Color& rColor ); |