From 137c6bb8d55ddace637d24977ee0ab4c8355c0e9 Mon Sep 17 00:00:00 2001 From: Sascha Ballach Date: Tue, 11 Dec 2001 13:10:09 +0000 Subject: #95346#; delete StyleIndex_Impl if it is always in the container --- xmloff/source/style/xmlstyle.cxx | 13 ++++++++++--- 1 file 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 -- cgit