summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--basctl/source/basicide/baside2b.cxx15
1 files changed, 13 insertions, 2 deletions
diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx
index 14460013aed1..7349e8649fc6 100644
--- a/basctl/source/basicide/baside2b.cxx
+++ b/basctl/source/basicide/baside2b.cxx
@@ -611,6 +611,7 @@ void EditorWindow::KeyInput( const KeyEvent& rKEvt )
if( nLine+1 == pEditEngine->GetParagraphCount() )
{ //append to the end
OUString sText("\nEnd ");
+ std::cerr << "sProcType: " << sProcType << std::endl;
if( sProcType.equalsIgnoreAsciiCase("function") )
sText += OUString( "Function\n" );
if( sProcType.equalsIgnoreAsciiCase("sub") )
@@ -633,12 +634,22 @@ void EditorWindow::KeyInput( const KeyEvent& rKEvt )
{
if( sStr1.equalsIgnoreAsciiCase("sub") )
{
- pEditView->InsertText( OUString ( "\nEnd Sub\n" ) );
+ OUString sText("\nEnd ");
+ if( sProcType.equalsIgnoreAsciiCase("function") )
+ sText += OUString( "Function\n" );
+ if( sProcType.equalsIgnoreAsciiCase("sub") )
+ sText += OUString( "Sub\n" );
+ pEditView->InsertText( sText );
break;
}
if( sStr1.equalsIgnoreAsciiCase("function") )
{
- pEditView->InsertText( OUString ( "\nEnd Function\n" ) );
+ OUString sText("\nEnd ");
+ if( sProcType.equalsIgnoreAsciiCase("function") )
+ sText += OUString( "Function\n" );
+ if( sProcType.equalsIgnoreAsciiCase("sub") )
+ sText += OUString( "Sub\n" );
+ pEditView->InsertText( sText );
break;
}
if( sStr1.equalsIgnoreAsciiCase("end") )