Kaydet (Commit) d9a749ac authored tarafından Caolán McNamara's avatar Caolán McNamara

debug code isn't going to cut it

üst db0a8b38
...@@ -171,8 +171,6 @@ public: ...@@ -171,8 +171,6 @@ public:
void Record( SfxMacroStatement *pStatement ); void Record( SfxMacroStatement *pStatement );
void Replace( SfxMacroStatement *pStatement ); void Replace( SfxMacroStatement *pStatement );
void Remove(); void Remove();
String GenerateSource() const;
}; };
#endif #endif
......
...@@ -390,17 +390,9 @@ SfxMacro::~SfxMacro() ...@@ -390,17 +390,9 @@ SfxMacro::~SfxMacro()
Virtual Destructor of the SfxMacro class. This should be overloaded in Virtual Destructor of the SfxMacro class. This should be overloaded in
the derived classes to save the recorded source in the mode the derived classes to save the recorded source in the mode
SFX_MACRO_RECORDINGABSOLUTE and SFX_MACRO_RECORDINGRELATIVE. SFX_MACRO_RECORDINGABSOLUTE and SFX_MACRO_RECORDINGRELATIVE.
[Cross-reference]
<SfxMacro::GenerateSource()const>
*/ */
{ {
#if OSL_DEBUG_LEVEL > 1
SvFileStream aStream( String::CreateFromAscii("file:///f:/testmacro.bas" ), STREAM_STD_READWRITE | STREAM_TRUNC );
aStream << ByteString( GenerateSource(), RTL_TEXTENCODING_UTF8 ).GetBuffer();
#endif
delete pImp; delete pImp;
} }
...@@ -525,34 +517,4 @@ void SfxMacro::Remove() ...@@ -525,34 +517,4 @@ void SfxMacro::Remove()
pImp->aList.Remove( pImp->aList.Count() - 1 ); pImp->aList.Remove( pImp->aList.Count() - 1 );
} }
//--------------------------------------------------------------------
String SfxMacro::GenerateSource() const
/* [Description]
This function generates BASIC source code that contains the statements, but
does not contain the header ('Sub X') and Footer ('End Sub') from recorded
<SfxMacroStatement> since the construction of the instance until the time
of calling this method.
[Cross-reference]
<SfxMacro::Record(SfxMacroStatement*)>
<SfxMacro::Repeat(SfxMacroStatement*)>
*/
{
DBG_ASSERT( pImp->eMode != SFX_MACRO_EXISTING, "invalid call to non-recording SfxMacro" );
String aSource;
for ( sal_uInt16 n = 0; n < pImp->aList.Count(); ++n )
{
aSource += pImp->aList.GetObject(n)->GetStatement();
if ( (n+1) < pImp->aList.Count() )
aSource += DEFINE_CONST_UNICODE("\n");
}
return aSource;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment