diff options
author | Vladimir Glazounov <vg@openoffice.org> | 2003-05-15 09:52:34 +0000 |
---|---|---|
committer | Vladimir Glazounov <vg@openoffice.org> | 2003-05-15 09:52:34 +0000 |
commit | 66e367284fa328ab06d2252b975401c393b96ab8 (patch) | |
tree | 810a1766ee3e3f8c8d190d0726bbe60212560126 /framework/source/recording/dispatchrecorder.cxx | |
parent | 802961264aae78133fd56cb8a5139b1b53c2b9c9 (diff) |
INTEGRATION: CWS fwk02 (1.17.24); FILE MERGED
2003/05/13 09:19:14 as 1.17.24.3: #109316# undo cosmetic fixes
2003/05/08 09:58:00 as 1.17.24.2: #109316# show assertion for non recordable items, so they can be checked
2003/05/08 07:51:41 as 1.17.24.1: #109316# ignore non recordable items
Diffstat (limited to 'framework/source/recording/dispatchrecorder.cxx')
-rw-r--r-- | framework/source/recording/dispatchrecorder.cxx | 28 |
1 files changed, 19 insertions, 9 deletions
diff --git a/framework/source/recording/dispatchrecorder.cxx b/framework/source/recording/dispatchrecorder.cxx index 20f0f0c5bfa7..202be3676801 100644 --- a/framework/source/recording/dispatchrecorder.cxx +++ b/framework/source/recording/dispatchrecorder.cxx @@ -309,7 +309,7 @@ void SAL_CALL DispatchRecorder::AppendToBuffer( css::uno::Any aValue, ::rtl::OUS { aNew = m_xConverter->convertToSimpleType( aValue, css::uno::TypeClass_STRING ); } - catch (css::script::CannotConvertException&) { LOG_WARNING("","Type not scriptable!") } + catch (css::script::CannotConvertException&) {} catch (css::uno::Exception&) {} ::rtl::OUString sVal; aNew >>= sVal; @@ -331,6 +331,9 @@ void SAL_CALL DispatchRecorder::implts_recordMacro( const ::rtl::OUString& aURL, { ::rtl::OUStringBuffer aArgumentBuffer(1000); ::rtl::OUString sArrayName; + // this value is used to name the arrays of aArgumentBuffer + sArrayName = ::rtl::OUString::createFromAscii("args"); + sArrayName += ::rtl::OUString::valueOf((sal_Int32)m_nRecordingID); aScriptBuffer.appendAscii("rem ----------------------------------------------------------------------\n"); @@ -338,15 +341,22 @@ void SAL_CALL DispatchRecorder::implts_recordMacro( const ::rtl::OUString& aURL, sal_Int32 nValidArgs = 0; for( sal_Int32 i=0; i<nLength; ++i ) { - if(lArguments[i].Value.hasValue()) + if(!lArguments[i].Value.hasValue()) + continue; + + ::rtl::OUStringBuffer sValBuffer(100); + try { - // this value is used to name the arrays of aArgumentBuffer - if(sArrayName.getLength()<1) - { - sArrayName = ::rtl::OUString::createFromAscii("args"); - sArrayName += ::rtl::OUString::valueOf((sal_Int32)m_nRecordingID); - } + AppendToBuffer(lArguments[i].Value, sValBuffer); + } + catch(const css::uno::Exception&) + { + sValBuffer.setLength(0); + } + if (!sValBuffer.getLength()) + continue; + { ++nValidArgs; // add arg().Name @@ -366,7 +376,7 @@ void SAL_CALL DispatchRecorder::implts_recordMacro( const ::rtl::OUString& aURL, aArgumentBuffer.appendAscii("("); aArgumentBuffer.append (i); aArgumentBuffer.appendAscii(").Value = "); - AppendToBuffer( lArguments[i].Value, aArgumentBuffer); + aArgumentBuffer.append (sValBuffer.makeStringAndClear()); aArgumentBuffer.appendAscii("\n"); } } |