Tag: cws_dev300_dba31c User: fs Date: 2008-09-18 21:15:47+0000 Modified: dba/dbaccess/source/ui/browser/unodatbr.cxx
Log: #i93457# initialize check box columns with a suitable TriState flag File Changes: Directory: /dba/dbaccess/source/ui/browser/ =========================================== File [changed]: unodatbr.cxx Url: http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/browser/unodatbr.cxx?r1=1.203.24.3&r2=1.203.24.4 Delta lines: +12 -2 -------------------- --- unodatbr.cxx 2008-09-12 18:59:51+0000 1.203.24.3 +++ unodatbr.cxx 2008-09-18 21:15:44+0000 1.203.24.4 @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: unodatbr.cxx,v $ - * $Revision: 1.203.24.3 $ + * $Revision: 1.203.24.4 $ * * This file is part of OpenOffice.org. * @@ -82,6 +82,7 @@ #include <com/sun/star/sdb/XResultSetAccess.hpp> #include <com/sun/star/sdb/XSingleSelectQueryComposer.hpp> #include <com/sun/star/sdb/application/NamedDatabaseObject.hpp> +#include <com/sun/star/sdbc/ColumnValue.hpp> #include <com/sun/star/sdbc/DataType.hpp> #include <com/sun/star/sdbc/FetchDirection.hpp> #include <com/sun/star/sdbc/SQLWarning.hpp> @@ -600,9 +601,18 @@ { case DataType::BIT: case DataType::BOOLEAN: + { aCurrentModelType = ::rtl::OUString::createFromAscii("CheckBox"); aInitialValues.push_back( NamedValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "VisualEffect" ) ), makeAny( VisualEffect::FLAT ) ) ); sDefaultProperty = PROPERTY_DEFAULTSTATE; + + sal_Int32 nNullable = ColumnValue::NULLABLE_UNKNOWN; + OSL_VERIFY( xColumn->getPropertyValue( PROPERTY_ISNULLABLE ) >>= nNullable ); + aInitialValues.push_back( NamedValue( + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "TriState" ) ), + makeAny( sal_Bool( ColumnValue::NO_NULLS != nNullable ) ) + ) ); + } break; case DataType::LONGVARCHAR: --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
