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