[Libreoffice-commits] .: 2 commits - xmloff/source
David Tardon
dtardon at kemper.freedesktop.org
Mon May 23 00:26:05 PDT 2011
xmloff/source/text/XMLIndexTOCContext.cxx | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
New commits:
commit 71b4a8b3f94d8afddc7c5b12f5f976ea472ce7cd
Author: David Tardon <dtardon at redhat.com>
Date: Thu May 19 16:22:31 2011 +0200
must use SAL_N_ELEMENTS here
diff --git a/xmloff/source/text/XMLIndexTOCContext.cxx b/xmloff/source/text/XMLIndexTOCContext.cxx
index 12343f3..14a72b3 100644
--- a/xmloff/source/text/XMLIndexTOCContext.cxx
+++ b/xmloff/source/text/XMLIndexTOCContext.cxx
@@ -124,8 +124,8 @@ XMLIndexTOCContext::XMLIndexTOCContext(
{
// check for array index:
OSL_ENSURE(nTmp < (SAL_N_ELEMENTS(aIndexServiceMap)), "index out of range");
- OSL_ENSURE(sizeof(aIndexServiceMap) ==
- sizeof(aIndexSourceElementMap),
+ OSL_ENSURE(SAL_N_ELEMENTS(aIndexServiceMap) ==
+ SAL_N_ELEMENTS(aIndexSourceElementMap),
"service and source element maps must be same size");
eIndexType = static_cast<IndexTypeEnum>(nTmp);
commit 338fdff789b9dae96a8ce29293ab89938622a5d6
Author: David Tardon <dtardon at redhat.com>
Date: Thu May 19 16:21:56 2011 +0200
use SAL_N_ELEMENTS
diff --git a/xmloff/source/text/XMLIndexTOCContext.cxx b/xmloff/source/text/XMLIndexTOCContext.cxx
index f412d1c..12343f3 100644
--- a/xmloff/source/text/XMLIndexTOCContext.cxx
+++ b/xmloff/source/text/XMLIndexTOCContext.cxx
@@ -123,7 +123,7 @@ XMLIndexTOCContext::XMLIndexTOCContext(
if (SvXMLUnitConverter::convertEnum(nTmp, rLocalName, aIndexTypeMap))
{
// check for array index:
- OSL_ENSURE(nTmp < (sizeof(aIndexServiceMap)/sizeof(sal_Char*)), "index out of range");
+ OSL_ENSURE(nTmp < (SAL_N_ELEMENTS(aIndexServiceMap)), "index out of range");
OSL_ENSURE(sizeof(aIndexServiceMap) ==
sizeof(aIndexSourceElementMap),
"service and source element maps must be same size");
More information about the Libreoffice-commits
mailing list