summaryrefslogtreecommitdiff
path: root/editeng
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-04-05 15:16:47 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-04-06 09:21:58 +0000
commit0c82dff153d92150729815b919854a9a350aa031 (patch)
tree9bda3cba13d9534460b2fe7919b00009e8ffd425 /editeng
parent9458ce11084579b020650fecb1165052c16ee556 (diff)
loplugin:singlevalfields
Change-Id: Ia681765aa1da5c80a3dbe91b7376af841a9c9ec1 Reviewed-on: https://gerrit.libreoffice.org/36145 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'editeng')
-rw-r--r--editeng/source/editeng/editdoc.hxx2
-rw-r--r--editeng/source/editeng/impedit3.cxx8
2 files changed, 5 insertions, 5 deletions
diff --git a/editeng/source/editeng/editdoc.hxx b/editeng/source/editeng/editdoc.hxx
index b99c5e2a3bef..a31eaefc5739 100644
--- a/editeng/source/editeng/editdoc.hxx
+++ b/editeng/source/editeng/editdoc.hxx
@@ -420,7 +420,7 @@ public:
Size& GetSize() { return aOutSz; }
const Size& GetSize() const { return aOutSz; }
- PortionKind& GetKind() { return nKind; }
+ void SetKind(PortionKind n) { nKind = n; }
PortionKind GetKind() const { return nKind; }
void SetRightToLeftLevel( sal_uInt8 n ) { nRightToLeftLevel = n; }
diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx
index ba3520c00572..4e656233dac0 100644
--- a/editeng/source/editeng/impedit3.cxx
+++ b/editeng/source/editeng/impedit3.cxx
@@ -995,7 +995,7 @@ bool ImpEditEngine::CreateLines( sal_Int32 nPara, sal_uInt32 nStartPosY )
aCurrentTab.nTabPortion = nTmpPortion;
}
- pPortion->GetKind() = PortionKind::TAB;
+ pPortion->SetKind(PortionKind::TAB);
pPortion->SetExtraValue( aCurrentTab.aTabStop.GetFill() );
pPortion->GetSize().Width() = aCurrentTab.nTabPos - (nTmpWidth+nStartX);
@@ -1030,7 +1030,7 @@ bool ImpEditEngine::CreateLines( sal_Int32 nPara, sal_uInt32 nStartPosY )
pPortion->GetSize().Width() = 0;
bEOL = true;
bLineBreak = true;
- pPortion->GetKind() = PortionKind::LINEBREAK;
+ pPortion->SetKind( PortionKind::LINEBREAK );
bCompressedChars = false;
EditLine::CharPosArrayType& rArray = pLine->GetCharPosArray();
size_t nPos = nTmpPos - pLine->GetStart();
@@ -1080,7 +1080,7 @@ bool ImpEditEngine::CreateLines( sal_Int32 nPara, sal_uInt32 nStartPosY )
EditLine::CharPosArrayType& rArray = pLine->GetCharPosArray();
size_t nPos = nTmpPos - pLine->GetStart();
rArray.insert(rArray.begin()+nPos, pPortion->GetSize().Width());
- pPortion->GetKind() = cChar ? PortionKind::TEXT : PortionKind::FIELD;
+ pPortion->SetKind( cChar ? PortionKind::TEXT : PortionKind::FIELD );
// If this is the first token on the line,
// and nTmpWidth > aPaperSize.Width, => infinite loop!
if ( ( nTmpWidth >= nXWidth ) && ( nTmpPortion == pLine->GetStartPortion() ) )
@@ -2018,7 +2018,7 @@ void ImpEditEngine::ImpBreakLine( ParaPortion* pParaPortion, EditLine* pLine, Te
{
// A portion for inserting the separator ...
TextPortion* pHyphPortion = new TextPortion( 0 );
- pHyphPortion->GetKind() = PortionKind::HYPHENATOR;
+ pHyphPortion->SetKind( PortionKind::HYPHENATOR );
OUString aHyphText(CH_HYPH);
if ( (cAlternateReplChar || cAlternateExtraChar) && bAltFullRight ) // alternation after the break doesn't supported
{