Kaydet (Commit) 59ced109 authored tarafından Caolán McNamara's avatar Caolán McNamara Kaydeden (comit) David Tardon

bounds check GetNameByIndex like Override

Change-Id: If83e255da1683779458556a3ab1af4f00b19265b
(cherry picked from commit 8c67b1b5)
Reviewed-on: https://gerrit.libreoffice.org/20547Reviewed-by: 's avatarDavid Tardon <dtardon@redhat.com>
Tested-by: 's avatarDavid Tardon <dtardon@redhat.com>
üst 3592f002
......@@ -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