[Libreoffice-commits] .: sdext/source
Noel Power
noelp at kemper.freedesktop.org
Fri Dec 3 06:02:49 PST 2010
sdext/source/minimizer/configurationaccess.cxx | 3 ++-
sdext/source/minimizer/informationdialog.cxx | 11 ++++++-----
sdext/source/minimizer/optimizerdialog.cxx | 5 +++--
sdext/source/minimizer/optimizerdialogcontrols.cxx | 19 ++++++++++---------
sdext/source/minimizer/pppoptimizertoken.cxx | 3 ++-
5 files changed, 23 insertions(+), 18 deletions(-)
New commits:
commit 54063528841a6ce49dcb8947de87748e4b1e537c
Author: Kenneth Venken <kenneth.venken at gmail.com>
Date: Fri Dec 3 13:59:22 2010 +0000
more Sal n elements
diff --git a/sdext/source/minimizer/configurationaccess.cxx b/sdext/source/minimizer/configurationaccess.cxx
index 83187bc..0965c50 100644
--- a/sdext/source/minimizer/configurationaccess.cxx
+++ b/sdext/source/minimizer/configurationaccess.cxx
@@ -36,6 +36,7 @@
#include <com/sun/star/container/XNameContainer.hpp>
#include <com/sun/star/util/XMacroExpander.hpp>
#include <com/sun/star/lang/XSingleServiceFactory.hpp>
+#include <sal/macros.h>
using namespace ::rtl;
using namespace ::com::sun::star;
@@ -133,7 +134,7 @@ void OptimizerSettings::SaveSettingsToConfiguration( const Reference< XNameRepla
// Any( maFilterName ),
Any( mbOpenNewDocument ) };
- sal_Int32 i, nCount = sizeof( pNames ) / sizeof( OUString );
+ sal_Int32 i, nCount = SAL_N_ELEMENTS( pNames );
for ( i = 0; i < nCount; i++ )
{
diff --git a/sdext/source/minimizer/informationdialog.cxx b/sdext/source/minimizer/informationdialog.cxx
index de6bd58..124695f 100644
--- a/sdext/source/minimizer/informationdialog.cxx
+++ b/sdext/source/minimizer/informationdialog.cxx
@@ -35,6 +35,7 @@
#include <com/sun/star/graphic/XGraphicProvider.hpp>
#include <com/sun/star/graphic/XGraphic.hpp>
#include <rtl/ustrbuf.hxx>
+#include <sal/macros.h>
#include "com/sun/star/util/URL.hpp"
#include "com/sun/star/util/XURLTransformer.hpp"
@@ -88,7 +89,7 @@ rtl::OUString InsertFixedText( InformationDialog& rInformationDialog, const rtl:
Any( nTabIndex ),
Any( nWidth ) };
- sal_Int32 nCount = sizeof( pNames ) / sizeof( OUString );
+ sal_Int32 nCount = SAL_N_ELEMENTS( pNames );
Sequence< rtl::OUString > aNames( pNames, nCount );
Sequence< Any > aValues( pValues, nCount );
@@ -117,7 +118,7 @@ rtl::OUString InsertImage( InformationDialog& rInformationDialog, const OUString
Any( nPosY ),
Any( sal_True ),
Any( nWidth ) };
- sal_Int32 nCount = sizeof( pNames ) / sizeof( OUString );
+ sal_Int32 nCount = SAL_N_ELEMENTS( pNames );
Sequence< rtl::OUString > aNames( pNames, nCount );
Sequence< Any > aValues( pValues, nCount );
@@ -150,7 +151,7 @@ rtl::OUString InsertCheckBox( InformationDialog& rInformationDialog, const OUStr
Any( nTabIndex ),
Any( nWidth ) };
- sal_Int32 nCount = sizeof( pNames ) / sizeof( OUString );
+ sal_Int32 nCount = SAL_N_ELEMENTS( pNames );
Sequence< rtl::OUString > aNames( pNames, nCount );
Sequence< Any > aValues( pValues, nCount );
@@ -187,7 +188,7 @@ rtl::OUString InsertButton( InformationDialog& rInformationDialog, const OUStrin
Any( nWidth ) };
- sal_Int32 nCount = sizeof( pNames ) / sizeof( OUString );
+ sal_Int32 nCount = SAL_N_ELEMENTS( pNames );
Sequence< rtl::OUString > aNames( pNames, nCount );
Sequence< Any > aValues( pValues, nCount );
@@ -269,7 +270,7 @@ void InformationDialog::InitDialog()
Any( getString( STR_SUN_OPTIMIZATION_WIZARD2 ) ),
Any( sal_Int32( DIALOG_WIDTH ) ) };
- sal_Int32 nCount = sizeof( pNames ) / sizeof( OUString );
+ sal_Int32 nCount = SAL_N_ELEMENTS( pNames );
Sequence< rtl::OUString > aNames( pNames, nCount );
Sequence< Any > aValues( pValues, nCount );
diff --git a/sdext/source/minimizer/optimizerdialog.cxx b/sdext/source/minimizer/optimizerdialog.cxx
index 32bac31..f50e5ee 100644
--- a/sdext/source/minimizer/optimizerdialog.cxx
+++ b/sdext/source/minimizer/optimizerdialog.cxx
@@ -37,6 +37,7 @@
#include <com/sun/star/util/XCloseBroadcaster.hpp>
#include <com/sun/star/frame/XComponentLoader.hpp>
#include <com/sun/star/frame/XLayoutManager.hpp>
+#include <sal/macros.h>
#include <osl/time.h>
// -------------------
@@ -80,7 +81,7 @@ void OptimizerDialog::InitDialog()
Any( getString( STR_SUN_OPTIMIZATION_WIZARD2 ) ),
Any( sal_Int32( OD_DIALOG_WIDTH ) ) };
- sal_Int32 nCount = sizeof( pNames ) / sizeof( OUString );
+ sal_Int32 nCount = SAL_N_ELEMENTS( pNames );
Sequence< rtl::OUString > aNames( pNames, nCount );
Sequence< Any > aValues( pValues, nCount );
@@ -110,7 +111,7 @@ void OptimizerDialog::InitRoadmap()
Any( mnTabIndex++ ),
Any( sal_Int32( 85 ) ) };
- sal_Int32 nCount = sizeof( pNames ) / sizeof( OUString );
+ sal_Int32 nCount = SAL_N_ELEMENTS( pNames );
Sequence< rtl::OUString > aNames( pNames, nCount );
Sequence< Any > aValues( pValues, nCount );
diff --git a/sdext/source/minimizer/optimizerdialogcontrols.cxx b/sdext/source/minimizer/optimizerdialogcontrols.cxx
index a72ec14..d35054f 100644
--- a/sdext/source/minimizer/optimizerdialogcontrols.cxx
+++ b/sdext/source/minimizer/optimizerdialogcontrols.cxx
@@ -43,6 +43,7 @@
#include <com/sun/star/awt/FontDescriptor.hpp>
#include <com/sun/star/awt/FontWeight.hpp>
#include <rtl/ustrbuf.hxx>
+#include <sal/macros.h>
using namespace ::rtl;
using namespace ::com::sun::star::awt;
@@ -89,7 +90,7 @@ rtl::OUString InsertSeparator( OptimizerDialog& rOptimizerDialog, const OUString
Any( sal_Int16( 0 ) ),
Any( nWidth ) };
- sal_Int32 nCount = sizeof( pNames ) / sizeof( OUString );
+ sal_Int32 nCount = SAL_N_ELEMENTS( pNames );
Sequence< rtl::OUString > aNames( pNames, nCount );
Sequence< Any > aValues( pValues, nCount );
@@ -127,7 +128,7 @@ rtl::OUString InsertButton( OptimizerDialog& rOptimizerDialog, const OUString& r
Any( nWidth ) };
- sal_Int32 nCount = sizeof( pNames ) / sizeof( OUString );
+ sal_Int32 nCount = SAL_N_ELEMENTS( pNames );
Sequence< rtl::OUString > aNames( pNames, nCount );
Sequence< Any > aValues( pValues, nCount );
@@ -161,7 +162,7 @@ rtl::OUString InsertFixedText( OptimizerDialog& rOptimizerDialog, const rtl::OUS
Any( nTabIndex ),
Any( nWidth ) };
- sal_Int32 nCount = sizeof( pNames ) / sizeof( OUString );
+ sal_Int32 nCount = SAL_N_ELEMENTS( pNames );
Sequence< rtl::OUString > aNames( pNames, nCount );
Sequence< Any > aValues( pValues, nCount );
@@ -198,7 +199,7 @@ rtl::OUString InsertCheckBox( OptimizerDialog& rOptimizerDialog, const OUString&
Any( nTabIndex ),
Any( nWidth ) };
- sal_Int32 nCount = sizeof( pNames ) / sizeof( OUString );
+ sal_Int32 nCount = SAL_N_ELEMENTS( pNames );
Sequence< rtl::OUString > aNames( pNames, nCount );
Sequence< Any > aValues( pValues, nCount );
@@ -241,7 +242,7 @@ rtl::OUString InsertFormattedField( OptimizerDialog& rOptimizerDialog, const OUS
Any( nTabIndex ),
Any( nWidth ) };
- sal_Int32 nCount = sizeof( pNames ) / sizeof( OUString );
+ sal_Int32 nCount = SAL_N_ELEMENTS( pNames );
Sequence< rtl::OUString > aNames( pNames, nCount );
Sequence< Any > aValues( pValues, nCount );
@@ -287,7 +288,7 @@ rtl::OUString InsertComboBox( OptimizerDialog& rOptimizerDialog, const OUString&
Any( nTabIndex ),
Any( nWidth ) };
- sal_Int32 nCount = sizeof( pNames ) / sizeof( OUString );
+ sal_Int32 nCount = SAL_N_ELEMENTS( pNames );
Sequence< rtl::OUString > aNames( pNames, nCount );
Sequence< Any > aValues( pValues, nCount );
@@ -323,7 +324,7 @@ rtl::OUString InsertRadioButton( OptimizerDialog& rOptimizerDialog, const rtl::O
Any( nTabIndex ),
Any( nWidth ) };
- sal_Int32 nCount = sizeof( pNames ) / sizeof( OUString );
+ sal_Int32 nCount = SAL_N_ELEMENTS( pNames );
Sequence< rtl::OUString > aNames( pNames, nCount );
Sequence< Any > aValues( pValues, nCount );
@@ -366,7 +367,7 @@ rtl::OUString InsertListBox( OptimizerDialog& rOptimizerDialog, const OUString&
Any( nTabIndex ),
Any( nWidth ) };
- sal_Int32 nCount = sizeof( pNames ) / sizeof( OUString );
+ sal_Int32 nCount = SAL_N_ELEMENTS( pNames );
Sequence< rtl::OUString > aNames( pNames, nCount );
Sequence< Any > aValues( pValues, nCount );
@@ -867,7 +868,7 @@ void OptimizerDialog::InitPage4()
Any( (sal_Int32)( 0 ) ),
Any( (sal_Int32)( PAGE_WIDTH - 12 ) ) };
- sal_Int32 nCount = sizeof( pNames ) / sizeof( OUString );
+ sal_Int32 nCount = SAL_N_ELEMENTS( pNames );
Sequence< rtl::OUString > aNames( pNames, nCount );
Sequence< Any > aValues( pValues, nCount );
diff --git a/sdext/source/minimizer/pppoptimizertoken.cxx b/sdext/source/minimizer/pppoptimizertoken.cxx
index e213a06..74f6a40 100644
--- a/sdext/source/minimizer/pppoptimizertoken.cxx
+++ b/sdext/source/minimizer/pppoptimizertoken.cxx
@@ -31,6 +31,7 @@
#include "pppoptimizertoken.hxx"
#include <osl/mutex.hxx>
+#include <sal/macros.h>
#include <hash_map>
#include <string.h>
@@ -311,7 +312,7 @@ PPPOptimizerTokenEnum TKGet( const rtl::OUString& rToken )
{
TypeNameHashMap* pH = new TypeNameHashMap;
const TokenTable* pPtr = pTokenTableArray;
- const TokenTable* pEnd = pPtr + ( sizeof( pTokenTableArray ) / sizeof( TokenTable ) );
+ const TokenTable* pEnd = pPtr + SAL_N_ELEMENTS( pTokenTableArray );
for ( ; pPtr < pEnd; pPtr++ )
(*pH)[ pPtr->pS ] = pPtr->pE;
pHashMap = pH;
More information about the Libreoffice-commits
mailing list