Kaydet (Commit) 8c67b1b5 authored tarafından Caolán McNamara's avatar Caolán McNamara

bounds check GetNameByIndex like Override

Change-Id: If83e255da1683779458556a3ab1af4f00b19265b
üst 7e341379
......@@ -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