From ec2ce8edaa81aa94afcfcaabd9af6f2ab7181095 Mon Sep 17 00:00:00 2001 From: Kurt Zenker Date: Fri, 4 Nov 2005 14:43:40 +0000 Subject: INTEGRATION: CWS fwk25 (1.18.500); FILE MERGED 2005/10/17 10:15:34 mba 1.18.500.1: #i54702#: wrong array index used in case of invalid parameters --- framework/source/recording/dispatchrecorder.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'framework/source/recording') diff --git a/framework/source/recording/dispatchrecorder.cxx b/framework/source/recording/dispatchrecorder.cxx index 202be3676801..c9856f6447d6 100644 --- a/framework/source/recording/dispatchrecorder.cxx +++ b/framework/source/recording/dispatchrecorder.cxx @@ -357,14 +357,12 @@ void SAL_CALL DispatchRecorder::implts_recordMacro( const ::rtl::OUString& aURL, continue; { - ++nValidArgs; - // add arg().Name if(bAsComment) aArgumentBuffer.appendAscii(REM_AS_COMMENT); aArgumentBuffer.append (sArrayName); aArgumentBuffer.appendAscii("("); - aArgumentBuffer.append (i); + aArgumentBuffer.append (nValidArgs); aArgumentBuffer.appendAscii(").Name = \""); aArgumentBuffer.append (lArguments[i].Name); aArgumentBuffer.appendAscii("\"\n"); @@ -374,10 +372,12 @@ void SAL_CALL DispatchRecorder::implts_recordMacro( const ::rtl::OUString& aURL, aArgumentBuffer.appendAscii(REM_AS_COMMENT); aArgumentBuffer.append (sArrayName); aArgumentBuffer.appendAscii("("); - aArgumentBuffer.append (i); + aArgumentBuffer.append (nValidArgs); aArgumentBuffer.appendAscii(").Value = "); aArgumentBuffer.append (sValBuffer.makeStringAndClear()); aArgumentBuffer.appendAscii("\n"); + + ++nValidArgs; } } -- cgit