Kaydet (Commit) 05b45cc9 authored tarafından Vasily Melenchuk's avatar Vasily Melenchuk Kaydeden (comit) Thorsten Behrens

uno: extra exception for XAutoTextGroup:removeByName

According to idl, removeByName() should throw
NoSuchElementException on invalid element, but it does not

Change-Id: I4ae84cd8c5a0f46bedeb3df6da4dee076888295f
Reviewed-on: https://gerrit.libreoffice.org/60978
Tested-by: Jenkins
Reviewed-by: 's avatarThorsten Behrens <Thorsten.Behrens@CIB.de>
üst 6328c56e
......@@ -440,8 +440,10 @@ void SwXAutoTextGroup::removeByName(const OUString& aEntryName)
throw container::NoSuchElementException();
sal_uInt16 nIdx = pGlosGroup->GetIndex(aEntryName);
if ( nIdx != USHRT_MAX )
pGlosGroup->Delete(nIdx);
if ( nIdx == USHRT_MAX )
throw container::NoSuchElementException();
pGlosGroup->Delete(nIdx);
}
OUString SwXAutoTextGroup::getName()
......
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