include/sfx2/objsh.hxx | 3 +-- sc/source/ui/docshell/docsh.cxx | 2 +- sc/source/ui/inc/docsh.hxx | 2 +- sfx2/source/appl/appserv.cxx | 2 +- sfx2/source/doc/objserv.cxx | 2 +- sfx2/source/doc/objxtor.cxx | 4 ++-- sw/inc/docsh.hxx | 2 +- sw/source/core/uibase/app/docsh2.cxx | 2 +- 8 files changed, 9 insertions(+), 10 deletions(-)
New commits: commit e7c0f8711f95895b501c869959fe07b93d0a1e80 Author: Caolán McNamara <caol...@redhat.com> Date: Fri Apr 4 14:59:35 2014 +0100 "2" as arg for PrepareClose is never checked for The 2 for PrepareClose came in with 38db42605a5b72efd55a43eff81fbc517fe0424b "#89423#: added SID_CLOSEDOC, SID_BACKTOWEBTOP, SID_LOGOUT in PluginMenu" and was checked with if( SfxApplication::IsPlugin() == sal_False || bUI == 2 ) in sfx2/source/doc/objxtor.cxx and then that was removed with 367568c891771d20bb8f8b3b579857f51c0e9016 "#132394#: remove superfluous code" Change-Id: Ib273c88b4365ea6b261c7e52bbe1876aa796dc17 diff --git a/include/sfx2/objsh.hxx b/include/sfx2/objsh.hxx index c7b9ad9..a3d32c9 100644 --- a/include/sfx2/objsh.hxx +++ b/include/sfx2/objsh.hxx @@ -401,8 +401,7 @@ public: static sal_uInt32 HandleFilter( SfxMedium* pMedium, SfxObjectShell* pDoc ); virtual void ViewAssigned(); - // the bUI parameter may be sal_False, sal_True or 2 - there is some kind of hack at work - virtual bool PrepareClose( sal_Bool bUI = sal_True ); + virtual bool PrepareClose(bool bUI = true); virtual bool IsInformationLost(); virtual sal_uInt16 GetHiddenInformationState( sal_uInt16 nStates ); sal_Int16 QueryHiddenInformation( HiddenWarningFact eFact, Window* pParent ); diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx index 28ae7fa..329e38e 100644 --- a/sc/source/ui/docshell/docsh.cxx +++ b/sc/source/ui/docshell/docsh.cxx @@ -2505,7 +2505,7 @@ bool ScDocShell::QuerySlotExecutable( sal_uInt16 nSlotId ) } -bool ScDocShell::PrepareClose( sal_Bool bUI ) +bool ScDocShell::PrepareClose( bool bUI ) { if(SC_MOD()->GetCurRefDlgId()>0) { diff --git a/sc/source/ui/inc/docsh.hxx b/sc/source/ui/inc/docsh.hxx index 2941b62..9da6caf 100644 --- a/sc/source/ui/inc/docsh.hxx +++ b/sc/source/ui/inc/docsh.hxx @@ -209,7 +209,7 @@ public: virtual bool Save() SAL_OVERRIDE; virtual bool SaveAs( SfxMedium& rMedium ) SAL_OVERRIDE; virtual bool ConvertTo( SfxMedium &rMedium ) SAL_OVERRIDE; - virtual bool PrepareClose( sal_Bool bUI = sal_True ) SAL_OVERRIDE; + virtual bool PrepareClose( bool bUI = true ) SAL_OVERRIDE; virtual void PrepareReload() SAL_OVERRIDE; virtual bool IsInformationLost() SAL_OVERRIDE; virtual void LoadStyles( SfxObjectShell &rSource ) SAL_OVERRIDE; diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx index a80a91a..50e71ce 100644 --- a/sfx2/source/appl/appserv.cxx +++ b/sfx2/source/appl/appserv.cxx @@ -286,7 +286,7 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq ) if ( !pFrame || !pFrame->GetWindow().IsReallyVisible() ) continue; - if ( pObjSh->PrepareClose(2) ) + if (pObjSh->PrepareClose(true)) pObjSh->SetModified( false ); else return; diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx index 085b697..f01f199 100644 --- a/sfx2/source/doc/objserv.cxx +++ b/sfx2/source/doc/objserv.cxx @@ -855,7 +855,7 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq) } // Cancelled by the user? - if ( !PrepareClose( 2 ) ) + if (!PrepareClose(true)) { rReq.SetReturnValue( SfxBoolItem(0, false) ); rReq.Done(); diff --git a/sfx2/source/doc/objxtor.cxx b/sfx2/source/doc/objxtor.cxx index a8fae9e..0d00015 100644 --- a/sfx2/source/doc/objxtor.cxx +++ b/sfx2/source/doc/objxtor.cxx @@ -558,8 +558,8 @@ struct BoolEnv_Impl bool SfxObjectShell::PrepareClose ( - sal_Bool bUI // sal_True: Dialog and so on is allowed - // sal_False: silent-mode + bool bUI // true: Dialog and so on is allowed + // false: silent-mode ) { if( pImp->bInPrepareClose || pImp->bPreparedForClose ) diff --git a/sw/inc/docsh.hxx b/sw/inc/docsh.hxx index a3c09ab..179744a 100644 --- a/sw/inc/docsh.hxx +++ b/sw/inc/docsh.hxx @@ -90,7 +90,7 @@ class SW_DLLPUBLIC SwDocShell: public SfxObjectShell, public SfxListener SAL_DLLPRIVATE virtual bool SaveAs( SfxMedium& rMedium ) SAL_OVERRIDE; SAL_DLLPRIVATE virtual bool SaveCompleted( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage ) SAL_OVERRIDE; - SAL_DLLPRIVATE virtual bool PrepareClose( sal_Bool bUI = sal_True ) SAL_OVERRIDE; + SAL_DLLPRIVATE virtual bool PrepareClose( bool bUI = true ) SAL_OVERRIDE; SAL_DLLPRIVATE virtual bool InsertGeneratedStream(SfxMedium& rMedium, css::uno::Reference<css::text::XTextRange> const& xInsertPosition) diff --git a/sw/source/core/uibase/app/docsh2.cxx b/sw/source/core/uibase/app/docsh2.cxx index fa0d38a..6029f72 100644 --- a/sw/source/core/uibase/app/docsh2.cxx +++ b/sw/source/core/uibase/app/docsh2.cxx @@ -305,7 +305,7 @@ void SwDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint ) } // Notification Close Doc -bool SwDocShell::PrepareClose( sal_Bool bUI ) +bool SwDocShell::PrepareClose( bool bUI ) { bool nRet = SfxObjectShell::PrepareClose( bUI );
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits