[Libreoffice-commits] core.git: chart2/source include/vcl vcl/source
Stephan Bergmann
sbergman at redhat.com
Thu Feb 6 06:44:31 PST 2014
chart2/source/controller/dialogs/dlg_DataSource.cxx | 11 +++--------
include/vcl/tabctrl.hxx | 2 +-
vcl/source/control/tabctrl.cxx | 7 ++-----
3 files changed, 6 insertions(+), 14 deletions(-)
New commits:
commit d2d586446292db0747898bb0d6161637b76c33af
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Thu Feb 6 15:43:43 2014 +0100
TabControl::DeactivatePage should return bool
Change-Id: I9fb774a235db2b9bc759976d2d3f84363ed944ec
diff --git a/chart2/source/controller/dialogs/dlg_DataSource.cxx b/chart2/source/controller/dialogs/dlg_DataSource.cxx
index a93cbde..13784c3 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 f084cde..663c746 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 9e46462..222149b 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 );
}
// -----------------------------------------------------------------------
More information about the Libreoffice-commits
mailing list