diff options
author | Gabriel Masei <gabriel.masei@1and1.ro> | 2024-04-09 13:07:18 +0300 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2024-10-09 14:49:11 +0200 |
commit | 565b619d57a3b98b0826c4b49dee6606f9ae70e0 (patch) | |
tree | c2fa077a576ce94a2fa5131c19c84bee84faa21d /sc/source/ui/unoobj/filtuno.cxx | |
parent | 2f1dcf01d713f786ed1bfdc2ba3b6c9e06fb8ecf (diff) |
tdf#160582 Preserve settings saving in csv import dialog
Also, improve detection algorithm by replacing the limit
of 20 lines with a time limit of 500ms.
Change-Id: Iac519b6ebe675b91ce84b900646d9d320ea9ddc1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165905
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Jenkins
Diffstat (limited to 'sc/source/ui/unoobj/filtuno.cxx')
-rw-r--r-- | sc/source/ui/unoobj/filtuno.cxx | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/sc/source/ui/unoobj/filtuno.cxx b/sc/source/ui/unoobj/filtuno.cxx index e5ee8de17d29..575d66147b64 100644 --- a/sc/source/ui/unoobj/filtuno.cxx +++ b/sc/source/ui/unoobj/filtuno.cxx @@ -179,25 +179,15 @@ sal_Int16 SAL_CALL ScFilterOptionsObj::execute() { // ascii import is special... - ScAsciiOptions aInOptions, *pInOptions = nullptr; INetURLObject aURL( aFileName ); // tdf#132421 - don't URL encode filename for the import ASCII dialog title OUString aPrivDatName(aURL.GetLastName(INetURLObject::DecodeMechanism::Unambiguous)); std::unique_ptr<SvStream> pInStream; if ( xInputStream.is() ) - { pInStream = utl::UcbStreamHelper::CreateStream( xInputStream ); - if (aFilterOptions.isEmpty()) - aFilterOptions = "DETECT,34,DETECT,,,,,,,,,,,,"; - SfxObjectShell::DetectCsvFilterOptions(*pInStream, aFilterOptions); - - aInOptions.ReadFromString(aFilterOptions); - pInOptions = &aInOptions; - } - ScopedVclPtr<AbstractScImportAsciiDlg> pDlg(pFact->CreateScImportAsciiDlg(Application::GetFrameWeld(xDialogParent), aPrivDatName, - pInStream.get(), SC_IMPORTFILE, pInOptions)); + pInStream.get(), SC_IMPORTFILE)); if ( pDlg->Execute() == RET_OK ) { ScAsciiOptions aOptions; |