]> git.pld-linux.org Git - packages/libreoffice.git/blob - openoffice-print-dialog.patch
- up
[packages/libreoffice.git] / openoffice-print-dialog.patch
1 Index: svtools/source/dialogs/printdlg.cxx
2 ===================================================================
3 RCS file: /cvs/util/svtools/source/dialogs/printdlg.cxx,v
4 retrieving revision 1.16
5 --- svtools/source/dialogs/printdlg.cxx.orig    2004-03-30 19:47:51.000000000 +0000
6 +++ svtools/source/dialogs/printdlg.cxx 2004-03-30 19:51:29.000000000 +0000
7 @@ -431,6 +431,10 @@
8          {
9              try
10              {
11 +               INetURLObject aLocation( maFiPrintFile.GetText(), INET_PROT_FILE );
12 +
13 +               xFilePicker->setDefaultName( aLocation.GetLastName() );
14 +               xFilePicker->setDisplayDirectory ( aLocation.GetPartBeforeLastName() );
15  #ifdef UNX
16                  // add PostScript and PDF
17                  if( ! Application::IsRemoteServer() )
18 @@ -449,6 +453,10 @@
19                          xFilterMgr->appendFilter( OUString( RTL_CONSTASCII_USTRINGPARAM( "PostScript" ) ), OUString( RTL_CONSTASCII_USTRINGPARAM( "*.ps" ) ) );
20                      if( bPDF )
21                          xFilterMgr->appendFilter( OUString( RTL_CONSTASCII_USTRINGPARAM( "Portable Document Format" ) ), OUString( RTL_CONSTASCII_USTRINGPARAM( "*.pdf" ) ) );
22 +
23 +                   String aFilter = pPrinter->GetJobValue( String::CreateFromAscii( "Filter#" ) );
24 +                   if (aFilter.Len())
25 +                           xFilterMgr->setCurrentFilter( aFilter );
26                  }
27  #elif defined WNT
28                  xFilterMgr->appendFilter( OUString( RTL_CONSTASCII_USTRINGPARAM( "*.PRN" ) ), OUString( RTL_CONSTASCII_USTRINGPARAM( "*.prn" ) ) );
29 @@ -465,6 +473,12 @@
30                  Sequence< OUString > aPathSeq( xFilePicker->getFiles() );
31                  INetURLObject aObj( aPathSeq[0] );
32                  maFiPrintFile.SetText( aObj.PathToFileName() );
33 +#ifdef UNX
34 +               Printer* pPrinter = TEMPPRINTER() ? TEMPPRINTER() : mpPrinter;
35 +               if ( pPrinter )
36 +                       pPrinter->SetJobValue( String::CreateFromAscii( "Filter#" ),
37 +                                       xFilterMgr->getCurrentFilter() );
38 +#endif
39                  return true;
40              }
41              return false;
This page took 0.033255 seconds and 3 git commands to generate.