diff options
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/doc/doctempl.cxx | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/sfx2/source/doc/doctempl.cxx b/sfx2/source/doc/doctempl.cxx index ade4fa4a1684..a62ca784adcb 100644 --- a/sfx2/source/doc/doctempl.cxx +++ b/sfx2/source/doc/doctempl.cxx @@ -1413,20 +1413,16 @@ void RegionData_Impl::AddEntry( const OUString& rTitle, INetURLObject::ENCODE_ALL ); OUString aLinkURL = aLinkObj.GetMainURL( INetURLObject::NO_DECODE ); - DocTempl_EntryData_Impl* pEntry; bool bFound = false; size_t nPos = GetEntryPos( rTitle, bFound ); - if ( bFound ) - { - pEntry = maEntries[ nPos ]; - } - else + if ( !bFound ) { if ( pPos ) nPos = *pPos; - pEntry = new DocTempl_EntryData_Impl( this, rTitle ); + DocTempl_EntryData_Impl* pEntry = new DocTempl_EntryData_Impl( + this, rTitle ); pEntry->SetTargetURL( rTargetURL ); pEntry->SetHierarchyURL( aLinkURL ); if ( nPos < maEntries.size() ) { |