diff options
Diffstat (limited to 'automation/source/miniapp')
-rw-r--r-- | automation/source/miniapp/editwin.cxx | 122 | ||||
-rw-r--r-- | automation/source/miniapp/editwin.hxx | 69 | ||||
-rw-r--r-- | automation/source/miniapp/hid.lst | 27 | ||||
-rw-r--r-- | automation/source/miniapp/makefile.mk | 54 | ||||
-rw-r--r-- | automation/source/miniapp/servres.cxx | 56 | ||||
-rw-r--r-- | automation/source/miniapp/servres.hrc | 40 | ||||
-rw-r--r-- | automation/source/miniapp/servres.hxx | 58 | ||||
-rw-r--r-- | automation/source/miniapp/servres.src | 233 | ||||
-rw-r--r-- | automation/source/miniapp/servuid.hxx | 40 | ||||
-rw-r--r-- | automation/source/miniapp/test.bas | 126 | ||||
-rw-r--r-- | automation/source/miniapp/test.sid | 5 | ||||
-rw-r--r-- | automation/source/miniapp/test.win | 13 | ||||
-rw-r--r-- | automation/source/miniapp/testapp.cxx | 308 | ||||
-rw-r--r-- | automation/source/miniapp/testapp.hxx | 108 |
14 files changed, 0 insertions, 1259 deletions
diff --git a/automation/source/miniapp/editwin.cxx b/automation/source/miniapp/editwin.cxx deleted file mode 100644 index b4e367670..000000000 --- a/automation/source/miniapp/editwin.cxx +++ /dev/null @@ -1,122 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org 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 version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_automation.hxx" - -#include "editwin.hxx" -#include <tools/stream.hxx> -#include <vcl/msgbox.hxx> - - -sal_Bool GHEditWindow::Close() -{ - if (aInhalt.IsModified()) - { - } - delete(this); - return sal_True; -} - -void GHEditWindow::Resize() -{ - aInhalt.SetPosSizePixel(Point(1,1),GetOutputSizePixel()); -} - -GHEditWindow::GHEditWindow(Window * pParent, String aName, WinBits iWstyle) -: FloatingWindow(pParent) -, aInhalt(this,iWstyle) -{ - SetOutputSizePixel( Size( 120,80 ) ); - Show(); - Resize(); - aInhalt.Show(); - SetText(aName); -} - -void GHEditWindow::AddText( String aNew, sal_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,sal_False); - -} - -sal_Bool EditFileWindow::Close() -{ - - if (aInhalt.IsModified() && QueryBox(this,WB_DEF_YES | WB_YES_NO_CANCEL, String(aFileName).AppendAscii("\nhas been changed.\n\nSave file?")).Execute()) - { - - } - return GHEditWindow::Close(); -} - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/automation/source/miniapp/editwin.hxx b/automation/source/miniapp/editwin.hxx deleted file mode 100644 index 3f6d2c101..000000000 --- a/automation/source/miniapp/editwin.hxx +++ /dev/null @@ -1,69 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org 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 version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#ifndef _editwin -#define _editwin - -#include <basic/ttstrhlp.hxx> -#include <vcl/floatwin.hxx> -#include <svtools/svmedit.hxx> - -class GHEditWindow : public FloatingWindow -{ - -protected: - - MultiLineEdit aInhalt; - - virtual sal_Bool Close(); // derived - void Resize(); - -public: - - GHEditWindow(); - GHEditWindow(Window * pParent, String aName = CUniString("Neues Fenster"), WinBits iWstyle = WB_STDWORK); - - void AddText( String aNew, sal_Bool bMoveToEnd = sal_True); -}; - - - -class EditFileWindow : public GHEditWindow -{ - - String aFileName; - virtual sal_Bool Close(); // derived - void LoadFile(); - -public: - EditFileWindow(Window * pParent, String aName = CUniString("Neue Datei"), WinBits iWstyle = WB_STDWORK); - -}; - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/automation/source/miniapp/hid.lst b/automation/source/miniapp/hid.lst deleted file mode 100644 index 99964dba0..000000000 --- a/automation/source/miniapp/hid.lst +++ /dev/null @@ -1,27 +0,0 @@ -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 deleted file mode 100644 index 10c16d8ab..000000000 --- a/automation/source/miniapp/makefile.mk +++ /dev/null @@ -1,54 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org 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 version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/.. - -PRJNAME=automation -TARGET=miniapp - -# --- Settings ------------------------------------------------------------ - -.INCLUDE : settings.mk - -# --- Allgemein ------------------------------------------------------------ - -OBJFILES = \ - $(EXCEPTIONSFILES) - - -EXCEPTIONSFILES= \ - $(OBJ)$/editwin.obj \ - $(OBJ)$/servres.obj \ - $(OBJ)$/testapp.obj - -SRS1NAME=$(TARGET) -SRC1FILES = \ - servres.src - -# --- Targets ------------------------------------------------------------ - -.INCLUDE : target.mk diff --git a/automation/source/miniapp/servres.cxx b/automation/source/miniapp/servres.cxx deleted file mode 100644 index a4b7a5df3..000000000 --- a/automation/source/miniapp/servres.cxx +++ /dev/null @@ -1,56 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org 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 version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_automation.hxx" -#include <string.h> - -#include "servres.hrc" -#include "servuid.hxx" -#include "servres.hxx" - - -ModalDialogGROSSER_TEST_DLG::ModalDialogGROSSER_TEST_DLG( Window * pParent, const ResId & rResId, sal_Bool bFreeRes ) - : ModalDialog( pParent, rResId ), - aCheckBox1( this, ResId( 1, *rResId.GetResMgr() ) ), - aTriStateBox1( this, ResId( 1, *rResId.GetResMgr() ) ), - aOKButton1( this, ResId( 1, *rResId.GetResMgr() ) ), - aTimeField1( this, ResId( 1, *rResId.GetResMgr() ) ), - aMultiLineEdit1( this, ResId( 1, *rResId.GetResMgr() ) ), - aGroupBox1( this, ResId( 1, *rResId.GetResMgr() ) ), - aRadioButton1( this, ResId( 1, *rResId.GetResMgr() ) ), - aRadioButton2( this, ResId( 2, *rResId.GetResMgr() ) ), - aMultiListBox1( this, ResId( 1, *rResId.GetResMgr() ) ), - aComboBox1( this, ResId( 1, *rResId.GetResMgr() ) ), - aDateBox1( this, ResId( 1, *rResId.GetResMgr() ) ), - aFixedText1( this, ResId( 1, *rResId.GetResMgr() ) ) -{ - if( bFreeRes ) FreeResource(); -} - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/automation/source/miniapp/servres.hrc b/automation/source/miniapp/servres.hrc deleted file mode 100644 index 508258df4..000000000 --- a/automation/source/miniapp/servres.hrc +++ /dev/null @@ -1,40 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org 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 version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -/* 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 "AUTOMATION_IDM_FILE_EXIT_HELP" -#define IDM_FILE_OPEN_TEST_HELP "AUTOMATION_IDM_FILE_OPEN_TEST_HELP" -#define IDM_FILE_HELP "AUTOMATION_IDM_FILE_HELP" -#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 deleted file mode 100644 index 318ffd885..000000000 --- a/automation/source/miniapp/servres.hxx +++ /dev/null @@ -1,58 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org 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 version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#include <svtools/svmedit.hxx> -#include <vcl/dialog.hxx> -#include <vcl/button.hxx> -#include <vcl/field.hxx> -#include <vcl/edit.hxx> -#include <vcl/group.hxx> -#include <vcl/combobox.hxx> -#include <vcl/fixed.hxx> -#include <vcl/menu.hxx> -#include <vcl/lstbox.hxx> - -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, sal_Bool bFreeRes = sal_True ); -}; - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/automation/source/miniapp/servres.src b/automation/source/miniapp/servres.src deleted file mode 100644 index f6f7b7e65..000000000 --- a/automation/source/miniapp/servres.src +++ /dev/null @@ -1,233 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org 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 version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#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 = "hid1" ; - 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 deleted file mode 100644 index b7c801a9a..000000000 --- a/automation/source/miniapp/servuid.hxx +++ /dev/null @@ -1,40 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org 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 version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#define UID_GROSSER_TEST_DLG "AUTOMATION_UID_GROSSER_TEST_DLG" -#define UID_CheckBox "AUTOMATION_UID_CheckBox" -#define UID_TriStateBox "AUTOMATION_UID_TriStateBox" -#define UID_OKButton "AUTOMATION_UID_OKButton" -#define UID_TimeField "AUTOMATION_UID_TimeField" -#define UID_MultiLineEdit "AUTOMATION_UID_MultiLineEdit" -#define UID_RadioButton1 "AUTOMATION_UID_RadioButton1" -#define UID_RadioButton2 "AUTOMATION_UID_RadioButton2" -#define UID_MultiListBox "AUTOMATION_UID_MultiListBox" -#define UID_ComboBox "AUTOMATION_UID_ComboBox" -#define UID_DateBox "AUTOMATION_UID_DateBox" - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/automation/source/miniapp/test.bas b/automation/source/miniapp/test.bas deleted file mode 100644 index 6d00e892f..000000000 --- a/automation/source/miniapp/test.bas +++ /dev/null @@ -1,126 +0,0 @@ -'encoding UTF-8 Do not remove or change this line! -sub main -' cMassentest -' DisplayHid - 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 -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 - setclipboard wintree - kontext - active.cancel - -endcase - - -testcase cSysDlgTest - - SysDialogs - setclipboard wintree - kontext - active.yes - setclipboard 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 "miniapp.exe", "-enableautomation" - - use "test.win" - use "test.sid" - - testexit - -end sub - -sub testenter -end sub - -sub testexit - - dim xx - xx = resetapplication - if xx > "" then warnlog xx - -end sub - - - - - - - - - - - - - - diff --git a/automation/source/miniapp/test.sid b/automation/source/miniapp/test.sid deleted file mode 100644 index 3af8966aa..000000000 --- a/automation/source/miniapp/test.sid +++ /dev/null @@ -1,5 +0,0 @@ -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 deleted file mode 100644 index 224ca5ad2..000000000 --- a/automation/source/miniapp/test.win +++ /dev/null @@ -1,13 +0,0 @@ -*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 deleted file mode 100644 index 2fb5ef843..000000000 --- a/automation/source/miniapp/testapp.cxx +++ /dev/null @@ -1,308 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org 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 version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_automation.hxx" -#include <svtools/filedlg.hxx> -#include <stdio.h> -#include <vcl/msgbox.hxx> -#include <tools/debug.hxx> -#include <svtools/testtool.hxx> -#include <svtools/ttprops.hxx> -#include <rtl/ustring.hxx> -#include <rtl/ustrbuf.hxx> -#include <osl/process.h> -#include <ucbhelper/contentbroker.hxx> -#include <ucbhelper/configurationkeys.hxx> -#include <comphelper/regpathhelper.hxx> -#include <comphelper/processfactory.hxx> -#include <cppuhelper/servicefactory.hxx> -#include <com/sun/star/registry/XImplementationRegistration.hpp> -#include <com/sun/star/lang/XMultiServiceFactory.hpp> -#include <com/sun/star/ucb/XContentProviderManager.hpp> - -#include "servres.hrc" -#include "servres.hxx" -#include "testapp.hxx" - -using namespace comphelper; -using namespace cppu; -using namespace com::sun::star::uno; -using namespace com::sun::star::lang; -using namespace com::sun::star::registry; -using namespace com::sun::star::ucb; - -using ::rtl::OUString; - -static ResMgr* pAppMgr = NULL; - -MainWindow::MainWindow(MyApp *pAppl) -: WorkWindow(NULL, 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) - { - new EditFileWindow(this,Dlg.GetPath()); - } -} - - -void MainWindow::TestGross() -{ - ModalDialogGROSSER_TEST_DLG Dlg(this,ResId(GROSSER_TEST_DLG, *pAppMgr)); - - if (Dlg.Execute() == RET_OK) - { - } -} - - -sal_Bool MainWindow::Close() -{ - WorkWindow::Close(); - FileExit(); - return sal_True; -} - -void MainWindow::FileExit() -{ - pApp->Quit(); -} - - -void MainWindow::Tree(GHEditWindow *aEditWin, Window *pBase, sal_uInt16 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")); - // FIXME: HELPID - aEditWin->AddText(String(sIndent).AppendAscii("Help: ").Append(String(rtl::OStringToOUString(pBase->GetHelpId(), RTL_TEXTENCODING_UTF8))).AppendAscii(":").Append(pBase->GetQuickHelpText()).AppendAscii(":").Append(pBase->GetHelpText()).AppendAscii("\n")); - - sal_uInt16 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("Want to open another Dialog?")).Execute()) - { - case RET_YES: - while ( WarningBox(this,WB_OK_CANCEL | WB_DEF_OK,CUniString("Well this is the last box now!")).Execute() == RET_OK ) ; - break; - case RET_NO: - break; - case RET_CANCEL:InfoBox(this,CUniString("Oh well..")).Execute(); - break; - } - -} - -MyApp aApp; - -MyApp::MyApp() -{ - pMainWin = NULL; - pMyDispatcher = 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_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; - default: - { - pTTProperties->nPropertyVersion = 0; - } - } - return; - } -} - - -sal_uInt16 MyDispatcher::ExecuteFunction( sal_uInt16 nSID, SfxPoolItem** ppArgs, sal_uInt16 nMode) -{ - (void) ppArgs; // avoid warning about unused parameter - (void) nMode; // avoid warning about unused parameter - - 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: - { - OSL_TRACE("Dispatcher kennt Funktion nicht %s", rtl::OString::valueOf(static_cast<sal_Int64>(nSID)).getStr()); - return EXECUTE_NO; - } - - } - return EXECUTE_YES; -} - -PlugInDispatcher* MyApp::GetDispatcher() -{ - return pMyDispatcher; -} - -Reference< XContentProviderManager > InitializeUCB( void ) -{ - OUString path; - if( osl_Process_E_None != osl_getExecutableFile( (rtl_uString**)&path ) ) - { - InfoBox( NULL, String::CreateFromAscii( "Couldn't retrieve directory of executable" ) ).Execute(); - exit( 1 ); - } - OSL_ASSERT( path.lastIndexOf( '/' ) >= 0 ); - - - ::rtl::OUStringBuffer bufServices( path.copy( 0, path.lastIndexOf( '/' )+1 ) ); - bufServices.appendAscii("services.rdb"); - OUString services = bufServices.makeStringAndClear(); - - ::rtl::OUStringBuffer bufTypes( path.copy( 0, path.lastIndexOf( '/' )+1 ) ); - bufTypes.appendAscii("types.rdb"); - OUString types = bufTypes.makeStringAndClear(); - - - Reference< XMultiServiceFactory > xSMgr; - try - { - xSMgr = createRegistryServiceFactory( types, services, sal_True ); - } - catch( com::sun::star::uno::Exception & exc ) - { - fprintf( stderr, "Couldn't bootstrap uno servicemanager for reason : %s\n" , - OUStringToOString( exc.Message, RTL_TEXTENCODING_ASCII_US ).getStr() ); - InfoBox( NULL, String( exc.Message ) ).Execute(); - throw ; - } - - - ////////////////////////////////////////////////////////////////////// - // set global factory - setProcessServiceFactory( xSMgr ); - -// Create unconfigured Ucb: - Sequence< Any > aArgs; - ucbhelper::ContentBroker::initialize( xSMgr, aArgs ); - Reference< XContentProviderManager > xUcb = - ucbhelper::ContentBroker::get()->getContentProviderManagerInterface(); - - Reference< XContentProvider > xFileProvider - ( xSMgr->createInstance( OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ucb.FileContentProvider" )) ), UNO_QUERY ); - xUcb->registerContentProvider( xFileProvider, OUString( RTL_CONSTASCII_USTRINGPARAM( "file" )), sal_True ); - - return xUcb; -} - -int MyApp::Main() -{ - Reference< XContentProviderManager > xUcb = InitializeUCB(); - LanguageType aRequestedLanguage; - aRequestedLanguage = LanguageType( LANGUAGE_GERMAN ); - - AllSettings aSettings = GetSettings(); - aSettings.SetUILanguage( aRequestedLanguage ); - aSettings.SetLanguage( aRequestedLanguage ); - SetSettings( aSettings ); - pAppMgr = CREATEVERSIONRESMGR( tma ); - - MainWindow MainWin(this); - pMainWin = &MainWin; - - MenuBar aMenu(ResId(MENU_CLIENT,*pAppMgr)); - MainWin.SetMenuBar( &aMenu ); - aMenu.GetPopupMenu( IDM_FILE )->SetSelectHdl(LINK(&MainWin, MainWindow, MenuSelectHdl)); - aMenu.GetPopupMenu( IDM_TEST )->SetSelectHdl(LINK(&MainWin, MainWindow, MenuSelectHdl)); - - MyDispatcher MyDsp(pMainWin); - pMyDispatcher = &MyDsp; - - MainWin.SetText(CUniString("Star Division Test Tool Client Window")); - MainWin.Show(); - - RemoteControl aRC; - - Execute(); - return EXIT_SUCCESS; -} - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/automation/source/miniapp/testapp.hxx b/automation/source/miniapp/testapp.hxx deleted file mode 100644 index 5441a6dd9..000000000 --- a/automation/source/miniapp/testapp.hxx +++ /dev/null @@ -1,108 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org 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 version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#ifndef _TESTAPP_HXX -#define _TESTAPP_HXX - -#include <vcl/svapp.hxx> -#include <vcl/dialog.hxx> -#include <vcl/button.hxx> -#include <vcl/field.hxx> -#include <vcl/edit.hxx> -#include <vcl/group.hxx> -#include <vcl/combobox.hxx> -#include <vcl/fixed.hxx> -#include <vcl/menu.hxx> -#include <vcl/wrkwin.hxx> -#include <svl/poolitem.hxx> - - -#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 sal_Bool Close(); // derived - - void FileExit(); - void FileOpen(); - void TestGross(); - void Tree(GHEditWindow *aEditWin, Window *pBase, sal_uInt16 Indent); - void WinTree(); - void SysDlg(); - DECL_LINK(MenuSelectHdl,MenuBar*); - -}; -#define PlugInDispatcher MyDispatcher -class MyDispatcher -{ - MainWindow *pMainWin; - -public: - MyDispatcher(MainWindow *MainWin) : pMainWin(MainWin) {}; - virtual ~MyDispatcher() {}; - virtual sal_uInt16 ExecuteFunction( sal_uInt16 nSID, SfxPoolItem** ppArgs = 0, sal_uInt16 nMode = 0); - virtual void SetExecuteMode( sal_uInt16 nMode ) - { - (void) nMode; /* avoid warning about unused parameter */ - }; // Ist hier sowieso egal -}; - -class MyApp : public Application -{ - Timer aCommandTimer; - PlugInDispatcher *pMyDispatcher; - -public: - MyApp(); - int Main(); - - virtual void Property( ApplicationProperty& ); - virtual PlugInDispatcher* GetDispatcher(); - - MainWindow *pMainWin; -}; - -// ----------------------------------------------------------------------- - -extern MyApp aApp; - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |