[Libreoffice-commits] core.git: Branch 'feature/vclref' - sc/source
Michael Meeks
michael.meeks at collabora.com
Fri Mar 20 14:00:43 PDT 2015
sc/source/ui/unoobj/confuno.cxx | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
New commits:
commit c27e896a41f852d43458db908d7d66460661006e
Author: Michael Meeks <michael.meeks at collabora.com>
Date: Fri Mar 20 21:05:22 2015 +0000
malingering delete.
Change-Id: I954c6b0db3ae69146763fa6c54e2d8015b00ee4e
diff --git a/sc/source/ui/unoobj/confuno.cxx b/sc/source/ui/unoobj/confuno.cxx
index ceafa07..731d171 100644
--- a/sc/source/ui/unoobj/confuno.cxx
+++ b/sc/source/ui/unoobj/confuno.cxx
@@ -178,11 +178,11 @@ void SAL_CALL ScDocumentConfiguration::setPropertyValue(
{
if (pPrinter->GetName() != sPrinterName)
{
- SfxPrinter* pNewPrinter = new SfxPrinter( pPrinter->GetOptions().Clone(), sPrinterName );
+ VclPtr<SfxPrinter> pNewPrinter = new SfxPrinter( pPrinter->GetOptions().Clone(), sPrinterName );
if (pNewPrinter->IsKnown())
pDocShell->SetPrinter( pNewPrinter, SFX_PRINTER_PRINTER );
else
- delete pNewPrinter;
+ pNewPrinter.disposeAndClear();
}
}
else
More information about the Libreoffice-commits
mailing list