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>
This commit is contained in:
committed by
Katarina Behrens
parent
06283dcba1
commit
99f3d9895f
@@ -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.")
|
||||
|
@@ -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&)
|
||||
{
|
||||
|
Reference in New Issue
Block a user