[Libreoffice-commits] .: Branch 'libreoffice-3-4' - connectivity/source
connectivity/source/inc/odbc/OBoundParam.hxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit adb1ed5f13b4638690ca2966138eb2c61bdb1b53 Author: Lionel Elie Mamane Date: Tue Feb 14 14:54:03 2012 +0100 odbc 64 bit crash: correct buffer length allocation for a SQLLEN (cherry picked from commit 84d21e4de26bd69f7ca5b10f2c72779f07e11347) Signed-off-by: Michael Stahl diff --git a/connectivity/source/inc/odbc/OBoundParam.hxx b/connectivity/source/inc/odbc/OBoundParam.hxx index 5817aac..b8856e9 100644 --- a/connectivity/source/inc/odbc/OBoundParam.hxx +++ b/connectivity/source/inc/odbc/OBoundParam.hxx @@ -68,7 +68,7 @@ namespace connectivity // to a Java sal_Int32. The jdbcodbc 'C' bridge provides an // interface to do this. -paramLength = new sal_Int8[4]; +paramLength = new sal_Int8[sizeof(SQLLEN)]; } // ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-4' - connectivity/source
connectivity/source/drivers/file/FResultSet.cxx | 48 1 file changed, 17 insertions(+), 31 deletions(-) New commits: commit 9cd5a1b11f2f5f69d674f0b0e44352d96518013e Author: Michael Stahl Date: Thu Jan 19 15:25:07 2012 +0100 connectivity: fdo#43479: fix crash on DISTINCT: Since commit f89f2b8bf506de0cc547ad596c75cbe1a0cf1ef1, OResultSet::sortRows() works on the rows after SELECT, not on full rows. So OResultSet::OpenImpl() has to be adapted to not use the mapping from selected columns to entries rows in m_aColMapping any more; instead, use the given ORDER BY clause for sorting. But first extend the sort order to cover all columns, so it is no longer necessary to call sortRows twice (this should be legal, because SQL says the order of rows that are equal in ORDER BY columns is unspecified). Signed-off-by: Lionel Elie Mamane diff --git a/connectivity/source/drivers/file/FResultSet.cxx b/connectivity/source/drivers/file/FResultSet.cxx index 71d2f3e..26baffe 100644 --- a/connectivity/source/drivers/file/FResultSet.cxx +++ b/connectivity/source/drivers/file/FResultSet.cxx @@ -1441,26 +1441,29 @@ sal_Bool OResultSet::OpenImpl() else { sal_Bool bDistinct = sal_False; -sal_Bool bWasSorted = sal_False; OSQLParseNode *pDistinct = m_pParseTree->getChild(1); -::std::vector aOrderbyColumnNumberSave; -::std::vector aOrderbyAscendingSave; +assert(m_aOrderbyColumnNumber.size() == + m_aOrderbyAscending.size()); if (pDistinct && pDistinct->getTokenID() == SQL_TOKEN_DISTINCT ) { -// Sort on all columns, saving original order for later -if(IsSorted()) +// To eliminate duplicates we need to sort on all columns. +// This is not a problem because the SQL spec says that the +// order of columns that are not specified in ORDER BY +// clause is undefined, so it doesn't hurt to sort on +// these; pad the vectors to include them. +for (sal_Int32 i = 1; // 0: bookmark (see setBoundedColumns) + static_cast(i) < m_aColMapping.size(); ++i) { -aOrderbyColumnNumberSave = m_aOrderbyColumnNumber; -m_aOrderbyColumnNumber.clear(); - aOrderbyAscendingSave.assign(m_aOrderbyAscending.begin(), m_aOrderbyAscending.end()); -bWasSorted = sal_True; +if (::std::find(m_aOrderbyColumnNumber.begin(), +m_aOrderbyColumnNumber.end(), i) +== m_aOrderbyColumnNumber.end()) +{ +m_aOrderbyColumnNumber.push_back(i); +// ASC or DESC doesn't matter +m_aOrderbyAscending.push_back(SQL_ASC); +} } - -// the first column is the bookmark column -::std::vector::iterator aColStart = (m_aColMapping.begin()+1); -::std::copy(aColStart, m_aColMapping.end(),::std::back_inserter(m_aOrderbyColumnNumber)); -m_aOrderbyAscending.assign(m_aColMapping.size()-1, SQL_ASC); bDistinct = sal_True; } @@ -1542,23 +1545,6 @@ sal_Bool OResultSet::OpenImpl() m_pFileSet->get().erase(::std::remove_if(m_pFileSet->get().begin(),m_pFileSet->get().end(), ::std::bind2nd(::std::equal_to(),0)) ,m_pFileSet->get().end()); - -if (bWasSorted) -{ -// Re-sort on original requested order -m_aOrderbyColumnNumber = aOrderbyColumnNumberSave; - m_aOrderbyAscending.assign(aOrderbyAscendingSave.begin(), aOrderbyAscendingSave.end()); - -TIntVector aEvaluationKeySet(m_pFileSet->get()); -m_pEvaluationKeySet = &aEvaluationKeySet; -sortRows(); -} -else -{ -m_aOrderbyColumnNumber.clear(); -m_aOrderbyAscending.clear(); - ::std::sort(m_pFileSet->get().begin(),m_pFileSet->get().end()); -} } } } _
[Libreoffice-commits] .: Branch 'libreoffice-3-4' - connectivity/source
connectivity/source/drivers/mozab/mozillasrc/MLdapAttributeMap.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 0d7e8c41cfe5b93e52df03bd0c7420956a98814b Author: Julien Nabet Date: Sat Jan 7 17:48:13 2012 +0100 Fix fdo#44065 Signed-off-by: Andras Timar diff --git a/connectivity/source/drivers/mozab/mozillasrc/MLdapAttributeMap.cxx b/connectivity/source/drivers/mozab/mozillasrc/MLdapAttributeMap.cxx index 02f580a..5471d2f 100644 --- a/connectivity/source/drivers/mozab/mozillasrc/MLdapAttributeMap.cxx +++ b/connectivity/source/drivers/mozab/mozillasrc/MLdapAttributeMap.cxx @@ -120,7 +120,7 @@ namespace connectivity { namespace mozab { { "WebPage2", "homeurl", DEF_CARD_ACCESS( WebPage2 ) }, { "BirthYear", "birthyear", DEF_CARD_ACCESS( BirthYear ) }, { "BirthMonth", "birthmonth", DEF_CARD_ACCESS( BirthMonth ) }, -{ "BirthYear", "birthday", DEF_CARD_ACCESS( BirthDay ) }, +{ "BirthDay", "birthday", DEF_CARD_ACCESS( BirthDay ) }, { "Custom1","custom1", DEF_CARD_ACCESS( Custom1 ) }, { "Custom2","custom2", DEF_CARD_ACCESS( Custom2 ) }, { "Custom3","custom3", DEF_CARD_ACCESS( Custom3 ) }, ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-4' - connectivity/source
connectivity/source/drivers/evoab2/EApi.cxx |1 + 1 file changed, 1 insertion(+) New commits: commit 2c8ee27c52ff15fe1af33cd16a4dff28251ad521 Author: Rene Engelhard Date: Sun Dec 25 13:51:46 2011 +0100 support libebook-1.2.so.12 (evolution 3.2) diff --git a/connectivity/source/drivers/evoab2/EApi.cxx b/connectivity/source/drivers/evoab2/EApi.cxx index 1767ec1..95cdb55 100644 --- a/connectivity/source/drivers/evoab2/EApi.cxx +++ b/connectivity/source/drivers/evoab2/EApi.cxx @@ -35,6 +35,7 @@ #define DECLARE_FN_POINTERS 1 #include "EApi.h" static const char *eBookLibNames[] = { +"libebook-1.2.so.12", // bumped again "libebook-1.2.so.10", // bumped again "libebook-1.2.so.9", // evolution-2.8 "libebook-1.2.so.5", // evolution-2.4 and 2.6+ ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-4' - connectivity/source
connectivity/source/drivers/ado/Aservices.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit da6cd222d3c72b102cead739686fd5ca71a84861 Author: Lionel Elie Mamane Date: Tue Nov 22 14:25:10 2011 +0100 fdo#36555: pImplementationName is not a compile-time constant Signed-off-by: Caolán McNamara diff --git a/connectivity/source/drivers/ado/Aservices.cxx b/connectivity/source/drivers/ado/Aservices.cxx index 68600ba..69bd7c6 100644 --- a/connectivity/source/drivers/ado/Aservices.cxx +++ b/connectivity/source/drivers/ado/Aservices.cxx @@ -59,7 +59,7 @@ struct ProviderRequest sal_Char const* pImplementationName ) : xServiceManager(reinterpret_cast(pServiceManager)) -, sImplementationName(OUString(RTL_CONSTASCII_USTRINGPARAM(pImplementationName))) +, sImplementationName(OUString::createFromAscii(pImplementationName)) { } ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits