From 883481fd200510f5ae62e7ab7cd18f7d925c2c47 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Fri, 25 Apr 2014 12:49:17 +0200 Subject: Improve TabBar return types MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit DeactivatePage() goes from returning long to returning bool. StartRenaming goes from returning long to returning bool. AllowRenaming goes from returning long to returning a constant from a new enum. Change-Id: Ib87e8d7ceb4e23846547257b358ca4dfd41eb6ca Reviewed-on: https://gerrit.libreoffice.org/9161 Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara --- sd/source/ui/view/tabcontr.cxx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'sd/source/ui/view') diff --git a/sd/source/ui/view/tabcontr.cxx b/sd/source/ui/view/tabcontr.cxx index 97c76b6d1932..827739acff84 100644 --- a/sd/source/ui/view/tabcontr.cxx +++ b/sd/source/ui/view/tabcontr.cxx @@ -307,7 +307,7 @@ void TabControl::Command(const CommandEvent& rCEvt) } } -long TabControl::StartRenaming() +bool TabControl::StartRenaming() { bool bOK = false; @@ -321,10 +321,10 @@ long TabControl::StartRenaming() pView->SdrEndTextEdit(); } - return bOK ? 1 : 0; + return bOK; } -long TabControl::AllowRenaming() +TabBarAllowRenamingReturnCode TabControl::AllowRenaming() { bool bOK = true; @@ -344,7 +344,7 @@ long TabControl::AllowRenaming() bOK = false; } } - return bOK ? 1 : 0; + return bOK ? TABBAR_RENAMING_YES : TABBAR_RENAMING_NO; } void TabControl::EndRenaming() @@ -363,9 +363,9 @@ void TabControl::ActivatePage() } } -long TabControl::DeactivatePage() +bool TabControl::DeactivatePage() { - return pDrViewSh->IsSwitchPageAllowed() ? 1 : 0; + return pDrViewSh->IsSwitchPageAllowed(); } -- cgit