summaryrefslogtreecommitdiff
path: root/vcl/source/gdi/font.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/source/gdi/font.cxx')
-rw-r--r--vcl/source/gdi/font.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/vcl/source/gdi/font.cxx b/vcl/source/gdi/font.cxx
index db471b74a1be..61db9f110a9e 100644
--- a/vcl/source/gdi/font.cxx
+++ b/vcl/source/gdi/font.cxx
@@ -38,6 +38,7 @@
#include "vcl/impfont.hxx"
#include "vcl/outfont.hxx"
#include "unotools/fontcfg.hxx"
+#include <sal/macros.h>
#include <algorithm>
@@ -1034,7 +1035,7 @@ namespace
aEnt.string = pOpen+1;
aEnt.string_len = (pClose-pOpen)-1;
aEnt.weight = WEIGHT_NORMAL;
- const int nEnt = sizeof( weight_table ) / sizeof( weight_table[0] );
+ const int nEnt = SAL_N_ELEMENTS( weight_table );
WeightSearchEntry* pFound = std::lower_bound( weight_table, weight_table+nEnt, aEnt );
if( pFound != (weight_table+nEnt) )
o_rResult.SetWeight( pFound->weight );