[Libreoffice-commits] core.git: Branch 'libreoffice-5-0-4' - lotuswordpro/source
Caolán McNamara
caolanm at redhat.com
Thu Dec 10 07:25:22 PST 2015
lotuswordpro/source/filter/lwpfont.cxx | 5 +++++
1 file changed, 5 insertions(+)
New commits:
commit c023d5deb783e1e463f60e02cfabd045bfdda4c9
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Dec 9 16:58:16 2015 +0000
bounds check GetNameByIndex like Override
Change-Id: If83e255da1683779458556a3ab1af4f00b19265b
(cherry picked from commit 8c67b1b51f21643036c5f5371a6af0a4558e7da2)
Reviewed-on: https://gerrit.libreoffice.org/20548
Reviewed-by: David Tardon <dtardon at redhat.com>
Tested-by: David Tardon <dtardon at redhat.com>
Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
Reviewed-by: Michael Stahl <mstahl at redhat.com>
diff --git a/lotuswordpro/source/filter/lwpfont.cxx b/lotuswordpro/source/filter/lwpfont.cxx
index 3ee7e1b..4307d29 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));
}
More information about the Libreoffice-commits
mailing list