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