diff options
author | Szymon Kłos <szymon.klos@collabora.com> | 2021-03-25 17:21:35 +0100 |
---|---|---|
committer | Szymon Kłos <szymon.klos@collabora.com> | 2021-04-13 14:25:04 +0200 |
commit | bd93f5cec54350b6f07c5b7cd4987ea3762e3f40 (patch) | |
tree | 6f007978d9579d636d50cc96f0791f9452802666 /desktop | |
parent | f6d1da91ccda960d1ee738d688a2cb374e576aef (diff) |
impress: don't exit textbox editing when new slide was added
When new slide is added by other user before currently visible slide
then SwitchPage is called and textbox editing is ended.
Avoid any focus change when setPart is called just for rendering
or SwitchPage is used on previously avtive slide (only slide numer changed).
Change-Id: I7fef42b863e0079acc84dadfc3f891548652b48f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113144
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113806
Tested-by: Jenkins
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
Diffstat (limited to 'desktop')
-rw-r--r-- | desktop/source/lib/init.cxx | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 087474487b97..e2027ab218ba 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -2973,7 +2973,7 @@ static int doc_getPart (LibreOfficeKitDocument* pThis) return pDoc->getPart(); } -static void doc_setPart(LibreOfficeKitDocument* pThis, int nPart) +static void doc_setPartImpl(LibreOfficeKitDocument* pThis, int nPart, bool bAllowChangeFocus = true) { comphelper::ProfileZone aZone("doc_setPart"); @@ -2987,7 +2987,12 @@ static void doc_setPart(LibreOfficeKitDocument* pThis, int nPart) return; } - pDoc->setPart( nPart ); + pDoc->setPart( nPart, bAllowChangeFocus ); +} + +static void doc_setPart(LibreOfficeKitDocument* pThis, int nPart) +{ + doc_setPartImpl(pThis, nPart, true); } static char* doc_getPartInfo(LibreOfficeKitDocument* pThis, int nPart) @@ -3301,7 +3306,7 @@ static void doc_paintPartTile(LibreOfficeKitDocument* pThis, nOrigPart = doc_getPart(pThis); if (nPart != nOrigPart) { - doc_setPart(pThis, nPart); + doc_setPartImpl(pThis, nPart, false); } } @@ -3309,7 +3314,7 @@ static void doc_paintPartTile(LibreOfficeKitDocument* pThis, if (!isText && nPart != nOrigPart) { - doc_setPart(pThis, nOrigPart); + doc_setPartImpl(pThis, nOrigPart, false); } if (!isText && nViewId != nOrigViewId) { |