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/38620Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Showing
Please
register
or
sign in
to comment