summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThorsten Behrens <tbehrens@suse.com>2012-07-24 12:32:56 +0200
committerPetr Mladek <pmladek@suse.cz>2012-07-24 17:46:02 +0200
commit60ebdce4735f8ecf51a6ddd94786d465f112f334 (patch)
tree666ca0c0b5b30f15445b3f07e7ed4c3ea5746f2e
parentb1af9e14759f752689c26f8426a76c35e57064f3 (diff)
Fix fdo#51943 - prevent lose focus event to close popup.
This is a follow-up bandaid for fdo#48096 side-effects, which in turn was a band-aid for side-effects caused by ooo-build's toolbar-decorations-svx.diff. Fix instructs vcl to not auto-close the floater on losefocus events, which at least on OSX comes _before_ we even see the mouse button down event. Change-Id: I21896c4169addffdf2af920a37e0e3786438cc4e Signed-off-by: Thorsten Behrens <tbehrens@suse.com> Signed-off-by: Fridrich Strba <fridrich.strba@suse.com> Signed-off-by: Petr Mladek <pmladek@suse.cz>
-rw-r--r--svx/source/tbxctrls/linectrl.cxx5
-rw-r--r--svx/source/tbxctrls/tbcontrl.cxx18
2 files changed, 16 insertions, 7 deletions
diff --git a/svx/source/tbxctrls/linectrl.cxx b/svx/source/tbxctrls/linectrl.cxx
index 2d649d42cb14..0b75ce7d927e 100644
--- a/svx/source/tbxctrls/linectrl.cxx
+++ b/svx/source/tbxctrls/linectrl.cxx
@@ -744,7 +744,10 @@ SfxPopupWindow* SvxLineEndToolBoxControl::CreatePopupWindow()
{
SvxLineEndWindow* pLineEndWin =
new SvxLineEndWindow( GetId(), m_xFrame, &GetToolBox(), SVX_RESSTR( RID_SVXSTR_LINEEND ) );
- pLineEndWin->StartPopupMode( &GetToolBox(), FLOATWIN_POPUPMODE_GRABFOCUS | FLOATWIN_POPUPMODE_ALLOWTEAROFF );
+ pLineEndWin->StartPopupMode( &GetToolBox(),
+ FLOATWIN_POPUPMODE_GRABFOCUS |
+ FLOATWIN_POPUPMODE_ALLOWTEAROFF |
+ FLOATWIN_POPUPMODE_NOAPPFOCUSCLOSE );
pLineEndWin->StartSelection();
SetPopupWindow( pLineEndWin );
return pLineEndWin;
diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx
index 6ff2c513721c..3e80d552d7b1 100644
--- a/svx/source/tbxctrls/tbcontrl.cxx
+++ b/svx/source/tbxctrls/tbcontrl.cxx
@@ -2127,7 +2127,7 @@ SfxPopupWindow* SvxFontColorToolBoxControl::CreatePopupWindow()
mLastColor);
pColorWin->StartPopupMode( &GetToolBox(),
- FLOATWIN_POPUPMODE_GRABFOCUS|FLOATWIN_POPUPMODE_ALLOWTEAROFF );
+ FLOATWIN_POPUPMODE_GRABFOCUS|FLOATWIN_POPUPMODE_ALLOWTEAROFF|FLOATWIN_POPUPMODE_NOAPPFOCUSCLOSE );
pColorWin->StartSelection();
SetPopupWindow( pColorWin );
return pColorWin;
@@ -2203,7 +2203,7 @@ SfxPopupWindow* SvxColorToolBoxControl::CreatePopupWindow()
mLastColor);
pColorWin->StartPopupMode( &GetToolBox(),
- FLOATWIN_POPUPMODE_GRABFOCUS|FLOATWIN_POPUPMODE_ALLOWTEAROFF );
+ FLOATWIN_POPUPMODE_GRABFOCUS|FLOATWIN_POPUPMODE_ALLOWTEAROFF|FLOATWIN_POPUPMODE_NOAPPFOCUSCLOSE );
pColorWin->StartSelection();
SetPopupWindow( pColorWin );
return pColorWin;
@@ -2331,7 +2331,7 @@ SfxPopupWindow* SvxColorExtToolBoxControl::CreatePopupWindow()
}
pColorWin->StartPopupMode( &GetToolBox(),
- FLOATWIN_POPUPMODE_GRABFOCUS|FLOATWIN_POPUPMODE_ALLOWTEAROFF );
+ FLOATWIN_POPUPMODE_GRABFOCUS|FLOATWIN_POPUPMODE_ALLOWTEAROFF|FLOATWIN_POPUPMODE_NOAPPFOCUSCLOSE );
pColorWin->StartSelection();
SetPopupWindow( pColorWin );
bChoiceFromPalette = sal_True;
@@ -2459,7 +2459,10 @@ SfxPopupWindow* SvxFrameToolBoxControl::CreatePopupWindow()
SvxFrameWindow_Impl* pFrameWin = new SvxFrameWindow_Impl(
GetSlotId(), m_xFrame, &GetToolBox() );
- pFrameWin->StartPopupMode( &GetToolBox(), FLOATWIN_POPUPMODE_GRABFOCUS | FLOATWIN_POPUPMODE_ALLOWTEAROFF );
+ pFrameWin->StartPopupMode( &GetToolBox(),
+ FLOATWIN_POPUPMODE_GRABFOCUS |
+ FLOATWIN_POPUPMODE_ALLOWTEAROFF |
+ FLOATWIN_POPUPMODE_NOAPPFOCUSCLOSE );
pFrameWin->StartSelection();
SetPopupWindow( pFrameWin );
@@ -2508,7 +2511,10 @@ SfxPopupWindowType SvxFrameLineStyleToolBoxControl::GetPopupWindowType() const
SfxPopupWindow* SvxFrameLineStyleToolBoxControl::CreatePopupWindow()
{
SvxLineWindow_Impl* pLineWin = new SvxLineWindow_Impl( GetSlotId(), m_xFrame, &GetToolBox() );
- pLineWin->StartPopupMode( &GetToolBox(), FLOATWIN_POPUPMODE_GRABFOCUS | FLOATWIN_POPUPMODE_ALLOWTEAROFF );
+ pLineWin->StartPopupMode( &GetToolBox(),
+ FLOATWIN_POPUPMODE_GRABFOCUS |
+ FLOATWIN_POPUPMODE_ALLOWTEAROFF |
+ FLOATWIN_POPUPMODE_NOAPPFOCUSCLOSE );
SetPopupWindow( pLineWin );
return pLineWin;
@@ -2573,7 +2579,7 @@ SfxPopupWindow* SvxFrameLineColorToolBoxControl::CreatePopupWindow()
mLastColor);
pColorWin->StartPopupMode( &GetToolBox(),
- FLOATWIN_POPUPMODE_GRABFOCUS|FLOATWIN_POPUPMODE_ALLOWTEAROFF );
+ FLOATWIN_POPUPMODE_GRABFOCUS|FLOATWIN_POPUPMODE_ALLOWTEAROFF|FLOATWIN_POPUPMODE_NOAPPFOCUSCLOSE );
pColorWin->StartSelection();
SetPopupWindow( pColorWin );
return pColorWin;