summaryrefslogtreecommitdiff
path: root/framework/source
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@suse.com>2012-05-29 17:23:51 +0100
committerMichael Meeks <michael.meeks@suse.com>2012-05-29 18:03:34 +0100
commit6e6d81e9cfc593d865e409ad22b2307f87a37859 (patch)
tree4d578e5be2dfd3a403576d7c638f83f041d56911 /framework/source
parentb7c6716b4bc0742af4206035495d161e7eb49424 (diff)
targetted SAL_N_ELEMENTS reversion.
Change-Id: I30be93ccaeb1f9fd17cbe9e3ed3165e094810b2e
Diffstat (limited to 'framework/source')
-rw-r--r--framework/source/fwe/xml/menudocumenthandler.cxx2
-rw-r--r--framework/source/fwe/xml/toolboxdocumenthandler.cxx2
-rw-r--r--framework/source/services/backingwindow.cxx2
-rw-r--r--framework/source/uielement/controlmenucontroller.cxx6
4 files changed, 6 insertions, 6 deletions
diff --git a/framework/source/fwe/xml/menudocumenthandler.cxx b/framework/source/fwe/xml/menudocumenthandler.cxx
index d80fcfb88db5..2c50e0e07c97 100644
--- a/framework/source/fwe/xml/menudocumenthandler.cxx
+++ b/framework/source/fwe/xml/menudocumenthandler.cxx
@@ -126,7 +126,7 @@ MenuStyleItem MenuItemStyles[ ] = {
};
-sal_Int32 nMenuStyleItemEntries = SAL_N_ELEMENTS( MenuItemStyles );
+sal_Int32 nMenuStyleItemEntries = (sizeof (MenuItemStyles) / sizeof (MenuItemStyles[0]));
static void ExtractMenuParameters( const Sequence< PropertyValue > rProp,
::rtl::OUString& rCommandURL,
diff --git a/framework/source/fwe/xml/toolboxdocumenthandler.cxx b/framework/source/fwe/xml/toolboxdocumenthandler.cxx
index 3ac73e238192..b3a22ae507ad 100644
--- a/framework/source/fwe/xml/toolboxdocumenthandler.cxx
+++ b/framework/source/fwe/xml/toolboxdocumenthandler.cxx
@@ -123,7 +123,7 @@ ToolboxStyleItem Styles[ ] = {
{ ::com::sun::star::ui::ItemStyle::TEXT, ATTRIBUTE_ITEMSTYLE_TEXT },
};
-sal_Int32 nStyleItemEntries = SAL_N_ELEMENTS( Styles );
+sal_Int32 nStyleItemEntries = sizeof (Styles) / sizeof (Styles[0]);
struct ToolBarEntryProperty
{
diff --git a/framework/source/services/backingwindow.cxx b/framework/source/services/backingwindow.cxx
index 0b07e6fedec6..811e47c730c5 100644
--- a/framework/source/services/backingwindow.cxx
+++ b/framework/source/services/backingwindow.cxx
@@ -627,7 +627,7 @@ void BackingWindow::layoutButton(
long nTextWidth = i_rBtn.GetTextWidth( i_rBtn.GetText() );
nTextWidth += maButtonImageSize.Width() + 8 + i_nExtraWidth; // add some fuzz to be on the safe side
- if( nColumn >= 0 && nColumn < static_cast<int>(SAL_N_ELEMENTS(mnColumnWidth)) )
+ if( nColumn >= 0 && nColumn < static_cast<int>(sizeof (mnColumnWidth) / sizeof (mnColumnWidth[0])) )
{
if( nTextWidth > mnColumnWidth[nColumn] )
mnColumnWidth[nColumn] = nTextWidth;
diff --git a/framework/source/uielement/controlmenucontroller.cxx b/framework/source/uielement/controlmenucontroller.cxx
index b356448844ee..316acef26740 100644
--- a/framework/source/uielement/controlmenucontroller.cxx
+++ b/framework/source/uielement/controlmenucontroller.cxx
@@ -232,7 +232,7 @@ void ControlMenuController::updateImagesPopupMenu( PopupMenu* pPopupMenu )
if ( pResMgr->IsAvailable( aResId ))
{
ImageList aImageList( aResId );
- for ( sal_uInt32 i=0; i < SAL_N_ELEMENTS(nConvertSlots); ++i )
+ for ( sal_uInt32 i=0; i < sizeof(nConvertSlots)/sizeof(nConvertSlots[0]); ++i )
{
// das entsprechende Image dran
if ( m_bShowMenuImages )
@@ -283,7 +283,7 @@ void SAL_CALL ControlMenuController::statusChanged( const FeatureStateEvent& Eve
osl::ResettableMutexGuard aLock( m_aMutex );
sal_uInt16 nMenuId = 0;
- for (sal_uInt32 i=0; i < SAL_N_ELEMENTS(aCommands); ++i)
+ for (sal_uInt32 i=0; i < sizeof(aCommands) / sizeof (aCommands[0]); ++i)
{
if ( Event.FeatureURL.Complete.equalsAscii( aCommands[i] ))
{
@@ -401,7 +401,7 @@ void SAL_CALL ControlMenuController::updatePopupMenu() throw (::com::sun::star::
fillPopupMenu( m_xPopupMenu );
m_aURLToDispatchMap.free();
- for (sal_uInt32 i=0; i < SAL_N_ELEMENTS(aCommands); ++i)
+ for (sal_uInt32 i=0; i<sizeof(aCommands)/sizeof(aCommands[0]); ++i)
{
aTargetURL.Complete = rtl::OUString::createFromAscii( aCommands[i] );
m_xURLTransformer->parseStrict( aTargetURL );