summaryrefslogtreecommitdiff
path: root/vcl/aqua
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/aqua')
-rw-r--r--vcl/aqua/source/gdi/salprn.cxx5
-rwxr-xr-xvcl/aqua/source/window/salframeview.mm5
2 files changed, 6 insertions, 4 deletions
diff --git a/vcl/aqua/source/gdi/salprn.cxx b/vcl/aqua/source/gdi/salprn.cxx
index 76f3fe5d1756..2efd6f7bb8ef 100644
--- a/vcl/aqua/source/gdi/salprn.cxx
+++ b/vcl/aqua/source/gdi/salprn.cxx
@@ -38,6 +38,7 @@
#include "vcl/salptype.hxx"
#include "vcl/print.hxx"
#include "vcl/unohelp.hxx"
+#include <sal/macros.h>
#include <boost/bind.hpp>
@@ -203,7 +204,7 @@ static struct PaperSizeEntry
static bool getPaperSize( double& o_fWidth, double& o_fHeight, const Paper i_ePaper )
{
- for(unsigned int i = 0; i < sizeof(aPaperSizes)/sizeof(aPaperSizes[0]); i++ )
+ for(unsigned int i = 0; i < SAL_N_ELEMENTS(aPaperSizes); i++ )
{
if( aPaperSizes[i].nPaper == i_ePaper )
{
@@ -237,7 +238,7 @@ static Paper recognizePaper( double i_fWidth, double i_fHeight )
if( aPaper == PAPER_USER )
{
// search with fuzz factor
- for( unsigned int i = 0; i < sizeof(aPaperSizes)/sizeof(aPaperSizes[0]); i++ )
+ for( unsigned int i = 0; i < SAL_N_ELEMENTS(aPaperSizes); i++ )
{
double w = (i_fWidth > aPaperSizes[i].fWidth) ? i_fWidth - aPaperSizes[i].fWidth : aPaperSizes[i].fWidth - i_fWidth;
double h = (i_fHeight > aPaperSizes[i].fHeight) ? i_fHeight - aPaperSizes[i].fHeight : aPaperSizes[i].fHeight - i_fHeight;
diff --git a/vcl/aqua/source/window/salframeview.mm b/vcl/aqua/source/window/salframeview.mm
index 2f9959ab43f4..ca9ef4a5e263 100755
--- a/vcl/aqua/source/window/salframeview.mm
+++ b/vcl/aqua/source/window/salframeview.mm
@@ -34,6 +34,7 @@
#include "salframeview.h"
#include "aqua11yfactory.h"
#include <sal/alloca.h>
+#include <sal/macros.h>
#include "vcl/window.hxx"
#include "vcl/svapp.hxx"
@@ -105,7 +106,7 @@ static USHORT ImplMapCharCode( sal_Unicode aCode )
};
USHORT nKeyCode = 0;
- if( aCode < sizeof( aKeyCodeMap) / sizeof( aKeyCodeMap[0] ) )
+ if( aCode < SAL_N_ELEMENTS( aKeyCodeMap) )
nKeyCode = aKeyCodeMap[ aCode ];
else if( aCode >= 0xf700 && aCode < 0xf780 )
nKeyCode = aFunctionKeyCodeMap[ aCode - 0xf700 ];
@@ -878,7 +879,7 @@ private:
// Caution: should the table grow to more than 5 or 6 entries,
// we must consider moving it to a kind of hash map
- const unsigned int nExceptions = sizeof( aExceptionalKeys ) / sizeof( aExceptionalKeys[0] );
+ const unsigned int nExceptions = SAL_N_ELEMENTS( aExceptionalKeys );
for( unsigned int i = 0; i < nExceptions; i++ )
{
if( nKeyCode == aExceptionalKeys[i].nKeyCode &&