summaryrefslogtreecommitdiff
path: root/sw/source/filter/ww8
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/filter/ww8')
-rw-r--r--sw/source/filter/ww8/rtfexport.cxx6
-rw-r--r--sw/source/filter/ww8/rtfexportfilter.hxx4
-rw-r--r--sw/source/filter/ww8/wrtww8.cxx18
-rw-r--r--sw/source/filter/ww8/wrtww8.hxx6
-rw-r--r--sw/source/filter/ww8/ww8par.cxx34
-rw-r--r--sw/source/filter/ww8/ww8par.hxx12
-rw-r--r--sw/source/filter/ww8/ww8scan.cxx4
-rw-r--r--sw/source/filter/ww8/ww8scan.hxx4
8 files changed, 44 insertions, 44 deletions
diff --git a/sw/source/filter/ww8/rtfexport.cxx b/sw/source/filter/ww8/rtfexport.cxx
index 8b2de89d8bc7..e83f11e584c4 100644
--- a/sw/source/filter/ww8/rtfexport.cxx
+++ b/sw/source/filter/ww8/rtfexport.cxx
@@ -1369,7 +1369,7 @@ private:
public:
SwRTFWriter(const OUString& rFilterName, const OUString& rBaseURL);
- sal_uLong WriteStream() override;
+ ErrCode WriteStream() override;
};
SwRTFWriter::SwRTFWriter(const OUString& rFltName, const OUString& rBaseURL)
@@ -1379,12 +1379,12 @@ SwRTFWriter::SwRTFWriter(const OUString& rFltName, const OUString& rBaseURL)
m_bOutOutlineOnly = rFltName.startsWith("O");
}
-sal_uLong SwRTFWriter::WriteStream()
+ErrCode SwRTFWriter::WriteStream()
{
SwPaM aPam(*pCurPam->End(), *pCurPam->Start());
RtfExport aExport(nullptr, pDoc, &aPam, pCurPam, this, m_bOutOutlineOnly);
aExport.ExportDocument(true);
- return 0;
+ return ERRCODE_NONE;
}
extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL ExportRTF(const OUString& rFltName, const OUString& rBaseURL, WriterRef& xRet)
diff --git a/sw/source/filter/ww8/rtfexportfilter.hxx b/sw/source/filter/ww8/rtfexportfilter.hxx
index c58bf2b89554..5b626344e900 100644
--- a/sw/source/filter/ww8/rtfexportfilter.hxx
+++ b/sw/source/filter/ww8/rtfexportfilter.hxx
@@ -30,9 +30,9 @@
class RtfWriter : public Writer
{
protected:
- sal_uLong WriteStream() override
+ ErrCode WriteStream() override
{
- return 0;
+ return ERRCODE_NONE;
}
};
diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx
index 2048387249e8..7b1a06f741aa 100644
--- a/sw/source/filter/ww8/wrtww8.cxx
+++ b/sw/source/filter/ww8/wrtww8.cxx
@@ -3445,7 +3445,7 @@ void WW8Export::PrepareStorage()
}
}
-sal_uLong SwWW8Writer::WriteStorage()
+ErrCode SwWW8Writer::WriteStorage()
{
// #i34818# - update layout (if present), for SwWriteTable
SwViewShell* pViewShell = pDoc->getIDocumentLayoutAccess().GetCurrentViewShell();
@@ -3473,19 +3473,19 @@ sal_uLong SwWW8Writer::WriteStorage()
}
::EndProgress( pDoc->GetDocShell() );
- return 0;
+ return ERRCODE_NONE;
}
-sal_uLong SwWW8Writer::WriteMedium( SfxMedium& )
+ErrCode SwWW8Writer::WriteMedium( SfxMedium& )
{
return WriteStorage();
}
-sal_uLong SwWW8Writer::Write( SwPaM& rPaM, SfxMedium& rMed,
+ErrCode SwWW8Writer::Write( SwPaM& rPaM, SfxMedium& rMed,
const OUString* pFileName )
{
mpMedium = &rMed;
- sal_uLong nRet = StgWriter::Write( rPaM, rMed, pFileName );
+ ErrCode nRet = StgWriter::Write( rPaM, rMed, pFileName );
mpMedium = nullptr;
return nRet;
}
@@ -3625,10 +3625,10 @@ SwWW8Writer::~SwWW8Writer()
{
}
-extern "C" SAL_DLLPUBLIC_EXPORT sal_uLong SAL_CALL SaveOrDelMSVBAStorage_ww8( SfxObjectShell& rDoc, SotStorage& rStor, sal_Bool bSaveInto, const OUString& rStorageName )
+extern "C" SAL_DLLPUBLIC_EXPORT sal_uInt32 SAL_CALL SaveOrDelMSVBAStorage_ww8( SfxObjectShell& rDoc, SotStorage& rStor, sal_Bool bSaveInto, const OUString& rStorageName )
{
SvxImportMSVBasic aTmp( rDoc, rStor );
- return aTmp.SaveOrDelMSVBAStorage( bSaveInto, rStorageName );
+ return sal_uInt32(aTmp.SaveOrDelMSVBAStorage( bSaveInto, rStorageName ));
}
extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL ExportDOC( const OUString& rFltName, const OUString& rBaseURL, WriterRef& xRet )
@@ -3636,9 +3636,9 @@ extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL ExportDOC( const OUString& rFltNam
xRet = new SwWW8Writer( rFltName, rBaseURL );
}
-extern "C" SAL_DLLPUBLIC_EXPORT sal_uLong SAL_CALL GetSaveWarningOfMSVBAStorage_ww8( SfxObjectShell &rDocS )
+extern "C" SAL_DLLPUBLIC_EXPORT sal_uInt32 SAL_CALL GetSaveWarningOfMSVBAStorage_ww8( SfxObjectShell &rDocS )
{
- return SvxImportMSVBasic::GetSaveWarningOfMSVBAStorage( rDocS );
+ return sal_uInt32(SvxImportMSVBasic::GetSaveWarningOfMSVBAStorage( rDocS ));
}
bool WW8_WrPlcFootnoteEdn::WriteText( WW8Export& rWrt )
diff --git a/sw/source/filter/ww8/wrtww8.hxx b/sw/source/filter/ww8/wrtww8.hxx
index 0957e33220fd..bb371dcdc5b7 100644
--- a/sw/source/filter/ww8/wrtww8.hxx
+++ b/sw/source/filter/ww8/wrtww8.hxx
@@ -899,8 +899,8 @@ public:
SwWW8Writer(const OUString& rFltName, const OUString& rBaseURL);
virtual ~SwWW8Writer() override;
- virtual sal_uLong WriteStorage() override;
- virtual sal_uLong WriteMedium( SfxMedium& ) override;
+ virtual ErrCode WriteStorage() override;
+ virtual ErrCode WriteMedium( SfxMedium& ) override;
// TODO most probably we want to be able to get these in
// MSExportFilterBase
@@ -932,7 +932,7 @@ public:
bool InitStd97CodecUpdateMedium( ::msfilter::MSCodec_Std97& rCodec );
using StgWriter::Write;
- virtual sal_uLong Write( SwPaM&, SfxMedium&, const OUString* ) override;
+ virtual ErrCode Write( SwPaM&, SfxMedium&, const OUString* ) override;
//Seems not an expected to provide method to access the private member
SfxMedium* GetMedia() { return mpMedium; }
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index 30cf48d92935..a12f89e25dd9 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -4870,9 +4870,9 @@ void SwWW8ImplReader::ReadGlobalTemplateSettings( const OUString& sCreatedFrom,
}
}
-sal_uLong SwWW8ImplReader::CoreLoad(WW8Glossary *pGloss)
+ErrCode SwWW8ImplReader::CoreLoad(WW8Glossary *pGloss)
{
- sal_uLong nErrRet = 0;
+ ErrCode nErrRet = ERRCODE_NONE;
m_rDoc.SetDocumentType( SwDoc::DOCTYPE_MSWORD );
if (m_bNewDoc && m_pStg && !pGloss)
@@ -5382,10 +5382,10 @@ sal_uLong SwWW8ImplReader::CoreLoad(WW8Glossary *pGloss)
return nErrRet;
}
-sal_uLong SwWW8ImplReader::SetSubStreams(tools::SvRef<SotStorageStream> &rTableStream,
+ErrCode SwWW8ImplReader::SetSubStreams(tools::SvRef<SotStorageStream> &rTableStream,
tools::SvRef<SotStorageStream> &rDataStream)
{
- sal_uLong nErrRet = 0;
+ ErrCode nErrRet = ERRCODE_NONE;
// 6 stands for "6 OR 7", 7 stands for "ONLY 7"
switch (m_pWwFib->m_nVersion)
{
@@ -5657,9 +5657,9 @@ static bool lclReadCryptoAPIHeader(msfilter::RC4EncryptionInfo &info, SvStream &
return true;
}
-sal_uLong SwWW8ImplReader::LoadThroughDecryption(WW8Glossary *pGloss)
+ErrCode SwWW8ImplReader::LoadThroughDecryption(WW8Glossary *pGloss)
{
- sal_uLong nErrRet = 0;
+ ErrCode nErrRet = ERRCODE_NONE;
if (pGloss)
m_pWwFib = pGloss->GetFib();
else
@@ -5727,7 +5727,7 @@ sal_uLong SwWW8ImplReader::LoadThroughDecryption(WW8Glossary *pGloss)
// if initialization has failed the EncryptionData should be empty
if ( aEncryptionData.getLength() && aCtx.VerifyKey( m_pWwFib->m_nKey, m_pWwFib->m_nHash ) )
{
- nErrRet = 0;
+ nErrRet = ERRCODE_NONE;
pTempMain = MakeTemp(aDecryptMain);
m_pStrm->Seek(0);
@@ -5794,7 +5794,7 @@ sal_uLong SwWW8ImplReader::LoadThroughDecryption(WW8Glossary *pGloss)
if (aEncryptionData.getLength() && xCtx->VerifyKey(info.verifier.encryptedVerifier,
info.verifier.encryptedVerifierHash))
{
- nErrRet = 0;
+ nErrRet = ERRCODE_NONE;
pTempMain = MakeTemp(aDecryptMain);
@@ -5830,7 +5830,7 @@ sal_uLong SwWW8ImplReader::LoadThroughDecryption(WW8Glossary *pGloss)
}
}
- if (nErrRet == 0)
+ if (nErrRet == ERRCODE_NONE)
{
m_pStrm = &aDecryptMain;
@@ -6083,9 +6083,9 @@ void SwWW8ImplReader::GetSmartTagInfo(SwFltRDFMark& rMark)
rMark.SetAttributes(aAttributes);
}
-sal_uLong SwWW8ImplReader::LoadDoc(WW8Glossary *pGloss)
+ErrCode SwWW8ImplReader::LoadDoc(WW8Glossary *pGloss)
{
- sal_uLong nErrRet = 0;
+ ErrCode nErrRet = ERRCODE_NONE;
{
static const sal_Char* aNames[ 13 ] = {
@@ -6217,7 +6217,7 @@ bool SAL_CALL TestImportDOC(SvStream &rStream, const OUString &rFltName)
SwPaM aPaM( aIdx );
aPaM.GetPoint()->nContent.Assign(aIdx.GetNode().GetContentNode(), 0);
pD->SetInReading(true);
- bool bRet = xReader->Read(*pD, OUString(), aPaM, OUString()) == 0;
+ bool bRet = xReader->Read(*pD, OUString(), aPaM, OUString()) == ERRCODE_NONE;
pD->SetInReading(false);
return bRet;
@@ -6238,9 +6238,9 @@ extern "C" SAL_DLLPUBLIC_EXPORT bool SAL_CALL TestImportWW2(SvStream &rStream)
return TestImportDOC(rStream, "WW6");
}
-sal_uLong WW8Reader::OpenMainStream( tools::SvRef<SotStorageStream>& rRef, sal_uInt16& rBuffSize )
+ErrCode WW8Reader::OpenMainStream( tools::SvRef<SotStorageStream>& rRef, sal_uInt16& rBuffSize )
{
- sal_uLong nRet = ERR_SWG_READ_ERROR;
+ ErrCode nRet = ERR_SWG_READ_ERROR;
OSL_ENSURE( pStg.get(), "Where is my Storage?" );
rRef = pStg->OpenSotStream( "WordDocument", StreamMode::READ | StreamMode::SHARE_DENYALL);
@@ -6251,7 +6251,7 @@ sal_uLong WW8Reader::OpenMainStream( tools::SvRef<SotStorageStream>& rRef, sal_u
sal_uInt16 nOld = rRef->GetBufferSize();
rRef->SetBufferSize( rBuffSize );
rBuffSize = nOld;
- nRet = 0;
+ nRet = ERRCODE_NONE;
}
else
nRet = rRef->GetError();
@@ -6259,7 +6259,7 @@ sal_uLong WW8Reader::OpenMainStream( tools::SvRef<SotStorageStream>& rRef, sal_u
return nRet;
}
-sal_uLong WW8Reader::Read(SwDoc &rDoc, const OUString& rBaseURL, SwPaM &rPaM, const OUString & /* FileName */)
+ErrCode WW8Reader::Read(SwDoc &rDoc, const OUString& rBaseURL, SwPaM &rPaM, const OUString & /* FileName */)
{
sal_uInt16 nOldBuffSize = 32768;
bool bNew = !bInsertMode; // New Doc (no inserting)
@@ -6267,7 +6267,7 @@ sal_uLong WW8Reader::Read(SwDoc &rDoc, const OUString& rBaseURL, SwPaM &rPaM, co
tools::SvRef<SotStorageStream> refStrm; // So that no one else can steal the Stream
SvStream* pIn = pStrm;
- sal_uLong nRet = 0;
+ ErrCode nRet = ERRCODE_NONE;
sal_uInt8 nVersion = 8;
const OUString sFltName = GetFltName();
diff --git a/sw/source/filter/ww8/ww8par.hxx b/sw/source/filter/ww8/ww8par.hxx
index b859a030ef5b..f64509bf1421 100644
--- a/sw/source/filter/ww8/ww8par.hxx
+++ b/sw/source/filter/ww8/ww8par.hxx
@@ -130,8 +130,8 @@ struct WW8LFOInfo;
class WW8Reader : public StgReader
{
- virtual sal_uLong Read(SwDoc &, const OUString& rBaseURL, SwPaM &, const OUString &) override;
- sal_uLong OpenMainStream( tools::SvRef<SotStorageStream>& rRef, sal_uInt16& rBuffSize );
+ virtual ErrCode Read(SwDoc &, const OUString& rBaseURL, SwPaM &, const OUString &) override;
+ ErrCode OpenMainStream( tools::SvRef<SotStorageStream>& rRef, sal_uInt16& rBuffSize );
public:
virtual int GetReaderType() override;
@@ -1513,9 +1513,9 @@ private:
//This converts MS Asian Typography information into OOo's
void ImportDopTypography(const WW8DopTypography &rTypo);
- sal_uLong LoadThroughDecryption(WW8Glossary *pGloss);
- sal_uLong SetSubStreams(tools::SvRef<SotStorageStream> &rTableStream, tools::SvRef<SotStorageStream> &rDataStream);
- sal_uLong CoreLoad(WW8Glossary *pGloss);
+ ErrCode LoadThroughDecryption(WW8Glossary *pGloss);
+ ErrCode SetSubStreams(tools::SvRef<SotStorageStream> &rTableStream, tools::SvRef<SotStorageStream> &rDataStream);
+ ErrCode CoreLoad(WW8Glossary *pGloss);
void ReadDocVars();
@@ -1871,7 +1871,7 @@ public: // really private, but can only be done public
const OUString& GetBaseURL() const { return m_sBaseURL; }
// load a complete doc file
- sal_uLong LoadDoc(WW8Glossary *pGloss=nullptr);
+ ErrCode LoadDoc(WW8Glossary *pGloss=nullptr);
rtl_TextEncoding GetCurrentCharSet();
rtl_TextEncoding GetCurrentCJKCharSet();
rtl_TextEncoding GetCharSetFromLanguage();
diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx
index 64f7aceb3e5a..68b3870d83fc 100644
--- a/sw/source/filter/ww8/ww8scan.cxx
+++ b/sw/source/filter/ww8/ww8scan.cxx
@@ -2165,7 +2165,7 @@ void WW8PLCF::GeneratePLCF(SvStream& rSt, sal_Int32 nPN, sal_Int32 ncpN)
rSt.ReadInt32( nFc );
pPLCF_PosArray[i] = nFc;
- failure = rSt.GetError();
+ failure = bool(rSt.GetError());
}
}
@@ -2191,7 +2191,7 @@ void WW8PLCF::GeneratePLCF(SvStream& rSt, sal_Int32 nPN, sal_Int32 ncpN)
rSt.ReadInt32( nFc );
pPLCF_PosArray[nIMax] = nFc; // end of the last Fkp
- failure = rSt.GetError();
+ failure = bool(rSt.GetError());
} while(false);
}
diff --git a/sw/source/filter/ww8/ww8scan.hxx b/sw/source/filter/ww8/ww8scan.hxx
index 9a1b277c8480..22ae96e0d85a 100644
--- a/sw/source/filter/ww8/ww8scan.hxx
+++ b/sw/source/filter/ww8/ww8scan.hxx
@@ -1113,7 +1113,7 @@ public:
/*
error status
*/
- sal_uLong m_nFibError;
+ ErrCode m_nFibError;
/*
data read from FIB by Ctor
(corresponds only approximately to the real structure
@@ -1599,7 +1599,7 @@ struct WW8Dop
{
public:
/* Error Status */
- sal_uLong nDopError;
+ ErrCode nDopError;
/*
Corresponds only roughly to the actual structure of the Winword DOP,
the winword FIB version matters to what exists.