From 02f4ad619774297658085bb84fcb5d009dbfe715 Mon Sep 17 00:00:00 2001 From: Martin Hollmichel Date: Mon, 18 Nov 2002 10:19:28 +0000 Subject: add: testtool, #104916# --- automation/source/app/makefile.mk | 92 ++++ automation/source/app/testbasi.cxx | 190 ++++++++ automation/source/app/testbasi.hxx | 96 ++++ automation/source/inc/cmdbasestream.hxx | 119 +++++ automation/source/inc/icommstream.hxx | 98 ++++ automation/source/inc/rcontrol.hxx | 513 +++++++++++++++++++++ automation/source/inc/svcommstream.hxx | 90 ++++ automation/source/inc/testapp.hxx | 227 +++++++++ automation/source/inc/testtool.hxx | 112 +++++ automation/source/miniapp/editwin.cxx | 159 +++++++ automation/source/miniapp/editwin.hxx | 109 +++++ automation/source/miniapp/hid.lst | 27 ++ automation/source/miniapp/makefile.mk | 92 ++++ automation/source/miniapp/servres.cxx | 91 ++++ automation/source/miniapp/servres.hrc | 74 +++ automation/source/miniapp/servres.hxx | 117 +++++ automation/source/miniapp/servres.src | 267 +++++++++++ automation/source/miniapp/servuid.hxx | 71 +++ automation/source/miniapp/test.bas | 135 ++++++ automation/source/miniapp/test.sid | 5 + automation/source/miniapp/test.win | 13 + automation/source/miniapp/testapp.cxx | 313 +++++++++++++ automation/source/miniapp/testapp.hxx | 160 +++++++ automation/source/mozillaserver/makefile.mk | 198 ++++++++ .../source/mozillaserver/mozillatesttoolserver.idl | 86 ++++ .../mozillaserver/xmozillatesttoolserver.idl | 191 ++++++++ 26 files changed, 3645 insertions(+) create mode 100644 automation/source/app/makefile.mk create mode 100644 automation/source/app/testbasi.cxx create mode 100644 automation/source/app/testbasi.hxx create mode 100644 automation/source/inc/cmdbasestream.hxx create mode 100644 automation/source/inc/icommstream.hxx create mode 100644 automation/source/inc/rcontrol.hxx create mode 100644 automation/source/inc/svcommstream.hxx create mode 100644 automation/source/inc/testapp.hxx create mode 100644 automation/source/inc/testtool.hxx create mode 100644 automation/source/miniapp/editwin.cxx create mode 100644 automation/source/miniapp/editwin.hxx create mode 100644 automation/source/miniapp/hid.lst create mode 100644 automation/source/miniapp/makefile.mk create mode 100644 automation/source/miniapp/servres.cxx create mode 100644 automation/source/miniapp/servres.hrc create mode 100644 automation/source/miniapp/servres.hxx create mode 100644 automation/source/miniapp/servres.src create mode 100644 automation/source/miniapp/servuid.hxx create mode 100644 automation/source/miniapp/test.bas create mode 100644 automation/source/miniapp/test.sid create mode 100644 automation/source/miniapp/test.win create mode 100644 automation/source/miniapp/testapp.cxx create mode 100644 automation/source/miniapp/testapp.hxx create mode 100644 automation/source/mozillaserver/makefile.mk create mode 100644 automation/source/mozillaserver/mozillatesttoolserver.idl create mode 100644 automation/source/mozillaserver/xmozillatesttoolserver.idl (limited to 'automation') diff --git a/automation/source/app/makefile.mk b/automation/source/app/makefile.mk new file mode 100644 index 000000000000..e10102952a8a --- /dev/null +++ b/automation/source/app/makefile.mk @@ -0,0 +1,92 @@ +#************************************************************************* +# +# $RCSfile: makefile.mk,v $ +# +# $Revision: 1.1 $ +# +# last change: $Author: mh $ $Date: 2002-11-18 11:13:25 $ +# +# The Contents of this file are made available subject to the terms of +# either of the following licenses +# +# - GNU Lesser General Public License Version 2.1 +# - Sun Industry Standards Source License Version 1.1 +# +# Sun Microsystems Inc., October, 2002 +# +# GNU Lesser General Public License Version 2.1 +# ============================================= +# Copyright 2002 by Sun Microsystems, Inc. +# 901 San Antonio Road, Palo Alto, CA 94303, USA +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License version 2.1, as published by the Free Software Foundation. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, +# MA 02111-1307 USA +# +# +# Sun Industry Standards Source License Version 1.1 +# ================================================= +# The contents of this file are subject to the Sun Industry Standards +# Source License Version 1.1 (the "License"); You may not use this file +# except in compliance with the License. You may obtain a copy of the +# License at http://www.openoffice.org/license.html. +# +# Software provided under this License is provided on an "AS IS" basis, +# WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, +# WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, +# MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. +# See the License for the specific provisions governing your rights and +# obligations concerning the Software. +# +# The Initial Developer of the Original Code is: Sun Microsystems, Inc.. +# +# Copyright: 2002 by Sun Microsystems, Inc. +# +# All Rights Reserved. +# +# Contributor(s): _______________________________________ +# +# +# +#************************************************************************* + +PRJ=..$/.. + +PRJNAME=BASIC +TARGET=app + +# --- Settings ------------------------------------------------------------ + +.INCLUDE : svpre.mk +.INCLUDE : settings.mk +.INCLUDE : sv.mk + +# --- Allgemein ------------------------------------------------------------ + +.INCLUDE : $(UPD)minor.mk + + +CXXFILES = \ + testbasi.cxx + + +OBJFILES = \ + $(OBJ)$/testbasi.obj + + +LIBTARGET = NO + + +# --- Targets ------------------------------------------------------------ + +.INCLUDE : target.mk diff --git a/automation/source/app/testbasi.cxx b/automation/source/app/testbasi.cxx new file mode 100644 index 000000000000..76b21ac8f809 --- /dev/null +++ b/automation/source/app/testbasi.cxx @@ -0,0 +1,190 @@ +/************************************************************************* + * + * $RCSfile: testbasi.cxx,v $ + * + * $Revision: 1.1 $ + * + * last change: $Author: mh $ $Date: 2002-11-18 11:13:26 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2002 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2002 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2002 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ + +#ifndef _SBXCLASS_HXX //autogen +#include +#endif + +#ifndef _BASIC_TTRESHLP_HXX +#include +#endif +#include +#include "testbasi.hxx" +//#include "app.hxx" +//#include "basic.hrc" +//#include "appbased.hxx" +#define P_FEHLERLISTE ((TestToolObj*)pTestObject)->GetFehlerListe() + +//#include "status.hxx" +//#include "basic.hrc" + +//#include "object.hxx" + +#include +#include +#ifndef _SB_INTERN_HXX +//#include "sbintern.hxx" +#endif + +//#include "comm_bas.hxx" +//#include "processw.hxx" + +TYPEINIT1(TTBasic,MyBasic) + +/*class MyFactory : public SbxFactory +{ +public: + virtual SbxBase* Create( UINT16 nSbxId, UINT32 = SBXCR_SBX ); +}; + +static SampleObjectFac aFac1; +static MyFactory aFac2; +static CommunicationFactory aComManFac; +static ProcessFactory aProcessFac; +static short nInst = 0; + +SbxBase* MyFactory::Create( UINT16 nSbxId, UINT32 nCr ) +{ + if( nCr == SBXCR_TEST && nSbxId == SBXID_MYBASIC ) + return new MyBasic; + else + return NULL; +} */ + +TTBasic::TTBasic() : MyBasic() +{ +// Eigenes Objekt reinbraten + TestToolObj* pTTO = new TestToolObj( CUniString("App"), this ); + pTTO->SetLogHdl( GenLogHdl() ); + pTTO->SetWinInfoHdl( GenWinInfoHdl() ); + pTTO->SetModuleWinExistsHdl( GenModuleWinExistsHdl() ); + pTTO->SetWriteStringHdl( GenWriteStringHdl() ); + pTTO->SetCErrorHdl( LINK( this, TTBasic, CErrorImpl ) ); + + StartListening( pTTO->GetTTBroadcaster() ); + + pTestObject = pTTO; + pTestObject->SetFlag( SBX_EXTSEARCH ); + Insert( pTestObject ); +} + +MyBasic* TTBasic::CreateMyBasic() +{ + return new TTBasic(); +} + +void TTBasic::LoadIniFile() +{ + ((TestToolObj*)pTestObject)->LoadIniFile(); +} + +SbTextType TTBasic::GetSymbolType( const String &rSymbol, BOOL bWasTTControl ) +{ + return ((TestToolObj*)pTestObject)->GetSymbolType( rSymbol, bWasTTControl ); +} + + +TTBasic::~TTBasic() +{ +} + +IMPL_LINK( TTBasic, CErrorImpl, ErrorEntry*, pData ) +{ + return CError( pData->nError, pData->aText, pData->nLine, pData->nCol1, pData->nCol2 ); +} + +BOOL TTBasic::Compile( SbModule* p ) +{ + SbModule* pOldModule = GetCompileModule(); + SetCompileModule( p ); + p->SetSource( ((TestToolObj*)pTestObject)->PreCompile(p->GetSource()) ); + SetCompileModule( pOldModule ); + if ( ((TestToolObj*)pTestObject)->WasPrecompilerError() ) + return FALSE; + return MyBasic::Compile( p ); +} + +const String TTBasic::GetSpechialErrorText() +{ + String nErrorText; + if ( pTestObject && IS_ERROR() && GetErrorCode() == GET_ERROR()->nError ) + { + nErrorText = GenRealString( GET_ERROR()->aText ); + nErrorText.AppendAscii( ": " ); + nErrorText += String::CreateFromInt64( GET_ERROR()->nError ); + } + else + { + nErrorText = GetErrorText(); + } + return nErrorText; +} + +void TTBasic::ReportRuntimeError( AppBasEd *pEditWin ) +{ + SbxVariableRef aDummy = new SbxVariable; + aDummy->SetUserData( 22 ); + ((TestToolObj*)pTestObject)->SFX_NOTIFY( pTestObject->GetBroadcaster(), xx, SbxHint( SBX_HINT_DATAWANTED, aDummy ), xx ); + aDummy->SetUserData( 18 ); + ((TestToolObj*)pTestObject)->SFX_NOTIFY( pTestObject->GetBroadcaster(), xx, SbxHint( SBX_HINT_DATAWANTED, aDummy ), xx ); + MyBasic::ReportRuntimeError( pEditWin ); +} + diff --git a/automation/source/app/testbasi.hxx b/automation/source/app/testbasi.hxx new file mode 100644 index 000000000000..d0a5694eac71 --- /dev/null +++ b/automation/source/app/testbasi.hxx @@ -0,0 +1,96 @@ +/************************************************************************* + * + * $RCSfile: testbasi.hxx,v $ + * + * $Revision: 1.1 $ + * + * last change: $Author: mh $ $Date: 2002-11-18 11:13:26 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2002 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2002 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2002 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ + +#ifndef _TTBASIC_HXX +#define _TTBASIC_HXX + +#ifndef _SB_SBSTAR_HXX //autogen +#include +#endif +#include + +class ErrorEntry; + +#define SBXID_TTBASIC 0x5454 // TTBasic: TT +#define SBXCR_TEST2 0x545345542 // TEST + +class TTBasic : public MyBasic +{ +public: + SBX_DECL_PERSIST_NODATA(SBXCR_TEST2,SBXID_TTBASIC,1); + TYPEINFO(); + TTBasic(); + ~TTBasic(); + BOOL Compile( SbModule* ); + static MyBasic* CreateMyBasic(); + + // nicht mit #ifdefs klammern, da diese Headerdatei für testtool und basic + // gleichermaßen verwendet wird. + DECL_LINK( CErrorImpl, ErrorEntry* ); +// SbxObject *pTestObject; // für das Testtool; ansonsten NULL + + void LoadIniFile(); + SbTextType GetSymbolType( const String &Symbol, BOOL bWasTTControl ); // Besimmt den erweiterten Symboltyp für das Syntaxhighlighting + virtual const String GetSpechialErrorText(); + virtual void ReportRuntimeError( AppBasEd *pEditWin ); +}; + +SV_DECL_IMPL_REF(TTBasic) diff --git a/automation/source/inc/cmdbasestream.hxx b/automation/source/inc/cmdbasestream.hxx new file mode 100644 index 000000000000..605d38fe68c7 --- /dev/null +++ b/automation/source/inc/cmdbasestream.hxx @@ -0,0 +1,119 @@ +/************************************************************************* + * + * $RCSfile: cmdbasestream.hxx,v $ + * + * $Revision: 1.1 $ + * + * last change: $Author: mh $ $Date: 2002-11-18 11:12:06 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2002 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2002 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2002 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ + +/************************************************************************* + * + * ATTENTION + * This file is intended to work inside and outside the StarOffice environment. + * Only adaption of file commtypes.hxx should be necessary. Else it is a bug! + * + ************************************************************************/ + +#ifndef _CMDBASESTREAM_HXX_ +#define _CMDBASESTREAM_HXX_ + +#include "commtypes.hxx" +#include "icommstream.hxx" + +class CmdBaseStream +{ +protected: + ICommStream* pCommStream; +public: + CmdBaseStream(); + ~CmdBaseStream(); + + + void GenError( comm_ULONG nError, const comm_UniChar* aString, comm_USHORT nLenInChars ); + + void GenReturn( comm_USHORT nRet, comm_ULONG nNr ); + void GenReturn( comm_USHORT nRet, comm_ULONG nUId, comm_ULONG nNr ); + void GenReturn( comm_USHORT nRet, comm_ULONG nUId, const comm_UniChar* aString, comm_USHORT nLenInChars ); + void GenReturn( comm_USHORT nRet, comm_ULONG nUId, comm_BOOL bBool ); + void GenReturn( comm_USHORT nRet, comm_ULONG nUId, comm_ULONG nNr, const comm_UniChar* aString, comm_USHORT nLenInChars, comm_BOOL bBool ); + +// MacroRecorder + void GenReturn( comm_USHORT nRet, comm_ULONG nUId, comm_USHORT nMethod ); + void GenReturn( comm_USHORT nRet, comm_ULONG nUId, comm_USHORT nMethod, const comm_UniChar* aString, comm_USHORT nLenInChars ); + void GenReturn( comm_USHORT nRet, comm_ULONG nUId, comm_USHORT nMethod, const comm_UniChar* aString, comm_USHORT nLenInChars, comm_BOOL bBool ); + void GenReturn( comm_USHORT nRet, comm_ULONG nUId, comm_USHORT nMethod, comm_BOOL bBool ); + void GenReturn( comm_USHORT nRet, comm_ULONG nUId, comm_USHORT nMethod, comm_ULONG nNr ); + +// StringID + void GenReturn( comm_USHORT nRet, const comm_UniChar* aUId, comm_USHORT nUIdLenInChars ); + void GenReturn( comm_USHORT nRet, const comm_UniChar* aUId, comm_USHORT nUIdLenInChars, comm_ULONG nNr ); + void GenReturn( comm_USHORT nRet, const comm_UniChar* aUId, comm_USHORT nUIdLenInChars, const comm_UniChar* aString, comm_USHORT nLenInChars ); + void GenReturn( comm_USHORT nRet, const comm_UniChar* aUId, comm_USHORT nUIdLenInChars, comm_ULONG nNr, const comm_UniChar* aString, comm_USHORT nLenInChars, comm_BOOL bBool ); + void GenReturn( comm_USHORT nRet, const comm_UniChar* aUId, comm_USHORT nUIdLenInChars, comm_BOOL bBool ); + + void Read ( comm_USHORT &nNr ); + void Read ( comm_ULONG &nNr ); + void Read ( comm_UniChar* &aString, comm_USHORT &nLenInChars ); + void Read ( comm_BOOL &bBool ); + comm_USHORT GetNextType(); + + void Write( comm_USHORT nNr ); + void Write( comm_ULONG nNr ); + void Write( const comm_UniChar* aString, comm_USHORT nLenInChars ); + void Write( comm_BOOL bBool ); +}; + +#endif diff --git a/automation/source/inc/icommstream.hxx b/automation/source/inc/icommstream.hxx new file mode 100644 index 000000000000..e124567f0e25 --- /dev/null +++ b/automation/source/inc/icommstream.hxx @@ -0,0 +1,98 @@ +/************************************************************************* + * + * $RCSfile: icommstream.hxx,v $ + * + * $Revision: 1.1 $ + * + * last change: $Author: mh $ $Date: 2002-11-18 11:12:07 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2002 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2002 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2002 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ + +/************************************************************************* + * + * ATTENTION + * This file is intended to work inside and outside the StarOffice environment. + * Only adaption of file commtypes.hxx should be necessary. Else it is a bug! + * + ************************************************************************/ + +#ifndef _AUTOMATION_ICOMMSTREAM_HXX_ +#define _AUTOMATION_ICOMMSTREAM_HXX_ + +#include "commtypes.hxx" + +class ICommStream +{ +public: + + ICommStream(){} + virtual ~ICommStream(){} + + virtual ICommStream& operator>>( comm_USHORT& rUShort )=0; + virtual ICommStream& operator>>( comm_ULONG& rULong )=0; + virtual ICommStream& operator>>( comm_BOOL& rChar )=0; + + virtual ICommStream& operator<<( comm_USHORT nUShort )=0; + virtual ICommStream& operator<<( comm_ULONG nULong )=0; + virtual ICommStream& operator<<( comm_BOOL nChar )=0; + + virtual comm_ULONG Read( void* pData, comm_ULONG nSize )=0; + virtual comm_ULONG Write( const void* pData, comm_ULONG nSize )=0; + + virtual comm_BOOL IsEof() const=0; + virtual comm_ULONG SeekRel( long nPos )=0; + +}; + +#endif diff --git a/automation/source/inc/rcontrol.hxx b/automation/source/inc/rcontrol.hxx new file mode 100644 index 000000000000..c74e5ff6100b --- /dev/null +++ b/automation/source/inc/rcontrol.hxx @@ -0,0 +1,513 @@ +/************************************************************************* + * + * $RCSfile: rcontrol.hxx,v $ + * + * $Revision: 1.1 $ + * + * last change: $Author: mh $ $Date: 2002-11-18 11:12:07 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2002 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2002 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2002 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ + +/************************************************************************* + * + * ATTENTION + * This file is intended to work inside and outside the StarOffice environment. + * Only adaption of file commtypes.hxx should be necessary. Else it is a bug! + * + ************************************************************************/ + +#ifndef _RCONTROL_HXX +#define _RCONTROL_HXX + + +#define TESTTOOL_PORT 12479 +#define UNO_PORT 12480 + + +#define UID_ACTIVE 0 + + +#define SI_IPCCommandBlock 1 +#define SI_SocketCommandBlock SI_IPCCommandBlock // Zumindest erstmal +#define SI_DirectCommandBlock 2 +#define SIControl 3 +#define SISlot 4 +#define SIFlow 5 +#define SICommand 6 +#define SIUnoSlot 7 +#define SIStringControl 8 + +#define SIReturnBlock 11 +#define SIReturn 12 +#define SIReturnError 13 + +// Typisierung im Stream +#define BinUSHORT 11 +#define BinULONG 14 +#define BinString 12 +#define BinBool 13 +#define BinSbxValue 15 + + +// Classes +// !!!Diese Defines duerfen niemals geaendert werden!!! +#define C_NoType -1 +// Maximale 32 einfache Controls +#define C_TabControl 0 +#define C_RadioButton 1 +#define C_CheckBox 2 +#define C_TriStateBox 3 +#define C_Edit 4 +#define C_MultiLineEdit 5 +#define C_MultiListBox 6 +#define C_ListBox 7 +#define C_ComboBox 8 +#define C_PushButton 9 + +#define C_SpinField 10 +#define C_PatternField 11 +#define C_NumericField 12 +#define C_MetricField 13 +#define C_CurrencyField 14 +#define C_DateField 15 +#define C_TimeField 16 + +#define C_ImageRadioButton 17 +#define C_NumericBox 18 +#define C_MetricBox 19 +#define C_CurrencyBox 20 +#define C_DateBox 21 +#define C_TimeBox 22 + +#define C_ImageButton 23 +#define C_MenuButton 24 +#define C_MoreButton 25 + +// Maximale 7 Container +#define C_TabPage 32 +#define C_Dlg 33 +#define C_FloatWin 34 +#define C_ModelessDlg 35 +#define C_WorkWin 36 +#define C_DockingWin 37 + +// Diese Defines koennen geaendert werden +#define C_MessBox 40 +#define C_InfoBox 41 +#define C_WarningBox 42 +#define C_ErrorBox 43 +#define C_QueryBox 44 + +#define C_TabDlg 45 +#define C_SingleTabDlg 46 + +#define C_Window 47 + + +#define C_PatternBox 60 +#define C_ToolBox 61 +#define C_ValueSet 62 +#define C_Control 63 // Für das schmutzige Rummachen auf Treelist Boxen ... + +#define C_OkButton 64 +#define C_CancelButton 65 +#define C_ButtonDialog 66 + + +// Some new Elements for Mozilla +#define C_Anchor 67 +#define C_FormElement 68 +#define C_DOMText 69 +#define C_Image 70 + + + +#define M_WITH_RETURN 0x0200 // Die Variable wird zum Aufnehmen des Wertes gespeichert +#define M_KEY_STRING 0x0400 // Key Befehle werden umgewandelt i.e. "" +#define M_SOFFICE 0x0800 // Command valid for Star/Open Office +#define M_MOZILLA 0x1000 // Command valid for Mozilla +// for MacroRecorder +#define M_RET_NUM_CONTROL 0x2000 // decode ULong as Control (For Tabpages, Toolboxes, ... ) + +// Methoden +#define M_Select 21 +#define M_SetNoSelection 22 +#define M_SetText 23 +#define M_More 24 +#define M_Less 25 +#define M_ToMin 26 +#define M_ToMax 27 +#define M_Check 28 +#define M_UnCheck 29 +#define M_TriState 30 +#define M_SetPage 31 +#define M_Click 32 + +#define M_Close 33 // Push Buttons on Dialog (Auch More Button) +#define M_Cancel 34 +#define M_OK 35 +#define M_Help 36 +#define M_Default 37 // Push defaultbutton on Dialog + +#define M_Yes 38 +#define M_No 39 +#define M_Repeat 40 + +// Diese Defines fallen nach einiger Zeit weg!! +//#define M_Schliessen M_Close +//#define M_Abbrechen M_Cancel +//#define M_Hilfe M_Help + +//#define M_Ja M_Yes +//#define M_Nein M_No +//#define M_Wiederholen M_Repeat +// Ende der wegfallenden Defines + +#define M_Open 41 +#define M_Pick 42 +#define M_Move 43 +#define M_Size 44 +#define M_Minimize 45 +#define M_Maximize 46 +#define M_Dock 47 +#define M_Undock 48 + + + +#define M_TypeKeys ( M_KEY_STRING | 50 ) +#define M_MouseDown 51 +#define M_MouseUp 52 +#define M_MouseMove 53 +#define M_MouseDoubleClick 54 +#define M_SnapShot 55 +#define M_SetNextToolBox 56 +#define M_OpenContextMenu 57 +#define M_MultiSelect 58 + +// Filedialog +#define M_SetPath 60 +#define M_SetCurFilter 61 + +// Printdialog +#define M_SetPrinter 70 +#define M_CheckRange 71 +#define M_SetRangeText 72 +#define M_SetFirstPage 73 +#define M_SetLastPage 74 +#define M_CheckCollate 75 +#define M_SetPageId 76 +#define M_SetPageNr 77 + +#define M_AnimateMouse 78 +#define M_TearOff 79 + +#define M_FadeIn 80 +#define M_FadeOut 81 +#define M_Pin 82 + +#define M_UseMenu 83 // Use the menu of the next possible parent of given Window + +#define M_OpenMenu 84 // MenuButtons and Menus in ToolBoxes + +#define M_DisplayPercent 200 // Zum Anzeigen der Prozente des Windows + +#define M_LAST_NO_RETURN 200 + +#if ( M_LAST_NO_RETURN >= M_WITH_RETURN ) +#error "Bereich überschritten" +#endif + +#define M_Exists ( M_WITH_RETURN | 1 ) +#define M_NotExists ( M_WITH_RETURN | 2 ) +#define M_IsEnabled ( M_WITH_RETURN | 3 ) +#define M_IsVisible ( M_WITH_RETURN | 4 ) +#define M_IsWritable ( M_WITH_RETURN | 5 ) + +#define M_GetPage ( M_WITH_RETURN | 6 ) +#define M_IsChecked ( M_WITH_RETURN | 7 ) +#define M_IsTristate ( M_WITH_RETURN | 8 ) +#define M_GetState ( M_WITH_RETURN | 9 ) +#define M_GetText ( M_WITH_RETURN | 10 ) +#define M_GetSelCount ( M_WITH_RETURN | 11 ) +#define M_GetSelIndex ( M_WITH_RETURN | 12 ) +#define M_GetSelText ( M_WITH_RETURN | 13 ) +#define M_GetItemCount ( M_WITH_RETURN | 14 ) +#define M_GetItemText ( M_WITH_RETURN | 15 ) +#define M_IsOpen ( M_WITH_RETURN | 16 ) +#define M_Caption ( M_WITH_RETURN | 17 ) +#define M_IsMax ( M_WITH_RETURN | 18 ) +#define M_IsDocked ( M_WITH_RETURN | 19 ) +#define M_GetRT ( M_WITH_RETURN | 20 ) +#define M_GetPageId ( M_WITH_RETURN | 21 ) +#define M_GetPageCount ( M_WITH_RETURN | 22 ) +#define M_GetPosX ( M_WITH_RETURN | 23 ) +#define M_GetPosY ( M_WITH_RETURN | 24 ) +#define M_GetSizeX ( M_WITH_RETURN | 25 ) +#define M_GetSizeY ( M_WITH_RETURN | 26 ) +#define M_GetNextToolBox ( M_WITH_RETURN | 27 ) +#define M_GetButtonCount ( M_WITH_RETURN | 28 ) +#define M_GetButtonId ( M_WITH_RETURN | 29 ) + +#define M_IsFadeIn ( M_WITH_RETURN | 30 ) +#define M_IsPin ( M_WITH_RETURN | 31 ) + +// Statusbar +#define M_StatusGetText ( M_WITH_RETURN | 32 ) +#define M_StatusIsProgress ( M_WITH_RETURN | 33 ) +#define M_StatusGetItemCount ( M_WITH_RETURN | 34 ) +#define M_StatusGetItemId ( M_WITH_RETURN | 35 ) + +// +#define M_GetMouseStyle ( M_WITH_RETURN | 36 ) + +// support for Messagebox with checkbox +#define M_GetCheckBoxText ( M_WITH_RETURN | 37 ) + +// Scrollbars +#define M_HasScrollBar ( M_WITH_RETURN | 38 ) +#define M_IsScrollBarEnabled ( M_WITH_RETURN | 39 ) + +// Diese befehle werden nur intern im Controller verwendet. Sie tauchen nicht im Testtool auf! +#define _M_IsEnabled ( M_WITH_RETURN | 50 ) + + +#define M_GetFixedTextCount ( M_WITH_RETURN | 51 ) +#define M_GetFixedText ( M_WITH_RETURN | 52 ) + +//#define M_SOFFICE 0x0800 // Command valid for Star/Open Office +//#define M_MOZILLA 0x1000 // Command valid for Mozilla + + +// RemoteCommands +#define RC_AppAbort ( M_SOFFICE | M_MOZILLA | 1 ) +#define RC_SetClipboard ( M_SOFFICE | M_MOZILLA | 2 ) +#define RC_NoDebug ( M_SOFFICE | M_MOZILLA | 3 ) +#define RC_Debug ( M_SOFFICE | M_MOZILLA | 4 ) +#define RC_GPF ( M_SOFFICE | M_MOZILLA | 5 ) +#define RC_DisplayHid ( M_SOFFICE | M_MOZILLA | 6 ) +#define RC_AppDelay ( M_SOFFICE | M_MOZILLA | 7 ) +#define RC_UseBindings ( M_SOFFICE | 8 ) +#define RC_Profile ( M_SOFFICE | M_MOZILLA | 9 ) +// (Popup)Menu +#define RC_MenuSelect ( M_SOFFICE | M_MOZILLA | 10 ) +#define RC_SetControlType ( M_SOFFICE | 11 ) +// RemoteFileAccess +#define RC_Kill ( M_SOFFICE | 12 ) +#define RC_RmDir ( M_SOFFICE | 13 ) +#define RC_MkDir ( M_SOFFICE | 14 ) +#define RC_FileCopy ( M_SOFFICE | 15 ) +#define RC_Name ( M_SOFFICE | 16 ) + +#define RC_CaptureAssertions (M_SOFFICE | M_MOZILLA | 17 ) +#define RC_Assert ( M_SOFFICE | M_MOZILLA | 18 ) + +#define RC_MenuOpen ( M_SOFFICE | M_MOZILLA | 19 ) + +#define RC_TypeKeysDelay ( M_SOFFICE | M_MOZILLA | 20 ) + +#define RC_ShowBar ( M_MOZILLA | 21 ) + +#define RC_LoadURL ( M_MOZILLA | 22 ) + +#define RC_CloseSysDialog ( M_SOFFICE | 23 ) + +#define RC_SAXRelease ( M_SOFFICE | 24 ) + +#define RC_RecordMacro ( M_SOFFICE | 25 ) + +#define RC_ActivateDocument ( M_SOFFICE | 26 ) + +#define _RC_LAST_NO_RETURN 26 + +#if ( _RC_LAST_NO_RETURN >= M_WITH_RETURN ) +#error "Bereich überschritten" +#endif + +// Befehle mit Returnwert +#define RC_GetClipboard ( M_SOFFICE | M_MOZILLA | M_WITH_RETURN | 1 ) +#define RC_WinTree ( M_SOFFICE | M_MOZILLA | M_WITH_RETURN | 2 ) +#define RC_ResetApplication ( M_SOFFICE | M_MOZILLA | M_WITH_RETURN | 3 ) +#define RC_GetNextCloseWindow ( M_SOFFICE | M_WITH_RETURN | 4 ) +#define RC_ApplicationBusy ( M_SOFFICE | M_MOZILLA | M_WITH_RETURN | 5 ) +// (Popup)Menu +#define RC_MenuGetItemCount ( M_SOFFICE | M_MOZILLA | M_WITH_RETURN | 6 ) +#define RC_MenuGetItemId ( M_SOFFICE | M_MOZILLA | M_WITH_RETURN | 7 ) +#define RC_MenuGetItemPos ( M_SOFFICE | M_MOZILLA | M_WITH_RETURN | 8 ) +#define RC_MenuIsSeperator ( M_SOFFICE | M_MOZILLA | M_WITH_RETURN | 9 ) +#define RC_MenuIsItemChecked ( M_SOFFICE | M_MOZILLA | M_WITH_RETURN | 10 ) +#define RC_MenuIsItemEnabled ( M_SOFFICE | M_MOZILLA | M_WITH_RETURN | 11 ) +#define RC_MenuGetItemText ( M_SOFFICE | M_MOZILLA | M_WITH_RETURN | 12 ) +// RemoteFileAccess +#define RC_Dir ( M_SOFFICE | M_WITH_RETURN | 18 ) +#define RC_FileLen ( M_SOFFICE | M_WITH_RETURN | 19 ) +#define RC_FileDateTime ( M_SOFFICE | M_WITH_RETURN | 20 ) + +#define RC_Translate ( M_SOFFICE | M_MOZILLA | M_WITH_RETURN | 21 ) +#define RC_GetMouseStyle ( M_SOFFICE | M_MOZILLA | M_WITH_RETURN | 22 ) +#define RC_UnpackStorage ( M_SOFFICE | M_WITH_RETURN | 23 ) + +#define RC_IsBarVisible ( M_MOZILLA | M_WITH_RETURN | 24 ) + +#define RC_MenuGetItemCommand ( M_SOFFICE | M_MOZILLA | M_WITH_RETURN | 25 ) + +#define RC_ExistsSysDialog ( M_SOFFICE | M_WITH_RETURN | 26 ) + +#define RC_SAXCheckWellformed ( M_SOFFICE | M_WITH_RETURN | 27 ) +#define RC_SAXReadFile ( M_SOFFICE | M_WITH_RETURN | 28 ) + +#define RC_SAXGetNodeType ( M_SOFFICE | M_WITH_RETURN | 29 ) +#define RC_SAXGetElementName ( M_SOFFICE | M_WITH_RETURN | 30 ) +#define RC_SAXGetChars ( M_SOFFICE | M_WITH_RETURN | 31 ) +#define RC_SAXGetChildCount ( M_SOFFICE | M_WITH_RETURN | 32 ) +#define RC_SAXGetAttributeCount ( M_SOFFICE | M_WITH_RETURN | 33 ) +#define RC_SAXGetAttributeName ( M_SOFFICE | M_WITH_RETURN | 34 ) +#define RC_SAXGetAttributeValue ( M_SOFFICE | M_WITH_RETURN | 35 ) +#define RC_SAXSeekElement ( M_SOFFICE | M_WITH_RETURN | 36 ) +#define RC_SAXHasElement ( M_SOFFICE | M_WITH_RETURN | 37 ) +#define RC_SAXGetElementPath ( M_SOFFICE | M_WITH_RETURN | 38 ) + +#define RC_GetDocumentCount ( M_SOFFICE | M_WITH_RETURN | 39 ) + + +// Flow Control +#define F_EndCommandBlock 101 // Initiiert Rückmeldung des Status +#define F_Sequence 102 // Übergibt Sequence Nummer (1. in jedem Stream) + +// Return codes +#define RET_Sequence 132 // Übergibt Sequence Nummer (1. in jedem Stream) +#define RET_Value 133 // Übergibt Return-wert +#define RET_WinInfo 134 // Information über aktuelles Fenster/Control +#define RET_ProfileInfo 135 // Profile Information +#define RET_DirectLoging 136 // Direktes Übertragen von Informationen in das Log +#define RET_MacroRecorder 137 // MakroRecorder Befehl übertragen + + + +// Subcodes die in nUId geliefert werden +// für F_ProfileInfo +#define S_ProfileReset 201 // nNr1 = Anzahl Borders + // Achtung!! Diese Defines müssen aufeinanderfolgende Nummern haben!! +#define S_ProfileBorder1 202 // nNr1 = Border1 in ms +#define S_ProfileBorder2 203 // nNr1 = Border2 in ms +#define S_ProfileBorder3 204 // nNr1 = Border3 in ms +#define S_ProfileBorder4 205 // nNr1 = Border4 in ms + // Achtung Ende +#define S_ProfileTime 210 // nNr1 = remote Zeit des Befehls +#define S_ProfileDump 211 // Gibt die daten aus. + +// für F_DirectLoging +#define S_AssertError 220 +#define S_AssertWarning 221 +#define S_AssertTrace 222 + + + +// Konstanten die im Basic zur Verfügung stehen sollen + +// Verschiedene Typen von Controls für den Befehl SetControlType +// !!!!!!!!!!! Müssen alle bei SetControlType eingetragen werden !!!!!!!!!!!! +#define CONST_CTBrowseBox 100 +#define CONST_CTTreeListBox 101 +#define CONST_CTProgressBar 102 // Eigentlich ein Window, aber der Einheitlichen Namensgebung wegen + +// Konstanten für das ALignment des gesuchten Splitters +#define CONST_ALIGN_LEFT 120 +#define CONST_ALIGN_TOP 121 +#define CONST_ALIGN_RIGHT 122 +#define CONST_ALIGN_BOTTOM 123 + +/// What bar to use in RC_ShowBar and RC_IsBarVisible +#define CONST_MenuBar 200 +#define CONST_ToolBar 201 +#define CONST_LocationBar 202 +#define CONST_PersonalBar 203 + +/// What dialog to use in RC_CloseSysDialog or RC_ExistsSysDialog +#define CONST_FilePicker 301 +#define CONST_FolderPicker 302 + +/// NodeTypes of the SAX Parser +#define CONST_NodeTypeCharacter 555 +#define CONST_NodeTypeElement 556 +#define CONST_NodeTypeComment 557 + + +// Beschreibt die Parametertypen als Bitfeld Reihenfolge immer! +// wie hier Aufgelistet +#define PARAM_NONE 0x0000 +#define PARAM_USHORT_1 0x0001 +#define PARAM_USHORT_2 0x0002 +#define PARAM_USHORT_3 0x0100 // Nicht in der Reihe!! +#define PARAM_USHORT_4 0x0200 // Nicht in der Reihe!! +#define PARAM_ULONG_1 0x0004 +#define PARAM_ULONG_2 0x0008 +#define PARAM_STR_1 0x0010 +#define PARAM_STR_2 0x0020 +#define PARAM_BOOL_1 0x0040 +#define PARAM_BOOL_2 0x0080 +#define PARAM_SBXVALUE_1 0x0400 // hier mit 0x0400 Weiter!!! Siehe Oben! + +// Zusätzliche Beschreibung!! wird auch mit dem Rest verodert +//#define PARAM_STR_RAW 0x8000 // Der Zeichensatz der Strings wird nicht konvertiert(für Fareastern) + + +#define ERR_SEND_TIMEOUT 100 +#define ERR_EXEC_TIMEOUT 101 +#define ERR_RESTART_FAIL 102 +#define ERR_RESTART 103 +#define ERR_NO_WIN 104 // Keine *.Win Dateien gefunden +#define ERR_NO_SID 105 // Keine *.Sid Dateien gefunden +#define ERR_NO_FILE 106 // Datei nicht gefunden + +#endif diff --git a/automation/source/inc/svcommstream.hxx b/automation/source/inc/svcommstream.hxx new file mode 100644 index 000000000000..0899e8f45c2a --- /dev/null +++ b/automation/source/inc/svcommstream.hxx @@ -0,0 +1,90 @@ +/************************************************************************* + * + * $RCSfile: svcommstream.hxx,v $ + * + * $Revision: 1.1 $ + * + * last change: $Author: mh $ $Date: 2002-11-18 11:12:08 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2002 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2002 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2002 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ + +#include + +#include "commtypes.hxx" +#include "icommstream.hxx" + + +class SvCommStream : public ICommStream +{ +protected: + SvStream* pStream; +public: + + SvCommStream( SvStream* pIO ); + ~SvCommStream(); + + ICommStream& operator>>( USHORT& rUShort ); + ICommStream& operator>>( ULONG& rULong ); + ICommStream& operator>>( unsigned char& rChar ); + + ICommStream& operator<<( USHORT nUShort ); + ICommStream& operator<<( ULONG nULong ); + ICommStream& operator<<( unsigned char nChar ); + + ULONG Read( void* pData, ULONG nSize ); + ULONG Write( const void* pData, ULONG nSize ); + + BOOL IsEof() const; + ULONG SeekRel( long nPos ); +}; diff --git a/automation/source/inc/testapp.hxx b/automation/source/inc/testapp.hxx new file mode 100644 index 000000000000..98671b49c71e --- /dev/null +++ b/automation/source/inc/testapp.hxx @@ -0,0 +1,227 @@ +/************************************************************************* + * + * $RCSfile: testapp.hxx,v $ + * + * $Revision: 1.1 $ + * + * last change: $Author: mh $ $Date: 2002-11-18 11:12:08 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2002 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2002 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2002 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ + +#ifndef TESTAPP_HXX +#define TESTAPP_HXX + +#include +#ifndef _BASIC_TESTTOOL_HXX_ +#include +#endif + +class CommunicationLink; +class CommunicationManager; +class CNames; +class ControlItemUId; +class CRevNames; +//class SbxTransportVariableRef; +class ControlsRef; +class CmdStream; +class FloatingLoadConf; +class TestToolObj; +class ControlDef; + +class SbxTransportMethod; +class Application; + +class SotStorage; + +class ImplTestToolObj; +class MyBasic; + +class ErrorEntry +{ +public: + ErrorEntry(ULONG nNr, String aStr = String()) : nError(nNr),aText(aStr),nLine(0),nCol1(0),nCol2(0) {} + ErrorEntry(ULONG nNr, String aStr, xub_StrLen l, xub_StrLen c1, xub_StrLen c2 ) + : nError(nNr),aText(aStr),nLine(l),nCol1(c1),nCol2(c2) {} + String aText; + ULONG nError; + xub_StrLen nLine; + xub_StrLen nCol1; + xub_StrLen nCol2; +}; + +SV_DECL_PTRARR_DEL(CErrors, ErrorEntry*, 1, 1) + +struct ControlDefLoad { + char* Kurzname; + ULONG nUId; +}; + +class TestToolObj: public SbxObject +{ + friend class TTBasic; + friend class Controls; +public: + TestToolObj( String aName, String aFilePath ); // Alle Dateien in FilePath, Kein IPC + TestToolObj( String aName, MyBasic* pBas ); // Pfade aus INI, IPC benutzen + ~TestToolObj(); + void LoadIniFile(); // Laden der IniEinstellungen, die durch den ConfigDialog geändert werden können + +private: + BOOL bWasPrecompilerError; // True wenn beim letzten Precompile ein Fehler auftrat + BOOL CError( ULONG, const String&, xub_StrLen, xub_StrLen, xub_StrLen ); + void CalcPosition( String const &aSource, xub_StrLen nPos, xub_StrLen &l, xub_StrLen &c ); + xub_StrLen ImplSearch( const String &aSource, const xub_StrLen nStart, const xub_StrLen nEnd, const String &aSearch, const xub_StrLen nSearchStart = 0 ); + xub_StrLen PreCompilePart( String &aSource, xub_StrLen nStart, xub_StrLen nEnd, String aFinalErrorLabel, USHORT &nLabelCount ); + void PreCompileDispatchParts( String &aSource, String aStart, String aEnd, String aFinalLable ); +public: + String PreCompile(String const &aSourceIn); // try catch; testcase endcase .. + BOOL WasPrecompilerError(); // True wenn beim letzten Precompile ein Fehler auftrat + void SFX_NOTIFY( SfxBroadcaster&, const TypeId&, const SfxHint& rHint, const TypeId& ); + virtual SbxVariable* Find( const String&, SbxClassType ); +// String aKeyPlusClasses; // Pfad für keycodes & classes & res_type (Aus Configdatei) + DECL_LINK( ReturnResultsLink, CommunicationLink* ); + BOOL ReturnResults( SvStream *pIn ); // Rücklieferung des Antwortstreams über IPC oder TCP/IP oder direkt + + void SetLogHdl( const Link& rLink ) { aLogHdl = rLink; } + const Link& GetLogHdl() const { return aLogHdl; } + + void SetWinInfoHdl( const Link& rLink ) { aWinInfoHdl = rLink; } + const Link& GetWinInfoHdl() const { return aWinInfoHdl; } + + void SetModuleWinExistsHdl( const Link& rLink ) { aModuleWinExistsHdl = rLink; } + const Link& GetModuleWinExistsHdl() const { return aModuleWinExistsHdl; } + + void SetCErrorHdl( const Link& rLink ) { aCErrorHdl = rLink; } + const Link& GetCErrorHdl() const { return aCErrorHdl; } + + void SetWriteStringHdl( const Link& rLink ) { aWriteStringHdl = rLink; } + const Link& GetWriteStringHdl() const { return aWriteStringHdl; } + + SfxBroadcaster& GetTTBroadcaster(); + +private: + ImplTestToolObj *pImpl; // Alles was von der Implementation abhängt + CErrors* const GetFehlerListe() { return pFehlerListe; } + BOOL bQuietErrors; // Wenn Control in pControls nicht gefunden kein Programmabbruch + BOOL bUseIPC; + Link aLogHdl; // Zum Logen der Fehlermeldungen im Testtool + Link aWinInfoHdl; // Anzeigen der Windows/Controls der zu testenden App + Link aModuleWinExistsHdl; // Prüft ob das Modul schon im Editor geladen ist + Link aCErrorHdl; // Melden von Compilererror + Link aWriteStringHdl; // Schreiben von text (e.g. MakroRecorder) + CErrors *pFehlerListe; // Hier werden die Fehler des Testtools gespeichert + BOOL bReturnOK; // Bricht WaitForAnswer ab + CRevNames *pShortNames; // Aktuell verwendete Controls, zur gewinnung des Namens aus Fehlermeldung + ULONG nSequence; // Sequence um Antwort und Anfrage zu syncronisieren + TTUniqueId aNextReturnId; // Id des Returnwertes i.e. UId + void ReplaceNumbers(String &aText); // Zahlen im String mit speziellem Format in Namen umwandeln + + String aLastRecordedKontext;// Keeps the last kontext recorded by the Macro Recorder + +#define FLAT TRUE + String ProgPath; // Dateiname der zu Testenden APP; Gesetzt über Start + String aLogFileName; // Momentaner Logfilename (Wie Programmdatei aber mit .res) + BOOL IsBlock; // Innerhalb Begin/EndBlock + BOOL SingleCommandBlock; // Implizit um jedes kommando ein Begin/EndBlock + CmdStream *In; + + void AddName(String &aBisher, String &aNeu ); // Name eventuell mit / anhängen + void AddToListByNr( CNames *&pControls, ControlItemUId *&pNewItem ); // + CNames *pControls; + CNames *pNameKontext; // Zeigt auf den aktuellen Namenskontext, der über 'Kontext' gesetzt wurde + CNames *pSIds; + CNames *pReverseSlots; // Slots mit Kurznamen nach Nummer + CNames *pReverseControls; // Controls mit Kurznamen nach Nummer + CNames *pReverseControlsSon;// Controls mit Kurznamen nach Nummer nach Fenstern (Son) + CNames *pReverseUIds; // Langnamen nach Nummer + + + USHORT nMyVar; // Wievielte Var aus Pool ist dran + USHORT nControlsObj; + + void InitTestToolObj(); + CommunicationManager *pCommunicationManager; + void SendViaSocket(); + + BOOL Load( String aName, SbModule *pMod ); + + void ReadNames( String Filename, CNames *&pNames, CNames *&pUIds, BOOL bIsFlat = FALSE ); + void ReadFlat( String Filename, CNames *&pNames, BOOL bSortByName ); + BOOL ReadNamesBin( String Filename, CNames *&pSIds, CNames *&pControls ); + BOOL WriteNamesBin( String Filename, CNames *pSIds, CNames *pControls ); + void ReadHidLstByNumber(); + void SortControlsByNumber( BOOL bIncludeActive = FALSE ); + + String GetMethodName( ULONG nMethodId ); + String GetKeyName( USHORT nKeyCode ); + + void WaitForAnswer (); + DECL_LINK( IdleHdl, Application* ); + DECL_LINK( CallDialogHandler, Application* ); + String aDialogHandlerName; + USHORT nWindowHandlerCallLevel; + + USHORT nIdleCount; + // wenn DialogHandler gesetzt wird er im IdleHandler inkrementiert und + // in WaitForAnswer rückgesetzt. Übersteigt er einen gewissen wert, gehe ich davon aus, + // daß WaitForAnswer still ligt und rufe die DialogHander Sub im BASIC auf. + + void BeginBlock(); + void EndBlock(); + + SbTextType GetSymbolType( const String &rSymbol, BOOL bWasControl ); + static ControlDefLoad const arR_Cmds[]; + static CNames *pRCommands; + +}; diff --git a/automation/source/inc/testtool.hxx b/automation/source/inc/testtool.hxx new file mode 100644 index 000000000000..ba9d33273b7e --- /dev/null +++ b/automation/source/inc/testtool.hxx @@ -0,0 +1,112 @@ +/************************************************************************* + * + * $RCSfile: testtool.hxx,v $ + * + * $Revision: 1.1 $ + * + * last change: $Author: mh $ $Date: 2002-11-18 11:12:08 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2002 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2002 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2002 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#ifndef SVTOOLS_TESTTOOL_HXX +#define SVTOOLS_TESTTOOL_HXX + +#ifndef _SOLAR_H +#include +#endif +#ifndef _LINK_HXX //autogen +#include +#endif + +class Application; +class SvStream; + +class StatementFlow; +class CommunicationManager; +class CommunicationLink; +#ifdef DEBUG +class EditWindow; +#endif +class ImplRC; + +class ImplRemoteControl +{ + friend class StatementFlow; + + BOOL m_bIdleInserted; +#ifdef DEBUG + EditWindow *m_pDbgWin; +#endif + ImplRC* pImplRC; + +public: + ImplRemoteControl(); + ~ImplRemoteControl(); + BOOL QueCommands( ULONG nServiceId, SvStream *pIn ); + SvStream* GetReturnStream(); + + DECL_LINK( IdleHdl, Application* ); + DECL_LINK( CommandHdl, Application* ); + + DECL_LINK( QueCommandsEvent, CommunicationLink* ); + ULONG nStoredServiceId; + SvStream *pStoredStream; + + void ExecuteURL( String &aURL ); + +protected: + CommunicationManager *pServiceMgr; + SvStream *pRetStream; +}; + +#endif // SVTOOLS_TESTTOOL_HXX diff --git a/automation/source/miniapp/editwin.cxx b/automation/source/miniapp/editwin.cxx new file mode 100644 index 000000000000..50a333a20a92 --- /dev/null +++ b/automation/source/miniapp/editwin.cxx @@ -0,0 +1,159 @@ +/************************************************************************* + * + * $RCSfile: editwin.cxx,v $ + * + * $Revision: 1.1 $ + * + * last change: $Author: mh $ $Date: 2002-11-18 11:17:26 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2002 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2002 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2002 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ + +#include "editwin.hxx" +#ifndef _STREAM_HXX //autogen +#include +#endif +#ifndef _MSGBOX_HXX //autogen +#include +#endif + + +BOOL GHEditWindow::Close() +{ + if (aInhalt.IsModified()) + { + } + delete(this); + return TRUE; +} + +void GHEditWindow::Resize() +{ + aInhalt.SetPosSizePixel(Point(1,1),GetOutputSizePixel()); +} + +GHEditWindow::GHEditWindow(Window * pParent, String aName, WinBits iWstyle) +: FloatingWindow(pParent) +, aInhalt(this,iWstyle) +{ + Show(); + Resize(); + aInhalt.Show(); + SetText(aName); +} + +void GHEditWindow::Clear() +{ + aInhalt.SetText(String()); +} + +void GHEditWindow::AddText( String aNew, BOOL bMoveToEnd) +{ + String aOld = aInhalt.GetText(); + + aOld += aNew; + aOld.ConvertLineEnd(); + aInhalt.SetText(aOld); + if (bMoveToEnd) + aInhalt.SetSelection(Selection(SELECTION_MAX,SELECTION_MAX)); +} + + +EditFileWindow::EditFileWindow(Window * pParent, String aName, WinBits iWstyle) +: GHEditWindow(pParent, aName, iWstyle) +, aFileName(aName) +{ + LoadFile(); +} + +void EditFileWindow::LoadFile() +{ + + SvFileStream Stream; + String All,Line; + + Stream.Open(aFileName, STREAM_STD_READ); + + if (!Stream.IsOpen()) + { + AddText(CUniString("could not open ").Append(aFileName).AppendAscii("\n")); + aFileName.Erase(); + return; + } + + while (!Stream.IsEof()) + { + + Stream.ReadByteStringLine( Line, RTL_TEXTENCODING_UTF8 ); + + All += Line; + All += '\n'; + + } + + All.ConvertLineEnd(); + + AddText(All,FALSE); + +} + +BOOL EditFileWindow::Close() +{ + + if (aInhalt.IsModified() && QueryBox(this,WB_DEF_YES | WB_YES_NO_CANCEL, String(aFileName).AppendAscii("\nwurde verändert.\n\nDatei Speichern?")).Execute()) + { + + } + return GHEditWindow::Close(); +} + diff --git a/automation/source/miniapp/editwin.hxx b/automation/source/miniapp/editwin.hxx new file mode 100644 index 000000000000..d9a9cdbc2709 --- /dev/null +++ b/automation/source/miniapp/editwin.hxx @@ -0,0 +1,109 @@ +/************************************************************************* + * + * $RCSfile: editwin.hxx,v $ + * + * $Revision: 1.1 $ + * + * last change: $Author: mh $ $Date: 2002-11-18 11:17:31 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2002 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2002 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2002 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#ifndef _editwin +#define _editwin + +#ifndef _BASIC_TTRESHLP_HXX +#include +#endif + +#ifndef _SV_FLOATWIN_HXX +#include +#endif +#ifndef _SVEDIT_HXX +#include +#endif + +class GHEditWindow : public FloatingWindow +{ + +protected: + + MultiLineEdit aInhalt; + + virtual BOOL Close(); // derived + void Resize(); + +public: + + GHEditWindow(); + GHEditWindow(Window * pParent, String aName = CUniString("Neues Fenster"), WinBits iWstyle = WB_STDWORK); + + void Clear(); + void AddText( String aNew, BOOL bMoveToEnd = TRUE); +}; + + + +class EditFileWindow : public GHEditWindow +{ + + String aFileName; + virtual BOOL Close(); // derived + void LoadFile(); + +public: + EditFileWindow(Window * pParent, String aName = CUniString("Neue Datei"), WinBits iWstyle = WB_STDWORK); + +}; + +#endif + diff --git a/automation/source/miniapp/hid.lst b/automation/source/miniapp/hid.lst new file mode 100644 index 000000000000..99964dba02e8 --- /dev/null +++ b/automation/source/miniapp/hid.lst @@ -0,0 +1,27 @@ +MENU_CLIENT 256 +IDM_FILE 1 +IDM_FILE_OPEN_TEST 2 +IDM_FILE_EXIT 3 +IDM_FILE_EXIT_HELP 0 +IDM_FILE_OPEN_TEST_HELP 1 +IDM_FILE_HELP 3 +GROSSER_TEST_DLG 256 +IDM_TEST 5 +IDM_TEST_GROSS 6 +IDM_SYS_DLG 7 +IDM_TEST_WINTREE 8 + + + +UID_GROSSER_TEST_DLG 101 +UID_CheckBox 202 +UID_TriStateBox 303 +UID_OKButton 404 +UID_TimeField 505 +UID_MultiLineEdit 606 +UID_RadioButton1 707 +UID_RadioButton2 708 +UID_MultiListBox 809 +UID_ComboBox 910 +UID_DateBox 1011 + diff --git a/automation/source/miniapp/makefile.mk b/automation/source/miniapp/makefile.mk new file mode 100644 index 000000000000..2a6d2c2d5d78 --- /dev/null +++ b/automation/source/miniapp/makefile.mk @@ -0,0 +1,92 @@ +#************************************************************************* +# +# $RCSfile: makefile.mk,v $ +# +# $Revision: 1.1 $ +# +# last change: $Author: mh $ $Date: 2002-11-18 11:17:42 $ +# +# The Contents of this file are made available subject to the terms of +# either of the following licenses +# +# - GNU Lesser General Public License Version 2.1 +# - Sun Industry Standards Source License Version 1.1 +# +# Sun Microsystems Inc., October, 2002 +# +# GNU Lesser General Public License Version 2.1 +# ============================================= +# Copyright 2002 by Sun Microsystems, Inc. +# 901 San Antonio Road, Palo Alto, CA 94303, USA +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License version 2.1, as published by the Free Software Foundation. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, +# MA 02111-1307 USA +# +# +# Sun Industry Standards Source License Version 1.1 +# ================================================= +# The contents of this file are subject to the Sun Industry Standards +# Source License Version 1.1 (the "License"); You may not use this file +# except in compliance with the License. You may obtain a copy of the +# License at http://www.openoffice.org/license.html. +# +# Software provided under this License is provided on an "AS IS" basis, +# WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, +# WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, +# MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. +# See the License for the specific provisions governing your rights and +# obligations concerning the Software. +# +# The Initial Developer of the Original Code is: Sun Microsystems, Inc.. +# +# Copyright: 2002 by Sun Microsystems, Inc. +# +# All Rights Reserved. +# +# Contributor(s): _______________________________________ +# +# +# +#************************************************************************* + +PRJ=..$/.. + +PRJNAME=AUTOMATION +TARGET=miniapp + +# --- Settings ------------------------------------------------------------ + +.INCLUDE : svpre.mk +.INCLUDE : settings.mk +.INCLUDE : sv.mk + +# --- Allgemein ------------------------------------------------------------ + +CXXFILES = \ + testapp.cxx \ + editwin.cxx \ + servres.cxx \ + + +OBJFILES = \ + $(OBJ)$/testapp.obj \ + $(OBJ)$/editwin.obj \ + $(OBJ)$/servres.obj \ + +SRCFILES = \ + servres.src + +# --- Targets ------------------------------------------------------------ + +.INCLUDE : target.mk diff --git a/automation/source/miniapp/servres.cxx b/automation/source/miniapp/servres.cxx new file mode 100644 index 000000000000..30aefee3d761 --- /dev/null +++ b/automation/source/miniapp/servres.cxx @@ -0,0 +1,91 @@ +/************************************************************************* + * + * $RCSfile: servres.cxx,v $ + * + * $Revision: 1.1 $ + * + * last change: $Author: mh $ $Date: 2002-11-18 11:17:48 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2002 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2002 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2002 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#include + +#include "servres.hrc" +#include "servuid.hxx" +#include "servres.hxx" + + +ModalDialogGROSSER_TEST_DLG::ModalDialogGROSSER_TEST_DLG( Window * pParent, const ResId & rResId, BOOL bFreeRes ) + : ModalDialog( pParent, rResId ), + aCheckBox1( this, ResId( 1 ) ), + aTriStateBox1( this, ResId( 1 ) ), + aOKButton1( this, ResId( 1 ) ), + aTimeField1( this, ResId( 1 ) ), + aMultiLineEdit1( this, ResId( 1 ) ), + aGroupBox1( this, ResId( 1 ) ), + aRadioButton1( this, ResId( 1 ) ), + aRadioButton2( this, ResId( 2 ) ), + aMultiListBox1( this, ResId( 1 ) ), + aComboBox1( this, ResId( 1 ) ), + aDateBox1( this, ResId( 1 ) ), + aFixedText1( this, ResId( 1 ) ) +{ + if( bFreeRes ) FreeResource(); +} + +MenuMENU_CLIENT::MenuMENU_CLIENT( const ResId & rResId, BOOL ) + : MenuBar( rResId ) +{ + // No subresources, automatic free resource +} + diff --git a/automation/source/miniapp/servres.hrc b/automation/source/miniapp/servres.hrc new file mode 100644 index 000000000000..8ff4838c447f --- /dev/null +++ b/automation/source/miniapp/servres.hrc @@ -0,0 +1,74 @@ +/************************************************************************* + * + * $RCSfile: servres.hrc,v $ + * + * $Revision: 1.1 $ + * + * last change: $Author: mh $ $Date: 2002-11-18 11:17:53 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2002 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2002 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2002 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +/* StarView ressource header file */ +#define MENU_CLIENT 256 +#define IDM_FILE 1 +#define IDM_FILE_OPEN_TEST 2 +#define IDM_FILE_EXIT 3 +#define IDM_FILE_EXIT_HELP 4 +#define IDM_FILE_OPEN_TEST_HELP 1 +#define IDM_FILE_HELP 3 +#define GROSSER_TEST_DLG 256 +#define IDM_TEST 5 +#define IDM_TEST_GROSS 6 +#define IDM_SYS_DLG 7 +#define IDM_TEST_WINTREE 8 + diff --git a/automation/source/miniapp/servres.hxx b/automation/source/miniapp/servres.hxx new file mode 100644 index 000000000000..5d080a3e2eef --- /dev/null +++ b/automation/source/miniapp/servres.hxx @@ -0,0 +1,117 @@ +/************************************************************************* + * + * $RCSfile: servres.hxx,v $ + * + * $Revision: 1.1 $ + * + * last change: $Author: mh $ $Date: 2002-11-18 11:17:58 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2002 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2002 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2002 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#ifndef _SVEDIT_HXX +#include +#endif +#ifndef _DIALOG_HXX //autogen +#include +#endif +#ifndef _BUTTON_HXX //autogen +#include +#endif +#ifndef _FIELD_HXX //autogen +#include +#endif +#ifndef _EDIT_HXX //autogen +#include +#endif +#ifndef _GROUP_HXX //autogen +#include +#endif +#ifndef _COMBOBOX_HXX //autogen +#include +#endif +#ifndef _FIXED_HXX //autogen +#include +#endif +#ifndef _MENU_HXX //autogen +#include +#endif +#ifndef _LSTBOX_HXX //autogen +#include +#endif + +class ModalDialogGROSSER_TEST_DLG : public ModalDialog +{ +protected: + CheckBox aCheckBox1; + TriStateBox aTriStateBox1; + OKButton aOKButton1; + TimeField aTimeField1; + MultiLineEdit aMultiLineEdit1; + GroupBox aGroupBox1; + RadioButton aRadioButton1; + RadioButton aRadioButton2; + MultiListBox aMultiListBox1; + ComboBox aComboBox1; + DateBox aDateBox1; + FixedText aFixedText1; +public: + ModalDialogGROSSER_TEST_DLG( Window * pParent, const ResId & rResId, BOOL bFreeRes = TRUE ); +}; + +class MenuMENU_CLIENT : public MenuBar +{ +protected: +public: + MenuMENU_CLIENT( const ResId & rResId, BOOL bFreeRes = TRUE ); +}; + diff --git a/automation/source/miniapp/servres.src b/automation/source/miniapp/servres.src new file mode 100644 index 000000000000..ebd2164bbc68 --- /dev/null +++ b/automation/source/miniapp/servres.src @@ -0,0 +1,267 @@ +/************************************************************************* + * + * $RCSfile: servres.src,v $ + * + * $Revision: 1.1 $ + * + * last change: $Author: mh $ $Date: 2002-11-18 11:18:04 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2002 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2002 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2002 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#include "servres.hrc" +#include "servuid.hxx" +ModalDialog GROSSER_TEST_DLG +{ + OutputSize = TRUE ; + SVLook = TRUE ; + HelpID = UID_GROSSER_TEST_DLG ; + Pos = MAP_APPFONT ( 14 , 7 ) ; + Size = MAP_APPFONT ( 273 , 110 ) ; + Text = "Großer Testdialog" ; + Moveable = TRUE ; + Closeable = TRUE ; + CheckBox 1 + { + HelpID = UID_CheckBox ; + Pos = MAP_APPFONT ( 9 , 17 ) ; + Size = MAP_APPFONT ( 55 , 12 ) ; + Text = "CheckBox" ; + TabStop = TRUE ; + }; + TriStateBox 1 + { + HelpID = UID_TriStateBox ; + Pos = MAP_APPFONT ( 9 , 29 ) ; + Size = MAP_APPFONT ( 62 , 12 ) ; + Text = "TriStateBox" ; + TabStop = TRUE ; + }; + OKButton 1 + { + HelpID = 1 ; + Pos = MAP_APPFONT ( 132 , 92 ) ; + Size = MAP_APPFONT ( 64 , 12 ) ; + TabStop = TRUE ; + }; + TimeField 1 + { + Border = TRUE ; + HelpID = UID_TimeField ; + Pos = MAP_APPFONT ( 9 , 92 ) ; + Size = MAP_APPFONT ( 40 , 12 ) ; + TabStop = TRUE ; + Spin = TRUE ; + }; + MultiLineEdit 1 + { + Border = TRUE ; + HelpID = UID_MultiLineEdit ; + Pos = MAP_APPFONT ( 172 , 6 ) ; + Size = MAP_APPFONT ( 94 , 48 ) ; + Text = "MultiLineEdit" ; + TabStop = TRUE ; + VScroll = TRUE ; + }; + GroupBox 1 + { + Pos = MAP_APPFONT ( 9 , 42 ) ; + Size = MAP_APPFONT ( 58 , 44 ) ; + Text = "GroupBox" ; + Group = TRUE ; + }; + RadioButton 2 + { + HelpID = UID_RadioButton2 ; + Pos = MAP_APPFONT ( 16 , 68 ) ; + Size = MAP_APPFONT ( 40 , 12 ) ; + Text = "Radio2" ; + TabStop = TRUE ; + }; + RadioButton 1 + { + HelpID = UID_RadioButton1 ; + Pos = MAP_APPFONT ( 16 , 54 ) ; + Size = MAP_APPFONT ( 42 , 12 ) ; + Text = "Radio1" ; + TabStop = TRUE ; + }; + MultiListBox 1 + { + Border = TRUE ; + HelpID = UID_MultiListBox ; + Pos = MAP_APPFONT ( 76 , 6 ) ; + Size = MAP_APPFONT ( 86 , 48 ) ; + TabStop = TRUE ; + StringList = + { + < "MultiListBox" ; Default ; > ; + < "Zeile 2" ; Default ; > ; + < "Zeile 3" ; Default ; > ; + < "Zeile 4" ; Default ; > ; + < "Zeile 5" ; Default ; > ; + < "Zeile 6" ; Default ; > ; + < "Zeile 7" ; Default ; > ; + < "Zeile 8" ; Default ; > ; + < "Zeile 9" ; Default ; > ; + < "Zeile 10" ; Default ; > ; + }; + }; + ComboBox 1 + { + HelpID = UID_ComboBox ; + Pos = MAP_APPFONT ( 76 , 58 ) ; + Size = MAP_APPFONT ( 86 , 55 ) ; + Text = "ComboBox" ; + TabStop = TRUE ; + DropDown = TRUE ; + AutoHScroll = TRUE ; + StringList = + { + "ComboBox" ; + "Erster" ; + "Zweiter" ; + "Dritter" ; + }; + }; + DateBox 1 + { + HelpID = UID_DateBox ; + Pos = MAP_APPFONT ( 76 , 72 ) ; + Size = MAP_APPFONT ( 86 , 54 ) ; + TabStop = TRUE ; + DropDown = TRUE ; + AutoHScroll = TRUE ; + StringList = + { + "1.1.91" ; + "2.2.92" ; + "3.3.93" ; + }; + }; + FixedText 1 + { + SVLook = TRUE ; + Pos = MAP_APPFONT ( 19 , 6 ) ; + Size = MAP_APPFONT ( 39 , 9 ) ; + Text = "FixedText" ; + Center = TRUE ; + }; + CancelButton 1 + { + Pos = MAP_APPFONT ( 202 , 92 ) ; + Size = MAP_APPFONT ( 64 , 12 ) ; + TabStop = TRUE ; + }; +}; +Menu MENU_CLIENT +{ + ItemList = + { + MenuItem + { + Identifier = IDM_FILE ; + HelpID = IDM_FILE_HELP ; + Text = "~File" ; + SubMenu = Menu + { + ItemList = + { + MenuItem + { + Identifier = IDM_FILE_OPEN_TEST ; + HelpID = IDM_FILE_OPEN_TEST_HELP ; + Text = "~Open Test Window" ; + }; + MenuItem + { + Identifier = 4 ; + Separator = TRUE ; + }; + MenuItem + { + Identifier = IDM_FILE_EXIT ; + HelpID = IDM_FILE_EXIT_HELP ; + Text = "~Beenden" ; + AccelKey = KeyCode + { + Code = KEY_F4 ; + Modifier2 = TRUE ; + }; + }; + }; + }; + }; + MenuItem + { + Identifier = IDM_TEST ; + Text = "~Test" ; + SubMenu = Menu + { + ItemList = + { + MenuItem + { + Identifier = IDM_TEST_GROSS ; + Text = "~Großer Testdialog" ; + }; + MenuItem + { + Identifier = IDM_SYS_DLG ; + Text = "~Sysdialoge" ; + }; + }; + }; + }; + }; +}; + diff --git a/automation/source/miniapp/servuid.hxx b/automation/source/miniapp/servuid.hxx new file mode 100644 index 000000000000..5da965e2bac8 --- /dev/null +++ b/automation/source/miniapp/servuid.hxx @@ -0,0 +1,71 @@ +/************************************************************************* + * + * $RCSfile: servuid.hxx,v $ + * + * $Revision: 1.1 $ + * + * last change: $Author: mh $ $Date: 2002-11-18 11:18:09 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2002 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2002 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2002 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#define UID_GROSSER_TEST_DLG 101 +#define UID_CheckBox 202 +#define UID_TriStateBox 303 +#define UID_OKButton 404 +#define UID_TimeField 505 +#define UID_MultiLineEdit 606 +#define UID_RadioButton1 707 +#define UID_RadioButton2 708 +#define UID_MultiListBox 809 +#define UID_ComboBox 910 +#define UID_DateBox 1011 diff --git a/automation/source/miniapp/test.bas b/automation/source/miniapp/test.bas new file mode 100644 index 000000000000..f454807cf2a8 --- /dev/null +++ b/automation/source/miniapp/test.bas @@ -0,0 +1,135 @@ +sub main + +wintree +' cMassentest + cTestdialog + cSysDlgTest + cFileOpenTest + SidWintree + + FileExit +end sub + +testcase cMassentest +DisplayHid +resetapplication +FileDialog +kontext "GrosserTestDlg" +dim c,t,lang,i +c = 0 +lang = "0123456789abcdef" +lang = lang + lang +lang = lang + lang +lang = lang + lang +lang = lang + lang +lang = lang + lang +lang = lang + lang + +lang = lang + lang +lang = lang + lang +'lang = lang + lang +'lang = lang + lang +'lang = lang + lang +'print len(lang) +nodebug +while 1 + c = c + 1 + t = str(c) + MultiLineEdit.SetText t + CheckBox.check lang + CheckBox.uncheck lang + for i = 1 to 200 : next + beep +wend + +endcase + + +testcase cFileOpenTest + + FileOpenTest + wintree + kontext + active.cancel + +endcase + + +testcase cSysDlgTest + + SysDialogs + wintree + kontext + active.yes + wintree + active.ok + active.Cancel + + SysDialogs + active.Cancel + active.ok + +endcase + +testcase cTestdialog + + FileDialog + + kontext "GrosserTestDlg" + CheckBox.uncheck + TriStateBox.tristate + 'OKButton +' TimeField.settext("fhsdjk") + MultiLineEdit.SetText "Das war der Text: '"+MultiLineEdit.GetText+"'" + RadioButton1.check + RadioButton2.check +' MultiListBox.select 2 + ComboBox.select("Dritter") + DateBox.select("1.1.91") + + GrosserTestDlg.ok + +endcase + + +sub LoadIncludeFiles +' start "d:\prj\actual\basic\source\testtool\server\debug\server.exe" + start "d:\office40.vcl\miniapp.exe" + + + use "test.win" + use "test.sid" + + testexit + +end sub + +sub testenter +end sub + +sub testexit +' if GrosserTestDlg.exists (1) then +' GrosserTestDlg.ok +' endif + + dim xx + xx = GetNextError + if xx > "" then print xx + xx = resetapplication + if xx > "" then warnlog xx + +end sub + + + + + + + + + + + + + + diff --git a/automation/source/miniapp/test.sid b/automation/source/miniapp/test.sid new file mode 100644 index 000000000000..3af8966aa06b --- /dev/null +++ b/automation/source/miniapp/test.sid @@ -0,0 +1,5 @@ +FileOpenTest IDM_FILE_OPEN_TEST +FileExit IDM_FILE_EXIT +FileDialog IDM_TEST_GROSS +SidWintree IDM_TEST_WINTREE +SysDialogs IDM_SYS_DLG diff --git a/automation/source/miniapp/test.win b/automation/source/miniapp/test.win new file mode 100644 index 000000000000..224ca5ad2d44 --- /dev/null +++ b/automation/source/miniapp/test.win @@ -0,0 +1,13 @@ +*active +*GrosserTestDlg UID_GROSSER_TEST_DLG +CheckBox UID_CheckBox +TriStateBox UID_TriStateBox +OKButton UID_OKButton +TimeField UID_TimeField +MultiLineEdit UID_MultiLineEdit +RadioButton1 UID_RadioButton1 +RadioButton2 UID_RadioButton2 +MultiListBox UID_MultiListBox +ComboBox UID_ComboBox +DateBox UID_DateBox + diff --git a/automation/source/miniapp/testapp.cxx b/automation/source/miniapp/testapp.cxx new file mode 100644 index 000000000000..ce1e7d58ab72 --- /dev/null +++ b/automation/source/miniapp/testapp.cxx @@ -0,0 +1,313 @@ +/************************************************************************* + * + * $RCSfile: testapp.cxx,v $ + * + * $Revision: 1.1 $ + * + * last change: $Author: mh $ $Date: 2002-11-18 11:18:30 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2002 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2002 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2002 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ + +#ifndef _SVT_FILEDLG_HXX //autogen +#include +#endif + +#ifndef _MSGBOX_HXX //autogen +#include +#endif +#ifndef _DEBUG_HXX //autogen +#include +#endif +#ifndef SVTOOLS_TESTTOOL_HXX //autogen +#include +#endif +#ifndef _SVTOOLS_TTPROPS_HXX // handmade +#include +#endif + +#include "servres.hrc" +#include "servres.hxx" +#include "testapp.hxx" + + +MainWindow::MainWindow(MyApp *pAppl) +: WorkWindow(NULL, WB_APP | WB_STDWORK) +, pApp(pAppl) +{} + +IMPL_LINK(MainWindow,MenuSelectHdl,MenuBar*,aMenu) +{ + + return pApp->GetDispatcher()->ExecuteFunction(aMenu->GetCurItemId()); + +} + +void MainWindow::FileOpen() +{ + FileDialog Dlg(this,WB_OPEN ); + + Dlg.AddFilter(CUniString("Alle Dateien"), CUniString("*.*")); + Dlg.SetCurFilter (CUniString("*.*")); + + if (Dlg.Execute() == RET_OK) + { + + EditFileWindow * aEditWin = new EditFileWindow(this,Dlg.GetPath()); + + } +} + + +void MainWindow::TestGross() +{ + ModalDialogGROSSER_TEST_DLG Dlg(this,ResId(GROSSER_TEST_DLG)); + + if (Dlg.Execute() == RET_OK) + { + } +} + + +BOOL MainWindow::Close() +{ + WorkWindow::Close(); + FileExit(); + return TRUE; +} + +void MainWindow::FileExit() +{ +/* WriteSTBProfile();*/ + +// if (pApp->CloseAll()) + pApp->Quit(); +} + + +void MainWindow::Tree(GHEditWindow *aEditWin, Window *pBase, int Indent) +{ + String sIndent,aText; + sIndent.Expand(5*Indent); + + aText = pBase->GetText(); + aText.SearchAndReplaceAllAscii("\n",CUniString("\\n")); + + aEditWin->AddText(String(sIndent).AppendAscii("Text: ").Append(aText).AppendAscii("\n")); + aEditWin->AddText(String(sIndent).AppendAscii("Help: ").Append(String::CreateFromInt64(pBase->GetHelpId())).AppendAscii(":").Append(pBase->GetQuickHelpText()).AppendAscii(":").Append(pBase->GetHelpText()).AppendAscii("\n")); + + int i; + for (i = 0 ; i < pBase->GetChildCount() ; i++) + { + Tree(aEditWin,pBase->GetChild(i),Indent+1); + } +} + +void MainWindow::WinTree() +{ + + GHEditWindow * aEditWin = new GHEditWindow(this,CUniString("Window Tree")); + Tree(aEditWin,this,0); + +} + +void MainWindow::SysDlg() +{ + + switch (QueryBox(this,WB_YES_NO_CANCEL | WB_DEF_YES, CUniString("Soll noch ein Dialog geöffnet werden?")).Execute()) + { + case RET_YES: + while ( WarningBox(this,WB_OK_CANCEL | WB_DEF_OK,CUniString("Das ist jetzt aber die letzte Box")).Execute() == RET_OK ); + break; + case RET_NO: + break; + case RET_CANCEL:InfoBox(this,CUniString("Schade")).Execute(); + 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; + +MyApp::MyApp() +{ + pMainWin = NULL; +} + +void MyApp::Property( ApplicationProperty& rProp ) +{ + TTProperties* pTTProperties = PTR_CAST( TTProperties, &rProp ); + if ( pTTProperties ) + { + 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(); + if ( !pDispatcher ) + pTTProperties->nActualPR = TT_PR_ERR_NODISPATCHER; + else + { + pDispatcher->SetExecuteMode(EXECUTEMODE_DIALOGASYNCHRON); + if ( pDispatcher->ExecuteFunction( + pTTProperties->mnSID, pTTProperties->mppArgs, pTTProperties->mnMode ) + == EXECUTE_NO ) + pTTProperties->nActualPR = TT_PR_ERR_NOEXECUTE; + else + pTTProperties->nActualPR = 0; + } + } + 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; + } + } + return; + } +} + + +USHORT MyDispatcher::ExecuteFunction( USHORT nSID, SfxPoolItem** ppArgs, USHORT nMode) +{ + + switch (nSID) + { + case IDM_FILE_EXIT: pMainWin->FileExit(); break; + case IDM_FILE_OPEN_TEST: pMainWin->FileOpen(); break; + case IDM_TEST_GROSS: pMainWin->TestGross(); break; + case IDM_TEST_WINTREE: pMainWin->WinTree(); break; + case IDM_SYS_DLG: pMainWin->SysDlg(); break; + default: + { + DBG_ERROR1("Dispatcher kennt Funktion nicht %s",ByteString::CreateFromInt64(nSID).GetBuffer()); + return EXECUTE_NO; + } + + } + return EXECUTE_YES; +} + +PlugInDispatcher* MyApp::GetDispatcher() +{ + return pMyDispatcher; +} + + +void MyApp::Main() +{ + ResMgr *pRes = new ResMgr( CUniString("miniapp.res") ); + Resource::SetResManager( pRes ); + + MainWindow MainWin(this); + pMainWin = &MainWin; + + MenuBar aMenu(ResId(MENU_CLIENT)); + MainWin.SetMenuBar( &aMenu ); + aMenu.SetSelectHdl(LINK(&MainWin, MainWindow, MenuSelectHdl)); + + MyDispatcher MyDsp(pMainWin); + pMyDispatcher = &MyDsp; + + MainWin.SetText(CUniString("Star Division Test Tool Client Window")); + MainWin.Show(); + + RemoteControl aRC; + + Execute(); +} + diff --git a/automation/source/miniapp/testapp.hxx b/automation/source/miniapp/testapp.hxx new file mode 100644 index 000000000000..8dd23e401707 --- /dev/null +++ b/automation/source/miniapp/testapp.hxx @@ -0,0 +1,160 @@ +/************************************************************************* + * + * $RCSfile: testapp.hxx,v $ + * + * $Revision: 1.1 $ + * + * last change: $Author: mh $ $Date: 2002-11-18 11:18:36 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2002 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2002 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2002 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#ifndef _TESTAPP_HXX +#define _TESTAPP_HXX + +#ifndef _SV_SVAPP_HXX +#include +#endif +#ifndef _DIALOG_HXX //autogen +#include +#endif +#ifndef _BUTTON_HXX //autogen +#include +#endif +#ifndef _FIELD_HXX //autogen +#include +#endif +#ifndef _EDIT_HXX //autogen +#include +#endif +#ifndef _GROUP_HXX //autogen +#include +#endif +#ifndef _COMBOBOX_HXX //autogen +#include +#endif +#ifndef _FIXED_HXX //autogen +#include +#endif +#ifndef _MENU_HXX //autogen +#include +#endif +#ifndef _WRKWIN_HXX //autogen +#include +#endif +#ifndef _SFXPOOLITEM_HXX +#include +#endif + + +#include "editwin.hxx" + + +#define EXECUTE_NO 0 +#define EXECUTE_POSSIBLE 1 +#define EXECUTE_YES 2 +#define EXECUTEMODE_ASYNCHRON 1 +#define EXECUTEMODE_DIALOGASYNCHRON 2 + + +class MyApp; +class MainWindow : public WorkWindow +{ + MyApp *pApp; + +public: + MainWindow(MyApp *pAppl); + virtual BOOL Close(); // derived + + void FileExit(); + void FileOpen(); + void TestGross(); + void Tree(GHEditWindow *aEditWin, Window *pBase, int Indent); + void WinTree(); + void SysDlg(); + DECL_LINK(MenuSelectHdl,MenuBar*); + +}; +#define PlugInDispatcher MyDispatcher +class MyDispatcher +{ + MainWindow *pMainWin; + +public: + MyDispatcher(MainWindow *MainWin) : pMainWin(MainWin) {}; + ~MyDispatcher() {}; + virtual USHORT ExecuteFunction( USHORT nSID, SfxPoolItem** ppArgs = 0, USHORT nMode = 0); + virtual void SetExecuteMode( USHORT nMode ) {}; // Ist hier sowieso egal +}; + +class MyApp : public Application +{ + PopupMenu *MyMenu; + Timer aCommandTimer; + PlugInDispatcher *pMyDispatcher; + +public: + MyApp(); + void Main(); + + virtual void Property( ApplicationProperty& ); + virtual PlugInDispatcher* GetDispatcher(); + + MainWindow *pMainWin; +}; + +// ----------------------------------------------------------------------- + +extern MyApp aApp; + +#endif + diff --git a/automation/source/mozillaserver/makefile.mk b/automation/source/mozillaserver/makefile.mk new file mode 100644 index 000000000000..792cb31aef0b --- /dev/null +++ b/automation/source/mozillaserver/makefile.mk @@ -0,0 +1,198 @@ +#************************************************************************* +# +# $RCSfile: makefile.mk,v $ +# +# $Revision: 1.1 $ +# +# last change: $Author: mh $ $Date: 2002-11-18 11:19:27 $ +# +# The Contents of this file are made available subject to the terms of +# either of the following licenses +# +# - GNU Lesser General Public License Version 2.1 +# - Sun Industry Standards Source License Version 1.1 +# +# Sun Microsystems Inc., October, 2002 +# +# GNU Lesser General Public License Version 2.1 +# ============================================= +# Copyright 2002 by Sun Microsystems, Inc. +# 901 San Antonio Road, Palo Alto, CA 94303, USA +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License version 2.1, as published by the Free Software Foundation. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, +# MA 02111-1307 USA +# +# +# Sun Industry Standards Source License Version 1.1 +# ================================================= +# The contents of this file are subject to the Sun Industry Standards +# Source License Version 1.1 (the "License"); You may not use this file +# except in compliance with the License. You may obtain a copy of the +# License at http://www.openoffice.org/license.html. +# +# Software provided under this License is provided on an "AS IS" basis, +# WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, +# WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, +# MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. +# See the License for the specific provisions governing your rights and +# obligations concerning the Software. +# +# The Initial Developer of the Original Code is: Sun Microsystems, Inc.. +# +# Copyright: 2002 by Sun Microsystems, Inc. +# +# All Rights Reserved. +# +# Contributor(s): _______________________________________ +# +# +# +#************************************************************************* + +PRJ=..$/.. + +PRJNAME=automation +TARGET=xxx +USE_DEFFILE=TRUE +NO_BSYMBOLIC=TRUE +ENABLE_EXCEPTIONS=TRUE +LIBTARGET=NO + +# --- Settings ----------------------------------------------------- + +.INCLUDE : svpre.mk +.INCLUDE : settings.mk +.INCLUDE : sv.mk +.INCLUDE : static.mk + +# ------------------------------------------------------------------ + +PACKAGE := com$/sun$/star$/testtool +TARGET := com_sun_star_testtool +#JARFILES = sandbox.jar + + +#RDB=$(SOLARBINDIR)$/applicat.rdb +RDB=$(BIN)$/mozillatesttool.rdb + + +GENJAVACLASSFILES = \ + $(CLASSDIR)$/$(PACKAGE)$/XAction.class \ + $(CLASSDIR)$/$(PACKAGE)$/XActionControl.class \ + $(CLASSDIR)$/$(PACKAGE)$/XActionCommand.class \ + $(CLASSDIR)$/$(PACKAGE)$/XActionControl.class \ + $(CLASSDIR)$/$(PACKAGE)$/XActionFlow.class \ + $(CLASSDIR)$/$(PACKAGE)$/XResult.class \ + $(CLASSDIR)$/$(PACKAGE)$/ResultType.class \ + $(CLASSDIR)$/$(PACKAGE)$/XMozillaTesttoolServer.class + + +TYPES={$(subst,.class, $(subst,$/,. $(subst,$(CLASSDIR)$/,-T $(GENJAVACLASSFILES))))} +GENJAVAFILES = {$(subst,.class,.java $(subst,$/class, $(GENJAVACLASSFILES)))} +#JAVAFILES= $(GENJAVAFILES) + + + +UNOUCRDEP=$(RDB) +UNOUCRRDB=$(RDB) + +UNOUCROUT=$(OUT)$/inc +INCPRE+=$(OUT)$/inc + +UNOTYPES= \ + com.sun.star.uno.TypeClass \ + com.sun.star.uno.XAggregation \ + com.sun.star.uno.XWeak \ + com.sun.star.lang.XTypeProvider \ + com.sun.star.lang.XServiceInfo \ + com.sun.star.lang.XSingleServiceFactory \ + com.sun.star.lang.XMultiServiceFactory \ + com.sun.star.lang.XComponent \ + com.sun.star.lang.XMain \ + com.sun.star.loader.XImplementationLoader \ + com.sun.star.registry.XRegistryKey \ + com.sun.star.bridge.XUnoUrlResolver \ + com.sun.star.container.XSet \ + com.sun.star.testtool.XAction \ + com.sun.star.testtool.XActionControl \ + com.sun.star.testtool.XActionCommand \ + com.sun.star.testtool.XActionControl \ + com.sun.star.testtool.XActionFlow \ + com.sun.star.testtool.XResult \ + com.sun.star.testtool.ResultType \ + com.sun.star.testtool.XMozillaTesttoolServer + + + +#SLOFILES= \ +# $(SLO)$/iserverproxy.obj \ +# $(SLO)$/broadcastclient.obj \ +# $(SLO)$/genericinformation.obj \ +# $(SLO)$/informationclient.obj + +# ---- test ---- + +#LIB1TARGET=$(SLB)$/iserverproxy.lib +#LIB1OBJFILES=$(SLOFILES) + +#SHL1TARGET=iserverproxy +#SHL1STDLIBS= \ +# $(VOSLIB) $(OSLLIB) $(RTLLIB) $(TOOLSLIB) \ +# $(CPPULIB) \ +# $(CPPUHELPERLIB) \ +# $(UNOLIB) \ +# $(SVTOOLLIB) \ +# $(SALLIB) \ +# $(BOOTSTRP) + +#SHL1LIBS= $(LIB1TARGET) $(LB)$/ico.lib +#SHL1DEF= $(MISC)$/$(SHL1TARGET).def +#DEF1NAME= $(SHL1TARGET) +#DEF1EXPORTFILE= exports.dxp + +# --- Targets ------------------------------------------------------ + +.IF "$(depend)" == "" +ALL : $(RDB) \ + $(GENJAVAFILES) \ + ALLTAR +.ELSE +ALL: ALLDEP +.ENDIF + +.INCLUDE : target.mk + +ALLIDLFILES= \ + mozillatesttoolserver.idl \ + xmozillatesttoolserver.idl + +$(RDB): $(ALLIDLFILES) + touch $@ + rm $@ + +unoidl -I$(PRJ) -I$(SOLARIDLDIR) -Burd -OH$(BIN) $? + +regmerge $@ /UCR $(BIN)$/{$(ALLIDLFILES:f:s/.idl/.urd/)} + +regmerge $@ / $(SOLARBINDIR)$/applicat.rdb + +regcomp -register -r $@ -c $(DLLPRE)connectr$(DLLPOST) + +regcomp -register -r $@ -c $(DLLPRE)acceptor$(DLLPOST) + +regcomp -register -r $@ -c $(DLLPRE)brdgfctr$(DLLPOST) + +regcomp -register -r $@ -c $(DLLPRE)remotebridge$(DLLPOST) + touch $@ + + +$(GENJAVAFILES): $(RDB) + @echo Types: $(TYPES) + @echo Javafiles: $(GENJAVAFILES) + javamaker -BUCR -O$(OUT) $(TYPES) $(RDB) + + diff --git a/automation/source/mozillaserver/mozillatesttoolserver.idl b/automation/source/mozillaserver/mozillatesttoolserver.idl new file mode 100644 index 000000000000..6ff993c585fc --- /dev/null +++ b/automation/source/mozillaserver/mozillatesttoolserver.idl @@ -0,0 +1,86 @@ +/************************************************************************* + * + * $RCSfile: mozillatesttoolserver.idl,v $ + * + * $Revision: 1.1 $ + * + * last change: $Author: mh $ $Date: 2002-11-18 11:19:28 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2002 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2002 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2002 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#ifndef __com_sun_star_testtool_MozillaTesttoolServer_idl__ +#define __com_sun_star_testtool_MozillaTesttoolServer_idl__ + +#include + +//============================================================================= + +module com { module sun { module star { module testtool { + +//============================================================================= +/** + * This service provides the ability to control Mozilla + *
+ */ +service MozillaTesttoolServer +{ + /** resolve objects via this interface. + */ + interface com::sun::star::testtool::XMozillaTesttoolServer; +}; + +//============================================================================= + +}; }; }; }; + +#endif diff --git a/automation/source/mozillaserver/xmozillatesttoolserver.idl b/automation/source/mozillaserver/xmozillatesttoolserver.idl new file mode 100644 index 000000000000..26fc8a77a779 --- /dev/null +++ b/automation/source/mozillaserver/xmozillatesttoolserver.idl @@ -0,0 +1,191 @@ +/************************************************************************* + * + * $RCSfile: xmozillatesttoolserver.idl,v $ + * + * $Revision: 1.1 $ + * + * last change: $Author: mh $ $Date: 2002-11-18 11:19:28 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2002 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2002 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2002 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#ifndef __com_sun_star_testtool_XMozillaTesttoolServer_idl__ +#define __com_sun_star_testtool_XMozillaTesttoolServer_idl__ + +#include +#include +#include + +//============================================================================= + +module com { module sun { module star { module testtool { + +//============================================================================= +/** Service com.sun.star.devtools.IServerProxy implements this interface. + */ +[ uik(E2423753-33D6-11D1-AABE00A0-259D5623), ident( "XMozillaTesttoolServer", 1.0 ) ] +interface XAction : com::sun::star::uno::XInterface +{ + /** execute one command +
+ */ + void execute(); + +}; + +//============================================================================= + + +//============================================================================= +/** Service com.sun.star.devtools.IServerProxy implements this interface. + */ +[ uik(E2423753-33D6-11D1-AABE00A0-259D5623), ident( "XMozillaTesttoolServer", 1.0 ) ] +interface XActionControl : XAction +{ + /** execute one command +
+ */ + void execute(); + +}; + +//============================================================================= + + +//============================================================================= +/** Service com.sun.star.devtools.IServerProxy implements this interface. + */ +[ uik(E2423753-33D6-11D1-AABE00A0-259D5623), ident( "XMozillaTesttoolServer", 1.0 ) ] +interface XActionCommand : XAction +{ + /** execute one command +
+ */ + void execute(); + +}; + +//============================================================================= +/** Service com.sun.star.devtools.IServerProxy implements this interface. + */ +[ uik(E2423743-33D6-11D1-AABE00A0-259D5623), ident( "XActionFlow", 1.0 ) ] +interface XActionFlow : XAction +{ + /** execute one command +
+ */ + void execute(); + +}; + +//============================================================================= + +}; }; }; }; + +//============================================================================= + +module com { module sun { module star { module testtool { + + +enum ResultType + { + SEQUENCE, /// command with SEQUENCE has been executed + ERROR, /// An error has ocured + RESULT, /// Result of a request + ASSERTION, /// An Assertion has been captured + UI_INFO /// Info about the UserInterfaace + }; + +//============================================================================= +/** Service com.sun.star.devtools.IServerProxy implements this interface. + */ +[ uik(E2426453-33D6-11D1-AABE00A0-259D5623), ident( "XResult", 1.0 ) ] +interface XResult : com::sun::star::uno::XInterface +{ + /** execute one command +
+ */ + void SetResultType( [in] ResultType aType ); + ResultType GetResultType(); + + void SetValue( [in] any Value ); + any GetValue(); +}; + +//============================================================================= + +}; }; }; }; + +//============================================================================= + +module com { module sun { module star { module testtool { + +//============================================================================= +/** Service com.sun.star.devtools.IServerProxy implements this interface. + */ +[ uik(E2446735-33D6-11D1-AABE00A0-259D5623), ident( "XMozillaTesttoolServer", 1.0 ) ] +interface XMozillaTesttoolServer : com::sun::star::uno::XInterface +{ + /** Control the Mozilla Browser +
+ */ + [oneway] void execute( [in] XAction aAction ); +// sequence < XResult > getResults( [in] boolean bBlock ); /// bBoch = TRUE means to wait for at least 1 result + +}; + +//============================================================================= + +}; }; }; }; + + +#endif -- cgit v1.2.3