diff options
author | Michael Stahl <mst@openoffice.org> | 2010-04-28 10:55:22 +0200 |
---|---|---|
committer | Michael Stahl <mst@openoffice.org> | 2010-04-28 10:55:22 +0200 |
commit | 29e00d08352b602be0425b9c14385ec38a835b6d (patch) | |
tree | 085d7cc8dc54d283ed3228f914d9e031f5c64fb5 /sw | |
parent | 5008d10d04f62af7ab4f2980062ee2bed71d6ef8 (diff) |
sw33bf03: #i110454#: fix warning by moving member to Impl struct
Diffstat (limited to 'sw')
-rw-r--r-- | sw/inc/shellio.hxx | 8 | ||||
-rw-r--r-- | sw/source/filter/writer/writer.cxx | 17 |
2 files changed, 10 insertions, 15 deletions
diff --git a/sw/inc/shellio.hxx b/sw/inc/shellio.hxx index 931e6d117ead..28dcdf26a352 100644 --- a/sw/inc/shellio.hxx +++ b/sw/inc/shellio.hxx @@ -436,8 +436,6 @@ class SW_DLLPUBLIC Writer : public SvRefBase SwAsciiOptions aAscOpts; String sBaseURL; - SvStream * m_pStream; - void _AddFontItem( SfxItemPool& rPool, const SvxFontItem& rFont ); void _AddFontItems( SfxItemPool& rPool, USHORT nWhichId ); @@ -535,12 +533,8 @@ public: inline SvStream& OutLong( long nVal ) { return OutLong( Strm(), nVal ); } inline SvStream& OutULong( ULONG nVal ) { return OutULong( Strm(), nVal ); } - void SetStream(SvStream *const pStream) { m_pStream = pStream; } -#ifndef DBG_UTIL - SvStream& Strm() { return *m_pStream; } -#else + void SetStream(SvStream *const pStream); SvStream& Strm(); -#endif void SetOrganizerMode( BOOL bSet ) { bOrganizerMode = bSet; } }; diff --git a/sw/source/filter/writer/writer.cxx b/sw/source/filter/writer/writer.cxx index bcd61fda6af0..bde2e253d947 100644 --- a/sw/source/filter/writer/writer.cxx +++ b/sw/source/filter/writer/writer.cxx @@ -58,6 +58,8 @@ DECLARE_TABLE( SwBookmarkNodeTable, SvPtrarr* ) struct Writer_Impl { + SvStream * m_pStream; + SvStringsSortDtor *pSrcArr, *pDestArr; SvPtrarr* pFontRemoveLst, *pBkmkArr; SwBookmarkNodeTable* pBkmkNodePos; @@ -70,7 +72,8 @@ struct Writer_Impl }; Writer_Impl::Writer_Impl( const SwDoc& /*rDoc*/ ) - : pSrcArr( 0 ), pDestArr( 0 ), pFontRemoveLst( 0 ), pBkmkNodePos( 0 ) + : m_pStream(0) + , pSrcArr( 0 ), pDestArr( 0 ), pFontRemoveLst( 0 ), pBkmkNodePos( 0 ) { } @@ -142,7 +145,6 @@ void Writer_Impl::InsertBkmk(const ::sw::mark::IMark& rBkmk) Writer::Writer() : pImpl(0) - , m_pStream(0) , pOrigPam(0), pOrigFileName(0), pDoc(0), pCurPam(0) { bWriteAll = bShowProgress = bUCS2_WithStartChar = true; @@ -179,7 +181,6 @@ void Writer::ResetWriter() pCurPam = 0; pOrigFileName = 0; pDoc = 0; - m_pStream = 0; bShowProgress = bUCS2_WithStartChar = TRUE; bASCII_NoLastLineEnd = bASCII_ParaAsBlanc = bASCII_ParaAsCR = @@ -248,13 +249,13 @@ SwPaM* Writer::NewSwPaM( SwDoc & rDoc, ULONG nStartIdx, ULONG nEndIdx, ///////////////////////////////////////////////////////////////////////////// // Stream-spezifisches -#ifdef DBG_UTIL SvStream& Writer::Strm() { - ASSERT( m_pStream, "Oh-oh. Writer with no Stream!" ); - return *m_pStream; + ASSERT( pImpl->m_pStream, "Oh-oh. Writer with no Stream!" ); + return *pImpl->m_pStream; } -#endif + +void Writer::SetStream(SvStream *const pStream) { pImpl->m_pStream = pStream; } SvStream& Writer::OutHex( SvStream& rStrm, ULONG nHex, BYTE nLen ) @@ -316,10 +317,10 @@ ULONG Writer::Write( SwPaM& rPaM, SvStream& rStrm, const String* pFName ) return nResult; } - m_pStream = &rStrm; pDoc = rPaM.GetDoc(); pOrigFileName = pFName; pImpl = new Writer_Impl( *pDoc ); + pImpl->m_pStream = &rStrm; // PaM kopieren, damit er veraendert werden kann pCurPam = new SwPaM( *rPaM.End(), *rPaM.Start() ); |