[PATCH] fix makeAny calls

Christian Lohmaier (via Code Review) gerrit at gerrit.libreoffice.org
Sun Mar 17 11:56:14 PDT 2013


Hi,

I have submitted a patch for review:

    https://gerrit.libreoffice.org/2805

To pull it, you can do:

    git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/05/2805/1

fix makeAny calls

checks failed on Mac/PPC - setValue expects sal_Bool, not plain bool
for bool there's assignment operator. Similar for unsigned short -
there's dedicated operator to assign sal_uInt16 - no need to cast to
signed sal_Int23 that then fails to convert properly.

Change-Id: I6c67a3741cf2d7910fc543c9c71db1c6e816bea6
---
M connectivity/source/commontools/FValue.cxx
1 file changed, 2 insertions(+), 3 deletions(-)



diff --git a/connectivity/source/commontools/FValue.cxx b/connectivity/source/commontools/FValue.cxx
index fef5087..e41a1a7 100644
--- a/connectivity/source/commontools/FValue.cxx
+++ b/connectivity/source/commontools/FValue.cxx
@@ -916,7 +916,7 @@
                 break;
             case DataType::BIT:
             case DataType::BOOLEAN:
-                rValue.setValue( &m_aValue.m_bBool, ::getCppuBooleanType() );
+                rValue <<= m_aValue.m_bBool;
                 break;
             case DataType::TINYINT:
                 if ( m_bSigned )
@@ -2414,8 +2414,7 @@
         {
             sal_uInt16 nValue(0);
             _rValue >>= nValue;
-            (*this) = static_cast<sal_Int32>(nValue);
-            setSigned(sal_False);
+            (*this) = nValue;
             break;
         }
         case TypeClass_LONG:

-- 
To view, visit https://gerrit.libreoffice.org/2805
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6c67a3741cf2d7910fc543c9c71db1c6e816bea6
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>



More information about the LibreOffice mailing list