summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw/source/core/text/porhyph.hxx8
-rw-r--r--sw/source/core/text/pormulti.cxx91
-rw-r--r--sw/source/core/text/porref.cxx10
-rw-r--r--sw/source/core/text/porref.hxx2
-rw-r--r--sw/source/core/text/portox.cxx10
-rw-r--r--sw/source/core/text/portox.hxx2
-rw-r--r--sw/source/core/text/txthyph.cxx10
7 files changed, 66 insertions, 67 deletions
diff --git a/sw/source/core/text/porhyph.hxx b/sw/source/core/text/porhyph.hxx
index bbc799349752..1deccb036255 100644
--- a/sw/source/core/text/porhyph.hxx
+++ b/sw/source/core/text/porhyph.hxx
@@ -57,8 +57,8 @@ public:
class SwSoftHyphPortion : public SwHyphPortion
{
- bool bExpand;
- sal_uInt16 nViewWidth;
+ bool m_bExpand;
+ sal_uInt16 m_nViewWidth;
public:
SwSoftHyphPortion();
@@ -67,8 +67,8 @@ public:
virtual void Paint( const SwTextPaintInfo &rInf ) const override;
virtual bool Format( SwTextFormatInfo &rInf ) override;
virtual void FormatEOL( SwTextFormatInfo &rInf ) override;
- void SetExpand( const bool bNew ) { bExpand = bNew; }
- bool IsExpand() const { return bExpand; }
+ void SetExpand( const bool bNew ) { m_bExpand = bNew; }
+ bool IsExpand() const { return m_bExpand; }
virtual sal_uInt16 GetViewWidth( const SwTextSizeInfo &rInf ) const override;
diff --git a/sw/source/core/text/pormulti.cxx b/sw/source/core/text/pormulti.cxx
index 4f75a5765356..c51fb973ad29 100644
--- a/sw/source/core/text/pormulti.cxx
+++ b/sw/source/core/text/pormulti.cxx
@@ -1409,86 +1409,85 @@ namespace {
// The destructor restores the values of the last manipulation.
class SwSpaceManipulator
{
- SwTextPaintInfo& rInfo;
- SwMultiPortion& rMulti;
- std::vector<tools::Long>* pOldSpaceAdd;
- sal_uInt16 nOldSpIdx;
- tools::Long nSpaceAdd;
- bool bSpaceChg;
- sal_uInt8 nOldDir;
+ SwTextPaintInfo& m_rInfo;
+ SwMultiPortion& m_rMulti;
+ std::vector<tools::Long>* m_pOldSpaceAdd;
+ sal_uInt16 m_nOldSpaceIndex;
+ tools::Long m_nSpaceAdd;
+ bool m_bSpaceChg;
+ sal_uInt8 m_nOldDir;
+
public:
SwSpaceManipulator( SwTextPaintInfo& rInf, SwMultiPortion& rMult );
~SwSpaceManipulator();
void SecondLine();
- tools::Long GetSpaceAdd() const { return nSpaceAdd; }
+ tools::Long GetSpaceAdd() const { return m_nSpaceAdd; }
};
}
-SwSpaceManipulator::SwSpaceManipulator( SwTextPaintInfo& rInf,
- SwMultiPortion& rMult )
- : rInfo(rInf)
- , rMulti(rMult)
- , nSpaceAdd(0)
+SwSpaceManipulator::SwSpaceManipulator(SwTextPaintInfo& rInf, SwMultiPortion& rMult)
+ : m_rInfo(rInf)
+ , m_rMulti(rMult)
+ , m_nSpaceAdd(0)
{
- pOldSpaceAdd = rInfo.GetpSpaceAdd();
- nOldSpIdx = rInfo.GetSpaceIdx();
- nOldDir = rInfo.GetDirection();
- rInfo.SetDirection( rMulti.GetDirection() );
- bSpaceChg = false;
+ m_pOldSpaceAdd = m_rInfo.GetpSpaceAdd();
+ m_nOldSpaceIndex = m_rInfo.GetSpaceIdx();
+ m_nOldDir = m_rInfo.GetDirection();
+ m_rInfo.SetDirection(m_rMulti.GetDirection());
+ m_bSpaceChg = false;
- if( rMulti.IsDouble() )
+ if (m_rMulti.IsDouble())
{
- nSpaceAdd = ( pOldSpaceAdd && !rMulti.HasTabulator() ) ?
- rInfo.GetSpaceAdd() : 0;
- if( rMulti.GetRoot().IsSpaceAdd() )
+ m_nSpaceAdd = (m_pOldSpaceAdd && !m_rMulti.HasTabulator()) ? m_rInfo.GetSpaceAdd() : 0;
+ if (m_rMulti.GetRoot().IsSpaceAdd())
{
- rInfo.SetpSpaceAdd( rMulti.GetRoot().GetpLLSpaceAdd() );
- rInfo.ResetSpaceIdx();
- bSpaceChg = rMulti.ChgSpaceAdd( &rMulti.GetRoot(), nSpaceAdd );
+ m_rInfo.SetpSpaceAdd(m_rMulti.GetRoot().GetpLLSpaceAdd());
+ m_rInfo.ResetSpaceIdx();
+ m_bSpaceChg = m_rMulti.ChgSpaceAdd(&m_rMulti.GetRoot(), m_nSpaceAdd);
}
- else if( rMulti.HasTabulator() )
- rInfo.SetpSpaceAdd( nullptr );
+ else if (m_rMulti.HasTabulator())
+ m_rInfo.SetpSpaceAdd(nullptr);
}
- else if ( ! rMulti.IsBidi() )
+ else if (!m_rMulti.IsBidi())
{
- rInfo.SetpSpaceAdd( rMulti.GetRoot().GetpLLSpaceAdd() );
- rInfo.ResetSpaceIdx();
+ m_rInfo.SetpSpaceAdd(m_rMulti.GetRoot().GetpLLSpaceAdd());
+ m_rInfo.ResetSpaceIdx();
}
}
void SwSpaceManipulator::SecondLine()
{
- if( bSpaceChg )
+ if (m_bSpaceChg)
{
- rInfo.RemoveFirstSpaceAdd();
- bSpaceChg = false;
+ m_rInfo.RemoveFirstSpaceAdd();
+ m_bSpaceChg = false;
}
- SwLineLayout *pLay = rMulti.GetRoot().GetNext();
+ SwLineLayout* pLay = m_rMulti.GetRoot().GetNext();
if( pLay->IsSpaceAdd() )
{
- rInfo.SetpSpaceAdd( pLay->GetpLLSpaceAdd() );
- rInfo.ResetSpaceIdx();
- bSpaceChg = rMulti.ChgSpaceAdd( pLay, nSpaceAdd );
+ m_rInfo.SetpSpaceAdd(pLay->GetpLLSpaceAdd());
+ m_rInfo.ResetSpaceIdx();
+ m_bSpaceChg = m_rMulti.ChgSpaceAdd(pLay, m_nSpaceAdd);
}
else
{
- rInfo.SetpSpaceAdd( (!rMulti.IsDouble() || rMulti.HasTabulator() ) ?
- nullptr : pOldSpaceAdd );
- rInfo.SetSpaceIdx( nOldSpIdx);
+ m_rInfo.SetpSpaceAdd((!m_rMulti.IsDouble() || m_rMulti.HasTabulator()) ? nullptr
+ : m_pOldSpaceAdd);
+ m_rInfo.SetSpaceIdx(m_nOldSpaceIndex);
}
}
SwSpaceManipulator::~SwSpaceManipulator()
{
- if( bSpaceChg )
+ if (m_bSpaceChg)
{
- rInfo.RemoveFirstSpaceAdd();
- bSpaceChg = false;
+ m_rInfo.RemoveFirstSpaceAdd();
+ m_bSpaceChg = false;
}
- rInfo.SetpSpaceAdd( pOldSpaceAdd );
- rInfo.SetSpaceIdx( nOldSpIdx);
- rInfo.SetDirection( nOldDir );
+ m_rInfo.SetpSpaceAdd(m_pOldSpaceAdd);
+ m_rInfo.SetSpaceIdx(m_nOldSpaceIndex);
+ m_rInfo.SetDirection(m_nOldDir);
}
// Manages the paint for a SwMultiPortion.
diff --git a/sw/source/core/text/porref.cxx b/sw/source/core/text/porref.cxx
index 9ddb232d1417..502b681c0803 100644
--- a/sw/source/core/text/porref.cxx
+++ b/sw/source/core/text/porref.cxx
@@ -34,7 +34,7 @@ void SwRefPortion::Paint( const SwTextPaintInfo &rInf ) const
SwLinePortion *SwIsoRefPortion::Compress() { return this; }
-SwIsoRefPortion::SwIsoRefPortion() : nViewWidth(0)
+SwIsoRefPortion::SwIsoRefPortion() : m_nViewWidth(0)
{
SetLen(TextFrameIndex(1));
SetWhichPor( PortionType::IsoRef );
@@ -48,12 +48,12 @@ sal_uInt16 SwIsoRefPortion::GetViewWidth( const SwTextSizeInfo &rInf ) const
if( !Width() && rInf.OnWin() && SwViewOption::IsFieldShadings() &&
!rInf.GetOpt().IsReadonly() && !rInf.GetOpt().IsPagePreview() )
{
- if( !nViewWidth )
- pThis->nViewWidth = rInf.GetTextSize(OUString(' ')).Width();
+ if( !m_nViewWidth )
+ pThis->m_nViewWidth = rInf.GetTextSize(OUString(' ')).Width();
}
else
- pThis->nViewWidth = 0;
- return nViewWidth;
+ pThis->m_nViewWidth = 0;
+ return m_nViewWidth;
}
bool SwIsoRefPortion::Format( SwTextFormatInfo &rInf )
diff --git a/sw/source/core/text/porref.hxx b/sw/source/core/text/porref.hxx
index 4b55f9dbc889..d12803080345 100644
--- a/sw/source/core/text/porref.hxx
+++ b/sw/source/core/text/porref.hxx
@@ -29,7 +29,7 @@ public:
class SwIsoRefPortion : public SwRefPortion
{
- sal_uInt16 nViewWidth;
+ sal_uInt16 m_nViewWidth;
public:
SwIsoRefPortion();
diff --git a/sw/source/core/text/portox.cxx b/sw/source/core/text/portox.cxx
index a746058e9b07..982ec4f5fb25 100644
--- a/sw/source/core/text/portox.cxx
+++ b/sw/source/core/text/portox.cxx
@@ -34,7 +34,7 @@ void SwToxPortion::Paint( const SwTextPaintInfo &rInf ) const
SwLinePortion *SwIsoToxPortion::Compress() { return this; }
-SwIsoToxPortion::SwIsoToxPortion() : nViewWidth(0)
+SwIsoToxPortion::SwIsoToxPortion() : m_nViewWidth(0)
{
SetLen(TextFrameIndex(1));
SetWhichPor( PortionType::IsoTox );
@@ -50,12 +50,12 @@ sal_uInt16 SwIsoToxPortion::GetViewWidth( const SwTextSizeInfo &rInf ) const
!rInf.GetOpt().IsPagePreview() &&
!rInf.GetOpt().IsReadonly() && SwViewOption::IsFieldShadings() )
{
- if( !nViewWidth )
- pThis->nViewWidth = rInf.GetTextSize(OUString(' ')).Width();
+ if( !m_nViewWidth )
+ pThis->m_nViewWidth = rInf.GetTextSize(OUString(' ')).Width();
}
else
- pThis->nViewWidth = 0;
- return nViewWidth;
+ pThis->m_nViewWidth = 0;
+ return m_nViewWidth;
}
bool SwIsoToxPortion::Format( SwTextFormatInfo &rInf )
diff --git a/sw/source/core/text/portox.hxx b/sw/source/core/text/portox.hxx
index 8b61c1064217..909d8e39ed42 100644
--- a/sw/source/core/text/portox.hxx
+++ b/sw/source/core/text/portox.hxx
@@ -31,7 +31,7 @@ public:
class SwIsoToxPortion : public SwToxPortion
{
- sal_uInt16 nViewWidth;
+ sal_uInt16 m_nViewWidth;
public:
SwIsoToxPortion();
diff --git a/sw/source/core/text/txthyph.cxx b/sw/source/core/text/txthyph.cxx
index aafcb501b8ad..7f9f6f6cd611 100644
--- a/sw/source/core/text/txthyph.cxx
+++ b/sw/source/core/text/txthyph.cxx
@@ -389,7 +389,7 @@ void SwHyphStrPortion::HandlePortion( SwPortionHandler& rPH ) const
SwLinePortion *SwSoftHyphPortion::Compress() { return this; }
SwSoftHyphPortion::SwSoftHyphPortion() :
- bExpand(false), nViewWidth(0)
+ m_bExpand(false), m_nViewWidth(0)
{
SetLen(TextFrameIndex(1));
SetWhichPor( PortionType::SoftHyphen );
@@ -401,13 +401,13 @@ sal_uInt16 SwSoftHyphPortion::GetViewWidth( const SwTextSizeInfo &rInf ) const
// the last possible moment
if( !Width() && rInf.OnWin() && rInf.GetOpt().IsSoftHyph() && !IsExpand() )
{
- if( !nViewWidth )
- const_cast<SwSoftHyphPortion*>(this)->nViewWidth
+ if( !m_nViewWidth )
+ const_cast<SwSoftHyphPortion*>(this)->m_nViewWidth
= rInf.GetTextSize(OUString('-')).Width();
}
else
- const_cast<SwSoftHyphPortion*>(this)->nViewWidth = 0;
- return nViewWidth;
+ const_cast<SwSoftHyphPortion*>(this)->m_nViewWidth = 0;
+ return m_nViewWidth;
}
/**