diff options
Diffstat (limited to 'sw/source/filter/html/htmlforw.cxx')
-rw-r--r-- | sw/source/filter/html/htmlforw.cxx | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/sw/source/filter/html/htmlforw.cxx b/sw/source/filter/html/htmlforw.cxx index 5407ee03a383..3b0715581352 100644 --- a/sw/source/filter/html/htmlforw.cxx +++ b/sw/source/filter/html/htmlforw.cxx @@ -1309,13 +1309,11 @@ static void AddControl( HTMLControls& rControls, { uno::Reference< container::XIndexContainer > xFormComps( xForm, uno::UNO_QUERY ); std::unique_ptr<HTMLControl> pHCntrl(new HTMLControl( xFormComps, nNodeIdx )); - HTMLControls::const_iterator it = rControls.find( pHCntrl.get() ); - if( it == rControls.end() ) - rControls.insert( std::move(pHCntrl) ); - else + auto itPair = rControls.insert( std::move(pHCntrl) ); + if (!itPair.second ) { - if( (*it)->xFormComps==xFormComps ) - (*it)->nCount++; + if( (*itPair.first)->xFormComps==xFormComps ) + (*itPair.first)->nCount++; } } } |