[Libreoffice-commits] core.git: svx/source
Jim Raykowski (via logerrit)
logerrit at kemper.freedesktop.org
Thu Jun 13 21:07:23 UTC 2019
svx/source/tbxctrls/tbcontrl.cxx | 6 ++++--
svx/source/tbxctrls/tbunocontroller.cxx | 5 ++++-
2 files changed, 8 insertions(+), 3 deletions(-)
New commits:
commit c81055eb075efffa9cd123913a684ac3258903d5
Author: Jim Raykowski <raykowj at gmail.com>
AuthorDate: Sat May 25 16:08:40 2019 -0800
Commit: Jim Raykowski <raykowj at gmail.com>
CommitDate: Thu Jun 13 23:06:26 2019 +0200
tdf#120170 Prevent escape key press focus to document
...from style, fontname, and fontsize comboboxes used in sidebar tool
boxes when sidebar is undocked
Windows build does not show this bug but Linux does for
SAL_USE_VCLPLUGIN's gen, gtk, and gtk3.
This patch checks the combobox parent object type for type sidebar tool
box and if so skips the release focus call that sets focus to the frames
container window which incorrectly sets focus to the document for Linux
build. Probably a lower level fix for this but I'm not at that level yet
:-)
Change-Id: Ie33ea4238f7e8715fbd0389efd9185598a528ced
Reviewed-on: https://gerrit.libreoffice.org/72970
Tested-by: Jenkins
Reviewed-by: Jim Raykowski <raykowj at gmail.com>
diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx
index 0b1c52b88acf..125d6d21432e 100644
--- a/svx/source/tbxctrls/tbcontrl.cxx
+++ b/svx/source/tbxctrls/tbcontrl.cxx
@@ -898,7 +898,8 @@ bool SvxStyleBox_Impl::EventNotify( NotifyEvent& rNEvt )
case KEY_ESCAPE:
SelectEntryPos( nCurSel );
- ReleaseFocus();
+ if ( typeid( *GetParent() ) != typeid( sfx2::sidebar::SidebarToolBox ) )
+ ReleaseFocus();
bHandled = true;
break;
}
@@ -1416,7 +1417,8 @@ bool SvxFontNameBox_Impl::EventNotify( NotifyEvent& rNEvt )
case KEY_ESCAPE:
SetText( aCurText );
- ReleaseFocus_Impl();
+ if ( typeid( *GetParent() ) != typeid( sfx2::sidebar::SidebarToolBox ) )
+ ReleaseFocus_Impl();
EndPreview();
break;
}
diff --git a/svx/source/tbxctrls/tbunocontroller.cxx b/svx/source/tbxctrls/tbunocontroller.cxx
index 96ff89a22a3c..628a9585e922 100644
--- a/svx/source/tbxctrls/tbunocontroller.cxx
+++ b/svx/source/tbxctrls/tbunocontroller.cxx
@@ -39,6 +39,8 @@
#include <memory>
+#include <sfx2/sidebar/SidebarToolBox.hxx>
+
using namespace ::com::sun::star;
namespace {
@@ -230,7 +232,8 @@ bool SvxFontSizeBox_Impl::EventNotify( NotifyEvent& rNEvt )
case KEY_ESCAPE:
SetText( m_aCurText );
- ReleaseFocus_Impl();
+ if ( typeid( *GetParent() ) != typeid( sfx2::sidebar::SidebarToolBox ) )
+ ReleaseFocus_Impl();
bHandled = true;
break;
}
More information about the Libreoffice-commits
mailing list