Kaydet (Commit) a0dcc8f7 authored tarafından Ariel Constenla-Haile's avatar Ariel Constenla-Haile Kaydeden (comit) Caolán McNamara

Resolves: #i121857# Presentation Minimizer: fix filter naming

(cherry picked from commit 75833fdb)

Conflicts:
	sdext/source/minimizer/fileopendialog.cxx

Change-Id: I164cc6d9916ddf9dba9da273b5181e5728127292
üst b1e751d6
......@@ -46,6 +46,7 @@
#include <com/sun/star/view/XControlAccess.hpp>
#include <com/sun/star/ucb/InteractiveAugmentedIOException.hpp>
#include <rtl/ustrbuf.hxx>
using namespace ::rtl;
using namespace ::com::sun::star::uno;
......@@ -140,7 +141,27 @@ FileOpenDialog::FileOpenDialog( const Reference< XComponentContext >& rxContext
}
if ( aExtensions.getLength() )
{
mxFilePicker->appendFilter( aIter->maUIName, aExtensions[ 0 ] );
OUString aExtension = aExtensions[0];
const char filter[] = "*.";
// the filter title must be formed in the same it is currently done
// in the internal implementation: "UIName (.<extension>)"
OUStringBuffer aUIName;
// the filter must be in the form "*.<extension>"
OUStringBuffer aFilter;
// form the title: "<UIName> (.<extension)"
aUIName.append( aIter->maUIName );
aUIName.appendAscii( RTL_CONSTASCII_STRINGPARAM( " (." ));
aUIName.append( aExtension );
aUIName.append( sal_Unicode( ')' ) );
// form the filter: "(*.<extension>)"
aFilter.appendAscii( RTL_CONSTASCII_STRINGPARAM( filter ) );
aFilter.append( aExtensions[0] );
mxFilePicker->appendFilter( aUIName.makeStringAndClear(),
aFilter.makeStringAndClear() );
if ( aIter->maFlags & 0x100 )
mxFilePicker->setCurrentFilter( aIter->maUIName );
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment