[Libreoffice-commits] .: 11 commits - connectivity/inc connectivity/source dbaccess/source solenv/bin
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Fri Nov 2 02:54:38 PDT 2012
connectivity/inc/connectivity/PColumn.hxx | 15 +-
connectivity/inc/connectivity/sdbcx/VColumn.hxx | 29 +++--
connectivity/inc/connectivity/sdbcx/VIndexColumn.hxx | 5
connectivity/inc/connectivity/sdbcx/VKeyColumn.hxx | 5
connectivity/source/commontools/TColumnsHelper.cxx | 10 +
connectivity/source/commontools/TIndexColumns.cxx | 27 ++---
connectivity/source/commontools/TKeyColumns.cxx | 34 +++---
connectivity/source/commontools/dbtools2.cxx | 14 ++
connectivity/source/commontools/predicateinput.cxx | 5
connectivity/source/drivers/calc/CTable.cxx | 3
connectivity/source/drivers/dbase/DIndexColumns.cxx | 5
connectivity/source/drivers/dbase/DTable.cxx | 3
connectivity/source/drivers/evoab2/NColumns.cxx | 15 ++
connectivity/source/drivers/evoab2/NStatement.cxx | 2
connectivity/source/drivers/file/FColumns.cxx | 12 +-
connectivity/source/drivers/file/FPreparedStatement.cxx | 5
connectivity/source/drivers/flat/ETable.cxx | 3
connectivity/source/drivers/mozab/MColumns.cxx | 13 +-
connectivity/source/drivers/mozab/MPreparedStatement.cxx | 5
connectivity/source/parse/PColumn.cxx | 81 ++++++---------
connectivity/source/parse/sqliterator.cxx | 32 ++++-
connectivity/source/sdbcx/VColumn.cxx | 36 ++++--
connectivity/source/sdbcx/VIndexColumn.cxx | 10 +
connectivity/source/sdbcx/VKeyColumn.cxx | 10 +
dbaccess/source/core/api/SingleSelectQueryComposer.cxx | 9 +
dbaccess/source/core/api/definitioncolumn.cxx | 41 +++++--
dbaccess/source/core/inc/definitioncolumn.hxx | 2
dbaccess/source/ui/querydesign/QueryDesignView.cxx | 5
solenv/bin/linkoo | 13 ++
29 files changed, 292 insertions(+), 157 deletions(-)
New commits:
commit ed4a1ac385fb3d32f9bd24f8e03b9e0b944ca7db
Author: Lionel Elie Mamane <lionel at mamane.lu>
Date: Fri Nov 2 10:50:13 2012 +0100
janitorial: use adress-of-value instead of manually repeating type
Change-Id: I137d4f794c7c738deedddfe8ea5e0dc783b49e7c
diff --git a/connectivity/source/parse/PColumn.cxx b/connectivity/source/parse/PColumn.cxx
index 1eebf84..7649044 100644
--- a/connectivity/source/parse/PColumn.cxx
+++ b/connectivity/source/parse/PColumn.cxx
@@ -172,12 +172,12 @@ OParseColumn::~OParseColumn()
// -------------------------------------------------------------------------
void OParseColumn::construct()
{
- registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_FUNCTION), PROPERTY_ID_FUNCTION, 0, &m_bFunction, ::getCppuType(static_cast< sal_Bool*>(0)));
- registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_AGGREGATEFUNCTION), PROPERTY_ID_AGGREGATEFUNCTION, 0, &m_bAggregateFunction, ::getCppuType(static_cast< sal_Bool*>(0)));
- registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_REALNAME), PROPERTY_ID_REALNAME, 0, &m_aRealName, ::getCppuType(static_cast< ::rtl::OUString*>(0)));
- registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_DBASEPRECISIONCHANGED), PROPERTY_ID_DBASEPRECISIONCHANGED, 0, &m_bDbasePrecisionChanged, ::getCppuType(static_cast<sal_Bool*>(0)));
- registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ISSEARCHABLE), PROPERTY_ID_ISSEARCHABLE, 0, &m_bIsSearchable, ::getCppuType(static_cast< sal_Bool*>(0)));
- registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_LABEL), PROPERTY_ID_LABEL, 0, &m_sLabel, ::getCppuType(static_cast< ::rtl::OUString*>(0)));
+ registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_FUNCTION), PROPERTY_ID_FUNCTION, 0, &m_bFunction, ::getCppuType(&m_bFunction));
+ registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_AGGREGATEFUNCTION), PROPERTY_ID_AGGREGATEFUNCTION, 0, &m_bAggregateFunction, ::getCppuType(&m_bAggregateFunction));
+ registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_REALNAME), PROPERTY_ID_REALNAME, 0, &m_aRealName, ::getCppuType(&m_aRealName));
+ registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_DBASEPRECISIONCHANGED), PROPERTY_ID_DBASEPRECISIONCHANGED, 0, &m_bDbasePrecisionChanged, ::getCppuType(&m_bDbasePrecisionChanged));
+ registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ISSEARCHABLE), PROPERTY_ID_ISSEARCHABLE, 0, &m_bIsSearchable, ::getCppuType(&m_bIsSearchable));
+ registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_LABEL), PROPERTY_ID_LABEL, 0, &m_sLabel, ::getCppuType(&m_sLabel));
}
// -----------------------------------------------------------------------------
::cppu::IPropertyArrayHelper* OParseColumn::createArrayHelper() const
@@ -252,7 +252,7 @@ OOrderColumn::~OOrderColumn()
void OOrderColumn::construct()
{
registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ISASCENDING), PROPERTY_ID_ISASCENDING,
- PropertyAttribute::READONLY, const_cast< sal_Bool* >( &m_bAscending ), ::getCppuType( static_cast< sal_Bool* >( 0 ) ) );
+ PropertyAttribute::READONLY, const_cast< sal_Bool* >( &m_bAscending ), ::getCppuType( &m_bAscending ) );
}
// -----------------------------------------------------------------------------
::cppu::IPropertyArrayHelper* OOrderColumn::createArrayHelper() const
commit 4239da6f88e4901ad87fbde37d9b0b0bec1e66c6
Author: Lionel Elie Mamane <lionel at mamane.lu>
Date: Fri Nov 2 10:26:00 2012 +0100
WaE janitorial: unused variable
Change-Id: Id2846bd6db9bace6cffacf3a9fc4116ae727facf
diff --git a/connectivity/source/drivers/evoab2/NStatement.cxx b/connectivity/source/drivers/evoab2/NStatement.cxx
index 711f09e..6c0de19 100644
--- a/connectivity/source/drivers/evoab2/NStatement.cxx
+++ b/connectivity/source/drivers/evoab2/NStatement.cxx
@@ -419,7 +419,7 @@ rtl::OUString OCommonStatement::getTableName()
if( m_pParseTree && m_aSQLIterator.getStatementType() == SQL_STATEMENT_SELECT )
{
Any aCatalog;
- ::rtl::OUString aSchema, aComposedName;
+ ::rtl::OUString aSchema;
const OSQLParseNode *pSelectStmnt = m_aSQLIterator.getParseTree();
const OSQLParseNode *pAllTableNames = pSelectStmnt->getChild( 3 )->getChild( 0 )->getChild( 1 );
commit 10359585eb1fa338b686c288c1d3b3e0fe9fca66
Author: Lionel Elie Mamane <lionel at mamane.lu>
Date: Thu Nov 1 14:19:14 2012 +0100
Columns should know their table
For example dbaccess::OSingleSelectQueryComposer::appendOrderByColumn expects it
(via impl_getColumnName_throw via getTableAlias)
There is some vagueness:
Should the TableName property contain just the table name,
or the *composed* table name
(that is with catalog and/or schema if used by this DB)?
In the case of a query, should it contain the table name (alias)
*in* *the* *query* or of the original table?
In the former case, what meaning do SchemaName and CatalogName have?
They should be empty?
For now, commit as such and deal with the fallout, if any,
when it hits the fan.
If we really need to store these *different* values,
(that is, some code validly needs them)
it would be easier / cleaner / ...
to define *different* properties
for these *different* notions.
Change-Id: I032e619a60e7563cd51478db16cb5e0e5452bfde
diff --git a/connectivity/inc/connectivity/PColumn.hxx b/connectivity/inc/connectivity/PColumn.hxx
index 9ac4eb5..7da2c06 100644
--- a/connectivity/inc/connectivity/PColumn.hxx
+++ b/connectivity/inc/connectivity/PColumn.hxx
@@ -41,7 +41,6 @@ namespace connectivity
public OParseColumn_BASE, public OParseColumn_PROP
{
::rtl::OUString m_aRealName;
- ::rtl::OUString m_aTableName;
::rtl::OUString m_sLabel;
sal_Bool m_bFunction;
sal_Bool m_bDbasePrecisionChanged;
@@ -65,21 +64,24 @@ namespace connectivity
sal_Int32 _Type,
sal_Bool _IsAutoIncrement,
sal_Bool _IsCurrency,
- sal_Bool _bCase);
+ sal_Bool _bCase,
+ const ::rtl::OUString& _CatalogName,
+ const ::rtl::OUString& _SchemaName,
+ const ::rtl::OUString& _TableName);
virtual void construct();
void setRealName(const ::rtl::OUString& _rName) { m_aRealName = _rName; }
void setLabel(const ::rtl::OUString& i_sLabel) { m_sLabel = i_sLabel; }
- void setTableName(const ::rtl::OUString& _rName) { m_aTableName = _rName; }
+ void setTableName(const ::rtl::OUString& _rName) { m_TableName = _rName; }
void setFunction(sal_Bool _bFunction) { m_bFunction = _bFunction; }
void setAggregateFunction(sal_Bool _bFunction) { m_bAggregateFunction = _bFunction; }
void setIsSearchable( sal_Bool _bIsSearchable ) { m_bIsSearchable = _bIsSearchable; }
void setDbasePrecisionChanged(sal_Bool _bDbasePrecisionChanged) { m_bDbasePrecisionChanged = _bDbasePrecisionChanged; }
- ::rtl::OUString getRealName() const { return m_aRealName; }
- ::rtl::OUString getLabel() const { return m_sLabel; }
- ::rtl::OUString getTableName() const { return m_aTableName; }
+ const ::rtl::OUString& getRealName() const { return m_aRealName; }
+ const ::rtl::OUString& getLabel() const { return m_sLabel; }
+ const ::rtl::OUString& getTableName() const { return m_TableName; }
sal_Bool getFunction() const { return m_bFunction; }
sal_Bool getDbasePrecisionChanged() const { return m_bDbasePrecisionChanged; }
@@ -118,7 +120,6 @@ namespace connectivity
public OOrderColumn_BASE, public OOrderColumn_PROP
{
const sal_Bool m_bAscending;
- const ::rtl::OUString m_sTableName;
protected:
virtual ::cppu::IPropertyArrayHelper* createArrayHelper() const;
diff --git a/connectivity/inc/connectivity/sdbcx/VColumn.hxx b/connectivity/inc/connectivity/sdbcx/VColumn.hxx
index c58e7cf..ca7a0bc 100644
--- a/connectivity/inc/connectivity/sdbcx/VColumn.hxx
+++ b/connectivity/inc/connectivity/sdbcx/VColumn.hxx
@@ -63,6 +63,10 @@ namespace connectivity
sal_Bool m_IsRowVersion;
sal_Bool m_IsCurrency;
+ ::rtl::OUString m_CatalogName;
+ ::rtl::OUString m_SchemaName;
+ ::rtl::OUString m_TableName;
+
using OColumnDescriptor_BASE::rBHelper;
virtual ::cppu::IPropertyArrayHelper* createArrayHelper( sal_Int32 _nId) const;
virtual ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper();
@@ -74,17 +78,20 @@ namespace connectivity
OColumn( sal_Bool _bCase);
OColumn( const ::rtl::OUString& _Name,
- const ::rtl::OUString& _TypeName,
- const ::rtl::OUString& _DefaultValue,
- const ::rtl::OUString& _Description,
- sal_Int32 _IsNullable,
- sal_Int32 _Precision,
- sal_Int32 _Scale,
- sal_Int32 _Type,
- sal_Bool _IsAutoIncrement,
- sal_Bool _IsRowVersion,
- sal_Bool _IsCurrency,
- sal_Bool _bCase);
+ const ::rtl::OUString& _TypeName,
+ const ::rtl::OUString& _DefaultValue,
+ const ::rtl::OUString& _Description,
+ sal_Int32 _IsNullable,
+ sal_Int32 _Precision,
+ sal_Int32 _Scale,
+ sal_Int32 _Type,
+ sal_Bool _IsAutoIncrement,
+ sal_Bool _IsRowVersion,
+ sal_Bool _IsCurrency,
+ sal_Bool _bCase,
+ const ::rtl::OUString& _CatalogName,
+ const ::rtl::OUString& _SchemaName,
+ const ::rtl::OUString& _TableName);
DECLARE_SERVICE_INFO();
//XInterface
diff --git a/connectivity/inc/connectivity/sdbcx/VIndexColumn.hxx b/connectivity/inc/connectivity/sdbcx/VIndexColumn.hxx
index d5c11c4..bdccd12 100644
--- a/connectivity/inc/connectivity/sdbcx/VIndexColumn.hxx
+++ b/connectivity/inc/connectivity/sdbcx/VIndexColumn.hxx
@@ -50,7 +50,10 @@ namespace connectivity
sal_Bool _IsAutoIncrement,
sal_Bool _IsRowVersion,
sal_Bool _IsCurrency,
- sal_Bool _bCase);
+ sal_Bool _bCase,
+ const ::rtl::OUString& _CatalogName,
+ const ::rtl::OUString& _SchemaName,
+ const ::rtl::OUString& _TableName);
virtual void construct();
DECLARE_SERVICE_INFO();
diff --git a/connectivity/inc/connectivity/sdbcx/VKeyColumn.hxx b/connectivity/inc/connectivity/sdbcx/VKeyColumn.hxx
index 92624b5..b3624bd 100644
--- a/connectivity/inc/connectivity/sdbcx/VKeyColumn.hxx
+++ b/connectivity/inc/connectivity/sdbcx/VKeyColumn.hxx
@@ -50,7 +50,10 @@ namespace connectivity
sal_Bool _IsAutoIncrement,
sal_Bool _IsRowVersion,
sal_Bool _IsCurrency,
- sal_Bool _bCase);
+ sal_Bool _bCase,
+ const ::rtl::OUString& _CatalogName,
+ const ::rtl::OUString& _SchemaName,
+ const ::rtl::OUString& _TableName);
// just to make it not inline
virtual ~OKeyColumn();
diff --git a/connectivity/source/commontools/TColumnsHelper.cxx b/connectivity/source/commontools/TColumnsHelper.cxx
index 83bfe69..ad725c4 100644
--- a/connectivity/source/commontools/TColumnsHelper.cxx
+++ b/connectivity/source/commontools/TColumnsHelper.cxx
@@ -115,6 +115,11 @@ sdbcx::ObjectType OColumnsHelper::createObject(const ::rtl::OUString& _rName)
{
nField11 = ColumnValue::NO_NULLS;
} // if ( xKeys.is() )
+ ::dbtools::OPropertyMap& rPropMap = OMetaConnection::getPropMap();
+ ::rtl::OUString aCatalog, aSchema, aTable;
+ m_pTable->getPropertyValue(rPropMap.getNameByIndex(PROPERTY_ID_CATALOGNAME)) >>= aCatalog;
+ m_pTable->getPropertyValue(rPropMap.getNameByIndex(PROPERTY_ID_SCHEMANAME)) >>= aSchema;
+ m_pTable->getPropertyValue(rPropMap.getNameByIndex(PROPERTY_ID_NAME)) >>= aTable;
connectivity::sdbcx::OColumn* pRet = new connectivity::sdbcx::OColumn(_rName,
pColDesc->aField6,
pColDesc->sField13,
@@ -126,7 +131,10 @@ sdbcx::ObjectType OColumnsHelper::createObject(const ::rtl::OUString& _rName)
bAutoIncrement,
sal_False,
bIsCurrency,
- isCaseSensitive());
+ isCaseSensitive(),
+ aCatalog,
+ aSchema,
+ aTable);
xRet = pRet;
}
diff --git a/connectivity/source/commontools/TIndexColumns.cxx b/connectivity/source/commontools/TIndexColumns.cxx
index 7edd3ea..c64e94b 100644
--- a/connectivity/source/commontools/TIndexColumns.cxx
+++ b/connectivity/source/commontools/TIndexColumns.cxx
@@ -47,8 +47,9 @@ OIndexColumns::OIndexColumns( OIndexHelper* _pIndex,
sdbcx::ObjectType OIndexColumns::createObject(const ::rtl::OUString& _rName)
{
::dbtools::OPropertyMap& rPropMap = OMetaConnection::getPropMap();
- ::rtl::OUString aSchema,aTable;
+ ::rtl::OUString aCatalog, aSchema, aTable;
::com::sun::star::uno::Any Catalog(m_pIndex->getTable()->getPropertyValue(rPropMap.getNameByIndex(PROPERTY_ID_CATALOGNAME)));
+ Catalog >>= aCatalog;
m_pIndex->getTable()->getPropertyValue(rPropMap.getNameByIndex(PROPERTY_ID_SCHEMANAME)) >>= aSchema;
m_pIndex->getTable()->getPropertyValue(rPropMap.getNameByIndex(PROPERTY_ID_NAME)) >>= aTable;
@@ -93,7 +94,8 @@ sdbcx::ObjectType OIndexColumns::createObject(const ::rtl::OUString& _rName)
nSize,
nDec,
nDataType,
- sal_False,sal_False,sal_False,sal_True);
+ sal_False,sal_False,sal_False,sal_True,
+ aCatalog, aSchema, aTable);
xRet = pRet;
break;
}
diff --git a/connectivity/source/commontools/TKeyColumns.cxx b/connectivity/source/commontools/TKeyColumns.cxx
index f9a9a22..bb5a36a 100644
--- a/connectivity/source/commontools/TKeyColumns.cxx
+++ b/connectivity/source/commontools/TKeyColumns.cxx
@@ -48,13 +48,15 @@ OKeyColumnsHelper::OKeyColumnsHelper( OTableKeyHelper* _pKey,
sdbcx::ObjectType OKeyColumnsHelper::createObject(const ::rtl::OUString& _rName)
{
::dbtools::OPropertyMap& rPropMap = OMetaConnection::getPropMap();
- ::rtl::OUString aSchema,aTable;
+ ::rtl::OUString aCatalog, aSchema, aTable;
+ ::com::sun::star::uno::Any Catalog(m_pKey->getTable()->getPropertyValue(rPropMap.getNameByIndex(PROPERTY_ID_CATALOGNAME)));
+ Catalog >>= aCatalog;
m_pKey->getTable()->getPropertyValue(rPropMap.getNameByIndex(PROPERTY_ID_SCHEMANAME)) >>= aSchema;
m_pKey->getTable()->getPropertyValue(rPropMap.getNameByIndex(PROPERTY_ID_NAME)) >>= aTable;
// frist get the related column to _rName
Reference< XResultSet > xResult = m_pKey->getTable()->getMetaData()->getImportedKeys(
- m_pKey->getTable()->getPropertyValue(rPropMap.getNameByIndex(PROPERTY_ID_CATALOGNAME)),aSchema,aTable);
+ Catalog, aSchema, aTable);
::rtl::OUString aRefColumnName;
if ( xResult.is() )
@@ -75,8 +77,7 @@ sdbcx::ObjectType OKeyColumnsHelper::createObject(const ::rtl::OUString& _rName)
sdbcx::ObjectType xRet;
// now describe the column _rName and set his related column
- xResult = m_pKey->getTable()->getMetaData()->getColumns(
- m_pKey->getTable()->getPropertyValue(rPropMap.getNameByIndex(PROPERTY_ID_CATALOGNAME)),aSchema,aTable,_rName);
+ xResult = m_pKey->getTable()->getMetaData()->getColumns(Catalog, aSchema, aTable, _rName);
if ( xResult.is() )
{
@@ -101,17 +102,20 @@ sdbcx::ObjectType OKeyColumnsHelper::createObject(const ::rtl::OUString& _rName)
}
OKeyColumn* pRet = new OKeyColumn(aRefColumnName,
- _rName,
- aTypeName,
- sColumnDef,
- nNull,
- nSize,
- nDec,
- nDataType,
- sal_False,
- sal_False,
- sal_False,
- isCaseSensitive());
+ _rName,
+ aTypeName,
+ sColumnDef,
+ nNull,
+ nSize,
+ nDec,
+ nDataType,
+ sal_False,
+ sal_False,
+ sal_False,
+ isCaseSensitive(),
+ aCatalog,
+ aSchema,
+ aTable);
xRet = pRet;
}
}
diff --git a/connectivity/source/commontools/dbtools2.cxx b/connectivity/source/commontools/dbtools2.cxx
index bb83253..4092e9e 100644
--- a/connectivity/source/commontools/dbtools2.cxx
+++ b/connectivity/source/commontools/dbtools2.cxx
@@ -389,6 +389,8 @@ namespace
Reference<XPropertySet> xProp;
Reference<XDatabaseMetaData> xMetaData = _xConnection->getMetaData();
Reference< XResultSet > xResult = xMetaData->getColumns(_aCatalog, _aSchema, _aTable, _rQueryName);
+ ::rtl::OUString sCatalog;
+ _aCatalog >>= sCatalog;
if ( xResult.is() )
{
@@ -472,7 +474,10 @@ namespace
bAutoIncrement,
sal_False,
bIsCurrency,
- _bCase);
+ _bCase,
+ sCatalog,
+ _aSchema,
+ _aTable);
xProp = pRet;
break;
@@ -515,6 +520,8 @@ Reference<XPropertySet> createSDBCXColumn(const Reference<XPropertySet>& _xTable
Reference<XDatabaseMetaData> xMetaData = _xConnection->getMetaData();
Any aCatalog;
aCatalog = _xTable->getPropertyValue(rPropMap.getNameByIndex(PROPERTY_ID_CATALOGNAME));
+ ::rtl::OUString sCatalog;
+ aCatalog >>= sCatalog;
::rtl::OUString aSchema, aTable;
_xTable->getPropertyValue(rPropMap.getNameByIndex(PROPERTY_ID_SCHEMANAME)) >>= aSchema;
@@ -536,7 +543,10 @@ Reference<XPropertySet> createSDBCXColumn(const Reference<XPropertySet>& _xTable
_bIsAutoIncrement,
sal_False,
_bIsCurrency,
- _bCase);
+ _bCase,
+ sCatalog,
+ aSchema,
+ aTable);
}
diff --git a/connectivity/source/commontools/predicateinput.cxx b/connectivity/source/commontools/predicateinput.cxx
index 4950de6..f8f8960 100644
--- a/connectivity/source/commontools/predicateinput.cxx
+++ b/connectivity/source/commontools/predicateinput.cxx
@@ -374,7 +374,10 @@ namespace dbtools
nType,
sal_False,
sal_False,
- xMeta.is() && xMeta->supportsMixedCaseQuotedIdentifiers());
+ xMeta.is() && xMeta->supportsMixedCaseQuotedIdentifiers(),
+ ::rtl::OUString(),
+ ::rtl::OUString(),
+ ::rtl::OUString());
Reference<XPropertySet> xColumn = pColumn;
pColumn->setFunction(sal_True);
pColumn->setRealName(sField);
diff --git a/connectivity/source/drivers/calc/CTable.cxx b/connectivity/source/drivers/calc/CTable.cxx
index da8cbe5..ff3c333 100644
--- a/connectivity/source/drivers/calc/CTable.cxx
+++ b/connectivity/source/drivers/calc/CTable.cxx
@@ -514,7 +514,8 @@ void OCalcTable::fillColumns()
sdbcx::OColumn* pColumn = new sdbcx::OColumn( aAlias, aTypeName, ::rtl::OUString(),::rtl::OUString(),
ColumnValue::NULLABLE, nPrecision, nDecimals,
eType, sal_False, sal_False, bCurrency,
- bStoresMixedCaseQuotedIdentifiers);
+ bStoresMixedCaseQuotedIdentifiers,
+ m_CatalogName, getSchema(), getName());
Reference< XPropertySet> xCol = pColumn;
m_aColumns->get().push_back(xCol);
m_aTypes.push_back(eType);
diff --git a/connectivity/source/drivers/dbase/DIndexColumns.cxx b/connectivity/source/drivers/dbase/DIndexColumns.cxx
index 1fbff24..73aa3d5 100644
--- a/connectivity/source/drivers/dbase/DIndexColumns.cxx
+++ b/connectivity/source/drivers/dbase/DIndexColumns.cxx
@@ -59,7 +59,10 @@ sdbcx::ObjectType ODbaseIndexColumns::createObject(const ::rtl::OUString& _rName
,sal_False
,sal_False
,sal_False
- ,pTable->getConnection()->getMetaData()->supportsMixedCaseQuotedIdentifiers());
+ ,pTable->getConnection()->getMetaData()->supportsMixedCaseQuotedIdentifiers()
+ ,getString(xCol->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_CATALOGNAME)))
+ ,getString(xCol->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_SCHEMANAME)))
+ ,getString(xCol->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TABLENAME))));
return xRet;
}
diff --git a/connectivity/source/drivers/dbase/DTable.cxx b/connectivity/source/drivers/dbase/DTable.cxx
index f1bdb32..499b238 100644
--- a/connectivity/source/drivers/dbase/DTable.cxx
+++ b/connectivity/source/drivers/dbase/DTable.cxx
@@ -436,7 +436,8 @@ OSL_TRACE("column type: %c",aDBFColumn.db_typ);
sal_False,
bIsRowVersion,
bIsCurrency,
- bCase);
+ bCase,
+ m_CatalogName, getSchema(), getName());
m_aColumns->get().push_back(xCol);
} // for (; i < nFieldCount; i++)
OSL_ENSURE(i,"No columns in table!");
diff --git a/connectivity/source/drivers/evoab2/NColumns.cxx b/connectivity/source/drivers/evoab2/NColumns.cxx
index c4cae93..b131bc3 100644
--- a/connectivity/source/drivers/evoab2/NColumns.cxx
+++ b/connectivity/source/drivers/evoab2/NColumns.cxx
@@ -37,10 +37,14 @@ using namespace connectivity::evoab;
// -------------------------------------------------------------------------
sdbcx::ObjectType OEvoabColumns::createObject(const ::rtl::OUString& _rName)
{
+ const Any aCatalog;
+ const ::rtl::OUString sCatalogName;
+ const ::rtl::OUString sSchemaName(m_pTable->getSchema());
+ const ::rtl::OUString sTableName(m_pTable->getTableName());
Reference< XResultSet > xResult = m_pTable->getConnection()->getMetaData()->getColumns(
- Any(),
- m_pTable->getSchema(),
- m_pTable->getTableName(),
+ aCatalog,
+ sSchemaName,
+ sTableName,
_rName);
sdbcx::ObjectType xRet = NULL;
@@ -64,7 +68,10 @@ sdbcx::ObjectType OEvoabColumns::createObject(const ::rtl::OUString& _rName)
sal_False,
sal_False,
sal_False,
- sal_True);
+ sal_True,
+ sCatalogName,
+ sSchemaName,
+ sTableName);
xRet = pRet;
break;
}
diff --git a/connectivity/source/drivers/file/FColumns.cxx b/connectivity/source/drivers/file/FColumns.cxx
index f916b2d..199c0ac 100644
--- a/connectivity/source/drivers/file/FColumns.cxx
+++ b/connectivity/source/drivers/file/FColumns.cxx
@@ -37,9 +37,12 @@ using namespace ::com::sun::star::lang;
sdbcx::ObjectType OColumns::createObject(const ::rtl::OUString& _rName)
{
-
+ const Any aCatalog;
+ const ::rtl::OUString sCatalogName;
+ const ::rtl::OUString sSchemaName(m_pTable->getSchema());
+ const ::rtl::OUString sTableName(m_pTable->getName());
Reference< XResultSet > xResult = m_pTable->getConnection()->getMetaData()->getColumns(Any(),
- m_pTable->getSchema(),m_pTable->getName(),_rName);
+ sSchemaName, sTableName, _rName);
sdbcx::ObjectType xRet = NULL;
if(xResult.is())
@@ -60,7 +63,10 @@ sdbcx::ObjectType OColumns::createObject(const ::rtl::OUString& _rName)
sal_False,
sal_False,
sal_False,
- m_pTable->getConnection()->getMetaData()->supportsMixedCaseQuotedIdentifiers());
+ m_pTable->getConnection()->getMetaData()->supportsMixedCaseQuotedIdentifiers(),
+ sCatalogName,
+ sSchemaName,
+ sTableName);
xRet = pRet;
break;
}
diff --git a/connectivity/source/drivers/file/FPreparedStatement.cxx b/connectivity/source/drivers/file/FPreparedStatement.cxx
index 0d810fc..f99cf3c 100644
--- a/connectivity/source/drivers/file/FPreparedStatement.cxx
+++ b/connectivity/source/drivers/file/FPreparedStatement.cxx
@@ -506,7 +506,10 @@ sal_uInt32 OPreparedStatement::AddParameter(OSQLParseNode * pParameter, const Re
,eType
,sal_False
,sal_False
- ,m_aSQLIterator.isCaseSensitive());
+ ,m_aSQLIterator.isCaseSensitive()
+ ,::rtl::OUString()
+ ,::rtl::OUString()
+ ,::rtl::OUString());
m_xParamColumns->get().push_back(xParaColumn);
return m_xParamColumns->get().size();
}
diff --git a/connectivity/source/drivers/flat/ETable.cxx b/connectivity/source/drivers/flat/ETable.cxx
index 1473228..110f401 100644
--- a/connectivity/source/drivers/flat/ETable.cxx
+++ b/connectivity/source/drivers/flat/ETable.cxx
@@ -171,7 +171,8 @@ void OFlatTable::fillColumns(const ::com::sun::star::lang::Locale& _aLocale)
sal_False,
sal_False,
sal_False,
- bCase);
+ bCase,
+ m_CatalogName, getSchema(), getName());
Reference< XPropertySet> xCol = pColumn;
m_aColumns->get().push_back(xCol);
}
diff --git a/connectivity/source/drivers/mozab/MColumns.cxx b/connectivity/source/drivers/mozab/MColumns.cxx
index f6fb6e2..786280c 100644
--- a/connectivity/source/drivers/mozab/MColumns.cxx
+++ b/connectivity/source/drivers/mozab/MColumns.cxx
@@ -43,8 +43,12 @@ using namespace ::com::sun::star::lang;
sdbcx::ObjectType OColumns::createObject(const ::rtl::OUString& _rName)
{
- Reference< XResultSet > xResult = m_pTable->getConnection()->getMetaData()->getColumns(Any(),
- m_pTable->getSchema(),m_pTable->getTableName(),_rName);
+ const Any aCatalog;
+ const ::rtl::OUString sCatalogName;
+ const ::rtl::OUString sSchemaName(m_pTable->getSchema());
+ const ::rtl::OUString sTableName(m_pTable->getTableName());
+ Reference< XResultSet > xResult = m_pTable->getConnection()->getMetaData()->getColumns(
+ aCatalog, sSchemaName, sTableName, _rName);
sdbcx::ObjectType xRet = NULL;
if(xResult.is())
@@ -66,7 +70,10 @@ sdbcx::ObjectType OColumns::createObject(const ::rtl::OUString& _rName)
nPrec,
xRow->getInt(9),
nType,
- sal_False,sal_False,sal_False,sal_True);
+ sal_False,sal_False,sal_False,sal_True,
+ sCatalogName,
+ sSchemaName,
+ sTableName);
xRet = pRet;
break;
}
diff --git a/connectivity/source/drivers/mozab/MPreparedStatement.cxx b/connectivity/source/drivers/mozab/MPreparedStatement.cxx
index 9a650ef..971749d 100644
--- a/connectivity/source/drivers/mozab/MPreparedStatement.cxx
+++ b/connectivity/source/drivers/mozab/MPreparedStatement.cxx
@@ -443,7 +443,10 @@ size_t OPreparedStatement::AddParameter(OSQLParseNode * pParameter, const Refere
,sal_False
,sal_False
,sal_False
- ,m_pSQLIterator->isCaseSensitive());
+ ,m_pSQLIterator->isCaseSensitive()
+ ,::rtl::OUString()
+ ,::rtl::OUString()
+ ,::rtl::OUString());
m_xParamColumns->get().push_back(xParaColumn);
return nParameter;
}
diff --git a/connectivity/source/parse/PColumn.cxx b/connectivity/source/parse/PColumn.cxx
index f9523c9..1eebf84 100644
--- a/connectivity/source/parse/PColumn.cxx
+++ b/connectivity/source/parse/PColumn.cxx
@@ -25,6 +25,8 @@
#include <comphelper/types.hxx>
#include <tools/diagnose_ex.h>
+#include <bitset>
+
using namespace ::comphelper;
using namespace connectivity;
using namespace dbtools;
@@ -48,6 +50,9 @@ OParseColumn::OParseColumn(const Reference<XPropertySet>& _xColumn,sal_Bool
, sal_False
, getBOOL(_xColumn->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ISCURRENCY)))
, _bCase
+ , getString(_xColumn->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_CATALOGNAME)))
+ , getString(_xColumn->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_SCHEMANAME)))
+ , getString(_xColumn->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TABLENAME)))
)
, m_bFunction(sal_False)
, m_bDbasePrecisionChanged(sal_False)
@@ -68,7 +73,10 @@ OParseColumn::OParseColumn( const ::rtl::OUString& _Name,
sal_Int32 _Type,
sal_Bool _IsAutoIncrement,
sal_Bool _IsCurrency,
- sal_Bool _bCase
+ sal_Bool _bCase,
+ const ::rtl::OUString& _CatalogName,
+ const ::rtl::OUString& _SchemaName,
+ const ::rtl::OUString& _TableName
) : connectivity::sdbcx::OColumn(_Name,
_TypeName,
_DefaultValue,
@@ -80,7 +88,10 @@ OParseColumn::OParseColumn( const ::rtl::OUString& _Name,
_IsAutoIncrement,
sal_False,
_IsCurrency,
- _bCase)
+ _bCase,
+ _CatalogName,
+ _SchemaName,
+ _TableName)
, m_bFunction(sal_False)
, m_bDbasePrecisionChanged(sal_False)
, m_bAggregateFunction(sal_False)
@@ -116,7 +127,7 @@ OParseColumn::OParseColumn( const ::rtl::OUString& _Name,
// -------------------------------------------------------------------------
OParseColumn* OParseColumn::createColumnForResultSet( const Reference< XResultSetMetaData >& _rxResMetaData,
- const Reference< XDatabaseMetaData >& _rxDBMetaData, sal_Int32 _nColumnPos,StringMap& _rColumns )
+ const Reference< XDatabaseMetaData >& _rxDBMetaData, sal_Int32 _nColumnPos, StringMap& _rColumns )
{
::rtl::OUString sLabel = _rxResMetaData->getColumnLabel( _nColumnPos );
// retrieve the name of the column
@@ -143,17 +154,11 @@ OParseColumn* OParseColumn::createColumnForResultSet( const Reference< XResultSe
_rxResMetaData->getColumnType( _nColumnPos ),
_rxResMetaData->isAutoIncrement( _nColumnPos ),
_rxResMetaData->isCurrency( _nColumnPos ),
- _rxDBMetaData->supportsMixedCaseQuotedIdentifiers()
+ _rxDBMetaData->supportsMixedCaseQuotedIdentifiers(),
+ _rxResMetaData->getCatalogName( _nColumnPos ),
+ _rxResMetaData->getSchemaName( _nColumnPos ),
+ _rxResMetaData->getTableName( _nColumnPos )
);
- const ::rtl::OUString sTableName = _rxResMetaData->getTableName( _nColumnPos );
- if ( !sTableName.isEmpty() )
- pColumn->setTableName( ::dbtools::composeTableName( _rxDBMetaData,
- _rxResMetaData->getCatalogName( _nColumnPos ),
- _rxResMetaData->getSchemaName( _nColumnPos ),
- sTableName,
- sal_False,
- eComplete
- ) );
pColumn->setIsSearchable( _rxResMetaData->isSearchable( _nColumnPos ) );
pColumn->setRealName(_rxResMetaData->getColumnName( _nColumnPos ));
pColumn->setLabel(sLabel);
@@ -169,7 +174,6 @@ void OParseColumn::construct()
{
registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_FUNCTION), PROPERTY_ID_FUNCTION, 0, &m_bFunction, ::getCppuType(static_cast< sal_Bool*>(0)));
registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_AGGREGATEFUNCTION), PROPERTY_ID_AGGREGATEFUNCTION, 0, &m_bAggregateFunction, ::getCppuType(static_cast< sal_Bool*>(0)));
- registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TABLENAME), PROPERTY_ID_TABLENAME, 0, &m_aTableName, ::getCppuType(static_cast< ::rtl::OUString*>(0)));
registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_REALNAME), PROPERTY_ID_REALNAME, 0, &m_aRealName, ::getCppuType(static_cast< ::rtl::OUString*>(0)));
registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_DBASEPRECISIONCHANGED), PROPERTY_ID_DBASEPRECISIONCHANGED, 0, &m_bDbasePrecisionChanged, ::getCppuType(static_cast<sal_Bool*>(0)));
registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ISSEARCHABLE), PROPERTY_ID_ISSEARCHABLE, 0, &m_bIsSearchable, ::getCppuType(static_cast< sal_Bool*>(0)));
@@ -188,24 +192,6 @@ void OParseColumn::construct()
}
// -----------------------------------------------------------------------------
-namespace
-{
- ::rtl::OUString lcl_getColumnTableName( const Reference< XPropertySet >& i_parseColumn )
- {
- ::rtl::OUString sColumnTableName;
- try
- {
- OSL_VERIFY( i_parseColumn->getPropertyValue( OMetaConnection::getPropMap().getNameByIndex( PROPERTY_ID_TABLENAME ) ) >>= sColumnTableName );
- }
- catch( const Exception& )
- {
- DBG_UNHANDLED_EXCEPTION();
- }
- return sColumnTableName;
- }
-}
-
-// -----------------------------------------------------------------------------
OOrderColumn::OOrderColumn( const Reference<XPropertySet>& _xColumn, const ::rtl::OUString& i_rOriginatingTableName,
sal_Bool _bCase, sal_Bool _bAscending )
: connectivity::sdbcx::OColumn(
@@ -220,12 +206,17 @@ OOrderColumn::OOrderColumn( const Reference<XPropertySet>& _xColumn, const ::rtl
getBOOL(_xColumn->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ISAUTOINCREMENT))),
sal_False,
getBOOL(_xColumn->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ISCURRENCY))),
- _bCase
+ _bCase,
+ getString(_xColumn->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_CATALOGNAME))),
+ getString(_xColumn->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_SCHEMANAME))),
+ i_rOriginatingTableName
)
,m_bAscending(_bAscending)
- ,m_sTableName( i_rOriginatingTableName )
{
construct();
+ OSL_ENSURE( getString(_xColumn->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TABLENAME))).isEmpty() ||
+ i_rOriginatingTableName == getString(_xColumn->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TABLENAME)) ),
+ "dbaccess::OOrderColumn::OOrderColumn: forced originating table name != underlying column table name" );
}
// -----------------------------------------------------------------------------
@@ -242,10 +233,12 @@ OOrderColumn::OOrderColumn( const Reference<XPropertySet>& _xColumn, sal_Bool _b
getBOOL(_xColumn->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ISAUTOINCREMENT))),
sal_False,
getBOOL(_xColumn->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ISCURRENCY))),
- _bCase
+ _bCase,
+ getString(_xColumn->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_CATALOGNAME))),
+ getString(_xColumn->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_SCHEMANAME))),
+ getString(_xColumn->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TABLENAME)))
)
,m_bAscending(_bAscending)
- ,m_sTableName( lcl_getColumnTableName( _xColumn ) )
{
construct();
}
@@ -260,8 +253,6 @@ void OOrderColumn::construct()
{
registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ISASCENDING), PROPERTY_ID_ISASCENDING,
PropertyAttribute::READONLY, const_cast< sal_Bool* >( &m_bAscending ), ::getCppuType( static_cast< sal_Bool* >( 0 ) ) );
- registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TABLENAME), PROPERTY_ID_TABLENAME,
- PropertyAttribute::READONLY, const_cast< ::rtl::OUString* >( &m_sTableName ), ::getCppuType(static_cast< ::rtl::OUString*>(0)));
}
// -----------------------------------------------------------------------------
::cppu::IPropertyArrayHelper* OOrderColumn::createArrayHelper() const
diff --git a/connectivity/source/parse/sqliterator.cxx b/connectivity/source/parse/sqliterator.cxx
index 5ee583e..7d91655 100644
--- a/connectivity/source/parse/sqliterator.cxx
+++ b/connectivity/source/parse/sqliterator.cxx
@@ -899,7 +899,8 @@ void OSQLParseTreeIterator::traverseCreateColumns(const OSQLParseNode* pSelectNo
{
//TODO:Create a new class for create statement to handle field length
OParseColumn* pColumn = new OParseColumn(aColumnName,aTypeName,::rtl::OUString(),::rtl::OUString(),
- ColumnValue::NULLABLE_UNKNOWN,0,0,nType,sal_False,sal_False,isCaseSensitive());
+ ColumnValue::NULLABLE_UNKNOWN,0,0,nType,sal_False,sal_False,isCaseSensitive(),
+ ::rtl::OUString(),::rtl::OUString(),::rtl::OUString());
pColumn->setFunction(sal_False);
pColumn->setRealName(aColumnName);
@@ -1500,7 +1501,10 @@ void OSQLParseTreeIterator::traverseParameter(const OSQLParseNode* _pParseNode
nType,
sal_False,
sal_False,
- isCaseSensitive());
+ isCaseSensitive(),
+ ::rtl::OUString(),
+ ::rtl::OUString(),
+ ::rtl::OUString());
pColumn->setFunction(sal_True);
pColumn->setAggregateFunction(sal_True);
pColumn->setRealName(sFunctionName);
@@ -1564,7 +1568,10 @@ void OSQLParseTreeIterator::traverseParameter(const OSQLParseNode* _pParseNode
nType,
sal_False,
sal_False,
- isCaseSensitive() );
+ isCaseSensitive(),
+ ::rtl::OUString(),
+ ::rtl::OUString(),
+ ::rtl::OUString());
pColumn->setName(aNewColName);
pColumn->setRealName(sParameterName);
m_aParameters->get().push_back(pColumn);
@@ -1707,7 +1714,10 @@ void OSQLParseTreeIterator::appendColumns(::rtl::Reference<OSQLColumns>& _rColum
, getINT32(xColumn->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TYPE)))
, getBOOL(xColumn->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ISAUTOINCREMENT)))
, getBOOL(xColumn->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ISCURRENCY)))
- , isCaseSensitive() );
+ , isCaseSensitive()
+ , getString(xColumn->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_CATALOGNAME)))
+ , getString(xColumn->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_SCHEMANAME)))
+ , getString(xColumn->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TABLENAME))));
pColumn->setTableName(_rTableAlias);
pColumn->setRealName(*pBegin);
@@ -1785,7 +1795,10 @@ void OSQLParseTreeIterator::setSelectColumnName(::rtl::Reference<OSQLColumns>& _
_nType,
sal_False,
sal_False,
- isCaseSensitive()
+ isCaseSensitive(),
+ ::rtl::OUString(),
+ ::rtl::OUString(),
+ ::rtl::OUString()
);
xNewColumn = pColumn;
@@ -1799,7 +1812,8 @@ void OSQLParseTreeIterator::setSelectColumnName(::rtl::Reference<OSQLColumns>& _
::rtl::OUString aNewColName(getUniqueColumnName(rColumnAlias));
OParseColumn* pColumn = new OParseColumn(aNewColName,::rtl::OUString(),::rtl::OUString(),::rtl::OUString(),
- ColumnValue::NULLABLE_UNKNOWN,0,0,_nType,sal_False,sal_False,isCaseSensitive());
+ ColumnValue::NULLABLE_UNKNOWN,0,0,_nType,sal_False,sal_False,isCaseSensitive(),
+ ::rtl::OUString(),::rtl::OUString(),::rtl::OUString());
pColumn->setFunction(sal_True);
pColumn->setAggregateFunction(bAggFkt);
pColumn->setRealName(rColumnName);
@@ -1820,7 +1834,8 @@ void OSQLParseTreeIterator::setSelectColumnName(::rtl::Reference<OSQLColumns>& _
::rtl::OUString aNewColName(getUniqueColumnName(rColumnAlias));
OParseColumn* pColumn = new OParseColumn(aNewColName,::rtl::OUString(),::rtl::OUString(),::rtl::OUString(),
- ColumnValue::NULLABLE_UNKNOWN,0,0,_nType,sal_False,sal_False,isCaseSensitive());
+ ColumnValue::NULLABLE_UNKNOWN,0,0,_nType,sal_False,sal_False,isCaseSensitive(),
+ ::rtl::OUString(),::rtl::OUString(),::rtl::OUString());
pColumn->setFunction(sal_True);
pColumn->setAggregateFunction(bAggFkt);
pColumn->setRealName(rColumnName);
@@ -1857,7 +1872,8 @@ void OSQLParseTreeIterator::setSelectColumnName(::rtl::Reference<OSQLColumns>& _
::rtl::OUString aNewColName(getUniqueColumnName(rColumnAlias));
OParseColumn* pColumn = new OParseColumn(aNewColName,::rtl::OUString(),::rtl::OUString(),::rtl::OUString(),
- ColumnValue::NULLABLE_UNKNOWN,0,0,DataType::VARCHAR,sal_False,sal_False,isCaseSensitive());
+ ColumnValue::NULLABLE_UNKNOWN,0,0,DataType::VARCHAR,sal_False,sal_False,isCaseSensitive(),
+ ::rtl::OUString(),::rtl::OUString(),::rtl::OUString());
pColumn->setFunction(sal_True);
pColumn->setAggregateFunction(bAggFkt);
diff --git a/connectivity/source/sdbcx/VColumn.cxx b/connectivity/source/sdbcx/VColumn.cxx
index f8cae25..8de64c8 100644
--- a/connectivity/source/sdbcx/VColumn.cxx
+++ b/connectivity/source/sdbcx/VColumn.cxx
@@ -87,7 +87,10 @@ OColumn::OColumn( const ::rtl::OUString& _Name,
sal_Bool _IsAutoIncrement,
sal_Bool _IsRowVersion,
sal_Bool _IsCurrency,
- sal_Bool _bCase)
+ sal_Bool _bCase,
+ const ::rtl::OUString& _CatalogName,
+ const ::rtl::OUString& _SchemaName,
+ const ::rtl::OUString& _TableName)
:OColumnDescriptor_BASE(m_aMutex)
,ODescriptor(OColumnDescriptor_BASE::rBHelper,_bCase)
,m_TypeName(_TypeName)
@@ -100,6 +103,9 @@ OColumn::OColumn( const ::rtl::OUString& _Name,
,m_IsAutoIncrement(_IsAutoIncrement)
,m_IsRowVersion(_IsRowVersion)
,m_IsCurrency(_IsCurrency)
+ ,m_CatalogName(_CatalogName)
+ ,m_SchemaName(_SchemaName)
+ ,m_TableName(_TableName)
{
m_Name = _Name;
@@ -167,6 +173,9 @@ void OColumn::construct()
registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ISAUTOINCREMENT), PROPERTY_ID_ISAUTOINCREMENT, nAttrib, &m_IsAutoIncrement, ::getBooleanCppuType());
registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ISROWVERSION), PROPERTY_ID_ISROWVERSION, nAttrib, &m_IsRowVersion, ::getBooleanCppuType());
registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ISCURRENCY), PROPERTY_ID_ISCURRENCY, nAttrib, &m_IsCurrency, ::getBooleanCppuType());
+ registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_CATALOGNAME), PROPERTY_ID_CATALOGNAME, nAttrib, &m_CatalogName, ::getCppuType(&m_CatalogName));
+ registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_SCHEMANAME), PROPERTY_ID_SCHEMANAME, nAttrib, &m_SchemaName, ::getCppuType(&m_SchemaName));
+ registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TABLENAME), PROPERTY_ID_TABLENAME, nAttrib, &m_TableName, ::getCppuType(&m_TableName));
}
// -------------------------------------------------------------------------
void OColumn::disposing(void)
@@ -195,7 +204,10 @@ Reference< XPropertySet > SAL_CALL OColumn::createDataDescriptor( ) throw(Runti
m_IsAutoIncrement,
m_IsRowVersion,
m_IsCurrency,
- isCaseSensitive());
+ isCaseSensitive(),
+ m_CatalogName,
+ m_SchemaName,
+ m_TableName);
pNewColumn->setNew(sal_True);
return pNewColumn;
}
diff --git a/connectivity/source/sdbcx/VIndexColumn.cxx b/connectivity/source/sdbcx/VIndexColumn.cxx
index be5fd01..15a20a2 100644
--- a/connectivity/source/sdbcx/VIndexColumn.cxx
+++ b/connectivity/source/sdbcx/VIndexColumn.cxx
@@ -71,7 +71,10 @@ OIndexColumn::OIndexColumn( sal_Bool _IsAscending,
sal_Bool _IsAutoIncrement,
sal_Bool _IsRowVersion,
sal_Bool _IsCurrency,
- sal_Bool _bCase
+ sal_Bool _bCase,
+ const ::rtl::OUString& _CatalogName,
+ const ::rtl::OUString& _SchemaName,
+ const ::rtl::OUString& _TableName
) : OColumn(_Name,
_TypeName,
_DefaultValue,
@@ -83,7 +86,10 @@ OIndexColumn::OIndexColumn( sal_Bool _IsAscending,
_IsAutoIncrement,
_IsRowVersion,
_IsCurrency,
- _bCase)
+ _bCase,
+ _CatalogName,
+ _SchemaName,
+ _TableName)
, m_IsAscending(_IsAscending)
{
construct();
diff --git a/connectivity/source/sdbcx/VKeyColumn.cxx b/connectivity/source/sdbcx/VKeyColumn.cxx
index edb0522..48e1df5 100644
--- a/connectivity/source/sdbcx/VKeyColumn.cxx
+++ b/connectivity/source/sdbcx/VKeyColumn.cxx
@@ -71,7 +71,10 @@ OKeyColumn::OKeyColumn( const ::rtl::OUString& _ReferencedColumn,
sal_Bool _IsAutoIncrement,
sal_Bool _IsRowVersion,
sal_Bool _IsCurrency,
- sal_Bool _bCase
+ sal_Bool _bCase,
+ const ::rtl::OUString& _CatalogName,
+ const ::rtl::OUString& _SchemaName,
+ const ::rtl::OUString& _TableName
) : OColumn(_Name,
_TypeName,
_DefaultValue,
@@ -83,7 +86,10 @@ OKeyColumn::OKeyColumn( const ::rtl::OUString& _ReferencedColumn,
_IsAutoIncrement,
_IsRowVersion,
_IsCurrency,
- _bCase)
+ _bCase,
+ _CatalogName,
+ _SchemaName,
+ _TableName)
, m_ReferencedColumn(_ReferencedColumn)
{
construct();
diff --git a/dbaccess/source/core/api/definitioncolumn.cxx b/dbaccess/source/core/api/definitioncolumn.cxx
index 7be1666..e8e0acd 100644
--- a/dbaccess/source/core/api/definitioncolumn.cxx
+++ b/dbaccess/source/core/api/definitioncolumn.cxx
@@ -44,10 +44,16 @@ using namespace ::comphelper;
using namespace ::osl;
using namespace dbaccess;
-#define HAS_DESCRIPTION 0x00000001
-#define HAS_DEFAULTVALUE 0x00000002
-#define HAS_ROWVERSION 0x00000004
-#define HAS_AUTOINCREMENT_CREATION 0x00000008
+namespace
+{
+ const sal_Int32 HAS_DESCRIPTION = 0x00000001;
+ const sal_Int32 HAS_DEFAULTVALUE = 0x00000002;
+ const sal_Int32 HAS_ROWVERSION = 0x00000004;
+ const sal_Int32 HAS_AUTOINCREMENT_CREATION = 0x00000008;
+ const sal_Int32 HAS_CATALOGNAME = 0x00000010;
+ const sal_Int32 HAS_SCHEMANAME = 0x00000020;
+ const sal_Int32 HAS_TABLENAME = 0x00000040;
+}
//============================================================
//= OTableColumnDescriptor
@@ -336,6 +342,9 @@ OColumnWrapper::OColumnWrapper( const Reference< XPropertySet > & rCol, const bo
m_nColTypeID |= xInfo->hasPropertyByName(PROPERTY_DEFAULTVALUE) ? HAS_DEFAULTVALUE : 0;
m_nColTypeID |= xInfo->hasPropertyByName(PROPERTY_ISROWVERSION) ? HAS_ROWVERSION : 0;
m_nColTypeID |= xInfo->hasPropertyByName(PROPERTY_AUTOINCREMENTCREATION) ? HAS_AUTOINCREMENT_CREATION : 0;
+ m_nColTypeID |= xInfo->hasPropertyByName(PROPERTY_CATALOGNAME) ? HAS_CATALOGNAME : 0;
+ m_nColTypeID |= xInfo->hasPropertyByName(PROPERTY_SCHEMANAME) ? HAS_SCHEMANAME : 0;
+ m_nColTypeID |= xInfo->hasPropertyByName(PROPERTY_TABLENAME) ? HAS_TABLENAME : 0;
m_xAggregate->getPropertyValue(PROPERTY_NAME) >>= m_sName;
}
@@ -445,15 +454,7 @@ Sequence< ::rtl::OUString > OTableColumnDescriptorWrapper::getSupportedServiceNa
const sal_Int32 nHaveAlways = 7;
// Which optional properties are contained?
- sal_Int32 nHaveOptionally = 0;
- if (nId & HAS_DESCRIPTION)
- ++nHaveOptionally;
- if (nId & HAS_DEFAULTVALUE)
- ++nHaveOptionally;
- if (nId & HAS_ROWVERSION)
- ++nHaveOptionally;
- if ( nId & HAS_AUTOINCREMENT_CREATION )
- ++nHaveOptionally;
+ const sal_Int32 nHaveOptionally (::std::bitset<7>(nId).count());
BEGIN_PROPERTY_SEQUENCE( nHaveAlways + nHaveOptionally )
@@ -481,6 +482,18 @@ Sequence< ::rtl::OUString > OTableColumnDescriptorWrapper::getSupportedServiceNa
{
DECL_PROP0_BOOL( ISROWVERSION );
}
+ if ( nId & HAS_CATALOGNAME )
+ {
+ DECL_PROP0( CATALOGNAME, ::rtl::OUString );
+ }
+ if ( nId & HAS_SCHEMANAME )
+ {
+ DECL_PROP0( SCHEMANAME, ::rtl::OUString );
+ }
+ if ( nId & HAS_TABLENAME )
+ {
+ DECL_PROP0( TABLENAME, ::rtl::OUString );
+ }
END_PROPERTY_SEQUENCE()
diff --git a/dbaccess/source/ui/querydesign/QueryDesignView.cxx b/dbaccess/source/ui/querydesign/QueryDesignView.cxx
index ebddbfc..13446b2 100644
--- a/dbaccess/source/ui/querydesign/QueryDesignView.cxx
+++ b/dbaccess/source/ui/querydesign/QueryDesignView.cxx
@@ -3085,7 +3085,10 @@ OSQLParseNode* OQueryDesignView::getPredicateTreeFromEntry(OTableFieldDescRef pE
nType,
sal_False,
sal_False,
- xMeta.is() && xMeta->supportsMixedCaseQuotedIdentifiers());
+ xMeta.is() && xMeta->supportsMixedCaseQuotedIdentifiers(),
+ ::rtl::OUString(),
+ ::rtl::OUString(),
+ ::rtl::OUString());
_rxColumn = pColumn;
pColumn->setFunction(sal_True);
pColumn->setRealName(pEntry->GetField());
commit 20380f26b47faffe0cf541f46b8706439a5d4219
Author: Lionel Elie Mamane <lionel at mamane.lu>
Date: Thu Nov 1 10:36:44 2012 +0100
Retrieve CatalogName only once, too
diff --git a/connectivity/source/commontools/TIndexColumns.cxx b/connectivity/source/commontools/TIndexColumns.cxx
index 1cee809..7edd3ea 100644
--- a/connectivity/source/commontools/TIndexColumns.cxx
+++ b/connectivity/source/commontools/TIndexColumns.cxx
@@ -48,12 +48,12 @@ sdbcx::ObjectType OIndexColumns::createObject(const ::rtl::OUString& _rName)
{
::dbtools::OPropertyMap& rPropMap = OMetaConnection::getPropMap();
::rtl::OUString aSchema,aTable;
+ ::com::sun::star::uno::Any Catalog(m_pIndex->getTable()->getPropertyValue(rPropMap.getNameByIndex(PROPERTY_ID_CATALOGNAME)));
m_pIndex->getTable()->getPropertyValue(rPropMap.getNameByIndex(PROPERTY_ID_SCHEMANAME)) >>= aSchema;
m_pIndex->getTable()->getPropertyValue(rPropMap.getNameByIndex(PROPERTY_ID_NAME)) >>= aTable;
Reference< XResultSet > xResult = m_pIndex->getTable()->getConnection()->getMetaData()->getIndexInfo(
- m_pIndex->getTable()->getPropertyValue(rPropMap.getNameByIndex(PROPERTY_ID_CATALOGNAME)),
- aSchema,aTable,sal_False,sal_False);
+ Catalog, aSchema, aTable, sal_False, sal_False);
sal_Bool bAsc = sal_True;
if ( xResult.is() )
@@ -68,8 +68,7 @@ sdbcx::ObjectType OIndexColumns::createObject(const ::rtl::OUString& _rName)
}
xResult = m_pIndex->getTable()->getConnection()->getMetaData()->getColumns(
- m_pIndex->getTable()->getPropertyValue(rPropMap.getNameByIndex(PROPERTY_ID_CATALOGNAME)),
- aSchema,aTable,_rName);
+ Catalog, aSchema, aTable, _rName);
sdbcx::ObjectType xRet;
if ( xResult.is() )
commit 6747cc436886b8bb07852fe71a0b404eb9300f48
Author: Lionel Elie Mamane <lionel at mamane.lu>
Date: Thu Nov 1 10:31:15 2012 +0100
janitorial: alignment
Change-Id: I5ff8335d9c7324a101d055ff9666fce867bac8ff
diff --git a/connectivity/source/commontools/TIndexColumns.cxx b/connectivity/source/commontools/TIndexColumns.cxx
index ca0e783..1cee809 100644
--- a/connectivity/source/commontools/TIndexColumns.cxx
+++ b/connectivity/source/commontools/TIndexColumns.cxx
@@ -87,14 +87,14 @@ sdbcx::ObjectType OIndexColumns::createObject(const ::rtl::OUString& _rName)
::rtl::OUString aColumnDef(xRow->getString(13));
OIndexColumn* pRet = new OIndexColumn(bAsc,
- _rName,
- aTypeName,
- aColumnDef,
- nNull,
- nSize,
- nDec,
- nDataType,
- sal_False,sal_False,sal_False,sal_True);
+ _rName,
+ aTypeName,
+ aColumnDef,
+ nNull,
+ nSize,
+ nDec,
+ nDataType,
+ sal_False,sal_False,sal_False,sal_True);
xRet = pRet;
break;
}
commit d85a26ba035b45586ad7eba5791f0fe533b38d42
Author: Lionel Elie Mamane <lionel at mamane.lu>
Date: Thu Nov 1 10:10:39 2012 +0100
janitorial: space between arguments
Change-Id: I430929a19d7f5c9c6859c12a0952f9d335de4520
diff --git a/connectivity/source/sdbcx/VColumn.cxx b/connectivity/source/sdbcx/VColumn.cxx
index f912254..f8cae25 100644
--- a/connectivity/source/sdbcx/VColumn.cxx
+++ b/connectivity/source/sdbcx/VColumn.cxx
@@ -157,16 +157,16 @@ void OColumn::construct()
sal_Int32 nAttrib = isNew() ? 0 : PropertyAttribute::READONLY;
- registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TYPENAME), PROPERTY_ID_TYPENAME, nAttrib,&m_TypeName, ::getCppuType(&m_TypeName));
- registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_DESCRIPTION), PROPERTY_ID_DESCRIPTION, nAttrib,&m_Description, ::getCppuType(&m_Description));
- registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_DEFAULTVALUE), PROPERTY_ID_DEFAULTVALUE, nAttrib,&m_DefaultValue, ::getCppuType(&m_DefaultValue));
- registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_PRECISION), PROPERTY_ID_PRECISION, nAttrib,&m_Precision, ::getCppuType(&m_Precision));
- registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TYPE), PROPERTY_ID_TYPE, nAttrib,&m_Type, ::getCppuType(&m_Type));
- registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_SCALE), PROPERTY_ID_SCALE, nAttrib,&m_Scale, ::getCppuType(&m_Scale));
- registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ISNULLABLE), PROPERTY_ID_ISNULLABLE, nAttrib,&m_IsNullable, ::getCppuType(&m_IsNullable));
- registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ISAUTOINCREMENT), PROPERTY_ID_ISAUTOINCREMENT, nAttrib,&m_IsAutoIncrement, ::getBooleanCppuType());
- registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ISROWVERSION), PROPERTY_ID_ISROWVERSION, nAttrib,&m_IsRowVersion, ::getBooleanCppuType());
- registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ISCURRENCY), PROPERTY_ID_ISCURRENCY, nAttrib,&m_IsCurrency, ::getBooleanCppuType());
+ registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TYPENAME), PROPERTY_ID_TYPENAME, nAttrib, &m_TypeName, ::getCppuType(&m_TypeName));
+ registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_DESCRIPTION), PROPERTY_ID_DESCRIPTION, nAttrib, &m_Description, ::getCppuType(&m_Description));
+ registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_DEFAULTVALUE), PROPERTY_ID_DEFAULTVALUE, nAttrib, &m_DefaultValue, ::getCppuType(&m_DefaultValue));
+ registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_PRECISION), PROPERTY_ID_PRECISION, nAttrib, &m_Precision, ::getCppuType(&m_Precision));
+ registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TYPE), PROPERTY_ID_TYPE, nAttrib, &m_Type, ::getCppuType(&m_Type));
+ registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_SCALE), PROPERTY_ID_SCALE, nAttrib, &m_Scale, ::getCppuType(&m_Scale));
+ registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ISNULLABLE), PROPERTY_ID_ISNULLABLE, nAttrib, &m_IsNullable, ::getCppuType(&m_IsNullable));
+ registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ISAUTOINCREMENT), PROPERTY_ID_ISAUTOINCREMENT, nAttrib, &m_IsAutoIncrement, ::getBooleanCppuType());
+ registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ISROWVERSION), PROPERTY_ID_ISROWVERSION, nAttrib, &m_IsRowVersion, ::getBooleanCppuType());
+ registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ISCURRENCY), PROPERTY_ID_ISCURRENCY, nAttrib, &m_IsCurrency, ::getBooleanCppuType());
}
// -------------------------------------------------------------------------
void OColumn::disposing(void)
commit d613ca982668741a0eabde3dde597b1dd49ea59f
Author: Lionel Elie Mamane <lionel at mamane.lu>
Date: Thu Nov 1 10:23:35 2012 +0100
janitorial: use adress-of-value instead of manually repeating type
Change-Id: If2422a618f98685d029289a5357fa7d7860567e7
diff --git a/connectivity/source/sdbcx/VColumn.cxx b/connectivity/source/sdbcx/VColumn.cxx
index bd2fd29..f912254 100644
--- a/connectivity/source/sdbcx/VColumn.cxx
+++ b/connectivity/source/sdbcx/VColumn.cxx
@@ -157,13 +157,13 @@ void OColumn::construct()
sal_Int32 nAttrib = isNew() ? 0 : PropertyAttribute::READONLY;
- registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TYPENAME), PROPERTY_ID_TYPENAME, nAttrib,&m_TypeName, ::getCppuType(reinterpret_cast< ::rtl::OUString*>(0)));
- registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_DESCRIPTION), PROPERTY_ID_DESCRIPTION, nAttrib,&m_Description, ::getCppuType(reinterpret_cast< ::rtl::OUString*>(0)));
- registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_DEFAULTVALUE), PROPERTY_ID_DEFAULTVALUE, nAttrib,&m_DefaultValue, ::getCppuType(reinterpret_cast< ::rtl::OUString*>(0)));
- registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_PRECISION), PROPERTY_ID_PRECISION, nAttrib,&m_Precision, ::getCppuType(reinterpret_cast<sal_Int32*>(0)));
- registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TYPE), PROPERTY_ID_TYPE, nAttrib,&m_Type, ::getCppuType(reinterpret_cast<sal_Int32*>(0)));
- registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_SCALE), PROPERTY_ID_SCALE, nAttrib,&m_Scale, ::getCppuType(reinterpret_cast<sal_Int32*>(0)));
- registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ISNULLABLE), PROPERTY_ID_ISNULLABLE, nAttrib,&m_IsNullable, ::getCppuType(reinterpret_cast<sal_Int32*>(0)));
+ registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TYPENAME), PROPERTY_ID_TYPENAME, nAttrib,&m_TypeName, ::getCppuType(&m_TypeName));
+ registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_DESCRIPTION), PROPERTY_ID_DESCRIPTION, nAttrib,&m_Description, ::getCppuType(&m_Description));
+ registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_DEFAULTVALUE), PROPERTY_ID_DEFAULTVALUE, nAttrib,&m_DefaultValue, ::getCppuType(&m_DefaultValue));
+ registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_PRECISION), PROPERTY_ID_PRECISION, nAttrib,&m_Precision, ::getCppuType(&m_Precision));
+ registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TYPE), PROPERTY_ID_TYPE, nAttrib,&m_Type, ::getCppuType(&m_Type));
+ registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_SCALE), PROPERTY_ID_SCALE, nAttrib,&m_Scale, ::getCppuType(&m_Scale));
+ registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ISNULLABLE), PROPERTY_ID_ISNULLABLE, nAttrib,&m_IsNullable, ::getCppuType(&m_IsNullable));
registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ISAUTOINCREMENT), PROPERTY_ID_ISAUTOINCREMENT, nAttrib,&m_IsAutoIncrement, ::getBooleanCppuType());
registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ISROWVERSION), PROPERTY_ID_ISROWVERSION, nAttrib,&m_IsRowVersion, ::getBooleanCppuType());
registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ISCURRENCY), PROPERTY_ID_ISCURRENCY, nAttrib,&m_IsCurrency, ::getBooleanCppuType());
commit dc225ed80f964f3d0bc2117d1625ca143891915e
Author: Lionel Elie Mamane <lionel at mamane.lu>
Date: Thu Nov 1 10:06:29 2012 +0100
janitorial: alignment
Change-Id: Ia5e4729c2c85dfacc4505c3674a113a6a4415ab0
diff --git a/connectivity/source/sdbcx/VColumn.cxx b/connectivity/source/sdbcx/VColumn.cxx
index f69cb5e..bd2fd29 100644
--- a/connectivity/source/sdbcx/VColumn.cxx
+++ b/connectivity/source/sdbcx/VColumn.cxx
@@ -157,15 +157,15 @@ void OColumn::construct()
sal_Int32 nAttrib = isNew() ? 0 : PropertyAttribute::READONLY;
- registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TYPENAME), PROPERTY_ID_TYPENAME, nAttrib,&m_TypeName, ::getCppuType(static_cast< ::rtl::OUString*>(0)));
- registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_DESCRIPTION), PROPERTY_ID_DESCRIPTION, nAttrib,&m_Description, ::getCppuType(static_cast< ::rtl::OUString*>(0)));
- registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_DEFAULTVALUE), PROPERTY_ID_DEFAULTVALUE, nAttrib,&m_DefaultValue, ::getCppuType(static_cast< ::rtl::OUString*>(0)));
- registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_PRECISION), PROPERTY_ID_PRECISION, nAttrib,&m_Precision, ::getCppuType(static_cast<sal_Int32*>(0)));
- registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TYPE), PROPERTY_ID_TYPE, nAttrib,&m_Type, ::getCppuType(static_cast<sal_Int32*>(0)));
- registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_SCALE), PROPERTY_ID_SCALE, nAttrib,&m_Scale, ::getCppuType(static_cast<sal_Int32*>(0)));
- registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ISNULLABLE), PROPERTY_ID_ISNULLABLE, nAttrib,&m_IsNullable, ::getCppuType(static_cast<sal_Int32*>(0)));
+ registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TYPENAME), PROPERTY_ID_TYPENAME, nAttrib,&m_TypeName, ::getCppuType(reinterpret_cast< ::rtl::OUString*>(0)));
+ registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_DESCRIPTION), PROPERTY_ID_DESCRIPTION, nAttrib,&m_Description, ::getCppuType(reinterpret_cast< ::rtl::OUString*>(0)));
+ registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_DEFAULTVALUE), PROPERTY_ID_DEFAULTVALUE, nAttrib,&m_DefaultValue, ::getCppuType(reinterpret_cast< ::rtl::OUString*>(0)));
+ registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_PRECISION), PROPERTY_ID_PRECISION, nAttrib,&m_Precision, ::getCppuType(reinterpret_cast<sal_Int32*>(0)));
+ registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TYPE), PROPERTY_ID_TYPE, nAttrib,&m_Type, ::getCppuType(reinterpret_cast<sal_Int32*>(0)));
+ registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_SCALE), PROPERTY_ID_SCALE, nAttrib,&m_Scale, ::getCppuType(reinterpret_cast<sal_Int32*>(0)));
+ registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ISNULLABLE), PROPERTY_ID_ISNULLABLE, nAttrib,&m_IsNullable, ::getCppuType(reinterpret_cast<sal_Int32*>(0)));
registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ISAUTOINCREMENT), PROPERTY_ID_ISAUTOINCREMENT, nAttrib,&m_IsAutoIncrement, ::getBooleanCppuType());
- registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ISROWVERSION), PROPERTY_ID_ISROWVERSION, nAttrib,&m_IsRowVersion, ::getBooleanCppuType());
+ registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ISROWVERSION), PROPERTY_ID_ISROWVERSION, nAttrib,&m_IsRowVersion, ::getBooleanCppuType());
registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ISCURRENCY), PROPERTY_ID_ISCURRENCY, nAttrib,&m_IsCurrency, ::getBooleanCppuType());
}
// -------------------------------------------------------------------------
commit 76dd7fc60ba06846fe9af28c3ebdeb0dec6147cf
Author: Lionel Elie Mamane <lionel at mamane.lu>
Date: Thu Nov 1 09:56:58 2012 +0100
Don't abort when column has no (Catalog|Schema|Table)Name
Especially since the rest of the function is prepared to handle
no/empty (Catalog|Schema|Table)Name.
Change-Id: Ic0bb59ead5789e671c90887ef850588f4924f5e7
diff --git a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx
index faef308..b3caf70 100644
--- a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx
+++ b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx
@@ -1290,9 +1290,12 @@ sal_Bool OSingleSelectQueryComposer::setComparsionPredicate(OSQLParseNode * pCon
if(m_pTables && m_pTables->getCount() > 1)
{
::rtl::OUString aCatalog,aSchema,aTable,aComposedName,aColumnName;
- column->getPropertyValue(PROPERTY_CATALOGNAME) >>= aCatalog;
- column->getPropertyValue(PROPERTY_SCHEMANAME) >>= aSchema;
- column->getPropertyValue(PROPERTY_TABLENAME) >>= aTable;
+ if(column->getPropertySetInfo()->hasPropertyByName(PROPERTY_CATALOGNAME))
+ column->getPropertyValue(PROPERTY_CATALOGNAME) >>= aCatalog;
+ if(column->getPropertySetInfo()->hasPropertyByName(PROPERTY_SCHEMANAME))
+ column->getPropertyValue(PROPERTY_SCHEMANAME) >>= aSchema;
+ if(column->getPropertySetInfo()->hasPropertyByName(PROPERTY_TABLENAME))
+ column->getPropertyValue(PROPERTY_TABLENAME) >>= aTable;
column->getPropertyValue(PROPERTY_NAME) >>= aColumnName;
Sequence< ::rtl::OUString> aNames(m_pTables->getElementNames());
commit 806d18ae7b8c241fe90e49d3d370306769c50a10
Author: Lionel Elie Mamane <lionel at mamane.lu>
Date: Wed Oct 31 17:40:29 2012 +0100
optimisation: take ref to OUString instead of constructing temp object
Change-Id: I9dcb821cd71f89fa5b3d8274fd93facc1f43863f
diff --git a/dbaccess/source/core/api/definitioncolumn.cxx b/dbaccess/source/core/api/definitioncolumn.cxx
index 190da60..7be1666 100644
--- a/dbaccess/source/core/api/definitioncolumn.cxx
+++ b/dbaccess/source/core/api/definitioncolumn.cxx
@@ -162,7 +162,7 @@ rtl::OUString OTableColumn::getImplementationName( ) throw (RuntimeException)
// =========================================================================
DBG_NAME( OQueryColumn );
-OQueryColumn::OQueryColumn( const Reference< XPropertySet >& _rxParserColumn, const Reference< XConnection >& _rxConnection,const ::rtl::OUString i_sLabel )
+OQueryColumn::OQueryColumn( const Reference< XPropertySet >& _rxParserColumn, const Reference< XConnection >& _rxConnection, const ::rtl::OUString &i_sLabel )
:OTableColumnDescriptor( false /* do not act as descriptor */ )
,m_sLabel(i_sLabel)
{
diff --git a/dbaccess/source/core/inc/definitioncolumn.hxx b/dbaccess/source/core/inc/definitioncolumn.hxx
index 6209710..44d198c 100644
--- a/dbaccess/source/core/inc/definitioncolumn.hxx
+++ b/dbaccess/source/core/inc/definitioncolumn.hxx
@@ -158,7 +158,7 @@ namespace dbaccess
OQueryColumn(
const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& _rxParserColumn,
const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _rxConnection,
- const ::rtl::OUString i_sLabel
+ const ::rtl::OUString &i_sLabel
);
// XTypeProvider
commit fcee486849c2e5a07c0eef630beb427742f54d8e
Author: Lionel Elie Mamane <lionel at mamane.lu>
Date: Tue Oct 30 17:52:23 2012 +0100
detect even more memory mismanagement on glibc
Change-Id: Idba21b12582e9ae7d240d9d3527f9ac5893252f7
diff --git a/solenv/bin/linkoo b/solenv/bin/linkoo
index c97df91..7820234 100755
--- a/solenv/bin/linkoo
+++ b/solenv/bin/linkoo
@@ -54,6 +54,19 @@ export STAR_RESOURCEPATH=$thisdir/resource
export SAL_DISABLE_FLOATGRAB=1
export G_SLICE=always-malloc
export MALLOC_CHECK_=2
+#get some random value between 0 and 255
+rndbyte=$RANDOM
+if test -n "${rndbyte}"; then
+ rndbyte=$(( $rndbyte % 256 ))
+else
+ if test -r /dev/urandom; then
+ rndbyte=$(dd if=/dev/urandom bs=1 count=1 2>/dev/null | od -tu1 | cut -s -d " " -f2)
+ else
+ rndbyte=$(( (( $(date +%S) + 1 ) * $$ ) % 255 ))
+ fi
+fi
+export MALLOC_PERTURB_=${rndbyte}
+unset rndbyte
export OOO_DISABLE_RECOVERY=1
export SAL_ALLOW_LINKOO_SYMLINKS=1
';
More information about the Libreoffice-commits
mailing list