summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
Diffstat (limited to 'sw')
-rw-r--r--sw/source/ui/misc/redlndlg.cxx19
1 files changed, 12 insertions, 7 deletions
diff --git a/sw/source/ui/misc/redlndlg.cxx b/sw/source/ui/misc/redlndlg.cxx
index 8f6fb5c8db0f..937147ca0753 100644
--- a/sw/source/ui/misc/redlndlg.cxx
+++ b/sw/source/ui/misc/redlndlg.cxx
@@ -580,17 +580,22 @@ void SwRedlineAcceptDlg::InsertChildren(SwRedlineDataParent *pParent, const SwRe
bValidParent = bValidParent && pTable->IsValidEntry(&rRedln.GetAuthorString(), &rRedln.GetTimeStamp(), &rRedln.GetComment());
if (nAutoFmt)
{
- SwRedlineDataParentSortArr::const_iterator it;
- if ( pParent->pData->GetSeqNo() && (it = aUsedSeqNo.insert(pParent).first) != aUsedSeqNo.end() ) // already there
+ if (pParent->pData->GetSeqNo())
{
- if (pParent->pTLBParent)
+ std::pair<SwRedlineDataParentSortArr::const_iterator,bool> const ret
+ = aUsedSeqNo.insert(pParent);
+ if (ret.second) // already there
{
- pTable->SetEntryText(sAutoFormat, (*it)->pTLBParent, 0);
- pTable->RemoveEntry(pParent->pTLBParent);
- pParent->pTLBParent = 0;
+ if (pParent->pTLBParent)
+ {
+ pTable->SetEntryText(
+ sAutoFormat, (*ret.first)->pTLBParent, 0);
+ pTable->RemoveEntry(pParent->pTLBParent);
+ pParent->pTLBParent = 0;
+ }
+ return;
}
- return;
}
bValidParent = bValidParent && bAutoFmt;
}