#87050# allow incorrect metadata
This commit is contained in:
@@ -2,9 +2,9 @@
|
||||
*
|
||||
* $RCSfile: RowSetBase.cxx,v $
|
||||
*
|
||||
* $Revision: 1.37 $
|
||||
* $Revision: 1.38 $
|
||||
*
|
||||
* last change: $Author: oj $ $Date: 2001-07-12 07:56:32 $
|
||||
* last change: $Author: oj $ $Date: 2001-07-12 12:14:47 $
|
||||
*
|
||||
* The Contents of this file are made available subject to the terms of
|
||||
* either of the following licenses
|
||||
@@ -263,9 +263,8 @@ ORowSetValue ORowSetBase::getValue(sal_Int32 columnIndex)
|
||||
aRet = (*(*m_aCurrentRow))[m_nLastColumnIndex = columnIndex];
|
||||
else
|
||||
{
|
||||
#ifdef DBG_UTIL
|
||||
if(m_aCurrentRow)
|
||||
OSL_ENSURE(0,"ORowSetBase::getValue: we don't stand on a valid row! Row is equal to end of matrix");
|
||||
OSL_ENSURE((m_bBeforeFirst || m_bAfterLast),"ORowSetBase::getValue: we don't stand on a valid row! Row is equal to end of matrix");
|
||||
else
|
||||
{
|
||||
positionCache();
|
||||
@@ -274,7 +273,6 @@ ORowSetValue ORowSetBase::getValue(sal_Int32 columnIndex)
|
||||
OSL_ENSURE(m_aCurrentRow,"ORowSetBase::getValue: we don't stand on a valid row! Row is null.");
|
||||
return getValue(columnIndex);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
return aRet;
|
||||
@@ -349,12 +347,16 @@ Reference< ::com::sun::star::io::XInputStream > SAL_CALL ORowSetBase::getBinaryS
|
||||
return new ::comphelper::SequenceInputStream((*(*m_aCurrentRow))[m_nLastColumnIndex = columnIndex].getSequence());
|
||||
else
|
||||
{
|
||||
#ifdef DBG_UTIL
|
||||
if(m_aCurrentRow)
|
||||
OSL_ENSURE(0,"ORowSetBase::getValue: we don't stand on a valid row! Row is equal to end of matrix");
|
||||
OSL_ENSURE((m_bBeforeFirst || m_bAfterLast),"ORowSetBase::getValue: we don't stand on a valid row! Row is equal to end of matrix");
|
||||
else
|
||||
OSL_ENSURE(0,"ORowSetBase::getValue: we don't stand on a valid row! Row i null.");
|
||||
#endif
|
||||
{
|
||||
positionCache();
|
||||
m_aCurrentRow = m_pCache->m_aMatrixIter;
|
||||
|
||||
OSL_ENSURE(m_aCurrentRow,"ORowSetBase::getValue: we don't stand on a valid row! Row is null.");
|
||||
return getBinaryStream(columnIndex);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
*
|
||||
* $RCSfile: SelectionBrowseBox.cxx,v $
|
||||
*
|
||||
* $Revision: 1.24 $
|
||||
* $Revision: 1.25 $
|
||||
*
|
||||
* last change: $Author: oj $ $Date: 2001-07-06 10:04:29 $
|
||||
* last change: $Author: oj $ $Date: 2001-07-12 12:13:13 $
|
||||
*
|
||||
* The Contents of this file are made available subject to the terms of
|
||||
* either of the following licenses
|
||||
@@ -227,23 +227,31 @@ OSelectionBrowseBox::~OSelectionBrowseBox()
|
||||
void OSelectionBrowseBox::initialize()
|
||||
{
|
||||
Reference< XConnection> xConnection = static_cast<OQueryController*>(getDesignView()->getController())->getConnection();
|
||||
if(xConnection.is())
|
||||
try
|
||||
{
|
||||
Reference< XDatabaseMetaData > xMetaData = xConnection->getMetaData();
|
||||
// Diese Funktionen stehen nur unter CORE zur Verf<72>gung
|
||||
if(xMetaData->supportsCoreSQLGrammar())
|
||||
if(xConnection.is())
|
||||
{
|
||||
xub_StrLen nCount = m_aFunctionStrings.GetTokenCount();
|
||||
for (xub_StrLen nIdx = 0; nIdx < nCount; nIdx++)
|
||||
m_pFunctionCell->InsertEntry(m_aFunctionStrings.GetToken(nIdx));
|
||||
|
||||
Reference< XDatabaseMetaData > xMetaData = xConnection->getMetaData();
|
||||
// Diese Funktionen stehen nur unter CORE zur Verf<72>gung
|
||||
if(xMetaData->supportsCoreSQLGrammar())
|
||||
{
|
||||
xub_StrLen nCount = m_aFunctionStrings.GetTokenCount();
|
||||
for (xub_StrLen nIdx = 0; nIdx < nCount; nIdx++)
|
||||
m_pFunctionCell->InsertEntry(m_aFunctionStrings.GetToken(nIdx));
|
||||
}
|
||||
else // sonst nur COUNT(*)
|
||||
{
|
||||
m_pFunctionCell->InsertEntry(m_aFunctionStrings.GetToken(0));
|
||||
m_pFunctionCell->InsertEntry(m_aFunctionStrings.GetToken(2)); // 2 -> COUNT
|
||||
}
|
||||
m_bOrderByUnRelated = xMetaData->supportsOrderByUnrelated();
|
||||
m_bGroupByUnRelated = xMetaData->supportsGroupByUnrelated();
|
||||
}
|
||||
else // sonst nur COUNT(*)
|
||||
{
|
||||
m_pFunctionCell->InsertEntry(m_aFunctionStrings.GetToken(0));
|
||||
m_pFunctionCell->InsertEntry(m_aFunctionStrings.GetToken(2)); // 2 -> COUNT
|
||||
}
|
||||
m_bOrderByUnRelated = xMetaData->supportsOrderByUnrelated();
|
||||
m_bGroupByUnRelated = xMetaData->supportsGroupByUnrelated();
|
||||
}
|
||||
catch(const SQLException&)
|
||||
{
|
||||
OSL_ENSURE(0,"Catched Exception when asking for database metadata options!");
|
||||
}
|
||||
|
||||
Init();
|
||||
|
||||
Reference in New Issue
Block a user