[Libreoffice-commits] core.git: Branch 'libreoffice-5-4' - connectivity/source
connectivity/source/commontools/DateConversion.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 4bb50524e385803fddc5047466fcf7ce19e1 Author: Lionel Elie Mamane Date: Sun Apr 8 08:26:55 2018 +0200 SQL string quoting: escape "'" character also at beginning of string Change-Id: I51db43c1a3b6d3c93a04a3419238ea286cab987e Reviewed-on: https://gerrit.libreoffice.org/52578 Tested-by: Jenkins Reviewed-by: Christian Lohmaier diff --git a/connectivity/source/commontools/DateConversion.cxx b/connectivity/source/commontools/DateConversion.cxx index 435a0cc21d19..4527fa6b4493 100644 --- a/connectivity/source/commontools/DateConversion.cxx +++ b/connectivity/source/commontools/DateConversion.cxx @@ -81,7 +81,7 @@ OUString DBTypeConversion::toSQLString(sal_Int32 eType, const Any& _rVal, bool b { OUString aTemp; _rxTypeConverter->convertToSimpleType(_rVal, TypeClass_STRING) >>= aTemp; -sal_Int32 nIndex = (sal_Int32)-1; +sal_Int32 nIndex = (sal_Int32)-2; const OUString sQuot("\'"); do { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-5-4' - connectivity/source offapi/com sc/source
connectivity/source/drivers/file/FConnection.cxx | 24 ++-- offapi/com/sun/star/sdbc/FILEConnectionProperties.idl |4 ++ sc/source/ui/docshell/docsh8.cxx | 27 +++--- 3 files changed, 25 insertions(+), 30 deletions(-) New commits: commit 8d96cdf9ac8dedd54620d31bafbccc76d75d7757 Author: Stephan Bergmann Date: Mon Mar 5 13:56:59 2018 +0100 tdf#116171: Tunnel arbitrary rtl_TextEncoding from sc to sdbc:dbase connection ...including those that have no corresponding textual IANA character set name representation, like RTL_TEXTENCODING_MS_950 which is apparently used in some DBase files. In the past, if eCharSet was RTL_TEXTENCODING_DONTKNOW in lcl_getDBaseConnection it was sent as an empty string CharSet property, which the receiving OConnection::construct translated back to else m_nTextEncoding = RTL_TEXTENCODING_DONTKNOW; so the net effect remains the same for that special case. Reviewed-on: https://gerrit.libreoffice.org/50772 Reviewed-by: Lionel Elie Mamane Tested-by: Jenkins (cherry picked from commit 5ad62544bce42396faaae2bc79c7517af6ff085b) Conflicts: sc/source/ui/docshell/docsh8.cxx Change-Id: I84eec8a93d000752b3c429976c58721ea9ea32a4 Reviewed-on: https://gerrit.libreoffice.org/50791 Tested-by: Jenkins Reviewed-by: Eike Rathke diff --git a/connectivity/source/drivers/file/FConnection.cxx b/connectivity/source/drivers/file/FConnection.cxx index 27d2b2d9ee03..64017737140f 100644 --- a/connectivity/source/drivers/file/FConnection.cxx +++ b/connectivity/source/drivers/file/FConnection.cxx @@ -38,6 +38,7 @@ #include #include #include +#include #include #include #include "resource/file_res.hrc" @@ -106,15 +107,22 @@ void OConnection::construct(const OUString& url,const Sequence< PropertyValue >& OSL_VERIFY( pIter->Value >>= aExt ); else if( pIter->Name == "CharSet" ) { -OUString sIanaName; -OSL_VERIFY( pIter->Value >>= sIanaName ); - -::dbtools::OCharsetMap aLookupIanaName; -::dbtools::OCharsetMap::const_iterator aLookup = aLookupIanaName.find(sIanaName, ::dbtools::OCharsetMap::IANA()); -if (aLookup != aLookupIanaName.end()) -m_nTextEncoding = (*aLookup).getEncoding(); +if (auto const numeric = o3tl::tryAccess(pIter->Value)) +{ +m_nTextEncoding = *numeric; +} else -m_nTextEncoding = RTL_TEXTENCODING_DONTKNOW; +{ +OUString sIanaName; +OSL_VERIFY( pIter->Value >>= sIanaName ); + +::dbtools::OCharsetMap aLookupIanaName; +::dbtools::OCharsetMap::const_iterator aLookup = aLookupIanaName.find(sIanaName, ::dbtools::OCharsetMap::IANA()); +if (aLookup != aLookupIanaName.end()) +m_nTextEncoding = (*aLookup).getEncoding(); +else +m_nTextEncoding = RTL_TEXTENCODING_DONTKNOW; +} } else if( pIter->Name == "ShowDeleted" ) { diff --git a/offapi/com/sun/star/sdbc/FILEConnectionProperties.idl b/offapi/com/sun/star/sdbc/FILEConnectionProperties.idl index 1e1f36efc8e1..43c6d4c74740 100644 --- a/offapi/com/sun/star/sdbc/FILEConnectionProperties.idl +++ b/offapi/com/sun/star/sdbc/FILEConnectionProperties.idl @@ -45,6 +45,10 @@ service FILEConnectionProperties See the http://www.iana.org/assignments/character-sets";>IANA character set list for a list of valid values. + +For internal purposes (e.g., when using an encoding for which no IANA character set name +exists), this may also be an UNSIGNED SHORT value representing one of the rtl_TextEncoding +values in rtl/textenc.h. */ [optional, property] string CharSet; }; diff --git a/sc/source/ui/docshell/docsh8.cxx b/sc/source/ui/docshell/docsh8.cxx index a021745855d9..73f8bfffe2ac 100644 --- a/sc/source/ui/docshell/docsh8.cxx +++ b/sc/source/ui/docshell/docsh8.cxx @@ -29,10 +29,6 @@ #include #include -#if HAVE_FEATURE_DBCONNECTIVITY -#include -#endif - #include #include #include @@ -123,28 +119,15 @@ namespace OUString aConnUrl("sdbc:dbase:"); aConnUrl += aPath; -::std::vector< rtl_TextEncoding > aEncodings; -svxform::charset_helper::getSupportedTextEncodings( aEncodings ); -::std::vector< rtl_TextEncoding >::iterator aIter = ::std::find(aEncodings.begin(),aEncodings.end(), eCharSet); -if ( aIter == aEncodings.end() ) -{ -OSL_FAIL( "DBaseImport: dbtools::OCharsetMap doesn't know text encoding" ); -return SCERR_IMPORT_CONNECT; -} // if ( aIter == aMap.end() ) -OUString aCharSetStr; -if ( RTL_TEXTENCODING_DONTKNOW != *aIter ) -
[Libreoffice-commits] core.git: Branch 'libreoffice-5-4' - connectivity/source
connectivity/source/drivers/odbc/OResultSet.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 1cb3e8f328dafffbe2449043894526f8d79405fb Author: Julien Nabet Date: Sat Jan 6 21:20:02 2018 +0100 tdf#114495 ODBC: clear row status buffer *before* we throw away the statement Change-Id: I898e9d0e3e2cf1ed41489231d1cd761171bfcea4 Reviewed-on: https://gerrit.libreoffice.org/47514 Reviewed-by: Lionel Elie Mamane Tested-by: Lionel Elie Mamane Reviewed-on: https://gerrit.libreoffice.org/47526 Tested-by: Jenkins Tested-by: Xisco Faulà diff --git a/connectivity/source/drivers/odbc/OResultSet.cxx b/connectivity/source/drivers/odbc/OResultSet.cxx index 8f1853a7623e..cb8c2c79531f 100644 --- a/connectivity/source/drivers/odbc/OResultSet.cxx +++ b/connectivity/source/drivers/odbc/OResultSet.cxx @@ -165,7 +165,6 @@ OResultSet::OResultSet(SQLHANDLE _pStatementHandle ,OStatement_Base* pStmt) : OResultSet::~OResultSet() { -setStmtOption(SQL_ATTR_ROW_STATUS_PTR, nullptr); delete [] m_pRowStatusArray; delete m_pSkipDeletedSet; } @@ -185,6 +184,7 @@ void OResultSet::disposing() ::osl::MutexGuard aGuard(m_aMutex); releaseBuffer(); +setStmtOption(SQL_ATTR_ROW_STATUS_PTR, nullptr); m_xStatement.clear(); m_xMetaData.clear(); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-5-4' - connectivity/source
connectivity/source/drivers/odbc/OResultSet.cxx |1 + 1 file changed, 1 insertion(+) New commits: commit 01ba3b43c16e2570022f20dbdf958a091a1fef0b Author: Julien Nabet Date: Sat Oct 7 22:58:34 2017 +0200 tdf#112947: fix write to free'd memory (odbc) suggested by Nick Gorham Change-Id: I3579caf5192df6e460dea3a5b3728196d75a65f4 Reviewed-on: https://gerrit.libreoffice.org/43234 Tested-by: Jenkins Reviewed-by: Julien Nabet Reviewed-on: https://gerrit.libreoffice.org/43236 Reviewed-by: Lionel Elie Mamane Tested-by: Julien Nabet diff --git a/connectivity/source/drivers/odbc/OResultSet.cxx b/connectivity/source/drivers/odbc/OResultSet.cxx index f7e2b978114a..8f1853a7623e 100644 --- a/connectivity/source/drivers/odbc/OResultSet.cxx +++ b/connectivity/source/drivers/odbc/OResultSet.cxx @@ -165,6 +165,7 @@ OResultSet::OResultSet(SQLHANDLE _pStatementHandle ,OStatement_Base* pStmt) : OResultSet::~OResultSet() { +setStmtOption(SQL_ATTR_ROW_STATUS_PTR, nullptr); delete [] m_pRowStatusArray; delete m_pSkipDeletedSet; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-5-4' - connectivity/source
connectivity/source/drivers/macab/MacabRecord.cxx |1 + connectivity/source/drivers/macab/MacabRecords.cxx |2 ++ 2 files changed, 3 insertions(+) New commits: commit 0d9db27cb03e393397f292b9e09b4ac515a4b883 Author: Julien Nabet Date: Thu Aug 17 23:07:35 2017 +0200 Related tdf#111634: Multiple memory leaks in libmacabdrv1 (part3) Hope it'll fix leak from https://bugs.documentfoundation.org/show_bug.cgi?id=111634#c13 Change-Id: I61a51faf291145c8cafd03339b7bcc7b23072fba Reviewed-on: https://gerrit.libreoffice.org/41268 Reviewed-by: Julien Nabet Tested-by: Julien Nabet (cherry picked from commit 27b1e21913d8119ea27be05954156d15ca069e66) Reviewed-on: https://gerrit.libreoffice.org/41269 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/connectivity/source/drivers/macab/MacabRecord.cxx b/connectivity/source/drivers/macab/MacabRecord.cxx index d2195a823379..942f5930035b 100644 --- a/connectivity/source/drivers/macab/MacabRecord.cxx +++ b/connectivity/source/drivers/macab/MacabRecord.cxx @@ -54,6 +54,7 @@ MacabRecord::~MacabRecord() { if(size > 0) { +releaseFields(); int i; for(i = 0; i < size; i++) { diff --git a/connectivity/source/drivers/macab/MacabRecords.cxx b/connectivity/source/drivers/macab/MacabRecords.cxx index ccc4dc3e8f6e..958fdd87c901 100644 --- a/connectivity/source/drivers/macab/MacabRecords.cxx +++ b/connectivity/source/drivers/macab/MacabRecords.cxx @@ -188,6 +188,8 @@ void MacabRecords::initialize() MacabRecords::~MacabRecords() { +delete [] lcl_CFTypes; +delete [] requiredProperties; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-5-4' - connectivity/source
connectivity/source/commontools/dbconversion.cxx | 32 --- 1 file changed, 28 insertions(+), 4 deletions(-) New commits: commit de8c0152157bb32a6df9b6d4ac4102aef8e8a384 Author: Lionel Elie Mamane Date: Wed Aug 2 15:27:57 2017 +0200 tdf#110997 protect calls to implBuildFromRelative from year overflow Change-Id: I5c6768766673832b7271292af85db1b76e51042c Reviewed-on: https://gerrit.libreoffice.org/40683 Tested-by: Jenkins Reviewed-by: Michael Stahl diff --git a/connectivity/source/commontools/dbconversion.cxx b/connectivity/source/commontools/dbconversion.cxx index 5be258a7e698..9baca9bebb80 100644 --- a/connectivity/source/commontools/dbconversion.cxx +++ b/connectivity/source/commontools/dbconversion.cxx @@ -42,6 +42,16 @@ namespace const sal_Int64 hourMask = 10LL; const double fNanoSecondsPerDay = nanoSecInSec * secInMin * minInHour * 24.0; + +// 32767-12-31 in "(days since 0001-01-01) + 1" format +const sal_Int32 maxDays = 11967896; +// -32768-01-01 in "(days since 0001-01-01) + 1" format +// Yes, I know it is currently unused. Will have to be used +// when we implement negative years. Writing down the correct +// value for future reference. +// *** Please don't remove just because it is unused *** +// Lionel Ãlie Mamane 2017-08-02 +// const sal_Int32 minDays = -11968270; } @@ -269,8 +279,15 @@ namespace dbtools sal_Int32 nTempDays = implRelativeToAbsoluteNull( _rDate ); nTempDays += nDays; -// TODO: can we remove that check? Would allow dates before 1900. -if ( nTempDays <= 0 ) +if ( nTempDays > maxDays ) +{ +_rDate.Day = 31; +_rDate.Month= 12; +_rDate.Year = ; +} +// TODO: can we replace that check by minDays? Would allow dates BCE +// implBuildFromRelative probably needs to be updated for the "no year 0" question +else if ( nTempDays <= 0 ) { _rDate.Day = 1; _rDate.Month= 1; @@ -285,8 +302,15 @@ namespace dbtools sal_Int32 nTempDays = implRelativeToAbsoluteNull( _rDate ); nTempDays -= nDays; -// TODO: can we remove that check? Would allow dates before 1900. -if ( nTempDays <= 0 ) +if ( nTempDays > maxDays ) +{ +_rDate.Day = 31; +_rDate.Month= 12; +_rDate.Year = ; +} +// TODO: can we replace that check by minDays? Would allow dates BCE +// implBuildFromRelative probably needs to be updated for the "no year 0" question +else if ( nTempDays <= 0 ) { _rDate.Day = 1; _rDate.Month= 1; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-5-4' - connectivity/source
connectivity/source/drivers/evoab2/EApi.cxx |1 + 1 file changed, 1 insertion(+) New commits: commit 6592b505576a7daab4eb204f67f078f0465aef6c Author: Rico Tzschichholz Date: Mon Jul 24 11:24:48 2017 +0200 add libebook-1.2.so.19 in EApi.cxx Change-Id: I900a190948087360bb4c3cd9235c9848333ad66f Reviewed-on: https://gerrit.libreoffice.org/40359 Tested-by: Jenkins Reviewed-by: Michael Stahl diff --git a/connectivity/source/drivers/evoab2/EApi.cxx b/connectivity/source/drivers/evoab2/EApi.cxx index fc81a1944769..81db0b0d83df 100644 --- a/connectivity/source/drivers/evoab2/EApi.cxx +++ b/connectivity/source/drivers/evoab2/EApi.cxx @@ -21,6 +21,7 @@ #define DECLARE_FN_POINTERS 1 #include "EApi.h" static const char *eBookLibNames[] = { +"libebook-1.2.so.19", // evolution-data-server 3.24+ "libebook-1.2.so.16", "libebook-1.2.so.15", "libebook-1.2.so.14", // bumped again (evolution-3.6) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-5-4' - connectivity/source include/connectivity sc/CppunitTest_sc_ucalc.mk sc/Library_sc.mk sc/source
connectivity/source/commontools/dbtools.cxx | 83 + connectivity/source/drivers/dbase/DTable.cxx | 43 - include/connectivity/dbtools.hxx | 47 + sc/CppunitTest_sc_ucalc.mk |1 sc/Library_sc.mk |1 sc/source/ui/docshell/docsh8.cxx |4 sc/source/ui/unoobj/filtuno.cxx | 128 ++- 7 files changed, 221 insertions(+), 86 deletions(-) New commits: commit 6e0eafe576436ec229c6d90f654ff1b11ff9bdfd Author: Lionel Elie Mamane Date: Sun Jun 25 17:21:45 2017 +0200 tdf#108789: branch 5.4 only - Calc: make the complete "what encoding to use" decision before calling the connectivity driver, so that the driver has no ambiguity about whether it should override our setting or not. To this end, factorise the part of the driver that reads the encoding from the file header into dbtools. - Calc: don't ask for encoding when the file's header give the encoding. - don't confuse CP850 (the default) and "don't know", including: * don't ignore CP850 user setting * don't overwrite user setting with CP850 Cherry-pick: - https://cgit.freedesktop.org/libreoffice/core/commit/?id=7f1465a9599e9665159dd2d823a6e9064cca5703 - https://cgit.freedesktop.org/libreoffice/core/commit/?id=857d64ed3ebbeb0ee4e8a75bfeaa4eb406944571 - https://cgit.freedesktop.org/libreoffice/core/commit/?id=9170d10cc57c3f0f3e82b27ce4b2cd9c897e669d Change-Id: Id80b7c505858b88f717b0ce6bd890527909e5fd1 Reviewed-on: https://gerrit.libreoffice.org/39451 Reviewed-by: Lionel Elie Mamane Tested-by: Jenkins diff --git a/connectivity/source/commontools/dbtools.cxx b/connectivity/source/commontools/dbtools.cxx index 1b17eb112d49..d458c1509722 100644 --- a/connectivity/source/commontools/dbtools.cxx +++ b/connectivity/source/commontools/dbtools.cxx @@ -2035,6 +2035,89 @@ OSQLColumns::Vector::const_iterator find(OSQLColumns::Vector::const_iterator fir ++first; return first; } + +namespace dbase +{ +bool dbfDecodeCharset(rtl_TextEncoding &_out_encoding, sal_uInt8 nType, sal_uInt8 nCodepage) +{ +switch (nType) +{ +case dBaseIII: +case dBaseIV: +case dBaseV: +case VisualFoxPro: +case VisualFoxProAuto: +case dBaseFS: +case dBaseFSMemo: +case dBaseIVMemoSQL: +case dBaseIIIMemo: +case FoxProMemo: +{ +if (nCodepage != 0x00) +{ +auto eEncoding(RTL_TEXTENCODING_DONTKNOW); +switch(nCodepage) +{ +case 0x01: eEncoding = RTL_TEXTENCODING_IBM_437; break; // DOS USA code page 437 +case 0x02: eEncoding = RTL_TEXTENCODING_IBM_850; break; // DOS Multilingual code page 850 +case 0x03: eEncoding = RTL_TEXTENCODING_MS_1252; break; // Windows ANSI code page 1252 +case 0x04: eEncoding = RTL_TEXTENCODING_APPLE_ROMAN; break; // Standard Macintosh +case 0x64: eEncoding = RTL_TEXTENCODING_IBM_852; break; // EE MS-DOScode page 852 +case 0x65: eEncoding = RTL_TEXTENCODING_IBM_866; break; // Russian MS-DOS code page 866 +case 0x66: eEncoding = RTL_TEXTENCODING_IBM_865; break; // Nordic MS-DOScode page 865 +case 0x67: eEncoding = RTL_TEXTENCODING_IBM_861; break; // Icelandic MS-DOS +//case 0x68: eEncoding = ; break; // Kamenicky (Czech) MS-DOS +//case 0x69: eEncoding = ; break; // Mazovia (Polish) MS-DOS +case 0x6A: eEncoding = RTL_TEXTENCODING_IBM_737; break; // Greek MS-DOS (437G) +case 0x6B: eEncoding = RTL_TEXTENCODING_IBM_857; break; // Turkish MS-DOS +case 0x6C: eEncoding = RTL_TEXTENCODING_IBM_863; break; // MS-DOS, Canada +case 0x78: eEncoding = RTL_TEXTENCODING_MS_950; break; // Windows, Traditional Chinese +case 0x79: eEncoding = RTL_TEXTENCODING_MS_949; break; // Windows, Korean (Hangul) +case 0x7A: eEncoding = RTL_TEXTENCODING_MS_936; break; // Windows, Simplified Chinese +case 0x7B: eEncoding = RTL_TEXTENCODING_MS_932; break; // Windows, Japanese (Shift-jis) +case 0x7C: eEncoding = RTL_TEXTENCODING_MS_874; break; // Windows, Thai +case 0x7D: eEncoding = RTL_TEXTENCODING_MS_1255; break; // Windows, Hebrew +case 0x7E: eEncoding = RTL_TEXTENCODING_MS_1256; break; // Windows, Arabic +case 0x96: eEncoding = RTL_TEXTENCODING_APPLE_CYRILLIC; break; // Russian Macintosh +case 0x97: eEncoding = R
[Libreoffice-commits] core.git: Branch 'libreoffice-5-4' - connectivity/source
connectivity/source/drivers/dbase/DTable.cxx |5 + 1 file changed, 5 insertions(+) New commits: commit 7bb142d830b86d7d2b84ede2f236312e76956175 Author: Julien Nabet Date: Sun Jun 11 09:34:47 2017 +0200 tdf#55631: DBASE import (take 2) if we can't read head db_frei part, let's also put by default m_eEncoding = RTL_TEXTENCODING_IBM_850; Change-Id: I97601ba4c782dcfc280e975cc4498ea68407dd48 Reviewed-on: https://gerrit.libreoffice.org/38659 Tested-by: Jenkins Reviewed-by: Muthu Subramanian K (cherry picked from commit 58bb9da339d61981d45cde8e38a2ce1ae33652c4) Reviewed-on: https://gerrit.libreoffice.org/38706 Reviewed-by: Julien Nabet diff --git a/connectivity/source/drivers/dbase/DTable.cxx b/connectivity/source/drivers/dbase/DTable.cxx index 06c8d05d8823..12e7b1aa7647 100644 --- a/connectivity/source/drivers/dbase/DTable.cxx +++ b/connectivity/source/drivers/dbase/DTable.cxx @@ -283,6 +283,11 @@ void ODbaseTable::readHeader() break; } } +else +{ +// Default Encoding +m_eEncoding = RTL_TEXTENCODING_IBM_850; +} break; case dBaseIVMemo: m_pFileStream->SetEndian(SvStreamEndian::LITTLE); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-5-4' - connectivity/source
connectivity/source/drivers/dbase/DTable.cxx |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit 6b978332b603f1dd4ded536d4ab3150a95e2e8a3 Author: Julien Nabet Date: Sat Jun 10 00:20:18 2017 +0200 DBase, encodings mixed See https://bz.apache.org/ooo/show_bug.cgi?id=18728#c7 101 - 866 MS-DOS, Russian 102 - 865 MS-DOS, Nordic taken as reference by Muthu Subramanian who also added some other encodings with https://cgit.freedesktop.org/libreoffice/core/commit/?id=b00c4ec0967f8712d721b31ccb2dd0778c9e973b Also https://msdn.microsoft.com/en-us/library/aa975345%28v=vs.71%29.aspx 865 Nordic MS-DOS x66 866 Russian MS-DOS x65 Change-Id: Iea494bed07d8050fd60e24ffea153ce911c27c8c Reviewed-on: https://gerrit.libreoffice.org/38618 Tested-by: Jenkins Reviewed-by: Julien Nabet (cherry picked from commit 8ab2c4b6807bbdabd2cf72a93e0168220bea79d6) Reviewed-on: https://gerrit.libreoffice.org/38630 diff --git a/connectivity/source/drivers/dbase/DTable.cxx b/connectivity/source/drivers/dbase/DTable.cxx index d1b8960f79da..06c8d05d8823 100644 --- a/connectivity/source/drivers/dbase/DTable.cxx +++ b/connectivity/source/drivers/dbase/DTable.cxx @@ -254,8 +254,8 @@ void ODbaseTable::readHeader() case 0x03: m_eEncoding = RTL_TEXTENCODING_MS_1252; break; // Windows ANSI code page 1252 case 0x04: m_eEncoding = RTL_TEXTENCODING_APPLE_ROMAN; break; // Standard Macintosh case 0x64: m_eEncoding = RTL_TEXTENCODING_IBM_852; break; // EE MS-DOScode page 852 -case 0x65: m_eEncoding = RTL_TEXTENCODING_IBM_865; break; // Nordic MS-DOScode page 865 -case 0x66: m_eEncoding = RTL_TEXTENCODING_IBM_866; break; // Russian MS-DOS code page 866 +case 0x65: m_eEncoding = RTL_TEXTENCODING_IBM_866; break; // Russian MS-DOS code page 866 +case 0x66: m_eEncoding = RTL_TEXTENCODING_IBM_865; break; // Nordic MS-DOScode page 865 case 0x67: m_eEncoding = RTL_TEXTENCODING_IBM_861; break; // Icelandic MS-DOS //case 0x68: m_eEncoding = ; break; // Kamenicky (Czech) MS-DOS //case 0x69: m_eEncoding = ; break; // Mazovia (Polish) MS-DOS ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-5-4' - connectivity/source
connectivity/source/drivers/firebird/Table.cxx | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) New commits: commit c5ea8e46626affeee5465330554e4864947b163b Author: Julien Nabet Date: Thu May 25 10:14:30 2017 +0200 Related tdf#108068: Use new name of column when it's been changed First fix simple case, the rename of a column which is not a primary key Change-Id: Ia0de8e531021cbec0409408008c541c25a4bcd85 Reviewed-on: https://gerrit.libreoffice.org/38014 Tested-by: Jenkins (cherry picked from commit c751318868f3f0082b2c86df493216d452b8ecc5) Reviewed-on: https://gerrit.libreoffice.org/38022 Reviewed-by: Julien Nabet Tested-by: Julien Nabet diff --git a/connectivity/source/drivers/firebird/Table.cxx b/connectivity/source/drivers/firebird/Table.cxx index 7f71d1ebfbac..eefcc9698e99 100644 --- a/connectivity/source/drivers/firebird/Table.cxx +++ b/connectivity/source/drivers/firebird/Table.cxx @@ -132,17 +132,6 @@ void SAL_CALL Table::alterColumnByName(const OUString& rColName, bool bDefaultChanged = xColumn->getPropertyValue("DefaultValue") != rDescriptor->getPropertyValue("DefaultValue"); -// TODO: quote identifiers as needed. -if (bNameChanged) -{ -OUString sNewTableName; -rDescriptor->getPropertyValue("Name") >>= sNewTableName; -OUString sSql(getAlterTableColumn(rColName) -+ " TO \"" + sNewTableName + "\""); - -getConnection()->createStatement()->execute(sSql); -} - if (bTypeChanged || bTypeNameChanged || bPrecisionChanged || bScaleChanged) { // If bPrecisionChanged this will only succeed if we have increased the @@ -216,6 +205,17 @@ void SAL_CALL Table::alterColumnByName(const OUString& rColName, getConnection()->createStatement()->execute(sSql); } +// TODO: quote identifiers as needed. +if (bNameChanged) +{ +OUString sNewTableName; +rDescriptor->getPropertyValue("Name") >>= sNewTableName; +OUString sSql(getAlterTableColumn(rColName) ++ " TO \"" + sNewTableName + "\""); + +getConnection()->createStatement()->execute(sSql); +} + m_pColumns->refresh(); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits