summaryrefslogtreecommitdiff
path: root/comphelper
diff options
context:
space:
mode:
authorJens-Heiner Rechtien <hr@openoffice.org>2006-06-19 21:49:58 +0000
committerJens-Heiner Rechtien <hr@openoffice.org>2006-06-19 21:49:58 +0000
commit562b409c9155905e292b7afed6411ea09df70c35 (patch)
tree5cde9708547d4129c4072b415691c0336d0e9b0e /comphelper
parent1ba6fa321ec460baa982fab735d4fc95242155e9 (diff)
INTEGRATION: CWS warnings01 (1.6.336); FILE MERGED
2006/04/07 19:38:01 sb 1.6.336.5: RESYNC: (1.7-1.8); FILE MERGED 2006/02/13 14:58:40 fs 1.6.336.4: #i58983# 2006/02/13 14:46:18 fs 1.6.336.3: #i58983# 2005/09/23 03:19:55 sb 1.6.336.2: RESYNC: (1.6-1.7); FILE MERGED 2005/09/01 13:59:59 sb 1.6.336.1: #i53898# Made code warning-free.
Diffstat (limited to 'comphelper')
-rw-r--r--comphelper/source/misc/types.cxx20
1 files changed, 10 insertions, 10 deletions
diff --git a/comphelper/source/misc/types.cxx b/comphelper/source/misc/types.cxx
index 0ea28e76b70b..b882bfdcb6c8 100644
--- a/comphelper/source/misc/types.cxx
+++ b/comphelper/source/misc/types.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: types.cxx,v $
*
- * $Revision: 1.8 $
+ * $Revision: 1.9 $
*
- * last change: $Author: vg $ $Date: 2006-03-14 11:40:58 $
+ * last change: $Author: hr $ $Date: 2006-06-19 22:49:58 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -203,12 +203,12 @@ sal_Bool tryCompare(const void* _pData, const Any& _rValue, sal_Bool& _bIdentica
}
//------------------------------------------------------------------
-sal_Bool tryCompare(const void* _pData, const Any& _rValue, sal_Bool& _bIdentical, sal_Char& _rOut)
+sal_Bool tryCompare(const void* _pData, const Any& _rValue, sal_Bool& _bIdentical, sal_Unicode& _rOut)
{
- sal_Int8 nDummy;
- sal_Bool bSuccess = _rValue >>= nDummy;
- _rOut = (sal_Char)nDummy;
- _bIdentical = bSuccess && (_rOut == *reinterpret_cast<const sal_Bool*>(_pData));
+ sal_Bool bSuccess = ( _rValue.getValueTypeClass() == TypeClass_CHAR );
+ if ( bSuccess )
+ _rOut = *static_cast< const sal_Unicode* >( _rValue.getValue() );
+ _bIdentical = bSuccess && ( _rOut == *static_cast< const sal_Unicode* >( _pData ) );
return bSuccess;
}
@@ -254,7 +254,7 @@ sal_Bool compare_impl(const Type& _rType, const void* pData, const Any& _rValue)
}
case TypeClass_CHAR:
{
- sal_Char aDummy;
+ sal_Unicode aDummy(0);
bConversionSuccess = tryCompare(pData, _rValue, bRes, aDummy);
break;
}
@@ -432,9 +432,9 @@ sal_Bool compare_impl(const Type& _rType, const void* pData, const Any& _rValue)
{
const Sequence< ::rtl::OUString >& rLeftSeq = *reinterpret_cast<const Sequence< ::rtl::OUString>*>(pData);
const Sequence< ::rtl::OUString >& rRightSeq = aTemp;
- sal_uInt32 nSeqLen = rLeftSeq.getLength();
+ sal_Int32 nSeqLen = rLeftSeq.getLength();
bRes = ( nSeqLen == rRightSeq.getLength() );
- for ( sal_uInt32 n = 0; bRes && ( n < nSeqLen ); n++ )
+ for ( sal_Int32 n = 0; bRes && ( n < nSeqLen ); n++ )
{
const ::rtl::OUString& rS1 = rLeftSeq.getConstArray()[n];
const ::rtl::OUString& rS2 = rRightSeq.getConstArray()[n];