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 /extensions/source/propctrlr | |
parent | 849482c0ea88c4aa70ec56adfefe7e59b6060950 (diff) |
Window::PreNotify should return bool
Change-Id: Ic9903fd887f2c3fab2630ebeb20df39392177c8d
Diffstat (limited to 'extensions/source/propctrlr')
-rw-r--r-- | extensions/source/propctrlr/browserlistbox.cxx | 4 | ||||
-rw-r--r-- | extensions/source/propctrlr/browserlistbox.hxx | 2 | ||||
-rw-r--r-- | extensions/source/propctrlr/commoncontrol.hxx | 6 | ||||
-rw-r--r-- | extensions/source/propctrlr/standardcontrol.cxx | 10 | ||||
-rw-r--r-- | extensions/source/propctrlr/standardcontrol.hxx | 6 | ||||
-rw-r--r-- | extensions/source/propctrlr/usercontrol.cxx | 4 | ||||
-rw-r--r-- | extensions/source/propctrlr/usercontrol.hxx | 2 |
7 files changed, 17 insertions, 17 deletions
diff --git a/extensions/source/propctrlr/browserlistbox.cxx b/extensions/source/propctrlr/browserlistbox.cxx index 1333185d9843..ac52c6aee332 100644 --- a/extensions/source/propctrlr/browserlistbox.cxx +++ b/extensions/source/propctrlr/browserlistbox.cxx @@ -1207,7 +1207,7 @@ namespace pcr } //------------------------------------------------------------------ - long OBrowserListBox::PreNotify( NotifyEvent& _rNEvt ) + bool OBrowserListBox::PreNotify( NotifyEvent& _rNEvt ) { switch ( _rNEvt.GetType() ) { @@ -1255,7 +1255,7 @@ namespace pcr } } - return 1L; + return true; // handled this. In particular, we also consume PageUp/Down events if we do not use them for scrolling, // otherwise they would be used to scroll the document view, which does not sound like it is desired by // the user. diff --git a/extensions/source/propctrlr/browserlistbox.hxx b/extensions/source/propctrlr/browserlistbox.hxx index 2001034dbec2..6b1da47ba8a9 100644 --- a/extensions/source/propctrlr/browserlistbox.hxx +++ b/extensions/source/propctrlr/browserlistbox.hxx @@ -134,7 +134,7 @@ namespace pcr void EnableUpdate(); void DisableUpdate(); bool Notify( NotifyEvent& _rNEvt ); - long PreNotify( NotifyEvent& _rNEvt ); + virtual bool PreNotify( NotifyEvent& _rNEvt ); void SetListener( IPropertyLineListener* _pListener ); void SetObserver( IPropertyControlObserver* _pObserver ); diff --git a/extensions/source/propctrlr/commoncontrol.hxx b/extensions/source/propctrlr/commoncontrol.hxx index f8aaa357c0cf..fe1405a604ec 100644 --- a/extensions/source/propctrlr/commoncontrol.hxx +++ b/extensions/source/propctrlr/commoncontrol.hxx @@ -58,7 +58,7 @@ namespace pcr protected: // Window overridables - inline virtual long PreNotify( NotifyEvent& rNEvt ); + inline virtual bool PreNotify( NotifyEvent& rNEvt ); }; //======================================================================== @@ -231,10 +231,10 @@ namespace pcr //------------------------------------------------------------------------ template< class WINDOW > - inline long ControlWindow< WINDOW >::PreNotify( NotifyEvent& rNEvt ) + inline bool ControlWindow< WINDOW >::PreNotify( NotifyEvent& rNEvt ) { if ( m_pHelper && m_pHelper->handlePreNotify( rNEvt ) ) - return 1; + return true; return WindowType::PreNotify( rNEvt ); } diff --git a/extensions/source/propctrlr/standardcontrol.cxx b/extensions/source/propctrlr/standardcontrol.cxx index ced964c690e0..fe471ac93573 100644 --- a/extensions/source/propctrlr/standardcontrol.cxx +++ b/extensions/source/propctrlr/standardcontrol.cxx @@ -971,7 +971,7 @@ namespace pcr MultiLineEdit* getEdit() { return &m_aImplEdit; } protected: - virtual long PreNotify(NotifyEvent& _rNEvt); + virtual bool PreNotify(NotifyEvent& _rNEvt); }; //------------------------------------------------------------------ @@ -989,9 +989,9 @@ namespace pcr } //------------------------------------------------------------------ - long OMultilineFloatingEdit::PreNotify(NotifyEvent& _rNEvt) + bool OMultilineFloatingEdit::PreNotify(NotifyEvent& _rNEvt) { - long nResult = sal_True; + bool nResult = true; sal_uInt16 nSwitch = _rNEvt.GetType(); if (EVENT_KEYINPUT == nSwitch) @@ -1095,9 +1095,9 @@ namespace pcr } //------------------------------------------------------------------ - long DropDownEditControl::PreNotify( NotifyEvent& rNEvt ) + bool DropDownEditControl::PreNotify( NotifyEvent& rNEvt ) { - long nResult = 1; + bool nResult = true; if (rNEvt.GetType() == EVENT_KEYINPUT) { diff --git a/extensions/source/propctrlr/standardcontrol.hxx b/extensions/source/propctrlr/standardcontrol.hxx index b7cd14efb3c7..5d8f62718565 100644 --- a/extensions/source/propctrlr/standardcontrol.hxx +++ b/extensions/source/propctrlr/standardcontrol.hxx @@ -66,12 +66,12 @@ namespace pcr void SetModifyHdl( const Link& _rLink ) { ListBoxType::SetSelectHdl( _rLink ); } protected: - long PreNotify( NotifyEvent& _rNEvt ); + bool PreNotify( NotifyEvent& _rNEvt ); }; //------------------------------------------------------------------------ template< class LISTBOX_WINDOW > - long ListLikeControlWithModifyHandler< LISTBOX_WINDOW >::PreNotify( NotifyEvent& _rNEvt ) + bool ListLikeControlWithModifyHandler< LISTBOX_WINDOW >::PreNotify( NotifyEvent& _rNEvt ) { if ( _rNEvt.GetType() == EVENT_KEYINPUT ) { @@ -399,7 +399,7 @@ namespace pcr protected: // Window overridables - virtual long PreNotify( NotifyEvent& rNEvt ); + virtual bool PreNotify( NotifyEvent& rNEvt ); virtual void Resize(); protected: diff --git a/extensions/source/propctrlr/usercontrol.cxx b/extensions/source/propctrlr/usercontrol.cxx index 9433c6d0f559..833dd60df576 100644 --- a/extensions/source/propctrlr/usercontrol.cxx +++ b/extensions/source/propctrlr/usercontrol.cxx @@ -45,7 +45,7 @@ namespace pcr // NumberFormatSampleField //================================================================== //------------------------------------------------------------------ - long NumberFormatSampleField::PreNotify( NotifyEvent& rNEvt ) + bool NumberFormatSampleField::PreNotify( NotifyEvent& rNEvt ) { // want to handle two keys myself : Del/Backspace should empty the window (setting my prop to "standard" this way) if (EVENT_KEYINPUT == rNEvt.GetType()) @@ -57,7 +57,7 @@ namespace pcr SetText( "" ); if ( m_pHelper ) m_pHelper->ModifiedHdl( this ); - return 1; + return true; } } diff --git a/extensions/source/propctrlr/usercontrol.hxx b/extensions/source/propctrlr/usercontrol.hxx index c860b772398c..e87071134a44 100644 --- a/extensions/source/propctrlr/usercontrol.hxx +++ b/extensions/source/propctrlr/usercontrol.hxx @@ -49,7 +49,7 @@ namespace pcr void SetFormatSupplier( const SvNumberFormatsSupplierObj* pSupplier ); protected: - virtual long PreNotify( NotifyEvent& rNEvt ); + virtual bool PreNotify( NotifyEvent& rNEvt ); }; //======================================================================== |