1*cdf0e10cSrcweir /************************************************************************* 2*cdf0e10cSrcweir * 3*cdf0e10cSrcweir * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4*cdf0e10cSrcweir * 5*cdf0e10cSrcweir * Copyright 2000, 2010 Oracle and/or its affiliates. 6*cdf0e10cSrcweir * 7*cdf0e10cSrcweir * OpenOffice.org - a multi-platform office productivity suite 8*cdf0e10cSrcweir * 9*cdf0e10cSrcweir * This file is part of OpenOffice.org. 10*cdf0e10cSrcweir * 11*cdf0e10cSrcweir * OpenOffice.org is free software: you can redistribute it and/or modify 12*cdf0e10cSrcweir * it under the terms of the GNU Lesser General Public License version 3 13*cdf0e10cSrcweir * only, as published by the Free Software Foundation. 14*cdf0e10cSrcweir * 15*cdf0e10cSrcweir * OpenOffice.org is distributed in the hope that it will be useful, 16*cdf0e10cSrcweir * but WITHOUT ANY WARRANTY; without even the implied warranty of 17*cdf0e10cSrcweir * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18*cdf0e10cSrcweir * GNU Lesser General Public License version 3 for more details 19*cdf0e10cSrcweir * (a copy is included in the LICENSE file that accompanied this code). 20*cdf0e10cSrcweir * 21*cdf0e10cSrcweir * You should have received a copy of the GNU Lesser General Public License 22*cdf0e10cSrcweir * version 3 along with OpenOffice.org. If not, see 23*cdf0e10cSrcweir * <http://www.openoffice.org/license.html> 24*cdf0e10cSrcweir * for a copy of the LGPLv3 License. 25*cdf0e10cSrcweir * 26*cdf0e10cSrcweir ************************************************************************/ 27*cdf0e10cSrcweir /*************************************************************************** 28*cdf0e10cSrcweir ** 29*cdf0e10cSrcweir ** Von StatementList werden alle Statements abgeleitet. 30*cdf0e10cSrcweir ** Es gibt immer nur eine Statementliste, die verpointert ist. 31*cdf0e10cSrcweir ** jederzeit kann das der Anfang der Kette abgefragt werden. 32*cdf0e10cSrcweir ** 33*cdf0e10cSrcweir ** 34*cdf0e10cSrcweir ** 35*cdf0e10cSrcweir ** 36*cdf0e10cSrcweir ** 37*cdf0e10cSrcweir ** 38*cdf0e10cSrcweir ** 39*cdf0e10cSrcweir ***************************************************************************/ 40*cdf0e10cSrcweir #ifndef _STATEMNT_HXX 41*cdf0e10cSrcweir #define _STATEMNT_HXX 42*cdf0e10cSrcweir 43*cdf0e10cSrcweir #include <tools/wintypes.hxx> 44*cdf0e10cSrcweir #include <tools/string.hxx> 45*cdf0e10cSrcweir #include <tools/debug.hxx> 46*cdf0e10cSrcweir #include <tools/time.hxx> 47*cdf0e10cSrcweir #ifndef _SV_DRAG_HXX //autogen 48*cdf0e10cSrcweir //#include <vcl/drag.hxx> 49*cdf0e10cSrcweir #endif 50*cdf0e10cSrcweir #include <vcl/menu.hxx> 51*cdf0e10cSrcweir #include <vcl/svapp.hxx> 52*cdf0e10cSrcweir #include <tools/fsys.hxx> 53*cdf0e10cSrcweir #include <sot/storage.hxx> 54*cdf0e10cSrcweir #include <basic/sbstar.hxx> 55*cdf0e10cSrcweir #include <vcl/event.hxx> 56*cdf0e10cSrcweir #include <com/sun/star/beans/PropertyValue.hpp> 57*cdf0e10cSrcweir #include <automation/commtypes.hxx> 58*cdf0e10cSrcweir 59*cdf0e10cSrcweir class Window; 60*cdf0e10cSrcweir class SystemWindow; 61*cdf0e10cSrcweir class Point; 62*cdf0e10cSrcweir class SfxPoolItem; 63*cdf0e10cSrcweir 64*cdf0e10cSrcweir class ScrollBar; 65*cdf0e10cSrcweir 66*cdf0e10cSrcweir class SCmdStream; 67*cdf0e10cSrcweir class RetStream; 68*cdf0e10cSrcweir class ImplRemoteControl; 69*cdf0e10cSrcweir 70*cdf0e10cSrcweir class TTProfiler; 71*cdf0e10cSrcweir class TTProperties; 72*cdf0e10cSrcweir 73*cdf0e10cSrcweir class Dir; 74*cdf0e10cSrcweir 75*cdf0e10cSrcweir class CommunicationLink; 76*cdf0e10cSrcweir 77*cdf0e10cSrcweir #if OSL_DEBUG_LEVEL > 1 78*cdf0e10cSrcweir class EditWindow; 79*cdf0e10cSrcweir #endif 80*cdf0e10cSrcweir 81*cdf0e10cSrcweir #ifdef __cplusplus 82*cdf0e10cSrcweir extern "C" 83*cdf0e10cSrcweir { 84*cdf0e10cSrcweir #endif 85*cdf0e10cSrcweir void SAL_CALL osl_TestToolDebugPrint( const sal_Char *pString ); 86*cdf0e10cSrcweir #ifdef __cplusplus 87*cdf0e10cSrcweir } 88*cdf0e10cSrcweir #endif 89*cdf0e10cSrcweir 90*cdf0e10cSrcweir 91*cdf0e10cSrcweir #define IsVisible IsReallyVisible 92*cdf0e10cSrcweir #define GET_REAL_PARENT() GetWindow( WINDOW_REALPARENT ) 93*cdf0e10cSrcweir 94*cdf0e10cSrcweir // switch behaviour of ImplMouse* and ImplKeyInput 95*cdf0e10cSrcweir #define FORCE_DIRECT_CALL sal_True 96*cdf0e10cSrcweir 97*cdf0e10cSrcweir typedef sal_uInt16 SearchFlags; 98*cdf0e10cSrcweir #define SEARCH_NOOVERLAP ((SearchFlags) 0x0001) 99*cdf0e10cSrcweir #define SEARCH_NO_TOPLEVEL_WIN ((SearchFlags) 0x0002) 100*cdf0e10cSrcweir #define SEARCH_FOCUS_FIRST ((SearchFlags) 0x0004) 101*cdf0e10cSrcweir #define SEARCH_FIND_DISABLED ((SearchFlags) 0x0008) 102*cdf0e10cSrcweir 103*cdf0e10cSrcweir class Search 104*cdf0e10cSrcweir { 105*cdf0e10cSrcweir SearchFlags nmSearchFlags; 106*cdf0e10cSrcweir public: 107*cdf0e10cSrcweir Search( SearchFlags nSearchFlags = 0): nmSearchFlags(nSearchFlags) {} 108*cdf0e10cSrcweir virtual ~Search() {} 109*cdf0e10cSrcweir 110*cdf0e10cSrcweir virtual sal_Bool IsWinOK( Window *pWin ) = 0; 111*cdf0e10cSrcweir SearchFlags GetSearchFlags() { return nmSearchFlags; } 112*cdf0e10cSrcweir void AddSearchFlags( SearchFlags aNewFlags ) { nmSearchFlags |= aNewFlags; } 113*cdf0e10cSrcweir void RemoveSearchFlags( SearchFlags aRemoveFlags ) { nmSearchFlags &= ( ~aRemoveFlags ); } 114*cdf0e10cSrcweir sal_Bool HasSearchFlag( SearchFlags aQueryFlag ) { return (nmSearchFlags & aQueryFlag) == aQueryFlag; } 115*cdf0e10cSrcweir }; 116*cdf0e10cSrcweir 117*cdf0e10cSrcweir sal_Bool IsDialog(Window *pWin); // Ist *pWin von SystemWindow abgeleitet (Kann es Active sein) 118*cdf0e10cSrcweir sal_Bool IsAccessable(Window *pWin); // Ist *pWin Zugreifbar (�ber IsEnabled und Parents gepr�ft) 119*cdf0e10cSrcweir 120*cdf0e10cSrcweir 121*cdf0e10cSrcweir //class SafePointer : CriticalSection 122*cdf0e10cSrcweir class SafePointer 123*cdf0e10cSrcweir { 124*cdf0e10cSrcweir SafePointer *pSelf; 125*cdf0e10cSrcweir public: 126*cdf0e10cSrcweir SafePointer() { pSelf = this; } 127*cdf0e10cSrcweir virtual ~SafePointer() { DBG_ASSERT(pSelf==this,"Destructor von Nicht existierendem Objekt aufgerufen"); 128*cdf0e10cSrcweir pSelf = NULL; } 129*cdf0e10cSrcweir // static sal_Bool IsValid( SafePointer *pThis ) { return pThis == pThis->pSelf; } 130*cdf0e10cSrcweir // virtual operator -> (); { DBG_ASSERT(pMyself == this,"-> von Nicht existierendem Objekt aufgerufen"); } 131*cdf0e10cSrcweir }; 132*cdf0e10cSrcweir 133*cdf0e10cSrcweir 134*cdf0e10cSrcweir class DisplayHidWin; 135*cdf0e10cSrcweir class StatementCommand; 136*cdf0e10cSrcweir class TranslateWin; 137*cdf0e10cSrcweir 138*cdf0e10cSrcweir struct TTSettings 139*cdf0e10cSrcweir { 140*cdf0e10cSrcweir // DisplayHID 141*cdf0e10cSrcweir StatementCommand *pDisplayInstance; 142*cdf0e10cSrcweir DisplayHidWin *pDisplayHidWin; 143*cdf0e10cSrcweir Window *Old; 144*cdf0e10cSrcweir Window *Act; 145*cdf0e10cSrcweir String aOriginalCaption; 146*cdf0e10cSrcweir 147*cdf0e10cSrcweir // Translate 148*cdf0e10cSrcweir TranslateWin *pTranslateWin; 149*cdf0e10cSrcweir sal_Bool bToTop; 150*cdf0e10cSrcweir }; 151*cdf0e10cSrcweir 152*cdf0e10cSrcweir 153*cdf0e10cSrcweir TTSettings* GetTTSettings(); 154*cdf0e10cSrcweir 155*cdf0e10cSrcweir 156*cdf0e10cSrcweir #define MAX_RETRIES 9 157*cdf0e10cSrcweir class StatementList : public SafePointer 158*cdf0e10cSrcweir { 159*cdf0e10cSrcweir private: 160*cdf0e10cSrcweir StatementList(const StatementList&); 161*cdf0e10cSrcweir StatementList & operator=(const StatementList&); 162*cdf0e10cSrcweir 163*cdf0e10cSrcweir protected: 164*cdf0e10cSrcweir StatementList(); 165*cdf0e10cSrcweir sal_uInt16 nRetryCount; 166*cdf0e10cSrcweir void QueStatement(StatementList *pAfterThis); 167*cdf0e10cSrcweir sal_Bool bStatementInQue; 168*cdf0e10cSrcweir static sal_uInt16 nUseBindings; 169*cdf0e10cSrcweir 170*cdf0e10cSrcweir static TTProfiler *pProfiler; 171*cdf0e10cSrcweir void InitProfile(); 172*cdf0e10cSrcweir void SendProfile( String aText ); 173*cdf0e10cSrcweir static StatementList *pCurrentProfileStatement; 174*cdf0e10cSrcweir 175*cdf0e10cSrcweir static sal_Bool bIsInReschedule; 176*cdf0e10cSrcweir static sal_uInt16 nModalCount; 177*cdf0e10cSrcweir static Window *pLastFocusWindow; // Wenn dieses sich �ndert wird Safe Reschedule abgebrochen 178*cdf0e10cSrcweir static sal_Bool bWasDragManager; // Wenn dieses sich �ndert wird Safe Reschedule abgebrochen 179*cdf0e10cSrcweir static sal_Bool bWasPopupMenu; // Wenn dieses sich �ndert wird Safe Reschedule abgebrochen 180*cdf0e10cSrcweir static sal_Bool bBasicWasRunning; 181*cdf0e10cSrcweir 182*cdf0e10cSrcweir static sal_uInt16 nMinTypeKeysDelay; /// Verz�gerung der einzelnen Anschl�ge f�r TypeKeys 183*cdf0e10cSrcweir static sal_uInt16 nMaxTypeKeysDelay; 184*cdf0e10cSrcweir static sal_Bool bDoTypeKeysDelay; 185*cdf0e10cSrcweir 186*cdf0e10cSrcweir static Window* pFirstDocFrame; 187*cdf0e10cSrcweir 188*cdf0e10cSrcweir static sal_Bool bIsSlotInExecute; 189*cdf0e10cSrcweir 190*cdf0e10cSrcweir public: 191*cdf0e10cSrcweir static sal_Bool IsInReschedule() { return bIsInReschedule; } 192*cdf0e10cSrcweir void SafeReschedule( sal_Bool bYield = sal_False ) // Setzt Flag, so da� nicht schon der n�chste Befehl ausgef�hrt wird 193*cdf0e10cSrcweir { 194*cdf0e10cSrcweir nModalCount = Application::GetModalModeCount(); 195*cdf0e10cSrcweir bIsInReschedule = sal_True; 196*cdf0e10cSrcweir pLastFocusWindow = GetpApp()->GetFocusWindow(); 197*cdf0e10cSrcweir bWasDragManager = false /*!= DragManager::GetDragManager()*/; 198*cdf0e10cSrcweir bWasPopupMenu = NULL != PopupMenu::GetActivePopupMenu(); 199*cdf0e10cSrcweir bBasicWasRunning = StarBASIC::IsRunning(); 200*cdf0e10cSrcweir bWasExecuting = bExecuting; 201*cdf0e10cSrcweir if ( bYield ) 202*cdf0e10cSrcweir GetpApp()->Yield(); 203*cdf0e10cSrcweir else 204*cdf0e10cSrcweir GetpApp()->Reschedule(); 205*cdf0e10cSrcweir bExecuting = bWasExecuting; 206*cdf0e10cSrcweir bBasicWasRunning = sal_False; 207*cdf0e10cSrcweir bWasPopupMenu = sal_False; 208*cdf0e10cSrcweir bWasDragManager = sal_False; 209*cdf0e10cSrcweir pLastFocusWindow = NULL; 210*cdf0e10cSrcweir bIsInReschedule = sal_False; 211*cdf0e10cSrcweir nModalCount = 0; 212*cdf0e10cSrcweir } 213*cdf0e10cSrcweir static sal_Bool MaybeResetSafeReschedule() 214*cdf0e10cSrcweir { // Implementierung mu� hier zwar nicht sein, ist aber �bersichtlicher so 215*cdf0e10cSrcweir if ( !bIsInReschedule ) 216*cdf0e10cSrcweir return sal_False; 217*cdf0e10cSrcweir 218*cdf0e10cSrcweir if ( pLastFocusWindow != GetpApp()->GetFocusWindow() 219*cdf0e10cSrcweir || ( Application::GetModalModeCount() > nModalCount ) 220*cdf0e10cSrcweir // || ( DragManager::GetDragManager() && !bWasDragManager ) 221*cdf0e10cSrcweir || ( PopupMenu::GetActivePopupMenu() && !bWasPopupMenu ) 222*cdf0e10cSrcweir || ( StarBASIC::IsRunning() && !bBasicWasRunning ) ) 223*cdf0e10cSrcweir { 224*cdf0e10cSrcweir bIsInReschedule = sal_False; 225*cdf0e10cSrcweir pLastFocusWindow = NULL; 226*cdf0e10cSrcweir return sal_True; 227*cdf0e10cSrcweir } 228*cdf0e10cSrcweir else 229*cdf0e10cSrcweir return sal_False; 230*cdf0e10cSrcweir } 231*cdf0e10cSrcweir static void NormalReschedule() // Setzt das flag nicht 232*cdf0e10cSrcweir { 233*cdf0e10cSrcweir GetpApp()->Reschedule(); 234*cdf0e10cSrcweir } 235*cdf0e10cSrcweir #define Reschedule RescheduleNichtBenutzen_StattdessenSafeRescheduleAnStatementList 236*cdf0e10cSrcweir 237*cdf0e10cSrcweir static Window* GetMouseWin(); 238*cdf0e10cSrcweir static sal_Bool WinPtrValid(Window *pTest); 239*cdf0e10cSrcweir static Window* SearchAllWin( Window *pBase, Search &aSearch, sal_Bool MaybeBase = sal_True ); 240*cdf0e10cSrcweir protected: 241*cdf0e10cSrcweir static Window* SearchClientWin( Window *pBase, Search &aSearch, sal_Bool MaybeBase = sal_True ); 242*cdf0e10cSrcweir 243*cdf0e10cSrcweir Window* SearchTree( rtl::OString aUId, sal_Bool bSearchButtonOnToolbox = sal_False ); 244*cdf0e10cSrcweir Window* GetActive( WindowType nRT, sal_Bool MaybeBase = sal_True ); 245*cdf0e10cSrcweir Window* GetFocus( WindowType nRT, sal_Bool MaybeBase = sal_True ); 246*cdf0e10cSrcweir Window* GetAnyActive( sal_Bool MaybeBase = sal_True ); 247*cdf0e10cSrcweir ScrollBar* GetScrollBar( Window *pBase, sal_uInt16 nDirection, sal_Bool MaybeBase = sal_True ); 248*cdf0e10cSrcweir Window* GetPopupFloatingWin( sal_Bool MaybeBase = sal_True ); 249*cdf0e10cSrcweir Menu* GetMatchingMenu( Window* pWin, Menu* pBaseMenu = NULL ); 250*cdf0e10cSrcweir Window* GetWinByRT( Window *pBase, WindowType nRT, sal_Bool MaybeBase = sal_True, sal_uInt16 nSkip = 0, sal_Bool bSearchAll = sal_False ); 251*cdf0e10cSrcweir sal_uInt16 CountWinByRT( Window *pBase, WindowType nRT, sal_Bool MaybeBase = sal_True ); 252*cdf0e10cSrcweir Window* GetDocWin( sal_uInt16 nNr ); 253*cdf0e10cSrcweir sal_uInt16 GetDocWinCount(); 254*cdf0e10cSrcweir Window* GetFadeSplitWin( Window *pBase, WindowAlign nAlign, sal_Bool MaybeBase = sal_True ); 255*cdf0e10cSrcweir sal_Bool ValueOK(rtl::OString nId, String aBezeichnung, sal_uLong nValue, sal_uLong nMax); 256*cdf0e10cSrcweir 257*cdf0e10cSrcweir sal_uInt16 GetCurrentMenues( PopupMenu *&pPopup, MenuBar *&pMenuBar, Menu *&pMenu ); 258*cdf0e10cSrcweir 259*cdf0e10cSrcweir public: 260*cdf0e10cSrcweir // void AddStatement( StatementList *pNewStatement ); 261*cdf0e10cSrcweir 262*cdf0e10cSrcweir virtual ~StatementList(); 263*cdf0e10cSrcweir void Advance(); 264*cdf0e10cSrcweir virtual sal_Bool Execute() = 0; 265*cdf0e10cSrcweir /*************************************************************************** 266*cdf0e10cSrcweir ** Bestimmt erst den n�chsten Befehl, setzt Current 267*cdf0e10cSrcweir ** und f�hrt dann aus. 268*cdf0e10cSrcweir ** Returnwert gibt an, ob Befehl nochmal ausgef�hrt 269*cdf0e10cSrcweir ** werden soll. Dann mu� auch der UserEvent verlassen werden, um der Applikation 270*cdf0e10cSrcweir ** normales Arbeiten zu erm�glichen (Dialog schliessen) 271*cdf0e10cSrcweir ** sal_True bedeutet, dass alles klar gegangen ist 272*cdf0e10cSrcweir ** sal_False bedeutet nochmal Bitte 273*cdf0e10cSrcweir ***************************************************************************/ 274*cdf0e10cSrcweir 275*cdf0e10cSrcweir void ReportError(String aMessage); 276*cdf0e10cSrcweir void ReportError(rtl::OString aUId, String aMessage); 277*cdf0e10cSrcweir void ReportError(String aMessage, sal_uLong nWhatever); 278*cdf0e10cSrcweir 279*cdf0e10cSrcweir static void DirectLog( sal_uLong nType, String aString ); 280*cdf0e10cSrcweir 281*cdf0e10cSrcweir String Tree(Window *pBase, int Indent); 282*cdf0e10cSrcweir String ClientTree(Window *pBase, int Indent); 283*cdf0e10cSrcweir 284*cdf0e10cSrcweir StatementList *pNext; 285*cdf0e10cSrcweir static StatementList /**pCurrent,*/ *pFirst; 286*cdf0e10cSrcweir static sal_Bool bReadingCommands; 287*cdf0e10cSrcweir static rtl::OString aWindowWaitUId; 288*cdf0e10cSrcweir static Window *pWindowWaitPointer; 289*cdf0e10cSrcweir static rtl::OString aWindowWaitOldHelpId; 290*cdf0e10cSrcweir static rtl::OString aWindowWaitOldUniqueId; 291*cdf0e10cSrcweir static RetStream *pRet; 292*cdf0e10cSrcweir static sal_Bool IsError; 293*cdf0e10cSrcweir static sal_Bool bDying; 294*cdf0e10cSrcweir static sal_Bool bExecuting; // Gesetzt, wenn ein Befehl rescheduled ohne einen neuen Befehl zu erlauben 295*cdf0e10cSrcweir sal_Bool bWasExecuting; // Wurde bei einem MaybeResetSafeReschedule resettet, so wird der Zustand danach wiederhergestellt 296*cdf0e10cSrcweir static sal_uInt16 aSubMenuId1; // Untermen�s bei PopupMenus 297*cdf0e10cSrcweir static sal_uInt16 aSubMenuId2; // erstmal 2-Stufig 298*cdf0e10cSrcweir static sal_uInt16 aSubMenuId3; // and now even 3 levels #i31512# 299*cdf0e10cSrcweir static SystemWindow *pMenuWindow; // when using MenuBar as base for MenuCommands 300*cdf0e10cSrcweir static TTProperties *pTTProperties; // Hier stehen die SlotIDs aus dem SFX drin 301*cdf0e10cSrcweir 302*cdf0e10cSrcweir sal_Bool CheckWindowWait(); //True heisst, dass Window noch existiert 303*cdf0e10cSrcweir //False -> Window weg; 304*cdf0e10cSrcweir static void SetFirstDocFrame( Window* pWin ); 305*cdf0e10cSrcweir static Window* GetFirstDocFrame(); 306*cdf0e10cSrcweir static sal_Bool IsFirstDocFrame( Window* pWin ); 307*cdf0e10cSrcweir static sal_Bool IsDocWin( Window* pWin ); 308*cdf0e10cSrcweir static sal_Bool IsIMEWin( Window* pWin ); // Input Window for CJK under Solaris 309*cdf0e10cSrcweir static sal_Bool IsDocFrame( Window* pWin ); 310*cdf0e10cSrcweir static MenuBar* GetDocFrameMenuBar( Window* pWin ); 311*cdf0e10cSrcweir static sal_uInt16 GetDocFrameCount(); 312*cdf0e10cSrcweir 313*cdf0e10cSrcweir static sal_Bool bCatchGPF; 314*cdf0e10cSrcweir 315*cdf0e10cSrcweir static sal_Bool bUsePostEvents; // use Application::Post*Event or own impl to handle key and mouseevents 316*cdf0e10cSrcweir 317*cdf0e10cSrcweir #if OSL_DEBUG_LEVEL > 1 318*cdf0e10cSrcweir static EditWindow *m_pDbgWin; 319*cdf0e10cSrcweir #endif 320*cdf0e10cSrcweir }; 321*cdf0e10cSrcweir 322*cdf0e10cSrcweir class StatementSlot : public StatementList //Slots aufrufen 323*cdf0e10cSrcweir { 324*cdf0e10cSrcweir protected: 325*cdf0e10cSrcweir sal_uInt16 nAnzahl; 326*cdf0e10cSrcweir SfxPoolItem **pItemArr; 327*cdf0e10cSrcweir ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue> aArgs; 328*cdf0e10cSrcweir sal_uInt16 nFunctionId; // can get removed when the old (numeric) slothandling is removed 329*cdf0e10cSrcweir String aUnoUrl; 330*cdf0e10cSrcweir sal_Bool bMenuClosed; 331*cdf0e10cSrcweir 332*cdf0e10cSrcweir StatementSlot(); 333*cdf0e10cSrcweir void AddReferer(); 334*cdf0e10cSrcweir public: 335*cdf0e10cSrcweir StatementSlot( SCmdStream *pIn ); 336*cdf0e10cSrcweir StatementSlot( sal_uLong nSlot, SfxPoolItem* pItem = NULL ); 337*cdf0e10cSrcweir virtual ~StatementSlot(); 338*cdf0e10cSrcweir virtual sal_Bool Execute(); 339*cdf0e10cSrcweir }; 340*cdf0e10cSrcweir 341*cdf0e10cSrcweir class StatementUnoSlot : public StatementSlot //Uno Slots aufrufen 342*cdf0e10cSrcweir { 343*cdf0e10cSrcweir public: 344*cdf0e10cSrcweir StatementUnoSlot(SCmdStream *pIn); 345*cdf0e10cSrcweir }; 346*cdf0e10cSrcweir 347*cdf0e10cSrcweir class StatementCommand : public StatementList // Befehl ausf�hren (wintree, resetaplication ...) 348*cdf0e10cSrcweir { 349*cdf0e10cSrcweir friend class ImplRemoteControl; 350*cdf0e10cSrcweir protected: 351*cdf0e10cSrcweir sal_uInt16 nMethodId; 352*cdf0e10cSrcweir sal_uInt16 nParams; 353*cdf0e10cSrcweir comm_USHORT nNr1,nNr2,nNr3,nNr4; 354*cdf0e10cSrcweir comm_ULONG nLNr1; 355*cdf0e10cSrcweir String aString1,aString2; 356*cdf0e10cSrcweir sal_Bool bBool1,bBool2; 357*cdf0e10cSrcweir 358*cdf0e10cSrcweir Window* GetNextOverlap( Window* pBase ); 359*cdf0e10cSrcweir Window* GetNextRecoverWin(); 360*cdf0e10cSrcweir 361*cdf0e10cSrcweir static sal_uInt16 nDirPos; 362*cdf0e10cSrcweir static Dir *pDir; 363*cdf0e10cSrcweir static pfunc_osl_printDebugMessage pOriginal_osl_DebugMessageFunc; 364*cdf0e10cSrcweir 365*cdf0e10cSrcweir 366*cdf0e10cSrcweir sal_Bool UnpackStorage( SotStorageRef xStorage, DirEntry &aBaseDir ); 367*cdf0e10cSrcweir 368*cdf0e10cSrcweir void HandleSAXParser(); 369*cdf0e10cSrcweir 370*cdf0e10cSrcweir public: 371*cdf0e10cSrcweir StatementCommand( SCmdStream *pIn ); 372*cdf0e10cSrcweir StatementCommand( StatementList *pAfterThis, sal_uInt16 MethodId, sal_uInt16 Params, sal_uInt16 Nr1 ); 373*cdf0e10cSrcweir virtual sal_Bool Execute(); 374*cdf0e10cSrcweir sal_Bool DisplayHID(); 375*cdf0e10cSrcweir void Translate(); 376*cdf0e10cSrcweir void WriteControlData( Window *pBase, sal_uLong nConf, sal_Bool bFirst = sal_True ); 377*cdf0e10cSrcweir 378*cdf0e10cSrcweir }; 379*cdf0e10cSrcweir 380*cdf0e10cSrcweir 381*cdf0e10cSrcweir enum TTHotSpots { MitteLinks, Mitte, MitteOben }; 382*cdf0e10cSrcweir 383*cdf0e10cSrcweir class StatementControl : public StatementList 384*cdf0e10cSrcweir { 385*cdf0e10cSrcweir protected: 386*cdf0e10cSrcweir rtl::OString aUId; 387*cdf0e10cSrcweir sal_uInt16 nMethodId; 388*cdf0e10cSrcweir sal_uInt16 nParams; 389*cdf0e10cSrcweir comm_USHORT nNr1,nNr2,nNr3,nNr4; 390*cdf0e10cSrcweir comm_ULONG nLNr1; 391*cdf0e10cSrcweir String aString1,aString2; 392*cdf0e10cSrcweir sal_Bool bBool1,bBool2; 393*cdf0e10cSrcweir sal_Bool ControlOK( Window *pControl, const sal_Char* aBezeichnung ); 394*cdf0e10cSrcweir void AnimateMouse( Window *pControl, TTHotSpots aWohin ); 395*cdf0e10cSrcweir void AnimateMouse( Window *pControl, Point aWohin ); 396*cdf0e10cSrcweir 397*cdf0e10cSrcweir sal_Bool MaybeDoTypeKeysDelay( Window *pTestWindow ); 398*cdf0e10cSrcweir 399*cdf0e10cSrcweir sal_Bool HandleVisibleControls( Window *pControl ); 400*cdf0e10cSrcweir sal_Bool HandleCommonMethods( Window *pControl ); 401*cdf0e10cSrcweir 402*cdf0e10cSrcweir public: 403*cdf0e10cSrcweir StatementControl( SCmdStream *pIn, sal_uInt16 nControlType ); 404*cdf0e10cSrcweir virtual sal_Bool Execute(); 405*cdf0e10cSrcweir 406*cdf0e10cSrcweir }; 407*cdf0e10cSrcweir 408*cdf0e10cSrcweir class StatementFlow : public StatementList // Kommunikation mit Sequence 409*cdf0e10cSrcweir { 410*cdf0e10cSrcweir sal_uInt16 nArt; 411*cdf0e10cSrcweir 412*cdf0e10cSrcweir sal_uInt16 nParams; 413*cdf0e10cSrcweir comm_USHORT nSNr1; 414*cdf0e10cSrcweir comm_ULONG nLNr1; 415*cdf0e10cSrcweir String aString1; 416*cdf0e10cSrcweir sal_Bool bBool1; 417*cdf0e10cSrcweir 418*cdf0e10cSrcweir 419*cdf0e10cSrcweir public: 420*cdf0e10cSrcweir StatementFlow (sal_uLong nServiceId, SCmdStream *pIn, ImplRemoteControl *pRC ); 421*cdf0e10cSrcweir StatementFlow( StatementList *pAfterThis, sal_uInt16 nArtP ); 422*cdf0e10cSrcweir virtual sal_Bool Execute(); 423*cdf0e10cSrcweir static CommunicationLink *pCommLink; 424*cdf0e10cSrcweir static sal_Bool bSending; 425*cdf0e10cSrcweir 426*cdf0e10cSrcweir static sal_Bool bUseIPC; // Soll zur r�ckmeldung IPC verwendet werden? 427*cdf0e10cSrcweir static ImplRemoteControl *pRemoteControl; // Static f�r 2. Constructor 428*cdf0e10cSrcweir 429*cdf0e10cSrcweir private: 430*cdf0e10cSrcweir void SendViaSocket(); 431*cdf0e10cSrcweir }; 432*cdf0e10cSrcweir 433*cdf0e10cSrcweir class SearchUID : public Search 434*cdf0e10cSrcweir { 435*cdf0e10cSrcweir Window *pMaybeResult; 436*cdf0e10cSrcweir Window *pAlternateResult; 437*cdf0e10cSrcweir rtl::OString aUId; 438*cdf0e10cSrcweir sal_Bool bSearchButtonOnToolbox; 439*cdf0e10cSrcweir public: 440*cdf0e10cSrcweir SearchUID( rtl::OString aUIdP, sal_Bool bSearchButtonOnToolboxP ): Search( SEARCH_FOCUS_FIRST ), pMaybeResult(NULL), pAlternateResult(NULL), aUId(aUIdP), bSearchButtonOnToolbox(bSearchButtonOnToolboxP) {} 441*cdf0e10cSrcweir virtual sal_Bool IsWinOK( Window *pWin ); 442*cdf0e10cSrcweir Window* GetMaybeWin() { return pMaybeResult; } 443*cdf0e10cSrcweir Window* GetAlternateResultWin() { return pAlternateResult; } 444*cdf0e10cSrcweir }; 445*cdf0e10cSrcweir class SearchActive : public Search 446*cdf0e10cSrcweir { 447*cdf0e10cSrcweir WindowType nRT; 448*cdf0e10cSrcweir public: 449*cdf0e10cSrcweir SearchActive( WindowType nRTP ): nRT(nRTP) {} 450*cdf0e10cSrcweir virtual sal_Bool IsWinOK( Window *pWin ); 451*cdf0e10cSrcweir }; 452*cdf0e10cSrcweir class SearchPopupFloatingWin : public Search 453*cdf0e10cSrcweir { 454*cdf0e10cSrcweir public: 455*cdf0e10cSrcweir SearchPopupFloatingWin(): Search( SEARCH_FOCUS_FIRST ) {} 456*cdf0e10cSrcweir virtual sal_Bool IsWinOK( Window *pWin ); 457*cdf0e10cSrcweir }; 458*cdf0e10cSrcweir class SearchRT : public Search 459*cdf0e10cSrcweir { 460*cdf0e10cSrcweir WindowType mnRT; 461*cdf0e10cSrcweir sal_uInt16 mnSkip; 462*cdf0e10cSrcweir sal_uInt16 mnCount; 463*cdf0e10cSrcweir public: 464*cdf0e10cSrcweir SearchRT( WindowType nRTP, SearchFlags nSearchFlags, sal_uInt16 nSkip = 0 ): Search(nSearchFlags), mnRT(nRTP), mnSkip( nSkip ), mnCount( 0 ) {} 465*cdf0e10cSrcweir virtual sal_Bool IsWinOK( Window *pWin ); 466*cdf0e10cSrcweir sal_uInt16 GetCount(){ return mnCount; } 467*cdf0e10cSrcweir }; 468*cdf0e10cSrcweir class SearchScroll : public SearchRT 469*cdf0e10cSrcweir { 470*cdf0e10cSrcweir sal_uInt16 nDirection; 471*cdf0e10cSrcweir public: 472*cdf0e10cSrcweir SearchScroll( sal_uInt16 nDir, SearchFlags nSearchFlags ): SearchRT(WINDOW_SCROLLBAR, nSearchFlags), nDirection(nDir) {} 473*cdf0e10cSrcweir virtual sal_Bool IsWinOK( Window *pWin ); 474*cdf0e10cSrcweir }; 475*cdf0e10cSrcweir class SearchWinPtr : public Search 476*cdf0e10cSrcweir { 477*cdf0e10cSrcweir Window *pTest; 478*cdf0e10cSrcweir public: 479*cdf0e10cSrcweir SearchWinPtr( Window *pTestP ): pTest(pTestP) {} 480*cdf0e10cSrcweir virtual sal_Bool IsWinOK( Window *pWin ); 481*cdf0e10cSrcweir }; 482*cdf0e10cSrcweir class SearchFadeSplitWin : public Search 483*cdf0e10cSrcweir { 484*cdf0e10cSrcweir WindowAlign nAlign; 485*cdf0e10cSrcweir public: 486*cdf0e10cSrcweir SearchFadeSplitWin( WindowAlign nAlignP ): nAlign(nAlignP) {} 487*cdf0e10cSrcweir virtual sal_Bool IsWinOK( Window *pWin ); 488*cdf0e10cSrcweir }; 489*cdf0e10cSrcweir 490*cdf0e10cSrcweir 491*cdf0e10cSrcweir void ImplKeyInput( Window* pWin, KeyEvent &aKEvnt, sal_Bool bForceDirect=sal_False ); 492*cdf0e10cSrcweir void ImplMouseMove( Window* pWin, MouseEvent &aMEvnt, sal_Bool bForceDirect=sal_False ); 493*cdf0e10cSrcweir void ImplMouseButtonDown( Window* pWin, MouseEvent &aMEvnt, sal_Bool bForceDirect=sal_False ); 494*cdf0e10cSrcweir void ImplMouseButtonUp( Window* pWin, MouseEvent &aMEvnt, sal_Bool bForceDirect=sal_False ); 495*cdf0e10cSrcweir void ImplCommand( Window* pWin, CommandEvent &aCmdEvnt ); 496*cdf0e10cSrcweir void ImplEventWait( sal_uLong nID ); 497*cdf0e10cSrcweir 498*cdf0e10cSrcweir #endif 499