Kaydet (Commit) 96938bd0 authored tarafından Michael Stahl's avatar Michael Stahl

fix previous commit:

boost::ptr_vector::erase() will delete the element, but fortunately there
is a transfer() method that can be used here.
üst 2ebfe6fd
...@@ -90,15 +90,19 @@ void SwComboBox::RemoveEntry(sal_uInt16 nPos) ...@@ -90,15 +90,19 @@ void SwComboBox::RemoveEntry(sal_uInt16 nPos)
// Remove old element // Remove old element
SwBoxEntry* pEntry = &aEntryLst[nPos]; SwBoxEntry* pEntry = &aEntryLst[nPos];
aEntryLst.erase(aEntryLst.begin() + nPos);
ComboBox::RemoveEntry(nPos); ComboBox::RemoveEntry(nPos);
// Don't add new entries to the list // Don't add new entries to the list
if(pEntry->bNew) if(pEntry->bNew)
return; {
aEntryLst.erase(aEntryLst.begin() + nPos);
// add to DelEntryLst }
aDelEntryLst.push_back(pEntry); else
{
// add to DelEntryLst
aDelEntryLst.transfer(aDelEntryLst.end(),
aEntryLst.begin() + nPos, aEntryLst);
}
} }
sal_uInt16 SwComboBox::GetEntryPos(const SwBoxEntry& rEntry) const sal_uInt16 SwComboBox::GetEntryPos(const SwBoxEntry& rEntry) const
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment