diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2020-02-10 09:06:30 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2020-02-10 11:25:40 +0100 |
commit | efe3a81ca3a605aba09871b288808ca7da0e93f1 (patch) | |
tree | 9dcb57a075792110401a828bae63fbda647138fb /sw | |
parent | f9ab2fbe2909beb084d7cfc04724f6b081d6f186 (diff) |
sw: prefix members of SwExtTextInput, SwLineNumberInfo, SwWriter and ...
... SwgReaderOption
See tdf#94879 for motivation.
Change-Id: Ib44eaa1adbc731499d22b0bf538380b8bc0cc4eb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88357
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
Diffstat (limited to 'sw')
-rw-r--r-- | sw/inc/extinput.hxx | 18 | ||||
-rw-r--r-- | sw/inc/lineinfo.hxx | 60 | ||||
-rw-r--r-- | sw/inc/shellio.hxx | 24 | ||||
-rw-r--r-- | sw/source/core/doc/extinput.cxx | 52 | ||||
-rw-r--r-- | sw/source/core/doc/lineinfo.cxx | 56 | ||||
-rw-r--r-- | sw/source/filter/basflt/shellio.cxx | 76 |
6 files changed, 143 insertions, 143 deletions
diff --git a/sw/inc/extinput.hxx b/sw/inc/extinput.hxx index fd510511e388..c2fe02adbbdf 100644 --- a/sw/inc/extinput.hxx +++ b/sw/inc/extinput.hxx @@ -26,21 +26,21 @@ class SwExtTextInput final : public SwPaM { - std::vector<ExtTextInputAttr> aAttrs; - OUString sOverwriteText; - bool bInsText : 1; - bool bIsOverwriteCursor : 1; - LanguageType eInputLanguage; + std::vector<ExtTextInputAttr> m_aAttrs; + OUString m_sOverwriteText; + bool m_bInsText : 1; + bool m_bIsOverwriteCursor : 1; + LanguageType m_eInputLanguage; public: SwExtTextInput( const SwPaM& rPam, Ring* pRing ); virtual ~SwExtTextInput() override; void SetInputData( const CommandExtTextInputData& rData ); - const std::vector<ExtTextInputAttr>& GetAttrs() const { return aAttrs; } - void SetInsText( bool bFlag ) { bInsText = bFlag; } - bool IsOverwriteCursor() const { return bIsOverwriteCursor; } + const std::vector<ExtTextInputAttr>& GetAttrs() const { return m_aAttrs; } + void SetInsText( bool bFlag ) { m_bInsText = bFlag; } + bool IsOverwriteCursor() const { return m_bIsOverwriteCursor; } void SetOverwriteCursor( bool bFlag ); - void SetLanguage(LanguageType eSet) { eInputLanguage = eSet;} + void SetLanguage(LanguageType eSet) { m_eInputLanguage = eSet;} SwExtTextInput* GetNext() { return static_cast<SwExtTextInput *>(GetNextInRing()); } const SwExtTextInput* GetNext() const { return static_cast<SwExtTextInput const *>(GetNextInRing()); } diff --git a/sw/inc/lineinfo.hxx b/sw/inc/lineinfo.hxx index 4846a1e55a0c..5bc245894777 100644 --- a/sw/inc/lineinfo.hxx +++ b/sw/inc/lineinfo.hxx @@ -37,17 +37,17 @@ enum LineNumberPosition class SW_DLLPUBLIC SwLineNumberInfo final : public SwClient /**< purpose of derivation from SwClient: character style for displaying the numbers. */ { - SvxNumberType aType; ///< e.g. roman linenumbers - OUString aDivider; ///< String for additional interval (vert. lines user defined) - sal_uInt16 nPosFromLeft; ///< Position for paint - sal_uInt16 nCountBy; ///< Paint only for every n line - sal_uInt16 nDividerCountBy; /**< Interval for display of an user defined + SvxNumberType m_aType; ///< e.g. roman linenumbers + OUString m_aDivider; ///< String for additional interval (vert. lines user defined) + sal_uInt16 m_nPosFromLeft; ///< Position for paint + sal_uInt16 m_nCountBy; ///< Paint only for every n line + sal_uInt16 m_nDividerCountBy; /**< Interval for display of an user defined string every n lines */ - LineNumberPosition ePos; ///< Where should the display occur (number and divider) - bool bPaintLineNumbers; ///< Should anything be displayed? - bool bCountBlankLines; ///< Count empty lines? - bool bCountInFlys; ///< Count also within FlyFrames? - bool bRestartEachPage; /**< Restart counting at the first paragraph of each page + LineNumberPosition m_ePos; ///< Where should the display occur (number and divider) + bool m_bPaintLineNumbers; ///< Should anything be displayed? + bool m_bCountBlankLines; ///< Count empty lines? + bool m_bCountInFlys; ///< Count also within FlyFrames? + bool m_bRestartEachPage; /**< Restart counting at the first paragraph of each page (even on follows when paragraphs are split) */ virtual void Modify( const SfxPoolItem*, const SfxPoolItem* ) override; @@ -60,34 +60,34 @@ public: SwCharFormat *GetCharFormat( IDocumentStylePoolAccess& rIDSPA ) const; void SetCharFormat( SwCharFormat* ); - const SvxNumberType &GetNumType() const { return aType; } - void SetNumType( SvxNumberType aNew ){ aType = aNew; } + const SvxNumberType &GetNumType() const { return m_aType; } + void SetNumType( SvxNumberType aNew ){ m_aType = aNew; } - const OUString& GetDivider() const { return aDivider; } - void SetDivider( const OUString &r ) { aDivider = r; } - sal_uInt16 GetDividerCountBy() const { return nDividerCountBy; } - void SetDividerCountBy( sal_uInt16 n ) { nDividerCountBy = n; } + const OUString& GetDivider() const { return m_aDivider; } + void SetDivider( const OUString &r ) { m_aDivider = r; } + sal_uInt16 GetDividerCountBy() const { return m_nDividerCountBy; } + void SetDividerCountBy( sal_uInt16 n ) { m_nDividerCountBy = n; } - sal_uInt16 GetPosFromLeft() const { return nPosFromLeft; } - void SetPosFromLeft( sal_uInt16 n) { nPosFromLeft = n; } + sal_uInt16 GetPosFromLeft() const { return m_nPosFromLeft; } + void SetPosFromLeft( sal_uInt16 n) { m_nPosFromLeft = n; } - sal_uInt16 GetCountBy() const { return nCountBy; } - void SetCountBy( sal_uInt16 n) { nCountBy = n; } + sal_uInt16 GetCountBy() const { return m_nCountBy; } + void SetCountBy( sal_uInt16 n) { m_nCountBy = n; } - LineNumberPosition GetPos() const { return ePos; } - void SetPos( LineNumberPosition eP ){ ePos = eP; } + LineNumberPosition GetPos() const { return m_ePos; } + void SetPos( LineNumberPosition eP ){ m_ePos = eP; } - bool IsPaintLineNumbers() const { return bPaintLineNumbers; } - void SetPaintLineNumbers( bool b ){ bPaintLineNumbers = b; } + bool IsPaintLineNumbers() const { return m_bPaintLineNumbers; } + void SetPaintLineNumbers( bool b ){ m_bPaintLineNumbers = b; } - bool IsCountBlankLines() const { return bCountBlankLines; } - void SetCountBlankLines( bool b ) { bCountBlankLines = b; } + bool IsCountBlankLines() const { return m_bCountBlankLines; } + void SetCountBlankLines( bool b ) { m_bCountBlankLines = b; } - bool IsCountInFlys() const { return bCountInFlys; } - void SetCountInFlys( bool b ) { bCountInFlys = b; } + bool IsCountInFlys() const { return m_bCountInFlys; } + void SetCountInFlys( bool b ) { m_bCountInFlys = b; } - bool IsRestartEachPage() const { return bRestartEachPage; } - void SetRestartEachPage( bool b ) { bRestartEachPage = b; } + bool IsRestartEachPage() const { return m_bRestartEachPage; } + void SetRestartEachPage( bool b ) { m_bRestartEachPage = b; } bool HasCharFormat() const { return GetRegisteredIn() != nullptr; } }; diff --git a/sw/inc/shellio.hxx b/sw/inc/shellio.hxx index 095dc77b6269..a55e38eebcc3 100644 --- a/sw/inc/shellio.hxx +++ b/sw/inc/shellio.hxx @@ -106,7 +106,7 @@ class Reader; class SwgReaderOption { - SwAsciiOptions aASCIIOpts; + SwAsciiOptions m_aASCIIOpts; bool m_bFrameFormats; bool m_bPageDescs; bool m_bTextFormats; @@ -132,9 +132,9 @@ public: bool IsMerge() const { return m_bMerge; } void SetMerge( const bool bNew ) { m_bMerge = bNew; } - const SwAsciiOptions& GetASCIIOpts() const { return aASCIIOpts; } - void SetASCIIOpts( const SwAsciiOptions& rOpts ) { aASCIIOpts = rOpts; } - void ResetASCIIOpts() { aASCIIOpts.Reset(); } + const SwAsciiOptions& GetASCIIOpts() const { return m_aASCIIOpts; } + void SetASCIIOpts( const SwAsciiOptions& rOpts ) { m_aASCIIOpts = rOpts; } + void ResetASCIIOpts() { m_aASCIIOpts.Reset(); } css::uno::Reference<css::io::XInputStream>& GetInputStream() { return m_xInputStream; } void SetInputStream(css::uno::Reference<css::io::XInputStream>& xInputStream) @@ -143,7 +143,7 @@ public: } SwgReaderOption() - { ResetAllFormatsOnly(); aASCIIOpts.Reset(); } + { ResetAllFormatsOnly(); m_aASCIIOpts.Reset(); } }; // Calls reader with its options, document, cursor etc. @@ -504,15 +504,15 @@ public: class SW_DLLPUBLIC SwWriter { - SvStream* pStrm; - css::uno::Reference < css::embed::XStorage > xStg; - SfxMedium* pMedium; + SvStream* m_pStrm; + css::uno::Reference < css::embed::XStorage > m_xStg; + SfxMedium* m_pMedium; - SwPaM* const pOutPam; - SwCursorShell *pShell; - SwDoc &rDoc; + SwPaM* const m_pOutPam; + SwCursorShell *m_pShell; + SwDoc &m_rDoc; - bool bWriteAll; + bool m_bWriteAll; public: ErrCode Write( WriterRef const & rxWriter, const OUString* = nullptr); diff --git a/sw/source/core/doc/extinput.cxx b/sw/source/core/doc/extinput.cxx index e9076064a745..d9d22c25f695 100644 --- a/sw/source/core/doc/extinput.cxx +++ b/sw/source/core/doc/extinput.cxx @@ -38,10 +38,10 @@ using namespace ::com::sun::star; SwExtTextInput::SwExtTextInput( const SwPaM& rPam, Ring* pRing ) : SwPaM( *rPam.GetPoint(), static_cast<SwPaM*>(pRing) ), - eInputLanguage(LANGUAGE_DONTKNOW) + m_eInputLanguage(LANGUAGE_DONTKNOW) { - bIsOverwriteCursor = false; - bInsText = true; + m_bIsOverwriteCursor = false; + m_bInsText = true; } SwExtTextInput::~SwExtTextInput() @@ -69,17 +69,17 @@ SwExtTextInput::~SwExtTextInput() // we need to go through the Doc interface rIdx = nSttCnt; const OUString sText( pTNd->GetText().copy(nSttCnt, nEndCnt - nSttCnt)); - if( bIsOverwriteCursor && !sOverwriteText.isEmpty() ) + if( m_bIsOverwriteCursor && !m_sOverwriteText.isEmpty() ) { const sal_Int32 nLen = sText.getLength(); - const sal_Int32 nOWLen = sOverwriteText.getLength(); + const sal_Int32 nOWLen = m_sOverwriteText.getLength(); if( nLen > nOWLen ) { rIdx += nOWLen; pTNd->EraseText( rIdx, nLen - nOWLen ); rIdx = nSttCnt; - pTNd->ReplaceText( rIdx, nOWLen, sOverwriteText ); - if( bInsText ) + pTNd->ReplaceText( rIdx, nOWLen, m_sOverwriteText ); + if( m_bInsText ) { rIdx = nSttCnt; pDoc->GetIDocumentUndoRedo().StartUndo( SwUndoId::OVERWRITE, nullptr ); @@ -90,8 +90,8 @@ SwExtTextInput::~SwExtTextInput() } else { - pTNd->ReplaceText( rIdx, nLen, sOverwriteText.copy( 0, nLen )); - if( bInsText ) + pTNd->ReplaceText( rIdx, nLen, m_sOverwriteText.copy( 0, nLen )); + if( m_bInsText ) { rIdx = nSttCnt; pDoc->getIDocumentContentOperations().Overwrite( *this, sText ); @@ -102,16 +102,16 @@ SwExtTextInput::~SwExtTextInput() { pTNd->EraseText( rIdx, nEndCnt - nSttCnt ); - if( bInsText ) + if( m_bInsText ) { pDoc->getIDocumentContentOperations().InsertString( *this, sText ); } } pDoc->GetIDocumentUndoRedo().DoGroupUndo(bKeepGroupUndo); - if (eInputLanguage != LANGUAGE_DONTKNOW) + if (m_eInputLanguage != LANGUAGE_DONTKNOW) { sal_uInt16 nWhich = RES_CHRATR_LANGUAGE; - sal_Int16 nScriptType = SvtLanguageOptions::GetI18NScriptTypeOfLanguage(eInputLanguage); + sal_Int16 nScriptType = SvtLanguageOptions::GetI18NScriptTypeOfLanguage(m_eInputLanguage); switch(nScriptType) { case i18n::ScriptType::ASIAN: @@ -120,9 +120,9 @@ SwExtTextInput::~SwExtTextInput() nWhich = RES_CHRATR_CTL_LANGUAGE; break; } // #i41974# Only set language attribute for CJK/CTL scripts. - if (RES_CHRATR_LANGUAGE != nWhich && pTNd->GetLang( nSttCnt, nEndCnt-nSttCnt, nScriptType) != eInputLanguage) + if (RES_CHRATR_LANGUAGE != nWhich && pTNd->GetLang( nSttCnt, nEndCnt-nSttCnt, nScriptType) != m_eInputLanguage) { - SvxLanguageItem aLangItem( eInputLanguage, nWhich ); + SvxLanguageItem aLangItem( m_eInputLanguage, nWhich ); rIdx = nSttCnt; GetMark()->nContent = nEndCnt; pDoc->getIDocumentContentOperations().InsertPoolItem(*this, aLangItem ); @@ -148,7 +148,7 @@ void SwExtTextInput::SetInputData( const CommandExtTextInputData& rData ) SwIndex aIdx( pTNd, nSttCnt ); const OUString& rNewStr = rData.GetText(); - if( bIsOverwriteCursor && !sOverwriteText.isEmpty() ) + if( m_bIsOverwriteCursor && !m_sOverwriteText.isEmpty() ) { sal_Int32 nReplace = nEndCnt - nSttCnt; const sal_Int32 nNewLen = rNewStr.getLength(); @@ -158,13 +158,13 @@ void SwExtTextInput::SetInputData( const CommandExtTextInputData& rData ) nReplace -= nNewLen; aIdx += nNewLen; pTNd->ReplaceText( aIdx, nReplace, - sOverwriteText.copy( nNewLen, nReplace )); + m_sOverwriteText.copy( nNewLen, nReplace )); aIdx = nSttCnt; nReplace = nNewLen; } else { - const sal_Int32 nOWLen = sOverwriteText.getLength(); + const sal_Int32 nOWLen = m_sOverwriteText.getLength(); if( nOWLen < nReplace ) { aIdx += nOWLen; @@ -198,19 +198,19 @@ void SwExtTextInput::SetInputData( const CommandExtTextInputData& rData ) GetPoint()->nContent = nSttCnt; - aAttrs.clear(); + m_aAttrs.clear(); if( rData.GetTextAttr() ) { const ExtTextInputAttr *pAttrs = rData.GetTextAttr(); - aAttrs.insert( aAttrs.begin(), pAttrs, pAttrs + rData.GetText().getLength() ); + m_aAttrs.insert( m_aAttrs.begin(), pAttrs, pAttrs + rData.GetText().getLength() ); } } } void SwExtTextInput::SetOverwriteCursor( bool bFlag ) { - bIsOverwriteCursor = bFlag; - if (!bIsOverwriteCursor) + m_bIsOverwriteCursor = bFlag; + if (!m_bIsOverwriteCursor) return; const SwTextNode *const pTNd = GetPoint()->nNode.GetNode().GetTextNode(); @@ -218,11 +218,11 @@ void SwExtTextInput::SetOverwriteCursor( bool bFlag ) { const sal_Int32 nSttCnt = GetPoint()->nContent.GetIndex(); const sal_Int32 nEndCnt = GetMark()->nContent.GetIndex(); - sOverwriteText = pTNd->GetText().copy( std::min(nSttCnt, nEndCnt) ); - if( !sOverwriteText.isEmpty() ) + m_sOverwriteText = pTNd->GetText().copy( std::min(nSttCnt, nEndCnt) ); + if( !m_sOverwriteText.isEmpty() ) { - const sal_Int32 nInPos = sOverwriteText.indexOf( CH_TXTATR_INWORD ); - const sal_Int32 nBrkPos = sOverwriteText.indexOf( CH_TXTATR_BREAKWORD ); + const sal_Int32 nInPos = m_sOverwriteText.indexOf( CH_TXTATR_INWORD ); + const sal_Int32 nBrkPos = m_sOverwriteText.indexOf( CH_TXTATR_BREAKWORD ); // Find the first attr found, if any. sal_Int32 nPos = std::min(nInPos, nBrkPos); @@ -232,7 +232,7 @@ void SwExtTextInput::SetOverwriteCursor( bool bFlag ) } if (nPos>=0) { - sOverwriteText = sOverwriteText.copy( 0, nPos ); + m_sOverwriteText = m_sOverwriteText.copy( 0, nPos ); } } } diff --git a/sw/source/core/doc/lineinfo.cxx b/sw/source/core/doc/lineinfo.cxx index 6856401a73fb..9922e3aa1012 100644 --- a/sw/source/core/doc/lineinfo.cxx +++ b/sw/source/core/doc/lineinfo.cxx @@ -52,28 +52,28 @@ const SwLineNumberInfo& SwDoc::GetLineNumberInfo() const } SwLineNumberInfo::SwLineNumberInfo() : - nPosFromLeft( MM50 ), - nCountBy( 5 ), - nDividerCountBy( 3 ), - ePos( LINENUMBER_POS_LEFT ), - bPaintLineNumbers( false ), - bCountBlankLines( true ), - bCountInFlys( false ), - bRestartEachPage( false ) + m_nPosFromLeft( MM50 ), + m_nCountBy( 5 ), + m_nDividerCountBy( 3 ), + m_ePos( LINENUMBER_POS_LEFT ), + m_bPaintLineNumbers( false ), + m_bCountBlankLines( true ), + m_bCountInFlys( false ), + m_bRestartEachPage( false ) { } SwLineNumberInfo::SwLineNumberInfo(const SwLineNumberInfo &rCpy ) : SwClient(), - aType( rCpy.GetNumType() ), - aDivider( rCpy.GetDivider() ), - nPosFromLeft( rCpy.GetPosFromLeft() ), - nCountBy( rCpy.GetCountBy() ), - nDividerCountBy( rCpy.GetDividerCountBy() ), - ePos( rCpy.GetPos() ), - bPaintLineNumbers( rCpy.IsPaintLineNumbers() ), - bCountBlankLines( rCpy.IsCountBlankLines() ), - bCountInFlys( rCpy.IsCountInFlys() ), - bRestartEachPage( rCpy.IsRestartEachPage() ) + m_aType( rCpy.GetNumType() ), + m_aDivider( rCpy.GetDivider() ), + m_nPosFromLeft( rCpy.GetPosFromLeft() ), + m_nCountBy( rCpy.GetCountBy() ), + m_nDividerCountBy( rCpy.GetDividerCountBy() ), + m_ePos( rCpy.GetPos() ), + m_bPaintLineNumbers( rCpy.IsPaintLineNumbers() ), + m_bCountBlankLines( rCpy.IsCountBlankLines() ), + m_bCountInFlys( rCpy.IsCountInFlys() ), + m_bRestartEachPage( rCpy.IsRestartEachPage() ) { StartListeningToSameModifyAs(rCpy); } @@ -82,16 +82,16 @@ SwLineNumberInfo& SwLineNumberInfo::operator=(const SwLineNumberInfo &rCpy) { StartListeningToSameModifyAs(rCpy); - aType = rCpy.GetNumType(); - aDivider = rCpy.GetDivider(); - nPosFromLeft = rCpy.GetPosFromLeft(); - nCountBy = rCpy.GetCountBy(); - nDividerCountBy = rCpy.GetDividerCountBy(); - ePos = rCpy.GetPos(); - bPaintLineNumbers = rCpy.IsPaintLineNumbers(); - bCountBlankLines = rCpy.IsCountBlankLines(); - bCountInFlys = rCpy.IsCountInFlys(); - bRestartEachPage = rCpy.IsRestartEachPage(); + m_aType = rCpy.GetNumType(); + m_aDivider = rCpy.GetDivider(); + m_nPosFromLeft = rCpy.GetPosFromLeft(); + m_nCountBy = rCpy.GetCountBy(); + m_nDividerCountBy = rCpy.GetDividerCountBy(); + m_ePos = rCpy.GetPos(); + m_bPaintLineNumbers = rCpy.IsPaintLineNumbers(); + m_bCountBlankLines = rCpy.IsCountBlankLines(); + m_bCountInFlys = rCpy.IsCountInFlys(); + m_bRestartEachPage = rCpy.IsRestartEachPage(); return *this; } diff --git a/sw/source/filter/basflt/shellio.cxx b/sw/source/filter/basflt/shellio.cxx index 25568a51ad32..3a5f44e35a60 100644 --- a/sw/source/filter/basflt/shellio.cxx +++ b/sw/source/filter/basflt/shellio.cxx @@ -687,37 +687,37 @@ SwReaderType StgReader::GetReaderType() */ SwWriter::SwWriter(SvStream& rStrm, SwCursorShell &rShell, bool bInWriteAll) - : pStrm(&rStrm), pMedium(nullptr), pOutPam(nullptr), pShell(&rShell), - rDoc(*rShell.GetDoc()), bWriteAll(bInWriteAll) + : m_pStrm(&rStrm), m_pMedium(nullptr), m_pOutPam(nullptr), m_pShell(&rShell), + m_rDoc(*rShell.GetDoc()), m_bWriteAll(bInWriteAll) { } SwWriter::SwWriter(SvStream& rStrm,SwDoc &rDocument) - : pStrm(&rStrm), pMedium(nullptr), pOutPam(nullptr), pShell(nullptr), rDoc(rDocument), - bWriteAll(true) + : m_pStrm(&rStrm), m_pMedium(nullptr), m_pOutPam(nullptr), m_pShell(nullptr), m_rDoc(rDocument), + m_bWriteAll(true) { } SwWriter::SwWriter(SvStream& rStrm, SwPaM& rPam, bool bInWriteAll) - : pStrm(&rStrm), pMedium(nullptr), pOutPam(&rPam), pShell(nullptr), - rDoc(*rPam.GetDoc()), bWriteAll(bInWriteAll) + : m_pStrm(&rStrm), m_pMedium(nullptr), m_pOutPam(&rPam), m_pShell(nullptr), + m_rDoc(*rPam.GetDoc()), m_bWriteAll(bInWriteAll) { } SwWriter::SwWriter( const uno::Reference < embed::XStorage >& rStg, SwDoc &rDocument) - : pStrm(nullptr), xStg( rStg ), pMedium(nullptr), pOutPam(nullptr), pShell(nullptr), rDoc(rDocument), bWriteAll(true) + : m_pStrm(nullptr), m_xStg( rStg ), m_pMedium(nullptr), m_pOutPam(nullptr), m_pShell(nullptr), m_rDoc(rDocument), m_bWriteAll(true) { } SwWriter::SwWriter(SfxMedium& rMedium, SwCursorShell &rShell, bool bInWriteAll) - : pStrm(nullptr), pMedium(&rMedium), pOutPam(nullptr), pShell(&rShell), - rDoc(*rShell.GetDoc()), bWriteAll(bInWriteAll) + : m_pStrm(nullptr), m_pMedium(&rMedium), m_pOutPam(nullptr), m_pShell(&rShell), + m_rDoc(*rShell.GetDoc()), m_bWriteAll(bInWriteAll) { } SwWriter::SwWriter(SfxMedium& rMedium, SwDoc &rDocument) - : pStrm(nullptr), pMedium(&rMedium), pOutPam(nullptr), pShell(nullptr), rDoc(rDocument), - bWriteAll(true) + : m_pStrm(nullptr), m_pMedium(&rMedium), m_pOutPam(nullptr), m_pShell(nullptr), m_rDoc(rDocument), + m_bWriteAll(true) { } @@ -732,9 +732,9 @@ ErrCode SwWriter::Write( WriterRef const & rxWriter, const OUString* pRealFileNa rtl::Reference<SwDoc> xDoc; - if ( pShell && !bWriteAll && pShell->IsTableMode() ) + if ( m_pShell && !m_bWriteAll && m_pShell->IsTableMode() ) { - bWriteAll = true; + m_bWriteAll = true; xDoc = new SwDoc; // Copy parts of a table: @@ -743,7 +743,7 @@ ErrCode SwWriter::Write( WriterRef const & rxWriter, const OUString* pRealFileNa // search the layout for cells SwSelBoxes aBoxes; - GetTableSel( *pShell, aBoxes ); + GetTableSel( *m_pShell, aBoxes ); const SwTableNode* pTableNd = static_cast<const SwTableNode*>(aBoxes[0]->GetSttNd()->StartOfSectionNode()); SwNodeIndex aIdx( xDoc->GetNodes().GetEndOfExtras(), 2 ); SwContentNode *pNd = aIdx.GetNode().GetContentNode(); @@ -752,12 +752,12 @@ ErrCode SwWriter::Write( WriterRef const & rxWriter, const OUString* pRealFileNa pTableNd->GetTable().MakeCopy( xDoc.get(), aPos, aBoxes ); } - if( !bWriteAll && ( pShell || pOutPam )) + if( !m_bWriteAll && ( m_pShell || m_pOutPam )) { - if( pShell ) - pPam = pShell->GetCursor(); + if( m_pShell ) + pPam = m_pShell->GetCursor(); else - pPam = pOutPam; + pPam = m_pOutPam; SwPaM *pEnd = pPam; @@ -773,12 +773,12 @@ ErrCode SwWriter::Write( WriterRef const & rxWriter, const OUString* pRealFileNa // if there is no selection, select the whole document if(!bHasMark) { - if( pShell ) + if( m_pShell ) { - pShell->Push(); - pShell->SttEndDoc(true); - pShell->SetMark(); - pShell->SttEndDoc(false); + m_pShell->Push(); + m_pShell->SttEndDoc(true); + m_pShell->SetMark(); + m_pShell->SttEndDoc(false); } else { @@ -793,7 +793,7 @@ ErrCode SwWriter::Write( WriterRef const & rxWriter, const OUString* pRealFileNa else { // no Shell or write-everything -> create a Pam - SwDoc* pOutDoc = xDoc.is() ? xDoc.get() : &rDoc; + SwDoc* pOutDoc = xDoc.is() ? xDoc.get() : &m_rDoc; pTempCursor = pOutDoc->CreateUnoCursor( SwPosition(pOutDoc->GetNodes().GetEndOfContent()), false); pPam = pTempCursor.get(); @@ -810,8 +810,8 @@ ErrCode SwWriter::Write( WriterRef const & rxWriter, const OUString* pRealFileNa } } - rxWriter->m_bWriteAll = bWriteAll; - SwDoc* pOutDoc = xDoc.is() ? xDoc.get() : &rDoc; + rxWriter->m_bWriteAll = m_bWriteAll; + SwDoc* pOutDoc = xDoc.is() ? xDoc.get() : &m_rDoc; // If the default PageDesc has still the initial value, // (e.g. if no printer was set) then set it to DIN A4. @@ -849,12 +849,12 @@ ErrCode SwWriter::Write( WriterRef const & rxWriter, const OUString* pRealFileNa pOutDoc->SetInWriting(true); ErrCode nError = ERRCODE_NONE; - if( pMedium ) - nError = rxWriter->Write( *pPam, *pMedium, pRealFileName ); - else if( pStrm ) - nError = rxWriter->Write( *pPam, *pStrm, pRealFileName ); - else if( xStg.is() ) - nError = rxWriter->Write( *pPam, xStg, pRealFileName ); + if( m_pMedium ) + nError = rxWriter->Write( *pPam, *m_pMedium, pRealFileName ); + else if( m_pStrm ) + nError = rxWriter->Write( *pPam, *m_pStrm, pRealFileName ); + else if( m_xStg.is() ) + nError = rxWriter->Write( *pPam, m_xStg, pRealFileName ); pOutDoc->SetInWriting(false); xGuard.reset(); @@ -866,12 +866,12 @@ ErrCode SwWriter::Write( WriterRef const & rxWriter, const OUString* pRealFileNa } // If the selection was only created for printing, reset the old cursor before returning - if( !bWriteAll && ( pShell || pOutPam )) + if( !m_bWriteAll && ( m_pShell || m_pOutPam )) { if(!bHasMark) { - if( pShell ) - pShell->Pop(SwCursorShell::PopMode::DeleteCurrent); + if( m_pShell ) + m_pShell->Pop(SwCursorShell::PopMode::DeleteCurrent); else delete pPam; } @@ -881,16 +881,16 @@ ErrCode SwWriter::Write( WriterRef const & rxWriter, const OUString* pRealFileNa // Everything was written successfully? Tell the document! if ( !nError.IsError() && !xDoc.is() ) { - rDoc.getIDocumentState().ResetModified(); + m_rDoc.getIDocumentState().ResetModified(); // #i38810# - reset also flag, that indicates updated links - rDoc.getIDocumentLinksAdministration().SetLinksUpdated( false ); + m_rDoc.getIDocumentLinksAdministration().SetLinksUpdated( false ); } } if ( xDoc.is() ) { xDoc.clear(); - bWriteAll = false; + m_bWriteAll = false; } return nError; |