summaryrefslogtreecommitdiff
path: root/sw/source/ui/dialog/ascfldlg.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/ui/dialog/ascfldlg.cxx')
-rw-r--r--sw/source/ui/dialog/ascfldlg.cxx20
1 files changed, 16 insertions, 4 deletions
diff --git a/sw/source/ui/dialog/ascfldlg.cxx b/sw/source/ui/dialog/ascfldlg.cxx
index 355e68bd5c58..4cab48e79d8a 100644
--- a/sw/source/ui/dialog/ascfldlg.cxx
+++ b/sw/source/ui/dialog/ascfldlg.cxx
@@ -58,6 +58,8 @@
#include <ascfldlg.hrc>
#endif
+#include "vcl/metric.hxx"
+
using namespace ::com::sun::star;
@@ -180,11 +182,21 @@ SwAsciiFilterDlg::SwAsciiFilterDlg( Window* pParent, SwDocShell& rDocSh,
bDelPrinter = TRUE;
}
- const USHORT nCount = pPrt->GetFontCount();
- for (USHORT i = 0; i < nCount; ++i)
+
+ // get the set of disctinct available family names
+ std::set< String > aFontNames;
+ int nFontNames = pPrt->GetDevFontCount();
+ for( int i = 0; i < nFontNames; i++ )
+ {
+ FontInfo aInf( pPrt->GetDevFont( i ) );
+ aFontNames.insert( aInf.GetName() );
+ }
+
+ // insert to listbox
+ for( std::set< String >::const_iterator it = aFontNames.begin();
+ it != aFontNames.end(); ++it )
{
- const String &rStr = pPrt->GetFont(i)->GetName();
- aFontLB.InsertEntry( rStr );
+ aFontLB.InsertEntry( *it );
}
if( !aOpt.GetFontName().Len() )