Kaydet (Commit) 28b5fb6a authored tarafından Caolán McNamara's avatar Caolán McNamara

bounds check GetNameByIndex like Override

Change-Id: If83e255da1683779458556a3ab1af4f00b19265b
(cherry picked from commit 8c67b1b5)
Reviewed-on: https://gerrit.libreoffice.org/20546Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 3b9e2bb2
......@@ -399,8 +399,13 @@ void LwpFontNameManager::Override(sal_uInt16 index, rtl::Reference<XFFont> co
if(m_pFontNames[index-1].IsAltFaceNameOverridden())
pFont->SetFontNameAsia(m_FontTbl.GetFaceName(m_pFontNames[index-1].GetAltFaceID()));
}
OUString LwpFontNameManager::GetNameByIndex(sal_uInt16 index)
//index: start from 1
{
if (index > m_nCount || index < 1)
return OUString();
sal_uInt16 nameindex = m_pFontNames[index-1].GetFaceID();
return (m_FontTbl.GetFaceName(nameindex));
}
......
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