diff options
Diffstat (limited to 'sw/source/core/txtnode/thints.cxx')
-rw-r--r-- | sw/source/core/txtnode/thints.cxx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sw/source/core/txtnode/thints.cxx b/sw/source/core/txtnode/thints.cxx index 361a7513d4bd..689b032bb3c5 100644 --- a/sw/source/core/txtnode/thints.cxx +++ b/sw/source/core/txtnode/thints.cxx @@ -2331,14 +2331,13 @@ lcl_CollectHintSpans(const SwpHints& i_rHints, const sal_Int32 nLength, if (nWhich == RES_TXTATR_CHARFMT || nWhich == RES_TXTATR_AUTOFMT) { const AttrSpan_t aSpan(pHint->GetStart(), *pHint->End()); - o_rSpanMap.insert(AttrSpanMap_t::value_type(aSpan, pHint)); + o_rSpanMap.emplace(aSpan, pHint); // < not != because there may be multiple CHARFMT at same range if (nLastEnd < aSpan.first) { // insert dummy span covering the gap - o_rSpanMap.insert(AttrSpanMap_t::value_type( - AttrSpan_t(nLastEnd, aSpan.first), nullptr)); + o_rSpanMap.emplace( AttrSpan_t(nLastEnd, aSpan.first), nullptr ); } nLastEnd = aSpan.second; |