diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-11-26 16:59:52 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-11-27 20:04:28 +0100 |
commit | 61e84d25af25c9ad3a29e396afc054940892d65b (patch) | |
tree | 78ca08e8ad36889c8e06f56d108fb857e80f7295 /cui | |
parent | 50b7545ecb06028a19d6a46932f13728492decfb (diff) |
set png filter for import dialog in a more robust way
Change-Id: Iec25e214b19e5a2ab8a7305aad307c3f03e67401
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125913
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125946
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/customize/cfg.cxx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx index 526aa4e9c411..29ca8ccb96f6 100644 --- a/cui/source/customize/cfg.cxx +++ b/cui/source/customize/cfg.cxx @@ -28,6 +28,7 @@ #include <vcl/commandinfoprovider.hxx> #include <vcl/event.hxx> #include <vcl/graph.hxx> +#include <vcl/graphicfilter.hxx> #include <vcl/svapp.hxx> #include <vcl/toolbox.hxx> #include <vcl/weld.hxx> @@ -2888,8 +2889,9 @@ IMPL_LINK_NOARG(SvxIconSelectorDialog, ImportHdl, weld::Button&, void) false); } - aImportDialog.SetCurrentFilter( - "PNG - Portable Network Graphic"); + GraphicFilter& rFilter = GraphicFilter::GetGraphicFilter(); + sal_uInt16 nFilter = rFilter.GetImportFormatNumberForShortName(u"png"); + aImportDialog.SetCurrentFilter(rFilter.GetImportFormatName(nFilter)); if ( ERRCODE_NONE == aImportDialog.Execute() ) { |