[Libreoffice-commits] core.git: Branch 'aoo/trunk' - connectivity/source xmerge/source
connectivity/source/drivers/dbase/DTable.cxx |2 +- xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/Worksheet.java |4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) New commits: commit 21e6a05a3614af73bf142e66f75e24d3d2579b34 Author: Matthias SeidelDate: Fri May 11 20:33:16 2018 + Fixed typos diff --git a/connectivity/source/drivers/dbase/DTable.cxx b/connectivity/source/drivers/dbase/DTable.cxx index 29563a668d5a..8a5e03335c70 100644 --- a/connectivity/source/drivers/dbase/DTable.cxx +++ b/connectivity/source/drivers/dbase/DTable.cxx @@ -2533,7 +2533,7 @@ String ODbaseTable::createTempFile() void ODbaseTable::copyData(ODbaseTable* _pNewTable,sal_Int32 _nPos) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "ocke.jans...@sun.com", "ODbaseTable::copyData" ); -sal_Int32 nPos = _nPos + 1; // +1 because we always have the bookmark clumn as well +sal_Int32 nPos = _nPos + 1; // +1 because we always have the bookmark column as well OValueRefRow aRow = new OValueRefVector(m_pColumns->getCount()); OValueRefRow aInsertRow; if(_nPos) diff --git a/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/Worksheet.java b/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/Worksheet.java index 0aa9b30e73d7..d0568e6ced11 100644 --- a/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/Worksheet.java +++ b/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/Worksheet.java @@ -219,7 +219,7 @@ public class Worksheet { } /** - * Adds a cell to this worksheet. Current valdid celltypes are + * Adds a cell to this worksheet. Current valid celltypes are * FloatNumber, LabelCell or Formula * * @param br @@ -230,7 +230,7 @@ public class Worksheet { /** * Adds a number of ColInfo Records to the worksheet base on a list of - * clumnwidths passed in + * columnwidths passed in * * @param rlist of column widths */ ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'aoo/trunk' - connectivity/source
connectivity/source/inc/odbc/OFunctions.hxx | 11 +-- 1 file changed, 1 insertion(+), 10 deletions(-) New commits: commit 72c9a57b915e080b4bd27800f30232624172b1c3 Author: Damjan JovanovicDate: Sun Nov 19 14:37:19 2017 + Fix an argument for SQLSetDescRec. Remove a duplicated and commented T3SQLNativeSql definition. Patch by: me diff --git a/connectivity/source/inc/odbc/OFunctions.hxx b/connectivity/source/inc/odbc/OFunctions.hxx index ac689c620b54..bddcc8d34698 100644 --- a/connectivity/source/inc/odbc/OFunctions.hxx +++ b/connectivity/source/inc/odbc/OFunctions.hxx @@ -192,7 +192,7 @@ namespace connectivity SQLSMALLINT RecNumber, SQLSMALLINT Type, SQLSMALLINT SubType, -SQLINTEGER Length, +SQLLEN Length, SQLSMALLINT Precision, SQLSMALLINT Scale, SQLPOINTER DataPtr, @@ -247,15 +247,6 @@ namespace connectivity #define N3SQLExecDirect(a,b,c) (*(T3SQLExecDirect)getOdbcFunction(ODBC3SQLExecDirect))(a,b,c) -/*typedef SQLRETURN (SQL_API *T3SQLNativeSql) ( SQLHDBC ConnectionHandle, -SQLCHAR * InStatementText, -SQLINTEGER TextLength1, -SQLCHAR * utStatementText, -SQLINTEGER BufferLength, -SQLINTEGER * TextLength2Ptr); - -#define N3SQLNativeSql(a,b,c,d,e,f) (*(T3SQLNativeSql)getOdbcFunction(ODBC3SQLNativeSql))(a,b,c,d,e,f)*/ - typedef SQLRETURN (SQL_API *T3SQLDescribeParam) (SQLHSTMT StatementHandle, SQLUSMALLINT ParameterNumber, SQLSMALLINT * DataTypePtr, ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'aoo/trunk' - connectivity/source
connectivity/source/drivers/odbcbase/OResultSet.cxx | 16 connectivity/source/drivers/odbcbase/OStatement.cxx | 20 ++-- connectivity/source/inc/odbc/OResultSet.hxx |2 +- 3 files changed, 19 insertions(+), 19 deletions(-) New commits: commit e2c1be67b8bf8513e58b80aed1ad7e9a2fe3d5e6 Author: Damjan JovanovicDate: Fri Nov 17 04:05:27 2017 + More ODBC64 fixes, for SQLGetStmtAttr() and SQLSetStmtAttr(). Patch by: me diff --git a/connectivity/source/drivers/odbcbase/OResultSet.cxx b/connectivity/source/drivers/odbcbase/OResultSet.cxx index 5747a0904d7a..273e96271e34 100644 --- a/connectivity/source/drivers/odbcbase/OResultSet.cxx +++ b/connectivity/source/drivers/odbcbase/OResultSet.cxx @@ -118,7 +118,7 @@ OResultSet::OResultSet(SQLHANDLE _pStatementHandle ,OStatement_Base* pStmt) : catch(Exception&) { // we don't want our result destroy here } -SQLINTEGER nCurType = 0; +SQLULEN nCurType = 0; try { N3SQLGetStmtAttr(m_aStatementHandle,SQL_ATTR_CURSOR_TYPE,,SQL_IS_UINTEGER,0); @@ -1263,7 +1263,7 @@ Sequence< sal_Int32 > SAL_CALL OResultSet::deleteRows( const Sequence< Any >& //-- sal_Int32 OResultSet::getResultSetConcurrency() const { -sal_uInt32 nValue = 0; +SQLULEN nValue = 0; SQLRETURN nReturn = N3SQLGetStmtAttr(m_aStatementHandle,SQL_ATTR_CONCURRENCY,,SQL_IS_UINTEGER,0); OSL_UNUSED( nReturn ); if(SQL_CONCUR_READ_ONLY == nValue) @@ -1276,7 +1276,7 @@ sal_Int32 OResultSet::getResultSetConcurrency() const //-- sal_Int32 OResultSet::getResultSetType() const { -sal_uInt32 nValue = 0; +SQLULEN nValue = 0; N3SQLGetStmtAttr(m_aStatementHandle,SQL_ATTR_CURSOR_SENSITIVITY,,SQL_IS_UINTEGER,0); if(SQL_SENSITIVE == nValue) nValue = ResultSetType::SCROLL_SENSITIVE; @@ -1284,7 +1284,7 @@ sal_Int32 OResultSet::getResultSetType() const nValue = ResultSetType::SCROLL_INSENSITIVE; else { -SQLINTEGER nCurType = 0; +SQLULEN nCurType = 0; N3SQLGetStmtAttr(m_aStatementHandle,SQL_ATTR_CURSOR_TYPE,,SQL_IS_UINTEGER,0); if(SQL_CURSOR_KEYSET_DRIVEN == nCurType) nValue = ResultSetType::SCROLL_SENSITIVE; @@ -1305,7 +1305,7 @@ sal_Int32 OResultSet::getFetchDirection() const //-- sal_Int32 OResultSet::getFetchSize() const { -sal_uInt32 nValue = 0; +SQLULEN nValue = 0; N3SQLGetStmtAttr(m_aStatementHandle,SQL_ATTR_ROW_ARRAY_SIZE,,SQL_IS_UINTEGER,0); return nValue; } @@ -1323,7 +1323,7 @@ sal_Bool OResultSet::isBookmarkable() const if(!m_aConnectionHandle) return sal_False; -sal_uInt32 nValue = 0; +SQLULEN nValue = 0; N3SQLGetStmtAttr(m_aStatementHandle,SQL_ATTR_CURSOR_TYPE,,SQL_IS_UINTEGER,0); sal_Int32 nAttr = 0; @@ -1674,10 +1674,10 @@ sal_Bool OResultSet::move(IResultSetHelper::Movement _eCursorPosition, sal_Int32 // - sal_Int32 OResultSet::getDriverPos() const { -sal_Int32 nValue = 0; +SQLULEN nValue = 0; SQLRETURN nRet = N3SQLGetStmtAttr(m_aStatementHandle,SQL_ATTR_ROW_NUMBER,,SQL_IS_UINTEGER,0); OSL_UNUSED( nRet ); -OSL_TRACE( __FILE__": OResultSet::getDriverPos() = Ret = %d, RowNum = %d, RowPos = %d",nRet,nValue , m_nRowPos); +OSL_TRACE( __FILE__": OResultSet::getDriverPos() = Ret = %d, RowNum = %lu, RowPos = %d",nRet,nValue , m_nRowPos); return nValue ? nValue : m_nRowPos; } // - diff --git a/connectivity/source/drivers/odbcbase/OStatement.cxx b/connectivity/source/drivers/odbcbase/OStatement.cxx index b1c0a3316d4a..8b47185b38b3 100644 --- a/connectivity/source/drivers/odbcbase/OStatement.cxx +++ b/connectivity/source/drivers/odbcbase/OStatement.cxx @@ -297,7 +297,7 @@ sal_Bool OStatement_Base::lockIfNecessary (const ::rtl::OUString& sql) throw( SQ OSL_ENSURE(m_aStatementHandle,"StatementHandle is null!"); try { -SQLINTEGER nLock = SQL_CONCUR_LOCK; +SQLUINTEGER nLock = SQL_CONCUR_LOCK; THROW_SQL(N3SQLSetStmtAttr(m_aStatementHandle, SQL_CONCURRENCY,(SQLPOINTER)nLock,SQL_IS_UINTEGER)); } catch (SQLWarning& warn) @@ -679,7 +679,7 @@ sal_Int32 OStatement_Base::getMaxRows() const sal_Int32 OStatement_Base::getResultSetConcurrency() const { OSL_ENSURE(m_aStatementHandle,"StatementHandle is null!"); -sal_uInt32 nValue; +SQLULEN nValue; SQLRETURN nRetCode = N3SQLGetStmtAttr(m_aStatementHandle,SQL_ATTR_CONCURRENCY,,SQL_IS_UINTEGER,0); OSL_UNUSED( nRetCode ); if(nValue ==
[Libreoffice-commits] core.git: Branch 'aoo/trunk' - connectivity/source
connectivity/source/drivers/flat/ETable.cxx | 26 +++--- connectivity/source/inc/flat/ETable.hxx |1 + 2 files changed, 16 insertions(+), 11 deletions(-) New commits: commit 50c64dc7b89da8f40c71e2ff6d3697a9b6b55442 Author: Damjan JovanovicDate: Sun Apr 3 15:02:59 2016 + #i122754# Base does not properly parse CSV files as per RFC-4180 (while Calc does) The flat file driver, in file main/connectivity/source/drivers/flat/ETable.cxx, method OFlatTable::fillColumns(), which reads lines to initialize columns, assumes fields in the header and the first few lines never continue onto the next line(s). This causes truncation of columns when they do. Read all lines using the readLine() method instead of SvStream::ReadByteStringLine(), which takes overflow onto next lines into account. Also implement a new version of readLine() which allows reading into an arbitrary string, as opposed to m_aCurrentLine only. Patch by: me diff --git a/connectivity/source/drivers/flat/ETable.cxx b/connectivity/source/drivers/flat/ETable.cxx index 47f5c52..1620b64 100644 --- a/connectivity/source/drivers/flat/ETable.cxx +++ b/connectivity/source/drivers/flat/ETable.cxx @@ -72,26 +72,26 @@ void OFlatTable::fillColumns(const ::com::sun::star::lang::Locale& _aLocale) QuotedTokenizedString aHeaderLine; OFlatConnection* pConnection = (OFlatConnection*)m_pConnection; -const rtl_TextEncoding nEncoding = m_pConnection->getTextEncoding(); const sal_Bool bHasHeaderLine = pConnection->isHeaderLine(); +sal_Int32 nCurPos; if ( bHasHeaderLine ) { while(bRead && !aHeaderLine.Len()) { -bRead = m_pFileStream->ReadByteStringLine(aHeaderLine,nEncoding); +bRead = readLine(aHeaderLine, nCurPos); } m_nStartRowFilePos = m_pFileStream->Tell(); } // read first row QuotedTokenizedString aFirstLine; -bRead = m_pFileStream->ReadByteStringLine(aFirstLine,nEncoding); +bRead = readLine(aFirstLine, nCurPos); if ( !bHasHeaderLine || !aHeaderLine.Len()) { while(bRead && !aFirstLine.Len()) { -bRead = m_pFileStream->ReadByteStringLine(aFirstLine,nEncoding); +bRead = readLine(aFirstLine, nCurPos); } // use first row as headerline because we need the number of columns aHeaderLine = aFirstLine; @@ -155,7 +155,7 @@ void OFlatTable::fillColumns(const ::com::sun::star::lang::Locale& _aLocale) } ++nRowCount; } -while(nRowCount < nMaxRowsToScan && m_pFileStream->ReadByteStringLine(aFirstLine,nEncoding) && !m_pFileStream->IsEof()); +while(nRowCount < nMaxRowsToScan && readLine(aFirstLine,nCurPos) && !m_pFileStream->IsEof()); for (xub_StrLen i = 0; i < nFieldCount; i++) { @@ -895,21 +895,26 @@ sal_Bool OFlatTable::seekRow(IResultSetHelper::Movement eCursorPosition, sal_Int // - sal_Bool OFlatTable::readLine(sal_Int32& _rnCurrentPos) { +return readLine(m_aCurrentLine, _rnCurrentPos); +} +// - +sal_Bool OFlatTable::readLine(QuotedTokenizedString& line, sal_Int32& _rnCurrentPos) +{ RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "flat", "ocke.jans...@sun.com", "OFlatTable::readLine" ); const rtl_TextEncoding nEncoding = m_pConnection->getTextEncoding(); -m_pFileStream->ReadByteStringLine(m_aCurrentLine,nEncoding); +m_pFileStream->ReadByteStringLine(line,nEncoding); if (m_pFileStream->IsEof()) return sal_False; -QuotedTokenizedString sLine = m_aCurrentLine; // check if the string continues on next line +QuotedTokenizedString sLine = line; // check if the string continues on next line while( (sLine.GetString().GetTokenCount(m_cStringDelimiter) % 2) != 1 ) { m_pFileStream->ReadByteStringLine(sLine,nEncoding); if ( !m_pFileStream->IsEof() ) { -m_aCurrentLine.GetString().Append('\n'); -m_aCurrentLine.GetString() += sLine.GetString(); -sLine = m_aCurrentLine; +line.GetString().Append('\n'); +line.GetString() += sLine.GetString(); +sLine = line; } else break; @@ -917,4 +922,3 @@ sal_Bool OFlatTable::readLine(sal_Int32& _rnCurrentPos) _rnCurrentPos = m_pFileStream->Tell(); return sal_True; } - diff --git a/connectivity/source/inc/flat/ETable.hxx b/connectivity/source/inc/flat/ETable.hxx index 0042e2e..b9f2304 100644 --- a/connectivity/source/inc/flat/ETable.hxx +++ b/connectivity/source/inc/flat/ETable.hxx @@ -64,6 +64,7 @@ namespace connectivity void fillColumns(const ::com::sun::star::lang::Locale& _aLocale); sal_Bool CreateFile(const INetURLObject&
[Libreoffice-commits] core.git: Branch 'aoo/trunk' - connectivity/source solenv/inc
connectivity/source/drivers/dbase/makefile.mk |4 +++- solenv/inc/tg_compv.mk|4 2 files changed, 7 insertions(+), 1 deletion(-) New commits: commit d0b7d2a311e6e5efe71462e1a2bda845897d58d5 Author: Pedro Giffuni p...@apache.org Date: Fri Aug 7 15:14:25 2015 + FreeBSD: Work around clang-3.4 issues. It is well known that clang-3.4 doesn't build all AOO correctly. Workaround the issue for FreeBSD 10 which ships with clang-3.4. The workaround may still be needed for other clang based platforms. Submitted by: Don Lewis diff --git a/connectivity/source/drivers/dbase/makefile.mk b/connectivity/source/drivers/dbase/makefile.mk index 5d5fbfac..62247f7 100644 --- a/connectivity/source/drivers/dbase/makefile.mk +++ b/connectivity/source/drivers/dbase/makefile.mk @@ -76,7 +76,9 @@ EXCEPTIONSFILES=\ $(SLO)$/DDriver.obj # [kh] ppc linux gcc compiler problem -.IF $(OS)$(COM)$(CPUNAME)==LINUXGCCPOWERPC +# [Don Lewis] clang 3.4 -O2 on amd64 tries to use R_X86_64_PC32 relocation with +# symbol _ZThn192_N12connectivity4file10OFileTable7acquireEvj +.IF $(OS)$(COM)$(CPUNAME)==LINUXGCCPOWERPC || ($(OS)$(COM)$(CPUNAME)==FREEBSDCLANGX86_64 $(CCNUMVER)=00030004 $(CCNUMVER)00030005) EXCEPTIONSNOOPTFILES= \ $(SLO)$/DTable.obj .ELSE diff --git a/solenv/inc/tg_compv.mk b/solenv/inc/tg_compv.mk index e1295e6..bd0d73a 100644 --- a/solenv/inc/tg_compv.mk +++ b/solenv/inc/tg_compv.mk @@ -38,7 +38,11 @@ CFLAGSNUMVERSION_CMD=-dumpversion $(PIPEERROR) $(AWK) -v num=true -f $(SOLARENV) .ELIF $(COM)==CLANG CFLAGSVERSION=--version CFLAGSVERSION_CMD=--version | head -n1 | sed -es/.*version // -es/ .*// +.IF $(OS)=FREEBSD +CFLAGSNUMVERSION_CMD=${CFLAGSVERSION_CMD} | $(AWK) -v num=true -f $(SOLARENV)/bin/getcompver.awk +.ELSE CFLAGSNUMVERSION_CMD=${CFLAGSVERSION_CMD} | sed -es/\.// +.ENDIF .ELIF $(COM)==MSC CFLAGSVERSION= CFLAGSVERSION_CMD= $(PIPEERROR) $(AWK) -f $(SOLARENV)/bin/getcompver.awk ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits