diff options
Diffstat (limited to 'sfx2/source/appl/appopen.cxx')
-rw-r--r-- | sfx2/source/appl/appopen.cxx | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/sfx2/source/appl/appopen.cxx b/sfx2/source/appl/appopen.cxx index d4717a16d733..9821f16e56b0 100644 --- a/sfx2/source/appl/appopen.cxx +++ b/sfx2/source/appl/appopen.cxx @@ -170,7 +170,7 @@ private: } -sal_uInt32 CheckPasswd_Impl +ErrCode CheckPasswd_Impl ( SfxObjectShell* pDoc, SfxMedium* pFile // the Medium and its Password shold be obtained @@ -184,7 +184,7 @@ sal_uInt32 CheckPasswd_Impl If the set does not exist the it is created. */ { - sal_uIntPtr nRet = ERRCODE_NONE; + ErrCode nRet = ERRCODE_NONE; if( ( !pFile->GetFilter() || pFile->IsStorage() ) ) { @@ -271,7 +271,7 @@ sal_uInt32 CheckPasswd_Impl } -sal_uIntPtr SfxApplication::LoadTemplate( SfxObjectShellLock& xDoc, const OUString &rFileName, SfxItemSet* pSet ) +ErrCode SfxApplication::LoadTemplate( SfxObjectShellLock& xDoc, const OUString &rFileName, SfxItemSet* pSet ) { std::shared_ptr<const SfxFilter> pFilter; SfxMedium aMedium( rFileName, ( StreamMode::READ | StreamMode::SHARE_DENYNONE ) ); @@ -286,8 +286,8 @@ sal_uIntPtr SfxApplication::LoadTemplate( SfxObjectShellLock& xDoc, const OUStri } aMedium.UseInteractionHandler( true ); - sal_uIntPtr nErr = GetFilterMatcher().GuessFilter( aMedium, pFilter, SfxFilterFlags::TEMPLATE, SfxFilterFlags::NONE ); - if ( 0 != nErr) + ErrCode nErr = GetFilterMatcher().GuessFilter( aMedium, pFilter, SfxFilterFlags::TEMPLATE, SfxFilterFlags::NONE ); + if ( ERRCODE_NONE != nErr) { delete pSet; return ERRCODE_SFX_NOTATEMPLATE; @@ -488,7 +488,7 @@ void SfxApplication::NewDocExec_Impl( SfxRequest& rReq ) } } - sal_uIntPtr lErr = 0; + ErrCode lErr = ERRCODE_NONE; SfxItemSet* pSet = new SfxAllItemSet( GetPool() ); pSet->Put( SfxBoolItem( SID_TEMPLATE, true ) ); if ( !bDirect ) @@ -506,7 +506,7 @@ void SfxApplication::NewDocExec_Impl( SfxRequest& rReq ) if ( lErr != ERRCODE_NONE ) { - sal_uIntPtr lFatalErr = ERRCODE_TOERROR(lErr); + ErrCode lFatalErr = lErr.IgnoreWarning(); if ( lFatalErr ) ErrorHandler::HandleError(lErr); } @@ -639,7 +639,7 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq ) pBlackListItem->GetStringList( aBlackList ); - sal_uIntPtr nErr = sfx2::FileOpenDialog_Impl( + ErrCode nErr = sfx2::FileOpenDialog_Impl( nDialogType, eDialogFlags, OUString(), aURLList, aFilter, pSet, &aPath, nDialog, sStandardDir, aBlackList ); @@ -716,9 +716,7 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq ) css::task::ErrorCodeRequest aRequest; if (aRule.m_xRequest->getRequest() >>= aRequest) { - if (aRequest.ErrCode == - sal::static_int_cast< sal_Int32 >( - ERRCODE_SFX_NOMOREDOCUMENTSALLOWED)) + if (aRequest.ErrCode == sal_Int32(sal_uInt32(ERRCODE_SFX_NOMOREDOCUMENTSALLOWED))) break; } } |