Commits

Philipp Lohmann [pl]  committed 005f7b0

vcl120: #i114306# tweak defaultprinter behavior again

  • Participants
  • Parent commits 0df9899

Comments (0)

Files changed (1)

File vcl/source/gdi/print3.cxx

     
     // setup printer
 
-    // if no specific printer is already set, create one
-    
-    // #i108686#
-    // in case of a UI (platform independent or system dialog) print job, make the printer persistent over jobs
-    // however if no printer was already set by the print job's originator,
-    // and this is an API job, then use the system default location (because
-    // this is the only sensible default available if the user has no means of changing
-    // the destination
+    // #i114306# changed behavior back from persistence
+    // if no specific printer is already set, create the default printer
     if( ! pController->getPrinter() )
     {
         rtl::OUString aPrinterName( i_rInitSetup.GetPrinterName() );
-        bool bSetJobSetup = true;
-        if( ! aPrinterName.getLength() && pController->isShowDialogs() && ! pController->isDirectPrint() )
-        {
-            // get printer name from configuration
-            SettingsConfigItem* pItem = SettingsConfigItem::get();
-            aPrinterName = pItem->getValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintDialog" ) ),
-                                            rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "LastPrinterUsed" ) ) );
-            bSetJobSetup = false;
-        }
-
         boost::shared_ptr<Printer> pPrinter( new Printer( aPrinterName ) );
-        if( bSetJobSetup )
-            pPrinter->SetJobSetup( i_rInitSetup );
+        pPrinter->SetJobSetup( i_rInitSetup );
         pController->setPrinter( pPrinter );
     }