https://bugs.documentfoundation.org/show_bug.cgi?id=120950

Michael Weghorn <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |NOTOURBUG

--- Comment #2 from Michael Weghorn <[email protected]> ---
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)";

        dialog->setAcceptMode(QFileDialog::AcceptMode::AcceptSave);

        dialog->setNameFilters(filters);

        dialog->setOption(QFileDialog::HideNameFilterDetails);

        dialog->exec();

        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

    dialog->setOption(QFileDialog::DontUseNativeDialog);

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

Therefore, this should to be fixed outside LibreOffice.

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

Reply via email to