--- stdmenu.cxx.orig Sun Aug 24 19:15:15 2003 +++ stdmenu.cxx Sun Aug 24 19:33:05 2003 @@ -116,13 +116,37 @@ const vcl::I18nHelper& rI18nHelper = Application::GetSettings().GetUILocaleI18nHelper(); USHORT nFontCount = pList->GetFontNameCount(); + + if (nFontCount > 100) + { + // Putting more than a hundred font names into a popup menu + // doesn't make sense: Whoever installs a large amount of + // fonts won't seriously try to select one from a popup-menu, + // anyway, as this would be quite uncomfortable. + // + // If you install, for example, a thousand free fonts that + // are available on the InterNet, you'll experience annoying + // delays of several seconds before any context menu that contains + // a font selection openes. + // + // Therefore, we limit the number of fonts to be displayed + // in a popup font menu to 100, which is still a large amount + // but won't cause the popup to take insane amounts of time to + // be rendered. + // + // If we knew about the "favourite" fonts of the user, this + // could be done better by just displaying the top-100 or so... + nFontCount = 100; + } + for ( USHORT i = 0; i < nFontCount; i++ ) { const XubString& rName = pList->GetFontName( i ).GetName(); + USHORT j = GetItemCount(); + // Sortieren, nach der in der Applikation eingestellten // International-Klasse - USHORT j = GetItemCount(); while ( j ) { XubString aText = GetItemText( GetItemId( j-1 ) );