[Libreoffice-commits] core.git: sc/source
Julien Nabet
serval2412 at yahoo.fr
Sat Jun 10 06:15:54 UTC 2017
sc/source/ui/docshell/docsh8.cxx | 4 ----
1 file changed, 4 deletions(-)
New commits:
commit 9fe9685627c51926459a897594ead9f64deee579
Author: Julien Nabet <serval2412 at yahoo.fr>
Date: Sat Jun 10 01:22:58 2017 +0200
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 at libreoffice.org>
Reviewed-by: Julien Nabet <serval2412 at yahoo.fr>
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;
More information about the Libreoffice-commits
mailing list