summaryrefslogtreecommitdiff
path: root/svtools/source/control/stdmenu.cxx
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2016-05-06 13:46:03 +0200
committerMichael Stahl <mstahl@redhat.com>2016-05-06 16:18:29 +0200
commitafad4eeaffcad716f135de2bd111bd0aca68e07f (patch)
tree8a4b2d969bfe75f0cdbb06bfaddbab69af33ba40 /svtools/source/control/stdmenu.cxx
parent8d10c23705f30e55f36220a7d9bad86c0c53c66a (diff)
svtools: FontList loops with > 2^16 fonts
Change-Id: Idfe5d76ee384dff3280f81686cbf408c2f675dc6
Diffstat (limited to 'svtools/source/control/stdmenu.cxx')
-rw-r--r--svtools/source/control/stdmenu.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/svtools/source/control/stdmenu.cxx b/svtools/source/control/stdmenu.cxx
index 6e0e55e8f4a9..d2e972e2eec0 100644
--- a/svtools/source/control/stdmenu.cxx
+++ b/svtools/source/control/stdmenu.cxx
@@ -54,8 +54,8 @@ void FontNameMenu::Fill( const FontList* pList )
const vcl::I18nHelper& rI18nHelper = Application::GetSettings().GetUILocaleI18nHelper();
// more than 100 fonts reduces the speed of opening the menu.
// So only the first 100 fonts will be displayed.
- sal_uInt16 nFontCount = ::std::min( pList->GetFontNameCount(), static_cast< sal_uInt16 >(100) );
- for (sal_uInt16 i = 0; i < nFontCount; ++i)
+ size_t nFontCount = ::std::min<size_t>(pList->GetFontNameCount(), 100);
+ for (size_t i = 0; i < nFontCount; ++i)
{
const OUString& rName = pList->GetFontName( i ).GetFamilyName();