diff options
author | Michael Meeks <michael.meeks@collabora.com> | 2015-03-16 17:28:03 +0000 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2015-04-10 11:32:31 +0100 |
commit | 65741289ea32fe642af179b732398c1c3e41911e (patch) | |
tree | 528600a1c8518c0de4ca59e649866f3edfce9c2f /basctl | |
parent | a13007adddadf7f5c7b503d6732cf11f3e62e619 (diff) |
cleanup Printer VclRef pieces.
Change-Id: Ib47b2ec3cb54e374675981ad929856f43987418f
Diffstat (limited to 'basctl')
-rw-r--r-- | basctl/source/basicide/basicrenderable.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/basctl/source/basicide/basicrenderable.cxx b/basctl/source/basicide/basicrenderable.cxx index ee5ed4bef958..8a36a560a770 100644 --- a/basctl/source/basicide/basicrenderable.cxx +++ b/basctl/source/basicide/basicrenderable.cxx @@ -77,17 +77,17 @@ Renderable::~Renderable() { } -Printer* Renderable::getPrinter() +VclPtr< Printer > Renderable::getPrinter() { - Printer* pPrinter = NULL; + VclPtr< Printer > pPrinter; Any aValue( getValue( "RenderDevice" ) ); Reference<awt::XDevice> xRenderDevice; if( aValue >>= xRenderDevice ) { VCLXDevice* pDevice = VCLXDevice::GetImplementation(xRenderDevice); - OutputDevice* pOut = pDevice ? pDevice->GetOutputDevice() : NULL; - pPrinter = dynamic_cast<Printer*>(pOut); + VclPtr< OutputDevice > pOut = pDevice ? pDevice->GetOutputDevice() : VclPtr< OutputDevice >; + pPrinter = dynamic_cast<Printer*>(pOut.get()); } return pPrinter; } |