summaryrefslogtreecommitdiff
path: root/vcl/unx/gtk
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/unx/gtk')
-rw-r--r--vcl/unx/gtk/a11y/atkwrapper.cxx4
-rw-r--r--vcl/unx/gtk/window/gtkframe.cxx9
2 files changed, 8 insertions, 5 deletions
diff --git a/vcl/unx/gtk/a11y/atkwrapper.cxx b/vcl/unx/gtk/a11y/atkwrapper.cxx
index 235b3d96b2ac..0ef9b2d54248 100644
--- a/vcl/unx/gtk/a11y/atkwrapper.cxx
+++ b/vcl/unx/gtk/a11y/atkwrapper.cxx
@@ -516,6 +516,8 @@ wrapper_ref_relation_set( AtkObject *atk_obj )
/*****************************************************************************/
#if 0
+
+#include <sal/macros.h>
struct {
sal_Int16 value;
const sal_Char* name;
@@ -556,7 +558,7 @@ struct {
static void printStates(const uno::Sequence<sal_Int16>& rStates)
{
sal_Int32 n = rStates.getLength();
- size_t nTypes = sizeof(aStateTypeTable)/sizeof(aStateTypeTable[0]);
+ size_t nTypes = SAL_N_ELEMENTS(aStateTypeTable);
for (sal_Int32 i = 0; i < n; ++i)
{
for (size_t j = 0; j < nTypes; ++j)
diff --git a/vcl/unx/gtk/window/gtkframe.cxx b/vcl/unx/gtk/window/gtkframe.cxx
index a2befa16f317..7a8dac3d26ac 100644
--- a/vcl/unx/gtk/window/gtkframe.cxx
+++ b/vcl/unx/gtk/window/gtkframe.cxx
@@ -52,6 +52,7 @@
#include <vcl/bitmapex.hxx>
#include <vcl/impbmp.hxx>
#include <vcl/svids.hrc>
+#include <sal/macros.h>
#include <algorithm>
@@ -418,7 +419,7 @@ GtkSalFrame::GtkSalFrame( SystemParentData* pSysData )
GtkSalFrame::~GtkSalFrame()
{
- for( unsigned int i = 0; i < sizeof(m_aGraphics)/sizeof(m_aGraphics[0]); ++i )
+ for( unsigned int i = 0; i < SAL_N_ELEMENTS(m_aGraphics); ++i )
{
if( !m_aGraphics[i].pGraphics )
continue;
@@ -1739,7 +1740,7 @@ void GtkSalFrame::moveToScreen( int nScreen )
m_aSystemData.pAppContext = NULL;
m_aSystemData.aShellWindow = m_aSystemData.aWindow;
// update graphics if necessary
- for( unsigned int i = 0; i < sizeof(m_aGraphics)/sizeof(m_aGraphics[0]); i++ )
+ for( unsigned int i = 0; i < SAL_N_ELEMENTS(m_aGraphics); i++ )
{
if( m_aGraphics[i].bInUse )
m_aGraphics[i].pGraphics->SetDrawable( GDK_WINDOW_XWINDOW(m_pWindow->window), m_nScreen );
@@ -2400,7 +2401,7 @@ void GtkSalFrame::createNewWindow( XLIB_Window aNewParent, bool bXEmbed, int nSc
}
// free xrender resources
- for( unsigned int i = 0; i < sizeof(m_aGraphics)/sizeof(m_aGraphics[0]); i++ )
+ for( unsigned int i = 0; i < SAL_N_ELEMENTS(m_aGraphics); i++ )
if( m_aGraphics[i].bInUse )
m_aGraphics[i].pGraphics->SetDrawable( None, m_nScreen );
@@ -2435,7 +2436,7 @@ void GtkSalFrame::createNewWindow( XLIB_Window aNewParent, bool bXEmbed, int nSc
}
// update graphics
- for( unsigned int i = 0; i < sizeof(m_aGraphics)/sizeof(m_aGraphics[0]); i++ )
+ for( unsigned int i = 0; i < SAL_N_ELEMENTS(m_aGraphics); i++ )
{
if( m_aGraphics[i].bInUse )
{