diff options
-rw-r--r-- | sw/inc/shellio.hxx | 4 | ||||
-rw-r--r-- | sw/source/filter/basflt/fltini.cxx | 29 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8par.cxx | 23 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8par.hxx | 1 |
4 files changed, 24 insertions, 33 deletions
diff --git a/sw/inc/shellio.hxx b/sw/inc/shellio.hxx index 1a016e05d4ae..399905623a5c 100644 --- a/sw/inc/shellio.hxx +++ b/sw/inc/shellio.hxx @@ -302,10 +302,6 @@ public: class SW_DLLPUBLIC StgReader : public Reader { String aFltName; - -protected: - ULONG OpenMainStream( SotStorageStreamRef& rRef, USHORT& rBuffSize ); - public: virtual int GetReaderType(); const String& GetFltName() { return aFltName; } diff --git a/sw/source/filter/basflt/fltini.cxx b/sw/source/filter/basflt/fltini.cxx index 9cec50bff5c3..49e993581649 100644 --- a/sw/source/filter/basflt/fltini.cxx +++ b/sw/source/filter/basflt/fltini.cxx @@ -193,35 +193,6 @@ SwRead GetReader( const String& rFltName ) } // namespace SwReaderWriter -/* */ - -ULONG StgReader::OpenMainStream( SvStorageStreamRef& rRef, USHORT& rBuffSize ) -{ - ULONG nRet = ERR_SWG_READ_ERROR; - OSL_ENSURE( pStg, "wo ist mein Storage?" ); - const SfxFilter* pFltr = SwIoSystem::GetFilterOfFormat( aFltName ); - if( pFltr ) - { - rRef = pStg->OpenSotStream( SwIoSystem::GetSubStorageName( *pFltr ), - STREAM_READ | STREAM_SHARE_DENYALL ); - - if( rRef.Is() ) - { - if( SVSTREAM_OK == rRef->GetError() ) - { - USHORT nOld = rRef->GetBufferSize(); - rRef->SetBufferSize( rBuffSize ); - rBuffSize = nOld; - nRet = 0; - } - else - nRet = rRef->GetError(); - } - } - return nRet; -} - - void Writer::SetPasswd( const String& ) {} diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index 0324bfb1d1a1..711b6ab8788d 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -5253,6 +5253,29 @@ extern "C" SAL_DLLPUBLIC_EXPORT Reader* SAL_CALL ImportDOC() return new WW8Reader(); } +ULONG WW8Reader::OpenMainStream( SvStorageStreamRef& rRef, USHORT& rBuffSize ) +{ + ULONG nRet = ERR_SWG_READ_ERROR; + OSL_ENSURE( pStg, "wo ist mein Storage?" ); + rRef = pStg->OpenSotStream( + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("WordDocument")), + STREAM_READ | STREAM_SHARE_DENYALL); + + if( rRef.Is() ) + { + if( SVSTREAM_OK == rRef->GetError() ) + { + USHORT nOld = rRef->GetBufferSize(); + rRef->SetBufferSize( rBuffSize ); + rBuffSize = nOld; + nRet = 0; + } + else + nRet = rRef->GetError(); + } + return nRet; +} + ULONG WW8Reader::Read(SwDoc &rDoc, const String& rBaseURL, SwPaM &rPam, const String & /* FileName */) { USHORT nOldBuffSize = 32768; diff --git a/sw/source/filter/ww8/ww8par.hxx b/sw/source/filter/ww8/ww8par.hxx index 553ff8796d0c..08698e63a301 100644 --- a/sw/source/filter/ww8/ww8par.hxx +++ b/sw/source/filter/ww8/ww8par.hxx @@ -148,6 +148,7 @@ SV_DECL_PTRARR_SORT_DEL(WW8OleMaps, WW8OleMap_Ptr,16,16) class WW8Reader : public StgReader { virtual ULONG Read(SwDoc &, const String& rBaseURL, SwPaM &,const String &); + ULONG OpenMainStream( SvStorageStreamRef& rRef, USHORT& rBuffSize ); public: virtual int GetReaderType(); |