summaryrefslogtreecommitdiff
path: root/svx/source/tbxctrls/tbcontrl.cxx
diff options
context:
space:
mode:
authorJim Raykowski <raykowj@gmail.com>2019-05-25 16:08:40 -0800
committerJim Raykowski <raykowj@gmail.com>2019-06-13 23:06:26 +0200
commitc81055eb075efffa9cd123913a684ac3258903d5 (patch)
tree4d7af5110ee5817724bce9bfe8236970491e03fa /svx/source/tbxctrls/tbcontrl.cxx
parent547c8a8a8935204bed319b959dd040d6413bdf74 (diff)
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@gmail.com>
Diffstat (limited to 'svx/source/tbxctrls/tbcontrl.cxx')
-rw-r--r--svx/source/tbxctrls/tbcontrl.cxx6
1 files changed, 4 insertions, 2 deletions
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;
}