[Libreoffice-commits] core.git: sw/source
Michael Weghorn (via logerrit)
logerrit at kemper.freedesktop.org
Mon Nov 11 14:37:34 UTC 2019
sw/source/uibase/dbui/dbmgr.cxx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit ef21e0d527655761b6c307cae89ee5b370de96d4
Author: Michael Weghorn <m.weghorn at posteo.de>
AuthorDate: Mon Nov 11 11:49:50 2019 +0100
Commit: Michael Weghorn <m.weghorn at posteo.de>
CommitDate: Mon Nov 11 15:36:34 2019 +0100
tdf#109219 MM: Decode all percent encodings in file names
While decoding using 'INetURLObject::DecodeMechanism::Unambiguous'
as introduced by commit 47708d533e1325032df55eb667ef0c47fa05e7e5
("tdf#109219 Allow files with spaces in name as MM data source")
makes sure that e.g. spaces in file names are properly decoded,
'INetURLObject::DecodeMechanism::WithCharset' is actually the
more correct decoding mechanism to use here, since it also decodes
some percentage encodings that 'INetURLObject::DecodeMechanism::Unambiguous'
would leave unchanged.
Using 'INetURLObject::DecodeMechanism::WithCharset' instead
e.g. makes CSV files with '%' characters in their names work
as data sources for mail merge as well.
A big thanks to Stephan Bergmann for pointing this out in
https://gerrit.libreoffice.org/#/c/82201/ .
Change-Id: Iee50584299c82d5718e3210f048ed739818bd11b
Reviewed-on: https://gerrit.libreoffice.org/82428
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn at posteo.de>
diff --git a/sw/source/uibase/dbui/dbmgr.cxx b/sw/source/uibase/dbui/dbmgr.cxx
index d3e29c4eaad1..8d11292d9e52 100644
--- a/sw/source/uibase/dbui/dbmgr.cxx
+++ b/sw/source/uibase/dbui/dbmgr.cxx
@@ -2719,7 +2719,7 @@ OUString LoadAndRegisterDataSource_Impl(DBConnURIType type, const uno::Reference
case DBConnURIType::FLAT:
case DBConnURIType::DBASE:
//set the filter to the file name without extension
- aFilters[0] = rURL.getBase(INetURLObject::LAST_SEGMENT, true, INetURLObject::DecodeMechanism::Unambiguous);
+ aFilters[0] = rURL.getBase(INetURLObject::LAST_SEGMENT, true, INetURLObject::DecodeMechanism::WithCharset);
aTableFilterAny <<= aFilters;
break;
case DBConnURIType::MSJET:
More information about the Libreoffice-commits
mailing list