diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-02-09 08:52:13 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-06-21 08:42:30 +0200 |
commit | 528632660b72b105345945c13c5b68060d94a91b (patch) | |
tree | 860508d482959abeb9175f0ce6b9e65954269f95 /sfx2 | |
parent | aee66aa85e75f67135e5c6079a281e18402d261a (diff) |
convert ErrCode to strong typedef
would have preferred to re-use o3tl::strong_int, of which this
is a modified copy, but there are lots of convenience accessors
which are nice to define on the class.
Change-Id: I301b807aaf02fbced3bf75de1e1692cde6c0340a
Reviewed-on: https://gerrit.libreoffice.org/38497
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/appl/appinit.cxx | 6 | ||||
-rw-r--r-- | sfx2/source/appl/appopen.cxx | 20 | ||||
-rw-r--r-- | sfx2/source/appl/macroloader.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/appl/opengrf.cxx | 32 | ||||
-rw-r--r-- | sfx2/source/bastyp/fltfnc.cxx | 8 | ||||
-rw-r--r-- | sfx2/source/doc/DocumentMetadataAccess.cxx | 7 | ||||
-rw-r--r-- | sfx2/source/doc/SfxDocumentMetaData.cxx | 7 | ||||
-rw-r--r-- | sfx2/source/doc/docfile.cxx | 28 | ||||
-rw-r--r-- | sfx2/source/doc/docinf.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/doc/docinsert.cxx | 4 | ||||
-rw-r--r-- | sfx2/source/doc/docmacromode.cxx | 4 | ||||
-rw-r--r-- | sfx2/source/doc/graphhelp.cxx | 8 | ||||
-rw-r--r-- | sfx2/source/doc/guisaveas.cxx | 22 | ||||
-rw-r--r-- | sfx2/source/doc/new.cxx | 3 | ||||
-rw-r--r-- | sfx2/source/doc/objmisc.cxx | 18 | ||||
-rw-r--r-- | sfx2/source/doc/objserv.cxx | 10 | ||||
-rw-r--r-- | sfx2/source/doc/objstor.cxx | 6 | ||||
-rw-r--r-- | sfx2/source/doc/sfxbasemodel.cxx | 56 | ||||
-rw-r--r-- | sfx2/source/inc/appopen.hxx | 2 | ||||
-rw-r--r-- | sfx2/source/inc/objshimp.hxx | 2 | ||||
-rw-r--r-- | sfx2/source/view/ipclient.cxx | 2 |
21 files changed, 119 insertions, 130 deletions
diff --git a/sfx2/source/appl/appinit.cxx b/sfx2/source/appl/appinit.cxx index e6e7596a01aa..e098600f70a6 100644 --- a/sfx2/source/appl/appinit.cxx +++ b/sfx2/source/appl/appinit.cxx @@ -211,7 +211,7 @@ void SfxApplication::Initialize_Impl() Help::EnableExtHelp(); pImpl->m_pToolsErrorHdl = new SfxErrorHandler( - RID_ERRHDL, ERRCODE_AREA_TOOLS, ERRCODE_AREA_LIB1); + RID_ERRHDL, ErrCode(ERRCODE_AREA_TOOLS), ErrCode(ERRCODE_AREA_LIB1)); #if HAVE_FEATURE_SCRIPTING pImpl->pBasicResMgr = ResMgr::CreateResMgr("sb"); @@ -219,10 +219,10 @@ void SfxApplication::Initialize_Impl() pImpl->pSvtResMgr = ResMgr::CreateResMgr("svt"); pImpl->m_pSoErrorHdl = new SfxErrorHandler( - RID_SO_ERROR_HANDLER, ERRCODE_AREA_SO, ERRCODE_AREA_SO_END, pImpl->pSvtResMgr ); + RID_SO_ERROR_HANDLER, ErrCode(ERRCODE_AREA_SO), ErrCode(ERRCODE_AREA_SO_END), pImpl->pSvtResMgr ); #if HAVE_FEATURE_SCRIPTING pImpl->m_pSbxErrorHdl = new SfxErrorHandler( - RID_BASIC_START, ERRCODE_AREA_SBX, ERRCODE_AREA_SBX_END, pImpl->pBasicResMgr ); + RID_BASIC_START, ErrCode(ERRCODE_AREA_SBX), ErrCode(ERRCODE_AREA_SBX_END), pImpl->pBasicResMgr ); #endif if (!utl::ConfigManager::IsAvoidConfig()) 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; } } diff --git a/sfx2/source/appl/macroloader.cxx b/sfx2/source/appl/macroloader.cxx index ce1e85e0c88b..7621ea7665b8 100644 --- a/sfx2/source/appl/macroloader.cxx +++ b/sfx2/source/appl/macroloader.cxx @@ -159,7 +159,7 @@ uno::Any SAL_CALL SfxMacroLoader::dispatchWithReturnValue( beans::PropertyValue aErrorCode; aErrorCode.Name = "ErrorCode"; - aErrorCode.Value <<= nErr; + aErrorCode.Value <<= sal_uInt32(nErr); aRet <<= aErrorCode; } diff --git a/sfx2/source/appl/opengrf.cxx b/sfx2/source/appl/opengrf.cxx index ef3a060d99cc..51ce43006f71 100644 --- a/sfx2/source/appl/opengrf.cxx +++ b/sfx2/source/appl/opengrf.cxx @@ -57,20 +57,16 @@ using namespace ::cppu; sal_uInt16 SvxOpenGrfErr2ResId( ErrCode err ) { - switch( err ) - { - case ERRCODE_GRFILTER_OPENERROR: - return RID_SVXSTR_GRFILTER_OPENERROR; - case ERRCODE_GRFILTER_IOERROR: - return RID_SVXSTR_GRFILTER_IOERROR; - case ERRCODE_GRFILTER_VERSIONERROR: - return RID_SVXSTR_GRFILTER_VERSIONERROR; - case ERRCODE_GRFILTER_FILTERERROR: - return RID_SVXSTR_GRFILTER_FILTERERROR; - case ERRCODE_GRFILTER_FORMATERROR: - default: - return RID_SVXSTR_GRFILTER_FORMATERROR; - } + if (err == ERRCODE_GRFILTER_OPENERROR) + return RID_SVXSTR_GRFILTER_OPENERROR; + else if (err == ERRCODE_GRFILTER_IOERROR) + return RID_SVXSTR_GRFILTER_IOERROR; + else if (err == ERRCODE_GRFILTER_VERSIONERROR) + return RID_SVXSTR_GRFILTER_VERSIONERROR; + else if (err == ERRCODE_GRFILTER_FILTERERROR) + return RID_SVXSTR_GRFILTER_FILTERERROR; + else + return RID_SVXSTR_GRFILTER_FORMATERROR; } @@ -104,9 +100,9 @@ SvxOpenGraphicDialog::~SvxOpenGraphicDialog() } -short SvxOpenGraphicDialog::Execute() +ErrCode SvxOpenGraphicDialog::Execute() { - sal_uInt16 nImpRet; + ErrCode nImpRet; bool bQuitLoop(false); while( !bQuitLoop && @@ -174,7 +170,7 @@ short SvxOpenGraphicDialog::Execute() } // cancel - return -1; + return ErrCode(sal_uInt32(-1)); } @@ -243,7 +239,7 @@ bool SvxOpenGraphicDialog::IsAsLink() const } -int SvxOpenGraphicDialog::GetGraphic(Graphic& rGraphic) const +ErrCode SvxOpenGraphicDialog::GetGraphic(Graphic& rGraphic) const { return mpImpl->aFileDlg.GetGraphic(rGraphic); } diff --git a/sfx2/source/bastyp/fltfnc.cxx b/sfx2/source/bastyp/fltfnc.cxx index fa6b2ec7661b..ed12ff58cab4 100644 --- a/sfx2/source/bastyp/fltfnc.cxx +++ b/sfx2/source/bastyp/fltfnc.cxx @@ -351,7 +351,7 @@ std::shared_ptr<const SfxFilter> SfxFilterMatcher::GetAnyFilter( SfxFilterFlags } -sal_uInt32 SfxFilterMatcher::GuessFilterIgnoringContent( +ErrCode SfxFilterMatcher::GuessFilterIgnoringContent( SfxMedium& rMedium, std::shared_ptr<const SfxFilter>& rpFilter ) const { @@ -379,13 +379,13 @@ sal_uInt32 SfxFilterMatcher::GuessFilterIgnoringContent( } -sal_uInt32 SfxFilterMatcher::GuessFilter( SfxMedium& rMedium, std::shared_ptr<const SfxFilter>& rpFilter, SfxFilterFlags nMust, SfxFilterFlags nDont ) const +ErrCode SfxFilterMatcher::GuessFilter( SfxMedium& rMedium, std::shared_ptr<const SfxFilter>& rpFilter, SfxFilterFlags nMust, SfxFilterFlags nDont ) const { return GuessFilterControlDefaultUI( rMedium, rpFilter, nMust, nDont ); } -sal_uInt32 SfxFilterMatcher::GuessFilterControlDefaultUI( SfxMedium& rMedium, std::shared_ptr<const SfxFilter>& rpFilter, SfxFilterFlags nMust, SfxFilterFlags nDont ) const +ErrCode SfxFilterMatcher::GuessFilterControlDefaultUI( SfxMedium& rMedium, std::shared_ptr<const SfxFilter>& rpFilter, SfxFilterFlags nMust, SfxFilterFlags nDont ) const { std::shared_ptr<const SfxFilter> pOldFilter = rpFilter; @@ -512,7 +512,7 @@ bool SfxFilterMatcher::IsFilterInstalled_Impl( const std::shared_ptr<const SfxFi } -sal_uInt32 SfxFilterMatcher::DetectFilter( SfxMedium& rMedium, std::shared_ptr<const SfxFilter>& rpFilter ) const +ErrCode SfxFilterMatcher::DetectFilter( SfxMedium& rMedium, std::shared_ptr<const SfxFilter>& rpFilter ) const /* [Description] Here the Filter selection box is pulled up. Otherwise GuessFilter diff --git a/sfx2/source/doc/DocumentMetadataAccess.cxx b/sfx2/source/doc/DocumentMetadataAccess.cxx index 8fb8220bb1c6..00404ec9acb2 100644 --- a/sfx2/source/doc/DocumentMetadataAccess.cxx +++ b/sfx2/source/doc/DocumentMetadataAccess.cxx @@ -1300,14 +1300,13 @@ DocumentMetadataAccess::storeMetadataToMedium( const bool bOk = aMedium.Commit(); aMedium.Close(); if ( !bOk ) { - sal_uInt32 nError = aMedium.GetError(); + ErrCode nError = aMedium.GetError(); if ( nError == ERRCODE_NONE ) { nError = ERRCODE_IO_GENERAL; } task::ErrorCodeIOException ex( - ("DocumentMetadataAccess::storeMetadataToMedium Commit failed: " - "0x" + OUString::number(nError, 16)), - uno::Reference< uno::XInterface >(), nError); + "DocumentMetadataAccess::storeMetadataToMedium Commit failed: " + nError.toHexString(), + uno::Reference< uno::XInterface >(), sal_uInt32(nError)); throw lang::WrappedTargetException(OUString(), *this, uno::makeAny(ex)); } diff --git a/sfx2/source/doc/SfxDocumentMetaData.cxx b/sfx2/source/doc/SfxDocumentMetaData.cxx index fa34dc6e498a..b222b8639161 100644 --- a/sfx2/source/doc/SfxDocumentMetaData.cxx +++ b/sfx2/source/doc/SfxDocumentMetaData.cxx @@ -1949,15 +1949,14 @@ SfxDocumentMetaData::storeToMedium(const OUString & URL, const bool bOk = aMedium.Commit(); aMedium.Close(); if ( !bOk ) { - sal_uInt32 nError = aMedium.GetError(); + ErrCode nError = aMedium.GetError(); if ( nError == ERRCODE_NONE ) { nError = ERRCODE_IO_GENERAL; } throw css::task::ErrorCodeIOException( - ("SfxDocumentMetaData::storeToMedium <" + URL + "> Commit failed: " - "0x" + OUString::number(nError, 16)), - css::uno::Reference< css::uno::XInterface >(), nError); + "SfxDocumentMetaData::storeToMedium <" + URL + "> Commit failed: " + nError.toHexString(), + css::uno::Reference< css::uno::XInterface >(), sal_uInt32(nError)); } } diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx index b86dba5a7d58..ae39a016c5cf 100644 --- a/sfx2/source/doc/docfile.cxx +++ b/sfx2/source/doc/docfile.cxx @@ -167,7 +167,7 @@ class SfxMedium_Impl { public: StreamMode m_nStorOpenMode; - sal_uInt32 m_eError; + ErrCode m_eError; ::ucbhelper::Content aContent; bool bUpdatePickList:1; @@ -224,7 +224,7 @@ public: uno::Reference<io::XStream> m_xLockingStream; uno::Reference<task::XInteractionHandler> xInteraction; - sal_uInt32 nLastStorageError; + ErrCode nLastStorageError; OUString m_aBackupURL; @@ -276,7 +276,7 @@ SfxMedium_Impl::SfxMedium_Impl() : pOrigFilter( nullptr ), aExpireTime( Date( Date::SYSTEM ) + 10, tools::Time( tools::Time::SYSTEM ) ), pTempFile( nullptr ), - nLastStorageError( 0 ), + nLastStorageError( ERRCODE_NONE ), m_nSignatureState( SignatureState::NOSIGNATURES ) { aDoneLink.CreateMutex(); @@ -301,19 +301,19 @@ void SfxMedium::ResetError() pImpl->m_pOutStream->ResetError(); } -sal_uInt32 SfxMedium::GetLastStorageCreationState() +ErrCode SfxMedium::GetLastStorageCreationState() { return pImpl->nLastStorageError; } -void SfxMedium::SetError(sal_uInt32 nError) +void SfxMedium::SetError(ErrCode nError) { pImpl->m_eError = nError; } -sal_uInt32 SfxMedium::GetErrorCode() const +ErrCode SfxMedium::GetErrorCode() const { - sal_uInt32 lError = pImpl->m_eError; + ErrCode lError = pImpl->m_eError; if(!lError && pImpl->m_pInStream) lError = pImpl->m_pInStream->GetErrorCode(); if(!lError && pImpl->m_pOutStream) @@ -1694,7 +1694,7 @@ void SfxMedium::TransactedTransferForFS_Impl( const INetURLObject& aSource, pImpl->m_eError = ERRCODE_IO_GENERAL; } - if( !pImpl->m_eError || (pImpl->m_eError & ERRCODE_WARNING_MASK) ) + if( !pImpl->m_eError || pImpl->m_eError.IsWarning() ) { if ( pImpl->xStorage.is() ) CloseStorage(); @@ -1859,7 +1859,7 @@ void SfxMedium::Transfer_Impl() SAL_WARN( "sfx.doc", "The medium name is not convertible!" ); } - if ( !aNameURL.isEmpty() && ( !pImpl->m_eError || (pImpl->m_eError & ERRCODE_WARNING_MASK) ) ) + if ( !aNameURL.isEmpty() && ( !pImpl->m_eError || pImpl->m_eError.IsWarning() ) ) { SAL_INFO( "sfx.doc", "SfxMedium::Transfer_Impl, copying to target" ); @@ -2026,7 +2026,7 @@ void SfxMedium::Transfer_Impl() pImpl->m_eError = ERRCODE_IO_GENERAL; } - if ( !pImpl->m_eError || (pImpl->m_eError & ERRCODE_WARNING_MASK) ) + if ( !pImpl->m_eError || pImpl->m_eError.IsWarning() ) { // free resources, otherwise the transfer may fail if ( pImpl->xStorage.is() ) @@ -2122,7 +2122,7 @@ void SfxMedium::Transfer_Impl() } } - if ( ( !pImpl->m_eError || (pImpl->m_eError & ERRCODE_WARNING_MASK) ) && !pImpl->pTempFile ) + if ( ( !pImpl->m_eError || pImpl->m_eError.IsWarning() ) && !pImpl->pTempFile ) { // without a TempFile the physical and logical name should be the same after successful transfer if (osl::FileBase::getSystemPathFromFileURL( @@ -2464,8 +2464,8 @@ void SfxMedium::GetMedium_Impl() pImpl->bDownloadDone = true; pImpl->aDoneLink.ClearPendingCall(); - sal_uIntPtr nError = GetError(); - pImpl->aDoneLink.Call( reinterpret_cast<void*>(nError) ); + ErrCode nError = GetError(); + pImpl->aDoneLink.Call( reinterpret_cast<void*>(sal_uInt32(nError)) ); } } @@ -3430,7 +3430,7 @@ void SfxMedium::CreateTempFile( bool bReplace ) if ( pImpl->m_pOutStream ) { char *pBuf = new char [8192]; - sal_uInt32 nErr = ERRCODE_NONE; + ErrCode nErr = ERRCODE_NONE; pImpl->m_pInStream->Seek(0); pImpl->m_pOutStream->Seek(0); diff --git a/sfx2/source/doc/docinf.cxx b/sfx2/source/doc/docinf.cxx index 3241a0146e55..f73407735c45 100644 --- a/sfx2/source/doc/docinf.cxx +++ b/sfx2/source/doc/docinf.cxx @@ -44,7 +44,7 @@ using namespace ::com::sun::star; namespace sfx2 { -sal_uInt32 LoadOlePropertySet( +ErrCode LoadOlePropertySet( const uno::Reference< document::XDocumentProperties>& i_xDocProps, SotStorage* i_pStorage ) { diff --git a/sfx2/source/doc/docinsert.cxx b/sfx2/source/doc/docinsert.cxx index 5957b0fa4d92..8209b4a1f4cb 100644 --- a/sfx2/source/doc/docinsert.cxx +++ b/sfx2/source/doc/docinsert.cxx @@ -119,7 +119,7 @@ SfxMedium* DocumentInserter::CreateMedium(char const*const pFallbackHack) pMatcher.reset(new SfxFilterMatcher()); std::shared_ptr<const SfxFilter> pFilter; - sal_uInt32 nError = pMatcher->DetectFilter( *pMedium, pFilter ); + ErrCode nError = pMatcher->DetectFilter( *pMedium, pFilter ); // tdf#101813 hack: check again if it's a global document if (ERRCODE_NONE != nError && pFallbackHack) { @@ -153,7 +153,7 @@ SfxMediumList* DocumentInserter::CreateMediumList() SfxFilterMatcher aMatcher( m_sDocFactory ); std::shared_ptr<const SfxFilter> pFilter; - sal_uInt32 nError = aMatcher.DetectFilter( *pMedium, pFilter ); + ErrCode nError = aMatcher.DetectFilter( *pMedium, pFilter ); if ( nError == ERRCODE_NONE && pFilter ) pMedium->SetFilter( pFilter ); else diff --git a/sfx2/source/doc/docmacromode.cxx b/sfx2/source/doc/docmacromode.cxx index f9ba5ac180f8..da009871b2aa 100644 --- a/sfx2/source/doc/docmacromode.cxx +++ b/sfx2/source/doc/docmacromode.cxx @@ -83,13 +83,13 @@ namespace sfx2 namespace { - void lcl_showGeneralSfxErrorOnce( const Reference< XInteractionHandler >& rxHandler, const sal_Int32 nSfxErrorCode, bool& rbAlreadyShown ) + void lcl_showGeneralSfxErrorOnce( const Reference< XInteractionHandler >& rxHandler, ErrCode nSfxErrorCode, bool& rbAlreadyShown ) { if ( rbAlreadyShown ) return; ErrorCodeRequest aErrorCodeRequest; - aErrorCodeRequest.ErrCode = nSfxErrorCode; + aErrorCodeRequest.ErrCode = sal_uInt32(nSfxErrorCode); SfxMedium::CallApproveHandler( rxHandler, makeAny( aErrorCodeRequest ), false ); rbAlreadyShown = true; diff --git a/sfx2/source/doc/graphhelp.cxx b/sfx2/source/doc/graphhelp.cxx index 190a2e75e847..7e78818c0732 100644 --- a/sfx2/source/doc/graphhelp.cxx +++ b/sfx2/source/doc/graphhelp.cxx @@ -95,11 +95,11 @@ void* GraphicHelper::getEnhMetaFileFromGDI_Impl( const GDIMetaFile* pGDIMeta ) if ( pStream ) { Graphic aGraph( *pGDIMeta ); - bool bFailed = GraphicConverter::Export( *pStream, aGraph, ConvertDataFormat::EMF ); + ErrCode nFailed = GraphicConverter::Export( *pStream, aGraph, ConvertDataFormat::EMF ); pStream->Flush(); delete pStream; - if ( !bFailed ) + if ( !nFailed ) pResult = GetEnhMetaFileA( aWinFile.getStr() ); } } @@ -121,9 +121,9 @@ void* GraphicHelper::getWinMetaFileFromGDI_Impl( const GDIMetaFile* pGDIMeta, co { SvMemoryStream pStream( 65535, 65535 ); Graphic aGraph( *pGDIMeta ); - bool bFailed = GraphicConverter::Export( pStream, aGraph, ConvertDataFormat::WMF ); + ErrCode nFailed = GraphicConverter::Export( pStream, aGraph, ConvertDataFormat::WMF ); pStream.Flush(); - if ( !bFailed ) + if ( !nFailed ) { sal_Int32 nLength = pStream.Seek( STREAM_SEEK_TO_END ); if ( nLength > 22 ) diff --git a/sfx2/source/doc/guisaveas.cxx b/sfx2/source/doc/guisaveas.cxx index 1df20de8d694..7adac1e93a7d 100644 --- a/sfx2/source/doc/guisaveas.cxx +++ b/sfx2/source/doc/guisaveas.cxx @@ -166,7 +166,7 @@ sal_Int8 getStoreModeFromSlotName( const OUString& aSlotName ) throw task::ErrorCodeIOException( ("getStoreModeFromSlotName(\"" + aSlotName + "): ERRCODE_IO_INVALIDPARAMETER"), - uno::Reference< uno::XInterface >(), ERRCODE_IO_INVALIDPARAMETER ); + uno::Reference< uno::XInterface >(), sal_uInt32(ERRCODE_IO_INVALIDPARAMETER) ); return nResult; } @@ -601,7 +601,7 @@ bool ModelData_Impl::ExecuteFilterDialog_Impl( const OUString& aFilterName ) ("ModelData_Impl::ExecuteFilterDialog_Impl:" " ERRCODE_IO_ABORT"), uno::Reference< uno::XInterface >(), - ERRCODE_IO_ABORT); + sal_uInt32(ERRCODE_IO_ABORT)); } } } @@ -617,7 +617,7 @@ bool ModelData_Impl::ExecuteFilterDialog_Impl( const OUString& aFilterName ) throw task::ErrorCodeIOException( ("ModelData_Impl::ExecuteFilterDialog_Impl: NoSuchElementException" " \"" + e.Message + "\": ERRCODE_IO_ABORT"), - uno::Reference< uno::XInterface >(), ERRCODE_IO_INVALIDPARAMETER); + uno::Reference< uno::XInterface >(), sal_uInt32(ERRCODE_IO_INVALIDPARAMETER)); } catch( const task::ErrorCodeIOException& ) { @@ -799,7 +799,7 @@ bool ModelData_Impl::OutputFileDialog( sal_Int8 nStoreMode, throw task::ErrorCodeIOException( "ModelData_Impl::OutputFileDialog: ERRCODE_IO_INVALIDPARAMETER", uno::Reference< uno::XInterface >(), - ERRCODE_IO_INVALIDPARAMETER); + sal_uInt32(ERRCODE_IO_INVALIDPARAMETER)); // no target file name is specified // we need to show the file dialog @@ -967,7 +967,7 @@ bool ModelData_Impl::OutputFileDialog( sal_Int8 nStoreMode, { throw task::ErrorCodeIOException( "ModelData_Impl::OutputFileDialog: ERRCODE_IO_ABORT", - uno::Reference< uno::XInterface >(), ERRCODE_IO_ABORT); + uno::Reference< uno::XInterface >(), sal_uInt32(ERRCODE_IO_ABORT)); } // the following two arguments can not be converted in MediaDescriptor, @@ -1302,7 +1302,7 @@ bool SfxStoringHelper::GUIStoreModel( const uno::Reference< frame::XModel >& xMo if ( ( nStoreMode & SAVEAS_REQUESTED ) && aModelData.CheckSaveAcceptable( STATUS_SAVEAS ) == STATUS_NO_ACTION ) throw task::ErrorCodeIOException( "SfxStoringHelper::GUIStoreModel: ERRCODE_IO_ABORT", - uno::Reference< uno::XInterface >(), ERRCODE_IO_ABORT); + uno::Reference< uno::XInterface >(), sal_uInt32(ERRCODE_IO_ABORT)); } else if ( nStoreMode & SAVE_REQUESTED ) { @@ -1312,7 +1312,7 @@ bool SfxStoringHelper::GUIStoreModel( const uno::Reference< frame::XModel >& xMo if ( nStatusSave == STATUS_NO_ACTION ) throw task::ErrorCodeIOException( "SfxStoringHelper::GUIStoreModel: ERRCODE_IO_ABORT", - uno::Reference< uno::XInterface >(), ERRCODE_IO_ABORT); + uno::Reference< uno::XInterface >(), sal_uInt32(ERRCODE_IO_ABORT)); else if ( nStatusSave == STATUS_SAVE ) { // check whether it is possible to use save operation @@ -1323,7 +1323,7 @@ bool SfxStoringHelper::GUIStoreModel( const uno::Reference< frame::XModel >& xMo { throw task::ErrorCodeIOException( "SfxStoringHelper::GUIStoreModel: ERRCODE_IO_ABORT", - uno::Reference< uno::XInterface >(), ERRCODE_IO_ABORT); + uno::Reference< uno::XInterface >(), sal_uInt32(ERRCODE_IO_ABORT)); } else if ( nStatusSave != STATUS_SAVE ) { @@ -1348,7 +1348,7 @@ bool SfxStoringHelper::GUIStoreModel( const uno::Reference< frame::XModel >& xMo // the user has decided not to store the document throw task::ErrorCodeIOException( "SfxStoringHelper::GUIStoreModel: ERRCODE_IO_ABORT", - uno::Reference< uno::XInterface >(), ERRCODE_IO_ABORT); + uno::Reference< uno::XInterface >(), sal_uInt32(ERRCODE_IO_ABORT)); } } } @@ -1387,7 +1387,7 @@ bool SfxStoringHelper::GUIStoreModel( const uno::Reference< frame::XModel >& xMo if ( !aFilterProps.getLength() ) throw task::ErrorCodeIOException( "SfxStoringHelper::GUIStoreModel: ERRCODE_IO_INVALIDPARAMETER", - uno::Reference< uno::XInterface >(), ERRCODE_IO_INVALIDPARAMETER); + uno::Reference< uno::XInterface >(), sal_uInt32(ERRCODE_IO_INVALIDPARAMETER)); ::comphelper::SequenceAsHashMap aFilterPropsHM( aFilterProps ); OUString aFilterName = aFilterPropsHM.getUnpackedValueOrDefault( "Name", OUString() ); @@ -1537,7 +1537,7 @@ bool SfxStoringHelper::GUIStoreModel( const uno::Reference< frame::XModel >& xMo SAL_WARN( "sfx.doc", "This code must be unreachable!" ); throw task::ErrorCodeIOException( "SfxStoringHelper::GUIStoreModel: ERRCODE_IO_INVALIDPARAMETER", - uno::Reference< uno::XInterface >(), ERRCODE_IO_INVALIDPARAMETER); + uno::Reference< uno::XInterface >(), sal_uInt32(ERRCODE_IO_INVALIDPARAMETER)); } ::comphelper::SequenceAsHashMap::const_iterator aIter = diff --git a/sfx2/source/doc/new.cxx b/sfx2/source/doc/new.cxx index 3c5716e9eed3..e10986bf6111 100644 --- a/sfx2/source/doc/new.cxx +++ b/sfx2/source/doc/new.cxx @@ -216,11 +216,10 @@ IMPL_LINK_NOARG(SfxNewFileDialog_Impl, Update, Timer*, void) { SfxErrorContext eEC(ERRCTX_SFX_LOADTEMPLATE,pAntiImpl); SfxApplication *pSfxApp = SfxGetpApp(); - sal_uIntPtr lErr; SfxItemSet* pSet = new SfxAllItemSet(pSfxApp->GetPool()); pSet->Put(SfxBoolItem(SID_TEMPLATE, true)); pSet->Put(SfxBoolItem(SID_PREVIEW, true)); - lErr = pSfxApp->LoadTemplate(xDocShell, aFileName, pSet); + ErrCode lErr = pSfxApp->LoadTemplate(xDocShell, aFileName, pSet); if (lErr) ErrorHandler::HandleError(lErr); if (!xDocShell.Is()) diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx index 7ff7253dfe3b..952bd34f66f2 100644 --- a/sfx2/source/doc/objmisc.cxx +++ b/sfx2/source/doc/objmisc.cxx @@ -197,7 +197,7 @@ void SfxObjectShell::FlushDocInfo() (delay > 0) || !url.isEmpty() ); } -void SfxObjectShell::SetError(sal_uInt32 lErr) +void SfxObjectShell::SetError(ErrCode lErr) { if (pImpl->lErr==ERRCODE_NONE) { @@ -205,14 +205,14 @@ void SfxObjectShell::SetError(sal_uInt32 lErr) } } -sal_uInt32 SfxObjectShell::GetError() const +ErrCode SfxObjectShell::GetError() const { - return ERRCODE_TOERROR(GetErrorCode()); + return GetErrorCode().IgnoreWarning(); } -sal_uInt32 SfxObjectShell::GetErrorCode() const +ErrCode SfxObjectShell::GetErrorCode() const { - sal_uInt32 lError=pImpl->lErr; + ErrCode lError=pImpl->lErr; if(!lError && GetMedium()) lError=GetMedium()->GetErrorCode(); return lError; @@ -220,7 +220,7 @@ sal_uInt32 SfxObjectShell::GetErrorCode() const void SfxObjectShell::ResetError() { - pImpl->lErr=0; + pImpl->lErr=ERRCODE_NONE; SfxMedium * pMed = GetMedium(); if( pMed ) pMed->ResetError(); @@ -965,7 +965,7 @@ void SfxObjectShell::CheckEncryption_Impl( const uno::Reference< task::XInteract { // this is an encrypted document with nonencrypted streams inside, show the warning css::task::ErrorCodeRequest aErrorCode; - aErrorCode.ErrCode = ERRCODE_SFX_INCOMPLETE_ENCRYPTION; + aErrorCode.ErrCode = sal_uInt32(ERRCODE_SFX_INCOMPLETE_ENCRYPTION); SfxMedium::CallApproveHandler( xHandler, uno::makeAny( aErrorCode ), false ); pImpl->m_bIncomplEncrWarnShown = true; @@ -1656,7 +1656,7 @@ void SfxObjectShell::InPlaceActivate( bool ) bool SfxObjectShell::UseInteractionToHandleError( const uno::Reference< task::XInteractionHandler >& xHandler, - sal_uInt32 nError ) + ErrCode nError ) { bool bResult = false; @@ -1672,7 +1672,7 @@ bool SfxObjectShell::UseInteractionToHandleError( lContinuations[1].set( static_cast< task::XInteractionContinuation* >( pApprove ), uno::UNO_QUERY ); task::ErrorCodeRequest aErrorCode; - aErrorCode.ErrCode = nError; + aErrorCode.ErrCode = sal_uInt32(nError); aInteraction <<= aErrorCode; xHandler->handle(::framework::InteractionRequest::CreateRequest (aInteraction,lContinuations)); bResult = pAbort->wasSelected(); diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx index fea3af2af67b..dc2cfa229ed1 100644 --- a/sfx2/source/doc/objserv.cxx +++ b/sfx2/source/doc/objserv.cxx @@ -519,7 +519,7 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq) // at the end of the method aModelGuard.Init_Impl( uno::Reference< util::XCloseable >( GetModel(), uno::UNO_QUERY ) ); - sal_uInt32 nErrorCode = ERRCODE_NONE; + ErrCode nErrorCode = ERRCODE_NONE; // by default versions should be preserved always except in case of an explicit // SaveAs via GUI, so the flag must be set accordingly @@ -633,7 +633,7 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq) // the user has decided not to store the document throw task::ErrorCodeIOException( "SfxObjectShell::ExecFile_Impl: ERRCODE_IO_ABORT", - uno::Reference< uno::XInterface >(), ERRCODE_IO_ABORT); + uno::Reference< uno::XInterface >(), sal_uInt32(ERRCODE_IO_ABORT)); } // merge aDispatchArgs to the request @@ -654,7 +654,7 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq) } catch( const task::ErrorCodeIOException& aErrorEx ) { - nErrorCode = (sal_uInt32)aErrorEx.ErrCode; + nErrorCode = ErrCode(aErrorEx.ErrCode); } catch( Exception& ) { @@ -664,7 +664,7 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq) // by default versions should be preserved always except in case of an explicit // SaveAs via GUI, so the flag must be reset to guarantee this pImpl->bPreserveVersions = true; - sal_uIntPtr lErr=GetErrorCode(); + ErrCode lErr=GetErrorCode(); if ( !lErr && nErrorCode ) lErr = nErrorCode; @@ -790,7 +790,7 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq) } SetModified( false ); - sal_uIntPtr lErr = GetErrorCode(); + ErrCode lErr = GetErrorCode(); ErrorHandler::HandleError(lErr); rReq.SetReturnValue( SfxBoolItem(0, true) ); diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx index ea77377f54b5..2f87356dcaa1 100644 --- a/sfx2/source/doc/objstor.cxx +++ b/sfx2/source/doc/objstor.cxx @@ -658,7 +658,7 @@ bool SfxObjectShell::DoLoad( SfxMedium *pMed ) bool bHasStorage = IsPackageStorageFormat_Impl( *pMedium ); if ( pMedium->GetFilter() ) { - sal_uInt32 nError = HandleFilter( pMedium, this ); + ErrCode nError = HandleFilter( pMedium, this ); if ( nError != ERRCODE_NONE ) SetError(nError); @@ -868,9 +868,9 @@ bool SfxObjectShell::DoLoadExternal( SfxMedium *pMed ) return LoadExternal(*pMedium); } -sal_uInt32 SfxObjectShell::HandleFilter( SfxMedium* pMedium, SfxObjectShell* pDoc ) +ErrCode SfxObjectShell::HandleFilter( SfxMedium* pMedium, SfxObjectShell* pDoc ) { - sal_uInt32 nError = ERRCODE_NONE; + ErrCode nError = ERRCODE_NONE; SfxItemSet* pSet = pMedium->GetItemSet(); const SfxStringItem* pOptions = SfxItemSet::GetItem<SfxStringItem>(pSet, SID_FILE_FILTEROPTIONS, false); const SfxUnoAnyItem* pData = SfxItemSet::GetItem<SfxUnoAnyItem>(pSet, SID_FILTER_DATA, false); diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx index 2e2d0d325d93..e2ebee05f9bb 100644 --- a/sfx2/source/doc/sfxbasemodel.cxx +++ b/sfx2/source/doc/sfxbasemodel.cxx @@ -1543,8 +1543,8 @@ void SAL_CALL SfxBaseModel::storeSelf( const Sequence< beans::PropertyValue > DELETEZ( pParams ); - sal_uInt32 nErrCode = m_pData->m_pObjectShell->GetError() ? m_pData->m_pObjectShell->GetError() - : ERRCODE_IO_CANTWRITE; + ErrCode nErrCode = m_pData->m_pObjectShell->GetError() ? m_pData->m_pObjectShell->GetError() + : ERRCODE_IO_CANTWRITE; m_pData->m_pObjectShell->ResetError(); if ( bRet ) @@ -1559,8 +1559,8 @@ void SAL_CALL SfxBaseModel::storeSelf( const Sequence< beans::PropertyValue > SfxGetpApp()->NotifyEvent( SfxEventHint( SfxEventHintId::SaveDocFailed, GlobalEventConfig::GetEventName(GlobalEventId::SAVEDOCFAILED), m_pData->m_pObjectShell.get() ) ); throw task::ErrorCodeIOException( - "SfxBaseModel::storeSelf: 0x" + OUString::number(nErrCode, 16), - Reference< XInterface >(), nErrCode); + "SfxBaseModel::storeSelf: " + nErrCode.toHexString(), + Reference< XInterface >(), sal_uInt32(nErrCode)); } } @@ -1705,14 +1705,14 @@ void SAL_CALL SfxBaseModel::initNew() throw frame::DoubleInitializationException(); bool bRes = m_pData->m_pObjectShell->DoInitNew(); - sal_uInt32 nErrCode = m_pData->m_pObjectShell->GetError() ? - m_pData->m_pObjectShell->GetError() : ERRCODE_IO_CANTCREATE; + ErrCode nErrCode = m_pData->m_pObjectShell->GetError() ? + m_pData->m_pObjectShell->GetError() : ERRCODE_IO_CANTCREATE; m_pData->m_pObjectShell->ResetError(); if ( !bRes ) throw task::ErrorCodeIOException( - "SfxBaseModel::initNew: 0x" + OUString::number(nErrCode, 16), - Reference< XInterface >(), nErrCode); + "SfxBaseModel::initNew: " + nErrCode.toHexString(), + Reference< XInterface >(), sal_uInt32(nErrCode)); } } @@ -1760,7 +1760,7 @@ void SAL_CALL SfxBaseModel::load( const Sequence< beans::PropertyValue >& seqA SfxMedium* pMedium = new SfxMedium( seqArguments ); - sal_uInt32 nError = ERRCODE_NONE; + ErrCode nError = ERRCODE_NONE; OUString aFilterProvider = getFilterProvider(*pMedium); if (!aFilterProvider.isEmpty()) { @@ -2584,7 +2584,7 @@ void SfxBaseModel::loadCmisProperties( ) } } -SfxMedium* SfxBaseModel::handleLoadError( sal_uInt32 nError, SfxMedium* pMedium ) +SfxMedium* SfxBaseModel::handleLoadError( ErrCode nError, SfxMedium* pMedium ) { if (!nError) { @@ -2597,7 +2597,7 @@ SfxMedium* SfxBaseModel::handleLoadError( sal_uInt32 nError, SfxMedium* pMedium if( pSilentItem ) bSilent = pSilentItem->GetValue(); - bool bWarning = ((nError & ERRCODE_WARNING_MASK) == ERRCODE_WARNING_MASK); + bool bWarning = nError.IsWarning(); if ( nError != ERRCODE_IO_BROKENPACKAGE && !bSilent ) { // broken package was handled already @@ -2620,8 +2620,8 @@ SfxMedium* SfxBaseModel::handleLoadError( sal_uInt32 nError, SfxMedium* pMedium { nError = nError ? nError : ERRCODE_IO_CANTREAD; throw task::ErrorCodeIOException( - "SfxBaseModel::handleLoadError: 0x" + OUString::number(nError, 16), - Reference< XInterface >(), nError); + "SfxBaseModel::handleLoadError: 0x" + nError.toHexString(), + Reference< XInterface >(), sal_uInt32(nError)); } return pMedium; @@ -2902,7 +2902,7 @@ void SfxBaseModel::impl_store( const OUString& sURL else { // if the password is changed a special error should be used in case of shared document - throw task::ErrorCodeIOException("Can not change password for shared document.", uno::Reference< uno::XInterface >(), ERRCODE_SFX_SHARED_NOPASSWORDCHANGE ); + throw task::ErrorCodeIOException("Can not change password for shared document.", uno::Reference< uno::XInterface >(), sal_uInt32(ERRCODE_SFX_SHARED_NOPASSWORDCHANGE) ); } } #endif @@ -2982,7 +2982,7 @@ void SfxBaseModel::impl_store( const OUString& sURL pItemSet.reset(); - sal_uInt32 nErrCode = m_pData->m_pObjectShell->GetErrorCode(); + ErrCode nErrCode = m_pData->m_pObjectShell->GetErrorCode(); if ( !bRet && !nErrCode ) { SAL_WARN("sfx.doc", "Storing has failed, no error is set!"); @@ -3001,7 +3001,7 @@ void SfxBaseModel::impl_store( const OUString& sURL SfxErrorContext aEc( ERRCTX_SFX_SAVEASDOC, m_pData->m_pObjectShell->GetTitle() ); task::ErrorCodeRequest aErrorCode; - aErrorCode.ErrCode = nErrCode; + aErrorCode.ErrCode = sal_uInt32(nErrCode); SfxMedium::CallApproveHandler( xHandler, makeAny( aErrorCode ), false ); } } @@ -3031,9 +3031,8 @@ void SfxBaseModel::impl_store( const OUString& sURL m_pData->m_pObjectShell.get() ) ); throw task::ErrorCodeIOException( - ("SfxBaseModel::impl_store <" + sURL + "> failed: 0x" - + OUString::number(nErrCode, 16)), - Reference< XInterface >(), nErrCode); + "SfxBaseModel::impl_store <" + sURL + "> failed: " + nErrCode.toHexString(), + Reference< XInterface >(), sal_uInt32(nErrCode)); } } } @@ -3610,11 +3609,11 @@ void SAL_CALL SfxBaseModel::loadFromStorage( const Reference< embed::XStorage >& // load document if ( !m_pData->m_pObjectShell->DoLoad(pMedium) ) { - sal_uInt32 nError = m_pData->m_pObjectShell->GetErrorCode(); + ErrCode nError = m_pData->m_pObjectShell->GetErrorCode(); nError = nError ? nError : ERRCODE_IO_CANTREAD; throw task::ErrorCodeIOException( - "SfxBaseModel::loadFromStorage: 0x" + OUString::number(nError, 16), - Reference< XInterface >(), nError); + "SfxBaseModel::loadFromStorage: " + nError.toHexString(), + Reference< XInterface >(), sal_uInt32(nError)); } loadCmisProperties( ); } @@ -3664,7 +3663,7 @@ void SAL_CALL SfxBaseModel::storeToStorage( const Reference< embed::XStorage >& } } - sal_uInt32 nError = m_pData->m_pObjectShell->GetErrorCode(); + ErrCode nError = m_pData->m_pObjectShell->GetErrorCode(); m_pData->m_pObjectShell->ResetError(); // the warnings are currently not transported @@ -3672,8 +3671,8 @@ void SAL_CALL SfxBaseModel::storeToStorage( const Reference< embed::XStorage >& { nError = nError ? nError : ERRCODE_IO_GENERAL; throw task::ErrorCodeIOException( - "SfxBaseModel::storeToStorage: 0x" + OUString::number(nError, 16), - Reference< XInterface >(), nError); + "SfxBaseModel::storeToStorage: " + nError.toHexString(), + Reference< XInterface >(), sal_uInt32(nError)); } } @@ -3689,12 +3688,11 @@ void SAL_CALL SfxBaseModel::switchToStorage( const Reference< embed::XStorage >& { if ( !m_pData->m_pObjectShell->SwitchPersistance( xStorage ) ) { - sal_uInt32 nError = m_pData->m_pObjectShell->GetErrorCode(); + ErrCode nError = m_pData->m_pObjectShell->GetErrorCode(); nError = nError ? nError : ERRCODE_IO_GENERAL; throw task::ErrorCodeIOException( - ("SfxBaseModel::switchToStorage: 0x" - + OUString::number(nError, 16)), - Reference< XInterface >(), nError); + "SfxBaseModel::switchToStorage: " + nError.toHexString(), + Reference< XInterface >(), sal_uInt32(nError)); } else { diff --git a/sfx2/source/inc/appopen.hxx b/sfx2/source/inc/appopen.hxx index eca47c903b27..a6f20e82938c 100644 --- a/sfx2/source/inc/appopen.hxx +++ b/sfx2/source/inc/appopen.hxx @@ -27,7 +27,7 @@ class SfxItemPool; class SfxMedium; class SfxObjectShell; -sal_uInt32 CheckPasswd_Impl( SfxObjectShell* pDoc, SfxMedium* pFile ); +ErrCode CheckPasswd_Impl( SfxObjectShell* pDoc, SfxMedium* pFile ); void SetTemplate_Impl( const OUString&, const OUString&, SfxObjectShell* ); diff --git a/sfx2/source/inc/objshimp.hxx b/sfx2/source/inc/objshimp.hxx index bdb5036ed060..4f7cec72dd64 100644 --- a/sfx2/source/inc/objshimp.hxx +++ b/sfx2/source/inc/objshimp.hxx @@ -96,7 +96,7 @@ struct SfxObjectShell_Impl : public ::sfx2::IMacroDocumentAccess m_bConfigOptionsChecked:1; // whether or not the user options are checked after the Options dialog is closed. IndexBitSet aBitSet; - sal_uInt32 lErr; + ErrCode lErr; SfxEventHintId nEventId; // If Open/Create as to be sent // before Activate AutoReloadTimer_Impl *pReloadTimer; diff --git a/sfx2/source/view/ipclient.cxx b/sfx2/source/view/ipclient.cxx index 60a20a717040..126adb9b9ff7 100644 --- a/sfx2/source/view/ipclient.cxx +++ b/sfx2/source/view/ipclient.cxx @@ -848,7 +848,7 @@ ErrCode SfxInPlaceClient::DoVerb( long nVerb ) } catch( const task::ErrorCodeIOException& aErrorEx ) { - nError = (sal_uInt32)aErrorEx.ErrCode; + nError = ErrCode(aErrorEx.ErrCode); } catch( uno::Exception& ) { |