summaryrefslogtreecommitdiff
path: root/vcl/win/source/gdi/salprn.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/win/source/gdi/salprn.cxx')
-rw-r--r--vcl/win/source/gdi/salprn.cxx30
1 files changed, 11 insertions, 19 deletions
diff --git a/vcl/win/source/gdi/salprn.cxx b/vcl/win/source/gdi/salprn.cxx
index 57440cd1b064..d1904a7b5a53 100644
--- a/vcl/win/source/gdi/salprn.cxx
+++ b/vcl/win/source/gdi/salprn.cxx
@@ -1601,27 +1601,19 @@ sal_Bool WinSalPrinter::StartJob( const rtl::OUString* pFileName,
{
uno::Reference< uno::XComponentContext > xContext( ::comphelper::getProcessComponentContext() );
- uno::Reference< XFilePicker3 > xFilePicker = FilePicker::createDefault(xContext);
+ uno::Reference< XFilePicker3 > xFilePicker = FilePicker::createWithMode(xContext, TemplateDescription::FILESAVE_SIMPLE);
- uno::Reference< XInitialization > xInit( xFilePicker, UNO_QUERY );
- uno::Reference< XFilterManager > xFilterMgr( xFilePicker, UNO_QUERY );
- if( xInit.is() && xFilePicker.is() && xFilterMgr.is() )
+ if( xFilePicker->execute() == ExecutableDialogResults::OK )
{
- Sequence< Any > aServiceType( 1 );
- aServiceType[0] <<= TemplateDescription::FILESAVE_SIMPLE;
- xInit->initialize( aServiceType );
- if( xFilePicker->execute() == ExecutableDialogResults::OK )
- {
- Sequence< OUString > aPathSeq( xFilePicker->getFiles() );
- INetURLObject aObj( aPathSeq[0] );
- // we're using ansi calls (StartDocA) so convert the string
- aOutFileName = aObj.PathToFileName();
- }
- else
- {
- mnError = SAL_PRINTER_ERROR_ABORT;
- return FALSE;
- }
+ Sequence< OUString > aPathSeq( xFilePicker->getFiles() );
+ INetURLObject aObj( aPathSeq[0] );
+ // we're using ansi calls (StartDocA) so convert the string
+ aOutFileName = aObj.PathToFileName();
+ }
+ else
+ {
+ mnError = SAL_PRINTER_ERROR_ABORT;
+ return FALSE;
}
}