diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2018-04-16 08:06:36 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2018-04-16 09:10:43 +0200 |
commit | 266e58d246e34cfcea3ccfb8dcb05fde93d04c77 (patch) | |
tree | e03d5acc3ac2df888dbfbdc550b5717a80403a2f /sw | |
parent | 5d20d3bf1f927b9eae8ea7180e919a617247ffc2 (diff) |
sw: prefix members of Writer
Change-Id: Iee39219eb9de089ded9658eb75fcf258c3bd951d
Reviewed-on: https://gerrit.libreoffice.org/52931
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to 'sw')
27 files changed, 341 insertions, 341 deletions
diff --git a/sw/inc/shellio.hxx b/sw/inc/shellio.hxx index c6f1c63dd214..f6a52d6ab4c9 100644 --- a/sw/inc/shellio.hxx +++ b/sw/inc/shellio.hxx @@ -357,8 +357,8 @@ class IDocumentStylePoolAccess; class SW_DLLPUBLIC Writer : public SvRefBase { - SwAsciiOptions aAscOpts; - OUString sBaseURL; + SwAsciiOptions m_aAsciiOptions; + OUString m_sBaseURL; void AddFontItem( SfxItemPool& rPool, const SvxFontItem& rFont ); void AddFontItems_( SfxItemPool& rPool, sal_uInt16 nWhichId ); @@ -370,7 +370,7 @@ class SW_DLLPUBLIC Writer protected: - const OUString* pOrigFileName; + const OUString* m_pOrigFileName; void ResetWriter(); bool CopyNextPam( SwPaM ** ); @@ -379,7 +379,7 @@ protected: void PutEditEngFontsInAttrPool(); virtual ErrCode WriteStream() = 0; - void SetBaseURL( const OUString& rURL ) { sBaseURL = rURL; } + void SetBaseURL( const OUString& rURL ) { m_sBaseURL = rURL; } IDocumentSettingAccess& getIDocumentSettingAccess(); const IDocumentSettingAccess& getIDocumentSettingAccess() const; @@ -388,21 +388,21 @@ protected: const IDocumentStylePoolAccess& getIDocumentStylePoolAccess() const; public: - SwDoc* pDoc; - SwPaM* pOrigPam; // Last Pam that has to be processed. - SwPaM* pCurPam; - bool bWriteAll : 1; - bool bShowProgress : 1; - bool bWriteClipboardDoc : 1; - bool bWriteOnlyFirstTable : 1; - bool bASCII_ParaAsCR : 1; - bool bASCII_ParaAsBlanc : 1; - bool bASCII_NoLastLineEnd : 1; - bool bUCS2_WithStartChar : 1; - bool bExportPargraphNumbering : 1; - - bool bBlock : 1; - bool bOrganizerMode : 1; + SwDoc* m_pDoc; + SwPaM* m_pOrigPam; // Last Pam that has to be processed. + SwPaM* m_pCurrentPam; + bool m_bWriteAll : 1; + bool m_bShowProgress : 1; + bool m_bWriteClipboardDoc : 1; + bool m_bWriteOnlyFirstTable : 1; + bool m_bASCII_ParaAsCR : 1; + bool m_bASCII_ParaAsBlank : 1; + bool m_bASCII_NoLastLineEnd : 1; + bool m_bUCS2_WithStartChar : 1; + bool m_bExportPargraphNumbering : 1; + + bool m_bBlock : 1; + bool m_bOrganizerMode : 1; Writer(); virtual ~Writer() override; @@ -416,14 +416,14 @@ public: virtual bool IsStgWriter() const; - void SetShowProgress( bool bFlag ) { bShowProgress = bFlag; } + void SetShowProgress( bool bFlag ) { m_bShowProgress = bFlag; } - const OUString* GetOrigFileName() const { return pOrigFileName; } + const OUString* GetOrigFileName() const { return m_pOrigFileName; } - const SwAsciiOptions& GetAsciiOptions() const { return aAscOpts; } - void SetAsciiOptions( const SwAsciiOptions& rOpt ) { aAscOpts = rOpt; } + const SwAsciiOptions& GetAsciiOptions() const { return m_aAsciiOptions; } + void SetAsciiOptions( const SwAsciiOptions& rOpt ) { m_aAsciiOptions = rOpt; } - const OUString& GetBaseURL() const { return sBaseURL;} + const OUString& GetBaseURL() const { return m_sBaseURL;} // Look up next bookmark position from bookmark-table. sal_Int32 FindPos_Bkmk( const SwPosition& rPos ) const; @@ -451,7 +451,7 @@ public: void SetStream(SvStream *const pStream); SvStream& Strm(); - void SetOrganizerMode( bool bSet ) { bOrganizerMode = bSet; } + void SetOrganizerMode( bool bSet ) { m_bOrganizerMode = bSet; } }; typedef tools::SvRef<Writer> WriterRef; diff --git a/sw/qa/extras/txtexport/txtexport.cxx b/sw/qa/extras/txtexport/txtexport.cxx index e7e6163a8dae..f57c927752eb 100644 --- a/sw/qa/extras/txtexport/txtexport.cxx +++ b/sw/qa/extras/txtexport/txtexport.cxx @@ -32,7 +32,7 @@ public: CPPUNIT_ASSERT(rAsciiWriter.is()); // no start char - rAsciiWriter->bUCS2_WithStartChar = false; + rAsciiWriter->m_bUCS2_WithStartChar = false; SvMemoryStream aMemoryStream; diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx index 7b78f96eacc6..339b7f5b4ef6 100644 --- a/sw/qa/extras/uiwriter/uiwriter.cxx +++ b/sw/qa/extras/uiwriter/uiwriter.cxx @@ -6153,8 +6153,8 @@ void SwUiWriterTest::testHtmlCopyImages() xWrt = new SwHTMLWriter( /*rBaseURL=*/OUString() ); CPPUNIT_ASSERT(xWrt.is()); - xWrt->bWriteClipboardDoc = true; - xWrt->bWriteOnlyFirstTable = false; + xWrt->m_bWriteClipboardDoc = true; + xWrt->m_bWriteOnlyFirstTable = false; xWrt->SetShowProgress(false); { SvFileStream aStream(maTempFile.GetURL(), StreamMode::WRITE|StreamMode::TRUNC); diff --git a/sw/source/core/edit/edglss.cxx b/sw/source/core/edit/edglss.cxx index 1969f720ffc2..1900be46994a 100644 --- a/sw/source/core/edit/edglss.cxx +++ b/sw/source/core/edit/edglss.cxx @@ -290,13 +290,13 @@ bool SwEditShell::GetSelectedText( OUString &rBuf, int nHndlParaBrk ) switch( nHndlParaBrk ) { case GETSELTXT_PARABRK_TO_BLANK: - xWrt->bASCII_ParaAsBlanc = true; - xWrt->bASCII_NoLastLineEnd = true; + xWrt->m_bASCII_ParaAsBlank = true; + xWrt->m_bASCII_NoLastLineEnd = true; break; case GETSELTXT_PARABRK_TO_ONLYCR: - xWrt->bASCII_ParaAsCR = true; - xWrt->bASCII_NoLastLineEnd = true; + xWrt->m_bASCII_ParaAsCR = true; + xWrt->m_bASCII_NoLastLineEnd = true; break; } @@ -304,7 +304,7 @@ bool SwEditShell::GetSelectedText( OUString &rBuf, int nHndlParaBrk ) SwAsciiOptions aAsciiOpt( xWrt->GetAsciiOptions() ); aAsciiOpt.SetCharSet( RTL_TEXTENCODING_UCS2 ); xWrt->SetAsciiOptions( aAsciiOpt ); - xWrt->bUCS2_WithStartChar = false; + xWrt->m_bUCS2_WithStartChar = false; if ( ! aWriter.Write(xWrt).IsError() ) { diff --git a/sw/source/core/swg/SwXMLTextBlocks.cxx b/sw/source/core/swg/SwXMLTextBlocks.cxx index c6d219d6fc95..0ce9064e5deb 100644 --- a/sw/source/core/swg/SwXMLTextBlocks.cxx +++ b/sw/source/core/swg/SwXMLTextBlocks.cxx @@ -320,9 +320,9 @@ ErrCode SwXMLTextBlocks::PutBlock() ::GetXMLWriter ( OUString(), GetBaseURL(), xWrt); SwWriter aWriter (xRoot, *m_xDoc ); - xWrt->bBlock = true; + xWrt->m_bBlock = true; nRes = aWriter.Write ( xWrt ); - xWrt->bBlock = false; + xWrt->m_bBlock = false; // Save OLE objects if there are some SwDocShell *pDocSh = m_xDoc->GetDocShell(); diff --git a/sw/source/core/unocore/unoobj.cxx b/sw/source/core/unocore/unoobj.cxx index 6c6d2c35f846..5505597bab0d 100644 --- a/sw/source/core/unocore/unoobj.cxx +++ b/sw/source/core/unocore/unoobj.cxx @@ -180,15 +180,15 @@ void SwUnoCursorHelper::GetTextFromPam(SwPaM & rPam, OUString & rBuffer) return; SwWriter aWriter( aStream, rPam ); - xWrt->bASCII_NoLastLineEnd = true; - xWrt->bExportPargraphNumbering = false; + xWrt->m_bASCII_NoLastLineEnd = true; + xWrt->m_bExportPargraphNumbering = false; SwAsciiOptions aOpt = xWrt->GetAsciiOptions(); aOpt.SetCharSet( RTL_TEXTENCODING_UNICODE ); xWrt->SetAsciiOptions( aOpt ); - xWrt->bUCS2_WithStartChar = false; + xWrt->m_bUCS2_WithStartChar = false; // #i68522# - const bool bOldShowProgress = xWrt->bShowProgress; - xWrt->bShowProgress = false; + const bool bOldShowProgress = xWrt->m_bShowProgress; + xWrt->m_bShowProgress = false; if( ! aWriter.Write( xWrt ).IsError() ) { @@ -205,7 +205,7 @@ void SwUnoCursorHelper::GetTextFromPam(SwPaM & rPam, OUString & rBuffer) rBuffer = OUString(pStr, SAL_NO_ACQUIRE); } } - xWrt->bShowProgress = bOldShowProgress; + xWrt->m_bShowProgress = bOldShowProgress; } diff --git a/sw/source/filter/ascii/ascatr.cxx b/sw/source/filter/ascii/ascatr.cxx index f0b2c1e7dac6..c0e6eb1c2c62 100644 --- a/sw/source/filter/ascii/ascatr.cxx +++ b/sw/source/filter/ascii/ascatr.cxx @@ -148,10 +148,10 @@ bool SwASC_AttrIter::OutAttr( sal_Int32 nSwPos ) if( !rFootnote.GetNumStr().isEmpty() ) sOut = rFootnote.GetNumStr(); else if( rFootnote.IsEndNote() ) - sOut = rWrt.pDoc->GetEndNoteInfo().aFormat. + sOut = rWrt.m_pDoc->GetEndNoteInfo().aFormat. GetNumStr( rFootnote.GetNumber() ); else - sOut = rWrt.pDoc->GetFootnoteInfo().aFormat. + sOut = rWrt.m_pDoc->GetFootnoteInfo().aFormat. GetNumStr( rFootnote.GetNumber() ); } break; @@ -172,19 +172,19 @@ static Writer& OutASC_SwTextNode( Writer& rWrt, SwContentNode& rNode ) { const SwTextNode& rNd = static_cast<SwTextNode&>(rNode); - sal_Int32 nStrPos = rWrt.pCurPam->GetPoint()->nContent.GetIndex(); + sal_Int32 nStrPos = rWrt.m_pCurrentPam->GetPoint()->nContent.GetIndex(); const sal_Int32 nNodeEnd = rNd.Len(); sal_Int32 nEnd = nNodeEnd; - bool bLastNd = rWrt.pCurPam->GetPoint()->nNode == rWrt.pCurPam->GetMark()->nNode; + bool bLastNd = rWrt.m_pCurrentPam->GetPoint()->nNode == rWrt.m_pCurrentPam->GetMark()->nNode; if( bLastNd ) - nEnd = rWrt.pCurPam->GetMark()->nContent.GetIndex(); + nEnd = rWrt.m_pCurrentPam->GetMark()->nContent.GetIndex(); - bool bIsOneParagraph = rWrt.pOrigPam->Start()->nNode == rWrt.pOrigPam->End()->nNode; + bool bIsOneParagraph = rWrt.m_pOrigPam->Start()->nNode == rWrt.m_pOrigPam->End()->nNode; SwASC_AttrIter aAttrIter( static_cast<SwASCWriter&>(rWrt), rNd, nStrPos ); const SwNumRule* pNumRule = rNd.GetNumRule(); - if (pNumRule && !nStrPos && rWrt.bExportPargraphNumbering && !bIsOneParagraph) + if (pNumRule && !nStrPos && rWrt.m_bExportPargraphNumbering && !bIsOneParagraph) { bool bIsOutlineNumRule = pNumRule == rNd.GetDoc()->GetOutlineNumRule(); @@ -213,7 +213,7 @@ static Writer& OutASC_SwTextNode( Writer& rWrt, SwContentNode& rNode ) } OUString aStr( rNd.GetText() ); - if( rWrt.bASCII_ParaAsBlanc ) + if( rWrt.m_bASCII_ParaAsBlank ) aStr = aStr.replace(0x0A, ' '); const bool bExportSoftHyphens = RTL_TEXTENCODING_UCS2 == rWrt.GetAsciiOptions().GetCharSet() || @@ -251,7 +251,7 @@ static Writer& OutASC_SwTextNode( Writer& rWrt, SwContentNode& rNode ) } if( !bLastNd || - ( ( !rWrt.bWriteClipboardDoc && !rWrt.bASCII_NoLastLineEnd ) + ( ( !rWrt.m_bWriteClipboardDoc && !rWrt.m_bASCII_NoLastLineEnd ) && !nStrPos && nEnd == nNodeEnd ) ) rWrt.Strm().WriteUnicodeOrByteText( static_cast<SwASCWriter&>(rWrt).GetLineEnd()); diff --git a/sw/source/filter/ascii/wrtasc.cxx b/sw/source/filter/ascii/wrtasc.cxx index 96b617426483..d17027aab832 100644 --- a/sw/source/filter/ascii/wrtasc.cxx +++ b/sw/source/filter/ascii/wrtasc.cxx @@ -85,9 +85,9 @@ SwASCWriter::~SwASCWriter() {} ErrCode SwASCWriter::WriteStream() { - if( bASCII_ParaAsCR ) // If predefined + if( m_bASCII_ParaAsCR ) // If predefined m_sLineEnd = "\015"; - else if( bASCII_ParaAsBlanc ) + else if( m_bASCII_ParaAsBlank ) m_sLineEnd = " "; else switch( GetAsciiOptions().GetParaFlags() ) @@ -97,14 +97,14 @@ ErrCode SwASCWriter::WriteStream() case LINEEND_CRLF: m_sLineEnd = "\015\012"; break; } - long nMaxNode = pDoc->GetNodes().Count(); + long nMaxNode = m_pDoc->GetNodes().Count(); - if( bShowProgress ) - ::StartProgress( STR_STATSTR_W4WWRITE, 0, nMaxNode, pDoc->GetDocShell() ); + if( m_bShowProgress ) + ::StartProgress( STR_STATSTR_W4WWRITE, 0, nMaxNode, m_pDoc->GetDocShell() ); - SwPaM* pPam = pOrigPam; + SwPaM* pPam = m_pOrigPam; - bool bWriteSttTag = bUCS2_WithStartChar && + bool bWriteSttTag = m_bUCS2_WithStartChar && (RTL_TEXTENCODING_UCS2 == GetAsciiOptions().GetCharSet() || RTL_TEXTENCODING_UTF8 == GetAsciiOptions().GetCharSet()); @@ -114,36 +114,36 @@ ErrCode SwASCWriter::WriteStream() // Output all areas of the pam into the ASC file do { bool bTstFly = true; - while( pCurPam->GetPoint()->nNode.GetIndex() < pCurPam->GetMark()->nNode.GetIndex() || - (pCurPam->GetPoint()->nNode.GetIndex() == pCurPam->GetMark()->nNode.GetIndex() && - pCurPam->GetPoint()->nContent.GetIndex() <= pCurPam->GetMark()->nContent.GetIndex()) ) + while( m_pCurrentPam->GetPoint()->nNode.GetIndex() < m_pCurrentPam->GetMark()->nNode.GetIndex() || + (m_pCurrentPam->GetPoint()->nNode.GetIndex() == m_pCurrentPam->GetMark()->nNode.GetIndex() && + m_pCurrentPam->GetPoint()->nContent.GetIndex() <= m_pCurrentPam->GetMark()->nContent.GetIndex()) ) { - SwTextNode* pNd = pCurPam->GetPoint()->nNode.GetNode().GetTextNode(); + SwTextNode* pNd = m_pCurrentPam->GetPoint()->nNode.GetNode().GetTextNode(); if( pNd ) { // Should we have frames only? // That's possible, if we put a frame selection into the clipboard - if( bTstFly && bWriteAll && + if( bTstFly && m_bWriteAll && pNd->GetText().isEmpty() && // Frame exists - pDoc->GetSpzFrameFormats()->size() && + m_pDoc->GetSpzFrameFormats()->size() && // Only one node in the array - pDoc->GetNodes().GetEndOfExtras().GetIndex() + 3 == - pDoc->GetNodes().GetEndOfContent().GetIndex() && + m_pDoc->GetNodes().GetEndOfExtras().GetIndex() + 3 == + m_pDoc->GetNodes().GetEndOfContent().GetIndex() && // And exactly this one is selected - pDoc->GetNodes().GetEndOfContent().GetIndex() - 1 == - pCurPam->GetPoint()->nNode.GetIndex() ) + m_pDoc->GetNodes().GetEndOfContent().GetIndex() - 1 == + m_pCurrentPam->GetPoint()->nNode.GetIndex() ) { // Print the frame's content. // It is always at position 0! - const SwFrameFormat* pFormat = (*pDoc->GetSpzFrameFormats())[ 0 ]; + const SwFrameFormat* pFormat = (*m_pDoc->GetSpzFrameFormats())[ 0 ]; const SwNodeIndex* pIdx = pFormat->GetContent().GetContentIdx(); if( pIdx ) { - delete pCurPam; - pCurPam = NewSwPaM( *pDoc, pIdx->GetIndex(), + delete m_pCurrentPam; + m_pCurrentPam = NewSwPaM( *m_pDoc, pIdx->GetIndex(), pIdx->GetNode().EndOfSectionIndex() ); - pCurPam->Exchange(); + m_pCurrentPam->Exchange(); continue; // reset while loop! } } @@ -174,20 +174,20 @@ ErrCode SwASCWriter::WriteStream() bTstFly = false; // Testing once is enough } - if( !pCurPam->Move( fnMoveForward, GoInNode ) ) + if( !m_pCurrentPam->Move( fnMoveForward, GoInNode ) ) break; - if( bShowProgress ) - ::SetProgressState( pCurPam->GetPoint()->nNode.GetIndex(), - pDoc->GetDocShell() ); // How far? + if( m_bShowProgress ) + ::SetProgressState( m_pCurrentPam->GetPoint()->nNode.GetIndex(), + m_pDoc->GetDocShell() ); // How far? } } while( CopyNextPam( &pPam ) ); // Until all pams are processed Strm().SetStreamCharSet( eOld ); - if( bShowProgress ) - ::EndProgress( pDoc->GetDocShell() ); + if( m_bShowProgress ) + ::EndProgress( m_pDoc->GetDocShell() ); return ERRCODE_NONE; } diff --git a/sw/source/filter/basflt/shellio.cxx b/sw/source/filter/basflt/shellio.cxx index 3e98da244e51..c0c1cea95987 100644 --- a/sw/source/filter/basflt/shellio.cxx +++ b/sw/source/filter/basflt/shellio.cxx @@ -812,7 +812,7 @@ ErrCode SwWriter::Write( WriterRef const & rxWriter, const OUString* pRealFileNa } } - rxWriter->bWriteAll = bWriteAll; + rxWriter->m_bWriteAll = bWriteAll; SwDoc* pOutDoc = xDoc.is() ? xDoc.get() : &rDoc; // If the default PageDesc has still the initial value, diff --git a/sw/source/filter/html/css1atr.cxx b/sw/source/filter/html/css1atr.cxx index b0cceca051d1..9f943e756d0e 100644 --- a/sw/source/filter/html/css1atr.cxx +++ b/sw/source/filter/html/css1atr.cxx @@ -561,30 +561,30 @@ void SwHTMLWriter::OutStyleSheet( const SwPageDesc& rPageDesc ) // the Default-TextStyle is not also exported !! // 0-Style is the Default; is never exported !! - const size_t nTextFormats = pDoc->GetTextFormatColls()->size(); + const size_t nTextFormats = m_pDoc->GetTextFormatColls()->size(); for( size_t i = 1; i < nTextFormats; ++i ) { - const SwTextFormatColl* pColl = (*pDoc->GetTextFormatColls())[i]; + const SwTextFormatColl* pColl = (*m_pDoc->GetTextFormatColls())[i]; sal_uInt16 nPoolId = pColl->GetPoolFormatId(); - if( nPoolId == RES_POOLCOLL_TEXT || pDoc->IsUsed( *pColl ) ) - OutCSS1_SwFormat( *this, *pColl, &pDoc->getIDocumentStylePoolAccess(), m_xTemplate.get() ); + if( nPoolId == RES_POOLCOLL_TEXT || m_pDoc->IsUsed( *pColl ) ) + OutCSS1_SwFormat( *this, *pColl, &m_pDoc->getIDocumentStylePoolAccess(), m_xTemplate.get() ); } // the Default-TextStyle is not also exported !! - const size_t nCharFormats = pDoc->GetCharFormats()->size(); + const size_t nCharFormats = m_pDoc->GetCharFormats()->size(); for( size_t i = 1; i < nCharFormats; ++i ) { - const SwCharFormat *pCFormat = (*pDoc->GetCharFormats())[i]; + const SwCharFormat *pCFormat = (*m_pDoc->GetCharFormats())[i]; sal_uInt16 nPoolId = pCFormat->GetPoolFormatId(); if( nPoolId == RES_POOLCHR_INET_NORMAL || nPoolId == RES_POOLCHR_INET_VISIT || - pDoc->IsUsed( *pCFormat ) ) - OutCSS1_SwFormat( *this, *pCFormat, &pDoc->getIDocumentStylePoolAccess(), m_xTemplate.get() ); + m_pDoc->IsUsed( *pCFormat ) ) + OutCSS1_SwFormat( *this, *pCFormat, &m_pDoc->getIDocumentStylePoolAccess(), m_xTemplate.get() ); } bool bHasEndNotes {false}; bool bHasFootNotes {false}; - const SwFootnoteIdxs& rIdxs = pDoc->GetFootnoteIdxs(); + const SwFootnoteIdxs& rIdxs = m_pDoc->GetFootnoteIdxs(); for( auto pIdx : rIdxs ) { if( pIdx->GetFootnote().IsEndNote() ) @@ -600,8 +600,8 @@ void SwHTMLWriter::OutStyleSheet( const SwPageDesc& rPageDesc ) break; } } - OutCSS1_SwFootnoteInfo( *this, pDoc->GetFootnoteInfo(), pDoc, bHasFootNotes, false ); - OutCSS1_SwFootnoteInfo( *this, pDoc->GetEndNoteInfo(), pDoc, bHasEndNotes, true ); + OutCSS1_SwFootnoteInfo( *this, m_pDoc->GetFootnoteInfo(), m_pDoc, bHasFootNotes, false ); + OutCSS1_SwFootnoteInfo( *this, m_pDoc->GetEndNoteInfo(), m_pDoc, bHasEndNotes, true ); if( !m_bFirstCSS1Rule ) { @@ -1393,7 +1393,7 @@ static void OutCSS1DropCapRule( OutCSS1_SwFormatDropAttrs( rHTMLWrt, rDrop ); } - SfxItemSet aScriptItemSet( rHTMLWrt.pDoc->GetAttrPool(), + SfxItemSet aScriptItemSet( rHTMLWrt.m_pDoc->GetAttrPool(), svl::Items<RES_CHRATR_FONT, RES_CHRATR_FONTSIZE, RES_CHRATR_LANGUAGE, RES_CHRATR_POSTURE, RES_CHRATR_WEIGHT, RES_CHRATR_WEIGHT, @@ -2224,10 +2224,10 @@ void SwHTMLWriter::OutCSS1_FrameFormatBackground( const SwFrameFormat& rFrameFor // The background color is normally only used in Browse-Mode. // We always use it for a HTML document, but for a text document // only if viewed in Browse-Mode. - if( pDoc->getIDocumentSettingAccess().get(DocumentSettingId::HTML_MODE) || - pDoc->getIDocumentSettingAccess().get(DocumentSettingId::BROWSE_MODE)) + if( m_pDoc->getIDocumentSettingAccess().get(DocumentSettingId::HTML_MODE) || + m_pDoc->getIDocumentSettingAccess().get(DocumentSettingId::BROWSE_MODE)) { - SwViewShell *pVSh = pDoc->getIDocumentLayoutAccess().GetCurrentViewShell(); + SwViewShell *pVSh = m_pDoc->getIDocumentLayoutAccess().GetCurrentViewShell(); if ( pVSh && COL_TRANSPARENT != pVSh->GetViewOptions()->GetRetoucheColor()) aColor = pVSh->GetViewOptions()->GetRetoucheColor(); @@ -3107,7 +3107,7 @@ static Writer& OutCSS1_SvxFormatBreak_SwFormatPDesc_SvxFormatKeep( Writer& rWrt, if( ( !rHTMLWrt.IsCSS1Source( CSS1_OUTMODE_PARA ) || !rHTMLWrt.m_bCSS1IgnoreFirstPageDesc || rHTMLWrt.m_pStartNdIdx->GetIndex() != - rHTMLWrt.pCurPam->GetPoint()->nNode.GetIndex() ) && + rHTMLWrt.m_pCurrentPam->GetPoint()->nNode.GetIndex() ) && SfxItemState::SET==rItemSet.GetItemState( RES_PAGEDESC, bDeep, &pItem )) pPDescItem = static_cast<const SwFormatPageDesc*>(pItem); diff --git a/sw/source/filter/html/htmlatr.cxx b/sw/source/filter/html/htmlatr.cxx index 779b93aa7af0..3f10864aefd9 100644 --- a/sw/source/filter/html/htmlatr.cxx +++ b/sw/source/filter/html/htmlatr.cxx @@ -441,7 +441,7 @@ void OutHTML_SwFormat( Writer& rWrt, const SwFormat& rFormat, sal_uInt8 nBulletGrfLvl = 255; // The bullet graphic we want to output // Are we in a bulleted or numbered list? - const SwTextNode* pTextNd = rWrt.pCurPam->GetNode().GetTextNode(); + const SwTextNode* pTextNd = rWrt.m_pCurrentPam->GetNode().GetTextNode(); SwHTMLNumRuleInfo aNumInfo; if( rHWrt.GetNextNumInfo() ) @@ -495,7 +495,7 @@ void OutHTML_SwFormat( Writer& rWrt, const SwFormat& rFormat, } else { - pFormatInfo = new SwHTMLFormatInfo( &rFormat, rWrt.pDoc, rHWrt.m_xTemplate.get(), + pFormatInfo = new SwHTMLFormatInfo( &rFormat, rWrt.m_pDoc, rHWrt.m_xTemplate.get(), rHWrt.m_bCfgOutStyles, rHWrt.m_eLang, rHWrt.m_nCSS1Script ); rHWrt.m_TextCollInfos.insert(std::unique_ptr<SwHTMLFormatInfo>(pFormatInfo)); @@ -578,8 +578,8 @@ void OutHTML_SwFormat( Writer& rWrt, const SwFormat& rFormat, : rFormat.GetULSpace(); if( (rHWrt.m_bOutHeader && - rWrt.pCurPam->GetPoint()->nNode.GetIndex() == - rWrt.pCurPam->GetMark()->nNode.GetIndex()) || + rWrt.m_pCurrentPam->GetPoint()->nNode.GetIndex() == + rWrt.m_pCurrentPam->GetMark()->nNode.GetIndex()) || rHWrt.m_bOutFooter ) { if( rHWrt.m_bCfgOutStyles ) @@ -624,8 +624,8 @@ void OutHTML_SwFormat( Writer& rWrt, const SwFormat& rFormat, // Consider the lower spacing of the paragraph? (never in the last // paragraph of tables) bool bUseParSpace = !rHWrt.m_bOutTable || - (rWrt.pCurPam->GetPoint()->nNode.GetIndex() != - rWrt.pCurPam->GetMark()->nNode.GetIndex()); + (rWrt.m_pCurrentPam->GetPoint()->nNode.GetIndex() != + rWrt.m_pCurrentPam->GetMark()->nNode.GetIndex()); // If styles are exported, indented paragraphs become definition lists const SvxLRSpaceItem& rLRSpace = pNodeItemSet ? pNodeItemSet->Get(RES_LR_SPACE) @@ -656,7 +656,7 @@ void OutHTML_SwFormat( Writer& rWrt, const SwFormat& rFormat, } bool bIsNextTextNode = - rWrt.pDoc->GetNodes()[rWrt.pCurPam->GetPoint()->nNode.GetIndex()+1] + rWrt.m_pDoc->GetNodes()[rWrt.m_pCurrentPam->GetPoint()->nNode.GetIndex()+1] ->IsTextNode(); if( bForceDL && bDT ) @@ -2046,7 +2046,7 @@ Writer& OutHTML_SwTextNode( Writer& rWrt, const SwContentNode& rNode ) if( nLeft || nRight ) { const SwFrameFormat& rPgFormat = - rHTMLWrt.pDoc->getIDocumentStylePoolAccess().GetPageDescFromPool + rHTMLWrt.m_pDoc->getIDocumentStylePoolAccess().GetPageDescFromPool ( RES_POOLPAGE_HTML, false )->GetMaster(); const SwFormatFrameSize& rSz = rPgFormat.GetFrameSize(); const SvxLRSpaceItem& rLR = rPgFormat.GetLRSpace(); @@ -2119,9 +2119,9 @@ Writer& OutHTML_SwTextNode( Writer& rWrt, const SwContentNode& rNode ) 40 == static_cast<const SvxFontHeightItem *>(pItem)->GetHeight() ) { // ... moreover, the 2pt font is set ... - sal_uLong nNdPos = rWrt.pCurPam->GetPoint()->nNode.GetIndex(); - const SwNode *pNextNd = rWrt.pDoc->GetNodes()[nNdPos+1]; - const SwNode *pPrevNd = rWrt.pDoc->GetNodes()[nNdPos-1]; + sal_uLong nNdPos = rWrt.m_pCurrentPam->GetPoint()->nNode.GetIndex(); + const SwNode *pNextNd = rWrt.m_pDoc->GetNodes()[nNdPos+1]; + const SwNode *pPrevNd = rWrt.m_pDoc->GetNodes()[nNdPos-1]; bool bStdColl = nPoolId == RES_POOLCOLL_STANDARD; if( ( bStdColl && (pNextNd->IsTableNode() || pNextNd->IsSectionNode()) ) || ( !bStdColl && @@ -2146,7 +2146,7 @@ Writer& OutHTML_SwTextNode( Writer& rWrt, const SwContentNode& rNode ) bool bPageBreakBehind = false; if( rHTMLWrt.m_bCfgFormFeed && !(rHTMLWrt.m_bOutTable || rHTMLWrt.m_bOutFlyFrame) && - rHTMLWrt.m_pStartNdIdx->GetIndex() != rHTMLWrt.pCurPam->GetPoint()->nNode.GetIndex() ) + rHTMLWrt.m_pStartNdIdx->GetIndex() != rHTMLWrt.m_pCurrentPam->GetPoint()->nNode.GetIndex() ) { bool bPageBreakBefore = false; const SfxPoolItem* pItem; @@ -2196,9 +2196,9 @@ Writer& OutHTML_SwTextNode( Writer& rWrt, const SwContentNode& rNode ) bFlysLeft = rHTMLWrt.OutFlyFrame( rNode.GetIndex(), 0, HtmlPosition::Before ); } - if( rHTMLWrt.pCurPam->GetPoint()->nNode == rHTMLWrt.pCurPam->GetMark()->nNode ) + if( rHTMLWrt.m_pCurrentPam->GetPoint()->nNode == rHTMLWrt.m_pCurrentPam->GetMark()->nNode ) { - nEnd = rHTMLWrt.pCurPam->GetMark()->nContent.GetIndex(); + nEnd = rHTMLWrt.m_pCurrentPam->GetMark()->nContent.GetIndex(); } // are there any hard attributes that must be written as options? @@ -2257,7 +2257,7 @@ Writer& OutHTML_SwTextNode( Writer& rWrt, const SwContentNode& rNode ) // are there any hard attributes that must be written as tags? aFullText += rStr; - HTMLEndPosLst aEndPosLst( rWrt.pDoc, rHTMLWrt.m_xTemplate.get(), + HTMLEndPosLst aEndPosLst( rWrt.m_pDoc, rHTMLWrt.m_xTemplate.get(), rHTMLWrt.m_pDfltColor, rHTMLWrt.m_bCfgOutStyles, rHTMLWrt.GetHTMLMode(), aFullText, rHTMLWrt.m_aScriptTextStyles ); @@ -2294,7 +2294,7 @@ Writer& OutHTML_SwTextNode( Writer& rWrt, const SwContentNode& rNode ) rHTMLWrt.m_bTextAttr = true; size_t nAttrPos = 0; - sal_Int32 nStrPos = rHTMLWrt.pCurPam->GetPoint()->nContent.GetIndex(); + sal_Int32 nStrPos = rHTMLWrt.m_pCurrentPam->GetPoint()->nContent.GetIndex(); const SwTextAttr * pHt = nullptr; const size_t nCntAttr = pNd->HasHints() ? pNd->GetSwpHints().Count() : 0; if( nCntAttr && nStrPos > ( pHt = pNd->GetSwpHints().Get(0) )->GetStart() ) @@ -2312,7 +2312,7 @@ Writer& OutHTML_SwTextNode( Writer& rWrt, const SwContentNode& rNode ) { const sal_Int32 nHtEnd = *pHt->End(), nHtStt = pHt->GetStart(); - if( !rHTMLWrt.bWriteAll && nHtEnd <= nStrPos ) + if( !rHTMLWrt.m_bWriteAll && nHtEnd <= nStrPos ) continue; // don't consider empty hints at the beginning - or should we ?? @@ -2320,7 +2320,7 @@ Writer& OutHTML_SwTextNode( Writer& rWrt, const SwContentNode& rNode ) continue; // add attribute to the list - if( rHTMLWrt.bWriteAll ) + if( rHTMLWrt.m_bWriteAll ) aEndPosLst.Insert( pHt->GetAttr(), nHtStt + nOffset, nHtEnd + nOffset, rHTMLWrt.m_CharFormatInfos ); @@ -2480,7 +2480,7 @@ Writer& OutHTML_SwTextNode( Writer& rWrt, const SwContentNode& rNode ) { // Placeholder for a single-point fieldmark. - SwPosition aMarkPos = *rWrt.pCurPam->GetPoint(); + SwPosition aMarkPos = *rWrt.m_pCurrentPam->GetPoint(); aMarkPos.nContent += nStrPos - aMarkPos.nContent.GetIndex(); rHTMLWrt.OutPointFieldmarks(aMarkPos); } @@ -2511,8 +2511,8 @@ Writer& OutHTML_SwTextNode( Writer& rWrt, const SwContentNode& rNode ) if( bWriteBreak ) { bool bEndOfCell = rHTMLWrt.m_bOutTable && - rWrt.pCurPam->GetPoint()->nNode.GetIndex() == - rWrt.pCurPam->GetMark()->nNode.GetIndex(); + rWrt.m_pCurrentPam->GetPoint()->nNode.GetIndex() == + rWrt.m_pCurrentPam->GetMark()->nNode.GetIndex(); if( bEndOfCell && !nEnd && rHTMLWrt.IsHTMLMode(HTMLMODE_NBSP_IN_TABLES) ) @@ -2889,7 +2889,7 @@ Writer& OutHTML_INetFormat( Writer& rWrt, const SwFormatINetFormat& rINetFormat, bool bScriptDependent = false; { - const SwCharFormat* pFormat = rWrt.pDoc->getIDocumentStylePoolAccess().GetCharFormatFromPool( + const SwCharFormat* pFormat = rWrt.m_pDoc->getIDocumentStylePoolAccess().GetCharFormatFromPool( RES_POOLCHR_INET_NORMAL ); std::unique_ptr<SwHTMLFormatInfo> pFormatInfo(new SwHTMLFormatInfo(pFormat)); auto const it = rHTMLWrt.m_CharFormatInfos.find( pFormatInfo ); @@ -2900,7 +2900,7 @@ Writer& OutHTML_INetFormat( Writer& rWrt, const SwFormatINetFormat& rINetFormat, } if( !bScriptDependent ) { - const SwCharFormat* pFormat = rWrt.pDoc->getIDocumentStylePoolAccess().GetCharFormatFromPool( + const SwCharFormat* pFormat = rWrt.m_pDoc->getIDocumentStylePoolAccess().GetCharFormatFromPool( RES_POOLCHR_INET_VISIT ); std::unique_ptr<SwHTMLFormatInfo> pFormatInfo(new SwHTMLFormatInfo(pFormat)); auto const it = rHTMLWrt.m_CharFormatInfos.find( pFormatInfo ); diff --git a/sw/source/filter/html/htmlbas.cxx b/sw/source/filter/html/htmlbas.cxx index b8aa98f72f68..f9b273d55501 100644 --- a/sw/source/filter/html/htmlbas.cxx +++ b/sw/source/filter/html/htmlbas.cxx @@ -254,7 +254,7 @@ void SwHTMLWriter::OutBasic() if( !m_bCfgStarBasic ) return; - BasicManager *pBasicMan = pDoc->GetDocShell()->GetBasicManager(); + BasicManager *pBasicMan = m_pDoc->GetDocShell()->GetBasicManager(); OSL_ENSURE( pBasicMan, "Where is the Basic-Manager?" ); // Only write DocumentBasic if( !pBasicMan || pBasicMan == SfxApplication::GetBasicManager() ) @@ -307,7 +307,7 @@ static const char* aEventNames[] = void SwHTMLWriter::OutBasicBodyEvents() { - SwDocShell *pDocSh = pDoc->GetDocShell(); + SwDocShell *pDocSh = m_pDoc->GetDocShell(); if( !pDocSh ) return; diff --git a/sw/source/filter/html/htmldrawwriter.cxx b/sw/source/filter/html/htmldrawwriter.cxx index efebccefa116..8cd1a1d4c7e5 100644 --- a/sw/source/filter/html/htmldrawwriter.cxx +++ b/sw/source/filter/html/htmldrawwriter.cxx @@ -130,7 +130,7 @@ Writer& OutHTML_DrawFrameFormatAsMarquee( Writer& rWrt, { SwHTMLWriter & rHTMLWrt = static_cast<SwHTMLWriter&>(rWrt); - OSL_ENSURE( rWrt.pDoc->getIDocumentDrawModelAccess().GetDrawModel(), + OSL_ENSURE( rWrt.m_pDoc->getIDocumentDrawModelAccess().GetDrawModel(), "There is a Draw-Obj with no Draw-Model?" ); const SdrTextObj *pTextObj = static_cast<const SdrTextObj *>(&rSdrObject); diff --git a/sw/source/filter/html/htmlfldw.cxx b/sw/source/filter/html/htmlfldw.cxx index 94f072248064..dd8bd381f762 100644 --- a/sw/source/filter/html/htmlfldw.cxx +++ b/sw/source/filter/html/htmlfldw.cxx @@ -294,7 +294,7 @@ static Writer& OutHTML_SwField( Writer& rWrt, const SwField* pField, OSL_ENSURE( nFormat, "number format is 0" ); sOut.append(HTMLOutFuncs::CreateTableDataOptionsValNum( bNumValue, dNumValue, nFormat, - *rHTMLWrt.pDoc->GetNumberFormatter(), rHTMLWrt.m_eDestEnc, + *rHTMLWrt.m_pDoc->GetNumberFormatter(), rHTMLWrt.m_eDestEnc, &rHTMLWrt.m_aNonConvertableCharacters)); } if( bFixed ) @@ -326,7 +326,7 @@ static Writer& OutHTML_SwField( Writer& rWrt, const SwField* pField, { //sequence of (start, end) property ranges we want to //query - SfxItemSet aScriptItemSet( rWrt.pDoc->GetAttrPool(), + SfxItemSet aScriptItemSet( rWrt.m_pDoc->GetAttrPool(), svl::Items<RES_CHRATR_FONT, RES_CHRATR_FONTSIZE, RES_CHRATR_POSTURE, RES_CHRATR_POSTURE, RES_CHRATR_WEIGHT, RES_CHRATR_WEIGHT, diff --git a/sw/source/filter/html/htmlflywriter.cxx b/sw/source/filter/html/htmlflywriter.cxx index 3d349bc1ddb0..cef46d80b366 100644 --- a/sw/source/filter/html/htmlflywriter.cxx +++ b/sw/source/filter/html/htmlflywriter.cxx @@ -195,7 +195,7 @@ sal_uInt16 SwHTMLWriter::GuessFrameType( const SwFrameFormat& rFrameFormat, const SwFormatContent& rFlyContent = rFrameFormat.GetContent(); sal_uLong nStt = rFlyContent.GetContentIdx()->GetIndex()+1; - const SwNode* pNd = pDoc->GetNodes()[ nStt ]; + const SwNode* pNd = m_pDoc->GetNodes()[ nStt ]; if( pNd->IsGrfNode() ) { @@ -209,7 +209,7 @@ sal_uInt16 SwHTMLWriter::GuessFrameType( const SwFrameFormat& rFrameFormat, } else { - sal_uLong nEnd = pDoc->GetNodes()[nStt-1]->EndOfSectionIndex(); + sal_uLong nEnd = m_pDoc->GetNodes()[nStt-1]->EndOfSectionIndex(); const SfxPoolItem* pItem; const SfxItemSet& rItemSet = rFrameFormat.GetAttrSet(); @@ -271,10 +271,10 @@ sal_uInt16 SwHTMLWriter::GuessFrameType( const SwFrameFormat& rFrameFormat, // empty frame eType = HTML_FRMTYPE_EMPTY; } - else if( pDoc->GetNodes()[nStt+1]->IsTableNode() ) + else if( m_pDoc->GetNodes()[nStt+1]->IsTableNode() ) { const SwTableNode *pTableNd = - pDoc->GetNodes()[nStt+1]->GetTableNode(); + m_pDoc->GetNodes()[nStt+1]->GetTableNode(); if( pTableNd->EndOfSectionIndex()+1 == nEnd ) { // table with heading @@ -293,7 +293,7 @@ void SwHTMLWriter::CollectFlyFrames() OSL_ENSURE( HTML_CFG_MAX+1 == MAX_BROWSERS, "number of browser configurations has changed" ); - SwPosFlyFrames aFlyPos(pDoc->GetAllFlyFormats(bWriteAll ? nullptr : pCurPam, true)); + SwPosFlyFrames aFlyPos(m_pDoc->GetAllFlyFormats(m_bWriteAll ? nullptr : m_pCurrentPam, true)); for(SwPosFlyFrames::const_iterator aIter(aFlyPos.begin()); aIter != aFlyPos.end(); ++aIter) { @@ -1520,20 +1520,20 @@ static Writer& OutHTML_FrameFormatTableNode( Writer& rWrt, const SwFrameFormat& const SwFormatContent& rFlyContent = rFrameFormat.GetContent(); sal_uLong nStt = rFlyContent.GetContentIdx()->GetIndex()+1; - sal_uLong nEnd = rHTMLWrt.pDoc->GetNodes()[nStt-1]->EndOfSectionIndex(); + sal_uLong nEnd = rHTMLWrt.m_pDoc->GetNodes()[nStt-1]->EndOfSectionIndex(); OUString aCaption; bool bTopCaption = false; // Not const, because GetTable won't be const sometime later - SwNode *pNd = rHTMLWrt.pDoc->GetNodes()[ nStt ]; + SwNode *pNd = rHTMLWrt.m_pDoc->GetNodes()[ nStt ]; SwTableNode *pTableNd = pNd->GetTableNode(); const SwTextNode *pTextNd = pNd->GetTextNode(); if( !pTableNd && pTextNd ) { // Table with heading bTopCaption = true; - pTableNd = rHTMLWrt.pDoc->GetNodes()[nStt+1]->GetTableNode(); + pTableNd = rHTMLWrt.m_pDoc->GetNodes()[nStt+1]->GetTableNode(); } OSL_ENSURE( pTableNd, "Frame does not contain a table" ); if( pTableNd ) @@ -1544,7 +1544,7 @@ static Writer& OutHTML_FrameFormatTableNode( Writer& rWrt, const SwFrameFormat& "Invalid frame content for a table" ); if( nTableEnd == nEnd - 2 ) - pTextNd = rHTMLWrt.pDoc->GetNodes()[nTableEnd+1]->GetTextNode(); + pTextNd = rHTMLWrt.m_pDoc->GetNodes()[nTableEnd+1]->GetTextNode(); } if( pTextNd ) aCaption = pTextNd->GetText(); @@ -1622,7 +1622,7 @@ static Writer & OutHTML_FrameFormatAsMulticol( Writer& rWrt, const SwFormatContent& rFlyContent = rFrameFormat.GetContent(); sal_uLong nStt = rFlyContent.GetContentIdx()->GetIndex(); - const SwStartNode* pSttNd = rWrt.pDoc->GetNodes()[nStt]->GetStartNode(); + const SwStartNode* pSttNd = rWrt.m_pDoc->GetNodes()[nStt]->GetStartNode(); OSL_ENSURE( pSttNd, "Where is the start node" ); { @@ -1632,7 +1632,7 @@ static Writer & OutHTML_FrameFormatAsMulticol( Writer& rWrt, pSttNd->EndOfSectionIndex(), true, &rFrameFormat ); rHTMLWrt.m_bOutFlyFrame = true; - rHTMLWrt.Out_SwDoc( rWrt.pCurPam ); + rHTMLWrt.Out_SwDoc( rWrt.m_pCurrentPam ); } rHTMLWrt.DecIndentLevel(); // indent the content of Multicol; @@ -1709,7 +1709,7 @@ static Writer& OutHTML_FrameFormatAsDivOrSpan( Writer& rWrt, // Output frame-anchored frames that are anchored to the start node rHTMLWrt.OutFlyFrame( nStt, 0, HtmlPosition::Any ); - const SwStartNode* pSttNd = rWrt.pDoc->GetNodes()[nStt]->GetStartNode(); + const SwStartNode* pSttNd = rWrt.m_pDoc->GetNodes()[nStt]->GetStartNode(); OSL_ENSURE( pSttNd, "Where is the start node" ); { @@ -1719,7 +1719,7 @@ static Writer& OutHTML_FrameFormatAsDivOrSpan( Writer& rWrt, pSttNd->EndOfSectionIndex(), true, &rFrameFormat ); rHTMLWrt.m_bOutFlyFrame = true; - rHTMLWrt.Out_SwDoc( rWrt.pCurPam ); + rHTMLWrt.Out_SwDoc( rWrt.m_pCurrentPam ); } rHTMLWrt.DecIndentLevel(); // indent the content of Multicol; @@ -1781,7 +1781,7 @@ static Writer& OutHTML_FrameFormatGrfNode( Writer& rWrt, const SwFrameFormat& rF const SwFormatContent& rFlyContent = rFrameFormat.GetContent(); sal_uLong nStt = rFlyContent.GetContentIdx()->GetIndex()+1; - SwGrfNode *pGrfNd = rHTMLWrt.pDoc->GetNodes()[ nStt ]->GetGrfNode(); + SwGrfNode *pGrfNd = rHTMLWrt.m_pDoc->GetNodes()[ nStt ]->GetGrfNode(); OSL_ENSURE( pGrfNd, "Grf node expected" ); if( !pGrfNd ) return rWrt; @@ -1932,7 +1932,7 @@ Writer& OutHTML_HeaderFooter( Writer& rWrt, const SwFrameFormat& rFrameFormat, const SwFormatContent& rFlyContent = rFrameFormat.GetContent(); sal_uLong nStt = rFlyContent.GetContentIdx()->GetIndex(); - const SwStartNode* pSttNd = rWrt.pDoc->GetNodes()[nStt]->GetStartNode(); + const SwStartNode* pSttNd = rWrt.m_pDoc->GetNodes()[nStt]->GetStartNode(); OSL_ENSURE( pSttNd, "Where is the start node" ); if( !bHeader && !aSpacer.isEmpty() ) @@ -1953,7 +1953,7 @@ Writer& OutHTML_HeaderFooter( Writer& rWrt, const SwFrameFormat& rFrameFormat, else rHTMLWrt.m_bOutFooter = true; - rHTMLWrt.Out_SwDoc( rWrt.pCurPam ); + rHTMLWrt.Out_SwDoc( rWrt.m_pCurrentPam ); } if( bHeader && !aSpacer.isEmpty() ) @@ -2030,8 +2030,8 @@ void SwHTMLWriter::AddLinkTarget( const OUString& rURL ) // Here, we need position and name. That's why we sort a // sal_uInt16 and a string array ourselves. OUString aOutline( aURL.copy( 0, nPos-1 ) ); - SwPosition aPos( *pCurPam->GetPoint() ); - if( pDoc->GotoOutline( aPos, aOutline ) ) + SwPosition aPos( *m_pCurrentPam->GetPoint() ); + if( m_pDoc->GotoOutline( aPos, aOutline ) ) { sal_uInt32 nIdx = aPos.nNode.GetIndex(); @@ -2055,12 +2055,12 @@ void SwHTMLWriter::CollectLinkTargets() const SwFormatINetFormat* pINetFormat; const SwTextINetFormat* pTextAttr; - sal_uInt32 n, nMaxItems = pDoc->GetAttrPool().GetItemCount2( RES_TXTATR_INETFMT ); + sal_uInt32 n, nMaxItems = m_pDoc->GetAttrPool().GetItemCount2( RES_TXTATR_INETFMT ); for( n = 0; n < nMaxItems; ++n ) { const SwTextNode* pTextNd; - if( nullptr != ( pINetFormat = pDoc->GetAttrPool().GetItem2( RES_TXTATR_INETFMT, n ) ) && + if( nullptr != ( pINetFormat = m_pDoc->GetAttrPool().GetItem2( RES_TXTATR_INETFMT, n ) ) && nullptr != ( pTextAttr = pINetFormat->GetTextINetFormat()) && nullptr != ( pTextNd = pTextAttr->GetpTextNode() ) && pTextNd->GetNodes().IsDocNodes() ) @@ -2070,10 +2070,10 @@ void SwHTMLWriter::CollectLinkTargets() } const SwFormatURL *pURL; - nMaxItems = pDoc->GetAttrPool().GetItemCount2( RES_URL ); + nMaxItems = m_pDoc->GetAttrPool().GetItemCount2( RES_URL ); for( n = 0; n < nMaxItems; ++n ) { - if( nullptr != (pURL = pDoc->GetAttrPool().GetItem2( + if( nullptr != (pURL = m_pDoc->GetAttrPool().GetItem2( RES_URL, n ) ) ) { AddLinkTarget( pURL->GetURL() ); diff --git a/sw/source/filter/html/htmlforw.cxx b/sw/source/filter/html/htmlforw.cxx index cb49ab3ebd3a..710846dc9f7c 100644 --- a/sw/source/filter/html/htmlforw.cxx +++ b/sw/source/filter/html/htmlforw.cxx @@ -211,7 +211,7 @@ static bool lcl_html_isHTMLControl( sal_Int16 nClassId ) bool SwHTMLWriter::HasControls() const { - sal_uInt32 nStartIdx = pCurPam->GetPoint()->nNode.GetIndex(); + sal_uInt32 nStartIdx = m_pCurrentPam->GetPoint()->nNode.GetIndex(); size_t i = 0; // Skip all controls in front of the current paragraph @@ -240,7 +240,7 @@ void SwHTMLWriter::OutForm( bool bTag_On, const SwStartNode *pStartNd ) uno::Reference< container::XIndexContainer > xNewFormComps; sal_uInt32 nStartIdx = pStartNd ? pStartNd->GetIndex() - : pCurPam->GetPoint()->nNode.GetIndex(); + : m_pCurrentPam->GetPoint()->nNode.GetIndex(); // skip controls before the interesting area size_t i = 0; @@ -269,7 +269,7 @@ void SwHTMLWriter::OutForm( bool bTag_On, const SwStartNode *pStartNd ) m_aHTMLControls[i]->nNdIdx <= nEndIdx; i++ ) { const SwStartNode *pCntrlStNd = - pDoc->GetNodes()[m_aHTMLControls[i]->nNdIdx]->StartOfSectionNode(); + m_pDoc->GetNodes()[m_aHTMLControls[i]->nNdIdx]->StartOfSectionNode(); if( xCurrentFormComps.is() ) { @@ -338,10 +338,10 @@ void SwHTMLWriter::OutHiddenForms() { // Without DrawModel there can't be controls. Then you also can't access the // document via UNO, because otherwise a DrawModel would be created. - if( !pDoc->getIDocumentDrawModelAccess().GetDrawModel() ) + if( !m_pDoc->getIDocumentDrawModelAccess().GetDrawModel() ) return; - SwDocShell *pDocSh = pDoc->GetDocShell(); + SwDocShell *pDocSh = m_pDoc->GetDocShell(); if( !pDocSh ) return; @@ -783,7 +783,7 @@ Writer& OutHTML_DrawFrameFormatAsControl( Writer& rWrt, if( !*b1 ) { Size aSz( 0, 0 ); - GetControlSize( rFormObj, aSz, rWrt.pDoc ); + GetControlSize( rFormObj, aSz, rWrt.m_pDoc ); // How many are visible ?? if( aSz.Height() ) @@ -807,7 +807,7 @@ Writer& OutHTML_DrawFrameFormatAsControl( Writer& rWrt, case form::FormComponentType::TEXTFIELD: { Size aSz( 0, 0 ); - GetControlSize( rFormObj, aSz, rWrt.pDoc ); + GetControlSize( rFormObj, aSz, rWrt.m_pDoc ); bool bMultiLine = false; OUString sMultiLine("MultiLine"); @@ -897,7 +897,7 @@ Writer& OutHTML_DrawFrameFormatAsControl( Writer& rWrt, case form::FormComponentType::FILECONTROL: { Size aSz( 0, 0 ); - GetControlSize( rFormObj, aSz, rWrt.pDoc ); + GetControlSize( rFormObj, aSz, rWrt.m_pDoc ); eType = TYPE_FILE; if( aSz.Width() ) @@ -1041,7 +1041,7 @@ Writer& OutHTML_DrawFrameFormatAsControl( Writer& rWrt, bool bEdit = TAG_TEXTAREA == eTag || TYPE_FILE == eType || TYPE_TEXT == eType; - SfxItemSet aItemSet( rHTMLWrt.pDoc->GetAttrPool(), svl::Items<RES_CHRATR_BEGIN, + SfxItemSet aItemSet( rHTMLWrt.m_pDoc->GetAttrPool(), svl::Items<RES_CHRATR_BEGIN, RES_CHRATR_END>{} ); if( xPropSetInfo->hasPropertyByName( "BackgroundColor" ) ) { @@ -1336,7 +1336,7 @@ void SwHTMLWriter::GetControls() } // and now the ones in a character-bound frame - const SwFrameFormats* pSpzFrameFormats = pDoc->GetSpzFrameFormats(); + const SwFrameFormats* pSpzFrameFormats = m_pDoc->GetSpzFrameFormats(); for( size_t i=0; i<pSpzFrameFormats->size(); i++ ) { const SwFrameFormat *pFrameFormat = (*pSpzFrameFormats)[i]; diff --git a/sw/source/filter/html/htmlftn.cxx b/sw/source/filter/html/htmlftn.cxx index d52b69493844..a34d13e2ea54 100644 --- a/sw/source/filter/html/htmlftn.cxx +++ b/sw/source/filter/html/htmlftn.cxx @@ -295,7 +295,7 @@ Writer& OutHTML_SwFormatFootnote( Writer& rWrt, const SfxPoolItem& rHt ) rWrt.Strm().WriteCharPtr( sOut.makeStringAndClear().getStr() ); HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), rHTMLWrt.GetNamespace() + OOO_STRING_SVTOOLS_HTML_superscript ); - HTMLOutFuncs::Out_String( rWrt.Strm(), rFormatFootnote.GetViewNumStr(*rWrt.pDoc), + HTMLOutFuncs::Out_String( rWrt.Strm(), rFormatFootnote.GetViewNumStr(*rWrt.m_pDoc), rHTMLWrt.m_eDestEnc, &rHTMLWrt.m_aNonConvertableCharacters ); HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), rHTMLWrt.GetNamespace() + OOO_STRING_SVTOOLS_HTML_superscript, false ); HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), rHTMLWrt.GetNamespace() + OOO_STRING_SVTOOLS_HTML_anchor, false ); @@ -352,7 +352,7 @@ void SwHTMLWriter::OutFootEndNotes() { HTMLSaveData aSaveData( *this, pSttNdIdx->GetIndex()+1, pSttNdIdx->GetNode().EndOfSectionIndex(), false ); - Out_SwDoc( pCurPam ); + Out_SwDoc( m_pCurrentPam ); } DecIndentLevel(); // indent content of <DIV> @@ -390,13 +390,13 @@ OUString SwHTMLWriter::GetFootEndNoteSym( const SwFormatFootnote& rFormatFootnot { const SwEndNoteInfo * pInfo = nullptr; if( rFormatFootnote.GetNumStr().isEmpty() ) - pInfo = rFormatFootnote.IsEndNote() ? &pDoc->GetEndNoteInfo() - : &pDoc->GetFootnoteInfo(); + pInfo = rFormatFootnote.IsEndNote() ? &m_pDoc->GetEndNoteInfo() + : &m_pDoc->GetFootnoteInfo(); OUString sRet; if( pInfo ) sRet = pInfo->GetPrefix(); - sRet += rFormatFootnote.GetViewNumStr( *pDoc ); + sRet += rFormatFootnote.GetViewNumStr( *m_pDoc ); if( pInfo ) sRet += pInfo->GetSuffix(); @@ -415,17 +415,17 @@ void SwHTMLWriter::OutFootEndNoteSym( const SwFormatFootnote& rFormatFootnote, sClass = OOO_STRING_SVTOOLS_HTML_sdendnote_sym; sFootnoteName = OOO_STRING_SVTOOLS_HTML_sdendnote; sFootnoteName += OUString::number(static_cast<sal_Int32>(m_nEndNote)); - pInfo = &pDoc->GetEndNoteInfo(); + pInfo = &m_pDoc->GetEndNoteInfo(); } else { sClass = OOO_STRING_SVTOOLS_HTML_sdfootnote_sym; sFootnoteName = OOO_STRING_SVTOOLS_HTML_sdfootnote; sFootnoteName += OUString::number(static_cast<sal_Int32>(m_nFootNote)); - pInfo = &pDoc->GetFootnoteInfo(); + pInfo = &m_pDoc->GetFootnoteInfo(); } - const SwCharFormat *pSymCharFormat = pInfo->GetCharFormat( *pDoc ); + const SwCharFormat *pSymCharFormat = pInfo->GetCharFormat( *m_pDoc ); if( pSymCharFormat && 0 != m_aScriptTextStyles.count( pSymCharFormat->GetName() ) ) { switch( nScript ) @@ -533,7 +533,7 @@ void SwHTMLWriter::OutFootEndNoteInfo() // Beginning { - const SwFootnoteInfo& rInfo = pDoc->GetFootnoteInfo(); + const SwFootnoteInfo& rInfo = m_pDoc->GetFootnoteInfo(); OUString aParts[8]; int nParts = lcl_html_fillEndNoteInfo( rInfo, aParts, false ); if( rInfo.eNum != FTNNUM_DOC ) @@ -562,7 +562,7 @@ void SwHTMLWriter::OutFootEndNoteInfo() } { - const SwEndNoteInfo& rInfo = pDoc->GetEndNoteInfo(); + const SwEndNoteInfo& rInfo = m_pDoc->GetEndNoteInfo(); OUString aParts[4]; const int nParts = lcl_html_fillEndNoteInfo( rInfo, aParts, true ); if( nParts > 0 ) diff --git a/sw/source/filter/html/htmlnumwriter.cxx b/sw/source/filter/html/htmlnumwriter.cxx index 7d5c23b95379..dc21f1cbb0f2 100644 --- a/sw/source/filter/html/htmlnumwriter.cxx +++ b/sw/source/filter/html/htmlnumwriter.cxx @@ -48,12 +48,12 @@ void SwHTMLWriter::FillNextNumInfo() { m_pNextNumRuleInfo = nullptr; - sal_uLong nPos = pCurPam->GetPoint()->nNode.GetIndex() + 1; + sal_uLong nPos = m_pCurrentPam->GetPoint()->nNode.GetIndex() + 1; bool bTable = false; do { - const SwNode* pNd = pDoc->GetNodes()[nPos]; + const SwNode* pNd = m_pDoc->GetNodes()[nPos]; if( pNd->IsTextNode() ) { m_pNextNumRuleInfo = new SwHTMLNumRuleInfo( *pNd->GetTextNode() ); @@ -119,10 +119,10 @@ Writer& OutHTML_NumBulListStart( SwHTMLWriter& rWrt, if( rInfo.GetDepth() > 1 ) { sal_uLong nPos = - rWrt.pCurPam->GetPoint()->nNode.GetIndex() + 1; + rWrt.m_pCurrentPam->GetPoint()->nNode.GetIndex() + 1; do { - const SwNode* pNd = rWrt.pDoc->GetNodes()[nPos]; + const SwNode* pNd = rWrt.m_pDoc->GetNodes()[nPos]; if( pNd->IsTextNode() ) { const SwTextNode *pTextNd = pNd->GetTextNode(); @@ -252,9 +252,9 @@ Writer& OutHTML_NumBulListStart( SwHTMLWriter& rWrt, sal_uInt16 nStartVal = rNumFormat.GetStart(); if( bStartValue && 1 == nStartVal && i == rInfo.GetDepth()-1 ) { - if ( rWrt.pCurPam->GetNode().GetTextNode()->GetNum() ) + if ( rWrt.m_pCurrentPam->GetNode().GetTextNode()->GetNum() ) { - nStartVal = static_cast< sal_uInt16 >( rWrt.pCurPam->GetNode() + nStartVal = static_cast< sal_uInt16 >( rWrt.m_pCurrentPam->GetNode() .GetTextNode()->GetNumberVector()[i] ); } else diff --git a/sw/source/filter/html/htmlplug.cxx b/sw/source/filter/html/htmlplug.cxx index aa9ef4557bf0..570f9ac7a24a 100644 --- a/sw/source/filter/html/htmlplug.cxx +++ b/sw/source/filter/html/htmlplug.cxx @@ -1101,7 +1101,7 @@ Writer& OutHTML_FrameFormatOLENode( Writer& rWrt, const SwFrameFormat& rFrameFor const SwFormatContent& rFlyContent = rFrameFormat.GetContent(); sal_uLong nStt = rFlyContent.GetContentIdx()->GetIndex()+1; - SwOLENode *pOLENd = rHTMLWrt.pDoc->GetNodes()[ nStt ]->GetOLENode(); + SwOLENode *pOLENd = rHTMLWrt.m_pDoc->GetNodes()[ nStt ]->GetOLENode(); OSL_ENSURE( pOLENd, "OLE-Node expected" ); if( !pOLENd ) @@ -1369,7 +1369,7 @@ Writer& OutHTML_FrameFormatOLENodeGrf( Writer& rWrt, const SwFrameFormat& rFrame const SwFormatContent& rFlyContent = rFrameFormat.GetContent(); sal_uLong nStt = rFlyContent.GetContentIdx()->GetIndex()+1; - SwOLENode *pOLENd = rHTMLWrt.pDoc->GetNodes()[ nStt ]->GetOLENode(); + SwOLENode *pOLENd = rHTMLWrt.m_pDoc->GetNodes()[ nStt ]->GetOLENode(); OSL_ENSURE( pOLENd, "OLE-Node expected" ); if( !pOLENd ) @@ -1379,7 +1379,7 @@ Writer& OutHTML_FrameFormatOLENodeGrf( Writer& rWrt, const SwFrameFormat& rFrame { // If we skip images, embedded objects would be completely lost. // Instead, try to use the HTML export of the embedded object. - uno::Reference<text::XTextContent> xTextContent = SwXTextEmbeddedObject::CreateXTextEmbeddedObject(*rHTMLWrt.pDoc, const_cast<SwFrameFormat*>(&rFrameFormat)); + uno::Reference<text::XTextContent> xTextContent = SwXTextEmbeddedObject::CreateXTextEmbeddedObject(*rHTMLWrt.m_pDoc, const_cast<SwFrameFormat*>(&rFrameFormat)); uno::Reference<document::XEmbeddedObjectSupplier2> xEmbeddedObjectSupplier(xTextContent, uno::UNO_QUERY); uno::Reference<frame::XStorable> xStorable(xEmbeddedObjectSupplier->getEmbeddedObject(), uno::UNO_QUERY); SAL_WARN_IF(!xStorable.is(), "sw.html", "OutHTML_FrameFormatOLENodeGrf: no embedded object"); @@ -1424,7 +1424,7 @@ Writer& OutHTML_FrameFormatOLENodeGrf( Writer& rWrt, const SwFrameFormat& rFrame Graphic aGraphic( *pOLENd->GetGraphic() ); - SwDocShell* pDocSh = rHTMLWrt.pDoc->GetDocShell(); + SwDocShell* pDocSh = rHTMLWrt.m_pDoc->GetDocShell(); bool bObjectOpened = false; if (rHTMLWrt.mbXHTML && pDocSh) { diff --git a/sw/source/filter/html/htmltabw.cxx b/sw/source/filter/html/htmltabw.cxx index c47680ad763e..0b73f5687afe 100644 --- a/sw/source/filter/html/htmltabw.cxx +++ b/sw/source/filter/html/htmltabw.cxx @@ -270,7 +270,7 @@ void SwHTMLWrtTable::OutTableCell( SwHTMLWriter& rWrt, // determine the type of cell (TD/TH) SwNode* pNd; - while( !( pNd = rWrt.pDoc->GetNodes()[nNdPos])->IsEndNode() ) + while( !( pNd = rWrt.m_pDoc->GetNodes()[nNdPos])->IsEndNode() ) { if( pNd->IsTextNode() ) { @@ -442,7 +442,7 @@ void SwHTMLWrtTable::OutTableCell( SwHTMLWriter& rWrt, if( bNumFormat || bValue ) { sOut.append(HTMLOutFuncs::CreateTableDataOptionsValNum(bValue, nValue, - nNumFormat, *rWrt.pDoc->GetNumberFormatter(), rWrt.m_eDestEnc, + nNumFormat, *rWrt.m_pDoc->GetNumberFormatter(), rWrt.m_eDestEnc, &rWrt.m_aNonConvertableCharacters)); } sOut.append('>'); @@ -455,7 +455,7 @@ void SwHTMLWrtTable::OutTableCell( SwHTMLWriter& rWrt, { HTMLSaveData aSaveData( rWrt, pSttNd->GetIndex()+1, pSttNd->EndOfSectionIndex() ); - rWrt.Out_SwDoc( rWrt.pCurPam ); + rWrt.Out_SwDoc( rWrt.m_pCurrentPam ); } else { @@ -1079,7 +1079,7 @@ Writer& OutHTML_SwTableNode( Writer& rWrt, SwTableNode & rNode, #ifdef DBG_UTIL { - SwViewShell *pSh = rWrt.pDoc->getIDocumentLayoutAccess().GetCurrentViewShell(); + SwViewShell *pSh = rWrt.m_pDoc->getIDocumentLayoutAccess().GetCurrentViewShell(); if ( pSh && pSh->GetViewOptions()->IsTest1() ) pLayout = nullptr; } @@ -1117,7 +1117,7 @@ Writer& OutHTML_SwTableNode( Writer& rWrt, SwTableNode & rNode, } // move Pam behind the table - rHTMLWrt.pCurPam->GetPoint()->nNode = *rNode.EndOfSectionNode(); + rHTMLWrt.m_pCurrentPam->GetPoint()->nNode = *rNode.EndOfSectionNode(); if( bPreserveForm ) { diff --git a/sw/source/filter/html/wrthtml.cxx b/sw/source/filter/html/wrthtml.cxx index 0d993fcde3d6..afc7e02f89fe 100644 --- a/sw/source/filter/html/wrthtml.cxx +++ b/sw/source/filter/html/wrthtml.cxx @@ -282,9 +282,9 @@ ErrCode SwHTMLWriter::WriteStream() if( IsHTMLMode(HTMLMODE_SOME_STYLES | HTMLMODE_FULL_STYLES) ) m_nHTMLMode |= HTMLMODE_PRINT_EXT; - m_eCSS1Unit = SW_MOD()->GetMetric( pDoc->getIDocumentSettingAccess().get(DocumentSettingId::HTML_MODE) ); + m_eCSS1Unit = SW_MOD()->GetMetric( m_pDoc->getIDocumentSettingAccess().get(DocumentSettingId::HTML_MODE) ); - bool bWriteUTF8 = bWriteClipboardDoc; + bool bWriteUTF8 = m_bWriteClipboardDoc; m_eDestEnc = bWriteUTF8 ? RTL_TEXTENCODING_UTF8 : rHtmlOptions.GetTextEncoding(); const sal_Char *pCharSet = rtl_getBestMimeCharsetFromTextEncoding( m_eDestEnc ); m_eDestEnc = rtl_getTextEncodingFromMimeCharset( pCharSet ); @@ -305,7 +305,7 @@ ErrCode SwHTMLWriter::WriteStream() SwCharFormats::size_type nOldCharFormatCnt = 0; OSL_ENSURE( !m_xTemplate.is(), "Where is the HTML template coming from?" ); - m_xTemplate = static_cast<HTMLReader*>(ReadHTML)->GetTemplateDoc(*pDoc); + m_xTemplate = static_cast<HTMLReader*>(ReadHTML)->GetTemplateDoc(*m_pDoc); if( m_xTemplate.is() ) { bOldHTMLMode = m_xTemplate->getIDocumentSettingAccess().get(DocumentSettingId::HTML_MODE); @@ -315,9 +315,9 @@ ErrCode SwHTMLWriter::WriteStream() nOldCharFormatCnt = m_xTemplate->GetCharFormats()->size(); } - if( bShowProgress ) - ::StartProgress( STR_STATSTR_W4WWRITE, 0, pDoc->GetNodes().Count(), - pDoc->GetDocShell()); + if( m_bShowProgress ) + ::StartProgress( STR_STATSTR_W4WWRITE, 0, m_pDoc->GetNodes().Count(), + m_pDoc->GetDocShell()); m_pDfltColor = nullptr; m_pFootEndNotes = nullptr; @@ -338,7 +338,7 @@ ErrCode SwHTMLWriter::WriteStream() m_nWhishLineLen = 70; m_nLastLFPos = 0; m_nDefListLvl = 0; - m_nDefListMargin = ((m_xTemplate.is() && !m_bCfgOutStyles) ? m_xTemplate.get() : pDoc) + m_nDefListMargin = ((m_xTemplate.is() && !m_bCfgOutStyles) ? m_xTemplate.get() : m_pDoc) ->getIDocumentStylePoolAccess().GetTextCollFromPool( RES_POOLCOLL_HTML_DD, false ) ->GetLRSpace().GetTextLeft(); m_nHeaderFooterSpace = 0; @@ -357,7 +357,7 @@ ErrCode SwHTMLWriter::WriteStream() m_nCSS1Script = CSS1_OUTMODE_WESTERN; break; } - m_eLang = static_cast<const SvxLanguageItem&>(pDoc + m_eLang = static_cast<const SvxLanguageItem&>(m_pDoc ->GetDefault(GetLangWhichIdFromScript(m_nCSS1Script))).GetLanguage(); m_nFootNote = m_nEndNote = 0; @@ -370,26 +370,26 @@ ErrCode SwHTMLWriter::WriteStream() // respect table and section at document beginning { - SwTableNode * pTNd = pCurPam->GetNode().FindTableNode(); - if( pTNd && bWriteAll ) + SwTableNode * pTNd = m_pCurrentPam->GetNode().FindTableNode(); + if( pTNd && m_bWriteAll ) { // start with table node !! - pCurPam->GetPoint()->nNode = *pTNd; + m_pCurrentPam->GetPoint()->nNode = *pTNd; - if( bWriteOnlyFirstTable ) - pCurPam->GetMark()->nNode = *pTNd->EndOfSectionNode(); + if( m_bWriteOnlyFirstTable ) + m_pCurrentPam->GetMark()->nNode = *pTNd->EndOfSectionNode(); } // first node (with can contain a page break) - m_pStartNdIdx = new SwNodeIndex( pCurPam->GetPoint()->nNode ); + m_pStartNdIdx = new SwNodeIndex( m_pCurrentPam->GetPoint()->nNode ); - SwSectionNode * pSNd = pCurPam->GetNode().FindSectionNode(); + SwSectionNode * pSNd = m_pCurrentPam->GetNode().FindSectionNode(); while( pSNd ) { - if( bWriteAll ) + if( m_bWriteAll ) { // start with section node !! - pCurPam->GetPoint()->nNode = *pSNd; + m_pCurrentPam->GetPoint()->nNode = *pSNd; } else { @@ -434,9 +434,9 @@ ErrCode SwHTMLWriter::WriteStream() const SfxPoolItem *pItem; const SfxItemSet& rPageItemSet = m_pCurrPageDesc->GetMaster().GetAttrSet(); - if( !bWriteClipboardDoc && pDoc->GetDocShell() && - (!pDoc->getIDocumentSettingAccess().get(DocumentSettingId::HTML_MODE) && - !pDoc->getIDocumentSettingAccess().get(DocumentSettingId::BROWSE_MODE)) && + if( !m_bWriteClipboardDoc && m_pDoc->GetDocShell() && + (!m_pDoc->getIDocumentSettingAccess().get(DocumentSettingId::HTML_MODE) && + !m_pDoc->getIDocumentSettingAccess().get(DocumentSettingId::BROWSE_MODE)) && SfxItemState::SET == rPageItemSet.GetItemState( RES_HEADER, true, &pItem) ) { const SwFrameFormat *pHeaderFormat = @@ -446,7 +446,7 @@ ErrCode SwHTMLWriter::WriteStream() } m_nTextAttrsToIgnore = nHeaderAttrs; - Out_SwDoc( pOrigPam ); + Out_SwDoc( m_pOrigPam ); m_nTextAttrsToIgnore = 0; if( mxFormComps.is() ) @@ -455,8 +455,8 @@ ErrCode SwHTMLWriter::WriteStream() if( m_pFootEndNotes ) OutFootEndNotes(); - if( !bWriteClipboardDoc && pDoc->GetDocShell() && - (!pDoc->getIDocumentSettingAccess().get(DocumentSettingId::HTML_MODE) && !pDoc->getIDocumentSettingAccess().get(DocumentSettingId::BROWSE_MODE)) && + if( !m_bWriteClipboardDoc && m_pDoc->GetDocShell() && + (!m_pDoc->getIDocumentSettingAccess().get(DocumentSettingId::HTML_MODE) && !m_pDoc->getIDocumentSettingAccess().get(DocumentSettingId::BROWSE_MODE)) && SfxItemState::SET == rPageItemSet.GetItemState( RES_FOOTER, true, &pItem) ) { const SwFrameFormat *pFooterFormat = @@ -528,8 +528,8 @@ ErrCode SwHTMLWriter::WriteStream() m_aNonConvertableCharacters.clear(); - if( bShowProgress ) - ::EndProgress( pDoc->GetDocShell() ); + if( m_bShowProgress ) + ::EndProgress( m_pDoc->GetDocShell() ); if( m_xTemplate.is() ) { @@ -575,7 +575,7 @@ static bool lcl_html_IsMultiColStart( const SwHTMLWriter& rHTMLWrt, sal_uLong nI { bool bRet = false; const SwSectionNode *pSectNd = - rHTMLWrt.pDoc->GetNodes()[nIndex]->GetSectionNode(); + rHTMLWrt.m_pDoc->GetNodes()[nIndex]->GetSectionNode(); if( pSectNd ) { const SwSection& rSection = pSectNd->GetSection(); @@ -590,7 +590,7 @@ static bool lcl_html_IsMultiColStart( const SwHTMLWriter& rHTMLWrt, sal_uLong nI static bool lcl_html_IsMultiColEnd( const SwHTMLWriter& rHTMLWrt, sal_uLong nIndex ) { bool bRet = false; - const SwEndNode *pEndNd = rHTMLWrt.pDoc->GetNodes()[nIndex]->GetEndNode(); + const SwEndNode *pEndNd = rHTMLWrt.m_pDoc->GetNodes()[nIndex]->GetEndNode(); if( pEndNd ) bRet = lcl_html_IsMultiColStart( rHTMLWrt, pEndNd->StartOfSectionIndex() ); @@ -772,13 +772,13 @@ static Writer& OutHTML_Section( Writer& rWrt, const SwSectionNode& rSectNd ) { HTMLSaveData aSaveData( rHTMLWrt, - rHTMLWrt.pCurPam->GetPoint()->nNode.GetIndex()+1, + rHTMLWrt.m_pCurrentPam->GetPoint()->nNode.GetIndex()+1, rSectNd.EndOfSectionIndex(), false, pFormat ); - rHTMLWrt.Out_SwDoc( rHTMLWrt.pCurPam ); + rHTMLWrt.Out_SwDoc( rHTMLWrt.m_pCurrentPam ); } - rHTMLWrt.pCurPam->GetPoint()->nNode = *rSectNd.EndOfSectionNode(); + rHTMLWrt.m_pCurrentPam->GetPoint()->nNode = *rSectNd.EndOfSectionNode(); if( bEndTag ) lcl_html_OutSectionEndTag( rHTMLWrt ); @@ -796,24 +796,24 @@ static Writer& OutHTML_Section( Writer& rWrt, const SwSectionNode& rSectNd ) void SwHTMLWriter::Out_SwDoc( SwPaM* pPam ) { - bool bSaveWriteAll = bWriteAll; // save + bool bSaveWriteAll = m_bWriteAll; // save // search next text::Bookmark position from text::Bookmark table - m_nBkmkTabPos = bWriteAll ? FindPos_Bkmk( *pCurPam->GetPoint() ) : -1; + m_nBkmkTabPos = m_bWriteAll ? FindPos_Bkmk( *m_pCurrentPam->GetPoint() ) : -1; // output all areas of PaM's in the HTML file do { - bWriteAll = bSaveWriteAll; + m_bWriteAll = bSaveWriteAll; m_bFirstLine = true; // search for first on PaM created FlyFrame // still missing: - while( pCurPam->GetPoint()->nNode.GetIndex() < pCurPam->GetMark()->nNode.GetIndex() || - (pCurPam->GetPoint()->nNode.GetIndex() == pCurPam->GetMark()->nNode.GetIndex() && - pCurPam->GetPoint()->nContent.GetIndex() <= pCurPam->GetMark()->nContent.GetIndex()) ) + while( m_pCurrentPam->GetPoint()->nNode.GetIndex() < m_pCurrentPam->GetMark()->nNode.GetIndex() || + (m_pCurrentPam->GetPoint()->nNode.GetIndex() == m_pCurrentPam->GetMark()->nNode.GetIndex() && + m_pCurrentPam->GetPoint()->nContent.GetIndex() <= m_pCurrentPam->GetMark()->nContent.GetIndex()) ) { - SwNode& rNd = pCurPam->GetNode(); + SwNode& rNd = m_pCurrentPam->GetNode(); OSL_ENSURE( !(rNd.IsGrfNode() || rNd.IsOLENode()), "Unexpected Grf- or OLE-Node here" ); @@ -822,36 +822,36 @@ void SwHTMLWriter::Out_SwDoc( SwPaM* pPam ) SwTextNode* pTextNd = rNd.GetTextNode(); if( !m_bFirstLine ) - pCurPam->GetPoint()->nContent.Assign( pTextNd, 0 ); + m_pCurrentPam->GetPoint()->nContent.Assign( pTextNd, 0 ); OutHTML_SwTextNode( *this, *pTextNd ); } else if( rNd.IsTableNode() ) { OutHTML_SwTableNode( *this, *rNd.GetTableNode(), nullptr ); - m_nBkmkTabPos = bWriteAll ? FindPos_Bkmk( *pCurPam->GetPoint() ) : -1; + m_nBkmkTabPos = m_bWriteAll ? FindPos_Bkmk( *m_pCurrentPam->GetPoint() ) : -1; } else if( rNd.IsSectionNode() ) { OutHTML_Section( *this, *rNd.GetSectionNode() ); - m_nBkmkTabPos = bWriteAll ? FindPos_Bkmk( *pCurPam->GetPoint() ) : -1; + m_nBkmkTabPos = m_bWriteAll ? FindPos_Bkmk( *m_pCurrentPam->GetPoint() ) : -1; } - else if( &rNd == &pDoc->GetNodes().GetEndOfContent() ) + else if( &rNd == &m_pDoc->GetNodes().GetEndOfContent() ) break; - ++pCurPam->GetPoint()->nNode; // move - sal_uInt32 nPos = pCurPam->GetPoint()->nNode.GetIndex(); + ++m_pCurrentPam->GetPoint()->nNode; // move + sal_uInt32 nPos = m_pCurrentPam->GetPoint()->nNode.GetIndex(); - if( bShowProgress ) - ::SetProgressState( nPos, pDoc->GetDocShell() ); // How far ? + if( m_bShowProgress ) + ::SetProgressState( nPos, m_pDoc->GetDocShell() ); // How far ? /* If only the selected area should be saved, so only the complete * nodes should be saved, this means the first and n-th node * partly, the 2nd till n-1 node complete. (complete means with * all formats!) */ - bWriteAll = bSaveWriteAll || - nPos != pCurPam->GetMark()->nNode.GetIndex(); + m_bWriteAll = bSaveWriteAll || + nPos != m_pCurrentPam->GetMark()->nNode.GetIndex(); m_bFirstLine = false; m_bOutFooter = false; // after one node no footer anymore } @@ -861,7 +861,7 @@ void SwHTMLWriter::Out_SwDoc( SwPaM* pPam ) } while( CopyNextPam( &pPam ) ); // until all PaM's processed - bWriteAll = bSaveWriteAll; // reset to old values + m_bWriteAll = bSaveWriteAll; // reset to old values } // write the StyleTable, general data, header/footer/footnotes @@ -929,12 +929,12 @@ static void OutBodyColor( const sal_Char* pTag, const SwFormat *pFormat, sal_uInt16 SwHTMLWriter::OutHeaderAttrs() { - sal_uLong nIdx = pCurPam->GetPoint()->nNode.GetIndex(); - sal_uLong nEndIdx = pCurPam->GetMark()->nNode.GetIndex(); + sal_uLong nIdx = m_pCurrentPam->GetPoint()->nNode.GetIndex(); + sal_uLong nEndIdx = m_pCurrentPam->GetMark()->nNode.GetIndex(); SwTextNode *pTextNd = nullptr; while( nIdx<=nEndIdx && - nullptr==(pTextNd=pDoc->GetNodes()[nIdx]->GetTextNode()) ) + nullptr==(pTextNd=m_pDoc->GetNodes()[nIdx]->GetTextNode()) ) nIdx++; OSL_ENSURE( pTextNd, "No Text-Node found" ); @@ -996,7 +996,7 @@ const SwPageDesc *SwHTMLWriter::MakeHeader( sal_uInt16 &rHeaderAttrs ) OString sIndent = GetIndentString(); uno::Reference<document::XDocumentProperties> xDocProps; - SwDocShell *pDocShell(pDoc->GetDocShell()); + SwDocShell *pDocShell(m_pDoc->GetDocShell()); if (pDocShell) { uno::Reference<document::XDocumentPropertiesSupplier> xDPS( @@ -1019,11 +1019,11 @@ const SwPageDesc *SwHTMLWriter::MakeHeader( sal_uInt16 &rHeaderAttrs ) // In none HTML documents the first set template will be exported // and if none is set the default template - sal_uLong nNodeIdx = pCurPam->GetPoint()->nNode.GetIndex(); + sal_uLong nNodeIdx = m_pCurrentPam->GetPoint()->nNode.GetIndex(); - while( nNodeIdx < pDoc->GetNodes().Count() ) + while( nNodeIdx < m_pDoc->GetNodes().Count() ) { - SwNode *pNd = pDoc->GetNodes()[ nNodeIdx ]; + SwNode *pNd = m_pDoc->GetNodes()[ nNodeIdx ]; if( pNd->IsContentNode() ) { pPageDesc = static_cast<const SwFormatPageDesc &>(pNd->GetContentNode() @@ -1041,7 +1041,7 @@ const SwPageDesc *SwHTMLWriter::MakeHeader( sal_uInt16 &rHeaderAttrs ) } if( !pPageDesc ) - pPageDesc = &pDoc->GetPageDesc( 0 ); + pPageDesc = &m_pDoc->GetPageDesc( 0 ); if (!mbSkipHeaderFooter) { @@ -1052,7 +1052,7 @@ const SwPageDesc *SwHTMLWriter::MakeHeader( sal_uInt16 &rHeaderAttrs ) } // and now ... the BASIC and JavaScript! - if( pDoc->GetDocShell() ) // only with DocShell BASIC is possible + if( m_pDoc->GetDocShell() ) // only with DocShell BASIC is possible OutBasic(); DecIndentLevel(); // indent content of <HEAD> @@ -1069,15 +1069,15 @@ const SwPageDesc *SwHTMLWriter::MakeHeader( sal_uInt16 &rHeaderAttrs ) // output text colour, when it was set in the default template or was changed OutBodyColor( OOO_STRING_SVTOOLS_HTML_O_text, - pDoc->getIDocumentStylePoolAccess().GetTextCollFromPool( RES_POOLCOLL_STANDARD, false ), + m_pDoc->getIDocumentStylePoolAccess().GetTextCollFromPool( RES_POOLCOLL_STANDARD, false ), *this ); // colour of (un)visited links OutBodyColor( OOO_STRING_SVTOOLS_HTML_O_link, - pDoc->getIDocumentStylePoolAccess().GetCharFormatFromPool( RES_POOLCHR_INET_NORMAL ), + m_pDoc->getIDocumentStylePoolAccess().GetCharFormatFromPool( RES_POOLCHR_INET_NORMAL ), *this ); OutBodyColor( OOO_STRING_SVTOOLS_HTML_O_vlink, - pDoc->getIDocumentStylePoolAccess().GetCharFormatFromPool( RES_POOLCHR_INET_VISIT ), + m_pDoc->getIDocumentStylePoolAccess().GetCharFormatFromPool( RES_POOLCHR_INET_VISIT ), *this ); const SfxItemSet& rItemSet = pPageDesc->GetMaster().GetAttrSet(); @@ -1095,7 +1095,7 @@ const SwPageDesc *SwHTMLWriter::MakeHeader( sal_uInt16 &rHeaderAttrs ) OutCSS1_BodyTagStyleOpt( *this, rItemSet, OUString() ); } // append events - if( pDoc->GetDocShell() ) // only with DocShell BASIC is possible + if( m_pDoc->GetDocShell() ) // only with DocShell BASIC is possible OutBasicBodyEvents(); Strm().WriteChar( '>' ); @@ -1120,12 +1120,12 @@ void SwHTMLWriter::OutBookmarks() { // fetch current bookmark const ::sw::mark::IMark* pBookmark = nullptr; - IDocumentMarkAccess* const pMarkAccess = pDoc->getIDocumentMarkAccess(); + IDocumentMarkAccess* const pMarkAccess = m_pDoc->getIDocumentMarkAccess(); if(m_nBkmkTabPos != -1) pBookmark = (pMarkAccess->getAllMarksBegin() + m_nBkmkTabPos)->get(); // Output all bookmarks in this paragraph. The content position // for the moment isn't considered! - sal_uInt32 nNode = pCurPam->GetPoint()->nNode.GetIndex(); + sal_uInt32 nNode = m_pCurrentPam->GetPoint()->nNode.GetIndex(); while( m_nBkmkTabPos != -1 && pBookmark->GetMarkPos().nNode.GetIndex() == nNode ) { @@ -1162,7 +1162,7 @@ void SwHTMLWriter::OutPointFieldmarks( const SwPosition& rPos ) // "point" fieldmarks that occupy single character space, as opposed to // range fieldmarks that are associated with start and end points. - const IDocumentMarkAccess* pMarkAccess = pDoc->getIDocumentMarkAccess(); + const IDocumentMarkAccess* pMarkAccess = m_pDoc->getIDocumentMarkAccess(); if (!pMarkAccess) return; @@ -1474,7 +1474,7 @@ HTMLSaveData::HTMLSaveData(SwHTMLWriter& rWriter, sal_uLong nStt, sal_uLong nEnd, bool bSaveNum, const SwFrameFormat *pFrameFormat) : rWrt(rWriter) - , pOldPam(rWrt.pCurPam) + , pOldPam(rWrt.m_pCurrentPam) , pOldEnd(rWrt.GetEndPaM()) , pOldNumRuleInfo(nullptr) , pOldNextNumRuleInfo(nullptr) @@ -1484,21 +1484,21 @@ HTMLSaveData::HTMLSaveData(SwHTMLWriter& rWriter, sal_uLong nStt, , bOldOutFooter(rWrt.m_bOutFooter) , bOldOutFlyFrame(rWrt.m_bOutFlyFrame) { - bOldWriteAll = rWrt.bWriteAll; + bOldWriteAll = rWrt.m_bWriteAll; - rWrt.pCurPam = Writer::NewSwPaM( *rWrt.pDoc, nStt, nEnd ); + rWrt.m_pCurrentPam = Writer::NewSwPaM( *rWrt.m_pDoc, nStt, nEnd ); // recognize table in special areas - if( nStt != rWrt.pCurPam->GetMark()->nNode.GetIndex() ) + if( nStt != rWrt.m_pCurrentPam->GetMark()->nNode.GetIndex() ) { - const SwNode *pNd = rWrt.pDoc->GetNodes()[ nStt ]; + const SwNode *pNd = rWrt.m_pDoc->GetNodes()[ nStt ]; if( pNd->IsTableNode() || pNd->IsSectionNode() ) - rWrt.pCurPam->GetMark()->nNode = nStt; + rWrt.m_pCurrentPam->GetMark()->nNode = nStt; } - rWrt.SetEndPaM( rWrt.pCurPam ); - rWrt.pCurPam->Exchange( ); - rWrt.bWriteAll = true; + rWrt.SetEndPaM( rWrt.m_pCurrentPam ); + rWrt.m_pCurrentPam->Exchange( ); + rWrt.m_bWriteAll = true; rWrt.m_nDefListLvl = 0; rWrt.m_bOutHeader = rWrt.m_bOutFooter = false; @@ -1524,11 +1524,11 @@ HTMLSaveData::HTMLSaveData(SwHTMLWriter& rWriter, sal_uLong nStt, HTMLSaveData::~HTMLSaveData() { - delete rWrt.pCurPam; // delete PaM again + delete rWrt.m_pCurrentPam; // delete PaM again - rWrt.pCurPam = pOldPam; + rWrt.m_pCurrentPam = pOldPam; rWrt.SetEndPaM( pOldEnd ); - rWrt.bWriteAll = bOldWriteAll; + rWrt.m_bWriteAll = bOldWriteAll; rWrt.m_nBkmkTabPos = bOldWriteAll ? rWrt.FindPos_Bkmk( *pOldPam->GetPoint() ) : -1; rWrt.m_nLastParaToken = HtmlTokenId::NONE; rWrt.m_nDefListLvl = nOldDefListLvl; diff --git a/sw/source/filter/html/wrthtml.hxx b/sw/source/filter/html/wrthtml.hxx index cb7808a8f26d..352c66adf06a 100644 --- a/sw/source/filter/html/wrthtml.hxx +++ b/sw/source/filter/html/wrthtml.hxx @@ -503,8 +503,8 @@ public: void OutNewLine( bool bCheck=false ); // for HTMLSaveData - SwPaM* GetEndPaM() { return pOrigPam; } - void SetEndPaM( SwPaM* pPam ) { pOrigPam = pPam; } + SwPaM* GetEndPaM() { return m_pOrigPam; } + void SetEndPaM( SwPaM* pPam ) { m_pOrigPam = pPam; } static sal_uInt32 ToPixel( sal_uInt32 nVal, const bool bVert ); diff --git a/sw/source/filter/writer/writer.cxx b/sw/source/filter/writer/writer.cxx index 06ff819111f0..35744a492434 100644 --- a/sw/source/filter/writer/writer.cxx +++ b/sw/source/filter/writer/writer.cxx @@ -117,13 +117,13 @@ void Writer_Impl::InsertBkmk(const ::sw::mark::IMark& rBkmk) Writer::Writer() : m_pImpl(o3tl::make_unique<Writer_Impl>()) - , pOrigFileName(nullptr), pDoc(nullptr), pOrigPam(nullptr), pCurPam(nullptr) + , m_pOrigFileName(nullptr), m_pDoc(nullptr), m_pOrigPam(nullptr), m_pCurrentPam(nullptr) { - bWriteAll = bShowProgress = bUCS2_WithStartChar = true; - bASCII_NoLastLineEnd = bASCII_ParaAsBlanc = bASCII_ParaAsCR = - bWriteClipboardDoc = bWriteOnlyFirstTable = bBlock = - bOrganizerMode = false; - bExportPargraphNumbering = true; + m_bWriteAll = m_bShowProgress = m_bUCS2_WithStartChar = true; + m_bASCII_NoLastLineEnd = m_bASCII_ParaAsBlank = m_bASCII_ParaAsCR = + m_bWriteClipboardDoc = m_bWriteOnlyFirstTable = m_bBlock = + m_bOrganizerMode = false; + m_bExportPargraphNumbering = true; } Writer::~Writer() @@ -133,45 +133,45 @@ Writer::~Writer() /* * Document Interface Access */ -IDocumentSettingAccess& Writer::getIDocumentSettingAccess() { return pDoc->getIDocumentSettingAccess(); } -const IDocumentSettingAccess& Writer::getIDocumentSettingAccess() const { return pDoc->getIDocumentSettingAccess(); } -IDocumentStylePoolAccess& Writer::getIDocumentStylePoolAccess() { return pDoc->getIDocumentStylePoolAccess(); } -const IDocumentStylePoolAccess& Writer::getIDocumentStylePoolAccess() const { return pDoc->getIDocumentStylePoolAccess(); } +IDocumentSettingAccess& Writer::getIDocumentSettingAccess() { return m_pDoc->getIDocumentSettingAccess(); } +const IDocumentSettingAccess& Writer::getIDocumentSettingAccess() const { return m_pDoc->getIDocumentSettingAccess(); } +IDocumentStylePoolAccess& Writer::getIDocumentStylePoolAccess() { return m_pDoc->getIDocumentStylePoolAccess(); } +const IDocumentStylePoolAccess& Writer::getIDocumentStylePoolAccess() const { return m_pDoc->getIDocumentStylePoolAccess(); } void Writer::ResetWriter() { - m_pImpl->RemoveFontList( *pDoc ); + m_pImpl->RemoveFontList( *m_pDoc ); m_pImpl.reset(new Writer_Impl); - if( pCurPam ) + if( m_pCurrentPam ) { - while( pCurPam->GetNext() != pCurPam ) - delete pCurPam->GetNext(); - delete pCurPam; + while( m_pCurrentPam->GetNext() != m_pCurrentPam ) + delete m_pCurrentPam->GetNext(); + delete m_pCurrentPam; } - pCurPam = nullptr; - pOrigFileName = nullptr; - pDoc = nullptr; - - bShowProgress = bUCS2_WithStartChar = true; - bASCII_NoLastLineEnd = bASCII_ParaAsBlanc = bASCII_ParaAsCR = - bWriteClipboardDoc = bWriteOnlyFirstTable = bBlock = - bOrganizerMode = false; + m_pCurrentPam = nullptr; + m_pOrigFileName = nullptr; + m_pDoc = nullptr; + + m_bShowProgress = m_bUCS2_WithStartChar = true; + m_bASCII_NoLastLineEnd = m_bASCII_ParaAsBlank = m_bASCII_ParaAsCR = + m_bWriteClipboardDoc = m_bWriteOnlyFirstTable = m_bBlock = + m_bOrganizerMode = false; } bool Writer::CopyNextPam( SwPaM ** ppPam ) { - if( (*ppPam)->GetNext() == pOrigPam ) + if( (*ppPam)->GetNext() == m_pOrigPam ) { - *ppPam = pOrigPam; // set back to the beginning pam + *ppPam = m_pOrigPam; // set back to the beginning pam return false; // end of the ring } // otherwise copy the next value from the next Pam *ppPam = (*ppPam)->GetNext(); - *pCurPam->GetPoint() = *(*ppPam)->Start(); - *pCurPam->GetMark() = *(*ppPam)->End(); + *m_pCurrentPam->GetPoint() = *(*ppPam)->Start(); + *m_pCurrentPam->GetMark() = *(*ppPam)->End(); return true; } @@ -180,7 +180,7 @@ bool Writer::CopyNextPam( SwPaM ** ppPam ) sal_Int32 Writer::FindPos_Bkmk(const SwPosition& rPos) const { - const IDocumentMarkAccess* const pMarkAccess = pDoc->getIDocumentMarkAccess(); + const IDocumentMarkAccess* const pMarkAccess = m_pDoc->getIDocumentMarkAccess(); const IDocumentMarkAccess::const_iterator_t ppBkmk = std::lower_bound( pMarkAccess->getAllMarksBegin(), pMarkAccess->getAllMarksEnd(), @@ -260,14 +260,14 @@ ErrCode Writer::Write( SwPaM& rPaM, SvStream& rStrm, const OUString* pFName ) return nResult; } - pDoc = rPaM.GetDoc(); - pOrigFileName = pFName; + m_pDoc = rPaM.GetDoc(); + m_pOrigFileName = pFName; m_pImpl->m_pStream = &rStrm; // Copy PaM, so that it can be modified - pCurPam = new SwPaM( *rPaM.End(), *rPaM.Start() ); + m_pCurrentPam = new SwPaM( *rPaM.End(), *rPaM.Start() ); // for comparison secure to the current Pam - pOrigPam = &rPaM; + m_pOrigPam = &rPaM; ErrCode nRet = WriteStream(); @@ -301,11 +301,11 @@ ErrCode Writer::Write( SwPaM&, const uno::Reference < embed::XStorage >&, const bool Writer::CopyLocalFileToINet( OUString& rFileNm ) { - if( !pOrigFileName ) // can be happen, by example if we + if( !m_pOrigFileName ) // can be happen, by example if we return false; // write into the clipboard bool bRet = false; - INetURLObject aFileUrl( rFileNm ), aTargetUrl( *pOrigFileName ); + INetURLObject aFileUrl( rFileNm ), aTargetUrl( *m_pOrigFileName ); // this is our old without the Mail-Export if( ! ( INetProtocol::File == aFileUrl.GetProtocol() && @@ -357,8 +357,8 @@ void Writer::PutNumFormatFontsInAttrPool() // then there are a few fonts in the NumRules // These put into the Pool. After this does they have a RefCount > 1 // it can be removed - it is already in the Pool - SfxItemPool& rPool = pDoc->GetAttrPool(); - const SwNumRuleTable& rListTable = pDoc->GetNumRuleTable(); + SfxItemPool& rPool = m_pDoc->GetAttrPool(); + const SwNumRuleTable& rListTable = m_pDoc->GetNumRuleTable(); const SwNumRule* pRule; const SwNumFormat* pFormat; const vcl::Font* pFont; @@ -390,7 +390,7 @@ void Writer::PutNumFormatFontsInAttrPool() void Writer::PutEditEngFontsInAttrPool() { - SfxItemPool& rPool = pDoc->GetAttrPool(); + SfxItemPool& rPool = m_pDoc->GetAttrPool(); if( rPool.GetSecondaryPool() ) { AddFontItems_( rPool, EE_CHAR_FONTINFO ); @@ -437,7 +437,7 @@ void Writer::AddFontItem( SfxItemPool& rPool, const SvxFontItem& rFont ) // OtherPos of the bookmarks also inserted. void Writer::CreateBookmarkTable() { - const IDocumentMarkAccess* const pMarkAccess = pDoc->getIDocumentMarkAccess(); + const IDocumentMarkAccess* const pMarkAccess = m_pDoc->getIDocumentMarkAccess(); for(IDocumentMarkAccess::const_iterator_t ppBkmk = pMarkAccess->getBookmarksBegin(); ppBkmk != pMarkAccess->getBookmarksEnd(); ++ppBkmk) @@ -498,13 +498,13 @@ ErrCode StgWriter::Write( SwPaM& rPaM, SotStorage& rStg, const OUString* pFName { SetStream(nullptr); pStg = &rStg; - pDoc = rPaM.GetDoc(); - pOrigFileName = pFName; + m_pDoc = rPaM.GetDoc(); + m_pOrigFileName = pFName; // Copy PaM, so that it can be modified - pCurPam = new SwPaM( *rPaM.End(), *rPaM.Start() ); + m_pCurrentPam = new SwPaM( *rPaM.End(), *rPaM.Start() ); // for comparison secure to the current Pam - pOrigPam = &rPaM; + m_pOrigPam = &rPaM; ErrCode nRet = WriteStorage(); @@ -519,13 +519,13 @@ ErrCode StgWriter::Write( SwPaM& rPaM, const uno::Reference < embed::XStorage >& SetStream(nullptr); pStg = nullptr; xStg = rStg; - pDoc = rPaM.GetDoc(); - pOrigFileName = pFName; + m_pDoc = rPaM.GetDoc(); + m_pOrigFileName = pFName; // Copy PaM, so that it can be modified - pCurPam = new SwPaM( *rPaM.End(), *rPaM.Start() ); + m_pCurrentPam = new SwPaM( *rPaM.End(), *rPaM.Start() ); // for comparison secure to the current Pam - pOrigPam = &rPaM; + m_pOrigPam = &rPaM; ErrCode nRet = pMedium ? WriteMedium( *pMedium ) : WriteStorage(); diff --git a/sw/source/filter/ww8/rtfexport.cxx b/sw/source/filter/ww8/rtfexport.cxx index d2dfff0ffec7..0b206edcf693 100644 --- a/sw/source/filter/ww8/rtfexport.cxx +++ b/sw/source/filter/ww8/rtfexport.cxx @@ -442,7 +442,7 @@ void RtfExport::WriteMainText() } SwTableNode* pTableNode = m_pCurPam->GetNode().FindTableNode(); - if (m_pWriter && m_pWriter->bWriteOnlyFirstTable && pTableNode != nullptr) + if (m_pWriter && m_pWriter->m_bWriteOnlyFirstTable && pTableNode != nullptr) { m_pCurPam->GetPoint()->nNode = *pTableNode; m_pCurPam->GetMark()->nNode = *(pTableNode->EndOfSectionNode()); @@ -1444,8 +1444,8 @@ SwRTFWriter::SwRTFWriter(const OUString& rFilterName, const OUString& rBaseURL) ErrCode SwRTFWriter::WriteStream() { - SwPaM aPam(*pCurPam->End(), *pCurPam->Start()); - RtfExport aExport(nullptr, pDoc, &aPam, pCurPam, this, m_bOutOutlineOnly); + SwPaM aPam(*m_pCurrentPam->End(), *m_pCurrentPam->Start()); + RtfExport aExport(nullptr, m_pDoc, &aPam, m_pCurrentPam, this, m_bOutOutlineOnly); aExport.ExportDocument(true); return ERRCODE_NONE; } diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx index b4734cf7d946..c158514fdd2c 100644 --- a/sw/source/filter/ww8/wrtww8.cxx +++ b/sw/source/filter/ww8/wrtww8.cxx @@ -1986,15 +1986,15 @@ void WW8Export::SaveData( sal_uLong nStt, sal_uLong nEnd ) else rData.pOOld = nullptr; // reuse pO - rData.bOldWriteAll = GetWriter().bWriteAll; - GetWriter().bWriteAll = true; + rData.bOldWriteAll = GetWriter().m_bWriteAll; + GetWriter().m_bWriteAll = true; } void WW8Export::RestoreData() { MSWordSaveData &rData = m_aSaveData.top(); - GetWriter().bWriteAll = rData.bOldWriteAll; + GetWriter().m_bWriteAll = rData.bOldWriteAll; OSL_ENSURE( pO->empty(), "pO is not empty in WW8Export::RestoreData()" ); if ( rData.pOOld ) @@ -3506,31 +3506,31 @@ void WW8Export::PrepareStorage() ErrCode SwWW8Writer::WriteStorage() { // #i34818# - update layout (if present), for SwWriteTable - SwViewShell* pViewShell = pDoc->getIDocumentLayoutAccess().GetCurrentViewShell(); + SwViewShell* pViewShell = m_pDoc->getIDocumentLayoutAccess().GetCurrentViewShell(); if( pViewShell != nullptr ) pViewShell->CalcLayout(); - long nMaxNode = pDoc->GetNodes().Count(); - ::StartProgress( STR_STATSTR_W4WWRITE, 0, nMaxNode, pDoc->GetDocShell() ); + long nMaxNode = m_pDoc->GetNodes().Count(); + ::StartProgress( STR_STATSTR_W4WWRITE, 0, nMaxNode, m_pDoc->GetDocShell() ); // Respect table at the beginning of the document { - SwTableNode* pTNd = pCurPam->GetNode().FindTableNode(); - if( pTNd && bWriteAll ) + SwTableNode* pTNd = m_pCurrentPam->GetNode().FindTableNode(); + if( pTNd && m_bWriteAll ) // start with the table node !! - pCurPam->GetPoint()->nNode = *pTNd; + m_pCurrentPam->GetPoint()->nNode = *pTNd; } // Do the actual export { bool bDot = mpMedium->GetFilter()->GetName().endsWith("Vorlage"); - WW8Export aExport(this, pDoc, pCurPam, pOrigPam, bDot); + WW8Export aExport(this, m_pDoc, m_pCurrentPam, m_pOrigPam, bDot); m_pExport = &aExport; - aExport.ExportDocument( bWriteAll ); + aExport.ExportDocument( m_bWriteAll ); m_pExport = nullptr; } - ::EndProgress( pDoc->GetDocShell() ); + ::EndProgress( m_pDoc->GetDocShell() ); return ERRCODE_NONE; } diff --git a/sw/source/filter/xml/wrtxml.cxx b/sw/source/filter/xml/wrtxml.cxx index 436e5392d81d..0a462cafb9e2 100644 --- a/sw/source/filter/xml/wrtxml.cxx +++ b/sw/source/filter/xml/wrtxml.cxx @@ -91,7 +91,7 @@ ErrCode SwXMLWriter::Write_( const uno::Reference < task::XStatusIndicator >& xS SvXMLGraphicHelperMode::Write ); xGraphicResolver = xGraphicHelper.get(); - SfxObjectShell *pPersist = pDoc->GetPersist(); + SfxObjectShell *pPersist = m_pDoc->GetPersist(); if( pPersist ) { xObjectHelper = SvXMLEmbeddedObjectHelper::Create( @@ -161,7 +161,7 @@ ErrCode SwXMLWriter::Write_( const uno::Reference < task::XStatusIndicator >& xS xInfoSet->setPropertyValue( "TargetStorage", Any( xStg ) ); uno::Any aAny; - if (bShowProgress) + if (m_bShowProgress) { // set progress range and start status indicator sal_Int32 nProgressRange(1000000); @@ -180,18 +180,18 @@ ErrCode SwXMLWriter::Write_( const uno::Reference < task::XStatusIndicator >& xS // save show redline mode ... const OUString sShowChanges("ShowChanges"); - RedlineFlags nRedlineFlags = pDoc->getIDocumentRedlineAccess().GetRedlineFlags(); + RedlineFlags nRedlineFlags = m_pDoc->getIDocumentRedlineAccess().GetRedlineFlags(); xInfoSet->setPropertyValue( sShowChanges, makeAny( IDocumentRedlineAccess::IsShowChanges( nRedlineFlags ) ) ); // ... and hide redlines for export nRedlineFlags &= ~RedlineFlags::ShowMask; nRedlineFlags |= RedlineFlags::ShowInsert; - pDoc->getIDocumentRedlineAccess().SetRedlineFlags( nRedlineFlags ); + m_pDoc->getIDocumentRedlineAccess().SetRedlineFlags( nRedlineFlags ); // Set base URI xInfoSet->setPropertyValue( "BaseURI", makeAny( GetBaseURL() ) ); - if( SfxObjectCreateMode::EMBEDDED == pDoc->GetDocShell()->GetCreateMode() ) + if( SfxObjectCreateMode::EMBEDDED == m_pDoc->GetDocShell()->GetCreateMode() ) { const OUString aName( !aDocHierarchicalName.isEmpty() ? aDocHierarchicalName @@ -200,7 +200,7 @@ ErrCode SwXMLWriter::Write_( const uno::Reference < task::XStatusIndicator >& xS xInfoSet->setPropertyValue( "StreamRelPath", makeAny( aName ) ); } - if( bBlock ) + if( m_bBlock ) { xInfoSet->setPropertyValue( "AutoTextMode", makeAny(true) ); } @@ -208,7 +208,7 @@ ErrCode SwXMLWriter::Write_( const uno::Reference < task::XStatusIndicator >& xS // #i69627# const bool bOASIS = ( SotStorage::GetVersion( xStg ) > SOFFICE_FILEFORMAT_60 ); if ( bOASIS && - docfunc::HasOutlineStyleToBeWrittenAsNormalListStyle( *pDoc ) ) + docfunc::HasOutlineStyleToBeWrittenAsNormalListStyle( *m_pDoc ) ) { xInfoSet->setPropertyValue( "OutlineStyleAsNormalListStyle", makeAny( true ) ); } @@ -245,7 +245,7 @@ ErrCode SwXMLWriter::Write_( const uno::Reference < task::XStatusIndicator >& xS //Get model uno::Reference< lang::XComponent > xModelComp( - pDoc->GetDocShell()->GetModel(), UNO_QUERY ); + m_pDoc->GetDocShell()->GetModel(), UNO_QUERY ); OSL_ENSURE( xModelComp.is(), "XMLWriter::Write: got no model" ); if( !xModelComp.is() ) return ERR_SWG_WRITE_ERROR; @@ -254,12 +254,12 @@ ErrCode SwXMLWriter::Write_( const uno::Reference < task::XStatusIndicator >& xS PutEditEngFontsInAttrPool(); // properties - Sequence < PropertyValue > aProps( pOrigFileName ? 1 : 0 ); - if( pOrigFileName ) + Sequence < PropertyValue > aProps( m_pOrigFileName ? 1 : 0 ); + if( m_pOrigFileName ) { PropertyValue *pProps = aProps.getArray(); pProps->Name = "FileName"; - pProps->Value <<= *pOrigFileName; + pProps->Value <<= *m_pOrigFileName; } // export sub streams for package, else full stream into a file @@ -292,7 +292,7 @@ ErrCode SwXMLWriter::Write_( const uno::Reference < task::XStatusIndicator >& xS } } - bool bStoreMeta = ( SfxObjectCreateMode::EMBEDDED != pDoc->GetDocShell()->GetCreateMode() ); + bool bStoreMeta = ( SfxObjectCreateMode::EMBEDDED != m_pDoc->GetDocShell()->GetCreateMode() ); if ( !bStoreMeta ) { try @@ -311,7 +311,7 @@ ErrCode SwXMLWriter::Write_( const uno::Reference < task::XStatusIndicator >& xS } OUString sWarnFile; - if( !bOrganizerMode && !bBlock && bStoreMeta ) + if( !m_bOrganizerMode && !m_bBlock && bStoreMeta ) { if( !WriteThroughComponent( xModelComp, "meta.xml", xContext, @@ -324,7 +324,7 @@ ErrCode SwXMLWriter::Write_( const uno::Reference < task::XStatusIndicator >& xS } } - if( !bBlock ) + if( !m_bBlock ) { if( !WriteThroughComponent( xModelComp, "settings.xml", xContext, @@ -353,7 +353,7 @@ ErrCode SwXMLWriter::Write_( const uno::Reference < task::XStatusIndicator >& xS sErrFile = "styles.xml"; } - if( !bOrganizerMode && !bErr ) + if( !m_bOrganizerMode && !bErr ) { if( !WriteThroughComponent( xModelComp, "content.xml", xContext, @@ -366,8 +366,8 @@ ErrCode SwXMLWriter::Write_( const uno::Reference < task::XStatusIndicator >& xS } } - if( pDoc->getIDocumentLayoutAccess().GetCurrentViewShell() && pDoc->getIDocumentStatistics().GetDocStat().nPage > 1 && - !(bOrganizerMode || bBlock || bErr) ) + if( m_pDoc->getIDocumentLayoutAccess().GetCurrentViewShell() && m_pDoc->getIDocumentStatistics().GetDocStat().nPage > 1 && + !(m_bOrganizerMode || m_bBlock || bErr) ) { try { @@ -379,7 +379,7 @@ ErrCode SwXMLWriter::Write_( const uno::Reference < task::XStatusIndicator >& xS uno::Any aAny2; aAny2 <<= OUString("application/binary"); xSet->setPropertyValue("MediaType", aAny2 ); - pDoc->WriteLayoutCache( *pStream ); + m_pDoc->WriteLayoutCache( *pStream ); } delete pStream; @@ -401,12 +401,12 @@ ErrCode SwXMLWriter::Write_( const uno::Reference < task::XStatusIndicator >& xS // restore redline mode aAny = xInfoSet->getPropertyValue( sShowChanges ); - nRedlineFlags = pDoc->getIDocumentRedlineAccess().GetRedlineFlags(); + nRedlineFlags = m_pDoc->getIDocumentRedlineAccess().GetRedlineFlags(); nRedlineFlags &= ~RedlineFlags::ShowMask; nRedlineFlags |= RedlineFlags::ShowInsert; if ( *o3tl::doAccess<bool>(aAny) ) nRedlineFlags |= RedlineFlags::ShowDelete; - pDoc->getIDocumentRedlineAccess().SetRedlineFlags( nRedlineFlags ); + m_pDoc->getIDocumentRedlineAccess().SetRedlineFlags( nRedlineFlags ); if (xStatusIndicator.is()) { diff --git a/sw/source/uibase/dochdl/swdtflvr.cxx b/sw/source/uibase/dochdl/swdtflvr.cxx index 4e3c76c17ff7..8548874264ed 100644 --- a/sw/source/uibase/dochdl/swdtflvr.cxx +++ b/sw/source/uibase/dochdl/swdtflvr.cxx @@ -724,7 +724,7 @@ bool SwTransferable::WriteObject( tools::SvRef<SotStorageStream>& xStream, xWrt->SetAsciiOptions( aAOpt ); // no start char for clipboard - xWrt->bUCS2_WithStartChar = false; + xWrt->m_bUCS2_WithStartChar = false; } break; default: break; @@ -733,8 +733,8 @@ bool SwTransferable::WriteObject( tools::SvRef<SotStorageStream>& xStream, if( xWrt.is() ) { SwDoc* pDoc = static_cast<SwDoc*>(pObject); - xWrt->bWriteClipboardDoc = true; - xWrt->bWriteOnlyFirstTable = bool(TransferBufferType::Table & m_eBufferType); + xWrt->m_bWriteClipboardDoc = true; + xWrt->m_bWriteOnlyFirstTable = bool(TransferBufferType::Table & m_eBufferType); xWrt->SetShowProgress(false); #if defined(DEBUGPASTE) |