summaryrefslogtreecommitdiff
path: root/sw/source/filter/basflt
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-02-09 08:52:13 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-06-21 08:42:30 +0200
commit528632660b72b105345945c13c5b68060d94a91b (patch)
tree860508d482959abeb9175f0ce6b9e65954269f95 /sw/source/filter/basflt
parentaee66aa85e75f67135e5c6079a281e18402d261a (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 'sw/source/filter/basflt')
-rw-r--r--sw/source/filter/basflt/fltini.cxx16
-rw-r--r--sw/source/filter/basflt/shellio.cxx12
2 files changed, 14 insertions, 14 deletions
diff --git a/sw/source/filter/basflt/fltini.cxx b/sw/source/filter/basflt/fltini.cxx
index a1459c780fa3..f112ee9a77cb 100644
--- a/sw/source/filter/basflt/fltini.cxx
+++ b/sw/source/filter/basflt/fltini.cxx
@@ -647,8 +647,8 @@ extern "C" {
Reader *ImportDOC();
void ExportDOC( const OUString&, const OUString& rBaseURL, WriterRef& );
Reader *ImportDOCX();
- sal_uLong SaveOrDelMSVBAStorage_ww8( SfxObjectShell&, SotStorage&, sal_Bool, const OUString& );
- sal_uLong GetSaveWarningOfMSVBAStorage_ww8( SfxObjectShell& );
+ sal_uInt32 SaveOrDelMSVBAStorage_ww8( SfxObjectShell&, SotStorage&, sal_Bool, const OUString& );
+ sal_uInt32 GetSaveWarningOfMSVBAStorage_ww8( SfxObjectShell& );
}
#endif
@@ -725,27 +725,27 @@ Reader* GetDOCXReader()
#endif
}
-typedef sal_uLong ( SAL_CALL *SaveOrDel )( SfxObjectShell&, SotStorage&, sal_Bool, const OUString& );
-typedef sal_uLong ( SAL_CALL *GetSaveWarning )( SfxObjectShell& );
+typedef sal_uInt32 ( SAL_CALL *SaveOrDel )( SfxObjectShell&, SotStorage&, sal_Bool, const OUString& );
+typedef sal_uInt32 ( SAL_CALL *GetSaveWarning )( SfxObjectShell& );
-sal_uLong SaveOrDelMSVBAStorage( SfxObjectShell& rDoc, SotStorage& rStor, bool bSaveInto, const OUString& rStorageName )
+ErrCode SaveOrDelMSVBAStorage( SfxObjectShell& rDoc, SotStorage& rStor, bool bSaveInto, const OUString& rStorageName )
{
#ifndef DISABLE_DYNLOADING
SaveOrDel pFunction = reinterpret_cast<SaveOrDel>( SwGlobals::getFilters().GetMswordLibSymbol( "SaveOrDelMSVBAStorage_ww8" ) );
if( pFunction )
- return pFunction( rDoc, rStor, bSaveInto, rStorageName );
+ return ErrCode(pFunction( rDoc, rStor, bSaveInto, rStorageName ));
return ERRCODE_NONE;
#else
return SaveOrDelMSVBAStorage_ww8( rDoc, rStor, bSaveInto, rStorageName );
#endif
}
-sal_uLong GetSaveWarningOfMSVBAStorage( SfxObjectShell &rDocS )
+ErrCode GetSaveWarningOfMSVBAStorage( SfxObjectShell &rDocS )
{
#ifndef DISABLE_DYNLOADING
GetSaveWarning pFunction = reinterpret_cast<GetSaveWarning>( SwGlobals::getFilters().GetMswordLibSymbol( "GetSaveWarningOfMSVBAStorage_ww8" ) );
if( pFunction )
- return pFunction( rDocS );
+ return ErrCode(pFunction( rDocS ));
return ERRCODE_NONE;
#else
return GetSaveWarningOfMSVBAStorage_ww8( rDocS );
diff --git a/sw/source/filter/basflt/shellio.cxx b/sw/source/filter/basflt/shellio.cxx
index 615c0d938780..3e2a3ec4393c 100644
--- a/sw/source/filter/basflt/shellio.cxx
+++ b/sw/source/filter/basflt/shellio.cxx
@@ -62,7 +62,7 @@
using namespace ::com::sun::star;
-sal_uLong SwReader::Read( const Reader& rOptions )
+ErrCode SwReader::Read( const Reader& rOptions )
{
// copy variables
Reader* po = const_cast<Reader*>(&rOptions);
@@ -83,7 +83,7 @@ sal_uLong SwReader::Read( const Reader& rOptions )
return ERR_SWG_FILE_FORMAT_ERROR;
}
- sal_uLong nError = 0L;
+ ErrCode nError = ERRCODE_NONE;
GetDoc();
@@ -181,7 +181,7 @@ sal_uLong SwReader::Read( const Reader& rOptions )
mxDoc->getIDocumentRedlineAccess().SetRedlineFlags_intern( RedlineFlags::Ignore );
- if( !IsError( nError )) // set the End position already
+ if( ! nError.IsError() ) // set the End position already
{
--aEndPos;
pCNd = aEndPos.GetNode().GetContentNode();
@@ -727,7 +727,7 @@ SwWriter::SwWriter(SfxMedium& rMedium, SwDoc &rDocument)
{
}
-sal_uLong SwWriter::Write( WriterRef& rxWriter, const OUString* pRealFileName )
+ErrCode SwWriter::Write( WriterRef& rxWriter, const OUString* pRealFileName )
{
// #i73788#
SwPauseThreadStarting aPauseThreadStarting;
@@ -851,7 +851,7 @@ sal_uLong SwWriter::Write( WriterRef& rxWriter, const OUString* pRealFileName )
const bool bOrigPurgeOle = pOutDoc->getIDocumentSettingAccess().get(DocumentSettingId::PURGE_OLE);
pOutDoc->getIDocumentSettingAccess().set(DocumentSettingId::PURGE_OLE, false);
- sal_uLong nError = 0;
+ ErrCode nError = ERRCODE_NONE;
if( pMedium )
nError = rxWriter->Write( *pPam, *pMedium, pRealFileName );
else if( pStg.is() )
@@ -884,7 +884,7 @@ sal_uLong SwWriter::Write( WriterRef& rxWriter, const OUString* pRealFileName )
{
delete pPam; // delete the created Pam
// Everything was written successfully? Tell the document!
- if ( !IsError( nError ) && !xDoc.is() )
+ if ( !nError.IsError() && !xDoc.is() )
{
rDoc.getIDocumentState().ResetModified();
// #i38810# - reset also flag, that indicates updated links