diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-01-17 16:40:50 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-01-17 16:42:29 +0100 |
commit | 04683f14883f4cd64febadd71b327639f1e7edcc (patch) | |
tree | d1195eec7abc45fcf3b28776278f3856638a4a32 /svx/source/tbxctrls | |
parent | VML import: fix height of textboxes when border distance is non-zero (diff) | |
download | core-04683f14883f4cd64febadd71b327639f1e7edcc.tar.gz core-04683f14883f4cd64febadd71b327639f1e7edcc.zip |
Window::Notify should return bool
Change-Id: I72081b1022582c8b6f95a611e21d9c78f7581efe
Diffstat (limited to 'svx/source/tbxctrls')
-rw-r--r-- | svx/source/tbxctrls/colrctrl.cxx | 8 | ||||
-rw-r--r-- | svx/source/tbxctrls/grafctrl.cxx | 10 | ||||
-rw-r--r-- | svx/source/tbxctrls/itemwin.cxx | 38 | ||||
-rw-r--r-- | svx/source/tbxctrls/tbcontrl.cxx | 22 | ||||
-rw-r--r-- | svx/source/tbxctrls/tbunocontroller.cxx | 12 |
5 files changed, 45 insertions, 45 deletions
diff --git a/svx/source/tbxctrls/colrctrl.cxx b/svx/source/tbxctrls/colrctrl.cxx index da6c87b180e5..fb0c17b7e919 100644 --- a/svx/source/tbxctrls/colrctrl.cxx +++ b/svx/source/tbxctrls/colrctrl.cxx @@ -580,9 +580,9 @@ void SvxColorDockingWindow::GetFocus (void) aColorSet.GrabFocus(); } -long SvxColorDockingWindow::Notify( NotifyEvent& rNEvt ) +bool SvxColorDockingWindow::Notify( NotifyEvent& rNEvt ) { - long nRet = 0; + bool nRet = false; if( ( rNEvt.GetType() == EVENT_KEYINPUT ) ) { KeyEvent aKeyEvt = *rNEvt.GetKeyEvent(); @@ -591,12 +591,12 @@ long SvxColorDockingWindow::Notify( NotifyEvent& rNEvt ) { case KEY_ESCAPE: GrabFocusToDocument(); - nRet = 1; + nRet = true; break; } } - return nRet ? nRet : SfxDockingWindow::Notify( rNEvt ); + return nRet || SfxDockingWindow::Notify( rNEvt ); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/tbxctrls/grafctrl.cxx b/svx/source/tbxctrls/grafctrl.cxx index 200c8a3d5c91..5c5c46ed5ff4 100644 --- a/svx/source/tbxctrls/grafctrl.cxx +++ b/svx/source/tbxctrls/grafctrl.cxx @@ -319,7 +319,7 @@ private: virtual void Select(); virtual long PreNotify( NotifyEvent& rNEvt ); - virtual long Notify( NotifyEvent& rNEvt ); + virtual bool Notify( NotifyEvent& rNEvt ); void ImplReleaseFocus(); public: @@ -379,9 +379,9 @@ long ImplGrafModeControl::PreNotify( NotifyEvent& rNEvt ) return ListBox::PreNotify( rNEvt ); } -long ImplGrafModeControl::Notify( NotifyEvent& rNEvt ) +bool ImplGrafModeControl::Notify( NotifyEvent& rNEvt ) { - long nHandled = ListBox::Notify( rNEvt ); + bool nHandled = ListBox::Notify( rNEvt ); if( rNEvt.GetType() == EVENT_KEYINPUT ) { @@ -392,7 +392,7 @@ long ImplGrafModeControl::Notify( NotifyEvent& rNEvt ) case KEY_RETURN: { Select(); - nHandled = 1; + nHandled = true; } break; @@ -400,7 +400,7 @@ long ImplGrafModeControl::Notify( NotifyEvent& rNEvt ) { SelectEntryPos( mnCurPos ); ImplReleaseFocus(); - nHandled = 1; + nHandled = true; } break; } diff --git a/svx/source/tbxctrls/itemwin.cxx b/svx/source/tbxctrls/itemwin.cxx index 5cc75f622055..427b635e8379 100644 --- a/svx/source/tbxctrls/itemwin.cxx +++ b/svx/source/tbxctrls/itemwin.cxx @@ -186,9 +186,9 @@ long SvxLineBox::PreNotify( NotifyEvent& rNEvt ) // ----------------------------------------------------------------------- -long SvxLineBox::Notify( NotifyEvent& rNEvt ) +bool SvxLineBox::Notify( NotifyEvent& rNEvt ) { - long nHandled = LineLB::Notify( rNEvt ); + bool nHandled = LineLB::Notify( rNEvt ); if ( rNEvt.GetType() == EVENT_KEYINPUT ) { @@ -198,13 +198,13 @@ long SvxLineBox::Notify( NotifyEvent& rNEvt ) { case KEY_RETURN: Select(); - nHandled = 1; + nHandled = true; break; case KEY_ESCAPE: SelectEntryPos( nCurPos ); ReleaseFocus_Impl(); - nHandled = 1; + nHandled = true; break; } } @@ -392,9 +392,9 @@ long SvxColorBox::PreNotify( NotifyEvent& rNEvt ) // ----------------------------------------------------------------------- -long SvxColorBox::Notify( NotifyEvent& rNEvt ) +bool SvxColorBox::Notify( NotifyEvent& rNEvt ) { - long nHandled = ColorLB::Notify( rNEvt ); + bool nHandled = ColorLB::Notify( rNEvt ); if ( rNEvt.GetType() == EVENT_KEYINPUT ) { @@ -404,13 +404,13 @@ long SvxColorBox::Notify( NotifyEvent& rNEvt ) { case KEY_RETURN: Select(); - nHandled = 1; + nHandled = true; break; case KEY_ESCAPE: SelectEntryPos( nCurPos ); ReleaseFocus_Impl(); - nHandled = 1; + nHandled = true; break; } } @@ -576,9 +576,9 @@ long SvxMetricField::PreNotify( NotifyEvent& rNEvt ) // ----------------------------------------------------------------------- -long SvxMetricField::Notify( NotifyEvent& rNEvt ) +bool SvxMetricField::Notify( NotifyEvent& rNEvt ) { - long nHandled = MetricField::Notify( rNEvt ); + bool nHandled = MetricField::Notify( rNEvt ); if ( rNEvt.GetType() == EVENT_KEYINPUT ) { @@ -607,7 +607,7 @@ long SvxMetricField::Notify( NotifyEvent& rNEvt ) if ( bHandled ) { - nHandled = 1; + nHandled = true; Modify(); ReleaseFocus_Impl(); } @@ -677,9 +677,9 @@ long SvxFillTypeBox::PreNotify( NotifyEvent& rNEvt ) // ----------------------------------------------------------------------- -long SvxFillTypeBox::Notify( NotifyEvent& rNEvt ) +bool SvxFillTypeBox::Notify( NotifyEvent& rNEvt ) { - long nHandled = FillTypeLB::Notify( rNEvt ); + bool nHandled = FillTypeLB::Notify( rNEvt ); if ( rNEvt.GetType() == EVENT_KEYINPUT ) { @@ -687,7 +687,7 @@ long SvxFillTypeBox::Notify( NotifyEvent& rNEvt ) switch ( pKEvt->GetKeyCode().GetCode() ) { case KEY_RETURN: - nHandled = 1; + nHandled = true; ( (Link&)GetSelectHdl() ).Call( this ); break; case KEY_TAB: @@ -699,7 +699,7 @@ long SvxFillTypeBox::Notify( NotifyEvent& rNEvt ) case KEY_ESCAPE: SelectEntryPos( nCurPos ); ReleaseFocus_Impl(); - nHandled = 1; + nHandled = true; break; } } @@ -761,9 +761,9 @@ long SvxFillAttrBox::PreNotify( NotifyEvent& rNEvt ) // ----------------------------------------------------------------------- -long SvxFillAttrBox::Notify( NotifyEvent& rNEvt ) +bool SvxFillAttrBox::Notify( NotifyEvent& rNEvt ) { - long nHandled = FillAttrLB::Notify( rNEvt ); + bool nHandled = FillAttrLB::Notify( rNEvt ); if ( rNEvt.GetType() == EVENT_KEYINPUT ) { @@ -773,7 +773,7 @@ long SvxFillAttrBox::Notify( NotifyEvent& rNEvt ) { case KEY_RETURN: ( (Link&)GetSelectHdl() ).Call( this ); - nHandled = 1; + nHandled = true; break; case KEY_TAB: bRelease = sal_False; @@ -783,7 +783,7 @@ long SvxFillAttrBox::Notify( NotifyEvent& rNEvt ) case KEY_ESCAPE: SelectEntryPos( nCurPos ); ReleaseFocus_Impl(); - nHandled = 1; + nHandled = true; break; } } diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx index 23acf880dd7f..70b6a00d150b 100644 --- a/svx/source/tbxctrls/tbcontrl.cxx +++ b/svx/source/tbxctrls/tbcontrl.cxx @@ -135,7 +135,7 @@ public: inline bool IsVisible() { return bVisible; } virtual long PreNotify( NotifyEvent& rNEvt ); - virtual long Notify( NotifyEvent& rNEvt ); + virtual bool Notify( NotifyEvent& rNEvt ); virtual void DataChanged( const DataChangedEvent& rDCEvt ); virtual void StateChanged( StateChangedType nStateChange ); @@ -220,7 +220,7 @@ public: nFtCount = pList->GetFontNameCount(); } virtual void UserDraw( const UserDrawEvent& rUDEvt ); virtual long PreNotify( NotifyEvent& rNEvt ); - virtual long Notify( NotifyEvent& rNEvt ); + virtual bool Notify( NotifyEvent& rNEvt ); virtual Reference< ::com::sun::star::accessibility::XAccessible > CreateAccessible(); SAL_WNODEPRECATED_DECLARATIONS_PUSH void SetOwnFontList(::std::auto_ptr<FontList> _aOwnFontList) { m_aOwnFontList = _aOwnFontList; } @@ -488,9 +488,9 @@ long SvxStyleBox_Impl::PreNotify( NotifyEvent& rNEvt ) // ----------------------------------------------------------------------- -long SvxStyleBox_Impl::Notify( NotifyEvent& rNEvt ) +bool SvxStyleBox_Impl::Notify( NotifyEvent& rNEvt ) { - long nHandled = 0; + bool nHandled = false; if ( rNEvt.GetType() == EVENT_KEYINPUT ) { @@ -504,7 +504,7 @@ long SvxStyleBox_Impl::Notify( NotifyEvent& rNEvt ) if ( KEY_TAB == nCode ) bRelease = false; else - nHandled = 1; + nHandled = true; Select(); break; } @@ -512,11 +512,11 @@ long SvxStyleBox_Impl::Notify( NotifyEvent& rNEvt ) case KEY_ESCAPE: SelectEntryPos( nCurSel ); ReleaseFocus(); - nHandled = 1; + nHandled = true; break; } } - return nHandled ? nHandled : ComboBox::Notify( rNEvt ); + return nHandled || ComboBox::Notify( rNEvt ); } void SvxStyleBox_Impl::DataChanged( const DataChangedEvent& rDCEvt ) @@ -882,9 +882,9 @@ long SvxFontNameBox_Impl::PreNotify( NotifyEvent& rNEvt ) // ----------------------------------------------------------------------- -long SvxFontNameBox_Impl::Notify( NotifyEvent& rNEvt ) +bool SvxFontNameBox_Impl::Notify( NotifyEvent& rNEvt ) { - long nHandled = 0; + bool nHandled = false; mbEndPreview = false; if ( rNEvt.GetType() == EVENT_KEYUP ) mbEndPreview = true; @@ -901,7 +901,7 @@ long SvxFontNameBox_Impl::Notify( NotifyEvent& rNEvt ) if ( KEY_TAB == nCode ) bRelease = false; else - nHandled = 1; + nHandled = true; Select(); break; } @@ -922,7 +922,7 @@ long SvxFontNameBox_Impl::Notify( NotifyEvent& rNEvt ) EndPreview(); } - return nHandled ? nHandled : FontNameBox::Notify( rNEvt ); + return nHandled || FontNameBox::Notify( rNEvt ); } // --------------------------------------------------------------------------- diff --git a/svx/source/tbxctrls/tbunocontroller.cxx b/svx/source/tbxctrls/tbunocontroller.cxx index cefad038ddad..b20337fb88c1 100644 --- a/svx/source/tbxctrls/tbunocontroller.cxx +++ b/svx/source/tbxctrls/tbunocontroller.cxx @@ -92,7 +92,7 @@ public: void statusChanged_Impl( long nHeight, bool bErase = false ); void UpdateFont( const ::com::sun::star::awt::FontDescriptor& rCurrentFont ); - virtual long Notify( NotifyEvent& rNEvt ); + virtual bool Notify( NotifyEvent& rNEvt ); protected: virtual void Select(); @@ -221,9 +221,9 @@ void SvxFontSizeBox_Impl::UpdateFont( const ::com::sun::star::awt::FontDescripto // ----------------------------------------------------------------------- -long SvxFontSizeBox_Impl::Notify( NotifyEvent& rNEvt ) +bool SvxFontSizeBox_Impl::Notify( NotifyEvent& rNEvt ) { - long nHandled = 0; + bool nHandled = false; if ( rNEvt.GetType() == EVENT_KEYINPUT ) { @@ -237,7 +237,7 @@ long SvxFontSizeBox_Impl::Notify( NotifyEvent& rNEvt ) if ( KEY_TAB == nCode ) m_bRelease = false; else - nHandled = 1; + nHandled = true; Select(); break; } @@ -245,7 +245,7 @@ long SvxFontSizeBox_Impl::Notify( NotifyEvent& rNEvt ) case KEY_ESCAPE: SetText( m_aCurText ); ReleaseFocus_Impl(); - nHandled = 1; + nHandled = true; break; } } @@ -256,7 +256,7 @@ long SvxFontSizeBox_Impl::Notify( NotifyEvent& rNEvt ) SetText(GetSavedValue()); } - return nHandled ? nHandled : FontSizeBox::Notify( rNEvt ); + return nHandled || FontSizeBox::Notify( rNEvt ); } // --------------------------------------------------------------------------- |