Download it now!
Bug 120950 - kde4, kde5, gtk3_kde5: Filter "Office Open XML" in fpicker sometimes not applied instantly
Summary: kde4, kde5, gtk3_kde5: Filter "Office Open XML" in fpicker sometimes not appl...
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
(earliest affected)
Hardware: All Linux (All)
: medium normal
Assignee: Not Assigned
Depends on:
Blocks: KDE
  Show dependency treegraph
Reported: 2018-10-27 10:05 UTC by Michael Weghorn
Modified: 2019-05-22 07:00 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Note You need to log in before you can comment on or make changes to this bug.
Description Michael Weghorn 2018-10-27 10:05:03 UTC
Build ID: 5690acdb44e8017055bb88e86e19d207836bb95c
CPU threads: 4; OS: Linux 4.18; UI render: default; VCL: gtk3_kde5; 
Locale: en-GB (en_GB.UTF-8); Calc: threaded

Steps to reproduce:

1) open an existing ODT document in Writer
2) "File" -> "Save as"
3) Select filter "Office Open XML Text .docx" in the file dialog

Result: The filter "Word 2007-2019 (.docx)" is shown as selected.

Expected result: The selected filter "Office Open XML Text .docx" should be selected.


* It's not reproducible when using a new, unsaved document, rather than an existing ODT document.
* After selecting "Office Open XML Text .docx" a second time, this is also shown correctly in the dialog.
* This is reproducible with the gtk3_kde5 and kde5 VCL plugins (and probably kde4, where it was initially reported with some custom 5.2-based LibreOffice version, but I don't have a current master build with kde4 at hand to retest).
Comment 1 Michael Weghorn 2018-10-27 10:06:56 UTC
I'm self-confirming according to [1], since the bug was initially reported by another user in our internal bug tracker.

Comment 2 Michael Weghorn 2018-10-27 21:04:42 UTC
After closer examination, I am quite sure that it's not LibreOffice's fault, but rather a bug in KDE software (probably "kio" or "plasma-integration").

This can be reproduced without actually using LibreOffice by this small sample program using the Qt print dialog:

    #include <QApplication>
    #include <QFileDialog>

    int main(int argc, char *argv[])
        QApplication a(argc, argv);

        QFileDialog *dialog = new QFileDialog(nullptr);

        QStringList filters;
        filters << "ODF Text Document (.odt) (*.odt)"
                << "ODF Text Document Template (.ott) (*.ott)"
                << "Flat XML ODF Text Document (.fodt) (*.fodt)"
                << "Unified Office Format text (.uot) (*.uot)"
                << "Word 2007–2019 (.docx) (*.docx)"
                << "Word 2003 XML (.xml) (*.xml)"
                << "Word 97–2003 (.doc) (*.doc)"
                << "Word 97–2003 Template (.dot) (*.dot)"
                << "DocBook (.xml) (*.xml)"
                << "HTML Document (Writer) (.html) (*.html)"
                << "Rich Text (.rtf) (*.rtf)"
                << "Text (.txt) (*.txt)"
                << "Text - Choose Encoding (.txt) (*.txt)"
                << "Office Open XML Text (.docx) (*.docx)"
                << "Word 2007–2019 VBA (.docm) (*.docm)";





        return a.exec();

When run under KDE Plasma, the following steps reproduce the issue there, too:

1) enable the checkbox "Automatically select filename extension"
2) type "test.odt" into the "Filename" textbox 
3) select filter "Office Open XML Text (.docx)

The problem no longer occurs when run e.g. in XFCE or disabling the native (KDE/Plasma) file dialog by adding


(or running LibreOffice with the 'qt5' VCL plugin instead of the kde5 one).

Therefore, this should to be fixed outside LibreOffice.
Comment 3 Jan-Marek Glogowski 2019-05-17 14:39:53 UTC
I've created to fix it upstream.
Comment 4 Michael Weghorn 2019-05-22 07:00:12 UTC
(In reply to Jan-Marek Glogowski from comment #3)
> I've created to fix it upstream.

Thanks! The patch has just been integrated upstream.