User: hr Date: 05/04/06 03:40:39 Modified: /dba/dbaccess/source/ui/tabledesign/ TableController.cxx
Log: INTEGRATION: CWS hsqldb4 (1.96.62); FILE MERGED 2005/03/31 11:51:05 fs 1.96.62.1: #i41785# alterColumns: also take into account changed type names File Changes: Directory: /dba/dbaccess/source/ui/tabledesign/ =============================================== File [changed]: TableController.cxx Url: http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/tabledesign/TableController.cxx?r1=1.96&r2=1.97 Delta lines: +13 -1 -------------------- --- TableController.cxx 5 Jan 2005 12:37:44 -0000 1.96 +++ TableController.cxx 6 Apr 2005 10:40:37 -0000 1.97 @@ -1234,7 +1234,7 @@ sal_Int32 nType,nPrecision,nScale,nNullable,nFormatKey=0,nAlignment=0; sal_Bool bAutoIncrement; - ::rtl::OUString sDescription; + ::rtl::OUString sDescription, sTypeName; Any aControlDefault; xColumn->getPropertyValue(PROPERTY_TYPE) >>= nType; @@ -1242,6 +1242,17 @@ xColumn->getPropertyValue(PROPERTY_SCALE) >>= nScale; xColumn->getPropertyValue(PROPERTY_ISNULLABLE) >>= nNullable; xColumn->getPropertyValue(PROPERTY_ISAUTOINCREMENT) >>= bAutoIncrement; + + try { xColumn->getPropertyValue(PROPERTY_TYPENAME) >>= sTypeName; } + catch( const Exception& ) + { + OSL_ENSURE( sal_False, "no TypeName property?!" ); + // since this is a last minute fix for #i41785#, I want to be on the safe side, + // and catch errors here as early as possible (instead of the whole process of altering + // the columns failing) + // Normally, sdbcx::Column objects are expected to have a TypeName property + } + // xColumn->getPropertyValue(PROPERTY_ISCURRENCY,::cppu::bool2any(pField->IsCurrency())); if(xColumn->getPropertySetInfo()->hasPropertyByName(PROPERTY_HELPTEXT)) xColumn->getPropertyValue(PROPERTY_HELPTEXT) >>= sDescription; @@ -1254,6 +1265,7 @@ // check if something changed if((nType != pField->GetType() || + sTypeName != pField->GetTypeName() || nPrecision != pField->GetPrecision() || nScale != pField->GetScale() || nNullable != pField->GetIsNullable() || --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
