dbaccess/source/core/api/KeySet.cxx | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-)
New commits: commit 11ce80e1e7085e2073850056e47e4e997905d286 Author: Lionel Elie Mamane <lio...@mamane.lu> Date: Tue Oct 20 19:14:29 2015 +0200 tdf#93724 KeySet insert: properly set default values: NULL & right type Change-Id: I933eed918e18b6923d4e0d24748297cf0dd0088d Reviewed-on: https://gerrit.libreoffice.org/19651 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Miklos Vajna <vmik...@collabora.co.uk> diff --git a/dbaccess/source/core/api/KeySet.cxx b/dbaccess/source/core/api/KeySet.cxx index b82e731..6b2400e 100644 --- a/dbaccess/source/core/api/KeySet.cxx +++ b/dbaccess/source/core/api/KeySet.cxx @@ -797,7 +797,18 @@ void OKeySet::executeInsert( const ORowSetRow& _rInsertRow,const OUString& i_sSQ for(;aIter != aEnd;++aIter) { if ( !(_rInsertRow->get())[aIter->second.nPosition].isModified() ) - (_rInsertRow->get())[aIter->second.nPosition] = aIter->second.sDefaultValue; + { + if(aIter->second.bNullable && aIter->second.sDefaultValue.isEmpty()) + { + (_rInsertRow->get())[aIter->second.nPosition].setTypeKind(aIter->second.nType); + (_rInsertRow->get())[aIter->second.nPosition].setNull(); + } + else + { + (_rInsertRow->get())[aIter->second.nPosition] = aIter->second.sDefaultValue; + (_rInsertRow->get())[aIter->second.nPosition].setTypeKind(aIter->second.nType); + } + } } try { _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits