summaryrefslogtreecommitdiff
path: root/sd/source/ui/view
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-04-25 12:49:17 +0200
committerCaolán McNamara <caolanm@redhat.com>2014-04-28 11:37:37 +0000
commit883481fd200510f5ae62e7ab7cd18f7d925c2c47 (patch)
treee33af672348ab9a9719f1b49184edfbb46f21f03 /sd/source/ui/view
parenta3abc602578270582ab7d8df9ef34ef9503234de (diff)
Improve TabBar return types
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 <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sd/source/ui/view')
-rw-r--r--sd/source/ui/view/tabcontr.cxx12
1 files changed, 6 insertions, 6 deletions
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();
}