summaryrefslogtreecommitdiff
path: root/sw/source/core/doc/docfly.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-10-19 09:08:35 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-10-21 15:25:56 +0200
commit5f9ffc31cd1b5433c354c7d39ce1d80fa0e57fc8 (patch)
tree8736f233563535eb3aa5fa019bb92a9970970428 /sw/source/core/doc/docfly.cxx
parent81debfba86b1d67d1c2e0ecd9c10ca35c3e7de5e (diff)
introduce SwNodeOffset strong typedef
for indexing into node children. Replaces various usage of sal_uLong, tools::Long, sal_uInt32 with an underlying type of sal_Int32. Also add a NODE_OFFSET_MAX constant to replace usage of ULONG_MAX Change-Id: I2f466922e1ebc19029bb2883d2b29aa4c0614170 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123892 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/core/doc/docfly.cxx')
-rw-r--r--sw/source/core/doc/docfly.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/sw/source/core/doc/docfly.cxx b/sw/source/core/doc/docfly.cxx
index 8293ef06bc31..6b73f1f756b5 100644
--- a/sw/source/core/doc/docfly.cxx
+++ b/sw/source/core/doc/docfly.cxx
@@ -1041,8 +1041,8 @@ SwChainRet SwDoc::Chainable( const SwFrameFormat &rSource, const SwFrameFormat &
if( !pTextNd )
return SwChainRet::NOT_FOUND;
- const sal_uLong nFlySttNd = pCntIdx->GetIndex();
- if( 2 != ( pCntIdx->GetNode().EndOfSectionIndex() - nFlySttNd ) ||
+ const SwNodeOffset nFlySttNd = pCntIdx->GetIndex();
+ if( SwNodeOffset(2) != ( pCntIdx->GetNode().EndOfSectionIndex() - nFlySttNd ) ||
pTextNd->GetText().getLength() )
{
return SwChainRet::NOT_EMPTY;
@@ -1057,8 +1057,8 @@ SwChainRet SwDoc::Chainable( const SwFrameFormat &rSource, const SwFrameFormat &
continue;
if ( nullptr == rAnchor.GetContentAnchor() )
continue;
- sal_uLong nTstSttNd = rAnchor.GetContentAnchor()->nNode.GetIndex();
- if( nFlySttNd <= nTstSttNd && nTstSttNd < nFlySttNd + 2 )
+ SwNodeOffset nTstSttNd = rAnchor.GetContentAnchor()->nNode.GetIndex();
+ if( nFlySttNd <= nTstSttNd && nTstSttNd < nFlySttNd + SwNodeOffset(2) )
{
return SwChainRet::NOT_EMPTY;
}
@@ -1072,7 +1072,7 @@ SwChainRet SwDoc::Chainable( const SwFrameFormat &rSource, const SwFrameFormat &
// both in the same fly, header, footer or on the page?
const SwFormatAnchor &rSrcAnchor = rSource.GetAnchor(),
&rDstAnchor = rDest.GetAnchor();
- sal_uLong nEndOfExtras = GetNodes().GetEndOfExtras().GetIndex();
+ SwNodeOffset nEndOfExtras = GetNodes().GetEndOfExtras().GetIndex();
bool bAllowed = false;
if ( RndStdIds::FLY_AT_PAGE == rSrcAnchor.GetAnchorId() )
{