[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - sdext/source
Mike Kaganski (via logerrit)
logerrit at kemper.freedesktop.org
Tue Sep 22 06:52:03 UTC 2020
sdext/source/minimizer/fileopendialog.cxx | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
New commits:
commit bfb559d04a08d2a8ebb90d04772c0321e2aaf1dc
Author: Mike Kaganski <mike.kaganski at collabora.com>
AuthorDate: Sun Aug 16 18:58:48 2020 +0300
Commit: Mike Kaganski <mike.kaganski at collabora.com>
CommitDate: Tue Sep 22 08:51:31 2020 +0200
tdf#135342: filter list must include extensions
Regression after commit a0dcc8f78061d22d925f31ef8d03ca751ad6dc19.
The commit had added extensions to the filter names sent to file
dialog, but kept internal list of filter names aFilterEntryList
without extensions. Then dialog returned the chosen filter's name
in the form it was sent there, i.e. with extension; and that name
couldn't be found in aFilterEntryList.
So let's keep aFilterEntryList synchronized with the UI names in
the dialog.
Change-Id: Ic21d19d1a8d0b7f64ccfb517a7d0ee8ab36fc6a8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100821
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski at collabora.com>
(cherry picked from commit 99c6c89deed41457d35c382fc7d6a4cd5191f7d7)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100792
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
(cherry picked from commit bbd0d424263a21dd0ffdc42d1201f86e65358f25)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101671
Reviewed-by: Xisco Fauli <xiscofauli at libreoffice.org>
(cherry picked from commit 20e557dc730d66453d32f9268381274c268cabd4)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103061
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
diff --git a/sdext/source/minimizer/fileopendialog.cxx b/sdext/source/minimizer/fileopendialog.cxx
index 68f25f77900a..aab29c03907b 100644
--- a/sdext/source/minimizer/fileopendialog.cxx
+++ b/sdext/source/minimizer/fileopendialog.cxx
@@ -106,7 +106,7 @@ FileOpenDialog::FileOpenDialog( const Reference< XComponentContext >& rxContext
Reference< XNameAccess > xTypes( rxContext->getServiceManager()->createInstanceWithContext(
"com.sun.star.document.TypeDetection", rxContext ), UNO_QUERY_THROW );
- for( const auto& rFilterEntry : aFilterEntryList )
+ for (auto& rFilterEntry : aFilterEntryList)
{
Sequence< PropertyValue > aTypeProperties;
try
@@ -120,10 +120,12 @@ FileOpenDialog::FileOpenDialog( const Reference< XComponentContext >& rxContext
pProp->Value >>= aExtensions;
if ( aExtensions.hasElements() )
{
- // The filter title must be formed in the same way it is
- // currently done in the internal implementation:
+ // The filter title must be formed in the same way it is currently done in the
+ // internal implementation (see sfx2::appendFiltersForSave). And we will look
+ // for the same string returned from the dialog, so save it to maUIName:
OUString aTitle(
rFilterEntry.maUIName + " (." + aExtensions[0] + ")");
+ rFilterEntry.maUIName = aTitle;
OUString aFilter("*." + aExtensions[0]);
mxFilePicker->appendFilter(aTitle, aFilter);
if ( rFilterEntry.maFlags & 0x100 )
More information about the Libreoffice-commits
mailing list