[Libreoffice-commits] .: automation/source

Caolán McNamara caolan at kemper.freedesktop.org
Mon Nov 8 13:21:00 PST 2010


 automation/source/miniapp/testapp.cxx  |   54 ----
 automation/source/server/statemnt.cxx  |  397 +++------------------------------
 automation/source/testtool/objtest.cxx |  171 --------------
 3 files changed, 54 insertions(+), 568 deletions(-)

New commits:
commit 6cc8c6280a066f964e9059e4994761237464b93e
Author: Kevin Hunter <hunteke at earlham.edu>
Date:   Mon Nov 8 21:20:54 2010 +0000

    Large swathes of dead code removed

diff --git a/automation/source/miniapp/testapp.cxx b/automation/source/miniapp/testapp.cxx
index 2af55c0..9301ef2 100644
--- a/automation/source/miniapp/testapp.cxx
+++ b/automation/source/miniapp/testapp.cxx
@@ -105,10 +105,7 @@ BOOL MainWindow::Close()
 
 void MainWindow::FileExit()
 {
-/*	WriteSTBProfile();*/
-
-//	if (pApp->CloseAll())
-        pApp->Quit();
+    pApp->Quit();
 }
 
 
@@ -151,26 +148,6 @@ void MainWindow::SysDlg()
               break;
       }
 
-/*
-
-#define WB_OK					((WinBits)0x0010)
-#define WB_OK_CANCEL			((WinBits)0x0020)
-#define WB_YES_NO				((WinBits)0x0040)
-#define WB_YES_NO_CANCEL		((WinBits)0x0080)
-#define WB_RETRY_CANCEL			((WinBits)0x0100)
-
-#define WB_DEF_OK				((WinBits)0x0200)
-#define WB_DEF_CANCEL			((WinBits)0x0400)
-#define WB_DEF_RETRY			((WinBits)0x0800)
-#define WB_DEF_YES				((WinBits)0x1000)
-#define WB_DEF_NO				((WinBits)0x2000)
-
-#define RET_OK				 TRUE
-#define RET_CANCEL			 FALSE
-#define RET_YES				 2
-#define RET_NO				 3
-#define RET_RETRY			 4
-*/
 }
 
 MyApp aApp;
@@ -188,19 +165,6 @@ void MyApp::Property( ApplicationProperty& rProp )
         pTTProperties->nPropertyVersion = TT_PROPERTIES_VERSION;
         switch ( pTTProperties->nActualPR )
         {
-/*			case TT_PR_SLOTS:
-            {
-                pTTProperties->nSidOpenUrl = SID_OPENURL;
-                pTTProperties->nSidFileName = SID_FILE_NAME;
-                pTTProperties->nSidNewDocDirect = SID_NEWDOCDIRECT;
-                pTTProperties->nSidCopy = SID_COPY;
-                pTTProperties->nSidPaste = SID_PASTE;
-                pTTProperties->nSidSourceView = SID_SOURCEVIEW;
-                pTTProperties->nSidSelectAll = SID_SELECTALL;
-                pTTProperties->nSidReferer = SID_REFERER;
-                pTTProperties->nActualPR = 0;
-            }
-            break;*/
             case TT_PR_DISPATCHER:
             {
                 PlugInDispatcher* pDispatcher = GetDispatcher();
@@ -218,16 +182,6 @@ void MyApp::Property( ApplicationProperty& rProp )
                 }
             }
             break;
-/*			case TT_PR_IMG:
-            {
-                SvDataMemberObjectRef aDataObject = new SvDataMemberObject();
-                SvData* pDataBmp = new SvData( FORMAT_BITMAP );
-                pDataBmp->SetData( pTTProperties->mpBmp );
-                aDataObject->Append( pDataBmp );
-                aDataObject->CopyClipboard();
-                pTTProperties->nActualPR = 0;
-            }
-            break;*/
             default:
             {
                 pTTProperties->nPropertyVersion = 0;
@@ -240,8 +194,8 @@ void MyApp::Property( ApplicationProperty& rProp )
 
 USHORT MyDispatcher::ExecuteFunction( USHORT nSID, SfxPoolItem** ppArgs, USHORT nMode)
 {
-    (void) ppArgs; /* avoid warning about unused parameter */
-    (void) nMode; /* avoid warning about unused parameter */
+    (void) ppArgs; // avoid warning about unused parameter
+    (void) nMode;  // avoid warning about unused parameter
 
     switch (nSID)
     {
@@ -347,4 +301,4 @@ void MyApp::Main()
     Execute();
 }
 
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
\ No newline at end of file
diff --git a/automation/source/server/statemnt.cxx b/automation/source/server/statemnt.cxx
index 4fbc32c..80d579f 100644
--- a/automation/source/server/statemnt.cxx
+++ b/automation/source/server/statemnt.cxx
@@ -107,10 +107,8 @@
 
 using namespace com::sun::star::frame;
 using namespace com::sun::star::uno;
-//using namespace com::sun::star::util; geht wegen Color nicht
 using namespace com::sun::star::beans;
 using namespace svt;
-//using namespace svt::table;
 
 
 #ifndef SBX_VALUE_DECL_DEFINED
@@ -140,7 +138,6 @@ pfunc_osl_printDebugMessage StatementCommand::pOriginal_osl_DebugMessageFunc = N
     pWin->SetSmartHelpId( SmartId(4321) ); \
     pWin->SetSmartUniqueId( SmartId(1234) );
 
-// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 
 StatementFlow::StatementFlow( StatementList *pAfterThis, USHORT nArtP )
 : nArt(nArtP)
@@ -167,10 +164,10 @@ StatementFlow::StatementFlow( ULONG nServiceId, SCmdStream *pCmdIn, ImplRemoteCo
     pCmdIn->Read( nArt );
     pCmdIn->Read( nParams );
 
-    if( nParams & PARAM_USHORT_1 )  pCmdIn->Read( nSNr1 );
-    if( nParams & PARAM_ULONG_1 )   pCmdIn->Read( nLNr1 );
-    if( nParams & PARAM_STR_1 )     pCmdIn->Read( aString1 );
-    if( nParams & PARAM_BOOL_1 )    pCmdIn->Read( bBool1 );	// sollte nie auftreten!!
+    if( nParams & PARAM_USHORT_1 ) pCmdIn->Read( nSNr1 );
+    if( nParams & PARAM_ULONG_1 )  pCmdIn->Read( nLNr1 );
+    if( nParams & PARAM_STR_1 )    pCmdIn->Read( aString1 );
+    if( nParams & PARAM_BOOL_1 )   pCmdIn->Read( bBool1 );// Should NEVER happen
 
 #if OSL_DEBUG_LEVEL > 1
     m_pDbgWin->AddText( "Reading FlowControl: " );
@@ -266,7 +263,6 @@ BOOL StatementFlow::Execute()
         #endif
 
         break;
-//	case RET_:
     default:
         DBG_ERROR( "Unknown Flowcontrol" );
         break;
@@ -276,7 +272,6 @@ BOOL StatementFlow::Execute()
     return TRUE;
 }
 
-// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 
 // neue Hilfsfunktion, die stetig erweitert werden muss
 static short ImpGetRType( Window *pWin, SmartId aUId )
@@ -288,7 +283,6 @@ static short ImpGetRType( Window *pWin, SmartId aUId )
     if( (nUId & 0xE0000000) == 0 ) // keine auto ID
         nRT = C_NoType;
     else {
-//		if( (nUId & 0x1F) == 0 ) // globale Resource
         if( (nUId & 0x1FF) == 0 ) // globale Resource GH: soweit ich das verstanden habe 1FF
             nRT = (short)(C_TabPage - 1 + (nUId >> 29));
         else
@@ -350,19 +344,10 @@ static short ImpGetRType( Window *pWin, SmartId aUId )
         case WINDOW_WARNINGBOX:			nRT = C_WarningBox;		break;
         case WINDOW_ERRORBOX:			nRT = C_ErrorBox;		break;
         case WINDOW_QUERYBOX:			nRT = C_QueryBox;		break;
-#if 0 //ifndef VCL
-        case WINDOW_FILEDIALOG:			nRT = C_FileDlg;		break;
-        case WINDOW_PATHDIALOG:			nRT = C_PathDlg;		break;
-        case WINDOW_PRINTDIALOG:		nRT = C_PrintDlg;		break;
-        case WINDOW_PRINTERSETUPDIALOG:	nRT = C_PrinterSetupDlg;break;
-        case WINDOW_COLORDIALOG:		nRT = C_ColorDlg;		break;
-#endif
         case WINDOW_TABDIALOG:			nRT = C_TabDlg;			break;
-//		case WINDOW_TABDIALOG:			nRT = C_SingleTabDlg;	break;
 
         case WINDOW_PATTERNBOX:			nRT = C_PatternBox;		break;
         case WINDOW_TOOLBOX:			nRT = C_ToolBox;		break;
-// Gibts nicht       case WINDOW_VALUESET:			nRT = C_ValueSet;		break;
         case WINDOW_CONTROL:			nRT = C_Control;		break;
         case WINDOW_OKBUTTON:			nRT = C_OkButton;		break;
         case WINDOW_CANCELBUTTON:		nRT = C_CancelButton;	break;
@@ -383,7 +368,6 @@ static short ImpGetRType( Window *pWin, SmartId aUId )
     return nRT;
 }
 
-// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 
 StatementSlot::StatementSlot( SCmdStream *pCmdIn )
 : pItemArr(NULL)
@@ -504,16 +488,6 @@ public:
     BOOL bDisposed;
     BOOL bEnabled;
 };
-/*
-struct FeatureStateEvent : public ::com::sun::star::lang::EventObject
-    ::com::sun::star::util::URL FeatureURL;
-    ::rtl::OUString FeatureDescriptor;
-    sal_Bool IsEnabled;
-    sal_Bool Requery;
-    ::com::sun::star::uno::Any State;
-
-    ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > Source;
-*/
 
 SlotStatusListener::SlotStatusListener()
 : bDisposed( FALSE )
@@ -523,11 +497,7 @@ SlotStatusListener::SlotStatusListener()
 // XStatusListener
 void SAL_CALL SlotStatusListener::statusChanged( const ::com::sun::star::frame::FeatureStateEvent& Event ) throw (::com::sun::star::uno::RuntimeException)
 {
-//    DBG_ERROR1("FeatureURL: %s", ByteString( String( Event.FeatureURL.Complete ), RTL_TEXTENCODING_UTF8 ).GetBuffer() );
-//    DBG_ERROR1("FeatureDescriptor: %s", ByteString( String( Event.FeatureDescriptor ), RTL_TEXTENCODING_UTF8 ).GetBuffer() );
     bEnabled = Event.IsEnabled;
-//    DBG_ASSERT( Event.IsEnabled, "Not enabled" );
-//    DBG_ASSERT( !Event.Requery, "Requery" );
 }
 
 // XEventListener
@@ -716,7 +686,6 @@ BOOL StatementSlot::Execute()
     return TRUE;
 }
 
-// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 
 StatementUnoSlot::StatementUnoSlot(SCmdStream *pIn)
 {
@@ -732,7 +701,6 @@ StatementUnoSlot::StatementUnoSlot(SCmdStream *pIn)
 
 }
 
-// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 
 StatementCommand::StatementCommand( StatementList *pAfterThis, USHORT MethodId, USHORT Params, USHORT Nr1 )
 : nMethodId( MethodId )
@@ -967,8 +935,6 @@ void StatementCommand::WriteControlData( Window *pBase, ULONG nConf, BOOL bFirst
                 for ( i = 0; i < pTB->GetItemCount() ; i++ )
                 {
                     aName = String();
-//					if ( aName.Len() == 0 )
-//						aName = pTB->GetQuickHelpText();
                     if ( aName.Len() == 0 )
                         aName = pTB->GetHelpText( pTB->GetItemId( i ) );
                     if ( aName.Len() == 0 )
@@ -1181,8 +1147,7 @@ void SysWinContainer::Resize()
 {
     Size aSize( GetOutputSizePixel() );
     Resizing( aSize );
-//	aSize = pClientWin->GetSizePixel();
-//	aSize = pClientWin->CalcWindowSizePixel();
+
     if ( aSize != GetSizePixel() )
     {
         SetOutputSizePixel( aSize );
@@ -1263,7 +1228,6 @@ public:
     void ConfigSent() { bConfigChanged = FALSE; }
 
     BOOL IsSendData() { return GetItemState( TT_SEND_DATA ) == STATE_CHECK; }
-//	BOOL IsAllWin() { return GetItemState( TT_ALLWIN ) == STATE_CHECK; }
 
     BOOL IsDraging() { return bIsDraging; }
 
@@ -1327,8 +1291,6 @@ void DisplayHidWin::EnableButtons( ULONG nConf )
 
 void DisplayHidWin::Tracking( const TrackingEvent& rTEvt )
 {
-//	if ( nLastItemID == TT_SHOW && GetItemState( TT_SHOW ) == STATE_NOCHECK && ( rTEvt.IsTrackingEnded() || rTEvt.IsTrackingCanceled() ) )
-//		SetDraging( FALSE );
     if ( nLastItemID == TT_SHOW && GetItemState( TT_SHOW ) == STATE_NOCHECK )
         EndTracking( ENDTRACK_CANCEL );
     ToolBox::Tracking( rTEvt);
@@ -1528,7 +1490,6 @@ BOOL StatementCommand::DisplayHID()
 
 
             GetTTSettings()->Old = GetTTSettings()->Act;
-//			GetTTSettings()->Act = GetMouseWin();
             GetTTSettings()->Act = GetTTSettings()->pDisplayHidWin->LastMouseMoveWin();
 
             if ( !StatementList::WinPtrValid ( GetTTSettings()->Old ) )
@@ -1560,19 +1521,14 @@ BOOL StatementCommand::DisplayHID()
             }
             else if ( GetTTSettings()->Act )
             {
-//				SET_WIN(GetTTSettings()->Act);
                 if ( GetTTSettings()->pDisplayHidWin->IsDisplayTextModified() && GetTTSettings()->pDisplayHidWin->GetDisplayText().Len() > 0 )
                 {
                     GetTTSettings()->Act->SetSmartUniqueId( SmartId( GetTTSettings()->pDisplayHidWin->GetDisplayText().ToInt32() ) );
                     GetTTSettings()->pDisplayHidWin->ClearDisplayTextModified();
                 }
             }
-/*			if ( Application::GetLastInputInterval() > 5000 )	// 5 Sekunden lang nix geschehen
-            {
-                GetTTSettings()->pDisplayHidWin->ToTop( TOTOP_NOGRABFOCUS );
-            }
-*/
-            if ( GetTTSettings()->pDisplayHidWin->IsSendData() /*&& bBool2*/ && GetTTSettings()->Act )
+
+            if ( GetTTSettings()->pDisplayHidWin->IsSendData() && GetTTSettings()->Act )
             {
                 if ( !StatementFlow::bSending )
                 {	// Normalerweise syncronisierung über Protokoll. Hier ist das aber asyncron!!!
@@ -1580,7 +1536,7 @@ BOOL StatementCommand::DisplayHID()
                     new StatementFlow( this, F_EndCommandBlock );	// Kommando zum Senden erzeugen und in que eintragen
                 }
             }
-        }	//if ( GetTTSettings()->pDisplayHidWin->IsDraging() )
+        }
         else
         {
             if ( GetTTSettings()->Act )
@@ -1596,12 +1552,6 @@ BOOL StatementCommand::DisplayHID()
                 Advance();
                 QueStatement( NULL );
             }
-//			{					// Ersten und 2. austauschen.
-//				pFirst = pNext;
-//				pNext = pNext->pNext;
-//				pFirst->pNext = this;
-//			}
-
     }
     else
     {
@@ -1625,9 +1575,6 @@ private:
 
     Timer InplaceTimer;
 
-//	virtual void MouseButtonUp( const MouseEvent& rMEvt );
-//	virtual void MouseMove( const MouseEvent& rMEvt );
-
     PushButton PushButtonTT_PB_NEXT;
     GroupBox GroupBoxTT_GB_TRANSLATION;
     Edit EditTT_E_NEW;
@@ -1753,7 +1700,6 @@ IMPL_LINK( TranslateWin, DoSelect, PushButton*, EMPTYARG )
 {
     if ( bSelecting )
     {
-//		ReleaseMouse();
         bSelecting = FALSE;
     }
     else
@@ -1761,7 +1707,6 @@ IMPL_LINK( TranslateWin, DoSelect, PushButton*, EMPTYARG )
         if ( TestChangedDataSaved() )
         {
             PushButtonTT_PB_RESTORE.Disable();
-//			CaptureMouse();
             bSelecting = TRUE;
         }
     }
@@ -1868,14 +1813,8 @@ long TranslateWin::VCLEventHook( NotifyEvent& rEvt )
             }
             else if ( Act )
             {
-    //			SET_WIN(Act);
-            }
-    /*		if ( Application::GetLastInputInterval() > 5000 )	// 5 Sekunden lang nix geschehen
-            {
-                ToTop();
             }
-    */
-        }	//if ( bSelecting )
+        }
         else
         {
             if ( Act )
@@ -1909,7 +1848,6 @@ long TranslateWin::VCLEventHook( NotifyEvent& rEvt )
                 EditTT_E_COMMENT.Enable();
                 PushButtonTT_PB_ACCEPT.Enable();
             }
-    //		ReleaseMouse();
             bSelecting = FALSE;
         }
     }
@@ -2125,7 +2063,6 @@ void StatementCommand::Translate()
         GetTTSettings()->bToTop = FALSE;
     }
 
-//	GetTTSettings()->pTranslateWin->GetWindow( WINDOW_OVERLAP )->Enable( TRUE, TRUE );
     GetTTSettings()->pTranslateWin->GetWindow( WINDOW_OVERLAP )->EnableInput( TRUE, TRUE );
 
     if ( GetTTSettings()->pTranslateWin->IsTranslationAvailable() )
@@ -2270,7 +2207,6 @@ Window* StatementCommand::GetNextRecoverWin()
             {
                 Window* pTB = pControl->GetChild( 0 );
                 if ( pControl->GetChildCount() == 1 && pTB->GetType() == WINDOW_TOOLBOX )
-//				    return pTB;
                     ;   // do not act on floating toolboxes #i38796
                 else
                     return pControl;
@@ -2457,7 +2393,7 @@ BOOL StatementCommand::Execute()
                                             }
                                             nNr1++;
                                             break;
-                                        case 2:		// BUG 48239
+                                        case 2:
                                         case 1:
                                             if ( pBD->GetPushButton( BUTTONID_NO ) )
                                             {
@@ -2516,48 +2452,45 @@ BOOL StatementCommand::Execute()
                                     ||	(pControl->GetType() == WINDOW_WORKWINDOW)
                                     ||	(pControl->GetType() == WINDOW_BORDERWINDOW) ) )
                         {
-    //						if ( pControl->GetStyle() & WB_CLOSEABLE )
-                            {
 #ifdef RESET_APPLICATION_TO_BACKING_WINDOW
-                                // Special handling for last Document; do not close the Frame, only the Document
-                                if ( GetDocWinCount() == 1 && IsDocFrame( pControl ) )
+                            // Special handling for last Document; do not close the Frame, only the Document
+                            if ( GetDocWinCount() == 1 && IsDocFrame( pControl ) )
+                            {
+                                if ( IsDocWin( pControl ) )
                                 {
-                                    if ( IsDocWin( pControl ) )
+                                    if ( GetDocFrameMenuBar( pControl ) )
                                     {
-                                        if ( GetDocFrameMenuBar( pControl ) )
+                                        MenuBar* pMenu = GetDocFrameMenuBar( pControl );
+                                        if ( pMenu->HasCloser() )
                                         {
-                                            MenuBar* pMenu = GetDocFrameMenuBar( pControl );
-                                            if ( pMenu->HasCloser() )
-                                            {
-                                                REPORT_WIN_CLOSED( pControl, TypeString(pControl->GetType()));
-                                                SET_WINP_CLOSING(pControl);
+                                            REPORT_WIN_CLOSED( pControl, TypeString(pControl->GetType()));
+                                            SET_WINP_CLOSING(pControl);
 
-                                                pMenu->GetCloserHdl().Call( pMenu );
+                                            pMenu->GetCloserHdl().Call( pMenu );
 
-                                                // nur bei TaskWindows!
-                                                if ( (Window*)nLNr1 != pControl )
-                                                    nNr1 = 1;		// Zum durchprobieren der Buttons beim Schließen
-                                                nLNr1 = (ULONG)pControl;
+                                            // nur bei TaskWindows!
+                                            if ( (Window*)nLNr1 != pControl )
+                                                nNr1 = 1;		// Zum durchprobieren der Buttons beim Schließen
+                                            nLNr1 = (ULONG)pControl;
 
-                                                return FALSE;
-                                            }
+                                            return FALSE;
                                         }
                                     }
                                 }
-                                else
+                            }
+                            else
 #endif // def RESET_APPLICATION_TO_BACKING_WINDOW
-                                {
-                                    REPORT_WIN_CLOSED( pControl, TypeString(pControl->GetType()));
-                                    SET_WINP_CLOSING(pControl);
-                                    ((SystemWindow*)pControl)->Close();
+                            {
+                                REPORT_WIN_CLOSED( pControl, TypeString(pControl->GetType()));
+                                SET_WINP_CLOSING(pControl);
+                                ((SystemWindow*)pControl)->Close();
 
-                                    // Eigentlich nur bei TaskWindows!
-                                    if ( (Window*)nLNr1 != pControl )
-                                        nNr1 = 1;		// Zum durchprobieren der Buttons beim Schließen
-                                    nLNr1 = (ULONG)pControl;
+                                // Eigentlich nur bei TaskWindows!
+                                if ( (Window*)nLNr1 != pControl )
+                                    nNr1 = 1;		// Zum durchprobieren der Buttons beim Schließen
+                                nLNr1 = (ULONG)pControl;
 
-                                    return FALSE;
-                                }
+                                return FALSE;
                             }
                         }
                     }
@@ -2641,8 +2574,6 @@ BOOL StatementCommand::Execute()
         {
             BOOL bWait = FALSE;
             ReportError( GEN_RES_STR0( S_NO_ACTIVE_WINDOW ) );
-//			if ( Application::GetAppWindow() )
-//				bWait = Application::GetAppWindow()->IsWait();
             pRet->GenReturn ( RET_Value, aSmartMethodId, bWait );
             break;
         }
@@ -3012,8 +2943,6 @@ BOOL StatementCommand::Execute()
                             nErrorcode = aDir.GetError();
                             if ( !nErrorcode && !aDir.MakeDir() )
                                 nErrorcode = FSYS_ERR_UNKNOWN;
-//	Workaround für Bug 60693
-//								nErrorcode = aDir.GetError();
                         }
                         break;
                     case RC_FileCopy:
@@ -3097,7 +3026,7 @@ BOOL StatementCommand::Execute()
                                         break;
                                     }
                                     DirEntry aNextEntry=(*(pDir))[nDirPos++];
-                                    aPath = aNextEntry.GetName(); //Full();
+                                    aPath = aNextEntry.GetName();
                     #ifdef WIN
                                     aNextEntry.ToAbs();
                                     String sFull(aNextEntry.GetFull());
@@ -3130,60 +3059,6 @@ BOOL StatementCommand::Execute()
                                 pRet->GenReturn ( RET_Value, aSmartMethodId, aPath );
                             }
                             
-                            
-                            
-/* keep old Implementation for now                            
-                            // neues Verzeichnis einlesen
-                            if ( (nParams & PARAM_STR_1) )
-                            {
-                                if ( pDir )
-                                {
-                                    delete pDir;
-                                    pDir = NULL;
-                                }
-                                DirEntryKind aDirEntryKind = FSYS_KIND_FILE | FSYS_KIND_DIR;
-                                if ( (nParams & PARAM_USHORT_1) && nNr1 )
-                                {
-                                    if ( nNr1 & 16 )
-                                        aDirEntryKind = FSYS_KIND_DIR;
-                                    else
-                                        ReportError( GEN_RES_STR0( S_SELECTION_BY_ATTRIBUTE_ONLY_DIRECTORIES ) );
-                                }
-
-                                DirEntry aEntry( aString1 );
-                                nErrorcode = aEntry.GetError();
-                                if ( !nErrorcode )
-                                {
-                                    nDirPos = 0;
-                                    FileStat aFS( aEntry );
-                                    if ( !aFS.IsKind( FSYS_KIND_WILD ) && !aFS.IsKind( FSYS_KIND_DIR ) && aEntry.Exists() )
-                                    {	// Sonderbehandlung für genau einen Eintrag
-                                        if ( !aFS.IsKind( FSYS_KIND_DIR ) && ( aDirEntryKind == FSYS_KIND_DIR ) )
-                                            pRet->GenReturn ( RET_Value, aSmartMethodId, String() );
-                                        else
-                                            pRet->GenReturn ( RET_Value, aSmartMethodId, (String)(aEntry.GetName()) );
-
-                                        break;
-                                    }
-                                    else
-                                    {
-                                        pDir = new Dir( aEntry, aDirEntryKind );
-                                        nErrorcode = pDir->GetError();
-                                    }
-                                }
-                            }
-
-                            if ( !pDir )
-                                pDir = new Dir;
-
-                            if ( !nErrorcode && ValueOK( aSmartMethodId, GEN_RES_STR0( S_NO_MORE_FILES ), nDirPos+1, pDir->Count()+1 ) )
-                            {
-                                if ( nDirPos == pDir->Count() )
-                                    pRet->GenReturn ( RET_Value, aSmartMethodId, String() );
-                                else
-                                    pRet->GenReturn ( RET_Value, aSmartMethodId, (String)((*pDir)[ nDirPos ].GetName()) );
-                                nDirPos++;
-                            }*/
                         }
                         break;
                     case RC_FileLen:
@@ -3323,18 +3198,13 @@ BOOL StatementCommand::Execute()
         case RC_GetMouseStyle:
             {
                 Pointer aPointer;
-//				if ( DragManager::GetDragManager() )
-//					aPointer = DragManager::GetDragManager()->GetDragPointer();
-//				else
+                Window *pActualWin = GetMouseWin();
+                if ( pActualWin )
+                    aPointer = pActualWin->GetPointer();
+                else
                 {
-                    Window *pActualWin = GetMouseWin();
-                    if ( pActualWin )
-                        aPointer = pActualWin->GetPointer();
-                    else
-                    {
-                        ReportError( GEN_RES_STR1( S_POINTER_OUTSIDE_APPWIN, RcString( nMethodId ) ) );
-                        aPointer = Pointer( POINTER_NULL );
-                    }
+                    ReportError( GEN_RES_STR1( S_POINTER_OUTSIDE_APPWIN, RcString( nMethodId ) ) );
+                    aPointer = Pointer( POINTER_NULL );
                 }
                 pRet->GenReturn ( RET_Value, aSmartMethodId, (comm_ULONG)aPointer.GetStyle() );
             }
@@ -3552,8 +3422,6 @@ BOOL StatementCommand::UnpackStorage( SotStorageRef xStorage, DirEntry &aBaseDir
 }
 
 
-// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-
 StatementControl::StatementControl( SCmdStream *pCmdIn, USHORT nControlIdType )
 : StatementList()
 , nNr1( 0 )
@@ -3610,8 +3478,6 @@ StatementControl::StatementControl( SCmdStream *pCmdIn, USHORT nControlIdType )
     if( nParams & PARAM_ULONG_1 )	{m_pDbgWin->AddText( " nl1:" );m_pDbgWin->AddText( String::CreateFromInt64( nLNr1 ) );}
     if( nParams & PARAM_STR_1 )		{m_pDbgWin->AddText( " s1:" );m_pDbgWin->AddText( aString1 );}
     if( nParams & PARAM_STR_2 )		{m_pDbgWin->AddText( " s2:" );m_pDbgWin->AddText( aString2 );}
-/*    if( nParams & PARAM_BOOL_1 )    pCmdIn->Read( bBool1 );
-    if( nParams & PARAM_BOOL_2 )    pCmdIn->Read( bBool2 );*/
     m_pDbgWin->AddText( "\n" );
 #endif
 }
@@ -3650,10 +3516,8 @@ BOOL IsDialog(Window *pWin)
 
 
             return TRUE;
-//			break;
         default:
             return FALSE;
-//			break;
     }
 }
 
@@ -4178,11 +4042,9 @@ BOOL StatementControl::HandleCommonMethods( Window *pControl )
                 Size aS = pControl->GetOutputSizePixel();
                 Point aPos = Point(aS.Width() * nNr1 / 100,aS.Height() * nNr2 / 100);
                 Window *pActualWin = pControl->FindWindow( aPos );
-//					AnimateMouse( pControl, aPos );
 
                 if ( pActualWin )
                     aPos = pActualWin->AbsoluteScreenToOutputPixel( pControl->OutputToAbsoluteScreenPixel ( aPos ) );
-//					aPos = pActualWin->ScreenToOutputPixel( pControl->OutputToScreenPixel ( aPos ) );
                 else
                     pActualWin = pControl;
 
@@ -4201,12 +4063,10 @@ BOOL StatementControl::HandleCommonMethods( Window *pControl )
 
                 if ( pActualWin )
                     aPos = pActualWin->AbsoluteScreenToOutputPixel( pControl->OutputToAbsoluteScreenPixel ( aPos ) );
-//					aPos = pActualWin->ScreenToOutputPixel( pControl->OutputToScreenPixel ( aPos ) );
                 else
                     pActualWin = pControl;
 
                 AnimateMouse( pActualWin, aPos );
-//					pActualWin->GrabFocus();
                 MouseEvent aMEvt( aPos, 1, MOUSE_SIMPLECLICK|MOUSE_SELECT, nButton );
                 ImplMouseButtonUp( pActualWin, aMEvt );
             }
@@ -4221,13 +4081,11 @@ BOOL StatementControl::HandleCommonMethods( Window *pControl )
                 if ( pActualWin )
                 {
                     aPos = pActualWin->AbsoluteScreenToOutputPixel( pControl->OutputToAbsoluteScreenPixel ( aPos ) );
-//					aPos = pActualWin->ScreenToOutputPixel( pControl->OutputToScreenPixel ( aPos ) );
                 }
                 else
                     pActualWin = pControl;
 
                 AnimateMouse( pActualWin, aPos );
-//					pActualWin->GrabFocus();
                 MouseEvent aMEvt( aPos, 0, MOUSE_SIMPLEMOVE|MOUSE_DRAGMOVE, nButton );
                 ImplMouseMove( pActualWin, aMEvt );
             }
@@ -4242,7 +4100,6 @@ BOOL StatementControl::HandleCommonMethods( Window *pControl )
                 if ( pActualWin )
                 {
                     aPos = pActualWin->AbsoluteScreenToOutputPixel( pControl->OutputToAbsoluteScreenPixel ( aPos ) );
-//					aPos = pActualWin->ScreenToOutputPixel( pControl->OutputToScreenPixel ( aPos ) );
                 }
                 else
                     pActualWin = pControl;
@@ -4315,7 +4172,6 @@ BOOL StatementControl::HandleCommonMethods( Window *pControl )
                         if ( pActualWin )
                         {
                             aPos = pActualWin->AbsoluteScreenToOutputPixel( pControl->OutputToAbsoluteScreenPixel ( aPos ) );
-    //		    			aPos = pActualWin->ScreenToOutputPixel( pControl->OutputToScreenPixel ( aPos ) );
                             pControl = pActualWin;
                         }
                     }
@@ -4384,10 +4240,6 @@ BOOL StatementControl::HandleCommonMethods( Window *pControl )
                 pControl = pTemp;	// So daß wir unten ohne Fehler durchkommen
                 SplitWindow *pSW = (SplitWindow*) pTemp;
 
-//	Rectangle			GetAutoHideRect() const;
-//	Rectangle			GetFadeInRect() const;
-//	Rectangle			GetFadeOutRect() const;
-
                 switch( nMethodId )
                 {
                     case M_FadeIn:
@@ -4408,7 +4260,6 @@ BOOL StatementControl::HandleCommonMethods( Window *pControl )
                             ImplMouseButtonDown( pControl, aMEvnt, FORCE_DIRECT_CALL );
                             ImplMouseButtonUp  ( pControl, aMEvnt, FORCE_DIRECT_CALL );
                         }
-//								pSW->AutoHide();
                         break;
                     case M_IsFadeIn:
                         pRet->GenReturn ( RET_Value, aUId, pSW->IsFadeOutButtonVisible() );
@@ -4630,7 +4481,7 @@ BOOL StatementControl::Execute()
             if ( aSeconds < nNr2 )			// Falls die Stunde umgesprungen ist
                 aSeconds += 60*60;
 
-            if ( /* !IsAccessable(pControl)#87019# */ !pControl || !pControl->IsVisible() )
+            if ( !pControl || !pControl->IsVisible() )
                 pControl = NULL;
             if ( ((nMethodId == M_Exists) && pControl) ||
                  ((nMethodId == M_NotExists) && !pControl) )
@@ -4646,7 +4497,6 @@ BOOL StatementControl::Execute()
             Advance();
             delete this;
             return TRUE;
-//			break;
     }
 
 
@@ -4664,8 +4514,6 @@ BOOL StatementControl::Execute()
 
     if (   nRT == C_Window &&       // Search for WorkWindow to satisfy these commands
          ( nMethodId == M_Close
-//		|| nMethodId == M_Size
-//		|| nMethodId == M_Move
         || nMethodId == M_IsMax
         || nMethodId == M_IsMin
         || nMethodId == M_IsRestore
@@ -4707,8 +4555,7 @@ BOOL StatementControl::Execute()
             && nMethodId != M_TypeKeys			// TypeKeys macht das selbst, falls eigenes Focushandling gewünscht
             && nMethodId != M_MouseDown
             && nMethodId != M_MouseUp
-            && nMethodId != M_MouseMove
-            /*&& nMethodId != M_MouseDoubleClick*/ )
+            && nMethodId != M_MouseMove )
         {
             if ( !pControl->HasFocus() )
             {
@@ -4749,19 +4596,9 @@ BOOL StatementControl::Execute()
             && nMethodId != M_TypeKeys			// TypeKeys macht das selbst, falls eigenes Focushandling gewünscht
             && nMethodId != M_MouseDown
             && nMethodId != M_MouseUp
-            && nMethodId != M_MouseMove
-            /*&& nMethodId != M_MouseDoubleClick*/ )
+            && nMethodId != M_MouseMove )
             pControl->GrabFocus();
 
-/*  leads to problems because settext sets the text whereas typekeys adds to the text.
-        if ( bDoTypeKeysDelay && nMethodId == M_SetText && ( nParams & PARAM_STR_1 ) )
-        {	// Hier wird das Statement auf ein TypeKeys umgebogen
-            nMethodId = M_TypeKeys;
-            nParams = PARAM_BOOL_1 | PARAM_STR_1;
-            bBool1 = TRUE;
-            pControl->GrabFocus();
-        }
-*/
         if ( !HandleCommonMethods( pControl ) )
         {
             switch( nRT )
@@ -5371,9 +5208,6 @@ BOOL StatementControl::Execute()
                                         if ( aRect.IsEmpty() )
                                         {
                                             pTB->ExecuteCustomMenu();
-/*					                        aRect = pTB->GetMenubuttonRect();
-                                            MouseEvent aMEvnt(aRect.Center(),1,MOUSE_SIMPLECLICK,MOUSE_LEFT);
-                                            ImplMouseButtonDown( pTB, aMEvnt );*/
 
                                             aSubMenuId1 = SmartId();
                                             aSubMenuId2 = SmartId();
@@ -5587,16 +5421,7 @@ BOOL StatementControl::Execute()
                                 bBool1 = TRUE;
                             if( nParams & PARAM_STR_1 )
                             {
-/*									ListBox *pLB = ((ListBox*)pControl);
-                                if ( pLB->GetEntryPos( aString1 ) == LISTBOX_ENTRY_NOTFOUND )
-                                    ReportError( aUId, GEN_RES_STR2( S_ENTRY_NOT_FOUND, MethodString( nMethodId ), aString1 ) );
-                                else
-                                {
-                                    pLB->SelectEntry( aString1, bBool1 );
-                                    if ( pLB->IsEntrySelected( aString1 ) ? !bBool1 : bBool1 )	// XOR rein mit BOOL
-                                        ReportError( aUId, GEN_RES_STR2( S_METHOD_FAILED, MethodString( nMethodId ), aString1 ) );
-                                }
-*/									ReportError( aUId, GEN_RES_STR1( S_SELECT_DESELECT_VIA_STRING_NOT_IMPLEMENTED, MethodString( nMethodId ) ) );
+                                ReportError( aUId, GEN_RES_STR1( S_SELECT_DESELECT_VIA_STRING_NOT_IMPLEMENTED, MethodString( nMethodId ) ) );
                             }
                             else
                             {
@@ -5823,64 +5648,6 @@ BOOL StatementControl::Execute()
                                         EditBrowseBox* pEBBox = dynamic_cast< EditBrowseBox* >(pControl);
                                         switch( nMethodId )
                                         {
-
-
-    /*
-
-
-    BOOL			MakeFieldVisible( long nRow, USHORT nColId, BOOL bComplete = FALSE );
-    // access to dynamic values of cursor row
-    String          GetColumnTitle( USHORT nColumnId ) const;
-    USHORT          GetColumnId( USHORT nPos ) const;
-    USHORT          GetColumnPos( USHORT nColumnId ) const;
-    // access and movement of cursor
-    long            GetCurRow() const { return nCurRow; }
-    USHORT          GetCurColumnId() const { return nCurColId; }
-    BOOL            GoToRow( long nRow );
-    BOOL			GoToRowAndDoNotModifySelection( long nRow );
-    BOOL            GoToColumnId( USHORT nColId );
-    BOOL            GoToRowColumnId( long nRow, USHORT nColId );
-    // selections
-    void            SetNoSelection();
-    void            SelectAll();
-    void            SelectRow( long nRow, BOOL bSelect = TRUE, BOOL bExpand = TRUE );
-    void            SelectColumnPos( USHORT nCol, BOOL bSelect = TRUE )
-                        { SelectColumnPos( nCol, bSelect, TRUE); }
-    void            SelectColumnId( USHORT nColId, BOOL bSelect = TRUE )
-                        { SelectColumnPos( GetColumnPos(nColId), bSelect, TRUE); }
-    long            GetSelectRowCount() const;
-    USHORT          GetSelectColumnCount() const;
-    BOOL            IsRowSelected( long nRow ) const;
-    BOOL            IsColumnSelected( USHORT nColumnId ) const;
-    long            FirstSelectedRow( BOOL bInverse = FALSE );
-    long            LastSelectedRow( BOOL bInverse = FALSE );
-    long            PrevSelectedRow();
-    long            NextSelectedRow();
-    const MultiSelection* GetSelection() const
-                    { return bMultiSelection ? uRow.pSel : 0; }
-    void			SetSelection( const MultiSelection &rSelection );
-
-    virtual String  GetCellText(long _nRow, USHORT _nColId) const;
-    USHORT GetColumnCount() const { return ColCount(); }
-protected:   
-    virtual long    GetRowCount() const;
-
-
-    EditBrowseBox
-
-            sal_Bool IsEditing() const {return aController.Is();}
-            void InvalidateStatusCell(long nRow) {RowModified(nRow, 0);}
-            void InvalidateHandleColumn();
-
-            CellControllerRef Controller() const { return aController; }
-            sal_Int32	GetBrowserFlags() const { return m_nBrowserFlags; }
-
-            virtual void ActivateCell(long nRow, sal_uInt16	nCol, sal_Bool bSetCellFocus = sal_True);
-            virtual void DeactivateCell(sal_Bool bUpdate = sal_True);
-
-
-
-    */
                                             case M_GetSelText :
                                                 {
                                                     pRet->GenReturn ( RET_Value, aUId, pEBBox->GetCellText( pEBBox->GetCurrRow(), pEBBox->GetColumnId( pEBBox->GetCurrColumn() )));
@@ -5929,69 +5696,6 @@ protected:
                                                 }
                                                 break;
                                                 
-                                                
-                                                
-                                                /*
-                                            case M_GetSelCount :
-                                                pRet->GenReturn ( RET_Value, aUId, comm_ULONG(((SvLBox*)pControl)->GetSelectionCount()));
-                                                break;
-                                            case M_GetSelIndex :
-                                                if ( ! (nParams & PARAM_USHORT_1) )
-                                                    nNr1 = 1;
-                                                if ( ValueOK(aUId, CUniString("GetSelIndex"),nNr1,((SvLBox*)pControl)->GetSelectionCount()) )
-                                                {
-                                                    nNr1--;
-                                                    COUNT_LBOX( FirstSelected, NextSelected, nNr1);
-                                                    pRet->GenReturn ( RET_Value, aUId, comm_ULONG( ((SvTreeListBox*)pControl)->GetVisiblePos( pThisEntry )) +1 );
-                                                }
-                                                break;
-                                            case M_GetSelText :
-                                                if ( ! (nParams & PARAM_USHORT_1) )
-                                                    nNr1 = 1;
-                                                if ( ValueOK(aUId, CUniString("GetSelText"),nNr1,((SvLBox*)pControl)->GetSelectionCount()) )
-                                                {
-                                                    nNr1--;
-                                                    COUNT_LBOX( FirstSelected, NextSelected, nNr1);
-                                                    GetFirstValidTextItem( pThisEntry );
-                                                    pRet->GenReturn ( RET_Value, aUId, pItem->GetText() );
-                                                }
-                                                break;
-                                            case M_GetItemCount :
-                                                pRet->GenReturn ( RET_Value, aUId, comm_ULONG(((SvLBox*)pControl)->GetVisibleCount()) );
-                                                break;
-                                            case M_GetItemText :
-                                                if ( ValueOK(aUId, MethodString( nMethodId ),nNr1,((SvLBox*)pControl)->GetVisibleCount()) )
-                                                {
-                                                    SvLBoxEntry *pEntry = (SvLBoxEntry*)((SvTreeListBox*)pControl)->GetEntryAtVisPos( nNr1-1 );
-                                                    GetFirstValidTextItem( pEntry );
-                                                    pRet->GenReturn ( RET_Value, aUId, pItem->GetText() );
-                                                }
-                                                break;
-                                            case M_Select :
-                                                if ( ! (nParams & PARAM_BOOL_1) )
-                                                    bBool1 = TRUE;
-                                                if( nParams & PARAM_STR_1 )
-                                                {
-                / *									ListBox *pLB = ((ListBox*)pControl);
-                                                    if ( pLB->GetEntryPos( aString1 ) == LISTBOX_ENTRY_NOTFOUND )
-                                                        ReportError( aUId, GEN_RES_STR2( S_ENTRY_NOT_FOUND, MethodString( nMethodId ), aString1 ) );
-                                                    else
-                                                    {
-                                                        pLB->SelectEntry( aString1, bBool1 );
-                                                        if ( pLB->IsEntrySelected( aString1 ) ? !bBool1 : bBool1 )	// XOR rein mit BOOL
-                                                            ReportError( aUId, GEN_RES_STR2( S_METHOD_FAILED, MethodString( nMethodId ), aString1 ) );
-                                                    }
-                * /									ReportError( aUId, GEN_RES_STR1( S_SELECT_DESELECT_VIA_STRING_NOT_IMPLEMENTED, MethodString( nMethodId ) ) );
-                                                }
-                                                else
-                                                {
-                                                    if ( ValueOK(aUId, MethodString( nMethodId ),nNr1,((SvLBox*)pControl)->GetVisibleCount()) )
-                                                    {
-                                                        SvLBoxEntry *pEntry = (SvLBoxEntry*)((SvTreeListBox*)pControl)->GetEntryAtVisPos( nNr1-1 );
-                                                        ((SvTreeListBox*)pControl)->Select ( pEntry, bBool1 );
-                                                    }
-                                                }
-                                                break;*/
                                             default:
                                                 ReportError( aUId, GEN_RES_STR2c2( S_UNKNOWN_METHOD, MethodString(nMethodId), "EditBrowseBox" ) );
                                                 break;
@@ -6204,9 +5908,6 @@ protected:
                                                                     pRet->GenReturn ( RET_Value, aUId, aContent );
                                                                 }
                                                                 break;
-                                                            //case TypeClass_FLOAT:			break;
-                                                            //case TypeClass_DOUBLE:		break;
-                                                            //case TypeClass_OCTET:			break;
                                                             case TypeClass_BYTE:
                                                             case TypeClass_SHORT:
                                                             case TypeClass_LONG:
@@ -6219,7 +5920,6 @@ protected:
                                                                     pRet->GenReturn ( RET_Value, aUId, val );
                                                                 }
                                                                 break;
-                                                            //case TypeClass_UNSIGNED_OCTET:break;
                                                             case TypeClass_UNSIGNED_SHORT:
                                                                 {
                                                                     comm_USHORT val = 0;
@@ -6251,7 +5951,6 @@ protected:
                                                         if ( pTC->GoToRow( ::svt::table::RowPos( nNr1-1 ) ) )
                                                         {
                                                             Size aSize( pTC->GetSizePixel() );
-//                                                            DirectLog( S_QAError, UniString::CreateFromInt32( aSize.Width() ).Append( UniString::CreateFromInt32( aSize.Height() ) ) );
                                                             Point aPos( aSize.Width() / 2, aSize.Height() / 2 );
                                                             long nStep = aSize.Height() / 4;
                                                             ::svt::table::RowPos nLastPos;
@@ -6352,7 +6051,6 @@ protected:
                             pRet->GenReturn ( RET_Value, aUId, (comm_BOOL) !((DockingWindow*)pControl)->IsFloatingMode());
                             break;
                         case M_Close:
-                                //aWindowWaitUId = aUId;
                             DBG_ASSERT( aUId.Matches( pControl->GetSmartUniqueOrHelpId() ), "aUID != UniqueOrHelpId");
                             SET_WINP_CLOSING(pControl);
                             ((DockingWindow*)pControl)->Close();
@@ -6516,7 +6214,6 @@ protected:
                         case M_Size:
                         case M_Move:
                             goto FloatWin;
-//							break;
                         case M_IsMax :
                             pRet->GenReturn ( RET_Value, aUId, ((WorkWindow*)pControl)->IsMaximized() );
                             break;
diff --git a/automation/source/testtool/objtest.cxx b/automation/source/testtool/objtest.cxx
index df6f227..199b368 100644
--- a/automation/source/testtool/objtest.cxx
+++ b/automation/source/testtool/objtest.cxx
@@ -354,7 +354,6 @@ TestToolObj::TestToolObj( String aName, String aFilePath )              // Inter
     pImpl = new ImplTestToolObj;
     pImpl->ProgParam = String();
     pImpl->aFileBase = DirEntry(aFilePath);
-//	pImpl->aLogFileBase = DirEntry();
     pImpl->aHIDDir = DirEntry(aFilePath);
     pImpl->bIsStart = FALSE;
     pImpl->pMyBasic = NULL;
@@ -597,10 +596,6 @@ void TestToolObj::InitTestToolObj()
     MAKE_TT_KEYWORD( "Kontext", SbxCLASS_METHOD, SbxNULL, ID_Kontext );
     MAKE_TT_KEYWORD( "GetNextError", SbxCLASS_VARIABLE, SbxVARIANT, ID_GetError );
     MAKE_TT_KEYWORD( "Start", SbxCLASS_METHOD, SbxSTRING, ID_Start );
-//		pMeth = Make( "Kill", SbxCLASS_METHOD, SbxNULL );
-//		pMeth->SetUserData( ID_Kill );
-    /*      pMeth = Make( "TestReset", SbxCLASS_METHOD, SbxNULL );
-        pMeth->SetUserData( ID_Reset );*/
     MAKE_TT_KEYWORD( "Use", SbxCLASS_METHOD, SbxNULL, ID_Use );
     MAKE_TT_KEYWORD( "StartUse", SbxCLASS_METHOD, SbxNULL, ID_StartUse );
     MAKE_TT_KEYWORD( "FinishUse", SbxCLASS_METHOD, SbxNULL, ID_FinishUse );
@@ -722,17 +717,10 @@ void TestToolObj::InitTestToolObj()
 
     for ( i=0;i<VAR_POOL_SIZE;i++)
     {
-/*              pMyVar = new SbxObject( "Dummy" );
-        pMyVar->SetType( SbxVARIANT );*/
-
-//           pMyVar = new SbxMethod( "Dummy", SbxVARIANT );
-
         pImpl->pMyVars[i] = new SbxTransportMethod( SbxVARIANT );
         pImpl->pMyVars[i]->SetName( CUniString("VarDummy").Append(String::CreateFromInt32(i) ) );
 
         Insert( pImpl->pMyVars[i] );
-//              StartListening( pMyVars[i]->GetBroadcaster(), TRUE );
-
     }
 
     m_pControls = new CNames();
@@ -742,46 +730,9 @@ void TestToolObj::InitTestToolObj()
     nMyVar = 0;
 
     pImpl->pMyBasic->AddFactory( &aComManFac );
-
-
-// Das ist zum testen des IPC
-
-/*      int sent = 0;
-
-    ModelessDialog *pDlg = new ModelessDialog(NULL);
-    pDlg->SetOutputSizePixel(Size(100,30));
-
-    Edit *pMyEd = new Edit(pDlg,WB_CENTER | WB_BORDER);
-    pMyEd->SetSizePixel(Size(100,30));
-    pDlg->Show();
-    pMyEd->Show();
-    Time aTime;
-
-    String VollePackung;
-    VollePackung.Fill(32760,'*');
-
-    BeginBlock();   // zum warm werden
-    EndBlock();
-    ResetError();
-
-    while ( pDlg->IsVisible() && !IsError() )
-    {
-        BeginBlock();
-        In->GenCmdFlow (124,VollePackung);
-        EndBlock();
-        pMyEd->SetText(String("Test Nr. ") + String(++sent));
-        while ( aTime.Get100Sec() / 10 == Time().Get100Sec() / 10 );
-        aTime = Time();
-    }
-
-    delete pMyEd;
-    delete pDlg;
-*/
-// Test ende
-
-
 }
 
+
 TestToolObj::~TestToolObj()
 {
     pImpl->pMyBasic->RemoveFactory( &aComManFac );
@@ -1182,13 +1133,6 @@ void TestToolObj::ReadFlat( String Filename, CNames *&pNames, BOOL bSortByName )
     }
 
     Stream.Close();
-#ifdef DBG_UTIL
-//      int i;
-//      for ( i = 0 ; i < pNames->Count() ; i++ )
-//      {
-//              DBG_ERROR( pNames->GetObject(i)->pData->Kurzname );
-//      }
-#endif
 }
 
 void ReadFlatArray( const ControlDefLoad arWas [], CNames *&pNames )
@@ -1253,7 +1197,6 @@ void TestToolObj::WaitForAnswer ()
 
         while ( !bReturnOK && Ende > Time() )
         {
-//			pTemp = PlugInApplication::GetPlugInApp()->GetReturnFromExecute();
             if ( pTemp )
             {
                 ReturnResults( pTemp );
@@ -1398,7 +1341,6 @@ void TestToolObj::EndBlock()
             SendViaSocket();
         else
         {
-//			PlugInApplication::GetPlugInApp()->ExecuteRemoteStatements( In->GetStream() );
             bReturnOK = FALSE;
             if ( aDialogHandlerName.Len() > 0 )
                 GetpApp()->InsertIdleHdl( LINK( this, TestToolObj, IdleHdl ), 1 );
@@ -1741,13 +1683,11 @@ void TestToolObj::SFX_NOTIFY( SfxBroadcaster&, const TypeId&,
                         WaitForAnswer();
                         if ( IS_ERROR() )
                         {
-//                                                      pVar->PutULong( GET_ERROR()->nError );
                             pVar->PutString( GET_ERROR()->aText );
                             POP_ERROR();
                         }
                         else
                         {
-//                                                      pVar->PutULong( 0 );
                             pVar->PutString( String() );
                         }
                     }
@@ -1770,11 +1710,9 @@ void TestToolObj::SFX_NOTIFY( SfxBroadcaster&, const TypeId&,
                         while ( pCommunicationManager->IsCommunicationRunning() )
                             Application::Reschedule();
 
-                        SingleCommandBlock = TRUE;		// Bug 57188
+                        SingleCommandBlock = TRUE;
                         IsBlock = FALSE;
 
-//						pCommunicationManager->StartCommunication();
-
                         for (USHORT i=0;i<VAR_POOL_SIZE;i++)
                         {
                             pImpl->pMyVars[i]->SetName( CUniString("VarDummy").Append(UniString::CreateFromInt32(i)) );
@@ -2108,62 +2046,6 @@ void TestToolObj::SFX_NOTIFY( SfxBroadcaster&, const TypeId&,
                     if ( !rPar )  // rPar = NULL  <=>  Kein Parameter
                     {
                         SetError( SbxERR_NOTIMP );
-                        break;
-
-//                                              Das ist total rotten und mu� wohl komplett neu!!
-
-
-/*    					BOOL bWasBlock = IsBlock;
-                        if ( !IsBlock )                 // Impliziter call bei Aufruf mit Methode
-                            if ( SingleCommandBlock )
-                                BeginBlock();
-//                                              if ( !IsError() )
-//                                                      In->GenCmdSlot (128,rPar);
-//                                              ((Controls*)pVar)->pMethodVar->nValue = 128;
-
-                        ULONG nOldValue = ((Controls*)pVar)->GetULong();
-                        // Setzen, so da� beim Return der Wert stimmt
-                        ((Controls*)pVar)->PutULong( 128 );
-                        pImpl->pNextReturn = ((Controls*)pVar)->pMethodVar;
-                        if ( SingleCommandBlock )
-                            EndBlock();
-                        WaitForAnswer();
-                        if ( bWasBlock )
-                            if ( SingleCommandBlock )
-                                BeginBlock();
-                        ((Controls*)pVar)->PutULong( nOldValue );
-
-                        // R�cksetzen, so da� beim n�chsten Aufruf alles klappt
-//                                              ((Controls*)pVar)->SetUserData( 128 );
-
-
-//                                              ((Controls*)pVar)->SetName("xxx");
-                        // Setzen und r�cksetzen der ID, so dass der Notify ohne Wirkung bleibt.
-                        ((Controls*)pVar)->pMethodVar->SetUserData(ID_ErrorDummy);
-                        ((Controls*)pVar)->PutULong( ((Controls*)pVar)->pMethodVar->GetULong() );
-                        ((Controls*)pVar)->pMethodVar->SetUserData(ID_Control);
-
-                        pShortNames->Insert( CUniString("xxx"), SmartId( ((Controls*)pVar)->pMethodVar->nValue ), nSequence );
-
-                        nOldValue = ((Controls*)pVar)->GetULong();
-
-                        SbxVariable *pMember;
-                        if ( ! (pMember = ((Controls*)pVar)->Find(CUniString("ID"),SbxCLASS_DONTCARE)) )
-                        {
-                            pMember = new SbxProperty(CUniString("ID"),SbxVARIANT);
-                            ((Controls*)pVar)->Insert(pMember);
-                        }
-                        pMember->PutULong(((Controls*)pVar)->pMethodVar->nValue);
-
-                        if ( ! (pMember = ((Controls*)pVar)->Find(CUniString("name"),SbxCLASS_DONTCARE)) )
-                        {
-                            pMember = NULL;
-                        }
-                        else
-                            pMember->PutString(CUniString("xxx"));
-
-                                               */
-
                     }
                     else
                         SetError( SbxERR_WRONG_ARGS );
@@ -2194,7 +2076,6 @@ void TestToolObj::SFX_NOTIFY( SfxBroadcaster&, const TypeId&,
                         switch ( ((SbxTransportMethod*)pVar)->nValue )
                         {
                             case RC_WinTree:
-//								::svt::OStringTransfer::CopyString(pVar->GetString(), pSomeWindowIDontHave );
                                 break;
                         }
 
@@ -2304,13 +2185,6 @@ void TestToolObj::SFX_NOTIFY( SfxBroadcaster&, const TypeId&,
                         try
                         {
                             Reference< XMultiServiceFactory > xSMgr = comphelper::getProcessServiceFactory();
-// is allways there
-/*						    if ( ! xSMgr.is() )
-                            {
-                                xSMgr = ::cppu::createRegistryServiceFactory(OUString(RTL_CONSTASCII_USTRINGPARAM("applicat.rdb")), sal_True );
-                                if ( xSMgr.is() )
-                                    comphelper::setProcessServiceFactory( xSMgr );
-                            }*/
 
                             OUString aURL( aString );
                             Reference< XConnector > xConnector( xSMgr->createInstance(
@@ -2323,13 +2197,8 @@ void TestToolObj::SFX_NOTIFY( SfxBroadcaster&, const TypeId&,
                                 OUString(), OUString( RTL_CONSTASCII_USTRINGPARAM("urp") ),
                                 xConnection, Reference< XInstanceProvider >() ) );
 
-    //						Reference< XInterface > xRet( xBridge->getInstance( OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.Desktop")) ) );
                             Reference< XInterface > xRet( xBridge->getInstance( OUString( RTL_CONSTASCII_USTRINGPARAM("StarOffice.ServiceManager")) ) );
 
-    //						Reference< XNamingService > xNamingService(xRet, UNO_QUERY);
-
-    //			            Reference< XInterface > smgr = xNamingService->getRegisteredObject( OUString( RTL_CONSTASCII_USTRINGPARAM("StarOffice.ServiceManager" ) ) );
-
                             smgr_xMultiserviceFactory = Reference< XMultiServiceFactory >(xRet, UNO_QUERY);
     //MBA fragen!!
                         }
@@ -2345,7 +2214,6 @@ void TestToolObj::SFX_NOTIFY( SfxBroadcaster&, const TypeId&,
                         if( smgr_xMultiserviceFactory.is() )
                         {
                             Any aAny;
-//							aAny <<= xBridge;
                             aAny <<= smgr_xMultiserviceFactory;
 
                             SbxObjectRef xMySbxObj = GetSbUnoObject( CUniString("RemoteUnoAppFuerTesttool"), aAny );
@@ -2359,15 +2227,10 @@ void TestToolObj::SFX_NOTIFY( SfxBroadcaster&, const TypeId&,
                         // Hier wird der Remote UNO Kram gestartet
 
                         String aString;
-//						aString += GetHostConfig();
-//						aString.AppendAscii( ":" );
-//						aString += String::CreateFromInt32( GetUnoPortConfig() );
 
-                        Reference< XMultiServiceFactory > xSMgr /* = comphelper::getProcessServiceFactory()*/;
-//						if ( ! xSMgr.is() )
+                        Reference< XMultiServiceFactory > xSMgr;
                         {
                             xSMgr = ::cppu::createRegistryServiceFactory(OUString(RTL_CONSTASCII_USTRINGPARAM("g:\\iserverproxy.rdb")), sal_True);
-//							comphelper::setProcessServiceFactory( xSMgr );
                         }
 
                         OUString aURL( aString );
@@ -2384,21 +2247,6 @@ void TestToolObj::SFX_NOTIFY( SfxBroadcaster&, const TypeId&,
                         Reference< XInterface > xRet( xBridge->getInstance( OUString( RTL_CONSTASCII_USTRINGPARAM("XIServerProxy")) ) );
 
 
-/*    					Reference< XIServerProxy > xIS( xRet, UNO_QUERY );
-                        if ( xIS.is() )
-                        {
-                            String aHost( xIS->getIServerHost() );
-
-//							Reference < XInformationClient > xIC = xIS->createIServerClient( "XInformationClient" );
-                            Reference < XInformationClient > xIC = xIS->createInformationClient();
-                            xIC->getTree(OUString::createFromAscii("r:\\b_server\\config\\stand.lst"), OUString() );
-
-
-                            Reference< XTypeProvider > xTP( xRet, UNO_QUERY );
-                            Sequence < com::sun::star::uno::Type > s = xTP->getTypes();
-                        }
-  */
-
                         if( xRet.is() )
                         {
                             Any aAny;
@@ -3316,11 +3164,6 @@ void TestToolObj::SortControlsByNumber( BOOL bIncludeActive )
                 m_pReverseControls->DeleteAndDestroy( nNr );
 // um VorlagenLaden/UntergeordneteIniDatei/SpeichernDlg/OrdnerDlg/OeffnenDlg/MessageBox/LetzteVersion/GrafikEinfuegenDlg/FarbeDlg/ExportierenDlg/DruckerEinrichten/DruckenDlg/DateiEinfuegenDlg/Active zu verhindern
             }
-/*    	    if ( m_pReverseControlsSon->Seek_Entry( pZeroItem, &nNr ) )
-            {
-                m_pReverseControlsSon->DeleteAndDestroy( nNr );
-// um VorlagenLaden/UntergeordneteIniDatei/SpeichernDlg/OrdnerDlg/OeffnenDlg/MessageBox/LetzteVersion/GrafikEinfuegenDlg/FarbeDlg/ExportierenDlg/DruckerEinrichten/DruckenDlg/DateiEinfuegenDlg/Active zu verhindern
-            }*/
             delete pZeroItem;
         }
     }
@@ -3401,9 +3244,6 @@ BOOL TestToolObj::ReturnResults( SvStream *pIn )
                 case RET_Value:
                     if ( pImpl->pNextReturn )
                     {
-//                                              ULONG nHintUserData = pImpl->pNextReturn->GetParent()->GetUserData();
-//                                              pImpl->pNextReturn->GetParent()->SetUserData(0);
-//                                              if ( nUId == pImpl->pNextReturn->GetParent()->GetULong() )
                         if ( aNextReturnId.Matches( aUId ) )
                         {
                             if( nParams & PARAM_ULONG_1 )
@@ -3427,7 +3267,6 @@ BOOL TestToolObj::ReturnResults( SvStream *pIn )
                         {
                             ADD_ERROR(SbxERR_BAD_ACTION, GEN_RES_STR0(S_RETURNED_VALUE_ID_MISSMATCH) )
                         }
-//                                              pImpl->pNextReturn->GetParent()->SetUserData(nHintUserData);
                         pImpl->pNextReturn = NULL;
                     }
                     else
@@ -3493,7 +3332,6 @@ BOOL TestToolObj::ReturnResults( SvStream *pIn )
                             ControlItem *pNewItem = new ControlItemUId( String(), aUId );
                             if ( pReverseControlsKontext->Seek_Entry(pNewItem,&nNr) )
                             {
-//                                SmartId aID = pReverseControlsKontext->GetObject(nNr)->pData->aUId;
                                 pWinInfo->aKurzname += pReverseControlsKontext->GetObject(nNr)->pData->Kurzname;
                             }
                             delete pNewItem;
@@ -3671,8 +3509,6 @@ BOOL TestToolObj::ReturnResults( SvStream *pIn )
                         case S_AssertError:
                             {
                                 ADD_ASSERTION_LOG( aString1 );
-//								ADD_ERROR_LOG( aString1, aRun.GetModuleName(SbxNAME_SHORT_TYPES),
-//									aRun.GetLine(), aRun.GetCol1(), aRun.GetCol2() );
                             }
                             break;
                         case S_QAError:
@@ -4188,7 +4024,6 @@ Controls::Controls( String aCName )
     pMethodVar = new SbxTransportMethod( SbxVARIANT );
     pMethodVar->SetName( CUniString("Dummy") );
     Insert( pMethodVar );
-//      pMethodVar = Make( CUniString("Dummy"), SbxCLASS_PROPERTY, SbxULONG );
 }
 
 


More information about the Libreoffice-commits mailing list