diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-01-14 09:31:42 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-01-14 09:31:58 +0100 |
commit | 0d0fd7b4fbc6090fe7112eef8b2b07840cf8a89d (patch) | |
tree | 5325634108de1bc065273fb7d1cd3d57a4ef675e /sfx2/source/view/frame.cxx | |
parent | 06272f678b54e99757c89419acfdc9217c88abd7 (diff) |
PrepareClose should probably return bool
Change-Id: Ie62a6c1197594102bc68e246ae6059a9442ce314
Diffstat (limited to 'sfx2/source/view/frame.cxx')
-rw-r--r-- | sfx2/source/view/frame.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sfx2/source/view/frame.cxx b/sfx2/source/view/frame.cxx index fa51f5438332..e4fb67ff9f82 100644 --- a/sfx2/source/view/frame.cxx +++ b/sfx2/source/view/frame.cxx @@ -193,9 +193,9 @@ sal_Bool SfxFrame::DocIsModified_Impl() return sal_False; } -sal_uInt16 SfxFrame::PrepareClose_Impl( sal_Bool bUI, sal_Bool bForBrowsing ) +bool SfxFrame::PrepareClose_Impl( sal_Bool bUI, sal_Bool bForBrowsing ) { - sal_uInt16 nRet = RET_OK; + bool nRet = true; // prevent recursive calls if( !pImp->bPrepClosing ) @@ -224,17 +224,17 @@ sal_uInt16 SfxFrame::PrepareClose_Impl( sal_Bool bUI, sal_Bool bForBrowsing ) nRet = pCur->PrepareClose( bUI, bForBrowsing ); } - if ( nRet == RET_OK ) + if ( nRet ) { // if this frame has child frames, ask them too - for( sal_uInt16 nPos = GetChildFrameCount(); nRet == RET_OK && nPos--; ) + for( sal_uInt16 nPos = GetChildFrameCount(); nRet && nPos--; ) nRet = (*pChildArr)[ nPos ]->PrepareClose_Impl( bUI, bForBrowsing ); } pImp->bPrepClosing = sal_False; } - if ( nRet == RET_OK && pImp->pWorkWin ) + if ( nRet && pImp->pWorkWin ) // if closing was accepted by the component the UI subframes must be asked also nRet = pImp->pWorkWin->PrepareClose_Impl(); |