summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mysqlc/source/mysqlc_databasemetadata.cxx3
-rw-r--r--sdext/source/pdfimport/xpdfwrapper/pnghelper.cxx3
2 files changed, 4 insertions, 2 deletions
diff --git a/mysqlc/source/mysqlc_databasemetadata.cxx b/mysqlc/source/mysqlc_databasemetadata.cxx
index 03ec4b055e3f..a0ecf2ab854c 100644
--- a/mysqlc/source/mysqlc_databasemetadata.cxx
+++ b/mysqlc/source/mysqlc_databasemetadata.cxx
@@ -62,6 +62,7 @@ using mysqlc_sdbc_driver::getStringFromAny;
#include <cppconn/statement.h>
#include <cppconn/prepared_statement.h>
#include <postextstl.h>
+#include <sal/macros.h>
static ext_std::string wild("%");
@@ -2106,7 +2107,7 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTablePrivileges(
"ALTER", "DELETE", "DROP", "INDEX", "INSERT", "LOCK TABLES", "SELECT", "UPDATE"
};
Any userName; userName <<= getUserName();
- for (size_t i = 0; i < sizeof( allPrivileges ) / sizeof( allPrivileges[0]); ++i) {
+ for (size_t i = 0; i < SAL_N_ELEMENTS( allPrivileges ); ++i) {
std::vector< Any > aRow;
aRow.push_back(makeAny( sal_Int32( i ) ));
aRow.push_back(catalog); // TABLE_CAT
diff --git a/sdext/source/pdfimport/xpdfwrapper/pnghelper.cxx b/sdext/source/pdfimport/xpdfwrapper/pnghelper.cxx
index d5b12bcfb1f1..a28a676bcf79 100644
--- a/sdext/source/pdfimport/xpdfwrapper/pnghelper.cxx
+++ b/sdext/source/pdfimport/xpdfwrapper/pnghelper.cxx
@@ -30,6 +30,7 @@
************************************************************************/
#include "pnghelper.hxx"
+#include <sal/macros.h>
#ifdef SYSTEM_ZLIB
#include "zlib.h"
@@ -132,7 +133,7 @@ void PngHelper::appendFileHeader( OutputBuffer& o_rOutputBuf )
{
static const Output_t aHeader[] = { 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a };
- o_rOutputBuf.insert( o_rOutputBuf.end(), aHeader, aHeader + sizeof(aHeader)/sizeof(aHeader[0]) );
+ o_rOutputBuf.insert( o_rOutputBuf.end(), aHeader, aHeader + SAL_N_ELEMENTS(aHeader) );
}
size_t PngHelper::startChunk( const char* pChunkName, OutputBuffer& o_rOutputBuf )