From 0d0fd7b4fbc6090fe7112eef8b2b07840cf8a89d Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Tue, 14 Jan 2014 09:31:42 +0100 Subject: PrepareClose should probably return bool Change-Id: Ie62a6c1197594102bc68e246ae6059a9442ce314 --- sd/source/ui/inc/DrawViewShell.hxx | 2 +- sd/source/ui/inc/OutlineViewShell.hxx | 2 +- sd/source/ui/inc/ViewShell.hxx | 2 +- sd/source/ui/inc/ViewShellBase.hxx | 2 +- sd/source/ui/view/ViewShellBase.cxx | 6 +++--- sd/source/ui/view/drviews1.cxx | 8 ++++---- sd/source/ui/view/outlnvsh.cxx | 4 ++-- sd/source/ui/view/viewshel.cxx | 4 ++-- 8 files changed, 15 insertions(+), 15 deletions(-) (limited to 'sd') diff --git a/sd/source/ui/inc/DrawViewShell.hxx b/sd/source/ui/inc/DrawViewShell.hxx index 373a1d055687..e8ab1fa99343 100644 --- a/sd/source/ui/inc/DrawViewShell.hxx +++ b/sd/source/ui/inc/DrawViewShell.hxx @@ -227,7 +227,7 @@ public: const Ruler& rRuler, const MouseEvent& rMEvt); - virtual sal_uInt16 PrepareClose( sal_Bool bUI = sal_True, sal_Bool bForBrowsing = sal_False ); + virtual bool PrepareClose( sal_Bool bUI = sal_True, sal_Bool bForBrowsing = sal_False ); PageKind GetPageKind() { return mePageKind; } diff --git a/sd/source/ui/inc/OutlineViewShell.hxx b/sd/source/ui/inc/OutlineViewShell.hxx index f3a02602dc1b..931d62ec7b0e 100644 --- a/sd/source/ui/inc/OutlineViewShell.hxx +++ b/sd/source/ui/inc/OutlineViewShell.hxx @@ -70,7 +70,7 @@ public: */ virtual void ArrangeGUIElements (void); - virtual sal_uInt16 PrepareClose( sal_Bool bUI = sal_True, sal_Bool bForBrowsing = sal_False ); + virtual bool PrepareClose( sal_Bool bUI = sal_True, sal_Bool bForBrowsing = sal_False ); virtual long VirtHScrollHdl(ScrollBar* pHScroll); virtual long VirtVScrollHdl(ScrollBar* pVHScroll); diff --git a/sd/source/ui/inc/ViewShell.hxx b/sd/source/ui/inc/ViewShell.hxx index 33d956cfe135..725428f1b408 100644 --- a/sd/source/ui/inc/ViewShell.hxx +++ b/sd/source/ui/inc/ViewShell.hxx @@ -274,7 +274,7 @@ public: sal_uInt16 GetPrintedHandoutPageCount(void) const { return mnPrintedHandoutPageCount; } void SetPrintedHandoutPageCount (sal_uInt16 nPageCount) {mnPrintedHandoutPageCount=nPageCount; } - virtual sal_uInt16 PrepareClose( sal_Bool bUI = sal_True, sal_Bool bForBrowsing = sal_False ); + virtual bool PrepareClose( sal_Bool bUI = sal_True, sal_Bool bForBrowsing = sal_False ); void GetMenuState(SfxItemSet& rSet); diff --git a/sd/source/ui/inc/ViewShellBase.hxx b/sd/source/ui/inc/ViewShellBase.hxx index 294598298c04..cfa022341ee9 100644 --- a/sd/source/ui/inc/ViewShellBase.hxx +++ b/sd/source/ui/inc/ViewShellBase.hxx @@ -161,7 +161,7 @@ public: virtual void SetZoomFactor ( const Fraction &rZoomX, const Fraction &rZoomY); - virtual sal_uInt16 PrepareClose (sal_Bool bUI = sal_True, sal_Bool bForBrowsing = sal_False); + virtual bool PrepareClose (sal_Bool bUI = sal_True, sal_Bool bForBrowsing = sal_False); virtual void WriteUserData (OUString&, bool bBrowse = false); virtual void ReadUserData (const OUString&, bool bBrowse = false); virtual SdrView* GetDrawView (void) const; diff --git a/sd/source/ui/view/ViewShellBase.cxx b/sd/source/ui/view/ViewShellBase.cxx index 56ee1054b67e..4478109e3026 100644 --- a/sd/source/ui/view/ViewShellBase.cxx +++ b/sd/source/ui/view/ViewShellBase.cxx @@ -831,11 +831,11 @@ void ViewShellBase::SetZoomFactor ( -sal_uInt16 ViewShellBase::PrepareClose (sal_Bool bUI, sal_Bool bForBrowsing) +bool ViewShellBase::PrepareClose (sal_Bool bUI, sal_Bool bForBrowsing) { - sal_uInt16 nResult = SfxViewShell::PrepareClose (bUI, bForBrowsing); + bool nResult = SfxViewShell::PrepareClose (bUI, bForBrowsing); - if (nResult == sal_True) + if (nResult) { mpImpl->mbIsClosing = true; diff --git a/sd/source/ui/view/drviews1.cxx b/sd/source/ui/view/drviews1.cxx index 2df556dd7413..de43b57ae7da 100644 --- a/sd/source/ui/view/drviews1.cxx +++ b/sd/source/ui/view/drviews1.cxx @@ -293,12 +293,12 @@ void DrawViewShell::SetZoomRect( const Rectangle& rZoomRect ) * discover an refreshed text objext. */ -sal_uInt16 DrawViewShell::PrepareClose( sal_Bool bUI, sal_Bool bForBrowsing ) +bool DrawViewShell::PrepareClose( sal_Bool bUI, sal_Bool bForBrowsing ) { - if ( ViewShell::PrepareClose(bUI, bForBrowsing) != sal_True ) - return sal_False; + if ( !ViewShell::PrepareClose(bUI, bForBrowsing) ) + return false; - sal_Bool bRet = sal_True; + bool bRet = true; if( bRet && HasCurrentFunction() ) { diff --git a/sd/source/ui/view/outlnvsh.cxx b/sd/source/ui/view/outlnvsh.cxx index 94a5d040347a..79bc5801314f 100644 --- a/sd/source/ui/view/outlnvsh.cxx +++ b/sd/source/ui/view/outlnvsh.cxx @@ -1145,10 +1145,10 @@ long OutlineViewShell::VirtVScrollHdl(ScrollBar* pVScroll) * PrepareClose, gets called when the Shell shall be destroyed. * Forwards the invocation to the View */ -sal_uInt16 OutlineViewShell::PrepareClose( sal_Bool bUI, sal_Bool bForBrowsing ) +bool OutlineViewShell::PrepareClose( sal_Bool bUI, sal_Bool bForBrowsing ) { if( ViewShell::PrepareClose(bUI, bForBrowsing) != sal_True ) - return sal_False; + return false; return pOlView == NULL || pOlView->PrepareClose(bUI); } diff --git a/sd/source/ui/view/viewshel.cxx b/sd/source/ui/view/viewshel.cxx index cb0924591b5c..4c1c0122dfee 100644 --- a/sd/source/ui/view/viewshel.cxx +++ b/sd/source/ui/view/viewshel.cxx @@ -1035,9 +1035,9 @@ void ViewShell::SetDefTabHRuler( sal_uInt16 nDefTab ) /** Tell the FmFormShell that the view shell is closing. Give it the oportunity to prevent that. */ -sal_uInt16 ViewShell::PrepareClose (sal_Bool bUI, sal_Bool bForBrowsing) +bool ViewShell::PrepareClose (sal_Bool bUI, sal_Bool bForBrowsing) { - sal_uInt16 nResult = sal_True; + bool nResult = true; FmFormShell* pFormShell = GetViewShellBase().GetFormShellManager()->GetFormShell(); if (pFormShell != NULL) -- cgit