summaryrefslogtreecommitdiff
path: root/svx/source/dialog/fntctrl.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'svx/source/dialog/fntctrl.cxx')
-rw-r--r--svx/source/dialog/fntctrl.cxx12
1 files changed, 9 insertions, 3 deletions
diff --git a/svx/source/dialog/fntctrl.cxx b/svx/source/dialog/fntctrl.cxx
index 4b0b3920d59d..feb6a20466fc 100644
--- a/svx/source/dialog/fntctrl.cxx
+++ b/svx/source/dialog/fntctrl.cxx
@@ -128,8 +128,8 @@ class FontPrevWin_Impl
friend class SvxFontPrevWindow;
SvxFont aFont;
- Printer* pPrinter;
- bool bDelPrinter;
+ VclPtr<Printer> pPrinter;
+ bool bDelPrinter;
Reference < XBreakIterator > xBreak;
std::vector<sal_uIntPtr> aTextWidth;
@@ -183,7 +183,7 @@ public:
delete pColor;
delete pBackColor;
if( bDelPrinter )
- delete pPrinter;
+ pPrinter.disposeAndClear();
}
void CheckScript();
@@ -502,7 +502,13 @@ extern "C" SAL_DLLPUBLIC_EXPORT vcl::Window* SAL_CALL makeSvxFontPrevWindow(vcl:
SvxFontPrevWindow::~SvxFontPrevWindow()
{
+ disposeOnce();
+}
+
+void SvxFontPrevWindow::dispose()
+{
delete pImpl;
+ vcl::Window::dispose();
}