summaryrefslogtreecommitdiff
path: root/cui/source
diff options
context:
space:
mode:
authorPragat Pandya <pragat.pandya@gmail.com>2022-05-08 23:56:45 +0530
committerBartosz Kosiorek <gang65@poczta.onet.pl>2022-05-09 20:42:03 +0200
commit6abc09926c9b55a445b906303f56c6ec7fdeabf9 (patch)
tree0dda52e9d57325cc510acfa4d8951e60c84e7409 /cui/source
parent0c3950c4954848fde1515a932cc16b38ab961a7d (diff)
tdf#147021 Use std::size() instead of SAL_N_ELEMENTS() macro
Change-Id: I54257e87da0cd66da59d820c7960c3e4b020fda3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134027 Reviewed-by: Bartosz Kosiorek <gang65@poczta.onet.pl> Tested-by: Jenkins
Diffstat (limited to 'cui/source')
-rw-r--r--cui/source/customize/acccfg.cxx2
-rw-r--r--cui/source/options/optcolor.cxx2
-rw-r--r--cui/source/options/optgenrl.cxx2
-rw-r--r--cui/source/options/treeopt.cxx24
-rw-r--r--cui/source/tabpages/border.cxx4
-rw-r--r--cui/source/tabpages/chardlg.cxx4
-rw-r--r--cui/source/tabpages/numfmt.cxx2
-rw-r--r--cui/source/tabpages/page.cxx4
-rw-r--r--cui/source/tabpages/swpossizetabpage.cxx96
9 files changed, 70 insertions, 70 deletions
diff --git a/cui/source/customize/acccfg.cxx b/cui/source/customize/acccfg.cxx
index 81d1bb10668e..2bfabb5178ea 100644
--- a/cui/source/customize/acccfg.cxx
+++ b/cui/source/customize/acccfg.cxx
@@ -785,7 +785,7 @@ const sal_uInt16 KEYCODE_ARRAY[] = { KEY_F1,
#endif
};
-const sal_uInt16 KEYCODE_ARRAY_SIZE = SAL_N_ELEMENTS(KEYCODE_ARRAY);
+const sal_uInt16 KEYCODE_ARRAY_SIZE = std::size(KEYCODE_ARRAY);
/** select the entry, which match the current key input ... excepting
keys, which are used for the dialog itself.
diff --git a/cui/source/options/optcolor.cxx b/cui/source/options/optcolor.cxx
index 0bf654b3e031..2249b70e495e 100644
--- a/cui/source/options/optcolor.cxx
+++ b/cui/source/options/optcolor.cxx
@@ -405,7 +405,7 @@ void ColorConfigWindow_Impl::CreateEntries()
// creating entries
vEntries.reserve(ColorConfigEntryCount);
- for (size_t i = 0; i < SAL_N_ELEMENTS(vEntryInfo); ++i)
+ for (size_t i = 0; i < std::size(vEntryInfo); ++i)
{
vEntries.push_back(std::make_shared<Entry>(m_pTopLevel, *m_xBuilder,
vEntryInfo[i].pText, vEntryInfo[i].pColor,
diff --git a/cui/source/options/optgenrl.cxx b/cui/source/options/optgenrl.cxx
index ed7d9fecbfad..0940894216bb 100644
--- a/cui/source/options/optgenrl.cxx
+++ b/cui/source/options/optgenrl.cxx
@@ -262,7 +262,7 @@ void SvxGeneralTabPage::InitControls ()
m_xBuilder->weld_label(vRowInfo[iRow].pTextId)));
Row& rRow = *vRows.back();
// fields in the row
- static unsigned const nFieldCount = SAL_N_ELEMENTS(vFieldInfo);
+ static unsigned const nFieldCount = std::size(vFieldInfo);
// skipping other (invisible) rows
while (iField != nFieldCount && vFieldInfo[iField].eRow != eRow)
++iField;
diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx
index ed43861d654b..1c6eca7f5ee1 100644
--- a/cui/source/options/treeopt.cxx
+++ b/cui/source/options/treeopt.cxx
@@ -1354,7 +1354,7 @@ void OfaTreeOptionsDialog::Initialize( const Reference< XFrame >& _xFrame )
{
setGroupName(u"ProductName", CuiResId(SID_GENERAL_OPTIONS_RES[0].first));
nGroup = AddGroup(CuiResId(SID_GENERAL_OPTIONS_RES[0].first), nullptr, nullptr, SID_GENERAL_OPTIONS );
- const sal_uInt16 nEnd = static_cast<sal_uInt16>(SAL_N_ELEMENTS(SID_GENERAL_OPTIONS_RES));
+ const sal_uInt16 nEnd = static_cast<sal_uInt16>(std::size(SID_GENERAL_OPTIONS_RES));
for (sal_uInt16 i = 1; i < nEnd; ++i)
{
@@ -1394,7 +1394,7 @@ void OfaTreeOptionsDialog::Initialize( const Reference< XFrame >& _xFrame )
{
setGroupName( u"LoadSave", CuiResId(SID_FILTER_DLG_RES[0].first) );
nGroup = AddGroup( CuiResId(SID_FILTER_DLG_RES[0].first), nullptr, nullptr, SID_FILTER_DLG );
- for ( size_t i = 1; i < SAL_N_ELEMENTS(SID_FILTER_DLG_RES); ++i )
+ for ( size_t i = 1; i < std::size(SID_FILTER_DLG_RES); ++i )
{
nPageId = static_cast<sal_uInt16>(SID_FILTER_DLG_RES[i].second);
if ( !lcl_isOptionHidden( nPageId, aOptionsDlgOpt ) )
@@ -1408,7 +1408,7 @@ void OfaTreeOptionsDialog::Initialize( const Reference< XFrame >& _xFrame )
{
setGroupName(u"LanguageSettings", CuiResId(SID_LANGUAGE_OPTIONS_RES[0].first));
nGroup = AddGroup(CuiResId(SID_LANGUAGE_OPTIONS_RES[0].first), nullptr, nullptr, SID_LANGUAGE_OPTIONS );
- for (size_t i = 1; i < SAL_N_ELEMENTS(SID_LANGUAGE_OPTIONS_RES); ++i)
+ for (size_t i = 1; i < std::size(SID_LANGUAGE_OPTIONS_RES); ++i)
{
nPageId = static_cast<sal_uInt16>(SID_LANGUAGE_OPTIONS_RES[i].second);
if ( lcl_isOptionHidden( nPageId, aOptionsDlgOpt ) )
@@ -1440,7 +1440,7 @@ void OfaTreeOptionsDialog::Initialize( const Reference< XFrame >& _xFrame )
else
setGroupName( u"Writer", CuiResId(SID_SW_EDITOPTIONS_RES[0].first) );
nGroup = AddGroup(CuiResId(SID_SW_EDITOPTIONS_RES[0].first), pSwMod, pSwMod, SID_SW_EDITOPTIONS );
- for ( size_t i = 1; i < SAL_N_ELEMENTS(SID_SW_EDITOPTIONS_RES); ++i )
+ for ( size_t i = 1; i < std::size(SID_SW_EDITOPTIONS_RES); ++i )
{
nPageId = static_cast<sal_uInt16>(SID_SW_EDITOPTIONS_RES[i].second);
if ( lcl_isOptionHidden( nPageId, aOptionsDlgOpt ) )
@@ -1459,7 +1459,7 @@ void OfaTreeOptionsDialog::Initialize( const Reference< XFrame >& _xFrame )
if ( !lcl_isOptionHidden( SID_SW_ONLINEOPTIONS, aOptionsDlgOpt ) )
{
nGroup = AddGroup(CuiResId(SID_SW_ONLINEOPTIONS_RES[0].first), pSwMod, pSwMod, SID_SW_ONLINEOPTIONS );
- for( size_t i = 1; i < SAL_N_ELEMENTS(SID_SW_ONLINEOPTIONS_RES); ++i )
+ for( size_t i = 1; i < std::size(SID_SW_ONLINEOPTIONS_RES); ++i )
{
nPageId = static_cast<sal_uInt16>(SID_SW_ONLINEOPTIONS_RES[i].second);
if ( !lcl_isOptionHidden( nPageId, aOptionsDlgOpt ) )
@@ -1482,7 +1482,7 @@ void OfaTreeOptionsDialog::Initialize( const Reference< XFrame >& _xFrame )
SfxModule* pScMod = SfxApplication::GetModule( SfxToolsModule::Calc );
setGroupName( u"Calc", CuiResId(SID_SC_EDITOPTIONS_RES[0].first) );
nGroup = AddGroup( CuiResId(SID_SC_EDITOPTIONS_RES[0].first), pScMod, pScMod, SID_SC_EDITOPTIONS );
- const sal_uInt16 nCount = static_cast<sal_uInt16>(SAL_N_ELEMENTS(SID_SC_EDITOPTIONS_RES));
+ const sal_uInt16 nCount = static_cast<sal_uInt16>(std::size(SID_SC_EDITOPTIONS_RES));
for ( sal_uInt16 i = 1; i < nCount; ++i )
{
nPageId = static_cast<sal_uInt16>(SID_SC_EDITOPTIONS_RES[i].second);
@@ -1505,7 +1505,7 @@ void OfaTreeOptionsDialog::Initialize( const Reference< XFrame >& _xFrame )
{
setGroupName( u"Impress", CuiResId(SID_SD_EDITOPTIONS_RES[0].first) );
nGroup = AddGroup( CuiResId(SID_SD_EDITOPTIONS_RES[0].first), pSdMod, pSdMod, SID_SD_EDITOPTIONS );
- const sal_uInt16 nCount = static_cast<sal_uInt16>(SAL_N_ELEMENTS(SID_SD_EDITOPTIONS_RES));
+ const sal_uInt16 nCount = static_cast<sal_uInt16>(std::size(SID_SD_EDITOPTIONS_RES));
for ( sal_uInt16 i = 1; i < nCount; ++i )
{
nPageId = static_cast<sal_uInt16>(SID_SD_EDITOPTIONS_RES[i].second);
@@ -1527,7 +1527,7 @@ void OfaTreeOptionsDialog::Initialize( const Reference< XFrame >& _xFrame )
{
setGroupName( u"Draw", CuiResId(SID_SD_GRAPHIC_OPTIONS_RES[0].first) );
nGroup = AddGroup( CuiResId(SID_SD_GRAPHIC_OPTIONS_RES[0].first), pSdMod, pSdMod, SID_SD_GRAPHIC_OPTIONS );
- const sal_uInt16 nCount = static_cast<sal_uInt16>(SAL_N_ELEMENTS(SID_SD_GRAPHIC_OPTIONS_RES));
+ const sal_uInt16 nCount = static_cast<sal_uInt16>(std::size(SID_SD_GRAPHIC_OPTIONS_RES));
for ( sal_uInt16 i = 1; i < nCount; ++i )
{
nPageId = static_cast<sal_uInt16>(SID_SD_GRAPHIC_OPTIONS_RES[i].second);
@@ -1550,7 +1550,7 @@ void OfaTreeOptionsDialog::Initialize( const Reference< XFrame >& _xFrame )
SfxModule* pSmMod = SfxApplication::GetModule(SfxToolsModule::Math);
setGroupName( u"Math", CuiResId(SID_SM_EDITOPTIONS_RES[0].first) );
nGroup = AddGroup(CuiResId(SID_SM_EDITOPTIONS_RES[0].first), pSmMod, pSmMod, SID_SM_EDITOPTIONS );
- for ( size_t i = 1; i < SAL_N_ELEMENTS(SID_SM_EDITOPTIONS_RES); ++i )
+ for ( size_t i = 1; i < std::size(SID_SM_EDITOPTIONS_RES); ++i )
{
nPageId = static_cast<sal_uInt16>(SID_SM_EDITOPTIONS_RES[i].second);
if ( !lcl_isOptionHidden( nPageId, aOptionsDlgOpt ) )
@@ -1569,7 +1569,7 @@ void OfaTreeOptionsDialog::Initialize( const Reference< XFrame >& _xFrame )
{
setGroupName( u"Base", CuiResId(SID_SB_STARBASEOPTIONS_RES[0].first) );
nGroup = AddGroup( CuiResId(SID_SB_STARBASEOPTIONS_RES[0].first), nullptr, nullptr, SID_SB_STARBASEOPTIONS );
- for ( size_t i = 1; i < SAL_N_ELEMENTS(SID_SB_STARBASEOPTIONS_RES); ++i )
+ for ( size_t i = 1; i < std::size(SID_SB_STARBASEOPTIONS_RES); ++i )
{
nPageId = static_cast<sal_uInt16>(SID_SB_STARBASEOPTIONS_RES[i].second);
if ( !lcl_isOptionHidden( nPageId, aOptionsDlgOpt ) )
@@ -1582,7 +1582,7 @@ void OfaTreeOptionsDialog::Initialize( const Reference< XFrame >& _xFrame )
{
setGroupName( u"Charts", CuiResId(SID_SCH_EDITOPTIONS_RES[0].first) );
nGroup = AddGroup( CuiResId(SID_SCH_EDITOPTIONS_RES[0].first), nullptr, nullptr, SID_SCH_EDITOPTIONS );
- for ( size_t i = 1; i < SAL_N_ELEMENTS(SID_SCH_EDITOPTIONS_RES); ++i )
+ for ( size_t i = 1; i < std::size(SID_SCH_EDITOPTIONS_RES); ++i )
{
nPageId = static_cast<sal_uInt16>(SID_SCH_EDITOPTIONS_RES[i].second);
if ( !lcl_isOptionHidden( nPageId, aOptionsDlgOpt ) )
@@ -1597,7 +1597,7 @@ void OfaTreeOptionsDialog::Initialize( const Reference< XFrame >& _xFrame )
setGroupName(u"Internet", CuiResId(SID_INET_DLG_RES[0].first));
nGroup = AddGroup(CuiResId(SID_INET_DLG_RES[0].first), nullptr, nullptr, SID_INET_DLG );
- for ( size_t i = 1; i < SAL_N_ELEMENTS(SID_INET_DLG_RES); ++i )
+ for ( size_t i = 1; i < std::size(SID_INET_DLG_RES); ++i )
{
nPageId = static_cast<sal_uInt16>(SID_INET_DLG_RES[i].second);
if ( lcl_isOptionHidden( nPageId, aOptionsDlgOpt ) )
diff --git a/cui/source/tabpages/border.cxx b/cui/source/tabpages/border.cxx
index a37a1454efbf..683dd7713c37 100644
--- a/cui/source/tabpages/border.cxx
+++ b/cui/source/tabpages/border.cxx
@@ -1477,7 +1477,7 @@ void SvxBorderTabPage::FillLineListBox_Impl()
m_xLbLineStyle->SetSourceUnit( FieldUnit::TWIP );
- for (size_t i = 0; i < SAL_N_ELEMENTS(aLines); ++i)
+ for (size_t i = 0; i < std::size(aLines); ++i)
{
if (!IsBorderLineStyleAllowed(aLines[i].mnStyle))
continue;
@@ -1602,7 +1602,7 @@ void SvxBorderTabPage::UpdateRemoveAdjCellBorderCB( sal_uInt16 nPreset )
// Check if current selection involves deletion of at least one border
bool bBorderDeletionReq = false;
- for ( size_t i=0; i < SAL_N_ELEMENTS( eTypes1 ); ++i )
+ for ( size_t i=0; i < std::size( eTypes1 ); ++i )
{
if( pOldBoxItem->GetLine( eTypes2[i] ) || !( pOldBoxInfoItem->IsValid( eTypes1[i].second ) ) )
{
diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx
index 4426d9ad8a4e..2c2d912ae006 100644
--- a/cui/source/tabpages/chardlg.cxx
+++ b/cui/source/tabpages/chardlg.cxx
@@ -3032,9 +3032,9 @@ SvxCharTwoLinesPage::SvxCharTwoLinesPage(weld::Container* pPage, weld::DialogCon
, m_xStartBracketLB(m_xBuilder->weld_tree_view("startbracket"))
, m_xEndBracketLB(m_xBuilder->weld_tree_view("endbracket"))
{
- for (size_t i = 0; i < SAL_N_ELEMENTS(TWOLINE_OPEN); ++i)
+ for (size_t i = 0; i < std::size(TWOLINE_OPEN); ++i)
m_xStartBracketLB->append(OUString::number(TWOLINE_OPEN[i].second), CuiResId(TWOLINE_OPEN[i].first));
- for (size_t i = 0; i < SAL_N_ELEMENTS(TWOLINE_CLOSE); ++i)
+ for (size_t i = 0; i < std::size(TWOLINE_CLOSE); ++i)
m_xEndBracketLB->append(OUString::number(TWOLINE_CLOSE[i].second), CuiResId(TWOLINE_CLOSE[i].first));
m_xPreviewWin.reset(new weld::CustomWeld(*m_xBuilder, "preview", m_aPreviewWin));
diff --git a/cui/source/tabpages/numfmt.cxx b/cui/source/tabpages/numfmt.cxx
index 63dc3828bb7b..ee6d949353a0 100644
--- a/cui/source/tabpages/numfmt.cxx
+++ b/cui/source/tabpages/numfmt.cxx
@@ -215,7 +215,7 @@ SvxNumberFormatTabPage::SvxNumberFormatTabPage(weld::Container* pPage, weld::Dia
, m_xLbLanguage(new SvxLanguageBox(m_xBuilder->weld_combo_box("languagelb")))
, m_xWndPreview(new weld::CustomWeld(*m_xBuilder, "preview", m_aWndPreview))
{
- for (size_t i = 0; i < SAL_N_ELEMENTS(NUM_CATEGORIES); ++i)
+ for (size_t i = 0; i < std::size(NUM_CATEGORIES); ++i)
m_xLbCategory->append_text(CuiResId(NUM_CATEGORIES[i]));
auto nWidth = m_xLbCategory->get_approximate_digit_width() * 22;
diff --git a/cui/source/tabpages/page.cxx b/cui/source/tabpages/page.cxx
index 1acd2076c75e..e7239ad0a4a9 100644
--- a/cui/source/tabpages/page.cxx
+++ b/cui/source/tabpages/page.cxx
@@ -80,7 +80,7 @@ const SvxPageUsage aArr[] =
static sal_uInt16 PageUsageToPos_Impl( SvxPageUsage nUsage )
{
- for ( size_t i = 0; i < SAL_N_ELEMENTS(aArr); ++i )
+ for ( size_t i = 0; i < std::size(aArr); ++i )
if ( aArr[i] == nUsage )
return i;
return 3;
@@ -89,7 +89,7 @@ static sal_uInt16 PageUsageToPos_Impl( SvxPageUsage nUsage )
static SvxPageUsage PosToPageUsage_Impl( sal_uInt16 nPos )
{
- if ( nPos >= SAL_N_ELEMENTS(aArr) )
+ if ( nPos >= std::size(aArr) )
return SvxPageUsage::NONE;
return aArr[nPos];
}
diff --git a/cui/source/tabpages/swpossizetabpage.cxx b/cui/source/tabpages/swpossizetabpage.cxx
index 5bea85ba73f5..e0f20ab9623e 100644
--- a/cui/source/tabpages/swpossizetabpage.cxx
+++ b/cui/source/tabpages/swpossizetabpage.cxx
@@ -383,50 +383,50 @@ static std::size_t lcl_GetFrmMapCount(const FrmMap* pMap)
return 0;
if( pMap == aVParaHtmlMap )
- return SAL_N_ELEMENTS(aVParaHtmlMap);
+ return std::size(aVParaHtmlMap);
if( pMap == aVAsCharHtmlMap )
- return SAL_N_ELEMENTS( aVAsCharHtmlMap );
+ return std::size( aVAsCharHtmlMap );
if( pMap == aHParaHtmlMap )
- return SAL_N_ELEMENTS( aHParaHtmlMap );
+ return std::size( aHParaHtmlMap );
if( pMap == aHParaHtmlAbsMap )
- return SAL_N_ELEMENTS( aHParaHtmlAbsMap );
+ return std::size( aHParaHtmlAbsMap );
if( pMap == aVPageMap )
- return SAL_N_ELEMENTS( aVPageMap );
+ return std::size( aVPageMap );
if( pMap == aVPageHtmlMap )
- return SAL_N_ELEMENTS( aVPageHtmlMap );
+ return std::size( aVPageHtmlMap );
if( pMap == aVAsCharMap )
- return SAL_N_ELEMENTS( aVAsCharMap );
+ return std::size( aVAsCharMap );
if( pMap == aVParaMap )
- return SAL_N_ELEMENTS( aVParaMap );
+ return std::size( aVParaMap );
if( pMap == aHParaMap )
- return SAL_N_ELEMENTS( aHParaMap );
+ return std::size( aHParaMap );
if( pMap == aHFrameMap )
- return SAL_N_ELEMENTS( aHFrameMap );
+ return std::size( aHFrameMap );
if( pMap == aVFrameMap )
- return SAL_N_ELEMENTS( aVFrameMap );
+ return std::size( aVFrameMap );
if( pMap == aHCharMap )
- return SAL_N_ELEMENTS( aHCharMap );
+ return std::size( aHCharMap );
if( pMap == aHCharHtmlMap )
- return SAL_N_ELEMENTS( aHCharHtmlMap );
+ return std::size( aHCharHtmlMap );
if( pMap == aHCharHtmlAbsMap )
- return SAL_N_ELEMENTS( aHCharHtmlAbsMap );
+ return std::size( aHCharHtmlAbsMap );
if( pMap == aVCharMap )
- return SAL_N_ELEMENTS( aVCharMap );
+ return std::size( aVCharMap );
if( pMap == aVCharHtmlMap )
- return SAL_N_ELEMENTS( aVCharHtmlMap );
+ return std::size( aVCharHtmlMap );
if( pMap == aVCharHtmlAbsMap )
- return SAL_N_ELEMENTS( aVCharHtmlAbsMap );
+ return std::size( aVCharHtmlAbsMap );
if( pMap == aHPageHtmlMap )
- return SAL_N_ELEMENTS( aHPageHtmlMap );
+ return std::size( aHPageHtmlMap );
if( pMap == aHFlyHtmlMap )
- return SAL_N_ELEMENTS( aHFlyHtmlMap );
+ return std::size( aHFlyHtmlMap );
if( pMap == aVFlyHtmlMap )
- return SAL_N_ELEMENTS( aVFlyHtmlMap );
+ return std::size( aVFlyHtmlMap );
if( pMap == aVMultiSelectionMap )
- return SAL_N_ELEMENTS( aVMultiSelectionMap );
+ return std::size( aVMultiSelectionMap );
if( pMap == aHMultiSelectionMap )
- return SAL_N_ELEMENTS( aHMultiSelectionMap );
- return SAL_N_ELEMENTS(aHPageMap);
+ return std::size( aHMultiSelectionMap );
+ return std::size(aHPageMap);
}
static SvxSwFramePosString::StringId lcl_ChangeResIdToVerticalOrRTL(
@@ -626,27 +626,27 @@ namespace
void SvxSwPosSizeTabPage::setOptimalFrmWidth()
{
static const FrmMaps aMaps[] = {
- { aHPageMap, SAL_N_ELEMENTS(aHPageMap) },
- { aHPageHtmlMap, SAL_N_ELEMENTS(aHPageHtmlMap) },
- { aVPageMap, SAL_N_ELEMENTS(aVPageMap) },
- { aVPageHtmlMap, SAL_N_ELEMENTS(aVPageHtmlMap) },
- { aHFrameMap, SAL_N_ELEMENTS(aHFrameMap) },
- { aHFlyHtmlMap, SAL_N_ELEMENTS(aHFlyHtmlMap) },
- { aVFrameMap, SAL_N_ELEMENTS(aVFrameMap) },
- { aVFlyHtmlMap, SAL_N_ELEMENTS(aVFlyHtmlMap) },
- { aHParaMap, SAL_N_ELEMENTS(aHParaMap) },
- { aHParaHtmlMap, SAL_N_ELEMENTS(aHParaHtmlMap) },
- { aHParaHtmlAbsMap, SAL_N_ELEMENTS(aHParaHtmlAbsMap) },
- { aVParaMap, SAL_N_ELEMENTS(aVParaMap) },
- { aVParaHtmlMap, SAL_N_ELEMENTS(aVParaHtmlMap) },
- { aHCharMap, SAL_N_ELEMENTS(aHCharMap) },
- { aHCharHtmlMap, SAL_N_ELEMENTS(aHCharHtmlMap) },
- { aHCharHtmlAbsMap, SAL_N_ELEMENTS(aHCharHtmlAbsMap) },
- { aVCharMap, SAL_N_ELEMENTS(aVCharMap) },
- { aVCharHtmlMap, SAL_N_ELEMENTS(aVCharHtmlMap) },
- { aVCharHtmlAbsMap, SAL_N_ELEMENTS(aVCharHtmlAbsMap) },
- { aVAsCharMap, SAL_N_ELEMENTS(aVAsCharMap) },
- { aVAsCharHtmlMap, SAL_N_ELEMENTS(aVAsCharHtmlMap) }
+ { aHPageMap, std::size(aHPageMap) },
+ { aHPageHtmlMap, std::size(aHPageHtmlMap) },
+ { aVPageMap, std::size(aVPageMap) },
+ { aVPageHtmlMap, std::size(aVPageHtmlMap) },
+ { aHFrameMap, std::size(aHFrameMap) },
+ { aHFlyHtmlMap, std::size(aHFlyHtmlMap) },
+ { aVFrameMap, std::size(aVFrameMap) },
+ { aVFlyHtmlMap, std::size(aVFlyHtmlMap) },
+ { aHParaMap, std::size(aHParaMap) },
+ { aHParaHtmlMap, std::size(aHParaHtmlMap) },
+ { aHParaHtmlAbsMap, std::size(aHParaHtmlAbsMap) },
+ { aVParaMap, std::size(aVParaMap) },
+ { aVParaHtmlMap, std::size(aVParaHtmlMap) },
+ { aHCharMap, std::size(aHCharMap) },
+ { aHCharHtmlMap, std::size(aHCharHtmlMap) },
+ { aHCharHtmlAbsMap, std::size(aHCharHtmlAbsMap) },
+ { aVCharMap, std::size(aVCharMap) },
+ { aVCharHtmlMap, std::size(aVCharHtmlMap) },
+ { aVCharHtmlAbsMap, std::size(aVCharHtmlAbsMap) },
+ { aVAsCharMap, std::size(aVAsCharMap) },
+ { aVAsCharHtmlMap, std::size(aVAsCharHtmlMap) }
};
std::vector<SvxSwFramePosString::StringId> aFrames;
@@ -685,8 +685,8 @@ namespace
void SvxSwPosSizeTabPage::setOptimalRelWidth()
{
static const RelationMaps aMaps[] = {
- { aRelationMap, SAL_N_ELEMENTS(aRelationMap) },
- { aAsCharRelationMap, SAL_N_ELEMENTS(aAsCharRelationMap) }
+ { aRelationMap, std::size(aRelationMap) },
+ { aAsCharRelationMap, std::size(aAsCharRelationMap) }
};
std::vector<SvxSwFramePosString::StringId> aRels;
@@ -1644,7 +1644,7 @@ void SvxSwPosSizeTabPage::FillRelLB(FrmMap const *pMap, sal_uInt16 nMapPos, sal_
if (pMap[_nMapPos].eStrId == eStrId)
{
nLBRelations = pMap[_nMapPos].nLBRelations;
- for (size_t nRelPos = 0; nRelPos < SAL_N_ELEMENTS(aAsCharRelationMap); nRelPos++)
+ for (size_t nRelPos = 0; nRelPos < std::size(aAsCharRelationMap); nRelPos++)
{
if (nLBRelations & aAsCharRelationMap[nRelPos].nLBRelation)
{
@@ -1700,7 +1700,7 @@ void SvxSwPosSizeTabPage::FillRelLB(FrmMap const *pMap, sal_uInt16 nMapPos, sal_
{
if (nLBRelations & static_cast<LB>(nBit))
{
- for (size_t nRelPos = 0; nRelPos < SAL_N_ELEMENTS(aRelationMap); nRelPos++)
+ for (size_t nRelPos = 0; nRelPos < std::size(aRelationMap); nRelPos++)
{
if (aRelationMap[nRelPos].nLBRelation == static_cast<LB>(nBit))
{