diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-06-14 11:31:15 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-06-15 08:24:33 +0200 |
commit | ec8c98f59869bee0e327d32f39480a0e4b1330bc (patch) | |
tree | ee68d29cd51c60a8a939fd454955410e66e3b66c /filter | |
parent | 11503e99be09b4e8faa465559fbdacb06e8896cc (diff) |
use more SAL_N_ELEMENTS part 3
Change-Id: I82e366fefd2e31928b99840fe76649cc3521e623
Reviewed-on: https://gerrit.libreoffice.org/38789
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'filter')
-rw-r--r-- | filter/source/graphicfilter/ieps/ieps.cxx | 6 | ||||
-rw-r--r-- | filter/source/svg/svgfilter.cxx | 4 | ||||
-rw-r--r-- | filter/source/svg/tokenmap.cxx | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/filter/source/graphicfilter/ieps/ieps.cxx b/filter/source/graphicfilter/ieps/ieps.cxx index 954668bdea92..133b0e666411 100644 --- a/filter/source/graphicfilter/ieps/ieps.cxx +++ b/filter/source/graphicfilter/ieps/ieps.cxx @@ -232,7 +232,7 @@ static bool RenderAsEMF(const sal_uInt8* pBuf, sal_uInt32 nBytesRead, Graphic &r oslFileHandle pErr = nullptr; oslProcessError eErr = runProcessWithPathSearch( "pstoedit" EXESUFFIX, - args, sizeof(args)/sizeof(rtl_uString *), + args, SAL_N_ELEMENTS(args), &aProcess, &pIn, &pOut, &pErr); if (eErr!=osl_Process_E_None) @@ -360,7 +360,7 @@ static bool RenderAsBMPThroughConvert(const sal_uInt8* pBuf, sal_uInt32 nBytesRe return RenderAsBMPThroughHelper(pBuf, nBytesRead, rGraphic, ("convert" EXESUFFIX), args, - sizeof(args)/sizeof(rtl_uString *)); + SAL_N_ELEMENTS(args)); } static bool RenderAsBMPThroughGS(const sal_uInt8* pBuf, sal_uInt32 nBytesRead, @@ -390,7 +390,7 @@ static bool RenderAsBMPThroughGS(const sal_uInt8* pBuf, sal_uInt32 nBytesRead, "gs" EXESUFFIX, #endif args, - sizeof(args)/sizeof(rtl_uString *)); + SAL_N_ELEMENTS(args)); } static bool RenderAsBMP(const sal_uInt8* pBuf, sal_uInt32 nBytesRead, Graphic &rGraphic) diff --git a/filter/source/svg/svgfilter.cxx b/filter/source/svg/svgfilter.cxx index 6a3530a3cbb0..02ef2098ee3d 100644 --- a/filter/source/svg/svgfilter.cxx +++ b/filter/source/svg/svgfilter.cxx @@ -328,13 +328,13 @@ bool SVGFilter::isStreamSvg(const uno::Reference<io::XInputStream>& xInput) const sal_Int8* pBuffer = aBuffer.getConstArray(); sal_Int8 aMagic1[] = {'<', 's', 'v', 'g'}; - sal_Int32 aMagic1Size = sizeof(aMagic1) / sizeof(*aMagic1); + sal_Int32 aMagic1Size = SAL_N_ELEMENTS(aMagic1); if (std::search(pBuffer, pBuffer + nBytes, aMagic1, aMagic1 + aMagic1Size) != pBuffer + nBytes ) return true; sal_Int8 aMagic2[] = {'D', 'O', 'C', 'T', 'Y', 'P', 'E', ' ', 's', 'v', 'g'}; - sal_Int32 aMagic2Size = sizeof(aMagic2) / sizeof(*aMagic2); + sal_Int32 aMagic2Size = SAL_N_ELEMENTS(aMagic2); return std::search(pBuffer, pBuffer + nBytes, aMagic2, aMagic2 + aMagic2Size) != pBuffer + nBytes; } diff --git a/filter/source/svg/tokenmap.cxx b/filter/source/svg/tokenmap.cxx index 00b7bca5df4e..082c0354c669 100644 --- a/filter/source/svg/tokenmap.cxx +++ b/filter/source/svg/tokenmap.cxx @@ -58,7 +58,7 @@ const char* getTokenName( sal_Int32 nTokenId ) return nullptr; const xmltoken* pCurr=wordlist; - const xmltoken* pEnd=wordlist+sizeof(wordlist)/sizeof(*wordlist); + const xmltoken* pEnd=wordlist+SAL_N_ELEMENTS(wordlist); while( pCurr != pEnd ) { if(pCurr->nToken == nTokenId) |