summaryrefslogtreecommitdiff
path: root/sc
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 /sc
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 'sc')
-rw-r--r--sc/source/ui/inc/tabcont.hxx4
-rw-r--r--sc/source/ui/view/tabcont.cxx10
2 files changed, 7 insertions, 7 deletions
diff --git a/sc/source/ui/inc/tabcont.hxx b/sc/source/ui/inc/tabcont.hxx
index d04e02643f9f..644a2f9a8750 100644
--- a/sc/source/ui/inc/tabcont.hxx
+++ b/sc/source/ui/inc/tabcont.hxx
@@ -58,8 +58,8 @@ protected:
virtual void StartDrag( sal_Int8 nAction, const Point& rPosPixel ) SAL_OVERRIDE;
- virtual long StartRenaming() SAL_OVERRIDE;
- virtual long AllowRenaming() SAL_OVERRIDE;
+ virtual bool StartRenaming() SAL_OVERRIDE;
+ virtual TabBarAllowRenamingReturnCode AllowRenaming() SAL_OVERRIDE;
virtual void EndRenaming() SAL_OVERRIDE;
virtual void Mirror() SAL_OVERRIDE;
diff --git a/sc/source/ui/view/tabcont.cxx b/sc/source/ui/view/tabcont.cxx
index b02984496df5..c6c41c029226 100644
--- a/sc/source/ui/view/tabcont.cxx
+++ b/sc/source/ui/view/tabcont.cxx
@@ -579,20 +579,20 @@ sal_Int8 ScTabControl::AcceptDrop( const AcceptDropEvent& rEvt )
return 0;
}
-long ScTabControl::StartRenaming()
+bool ScTabControl::StartRenaming()
{
if ( pViewData->GetDocument()->IsDocEditable() )
- return TABBAR_RENAMING_YES;
+ return true;
else
- return TABBAR_RENAMING_NO;
+ return false;
}
-long ScTabControl::AllowRenaming()
+TabBarAllowRenamingReturnCode ScTabControl::AllowRenaming()
{
ScTabViewShell* pViewSh = pViewData->GetViewShell();
OSL_ENSURE( pViewSh, "pViewData->GetViewShell()" );
- long nRet = TABBAR_RENAMING_CANCEL;
+ TabBarAllowRenamingReturnCode nRet = TABBAR_RENAMING_CANCEL;
sal_uInt16 nId = GetEditPageId();
if ( nId )
{