summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-08-01 10:30:06 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-08-02 15:11:17 +0200
commitaf23d1c1fc407b3d5f020122e2830959d45ffaf1 (patch)
tree4ff56a1fd767efc3aa05266bc7038e811d1450ee /sw/source
parent961d42e1ca1da7f3199d46445b3766d9c6a6c938 (diff)
introduce SwPosition::GetContentIndex
as part of the process of hiding the internals of SwPosition largely done by doing: git grep -lF 'nContent.GetIndex' | xargs perl -pi -e 's/\bnContent\.GetIndex/GetContentIndex/g' Change-Id: I12684071a6666c365dbadbab2a4b37cf51b274d5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137695 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/core/access/accframebase.cxx6
-rw-r--r--sw/source/core/access/accmap.cxx6
-rw-r--r--sw/source/core/access/accpara.cxx4
-rw-r--r--sw/source/core/crsr/annotationmark.cxx2
-rw-r--r--sw/source/core/crsr/bookmark.cxx42
-rw-r--r--sw/source/core/crsr/callnk.cxx4
-rw-r--r--sw/source/core/crsr/crbm.cxx4
-rw-r--r--sw/source/core/crsr/crossrefbookmark.cxx2
-rw-r--r--sw/source/core/crsr/crsrsh.cxx32
-rw-r--r--sw/source/core/crsr/crstrvl.cxx36
-rw-r--r--sw/source/core/crsr/findattr.cxx30
-rw-r--r--sw/source/core/crsr/findfmt.cxx4
-rw-r--r--sw/source/core/crsr/findtxt.cxx6
-rw-r--r--sw/source/core/crsr/pam.cxx20
-rw-r--r--sw/source/core/crsr/swcrsr.cxx62
-rw-r--r--sw/source/core/crsr/trvlfnfl.cxx6
-rw-r--r--sw/source/core/crsr/trvlreg.cxx6
-rw-r--r--sw/source/core/crsr/trvltbl.cxx4
-rw-r--r--sw/source/core/crsr/viscrs.cxx4
-rw-r--r--sw/source/core/doc/CntntIdxStore.cxx24
-rw-r--r--sw/source/core/doc/DocumentContentOperationsManager.cxx164
-rw-r--r--sw/source/core/doc/DocumentFieldsManager.cxx2
-rw-r--r--sw/source/core/doc/DocumentLayoutManager.cxx4
-rw-r--r--sw/source/core/doc/DocumentRedlineManager.cxx16
-rw-r--r--sw/source/core/doc/dbgoutsw.cxx2
-rw-r--r--sw/source/core/doc/doc.cxx4
-rw-r--r--sw/source/core/doc/docbm.cxx30
-rw-r--r--sw/source/core/doc/doccomp.cxx10
-rw-r--r--sw/source/core/doc/doccorr.cxx6
-rw-r--r--sw/source/core/doc/docedt.cxx30
-rw-r--r--sw/source/core/doc/docfld.cxx16
-rw-r--r--sw/source/core/doc/docfly.cxx8
-rw-r--r--sw/source/core/doc/docfmt.cxx12
-rw-r--r--sw/source/core/doc/docftn.cxx4
-rw-r--r--sw/source/core/doc/doclay.cxx16
-rw-r--r--sw/source/core/doc/docnum.cxx12
-rw-r--r--sw/source/core/doc/docredln.cxx18
-rw-r--r--sw/source/core/doc/docruby.cxx12
-rw-r--r--sw/source/core/doc/doctxm.cxx2
-rw-r--r--sw/source/core/doc/extinput.cxx14
-rw-r--r--sw/source/core/doc/swserv.cxx4
-rw-r--r--sw/source/core/docnode/ndsect.cxx26
-rw-r--r--sw/source/core/docnode/ndtbl.cxx12
-rw-r--r--sw/source/core/docnode/nodes.cxx20
-rw-r--r--sw/source/core/edit/acorrect.cxx8
-rw-r--r--sw/source/core/edit/autofmt.cxx4
-rw-r--r--sw/source/core/edit/edattr.cxx18
-rw-r--r--sw/source/core/edit/eddel.cxx2
-rw-r--r--sw/source/core/edit/edfcol.cxx4
-rw-r--r--sw/source/core/edit/edfmt.cxx12
-rw-r--r--sw/source/core/edit/editsh.cxx16
-rw-r--r--sw/source/core/edit/edlingu.cxx52
-rw-r--r--sw/source/core/edit/edsect.cxx8
-rw-r--r--sw/source/core/edit/edtab.cxx4
-rw-r--r--sw/source/core/fields/postithelper.cxx6
-rw-r--r--sw/source/core/fields/reffld.cxx4
-rw-r--r--sw/source/core/frmedt/fefly1.cxx4
-rw-r--r--sw/source/core/frmedt/feshview.cxx2
-rw-r--r--sw/source/core/frmedt/fetab.cxx2
-rw-r--r--sw/source/core/frmedt/fews.cxx2
-rw-r--r--sw/source/core/layout/atrfrm.cxx2
-rw-r--r--sw/source/core/layout/flycnt.cxx2
-rw-r--r--sw/source/core/layout/frmtool.cxx6
-rw-r--r--sw/source/core/layout/layact.cxx2
-rw-r--r--sw/source/core/layout/sortedobjs.cxx4
-rw-r--r--sw/source/core/layout/trvlfrm.cxx6
-rw-r--r--sw/source/core/table/swtable.cxx4
-rw-r--r--sw/source/core/text/itratr.cxx14
-rw-r--r--sw/source/core/text/itrform2.cxx2
-rw-r--r--sw/source/core/text/porlay.cxx44
-rw-r--r--sw/source/core/text/redlnitr.cxx16
-rw-r--r--sw/source/core/text/txtfrm.cxx6
-rw-r--r--sw/source/core/tox/txmsrt.cxx2
-rw-r--r--sw/source/core/txtnode/modeltoviewhelper.cxx6
-rw-r--r--sw/source/core/txtnode/ndtxt.cxx14
-rw-r--r--sw/source/core/txtnode/txtedt.cxx2
-rw-r--r--sw/source/core/undo/SwUndoField.cxx2
-rw-r--r--sw/source/core/undo/rolbck.cxx16
-rw-r--r--sw/source/core/undo/unattr.cxx12
-rw-r--r--sw/source/core/undo/undel.cxx12
-rw-r--r--sw/source/core/undo/undobj.cxx30
-rw-r--r--sw/source/core/undo/undobj1.cxx12
-rw-r--r--sw/source/core/undo/undraw.cxx4
-rw-r--r--sw/source/core/undo/unins.cxx24
-rw-r--r--sw/source/core/undo/unmove.cxx2
-rw-r--r--sw/source/core/undo/unnum.cxx2
-rw-r--r--sw/source/core/undo/unovwr.cxx26
-rw-r--r--sw/source/core/undo/unredln.cxx6
-rw-r--r--sw/source/core/undo/unsect.cxx4
-rw-r--r--sw/source/core/undo/unspnd.cxx2
-rw-r--r--sw/source/core/undo/untbl.cxx2
-rw-r--r--sw/source/core/undo/untblk.cxx4
-rw-r--r--sw/source/core/unocore/unocrsrhelper.cxx20
-rw-r--r--sw/source/core/unocore/unodraw.cxx10
-rw-r--r--sw/source/core/unocore/unofield.cxx6
-rw-r--r--sw/source/core/unocore/unoframe.cxx2
-rw-r--r--sw/source/core/unocore/unoftn.cxx2
-rw-r--r--sw/source/core/unocore/unolinebreak.cxx2
-rw-r--r--sw/source/core/unocore/unoobj.cxx14
-rw-r--r--sw/source/core/unocore/unoobj2.cxx14
-rw-r--r--sw/source/core/unocore/unoport.cxx4
-rw-r--r--sw/source/core/unocore/unoportenum.cxx18
-rw-r--r--sw/source/core/unocore/unorefmk.cxx10
-rw-r--r--sw/source/core/unocore/unotbl.cxx2
-rw-r--r--sw/source/core/unocore/unotext.cxx12
-rw-r--r--sw/source/core/unocore/unotextmarkup.cxx4
-rw-r--r--sw/source/filter/ascii/ascatr.cxx12
-rw-r--r--sw/source/filter/ascii/parasc.cxx2
-rw-r--r--sw/source/filter/ascii/wrtasc.cxx2
-rw-r--r--sw/source/filter/basflt/fltshell.cxx8
-rw-r--r--sw/source/filter/basflt/shellio.cxx2
-rw-r--r--sw/source/filter/html/htmlatr.cxx6
-rw-r--r--sw/source/filter/html/htmlcss1.cxx4
-rw-r--r--sw/source/filter/html/htmlctxt.cxx12
-rw-r--r--sw/source/filter/html/htmlfld.cxx4
-rw-r--r--sw/source/filter/html/htmlfly.cxx2
-rw-r--r--sw/source/filter/html/htmlform.cxx4
-rw-r--r--sw/source/filter/html/htmlftn.cxx2
-rw-r--r--sw/source/filter/html/htmlgrin.cxx12
-rw-r--r--sw/source/filter/html/htmlnumreader.cxx8
-rw-r--r--sw/source/filter/html/htmlsect.cxx4
-rw-r--r--sw/source/filter/html/htmltab.cxx26
-rw-r--r--sw/source/filter/html/swhtml.cxx66
-rw-r--r--sw/source/filter/html/swhtml.hxx2
-rw-r--r--sw/source/filter/html/wrthtml.cxx2
-rw-r--r--sw/source/filter/inc/fltshell.hxx4
-rw-r--r--sw/source/filter/writer/writer.cxx4
-rw-r--r--sw/source/filter/ww8/docxexport.cxx8
-rw-r--r--sw/source/filter/ww8/rtfexport.cxx8
-rw-r--r--sw/source/filter/ww8/writerhelper.cxx6
-rw-r--r--sw/source/filter/ww8/wrtw8nds.cxx56
-rw-r--r--sw/source/filter/ww8/wrtww8.cxx12
-rw-r--r--sw/source/filter/ww8/ww8par.cxx16
-rw-r--r--sw/source/filter/ww8/ww8par2.cxx6
-rw-r--r--sw/source/filter/ww8/ww8par5.cxx8
-rw-r--r--sw/source/filter/ww8/ww8par6.cxx6
-rw-r--r--sw/source/filter/xml/xmlimp.cxx8
-rw-r--r--sw/source/ui/misc/contentcontroldlg.cxx2
-rw-r--r--sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx8
-rw-r--r--sw/source/uibase/dochdl/swdtflvr.cxx4
-rw-r--r--sw/source/uibase/docvw/AnnotationWin.cxx6
-rw-r--r--sw/source/uibase/docvw/edtwin.cxx16
-rw-r--r--sw/source/uibase/lingu/hhcwrp.cxx6
-rw-r--r--sw/source/uibase/shells/langhelper.cxx2
-rw-r--r--sw/source/uibase/shells/textfld.cxx12
-rw-r--r--sw/source/uibase/shells/textsh1.cxx2
-rw-r--r--sw/source/uibase/uiview/viewling.cxx2
-rw-r--r--sw/source/uibase/uno/unotxdoc.cxx6
-rw-r--r--sw/source/uibase/wrtsh/delete.cxx2
-rw-r--r--sw/source/uibase/wrtsh/select.cxx4
150 files changed, 851 insertions, 851 deletions
diff --git a/sw/source/core/access/accframebase.cxx b/sw/source/core/access/accframebase.cxx
index 58c093f05441..1a5a8adde5a1 100644
--- a/sw/source/core/access/accframebase.cxx
+++ b/sw/source/core/access/accframebase.cxx
@@ -285,7 +285,7 @@ bool SwAccessibleFrameBase::GetSelectedState( )
const SwPosition *pPos = rAnchor.GetContentAnchor();
if( !pPos )
return false;
- int nIndex = pPos->nContent.GetIndex();
+ int nIndex = pPos->GetContentIndex();
if( pPos->GetNode().GetTextNode() )
{
SwPaM* pCursor = GetCursor();
@@ -310,8 +310,8 @@ bool SwAccessibleFrameBase::GetSelectedState( )
{
if( rAnchor.GetAnchorId() == RndStdIds::FLY_AS_CHAR )
{
- if( ((nHere == nStartIndex) && (nIndex >= pStart->nContent.GetIndex())) || (nHere > nStartIndex) )
- if( ((nHere == nEndIndex) && (nIndex < pEnd->nContent.GetIndex())) || (nHere < nEndIndex) )
+ if( ((nHere == nStartIndex) && (nIndex >= pStart->GetContentIndex())) || (nHere > nStartIndex) )
+ if( ((nHere == nEndIndex) && (nIndex < pEnd->GetContentIndex())) || (nHere < nEndIndex) )
return true;
}
else if( rAnchor.GetAnchorId() == RndStdIds::FLY_AT_PARA )
diff --git a/sw/source/core/access/accmap.cxx b/sw/source/core/access/accmap.cxx
index b522d00ad282..4bb32730583e 100644
--- a/sw/source/core/access/accmap.cxx
+++ b/sw/source/core/access/accmap.cxx
@@ -1195,7 +1195,7 @@ void SwAccessibleMap::InvalidateShapeInParaSelection()
}
if( pPos->GetNode().GetTextNode() )
{
- int nIndex = pPos->nContent.GetIndex();
+ int nIndex = pPos->GetContentIndex();
bool bMarked = false;
if( pCursor != nullptr )
{
@@ -1229,8 +1229,8 @@ void SwAccessibleMap::InvalidateShapeInParaSelection()
{
if( rAnchor.GetAnchorId() == RndStdIds::FLY_AS_CHAR )
{
- if( ( ((nHere == nStartIndex) && (nIndex >= pStart->nContent.GetIndex())) || (nHere > nStartIndex) )
- &&( ((nHere == nEndIndex) && (nIndex < pEnd->nContent.GetIndex())) || (nHere < nEndIndex) ) )
+ if( ( ((nHere == nStartIndex) && (nIndex >= pStart->GetContentIndex())) || (nHere > nStartIndex) )
+ &&( ((nHere == nEndIndex) && (nIndex < pEnd->GetContentIndex())) || (nHere < nEndIndex) ) )
{
uno::Reference < XAccessible > xAcc( (*aIter).second );
if( xAcc.is() )
diff --git a/sw/source/core/access/accpara.cxx b/sw/source/core/access/accpara.cxx
index b9ac98bb9dc0..c51d77ae8ba1 100644
--- a/sw/source/core/access/accpara.cxx
+++ b/sw/source/core/access/accpara.cxx
@@ -1635,9 +1635,9 @@ void SwAccessibleParagraph::_getRunAttributesImpl(
SwTextNode *const pTextNode(aModelPos.GetNode().GetTextNode());
{
SwPosition const aEndPos(*pTextNode,
- aModelPos.nContent.GetIndex() == pTextNode->Len()
+ aModelPos.GetContentIndex() == pTextNode->Len()
? pTextNode->Len() // ???
- : aModelPos.nContent.GetIndex() + 1);
+ : aModelPos.GetContentIndex() + 1);
pPaM.emplace(aModelPos, aEndPos);
}
diff --git a/sw/source/core/crsr/annotationmark.cxx b/sw/source/core/crsr/annotationmark.cxx
index 2fbbb6cf1d8e..d8d048be0c98 100644
--- a/sw/source/core/crsr/annotationmark.cxx
+++ b/sw/source/core/crsr/annotationmark.cxx
@@ -54,7 +54,7 @@ namespace sw::mark
SwTextNode *pTextNode = GetMarkEnd().GetNode().GetTextNode();
assert(pTextNode);
SwTextField *const pTextField = pTextNode->GetFieldTextAttrAt(
- GetMarkEnd().nContent.GetIndex()-1, true);
+ GetMarkEnd().GetContentIndex()-1, true);
assert(pTextField != nullptr);
auto pPostItField
= dynamic_cast<const SwPostItField*>(pTextField->GetFormatField().GetField());
diff --git a/sw/source/core/crsr/bookmark.cxx b/sw/source/core/crsr/bookmark.cxx
index 682519a6e041..acca29c7e470 100644
--- a/sw/source/core/crsr/bookmark.cxx
+++ b/sw/source/core/crsr/bookmark.cxx
@@ -70,11 +70,11 @@ namespace sw::mark
{
SwTextNode & rTextNode(*pNode->GetTextNode());
sal_Int32 const nStart(n == nStartNode
- ? rStartPos.nContent.GetIndex() + 1
+ ? rStartPos.GetContentIndex() + 1
: 0);
sal_Int32 const nEnd(n == nEndNode
// subtract 1 to ignore the end char
- ? rEndPos.nContent.GetIndex() - 1
+ ? rEndPos.GetContentIndex() - 1
: rTextNode.Len());
for (sal_Int32 i = nEnd; nStart < i; --i)
{
@@ -125,19 +125,19 @@ namespace
{
// make sure the position has 1) the proper node, and 2) a proper index
SwTextNode* pTextNode = rPos.GetNode().GetTextNode();
- if(pTextNode == nullptr && rPos.nContent.GetIndex() > 0)
+ if(pTextNode == nullptr && rPos.GetContentIndex() > 0)
{
SAL_INFO(
"sw.core",
- "illegal position: " << rPos.nContent.GetIndex()
+ "illegal position: " << rPos.GetContentIndex()
<< " without proper TextNode");
rPos.nContent.Assign(nullptr, 0);
}
- else if(pTextNode != nullptr && rPos.nContent.GetIndex() > pTextNode->Len())
+ else if(pTextNode != nullptr && rPos.GetContentIndex() > pTextNode->Len())
{
SAL_INFO(
"sw.core",
- "illegal position: " << rPos.nContent.GetIndex()
+ "illegal position: " << rPos.GetContentIndex()
<< " is beyond " << pTextNode->Len());
rPos.nContent.Assign(pTextNode, pTextNode->Len());
}
@@ -150,16 +150,16 @@ namespace
if (aEndMark != CH_TXT_ATR_FORMELEMENT)
{
SwPosition const& rStart(rField.GetMarkStart());
- assert(rStart.GetNode().GetTextNode()->GetText()[rStart.nContent.GetIndex()] == aStartMark); (void) rStart; (void) aStartMark;
+ assert(rStart.GetNode().GetTextNode()->GetText()[rStart.GetContentIndex()] == aStartMark); (void) rStart; (void) aStartMark;
SwPosition const sepPos(sw::mark::FindFieldSep(rField));
- assert(sepPos.GetNode().GetTextNode()->GetText()[sepPos.nContent.GetIndex()] == CH_TXT_ATR_FIELDSEP); (void) sepPos;
+ assert(sepPos.GetNode().GetTextNode()->GetText()[sepPos.GetContentIndex()] == CH_TXT_ATR_FIELDSEP); (void) sepPos;
}
else
{ // must be m_pPos1 < m_pPos2 because of asymmetric SplitNode update
- assert(rField.GetMarkPos().nContent.GetIndex() + 1 == rField.GetOtherMarkPos().nContent.GetIndex());
+ assert(rField.GetMarkPos().GetContentIndex() + 1 == rField.GetOtherMarkPos().GetContentIndex());
}
SwPosition const& rEnd(rField.GetMarkEnd());
- assert(rEnd.GetNode().GetTextNode()->GetText()[rEnd.nContent.GetIndex() - 1] == aEndMark); (void) rEnd;
+ assert(rEnd.GetNode().GetTextNode()->GetText()[rEnd.GetContentIndex() - 1] == aEndMark); (void) rEnd;
}
void lcl_SetFieldMarks(Fieldmark& rField,
@@ -217,7 +217,7 @@ namespace
}
else
{ // InsertString moved the mark's end, not its start
- assert(rField.GetMarkPos().nContent.GetIndex() + 1 == rField.GetOtherMarkPos().nContent.GetIndex());
+ assert(rField.GetMarkPos().GetContentIndex() + 1 == rField.GetOtherMarkPos().GetContentIndex());
}
}
lcl_AssertFieldMarksSet(rField, aStartMark, aEndMark);
@@ -248,8 +248,8 @@ namespace
SwTextNode *const pEndTextNode = rEnd.GetNode().GetTextNode();
assert(pEndTextNode);
const sal_Int32 nEndPos = (rEnd == rStart)
- ? rEnd.nContent.GetIndex()
- : rEnd.nContent.GetIndex() - 1;
+ ? rEnd.GetContentIndex()
+ : rEnd.GetContentIndex() - 1;
assert(pEndTextNode->GetText()[nEndPos] == aEndMark);
SwPosition const aEnd(*pEndTextNode, nEndPos);
io_rDoc.GetDocumentContentOperationsManager().DeleteDummyChar(aEnd, aEndMark);
@@ -259,7 +259,7 @@ namespace
auto InvalidatePosition(SwPosition const& rPos) -> void
{
- SwUpdateAttr const aHint(rPos.nContent.GetIndex(), rPos.nContent.GetIndex(), 0);
+ SwUpdateAttr const aHint(rPos.GetContentIndex(), rPos.GetContentIndex(), 0);
rPos.GetNode().GetTextNode()->CallSwClientNotify(sw::LegacyModifyHint(&aHint, &aHint));
}
}
@@ -307,7 +307,7 @@ namespace sw::mark
{
return "Mark: ( Name, [ Node1, Index1 ] ): ( " + m_aName + ", [ "
+ OUString::number( sal_Int32(GetMarkPos().GetNodeIndex()) ) + ", "
- + OUString::number( GetMarkPos().nContent.GetIndex( ) ) + " ] )";
+ + OUString::number( GetMarkPos().GetContentIndex( ) ) + " ] )";
}
void MarkBase::dumpAsXml(xmlTextWriterPtr pWriter) const
@@ -520,9 +520,9 @@ namespace sw::mark
{
return "Fieldmark: ( Name, Type, [ Nd1, Id1 ], [ Nd2, Id2 ] ): ( " + m_aName + ", "
+ m_aFieldname + ", [ " + OUString::number( sal_Int32(GetMarkPos().GetNodeIndex( )) )
- + ", " + OUString::number( GetMarkPos( ).nContent.GetIndex( ) ) + " ], ["
+ + ", " + OUString::number( GetMarkPos( ).GetContentIndex( ) ) + " ], ["
+ OUString::number( sal_Int32(GetOtherMarkPos().GetNodeIndex( )) ) + ", "
- + OUString::number( GetOtherMarkPos( ).nContent.GetIndex( ) ) + " ] ) ";
+ + OUString::number( GetOtherMarkPos( ).GetContentIndex( ) ) + " ] ) ";
}
void Fieldmark::Invalidate( )
@@ -829,8 +829,8 @@ namespace sw::mark
{
const SwTextNode* const pTextNode = GetMarkEnd().GetNode().GetTextNode();
SwPosition const sepPos(sw::mark::FindFieldSep(*this));
- const sal_Int32 nStart(sepPos.nContent.GetIndex());
- const sal_Int32 nEnd (GetMarkEnd().nContent.GetIndex());
+ const sal_Int32 nStart(sepPos.GetContentIndex());
+ const sal_Int32 nEnd (GetMarkEnd().GetContentIndex());
OUString sContent;
if(nStart + 1 < pTextNode->GetText().getLength() && nEnd <= pTextNode->GetText().getLength() &&
@@ -846,8 +846,8 @@ namespace sw::mark
const SwTextNode* const pTextNode = GetMarkEnd().GetNode().GetTextNode();
SwPosition const sepPos(sw::mark::FindFieldSep(*this));
- const sal_Int32 nStart(sepPos.nContent.GetIndex());
- const sal_Int32 nEnd (GetMarkEnd().nContent.GetIndex());
+ const sal_Int32 nStart(sepPos.GetContentIndex());
+ const sal_Int32 nEnd (GetMarkEnd().GetContentIndex());
if(nStart + 1 < pTextNode->GetText().getLength() && nEnd <= pTextNode->GetText().getLength() &&
nEnd > nStart + 2)
diff --git a/sw/source/core/crsr/callnk.cxx b/sw/source/core/crsr/callnk.cxx
index cd8f4d8283c3..7628a51c27c0 100644
--- a/sw/source/core/crsr/callnk.cxx
+++ b/sw/source/core/crsr/callnk.cxx
@@ -40,7 +40,7 @@ SwCallLink::SwCallLink( SwCursorShell & rSh )
SwPaM* pCursor = m_rShell.IsTableMode() ? m_rShell.GetTableCrs() : m_rShell.GetCursor();
SwNode& rNd = pCursor->GetPoint()->GetNode();
m_nNode = rNd.GetIndex();
- m_nContent = pCursor->GetPoint()->nContent.GetIndex();
+ m_nContent = pCursor->GetPoint()->GetContentIndex();
m_nNodeType = rNd.GetNodeType();
m_bHasSelection = ( *pCursor->GetPoint() != *pCursor->GetMark() );
@@ -130,7 +130,7 @@ SwCallLink::~SwCallLink() COVERITY_NOEXCEPT_FALSE
}
}
- sal_Int32 nCmp, nCurrentContent = pCurrentCursor->GetPoint()->nContent.GetIndex();
+ sal_Int32 nCmp, nCurrentContent = pCurrentCursor->GetPoint()->GetContentIndex();
SwNodeType nNdWhich = pCNd->GetNodeType();
SwNodeOffset nCurrentNode = pCurrentCursor->GetPoint()->GetNodeIndex();
diff --git a/sw/source/core/crsr/crbm.cxx b/sw/source/core/crsr/crbm.cxx
index b19f85af1cb9..4c9153012425 100644
--- a/sw/source/core/crsr/crbm.cxx
+++ b/sw/source/core/crsr/crbm.cxx
@@ -150,14 +150,14 @@ bool IsMarkHidden(SwRootFrame const& rLayout, ::sw::mark::IMark const& rMark)
}
else
{
- if (rMark.GetMarkPos().nContent.GetIndex() == pTextNode->Len())
+ if (rMark.GetMarkPos().GetContentIndex() == pTextNode->Len())
{ // at end of node: never deleted (except if node deleted)
return pTextNode->GetRedlineMergeFlag() == SwNode::Merge::Hidden;
}
else
{ // check character following mark pos
return pFrame->MapModelToViewPos(rMark.GetMarkPos())
- == pFrame->MapModelToView(pTextNode, rMark.GetMarkPos().nContent.GetIndex() + 1);
+ == pFrame->MapModelToView(pTextNode, rMark.GetMarkPos().GetContentIndex() + 1);
}
}
}
diff --git a/sw/source/core/crsr/crossrefbookmark.cxx b/sw/source/core/crsr/crossrefbookmark.cxx
index ca5bd2c9ad28..2976c2962a6d 100644
--- a/sw/source/core/crsr/crossrefbookmark.cxx
+++ b/sw/source/core/crsr/crossrefbookmark.cxx
@@ -54,7 +54,7 @@ namespace sw::mark
assert(rNewPos.GetNode().GetTextNode() &&
"<sw::mark::CrossRefBookmark::SetMarkPos(..)>"
" - new bookmark position for cross-reference bookmark doesn't mark text node");
- assert(rNewPos.nContent.GetIndex() == 0 &&
+ assert(rNewPos.GetContentIndex() == 0 &&
"<sw::mark::CrossRefBookmark::SetMarkPos(..)>"
" - new bookmark position for cross-reference bookmark doesn't mark start of text node");
MarkBase::SetMarkPos(rNewPos);
diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx
index 0fb667ce0578..f32d0a40ace9 100644
--- a/sw/source/core/crsr/crsrsh.cxx
+++ b/sw/source/core/crsr/crsrsh.cxx
@@ -229,7 +229,7 @@ void SwCursorShell::StartAction()
// save for update of the ribbon bar
const SwNode& rNd = m_pCurrentCursor->GetPoint()->GetNode();
m_nCurrentNode = rNd.GetIndex();
- m_nCurrentContent = m_pCurrentCursor->GetPoint()->nContent.GetIndex();
+ m_nCurrentContent = m_pCurrentCursor->GetPoint()->GetContentIndex();
m_nCurrentNdTyp = rNd.GetNodeType();
if( rNd.IsTextNode() )
m_nLeftFramePos = SwCallLink::getLayoutFrame( GetLayout(), *rNd.GetTextNode(), m_nCurrentContent, true );
@@ -2569,10 +2569,10 @@ OUString SwCursorShell::GetSelText() const
else if (rNode.IsTextNode())
{
sal_Int32 const nStart(i == pStart->GetNodeIndex()
- ? pStart->nContent.GetIndex()
+ ? pStart->GetContentIndex()
: 0);
sal_Int32 const nEnd(i == pEnd->GetNodeIndex()
- ? pEnd->nContent.GetIndex()
+ ? pEnd->GetContentIndex()
: rNode.GetTextNode()->Len());
buf.append(rNode.GetTextNode()->GetExpandText(
GetLayout(),
@@ -2590,9 +2590,9 @@ OUString SwCursorShell::GetSelText() const
SwTextNode* pTextNd = m_pCurrentCursor->GetNode().GetTextNode();
if( pTextNd )
{
- const sal_Int32 nStt = m_pCurrentCursor->Start()->nContent.GetIndex();
+ const sal_Int32 nStt = m_pCurrentCursor->Start()->GetContentIndex();
aText = pTextNd->GetExpandText(GetLayout(), nStt,
- m_pCurrentCursor->End()->nContent.GetIndex() - nStt );
+ m_pCurrentCursor->End()->GetContentIndex() - nStt );
}
}
return aText;
@@ -2614,7 +2614,7 @@ sal_Unicode SwCursorShell::GetChar( bool bEnd, tools::Long nOffset )
if( !pTextNd )
return 0;
- const sal_Int32 nPos = pPos->nContent.GetIndex();
+ const sal_Int32 nPos = pPos->GetContentIndex();
const OUString& rStr = pTextNd->GetText();
sal_Unicode cCh = 0;
@@ -2638,7 +2638,7 @@ bool SwCursorShell::ExtendSelection( bool bEnd, sal_Int32 nCount )
SwTextNode* pTextNd = pPos->GetNode().GetTextNode();
assert(pTextNd);
- sal_Int32 nPos = pPos->nContent.GetIndex();
+ sal_Int32 nPos = pPos->GetContentIndex();
if( bEnd )
{
if ((nPos + nCount) <= pTextNd->GetText().getLength())
@@ -2757,7 +2757,7 @@ sal_uInt16 SwCursorShell::GetCursorCnt( bool bAll ) const
bool SwCursorShell::IsStartOfDoc() const
{
- if( m_pCurrentCursor->GetPoint()->nContent.GetIndex() )
+ if( m_pCurrentCursor->GetPoint()->GetContentIndex() )
return false;
// after EndOfIcons comes the content selection (EndNd+StNd+ContentNd)
@@ -2775,7 +2775,7 @@ bool SwCursorShell::IsEndOfDoc() const
pCNd = SwNodes::GoPrevious( &aIdx );
return aIdx == m_pCurrentCursor->GetPoint()->nNode &&
- pCNd->Len() == m_pCurrentCursor->GetPoint()->nContent.GetIndex();
+ pCNd->Len() == m_pCurrentCursor->GetPoint()->GetContentIndex();
}
/** Invalidate cursors
@@ -3409,8 +3409,8 @@ bool SwCursorShell::IsSelFullPara() const
if( m_pCurrentCursor->GetPoint()->GetNodeIndex() ==
m_pCurrentCursor->GetMark()->GetNodeIndex() && !m_pCurrentCursor->IsMultiSelection() )
{
- sal_Int32 nStt = m_pCurrentCursor->GetPoint()->nContent.GetIndex();
- sal_Int32 nEnd = m_pCurrentCursor->GetMark()->nContent.GetIndex();
+ sal_Int32 nStt = m_pCurrentCursor->GetPoint()->GetContentIndex();
+ sal_Int32 nEnd = m_pCurrentCursor->GetMark()->GetContentIndex();
if( nStt > nEnd )
{
sal_Int32 nTmp = nStt;
@@ -3464,7 +3464,7 @@ bool SwCursorShell::SelectHiddenRange()
const SwTextNode* pNode = rPt.GetNode().GetTextNode();
if ( pNode )
{
- const sal_Int32 nPos = rPt.nContent.GetIndex();
+ const sal_Int32 nPos = rPt.GetContentIndex();
// check if nPos is in hidden range
sal_Int32 nHiddenStart;
@@ -3755,7 +3755,7 @@ void SwCursorShell::GetSmartTagTerm( std::vector< OUString >& rSmartTagTypes,
if ( !pSmartTagList )
return;
- sal_Int32 nCurrent = aPos.nContent.GetIndex();
+ sal_Int32 nCurrent = aPos.GetContentIndex();
sal_Int32 nBegin = nCurrent;
sal_Int32 nLen = 1;
@@ -3797,7 +3797,7 @@ void SwCursorShell::GetSmartTagRect( const Point& rPt, SwRect& rSelectRect )
if( pNode->IsInProtectSect() )
return;
- sal_Int32 nBegin = aPos.nContent.GetIndex();
+ sal_Int32 nBegin = aPos.GetContentIndex();
sal_Int32 nLen = 1;
if (!pSmartTagList->InWrongWord(nBegin, nLen) || pNode->IsSymbolAt(nBegin))
@@ -3809,9 +3809,9 @@ void SwCursorShell::GetSmartTagRect( const Point& rPt, SwRect& rSelectRect )
//save the start and end positions of the line and the starting point
Push();
LeftMargin();
- const sal_Int32 nLineStart = GetCursor()->GetPoint()->nContent.GetIndex();
+ const sal_Int32 nLineStart = GetCursor()->GetPoint()->GetContentIndex();
RightMargin();
- const sal_Int32 nLineEnd = GetCursor()->GetPoint()->nContent.GetIndex();
+ const sal_Int32 nLineEnd = GetCursor()->GetPoint()->GetContentIndex();
Pop(PopMode::DeleteCurrent);
// make sure the selection build later from the data below does not
diff --git a/sw/source/core/crsr/crstrvl.cxx b/sw/source/core/crsr/crstrvl.cxx
index 114dccd12d93..d3ffee6f4913 100644
--- a/sw/source/core/crsr/crstrvl.cxx
+++ b/sw/source/core/crsr/crstrvl.cxx
@@ -756,7 +756,7 @@ bool SwCursorShell::MoveFieldType(
SwTextNode* pTNd = rPos.GetNode().GetTextNode();
OSL_ENSURE( pTNd, "No ContentNode" );
- SwTextField * pTextField = pTNd->GetFieldTextAttrAt( rPos.nContent.GetIndex(), true );
+ SwTextField * pTextField = pTNd->GetFieldTextAttrAt( rPos.GetContentIndex(), true );
const bool bDelField = ( pTextField == nullptr );
sal_Int32 nContentOffset = -1;
@@ -766,7 +766,7 @@ bool SwCursorShell::MoveFieldType(
SwFormatField* pFormatField = new SwFormatField( SwDateTimeField(
static_cast<SwDateTimeFieldType*>(mxDoc->getIDocumentFieldsAccess().GetSysFieldType( SwFieldIds::DateTime ) ) ) );
- pTextField = new SwTextField( *pFormatField, rPos.nContent.GetIndex(),
+ pTextField = new SwTextField( *pFormatField, rPos.GetContentIndex(),
mxDoc->IsClipBoard() );
pTextField->ChgTextNode( pTNd );
}
@@ -775,7 +775,7 @@ bool SwCursorShell::MoveFieldType(
// the cursor might be anywhere inside the input field,
// but we will be searching for the field start
if (pTextField->Which() == RES_TXTATR_INPUTFIELD
- && rPos.nContent.GetIndex() != pTextField->GetStart())
+ && rPos.GetContentIndex() != pTextField->GetStart())
nContentOffset = pTextField->GetStart();
}
bool isSrch;
@@ -932,7 +932,7 @@ SwTextField * SwCursorShell::GetTextFieldAtPos(
SwTextNode * const pNode = pPos->GetNode().GetTextNode();
if ( pNode != nullptr )
{
- pTextField = pNode->GetFieldTextAttrAt( pPos->nContent.GetIndex(), bIncludeInputFieldAtStart );
+ pTextField = pNode->GetFieldTextAttrAt( pPos->GetContentIndex(), bIncludeInputFieldAtStart );
}
return pTextField;
@@ -952,7 +952,7 @@ SwTextField* SwCursorShell::GetTextFieldAtCursor(
pTextField->End() != nullptr
? *(pTextField->End()) - pTextField->GetStart()
: 1;
- if ( ( pCursor->End()->nContent.GetIndex() - pCursor->Start()->nContent.GetIndex() ) <= nTextFieldLength )
+ if ( ( pCursor->End()->GetContentIndex() - pCursor->Start()->GetContentIndex() ) <= nTextFieldLength )
{
pFieldAtCursor = pTextField;
}
@@ -1013,7 +1013,7 @@ SwTextContentControl* SwCursorShell::CursorInsideContentControl() const
continue;
}
- sal_Int32 nIndex = pStart->nContent.GetIndex();
+ sal_Int32 nIndex = pStart->GetContentIndex();
if (SwTextAttr* pAttr = pTextNode->GetTextAttrAt(nIndex, RES_TXTATR_CONTENTCONTROL, SwTextNode::PARENT))
{
return static_txtattr_cast<SwTextContentControl*>(pAttr);
@@ -1406,7 +1406,7 @@ bool SwCursorShell::GetContentAtPos( const Point& rPt,
&& !aTmpState.m_bFootnoteNoInfo )
{
const SwWrongList* pSmartTagList = pTextNd->GetSmartTags();
- sal_Int32 nCurrent = aPos.nContent.GetIndex();
+ sal_Int32 nCurrent = aPos.GetContentIndex();
const sal_Int32 nBegin = nCurrent;
sal_Int32 nLen = 1;
@@ -1454,7 +1454,7 @@ bool SwCursorShell::GetContentAtPos( const Point& rPt,
&& ( IsAttrAtPos::Field | IsAttrAtPos::ClickField ) & rContentAtPos.eContentAtPos
&& !aTmpState.m_bFootnoteNoInfo )
{
- pTextAttr = pTextNd->GetFieldTextAttrAt( aPos.nContent.GetIndex() );
+ pTextAttr = pTextNd->GetFieldTextAttrAt( aPos.GetContentIndex() );
const SwField* pField = pTextAttr != nullptr
? pTextAttr->GetFormatField().GetField()
: nullptr;
@@ -1533,7 +1533,7 @@ bool SwCursorShell::GetContentAtPos( const Point& rPt,
if (!bRet && rContentAtPos.eContentAtPos & IsAttrAtPos::ContentControl)
{
SwTextAttr* pAttr = pTextNd->GetTextAttrAt(
- aPos.nContent.GetIndex(), RES_TXTATR_CONTENTCONTROL, SwTextNode::PARENT);
+ aPos.GetContentIndex(), RES_TXTATR_CONTENTCONTROL, SwTextNode::PARENT);
if (pAttr)
{
rContentAtPos.eContentAtPos = IsAttrAtPos::ContentControl;
@@ -1558,7 +1558,7 @@ bool SwCursorShell::GetContentAtPos( const Point& rPt,
rContentAtPos.eContentAtPos = IsAttrAtPos::Ftn;
}
else if ( nullptr != ( pTextAttr = pTextNd->GetTextAttrForCharAt(
- aPos.nContent.GetIndex(), RES_TXTATR_FTN )) )
+ aPos.GetContentIndex(), RES_TXTATR_FTN )) )
{
bRet = true;
if( bSetCursor )
@@ -1612,7 +1612,7 @@ bool SwCursorShell::GetContentAtPos( const Point& rPt,
{
std::vector<SwTextAttr *> const marks(
pTextNd->GetTextAttrsAt(
- aPos.nContent.GetIndex(), RES_TXTATR_TOXMARK));
+ aPos.GetContentIndex(), RES_TXTATR_TOXMARK));
if (!marks.empty())
{ // hmm... can only return 1 here
pTextAttr = *marks.begin();
@@ -1624,7 +1624,7 @@ bool SwCursorShell::GetContentAtPos( const Point& rPt,
{
std::vector<SwTextAttr *> const marks(
pTextNd->GetTextAttrsAt(
- aPos.nContent.GetIndex(), RES_TXTATR_REFMARK));
+ aPos.GetContentIndex(), RES_TXTATR_REFMARK));
if (!marks.empty())
{ // hmm... can only return 1 here
pTextAttr = *marks.begin();
@@ -1678,7 +1678,7 @@ bool SwCursorShell::GetContentAtPos( const Point& rPt,
&& IsAttrAtPos::InetAttr & rContentAtPos.eContentAtPos
&& !aTmpState.m_bFootnoteNoInfo )
{
- sal_Int32 index = aPos.nContent.GetIndex();
+ sal_Int32 index = aPos.GetContentIndex();
pTextAttr = pTextNd->GetTextAttrAt(index, RES_TXTATR_INETFMT);
if(!pTextAttr && index > 0)
@@ -1895,7 +1895,7 @@ bool SwCursorShell::GetContentAtPos( const Point& rPt,
#ifdef DBG_UTIL
if( !bRet && IsAttrAtPos::CurrAttrs & rContentAtPos.eContentAtPos )
{
- const sal_Int32 n = aPos.nContent.GetIndex();
+ const sal_Int32 n = aPos.GetContentIndex();
SfxItemSetFixed<POOLATTR_BEGIN, POOLATTR_END - 1> aSet( GetDoc()->GetAttrPool() );
if( pTextNd->GetpSwpHints() )
{
@@ -1932,7 +1932,7 @@ bool SwCursorShell::GetContentAtPos( const Point& rPt,
rContentAtPos.sStr = "Pos: (";
rContentAtPos.sStr += OUString::number( sal_Int32(aPos.GetNodeIndex()));
rContentAtPos.sStr += ":";
- rContentAtPos.sStr += OUString::number( aPos.nContent.GetIndex());
+ rContentAtPos.sStr += OUString::number( aPos.GetContentIndex());
rContentAtPos.sStr += ")";
rContentAtPos.sStr += "\nParagraph Style: ";
rContentAtPos.sStr += pTextNd->GetFormatColl()->GetName();
@@ -1993,7 +1993,7 @@ const SwPostItField* SwCursorShell::GetPostItFieldAtCursor() const
const SwTextNode* pTextNd = pCursorPos->GetNode().GetTextNode();
if ( pTextNd )
{
- SwTextAttr* pTextAttr = pTextNd->GetFieldTextAttrAt( pCursorPos->nContent.GetIndex() );
+ SwTextAttr* pTextAttr = pTextNd->GetFieldTextAttrAt( pCursorPos->GetContentIndex() );
const SwField* pField = pTextAttr != nullptr ? pTextAttr->GetFormatField().GetField() : nullptr;
if ( pField && pField->Which()== SwFieldIds::Postit )
{
@@ -2149,7 +2149,7 @@ bool SwCursorShell::SelectTextAttr( sal_uInt16 nWhich,
SwPosition& rPos = *m_pCurrentCursor->GetPoint();
SwTextNode* pTextNd = rPos.GetNode().GetTextNode();
pTextAttr = pTextNd
- ? pTextNd->GetTextAttrAt(rPos.nContent.GetIndex(),
+ ? pTextNd->GetTextAttrAt(rPos.GetContentIndex(),
nWhich,
bExpand ? SwTextNode::EXPAND : SwTextNode::DEFAULT)
: nullptr;
@@ -2264,7 +2264,7 @@ bool SwCursorShell::SetShadowCursorPos( const Point& rPt, SwFillMode eFillMode )
++aEnd;
if( aEnd.GetNode().IsEndNode() &&
- pCNd->Len() == aPos.nContent.GetIndex() )
+ pCNd->Len() == aPos.GetContentIndex() )
aPos.nNode = *pSectNd->EndOfSectionNode();
}
diff --git a/sw/source/core/crsr/findattr.cxx b/sw/source/core/crsr/findattr.cxx
index 56ded25b8e62..7b7c475189e5 100644
--- a/sw/source/core/crsr/findattr.cxx
+++ b/sw/source/core/crsr/findattr.cxx
@@ -104,9 +104,9 @@ static void lcl_SetAttrPam( SwPaM& rPam, sal_Int32 nStart, const sal_Int32* pEnd
{
sal_Int32 nContentPos;
if( bSaveMark )
- nContentPos = rPam.GetMark()->nContent.GetIndex();
+ nContentPos = rPam.GetMark()->GetContentIndex();
else
- nContentPos = rPam.GetPoint()->nContent.GetIndex();
+ nContentPos = rPam.GetPoint()->GetContentIndex();
bool bTstEnd = rPam.GetPoint()->nNode == rPam.GetMark()->nNode;
SwContentNode* pCNd = rPam.GetContentNode();
@@ -146,7 +146,7 @@ static bool lcl_SearchAttr( const SwTextNode& rTextNd, SwPaM& rPam,
const SwTextAttr *pTextHt = nullptr;
bool bForward = &fnMove == &fnMoveForward;
size_t nPos = bForward ? 0 : rTextNd.GetSwpHints().Count();
- sal_Int32 nContentPos = rPam.GetPoint()->nContent.GetIndex();
+ sal_Int32 nContentPos = rPam.GetPoint()->GetContentIndex();
while( nullptr != ( pTextHt=(*fnMove.fnGetHint)(rTextNd.GetSwpHints(),nPos,nContentPos)))
if (pTextHt->Which() == rCmpItem.Which())
@@ -247,16 +247,16 @@ void SwAttrCheckArr::SetNewSet( const SwTextNode& rTextNd, const SwPaM& rPam )
if( m_bForward )
{
- m_nNodeStart = rPam.GetPoint()->nContent.GetIndex();
+ m_nNodeStart = rPam.GetPoint()->GetContentIndex();
m_nNodeEnd = rPam.GetPoint()->nNode == rPam.GetMark()->nNode
- ? rPam.GetMark()->nContent.GetIndex()
+ ? rPam.GetMark()->GetContentIndex()
: rTextNd.GetText().getLength();
}
else
{
- m_nNodeEnd = rPam.GetPoint()->nContent.GetIndex();
+ m_nNodeEnd = rPam.GetPoint()->GetContentIndex();
m_nNodeStart = rPam.GetPoint()->nNode == rPam.GetMark()->nNode
- ? rPam.GetMark()->nContent.GetIndex()
+ ? rPam.GetMark()->GetContentIndex()
: 0;
}
@@ -927,8 +927,8 @@ bool FindAttrImpl(SwPaM & rSearchPam,
// if at beginning/end then move it out of the node
if( bSrchForward
- ? pPam->GetPoint()->nContent.GetIndex() == pPam->GetContentNode()->Len()
- : !pPam->GetPoint()->nContent.GetIndex() )
+ ? pPam->GetPoint()->GetContentIndex() == pPam->GetContentNode()->Len()
+ : !pPam->GetPoint()->GetContentIndex() )
{
if( !(*fnMove.fnNds)( &pPam->GetPoint()->nNode, false ))
{
@@ -962,7 +962,7 @@ bool FindAttrImpl(SwPaM & rSearchPam,
while (pAttr
&& (pAttrNode->GetIndex() < pPam->GetPoint()->GetNodeIndex()
|| (pAttrNode->GetIndex() == pPam->GetPoint()->GetNodeIndex()
- && pAttr->GetStart() < pPam->GetPoint()->nContent.GetIndex())
+ && pAttr->GetStart() < pPam->GetPoint()->GetContentIndex())
|| pAttr->Which() != nWhich));
}
else
@@ -975,7 +975,7 @@ bool FindAttrImpl(SwPaM & rSearchPam,
while (pAttr
&& (pPam->GetPoint()->GetNodeIndex() < pAttrNode->GetIndex()
|| (pPam->GetPoint()->GetNodeIndex() == pAttrNode->GetIndex()
- && pPam->GetPoint()->nContent.GetIndex() <= pAttr->GetStart())
+ && pPam->GetPoint()->GetContentIndex() <= pAttr->GetStart())
|| pAttr->Which() != nWhich));
}
if (pAttr)
@@ -1064,8 +1064,8 @@ static bool FindAttrsImpl(SwPaM & rSearchPam,
// if at beginning/end then move it out of the node
if( bMoveFirst &&
( bSrchForward
- ? pPam->GetPoint()->nContent.GetIndex() == pPam->GetContentNode()->Len()
- : !pPam->GetPoint()->nContent.GetIndex() ) )
+ ? pPam->GetPoint()->GetContentIndex() == pPam->GetContentNode()->Len()
+ : !pPam->GetPoint()->GetContentIndex() ) )
{
if( !(*fnMove.fnNds)( &pPam->GetPoint()->nNode, false ))
{
@@ -1133,14 +1133,14 @@ static bool FindAttrsImpl(SwPaM & rSearchPam,
continue;
}
sal_Int32 const nStart(rExtent.pNode == &rStart.GetNode()
- ? rStart.nContent.GetIndex()
+ ? rStart.GetContentIndex()
: 0);
if (rExtent.nEnd <= nStart)
{
continue;
}
sal_Int32 const nEnd(rExtent.pNode == &rEnd.GetNode()
- ? rEnd.nContent.GetIndex()
+ ? rEnd.GetContentIndex()
: rExtent.pNode->Len());
if (nEnd < rExtent.nStart
|| (nStart != nEnd && nEnd == rExtent.nStart))
diff --git a/sw/source/core/crsr/findfmt.cxx b/sw/source/core/crsr/findfmt.cxx
index 020a277efdd9..725c4934153d 100644
--- a/sw/source/core/crsr/findfmt.cxx
+++ b/sw/source/core/crsr/findfmt.cxx
@@ -36,8 +36,8 @@ bool FindFormatImpl(SwPaM & rSearchPam,
// if at beginning/end then move it out of the node
if( bSrchForward
- ? pPam->GetPoint()->nContent.GetIndex() == pPam->GetContentNode()->Len()
- : !pPam->GetPoint()->nContent.GetIndex() )
+ ? pPam->GetPoint()->GetContentIndex() == pPam->GetContentNode()->Len()
+ : !pPam->GetPoint()->GetContentIndex() )
{
if( !(*fnMove.fnNds)( &pPam->GetPoint()->nNode, false ))
{
diff --git a/sw/source/core/crsr/findtxt.cxx b/sw/source/core/crsr/findtxt.cxx
index dbe856ec37cf..4e23a612766e 100644
--- a/sw/source/core/crsr/findtxt.cxx
+++ b/sw/source/core/crsr/findtxt.cxx
@@ -430,7 +430,7 @@ bool FindTextImpl(SwPaM & rSearchPam,
}
else
{
- nEnd.SetModelIndex(pPam->GetMark()->nContent.GetIndex());
+ nEnd.SetModelIndex(pPam->GetMark()->GetContentIndex());
}
}
else
@@ -1155,8 +1155,8 @@ std::optional<OUString> ReplaceBackReferences(const i18nutil::SearchOptions2& rS
}
else
{
- nStart.SetModelIndex(pPam->Start()->nContent.GetIndex());
- nEnd.SetModelIndex(pPam->End()->nContent.GetIndex());
+ nStart.SetModelIndex(pPam->Start()->GetContentIndex());
+ nEnd.SetModelIndex(pPam->End()->GetContentIndex());
}
std::vector<AmbiguousIndex> aFltArr;
OUString const aStr = lcl_CleanStr(*pTextNode->GetTextNode(), pFrame, pLayout,
diff --git a/sw/source/core/crsr/pam.cxx b/sw/source/core/crsr/pam.cxx
index 3f42c4c60dc6..0698b3f6d3a6 100644
--- a/sw/source/core/crsr/pam.cxx
+++ b/sw/source/core/crsr/pam.cxx
@@ -204,13 +204,13 @@ void SwPosition::dumpAsXml(xmlTextWriterPtr pWriter) const
{
(void)xmlTextWriterStartElement(pWriter, BAD_CAST("SwPosition"));
(void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST("nNode"), BAD_CAST(OString::number(sal_Int32(GetNodeIndex())).getStr()));
- (void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST("nContent"), BAD_CAST(OString::number(nContent.GetIndex()).getStr()));
+ (void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST("nContent"), BAD_CAST(OString::number(GetContentIndex()).getStr()));
(void)xmlTextWriterEndElement(pWriter);
}
std::ostream &operator <<(std::ostream& s, const SwPosition& position)
{
- return s << "SwPosition (node " << position.GetNodeIndex() << ", offset " << position.nContent.GetIndex() << ")";
+ return s << "SwPosition (node " << position.GetNodeIndex() << ", offset " << position.GetContentIndex() << ")";
}
namespace {
@@ -810,11 +810,11 @@ bool SwPaM::HasReadonlySel( bool bFormView ) const
for (size_t i = 0; i < pHints->Count(); ++i)
{
SwTextAttr const*const pHint(pHints->Get(i));
- if (n == rStart.nNode && pHint->GetStart() < rStart.nContent.GetIndex())
+ if (n == rStart.nNode && pHint->GetStart() < rStart.GetContentIndex())
{
continue; // before selection
}
- if (n == rEnd.nNode && rEnd.nContent.GetIndex() <= pHint->GetStart())
+ if (n == rEnd.nNode && rEnd.GetContentIndex() <= pHint->GetStart())
{
break; // after selection
}
@@ -837,7 +837,7 @@ bool SwPaM::HasReadonlySel( bool bFormView ) const
SwTextNode* pTextNode = pStart->GetNode().GetTextNode();
if (pTextNode)
{
- sal_Int32 nIndex = pStart->nContent.GetIndex();
+ sal_Int32 nIndex = pStart->GetContentIndex();
SwTextAttr* pAttr
= pTextNode->GetTextAttrAt(nIndex, RES_TXTATR_CONTENTCONTROL, SwTextNode::PARENT);
auto pTextContentControl = static_txtattr_cast<SwTextContentControl*>(pAttr);
@@ -1061,7 +1061,7 @@ bool GoCurrPara( SwPaM & rPam, SwMoveFnCollection const & aPosPara )
SwContentNode * pNd = rPos.GetNode().GetContentNode();
if( pNd )
{
- const sal_Int32 nOld = rPos.nContent.GetIndex();
+ const sal_Int32 nOld = rPos.GetContentIndex();
const sal_Int32 nNew = &aPosPara == &fnMoveForward ? 0 : pNd->Len();
// if already at beginning/end then to the next/previous
if( nOld != nNew )
@@ -1142,10 +1142,10 @@ OUString SwPaM::GetText() const
{
// Handle corner cases of start/end node(s)
const sal_Int32 nStart = bIsStartNode
- ? Start()->nContent.GetIndex()
+ ? Start()->GetContentIndex()
: 0;
const sal_Int32 nEnd = bIsEndNode
- ? End()->nContent.GetIndex()
+ ? End()->GetContentIndex()
: aTmpStr.getLength();
aResult.append(aTmpStr.subView(nStart, nEnd-nStart));
@@ -1176,12 +1176,12 @@ void SwPaM::InvalidatePaM()
{
// pretend that the PaM marks changed formatting to reformat...
sal_Int32 const nStart(
- index == Start()->nNode ? Start()->nContent.GetIndex() : 0);
+ index == Start()->nNode ? Start()->GetContentIndex() : 0);
// this should work even for length of 0
SwUpdateAttr const aHint(
nStart,
index == End()->nNode
- ? End()->nContent.GetIndex() - nStart
+ ? End()->GetContentIndex() - nStart
: pTextNode->Len() - nStart,
0);
pTextNode->TriggerNodeUpdate(sw::LegacyModifyHint(&aHint, &aHint));
diff --git a/sw/source/core/crsr/swcrsr.cxx b/sw/source/core/crsr/swcrsr.cxx
index d6ef76de8c61..b4b360113481 100644
--- a/sw/source/core/crsr/swcrsr.cxx
+++ b/sw/source/core/crsr/swcrsr.cxx
@@ -89,8 +89,8 @@ struct PercentHdl
if( rPam.GetPoint()->nNode == rPam.GetMark()->nNode )
{
bNodeIdx = false;
- nStt = rPam.GetMark()->nContent.GetIndex();
- nEnd = rPam.GetPoint()->nContent.GetIndex();
+ nStt = rPam.GetMark()->GetContentIndex();
+ nEnd = rPam.GetPoint()->GetContentIndex();
}
else
{
@@ -118,7 +118,7 @@ struct PercentHdl
if( bNodeIdx )
nPos = sal_Int32(rPos.GetNodeIndex());
else
- nPos = rPos.nContent.GetIndex();
+ nPos = rPos.GetContentIndex();
::SetProgressState( bBack ? nActPos - nPos : nPos, pDSh );
}
};
@@ -219,7 +219,7 @@ namespace
SwTextNode* pTextNd = pPos->GetNode().GetTextNode();
if (!pTextNd)
return nullptr;
- return pTextNd->GetTextAttrAt(pPos->nContent.GetIndex(), RES_TXTATR_INPUTFIELD, SwTextNode::PARENT);
+ return pTextNd->GetTextAttrAt(pPos->GetContentIndex(), RES_TXTATR_INPUTFIELD, SwTextNode::PARENT);
}
}
@@ -391,7 +391,7 @@ bool SwCursor::IsSelOvr( SwCursorSelOverFlags eFlags )
if (rPtIdx.GetIndex() == m_vSavePos.back().nNode
- && GetPoint()->nContent.GetIndex() == m_vSavePos.back().nContent)
+ && GetPoint()->GetContentIndex() == m_vSavePos.back().nContent)
{
// new position equals saved one
// --> trigger restore of saved pos by setting <pFrame> to NULL - see below
@@ -458,11 +458,11 @@ bool SwCursor::IsSelOvr( SwCursorSelOverFlags eFlags )
const sal_Int32 nRefContentIdx =
( SwCursorSelOverFlags::Toggle & eFlags )
? m_vSavePos.back().nContent
- : GetMark()->nContent.GetIndex();
+ : GetMark()->GetContentIndex();
const bool bIsForwardSelection =
nRefNodeIdx < GetPoint()->GetNodeIndex()
|| ( nRefNodeIdx == GetPoint()->GetNodeIndex()
- && nRefContentIdx < GetPoint()->nContent.GetIndex() );
+ && nRefContentIdx < GetPoint()->GetContentIndex() );
if ( pInputFieldTextAttrAtPoint != nullptr )
{
@@ -1215,7 +1215,7 @@ bool SwCursor::IsStartWordWT(sal_Int16 nWordType, SwRootFrame const*const pLayou
SwTextNode* pTextNd = GetNode().GetTextNode();
if (pTextNd)
{
- sal_Int32 nPtPos = GetPoint()->nContent.GetIndex();
+ sal_Int32 nPtPos = GetPoint()->GetContentIndex();
HideWrapper w(pLayout, pTextNd, nPtPos);
@@ -1233,7 +1233,7 @@ bool SwCursor::IsEndWordWT(sal_Int16 nWordType, SwRootFrame const*const pLayout)
SwTextNode* pTextNd = GetNode().GetTextNode();
if (pTextNd)
{
- sal_Int32 nPtPos = GetPoint()->nContent.GetIndex();
+ sal_Int32 nPtPos = GetPoint()->GetContentIndex();
HideWrapper w(pLayout, pTextNd, nPtPos);
@@ -1252,7 +1252,7 @@ bool SwCursor::IsInWordWT(sal_Int16 nWordType, SwRootFrame const*const pLayout)
SwTextNode* pTextNd = GetNode().GetTextNode();
if (pTextNd)
{
- sal_Int32 nPtPos = GetPoint()->nContent.GetIndex();
+ sal_Int32 nPtPos = GetPoint()->GetContentIndex();
{
HideWrapper w(pLayout, pTextNd, nPtPos);
@@ -1281,7 +1281,7 @@ bool SwCursor::IsStartEndSentence(bool bEnd, SwRootFrame const*const pLayout) co
{
bool bRet = bEnd ?
GetContentNode() && GetPoint()->nContent == GetContentNode()->Len() :
- GetPoint()->nContent.GetIndex() == 0;
+ GetPoint()->GetContentIndex() == 0;
if ((pLayout != nullptr && pLayout->HasMergedParas()) || !bRet)
{
@@ -1300,7 +1300,7 @@ bool SwCursor::GoStartWordWT(sal_Int16 nWordType, SwRootFrame const*const pLayou
if (pTextNd)
{
SwCursorSaveState aSave( *this );
- sal_Int32 nPtPos = GetPoint()->nContent.GetIndex();
+ sal_Int32 nPtPos = GetPoint()->GetContentIndex();
{
HideWrapper w(pLayout, pTextNd, nPtPos);
@@ -1329,7 +1329,7 @@ bool SwCursor::GoEndWordWT(sal_Int16 nWordType, SwRootFrame const*const pLayout)
if (pTextNd)
{
SwCursorSaveState aSave( *this );
- sal_Int32 nPtPos = GetPoint()->nContent.GetIndex();
+ sal_Int32 nPtPos = GetPoint()->GetContentIndex();
{
HideWrapper w(pLayout, pTextNd, nPtPos);
@@ -1342,7 +1342,7 @@ bool SwCursor::GoEndWordWT(sal_Int16 nWordType, SwRootFrame const*const pLayout)
}
if (nPtPos <= pTextNd->GetText().getLength() && nPtPos >= 0 &&
- GetPoint()->nContent.GetIndex() != nPtPos )
+ GetPoint()->GetContentIndex() != nPtPos )
{
*GetPoint() = SwPosition(*pTextNd, nPtPos);
if( !IsSelOvr() )
@@ -1359,7 +1359,7 @@ bool SwCursor::GoNextWordWT(sal_Int16 nWordType, SwRootFrame const*const pLayout
if (pTextNd)
{
SwCursorSaveState aSave( *this );
- sal_Int32 nPtPos = GetPoint()->nContent.GetIndex();
+ sal_Int32 nPtPos = GetPoint()->GetContentIndex();
{
HideWrapper w(pLayout, pTextNd, nPtPos);
@@ -1387,7 +1387,7 @@ bool SwCursor::GoPrevWordWT(sal_Int16 nWordType, SwRootFrame const*const pLayout
if (pTextNd)
{
SwCursorSaveState aSave( *this );
- sal_Int32 nPtPos = GetPoint()->nContent.GetIndex();
+ sal_Int32 nPtPos = GetPoint()->GetContentIndex();
{
HideWrapper w(pLayout, pTextNd, nPtPos);
@@ -1454,7 +1454,7 @@ bool SwCursor::SelectWordWT( SwViewShell const * pViewShell, sal_Int16 nWordType
else
{
bool bForward = true;
- sal_Int32 nPtPos = GetPoint()->nContent.GetIndex();
+ sal_Int32 nPtPos = GetPoint()->GetContentIndex();
HideWrapper w(pViewShell->GetLayout(), pTextNd, nPtPos);
@@ -1503,7 +1503,7 @@ bool SwCursor::SelectWordWT( SwViewShell const * pViewShell, sal_Int16 nWordType
bool bStartMatch = GetMark()->nNode == pAnnotationMark->GetMarkStart().nNode &&
GetMark()->nContent == pAnnotationMark->GetMarkStart().nContent;
bool bEndMatch = GetPoint()->nNode == pAnnotationMark->GetMarkEnd().nNode &&
- GetPoint()->nContent.GetIndex() + 1 == pAnnotationMark->GetMarkEnd().nContent.GetIndex();
+ GetPoint()->GetContentIndex() + 1 == pAnnotationMark->GetMarkEnd().GetContentIndex();
if (bStartMatch && bEndMatch)
++GetPoint()->nContent;
}
@@ -1564,7 +1564,7 @@ bool SwCursor::GoSentence(SentenceMoveType eMoveType, SwRootFrame const*const pL
OUString const sNodeText(lcl_MaskDeletedRedlines(pTextNd));
SwCursorSaveState aSave( *this );
- sal_Int32 nPtPos = GetPoint()->nContent.GetIndex();
+ sal_Int32 nPtPos = GetPoint()->GetContentIndex();
{
HideWrapper w(pLayout, pTextNd, nPtPos, &sNodeText);
@@ -1640,8 +1640,8 @@ void SwCursor::ExpandToSentenceBorders(SwRootFrame const*const pLayout)
OUString sEndText( pStartNd == pEndNd? sStartText : lcl_MaskDeletedRedlines( pEndNd ) );
SwCursorSaveState aSave( *this );
- sal_Int32 nStartPos = Start()->nContent.GetIndex();
- sal_Int32 nEndPos = End()->nContent.GetIndex();
+ sal_Int32 nStartPos = Start()->GetContentIndex();
+ sal_Int32 nEndPos = End()->GetContentIndex();
{
HideWrapper w(pLayout, pStartNd, nStartPos, &sStartText);
@@ -1782,8 +1782,8 @@ bool SwCursor::LeftRight( bool bLeft, sal_uInt16 nCnt, SwCursorSkipMode nMode,
{
SwTextNode const*const pNode(GetPoint()->GetNode().GetTextNode());
assert(pNode);
- if (pNode->Len() != GetPoint()->nContent.GetIndex()
- && pNode->GetText()[GetPoint()->nContent.GetIndex()] == CH_TXT_ATR_FIELDSTART)
+ if (pNode->Len() != GetPoint()->GetContentIndex()
+ && pNode->GetText()[GetPoint()->GetContentIndex()] == CH_TXT_ATR_FIELDSTART)
{
IDocumentMarkAccess const& rIDMA(*GetDoc().getIDocumentMarkAccess());
sw::mark::IFieldmark const*const pMark(rIDMA.getFieldmarkAt(*GetPoint()));
@@ -1838,8 +1838,8 @@ bool SwCursor::LeftRight( bool bLeft, sal_uInt16 nCnt, SwCursorSkipMode nMode,
{
SwTextNode const*const pNode(GetPoint()->GetNode().GetTextNode());
assert(pNode);
- if (pNode->Len() != GetPoint()->nContent.GetIndex()
- && pNode->GetText()[GetPoint()->nContent.GetIndex()] == CH_TXT_ATR_FIELDEND)
+ if (pNode->Len() != GetPoint()->GetContentIndex()
+ && pNode->GetText()[GetPoint()->GetContentIndex()] == CH_TXT_ATR_FIELDEND)
{
IDocumentMarkAccess const& rIDMA(*GetDoc().getIDocumentMarkAccess());
sw::mark::IFieldmark const*const pMark(rIDMA.getFieldmarkAt(*GetPoint()));
@@ -1853,7 +1853,7 @@ bool SwCursor::LeftRight( bool bLeft, sal_uInt16 nCnt, SwCursorSkipMode nMode,
SwTextNode const*const pNode(GetPoint()->GetNode().GetTextNode());
assert(pNode);
SwTextAttr const*const pInputField(pNode->GetTextAttrAt(
- GetPoint()->nContent.GetIndex(), RES_TXTATR_INPUTFIELD, SwTextNode::PARENT));
+ GetPoint()->GetContentIndex(), RES_TXTATR_INPUTFIELD, SwTextNode::PARENT));
if (pInputField)
{
continue; // skip over input fields
@@ -2112,7 +2112,7 @@ bool SwCursor::UpDown( bool bUp, sal_uInt16 nCnt,
//if cursor has already been at start or end of file,
//Update cursor to change nUpDownX.
- if ( aOldPos.nContent.GetIndex() == nOffset )
+ if ( aOldPos.GetContentIndex() == nOffset )
{
GetDoc().GetEditShell()->UpdateCursor();
bRet = false;
@@ -2156,7 +2156,7 @@ bool SwCursor::IsAtLeftRightMargin(SwRootFrame const& rLayout, bool bLeft, bool
if( pFrame )
{
SwPaM aPam( *GetPoint() );
- if( !bLeft && aPam.GetPoint()->nContent.GetIndex() )
+ if( !bLeft && aPam.GetPoint()->GetContentIndex() )
--aPam.GetPoint()->nContent;
bRet = (bLeft ? pFrame->LeftMargin( &aPam )
: pFrame->RightMargin( &aPam, bAPI ))
@@ -2307,7 +2307,7 @@ bool SwCursor::MovePara(SwWhichPara fnWhichPara, SwMoveFnCollection const & fnPo
if ( pContentNd )
{
const sal_Int32 nSttEnd = &fnPosPara == &fnMoveForward ? 0 : pContentNd->Len();
- if ( GetPoint()->nContent.GetIndex() != nSttEnd )
+ if ( GetPoint()->GetContentIndex() != nSttEnd )
bShortCut = true;
}
}
@@ -2590,8 +2590,8 @@ bool SwTableCursor::IsCursorMovedUpdate()
m_nTableMkNd = GetMark()->GetNodeIndex();
m_nTablePtNd = GetPoint()->GetNodeIndex();
- m_nTableMkCnt = GetMark()->nContent.GetIndex();
- m_nTablePtCnt = GetPoint()->nContent.GetIndex();
+ m_nTableMkCnt = GetMark()->GetContentIndex();
+ m_nTablePtCnt = GetPoint()->GetContentIndex();
return true;
}
diff --git a/sw/source/core/crsr/trvlfnfl.cxx b/sw/source/core/crsr/trvlfnfl.cxx
index d1fa10b9efa4..f19e9e6c9f4b 100644
--- a/sw/source/core/crsr/trvlfnfl.cxx
+++ b/sw/source/core/crsr/trvlfnfl.cxx
@@ -67,7 +67,7 @@ bool SwCursor::GotoFootnoteText()
SwTextAttr *const pFootnote( pTextNd
? pTextNd->GetTextAttrForCharAt(
- GetPoint()->nContent.GetIndex(), RES_TXTATR_FTN)
+ GetPoint()->GetContentIndex(), RES_TXTATR_FTN)
: nullptr);
if (pFootnote)
{
@@ -214,7 +214,7 @@ bool SwCursor::GotoNextFootnoteAnchor()
if( nPos < rFootnoteArr.size() )
{
SwNodeOffset nNdPos = GetPoint()->GetNodeIndex();
- const sal_Int32 nCntPos = GetPoint()->nContent.GetIndex();
+ const sal_Int32 nCntPos = GetPoint()->GetContentIndex();
pTextFootnote = rFootnoteArr[ nPos ];
// search forwards
@@ -285,7 +285,7 @@ bool SwCursor::GotoPrevFootnoteAnchor()
{
// there is a footnote with this index, so search also for the next one
SwNodeOffset nNdPos = GetPoint()->GetNodeIndex();
- const sal_Int32 nCntPos = GetPoint()->nContent.GetIndex();
+ const sal_Int32 nCntPos = GetPoint()->GetContentIndex();
pTextFootnote = rFootnoteArr[ nPos ];
// search forwards
diff --git a/sw/source/core/crsr/trvlreg.cxx b/sw/source/core/crsr/trvlreg.cxx
index d87ee41454c0..8f5fb4a2309a 100644
--- a/sw/source/core/crsr/trvlreg.cxx
+++ b/sw/source/core/crsr/trvlreg.cxx
@@ -187,7 +187,7 @@ bool GotoCurrRegionAndSkip( SwPaM& rCurrentCursor, SwMoveFnCollection const & fn
return false;
SwPosition* pPos = rCurrentCursor.GetPoint();
- const sal_Int32 nCurrCnt = pPos->nContent.GetIndex();
+ const sal_Int32 nCurrCnt = pPos->GetContentIndex();
bool bMoveBackward = &fnPosRegion == &fnMoveBackward;
do {
@@ -212,7 +212,7 @@ bool GotoCurrRegionAndSkip( SwPaM& rCurrentCursor, SwMoveFnCollection const & fn
pPos->nContent.Assign( pCNd, bMoveBackward ? pCNd->Len() : 0 );
if( &pPos->GetNode() != &rCurrNd ||
- pPos->nContent.GetIndex() != nCurrCnt )
+ pPos->GetContentIndex() != nCurrCnt )
// there was a change
return true;
@@ -230,7 +230,7 @@ bool SwCursor::MoveRegion( SwWhichRegion fnWhichRegion, SwMoveFnCollection const
(*fnWhichRegion)( *this, fnPosRegion, IsReadOnlyAvailable() ) &&
!IsSelOvr() &&
(GetPoint()->GetNodeIndex() != m_vSavePos.back().nNode ||
- GetPoint()->nContent.GetIndex() != m_vSavePos.back().nContent);
+ GetPoint()->GetContentIndex() != m_vSavePos.back().nContent);
}
bool SwCursorShell::MoveRegion( SwWhichRegion fnWhichRegion, SwMoveFnCollection const & fnPosRegion )
diff --git a/sw/source/core/crsr/trvltbl.cxx b/sw/source/core/crsr/trvltbl.cxx
index 96615c9e115b..66f9efb054c7 100644
--- a/sw/source/core/crsr/trvltbl.cxx
+++ b/sw/source/core/crsr/trvltbl.cxx
@@ -703,7 +703,7 @@ bool SwCursorShell::MoveTable( SwWhichTable fnWhichTable, SwMoveFnCollection con
{
bCheckPos = true;
nPtNd = pCursor->GetPoint()->GetNodeIndex();
- nPtCnt = pCursor->GetPoint()->nContent.GetIndex();
+ nPtCnt = pCursor->GetPoint()->GetContentIndex();
}
bRet = pCursor->MoveTable( fnWhichTable, fnPosTable );
@@ -717,7 +717,7 @@ bool SwCursorShell::MoveTable( SwWhichTable fnWhichTable, SwMoveFnCollection con
if( bCheckPos &&
pCursor->GetPoint()->GetNodeIndex() == nPtNd &&
- pCursor->GetPoint()->nContent.GetIndex() == nPtCnt )
+ pCursor->GetPoint()->GetContentIndex() == nPtCnt )
bRet = false;
}
return bRet;
diff --git a/sw/source/core/crsr/viscrs.cxx b/sw/source/core/crsr/viscrs.cxx
index a0c2fe47ad03..f819ed297c12 100644
--- a/sw/source/core/crsr/viscrs.cxx
+++ b/sw/source/core/crsr/viscrs.cxx
@@ -302,7 +302,7 @@ OString SwVisibleCursor::getLOKPayload(int nType, int nViewId, bool*) const
pNode = aPos.GetNode().GetTextNode();
if (pNode && !pNode->IsInProtectSect())
{
- sal_Int32 nBegin = aPos.nContent.GetIndex();
+ sal_Int32 nBegin = aPos.GetContentIndex();
sal_Int32 nLen = 1;
SwWrongList *pWrong = pNode->GetWrong();
@@ -653,7 +653,7 @@ void SwSelPaintRects::HighlightContentControl()
// SwTextNode::PARENT because this way we highlight when the user will type inside the
// content control, not outside of it.
SwTextAttr* pAttr = pTextNode->GetTextAttrAt(
- pStart->nContent.GetIndex(), RES_TXTATR_CONTENTCONTROL, SwTextNode::PARENT);
+ pStart->GetContentIndex(), RES_TXTATR_CONTENTCONTROL, SwTextNode::PARENT);
if (pAttr)
{
pCurContentControlAtCursor = static_txtattr_cast<SwTextContentControl*>(pAttr);
diff --git a/sw/source/core/doc/CntntIdxStore.cxx b/sw/source/core/doc/CntntIdxStore.cxx
index 9e54fe4610ad..58de4967a42d 100644
--- a/sw/source/core/doc/CntntIdxStore.cxx
+++ b/sw/source/core/doc/CntntIdxStore.cxx
@@ -57,7 +57,7 @@ namespace
int nReturn = BEFORE_NODE;
if( nIndex == nNode )
{
- const sal_Int32 nCntIdx = rPos.nContent.GetIndex();
+ const sal_Int32 nCntIdx = rPos.GetContentIndex();
if( nCntIdx < nContent )
nReturn = BEFORE_SAME_NODE;
else if( nCntIdx == nContent )
@@ -201,9 +201,9 @@ namespace
void lcl_ChkPaM( std::vector<PaMEntry>& rPaMEntries, const SwNodeOffset nNode, const sal_Int32 nContent, SwPaM& rPaM, const bool bGetPoint, bool bSetMark)
{
const SwPosition* pPos = &rPaM.GetBound(bGetPoint);
- if( pPos->GetNodeIndex() == nNode && pPos->nContent.GetIndex() < nContent )
+ if( pPos->GetNodeIndex() == nNode && pPos->GetContentIndex() < nContent )
{
- const PaMEntry aEntry = { &rPaM, bSetMark, pPos->nContent.GetIndex() };
+ const PaMEntry aEntry = { &rPaM, bSetMark, pPos->GetContentIndex() };
rPaMEntries.push_back(aEntry);
}
}
@@ -239,11 +239,11 @@ void ContentIdxStoreImpl::SaveBkmks(SwDoc& rDoc, SwNodeOffset nNode, sal_Int32 n
const ::sw::mark::IMark* pBkmk = *ppBkmk;
bool bMarkPosEqual = false;
if(pBkmk->GetMarkPos().GetNodeIndex() == nNode
- && pBkmk->GetMarkPos().nContent.GetIndex() <= nContent)
+ && pBkmk->GetMarkPos().GetContentIndex() <= nContent)
{
- if(pBkmk->GetMarkPos().nContent.GetIndex() < nContent)
+ if(pBkmk->GetMarkPos().GetContentIndex() < nContent)
{
- const MarkEntry aEntry = { static_cast<tools::Long>(ppBkmk - pMarkAccess->getAllMarksBegin()), false, pBkmk->GetMarkPos().nContent.GetIndex() };
+ const MarkEntry aEntry = { static_cast<tools::Long>(ppBkmk - pMarkAccess->getAllMarksBegin()), false, pBkmk->GetMarkPos().GetContentIndex() };
m_aBkmkEntries.push_back(aEntry);
}
else // if a bookmark position is equal nContent, the other position
@@ -251,14 +251,14 @@ void ContentIdxStoreImpl::SaveBkmks(SwDoc& rDoc, SwNodeOffset nNode, sal_Int32 n
}
if(pBkmk->IsExpanded()
&& pBkmk->GetOtherMarkPos().GetNodeIndex() == nNode
- && pBkmk->GetOtherMarkPos().nContent.GetIndex() <= nContent)
+ && pBkmk->GetOtherMarkPos().GetContentIndex() <= nContent)
{
if(bMarkPosEqual)
{ // the other position is before, the (main) position is equal
- const MarkEntry aEntry = { static_cast<tools::Long>(ppBkmk - pMarkAccess->getAllMarksBegin()), false, pBkmk->GetMarkPos().nContent.GetIndex() };
+ const MarkEntry aEntry = { static_cast<tools::Long>(ppBkmk - pMarkAccess->getAllMarksBegin()), false, pBkmk->GetMarkPos().GetContentIndex() };
m_aBkmkEntries.push_back(aEntry);
}
- const MarkEntry aEntry = { static_cast<tools::Long>(ppBkmk - pMarkAccess->getAllMarksBegin()), true, pBkmk->GetOtherMarkPos().nContent.GetIndex() };
+ const MarkEntry aEntry = { static_cast<tools::Long>(ppBkmk - pMarkAccess->getAllMarksBegin()), true, pBkmk->GetOtherMarkPos().GetContentIndex() };
m_aBkmkEntries.push_back(aEntry);
}
}
@@ -298,13 +298,13 @@ void ContentIdxStoreImpl::SaveRedlines(SwDoc& rDoc, SwNodeOffset nNode, sal_Int3
if( nPointPos == BEFORE_SAME_NODE ||
( nPointPos == SAME_POSITION && nMarkPos < SAME_POSITION ) )
{
- const MarkEntry aEntry = { nIdx, false, pRdl->GetPoint()->nContent.GetIndex() };
+ const MarkEntry aEntry = { nIdx, false, pRdl->GetPoint()->GetContentIndex() };
m_aRedlineEntries.push_back(aEntry);
}
if( pRdl->HasMark() && ( nMarkPos == BEFORE_SAME_NODE ||
( nMarkPos == SAME_POSITION && nPointPos < SAME_POSITION ) ) )
{
- const MarkEntry aEntry = { nIdx, true, pRdl->GetMark()->nContent.GetIndex() };
+ const MarkEntry aEntry = { nIdx, true, pRdl->GetMark()->GetContentIndex() };
m_aRedlineEntries.push_back(aEntry);
}
++nIdx;
@@ -350,7 +350,7 @@ void ContentIdxStoreImpl::SaveFlys(SwDoc& rDoc, SwNodeOffset nNode, sal_Int32 nC
{
bool bSkip = false;
aSave.m_bOther = false;
- aSave.m_nContent = pAPos->nContent.GetIndex();
+ aSave.m_nContent = pAPos->GetContentIndex();
if ( RndStdIds::FLY_AT_CHAR == rAnchor.GetAnchorId() )
{
if( nContent <= aSave.m_nContent )
diff --git a/sw/source/core/doc/DocumentContentOperationsManager.cxx b/sw/source/core/doc/DocumentContentOperationsManager.cxx
index 3eb119a177ec..19aa8c27accc 100644
--- a/sw/source/core/doc/DocumentContentOperationsManager.cxx
+++ b/sw/source/core/doc/DocumentContentOperationsManager.cxx
@@ -209,18 +209,18 @@ namespace
SwNodeOffset nNdOff = rOrigPos.GetNodeIndex();
nNdOff -= rOrigStt.GetNodeIndex();
nNdOff -= nDelCount;
- sal_Int32 nContentPos = rOrigPos.nContent.GetIndex();
+ sal_Int32 nContentPos = rOrigPos.GetContentIndex();
// Always adjust <nNode> at to be changed <SwPosition> instance <rChgPos>
rChgPos.nNode = nNdOff + rCpyStt.GetNodeIndex();
if( !nNdOff )
{
// just adapt the content index
- if( nContentPos > rOrigStt.nContent.GetIndex() )
- nContentPos -= rOrigStt.nContent.GetIndex();
+ if( nContentPos > rOrigStt.GetContentIndex() )
+ nContentPos -= rOrigStt.GetContentIndex();
else
nContentPos = 0;
- nContentPos += rCpyStt.nContent.GetIndex();
+ nContentPos += rCpyStt.GetContentIndex();
}
rChgPos.nContent.Assign( rChgPos.GetNode().GetContentNode(), nContentPos );
}
@@ -252,15 +252,15 @@ namespace sw
// only include marks that are in the range and not touching both start and end
// - not for annotation or checkbox marks.
bool const isIncludeStart(
- (rStt.nContent.GetIndex() == 0 // paragraph start selected?
+ (rStt.GetContentIndex() == 0 // paragraph start selected?
// also: only if inserting at the start - cross reference
// marks require index to be 0, and there could be one
// on the target node already
- && rCpyPam.nContent.GetIndex() == 0)
+ && rCpyPam.GetContentIndex() == 0)
|| rMarkStart != rStt);
bool const isIncludeEnd(
(rEnd.GetNode().IsTextNode() // paragraph end selected?
- && rEnd.nContent.GetIndex() == rEnd.GetNode().GetTextNode()->Len())
+ && rEnd.GetContentIndex() == rEnd.GetNode().GetTextNode()->Len())
|| rMarkEnd != rEnd);
const bool bIsNotOnBoundary =
pMark->IsExpanded()
@@ -504,8 +504,8 @@ namespace
const SwTextNode* pEndNd = pEnd->GetNode().GetTextNode();
if (nullptr != pSttNd && nullptr != pEndNd &&
- pStt->nContent.GetIndex() == 0 &&
- pEnd->nContent.GetIndex() == pEndNd->Len())
+ pStt->GetContentIndex() == 0 &&
+ pEnd->GetContentIndex() == pEndNd->Len())
{
bResult = true;
}
@@ -535,10 +535,10 @@ namespace sw
{
SwTextNode & rTextNode(*pNode->GetTextNode());
sal_Int32 const nStart(n == nStartNode
- ? rPam.Start()->nContent.GetIndex()
+ ? rPam.Start()->GetContentIndex()
: 0);
sal_Int32 const nEnd(n == nEndNode
- ? rPam.End()->nContent.GetIndex()
+ ? rPam.End()->GetContentIndex()
: rTextNode.Len());
for (sal_Int32 i = nStart; i < nEnd; ++i)
{
@@ -626,7 +626,7 @@ namespace sw
{
SwPosition const& rStart(std::get<0>(startedFields.top())->GetMarkStart());
std::pair<SwNodeOffset, sal_Int32> const pos(
- rStart.GetNodeIndex(), rStart.nContent.GetIndex());
+ rStart.GetNodeIndex(), rStart.GetContentIndex());
auto it = std::lower_bound(rBreaks.begin(), rBreaks.end(), pos);
assert(it == rBreaks.end() || *it != pos);
rBreaks.insert(it, pos);
@@ -707,8 +707,8 @@ namespace
const SwTextNode* pEndNd = pEnd->GetNode().GetTextNode();
if( (nullptr != pEndNd) && pStt->GetNode().IsTextNode() )
{
- const sal_uInt64 nSum = pStt->nContent.GetIndex() +
- pEndNd->GetText().getLength() - pEnd->nContent.GetIndex();
+ const sal_uInt64 nSum = pStt->GetContentIndex() +
+ pEndNd->GetText().getLength() - pEnd->GetContentIndex();
return nSum > o3tl::make_unsigned(SAL_MAX_INT32);
}
}
@@ -730,11 +730,11 @@ namespace
auto [pStt, pEnd] = pR->StartEnd(); // SwPosition*
SwNodeOffset nSttIdx = rSttIdx.GetIndex();
nStt = pStt->GetNodeIndex() - nSttIdx;
- nSttCnt = pStt->nContent.GetIndex();
+ nSttCnt = pStt->GetContentIndex();
if( pR->HasMark() )
{
nEnd = pEnd->GetNodeIndex() - nSttIdx;
- nEndCnt = pEnd->nContent.GetIndex();
+ nEndCnt = pEnd->GetContentIndex();
}
pRedl->GetPoint()->nNode = SwNodeOffset(0);
@@ -751,15 +751,15 @@ namespace
auto [pStt, pEnd] = pR->StartEnd(); // SwPosition*
SwNodeOffset nSttIdx = rPos.GetNodeIndex();
nStt = pStt->GetNodeIndex() - nSttIdx;
- nSttCnt = pStt->nContent.GetIndex();
+ nSttCnt = pStt->GetContentIndex();
if( nStt == SwNodeOffset(0) )
- nSttCnt = nSttCnt - rPos.nContent.GetIndex();
+ nSttCnt = nSttCnt - rPos.GetContentIndex();
if( pR->HasMark() )
{
nEnd = pEnd->GetNodeIndex() - nSttIdx;
- nEndCnt = pEnd->nContent.GetIndex();
+ nEndCnt = pEnd->GetContentIndex();
if( nEnd == SwNodeOffset(0) )
- nEndCnt = nEndCnt - rPos.nContent.GetIndex();
+ nEndCnt = nEndCnt - rPos.GetContentIndex();
}
pRedl->GetPoint()->nNode = SwNodeOffset(0);
@@ -782,11 +782,11 @@ namespace
void SetPos( const SwPosition& aPos )
{
pRedl->GetPoint()->nNode = aPos.GetNodeIndex() + nStt;
- pRedl->GetPoint()->nContent.Assign( pRedl->GetContentNode(), nSttCnt + ( nStt == SwNodeOffset(0) ? aPos.nContent.GetIndex() : 0 ) );
+ pRedl->GetPoint()->nContent.Assign( pRedl->GetContentNode(), nSttCnt + ( nStt == SwNodeOffset(0) ? aPos.GetContentIndex() : 0 ) );
if( pRedl->HasMark() )
{
pRedl->GetMark()->nNode = aPos.GetNodeIndex() + nEnd;
- pRedl->GetMark()->nContent.Assign( pRedl->GetContentNode(false), nEndCnt + ( nEnd == SwNodeOffset(0) ? aPos.nContent.GetIndex() : 0 ) );
+ pRedl->GetMark()->nContent.Assign( pRedl->GetContentNode(false), nEndCnt + ( nEnd == SwNodeOffset(0) ? aPos.GetContentIndex() : 0 ) );
}
}
};
@@ -923,7 +923,7 @@ namespace
{
rRedlTable.Remove( nRedlPos-- );
if( pREnd->nNode < rRg.aEnd ||
- ( pREnd->nNode == rRg.aEnd && !pREnd->nContent.GetIndex()) )
+ ( pREnd->nNode == rRg.aEnd && !pREnd->GetContentIndex()) )
{
// move everything
rArr.emplace_back( pTmp, rRg.aStart );
@@ -1286,7 +1286,7 @@ namespace //local functions originally from docfmt.cxx
SfxItemSetFixed<RES_CHRATR_BEGIN, RES_TXTATR_WITHEND_END - 1,
RES_UNKNOWNATR_BEGIN, RES_UNKNOWNATR_END-1> aSet( rDoc.GetAttrPool() );
SwTextNode * pNode = rRg.Start()->GetNode().GetTextNode();
- pNode->GetParaAttr( aSet, rRg.Start()->nContent.GetIndex() + 1, rRg.End()->nContent.GetIndex() );
+ pNode->GetParaAttr( aSet, rRg.Start()->GetContentIndex() + 1, rRg.End()->GetContentIndex() );
aSet.ClearItem( RES_TXTATR_REFMARK );
aSet.ClearItem( RES_TXTATR_TOXMARK );
@@ -1325,11 +1325,11 @@ namespace //local functions originally from docfmt.cxx
if( pNode )
{
const sal_Int32 nStart = aIdx == rRg.Start()->nNode
- ? rRg.Start()->nContent.GetIndex()
+ ? rRg.Start()->GetContentIndex()
: 0;
const sal_Int32 nEnd = aIdx < aEndNd
? pNode->GetText().getLength()
- : rRg.End()->nContent.GetIndex();
+ : rRg.End()->GetContentIndex();
if( SwpHints *pHints = pNode->GetpSwpHints() )
{
@@ -1477,8 +1477,8 @@ namespace //local functions originally from docfmt.cxx
{
if (pCurrentNode->GetSwAttrSet().HasItem(RES_PARATR_LIST_AUTOFMT) &&
// remove character formatting only on wholly selected paragraphs
- (nStartIndex < pCurrentNode->GetIndex() || pStt->nContent.GetIndex() == 0) &&
- (pCurrentNode->GetIndex() < nEndIndex || pEnd->nContent.GetIndex() == pEndNode->Len()))
+ (nStartIndex < pCurrentNode->GetIndex() || pStt->GetContentIndex() == 0) &&
+ (pCurrentNode->GetIndex() < nEndIndex || pEnd->GetContentIndex() == pEndNode->Len()))
{
pCurrentNode->ResetAttr(RES_PARATR_LIST_AUTOFMT);
// reset also paragraph marker
@@ -1547,8 +1547,8 @@ namespace //local functions originally from docfmt.cxx
if (bRet && (rDoc.getIDocumentRedlineAccess().IsRedlineOn() || (!rDoc.getIDocumentRedlineAccess().IsIgnoreRedline()
&& !rDoc.getIDocumentRedlineAccess().GetRedlineTable().empty())))
{
- SwPaM aPam( pStt->nNode, pStt->nContent.GetIndex()-1,
- pStt->nNode, pStt->nContent.GetIndex() );
+ SwPaM aPam( pStt->nNode, pStt->GetContentIndex()-1,
+ pStt->nNode, pStt->GetContentIndex() );
if( pUndo )
pUndo->SaveRedlineData( aPam, true );
@@ -1577,7 +1577,7 @@ namespace //local functions originally from docfmt.cxx
{
const sal_Int32 nInsCnt = rSt.GetIndex();
const sal_Int32 nEnd = pStt->nNode == pEnd->nNode
- ? pEnd->nContent.GetIndex()
+ ? pEnd->GetContentIndex()
: pNode->Len();
SwRegHistory history( pNode, *pNode, pHistory );
bRet = history.InsertItems( aTextSet, nInsCnt, nEnd, nFlags, ppNewTextAttr )
@@ -1829,14 +1829,14 @@ namespace //local functions originally from docfmt.cxx
if( pStt->nNode != pEnd->nNode )
aCntEnd.Assign( pNode, nLen );
- if( pStt->nContent.GetIndex() != 0 || aCntEnd.GetIndex() != nLen )
+ if( pStt->GetContentIndex() != 0 || aCntEnd.GetIndex() != nLen )
{
// the SwRegHistory inserts the attribute into the TextNode!
if( pNode->IsTextNode() && pCharSet && pCharSet->Count() )
{
SwRegHistory history( pNode, *pNode, pHistory );
bRet = history.InsertItems(*pCharSet,
- pStt->nContent.GetIndex(), aCntEnd.GetIndex(), nFlags, /*ppNewTextAttr*/nullptr)
+ pStt->GetContentIndex(), aCntEnd.GetIndex(), nFlags, /*ppNewTextAttr*/nullptr)
|| bRet;
}
@@ -2031,13 +2031,13 @@ DocumentContentOperationsManager::CopyRange( SwPaM& rPam, SwPosition& rPos,
nEnd = pEnd->GetNodeIndex(),
nDiff = nEnd - nStt +1;
SwNode* pNd = m_rDoc.GetNodes()[ nStt ];
- if( pNd->IsContentNode() && pStt->nContent.GetIndex() )
+ if( pNd->IsContentNode() && pStt->GetContentIndex() )
{
++nStt;
--nDiff;
}
if( (pNd = m_rDoc.GetNodes()[ nEnd ])->IsContentNode() &&
- static_cast<SwContentNode*>(pNd)->Len() != pEnd->nContent.GetIndex() )
+ static_cast<SwContentNode*>(pNd)->Len() != pEnd->GetContentIndex() )
{
--nEnd;
--nDiff;
@@ -2409,13 +2409,13 @@ bool DocumentContentOperationsManager::MoveRange( SwPaM& rPaM, SwPosition& rPos,
// updating the indices. After the Move the Node is optionally deleted.
SwTextNode * pTNd = rPos.GetNode().GetTextNode();
if( pTNd && rPaM.GetPoint()->nNode != rPaM.GetMark()->nNode &&
- ( rPos.nContent.GetIndex() || ( pTNd->Len() && bCorrSavePam )) )
+ ( rPos.GetContentIndex() || ( pTNd->Len() && bCorrSavePam )) )
{
bSplit = true;
- const sal_Int32 nMkContent = rPaM.GetMark()->nContent.GetIndex();
+ const sal_Int32 nMkContent = rPaM.GetMark()->GetContentIndex();
const std::shared_ptr<sw::mark::ContentIdxStore> pContentStore(sw::mark::ContentIdxStore::Create());
- pContentStore->Save( m_rDoc, rPos.GetNodeIndex(), rPos.nContent.GetIndex(), true );
+ pContentStore->Save( m_rDoc, rPos.GetNodeIndex(), rPos.GetContentIndex(), true );
SwTextNode * pOrigNode = pTNd;
assert(*aSavePam.GetPoint() == *aSavePam.GetMark() &&
@@ -2819,14 +2819,14 @@ bool DocumentContentOperationsManager::Overwrite( const SwPaM &rRg, const OUStri
if (!m_rDoc.GetIDocumentUndoRedo().DoesUndo() &&
!m_rDoc.getIDocumentRedlineAccess().IsIgnoreRedline() && !m_rDoc.getIDocumentRedlineAccess().GetRedlineTable().empty())
{
- SwPaM aPam(rPt.nNode, nActualStart, rPt.nNode, rPt.nContent.GetIndex());
+ SwPaM aPam(rPt.nNode, nActualStart, rPt.nNode, rPt.GetContentIndex());
m_rDoc.getIDocumentRedlineAccess().DeleteRedline( aPam, true, RedlineType::Any );
}
else if( m_rDoc.getIDocumentRedlineAccess().IsRedlineOn() )
{
// FIXME: this redline is WRONG: there is no DELETE, and the skipped
// characters are also included in aPam
- SwPaM aPam(rPt.nNode, nActualStart, rPt.nNode, rPt.nContent.GetIndex());
+ SwPaM aPam(rPt.nNode, nActualStart, rPt.nNode, rPt.GetContentIndex());
m_rDoc.getIDocumentRedlineAccess().AppendRedline( new SwRangeRedline( RedlineType::Insert, aPam ), true);
}
@@ -2875,7 +2875,7 @@ bool DocumentContentOperationsManager::InsertString( const SwPaM &rRg, const OUS
{
m_rDoc.GetIDocumentUndoRedo().AppendUndo(
std::make_unique<SwUndoInsert>(rPos.nNode,
- rPos.nContent.GetIndex(), ins.getLength(), nInsertMode));
+ rPos.GetContentIndex(), ins.getLength(), nInsertMode));
}
}
else
@@ -2895,7 +2895,7 @@ bool DocumentContentOperationsManager::InsertString( const SwPaM &rRg, const OUS
}
CharClass const& rCC = GetAppCharClass();
- sal_Int32 nInsPos = rPos.nContent.GetIndex();
+ sal_Int32 nInsPos = rPos.GetContentIndex();
if (!pUndo)
{
@@ -2923,7 +2923,7 @@ bool DocumentContentOperationsManager::InsertString( const SwPaM &rRg, const OUS
if( m_rDoc.getIDocumentRedlineAccess().IsRedlineOn() || (!m_rDoc.getIDocumentRedlineAccess().IsIgnoreRedline() && !m_rDoc.getIDocumentRedlineAccess().GetRedlineTable().empty() ))
{
SwPaM aPam( rPos.nNode, aTmp.GetContent(),
- rPos.nNode, rPos.nContent.GetIndex());
+ rPos.nNode, rPos.GetContentIndex());
if( m_rDoc.getIDocumentRedlineAccess().IsRedlineOn() )
{
m_rDoc.getIDocumentRedlineAccess().AppendRedline(
@@ -2960,8 +2960,8 @@ void DocumentContentOperationsManager::TransliterateText(
auto [pStt, pEnd] = rPaM.StartEnd(); // SwPosition*
SwNodeOffset nSttNd = pStt->GetNodeIndex(),
nEndNd = pEnd->GetNodeIndex();
- sal_Int32 nSttCnt = pStt->nContent.GetIndex();
- sal_Int32 nEndCnt = pEnd->nContent.GetIndex();
+ sal_Int32 nSttCnt = pStt->GetContentIndex();
+ sal_Int32 nEndCnt = pEnd->GetContentIndex();
SwTextNode* pTNd = pStt->GetNode().GetTextNode();
if( (pStt == pEnd) && pTNd ) // no selection?
@@ -3248,7 +3248,7 @@ SwDrawFrameFormat* DocumentContentOperationsManager::InsertDrawObj(
rDrawObjAnchorFormat.GetContentAnchor()->GetNode().GetTextNode();
if ( pAnchorTextNode != nullptr )
{
- const sal_Int32 nStt = rDrawObjAnchorFormat.GetContentAnchor()->nContent.GetIndex();
+ const sal_Int32 nStt = rDrawObjAnchorFormat.GetContentAnchor()->GetContentIndex();
SwFormatFlyCnt aFormat( pFormat );
pAnchorTextNode->InsertItem( aFormat, nStt, nStt );
bAnchorAtPageAsFallback = false;
@@ -3314,7 +3314,7 @@ bool DocumentContentOperationsManager::SplitNode( const SwPosition &rPos, bool b
// Update the rsid of the old and the new node unless
// the old node is split at the beginning or at the end
SwTextNode *pTextNode = rPos.GetNode().GetTextNode();
- const sal_Int32 nPos = rPos.nContent.GetIndex();
+ const sal_Int32 nPos = rPos.GetContentIndex();
if( pTextNode && nPos && nPos != pTextNode->Len() )
{
m_rDoc.UpdateParRsid( pTextNode );
@@ -3323,7 +3323,7 @@ bool DocumentContentOperationsManager::SplitNode( const SwPosition &rPos, bool b
//JP 28.01.97: Special case for SplitNode at table start:
// If it is at the beginning of a Doc/Fly/Footer/... or right at after a table
// then insert a paragraph before it.
- if( bChkTableStart && !rPos.nContent.GetIndex() && pNode->IsTextNode() )
+ if( bChkTableStart && !rPos.GetContentIndex() && pNode->IsTextNode() )
{
SwNodeOffset nPrevPos = rPos.GetNodeIndex() - 1;
const SwTableNode* pTableNd;
@@ -3392,7 +3392,7 @@ bool DocumentContentOperationsManager::SplitNode( const SwPosition &rPos, bool b
}
const std::shared_ptr<sw::mark::ContentIdxStore> pContentStore(sw::mark::ContentIdxStore::Create());
- pContentStore->Save( m_rDoc, rPos.GetNodeIndex(), rPos.nContent.GetIndex(), true );
+ pContentStore->Save( m_rDoc, rPos.GetNodeIndex(), rPos.GetContentIndex(), true );
assert(pNode->IsTextNode());
std::function<void (SwTextNode *, sw::mark::RestoreMode, bool bAtStart)> restoreFunc(
[&](SwTextNode *const, sw::mark::RestoreMode const eMode, bool const bAtStart)
@@ -3487,7 +3487,7 @@ bool DocumentContentOperationsManager::ReplaceRange( SwPaM& rPam, const OUString
while (!Breaks.empty() // skip over prefix of dummy chars
&& (aPam.GetMark()->GetNodeIndex() == Breaks.begin()->first)
- && (aPam.GetMark()->nContent.GetIndex() == Breaks.begin()->second))
+ && (aPam.GetMark()->GetContentIndex() == Breaks.begin()->second))
{
// skip!
++aPam.GetMark()->nContent; // always in bounds if Breaks valid
@@ -3872,7 +3872,7 @@ void DocumentContentOperationsManager::CopyFlyInFlyImpl(
if (!bAdd)
{
// technically old code checked nContent of AT_FLY which is pointless
- bAdd = pCopiedPaM && 0 < pCopiedPaM->End()->nContent.GetIndex();
+ bAdd = pCopiedPaM && 0 < pCopiedPaM->End()->GetContentIndex();
}
}
}
@@ -3973,8 +3973,8 @@ void DocumentContentOperationsManager::CopyFlyInFlyImpl(
{
// only if pCopiedPaM: care about partially selected start node
sal_Int32 const nContent = pCopiedPaM && pCopiedPaM->Start()->nNode == aAnchor.GetContentAnchor()->nNode
- ? newPos.nContent.GetIndex() - pCopiedPaM->Start()->nContent.GetIndex()
- : newPos.nContent.GetIndex();
+ ? newPos.GetContentIndex() - pCopiedPaM->Start()->GetContentIndex()
+ : newPos.GetContentIndex();
newPos.nContent.Assign(newPos.GetNode().GetTextNode(), nContent);
}
else
@@ -4068,11 +4068,11 @@ bool DocumentContentOperationsManager::lcl_RstTextAttr( SwNode* pNd, void* pArgs
sal_Int32 nEnd = pTextNode->Len();
if( &pPara->pSttNd->GetNode() == pTextNode &&
- pPara->pSttNd->nContent.GetIndex() )
- aSt = pPara->pSttNd->nContent.GetIndex();
+ pPara->pSttNd->GetContentIndex() )
+ aSt = pPara->pSttNd->GetContentIndex();
if( &pPara->pEndNd->GetNode() == pNd )
- nEnd = pPara->pEndNd->nContent.GetIndex();
+ nEnd = pPara->pEndNd->GetContentIndex();
if( pPara->pHistory )
{
@@ -4291,7 +4291,7 @@ bool DocumentContentOperationsManager::DeleteRangeImplImpl(SwPaM & rPam, SwDelet
{
// if necessary the saved Word for the exception
if( m_rDoc.GetAutoCorrExceptWord()->IsDeleted() || pStt->nNode != pEnd->nNode ||
- pStt->nContent.GetIndex() + 1 != pEnd->nContent.GetIndex() ||
+ pStt->GetContentIndex() + 1 != pEnd->GetContentIndex() ||
!m_rDoc.GetAutoCorrExceptWord()->CheckDelChar( *pStt ))
{ m_rDoc.DeleteAutoCorrExceptWord(); }
}
@@ -4302,7 +4302,7 @@ bool DocumentContentOperationsManager::DeleteRangeImplImpl(SwPaM & rPam, SwDelet
SwpHints* pHts;
if( pTextNd && nullptr != ( pHts = pTextNd->GetpSwpHints()) && pHts->Count() )
{
- const sal_Int32 nMkCntPos = rPam.GetMark()->nContent.GetIndex();
+ const sal_Int32 nMkCntPos = rPam.GetMark()->GetContentIndex();
for( size_t n = pHts->Count(); n; )
{
const SwTextAttr* pAttr = pHts->Get( --n );
@@ -4377,9 +4377,9 @@ bool DocumentContentOperationsManager::DeleteRangeImplImpl(SwPaM & rPam, SwDelet
{
// now move the Content to the new Node
bool bOneNd = pStt->nNode == pEnd->nNode;
- const sal_Int32 nLen = ( bOneNd ? pEnd->nContent.GetIndex()
+ const sal_Int32 nLen = ( bOneNd ? pEnd->GetContentIndex()
: pCNd->Len() )
- - pStt->nContent.GetIndex();
+ - pStt->GetContentIndex();
// Don't call again, if already empty
if( nLen )
@@ -4413,10 +4413,10 @@ bool DocumentContentOperationsManager::DeleteRangeImplImpl(SwPaM & rPam, SwDelet
if( pEndTextNode )
{
// if already empty, don't call again
- if( pEnd->nContent.GetIndex() )
+ if( pEnd->GetContentIndex() )
{
SwContentIndex aIdx( pCNd, 0 );
- pEndTextNode->EraseText( aIdx, pEnd->nContent.GetIndex() );
+ pEndTextNode->EraseText( aIdx, pEnd->GetContentIndex() );
if( !pEndTextNode->Len() )
{
@@ -4460,7 +4460,7 @@ bool DocumentContentOperationsManager::DeleteRangeImplImpl(SwPaM & rPam, SwDelet
// If the Node that contained the Cursor has been deleted,
// the Content has to be assigned to the current Content.
pStt->nContent.Assign( pStt->GetNode().GetContentNode(),
- pStt->nContent.GetIndex() );
+ pStt->GetContentIndex() );
// If we deleted across Node boundaries we have to correct the PaM,
// because they are in different Nodes now.
@@ -4499,7 +4499,7 @@ bool DocumentContentOperationsManager::ReplaceRangeImpl( SwPaM& rPam, const OUSt
// Own Undo?
OUString sRepl( rStr );
SwTextNode* pTextNd = pStt->GetNode().GetTextNode();
- sal_Int32 nStt = pStt->nContent.GetIndex();
+ sal_Int32 nStt = pStt->GetContentIndex();
sal_Int32 nEnd;
SwDataChanged aTmp( aDelPam );
@@ -4530,7 +4530,7 @@ bool DocumentContentOperationsManager::ReplaceRangeImpl( SwPaM& rPam, const OUSt
m_rDoc.getIDocumentMarkAccess()->deleteMark(pBkmk);
pStt = aDelPam.Start();
pTextNd = pStt->GetNode().GetTextNode();
- nStt = pStt->nContent.GetIndex();
+ nStt = pStt->GetContentIndex();
}
if( !sRepl.isEmpty() )
@@ -4553,7 +4553,7 @@ bool DocumentContentOperationsManager::ReplaceRangeImpl( SwPaM& rPam, const OUSt
// Remember the End
SwNodeIndex aPtNd( aDelPam.GetPoint()->nNode, -1 );
- const sal_Int32 nPtCnt = aDelPam.GetPoint()->nContent.GetIndex();
+ const sal_Int32 nPtCnt = aDelPam.GetPoint()->GetContentIndex();
bool bFirst = true;
OUString sIns;
@@ -4563,7 +4563,7 @@ bool DocumentContentOperationsManager::ReplaceRangeImpl( SwPaM& rPam, const OUSt
if( bFirst )
{
SwNodeIndex aMkNd( aDelPam.GetMark()->nNode, -1 );
- const sal_Int32 nMkCnt = aDelPam.GetMark()->nContent.GetIndex();
+ const sal_Int32 nMkCnt = aDelPam.GetMark()->GetContentIndex();
SplitNode( *aDelPam.GetPoint(), false );
@@ -4646,7 +4646,7 @@ bool DocumentContentOperationsManager::ReplaceRangeImpl( SwPaM& rPam, const OUSt
{
assert((pStt->nNode == pEnd->nNode ||
( pStt->GetNodeIndex() + 1 == pEnd->GetNodeIndex() &&
- !pEnd->nContent.GetIndex() )) &&
+ !pEnd->GetContentIndex() )) &&
"invalid range: Point and Mark on different nodes" );
if( !m_rDoc.getIDocumentRedlineAccess().IsIgnoreRedline() && !m_rDoc.getIDocumentRedlineAccess().GetRedlineTable().empty() )
@@ -4665,11 +4665,11 @@ bool DocumentContentOperationsManager::ReplaceRangeImpl( SwPaM& rPam, const OUSt
aDelPam.Exchange();
SwNodeIndex aPtNd( pStt->nNode, -1 );
- const sal_Int32 nPtCnt = pStt->nContent.GetIndex();
+ const sal_Int32 nPtCnt = pStt->GetContentIndex();
// Set the values again, if Frames or footnotes on the Text have been removed.
nStt = nPtCnt;
- nEnd = bOneNode ? pEnd->nContent.GetIndex()
+ nEnd = bOneNode ? pEnd->GetContentIndex()
: pTextNd->GetText().getLength();
bool bFirst = true;
@@ -4942,7 +4942,7 @@ bool DocumentContentOperationsManager::CopyImplImpl(SwPaM& rPam, SwPosition& rPo
if( !bCanMoveBack )
{
pCopyPam->GetPoint()->nNode--;
- assert(pCopyPam->GetPoint()->nContent.GetIndex() == 0);
+ assert(pCopyPam->GetPoint()->GetContentIndex() == 0);
}
SwNodeRange aRg( pStt->nNode, pEnd->nNode );
@@ -4953,7 +4953,7 @@ bool DocumentContentOperationsManager::CopyImplImpl(SwPaM& rPam, SwPosition& rPo
SwTextNode* pDestTextNd = aInsPos.GetNode().GetTextNode();
bool bCopyCollFormat = !rDoc.IsInsOnlyTextGlossary() &&
( (pDestTextNd && !pDestTextNd->GetText().getLength()) ||
- ( !bOneNode && !rPos.nContent.GetIndex() ) );
+ ( !bOneNode && !rPos.GetContentIndex() ) );
bool bCopyBookmarks = true;
bool bCopyPageSource = false;
SwNodeOffset nDeleteTextNodes(0);
@@ -4995,13 +4995,13 @@ bool DocumentContentOperationsManager::CopyImplImpl(SwPaM& rPam, SwPosition& rPo
{
++nDeleteTextNodes; // must be joined in Undo
// Don't copy the beginning completely?
- if( !bCopyCollFormat || bColumnSel || pStt->nContent.GetIndex() )
+ if( !bCopyCollFormat || bColumnSel || pStt->GetContentIndex() )
{
SwContentIndex aDestIdx( rPos.nContent );
bool bCopyOk = false;
if( !pDestTextNd )
{
- if( pStt->nContent.GetIndex() || bOneNode )
+ if( pStt->GetContentIndex() || bOneNode )
pDestTextNd = rDoc.GetNodes().MakeTextNode( aInsPos,
rDoc.getIDocumentStylePoolAccess().GetTextCollFromPool(RES_POOLCOLL_STANDARD));
else
@@ -5014,7 +5014,7 @@ bool DocumentContentOperationsManager::CopyImplImpl(SwPaM& rPam, SwPosition& rPo
}
else if( !bOneNode || bColumnSel )
{
- const sal_Int32 nContentEnd = pEnd->nContent.GetIndex();
+ const sal_Int32 nContentEnd = pEnd->GetContentIndex();
{
::sw::UndoGuard const ug(rDoc.GetIDocumentUndoRedo());
rDoc.getIDocumentContentOperations().SplitNode( rPos, false );
@@ -5061,9 +5061,9 @@ bool DocumentContentOperationsManager::CopyImplImpl(SwPaM& rPam, SwPosition& rPo
if( !bCopyOk )
{
const sal_Int32 nCpyLen = ( bOneNode
- ? pEnd->nContent.GetIndex()
+ ? pEnd->GetContentIndex()
: pSttTextNd->GetText().getLength())
- - pStt->nContent.GetIndex();
+ - pStt->GetContentIndex();
pSttTextNd->CopyText( pDestTextNd, aDestIdx,
pStt->nContent, nCpyLen );
if( bEndEqualIns )
@@ -5097,16 +5097,16 @@ bool DocumentContentOperationsManager::CopyImplImpl(SwPaM& rPam, SwPosition& rPo
// We have to set the correct PaM for Undo, if this PaM starts in a textnode,
// the undo operation will try to merge this node after removing the table.
// If we didn't split a textnode, the PaM should start at the inserted table node
- if( rPos.nContent.GetIndex() == pDestTextNd->Len() )
+ if( rPos.GetContentIndex() == pDestTextNd->Len() )
{ // Insertion at the last position of a textnode (empty or not)
++aInsPos; // The table will be inserted behind the text node
}
- else if( rPos.nContent.GetIndex() )
+ else if( rPos.GetContentIndex() )
{ // Insertion in the middle of a text node, it has to be split
// (and joined from undo)
++nDeleteTextNodes;
- const sal_Int32 nContentEnd = pEnd->nContent.GetIndex();
+ const sal_Int32 nContentEnd = pEnd->GetContentIndex();
{
::sw::UndoGuard const ug(rDoc.GetIDocumentUndoRedo());
rDoc.getIDocumentContentOperations().SplitNode( rPos, false );
@@ -5171,7 +5171,7 @@ bool DocumentContentOperationsManager::CopyImplImpl(SwPaM& rPam, SwPosition& rPo
}
pEndTextNd->CopyText( pDestTextNd, aDestIdx, SwContentIndex( pEndTextNd ),
- pEnd->nContent.GetIndex() );
+ pEnd->GetContentIndex() );
// Also copy all format templates
if( bCopyCollFormat && ( bOneNode || bEmptyDestNd ))
@@ -5290,7 +5290,7 @@ bool DocumentContentOperationsManager::CopyImplImpl(SwPaM& rPam, SwPosition& rPo
// Adjust position (in case it was moved / in another node)
rPos.nContent.Assign( rPos.GetNode().GetContentNode(),
- rPos.nContent.GetIndex() );
+ rPos.GetContentIndex() );
if( rPos.nNode != aInsPos )
{
diff --git a/sw/source/core/doc/DocumentFieldsManager.cxx b/sw/source/core/doc/DocumentFieldsManager.cxx
index 842e526dd2c9..81216420bb1e 100644
--- a/sw/source/core/doc/DocumentFieldsManager.cxx
+++ b/sw/source/core/doc/DocumentFieldsManager.cxx
@@ -1726,7 +1726,7 @@ SwTextField * DocumentFieldsManager::GetTextFieldAtPos(const SwPosition & rPos)
SwTextNode * const pNode = rPos.GetNode().GetTextNode();
return (pNode != nullptr)
- ? pNode->GetFieldTextAttrAt( rPos.nContent.GetIndex(), true )
+ ? pNode->GetFieldTextAttrAt( rPos.GetContentIndex(), true )
: nullptr;
}
diff --git a/sw/source/core/doc/DocumentLayoutManager.cxx b/sw/source/core/doc/DocumentLayoutManager.cxx
index f045f014273a..b0559ebd215e 100644
--- a/sw/source/core/doc/DocumentLayoutManager.cxx
+++ b/sw/source/core/doc/DocumentLayoutManager.cxx
@@ -296,7 +296,7 @@ void DocumentLayoutManager::DelLayoutFormat( SwFrameFormat *pFormat )
if ( pTextNd )
{
SwTextFlyCnt* const pAttr = static_cast<SwTextFlyCnt*>(
- pTextNd->GetTextAttrForCharAt( pPos->nContent.GetIndex(),
+ pTextNd->GetTextAttrForCharAt( pPos->GetContentIndex(),
RES_TXTATR_FLYCNT ));
if ( pAttr && (pAttr->GetFlyCnt().GetFrameFormat() == pFormat) )
{
@@ -457,7 +457,7 @@ SwFrameFormat *DocumentLayoutManager::CopyLayoutFormat(
const SwPosition* pPos = rNewAnchor.GetContentAnchor();
SwFormatFlyCnt aFormat( pDest );
pPos->GetNode().GetTextNode()->InsertItem(
- aFormat, pPos->nContent.GetIndex(), 0 );
+ aFormat, pPos->GetContentIndex(), 0 );
}
if( bMakeFrames )
diff --git a/sw/source/core/doc/DocumentRedlineManager.cxx b/sw/source/core/doc/DocumentRedlineManager.cxx
index 6eb566b78e95..edf51f8eb0cc 100644
--- a/sw/source/core/doc/DocumentRedlineManager.cxx
+++ b/sw/source/core/doc/DocumentRedlineManager.cxx
@@ -397,12 +397,12 @@ namespace
bool IsPrevPos( const SwPosition & rPos1, const SwPosition & rPos2 )
{
const SwContentNode* pCNd;
- if( 0 != rPos2.nContent.GetIndex() )
+ if( 0 != rPos2.GetContentIndex() )
return false;
if( rPos2.GetNodeIndex() - 1 != rPos1.GetNodeIndex() )
return false;
pCNd = rPos1.GetNode().GetContentNode();
- return pCNd && rPos1.nContent.GetIndex() == pCNd->Len();
+ return pCNd && rPos1.GetContentIndex() == pCNd->Len();
}
// copy style or return with SwRedlineExtra_FormatColl with reject data of the upcoming copy
@@ -1025,27 +1025,27 @@ namespace
// expand to them.
auto [pStt, pEnd] = rPam.StartEnd(); // SwPosition*
SwDoc& rDoc = rPam.GetDoc();
- if( !pStt->nContent.GetIndex() &&
+ if( !pStt->GetContentIndex() &&
!rDoc.GetNodes()[ pStt->GetNodeIndex() - 1 ]->IsContentNode() )
{
const SwRangeRedline* pRedl = rDoc.getIDocumentRedlineAccess().GetRedline( *pStt, nullptr );
if( pRedl )
{
const SwPosition* pRStt = pRedl->Start();
- if( !pRStt->nContent.GetIndex() && pRStt->GetNodeIndex() ==
+ if( !pRStt->GetContentIndex() && pRStt->GetNodeIndex() ==
pStt->GetNodeIndex() - 1 )
*pStt = *pRStt;
}
}
if( pEnd->GetNode().IsContentNode() &&
!rDoc.GetNodes()[ pEnd->GetNodeIndex() + 1 ]->IsContentNode() &&
- pEnd->nContent.GetIndex() == pEnd->GetNode().GetContentNode()->Len() )
+ pEnd->GetContentIndex() == pEnd->GetNode().GetContentNode()->Len() )
{
const SwRangeRedline* pRedl = rDoc.getIDocumentRedlineAccess().GetRedline( *pEnd, nullptr );
if( pRedl )
{
const SwPosition* pREnd = pRedl->End();
- if( !pREnd->nContent.GetIndex() && pREnd->GetNodeIndex() ==
+ if( !pREnd->GetContentIndex() && pREnd->GetNodeIndex() ==
pEnd->GetNodeIndex() + 1 )
*pEnd = *pREnd;
}
@@ -3144,7 +3144,7 @@ const SwRangeRedline* DocumentRedlineManager::SelNextRedline( SwPaM& rPam ) cons
SwNodeIndex aTmp( pEnd->nNode );
SwContentNode* pCNd = SwNodes::GoPrevSection( &aTmp );
if( !pCNd || ( aTmp == rSttPos.nNode &&
- pCNd->Len() == rSttPos.nContent.GetIndex() ))
+ pCNd->Len() == rSttPos.GetContentIndex() ))
pFnd = nullptr;
}
if( pFnd )
@@ -3270,7 +3270,7 @@ const SwRangeRedline* DocumentRedlineManager::SelPrevRedline( SwPaM& rPam ) cons
SwNodeIndex aTmp( pStt->nNode );
SwContentNode* pCNd = m_rDoc.GetNodes().GoNextSection( &aTmp );
if( !pCNd || ( aTmp == rSttPos.nNode &&
- !rSttPos.nContent.GetIndex() ))
+ !rSttPos.GetContentIndex() ))
pFnd = nullptr;
}
if( pFnd )
diff --git a/sw/source/core/doc/dbgoutsw.cxx b/sw/source/core/doc/dbgoutsw.cxx
index d95ea954fe73..3d84c57c4a12 100644
--- a/sw/source/core/doc/dbgoutsw.cxx
+++ b/sw/source/core/doc/dbgoutsw.cxx
@@ -319,7 +319,7 @@ static OUString lcl_dbg_out(const SwPosition & rPos)
"( " +
OUString::number(sal_Int32(rPos.GetNodeIndex())) +
", " +
- OUString::number(rPos.nContent.GetIndex()) +
+ OUString::number(rPos.GetContentIndex()) +
": " +
OUString::number(reinterpret_cast<sal_IntPtr>(rPos.nContent.GetContentNode()), 16) +
" )";
diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx
index 7c6e62fd8ea2..82eb590258ef 100644
--- a/sw/source/core/doc/doc.cxx
+++ b/sw/source/core/doc/doc.cxx
@@ -1744,8 +1744,8 @@ OUString SwDoc::GetPaMDescr(const SwPaM & rPam)
if (nullptr != pTextNode)
{
- const sal_Int32 nStart = rPam.Start()->nContent.GetIndex();
- const sal_Int32 nEnd = rPam.End()->nContent.GetIndex();
+ const sal_Int32 nStart = rPam.Start()->GetContentIndex();
+ const sal_Int32 nEnd = rPam.End()->GetContentIndex();
return SwResId(STR_START_QUOTE)
+ ShortenString(pTextNode->GetText().copy(nStart, nEnd - nStart),
diff --git a/sw/source/core/doc/docbm.cxx b/sw/source/core/doc/docbm.cxx
index 2f56cba64c53..83cf9410c6e4 100644
--- a/sw/source/core/doc/docbm.cxx
+++ b/sw/source/core/doc/docbm.cxx
@@ -211,8 +211,8 @@ namespace
{
return rFirstStart.nNode < rSecondStart.nNode;
}
- const sal_Int32 nFirstContent = rFirstStart.nContent.GetIndex();
- const sal_Int32 nSecondContent = rSecondStart.nContent.GetIndex();
+ const sal_Int32 nFirstContent = rFirstStart.GetContentIndex();
+ const sal_Int32 nSecondContent = rSecondStart.GetContentIndex();
if (nFirstContent != 0 || nSecondContent != 0)
{
return nFirstContent < nSecondContent;
@@ -460,9 +460,9 @@ namespace
const SwPosition* const pEndPos = &pMark->GetMarkEnd();
SAL_INFO("sw.core",
sal_Int32(pStPos->GetNodeIndex()) << "," <<
- pStPos->nContent.GetIndex() << " " <<
+ pStPos->GetContentIndex() << " " <<
sal_Int32(pEndPos->GetNodeIndex()) << "," <<
- pEndPos->nContent.GetIndex() << " " <<
+ pEndPos->GetContentIndex() << " " <<
typeid(*pMark).name() << " " <<
pMark->GetName());
}
@@ -515,10 +515,10 @@ OUString IDocumentMarkAccess::GetCrossRefHeadingBookmarkNamePrefix()
bool IDocumentMarkAccess::IsLegalPaMForCrossRefHeadingBookmark( const SwPaM& rPaM )
{
return rPaM.Start()->GetNode().IsTextNode() &&
- rPaM.Start()->nContent.GetIndex() == 0 &&
+ rPaM.Start()->GetContentIndex() == 0 &&
( !rPaM.HasMark() ||
( rPaM.GetMark()->nNode == rPaM.GetPoint()->nNode &&
- rPaM.End()->nContent.GetIndex() == rPaM.End()->GetNode().GetTextNode()->Len() ) );
+ rPaM.End()->GetContentIndex() == rPaM.End()->GetNode().GetTextNode()->Len() ) );
}
void IDocumentMarkAccess::DeleteFieldmarkCommand(::sw::mark::IFieldmark const& rMark)
@@ -554,9 +554,9 @@ namespace sw::mark
SAL_INFO("sw.core",
rName << " " <<
sal_Int32(pPos1->GetNodeIndex() )<< "," <<
- pPos1->nContent.GetIndex() << " " <<
+ pPos1->GetContentIndex() << " " <<
sal_Int32(pPos2->GetNodeIndex()) << "," <<
- pPos2->nContent.GetIndex());
+ pPos2->GetContentIndex());
}
#endif
if ( (!rPaM.GetPoint()->GetNode().IsTextNode()
@@ -585,7 +585,7 @@ namespace sw::mark
? *rPaM.GetPoint() != *rPaM.GetMark()
// CopyText: pam covers CH_TXT_ATR_FORMELEMENT
: (rPaM.GetPoint()->nNode != rPaM.GetMark()->nNode
- || rPaM.Start()->nContent.GetIndex() + 1 != rPaM.End()->nContent.GetIndex())))
+ || rPaM.Start()->GetContentIndex() + 1 != rPaM.End()->GetContentIndex())))
{
SAL_WARN("sw.core", "MarkManager::makeMark(..)"
" - invalid range on point fieldmark");
@@ -948,7 +948,7 @@ namespace sw::mark
aNewPosRel.nContent = 0; // HACK for WW8 import
isSortingNeeded = true; // and sort them to be safe...
}
- aNewPosRel.nContent += pMark->GetMarkPos().nContent.GetIndex();
+ aNewPosRel.nContent += pMark->GetMarkPos().GetContentIndex();
pMark->SetMarkPos(aNewPosRel);
bChangedPos = true;
}
@@ -956,7 +956,7 @@ namespace sw::mark
&pMark->GetOtherMarkPos().GetNode() == pOldNode)
{
SwPosition aNewPosRel(aNewPos);
- aNewPosRel.nContent += pMark->GetOtherMarkPos().nContent.GetIndex();
+ aNewPosRel.nContent += pMark->GetOtherMarkPos().GetContentIndex();
pMark->SetOtherMarkPos(aNewPosRel);
bChangedOPos = true;
}
@@ -1386,7 +1386,7 @@ namespace sw::mark
[&rPos] (::sw::mark::MarkBase const*const pMark) {
return pMark->GetMarkStart() == rPos
// end position includes the CH_TXT_ATR_FIELDEND
- || (pMark->GetMarkEnd().nContent.GetIndex() == rPos.nContent.GetIndex() + 1
+ || (pMark->GetMarkEnd().GetContentIndex() == rPos.GetContentIndex() + 1
&& pMark->GetMarkEnd().nNode == rPos.nNode);
} );
return (pFieldmark == m_vFieldmarks.end())
@@ -1487,7 +1487,7 @@ namespace sw::mark
IFieldmark* pFieldBM = getFieldmarkFor(aPos);
FieldmarkWithDropDownButton* pNewActiveFieldmark = nullptr;
if ((!pFieldBM || (pFieldBM->GetFieldname() != ODF_FORMDROPDOWN && pFieldBM->GetFieldname() != ODF_FORMDATE))
- && aPos.nContent.GetIndex() > 0 )
+ && aPos.GetContentIndex() > 0 )
{
--aPos.nContent;
pFieldBM = getFieldmarkFor(aPos);
@@ -1818,7 +1818,7 @@ SaveBookmark::SaveBookmark(
}
}
m_nNode1 = rBkmk.GetMarkPos().GetNodeIndex();
- m_nContent1 = rBkmk.GetMarkPos().nContent.GetIndex();
+ m_nContent1 = rBkmk.GetMarkPos().GetContentIndex();
m_nNode1 -= rMvPos.GetIndex();
if(pIdx && !m_nNode1)
@@ -1827,7 +1827,7 @@ SaveBookmark::SaveBookmark(
if(rBkmk.IsExpanded())
{
m_nNode2 = rBkmk.GetOtherMarkPos().GetNodeIndex();
- m_nContent2 = rBkmk.GetOtherMarkPos().nContent.GetIndex();
+ m_nContent2 = rBkmk.GetOtherMarkPos().GetContentIndex();
m_nNode2 -= rMvPos.GetIndex();
if(pIdx && !m_nNode2)
diff --git a/sw/source/core/doc/doccomp.cxx b/sw/source/core/doc/doccomp.cxx
index 560c0dceb5a4..05d4fc7d580c 100644
--- a/sw/source/core/doc/doccomp.cxx
+++ b/sw/source/core/doc/doccomp.cxx
@@ -1745,10 +1745,10 @@ void CompareData::SetRedlinesToDoc( bool bUseDocInfo )
& rEndStt = *pTmp->GetNext()->Start();
const SwContentNode* pCNd;
if( rSttEnd == rEndStt ||
- (!rEndStt.nContent.GetIndex() &&
+ (!rEndStt.GetContentIndex() &&
rEndStt.GetNodeIndex() - 1 == rSttEnd.GetNodeIndex() &&
nullptr != ( pCNd = rSttEnd.GetNode().GetContentNode() ) &&
- rSttEnd.nContent.GetIndex() == pCNd->Len()))
+ rSttEnd.GetContentIndex() == pCNd->Len()))
{
if( pTmp->GetNext() == m_pInsertRing.get() )
{
@@ -1921,7 +1921,7 @@ SaveMergeRedline::SaveMergeRedline( const SwNode& rDstNd,
const SwPosition* pStt = rSrcRedl.Start();
if( rDstNd.IsContentNode() )
- aPos.nContent.Assign( static_cast<const SwContentNode*>(&rDstNd), pStt->nContent.GetIndex() );
+ aPos.nContent.Assign( static_cast<const SwContentNode*>(&rDstNd), pStt->GetContentIndex() );
pDestRedl = new SwRangeRedline( rSrcRedl.GetRedlineData(), aPos );
if( RedlineType::Delete != pDestRedl->GetType() )
@@ -1934,7 +1934,7 @@ SaveMergeRedline::SaveMergeRedline( const SwNode& rDstNd,
pDestRedl->GetPoint()->nNode += pEnd->GetNodeIndex() -
pStt->GetNodeIndex();
pDestRedl->GetPoint()->nContent.Assign( pDestRedl->GetContentNode(),
- pEnd->nContent.GetIndex() );
+ pEnd->GetContentIndex() );
}
sal_uInt16 SaveMergeRedline::InsertRedline(SwPaM* pLastDestRedline)
@@ -1948,7 +1948,7 @@ sal_uInt16 SaveMergeRedline::InsertRedline(SwPaM* pLastDestRedline)
::sw::UndoGuard const undoGuard(rDoc.GetIDocumentUndoRedo());
SwNodeIndex aSaveNd( pDestRedl->GetPoint()->nNode, -1 );
- const sal_Int32 nSaveCnt = pDestRedl->GetPoint()->nContent.GetIndex();
+ const sal_Int32 nSaveCnt = pDestRedl->GetPoint()->GetContentIndex();
RedlineFlags eOld = rDoc.getIDocumentRedlineAccess().GetRedlineFlags();
rDoc.getIDocumentRedlineAccess().SetRedlineFlags_intern(eOld | RedlineFlags::Ignore);
diff --git a/sw/source/core/doc/doccorr.cxx b/sw/source/core/doc/doccorr.cxx
index ca618dcef877..1d2d625e3203 100644
--- a/sw/source/core/doc/doccorr.cxx
+++ b/sw/source/core/doc/doccorr.cxx
@@ -78,7 +78,7 @@ namespace
pPam->GetBound(bool(nb)).nNode = rNewPos.nNode;
pPam->GetBound(bool(nb)).nContent.Assign(
rNewPos.GetNode().GetContentNode(),
- nCntIdx + pPam->GetBound(bool(nb)).nContent.GetIndex());
+ nCntIdx + pPam->GetBound(bool(nb)).GetContentIndex());
}
}
}
@@ -246,7 +246,7 @@ void PaMCorrRel( const SwNodeIndex &rOldNode,
SwPosition aNewPos( rNewPos );
const SwDoc& rDoc = pOldNode->GetDoc();
- const sal_Int32 nCntIdx = rNewPos.nContent.GetIndex() + nOffset;
+ const sal_Int32 nCntIdx = rNewPos.GetContentIndex() + nOffset;
SwCursorShell const* pShell = rDoc.GetEditShell();
if( pShell )
@@ -315,7 +315,7 @@ void SwDoc::CorrRel(const SwNodeIndex& rOldNode,
for(SwRangeRedline* p : rTable)
{
// lies on the position ??
- lcl_PaMCorrRel1( p, &rOldNode.GetNode(), aNewPos, aNewPos.nContent.GetIndex() + nOffset );
+ lcl_PaMCorrRel1( p, &rOldNode.GetNode(), aNewPos, aNewPos.GetContentIndex() + nOffset );
}
// To-Do - need to add here 'SwExtraRedlineTable' also ?
diff --git a/sw/source/core/doc/docedt.cxx b/sw/source/core/doc/docedt.cxx
index 4e545432acb6..0ae0092bae49 100644
--- a/sw/source/core/doc/docedt.cxx
+++ b/sw/source/core/doc/docedt.cxx
@@ -90,7 +90,7 @@ void RestFlyInRange( SaveFlyArr & rArr, const SwPosition& rStartPos,
assert(aPos.GetNode().GetContentNode());
aPos.nContent.Assign(aPos.GetNode().GetContentNode(),
rSave.nNdDiff == SwNodeOffset(0)
- ? rStartPos.nContent.GetIndex() + rSave.nContentIndex
+ ? rStartPos.GetContentIndex() + rSave.nContentIndex
: rSave.nContentIndex);
}
@@ -120,7 +120,7 @@ void SaveFlyInRange( const SwNodeRange& rRg, SaveFlyArr& rArr )
{
SaveFly aSave( pAPos->GetNodeIndex() - rRg.aStart.GetIndex(),
(RndStdIds::FLY_AT_CHAR == pAnchor->GetAnchorId())
- ? pAPos->nContent.GetIndex()
+ ? pAPos->GetContentIndex()
: 0,
pFormat, false );
rArr.push_back( aSave );
@@ -149,7 +149,7 @@ void SaveFlyInRange( const SwPaM& rPam, const SwPosition& rInsPos,
if (bMoveAllFlys)
{
assert(!rPam.End()->GetNode().IsTextNode() // can be table end-node
- || rPam.End()->nContent.GetIndex() == rPam.End()->GetNode().GetTextNode()->Len());
+ || rPam.End()->GetContentIndex() == rPam.End()->GetNode().GetTextNode()->Len());
++atParaEnd.nNode;
atParaEnd.nContent.Assign(atParaEnd.GetNode().GetContentNode(), 0);
}
@@ -189,8 +189,8 @@ void SaveFlyInRange( const SwPaM& rPam, const SwPosition& rInsPos,
SaveFly aSave( pAPos->GetNodeIndex() - rSttNdIdx.GetIndex(),
(RndStdIds::FLY_AT_CHAR == pAnchor->GetAnchorId())
? (pAPos->nNode == rSttNdIdx)
- ? pAPos->nContent.GetIndex() - rPam.Start()->nContent.GetIndex()
- : pAPos->nContent.GetIndex()
+ ? pAPos->GetContentIndex() - rPam.Start()->GetContentIndex()
+ : pAPos->GetContentIndex()
: 0,
pFormat, bInsPos );
rArr.push_back( aSave );
@@ -345,14 +345,14 @@ void sw_GetJoinFlags( SwPaM& rPam, bool& rJoinText, bool& rJoinPrev )
return;
bool bExchange = pStt == rPam.GetPoint();
- if( !pStt->nContent.GetIndex() &&
- pEndNd->GetText().getLength() != pEnd->nContent.GetIndex())
+ if( !pStt->GetContentIndex() &&
+ pEndNd->GetText().getLength() != pEnd->GetContentIndex())
bExchange = !bExchange;
if( bExchange )
rPam.Exchange();
rJoinPrev = rPam.GetPoint() == pStt;
- OSL_ENSURE( !pStt->nContent.GetIndex() &&
- pEndNd->GetText().getLength() != pEnd->nContent.GetIndex()
+ OSL_ENSURE( !pStt->GetContentIndex() &&
+ pEndNd->GetText().getLength() != pEnd->GetContentIndex()
? (rPam.GetPoint()->nNode < rPam.GetMark()->nNode)
: (rPam.GetPoint()->nNode > rPam.GetMark()->nNode),
"sw_GetJoinFlags");
@@ -593,7 +593,7 @@ uno::Any SwDoc::Spell( SwPaM& rPaM,
aCursor.GoSentence( SwCursor::START_SENT );
if( aOrigPos != *aCursor.GetPoint() )
{
- nBeginGrammarCheck = aCursor.GetPoint()->nContent.GetIndex();
+ nBeginGrammarCheck = aCursor.GetPoint()->GetContentIndex();
}
}
nEndGrammarCheck = (pSpellArgs->pEndNode == pNd)
@@ -741,14 +741,14 @@ SwHyphArgs::SwHyphArgs( const SwPaM *pPam, const Point &rCursorPos,
// Set start
m_pStart = pPoint->GetNode().GetTextNode();
- m_nPamStart = pPoint->nContent.GetIndex();
+ m_nPamStart = pPoint->GetContentIndex();
// Set End and Length
const SwPosition *pMark = pPam->GetMark();
m_pEnd = pMark->GetNode().GetTextNode();
- m_nPamLen = pMark->nContent.GetIndex();
+ m_nPamLen = pMark->GetContentIndex();
if( pPoint->nNode == pMark->nNode )
- m_nPamLen = m_nPamLen - pPoint->nContent.GetIndex();
+ m_nPamLen = m_nPamLen - pPoint->GetContentIndex();
}
inline void SwHyphArgs::SetRange( const SwNode *pNew )
@@ -849,8 +849,8 @@ void SwDoc::CountWords( const SwPaM& rPaM, SwDocStat& rStat )
const SwNodeOffset nSttNd = pStt->GetNodeIndex();
const SwNodeOffset nEndNd = pEnd->GetNodeIndex();
- const sal_Int32 nSttCnt = pStt->nContent.GetIndex();
- const sal_Int32 nEndCnt = pEnd->nContent.GetIndex();
+ const sal_Int32 nSttCnt = pStt->GetContentIndex();
+ const sal_Int32 nEndCnt = pEnd->GetContentIndex();
const SwTextNode* pTNd = pStt->GetNode().GetTextNode();
if( pStt == pEnd && pTNd ) // no region ?
diff --git a/sw/source/core/doc/docfld.cxx b/sw/source/core/doc/docfld.cxx
index ddab1366b4a3..1a52a8458cd7 100644
--- a/sw/source/core/doc/docfld.cxx
+++ b/sw/source/core/doc/docfld.cxx
@@ -104,7 +104,7 @@ SetGetExpField::SetGetExpField( const SwSectionNode& rSectNd,
if( pPos )
{
m_nNode = pPos->GetNodeIndex();
- m_nContent = pPos->nContent.GetIndex();
+ m_nContent = pPos->GetContentIndex();
}
else
{
@@ -124,12 +124,12 @@ SetGetExpField::SetGetExpField(::sw::mark::IBookmark const& rBookmark,
if (pPos)
{
m_nNode = pPos->GetNodeIndex();
- m_nContent = pPos->nContent.GetIndex();
+ m_nContent = pPos->GetContentIndex();
}
else
{
m_nNode = rBookmark.GetMarkStart().GetNodeIndex();
- m_nContent = rBookmark.GetMarkStart().nContent.GetIndex();;
+ m_nContent = rBookmark.GetMarkStart().GetContentIndex();;
}
}
@@ -163,7 +163,7 @@ SetGetExpField::SetGetExpField( const SwPosition& rPos )
m_eSetGetExpFieldType = CRSRPOS;
m_CNTNT.pPos = &rPos;
m_nNode = rPos.GetNodeIndex();
- m_nContent = rPos.nContent.GetIndex();
+ m_nContent = rPos.GetContentIndex();
}
SetGetExpField::SetGetExpField( const SwFlyFrameFormat& rFlyFormat,
@@ -174,7 +174,7 @@ SetGetExpField::SetGetExpField( const SwFlyFrameFormat& rFlyFormat,
if( pPos )
{
m_nNode = pPos->GetNodeIndex();
- m_nContent = pPos->nContent.GetIndex();
+ m_nContent = pPos->GetContentIndex();
}
else
{
@@ -214,7 +214,7 @@ void SetGetExpField::SetBodyPos( const SwContentFrame& rFrame )
bool const bResult = ::GetBodyTextNode( rDoc, aPos, rFrame );
OSL_ENSURE(bResult, "Where is the field?");
m_nNode = aPos.GetNodeIndex();
- m_nContent = aPos.nContent.GetIndex();
+ m_nContent = aPos.GetContentIndex();
}
}
@@ -353,10 +353,10 @@ sal_Int32 SetGetExpField::GetCntPosFromContent() const
nRet = m_CNTNT.pTextTOX->GetStart();
break;
case BOOKMARK:
- nRet = m_CNTNT.pBookmark->GetMarkStart().nContent.GetIndex();
+ nRet = m_CNTNT.pBookmark->GetMarkStart().GetContentIndex();
break;
case CRSRPOS:
- nRet = m_CNTNT.pPos->nContent.GetIndex();
+ nRet = m_CNTNT.pPos->GetContentIndex();
break;
default:
break;
diff --git a/sw/source/core/doc/docfly.cxx b/sw/source/core/doc/docfly.cxx
index 8434ebc53355..9915e7de01b2 100644
--- a/sw/source/core/doc/docfly.cxx
+++ b/sw/source/core/doc/docfly.cxx
@@ -308,7 +308,7 @@ sal_Int8 SwDoc::SetFlyFrameAnchor( SwFrameFormat& rFormat, SfxItemSet& rSet, boo
const SwPosition *pPos = rOldAnch.GetContentAnchor();
SwTextNode *pTextNode = pPos->GetNode().GetTextNode();
OSL_ENSURE( pTextNode->HasHints(), "Missing FlyInCnt-Hint." );
- const sal_Int32 nIdx = pPos->nContent.GetIndex();
+ const sal_Int32 nIdx = pPos->GetContentIndex();
SwTextAttr * const pHint =
pTextNode->GetTextAttrForCharAt( nIdx, RES_TXTATR_FLYCNT );
OSL_ENSURE( pHint && pHint->Which() == RES_TXTATR_FLYCNT,
@@ -338,7 +338,7 @@ sal_Int8 SwDoc::SetFlyFrameAnchor( SwFrameFormat& rFormat, SfxItemSet& rSet, boo
OSL_ENSURE( pNd, "Cursor does not point to TextNode." );
SwFormatFlyCnt aFormat( static_cast<SwFlyFrameFormat*>(&rFormat) );
- pNd->InsertItem( aFormat, pPos->nContent.GetIndex(), 0 );
+ pNd->InsertItem( aFormat, pPos->GetContentIndex(), 0 );
}
if( SfxItemState::SET != rSet.GetItemState( RES_VERT_ORIENT, false ))
@@ -913,7 +913,7 @@ bool SwDoc::ChgAnchor( const SdrMarkList& _rMrkList,
OSL_ENSURE( pNd, "Cursor not positioned at TextNode." );
SwFormatFlyCnt aFormat( pContact->GetFormat() );
- pNd->InsertItem( aFormat, aPos.nContent.GetIndex(), 0 );
+ pNd->InsertItem( aFormat, aPos.GetContentIndex(), 0 );
// Has a textbox attached to the format? Sync it as well!
if (pContact->GetFormat() && pContact->GetFormat()->GetOtherTextBoxFormats())
@@ -981,7 +981,7 @@ bool SwDoc::ChgAnchor( const SdrMarkList& _rMrkList,
// The TextAttribut needs to be destroyed which, unfortunately, also
// destroys the format. To avoid that, we disconnect the format from
// the attribute.
- const sal_Int32 nIndx( xOldAsCharAnchorPos->nContent.GetIndex() );
+ const sal_Int32 nIndx( xOldAsCharAnchorPos->GetContentIndex() );
SwTextNode* pTextNode( xOldAsCharAnchorPos->GetNode().GetTextNode() );
assert(pTextNode && "<SwDoc::ChgAnchor(..)> - missing previous anchor text node for as-character anchored object");
SwTextAttr * const pHint =
diff --git a/sw/source/core/doc/docfmt.cxx b/sw/source/core/doc/docfmt.cxx
index 24ce692c2568..12268a915872 100644
--- a/sw/source/core/doc/docfmt.cxx
+++ b/sw/source/core/doc/docfmt.cxx
@@ -337,7 +337,7 @@ void SwDoc::ResetAttrs( const SwPaM &rRg,
bool bAdd = true;
SwNodeIndex aTmpStt( pStt->nNode );
SwNodeIndex aTmpEnd( pEnd->nNode );
- if( pStt->nContent.GetIndex() ) // just one part
+ if( pStt->GetContentIndex() ) // just one part
{
// set up a later, and all CharFormatAttr -> TextFormatAttr
SwTextNode* pTNd = aTmpStt.GetNode().GetTextNode();
@@ -356,13 +356,13 @@ void SwDoc::ResetAttrs( const SwPaM &rRg,
++aTmpStt;
}
- if( pEnd->nContent.GetIndex() == pEnd->GetNode().GetContentNode()->Len() )
+ if( pEnd->GetContentIndex() == pEnd->GetNode().GetContentNode()->Len() )
{
// set up a later, and all CharFormatAttr -> TextFormatAttr
++aTmpEnd;
bAdd = false;
}
- else if( pStt->nNode != pEnd->nNode || !pStt->nContent.GetIndex() )
+ else if( pStt->nNode != pEnd->nNode || !pStt->GetContentIndex() )
{
SwTextNode* pTNd = aTmpEnd.GetNode().GetTextNode();
if( pTNd && pTNd->HasSwAttrSet() && pTNd->GetpSwAttrSet()->Count() )
@@ -411,13 +411,13 @@ void SwDoc::UpdateRsid( const SwPaM &rRg, const sal_Int32 nLen )
{
return;
}
- const sal_Int32 nStart(rRg.GetPoint()->nContent.GetIndex() - nLen);
+ const sal_Int32 nStart(rRg.GetPoint()->GetContentIndex() - nLen);
SvxRsidItem aRsid( mnRsid, RES_CHRATR_RSID );
SfxItemSetFixed<RES_CHRATR_RSID, RES_CHRATR_RSID> aSet(GetAttrPool());
aSet.Put(aRsid);
bool const bRet(pTextNode->SetAttr(aSet, nStart,
- rRg.GetPoint()->nContent.GetIndex()));
+ rRg.GetPoint()->GetContentIndex()));
if (bRet && GetIDocumentUndoRedo().DoesUndo())
{
@@ -1842,7 +1842,7 @@ void SwDoc::SetFormatItemByAutoFormat( const SwPaM& rPam, const SfxItemSet& rSet
getIDocumentRedlineAccess().SetRedlineFlags_intern( eOld | RedlineFlags::Ignore );
}
- const sal_Int32 nEnd(rPam.End()->nContent.GetIndex());
+ const sal_Int32 nEnd(rPam.End()->GetContentIndex());
std::vector<WhichPair> whichIds;
SfxItemIter iter(rSet);
for (SfxPoolItem const* pItem = iter.GetCurItem(); pItem; pItem = iter.NextItem())
diff --git a/sw/source/core/doc/docftn.cxx b/sw/source/core/doc/docftn.cxx
index cdc13e4284de..59ef1da0aede 100644
--- a/sw/source/core/doc/docftn.cxx
+++ b/sw/source/core/doc/docftn.cxx
@@ -437,9 +437,9 @@ bool SwDoc::SetCurFootnote( const SwPaM& rPam, const OUString& rNumStr,
auto [pStt, pEnd] = rPam.StartEnd(); // SwPosition*
const SwNodeOffset nSttNd = pStt->GetNodeIndex();
- const sal_Int32 nSttCnt = pStt->nContent.GetIndex();
+ const sal_Int32 nSttCnt = pStt->GetContentIndex();
const SwNodeOffset nEndNd = pEnd->GetNodeIndex();
- const sal_Int32 nEndCnt = pEnd->nContent.GetIndex();
+ const sal_Int32 nEndCnt = pEnd->GetContentIndex();
size_t nPos = 0;
rFootnoteArr.SeekEntry( pStt->nNode, &nPos );
diff --git a/sw/source/core/doc/doclay.cxx b/sw/source/core/doc/doclay.cxx
index 5c1297a48ccb..8b9cd0ee6484 100644
--- a/sw/source/core/doc/doclay.cxx
+++ b/sw/source/core/doc/doclay.cxx
@@ -234,7 +234,7 @@ SwFlyFrameFormat* SwDoc::MakeFlySection_( const SwPosition& rAnchPos,
if ( RndStdIds::FLY_AS_CHAR == eAnchorId )
{
- const sal_Int32 nStt = rAnchPos.nContent.GetIndex();
+ const sal_Int32 nStt = rAnchPos.GetContentIndex();
SwTextNode * pTextNode = rAnchPos.GetNode().GetTextNode();
OSL_ENSURE(pTextNode!= nullptr, "There should be a SwTextNode!");
@@ -277,7 +277,7 @@ SwFlyFrameFormat* SwDoc::MakeFlySection_( const SwPosition& rAnchPos,
if (GetIDocumentUndoRedo().DoesUndo())
{
SwNodeOffset nNodeIdx = rAnchPos.GetNodeIndex();
- const sal_Int32 nCntIdx = rAnchPos.nContent.GetIndex();
+ const sal_Int32 nCntIdx = rAnchPos.GetContentIndex();
GetIDocumentUndoRedo().AppendUndo(
std::make_unique<SwUndoInsLayFormat>( pFormat, nNodeIdx, nCntIdx ));
}
@@ -475,19 +475,19 @@ static bool lcl_TstFlyRange( const SwPaM* pPam, const SwPosition* pFlyPos,
const SwNodeOffset nPamEndIndex = pPaMEnd->GetNodeIndex();
if (RndStdIds::FLY_AT_PARA == nAnchorId)
bOk = (nPamStartIndex < nFlyIndex && nPamEndIndex > nFlyIndex) ||
- (((nPamStartIndex == nFlyIndex) && (pPaMStart->nContent.GetIndex() == 0)) &&
+ (((nPamStartIndex == nFlyIndex) && (pPaMStart->GetContentIndex() == 0)) &&
(nPamEndIndex > nFlyIndex));
else
{
- const sal_Int32 nFlyContentIndex = pFlyPos->nContent.GetIndex();
- const sal_Int32 nPamEndContentIndex = pPaMEnd->nContent.GetIndex();
+ const sal_Int32 nFlyContentIndex = pFlyPos->GetContentIndex();
+ const sal_Int32 nPamEndContentIndex = pPaMEnd->GetContentIndex();
bOk = (nPamStartIndex < nFlyIndex &&
(( nPamEndIndex > nFlyIndex )||
((nPamEndIndex == nFlyIndex) &&
(nPamEndContentIndex > nFlyContentIndex))) )
||
(((nPamStartIndex == nFlyIndex) &&
- (pPaMStart->nContent.GetIndex() <= nFlyContentIndex)) &&
+ (pPaMStart->GetContentIndex() <= nFlyContentIndex)) &&
((nPamEndIndex > nFlyIndex) ||
(nPamEndContentIndex > nFlyContentIndex )));
}
@@ -793,7 +793,7 @@ lcl_InsertLabel(SwDoc & rDoc, SwTextFormatColls *const pTextFormatCollTable,
const SwPosition *pPos = rAnchor.GetContentAnchor();
SwTextNode *pTextNode = pPos->GetNode().GetTextNode();
OSL_ENSURE( pTextNode->HasHints(), "Missing FlyInCnt-Hint." );
- const sal_Int32 nIdx = pPos->nContent.GetIndex();
+ const sal_Int32 nIdx = pPos->GetContentIndex();
SwTextAttr * const pHint =
pTextNode->GetTextAttrForCharAt(nIdx, RES_TXTATR_FLYCNT);
@@ -1112,7 +1112,7 @@ lcl_InsertDrawLabel( SwDoc & rDoc, SwTextFormatColls *const pTextFormatCollTable
const SwPosition *pPos = rAnchor.GetContentAnchor();
SwTextNode *pTextNode = pPos->GetNode().GetTextNode();
OSL_ENSURE( pTextNode->HasHints(), "Missing FlyInCnt-Hint." );
- const sal_Int32 nIdx = pPos->nContent.GetIndex();
+ const sal_Int32 nIdx = pPos->GetContentIndex();
SwTextAttr * const pHint =
pTextNode->GetTextAttrForCharAt( nIdx, RES_TXTATR_FLYCNT );
diff --git a/sw/source/core/doc/docnum.cxx b/sw/source/core/doc/docnum.cxx
index 239a534264de..4b6e4d1b0152 100644
--- a/sw/source/core/doc/docnum.cxx
+++ b/sw/source/core/doc/docnum.cxx
@@ -2103,11 +2103,11 @@ bool SwDoc::MoveParagraphImpl(SwPaM& rPam, SwNodeOffset const nOffset,
// Is completely in the range and is the own Redline too?
if( aTmpRedl.IsOwnRedline( *pTmp ) &&
(pRStt->nNode < pStt->nNode ||
- (pRStt->nNode == pStt->nNode && !pRStt->nContent.GetIndex()) ) &&
+ (pRStt->nNode == pStt->nNode && !pRStt->GetContentIndex()) ) &&
(pEnd->nNode < pREnd->nNode ||
(pEnd->nNode == pREnd->nNode &&
- pCEndNd ? pREnd->nContent.GetIndex() == pCEndNd->Len()
- : !pREnd->nContent.GetIndex() )) )
+ pCEndNd ? pREnd->GetContentIndex() == pCEndNd->Len()
+ : !pREnd->GetContentIndex() )) )
{
pOwnRedl = pTmp;
if( nRedlPos + 1 < getIDocumentRedlineAccess().GetRedlineTable().size() )
@@ -2122,7 +2122,7 @@ bool SwDoc::MoveParagraphImpl(SwPaM& rPam, SwNodeOffset const nOffset,
( pRStt->nNode > aIdx || aIdx > pREnd->nNode ||
// pOwnRedl doesn't start at the beginning of a node, so it's not
// possible to resize it to contain the line moved before it
- ( pRStt->nNode == aIdx && pRStt->nContent.GetIndex() > 0 ) ) )
+ ( pRStt->nNode == aIdx && pRStt->GetContentIndex() > 0 ) ) )
{
// it's not in itself, so don't move it
pOwnRedl = nullptr;
@@ -2211,9 +2211,9 @@ bool SwDoc::MoveParagraphImpl(SwPaM& rPam, SwNodeOffset const nOffset,
SwNodeOffset const nCurrentOffset(
nOrigIdx - aPam.Start()->GetNodeIndex());
pam.GetPoint()->nNode += nCurrentOffset;
- pam.GetPoint()->nContent.Assign(pam.GetPoint()->GetNode().GetContentNode(), pam.GetPoint()->nContent.GetIndex());
+ pam.GetPoint()->nContent.Assign(pam.GetPoint()->GetNode().GetContentNode(), pam.GetPoint()->GetContentIndex());
pam.GetMark()->nNode += nCurrentOffset;
- pam.GetMark()->nContent.Assign(pam.GetMark()->GetNode().GetContentNode(), pam.GetMark()->nContent.GetIndex());
+ pam.GetMark()->nContent.Assign(pam.GetMark()->GetNode().GetContentNode(), pam.GetMark()->GetContentIndex());
pNewRedline = new SwRangeRedline( RedlineType::Delete, pam );
}
diff --git a/sw/source/core/doc/docredln.cxx b/sw/source/core/doc/docredln.cxx
index c085b5012cd9..7457b11ee2c1 100644
--- a/sw/source/core/doc/docredln.cxx
+++ b/sw/source/core/doc/docredln.cxx
@@ -1385,8 +1385,8 @@ void SwRangeRedline::InvalidateRange(Invalidation const eWhy)
auto [pRStt, pREnd] = StartEnd(); // SwPosition*
SwNodeOffset nSttNd = pRStt->GetNodeIndex(),
nEndNd = pREnd->GetNodeIndex();
- sal_Int32 nSttCnt = pRStt->nContent.GetIndex();
- sal_Int32 nEndCnt = pREnd->nContent.GetIndex();
+ sal_Int32 nSttCnt = pRStt->GetContentIndex();
+ sal_Int32 nEndCnt = pREnd->GetContentIndex();
SwNodes& rNds = GetDoc().GetNodes();
for (SwNodeOffset n(nSttNd); n <= nEndNd; ++n)
@@ -1439,7 +1439,7 @@ void SwRangeRedline::CalcStartEnd( SwNodeOffset nNdIdx, sal_Int32& rStart, sal_I
else if (pREnd->nNode == nNdIdx)
{
rStart = 0; // Paragraph is overlapped in the beginning
- rEnd = pREnd->nContent.GetIndex();
+ rEnd = pREnd->GetContentIndex();
}
else // redline ends before paragraph
{
@@ -1449,9 +1449,9 @@ void SwRangeRedline::CalcStartEnd( SwNodeOffset nNdIdx, sal_Int32& rStart, sal_I
}
else if( pRStt->nNode == nNdIdx )
{
- rStart = pRStt->nContent.GetIndex();
+ rStart = pRStt->GetContentIndex();
if( pREnd->nNode == nNdIdx )
- rEnd = pREnd->nContent.GetIndex(); // Within the Paragraph
+ rEnd = pREnd->GetContentIndex(); // Within the Paragraph
else
rEnd = COMPLETE_STRING; // Paragraph is overlapped in the end
}
@@ -1480,8 +1480,8 @@ static void lcl_storeAnnotationMarks(SwDoc& rDoc, const SwPosition* pStt, const
// at start of redlines use a 1-character length bookmark range
// instead of a 0-character length bookmark position to avoid its losing
sal_Int32 nLen = (*pStt == rStartPos) ? 1 : 0;
- SwPaM aPam( rStartPos.nNode, rStartPos.nContent.GetIndex(),
- rStartPos.nNode, rStartPos.nContent.GetIndex() + nLen);
+ SwPaM aPam( rStartPos.nNode, rStartPos.GetContentIndex(),
+ rStartPos.nNode, rStartPos.GetContentIndex() + nLen);
::sw::mark::IMark* pMark = rDMA.makeAnnotationBookmark(
aPam,
(**iter).GetName(),
@@ -1791,7 +1791,7 @@ void SwRangeRedline::MoveFromSection(size_t nMyPos)
? pCNd->GetFormatColl() : nullptr;
SwNodeIndex aNdIdx( GetPoint()->nNode, -1 );
- const sal_Int32 nPos = GetPoint()->nContent.GetIndex();
+ const sal_Int32 nPos = GetPoint()->GetContentIndex();
SwPosition aPos( *GetPoint() );
if( m_bDelLastPara && *aPam.GetPoint() == *aPam.GetMark() )
@@ -1991,7 +1991,7 @@ OUString SwRangeRedline::GetDescr(bool bSimplified)
OUString sDescr = DenoteSpecialCharacters(pPaM->GetText().replace('\n', ' '), /*bQuoted=*/!bSimplified);
if (const SwTextNode *pTextNode = pPaM->GetNode().GetTextNode())
{
- if (const SwTextAttr* pTextAttr = pTextNode->GetFieldTextAttrAt(pPaM->GetPoint()->nContent.GetIndex() - 1, true ))
+ if (const SwTextAttr* pTextAttr = pTextNode->GetFieldTextAttrAt(pPaM->GetPoint()->GetContentIndex() - 1, true ))
{
sDescr = ( bSimplified ? "" : SwResId(STR_START_QUOTE) )
+ pTextAttr->GetFormatField().GetField()->GetFieldName()
diff --git a/sw/source/core/doc/docruby.cxx b/sw/source/core/doc/docruby.cxx
index 801f4b92653b..851695e80b8d 100644
--- a/sw/source/core/doc/docruby.cxx
+++ b/sw/source/core/doc/docruby.cxx
@@ -178,7 +178,7 @@ bool SwDoc::SelectNextRubyChars( SwPaM& rPam, SwRubyListEntry& rEntry )
SwPosition* pPos = rPam.GetPoint();
const SwTextNode* pTNd = pPos->GetNode().GetTextNode();
OUString const& rText = pTNd->GetText();
- sal_Int32 nStart = pPos->nContent.GetIndex();
+ sal_Int32 nStart = pPos->GetContentIndex();
sal_Int32 nEnd = rText.getLength();
bool bHasMark = rPam.HasMark();
@@ -188,7 +188,7 @@ bool SwDoc::SelectNextRubyChars( SwPaM& rPam, SwRubyListEntry& rEntry )
if( rPam.GetMark()->nNode == pPos->nNode )
{
// then use that end
- const sal_Int32 nTEnd = rPam.GetMark()->nContent.GetIndex();
+ const sal_Int32 nTEnd = rPam.GetMark()->GetContentIndex();
if( nTEnd < nEnd )
nEnd = nTEnd;
}
@@ -248,7 +248,7 @@ bool SwDoc::SelectNextRubyChars( SwPaM& rPam, SwRubyListEntry& rEntry )
{
rPam.SetMark();
pPos->nContent = pAttr->GetAnyEnd();
- if( pPos->nContent.GetIndex() > nEnd )
+ if( pPos->GetContentIndex() > nEnd )
pPos->nContent = nEnd;
rEntry.SetRubyAttr( pAttr->GetRuby() );
}
@@ -304,12 +304,12 @@ bool SwDoc::SelectNextRubyChars( SwPaM& rPam, SwRubyListEntry& rEntry )
}
}
pTNd->GoNext( &pPos->nContent, SwCursorSkipMode::Chars );
- nStart = pPos->nContent.GetIndex();
+ nStart = pPos->GetContentIndex();
}
- nStart = rPam.GetMark()->nContent.GetIndex();
+ nStart = rPam.GetMark()->GetContentIndex();
rEntry.SetText( rText.copy( nStart,
- rPam.GetPoint()->nContent.GetIndex() - nStart ));
+ rPam.GetPoint()->GetContentIndex() - nStart ));
return rPam.HasMark();
}
diff --git a/sw/source/core/doc/doctxm.cxx b/sw/source/core/doc/doctxm.cxx
index c65b060e3fa7..b98419b81857 100644
--- a/sw/source/core/doc/doctxm.cxx
+++ b/sw/source/core/doc/doctxm.cxx
@@ -126,7 +126,7 @@ sal_uInt16 SwDoc::GetCurTOXMark( const SwPosition& rPos,
sal_Int32 nSttIdx;
const sal_Int32 *pEndIdx;
- const sal_Int32 nCurrentPos = rPos.nContent.GetIndex();
+ const sal_Int32 nCurrentPos = rPos.GetContentIndex();
for( size_t n = 0; n < rHts.Count(); ++n )
{
diff --git a/sw/source/core/doc/extinput.cxx b/sw/source/core/doc/extinput.cxx
index a9927a4e0ec3..8fd2a751bcc8 100644
--- a/sw/source/core/doc/extinput.cxx
+++ b/sw/source/core/doc/extinput.cxx
@@ -55,7 +55,7 @@ SwExtTextInput::~SwExtTextInput()
SwContentIndex& rIdx = GetPoint()->nContent;
sal_Int32 nSttCnt = rIdx.GetIndex();
- sal_Int32 nEndCnt = GetMark()->nContent.GetIndex();
+ sal_Int32 nEndCnt = GetMark()->GetContentIndex();
if( nEndCnt == nSttCnt )
return;
@@ -153,8 +153,8 @@ void SwExtTextInput::SetInputData( const CommandExtTextInputData& rData )
if( !pTNd )
return;
- sal_Int32 nSttCnt = Start()->nContent.GetIndex();
- sal_Int32 nEndCnt = End()->nContent.GetIndex();
+ sal_Int32 nSttCnt = Start()->GetContentIndex();
+ sal_Int32 nEndCnt = End()->GetContentIndex();
SwContentIndex aIdx( pTNd, nSttCnt );
const OUString& rNewStr = rData.GetText();
@@ -227,8 +227,8 @@ void SwExtTextInput::SetOverwriteCursor( bool bFlag )
if (!pTNd)
return;
- const sal_Int32 nSttCnt = GetPoint()->nContent.GetIndex();
- const sal_Int32 nEndCnt = GetMark()->nContent.GetIndex();
+ const sal_Int32 nSttCnt = GetPoint()->GetContentIndex();
+ const sal_Int32 nEndCnt = GetMark()->GetContentIndex();
m_sOverwriteText = pTNd->GetText().copy( std::min(nSttCnt, nEndCnt) );
if( m_sOverwriteText.isEmpty() )
return;
@@ -282,8 +282,8 @@ SwExtTextInput* SwDoc::GetExtTextInput( const SwNode& rNd,
do {
SwNodeOffset nStartNode = pTmp->Start()->GetNodeIndex(),
nEndNode = pTmp->End()->GetNodeIndex();
- sal_Int32 nStartCnt = pTmp->Start()->nContent.GetIndex();
- sal_Int32 nEndCnt = pTmp->End()->nContent.GetIndex();
+ sal_Int32 nStartCnt = pTmp->Start()->GetContentIndex();
+ sal_Int32 nEndCnt = pTmp->End()->GetContentIndex();
if( nStartNode <= nNdIdx && nNdIdx <= nEndNode &&
( nContentPos<0 ||
diff --git a/sw/source/core/doc/swserv.cxx b/sw/source/core/doc/swserv.cxx
index 5bb22e4e7713..a364f0aeb234 100644
--- a/sw/source/core/doc/swserv.cxx
+++ b/sw/source/core/doc/swserv.cxx
@@ -277,13 +277,13 @@ void SwServerObject::SetDdeBookmark( ::sw::mark::IMark& rBookmark)
SwDataChanged::SwDataChanged( const SwPaM& rPam )
: m_pPam( &rPam ), m_pPos( nullptr ), m_rDoc( rPam.GetDoc() )
{
- m_nContent = rPam.GetPoint()->nContent.GetIndex();
+ m_nContent = rPam.GetPoint()->GetContentIndex();
}
SwDataChanged::SwDataChanged( SwDoc& rDc, const SwPosition& rPos )
: m_pPam( nullptr ), m_pPos( &rPos ), m_rDoc( rDc )
{
- m_nContent = rPos.nContent.GetIndex();
+ m_nContent = rPos.GetContentIndex();
}
SwDataChanged::~SwDataChanged()
diff --git a/sw/source/core/docnode/ndsect.cxx b/sw/source/core/docnode/ndsect.cxx
index 07b0d3a7ba4e..e619cb333cfb 100644
--- a/sw/source/core/docnode/ndsect.cxx
+++ b/sw/source/core/docnode/ndsect.cxx
@@ -175,9 +175,9 @@ SwDoc::InsertSwSection(SwPaM const& rRange, SwSectionData & rNewData,
if (rNewData.IsHidden() && rRange.HasMark())
{
auto [pStt, pEnd] = rRange.StartEnd(); // SwPosition*
- if( !pStt->nContent.GetIndex() &&
+ if( !pStt->GetContentIndex() &&
pEnd->GetNode().GetContentNode()->Len() ==
- pEnd->nContent.GetIndex() )
+ pEnd->GetContentIndex() )
{
::lcl_CheckEmptyLayFrame( GetNodes(),
rNewData,
@@ -229,7 +229,7 @@ SwDoc::InsertSwSection(SwPaM const& rRange, SwSectionData & rNewData,
if( pUndoInsSect )
{
if( !( pPrvNd && 1 == nRegionRet ) &&
- pSttPos->nContent.GetIndex() )
+ pSttPos->GetContentIndex() )
{
SwTextNode* const pTNd =
pSttPos->GetNode().GetTextNode();
@@ -244,7 +244,7 @@ SwDoc::InsertSwSection(SwPaM const& rRange, SwSectionData & rNewData,
SwTextNode *const pTNd =
pEndPos->GetNode().GetTextNode();
if (pTNd && (pTNd->GetText().getLength()
- != pEndPos->nContent.GetIndex()))
+ != pEndPos->GetContentIndex()))
{
pUndoInsSect->SaveSplitNode( pTNd, false );
}
@@ -256,7 +256,7 @@ SwDoc::InsertSwSection(SwPaM const& rRange, SwSectionData & rNewData,
pSttPos->nNode.Assign( *pPrvNd );
pSttPos->nContent.Assign( pSttPos->GetNode().GetContentNode(), 0 );
}
- else if( pSttPos->nContent.GetIndex() )
+ else if( pSttPos->GetContentIndex() )
{
getIDocumentContentOperations().SplitNode( *pSttPos, false );
}
@@ -269,9 +269,9 @@ SwDoc::InsertSwSection(SwPaM const& rRange, SwSectionData & rNewData,
else
{
const SwContentNode* pCNd = pEndPos->GetNode().GetContentNode();
- if( pCNd && pCNd->Len() != pEndPos->nContent.GetIndex() )
+ if( pCNd && pCNd->Len() != pEndPos->GetContentIndex() )
{
- sal_Int32 nContent = pSttPos->nContent.GetIndex();
+ sal_Int32 nContent = pSttPos->GetContentIndex();
getIDocumentContentOperations().SplitNode( *pEndPos, false );
SwTextNode* pTNd;
@@ -300,12 +300,12 @@ SwDoc::InsertSwSection(SwPaM const& rRange, SwSectionData & rNewData,
{
const SwPosition* pPos = rRange.GetPoint();
const SwContentNode* pCNd = pPos->GetNode().GetContentNode();
- if( !pPos->nContent.GetIndex() )
+ if( !pPos->GetContentIndex() )
{
pNewSectNode = GetNodes().InsertTextSection(
pPos->nNode, *pFormat, rNewData, pTOXBase, nullptr);
}
- else if( pPos->nContent.GetIndex() == pCNd->Len() )
+ else if( pPos->GetContentIndex() == pCNd->Len() )
{
pNewSectNode = GetNodes().InsertTextSection(
pPos->nNode, *pFormat, rNewData, pTOXBase, nullptr, false);
@@ -407,9 +407,9 @@ sal_uInt16 SwDoc::IsInsRegionAvailable( const SwPaM& rRange,
// Try to create an enclosing Section, but only if Start is
// located at the Section's beginning and End at it's end
nRet = 0;
- if( !pStt->nContent.GetIndex()
+ if( !pStt->GetContentIndex()
&& pSectNd->GetIndex() == pStt->GetNodeIndex() - 1
- && pEnd->nContent.GetIndex() == pCNd->Len() )
+ && pEnd->GetContentIndex() == pCNd->Len() )
{
SwNodeIndex aIdx( pStt->nNode, -1 );
SwNodeOffset nCmp = pEnd->GetNodeIndex();
@@ -451,7 +451,7 @@ sal_uInt16 SwDoc::IsInsRegionAvailable( const SwPaM& rRange,
// Try to create an enclosing Section, but only if the End
// is at the Section's end.
nRet = 0;
- if( pEnd->nContent.GetIndex() == pCNd->Len() )
+ if( pEnd->GetContentIndex() == pCNd->Len() )
{
SwNodeIndex aIdx( pEnd->nNode, 1 );
if( aIdx.GetNode().IsEndNode() &&
@@ -477,7 +477,7 @@ sal_uInt16 SwDoc::IsInsRegionAvailable( const SwPaM& rRange,
// Try to create an enclosing Section, but only if Start
// is at the Section's start.
nRet = 0;
- if( !pStt->nContent.GetIndex() )
+ if( !pStt->GetContentIndex() )
{
SwNodeIndex aIdx( pStt->nNode, -1 );
if( aIdx.GetNode().IsSectionNode() )
diff --git a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx
index 7a29ef4f07a8..db023dc228aa 100644
--- a/sw/source/core/docnode/ndtbl.cxx
+++ b/sw/source/core/docnode/ndtbl.cxx
@@ -663,15 +663,15 @@ const SwTable* SwDoc::TextToTable( const SwInsertTableOptions& rInsTableOpts,
// Make sure that the range is on Node Edges
SwNodeRange aRg( pStt->nNode, pEnd->nNode );
- if( pStt->nContent.GetIndex() )
+ if( pStt->GetContentIndex() )
getIDocumentContentOperations().SplitNode( *pStt, false );
- bool bEndContent = 0 != pEnd->nContent.GetIndex();
+ bool bEndContent = 0 != pEnd->GetContentIndex();
// Do not split at the End of a Line (except at the End of the Doc)
if( bEndContent )
{
- if( pEnd->GetNode().GetContentNode()->Len() != pEnd->nContent.GetIndex()
+ if( pEnd->GetNode().GetContentNode()->Len() != pEnd->GetContentIndex()
|| pEnd->GetNodeIndex() >= GetNodes().GetEndOfContent().GetIndex()-1 )
{
getIDocumentContentOperations().SplitNode( *pEnd, false );
@@ -1165,15 +1165,15 @@ const SwTable* SwDoc::TextToTable( const std::vector< std::vector<SwNodeRange> >
// make sure that the range is on Node Edges
SwNodeRange aRg( pStt->nNode, pEnd->nNode );
- if( pStt->nContent.GetIndex() )
+ if( pStt->GetContentIndex() )
getIDocumentContentOperations().SplitNode( *pStt, false );
- bool bEndContent = 0 != pEnd->nContent.GetIndex();
+ bool bEndContent = 0 != pEnd->GetContentIndex();
// Do not split at the End of a Line (except at the End of the Doc)
if( bEndContent )
{
- if( pEnd->GetNode().GetContentNode()->Len() != pEnd->nContent.GetIndex()
+ if( pEnd->GetNode().GetContentNode()->Len() != pEnd->GetContentIndex()
|| pEnd->GetNodeIndex() >= GetNodes().GetEndOfContent().GetIndex()-1 )
{
getIDocumentContentOperations().SplitNode( *pEnd, false );
diff --git a/sw/source/core/docnode/nodes.cxx b/sw/source/core/docnode/nodes.cxx
index 040a109ca05f..70fc729f0321 100644
--- a/sw/source/core/docnode/nodes.cxx
+++ b/sw/source/core/docnode/nodes.cxx
@@ -1460,14 +1460,14 @@ void SwNodes::MoveRange( SwPaM & rPam, SwPosition & rPos, SwNodes& rNodes )
rPos.nContent.Assign( pDestNd, 0 );
bCopyCollFormat = true;
}
- bSplitDestNd = pDestNd->Len() > rPos.nContent.GetIndex() ||
+ bSplitDestNd = pDestNd->Len() > rPos.GetContentIndex() ||
pEnd->GetNode().IsTextNode();
// move the content into the new node
bool bOneNd = pStt->nNode == pEnd->nNode;
const sal_Int32 nLen =
- ( bOneNd ? std::min(pEnd->nContent.GetIndex(), pSrcNd->Len()) : pSrcNd->Len() )
- - pStt->nContent.GetIndex();
+ ( bOneNd ? std::min(pEnd->GetContentIndex(), pSrcNd->Len()) : pSrcNd->Len() )
+ - pStt->GetContentIndex();
if( !pEnd->GetNode().IsContentNode() )
{
@@ -1487,7 +1487,7 @@ void SwNodes::MoveRange( SwPaM & rPam, SwPosition & rPos, SwNodes& rNodes )
// templates must be copied/set after a split
if( !bOneNd && bSplitDestNd )
{
- if( !rPos.nContent.GetIndex() )
+ if( !rPos.GetContentIndex() )
{
bCopyCollFormat = true;
}
@@ -1543,13 +1543,13 @@ void SwNodes::MoveRange( SwPaM & rPam, SwPosition & rPos, SwNodes& rNodes )
}
else if( pDestNd )
{
- if( rPos.nContent.GetIndex() )
+ if( rPos.GetContentIndex() )
{
- if( rPos.nContent.GetIndex() == pDestNd->Len() )
+ if( rPos.GetContentIndex() == pDestNd->Len() )
{
++rPos.nNode;
}
- else if( rPos.nContent.GetIndex() )
+ else if( rPos.GetContentIndex() )
{
// if the EndNode is split than correct the EndIdx
const bool bCorrEnd = aEndIdx == rPos.nNode;
@@ -1597,12 +1597,12 @@ void SwNodes::MoveRange( SwPaM & rPam, SwPosition & rPos, SwNodes& rNodes )
pDestNd = rPos.GetNode().GetTextNode();
}
- if (pDestNd && pEnd->nContent.GetIndex())
+ if (pDestNd && pEnd->GetContentIndex())
{
// move the content into the new node
SwContentIndex aIdx( pEndSrcNd, 0 );
pEndSrcNd->CutText( pDestNd, rPos.nContent, aIdx,
- pEnd->nContent.GetIndex());
+ pEnd->GetContentIndex());
}
if (pDestNd && bCopyCollFormat)
@@ -1647,7 +1647,7 @@ void SwNodes::MoveRange( SwPaM & rPam, SwPosition & rPos, SwNodes& rNodes )
OSL_ENSURE( bSuccess, "Move() - no ContentNode here" );
}
pStt->nContent.Assign( pStt->GetNode().GetContentNode(),
- pStt->nContent.GetIndex() );
+ pStt->GetContentIndex() );
// Correct the PaM, because it might have happened that the move
// went over the node borders (so the data might be in different nodes).
// Also, a selection is invalidated.
diff --git a/sw/source/core/edit/acorrect.cxx b/sw/source/core/edit/acorrect.cxx
index 46880f06b170..f915d462a305 100644
--- a/sw/source/core/edit/acorrect.cxx
+++ b/sw/source/core/edit/acorrect.cxx
@@ -616,7 +616,7 @@ void SwAutoCorrExceptWord::CheckChar( const SwPosition& rPos, sal_Unicode cChr )
{
// test only if this is an improvement.
// If yes, then add the word to the list.
- if (m_cChar == cChr && rPos.GetNodeIndex() == m_nNode && rPos.nContent.GetIndex() == m_nContent)
+ if (m_cChar == cChr && rPos.GetNodeIndex() == m_nNode && rPos.GetContentIndex() == m_nContent)
{
// get the current autocorrection:
SvxAutoCorrect* pACorr = SvxAutoCorrCfg::Get().GetAutoCorrect();
@@ -632,7 +632,7 @@ void SwAutoCorrExceptWord::CheckChar( const SwPosition& rPos, sal_Unicode cChr )
bool SwAutoCorrExceptWord::CheckDelChar( const SwPosition& rPos )
{
bool bRet = false;
- if (!m_bDeleted && rPos.GetNodeIndex() == m_nNode && rPos.nContent.GetIndex() == m_nContent)
+ if (!m_bDeleted && rPos.GetNodeIndex() == m_nNode && rPos.GetContentIndex() == m_nContent)
m_bDeleted = bRet = true;
return bRet;
}
@@ -648,7 +648,7 @@ void SwDontExpandItem::SaveDontExpandItems( const SwPosition& rPos )
{
m_pDontExpandItems.reset( new SfxItemSet( const_cast<SwDoc&>(pTextNd->GetDoc()).GetAttrPool(),
aCharFormatSetRange ) );
- const sal_Int32 n = rPos.nContent.GetIndex();
+ const sal_Int32 n = rPos.GetContentIndex();
if (!pTextNd->GetParaAttr( *m_pDontExpandItems, n, n,
n != pTextNd->GetText().getLength() ))
{
@@ -663,7 +663,7 @@ void SwDontExpandItem::RestoreDontExpandItems( const SwPosition& rPos )
if( !pTextNd )
return;
- const sal_Int32 nStart = rPos.nContent.GetIndex();
+ const sal_Int32 nStart = rPos.GetContentIndex();
if( nStart == pTextNd->GetText().getLength() )
pTextNd->FormatToTextAttr( pTextNd );
diff --git a/sw/source/core/edit/autofmt.cxx b/sw/source/core/edit/autofmt.cxx
index fa91cbbf7f5a..500e80b292d7 100644
--- a/sw/source/core/edit/autofmt.cxx
+++ b/sw/source/core/edit/autofmt.cxx
@@ -1973,7 +1973,7 @@ void SwAutoFormat::AutoCorrect(TextFrameIndex nPos)
sal_Int32(nPos), cChar, true ));
m_aDelPam.SetMark();
- m_aDelPam.GetPoint()->nContent = m_aDelPam.GetMark()->nContent.GetIndex() + 1;
+ m_aDelPam.GetPoint()->nContent = m_aDelPam.GetMark()->GetContentIndex() + 1;
if( 2 == sReplace.getLength() && ' ' == sReplace[ 1 ])
{
sReplace = sReplace.copy( 0, 1 );
@@ -2032,7 +2032,7 @@ void SwAutoFormat::AutoCorrect(TextFrameIndex nPos)
}
m_aDelPam.SetMark();
- m_aDelPam.GetPoint()->nContent = m_aDelPam.GetMark()->nContent.GetIndex() + 1;
+ m_aDelPam.GetPoint()->nContent = m_aDelPam.GetMark()->GetContentIndex() + 1;
m_pDoc->getIDocumentContentOperations().ReplaceRange( m_aDelPam, sReplace, false );
if( m_aFlags.bWithRedlining )
diff --git a/sw/source/core/edit/edattr.cxx b/sw/source/core/edit/edattr.cxx
index 57505ac31d65..3231f9f0d8c2 100644
--- a/sw/source/core/edit/edattr.cxx
+++ b/sw/source/core/edit/edattr.cxx
@@ -107,8 +107,8 @@ bool SwEditShell::GetPaMAttr( SwPaM* pPaM, SfxItemSet& rSet,
SwNodeOffset nSttNd = rCurrentPaM.Start()->GetNodeIndex(),
nEndNd = rCurrentPaM.End()->GetNodeIndex();
- sal_Int32 nSttCnt = rCurrentPaM.Start()->nContent.GetIndex();
- sal_Int32 nEndCnt = rCurrentPaM.End()->nContent.GetIndex();
+ sal_Int32 nSttCnt = rCurrentPaM.Start()->GetContentIndex();
+ sal_Int32 nEndCnt = rCurrentPaM.End()->GetContentIndex();
if( sal_Int32(nEndNd - nSttNd) >= getMaxLookup() )
{
@@ -291,8 +291,8 @@ std::vector<std::pair< const SfxPoolItem*, std::unique_ptr<SwPaM> >> SwEditShell
// get the start and the end node of the current selection
SwNodeOffset nSttNd = rCurrentPaM.Start()->GetNodeIndex(),
nEndNd = rCurrentPaM.End()->GetNodeIndex();
- sal_Int32 nSttCnt = rCurrentPaM.Start()->nContent.GetIndex();
- sal_Int32 nEndCnt = rCurrentPaM.End()->nContent.GetIndex();
+ sal_Int32 nSttCnt = rCurrentPaM.Start()->GetContentIndex();
+ sal_Int32 nEndCnt = rCurrentPaM.End()->GetContentIndex();
SwPaM* pNewPaM = nullptr;
const SfxPoolItem* pItem = nullptr;
@@ -400,7 +400,7 @@ bool SwEditShell::GetCurFootnote( SwFormatFootnote* pFillFootnote )
return false;
SwTextAttr *const pFootnote = pTextNd->GetTextAttrForCharAt(
- pCursor->GetPoint()->nContent.GetIndex(), RES_TXTATR_FTN);
+ pCursor->GetPoint()->GetContentIndex(), RES_TXTATR_FTN);
if( pFootnote && pFillFootnote )
{
// Transfer data from the attribute
@@ -677,7 +677,7 @@ SvtScriptType SwEditShell::GetScriptType() const
const SwScriptInfo *const pScriptInfo =
SwScriptInfo::GetScriptInfo(*pTNd, &pFrame);
- sal_Int32 nPos = pStt->nContent.GetIndex();
+ sal_Int32 nPos = pStt->GetContentIndex();
//Task 90448: we need the scripttype of the previous
// position, if no selection exist!
if( nPos )
@@ -718,10 +718,10 @@ SvtScriptType SwEditShell::GetScriptType() const
SwScriptInfo::GetScriptInfo(*pTNd, &pFrame);
sal_Int32 nChg = aIdx == pStt->nNode
- ? pStt->nContent.GetIndex()
+ ? pStt->GetContentIndex()
: 0;
sal_Int32 nEndPos = aIdx == nEndIdx
- ? pEnd->nContent.GetIndex()
+ ? pEnd->GetContentIndex()
: rText.getLength();
OSL_ENSURE( nEndPos <= rText.getLength(),
@@ -808,7 +808,7 @@ LanguageType SwEditShell::GetCurLang() const
{
//JP 24.9.2001: if exist no selection, then get the language before
// the current character!
- sal_Int32 nPos = rPos.nContent.GetIndex();
+ sal_Int32 nPos = rPos.GetContentIndex();
if( nPos && !pCursor->HasMark() )
--nPos;
nLang = pTNd->GetLang( nPos );
diff --git a/sw/source/core/edit/eddel.cxx b/sw/source/core/edit/eddel.cxx
index 3503807554ef..bc5356844665 100644
--- a/sw/source/core/edit/eddel.cxx
+++ b/sw/source/core/edit/eddel.cxx
@@ -254,7 +254,7 @@ bool SwEditShell::Copy( SwEditShell& rDestShell )
{
// Store start position of the new area
aSttNdIdx = pPos->GetNodeIndex()-1;
- nSttCntIdx = pPos->nContent.GetIndex();
+ nSttCntIdx = pPos->GetContentIndex();
bFirstMove = false;
}
diff --git a/sw/source/core/edit/edfcol.cxx b/sw/source/core/edit/edfcol.cxx
index 18022c2fbfea..829db44d1b3f 100644
--- a/sw/source/core/edit/edfcol.cxx
+++ b/sw/source/core/edit/edfcol.cxx
@@ -2046,7 +2046,7 @@ bool SwEditShell::IsCursorInParagraphMetadataField() const
if (GetCursor() && GetCursor()->Start())
{
SwTextNode* pNode = GetCursor()->Start()->GetNode().GetTextNode();
- const sal_uLong index = GetCursor()->Start()->nContent.GetIndex();
+ const sal_uLong index = GetCursor()->Start()->GetContentIndex();
uno::Reference<text::XTextField> xField = lcl_GetParagraphMetadataFieldAtIndex(GetDoc()->GetDocShell(), pNode, index);
return xField.is();
}
@@ -2059,7 +2059,7 @@ bool SwEditShell::RemoveParagraphMetadataFieldAtCursor()
if (GetCursor() && GetCursor()->Start())
{
SwTextNode* pNode = GetCursor()->Start()->GetNode().GetTextNode();
- sal_uLong index = GetCursor()->Start()->nContent.GetIndex();
+ sal_uLong index = GetCursor()->Start()->GetContentIndex();
uno::Reference<text::XTextField> xField = lcl_GetParagraphMetadataFieldAtIndex(GetDoc()->GetDocShell(), pNode, index);
if (!xField.is())
{
diff --git a/sw/source/core/edit/edfmt.cxx b/sw/source/core/edit/edfmt.cxx
index 3e5c735c59c3..9a4fa24e151c 100644
--- a/sw/source/core/edit/edfmt.cxx
+++ b/sw/source/core/edit/edfmt.cxx
@@ -63,18 +63,18 @@ void SwEditShell::FillByEx(SwCharFormat* pCharFormat)
const SwPosition* pMkPos = pPam->GetMark();
if( pPtPos->nNode == pMkPos->nNode ) // in the same node?
{
- nStt = pPtPos->nContent.GetIndex();
- if( nStt < pMkPos->nContent.GetIndex() )
- nEnd = pMkPos->nContent.GetIndex();
+ nStt = pPtPos->GetContentIndex();
+ if( nStt < pMkPos->GetContentIndex() )
+ nEnd = pMkPos->GetContentIndex();
else
{
nEnd = nStt;
- nStt = pMkPos->nContent.GetIndex();
+ nStt = pMkPos->GetContentIndex();
}
}
else
{
- nStt = pMkPos->nContent.GetIndex();
+ nStt = pMkPos->GetContentIndex();
if( pPtPos->nNode < pMkPos->nNode )
{
nEnd = nStt;
@@ -85,7 +85,7 @@ void SwEditShell::FillByEx(SwCharFormat* pCharFormat)
}
}
else
- nStt = nEnd = pPam->GetPoint()->nContent.GetIndex();
+ nStt = nEnd = pPam->GetPoint()->GetContentIndex();
SfxItemSet aSet( mxDoc->GetAttrPool(),
pCharFormat->GetAttrSet().GetRanges() );
diff --git a/sw/source/core/edit/editsh.cxx b/sw/source/core/edit/editsh.cxx
index 627f667127b4..4de9589a3300 100644
--- a/sw/source/core/edit/editsh.cxx
+++ b/sw/source/core/edit/editsh.cxx
@@ -540,9 +540,9 @@ OUString SwEditShell::Calculate()
if(pTextNd)
{
const SwPosition *pStart = rCurrentPaM.Start(), *pEnd = rCurrentPaM.End();
- const sal_Int32 nStt = pStart->nContent.GetIndex();
+ const sal_Int32 nStt = pStart->GetContentIndex();
OUString aStr = pTextNd->GetExpandText(GetLayout(),
- nStt, pEnd->nContent.GetIndex() - nStt);
+ nStt, pEnd->GetContentIndex() - nStt);
aStr = rCC.lowercase( aStr );
@@ -573,7 +573,7 @@ OUString SwEditShell::Calculate()
{
GetDoc()->getIDocumentFieldsAccess().FieldsToCalc( aCalc,
pStart->GetNodeIndex(),
- pStart->nContent.GetIndex() );
+ pStart->GetContentIndex() );
bValidFields = true;
}
aFormel.append("(" + aCalc.GetStrResult( aCalc.VarLook( sVar )->nValue ) + ")");
@@ -963,7 +963,7 @@ OUString SwEditShell::DeleteExtTextInput( bool bInsText )
{
const SwPosition& rPos = *GetCursor()->GetPoint();
SwExtTextInput* pDel = GetDoc()->GetExtTextInput( rPos.GetNode(),
- rPos.nContent.GetIndex() );
+ rPos.GetContentIndex() );
if( !pDel )
{
//JP 25.10.2001: under UNIX the cursor is moved before the Input-
@@ -1009,23 +1009,23 @@ void SwEditShell::SetExtTextInputData( const CommandExtTextInputData& rData )
pInput->SetInputData( rData );
// position cursor
const SwPosition& rStt = *pInput->Start();
- const sal_Int32 nNewCursorPos = rStt.nContent.GetIndex() + rData.GetCursorPos();
+ const sal_Int32 nNewCursorPos = rStt.GetContentIndex() + rData.GetCursorPos();
// ugly but works
ShowCursor();
- const sal_Int32 nDiff = nNewCursorPos - rPos.nContent.GetIndex();
+ const sal_Int32 nDiff = nNewCursorPos - rPos.GetContentIndex();
if( nDiff != 0)
{
bool bLeft = nDiff < 0;
sal_Int32 nMaxGuard = std::abs(nDiff);
while (true)
{
- auto nOldPos = pCurrentCursor->GetPoint()->nContent.GetIndex();
+ auto nOldPos = pCurrentCursor->GetPoint()->GetContentIndex();
if (bLeft)
Left(1, SwCursorSkipMode::Chars);
else
Right(1, SwCursorSkipMode::Chars);
- auto nNewPos = pCurrentCursor->GetPoint()->nContent.GetIndex();
+ auto nNewPos = pCurrentCursor->GetPoint()->GetContentIndex();
// expected success
if (nNewPos == nNewCursorPos)
diff --git a/sw/source/core/edit/edlingu.cxx b/sw/source/core/edit/edlingu.cxx
index fdd1cdec9d1c..33d7d26d7bd1 100644
--- a/sw/source/core/edit/edlingu.cxx
+++ b/sw/source/core/edit/edlingu.cxx
@@ -536,8 +536,8 @@ void SwHyphIter::Ignore()
void SwHyphIter::DelSoftHyph( SwPaM &rPam )
{
const SwPosition* pStt = rPam.Start();
- const sal_Int32 nStart = pStt->nContent.GetIndex();
- const sal_Int32 nEnd = rPam.End()->nContent.GetIndex();
+ const sal_Int32 nStart = pStt->GetContentIndex();
+ const sal_Int32 nEnd = rPam.End()->GetContentIndex();
SwTextNode *pNode = pStt->GetNode().GetTextNode();
pNode->DelSoftHyph( nStart, nEnd );
}
@@ -552,8 +552,8 @@ void SwHyphIter::InsertSoftHyph( const sal_Int32 nHyphPos )
SwPaM *pCursor = pMySh->GetCursor();
auto [pSttPos, pEndPos] = pCursor->StartEnd(); // SwPosition*
- const sal_Int32 nLastHyphLen = GetEnd()->nContent.GetIndex() -
- pSttPos->nContent.GetIndex();
+ const sal_Int32 nLastHyphLen = GetEnd()->GetContentIndex() -
+ pSttPos->GetContentIndex();
if( pSttPos->nNode != pEndPos->nNode || !nLastHyphLen )
{
@@ -842,11 +842,11 @@ void SwEditShell::HandleCorrectionError(const OUString& aText, SwPosition aPos,
Push();
LeftMargin();
const sal_Int32 nLineStart = &rNode == &GetCursor()->GetPoint()->GetNode()
- ? GetCursor()->GetPoint()->nContent.GetIndex()
+ ? GetCursor()->GetPoint()->GetContentIndex()
: 0;
RightMargin();
const sal_Int32 nLineEnd = &rNode == &GetCursor()->GetPoint()->GetNode()
- ? GetCursor()->GetPoint()->nContent.GetIndex()
+ ? GetCursor()->GetPoint()->GetContentIndex()
: rNode.GetTextNode()->Len();
Pop(PopMode::DeleteCurrent);
@@ -925,7 +925,7 @@ uno::Reference< XSpellAlternatives >
pWrong = pNode->GetWrong();
if (nullptr != pWrong && !pNode->IsInProtectSect())
{
- sal_Int32 nBegin = aPos.nContent.GetIndex();
+ sal_Int32 nBegin = aPos.GetContentIndex();
sal_Int32 nLen = 1;
if (pWrong->InWrongWord(nBegin, nLen) && !pNode->IsSymbolAt(nBegin))
{
@@ -996,7 +996,7 @@ bool SwEditShell::GetGrammarCorrection(
pWrong = pNode->GetGrammarCheck();
if (nullptr != pWrong && !pNode->IsInProtectSect())
{
- sal_Int32 nBegin = aPos.nContent.GetIndex();
+ sal_Int32 nBegin = aPos.GetContentIndex();
sal_Int32 nLen = 1;
if (pWrong->InWrongWord(nBegin, nLen))
{
@@ -1251,7 +1251,7 @@ static SpellContentPositions lcl_CollectDeletedRedlines(SwEditShell const * pSh)
const SwTextNode* pTextNode = pCursor->GetNode().GetTextNode();
SwRedlineTable::size_type nAct = pDoc->getIDocumentRedlineAccess().GetRedlinePos( *pTextNode, RedlineType::Any );
- const sal_Int32 nStartIndex = pStartPos->nContent.GetIndex();
+ const sal_Int32 nStartIndex = pStartPos->GetContentIndex();
for ( ; nAct < pDoc->getIDocumentRedlineAccess().GetRedlineTable().size(); nAct++ )
{
const SwRangeRedline* pRed = pDoc->getIDocumentRedlineAccess().GetRedlineTable()[ nAct ];
@@ -1285,7 +1285,7 @@ static void lcl_CutRedlines( SpellContentPositions& aDeletedRedlines, SwEditShel
{
SwPaM *pCursor = pSh->GetCursor();
const SwPosition* pEndPos = pCursor->End();
- const sal_Int32 nEnd = pEndPos->nContent.GetIndex();
+ const sal_Int32 nEnd = pEndPos->GetContentIndex();
while(!aDeletedRedlines.empty() &&
aDeletedRedlines.back().nLeft > nEnd)
{
@@ -1415,7 +1415,7 @@ bool SwSpellIter::SpellSentence(svx::SpellPortions& rPortions, bool bIsGrammarCh
// remove trailing space
if( aExpandText[nSentenceEnd - 1] == ' ' )
--nSentenceEnd;
- if( pCursor->End()->nContent.GetIndex() < nSentenceEnd )
+ if( pCursor->End()->GetContentIndex() < nSentenceEnd )
{
pCursor->End()->nContent.Assign(
pCursor->End()->GetNode().GetContentNode(), nSentenceEnd);
@@ -1566,8 +1566,8 @@ void SwSpellIter::CreatePortion(uno::Reference< XSpellAlternatives > const & xAl
aPortion.xAlternatives = xAlt;
SpellContentPosition aPosition;
SwPaM *pCursor = GetSh()->GetCursor();
- aPosition.nLeft = pCursor->Start()->nContent.GetIndex();
- aPosition.nRight = pCursor->End()->nContent.GetIndex();
+ aPosition.nLeft = pCursor->Start()->GetContentIndex();
+ aPosition.nRight = pCursor->End()->GetContentIndex();
m_aLastPortions.push_back(aPortion);
m_aLastPositions.push_back(aPosition);
}
@@ -1600,18 +1600,18 @@ void SwSpellIter::AddPortion(uno::Reference< XSpellAlternatives > const & xAl
SwTextNode* pTextNode = pCursor->GetNode().GetTextNode();
LanguageType eStartLanguage = lcl_GetLanguage(*GetSh());
SpellContentPosition aNextRedline = lcl_FindNextDeletedRedline(
- rDeletedRedlines, aStart.nContent.GetIndex() );
- if( aNextRedline.nLeft == aStart.nContent.GetIndex() )
+ rDeletedRedlines, aStart.GetContentIndex() );
+ if( aNextRedline.nLeft == aStart.GetContentIndex() )
{
// select until the end of the current redline
- const sal_Int32 nEnd = aEnd.nContent.GetIndex() < aNextRedline.nRight ?
- aEnd.nContent.GetIndex() : aNextRedline.nRight;
+ const sal_Int32 nEnd = aEnd.GetContentIndex() < aNextRedline.nRight ?
+ aEnd.GetContentIndex() : aNextRedline.nRight;
pCursor->GetPoint()->nContent.Assign( pTextNode, nEnd );
CreatePortion(xAlt, pGrammarResult, false, true);
aStart = *pCursor->End();
// search for next redline
aNextRedline = lcl_FindNextDeletedRedline(
- rDeletedRedlines, aStart.nContent.GetIndex() );
+ rDeletedRedlines, aStart.GetContentIndex() );
}
while(*pCursor->GetPoint() < aEnd)
{
@@ -1622,11 +1622,11 @@ void SwSpellIter::AddPortion(uno::Reference< XSpellAlternatives > const & xAl
bool bField = false;
// read the character at the current position to check if it's a field
sal_Unicode const cChar =
- pTextNode->GetText()[pCursor->GetMark()->nContent.GetIndex()];
+ pTextNode->GetText()[pCursor->GetMark()->GetContentIndex()];
if( CH_TXTATR_BREAKWORD == cChar || CH_TXTATR_INWORD == cChar)
{
const SwTextAttr* pTextAttr = pTextNode->GetTextAttrForCharAt(
- pCursor->GetMark()->nContent.GetIndex() );
+ pCursor->GetMark()->GetContentIndex() );
const sal_uInt16 nWhich = pTextAttr
? pTextAttr->Which()
: RES_TXTATR_END;
@@ -1647,7 +1647,7 @@ void SwSpellIter::AddPortion(uno::Reference< XSpellAlternatives > const & xAl
}
LanguageType eCurLanguage = lcl_GetLanguage(*GetSh());
- bool bRedline = aNextRedline.nLeft == pCursor->GetPoint()->nContent.GetIndex();
+ bool bRedline = aNextRedline.nLeft == pCursor->GetPoint()->GetContentIndex();
// create a portion if the next character
// - is a field,
// - is at the beginning of a deleted redline
@@ -1681,14 +1681,14 @@ void SwSpellIter::AddPortion(uno::Reference< XSpellAlternatives > const & xAl
{
*pCursor->GetMark() = *pCursor->GetPoint();
// select until the end of the current redline
- const sal_Int32 nEnd = aEnd.nContent.GetIndex() < aNextRedline.nRight ?
- aEnd.nContent.GetIndex() : aNextRedline.nRight;
+ const sal_Int32 nEnd = aEnd.GetContentIndex() < aNextRedline.nRight ?
+ aEnd.GetContentIndex() : aNextRedline.nRight;
pCursor->GetPoint()->nContent.Assign( pTextNode, nEnd );
CreatePortion(xAlt, pGrammarResult, false, true);
aStart = *pCursor->End();
// search for next redline
aNextRedline = lcl_FindNextDeletedRedline(
- rDeletedRedlines, aStart.nContent.GetIndex() );
+ rDeletedRedlines, aStart.GetContentIndex() );
}
*pCursor->GetMark() = *pCursor->GetPoint();
}
@@ -1704,14 +1704,14 @@ void SwEditShell::IgnoreGrammarErrorAt( SwPaM& rErrorPosition )
SwWrongList *pWrong;
SwNodeIndex aIdx = rErrorPosition.Start()->nNode;
SwNodeIndex aEndIdx = rErrorPosition.Start()->nNode;
- sal_Int32 nStart = rErrorPosition.Start()->nContent.GetIndex();
+ sal_Int32 nStart = rErrorPosition.Start()->GetContentIndex();
sal_Int32 nEnd = COMPLETE_STRING;
while( aIdx <= aEndIdx )
{
pNode = aIdx.GetNode().GetTextNode();
if( pNode ) {
if( aIdx == aEndIdx )
- nEnd = rErrorPosition.End()->nContent.GetIndex();
+ nEnd = rErrorPosition.End()->GetContentIndex();
pWrong = pNode->GetGrammarCheck();
if( pWrong )
pWrong->RemoveEntry( nStart, nEnd );
diff --git a/sw/source/core/edit/edsect.cxx b/sw/source/core/edit/edsect.cxx
index 8ab055dac291..d8c1965b3a54 100644
--- a/sw/source/core/edit/edsect.cxx
+++ b/sw/source/core/edit/edsect.cxx
@@ -252,9 +252,9 @@ sal_uInt16 SwEditShell::GetFullSelectedSectionCount() const
auto [pStt, pEnd] = rPaM.StartEnd(); // SwPosition*
const SwContentNode* pCNd;
// check the selection, if Start at Node begin and End at Node end
- if( pStt->nContent.GetIndex() ||
+ if( pStt->GetContentIndex() ||
( nullptr == ( pCNd = pEnd->GetNode().GetContentNode() )) ||
- pCNd->Len() != pEnd->nContent.GetIndex() )
+ pCNd->Len() != pEnd->GetContentIndex() )
{
nRet = 0;
break;
@@ -346,7 +346,7 @@ static const SwNode* lcl_SpecialInsertNode(const SwPosition* pCurrentPos)
// - there are only start nodes between the current and pInnermostNode
SwNodeIndex aBegin( pCurrentPos->nNode );
if( rCurrentNode.IsContentNode() &&
- (pCurrentPos->nContent.GetIndex() == 0))
+ (pCurrentPos->GetContentIndex() == 0))
--aBegin;
while( (aBegin != pInnermostNode->GetIndex()) &&
aBegin.GetNode().IsStartNode() )
@@ -359,7 +359,7 @@ static const SwNode* lcl_SpecialInsertNode(const SwPosition* pCurrentPos)
// pInnermostNode's end node
SwNodeIndex aEnd( pCurrentPos->nNode );
if( rCurrentNode.IsContentNode() &&
- ( pCurrentPos->nContent.GetIndex() ==
+ ( pCurrentPos->GetContentIndex() ==
rCurrentNode.GetContentNode()->Len() ) )
++aEnd;
while( (aEnd != pInnermostNode->EndOfSectionNode()->GetIndex()) &&
diff --git a/sw/source/core/edit/edtab.cxx b/sw/source/core/edit/edtab.cxx
index 9e630b8b3374..0fa31a2425a0 100644
--- a/sw/source/core/edit/edtab.cxx
+++ b/sw/source/core/edit/edtab.cxx
@@ -105,7 +105,7 @@ const SwTable& SwEditShell::InsertTable( const SwInsertTableOptions& rInsTableOp
StartAllAction();
SwPosition* pPos = GetCursor()->GetPoint();
- bool bEndUndo = 0 != pPos->nContent.GetIndex();
+ bool bEndUndo = 0 != pPos->GetContentIndex();
if( bEndUndo )
{
StartUndo( SwUndoId::START );
@@ -231,7 +231,7 @@ void SwEditShell::InsertDDETable( const SwInsertTableOptions& rInsTableOpts,
StartAllAction();
- bool bEndUndo = 0 != pPos->nContent.GetIndex();
+ bool bEndUndo = 0 != pPos->GetContentIndex();
if( bEndUndo )
{
StartUndo( SwUndoId::START );
diff --git a/sw/source/core/fields/postithelper.cxx b/sw/source/core/fields/postithelper.cxx
index 7fbdeb96e543..558b65fcbcbb 100644
--- a/sw/source/core/fields/postithelper.cxx
+++ b/sw/source/core/fields/postithelper.cxx
@@ -79,7 +79,7 @@ bool AnnotationMarkCoversCommentAnchor(const sw::mark::IMark* pAnnotationMark,
return false;
}
- return rMarkEnd.nContent.GetIndex() == rMarkStart.nContent.GetIndex() + 1;
+ return rMarkEnd.GetContentIndex() == rMarkStart.GetContentIndex() + 1;
}
/**
@@ -170,7 +170,7 @@ SwPostItHelper::SwLayoutStatus SwPostItHelper::getLayoutInfos(
{
const SwPosition& rAnnotationStartPos = pAnnotationMark->GetMarkStart();
o_rInfo.mnStartNodeIdx = rAnnotationStartPos.GetNodeIndex();
- o_rInfo.mnStartContent = rAnnotationStartPos.nContent.GetIndex();
+ o_rInfo.mnStartContent = rAnnotationStartPos.GetContentIndex();
}
else
{
@@ -215,7 +215,7 @@ SwPostItHelper::SwLayoutStatus SwPostItHelper::getLayoutInfos(
}
}
- return ( (aRet==VISIBLE) && SwScriptInfo::IsInHiddenRange( *pTextNode , rAnchorPos.nContent.GetIndex()) )
+ return ( (aRet==VISIBLE) && SwScriptInfo::IsInHiddenRange( *pTextNode , rAnchorPos.GetContentIndex()) )
? HIDDEN
: aRet;
}
diff --git a/sw/source/core/fields/reffld.cxx b/sw/source/core/fields/reffld.cxx
index 1862e23d831d..6bedbdcbd79a 100644
--- a/sw/source/core/fields/reffld.cxx
+++ b/sw/source/core/fields/reffld.cxx
@@ -1230,7 +1230,7 @@ SwTextNode* SwGetRefFieldType::FindAnchor( SwDoc* pDoc, const OUString& rRefMark
const SwPosition* pPos = &pBkmk->GetMarkStart();
pTextNd = pPos->GetNode().GetTextNode();
- *pStt = pPos->nContent.GetIndex();
+ *pStt = pPos->GetContentIndex();
if(pEnd)
{
if(!pBkmk->IsExpanded())
@@ -1245,7 +1245,7 @@ SwTextNode* SwGetRefFieldType::FindAnchor( SwDoc* pDoc, const OUString& rRefMark
}
}
else if(pBkmk->GetOtherMarkPos().nNode == pBkmk->GetMarkPos().nNode)
- *pEnd = pBkmk->GetMarkEnd().nContent.GetIndex();
+ *pEnd = pBkmk->GetMarkEnd().GetContentIndex();
else
*pEnd = -1;
}
diff --git a/sw/source/core/frmedt/fefly1.cxx b/sw/source/core/frmedt/fefly1.cxx
index 199b7d3c6e0d..ef7ca3971195 100644
--- a/sw/source/core/frmedt/fefly1.cxx
+++ b/sw/source/core/frmedt/fefly1.cxx
@@ -907,8 +907,8 @@ void SwFEShell::Insert( const OUString& rGrfName, const OUString& rFltName,
if ( IsRedlineOn() )
{
SwPosition aPos(*pFormat->GetAnchor().GetContentAnchor());
- SwPaM aPaM(aPos.GetNode(), aPos.nContent.GetIndex(),
- aPos.GetNode(), aPos.nContent.GetIndex() + 1);
+ SwPaM aPaM(aPos.GetNode(), aPos.GetContentIndex(),
+ aPos.GetNode(), aPos.GetContentIndex() + 1);
GetDoc()->getIDocumentRedlineAccess().AppendRedline(
new SwRangeRedline( RedlineType::Insert, aPaM ), true);
}
diff --git a/sw/source/core/frmedt/feshview.cxx b/sw/source/core/frmedt/feshview.cxx
index 64f084814cbf..735a32536773 100644
--- a/sw/source/core/frmedt/feshview.cxx
+++ b/sw/source/core/frmedt/feshview.cxx
@@ -2181,7 +2181,7 @@ bool SwFEShell::ImpEndCreate()
SwTextNode *pNd = aAnch.GetContentAnchor()->GetNode().GetTextNode();
SwFormatFlyCnt aFormat( pFormat );
pNd->InsertItem(aFormat,
- aAnch.GetContentAnchor()->nContent.GetIndex(), 0 );
+ aAnch.GetContentAnchor()->GetContentIndex(), 0 );
SwFormatVertOrient aVertical( pFormat->GetVertOrient() );
aVertical.SetVertOrient( text::VertOrientation::LINE_CENTER );
pFormat->SetFormatAttr( aVertical );
diff --git a/sw/source/core/frmedt/fetab.cxx b/sw/source/core/frmedt/fetab.cxx
index 5654189976d4..5dda0abfef25 100644
--- a/sw/source/core/frmedt/fetab.cxx
+++ b/sw/source/core/frmedt/fetab.cxx
@@ -952,7 +952,7 @@ bool SwFEShell::HasBoxSelection() const
SwNode* pNd;
if( pPam->GetPoint()->GetNodeIndex() -1 ==
( pNd = &pPam->GetNode())->StartOfSectionIndex() &&
- !pPam->GetPoint()->nContent.GetIndex() &&
+ !pPam->GetPoint()->GetContentIndex() &&
pPam->GetMark()->GetNodeIndex() + 1 ==
pNd->EndOfSectionIndex())
{
diff --git a/sw/source/core/frmedt/fews.cxx b/sw/source/core/frmedt/fews.cxx
index 4775e47f240b..548ef83c243e 100644
--- a/sw/source/core/frmedt/fews.cxx
+++ b/sw/source/core/frmedt/fews.cxx
@@ -557,7 +557,7 @@ bool SwFEShell::Sort(const SwSortOptions& rOpt)
SwNodeIndex aPrevIdx( pStart->nNode, -1 );
SwNodeOffset nOffset = pEnd->GetNodeIndex() - pStart->GetNodeIndex();
- const sal_Int32 nCntStt = pStart->nContent.GetIndex();
+ const sal_Int32 nCntStt = pStart->GetContentIndex();
// Sorting
bRet = mxDoc->SortText(*pPam, rOpt);
diff --git a/sw/source/core/layout/atrfrm.cxx b/sw/source/core/layout/atrfrm.cxx
index 01d3e61b0bff..adb20c76b244 100644
--- a/sw/source/core/layout/atrfrm.cxx
+++ b/sw/source/core/layout/atrfrm.cxx
@@ -3401,7 +3401,7 @@ void SwHandleAnchorNodeChg::ImplDestroy()
return;
}
- const SwTextField* pField = pTextNode->GetFieldTextAttrAt(mpCommentAnchor->nContent.GetIndex());
+ const SwTextField* pField = pTextNode->GetFieldTextAttrAt(mpCommentAnchor->GetContentIndex());
if (!pField || pField->GetFormatField().GetField()->GetTyp()->Which() != SwFieldIds::Postit)
{
return;
diff --git a/sw/source/core/layout/flycnt.cxx b/sw/source/core/layout/flycnt.cxx
index 48e0fbd5764b..fc6eb8e8ba45 100644
--- a/sw/source/core/layout/flycnt.cxx
+++ b/sw/source/core/layout/flycnt.cxx
@@ -1390,7 +1390,7 @@ void SwFlyAtContentFrame::SetAbsPos( const Point &rNew )
{
const SwTextAttr *const pTextInputField =
pos.GetNode().GetTextNode()->GetTextAttrAt(
- pos.nContent.GetIndex(), RES_TXTATR_INPUTFIELD, SwTextNode::PARENT );
+ pos.GetContentIndex(), RES_TXTATR_INPUTFIELD, SwTextNode::PARENT );
if (pTextInputField != nullptr)
{
pos.nContent = pTextInputField->GetStart();
diff --git a/sw/source/core/layout/frmtool.cxx b/sw/source/core/layout/frmtool.cxx
index 0e5bd7aac0a5..255b965d8ccc 100644
--- a/sw/source/core/layout/frmtool.cxx
+++ b/sw/source/core/layout/frmtool.cxx
@@ -1126,7 +1126,7 @@ static bool IsShown(SwNodeOffset const nIndex,
{
assert(iter->nStart != iter->nEnd); // TODO possible?
assert(iter->pNode->GetIndex() == nIndex);
- if (rAnchor.nContent.GetIndex() < iter->nStart)
+ if (rAnchor.GetContentIndex() < iter->nStart)
{
return false;
}
@@ -1144,7 +1144,7 @@ static bool IsShown(SwNodeOffset const nIndex,
// the interesting corner cases are on the edge of the extent!
// no need to check for > the last extent because those
// are never visible.
- if (rAnchor.nContent.GetIndex() <= iter->nEnd)
+ if (rAnchor.GetContentIndex() <= iter->nEnd)
{
if (iter->nStart == 0)
{
@@ -1187,7 +1187,7 @@ static bool IsShown(SwNodeOffset const nIndex,
{
assert(rAnch.GetAnchorId() == RndStdIds::FLY_AS_CHAR);
// for AS_CHAR obviously must be <
- if (rAnchor.nContent.GetIndex() < iter->nEnd)
+ if (rAnchor.GetContentIndex() < iter->nEnd)
{
return true;
}
diff --git a/sw/source/core/layout/layact.cxx b/sw/source/core/layout/layact.cxx
index 6cdfcfce09ce..32fb5bfbc54f 100644
--- a/sw/source/core/layout/layact.cxx
+++ b/sw/source/core/layout/layact.cxx
@@ -2015,7 +2015,7 @@ bool SwLayIdle::DoIdleJob_( const SwContentFrame *pCnt, IdleJobType eJob )
if( !pCursor->HasMark() && !pCursor->IsMultiSelection() )
{
m_pContentNode = pCursor->GetContentNode();
- m_nTextPos = pCursor->GetPoint()->nContent.GetIndex();
+ m_nTextPos = pCursor->GetPoint()->GetContentIndex();
}
}
}
diff --git a/sw/source/core/layout/sortedobjs.cxx b/sw/source/core/layout/sortedobjs.cxx
index ad3759466b18..8be7d5e6dc75 100644
--- a/sw/source/core/layout/sortedobjs.cxx
+++ b/sw/source/core/layout/sortedobjs.cxx
@@ -137,9 +137,9 @@ struct ObjAnchorOrder
if (pContentAnchorListed && pContentAnchorNew)
{
sal_Int32 nListedIndex = pAnchorListed->GetAnchorId() != RndStdIds::FLY_AT_PARA ?
- pContentAnchorListed->nContent.GetIndex() : 0;
+ pContentAnchorListed->GetContentIndex() : 0;
sal_Int32 nNewIndex = pAnchorNew->GetAnchorId() != RndStdIds::FLY_AT_PARA ?
- pContentAnchorNew->nContent.GetIndex() : 0;
+ pContentAnchorNew->GetContentIndex() : 0;
if (nListedIndex != nNewIndex)
{
return nListedIndex < nNewIndex;
diff --git a/sw/source/core/layout/trvlfrm.cxx b/sw/source/core/layout/trvlfrm.cxx
index 07a231ad86b9..37e7b77dc775 100644
--- a/sw/source/core/layout/trvlfrm.cxx
+++ b/sw/source/core/layout/trvlfrm.cxx
@@ -251,7 +251,7 @@ bool SwPageFrame::GetModelPositionForViewPoint( SwPosition *pPos, Point &rPoint,
if (pContentNode && pContentNode->IsTextNode())
{
SwTextNode* pTextNd = pContentNode->GetTextNode();
- SwTextAttr* pTextAttr = pTextNd->GetTextAttrForCharAt(aTextPos.nContent.GetIndex(), RES_TXTATR_FIELD);
+ SwTextAttr* pTextAttr = pTextNd->GetTextAttrForCharAt(aTextPos.GetContentIndex(), RES_TXTATR_FIELD);
if (pTextAttr)
{
const SwField* pField = pTextAttr->GetFormatField().GetField();
@@ -2406,8 +2406,8 @@ void SwRootFrame::CalcFrameRects(SwShellCursor &rCursor)
// away (i.e. PostIts, RefMarks, TOXMarks), then at
// least set the width of the Cursor.
if( 1 == aRectFnSet.GetWidth(aTmp) &&
- pStartPos->nContent.GetIndex() !=
- pEndPos->nContent.GetIndex() )
+ pStartPos->GetContentIndex() !=
+ pEndPos->GetContentIndex() )
{
OutputDevice* pOut = pSh->GetOut();
tools::Long nCursorWidth = pOut->GetSettings().GetStyleSettings().
diff --git a/sw/source/core/table/swtable.cxx b/sw/source/core/table/swtable.cxx
index 5a905c56bf86..9386c3f31470 100644
--- a/sw/source/core/table/swtable.cxx
+++ b/sw/source/core/table/swtable.cxx
@@ -1657,7 +1657,7 @@ SwRedlineTable::size_type SwTableLine::UpdateTextChangesOnly(
{
bHasRedlineInBox = true;
// plain text before the first redline in the text
- if ( pRedline->Start()->nContent.GetIndex() > 0 )
+ if ( pRedline->Start()->GetContentIndex() > 0 )
bPlainTextInLine = true;
}
@@ -1701,7 +1701,7 @@ SwRedlineTable::size_type SwTableLine::UpdateTextChangesOnly(
// there is text content outside of redlines: not a deletion
if ( !bInsertion && ( !bHasRedlineInBox || ( pPreviousDeleteRedline &&
( pPreviousDeleteRedline->End()->nNode < aCellEnd.nNode ||
- pPreviousDeleteRedline->End()->nContent.GetIndex() <
+ pPreviousDeleteRedline->End()->GetContentIndex() <
aCellEnd.GetNode().GetContentNode()->Len() ) ) ) )
{
bPlainTextInLine = true;
diff --git a/sw/source/core/text/itratr.cxx b/sw/source/core/text/itratr.cxx
index 66d0ffa7c307..cd240b445637 100644
--- a/sw/source/core/text/itratr.cxx
+++ b/sw/source/core/text/itratr.cxx
@@ -479,7 +479,7 @@ static bool CanSkipOverRedline(
{
// check hint ends of hints that start before and end within
sal_Int32 const nRedlineEnd(&rStartNode == &pRLEnd->GetNode()
- ? pRLEnd->nContent.GetIndex()
+ ? pRLEnd->GetContentIndex()
: rStartNode.Len());
for ( ; nEndIndex < pStartHints->Count(); ++nEndIndex)
{
@@ -541,7 +541,7 @@ static bool CanSkipOverRedline(
}
}
assert(nEndIndex == pStartHints->Count() ||
- pRLEnd->nContent.GetIndex() < pStartHints->GetSortedByEnd(nEndIndex)->GetAnyEnd());
+ pRLEnd->GetContentIndex() < pStartHints->GetSortedByEnd(nEndIndex)->GetAnyEnd());
}
if (&rStartNode != &pRLEnd->GetNode())
@@ -577,7 +577,7 @@ static bool CanSkipOverRedline(
// of the 1st char after the redline; should not cause problems
// with consecutive delete redlines because those are handed by
// GetNextRedln() and here we have the last end pos.
- if (pRLEnd->nContent.GetIndex() < pAttr->GetStart())
+ if (pRLEnd->GetContentIndex() < pAttr->GetStart())
{
break;
}
@@ -588,7 +588,7 @@ static bool CanSkipOverRedline(
continue;
}
assert(nRedlineStart <= pAttr->GetStart()); // we wouldn't be here otherwise?
- if (*pAttr->End() <= pRLEnd->nContent.GetIndex())
+ if (*pAttr->End() <= pRLEnd->GetContentIndex())
{
continue;
}
@@ -641,7 +641,7 @@ static bool CanSkipOverRedline(
SwTextAttr *const pAttr(pEndHints->GetSortedByEnd(nEndIndex));
if (!pAttr->End())
continue;
- if (pRLEnd->nContent.GetIndex() < *pAttr->End())
+ if (pRLEnd->GetContentIndex() < *pAttr->End())
{
break;
}
@@ -755,11 +755,11 @@ TextFrameIndex SwAttrIter::GetNextAttr() const
if (&redline.second.first->End()->GetNode() != pTextNode)
{
pTextNode = redline.second.first->End()->GetNode().GetTextNode();
- nPosition = redline.second.first->End()->nContent.GetIndex();
+ nPosition = redline.second.first->End()->GetContentIndex();
}
else
{
- nPosition = redline.second.first->End()->nContent.GetIndex();
+ nPosition = redline.second.first->End()->GetContentIndex();
}
}
else
diff --git a/sw/source/core/text/itrform2.cxx b/sw/source/core/text/itrform2.cxx
index e86c8079c8d2..bee45a3a7497 100644
--- a/sw/source/core/text/itrform2.cxx
+++ b/sw/source/core/text/itrform2.cxx
@@ -980,7 +980,7 @@ SwTextPortion *SwTextFormatter::WhichTextPor( SwTextFormatInfo &rInf ) const
SwPaM aPam(aPosition);
uno::Reference<text::XTextContent> const xRet(
SwUnoCursorHelper::GetNestedTextContent(
- *aPam.GetNode().GetTextNode(), aPosition.nContent.GetIndex(), false) );
+ *aPam.GetNode().GetTextNode(), aPosition.GetContentIndex(), false) );
if (xRet.is())
{
const SwDoc & rDoc = rInf.GetTextFrame()->GetDoc();
diff --git a/sw/source/core/text/porlay.cxx b/sw/source/core/text/porlay.cxx
index a61ff4304902..5478c47157d4 100644
--- a/sw/source/core/text/porlay.cxx
+++ b/sw/source/core/text/porlay.cxx
@@ -919,10 +919,10 @@ static void InitBookmarks(
while (iter != end)
{
if (&rStart.GetNode() != iter->pNode // iter moved to next node
- || rStart.nContent.GetIndex() < iter->nStart)
+ || rStart.GetContentIndex() < iter->nStart)
{
if (rEnd.GetNodeIndex() < iter->pNode->GetIndex()
- || (&rEnd.GetNode() == iter->pNode && rEnd.nContent.GetIndex() <= iter->nStart))
+ || (&rEnd.GetNode() == iter->pNode && rEnd.GetContentIndex() <= iter->nStart))
{
break; // deleted - skip it
}
@@ -932,21 +932,21 @@ static void InitBookmarks(
break;
}
}
- else if (rStart.nContent.GetIndex() <= iter->nEnd)
+ else if (rStart.GetContentIndex() <= iter->nEnd)
{
auto const iterNext(iter + 1);
- if (rStart.nContent.GetIndex() == iter->nEnd
+ if (rStart.GetContentIndex() == iter->nEnd
&& (iterNext == end
? &rEnd.GetNode() == iter->pNode
: (rEnd.GetNodeIndex() < iterNext->pNode->GetIndex()
- || (&rEnd.GetNode() == iterNext->pNode && rEnd.nContent.GetIndex() < iterNext->nStart))))
+ || (&rEnd.GetNode() == iterNext->pNode && rEnd.GetContentIndex() < iterNext->nStart))))
{
break; // deleted - skip it
}
else
{
o_rBookmarks.emplace_back(
- nOffset + TextFrameIndex(rStart.nContent.GetIndex() - iter->nStart),
+ nOffset + TextFrameIndex(rStart.GetContentIndex() - iter->nStart),
it.second);
break;
}
@@ -979,16 +979,16 @@ static void InitBookmarks(
{
if (iter == end
|| &rEnd.GetNode() != iter->pNode // iter moved to next node
- || rEnd.nContent.GetIndex() <= iter->nStart)
+ || rEnd.GetContentIndex() <= iter->nStart)
{
SwPosition const& rStart(it.first->GetMarkStart());
// oPrevIter may point to pNode or a preceding node
if (oPrevIter
? ((*oPrevIter)->pNode->GetIndex() < rStart.GetNodeIndex()
|| ((*oPrevIter)->pNode == &rStart.GetNode()
- && ((iter != end && &rEnd.GetNode() == iter->pNode && rEnd.nContent.GetIndex() == iter->nStart)
- ? (*oPrevIter)->nEnd < rStart.nContent.GetIndex()
- : (*oPrevIter)->nEnd <= rStart.nContent.GetIndex())))
+ && ((iter != end && &rEnd.GetNode() == iter->pNode && rEnd.GetContentIndex() == iter->nStart)
+ ? (*oPrevIter)->nEnd < rStart.GetContentIndex()
+ : (*oPrevIter)->nEnd <= rStart.GetContentIndex())))
: rStart.nNode == rEnd.nNode)
{
break; // deleted - skip it
@@ -999,10 +999,10 @@ static void InitBookmarks(
break;
}
}
- else if (rEnd.nContent.GetIndex() <= iter->nEnd)
+ else if (rEnd.GetContentIndex() <= iter->nEnd)
{
o_rBookmarks.emplace_back(
- nOffset + TextFrameIndex(rEnd.nContent.GetIndex() - iter->nStart),
+ nOffset + TextFrameIndex(rEnd.GetContentIndex() - iter->nStart),
it.second);
break;
}
@@ -1022,21 +1022,21 @@ static void InitBookmarks(
while (iter != end)
{
if (&rPos.GetNode() != iter->pNode // iter moved to next node
- || rPos.nContent.GetIndex() < iter->nStart)
+ || rPos.GetContentIndex() < iter->nStart)
{
break; // deleted - skip it
}
- else if (rPos.nContent.GetIndex() <= iter->nEnd)
+ else if (rPos.GetContentIndex() <= iter->nEnd)
{
- if (rPos.nContent.GetIndex() == iter->nEnd
- && rPos.nContent.GetIndex() != iter->pNode->Len())
+ if (rPos.GetContentIndex() == iter->nEnd
+ && rPos.GetContentIndex() != iter->pNode->Len())
{
break; // deleted - skip it
}
else
{
o_rBookmarks.emplace_back(
- nOffset + TextFrameIndex(rPos.nContent.GetIndex() - iter->nStart),
+ nOffset + TextFrameIndex(rPos.GetContentIndex() - iter->nStart),
it.second);
}
break;
@@ -1173,13 +1173,13 @@ void SwScriptInfo::InitScriptInfo(const SwTextNode& rNode,
switch (it.second)
{
case MarkKind::Start:
- m_Bookmarks.emplace_back(TextFrameIndex(it.first->GetMarkStart().nContent.GetIndex()), it.second);
+ m_Bookmarks.emplace_back(TextFrameIndex(it.first->GetMarkStart().GetContentIndex()), it.second);
break;
case MarkKind::End:
- m_Bookmarks.emplace_back(TextFrameIndex(it.first->GetMarkEnd().nContent.GetIndex()), it.second);
+ m_Bookmarks.emplace_back(TextFrameIndex(it.first->GetMarkEnd().GetContentIndex()), it.second);
break;
case MarkKind::Point:
- m_Bookmarks.emplace_back(TextFrameIndex(it.first->GetMarkPos().nContent.GetIndex()), it.second);
+ m_Bookmarks.emplace_back(TextFrameIndex(it.first->GetMarkPos().GetContentIndex()), it.second);
break;
}
}
@@ -2714,8 +2714,8 @@ void SwScriptInfo::selectHiddenTextProperty(const SwTextNode& rNode,
{
// intersect bookmark range with textnode range and add the intersection to rHiddenMulti
- const sal_Int32 nSt = pBookmark->GetMarkStart().nContent.GetIndex();
- const sal_Int32 nEnd = pBookmark->GetMarkEnd().nContent.GetIndex();
+ const sal_Int32 nSt = pBookmark->GetMarkStart().GetContentIndex();
+ const sal_Int32 nEnd = pBookmark->GetMarkEnd().GetContentIndex();
if( nEnd > nSt )
{
diff --git a/sw/source/core/text/redlnitr.cxx b/sw/source/core/text/redlnitr.cxx
index afe6ff7dd0a4..b26cf5f4bdcc 100644
--- a/sw/source/core/text/redlnitr.cxx
+++ b/sw/source/core/text/redlnitr.cxx
@@ -118,7 +118,7 @@ public:
}
if (pStart->GetNode().IsTableNode())
{
- assert(pEnd->nNode == m_Start.nNode && pEnd->nContent.GetIndex() == 0);
+ assert(pEnd->nNode == m_Start.nNode && pEnd->GetContentIndex() == 0);
continue; // known pathology, ignore it
}
if (*m_pEndPos <= *pStart)
@@ -138,7 +138,7 @@ public:
: CH_TXT_ATR_FIELDSEP);
SwTextNode* pTextNode = m_pEndPos->GetNode().GetTextNode();
sal_Int32 const nPos = pTextNode ? pTextNode->GetText().indexOf(
- magic, m_pEndPos->nContent.GetIndex()) : -1;
+ magic, m_pEndPos->GetContentIndex()) : -1;
if (nPos != -1)
{
m_oNextFieldmarkHide.emplace(*pTextNode, nPos);
@@ -230,8 +230,8 @@ CheckParaRedlineMerge(SwTextFrame & rFrame, SwTextNode & rTextNode,
assert(pNode != &rTextNode || &pStart->GetNode() == &rTextNode); // detect calls with wrong start node
if (pStart->nContent != nLastEnd) // not 0 so we eliminate adjacent deletes
{
- extents.emplace_back(pNode, nLastEnd, pStart->nContent.GetIndex());
- mergedText.append(pNode->GetText().subView(nLastEnd, pStart->nContent.GetIndex() - nLastEnd));
+ extents.emplace_back(pNode, nLastEnd, pStart->GetContentIndex());
+ mergedText.append(pNode->GetText().subView(nLastEnd, pStart->GetContentIndex() - nLastEnd));
}
if (&pEnd->GetNode() != pNode)
{
@@ -287,12 +287,12 @@ CheckParaRedlineMerge(SwTextFrame & rFrame, SwTextNode & rTextNode,
pNode = pEnd->GetNode().GetTextNode();
nodes.push_back(pNode);
pNode->SetRedlineMergeFlag(SwNode::Merge::NonFirst);
- nLastEnd = pEnd->nContent.GetIndex();
+ nLastEnd = pEnd->GetContentIndex();
}
}
else
{
- nLastEnd = pEnd->nContent.GetIndex();
+ nLastEnd = pEnd->GetContentIndex();
}
}
if (pNode == &rTextNode)
@@ -655,7 +655,7 @@ SwRedlineItr::SwRedlineItr( const SwTextNode& rTextNd, SwFont& rFnt,
{
assert(pExtInputStart);
m_pExt.reset( new SwExtend(*pArr, pExtInputStart->GetNodeIndex(),
- pExtInputStart->nContent.GetIndex()) );
+ pExtInputStart->GetContentIndex()) );
}
else
m_pExt = nullptr;
@@ -789,7 +789,7 @@ short SwRedlineItr::Seek(SwFont& rFnt,
if (pRedline->GetType() == RedlineType::Delete
&& (nNode < pStart->GetNodeIndex()
|| (nNode == pStart->GetNodeIndex()
- && nNew <= pStart->nContent.GetIndex())))
+ && nNew <= pStart->GetContentIndex())))
{
pRedline->CalcStartEnd(nNode, m_nStart, m_nEnd);
break;
diff --git a/sw/source/core/text/txtfrm.cxx b/sw/source/core/text/txtfrm.cxx
index 0a15401eb917..51586a297dfb 100644
--- a/sw/source/core/text/txtfrm.cxx
+++ b/sw/source/core/text/txtfrm.cxx
@@ -1270,7 +1270,7 @@ TextFrameIndex SwTextFrame::MapModelToView(SwTextNode const*const pNode, sal_Int
TextFrameIndex SwTextFrame::MapModelToViewPos(SwPosition const& rPos) const
{
SwTextNode const*const pNode(rPos.GetNode().GetTextNode());
- sal_Int32 const nIndex(rPos.nContent.GetIndex());
+ sal_Int32 const nIndex(rPos.GetContentIndex());
return MapModelToView(pNode, nIndex);
}
@@ -1504,7 +1504,7 @@ bool sw_HideObj( const SwTextFrame& _rFrame,
{
SwTextNode const& rNode(*rAnchorPos.GetNode().GetTextNode());
assert(FrameContainsNode(_rFrame, rNode.GetIndex()));
- sal_Int32 const nObjAnchorPos(rAnchorPos.nContent.GetIndex());
+ sal_Int32 const nObjAnchorPos(rAnchorPos.GetContentIndex());
const sal_Unicode cAnchorChar = nObjAnchorPos < rNode.Len()
? rNode.GetText()[nObjAnchorPos]
: 0;
@@ -1600,7 +1600,7 @@ void SwTextFrame::HideAndShowObjects()
const SwPosition& rAnchor = pContact->GetContentAnchor();
SwScriptInfo::GetBoundsOfHiddenRange(
*rAnchor.GetNode().GetTextNode(),
- rAnchor.nContent.GetIndex(), nHiddenStart, nHiddenEnd);
+ rAnchor.GetContentIndex(), nHiddenStart, nHiddenEnd);
// Under certain conditions
if ( nHiddenStart != COMPLETE_STRING && bShouldBeHidden &&
sw_HideObj(*this, eAnchorType, rAnchor, i))
diff --git a/sw/source/core/tox/txmsrt.cxx b/sw/source/core/tox/txmsrt.cxx
index 73d73d5e46e6..e197e18267f8 100644
--- a/sw/source/core/tox/txmsrt.cxx
+++ b/sw/source/core/tox/txmsrt.cxx
@@ -175,7 +175,7 @@ SwTOXSortTabBase::SwTOXSortTabBase( TOXSortType nTyp, const SwContentNode* pNd,
bool const bResult = GetBodyTextNode( rDoc, aPos, *pFrame );
OSL_ENSURE(bResult, "where is the text node");
nPos = aPos.GetNodeIndex();
- nCntPos = aPos.nContent.GetIndex();
+ nCntPos = aPos.GetContentIndex();
}
}
else
diff --git a/sw/source/core/txtnode/modeltoviewhelper.cxx b/sw/source/core/txtnode/modeltoviewhelper.cxx
index ed2b7bc8421a..aed37ce19174 100644
--- a/sw/source/core/txtnode/modeltoviewhelper.cxx
+++ b/sw/source/core/txtnode/modeltoviewhelper.cxx
@@ -120,7 +120,7 @@ ModelToViewHelper::ModelToViewHelper(const SwTextNode &rNode,
pFieldMark = rIDMA.getFieldmarkFor(*cursor.GetPoint());
if (pFieldMark == nullptr
|| pFieldMark->GetMarkStart().GetNode().GetTextNode()->GetText()[
- pFieldMark->GetMarkStart().nContent.GetIndex()]
+ pFieldMark->GetMarkStart().GetContentIndex()]
!= CH_TXT_ATR_FORMELEMENT)
{
break;
@@ -135,7 +135,7 @@ ModelToViewHelper::ModelToViewHelper(const SwTextNode &rNode,
{
break;
}
- assert(pFieldMark->GetMarkStart().GetNode().GetTextNode()->GetText()[pFieldMark->GetMarkStart().nContent.GetIndex()] != CH_TXT_ATR_FORMELEMENT);
+ assert(pFieldMark->GetMarkStart().GetNode().GetTextNode()->GetText()[pFieldMark->GetMarkStart().GetContentIndex()] != CH_TXT_ATR_FORMELEMENT);
// getFieldmarkFor may also return one that starts at rNode,0 -
// skip it, must be handled in loop below
if (pFieldMark->GetMarkStart().nNode < rNode)
@@ -316,7 +316,7 @@ ModelToViewHelper::ModelToViewHelper(const SwTextNode &rNode,
for (sw::mark::IFieldmark *const pMark : aNoTextFieldmarks)
{
- const sal_Int32 nDummyCharPos = pMark->GetMarkStart().nContent.GetIndex();
+ const sal_Int32 nDummyCharPos = pMark->GetMarkStart().GetContentIndex();
if (aHiddenMulti.IsSelected(nDummyCharPos))
continue;
std::vector<block>::iterator aFind = std::find_if(aBlocks.begin(), aBlocks.end(),
diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx
index 5a4c98f856f2..1dcd01bdd57c 100644
--- a/sw/source/core/txtnode/ndtxt.cxx
+++ b/sw/source/core/txtnode/ndtxt.cxx
@@ -418,7 +418,7 @@ SwTextNode *SwTextNode::SplitContentNode(const SwPosition & rPos,
bool parentIsOutline = IsOutline();
// create a node "in front" of me
- const sal_Int32 nSplitPos = rPos.nContent.GetIndex();
+ const sal_Int32 nSplitPos = rPos.GetContentIndex();
const sal_Int32 nTextLen = m_Text.getLength();
SwTextNode* const pNode =
MakeNewTextNode( rPos.nNode, false, nSplitPos==nTextLen );
@@ -1490,7 +1490,7 @@ void SwTextNode::Update(
{
const SwPosition* pStart = &pMark->GetMarkStart();
if ( this == &pStart->GetNode()
- && rPos.GetIndex() == pStart->nContent.GetIndex() )
+ && rPos.GetIndex() == pStart->GetContentIndex() )
{
bAtLeastOneExpandedBookmarkAtInsertionPosition = true;
}
@@ -1595,7 +1595,7 @@ void SwTextNode::Update(
if (this == &pRedln->End()->GetNode() && *pRedln->GetPoint() != *pRedln->GetMark())
{
// Redline is changed only when some change occurs before it
- if (nChangePos <= pRedln->Start()->nContent.GetIndex())
+ if (nChangePos <= pRedln->Start()->GetContentIndex())
{
SwRedlineTable::LOKRedlineNotification(RedlineNotification::Modify, pRedln);
}
@@ -3685,15 +3685,15 @@ OUString SwTextNode::GetRedlineText() const
{
// deleted from 0 to nContent
aRedlArr.push_back( 0 );
- aRedlArr.push_back( pREnd->nContent.GetIndex() );
+ aRedlArr.push_back( pREnd->GetContentIndex() );
}
}
else if( pRStt->nNode == nNdIdx )
{
- //aRedlArr.Insert( pRStt->nContent.GetIndex(), aRedlArr.Count() );
- aRedlArr.push_back( pRStt->nContent.GetIndex() );
+ //aRedlArr.Insert( pRStt->GetContentIndex(), aRedlArr.Count() );
+ aRedlArr.push_back( pRStt->GetContentIndex() );
if( pREnd->nNode == nNdIdx )
- aRedlArr.push_back( pREnd->nContent.GetIndex() );
+ aRedlArr.push_back( pREnd->GetContentIndex() );
else
{
aRedlArr.push_back(GetText().getLength());
diff --git a/sw/source/core/txtnode/txtedt.cxx b/sw/source/core/txtnode/txtedt.cxx
index 0d0f388abc37..447cd77a30d2 100644
--- a/sw/source/core/txtnode/txtedt.cxx
+++ b/sw/source/core/txtnode/txtedt.cxx
@@ -678,7 +678,7 @@ OUString SwTextFrame::GetCurWord(SwPosition const& rPos) const
assert(g_pBreakIt && g_pBreakIt->GetBreakIter().is());
const uno::Reference< XBreakIterator > &rxBreak = g_pBreakIt->GetBreakIter();
sal_Int16 nWordType = WordType::DICTIONARY_WORD;
- lang::Locale aLocale( g_pBreakIt->GetLocale(pTextNode->GetLang(rPos.nContent.GetIndex())) );
+ lang::Locale aLocale( g_pBreakIt->GetLocale(pTextNode->GetLang(rPos.GetContentIndex())) );
Boundary aBndry =
rxBreak->getWordBoundary(rText, sal_Int32(nPos), aLocale, nWordType, true);
diff --git a/sw/source/core/undo/SwUndoField.cxx b/sw/source/core/undo/SwUndoField.cxx
index 665a4b7272ed..1f7e3cb0df14 100644
--- a/sw/source/core/undo/SwUndoField.cxx
+++ b/sw/source/core/undo/SwUndoField.cxx
@@ -36,7 +36,7 @@ SwUndoField::SwUndoField(const SwPosition & rPos )
: SwUndo(SwUndoId::FIELD, &rPos.GetDoc())
{
m_nNodeIndex = rPos.GetNodeIndex();
- m_nOffset = rPos.nContent.GetIndex();
+ m_nOffset = rPos.GetContentIndex();
m_pDoc = &rPos.GetDoc();
}
diff --git a/sw/source/core/undo/rolbck.cxx b/sw/source/core/undo/rolbck.cxx
index 64c23dc43c25..60713e18f8de 100644
--- a/sw/source/core/undo/rolbck.cxx
+++ b/sw/source/core/undo/rolbck.cxx
@@ -613,9 +613,9 @@ SwHistoryBookmark::SwHistoryBookmark(
, m_nOtherNode(bSaveOtherPos ?
rBkmk.GetOtherMarkPos().GetNodeIndex() : SwNodeOffset(0))
, m_nContent(bSavePos ?
- rBkmk.GetMarkPos().nContent.GetIndex() : 0)
+ rBkmk.GetMarkPos().GetContentIndex() : 0)
, m_nOtherContent(bSaveOtherPos ?
- rBkmk.GetOtherMarkPos().nContent.GetIndex() :0)
+ rBkmk.GetOtherMarkPos().GetContentIndex() :0)
, m_bSavePos(bSavePos)
, m_bSaveOtherPos(bSaveOtherPos)
, m_bHadOtherPos(rBkmk.IsExpanded())
@@ -722,7 +722,7 @@ void SwHistoryBookmark::SetInDoc( SwDoc* pDoc, bool )
bool SwHistoryBookmark::IsEqualBookmark(const ::sw::mark::IMark& rBkmk)
{
return m_nNode == rBkmk.GetMarkPos().GetNodeIndex()
- && m_nContent == rBkmk.GetMarkPos().nContent.GetIndex()
+ && m_nContent == rBkmk.GetMarkPos().GetContentIndex()
&& m_aName == rBkmk.GetName();
}
@@ -730,7 +730,7 @@ SwHistoryNoTextFieldmark::SwHistoryNoTextFieldmark(const ::sw::mark::IFieldmark&
: SwHistoryHint(HSTRY_NOTEXTFIELDMARK)
, m_sType(rFieldMark.GetFieldname())
, m_nNode(rFieldMark.GetMarkStart().GetNodeIndex())
- , m_nContent(rFieldMark.GetMarkStart().nContent.GetIndex())
+ , m_nContent(rFieldMark.GetMarkStart().GetContentIndex())
{
}
@@ -775,13 +775,13 @@ SwHistoryTextFieldmark::SwHistoryTextFieldmark(const ::sw::mark::IFieldmark& rFi
, m_sName(rFieldMark.GetName())
, m_sType(rFieldMark.GetFieldname())
, m_nStartNode(rFieldMark.GetMarkStart().GetNodeIndex())
- , m_nStartContent(rFieldMark.GetMarkStart().nContent.GetIndex())
+ , m_nStartContent(rFieldMark.GetMarkStart().GetContentIndex())
, m_nEndNode(rFieldMark.GetMarkEnd().GetNodeIndex())
- , m_nEndContent(rFieldMark.GetMarkEnd().nContent.GetIndex())
+ , m_nEndContent(rFieldMark.GetMarkEnd().GetContentIndex())
{
SwPosition const sepPos(sw::mark::FindFieldSep(rFieldMark));
m_nSepNode = sepPos.GetNodeIndex();
- m_nSepContent = sepPos.nContent.GetIndex();
+ m_nSepContent = sepPos.GetContentIndex();
}
void SwHistoryTextFieldmark::SetInDoc(SwDoc* pDoc, bool)
@@ -927,7 +927,7 @@ SwHistoryChangeFlyAnchor::SwHistoryChangeFlyAnchor( SwFrameFormat& rFormat )
, m_rFormat( rFormat )
, m_nOldNodeIndex( rFormat.GetAnchor().GetContentAnchor()->GetNodeIndex() )
, m_nOldContentIndex( (RndStdIds::FLY_AT_CHAR == rFormat.GetAnchor().GetAnchorId())
- ? rFormat.GetAnchor().GetContentAnchor()->nContent.GetIndex()
+ ? rFormat.GetAnchor().GetContentAnchor()->GetContentIndex()
: COMPLETE_STRING )
{
}
diff --git a/sw/source/core/undo/unattr.cxx b/sw/source/core/undo/unattr.cxx
index 59aae54f4062..e197c7c6f9bc 100644
--- a/sw/source/core/undo/unattr.cxx
+++ b/sw/source/core/undo/unattr.cxx
@@ -368,7 +368,7 @@ void SwUndoFormatAttr::SaveFlyAnchor( const SwFormat * pFormat, bool bSvDrwPt )
switch( rAnchor.GetAnchorId() ) {
case RndStdIds::FLY_AS_CHAR:
case RndStdIds::FLY_AT_CHAR:
- nContent = rAnchor.GetContentAnchor()->nContent.GetIndex();
+ nContent = rAnchor.GetContentAnchor()->GetContentIndex();
[[fallthrough]];
case RndStdIds::FLY_AT_PARA:
case RndStdIds::FLY_AT_FLY:
@@ -410,7 +410,7 @@ bool SwUndoFormatAttr::RestoreFlyAnchor(::sw::UndoRedoContext & rContext)
if ((RndStdIds::FLY_AS_CHAR == rAnchor.GetAnchorId()) ||
(RndStdIds::FLY_AT_CHAR == rAnchor.GetAnchorId())) {
aPos.nContent.Assign( static_cast<SwTextNode*>(pNd), rAnchor.GetPageNum() );
- if ( aPos.nContent.GetIndex() > pNd->GetTextNode()->GetText().getLength()) {
+ if ( aPos.GetContentIndex() > pNd->GetTextNode()->GetText().getLength()) {
// #i35443# - invalid position.
// Thus, anchor attribute not restored
return false;
@@ -447,7 +447,7 @@ bool SwUndoFormatAttr::RestoreFlyAnchor(::sw::UndoRedoContext & rContext)
const SwPosition *pPos = rOldAnch.GetContentAnchor();
SwTextNode *pTextNode = static_cast<SwTextNode*>(&pPos->GetNode());
OSL_ENSURE( pTextNode->HasHints(), "Missing FlyInCnt-Hint." );
- const sal_Int32 nIdx = pPos->nContent.GetIndex();
+ const sal_Int32 nIdx = pPos->GetContentIndex();
SwTextAttr * const pHint =
pTextNode->GetTextAttrForCharAt( nIdx, RES_TXTATR_FLYCNT );
assert(pHint && "Missing Hint.");
@@ -492,7 +492,7 @@ bool SwUndoFormatAttr::RestoreFlyAnchor(::sw::UndoRedoContext & rContext)
SwTextNode* pTextNd = pPos->GetNode().GetTextNode();
OSL_ENSURE( pTextNd, "no Text Node at position." );
SwFormatFlyCnt aFormat( pFrameFormat );
- pTextNd->InsertItem( aFormat, pPos->nContent.GetIndex(), 0 );
+ pTextNd->InsertItem( aFormat, pPos->GetContentIndex(), 0 );
}
if (RES_DRAWFRMFMT != pFrameFormat->Which())
@@ -553,7 +553,7 @@ SwUndoResetAttr::SwUndoResetAttr( const SwPosition& rPos, sal_uInt16 nFormatId )
, m_nFormatId( nFormatId )
{
m_nSttNode = m_nEndNode = rPos.GetNodeIndex();
- m_nSttContent = m_nEndContent = rPos.nContent.GetIndex();
+ m_nSttContent = m_nEndContent = rPos.GetContentIndex();
}
SwUndoResetAttr::~SwUndoResetAttr()
@@ -1030,7 +1030,7 @@ void SwUndoEndNoteInfo::RedoImpl(::sw::UndoRedoContext & rContext)
SwUndoDontExpandFormat::SwUndoDontExpandFormat( const SwPosition& rPos )
: SwUndo( SwUndoId::DONTEXPAND, &rPos.GetDoc() )
, m_nNodeIndex( rPos.GetNodeIndex() )
- , m_nContentIndex( rPos.nContent.GetIndex() )
+ , m_nContentIndex( rPos.GetContentIndex() )
{
}
diff --git a/sw/source/core/undo/undel.cxx b/sw/source/core/undo/undel.cxx
index 8fa0b3144282..09835a411b8a 100644
--- a/sw/source/core/undo/undel.cxx
+++ b/sw/source/core/undo/undel.cxx
@@ -459,9 +459,9 @@ bool SwUndoDelete::SaveContent( const SwPosition* pStt, const SwPosition* pEnd,
// the length might have changed (!!Fields!!)
sal_Int32 nLen = (bOneNode
- ? pEnd->nContent.GetIndex()
+ ? pEnd->GetContentIndex()
: pSttTextNd->GetText().getLength())
- - pStt->nContent.GetIndex();
+ - pStt->GetContentIndex();
// delete now also the text (all attribute changes are added to
// UNDO history)
@@ -500,8 +500,8 @@ bool SwUndoDelete::SaveContent( const SwPosition* pStt, const SwPosition* pEnd,
// delete now also the text (all attribute changes are added to
// UNDO history)
- m_aEndStr = pEndTextNd->GetText().copy( 0, pEnd->nContent.GetIndex() );
- pEndTextNd->EraseText( aEndIdx, pEnd->nContent.GetIndex() );
+ m_aEndStr = pEndTextNd->GetText().copy( 0, pEnd->GetContentIndex() );
+ pEndTextNd->EraseText( aEndIdx, pEnd->GetContentIndex() );
if( pEndTextNd->GetpSwpHints() )
pEndTextNd->GetpSwpHints()->DeRegister();
@@ -533,7 +533,7 @@ bool SwUndoDelete::CanGrouping( SwDoc& rDoc, const SwPaM& rDelPam )
auto [pStt, pEnd] = rDelPam.StartEnd(); // SwPosition*
if( pStt->nNode != pEnd->nNode ||
- pStt->nContent.GetIndex()+1 != pEnd->nContent.GetIndex() ||
+ pStt->GetContentIndex()+1 != pEnd->GetContentIndex() ||
pEnd->nNode != m_nSttNode )
return false;
@@ -557,7 +557,7 @@ bool SwUndoDelete::CanGrouping( SwDoc& rDoc, const SwPaM& rDelPam )
if( !pDelTextNd ) return false;
sal_Int32 nUChrPos = m_bBackSp ? 0 : m_aSttStr->getLength()-1;
- sal_Unicode cDelChar = pDelTextNd->GetText()[ pStt->nContent.GetIndex() ];
+ sal_Unicode cDelChar = pDelTextNd->GetText()[ pStt->GetContentIndex() ];
CharClass& rCC = GetAppCharClass();
if( ( CH_TXTATR_BREAKWORD == cDelChar || CH_TXTATR_INWORD == cDelChar ) ||
rCC.isLetterNumeric( OUString( cDelChar ), 0 ) !=
diff --git a/sw/source/core/undo/undobj.cxx b/sw/source/core/undo/undobj.cxx
index f26996a10fad..10aab77a09e1 100644
--- a/sw/source/core/undo/undobj.cxx
+++ b/sw/source/core/undo/undobj.cxx
@@ -64,7 +64,7 @@ void SwUndRng::SetValues( const SwPaM& rPam )
{
const SwPosition *pEnd = rPam.End();
m_nEndNode = pEnd->GetNodeIndex();
- m_nEndContent = pEnd->nContent.GetIndex();
+ m_nEndContent = pEnd->GetContentIndex();
}
else
{
@@ -74,7 +74,7 @@ void SwUndRng::SetValues( const SwPaM& rPam )
}
m_nSttNode = pStt->GetNodeIndex();
- m_nSttContent = pStt->nContent.GetIndex();
+ m_nSttContent = pStt->GetContentIndex();
}
void SwUndRng::SetPaM( SwPaM & rPam, bool bCorrToContent ) const
@@ -792,12 +792,12 @@ void SwUndoSaveContent::MoveFromUndoNds( SwDoc& rDoc, SwNodeOffset nNodeIdx,
aPaM.GetPoint()->nNode = nNodeIdx;
aPaM.GetPoint()->nContent.Assign(aPaM.GetContentNode(), 0);
- SaveRedlEndPosForRestore aRedlRest( rInsPos.nNode, rInsPos.nContent.GetIndex() );
+ SaveRedlEndPosForRestore aRedlRest( rInsPos.nNode, rInsPos.GetContentIndex() );
rNds.MoveRange( aPaM, rInsPos, rDoc.GetNodes() );
// delete the last Node as well
- if( !aPaM.GetPoint()->nContent.GetIndex() ||
+ if( !aPaM.GetPoint()->GetContentIndex() ||
( aPaM.GetPoint()->nNode++ && // still empty Nodes at the end?
&rNds.GetEndOfExtras() != &aPaM.GetPoint()->GetNode() ))
{
@@ -897,9 +897,9 @@ void SwUndoSaveContent::DelContentIndex( const SwPosition& rMark,
if( (DelContentType::CheckNoCntnt & nDelContentType )
? (&pEnd->GetNode() == pFootnoteNd )
: (( &pStt->GetNode() == pFootnoteNd &&
- pStt->nContent.GetIndex() > nFootnoteSttIdx) ||
+ pStt->GetContentIndex() > nFootnoteSttIdx) ||
( &pEnd->GetNode() == pFootnoteNd &&
- nFootnoteSttIdx >= pEnd->nContent.GetIndex() )) )
+ nFootnoteSttIdx >= pEnd->GetContentIndex() )) )
{
++nPos; // continue searching
continue;
@@ -926,9 +926,9 @@ void SwUndoSaveContent::DelContentIndex( const SwPosition& rMark,
const sal_Int32 nFootnoteSttIdx = pSrch->GetStart();
if( !(DelContentType::CheckNoCntnt & nDelContentType) && (
( &pStt->GetNode() == pFootnoteNd &&
- pStt->nContent.GetIndex() > nFootnoteSttIdx ) ||
+ pStt->GetContentIndex() > nFootnoteSttIdx ) ||
( &pEnd->GetNode() == pFootnoteNd &&
- nFootnoteSttIdx >= pEnd->nContent.GetIndex() )))
+ nFootnoteSttIdx >= pEnd->GetContentIndex() )))
continue; // continue searching
// Unfortunately an index needs to be created. Otherwise there
@@ -977,7 +977,7 @@ void SwUndoSaveContent::DelContentIndex( const SwPosition& rMark,
SwTextNode *const pTextNd =
pAPos->GetNode().GetTextNode();
SwTextAttr* const pFlyHint = pTextNd->GetTextAttrForCharAt(
- pAPos->nContent.GetIndex());
+ pAPos->GetContentIndex());
assert(pFlyHint);
m_pHistory->Add( pFlyHint, SwNodeOffset(0), false );
// reset n so that no Format is skipped
@@ -1162,7 +1162,7 @@ void SwUndoSaveContent::DelContentIndex( const SwPosition& rMark,
// delete cross-reference bookmark at <pStt>, if only part of
// <pEnd> text node content is deleted.
if( pStt->nNode == pBkmk->GetMarkPos().nNode
- && pEnd->nContent.GetIndex() != pEnd->GetNode().GetTextNode()->Len() )
+ && pEnd->GetContentIndex() != pEnd->GetNode().GetTextNode()->Len() )
{
bSavePos = true;
bSaveOtherPos = false; // cross-reference bookmarks are not expanded
@@ -1170,7 +1170,7 @@ void SwUndoSaveContent::DelContentIndex( const SwPosition& rMark,
// delete cross-reference bookmark at <pEnd>, if only part of
// <pStt> text node content is deleted.
else if( pEnd->nNode == pBkmk->GetMarkPos().nNode &&
- pStt->nContent.GetIndex() != 0 )
+ pStt->GetContentIndex() != 0 )
{
bSavePos = true;
bSaveOtherPos = false; // cross-reference bookmarks are not expanded
@@ -1343,19 +1343,19 @@ SwRedlineSaveData::SwRedlineSaveData(
{
case SwComparePosition::OverlapBefore: // Pos1 overlaps Pos2 at the beginning
m_nEndNode = rEndPos.GetNodeIndex();
- m_nEndContent = rEndPos.nContent.GetIndex();
+ m_nEndContent = rEndPos.GetContentIndex();
break;
case SwComparePosition::OverlapBehind: // Pos1 overlaps Pos2 at the end
m_nSttNode = rSttPos.GetNodeIndex();
- m_nSttContent = rSttPos.nContent.GetIndex();
+ m_nSttContent = rSttPos.GetContentIndex();
break;
case SwComparePosition::Inside: // Pos1 lays completely in Pos2
m_nSttNode = rSttPos.GetNodeIndex();
- m_nSttContent = rSttPos.nContent.GetIndex();
+ m_nSttContent = rSttPos.GetContentIndex();
m_nEndNode = rEndPos.GetNodeIndex();
- m_nEndContent = rEndPos.nContent.GetIndex();
+ m_nEndContent = rEndPos.GetContentIndex();
break;
case SwComparePosition::Outside: // Pos2 lays completely in Pos1
diff --git a/sw/source/core/undo/undobj1.cxx b/sw/source/core/undo/undobj1.cxx
index 177491361c4e..50137926ec75 100644
--- a/sw/source/core/undo/undobj1.cxx
+++ b/sw/source/core/undo/undobj1.cxx
@@ -194,7 +194,7 @@ void SwUndoFlyBase::InsFly(::sw::UndoRedoContext & rContext, bool bShowSelFrame)
{
const SwFormatAnchor& rAnchor = m_pFrameFormat->GetAnchor();
m_nNodePagePos = rAnchor.GetContentAnchor()->GetNodeIndex();
- m_nContentPos = rAnchor.GetContentAnchor()->nContent.GetIndex();
+ m_nContentPos = rAnchor.GetContentAnchor()->GetContentIndex();
}
break;
case RndStdIds::FLY_AT_PARA:
@@ -244,7 +244,7 @@ void SwUndoFlyBase::DelFly( SwDoc* pDoc )
if (RndStdIds::FLY_AS_CHAR == m_nRndId)
{
m_nNodePagePos = pPos->GetNodeIndex();
- m_nContentPos = pPos->nContent.GetIndex();
+ m_nContentPos = pPos->GetContentIndex();
SwTextNode *const pTextNd = pPos->GetNode().GetTextNode();
OSL_ENSURE( pTextNd, "No Textnode found" );
SwTextFlyCnt* const pAttr = static_cast<SwTextFlyCnt*>(
@@ -261,7 +261,7 @@ void SwUndoFlyBase::DelFly( SwDoc* pDoc )
else if (RndStdIds::FLY_AT_CHAR == m_nRndId)
{
m_nNodePagePos = pPos->GetNodeIndex();
- m_nContentPos = pPos->nContent.GetIndex();
+ m_nContentPos = pPos->GetContentIndex();
}
else if ((RndStdIds::FLY_AT_PARA == m_nRndId) || (RndStdIds::FLY_AT_FLY == m_nRndId))
{
@@ -598,7 +598,7 @@ void SwUndoSetFlyFormat::UndoImpl(::sw::UndoRedoContext & rContext)
const SwPosition *pPos = rOldAnch.GetContentAnchor();
SwTextNode *pTextNode = pPos->GetNode().GetTextNode();
OSL_ENSURE( pTextNode->HasHints(), "Missing FlyInCnt-Hint." );
- const sal_Int32 nIdx = pPos->nContent.GetIndex();
+ const sal_Int32 nIdx = pPos->GetContentIndex();
SwTextAttr * pHint = pTextNode->GetTextAttrForCharAt(
nIdx, RES_TXTATR_FLYCNT );
assert(pHint && "Missing Hint.");
@@ -672,7 +672,7 @@ void SwUndoSetFlyFormat::PutAttr( sal_uInt16 nWhich, const SfxPoolItem* pItem )
{
case RndStdIds::FLY_AS_CHAR:
case RndStdIds::FLY_AT_CHAR:
- m_nOldContent = pAnchor->GetContentAnchor()->nContent.GetIndex();
+ m_nOldContent = pAnchor->GetContentAnchor()->GetContentIndex();
[[fallthrough]];
case RndStdIds::FLY_AT_PARA:
case RndStdIds::FLY_AT_FLY:
@@ -689,7 +689,7 @@ void SwUndoSetFlyFormat::PutAttr( sal_uInt16 nWhich, const SfxPoolItem* pItem )
{
case RndStdIds::FLY_AS_CHAR:
case RndStdIds::FLY_AT_CHAR:
- m_nNewContent = pAnchor->GetContentAnchor()->nContent.GetIndex();
+ m_nNewContent = pAnchor->GetContentAnchor()->GetContentIndex();
[[fallthrough]];
case RndStdIds::FLY_AT_PARA:
case RndStdIds::FLY_AT_FLY:
diff --git a/sw/source/core/undo/undraw.cxx b/sw/source/core/undo/undraw.cxx
index aab3209d8ab6..b15f2e8cbc04 100644
--- a/sw/source/core/undo/undraw.cxx
+++ b/sw/source/core/undo/undraw.cxx
@@ -110,7 +110,7 @@ static void lcl_SaveAnchor( SwFrameFormat* pFormat, SwNodeOffset& rNodePos )
if (RndStdIds::FLY_AS_CHAR == rAnchor.GetAnchorId())
{
- nContentPos = rAnchor.GetContentAnchor()->nContent.GetIndex();
+ nContentPos = rAnchor.GetContentAnchor()->GetContentIndex();
// destroy TextAttribute
SwTextNode *pTextNd = pFormat->GetDoc()->GetNodes()[ rNodePos ]->GetTextNode();
@@ -128,7 +128,7 @@ static void lcl_SaveAnchor( SwFrameFormat* pFormat, SwNodeOffset& rNodePos )
}
else if (RndStdIds::FLY_AT_CHAR == rAnchor.GetAnchorId())
{
- nContentPos = rAnchor.GetContentAnchor()->nContent.GetIndex();
+ nContentPos = rAnchor.GetContentAnchor()->GetContentIndex();
}
pFormat->SetFormatAttr( SwFormatAnchor( rAnchor.GetAnchorId(), nContentPos ) );
diff --git a/sw/source/core/undo/unins.cxx b/sw/source/core/undo/unins.cxx
index 7ce9c303c42a..fc8aea7d2c2d 100644
--- a/sw/source/core/undo/unins.cxx
+++ b/sw/source/core/undo/unins.cxx
@@ -146,7 +146,7 @@ bool SwUndoInsert::CanGrouping( const SwPosition& rPos )
{
bool bRet = false;
if( m_nNode == rPos.GetNodeIndex() &&
- m_nContent == rPos.nContent.GetIndex() )
+ m_nContent == rPos.GetContentIndex() )
{
// consider Redline
SwDoc& rDoc = rPos.GetNode().GetDoc();
@@ -245,11 +245,11 @@ void SwUndoInsert::UndoImpl(::sw::UndoRedoContext & rContext)
// set on the deleted text; EraseText will leave empty
// ones behind otherwise
pTextNode->DeleteAttributes(RES_TXTATR_AUTOFMT,
- aPaM.GetPoint()->nContent.GetIndex(),
- aPaM.GetMark()->nContent.GetIndex());
+ aPaM.GetPoint()->GetContentIndex(),
+ aPaM.GetMark()->GetContentIndex());
pTextNode->DeleteAttributes(RES_TXTATR_CHARFMT,
- aPaM.GetPoint()->nContent.GetIndex(),
- aPaM.GetMark()->nContent.GetIndex());
+ aPaM.GetPoint()->GetContentIndex(),
+ aPaM.GetMark()->GetContentIndex());
}
RemoveIdxFromRange( aPaM, false );
maText = pTextNode->GetText().copy(m_nContent-m_nLen, m_nLen);
@@ -264,7 +264,7 @@ void SwUndoInsert::UndoImpl(::sw::UndoRedoContext & rContext)
}
nNd = aPaM.GetPoint()->GetNodeIndex();
- nCnt = aPaM.GetPoint()->nContent.GetIndex();
+ nCnt = aPaM.GetPoint()->GetContentIndex();
if (!maText)
{
@@ -273,7 +273,7 @@ void SwUndoInsert::UndoImpl(::sw::UndoRedoContext & rContext)
MoveToUndoNds(aPaM, m_pUndoNodeIndex.get());
}
m_nNode = aPaM.GetPoint()->GetNodeIndex();
- m_nContent = aPaM.GetPoint()->nContent.GetIndex();
+ m_nContent = aPaM.GetPoint()->GetContentIndex();
}
// set cursor to Undo range
@@ -349,7 +349,7 @@ void SwUndoInsert::RedoImpl(::sw::UndoRedoContext & rContext)
MoveFromUndoNds(*pTmpDoc, nMvNd, *pPam->GetMark());
}
m_nNode = pPam->GetMark()->GetNodeIndex();
- m_nContent = pPam->GetMark()->nContent.GetIndex();
+ m_nContent = pPam->GetMark()->GetContentIndex();
MovePtForward( *pPam, bMvBkwrd );
pPam->Exchange();
@@ -590,8 +590,8 @@ SwUndoReplace::Impl::Impl(
auto [pStt, pEnd] = rPam.StartEnd(); // SwPosition*
m_nSttNd = m_nEndNd = pStt->GetNodeIndex();
- m_nSttCnt = pStt->nContent.GetIndex();
- m_nSelEnd = m_nEndCnt = pEnd->nContent.GetIndex();
+ m_nSttCnt = pStt->GetContentIndex();
+ m_nSelEnd = m_nEndCnt = pEnd->GetContentIndex();
m_bSplitNext = m_nSttNd != pEnd->GetNodeIndex();
@@ -636,7 +636,7 @@ SwUndoReplace::Impl::Impl(
}
const sal_Int32 nECnt = m_bSplitNext ? pNd->GetText().getLength()
- : pEnd->nContent.GetIndex();
+ : pEnd->GetContentIndex();
m_sOld = pNd->GetText().copy( m_nSttCnt, nECnt - m_nSttCnt );
}
@@ -771,7 +771,7 @@ void SwUndoReplace::Impl::SetEnd(SwPaM const& rPam)
{
const SwPosition* pEnd = rPam.End();
m_nEndNd = m_nOffset + pEnd->GetNodeIndex();
- m_nEndCnt = pEnd->nContent.GetIndex();
+ m_nEndCnt = pEnd->GetContentIndex();
}
SwUndoReRead::SwUndoReRead( const SwPaM& rPam, const SwGrfNode& rGrfNd )
diff --git a/sw/source/core/undo/unmove.cxx b/sw/source/core/undo/unmove.cxx
index 07886e80cddf..ddd7fb11498b 100644
--- a/sw/source/core/undo/unmove.cxx
+++ b/sw/source/core/undo/unmove.cxx
@@ -36,7 +36,7 @@ SwUndoMove::SwUndoMove( const SwPaM& rRange, const SwPosition& rMvPos )
, m_nDestStartContent(0)
, m_nDestEndContent(0)
, m_nInsPosContent(0)
- , m_nMoveDestContent(rMvPos.nContent.GetIndex())
+ , m_nMoveDestContent(rMvPos.GetContentIndex())
, m_bJoinNext(false)
, m_bMoveRange(false)
, m_bMoveRedlines(false)
diff --git a/sw/source/core/undo/unnum.cxx b/sw/source/core/undo/unnum.cxx
index 69cf6b8a809f..2cb0a306c8b2 100644
--- a/sw/source/core/undo/unnum.cxx
+++ b/sw/source/core/undo/unnum.cxx
@@ -53,7 +53,7 @@ SwUndoInsNum::SwUndoInsNum( const SwPosition& rPos, const SwNumRule& rRule,
m_nEndNode = SwNodeOffset(0);
m_nEndContent = COMPLETE_STRING;
m_nSttNode = rPos.GetNodeIndex();
- m_nSttContent = rPos.nContent.GetIndex();
+ m_nSttContent = rPos.GetContentIndex();
}
SwUndoInsNum::~SwUndoInsNum()
diff --git a/sw/source/core/undo/unovwr.cxx b/sw/source/core/undo/unovwr.cxx
index aa442593c826..81fe4c70ac38 100644
--- a/sw/source/core/undo/unovwr.cxx
+++ b/sw/source/core/undo/unovwr.cxx
@@ -49,12 +49,12 @@ SwUndoOverwrite::SwUndoOverwrite( SwDoc& rDoc, SwPosition& rPos,
sal_Int32 const nTextNdLen = pTextNd->GetText().getLength();
m_nStartNode = rPos.GetNodeIndex();
- m_nStartContent = rPos.nContent.GetIndex();
+ m_nStartContent = rPos.GetContentIndex();
if( !rDoc.getIDocumentRedlineAccess().IsIgnoreRedline() && !rDoc.getIDocumentRedlineAccess().GetRedlineTable().empty() )
{
- SwPaM aPam( rPos.nNode, rPos.nContent.GetIndex(),
- rPos.nNode, rPos.nContent.GetIndex()+1 );
+ SwPaM aPam( rPos.nNode, rPos.GetContentIndex(),
+ rPos.nNode, rPos.GetContentIndex()+1 );
m_pRedlSaveData.reset( new SwRedlineSaveDatas );
if( !FillSaveData( aPam, *m_pRedlSaveData, false ))
{
@@ -113,8 +113,8 @@ bool SwUndoOverwrite::CanGrouping( SwDoc& rDoc, SwPosition& rPos,
// Is the node a TextNode at all?
SwTextNode * pDelTextNd = rPos.GetNode().GetTextNode();
if( !pDelTextNd ||
- (pDelTextNd->GetText().getLength() != rPos.nContent.GetIndex() &&
- rPos.nContent.GetIndex() != ( m_nStartContent + m_aInsStr.getLength() )))
+ (pDelTextNd->GetText().getLength() != rPos.GetContentIndex() &&
+ rPos.GetContentIndex() != ( m_nStartContent + m_aInsStr.getLength() )))
return false;
CharClass& rCC = GetAppCharClass();
@@ -125,18 +125,18 @@ bool SwUndoOverwrite::CanGrouping( SwDoc& rDoc, SwPosition& rPos,
rCC.isLetterNumeric( m_aInsStr, m_aInsStr.getLength()-1 ) )
return false;
- if (!m_bInsChar && rPos.nContent.GetIndex() < pDelTextNd->GetText().getLength())
+ if (!m_bInsChar && rPos.GetContentIndex() < pDelTextNd->GetText().getLength())
{
SwRedlineSaveDatas aTmpSav;
- SwPaM aPam( rPos.nNode, rPos.nContent.GetIndex(),
- rPos.nNode, rPos.nContent.GetIndex()+1 );
+ SwPaM aPam( rPos.nNode, rPos.GetContentIndex(),
+ rPos.nNode, rPos.GetContentIndex()+1 );
const bool bSaved = FillSaveData( aPam, aTmpSav, false );
bool bOk = ( !m_pRedlSaveData && !bSaved ) ||
( m_pRedlSaveData && bSaved &&
SwUndo::CanRedlineGroup( *m_pRedlSaveData, aTmpSav,
- m_nStartContent > rPos.nContent.GetIndex() ));
+ m_nStartContent > rPos.GetContentIndex() ));
// aTmpSav.DeleteAndDestroyAll();
if( !bOk )
return false;
@@ -147,9 +147,9 @@ bool SwUndoOverwrite::CanGrouping( SwDoc& rDoc, SwPosition& rPos,
// both 'overwrites' can be combined so 'move' the corresponding character
if( !m_bInsChar )
{
- if (rPos.nContent.GetIndex() < pDelTextNd->GetText().getLength())
+ if (rPos.GetContentIndex() < pDelTextNd->GetText().getLength())
{
- m_aDelStr += OUStringChar( pDelTextNd->GetText()[rPos.nContent.GetIndex()] );
+ m_aDelStr += OUStringChar( pDelTextNd->GetText()[rPos.GetContentIndex()] );
++rPos.nContent;
}
else
@@ -232,7 +232,7 @@ void SwUndoOverwrite::UndoImpl(::sw::UndoRedoContext & rContext)
m_pHistory->TmpRollback( &rDoc, 0, false );
}
- if( rCurrentPam.GetMark()->nContent.GetIndex() != m_nStartContent )
+ if( rCurrentPam.GetMark()->GetContentIndex() != m_nStartContent )
{
rCurrentPam.SetMark();
rCurrentPam.GetMark()->nContent = m_nStartContent;
@@ -302,7 +302,7 @@ void SwUndoOverwrite::RedoImpl(::sw::UndoRedoContext & rContext)
// get back old start position from UndoNodes array
if( m_pHistory )
m_pHistory->SetTmpEnd( m_pHistory->Count() );
- if( rCurrentPam.GetMark()->nContent.GetIndex() != m_nStartContent )
+ if( rCurrentPam.GetMark()->GetContentIndex() != m_nStartContent )
{
rCurrentPam.SetMark();
rCurrentPam.GetMark()->nContent = m_nStartContent;
diff --git a/sw/source/core/undo/unredln.cxx b/sw/source/core/undo/unredln.cxx
index 2f074d2b0363..8fab5741ab7a 100644
--- a/sw/source/core/undo/unredln.cxx
+++ b/sw/source/core/undo/unredln.cxx
@@ -216,7 +216,7 @@ SwUndoRedlineDelete::SwUndoRedlineDelete(
m_bCanGroup = true;
m_bIsDelim = !GetAppCharClass().isLetterNumeric( pTNd->GetText(),
m_nSttContent );
- m_bIsBackspace = m_nSttContent == rRange.GetPoint()->nContent.GetIndex();
+ m_bIsBackspace = m_nSttContent == rRange.GetPoint()->GetContentIndex();
}
}
@@ -386,7 +386,7 @@ void SwUndoRedlineSort::RedoRedlineImpl(SwDoc & rDoc, SwPaM & rPam)
SwNodeIndex aPrevIdx( pStart->nNode, -1 );
SwNodeOffset nOffsetTemp = pEnd->GetNodeIndex() - pStart->GetNodeIndex();
- const sal_Int32 nCntStt = pStart->nContent.GetIndex();
+ const sal_Int32 nCntStt = pStart->GetContentIndex();
rDoc.SortText(rPam, *m_pOpt);
@@ -419,7 +419,7 @@ void SwUndoRedlineSort::SetSaveRange( const SwPaM& rRange )
{
const SwPosition& rPos = *rRange.End();
m_nSaveEndNode = rPos.GetNodeIndex();
- m_nSaveEndContent = rPos.nContent.GetIndex();
+ m_nSaveEndContent = rPos.GetContentIndex();
}
SwUndoAcceptRedline::SwUndoAcceptRedline( const SwPaM& rRange )
diff --git a/sw/source/core/undo/unsect.cxx b/sw/source/core/undo/unsect.cxx
index 6a57f17fd79c..b7cb3d835933 100644
--- a/sw/source/core/undo/unsect.cxx
+++ b/sw/source/core/undo/unsect.cxx
@@ -108,8 +108,8 @@ SwUndoInsSection::SwUndoInsSection(
const SwContentNode* pCNd = rPam.GetPoint()->GetNode().GetContentNode();
if( pCNd && pCNd->HasSwAttrSet() && (
- !rPam.GetPoint()->nContent.GetIndex() ||
- rPam.GetPoint()->nContent.GetIndex() == pCNd->Len() ))
+ !rPam.GetPoint()->GetContentIndex() ||
+ rPam.GetPoint()->GetContentIndex() == pCNd->Len() ))
{
SfxItemSet aBrkSet( rDoc.GetAttrPool(), aBreakSetRange );
aBrkSet.Put( *pCNd->GetpSwAttrSet() );
diff --git a/sw/source/core/undo/unspnd.cxx b/sw/source/core/undo/unspnd.cxx
index 20f467859805..932aa697b53a 100644
--- a/sw/source/core/undo/unspnd.cxx
+++ b/sw/source/core/undo/unspnd.cxx
@@ -40,7 +40,7 @@
SwUndoSplitNode::SwUndoSplitNode( SwDoc& rDoc, const SwPosition& rPos,
bool bChkTable )
: SwUndo( SwUndoId::SPLITNODE, &rDoc ), m_nNode( rPos.GetNodeIndex() ),
- m_nContent( rPos.nContent.GetIndex() ),
+ m_nContent( rPos.GetContentIndex() ),
m_bTableFlag( false ), m_bCheckTableStart( bChkTable )
{
SwTextNode *const pTextNd = rPos.GetNode().GetTextNode();
diff --git a/sw/source/core/undo/untbl.cxx b/sw/source/core/undo/untbl.cxx
index 5c2dd6225862..0a928afb5dc4 100644
--- a/sw/source/core/undo/untbl.cxx
+++ b/sw/source/core/undo/untbl.cxx
@@ -718,7 +718,7 @@ SwUndoTextToTable::SwUndoTextToTable( const SwPaM& rRg,
const SwPosition* pEnd = rRg.End();
SwNodes& rNds = rRg.GetDoc().GetNodes();
- m_bSplitEnd = pEnd->nContent.GetIndex() && ( pEnd->nContent.GetIndex()
+ m_bSplitEnd = pEnd->GetContentIndex() && ( pEnd->GetContentIndex()
!= pEnd->GetNode().GetContentNode()->Len() ||
pEnd->GetNodeIndex() >= rNds.GetEndOfContent().GetIndex()-1 );
}
diff --git a/sw/source/core/undo/untblk.cxx b/sw/source/core/undo/untblk.cxx
index 820333ddc70b..d03e1dca671c 100644
--- a/sw/source/core/undo/untblk.cxx
+++ b/sw/source/core/undo/untblk.cxx
@@ -116,7 +116,7 @@ void SwUndoInserts::SetInsertRange( const SwPaM& rPam, bool bScanFlys,
{
const SwPosition* pTmpPos = rPam.End();
m_nEndNode = pTmpPos->GetNodeIndex();
- m_nEndContent = pTmpPos->nContent.GetIndex();
+ m_nEndContent = pTmpPos->GetContentIndex();
if( rPam.HasMark() )
{
if( pTmpPos == rPam.GetPoint() )
@@ -125,7 +125,7 @@ void SwUndoInserts::SetInsertRange( const SwPaM& rPam, bool bScanFlys,
pTmpPos = rPam.GetPoint();
m_nSttNode = pTmpPos->GetNodeIndex();
- m_nSttContent = pTmpPos->nContent.GetIndex();
+ m_nSttContent = pTmpPos->GetContentIndex();
m_nDeleteTextNodes = nDeleteTextNodes;
if (m_nDeleteTextNodes == SwNodeOffset(0)) // if a table selection is added...
diff --git a/sw/source/core/unocore/unocrsrhelper.cxx b/sw/source/core/unocore/unocrsrhelper.cxx
index 088f826eeddc..f5c2dd7c75b9 100644
--- a/sw/source/core/unocore/unocrsrhelper.cxx
+++ b/sw/source/core/unocore/unocrsrhelper.cxx
@@ -538,7 +538,7 @@ bool getCursorPropertyValue(const SfxItemPropertyMapEntry& rEntry
if (rPam.GetNode().IsTextNode())
{
marks = rPam.GetNode().GetTextNode()->GetTextAttrsAt(
- rPam.GetPoint()->nContent.GetIndex(), RES_TXTATR_TOXMARK);
+ rPam.GetPoint()->GetContentIndex(), RES_TXTATR_TOXMARK);
}
if (!marks.empty())
{
@@ -581,7 +581,7 @@ bool getCursorPropertyValue(const SfxItemPropertyMapEntry& rEntry
const SwTextNode *pTextNd =
rPam.GetDoc().GetNodes()[pPos->GetNodeIndex()]->GetTextNode();
const SwTextAttr* pTextAttr = pTextNd
- ? pTextNd->GetFieldTextAttrAt( pPos->nContent.GetIndex(), true )
+ ? pTextNd->GetFieldTextAttrAt( pPos->GetContentIndex(), true )
: nullptr;
if ( pTextAttr != nullptr )
{
@@ -681,7 +681,7 @@ bool getCursorPropertyValue(const SfxItemPropertyMapEntry& rEntry
{
SwTextAttr *const pTextAttr = rPam.GetNode().IsTextNode() ?
rPam.GetNode().GetTextNode()->GetTextAttrForCharAt(
- rPam.GetPoint()->nContent.GetIndex(), RES_TXTATR_FTN) : nullptr;
+ rPam.GetPoint()->GetContentIndex(), RES_TXTATR_FTN) : nullptr;
if(pTextAttr)
{
const SwFormatFootnote& rFootnote = pTextAttr->GetFootnote();
@@ -708,7 +708,7 @@ bool getCursorPropertyValue(const SfxItemPropertyMapEntry& rEntry
if (rPam.GetNode().IsTextNode())
{
marks = rPam.GetNode().GetTextNode()->GetTextAttrsAt(
- rPam.GetPoint()->nContent.GetIndex(), RES_TXTATR_REFMARK);
+ rPam.GetPoint()->GetContentIndex(), RES_TXTATR_REFMARK);
}
if (!marks.empty())
{
@@ -729,7 +729,7 @@ bool getCursorPropertyValue(const SfxItemPropertyMapEntry& rEntry
{
uno::Reference<XTextContent> const xRet(rPam.GetNode().IsTextNode()
? GetNestedTextContent(*rPam.GetNode().GetTextNode(),
- rPam.GetPoint()->nContent.GetIndex(), false)
+ rPam.GetPoint()->GetContentIndex(), false)
: nullptr);
if (xRet.is())
{
@@ -751,8 +751,8 @@ bool getCursorPropertyValue(const SfxItemPropertyMapEntry& rEntry
if (&rPam.GetNode() == &rPam.GetNode(false)
&& pTextNode && pTextNode->GetpSwpHints())
{
- sal_Int32 nPaMStart = rPam.Start()->nContent.GetIndex();
- sal_Int32 nPaMEnd = rPam.End()->nContent.GetIndex();
+ sal_Int32 nPaMStart = rPam.Start()->GetContentIndex();
+ sal_Int32 nPaMEnd = rPam.End()->GetContentIndex();
Sequence< OUString> aCharStyles;
SwpHints* pHints = pTextNode->GetpSwpHints();
for( size_t nAttr = 0; nAttr < pHints->Count(); ++nAttr )
@@ -1028,13 +1028,13 @@ void InsertFile(SwUnoCursor* pUnoCursor, const OUString& rURL,
if (SwTextNode const*const pTextNode = pUnoCursor->GetPoint()->GetNode().GetTextNode())
{
// TODO: check meta field here too in case it ever grows a 2nd char
- if (pTextNode->GetTextAttrAt(pUnoCursor->GetPoint()->nContent.GetIndex(),
+ if (pTextNode->GetTextAttrAt(pUnoCursor->GetPoint()->GetContentIndex(),
RES_TXTATR_INPUTFIELD, SwTextNode::PARENT))
{
throw uno::RuntimeException("cannot insert file inside input field");
}
- if (pTextNode->GetTextAttrAt(pUnoCursor->GetPoint()->nContent.GetIndex(),
+ if (pTextNode->GetTextAttrAt(pUnoCursor->GetPoint()->GetContentIndex(),
RES_TXTATR_CONTENTCONTROL, SwTextNode::PARENT))
{
throw uno::RuntimeException("cannot insert file inside content controls");
@@ -1147,7 +1147,7 @@ void InsertFile(SwUnoCursor* pUnoCursor, const OUString& rURL,
rDoc.getIDocumentContentOperations().DeleteAndJoin(*pUnoCursor);
SwNodeIndex aSave( pUnoCursor->GetPoint()->nNode, -1 );
- sal_Int32 nContent = pUnoCursor->GetPoint()->nContent.GetIndex();
+ sal_Int32 nContent = pUnoCursor->GetPoint()->GetContentIndex();
ErrCode nErrno = pRdr->Read( *pRead ); // and paste the document
diff --git a/sw/source/core/unocore/unodraw.cxx b/sw/source/core/unocore/unodraw.cxx
index 3a4a01f5032c..60a0e2fcdf92 100644
--- a/sw/source/core/unocore/unodraw.cxx
+++ b/sw/source/core/unocore/unodraw.cxx
@@ -1132,7 +1132,7 @@ void SwXShape::setPropertyValue(const OUString& rPropertyName, const uno::Any& a
const SwPosition *pPos = aAnchor.GetContentAnchor();
SwTextNode *pTextNode = pPos->GetNode().GetTextNode();
SAL_WARN_IF( !pTextNode->HasHints(), "sw.uno", "Missing FlyInCnt-Hint." );
- const sal_Int32 nIdx = pPos->nContent.GetIndex();
+ const sal_Int32 nIdx = pPos->GetContentIndex();
SwTextAttr * const pHint =
pTextNode->GetTextAttrForCharAt(
nIdx, RES_TXTATR_FLYCNT );
@@ -1151,7 +1151,7 @@ void SwXShape::setPropertyValue(const OUString& rPropertyName, const uno::Any& a
SAL_WARN_IF( !pNd, "sw.uno", "Cursor not at TextNode." );
SwFormatFlyCnt aFormat( pFormat );
pNd->InsertItem(aFormat, pInternalPam->GetPoint()
- ->nContent.GetIndex(), 0 );
+ ->GetContentIndex(), 0 );
//Refetch in case SwTextNode::InsertItem causes it to be deleted
pFormat = GetFrameFormat();
}
@@ -1286,7 +1286,7 @@ void SwXShape::setPropertyValue(const OUString& rPropertyName, const uno::Any& a
const SwPosition *pPos = rOldAnchor.GetContentAnchor();
SwTextNode *pTextNode = pPos->GetNode().GetTextNode();
SAL_WARN_IF( !pTextNode->HasHints(), "sw.uno", "Missing FlyInCnt-Hint." );
- const sal_Int32 nIdx = pPos->nContent.GetIndex();
+ const sal_Int32 nIdx = pPos->GetContentIndex();
SwTextAttr * const pHint =
pTextNode->GetTextAttrForCharAt(
nIdx, RES_TXTATR_FLYCNT );
@@ -1345,7 +1345,7 @@ void SwXShape::setPropertyValue(const OUString& rPropertyName, const uno::Any& a
SAL_WARN_IF( !pNd, "sw.uno", "Cursor is not in a TextNode." );
SwFormatFlyCnt aFormat( pFlyFormat );
pNd->InsertItem(aFormat,
- aPam.GetPoint()->nContent.GetIndex(), 0 );
+ aPam.GetPoint()->GetContentIndex(), 0 );
--aPam.GetPoint()->nContent; // InsertItem moved it
SwFormatAnchor aNewAnchor(
dynamic_cast<const SwFormatAnchor&>(
@@ -2166,7 +2166,7 @@ void SwXShape::dispose()
{
const SwPosition &rPos = *(pFormat->GetAnchor().GetContentAnchor());
SwTextNode *pTextNode = rPos.GetNode().GetTextNode();
- const sal_Int32 nIdx = rPos.nContent.GetIndex();
+ const sal_Int32 nIdx = rPos.GetContentIndex();
pTextNode->DeleteAttributes( RES_TXTATR_FLYCNT, nIdx );
}
else
diff --git a/sw/source/core/unocore/unofield.cxx b/sw/source/core/unocore/unofield.cxx
index 800eda41d5b6..44559e89780c 100644
--- a/sw/source/core/unocore/unofield.cxx
+++ b/sw/source/core/unocore/unofield.cxx
@@ -1279,7 +1279,7 @@ void SwXTextField::TransmuteLeadToInputField(SwSetExpField & rField)
IDocumentContentOperations & rIDCO(rNode.GetDoc().getIDocumentContentOperations());
SwTextField::GetPamForTextField(*pOldAttr, pPamForTextField);
assert(pPamForTextField);
- sal_Int32 const nStart(pPamForTextField->Start()->nContent.GetIndex());
+ sal_Int32 const nStart(pPamForTextField->Start()->GetContentIndex());
rIDCO.DeleteAndJoin(*pPamForTextField);
// ATTENTION: rField is dead now! hope nobody accesses it...
bool bSuccess = rIDCO.InsertPoolItem(*pPamForTextField, tempFormat);
@@ -1961,7 +1961,7 @@ void SAL_CALL SwXTextField::attach(
else
pDoc->getIDocumentContentOperations().InsertPoolItem(aPam, aFormat, nInsertFlags);
- SwTextAttr* pTextAttr = aPam.GetNode().GetTextNode()->GetFieldTextAttrAt( aPam.GetPoint()->nContent.GetIndex()-1, true );
+ SwTextAttr* pTextAttr = aPam.GetNode().GetTextNode()->GetFieldTextAttrAt( aPam.GetPoint()->GetContentIndex()-1, true );
// What about updating the fields? (see fldmgr.cxx)
if (!pTextAttr)
@@ -2025,7 +2025,7 @@ void SAL_CALL SwXTextField::attach(
}
// keep inserted annotation
{
- SwTextField* pTextAttr = aEnd.GetNode().GetTextNode()->GetFieldTextAttrAt( aEnd.End()->nContent.GetIndex()-1, true );
+ SwTextField* pTextAttr = aEnd.GetNode().GetTextNode()->GetFieldTextAttrAt( aEnd.End()->GetContentIndex()-1, true );
if ( pTextAttr != nullptr )
{
m_pImpl->SetFormatField(const_cast<SwFormatField*>(&pTextAttr->GetFormatField()), m_pImpl->m_pDoc);
diff --git a/sw/source/core/unocore/unoframe.cxx b/sw/source/core/unocore/unoframe.cxx
index 929172e94ff1..f2f75ac2e623 100644
--- a/sw/source/core/unocore/unoframe.cxx
+++ b/sw/source/core/unocore/unoframe.cxx
@@ -2677,7 +2677,7 @@ void SwXFrame::dispose()
{
const SwPosition &rPos = *(pFormat->GetAnchor().GetContentAnchor());
SwTextNode *pTextNode = rPos.GetNode().GetTextNode();
- const sal_Int32 nIdx = rPos.nContent.GetIndex();
+ const sal_Int32 nIdx = rPos.GetContentIndex();
pTextNode->DeleteAttributes( RES_TXTATR_FLYCNT, nIdx, nIdx );
}
else
diff --git a/sw/source/core/unocore/unoftn.cxx b/sw/source/core/unocore/unoftn.cxx
index 8ed3775b9e2b..087f09db3a85 100644
--- a/sw/source/core/unocore/unoftn.cxx
+++ b/sw/source/core/unocore/unoftn.cxx
@@ -328,7 +328,7 @@ SwXFootnote::attach(const uno::Reference< text::XTextRange > & xTextRange)
SwTextFootnote *const pTextAttr = static_cast<SwTextFootnote*>(
aPam.GetNode().GetTextNode()->GetTextAttrForCharAt(
- aPam.GetPoint()->nContent.GetIndex()-1, RES_TXTATR_FTN ));
+ aPam.GetPoint()->GetContentIndex()-1, RES_TXTATR_FTN ));
if (pTextAttr)
{
diff --git a/sw/source/core/unocore/unolinebreak.cxx b/sw/source/core/unocore/unolinebreak.cxx
index 4b8bfa08ff74..948fc73a3ed6 100644
--- a/sw/source/core/unocore/unolinebreak.cxx
+++ b/sw/source/core/unocore/unolinebreak.cxx
@@ -161,7 +161,7 @@ void SAL_CALL SwXLineBreak::attach(const uno::Reference<text::XTextRange>& xText
rNewDoc.getIDocumentContentOperations().InsertPoolItem(aPam, aLineBreak, nInsertFlags);
auto pTextAttr
= static_cast<SwTextLineBreak*>(aPam.GetNode().GetTextNode()->GetTextAttrForCharAt(
- aPam.GetPoint()->nContent.GetIndex() - 1, RES_TXTATR_LINEBREAK));
+ aPam.GetPoint()->GetContentIndex() - 1, RES_TXTATR_LINEBREAK));
if (pTextAttr)
{
m_pImpl->EndListeningAll();
diff --git a/sw/source/core/unocore/unoobj.cxx b/sw/source/core/unocore/unoobj.cxx
index e8edade0ad47..a1826477dc1b 100644
--- a/sw/source/core/unocore/unoobj.cxx
+++ b/sw/source/core/unocore/unoobj.cxx
@@ -1240,7 +1240,7 @@ SwXTextCursor::gotoNextWord(sal_Bool Expand)
// in specific cases...
SwPosition *const pPoint = rUnoCursor.GetPoint();
SwNode *const pOldNode = &pPoint->GetNode();
- sal_Int32 const nOldIndex = pPoint->nContent.GetIndex();
+ sal_Int32 const nOldIndex = pPoint->GetContentIndex();
SwUnoCursorHelper::SelectPam(rUnoCursor, Expand);
// end of paragraph
@@ -1263,7 +1263,7 @@ SwXTextCursor::gotoNextWord(sal_Bool Expand)
// return true if cursor has moved
bRet = (&pPoint->GetNode() != pOldNode) ||
- (pPoint->nContent.GetIndex() != nOldIndex);
+ (pPoint->GetContentIndex() != nOldIndex);
if (bRet && (CursorType::Meta == m_eType))
{
bRet = lcl_ForceIntoMeta(rUnoCursor, m_xParentText,
@@ -1284,7 +1284,7 @@ SwXTextCursor::gotoPreviousWord(sal_Bool Expand)
bool bRet = false;
SwPosition *const pPoint = rUnoCursor.GetPoint();
SwNode *const pOldNode = &pPoint->GetNode();
- sal_Int32 const nOldIndex = pPoint->nContent.GetIndex();
+ sal_Int32 const nOldIndex = pPoint->GetContentIndex();
SwUnoCursorHelper::SelectPam(rUnoCursor, Expand);
// start of paragraph?
@@ -1303,7 +1303,7 @@ SwXTextCursor::gotoPreviousWord(sal_Bool Expand)
// return true if cursor has moved
bRet = (&pPoint->GetNode() != pOldNode) ||
- (pPoint->nContent.GetIndex() != nOldIndex);
+ (pPoint->GetContentIndex() != nOldIndex);
if (bRet && (CursorType::Meta == m_eType))
{
bRet = lcl_ForceIntoMeta(rUnoCursor, m_xParentText,
@@ -1323,7 +1323,7 @@ SwXTextCursor::gotoEndOfWord(sal_Bool Expand)
bool bRet = false;
SwPosition *const pPoint = rUnoCursor.GetPoint();
SwNode & rOldNode = pPoint->GetNode();
- sal_Int32 const nOldIndex = pPoint->nContent.GetIndex();
+ sal_Int32 const nOldIndex = pPoint->GetContentIndex();
const sal_Int16 nWordType = i18n::WordType::DICTIONARY_WORD;
SwUnoCursorHelper::SelectPam(rUnoCursor, Expand);
@@ -1359,7 +1359,7 @@ SwXTextCursor::gotoStartOfWord(sal_Bool Expand)
bool bRet = false;
SwPosition *const pPoint = rUnoCursor.GetPoint();
SwNode & rOldNode = pPoint->GetNode();
- sal_Int32 const nOldIndex = pPoint->nContent.GetIndex();
+ sal_Int32 const nOldIndex = pPoint->GetContentIndex();
const sal_Int16 nWordType = i18n::WordType::DICTIONARY_WORD;
SwUnoCursorHelper::SelectPam(rUnoCursor, Expand);
@@ -2854,7 +2854,7 @@ SwXTextCursor::sort(const uno::Sequence< beans::PropertyValue >& rDescriptor)
SwNodeIndex aPrevIdx( rStart.nNode, -1 );
const SwNodeOffset nOffset = rEnd.GetNodeIndex() - rStart.GetNodeIndex();
- const sal_Int32 nCntStt = rStart.nContent.GetIndex();
+ const sal_Int32 nCntStt = rStart.GetContentIndex();
rUnoCursor.GetDoc().SortText(rUnoCursor, aSortOpt);
diff --git a/sw/source/core/unocore/unoobj2.cxx b/sw/source/core/unocore/unoobj2.cxx
index 143802804803..c45bab5b91b7 100644
--- a/sw/source/core/unocore/unoobj2.cxx
+++ b/sw/source/core/unocore/unoobj2.cxx
@@ -124,7 +124,7 @@ struct FrameClientSortListLess
if(rFormat.GetAnchor().GetAnchorId() == nAnchorType)
{
const auto nIdx =
- rFormat.GetAnchor().GetContentAnchor()->nContent.GetIndex();
+ rFormat.GetAnchor().GetContentAnchor()->GetContentIndex();
const auto nOrder = rFormat.GetAnchor().GetOrder();
FrameClientSortListEntry entry(nIdx, nOrder, std::make_shared<sw::FrameClient>(&rFormat));
rFrames.push_back(entry);
@@ -170,7 +170,7 @@ void CollectFrameAtNode( const SwNodeIndex& rIdx,
// OD 2004-05-07 #i28701# - determine insert position for
// sorted <rFrameArr>
- const sal_Int32 nIndex = pAnchorPos->nContent.GetIndex();
+ const sal_Int32 nIndex = pAnchorPos->GetContentIndex();
sal_uInt32 nOrder = rAnchor.GetOrder();
FrameClientSortListEntry entry(nIndex, nOrder, std::make_shared<sw::FrameClient>(const_cast<SwFrameFormat*>(pFormat)));
@@ -323,9 +323,9 @@ void SwUnoCursorHelper::GetCursorAttr(SwPaM & rPam,
case SwNodeType::Text:
{
const sal_Int32 nStart = (n == nSttNd)
- ? rStart.nContent.GetIndex() : 0;
+ ? rStart.GetContentIndex() : 0;
const sal_Int32 nEnd = (n == nEndNd)
- ? rEnd.nContent.GetIndex()
+ ? rEnd.GetContentIndex()
: pNd->GetTextNode()->GetText().getLength();
pNd->GetTextNode()->GetParaAttr(*pSet, nStart, nEnd, bOnlyTextAttr, bGetFromChrFormat);
}
@@ -404,8 +404,8 @@ struct SwXParagraphEnumerationImpl final : public SwXParagraphEnumeration
{
SwUnoCursor & rCursor = GetCursor();
rCursor.Normalize();
- m_nFirstParaStart = rCursor.GetPoint()->nContent.GetIndex();
- m_nLastParaEnd = rCursor.GetMark()->nContent.GetIndex();
+ m_nFirstParaStart = rCursor.GetPoint()->GetContentIndex();
+ m_nLastParaEnd = rCursor.GetMark()->GetContentIndex();
rCursor.DeleteMark();
}
}
@@ -1772,7 +1772,7 @@ void SwXParaFrameEnumerationImpl::FillFrame()
return;
// search for objects at the cursor - anchored at/as char
const auto pTextAttr = m_pUnoCursor->GetNode().GetTextNode()->GetTextAttrForCharAt(
- m_pUnoCursor->GetPoint()->nContent.GetIndex(), RES_TXTATR_FLYCNT);
+ m_pUnoCursor->GetPoint()->GetContentIndex(), RES_TXTATR_FLYCNT);
if(!pTextAttr)
return;
const SwFormatFlyCnt& rFlyCnt = pTextAttr->GetFlyCnt();
diff --git a/sw/source/core/unocore/unoport.cxx b/sw/source/core/unocore/unoport.cxx
index 3fcc05e648bd..dea28ee3a9a7 100644
--- a/sw/source/core/unocore/unoport.cxx
+++ b/sw/source/core/unocore/unoport.cxx
@@ -167,9 +167,9 @@ OUString SwXTextPortion::getString()
SwTextNode* pTextNd = rUnoCursor.GetNode().GetTextNode();
if ( pTextNd )
{
- const sal_Int32 nStt = rUnoCursor.Start()->nContent.GetIndex();
+ const sal_Int32 nStt = rUnoCursor.Start()->GetContentIndex();
aText = pTextNd->GetExpandText(nullptr, nStt,
- rUnoCursor.End()->nContent.GetIndex() - nStt,
+ rUnoCursor.End()->GetContentIndex() - nStt,
false, false, false, ExpandMode::ExpandFootnote);
}
return aText;
diff --git a/sw/source/core/unocore/unoportenum.cxx b/sw/source/core/unocore/unoportenum.cxx
index 883acfca3b31..7d37e1e87900 100644
--- a/sw/source/core/unocore/unoportenum.cxx
+++ b/sw/source/core/unocore/unoportenum.cxx
@@ -101,7 +101,7 @@ namespace
}
sal_Int32 getIndex () const
{
- return aPosition.nContent.GetIndex();
+ return aPosition.GetContentIndex();
}
};
typedef std::shared_ptr < SwXBookmarkPortion_Impl > SwXBookmarkPortion_ImplSharedPtr;
@@ -216,7 +216,7 @@ namespace
sal_Int32 getIndex () const
{
- return maPosition.nContent.GetIndex();
+ return maPosition.GetContentIndex();
}
};
typedef std::shared_ptr < SwAnnotationStartPortion_Impl > SwAnnotationStartPortion_ImplSharedPtr;
@@ -388,8 +388,8 @@ lcl_ExportFieldMark(
uno::Reference<text::XTextRange> xRef;
SwDoc& rDoc = pUnoCursor->GetDoc();
// maybe it's a good idea to add a special hint to the hints array and rely on the hint segmentation...
- const sal_Int32 start = pUnoCursor->Start()->nContent.GetIndex();
- OSL_ENSURE(pUnoCursor->End()->nContent.GetIndex() == start,
+ const sal_Int32 start = pUnoCursor->Start()->GetContentIndex();
+ OSL_ENSURE(pUnoCursor->End()->GetContentIndex() == start,
"hmm --- why is this different");
pUnoCursor->Right(1);
@@ -677,8 +677,8 @@ struct SwXRedlinePortion_Impl
sal_Int32 getRealIndex () const
{
- return m_bStart ? m_pRedline->Start()->nContent.GetIndex()
- : m_pRedline->End() ->nContent.GetIndex();
+ return m_bStart ? m_pRedline->Start()->GetContentIndex()
+ : m_pRedline->End() ->GetContentIndex();
}
};
@@ -1272,7 +1272,7 @@ static void lcl_ExtractFramePositions(FrameClientSortList_t& rFrames, sal_Int32
if (!pPosition)
continue;
- rFramePositions.insert(pPosition->nContent.GetIndex());
+ rFramePositions.insert(pPosition->GetContentIndex());
}
}
@@ -1350,7 +1350,7 @@ static void lcl_CreatePortions(
// set the start if a selection should be exported
if ((i_nStartPos > 0) &&
- (pUnoCursor->Start()->nContent.GetIndex() != i_nStartPos))
+ (pUnoCursor->Start()->GetContentIndex() != i_nStartPos))
{
pUnoCursor->DeleteMark();
OSL_ENSURE(pUnoCursor->Start()->GetNode().GetTextNode() &&
@@ -1403,7 +1403,7 @@ static void lcl_CreatePortions(
SwpHints * const pHints = pTextNode->GetpSwpHints();
const sal_Int32 nCurrentIndex =
- pUnoCursor->GetPoint()->nContent.GetIndex();
+ pUnoCursor->GetPoint()->GetContentIndex();
// this contains the portion which consumes the character in the
// text at nCurrentIndex; i.e. it must be set _once_ per iteration
uno::Reference< XTextRange > xRef;
diff --git a/sw/source/core/unocore/unorefmk.cxx b/sw/source/core/unocore/unorefmk.cxx
index 63aba54f5a2b..39c9b15162d6 100644
--- a/sw/source/core/unocore/unorefmk.cxx
+++ b/sw/source/core/unocore/unorefmk.cxx
@@ -214,7 +214,7 @@ void SwXReferenceMark::Impl::InsertRefMark(SwPaM& rPam,
if (bMark)
{
oldMarks = rPam.GetNode().GetTextNode()->GetTextAttrsAt(
- rPam.GetPoint()->nContent.GetIndex(), RES_TXTATR_REFMARK);
+ rPam.GetPoint()->GetContentIndex(), RES_TXTATR_REFMARK);
}
rDoc2.getIDocumentContentOperations().InsertPoolItem( rPam, aRefMark, nInsertFlags );
@@ -232,7 +232,7 @@ void SwXReferenceMark::Impl::InsertRefMark(SwPaM& rPam,
// ensure that we do not retrieve a different mark at the same position
std::vector<SwTextAttr *> const newMarks(
rPam.GetNode().GetTextNode()->GetTextAttrsAt(
- rPam.GetPoint()->nContent.GetIndex(), RES_TXTATR_REFMARK));
+ rPam.GetPoint()->GetContentIndex(), RES_TXTATR_REFMARK));
std::vector<SwTextAttr *>::const_iterator const iter(
std::find_if(newMarks.begin(), newMarks.end(),
NotContainedIn<SwTextAttr *>(oldMarks)));
@@ -247,7 +247,7 @@ void SwXReferenceMark::Impl::InsertRefMark(SwPaM& rPam,
SwTextNode *pTextNd = rPam.GetNode().GetTextNode();
assert(pTextNd);
pTextAttr = pTextNd ? rPam.GetNode().GetTextNode()->GetTextAttrForCharAt(
- rPam.GetPoint()->nContent.GetIndex() - 1, RES_TXTATR_REFMARK) : nullptr;
+ rPam.GetPoint()->GetContentIndex() - 1, RES_TXTATR_REFMARK) : nullptr;
}
if (!pTextAttr)
@@ -789,7 +789,7 @@ bool SwXMeta::CheckForOwnMemberMeta(const SwPaM & rPam, const bool bAbsorb)
nullptr, 0);
}
bool bForceExpandHints(false);
- const sal_Int32 nStartPos(pStartPos->nContent.GetIndex());
+ const sal_Int32 nStartPos(pStartPos->GetContentIndex());
// not <= but < because nMetaStart is behind dummy char!
// not >= but > because == means insert at end!
if ((nStartPos < nMetaStart) || (nStartPos > nMetaEnd))
@@ -813,7 +813,7 @@ bool SwXMeta::CheckForOwnMemberMeta(const SwPaM & rPam, const bool bAbsorb)
"of text range not in same paragraph as text content",
nullptr, 0);
}
- const sal_Int32 nEndPos(pEndPos->nContent.GetIndex());
+ const sal_Int32 nEndPos(pEndPos->GetContentIndex());
// not <= but < because nMetaStart is behind dummy char!
// not >= but > because == means insert at end!
if ((nEndPos < nMetaStart) || (nEndPos > nMetaEnd))
diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx
index 6bf7299fe0f2..3a3076e9f155 100644
--- a/sw/source/core/unocore/unotbl.cxx
+++ b/sw/source/core/unocore/unotbl.cxx
@@ -2097,7 +2097,7 @@ SwXTextTable::attach(const uno::Reference<text::XTextRange> & xTextRange)
pDoc->GetIDocumentUndoRedo().StartUndo(SwUndoId::EMPTY, nullptr);
const SwTable* pTable(nullptr);
- if( 0 != aPam.Start()->nContent.GetIndex() )
+ if( 0 != aPam.Start()->GetContentIndex() )
{
pDoc->getIDocumentContentOperations().SplitNode(*aPam.Start(), false);
}
diff --git a/sw/source/core/unocore/unotext.cxx b/sw/source/core/unocore/unotext.cxx
index 53fa90128e47..40ddae537e8c 100644
--- a/sw/source/core/unocore/unotext.cxx
+++ b/sw/source/core/unocore/unotext.cxx
@@ -1392,7 +1392,7 @@ SwXText::insertTextPortion(
if (!rText.isEmpty())
{
SwNodeIndex const nodeIndex(rCursor.GetPoint()->nNode, -1);
- const sal_Int32 nContentPos = rCursor.GetPoint()->nContent.GetIndex();
+ const sal_Int32 nContentPos = rCursor.GetPoint()->GetContentIndex();
SwUnoCursorHelper::DocInsertStringSplitCR(
*m_pImpl->m_pDoc, rCursor, rText, false);
SwUnoCursorHelper::SelectPam(rCursor, true);
@@ -1976,7 +1976,7 @@ void SwXText::Impl::ConvertCell(
if (!pLastCell) // first cell?
{
// align the beginning - if necessary
- if (aStartCellPam.Start()->nContent.GetIndex())
+ if (aStartCellPam.Start()->GetContentIndex())
{
m_pDoc->getIDocumentContentOperations().SplitNode(*aStartCellPam.Start(), false);
}
@@ -1990,7 +1990,7 @@ void SwXText::Impl::ConvertCell(
if (nLastNodeEndIndex == nStartCellNodeIndex)
{
// same node as predecessor then equal nContent?
- if (0 != aStartCellPam.Start()->nContent.GetIndex())
+ if (0 != aStartCellPam.Start()->GetContentIndex())
{
throw lang::IllegalArgumentException();
}
@@ -2025,7 +2025,7 @@ void SwXText::Impl::ConvertCell(
}
}
// now check if there's a need to insert another paragraph break
- if (aEndCellPam.End()->nContent.GetIndex() <
+ if (aEndCellPam.End()->GetContentIndex() <
aEndCellPam.End()->GetNode().GetTextNode()->Len())
{
m_pDoc->getIDocumentContentOperations().SplitNode(*aEndCellPam.End(), false);
@@ -2041,8 +2041,8 @@ void SwXText::Impl::ConvertCell(
aEndCellPam.GetNode().GetTextNode()->Len();
}
- assert(aStartCellPam.Start()->nContent.GetIndex() == 0);
- assert(aEndCellPam.End()->nContent.GetIndex() == aEndCellPam.End()->GetNode().GetTextNode()->Len());
+ assert(aStartCellPam.Start()->GetContentIndex() == 0);
+ assert(aEndCellPam.End()->GetContentIndex() == aEndCellPam.End()->GetNode().GetTextNode()->Len());
SwNodeRange aCellRange(aStartCellPam.Start()->nNode,
aEndCellPam.End()->nNode);
rRowNodes.push_back(aCellRange); // note: invalidates pLastCell!
diff --git a/sw/source/core/unocore/unotextmarkup.cxx b/sw/source/core/unocore/unotextmarkup.cxx
index 1e051ceb3ca9..d77e9c0ff758 100644
--- a/sw/source/core/unocore/unotextmarkup.cxx
+++ b/sw/source/core/unocore/unotextmarkup.cxx
@@ -113,7 +113,7 @@ void SAL_CALL SwXTextMarkup::commitTextRangeMarkup(::sal_Int32 nType, const OUSt
auto [startPos, endPos] = aPam.StartEnd(); // SwPosition*
- commitStringMarkup (nType, aIdentifier, startPos->nContent.GetIndex(), endPos->nContent.GetIndex() - startPos->nContent.GetIndex(), xMarkupInfoContainer);
+ commitStringMarkup (nType, aIdentifier, startPos->GetContentIndex(), endPos->GetContentIndex() - startPos->GetContentIndex(), xMarkupInfoContainer);
}
else if (auto pCursor = comphelper::getFromUnoTunnel<OTextCursorHelper>(xRangeTunnel))
{
@@ -121,7 +121,7 @@ void SAL_CALL SwXTextMarkup::commitTextRangeMarkup(::sal_Int32 nType, const OUSt
auto [startPos, endPos] = rPam.StartEnd(); // SwPosition*
- commitStringMarkup (nType, aIdentifier, startPos->nContent.GetIndex(), endPos->nContent.GetIndex() - startPos->nContent.GetIndex(), xMarkupInfoContainer);
+ commitStringMarkup (nType, aIdentifier, startPos->GetContentIndex(), endPos->GetContentIndex() - startPos->GetContentIndex(), xMarkupInfoContainer);
}
}
diff --git a/sw/source/filter/ascii/ascatr.cxx b/sw/source/filter/ascii/ascatr.cxx
index ebcf5965616e..afa4516ea621 100644
--- a/sw/source/filter/ascii/ascatr.cxx
+++ b/sw/source/filter/ascii/ascatr.cxx
@@ -215,19 +215,19 @@ public:
if (nRedlineStart == COMPLETE_STRING)
{
nRedlineStart = pStart->GetNodeIndex() == m_rNode.GetIndex()
- ? pStart->nContent.GetIndex()
+ ? pStart->GetContentIndex()
: 0;
}
else
{
- if (pStart->nContent.GetIndex() != nRedlineEnd)
+ if (pStart->GetContentIndex() != nRedlineEnd)
{
- assert(nRedlineEnd < pStart->nContent.GetIndex());
+ assert(nRedlineEnd < pStart->GetContentIndex());
break; // no increment, revisit it next call
}
}
nRedlineEnd = pEnd->GetNodeIndex() == m_rNode.GetIndex()
- ? pEnd->nContent.GetIndex()
+ ? pEnd->GetContentIndex()
: COMPLETE_STRING;
}
return std::make_pair(nRedlineStart, nRedlineEnd);
@@ -242,12 +242,12 @@ static Writer& OutASC_SwTextNode( Writer& rWrt, SwContentNode& rNode )
{
const SwTextNode& rNd = static_cast<SwTextNode&>(rNode);
- sal_Int32 nStrPos = rWrt.m_pCurrentPam->GetPoint()->nContent.GetIndex();
+ sal_Int32 nStrPos = rWrt.m_pCurrentPam->GetPoint()->GetContentIndex();
const sal_Int32 nNodeEnd = rNd.Len();
sal_Int32 nEnd = nNodeEnd;
bool bLastNd = rWrt.m_pCurrentPam->GetPoint()->nNode == rWrt.m_pCurrentPam->GetMark()->nNode;
if( bLastNd )
- nEnd = rWrt.m_pCurrentPam->GetMark()->nContent.GetIndex();
+ nEnd = rWrt.m_pCurrentPam->GetMark()->GetContentIndex();
bool bIsOneParagraph = rWrt.m_pOrigPam->Start()->nNode == rWrt.m_pOrigPam->End()->nNode && !getenv("SW_ASCII_COPY_NUMBERING");
diff --git a/sw/source/filter/ascii/parasc.cxx b/sw/source/filter/ascii/parasc.cxx
index 01cf3fd8cbef..b1e7c2bc2bac 100644
--- a/sw/source/filter/ascii/parasc.cxx
+++ b/sw/source/filter/ascii/parasc.cxx
@@ -161,7 +161,7 @@ ErrCode SwASCIIParser::CallParser()
{
const SwNodeIndex& rTmp = m_pPam->GetPoint()->nNode;
pInsPam.emplace( rTmp, rTmp, SwNodeOffset(0), SwNodeOffset(-1) );
- nSttContent = m_pPam->GetPoint()->nContent.GetIndex();
+ nSttContent = m_pPam->GetPoint()->GetContentIndex();
}
SwTextFormatColl *pColl = nullptr;
diff --git a/sw/source/filter/ascii/wrtasc.cxx b/sw/source/filter/ascii/wrtasc.cxx
index 5e4480524f43..d06299ce2b0f 100644
--- a/sw/source/filter/ascii/wrtasc.cxx
+++ b/sw/source/filter/ascii/wrtasc.cxx
@@ -124,7 +124,7 @@ ErrCode SwASCWriter::WriteStream()
bool bTstFly = true;
while( m_pCurrentPam->GetPoint()->GetNodeIndex() < m_pCurrentPam->GetMark()->GetNodeIndex() ||
(m_pCurrentPam->GetPoint()->GetNodeIndex() == m_pCurrentPam->GetMark()->GetNodeIndex() &&
- m_pCurrentPam->GetPoint()->nContent.GetIndex() <= m_pCurrentPam->GetMark()->nContent.GetIndex()) )
+ m_pCurrentPam->GetPoint()->GetContentIndex() <= m_pCurrentPam->GetMark()->GetContentIndex()) )
{
SwTextNode* pNd = m_pCurrentPam->GetPoint()->GetNode().GetTextNode();
if( pNd )
diff --git a/sw/source/filter/basflt/fltshell.cxx b/sw/source/filter/basflt/fltshell.cxx
index c2db52c4cb64..29eacda35114 100644
--- a/sw/source/filter/basflt/fltshell.cxx
+++ b/sw/source/filter/basflt/fltshell.cxx
@@ -184,7 +184,7 @@ SwFltControlStack::~SwFltControlStack()
void SwFltControlStack::MoveAttrs(const SwPosition& rPos, MoveAttrsMode eMode)
{
SwNodeOffset nPosNd = rPos.GetNodeIndex();
- sal_uInt16 nPosCt = rPos.nContent.GetIndex() - 1;
+ sal_uInt16 nPosCt = rPos.GetContentIndex() - 1;
for (size_t i = 0, nCnt = m_Entries.size(); i < nCnt; ++i)
{
@@ -591,7 +591,7 @@ void SwFltControlStack::SetAttrInDoc(const SwPosition& rTmpPos,
SwTextNode const*const pTextNode(
aRegion.End()->GetNode().GetTextNode());
SwTextField const*const pField = pTextNode ? pTextNode->GetFieldTextAttrAt(
- aRegion.End()->nContent.GetIndex() - 1, true) : nullptr;
+ aRegion.End()->GetContentIndex() - 1, true) : nullptr;
if (pField)
{
SwPostItField const*const pPostIt(
@@ -770,9 +770,9 @@ void SwFltControlStack::Delete(const SwPaM &rPam)
return;
SwNodeIndex aStartNode(pStt->nNode, -1);
- const sal_Int32 nStartIdx = pStt->nContent.GetIndex();
+ const sal_Int32 nStartIdx = pStt->GetContentIndex();
SwNodeIndex aEndNode(pEnd->nNode, -1);
- const sal_Int32 nEndIdx = pEnd->nContent.GetIndex();
+ const sal_Int32 nEndIdx = pEnd->GetContentIndex();
// We don't support deleting content that is over one node, or removing a node.
OSL_ENSURE(aEndNode == aStartNode, "nodes must be the same, or this method extended");
diff --git a/sw/source/filter/basflt/shellio.cxx b/sw/source/filter/basflt/shellio.cxx
index 47655081cd56..395853dba02d 100644
--- a/sw/source/filter/basflt/shellio.cxx
+++ b/sw/source/filter/basflt/shellio.cxx
@@ -180,7 +180,7 @@ ErrCode SwReader::Read( const Reader& rOptions )
mxDoc->GetSpzFrameFormats()->end() );
}
- const sal_Int32 nSttContent = pPam->GetPoint()->nContent.GetIndex();
+ const sal_Int32 nSttContent = pPam->GetPoint()->GetContentIndex();
// make sure the End position is correct for all Readers
SwContentNode* pCNd = pPam->GetContentNode();
diff --git a/sw/source/filter/html/htmlatr.cxx b/sw/source/filter/html/htmlatr.cxx
index 41afa3638a85..4692a6f56b94 100644
--- a/sw/source/filter/html/htmlatr.cxx
+++ b/sw/source/filter/html/htmlatr.cxx
@@ -2184,7 +2184,7 @@ Writer& OutHTML_SwTextNode( Writer& rWrt, const SwContentNode& rNode )
if( rHTMLWrt.m_pCurrentPam->GetPoint()->nNode == rHTMLWrt.m_pCurrentPam->GetMark()->nNode )
{
- nEnd = rHTMLWrt.m_pCurrentPam->GetMark()->nContent.GetIndex();
+ nEnd = rHTMLWrt.m_pCurrentPam->GetMark()->GetContentIndex();
}
// are there any hard attributes that must be written as options?
@@ -2281,7 +2281,7 @@ Writer& OutHTML_SwTextNode( Writer& rWrt, const SwContentNode& rNode )
rHTMLWrt.m_bTextAttr = true;
size_t nAttrPos = 0;
- sal_Int32 nStrPos = rHTMLWrt.m_pCurrentPam->GetPoint()->nContent.GetIndex();
+ sal_Int32 nStrPos = rHTMLWrt.m_pCurrentPam->GetPoint()->GetContentIndex();
const SwTextAttr * pHt = nullptr;
const size_t nCntAttr = pNd->HasHints() ? pNd->GetSwpHints().Count() : 0;
if( nCntAttr && nStrPos > ( pHt = pNd->GetSwpHints().Get(0) )->GetStart() )
@@ -2470,7 +2470,7 @@ Writer& OutHTML_SwTextNode( Writer& rWrt, const SwContentNode& rNode )
// Placeholder for a single-point fieldmark.
SwPosition aMarkPos = *rWrt.m_pCurrentPam->GetPoint();
- aMarkPos.nContent += nStrPos - aMarkPos.nContent.GetIndex();
+ aMarkPos.nContent += nStrPos - aMarkPos.GetContentIndex();
rHTMLWrt.OutPointFieldmarks(aMarkPos);
}
else
diff --git a/sw/source/filter/html/htmlcss1.cxx b/sw/source/filter/html/htmlcss1.cxx
index dc71483ab82b..c4e601825931 100644
--- a/sw/source/filter/html/htmlcss1.cxx
+++ b/sw/source/filter/html/htmlcss1.cxx
@@ -1974,7 +1974,7 @@ void SwHTMLParser::SetAnchorAndAdjustment( const SvxCSS1PropertyInfo &rPropInfo,
// still empty and otherwise auto-bound.
// Auto-bound frames for the time being inserted at the previous position
// and later moved.
- const sal_Int32 nContent = m_pPam->GetPoint()->nContent.GetIndex();
+ const sal_Int32 nContent = m_pPam->GetPoint()->GetContentIndex();
if( nContent )
{
aAnchor.SetType( RndStdIds::FLY_AT_CHAR );
@@ -2220,7 +2220,7 @@ void SwHTMLParser::EndContextAttrs( HTMLAttrContext *pContext )
{
// Set the number of characters for DropCaps. If it's zero at the
// end, the attribute is set to invalid and then isn't set from SetAttr.
- sal_Int32 nChars = m_pPam->GetPoint()->nContent.GetIndex();
+ sal_Int32 nChars = m_pPam->GetPoint()->GetContentIndex();
if( nChars < 1 )
pAttr->Invalidate();
else if( nChars > MAX_DROPCAP_CHARS )
diff --git a/sw/source/filter/html/htmlctxt.cxx b/sw/source/filter/html/htmlctxt.cxx
index 30d21fb30609..b7d5283fc4ed 100644
--- a/sw/source/filter/html/htmlctxt.cxx
+++ b/sw/source/filter/html/htmlctxt.cxx
@@ -182,10 +182,10 @@ void SwHTMLParser::SplitAttrTab( const SwPosition& rNewPos )
#ifndef NDEBUG
auto const nOld(pOldEndPara->GetIndex());
#endif
- sal_Int32 nOldEndCnt = m_pPam->GetPoint()->nContent.GetIndex();
+ sal_Int32 nOldEndCnt = m_pPam->GetPoint()->GetContentIndex();
const SwNodeIndex& rNewSttPara = rNewPos.nNode;
- sal_Int32 nNewSttCnt = rNewPos.nContent.GetIndex();
+ sal_Int32 nNewSttCnt = rNewPos.GetContentIndex();
bool bMoveBack = false;
@@ -207,13 +207,13 @@ void SwHTMLParser::SplitAttrTab( const SwPosition& rNewPos )
if( !bMoveBack )
{
bMoveBack = m_pPam->Move( fnMoveBackward );
- nOldEndCnt = m_pPam->GetPoint()->nContent.GetIndex();
+ nOldEndCnt = m_pPam->GetPoint()->GetContentIndex();
}
}
else if( bMoveBack )
{
m_pPam->Move( fnMoveForward );
- nOldEndCnt = m_pPam->GetPoint()->nContent.GetIndex();
+ nOldEndCnt = m_pPam->GetPoint()->GetContentIndex();
bMoveBack = false;
}
@@ -400,7 +400,7 @@ void SwHTMLParser::EndContext( HTMLAttrContext *pContext )
// Add a paragraph break if needed
if( AM_NONE != pContext->GetAppendMode() &&
- m_pPam->GetPoint()->nContent.GetIndex() )
+ m_pPam->GetPoint()->GetContentIndex() )
AppendTextNode( pContext->GetAppendMode() );
// Restart PRE, LISTING and XMP environments
@@ -535,7 +535,7 @@ void SwHTMLParser::InsertAttrs( SfxItemSet &rItemSet,
bool bCharLvl )
{
// Put together a DropCap attribute, if a "float:left" is before the first character
- if( bCharLvl && !m_pPam->GetPoint()->nContent.GetIndex() &&
+ if( bCharLvl && !m_pPam->GetPoint()->GetContentIndex() &&
SvxAdjust::Left == rPropInfo.m_eFloat )
{
SwFormatDrop aDrop;
diff --git a/sw/source/filter/html/htmlfld.cxx b/sw/source/filter/html/htmlfld.cxx
index 6889ad4fee2c..84bd66a8057c 100644
--- a/sw/source/filter/html/htmlfld.cxx
+++ b/sw/source/filter/html/htmlfld.cxx
@@ -610,7 +610,7 @@ void SwHTMLParser::InsertComment( const OUString& rComment, const char *pTag )
// MIB 24.06.97: If a PostIt should be insert after a space, we
// will insert before the space. Then there are less problems
// during formatting. (bug #40483#)
- const sal_Int32 nPos = m_pPam->GetPoint()->nContent.GetIndex();
+ const sal_Int32 nPos = m_pPam->GetPoint()->GetContentIndex();
SwTextNode *pTextNd = m_pPam->GetNode().GetTextNode();
bool bMoveFwd = false;
if (nPos>0 && pTextNd && (' ' == pTextNd->GetText()[nPos-1]))
@@ -618,7 +618,7 @@ void SwHTMLParser::InsertComment( const OUString& rComment, const char *pTag )
bMoveFwd = true;
SwNodeOffset nNodeIdx = m_pPam->GetPoint()->GetNodeIndex();
- const sal_Int32 nIdx = m_pPam->GetPoint()->nContent.GetIndex();
+ const sal_Int32 nIdx = m_pPam->GetPoint()->GetContentIndex();
for( auto i = m_aSetAttrTab.size(); i > 0; )
{
HTMLAttr *pAttr = m_aSetAttrTab[--i];
diff --git a/sw/source/filter/html/htmlfly.cxx b/sw/source/filter/html/htmlfly.cxx
index df8eb9116ccc..891ddf1a398b 100644
--- a/sw/source/filter/html/htmlfly.cxx
+++ b/sw/source/filter/html/htmlfly.cxx
@@ -51,7 +51,7 @@ SwHTMLPosFlyFrame::SwHTMLPosFlyFrame( const SwPosFlyFrame& rPosFly,
if( !rAnchor.GetContentAnchor() )
return;
- m_nContentIndex = rAnchor.GetContentAnchor()->nContent.GetIndex();
+ m_nContentIndex = rAnchor.GetContentAnchor()->GetContentIndex();
sal_Int16 eHoriRel = rPosFly.GetFormat().GetHoriOrient().
GetRelationOrient();
if( text::RelOrientation::FRAME == eHoriRel || text::RelOrientation::PRINT_AREA == eHoriRel )
diff --git a/sw/source/filter/html/htmlform.cxx b/sw/source/filter/html/htmlform.cxx
index c1b548c104d3..e4ea32230b79 100644
--- a/sw/source/filter/html/htmlform.cxx
+++ b/sw/source/filter/html/htmlform.cxx
@@ -1197,7 +1197,7 @@ void SwHTMLParser::NewForm( bool bAppend )
if( bAppend )
{
- if( m_pPam->GetPoint()->nContent.GetIndex() )
+ if( m_pPam->GetPoint()->GetContentIndex() )
AppendTextNode( AM_SPACE );
else
AddParSpace();
@@ -1360,7 +1360,7 @@ void SwHTMLParser::EndForm( bool bAppend )
{
if( bAppend )
{
- if( m_pPam->GetPoint()->nContent.GetIndex() )
+ if( m_pPam->GetPoint()->GetContentIndex() )
AppendTextNode( AM_SPACE );
else
AddParSpace();
diff --git a/sw/source/filter/html/htmlftn.cxx b/sw/source/filter/html/htmlftn.cxx
index 957a4d45e966..45f5b76b84eb 100644
--- a/sw/source/filter/html/htmlftn.cxx
+++ b/sw/source/filter/html/htmlftn.cxx
@@ -202,7 +202,7 @@ void SwHTMLParser::FinishFootEndNote()
m_xDoc->getIDocumentContentOperations().InsertPoolItem( *m_pPam, aFootnote );
SwTextFootnote * const pTextFootnote = static_cast<SwTextFootnote *>(
m_pPam->GetNode().GetTextNode()->GetTextAttrForCharAt(
- m_pPam->GetPoint()->nContent.GetIndex() - 1, RES_TXTATR_FTN ) );
+ m_pPam->GetPoint()->GetContentIndex() - 1, RES_TXTATR_FTN ) );
// In header and footer no footnotes can be inserted.
if (pTextFootnote)
m_pFootEndNoteImpl->aTextFootnotes.push_back(SwHTMLTextFootnote(m_pFootEndNoteImpl->sName,pTextFootnote));
diff --git a/sw/source/filter/html/htmlgrin.cxx b/sw/source/filter/html/htmlgrin.cxx
index ba5d09dce50a..517750c0d51d 100644
--- a/sw/source/filter/html/htmlgrin.cxx
+++ b/sw/source/filter/html/htmlgrin.cxx
@@ -237,7 +237,7 @@ void SwHTMLParser::SetAnchorAndAdjustment( sal_Int16 eVertOri,
}
// determine vertical alignment and anchoring
- const sal_Int32 nContent = m_pPam->GetPoint()->nContent.GetIndex();
+ const sal_Int32 nContent = m_pPam->GetPoint()->GetContentIndex();
if( nContent )
{
aAnchor.SetType( RndStdIds::FLY_AT_CHAR );
@@ -283,7 +283,7 @@ void SwHTMLParser::RegisterFlyFrame( SwFrameFormat *pFlyFormat )
css::text::WrapTextMode_THROUGH == pFlyFormat->GetSurround().GetSurround() )
{
m_aMoveFlyFrames.emplace_back(std::make_unique<SwHTMLFrameFormatListener>(pFlyFormat));
- m_aMoveFlyCnts.push_back( m_pPam->GetPoint()->nContent.GetIndex() );
+ m_aMoveFlyCnts.push_back( m_pPam->GetPoint()->GetContentIndex() );
}
}
@@ -462,7 +462,7 @@ IMAGE_SETEVENT:
// When we are in an ordered list and the paragraph is still empty and not
// numbered, it may be a graphic for a bullet list.
- if( !m_pPam->GetPoint()->nContent.GetIndex() &&
+ if( !m_pPam->GetPoint()->GetContentIndex() &&
GetNumInfo().GetDepth() > 0 && GetNumInfo().GetDepth() <= MAXLEVEL &&
!m_aBulletGrfs[GetNumInfo().GetDepth()-1].isEmpty() &&
m_aBulletGrfs[GetNumInfo().GetDepth()-1]==sGrfNm )
@@ -853,7 +853,7 @@ IMAGE_SETEVENT:
m_xAttrTab->pINetFormat->GetStartParagraph() ==
m_pPam->GetPoint()->nNode &&
m_xAttrTab->pINetFormat->GetStartContent() ==
- m_pPam->GetPoint()->nContent.GetIndex() - 1 )
+ m_pPam->GetPoint()->GetContentIndex() - 1 )
{
// the attribute was insert right before as-character anchored
// graphic, therefore we move it
@@ -1419,7 +1419,7 @@ void SwHTMLParser::StripTrailingPara()
SwContentNode* pCNd = m_pPam->GetContentNode();
SwNodeOffset nNodeIdx = m_pPam->GetPoint()->GetNodeIndex();
- if( !m_pPam->GetPoint()->nContent.GetIndex() )
+ if( !m_pPam->GetPoint()->GetContentIndex() )
{
if( pCNd && pCNd->StartOfSectionIndex() + 2 <
pCNd->EndOfSectionIndex() && CanRemoveNode(nNodeIdx))
@@ -1507,7 +1507,7 @@ void SwHTMLParser::StripTrailingPara()
bSetSmallFont = true;
SwTextNode* pTextNd = pCNd->GetTextNode();
- sal_Int32 nPos = m_pPam->GetPoint()->nContent.GetIndex();
+ sal_Int32 nPos = m_pPam->GetPoint()->GetContentIndex();
while( bSetSmallFont && nPos>0 )
{
--nPos;
diff --git a/sw/source/filter/html/htmlnumreader.cxx b/sw/source/filter/html/htmlnumreader.cxx
index 3c25dacdb3e0..7fb3777ccf0f 100644
--- a/sw/source/filter/html/htmlnumreader.cxx
+++ b/sw/source/filter/html/htmlnumreader.cxx
@@ -56,7 +56,7 @@ void SwHTMLParser::NewNumberBulletList( HtmlTokenId nToken )
// Create a new paragraph
bool bSpace = (rInfo.GetDepth() + m_nDefListDeep) == 0;
- if( m_pPam->GetPoint()->nContent.GetIndex() )
+ if( m_pPam->GetPoint()->GetContentIndex() )
AppendTextNode( bSpace ? AM_SPACE : AM_NOSPACE, false );
else if( bSpace )
AddParSpace();
@@ -334,7 +334,7 @@ void SwHTMLParser::EndNumberBulletList( HtmlTokenId nToken )
// A new paragraph needs to be created, when
// - the current one isn't empty (it contains text or paragraph-bound objects)
// - the current one is numbered
- bool bAppend = m_pPam->GetPoint()->nContent.GetIndex() > 0;
+ bool bAppend = m_pPam->GetPoint()->GetContentIndex() > 0;
if( !bAppend )
{
SwTextNode* pTextNode = m_pPam->GetNode().GetTextNode();
@@ -463,7 +463,7 @@ void SwHTMLParser::NewNumberBulletListItem( HtmlTokenId nToken )
}
// create a new paragraph
- if( m_pPam->GetPoint()->nContent.GetIndex() )
+ if( m_pPam->GetPoint()->GetContentIndex() )
AppendTextNode( AM_NOSPACE, false );
m_bNoParSpace = false; // no space in <LI>!
@@ -555,7 +555,7 @@ void SwHTMLParser::NewNumberBulletListItem( HtmlTokenId nToken )
void SwHTMLParser::EndNumberBulletListItem( HtmlTokenId nToken, bool bSetColl )
{
// Create a new paragraph
- if( nToken == HtmlTokenId::NONE && m_pPam->GetPoint()->nContent.GetIndex() )
+ if( nToken == HtmlTokenId::NONE && m_pPam->GetPoint()->GetContentIndex() )
AppendTextNode( AM_NOSPACE );
// Get context to that token and pop it from stack
diff --git a/sw/source/filter/html/htmlsect.cxx b/sw/source/filter/html/htmlsect.cxx
index 58e33bca84c9..b60e0f7883a5 100644
--- a/sw/source/filter/html/htmlsect.cxx
+++ b/sw/source/filter/html/htmlsect.cxx
@@ -103,7 +103,7 @@ void SwHTMLParser::NewDivision( HtmlTokenId nToken )
}
bool bAppended = false;
- if( m_pPam->GetPoint()->nContent.GetIndex() )
+ if( m_pPam->GetPoint()->GetContentIndex() )
{
AppendTextNode( bHeader||bFooter||!aId.isEmpty()|| !aHRef.isEmpty() ? AM_NORMAL
: AM_NOSPACE );
@@ -656,7 +656,7 @@ void SwHTMLParser::NewMultiCol( sal_uInt16 columnsFromCss )
bool bAppended = false;
if( !bPositioned )
{
- if( m_pPam->GetPoint()->nContent.GetIndex() )
+ if( m_pPam->GetPoint()->GetContentIndex() )
{
AppendTextNode( AM_SPACE );
bAppended = true;
diff --git a/sw/source/filter/html/htmltab.cxx b/sw/source/filter/html/htmltab.cxx
index 0678412ead87..707e60acd34b 100644
--- a/sw/source/filter/html/htmltab.cxx
+++ b/sw/source/filter/html/htmltab.cxx
@@ -2668,7 +2668,7 @@ sal_Int32 SwHTMLParser::StripTrailingLF()
return nStripped;
}
- const sal_Int32 nLen = m_pPam->GetPoint()->nContent.GetIndex();
+ const sal_Int32 nLen = m_pPam->GetPoint()->GetContentIndex();
if( nLen )
{
SwTextNode* pTextNd = m_pPam->GetPoint()->GetNode().GetTextNode();
@@ -3090,7 +3090,7 @@ void CellSaveStruct::InsertCell( SwHTMLParser& rParser,
void CellSaveStruct::StartNoBreak( const SwPosition& rPos )
{
if( !m_xCnts ||
- (!rPos.nContent.GetIndex() && m_pCurrCnts == m_xCnts.get() &&
+ (!rPos.GetContentIndex() && m_pCurrCnts == m_xCnts.get() &&
m_xCnts->GetStartNode() &&
m_xCnts->GetStartNode()->GetIndex() + 1 ==
rPos.GetNodeIndex()) )
@@ -3104,7 +3104,7 @@ void CellSaveStruct::EndNoBreak( const SwPosition& rPos )
if( m_bNoBreak )
{
m_pNoBreakEndNodeIndex.reset( new SwNodeIndex( rPos.nNode ) );
- m_nNoBreakEndContentPos = rPos.nContent.GetIndex();
+ m_nNoBreakEndContentPos = rPos.GetContentIndex();
m_bNoBreak = false;
}
}
@@ -3122,12 +3122,12 @@ void CellSaveStruct::CheckNoBreak( const SwPosition& rPos )
else if( m_pNoBreakEndNodeIndex &&
m_pNoBreakEndNodeIndex->GetIndex() == rPos.GetNodeIndex() )
{
- if( m_nNoBreakEndContentPos == rPos.nContent.GetIndex() )
+ if( m_nNoBreakEndContentPos == rPos.GetContentIndex() )
{
// <NOBR> was closed immediately before the cell end
m_xCnts->SetNoBreak();
}
- else if( m_nNoBreakEndContentPos + 1 == rPos.nContent.GetIndex() )
+ else if( m_nNoBreakEndContentPos + 1 == rPos.GetContentIndex() )
{
SwTextNode const*const pTextNd(rPos.GetNode().GetTextNode());
if( pTextNd )
@@ -3162,7 +3162,7 @@ std::unique_ptr<HTMLTableCnts> SwHTMLParser::InsertTableContents(
// Reset attributation start
const SwNodeIndex& rSttPara = m_pPam->GetPoint()->nNode;
- sal_Int32 nSttCnt = m_pPam->GetPoint()->nContent.GetIndex();
+ sal_Int32 nSttCnt = m_pPam->GetPoint()->GetContentIndex();
HTMLAttr** pHTMLAttributes = reinterpret_cast<HTMLAttr**>(m_xAttrTab.get());
for (sal_uInt16 nCnt = sizeof(HTMLAttrTable) / sizeof(HTMLAttr*); nCnt--; ++pHTMLAttributes)
@@ -3302,13 +3302,13 @@ void SwHTMLParser::BuildTableCell( HTMLTable *pCurTable, bool bReadOptions,
// Otherwise, we need to open a new paragraph if the paragraph
// is empty or contains text frames or bookmarks
bAppend =
- m_pPam->GetPoint()->nContent.GetIndex() ||
+ m_pPam->GetPoint()->GetContentIndex() ||
HasCurrentParaFlys() ||
HasCurrentParaBookmarks();
}
if( bAppend )
{
- if( !m_pPam->GetPoint()->nContent.GetIndex() )
+ if( !m_pPam->GetPoint()->GetContentIndex() )
{
//Set default to CJK and CTL
m_xDoc->SetTextFormatColl( *m_pPam,
@@ -3383,7 +3383,7 @@ void SwHTMLParser::BuildTableCell( HTMLTable *pCurTable, bool bReadOptions,
// still empty paragraph, since it's not gonna be deleted that way
if( (bTopTable && !bAppended) ||
(!bTopTable && !bParentLFStripped &&
- !m_pPam->GetPoint()->nContent.GetIndex()) )
+ !m_pPam->GetPoint()->GetContentIndex()) )
pPostIts.emplace();
SetAttr( bTopTable, bTopTable, pPostIts ? &*pPostIts : nullptr );
}
@@ -3468,7 +3468,7 @@ void SwHTMLParser::BuildTableCell( HTMLTable *pCurTable, bool bReadOptions,
// create a SwTable with a box and set the PaM to the content of
// the box section (the adjustment parameter is a dummy for now
// and will be corrected later)
- OSL_ENSURE( !m_pPam->GetPoint()->nContent.GetIndex(),
+ OSL_ENSURE( !m_pPam->GetPoint()->GetContentIndex(),
"The paragraph after the table is not empty!" );
const SwTable* pSwTable = m_xDoc->InsertTable(
SwInsertTableOptions( SwInsertTableFlags::HeadlineNoBorder, 1 ),
@@ -3844,7 +3844,7 @@ void SwHTMLParser::BuildTableCell( HTMLTable *pCurTable, bool bReadOptions,
}
// Remove LFs at the paragraph end
- if (StripTrailingLF() == 0 && !m_pPam->GetPoint()->nContent.GetIndex())
+ if (StripTrailingLF() == 0 && !m_pPam->GetPoint()->GetContentIndex())
{
HTMLTableContext* pTableContext = m_xTable ? m_xTable->GetContext() : nullptr;
SwPosition* pSavedPos = pTableContext ? pTableContext->GetPos() : nullptr;
@@ -4665,13 +4665,13 @@ void SwHTMLParser::BuildTableCaption( HTMLTable *pCurTable )
{
// On moving the caption later, the last paragraph isn't moved as well.
// That means, there has to be an empty paragraph at the end of the section
- if( m_pPam->GetPoint()->nContent.GetIndex() || bLFStripped )
+ if( m_pPam->GetPoint()->GetContentIndex() || bLFStripped )
AppendTextNode( AM_NOSPACE );
}
else
{
// Strip LFs at the end of the paragraph
- if( !m_pPam->GetPoint()->nContent.GetIndex() && !bLFStripped )
+ if( !m_pPam->GetPoint()->GetContentIndex() && !bLFStripped )
StripTrailingPara();
}
diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx
index 3d55e56f28d2..e8980241b3a0 100644
--- a/sw/source/filter/html/swhtml.cxx
+++ b/sw/source/filter/html/swhtml.cxx
@@ -768,13 +768,13 @@ void SwHTMLParser::Continue( HtmlTokenId nToken )
if( m_pSttNdIdx->GetIndex()+1 == m_pPam->GetBound().GetNodeIndex() )
{
- const sal_Int32 nCntPos = m_pPam->GetBound().nContent.GetIndex();
+ const sal_Int32 nCntPos = m_pPam->GetBound().GetContentIndex();
m_pPam->GetBound().nContent.Assign( pTextNode,
pTextNode->GetText().getLength() + nCntPos );
}
if( m_pSttNdIdx->GetIndex()+1 == m_pPam->GetBound( false ).GetNodeIndex() )
{
- const sal_Int32 nCntPos = m_pPam->GetBound( false ).nContent.GetIndex();
+ const sal_Int32 nCntPos = m_pPam->GetBound( false ).GetContentIndex();
m_pPam->GetBound( false ).nContent.Assign( pTextNode,
pTextNode->GetText().getLength() + nCntPos );
}
@@ -801,7 +801,7 @@ void SwHTMLParser::Continue( HtmlTokenId nToken )
// now remove the last useless paragraph
SwPosition* pPos = m_pPam->GetPoint();
- if( !pPos->nContent.GetIndex() && !bLFStripped )
+ if( !pPos->GetContentIndex() && !bLFStripped )
{
SwTextNode* pCurrentNd;
SwNodeOffset nNodeIdx = pPos->GetNodeIndex();
@@ -811,7 +811,7 @@ void SwHTMLParser::Continue( HtmlTokenId nToken )
if( IsNewDoc() )
{
- if (!m_pPam->GetPoint()->nContent.GetIndex() && CanRemoveNode(nNodeIdx))
+ if (!m_pPam->GetPoint()->GetContentIndex() && CanRemoveNode(nNodeIdx))
{
SwContentNode* pCNd = m_pPam->GetContentNode();
if( pCNd && pCNd->StartOfSectionIndex()+2 <
@@ -855,7 +855,7 @@ void SwHTMLParser::Continue( HtmlTokenId nToken )
// annul the SplitNode from the beginning
else if( !IsNewDoc() )
{
- if( pPos->nContent.GetIndex() ) // then there was no <p> at the end
+ if( pPos->GetContentIndex() ) // then there was no <p> at the end
m_pPam->Move( fnMoveForward, GoInNode ); // therefore to the next
SwTextNode* pTextNode = pPos->GetNode().GetTextNode();
SwNodeIndex aPrvIdx( pPos->nNode );
@@ -1488,7 +1488,7 @@ void SwHTMLParser::NextToken( HtmlTokenId nToken )
// CR in PRE/LISTING/XMP
{
if( HtmlTokenId::NEWPARA==nToken ||
- m_pPam->GetPoint()->nContent.GetIndex() )
+ m_pPam->GetPoint()->GetContentIndex() )
{
AppendTextNode(); // there is no LF at this place
// therefore it will cause no problems
@@ -1509,7 +1509,7 @@ void SwHTMLParser::NextToken( HtmlTokenId nToken )
break;
case HtmlTokenId::LINEFEEDCHAR:
- if( m_pPam->GetPoint()->nContent.GetIndex() )
+ if( m_pPam->GetPoint()->GetContentIndex() )
AppendTextNode();
if (!m_xTable && !m_xDoc->IsInHeaderFooter(m_pPam->GetPoint()->nNode))
{
@@ -1522,7 +1522,7 @@ void SwHTMLParser::NextToken( HtmlTokenId nToken )
// insert string without spanning attributes at the end.
if( !aToken.isEmpty() && ' '==aToken[0] && !IsReadPRE() )
{
- sal_Int32 nPos = m_pPam->GetPoint()->nContent.GetIndex();
+ sal_Int32 nPos = m_pPam->GetPoint()->GetContentIndex();
const SwTextNode* pTextNode = nPos ? m_pPam->GetPoint()->GetNode().GetTextNode() : nullptr;
if (pTextNode)
{
@@ -1820,7 +1820,7 @@ void SwHTMLParser::NextToken( HtmlTokenId nToken )
case HtmlTokenId::LI_ON:
case HtmlTokenId::LISTHEADER_ON:
if( m_nOpenParaToken != HtmlTokenId::NONE &&
- (m_pPam->GetPoint()->nContent.GetIndex()
+ (m_pPam->GetPoint()->GetContentIndex()
|| HtmlTokenId::PARABREAK_ON==m_nOpenParaToken) )
{
// only finish paragraph for <P><LI>, not for <DD><LI>
@@ -2145,7 +2145,7 @@ void SwHTMLParser::NextToken( HtmlTokenId nToken )
// if there are temporary paragraph attributes and the
// paragraph isn't empty then the paragraph attributes are final.
- if( !m_aParaAttrs.empty() && m_pPam->GetPoint()->nContent.GetIndex() )
+ if( !m_aParaAttrs.empty() && m_pPam->GetPoint()->GetContentIndex() )
m_aParaAttrs.clear();
}
@@ -2237,7 +2237,7 @@ bool SwHTMLParser::AppendTextNode( SwHTMLAppendMode eMode, bool bUpdateNum )
// split character attributes and maybe set none,
// which are set for the whole paragraph
const SwNodeIndex& rEndIdx = aOldPos.nNode;
- const sal_Int32 nEndCnt = aOldPos.nContent.GetIndex();
+ const sal_Int32 nEndCnt = aOldPos.GetContentIndex();
const SwPosition& rPos = *m_pPam->GetPoint();
HTMLAttr** pHTMLAttributes = reinterpret_cast<HTMLAttr**>(m_xAttrTab.get());
@@ -2746,7 +2746,7 @@ void SwHTMLParser::SetAttr_( bool bChkEnd, bool bBeforeTable,
{
SwPaM aAttrPam( *m_pPam->GetPoint() );
const SwNodeIndex& rEndIdx = m_pPam->GetPoint()->nNode;
- const sal_Int32 nEndCnt = m_pPam->GetPoint()->nContent.GetIndex();
+ const sal_Int32 nEndCnt = m_pPam->GetPoint()->GetContentIndex();
HTMLAttr* pAttr;
SwContentNode* pCNd;
@@ -2891,7 +2891,7 @@ void SwHTMLParser::SetAttr_( bool bChkEnd, bool bBeforeTable,
if( aAttrPam.GetMark()->GetNodeIndex() !=
rEndIdx.GetIndex() )
{
- OSL_ENSURE( !aAttrPam.GetPoint()->nContent.GetIndex(),
+ OSL_ENSURE( !aAttrPam.GetPoint()->GetContentIndex(),
"Content-Position before table not 0???" );
aAttrPam.Move( fnMoveBackward );
}
@@ -3069,7 +3069,7 @@ void SwHTMLParser::SetAttr_( bool bChkEnd, bool bBeforeTable,
aAttrPam.GetPoint()->GetNodeIndex() == rEndIdx.GetIndex() )
{
OSL_ENSURE( !bBeforeTable, "Aha, the case does occur" );
- OSL_ENSURE( !aAttrPam.GetPoint()->nContent.GetIndex(),
+ OSL_ENSURE( !aAttrPam.GetPoint()->GetContentIndex(),
"Content-Position before table not 0???" );
// !!!
aAttrPam.Move( fnMoveBackward );
@@ -3109,7 +3109,7 @@ bool SwHTMLParser::EndAttr( HTMLAttr* pAttr, bool bChkEmpty )
// save the current position as end position
const SwNodeIndex* pEndIdx = &m_pPam->GetPoint()->nNode;
- sal_Int32 nEndCnt = m_pPam->GetPoint()->nContent.GetIndex();
+ sal_Int32 nEndCnt = m_pPam->GetPoint()->GetContentIndex();
// Is the last started or an earlier started attribute being ended?
HTMLAttr *pLast = nullptr;
@@ -3134,7 +3134,7 @@ bool SwHTMLParser::EndAttr( HTMLAttr* pAttr, bool bChkEmpty )
{
// Then move back one position in the content!
bMoveBack = m_pPam->Move( fnMoveBackward );
- nEndCnt = m_pPam->GetPoint()->nContent.GetIndex();
+ nEndCnt = m_pPam->GetPoint()->GetContentIndex();
}
// now end the attribute
@@ -3360,7 +3360,7 @@ void SwHTMLParser::SplitAttrTab( std::shared_ptr<HTMLAttrTable> const & rNewAttr
HTMLAttr** pHTMLAttributes = reinterpret_cast<HTMLAttr**>(m_xAttrTab.get());
HTMLAttr** pSaveAttributes = reinterpret_cast<HTMLAttr**>(rNewAttrTab.get());
bool bSetAttr = true;
- const sal_Int32 nSttCnt = m_pPam->GetPoint()->nContent.GetIndex();
+ const sal_Int32 nSttCnt = m_pPam->GetPoint()->GetContentIndex();
sal_Int32 nEndCnt = nSttCnt;
if( bMoveEndBack )
@@ -3948,7 +3948,7 @@ void SwHTMLParser::EndFontAttr( HtmlTokenId nToken )
void SwHTMLParser::NewPara()
{
- if( m_pPam->GetPoint()->nContent.GetIndex() )
+ if( m_pPam->GetPoint()->GetContentIndex() )
AppendTextNode( AM_SPACE );
else
AddParSpace();
@@ -4035,7 +4035,7 @@ void SwHTMLParser::EndPara( bool bReal )
// Netscape skips empty paragraphs, we do the same.
if( bReal )
{
- if( m_pPam->GetPoint()->nContent.GetIndex() )
+ if( m_pPam->GetPoint()->GetContentIndex() )
AppendTextNode( AM_SPACE );
else
AddParSpace();
@@ -4104,7 +4104,7 @@ void SwHTMLParser::NewHeading( HtmlTokenId nToken )
}
// open a new paragraph
- if( m_pPam->GetPoint()->nContent.GetIndex() )
+ if( m_pPam->GetPoint()->GetContentIndex() )
AppendTextNode( AM_SPACE );
else
AddParSpace();
@@ -4158,7 +4158,7 @@ void SwHTMLParser::NewHeading( HtmlTokenId nToken )
void SwHTMLParser::EndHeading()
{
// open a new paragraph
- if( m_pPam->GetPoint()->nContent.GetIndex() )
+ if( m_pPam->GetPoint()->GetContentIndex() )
AppendTextNode( AM_SPACE );
else
AddParSpace();
@@ -4253,7 +4253,7 @@ void SwHTMLParser::NewTextFormatColl( HtmlTokenId nToken, sal_uInt16 nColl )
OSL_ENSURE( false, "unknown style" );
break;
}
- if( m_pPam->GetPoint()->nContent.GetIndex() )
+ if( m_pPam->GetPoint()->GetContentIndex() )
AppendTextNode( eMode );
else if( AM_SPACE==eMode )
AddParSpace();
@@ -4306,7 +4306,7 @@ void SwHTMLParser::EndTextFormatColl( HtmlTokenId nToken )
OSL_ENSURE( false, "unknown style" );
break;
}
- if( m_pPam->GetPoint()->nContent.GetIndex() )
+ if( m_pPam->GetPoint()->GetContentIndex() )
AppendTextNode( eMode );
else if( AM_SPACE==eMode )
AddParSpace();
@@ -4357,7 +4357,7 @@ void SwHTMLParser::NewDefList()
// open a new paragraph
bool bSpace = (GetNumInfo().GetDepth() + m_nDefListDeep) == 0;
- if( m_pPam->GetPoint()->nContent.GetIndex() )
+ if( m_pPam->GetPoint()->GetContentIndex() )
AppendTextNode( bSpace ? AM_SPACE : AM_SOFTNOSPACE );
else if( bSpace )
AddParSpace();
@@ -4432,7 +4432,7 @@ void SwHTMLParser::NewDefList()
void SwHTMLParser::EndDefList()
{
bool bSpace = (GetNumInfo().GetDepth() + m_nDefListDeep) == 1;
- if( m_pPam->GetPoint()->nContent.GetIndex() )
+ if( m_pPam->GetPoint()->GetContentIndex() )
AppendTextNode( bSpace ? AM_SPACE : AM_SOFTNOSPACE );
else if( bSpace )
AddParSpace();
@@ -4495,7 +4495,7 @@ void SwHTMLParser::NewDefListItem( HtmlTokenId nToken )
void SwHTMLParser::EndDefListItem( HtmlTokenId nToken )
{
// open a new paragraph
- if( nToken == HtmlTokenId::NONE && m_pPam->GetPoint()->nContent.GetIndex() )
+ if( nToken == HtmlTokenId::NONE && m_pPam->GetPoint()->GetContentIndex() )
AppendTextNode( AM_SOFTNOSPACE );
// search context matching the token and fetch it from stack
@@ -4980,7 +4980,7 @@ void SwHTMLParser::InsertSpacer()
// set a paragraph margin
SwTextNode *pTextNode = nullptr;
- if( !m_pPam->GetPoint()->nContent.GetIndex() )
+ if( !m_pPam->GetPoint()->GetContentIndex() )
{
// if possible change the bottom paragraph margin
// of previous node
@@ -5025,7 +5025,7 @@ void SwHTMLParser::InsertSpacer()
MapMode(MapUnit::MapTwip) ).Width();
}
- if( !m_pPam->GetPoint()->nContent.GetIndex() )
+ if( !m_pPam->GetPoint()->GetContentIndex() )
{
sal_uInt16 nLeft=0, nRight=0;
short nIndent = 0;
@@ -5188,12 +5188,12 @@ void SwHTMLParser::InsertLineBreak()
if (pTextNode)
{
SwFormatLineBreak aLineBreak(eClear);
- sal_Int32 nPos = m_pPam->GetPoint()->nContent.GetIndex();
+ sal_Int32 nPos = m_pPam->GetPoint()->GetContentIndex();
pTextNode->InsertItem(aLineBreak, nPos, nPos);
}
}
}
- else if( m_pPam->GetPoint()->nContent.GetIndex() )
+ else if( m_pPam->GetPoint()->GetContentIndex() )
{
// If a CLEAR is executed in a non-empty paragraph, then after it
// a new paragraph has to be opened.
@@ -5260,7 +5260,7 @@ void SwHTMLParser::InsertHorzRule()
}
}
- if( m_pPam->GetPoint()->nContent.GetIndex() )
+ if( m_pPam->GetPoint()->GetContentIndex() )
AppendTextNode( AM_NOSPACE );
if( m_nOpenParaToken != HtmlTokenId::NONE )
EndPara();
@@ -5446,8 +5446,8 @@ HTMLAttr::HTMLAttr( const SwPosition& rPos, const SfxPoolItem& rItem,
HTMLAttr **ppHd, const std::shared_ptr<HTMLAttrTable>& rAttrTab ) :
m_nStartPara( rPos.nNode ),
m_nEndPara( rPos.nNode ),
- m_nStartContent( rPos.nContent.GetIndex() ),
- m_nEndContent(rPos.nContent.GetIndex() ),
+ m_nStartContent( rPos.GetContentIndex() ),
+ m_nEndContent(rPos.GetContentIndex() ),
m_bInsAtStart( true ),
m_bLikePara( false ),
m_bValid( true ),
diff --git a/sw/source/filter/html/swhtml.hxx b/sw/source/filter/html/swhtml.hxx
index aa5e98d911e6..7e25f4f0ef0a 100644
--- a/sw/source/filter/html/swhtml.hxx
+++ b/sw/source/filter/html/swhtml.hxx
@@ -971,7 +971,7 @@ struct SwPending
inline void HTMLAttr::SetStart( const SwPosition& rPos )
{
m_nStartPara = rPos.nNode;
- m_nStartContent = rPos.nContent.GetIndex();
+ m_nStartContent = rPos.GetContentIndex();
m_nEndPara = m_nStartPara;
m_nEndContent = m_nStartContent;
}
diff --git a/sw/source/filter/html/wrthtml.cxx b/sw/source/filter/html/wrthtml.cxx
index f230f4dab303..7fc2dd407c8c 100644
--- a/sw/source/filter/html/wrthtml.cxx
+++ b/sw/source/filter/html/wrthtml.cxx
@@ -905,7 +905,7 @@ void SwHTMLWriter::Out_SwDoc( SwPaM* pPam )
while( m_pCurrentPam->GetPoint()->GetNodeIndex() < m_pCurrentPam->GetMark()->GetNodeIndex() ||
(m_pCurrentPam->GetPoint()->GetNodeIndex() == m_pCurrentPam->GetMark()->GetNodeIndex() &&
- m_pCurrentPam->GetPoint()->nContent.GetIndex() <= m_pCurrentPam->GetMark()->nContent.GetIndex()) )
+ m_pCurrentPam->GetPoint()->GetContentIndex() <= m_pCurrentPam->GetMark()->GetContentIndex()) )
{
SwNode& rNd = m_pCurrentPam->GetNode();
diff --git a/sw/source/filter/inc/fltshell.hxx b/sw/source/filter/inc/fltshell.hxx
index 865ff5cfdf97..e4041d2da09a 100644
--- a/sw/source/filter/inc/fltshell.hxx
+++ b/sw/source/filter/inc/fltshell.hxx
@@ -65,14 +65,14 @@ public:
//and the offset to content is de-dynamic-ified
SwFltPosition(const SwPosition &rPos)
: m_nNode(rPos.nNode, -1)
- , m_nContent(rPos.nContent.GetIndex())
+ , m_nContent(rPos.GetContentIndex())
{
}
void FromSwPosition(const SwPosition &rPos)
{
m_nNode = rPos.GetNodeIndex()-1;
- m_nContent = rPos.nContent.GetIndex();
+ m_nContent = rPos.GetContentIndex();
}
};
diff --git a/sw/source/filter/writer/writer.cxx b/sw/source/filter/writer/writer.cxx
index 1252ff41243d..a810ff47e3e0 100644
--- a/sw/source/filter/writer/writer.cxx
+++ b/sw/source/filter/writer/writer.cxx
@@ -464,14 +464,14 @@ bool Writer::GetBookmarks(const SwContentNode& rNd, sal_Int32 nStt,
const ::sw::mark::IMark& rBkmk = *(it->second);
sal_Int32 nContent;
if( rBkmk.GetMarkPos().nNode == nNd &&
- (nContent = rBkmk.GetMarkPos().nContent.GetIndex() ) >= nStt &&
+ (nContent = rBkmk.GetMarkPos().GetContentIndex() ) >= nStt &&
nContent < nEnd )
{
rArr.push_back( &rBkmk );
}
else if( rBkmk.IsExpanded() && nNd ==
rBkmk.GetOtherMarkPos().GetNodeIndex() && (nContent =
- rBkmk.GetOtherMarkPos().nContent.GetIndex() ) >= nStt &&
+ rBkmk.GetOtherMarkPos().GetContentIndex() ) >= nStt &&
nContent < nEnd )
{
rArr.push_back( &rBkmk );
diff --git a/sw/source/filter/ww8/docxexport.cxx b/sw/source/filter/ww8/docxexport.cxx
index 88f397026ff7..a7f72407a33d 100644
--- a/sw/source/filter/ww8/docxexport.cxx
+++ b/sw/source/filter/ww8/docxexport.cxx
@@ -162,8 +162,8 @@ void DocxExport::AppendBookmarks( const SwTextNode& rNode, sal_Int32 nCurrentPos
{
for ( IMark* pMark : aMarks )
{
- const sal_Int32 nStart = pMark->GetMarkStart().nContent.GetIndex();
- const sal_Int32 nEnd = pMark->GetMarkEnd().nContent.GetIndex();
+ const sal_Int32 nStart = pMark->GetMarkStart().GetContentIndex();
+ const sal_Int32 nEnd = pMark->GetMarkEnd().GetContentIndex();
if ( nStart == nCurrentPos )
aStarts.push_back( pMark->GetName() );
@@ -200,8 +200,8 @@ void DocxExport::AppendAnnotationMarks( const SwWW8AttrIter& rAttrs, sal_Int32 n
{
for ( IMark* pMark : aMarks )
{
- const sal_Int32 nStart = pMark->GetMarkStart().nContent.GetIndex();
- const sal_Int32 nEnd = pMark->GetMarkEnd().nContent.GetIndex();
+ const sal_Int32 nStart = pMark->GetMarkStart().GetContentIndex();
+ const sal_Int32 nEnd = pMark->GetMarkEnd().GetContentIndex();
if ( nStart == nCurrentPos )
aStarts.push_back( pMark->GetName() );
diff --git a/sw/source/filter/ww8/rtfexport.cxx b/sw/source/filter/ww8/rtfexport.cxx
index 421ae20061ad..f51ea6f62182 100644
--- a/sw/source/filter/ww8/rtfexport.cxx
+++ b/sw/source/filter/ww8/rtfexport.cxx
@@ -126,8 +126,8 @@ void RtfExport::AppendBookmarks(const SwTextNode& rNode, sal_Int32 nCurrentPos,
{
for (const auto& pMark : aMarks)
{
- const sal_Int32 nStart = pMark->GetMarkStart().nContent.GetIndex();
- const sal_Int32 nEnd = pMark->GetMarkEnd().nContent.GetIndex();
+ const sal_Int32 nStart = pMark->GetMarkStart().GetContentIndex();
+ const sal_Int32 nEnd = pMark->GetMarkEnd().GetContentIndex();
if (nStart == nCurrentPos)
aStarts.push_back(pMark->GetName());
@@ -159,8 +159,8 @@ void RtfExport::AppendAnnotationMarks(const SwWW8AttrIter& rAttrs, sal_Int32 nCu
{
for (const auto& pMark : aMarks)
{
- const sal_Int32 nStart = pMark->GetMarkStart().nContent.GetIndex();
- const sal_Int32 nEnd = pMark->GetMarkEnd().nContent.GetIndex();
+ const sal_Int32 nStart = pMark->GetMarkStart().GetContentIndex();
+ const sal_Int32 nEnd = pMark->GetMarkEnd().GetContentIndex();
if (nStart == nCurrentPos)
aStarts.push_back(pMark->GetName());
diff --git a/sw/source/filter/ww8/writerhelper.cxx b/sw/source/filter/ww8/writerhelper.cxx
index 354e428ea513..9a76a61d5e3d 100644
--- a/sw/source/filter/ww8/writerhelper.cxx
+++ b/sw/source/filter/ww8/writerhelper.cxx
@@ -722,7 +722,7 @@ namespace sw
if (aResult != maStack.rend())
{
SwTextNode *const pNode(rPos.GetNode().GetTextNode());
- sal_Int32 const nIndex(rPos.nContent.GetIndex());
+ sal_Int32 const nIndex(rPos.GetContentIndex());
// HACK to prevent overlap of field-mark and redline,
// which would destroy field-mark invariants when the redline
// is hidden: move the redline end one to the left
@@ -735,7 +735,7 @@ namespace sw
rPos.GetDoc().getIDocumentMarkAccess()->getFieldmarkAt(end));
SAL_WARN_IF(!pFieldMark, "sw.ww8", "expected a field mark");
if (pFieldMark && pFieldMark->GetMarkPos().GetNodeIndex() == (*aResult)->m_aMkPos.m_nNode.GetIndex()+1
- && pFieldMark->GetMarkPos().nContent.GetIndex() < (*aResult)->m_aMkPos.m_nContent)
+ && pFieldMark->GetMarkPos().GetContentIndex() < (*aResult)->m_aMkPos.m_nContent)
{
(*aResult)->SetEndPos(end);
return true;
@@ -756,7 +756,7 @@ namespace sw
{
sal_Int32 const nInserted = 2; // CH_TXT_ATR_FIELDSTART, CH_TXT_ATR_FIELDSEP
SwNodeOffset nPosNd = rPos.GetNodeIndex();
- sal_Int32 nPosCt = rPos.nContent.GetIndex() - nInserted;
+ sal_Int32 nPosCt = rPos.GetContentIndex() - nInserted;
bool const isPoint(rMkPos == rPtPos);
if ((rMkPos.m_nNode.GetIndex()+1 == nPosNd) &&
diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx
index 5a7064bd3d27..e7d637e1de2f 100644
--- a/sw/source/filter/ww8/wrtw8nds.cxx
+++ b/sw/source/filter/ww8/wrtw8nds.cxx
@@ -289,7 +289,7 @@ sal_Int32 SwWW8AttrIter::SearchNext( sal_Int32 nStartPos )
const SwPosition* pEnd = m_pCurRedline->End();
if (pEnd->nNode == m_rNode)
{
- const sal_Int32 i = pEnd->nContent.GetIndex();
+ const sal_Int32 i = pEnd->GetContentIndex();
if ( i >= nStartPos && i < nMinPos )
{
nMinPos = i;
@@ -312,7 +312,7 @@ sal_Int32 SwWW8AttrIter::SearchNext( sal_Int32 nStartPos )
if( pStt->nNode == m_rNode )
{
- const sal_Int32 i = pStt->nContent.GetIndex();
+ const sal_Int32 i = pStt->GetContentIndex();
if( i >= nStartPos && i < nMinPos )
nMinPos = i;
}
@@ -321,7 +321,7 @@ sal_Int32 SwWW8AttrIter::SearchNext( sal_Int32 nStartPos )
if( pEnd->nNode == m_rNode )
{
- const sal_Int32 i = pEnd->nContent.GetIndex();
+ const sal_Int32 i = pEnd->GetContentIndex();
if( i >= nStartPos && i < nMinPos )
{
nMinPos = i;
@@ -376,7 +376,7 @@ sal_Int32 SwWW8AttrIter::SearchNext( sal_Int32 nStartPos )
while (aTmpFlyIter != maFlyFrames.end() && nNextFlyPos < nStartPos)
{
const SwPosition &rAnchor = aTmpFlyIter->GetPosition();
- nNextFlyPos = rAnchor.nContent.GetIndex();
+ nNextFlyPos = rAnchor.GetContentIndex();
++aTmpFlyIter;
}
@@ -636,7 +636,7 @@ bool SwWW8AttrIter::HasFlysAt(sal_Int32 nSwPos) const
for (const auto& rFly : maFlyFrames)
{
const SwPosition& rAnchor = rFly.GetPosition();
- const sal_Int32 nPos = rAnchor.nContent.GetIndex();
+ const sal_Int32 nPos = rAnchor.GetContentIndex();
if (nPos == nSwPos)
{
return true;
@@ -720,7 +720,7 @@ FlyProcessingState SwWW8AttrIter::OutFlys(sal_Int32 nSwPos)
while ( maFlyIter != maFlyFrames.end() )
{
const SwPosition &rAnchor = maFlyIter->GetPosition();
- const sal_Int32 nPos = rAnchor.nContent.GetIndex();
+ const sal_Int32 nPos = rAnchor.GetContentIndex();
assert(nPos >= nSwPos && "a fly must get flagged as a nextAttr/CurrentPos");
if ( nPos != nSwPos )
@@ -1500,7 +1500,7 @@ bool SwWW8AttrIter::IncludeEndOfParaCRInRedlineProperties( sal_Int32 nEnd ) cons
// attributes that contains the redlining information.
if (pEnd->nNode == m_rNode)
{
- if (pEnd->nContent.GetIndex() == nEnd)
+ if (pEnd->GetContentIndex() == nEnd)
{
// This condition detects if the pseudo-char we will export
// should be explicitly included by the redlining char
@@ -1512,7 +1512,7 @@ bool SwWW8AttrIter::IncludeEndOfParaCRInRedlineProperties( sal_Int32 nEnd ) cons
}
if (pStart->nNode == m_rNode)
{
- if (pStart->nContent.GetIndex() == nEnd)
+ if (pStart->GetContentIndex() == nEnd)
{
// This condition detects if the pseudo-char we will export
// should be explicitly included by the redlining char
@@ -1524,7 +1524,7 @@ bool SwWW8AttrIter::IncludeEndOfParaCRInRedlineProperties( sal_Int32 nEnd ) cons
}
if (pStart->GetNodeIndex()-1 == m_rNode.GetIndex())
{
- if (pStart->nContent.GetIndex() == 0)
+ if (pStart->GetContentIndex() == 0)
{
// This condition detects if the pseudo-char we will export
// should be implicitly excluded by the redlining char
@@ -1570,7 +1570,7 @@ const SwRedlineData* SwWW8AttrIter::GetRunLevelRedline( sal_Int32 nPos )
if( m_pCurRedline )
{
const SwPosition* pEnd = m_pCurRedline->End();
- if (pEnd->nNode != m_rNode || pEnd->nContent.GetIndex() > nPos)
+ if (pEnd->nNode != m_rNode || pEnd->GetContentIndex() > nPos)
{
switch( m_pCurRedline->GetType() )
{
@@ -1598,9 +1598,9 @@ const SwRedlineData* SwWW8AttrIter::GetRunLevelRedline( sal_Int32 nPos )
if( pStt->nNode == m_rNode )
{
- if( pStt->nContent.GetIndex() >= nPos )
+ if( pStt->GetContentIndex() >= nPos )
{
- if( pStt->nContent.GetIndex() == nPos )
+ if( pStt->GetContentIndex() == nPos )
{
switch( pRedl->GetType() )
{
@@ -1623,7 +1623,7 @@ const SwRedlineData* SwWW8AttrIter::GetRunLevelRedline( sal_Int32 nPos )
}
if( pEnd->nNode == m_rNode &&
- pEnd->nContent.GetIndex() < nPos )
+ pEnd->GetContentIndex() < nPos )
{
m_pCurRedline = pRedl;
break;
@@ -1989,8 +1989,8 @@ bool MSWordExportBase::GetBookmarks( const SwTextNode& rNd, sal_Int32 nStt,
if ( pMark->GetMarkStart().nNode == nNd ||
pMark->GetMarkEnd().nNode == nNd )
{
- const sal_Int32 nBStart = pMark->GetMarkStart().nContent.GetIndex();
- const sal_Int32 nBEnd = pMark->GetMarkEnd().nContent.GetIndex();
+ const sal_Int32 nBStart = pMark->GetMarkStart().GetContentIndex();
+ const sal_Int32 nBEnd = pMark->GetMarkEnd().GetContentIndex();
// Keep only the bookmarks starting or ending in the snippet
bool bIsStartOk = ( pMark->GetMarkStart().nNode == nNd ) && ( nBStart >= nStt ) && ( nBStart <= nEnd );
@@ -2020,8 +2020,8 @@ bool MSWordExportBase::GetAnnotationMarks( const SwWW8AttrIter& rAttrs, sal_Int3
if ( pMark->GetMarkStart().nNode == nNd ||
pMark->GetMarkEnd().nNode == nNd )
{
- const sal_Int32 nBStart = pMark->GetMarkStart().nContent.GetIndex();
- const sal_Int32 nBEnd = pMark->GetMarkEnd().nContent.GetIndex();
+ const sal_Int32 nBStart = pMark->GetMarkStart().GetContentIndex();
+ const sal_Int32 nBEnd = pMark->GetMarkEnd().GetContentIndex();
// Keep only the bookmarks starting or ending in the snippet
bool bIsStartOk = ( pMark->GetMarkStart().nNode == nNd ) && ( nBStart >= nStt ) && ( nBStart <= nEnd );
@@ -2058,8 +2058,8 @@ class CompareMarksEnd
public:
bool operator() ( const IMark * pOneB, const IMark * pTwoB ) const
{
- const sal_Int32 nOEnd = pOneB->GetMarkEnd().nContent.GetIndex();
- const sal_Int32 nTEnd = pTwoB->GetMarkEnd().nContent.GetIndex();
+ const sal_Int32 nOEnd = pOneB->GetMarkEnd().GetContentIndex();
+ const sal_Int32 nTEnd = pTwoB->GetMarkEnd().GetContentIndex();
return nOEnd < nTEnd;
}
@@ -2074,7 +2074,7 @@ bool MSWordExportBase::NearestBookmark( sal_Int32& rNearest, const sal_Int32 nCu
if ( !m_rSortedBookmarksStart.empty() )
{
IMark* pMarkStart = m_rSortedBookmarksStart.front();
- const sal_Int32 nNext = pMarkStart->GetMarkStart().nContent.GetIndex();
+ const sal_Int32 nNext = pMarkStart->GetMarkStart().GetContentIndex();
if( !bNextPositionOnly || (nNext > nCurrentPos ))
{
rNearest = nNext;
@@ -2085,7 +2085,7 @@ bool MSWordExportBase::NearestBookmark( sal_Int32& rNearest, const sal_Int32 nCu
if ( !m_rSortedBookmarksEnd.empty() )
{
IMark* pMarkEnd = m_rSortedBookmarksEnd[0];
- const sal_Int32 nNext = pMarkEnd->GetMarkEnd().nContent.GetIndex();
+ const sal_Int32 nNext = pMarkEnd->GetMarkEnd().GetContentIndex();
if( !bNextPositionOnly || nNext > nCurrentPos )
{
if ( !bHasBookmark )
@@ -2106,7 +2106,7 @@ void MSWordExportBase::NearestAnnotationMark( sal_Int32& rNearest, const sal_Int
if ( !m_rSortedAnnotationMarksStart.empty() )
{
IMark* pMarkStart = m_rSortedAnnotationMarksStart.front();
- const sal_Int32 nNext = pMarkStart->GetMarkStart().nContent.GetIndex();
+ const sal_Int32 nNext = pMarkStart->GetMarkStart().GetContentIndex();
if( !bNextPositionOnly || (nNext > nCurrentPos ))
{
rNearest = nNext;
@@ -2117,7 +2117,7 @@ void MSWordExportBase::NearestAnnotationMark( sal_Int32& rNearest, const sal_Int
if ( !m_rSortedAnnotationMarksEnd.empty() )
{
IMark* pMarkEnd = m_rSortedAnnotationMarksEnd[0];
- const sal_Int32 nNext = pMarkEnd->GetMarkEnd().nContent.GetIndex();
+ const sal_Int32 nNext = pMarkEnd->GetMarkEnd().GetContentIndex();
if( !bNextPositionOnly || nNext > nCurrentPos )
{
if ( !bHasAnnotationMark )
@@ -2138,8 +2138,8 @@ void MSWordExportBase::GetSortedAnnotationMarks( const SwWW8AttrIter& rAttrs, sa
for ( IMark* pMark : aMarksStart )
{
// Remove the positions equal to the current pos
- const sal_Int32 nStart = pMark->GetMarkStart().nContent.GetIndex();
- const sal_Int32 nEnd = pMark->GetMarkEnd().nContent.GetIndex();
+ const sal_Int32 nStart = pMark->GetMarkStart().GetContentIndex();
+ const sal_Int32 nEnd = pMark->GetMarkEnd().GetContentIndex();
const SwTextNode& rNode = rAttrs.GetNode();
if ( nStart > nCurrentPos && ( pMark->GetMarkStart().nNode == rNode.GetIndex()) )
@@ -2172,8 +2172,8 @@ void MSWordExportBase::GetSortedBookmarks( const SwTextNode& rNode, sal_Int32 nC
for ( IMark* pMark : aMarksStart )
{
// Remove the positions equal to the current pos
- const sal_Int32 nStart = pMark->GetMarkStart().nContent.GetIndex();
- const sal_Int32 nEnd = pMark->GetMarkEnd().nContent.GetIndex();
+ const sal_Int32 nStart = pMark->GetMarkStart().GetContentIndex();
+ const sal_Int32 nEnd = pMark->GetMarkEnd().GetContentIndex();
if ( nStart > nCurrentPos && ( pMark->GetMarkStart().nNode == rNode.GetIndex()) )
aSortedStart.push_back( pMark );
@@ -2233,7 +2233,7 @@ bool MSWordExportBase::NeedTextNodeSplit( const SwTextNode& rNd, SwSoftPageBreak
pos = rNd.Len(); // skip everything
break;
}
- pos = pMark->GetMarkEnd().nContent.GetIndex(); // no +1, it's behind the char
+ pos = pMark->GetMarkEnd().GetContentIndex(); // no +1, it's behind the char
}
pList.insert(pos);
}
diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx
index d0ae1a49d835..a7c5cd8d1382 100644
--- a/sw/source/filter/ww8/wrtww8.cxx
+++ b/sw/source/filter/ww8/wrtww8.cxx
@@ -1443,17 +1443,17 @@ void WW8Export::AppendBookmarks( const SwTextNode& rNd, sal_Int32 nCurrentPos, s
}
if( !pOPos || ( nNd == pPos->GetNodeIndex() &&
- ( nContent = pPos->nContent.GetIndex() ) >= nCurrentPos &&
+ ( nContent = pPos->GetContentIndex() ) >= nCurrentPos &&
nContent < nCurrentEnd ) )
{
- sal_uLong nCp = nSttCP + pPos->nContent.GetIndex() - nCurrentPos;
+ sal_uLong nCp = nSttCP + pPos->GetContentIndex() - nCurrentPos;
m_pBkmks->Append(nCp, BookmarkToWord(rBkmk.GetName()));
}
if( pOPos && nNd == pOPos->GetNodeIndex() &&
- ( nContent = pOPos->nContent.GetIndex() ) >= nCurrentPos &&
+ ( nContent = pOPos->GetContentIndex() ) >= nCurrentPos &&
nContent < nCurrentEnd )
{
- sal_uLong nCp = nSttCP + pOPos->nContent.GetIndex() - nCurrentPos;
+ sal_uLong nCp = nSttCP + pOPos->GetContentIndex() - nCurrentPos;
m_pBkmks->Append(nCp, BookmarkToWord(rBkmk.GetName()));
}
}
@@ -1466,7 +1466,7 @@ void WW8Export::AppendAnnotationMarks(const SwWW8AttrIter& rAttrs, sal_Int32 nCu
{
for (const sw::mark::IMark* pMark : aMarks)
{
- const sal_Int32 nStart = pMark->GetMarkStart().nContent.GetIndex();
+ const sal_Int32 nStart = pMark->GetMarkStart().GetContentIndex();
if (nStart == nCurrentPos)
{
m_pAtn->AddRangeStartPosition(pMark->GetName(), Fc2Cp(Strm().Tell()),
@@ -2755,7 +2755,7 @@ public:
{
bool bSimpleContentRemains = m_pCurPam->GetPoint()->nNode < m_pCurPam->GetMark()->nNode ||
(m_pCurPam->GetPoint()->nNode == m_pCurPam->GetMark()->nNode &&
- m_pCurPam->GetPoint()->nContent.GetIndex() <= m_pCurPam->GetMark()->nContent.GetIndex());
+ m_pCurPam->GetPoint()->GetContentIndex() <= m_pCurPam->GetMark()->GetContentIndex());
if (bSimpleContentRemains)
return true;
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index 749ec62caa95..802762987863 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -1474,7 +1474,7 @@ const SfxPoolItem* SwWW8FltControlStack::GetFormatAttr(const SwPosition& rPos,
*/
if (pNd->IsTextNode())
{
- const sal_Int32 nPos = rPos.nContent.GetIndex();
+ const sal_Int32 nPos = rPos.GetContentIndex();
m_xScratchSet.reset(new SfxItemSet(m_rDoc.GetAttrPool(), nWhich, nWhich));
if (pNd->GetTextNode()->GetParaAttr(*m_xScratchSet, nPos, nPos))
pItem = m_xScratchSet->GetItem(nWhich);
@@ -1571,10 +1571,10 @@ void SwWW8FltRefStack::SetAttrInDoc(const SwPosition& rTmpPos,
const SwPosition& rBkMrkPos = pMark->GetMarkPos();
SwTextNode* pText = rBkMrkPos.GetNode().GetTextNode();
- if( pText && rBkMrkPos.nContent.GetIndex() )
+ if( pText && rBkMrkPos.GetContentIndex() )
{
SwTextAttr* const pFootnote = pText->GetTextAttrForCharAt(
- rBkMrkPos.nContent.GetIndex()-1, RES_TXTATR_FTN );
+ rBkMrkPos.GetContentIndex()-1, RES_TXTATR_FTN );
if( pFootnote )
{
sal_uInt16 nRefNo = static_cast<SwTextFootnote*>(pFootnote)->GetSeqRefNo();
@@ -2503,7 +2503,7 @@ bool SwWW8ImplReader::SetSpacing(SwPaM &rMyPam, int nSpace, bool bIsUpper )
else
aUL.SetLower( static_cast< sal_uInt16 >(nSpace) );
- const sal_Int32 nEnd = pSpacingPos->nContent.GetIndex();
+ const sal_Int32 nEnd = pSpacingPos->GetContentIndex();
rMyPam.GetPoint()->nContent.Assign(rMyPam.GetContentNode(), 0);
m_xCtrlStck->NewAttr(*pSpacingPos, aUL);
rMyPam.GetPoint()->nContent.Assign(rMyPam.GetContentNode(), nEnd);
@@ -3572,7 +3572,7 @@ bool SwWW8ImplReader::HandlePageBreakChar()
if (!m_bWasParaEnd && IsTemp)
{
bParaEndAdded = true;
- if (0 >= m_pPaM->GetPoint()->nContent.GetIndex())
+ if (0 >= m_pPaM->GetPoint()->GetContentIndex())
{
if (SwTextNode* pTextNode = m_pPaM->GetNode().GetTextNode())
{
@@ -4220,7 +4220,7 @@ bool SwWW8ImplReader::ReadText(WW8_CP nStartCp, WW8_CP nTextLen, ManTypes nType)
m_xPreviousNode.reset();
- if (m_pPaM->GetPoint()->nContent.GetIndex())
+ if (m_pPaM->GetPoint()->GetContentIndex())
AppendTextNode(*m_pPaM->GetPoint());
if (!m_bInHyperlink)
@@ -5429,7 +5429,7 @@ ErrCode SwWW8ImplReader::CoreLoad(WW8Glossary const *pGloss)
if (pHt->Which() != RES_TXTATR_FLYCNT)
continue;
const sal_Int32 st = pHt->GetStart();
- if (st >= (*ppBkmk)->GetMarkStart().nContent.GetIndex())
+ if (st >= (*ppBkmk)->GetMarkStart().GetContentIndex())
{
SwFrameFormat* pFrameFormat = pHt->GetFlyCnt().GetFrameFormat();
vecFrameFormat.push_back(pFrameFormat);
@@ -6722,7 +6722,7 @@ bool SwWW8ImplReader::InEqualApo(int nLvl) const
namespace sw::hack
{
Position::Position(const SwPosition &rPos)
- : maPtNode(rPos.nNode), mnPtContent(rPos.nContent.GetIndex())
+ : maPtNode(rPos.nNode), mnPtContent(rPos.GetContentIndex())
{
}
diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx
index 972df1225e66..e140e6c471ac 100644
--- a/sw/source/filter/ww8/ww8par2.cxx
+++ b/sw/source/filter/ww8/ww8par2.cxx
@@ -189,7 +189,7 @@ sal_uInt16 SwWW8ImplReader::End_Footnote()
//Get the footnote character and remove it from the txtnode. We'll
//replace it with the footnote
SwTextNode* pText = m_pPaM->GetNode().GetTextNode();
- sal_Int32 nPos = m_pPaM->GetPoint()->nContent.GetIndex();
+ sal_Int32 nPos = m_pPaM->GetPoint()->GetContentIndex();
OUString sChar;
SwTextFootnote* pFN = nullptr;
@@ -2375,7 +2375,7 @@ void WW8TabDesc::CreateSwTable()
// if there is already some content on the Node append new node to ensure
// that this content remains ABOVE the table
SwPosition* pPoint = m_pIo->m_pPaM->GetPoint();
- bool bInsNode = pPoint->nContent.GetIndex() != 0;
+ bool bInsNode = pPoint->GetContentIndex() != 0;
bool bSetMinHeight = false;
/*
@@ -3008,7 +3008,7 @@ void WW8TabDesc::SetPamInCell(short nWwCol, bool bPam)
SwPosition* pGridPos = m_pIo->m_pPaM->GetPoint();
- const sal_Int32 nEnd = pGridPos->nContent.GetIndex();
+ const sal_Int32 nEnd = pGridPos->GetContentIndex();
pGridPos->nContent.Assign(m_pIo->m_pPaM->GetContentNode(), 0);
m_pIo->m_xCtrlStck->NewAttr(*pGridPos, aGridItem);
pGridPos->nContent.Assign(m_pIo->m_pPaM->GetContentNode(), nEnd);
diff --git a/sw/source/filter/ww8/ww8par5.cxx b/sw/source/filter/ww8/ww8par5.cxx
index 41b88884287a..2a6aa140ca4b 100644
--- a/sw/source/filter/ww8/ww8par5.cxx
+++ b/sw/source/filter/ww8/ww8par5.cxx
@@ -529,7 +529,7 @@ sal_uInt16 SwWW8ImplReader::End_Field()
case ww::eFORMTEXT:
if (bUseEnhFields && m_pPaM!=nullptr && m_pPaM->GetPoint()!=nullptr) {
SwPosition aEndPos = *m_pPaM->GetPoint();
- SwPaM aFieldPam( m_aFieldStack.back().GetPtNode(), m_aFieldStack.back().GetPtContent(), aEndPos.nNode, aEndPos.nContent.GetIndex());
+ SwPaM aFieldPam( m_aFieldStack.back().GetPtNode(), m_aFieldStack.back().GetPtContent(), aEndPos.nNode, aEndPos.GetContentIndex());
IDocumentMarkAccess* pMarksAccess = m_rDoc.getIDocumentMarkAccess( );
IFieldmark *pFieldmark = pMarksAccess->makeFieldBookmark(
aFieldPam, m_aFieldStack.back().GetBookmarkName(), ODF_FORMTEXT,
@@ -596,7 +596,7 @@ sal_uInt16 SwWW8ImplReader::End_Field()
SwContentNode* pNd = aRestorePos.GetNode().GetContentNode();
sal_Int32 nMaxValidIndex = pNd ? pNd->Len() : 0;
- if (aRestorePos.nContent.GetIndex() > nMaxValidIndex)
+ if (aRestorePos.GetContentIndex() > nMaxValidIndex)
{
SAL_WARN("sw.ww8", "Attempt to restore to invalid content position");
aRestorePos.nContent.Assign(pNd, nMaxValidIndex);
@@ -637,7 +637,7 @@ sal_uInt16 SwWW8ImplReader::End_Field()
SwPosition aEndPos = *m_pPaM->GetPoint();
SwPaM aFieldPam(
m_aFieldStack.back().GetPtNode(), m_aFieldStack.back().GetPtContent(),
- aEndPos.nNode, aEndPos.nContent.GetIndex());
+ aEndPos.nNode, aEndPos.GetContentIndex());
IDocumentMarkAccess* pMarksAccess = m_rDoc.getIDocumentMarkAccess( );
@@ -3448,7 +3448,7 @@ eF_ResT SwWW8ImplReader::Read_F_Tox( WW8FieldDesc* pF, OUString& rStr )
m_bCareFirstParaEndInToc = true;
}
- if (m_pPaM->GetPoint()->nContent.GetIndex())
+ if (m_pPaM->GetPoint()->GetContentIndex())
AppendTextNode(*m_pPaM->GetPoint());
const SwPosition* pPos = m_pPaM->GetPoint();
diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx
index 72cde2bb5946..19e888c9cfe1 100644
--- a/sw/source/filter/ww8/ww8par6.cxx
+++ b/sw/source/filter/ww8/ww8par6.cxx
@@ -3434,9 +3434,9 @@ SwFrameFormat *SwWW8ImplReader::ContainsSingleInlineGraphic(const SwPaM &rRegion
*/
SwFrameFormat *pRet=nullptr;
SwNodeIndex aBegin(rRegion.Start()->nNode);
- const sal_Int32 nBegin(rRegion.Start()->nContent.GetIndex());
+ const sal_Int32 nBegin(rRegion.Start()->GetContentIndex());
SwNodeIndex aEnd(rRegion.End()->nNode);
- const sal_Int32 nEnd(rRegion.End()->nContent.GetIndex());
+ const sal_Int32 nEnd(rRegion.End()->GetContentIndex());
const SwTextNode* pTNd;
const SwTextAttr* pTFlyAttr;
if (
@@ -4546,7 +4546,7 @@ void SwWW8ImplReader::Read_LineBreakClear(sal_uInt16 /*nId*/, const sal_uInt8* p
if (nLen == -1 && m_oLineBreakClear.has_value())
{
SwTextNode* pText = m_pPaM->GetNode().GetTextNode();
- sal_Int32 nPos = m_pPaM->GetPoint()->nContent.GetIndex();
+ sal_Int32 nPos = m_pPaM->GetPoint()->GetContentIndex();
if (!pText || !nPos)
{
// There should have been a linebreak char.
diff --git a/sw/source/filter/xml/xmlimp.cxx b/sw/source/filter/xml/xmlimp.cxx
index 6cbfbda7b17a..30b8daaf4840 100644
--- a/sw/source/filter/xml/xmlimp.cxx
+++ b/sw/source/filter/xml/xmlimp.cxx
@@ -676,7 +676,7 @@ void SwXMLImport::endDocument()
pPaM->GetBound().GetNodeIndex() )
{
const sal_Int32 nCntPos =
- pPaM->GetBound().nContent.GetIndex();
+ pPaM->GetBound().GetContentIndex();
pPaM->GetBound().nContent.Assign( pTextNode,
pTextNode->GetText().getLength() + nCntPos );
}
@@ -684,7 +684,7 @@ void SwXMLImport::endDocument()
pPaM->GetBound( false ).GetNodeIndex() )
{
const sal_Int32 nCntPos =
- pPaM->GetBound( false ).nContent.GetIndex();
+ pPaM->GetBound( false ).GetContentIndex();
pPaM->GetBound( false ).nContent.Assign( pTextNode,
pTextNode->GetText().getLength() + nCntPos );
}
@@ -711,8 +711,8 @@ void SwXMLImport::endDocument()
}
SwPosition* pPos = pPaM->GetPoint();
- OSL_ENSURE( !pPos->nContent.GetIndex(), "last paragraph isn't empty" );
- if( !pPos->nContent.GetIndex() )
+ OSL_ENSURE( !pPos->GetContentIndex(), "last paragraph isn't empty" );
+ if( !pPos->GetContentIndex() )
{
SwTextNode* pCurrNd;
SwNodeOffset nNodeIdx = pPos->GetNodeIndex();
diff --git a/sw/source/ui/misc/contentcontroldlg.cxx b/sw/source/ui/misc/contentcontroldlg.cxx
index a59854200bc0..ef636388cc39 100644
--- a/sw/source/ui/misc/contentcontroldlg.cxx
+++ b/sw/source/ui/misc/contentcontroldlg.cxx
@@ -78,7 +78,7 @@ SwContentControlDlg::SwContentControlDlg(weld::Window* pParent, SwWrtShell& rWrt
return;
}
- SwTextAttr* pAttr = pTextNode->GetTextAttrAt(pStart->nContent.GetIndex(),
+ SwTextAttr* pAttr = pTextNode->GetTextAttrAt(pStart->GetContentIndex(),
RES_TXTATR_CONTENTCONTROL, SwTextNode::PARENT);
if (!pAttr)
{
diff --git a/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx b/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx
index bf3e24cb00a9..0ea70eede278 100644
--- a/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx
+++ b/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx
@@ -533,8 +533,8 @@ void SwSpellDialogChildWindow::GetFocus()
SwPaM* pCursor = pWrtShell->GetCursor();
if(m_pSpellState->m_pPointNode != &pCursor->GetNode() ||
m_pSpellState->m_pMarkNode != &pCursor->GetNode(false)||
- m_pSpellState->m_nPointPos != pCursor->GetPoint()->nContent.GetIndex()||
- m_pSpellState->m_nMarkPos != pCursor->GetMark()->nContent.GetIndex())
+ m_pSpellState->m_nPointPos != pCursor->GetPoint()->GetContentIndex()||
+ m_pSpellState->m_nMarkPos != pCursor->GetMark()->GetContentIndex())
bInvalidate = true;
}
break;
@@ -590,8 +590,8 @@ void SwSpellDialogChildWindow::LoseFocus()
SwPaM* pCursor = pWrtShell->GetCursor();
m_pSpellState->m_pPointNode = &pCursor->GetNode();
m_pSpellState->m_pMarkNode = &pCursor->GetNode(false);
- m_pSpellState->m_nPointPos = pCursor->GetPoint()->nContent.GetIndex();
- m_pSpellState->m_nMarkPos = pCursor->GetMark()->nContent.GetIndex();
+ m_pSpellState->m_nPointPos = pCursor->GetPoint()->GetContentIndex();
+ m_pSpellState->m_nMarkPos = pCursor->GetMark()->GetContentIndex();
}
break;
diff --git a/sw/source/uibase/dochdl/swdtflvr.cxx b/sw/source/uibase/dochdl/swdtflvr.cxx
index 04ed6f737a0d..6f1304e901ed 100644
--- a/sw/source/uibase/dochdl/swdtflvr.cxx
+++ b/sw/source/uibase/dochdl/swdtflvr.cxx
@@ -1294,7 +1294,7 @@ void SwPasteContext::remember()
// Set point to the previous node, so it is not moved.
const SwNodeIndex& rNodeIndex = pCursor->GetPoint()->nNode;
m_pPaM.reset(new SwPaM(rNodeIndex, rNodeIndex, SwNodeOffset(0), SwNodeOffset(-1)));
- m_nStartContent = pCursor->GetPoint()->nContent.GetIndex();
+ m_nStartContent = pCursor->GetPoint()->GetContentIndex();
}
void SwPasteContext::forget() { m_pPaM.reset(); }
@@ -1605,7 +1605,7 @@ bool SwTransferable::Paste(SwWrtShell& rSh, TransferableDataHelper& rData, RndSt
// first paragraph of the cell?
rSh.GetCursor()->GetNode().GetIndex() == rSh.GetCursor()->GetNode().FindTableBoxStartNode()->GetIndex()+1 &&
// beginning of the paragraph?
- !rSh.GetCursor()->GetPoint()->nContent.GetIndex();
+ !rSh.GetCursor()->GetPoint()->GetContentIndex();
SfxDispatcher* pDispatch = rSh.GetView().GetViewFrame()->GetDispatcher();
// go start of the cell
diff --git a/sw/source/uibase/docvw/AnnotationWin.cxx b/sw/source/uibase/docvw/AnnotationWin.cxx
index b7858a97350f..d10cb89b2ef4 100644
--- a/sw/source/uibase/docvw/AnnotationWin.cxx
+++ b/sw/source/uibase/docvw/AnnotationWin.cxx
@@ -357,7 +357,7 @@ sal_uInt32 SwAnnotationWin::CalcParent()
aPosition.nContent = pTextField->GetStart();
SwTextAttr * const pTextAttr =
pTextField->GetTextNode().GetTextAttrForCharAt(
- aPosition.nContent.GetIndex() - 1,
+ aPosition.GetContentIndex() - 1,
RES_TXTATR_ANNOTATION );
const SwField* pField = pTextAttr ? pTextAttr->GetFormatField().GetField() : nullptr;
sal_uInt32 nParentId = 0;
@@ -378,7 +378,7 @@ sal_uInt32 SwAnnotationWin::CountFollowing()
aPosition.nContent = pTextField->GetStart();
SwTextAttr * pTextAttr = pTextField->GetTextNode().GetTextAttrForCharAt(
- aPosition.nContent.GetIndex() + 1,
+ aPosition.GetContentIndex() + 1,
RES_TXTATR_ANNOTATION );
SwField* pField = pTextAttr
? const_cast<SwField*>(pTextAttr->GetFormatField().GetField())
@@ -387,7 +387,7 @@ sal_uInt32 SwAnnotationWin::CountFollowing()
{
aCount++;
pTextAttr = pTextField->GetTextNode().GetTextAttrForCharAt(
- aPosition.nContent.GetIndex() + aCount,
+ aPosition.GetContentIndex() + aCount,
RES_TXTATR_ANNOTATION );
pField = pTextAttr
? const_cast<SwField*>(pTextAttr->GetFormatField().GetField())
diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx
index cd90bfb74ce1..79f980360c56 100644
--- a/sw/source/uibase/docvw/edtwin.cxx
+++ b/sw/source/uibase/docvw/edtwin.cxx
@@ -766,7 +766,7 @@ bool SwEditWin::IsInputSequenceCheckingRequired( const OUString &rText, const Sw
!rCTLOptions.IsCTLSequenceChecking() )
return false;
- if ( 0 == rCursor.Start()->nContent.GetIndex() ) /* first char needs not to be checked */
+ if ( 0 == rCursor.Start()->GetContentIndex() ) /* first char needs not to be checked */
return false;
SwBreakIt *pBreakIter = SwBreakIt::Get();
@@ -975,7 +975,7 @@ void SwEditWin::FlushInBuffer()
// if text prior to the original selection needs to be changed
// as well, we now expand the selection accordingly.
SwPaM &rCursor = *rSh.GetCursor();
- const sal_Int32 nCursorStartPos = rCursor.Start()->nContent.GetIndex();
+ const sal_Int32 nCursorStartPos = rCursor.Start()->GetContentIndex();
OSL_ENSURE( nCursorStartPos >= nExpandSelection, "cannot expand selection as specified!!" );
if (nExpandSelection && nCursorStartPos >= nExpandSelection)
{
@@ -1558,7 +1558,7 @@ void SwEditWin::KeyInput(const KeyEvent &rKEvt)
if (pTextNode)
{
SwTextAttr* pAttr = pTextNode->GetTextAttrAt(
- pAnchorPos->nContent.GetIndex(), RES_TXTATR_CONTENTCONTROL, SwTextNode::PARENT);
+ pAnchorPos->GetContentIndex(), RES_TXTATR_CONTENTCONTROL, SwTextNode::PARENT);
if (pAttr)
{
SwTextContentControl* pTextContentControl
@@ -2473,7 +2473,7 @@ KEYINPUT_CHECKTABLE_INSDEL:
SwTextNode* pTextNode = pStart->GetNode().GetTextNode();
if (pTextNode)
{
- sal_Int32 nIndex = pStart->nContent.GetIndex();
+ sal_Int32 nIndex = pStart->GetContentIndex();
SwTextAttr* pAttr = pTextNode->GetTextAttrAt(nIndex, RES_TXTATR_CONTENTCONTROL, SwTextNode::PARENT);
if (pAttr)
{
@@ -4772,7 +4772,7 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
if (pTextNode)
{
SwTextAttr* pAttr = pTextNode->GetTextAttrAt(
- pAnchorPos->nContent.GetIndex(), RES_TXTATR_CONTENTCONTROL,
+ pAnchorPos->GetContentIndex(), RES_TXTATR_CONTENTCONTROL,
SwTextNode::PARENT);
if (pAttr)
{
@@ -5795,9 +5795,9 @@ void SwEditWin::Command( const CommandEvent& rCEvt )
if( pCursor )
{
SwNodeOffset nPosNodeIdx = pCursor->GetPoint()->GetNodeIndex();
- const sal_Int32 nPosIdx = pCursor->GetPoint()->nContent.GetIndex();
+ const sal_Int32 nPosIdx = pCursor->GetPoint()->GetContentIndex();
SwNodeOffset nMarkNodeIdx = pCursor->GetMark()->GetNodeIndex();
- const sal_Int32 nMarkIdx = pCursor->GetMark()->nContent.GetIndex();
+ const sal_Int32 nMarkIdx = pCursor->GetMark()->GetContentIndex();
if( !rSh.GetCursor()->HasMark() )
rSh.GetCursor()->SetMark();
@@ -5838,7 +5838,7 @@ void SwEditWin::Command( const CommandEvent& rCEvt )
const SwPosition& rPos = *rSh.GetCursor()->GetPoint();
SwDocShell* pDocSh = m_rView.GetDocShell();
SwDoc *pDoc = pDocSh->GetDoc();
- SwExtTextInput* pInput = pDoc->GetExtTextInput( rPos.GetNode(), rPos.nContent.GetIndex() );
+ SwExtTextInput* pInput = pDoc->GetExtTextInput( rPos.GetNode(), rPos.GetContentIndex() );
if ( pInput )
{
const SwPosition& rStart = *pInput->Start();
diff --git a/sw/source/uibase/lingu/hhcwrp.cxx b/sw/source/uibase/lingu/hhcwrp.cxx
index 967bf5ae7299..344cfba96a3e 100644
--- a/sw/source/uibase/lingu/hhcwrp.cxx
+++ b/sw/source/uibase/lingu/hhcwrp.cxx
@@ -169,7 +169,7 @@ void SwHHCWrapper::GetNextPortion(
// build last pos from currently selected text
SwPaM* pCursor = m_rWrtShell.GetCursor();
- m_nLastPos = pCursor->Start()->nContent.GetIndex();
+ m_nLastPos = pCursor->Start()->GetContentIndex();
}
void SwHHCWrapper::SelectNewUnit_impl( sal_Int32 nUnitStart, sal_Int32 nUnitEnd )
@@ -222,7 +222,7 @@ void SwHHCWrapper::ChangeText( const OUString &rNewText,
{
// remember cursor start position for later setting of the cursor
const SwPosition *pStart = pCursor->Start();
- const sal_Int32 nStartIndex = pStart->nContent.GetIndex();
+ const sal_Int32 nStartIndex = pStart->GetContentIndex();
const SwNodeIndex aStartNodeIndex = pStart->nNode;
SwTextNode *pStartTextNode = aStartNodeIndex.GetNode().GetTextNode();
@@ -326,7 +326,7 @@ void SwHHCWrapper::ChangeText_impl( const OUString &rNewText, bool bKeepAttribut
if (!m_rWrtShell.GetCursor()->HasMark())
m_rWrtShell.GetCursor()->SetMark();
SwPosition *pMark = m_rWrtShell.GetCursor()->GetMark();
- pMark->nContent = pMark->nContent.GetIndex() - rNewText.getLength();
+ pMark->nContent = pMark->GetContentIndex() - rNewText.getLength();
// since 'SetAttr' below functions like merging with the attributes
// from the itemset with any existing ones we have to get rid of all
diff --git a/sw/source/uibase/shells/langhelper.cxx b/sw/source/uibase/shells/langhelper.cxx
index 0de6c4863ada..9900952c9d46 100644
--- a/sw/source/uibase/shells/langhelper.cxx
+++ b/sw/source/uibase/shells/langhelper.cxx
@@ -521,7 +521,7 @@ namespace SwLangHelper
aText = pNode->GetText();
if (!aText.isEmpty())
{
- sal_Int32 nEnd = pCursor->GetPoint()->nContent.GetIndex();
+ sal_Int32 nEnd = pCursor->GetPoint()->GetContentIndex();
// at most 100 chars to the left...
const sal_Int32 nStt = nEnd > 100 ? nEnd - 100 : 0;
// ... and 100 to the right of the cursor position
diff --git a/sw/source/uibase/shells/textfld.cxx b/sw/source/uibase/shells/textfld.cxx
index a29fc014c41e..833f5868a01d 100644
--- a/sw/source/uibase/shells/textfld.cxx
+++ b/sw/source/uibase/shells/textfld.cxx
@@ -639,7 +639,7 @@ void SwTextShell::ExecField(SfxRequest &rReq)
SwPaM* pCursorPos = rSh.GetCursor();
if( pCursorPos )
{
- LanguageType nLang = pCursorPos->GetPoint()->GetNode().GetTextNode()->GetLang(pCursorPos->GetPoint()->nContent.GetIndex());
+ LanguageType nLang = pCursorPos->GetPoint()->GetNode().GetTextNode()->GetLang(pCursorPos->GetPoint()->GetContentIndex());
if (nLang == LANGUAGE_HUNGARIAN)
nInsertFormat = rSh.GetNumberFormatter()->GetFormatIndex(NF_DATE_SYSTEM_LONG, nLang);
}
@@ -697,8 +697,8 @@ FIELD_INSERT:
if(bSuccess)
{
IDocumentMarkAccess* pMarksAccess = rSh.GetDoc()->getIDocumentMarkAccess();
- SwPaM aFieldPam(pCursorPos->GetPoint()->nNode, pCursorPos->GetPoint()->nContent.GetIndex() - vEnSpaces.getLength(),
- pCursorPos->GetPoint()->nNode, pCursorPos->GetPoint()->nContent.GetIndex());
+ SwPaM aFieldPam(pCursorPos->GetPoint()->nNode, pCursorPos->GetPoint()->GetContentIndex() - vEnSpaces.getLength(),
+ pCursorPos->GetPoint()->nNode, pCursorPos->GetPoint()->GetContentIndex());
pMarksAccess->makeFieldBookmark(aFieldPam, OUString(), ODF_FORMTEXT,
aFieldPam.Start());
}
@@ -751,8 +751,8 @@ FIELD_INSERT:
if(bSuccess)
{
IDocumentMarkAccess* pMarksAccess = rSh.GetDoc()->getIDocumentMarkAccess();
- SwPaM aFieldPam(pCursorPos->GetPoint()->nNode, pCursorPos->GetPoint()->nContent.GetIndex() - ODF_FORMFIELD_DEFAULT_LENGTH,
- pCursorPos->GetPoint()->nNode, pCursorPos->GetPoint()->nContent.GetIndex());
+ SwPaM aFieldPam(pCursorPos->GetPoint()->nNode, pCursorPos->GetPoint()->GetContentIndex() - ODF_FORMFIELD_DEFAULT_LENGTH,
+ pCursorPos->GetPoint()->nNode, pCursorPos->GetPoint()->GetContentIndex());
sw::mark::IFieldmark* pFieldBM = pMarksAccess->makeFieldBookmark(aFieldPam, OUString(), ODF_FORMDATE,
aFieldPam.Start());
@@ -955,7 +955,7 @@ void SwTextShell::StateField( SfxItemSet &rSet )
SwPosition aCursorPos(*rSh.GetCursor()->GetPoint());
sw::mark::IFieldmark* pFieldBM = GetShell().getIDocumentMarkAccess()->getFieldmarkFor(aCursorPos);
if ((!pFieldBM || pFieldBM->GetFieldname() != ODF_FORMTEXT)
- && aCursorPos.nContent.GetIndex() > 0)
+ && aCursorPos.GetContentIndex() > 0)
{
SwPosition aPos(aCursorPos);
--aPos.nContent;
diff --git a/sw/source/uibase/shells/textsh1.cxx b/sw/source/uibase/shells/textsh1.cxx
index 29f0dd9a98e6..e723e6221262 100644
--- a/sw/source/uibase/shells/textsh1.cxx
+++ b/sw/source/uibase/shells/textsh1.cxx
@@ -2187,7 +2187,7 @@ void SwTextShell::GetState( SfxItemSet &rSet )
// Enable it if we have a valid object other than what form shell knows
SwPosition aPos(*GetShell().GetCursor()->GetPoint());
sw::mark::IFieldmark* pFieldBM = GetShell().getIDocumentMarkAccess()->getFieldmarkFor(aPos);
- if ( !pFieldBM && aPos.nContent.GetIndex() > 0)
+ if ( !pFieldBM && aPos.GetContentIndex() > 0)
{
--aPos.nContent;
pFieldBM = GetShell().getIDocumentMarkAccess()->getFieldmarkFor(aPos);
diff --git a/sw/source/uibase/uiview/viewling.cxx b/sw/source/uibase/uiview/viewling.cxx
index 249dce2e0e94..6e9024d7ed69 100644
--- a/sw/source/uibase/uiview/viewling.cxx
+++ b/sw/source/uibase/uiview/viewling.cxx
@@ -170,7 +170,7 @@ void SwView::ExecLingu(SfxRequest &rReq)
const SwPosition *pPoint = m_pWrtShell->GetCursor()->GetPoint();
bool bRestoreCursor = pPoint->GetNode().IsTextNode();
const SwNodeIndex aPointNodeIndex( pPoint->nNode );
- sal_Int32 nPointIndex = pPoint->nContent.GetIndex();
+ sal_Int32 nPointIndex = pPoint->GetContentIndex();
// since this conversion is not interactive the whole converted
// document should be undone in a single undo step.
diff --git a/sw/source/uibase/uno/unotxdoc.cxx b/sw/source/uibase/uno/unotxdoc.cxx
index ced3a3d19a33..f348abcf48f6 100644
--- a/sw/source/uibase/uno/unotxdoc.cxx
+++ b/sw/source/uibase/uno/unotxdoc.cxx
@@ -3242,7 +3242,7 @@ void SwXTextDocument::getTrackedChanges(tools::JsonWriter& rJson)
aCursor.SetMark();
aCursor.GetMark()->nNode = *pContentNd;
aCursor.GetMark()->nContent.Assign(pContentNd,
- rRedlineTable[i]->End()->nContent.GetIndex());
+ rRedlineTable[i]->End()->GetContentIndex());
aCursor.FillRects();
@@ -3387,7 +3387,7 @@ void SwXTextDocument::executeContentControlEvent(const StringMap& rArguments)
return;
}
- SwTextAttr* pAttr = pTextNode->GetTextAttrAt(pStart->nContent.GetIndex(),
+ SwTextAttr* pAttr = pTextNode->GetTextAttrAt(pStart->GetContentIndex(),
RES_TXTATR_CONTENTCONTROL, SwTextNode::PARENT);
if (!pAttr)
{
@@ -3441,7 +3441,7 @@ void SwXTextDocument::executeContentControlEvent(const StringMap& rArguments)
return;
}
- SwTextAttr* pAttr = pTextNode->GetTextAttrAt(pStart->nContent.GetIndex(),
+ SwTextAttr* pAttr = pTextNode->GetTextAttrAt(pStart->GetContentIndex(),
RES_TXTATR_CONTENTCONTROL, SwTextNode::PARENT);
if (!pAttr)
{
diff --git a/sw/source/uibase/wrtsh/delete.cxx b/sw/source/uibase/wrtsh/delete.cxx
index 4c0e853df434..5549943ccb7b 100644
--- a/sw/source/uibase/wrtsh/delete.cxx
+++ b/sw/source/uibase/wrtsh/delete.cxx
@@ -496,7 +496,7 @@ bool SwWrtShell::DelRight(bool const isReplaceHeuristic)
if (pTextNode)
{
const SwTextField* pField(
- pTextNode->GetFieldTextAttrAt(pAnchor->nContent.GetIndex(), true));
+ pTextNode->GetFieldTextAttrAt(pAnchor->GetContentIndex(), true));
if (pField
&& dynamic_cast<const SwPostItField*>(pField->GetFormatField().GetField()))
{
diff --git a/sw/source/uibase/wrtsh/select.cxx b/sw/source/uibase/wrtsh/select.cxx
index a8df34c09dab..455835362c88 100644
--- a/sw/source/uibase/wrtsh/select.cxx
+++ b/sw/source/uibase/wrtsh/select.cxx
@@ -406,8 +406,8 @@ namespace {
void collectUIInformation(SwShellCursor* pCursor)
{
EventDescription aDescription;
- OUString aSelStart = OUString::number(pCursor->Start()->nContent.GetIndex());
- OUString aSelEnd = OUString::number(pCursor->End()->nContent.GetIndex());
+ OUString aSelStart = OUString::number(pCursor->Start()->GetContentIndex());
+ OUString aSelEnd = OUString::number(pCursor->End()->GetContentIndex());
aDescription.aParameters = {{"START_POS", aSelStart}, {"END_POS", aSelEnd}};
aDescription.aAction = "SELECT";