diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-02-06 09:46:57 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-02-06 16:45:13 +0000 |
commit | c7258cfccdf9f4c5235da1b135801f957a5b0ec1 (patch) | |
tree | d5af5085ad1327afe2d41045ea452e017fea1fb6 /toolkit | |
parent | 027c383584bff4ea2aa7aa2b9e294e614087f28f (diff) |
shared_ptr<T>(new T(args)) -> make_shared<T>(args)
and boost:make_shared->std::make_shared
Change-Id: Ic1e187c52c856a7b27817967b2caa8920f23a98d
Diffstat (limited to 'toolkit')
-rw-r--r-- | toolkit/source/awt/vclxprinter.cxx | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/toolkit/source/awt/vclxprinter.cxx b/toolkit/source/awt/vclxprinter.cxx index 15adc111e65e..c80caae2b3b9 100644 --- a/toolkit/source/awt/vclxprinter.cxx +++ b/toolkit/source/awt/vclxprinter.cxx @@ -70,7 +70,7 @@ IMPLEMENT_FORWARD_XTYPEPROVIDER2( VCLXPrinterPropertySet, VCLXPrinterPropertySet VCLXPrinterPropertySet::VCLXPrinterPropertySet( const OUString& rPrinterName ) : OPropertySetHelper( BrdcstHelper ) - , mpPrinter( new Printer( rPrinterName ) ) + , mxPrinter(std::make_shared<Printer>(rPrinterName)) { SolarMutexGuard aSolarGuard; @@ -81,7 +81,7 @@ VCLXPrinterPropertySet::VCLXPrinterPropertySet( const OUString& rPrinterName ) VCLXPrinterPropertySet::~VCLXPrinterPropertySet() { SolarMutexGuard aSolarGuard; - mpPrinter.reset(); + mxPrinter.reset(); } ::com::sun::star::uno::Reference< ::com::sun::star::awt::XDevice > VCLXPrinterPropertySet::GetDevice() @@ -280,10 +280,10 @@ sal_Bool VCLXPrinter::start( const OUString& /*rJobName*/, sal_Int16 /*nCopies*/ ::osl::MutexGuard aGuard( Mutex ); bool bDone = true; - if ( mpPrinter.get() ) + if (mxPrinter.get()) { - maInitJobSetup = mpPrinter->GetJobSetup(); - mpListener.reset( new vcl::OldStylePrintAdaptor( mpPrinter ) ); + maInitJobSetup = mxPrinter->GetJobSetup(); + mxListener.reset(new vcl::OldStylePrintAdaptor(mxPrinter)); } return bDone; @@ -293,10 +293,10 @@ void VCLXPrinter::end( ) throw(::com::sun::star::awt::PrinterException, ::com:: { ::osl::MutexGuard aGuard( Mutex ); - if ( mpListener.get() ) + if (mxListener.get()) { - Printer::PrintJob( mpListener, maInitJobSetup ); - mpListener.reset(); + Printer::PrintJob(mxListener, maInitJobSetup); + mxListener.reset(); } } @@ -304,16 +304,16 @@ void VCLXPrinter::terminate( ) throw(::com::sun::star::uno::RuntimeException, s { ::osl::MutexGuard aGuard( Mutex ); - mpListener.reset(); + mxListener.reset(); } ::com::sun::star::uno::Reference< ::com::sun::star::awt::XDevice > VCLXPrinter::startPage( ) throw(::com::sun::star::awt::PrinterException, ::com::sun::star::uno::RuntimeException, std::exception) { ::osl::MutexGuard aGuard( Mutex ); - if ( mpListener.get() ) + if (mxListener.get()) { - mpListener->StartPage(); + mxListener->StartPage(); } return GetDevice(); } @@ -322,9 +322,9 @@ void VCLXPrinter::endPage( ) throw(::com::sun::star::awt::PrinterException, ::c { ::osl::MutexGuard aGuard( Mutex ); - if ( mpListener.get() ) + if (mxListener.get()) { - mpListener->EndPage(); + mxListener->EndPage(); } } |