diff options
Diffstat (limited to 'vcl/headless/svpprn.cxx')
-rw-r--r-- | vcl/headless/svpprn.cxx | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/vcl/headless/svpprn.cxx b/vcl/headless/svpprn.cxx index e54c01a4c437..7b661c1d58e0 100644 --- a/vcl/headless/svpprn.cxx +++ b/vcl/headless/svpprn.cxx @@ -188,18 +188,13 @@ void SvpSalInstance::DestroyInfoPrinter( SalInfoPrinter* pPrinter ) delete pPrinter; } -SalPrinter* SvpSalInstance::CreatePrinter( SalInfoPrinter* pInfoPrinter ) +std::unique_ptr<SalPrinter> SvpSalInstance::CreatePrinter( SalInfoPrinter* pInfoPrinter ) { // create and initialize SalPrinter SvpSalPrinter* pPrinter = new SvpSalPrinter( pInfoPrinter ); pPrinter->m_aJobData = static_cast<SvpSalInfoPrinter*>(pInfoPrinter)->m_aJobData; - return pPrinter; -} - -void SvpSalInstance::DestroyPrinter( SalPrinter* pPrinter ) -{ - delete pPrinter; + return std::unique_ptr<SalPrinter>(pPrinter); } void SvpSalInstance::GetPrinterQueueInfo( ImplPrnQueueList* pList ) |