diff options
author | Chris Sherlock <chris.sherlock79@gmail.com> | 2017-04-02 15:21:38 +1000 |
---|---|---|
committer | Chris Sherlock <chris.sherlock79@gmail.com> | 2017-04-02 15:26:53 +1000 |
commit | 3e5bca1893f08b9372c1e0ab96a32aabf989acd4 (patch) | |
tree | 562812e79ef9a7125ab943d85ab8bd5b63c767a5 /vcl/unx/generic/printer/jobdata.cxx | |
parent | vcl: PrinterInfoManager::addPrinter() - consistent braces (diff) | |
download | core-private/tbsdy/printinfomgr.tar.gz core-private/tbsdy/printinfomgr.zip |
vcl: PrinterInfoManager no longer a singleton
private/tbsdy/printinfomgr
Let's just create the PrinterInfoManager via the SalData constructor.
There is no real need to lazy-load this, so the singleton is sort of
pointless. This allows more RAII-type behaviour.
Change-Id: Id860a40e92eea36b1aeb4da646f1134e8a4d70aa
Diffstat (limited to 'vcl/unx/generic/printer/jobdata.cxx')
-rw-r--r-- | vcl/unx/generic/printer/jobdata.cxx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/vcl/unx/generic/printer/jobdata.cxx b/vcl/unx/generic/printer/jobdata.cxx index 920e430f6376..388c973ca8f3 100644 --- a/vcl/unx/generic/printer/jobdata.cxx +++ b/vcl/unx/generic/printer/jobdata.cxx @@ -25,6 +25,8 @@ #include <rtl/strbuf.hxx> #include <memory> +#include "saldatabasic.hxx" + using namespace psp; JobData& JobData::operator=(const JobData& rRight) @@ -46,7 +48,7 @@ JobData& JobData::operator=(const JobData& rRight) if( !m_pParser && !m_aPrinterName.isEmpty() ) { - PrinterInfoManager& rMgr = PrinterInfoManager::get(); + PrinterInfoManager& rMgr = *(GetSalData()->m_pPIManager); rMgr.setupJobContextData( *this ); } return *this; @@ -268,7 +270,7 @@ bool JobData::constructFromStreamBuffer( const void* pData, sal_uInt32 bytes, Jo { if( bPrinter ) { - PrinterInfoManager& rManager = PrinterInfoManager::get(); + PrinterInfoManager& rManager = *(GetSalData()->m_pPIManager); const JobData& rInfo = rManager.getPrinterInfo( rJobData.m_aPrinterName ); rJobData.m_pParser = PPDParser::getParser( rInfo.m_aDriverName ); if( rJobData.m_pParser ) |