Tag: cws_src680_hsqldb4 User: fs Date: 05/03/31 03:51:07 Modified: /dba/dbaccess/source/ui/tabledesign/ TableController.cxx
Log: #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.96.62.1 Delta lines: +16 -4 -------------------- --- TableController.cxx 5 Jan 2005 12:37:44 -0000 1.96 +++ TableController.cxx 31 Mar 2005 11:51:05 -0000 1.96.62.1 @@ -2,9 +2,9 @@ * * $RCSfile: TableController.cxx,v $ * - * $Revision: 1.96 $ + * $Revision: 1.96.62.1 $ * - * last change: $Author: obo $ $Date: 2005/01/05 12:37:44 $ + * last change: $Author: fs $ $Date: 2005/03/31 11:51:05 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -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]
