diff options
-rw-r--r-- | chart2/source/controller/dialogs/dlg_DataSource.cxx | 11 | ||||
-rw-r--r-- | include/vcl/tabctrl.hxx | 2 | ||||
-rw-r--r-- | vcl/source/control/tabctrl.cxx | 7 |
3 files changed, 6 insertions, 14 deletions
diff --git a/chart2/source/controller/dialogs/dlg_DataSource.cxx b/chart2/source/controller/dialogs/dlg_DataSource.cxx index a93cbde11dac..13784c30ba53 100644 --- a/chart2/source/controller/dialogs/dlg_DataSource.cxx +++ b/chart2/source/controller/dialogs/dlg_DataSource.cxx @@ -86,7 +86,7 @@ class DataSourceTabControl : public TabControl public: DataSourceTabControl(Window* pParent); - virtual long DeactivatePage(); + virtual bool DeactivatePage() SAL_OVERRIDE; void DisableTabToggling(); void EnableTabToggling(); @@ -101,14 +101,9 @@ DataSourceTabControl::DataSourceTabControl(Window* pParent) { } -// Note that the result is long, but is intended to be a bool -long DataSourceTabControl::DeactivatePage() +bool DataSourceTabControl::DeactivatePage() { - bool bCanDeactivate( TabControl::DeactivatePage() != 0 ); - - bCanDeactivate = (bCanDeactivate && m_bTogglingEnabled); - - return (bCanDeactivate ? 1 : 0 ); + return TabControl::DeactivatePage() && m_bTogglingEnabled; } void DataSourceTabControl::DisableTabToggling() diff --git a/include/vcl/tabctrl.hxx b/include/vcl/tabctrl.hxx index f084cde28f8d..663c746018f2 100644 --- a/include/vcl/tabctrl.hxx +++ b/include/vcl/tabctrl.hxx @@ -100,7 +100,7 @@ public: virtual bool PreNotify( NotifyEvent& rNEvt ); virtual void ActivatePage(); - virtual long DeactivatePage(); + virtual bool DeactivatePage(); virtual Size GetOptimalSize() const; diff --git a/vcl/source/control/tabctrl.cxx b/vcl/source/control/tabctrl.cxx index 9e4646204d76..222149b2799b 100644 --- a/vcl/source/control/tabctrl.cxx +++ b/vcl/source/control/tabctrl.cxx @@ -1698,12 +1698,9 @@ void TabControl::ActivatePage() // ----------------------------------------------------------------------- -long TabControl::DeactivatePage() +bool TabControl::DeactivatePage() { - if ( maDeactivateHdl.IsSet() ) - return maDeactivateHdl.Call( this ); - else - return sal_True; + return !maDeactivateHdl.IsSet() || maDeactivateHdl.Call( this ); } // ----------------------------------------------------------------------- |