diff options
author | Jens-Heiner Rechtien <hr@openoffice.org> | 2003-08-20 14:03:44 +0000 |
---|---|---|
committer | Jens-Heiner Rechtien <hr@openoffice.org> | 2003-08-20 14:03:44 +0000 |
commit | 95e977c9d4e821a0dcf64d114b37d80bee611bd5 (patch) | |
tree | 49bed36b3dec8bc75a60a1bc01e80d5c66f09165 /svtools/source/dialogs/printdlg.cxx | |
parent | 1c5bcfdc702c9e8cc66a33935550f5cc136b3ba0 (diff) |
#100000# join from CWS licenseprint
Diffstat (limited to 'svtools/source/dialogs/printdlg.cxx')
-rw-r--r-- | svtools/source/dialogs/printdlg.cxx | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/svtools/source/dialogs/printdlg.cxx b/svtools/source/dialogs/printdlg.cxx index e1e99213b905..d3c0acf37503 100644 --- a/svtools/source/dialogs/printdlg.cxx +++ b/svtools/source/dialogs/printdlg.cxx @@ -2,9 +2,9 @@ * * $RCSfile: printdlg.cxx,v $ * - * $Revision: 1.16 $ + * $Revision: 1.17 $ * - * last change: $Author: vg $ $Date: 2003-04-11 17:01:36 $ + * last change: $Author: hr $ $Date: 2003-08-20 15:03:44 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -81,6 +81,7 @@ #include <prnsetup.hxx> #include <printdlg.hxx> #include <svtdata.hxx> +#include <filedlg.hxx> #ifndef _PICKERHELPER_HXX #include "pickerhelper.hxx" @@ -477,9 +478,27 @@ bool PrintDialog::ImplGetFilename() maFiPrintFile.SetText( aObj.PathToFileName() ); return true; } + return false; } } + // something went awry, lets try the old fashioned dialogue + Window* pDlgParent = IsReallyVisible() ? this : GetParent(); + FileDialog aDlg( pDlgParent, WB_STDDIALOG | WB_SAVEAS ); +#ifdef WNT + aDlg.AddFilter( String( RTL_CONSTASCII_USTRINGPARAM( "*.prn" ) ), String( RTL_CONSTASCII_USTRINGPARAM( "*.prn" ) ) ); + aDlg.SetDefaultExt( String( RTL_CONSTASCII_USTRINGPARAM( "prn" ) ) ); +#elif defined UNX + aDlg.AddFilter( String( RTL_CONSTASCII_USTRINGPARAM( "PostScript" ) ), String( RTL_CONSTASCII_USTRINGPARAM( "*.ps" ) ) ); + aDlg.SetDefaultExt( String( RTL_CONSTASCII_USTRINGPARAM( "ps" ) ) ); +#endif + if( aDlg.Execute() ) + { + String aTargetFile = aDlg.GetPath(); + maFiPrintFile.SetText( aTargetFile ); + return true; + } + return false; } |