diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2017-06-10 01:22:58 +0200 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2017-06-10 08:15:33 +0200 |
commit | 9fe9685627c51926459a897594ead9f64deee579 (patch) | |
tree | b897c0104b65125a2ca26fe2507dd43367b72919 | |
parent | a680f6988482f13489d6c802b6078d43564ae934 (diff) |
tdf#55631: DBASE import with CP850 encoding
Don't consider RTL_TEXTENCODING_IBM_850 as RTL_TEXTENCODING_DONTKNOW
partially reverts https://cgit.freedesktop.org/libreoffice/core/commit/?id=b00c4ec0967f8712d721b31ccb2dd0778c9e973b)
Indeed DBaseImport method is only called from ScDocShell::ConvertFrom (sc/source/ui/docshell/docsh.cxx)
it calls it with "ScGlobal::GetCharsetValue(sItStr)"
sItStr is initialized with these lines:
1272 if ( pSet && SfxItemState::SET ==
1273 pSet->GetItemState( SID_FILE_FILTEROPTIONS, true, &pItem ) )
1274 {
1275 sItStr = static_cast<const SfxStringItem*>(pItem)->GetValue();
1276 }
1277
1278 if (sItStr.isEmpty())
1279 {
1280 // default for dBase import (from API without options):
1281 // IBM_850 encoding
1282
1283 sItStr = ScGlobal::GetCharsetString( RTL_TEXTENCODING_IBM_850 );
1284 }
In our case, Calc asks for encoding and we provide RTL_TEXTENCODING_IBM_850
so we're not even sure sItStr could be empty after the first if
Change-Id: I023b89a98d6430300ac147353ad6cbed1f2d3410
Reviewed-on: https://gerrit.libreoffice.org/38620
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
-rw-r--r-- | sc/source/ui/docshell/docsh8.cxx | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/sc/source/ui/docshell/docsh8.cxx b/sc/source/ui/docshell/docsh8.cxx index 85d73f4070d7..67a944b3f583 100644 --- a/sc/source/ui/docshell/docsh8.cxx +++ b/sc/source/ui/docshell/docsh8.cxx @@ -301,10 +301,6 @@ sal_uLong ScDocShell::DBaseImport( const OUString& rFullFileName, rtl_TextEncodi sal_uLong nErr = ERRCODE_NONE; - // Try to get the Text Encoding from the driver - if( eCharSet == RTL_TEXTENCODING_IBM_850 ) - eCharSet = RTL_TEXTENCODING_DONTKNOW; - try { long i; |