diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-10-24 17:04:45 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-10-25 13:34:58 +0200 |
commit | cdec4956f0beb5d343e97ab791d27ee03c0cc9c4 (patch) | |
tree | b110afc5c7dad75403d450c9fe97a0e9f7b47f91 | |
parent | faf2bd9c695733fb1414c094ace01c9b123aa9ca (diff) |
drop old SetBufferSize stuff
Change-Id: I96c4db3289864c80f8fd8988c129056be8563e69
Reviewed-on: https://gerrit.libreoffice.org/43786
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r-- | sw/source/filter/ww8/ww8par.cxx | 24 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8par.hxx | 2 |
2 files changed, 6 insertions, 20 deletions
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index 996419b84712..7d4833c508f5 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -6277,30 +6277,18 @@ extern "C" SAL_DLLPUBLIC_EXPORT bool SAL_CALL TestImportWW2(SvStream &rStream) return TestImportDOC(rStream, "WW6"); } -ErrCode WW8Reader::OpenMainStream( tools::SvRef<SotStorageStream>& rRef, sal_uInt16& rBuffSize ) +ErrCode WW8Reader::OpenMainStream(tools::SvRef<SotStorageStream>& rRef) { ErrCode nRet = ERR_SWG_READ_ERROR; OSL_ENSURE( pStg.get(), "Where is my Storage?" ); rRef = pStg->OpenSotStream( "WordDocument", StreamMode::READ | StreamMode::SHARE_DENYALL); - - if( rRef.is() ) - { - if( ERRCODE_NONE == rRef->GetError() ) - { - sal_uInt16 nOld = rRef->GetBufferSize(); - rRef->SetBufferSize( rBuffSize ); - rBuffSize = nOld; - nRet = ERRCODE_NONE; - } - else - nRet = rRef->GetError(); - } + if (rRef.is()) + nRet = rRef->GetError(); return nRet; } ErrCode WW8Reader::Read(SwDoc &rDoc, const OUString& rBaseURL, SwPaM &rPaM, const OUString & /* FileName */) { - sal_uInt16 nOldBuffSize = 32768; bool bNew = !bInsertMode; // New Doc (no inserting) tools::SvRef<SotStorageStream> refStrm; // So that no one else can steal the Stream @@ -6329,7 +6317,7 @@ ErrCode WW8Reader::Read(SwDoc &rDoc, const OUString& rBaseURL, SwPaM &rPaM, cons if( pStg.is() ) { - nRet = OpenMainStream( refStrm, nOldBuffSize ); + nRet = OpenMainStream(refStrm); pIn = refStrm.get(); } else @@ -6363,7 +6351,6 @@ ErrCode WW8Reader::Read(SwDoc &rDoc, const OUString& rBaseURL, SwPaM &rPaM, cons if( refStrm.is() ) { - refStrm->SetBufferSize( nOldBuffSize ); refStrm.clear(); } else @@ -6391,9 +6378,8 @@ bool WW8Reader::ReadGlossaries(SwTextBlocks& rBlocks, bool bSaveRelFiles) const WW8Reader *pThis = const_cast<WW8Reader *>(this); - sal_uInt16 nOldBuffSize = 32768; tools::SvRef<SotStorageStream> refStrm; - if (!pThis->OpenMainStream(refStrm, nOldBuffSize)) + if (!pThis->OpenMainStream(refStrm)) { WW8Glossary aGloss( refStrm, 8, pStg.get() ); bRet = aGloss.Load( rBlocks, bSaveRelFiles ); diff --git a/sw/source/filter/ww8/ww8par.hxx b/sw/source/filter/ww8/ww8par.hxx index ed2983f7d221..78eaac1809b2 100644 --- a/sw/source/filter/ww8/ww8par.hxx +++ b/sw/source/filter/ww8/ww8par.hxx @@ -131,7 +131,7 @@ struct WW8LFOInfo; class WW8Reader : public StgReader { virtual ErrCode Read(SwDoc &, const OUString& rBaseURL, SwPaM &, const OUString &) override; - ErrCode OpenMainStream( tools::SvRef<SotStorageStream>& rRef, sal_uInt16& rBuffSize ); + ErrCode OpenMainStream(tools::SvRef<SotStorageStream>& rRef); public: virtual int GetReaderType() override; |