summaryrefslogtreecommitdiff
path: root/sdext
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2013-10-15 18:24:14 +0200
committerStephan Bergmann <sbergman@redhat.com>2013-10-15 18:24:14 +0200
commita83b3b5d45ba516883e80eefd7c5f6785b8a567c (patch)
tree00c25fa20d43bd030784fd230c3259b92b170884 /sdext
parent4fa1fa931e9d5d8300eb185cfcbf08dcf95787e1 (diff)
Minimizer: *.mini was saved w/o .odp etc. extension (and clean up)
Change-Id: I4626794f7816ae455a392cdc0acbac42c866fff4
Diffstat (limited to 'sdext')
-rw-r--r--sdext/source/minimizer/fileopendialog.cxx31
1 files changed, 7 insertions, 24 deletions
diff --git a/sdext/source/minimizer/fileopendialog.cxx b/sdext/source/minimizer/fileopendialog.cxx
index e7f42d41ca35..d0b2761519f9 100644
--- a/sdext/source/minimizer/fileopendialog.cxx
+++ b/sdext/source/minimizer/fileopendialog.cxx
@@ -46,8 +46,6 @@
#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;
using namespace ::com::sun::star::lang;
@@ -140,29 +138,14 @@ FileOpenDialog::FileOpenDialog( const Reference< XComponentContext >& rxContext
}
if ( aExtensions.getLength() )
{
- 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() );
-
+ // The filter title must be formed in the same way it is
+ // currently done in the internal implementation:
+ OUString aTitle(
+ aIter->maUIName + " (." + aExtensions[0] + ")");
+ OUString aFilter("*." + aExtensions[0]);
+ mxFilePicker->appendFilter(aTitle, aFilter);
if ( aIter->maFlags & 0x100 )
- mxFilePicker->setCurrentFilter( aIter->maUIName );
+ mxFilePicker->setCurrentFilter(aTitle);
}
}
}