summaryrefslogtreecommitdiff
path: root/sw/source/core/doc/docruby.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-09-22 15:31:06 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-09-22 21:00:37 +0200
commit9940a5dce79fe9dc3e6ff0302c9be8c7d1648f67 (patch)
treeca18e59ab30a57801829babd9273fb60c4f12b42 /sw/source/core/doc/docruby.cxx
parentc3bc67bffd1e0b9bdd60ef274a6d5e59101d322d (diff)
use more SwPosition::AdjustContent
part of the process of hiding the internals of SwPosition Change-Id: Ieaaeafdbef6cdd715d1d8610cf6094d1bbf08b09 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140434 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/core/doc/docruby.cxx')
-rw-r--r--sw/source/core/doc/docruby.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/sw/source/core/doc/docruby.cxx b/sw/source/core/doc/docruby.cxx
index c269d5a6290b..07c11097f81c 100644
--- a/sw/source/core/doc/docruby.cxx
+++ b/sw/source/core/doc/docruby.cxx
@@ -153,7 +153,7 @@ void SwDoc::SetRubyList( const SwPaM& rPam, const SwRubyList& rList )
{
getIDocumentContentOperations().InsertString( aPam, pEntry->GetText() );
aPam.SetMark();
- aPam.GetMark()->nContent -= pEntry->GetText().getLength();
+ aPam.GetMark()->AdjustContent( -pEntry->GetText().getLength() );
getIDocumentContentOperations().InsertPoolItem(
aPam, pEntry->GetRubyAttr(), SetAttrMode::DONTEXPAND );
}
@@ -213,7 +213,7 @@ bool SwDoc::SelectNextRubyChars( SwPaM& rPam, SwRubyListEntry& rEntry )
if( !bHasMark && nStart > pAttr->GetStart() )
{
nStart = pAttr->GetStart();
- pPos->nContent = nStart;
+ pPos->SetContent(nStart);
}
}
break;
@@ -232,7 +232,7 @@ bool SwDoc::SelectNextRubyChars( SwPaM& rPam, SwRubyListEntry& rEntry )
if (nWordStt < nStart && nWordStt >= 0)
{
nStart = nWordStt;
- pPos->nContent = nStart;
+ pPos->SetContent(nStart);
}
}
@@ -243,13 +243,13 @@ bool SwDoc::SelectNextRubyChars( SwPaM& rPam, SwRubyListEntry& rEntry )
{
if( pAttr && nStart == pAttr->GetStart() )
{
- pPos->nContent = nStart;
+ pPos->SetContent(nStart);
if( !rPam.HasMark() )
{
rPam.SetMark();
- pPos->nContent = pAttr->GetAnyEnd();
+ pPos->SetContent(pAttr->GetAnyEnd());
if( pPos->GetContentIndex() > nEnd )
- pPos->nContent = nEnd;
+ pPos->SetContent(nEnd);
rEntry.SetRubyAttr( pAttr->GetRuby() );
}
break;