summaryrefslogtreecommitdiff
path: root/unoxml
diff options
context:
space:
mode:
authorThomas Arnhold <thomas@arnhold.org>2012-01-10 16:00:18 +0100
committerThomas Arnhold <thomas@arnhold.org>2012-01-10 16:52:33 +0100
commit2c3d0ff9f83aab89980529da2aa3837390b84ef7 (patch)
treea7ff1a3e2271c219b29c4ab3a4e54411c22ed20c /unoxml
parenta2dd79d14ee2e76e3b6c13f2880706292ea90c26 (diff)
Use SAL_N_ELEMENTS
Some more like Thorstens diff 9c59cd15b150638c845bbc275b9b04460afc23bd Done with some regex magic (and a check if this var is an array): s/sizeof\(\s*$var\s*\)\s*\/\s*sizeof\(\s*\*$var\s*/SAL_N_ELEMENTS\($var/gs
Diffstat (limited to 'unoxml')
-rw-r--r--unoxml/test/domtest.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/unoxml/test/domtest.cxx b/unoxml/test/domtest.cxx
index ff44e2b9dc3e..a9d95b58bbb6 100644
--- a/unoxml/test/domtest.cxx
+++ b/unoxml/test/domtest.cxx
@@ -220,13 +220,13 @@ struct BasicTest : public CppUnit::TestFixture
mxErrHandler.set( new ErrorHandler() );
mxDomBuilder.set( new CDocumentBuilder(Reference< XMultiServiceFactory >() ));
mxValidInStream.set( new SequenceInputStream(ByteSequence((sal_Int8*)validTestFile,
- sizeof(validTestFile)/sizeof(*validTestFile))) );
+ SAL_N_ELEMENTS(validTestFile))) );
mxWarningInStream.set( new SequenceInputStream(ByteSequence((sal_Int8*)warningTestFile,
- sizeof(warningTestFile)/sizeof(*warningTestFile))) );
+ SAL_N_ELEMENTS(warningTestFile))) );
mxErrorInStream.set( new SequenceInputStream(ByteSequence((sal_Int8*)errorTestFile,
- sizeof(errorTestFile)/sizeof(*errorTestFile))) );
+ SAL_N_ELEMENTS(errorTestFile))) );
mxFatalInStream.set( new SequenceInputStream(ByteSequence((sal_Int8*)fatalTestFile,
- sizeof(fatalTestFile)/sizeof(*fatalTestFile))) );
+ SAL_N_ELEMENTS(fatalTestFile))) );
mxDomBuilder->setErrorHandler(mxErrHandler.get());
}
@@ -331,7 +331,7 @@ struct SerializerTest : public CppUnit::TestFixture
mxCtx->getServiceManager(),
uno::UNO_QUERY )));
mxInStream.set( new SequenceInputStream(ByteSequence((sal_Int8*)validTestFile,
- sizeof(validTestFile)/sizeof(*validTestFile))) );
+ SAL_N_ELEMENTS(validTestFile))) );
mxDomBuilder->setErrorHandler(mxErrHandler.get());
mxHandler.set( new DocumentHandler() );