[Libreoffice-commits] .: basic/source

Joseph Powers jpowers at kemper.freedesktop.org
Wed Dec 15 21:18:35 PST 2010


 basic/source/app/appbased.cxx |    1 
 basic/source/app/appedit.cxx  |   20 +----
 basic/source/app/brkpnts.cxx  |  146 +++++++++++++++++++++---------------------
 basic/source/app/brkpnts.hxx  |   57 +++++-----------
 basic/source/app/textedit.cxx |   49 +++-----------
 5 files changed, 112 insertions(+), 161 deletions(-)

New commits:
commit 94811032bcc88c31494311af255cb6a04a394597
Author: Joseph Powers <jpowers27 at cox.net>
Date:   Wed Dec 15 21:10:10 2010 -0800

    Remove DECLARE_LIST( BreakpointList, Breakpoint* )

diff --git a/basic/source/app/appbased.cxx b/basic/source/app/appbased.cxx
index 78236df..66b92b5 100644
--- a/basic/source/app/appbased.cxx
+++ b/basic/source/app/appbased.cxx
@@ -56,7 +56,6 @@ AppBasEd::AppBasEd( BasicFrame* pParent, SbModule* p )
 
     pBreakpoints->Show();
 
-
     ((TextEdit*)pDataEdit)->GetTextEditImp().pTextView->SetAutoIndentMode( TRUE );
     ((TextEdit*)pDataEdit)->GetTextEditImp().pTextEngine->SetMaxTextLen( STRING_MAXLEN );
     ((TextEdit*)pDataEdit)->GetTextEditImp().SyntaxHighlight( TRUE );
diff --git a/basic/source/app/appedit.cxx b/basic/source/app/appedit.cxx
index f6f888b..aafa434 100644
--- a/basic/source/app/appedit.cxx
+++ b/basic/source/app/appedit.cxx
@@ -2,7 +2,7 @@
 /*************************************************************************
  *
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- * 
+ *
  * Copyright 2000, 2010 Oracle and/or its affiliates.
  *
  * OpenOffice.org - a multi-platform office productivity suite
@@ -52,9 +52,6 @@ AppEdit::AppEdit( BasicFrame* pParent )
 
     pDataEdit = new TextEdit( this, WB_LEFT );
     LoadIniFile();
-    // define Icon:
-//	pIcon = new Icon( ResId( RID_WORKICON ) );
-//	if( pIcon ) SetIcon( *pIcon );
 
     pDataEdit->SetText( aEmpty );
 
@@ -92,9 +89,7 @@ void AppEdit::LoadIniFile()
     String aFontStyle = String( aConf.ReadKey( "ScriptFontStyle", "normal" ), RTL_TEXTENCODING_UTF8 );
     String aFontSize = String( aConf.ReadKey( "ScriptFontSize", "12" ), RTL_TEXTENCODING_UTF8 );
     Font aFont = aFontList.Get( aFontName, aFontStyle );
-//    ULONG nFontSize = aFontSize.GetValue( FUNIT_POINT );
     ULONG nFontSize = aFontSize.ToInt32();
-//    aFont.SetSize( Size( nFontSize, nFontSize ) );
     aFont.SetHeight( nFontSize );
 
 #if OSL_DEBUG_LEVEL > 1
@@ -103,8 +98,6 @@ void AppEdit::LoadIniFile()
     }
 #endif
     aFont.SetTransparent( FALSE );
-//    aFont.SetAlign( ALIGN_BOTTOM );
-//    aFont.SetHeight( aFont.GetHeight()+2 );
     pDataEdit->SetFont( aFont );
 
     if ( ((TextEdit*)pDataEdit)->GetBreakpointWindow() )
@@ -132,7 +125,7 @@ void AppEdit::Command( const CommandEvent& rCEvt )
 
 IMPL_LINK( AppEdit, Scroll, ScrollBar*, pScroll )
 {
-    (void) pScroll; /* avoid warning about unused parameter */ 
+    (void) pScroll; /* avoid warning about unused parameter */
     if ( !pHScroll || !pVScroll )
         return 0;
 
@@ -184,8 +177,8 @@ void AppEdit::SetScrollBarRanges()
 
 
 USHORT AppEdit::GetLineNr()
-{ 
-  return pDataEdit->GetLineNr(); 
+{
+  return pDataEdit->GetLineNr();
 }
 
 FileType AppEdit::GetFileType()
@@ -197,12 +190,12 @@ FileType AppEdit::GetFileType()
 long AppEdit::InitMenu( Menu* pMenu )
 {
     AppWin::InitMenu (pMenu );
-    
+
     if( pDataEdit )
     {
         USHORT UndoCount = ((TextEdit*)pDataEdit)->aEdit.pTextEngine->GetUndoManager().GetUndoActionCount();
         USHORT RedoCount = ((TextEdit*)pDataEdit)->aEdit.pTextEngine->GetUndoManager().GetRedoActionCount();
-    
+
         pMenu->EnableItem( RID_EDITUNDO,	UndoCount > 0 );
         pMenu->EnableItem( RID_EDITREDO, 	RedoCount > 0 );
     }
@@ -276,7 +269,6 @@ void AppEdit::Resize()
         aStartDocPos.Y() = nMaxVisAreaStart;
         pTextView->SetStartDocPos( aStartDocPos );
         pTextView->ShowCursor();
-//              pModulWindow->GetBreakPointWindow().GetCurYOffset() = aStartDocPos.Y();
     }
     InitScrollBars();
     if ( nVisY != pTextView->GetStartDocPos().Y() )
diff --git a/basic/source/app/brkpnts.cxx b/basic/source/app/brkpnts.cxx
index 6019597..b89f649 100644
--- a/basic/source/app/brkpnts.cxx
+++ b/basic/source/app/brkpnts.cxx
@@ -2,7 +2,7 @@
 /*************************************************************************
  *
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- * 
+ *
  * Copyright 2000, 2010 Oracle and/or its affiliates.
  *
  * OpenOffice.org - a multi-platform office productivity suite
@@ -47,15 +47,12 @@
 
 struct Breakpoint
 {
-    USHORT nLine;
-
-    Breakpoint( USHORT nL )	{ nLine = nL; }
+    sal_uInt32 nLine;
+    Breakpoint( sal_uInt32 nL )	{ nLine = nL; }
 };
 
-
 ImageList* BreakpointWindow::pImages = NULL;
 
-
 BreakpointWindow::BreakpointWindow( Window *pParent )
 : Window( pParent )
 , nCurYOffset( 0 )
@@ -75,13 +72,9 @@ BreakpointWindow::BreakpointWindow( Window *pParent )
 
 void BreakpointWindow::Reset()
 {
-    Breakpoint* pBrk = First();
-    while ( pBrk )
-    {
-        delete pBrk;
-        pBrk = Next();
-    }
-    Clear();
+    for ( size_t i = 0, n = BreakpointList.size(); i < n; ++i )
+        delete BreakpointList[ i ];
+    BreakpointList.clear();
 
     pModule->ClearAllBP();
 }
@@ -102,15 +95,15 @@ void BreakpointWindow::SetBPsInModule()
 {
     pModule->ClearAllBP();
 
-    Breakpoint* pBrk = First();
-    while ( pBrk )
+    for ( size_t i = 0, n = BreakpointList.size(); i < n; ++i )
     {
+        Breakpoint* pBrk = BreakpointList[ i ];
         pModule->SetBP( (USHORT)pBrk->nLine );
 #if OSL_DEBUG_LEVEL > 1
         DBG_ASSERT( !pModule->IsCompiled() || pModule->IsBP( (USHORT)pBrk->nLine ), "Brechpunkt wurde nicht gesetzt" );
 #endif
-        pBrk = Next();
     }
+
     for ( USHORT nMethod = 0; nMethod < pModule->GetMethods()->Count(); nMethod++ )
     {
         SbMethod* pMethod = (SbMethod*)pModule->GetMethods()->Get( nMethod );
@@ -120,27 +113,30 @@ void BreakpointWindow::SetBPsInModule()
 }
 
 
-void BreakpointWindow::InsertBreakpoint( USHORT nLine )
+void BreakpointWindow::InsertBreakpoint( sal_uInt32 nLine )
 {
     Breakpoint* pNewBrk = new Breakpoint( nLine );
-    Breakpoint* pBrk = First();
-    while ( pBrk )
+
+    for ( ::std::vector< Breakpoint* >::iterator i = BreakpointList.begin();
+          i < BreakpointList.end();
+          ++ i
+        )
     {
+        Breakpoint* pBrk = *i;
         if ( nLine <= pBrk->nLine )
         {
-            if ( pBrk->nLine != nLine )
-                Insert( pNewBrk );
+            if ( nLine != pBrk->nLine )
+                BreakpointList.insert( i, pNewBrk );
             else
                 delete pNewBrk;
             pNewBrk = NULL;
-            pBrk = NULL;
+            break;
         }
-        else
-            pBrk = Next();
     }
+
     // No insert position found => LIST_APPEND
     if ( pNewBrk )
-        Insert( pNewBrk, LIST_APPEND );
+        BreakpointList.push_back( pNewBrk );
 
     Invalidate();
 
@@ -165,35 +161,34 @@ void BreakpointWindow::InsertBreakpoint( USHORT nLine )
 }
 
 
-Breakpoint*	BreakpointWindow::FindBreakpoint( ULONG nLine )
+Breakpoint*	BreakpointWindow::FindBreakpoint( sal_uInt32 nLine )
 {
-    Breakpoint* pBrk = First();
-    while ( pBrk )
+    for ( size_t i = 0, n = BreakpointList.size(); i < n; ++i )
     {
-        if ( pBrk->nLine == nLine )
-            return pBrk;
-
-        pBrk = Next();
+        Breakpoint* pBP = BreakpointList[ i ];
+        if ( pBP->nLine == nLine )
+            return pBP;
     }
-
-    return (Breakpoint*)0;
+    return NULL;
 }
 
 
-void BreakpointWindow::AdjustBreakpoints( ULONG nLine, BOOL bInserted )
+void BreakpointWindow::AdjustBreakpoints( sal_uInt32 nLine, bool bInserted )
 {
     if ( nLine == 0 ) //TODO: nLine == TEXT_PARA_ALL+1
         return;
-    Breakpoint* pBrk = First();
-    while ( pBrk )
+
+    for ( size_t i = 0; i < BreakpointList.size(); )
     {
-        BOOL bDelBrk = FALSE;
+        Breakpoint* pBrk = BreakpointList[ i ];
+        bool bDelBrk = false;
+
         if ( pBrk->nLine == nLine )
         {
             if ( bInserted )
                 pBrk->nLine++;
             else
-                bDelBrk = TRUE;
+                bDelBrk = true;
         }
         else if ( pBrk->nLine > nLine )
         {
@@ -202,18 +197,19 @@ void BreakpointWindow::AdjustBreakpoints( ULONG nLine, BOOL bInserted )
             else
                 pBrk->nLine--;
         }
-
         if ( bDelBrk )
         {
-            ULONG n = GetCurPos();
-            delete Remove( pBrk );
-            pBrk = Seek( n );
+            delete pBrk;
+            ::std::vector< Breakpoint* >::iterator it = BreakpointList.begin();
+            ::std::advance( it, i );
+            BreakpointList.erase( it );
         }
         else
         {
-            pBrk = Next();
+            ++i;
         }
     }
+
     Invalidate();
 }
 
@@ -240,14 +236,12 @@ void BreakpointWindow::SaveBreakpoints( String aFilename )
 {
     ByteString aBreakpoints;
 
-    Breakpoint* pBrk = First();
-    while ( pBrk )
+    for ( size_t i = 0, n = BreakpointList.size(); i < n; ++i )
     {
+        Breakpoint* pBrk = BreakpointList[ i ];
         if ( aBreakpoints.Len() )
             aBreakpoints += ';';
-
         aBreakpoints += ByteString::CreateFromInt32( pBrk->nLine );
-        pBrk = Next();
     }
 
     Config aConfig(Config::GetConfigName( Config::GetDefDirectory(), CUniString("testtool") ));
@@ -273,16 +267,15 @@ void BreakpointWindow::Paint( const Rectangle& )
     aBmpOff.X() = ( aOutSz.Width() - aBmpSz.Width() ) / 2;
     aBmpOff.Y() = ( nLineHeight - aBmpSz.Height() ) / 2;
 
-    Breakpoint* pBrk = First();
-    while ( pBrk )
+    for ( size_t i = 0, n = BreakpointList.size(); i < n; ++i )
     {
+        Breakpoint* pBrk = BreakpointList[ i ];
 #if OSL_DEBUG_LEVEL > 1
         DBG_ASSERT( !pModule->IsCompiled() || pModule->IsBP( pBrk->nLine ), "Brechpunkt wurde nicht gesetzt" );
 #endif
-        ULONG nLine = pBrk->nLine-1;
-        ULONG nY = nLine*nLineHeight - nCurYOffset;
+        sal_Int32 nLine = pBrk->nLine-1;
+        sal_Int32 nY = nLine*nLineHeight - nCurYOffset;
         DrawImage( Point( 0, nY ) + aBmpOff, aBrk );
-        pBrk = Next();
     }
     ShowMarker( TRUE );
 }
@@ -290,39 +283,46 @@ void BreakpointWindow::Paint( const Rectangle& )
 
 Breakpoint*	BreakpointWindow::FindBreakpoint( const Point& rMousePos )
 {
-    long nLineHeight = GetTextHeight();
-    long nYPos = rMousePos.Y() + nCurYOffset;
+    sal_Int32 nLineHeight = GetTextHeight();
+    sal_Int32 nYPos = rMousePos.Y() + nCurYOffset;
 
-    Breakpoint* pBrk = First();
-    while ( pBrk )
+    for ( size_t i = 0, n = BreakpointList.size(); i < n; ++i )
     {
-        ULONG nLine = pBrk->nLine-1;
-        long nY = nLine*nLineHeight;
+        Breakpoint* pBrk = BreakpointList[ i ];
+        sal_Int32 nLine = pBrk->nLine-1;
+        sal_Int32 nY = nLine * nLineHeight;
         if ( ( nYPos > nY ) && ( nYPos < ( nY + nLineHeight ) ) )
             return pBrk;
-        pBrk = Next();
     }
-    return 0;
+    return NULL;
 }
 
 
-void BreakpointWindow::ToggleBreakpoint( USHORT nLine )
+void BreakpointWindow::ToggleBreakpoint( sal_uInt32 nLine )
 {
-    Breakpoint* pBrk = FindBreakpoint( nLine );
-    if ( pBrk ) // remove
+    bool Removed = false;
+    for ( size_t i = 0, n = BreakpointList.size(); i < n; ++i )
     {
-        pModule->ClearBP( nLine );
-        delete Remove( pBrk );
+        Breakpoint* pBP = BreakpointList[ i ];
+        if ( pBP->nLine == nLine )              // remove
+        {
+            pModule->ClearBP( nLine );
+            delete pBP;
+            ::std::vector< Breakpoint* >::iterator it = BreakpointList.begin();
+            ::std::advance( it, i );
+            BreakpointList.erase( it );
+            Removed = true;
+            break;
+        }
     }
-    else // create one
-    {
+
+    if ( !Removed )                             // create one
         InsertBreakpoint( nLine );
-    }
 
     Invalidate();
 }
 
-void BreakpointWindow::ShowMarker( BOOL bShow )
+void BreakpointWindow::ShowMarker( bool bShow )
 {
     if ( nMarkerPos == MARKER_NOMARKER )
         return;
@@ -366,12 +366,12 @@ void BreakpointWindow::MouseButtonDown( const MouseEvent& rMEvt )
 }
 
 
-void BreakpointWindow::SetMarkerPos( USHORT nLine, BOOL bError )
+void BreakpointWindow::SetMarkerPos( sal_uInt32 nLine, bool bError )
 {
-    ShowMarker( FALSE );   // Remove old one
+    ShowMarker( false );   // Remove old one
     nMarkerPos = nLine;
     bErrorMarker = bError;
-    ShowMarker( TRUE );    // Draw new one
+    ShowMarker( true );    // Draw new one
     Update();
 }
 
diff --git a/basic/source/app/brkpnts.hxx b/basic/source/app/brkpnts.hxx
index a9c0810..99782c0 100644
--- a/basic/source/app/brkpnts.hxx
+++ b/basic/source/app/brkpnts.hxx
@@ -2,7 +2,7 @@
 /*************************************************************************
  *
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- * 
+ *
  * Copyright 2000, 2010 Oracle and/or its affiliates.
  *
  * OpenOffice.org - a multi-platform office productivity suite
@@ -27,18 +27,15 @@
  ************************************************************************/
 
 #include <vcl/window.hxx>
+#include <vector>
 
 #define MARKER_NOMARKER	0xFFFF
 
-
 class SbModule;
-class BreakpointListe;
 struct Breakpoint;
 class ImageList;
 
-DECLARE_LIST( BreakpointList, Breakpoint* )
-
-class BreakpointWindow : public Window, public BreakpointList
+class BreakpointWindow : public Window
 {
 using Window::Scroll;
 
@@ -51,46 +48,32 @@ public:
     void		SetModule( SbModule *pMod );
     void		SetBPsInModule();
 
-    void		InsertBreakpoint( USHORT nLine );
-    void		ToggleBreakpoint( USHORT nLine );
-    void		AdjustBreakpoints( ULONG nLine, BOOL bInserted );
+    void		InsertBreakpoint( sal_uInt32 nLine );
+    void		ToggleBreakpoint( sal_uInt32 nLine );
+    void		AdjustBreakpoints( sal_uInt32 nLine, bool bInserted );
 
     void		LoadBreakpoints( String aFilename );
     void		SaveBreakpoints( String aFilename );
 
-protected:
-    Breakpoint*	FindBreakpoint( ULONG nLine );
-
 private:
-    long			nCurYOffset;
-    USHORT			nMarkerPos;
-    SbModule*		pModule;
-    BOOL			bErrorMarker;
-    static ImageList *pImages;
+    ::std::vector< Breakpoint* > BreakpointList;
+    long                nCurYOffset;
+    sal_uInt32          nMarkerPos;
+    SbModule*           pModule;
+    bool                bErrorMarker;
+    static ImageList*   pImages;
 
 protected:
-    virtual void	Paint( const Rectangle& );
-    Breakpoint* 	FindBreakpoint( const Point& rMousePos );
-    void			ShowMarker( BOOL bShow );
-    virtual void	MouseButtonDown( const MouseEvent& rMEvt );
+    virtual void    Paint( const Rectangle& );
+    Breakpoint*     FindBreakpoint( const Point& rMousePos );
+    Breakpoint*     FindBreakpoint( sal_uInt32 nLine );
+    void            ShowMarker( bool bShow );
+    virtual void    MouseButtonDown( const MouseEvent& rMEvt );
 
 public:
-
-//	void			SetModulWindow( ModulWindow* pWin )
-//						{ pModulWindow = pWin; }
-
-    void			SetMarkerPos( USHORT nLine, BOOL bErrorMarker = FALSE );
-
-    virtual void        Scroll( long nHorzScroll, long nVertScroll,
-                                USHORT nFlags = 0 );
-    long&			GetCurYOffset() 		{ return nCurYOffset; }
+    void            SetMarkerPos( sal_uInt32 nLine, bool bErrorMarker = false );
+    virtual void    Scroll( long nHorzScroll, long nVertScroll, USHORT nFlags = 0 );
+    long&           GetCurYOffset() 		{ return nCurYOffset; }
 };
 
-
-
-
-
-
-
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basic/source/app/textedit.cxx b/basic/source/app/textedit.cxx
index 1936e9f..3d4d9ed 100644
--- a/basic/source/app/textedit.cxx
+++ b/basic/source/app/textedit.cxx
@@ -2,7 +2,7 @@
 /*************************************************************************
  *
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- * 
+ *
  * Copyright 2000, 2010 Oracle and/or its affiliates.
  *
  * OpenOffice.org - a multi-platform office productivity suite
@@ -88,7 +88,7 @@ BOOL TextEditImp::ViewMoved()
 
 void TextEditImp::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
 {
-    (void) rBC; /* avoid warning about unused parameter */ 
+    (void) rBC; /* avoid warning about unused parameter */
     if ( rHint.ISA( TextHint ) )
     {
         const TextHint& rTextHint = (const TextHint&)rHint;
@@ -215,7 +215,6 @@ void TextEditImp::ImpDoHighlight( const String& rSource, ULONG nLineOff )
     for ( i = 0; i < aPortionList.Count(); i++ )
     {
         SbTextPortion& r = aPortionList[i];
-//		DBG_ASSERT( r.nStart <= r.nEnd, "Highlight: Start > End?" );
         if ( r.nStart > r.nEnd ) 	// Only up to the bug of MD repaired
             continue;
 
@@ -276,7 +275,6 @@ void TextEditImp::ImpDoHighlight( const String& rSource, ULONG nLineOff )
     for ( i = 0; i < aPortionList.Count(); i++ )
     {
         SbTextPortion& r = aPortionList[i];
-//		DBG_ASSERT( r.nStart <= r.nEnd, "Highlight: Start > End?" );
         if ( r.nStart > r.nEnd ) 	// Only up to the bug of MD repaired
             continue;
 
@@ -338,12 +336,10 @@ void TextEditImp::ImpDoHighlight( const String& rSource, ULONG nLineOff )
 void TextEditImp::DoSyntaxHighlight( ULONG nPara )
 {
     // Due to delayed syntax highlight it can happen that the
-   // paragraph does no longer exist
+    // paragraph does no longer exist
     if ( nPara < pTextEngine->GetParagraphCount() )
     {
         // unfortunatly I don't know if exact this line Modified() ...
-//		if ( pProgress )
-//			pProgress->StepProgress();
         pTextEngine->RemoveAttribs( nPara );
         String aSource( pTextEngine->GetText( nPara ) );
         ImpDoHighlight( aSource, nPara );
@@ -354,8 +350,6 @@ void TextEditImp::DoDelayedSyntaxHighlight( xub_StrLen nPara )
 {
     // Paragraph is added to 'List', processed in TimerHdl.
     // => Do not manipulate paragraphs while EditEngine is formatting
-//	if ( pProgress )
-//		pProgress->StepProgress();
 
     if ( !bHighlightning && bDoSyntaxHighlight )
     {
@@ -381,16 +375,6 @@ IMPL_LINK( TextEditImp, SyntaxTimerHdl, Timer *, EMPTYARG )
         nLine = (USHORT)aSyntaxLineTable.GetCurKey();
         DoSyntaxHighlight( nLine );
         aSyntaxLineTable.Remove( nLine );
-/*		if ( Application::AnyInput() )
-        {
-            aSyntaxIdleTimer.Start();		// Launch if we are landing in a dialog
-            pTextView->ShowCursor( TRUE, TRUE );
-            pTextEngine->SetUpdateMode( TRUE );
-            bHighlightning = FALSE;
-            GetpApp()->Reschedule();
-            bHighlightning = TRUE;
-            pTextEngine->SetUpdateMode( FALSE );
-        }*/
     }
 
     BOOL bWasModified = pTextEngine->IsModified();
@@ -401,25 +385,17 @@ IMPL_LINK( TextEditImp, SyntaxTimerHdl, Timer *, EMPTYARG )
     }
     else
         pTextEngine->SetUpdateMode( TRUE );				// ! With VDev
-//	pTextView->ForceUpdate();
 
     // SetUpdateMode( TRUE ) soll kein Modify setzen
     pTextEngine->SetModified( bWasModified );
 
     // SyntaxTimerHdl wird gerufen, wenn Text-Aenderung
     // => gute Gelegenheit, Textbreite zu ermitteln!
-//	long nPrevTextWidth = nCurTextWidth;
-//	nCurTextWidth = pTextEngine->CalcTextWidth();
-//	if ( nCurTextWidth != nPrevTextWidth )
-//		SetScrollBarRanges();
     bHighlightning = FALSE;
 
     if ( aSyntaxLineTable.First() )
         aImplSyntaxIdleTimer.Start();
 
-//	while ( Application::AnyInput() )
-//		Application::Reschedule();	// Reschedule, because the UserEvent let pass no paints etc.
-
     return 0;
 }
 
@@ -450,7 +426,6 @@ void TextEditImp::SyntaxHighlight( BOOL bNew )
         for ( ULONG i = 0; i < pTextEngine->GetParagraphCount(); i++ )
             pTextEngine->RemoveAttribs( i );
 
-//		pTextEngine->QuickFormatDoc();
         pTextEngine->SetUpdateMode( TRUE );
         pTextView->ShowCursor(TRUE, TRUE );
     }
@@ -481,13 +456,15 @@ void TextEditImp::KeyInput( const KeyEvent& rKeyEvent )
         pTextView->GetTextEngine()->SetModified( bWasModified );
 }
 
-void TextEditImp::Paint( const Rectangle& rRect ){ pTextView->Paint( rRect );}
-void TextEditImp::MouseButtonUp( const MouseEvent& rMouseEvent ){ pTextView->MouseButtonUp( rMouseEvent );}
-//void TextEditImp::MouseButtonDown( const MouseEvent& rMouseEvent ){ pTextView->MouseButtonDown( rMouseEvent );}
-//void TextEditImp::MouseMove( const MouseEvent& rMouseEvent ){ pTextView->MouseMove( rMouseEvent );}
-//void TextEditImp::Command( const CommandEvent& rCEvt ){ pTextView->Command( rCEvt );}
-//BOOL TextEditImp::Drop( const DropEvent& rEvt ){ return FALSE /*pTextView->Drop( rEvt )*/;}
-//BOOL TextEditImp::QueryDrop( DropEvent& rEvt ){ return FALSE /*pTextView->QueryDrop( rEvt )*/;}
+void TextEditImp::Paint( const Rectangle& rRect )
+{
+    pTextView->Paint( rRect );
+}
+
+void TextEditImp::MouseButtonUp( const MouseEvent& rMouseEvent )
+{
+    pTextView->MouseButtonUp( rMouseEvent );
+}
 
 
 void TextEditImp::Command( const CommandEvent& rCEvt )
@@ -542,7 +519,7 @@ SbxBase* TextEditImp::GetSbxAtMousePos( String &aWord )
     Point aDocPos = pTextView->GetDocPos( aPos );
     aWord = pTextEngine->GetWord( pTextEngine->GetPaM( aDocPos ) );
 
-    if ( aWord.Len() /*&& !Application::GetAppInternational().IsNumeric( aWord )*/ )
+    if ( aWord.Len() )
     {
         xub_StrLen nLastChar = aWord.Len()-1;
         String aSuffixes = CUniString( cSuffixes );


More information about the Libreoffice-commits mailing list