summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorJens-Heiner Rechtien <hr@openoffice.org>2004-11-09 11:58:31 +0000
committerJens-Heiner Rechtien <hr@openoffice.org>2004-11-09 11:58:31 +0000
commit37a75169da2967f64028f0a1ffca9ab2a7205b91 (patch)
tree6c344e94b9c9062c731ce16742fdd67cdf147c2a /svx
parent95a296c85d72bda02df93cecf60cb9542cf32fe8 (diff)
INTEGRATION: CWS os37 (1.82.226); FILE MERGED
2004/09/07 12:00:43 os 1.82.226.1: #117819# use a copy of the FontList
Diffstat (limited to 'svx')
-rw-r--r--svx/source/dialog/chardlg.cxx15
1 files changed, 7 insertions, 8 deletions
diff --git a/svx/source/dialog/chardlg.cxx b/svx/source/dialog/chardlg.cxx
index c136f743b094..002d8e2cff0b 100644
--- a/svx/source/dialog/chardlg.cxx
+++ b/svx/source/dialog/chardlg.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: chardlg.cxx,v $
*
- * $Revision: 1.82 $
+ * $Revision: 1.83 $
*
- * last change: $Author: hr $ $Date: 2004-05-10 16:50:16 $
+ * last change: $Author: hr $ $Date: 2004-11-09 12:58:31 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -761,8 +761,6 @@ SvxCharNamePage::SvxCharNamePage( Window* pParent, const SfxItemSet& rInSet ) :
SvxCharNamePage::~SvxCharNamePage()
{
- if ( m_pImpl->m_bMustDelete )
- delete m_pImpl->m_pFontList;
delete m_pImpl;
delete m_pWestLine;
@@ -876,9 +874,10 @@ const FontList* SvxCharNamePage::GetFontList() const
/* #110771# SvxFontListItem::GetFontList can return NULL */
if ( pDocSh && ( pItem = pDocSh->GetItem( SID_ATTR_CHAR_FONTLIST ) ) )
{
- m_pImpl->m_pFontList = ( (SvxFontListItem*)pItem )->GetFontList();
- DBG_ASSERT(NULL != m_pImpl->m_pFontList,
+ DBG_ASSERT(NULL != ( (SvxFontListItem*)pItem )->GetFontList(),
"Where is the font list?")
+ m_pImpl->m_pFontList = static_cast<const SvxFontListItem*>(pItem )->GetFontList()->Clone();
+ m_pImpl->m_bMustDelete = TRUE;
}
if(!m_pImpl->m_pFontList)
{
@@ -1757,9 +1756,9 @@ void SvxCharNamePage::SetFontList( const SvxFontListItem& rItem )
if ( m_pImpl->m_bMustDelete )
{
delete m_pImpl->m_pFontList;
- m_pImpl->m_bMustDelete = FALSE;
}
- m_pImpl->m_pFontList = rItem.GetFontList();
+ m_pImpl->m_pFontList = rItem.GetFontList()->Clone();
+ m_pImpl->m_bMustDelete = TRUE;
}
// -----------------------------------------------------------------------