[Libreoffice-commits] core.git: 2 commits - emfio/source i18npool/source
Caolán McNamara
caolanm at redhat.com
Wed Oct 25 10:12:34 UTC 2017
emfio/source/reader/wmfreader.cxx | 2 +-
i18npool/source/localedata/LocaleNode.cxx | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
New commits:
commit fb09d80fe36d990d8cedbd1a2b02be6ffcc1bb8f
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Oct 24 17:19:06 2017 +0100
ofz#3777 Undefined-shift
Change-Id: I328d939035f31acc690161b17751a5d45577f998
Reviewed-on: https://gerrit.libreoffice.org/43787
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/emfio/source/reader/wmfreader.cxx b/emfio/source/reader/wmfreader.cxx
index 43a51372ee4f..83e2fb3ad19c 100644
--- a/emfio/source/reader/wmfreader.cxx
+++ b/emfio/source/reader/wmfreader.cxx
@@ -540,7 +540,7 @@ namespace emfio
SAL_WARN_IF( ( nOptions & ( ETO_PDY | ETO_GLYPH_INDEX ) ) != 0, "vcl.wmf", "SJ: ETO_PDY || ETO_GLYPH_INDEX in WMF" );
// output only makes sense if the text contains characters
- if( nLen )
+ if (nLen && nRecordSize >= 0)
{
sal_Int32 nOriginalTextLen = nLen;
sal_Int32 nOriginalBlockLen = ( nOriginalTextLen + 1 ) &~ 1;
commit 660df84c941078ffc281ecc0671a3573a49f4ee4
Author: Eike Rathke <erack at redhat.com>
Date: Wed Oct 25 12:11:29 2017 +0200
Use SAL_N_ELEMENTS
Change-Id: I643d839a2b1d8473c484c659793bd3344ace8859
diff --git a/i18npool/source/localedata/LocaleNode.cxx b/i18npool/source/localedata/LocaleNode.cxx
index 9dc9b07ec91b..2c0134448343 100644
--- a/i18npool/source/localedata/LocaleNode.cxx
+++ b/i18npool/source/localedata/LocaleNode.cxx
@@ -351,7 +351,7 @@ void LCInfoNode::generateCode (const OFileWriter &of) const
of.writeAsciiString("\tcountryDefaultName,\n");
of.writeAsciiString("\tVariant\n");
of.writeAsciiString("};\n\n");
- of.writeFunction("getLCInfo_", "(sizeof(LCInfoArray)/sizeof(LCInfoArray[0]))", "LCInfoArray");
+ of.writeFunction("getLCInfo_", "SAL_N_ELEMENTS(LCInfoArray)", "LCInfoArray");
}
@@ -574,7 +574,7 @@ void LCCTYPENode::generateCode (const OFileWriter &of) const
of.writeAsciiString("\tLongDateMonthSeparator,\n");
of.writeAsciiString("\tLongDateYearSeparator\n");
of.writeAsciiString("};\n\n");
- of.writeFunction("getLocaleItem_", "(sizeof(LCType)/sizeof(LCType[0]))", "LCType");
+ of.writeFunction("getLocaleItem_", "SAL_N_ELEMENTS(LCType)", "LCType");
}
More information about the Libreoffice-commits
mailing list