diff options
Diffstat (limited to 'connectivity/source/drivers/adabas/BKeys.cxx')
-rw-r--r-- | connectivity/source/drivers/adabas/BKeys.cxx | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/connectivity/source/drivers/adabas/BKeys.cxx b/connectivity/source/drivers/adabas/BKeys.cxx index 9c130d6e5690..21e4a302956d 100644 --- a/connectivity/source/drivers/adabas/BKeys.cxx +++ b/connectivity/source/drivers/adabas/BKeys.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -63,14 +63,14 @@ sdbcx::ObjectType OKeys::appendObject( const ::rtl::OUString& _rForName, const R return xNewDescriptor; } - sal_Int32 nKeyType = getINT32(descriptor->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TYPE))); + sal_Int32 nKeyType = getINT32(descriptor->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TYPE))); - ::rtl::OUString aSql = ::rtl::OUString::createFromAscii("ALTER TABLE "); - const ::rtl::OUString aQuote = getTable()->getConnection()->getMetaData()->getIdentifierQuoteString( ); + ::rtl::OUString aSql = ::rtl::OUString::createFromAscii("ALTER TABLE "); + const ::rtl::OUString aQuote = getTable()->getConnection()->getMetaData()->getIdentifierQuoteString( ); const ::rtl::OUString& sDot = OAdabasCatalog::getDot(); aSql += composeTableName( getTable()->getConnection()->getMetaData(), getTable(), ::dbtools::eInTableDefinitions, false, false, true ); - + if(nKeyType == KeyType::PRIMARY) { aSql = aSql + ::rtl::OUString::createFromAscii(" ALTER PRIMARY KEY ("); @@ -84,13 +84,13 @@ sdbcx::ObjectType OKeys::appendObject( const ::rtl::OUString& _rForName, const R Reference<XColumnsSupplier> xColumnSup(descriptor,UNO_QUERY); Reference<XIndexAccess> xColumns(xColumnSup->getColumns(),UNO_QUERY); - + for(sal_Int32 i=0;i<xColumns->getCount();++i) { Reference< XPropertySet > xColProp; xColumns->getByIndex(i) >>= xColProp; aSql = aSql + aQuote + getString(xColProp->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_NAME))) + aQuote - + ::rtl::OUString::createFromAscii(","); + + ::rtl::OUString::createFromAscii(","); } aSql = aSql.replaceAt(aSql.getLength()-1,1,::rtl::OUString::createFromAscii(")")); @@ -99,13 +99,13 @@ sdbcx::ObjectType OKeys::appendObject( const ::rtl::OUString& _rForName, const R if(nKeyType == KeyType::FOREIGN) { - nDeleteRule = getINT32(descriptor->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_DELETERULE))); + nDeleteRule = getINT32(descriptor->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_DELETERULE))); ::rtl::OUString aName,aSchema; sReferencedName = getString(descriptor->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_REFERENCEDTABLE))); sal_Int32 nLen = sReferencedName.indexOf('.'); aSchema = sReferencedName.copy(0,nLen); - aName = sReferencedName.copy(nLen+1); + aName = sReferencedName.copy(nLen+1); aSql += ::rtl::OUString::createFromAscii(" REFERENCES ") + aQuote + aSchema + aQuote + sDot + aQuote + aName + aQuote; aSql += ::rtl::OUString::createFromAscii(" ("); @@ -115,7 +115,7 @@ sdbcx::ObjectType OKeys::appendObject( const ::rtl::OUString& _rForName, const R Reference< XPropertySet > xColProp; xColumns->getByIndex(i) >>= xColProp; aSql = aSql + aQuote + getString(xColProp->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_RELATEDCOLUMN))) + aQuote - + ::rtl::OUString::createFromAscii(","); + + ::rtl::OUString::createFromAscii(","); } aSql = aSql.replaceAt(aSql.getLength()-1,1,::rtl::OUString::createFromAscii(")")); @@ -147,8 +147,8 @@ sdbcx::ObjectType OKeys::appendObject( const ::rtl::OUString& _rForName, const R { const ::dbtools::OPropertyMap& rPropMap = OMetaConnection::getPropMap(); ::rtl::OUString aSchema,aTable; - getTable()->getPropertyValue(rPropMap.getNameByIndex(PROPERTY_ID_SCHEMANAME)) >>= aSchema; - getTable()->getPropertyValue(rPropMap.getNameByIndex(PROPERTY_ID_NAME)) >>= aTable; + getTable()->getPropertyValue(rPropMap.getNameByIndex(PROPERTY_ID_SCHEMANAME)) >>= aSchema; + getTable()->getPropertyValue(rPropMap.getNameByIndex(PROPERTY_ID_NAME)) >>= aTable; Reference< XResultSet > xResult = getTable()->getMetaData()->getImportedKeys( getTable()->getPropertyValue(rPropMap.getNameByIndex(PROPERTY_ID_CATALOGNAME)) ,aSchema ,aTable); |