Bugzilla – Attachment 55562 Details for
Bug 43479
LibreOffice Base crashes when connected to Spreadsheet when "SELECT DISTINCT" used
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
Proposition of patch
patch_distinct.txt (text/plain), 2.19 KB, created by
Julien Nabet
on 2012-01-13 17:22:57 UTC
(
hide
)
Description:
Proposition of patch
Filename:
MIME Type:
Creator:
Julien Nabet
Created:
2012-01-13 17:22:57 UTC
Size:
2.19 KB
patch
obsolete
>diff --git a/connectivity/source/drivers/file/FNoException.cxx b/connectivity/source/drivers/file/FNoException.cxx >index 8090295..340eca9 100644 >--- a/connectivity/source/drivers/file/FNoException.cxx >+++ b/connectivity/source/drivers/file/FNoException.cxx >@@ -111,10 +111,10 @@ OKeyValue* OResultSet::GetOrderbyKeyValue(OValueRefRow& _rRow) > OKeyValue* pKeyValue = OKeyValue::createKeyValue((sal_uInt32)nBookmarkValue); > > ::std::vector<sal_Int32>::iterator aIter = m_aOrderbyColumnNumber.begin(); >- for (;aIter != m_aOrderbyColumnNumber.end(); ++aIter) >+ for (::std::vector<sal_Int16>::size_type i=0;aIter != m_aOrderbyColumnNumber.end(); ++i, ++aIter) > { >- OSL_ENSURE(*aIter < static_cast<sal_Int32>(_rRow->get().size()),"Invalid index for orderkey values!"); >- pKeyValue->pushKey(new ORowSetValueDecorator((_rRow->get())[*aIter]->getValue())); >+ OSL_ENSURE((i+1) < static_cast<sal_Int32>(_rRow->get().size()),"Invalid index for orderkey values!"); >+ pKeyValue->pushKey(new ORowSetValueDecorator((_rRow->get())[i+1]->getValue())); > } > > return pKeyValue; >diff --git a/connectivity/source/drivers/file/FResultSet.cxx b/connectivity/source/drivers/file/FResultSet.cxx >index 43b7827..6fa118a 100644 >--- a/connectivity/source/drivers/file/FResultSet.cxx >+++ b/connectivity/source/drivers/file/FResultSet.cxx >@@ -1281,7 +1281,7 @@ void OResultSet::sortRows() > for (::std::vector<sal_Int16>::size_type i=0;aOrderByIter != m_aOrderbyColumnNumber.end(); ++aOrderByIter,++i) > { > OSL_ENSURE((sal_Int32)m_aSelectRow->get().size() > *aOrderByIter,"Invalid Index"); >- switch ((*(m_aSelectRow->get().begin()+*aOrderByIter))->getValue().getTypeKind()) >+ switch ((*(m_aSelectRow->get().begin()+(i+1)))->getValue().getTypeKind()) > { > case DataType::CHAR: > case DataType::VARCHAR: >@@ -1310,7 +1310,7 @@ void OResultSet::sortRows() > OSL_FAIL("OFILECursor::Execute: Datentyp nicht implementiert"); > break; > } >- (m_aSelectRow->get())[*aOrderByIter]->setBound(sal_True); >+ (m_aSelectRow->get())[i+1]->setBound(sal_True); > } > > m_pSortIndex = new OSortIndex(eKeyType,m_aOrderbyAscending);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 43479
:
54084
|
54900
|
55561
| 55562