| commit | 28b5fb6aa23ab060cf4ca99097532749e9d4403a | [log] |
|---|---|---|
| author | Caolán McNamara <caolanm@redhat.com> | Wed Dec 09 16:58:16 2015 +0000 |
| committer | Caolán McNamara <caolanm@redhat.com> | Wed Dec 09 16:59:59 2015 +0000 |
| tree | e33a80fe26e783d3857c36b49822e76188c825eb | |
| parent | 3b9e2bb22e782d073d8e67ae975ebb8ca5eea552 [diff] |
bounds check GetNameByIndex like Override Change-Id: If83e255da1683779458556a3ab1af4f00b19265b (cherry picked from commit 8c67b1b51f21643036c5f5371a6af0a4558e7da2) Reviewed-on: https://gerrit.libreoffice.org/20546 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
diff --git a/lotuswordpro/source/filter/lwpfont.cxx b/lotuswordpro/source/filter/lwpfont.cxx index cc27bef..5e0d274 100644 --- a/lotuswordpro/source/filter/lwpfont.cxx +++ b/lotuswordpro/source/filter/lwpfont.cxx
@@ -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)); }