summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorTakeshi Abe <tabe@fixedpoint.jp>2017-08-07 22:31:58 +0900
committerKatarina Behrens <Katarina.Behrens@cib.de>2017-08-08 11:28:19 +0200
commit99f3d9895f63ed19496bbe47bd36899b0f39dbce (patch)
tree4119e00d789fc1b20d839d9ee2db2ed06edec499 /sd
parent06283dcba13ee18716da9eee728210a00bcb5b97 (diff)
tdf#95309 Add a filter to show all files for "Insert > File"
in Draw and Impress. Change-Id: Ia6721f4a25af9fe8b6edd143ecb7ba3f5f3e8a89 Reviewed-on: https://gerrit.libreoffice.org/40834 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
Diffstat (limited to 'sd')
-rw-r--r--sd/inc/strings.hrc1
-rw-r--r--sd/source/ui/func/fuinsfil.cxx8
2 files changed, 6 insertions, 3 deletions
diff --git a/sd/inc/strings.hrc b/sd/inc/strings.hrc
index e3d350063c0a..76ff0a0e060d 100644
--- a/sd/inc/strings.hrc
+++ b/sd/inc/strings.hrc
@@ -96,6 +96,7 @@
#define STR_SD_PAGE NC_("STR_SD_PAGE", "Slide")
#define STR_SD_PAGE_COUNT NC_("STR_SD_PAGE_COUNT", "Slide %1 of %2")
#define STR_SD_PAGE_COUNT_CUSTOM NC_("STR_SD_PAGE_COUNT_CUSTOM", "Slide %1 of %2 (%3)")
+#define STR_ALL_SUPPORTED_FORMATS NC_("STR_ALL_SUPPORTED_FORMATS", "All supported formats")
#define STR_ALL_FILES NC_("STR_ALL_FILES", "All files")
#define STR_UNDO_INSERT_TEXTFRAME NC_("STR_UNDO_INSERT_TEXTFRAME", "Insert text frame")
#define STR_ACTION_NOTPOSSIBLE NC_("STR_ACTION_NOTPOSSIBLE", "This function cannot be run \nwith the selected objects.")
diff --git a/sd/source/ui/func/fuinsfil.cxx b/sd/source/ui/func/fuinsfil.cxx
index 3bcbc78db3dc..d72701c527e9 100644
--- a/sd/source/ui/func/fuinsfil.cxx
+++ b/sd/source/ui/func/fuinsfil.cxx
@@ -214,15 +214,15 @@ void FuInsertFile::DoExecute( SfxRequest& rReq )
++aOtherIter;
}
- // set default-filter (<All>)
- OUString aAllSpec( SdResId( STR_ALL_FILES ) );
+ // set "All supported formats" as the default filter
+ OUString aAllSpec( SdResId( STR_ALL_SUPPORTED_FORMATS ) );
OUString aExtensions = lcl_GetExtensionsList( aFilterVector );
OUString aGUIName = aAllSpec + " (" + aExtensions + ")";
xFilterManager->appendFilter( aGUIName, aExtensions );
xFilterManager->setCurrentFilter( aAllSpec );
- // add filters to filter manager finally
+ // append individual filters
::std::vector< ::std::pair < OUString, OUString > >::const_iterator aIter( aFilterVector.begin() );
while( aIter != aFilterVector.end() )
@@ -231,6 +231,8 @@ void FuInsertFile::DoExecute( SfxRequest& rReq )
++aIter;
}
+ // end with "All files" as fallback
+ xFilterManager->appendFilter( SdResId( STR_ALL_FILES ), "*.*" );
}
catch (const IllegalArgumentException&)
{