summaryrefslogtreecommitdiff
path: root/connectivity/CppunitTest_connectivity_commontools.mk
diff options
context:
space:
mode:
authorDavid Ostrovsky <david@ostrovsky.org>2013-02-04 11:12:57 +0100
committerLionel Elie Mamane <lionel@mamane.lu>2013-02-05 15:46:17 +0100
commit2bd856e643ef526c1283475c19cd355f7ef840f4 (patch)
treed6ff071ff68de3402b35bec4f8fc82d6c3587533 /connectivity/CppunitTest_connectivity_commontools.mk
parent5e50b4d6616fa3831b3a7c72969ac81815768f7a (diff)
ORowSetValue: clean up sign/unsigned union member
Also switch BOOLEAN constructor from sal_Bool to bool. old/new signed/unsigned storage situation: ------------------------------------------------------- SQL type | signed | unsigned old | unsigned new ------------------------------------------------------- TINYINT | sal_Int8 | sal_Int16 | sal_uInt8 SMALLINT | sal_Int16 | sal_Int32 | sal_uInt16 INTEGER | sal_Int32 | sal_Int64 | sal_uInt32 BIGINT | sal_Int64 | pValue (String*) | sal_uInt64 ------------------------------------------------------- When sticking an UNSIGNED TINYINT into an Any, silently promote it to UNSIGNED SMALLINT (that is sal_uInt16), else Any would take it as a sal_Bool and normalise to sal_True (1) or sal_False (0). When constructing an ORowSetValue from a sal_Bool, silently keep it as an unsigned 8 bit integer (that is understand it as a sal_uInt8). This will work in most cases, since when asked back for a bool or sal_Bool, we'll give back the right value. Only code looking at the type tag could possibly make a "wrong" decision. The main (hopefully only?) path through which this would happen is through an implementation of XParameters::setBoolean XRowUpdate::updateBoolean that would use its sal_Bool argument to construct an ORowSetValue. So make sure each implementation constructs a proper BOOLEAN so as not to get confused. For authorship/copyright purposes, this patch is a cooperation between Lionel Elie Mamane <lionel@mamane.lu> and David Ostrovsky <david@ostrovsky.org> Change-Id: I3f1f08716127147f077bff4edb6ec558b1b09e09
Diffstat (limited to 'connectivity/CppunitTest_connectivity_commontools.mk')
-rw-r--r--connectivity/CppunitTest_connectivity_commontools.mk65
1 files changed, 65 insertions, 0 deletions
diff --git a/connectivity/CppunitTest_connectivity_commontools.mk b/connectivity/CppunitTest_connectivity_commontools.mk
new file mode 100644
index 000000000000..1678e7b19e05
--- /dev/null
+++ b/connectivity/CppunitTest_connectivity_commontools.mk
@@ -0,0 +1,65 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_CppunitTest_CppunitTest,connectivity_commontools))
+
+$(eval $(call gb_CppunitTest_set_include,connectivity_commontools,\
+ -I$(SRCDIR)/connectivity/source/inc \
+ $$(INCLUDE) \
+))
+
+$(eval $(call gb_CppunitTest_use_ure,connectivity_commontools))
+
+$(eval $(call gb_CppunitTest_use_external,connectivity_commontools,boost_headers))
+
+$(eval $(call gb_CppunitTest_use_sdk_api,connectivity_commontools))
+
+ifeq ($(COM),GCC)
+$(eval $(call gb_CppunitTest_add_cxxflags,connectivity_commontools,\
+ -fpermissive \
+))
+endif
+
+ifeq ($(WINDOWS_SDK_VERSION),80)
+$(eval $(call gb_CppunitTest_add_defs,connectivity_commontools,\
+ -DNTDDI_VERSION=0x0601 \
+))
+endif
+
+$(eval $(call gb_CppunitTest_add_exception_objects,connectivity_commontools, \
+ connectivity/qa/connectivity/commontools/FValue_test \
+))
+
+$(eval $(call gb_CppunitTest_use_library_objects,connectivity_commontools,dbtools))
+
+$(eval $(call gb_CppunitTest_use_libraries,connectivity_commontools, \
+ comphelper \
+ cppu \
+ cppuhelper \
+ i18nisolang1 \
+ jvmaccess \
+ sal \
+ salhelper \
+ test \
+ unotest \
+ utl \
+ tl \
+ $(gb_UWINAPI) \
+))
+
+$(eval $(call gb_CppunitTest_use_components,connectivity_commontools,\
+ configmgr/source/configmgr \
+ i18npool/util/i18npool \
+ ucb/source/core/ucb1 \
+ ucb/source/ucp/file/ucpfile1 \
+))
+
+$(eval $(call gb_CppunitTest_use_configuration,connectivity_commontools))
+
+# vim: set noet sw=4 ts=4: