summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
authorMichael Stahl <Michael.Stahl@cib.de>2018-06-07 19:36:06 +0200
committerMichael Stahl <Michael.Stahl@cib.de>2018-06-08 21:51:37 +0200
commit4216fbc7503f1bb95d9a27d6195cec239eb47576 (patch)
treede0e73a3a34aaedb269c7613372361f264843eb4 /sw/source
parentab1b2a0d6243f03849b7ac80962d08760ada6418 (diff)
sw_redlinehide: trivial conversions in lcl_DrawLineForWrongListData
Change-Id: I7425bac439df7518b7fe1b62cd6f3fd7a9f88fec
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/core/txtnode/fntcache.cxx15
1 files changed, 6 insertions, 9 deletions
diff --git a/sw/source/core/txtnode/fntcache.cxx b/sw/source/core/txtnode/fntcache.cxx
index ed1b86f36218..a0a38aa94364 100644
--- a/sw/source/core/txtnode/fntcache.cxx
+++ b/sw/source/core/txtnode/fntcache.cxx
@@ -639,7 +639,7 @@ static bool lcl_IsFullstopCentered( const vcl::RenderContext& rOut )
/* This helper structure (SwForbidden) contains the already marked parts of the string
to avoid double lines (e.g grammar + spell check error) */
-typedef std::vector< std::pair< sal_Int32, sal_Int32 > > SwForbidden;
+typedef std::vector<std::pair<TextFrameIndex, TextFrameIndex>> SwForbidden;
static void lcl_DrawLineForWrongListData(
SwForbidden &rForbidden,
@@ -679,23 +679,20 @@ static void lcl_DrawLineForWrongListData(
{
nStart -= rInf.GetIdx();
- const sal_Int32 nEnd = nStart + nWrLen;
- sal_Int32 nNext = nStart;
+ const TextFrameIndex nEnd = nStart + nWrLen;
+ TextFrameIndex nNext = nStart;
while( nNext < nEnd )
{
while( pIter != rForbidden.end() && pIter->second <= nNext )
++pIter;
- const sal_Int32 nNextStart = nNext;
- sal_Int32 nNextEnd = nEnd;
+ const TextFrameIndex nNextStart = nNext;
+ TextFrameIndex nNextEnd = nEnd;
if( pIter == rForbidden.end() || nNextEnd <= pIter->first )
{
// No overlapping mark up found
- std::pair< sal_Int32, sal_Int32 > aNew;
- aNew.first = nNextStart;
- aNew.second = nNextEnd;
- rForbidden.insert( pIter, aNew );
+ rForbidden.insert(pIter, std::make_pair(nNextStart, nNextEnd));
pIter = rForbidden.begin();
nNext = nEnd;
}