From 6efe9908b2b00e4e99fa2f773fef07dcc677b706 Mon Sep 17 00:00:00 2001 From: "Marc Neumann [msc]" Date: Wed, 19 May 2010 11:42:52 +0200 Subject: slidecopy: add new test extension --- .../extensions/TaskPaneComponent/TaskPaneComponent.oxt | Bin 0 -> 9884 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100755 testautomation/extensions/optional/input/extensions/TaskPaneComponent/TaskPaneComponent.oxt diff --git a/testautomation/extensions/optional/input/extensions/TaskPaneComponent/TaskPaneComponent.oxt b/testautomation/extensions/optional/input/extensions/TaskPaneComponent/TaskPaneComponent.oxt new file mode 100755 index 000000000..5c826dd35 Binary files /dev/null and b/testautomation/extensions/optional/input/extensions/TaskPaneComponent/TaskPaneComponent.oxt differ -- cgit v1.2.3 From 4b96a918b1128ad5d30264430b538a72165bd591 Mon Sep 17 00:00:00 2001 From: "Marc Neumann [msc]" Date: Wed, 19 May 2010 11:45:38 +0200 Subject: slidecopy: changes for the new taskpane implementation --- testautomation/global/input/officeinfo.txt | 3 +-- testautomation/global/sid/e_all.sid | 2 +- testautomation/global/win/dial_t_z.win | 4 ---- testautomation/global/win/edia_t_z.win | 4 ++-- .../optional/includes/global/export_graphic_2.inc | 21 +++++++-------------- .../optional/includes/global/g_autocorrection.inc | 2 +- .../optional/includes/global/g_customshapes.inc | 8 ++++---- .../optional/includes/global/g_demoguide.inc | 2 +- .../optional/includes/global/g_load_save.inc | 11 +++-------- testautomation/graphics/tools/id_tools.inc | 10 +++++----- 10 files changed, 25 insertions(+), 42 deletions(-) mode change 100644 => 100755 testautomation/global/input/officeinfo.txt diff --git a/testautomation/global/input/officeinfo.txt b/testautomation/global/input/officeinfo.txt old mode 100644 new mode 100755 index dc334737d..a6b692b15 --- a/testautomation/global/input/officeinfo.txt +++ b/testautomation/global/input/officeinfo.txt @@ -1,6 +1,5 @@ [Current program versions] -StarOffice=9 -StarSuite=9 +Oracle Open Office=3.2 OpenOffice.org=3.1 BrOffice.org=3.1 diff --git a/testautomation/global/sid/e_all.sid b/testautomation/global/sid/e_all.sid index de68cf13f..2fde9b77b 100755 --- a/testautomation/global/sid/e_all.sid +++ b/testautomation/global/sid/e_all.sid @@ -256,7 +256,7 @@ ViewSnapLinesFront SID_HELPLINES_FRONT ViewStatusBarVisible .uno:StatusBarVisible ViewShowImeStatusWindow .uno:ShowImeStatusWindow ViewShowRuler .uno:ShowRuler -ViewTaskPane .uno:RightPane +ViewTaskPane .uno:TaskPane ViewTaskSlide .uno:LeftPaneImpress ViewTitle SID_TITLE_MASTERPAGE ViewToolbarsOptionbar .uno:AvailableToolbars?Toolbar:string=optionsbar diff --git a/testautomation/global/win/dial_t_z.win b/testautomation/global/win/dial_t_z.win index c37ad2512..899254eb6 100755 --- a/testautomation/global/win/dial_t_z.win +++ b/testautomation/global/win/dial_t_z.win @@ -170,10 +170,6 @@ Vorschau sd:PushButton:DLG_VECTORIZE:BTN_PREVIEW *UndoRedoBox HID_SVXTBX_UNDO_REDO_CTRL UndoRedoList svx:ListBox:RID_SVXTBX_UNDO_REDO_CTRL:LB_SVXTBX_UNDO_REDO_CTRL -*UrlOeffnen sfx2:ModalDialog:RID_URLOPEN -URL sfx2:Edit:RID_URLOPEN:RID_URLOPEN_URL -URLText sfx2:Edit:RID_URLOPEN:RID_URLOPEN_URL - *Verbinder HID_PAGE_CONNECTION SVX:TABPAGE:RID_SVXPAGE_CONNECTION Linie1 cui:METRICFIELD:RID_SVXPAGE_CONNECTION:MTR_FLD_LINE_1 Linie2 cui:METRICFIELD:RID_SVXPAGE_CONNECTION:MTR_FLD_LINE_2 diff --git a/testautomation/global/win/edia_t_z.win b/testautomation/global/win/edia_t_z.win index a53038e79..099e62675 100755 --- a/testautomation/global/win/edia_t_z.win +++ b/testautomation/global/win/edia_t_z.win @@ -40,8 +40,8 @@ FinishBtn HID_DLGTABLE_CMDFINISH CancelBtn HID_DLGTABLE_CMDCANCEL ' not nice solved, but can't do better right now; complains -> TBO -*Tasks sd:DockingWindow:FLT_RIGHT_PANE_DOCKING_WINDOW -View HID_SD_TASK_PANE_VIEW_MENU +*Tasks sd:DockingWindow:FLT_TOOL_PANEL_DOCKING_WINDOW +View HID_TASKPANE_VIEW_MENU '? HID_SD_WIN_DOCUMENT ' Master Pages UsedInThisPresentationPreview HID_SD_TASK_PANE_PREVIEW_CURRENT diff --git a/testautomation/graphics/optional/includes/global/export_graphic_2.inc b/testautomation/graphics/optional/includes/global/export_graphic_2.inc index d4c6f46ed..67c456201 100755 --- a/testautomation/graphics/optional/includes/global/export_graphic_2.inc +++ b/testautomation/graphics/optional/includes/global/export_graphic_2.inc @@ -146,7 +146,7 @@ testcase tSVM hFileOpen (sDocument) sleep (10) - sMakeReadOnlyDocumentEditable + call fMakeDocumentWritable hTypeKeys ("") fGetSizeXY sx1, sY, TRUE @@ -763,14 +763,8 @@ qaerrorlog endif ' check if the document is writable - if fIsDocumentWritable = false then - ' make the document writable and check if it's succesfull - if fMakeDocumentWritable = false then - warnlog "The document can't be make writeable. Test stopped." - goto endsub - endif - endif - + call fMakeDocumentWritable + hTypeKeys ("") fGetSizeXY sx1, sy, TRUE if hCallExport (OutputGrafikTBO + "1" , "BMP - Windows Bitmap (.bmp)", TRUE ) = TRUE then @@ -948,9 +942,8 @@ testcase tEMF Filterauswahl.Cancel goto endsub endif - printlog "making doc editable if it is readonly" - sMakeReadOnlyDocumentEditable - + printlog "making doc editable if it is readonly" + call fMakeDocumentWritable hTypeKeys ("") fGetSizeXY sx1, sY, TRUE if hCallExport (OutputGrafikTBO & "1" , sFilter, TRUE ) = TRUE then @@ -1139,7 +1132,7 @@ testcase tMET sleep (10) printlog "making doc editable if it is readonly" - sMakeReadOnlyDocumentEditable + call fMakeDocumentWritable hTypeKeys ("") fGetSizeXY sx1, sY, TRUE @@ -1341,7 +1334,7 @@ testcase tWMF sleep (10) printlog "making doc editable if it is readonly" - sMakeReadOnlyDocumentEditable + call fMakeDocumentWritable hTypeKeys ("") fGetSizeXY sx1, sY, TRUE diff --git a/testautomation/graphics/optional/includes/global/g_autocorrection.inc b/testautomation/graphics/optional/includes/global/g_autocorrection.inc index b0a0326a6..e73d72b07 100755 --- a/testautomation/graphics/optional/includes/global/g_autocorrection.inc +++ b/testautomation/graphics/optional/includes/global/g_autocorrection.inc @@ -159,7 +159,7 @@ testcase tToolsAutocorrectCustomQuotes(bSimple as boolean) printlog "File opened: " + sFileName Sleep 3 - Call sMakeReadOnlyDocumentEditable + call fMakeDocumentWritable if bSimple then Printlog "- Tools/Autocorrect -single quotes" diff --git a/testautomation/graphics/optional/includes/global/g_customshapes.inc b/testautomation/graphics/optional/includes/global/g_customshapes.inc index 3cd31dac7..98fbe7bb4 100755 --- a/testautomation/graphics/optional/includes/global/g_customshapes.inc +++ b/testautomation/graphics/optional/includes/global/g_customshapes.inc @@ -646,15 +646,15 @@ testcase tFormatPaintbrush sleep 1 else '(Impress) Kontext "DocumentImpress" - DocumentImpress.Mousedown 20, 20 - DocumentImpress.Mouseup 20, 20 + DocumentImpress.typekeys("",true) + DocumentImpress.typekeys("",true) + DocumentImpress.typekeys("",true) sleep 1 kontext "Standardbar" FormatPaintbrush.Click kontext "DocumentImpress" sleep 1 - DocumentImpress.Mousedown 80, 80 - DocumentImpress.Mouseup 80, 80 + DocumentImpress.typekeys("",true) sleep 1 endif diff --git a/testautomation/graphics/optional/includes/global/g_demoguide.inc b/testautomation/graphics/optional/includes/global/g_demoguide.inc index 56dd1f89e..e8784eb67 100755 --- a/testautomation/graphics/optional/includes/global/g_demoguide.inc +++ b/testautomation/graphics/optional/includes/global/g_demoguide.inc @@ -385,7 +385,7 @@ testcase t_DrawingEngine printlog "Open a drawing" hFileOpen (Convertpath (gTesttoolPath + "graphics/required/input/Blueprint.odg")) - Call sMakeReadOnlyDocumentEditable + Call fMakeDocumentWritable '///Select grouped object and enter group printlog "Select group" diff --git a/testautomation/graphics/optional/includes/global/g_load_save.inc b/testautomation/graphics/optional/includes/global/g_load_save.inc index 9bc422f99..6622c9c7a 100755 --- a/testautomation/graphics/optional/includes/global/g_load_save.inc +++ b/testautomation/graphics/optional/includes/global/g_load_save.inc @@ -302,14 +302,9 @@ testcase tFileOpenImport Dateiname.SetText (ConvertPath (gTesttoolpath + "graphics\required\input\imsusmap.cgm")) Oeffnen.Click Sleep 2 - ' check if the document is writable - if fIsDocumentWritable = false then - ' make the document writable and check if it's succesfull - if fMakeDocumentWritable = false then - warnlog "The document can't be make writeable. Test stopped." - goto endsub - endif - endif + + call fMakeDocumentWritable + kontext "DocumentImpress" if DocumentImpress.exists(5) then DocumentImpress.TypeKeys ("") diff --git a/testautomation/graphics/tools/id_tools.inc b/testautomation/graphics/tools/id_tools.inc index 117fa4772..e71c9f765 100755 --- a/testautomation/graphics/tools/id_tools.inc +++ b/testautomation/graphics/tools/id_tools.inc @@ -289,10 +289,10 @@ end function '------------------------------------------------------------------------------- function fMakeDocumentWritable() as boolean - printlog " make a document is writeable" - printlog " parameter:" - printlog " return:" - printlog " true if the document can make writeable otherwise false" + 'make a document is writeable + 'parameter: + 'return: + 'true if the document can make writeable otherwise false Kontext "Standardbar" sleep (1) @@ -310,7 +310,7 @@ function fMakeDocumentWritable() as boolean printlog "Document is allready writable." fMakeDocumentWritable = true endif - + sleep (1) end function '------------------------------------------------------------------------------- -- cgit v1.2.3 From 337425b5de4093023abc1ecbdd198232b2962ffa Mon Sep 17 00:00:00 2001 From: "Marc Neumann [msc]" Date: Thu, 20 May 2010 16:47:40 +0200 Subject: slidecopy: fixes for new taskpane --- testautomation/graphics/optional/includes/global/g_demoguide.inc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/testautomation/graphics/optional/includes/global/g_demoguide.inc b/testautomation/graphics/optional/includes/global/g_demoguide.inc index e8784eb67..2187045f5 100755 --- a/testautomation/graphics/optional/includes/global/g_demoguide.inc +++ b/testautomation/graphics/optional/includes/global/g_demoguide.inc @@ -144,7 +144,8 @@ testcase t_Introduction warnlog "Tasks Panel not visible. Opening now." ViewTaskPane endif - Kontext "LayoutsPreview" + View.OpenMenu + MenuSelect(MenuGetItemId(1)) LayoutsPreview.TypeKeys " " sleep (5) '///Add a background @@ -160,7 +161,8 @@ testcase t_Introduction MenuSelect(MenuGetItemID(3)) View.OpenMenu MenuSelect(MenuGetItemID(2)) - Kontext "AvailableForUsePreview" + View.OpenMenu + MenuSelect(MenuGetItemID(1)) AvailableForUsePreview.TypeKeys " " sleep (5) '///Add a transition effect -- cgit v1.2.3 From a45b5f91ca3206ee82a1c6a9cdb6c56d6c15b7eb Mon Sep 17 00:00:00 2001 From: "Marc Neumann [msc]" Date: Fri, 21 May 2010 08:03:36 +0200 Subject: slideshow: new files for testing the new taskpane --- testautomation/extensions/optional/e_taskpane.bas | 49 +++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 testautomation/extensions/optional/e_taskpane.bas diff --git a/testautomation/extensions/optional/e_taskpane.bas b/testautomation/extensions/optional/e_taskpane.bas new file mode 100644 index 000000000..b6d29d222 --- /dev/null +++ b/testautomation/extensions/optional/e_taskpane.bas @@ -0,0 +1,49 @@ +'encoding UTF-8 Do not remove or change this line! +'************************************************************************** +' 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 +' +' for a copy of the LGPLv3 License. +' +'/************************************************************************ +'* +'* owner : +'* +'* short description : +'* +'\*********************************************************************** + +sub main + + use "extensions/optional/includes/e_taskpane.inc" + call tTaskPane + +end sub + +sub LoadIncludeFiles + + use "global\system\includes\gvariabl.inc" + use "global\system\includes\master.inc" + use "global\tools\includes\optional\t_extension_manager_tools.inc" + gApplication = "CALC" + call GetUseFiles() + +end sub \ No newline at end of file -- cgit v1.2.3 From 5321db853b922ee6d3f4e6c0d7db8d395e81c337 Mon Sep 17 00:00:00 2001 From: "Marc Neumann [msc]" Date: Fri, 21 May 2010 08:54:06 +0200 Subject: slidecopy: new files for testing the new taskpane --- .../extensions/optional/includes/e_taskpane.inc | 74 ++ .../extension_sources/TaskPaneComponent/build.xml | 72 ++ .../TaskPaneComponent/nbproject/build-impl.xml | 794 +++++++++++++++++++++ .../TaskPaneComponent/nbproject/build-uno-impl.xml | 462 ++++++++++++ .../nbproject/genfiles.properties | 8 + .../nbproject/private/config.properties | 0 .../nbproject/private/private.properties | 6 + .../nbproject/project-uno.properties | 18 + .../TaskPaneComponent/nbproject/project.properties | 67 ++ .../TaskPaneComponent/nbproject/project.xml | 14 + .../org/openoffice/Office/UI/CalcWindowState.xcu | 23 + .../data/org/openoffice/Office/UI/Factories.xcu | 35 + .../src/com/example/CentralRegistrationClass.java | 140 ++++ .../src/com/example/TaskPaneComponent.java | 116 +++ .../src/com/example/ToolPanel.java | 56 ++ .../src/com/example/ToolPanelUIElement.java | 153 ++++ .../TaskPaneComponent/src/description.xml | 5 + .../src/toolpanels/TaskPaneComponentUI.xdl | 8 + .../src/uno-extension-manifest.xml | 9 + 19 files changed, 2060 insertions(+) create mode 100644 testautomation/extensions/optional/includes/e_taskpane.inc create mode 100755 testautomation/extensions/optional/input/extension_sources/TaskPaneComponent/build.xml create mode 100755 testautomation/extensions/optional/input/extension_sources/TaskPaneComponent/nbproject/build-impl.xml create mode 100755 testautomation/extensions/optional/input/extension_sources/TaskPaneComponent/nbproject/build-uno-impl.xml create mode 100755 testautomation/extensions/optional/input/extension_sources/TaskPaneComponent/nbproject/genfiles.properties create mode 100755 testautomation/extensions/optional/input/extension_sources/TaskPaneComponent/nbproject/private/config.properties create mode 100755 testautomation/extensions/optional/input/extension_sources/TaskPaneComponent/nbproject/private/private.properties create mode 100755 testautomation/extensions/optional/input/extension_sources/TaskPaneComponent/nbproject/project-uno.properties create mode 100755 testautomation/extensions/optional/input/extension_sources/TaskPaneComponent/nbproject/project.properties create mode 100755 testautomation/extensions/optional/input/extension_sources/TaskPaneComponent/nbproject/project.xml create mode 100755 testautomation/extensions/optional/input/extension_sources/TaskPaneComponent/registry/data/org/openoffice/Office/UI/CalcWindowState.xcu create mode 100755 testautomation/extensions/optional/input/extension_sources/TaskPaneComponent/registry/data/org/openoffice/Office/UI/Factories.xcu create mode 100755 testautomation/extensions/optional/input/extension_sources/TaskPaneComponent/src/com/example/CentralRegistrationClass.java create mode 100755 testautomation/extensions/optional/input/extension_sources/TaskPaneComponent/src/com/example/TaskPaneComponent.java create mode 100755 testautomation/extensions/optional/input/extension_sources/TaskPaneComponent/src/com/example/ToolPanel.java create mode 100755 testautomation/extensions/optional/input/extension_sources/TaskPaneComponent/src/com/example/ToolPanelUIElement.java create mode 100755 testautomation/extensions/optional/input/extension_sources/TaskPaneComponent/src/description.xml create mode 100755 testautomation/extensions/optional/input/extension_sources/TaskPaneComponent/src/toolpanels/TaskPaneComponentUI.xdl create mode 100755 testautomation/extensions/optional/input/extension_sources/TaskPaneComponent/src/uno-extension-manifest.xml diff --git a/testautomation/extensions/optional/includes/e_taskpane.inc b/testautomation/extensions/optional/includes/e_taskpane.inc new file mode 100644 index 000000000..6d1794e68 --- /dev/null +++ b/testautomation/extensions/optional/includes/e_taskpane.inc @@ -0,0 +1,74 @@ +'encoding UTF-8 Do not remove or change this line! +'************************************************************************** +' 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 +' +' for a copy of the LGPLv3 License. +' +'/************************************************************************ +'* +'* owner : +'* +'* short description : +'* +'\*********************************************************************** +testcase tTaskPane + + Dim sExtensionPath as String + Dim iStatus as integer + + sExtensionPath = gTesttoolPath + "extensions/optional/input/extensions/TaskPaneComponent/TaskPaneComponent.oxt" + + iStatus = hExtensionAddGUI( sExtensionPath, "InstallForUser, NoLicense" ) + if(iStatus <= 0 ) then + warnlog "extension could not installed. ErrorCode is " + iStatus + goto endsub + endif + + call hNewDocument + + kontext "DocumentCalc" + + DocumentCalc.useMenu + + hMenuSelectNr(3) + if(hMenuItemIsChecked(11)) then + ' do nothing. The pane is displayed + else + hMenuSelectNr(11) + endif + + kontext "MSC_Special_Dialog" + if ( MSC_Special_Dialog.exists(1) ) then + printlog "task pane exists" + else + warnlog "task pane does not exists" + endif + + call hCloseDocument + + iStatus = hExtensionRemoveGUI("TaskPaneComponent.oxt") + if(iStatus <> 0 ) then + warnlog "extension could not deinstalled. ErrorCode is " + iStatus + goto endsub + endif + +endcase diff --git a/testautomation/extensions/optional/input/extension_sources/TaskPaneComponent/build.xml b/testautomation/extensions/optional/input/extension_sources/TaskPaneComponent/build.xml new file mode 100755 index 000000000..59791c050 --- /dev/null +++ b/testautomation/extensions/optional/input/extension_sources/TaskPaneComponent/build.xml @@ -0,0 +1,72 @@ + + + + + + Builds, tests, and runs the project extension project. + + + + diff --git a/testautomation/extensions/optional/input/extension_sources/TaskPaneComponent/nbproject/build-impl.xml b/testautomation/extensions/optional/input/extension_sources/TaskPaneComponent/nbproject/build-impl.xml new file mode 100755 index 000000000..5a2c591b6 --- /dev/null +++ b/testautomation/extensions/optional/input/extension_sources/TaskPaneComponent/nbproject/build-impl.xml @@ -0,0 +1,794 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set src.dir + Must set build.dir + Must set dist.dir + Must set build.classes.dir + Must set dist.javadoc.dir + Must set build.test.classes.dir + Must set build.test.results.dir + Must set build.classes.excludes + Must set dist.jar + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + To run this application from the command line without Ant, try: + + + + + + + java -cp "${run.classpath.with.dist.jar}" ${main.class} + + + + + + + + + + + + + + + + + + + + + + + To run this application from the command line without Ant, try: + + java -jar "${dist.jar.resolved}" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + Must select one file in the IDE or set run.class + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set debug.class + + + + + Must select one file in the IDE or set debug.class + + + + + Must set fix.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + Some tests failed; see details above. + + + + + + + + + Must select some files in the IDE or set test.includes + + + + Some tests failed; see details above. + + + + + Must select one file in the IDE or set test.class + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/testautomation/extensions/optional/input/extension_sources/TaskPaneComponent/nbproject/build-uno-impl.xml b/testautomation/extensions/optional/input/extension_sources/TaskPaneComponent/nbproject/build-uno-impl.xml new file mode 100755 index 000000000..3e75cd5f5 --- /dev/null +++ b/testautomation/extensions/optional/input/extension_sources/TaskPaneComponent/nbproject/build-uno-impl.xml @@ -0,0 +1,462 @@ + + + + Builds, tests, and runs an UNO project. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + This target can only run inside the NetBeans IDE. + + + + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/testautomation/extensions/optional/input/extension_sources/TaskPaneComponent/nbproject/genfiles.properties b/testautomation/extensions/optional/input/extension_sources/TaskPaneComponent/nbproject/genfiles.properties new file mode 100755 index 000000000..e4e5fc119 --- /dev/null +++ b/testautomation/extensions/optional/input/extension_sources/TaskPaneComponent/nbproject/genfiles.properties @@ -0,0 +1,8 @@ +build.xml.data.CRC32=2b754fcd +build.xml.script.CRC32=0a20deac +build.xml.stylesheet.CRC32=d5b6853a +# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. +# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. +nbproject/build-impl.xml.data.CRC32=54a58ff4 +nbproject/build-impl.xml.script.CRC32=25927849 +nbproject/build-impl.xml.stylesheet.CRC32=576378a2@1.32.1.45 diff --git a/testautomation/extensions/optional/input/extension_sources/TaskPaneComponent/nbproject/private/config.properties b/testautomation/extensions/optional/input/extension_sources/TaskPaneComponent/nbproject/private/config.properties new file mode 100755 index 000000000..e69de29bb diff --git a/testautomation/extensions/optional/input/extension_sources/TaskPaneComponent/nbproject/private/private.properties b/testautomation/extensions/optional/input/extension_sources/TaskPaneComponent/nbproject/private/private.properties new file mode 100755 index 000000000..c090eb0e8 --- /dev/null +++ b/testautomation/extensions/optional/input/extension_sources/TaskPaneComponent/nbproject/private/private.properties @@ -0,0 +1,6 @@ +compile.on.save=false +do.depend=false +do.jar=true +javac.debug=true +javadoc.preview=true +user.properties.file=/localuser/qamsc/.netbeans/6.8/build.properties diff --git a/testautomation/extensions/optional/input/extension_sources/TaskPaneComponent/nbproject/project-uno.properties b/testautomation/extensions/optional/input/extension_sources/TaskPaneComponent/nbproject/project-uno.properties new file mode 100755 index 000000000..35a0535e7 --- /dev/null +++ b/testautomation/extensions/optional/input/extension_sources/TaskPaneComponent/nbproject/project-uno.properties @@ -0,0 +1,18 @@ +uno.project.type=office.component.project +project.name=TaskPaneComponent +registration.classname=com.example.TaskPaneComponent +external.jar.dir=lib +idl_types.jar=TaskPaneComponent_IDL_types.jar +central.registration.class=com.example.CentralRegistrationClass +# extensions for files that go into the .oxt package; some are also referenced in the manifest +manifest.package.extensions=**/*.xcu,**/*.xcs,**/*.xdl,**/*.xlb,**/*.xba,**/*.properties,**/*.default +imgae.extensions=**/*.png,**/*.jpg,**/*.jpeg,**/*.gif +help.content.extensions=**/*.xhp,**/*.tree,${image.extensions} +dialog.content.extensions=**/*.xdl,**/*.properties,**/*.default,${image.extensions} +office.startup.options= +images.dir=images +registry.dir=registry +help.dir=help +dialogs.dir=dialogs +licenses.dir=licenses +description.dir=description diff --git a/testautomation/extensions/optional/input/extension_sources/TaskPaneComponent/nbproject/project.properties b/testautomation/extensions/optional/input/extension_sources/TaskPaneComponent/nbproject/project.properties new file mode 100755 index 000000000..b6059cf31 --- /dev/null +++ b/testautomation/extensions/optional/input/extension_sources/TaskPaneComponent/nbproject/project.properties @@ -0,0 +1,67 @@ +application.args= +application.title=TaskPaneComponent +application.vendor=qamsc +build.classes.dir=${build.dir}/classes +build.classes.excludes=**/*.java,**/*.form,**/*.xcu,**/*.xcs,**/*.idl,**/*manifest.xml +# This directory is removed when the project is cleaned: +build.dir=build +build.generated.dir=${build.dir}/generated +build.generated.sources.dir=${build.dir}/generated-sources +# Only compile against the classpath explicitly listed here: +build.sysclasspath=ignore +build.test.classes.dir=${build.dir}/test/classes +build.test.results.dir=${build.dir}/test/results +debug.classpath=\ + ${run.classpath} +debug.test.classpath=\ + ${run.test.classpath} +# This directory is removed when the project is cleaned: +dist.dir=dist +dist.jar=${dist.dir}/TaskPaneComponent.jar +dist.javadoc.dir=${dist.dir}/javadoc +endorsed.classpath= +excludes= +file.reference.juh.jar=../../office/slidecopy/openoffice.org/ure/share/java/juh.jar +file.reference.jurt.jar=../../office/slidecopy/openoffice.org/ure/share/java/jurt.jar +file.reference.ridl.jar=../../office/slidecopy/openoffice.org/ure/share/java/ridl.jar +file.reference.unoil.jar=../../office/slidecopy/openoffice.org/basis3.3/program/classes/unoil.jar +includes=** +jar.compress=false +javac.classpath=\ + ${file.reference.unoil.jar}:\ + ${file.reference.juh.jar}:\ + ${file.reference.jurt.jar}:\ + ${file.reference.ridl.jar} +# Space-separated list of extra javac options +javac.compilerargs= +javac.deprecation=false +javac.source=1.5 +javac.target=1.5 +javac.test.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir}:\ + ${libs.junit.classpath} +javadoc.additionalparam= +javadoc.author=false +javadoc.encoding= +javadoc.noindex=false +javadoc.nonavbar=false +javadoc.notree=false +javadoc.private=false +javadoc.splitindex=true +javadoc.use=true +javadoc.version=false +javadoc.windowtitle= +meta.inf.dir=${src.dir}/META-INF +platform.active=default_platform +run.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +# Space-separated list of JVM arguments used when running the project +# (you may also define separate properties like run-sys-prop.name=value instead of -Dname=value +# or test-sys-prop.name=value to set system properties for unit tests): +run.jvmargs= +run.test.classpath=\ + ${javac.test.classpath}:\ + ${build.test.classes.dir} +src.dir=src diff --git a/testautomation/extensions/optional/input/extension_sources/TaskPaneComponent/nbproject/project.xml b/testautomation/extensions/optional/input/extension_sources/TaskPaneComponent/nbproject/project.xml new file mode 100755 index 000000000..43c253f3c --- /dev/null +++ b/testautomation/extensions/optional/input/extension_sources/TaskPaneComponent/nbproject/project.xml @@ -0,0 +1,14 @@ + + + org.netbeans.modules.java.j2seproject + + + TaskPaneComponent + 1.6.5 + + + + + + + diff --git a/testautomation/extensions/optional/input/extension_sources/TaskPaneComponent/registry/data/org/openoffice/Office/UI/CalcWindowState.xcu b/testautomation/extensions/optional/input/extension_sources/TaskPaneComponent/registry/data/org/openoffice/Office/UI/CalcWindowState.xcu new file mode 100755 index 000000000..ba2c8c692 --- /dev/null +++ b/testautomation/extensions/optional/input/extension_sources/TaskPaneComponent/registry/data/org/openoffice/Office/UI/CalcWindowState.xcu @@ -0,0 +1,23 @@ + + + + + + + ein Panel + + + true + + + + + noch ein Panel + + + true + + + + + diff --git a/testautomation/extensions/optional/input/extension_sources/TaskPaneComponent/registry/data/org/openoffice/Office/UI/Factories.xcu b/testautomation/extensions/optional/input/extension_sources/TaskPaneComponent/registry/data/org/openoffice/Office/UI/Factories.xcu new file mode 100755 index 000000000..90dce8595 --- /dev/null +++ b/testautomation/extensions/optional/input/extension_sources/TaskPaneComponent/registry/data/org/openoffice/Office/UI/Factories.xcu @@ -0,0 +1,35 @@ + + + + + + + toolpanel + + + com.example.TestPanel1 + + + + + + com.example.TaskPaneComponent + + + + + toolpanel + + + com.example.TestPanel2 + + + + + + com.example.TaskPaneComponent + + + + + diff --git a/testautomation/extensions/optional/input/extension_sources/TaskPaneComponent/src/com/example/CentralRegistrationClass.java b/testautomation/extensions/optional/input/extension_sources/TaskPaneComponent/src/com/example/CentralRegistrationClass.java new file mode 100755 index 000000000..5276f584a --- /dev/null +++ b/testautomation/extensions/optional/input/extension_sources/TaskPaneComponent/src/com/example/CentralRegistrationClass.java @@ -0,0 +1,140 @@ +/************************************************************************* + * 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 + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +package com.example; + +import com.sun.star.lang.XSingleComponentFactory; +import com.sun.star.registry.XRegistryKey; +import java.io.IOException; +import java.lang.reflect.Method; +import java.net.JarURLConnection; +import java.net.URL; +import java.util.Enumeration; +import java.util.StringTokenizer; +import java.util.jar.Attributes; +import java.util.jar.Manifest; + +/** + * + * @author Marc Neumann + */ +public class CentralRegistrationClass +{ + + public static XSingleComponentFactory __getComponentFactory(String sImplementationName) + { + String regClassesList = getRegistrationClasses(); + StringTokenizer t = new StringTokenizer(regClassesList, " "); + while (t.hasMoreTokens()) + { + String className = t.nextToken(); + if (className != null && className.length() != 0) + { + try + { + Class regClass = Class.forName(className); + Method writeRegInfo = regClass.getDeclaredMethod("__getComponentFactory", new Class[] + { + String.class + }); + Object result = writeRegInfo.invoke(regClass, sImplementationName); + if (result != null) + { + return (XSingleComponentFactory) result; + } + } + catch (Exception ex) + { + ex.printStackTrace(); + } + } + } + return null; + } + + public static boolean __writeRegistryServiceInfo(XRegistryKey xRegistryKey) + { + boolean bResult = true; + String regClassesList = getRegistrationClasses(); + StringTokenizer t = new StringTokenizer(regClassesList, " "); + while (t.hasMoreTokens()) + { + String className = t.nextToken(); + if (className != null && className.length() != 0) + { + try + { + Class regClass = Class.forName(className); + Method writeRegInfo = regClass.getDeclaredMethod("__writeRegistryServiceInfo", new Class[] + { + XRegistryKey.class + }); + Object result = writeRegInfo.invoke(regClass, xRegistryKey); + bResult &= ((Boolean) result).booleanValue(); + } + catch (Exception ex) + { + ex.printStackTrace(); + } + } + } + return bResult; + } + + private static String getRegistrationClasses() + { + CentralRegistrationClass c = new CentralRegistrationClass(); + String name = c.getClass().getCanonicalName().replace('.', '/').concat(".class"); + try + { + Enumeration urlEnum = c.getClass().getClassLoader().getResources("META-INF/MANIFEST.MF"); + while (urlEnum.hasMoreElements()) + { + URL url = urlEnum.nextElement(); + String file = url.getFile(); + JarURLConnection jarConnection = (JarURLConnection) url.openConnection(); + Manifest mf = jarConnection.getManifest(); + + Attributes attrs = (Attributes) mf.getAttributes(name); + if (attrs != null) + { + String classes = attrs.getValue("RegistrationClasses"); + return classes; + } + } + } + catch (IOException ex) + { + ex.printStackTrace(); + } + + return ""; + } + + /** Creates a new instance of CentralRegistrationClass */ + private CentralRegistrationClass() + { + } +} diff --git a/testautomation/extensions/optional/input/extension_sources/TaskPaneComponent/src/com/example/TaskPaneComponent.java b/testautomation/extensions/optional/input/extension_sources/TaskPaneComponent/src/com/example/TaskPaneComponent.java new file mode 100755 index 000000000..0c5fdb782 --- /dev/null +++ b/testautomation/extensions/optional/input/extension_sources/TaskPaneComponent/src/com/example/TaskPaneComponent.java @@ -0,0 +1,116 @@ +/************************************************************************* + * 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 + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +package com.example; + +import com.sun.star.awt.XWindow; +import com.sun.star.frame.XFrame; +import com.sun.star.uno.XComponentContext; +import com.sun.star.lib.uno.helper.Factory; +import com.sun.star.lang.XSingleComponentFactory; +import com.sun.star.registry.XRegistryKey; +import com.sun.star.lib.uno.helper.WeakBase; +import com.sun.star.uno.UnoRuntime; + +public final class TaskPaneComponent extends WeakBase + implements com.sun.star.ui.XUIElementFactory, + com.sun.star.lang.XServiceInfo +{ + + private final XComponentContext m_xContext; + private static final String m_implementationName = TaskPaneComponent.class.getName(); + private static final String[] m_serviceNames = + { + "com.sun.star.ui.UIElementFactory" + }; + + public TaskPaneComponent(XComponentContext context) + { + m_xContext = context; + } + + public static XSingleComponentFactory __getComponentFactory(String sImplementationName) + { + XSingleComponentFactory xFactory = null; + + if (sImplementationName.equals(m_implementationName)) + { + xFactory = Factory.createComponentFactory(TaskPaneComponent.class, m_serviceNames); + } + return xFactory; + } + + public static boolean __writeRegistryServiceInfo(XRegistryKey xRegistryKey) + { + return Factory.writeRegistryServiceInfo(m_implementationName, + m_serviceNames, + xRegistryKey); + } + + public com.sun.star.ui.XUIElement createUIElement(String ResourceURL, com.sun.star.beans.PropertyValue[] creationArgs) throws com.sun.star.container.NoSuchElementException, com.sun.star.lang.IllegalArgumentException + { + + XFrame docFrame = null; + XWindow panelParentWindow = null; + for (int i = 0; i < creationArgs.length; ++i) + { + if (creationArgs[i].Name.equals("Frame")) + { + docFrame = UnoRuntime.queryInterface(XFrame.class, creationArgs[i].Value); + } else if (creationArgs[i].Name.equals("ParentWindow")) + { + panelParentWindow = UnoRuntime.queryInterface(XWindow.class, creationArgs[i].Value); + } + } + + return new ToolPanelUIElement(m_xContext, docFrame, panelParentWindow); + + } + + // com.sun.star.lang.XServiceInfo: + public String getImplementationName() + { + return m_implementationName; + } + + public boolean supportsService(String sService) + { + int len = m_serviceNames.length; + + for (int i = 0; i < len; i++) + { + if (sService.equals(m_serviceNames[i])) + { + return true; + } + } + return false; + } + + public String[] getSupportedServiceNames() + { + return m_serviceNames; + } +} diff --git a/testautomation/extensions/optional/input/extension_sources/TaskPaneComponent/src/com/example/ToolPanel.java b/testautomation/extensions/optional/input/extension_sources/TaskPaneComponent/src/com/example/ToolPanel.java new file mode 100755 index 000000000..a28e07d58 --- /dev/null +++ b/testautomation/extensions/optional/input/extension_sources/TaskPaneComponent/src/com/example/ToolPanel.java @@ -0,0 +1,56 @@ +/************************************************************************* + * 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 + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +package com.example; + +import com.sun.star.accessibility.XAccessible; +import com.sun.star.awt.XWindow; +import com.sun.star.ui.XToolPanel; +import com.sun.star.uno.UnoRuntime; + +/** + * + * @author frank.schoenheit@sun.com + */ +public class ToolPanel implements XToolPanel +{ + ToolPanel( final XWindow i_panelWindow ) + { + m_panelWindow = i_panelWindow; + } + + public XWindow getWindow() + { + return m_panelWindow; + } + + public XAccessible createAccessible( XAccessible i_parentAccessible ) + { + return UnoRuntime.queryInterface( XAccessible.class, m_panelWindow ); + } + + private XWindow m_panelWindow; +} diff --git a/testautomation/extensions/optional/input/extension_sources/TaskPaneComponent/src/com/example/ToolPanelUIElement.java b/testautomation/extensions/optional/input/extension_sources/TaskPaneComponent/src/com/example/ToolPanelUIElement.java new file mode 100755 index 000000000..fa77b06bf --- /dev/null +++ b/testautomation/extensions/optional/input/extension_sources/TaskPaneComponent/src/com/example/ToolPanelUIElement.java @@ -0,0 +1,153 @@ +/************************************************************************* + * 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 + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +package com.example; + +import com.sun.star.awt.XContainerWindowProvider; +import com.sun.star.awt.XWindow; +import com.sun.star.awt.XWindowPeer; +import com.sun.star.deployment.PackageInformationProvider; +import com.sun.star.deployment.XPackageInformationProvider; +import com.sun.star.frame.XFrame; +import com.sun.star.lang.DisposedException; +import com.sun.star.lang.XComponent; +import com.sun.star.lib.uno.helper.ComponentBase; +import com.sun.star.ui.UIElementType; +import com.sun.star.ui.XUIElement; +import com.sun.star.uno.UnoRuntime; +import com.sun.star.uno.XComponentContext; +import java.util.logging.Level; +import java.util.logging.Logger; + +/** + * + * @author frank.schoenheit@sun.com + */ +public class ToolPanelUIElement extends ComponentBase implements XUIElement +{ + + protected final XFrame m_docFrame; + protected final XWindow m_parentWindow; + private XWindow m_panelRootWindow = null; + private Object m_toolPanel = null; + XComponentContext context = null; + + + protected ToolPanelUIElement( XComponentContext _context, final XFrame i_docFrame, final XWindow i_parentWindow ) + { + context = _context; + m_docFrame = i_docFrame; + m_parentWindow = i_parentWindow; + } + + public static String getResourceURLBase() + { + return "private:resource/toolpanel/com.example.TaskPaneComponent/"; + } + + // XUIElement overridables + public XFrame getFrame() { return m_docFrame; } + public short getType() { return UIElementType.TOOLPANEL; } + public String getResourceURL() { return getResourceURLBase() + getPanelResourceURLSuffix(); } + + public Object getRealInterface() + { + synchronized( this ) + { + if ( this.bDisposed || this.bInDispose ) + throw new DisposedException( new String(), this ); + + if ( m_toolPanel == null ) + m_toolPanel = new ToolPanel( getOrCreatePanelRootWindow() ); + } + return m_toolPanel; + } + + // own overridables + /** returns the name of the dialog description file of the tool panel, without .xdl suffix + */ + protected String getPanelResourceLocation() + { + return "TaskPaneComponentUI"; + + } + + /** returns the resource URL suffix to use for the tool panel + * @return + */ + protected String getPanelResourceURLSuffix() + { + return "TaskPaneComponentUI"; + } + + + // ComponentBase overridables + protected void postDisposing() + { + super.postDisposing(); + synchronized ( this ) + { + if ( m_panelRootWindow != null ) + { + XComponent panelWindowComp = UnoRuntime.queryInterface( XComponent.class, m_panelRootWindow ); + panelWindowComp.dispose(); + m_panelRootWindow = null; + + } + m_toolPanel = null; + } + } + + // helpers + synchronized private XWindow getOrCreatePanelRootWindow() + { + try + { + XPackageInformationProvider pip = PackageInformationProvider.get(context); + String s = pip.getPackageLocation("com.example.TaskPaneComponent"); + + String dialogUrl = s + "/toolpanels/" + getPanelResourceLocation() + ".xdl"; + + XContainerWindowProvider provider = UnoRuntime.queryInterface( + XContainerWindowProvider.class, + context.getServiceManager().createInstanceWithContext("com.sun.star.awt.ContainerWindowProvider",context) + ); + + m_panelRootWindow = provider.createContainerWindow( + dialogUrl, + "", + UnoRuntime.queryInterface( XWindowPeer.class, m_parentWindow ), + null + ); + + } + catch ( final Exception e ) + { + Logger.getLogger( ToolPanelUIElement.class.getName() ).log( Level.SEVERE, null, e ); + } + return m_panelRootWindow; + } +} diff --git a/testautomation/extensions/optional/input/extension_sources/TaskPaneComponent/src/description.xml b/testautomation/extensions/optional/input/extension_sources/TaskPaneComponent/src/description.xml new file mode 100755 index 000000000..9e32a6e8b --- /dev/null +++ b/testautomation/extensions/optional/input/extension_sources/TaskPaneComponent/src/description.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/testautomation/extensions/optional/input/extension_sources/TaskPaneComponent/src/toolpanels/TaskPaneComponentUI.xdl b/testautomation/extensions/optional/input/extension_sources/TaskPaneComponent/src/toolpanels/TaskPaneComponentUI.xdl new file mode 100755 index 000000000..7820e3d52 --- /dev/null +++ b/testautomation/extensions/optional/input/extension_sources/TaskPaneComponent/src/toolpanels/TaskPaneComponentUI.xdl @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/testautomation/extensions/optional/input/extension_sources/TaskPaneComponent/src/uno-extension-manifest.xml b/testautomation/extensions/optional/input/extension_sources/TaskPaneComponent/src/uno-extension-manifest.xml new file mode 100755 index 000000000..d49fe3d72 --- /dev/null +++ b/testautomation/extensions/optional/input/extension_sources/TaskPaneComponent/src/uno-extension-manifest.xml @@ -0,0 +1,9 @@ + + + + + + \ No newline at end of file -- cgit v1.2.3 From e6f4c95e74bdda37f7b3e6a0c1f7c396ca8241a5 Mon Sep 17 00:00:00 2001 From: "Marc Neumann [msc]" Date: Fri, 21 May 2010 12:03:28 +0200 Subject: slidecopy: changes for the new taskpane implementation --- .../optional/includes/global/g_demoguide.inc | 49 ++++++++++++++++++---- 1 file changed, 41 insertions(+), 8 deletions(-) diff --git a/testautomation/graphics/optional/includes/global/g_demoguide.inc b/testautomation/graphics/optional/includes/global/g_demoguide.inc index 2187045f5..f073940ad 100755 --- a/testautomation/graphics/optional/includes/global/g_demoguide.inc +++ b/testautomation/graphics/optional/includes/global/g_demoguide.inc @@ -136,7 +136,7 @@ testcase t_Introduction DocumentImpress.TypeKeys "" hOpenContextMenu '(when the object is marked) hMenuSelectNr(12) - + '///Add Layout "Title Only" Printlog "Add Layout" kontext "Tasks" @@ -144,38 +144,71 @@ testcase t_Introduction warnlog "Tasks Panel not visible. Opening now." ViewTaskPane endif + + ' enable all items in the task pane. + ' may be one item is not enabled due to a previous testrun + dim i as integer + for i = 1 to 5 + printlog i + View.OpenMenu + if ( MenuIsItemChecked(MenuGetItemID(i)) ) then + ' do nothing the item is allready displayed + else + MenuSelect(MenuGetItemId(4)) + endif + hMenuSelectNr(0) + 'sleep(1) + next + View.OpenMenu MenuSelect(MenuGetItemId(1)) + View.OpenMenu + MenuSelect(MenuGetItemId(3)) + View.OpenMenu + MenuSelect(MenuGetItemId(4)) + View.OpenMenu + MenuSelect(MenuGetItemId(5)) + + LayoutsPreview.TypeKeys " " sleep (5) '///Add a background Printlog "Add background" - + Kontext "Tasks" printlog "Deselect all tabs from view menu in task pane except the needed." View.OpenMenu - MenuSelect(MenuGetItemID(5)) + MenuSelect(MenuGetItemID(5)) View.OpenMenu - MenuSelect(MenuGetItemID(4)) + MenuSelect(MenuGetItemID(4)) View.OpenMenu MenuSelect(MenuGetItemID(3)) View.OpenMenu MenuSelect(MenuGetItemID(2)) + sleep(5) View.OpenMenu MenuSelect(MenuGetItemID(1)) + Tasks.TypeKeys "",true + Tasks.TypeKeys "",true AvailableForUsePreview.TypeKeys " " - sleep (5) + sleep (5) '///Add a transition effect Printlog "Add a transition effect" Kontext "Tasks" - View.OpenMenu - MenuSelect(MenuGetItemID(5)) + sleep(5) View.OpenMenu MenuSelect(MenuGetItemID(1)) + View.OpenMenu + MenuSelect(MenuGetItemID(2)) + View.OpenMenu + MenuSelect(MenuGetItemID(3)) + View.OpenMenu + MenuSelect(MenuGetItemID(4)) + TransitionSound.GetItemCount 'needed for select Sleep 1 TransitionSound.Select 4 - + '///Close the document Printlog "Close the document" Call hCloseDocument -- cgit v1.2.3