diff options
author | Sascha Ballach <sab@openoffice.org> | 2001-12-11 13:10:09 +0000 |
---|---|---|
committer | Sascha Ballach <sab@openoffice.org> | 2001-12-11 13:10:09 +0000 |
commit | 137c6bb8d55ddace637d24977ee0ab4c8355c0e9 (patch) | |
tree | a770169260006919a537e937d7d722ca80cceb06 /xmloff/source/style/xmlstyle.cxx | |
parent | 1623a952be6aff03613a4f53f4ea084b596e797f (diff) |
#95346#; delete StyleIndex_Impl if it is always in the container
Diffstat (limited to 'xmloff/source/style/xmlstyle.cxx')
-rw-r--r-- | xmloff/source/style/xmlstyle.cxx | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/xmloff/source/style/xmlstyle.cxx b/xmloff/source/style/xmlstyle.cxx index 6211d76deb59..b5e3a7574878 100644 --- a/xmloff/source/style/xmlstyle.cxx +++ b/xmloff/source/style/xmlstyle.cxx @@ -2,9 +2,9 @@ * * $RCSfile: xmlstyle.cxx,v $ * - * $Revision: 1.27 $ + * $Revision: 1.28 $ * - * last change: $Author: thb $ $Date: 2001-07-24 17:06:09 $ + * last change: $Author: sab $ $Date: 2001-12-11 14:10:09 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -463,7 +463,14 @@ const SvXMLStyleContext *SvXMLStylesContext_Impl::FindStyleChildContext( ((SvXMLStylesContext_Impl *)this)->pIndices = new SvXMLStyleIndices_Impl( aStyles.Count(), 5 ); for( sal_uInt32 i=0; i < aStyles.Count(); i++ ) - pIndices->Insert( new SvXMLStyleIndex_Impl( aStyles.GetObject(i)) ); + { + SvXMLStyleIndex_Impl* pStyleIndex = new SvXMLStyleIndex_Impl( aStyles.GetObject(i)); + if (!pIndices->Insert( pStyleIndex )) + { +// DBG_ERROR("Here is a double Style"); + delete pStyleIndex; + } + } #ifndef PRODUCT ((SvXMLStylesContext_Impl *)this)->nIndexCreated++; #endif |