diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2012-03-29 12:06:33 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2012-03-29 12:07:36 +0200 |
commit | 66a88dc17e91d03a130b21a511ce298dd5a52e12 (patch) | |
tree | 51d837b95391d760f815e576a1a9cc8888674a4b /codemaker | |
parent | 633cbb4954a2469f3c8911fbdffcaa4340ca6ac9 (diff) |
UNO BYTE is signed
This is hopefully a better fix for c589fa17b8f3e6ded0d1e04120781eb5d6735bc7
"Dalvik enforces byte constants being in range (-128..127)."
Diffstat (limited to 'codemaker')
-rw-r--r-- | codemaker/source/cppumaker/cpputype.cxx | 3 | ||||
-rw-r--r-- | codemaker/source/javamaker/javatype.cxx | 5 |
2 files changed, 2 insertions, 6 deletions
diff --git a/codemaker/source/cppumaker/cpputype.cxx b/codemaker/source/cppumaker/cpputype.cxx index 7c0326d7cff2..64dad4dd87dc 100644 --- a/codemaker/source/cppumaker/cpputype.cxx +++ b/codemaker/source/cppumaker/cpputype.cxx @@ -1262,8 +1262,7 @@ void CppuType::dumpConstantValue(FileStream& o, sal_uInt16 index) o << "sal_False"; break; case RT_TYPE_BYTE: - o << "(sal_Int8)" - << sal::static_int_cast< sal_Int8 >(constValue.m_value.aByte); + o << "(sal_Int8)" << constValue.m_value.aByte; break; case RT_TYPE_INT16: o << "(sal_Int16)" << constValue.m_value.aShort; diff --git a/codemaker/source/javamaker/javatype.cxx b/codemaker/source/javamaker/javatype.cxx index f297980f397a..1453122ce749 100644 --- a/codemaker/source/javamaker/javatype.cxx +++ b/codemaker/source/javamaker/javatype.cxx @@ -2447,10 +2447,7 @@ void addConstant( rtl::OString( RTL_CONSTASCII_STRINGPARAM("Bad type information"))); //TODO } - if (fieldValue.m_value.aByte < 0x80) - valueIndex = classFile->addIntegerInfo(fieldValue.m_value.aByte); - else - valueIndex = classFile->addIntegerInfo(-256 + (int) fieldValue.m_value.aByte); + valueIndex = classFile->addIntegerInfo(fieldValue.m_value.aByte); break; case codemaker::UnoType::SORT_SHORT: |