diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-01-18 00:18:52 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-01-18 00:37:49 +0100 |
commit | 602c87b4259d118e5db6d8a990c4695103f916dd (patch) | |
tree | 1cbc6cf8309b680476f5116cd5320f8f6a99c32a /cui/source/dialogs | |
parent | 849482c0ea88c4aa70ec56adfefe7e59b6060950 (diff) |
Window::PreNotify should return bool
Change-Id: Ic9903fd887f2c3fab2630ebeb20df39392177c8d
Diffstat (limited to 'cui/source/dialogs')
-rw-r--r-- | cui/source/dialogs/SpellDialog.cxx | 5 | ||||
-rw-r--r-- | cui/source/dialogs/colorpicker.cxx | 6 | ||||
-rw-r--r-- | cui/source/dialogs/commonlingui.cxx | 2 | ||||
-rw-r--r-- | cui/source/dialogs/commonlingui.hxx | 2 | ||||
-rw-r--r-- | cui/source/dialogs/hangulhanjadlg.cxx | 12 | ||||
-rw-r--r-- | cui/source/dialogs/hltpbase.cxx | 2 |
6 files changed, 14 insertions, 15 deletions
diff --git a/cui/source/dialogs/SpellDialog.cxx b/cui/source/dialogs/SpellDialog.cxx index 034ada98cc9d..97829c7a356d 100644 --- a/cui/source/dialogs/SpellDialog.cxx +++ b/cui/source/dialogs/SpellDialog.cxx @@ -1274,7 +1274,7 @@ SentenceEditWindow_Impl::~SentenceEditWindow_Impl() #define ACTION_SELECTFIELD 2 #define ACTION_EXPAND 3 -long SentenceEditWindow_Impl::PreNotify( NotifyEvent& rNEvt ) +bool SentenceEditWindow_Impl::PreNotify( NotifyEvent& rNEvt ) { bool bChange = false; const TextCharAttrib* pErrorAttrib = 0; @@ -1538,8 +1538,7 @@ long SentenceEditWindow_Impl::PreNotify( NotifyEvent& rNEvt ) else bChange = false; } - long nRet = bChange ? 1 : MultiLineEdit::PreNotify(rNEvt); - return nRet; + return bChange || MultiLineEdit::PreNotify(rNEvt); } //----------------------------------------------------------------------- diff --git a/cui/source/dialogs/colorpicker.cxx b/cui/source/dialogs/colorpicker.cxx index 34849a0023a5..e0ca149e799f 100644 --- a/cui/source/dialogs/colorpicker.cxx +++ b/cui/source/dialogs/colorpicker.cxx @@ -140,7 +140,7 @@ class HexColorControl : public Edit public: HexColorControl( Window* pParent, const ResId& rResId ); - virtual long PreNotify( NotifyEvent& rNEvt ); + virtual bool PreNotify( NotifyEvent& rNEvt ); virtual void Paste(); void SetColor( sal_Int32 nColor ); @@ -192,12 +192,12 @@ sal_Int32 HexColorControl::GetColor() // ----------------------------------------------------------------------- -long HexColorControl::PreNotify( NotifyEvent& rNEvt ) +bool HexColorControl::PreNotify( NotifyEvent& rNEvt ) { if ( (rNEvt.GetType() == EVENT_KEYINPUT) && !rNEvt.GetKeyEvent()->GetKeyCode().IsMod2() ) { if ( ImplProcessKeyInput( *rNEvt.GetKeyEvent() ) ) - return 1; + return true; } return Edit::PreNotify( rNEvt ); diff --git a/cui/source/dialogs/commonlingui.cxx b/cui/source/dialogs/commonlingui.cxx index d94a074b655f..012895d388cf 100644 --- a/cui/source/dialogs/commonlingui.cxx +++ b/cui/source/dialogs/commonlingui.cxx @@ -46,7 +46,7 @@ void SvxClickInfoCtr::MouseButtonDown( const MouseEvent& ) } //----------------------------------------------------------------------------- -long SvxClickInfoCtr::PreNotify( NotifyEvent& rNEvt ) +bool SvxClickInfoCtr::PreNotify( NotifyEvent& rNEvt ) { if(rNEvt.GetType()==EVENT_GETFOCUS || rNEvt.GetType()==EVENT_MOUSEBUTTONDOWN) { diff --git a/cui/source/dialogs/commonlingui.hxx b/cui/source/dialogs/commonlingui.hxx index 5f53283549f8..1795f016956a 100644 --- a/cui/source/dialogs/commonlingui.hxx +++ b/cui/source/dialogs/commonlingui.hxx @@ -49,7 +49,7 @@ public: protected: virtual void MouseButtonDown( const MouseEvent& rMEvt ); - virtual long PreNotify( NotifyEvent& rNEvt ); + virtual bool PreNotify( NotifyEvent& rNEvt ); }; diff --git a/cui/source/dialogs/hangulhanjadlg.cxx b/cui/source/dialogs/hangulhanjadlg.cxx index dd244e0dc3cb..2dfba19c33fa 100644 --- a/cui/source/dialogs/hangulhanjadlg.cxx +++ b/cui/source/dialogs/hangulhanjadlg.cxx @@ -1388,9 +1388,9 @@ namespace svx { } - long SuggestionEdit::PreNotify( NotifyEvent& rNEvt ) + bool SuggestionEdit::PreNotify( NotifyEvent& rNEvt ) { - long nHandled = 0; + bool nHandled = false; if( rNEvt.GetType() == EVENT_KEYINPUT ) { const KeyEvent* pKEvt = rNEvt.GetKeyEvent(); @@ -1405,7 +1405,7 @@ namespace svx DoJump( bUp ); SetSelection( Selection( 0, SELECTION_MAX ) ); // Tab-travel doesn't really happen, so emulate it by setting a selection manually - nHandled = 1; + nHandled = true; } } else if( KEY_UP == nCode || KEY_DOWN == nCode ) @@ -1414,20 +1414,20 @@ namespace svx if( ShouldScroll( bUp ) ) { DoJump( bUp ); - nHandled = 1; + nHandled = true; } else if( bUp ) { if( m_pPrev ) { m_pPrev->GrabFocus(); - nHandled = 1; + nHandled = true; } } else if( m_pNext ) { m_pNext->GrabFocus(); - nHandled = 1; + nHandled = true; } } } diff --git a/cui/source/dialogs/hltpbase.cxx b/cui/source/dialogs/hltpbase.cxx index 331a9ea47623..29774ddacb60 100644 --- a/cui/source/dialogs/hltpbase.cxx +++ b/cui/source/dialogs/hltpbase.cxx @@ -108,7 +108,7 @@ bool SvxHyperURLBox::Notify( NotifyEvent& rNEvt ) { return SvtURLBox::Notify( rNEvt ); } -long SvxHyperURLBox::PreNotify( NotifyEvent& rNEvt ) +bool SvxHyperURLBox::PreNotify( NotifyEvent& rNEvt ) { return SvtURLBox::PreNotify( rNEvt ); } |