sw/source/core/text/porfld.cxx | 42 ++++++------ sw/source/core/text/porfld.hxx | 20 ++--- sw/source/core/text/pormulti.cxx | 134 +++++++++++++++++++-------------------- sw/source/core/text/pormulti.hxx | 26 +++---- sw/source/core/text/txtpaint.cxx | 38 +++++------ sw/source/core/text/txtpaint.hxx | 20 ++--- 6 files changed, 140 insertions(+), 140 deletions(-)
New commits: commit c5f3b3d38fb272c261987c25e4378c556bae0c5a Author: Miklos Vajna <vmik...@collabora.com> AuthorDate: Mon Jan 25 08:59:04 2021 +0100 Commit: Miklos Vajna <vmik...@collabora.com> CommitDate: Mon Jan 25 12:30:57 2021 +0100 sw: prefix members of SwBidiPortion, SwDoubleLinePortion, ... ... SwGrfNumPortion and SwSaveClip See tdf#94879 for motivation. Change-Id: Iade32e16fa36555aacbfe794895d015bee0226de Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109866 Reviewed-by: Miklos Vajna <vmik...@collabora.com> Tested-by: Jenkins diff --git a/sw/source/core/text/porfld.cxx b/sw/source/core/text/porfld.cxx index 37268cb6894d..0f3c31141342 100644 --- a/sw/source/core/text/porfld.cxx +++ b/sw/source/core/text/porfld.cxx @@ -761,14 +761,14 @@ SwGrfNumPortion::SwGrfNumPortion( const bool bLabelAlignmentPosAndSpaceModeActive ) : SwNumberPortion( rGraphicFollowedBy, nullptr, bLft, bCntr, nMinDst, bLabelAlignmentPosAndSpaceModeActive ), - pBrush( new SvxBrushItem(RES_BACKGROUND) ), nId( 0 ) + m_pBrush( new SvxBrushItem(RES_BACKGROUND) ), m_nId( 0 ) { SetWhichPor( PortionType::GrfNum ); SetAnimated( false ); m_bReplace = false; if( pGrfBrush ) { - pBrush.reset(pGrfBrush->Clone()); + m_pBrush.reset(pGrfBrush->Clone()); const Graphic* pGraph = pGrfBrush->GetGraphic(referer); if( pGraph ) SetAnimated( pGraph->IsAnimated() ); @@ -777,18 +777,18 @@ SwGrfNumPortion::SwGrfNumPortion( } if( pGrfOrient ) { - nYPos = pGrfOrient->GetPos(); - eOrient = pGrfOrient->GetVertOrient(); + m_nYPos = pGrfOrient->GetPos(); + m_eOrient = pGrfOrient->GetVertOrient(); } else { - nYPos = 0; - eOrient = text::VertOrientation::TOP; + m_nYPos = 0; + m_eOrient = text::VertOrientation::TOP; } Width( static_cast<sal_uInt16>(rGrfSize.Width() + 2 * GRFNUM_SECURE) ); nFixWidth = Width(); - nGrfHeight = rGrfSize.Height() + 2 * GRFNUM_SECURE; - Height( sal_uInt16(nGrfHeight) ); + m_nGrfHeight = rGrfSize.Height() + 2 * GRFNUM_SECURE; + Height( sal_uInt16(m_nGrfHeight) ); m_bNoPaint = false; } @@ -796,20 +796,20 @@ SwGrfNumPortion::~SwGrfNumPortion() { if ( IsAnimated() ) { - Graphic* pGraph = const_cast<Graphic*>(pBrush->GetGraphic()); + Graphic* pGraph = const_cast<Graphic*>(m_pBrush->GetGraphic()); if (pGraph) - pGraph->StopAnimation( nullptr, nId ); + pGraph->StopAnimation( nullptr, m_nId ); } - pBrush.reset(); + m_pBrush.reset(); } void SwGrfNumPortion::StopAnimation( const OutputDevice* pOut ) { if ( IsAnimated() ) { - Graphic* pGraph = const_cast<Graphic*>(pBrush->GetGraphic()); + Graphic* pGraph = const_cast<Graphic*>(m_pBrush->GetGraphic()); if (pGraph) - pGraph->StopAnimation( pOut, nId ); + pGraph->StopAnimation( pOut, m_nId ); } } @@ -930,7 +930,7 @@ void SwGrfNumPortion::Paint( const SwTextPaintInfo &rInf ) const if ( IsAnimated() ) { bDraw = !rInf.GetOpt().IsGraphic(); - if( !nId ) + if( !m_nId ) { SetId( reinterpret_cast<sal_IntPtr>( rInf.GetTextFrame() ) ); rInf.GetTextFrame()->SetAnimation(); @@ -944,9 +944,9 @@ void SwGrfNumPortion::Paint( const SwTextPaintInfo &rInf ) const if( OUTDEV_VIRDEV == rInf.GetOut()->GetOutDevType() && pViewShell && pViewShell->GetWin() ) { - Graphic* pGraph = const_cast<Graphic*>(pBrush->GetGraphic()); + Graphic* pGraph = const_cast<Graphic*>(m_pBrush->GetGraphic()); if (pGraph) - pGraph->StopAnimation(nullptr,nId); + pGraph->StopAnimation(nullptr,m_nId); rInf.GetTextFrame()->getRootFrame()->GetCurrShell()->InvalidateWindows( aTmp ); } @@ -956,11 +956,11 @@ void SwGrfNumPortion::Paint( const SwTextPaintInfo &rInf ) const // #i9684# Stop animation during printing/pdf export. pViewShell->GetWin() ) { - Graphic* pGraph = const_cast<Graphic*>(pBrush->GetGraphic()); + Graphic* pGraph = const_cast<Graphic*>(m_pBrush->GetGraphic()); if (pGraph) { pGraph->StartAnimation( - const_cast<OutputDevice*>(rInf.GetOut()), aPos, aSize, nId ); + const_cast<OutputDevice*>(rInf.GetOut()), aPos, aSize, m_nId ); } } @@ -971,9 +971,9 @@ void SwGrfNumPortion::Paint( const SwTextPaintInfo &rInf ) const if( bDraw ) { - Graphic* pGraph = const_cast<Graphic*>(pBrush->GetGraphic()); + Graphic* pGraph = const_cast<Graphic*>(m_pBrush->GetGraphic()); if (pGraph) - pGraph->StopAnimation( nullptr, nId ); + pGraph->StopAnimation( nullptr, m_nId ); } } @@ -993,7 +993,7 @@ void SwGrfNumPortion::Paint( const SwTextPaintInfo &rInf ) const if( bDraw && aTmp.HasArea() ) { - DrawGraphic( pBrush.get(), const_cast<OutputDevice*>(rInf.GetOut()), + DrawGraphic( m_pBrush.get(), const_cast<OutputDevice*>(rInf.GetOut()), aTmp, aRepaint, m_bReplace ? GRFNUM_REPLACE : GRFNUM_YES ); } } diff --git a/sw/source/core/text/porfld.hxx b/sw/source/core/text/porfld.hxx index 7519cd578e5b..42575a09e7b3 100644 --- a/sw/source/core/text/porfld.hxx +++ b/sw/source/core/text/porfld.hxx @@ -162,11 +162,11 @@ public: class SwGrfNumPortion : public SwNumberPortion { - std::unique_ptr<SvxBrushItem> pBrush; - tools::Long nId; // For StopAnimation - SwTwips nYPos; // _Always_ contains the current RelPos - SwTwips nGrfHeight; - sal_Int16 eOrient; + std::unique_ptr<SvxBrushItem> m_pBrush; + tools::Long m_nId; // For StopAnimation + SwTwips m_nYPos; // _Always_ contains the current RelPos + SwTwips m_nGrfHeight; + sal_Int16 m_eOrient; public: SwGrfNumPortion( const OUString& rGraphicFollowedBy, const SvxBrushItem* pGrfBrush, @@ -188,12 +188,12 @@ public: bool IsAnimated() const { return m_bAnimated; } void SetAnimated( bool bNew ) { m_bAnimated = bNew; } - void SetRelPos( SwTwips nNew ) { nYPos = nNew; } + void SetRelPos( SwTwips nNew ) { m_nYPos = nNew; } void SetId( tools::Long nNew ) const - { const_cast<SwGrfNumPortion*>(this)->nId = nNew; } - SwTwips GetRelPos() const { return nYPos; } - SwTwips GetGrfHeight() const { return nGrfHeight; } - sal_Int16 GetOrient() const { return eOrient; } + { const_cast<SwGrfNumPortion*>(this)->m_nId = nNew; } + SwTwips GetRelPos() const { return m_nYPos; } + SwTwips GetGrfHeight() const { return m_nGrfHeight; } + sal_Int16 GetOrient() const { return m_eOrient; } }; /** diff --git a/sw/source/core/text/pormulti.cxx b/sw/source/core/text/pormulti.cxx index 74c3e22543c9..410707d8d4bf 100644 --- a/sw/source/core/text/pormulti.cxx +++ b/sw/source/core/text/pormulti.cxx @@ -183,11 +183,11 @@ SwRotatedPortion::SwRotatedPortion( const SwMultiCreator& rCreate, } SwBidiPortion::SwBidiPortion(TextFrameIndex const nEnd, sal_uInt8 nLv) - : SwMultiPortion( nEnd ), nLevel( nLv ) + : SwMultiPortion( nEnd ), m_nLevel( nLv ) { SetBidi(); - if ( nLevel % 2 ) + if ( m_nLevel % 2 ) SetDirection( DIR_RIGHT2LEFT ); else SetDirection( DIR_LEFT2RIGHT ); @@ -238,9 +238,9 @@ TextFrameIndex SwBidiPortion::GetSpaceCnt(const SwTextSizeInfo &rInf) const SwDoubleLinePortion::SwDoubleLinePortion( SwDoubleLinePortion& rDouble, TextFrameIndex const nEnd) : SwMultiPortion(nEnd) - , nLineDiff(0) - , nBlank1(0) - , nBlank2(0) + , m_nLineDiff(0) + , m_nBlank1(0) + , m_nBlank2(0) { SetDirection( rDouble.GetDirection() ); SetDouble(); @@ -264,24 +264,24 @@ SwDoubleLinePortion::SwDoubleLinePortion( SwDoubleLinePortion::SwDoubleLinePortion( const SwMultiCreator& rCreate, TextFrameIndex const nEnd) : SwMultiPortion(nEnd) - , pBracket(new SwBracket) - , nLineDiff(0) - , nBlank1(0) - , nBlank2(0) + , m_pBracket(new SwBracket) + , m_nLineDiff(0) + , m_nBlank1(0) + , m_nBlank2(0) { - pBracket->nAscent = 0; - pBracket->nHeight = 0; - pBracket->nPreWidth = 0; - pBracket->nPostWidth = 0; + m_pBracket->nAscent = 0; + m_pBracket->nHeight = 0; + m_pBracket->nPreWidth = 0; + m_pBracket->nPostWidth = 0; SetDouble(); const SvxTwoLinesItem* pTwo = static_cast<const SvxTwoLinesItem*>(rCreate.pItem); if( pTwo ) - pBracket->nStart = TextFrameIndex(0); + m_pBracket->nStart = TextFrameIndex(0); else { const SwTextAttr& rAttr = *rCreate.pAttr; - pBracket->nStart = rCreate.nStartOfAttr; + m_pBracket->nStart = rCreate.nStartOfAttr; const SfxPoolItem * const pItem = CharFormat::GetItem( rAttr, RES_CHRATR_TWO_LINES ); @@ -292,32 +292,32 @@ SwDoubleLinePortion::SwDoubleLinePortion( } if( pTwo ) { - pBracket->cPre = pTwo->GetStartBracket(); - pBracket->cPost = pTwo->GetEndBracket(); + m_pBracket->cPre = pTwo->GetStartBracket(); + m_pBracket->cPost = pTwo->GetEndBracket(); } else { - pBracket->cPre = 0; - pBracket->cPost = 0; + m_pBracket->cPre = 0; + m_pBracket->cPost = 0; } SwFontScript nTmp = SW_SCRIPTS; - if( pBracket->cPre > 255 ) + if( m_pBracket->cPre > 255 ) { - OUString aText(pBracket->cPre); + OUString aText(m_pBracket->cPre); nTmp = SwScriptInfo::WhichFont(0, aText); } - pBracket->nPreScript = nTmp; + m_pBracket->nPreScript = nTmp; nTmp = SW_SCRIPTS; - if( pBracket->cPost > 255 ) + if( m_pBracket->cPost > 255 ) { - OUString aText(pBracket->cPost); + OUString aText(m_pBracket->cPost); nTmp = SwScriptInfo::WhichFont(0, aText); } - pBracket->nPostScript = nTmp; + m_pBracket->nPostScript = nTmp; - if( !pBracket->cPre && !pBracket->cPost ) + if( !m_pBracket->cPre && !m_pBracket->cPost ) { - pBracket.reset(); + m_pBracket.reset(); } // double line portions have the same direction as the frame directions @@ -336,7 +336,7 @@ void SwDoubleLinePortion::PaintBracket( SwTextPaintInfo &rInf, tools::Long nSpaceAdd, bool bOpen ) const { - sal_Unicode cCh = bOpen ? pBracket->cPre : pBracket->cPost; + sal_Unicode cCh = bOpen ? m_pBracket->cPre : m_pBracket->cPost; if( !cCh ) return; const sal_uInt16 nChWidth = bOpen ? PreWidth() : PostWidth(); @@ -347,12 +347,12 @@ void SwDoubleLinePortion::PaintBracket( SwTextPaintInfo &rInf, ( nSpaceAdd > 0 ? CalcSpacing( nSpaceAdd, rInf ) : 0 ) ); SwBlankPortion aBlank( cCh, true ); - aBlank.SetAscent( pBracket->nAscent ); + aBlank.SetAscent( m_pBracket->nAscent ); aBlank.Width( nChWidth ); - aBlank.Height( pBracket->nHeight ); + aBlank.Height( m_pBracket->nHeight ); { std::unique_ptr<SwFont> pTmpFnt( new SwFont( *rInf.GetFont() ) ); - SwFontScript nAct = bOpen ? pBracket->nPreScript : pBracket->nPostScript; + SwFontScript nAct = bOpen ? m_pBracket->nPreScript : m_pBracket->nPostScript; if( SW_SCRIPTS > nAct ) pTmpFnt->SetActual( nAct ); pTmpFnt->SetProportion( 100 ); @@ -367,14 +367,14 @@ void SwDoubleLinePortion::PaintBracket( SwTextPaintInfo &rInf, // and fills it, if not both characters are 0x00. void SwDoubleLinePortion::SetBrackets( const SwDoubleLinePortion& rDouble ) { - if( rDouble.pBracket ) + if( rDouble.m_pBracket ) { - pBracket.reset( new SwBracket ); - pBracket->cPre = rDouble.pBracket->cPre; - pBracket->cPost = rDouble.pBracket->cPost; - pBracket->nPreScript = rDouble.pBracket->nPreScript; - pBracket->nPostScript = rDouble.pBracket->nPostScript; - pBracket->nStart = rDouble.pBracket->nStart; + m_pBracket.reset( new SwBracket ); + m_pBracket->cPre = rDouble.m_pBracket->cPre; + m_pBracket->cPost = rDouble.m_pBracket->cPost; + m_pBracket->nPreScript = rDouble.m_pBracket->nPreScript; + m_pBracket->nPostScript = rDouble.m_pBracket->nPostScript; + m_pBracket->nStart = rDouble.m_pBracket->nStart; } } @@ -386,61 +386,61 @@ void SwDoubleLinePortion::FormatBrackets( SwTextFormatInfo &rInf, SwTwips& nMaxW nMaxWidth -= rInf.X(); std::unique_ptr<SwFont> pTmpFnt( new SwFont( *rInf.GetFont() ) ); pTmpFnt->SetProportion( 100 ); - pBracket->nAscent = 0; - pBracket->nHeight = 0; - if( pBracket->cPre ) + m_pBracket->nAscent = 0; + m_pBracket->nHeight = 0; + if( m_pBracket->cPre ) { - OUString aStr( pBracket->cPre ); + OUString aStr( m_pBracket->cPre ); SwFontScript nActualScr = pTmpFnt->GetActual(); - if( SW_SCRIPTS > pBracket->nPreScript ) - pTmpFnt->SetActual( pBracket->nPreScript ); + if( SW_SCRIPTS > m_pBracket->nPreScript ) + pTmpFnt->SetActual( m_pBracket->nPreScript ); SwFontSave aSave( rInf, pTmpFnt.get() ); SwPosSize aSize = rInf.GetTextSize( aStr ); - pBracket->nAscent = rInf.GetAscent(); - pBracket->nHeight = aSize.Height(); + m_pBracket->nAscent = rInf.GetAscent(); + m_pBracket->nHeight = aSize.Height(); pTmpFnt->SetActual( nActualScr ); if( nMaxWidth > aSize.Width() ) { - pBracket->nPreWidth = aSize.Width(); + m_pBracket->nPreWidth = aSize.Width(); nMaxWidth -= aSize.Width(); rInf.X( rInf.X() + aSize.Width() ); } else { - pBracket->nPreWidth = 0; + m_pBracket->nPreWidth = 0; nMaxWidth = 0; } } else - pBracket->nPreWidth = 0; - if( pBracket->cPost ) + m_pBracket->nPreWidth = 0; + if( m_pBracket->cPost ) { - OUString aStr( pBracket->cPost ); - if( SW_SCRIPTS > pBracket->nPostScript ) - pTmpFnt->SetActual( pBracket->nPostScript ); + OUString aStr( m_pBracket->cPost ); + if( SW_SCRIPTS > m_pBracket->nPostScript ) + pTmpFnt->SetActual( m_pBracket->nPostScript ); SwFontSave aSave( rInf, pTmpFnt.get() ); SwPosSize aSize = rInf.GetTextSize( aStr ); const sal_uInt16 nTmpAsc = rInf.GetAscent(); - if( nTmpAsc > pBracket->nAscent ) + if( nTmpAsc > m_pBracket->nAscent ) { - pBracket->nHeight += nTmpAsc - pBracket->nAscent; - pBracket->nAscent = nTmpAsc; + m_pBracket->nHeight += nTmpAsc - m_pBracket->nAscent; + m_pBracket->nAscent = nTmpAsc; } - if( aSize.Height() > pBracket->nHeight ) - pBracket->nHeight = aSize.Height(); + if( aSize.Height() > m_pBracket->nHeight ) + m_pBracket->nHeight = aSize.Height(); if( nMaxWidth > aSize.Width() ) { - pBracket->nPostWidth = aSize.Width(); + m_pBracket->nPostWidth = aSize.Width(); nMaxWidth -= aSize.Width(); } else { - pBracket->nPostWidth = 0; + m_pBracket->nPostWidth = 0; nMaxWidth = 0; } } else - pBracket->nPostWidth = 0; + m_pBracket->nPostWidth = 0; nMaxWidth += rInf.X(); } @@ -454,24 +454,24 @@ void SwDoubleLinePortion::CalcBlanks( SwTextFormatInfo &rInf ) TextFrameIndex nStart = rInf.GetIdx(); SetTab1( false ); SetTab2( false ); - for (nBlank1 = TextFrameIndex(0); pPor; pPor = pPor->GetNextPortion()) + for (m_nBlank1 = TextFrameIndex(0); pPor; pPor = pPor->GetNextPortion()) { if( pPor->InTextGrp() ) - nBlank1 = nBlank1 + static_cast<SwTextPortion*>(pPor)->GetSpaceCnt( rInf, nNull ); + m_nBlank1 = m_nBlank1 + static_cast<SwTextPortion*>(pPor)->GetSpaceCnt( rInf, nNull ); rInf.SetIdx( rInf.GetIdx() + pPor->GetLen() ); if( pPor->InTabGrp() ) SetTab1( true ); } - nLineDiff = GetRoot().Width(); + m_nLineDiff = GetRoot().Width(); if( GetRoot().GetNext() ) { pPor = GetRoot().GetNext()->GetFirstPortion(); - nLineDiff -= GetRoot().GetNext()->Width(); + m_nLineDiff -= GetRoot().GetNext()->Width(); } - for (nBlank2 = TextFrameIndex(0); pPor; pPor = pPor->GetNextPortion()) + for (m_nBlank2 = TextFrameIndex(0); pPor; pPor = pPor->GetNextPortion()) { if( pPor->InTextGrp() ) - nBlank2 = nBlank2 + static_cast<SwTextPortion*>(pPor)->GetSpaceCnt( rInf, nNull ); + m_nBlank2 = m_nBlank2 + static_cast<SwTextPortion*>(pPor)->GetSpaceCnt( rInf, nNull ); rInf.SetIdx( rInf.GetIdx() + pPor->GetLen() ); if( pPor->InTabGrp() ) SetTab2( true ); diff --git a/sw/source/core/text/pormulti.hxx b/sw/source/core/text/pormulti.hxx index 84ef2e314a65..d714df2a7657 100644 --- a/sw/source/core/text/pormulti.hxx +++ b/sw/source/core/text/pormulti.hxx @@ -154,32 +154,32 @@ public: class SwDoubleLinePortion : public SwMultiPortion { - std::unique_ptr<SwBracket> pBracket; // Surrounding brackets - SwTwips nLineDiff; // Difference of the width of the both lines - TextFrameIndex nBlank1; ///< Number of blanks in the first line - TextFrameIndex nBlank2; ///< Number of blanks in the second line + std::unique_ptr<SwBracket> m_pBracket; // Surrounding brackets + SwTwips m_nLineDiff; // Difference of the width of the both lines + TextFrameIndex m_nBlank1; ///< Number of blanks in the first line + TextFrameIndex m_nBlank2; ///< Number of blanks in the second line public: SwDoubleLinePortion(SwDoubleLinePortion& rDouble, TextFrameIndex nEnd); SwDoubleLinePortion(const SwMultiCreator& rCreate, TextFrameIndex nEnd); virtual ~SwDoubleLinePortion() override; - SwBracket* GetBrackets() const { return pBracket.get(); } + SwBracket* GetBrackets() const { return m_pBracket.get(); } void SetBrackets( const SwDoubleLinePortion& rDouble ); void PaintBracket( SwTextPaintInfo& rInf, tools::Long nSpaceAdd, bool bOpen ) const; void FormatBrackets( SwTextFormatInfo &rInf, SwTwips& nMaxWidth ); - sal_uInt16 PreWidth() const { return pBracket->nPreWidth; }; - sal_uInt16 PostWidth() const { return pBracket->nPostWidth; } + sal_uInt16 PreWidth() const { return m_pBracket->nPreWidth; }; + sal_uInt16 PostWidth() const { return m_pBracket->nPostWidth; } void ClearBrackets() - { pBracket->nPreWidth = pBracket->nPostWidth=0; Width( 0 ); } + { m_pBracket->nPreWidth = m_pBracket->nPostWidth=0; Width( 0 ); } sal_uInt16 BracketWidth(){ return PreWidth() + PostWidth(); } void CalcBlanks( SwTextFormatInfo &rInf ); static void ResetSpaceAdd( SwLineLayout* pCurr ); - SwTwips GetLineDiff() const { return nLineDiff; } + SwTwips GetLineDiff() const { return m_nLineDiff; } TextFrameIndex GetSpaceCnt() const - { return ( nLineDiff < 0 ) ? nBlank2 : nBlank1; } + { return ( m_nLineDiff < 0 ) ? m_nBlank2 : m_nBlank1; } TextFrameIndex GetSmallerSpaceCnt() const - { return ( nLineDiff < 0 ) ? nBlank1 : nBlank2; } + { return ( m_nLineDiff < 0 ) ? m_nBlank1 : m_nBlank2; } virtual tools::Long CalcSpacing( tools::Long nSpaceAdd, const SwTextSizeInfo &rInf ) const override; virtual bool ChgSpaceAdd( SwLineLayout* pCurr, tools::Long nSpaceAdd ) const override; @@ -216,12 +216,12 @@ public: class SwBidiPortion : public SwMultiPortion { - sal_uInt8 nLevel; + sal_uInt8 m_nLevel; public: SwBidiPortion(TextFrameIndex nEnd, sal_uInt8 nLv); - sal_uInt8 GetLevel() const { return nLevel; } + sal_uInt8 GetLevel() const { return m_nLevel; } // Get number of blanks for justified alignment TextFrameIndex GetSpaceCnt(const SwTextSizeInfo &rInf) const; // Calculates extra spacing based on number of blanks diff --git a/sw/source/core/text/txtpaint.cxx b/sw/source/core/text/txtpaint.cxx index 45808338919e..ccd9647bd99c 100644 --- a/sw/source/core/text/txtpaint.cxx +++ b/sw/source/core/text/txtpaint.cxx @@ -25,19 +25,19 @@ SwSaveClip::~SwSaveClip() { // We recover the old state - if( !(pOut && bChg) ) + if( !(m_pOut && m_bChg) ) return; - if ( pOut->GetConnectMetaFile() ) - pOut->Pop(); + if ( m_pOut->GetConnectMetaFile() ) + m_pOut->Pop(); else { - if( bOn ) - pOut->SetClipRegion( aClip ); + if( m_bOn ) + m_pOut->SetClipRegion( m_aClip ); else - pOut->SetClipRegion(); + m_pOut->SetClipRegion(); } - bChg = false; + m_bChg = false; } void SwSaveClip::ChgClip_( const SwRect &rRect, const SwTextFrame* pFrame, @@ -54,22 +54,22 @@ void SwSaveClip::ChgClip_( const SwRect &rRect, const SwTextFrame* pFrame, if ( bVertical ) pFrame->SwitchHorizontalToVertical( const_cast<SwRect&>(rRect) ); - if ( !pOut || (!rRect.HasArea() && !pOut->IsClipRegion()) ) + if ( !m_pOut || (!rRect.HasArea() && !m_pOut->IsClipRegion()) ) { const_cast<SwRect&>(rRect) = aOldRect; return; } - if ( !bChg ) + if ( !m_bChg ) { - if ( pOut->GetConnectMetaFile() ) - pOut->Push(); - else if ( bOn ) - aClip = pOut->GetClipRegion(); + if ( m_pOut->GetConnectMetaFile() ) + m_pOut->Push(); + else if ( m_bOn ) + m_aClip = m_pOut->GetClipRegion(); } if ( !rRect.HasArea() ) - pOut->SetClipRegion(); + m_pOut->SetClipRegion(); else { tools::Rectangle aRect( rRect.SVRect() ); @@ -88,9 +88,9 @@ void SwSaveClip::ChgClip_( const SwRect &rRect, const SwTextFrame* pFrame, aRect.AdjustBottom( nEnlargeBottom ); // If the ClipRect is identical, nothing will happen - if( pOut->IsClipRegion() ) // no && because of Mac + if( m_pOut->IsClipRegion() ) // no && because of Mac { - if ( aRect == pOut->GetClipRegion().GetBoundRect() ) + if ( aRect == m_pOut->GetClipRegion().GetBoundRect() ) { const_cast<SwRect&>(rRect) = aOldRect; return; @@ -98,14 +98,14 @@ void SwSaveClip::ChgClip_( const SwRect &rRect, const SwTextFrame* pFrame, } if( SwRootFrame::HasSameRect( rRect ) ) - pOut->SetClipRegion(); + m_pOut->SetClipRegion(); else { const vcl::Region aClipRegion( aRect ); - pOut->SetClipRegion( aClipRegion ); + m_pOut->SetClipRegion( aClipRegion ); } } - bChg = true; + m_bChg = true; const_cast<SwRect&>(rRect) = aOldRect; } diff --git a/sw/source/core/text/txtpaint.hxx b/sw/source/core/text/txtpaint.hxx index f6e21ab121be..1f9700af4c96 100644 --- a/sw/source/core/text/txtpaint.hxx +++ b/sw/source/core/text/txtpaint.hxx @@ -26,20 +26,20 @@ class SwTextFrame; class SwSaveClip final { - vcl::Region aClip; - const bool bOn; - bool bChg; + vcl::Region m_aClip; + const bool m_bOn; + bool m_bChg; - VclPtr<OutputDevice> pOut; + VclPtr<OutputDevice> m_pOut; void ChgClip_( const SwRect &rRect, const SwTextFrame* pFrame, bool bEnlargeRect, sal_Int32 nEnlargeTop, sal_Int32 nEnlargeBottom ); public: explicit SwSaveClip(OutputDevice* pOutDev) - : bOn(pOutDev && pOutDev->IsClipRegion()) - , bChg(false) - , pOut(pOutDev) + : m_bOn(pOutDev && pOutDev->IsClipRegion()) + , m_bChg(false) + , m_pOut(pOutDev) { } @@ -48,10 +48,10 @@ public: bool bEnlargeRect = false, sal_Int32 nEnlargeTop = 0, sal_Int32 nEnlargeBottom = 0) - { if( pOut ) ChgClip_( rRect, pFrame, + { if( m_pOut ) ChgClip_( rRect, pFrame, bEnlargeRect, nEnlargeTop, nEnlargeBottom ); } - bool IsOn() const { return bOn; } - bool IsChg() const { return bChg; } + bool IsOn() const { return m_bOn; } + bool IsChg() const { return m_bChg; } }; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits