Kaydet (Commit) 40df5fc0 authored tarafından Caolán McNamara's avatar Caolán McNamara

mem leaks in writer font options tabpage

Change-Id: I7378f1a230fc55a97bc06d154939502f6ddcc792
üst 95e394a6
......@@ -382,8 +382,7 @@ FontList::FontList( OutputDevice* pDevice, OutputDevice* pDevice2, sal_Bool bAll
FontList::~FontList()
{
// Gegebenenfalls SizeArray loeschen
if ( mpSizeAry )
delete[] mpSizeAry;
delete[] mpSizeAry;
// FontInfos loeschen
ImplFontListFontInfo *pTemp, *pInfo;
......
......@@ -578,8 +578,11 @@ SwStdFontTabPage::SwStdFontTabPage( Window* pParent,
SwStdFontTabPage::~SwStdFontTabPage()
{
if(bDeletePrinter)
delete pFontList;
if (bDeletePrinter)
{
delete pPrt;
}
}
SfxTabPage* SwStdFontTabPage::Create( Window* pParent,
......@@ -760,6 +763,11 @@ void SwStdFontTabPage::Reset( const SfxItemSet& rSet)
const SfxPoolItem* pItem;
if (bDeletePrinter)
{
delete pPrt;
}
if(SFX_ITEM_SET == rSet.GetItemState(FN_PARAM_PRINTER, sal_False, &pItem))
{
pPrt = (SfxPrinter*)((const SwPtrItem*)pItem)->GetValue();
......@@ -771,8 +779,8 @@ void SwStdFontTabPage::Reset( const SfxItemSet& rSet)
SID_PRINTER_CHANGESTODOC, SID_PRINTER_CHANGESTODOC,
0 );
pPrt = new SfxPrinter(pPrinterSet);
bDeletePrinter = sal_True;
}
delete pFontList;
pFontList = new FontList( pPrt );
// #i94536# prevent duplication of font entries when 'reset' button is pressed
if( !pStandardBox->GetEntryCount() )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment