diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-06-14 09:35:16 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-06-14 14:17:14 +0200 |
commit | b70fa47aec65fe95da94fc17640dda27650e9677 (patch) | |
tree | 7e54f37342fd57c324f43d54659335554a9c8e72 /writerfilter | |
parent | 6db84250d1c4e7ec5a54ff75e124ea9a84ff89d9 (diff) |
use more SAL_N_ELEMENTS part 1
- teach comphelper::containerToSequence to handle sized arrays
- also use range based for-loop where appropriate.
Change-Id: I73ba9b6295e7b29c872ee53de7a9340969e07f99
Reviewed-on: https://gerrit.libreoffice.org/38769
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'writerfilter')
-rw-r--r-- | writerfilter/source/dmapper/DomainMapper_Impl.cxx | 2 | ||||
-rw-r--r-- | writerfilter/source/dmapper/NumberingManager.cxx | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx index c98432a0b05e..4c29c1f7cc34 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx @@ -786,7 +786,7 @@ void lcl_MoveBorderPropertiesToFrame(std::vector<beans::PropertyValue>& rFramePr PROP_BOTTOM_BORDER_DISTANCE }; - sal_uInt32 nBorderPropertyCount = sizeof( aBorderProperties ) / sizeof(PropertyIds); + sal_uInt32 const nBorderPropertyCount = SAL_N_ELEMENTS( aBorderProperties ); for( sal_uInt32 nProperty = 0; nProperty < nBorderPropertyCount; ++nProperty) { diff --git a/writerfilter/source/dmapper/NumberingManager.cxx b/writerfilter/source/dmapper/NumberingManager.cxx index ee2c8afe3370..05b20a31817e 100644 --- a/writerfilter/source/dmapper/NumberingManager.cxx +++ b/writerfilter/source/dmapper/NumberingManager.cxx @@ -255,7 +255,7 @@ uno::Sequence< beans::PropertyValue > ListLevel::GetLevelProperties( ) aNumberingProperties.push_back(lcl_makePropVal(PROP_NUMBERING_TYPE, nNumberFormat)); } - if( m_nJC >= 0 && m_nJC <= sal::static_int_cast<sal_Int32>(sizeof(aWWToUnoAdjust) / sizeof(sal_Int16)) ) + if( m_nJC >= 0 && m_nJC <= sal::static_int_cast<sal_Int32>(SAL_N_ELEMENTS(aWWToUnoAdjust)) ) aNumberingProperties.push_back(lcl_makePropVal(PROP_ADJUST, aWWToUnoAdjust[m_nJC])); if( !isOutlineNumbering()) |