summaryrefslogtreecommitdiff
path: root/writerfilter
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-10-10 09:37:38 +0200
committerNoel Grandin <noel@peralex.com>2014-10-10 10:14:16 +0200
commit3bbfbed375ffaa9ad5b0e857ef6c57575298baed (patch)
treede6cc86a8b24ae14b8bd3bcd863bf629c28cea0f /writerfilter
parenta1552a0ec3fcddd968db274ef41bc2452c50bed9 (diff)
cid#1244941 Invalid iterator comparison
this is just a false+, but creating a local var will likely fix it Change-Id: Ia02e04098a70102c70f5fe5ecd156eea6f40d2af
Diffstat (limited to 'writerfilter')
-rw-r--r--writerfilter/source/dmapper/DomainMapper_Impl.cxx14
1 files changed, 10 insertions, 4 deletions
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index fbfae7c1a85e..f49a14f3a2b8 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -1664,13 +1664,19 @@ void DomainMapper_Impl::CheckRedline( uno::Reference< text::XTextRange > const&
// Create the redlines here from lowest (formats) to highest (inserts/removals) priority, since the last one is
// what Writer presents graphically, so this will show deletes as deleted text and not as just formatted text being there.
if( GetTopContextOfType(CONTEXT_PARAGRAPH) )
- for( std::vector<RedlineParamsPtr>::const_iterator it = GetTopContextOfType(CONTEXT_PARAGRAPH)->Redlines().begin();
- it != GetTopContextOfType(CONTEXT_PARAGRAPH)->Redlines().end(); ++it )
+ {
+ std::vector<RedlineParamsPtr>& avRedLines = GetTopContextOfType(CONTEXT_PARAGRAPH)->Redlines();
+ for( std::vector<RedlineParamsPtr>::const_iterator it = avRedLines.begin();
+ it != avRedLines.end(); ++it )
CreateRedline( xRange, *it );
+ }
if( GetTopContextOfType(CONTEXT_CHARACTER) )
- for( std::vector<RedlineParamsPtr>::const_iterator it = GetTopContextOfType(CONTEXT_CHARACTER)->Redlines().begin();
- it != GetTopContextOfType(CONTEXT_CHARACTER)->Redlines().end(); ++it )
+ {
+ std::vector<RedlineParamsPtr>& avRedLines = GetTopContextOfType(CONTEXT_CHARACTER)->Redlines();
+ for( std::vector<RedlineParamsPtr>::const_iterator it = avRedLines.begin();
+ it != avRedLines.end(); ++it )
CreateRedline( xRange, *it );
+ }
std::vector<RedlineParamsPtr>::iterator pIt = m_aRedlines.top().begin( );
for (; pIt != m_aRedlines.top().end( ); ++pIt )
CreateRedline( xRange, *pIt );