From 920f6969c4b8687c67b955b2fe01f0255a7f7caf Mon Sep 17 00:00:00 2001 From: Martin Gallwey Date: Fri, 23 Feb 2001 13:31:41 +0000 Subject: The UI and API ensure that there are no duplicate entries making this code unnecessary --- sw/source/core/swg/SwXMLTextBlocks.cxx | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) (limited to 'sw') diff --git a/sw/source/core/swg/SwXMLTextBlocks.cxx b/sw/source/core/swg/SwXMLTextBlocks.cxx index 11a71f959cd2..7cc77c973d89 100644 --- a/sw/source/core/swg/SwXMLTextBlocks.cxx +++ b/sw/source/core/swg/SwXMLTextBlocks.cxx @@ -2,9 +2,9 @@ * * $RCSfile: SwXMLTextBlocks.cxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: mtg $ $Date: 2001-02-16 09:28:29 $ + * last change: $Author: mtg $ $Date: 2001-02-23 14:31:41 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -923,15 +923,29 @@ void SwXMLTextBlocks::GeneratePackageName ( const String& rShort, String& rPacka rPackageName.SetChar( nPos, rPackageName.GetChar( nPos ) & 0x0f ); ++nPos; } - if (xBlkRoot.Is() || 0 == OpenFile ( TRUE ) ) +#if 0 + /* + * We can assume that if the package name we generate is already in the storage, + * then we are over-writing it...*/ + if (xBlkRoot.Is() || 0 == OpenFile ( FALSE ) ) { + if ( xBlkRoot->IsContained( rPackageName ) ) + { + xBlkRoot->Remove ( rPackageName ); + xBlkRoot->Commit(); + } + + /* ULONG nIdx=0; while ( xBlkRoot->IsContained( rPackageName )) { ++nIdx; rPackageName += String::CreateFromInt32( nIdx ); } + */ } +#endif + } ULONG SwXMLTextBlocks::PutText( const String& rShort, const String& rName, const String& rText ) -- cgit v1.2.1