summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
Diffstat (limited to 'svx')
-rw-r--r--svx/source/fmcomp/fmgridif.cxx8
-rw-r--r--svx/source/form/ParseContext.cxx2
-rw-r--r--svx/source/form/fmPropBrw.cxx2
-rw-r--r--svx/source/form/fmdmod.cxx2
-rw-r--r--svx/source/form/fmundo.cxx4
-rw-r--r--svx/source/form/formcontrolling.cxx4
6 files changed, 11 insertions, 11 deletions
diff --git a/svx/source/fmcomp/fmgridif.cxx b/svx/source/fmcomp/fmgridif.cxx
index 912bed33d0a1..299c7331f4ad 100644
--- a/svx/source/fmcomp/fmgridif.cxx
+++ b/svx/source/fmcomp/fmgridif.cxx
@@ -1593,7 +1593,7 @@ void FmXGridPeer::addColumnListeners(const Reference< XPropertySet >& xCol)
Reference< XPropertySetInfo > xInfo = xCol->getPropertySetInfo();
Property aPropDesc;
const OUString* pProps = aPropsListenedTo;
- const OUString* pPropsEnd = pProps + sizeof( aPropsListenedTo ) / sizeof( aPropsListenedTo[ 0 ] );
+ const OUString* pPropsEnd = pProps + SAL_N_ELEMENTS( aPropsListenedTo );
for (; pProps != pPropsEnd; ++pProps)
{
if ( xInfo->hasPropertyByName( *pProps ) )
@@ -2650,7 +2650,7 @@ Sequence<sal_uInt16>& FmXGridPeer::getSupportedGridSlots()
static Sequence<sal_uInt16> aSupported;
if (aSupported.getLength() == 0)
{
- sal_uInt16 nSupported[] = {
+ const sal_uInt16 nSupported[] = {
DbGridControl::NavigationBar::RECORD_FIRST,
DbGridControl::NavigationBar::RECORD_PREV,
DbGridControl::NavigationBar::RECORD_NEXT,
@@ -2658,7 +2658,7 @@ Sequence<sal_uInt16>& FmXGridPeer::getSupportedGridSlots()
DbGridControl::NavigationBar::RECORD_NEW,
SID_FM_RECORD_UNDO
};
- aSupported.realloc(sizeof(nSupported)/sizeof(nSupported[0]));
+ aSupported.realloc(SAL_N_ELEMENTS(nSupported));
sal_uInt16* pSupported = aSupported.getArray();
for (sal_Int32 i=0; i<aSupported.getLength(); ++i, ++pSupported)
*pSupported = nSupported[i];
@@ -2680,7 +2680,7 @@ Sequence< css::util::URL>& FmXGridPeer::getSupportedURLs()
FMURL_RECORD_MOVETONEW,
FMURL_RECORD_UNDO
};
- aSupported.realloc(sizeof(sSupported)/sizeof(sSupported[0]));
+ aSupported.realloc(SAL_N_ELEMENTS(sSupported));
css::util::URL* pSupported = aSupported.getArray();
sal_uInt16 i;
diff --git a/svx/source/form/ParseContext.cxx b/svx/source/form/ParseContext.cxx
index 37502f11eee9..590b374f3dbd 100644
--- a/svx/source/form/ParseContext.cxx
+++ b/svx/source/form/ParseContext.cxx
@@ -132,7 +132,7 @@ IParseContext::InternationalKeyCode OSystemParseContext::getIntlKeyCode(const OS
InternationalKeyCode::Collect, InternationalKeyCode::Fusion, InternationalKeyCode::Intersection
};
- sal_uInt32 nCount = sizeof Intl_TokenID / sizeof Intl_TokenID[0];
+ sal_uInt32 nCount = SAL_N_ELEMENTS(Intl_TokenID);
for (sal_uInt32 i = 0; i < nCount; i++)
{
OString aKey = getIntlKeywordAscii(Intl_TokenID[i]);
diff --git a/svx/source/form/fmPropBrw.cxx b/svx/source/form/fmPropBrw.cxx
index f0e3abc90ab9..3f017c207b20 100644
--- a/svx/source/form/fmPropBrw.cxx
+++ b/svx/source/form/fmPropBrw.cxx
@@ -548,7 +548,7 @@ void FmPropBrw::impl_createPropertyBrowser_throw( FmFormShell* _pFormShell )
::cppu::ContextEntry_Init( OUString( "ControlShapeAccess" ), makeAny( xControlMap ) )
};
m_xInspectorContext.set(
- ::cppu::createComponentContext( aHandlerContextInfo, sizeof( aHandlerContextInfo ) / sizeof( aHandlerContextInfo[0] ),
+ ::cppu::createComponentContext( aHandlerContextInfo, SAL_N_ELEMENTS( aHandlerContextInfo ),
m_xORB ) );
bool bEnableHelpSection = lcl_shouldEnableHelpSection( m_xORB );
diff --git a/svx/source/form/fmdmod.cxx b/svx/source/form/fmdmod.cxx
index ec6aabfee384..a11a99eaaa1d 100644
--- a/svx/source/form/fmdmod.cxx
+++ b/svx/source/form/fmdmod.cxx
@@ -85,7 +85,7 @@ SAL_WNOUNREACHABLE_CODE_POP
OUString(FM_SUN_COMPONENT_IMAGECONTROL)
};
- static const sal_uInt16 nSvxComponentServiceNameListCount = sizeof(aSvxComponentServiceNameList) / sizeof ( aSvxComponentServiceNameList[0] );
+ static const sal_uInt16 nSvxComponentServiceNameListCount = SAL_N_ELEMENTS(aSvxComponentServiceNameList);
::com::sun::star::uno::Sequence< OUString > aSeq( nSvxComponentServiceNameListCount );
OUString* pStrings = aSeq.getArray();
diff --git a/svx/source/form/fmundo.cxx b/svx/source/form/fmundo.cxx
index e07570a14778..e49af1dc8abe 100644
--- a/svx/source/form/fmundo.cxx
+++ b/svx/source/form/fmundo.cxx
@@ -548,8 +548,8 @@ void SAL_CALL FmXUndoEnvironment::propertyChange(const PropertyChangeEvent& evt)
OUString(FM_PROP_TEXT), OUString(FM_PROP_STATE), OUString(FM_PROP_DATE), OUString(FM_PROP_TIME),
OUString(FM_PROP_VALUE), OUString(FM_PROP_SELECT_SEQ), OUString(FM_PROP_EFFECTIVE_VALUE)
};
- sal_Int32 nDefaultValueProps = sizeof(pDefaultValueProperties)/sizeof(pDefaultValueProperties[0]);
- OSL_ENSURE(sizeof(aValueProperties)/sizeof(aValueProperties[0]) == nDefaultValueProps,
+ sal_Int32 nDefaultValueProps = SAL_N_ELEMENTS(pDefaultValueProperties);
+ OSL_ENSURE(SAL_N_ELEMENTS(aValueProperties) == nDefaultValueProps,
"FmXUndoEnvironment::propertyChange: inconsistence!");
for (sal_Int32 i=0; i<nDefaultValueProps; ++i)
{
diff --git a/svx/source/form/formcontrolling.cxx b/svx/source/form/formcontrolling.cxx
index 14bc9c9be11e..6845ad6e8b0a 100644
--- a/svx/source/form/formcontrolling.cxx
+++ b/svx/source/form/formcontrolling.cxx
@@ -417,7 +417,7 @@ namespace svx
// but on the medium term, we are to support everything listed
// here
::std::vector< sal_Int32 > aSupportedFeatures;
- sal_Int32 pSupportedFeatures[] =
+ const sal_Int32 pSupportedFeatures[] =
{
SID_FM_RECORD_FIRST,
SID_FM_RECORD_NEXT,
@@ -442,7 +442,7 @@ namespace svx
SID_FM_FILTER_START,
SID_FM_VIEW_AS_GRID
};
- sal_Int32 nFeatureCount = sizeof( pSupportedFeatures ) / sizeof( pSupportedFeatures[ 0 ] );
+ sal_Int32 nFeatureCount = SAL_N_ELEMENTS( pSupportedFeatures );
aSupportedFeatures.resize( nFeatureCount );
::std::copy( pSupportedFeatures, pSupportedFeatures + nFeatureCount, aSupportedFeatures.begin() );