summaryrefslogtreecommitdiff
path: root/testautomation/graphics/optional
diff options
context:
space:
mode:
Diffstat (limited to 'testautomation/graphics/optional')
-rw-r--r--testautomation/graphics/optional/d_export_graphic_a.bas74
-rw-r--r--testautomation/graphics/optional/d_export_graphic_b.bas73
-rw-r--r--testautomation/graphics/optional/export_graphic_a.bas73
-rw-r--r--testautomation/graphics/optional/export_graphic_b.bas73
-rw-r--r--testautomation/graphics/optional/g_accessability.bas60
-rw-r--r--testautomation/graphics/optional/g_area.bas57
-rw-r--r--testautomation/graphics/optional/g_arrangealign.bas79
-rw-r--r--testautomation/graphics/optional/g_autocorrection.bas71
-rw-r--r--testautomation/graphics/optional/g_character.bas66
-rw-r--r--testautomation/graphics/optional/g_clipboard.bas76
-rw-r--r--testautomation/graphics/optional/g_clipexport.bas68
-rw-r--r--testautomation/graphics/optional/g_convertto.bas73
-rw-r--r--testautomation/graphics/optional/g_crossfading.bas57
-rw-r--r--testautomation/graphics/optional/g_customshapes.bas59
-rw-r--r--testautomation/graphics/optional/g_demoguide.bas56
-rw-r--r--testautomation/graphics/optional/g_dimensions.bas55
-rw-r--r--testautomation/graphics/optional/g_edit.bas69
-rw-r--r--testautomation/graphics/optional/g_export_html.bas62
-rw-r--r--testautomation/graphics/optional/g_findreplace.bas60
-rw-r--r--testautomation/graphics/optional/g_format.bas70
-rw-r--r--testautomation/graphics/optional/g_group.bas57
-rw-r--r--testautomation/graphics/optional/g_imagemap.bas58
-rw-r--r--testautomation/graphics/optional/g_insert.bas90
-rw-r--r--testautomation/graphics/optional/g_line.bas58
-rw-r--r--testautomation/graphics/optional/g_load_save.bas89
-rw-r--r--testautomation/graphics/optional/g_mediaplayer.bas56
-rw-r--r--testautomation/graphics/optional/g_navigator.bas64
-rw-r--r--testautomation/graphics/optional/g_ole.bas61
-rw-r--r--testautomation/graphics/optional/g_paneview.bas62
-rw-r--r--testautomation/graphics/optional/g_paragraph.bas56
-rw-r--r--testautomation/graphics/optional/g_savepictureas.bas65
-rw-r--r--testautomation/graphics/optional/g_shaddow.bas60
-rw-r--r--testautomation/graphics/optional/g_slidelayer.bas69
-rw-r--r--testautomation/graphics/optional/g_spellcheck.bas68
-rw-r--r--testautomation/graphics/optional/g_stylist.bas99
-rw-r--r--testautomation/graphics/optional/g_tables.bas65
-rw-r--r--testautomation/graphics/optional/g_toolbars.bas69
-rw-r--r--testautomation/graphics/optional/g_tools.bas69
-rw-r--r--testautomation/graphics/optional/g_zoom.bas57
-rw-r--r--testautomation/graphics/optional/gallery.bas65
-rw-r--r--testautomation/graphics/optional/gallery2.bas63
-rw-r--r--testautomation/graphics/optional/i_animation.bas52
-rw-r--r--testautomation/graphics/optional/i_headerfooter.bas54
-rw-r--r--testautomation/graphics/optional/i_only_updt_1.bas77
-rw-r--r--testautomation/graphics/optional/i_only_updt_2.bas76
-rw-r--r--testautomation/graphics/optional/i_pengine.bas78
-rw-r--r--testautomation/graphics/optional/i_saveloadlayout.bas56
-rw-r--r--testautomation/graphics/optional/i_shape.bas56
-rw-r--r--testautomation/graphics/optional/i_slidecopy.bas62
-rw-r--r--testautomation/graphics/optional/i_slideshow.bas92
-rw-r--r--testautomation/graphics/optional/i_us_presentation.bas64
-rw-r--r--testautomation/graphics/optional/i_view.bas60
-rw-r--r--testautomation/graphics/optional/includes/draw/d_002_.inc109
-rw-r--r--testautomation/graphics/optional/includes/draw/d_003_.inc82
-rw-r--r--testautomation/graphics/optional/includes/draw/d_005_.inc51
-rw-r--r--testautomation/graphics/optional/includes/draw/d_007.inc47
-rw-r--r--testautomation/graphics/optional/includes/global/export_graphic.inc553
-rw-r--r--testautomation/graphics/optional/includes/global/export_graphic_2.inc1520
-rw-r--r--testautomation/graphics/optional/includes/global/g_accessability.inc297
-rw-r--r--testautomation/graphics/optional/includes/global/g_area.inc407
-rw-r--r--testautomation/graphics/optional/includes/global/g_arrangealign.inc309
-rw-r--r--testautomation/graphics/optional/includes/global/g_autocorrection.inc460
-rw-r--r--testautomation/graphics/optional/includes/global/g_character.inc714
-rw-r--r--testautomation/graphics/optional/includes/global/g_clipboard.inc469
-rw-r--r--testautomation/graphics/optional/includes/global/g_clipexport.inc490
-rw-r--r--testautomation/graphics/optional/includes/global/g_clipexport2.inc429
-rw-r--r--testautomation/graphics/optional/includes/global/g_clipexport3.inc729
-rw-r--r--testautomation/graphics/optional/includes/global/g_convertto.inc369
-rw-r--r--testautomation/graphics/optional/includes/global/g_crossfading.inc267
-rw-r--r--testautomation/graphics/optional/includes/global/g_customshapes.inc848
-rw-r--r--testautomation/graphics/optional/includes/global/g_demoguide.inc501
-rw-r--r--testautomation/graphics/optional/includes/global/g_dimensions.inc116
-rw-r--r--testautomation/graphics/optional/includes/global/g_edit.inc294
-rw-r--r--testautomation/graphics/optional/includes/global/g_export_html.inc757
-rw-r--r--testautomation/graphics/optional/includes/global/g_find_replace.inc363
-rw-r--r--testautomation/graphics/optional/includes/global/g_format.inc1253
-rw-r--r--testautomation/graphics/optional/includes/global/g_group.inc107
-rw-r--r--testautomation/graphics/optional/includes/global/g_imagemap.inc159
-rw-r--r--testautomation/graphics/optional/includes/global/g_insert.inc1227
-rw-r--r--testautomation/graphics/optional/includes/global/g_line.inc533
-rw-r--r--testautomation/graphics/optional/includes/global/g_load_save.inc783
-rw-r--r--testautomation/graphics/optional/includes/global/g_mediaplayer.inc256
-rw-r--r--testautomation/graphics/optional/includes/global/g_navigator.inc309
-rw-r--r--testautomation/graphics/optional/includes/global/g_ole.inc458
-rw-r--r--testautomation/graphics/optional/includes/global/g_paneview.inc535
-rw-r--r--testautomation/graphics/optional/includes/global/g_paragraph.inc211
-rw-r--r--testautomation/graphics/optional/includes/global/g_savepictureas.inc773
-rw-r--r--testautomation/graphics/optional/includes/global/g_shaddow.inc513
-rw-r--r--testautomation/graphics/optional/includes/global/g_slidelayer.inc92
-rw-r--r--testautomation/graphics/optional/includes/global/g_spellcheck.inc917
-rw-r--r--testautomation/graphics/optional/includes/global/g_stylist.inc1020
-rw-r--r--testautomation/graphics/optional/includes/global/g_tables.inc583
-rw-r--r--testautomation/graphics/optional/includes/global/g_toolbars.inc358
-rw-r--r--testautomation/graphics/optional/includes/global/g_tools.inc582
-rw-r--r--testautomation/graphics/optional/includes/global/g_zoom.inc133
-rw-r--r--testautomation/graphics/optional/includes/global/gallery.inc954
-rw-r--r--testautomation/graphics/optional/includes/global/gallery2.inc258
-rw-r--r--testautomation/graphics/optional/includes/global/id_001.inc725
-rw-r--r--testautomation/graphics/optional/includes/global/id_002.inc440
-rw-r--r--testautomation/graphics/optional/includes/global/id_003.inc264
-rw-r--r--testautomation/graphics/optional/includes/global/id_004.inc370
-rw-r--r--testautomation/graphics/optional/includes/global/id_005.inc808
-rw-r--r--testautomation/graphics/optional/includes/global/id_006.inc362
-rw-r--r--testautomation/graphics/optional/includes/global/id_007.inc426
-rw-r--r--testautomation/graphics/optional/includes/global/id_008.inc71
-rw-r--r--testautomation/graphics/optional/includes/global/id_009.inc243
-rw-r--r--testautomation/graphics/optional/includes/global/id_011.inc995
-rw-r--r--testautomation/graphics/optional/includes/impress/i_animation.inc187
-rw-r--r--testautomation/graphics/optional/includes/impress/i_headerfooter.inc685
-rw-r--r--testautomation/graphics/optional/includes/impress/i_pengine.inc762
-rw-r--r--testautomation/graphics/optional/includes/impress/i_pengine1.inc1356
-rw-r--r--testautomation/graphics/optional/includes/impress/i_pengine2.inc609
-rw-r--r--testautomation/graphics/optional/includes/impress/i_saveloadlayout.inc175
-rw-r--r--testautomation/graphics/optional/includes/impress/i_shape.inc89
-rw-r--r--testautomation/graphics/optional/includes/impress/i_slidecopy.inc979
-rw-r--r--testautomation/graphics/optional/includes/impress/i_slidelayer.inc522
-rw-r--r--testautomation/graphics/optional/includes/impress/i_slideshow.inc1236
-rw-r--r--testautomation/graphics/optional/includes/impress/i_slideshow2.inc1011
-rw-r--r--testautomation/graphics/optional/includes/impress/i_slideshow3.inc1103
-rw-r--r--testautomation/graphics/optional/includes/impress/i_stylist.inc157
-rw-r--r--testautomation/graphics/optional/includes/impress/i_us2_present.inc332
-rw-r--r--testautomation/graphics/optional/includes/impress/i_us_present.inc694
-rw-r--r--testautomation/graphics/optional/includes/impress/i_view.inc318
-rw-r--r--testautomation/graphics/optional/includes/impress/im_002_.inc52
-rw-r--r--testautomation/graphics/optional/includes/impress/im_003_.inc254
-rw-r--r--testautomation/graphics/optional/includes/impress/im_004_.inc58
-rw-r--r--testautomation/graphics/optional/includes/impress/im_005_.inc50
-rw-r--r--testautomation/graphics/optional/includes/impress/im_007_.inc693
-rw-r--r--testautomation/graphics/optional/includes/impress/im_011_.inc173
-rw-r--r--testautomation/graphics/optional/includes/impress/options.inc270
130 files changed, 42122 insertions, 0 deletions
diff --git a/testautomation/graphics/optional/d_export_graphic_a.bas b/testautomation/graphics/optional/d_export_graphic_a.bas
new file mode 100644
index 000000000000..b5968240e024
--- /dev/null
+++ b/testautomation/graphics/optional/d_export_graphic_a.bas
@@ -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
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* Owner : wolfram.garten@oracle.com
+'*
+'* short description : Graphics Export Test - A-tests. (More durable ones)
+'*
+'\*****************************************************************
+
+global OutputGrafikTBO as string
+global Document as string
+global ExtensionString as String
+
+sub main
+ Printlog "--------------------- Graphics Export Test ------------------- "
+
+ Call hStatusIn ( "Graphics","d_export_graphic_a.bas" )
+
+ use "graphics\tools\id_tools.inc"
+ use "graphics\tools\id_tools_2.inc"
+ use "graphics\optional\includes\global\export_graphic.inc"
+
+ if bAsianLan then
+ qaErrorLog "#i71631# - Test deactivated with Asian languages due to bug"
+ Call hStatusOut
+ exit sub
+ endif
+
+ Call sFileExport 'OBSERVE - This line must run before the following testcases!
+ Call tEPS '///+- Encapsulated PostScript ///'
+ Call tPCT '///+- Mac Pict ///'
+ Call tPBM '///+- Portable Bitmap ///'
+ Call tPGM '///+- Portable Graymap ///'
+ Call tPPM '///+- Portable Pixelmap ///'
+ Call tRAS '///+- Sun Raster Image ///'
+ Call tTIFF '///+- Tagged Image File Format ///'
+ Call tXPM '///+- X PixMap ///'
+ Call tGIF '///+- Graphics Interchange Format ///'
+ Call tJPEG '///+- Joint Photographic Experts Group ///'
+
+ Call hStatusOut
+end sub
+
+sub LoadIncludeFiles
+ use "global\system\includes\master.inc"
+ use "global\system\includes\gvariabl.inc"
+ Call GetUseFiles
+ gApplication = "DRAW"
+end sub
+
diff --git a/testautomation/graphics/optional/d_export_graphic_b.bas b/testautomation/graphics/optional/d_export_graphic_b.bas
new file mode 100644
index 000000000000..97560705afc4
--- /dev/null
+++ b/testautomation/graphics/optional/d_export_graphic_b.bas
@@ -0,0 +1,73 @@
+'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
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* Owner : wolfram.garten@oracle.com
+'*
+'* short description : Graphics Export Test - B-tests. (the usual suspects)
+'*
+'\*****************************************************************
+
+global OutputGrafikTBO as string
+global Document as string
+global ExtensionString as String
+
+sub main
+ Printlog "--------------------- Graphics Export Test ------------------- "
+ Call hStatusIn ( "Graphics","d_export_graphic_b.bas" )
+
+ use "graphics\tools\id_tools.inc"
+ use "graphics\tools\id_tools_2.inc"
+ use "graphics\optional\includes\global\export_graphic_2.inc"
+
+ if bAsianLan then
+ qaErrorLog "#i71631# - Test deactivated with Asian languages due to bug"
+ Call hStatusOut
+ exit sub
+ endif
+
+ Call sFileExport 'OBSERVE - This line must run before the following testcases!
+ Call tPNG '///+- Portable Network Graphic ///'
+ Call tSVM '///+- StarView Metafile ///'
+ Call tPDF '///+- Portable Document Format ///'
+ Call tPDF_Creator '///+- test if the right creator is set in the PDF document
+ Call tSVG '///+- Scalable Vector Graphics ///'
+ Call tBMP '///+- Windows Bitmap ///'
+ Call tEMF '///+- Enhanced Metafile ///'
+ Call tMET '///+- OS/2 Metafile ///'
+ Call tSWF '///+- Macromedia Flash (SWF) (.swf) ///'
+ Call tWMF '///+- Windows Metafile ///'
+
+ Call hStatusOut
+end sub
+
+sub LoadIncludeFiles
+ use "global\system\includes\master.inc"
+ use "global\system\includes\gvariabl.inc"
+ Call GetUseFiles
+ gApplication = "DRAW"
+end sub
+
diff --git a/testautomation/graphics/optional/export_graphic_a.bas b/testautomation/graphics/optional/export_graphic_a.bas
new file mode 100644
index 000000000000..9dee4114b37f
--- /dev/null
+++ b/testautomation/graphics/optional/export_graphic_a.bas
@@ -0,0 +1,73 @@
+'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
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* Owner : wolfram.garten@oracle.com
+'*
+'* short description : Graphics Export Test - A-tests. (More durable ones)
+'*
+'\************************************************************************
+
+global OutputGrafikTBO as string
+global Document as string
+global ExtensionString as String
+
+sub main
+ Printlog "--------------------- Graphics Export Test ------------------- "
+ Call hStatusIn ( "Graphics","export_graphic_a.bas" )
+
+ use "graphics\tools\id_tools.inc"
+ use "graphics\tools\id_tools_2.inc"
+ use "graphics\optional\includes\global\export_graphic.inc"
+
+ if bAsianLan then
+ qaErrorLog "#i71631# - Test deactivated with Asian languages due to bug"
+ Call hStatusOut
+ exit sub
+ endif
+
+ Call sFileExport 'OBSERVE - This line must run before the following testcases!
+ Call tEPS '///+- Encapsulated PostScript ///'
+ Call tPCT '///+- Mac Pict ///'
+ Call tPBM '///+- Portable Bitmap ///'
+ Call tPGM '///+- Portable Graymap ///'
+ Call tPPM '///+- Portable Pixelmap ///'
+ Call tRAS '///+- Sun Raster Image ///'
+ Call tTIFF '///+- Tagged Image File Format ///'
+ Call tXPM '///+- X PixMap ///'
+ Call tGIF '///+- Graphics Interchange Format ///'
+ Call tJPEG '///+- Joint Photographic Experts Group ///'
+
+ Call hStatusOut
+end sub
+
+sub LoadIncludeFiles
+ use "global\system\includes\master.inc"
+ use "global\system\includes\gvariabl.inc"
+ Call GetUseFiles
+ gApplication = "IMPRESS"
+end sub
+
diff --git a/testautomation/graphics/optional/export_graphic_b.bas b/testautomation/graphics/optional/export_graphic_b.bas
new file mode 100644
index 000000000000..9502b5005625
--- /dev/null
+++ b/testautomation/graphics/optional/export_graphic_b.bas
@@ -0,0 +1,73 @@
+'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
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* Owner : wolfram.garten@oracle.com
+'*
+'* short description : Graphics Export Test - B-tests. (the usual suspects)
+'*
+'\************************************************************************
+
+global OutputGrafikTBO as string
+global Document as string
+global ExtensionString as String
+
+sub main
+ Printlog "--------------------- Graphics Export Test ------------------- "
+ Call hStatusIn ( "Graphics","export_graphic_b.bas" )
+
+ use "graphics\tools\id_tools.inc"
+ use "graphics\tools\id_tools_2.inc"
+ use "graphics\optional\includes\global\export_graphic_2.inc"
+
+ if bAsianLan then
+ qaErrorLog "#i71631# - Test deactivated with Asian languages due to bug"
+ Call hStatusOut
+ exit sub
+ endif
+
+ Call sFileExport 'OBSERVE - This line must run before the following testcases!
+ Call tPDF '///+- Portable Document Format ///'
+ Call tPDF_Creator '///+- test if the right creator is set in the PDF document
+ Call tSVG '///+- Scalable Vector Graphics ///'
+ Call tSVM '///+- StarView Metafile ///'
+ Call tBMP '///+- Windows Bitmap ///'
+ Call tEMF '///+- Enhanced Metafile ///'
+ Call tPNG '///+- Portable Network Graphic ///'
+ Call tMET '///+- OS/2 Metafile ///'
+ Call tWMF '///+- Windows Metafile ///'
+ Call tSWF '///+- Macromedia Flash (SWF) (.swf) ///'
+
+ Call hStatusOut
+end sub
+
+sub LoadIncludeFiles
+ use "global\system\includes\master.inc"
+ use "global\system\includes\gvariabl.inc"
+ Call GetUseFiles
+ gApplication = "IMPRESS"
+end sub
+
diff --git a/testautomation/graphics/optional/g_accessability.bas b/testautomation/graphics/optional/g_accessability.bas
new file mode 100644
index 000000000000..1113dcb4324f
--- /dev/null
+++ b/testautomation/graphics/optional/g_accessability.bas
@@ -0,0 +1,60 @@
+'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
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* Owner : wolfram.garten@oracle.com
+'*
+'* short description : Graphics Function: Accessability
+'*
+'\******************************************************************
+
+sub main
+ PrintLog "------------------------- g_accessability test -------------------------"
+ Call hStatusIn ( "Graphics","g_accessability.bas")
+
+ use "graphics\tools\id_tools.inc"
+ use "graphics\tools\id_tools_2.inc"
+ use "graphics\optional\includes\global\g_accessability.inc"
+
+ PrintLog "-------------------------" + gApplication + "-------------------"
+ Call tEis1581 ' impress only
+ Call tEis1549
+ Call tEis1523
+
+ gApplication = "DRAW"
+ PrintLog "-------------------------" + gApplication + "-------------------"
+ Call tEis1549
+ Call tEis1523
+
+ Call hStatusOut
+end sub
+
+sub LoadIncludeFiles
+ use "global\system\includes\master.inc"
+ use "global\system\includes\gvariabl.inc"
+ gApplication = "IMPRESS"
+ Call GetUseFiles
+end sub
diff --git a/testautomation/graphics/optional/g_area.bas b/testautomation/graphics/optional/g_area.bas
new file mode 100644
index 000000000000..3ad024ced1f6
--- /dev/null
+++ b/testautomation/graphics/optional/g_area.bas
@@ -0,0 +1,57 @@
+'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
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* Owner : wolfram.garten@oracle.com
+'*
+'* short description : Graphics Function: Format Area
+'*
+'\******************************************************************
+
+sub main
+ PrintLog "------------------------- g_area test -------------------------"
+ Call hStatusIn ( "Graphics","g_area.bas")
+
+ use "graphics\optional\includes\global\g_area.inc"
+
+ PrintLog "-------------------------" + gApplication + "-------------------"
+ Call tiFormatArea
+ Call tdFormatArea1
+
+ gApplication = "DRAW"
+ PrintLog "-------------------------" + gApplication + "-------------------"
+ Call tiFormatArea
+ Call tdFormatArea1
+
+ Call hStatusOut
+end sub
+
+sub LoadIncludeFiles
+ use "global\system\includes\master.inc"
+ use "global\system\includes\gvariabl.inc"
+ gApplication = "IMPRESS"
+ Call GetUseFiles
+end sub
diff --git a/testautomation/graphics/optional/g_arrangealign.bas b/testautomation/graphics/optional/g_arrangealign.bas
new file mode 100644
index 000000000000..3d9f2e2ab4ab
--- /dev/null
+++ b/testautomation/graphics/optional/g_arrangealign.bas
@@ -0,0 +1,79 @@
+'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
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* Owner : wolfram.garten@oracle.com
+'*
+'* short description : Graphics Function: Arrange and Align
+'*
+'\******************************************************************
+
+global datei as string
+global Ueber_Text_1 as string
+global Ueber_Text_2 as string
+global Ueber_Text_3 as string
+
+sub main
+ PrintLog "------------------------- g_arrangealign test -------------------------"
+ Call hStatusIn ( "Graphics","g_arrangealign.bas")
+
+ use "graphics\tools\id_tools.inc"
+ use "graphics\tools\id_tools_2.inc"
+ use "graphics\optional\includes\global\g_arrangealign.inc"
+
+ gApplication = "IMPRESS"
+ PrintLog "-------------------------" + gApplication + "-------------------"
+ Datei = ConvertPath (gOfficePath + "user\work\" + "anord.odp")
+ Call tiDatei_Fuer_Anordnen_Erstellen ' is needed for the following test :-( ueber vars are set here
+ Call tdContextSendBackward
+ Call tdContextBringForward
+ Call tdContextSendToBack
+ Call tdContextBringToFront
+ Call tdContextInFrontOfObject
+ Call tdContextBehindObject
+ Call tdContextReverse
+
+ gApplication = "DRAW"
+ PrintLog "-------------------------" + gApplication + "-------------------"
+ Datei = ConvertPath (gOfficePath + "user\work\" + "anord.odg")
+ Call tiDatei_Fuer_Anordnen_Erstellen ' is needed for the following test :-( ueber vars are set here
+ Call tdContextSendBackward
+ Call tdContextBringForward
+ Call tdContextSendToBack
+ Call tdContextBringToFront
+ Call tdContextInFrontOfObject
+ Call tdContextBehindObject
+ Call tdContextReverse
+
+ Call hStatusOut
+end sub
+
+sub LoadIncludeFiles
+ use "global\system\includes\master.inc"
+ use "global\system\includes\gvariabl.inc"
+ gApplication = "IMPRESS"
+ Call GetUseFiles
+end sub
diff --git a/testautomation/graphics/optional/g_autocorrection.bas b/testautomation/graphics/optional/g_autocorrection.bas
new file mode 100644
index 000000000000..b4fb2af0b472
--- /dev/null
+++ b/testautomation/graphics/optional/g_autocorrection.bas
@@ -0,0 +1,71 @@
+'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
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* Owner : wolfram.garten@oracle.com
+'*
+'* short description : Graphic Function: Tools - Autocorrect
+'*
+'\********************************************************************
+
+public glLocale (15*20) as string
+public ExtensionString as String
+
+sub main
+ PrintLog "------------------------- Graphic Function: Tools - Autocorrect -------------------"
+ Call hStatusIn ( "Graphics","g_autocorrection.bas")
+
+ use "graphics\tools\id_tools.inc"
+ use "graphics\tools\id_tools_2.inc"
+ use "graphics\optional\includes\global\g_autocorrection.inc"
+
+ hSetLocaleStrings ( gTesttoolPath + "graphics\tools\locale_1.txt" , glLocale () )
+
+ gApplication = "IMPRESS"
+ PrintLog "-------------------------" + gApplication + "-------------------"
+ Call tToolsAutocorrectCustomQuotes (TRUE)
+ Call tToolsAutocorrectCustomQuotes (FALSE)
+ Call tToolsAutocorrectOption
+ Call tToolsAutocorrectReplace
+ Call tToolsAutocorrectExceptions
+
+ gApplication = "DRAW"
+ PrintLog "-------------------------" + gApplication + "-------------------"
+ Call tToolsAutocorrectCustomQuotes (TRUE)
+ Call tToolsAutocorrectCustomQuotes (FALSE)
+ Call tToolsAutocorrectOption
+ Call tToolsAutocorrectReplace
+ Call tToolsAutocorrectExceptions
+
+ Call hStatusOut
+end sub
+
+sub LoadIncludeFiles
+ use "global\system\includes\master.inc"
+ use "global\system\includes\gvariabl.inc"
+ gApplication = "IMPRESS"
+ Call GetUseFiles
+end sub
diff --git a/testautomation/graphics/optional/g_character.bas b/testautomation/graphics/optional/g_character.bas
new file mode 100644
index 000000000000..e13eccb813c3
--- /dev/null
+++ b/testautomation/graphics/optional/g_character.bas
@@ -0,0 +1,66 @@
+'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
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* Owner : wolfram.garten@oracle.com
+'*
+'* short description : Graphics Function: Format - Character
+'*
+'\*******************************************************************
+
+public ExtensionString as String
+
+sub main
+ PrintLog "------------------------ Graphics Function: Format - Character -------------------"
+ Call hStatusIn ( "Graphics","g_character.bas")
+
+ use "graphics\optional\includes\global\g_character.inc"
+
+ PrintLog "-------------------------" + gApplication + "-------------------"
+
+ Call tDialogCharacter
+ Call tFormatCharacter
+ Call tSetFormatCharacter
+ Call tGetFormatCharacter
+
+ gApplication = "DRAW"
+ PrintLog "-------------------------" + gApplication + "-------------------"
+
+ Call tDialogCharacter
+ Call tFormatCharacter
+
+ Call tSetFormatCharacter
+ Call tGetFormatCharacter
+
+ Call hStatusOut
+end sub
+
+sub LoadIncludeFiles
+ use "global\system\includes\master.inc"
+ use "global\system\includes\gvariabl.inc"
+ gApplication = "IMPRESS"
+ Call GetUseFiles
+end sub
diff --git a/testautomation/graphics/optional/g_clipboard.bas b/testautomation/graphics/optional/g_clipboard.bas
new file mode 100644
index 000000000000..47b48949a162
--- /dev/null
+++ b/testautomation/graphics/optional/g_clipboard.bas
@@ -0,0 +1,76 @@
+'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
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* Owner : wolfram.garten@oracle.com
+'*
+'* short description : Graphics Function: Clipboard
+'*
+'\******************************************************************
+
+public glLocale (15*20) as string
+public ExtensionString as String
+
+sub main
+ PrintLog "------------------------- g_clipboard test -------------------------"
+ Call hStatusIn ("Graphics","g_clipboard.bas")
+
+ use "graphics\tools\id_tools.inc"
+ use "graphics\tools\id_tools_2.inc"
+ use "graphics\optional\includes\global\g_clipboard.inc"
+
+ hSetLocaleStrings ( gTesttoolPath + "graphics\tools\locale_1.txt" , glLocale () )
+
+ PrintLog "-------------------------" + gApplication + "-------------------"
+ Call tiEditPasteSpecial
+ Call tiEditUndo
+ Call tiEditRedo
+ Call tiEditClipboard
+ Call tiEditPasteSpecial_HTML
+ Call tdEditPasteSpecial_Text
+ Call tdEditPasteSpecial_Graphic
+ Call tdEditPasteSpecial_Circle
+
+ gApplication = "DRAW"
+ PrintLog "-------------------------" + gApplication + "-------------------"
+ Call tiEditPasteSpecial
+ Call tiEditUndo
+ Call tiEditRedo
+ Call tiEditClipboard
+ Call tiEditPasteSpecial_HTML
+ Call tdEditPasteSpecial_Text
+ Call tdEditPasteSpecial_Graphic
+ Call tdEditPasteSpecial_Circle
+
+ Call hStatusOut
+end sub
+
+sub LoadIncludeFiles
+ use "global\system\includes\master.inc"
+ use "global\system\includes\gvariabl.inc"
+ gApplication = "IMPRESS"
+ Call GetUseFiles
+end sub
diff --git a/testautomation/graphics/optional/g_clipexport.bas b/testautomation/graphics/optional/g_clipexport.bas
new file mode 100644
index 000000000000..d75eef694394
--- /dev/null
+++ b/testautomation/graphics/optional/g_clipexport.bas
@@ -0,0 +1,68 @@
+'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
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* Owner : wolfram.garten@oracle.com
+'*
+'* short description : Clipboard export Test
+'*
+'\******************************************************************
+
+sub main
+ Call hStatusIn ( "Graphics","g_clipexport.bas")
+
+ use "graphics\tools\id_tools.inc"
+ use "graphics\tools\id_tools_2.inc"
+ use "graphics\optional\includes\global\g_clipexport.inc"
+ use "graphics\optional\includes\global\g_clipexport2.inc"
+ use "graphics\optional\includes\global\g_clipexport3.inc"
+
+ PrintLog "-------------------------" + gApplication + "-------------------"
+ Call tClipboardFromDrawTest
+
+ gApplication = "IMPRESS"
+ PrintLog "-------------------------" + gApplication + "-------------------"
+ Call tClipboardFromDrawTest
+
+ 'TODO FHA - Find and write bugs for exporting to writer and calc.
+ ' gApplication = "WRITER"
+ ' PrintLog "-------------------------" + gApplication + "-------------------"
+ ' Call tClipboardFromDrawTest
+
+ ' gApplication = "CALC"
+ ' PrintLog "-------------------------" + gApplication + "-------------------"
+ ' Call tClipboardFromDrawTest
+
+ Call hStatusOut
+end sub
+
+sub LoadIncludeFiles
+ use "global\system\includes\master.inc"
+ use "global\system\includes\gvariabl.inc"
+ use "global\tools\includes\required\t_menu.inc" 'Window-control
+ gApplication = "DRAW"
+ Call GetUseFiles
+end sub
diff --git a/testautomation/graphics/optional/g_convertto.bas b/testautomation/graphics/optional/g_convertto.bas
new file mode 100644
index 000000000000..8283981462ee
--- /dev/null
+++ b/testautomation/graphics/optional/g_convertto.bas
@@ -0,0 +1,73 @@
+'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
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* Owner : wolfram.garten@oracle.com
+'*
+'* short description : Graphics Function: Convert to ...
+'*
+'\******************************************************************
+
+global Ueber_Text_1 as string
+global Ueber_Text_2 as string
+global Ueber_Text_3 as string
+
+sub main
+ PrintLog "------------------------- g_convertto test -------------------------"
+ Call hStatusIn ( "Graphics","g_convertto.bas")
+
+ use "graphics\tools\id_tools.inc"
+ use "graphics\tools\id_tools_2.inc"
+ use "graphics\optional\includes\global\g_convertto.inc"
+
+ PrintLog "-------------------------" + gApplication + "-------------------"
+ Call tiModifyConvertToPolygon
+ Call tdContextConvertIntoBitmap
+ Call tiAendernUmwandelnInKurve
+ Call tiAendernUmwandelnInPolygonGrafik
+ Call tiAendernUmwandelnIn3D
+ Call tiAendernUmwandelnIn3DRotationsKoerper
+ Call tiAendernUmwandelnInMetaFile
+
+ gApplication = "DRAW"
+ PrintLog "-------------------------" + gApplication + "-------------------"
+ Call tiModifyConvertToPolygon
+ Call tdContextConvertIntoBitmap
+ Call tiAendernUmwandelnInKurve
+ Call tiAendernUmwandelnInPolygonGrafik
+ Call tiAendernUmwandelnIn3D
+ Call tiAendernUmwandelnIn3DRotationsKoerper
+ Call tiAendernUmwandelnInMetaFile
+
+ Call hStatusOut
+end sub
+
+sub LoadIncludeFiles
+ use "global\system\includes\master.inc"
+ use "global\system\includes\gvariabl.inc"
+ gApplication = "IMPRESS"
+ Call GetUseFiles
+end sub
diff --git a/testautomation/graphics/optional/g_crossfading.bas b/testautomation/graphics/optional/g_crossfading.bas
new file mode 100644
index 000000000000..0c8102e70bde
--- /dev/null
+++ b/testautomation/graphics/optional/g_crossfading.bas
@@ -0,0 +1,57 @@
+'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
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* Owner : wolfram.garten@oracle.com
+'*
+'* short description : Graphic Optional Test for Edit/Crossfading
+'*
+'\******************************************************************
+
+sub main
+ PrintLog "------------------------- g_crossfading test -------------------------"
+ Call hStatusIn ( "Graphics","g_crossfading.bas")
+
+ use "graphics\tools\id_tools.inc"
+ use "graphics\tools\id_tools_2.inc"
+ use "graphics\optional\includes\global\g_crossfading.inc"
+
+ PrintLog "-------------------------" + gApplication + "-------------------"
+ Call tCrossfading
+
+ gApplication = "IMPRESS"
+ PrintLog "-------------------------" + gApplication + "-------------------"
+ Call tCrossfading
+
+ Call hStatusOut
+end sub
+
+sub LoadIncludeFiles
+ use "global\system\includes\master.inc"
+ use "global\system\includes\gvariabl.inc"
+ gApplication = "DRAW"
+ Call GetUseFiles
+end sub
diff --git a/testautomation/graphics/optional/g_customshapes.bas b/testautomation/graphics/optional/g_customshapes.bas
new file mode 100644
index 000000000000..960fb7a2e19b
--- /dev/null
+++ b/testautomation/graphics/optional/g_customshapes.bas
@@ -0,0 +1,59 @@
+'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
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* Owner : wolfram.garten@oracle.com
+'*
+'* short description : Graphics Function: Customshapes
+'*
+'\************************************************************************
+
+sub main
+ PrintLog "------------------------- Customshapes test -------------------------"
+ Call hStatusIn ( "Graphics","g_customshapes.bas" )
+
+ use "graphics\tools\id_tools.inc"
+ use "graphics\tools\id_tools_2.inc"
+ use "graphics\optional\includes\global\g_customshapes.inc"
+
+ PrintLog "--------------------- " + gApplication + " -------------------"
+ Call tFormatPaintbrush
+ Call tCustomshapes
+
+ gApplication = "DRAW"
+ PrintLog "--------------------- " + gApplication + " -------------------"
+ Call tFormatPaintbrush
+ Call tCustomshapes
+
+ Call hStatusOut
+end sub
+
+sub LoadIncludeFiles
+ use "global\system\includes\master.inc"
+ use "global\system\includes\gvariabl.inc"
+ gApplication = "IMPRESS"
+ Call GetUseFiles
+end sub
diff --git a/testautomation/graphics/optional/g_demoguide.bas b/testautomation/graphics/optional/g_demoguide.bas
new file mode 100644
index 000000000000..c3a8fe861724
--- /dev/null
+++ b/testautomation/graphics/optional/g_demoguide.bas
@@ -0,0 +1,56 @@
+'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
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/***********************************************************************
+'*
+'* owner : wolfram.garten@oracle.com
+'*
+'* short description : testcase to check the demo guide
+'*
+'\***********************************************************************
+
+sub main
+ printlog "-----------------------------------------------------------------------"
+ printlog "-- G R A P H I C S L E V E L - 1 D E M O G U I D E --"
+ printlog "-----------------------------------------------------------------------"
+ Call hStatusIn ( "Graphics","g_demoguide.bas")
+
+ use "graphics\tools\id_tools.inc"
+ use "graphics\tools\id_tools_2.inc"
+ use "graphics\optional\includes\global\g_demoguide.inc"
+
+ call t_Introduction
+ call t_Interoperability
+ call t_DrawingEngine
+
+ Call hStatusOut
+end sub
+
+sub LoadIncludeFiles
+ use "global\system\includes\master.inc"
+ use "global\system\includes\gvariabl.inc"
+ gApplication = "IMPRESS"
+ Call GetUseFiles
+end sub
diff --git a/testautomation/graphics/optional/g_dimensions.bas b/testautomation/graphics/optional/g_dimensions.bas
new file mode 100644
index 000000000000..3644dfd3b0d8
--- /dev/null
+++ b/testautomation/graphics/optional/g_dimensions.bas
@@ -0,0 +1,55 @@
+'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
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* Owner : wolfram.garten@oracle.com
+'*
+'* short description : Graphics Function: Dimensioning Line
+'*
+'\******************************************************************
+
+sub main
+ PrintLog "------------------------- g_dimensions test -------------------------"
+ Call hStatusIn ( "Graphics","g_dimensions.bas")
+
+ use "graphics\optional\includes\global\g_dimensions.inc"
+
+ PrintLog "-------------------------" + gApplication + "-------------------"
+ Call testFormatDimensioning
+
+ gApplication = "DRAW"
+ PrintLog "-------------------------" + gApplication + "-------------------"
+ Call testFormatDimensioning
+
+ Call hStatusOut
+end sub
+
+sub LoadIncludeFiles
+ use "global\system\includes\master.inc"
+ use "global\system\includes\gvariabl.inc"
+ gApplication = "IMPRESS"
+ Call GetUseFiles
+end sub
diff --git a/testautomation/graphics/optional/g_edit.bas b/testautomation/graphics/optional/g_edit.bas
new file mode 100644
index 000000000000..305967f73112
--- /dev/null
+++ b/testautomation/graphics/optional/g_edit.bas
@@ -0,0 +1,69 @@
+'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
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* Owner : wolfram.garten@oracle.com
+'*
+'* short description : Graphics Function: Edit
+'*
+'\******************************************************************
+
+sub main
+ PrintLog "------------------------- g_edit test -------------------------"
+ Call hStatusIn ( "Graphics","g_edit.bas")
+
+ use "graphics\tools\id_tools.inc"
+ use "graphics\tools\id_tools_2.inc"
+ use "graphics\optional\includes\global\g_edit.inc"
+
+ GetOLEDefaultNames
+
+ PrintLog "-------------------------" + gApplication + "-------------------"
+ Call tEditDuplicate
+ Call tEditFields
+ Call tEditDeleteSlide
+ Call tEditLinks
+ Call tEditObjectEdit
+
+ gApplication = "DRAW"
+ PrintLog "-------------------------" + gApplication + "-------------------"
+ Call tEditDuplicate
+ Call tEditFields
+ Call tEditDeleteSlide
+ Call tEditLinks
+ Call tdEditDeleteLayer
+ Call tEditObjectEdit
+
+ Call hStatusOut
+end sub
+
+sub LoadIncludeFiles
+ use "global\system\includes\master.inc"
+ use "global\system\includes\gvariabl.inc"
+ use "global\tools\includes\optional\t_ole.inc"
+ Call GetUseFiles
+ gApplication = "IMPRESS"
+end sub
diff --git a/testautomation/graphics/optional/g_export_html.bas b/testautomation/graphics/optional/g_export_html.bas
new file mode 100644
index 000000000000..faa2783b6d2f
--- /dev/null
+++ b/testautomation/graphics/optional/g_export_html.bas
@@ -0,0 +1,62 @@
+'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
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* Owner : wolfram.garten@oracle.com
+'*
+'* short description : Graphics Function: Export to HTML
+'*
+'\******************************************************************
+
+public glLocale (15*20) as string
+
+sub main
+ PrintLog "------------------------- g_export_html test -------------------------"
+ Call hStatusIn ( "Graphics","g_export_html.bas")
+
+ use "graphics\tools\id_tools.inc"
+ use "graphics\optional\includes\global\g_export_html.inc"
+
+ hSetLocaleStrings ( gTesttoolPath + "graphics\tools\locale_1.txt" , glLocale () )
+
+ PrintLog "-------------------------" + gApplication + "-------------------"
+ Call tHTMLExport
+ Call tHtmlExport_Webcast
+
+ gApplication = "DRAW"
+ PrintLog "-------------------------" + gApplication + "-------------------"
+ Call tHTMLExport
+
+ Call hStatusOut
+end sub
+
+sub LoadIncludeFiles
+ use "global\system\includes\master.inc"
+ use "global\system\includes\gvariabl.inc"
+ use "global\tools\includes\optional\t_ui_filters.inc"
+ Call GetUseFiles
+ gApplication = "IMPRESS"
+end sub
diff --git a/testautomation/graphics/optional/g_findreplace.bas b/testautomation/graphics/optional/g_findreplace.bas
new file mode 100644
index 000000000000..9de7acfa2bc5
--- /dev/null
+++ b/testautomation/graphics/optional/g_findreplace.bas
@@ -0,0 +1,60 @@
+'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
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* Owner : wolfram.garten@oracle.com
+'*
+'* short description : Graphics Optional Find and Replace Test
+'*
+'\******************************************************************
+
+public glLocale (15*20) as string
+
+sub main
+ Call hStatusIn ( "Graphics","g_findreplace.bas")
+
+ use "graphics\tools\id_tools.inc"
+ use "graphics\optional\includes\global\g_find_replace.inc"
+
+ hSetLocaleStrings ( gTesttoolPath + "graphics\tools\locale_1.txt" , glLocale () )
+
+ PrintLog "-------------------------" + gApplication + "-------------------"
+ Call tiEditSearchAndReplace
+ Call tiEditSearchAndReplaceBUGS
+
+ gApplication = "DRAW"
+ PrintLog "-------------------------" + gApplication + "-------------------"
+ Call tiEditSearchAndReplace
+
+ Call hStatusOut
+end sub
+
+sub LoadIncludeFiles
+ use "global\system\includes\master.inc"
+ use "global\system\includes\gvariabl.inc"
+ gApplication = "IMPRESS"
+ Call GetUseFiles
+end sub
diff --git a/testautomation/graphics/optional/g_format.bas b/testautomation/graphics/optional/g_format.bas
new file mode 100644
index 000000000000..1c03f7bf8801
--- /dev/null
+++ b/testautomation/graphics/optional/g_format.bas
@@ -0,0 +1,70 @@
+'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
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* Owner : wolfram.garten@oracle.com
+'*
+'* short description : Graphics Function: Format
+'*
+'\******************************************************************
+
+public ExtensionString as String
+
+sub main
+ PrintLog "------------------------- g_format test -------------------------"
+ Call hStatusIn ( "Graphics","g_format.bas")
+
+ use "graphics\tools\id_tools.inc"
+ use "graphics\tools\id_tools_2.inc"
+ use "graphics\optional\includes\global\g_format.inc"
+
+ PrintLog "-------------------------" + gApplication + "-------------------"
+ Call tiFormatText
+ Call tiFormatPositionAndSize
+ Call tdFormatConnector
+ Call tiFormat3D_Effekte
+ Call tiFormatAufzaehlungszeichen
+ Call tdFormatTemplates
+
+ gApplication = "DRAW"
+ PrintLog "-------------------------" + gApplication + "-------------------"
+ Call tiFormatText
+ Call tdFormatLayer
+ Call tiFormatPositionAndSize
+ Call tdFormatConnector
+ Call tiFormat3D_Effekte
+ Call tiFormatAufzaehlungszeichen
+ Call tdFormatTemplates
+
+ Call hStatusOut
+end sub
+
+sub LoadIncludeFiles
+ use "global\system\includes\master.inc"
+ use "global\system\includes\gvariabl.inc"
+ Call GetUseFiles
+ gApplication = "IMPRESS"
+end sub
diff --git a/testautomation/graphics/optional/g_group.bas b/testautomation/graphics/optional/g_group.bas
new file mode 100644
index 000000000000..93f542bcc027
--- /dev/null
+++ b/testautomation/graphics/optional/g_group.bas
@@ -0,0 +1,57 @@
+'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
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* Owner : wolfram.garten@oracle.com
+'*
+'* short description : Graphics Function: Group
+'*
+'\******************************************************************
+
+sub main
+ PrintLog "------------------------- g_group test -------------------------"
+ Call hStatusIn ( "Graphics","g_group.bas" )
+
+ use "graphics\tools\id_tools.inc"
+ use "graphics\tools\id_tools_2.inc"
+ use "graphics\optional\includes\global\g_group.inc"
+
+ PrintLog "-------------------------" + gApplication + "-------------------"
+ Call tiGruppierung
+
+ gApplication = "DRAW"
+ PrintLog "-------------------------" + gApplication + "-------------------"
+ Call tiGruppierung
+
+ Call hStatusOut
+end sub
+
+sub LoadIncludeFiles
+ use "global\system\includes\master.inc"
+ use "global\system\includes\gvariabl.inc"
+ gApplication = "IMPRESS"
+ Call GetUseFiles
+end sub
diff --git a/testautomation/graphics/optional/g_imagemap.bas b/testautomation/graphics/optional/g_imagemap.bas
new file mode 100644
index 000000000000..b2dd4a62c182
--- /dev/null
+++ b/testautomation/graphics/optional/g_imagemap.bas
@@ -0,0 +1,58 @@
+'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
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* Owner : wolfram.garten@oracle.com
+'*
+'* short description : Graphics Function: ImageMap
+'*
+'\******************************************************************
+
+sub main
+ PrintLog "------------------------- g_imagemap test -------------------------"
+ Call hStatusIn ( "Graphics","g_imagemap.bas" )
+
+ use "graphics\tools\id_tools.inc"
+ use "graphics\optional\includes\global\g_imagemap.inc"
+
+ PrintLog "-------------------------" + gApplication + "-------------------"
+ Call tEditImageMap
+ Call tEditImageMapProperties
+
+ gApplication = "DRAW"
+ PrintLog "-------------------------" + gApplication + "-------------------"
+ Call tEditImageMap
+ Call tEditImageMapProperties
+
+ Call hStatusOut
+end sub
+
+sub LoadIncludeFiles
+ use "global\system\includes\master.inc"
+ use "global\system\includes\gvariabl.inc"
+ gApplication = "IMPRESS"
+ Call GetUseFiles
+end sub
diff --git a/testautomation/graphics/optional/g_insert.bas b/testautomation/graphics/optional/g_insert.bas
new file mode 100644
index 000000000000..a006e2f04c3e
--- /dev/null
+++ b/testautomation/graphics/optional/g_insert.bas
@@ -0,0 +1,90 @@
+'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
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* Owner : wolfram.garten@oracle.com
+'*
+'* short description : Graphics Function: Insert
+'*
+'\******************************************************************
+
+public glLocale (15*20) as string
+public ExtensionString as String
+
+sub main
+ PrintLog "------------------------- g_insert test -------------------------"
+ Call hStatusIn ( "Graphics","g_insert.bas")
+
+ use "graphics\tools\id_tools.inc"
+ use "graphics\tools\id_tools_2.inc"
+ use "graphics\optional\includes\global\g_insert.inc"
+
+ hSetLocaleStrings ( gTesttoolPath + "graphics\tools\locale_1.txt" , glLocale () )
+
+ PrintLog "-------------------------" + gApplication + "-------------------"
+
+ Call tInsertFloatingFrame
+ Call tInsertFields
+ Call tdInsertObjectOleObjects
+ Call tdInsertSnappoint_Line
+ Call tInsertSpecialCharacter
+ Call tInsertSpreadsheet
+ Call tInsertGraphics
+ Call tInsertObjectPlugIn ' Doesn't exist in the VCL
+ Call tInsertObjectFormula ' Is in the VCL in InsertObjectOLEObject
+ Call tInsertChart
+ Call tdInsertFile
+
+ gApplication = "DRAW"
+ PrintLog "-------------------------" + gApplication + "-------------------"
+
+ Call tInsertFloatingFrame
+ Call tInsertFields
+ Call tdInsertObjectOleObjects
+
+ Printlog "Disabled SnappPointLine test, because of unpredictable mouse moves (07/2002 TBO)"
+ 'Call tdInsertSnappoint_Line
+ '"tInsertSpecialCharacter outcommented due to unpredictable results"
+ 'Call tInsertSpecialCharacter
+ 'Hyperlink
+ ' Call tdInsertScannenQuelleAuswaehlen 'When no scanner is installed, no function
+ ' Call tdInsertScannenAnfordern 'When no scanner is installed, no function
+ Call tInsertSpreadsheet
+ Call tInsertGraphics
+ Call tInsertObjectPlugIn ' Doesn't exist in the VCL
+ Call tInsertObjectFormula ' Is in the VCL in InsertObjectOLEObject
+ ' Call tInsertChart
+ Call tdInsertFile
+
+ Call hStatusOut
+end sub
+
+sub LoadIncludeFiles
+ use "global\system\includes\master.inc"
+ use "global\system\includes\gvariabl.inc"
+ gApplication = "IMPRESS"
+ Call GetUseFiles
+end sub
diff --git a/testautomation/graphics/optional/g_line.bas b/testautomation/graphics/optional/g_line.bas
new file mode 100644
index 000000000000..c1327e21bc96
--- /dev/null
+++ b/testautomation/graphics/optional/g_line.bas
@@ -0,0 +1,58 @@
+'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
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* Owner : wolfram.garten@oracle.com
+'*
+'* short description : Graphics Function: Format - Line
+'*
+'\******************************************************************
+
+sub main
+ PrintLog "------------------------- g_line test -------------------------"
+ Call hStatusIn ( "Graphics","g_line.bas")
+ use "graphics\tools\id_tools_2.inc"
+ use "graphics\optional\includes\global\g_line.inc"
+
+ PrintLog "-------------------------" + gApplication + "-------------------"
+ Call tiFormatLine
+ Call tLineConnect
+
+ gApplication = "DRAW"
+ PrintLog "-------------------------" + gApplication + "-------------------"
+ Call tiFormatLine
+ Call tLineConnect
+
+
+ Call hStatusOut
+end sub
+
+sub LoadIncludeFiles
+ use "global\system\includes\master.inc"
+ use "global\system\includes\gvariabl.inc"
+ gApplication = "IMPRESS"
+ Call GetUseFiles
+end sub
diff --git a/testautomation/graphics/optional/g_load_save.bas b/testautomation/graphics/optional/g_load_save.bas
new file mode 100644
index 000000000000..b68da93657fc
--- /dev/null
+++ b/testautomation/graphics/optional/g_load_save.bas
@@ -0,0 +1,89 @@
+'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
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* Owner : wolfram.garten@oracle.com
+'*
+'* short description : Graphics Function: Load and Save
+'*
+'\******************************************************************
+
+public glLocale (15*20) as string
+public q as integer
+public ExtensionString as String
+
+sub main
+ PrintLog "------------------------- g_load_save test -------------------------"
+ Call hStatusIn ( "Graphics","g_load_save.bas")
+
+ use "graphics\tools\id_tools.inc"
+ use "graphics\tools\id_tools_2.inc"
+ use "graphics\optional\includes\global\g_load_save.inc"
+
+ hSetLocaleStrings ( gTesttoolPath + "graphics\tools\locale_1.txt" , glLocale () )
+
+ PrintLog "-------------------------" + gApplication + "-------------------"
+ Call tFileOpenSaveEtc
+ Call tFileProperties
+ Call tFilePassword52
+ Call tFileOpenImport
+ Call tTestDXF255CharBug
+ Call tDeletedTemplate
+ call tSaveLoadLayoutEmpty
+ call tSaveLoadLayoutOLE
+ call tSaveLoadLayoutText
+ call tSaveLoadLayoutOutline
+ call tSaveLoadLayoutPicture
+ call tSaveLoadLayoutChart
+ call tSaveLoadLayoutSpreadsheet
+
+ gApplication = "IMPRESS"
+ PrintLog "-------------------------" + gApplication + "-------------------"
+ Call tFileOpenSaveEtc
+ Call tFileProperties
+ Call tFilePassword52
+ Call tFileOpenImport
+ Call tTestDXF255CharBug
+ Call tDeletedTemplate
+ call tSaveLoadLayoutEmpty
+ call tSaveLoadLayoutOLE
+ call tSaveLoadLayoutText
+ call tSaveLoadLayoutOutline
+ call tSaveLoadLayoutPicture
+ call tSaveLoadLayoutChart
+ call tSaveLoadLayoutSpreadsheet
+
+ Call hStatusOut
+end sub
+
+sub LoadIncludeFiles
+ use "global\system\includes\master.inc"
+ use "global\system\includes\gvariabl.inc"
+ Call GetUseFiles
+ gApplication = "DRAW"
+end sub
+
+
diff --git a/testautomation/graphics/optional/g_mediaplayer.bas b/testautomation/graphics/optional/g_mediaplayer.bas
new file mode 100644
index 000000000000..e237ce752a2d
--- /dev/null
+++ b/testautomation/graphics/optional/g_mediaplayer.bas
@@ -0,0 +1,56 @@
+'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
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* Owner : wolfram.garten@oracle.com
+'*
+'* short description : Graphics Function: Mediaplayer-functionallity
+'*
+'\******************************************************************
+
+sub main
+ PrintLog "------------------------- g_Mediaplayer test -------------------------"
+ Call hStatusIn ( "Graphics","g_mediaplayer.bas")
+
+ use "graphics\tools\id_tools.inc"
+ use "graphics\optional\includes\global\g_mediaplayer.inc"
+
+ PrintLog "-------------------------" + gApplication + "-------------------"
+ call g_mediaplayer
+ gApplication = "DRAW"
+
+ PrintLog "-------------------------" + gApplication + "-------------------"
+ call g_mediaplayer
+
+ Call hStatusOut
+end sub
+
+sub LoadIncludeFiles
+ use "global\system\includes\master.inc"
+ use "global\system\includes\gvariabl.inc"
+ gApplication = "IMPRESS"
+ Call GetUseFiles
+end sub
diff --git a/testautomation/graphics/optional/g_navigator.bas b/testautomation/graphics/optional/g_navigator.bas
new file mode 100644
index 000000000000..cc165c76b37e
--- /dev/null
+++ b/testautomation/graphics/optional/g_navigator.bas
@@ -0,0 +1,64 @@
+'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
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* Owner : wolfram.garten@oracle.com
+'*
+'* short description : Graphics Function: Navigator
+'*
+'\******************************************************************
+
+sub main
+ use "graphics\tools\id_tools.inc"
+ use "graphics\tools\id_tools_2.inc"
+ use "graphics\optional\includes\global\g_navigator.inc"
+
+ PrintLog "------------------------- g_navigator test -------------------------"
+ Call hStatusIn ( "Graphics","g_navigator.bas")
+
+ PrintLog "-------------------------" + gApplication + "-------------------"
+ Call tViewNavigatorZOrder
+ Call tdViewNavigator
+ Call tViewNavigatorGroupedObjects
+ Call tViewNavigatorNameActivated
+
+ gApplication = "DRAW"
+ PrintLog "-------------------------" + gApplication + "-------------------"
+ Call tViewNavigatorZOrder
+ Call tdViewNavigator
+ Call tViewNavigatorGroupedObjects
+ Call tViewNavigatorNameActivated
+
+ Call hStatusOut
+end sub
+
+sub LoadIncludeFiles
+ use "global\system\includes\master.inc"
+ use "global\system\includes\gvariabl.inc"
+
+ gApplication = "IMPRESS"
+ Call GetUseFiles
+end sub
diff --git a/testautomation/graphics/optional/g_ole.bas b/testautomation/graphics/optional/g_ole.bas
new file mode 100644
index 000000000000..98f99e4ab931
--- /dev/null
+++ b/testautomation/graphics/optional/g_ole.bas
@@ -0,0 +1,61 @@
+'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
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* Owner : wolfram.garten@oracle.com
+'*
+'* short description : Graphics Function: Ole-behaviour
+'*
+'\******************************************************************
+
+public glLocale (15*20) as string
+global ExtensionString as String
+
+sub main
+ PrintLog "------------------------- g_ole test -------------------------"
+ Call hStatusIn ( "Graphics","g_ole.bas")
+
+ use "graphics\tools\id_tools.inc"
+ use "graphics\tools\id_tools_2.inc"
+ use "graphics\optional\includes\global\g_ole.inc"
+
+ PrintLog "-------------------------" + gApplication + "-------------------"
+ QaErrorLog "tOLE_Copy deactivated due to lack of test-specification. - FHA"
+
+ call tOLE_Copy
+ call tOLE_SaveLoad
+
+ Call tiOpenOLECrash
+
+ Call hStatusOut
+end sub
+
+sub LoadIncludeFiles
+ use "global\system\includes\master.inc"
+ use "global\system\includes\gvariabl.inc"
+ gApplication = "IMPRESS"
+ Call GetUseFiles
+end sub
diff --git a/testautomation/graphics/optional/g_paneview.bas b/testautomation/graphics/optional/g_paneview.bas
new file mode 100644
index 000000000000..021a95cfbfad
--- /dev/null
+++ b/testautomation/graphics/optional/g_paneview.bas
@@ -0,0 +1,62 @@
+'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
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* Owner : wolfram.garten@oracle.com
+'*
+'* short description : Graphics Function: Paneview-behaviour
+'*
+'\******************************************************************
+
+public glLocale (15*20) as string
+global ExtensionString as String
+
+sub main
+ PrintLog "------------------------- g_Paneview test -------------------------"
+ Call hStatusIn ( "Graphics","g_paneview.bas")
+
+ use "graphics\tools\id_tools.inc"
+ use "graphics\optional\includes\global\g_paneview.inc"
+
+ PrintLog "-------------------------" + gApplication + "-------------------"
+ call tiMinimize_Maximize_Docking_SlidePane
+ call tiMinimize_Maximize_Docking_TaskPane
+ call tiPaneview_LoadSave_Windowsstate
+
+ gApplication = "DRAW"
+ PrintLog "-------------------------" + gApplication + "-------------------"
+ call tdMinimize_Maximize_Docking_Pagepane
+ call tdPaneview_LoadSave_Windowsstate
+
+ Call hStatusOut
+end sub
+
+sub LoadIncludeFiles
+ use "global\system\includes\master.inc"
+ use "global\system\includes\gvariabl.inc"
+ gApplication = "IMPRESS"
+ Call GetUseFiles
+end sub
diff --git a/testautomation/graphics/optional/g_paragraph.bas b/testautomation/graphics/optional/g_paragraph.bas
new file mode 100644
index 000000000000..502728773a6e
--- /dev/null
+++ b/testautomation/graphics/optional/g_paragraph.bas
@@ -0,0 +1,56 @@
+'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
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* Owner : wolfram.garten@oracle.com
+'*
+'* short description : Graphics Function: Format - Paragraph
+'*
+'\******************************************************************
+
+sub main
+ PrintLog "------------------------- g_paragraph test -------------------------"
+ Call hStatusIn ( "Graphics","g_paragraph.bas")
+
+ use "graphics\optional\includes\global\g_paragraph.inc"
+ use "graphics\tools\id_tools.inc"
+
+ PrintLog "-------------------------" + gApplication + "-------------------"
+ Call tdFormatParagraph
+
+ gApplication = "DRAW"
+ PrintLog "-------------------------" + gApplication + "-------------------"
+ Call tdFormatParagraph
+
+ Call hStatusOut
+end sub
+
+sub LoadIncludeFiles
+ use "global\system\includes\master.inc"
+ use "global\system\includes\gvariabl.inc"
+ gApplication = "IMPRESS"
+ Call GetUseFiles
+end sub
diff --git a/testautomation/graphics/optional/g_savepictureas.bas b/testautomation/graphics/optional/g_savepictureas.bas
new file mode 100644
index 000000000000..332632dcdac6
--- /dev/null
+++ b/testautomation/graphics/optional/g_savepictureas.bas
@@ -0,0 +1,65 @@
+'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
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* Owner : wolfram.garten@oracle.com
+'*
+'* short description : Contextmenu-SaveAs Picture -Test
+'*
+'\*****************************************************************
+
+global OutputGrafikTBO as string
+global Document as string
+
+sub main
+ Printlog "--------------------- Graphics Export Test ------------------- "
+ Call hStatusIn ( "Graphics","g_savepictureas.bas" )
+
+ use "graphics\tools\id_tools.inc"
+ use "graphics\tools\id_tools_2.inc"
+ use "graphics\optional\includes\global\g_savepictureas.inc"
+
+ PrintLog "-------------------------" + gApplication + "-------------------"
+ Call tContextSaveAsPicture
+ Call tContextSavePictureLinkAsPicture
+ Call Mnemonickey
+
+ gApplication = "DRAW"
+ PrintLog "-------------------------" + gApplication + "-------------------"
+ Call tContextSaveAsPicture
+ Call tContextSavePictureLinkAsPicture
+ Call Mnemonickey
+
+ Call hStatusOut
+end sub
+
+sub LoadIncludeFiles
+ use "global\system\includes\master.inc"
+ use "global\system\includes\gvariabl.inc"
+ Call GetUseFiles
+ gApplication = "IMPRESS"
+end sub
+
diff --git a/testautomation/graphics/optional/g_shaddow.bas b/testautomation/graphics/optional/g_shaddow.bas
new file mode 100644
index 000000000000..c6e963ae1658
--- /dev/null
+++ b/testautomation/graphics/optional/g_shaddow.bas
@@ -0,0 +1,60 @@
+'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
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+' *
+' * Owner : wolfram.garten@oracle.com
+' *
+' * short description : Shaddow Optional Test
+' *
+' \******************************************************************
+
+global glLocale (15*20) as string
+public ExtensionString as String
+
+sub main
+ Call hStatusIn ( "Graphics","g_shaddow.bas" )
+
+ use "graphics\tools\id_tools.inc"
+ use "graphics\tools\id_tools_2.inc"
+ use "graphics\optional\includes\global\g_shaddow.inc"
+
+ gApplication = "IMPRESS"
+ PrintLog "------------------------- " + gApplication + " Shaddow-Optional Test -------------------"
+ Call tiShaddow
+
+ gApplication = "DRAW"
+ PrintLog "------------------------- " + gApplication + " Shaddow-Optional Test -------------------"
+ Call tiShaddow
+
+ Call hStatusOut
+end sub
+
+sub LoadIncludeFiles
+ use "global\system\includes\master.inc"
+ use "global\system\includes\gvariabl.inc"
+ gApplication = "DRAW"
+ Call GetUseFiles
+end sub
diff --git a/testautomation/graphics/optional/g_slidelayer.bas b/testautomation/graphics/optional/g_slidelayer.bas
new file mode 100644
index 000000000000..3ffd9a4ab37a
--- /dev/null
+++ b/testautomation/graphics/optional/g_slidelayer.bas
@@ -0,0 +1,69 @@
+'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
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* Owner : wolfram.garten@oracle.com
+'*
+'* short description : Graphics Function: Slide and Layer
+'*
+'\******************************************************************
+
+'Variables:
+global ExtensionString as String
+
+sub main
+ PrintLog "------------------------- g_slidelayer test -------------------------"
+ Call hStatusIn ( "Graphics","g_slidelayer.bas")
+
+ use "graphics\tools\id_tools.inc"
+ use "graphics\tools\id_tools_2.inc"
+ use "graphics\optional\includes\global\g_slidelayer.inc"
+ use "graphics\optional\includes\impress\i_slidelayer.inc"
+
+ PrintLog "-------------------------" + gApplication + "-------------------"
+ Call tInsertSlide
+ Call tInsertDuplicateSlide
+ Call tiInsertExpandSlide ' only in impress
+ Call tiInsertSummarySlide ' only in impress
+ Call tiFormatSeitenlayout ' only in impress
+ Call t114174 ' only in impress
+ Call t111862
+
+ gApplication = "DRAW"
+ PrintLog "-------------------------" + gApplication + "-------------------"
+ Call tInsertSlide
+ Call tInsertDuplicateSlide
+ Call tInsertLayer ' in impress not here, instead Edit->Layer->Insert
+
+ Call hStatusOut
+end sub
+
+sub LoadIncludeFiles
+ use "global\system\includes\master.inc"
+ use "global\system\includes\gvariabl.inc"
+ gApplication = "IMPRESS"
+ Call GetUseFiles
+end sub
diff --git a/testautomation/graphics/optional/g_spellcheck.bas b/testautomation/graphics/optional/g_spellcheck.bas
new file mode 100644
index 000000000000..7dad1b0d9e40
--- /dev/null
+++ b/testautomation/graphics/optional/g_spellcheck.bas
@@ -0,0 +1,68 @@
+'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
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* Owner : wolfram.garten@oracle.com
+'*
+'* short description : Graphics Function: Tools - Spellcheck
+'*
+'\******************************************************************
+
+public glLocale (15*20) as string
+
+sub main
+ PrintLog "------------------------- g_spellcheck test -------------------------"
+ Call hStatusIn ( "Graphics","g_spellcheck.bas")
+
+ use "graphics\tools\id_tools.inc"
+ use "graphics\tools\id_tools_2.inc"
+ use "graphics\optional\includes\global\g_spellcheck.inc"
+
+ hSetLocaleStrings ( gTesttoolPath + "graphics\tools\locale_1.txt" , glLocale () )
+
+ PrintLog "-------------------------" + gApplication + "-------------------"
+ Call tiToolsSpellcheckCorrect
+ Call tiToolsSpellcheckError
+ Call tiToolsSpellcheckCheck
+ Call tToolsSpellcheckAutoSpellcheck
+
+ gApplication = "DRAW"
+ PrintLog "-------------------------" + gApplication + "-------------------"
+ Call tiToolsSpellcheckCorrect
+ Call tiToolsSpellcheckError
+ Call tiToolsSpellcheckCheck
+ Call tToolsSpellcheckAutoSpellcheck
+
+ Call hStatusOut
+end sub
+
+sub LoadIncludeFiles
+ use "global\system\includes\master.inc"
+ use "global\system\includes\gvariabl.inc"
+ use "global\tools\includes\optional\t_extension_manager_tools.inc"
+ gApplication = "IMPRESS"
+ Call GetUseFiles
+end sub
diff --git a/testautomation/graphics/optional/g_stylist.bas b/testautomation/graphics/optional/g_stylist.bas
new file mode 100644
index 000000000000..50da6610c41a
--- /dev/null
+++ b/testautomation/graphics/optional/g_stylist.bas
@@ -0,0 +1,99 @@
+'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
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* Owner : wolfram.garten@oracle.com
+'*
+'* short description : Graphics Function: Stylist
+'*
+'\*******************************************************************
+
+public glLocale (15*20) as string
+
+sub main
+ PrintLog "------------------------- Stylist Test -------------------"
+ Call hStatusIn ( "Graphics","g_stylist.bas" )
+
+ use "graphics\tools\id_tools.inc"
+ use "graphics\tools\id_tools_2.inc"
+ use "graphics\optional\includes\global\g_stylist.inc"
+ use "graphics\optional\includes\impress\i_stylist.inc"
+
+ if hSetLocaleStrings ( gTesttoolPath + "graphics\tools\locale_1.txt" , glLocale () ) = FALSE then
+ warnlog "Locales file doesn't exist graphics\tools\locale_1.txt"
+ endif
+
+ gApplication = "IMPRESS"
+
+ PrintLog "-------------------------" + gApplication + "-------------------"
+ Call tFormatStylistFlyer
+ Call tFormatStylistDocuments
+ Call tFormatStylistTemplatesUse
+ Call tFormatStylistTemplateCreate
+ if iSprache <> "82" then
+ Call tFormatStylistTemplateSelect
+ Call tFormatStylistTemplateNew
+ else
+ qaerrorlog "#i65490# - Deactivated tFormatStylistTemplateSelect, tFormatStylistTemplateNew due to bug."
+ endif
+ call tiFormatStylist
+ call tFormatStylist
+
+ if iSprache <> "81" then
+ if iSprache <> "82" then
+ Call tFormatStylistBackground
+ else
+ qaerrorlog "#i65534# - Deactivated tFormatStylistBackground due to bug under Korean."
+ endif
+ else
+ qaerrorlog "Deactivated tFormatStylistBackground due to string-name-difficulties."
+ endif
+
+ gApplication = "DRAW"
+ PrintLog "-------------------------" + gApplication + "-------------------"
+
+ Call tFormatStylistFlyer
+ Call tFormatStylistDocuments
+ Call tFormatStylistTemplatesUse
+ ' Call tFormatStylistTemplateCreate
+ if iSprache <> "82" then
+ Call tFormatStylistTemplateSelect
+ Call tFormatStylistTemplateNew
+ else
+ qaerrorlog "#i65490# - Deactivated tFormatStylistTemplateSelect, tFormatStylistTemplateNew due to bug."
+ endif
+ call tiFormatStylist
+ call tFormatStylist
+
+ Call hStatusOut
+end sub
+
+sub LoadIncludeFiles
+ use "global\system\includes\master.inc"
+ use "global\system\includes\gvariabl.inc"
+ gApplication = "IMPRESS"
+ Call GetUseFiles
+end sub
diff --git a/testautomation/graphics/optional/g_tables.bas b/testautomation/graphics/optional/g_tables.bas
new file mode 100644
index 000000000000..dee2e14c67a5
--- /dev/null
+++ b/testautomation/graphics/optional/g_tables.bas
@@ -0,0 +1,65 @@
+'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
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* owner : wolfram.garten@oracle.com
+'*
+'* short description : Testing of impress tables
+'*
+'\***********************************************************************
+
+sub main
+ Printlog "------------------- Impress Tables Test -------------------------"
+ call hStatusIn ("Graphics","g_tables.bas")
+
+ use "graphics\optional\includes\global\g_tables.inc"
+
+ PrintLog "-------------------------" + gApplication + "-------------------"
+
+ call tiInsertTableUsingMenu
+ call tiInsertTableUsingButton
+ call tiInsertTableUsingToolbarbutton
+ call tiTableObjectBar
+ gApplication = "DRAW"
+
+ PrintLog "-------------------------" + gApplication + "-------------------"
+
+ call tiInsertTableUsingMenu
+ call tiInsertTableUsingToolbarbutton
+ call tiTableObjectBar
+
+ call hStatusOut
+
+end sub
+
+'----------------------------------------------
+sub LoadIncludeFiles
+ use "global\system\includes\master.inc"
+ use "global\system\includes\gvariabl.inc"
+ gApplication = "IMPRESS"
+ Call getUseFiles
+end sub
+
diff --git a/testautomation/graphics/optional/g_toolbars.bas b/testautomation/graphics/optional/g_toolbars.bas
new file mode 100644
index 000000000000..b643e02c9e9b
--- /dev/null
+++ b/testautomation/graphics/optional/g_toolbars.bas
@@ -0,0 +1,69 @@
+'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
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* Owner : wolfram.garten@oracle.com
+'*
+'* short description : Graphics Function: Toolbars
+'*
+'\******************************************************************
+
+sub main
+ PrintLog "------------------------- g_toolbars test -------------------------"
+ Call hStatusIn ( "Graphics","g_toolbars.bas")
+
+ use "graphics\tools\id_tools.inc"
+ use "graphics\optional\includes\global\g_toolbars.inc"
+
+
+ PrintLog "-------------------------" + gApplication + "-------------------"
+
+ Call Toolboxen_Rechtecke
+ Call Toolboxen_Kreise
+ Call Toolboxen_3DObjekte
+ Call Toolboxen_Kurven
+ Call Toolboxen_Linien
+ Call tToolsCustomize 'global\required\includes
+
+ gApplication = "DRAW"
+ PrintLog "-------------------------" + gApplication + "-------------------"
+ Call Toolboxen_Rechtecke
+ Call Toolboxen_Kreise
+ Call Toolboxen_3DObjekte
+ Call Toolboxen_Kurven
+ Call Toolboxen_Linien
+ Call tToolsCustomize 'global\required\includes
+
+ Call hStatusOut
+end sub
+
+sub LoadIncludeFiles
+ use "global\system\includes\master.inc"
+ use "global\system\includes\gvariabl.inc"
+ use "global\required\includes\g_customize.inc"
+ Call GetUseFiles
+ gApplication = "IMPRESS"
+end sub
diff --git a/testautomation/graphics/optional/g_tools.bas b/testautomation/graphics/optional/g_tools.bas
new file mode 100644
index 000000000000..4e79a89ca469
--- /dev/null
+++ b/testautomation/graphics/optional/g_tools.bas
@@ -0,0 +1,69 @@
+'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
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* Owner : wolfram.garten@oracle.com
+'*
+'* short description : Graphics Function: Tools
+'*
+'\******************************************************************
+public glLocale (15*20) as string
+
+sub main
+ PrintLog "------------------------- g_tools test -------------------------"
+ Call hStatusIn ( "Graphics","g_tools.bas")
+
+ use "graphics\tools\id_tools.inc"
+ use "graphics\optional\includes\global\g_tools.inc"
+
+ hSetLocaleStrings ( gTesttoolPath + "graphics\tools\locale_1.txt" , glLocale () )
+
+ PrintLog "-------------------------" + gApplication + "-------------------"
+ Call tiToolsThesaurus
+ Call tiToolsThesaurusWithoutText
+ Call tiToolsThesaurusContextMenu
+ Call tiToolsHyphenation1
+ Call tiToolsHyphenation2
+ Call tToolsMacro
+
+ gApplication = "DRAW"
+ PrintLog "-------------------------" + gApplication + "-------------------"
+ Call tiToolsThesaurus
+ Call tiToolsThesaurusWithoutText
+ Call tiToolsThesaurusContextMenu
+ Call tiToolsHyphenation1
+ Call tiToolsHyphenation2
+ Call tToolsMacro
+
+ Call hStatusOut
+end sub
+
+sub LoadIncludeFiles
+ use "global\system\includes\master.inc"
+ use "global\system\includes\gvariabl.inc"
+ Call GetUseFiles
+ gApplication = "IMPRESS"
+end sub
diff --git a/testautomation/graphics/optional/g_zoom.bas b/testautomation/graphics/optional/g_zoom.bas
new file mode 100644
index 000000000000..1b494950ce44
--- /dev/null
+++ b/testautomation/graphics/optional/g_zoom.bas
@@ -0,0 +1,57 @@
+'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
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* Owner : wolfram.garten@oracle.com
+'*
+'* short description : Graphics Function: Zoom
+'*
+'\******************************************************************
+
+public ExtensionString as String
+
+sub main
+ PrintLog "------------------------- g_zoom test -------------------------"
+ Call hStatusIn ( "Graphics","g_zoom.bas")
+
+ use "graphics\optional\includes\global\g_zoom.inc"
+
+ PrintLog "-------------------------" + gApplication + "-------------------"
+ Call tViewZoom
+
+ gApplication = "DRAW"
+ PrintLog "-------------------------" + gApplication + "-------------------"
+ Call tViewZoom
+
+ Call hStatusOut
+end sub
+
+sub LoadIncludeFiles
+ use "global\system\includes\master.inc"
+ use "global\system\includes\gvariabl.inc"
+ gApplication = "IMPRESS"
+ Call GetUseFiles
+end sub
diff --git a/testautomation/graphics/optional/gallery.bas b/testautomation/graphics/optional/gallery.bas
new file mode 100644
index 000000000000..9b81954f8902
--- /dev/null
+++ b/testautomation/graphics/optional/gallery.bas
@@ -0,0 +1,65 @@
+'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
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* owner : wolfram.garten@oracle.com
+'*
+'* short description : (quick test) Checking functionality and all Gallery themes
+'*
+'\****************************************************************
+
+global iSaveSetting as Integer
+
+sub main
+ call hStatusIn ( "Graphics", "gallery.bas")
+
+ use "graphics\tools\id_tools_2.inc"
+ use "graphics\optional\includes\global\gallery.inc"
+
+ printlog "------------------------ F u n c t i o n a l i t y ----------------------"
+ call tGallery_DialogTest ' open gallery, pin - unpin, dock - undock, close gallery
+ call tGallery_ActivateAndUpdateAllThemes ' activate all gallery-themes and update this theme
+ call tGallery_CheckNames ' check the names for all themes depends on language
+ call tGallery_CheckContextMenuForGalleryThemes ' test the context-menu on themes-window
+ call tGallery_GalleryView_Preview ' preview-feature in gallery-beamer-window
+ call tGallery_GalleryView_Insert ' insert galler-objects in all applications
+ call tGallery_GalleryView_Delete ' delete gallery-objects out of beamer-window
+ call tGallery_CreateAndWorkWithANewGalleryThemes ' create a new theme, add graphics and work with it
+ call tGallery_Quick_check ' take 2 graphics and chek if they are
+
+ call hStatusOut
+end sub
+
+'-------------------------------------------------------------------------
+
+sub LoadIncludeFiles
+ use "global\system\includes\master.inc"
+ use "global\system\includes\gvariabl.inc"
+ gApplication = "WRITER"
+ call GetUseFiles
+end sub
+
+'-------------------------------------------------------------------------
diff --git a/testautomation/graphics/optional/gallery2.bas b/testautomation/graphics/optional/gallery2.bas
new file mode 100644
index 000000000000..d467b0a74876
--- /dev/null
+++ b/testautomation/graphics/optional/gallery2.bas
@@ -0,0 +1,63 @@
+'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
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* owner : wolfram.garten@oracle.com
+'*
+'* short description : (long duration! > 6h) Testing all Gallery items
+'*
+'\***********************************************************************
+
+dim iSaveSetting as Integer
+sub main
+ call hStatusIn ( "Graphics", "gallery2.bas" )
+
+ use "graphics\tools\id_tools.inc"
+ use "graphics\tools\id_tools_2.inc"
+ use "graphics\optional\includes\global\gallery2.inc"
+
+ printlog "------------------------------- T h e m e s -----------------------------"
+ call tSettingsToCM
+ call tCheckAllGalleryGraphicFiles
+ call tLoad100GalleryGraphicFiles
+ call tInsertGalleryObjects
+ call tResetSettings
+
+ call hStatusOut
+end sub
+
+'-------------------------------------------------------------------------
+
+sub LoadIncludeFiles
+ use "global\system\includes\master.inc"
+ use "global\system\includes\gvariabl.inc"
+ gApplication = "WRITER"
+ call GetUseFiles
+end sub
+
+'-------------------------------------------------------------------------
+
+
diff --git a/testautomation/graphics/optional/i_animation.bas b/testautomation/graphics/optional/i_animation.bas
new file mode 100644
index 000000000000..85503fc790c1
--- /dev/null
+++ b/testautomation/graphics/optional/i_animation.bas
@@ -0,0 +1,52 @@
+'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
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* Owner : wolfram.garten@oracle.com
+'*
+'* short description : Impress Function: Animation
+'*
+'\******************************************************************
+
+sub main
+ PrintLog "------------------------- i_animation test -------------------------"
+ Call hStatusIn ( "Graphics","i_animation.bas")
+
+ use "graphics\tools\id_tools.inc"
+ use "graphics\tools\id_tools_2.inc"
+ use "graphics\optional\includes\impress\i_animation.inc"
+
+ Call tExtrasAnimation
+
+ Call hStatusOut
+end sub
+
+sub LoadIncludeFiles
+ use "global\system\includes\master.inc"
+ use "global\system\includes\gvariabl.inc"
+ gApplication = "IMPRESS"
+ Call GetUseFiles
+end sub
diff --git a/testautomation/graphics/optional/i_headerfooter.bas b/testautomation/graphics/optional/i_headerfooter.bas
new file mode 100644
index 000000000000..e050b914ca9e
--- /dev/null
+++ b/testautomation/graphics/optional/i_headerfooter.bas
@@ -0,0 +1,54 @@
+'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
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* Owner : wolfram.garten@oracle.com
+'*
+'* short description : Graphics Function: Header and Footer
+'*
+'\******************************************************************
+
+sub main
+ PrintLog "------------------------- g_accessability test -------------------------"
+ Call hStatusIn ( "Graphics","i_headerfooter.bas")
+
+ use "graphics\tools\id_tools.inc"
+ use "graphics\optional\includes\impress\i_headerfooter.inc"
+
+ PrintLog "-------------------------" + gApplication + "-------------------"
+
+ call tiHeaderFooterSlide
+ call tiHeaderFooterNotesHandout
+
+ Call hStatusOut
+end sub
+
+sub LoadIncludeFiles
+ use "global\system\includes\master.inc"
+ use "global\system\includes\gvariabl.inc"
+ gApplication = "IMPRESS"
+ Call GetUseFiles
+end sub
diff --git a/testautomation/graphics/optional/i_only_updt_1.bas b/testautomation/graphics/optional/i_only_updt_1.bas
new file mode 100644
index 000000000000..fd1e4ae68215
--- /dev/null
+++ b/testautomation/graphics/optional/i_only_updt_1.bas
@@ -0,0 +1,77 @@
+'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
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* Owner : wolfram.garten@oracle.com
+'*
+'* short description : Impress Only Required Test (Part 1)
+'*
+'\*****************************************************************
+
+public glLocale (15*20) as string
+global ExtensionString as String
+
+sub main
+ Printlog " -------------------- Impress-Only-Required-Test -----------------------------"
+ Call hStatusIn ( "Graphics","i_only_updt_1.bas")
+
+ use "graphics\tools\id_tools.inc"
+ use "graphics\tools\id_tools_2.inc"
+ use "graphics\required\includes\global\id_002.inc" 'Edit
+ use "graphics\required\includes\global\id_003.inc" 'View
+ use "graphics\required\includes\global\id_004.inc" 'Insert
+ use "graphics\required\includes\global\id_005.inc" 'Format
+ use "graphics\required\includes\global\id_006.inc" 'Tools
+ use "graphics\required\includes\impress\im_003_.inc" 'Ansicht
+ use "graphics\required\includes\impress\im_004_.inc" 'Einfuegen
+
+ if hSetLocaleStrings ( gTesttoolPath + "graphics\tools\locale_1.txt" , glLocale () ) = FALSE then
+ qaErrorLog "Locales doesn't exist in file : "+gTesttoolPath + "graphics\tools\locale_1.txt" ' this is needed for spellchecking.
+ endif
+
+ call id_002
+ call im_003_
+ call id_003
+ call im_004_
+ call id_004
+ call id_005
+ call id_006
+
+ Call hStatusOut
+end sub
+
+'----------------------------------------------
+sub LoadIncludeFiles
+ use "global\system\includes\master.inc"
+ use "global\system\includes\gvariabl.inc"
+ use "global\required\includes\g_option.inc"
+ use "global\required\includes\g_customize.inc"
+ use "global\required\includes\g_001.inc"
+ use "global\required\includes\g_009.inc"
+ gApplication = "IMPRESS"
+ Call GetUseFiles()
+end sub
+
diff --git a/testautomation/graphics/optional/i_only_updt_2.bas b/testautomation/graphics/optional/i_only_updt_2.bas
new file mode 100644
index 000000000000..7b35dbab5740
--- /dev/null
+++ b/testautomation/graphics/optional/i_only_updt_2.bas
@@ -0,0 +1,76 @@
+'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
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* Owner : wolfram.garten@oracle.com
+'*
+'* short description : Impress Only Required (Test Part 2)
+'*
+'\*****************************************************************
+
+public glLocale (15*20) as string
+global ExtensionString as String
+
+sub main
+ Printlog " -------------------- Impress-Only-Required-Test -----------------------------"
+ Call hStatusIn ( "Graphics","i_only_updt_2.bas")
+
+ use "graphics\tools\id_tools.inc"
+ use "graphics\tools\id_tools_2.inc"
+ use "graphics\required\includes\global\id_001.inc" 'File
+ use "graphics\required\includes\global\id_007.inc" 'Kontext
+ use "graphics\required\includes\global\id_008.inc" 'Window
+ use "graphics\required\includes\global\id_009.inc" 'Help
+ use "graphics\required\includes\global\id_011.inc" 'Toolbars
+ use "graphics\required\includes\impress\im_007_.inc" 'Praesentation
+
+ if hSetLocaleStrings ( gTesttoolPath + "graphics\tools\locale_1.txt" , glLocale () ) = FALSE then
+ qaErrorLog "Locales doesn't exist in file : "+gTesttoolPath + "graphics\tools\locale_1.txt" ' this is needed for spellchecking.
+ endif
+
+ call id_011
+ Call tFileExportAsPDF
+ Call tExportAsPDFButton
+ Call im_007_
+ call id_008
+ call id_009
+ call id_007
+
+ Call hStatusOut
+end sub
+
+'----------------------------------------------
+sub LoadIncludeFiles
+ use "global\system\includes\master.inc"
+ use "global\system\includes\gvariabl.inc"
+ use "global\required\includes\g_option.inc"
+ use "global\required\includes\g_customize.inc"
+ use "global\required\includes\g_001.inc"
+ use "global\required\includes\g_009.inc"
+ gApplication = "IMPRESS"
+ Call GetUseFiles()
+end sub
+
diff --git a/testautomation/graphics/optional/i_pengine.bas b/testautomation/graphics/optional/i_pengine.bas
new file mode 100644
index 000000000000..5ddefe26ca94
--- /dev/null
+++ b/testautomation/graphics/optional/i_pengine.bas
@@ -0,0 +1,78 @@
+'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
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+' *
+' * Owner : wolfram.garten@oracle.com
+' *
+' * short description : Presentation-Engine Optional Test
+' *
+' \******************************************************************
+
+global glLocale (15*20) as string
+
+sub main
+ Call hStatusIn ( "Graphics","i_pengine.bas" )
+
+ use "graphics\tools\id_tools.inc"
+ use "graphics\tools\id_tools_2.inc"
+ use "graphics\optional\includes\impress\i_pengine1.inc"
+ use "graphics\optional\includes\impress\i_pengine2.inc"
+ use "graphics\optional\includes\impress\options.inc"
+
+
+ PrintLog "------------------------- " + gApplication + " Presentation-Engine-Optional Test -------------------"
+
+ Call tiPengineAllShapesAndEffects
+ Call tiPengine2ObjectsGetsEffects
+
+ Call tiPengineTabEntrance
+ Call tiPengineTabpageEntrance2
+
+ if bAsianLan <> TRUE then
+ Call tiPengineTabEmphasis
+ Call tiPengineTabPageEmphasis2
+ Call tiPengineTabExit
+ Call tiPengineTabPageExit2
+ Call tiPengineTabMotionPaths
+ Call tiPengineTabPageMotionPaths2
+ Call tiPengineAnimationEffectsOptions
+ else
+ qaerrorlog "Deactivated tiPengineAnimationEffectsSlideshow and tiPengineAnimationEffectsOptions, due to strange results under Asian language."
+ end if
+
+ Call tiPengineAnimationEffectsPreview
+ Call tiPengineSlideTransition
+
+ Call hStatusOut
+end sub
+
+sub LoadIncludeFiles
+ use "global\system\includes\master.inc"
+ use "global\system\includes\gvariabl.inc"
+ use "global\tools\includes\optional\t_ui_filters.inc"
+ gApplication = "IMPRESS"
+ Call GetUseFiles
+end sub
diff --git a/testautomation/graphics/optional/i_saveloadlayout.bas b/testautomation/graphics/optional/i_saveloadlayout.bas
new file mode 100644
index 000000000000..137007da7c8f
--- /dev/null
+++ b/testautomation/graphics/optional/i_saveloadlayout.bas
@@ -0,0 +1,56 @@
+'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
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* Owner : wolfram.garten@oracle.com
+'*
+'* short description : Save & Load testing of Layout -templates.
+'*
+'\******************************************************************
+sub main
+ PrintLog "------------------------- i_saveloadlayout test -------------------------"
+ Call hStatusIn ( "Graphics","i_saveloadlayout.bas")
+
+ use "graphics\tools\id_tools.inc"
+ use "graphics\tools\id_tools_2.inc"
+ use "graphics\optional\includes\impress\i_saveloadlayout.inc"
+
+ PrintLog "-------------------------" + gApplication + "-------------------"
+ Call tSaveLoadLayoutEmpty
+ Call tSaveLoadLayoutText
+ Call tSaveLoadLayoutContent
+
+ Call hStatusOut
+end sub
+
+sub LoadIncludeFiles
+ use "global\system\includes\master.inc"
+ use "global\system\includes\gvariabl.inc"
+ Call GetUseFiles
+ gApplication = "IMPRESS"
+end sub
+
+
diff --git a/testautomation/graphics/optional/i_shape.bas b/testautomation/graphics/optional/i_shape.bas
new file mode 100644
index 000000000000..0ebb3c1e4864
--- /dev/null
+++ b/testautomation/graphics/optional/i_shape.bas
@@ -0,0 +1,56 @@
+'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
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* owner : wolfram.garten@oracle.com
+'*
+'* short description : Import presentations with shapes in .ppt format
+'*
+'\***********************************************************************
+
+sub main
+ call hStatusIn ("Graphics","i_shape.bas")
+
+ use "graphics\optional\includes\impress\i_shape.inc"
+ use "graphics\tools\id_tools.inc"
+
+ call t_import_shapes
+
+ gApplication = "DRAW"
+
+ call t_import_shapes
+
+ call hStatusOut
+end sub
+
+'----------------------------------------------
+sub LoadIncludeFiles
+ use "global\system\includes\master.inc"
+ use "global\system\includes\gvariabl.inc"
+ gApplication = "IMPRESS"
+ Call getUseFiles
+end sub
+
diff --git a/testautomation/graphics/optional/i_slidecopy.bas b/testautomation/graphics/optional/i_slidecopy.bas
new file mode 100644
index 000000000000..c780904e542d
--- /dev/null
+++ b/testautomation/graphics/optional/i_slidecopy.bas
@@ -0,0 +1,62 @@
+'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
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* Owner : wolfram.garten@oracle.com
+'*
+'* short description : Graphics Function: Slidecopy-behaviour
+'*
+'\******************************************************************
+
+public glLocale (15*20) as string
+
+sub main
+ PrintLog "------------------------- g_SlideCopy test -------------------------"
+ Call hStatusIn ( "Graphics","i_slidecopy.bas")
+
+ use "graphics\tools\id_tools.inc"
+ use "graphics\tools\id_tools_2.inc"
+ use "graphics\optional\includes\impress\i_slidecopy.inc"
+
+ PrintLog "-------------------------" + gApplication + "-------------------"
+ if gOOo = false then
+ call tiSlideCopyNewPresentation
+ else
+ qaErrorLog "#i76226# - The test tiSlideCopyNewPresentation was outcommented since a button does not remain pressed in OpenOffice.org"
+ endif
+ call tiSlideCopyDuplicate
+ call tiSlideCopyInSlideSorter
+ call tiSlideCopyPasteSpecial
+
+ Call hStatusOut
+end sub
+
+sub LoadIncludeFiles
+ use "global\system\includes\master.inc"
+ use "global\system\includes\gvariabl.inc"
+ gApplication = "IMPRESS"
+ Call GetUseFiles
+end sub
diff --git a/testautomation/graphics/optional/i_slideshow.bas b/testautomation/graphics/optional/i_slideshow.bas
new file mode 100644
index 000000000000..8a9062c87c05
--- /dev/null
+++ b/testautomation/graphics/optional/i_slideshow.bas
@@ -0,0 +1,92 @@
+'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
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* Owner : wolfram.garten@oracle.com
+'*
+'* short description : Graphics Function: Slideshow
+'*
+'\******************************************************************
+
+public glLocale (15*20) as string
+global S1 as string
+global S2 as string
+global S3 as string
+global S4 as string
+
+sub main
+ PrintLog "------------------------- slideshow test -------------------------"
+ Call hStatusIn ( "Graphics","i_slideshow.bas")
+
+ use "graphics\tools\id_tools.inc"
+ use "graphics\tools\id_tools_2.inc"
+ use "graphics\optional\includes\impress\i_slideshow.inc"
+ use "graphics\optional\includes\impress\i_slideshow2.inc"
+ use "graphics\optional\includes\impress\i_slideshow3.inc"
+
+ hSetLocaleStrings ( gTesttoolPath + "graphics\tools\locale_1.txt" , glLocale () )
+ if glLocale (2) = "" then
+ warnlog "Add 'slide' to FILE /input/impress/locale_1.txt (take string from below)!!!"
+ endif
+
+ '/// LOCALE Slide - 2 ///'
+ S1 = glLocale (2) + " 1"
+ S2 = glLocale (2) + " 2"
+ S3 = glLocale (2) + " 3"
+ S4 = glLocale (2) + " 4"
+
+ Call tSlideShowSlideTransition
+ Call tPraesentationAnimation
+ Call tAendernObjektBenennen
+ Call tSlideShowRehearseTimings
+
+ Call tSlideShowShowHideSlide
+ Call tExtrasInteraktion
+ Call tExtrasIndividuellePraesentation
+ Call tExtrasPraesentationseinstellungen
+ Call tSlideShowSlideShowSettings
+ Call tSlideShowSlideShow
+ Call tSlideShowInteraction
+ Call tSlideShowCustomSlideShow
+ Call tSlideshowBackgroundAllSlides
+ Call tSlideshowBackgroundSelectedSlide
+ Call tPraesentationEffekt
+ Call tExtrasEffekt
+ Call tSlideshowContextMenuOneSlide
+ Call tSlideshowContextMenuMoreSlides
+ Call tiMousePointerHides
+ Call tSlideShowRehearseTimings
+
+ Call hStatusOut
+end sub
+
+sub LoadIncludeFiles
+ use "global\system\includes\master.inc"
+ use "global\system\includes\gvariabl.inc"
+ use "global\tools\includes\optional\t_ui_filters.inc"
+ gApplication = "IMPRESS"
+ Call GetUseFiles
+end sub
diff --git a/testautomation/graphics/optional/i_us_presentation.bas b/testautomation/graphics/optional/i_us_presentation.bas
new file mode 100644
index 000000000000..fc1196fdb182
--- /dev/null
+++ b/testautomation/graphics/optional/i_us_presentation.bas
@@ -0,0 +1,64 @@
+'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
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* Owner : wolfram.garten@oracle.com
+'*
+'* short description : Graphics User-scenario-test: 2 Users creates Presentations.
+'*
+'\******************************************************************
+public i as integer
+
+sub main
+ Call hStatusIn ( "Graphics","i_us_presentation.bas")
+
+ use "graphics\tools\id_tools.inc"
+ use "graphics\tools\id_tools_2.inc"
+ use "graphics\optional\includes\impress\i_us_present.inc"
+ use "graphics\optional\includes\impress\i_us2_present.inc"
+
+ PrintLog "------------ Graphics User-scenario-test: PowerUser creates a Presentation ------------"
+
+ Call i_us_presentation1 ' User-Scenario: Pro.
+ Call i_us_presentation2
+ Call i_us_presentation3
+ Call i_us_presentation4
+ Call i_us_presentation5
+ Call i_us_presentation6
+ Call i_us_presentation7
+
+ Call i_us2_pres1 ' User-Scenario: Beginner.
+ Call i_us2_pres2
+
+ Call hStatusOut
+end sub
+
+sub LoadIncludeFiles
+ use "global\system\includes\master.inc"
+ use "global\system\includes\gvariabl.inc"
+ gApplication = "IMPRESS"
+ Call GetUseFiles
+end sub
diff --git a/testautomation/graphics/optional/i_view.bas b/testautomation/graphics/optional/i_view.bas
new file mode 100644
index 000000000000..7dacea82d1b2
--- /dev/null
+++ b/testautomation/graphics/optional/i_view.bas
@@ -0,0 +1,60 @@
+'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
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* Owner : wolfram.garten@oracle.com
+'*
+'* short description : Impress Function: View
+'*
+'\******************************************************************
+
+public glLocale (15*20) as string
+
+sub main
+ PrintLog "------------------------- i_view test -------------------------"
+ Call hStatusIn ( "Graphics","i_view.bas")
+
+ use "graphics\tools\id_tools.inc"
+ use "graphics\tools\id_tools_2.inc"
+ use "graphics\optional\includes\impress\i_view.inc"
+
+ hSetLocaleStrings ( gTesttoolPath + "graphics\tools\locale_1.txt" , glLocale () )
+
+ Call tAnsichtHintergrundNotizen
+ Call tViewWorkspaceHandoutView
+ Call tViewWorkspaceOutlineView
+ Call tViewWorkspaceDrawingView
+ Call tAnsichtEbene
+
+ Call hStatusOut
+end sub
+
+sub LoadIncludeFiles
+ use "global\system\includes\master.inc"
+ use "global\system\includes\gvariabl.inc"
+ gApplication = "IMPRESS"
+ Call GetUseFiles
+end sub
diff --git a/testautomation/graphics/optional/includes/draw/d_002_.inc b/testautomation/graphics/optional/includes/draw/d_002_.inc
new file mode 100644
index 000000000000..9b2f267a0729
--- /dev/null
+++ b/testautomation/graphics/optional/includes/draw/d_002_.inc
@@ -0,0 +1,109 @@
+'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
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* Owner : wolfram.garten@oracle.com
+'*
+'* short description :
+'*
+'\*****************************************************************
+
+
+testcase tdEditCrossFading
+
+ printlog " open application "
+ Call hNewDocument
+ printlog " create 2 rectangles "
+ gMouseClick 50,50
+ Call hRechteckErstellen ( 10, 10, 20, 40 )
+ Call hRechteckErstellen ( 30, 30, 50, 60 )
+ printlog " Edit-YSelect All "
+ EditSelectAll
+ try
+ printlog " Edit->Cross-fading "
+ EditCrossFading
+ catch
+ warnlog "EditCrossFading not accessible :-("
+ endcatch
+
+ Kontext "Ueberblenden"
+ Call DialogTest ( Ueberblenden )
+ printlog " Change : 'Increments'; 1 more, 1 less "
+ Schritte.More
+ Schritte.Less
+ printlog " Change: Cross-fading attributes; uncheck, check "
+ Attributierung.uncheck
+ Attributierung.check
+ printlog " Change: same orientation; uncheck, check "
+ GleicheOrientierung.Uncheck
+ GleicheOrientierung.Check
+ printlog " cancel dialog 'Cross-fading'; uncheck, check "
+ Ueberblenden.Cancel
+ printlog " close application "
+ Call hCloseDocument
+
+endcase 'tdEditCrossFading
+'------------------------------------------------------------------------------
+testcase tdEditLayer
+
+ printlog " open application "
+ Call hNewDocument
+ printlog " View->Layer "
+ ViewLayer
+ printlog " Edit->Layer->Insert "
+ InsertLayer
+ Kontext "EbeneEinfuegenDlg"
+ Call DialogTest ( EbeneEinfuegenDlg )
+ printlog " Change: Set another name for the layer "
+ EbenenName.SetText "SomeThing"
+ printlog " Change: Visible; uncheck, check "
+ Sichtbar.UnCheck
+ Sichtbar.Check
+ printlog " Change: Printable; uncheck, check "
+ Druckbar.UnCheck
+ Druckbar.Check
+ printlog " Change: Locked; check, uncheck "
+ Gesperrt.Check
+ Gesperrt.UnCheck
+ EbeneEinfuegenDlg.OK
+ printlog " (Edit->Layer->Modify is tested in format-menu-test) "
+ printlog " Edit->Layer->Rename "
+ EditLayerRename
+ kontext "DocumentDrawImpress"
+ LayerTabBar.TypeKeys "Apply!!<Return>" , true
+ printlog " Edit->Layer->Delete "
+ EditDeleteLayer
+ printlog " Messagebox: really delete? YES "
+ Kontext "Messagebox"
+ Messagebox.Yes
+ sleep (2)
+ printlog " View->Layer "
+ ViewLayer
+ printlog " close application "
+ Call hCloseDocument
+
+endcase 'tdEditLayer
+'------------------------------------------------------------------------------
diff --git a/testautomation/graphics/optional/includes/draw/d_003_.inc b/testautomation/graphics/optional/includes/draw/d_003_.inc
new file mode 100644
index 000000000000..744461061559
--- /dev/null
+++ b/testautomation/graphics/optional/includes/draw/d_003_.inc
@@ -0,0 +1,82 @@
+'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
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* Owner : wolfram.garten@oracle.com
+'*
+'* short description :
+'*
+'\*****************************************************************
+
+testcase tdViewPagePane
+
+ printlog " open application "
+ Call hNewDocument
+ sleep 1
+ kontext "pagepane"
+ if (NOT pagepane.exists) then
+ qaerrorlog "Pages Panel not visible on opening application. Opening now."
+ ViewPagePane
+ endif
+ kontext "pagepane"
+ sleep (2)
+ try
+ printlog " View->Page Pane "
+ ViewPagePane
+ sleep (2)
+ if (pagepane.exists) then
+ warnlog "View->Page Pane failed."
+ ViewPagePane
+ endif
+ catch
+ warnlog "View->Page Pane couldn't get executed"
+ endcatch
+ sleep 1
+ if (NOT pagepane.exists) then
+ ViewPagePane
+ sleep (1)
+ endif
+ printlog " close application "
+ Call hCloseDocument
+
+endcase 'tdViewPagePane
+
+'-------------------------------------------------------------------------------
+testcase tdViewSlide
+
+ printlog " open application "
+ hNewDocument
+ kontext "DocumentDrawImpress" ' special case :-)
+ printlog " click the button on the bottom: 'Master View' (because it is not accessible via the menu :-() "
+ ViewMasterPage
+ sleep 1
+ printlog " View->Slide "
+ ViewPagePane
+ Sleep 1
+ printlog " close application "
+ Call hCloseDocument
+
+endcase 'tdViewSlide
diff --git a/testautomation/graphics/optional/includes/draw/d_005_.inc b/testautomation/graphics/optional/includes/draw/d_005_.inc
new file mode 100644
index 000000000000..6c3e7b2484df
--- /dev/null
+++ b/testautomation/graphics/optional/includes/draw/d_005_.inc
@@ -0,0 +1,51 @@
+'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
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* Owner : wolfram.garten@oracle.com
+'*
+'* short description :
+'*
+'\*****************************************************************
+
+testcase tiFormatLayer
+
+ printlog " open application "
+ Call hNewDocument
+ printlog " View->Layer "
+ ViewLayer
+ printlog " Format->Layer "
+ FormatLayer
+ Kontext "EbeneAendernDlg"
+ DialogTest ( EbeneAendernDlg )
+ printlog " cancel dialog 'Modify Layer' "
+ EbeneAendernDlg.Cancel
+ printlog " View->Layer "
+ ViewLayer
+ printlog " close application "
+ Call hCloseDocument
+
+endcase 'tiFormatLayer
diff --git a/testautomation/graphics/optional/includes/draw/d_007.inc b/testautomation/graphics/optional/includes/draw/d_007.inc
new file mode 100644
index 000000000000..89fef373f161
--- /dev/null
+++ b/testautomation/graphics/optional/includes/draw/d_007.inc
@@ -0,0 +1,47 @@
+'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
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* Owner : wolfram.garten@oracle.com
+'*
+'* short description :
+'*
+'\*****************************************************************
+
+testcase tdModifyRotate
+
+ printlog " open application "
+ Call hNewDocument
+ printlog " create a rectangle "
+ Call hRechteckErstellen 20,20,40,40
+ sleep 1
+ printlog " Modify->Rotate "
+ ModifyRotate
+ sleep 1
+ printlog " close application "
+ Call hCloseDocument
+
+endcase 'tdModifyRotate
diff --git a/testautomation/graphics/optional/includes/global/export_graphic.inc b/testautomation/graphics/optional/includes/global/export_graphic.inc
new file mode 100644
index 000000000000..3fe39632521c
--- /dev/null
+++ b/testautomation/graphics/optional/includes/global/export_graphic.inc
@@ -0,0 +1,553 @@
+'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
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/******************************************************************************
+'*
+'* Owner : wolfram.garten@oracle.com
+'*
+'* short description : Graphics Export A-tests
+'*
+'\******************************************************************************
+
+testcase tEPS
+ dim x as integer
+ dim i as integer
+ const sFilter = "EPS - Encapsulated PostScript (.eps)"
+ const sExt = ".eps"
+
+ printlog "open the document"
+ hFileOpen( gTesttoolPath + "graphics\required\input\graphicexport." + ExtensionString )
+ if ( hCallExport ( OutputGrafikTBO , sFilter ) ) then
+ Kontext "EPSOptionen"
+ if ( EPSOptionen.Exists( 2 ) ) then
+ printlog "check if all properties have the right count, and depend on each other"
+ ' they do not affect annything, i can check (TBO)
+ ' VorschauTIF.Check
+ ' InterchangeEPSI.Check
+ Level1.Check
+ if Farbe.IsEnabled then warnlog " :-("
+ if Graustufen.IsEnabled then warnlog " :-("
+ if LZWKodierung.IsEnabled then warnlog " :-("
+ if Keine.IsEnabled then warnlog " :-("
+ ' if (TextEinstellungen.IsEnabled <> TRUE) then warnlog " :-("
+ Level2.Check
+ if (Farbe.IsEnabled <> TRUE) then warnlog " :-("
+ if (Graustufen.IsEnabled <> TRUE) then warnlog " :-("
+ if (LZWKodierung.IsEnabled <> TRUE) then warnlog " :-("
+ if (Keine.IsEnabled <> TRUE) then warnlog " :-("
+ ' if (TextEinstellungen.IsEnabled <> TRUE) then warnlog " :-("
+ printlog "'Color Resolution' listbox contains eight items"
+ ' x = TextEinstellungen.GetItemCount
+ ' if x <> 2 then warnlog "'TextEinstellungen' Count is wrong; should:2, is:" + x
+ ' for i = 1 to x
+ ' TextEinstellungen.Select i
+ ' sleep 1
+ ' Printlog " - " + i + ": '" +TextEinstellungen.GetSelText + "'"
+ ' next i
+ printlog "leave dialog with cancel -> there has to be no file created!"
+ hCloseDialog( EPSOptionen, "cancel" )
+ if ( FileExists( OutputGrafikTBO+sExt ) ) then ' inspired by bug #99932 Graphic is exported though cancel is pressed
+ warnlog "Dialog was canceled, but file got saved, too :-( - i35177"
+ endif
+ else
+ warnlog( "No export options dialog was displayed" )
+ end if
+ Kontext "Active"
+ if Active.Exists(2) then
+ Warnlog "'" + sFilter + "' has a problem"
+ Active.OK
+ end if
+ end if
+ printlog( "Save the file" )
+ if ( hCallExport( OutputGrafikTBO, sFilter ) ) then
+
+ Kontext "EPSOptionen"
+ if ( EPSOptionen.Exists( 2 ) ) then
+ printlog "TextEinstellungen.select 2"
+ hCloseDialog( EPSOptionen, "ok" )
+ else
+ warnlog( "No export options dialog was displayed" )
+ endif
+ printlog( "Close file and re-insert graphics into new document" )
+ if ( lcase( gPlatform ) <> "osx" ) then
+ hInsertGraphicsToNewFile( OutputGrafikTBO + sExt ) ' local helper function, see bottom of this file
+ else
+ qaErrorLog "#i100253# crash on MacOS X 10.4"
+ endif
+ endif
+ call hCloseDocument
+endcase 'tEPS
+'-------------------------------------------------------------------------
+testcase tPCT
+
+ dim x as integer
+ dim i as integer
+ dim iWaitIndex as integer
+ dim bTemp as boolean
+ dim sX as string
+ dim sY as string
+ dim sx1 as string
+ dim sX2 as string
+ dim sY2 as string
+ dim sDocument as string
+ dim sOutputFile as string
+
+ const FILE_WRITE_TIMEOUT = 200 ' seconds
+
+ const sFilter = "PCT - Mac Pict (.pct;.pict)"
+ const sExt = ".pct"
+
+ printlog "open the document"
+ sDocument = convertpath( gTesttoolPath + "graphics\required\input\graphicexport." + ExtensionString )
+ hFileOpen( sDocument )
+
+ if ( hCallExport( OutputGrafikTBO , sFilter ) ) then
+
+ Kontext "PICTOptionen"
+ printlog( "Export options dialog" )
+ if ( PICTOptionen.Exists( 2 ) ) then
+
+ printlog "check if all properties have the right count, and depend on each other"
+ Original.Check
+ if Breite.IsEnabled then warnlog " :-("
+ if Hoehe.IsEnabled then warnlog " :-("
+ Groesse.Check
+ Breite.More
+ Hoehe.Less
+
+ printlog "leave dialog with cancel -> there has to be no file created!"
+ hCloseDialog( PICTOptionen, "cancel" )
+
+ if ( FileExists( OutputGrafikTBO + sExt ) ) then
+ warnlog( "#i35177# - dialog <PictOptions> canceled, still the file was saved" )
+ endif
+ else
+ warnlog( "No export options dialog was displayed" )
+ end if
+
+ Kontext "Active"
+ if Active.Exists(2) then
+ Warnlog " '" + sFilter + "' has a problem"
+ Active.OK
+ end if
+
+ end if
+
+ printlog " now save it realy and load the file afterwards"
+ if ( hCallExport( OutputGrafikTBO, sFilter ) ) then
+
+ Kontext "PICTOptionen"
+ printlog( "Export options dialog" )
+ if ( PICTOptionen.Exists( 2 ) ) then
+ Groesse.Check
+ Breite.Less
+ Hoehe.More
+ hCloseDialog( PICTOptionen, "ok" )
+ else
+ warnlog( "No export options dialog was displayed" )
+ endif
+
+ sOutputFile = OutputGrafikTBO+sExt
+
+ if ( hWaitForOutputFile( sOutputFile ) ) then
+
+ printlog( "Close file and re-insert graphics into new document" )
+ hInsertGraphicsToNewFile( sOutputFile ) ' local helper function, see bottom of this file
+ else
+ warnlog( "File was not saved: " & sOutputFile )
+ endif
+
+ endif
+
+ hFileReOpen( sDocument )
+
+ printlog "check if the document is writable"
+ if ( not fIsDocumentWritable ) then
+ printlog( "Document is write protected, changing state" )
+ if ( not fMakeDocumentWritable ) then
+ warnlog "The document can't be make writeable. Test stopped."
+ goto endsub
+ endif
+ endif
+
+ hTypeKeys ("<escape><tab>")
+ fGetSizeXY sx1, sY, TRUE
+
+ if ( hCallExport( OutputGrafikTBO + "1", sFilter, TRUE ) ) then
+
+ Kontext "PICTOptionen"
+ printlog( "Export options dialog" )
+ if ( PICTOptionen.Exists( 2 ) ) then
+ Original.Check
+ hCloseDialog( PICTOptionen, "ok" )
+ else
+ warnlog( "No export options dialog was displayed" )
+ endif
+
+ sOutputFile = OutputGrafikTBO + "1" + sExt
+ if ( hWaitForOutputFile( sOutputFile ) ) then
+ printlog( "Close file and re-insert graphics into new document" )
+ hInsertGraphicsToNewFile( sOutputFile ) ' local helper function, see bottom of this file
+ else
+ warnlog( "File was not saved: " & sOutputFile )
+ endif
+
+ bTemp = fGetSizeXY( sx1, sY, bTemp )
+ if (bTemp = FALSE) then
+ warnlog "Selected original size NOT OK :-("
+ endif
+ endif
+
+ hFileReOpen( "" )
+ hRechteckErstellen ( 10, 10, 30, 40 )
+
+ if ( hCallExport( OutputGrafikTBO + "2" , sFilter, TRUE ) ) then
+
+ Kontext "PICTOptionen"
+ printlog( "Export options dialog" )
+ if ( PICTOptionen.Exists( 2 ) ) then
+ Groesse.Check
+ Breite.SetText "9"
+ Hoehe.SetText "9"
+ Groesse.Check
+
+ printlog "Check 'Size' one more time to make the change go through"
+ sx1 = Breite.GetText
+ sY = Hoehe.GetText
+ hCloseDialog( PICTOptionen, "ok" )
+ else
+ warnlog( "No export options dialog was displayed" )
+ endif
+
+ sOutputFile = OutputGrafikTBO + "2" + sExt
+
+ if ( not hWaitForOutputFile( sOutputFile ) ) then
+ warnlog( "File was not saved: " & sOutputFile )
+ endif
+
+ printlog( "Reload file if it exists. Warn if not" )
+ hFileReOpen( sOutputFile )
+
+ kontext "DocumentDraw"
+ DocumentDraw.TypeKeys ("<escape><tab>")
+ ContextOriginalSize
+ bTemp = fGetSizeXY( sx1, sY, bTemp )
+ if ( not bTemp ) then warnlog "Selected original size NOT OK :-("
+ endif
+
+ if ( hCallExport( OutputGrafikTBO + "3", sFilter, TRUE ) ) then
+
+ Kontext "PICTOptionen"
+ printlog( "Export options dialog" )
+ if ( PICTOptionen.Exists( 2 ) ) then
+ Groesse.Check
+ sX2 = Breite.GetText
+ if (LiberalMeasurement(sx1, sX2)) <> TRUE then
+ if (val(str(StrToDouble(sx1)+5)) >= StrToDouble(sX2) ) AND (val(str(StrToDouble ( sx1 )-5)) <= StrToDouble ( sX2 )) then
+ Printlog "Width was ok. Expected: " + sx1 + "' was: '" + sX2 + "'"
+ else
+ warnLog "Width is different expected: '" + sx1 + "' is: '" + sX2 + "'"
+ endif
+ endif
+ sY2 = Hoehe.GetText
+ if (LiberalMeasurement(sY, sY2)) <> TRUE then
+ if ( val(str(StrToDouble(sY)+5)) >= StrToDouble(sY2) ) AND (val(str(StrToDouble ( sY )-5)) <= StrToDouble ( sY2 )) then
+ Printlog "Height was ok. Expected: " + sY + "' was: '" + sY2 + "'"
+ else
+ warnLog "Height is different expected: '" + sY + "' is: '" + sY2 + "'"
+ endif
+ endif
+ hCloseDialog( PICTOptionen, "cancel" )
+ else
+ warnlog( "No export options dialog was displayed" )
+ endif
+ endif
+
+ call hCloseDocument
+
+endcase 'tPCT
+'-------------------------------------------------------------------------------
+testcase tPBM
+
+ const sFilter = "PBM - Portable Bitmap (.pbm)"
+ const sExt = ".pbm"
+
+ printlog "Open the document"
+ hFileOpen( gTesttoolPath + "graphics\required\input\graphicexport."+ExtensionString )
+
+ printlog "Save it"
+ if ( hCallExport (OutputGrafikTBO , sFilter ) ) then
+
+ Kontext "PBMOptionen"
+ if ( PBMOptionen.Exists( 2 ) ) then
+ Ascii.Check
+ hCloseDialog( PBMOptionen, "ok" )
+ else
+ warnlog( "No export options dialog was displayed" )
+ endif
+
+ printlog( "Close file and re-insert graphics into new document" )
+ hInsertGraphicsToNewFile( OutputGrafikTBO + sExt ) ' local helper function, see bottom of this file
+
+ endif
+
+ call hCloseDocument
+
+endcase 'tPBM
+'-------------------------------------------------------------------------------
+testcase tPGM
+
+ const sFilter = "PGM - Portable Graymap (.pgm)"
+ const sExt = ".pgm"
+
+ printlog "Open the document"
+ hFileOpen( gTesttoolPath + "graphics\required\input\graphicexport." + ExtensionString )
+
+ printlog "Save it"
+ if ( hCallExport (OutputGrafikTBO , sFilter ) ) then
+
+ Kontext "PGMOptionen"
+ if ( PGMOptionen.Exists( 2 ) ) then
+ Ascii.Check
+ hCloseDialog( PGMOptionen, "ok" )
+ else
+ warnlog( "No export options dialog was displayed" )
+ endif
+
+ printlog( "Close file and re-insert graphics into new document" )
+ hInsertGraphicsToNewFile( OutputGrafikTBO + sExt ) ' local helper function, see bottom of this file
+
+ endif
+
+ call hCloseDocument
+
+endcase 'tPGM
+'-------------------------------------------------------------------------------
+testcase tPPM
+
+ const sFilter = "PPM - Portable Pixelmap (.ppm)"
+ const sExt = ".ppm"
+
+ printlog "Open the document"
+ hFileOpen( gTesttoolPath + "graphics\required\input\graphicexport." + ExtensionString )
+
+ printlog "Save it"
+ if ( hCallExport (OutputGrafikTBO , sFilter ) ) then
+
+ Kontext "PPMOptionen"
+ if ( PPMOptionen.Exists( 2 ) ) then
+ Ascii.Check
+ hCloseDialog( PPMOptionen, "ok" )
+ else
+ warnlog( "No export options dialog was displayed" )
+ endif
+
+ printlog( "Close file and re-insert graphics into new document" )
+ hInsertGraphicsToNewFile( OutputGrafikTBO + sExt ) ' local helper function, see bottom of this file
+
+ endif
+
+ call hCloseDocument
+
+endcase 'tPPM
+'------------------------------------------------------------------------------
+testcase tRAS
+
+ const sFilter = "RAS - Sun Raster Image (.ras)"
+ const sExt = ".ras"
+
+ printlog "Open the document"
+ hFileOpen( gTesttoolPath + "graphics\required\input\graphicexport." + ExtensionString )
+
+ printlog "Save it"
+ if ( hCallExport( OutputGrafikTBO, sFilter ) ) then
+ printlog( "Close file and re-insert graphics into new document" )
+ hInsertGraphicsToNewFile( OutputGrafikTBO + sExt ) ' local helper function, see bottom of this file
+ else
+ warnlog( "No export options dialog was displayed" )
+ endif
+
+ call hCloseDocument
+
+endcase 'tRAS
+'------------------------------------------------------------------------------
+testcase tTIFF
+
+ dim x as integer
+ dim i as integer
+
+ const sFilter = "TIFF - Tagged Image File Format (.tif;.tiff)"
+ const sExt = ".tif"
+
+ printlog "Open the document"
+ hFileOpen (ConvertPath ( gTesttoolPath + "graphics\required\input\graphicexport."+ExtensionString ))
+
+ printlog "Save it"
+ if ( hCallExport (OutputGrafikTBO , sFilter ) ) then
+ printlog( "Close file and re-insert graphics into new document" )
+ hInsertGraphicsToNewFile( OutputGrafikTBO + sExt ) ' local helper function, see bottom of this file
+ else
+ warnlog( "No export options dialog was displayed" )
+ endif
+
+ call hCloseDocument
+
+endcase 'tTIFF
+'------------------------------------------------------------------------------
+testcase tXPM
+
+ const sFilter = "XPM - X PixMap (.xpm)"
+ const sExt = ".xpm"
+
+ printlog "Open the document"
+ hFileOpen( gTesttoolPath + "graphics\required\input\graphicexport." + ExtensionString )
+
+ printlog "save it"
+ if hCallExport (OutputGrafikTBO , sFilter ) = TRUE then
+ printlog( "Close file and re-insert graphics into new document" )
+ hInsertGraphicsToNewFile( OutputGrafikTBO + sExt ) ' local helper function, see bottom of this file
+ else
+ warnlog( "No export options dialog was displayed" )
+ endif
+
+ call hCloseDocument
+
+endcase 'tXPM
+'-------------------------------------------------------------------------------
+testcase tGIF
+
+ const sFilter = "GIF - Graphics Interchange Format (.gif)"
+ const sExt = ".gif"
+
+ printlog "open the document"
+ hFileOpen( gTesttoolPath + "graphics\required\input\graphicexport." + ExtensionString )
+
+ printlog "save it"
+ if ( hCallExport( OutputGrafikTBO, sFilter ) ) then
+
+ Kontext "GIFOptionen"
+ if GIFOptionen.Exists (2) then
+ Interlace.Uncheck
+ TransparentSpeichern.UnCheck
+ hCloseDialog( GIFOptionen, "ok" )
+ else
+ warnlog( "No export options dialog was displayed" )
+ endif
+
+ printlog( "Close file and re-insert graphics into new document" )
+ hInsertGraphicsToNewFile( OutputGrafikTBO + sExt ) ' local helper function, see bottom of this file
+
+ endif
+
+ call hCloseDocument
+
+endcase 'tGIF
+'-------------------------------------------------------------------------------
+testcase tJPEG
+
+ const sFilter = "JPEG - Joint Photographic Experts Group (.jpg;.jpeg;.jfif;.jif;.jpe)"
+ const sExt = ".jpg"
+
+ printlog "Open the document"
+ hFileOpen( gTesttoolPath + "graphics\required\input\graphicexport." + ExtensionString )
+
+ printlog " save it "
+ if ( hCallExport( OutputGrafikTBO , sFilter ) ) then
+
+ Kontext "JpegOptionen"
+ if ( JpegOptionen.Exists( 2 ) ) then
+ Echtfarben.Check
+ Qualitaet.ToMin
+ hCloseDialog( JpegOptionen, "ok" )
+ else
+ warnlog( "No export options dialog was displayed" )
+ endif
+
+ printlog( "Close file and re-insert graphics into new document" )
+ hInsertGraphicsToNewFile( OutputGrafikTBO + sExt ) ' local helper function, see bottom of this file
+
+ endif
+
+ call hCloseDocument
+
+endcase 'tJPEG
+
+'*******************************************************************************
+
+function hInsertGraphicsToNewFile( sOutputFile as string )
+
+ if ( FileExists( sOutputFile ) ) then
+ hFileReOpen( "" )
+ Call hGrafikEinfuegen( sOutputFile )
+ else
+ warnlog( "File not saved: " & sOutputFile )
+ endif
+
+end function
+
+'*******************************************************************************
+
+function hFileReOpen( cFile as string ) as boolean
+
+ dim iDocumentCount as integer : iDocumentCount = getDocumentCount
+ hFileReopen() = false
+
+ hCloseDocument()
+
+ if ( cFile = "" ) then
+ hNewDocument()
+ else
+ if ( FileExists( cFile ) ) then
+ hFileOpen( cFile )
+ else
+ warnlog( "hFileReOpen(): File does not exist: " & cFile )
+ endif
+ endif
+
+ if ( getDocumentCount = iDocumentCount ) then hFileReOpen() = true
+
+end function
+
+'*******************************************************************************
+
+function hWaitForOutputFile( sOutputFile as string ) as boolean
+ const FILE_WRITE_TIMEOUT = 30
+ dim iWait as integer : iWait = 0
+
+ for iWait = 1 to FILE_WRITE_TIMEOUT
+ ' File found
+ if ( FileExists( sOutputFile ) ) then
+ hWaitForOutputFile() = true
+ exit function
+ endif
+ ' Timeout
+ if ( iWait = FILE_WRITE_TIMEOUT ) then
+ hWaitForOutputFile() = false
+ exit function
+ endif
+ wait( 1000 )
+ next iWait
+end function
+
diff --git a/testautomation/graphics/optional/includes/global/export_graphic_2.inc b/testautomation/graphics/optional/includes/global/export_graphic_2.inc
new file mode 100644
index 000000000000..5e0a2f3ec811
--- /dev/null
+++ b/testautomation/graphics/optional/includes/global/export_graphic_2.inc
@@ -0,0 +1,1520 @@
+'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
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* Owner : wolfram.garten@oracle.com
+'*
+'* short description : Graphics Export B-tests. (the usual suspects)
+'*
+'\******************************************************************************
+testcase tPNG
+
+ dim x as integer
+ dim i as integer
+ dim iWaitIndex as integer
+ dim sFilter as string
+ dim sExt as string
+
+ sFilter = "PNG - Portable Network Graphic (.png)"
+ sExt = ".png"
+
+ hFileOpen( gTesttoolPath & "graphics\required\input\graphicexport." & ExtensionString )
+
+ if hCallExport (OutputGrafikTBO , sFilter ) = TRUE then
+ Kontext "PNGOptionen"
+ if PNGOptionen.Exists (2) then
+ Kompression.ToMax
+ Interlaced.UnCheck
+ PNGOptionen.OK
+ iWaitIndex = 0
+ do while PNGOptionen.Exists AND iWaitIndex < 30
+ sleep (1)
+ iWaitIndex = iWaitIndex + 1
+ loop
+ endif
+ if ( dir(OutputGrafikTBO+sExt) <> "") then
+ Printlog "Ok :-) Saved as: '" & OutputGrafikTBO+sExt & "'"
+ else
+ warnlog "File didn't get saved :-("
+ endif
+ hCloseDocument ()
+ sleep 5
+ hNewDocument()
+ sleep 5
+ Call hGrafikEinfuegen ( OutputGrafikTBO+sExt )
+ endif
+
+ call hCloseDocument
+endcase 'tPNG
+
+'-------------------------------------------------------------------------------
+testcase tSVM
+
+ dim x as integer
+ dim i as integer
+ dim sFilter as string
+ dim sExt as string
+ dim bTemp as boolean
+ dim sX as string
+ dim sY as string
+ dim sx1 as string
+ dim sX2 as string
+ dim sY2 as string
+ dim sDocument as string
+
+ sFilter = "SVM - StarView Metafile (.svm)"
+ sExt = ".svm"
+
+ sDocument = ConvertPath ( gTesttoolPath & "graphics\required\input\graphicexport." & ExtensionString)
+ hFileOpen sDocument
+
+ if hCallExport (OutputGrafikTBO , sFilter ) = TRUE then
+ Kontext "SVMOptionen"
+ if SVMOptionen.Exists (2) then
+ Original.Check
+ if Breite.IsEnabled then
+ warnlog " :-("
+ endif
+ if Hoehe.IsEnabled then
+ warnlog " :-("
+ endif
+ Groesse.Check
+ Breite.More
+ Hoehe.Less
+ SVMOptionen.Cancel
+ sleep 5
+ if ( dir(OutputGrafikTBO+sExt) = "") then ' inspired by bug #99932 Graphic is exported though cancel is pressed
+ Printlog "ok :-)"
+ else
+ warnlog "dialog was canceled, but file got saved, too :-( - i35177"
+ endif
+ else
+ Warnlog "No '" & sFilter & "' -Dialog!"
+ i=5
+ end if
+ sleep 2
+ Kontext "Active"
+ if Active.Exists(2) then
+ Warnlog " '" & sFilter & "' has a problem"
+ Active.OK
+ end if
+ end if
+ if hCallExport (OutputGrafikTBO , sFilter ) = TRUE then
+ Kontext "SVMOptionen"
+ if SVMOptionen.Exists (2) then
+ Groesse.Check
+ Breite.Less
+ Hoehe.More
+ SVMOptionen.OK
+ sleep 5
+ endif
+ if ( dir(OutputGrafikTBO+sExt) <> "") then
+ Printlog "Ok :-) Saved as: '" & OutputGrafikTBO+sExt & "'"
+ else
+ warnlog "File didn't get saved :-("
+ endif
+ hCloseDocument ()
+ sleep 5
+ hNewDocument()
+ sleep 5
+ Call hGrafikEinfuegen ( OutputGrafikTBO+sExt )
+ endif
+ hCloseDocument ()
+ hFileOpen (sDocument)
+ sleep (10)
+
+ call fMakeDocumentWritable
+
+ hTypeKeys ("<escape><tab>")
+ fGetSizeXY sx1, sY, TRUE
+ if hCallExport (OutputGrafikTBO & "1" , sFilter, TRUE ) = TRUE then
+ Kontext "SVMOptionen"
+ if SVMOptionen.Exists (2) then
+ Original.Check
+ SVMOptionen.OK
+ sleep 5
+ endif
+ if ( dir(OutputGrafikTBO & "1" & sExt) <> "") then
+ Printlog "Ok :-) Saved as: '" & OutputGrafikTBO & "1" & sExt & "'"
+ else
+ warnlog "File didn't get saved :-("
+ endif
+ hCloseDocument ()
+ sleep 5
+ hNewDocument()
+ sleep 5
+ Call hGrafikEinfuegen ( OutputGrafikTBO & "1" & sExt )
+ bTemp = FALSE
+ fGetSizeXY sx1, sY, bTemp
+ if (bTemp = FALSE) then
+ warnlog "Selected original size NOT OK :-("
+ endif
+ endif
+ hCloseDocument ()
+ hNewDocument()
+ hRechteckErstellen ( 10, 10, 30, 40 )
+ if hCallExport (OutputGrafikTBO & "2" , sFilter, TRUE ) = TRUE then
+ Kontext "SVMOptionen"
+ if SVMOptionen.Exists (2) then
+ Groesse.Check
+ Breite.SetText "9"
+ Hoehe.SetText "9"
+ Groesse.Check 'Check to make settings go throught
+ sx1 = Breite.GetText
+ sY = Hoehe.GetText
+ SVMOptionen.OK
+ sleep 5
+ endif
+ if ( dir(OutputGrafikTBO & "2" & sExt) <> "") then
+ Printlog "Ok :-) Saved as: '" & OutputGrafikTBO & "2" & sExt & "'"
+ else
+ warnlog "File didn't get saved :-("
+ endif
+ hCloseDocument ()
+ sleep 5
+ hFileOpen (OutputGrafikTBO & "2" & sExt)
+ kontext "Filterauswahl"
+ if Filterauswahl.exists then
+ Warnlog "Error when loading the file. The Filter-dialogue came up. Test aborted."
+ Filterauswahl.Cancel
+ goto endsub
+ endif
+ kontext "DocumentDraw"
+ DocumentDraw.TypeKeys ("<escape><tab>")
+ ContextOriginalSize
+ bTemp = FALSE
+ fGetSizeXY sx1, sY, bTemp
+ if (bTemp = FALSE) then
+ warnlog "Selected original size NOT OK :-("
+ endif
+ endif
+ if hCallExport (OutputGrafikTBO & "3" , sFilter, TRUE ) = TRUE then
+ Kontext "SVMOptionen"
+ if SVMOptionen.Exists (2) then
+ Groesse.Check
+ sX2 = Breite.GetText
+ if (LiberalMeasurement(sx1, sX2)) <> TRUE then
+ if (val(str(StrToDouble(sx1)+5)) >= StrToDouble(sX2) ) AND (val(str(StrToDouble ( sx1 )-5)) <= StrToDouble ( sX2 )) then
+ Printlog "Width was ok. Expected: " & sx1 & "' was: '" & sX2 & "'"
+ else
+ warnLog "Width is different expected: '" & sx1 & "' is: '" & sX2 & "'"
+ endif
+ endif
+ sY2 = Hoehe.GetText
+ if (LiberalMeasurement(sY, sY2)) <> TRUE then
+ if ( val(str(StrToDouble(sY)+5)) >= StrToDouble(sY2) ) AND (val(str(StrToDouble ( sY )-5)) <= StrToDouble ( sY2 )) then
+ Printlog "Height was ok. Expected: " & sY & "' was: '" & sY2 & "'"
+ else
+ warnLog "Height is different expected: '" & sY & "' is: '" & sY2 & "'"
+ endif
+ endif
+ SVMOptionen.Cancel
+ sleep 5
+ endif
+ endif
+
+ call hCloseDocument
+
+endcase 'tSVM
+'-------------------------------------------------------------------------------
+testcase tPDF
+
+ dim sPath as string
+ dim sTemp as string
+ dim iFileSize(12) as long
+ dim i as integer
+
+ '/// Export the file 12 times: ///'
+ '///+ every compression level (3) and every range (3), check if button in toolbar uses last settings (6) (-> 12) ///'
+ hFileOpen (ConvertPath ( gTesttoolPath + "graphics\required\input\graphicexport_pdf."+ExtensionString ))
+ sleep (10)
+
+ '---------------------------------------------------------------------------------------------------------------------------------------------------------
+ '###### all / Screen optimized ######
+ '/// File->Export as PDF document
+ printlog "File->Export as PDF document"
+ '///+ range = All
+ printlog " range = All"
+ '///+ compression = Screen optimized
+ printlog " compression = Screen optimized"
+
+ kontext "Standardbar"
+ checkexppdfwaitmax10sec
+
+ '--------------------------------------------------------- Output the first file ---------------------------------------------------------------
+
+ hExportAsPDFmulti (3, TRUE, OutputGrafikTBO + 1, TRUE, FALSE, 1, 1)
+ '/// Export using Button in toolbar
+ printlog "Export using Button in toolbar"
+ '///+ use the settings from the export before
+ printlog " use the settings from the export before"
+
+ kontext "Standardbar"
+ checkexppdfwaitmax10sec
+
+ '------------------------------------------------------- Output the second file -------------------------------------------------------------
+
+ hExportAsPDFmulti (1, TRUE, OutputGrafikTBO + 2, TRUE, FALSE, 1, 1) ' button in toolbar -> last settings have to be used
+
+ '###### range / Screen optimized ######
+ '/// File->Export as PDF document
+ printlog "File->Export as PDF document"
+ '///+ range = Range
+ printlog " range = Range"
+ '///+ compression = Screen optimized
+ printlog " compression = Screen optimized"
+
+ kontext "Standardbar"
+ checkexppdfwaitmax10sec
+
+ '--------------------------------------------------------- Output the third file ---------------------------------------------------------------
+
+ hExportAsPDFmulti (3, TRUE, OutputGrafikTBO + 3, TRUE, FALSE, 2, 1, "2")
+
+ '/// Export using Button in toolbar
+ printlog "Export using Button in toolbar"
+ '///+ use the settings from the export before
+ printlog " use the settings from the export before"
+
+ kontext "Standardbar"
+ checkexppdfwaitmax10sec
+
+ '--------------------------------------------------------- Output the fourth file -------------------------------------------------------------
+
+ hExportAsPDFmulti (1, TRUE, OutputGrafikTBO + 4, TRUE, FALSE, 2, 1) ' button in toolbar -> last settings have to be used
+
+ '###### all / Print optimized ######
+ '/// File->Export as PDF document
+ printlog "File->Export as PDF document"
+ '///+ range = all
+ printlog " range = all"
+ '///+ compression = Print optimized
+ printlog " compression = Print optimized"
+
+ kontext "Standardbar"
+ checkexppdfwaitmax10sec
+
+ '------------------------------------------------------------ Output the fifth file --------------------------------------------------------------
+
+ hExportAsPDFmulti (3, TRUE, OutputGrafikTBO + 5, TRUE, FALSE, 1, 2)
+
+ '/// Export using Button in toolbar
+ printlog "Export using Button in toolbar"
+ '///+ use the settings from the export before
+ printlog " use the settings from the export before"
+
+ kontext "Standardbar"
+ checkexppdfwaitmax10sec
+
+ '----------------------------------------------------------- Output the sixth file ---------------------------------------------------------------
+
+ hExportAsPDFmulti (1, TRUE, OutputGrafikTBO + 6, TRUE, FALSE, 1, 2) ' button in toolbar -> last settings have to be used
+
+ '###### range / Print optimized ######
+ '/// File->Export as PDF document
+ printlog "File->Export as PDF document"
+ '///+ range = Range
+ printlog " range = Range"
+ '///+ compression = Screen optimized
+ printlog " compression = Screen optimized"
+
+ kontext "Standardbar"
+ checkexppdfwaitmax10sec
+
+ '--------------------------------------------------------- Output the seventh file -------------------------------------------------------------
+
+ hExportAsPDFmulti (3, TRUE, OutputGrafikTBO + 7, TRUE, FALSE, 2, 2, "2")
+
+ '/// Export using Button in toolbar
+ printlog "Export using Button in toolbar"
+' '///+ use the settings from the export before
+ printlog " use the settings from the export before"
+
+ kontext "Standardbar"
+ checkexppdfwaitmax10sec
+
+ '------------------------------------------------------------ Output the eight file ----------------------------------------------------------------
+
+ hExportAsPDFmulti (1, TRUE, OutputGrafikTBO + 8, TRUE, FALSE, 2, 2) ' button in toolbar -> last settings have to be used
+
+ '###### all / Press optimized ######
+ '/// File->Export as PDF document ///'
+ printlog "File->Export as PDF document ///'"
+ '///+ range = all
+ printlog " range = all"
+ '///+ compression = Press optimized
+ printlog " compression = Press optimized"
+
+ kontext "Standardbar"
+ checkexppdfwaitmax10sec
+
+ '------------------------------------------------------------ Output the ninth file ----------------------------------------------------------------
+
+ hExportAsPDFmulti (3, TRUE, OutputGrafikTBO + 9, TRUE, FALSE, 1, 3)
+ '/// Export using Button in toolbar
+ '///+ use the settings from the export before
+
+ kontext "Standardbar"
+ checkexppdfwaitmax10sec
+
+ '------------------------------------------------------------ Output the tenth file ----------------------------------------------------------------
+
+ hExportAsPDFmulti (1, TRUE, OutputGrafikTBO + 10, TRUE, FALSE, 1, 3) ' button in toolbar -> last settings have to be used
+
+ '###### range / Press optimized ######
+ '/// File->Export as PDF document ///'
+ printlog "File->Export as PDF document ///'"
+ '///+ range = all
+ printlog " range = all"
+ '///+ compression = Press optimized
+ printlog " compression = Press optimized"
+
+ kontext "Standardbar"
+ checkexppdfwaitmax10sec
+
+ '----------------------------------------------------------- Output the eleventh file -------------------------------------------------------------
+
+ hExportAsPDFmulti (3, TRUE, OutputGrafikTBO + 11, TRUE, FALSE, 2, 3, "2")
+ '/// Export using Button in toolbar
+ '///+ use the settings from the export before
+
+ kontext "Standardbar"
+ checkexppdfwaitmax10sec
+
+ '------------------------------------------------------------- Output the twelfth file --------------------------------------------------------------
+
+ hExportAsPDFmulti (1, TRUE, OutputGrafikTBO + 12, TRUE, FALSE, 2, 3) ' button in toolbar -> last settings have to be used
+
+ kontext "Standardbar"
+ checkexppdfwaitmax10sec
+
+ '-----------------------------------------------------------------------------------------------------------------------------------------------------------------
+
+ for i=1 to 12
+ sPath = OutputGrafikTBO
+ sPath = sPath + i + ".pdf"
+ iFileSize(i) = app.FileLen(sPath)
+ Printlog (" - " + i + ": " + " " + iFileSize(i) + " " + sPath
+ if (dir(sPath) <> "") then
+ sleep(1)
+ '/// the first line has to be '%PDF-1.4' ///'
+ sTemp = fGetFileText(sPath, 8)
+ if (sTemp <> "%PDF-1.4") then
+ Warnlog "File doesn't start with '%PDF-1.4' it is: '" + sTemp + "'"
+ endif
+ '/// the last line has to be '%%EOF' ///'
+ sTemp = left(fGetFileText(sPath, -6),5)
+ if (sTemp <> "%%EOF") then
+ Warnlog "File doesn't end with '%%EOF' it is: '" + sTemp + "'"
+ endif
+ else
+ Warnlog "File was not exported to PDF :-( '" + sPath + "'"
+ endif
+ next i
+
+ ' Check if the file size is the same when exporting via toolbar and file/export
+ ' if the size different then the options are not used when exporting via the toolbar
+ if (iFileSize(1) <> iFileSize(2)) then
+ qaerrorlog "i100919: pdf export: different file size when exporting with file/export or button"
+ 'Warnlog ("Diffrence in filesize for file 1 and 2")
+ endif
+ ' print optimized
+ if (iFileSize(5) <> iFileSize(6)) then
+ qaerrorlog "i100919: pdf export: different file size when exporting with file/export or button"
+ 'Warnlog ("Difference in filesize for file 5 and 6")
+ endif
+ ' press optimized
+ if (iFileSize(9) <> iFileSize(10)) then
+ qaerrorlog "i100919: pdf export: different file size when exporting with file/export or button"
+ 'Warnlog ("Difference in filesize for file 9 and 10")
+ endif
+
+
+
+ if (iFileSize(1) > iFileSize(5)) then
+ qaerrorlog "i100919: pdf export: different file size when exporting with file/export or button"
+ 'Warnlog ("Filesize for file 1 is greater then for file 5. The compression level doesn't work.")
+ endif
+ if (iFileSize(5) > iFileSize(9)) then
+ Warnlog ("Filesize for file 5 is greater then for file 9. The compression level doesn't work.")
+ endif
+
+ call hCloseDocument()
+endcase 'tPDF
+
+'-------------------------------------------------------------------------------
+testcase tPDF_Creator
+
+ dim sPath as String
+ dim sApp as String
+ dim sTemp as String
+ dim bTemp as String
+ dim sTemp2 as String
+ dim iFileSize(3) as long
+ dim iCreatorOffset as integer
+ dim i as integer
+ dim sTextFilter as String
+ dim sTextFiltername as String
+ dim sExtension() as String
+
+ sTemp = ConvertPath ( gTesttoolPath + "graphics\required\input\export_graphic3." + ExtensionString )
+ printlog "sTemp=" & sTemp
+ printlog "File load"
+ hFileOpen (sTemp)
+ sleep (30)
+ sPath = OutputGrafikTBO
+ sTemp = sPath
+ sPath = sPath + "L.pdf"
+ printlog "sPath : " & sPath
+ sleep(1)
+ printlog "Exporting File as pdf but with txt ending.."
+ hExportAsPDFmulti (1, TRUE, sPath, TRUE, FALSE, 1, 1)
+ name sPath as sTemp+"L.txt"
+ sleep (30)
+ iFileSize(3) = app.FileLen(sTemp+"L.txt")
+ iCreatorOffset = 0
+ sleep 5
+ printlog "load file in writer as text"
+ printlog "Load File.."
+ hFileOpen(sTemp+"L.txt")
+
+ printlog "If dialog 'AsciiFilterOptionen' comes up, say OK"
+ printlog "Checking for FilterDialog.."
+ Kontext "AsciiFilterOptionen"
+ If AsciiFilterOptionen.Exists(3) then
+ AsciiFilterOptionen.OK
+ endif
+
+ printlog "Selecting Filter.."
+ Kontext "Filterauswahl"
+ If Filterauswahl.Exists then
+ Filter.Select ( hGetUIFiltername("Text" ))
+ Filterauswahl.OK
+ End If
+
+ sApp = gApplication
+ gApplication = "WRITER"
+ sleep 5
+ printlog "Search in Doc for <</Creator<"
+ bTemp = hFindeImDokument ("<</Creator<",true,true)
+ if (bTemp = TRUE) then
+ Printlog "OK, found."
+ else
+ warnlog " /Creator not found in pdf file :-("
+ endif
+ printlog "getting Clipboard Text.."
+ hTypeKeys("<left><right><shift end>")
+ editcopy
+ sTemp = getClipboardText()
+ printlog "sTemp from clipboard: " & sTemp
+ sTemp = left(sTemp, inStr(sTemp, ">")-1)
+ printlog "shortened sTemp: " & sTemp
+ sTemp2 = ""
+ for i = 0 to (len(sTemp)/4)-1
+ sTemp2 = sTemp2 + chr("&H"+mid(sTemp,(i*4)+1, 4))
+ next i
+ printlog "sTemp2: " & sTemp2
+ printlog sTemp + " -- " + len(sTemp) + " ::: '" + sTemp2 + "'"
+ if (lCase(sapp) <> lCase(right(sTemp2, len(stemp2)-1))) then
+ warnlog "Application is different from Creator; is: '" + lCase(sTemp2) + "' should: '" + lCase(sapp) + "'"
+ endif
+ printlog "iCreatorOffset: " & iCreatorOffset
+ iCreatorOffset = iCreatorOffset + len(sTemp)
+ printlog "iCreatorOffset + len(sTemp): " & iCreatorOffset
+ printlog "Search for Producer.."
+ bTemp = hFindeImDokument ("/Producer<")
+ if (bTemp = TRUE) then
+ Printlog "OK, found."
+ else
+ warnlog " /Producer not found in pdf file :-("
+ endif
+ printlog "getting clipboard content.."
+ hTypeKeys("<left><right><shift end><shift down>")
+ editcopy
+ sTemp = getClipboardText()
+ printlog "sTemp from clipboard: " & sTemp
+ sTemp = left(sTemp, inStr(sTemp, ">")-1)
+ printlog "shortened sTemp: " & sTemp
+
+ sTemp2 = ""
+ printlog "len(sTemp): " & ((len(sTemp)/4)-1)
+ for i = 0 to (len(sTemp)/4)-1
+ sTemp2 = sTemp2 + chr("&H"+mid(sTemp,(i*4)+1, 4))
+ printlog "sTemp2: " & sTemp2
+ next i
+ printlog sTemp + " -- " + len(sTemp) + " ::: '" + sTemp2 + "'"
+ if gOOO then
+ iCreatorOffset = iCreatorOffset + len(sTemp)
+ printlog "In case of OOO iCreatorOffset is: " & iCreatorOffset
+ else
+ if bAsianLan then
+ iCreatorOffset = iCreatorOffset + 48
+ if (len(sTemp) <> 48) then
+ warnlog "Producer is different from 'StarSuite 8'; is: '" + sTemp2 + "'"
+ endif
+ else
+ printlog "iCreatorOffset:" & iCreatorOffset
+ iCreatorOffset = iCreatorOffset + 52
+ printlog "iCreatorOffset + 52:" & iCreatorOffset
+ if (len(sTemp) <> 92) then
+ warnlog "Producer is different from ''; is: '" + sTemp2 + "'"
+ endif
+ endif
+ endif
+
+ gApplication = sApp
+ call hCloseDocument
+ call hCloseDocument
+
+endcase 'tPDF_Creator
+'-------------------------------------------------------------------------------
+testcase tSVG
+
+ dim x as integer
+ dim i as integer
+ dim sFilter as string
+ dim sExt as string
+ dim bTemp as boolean
+ dim sTemp as string
+ dim sTextFilter as string
+ dim sExtension() as string
+ dim sTextFiltername as string
+
+ sFilter = "SVG - Scalable Vector Graphics (.svg)"
+ sExt = ".svg"
+
+ hFileOpen ( gTesttoolPath & "graphics\required\input\graphicexport." & ExtensionString )
+
+ '------------------------\
+ if hCallExport (OutputGrafikTBO , sFilter ) = TRUE then
+ '------------------------\
+ if ( dir(OutputGrafikTBO+sExt) <> "") then
+ Printlog "Ok :-) Saved as: '" & OutputGrafikTBO+sExt & "'"
+ '------------------------\
+ if (iSprache <> 82) then
+ hCloseDocument ()
+ sleep 5
+ sTextFilter = "Text"
+
+ hFileOpenWithFilter (OutputGrafikTBO+sExt, sTextFiltername, FALSE)
+ printlog "if dialog 'AsciiFilterOptionen' comes up, say OK"
+ Kontext "AsciiFilterOptionen"
+ '-------------------------------\
+ If AsciiFilterOptionen.Exists(3) then
+ AsciiFilterOptionen.OK
+ else
+ warnlog "No ASCII filter Options Dialog?"
+ endif
+ '-------------------------------/
+ sTemp = gApplication
+ gApplication = "WRITER"
+ sleep 5 ' wait for document to be loaded
+ bTemp = hFindeImDokument ("<!DOCTYPE svg PUBLIC " & chr(34)& "-//W3C//DTD SVG 1.1//EN" & chr(34)&" " & chr(34)&"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" & chr(34)&">",true)
+ '-------------------------------\
+ if (bTemp = TRUE) then
+ Printlog "OK"
+ else
+ warnlog "DOCTYPE not found in svg file :-("
+ endif
+ '-------------------------------/
+ gApplication = sTemp
+ else
+ qaerrorlog "disabled for 82: #111017#"
+ endif
+ '--------------------------/
+ else
+ warnlog "File didn't get saved :-("
+ endif
+ '------------------------/
+ endif
+ '------------------------/
+
+ call hCloseDocument
+endcase 'tSVG
+
+'-------------------------------------------------------------------------------
+testcase tBMP
+qaerrorlog
+ dim x as integer
+ dim i as integer
+ dim bTemp as boolean
+ dim sX as string
+ dim sY as string
+ dim sx1 as string
+ dim sX2 as string
+ dim sY2 as string
+ dim sDocument as string
+
+ '/// open the document
+ sDocument = ConvertPath ( gTesttoolPath + "graphics\required\input\graphicexport."+ExtensionString)
+ hFileOpen sDocument
+
+ if hCallExport (OutputGrafikTBO , "BMP - Windows Bitmap (.bmp)" ) = TRUE then
+ Kontext "BMPOptionen"
+ if BMPOptionen.Exists (2) then
+ '/// check if all properties have the right count, and depend on each other ///'
+ '/// 'Color Resolution' listbox contains eight items ///'
+ x = Farbaufloesung.GetItemCount
+ if x <> 8 then warnlog "Color Resolution Count is wrong; should be:8, is:" + x
+ for i = 1 to x
+ Farbaufloesung.Select i
+ sleep 1
+ Printlog " - " + i + ": '" +Farbaufloesung.GetSelText + "'"
+ '/// checkbox RLE coding has to be enabled only for '4 and 8 bit' color palettes ///'
+ if ((i > 3) AND (i < 8)) then
+ if RLEKodierung.IsEnabled <> TRUE then warnlog "'RLE coding' is not checkable :-("
+ else
+ if RLEKodierung.IsEnabled <> FALSE then warnlog "'RLE coding' is checkable :-("
+ endif
+ next i
+ '/// if Mode 'original' is selected, DPI///'
+ Original.Check
+ if DPI.IsEnabled then warnlog " :-("
+ if Breite.IsEnabled then warnlog " :-("
+ if Hoehe.IsEnabled then warnlog " :-("
+ Aufloesung.Check
+ x = DPI.GetItemCount
+ '/// 'DPI' listbox contains eight items ///'
+ if x <> 4 then warnlog "'DPI' Count is wrong; should be:4, is:" + x
+ for i = 1 to x
+ DPI.Select i
+ Printlog " - " + i + ": '" +DPI.GetSelText + "'"
+ next i
+ if Breite.IsEnabled then warnlog " :-("
+ if Hoehe.IsEnabled then warnlog " :-("
+ Groesse.Check
+ if DPI.IsEnabled then warnlog " :-("
+ Breite.More
+ Hoehe.Less
+ Sleep 1
+ '/// leave dialog with cancel -> there has to be no file created! ///'
+ BMPOptionen.Cancel
+ sleep 5
+ if ( dir(OutputGrafikTBO+".bmp") = "") then ' inspired by bug #99932 Graphic is exported though cancel is pressed
+ Printlog "ok :-)"
+ else
+ warnlog "Dialog was canceled, but file got saved, too :-( - i35177"
+ endif
+ else
+ Warnlog "No BMP-Option-Dialog!"
+ i=5
+ end if
+ sleep 2
+ Kontext "Active"
+ if Active.Exists(2) then
+ Warnlog "BMP-Exportfilter has a problem"
+ Active.OK
+ end if
+ end if
+ Printlog "'/// now save it realy and load the file afterwards ///'"
+ if hCallExport (OutputGrafikTBO , "BMP - Windows Bitmap (.bmp)" ) = TRUE then
+ Kontext "BMPOptionen"
+ if BMPOptionen.Exists (2) then
+ Farbaufloesung.Select 7
+ RLEKodierung.Check
+ Aufloesung.Check
+ DPI.Select 3
+ BMPOptionen.OK
+ sleep 5
+ endif
+ if ( dir(OutputGrafikTBO+".bmp") <> "") then
+ Printlog "Ok :-) Saved as: '" + OutputGrafikTBO+".bmp" + "'"
+ else
+ warnlog "File didn't get saved :-("
+ endif
+ hCloseDocument ()
+ sleep 5
+ hNewDocument()
+ sleep 5
+ Call hGrafikEinfuegen ( OutputGrafikTBO+".bmp" )
+ endif
+ hCloseDocument ()
+ Printlog "'/// now save a SELECTION in ORIGINAL SIZE and load the file afterwards ///'"
+
+ hFileOpen (sDocument)
+ kontext "Filterauswahl"
+ if Filterauswahl.exists(10) then
+ Warnlog "Error when loading the file. The Filter-dialogue came up. Test aborted."
+ Filterauswahl.Cancel
+ goto endsub
+ endif
+
+ ' check if the document is writable
+ call fMakeDocumentWritable
+
+ hTypeKeys ("<escape><tab>")
+ fGetSizeXY sx1, sy, TRUE
+ if hCallExport (OutputGrafikTBO + "1" , "BMP - Windows Bitmap (.bmp)", TRUE ) = TRUE then
+ Kontext "BMPOptionen"
+ if BMPOptionen.Exists (2) then
+ Original.Check
+ BMPOptionen.OK
+ sleep 5
+ endif
+ if ( dir(OutputGrafikTBO + "1"+".bmp") <> "") then
+ Printlog "Ok :-) Saved as: '" + OutputGrafikTBO + "1"+".bmp" + "'"
+ else
+ warnlog "File didn't get saved :-("
+ endif
+ hCloseDocument ()
+ sleep 5
+ hNewDocument()
+ sleep 5
+ Call hGrafikEinfuegen ( OutputGrafikTBO + "1"+".bmp" )
+ bTemp = FALSE
+ fGetSizeXY sx1, sY, bTemp
+ if (bTemp = FALSE) then
+ warnlog "Selected original size NOT OK :-("
+ endif
+ endif
+ hCloseDocument ()
+
+ Printlog "'/// now CREATE a rectangle, select it, save it in SIZE and load the file afterwards ///'"
+ hNewDocument()
+ hTypeKeys "<TAB>"
+ gMouseClick 50, 50
+ hRechteckErstellen ( 10, 10, 30, 40 )
+ if hCallExport (OutputGrafikTBO + "2" , "BMP - Windows Bitmap (.bmp)", TRUE ) = TRUE then
+ Kontext "BMPOptionen"
+ if BMPOptionen.Exists (2) then
+ Groesse.Check
+ Breite.SetText "9"
+ Hoehe.SetText "9"
+ Groesse.Check 'Press "Size" one more time in order to make the change go through"
+ sx1 = Breite.GetText
+ sY = Hoehe.GetText
+ BMPOptionen.OK
+ sleep 5
+ endif
+ if ( dir(OutputGrafikTBO + "2"+".bmp") <> "") then
+ Printlog "Ok :-) Saved as: '" + OutputGrafikTBO + "2"+".bmp" + "'"
+ else
+ warnlog "File didn't get saved :-("
+ endif
+ hCloseDocument ()
+ sleep 5
+ hFileOpen (OutputGrafikTBO + "2"+".bmp")
+ kontext "Filterauswahl"
+ if Filterauswahl.exists then
+ Warnlog "Error when loading the file. The Filter-dialogue came up. Test aborted."
+ Filterauswahl.Cancel
+ goto endsub
+ endif
+ kontext "DocumentDraw"
+ DocumentDraw.TypeKeys ("<escape><tab>")
+
+ ContextOriginalSize
+ bTemp = FALSE
+ fGetSizeXY sx1, sY, bTemp
+ if (bTemp = FALSE) then
+ warnlog "Selected original size NOT OK :-("
+ endif
+
+ endif
+ if hCallExport (OutputGrafikTBO + "3" , "BMP - Windows Bitmap (.bmp)", TRUE ) = TRUE then
+ Kontext "BMPOptionen"
+ if BMPOptionen.Exists (2) then
+ Groesse.Check
+ sX2 = Breite.GetText
+ if (LiberalMeasurement(sx1, sX2)) <> TRUE then
+ if (val(str(StrToDouble(sx1)+5)) >= StrToDouble(sX2) ) AND (val(str(StrToDouble ( sx1 )-5)) <= StrToDouble ( sX2 )) then
+ Printlog "Width was ok. Expected: " + sx1 + "' was: '" + sX2 + "'"
+ else
+ warnLog "Width is different expected: '" + sx1 + "' is: '" + sX2 + "'"
+ endif
+ endif
+ sY2 = Hoehe.GetText
+ if (LiberalMeasurement(sY, sY2)) <> TRUE then
+ if ( val(str(StrToDouble(sY)+5)) >= StrToDouble(sY2) ) AND (val(str(StrToDouble ( sY )-5)) <= StrToDouble ( sY2 )) then
+ Printlog "Height was ok. Expected: " + sY + "' was: '" + sY2 + "'"
+ else
+ warnLog "Height is different expected: '" + sY + "' is: '" + sY2 + "'"
+ endif
+ endif
+ BMPOptionen.Cancel
+ sleep 5
+ endif
+ endif
+
+ call hCloseDocument
+
+endcase 'tBMP
+'-------------------------------------------------------------------------------
+testcase tEMF
+
+ dim x as integer
+ dim i as integer
+ dim sFilter as string
+ dim sExt as string
+ dim bTemp as boolean
+ dim sX as string
+ dim sY as string
+ dim sx1 as string
+ dim sX2 as string
+ dim sY2 as string
+ dim sDocument as string
+
+ sFilter = "EMF - Enhanced Metafile (.emf)"
+ sExt = ".emf"
+
+ sDocument = gTesttoolPath & "graphics\required\input\graphicexport." & ExtensionString
+ hFileOpen sDocument
+
+ if hCallExport (OutputGrafikTBO , sFilter ) = TRUE then
+ Kontext "SVMOptionen"
+ if SVMOptionen.Exists (2) then
+ Original.Check
+ if Breite.IsEnabled then
+ warnlog " :-("
+ endif
+ if Hoehe.IsEnabled then
+ warnlog " :-("
+ endif
+ Groesse.Check
+ Breite.More
+ Hoehe.Less
+ SVMOptionen.Cancel
+ sleep 5
+ if ( dir(OutputGrafikTBO+sExt) = "") then ' inspired by bug #99932 Graphic is exported though cancel is pressed
+ Printlog "ok :-)"
+ else
+ warnlog "Dialog was canceled, but file got saved, too :-( - i35177"
+ endif
+ else
+ Warnlog "No '" & sFilter & "' -Dialog!"
+ i=5
+ end if
+ sleep 2
+ Kontext "Active"
+ if Active.Exists(2) then
+ Warnlog " '" & sFilter & "' has a problem"
+ Active.OK
+ end if
+ end if
+ if hCallExport (OutputGrafikTBO , sFilter ) = TRUE then
+ Kontext "SVMOptionen"
+ if SVMOptionen.Exists (2) then
+ Groesse.Check
+ Breite.Less
+ Hoehe.More
+ SVMOptionen.OK
+ sleep 5
+ endif
+ if ( dir(OutputGrafikTBO+sExt) <> "") then
+ Printlog "Ok :-) saved as: '" & OutputGrafikTBO+sExt & "'"
+ else
+ warnlog "File didn't get saved :-("
+ endif
+ hCloseDocument ()
+ sleep 5
+ hNewDocument()
+ sleep 5
+ Call hGrafikEinfuegen ( OutputGrafikTBO+sExt )
+ endif
+ hCloseDocument ()
+ hFileOpen (sDocument)
+ kontext "Filterauswahl"
+ if Filterauswahl.Exists(10) then
+ Warnlog "Error when loading the file. The Filter-dialogue came up. Test aborted."
+ Filterauswahl.Cancel
+ goto endsub
+ endif
+ printlog "making doc editable if it is readonly"
+ call fMakeDocumentWritable
+ hTypeKeys ("<escape><tab>")
+ fGetSizeXY sx1, sY, TRUE
+ if hCallExport (OutputGrafikTBO & "1" , sFilter, TRUE ) = TRUE then
+ Kontext "SVMOptionen"
+ if SVMOptionen.Exists (2) then
+ Original.Check
+ SVMOptionen.OK
+ sleep 5
+ endif
+ if ( dir(OutputGrafikTBO & "1" & sExt) <> "") then
+ Printlog "Ok :-) saved as: '" & OutputGrafikTBO & "1" & sExt & "'"
+ else
+ warnlog "File didn't get saved :-("
+ endif
+ hCloseDocument ()
+ sleep 5
+ hNewDocument()
+ sleep 5
+ Call hGrafikEinfuegen ( OutputGrafikTBO & "1" & sExt )
+ bTemp = FALSE
+ fGetSizeXY sx1, sY, bTemp
+ if (bTemp = FALSE) then
+ warnlog "Selected original size NOT OK :-("
+ endif
+ endif
+ hCloseDocument ()
+ hNewDocument()
+ hRechteckErstellen ( 10, 10, 30, 40 )
+ if hCallExport (OutputGrafikTBO & "2" , sFilter, TRUE ) = TRUE then
+ Kontext "SVMOptionen"
+ if SVMOptionen.Exists (2) then
+ Groesse.Check
+ Breite.SetText "9"
+ Hoehe.SetText "9"
+ Groesse.Check 'Press "Size" one more time to make the change go through"
+ sx1 = Breite.GetText
+ sY = Hoehe.GetText
+ SVMOptionen.OK
+ sleep 5
+ endif
+ if ( dir(OutputGrafikTBO & "2" & sExt) <> "") then
+ Printlog "Ok :-) saved as: '" & OutputGrafikTBO & "2" & sExt & "'"
+ else
+ warnlog "File didn't get saved :-("
+ endif
+ hCloseDocument ()
+ sleep 5
+ hFileOpen (OutputGrafikTBO & "2" & sExt)
+ kontext "DocumentDraw"
+ DocumentDraw.TypeKeys ("<escape><tab>")
+ ContextOriginalSize
+ bTemp = FALSE
+ fGetSizeXY sx1, sY, bTemp
+ if (bTemp = FALSE) then
+ warnlog "Selected original size NOT OK :-("
+ endif
+
+ if hCallExport (OutputGrafikTBO & "3" , sFilter, TRUE ) = TRUE then
+ Kontext "SVMOptionen"
+ if SVMOptionen.Exists (2) then
+ Groesse.Check
+ sX2 = Breite.GetText
+ if (LiberalMeasurement(sx1, sX2)) <> TRUE then
+ if (val(str(StrToDouble(sx1)+5)) >= StrToDouble(sX2) ) AND (val(str(StrToDouble ( sx1 )-5)) <= StrToDouble ( sX2 )) then
+ Printlog "Width was ok. Expected: " & sx1 & "' was: '" & sX2 & "'"
+ else
+ warnLog "Width is different expected: '" & sx1 & "' is: '" & sX2 & "'"
+ endif
+ endif
+ sY2 = Hoehe.GetText
+ if (LiberalMeasurement(sY, sY2)) <> TRUE then
+ if ( val(str(StrToDouble(sY)+5)) >= StrToDouble(sY2) ) AND (val(str(StrToDouble ( sY )-5)) <= StrToDouble ( sY2 )) then
+ Printlog "Height was ok. Expected: " & sY & "' was: '" & sY2 & "'"
+ else
+ warnLog "Height is different expected: '" & sY & "' is: '" & sY2 & "'"
+ endif
+ endif
+ SVMOptionen.Cancel
+ sleep 5
+ endif
+ endif
+ endif
+
+ call hCloseDocument
+endcase 'tEMF
+
+'-------------------------------------------------------------------------------
+testcase tMET
+
+ dim x as integer
+ dim i as integer
+ dim iWaitIndex as integer
+ dim sFilter, sExt as string
+ dim bTemp as boolean
+ dim sX as string
+ dim sY as string
+ dim sx1 as string
+ dim sX2 as string
+ dim sY2 as string
+ dim sTemp as string
+ dim sDocument as string
+
+ sFilter = "MET - OS/2 Metafile (.met)"
+ sExt = ".met"
+
+ sDocument = gTesttoolPath & "graphics\required\input\graphicexport." & ExtensionString
+ hFileOpen sDocument
+
+ if hCallExport (OutputGrafikTBO , sFilter ) = TRUE then
+ Kontext "METOptionen"
+ if METOptionen.Exists (2) then
+ Original.Check
+ if Breite.IsEnabled then
+ warnlog " :-("
+ endif
+ if Hoehe.IsEnabled then
+ warnlog " :-("
+ endif
+ Groesse.Check
+ sTemp = Breite.getText
+ Breite.More
+ if (sTemp = Breite.getText) then
+ qaErrorLog "Width didn't change on pressing button 'More' #112225#"
+ Breite.setText "10"
+ Hoehe.setText "10"
+ endif
+ sTemp = Hoehe.getText
+ Hoehe.Less
+ if (sTemp = Hoehe.getText) then
+ warnlog "Height didn't change on pressing button 'Less'"
+ endif
+ METOptionen.Cancel
+ sleep 5
+ if ( dir(OutputGrafikTBO+sExt) = "") then ' inspired by bug #99932 Graphic is exported though cancel is pressed
+ Printlog "ok :-)"
+ else
+ warnlog "Dialog was canceled, but file got saved, too :-( - i35177"
+ endif
+ else
+ Warnlog "No '" & sFilter & "' -Dialog!"
+ i=5
+ end if
+ sleep 2
+ Kontext "Active"
+ if Active.Exists(2) then
+ Warnlog " '" & sFilter & "' has a problem"
+ Active.OK
+ end if
+ end if
+ if hCallExport (OutputGrafikTBO , sFilter ) = TRUE then
+ Kontext "METOptionen"
+ if METOptionen.Exists (2) then
+ Groesse.Check
+ sTemp = Breite.getText
+ Breite.Less
+ if (sTemp = Breite.getText) then
+ warnlog "Width didn't change on pressing button 'Less'"
+ endif
+ sTemp = Hoehe.getText
+ Hoehe.More
+ if (sTemp = Hoehe.getText) then
+ qaErrorLog "Height didn't change on pressing button 'More' #112225#"
+ Breite.setText "10"
+ Hoehe.setText "10"
+ endif
+ METOptionen.OK
+ iWaitIndex = 0
+ do while METOptionen.Exists AND iWaitIndex < 30
+ sleep (1)
+ iWaitIndex = iWaitIndex + 1
+ loop
+ endif
+ if ( dir(OutputGrafikTBO+sExt) <> "") then
+ Printlog "Ok :-) Saved as: '" & OutputGrafikTBO+sExt & "'"
+ else
+ warnlog "File didn't get saved :-("
+ endif
+ hCloseDocument ()
+ sleep 5
+ hNewDocument()
+ sleep 5
+ Call hGrafikEinfuegen ( OutputGrafikTBO+sExt )
+ endif
+ hCloseDocument ()
+ hFileOpen (sDocument)
+ sleep (10)
+
+ printlog "making doc editable if it is readonly"
+ call fMakeDocumentWritable
+
+ hTypeKeys ("<escape><tab>")
+ fGetSizeXY sx1, sY, TRUE
+ if hCallExport (OutputGrafikTBO & "1" , sFilter, TRUE ) = TRUE then
+ Kontext "METOptionen"
+ if METOptionen.Exists (2) then
+ Original.Check
+ METOptionen.OK
+ iWaitIndex = 0
+ do while METOptionen.Exists AND iWaitIndex < 30
+ sleep (1)
+ iWaitIndex = iWaitIndex + 1
+ loop
+ endif
+ if ( dir(OutputGrafikTBO & "1" & sExt) <> "") then
+ Printlog "Ok :-) Saved as: '" & OutputGrafikTBO & "1" & sExt & "'"
+ else
+ warnlog "File didn't get saved :-("
+ endif
+ hCloseDocument ()
+ sleep 5
+ hNewDocument()
+ sleep 5
+ Call hGrafikEinfuegen ( OutputGrafikTBO & "1" & sExt )
+ bTemp = FALSE
+ fGetSizeXY sx1, sY, bTemp
+ if (bTemp = FALSE) then
+ warnlog "Selected original size NOT OK :-("
+ endif
+ endif
+ hCloseDocument ()
+ hNewDocument()
+ hRechteckErstellen ( 10, 10, 30, 40 )
+ if hCallExport (OutputGrafikTBO & "2" , sFilter, TRUE ) = TRUE then
+ Kontext "METOptionen"
+ if METOptionen.Exists (2) then
+ Groesse.Check
+ Breite.SetText "9"
+ Hoehe.SetText "9"
+ Groesse.Check ' Click "Size" one more time to make the changes go through.
+ sx1 = Breite.GetText
+ sY = Hoehe.GetText
+ METOptionen.OK
+ iWaitIndex = 0
+ do while METOptionen.Exists AND iWaitIndex < 30
+ sleep (1)
+ iWaitIndex = iWaitIndex + 1
+ loop
+ endif
+ if ( dir(OutputGrafikTBO & "2" & sExt) <> "") then
+ Printlog "Ok :-) Saved as: '" & OutputGrafikTBO & "2" & sExt & "'"
+ else
+ warnlog "File didn't get saved :-("
+ endif
+ hCloseDocument ()
+ sleep 5
+ hFileOpen (OutputGrafikTBO & "2" & sExt)
+ kontext "DocumentDraw"
+ DocumentDraw.TypeKeys ("<escape><tab>")
+ ContextOriginalSize
+ bTemp = FALSE
+ fGetSizeXY sx1, sY, bTemp
+ if (bTemp = FALSE) then
+ warnlog "Selected original size NOT OK :-("
+ endif
+ endif
+ if hCallExport (OutputGrafikTBO & "3" , sFilter, TRUE ) = TRUE then
+ Kontext "METOptionen"
+ if METOptionen.Exists (2) then
+ Groesse.Check
+ sX2 = Breite.GetText
+ if (LiberalMeasurement(sx1, sX2)) <> TRUE then
+ if (val(str(StrToDouble(sx1)+5)) >= StrToDouble(sX2) ) AND (val(str(StrToDouble ( sx1 )-5)) <= StrToDouble ( sX2 )) then
+ Printlog "Width was ok. Expected: " & sx1 & "' was: '" & sX2 & "'"
+ else
+ warnLog "Width is different expected: '" & sx1 & "' is: '" & sX2 & "'"
+ endif
+ endif
+ sY2 = Hoehe.GetText
+ if (LiberalMeasurement(sY, sY2)) <> TRUE then
+ if ( val(str(StrToDouble(sY)+5)) >= StrToDouble(sY2) ) AND (val(str(StrToDouble ( sY )-5)) <= StrToDouble ( sY2 )) then
+ Printlog "Height was ok. Expected: " & sY & "' was: '" & sY2 & "'"
+ else
+ warnLog "Height is different expected: '" & sY & "' is: '" & sY2 & "'"
+ endif
+ endif
+ METOptionen.Cancel
+ sleep 5
+ endif
+ endif
+
+ call hCloseDocument
+endcase 'tMET
+
+'-------------------------------------------------------------------------------
+testcase tSWF
+
+ dim sFilter as string
+ dim sExt as string
+ dim x as integer
+ dim i as integer
+
+ sFilter = "Macromedia Flash (SWF) (.swf)"
+ sExt = ".swf"
+
+ hFileOpen( gTesttoolPath & "graphics\required\input\graphicexport." & ExtensionString )
+
+ if hCallExport (OutputGrafikTBO , sFilter ) = TRUE then
+ if ( dir(OutputGrafikTBO+sExt) <> "") then
+ Printlog "Ok :-) Saved as: '" & OutputGrafikTBO+sExt & "'"
+ sleep 5
+ else
+ warnlog "File didn't get saved :-("
+ endif
+ endif
+
+ call hCloseDocument
+endcase 'tSWF
+
+'------------------------------------------------------------------------------
+testcase tWMF
+
+ dim x as integer
+ dim i as integer
+ dim iWaitIndex as integer
+ dim sFilter as string
+ dim sExt as string
+ dim bTemp as boolean
+ dim sX as string
+ dim sY as string
+ dim sx1 as string
+ dim sX2 as string
+ dim sY2 as string
+ dim sDocument as string
+
+ sFilter = "WMF - Windows Metafile (.wmf)"
+ sExt = ".wmf"
+
+ sDocument = gTesttoolPath & "graphics\required\input\graphicexport." & ExtensionString
+ hFileOpen sDocument
+
+ if hCallExport (OutputGrafikTBO , sFilter ) = TRUE then
+ Kontext "SVMOptionen"
+ if SVMOptionen.Exists (2) then
+ Original.Check
+ if Breite.IsEnabled then
+ warnlog " :-("
+ endif
+ if Hoehe.IsEnabled then
+ warnlog " :-("
+ endif
+ Groesse.Check
+ Breite.More
+ Hoehe.Less
+ SVMOptionen.Cancel
+ sleep 5
+ if ( dir(OutputGrafikTBO+sExt) = "") then ' inspired by bug #99932 Graphic is exported though cancel is pressed
+ Printlog "ok :-)"
+ else
+ warnlog "Dialog was canceled, but file got saved, too :-( - i35177"
+ endif
+ else
+ Warnlog "No '" & sFilter & "' -Dialog!"
+ i=5
+ end if
+ sleep 2
+ Kontext "Active"
+ if Active.Exists(2) then
+ Warnlog " '" & sFilter & "' has a problem"
+ Active.OK
+ end if
+ end if
+ if hCallExport (OutputGrafikTBO , sFilter ) = TRUE then
+ Kontext "SVMOptionen"
+ if SVMOptionen.Exists (2) then
+ Groesse.Check
+ Breite.Less
+ Hoehe.More
+ SVMOptionen.OK
+ iWaitIndex = 0
+ do while SVMOptionen.Exists AND iWaitIndex < 30
+ sleep (1)
+ iWaitIndex = iWaitIndex + 1
+ loop
+ endif
+ if ( dir(OutputGrafikTBO+sExt) <> "") then
+ Printlog "Ok :-) Saved as: '" & OutputGrafikTBO+sExt & "'"
+ else
+ warnlog "File didn't get saved :-("
+ endif
+ hCloseDocument ()
+ sleep 5
+ hNewDocument()
+ sleep 5
+ Call hGrafikEinfuegen ( OutputGrafikTBO+sExt )
+ endif
+ hCloseDocument ()
+ hFileOpen (sDocument)
+ sleep (10)
+
+ printlog "making doc editable if it is readonly"
+ call fMakeDocumentWritable
+
+ hTypeKeys ("<escape><tab>")
+ fGetSizeXY sx1, sY, TRUE
+ if hCallExport (OutputGrafikTBO & "1" , sFilter, TRUE ) = TRUE then
+ Kontext "SVMOptionen"
+ if SVMOptionen.Exists (2) then
+ Original.Check
+ SVMOptionen.OK
+ iWaitIndex = 0
+ do while SVMOptionen.Exists AND iWaitIndex < 30
+ sleep (1)
+ iWaitIndex = iWaitIndex + 1
+ loop
+ endif
+ if ( dir(OutputGrafikTBO & "1" & sExt) <> "") then
+ Printlog "Ok :-) Saved as: '" & OutputGrafikTBO & "1" & sExt & "'"
+ else
+ warnlog "File didn't get saved :-("
+ endif
+ hCloseDocument ()
+ sleep 5
+ hNewDocument()
+ sleep 5
+ Call hGrafikEinfuegen ( OutputGrafikTBO & "1" & sExt )
+ bTemp = FALSE
+ fGetSizeXY sx1, sY, bTemp
+ if (bTemp = FALSE) then
+ warnlog "Selected original size NOT OK :-("
+ endif
+ endif
+ hCloseDocument ()
+ hNewDocument()
+ hRechteckErstellen ( 10, 10, 30, 40 )
+ if hCallExport (OutputGrafikTBO & "2" , sFilter, TRUE ) = TRUE then
+ Kontext "SVMOptionen"
+ if SVMOptionen.Exists (2) then
+ Groesse.Check
+ Breite.SetText "9"
+ Hoehe.SetText "9"
+ Groesse.Check 'Check "Size" to make changes really go through.
+ sx1 = Breite.GetText
+ sY = Hoehe.GetText
+ SVMOptionen.OK
+ iWaitIndex = 0
+ do while SVMOptionen.Exists AND iWaitIndex < 30
+ sleep (1)
+ iWaitIndex = iWaitIndex + 1
+ loop
+ endif
+ if ( dir(OutputGrafikTBO & "2" & sExt) <> "") then
+ Printlog "Ok :-) Saved as: '" & OutputGrafikTBO & "2" & sExt & "'"
+ else
+ warnlog "File didn't get saved :-("
+ endif
+ hCloseDocument ()
+ sleep 5
+ hFileOpen (OutputGrafikTBO & "2" & sExt)
+ kontext "DocumentDraw"
+ DocumentDraw.TypeKeys ("<escape><tab>")
+ ContextOriginalSize
+ bTemp = FALSE
+ fGetSizeXY sx1, sY, bTemp
+ if (bTemp = FALSE) then
+ warnlog "Selected original size NOT OK :-("
+ endif
+ endif
+ if hCallExport (OutputGrafikTBO & "3" , sFilter, TRUE ) = TRUE then
+ Kontext "SVMOptionen"
+ if SVMOptionen.Exists (2) then
+ Groesse.Check
+ sX2 = Breite.GetText
+ if (LiberalMeasurement(sx1, sX2)) <> TRUE then
+ if (val(str(StrToDouble(sx1)+5)) >= StrToDouble(sX2) ) AND (val(str(StrToDouble ( sx1 )-5)) <= StrToDouble ( sX2 )) then
+ Printlog "Width was ok. Expected: " & sx1 & "' was: '" & sX2 & "'"
+ else
+ warnLog "Width is different expected: '" & sx1 & "' is: '" & sX2 & "'"
+ endif
+ endif
+ sY2 = Hoehe.GetText
+ if (LiberalMeasurement(sY, sY2)) <> TRUE then
+ if ( val(str(StrToDouble(sY)+5)) >= StrToDouble(sY2) ) AND (val(str(StrToDouble ( sY )-5)) <= StrToDouble ( sY2 )) then
+ Printlog "Height was ok. Expected: " & sY & "' was: '" & sY2 & "'"
+ else
+ warnLog "Height is different expected: '" & sY & "' is: '" & sY2 & "'"
+ endif
+ endif
+ SVMOptionen.Cancel
+ sleep 5
+ endif
+ endif
+
+ call hCloseDocument
+endcase 'tWMF
+
+'-------------------------------------------------------------------------
+
+function fGetFileText (sFilename as string, iCount as long) as string
+'/// This function is for getting the first or last n characters of a file
+'///+<u>Input</u>:<ul><li>filename</li><li>number</li></ul>If the number greater 0 then get n characters from start.
+'///+A number smaller 0 get from end of file.
+'///+<u>Output</u>:<ul><li>string with <b><i>n</i></b> characters</li></ul>
+
+ dim iFile as integer ' filehandle
+ dim iTem as integer ' get 2 bytes of the file
+ dim iTemByte(2) as integer ' move 1 byte from iTem in each item
+ dim sTemp as string ' string of file
+ dim iSize as long ' size in bytes of file
+ dim i as long ' runner :-)
+
+ iFile = FreeFile
+' Printlog "FreeFile: " + iFile
+ if (dir (sFilename) <> "") then
+' Printlog "FileLen: " + FileLen(sFile)
+ Open sFilename For binary access read shared As #iFile
+' Printlog "Loc: " + Loc(#iFile) ' LONG! where am i in the file?
+
+ iSize = Lof(#iFile) ' get size in bytes of file
+ if (iSize > 65530) then '65536 = 64kB
+ 'Warnlog "fGetFileText: file '" + sFilename + "' might get problems on reading it? size is > 65530 Byte: '" + iSize + "'"
+ else
+' printlog "iSize: " + iSize
+ endif
+
+ sTemp = ""
+ if (iCount >= 0) then ' get bytes from file start
+ get iFile,1,sTemp ' get max 64kByte; but not the 1st 2 bytes :-(
+ get iFile,1,iTem ' get the first 2 bytes of the file
+ iTemByte(2) = (iTem AND &H0000FF00) \ &H100 ' and seperate the bytes
+ iTemByte(1) = (iTem AND &H000000FF)
+ sTemp = chr(iTemByte(1)) + chr(iTemByte(2)) + sTemp ' put them together
+ else ' get bytes from file end
+ if ((iSize+iCount) > 0) then
+ select case (iSize+iCount)
+ case 1: get iFile,1,sTemp ' take bytes from the end of the file
+ get iFile,1,iTem ' get the first 2 bytes of the file
+ sTemp = chr(iTemByte(2)) + sTemp ' put them together
+ case else: get iFile,(iSize+iCount)-1,sTemp ' take bytes from the end of the file
+ end select
+ else
+ get iFile,1,sTemp ' take bytes from the end of the file
+ get iFile,1,iTem ' get the first 2 bytes of the file
+ iTemByte(2) = (iTem AND &H0000FF00) \ &H100 ' and seperate the bytes
+ iTemByte(1) = (iTem AND &H000000FF)
+ sTemp = chr(iTemByte(1)) + chr(iTemByte(2)) + sTemp ' put them together
+ endif
+ endif
+' printlog "'"+left(sTemp,iSize)+"'" ' gotcha!
+
+ if (iSize-(Abs(iCount)) >= 0) then
+ fGetFileText = left(sTemp,Abs(iCount))
+ else
+ 'Warnlog "fGetFileText: file '" + sFilename + "' isn't as big as expected; will only return '" + iSize+ "' bytes fom: " + iCount
+ fGetFileText = left(sTemp,iSize)
+ endif
+
+ ' debugging routine --------------------------------------
+ ' iSize = Lof(#iFile)
+ ' printlog "iSize: " + iSize
+ ' sTemp = ""
+ ' if iSize > 0 then
+ ' printlog "iSize \ 2: " + (iSize \ 2)
+ ' for i = 0 to ((iSize \ 2)-1)
+ ' get iFile,(i*2)+1,iTem
+ ' Printlog "i: " + i + ": 0x" + hex(iTem)
+ ' iTemByte(2) = (iTem AND &H0000FF00) \ &H100
+ ' iTemByte(1) = (iTem AND &H000000FF)
+ ' sTemp = sTemp + chr(iTemByte(1)) + chr(iTemByte(2))
+ ' next i
+ ' if (iSize MOD 2) = 1 then
+ ' get iFile,iSize,iTem
+ ' Printlog "i: " + iSize + ": 0x" + hex(iTem)
+ ' iTemByte(1) = (iTem AND &H000000FF)
+ ' sTemp = sTemp + chr(iTemByte(1))
+ ' endif
+ ' endif
+ ' printlog "'"+sTemp+"'"
+ ' debugging routine --------------------------------------
+ Close #iFile
+ else ' does file exist
+ Warnlog "fGetFileText: file '" + sFilename + "' doesn't exist"
+ fGetFileText = ""
+ endif
+end function
diff --git a/testautomation/graphics/optional/includes/global/g_accessability.inc b/testautomation/graphics/optional/includes/global/g_accessability.inc
new file mode 100644
index 000000000000..6fa992308c44
--- /dev/null
+++ b/testautomation/graphics/optional/includes/global/g_accessability.inc
@@ -0,0 +1,297 @@
+'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
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* Owner : wolfram.garten@oracle.com
+'*
+'* short description : Accessability
+'*
+'**************************************************************************************
+' #1 tEis1549
+' #1 tEis1523
+' #1 tEis1581
+'\*************************************************************************************
+
+testcase tEis1549
+ call hNewDocument
+ call sSelectEmptyLayout
+ call hTextrahmenErstellen ("Sun",20,20,70,20)
+
+ hTypeKeys ("<escape><escape>")
+ hTypeKeys ("<end><shift home>")
+ try
+ EditCopy
+ if GetClipboardText <> "" then
+ warnlog "Leaving edit mode didn't work :-( '" + GetClipboardText + "'"
+ endif
+ catch
+ Printlog "Left text edit mode :-)"
+ endcatch
+ EditSelectAll
+ hTypeKeys (" ")
+ sleep 1
+ hTypeKeys ("is")
+ hTypeKeys ("<shift home>")
+ try
+ EditCopy
+ if GetClipboardText = "Sun is" then
+ Printlog "Activating a textobject with 'printable' characters works :-)"
+ else
+ warnlog "Activating edit mode didn't work :-( '" + GetClipboardText + "' #99393#"
+ endif
+ catch
+ warnlog "Entering edit mode didn't work :-( '" + GetClipboardText + "'"
+ endcatch
+
+ hTypeKeys ("<escape><escape>")
+ hTypeKeys ("<end><shift home>")
+ try
+ EditCopy
+ if GetClipboardText <> "" then
+ warnlog "Leaving edit mode didn't work :-( '" + GetClipboardText + "'"
+ endif
+ catch
+ Printlog "Left text edit mode :-)"
+ endcatch
+ hTypeKeys ("<Tab>")
+ hTypeKeys ("<F2>")
+ ' hTypeKeys ("<end><shift home>")
+ hTypeKeys ("<shift home>")
+ try
+ EditCopy
+ if GetClipboardText = "Sun is" then
+ Printlog "Activating a textobject with <F2> works :-)"
+ else
+ warnlog "Activating edit mode didn't work :-( '" + GetClipboardText + "' #99393#"
+ endif
+ catch
+ warnlog "Entering edit mode didn't work :-( '" + GetClipboardText + "'"
+ endcatch
+
+ hTypeKeys ("<escape><escape>")
+ hTypeKeys ("<end><shift home>")
+ try
+ EditCopy
+ if GetClipboardText <> "" then
+ warnlog "Leaving edit mode didn't work :-( '" + GetClipboardText + "'"
+ endif
+ catch
+ Printlog "Left text edit mode :-)"
+ endcatch
+ hTypeKeys ("<Tab>")
+ hTypeKeys ("<Return>")
+ ' hTypeKeys ("<end><shift home>")
+ hTypeKeys ("<shift home>")
+ try
+ EditCopy
+ if GetClipboardText = "Sun is" then
+ Printlog "Activating a textobject with <Return> works :-)"
+ else
+ warnlog "Activating edit mode didn't work :-( '" + GetClipboardText + "' #99393#"
+ endif
+ catch
+ warnlog "Entering edit mode didn't work :-( '" + GetClipboardText + "'"
+ endcatch
+
+ call hCloseDocument
+endcase 'tEis1549
+
+testcase tEis1523
+ call hNewDocument
+
+ printlog "Switching between Draw/Impress"
+ if (UCase(gApplication)) = "IMPRESS" then
+ call sSelectEmptyLayout
+
+ endif
+ call hTextrahmenErstellen ("A",20,20,30,30)
+ hTypeKeys ("<escape><escape>")
+ call hTextrahmenErstellen ("B",10,10,15,15)
+ hTypeKeys ("<escape><escape>")
+ call hTextrahmenErstellen ("C",40,40,50,50)
+ hTypeKeys ("<escape><escape>")
+
+ hTypeKeys ("<mod1 Return>")
+ ' hTypeKeys ("<end><shift home>")
+ hTypeKeys ("<shift home>")
+ try
+ EditCopy
+ if GetClipboardText <> "A" then
+ warnlog "First textbox not activated :-( instead '" + GetClipboardText + "'"
+ endif
+ catch
+ warnlog "Unexpected error :-("
+ endcatch
+ hTypeKeys ("<mod1 Return>")
+ ' hTypeKeys ("<end><shift home>")
+ hTypeKeys ("<shift home>")
+ try
+ EditCopy
+ if GetClipboardText <> "B" then
+ warnlog "First textbox not activated :-( instead '" + GetClipboardText + "'"
+ endif
+ catch
+ warnlog "Unexpected error :-("
+ endcatch
+ hTypeKeys ("<mod1 Return>")
+ hTypeKeys ("<end><shift home>")
+ try
+ EditCopy
+ if GetClipboardText <> "C" then
+ warnlog "First textbox not activated :-( Instead '" + GetClipboardText + "'"
+ endif
+ catch
+ warnlog "Unexpected error :-("
+ endcatch
+
+ hTypeKeys ("<mod1 Return>")
+ hTypeKeys ("<PageDown>")
+ call hTextrahmenErstellen ("D",20,20,30,30)
+ hTypeKeys ("<escape><escape>")
+ hTypeKeys ("<mod1 Return>")
+ hTypeKeys ("<end><shift home>")
+ try
+ EditCopy
+ if GetClipboardText <> "D" then
+ warnlog "First textbox not activated :-( instead '" + GetClipboardText + "'"
+ endif
+ catch
+ warnlog "Unexpected error :-("
+ endcatch
+
+ if (gApplication = "IMPRESS") then
+ hTypeKeys ("<mod1 Return>")
+ FormatModifyPage ' ..Layout
+ sleep 2
+ Kontext "Slides"
+ hTypeKeys ("<PageDown>")
+ hTypeKeys ("<PageDown>")
+ kontext "Tasks"
+ LayoutsPreview.TypeKeys "<home>"
+ LayoutsPreview.TypeKeys "<down>"
+ LayoutsPreview.TypeKeys "<Return>"
+ hTypeKeys ("<mod1 Return>")
+ hTypeKeys ("<end><shift home>")
+ try
+ EditCopy
+ if GetClipboardText <> "" then
+ warnlog "No new layout :-( '" + GetClipboardText + "'"
+ endif
+ catch
+ Printlog "Layout accepted :-)"
+ endcatch
+ hTypeKeys "Great"
+ hTypeKeys ("<end><shift home>")
+ try
+ EditCopy
+ if GetClipboardText <> "Great" then
+ warnlog "No new layout 2:-( '" + GetClipboardText + "'"
+ endif
+ catch
+ Printlog "Layout accepted :-)"
+ endcatch
+ endif
+
+ call hCloseDocument
+endcase 'tEis1523
+
+testcase tEis1581
+ dim i as integer
+ call hNewDocument
+
+ if (gApplication = "IMPRESS") then
+ FormatModifyPage
+ sleep 1
+ kontext "Tasks"
+ LayoutsPreview.TypeKeys "<home>"
+ kontext "Pagelayout_UndoDeleteWarning"
+ if Pagelayout_UndoDeleteWarning.exists then
+ Pagelayout_UndoDeleteWarning.ok
+ endif
+ for i = 1 to 9
+ kontext "Tasks"
+ LayoutsPreview.TypeKeys "<RIGHT>"
+ kontext "Pagelayout_UndoDeleteWarning"
+ if Pagelayout_UndoDeleteWarning.exists then
+ warnlog " Undo/Delete-Warning showed up. But it shouldn't have."
+ Pagelayout_UndoDeleteWarning.ok
+ endif
+ next i
+ kontext "Tasks"
+ LayoutsPreview.TypeKeys "<Return>"
+ sleep (1)
+ hTypeKeys ("<tab><tab>")
+
+ DocumentImpress.UseMenu
+ hMenuSelectNr(4)
+ hMenuSelectNr(13)
+ hMenuSelectNr(1)
+ sleep (2)
+ kontext "GeneralFileDialog"
+ if GeneralFileDialog.exists then
+ sleep 1
+ GeneralFileDialog.cancel
+ else
+ warnlog "Graphic wasn't selected :-("
+ endif
+ kontext "Tasks"
+ LayoutsPreview.TypeKeys "<home>"
+ kontext "Pagelayout_UndoDeleteWarning"
+ if Pagelayout_UndoDeleteWarning.exists then
+ warnlog " Undo/Delete-Warning showed up. But it shouldn't have."
+ Pagelayout_UndoDeleteWarning.ok
+ endif
+ sleep (1)
+ for i = 1 to 3
+ kontext "Tasks"
+ LayoutsPreview.TypeKeys "<RIGHT>"
+ kontext "Pagelayout_UndoDeleteWarning"
+ if Pagelayout_UndoDeleteWarning.exists then
+ warnlog " Undo/Delete-Warning showed up. But it shouldn't have."
+ Pagelayout_UndoDeleteWarning.ok
+ endif
+ next i
+ kontext "Tasks"
+ LayoutsPreview.TypeKeys "<Return>"
+ sleep (1)
+ hTypeKeys ("<tab><tab>")
+ sleep (1)
+ DocumentImpress.UseMenu
+ hMenuSelectNr(4)
+ hMenuSelectNr(16)
+ hMenuSelectNr(1)
+ try
+ sleep 2
+ ' InsertTitle *OLEObjektEinfuegen/OLEObjektInsert SID_INSERT_OBJECT
+ kontext "OLEObjektInsert"
+ sleep 1
+ OLEObjektInsert.cancel
+ catch
+ warnlog "Ole wasn't selected :-("
+ endcatch
+ endif
+ call hCloseDocument
+endcase 'tEis1581
diff --git a/testautomation/graphics/optional/includes/global/g_area.inc b/testautomation/graphics/optional/includes/global/g_area.inc
new file mode 100644
index 000000000000..758044290d45
--- /dev/null
+++ b/testautomation/graphics/optional/includes/global/g_area.inc
@@ -0,0 +1,407 @@
+'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
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* Owner : wolfram.garten@oracle.com
+'*
+'* short description :
+'*
+'**************************************************************************************
+' #1 tiFormatArea
+' #1 tdFormatArea1
+'\*************************************************************************************
+
+testcase tiFormatArea
+ Dim i
+ Dim Zaehler
+ dim Entf$
+
+ hNewDocument '/// New impress document ///'
+ hRechteckErstellen (20,20,60,60) '/// create rectangle ///'
+ Printlog " - Change Format" '/// change format for the rectangle ///'
+ FormatArea
+ Kontext
+ active.SetPage TabArea
+ Kontext "TabArea"
+ FillOptions.Select 5 '/// apply bitmap as texture ///'
+ BitmapList.Select 3 '/// Select "Water" ///'
+ Tile.Check '/// tile bitmap ///'
+ Kontext
+ active.SetPage TabSchatten
+ kontext "TabSchatten"
+ Anzeigen.Check '/// apply shadow ///'
+ Entfernung.SetText "30" '/// set angle to 30���///'
+ Entf$=Entfernung.GetText '/// change distance ///'
+ Farbe.Select 15 '/// select color 15///'
+ TabSchatten.OK '/// close dialog ///'
+ Sleep 3
+
+ Printlog " - Test various formats"
+ FormatArea '/// Format area, check if changes are saved for this object ///'
+ Kontext
+ active.SetPage TabArea
+ Kontext "TabArea"
+ if NOT FillOptions.GetSelIndex = 5 then
+ Warnlog "Bitmap is not checked"
+ else
+ if BitmapList.GetSelIndex <> 3 then Warnlog "Wrong bitmap used. "+ BitmapAuswahl.GetSelIndex
+ if NOT Tile.IsChecked then Warnlog "Tile is not checked"
+' if Original.IsChecked then Warnlog "Original is not checked"
+' if NOT Relativ.IsChecked then Warnlog "Relative is not checked"
+' if Breite.GetText <> "90 %" then Warnlog "Width is not 90%, it is: "+Breite.GetText
+' if XOffset.GetText <> "30 %" then Warnlog "XOffset is not 30%, it is: "+XOffset.GetText
+' if NOT Zeile.IsChecked then Warnlog "Line is not checked"
+' if Verschiebung.GetText <> "20 %" then Warnlog "Displace is not 20%, it is: " + Verschiebung.GetText
+ Kontext
+ active.SetPage TabSchatten
+ kontext "TabSchatten"
+ if NOT Anzeigen.IsChecked then
+ Warnlog "Show shadows is not checked"
+ else
+ if Entfernung.GetText <> Entf$ then Warnlog "Distance is not " + Entf$ + " it is: "+ Entfernung.GetText
+ if Farbe.GetSelIndex <> 15 then Warnlog "Wrong color for shadow. It is: "+ Farbe.GetSelIndex
+ end if
+ end if
+ TabSchatten.Cancel
+
+ hCloseDocument '/// close document ///'
+
+endcase 'tiFormatArea
+'--------------------------------------------------------
+testcase tdFormatArea1
+
+Dim i
+Dim j
+Dim k
+Dim m
+Dim n
+Dim Winkel_1 as string
+Dim ZaehlerFarbe
+Dim ZaehlerVerlauf
+Dim ZaehlerSchraffur
+Dim ZaehlerBitmap
+Dim ColorName$
+ ColorName$ = "Bullshit"
+ dim Zaehler as integer
+
+ Call hNewDocument '/// new document ///'
+ sleep 3
+ Call hRechteckErstellen (30,30,70,70) '/// create rectangle ///'
+ sleep 2
+ FormatArea '/// format area ///'
+ Kontext
+ Active.SetPage TabArea
+ Kontext "TabArea"
+ FillOptions.Select 1 '/// Select no fill ///'
+ sleep 2
+ TabArea.OK
+ sleep 1
+ FormatArea
+ Kontext
+ Active.SetPage TabArea
+ Kontext "TabArea"
+ sleep 1 '/// control if changes are still there after closing and reopening dialog ///'
+ FillOptions.Select 3'/// check gradient and select 1 ///'
+ ZaehlerVerlauf = GradientList.GetItemCount
+ for j = 1 To 2
+ GradientList.Select j
+ TabArea.OK
+ FormatArea
+ Kontext
+ Active.SetPage TabArea
+ Kontext "TabArea"
+ PrintLog GradientList.GetSelText
+ next j
+ FillOptions.Select 4 '/// select hatching, control after closing and reopening dialog if changes are recognized ///'
+ HatchingList.GetItemCount
+ ZaehlerSchraffur = HatchingList.GetItemCount
+ for k=1 to 2'ZaehlerSchraffur
+ HatchingList.Select k
+ TabArea.OK
+ FormatArea
+ Kontext
+ Active.SetPage TabArea
+ Kontext "TabArea"
+ PrintLog HatchingList.GetSelText
+ next k
+
+ FillOptions.Select 5 '/// check bitmap, control if changes are permanent after closing and reopening dialog ///'
+ BitmapList.GetItemCount
+ ZaehlerBitmap = BitmapList.GetItemCount
+ for n=1 to ZaehlerBitmap
+ BitmapList.Select n
+ TabArea.OK
+ FormatArea
+ sleep 1
+ Kontext
+ Active.SetPage TabArea
+ Kontext "TabArea"
+ PrintLog BitmapList.GetSelText
+ next n
+
+ if Tile.IsChecked = False Then Tile.Check '/// check tile ///'
+' if Anpassen.IsEnabled = False Then PrintLog " Option Tile activated"
+' if Anpassen.IsEnabled = True Then WarnLog " Option Tile not activated"
+' if Relativ.IsChecked = False Then
+' SetClipboard Breite.GetText
+' Relativ.Check
+' If Breite.GetText = GetClipboardText Then
+' WarnLog " Relative isnt working"
+' else
+' PrintLog " Relative works"
+' end if
+' end if
+'
+' if Kacheln.IsChecked = True Then Kacheln.UnCheck
+' Anpassen.Check
+' if Relativ.IsEnabled = True Then WarnLog " Option Anpassen konnte nicht aktiviert werden"
+' if not Relativ.IsEnabled Then PrintLog " Option Anpassen funktioniert"
+' Anpassen.Uncheck
+' Original.Check
+' if Breite.IsEnabled And Hoehe.IsEnabled = True Then WarnLog " Button Original funktioniert nicht"
+' if Breite.IsEnabled And Hoehe.IsEnabled = False Then PrintLog " Button Original funktioniert"
+' Kacheln.Check
+' setClipboard XOffset.GetText
+' XOffset.More 3
+' if XOffset.GetText <> GetClipboardText Then PrintLog " Position XOffset funktioniert"
+' if XOffset.GetText = GetClipboardText Then WarnLog " Position XOffset funktioniert nicht"
+' SetClipboard YOffset.GetText
+' YOffset.More 5
+' if YOffset.GetText <> GetClipboardText Then PrintLog " Position YOffset funktioniert"
+' if YOffset.GetText = GetClipboardText Then WarnLog " Position YOffset funktioniert nicht"
+' PrintLog " TabArea fertig"
+ Kontext
+ Active.SetPage TabSchatten
+ Kontext "TabSchatten"
+ sleep 1
+ if Anzeigen.IsChecked = True Then Anzeigen.UnCheck '/// uncheck shadow ///'
+ sleep 1
+ if Entfernung.IsEnabled = False Then '/// check if shadow related controls are disabled with no shadow ///'
+ PrintLog " Show shadow works"
+ else
+ WarnLog " Show shadow does not work"
+ end if
+
+ Anzeigen.Check '/// check shadow ///'
+ SetClipboard Entfernung.GetText '/// change distance ///'
+ Entfernung.More 4
+ if GetClipboardText = Entfernung.GetText Then
+ WarnLog " Distance does not work"
+ else
+ PrintLog " Distance does work"
+ end if
+ Farbe.Select 5 '/// change shadow color ///'
+
+ Kontext
+ Active.SetPage TabFarben
+ Kontext "TabFarben"
+ Farbe.Select 24
+ sleep 1
+ Farbe.Select 18
+ sleep 1
+ Farbe.Select 7
+ Farbname.SetText "Bullshit" '/// change color ///'
+ Aendern.Click
+ sleep 1
+ TabFarben.OK
+ FormatArea
+ Kontext
+ Active.SetPage TabArea
+ Kontext "TabArea"
+ FillOptions.Select 2
+ if ColourList.GetSelText = "Bullshit" Then
+ PrintLog " Color selection changed "
+ else
+ WarnLog " Color selection not changed"
+ end if
+ Kontext
+ Active.SetPage TabFarben
+ Kontext "TabFarben"
+ Farbmodell.Select 1
+
+ Kontext
+ Active.SetPage TabFarben '/// test RGB color model ///'
+ Kontext "TabFarben"
+ Farbmodell.Select 1 '/// switch to RGB values ///' ' 33:RVB,CMJN
+ printlog " Selected colourmodel RGB?: "+Farbmodell.GetSelText
+ if left(Farbmodell.GetSelText,1) <> "R" then warnlog "not RGB selected ? :-("
+ try
+ R.SetText "50"
+ G.SetText "10"
+ B.SetText "90"
+ catch
+ warnlog "RGB text fields are not enabled :-("
+ endcatch
+ Aendern.Click
+ TabFarben.OK
+ Kontext "DocumentDraw"
+ FormatArea
+ Kontext
+ Active.SetPage TabFarben
+ Kontext "TabFarben"
+ if (R.GetText = "50" And G.GetText = "10" And B.GetText = "90") Then
+ PrintLog "Changes in RGB done"
+ else
+ WarnLog " Chancges in RGB values not recognized, instead of R=50 , G=10 und B=90 it is " +R.GetText + " " + G.GetText + " " + B.GetText
+ end if
+ Farbe.Select 10
+ FarbName.SetText "Brighter" '/// add a color ///'
+ Hinzufuegen.Click
+ Farbe.Select "Brighter"
+ Loeschen.Click '/// delete color ///'
+ Kontext "Active"
+ Active.Yes
+ Kontext
+ Active.SetPage TabFarben
+ Kontext "TabFarben"
+ Bearbeiten.Click '/// edit color ///'
+ Kontext "FarbeDlg"
+ FarbeDlg.OK
+ sleep 2
+ Kontext
+ Active.SetPage TabFarben
+ Kontext "TabFarben"
+ TabFarben.OK
+ FormatArea
+ Kontext
+ Active.SetPage TabFarben
+ Kontext "TabFarben"
+ TabFarben.OK
+
+ FormatArea
+ Kontext
+ Active.SetPage TabFarbverlaeufe
+ Kontext "TabFarbverlaeufe"
+ TabFarbverlaeufe.OK
+ sleep 2
+
+FormatArea
+ sleep 2
+ Kontext
+ Active.SetPage TabTransparenz
+ Kontext "TabTransparenz"
+ KeineTransparenz.Check '/// check if controls are disabled if transparence is disabled ///'
+ Printlog "- No transparency is checked, all controls should be disabled."
+ if MFLinTransparenz.IsEnabled Then Warnlog "- Transparency enabled"
+ if TransparenzverlaufTyp.IsEnabled Then Warnlog "- Graidient enabled"
+ if MFZentrumX.IsEnabled Then Warnlog "- Center X enabled"
+ if MFZentrumY.IsEnabled Then Warnlog "- Center Y enabled"
+ if MFWinkel.IsEnabled Then Warnlog "- Angle enabled"
+ if MFRand.IsEnabled Then Warnlog "- Border enabled"
+ if MFStartwert.IsEnabled Then Warnlog "- Start value enabled"
+ if MFEndwert.IsEnabled Then Warnlog "- End value enabled"
+
+ LineareTransparenz.Check '/// check linear tranparency ///'
+ Printlog "- Set transparency to linear, all controls should be enabled now" '/// control if related controls are now enabled ///'
+ sleep 1
+ MFLinTransparenz.ToMax '/// change values of controls ///'
+ if MFLinTransparenz.GetText <>"100%" Then Warnlog "- Maximum value not correct"
+ MFLinTransparenz.ToMin
+ if MFLinTransparenz.GetText <>"0%" Then Warnlog "- Minimum value not correct"
+ if TransparenzverlaufTyp.IsEnabled Then Warnlog "- Gradient enabled"
+ if MFZentrumX.IsEnabled Then Warnlog "- Centrum X enabled"
+ if MFZentrumY.IsEnabled Then Warnlog "- Centrum Y enabled"
+ if MFWinkel.IsEnabled Then Warnlog "- Angle enabled"
+ if MFRand.IsEnabled Then Warnlog "- Border enabled"
+ if MFStartwert.IsEnabled Then Warnlog "- Start value enabled"
+ if MFEndwert.IsEnabled Then Warnlog "- End value enabled"
+
+ Transparenzverlauf.Check
+ Printlog "- Gradient for transprency enabled"
+ if MFLinTransparenz.IsEnabled = "false" Then Warnlog "- Transparency disabled"
+ if TransparenzverlaufTyp.IsEnabled = "false" Then Warnlog "- Gradient disabled"
+ if MFZentrumX.IsEnabled = "false" Then Warnlog "- Center X disabled"
+ if MFZentrumY.IsEnabled = "false" Then Warnlog "- Center Y disabled"
+ if MFWinkel.IsEnabled = "false" Then Warnlog "- Anlge disabled"
+ if MFRand.IsEnabled = "false" Then Warnlog "- Border disabled"
+ if MFStartwert.IsEnabled = "false" Then Warnlog "- Start value disabled"
+ if MFEndwert.IsEnabled = "false" Then Warnlog "- End value disabled"
+
+ Printlog "- Check if changed values are saved"
+
+ Zaehler=TransparenzverlaufTyp.GetItemCount
+ for i=1 to Zaehler
+ TransparenzverlaufTyp.Select i
+ SetClipboard Transparenzverlauftyp.GetSelText
+ TabTransparenz.OK
+ sleep 2
+ FormatArea
+ sleep 1
+ Kontext
+ Active.SetPage TabTransparenz '/// check if values are saved after closing and reopening dialog ///'
+ Kontext "TabTransparenz"
+ if not Transparenzverlauftyp.GetSelIndex = i Then Warnlog "- Values are not correct for gradient transparency"
+ next i
+ TransparenzverlaufTyp.Select 2
+ if MFZentrumX.IsEnabled Then Warnlog "- Center X should not be enabled"
+ if MFZentrumY.IsEnabled Then Warnlog "- Center Y should not be enabled"
+ MFWinkel.SetText "45"
+ Winkel_1 = MFWinkel.GetText
+ TabTransparenz.OK
+ sleep 2
+ FormatArea
+ sleep 2
+ Kontext
+ Active.SetPage TabTransparenz
+ Kontext "TabTransparenz"
+ if TransparenzverlaufTyp.GetSelIndex <>2 Then
+ Warnlog "- Second menu-item is not choosen"
+ end if
+ TransparenzverlaufTyp.Select 3
+ if MFWinkel.GetText <> Winkel_1 then Warnlog "- The inserted value is not accepted"
+ if MFWinkel.GetText <> Winkel_1 Then TransparenzverlaufTyp.Select 3
+ if MFWinkel.IsEnabled Then Warnlog " - Angle should not be active when Radial is choosen"
+ sleep 1
+ MFZentrumX.SetText "30"
+ MFZentrumY.SetText "30"
+ TabTransparenz.OK
+ sleep 2
+ FormatArea
+ sleep 2
+ Kontext
+ Active.SetPage TabTransparenz
+ Kontext "TabTransparenz"
+ if MFZentrumX.GetText <> "30%" Then Warnlog "- Setted value for Center X is not applied."
+ if MFZentrumY.GetText <> "30%" Then Warnlog "- Setted value for Center Y is not applied."
+ MFRand.SetText "10"
+ MFStartwert.SetText "20"
+ MFEndwert.SetText "30"
+ TabTransparenz.OK
+ sleep 2
+ FormatArea
+ sleep 2
+ Kontext
+ Active.SetPage TabTransparenz
+ Kontext "TabTransparenz"
+ if MFRand.GetText <> "10%" Then Warnlog "- Border-value was not set."
+ if MFEndwert.GetText <> "30%" Then Warnlog "- End-value was not set."
+ if MFStartwert.GetText <> "20%" Then Warnlog "- Start-value was not set."
+ TabTransparenz.OK
+
+ Call hCloseDocument '/// close document ///'
+
+endcase 'tdFormatArea1
+
diff --git a/testautomation/graphics/optional/includes/global/g_arrangealign.inc b/testautomation/graphics/optional/includes/global/g_arrangealign.inc
new file mode 100644
index 000000000000..48c6599efa72
--- /dev/null
+++ b/testautomation/graphics/optional/includes/global/g_arrangealign.inc
@@ -0,0 +1,309 @@
+'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
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* Owner : wolfram.garten@oracle.com
+'*
+'* short description :
+'*
+'\******************************************************************************
+testcase tiDatei_Fuer_Anordnen_Erstellen
+
+ dim sTemp as string
+ dim i as integer
+ dim zaehler as integer
+ '/// This function creates the document, that will be used as reference and working object inthe following cases :-) ///'
+ '///'Dim Datei ' somewhere global :-) defined in calling sub! :sub im_107c_ ///
+ call hNewDocument
+ call sSelectEmptyLayout '/// new document ///'
+ if Dir(Datei)<>"" then app.Kill(Datei) ' kill old file
+ for Zaehler = 1 to 3 '/// create 3 overlapping objects ///'
+ Kontext
+ Select Case Zaehler
+ Case 1: WL_SD_Wuerfel
+ gMouseMove (20,5, 80,60) '/// cubicel 20,5, 80,60 ///
+ Printlog " Object start ---------------------- "+ Zaehler +" cubicel "
+ Case 2: WL_SD_RechteckVoll
+ gMouseMove (40,35, 90,90) '/// rectangel 40,35, 90,90 ///
+ Printlog " Object start ---------------------- "+ Zaehler +" rectangel "
+ Case 3: WL_SD_Torus
+ gMouseMove (1,35, 60,95) '/// donut ;-) 1,35, 60,95 ///
+ Printlog " Object start ---------------------- "+ Zaehler +" donut "
+ End Select
+ sleep (1)
+ FormatArea '/// assign different area properties for created objects (use rnd function)///'
+ sleep (1)
+ kontext
+ Select Case Zaehler
+ Case 1: active.SetPage TabFarbverlaeufe
+ kontext "TabFarbverlaeufe"
+ Tabelle.Select Int((Tabelle.GetItemCount * Rnd) + 1)
+ printlog "test tbo-------------------------------------------------color of object : "+Tabelle.GetSelText
+ TabFarbverlaeufe.OK
+ Case 2: active.SetPage TabSchraffuren
+ kontext "TabSchraffuren"
+ Tabelle.Select Int((Tabelle.GetItemCount * Rnd) + 1)
+ printlog "test tbo-------------------------------------------------color of object : "+Tabelle.GetSelText
+ TabSchraffuren.OK
+ Case 3: active.SetPage TabFarben
+ kontext "TabFarben"
+ Farbe.Select Int((Farbe.GetItemCount * Rnd) + 1)
+ printlog "test tbo-------------------------------------------------color of object : "+Farbe.GetSelText
+ TabFarben.OK
+ End Select
+ sleep 1
+ ContextPositionAndSize '/// save position and size values into varialbes ///'
+ sleep (1)
+ kontext
+ active.SetPage TabPositionAndSize
+ kontext "TabPositionAndSize"
+ '/// the variables : Ueber_Text_[1-3] get set here ! with x position of object///
+ Select Case Zaehler
+ Case 1: Ueber_Text_1 = PositionX.GetText : printlog "xpos: "+zaehler+": "+PositionX.GetText
+ Case 2: Ueber_Text_2 = PositionX.GetText : printlog "xpos: "+zaehler+": "+PositionX.GetText
+ Case 3: Ueber_Text_3 = PositionX.GetText : printlog "xpos: "+zaehler+": "+PositionX.GetText
+ End Select
+ TabPositionAndSize.OK
+ gMouseClick 96,5
+ next Zaehler
+ sleep 1
+ call hFileSaveAsKill (Datei) '/// save document ///'
+ printlog "OK saved at ", Datei
+ sleep 1
+ '/// select in default order and take Position X in mind ;-) ///'
+ '///+ has to be from bottom to top: cubicel, rectangel, donut ///'
+ sPrintCheckOrder (TRUE)
+ call hCloseDocument '/// close document ///'
+
+endcase 'tiDatei_Fuer_Anordnen_Erstellen
+'-------------------------------------------------------------------------------
+testcase tdContextSendBackward
+
+ dim sTemp as string
+ '/// open created document 'with 3 figures' ///'
+ if (hFileOpen (Datei)) then
+ sleep 10
+ sPrintCheckOrder (TRUE)
+ '/// select the middle object: rectangle, with keys: [TAB],[TAB] ///'
+ hTypeKeys ("<TAB><TAB>")
+ '/// Send Backward / [Strg]+[-] -> one level more to the back ///'
+ WL_TB_ANORDNUNG_WeiterNachHinten
+ '///+ has to be from bottom to top: rectangel cubicel donut ///'
+ sleep 2
+ sPrintCheckOrder
+ '/// deselect all ///'
+ hTypeKeys ("<escape><escape>")
+ sleep 2
+ '/// select the middle object: cubical, with keys: [TAB],[TAB] ///'
+ hTypeKeys ("<TAB><TAB>")
+ sleep 2
+ sTemp = fGetPositionX
+ if sTemp <> Ueber_Text_1 then
+ warnlog "Arrangement is wrong; is: "+sTemp+"; should: "+Ueber_Text_1+";"
+ end if
+ '/// close document ///'
+ Call hCloseDocument
+ endif
+ sleep 2
+
+endcase 'tdContextSendBackward
+'-------------------------------------------------------------------------------
+testcase tdContextBringForward
+
+ dim sTemp as string
+ '/// open created document 'with 3 figures' ///'
+ if (hFileOpen (Datei)) then
+ sleep 10
+ sPrintCheckOrder (TRUE)
+ '/// select the middle object: rectangle, with keys: [TAB],[TAB] ///'
+ hTypeKeys ("<TAB><TAB>")
+ '/// Bring Forward / [Strg]+[+] -> one level more to the front ///'
+ WL_TB_ANORDNUNG_WeiterNachVorn
+ '/// has to be from bottom to top: cubicel donut rectangel ///'
+ sleep 1
+ sPrintCheckOrder
+ '/// select the middle object: donut, with keys: [TAB],[TAB] ///'
+ hTypeKeys ("<TAB><TAB>")
+ sleep 2
+ sTemp = fGetPositionX
+ if sTemp <> Ueber_Text_3 then
+ warnlog "Arrangement is wrong; is: "+sTemp+"; should: "+Ueber_Text_3+";"
+ end if
+ sleep 1
+ '/// close document ///'
+ Call hCloseDocument
+ endif
+
+endcase 'tdContextBringForward
+'-------------------------------------------------------------------------------
+testcase tdContextSendToBack
+
+ dim sTemp as string
+ '/// open created document 'with 3 figures' ///'
+ if (hFileOpen (Datei)) then
+ sleep 10
+ sPrintCheckOrder (TRUE)
+ '/// select the top object: donut, with keys: [TAB],[TAB],[TAB] ///'
+ hTypeKeys ("<TAB><TAB><TAB>")
+ '/// Send to Back / [Strg]+[Shift]+[-] -> backmost object ///'
+ OL_DRAW_GanzNachHinten
+ '/// has to be from bottom to top: rectangel cubicel donut ///'
+ sleep 3
+ sPrintCheckOrder
+ '/// select the middle object: cubical, with keys: [TAB],[TAB] ///'
+ hTypeKeys ("<TAB><TAB>")
+ sleep 1
+ sTemp = fGetPositionX
+ if sTemp <> Ueber_Text_1 then
+ warnlog "Arrangement is wrong; is: "+sTemp+"; should: "+Ueber_Text_1+";"
+ end if
+ sleep 3
+ '/// close document ///'
+ Call hCloseDocument
+ endif
+
+endcase 'tdContextSendToBack
+'-------------------------------------------------------------------------------
+testcase tdContextBringToFront
+
+ dim sTemp as string
+ '/// open created document 'with 3 figures' ///'
+ if (hFileOpen (Datei)) then
+ sleep 10
+ sPrintCheckOrder (TRUE)
+ '/// select the bottom object: cubical, with keys: [TAB] ///'
+ hTypeKeys ("<TAB>")
+ '/// Bring to Front / [Strg]+[Shift]+[+] -> frontmost object ///'
+ OL_DRAW_GanzNachVorn
+ '/// has to be from bottom to top: rectangel, donut, cubicel ///'
+ sPrintCheckOrder
+ '/// select the middle object: donut, with keys: [TAB],[TAB] ///'
+ hTypeKeys ("<TAB><TAB>")
+ sleep 1
+ sTemp = fGetPositionX
+ if sTemp <> Ueber_Text_3 then
+ warnlog "Arrangement is wrong; is: "+sTemp+"; should: "+Ueber_Text_3+";"
+ end if
+ sleep 3
+ '/// close document ///'
+ Call hCloseDocument
+ endif
+
+endcase 'tdContextBringToFront
+'-------------------------------------------------------------------------------
+testcase tdContextInFrontOfObject
+
+ dim sTemp as string
+ '/// open created document 'with 3 figures' ///'
+ if (hFileOpen (Datei)) then
+ sleep 10
+ sPrintCheckOrder (TRUE)
+ '/// select the top object: donut, with keys: [TAB],[TAB],[TAB] ///'
+ hTypeKeys ("<TAB><TAB><TAB>")
+ '/// In Front of object ///'
+ OL_DRAW_VorDasObjekt
+ '/// left click the cubicel with the mouse ///'
+ gMouseClick 50,5
+ '/// has to be from bottom to top: cubicel, donut, rectangel ///'
+ sPrintCheckOrder
+ sleep 1
+ '/// select the middle object: donut, with keys: [TAB],[TAB] ///'
+ hTypeKeys ("<TAB><TAB>")
+ sTemp = fGetPositionX
+ if sTemp <> Ueber_Text_3 then
+ printlog "DISABLED the WARNLOG, because mouseaction is not always the same :-( : Arrangement is wrong; is: "+sTemp+"; should: "+Ueber_Text_3+";"
+ end if
+ '/// close document ///'
+ Call hCloseDocument
+ endif
+
+endcase 'tdContextInFrontOfObject
+'-------------------------------------------------------------------------------
+testcase tdContextBehindObject
+
+ dim sTemp as string
+ '/// open created document 'with 3 figures' ///'
+ if (hFileOpen (Datei)) then
+ sleep 10
+ sPrintCheckOrder (TRUE)
+ '/// select the top object: donut, with keys: [TAB],[TAB],[TAB] ///'
+ hTypeKeys ("<TAB><TAB><TAB>")
+ '/// Behind object ///'
+ OL_DRAW_HinterDasObjekt
+ sleep 1
+ '/// left click the cubicel with the mouse ///'
+ gMouseClick 50,5
+ '/// has to be from bottom to top: donut, cubicel, rectangel ///'
+ sPrintCheckOrder
+ sleep 1
+ '/// select the bottom object: donut, with keys: [TAB] ///'
+ hTypeKeys ("<TAB>")
+ sTemp = fGetPositionX
+ if sTemp <> Ueber_Text_3 then
+ printlog "DISABLED the WARNLOG, because mouseaction is not always tthe same Arrangement is wrong; is: "+sTemp+"; should: "+Ueber_Text_3+";"
+ end if
+ '/// close document ///'
+ Call hCloseDocument
+ endif
+
+endcase 'tdContextBehindObject
+'-------------------------------------------------------------------------------
+testcase tdContextReverse
+
+ dim sTemp as string
+ dim sTemp2 as string
+ dim i as integer
+ '/// open created document 'with 3 figures' ///'
+ if (hFileOpen (Datei)) then
+ sleep 10
+ sPrintCheckOrder (TRUE)
+ '/// Edit->Select All ///'
+ EditSelectAll
+ sleep 3
+ '/// Reverse ///'
+ WL_TB_ANORDNUNG_Vertauschen
+ sPrintCheckOrder
+ '/// select in default order and take Position X in mind ;-) ///'
+ hTypeKeys ("<escape><escape>")
+ for i = 1 to 3
+ hTypeKeys ("<TAB>")
+ sTemp = fGetPositionX
+ Select Case i
+ Case 1: sTemp2 = Ueber_Text_3
+ Case 2: sTemp2 = Ueber_Text_2
+ Case 3: sTemp2 = Ueber_Text_1
+ End Select
+ if sTemp <> sTemp2 then
+ warnlog " - " + i + " Arrangement is wrong; is: "+sTemp+"; should: "+sTemp2+";"
+ end if
+ next i
+ '/// close document ///'
+ Call hCloseDocument '/// close document ///'
+ endif
+
+endcase 'tdContextReverse
+'-------------------------------------------------------------------------------
+
diff --git a/testautomation/graphics/optional/includes/global/g_autocorrection.inc b/testautomation/graphics/optional/includes/global/g_autocorrection.inc
new file mode 100644
index 000000000000..731c9e0ed21f
--- /dev/null
+++ b/testautomation/graphics/optional/includes/global/g_autocorrection.inc
@@ -0,0 +1,460 @@
+'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
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* Owner : wolfram.garten@oracle.com
+'*
+'* short description :
+'*
+'*******************************************************************
+'*
+' #1 tToolsAutocorrectReplace
+' #1 tToolsAutocorrectExceptions
+' #1 tToolsAutocorrectCustomQuotes
+' #1 tToolsAutocorrectOption
+'*
+'\*******************************************************************
+
+' Tools->Autocorrect...
+' Replace; Exceptions; Options; Custom Quotes
+' these are Language
+' dependant in the
+' listbox above!!
+' box only enabled, if the both tabpages are selected ...
+
+testcase tToolsAutocorrectReplace
+
+ dim i as integer
+ dim x as integer
+ dim iTemp as integer
+
+ Call hNewDocument
+
+ ToolsAutocorrect
+ Kontext
+ active.SetPage TabErsetzung
+ Kontext "TabErsetzung"
+ iTemp = WelcheSprache.GetItemCount
+ for i = 1 to iTemp
+ WelcheSprache.select i
+ sleep 1
+ x = Liste.getItemCount
+ ' results from an english version:
+ ' - 28: English (UK): 807
+ ' - 29: English (USA): 807
+ ' - 38: French (France): 304
+ ' - 43: German (Germany): 100
+ ' - 102: Spanish (Spain): 353
+ if (x <> 0) then
+ printlog " - " + i + ": " + WelcheSprache.getSelText + ": " + x
+ ' printlog " " + Liste.getItemText (5,1) + " - " + Liste.getItemText (5,2)
+ endif
+ next i
+ TabErsetzung.OK
+
+ hCloseDocument
+endcase
+
+testcase tToolsAutocorrectExceptions
+ dim i as integer
+ dim x as integer
+ dim y as integer
+ dim iTemp as integer
+
+ Call hNewDocument
+
+ ToolsAutocorrect
+ Kontext
+ active.SetPage TabAusnahmen
+ Kontext "TabAusnahmen"
+ iTemp = WelcheSprache.GetItemCount
+ for i = 1 to iTemp
+ WelcheSprache.select i
+ sleep 1
+ x = AbkuerzungenListe.getItemCount
+ ' results from an english version:
+ ' - 28: English (UK): 120
+ ' - 28: English (UK): 7
+ ' - 29: English (USA): 120
+ ' - 29: English (USA): 7
+ ' - 38: French (France): 50
+ ' - 38: French (France): 1
+ ' - 43: German (Germany): 123
+ ' - 43: German (Germany): 20
+ ' - 102: Spanish (Spain): 115
+ ' - 102: Spanish (Spain): 1
+ if (x <> 0) then
+ printlog " - " + i + ": " + WelcheSprache.getSelText + ": " + x
+ ' printlog " " + AbkuerzungenListe.getItemText (5)
+ endif
+ y = WoerterListe.getItemCount
+ if (y <> 0) then
+ printlog " - " + i + ": " + WelcheSprache.getSelText + ": " + y
+ ' printlog " " + WoerterListe.getItemText (5)
+ endif
+ next i
+ TabAusnahmen.OK
+
+ hCloseDocument
+endcase
+
+'-------------------------------------------------------------------------------
+testcase tToolsAutocorrectCustomQuotes(bSimple as boolean)
+
+ ' bSinple = true: use simple quotes ;; else Double Quotes
+ Dim Vorn$
+ Dim Hinten$
+ Dim Normal$
+ dim sTemp as string
+ dim sFileName as string
+
+ if (gApplication = "IMPRESS") then
+ ExtensionString = "odp"
+ else
+ ExtensionString = "odg"
+ end if
+
+ if iSprache = "1" OR iSprache = "33" OR iSprache = "34" OR iSprache = "36" OR iSprache = "39" OR iSprache = "46" OR iSprache = "48" OR iSprache = "49" OR iSprache = "50" OR iSprache = "55" then
+ sFileName = (ConvertPath ( gTesttoolPath + "graphics\required\input\rightfont" & iSprache & "." + ExtensionString ))
+ elseif bAsianLan = true then
+ Printlog "Language-file for Asian language " & iSprache & " is missing. Using standard instead."
+ sFileName = (ConvertPath ( gTesttoolPath + "graphics\required\input\rightfont." + ExtensionString))
+ else
+ warnlog "Language-file for language " & iSprache & " is missing. Using standard instead."
+ sFileName = (ConvertPath ( gTesttoolPath + "graphics\required\input\rightfont." + ExtensionString))
+ endif
+
+ if FileExists ( sFileName ) = FALSE then
+ warnlog "The language-file was not found or accessible! The test ends."
+ goto endsub
+ endif
+
+ 'HDE has same problems in w_106a.inc ;-) !!! migrate ?!?! ///'
+ Call hNewDocument
+
+ hFileOpen sFileName
+ printlog "File opened: " + sFileName
+ Sleep 3
+
+ call fMakeDocumentWritable
+
+ if bSimple then
+ Printlog "- Tools/Autocorrect -single quotes"
+ Normal$ = Chr(39)
+ select case iSprache
+ case 01 : Vorn$ = Chr(8216) : Hinten$ = Chr(8217)
+ case 03 : Vorn$ = Chr(8216) : Hinten$ = Chr(8217)
+ case 07 : qaerrorlog "Test impossible. No quotes in russian!"
+ hCloseDocument
+ goto endsub
+ case 31 : Vorn$ = Chr(8218) : Hinten$ = Chr(8216)
+ case 33 : Vorn$ = Chr(8216) : Hinten$ = Chr(8217)
+ case 34 : Vorn$ = Chr(8216) : Hinten$ = Chr(8217)
+ case 36 : Vorn$ = Chr(187) : Hinten$ = Chr(171)
+ case 39 : Vorn$ = Chr(8216) : Hinten$ = Chr(8217)
+ case 45 : Vorn$ = Chr(8217) : Hinten$ = Chr(8217)
+ case 46 : Vorn$ = Chr(8217) : Hinten$ = Chr(8217)
+ case 48 : Vorn$ = Chr(8216) : Hinten$ = Chr(8217)
+ case 49 : Vorn$ = Chr(8218) : Hinten$ = Chr(8216)
+ case 50 : Vorn$ = Chr(8216) : Hinten$ = Chr(8217)
+ case 55 : Vorn$ = Chr(8216) : Hinten$ = Chr(8217)
+ case 81, 82, 86, 88 : Vorn$ = Chr(8216) : Hinten$ = Chr(8217) ' Asian
+ case else : Warnlog "- Nothing prepared for this language, but I run: take the warnlogs an insert the numbers here.: "+iSprache
+ Vorn$ = Chr(8216) : Hinten$ = Chr(8217)
+ end select
+ else
+ Printlog "- Tools/Autocorrect -double quotes"
+ Normal$ = Chr(34)
+ select case iSprache
+ case 01 : Vorn$ = Chr(8220) : Hinten$ = Chr(8221)
+ case 03 : Vorn$ = Chr(8220) : Hinten$ = Chr(8221)
+ case 07 : qaerrorlog "Test not possible. No quotes in russian !"
+ Call hCloseDocument
+ goto endsub
+ case 31 : Vorn$ = Chr(8222) : Hinten$ = Chr(8220)
+ case 33 : Vorn$ = Chr(171) : Hinten$ = Chr(187)
+ case 34 : Vorn$ = Chr(8220) : Hinten$ = Chr(8221)
+ case 36 : Vorn$ = Chr(8222) : Hinten$ = Chr(8221)
+ case 39 : Vorn$ = Chr(8220) : Hinten$ = Chr(8221)
+ case 45 : Vorn$ = Chr(8221) : Hinten$ = Chr(8221)
+ case 46 : Vorn$ = Chr(8221) : Hinten$ = Chr(8221)
+ case 48 : Vorn$ = Chr(8222) : Hinten$ = Chr(8221)
+ case 49 : Vorn$ = Chr(8222) : Hinten$ = Chr(8220)
+ case 50 : Vorn$ = Chr(8220) : Hinten$ = Chr(8221)
+ case 55 : Vorn$ = Chr(8220) : Hinten$ = Chr(8221)
+ case 81, 82, 86, 88 : Vorn$ = Chr(8220) : Hinten$ = Chr(8221) ' Asian
+ case else : Warnlog "- Nothing prepared for this language: "+iSprache
+ goto endsub
+ end select
+ endif
+ Printlog " - replace quotes" '------------------------------------------------------------------------------------------
+ ToolsAutocorrect
+ Kontext
+ active.SetPage TabLocalizedOptions
+ Kontext "TabLocalizedOptions"
+ if bSimple then
+ SingleQuotesReplace.Check
+ else
+ DoubleQuotesReplace.Check
+ DoubleQuotesDefault.Click
+ endif
+ TabLocalizedOptions.OK
+ sleep 5
+ gMouseClick 50,50
+ sleep 5
+ hTextrahmenErstellen ( Normal$ + "Hallo" + Normal$ + " ",20,20,60,30)
+ sleep 5
+ hTypeKeys ("<Home><Shift Right>")
+ sleep 5
+ EditCopy
+ sTemp = GetClipboardText
+ if (sTemp <> Vorn$) then
+ Warnlog "The beginning quote seems wrong. Should be :'" + Vorn$ +"':"+ASC(vorn$)+ ": but it is = :'" + sTemp +"':"+ASC(sTemp)+":"
+ endif
+ sleep 1
+ hTypeKeys "<End><Left><Shift Left>"
+ Sleep 1
+ EditCopy
+ sTemp = GetClipboardText
+ if (sTemp <> Hinten$) then
+ Warnlog "The end quote seems wrong. Should be :" + Hinten$ +":"+ASC(Hinten$) +": but it is :" + sTemp + ":"+ASC(sTemp)+":"
+ endif
+
+ hTypeKeys "<Home><Shift End><Delete>"
+
+ Printlog " - dont replace quotes" '------------------------------------------------------------------------------------------
+ ToolsAutocorrect
+ Kontext
+ Active.SetPage TabLocalizedOptions
+ Kontext "TabLocalizedOptions"
+ if bSimple then
+ SingleQuotesReplace.Uncheck
+ else
+ DoubleQuotesReplace.Uncheck
+ endif
+ TabLocalizedOptions.OK
+ sleep 1
+ gMouseClick 50,50
+ sleep 1
+ hTextrahmenErstellen ( Normal$ + "Hello" + Normal$ + " ",20,20,60,30)
+ sleep 1
+ hTypeKeys "<Home><Shift Right>"
+ Sleep 1
+ EditCopy
+ sTemp = GetClipboardText
+ if (sTemp <> Normal$) then
+ Warnlog "The beginning quote seems wrong. Should be :'" + Vorn$ +"':"+ASC(vorn$)+ ": but it is = :'" + sTemp +"':"+ASC(sTemp)+":"
+ endif
+
+ hTypeKeys "<End><Left><Shift Left>"
+ Sleep 1
+ EditCopy
+ sTemp = GetClipboardText
+ if (sTemp <> Normal$) then
+ Warnlog "The end quote seems wrong. Should be :" + Hinten$ +":"+ASC(Hinten$) +": but it is :" + sTemp + ":"+ASC(sTemp)+":"
+ endif
+ hTypeKeys "<Home><Shift End><Delete>"
+
+ Printlog " - replace quotes" '------------------------------------------------------------------------------------------
+ ToolsAutocorrect
+ Kontext
+ active.SetPage TabLocalizedOptions
+ Kontext "TabLocalizedOptions"
+ if bSimple then
+ SingleQuotesReplace.Check
+ SingleQuotesStart.Click
+ else
+ DoubleQuotesReplace.Check
+ DoubleQuotesStart.Click
+ endif
+ Kontext "Sonderzeichen"
+ sleep 1
+ Schriftliste.TypeKeys "<Home>"
+ Schriftliste.TypeKeys "<Right>", 91 '123
+ sleep 1
+ Sonderzeichen.OK
+
+ Kontext "TabLocalizedOptions"
+ if bSimple then
+ SingleQuotesEnd.Click
+ else
+ DoubleQuotesEnd.Click
+ endif
+ Kontext "Sonderzeichen"
+ sleep 1
+ Schriftliste.TypeKeys "<Home>"
+ Schriftliste.TypeKeys "<Right>", 93 '125
+ sleep 1
+ Sonderzeichen.OK
+
+ Kontext "TabLocalizedOptions"
+ TabLocalizedOptions.OK
+ sleep 5
+ gMouseClick 50,50
+ sleep 5
+ hTextrahmenErstellen ( Normal$ + "Hello" + Normal$ + " ",20,20,60,30)
+ sleep 2
+ hTypeKeys "<Home><Shift Right>"
+ Sleep 5
+ EditCopy
+ sTemp = GetClipboardText
+ if (sTemp <> Chr(123)) then
+ Warnlog "Beginning quote is wrong. It should be :" + Chr (123) + ":123: but it is = " + sTemp +":"+ASC(sTemp)+":"
+ endif
+
+ hTypeKeys "<End><Left><Shift Left>"
+ Sleep 1
+ EditCopy
+ sTemp = GetClipboardText
+ if (sTemp <> Chr(125)) then
+ Warnlog "The end quote is wrong, it should be :" + Chr (125) + ":125: but it is = " + sTemp +":"+ASC(sTemp)+":"
+ endif
+ hTypeKeys "<Home><Shift End><Delete>"
+
+ Printlog " - back to standard" '------------------------------------------------------------------------------------------
+ ToolsAutocorrect
+ Kontext
+ active.SetPage TabLocalizedOptions
+ Kontext "TabLocalizedOptions"
+ if bSimple then
+ SingleQuotesReplace.Check
+ SingleQuotesDefault.Click
+ else
+ DoubleQuotesReplace.Check
+ DoubleQuotesDefault.Click
+ endif
+
+ TabLocalizedOptions.OK
+ sleep 1
+ hTextrahmenErstellen ( Normal$ + "Hello" + Normal$ + " ",20,20,60,30)
+ sleep 2
+ hTypeKeys "<Home><Shift Right>"
+ Sleep 1
+ EditCopy
+ sTemp = GetClipboardText
+ if (sTemp <> Vorn$) then
+ Warnlog "The beginning quote seems wrong. Should be :" + Vorn$ +":"+ASC(vorn$)+ ": but it is = :" + sTemp +":"+ASC(sTemp)+":"
+ endif
+
+ hTypeKeys "<End><Left><Shift Left>"
+ Sleep 1
+ EditCopy
+ sTemp = GetClipboardText
+ if (sTemp <> Hinten$) then
+ Warnlog "The end quote seems wrong. Should be :" + Hinten$ +":"+ASC(Hinten$) +": but it is :" + sTemp + ":"+ASC(sTemp)+":"
+ endif
+ hTypeKeys "<Home><Shift End><Delete>"
+
+ ToolsAutocorrect
+ Kontext
+ active.SetPage TabLocalizedOptions
+ Kontext "TabLocalizedOptions"
+ if bSimple then
+ SingleQuotesReplace.UnCheck
+ else
+ DoubleQuotesReplace.UnCheck
+ endif
+ TabLocalizedOptions.OK
+ sleep 1
+
+ hCloseDocument
+endcase
+
+'-------------------------------------------------------------------------------
+testcase tToolsAutocorrectOption
+
+ const cEntryCount = 7
+ dim i as integer
+ dim iEntryCount as integer
+ dim sEntries (20, 2) as string
+ dim bState as boolean
+
+ ' this test relies on the following order of entries!!:
+ sEntries (1,1) = "Use replacement table"
+ sEntries (1,2) = "(C) "
+ sEntries (2,1) = "Correct TWo INitial CApitals"
+ sEntries (2,2) = "ABer "
+ sEntries (3,1) = "Capitalize first letter of every sentence"
+ sEntries (3,2) = "Hello. this is a sentence. "
+ sEntries (4,1) = "Automatic *bold* and _underline_"
+ sEntries (4,2) = "*Hello* " '"_Hello_ "
+ sEntries (5,1) = "URL Recognition"
+ sEntries (5,2) = "It is www.ksta.de "
+ 'sEntries (6,1) = "Replace 1st... with 1^st..."
+ 'sEntries (6,2) = "1st "
+ 'sEntries (7,1) = "Replace 1/2 ... with û ..."
+ 'sEntries (7,2) = "1/2 "
+ sEntries (6,1) = "Replace dashes"
+ sEntries (6,2) = "Hello - Hrbert "
+ sEntries (7,1) = "Ignore double spaces"
+ sEntries (7,2) = "Hello this is 2 blanks "
+
+ Printlog "- Tools / Autocorrect -options"
+ Call hNewDocument()
+ callAutocorrectOptions
+
+ iEntryCount = Einstellungen.getItemCount
+ if (iEntryCount <> cEntryCount) then
+ warnLog "Unexpected count of entries in Listbox: expected: '" + cEntryCount + "' actual: '" + iEntryCount + "'"
+ for i = 1 to iEntryCount
+ Printlog " " + i + " - '" + sEntries (i,1) + "' ?= '" + Einstellungen.getItemText(1) + "'"
+ next i
+ endif
+ TabOptionen.OK
+
+ for i = 1 to cEntryCount
+ callAutocorrectOptions
+ Printlog " " + i + " - '" + sEntries (i,1) + "' ?= '" + Einstellungen.getItemText(i) + "'"
+ bState = (i <> cEntryCount)
+ Einstellungen.select(i)
+ if (bState <> Einstellungen.isChecked) then
+ Warnlog " Entry is '" + bState + "' per default - will be '" + bState + "' now!"
+ end if
+ ' first test the opposite default value
+ if bState then
+ Einstellungen.UnCheck
+ else
+ Einstellungen.Check
+ endif
+ TabOptionen.OK
+ sCheckCheck (i, sEntries(i,2), not bState)
+ ' now test and set the default value
+ callAutocorrectOptions
+ Einstellungen.select(i)
+ if bState then
+ Einstellungen.Check
+ else
+ Einstellungen.UnCheck
+ endif
+ TabOptionen.OK
+ sCheckCheck (i, sEntries(i,2), bState)
+ next i
+
+ hCloseDocument
+ sleep 1
+endcase
+
+'-------------------------------------------------------------------------------
diff --git a/testautomation/graphics/optional/includes/global/g_character.inc b/testautomation/graphics/optional/includes/global/g_character.inc
new file mode 100644
index 000000000000..a9d578665c5a
--- /dev/null
+++ b/testautomation/graphics/optional/includes/global/g_character.inc
@@ -0,0 +1,714 @@
+'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
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* Owner : wolfram.garten@oracle.com
+'*
+'* short description :
+'*
+'*******************************************************************
+'*
+' #1 tFormatCharacter
+' #1 tDialogCharacter
+' #1 tSetFormatCharacter
+' #1 tGetFormatCharacter
+'*
+'\*******************************************************************
+testcase tFormatCharacter
+
+ dim sTemp as string
+ dim iTemp as integer
+
+ '/// open application ///'
+ Call hNewDocument
+ sleep 1
+
+ '/// create a textframe with content ///'
+ hTextrahmenErstellen ("This is a check, a check, a check.",10,10,60,30)
+ '/// type with keys [strg]+[home] [shift]+[end] to select the inserted text ///'
+ hTypeKeys "<MOD1 HOME><shift end>"
+ sleep 1
+
+ '/// Format->Character ///'
+ FormatCharacter
+ sleep 1
+ '/// switch to tabpage 'Font' ///'
+ Kontext
+ Messagebox.SetPage TabFont
+ Kontext "TabFont"
+ sleep 1
+
+ '/// switch to tabpage 'Font Effects' ///'
+ Kontext
+ Messagebox.SetPage TabFontEffects
+ kontext "TabFontEffects"
+ sleep 1
+
+ '/// switch to tabpage 'Position' ///'
+ Kontext
+ Messagebox.SetPage TabFontPosition
+ Kontext "TabFontPosition"
+ sleep 1
+
+ '/// close dialog 'Character' with 'OK' ///'
+ TabFontPosition.OK
+ '/// close application ///'
+ Call hCloseDocument
+
+endcase 'tFormatCharacter
+'---------------------------------------------------------
+testcase tDialogCharacter
+
+ Dim i as integer
+ Dim y as integer
+ Dim z as integer
+ Dim CountOfThem as integer
+ Dim CountOfColors as integer
+ Dim Xtext as string
+ Dim Tcolor as string
+ Dim TestColorString as string
+ Dim ThisIsMyTextFromControl as string
+ Dim Asiansupportsetting as string
+
+ Printlog "DialogCharacter starts"
+
+ Call hNewDocument
+
+ sleep 3
+ ToolsOptions
+ hToolsOptions ( "LanguageSettings", "Languages" )
+
+ if Aktivieren.IsChecked then '/// Check in what state Asian support is ///'
+ Asiansupportsetting = TRUE
+ else
+ Asiansupportsetting = FALSE
+ Aktivieren.Check '/// Activate if not already activated ///'
+ end if
+
+ Kontext "ExtrasOptionenDlg"
+ ExtrasOptionenDlg.OK
+ Sleep (3)
+
+ Kontext
+
+ Call hTextrahmenErstellen ( "Some text in a box.", 20, 20, 50, 50 )
+
+ FormatCharacter
+ sleep 1
+ Kontext '"Active" ' insert this, perhaps another
+ Active.SetPage TabFont ' tabpage is active at open
+ Kontext "TabFont"
+ CountOfThem = FontWest.GetItemCount
+ for y = 1 to CountOfThem
+ FontWest.Select y
+ Xtext = FontWest.GetSelText
+' printlog "This FontWest is: " & Xtext
+ next y
+
+ CountOfThem = StyleWest.GetItemCount
+ for y = 1 to CountOfThem
+ StyleWest.Select y
+ Xtext = StyleWest.GetSelText
+' printlog "This StyleWest is: " & Xtext
+ next y
+
+ CountOfThem = SizeWest.GetItemCount
+ for y = 1 to CountOfThem
+ SizeWest.Select y
+ Xtext = SizeWest.GetSelText
+' printlog "This SizeWest is: " & Xtext
+ next y
+
+ CountOfThem = LanguageWest.GetItemCount
+ for y = 1 to CountOfThem
+ LanguageWest.Select y
+ Xtext = LanguageWest.GetSelText
+' printlog "This LanguageWest is: " & Xtext
+ next y
+
+ CountOfThem = FontEast.GetItemCount
+ for y = 1 to CountOfThem
+ FontEast.Select y
+ Xtext = FontEast.GetSelText
+' printlog "This FontEast is: " & Xtext
+ next y
+
+ CountOfThem = StyleEast.GetItemCount
+ for y = 1 to CountOfThem
+ StyleEast.Select y
+ Xtext = StyleEast.GetSelText
+' printlog "This StyleEast is: " & Xtext
+ next y
+
+ CountOfThem = SizeEast.GetItemCount
+ for y = 1 to CountOfThem
+ SizeEast.Select y
+ Xtext = SizeEast.GetSelText
+' printlog "This SizeEast is: " & Xtext
+ next y
+
+ CountOfThem = LanguageEast.GetItemCount
+ for y = 1 to CountOfThem
+ LanguageEast.Select y
+ Xtext = LanguageEast.GetSelText
+' printlog "This LanguageEast is: " & Xtext
+ next y
+
+ Kontext
+ Active.SetPage TabFontEffects
+ Kontext "TabFontEffects"
+ if NOT Outline.IsChecked then
+ Outline.Check
+ end if
+
+ if NOT Shadow.IsChecked then
+ Shadow.Check
+ end if
+
+ CountOfThem = Underline.GetItemCount
+ CountOfColors = Color.GetItemCount
+
+ for y = 2 to CountOfThem
+ Underline.Select y
+ Xtext = Underline.GetSelText
+' printlog "This Underline is: " & Xtext
+
+ for i = 1 to CountOfColors
+ Color.Select i
+ TestColorString = Color.GetSelText
+' printlog "This Color is: " & TestColorString
+ next i
+ next y
+
+ CountOfThem = StrikeThrough.GetItemCount
+ for y = 2 to CountOfThem
+ StrikeThrough.Select y
+ IndividualWords.UnCheck
+ Xtext = StrikeThrough.GetSelText
+' printlog "The StrikeThrough is: " & Xtext
+
+ for i = 1 to CountOfColors
+ Color.Select i
+ TestColorString = Color.GetSelText
+' printlog "And the Color is: " & TestColorString
+ next i
+ next y
+
+ IndividualWords.Check
+ printlog "Individual Words = On"
+
+ CountOfThem = StrikeThrough.GetItemCount
+ for y = 2 to CountOfThem
+ StrikeThrough.Select y
+ Xtext = StrikeThrough.GetSelText
+' printlog "The StrikeThrough is: " & Xtext
+
+ for i = 1 to CountOfColors
+ Color.Select i
+ TestColorString = Color.GetSelText
+' printlog "And the Color is: " & TestColorString
+ next i
+ next y
+
+ CountOfThem = Emphasis.GetItemCount
+ for y = 2 to CountOfThem
+ Emphasis.Select y
+ Xtext = Emphasis.GetSelText
+' printlog "The Emphasis is: " & Xtext
+
+ for i = 1 to CountOfColors
+ Color.Select i
+ TestColorString = Color.GetSelText
+' printlog "And the Color is: " & TestColorString
+ next i
+ next y
+
+ CountOfThem = Position.GetItemCount
+ for y = 1 to CountOfThem
+ Position.Select y
+ Xtext = Position.GetSelText
+' printlog "The Position is: " & Xtext
+ for i = 1 to CountOfColors
+ Color.Select i
+ TestColorString = Color.GetSelText
+' printlog "And the Color is: " & TestColorString
+ next i
+ next y
+
+ CountOfThem = FontColor.GetItemCount
+ for z = 1 to CountOfThem
+ FontColor.Select z
+ TestColorString = FontColor.GetSelText
+' printlog "The FontColor is: " & TestColorString
+ next z
+
+ CountOfThem = Relief.GetItemCount
+ TestColorString = Color.GetSelText
+ for y = 1 to CountOfThem
+ Relief.Select y
+ Xtext = Relief.GetSelText
+ TestColorString = Color.GetSelText
+' printlog "The Relief is: " & Xtext
+ next y
+
+ Kontext
+ Active.SetPage TabFontPosition '/// Changes the active tab to "Position"
+ Kontext "TabFontPosition"
+ printlog "TabFontPosition"
+ SuperScript.Check
+ Super.Check
+ RelativeFontSize.ToMin '/// Testing the "Relative Font Size"-Listbox
+ ThisIsMyTextFromControl = RelativeFontSize.GetText
+' printlog "The Relative Font Size minimum is: " & ThisIsMyTextFromControl
+ for y = 1 to 99
+ RelativeFontSize.TypeKeys "<UP>"
+ ThisIsMyTextFromControl = RelativeFontSize.GetText
+' printlog "The Relative Font Size is: " & ThisIsMyTextFromControl
+ next y
+
+ Automatic.Check
+ ScaleWith.ToMin '/// Testing the "Scale With"-Listbox
+ ThisIsMyTextFromControl = ScaleWith.GetText
+ printlog "ScaleWith minimum is:" & ThisIsMyTextFromControl
+ ' ScaleWith.TypeKeys "<TAB>"
+ for y = 1 to 100
+ ScaleWith.TypeKeys "<UP>"
+ ThisIsMyTextFromControl = ScaleWith.GetText
+' printlog "ScaleWith is:" & ThisIsMyTextFromControl
+ next y
+
+ Normal.Check
+ Subscript.Check
+
+ RelativeFontSize.ToMin '/// Testing the "Reliative Font Size"-Listbox again but this time
+ ThisIsMyTextFromControl = RelativeFontSize.GetText '/// with "Subscript" and "Normal" Checked
+ printlog "The Relative Font Size minimum is: " & ThisIsMyTextFromControl
+ for y = 1 to 99
+ RelativeFontSize.TypeKeys "<UP>"
+ ThisIsMyTextFromControl = RelativeFontSize.GetText
+' printlog "The Relative Font Size is: " & ThisIsMyTextFromControl
+ next y
+
+ Automatic.Check
+
+ ScaleWith.ToMin '/// Testing the "ScaleWith"-Listbox
+ ThisIsMyTextFromControl = ScaleWith.GetText
+ printlog "The ScaleWith Size is: " & ThisIsMyTextFromControl
+ for y = 1 to 100
+ ScaleWith.TypeKeys "<UP>"
+ ThisIsMyTextFromControl = ScaleWith.GetText
+' printlog "The ScaleWith Size is: " & ThisIsMyTextFromControl
+ next y
+
+ ThisIsMyTextFromControl = Spacing.GetSelText '/// Testing the "Spacing"-ListBox
+ printlog "The Spacing is first: " & ThisIsMyTextFromControl
+ for y = 2 to 3
+ Spacing.Select y
+ ThisIsMyTextFromControl = Spacing.GetSelText
+ printlog "The Spacing is: " & ThisIsMyTextFromControl
+ ThisIsMyTextFromControl = SpacingBy.GetText '/// Testing the "Spacing By"-Scrollbox
+' printlog "The SpacingBy Size minimum is: " & ThisIsMyTextFromControl
+ SpacingBy.ToMin
+ for z = 1 to 4
+ SpacingBy.More
+ ThisIsMyTextFromControl = SpacingBy.GetText
+' printlog "The SpacingBy Size is: " & ThisIsMyTextFromControl
+ next z
+ PairKerning.Check
+ next y
+
+ Kontext "TabFontPosition"
+ TabFontPosition.Ok
+
+ if Asiansupportsetting = FALSE then
+ kontext
+ ToolsOptions
+ hToolsOptions ( "LanguageSettings", "Languages" )
+ Aktivieren.UnCheck '/// Deactivate if not already deactivated ///'
+ Printlog "Reseted the Asiansupport-value to it's original state"
+
+ Kontext "ExtrasOptionenDlg"
+ ExtrasOptionenDlg.OK
+ Sleep (3)
+
+' ActiveDeactivateAsianSupport = FALSE
+ end if
+
+ Printlog "DialogCharacter Ends"
+ Call hCloseDocument
+
+endcase 'tDialogCharacter
+'--------------------------------------------------------
+testcase tSetFormatCharacter
+
+ if iSprache = 48 then
+ qaerrorlog "Test not adapted to polish, 48."
+ goto endsub
+ endif
+ Dim i as integer
+ dim iWest as integer
+ dim iAsian as integer
+ dim iComplex as integer
+ dim bAsian as boolean
+ dim bComplex as boolean
+ dim sLanguage(500) as string
+ dim sFile as string
+ dim sTemp as string
+
+ if (gApplication = "IMPRESS") then
+ ExtensionString = "odp"
+ else
+ ExtensionString = "odg"
+ end if
+
+ sFile = convertPath(gTesttoolpath + "graphics\required\input\spellb_" + iSprache + "."+ExtensionString)
+ '/// create document, if it doesn't exist, else skip this case :-) ///'
+ if (dir(sFile)="") then
+ '/// open application ///'
+ Call hNewDocument
+
+ '/// activate all languages in options ///'
+ '///+ Tools->Options ///'
+ ToolsOptions
+ '///+ select tabpage 'Languages' from set 'Language Settings' ///'
+ hToolsOptions("LANGUAGESETTINGS","Languages")
+ kontext "TabSprachen"
+ '///+ save state and check checkbox 'Asian languages support' ///'
+ '/// if the language is Asian, skip this part ///'
+ printlog "iSprache = " + iSprache
+ if bAsianLan = FALSE then
+ bAsian = Aktivieren.isEnabled
+ Aktivieren.check
+ endif
+ '///+ save state and check checkbox 'Complex text layout (CTL) support' ///'
+ bComplex = ComplexScriptEnabled.isEnabled
+ ComplexScriptEnabled.check
+ '///+ close dialog 'Options' with OK ///'
+ Kontext "ExtrasOptionenDlg"
+ ExtrasOptionenDlg.OK
+
+ '/// get count of languages ///'
+ '///+ Format->Character ///'
+ FormatCharacter
+ sleep 1
+ Kontext
+ '///+ switch to tabpage 'Font' ///'
+ Messagebox.SetPage TabFont
+ kontext "TabFont"
+ sleep 1
+ '///+ get count of languages for Western/Asian/CTL fonts ///'
+ iWest = LanguageWest.getItemCount
+ iAsian = LanguageEast.getItemCount
+ iComplex = LanguageCTL.getItemCount
+ if bAsianLan = True then
+ if (iWest <> 144) then
+ Warnlog "Western text font languages count wrong; expected: '113' is: '" + iWest + "'"
+ else
+ Printlog "Western text font languages count: " + iWest
+ endif
+ if (iAsian <> 8) then
+ Warnlog "Asian text font languages count wrong; expected: '9' is: '" + iAsian + "'"
+ else
+ Printlog "Asian text font languages count : " + iAsian
+ endif
+ if (iComplex <> 50) then
+ Warnlog "CTL font languages count wrong; expected: '30' is: '" + iComplex + "'"
+ else
+ Printlog "CTL font languages count : " + iComplex
+ endif
+ else
+ if (iWest <> 113) then
+ Warnlog "Western text font languages count wrong; expected: '113' is: '" + iWest + "'"
+ else
+ Printlog "Western text font languages count: " + iWest
+ endif
+ if (iAsian <> 9) then
+ Warnlog "Asian text font languages count wrong; expected: '9' is: '" + iAsian + "'"
+ else
+ Printlog "Asian text font languages count : " + iAsian
+ endif
+ if (iComplex <> 30) then
+ Warnlog "CTL font languages count wrong; expected: '30' is: '" + iComplex + "'"
+ else
+ Printlog "CTL font languages count : " + iComplex
+ endif
+ endif
+ '///+ close dialog 'Character' with OK ///'
+ TabFont.Ok
+
+ WL_SD_TextEinfuegenDraw
+ gMouseMove ( 1, 1, 100, 100 )
+
+ '///+ print the language counts into the first line of the document ///'
+ hTypeKeys(" "+iWest+" "+iAsian+" "+iComplex+"<return>")
+
+
+ '/// set all languages to '[None]' ///'
+ '///+ Format->Character ///'
+ FormatCharacter
+ kontext "TabFont"
+ '///+ select '[None]' (should be the first entry in every listbox) ///'
+ LanguageWest.select 1
+ LanguageEast.select 1
+ LanguageCTL.select 1
+ '///+ close dialog 'Character' with OK ///'
+ TabFont.Ok
+
+ '/// print one line with language formated text for every language ///'
+ for i = 1 to iWest
+ '///+ Format->Character ///'
+ FormatCharacter
+ kontext "TabFont"
+ '///+ select the next language ///'
+ LanguageWest.select i
+ sTemp = LanguageWest.getItemText (i)
+ ListAppend(sLanguage(), sTemp)
+ '///+ close dialog 'Character' with OK ///'
+ TabFont.Ok
+ '///+ type [return][number of language in list][Tab][Language name][Tab] ///'
+ hTypeKeys(""+i+"<tab>"+sTemp+"<tab><return>")
+ next i
+
+ FormatCharacter
+ kontext "TabFont"
+ LanguageWest.select 1
+ LanguageEast.select 1
+ languageCTL.select 1
+ TabFont.Ok
+
+ for i = 1 to iAsian
+ FormatCharacter
+ Kontext
+ kontext "TabFont"
+ LanguageEast.select i
+ sTemp = LanguageEast.getItemText (i)
+ ListAppend(sLanguage(), sTemp)
+ TabFont.Ok
+ hTypeKeys(""+i+"<tab>"+sTemp+"<tab><return>")
+ next i
+
+ FormatCharacter
+ kontext "TabFont"
+ LanguageWest.select 1
+ LanguageEast.select 1
+ languageCTL.select 1
+ TabFont.Ok
+
+ for i = 1 to iComplex
+ FormatCharacter
+ Kontext
+ kontext "TabFont"
+ LanguageCTL.select i
+ sTemp = LanguageCTL.getItemText (i)
+ ListAppend(sLanguage(), sTemp)
+ TabFont.Ok
+ hTypeKeys(""+i+"<tab>"+sTemp+"<tab><return>")
+ next i
+
+ '/// save the created document & the languages list if they don't exists ///'
+ hFileSaveAs (sFile)
+ qaErrorLog "Created file. Please check it and then commit it! " + sTemp
+ sTemp = convertPath(gTesttoolpath + "graphics\required\input\spellb_" + iSprache + ".txt")
+ if (dir(sTemp)="") then
+ ListWrite(sLanguage(), sTemp,"utf8")
+ endif
+
+ '/// restore the options ///'
+ '///+ Tools->Options ///'
+ ToolsOptions
+ '///+ select tabpage 'Languages' from set 'Language Settings' ///'
+ hToolsOptions("LANGUAGESETTINGS","Languages")
+ kontext "TabSprachen"
+
+ '///+ restore state of checkbox 'Asian languages support' ///'
+ '/// if the language is Asian, skip this part ///'
+ if bAsianLan = FALSE then
+ if (bAsian <> TRUE) then
+ Aktivieren.UNcheck
+ endif
+ endif
+ '///+ restore state of checkbox 'Complex text layout (CTL) support' ///'
+ if (bComplex <> TRUE) then
+ ComplexScriptEnabled.UNcheck
+ endif
+ '///+ close dialog 'Options' with OK ///'
+ Kontext "ExtrasOptionenDlg"
+ ExtrasOptionenDlg.OK
+
+ '/// close application ///'
+ Call hCloseDocument
+ endif
+
+endcase 'tSetFormatCharacter
+'--------------------------------------------------------
+testcase tGetFormatCharacter
+
+ qaerrorlog "tGetFormatCharacter outcommented due to too many qaerrorlogs"
+ goto endsub
+ Dim i as integer
+ dim iWest(2) as integer
+ dim iAsian(2) as integer
+ dim iComplex(2) as integer
+ dim bAsian as boolean
+ dim bComplex as boolean
+ dim sLanguage(500) as string
+ dim sLanguageR(500) as string
+ dim sTemp as string
+ dim iTemp as integer
+ dim sSpellBooks(30) as string
+
+ if (gApplication = "IMPRESS") then
+ ExtensionString = "odp"
+ else
+ ExtensionString = "odg"
+ end if
+
+ '/// open the english document with all languages ///'
+ hDateiOeffnen (convertPath(gTesttoolpath + "graphics\required\input\spellb_" + iSprache + "."+ExtensionString)
+ ListRead(sLanguageR(), convertPath(gTesttoolpath + "graphics\required\input\spellb_1.txt"),"utf8")
+
+ '/// activate all languages in options ///'
+ '///+ Tools->Options ///'
+ ToolsOptions
+ '///+ select tabpage 'Languages' from set 'Language Settings' ///'
+ hToolsOptions("LANGUAGESETTINGS","Languages")
+ kontext "TabSprachen"
+ '///+ save state and check checkbox 'Asian languages support' ///'
+ bAsian = Aktivieren.isEnabled
+ Aktivieren.check
+ '///+ save state and check checkbox 'Complex text layout (CTL) support' ///'
+ bComplex = ComplexScriptEnabled.isEnabled
+ ComplexScriptEnabled.check
+ '///+ close dialog 'Options' with OK ///'
+ Kontext "ExtrasOptionenDlg"
+ ExtrasOptionenDlg.OK
+ sleep (1)
+ '/// get count of languages ///'
+ hTypeKeys("<tab><f2>")
+ '///+ first how many are in the reference document (printed in the first line)///'
+ hTypeKeys("<mod1 home><shift end>")
+ sleep (1)
+ editcopy
+ sTemp = getClipboard
+ iTemp = inStr(2,sTemp, " ")
+ iWest(1) = mid(sTemp, 2, iTemp-2)
+ i = inStr(iTemp+1,sTemp, " ")
+ iAsian(1) = mid(sTemp, iTemp+1, iTemp-i)
+ iComplex(1) = right(sTemp, Len(sTemp) - i)
+ sleep (1)
+ '///+ Format->Character ///'
+ FormatCharacter
+ sleep 1
+ Kontext
+ '///+ switch to tabpage 'Font' ///'
+ Messagebox.SetPage TabFont
+ kontext "TabFont"
+ sleep 1
+ '///+ get count of languages for Western/Asian/CTL fonts ///'
+ iWest(2) = LanguageWest.getItemCount
+ iAsian(2) = LanguageEast.getItemCount
+ iComplex(2) = LanguageCTL.getItemCount
+ if (iWest(2) <> iWest(1)) then
+ Warnlog "Western text font languages count wrong; expected: '" + iWest(1) + "' is: '" + iWest(2) + "'"
+ else
+ Printlog "Western text font languages count: " + iWest(2)
+ endif
+ if (iAsian(2) <> iAsian(1)) then
+ Warnlog "Asian text font languages count wrong; expected: '" + iAsian(1) + "' is: '" + iAsian(2) + "'"
+ else
+ Printlog "Asian text font languages count : " + iAsian(2)
+ endif
+ if (iComplex(2) <> iComplex(1)) then
+ Warnlog "CTL font languages count wrong; expected: '" + iComplex(1) + "' is: '" + iComplex(2) + "'"
+ else
+ Printlog "CTL font languages count : " + iComplex(2)
+ endif
+ '///+ close dialog 'Character' with OK ///'
+ TabFont.Ok
+
+ '/// write the language for every line in the current language ///'
+ hTypeKeys("<mod1 home><down><home>")
+ for i = 1 to iWest(2)
+ FormatCharacter
+ Kontext
+ kontext "TabFont"
+ iTemp = LanguageWest.getSelIndex
+ sTemp = LanguageWest.getSelText
+ ListAppend(sLanguage(), sTemp)
+ TabFont.Ok
+ '///+ type [end][number of language in list][Tab][Language name][down][home] ///'
+ hTypeKeys("<end>"+iTemp+"<tab>"+sTemp+"<down><home>")
+ next i
+
+ for i = 1 to iAsian(2)
+ FormatCharacter
+ Kontext
+ kontext "TabFont"
+ iTemp = LanguageEast.getSelIndex
+ sTemp = LanguageEast.getSelText
+ ListAppend(sLanguage(), sTemp)
+ TabFont.Ok
+ hTypeKeys("<end>"+iTemp+"<tab>"+sTemp+"<down><home>")
+ next i
+
+ for i = 1 to iComplex(2)
+ FormatCharacter
+ Kontext
+ kontext "TabFont"
+ iTemp = LanguageCTL.getSelIndex
+ sTemp = LanguageCTL.getSelText
+ ListAppend(sLanguage(), sTemp)
+ TabFont.Ok
+ hTypeKeys("<end>"+iTemp+"<tab>"+sTemp+"<down><home>")
+ next i
+
+ '/// save the created document & the languages list ///'
+ sTemp = convertPath(gOfficePath + "user\work\spellb_" + iSprache)
+ hFileSaveAsKill (sTemp)
+ sTemp = convertPath(gOfficePath + "user\work\spellb_" + iSprache + ".txt")
+ if (dir(sTemp)<>"") then
+ kill (sTemp)
+ endif
+ ListWrite(sLanguage(), sTemp,"utf8")
+
+ for i = 1 to ListCount(sLanguageR())
+ select case i
+ case 1:printlog " * Western text font languages"
+ case iWest(2)+1:printlog " * Asian text font languages"
+ case iWest(2)+iAsian(2)+1:printlog " * CTL font languages"
+ end select
+ if (sLanguageR(i) <> sLanguage(i)) then
+ if (instr(sLanguage(i), "[") > 0) then ' [None] - Entry ?
+ qaErrorlog "#i15863# - " + i + " '" + sLanguageR(i) + "' : '" + sLanguage(i) + "'"
+ else
+ qaErrorlog "#112362# - " + i + " '" + sLanguageR(i) + "' : '" + sLanguage(i) + "'"
+ endif
+ endif
+ next i
+
+ '/// close application ///'
+ Call hCloseDocument
+endcase 'tGetFormatCharacter
diff --git a/testautomation/graphics/optional/includes/global/g_clipboard.inc b/testautomation/graphics/optional/includes/global/g_clipboard.inc
new file mode 100644
index 000000000000..4c1900876565
--- /dev/null
+++ b/testautomation/graphics/optional/includes/global/g_clipboard.inc
@@ -0,0 +1,469 @@
+'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
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* Owner : wolfram.garten@oracle.com
+'*
+'* short description :
+'*
+'**************************************************************************************
+' #1 tiEditUndo
+' #1 tiEditRedo
+' #1 tiEditClipboard
+' #1 tiEditPasteSpecial_HTML
+' #1 tdEditPasteSpecial_Text
+' #1 tdEditPasteSpecial_Graphic
+' #1 tdEditPasteSpecial_Circle
+' #1 tiEditPasteSpecial
+'\*************************************************************************************
+
+testcase tiEditUndo
+
+ Dim sDatei as string
+ Dim Ueber_Text_1 as string
+
+ if (gApplication = "IMPRESS") then
+ ExtensionString = "odp"
+ else
+ ExtensionString = "odg"
+ end if
+
+ sDatei = gTesttoolPath + "graphics\required\input\leer."+ExtensionString
+
+ hFileOpen ConvertPath (sDatei)
+ sleep 5
+ printlog "Checking for readonly state. If so, make it editable."
+ sMakeReadOnlyDocumentEditable
+
+ hTypeKeys "<TAB><TAB>"
+ sleep 3
+ ContextPositionAndSize
+ Kontext
+ if Messagebox.exists (5) then
+ Messagebox.SetPage TabPositionAndSize
+ else
+ print "what"
+ endif
+ Kontext "TabPositionAndSize"
+ Ueber_Text_1=PositionX.GetText '/// defining variable for original position of object ///'
+ TabPositionAndSize.Cancel
+ sleep 2
+ Kontext "Toolbar"
+ Auswahl.Click
+ sleep 1
+ ContextArrangeBringBackward '/// Bring Object backward ///'
+ sleep 1
+ gMouseClick 60,60
+ sleep 1
+ Kontext "Toolbar"
+ Auswahl.Click
+ sleep 1
+ hTypeKeys "<TAB><TAB>"
+ Kontext "Toolbar"
+ Auswahl.Click
+ sleep 1
+ ContextPositionAndSize '/// Open Position and Size dialog, checking position ///'
+ Kontext
+ Messagebox.SetPage TabPositionAndSize
+ Kontext "TabPositionAndSize"
+ if PositionX=0 Then Warnlog " Command was not completely executed, and it could not be undone."
+ TabPositionAndSize.Cancel
+ sleep 2
+ gMouseClick 60,60
+ sleep 1
+
+ EditUndo '/// Edit Undo for BringBackward ///'
+ Sleep 2
+ gMouseClick 60,60
+ sleep 1
+ Kontext "Toolbar"
+ Auswahl.Click
+ hTypeKeys "<TAB><TAB>"
+ sleep 1
+ Kontext "Toolbar"
+ Auswahl.Click
+ ContextPositionAndSize '/// Again checking position using Position and Size dialog ///'
+ kontext
+ Messagebox.SetPage TabPositionAndSize
+ kontext "TabPositionAndSize"
+ if PositionX.GetText = Ueber_Text_1 then
+ printlog "OK, last order could be redone"
+ else
+ warnlog "Last order could not be redone"
+ end if
+ TabPositionAndSize.Cancel
+
+ Call hCloseDocument '/// Close document ///'
+
+endcase
+
+'-------------------------------------------------------------------------------
+testcase tiEditRedo
+
+ Dim Datei$
+ Dim Ueber_Text_1
+
+ if (gApplication = "IMPRESS") then
+ ExtensionString = "odp"
+ else
+ ExtensionString = "odg"
+ end if
+
+ Datei$ = gTesttoolPath + "graphics\required\input\leer."+ExtensionString
+
+ hFileOpen ConvertPath (Datei$) '/// Open test document (leer.od?) ///'
+ sleep 3
+ ' 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
+ sleep 1
+ gMouseClick 30,10
+ sleep 1
+ hTypeKeys "<TAB>"
+ sleep 2
+ ContextPositionAndSize
+ sleep 1
+ Kontext
+ Messagebox.SetPage TabPositionAndSize
+ Kontext "TabPositionAndSize"
+ Ueber_Text_1=PositionX.GetText
+ TabPositionAndSize.Cancel
+ sleep 1
+ hTypeKeys "<TAB>"
+ sleep 1
+ ContextArrangeBringBackward '/// move object behind other object ///'
+ sleep 1
+ gMouseClick 60,60
+ sleep 1
+ hTypeKeys "<TAB>"
+ sleep 1
+ ContextPositionAndSize
+ sleep 1
+ Kontext
+ Messagebox.SetPage TabPositionAndSize '/// checking new position values ///'
+ Kontext "TabPositionAndSize"
+ if PositionX.GetText = Ueber_Text_1 Then Warnlog " Nothing changed, so nothing can be undone"
+ TabPositionAndSize.Cancel
+ sleep 1
+ gMouseClick 60,60
+ EditUndo '/// Edit Undo///'
+ sleep 1
+ hTypeKeys "<TAB>"
+ sleep 1
+ ContextPositionAndSize
+ sleep 1
+ kontext
+ Messagebox.SetPage TabPositionAndSize '/// checking again position ///'
+ kontext "TabPositionAndSize"
+ if PositionX.GetText <> Ueber_Text_1 Then Warnlog " Undo didn't worked, so repeat last action wont work either"
+ TabPositionAndSize.Cancel
+ sleep 2
+ EditRedo '/// Edit Redo ///'
+ sleep 2
+ gMouseClick 60,60
+ sleep 2
+ hTypeKeys "<TAB>"
+ sleep 2
+ ContextPositionAndSize
+ sleep 1
+ kontext
+ Messagebox.SetPage TabPositionAndSize
+ kontext "TabPositionAndSize"
+ if PositionX.GetText <> Ueber_Text_1 then '/// checking position ///'
+ printlog "Action Undo repeated"
+ else
+ warnlog "Action Undo not repeated"
+ end if
+ TabPositionAndSize.OK
+ sleep 1
+ call hCloseDocument '/// close document ///'
+ sleep 1
+endcase
+
+'-------------------------------------------------------------------------------
+testcase tiEditClipboard
+
+ Dim Ueber_Text_4 as string
+ dim sTemp as string
+
+ '/// open application ///'
+ Call hNewDocument
+ Call sSelectEmptyLayout
+ sleep 1
+ SetClipboard ""
+ '/// Create rectangle ///'
+ Call hRechteckErstellen ( 65, 65, 80, 80 )
+ sleep 1
+ '///+ RightClick onto rectangle///'
+ gMouseClick 70,70
+ sleep 1
+ Ueber_Text_4 = fGetPositionX() '/// Get values for position variables ///'
+ Sleep 1
+ '/// <b> Edit->Copy </b> ///'
+ EditCopy
+ '///+ Type Key [Deletee] ///'
+ hTypeKeys "<DELETE>"
+ '///+ <i> Edit->Paste </i> ///'
+ EditPaste
+ sleep 1
+ '///+ Edit->Select All ///'
+ EditSelectAll
+ sTemp = fGetPositionX()
+ if LiberalMeasurement(sTemp, Ueber_Text_4) then '/// TabPositionAndSize: comparing position with original position ///'
+ printlog "OK EditCopy and EditPaste"
+ else
+ warnlog "- Edit paste did not work; is: '" + sTemp + "' ; should: '" + Ueber_Text_4 + "'"
+ end if
+ sleep 1
+ '/// Type Keys [escape], + EditSelectAll (to deselect object and to select again) ///'
+ hTypeKeys "<escape>"
+ EditSelectAll
+ sleep 2
+ '/// <b> Edit->Cut </b>///'
+ EditCut
+ sleep 1
+ hTypeKeys "<TAB>"
+ try
+ '///+ - Format->Position And Size -> HAS TO FAIL / IS NOT AVAILABLE !!! '///'
+ ContextPositionAndSize
+ kontext
+ '///+ - select TabPage 'Position And Size' ///'
+ Messagebox.SetPage TabPositionAndSize
+ Kontext "TabPositionAndSize"
+ if TabPositionAndSize.NOTexists then
+ warnlog "TabPositionAndSize isn't up ?!!"
+ endif
+ '///+ - Ok dialog 'Position And Size' ///'
+ TabPositionAndSize.Ok
+ warnlog "TabPositionAndSize IS up :-( Doesn't have to be, because object should be deleted !!!"
+ catch
+ Printlog " - There is no object in the document anymore :-)"
+ endcatch
+ sleep 1
+ '///+ <i> Edit->Paste </i> ///'
+ EditPaste
+ sleep 2
+ sTemp = fGetPositionX()
+ if LiberalMeasurement(sTemp, Ueber_Text_4) then
+ printlog "OK Edit paste"
+ else
+ warnlog "- Edit paste did not work; is: '" + sTemp + "' ; should: '" + Ueber_Text_4 + "'"
+ end if
+ sleep 3
+ '/// close application ///'
+ Call hCloseDocument
+endcase
+
+'-------------------------------------------------------------------------------
+testcase tiEditPasteSpecial_HTML
+
+ dim Zaehler as integer
+ Kontext "Standardbar"
+ sleep 1
+ Call hFileOpen ConvertPath (gTesttoolPath + "graphics\required\input\frame1.htm") '/// Load html document ///'
+ sleep 5
+ autoexecute=false
+ Kontext "DocumentWriter"
+ DocumentWriter.MouseDown 10,10
+ DocumentWriter.MouseUp 10,10
+ autoexecute=true
+ EditSelectAll
+ sleep 3
+ EditCopy '/// Copy selection ///'
+ Sleep 2
+ FileClose '/// Close document ///'
+ sleep 3
+ Call hNewDocument '/// Create new Impress document ///'
+ sleep 1
+ EditPasteSpecial '/// Edit paste special ///'
+ sleep 1
+ Kontext "InhaltEinfuegen"
+ For Zaehler = 1 to Auswahl.GetItemCount
+ Auswahl.select Zaehler
+ printlog Zaehler, ". Selection = ", Auswahl.GetSelText
+ next Zaehler
+
+ if Auswahl.GetItemCount <> 4 then '/// Controlling number of possible formats ///'
+ warnlog "formats for inserting Html <> 4"
+ else
+ printlog "OK 4 formats for HTML-Document"
+ end if
+
+ sleep 3
+ InhaltEinfuegen.OK '/// Paste clipboard content ///'
+ sleep 3
+ try
+ EditCopy '/// Copy object back into clipboard ///'
+ catch
+ Warnlog "- Nothing inserted into document"
+ endcatch
+ sleep 3
+ Call hCloseDocument '/// Close document ///'
+ sleep 3
+endcase
+
+'-------------------------------------------------------------------------------
+testcase tdEditPasteSpecial_Text
+
+ printlog "Insert Text"
+ call hNewDocument '/// new document ///'
+ SetClipboard "I am a cool test-text in the Clipboard" '/// put text into clipboard ///'
+ EditPasteSpecial '/// edit paste special ///'
+ sleep 1
+ Kontext "InhaltEinfuegen"
+ Auswahl.Select 1 '/// select list entree 1 ///'
+ printlog "Selection = ", Auswahl.GetSelText
+ sleep 1
+ if Auswahl.GetItemCount <> 1 then
+ warnlog "Selectionformat <> 1"
+ else
+ printlog "Format Text OK"
+ end if
+ InhaltEinfuegen.OK '/// close dialog ///'
+ sleep 1
+
+ Call hCloseDocument '/// close document ///'
+endcase
+
+'-------------------------------------------------------------------------------
+testcase tdEditPasteSpecial_Graphic
+
+ dim Zaehler as integer
+
+ call hNewDocument '/// ^new document ///'
+ printlog "Insert graphic file"
+ InsertGraphicsFromFile '/// insert graphic (sample.bmp)///'
+
+ Kontext "GrafikEinfuegenDlg"
+ Dateiname.SetText ConvertPath (gTesttoolPath + "global\input\graf_inp\enter.bmp")
+ Oeffnen.Click
+ sleep 1
+ EditSelectAll '/// select graphic ///'
+ EditCut '/// cut graphic ///'
+ EditPasteSpecial '/// edit paste special ///'
+ sleep 1
+ Kontext "InhaltEinfuegen"
+ For Zaehler = 1 to Auswahl.GetItemCount '/// get item count for Auswahl ///'
+ Auswahl.select Zaehler
+ printlog Zaehler, ". Selection = ", Auswahl.GetSelText
+ next Zaehler
+
+ if Auswahl.GetItemCount <> 4 then '/// check if item count = 4 ///'
+ warnlog "Format for insert graphic files should be 4, but is: " + Auswahl.GetItemCount
+ else
+ printlog "There are " + Auswahl.GetItemCount + " formats for graphic files"
+ end if
+ InhaltEinfuegen.OK '/// insert graphic from clipboard ///'
+ gMouseClick 90,90
+ sleep 1
+ Call hCloseDocument '/// close document ///'
+endcase
+
+'-------------------------------------------------------------------------------
+testcase tdEditPasteSpecial_Circle
+
+ dim Zaehler as integer
+ call hNewDocument '/// new document ///'
+ sleep 5
+ printlog "Insert circle" '/// create circle ///'
+ Kontext "Toolbar"
+ Ellipsen.Click
+ sleep 3
+ gMouseMove (20,20,80,80)
+ sleep 1
+ hTypeKeys "<escape>"
+ sleep 2
+ EditSelectAll '/// select circle ///'
+ sleep 5
+ EditCut '/// cut circle ///'
+ sleep 1
+ EditPasteSpecial '/// edit paste special ///'
+ sleep 1
+ Kontext "InhaltEinfuegen"
+ if EinfuegenAls.IsVisible Then EinfuegenAls.Check '/// check "EinfuegenAls" ///'
+ For Zaehler = 1 to Auswahl.GetItemCount '/// get item count for Auswahl ///'
+ Auswahl.select Zaehler
+ printlog Zaehler, ". Selection = ", Auswahl.GetSelText
+ next Zaehler
+ if Auswahl.GetItemCount <> 4 then '/// check if item count = 4 ///'
+ warnlog "Number of possible formats <> 4"
+ else
+ printlog "There are 4 formats for circle"
+ end if
+ sleep 1
+ InhaltEinfuegen.OK '/// paste circle ///'
+ sleep 1
+ Call hCloseDocument '/// close document ///'
+endcase
+
+'-------------------------------------------------------------------------------
+testcase tiEditPasteSpecial
+
+ dim i as integer
+ dim x as integer
+' warnlog "TODOTBO: from draw, impress, math..."
+ '/// go into writer, type a text, select all, Edit->Cut, close writer ///'
+ '/// go into application to test, insert every format you can get from Edit->Paste->Special :-) ///'
+ gApplication = "WRITER"
+ call hNewDocument
+ kontext "DocumentWriter"
+ DocumentWriter.TypeKeys "abc<shift home>"
+ editcut
+ call hCloseDocument
+ gApplication = "IMPRESS"
+ call hNewDocument
+ sleep 1
+
+ Printlog " get count of possibilities: "
+ EditPasteSpecial
+ sleep 1
+ Kontext "InhaltEinfuegen"
+ x = Auswahl.GetItemCount
+ for i = 1 to x
+ printlog " - " + i + " - " + Auswahl.GetItemText (i)
+ next i
+ InhaltEinfuegen.Cancel
+
+ Printlog " insert every possibility"
+ for i = 1 to x
+ Printlog " - processing number: "+i
+ EditPasteSpecial
+ sleep 1
+ Kontext "InhaltEinfuegen"
+ Auswahl.Select i
+ sleep 1
+ InhaltEinfuegen.OK
+ sleep 1
+ next i
+ Call hCloseDocument '/// close document ///'
+endcase
+
+'-------------------------------------------------------------------------------
diff --git a/testautomation/graphics/optional/includes/global/g_clipexport.inc b/testautomation/graphics/optional/includes/global/g_clipexport.inc
new file mode 100644
index 000000000000..64385ffd78c3
--- /dev/null
+++ b/testautomation/graphics/optional/includes/global/g_clipexport.inc
@@ -0,0 +1,490 @@
+'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
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* Owner : wolfram.garten@oracle.com
+'*
+'* short description : Tests the clipboard-function with a rectangle
+'*
+'*******************************************************************
+'*
+
+' #1 MeasurementSetFirst
+' #1 ResetMeasurement
+' #1 SaveMeasurementSetFirst
+' #1 Select_Copy
+' #1 calctest
+' #1 writertest
+' #1 tClipboardFromDrawTest
+
+' #1 Small_test_Draw
+' #1 Small_test_Impress
+' #1 Small_test_Calc
+' #1 Small_test_Writer
+' #1 Full_test_Writer
+' #1 Full_test_Draw
+' #1 Full_test_Impress
+' #1 Full_test_Calc
+' #1 clear_all_and_close
+' #1 Make_LineObject_From_Application
+' #1 Make_Rectangle_From_Application
+' #1 Make_Make3dObject_From_Application
+' #1 Make_TextSquare_From_Application
+' #1 Make_And_Check_Formatted_Text_Line_From_Application
+' #1 Make_ConnectorObject_From_Application
+' #1 Make_Circle_From_Application
+' #1 Make_CurveObject_From_Application
+' #1 Make_Objectplugin_From_Application
+'*
+'\*******************************************************************
+
+global i as integer
+global sApplication as string
+global ReferenceOld as string
+global ReferenceNew as string
+global ToApp as string
+global ToAppCounter as integer
+global FromApp as string
+global FromApp2 as string
+global CheckValue1 as integer
+global Marker as integer
+global WindowsSting (4) as string
+global PositionPositionX as string
+global PositionPositionY as string
+global PositionWidth as string
+global PositionHeight as string
+
+global PositionKeepRatio as string
+global PositionProtectPosition as string
+global PositionProtectSize as string
+global PositionFitWidthText as string
+global PositionFitHeightText as string
+global PositionAnchorPosition as string
+global PositionAnchor as string
+global PositionPositionPosition as string
+global PositionSizePosition as string
+
+global AreaNoFillValue as string
+global AreaColorValue as string
+global AreaColourListValue as string
+global AreaGradientValue as string
+global AreaGradientListValue as string
+global AreaAutomaticValue as string
+global AreaHatchingValue as string
+global AreaHatchingListValue as string
+global AreaBackgroundColourValue as string
+global AreaBackgroundColourListValue as string
+global AreaIncrementsValue as string
+global AreaBitmapValue as string
+global AreaBitmapListValue as string
+global AreaOriginalListValue as string
+global AreaRelativeValue as string
+global AreaWidthValue as string
+global AreaHeightValue as string
+global AreaXOffsetValue as string
+global AreaYOffsetValue as string
+global AreaTileValue as string
+global AreaStretchValue as string
+global AreaRowValue as string
+global AreaColumnValue as string
+global AreaOffsetValue as string
+
+global ShadowUseShadowsValue as string
+global ShadowDistanceValue as string
+global ShadowColorValue as string
+global ShadowTransparencyValue as string
+
+global TransparencyTransparencyValue as string
+global TransparencyGradientType as string
+global TransparencyMFZentrumX as string
+global TransparencyMFZentrumY as string
+global TransparencyMFWinkel as string
+global TransparencyMFRand as string
+global TransparencyMFStartwert as string
+global TransparencyMFEndwert as string
+
+global ColorName as string
+global ColorColor as string
+global ColorModel as string
+global ColorR as string
+global ColorG as string
+global ColorB as string
+global ColorC as string
+global ColorM as string
+global ColorY as string
+global ColorK as string
+
+global GradientsType as string
+global GradientsCenterX as string
+global GradientsCenterZ as string
+global GradientsAngle as string
+global GradientsBorder as string
+global GradientsFromColor as string
+global GradientsFromValue as string
+global GradientsToColor as string
+global GradientsToValue as string
+
+global HatchingDistance as string
+global HatchingAngle as string
+global HatchingLineType as string
+global HatchingLineColor as string
+global HatchingLineTable as string
+
+global BitmapForeground as string
+global BitmapBackground as string
+global BitmapTable as string
+
+global Text1 as string
+global Text2 as string
+global Text3 as integer
+global Text4 as string
+global Text5 as string
+global Text6 as string
+global Text7 as string
+
+'------------------------------- "object"-dependant tests ----------------------
+
+try
+ call Make_Rectangle_From_Application
+ call Full_test_Draw
+ call Full_test_Impress
+ call Full_test_Writer
+ call Full_test_Calc
+catch
+ warnlog "something wrong with testing Rectangle"
+endcatch
+
+try
+ call Make_Make3dObject_From_Application
+ call Full_test_Draw
+ call Small_test_Impress
+ call Small_test_Calc
+ call Small_test_Writer
+catch
+ warnlog "something wrong with testing 3dObject"
+endcatch
+
+'qaerrorlog "Make_CurveObject_From_Application needs an overview - FHA"
+try
+ call Make_CurveObject_From_Application
+ call Small_test_Draw
+ call Small_test_Impress
+ call Small_test_Calc
+ call Small_test_Writer
+catch
+ warnlog "something wrong with testing CurveObj"
+endcatch
+
+try
+ call Make_ConnectorObject_From_Application
+ call Small_test_Draw
+ call Small_test_Impress
+ call Small_test_Calc
+ call Small_test_Writer
+catch
+ warnlog "something wrong with testing ConnectorObject"
+endcatch
+
+try
+ call Make_LineObject_From_Application
+ call Small_test_Draw
+ call Small_test_Impress
+ ' call Small_test_Calc
+ ' call Small_test_Writer
+catch
+ warnlog "something wrong with testing LineObject"
+endcatch
+
+try
+catch
+ warnlog "something wrong with testing ConnectorObject"
+endcatch
+
+try
+ call Make_Circle_From_Application
+ call Small_test_Draw
+ call Small_test_Impress
+ call Small_test_Calc
+ call Small_test_Writer
+catch
+ warnlog "something wrong with testing Circle"
+endcatch
+
+try
+ call Make_TextSquare_From_Application
+ call Small_test_Draw
+ call Small_test_Impress
+ call Small_test_Calc
+ call Small_test_Writer
+
+catch
+ warnlog "something wrong with testing TextSquare"
+endcatch
+
+call clear_all_and_close
+Printlog "tClipboardFromDrawTest finished"
+end sub
+
+
+'------------------------------- Objects ---------------------------------------
+testcase Make_Make3dObject_From_Application
+
+ printlog "--- 3D-Object --- from --- " + gApplication
+ sleep 1
+ call SaveMeasurementSetFirst
+ sleep 1
+ Call Make3dObject
+ call Select_Copy
+ Call Get_Position_Size_Attributes
+ Call Get_Colour_Attributes
+ Call hCloseDocument
+endcase
+
+'-------------------------------------------------------------------------------
+testcase Make_Objectplugin_From_Application
+
+ goto endsub
+ printlog "--- Objectplugin --- from --- " + gApplication
+ sleep 1
+ call SaveMeasurementSetFirst
+ sleep 1
+ Call Objectplugin
+ call Select_Copy
+ call Get_Position_Size_Attributes
+ Call Get_Colour_Attributes
+ Call hCloseDocument
+endcase
+
+'-------------------------------------------------------------------------------
+testcase Make_TextSquare_From_Application
+
+ printlog "--------- TextSquare --- from --- " + gApplication
+ sleep 1
+ call SaveMeasurementSetFirst
+ sleep 1
+ Call MakeTextSquare
+ call Select_Copy
+ call Get_Position_Size_Attributes
+ ' Call Get_Colour_Attributes
+ Call hCloseDocument
+endcase
+
+'-------------------------------------------------------------------------------
+testcase Make_Rectangle_From_Application
+
+ printlog "--------- Rectangle --- from --- " + gApplication
+ sleep 1
+ call SaveMeasurementSetFirst
+ sleep 1
+ Call MakeRectangle
+ call Select_Copy
+ call Get_Position_Size_Attributes
+ Call Get_Colour_Attributes
+ Call hCloseDocument
+endcase
+
+'-------------------------------------------------------------------------------
+testcase Make_Circle_From_Application
+
+ printlog "--------- Ellipse Object --- from --- " + gApplication
+ sleep 1
+ call SaveMeasurementSetFirst
+ sleep 1
+ Call MakeCircle
+ call Select_Copy
+ call Get_Position_Size_Attributes
+ Call Get_Colour_Attributes
+ Call hCloseDocument
+endcase
+
+'-------------------------------------------------------------------------------
+testcase Make_CurveObject_From_Application
+
+ printlog "--------- Curve-Object --- from --- " + gApplication
+ sleep 1
+ call SaveMeasurementSetFirst
+ sleep 1
+ Call MakeCurveObject
+ call Select_Copy
+ call Get_Position_Size_Attributes
+ ' Call Get_Colour_Attributes
+ Call hCloseDocument
+endcase
+
+'-------------------------------------------------------------------------------
+testcase Make_LineObject_From_Application
+
+ printlog "--------- Line-Object --- from --- " + gApplication
+ sleep 1
+ call SaveMeasurementSetFirst
+ sleep 1
+ Call MakeLineObject
+ call Select_Copy
+ call Get_Position_Size_Attributes
+ Call hCloseDocument
+endcase
+
+'-------------------------------------------------------------------------------
+testcase Make_ConnectorObject_From_Application
+
+ printlog "--------- Connector-Object --- from --- " + gApplication
+ sleep 1
+ call SaveMeasurementSetFirst
+ sleep 1
+ Call MakeConnectorObject
+ call Select_Copy
+ Call Get_Position_Size_Attributes
+ ' Call Get_Colour_Attributes
+ Call hCloseDocument
+endcase
+
+'-------------------------------------------------------------------------------
+testcase Make_And_Check_Formatted_Text_Line_From_Application
+
+ printlog "--------- Formatted Text --- from --- " + gApplication
+ sleep 1
+ call SaveMeasurementSetFirst
+ sleep 1
+ Call MakeFormattedTextLine 'inclusive get variable-info.
+ call Select_Copy
+ Call hCloseDocument
+ 'call New_Draw
+ ' Call Check_Text_Formatting
+ ' Call hCloseDocument
+ Call New_Impress
+ Call Check_Text_Formatting
+ Call hCloseDocument
+ sleep 10
+ Call New_Calc
+ Call Check_Text_Formatting
+ Call hCloseDocument
+ Call New_Writer
+ Call Check_Text_Formatting
+ Call hCloseDocument
+endcase
+
+'--------------------------- Part with the different kinds of tests. -----------
+testcase Full_test_Draw
+
+ call New_Draw
+ call MeasurementSetFirst
+ call Check_Position_Size_Attributes
+ call Check_Colors_Borders_Attributes
+ gApplication = FromApp2
+ Call hCloseDocument
+endcase
+
+'-------------------------------------------------------------------------------
+testcase Small_test_Draw
+
+ call New_Draw
+ call MeasurementSetFirst
+ call Check_Position_Size_Attributes
+ gApplication = FromApp2
+ Call hCloseDocument
+endcase
+
+'-------------------------------------------------------------------------------
+testcase Full_test_Impress
+
+ call New_Impress
+ call MeasurementSetFirst
+ call Check_Position_Size_Attributes
+ call Check_Colors_Borders_Attributes
+ gApplication = FromApp2
+ Call hCloseDocument
+endcase
+
+'-------------------------------------------------------------------------------
+testcase Small_test_Impress
+
+ call New_Impress
+ call MeasurementSetFirst
+ call Check_Position_Size_Attributes
+ gApplication = FromApp2
+ Call hCloseDocument
+endcase
+
+'-------------------------------------------------------------------------------
+testcase Full_test_Calc
+
+ call New_Calc
+ call MeasurementSetFirst
+ call Check_Position_Size_Attributes
+ call Check_Colors_Borders_Attributes
+ gApplication = FromApp2
+ Call hCloseDocument
+endcase
+
+'-------------------------------------------------------------------------------
+testcase Small_test_Calc
+
+ call New_Calc
+ call MeasurementSetFirst
+ call Check_Position_Size_Attributes
+ gApplication = FromApp2
+ Call hCloseDocument
+endcase
+
+'-------------------------------------------------------------------------------
+testcase Full_test_Writer
+
+ call New_Writer
+ call MeasurementSetFirst
+ call Check_Position_Size_Attributes
+ call Check_Colors_Borders_Attributes
+ gApplication = FromApp2
+ Call hCloseDocument
+endcase
+
+'-------------------------------------------------------------------------------
+testcase Small_test_Writer
+
+ call New_Writer
+ call MeasurementSetFirst
+ call Check_Position_Size_Attributes
+ gApplication = FromApp2
+ Call hCloseDocument
+endcase
+
+'-------------------------------------------------------------------------------
+testcase clear_all_and_close
+
+ goto endsub
+ printlog " --------------------------------------------------------------"
+ printlog " All tests done... clearing up everything and finishing"
+ if gApplication = "WRITER" then
+ DocumentWriter.TypeKeys "<DELETE>"
+ else
+ printlog " gApplication is " + gApplication
+ EditSelectAll
+ EditDelete
+ end if
+ call ResetMeasurement
+ Call hCloseDocument
+endcase
+
+'-------------------------------------------------------------------------------
diff --git a/testautomation/graphics/optional/includes/global/g_clipexport2.inc b/testautomation/graphics/optional/includes/global/g_clipexport2.inc
new file mode 100644
index 000000000000..fae2cdcc7820
--- /dev/null
+++ b/testautomation/graphics/optional/includes/global/g_clipexport2.inc
@@ -0,0 +1,429 @@
+'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
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* Owner : wolfram.garten@oracle.com
+'*
+'* short description :
+'*
+'*******************************************************************
+'*
+' #1 MakeTextSquare :Inserts a text frame with content
+' #1 MakeRectangle :Inserts a Rectangle
+' #1 MakeCircle :Inserts a circle if not Writer or Calc
+' #1 Make3dObject :Inserts a 3DObject if not Writer or Calc
+' #1 MakeCurveObject :Inserts Curve Object if not Writer or Calc
+' #1 MakeLineObject :Inserts line object if not writer or calc
+' #1 MakeConnectorObject :Inserts Connector object if not wirter or calc
+' #1 MakeFormattedTextLine :Insert a formatted text line
+' #1 Formfunctions :Inserts a push button
+' #1 Objectplugin :Inserting a Plugin
+'*
+'\*******************************************************************
+
+sub MakeTextSquare
+
+ printlog "--------- Testing: TextSquare ---------"
+ Call hTextRahmenErstellen ("This is a text-frame",15,20,40,30)
+ gMouseClick 10,10
+ SetKontextApplication
+
+end sub
+'-------------------------------------------------------------------------------
+sub MakeRectangle
+
+ printlog "we run rectangle"
+ Call hRechteckErstellen (15,15,30,30)
+
+end sub
+
+'-------------------------------------------------------------------------------
+sub MakeCircle
+
+ printlog "Create Circle"
+ if gApplication = "WRITER" then
+ Warnlog "Cant make circle in this application"
+ goto endsub
+ end if
+ if gApplication = "CALC" then
+ Warnlog "Cant make circle in this application"
+ goto endsub
+ end if
+ printlog "we run Circle"
+ Kontext "Toolbar"
+ Ellipsen.Click
+ sleep 1
+ gMouseDown (15,15)
+ gMouseMove (15,15,30,30)
+ gMouseUp (30,30)
+ sleep 1
+
+end sub
+
+'-------------------------------------------------------------------------------
+sub Make3dObject
+
+ printlog "Create 3dObject"
+ if (Ucase(gApplication) = "CALC") then
+ warnlog "Cant make circle in this application"
+ goto endsub
+ end if
+ if (Ucase(gApplication) = "WRITER") then
+ warnlog "Cant make circle in this application"
+ goto endsub
+ end if
+
+ printlog "we run 3d-Object"
+ kontext "Toolbar"
+ if Drei_D_Objekte.exists then
+ Drei_D_Objekte.tearoff
+ Kontext "ThreeDObjectsbar"
+ sleep 1
+ Wuerfel.click
+ gMouseDown (15,15)
+ gMouseMove (15,15,35,35)
+ gMouseUp (35,35)
+ Kontext "ThreeDObjectsbar"
+ ThreeDObjectsbar.close
+ else
+ if (gApplication = "DRAW") then
+ sleep 1
+ hMenuselectNr (1)
+ sleep 1
+ hMenuItemCheck (11)
+ sleep 2
+ Drei_D_Objekte.tearoff
+ Kontext "ThreeDObjectsbar"
+ sleep 1
+ Wuerfel.click
+ sleep 1
+ gMouseDown (15,15)
+ gMouseMove (15,15,35,35)
+ gMouseUp (35,35)
+ Kontext "ThreeDObjectsbar"
+ ThreeDObjectsbar.close
+ sleep 2
+ kontext "Toolbar"
+ sleep 1
+ hMenuselectNr (1)
+ sleep 1
+ hMenuItemUnCheck (11)
+ sleep 1
+ else
+ sleep 1
+ hMenuselectNr (1)
+ sleep 1
+ hMenuItemCheck (11)
+ sleep 2
+ Drei_D_Objekte.tearoff
+ Kontext "ThreeDObjectsbar"
+ sleep 1
+ Wuerfel.click
+ sleep 1
+ gMouseDown (15,15)
+ gMouseMove (15,15,35,35)
+ gMouseUp (35,35)
+ Kontext "ThreeDObjectsbar"
+ ThreeDObjectsbar.close
+ sleep 2
+ kontext "Toolbar"
+ sleep 1
+ hMenuselectNr (1)
+ sleep 1
+ hMenuItemUnCheck (11)
+ sleep 1
+ endif
+ end if
+
+end sub
+
+'-------------------------------------------------------------------------------
+sub MakeCurveObject
+
+ if (Ucase(gApplication) = "WRITER") then
+ warnlog "Cant make circle in this application"
+ goto endsub
+ end if
+ if (Ucase(gApplication) = "CALC") then
+ warnlog "Cant make circle in this application"
+ goto endsub
+ end if
+
+ printlog "we run Curve-object"
+ kontext "Toolbar"
+ Toolbar.OpenContextMenu
+ sleep 1
+ hMenuselectNr (1)
+ sleep 1
+ hMenuItemCheck (7)
+ sleep 1
+ Kurven.Click
+ sleep 1
+ gMouseDown (10,25)
+ gMouseMove (10,25,30,35)
+ gMouseUp (30,35)
+ gMouseClick 90,90
+ sleep 1
+ kontext "Toolbar"
+ Toolbar.OpenContextMenu
+ sleep 1
+ hMenuselectNr (1)
+ sleep 1
+ hMenuItemUnCheck (7)
+ sleep 1
+
+end sub
+
+'-------------------------------------------------------------------------------
+sub MakeLineObject
+
+ if gApplication = "WRITER" then
+ warnlog "Currently no support for line-object in this application"
+ goto endsub
+ end if
+ if gApplication = "CALC" then
+ warnlog "Currently no support for line-object in this application"
+ goto endsub
+ end if
+ printlog "we run Line-object"
+ sleep 1
+ Kontext "Toolbar"
+ Linien.TearOff
+ Kontext "Arrowshapes"
+ sleep 1
+ Leftarrow.Click
+ sleep 1
+ SetKontextApplication
+ gMouseDown (10,15)
+ gMouseMove 10,15,20,27
+ gMouseUp (20,27)
+ sleep 1
+ Kontext "Arrowshapes"
+ Arrowshapes.Close
+
+end sub
+
+'-------------------------------------------------------------------------------
+sub MakeConnectorObject
+
+ if gApplication = "WRITER" then
+ warnlog "Cant make connector in this application"
+ goto endsub
+ end if
+ if gApplication = "CALC" then
+ warnlog "Cant make connector in this application"
+ goto endsub
+ end if
+ printlog "we run Connector-object"
+ if gApplication = "DRAW" then
+ sleep 1
+ kontext "Toolbar"
+ sleep 1
+ Verbinder.TearOff ' Insert connector
+ kontext "Connectorsbar"
+ sleep 1
+ Verbinder.Click
+ Connectorsbar.Close
+ sleep 1
+ SetKontextApplication
+ gMouseDown (10,17)
+ gMouseMove (10,17,30,37)
+ gMouseUp (30,37)
+ end if
+ if gApplication = "IMPRESS" then
+ kontext "Toolbar"
+ sleep 1
+ Verbinder.TearOff ' Insert connector
+ kontext "Connectorsbar"
+ sleep 1
+ Verbinder.Click
+ Connectorsbar.Close
+ sleep 1
+ SetKontextApplication
+ gMouseDown (10,17)
+ gMouseMove (10,17,30,37)
+ gMouseUp (30,37)
+ end if
+
+end sub
+
+'-------------------------------------------------------------------------------
+sub MakeFormattedTextLine
+
+ dim Zufall, iWaitIndex as integer
+ Kontext "TextObjectbar"
+ if TextObjectbar.Exists then
+ printlog " TextObjectbar.Exists = " + TextObjectbar.Exists
+ else
+ ViewToolbarsTextFormatting
+ sleep (2)
+ end if
+
+ hTypeKeys "This is a text which we will format in some different ways."
+ hTypeKeys "<SHIFT HOME>" 'Marked the inserted text. (= now ready for formatting)
+ Kontext "TextObjectbar"
+ Printlog " - choose random font"
+ randomize
+ Zufall=((20*Rnd)+1)
+ 'Schriftart.GetItemcount
+ Text1 = Schriftart.GetSelText
+ Printlog " -Font: '" + Schriftart.GetSelText + "' selected."
+
+ Kontext "TextObjectbar"
+ sleep (2)
+ Printlog " - Change size of Font"
+ Schriftgroesse.Select (Zufall)
+ Printlog " - Fontsize set to '" + Schriftgroesse.GetSelText + "'."
+ Text2 = Schriftgroesse.GetSelText
+ Kontext "TextObjectbar"
+ Fett.Click
+ sleep (2)
+ Printlog " - Font attribute set to bold."
+ Text4 = Fett.GetState(2)
+
+ Kontext "TextObjectbar"
+ Kursiv.Click
+ sleep (2)
+ Printlog " - Font attribute set to cursive."
+ Text5 = Kursiv.GetState(2)
+
+ Kontext "TextObjectbar"
+ Unterstrichen.Click
+ sleep (2)
+ Printlog " - Font attribute set to underlined."
+ Text6 = Unterstrichen.GetState(2)
+
+ Kontext "TextObjectbar"
+ Blocksatz.Click
+ sleep (2)
+ Printlog " - Text set to Justified."
+ Text7 = Blocksatz.GetState(2)
+
+ SetKontextApplication
+
+end sub 'MakeFormattedTextLine
+
+'--------------------------------------------------------------------------------------------------------
+sub Formfunctions
+ gMouseMove2 (50, 20)
+ if (Ucase(gApplication) = "IMPRESS") then
+ kontext "Toolbar"
+ sleep 1
+ Toolbar.OpenContextMenu ' enable forms button in menuebar
+ sleep 1
+ hMenuselectNr (6)
+ sleep 1
+ hMenuItemCheck (14)
+ sleep 1
+ WL_WRITER_Formular.TearOff ' use fromsbutton
+ else
+ kontext "Toolbar"
+ sleep 1
+ Toolbar.OpenContextMenu ' enable forms button in menuebar
+ sleep 1
+ hMenuselectNr (5)
+ sleep 1
+ hMenuItemCheck (14)
+ sleep 1
+ WL_WRITER_Formular.TearOff ' use fromsbutton
+ endif
+ printlog " enabled 'forms' button and clicked it"
+ sleep 1
+ kontext "FormControls"
+ if (Pushbutton.IsEnabled = FALSE) then
+ DesigneModus.click ' use forms menue, go into design mode
+ endif
+ Pushbutton.Click ' use a pushbutton
+ Sleep 1
+ gMouseDown (50,20)
+ gMouseMove (50, 20,70, 40)' create a pushbutton
+ gMouseUp (70,40)
+
+ FormatControl
+ Kontext "ControlPropertiesDialog"
+ sleep 1
+ ControlPropertiesDialog.Close
+ formatform
+ Kontext "ControlPropertiesDialog"
+ sleep 1
+ ControlPropertiesDialog.Close
+
+ sleep 5 ' needed, otherwise the context menue will get closed...
+
+ if (Ucase(gApplication) = "IMPRESS") then
+ kontext "Toolbar"
+ Toolbar.OpenContextMenu ' disable forms button in menuebar
+ sleep 1
+ hMenuselectNr (9)
+ else
+ kontext "Toolbar"
+ Toolbar.OpenContextMenu ' disable forms button in menuebar
+ sleep 1
+ hMenuselectNr (8)
+ endif
+end sub
+
+'--------------------------------------------------------------------------------------------------------
+sub Objectplugin
+
+ printlog "Insert Object-plugin"
+ 'Call hNewDocument
+
+ InsertObjectPlugin
+ Kontext "PlugInEinfuegen"
+ 'DialogTest ( PlugInEinfuegen)
+ Durchsuchen.click
+ Kontext "OeffnenDlg"
+ 'Call DialogTest ( OeffnenDlg )
+ if OeffnenDlg.exists (5) then
+ OeffnenDlg.Cancel
+ else
+ warnlog "Open file dialog didn't come up"
+ endif
+ sleep 5
+ Kontext "PlugInEinfuegen"
+ if PlugInEinfuegen.exists then
+ DateiUrl.SetText (ConvertPath ( gTesttoolpath + "graphics\required\input\sample.mov" ))
+ printlog "Type something into the option field"
+ 'Optionen so3:MultiLineEdit:MD_INSERT_OBJECT_PLUGIN:ED_PLUGINS_OPTIONS
+ Optionen.SetText "Fiddler's Green"
+ sleep 1
+ Optionen.TypeKeys "<HOME>"
+ Optionen.TypeKeys "<SHIFT><END>"
+ Optionen.TypeKeys "<delete>"
+ PlugInEinfuegen.Ok
+ else
+ warnlog "Insert plugin isn't visible"
+ endif
+ sleep (5)
+ kontext "Messagebox"
+ if Messagebox.exists (5) then
+ warnlog "Messagebox: " + Messagebox.gettext
+ Messagebox.ok
+ endif
+end sub
+
+'--------------------------------------------------------------------------------------------------------
diff --git a/testautomation/graphics/optional/includes/global/g_clipexport3.inc b/testautomation/graphics/optional/includes/global/g_clipexport3.inc
new file mode 100644
index 000000000000..5a6e86ac2a9c
--- /dev/null
+++ b/testautomation/graphics/optional/includes/global/g_clipexport3.inc
@@ -0,0 +1,729 @@
+'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
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* Owner : wolfram.garten@oracle.com
+'*
+'* short description : Procedures for the Clipboard-Export-Test
+'*
+'*******************************************************************
+'*
+' #1 Get_Position_Size_Attributes :Getting values from the position and size dialog
+' #1 Get_Colour_Attributes :Geting Attributes from Area Dialog
+' #1 Check_Position_Size_Attributes :Pasting object and comparing attributes with the stored values
+' #1 Check_Text_Formatting :Checking text formatting of pasted object
+' #1 Check_Colors_Borders_Attributes :
+' #1 SetKontextApplication :-
+' #1 New_Draw :-
+' #1 New_Impress :-
+' #1 New_Calc :-
+' #1 New_Writer :-
+' #1 Choose_Toapplication :-
+
+'*
+'\*******************************************************************
+
+Sub Get_Position_Size_Attributes
+
+ Printlog " Get_Position_Size_Attributes Starts"
+
+ FormatPositionAndSize
+
+ sleep 1
+
+ Kontext
+ Select Case gApplication
+ Case "WRITER" : active.SetPage TabPositionAndSizeWriter
+ Kontext "TabPositionAndSizeWriter"
+ Case else : active.SetPage TabPositionAndSize
+ Kontext "TabPositionAndSize"
+ End Select
+ sleep 1
+
+ ' /// Size-values ///'
+ PositionWidth = Width.GetText
+ PositionHeight = Height.GetText
+
+ if KeepRatio.IsChecked then SetText.PositionKeepRatio = "TRUE"
+ if ProtectPosition.IsChecked then SetText.PositionProtectPosition = "TRUE"
+ if ProtectSize.IsChecked then SetText.PositionProtectSize = "TRUE"
+ sleep 1
+
+ Kontext
+ Select Case gApplication
+ Case "WRITER" : active.SetPage TabPositionAndSizeWriter
+ Kontext "TabPositionAndSizeWriter"
+ TabPositionAndSizeWriter.OK
+ Case else : active.SetPage TabPositionAndSize
+ Kontext "TabPositionAndSize"
+ TabPositionAndSize.OK
+ End Select
+ sleep 1
+ SetKontextApplication
+ sleep 3
+ Printlog " Get_Position_Size_Attributes Ends"
+
+end sub
+
+'-------------------------------------------------------------------------------
+sub Get_Colour_Attributes
+
+ printlog " Get_Colour_Attributes Starts"
+
+ FormatArea
+ Kontext "TabArea"
+ Kontext
+ Active.setpage TabArea
+ Kontext "TabArea"
+
+
+ ' /// Area ///'
+ FillOptions.Select 2
+ if FillOptions.GetSelIndex <> 2 then Errorlog "Couldnt click on 'Color' in FormatArea"
+ AreaColourListValue = ColourList.GetSelText
+ printlog "AreaColourListValue = " + AreaColourListValue
+ sleep 1
+
+ FillOptions.Select 3
+ if FillOptions.GetSelIndex <> 3 then Errorlog "Couldnt click on .Gradient. in FormatArea"
+
+ AreaGradientListValue = GradientList.GetSelText 'AreaGradientValue = "TRUE"
+ If Automatic.IsVisible then
+ If Automatic.IsChecked then AreaAutomaticValue = "TRUE"
+ Else
+ If Increments.IsVisible then
+ AreaIncrementsValue = Increments.GetText
+ End if
+ End if
+
+ FillOptions.Select 4
+ if FillOptions.GetSelIndex <> 4 then Errorlog "Couldnt click on 'Hatching' in FormatArea"
+
+ AreaHatchingListValue = HatchingList.GetSelText 'Then = "TRUE" ' lista
+ If BackgroundColour.IsVisible then
+ If BackgroundColour.IsChecked then
+ AreaBackgroundColourValue = BackgroundColour.GetText
+ End if
+ End if
+ If BackgroundColourList.IsVisible then
+ AreaBackgroundColourListValue = BackgroundColourList.GetSelText
+ End if
+
+ FillOptions.Select 5
+ if FillOptions.GetSelIndex <> 5 then Errorlog "Couldnt click on 'Hatching' in FormatArea"
+
+ AreaBitmapListValue = BitmapList.GetSelText
+
+ If Original.IsChecked then
+ AreaOriginalListValue = "TRUE"
+ Else
+ If Relative.IsChecked then
+ AreaRelativeValue = "TRUE"
+ AreaWidthValue = Width.GetText
+ AreaHeightValue = Height.GetText
+ Else
+ AreaWidthValue = Width.GetText
+ AreaHeightValue = Height.GetText
+ End if
+ End if
+
+ If Tile.IsChecked then AreaTileValue = "TRUE"
+ If Stretch.IsChecked then AreaStretchValue = "TRUE"
+ If Row.IsChecked then
+ AreaRowValue = "TRUE"
+ AreaOffsetValue = Offset.GetText
+ End if
+ If Column.IsChecked then
+ AreaColumnValue = "TRUE"
+ AreaOffsetValue = Offset.GetText
+ End if
+
+ sleep 1
+
+
+ Kontext "TabArea"
+ Kontext
+ Active.setpage TabSchatten
+ Kontext "TabSchatten"
+
+ If Anzeigen.IsChecked then
+ ShadowUseShadowsValue = "TRUE"
+ ShadowDistanceValue = Entfernung.GetText
+ ShadowColorValue = Farbe.GetText
+ ShadowTransparencyValue = Transparenz.GetText
+ end if
+
+ sleep 1
+
+
+ Kontext
+ Active.SetPage TabTransparenz
+ Kontext "TabTransparenz"
+ if KeineTransparenz.IsEnabled = FALSE then
+ warnlog " Couldnt check 'No transparency' in Area - Transparency'"
+ else
+ KeineTransparenz.Check
+ end if
+
+ If KeineTransparenz.IsChecked then LineareTransparenz.Check
+ If LineareTransparenz.IsChecked then
+ TransparencyTransparencyValue = MFLinTransparenz.GetText
+ End if
+
+
+ Transparenzverlauf.Check
+ If Transparenzverlauf.IsChecked then
+ TransparencyGradientType = TransparenzverlaufTyp.GetItemText
+ TransparencyMFZentrumX = MFZentrumX.GetText
+ TransparencyMFZentrumY = MFZentrumY.GetText
+ TransparencyMFWinkel = MFWinkel.GetText
+ TransparencyMFRand = MFRand.GetText
+ TransparencyMFStartwert = MFStartwert.GetText
+ TransparencyMFEndwert = MFEndwert.GetText
+ End if
+
+ sleep 1
+
+
+ Kontext
+ Active.setpage TabFarben
+ Kontext "TabFarben"
+
+ ColorName = FarbName.GetText
+ ColorColor = Farbe.GetItemText
+ ColorModel = Farbmodell.GetSelText
+ printlog " The colormodel is: " + ColorModel
+
+ if ColorModel = "RGB" then
+ ColorR = R.GetText
+ ColorG = G.GetText
+ ColorB = B.GetText
+ elseif ColorModel = "RVB" then
+ ColorR = R.GetText
+ ColorG = G.GetText
+ ColorB = B.GetText
+ else
+ ColorC = C.GetText
+ ColorM = M.GetText
+ ColorY = Y.GetText
+ ColorK = K.GetText
+ endif
+
+ Kontext
+ Active.setpage TabFarbverlaeufe
+ Kontext "TabFarbverlaeufe"
+
+ GradientsType = Typ.GetItemText
+ GradientsCenterX = ZentrumX.GetText
+ GradientsCenterZ = ZentrumY.GetText
+ GradientsAngle = Winkel.GetText
+ GradientsBorder = Rand.GetText
+ GradientsFromColor = Von.GetItemText
+ GradientsFromValue = VonWert.GetText
+ GradientsToColor = Bis.GetItemText
+ GradientsToValue = BisWert.GetText
+
+
+ Kontext
+ Active.setpage TabSchraffuren
+ Kontext "TabSchraffuren"
+
+ HatchingDistance = Abstand.GetText
+ HatchingAngle = Winkel.GetText
+ 'Definition
+ HatchingLineType = Linientyp.GetSelText
+ HatchingLineColor = Linienfarbe.GetSelText
+ HatchingLineTable = Tabelle.GetItemText
+
+
+ Kontext
+ Active.setpage TabBitmap
+ Kontext "TabBitmap"
+
+ BitmapForeground = Vordergrund.GetSelText
+ BitmapBackground = Hintergrund.GetSelText
+ BitmapTable = Tabelle.GetSelText
+
+ Kontext
+ Active.setpage TabArea
+ Kontext "TabArea"
+ TabArea.Cancel
+ printlog " Get_Colour_Attributes ends"
+
+end sub
+
+'-------------------------------------------------------------------------------
+sub Check_Position_Size_Attributes
+
+ printlog " Check_Position_Size_Attributes Starts"
+
+ sleep 1
+ EditPaste
+ sleep (5)
+
+ FormatPositionAndSize
+
+ sleep 1
+ if gApplication = "WRITER" then
+ Kontext "TabPositionAndSizeWriter"
+ Kontext
+ active.SetPage TabPositionAndSizeWriter
+ Kontext
+ active.SetPage TabPositionAndSizeWriter
+ Kontext "TabPositionAndSizeWriter"
+ sleep 1
+
+
+ If LiberalMeasurement(PositionWidth, Width.GetText) <> TRUE then QaErrorLog "PositionWidth is: " + Width.GetText + " should be: '" + PositionWidth + "'. Possibly caused by i71631."
+ If LiberalMeasurement(PositionHeight, Height.GetText) <> TRUE then QaErrorLog "PositionHeight is: " + Height.GetText + " should be: '" + PositionHeight + "'. Possibly caused by i71631."
+
+ If PositionKeepRatio = "TRUE" then
+ If KeepRatio.IsChecked = "FALSE" then Warnlog "KeepRatio isnt checked"
+ End if
+
+ If PositionProtectPosition = "TRUE" then
+ If ProtectPosition.IsChecked = "FALSE" then Warnlog "ProtectPosition isnt checked"
+ End if
+
+ If PositionProtectSize = "TRUE" then
+ If ProtectSize.IsChecked = "FALSE" then Warnlog "ProtectPosition isnt checked"
+ End if
+ sleep 1
+
+ Kontext "TabPositionAndSizeWriter"
+ Kontext
+ Active.setpage TabPositionAndSizeWriter
+ Kontext "TabPositionAndSizeWriter"
+
+ TabPositionAndSizeWriter.OK
+
+ else
+ Kontext
+ active.SetPage TabPositionAndSize
+ Kontext "TabPositionAndSize"
+ sleep 1
+
+
+ If LiberalMeasurement(PositionWidth, Width.GetText) <> TRUE then QaErrorLog "PositionWidth is: " + Width.GetText + " should be: " + PositionWidth + "'. Possibly caused by i71631."
+ If LiberalMeasurement(PositionHeight, Height.GetText) <> TRUE then QaErrorLog "PositionHeight is: " + Height.GetText + " should be: " + PositionHeight + "'. Possibly caused by i71631."
+
+ If PositionKeepRatio = "TRUE" then
+ If KeepRatio.IsChecked = "FALSE" then Warnlog "KeepRatio isnt checked"
+ End if
+
+ If PositionProtectPosition = "TRUE" then
+ If ProtectPosition.IsChecked = "FALSE" then Warnlog "ProtectPosition isnt checked"
+ End if
+
+ If PositionProtectSize = "TRUE" then
+ If ProtectSize.IsChecked = "FALSE" then Warnlog "ProtectPosition isnt checked"
+ End if
+ sleep 1
+
+ Kontext "TabPositionAndSize"
+ Kontext
+ Active.setpage TabPositionAndSize
+ Kontext "TabPositionAndSize"
+
+ TabPositionAndSize.OK
+ endif
+
+ SetKontextApplication
+ sleep 3
+ printlog " Check_Position_Size_Attributes Ends"
+
+end sub
+
+'----------------------------------------------------------------------------------------------------
+sub Check_Text_Formatting
+
+ printlog " Check_Text_Formatting Starts"
+ sleep (1)
+ EditPaste
+ sleep (3)
+
+ select case (gApplication)
+ case "DRAW" : hTypeKeys "<RETURN>"
+ hTypeKeys "<SHIFT HOME>" 'Mark the whole text'
+ case "IMPRESS" : hTypeKeys "<RETURN>"
+ hTypeKeys "<SHIFT HOME>" 'Mark the whole text'
+ case "WRITER" : EditSelectAll 'Since there is currently only (should only be) one object (the text) in the document.
+ case "CALC" : hTypeKeys "<MOD1 HOME>"
+ ' hTypeKeys "<SHIFT HOME>" 'Mark the whole text'
+ case else : warnlog " the test has not been configured for this application ( '" + gApplication + "' ). Please notify testwriter."
+ end select
+ sleep (2)
+
+ Kontext "TextObjectbar"
+ if TextObjectbar.Exists = FALSE then
+ ViewToolbarsTextFormatting
+ sleep (1)
+ endif
+ Printlog " - Check if the Fontname is still the same."
+ if Schriftart.GetSelText <> Text1 then warnlog " Fontname should be: " + Text1 + " but was: " + Schriftart.GetSelText
+ sleep (2)
+ Printlog " - Check if the Text still has the same Size."
+ if Schriftgroesse.GetSelText <> Text2 then warnlog " Fontsize should be: " + Text2 + " but was: " + Schriftgroesse.GetSelText
+
+ Kontext "TextObjectbar"
+ Printlog " - Check if the Font-attribute is set to Bold."
+ if Fett.GetState(2) <> Text4 then warnlog " Bold should be: " + Text4 + " but was: " + Fett.GetState(2)
+
+ Kontext "TextObjectbar"
+ Printlog " - Font attribute cursive"
+ if Kursiv.GetState(2) <> Text5 then warnlog " Italic should be: " + Text5 + " but was: " + Kursiv.GetState(2)
+
+ Kontext "TextObjectbar"
+ Printlog " - Check if the Font-attribute is set to Underlined"
+ sleep (2)
+ if Unterstrichen.GetState(2) <> Text6 then warnlog " Underline should be: " + Text6 + " but was: " + Unterstrichen.GetState(2)
+
+ Kontext "TextObjectbar"
+ if (gApplication) = "CALC" then
+ kontext "FormatObjectBar"
+ Printlog " - Check if the Font-attribute is set to Justified"
+ if Block.GetState(2) <> Text7 then warnlog " Justified should be: " + Text7 + " but was: " + Blocksatz.GetState(2)
+ else
+ if Blocksatz.GetState(2) <> Text7 then warnlog " Justified should be: " + Text7 + " but was: " + Blocksatz.GetState(2)
+ endif
+ SetKontextApplication
+ printlog " Check_Text_Formatting Ends"
+
+
+ '----------------------------------------------------------------------------------------------------
+sub Check_Colors_Borders_Attributes
+
+ printlog " Check_Colors_Borders_Attributes Starts"
+
+ FormatArea
+
+ Kontext "TabArea"
+ Kontext
+ Active.setpage TabArea
+ Kontext "TabArea"
+
+ ' /// Area ///'
+ FillOptions.Select 2
+ if FillOptions.GetSelIndex <> 2 then Errorlog "Couldnt click on 'Color' in FormatArea"
+
+ If AreaColourListValue <> ColourList.GetSelText then
+ WarnLog " Area ColourList doesn't have the right Colour selected."
+ printlog " AreaColourListValue = " + AreaColourListValue + " should be = " + ColourList.GetSelText
+ end if
+
+ sleep 1
+
+ FillOptions.Select 3
+ if FillOptions.GetSelIndex <> 3 then Errorlog "Couldnt click on 'Gradient.' in FormatArea"
+
+ If AreaGradientListValue <> GradientList.GetSelText then WarnLog "Area GradientList has changed it's value."
+ If Automatic.IsVisible then
+ If AreaAutomaticValue = "TRUE" then
+ If Automatic.IsChecked then
+ Printlog " Area Automatic Value is correct"
+ Else
+ WarnLog " Area Automatic Value wasnt checked. It should have been."
+ End if
+ End if
+ Else
+ If Increments.IsVisible then
+ If AreaIncrementsValue <> Increments.GetText then WarnLog "Area Increments has changed."
+ End if
+ End if
+
+ FillOptions.Select 4
+ if FillOptions.GetSelIndex <> 4 then Errorlog "Couldnt click on 'Hatching' in FormatArea"
+
+ If AreaHatchingListValue <> HatchingList.GetSelText then Errorlog "Area HatchingList has changed it's value."
+ If BackgroundColour.IsVisible then
+ If BackgroundColour.IsChecked then
+ If AreaBackgroundColourValue <> BackgroundColour.GetText then Errorlog "Area Background Color has changed it's value."
+ end if
+ end if
+ If BackgroundColourList.IsVisible then
+ If AreaBackgroundColourListValue <> BackgroundColourList.GetSelText then Errorlog "Area Background ColourList has changed it's value."
+ End if
+
+ FillOptions.Select 5
+ if FillOptions.GetSelIndex <> 5 then Errorlog "Couldnt click on 'Color' in FormatArea"
+
+ If BitmapList.IsVisible then
+ If AreaBitmapListValue <> BitmapList.GetSelText then Errorlog "Area Bitmap List has changed it's value."
+ else
+ warnlog " No Area-Bitmap-List visible!"
+ end if
+ If Original.IsChecked = "TRUE" then
+ If AreaOriginalListValue <> "TRUE" then Errorlog "Original List has changed it's value."
+ Else
+ If Relative.IsChecked = "TRUE" then
+ If AreaRelativeValue <> "TRUE" then Errorlog "Area Relative has changed it's value." = "TRUE"
+ If AreaWidthValue <> Width.GetText then Errorlog "AreaWidthValue has changed."
+ If AreaHeightValue <> Height.GetText then Errorlog "AreaHeightValue has changed."
+ Else
+ If AreaWidthValue <> Width.GetText then Errorlog "AreaWidthValue has changed."
+ If AreaHeightValue <> Height.GetText then Errorlog "AreaHeightValue has changed."
+ End if
+ End if
+
+ If Tile.IsChecked then
+ If AreaTileValue <> "TRUE" then Errorlog "AreaTileValue has changed."
+ End if
+
+ If Stretch.IsChecked then
+ If AreaStretchValue <> "TRUE" then Errorlog "AreaStretchValue has changed."
+ End if
+
+ If Row.IsChecked then
+ If AreaRowValue <> "TRUE" then Errorlog "AreRowValue has changed."
+ If AreaOffsetValue <> Offset.GetText then Errorlog "AreaOffsetValue has changed."
+ End if
+
+ If Column.IsChecked then
+ If AreaColumnValue <> "TRUE" then Errorlog "AreaColumnValue has changed."
+ If AreaOffsetValue <> Offset.GetText then Errorlog "AreaOffsetValue has changed."
+ End if
+
+ sleep 1
+
+ Kontext "TabArea"
+ Kontext
+ Active.setpage TabSchatten
+ Kontext "TabSchatten"
+
+ If Anzeigen.IsChecked then
+ ShadowUseShadowsValue = "TRUE"
+ ShadowDistanceValue = Entfernung.GetText
+ ShadowColorValue = Farbe.GetText
+ ShadowTransparencyValue = Transparenz.GetText
+ end if
+
+ sleep 1
+
+ Kontext
+ Active.SetPage TabTransparenz
+ Kontext "TabTransparenz"
+
+ if KeineTransparenz.IsEnabled = FALSE then
+ warnlog " Couldnt check 'No transparency' in Area - Transparency'"
+ else
+ KeineTransparenz.Check
+ end if
+
+ If KeineTransparenz.IsChecked then LineareTransparenz.Check
+ If LineareTransparenz.IsChecked then
+ TransparencyTransparencyValue = MFLinTransparenz.GetText
+ end if
+
+ Transparenzverlauf.Check
+ If Transparenzverlauf.IsChecked then
+ TransparencyGradientType = TransparenzverlaufTyp.GetItemText
+ TransparencyMFZentrumX = MFZentrumX.GetText
+ TransparencyMFZentrumY = MFZentrumY.GetText
+ TransparencyMFWinkel = MFWinkel.GetText
+ TransparencyMFRand = MFRand.GetText
+ TransparencyMFStartwert = MFStartwert.GetText
+ TransparencyMFEndwert = MFEndwert.GetText
+ end if
+
+ sleep 1
+
+ Kontext
+ Active.setpage TabFarben
+ Kontext "TabFarben"
+ ColorName = FarbName.GetText
+ ColorColor = Farbe.GetItemText
+ ColorModel = Farbmodell.GetSelText
+ printlog " " + ColorModel
+
+ select case iSprache ' Prepared for future language-problematics.
+ if ColorR <> R.GetText then Warnlog "Wrong R-Color. Should be: " + ColorR + " but was: " + R.GetText
+ if ColorG <> G.GetText then Warnlog "Wrong V-Color. Should be: " + ColorG + " but was: " + G.GetText
+ if ColorB <> B.GetText then Warnlog "Wrong B-Color. Should be: " + ColorB + " but was: " + B.GetText
+ Else
+ if ColorC <> C.GetText then Warnlog "Wrong C-Color. Should be: " + ColorC + " but was: " + C.GetText
+ if ColorM <> M.GetText then Warnlog "Wrong M-Color. Should be: " + ColorM + " but was: " + M.GetText
+ if ColorY <> Y.GetText then Warnlog "Wrong J-Color. Should be: " + ColorY + " but was: " + Y.GetText
+ if ColorK <> K.GetText then Warnlog "Wrong N-Color. Should be: " + ColorK + " but was: " + K.GetText
+ End if
+ if ColorR <> R.GetText then Warnlog "Wrong R-Color. Should be: " + ColorR + " but was: " + R.GetText
+ if ColorG <> G.GetText then Warnlog "Wrong G-Color. Should be: " + ColorG + " but was: " + G.GetText
+ if ColorB <> B.GetText then Warnlog "Wrong B-Color. Should be: " + ColorB + " but was: " + B.GetText
+ Else
+ if ColorC <> C.GetText then Warnlog "Wrong C-Color. Should be: " + ColorC + " but was: " + C.GetText
+ if ColorM <> M.GetText then Warnlog "Wrong M-Color. Should be: " + ColorM + " but was: " + M.GetText
+ if ColorY <> Y.GetText then Warnlog "Wrong Y-Color. Should be: " + ColorY + " but was: " + Y.GetText
+ if ColorK <> K.GetText then Warnlog "Wrong K-Color. Should be: " + ColorK + " but was: " + K.GetText
+ End if
+ end select
+
+ Kontext
+ Active.setpage TabFarbverlaeufe
+ Kontext "TabFarbverlaeufe"
+
+ GradientsType = Typ.GetItemText
+ GradientsCenterX = ZentrumX.GetText
+ GradientsCenterZ = ZentrumY.GetText
+ GradientsAngle = Winkel.GetText
+ GradientsBorder = Rand.GetText
+ GradientsFromColor = Von.GetItemText
+ GradientsFromValue = VonWert.GetText
+ GradientsToColor = Bis.GetItemText
+ GradientsToValue = BisWert.GetText
+
+ Kontext
+ Active.setpage TabSchraffuren
+ Kontext "TabSchraffuren"
+
+ HatchingDistance = Abstand.GetText
+ HatchingAngle = Winkel.GetText
+ 'Definition
+ HatchingLineType = Linientyp.GetSelText
+ HatchingLineColor = Linienfarbe.GetSelText
+ HatchingLineTable = Tabelle.GetItemText
+
+ Kontext
+ Active.setpage TabBitmap
+ Kontext "TabBitmap"
+
+ BitmapForeground = Vordergrund.GetSelText
+ BitmapBackground = Hintergrund.GetSelText
+ BitmapTable = Tabelle.GetSelText
+
+ Kontext
+ Active.setpage TabArea
+ Kontext "TabArea"
+ TabArea.Cancel
+
+ SetKontextApplication
+
+ printlog "Check_Colors_Borders_Attributes Ends"
+
+ Printlog "End of one application"
+
+
+ '---------------------------------- Set the Kontext to the current Application ----------------------------------'
+sub SetKontextApplication
+
+ sleep 1
+ Select Case gApplication
+ Case "DRAW"
+ Kontext "DocumentDraw"
+ ' Printlog "gApplication / Kontext is now: DocumentDraw"
+ sleep 1
+ Case "IMPRESS"
+ Kontext "DocumentImpress"
+ ' Printlog "gApplication / Kontext is now: DocumentImpress"
+ sleep 1
+ Case "WRITER"
+ Kontext "DocumentWriter"
+ ' Printlog "gApplication / Kontext is now: DocumentWriter"
+ sleep 1
+ Case "CALC"
+ Kontext "DocumentCalc"
+ ' Printlog "gApplication / Kontext is now: DocumentCalc"
+ sleep 1
+ end select
+ sleep 1
+
+end sub
+
+'------------------------- Part with "create new windows" ---------------------
+sub New_Draw
+
+ gApplication = "DRAW"
+ ToApp = "DRAW"
+ printlog "to app has changed to: " + gApplication
+ Call hNewDocument
+ SetKontextApplication
+
+end sub
+
+'-------------------------------------------------------------------------------
+sub New_Impress
+
+ printlog "Copied object from application: " + FromApp2
+ gApplication = "IMPRESS"
+ ToApp = "IMPRESS"
+ printlog "to app has changed to: " + gApplication
+ Call hNewDocument
+ SetKontextApplication
+
+end sub
+
+'-------------------------------------------------------------------------------
+sub New_Calc
+
+ printlog "Copied object from application: " + FromApp2
+ gApplication = "CALC"
+ ToApp = "CALC"
+ printlog "to app has changed to: " + gApplication
+ Call hNewDocument
+ SetKontextApplication
+
+end sub
+
+'-------------------------------------------------------------------------------
+sub New_Writer
+
+ printlog "Copied object from application: " + FromApp2
+ gApplication = "WRITER"
+ ToApp = "WRITER"
+ printlog "to app has changed to: " + gApplication
+ Call hNewDocument
+ SetKontextApplication
+
+end sub
+
+'-------------------------------------------------------------------------------
+sub Choose_Toapplication
+
+ For ToAppCounter = 1 to 4
+
+ Select case ToAppCounter
+ case "1" : Call hCloseDocument
+ printlog "to app: " + gApplication ' Since the first application is Draw by default, we'll skip that one.
+ ToApp = "DRAW"
+ case "2" : Call hCloseDocument
+ gApplication = "IMPRESS"
+ printlog "to app: " + gApplication
+ ToApp = "IMPRESS"
+ case "3" : Call hCloseDocument
+ gApplication = "CALC"
+ printlog "to app: " + gApplication
+ ToApp = "CALC"
+ case "4" : Call hCloseDocument
+ gApplication = "WRITER"
+ printlog "to app: " + gApplication
+ ToApp = "WRITER"
+ case else : goto endsub
+ End select
+ next ToAppCounter
+ Call hNewDocument
+ SetKontextApplication
+
+end sub
+
+'--------------------------------------------------------------------------------------------------------
diff --git a/testautomation/graphics/optional/includes/global/g_convertto.inc b/testautomation/graphics/optional/includes/global/g_convertto.inc
new file mode 100644
index 000000000000..33eb157bc465
--- /dev/null
+++ b/testautomation/graphics/optional/includes/global/g_convertto.inc
@@ -0,0 +1,369 @@
+'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
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* Owner : wolfram.garten@oracle.com
+'*
+'* short description :
+'*
+'**************************************************************************************
+' #1 tiAendernUmwandelnInPolygon
+' #1 tiModifyConvertToPolygon
+' #1 tdContextConvertIntoBitmap
+' #1 tiAendernUmwandelnInKurve
+' #1 tiAendernUmwandelnInPolygonGrafik
+' #1 tiAendernUmwandelnIn3D
+' #1 tiAendernUmwandelnIn3DRotationskoerper
+' #1 tiAendernUmwandelnInMetaFile
+'\*************************************************************************************
+
+' Dateiname.SetText ConvertPath (gTesttoolPath + "global\input\graf_inp\columbia.dxf")
+' Call hGrafikEinfuegen ConvertPath ( gTesttoolPath + "global\input\graf_inp\enter.bmp" )
+' Dateiname.SetText ConvertPath ( gTesttoolPath + "global\input\graf_inp\desp.bmp" )
+' Dateiname.SetText ConvertPath (gTesttoolPath + "global\input\graf_inp\purzel.gif")
+
+' Call tdContextFlip
+' Call tdContextConvertIntoCurve
+' Call tdContextConvertInto3D
+' Call tdContextConvertInto3D_Rotationobject
+' Call tdContextConvertIntoMetaFile
+
+testcase tiModifyConvertToPolygon
+ Dim PosX as string
+ Dim PosY as string
+ Dim Maxanzahl as string
+ Dim Minanzahl as string
+
+ Call hNewDocument
+ Call sSelectEmptyLayout
+ sleep 3
+ hTextrahmenErstellen ("This is a text that will be transformed into a Polygon-object", 10,10,60,30)
+ sleep 1
+ hTypeKeys "<Escape>"
+ sleep 1
+ EditSelectAll
+ sleep 1
+ ContextConvertIntoPolygon
+ sleep 1
+ ContextPositionAndSize
+ Kontext
+ Active.SetPage TabPositionAndSize
+ Kontext "TabPositionAndSize"
+ PosX = Width.GetText
+ PosY = Height.GetText
+ TabPositionAndSize.OK
+ sleep 1
+ FormatCharacter
+ Kontext
+ Active.SetPage TabFont
+ Kontext "TabFont"
+ sleep 1
+ try
+ Size.SetText "96"
+ catch
+ if (gAsianSup OR gCTLSup) then
+ try
+ SizeWest.SetText "96"
+ catch
+ Warnlog "Asian or ctl support is enabled, but Size of font is not accessable :-("
+ endcatch
+ else
+ Warnlog "Asian or ctl support is NOT enabled, but Size of font is not accessable :-("
+ try
+ SizeWest.SetText "96"
+ qaErrorLog "SizeWest. works"
+ catch
+ endcatch
+ try
+ SizeEast.SetText "96"
+ qaErrorLog "SizeEast. works"
+ catch
+ endcatch
+ try
+ Size.SetText "96"
+ qaErrorLog "Size. works"
+ catch
+ endcatch
+ try
+ SizeCTL.SetText "96"
+ qaErrorLog "SizeCTL. works"
+ catch
+ endcatch
+ endif
+ endcatch
+ TabFont.OK
+ sleep 1
+ ContextPositionAndSize
+ Kontext
+ Active.SetPage TabPositionAndSize
+ Kontext "TabPositionAndSize"
+ '/// compare width and heigth to control is it is still text ///'
+ if ( Width.GetText = PosX or Height.GetText = PosY ) Then
+ Printlog "- Text converted into polygon"
+ else
+ Warnlog "- Convert into polygon does not work."
+ end if
+ TabPositionAndSize.OK
+ sleep 1
+ Call hCloseDocument
+ Printlog "-------------------------------------------------end"
+
+ Call hNewDocument
+ sleep 3
+ '/// insert graphic (input\\impress\\grafik\\sample.bmp)///'
+ Call hGrafikEinfuegen ConvertPath ( gTesttoolPath + "global\input\graf_inp\enter.bmp" )
+ sleep 3
+ ContextConvertIntoPolygon
+ Kontext "UmwandelnInPolygon"
+ Farbanzahl.ToMax
+ MaxAnzahl = Farbanzahl.GetText
+ Farbanzahl.More 1
+ If Maxanzahl < Farbanzahl.GetText Then Warnlog "- Maximum value could be raised."
+ Farbanzahl.ToMin '/// set color to min ///'
+ MinAnzahl = Farbanzahl.GetText
+ Farbanzahl.Less 1 '/// try to set a value lower than minimum ///'
+ If Farbanzahl.GetText < Minanzahl then Warnlog "- Minimum value could be lowered."
+ Farbanzahl.SetText "2"
+ Vorschau.Click
+ sleep 5
+ UmwandelnInPolygon.OK
+ sleep 5
+ Printlog "- object vectorized."
+ 'TBO: verify nasty bug about asian/ctl support
+ ToolsOptions
+ call hToolsOptions ("Languagesettings", "Languages")
+ printlog "Asian: '" + Aktivieren.IsChecked + "'"
+ printlog "CTL : '" + ComplexScriptEnabled.IsChecked + "'"
+ Kontext "ExtrasOptionenDlg"
+ ExtrasOptionenDlg.OK
+ '-----------------------------------------------
+ Call hCloseDocument
+
+endcase 'tiModifyConvertToPolygon
+'--------------------------------------------------------
+testcase tdContextConvertIntoBitmap
+
+ Call hNewDocument '/// new document ///'
+ sleep 3
+ InsertGraphicsFromFile '/// insert graphic ///'
+ sleep 3
+ kontext "Active"
+ if Active.Exists Then
+ Active.OK
+ end if
+ sleep 5
+ Kontext "GrafikEinfuegenDlg"
+ sleep 2
+'/// uses input\\impress\\grafik\\columbia.dxf ///
+ Dateiname.SetText ConvertPath (gTesttoolPath + "global\input\graf_inp\columbia.dxf")
+ sleep 2
+ Oeffnen.Click
+ sleep 2
+ Kontext "Active"
+ if Active.Exists Then
+ Warnlog Active.GetText + ", Test will end here because of problems putting graphics into the document"
+ Active.OK
+ sleep 2
+ Call hCloseDocument
+ goto endsub
+ end if
+ Kontext "DocumentImpress"
+ try
+ ContextConvertIntoBitmap '/// convert dxf file to bitmap ///'
+ sleep 1
+ Printlog "- Convert into bitmap works"
+ catch
+ Warnlog "- Convert into bitmap does not work"
+ endcatch
+ sleep 2
+ Call hCloseDocument '/// close document ///'
+
+endcase 'tdContextConvertIntoBitmap
+'--------------------------------------------------------
+testcase tiAendernUmwandelnInKurve
+
+ Printlog " ----- ContextConvertIntoCurve testen"
+
+ Call hNewDocument '/// New impress document///'
+ Call sSelectEmptyLayout
+
+ Call hTextrahmenErstellen ("I test,test,test,test only, if it works for you",20,20,60,30) '/// create textbox///'
+ sleep 2
+ Kontext "DocumentImpress"
+ gMouseDoubleClick 70,70 '/// deselect textbox ///'
+ sleep 2
+ EditSelectAll '/// select textbox ///'
+ sleep 2
+ ContextConvertIntoCurve '/// convert into curve ///'
+ sleep 3
+ gMouseClick 30,15
+
+ hTypeKeys "<SHIFT RIGHT>",3 '/// try to select 3 letters ///'
+ try
+ EditCopy '/// try edit copy to check if its still text ///'
+ Warnlog " - Convert into curve, seperate letters should not be selectable anymore"
+ catch
+ Printlog " - Text converted into a curve"
+ endcatch
+
+ Call hCloseDocument '/// close document ///'
+
+endcase 'tiAendernUmwandelnInKurve
+'--------------------------------------------------------
+testcase tiAendernUmwandelnInPolygonGrafik
+
+ Printlog "- Context/ConvertIntoPolygon"
+
+ Call hNewDocument '/// new document ///'
+ Call sSelectEmptyLayout
+
+ InsertGraphicsFromFile '/// insert graphic (desp.bmp) ///'
+
+ Kontext "GrafikEinfuegenDlg"
+ '///use graphic : input\\impress\\grafik\\desp.bmp ///
+ Dateiname.SetText ConvertPath ( gTesttoolPath + "global\input\graf_inp\desp.bmp" )
+ Oeffnen.Click
+ sleep 3
+ Kontext "DocumentImpress"
+ EditSelectAll
+ sleep 1
+
+ ContextConvertIntoPolygon '/// convert into polygon ///'
+ Kontext "UmwandelnInPolygon"
+ Printlog "- Testing vectorize dialog"
+ Farbanzahl.ToMax '/// set number of colors to max ///'
+ if Farbanzahl.GetText <> "32" Then Warnlog "- Maximum value for color depth should be 32, but it is: " + Farbanzahl.GetText
+ Farbanzahl.ToMin '/// set number of colors to min ///'
+ sleep 1
+ if Farbanzahl.GetText <> "8" Then Warnlog "- Minimum value for color depth should be 8 but it is: " + Farbanzahl.GetText
+ sleep 2
+ Punktreduktion.SetText "50" '/// set point reduction to 50 ///'
+ sleep 2
+ if Punktreduktion.GetText <> "32 Pixel" Then Warnlog "- Maximum value should be 32, but it is: " + Punktreduktion.GetText
+ sleep 1
+ Punktreduktion.SetText "-50" '/// set an out of range value ///'
+ sleep 1
+ if Punktreduktion.GetText <> "0 Pixel" Then Warnlog "- Minimum value should be 0, but it is: " + Punktreduktion.GetText
+ Loecherfuellen.Uncheck '/// uncheck fill holes ///'
+ if Not Kachelgroesse.IsEnabled Then
+ Printlog "- Control disabled."
+ else
+ Warnlog "- Control should be disabled if Fill is not checked."
+ end if
+ Vorschau.Click '/// open preview ///'
+ sleep 2
+ UmwandelnInPolygon.OK '/// close dialog ///'
+ sleep 5
+ Call hCloseDocument '/// close document ///'
+
+endcase 'tiAendernUmwandelnInPolygonGrafik
+'--------------------------------------------------------
+testcase tiAendernUmwandelnIn3D
+
+ Printlog "- Convert into 3D"
+ Call hNewDocument
+ sleep 1 '/// new impress document ///'
+ hRechteckErstellen (10,10,40,40) '/// create rectangle ///'
+ '/// convert into 3D ///'
+ sleep 2
+ gMouseclick 35,35
+ sleep 1
+ try
+ ContextConvertInto3D '/// try to access convert ito 3d a 2nd time, should be impossible using a 3d object as source ///'
+ Printlog "- Convert into 3D works"
+ catch
+ Warnlog "- Convert into 3D does not work"
+ endcatch
+ Call hCloseDocument '/// close document '///
+
+endcase 'tiAendernUmwandelnIn3D
+'--------------------------------------------------------
+testcase tiAendernUmwandelnIn3DRotationskoerper
+
+ Printlog "- ConvertInto3DRotationobject"
+ Dim PosX
+ Dim PosY
+
+ Call hNewDocument '/// new document '///
+ Kontext "DocumentImpress"
+ hRechteckErstellen (20,20,50,50) '/// create rectangle ///'
+ sleep 1
+ ContextPositionAndSize '/// get position values for the rectangle ///'
+ Kontext
+ Active.SetPage TabPositionAndSize
+ Kontext "TabPositionAndSize"
+ PosX = PositionX.GetText
+ PosY = PositionY.GetText
+ TabPositionAndSize.OK
+ sleep 1
+ Kontext "DocumentImpress"
+ ContextConvertInto3DRotationObject '/// convert into 3d lathe object ///'
+ sleep 2
+ ContextPositionAndSize
+ Kontext
+ Active.SetPage TabPositionAndSize '/// control changes in position values to confirm convert action ///'
+ Kontext "TabPositionAndSize"
+ if PositionX.GetText = PosX and PositionY.GetText = PosY Then Warnlog "- No change in position or dimension, converting seemd not to work"
+ TabPositionAndSize.OK
+ sleep 1
+ Call hCloseDocument '/// close document ///'
+
+endcase 'tiAendernUmwandelnIn3DRotationskoerper
+'--------------------------------------------------------
+testcase tiAendernUmwandelnInMetaFile
+
+ Printlog "- ConvertIntoMetaFile"
+
+ Call hNewDocument '/// new document ///'
+ sleep 3
+ InsertGraphicsFromFile '/// insert graphic ///'
+ sleep 1
+ kontext "Active"
+ sleep 1
+ if Active.Exists Then
+ Active.OK
+ end if
+ sleep 1
+ Kontext "GrafikEinfuegenDlg"
+ sleep 2
+ '/// uses input\\impress\\grafik\\desp.gif") ///
+ Dateiname.SetText ConvertPath (gTesttoolPath + "global\input\graf_inp\purzel.gif")
+ sleep 2
+ Oeffnen.Click
+ sleep 5
+ Kontext "DocumentImpress"
+ try
+ ContextConvertIntoMetafile '/// convert bitmap into metafile ///'
+ sleep 2
+ Printlog "- Convert into Metafile does work"
+ catch
+ Warnlog "- Convert into Metafile does not work"
+ endcatch
+ sleep 2
+ Call hCloseDocument '/// close document ///'
+
+endcase 'tiAendernUmwandelnInMetaFile
+
diff --git a/testautomation/graphics/optional/includes/global/g_crossfading.inc b/testautomation/graphics/optional/includes/global/g_crossfading.inc
new file mode 100644
index 000000000000..0d7142b9ae46
--- /dev/null
+++ b/testautomation/graphics/optional/includes/global/g_crossfading.inc
@@ -0,0 +1,267 @@
+'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
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* Owner : wolfram.garten@oracle.com
+'*
+'* short description :
+'*
+'**************************************************************************************
+' #1 tCrossfading
+'\*************************************************************************************
+
+testcase tCrossfading
+ dim X as integer
+ dim Z as integer
+ dim Y as integer
+ dim I as integer
+ dim CheckX as integer
+ dim FirstX as integer
+ dim CounterForX as integer
+ dim anothercounter as integer
+
+ Call hNewDocument
+ Call sSelectEmptyLayout '/// New Impress document ///'
+ gMouseClick 50,50
+ sleep 1
+ Call hRechteckErstellen ( 5, 5, 20, 30 ) '/// Create rectangle ///'
+ gMouseClick 90,90
+ Call hRechteckErstellen ( 30, 30, 70, 70 ) '/// create rectangle ///'
+ sleep 1
+ EditSelectAll '/// Select all ///'
+ sleep 1
+ EditCrossFading '/// Choose Edit / CrossFading ///'
+ kontext "Ueberblenden"
+ X = Schritte.GetText ' /// Get counter-value and save it in X ///'
+ printlog "Steps before we start the test: " + X
+ printlog "Schritte.GetText= " + Schritte.GetText
+
+ Schritte.ToMin
+ if Schritte.GetText <> "1" then qaerrorlog "Could not change the step-number to 1."
+
+ for I = 2 to 10 ' /// How many steps do you want? ///'
+ Schritte.More 1
+ if Schritte.GetText <> I then qaerrorlog "Could not change the step-number to" + I
+ Ueberblenden.OK
+ sleep 1
+ try
+ FormatUngroupDraw '/// open context menu and ungroup objects ///'
+ catch
+ qaerrorlog "Could not ungroup objects"
+ endcatch
+ sleep 1
+ hTypeKeys "<TAB>" '/// Should make the first object active ///'
+
+ '/// Get position and dimensions of elements ///'
+ try
+ ContextPositionAndSize
+ catch
+ qaerrorlog "Couldnt call 'ContextPositionAndSize' - No object selected?"
+ endcatch
+ kontext
+ active.SetPage TabPositionAndSize
+ sleep 1
+ kontext "TabPositionAndSize"
+ if TabPositionAndSize.exists (5) then
+ CounterForX=0
+ CheckX=0
+ FirstX=PositionX.GetText '/// Tet Dimensions of first object ///'
+ TabPositionAndSize.OK
+ else
+ qaerrorlog "Couldn't switch tab page :-( "
+ endif
+
+
+anothercounter = I+2 '/// How many objects we have on the screen ///'
+
+ for Y = 1 to anothercounter '/// How many times we should step to (hopefully) get back to the first one ///'
+ if Y > anothercounter then warnlog "Too many steps, something is wrong."
+ try
+ hTypeKeys "<TAB>" '/// Step to the next object ///'
+ catch
+ errolog "Could not step to the next object"
+ endcatch
+' Printlog "- Get position and dimensions of elements"
+ ContextPositionAndSize '/// Open Position and Size for this object ///'
+ sleep 1
+ Kontext
+ Active.SetPage TabPositionAndSize
+ Kontext "TabPositionAndSize"
+ CheckX=PositionX.GetText '/// Get Position X for this object ///'
+ sleep 1
+ TabPositionAndSize.OK
+ Kontext "DocumentDraw"
+ CounterForX=CounterForX+1 '/// Up one on the object-counter ///'
+ if CheckX=FirstX then '/// Check if Position is the same as the first one ///'
+ if anothercounter = CounterForX then printlog "The first box is at: " + CheckX + " And we're now at " + FirstX + " = Correct steps between the objects, everything's fine."
+ printlog "We should have " + Y + " objects to go through." '/// Just here for debugging. - FHA
+' printlog "anothercounter= " + anothercounter '/// Just here for debugging. - FHA
+ printlog "Number of objects: " + anothercounter
+ printlog ""
+ endif
+ next Y '/// End or go on with the checking-loop ///'
+
+ EditSelectAll '/// Select all ///'
+ EditDelete '/// Delete all ///'
+ sleep 1
+ Call hRechteckErstellen ( 5, 5, 20, 30 ) '/// Create rectangle ///'
+ gMouseClick 90,90
+ Call hRechteckErstellen ( 30, 30, 70, 70 ) '/// Create rectangle ///'
+ sleep 1
+ EditSelectAll '/// Select all ///'
+ sleep 1
+ EditCrossFading '/// Choose Edit / CrossFading ///'
+ sleep 2
+ kontext "Ueberblenden"
+ next I
+
+ '/// And now we're gonna check if we can separate the object into it's parts ///'
+ '/// And check if the numbers of steps / objects is correct ///'
+
+ Schritte.ToMin '/// Select minimum value for number of steps ///'
+ for Z = 1 to X -1
+ Schritte.More '/// Raise the value for number of steps with one ///'
+ next Z
+ printlog "Value has been restored to: " + Schritte.GetText
+ printlog "X is now: " + X
+ Attributierung.UnCheck
+ Ueberblenden.OK
+ sleep 1
+ Kontext "DocumentDraw"
+ EditSelectAll '/// Select all ///'
+ EditDelete '/// Delete all ///'
+ sleep 1
+ Call hRechteckErstellen ( 5, 5, 20, 30 ) '/// Create rectangle ///'
+ gMouseClick 90,90
+ Call hRechteckErstellen ( 30, 30, 70, 70 ) '/// Create second rectangle ///'
+ EditSelectAll '/// Select all ///'
+ sleep 1
+ EditCrossFading '/// Choose Edit / CrossFading ///'
+ Kontext "Ueberblenden"
+ if Attributierung.IsChecked = TRUE then qaerrorlog "Attributierung / was NOT unchecked."
+ GleicheOrientierung.UnCheck '/// Uncheck "same orienation" ///' -????
+ Ueberblenden.OK '/// Close CrossFading-window with "OK" ///'
+ sleep 1
+ Kontext "DocumentDraw"
+ EditSelectAll '/// Select all ///'
+ EditDelete '/// Delete all ///'
+ sleep 1
+ Call hRechteckErstellen ( 5, 5, 20, 30 ) '/// Create rectangle ///'
+ gMouseClick 90,90
+ Call hRechteckErstellen ( 30, 30, 70, 70 ) '/// create rectangle ///'
+ EditSelectAll '/// Select all ///'
+ sleep 1
+ EditCrossFading '/// Choose Edit / CrossFading ///'
+ Kontext "Ueberblenden"
+ if GleicheOrientierung.IsChecked = TRUE then qaerrorlog "GleicheOrientierung / was NOT unchecked."
+ Attributierung.Check '/// Check "Attributing" ///' - ???
+ Ueberblenden.OK '/// Close CrossFading-window with "OK" ///'
+ sleep 1
+ Kontext "DocumentDraw"
+ EditSelectAll '/// Select all ///'
+ sleep 1
+ EditDelete '/// Delete all ///'
+ sleep 1
+ Call hRechteckErstellen ( 5, 5, 20, 30 ) '/// Create rectangle ///'
+ gMouseClick 90,90
+ Call hRechteckErstellen ( 30, 30, 70, 70 ) '/// Create second rectangle ///'
+ EditSelectAll '/// Select all ///'
+ sleep 1
+ EditCrossFading '/// Choose Edit / CrossFading ///'
+ Kontext "Ueberblenden"
+ if Attributierung.IsChecked = FALSE then qaerrorlog "Attributierung / was NOT checked again."
+ GleicheOrientierung.UnCheck '/// Check "same orientation" ///' -????
+ Ueberblenden.OK
+ sleep 1
+ Kontext "DocumentDraw"
+ EditSelectAll '/// Select all ///'
+ EditDelete '/// Delete all ///'
+ sleep 1
+ Call hRechteckErstellen ( 5, 5, 20, 30 ) '/// Create rectangle ///'
+ gMouseClick 90,90
+ Call hRechteckErstellen ( 30, 30, 70, 70 ) '/// create rectangle ///'
+ EditSelectAll '/// Select all ///'
+ sleep 1
+ EditCrossFading '/// Choose Edit / CrossFading ///'
+ Kontext "Ueberblenden"
+ if GleicheOrientierung.IsChecked = TRUE then qaerrorlog "GleicheOrientierung / was NOT checked again."
+ GleicheOrientierung.Check '/// Check "same orientation" ///' -????
+ Ueberblenden.OK '/// Close CrossFading-window with "OK" ///'
+ sleep 1
+ Kontext "DocumentDraw"
+ EditSelectAll '/// Select all ///'
+ EditDelete '/// Delete all ///'
+ Call hRechteckErstellen ( 5, 5, 20, 30 ) '/// Create rectangle ///'
+ gMouseClick 90,90
+ Call hRechteckErstellen ( 30, 30, 70, 70 ) '/// create rectangle ///'
+ EditSelectAll '/// Select all ///'
+ sleep 1
+ EditCrossFading '/// Choose Edit / CrossFading ///'
+ Kontext "Ueberblenden"
+ if GleicheOrientierung.IsChecked = FALSE then qaerrorlog "GleicheOrientierung / was NOT checked again."
+ GleicheOrientierung.Check '/// Check "same orientation" ///' -????
+ Ueberblenden.OK '/// Close CrossFading-window with "OK" ///'
+ sleep 1
+
+ Kontext "DocumentDraw" '/// EditCrossFading should not be enabled if more than two objects is selected. ///'
+ EditSelectAll '/// Select all ///'
+ EditDelete '/// Delete all ///'
+
+ sleep 1
+ Call hRechteckErstellen ( 5, 5, 20, 30 ) '/// Create rectangle ///'
+ gMouseClick 90,90
+ Call hRechteckErstellen ( 30, 30, 70, 70 ) '/// Create second rectangle ///'
+ gMouseClick 90,90
+ Call hRechteckErstellen ( 20, 20, 50, 50 ) '/// Create third rectangle ///'
+ sleep 1
+ EditSelectAll '/// Select all ///'
+ sleep 1
+ try
+ EditCrossFading '/// Choose Edit / CrossFading ///'
+ sleep 2
+ If active = "Ueberblenden" then
+ qaerrorlog "CrossFading should NOT be selectable since more than two objects is selected."
+ kontext "Ueberblenden"
+ Ueberblenden.CANCEL '/// Close CrossFading-window with "CANCEL" ///'
+ endif
+ sleep 2
+ Kontext "DocumentDraw"
+ catch
+ printlog "CrossFading could not be selected when more than two objects selected: Correct."
+ endcatch
+
+ try
+ EditSelectAll '/// Select all ///'
+ EditDelete '/// Delete all ///'
+ catch
+ warnlog "Could not select and delete all objects."
+ endcatch
+
+ printlog "End of test"
+
+ Call hCloseDocument '/// Close document ///'
+
+endcase 'tCrossfading
diff --git a/testautomation/graphics/optional/includes/global/g_customshapes.inc b/testautomation/graphics/optional/includes/global/g_customshapes.inc
new file mode 100644
index 000000000000..28c2e22ed301
--- /dev/null
+++ b/testautomation/graphics/optional/includes/global/g_customshapes.inc
@@ -0,0 +1,848 @@
+'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
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* Owner : wolfram.garten@oracle.com
+'*
+'* short description : Customshapes-test
+'*
+'*********************************************************************
+' #1 tCustomshapes
+' #1 tFormatPaintbrush
+'\********************************************************************
+testcase tCustomshapes
+
+ dim counter as Integer
+ dim MakeInto3Dcounter as Integer
+
+ '/// Create new document ///'
+ Call hNewDocument
+ Call sSelectEmptyLayout
+ if gApplication = "DRAW" then
+ Kontext "Documentdraw"
+ else '(Impress)
+ Kontext "DocumentImpress"
+ endif
+ kontext "Toolbar"
+ sleep 1
+ printlog "insert a Smiley."
+ '/// From the toolbar: Insert three objects: ///'
+ '/// insert a Smiley. ///'
+ kontext "Toolbar"
+ if Toolbar.Exists then
+ if Toolbar.IsVisible then
+ sleep 1
+ try
+ SymbolShapes.TearOff
+ catch
+ warnlog "bug for GH from FHA; .tearoff doesnt tell success"
+ endcatch
+ sleep 1
+ kontext "SymbolShapes"
+ SymbolShapesSmiley.Click
+ sleep 1
+
+ gMouseDown (40,40)
+ gMouseMove (40,40,60,60)
+ gMouseUp (60,60)
+
+ sleep 1
+ kontext "SymbolShapes"
+ SymbolShapes.Close
+
+ '/// Unmark all objects ///'
+ hTypeKeys "<ESCAPE>"
+
+ '/// Mark the Smiley ///'
+ hTypeKeys "<TAB>"
+
+ printlog "Rename the object to 'First'."
+ '/// Rename the object to 'First' ///"
+ hOpenContextMenu
+ sleep 2
+ 'Choose rename.
+ if hMenuFindSelect(27027, true, 15) = false then
+ Warnlog "Context-Menu-entry `Rename` was not found. Therefore the test ends."
+ Call hCloseDocument
+ Goto Endsub
+ endif
+ kontext "NameDlgObject"
+ NameField.SetText "First"
+ NameDlgObject.OK
+
+ printlog "Set the object -Title/Description to 'SecondTitle' and 'SecondText'"
+ '/// Open the Context-menu and set the description of the object to 'First' ///"
+ hOpenContextMenu
+ sleep (2)
+ 'Choose "Description"
+ if hMenuFindSelect(27033, true, 14) = false then
+ Warnlog "Context-Menu-entry `Description` was not found. Therefore the test ends."
+ Call hCloseDocument
+ Goto Endsub
+ endif
+ kontext "DescriptionObject"
+ DescriptionTitle.SetText "FirstTitle"
+ DescriptionText.SetText "FirstText"
+ DescriptionObject.Ok
+ else
+ warnlog "the Toolbar wasnt visible."
+ endif
+ else
+ warnlog "the Toolbar didnt exist."
+ endif
+ gMouseClick 90, 90
+
+ printlog "Insert a Triangle."
+ '/// Insert a Triangle ///'
+ kontext "Toolbar"
+ if Toolbar.Exists then
+ if Toolbar.IsVisible then
+ try
+ BasicShapes.TearOff
+ catch
+ warnlog "bug for GH from FHA; .tearoff doesnt tell success"
+ endcatch
+ kontext "BasicShapes"
+ sleep 1
+ IsoscelesTriangle.click
+ sleep 1
+
+ gMouseDown (45,33)
+ gMouseMove (45,33,55,42)
+ gMouseUp (55,42)
+ sleep 1
+ kontext "BasicShapes"
+ BasicShapes.Close
+ sleep 1
+
+ '/// Unmark all objects ///'
+ hTypeKeys "<ESCAPE>"
+ '/// Mark the Triangle ///'
+ hTypeKeys "<TAB>", 2
+
+ printlog "Rename the object into 'Second'."
+ '/// Rename the object into 'Second'. ///'
+ hOpenContextMenu
+ sleep 2
+ 'Choose rename.
+ if hMenuFindSelect(27027, true, 15) = false then
+ Warnlog "Context-Menu-entry `Rename` was not found. Therefore the test ends."
+ Call hCloseDocument
+ Goto Endsub
+ endif
+
+ sleep 1
+ kontext "NameDlgObject"
+ NameField.SetText "Second"
+ NameDlgObject.OK
+
+ printlog "Set the object -Title/Description to 'SecondTitle' and 'SecondText'."
+ '/// Open the Context-menu and set the description of the object to 'SecondTitle' and 'SecondText' ///"
+ hOpenContextMenu
+ sleep (2)
+ 'Choose "Description"
+ if hMenuFindSelect(27033, true, 14) = false then
+ Warnlog "Context-Menu-entry `Description` was not found. Therefore the test ends."
+ Call hCloseDocument
+ Goto Endsub
+ endif
+ kontext "DescriptionObject"
+ DescriptionTitle.SetText "SecondTitle"
+ DescriptionText.SetText "SecondText"
+ DescriptionObject.Ok
+ else
+ warnlog "the Toolbar wasnt visible."
+ endif
+ else
+ warnlog "the Toolbar didnt exist."
+ endif
+ gMouseClick 90, 90
+
+ printlog "Insert Thinking-cloud."
+ '/// Insert Thinking-cloud. ///'
+ kontext "Toolbar"
+ if Toolbar.Exists then
+ if Toolbar.IsVisible then
+ sleep 1
+ try
+ CalloutShapes.TearOff ' insert Thinking-cloud
+ catch
+ warnlog "bug for GH from FHA; .tearoff doesnt tell success"
+ endcatch
+ kontext "Callouts"
+ sleep 1
+ Cloud.click
+ sleep 1
+
+ gMouseDown (1,1)
+ gMouseMove (1,1,35,30)
+ gMouseUp (35,30)
+ sleep 1
+
+ kontext "Callouts"
+ Callouts.Close
+ sleep 1
+
+ '/// Unmark all objects ///'
+ hTypeKeys "<ESCAPE>"
+ '/// Mark the cloud ///'
+ hTypeKeys "<TAB>", 3
+
+ printlog "Rename the object to 'Third'."
+ '/// Rename the object to 'Third'. ///'
+ hOpenContextMenu
+ sleep 2
+ 'Choose rename.
+ if hMenuFindSelect(27027, true, 15) = false then
+ Warnlog "Context-Menu-entry `Rename` was not found. Therefore the test ends."
+ Call hCloseDocument
+ Goto Endsub
+ endif
+ Kontext "NameDlgObject"
+ NameField.SetText "Third"
+ NameDlgObject.OK
+
+ printlog "Set the object -Title/Description to 'ThirdTitle' and 'ThirdText'."
+ '/// Open the Context-menu and set the description of the object to 'First' ///"
+ hOpenContextMenu
+ sleep (2)
+ 'Choose "Description"
+ if hMenuFindSelect(27033, true, 14) = false then
+ Warnlog "Context-Menu-entry `Description` was not found. Therefore the test ends."
+ Call hCloseDocument
+ Goto Endsub
+ endif
+ kontext "DescriptionObject"
+ DescriptionTitle.SetText "ThirdTitle"
+ DescriptionText.SetText "ThirdText"
+ DescriptionObject.Ok
+ else
+ warnlog "the Toolbar wasnt visible."
+ endif
+ else
+ warnlog "the Toolbar didnt exist."
+ endif
+ gMouseClick 90, 90
+
+ printlog "Change all objects into 3D."
+ '/// Change all objects into 3D. ///'
+ if gApplication = "DRAW" then
+ Kontext "Documentdraw"
+ else '(Impress)
+ Kontext "DocumentImpress"
+ endif
+ For MakeInto3Dcounter = 1 to 3
+ hTypeKeys "<TAB>", MakeInto3Dcounter
+ kontext "Toolbar"
+ if Toolbar.Exists then
+ if Toolbar.IsVisible then
+ if ExtrusionOnOff.Exists then
+ ExtrusionOnOff.Click
+ sleep (3)
+ else
+ sleep (1)
+ Toolbar.OpenContextMenu ' enable forms button in menuebar
+ sleep (1)
+ hMenuselectNr (1)
+ sleep (1)
+ if hMenuFindSelect(1024, true, 25) = false then
+ Warnlog "Context-Menu-entry `Extrusion On/Off` was not found. Therefore the test ends."
+ Call hCloseDocument
+ Goto Endsub
+ endif
+ sleep (1)
+ kontext "Toolbar"
+ ExtrusionOnOff.Click
+ sleep (3)
+ endif
+ Kontext "ExtrusionObjectBar"
+ if ExtrusionObjectBar.Exists then
+ if ExtrusionObjectBar.IsVisible then
+ printlog " Objects got converted into Extrusion-objects, correct."
+ else
+ warnlog " No Extrusion-toolbar visible. Eventually a problem making objects into Extrusion-Objects."
+ endif
+ endif
+ endif
+ else
+ warnlog " the 'Toolbar' -Toolbar didnt exist."
+ endif
+ sleep (1)
+ hTypeKeys "<ESCAPE>"
+ Next MakeInto3Dcounter
+
+ printlog "See if the objects still are Custom Shapes."
+ '/// See if the objects still are Custom Shapes ///'
+ '/// We do so by moving the lower part of the the thinking-cloud. ///'
+ gMouseClick 90, 1
+ hTypeKeys "<TAB><TAB><TAB>"
+
+ hTypeKeys "<MOD1 TAB>" ,9
+ if gApplication = "IMPRESS" then
+ hTypeKeys "<RIGHT>" ,86
+ hTypeKeys "<UP>", 48
+ else
+ hTypeKeys "<RIGHT>" ,131
+ hTypeKeys "<UP>" ,53
+ endif
+ sleep 1
+
+ gMouseClick 90, 1
+ hTypeKeys "<TAB>"
+
+ printlog "Check the name of the selected object (should be 'First')"
+ '/// Check the name of the selected object (should be 'First') ///'
+ hOpenContextMenu
+ sleep 2
+ 'Choose rename.
+ if hMenuFindSelect(27027, true, 15) = false then
+ Warnlog "Context-Menu-entry `Rename` was not found. Therefore the test ends."
+ Call hCloseDocument
+ Goto Endsub
+ endif
+
+ sleep 1
+ kontext "NameDlgObject"
+ if NameField.GetText <> "First" then
+ warnlog " Wrong object. Should have been the first, but was the " + NameField.GetText
+ else
+ Printlog " The first object still had the correct name, good."
+ endif
+ NameDlgObject.OK
+
+ printlog "Open the Context-menu and check if the description of the object is right"
+ '/// Open the Context-menu and check if the description of the object is right ///"
+ hOpenContextMenu
+ sleep (2)
+ 'Choose "Description"
+ if hMenuFindSelect(27033, true, 14) = false then
+ Warnlog "Context-Menu-entry `Description` was not found. Therefore the test ends."
+ Call hCloseDocument
+ Goto Endsub
+ endif
+ kontext "DescriptionObject"
+ if DescriptionTitle.GetText <> "FirstTitle" then
+ Warnlog " The description-title for the first object were not 'FirstTitle', but: " + DescriptionTitle.GetText
+ endif
+ if DescriptionText.GetText <> "FirstText" then
+ Warnlog " The description-text for the first object were not 'FirstText', but: " + DescriptionText.GetText
+ endif
+ DescriptionObject.Ok
+
+ Kontext "ExtrusionObjectBar"
+ if ExtrusionObjectBar.Exists then
+ if ExtrusionObjectBar.IsVisible then
+ printlog " The first object got converted into a 3D-object (Extrusion-Object), correct."
+ else
+ warnlog " No Extrusion-Object-toolbar visible. Eventually a problem making the object into 3D."
+ endif
+ endif
+
+ gMouseClick 90, 1
+ hTypeKeys "<TAB><TAB>"
+ '/// Check the name of the selected object (should be 'Second') ///'
+ hOpenContextMenu
+ sleep 2
+ 'Choose rename.
+ if hMenuFindSelect(27027, true, 15) = false then
+ Warnlog " Context-Menu-entry `Rename` was not found. Therefore the test ends."
+ Call hCloseDocument
+ Goto Endsub
+ endif
+
+ sleep 1
+ kontext "NameDlgObject"
+ if NameField.GetText <> "Second" then
+ warnlog " Wrong object. Should have been the second, but was the " + NameField.GetText
+ else
+ Printlog " The second object still had the correct name, good."
+ endif
+ NameDlgObject.OK
+
+ printlog "Open the Context-menu and check if the description of the object is right"
+ '/// Open the Context-menu and check if the description of the object is right ///"
+ hOpenContextMenu
+ sleep (2)
+ 'Choose "Description"
+ if hMenuFindSelect(27033, true, 14) = false then
+ Warnlog "Context-Menu-entry `Description` was not found. Therefore the test ends."
+ Call hCloseDocument
+ Goto Endsub
+ endif
+ kontext "DescriptionObject"
+ if DescriptionTitle.GetText <> "SecondTitle" then
+ Warnlog " The description-title for the second object were not 'SecondTitle', but: " + DescriptionTitle.GetText
+ else
+ printlog " The description-title for the second object were correct"
+ endif
+ if DescriptionText.GetText <> "SecondText" then
+ Warnlog " The description-text for the second object were not 'SecondText', but: " + DescriptionText.GetText
+ else
+ printlog " The description-text for the second object were correct"
+ endif
+ DescriptionObject.Ok
+
+ Kontext "ExtrusionObjectBar"
+ if ExtrusionObjectBar.Exists then
+ if ExtrusionObjectBar.IsVisible then
+ printlog " The first second got converted into 3D-object (Extrusion-Object), correct."
+ else
+ warnlog " No Extrusion-Object-toolbar visible. Eventually a problem making the object into 3D."
+ endif
+ endif
+
+ gMouseClick 90, 1
+ hTypeKeys "<TAB><TAB><TAB>"
+ '/// Check the name of the selected object (should be "Third") ///'
+ hOpenContextMenu
+ sleep 2
+ 'Choose rename.
+ if hMenuFindSelect(27027, true, 15) = false then
+ Warnlog "Context-Menu-entry `Rename` was not found. Therefore the test ends."
+ Call hCloseDocument
+ Goto Endsub
+ endif
+
+ sleep 1
+ kontext "NameDlgObject"
+ if NameField.GetText <> "Third" then
+ warnlog " Wrong object. Should have been the third, but was the " + NameField.GetText
+ else
+ Printlog " The third object still had the correct name, good."
+ endif
+ NameDlgObject.OK
+
+ printlog "Open the Context-menu and check if the description of the object is right"
+ '/// Open the Context-menu and check if the description of the object is right ///"
+ hOpenContextMenu
+ sleep (2)
+ 'Choose "Description"
+ if hMenuFindSelect(27033, true, 14) = false then
+ Warnlog "Context-Menu-entry `Description` was not found. Therefore the test ends."
+ Call hCloseDocument
+ Goto Endsub
+ endif
+ kontext "DescriptionObject"
+ if DescriptionTitle.GetText <> "ThirdTitle" then
+ Warnlog " The description-title for object three were not 'ThirdTitle', but: " + DescriptionTitle.GetText
+ else
+ printlog " The description-title for the second object were correct."
+ endif
+ if DescriptionText.GetText <> "ThirdText" then
+ Warnlog " The description-text for object three were not 'ThirdText', but: " + DescriptionText.GetText
+ else
+ printlog " The description-text for object three were correct."
+ endif
+ DescriptionObject.Ok
+
+ Kontext "ExtrusionObjectBar"
+ if ExtrusionObjectBar.Exists then
+ if ExtrusionObjectBar.IsVisible then
+ printlog " The third object got converted into 3D-object (Extrusion-Object), correct."
+ else
+ warnlog " No Extrusion-Object-toolbar visible. Eventually a problem making the object into 3D."
+ endif
+ endif
+
+ printlog "End of test. Close the document."
+ Call hCloseDocument '/// Close Document ///'
+
+endcase 'tCustomshapes
+'---------------------------------------------------------
+testcase tFormatPaintbrush
+
+ dim counter, ZaehlerVerlauf, j as Integer
+ '/// Hatching ///'
+ dim HatchingDistance as string
+ dim HatchingAngle as string
+ dim HatchingLineType as string
+ dim HatchingLineColor as string
+
+ dim position_value as string
+ dim show_value as boolean
+ dim distance_value as string
+ dim color_value as string
+ dim transparency_value as string
+
+ dim NoTransparency_value as boolean
+ dim linearTransparency_value as boolean
+ dim MFLintransparency_value as string
+ dim Transparencyverlauf_value as boolean
+ dim TransparencyType_value as string
+ dim MFCenterX_value as string
+ dim MFCenterY_value as string
+ dim MFAngle_value as string
+ dim MFRand_value as string
+ dim MFStart_value as string
+ dim MFEnd_value as string
+
+ dim colorname_value as string
+ dim color2_value as string
+ dim colormodel_value as integer
+ dim R_value as string
+ dim G_value as string
+ dim B_value as string
+ dim C_value as string
+ dim M_value as string
+ dim Y_value as string
+ dim K_value as string
+
+ dim type_value as string
+ dim centerx_value as string
+ dim centery_value as string
+ dim angle_value as string
+ dim rand_value as string
+ dim from_value as string
+ dim fromvalue_value as string
+ dim to_value as string
+ dim tovalue_value as string
+ dim to_wert_value as string
+
+ dim front_value as string
+ dim background_value as string
+
+ '/// Create new document ///'
+ Call hNewDocument
+ '/// Create a new rectangle ///'
+ hRechteckErstellen ( 10, 10, 30, 30 )
+ FormatArea
+ '/// Switch to Tabpage "Area" ///'
+ Kontext
+ Active.SetPage TabArea
+ Kontext "TabArea"
+ sleep 1
+ FillOptions.Select 4 '/// Select hatching, control after closing and reopening dialog if changes are recognized ///'
+ '/// Switch to Tabpage "Hatching" ///'
+ Kontext
+ Active.setpage TabSchraffuren
+ Kontext "TabSchraffuren"
+
+ '/// Get the values for the Rectangle ///'
+ HatchingDistance = Abstand.GetText
+ HatchingAngle = Winkel.GetText
+ 'Definition
+ HatchingLineType = Linientyp.GetSelText
+ HatchingLineColor = Linienfarbe.GetSelText
+
+ 'TabSchraffuren.OK
+ sleep 1
+
+' FormatArea
+ '/// Switch to Tabpage "Shaddow" ///'
+ Kontext
+ Active.setpage TabSchatten
+ Kontext "TabSchatten"
+
+ show_value = Anzeigen.isChecked 'Boolean
+ if Anzeigen.isChecked then
+ position_value = Position.GetSelText
+ distance_value = Entfernung.GetSelText
+ color_value = Farbe.GetSelText
+ transparency_value = Transparenz.GetSelText
+ endif
+ sleep 1
+
+ '/// Switch to Tabpage "Transparency" ///'
+ Kontext
+ Active.SetPage TabTransparenz
+ Kontext "TabTransparenz"
+
+ NoTransparency_value = KeineTransparenz.isChecked
+ linearTransparency_value = LineareTransparenz.isChecked
+ MFLinTransparency_value = MFLinTransparenz.GetText
+ Transparencyverlauf_value = Transparenzverlauf.isChecked
+ TransparencyType_value = TransparenzverlaufTyp.GetSelText
+ MFCenterX_value = MFZentrumX.GetText
+ MFCenterY_value = MFZentrumY.GetText
+ MFAngle_value = MFWinkel.GetText
+ MFRand_value = MFRand.GetText
+ MFStart_value = MFStartwert.GetText
+ MFEnd_value = MFEndwert.GetText
+
+ sleep 1
+ '/// Switch to Tabpage "Color" ///'
+ Kontext
+ Active.setpage TabFarben
+ Kontext "TabFarben"
+
+ colorname_value = FarbName.GetText
+ color_value = Farbe.GetSelText
+ colormodel_value = Farbmodell.GetSelIndex
+ if colormodel_value = 1 then
+ R_value = R.GetText
+ G_value = G.GetText
+ B_value = B.GetText
+ else 'farbmodell_value = 2
+ C_value = C.GetText
+ M_value = M.GetText
+ Y_value = Y.GetText
+ K_value = K.GetText
+ endif
+ sleep 1
+
+ '/// Switch to Tabpage "Gradient" ///'
+ Kontext
+ Active.setpage TabFarbverlaeufe
+ Kontext "TabFarbverlaeufe"
+
+ type_value = Typ.GetSelText
+ Centerx_value = ZentrumX.GetText
+ Centery_value = ZentrumY.GetText
+ angle_value = Winkel.GetText
+ rand_value = Rand.GetText
+ from_value = Von.GetSelText
+ fromvalue_value = VonWert.GetText
+ to_value = Bis.GetSelText
+ tovalue_value = BisWert.GetText
+ sleep 1
+
+ '/// Switch to Tabpage "Bitmap" ///'
+ Kontext
+ Active.setpage TabBitmap
+ Kontext "TabBitmap"
+
+ front_value = Vordergrund.GetSelText
+ background_value = Hintergrund.GetSelText
+ sleep 1
+ '/// Close the FormatArea-dialogue with "OK" ///'
+ TabBitmap.OK
+ sleep 2
+
+ '/// Create a second rectangle, and use the "Paintbrush-icon" to copy the settings for the first rectangle onto the new one ///'
+ hRechteckErstellen ( 70, 70, 90, 90 )
+ if gApplication = "DRAW" then
+ kontext "Documentdraw"
+ Documentdraw.Mousedown 20, 20
+ Documentdraw.Mouseup 20, 20
+ sleep 1
+ kontext "Standardbar"
+ FormatPaintbrush.Click
+ kontext "Documentdraw"
+ sleep 1
+ Documentdraw.Mousedown 80, 80
+ Documentdraw.Mouseup 80, 80
+ sleep 1
+ else '(Impress)
+ Kontext "DocumentImpress"
+ DocumentImpress.typekeys("<F6>",true)
+ DocumentImpress.typekeys("<ESCAPE>",true)
+ DocumentImpress.typekeys("<TAB>",true)
+ sleep 1
+ kontext "Standardbar"
+ FormatPaintbrush.Click
+ kontext "DocumentImpress"
+ sleep 1
+ DocumentImpress.typekeys("<TAB>",true)
+ sleep 1
+ endif
+
+ '/// Check if the Formatting is like the first one. ///'
+ FormatArea
+ '/// Switch to Tabpage "Area" ///'
+ Kontext
+ Active.SetPage TabArea
+ Kontext "TabArea"
+' if FillOptions.GetSelIndex <> 4 then '/// The selected value should be 'no fill' ///'
+' warnlog "The FillOptions-value was not transferred correctly."
+' else
+' printlog "The FillOptions-value was transferred correctly."
+' endif
+
+ sleep 1 '/// control if changes are still there after closing and reopening dialog ///'
+ FillOptions.Select 4 '/// Select hatching, control after closing and reopening dialog if changes are recognized ///'
+ '/// Switch to Tabpage "Hatching" ///'
+ kontext
+ Active.setpage TabSchraffuren
+ kontext "TabSchraffuren"
+
+ if HatchingDistance <> Abstand.GetText then
+ warnlog "Hatching:Distance changed. Should be: " + HatchingDistance + ". Was: " + Abstand.GetText
+ endif
+ if HatchingAngle <> Winkel.GetText then
+ warnlog "Hatching:Angle changed. Should be: " + HatchingAngle + ". Was: " + Winkel.GetText
+ endif
+ 'Definition
+ if HatchingLineType <> Linientyp.GetSelText then
+ warnlog "Hatching:LineType changed. Should be: " + HatchingLineType + ". Was: " + Linientyp.GetSelText
+ endif
+ if HatchingLineColor <> Linienfarbe.GetSelText then
+ warnlog "Hatching:LineColor changed. Should be: " + HatchingLineColor + ". Was: " + Linienfarbe.GetSelText
+ endif
+ sleep 1
+
+ '/// Switch to Tabpage "Shaddow" ///'
+ Kontext
+ Active.setpage TabSchatten
+ Kontext "TabSchatten"
+
+ if Show_value = true then
+ if Anzeigen.isChecked <> true then
+ warnlog "Shaddow:Show had changed! Should have been true, but was " + Anzeigen.isChecked
+ else
+ if position_value <> Position.GetSelText then
+ warnlog "Shaddow:position:value changed. Should be: " + position_value + ". Was: " + Position.GetSelText
+ endif
+ if distance_value <> Entfernung.GetSelText then
+ warnlog "Shaddow:distance:value changed. Should be: " + distance_value + ". Was: " + Entfernung.GetSelText
+ endif
+ if color_value <> Farbe.GetSelText then
+ warnlog "Shaddow:Color:value changed. Should be: " + color_value + ". Was: " + Farbe.GetSelText
+ endif
+ if transparency_value <> Transparenz.GetSelText then
+ warnlog "Shaddow:transparency:value changed. Should be: " + transparency_value + ". Was: " + Transparenz.GetSelText
+ endif
+ endif
+ endif
+ sleep 1
+
+ '/// Switch to Tabpage "Transparency" ///'
+ Kontext
+ Active.SetPage TabTransparenz
+ Kontext "TabTransparenz"
+ if NoTransparency_value <> KeineTransparenz.isChecked then
+ warnlog "Transparency:NoTransparency -value changed. Should be: " + NoTransparency_value + ". Was: " + KeineTransparenz.isChecked
+ endif
+ if linearTransparency_value <> LineareTransparenz.isChecked then
+ warnlog "Transparency:lineareTransparency -value changed. Should be: " + linearTransparency_value + ". Was: " + LineareTransparenz.isChecked
+ endif
+ if MFLinTransparency_value <> MFLinTransparenz.GetText then
+ warnlog "Transparency:MFLinTransparency -value changed. Should be: " + MFLinTransparency_value + ". Was: " + MFLinTransparenz.GetText
+ endif
+ if Transparencyverlauf_value <> Transparenzverlauf.isChecked then
+ warnlog "Transparency:Transparencyverlauf -value changed. Should be: " + Transparencyverlauf_value + ". Was: " + Transparenzverlauf.isChecked
+ endif
+ if TransparencyType_value <> TransparenzverlaufTyp.GetSelText then
+ warnlog "Transparency:TransparencyType -value changed. Should be: " + TransparencyType_value + ". Was: " + TransparenzverlaufTyp.GetSelText
+ endif
+ if MFCenterX_value <> MFZentrumX.GetText then
+ warnlog "Transparency:MFCenterX -value changed. Should be: " + MFCenterX_value + ". Was: " + MFZentrumX.GetText
+ endif
+ if MFCenterY_value <> MFZentrumY.GetText then
+ warnlog "Transparency:MFCenterY -value changed. Should be: " + MFCenterY_value + ". Was: " + MFZentrumY.GetText
+ endif
+ if MFAngle_value <> MFWinkel.GetText then
+ warnlog "Transparency:MFAngle -value changed. Should be: " + MFAngle_value + ". Was: " + MFWinkel.GetText
+ endif
+ if MFRand_value <> MFRand.GetText then
+ warnlog "Transparency:MFRand -value changed. Should be: " + MFRand_value + ". Was: " + MFRand.GetText
+ endif
+ if MFStart_value <> MFStartwert.GetText then
+ warnlog "Transparency:MFStart -value changed. Should be: " + MFStart_value + ". Was: " + MFStartwert.GetText
+ endif
+ if MFEnd_value <> MFEndwert.GetText then
+ warnlog "Transparency:MFEnd -value changed. Should be: " + MFEnd_value + ". Was: " + MFEndwert.GetText
+ endif
+ sleep 1
+
+ '/// Switch to Tabpage "Color" ///'
+ Kontext
+ Active.setpage TabFarben
+ Kontext "TabFarben"
+
+ if colorname_value <> FarbName.GetText then
+ warnlog "colorname_value changed. Should be: " + colorname_value + ". Was: " + FarbName.GetText
+ endif
+ if color_value <> Farbe.GetSelText then
+ warnlog "color_value changed. Should be: " + color_value + ". Was: " + Farbe.GetSelText
+ endif
+ if colormodel_value <> Farbmodell.GetSelIndex then
+ warnlog "colormodel_value changed. Should be: " + colormodel_value + ". Was: " + Farbmodell.GetSelIndex
+ endif
+ if colormodel_value = 1 then
+ if R_value <> R.GetText then
+ warnlog "R_value changed. Should be: " + R_value + ". Was: " + R.GetText
+ endif
+ if G_value <> G.GetText then
+ warnlog "G_value changed. Should be: " + G_value + ". Was: " + G.GetText
+ endif
+ if B_value <> B.GetText then
+ warnlog "B_value changed. Should be: " + B_value + ". Was: " + B.GetText
+ endif
+ endif
+ if colormodel_value = 2 then
+ if C_value <> C.GetText then
+ warnlog "C_value changed.Should be: " + C_value + ". Was: " + C.GetText
+ endif
+ if M_value <> M.GetText then
+ warnlog "M_value changed. Should be: " + M_value + ". Was: " + M.GetText
+ endif
+ if Y_value <> Y.GetText then
+ warnlog "Y_value changed. Should be: " + Y_value + ". Was: " + Y.GetText
+ endif
+ if K_value <> K.GetText then
+ warnlog "K_value changed. Should be: " + K_value + ". Was: " + K.GetText
+ endif
+ endif
+ sleep 1
+
+ '/// Switch to Tabpage "Gradient" ///'
+ Kontext
+ Active.setpage TabFarbverlaeufe
+ Kontext "TabFarbverlaeufe"
+ if type_value <> Typ.GetSelText then
+ warnlog "type_value changed. Should be: " + type_value + ". Was: " + Typ.GetSelText
+ endif
+ if centerx_value <> ZentrumX.GetText then
+ warnlog "centerx_value changed. Should be: " + centerx_value + ". Was: " + ZentrumX.GetText
+ endif
+ if centery_value <> ZentrumY.GetText then
+ warnlog "centery_value changed. Should be: " + centery_value + ". Was: " + ZentrumY.GetText
+ endif
+ if angle_value <> Winkel.GetText then
+ warnlog "angle_value changed. Should be: " + angle_value + ". Was: " + Winkel.GetText
+ endif
+ if rand_value <> Rand.GetText then
+ warnlog "rand_value changed. Should be: " + rand_value + ". Was: " + Rand.GetText
+ endif
+ if from_value <> Von.GetSelText then
+ warnlog "from_value changed. Should be: " + from_value + ". Was: " + Von.GetSelText
+ endif
+ if fromvalue_value <> VonWert.GetText then
+ warnlog "fromvalue_value changed. Should be: " + fromvalue_value + ". Was: " + VonWert.GetText
+ endif
+ if to_value <> Bis.GetSelText then
+ warnlog "to_value changed. Should be: " + to_value + ". Was: " + Bis.GetSelText
+ endif
+ if tovalue_value <> BisWert.GetText then
+ warnlog "tovalue_value changed. Should be: " + tovalue_value + ". Was: " + BisWert.GetText
+ endif
+ sleep 1
+
+ '/// Switch to Tabpage "Bitmap" ///'
+ Kontext
+ Active.setpage TabBitmap
+ Kontext "TabBitmap"
+ if front_value <> Vordergrund.GetSelText then
+ warnlog "vordergrund_value changed. Should be: " + front_value + ". Was: " + Vordergrund.GetSelText
+ endif
+ if background_value <> Hintergrund.GetSelText then
+ warnlog "background_value changed. Should be: " + background_value + ". Was: " + Hintergrund.GetSelText
+ endif
+ sleep 1
+ TabBitmap.OK
+ Call hCloseDocument '/// Close Document ///'
+
+endcase 'tFormatPaintbrush
diff --git a/testautomation/graphics/optional/includes/global/g_demoguide.inc b/testautomation/graphics/optional/includes/global/g_demoguide.inc
new file mode 100644
index 000000000000..d733c878aeb4
--- /dev/null
+++ b/testautomation/graphics/optional/includes/global/g_demoguide.inc
@@ -0,0 +1,501 @@
+'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
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/***********************************************************************
+'*
+'* owner : wolfram.garten@oracle.com
+'*
+'* short description : testcase to check the demo guide
+'*
+'************************************************************************
+'*
+' #1 t_Introduction ' Description
+' #1 t_Interoperability ' Description
+' #1 t_DrawingEngine ' Description
+'
+'*
+'\***********************************************************************
+testcase t_Introduction
+
+ gApplication = "IMPRESS"
+
+ '///Open new presentation
+ printlog "Open new presentation"
+ Call hNewDocument
+ Call sSelectEmptyLayout
+
+ '///Open the Gallery
+ printlog "Open the Gallery"
+ ToolsGallery
+ Sleep (1)
+ Kontext "Gallery"
+ if Gallery.NotExists(2) then
+ ToolsGallery
+ end if
+
+ '///Choose computer theme and insert the third image
+ printlog "Choose an item from the gallery"
+ Gallerys.Select(2)
+ View.TypeKeys "<HOME><RIGHT><RIGHT>"
+ View.TypeKeys "<SHIFT F10>" 'OpenContextMenu(true)
+ sleep 2
+ MenuSelect(MenuGetItemID(1)) 'Insert
+ sleep 2
+ MenuSelect(MenuGetItemID(1)) 'Copy
+ sleep 2
+ '///+ - Check that we really got a copy of the object ///'
+ kontext "DocumentImpress"
+ DocumentImpress.OpenContextMenu(true)
+ sleep 2
+ MenuSelect 27353
+ sleep 2
+ Kontext "ExportierenDlg"
+ if ExportierenDlg.IsVisible(5) then
+ printlog " Gallery-object correctly copied into Slide."
+ ExportierenDlg.Close
+ else
+ warnlog " Doesn't seem like we copied anything from the Gallery... ?"
+ endif
+ printlog "Delete the item"
+ kontext "DocumentImpress"
+ DocumentImpress.TypeKeys "<DELETE>"
+ printlog "Close the Gallery"
+ ToolsGallery
+ printlog "Insert computergraphic from file"
+ InsertGraphicsFromFile
+ try
+ Kontext "GrafikEinfuegenDlg"
+ sleep 2
+ Dateiname.settext Convertpath (gTesttoolPath + "graphics/required/input/screen_white.wmf")
+ Oeffnen.click
+ catch
+ Warnlog "Insert graphic doesn't work"
+ endcatch
+
+ '///Resize object
+ printlog "Resize object"
+ Kontext "DocumentImpress"
+ gMouseClick (10, 10)
+ sleep 1
+ EditSelectAll
+ sleep 1
+ ContextPositionAndSize '/// Format-position and size
+ Kontext
+ Active.SetPage TabPositionAndSize
+ Kontext "TabPositionAndSize"
+ KeepRatio.Check
+ SizePosition.TypeKeys "<UP> <UP> <LEFT> <LEFT>"
+ SizePosition.TypeKeys "<DOWN> <RIGHT>"
+ Width.SetText CStr((CInt(Width.GetText)) * 2)
+ TabPositionAndSize.OK
+
+ '///Break object
+ printlog "Break object"
+ Kontext "DocumentImpress"
+ gMouseClick (10, 10)
+ sleep 1
+ EditSelectAll
+ sleep 1
+ hOpenContextMenu '(when the object is marked)
+ hMenuSelectNr(13)
+ '/// Select part of object and make it black
+ printlog "Select part of object and make it black"
+ DocumentImpress.TypeKeys "<SHIFT TAB>"
+ FormatArea
+ Kontext
+ Active.SetPage TabArea
+ Kontext "TabArea"
+ FillOptions.Select 2
+ ColourList.Select 1
+ TabArea.OK
+
+ '///Group the objects
+ printlog "Group the object"
+ kontext "DocumentImpress"
+ DocumentImpress.TypeKeys "<MOD1 A>"
+ hOpenContextMenu '(when the object is marked)
+ hMenuSelectNr(12)
+
+ '///Add Layout "Title Only"
+ Printlog "Add Layout"
+ kontext "Tasks"
+ if (NOT Tasks.exists) then
+ 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 "<HOME> <DOWN> <DOWN> <RETURN>"
+ 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))
+ View.OpenMenu
+ MenuSelect(MenuGetItemID(4))
+ View.OpenMenu
+ MenuSelect(MenuGetItemID(3))
+ View.OpenMenu
+ MenuSelect(MenuGetItemID(2))
+ sleep(5)
+ View.OpenMenu
+ MenuSelect(MenuGetItemID(1))
+ Tasks.TypeKeys "<TAB>",true
+ Tasks.TypeKeys "<MOD1 HOME>",true
+ AvailableForUsePreview.TypeKeys "<HOME> <RIGHT> <RETURN>"
+ sleep (5)
+ '///Add a transition effect
+ Printlog "Add a transition effect"
+ Kontext "Tasks"
+ 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
+
+endcase 't_Introduction
+'--------------------------------------------------------------------
+testcase t_Interoperability
+
+ Dim sTemplatename as string
+
+ gApplication = "IMPRESS"
+
+ '///Open PowerPoint presentation
+ printlog "Open PowerPoint presentation"
+ hFileOpen (Convertpath (gTesttoolPath + "graphics/required/input/dotNetOverview.ppt"))
+
+ Call sMakeReadOnlyDocumentEditable
+
+ 'Save the name of the origin background (taken from last slide)
+ Kontext "DocumentImpress"
+ DocumentImpress.TypeKeys "<END>"
+ sleep (4)
+ sTemplatename = DocumentImpress.StatusGetText (6)
+ printlog " Background = " & sTemplatename 'Debugcode
+
+ printlog "Choose a masterpage from right pane"
+
+ Kontext "Tasks"
+ printlog "Deselect all tabs accept the Master Pages"
+ View.OpenMenu
+ MenuSelect(MenuGetItemID(5))
+ View.OpenMenu
+ MenuSelect(MenuGetItemID(4))
+ View.OpenMenu
+ MenuSelect(MenuGetItemID(3))
+ View.OpenMenu
+ MenuSelect(MenuGetItemID(2))
+ printlog "needing a longer wait here for first start of the master page previews"
+ wait(20000)
+ Kontext "AvailableForUsePreview"
+ AvailableForUsePreview.TypeKeys "<HOME> <RIGHT> <RETURN>"
+ sleep (5)
+ printlog " Verify that the background has changed"
+ Kontext "DocumentImpress"
+ printlog " Background is " & DocumentImpress.StatusGetText (6) 'Debugcode
+ if DocumentImpress.StatusGetText (6) = sTemplatename then
+ warnlog "The background is not changed"
+ else printlog " Background has been changed"
+ endif
+
+ '///Switch back to original background
+ printlog "Switch back to original background"
+ Kontext "Tasks"
+ Kontext "AvailableForUsePreview"
+ AvailableForUsePreview.TypeKeys "<HOME> <RETURN>"
+ sleep (5)
+ Kontext "DocumentImpress"
+ if DocumentImpress.StatusGetText (6) = sTemplatename then
+ printlog " The background has been set back to default"
+ else warnlog "The background is " & DocumentImpress.StatusGetText (6) & " but should be: " & sTemplatename
+ endif
+
+ '///Resort slides
+ printlog "Resort slides"
+ Kontext "DocumentImpress"
+ Kontext "Slides"
+ Kontext "SlidesControl"
+ SlidesControl.TypeKeys "<Mod1 X>"
+ Kontext "DocumentImpress"
+ DocumentImpress.TypeKeys "<HOME>"
+ Kontext "Slides"
+ Kontext "SlidesControl"
+ SlidesControl.TypeKeys "<Mod1 V>"
+ kontext "InsertPaste"
+ if InsertPaste.Exists(1) then
+ Before.Check
+ InsertPaste.OK
+ endif
+ Printlog " Verify that the slide was moved correctly"
+ Kontext "Slides"
+ SlidesControl.TypeKeys "<PAGEUP>"
+ SlidesControl.TypeKeys "<SHIFT F10>"
+ if hMenuFindSelect(27268, true, 3) = false then
+ Warnlog "Context-Menu-entry `Rename` was not found. Therefore the test ends."
+ Call hCloseDocument
+ Goto Endsub
+ endif
+ kontext "NameDlgPage"
+ if NameField.GetText <> ".NET Enterprise Federation" then
+ Warnlog "Wrong slide found! Expected no 3, but found " + NameField.GetText + "."
+ else
+ Printlog " The slide was correctly moved"
+ endif
+ NameDlgPage.OK
+ sleep 1
+
+ '///Switch views
+ printlog "Switch views"
+ ViewWorkspaceOutlineView
+ sleep (2)
+ setclipboard("")
+ try
+ Kontext "DocumentImpressOutlineView"
+ DocumentImpressOutlineView.TypeKeys "<MOD1 HOME><SHIFT END>"
+ DocumentImpressOutlineView.TypeKeys "<Mod1 C>"
+ sleep (5)
+ if getclipboard() <> ".NET Enterprise" then
+ warnlog " Wrong selection in outlineview. Should be '.NET Enterprise', but is '" & getclipboard() +"'."
+ else printlog " Switching to Outlineview was successfull"
+ endif
+ catch
+ warnlog "Switching to Outlineview was not successfull"
+ endcatch
+ ViewWorkspaceNotesView
+ sleep 1
+ try
+ Kontext "DocumentImpressNotesView"
+ DocumentImpressNotesView.TypeKeys "<TAB><TAB>"
+ DocumentImpressNotesView.OpenContextMenu(true)
+ sleep 2
+ MenuSelect(MenuGetItemID(3)) 'Open Contextmenu Line
+ Kontext "TabLinie"
+ TabLinie.Cancel
+ printlog " Switching to Notesview was successfull"
+ catch
+ warnlog "Switching to Notesview was not successfull"
+ endcatch
+ ViewWorkspaceHandoutView
+ sleep 1
+ try
+ Kontext "DocumentImpressHandoutView"
+ DocumentImpressHandoutView.TypeKeys "<TAB>"
+ printlog " Switching to Handoutview was successfull"
+ catch
+ warnlog "Switching to Handoutview was not successfull"
+ endcatch
+ sleep 2
+ ViewWorkspaceSlidesView
+ sleep 2
+ try
+ Kontext "Slides"
+ SlidesControl.TypeKeys "<TAB>"
+ printlog " Switching to Slideview was successfull"
+ catch
+ warnlog "Switching to Slideview was not successfull"
+ endcatch
+ sleep 1
+ ViewWorkspaceDrawingView
+ sleep 1
+ try
+ Kontext "DocumentImpress"
+ DocumentImpress.TypeKeys "<TAB>"
+ printlog " Switching back to Drawingview was successfull"
+ catch
+ warnlog "Switching to Drawingview was not successfull"
+ endcatch
+
+ '///Travel through the presentation by left pane
+ printlog "Travel through the presentation by left pane to slide 7"
+ Kontext "DocumentImpress"
+ DocumentImpress.TypeKeys "<HOME><PAGEDOWN><PAGEDOWN><PAGEDOWN><PAGEDOWN><PAGEDOWN><PAGEDOWN><PAGEDOWN>"
+ Printlog " Verify that the correct slide (7) is reached"
+ Kontext "Slides"
+ Kontext "SlidesControl"
+ SlidesControl.OpenContextMenu
+ if hMenuFindSelect(27268, true, 3) = false then
+ Warnlog "Context-Menu-entry `Rename` was not found. Therefore the test ends."
+ Call hCloseDocument
+ Goto Endsub
+ endif
+ kontext "NameDlgPage"
+ if NameField.GetText <> "Visual Studio.NET The complete development environment for building distributed applications for Windows and the Web" then
+ Warnlog "Wrong slide found! Expected no 7, but found " + NameField.GetText + "."
+ else Printlog " Slide 7 is reached"
+ endif
+ NameDlgPage.OK
+ sleep 1
+
+ printlog "Autoshape support"
+ Kontext "DocumentImpress"
+ DocumentImpress.TypeKeys "<TAB>"
+ try
+ Kontext "ExtrusionObjectBar"
+ printlog "Checking if ExtrusionObjectBar is already open."
+ if ExtrusionObjectBar.Exists then
+ printlog "ExtrusionObjectBar Exists = " & ExtrusionObjectBar.Exists
+ else
+ printlog "ExtrusionObjectBar Exists = " & ExtrusionObjectBar.Exists
+ printlog "Opening ExtrusionObjectBar."
+ ViewToolbarsThreeDSettings
+ endif
+ ExtrusionTiltRight.Click
+ printlog " An autoshape was found and turned right"
+ catch
+ warnlog "Turning autoshape was not successfully"
+ endcatch
+ printlog "Close document"
+ Call hCloseDocument
+
+endcase 't_Interoperability
+'--------------------------------------------------------------------
+testcase t_DrawingEngine
+
+ Dim sGroupPosition as string
+ Dim sObjectPosition as string
+
+ gApplication = "DRAW"
+
+ '///Open a drawing
+ printlog "Open a drawing"
+ hFileOpen (Convertpath (gTesttoolPath + "graphics/required/input/Blueprint.odg"))
+
+ Call fMakeDocumentWritable
+
+ '///Select grouped object and enter group
+ printlog "Select group"
+ Kontext "DocumentDraw"
+ DocumentDraw.TypeKeys "<TAB><TAB>"
+ sleep (5)
+ printlog " Save position of group"
+ ContextPositionAndSize 'Format-position and size
+ Kontext
+ Active.SetPage TabPositionAndSize
+ Kontext "TabPositionAndSize"
+ sGroupPosition = PositionY.GetText
+ printlog " - GroupPosition is " & sGroupPosition
+ TabPositionAndSize.OK
+ printlog "Enter group"
+ Kontext "DocumentDraw"
+ FormatEditGroupDraw
+ sleep 1
+
+ '///Select and move single object
+ printlog "Select and move single object"
+ printlog " Select object"
+ Kontext "DocumentDraw"
+ DocumentDraw.TypeKeys "<TAB><TAB>"
+ sleep (5)
+ printlog " Verify that the wanted object is selected"
+ DocumentDraw.TypeKeys "<SHIFT F10>" 'Open contextmenu
+ MenuSelect(MenuGetItemID(15)) 'Select NAME from context
+ kontext "NameDlgObject"
+ if NameField.GetText <> "Chair" then
+ Warnlog "Wrong object selected!"
+ else Printlog " The correct object is selected"
+ endif
+ NameDlgObject.OK
+ sleep 1
+ printlog " Save position of group"
+ ContextPositionAndSize 'Format-position and size
+ Kontext
+ Active.SetPage TabPositionAndSize
+ Kontext "TabPositionAndSize"
+ sObjectPosition = PositionY.GetText
+ printlog " - ObjectPosition is " & sObjectPosition
+ TabPositionAndSize.OK
+ printlog " Move object"
+ Kontext "DocumentDraw"
+ DocumentDraw.TypeKeys "<UP><UP><UP>"
+ sleep (5)
+ printlog " Verify that the object was moved"
+ ContextPositionAndSize '/// Format-position and size
+ Kontext
+ Active.SetPage TabPositionAndSize
+ Kontext "TabPositionAndSize"
+ if PositionY.GetText <> sObjectPosition then
+ printlog " Single object was moved"
+ else warnlog "The object has not been moved"
+ endif
+ TabPositionAndSize.OK
+ printlog " Exit group"
+ FormatExitGroupDraw
+ Printlog "Verify that the group is still on position"
+ printlog " Verify position"
+ ContextPositionAndSize 'Format-position and size
+ Kontext
+ Active.SetPage TabPositionAndSize
+ Kontext "TabPositionAndSize"
+ if PositionY.GetText = sGroupPosition then
+ printlog " Group is still on position"
+ else warnlog "Group has moved from " & sGroupPosition & " to " & PositionY.GetText
+ endif
+ TabPositionAndSize.OK
+
+ '///Close document
+ printlog "Close document"
+ Call hCloseDocument
+
+endcase 't_DrawingEngine
diff --git a/testautomation/graphics/optional/includes/global/g_dimensions.inc b/testautomation/graphics/optional/includes/global/g_dimensions.inc
new file mode 100644
index 000000000000..5980903828e0
--- /dev/null
+++ b/testautomation/graphics/optional/includes/global/g_dimensions.inc
@@ -0,0 +1,116 @@
+'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
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* Owner : wolfram.garten@oracle.com
+'*
+'* short description :
+'*
+'***********************************************************************************
+'*
+' #1 tdFormatDimensioning
+'*
+'\***********************************************************************************
+
+Sub testFormatDimensioning
+
+ call tdFormatDimensioning
+
+End Sub
+
+testcase tdFormatDimensioning
+ Dim ZaehlerMetrik
+ Dim i
+
+ Call hNewDocument
+
+ FormatDimensioning
+ Kontext "Bemassung"
+ LinienDistanz.ToMin
+ PrintLog LinienDistanz.GetText + " = minimum value"
+ LinienDistanz.ToMax
+ PrintLog LinienDistanz.GetText + " = maximum value"
+
+ HLUeberhang.ToMin
+ PrintLog HLUeberhang.GetText + " = minimum value"
+ HLUeberhang.ToMax
+ PrintLog HLUeberhang.GetText + " = maximum value"
+
+ HLDistanz.ToMin
+ PrintLog HLDistanz.GetText + " = minimum value"
+ HLDistanz.ToMax
+ PrintLog HLDistanz.GetText + " = maximum value"
+
+ LinkeHL.ToMin
+ PrintLog LinkeHL.GetText + " = minimum value"
+ LinkeHL.ToMax
+ PrintLog LinkeHL.GetText + " = maximum valuet"
+
+ RechteHL.ToMin
+ PrintLog RechteHL.GetText + " = minimum value"
+ RechteHL.ToMax
+ PrintLog RechteHL.GetText + " = maximum value"
+
+ MetrikList.GetItemCount
+ ZaehlerMetrik=MetrikList.GetItemCount
+ for i = 1 to ZaehlerMetrik
+ MetrikList.Select i
+ PrintLog MetrikList.GetSelText + " set"
+ next i
+ MetrikAnzeigen.Check
+ AnzeigeUnterhalb.Check
+ AnzeigeParallel.Check
+ AutomatischHorizontal.Check
+ AutomatischVertikal.Check
+ sleep 2
+ Bemassung.OK
+
+ FormatDimensioning
+ Kontext "Bemassung"
+ MetrikAnzeigen.GetState
+ AnzeigeUnterhalb.GetState
+ AnzeigeParallel.GetState
+ AutomatischHorizontal.GetState
+ AutomatischVertikal.GetState
+ if MetrikAnzeigen.GetState = 1 Then
+ PrintLog " show metric works"
+ else
+ WarnLog " show metric does not work"
+ end if
+ if AnzeigeUnterhalb.GetState= 1 Then
+ PrintLog " AnzeigeUnterhalb does work"
+ else
+ WarnLog " TriStateBox AnzeigeUnterhalb does not work"
+ end if
+ if AnzeigeParallel.GetState= 1 Then
+ PrintLog " AnzeigeParallel does work"
+ else
+ WarnLog " TriStateBox AnzeigeParallel does not work properly"
+ end if
+ Bemassung.OK
+ Call hCloseDocument
+endcase
+
diff --git a/testautomation/graphics/optional/includes/global/g_edit.inc b/testautomation/graphics/optional/includes/global/g_edit.inc
new file mode 100644
index 000000000000..fdff948d0bfb
--- /dev/null
+++ b/testautomation/graphics/optional/includes/global/g_edit.inc
@@ -0,0 +1,294 @@
+'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
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* Owner : wolfram.garten@oracle.com
+'*
+'* short description :
+'*
+'**************************************************************************************
+' #1 tEditDuplicate
+' #1 tEditFields
+' #1 tEditDeleteSlide
+' #1 tEditLinks
+' #1 tdEditDeleteLayer
+' #1 tEditObjectEdit
+'\*************************************************************************************
+
+' sDatei = gTesttoolPath + "graphics\required\input\leer.sx"+left(gApplication,1)
+' sDatei = gTesttoolPath + "graphics\required\input\leer.sx"+left(gApplication,1)
+' Dateiname.SetText ConvertPath (gTesttoolPath + "global\input\graf_inp\enter.bmp")
+
+testcase tEditDuplicate
+ dim Ueber_Text_1
+ dim Zaehler
+
+ Call hNewDocument '/// New Impress document ///'
+ Call hRechteckErstellen ( 5, 5, 20, 30 ) '/// Create rectangle ///'
+ EditSelectAll '/// Select rectangle ///'
+ EditDuplicate '/// Edit-duplicate ///'
+ Kontext "Duplizieren"
+ Ueber_Text_1 = AnzahlAnKopien.GetText
+ AnzahlAnKopien.SetText "50" '/// Set number of copies to 50 ///'
+ Duplizieren.Cancel '/// Cancel Edit Duplicate ///'
+ sleep 1
+ For Zaehler = 1 to 8
+ EditDuplicate '/// Edit Duplicate ///'
+ sleep 1
+ Kontext "Duplizieren"
+ AnzahlAnKopien.SetText "30" '/// Number of copies = 30 ///'
+
+ Select Case Zaehler '/// Setting values for axis and angles ///'
+ Case 1: XAchse.SetText "0,0"
+ YAchse.SetText "0,45"
+ Hoehe.SetText "-0,1"
+ Breite.SetText "-0,1"
+ Drehwinkel.SetText "3"
+ Anfang.Select Int((Anfang.GetItemCount * Rnd)+1)
+ Case 2,6: XAchse.SetText "0,6"
+ YAchse.SetText "0,0"
+ Hoehe.SetText "0,15"
+ Breite.SetText "0,01"
+ Drehwinkel.SetText "353"
+ Case 3,7: XAchse.SetText "0,0"
+ YAchse.SetText "-0,4"
+ Hoehe.SetText "-0,1"
+ Breite.SetText "0,06"
+ Drehwinkel.SetText "11"
+ Case 4,8: XAchse.SetText "-0,6"
+ YAchse.SetText "0,0"
+ Hoehe.SetText "0,05"
+ Breite.SetText "-0,08"
+ Drehwinkel.SetText "347"
+ Case 5: XAchse.SetText "0,1"
+ YAchse.SetText "0,48"
+ Hoehe.SetText "-0,05"
+ Breite.SetText "-0,05"
+ Drehwinkel.SetText "355"
+ End Select
+ Ende.Select Int((Ende.GetItemCount * Rnd)+1)
+ Duplizieren.OK '/// Execute Duplicate ///'
+ sleep 1
+ Next Zaehler
+ sleep 2
+ Call hCloseDocument '/// Close document ///'
+
+endcase 'tEditDuplicate
+'---------------------------------------------------------
+testcase tEditFields
+
+ Call hNewDocument
+ Call sSelectEmptyLayout
+ sleep 3
+ printlog "insert date-fix"
+ InsertFieldsDateFix
+ printlog "select inserted field"
+ EditSelectAll
+ sleep 1
+ printlog "go into edit mode"
+ hTypeKeys "<F2>"
+ sleep 2
+ printlog "select date"
+ EditSelectAll
+ sleep 2
+ printlog "edit fields"
+ EditfieldsDraw
+ Kontext "FeldbefehlBearbeitenDraw"
+ sleep 2
+ printlog "check field type fix"
+ FeldtypFix.Check
+ If FeldtypFix.Ischecked then
+ Printlog "OK FieldtypeFix checkable"
+ else
+ warnlog "FieldtypeFix not checkable"
+ end if
+ printlog "check field type variable 1"
+ FeldtypVariabel.Check
+ sleep 1
+ If FeldtypVariabel.Ischecked then
+ Printlog "OK FieldtypeVariabel enabled"
+ else
+ warnlog "FieldtypeVariabel not enabled"
+ end if
+ ' For Zaehler = 1 to FeldtypFormat.GetItemCount
+ ' FeldTypFormat.Select Zaehler
+ ' printlog "OK Format ", Zaehler, " = ", FeldtypFormat.GetSelText
+ ' Next Zaehler
+ printlog "close edit fields dialog"
+ FeldbefehlBearbeitenDraw.OK
+ sleep 2
+ printlog "Close Document"
+ Call hCloseDocument
+ sleep 2
+
+endcase 'tEditFields
+'--------------------------------------------------------
+testcase tEditDeleteSlide
+
+ dim Ueber_Text_1 as string
+ dim Ueber_Text_2 as string
+ dim Ueber_Text_3 as string
+ Call hNewDocument '/// New impress document ///'
+ sleep 3
+ Call hRechteckErstellen ( 30, 30, 70, 70 ) '/// create rectangle ///'
+ sleep 1
+ ContextPositionAndSize '/// open Position and Size dialog ///'
+ kontext
+ Messagebox.SetPage TabPositionAndSize
+ kontext "TabPositionAndSize"
+ Ueber_Text_1 = PositionX.GetText '/// get position values for rectangle ///'
+ TabPositionAndSize.OK
+ InsertSlide '/// insert slide ///'
+ sleep 2
+ hTypekeys "<Pagedown>"
+ sleep 2
+ Call hRechteckErstellen ( 40, 40, 60, 60 ) '/// create rectangle ///'
+ sleep 1
+ EditDeleteSlide '/// Delete slide ///'
+ sleep 1
+ Ueber_Text_2 = "OK Page was closed"
+ Ueber_Text_3 = "Page was not closed"
+ call Position_Vergleichen (Ueber_Text_1,Ueber_Text_2,Ueber_Text_3) '/// compare position of rectange ///'
+ sleep 1
+ Call hCloseDocument '/// close document ///'
+
+endcase 'tEditDeleteSlide
+'--------------------------------------------------------
+testcase tEditLinks
+
+ Call hNewDocument '/// New document ///'
+ InsertGraphicsFromFile '/// insert graphic (sample.bmp) ///'
+ Kontext "GrafikEinfuegenDlg"
+ Link.Check '/// check link ///'
+ Dateiname.SetText ConvertPath (gTesttoolPath + "global\input\graf_inp\enter.bmp")
+ Oeffnen.Click
+ sleep 3
+ EditLinksDraw '/// edit links ///'
+ Kontext "VerknuepfungenBearbeiten"
+ Aktualisieren.Click '/// refresh ///'
+ sleep 1
+ 'Aendern 'kann man noch den Dialog aufrufen...
+ Loesen.Click
+ sleep 1
+ Kontext
+ Messagebox.Yes
+ VerknuepfungenBearbeiten.Close '/// close dialog ///'
+ sleep 1
+ try
+ EditLinksDraw '/// check if last changes remain in the dialog ///'
+ Kontext "VerknuepfungenBearbeiten"
+ Loesen.Click
+ sleep 1
+ Kontext
+ Messagebox.Yes
+ VerknuepfungenBearbeiten.Close
+ warnlog "Break link does not work"
+ catch
+ printlog "OK Link broken"
+ endcatch
+ Call hCloseDocument '/// close document ///'
+
+endcase 'tEditLinks
+'---------------------------------------------------------
+testcase tdEditDeleteLayer
+
+ dim Ueber_Text_1 as string
+ dim Ueber_Text_2 as string
+ dim Ueber_Text_3 as string
+ Call hNewDocument '/// new document ///'
+ sleep 2
+ Call hRechteckErstellen ( 30, 30, 70, 70 ) '/// create rectangle ///'
+ sleep 1
+'/// View->Layer ///'
+ ViewLayer
+ ContextPositionAndSize '/// get position values for rectangle ///'
+ kontext
+ active.SetPage TabPositionAndSize
+ kontext "TabPositionAndSize"
+ Ueber_Text_1 = PositionX.GetText
+ TabPositionAndSize.OK
+ InsertLayer '/// insert layer ///'
+ Kontext "EbeneEinfuegenDlg"
+ EbeneEinfuegenDlg.OK
+ Call hRechteckErstellen ( 10, 40, 90, 60 ) '/// create rectangle on created layer ///'
+ sleep 1
+ EditDeleteLayer '/// delete layer ///'
+ sleep 1
+ Kontext
+ Active.Yes
+ sleep 1
+ Ueber_Text_2 = "OK Layer was deleted" '/// compare position of selected rectangle with position of created rectangle in deteted layer ///'
+ Ueber_Text_3 = "Layer was not deleted"
+ Call Position_Vergleichen (Ueber_Text_1,Ueber_Text_2,Ueber_Text_3)
+ sleep 1
+ Call hCloseDocument '/// close document ///'
+
+endcase 'tdEditDeleteLayer
+'--------------------------------------------------------
+testcase tEditObjectEdit
+
+ Dim Schrieb as string
+
+ Schrieb = gOLEWriter
+ if Schrieb = "" then
+ warnlog " the OLE is not defined :-((( gOLEWriter: " + iSprache
+ else
+
+ Call hNewDocument
+ call sSelectEmptyLayout
+ sleep 1 '/// new document ///'
+ InsertObjectOLEObject '/// insert writer ole object ///'
+ Kontext "OLEObjektEinfuegen"
+ sleep 3
+ if ObjektTyp.GetItemCount = 0 Then
+ Warnlog "- No available Ole-entry in the list, maybe an error in the Install.ini?"
+ sleep 1
+ OleObjektEinfuegen.Cancel
+ sleep 1
+ else
+
+ ObjektTyp.Select Schrieb
+ sleep 1
+ OLEObjektEinfuegen.OK
+ sleep 3 ' Changed from Sleep 1 to Sleep 3
+ gMouseMove 10,10,90,90
+ sleep 1
+ EditSelectAll
+
+ try
+ EditObjectEdit 'keine ID '/// try edit-objects ///'
+ sleep 2
+ catch
+ Warnlog "- The EditObjectEdit did not work"
+ endcatch
+
+
+ gMouseClick 90,90
+ end if
+ sleep 1
+ Call hCloseDocument '/// close document ///'
+ endif
+endcase 'tEditObjectEdit
diff --git a/testautomation/graphics/optional/includes/global/g_export_html.inc b/testautomation/graphics/optional/includes/global/g_export_html.inc
new file mode 100644
index 000000000000..6b91cdef26fd
--- /dev/null
+++ b/testautomation/graphics/optional/includes/global/g_export_html.inc
@@ -0,0 +1,757 @@
+'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
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* Owner : wolfram.garten@oracle.com
+'*
+'* short description :
+'*
+'*********************************************************************
+' #1 tHtmlExport
+' #1 tHtmlExport_Webcast
+'\********************************************************************
+
+testcase tHtmlExport
+
+ Dim Autor1 as string
+ Dim Adresse1 as string
+ Dim Liste(50) as string
+ dim i as integer
+ dim x as integer
+ dim sTemp as string
+ dim sFile as string
+
+ printlog "open 'tools->options' and set first/last name and email adress on the page 'StarOffice->UserData' "
+ ToolsOptions
+ hToolsOptions ("STAROFFICE","USERDATA")
+ VorName.SetText "Garfield"
+ ZuName.SetText "Peanuts"
+ EMail.SetText "recumbent@oracle.com"
+ Kontext "ExtrasOptionenDlg"
+ ExtrasOptionenDlg.OK
+
+ printlog "create directory if not exists and delete the content, if exists user\\work\\html\\ "
+ app.mkDir ((ConvertPath (gOfficePath + "user\work\html\"))
+ Liste(0) = 0
+ GetFileList ((ConvertPath (gOfficePath + "user\work\html\")), "*.*" , Liste() )
+ if (KillFileList (Liste()) <> TRUE) then
+ for i = 1 to ListCount (Liste())
+ Warnlog "File Not deleted: " + i + ": '" + Liste(i) + "'"
+ next i
+ endif
+
+ printlog "open application "
+ Call hNewDocument
+ WaitSlot (3000)
+'------------------ simple document --------------------
+ printlog "create a rectrangle "
+ hTextrahmenErstellen ("This is a test text",10,10,40,20)
+ WaitSlot (2000)
+ printlog "create another rectrangle "
+ hRechteckErstellen (50,50,70,70)
+ WaitSlot (3000)
+'####################################
+ Printlog "test if no file is created, if dialog is canceld"
+ printlog "call 'File->Export'"
+ FileExport
+ Kontext "ExportierenDlg"
+ WaitSlot (1000)
+ gHTMLFilter = Dateityp.GetItemText(1)
+ Dateityp.Select(gHTMLFilter)
+ printlog "set Filename to 'user\\work\\html\\expo0.html' "
+ sFile = ConvertPath (gOfficePath + "user\work\html\expo0")
+ Dateiname.SetText sFile
+ WaitSlot (2000)
+ printlog "click button 'Save' "
+ Speichern.Click
+ WaitSlot (3000)
+ Kontext "Active"
+ if Active.Exists Then Active.Yes
+'---------------------------------------------------------
+ printlog "now we are on the dialog -1- 'Assign design' "
+ Kontext "HTMLExport1"
+ printlog "click button 'Cancel' "
+ HTMLExport1.Cancel
+ WaitSlot (5000)
+ Liste(0) = 0
+ GetFileList ((ConvertPath (gOfficePath + "user\work\html\")), "*.*" , Liste() )
+ WaitSlot (1000)
+ Printlog "used file name: " + sFile
+ if (ListCount (Liste()) > 0) then
+ warnlog "dialog for export was canceled, but file was created :-("
+ for i = 1 to ListCount (Liste())
+ Warnlog "File created: " + i + ": '" + Liste(i) + "'"
+ next i
+ KillFileList (Liste())
+ end if
+'####################################
+ Printlog "'test if files are created"
+ printlog "call 'File->Export'"
+ FileExport
+ Kontext "ExportierenDlg"
+ WaitSlot (1000)
+ try
+ printlog "select Filetype 'HTML...' aka 'WebPage' "
+ Dateityp.Select gHTMLFilter
+ catch
+ errorlog " Filter not available :-( : '"+gHTMLFilter+"'"
+ Dateityp.Select 1
+ printlog "Selects the first entry - which should be html "
+ endcatch
+ WaitSlot (1000)
+ printlog "set Filename to 'user\\work\\html\\expo.html' "
+ sFile = ConvertPath (gOfficePath + "user\work\html\expo.html")
+ Dateiname.SetText sFile
+ WaitSlot (2000)
+ printlog "click button 'Save' "
+ Speichern.Click
+ WaitSlot (3000)
+ Kontext "Active"
+ if Active.Exists Then Active.Yes
+'---------------------------------------------------------
+ Printlog "now we are on the dialog -1- 'Assign design' "
+ Kontext "HTMLExport1"
+ printlog "'New design' should be checked "
+ if (NeuesDesign.IsEnabled <> TRUE) then
+ warnlog "NewDesign is not enabled by default :-("
+ endif
+ printlog "click button 'Next >>' "
+ Weiter.Click
+ WaitSlot (1000)
+ Printlog "now we are on the dialog -2- 'Publication Type & Options' "
+ Kontext "HTMLExport2"
+ printlog "checkbox 'Standard HTML Format' is checked by default "
+ if (Standard.IsChecked <> TRUE) then
+ warnlog "Standard is not enabled by default :-("
+ Standard.Check
+ end if
+ printlog "checkbox 'Title Page' is checked by default "
+ if Not TitelseiteErzeugen.IsChecked Then
+ TitelSeiteErzeugen.Check
+ Warnlog "- 'create Titlepage' should be checked as default :-("
+ end if
+ if (gApplication = "IMPRESS") then
+ printlog "if application is impress: the checkbox 'Show notes' is enabled by default"
+ If (Notizenanzeigen.IsChecked <> TRUE) Then
+ warnlog "- 'Show notes' checked as default :-("
+ Notizenanzeigen.Check
+ end if
+ end if
+ printlog "click button 'Next >>' "
+ Weiter.Click
+ Printlog "now we are on the dialog -3- 'png/gif/jpeg & resolution & sound' "
+ Kontext "HTMLExport3"
+ printlog "checkbox 'PNG' is checked by default "
+ if (PNG.isChecked <> TRUE) then
+ warnlog "Save Graphic as 'PNG' is not checked as default :-("
+ PNG.Check
+ end if
+ printlog "Listbox compression '75%' is selected by default "
+ if (Kompressionswert.GetSelText <> "75%") then
+ warnlog "'Compression' should be '75%', but is: '" + Kompressionswert.GetSelText + "'"
+ Kompressionswert.Select "75%"
+ end if
+ printlog "checkbox 'low monitor resolution' is checked by default "
+ if (NiedrigeAufloesung.IsChecked <> TRUE)Then
+ warnlog "Monitor resolution 'low' is not selected as default :-("
+ NiedrigeAufloesung.Check
+ end if
+ printlog "checkbox 'export sounds' is checked by default "
+ if (KlaengeExportieren.IsChecked <> true) then
+ warnlog "'Export Sounds' is not checked as default :-("
+ KlaengeExportieren.Check
+ end if
+ printlog "click button 'Next >>' "
+ Weiter.Click
+ WaitSlot (1000)
+ Printlog "now we are on the dialog -4- 'Information for the title page' "
+ Kontext "HTMLExport4"
+ printlog "the names you entered in the options have to appeare here! "
+ sTemp = Autor.GetText
+ Autor1=Autor.GetText
+ if (sTemp <> "Garfield Peanuts") then
+ warnlog "Value for 'Author' is other than expected, should 'Garfield Peanuts', is: '"+sTemp+"'"
+ end if
+ sTemp = EMail.GetText
+ Adresse1=EMail.GetText
+ if (sTemp <> "recumbent@oracle.com") then
+ warnlog "Value for 'Email' is other than expected, should be 'recumbent@oracle.com', is: '"+sTemp+"'"
+ end if
+ printlog "set text in field 'your homepage' "
+ Homepage.SetText "mahler"
+ AdditionalInformation.SetText "QualityApprooved"
+ printlog "click button 'Next >>' "
+ Weiter.Click
+ WaitSlot (2000)
+ Printlog "now we are on the dialog -5- 'select button style' "
+ Kontext "HTMLExport5"
+ WaitSlot (5000)
+ printlog "checkbox 'Text only' should be checked by default "
+ if (NurText.ischecked <> TRUE) then
+ warnlog "'Text only' is not checked by default :-("
+ NurText.check
+ end if
+ printlog "click button 'Next >>' "
+ Weiter.Click
+ WaitSlot (1000)
+ printlog "now we are on the dialog -6- 'select color scheme' "
+ Kontext "HTMLExport6"
+ WaitSlot (2000)
+ ' maybe check if colour dialog comes up ?! TBO
+ 'Text
+ 'Hyperlink
+ 'AktiverLink
+ 'GesichteterLink
+ 'Hintergrund
+ printlog "'Apply color schemes from document' should be checked per default :-) "
+ if (FarbenAusDok.IsChecked <> TRUE) Then
+ warnlog "'Apply color schemes from document' should be checked per default :-("
+ FarbenAusDok.Check
+ end if
+ WaitSlot (2000)
+ printlog "click button 'Create' "
+ HTMLExport6.OK
+ WaitSlot (5000)
+ Printlog "now we are on the dialog -7- 'Name HTML Design' "
+ Kontext "HTMLDesign"
+ WaitSlot (1000)
+ Designname.SetText "Lem's Standard"
+ HTMLDesign.OK
+ WaitSlot (3000)
+ Kontext "active"
+ if active.exists (5) then
+ printlog " the name for this design already exists : '" + active.GetText+ "'"
+ active.yes
+ end if
+ printlog "check number and names of created files "
+ Printlog "used file name: '" + sFile + "'"
+ Liste(0) = 0
+ GetFileList ((ConvertPath (gOfficePath + "user\work\html\")), "*.*" , Liste() )
+ WaitSlot (1000)
+ x = ListCount(Liste())
+ if gApplication = "DRAW" then
+ if (x <> "3") then
+ Warnlog "- Number of files is not correct, it should be:3 but it is: '" + x + "' - Draw"
+ for i=1 to x
+ printlog "("+i+"/"+x+"): '"+Liste(i)+"'"
+ next
+ end if
+ else
+ if (x <> "4") then
+ Warnlog "- Number of files is not correct, it should be:4 but it is: '" + x + "' - Impress"
+ for i=1 to x
+ printlog "("+i+"/"+x+"): '"+Liste(i)+"'"
+ next
+ end if
+ end if
+ printlog "check if fileextension is common - .htm or .html for all files the same "
+ Liste(0) = 0
+ GetFileList ((ConvertPath (gOfficePath + "user\work\html\")), "*.htm" , Liste() )
+ WaitSlot (1000)
+ x = ListCount(Liste())
+ Liste(0) = 0
+ GetFileList ((ConvertPath (gOfficePath + "user\work\html\")), "*.html" , Liste() )
+ WaitSlot (1000)
+ i = ListCount(Liste())
+ if ((x > 0) AND (i > 0)) Then
+ Warnlog " fileextension is different between HTML-files :-( (htm/html)"
+ Warnlog " htm : " + x
+ Warnlog " html: " + i
+ end if
+'--------------------------------------------------------
+ Printlog "check if design is created in dialog"
+ WaitSlot (3000)
+ printlog "File->Export "
+ FileExport
+ Kontext "ExportierenDlg"
+ printlog "Set Filename to user\\work\\html\\expo.html "
+ Dateiname.SetText sFile
+ try
+ printlog "select Filetype 'HTML...' aka 'WebPage' "
+ Dateityp.Select gHTMLFilter
+ catch
+ errorlog " Filter not available :-( : '"+gHTMLFilter+"'"
+ endcatch
+ WaitSlot (1000)
+ printlog "click button 'save' "
+ Speichern.Click
+ WaitSlot (1000)
+ Kontext "Active"
+ ' active about overwriting existing file
+ if Active.Exists Then Active.Yes
+'---------------------------------------------------------
+ WaitSlot (1000)
+ Kontext "HTMLExport1"
+ WaitSlot (1000)
+ try
+ printlog "now 'existing design' is checkable -> check it "
+ ExistierendesDesign.Check
+ WaitSlot (3000)
+ printlog "there has to be 1 design in the list, select and delete it "
+ x = Designliste.GetItemCount
+ if (x <> 1) then
+ warnlog "there is an unexpected count on designs in the list, expected 1, but there are : '" + x + "'"
+ end if
+ Designliste.Select 1
+ sTemp = Designliste.GetSelText
+ if sTemp = "Lem's Standard" Then
+ Printlog "- Created design exists in list and will be deleted now"
+ WaitSlot (1000)
+ DesignLoeschen.Click
+ WaitSlot (2000)
+ else
+ Warnlog "- Created design does not appear in the list it is: '"+sTemp+"'"
+ end if
+ catch
+ Warnlog "- List could not be accessed"
+ endcatch
+ WaitSlot (5000)
+ HTMLExport1.OK
+ kontext "Active"
+ if Active.Exists then
+ Active.Yes
+ end if
+ Call hCloseDocument
+ Printlog "used file name: '" + sFile + "'"
+ ' TBOTODO CHECK files contenet !
+
+endcase 'tHtmlExport
+
+'---------------------------------------------------------
+
+testcase tHtmlExport_Webcast
+
+ Dim iWaitIndex as integer
+ Dim i as integer
+ Dim a as integer
+ Dim x as integer
+ dim Liste ( 200 ) as String
+ dim sFile as string
+
+ printlog "create directories if not exists and delete the content, if exists user\\work\\html\\[asp|perl]\\ "
+ app.mkDir (ConvertPath (gOfficePath + "user\work\html\asp\"))
+ app.mkDir (ConvertPath (gOfficePath + "user\work\html\perl\"))
+ Liste(0) = 0
+ GetFileList ((ConvertPath (gOfficePath + "user\work\html\asp\")), "*.*" , Liste() )
+ WaitSlot (1000)
+ if (KillFileList (Liste()) <> TRUE) then
+ for i = 1 to ListCount (Liste())
+ Warnlog "File Not deleted: " + i + ": '" + Liste(i) + "'"
+ next i
+ end if
+ Liste(0) = 0
+ GetFileList ((ConvertPath (gOfficePath + "user\work\html\perl\")), "*.*" , Liste() )
+ WaitSlot (1000)
+ if (KillFileList (Liste()) <> TRUE) then
+ for i = 1 to ListCount (Liste())
+ Warnlog "File Not deleted: " + i + ": '" + Liste(i) + "'"
+ next i
+ end if
+
+ printlog "File->Autopillot->Presentation... " '---------
+ FileAutopilotPresentation
+ Kontext "Active"
+ if Active.Exists(1) then
+ WarnlogActive.GetText
+ try
+ Active.OK
+ catch
+ Active.No
+ endcatch
+ goto endsub
+ end if
+ printlog "Page 1 of autopilot"
+ Kontext "AutopilotPraesentation1"
+ printlog "uncheck 'preview' "
+ Preview.Uncheck
+ printlog "click on button 'create' "
+ AutopilotPraesentation1.OK
+ WaitSlot (3000)
+ '************************************ Page 1
+ Printlog "create a presentation and save it for further references"
+ printlog "start creating the presentation now "'------------------------------
+ Printlog "- Create presentation"
+ printlog "select 'click to add title' with [TAB] and press [F2] to edit the placeholder title "
+ hTypeKeys "<TAB><F2>"
+ WaitSlot (2000)
+ Select Case Ucase(gApplication)
+ case "DRAW" : hMouseClick DocumentDraw,50,50
+ case "IMPRESS" : hMouseClick DocumentImpress,50,50
+ end select
+ WaitSlot (3000)
+ printlog "Type 'This is a test text', select it. "
+ hTextrahmenErstellen ("This is a test text",10,10,40,20)
+ EditSelectAll
+
+ Kontext "TextObjectbar"
+
+ if TextObjectbar.Exists <> TRUE then
+ ViewToolbarsTextFormatting
+ end if
+ WaitSlot (3000)
+ Kontext "TextObjectbar"
+ printlog "click 'bold text' in object toolbar "
+ Fett.Click
+ WaitSlot (2000)
+ printlog "press [esacpe][tab] to get out of edit mode and select the next placeholder "
+ hTypeKeys "<escape><TAB>"
+ WaitSlot (1000)
+ printlog "SlideShow->Effects "
+ SlideShowCustomAnimation
+ WaitSlot (1000)
+ Kontext "Tasks"
+ WaitSlot (1000)
+ EffectAdd.Click
+ printlog "Dialog 'Custom Animation' comes up "
+ kontext
+ printlog "Switch to TabPage: Entrance "
+ active.setPage(TabEntrance)
+ Kontext "TabEntrance"
+ if TabEntrance.Exists (5) then
+ WaitSlot (1000)
+ printlog "select effect 'ABC v' :-) "
+ Effects.Select(5)
+ printlog "select speed 'slow' -> first item in list "
+ Speed.Select 1
+ try
+ TabEntrance.Ok
+ catch
+ errorlog "SlideShowEffects wasnt closed as it should have been"
+ endcatch
+ if TabEntrance.Exists then
+ TabEntrance.Close
+ warnlog "TabEntrance.Ok didn't seem to close the dialog."
+ else
+ printlog "TabEntrance was closed as it should"
+ end if
+ kontext "Tasks"
+ end if
+ WaitSlot (3000)
+ printlog "activate grafik insert dialog by typing [return] "
+
+ InsertGraphicsFromFile
+ Kontext "GrafikEinfuegenDlg"
+ if GrafikEinfuegenDlg.Exists <> TRUE then
+ WaitSlot (1000)
+ end if
+ printlog "insert grafik: global\\input\\graf_inp\\borabora.jpg "
+ Dateiname.SetText ConvertPath (gTesttoolPath + "global\input\graf_inp\borabora.jpg")
+ WaitSlot (3000)
+ Oeffnen.Click
+ WaitSlot (2000)
+ printlog "select 'click to add an outline' with [TAB] and press [F2] to edit the placeholder "
+ hTypeKeys "<TAB><F2>"
+ printlog "insert text and select the words by typing [strg a] "
+ hTypeKeys "Mecury<RETURN>Venus<RETURN>Earth<RETURN>Mars<RETURN>Jupiter<RETURN>Saturn<RETURN>Uranus<RETURN>Neptune<RETURN>Pluto"
+ EditSelectAll
+ WaitSlot (1000)
+ printlog "format->character "
+ FormatCharacter
+ WaitSlot (2000)
+ Kontext
+ Active.SetPage TabFont
+ Kontext "TabFont"
+ printlog "set font size to '18' on tabpage 'font' "
+ try
+ SizeWest.SetText "18"
+ catch
+ Size.SetText "18"
+ endcatch
+ printlog "click button OK "
+ TabFont.OK
+ WaitSlot (1000)
+ printlog "click 'bold text' in object toolbar "
+ Kontext "TextObjectbar"
+ try
+ usebindings
+ Fett.Click 'culprint
+ catch
+ warnlog "Objectbar 'Text' not available :-( / didn't change automatical!"
+ hTypeKeys "<escape><escape><escape><tab><tab><TAB>"
+ WaitSlot (1000)
+ hTypeKeys "<F2>"
+ hTypeKeys "<HOME>"
+ hTypeKeys "<SHIFT><END>"
+ Kontext "TextObjectbar"
+ try
+ usebindings
+ Fett.Click 'culprint
+ catch
+ warnlog "darn again TBO"
+ endcatch
+ endcatch
+ WaitSlot (2000)
+ printlog "SlideShow-> CustomAnimation "
+ SlideShowCustomAnimation
+ WaitSlot (1000)
+ Kontext "Tasks"
+ WaitSlot (1000)
+ EffectChange.Click
+ kontext
+ printlog "Switch to TabPage: Entrance "
+ active.setPage(TabEntrance)
+ kontext "TabEntrance"
+ Effects.TypeKeys "<DOWN>",8
+ Speed.Select 2
+ try
+ TabEntrance.Ok
+ catch
+ warnlog "select another effect, assign is not possible"
+ endcatch
+'******************************** Page 2 Merkur
+ printlog "create a 2nd slide with: insert->slide "
+ InsertSlide
+ WaitSlot (2000)
+ hTypekeys "<Pagedown>"
+ WaitSlot (2000)
+ printlog "select 'click to add title' with [TAB] and press [F2] to edit the placeholder title "
+ hTypeKeys "<TAB><F2>"
+ WaitSlot (2000)
+ printlog "Type 'MERKUR', select it via Edit-Select All"
+ hTextrahmenErstellen ("MERKUR",10,10,60,30)
+ EditSelectAll
+ WaitSlot (2000)
+ printlog "click 'bold text' in object toolbar "
+ Kontext "TextObjectbar"
+ Fett.Click
+ WaitSlot (1000)
+ printlog "press [esacpe][tab][return] to get out of edit mode and select the next placeholder and activate grafik insert dialog "
+' hTypeKeys "<escape><tab><return>"
+ hTypeKeys "<escape><tab>"
+ InsertGraphicsFromFile
+ WaitSlot (4000)
+ printlog "insert grafik: global\\input\\graf_inp\\borabora.jpg "
+ Kontext "GrafikEinfuegenDlg"
+ Dateiname.SetText ConvertPath (gTesttoolPath + "global\input\graf_inp\borabora.jpg")
+ WaitSlot (3000)
+ Oeffnen.Click
+ WaitSlot (2000)
+ printlog "select 'click to add an outline' with [TAB] and press [F2] to edit the placeholder "
+ hTypeKeys "<TAB><F2>"
+ printlog "insert text and select the words by typing [strg a] "
+ WaitSlot (1000)
+ hTypeKeys "Reciprocal Mass *5972000<SHIFT RETURN>Mass (Erde=1) 0,0558<SHIFT RETURN>Mass in kg 3,30310<SHIFT RETURN>"
+ hTypeKeys "Equator-radius (km) 2440<SHIFT RETURN>Equator-radius (Erde=1)0,382<SHIFT RETURN>Middle density (kg/m^3) 5400<SHIFT RETURN>"
+ hTypeKeys "Gravity acceleration at the equator (m/s^2) 3,78<SHIFT RETURN>Flightvelocity at the equator (km/s) 4,3<SHIFT RETURN>Sidereal rotationtime 58,65 Tage<SHIFT RETURN>"
+ hTypeKeys "Bias of the equatorplane against the orbitplane 0><SHIFT RETURN>Time of circulation 88 days<SHIFT RETURN>Distance to the sun Sun (km) 58Mio.<SHIFT RETURN>Temperatur at the day 350C<SHIFT RETURN>"
+ hTypeKeys "Temperatur at night -170C<SHIFT RETURN>Diameter (km) 4800"
+ EditSelectAll
+ WaitSlot (1000)
+ printlog "format->character "
+ FormatCharacter
+ WaitSlot (2000)
+ Kontext
+ Active.SetPage TabFont
+ Kontext "TabFont"
+ printlog "set font size to '18' on tabpage 'font' "
+ try
+ SizeWest.SetText "16"
+ catch
+ Size.SetText "16"
+ endcatch
+ printlog "click button OK "
+ TabFont.OK
+ WaitSlot (2000)
+ printlog "click 'bold text' in object toolbar "
+ Kontext "TextObjectbar"
+ try
+ Fett.Click 'culprint
+ catch
+ warnlog "Objectbar 'Text' not available :-( / didn't change automatical!"
+ hTypeKeys "<escape><escape><escape><tab><tab><TAB>"
+ WaitSlot (1000)
+ hTypeKeys "<F2>"
+ hTypeKeys "<HOME>"
+ hTypeKeys "<SHIFT><END>"
+ Kontext "TextObjectbar"
+ try
+ Fett.Click 'culprint
+ catch
+ warnlog "darn again TBO"
+ endcatch
+ endcatch
+ WaitSlot (2000)
+ printlog "save file with impress filter : user\\work\\webcast.odp "
+ sFile = ConvertPath (gOfficePath + "user\work\webcast")
+ if (Dir (sFile + ".odp") <> "") then app.kill (sFile + ".odp")
+ WaitSlot (2000)
+ hFileSaveAsWithFilterKill ((sFile + ".odp") , "impress8" )
+ Printlog "saved presentation: " + sFile + ".odp"
+'------------------------- Exportieren als ASP Web-Cast
+ Printlog "'export as webcast ASP"
+ printlog "File->SaveAs "
+ FileExport
+ WaitSlot (2000)
+ Kontext "ExportierenDlg"
+ try
+ printlog "select Filetype 'HTML...' aka 'WebPage' "
+ gHTMLFilter = Dateityp.GetItemText(1)
+ Dateityp.Select(gHTMLFilter)
+ catch
+ errorlog " Filter not available :-( : '"+gHTMLFilter+"'"
+ Dateityp.Select 1
+ printlog "Selects the first entry - which should be html "
+ endcatch
+ printlog "Set Filename to user\\work\\webcst_asp.html "
+ sFile = ConvertPath (gOfficePath + "user\work\html\asp\webcast.html")
+ Dateiname.SetText sFile
+ printlog "click button 'save' "
+ Speichern.Click
+ WaitSlot (5000)
+ Kontext "Active"' ????????? TBO
+ if Active.Exists (5) Then Active.Yes
+ WaitSlot (3000)
+ printlog "now we are on the dialog -1- 'Assign design' "
+ Kontext "HTMLExport1"
+ WaitSlot (2000)
+ printlog "click button 'Next >>' "
+ Weiter.Click
+ WaitSlot (2000)
+ printlog "now we are on the dialog -2- 'Publication Type & Options' "
+ Kontext "HTMLExport2"
+ WaitSlot (2000)
+ Printlog "check 'WebCast'"
+ WebCast.Check
+ WaitSlot (2000)
+ Printlog "check 'Active Server Pages (ASP)'"
+ ASP.Check
+ printlog "click button 'Next >>' "
+ Weiter.Click
+ printlog "now we are on the dialog -3- 'gif/jpeg & resolution & sound' "
+ Kontext "HTMLExport3"
+ WaitSlot (2000)
+ printlog "check Save graphics as 'GIF' "
+ Gif.Check
+ printlog "check 'Medium (monitor) Resolution' "
+ MittlereAufloesung.Check
+ WaitSlot (1000)
+ printlog "click button 'Create' "
+ HTMLExport3.OK
+ WaitSlot (2000)
+ printlog "now we are on the dialog -7- 'Name HTML Design' "
+ Kontext "HTMLDesign"
+ printlog "click button 'Do Not Save' "
+ if HTMLDesign.Exists Then HTMLDesign.Cancel
+ iWaitIndex = 0
+ do while HTMLDesign.Exists AND iWaitIndex < 30
+ WaitSlot (1000)
+ iWaitIndex = iWaitIndex + 1
+ loop
+ Printlog "- Check number of safed files"
+ Printlog "file saved: '" + sFile + "'"
+ Liste(0) = 0
+ GetFileList ((ConvertPath (gOfficePath + "user\work\html\asp\")), "*.*" , Liste() )
+ WaitSlot (1000)
+ x = ListCount(Liste())
+ if (x <> "11") Then
+ Warnlog "- Number of files is not correct, it should be:11 but it is: '" + x + "'"
+ for i=1 to x
+ printlog "("+i+"/"+x+"): '"+Liste(i)+"'"
+ next
+ end if
+'------------------------- Exportieren als ASP Web-Cast
+ Printlog "export as webcast PERL"
+ Kontext "DocumentImpress"
+ WaitSlot (2000)
+ printlog "File->export "
+ FileExport
+ WaitSlot (2000)
+ Kontext "ExportierenDlg"
+ printlog "select Filetype 'HTML...' aka 'WebPage' "
+ try
+ Dateityp.Select gHTMLFilter
+ catch
+ errorlog " Filter not available :-( : '"+gHTMLFilter+"'"
+ Dateityp.Select 1 ' selects the first one just in case anything else is selected.
+ printlog "Selected " + Dateityp.GetSelText + " manually."
+ endcatch
+ WaitSlot (1000)
+ printlog "Set Filename to user\\work\\wbcst_p.html "
+ sFile = ConvertPath (gOfficePath + "user\work\html\perl\webcast")
+ Dateiname.SetText sFile
+ printlog "click button 'save' "
+ Speichern.Click
+ WaitSlot (2000)
+ Kontext "Active"
+ printlog "click button 'save' "
+ if Active.Exists Then Active.Yes
+ WaitSlot (2000)
+ printlog "now we are on the dialog -1- 'Assign design' "
+ Kontext "HTMLExport1"
+ WaitSlot (2000)
+ printlog "click button 'Next >>' "
+ Weiter.Click
+ WaitSlot (2000)
+ printlog "now we are on the dialog -2- 'Publication Type & Options' "
+ Kontext "HTMLExport2"
+ WaitSlot (2000)
+ Printlog "check 'WebCast'"
+ WebCast.Check
+ WaitSlot (2000)
+ Printlog "check 'Perl'"
+ PERL.Check
+ WaitSlot (1000)
+ printlog "'URL for listeners' "
+ printlog "URL for listeners compare to to TBO: "+BeamerURL.GetText
+ printlog "set 'URL for presentation' to 'wbcst_prl.html' "
+ PraesentationURL.SetText "wbcst_prl"
+ WaitSlot (1000)
+ printlog "set 'URL for perl scrips' to '/WebCast/cgi-bin/' "
+ ScriptURL.SetText "/WebCast/cgi-bin/"
+ printlog "presentation url? : "+ (gOfficePath + "/WebCast/cgi-bin/wbcst_prl")
+ WaitSlot (1000)
+ printlog "click button 'Next >>' "
+ Weiter.Click
+ WaitSlot (1000)
+ printlog "now we are on the dialog -3- 'gif/jpeg & resolution & sound' "
+ Kontext "HTMLExport3"
+ WaitSlot (1000)
+ printlog "check Save graphics as 'GIF' "
+ Gif.Check
+ printlog "check 'Medium (monitor) Resolution' "
+ MittlereAufloesung.Check
+ WaitSlot (3000)
+ printlog "click button 'Create' "
+ HTMLExport3.OK
+ WaitSlot (3000)
+ Kontext "HTMLDesign"
+ if HTMLDesign.Exists Then HTMLDesign.Cancel
+ Printlog "- Presentation saved and exported into both Webcast formats. all files can be found here: " + gOfficePath + "output\impress\web-cast\"
+ Printlog "file saved: '" + sFile + ".html'"
+ WaitSlot (10000)
+ Liste(0) = 0
+ GetFileList ((ConvertPath (gOfficePath + "user\work\html\perl\")), "*.*" , Liste() )
+ x = ListCount(Liste())
+ if (x <> "12") Then
+ Warnlog "- Number of files is not correct, it should be:5 but it is: '" + x + "'"
+ for i=1 to x
+ printlog "("+i+"/"+x+"): '"+Liste(i)+"'"
+ next
+ end if
+ Call hCloseDocument
+
+ ' TBO: TODO FILECHECK IF EXISTS
+endcase 'tHtmlExport_Webcast
diff --git a/testautomation/graphics/optional/includes/global/g_find_replace.inc b/testautomation/graphics/optional/includes/global/g_find_replace.inc
new file mode 100644
index 000000000000..4f6a045578e0
--- /dev/null
+++ b/testautomation/graphics/optional/includes/global/g_find_replace.inc
@@ -0,0 +1,363 @@
+'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
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* Owner : wolfram.garten@oracle.com
+'*
+'* short description : Edit -> Find & Replace
+'*
+'***********************************************************************************
+'*
+' #1 tiEditSearchAndReplace
+' #1 tiEditSearchAndReplaceBUGS
+'*
+'\**********************************************************************************
+testcase tiEditSearchAndReplace
+ '/// This test tests the 'Search and Replace' -dialogue. ///'
+ Dim sFile 'as string
+ Dim sExpression(2) as string ' Expression to look for: ... Replace with
+ dim sExt as string
+
+ Select Case Ucase(gApplication)
+ case "DRAW" : sExt = ".odg"
+ case "IMPRESS" : sExt = ".odp"
+ end select
+
+ 'First we need some errornes words to replace. (sExpression)
+ 'sExpression(1) has to be 3 times in the document
+ select case iSprache
+ case 01 : sExpression(1) = "Alle" : sExpression(2) = "Allz"
+ case 03 : sExpression(1) = "empreza" : sExpression(2) = "Emperor" ' Portuguese
+ case 07 : qaerrorlog "No files for Russian yet, will use english instead."
+ sExpression(1) = "Alle" : sExpression(2) = "Allz"
+ case 30 : ' Greek
+ case 31 : sExpression(1) = "bedoeling" : sExpression(2) = "Bedoling" ' Netherlands
+ case 33 : sExpression(1) = "projjet" : sExpression(2) = "projete" ' French
+ case 34 : sExpression(1) = "lazsos" : sExpression(2) = "Lazsi" ' Spanish
+ case 35 : ' Finnish
+ case 36 : sExpression(1) = "Bozniai" : sExpression(2) = "Boszniai" ' Hungaria
+ case 37 : ' Catalan
+ case 39 : sExpression(1) = "Presentazione" : sExpression(2) = "Raggazi" ' Italian
+ case 42 : ' Czech
+ case 43 : ' Slowak
+ case 44 : ' English (GB)
+ case 45 : sExpression(1) = "installlere" : sExpression(2) = "installer" ' Danish
+ case 46 : sExpression(1) = "desa" : sExpression(2) = "ased" ' Swedish
+ case 47 : ' Norwegian
+ case 48 : sExpression(1) = "programmu" : sExpression(2) = "programu" ' Polish
+ case 49 : sExpression(1) = "Texxt" : sExpression(2) = "Schrieb" ' German
+ case 50 : sExpression(1) = "primer" : sExpression(2) = "napakka" ' Slovenian
+ case 55 : sExpression(1) = "esktava" : sExpression(2) = "norte" ' Portuguese (Brazil)
+ case 66 : ' Thai
+' case 81 : sExpression(1) = "���" : sExpression(2) = "���" ' Japanese
+ ' case 82 : ' Korean
+ ' case 86 : ' Chinese (simplified)
+ ' case 88 : ' Chinese (traditional)
+ case 90 : ' Turkish
+ case 91 : ' Hindi
+ case 96 : ' Arab
+ case 97 : ' Hebrew
+ case else :
+' Warnlog "For the language " + iSprache +" nothing is prepared yet: insert text here and create the file"
+ printlog " :-) Will use English instead"
+ sExpression(1) = "Alle" : sExpression(2) = "Allz"
+ end select
+
+ if ((bAsianLan) OR (iSprache = 07)) then
+ Call hFileOpen (gTesttoolpath + "graphics\required\input\recht_"+"1"+sExt)
+ else
+ Call hFileOpen (gTesttoolpath + "graphics\required\input\recht_"+iSprache+sExt)
+ 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
+ sleep 3
+ gMouseClick 50,40
+ sleep 3
+ Kontext "Messagebox"
+ if Messagebox.Exists then
+ Warnlog Messagebox.GetText
+ Messagebox.OK
+ end if
+ sleep 2
+ hTypeKeys "<MOD1 HOME>" '/// Select the text ///'
+
+ '/// Edit-Find & Replace I///'
+ EditSearchAndReplace
+ sleep 1
+ Kontext "FindAndReplace"
+ '/// Clap the 'more options'-part open ///'
+ More.Click
+ '/// verify, that search is done without 'similarity search' !!! ///'
+ if SimilaritySearch.IsChecked = TRUE then
+ SimilaritySearch.UnCheck
+ warnlog "'Similar search' checkbox was enabled! It shouldn't be the default!"
+ end if
+ SearchFor.SetText sExpression(1) '/// set Search text ///'
+ ReplaceWith.SetText sExpression(2) '/// set Replace text///'
+
+ '/// Word has to be there ONLY three times ///'
+ SearchNow.Click '/// 1st search for text ///'
+ Kontext "Messagebox"
+ if Messagebox.Exists(2) then
+ Printlog Messagebox.GetText
+ Messagebox.OK
+ end if
+ sleep 1
+ Kontext "FindAndReplace"
+
+ SearchNow.Click '/// 2nd search for text ///'
+ Kontext "Messagebox"
+ if Messagebox.Exists(2) then
+ Printlog Messagebox.GetText
+ Messagebox.OK
+ end if
+ sleep 1
+ Kontext "FindAndReplace"
+
+ SearchNow.Click '/// 3th search for text///'
+ Kontext "Messagebox"
+ if Messagebox.Exists(2) then
+ Printlog Messagebox.GetText
+ Messagebox.OK
+ end if
+ sleep 1
+ Kontext "FindAndReplace"
+
+ SearchNow.Click '/// 4th search for text; but it is no more available!///'
+ sleep 2
+ kontext "Messagebox"
+ if Messagebox.Exists Then
+ Printlog "- The word was found 3 times: '" + messagebox.gettext + "'"
+ Messagebox.OK
+ else
+ SearchNow.Click '/// 5th search for word 1///'
+ kontext
+ if Messagebox.Exists (5) Then
+ Printlog "?: "+Messagebox.gettext
+ Warnlog "- No MsgBox appeared: 'changed'"
+ Messagebox.OK
+ endif
+ Warnlog "- No MsgBox appeared: 'changed'"
+ end if
+
+ '/// Replace all ///'
+ Kontext "FindAndReplace"
+ sleep 1
+ ReplaceAll.Click
+ Kontext "Messagebox"
+ if Not Messagebox.Exists (2) then
+ ' Warnlog " Not all words are replaced" ' there never was a mesagebox ! (compared to 5.2)
+ else
+ printlog messagebox.gettext
+ qaerrorlog "^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^"
+ Messagebox.OK
+ end if
+ Kontext "FindAndReplace"
+ sleep 2
+ SearchNow.Click '/// Search for word 1 to check if all words are replaced ///'
+ Kontext "Messagebox"
+ if Not Messagebox.Exists then
+ Warnlog " Not all words are replaced (Replace All)"
+ else
+ printlog "Search key not found!: '" + messagebox.gettext + "'"
+ Messagebox.OK
+ end if
+ Kontext "FindAndReplace"
+ FindAndReplace.Close
+ sleep 3
+
+ '/// Edit-Find & Replace II ///'
+ gMouseClick 50,50
+ sleep 1
+ hTypeKeys "<MOD1 HOME>"
+ EditSearchAndReplace
+ sleep 1
+ Kontext "FindAndReplace"
+ SearchFor.SetText sExpression(2) '/// Search for word 2 ///'
+ ReplaceWith.SetText sExpression(1) '/// Replace with word 1 ///'
+
+ ReplaceBtn.Click '/// Replace 1 ///'
+ Kontext "Messagebox"
+ if Messagebox.Exists(4) Then
+ Kontext "Messagebox"
+ Messagebox.OK
+ Printlog " Clicked 'OK' in the messagebox after searching and replacing the word(s)"
+ else
+ Printlog " Word replaced, no messagebox appeared afterwards"
+ end if
+ Kontext "FindAndReplace"
+ sleep 1
+
+ SearchNow.Click '/// 2nd search for word 2 ///'
+ Kontext "Messagebox"
+ if Messagebox.Exists(2) Then
+ Warnlog " All words got replaced, but only the 1st should have been"
+ Kontext "Messagebox"
+ Messagebox.OK
+ Kontext "FindAndReplace"
+ else
+ Printlog " Word replaced"
+ end if
+
+ '/// Replace all ///'
+ Kontext "FindAndReplace"
+ ReplaceAll.Click
+ kontext "Messagebox"
+ if Messagebox.Exists(4) Then
+ Messagebox.OK
+ else
+ Printlog "- No messagebox after replace all"
+ end if
+
+ '/// Search for word 2 to check if all are replaced ///'
+ Kontext "FindAndReplace"
+ SearchNow.Click
+ kontext "Messagebox"
+ if Messagebox.Exists(2) Then
+ printlog "Search key not found!: " + messagebox.gettext +"'"
+ Messagebox.OK
+ else
+ Warnlog "- Replace all does not work properly"
+ end if
+
+ Kontext "FindAndReplace"
+ More.Click
+ FindAndReplace.Close
+ sleep 2
+ '/// Close document ///'
+ Call hCloseDocument
+
+endcase 'tiEditSearchAndReplace
+'--------------------------------------------------------
+testcase tiEditSearchAndReplaceBUGS
+
+'/// inspired by bugs: 101974, 101975, 101976 ///'
+ dim i as integer
+ dim bTemp as boolean
+
+ '/// open application ///'
+ Call hNewDocument
+ sleep 3
+ '/// Edit->Search and Replace ///'
+ EditSearchAndReplace
+ Kontext "FindAndReplace"
+ if FindAndReplace.Exists (5) then
+ Printlog "Dialog for Search&Replace could be opened :-)"
+ else
+ Warnlog "Dialog for Search&Replace could NOT be opened :-("
+ endif
+
+ '/// for al 5 views in 'View->Workspace->...' do: ///'
+ for i = 1 to 6
+ Printlog "- " + i + " View->Workspace->... ------------------------------------------------------"
+ try
+ select case i
+ case 1:Printlog " Drawing"
+ ViewWorkspaceDrawingView
+ case 2:Printlog " Outline"
+ ViewWorkspaceOutlineView
+ case 3:Printlog " Slides"
+ ViewWorkspaceSlidesView
+ case 4:Printlog " Notes"
+ ViewWorkspaceNotesView
+ case 5:Printlog " Handout"
+ ' this is done this way, to regcognize BUGID:101975
+ ViewWorkspaceHandoutView
+ case 6:Printlog " Drawing"
+ ViewWorkspaceDrawingView
+ end select
+ catch
+ Warnlog "Couldn't excecute the last view ^^^^^^^^^ :-("
+ Printlog "Will close the search&replace dialog as a workaround and then try to switch to the view again"
+ Kontext "FindAndReplace"
+ FindAndReplace.close
+ sleep 5
+ try
+ select case i
+ case 1:ViewWorkspaceDrawingView
+ case 2:ViewWorkspaceOutlineView
+ case 3:ViewWorkspaceSlidesView
+ case 4:ViewWorkspaceNotesView
+ case 5:ViewWorkspaceHandoutView
+ end select
+ catch
+ Warnlog "Couldn't really switch the view :-("
+ endcatch
+ endcatch
+ sleep 5
+ Kontext "FindAndReplace"
+ '///+ if not already open, open. edit->search and replace ///'
+ if (FindAndReplace.exists <> TRUE) then
+ try
+ EditSearchAndReplace
+ catch
+ endcatch
+ endif
+ if (FindAndReplace.exists <> TRUE) then
+ if (i=3) then
+ ' SlideView
+ else
+ Warnlog "Search and replace was not open, and could not be opened :-("
+ endif
+ else
+ Kontext "FindAndReplace"
+ '///+ set text to look for to "a" ///'
+ SearchFor.SetText "a"
+ Printlog "'///+ click button 'find' ///'"
+ SearchNow.Click
+ sleep 5
+ kontext
+ '///+ if active exists 'wrap/not found...' say OK ///'
+ if active.exists(5) then
+ Printlog "Active: '" + active.GetText + "'"
+ try
+ active.ok
+ catch
+ active.yes
+ sleep 2
+ if active.exists(5) then
+ Printlog "Active: '" + active.GetText + "'"
+ active.ok
+ endif
+ endcatch
+ else
+ ' this is done this way, to regcognize BUGID:101974
+ Warnlog "No message about 'search key not found' :-("
+ endif
+ endif
+ next i
+ Kontext "FindAndReplace"
+ FindAndReplace.cancel
+ '/// close application ///'
+ Call hCloseDocument
+
+endcase 'tiEditSearchAndReplaceBUGS
diff --git a/testautomation/graphics/optional/includes/global/g_format.inc b/testautomation/graphics/optional/includes/global/g_format.inc
new file mode 100644
index 000000000000..8cf37d5432a3
--- /dev/null
+++ b/testautomation/graphics/optional/includes/global/g_format.inc
@@ -0,0 +1,1253 @@
+'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
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* Owner : wolfram.garten@oracle.com
+'*
+'* short description :
+'*
+'*******************************************************************
+' #1 tiFormatText
+' #1 tdFormatLayer
+' #1 tdFormatConnector
+' #1 tiFormatPositionAndSize
+' #1 tiFormat3D_Effekte
+' #1 tdFormatTemplates
+' #1 tiFormatAufzaehlungszeichen
+'\******************************************************************
+testcase tiFormatText
+ Dim a as string
+ Dim b as string
+ Dim n as integer
+ Dim i as integer
+ Dim ZaehlerEffekt
+ dim sTemp as string
+
+ '/// open application ///'
+ Call hNewDocument
+ Call sSelectEmptyLayout
+ '/// create a textbox with text ///'
+ Call hTextrahmenErstellen ("This is a text, which, I hope, in Staroffice, will be automaticly formatted. Should that not be the case, then it doesn't matter.",20,20,70,20)
+ WaitSlot (1000)
+ '/// click outside of textbox, to leave edit mode of textbox and deselect it ///'
+ gMouseClick 99,99
+ '/// type key [TAB] to select textbox again ///'
+ hTypeKeys "<TAB>"
+
+ '/// Format->Position and Size ///'
+ FormatPositionAndSize
+ Kontext
+ '/// select tabpage 'Format and Size' on dialog 'Position and Size' ///'
+ Active.SetPage TabPositionAndSize
+ Kontext "TabPositionAndSize"
+ sleep 2
+ '/// get and remember Position: 'Position X' ///'
+ a = PositionX.GetText
+ '/// close dialog 'Position and Size' with OK ///'
+ TabPositionAndSize.OK
+
+ '/// Format -> Text... ///'
+ FormatTextDraw
+ Kontext
+ '/// select tabpage 'Text' ///'
+ Active.SetPage TabText
+ Kontext "TabText"
+ '/// Check checkbox 'Fit width to text' ///'
+ BreiteAnTextAnpassen.Check
+ '/// leave dialog with OK ///'
+ TabText.OK
+
+ '/// Dialog should have been resized and moved now! ///'
+
+ '/// Format->Position and Size ///'
+ ContextPositionAndSize
+ Kontext
+ '/// select tabpage 'Format and Size' on dialog 'Position and Size' ///'
+ Active.SetPage TabPositionAndSize
+ Kontext "TabPositionAndSize"
+ WaitSlot (2000)
+ '/// compare 'Position X' with saved value - has to be different ///'
+ sTemp = PositionX.GetText
+ if (sTemp <> a) Then
+ Printlog " - Fit to frame does work"
+ else
+ warnlog " - Fit to frame doesn't work: expected: '" + a + "' is: '" + + "'"
+ end if
+ '/// get and remember Position: 'Position Y' ///'
+ b=PositionY.GetText
+ TabPositionAndSize.OK
+
+ '/// Format -> Text... ///'
+ FormatTextDraw
+ Kontext
+ '/// select tabpage 'Text' ///'
+ Active.SetPage TabText
+ Kontext "TabText"
+ '/// UNCheck checkbox 'Fit width to text' ///'
+ BreiteAnTextAnpassen.Uncheck
+ '/// check checkbox 'Fit height to text' ///'
+ HoeheAnTextAnpassen.Check
+ '/// if checkbox 'Fit to frame' is enabled: this state only happens, if 'Fit height to text' and 'Fit width to text' are checked ///'
+ if AmRahmenAnpassen.IsEnabled Then
+ WarnLog " - checkbox 'Fit to frame' is enabled, which is wrong!"
+ else
+ PrintLog " - checkbox 'Fit to frame' is disabled."
+ end if
+ WaitSlot (1000)
+ '/// UNcheck checkbox 'Fit height to text' ///'
+ HoeheAnTextAnpassen.UnCheck
+ '/// UNCheck checkbox 'Fit width to text' ///'
+ BreiteAnTextAnpassen.UnCheck
+ '/// if checkbox 'Fit to frame' is disabled: this state only happens, if 'Fit height to text' and/or 'Fit width to text' are checked ///'
+ if AmRahmenAnpassen.IsEnabled Then
+ PrintLog " - checkbox 'Fit to frame' is enabled."
+ else
+ WarnLog " - checkbox 'Fit to frame' is disabled, which is wrong!"
+ end if
+' PrintLog "Full width: " + GanzeBreite.IsChecked
+ '/// set metric field 'Left' to 10 ///'
+ Links.SetText "10"
+ '/// set metric field 'Right' to 10 ///'
+ Rechts.SetText "10"
+ '/// set metric field 'Top' to 10 ///'
+ Oben.SetText "10"
+ '/// set metric field 'Bottom' to 10 ///'
+ Unten.SetText "10"
+ '/// leave dialog with OK ///'
+ TabText.OK
+
+ '/// Edit -> Select All ///'
+ EditSelectAll
+ '/// type Keys [Strg]+[x] to cut object ///'
+ hTypeKeys "<MOD1 X>"
+ '/// No object exists in dokument right now! ///'
+ '/// Format -> Text... ///'
+ FormatTextDraw
+ Kontext
+ '/// select tabpage 'Text' ///'
+ Active.SetPage TabText
+ Kontext "TabText"
+ '/// check checkbox 'Adjust to contour' ///'
+ Konturfluss.Check
+ '/// now every other control on the dialog has to get disabled ///'
+ if ((AmRahmenAnpassen.IsEnabled=False) And (Links.IsEnabled=False) And (Rechts.IsEnabled=False) And (Oben.IsEnabled=False) And (Unten.IsEnabled =False)) Then
+ PrintLog " - Adjust to contour is working"
+ else
+ WarnLog " - contourflow aktivated doesn't work it's supposed to"
+ end if
+ '/// leave dialog with OK ///'
+ TabText.OK
+
+ '/// create a textbox with text ///'
+ Call hTextrahmenErstellen ("blablablablablablablablablablablabla",20,20,60,60)
+ WaitSlot (5000)
+ '/// Format -> Text... ///'
+ FormatTextDraw
+ Kontext
+ '/// select tabpage 'Text Animation' ///'
+ Active.SetPage TabLauftext
+ Kontext "TabLauftext"
+
+ ZaehlerEffekt = Effekt.GetItemCount
+ if (ZaehlerEffekt <> 5) then
+ qaerrorlog "There are now more or less than 5 Effects - Change testcase! " + ZaehlerEffekt
+ end if
+ for n=1 to ZaehlerEffekt
+ Effekt.Select n
+ printlog "" + n + ": '" + Effekt.getSelText + "' -------------------------------"
+ if (n > 2) then
+ '/// test all directions ///'
+ for i = 1 to 4
+ printlog "" + i
+ select case i
+ case 1: NachOben.click
+ case 2: NachLinks.click
+ case 3: NachRechts.click
+ case 4: NachUnten.click
+ end select
+ sFormatTextDrawAnimation
+ next i
+ end if
+ if ((n > 1) AND (n < 5)) then
+ '/// test all Start/End Text visibility ///'
+ for i = 1 to 4
+ printlog "" + i
+ select case i
+ case 1: TextSichtbarBeimStarten.check : TextSichtbarBeimBeenden.uncheck
+ case 2: TextSichtbarBeimBeenden.check
+ case 3: TextSichtbarBeimStarten.uncheck
+ case 4: TextSichtbarBeimBeenden.uncheck
+ end select
+ sFormatTextDrawAnimation
+ next i
+ end if
+ if ((n > 1) AND (n < 5)) then
+ '/// test all Animation cycles ///'
+ for i = 1 to 3
+ printlog "" + i
+ select case i
+ case 1: Endlos.check
+ case 2: Endlos.UnCheck : Anzahl.typeKeys ("<PageUp>")
+ case 3: If Endlos.IsChecked = true then
+ QaErrorLog "#i74067# - Checkbox checked when it shouldn't have been."
+ Endlos.UnCheck
+ end if
+ Anzahl.setText ("1")
+ end select
+ sFormatTextDrawAnimation
+ next i
+ end if
+ if (n > 2) then
+ '/// test all Increment ///'
+ for i = 1 to 4
+ printlog "" + i
+ select case i
+ case 1: Pixel.check : Schrittweite.setText("1")
+ case 2: printlog "#114551# Loop, if Step greater than object size"
+ case 3: Pixel.UnCheck : Schrittweite.typeKeys ("<PageDown>")
+ case 4: printlog "#114551# Loop, if Step greater than object size"
+ end select
+ sFormatTextDrawAnimation
+ next i
+ end if
+ if (n > 1) then
+ '/// test all Delay ///'
+ for i = 1 to 3
+ printlog "" + i
+ select case i
+ case 1: Automatisch.check
+ case 2: Automatisch.UnCheck : Verzoegerung.setText("1")
+ case 3: Verzoegerung.typeKeys ("<PageUp>")
+ end select
+ sFormatTextDrawAnimation
+ next i
+ end if
+ next n
+ TabLauftext.OK
+ Call hCloseDocument
+
+endcase 'tiFormatText
+'-------------------------------------------------------------------------------
+testcase tdFormatLayer
+
+ '/// open application ///'
+ Call hNewDocument
+
+ '/// Edit->Layer->Insert (in DRAW also via Insert->Layer) ///'
+ InsertLayer
+ Kontext "EbeneEinfuegenDlg"
+ EbenenName.SetText " Test 4"
+ LayerTitle.SetText " Test no 4"
+ LayerDescription.SetText " This is the Description of the Layer."
+ EbeneEinfuegenDlg.OK
+
+ '/// Edit->Layer->Modify (in DRAW also via Format->Layer)///'
+ FormatLayer
+ Kontext "EbeneAendernDlg"
+ if EbenenName.GetText = " Test 4" Then
+ EbenenName.SetText "Layer 5"
+ end if
+ if LayerTitle.GetText = " Test no 4" Then
+ LayerTitle.SetText "Layer test 5"
+ end if
+ if LayerDescription.GetText = " This is the Description of the Layer." Then
+ LayerDescription.SetText " This is the changed Description of the Layer."
+ end if
+
+ Sichtbar.Check
+ Druckbar.Check
+ Gesperrt.Check
+ EbeneAendernDlg.OK
+
+ '/// Edit->Layer->Modify (in DRAW also via Format->Layer)///'
+ FormatLayer
+ Kontext "EbeneAendernDlg"
+ if EbenenName.GetText <> "Layer 5" Then
+ WarnLog " Name-Value either didn't change at all, or was empty. Expected: 'Layer 5', but was: " + EbenenName.GetText
+ end if
+ if LayerTitle.GetText <> "Layer test 5" Then
+ WarnLog " Title-Value either didn't change at all, or was empty. Expected: 'Layer test 5', but was: " + LayerTitle.GetText
+ end if
+ if LayerDescription.GetText <> " This is the changed Description of the Layer." Then
+ WarnLog " Description-Value either didn't change at all, or was empty. Expected: ' This is the changed Description of the Layer.', but was: " + LayerDescription.GetText
+ end if
+
+ if Sichtbar.IsChecked=False Then
+ WarnLog " Value changed: visible"
+ end if
+ if Druckbar.IsChecked=False Then
+ WarnLog " Value changed: printable"
+ end if
+ if Gesperrt.IsChecked=False then
+ WarnLog " Value changed: locked"
+ end if
+ EbeneAendernDlg.OK
+
+ '/// close application ///'
+ Call hCloseDocument
+
+endcase 'tdFormatLayer
+'-------------------------------------------------------------------------------
+testcase tdFormatConnector
+
+ Dim Zaehler as integer
+ Dim i as integer
+ dim sUnit as string
+ dim sTemp as string
+ dim cDecSep as string
+
+ if (gApplication = "IMPRESS") then
+ ExtensionString = "odp"
+ else
+ ExtensionString = "odg"
+ end if
+
+ Call hNewDocument
+ '/// insert connector ///
+ kontext "Connectorsbar"
+ if Connectorsbar.Exists then
+ Connectorsbar.Close
+ end if
+
+ kontext "Toolbar"
+ Sleep (1)
+ try
+ Verbinder.TearOff ' insert connector
+ catch
+ warnlog "bug for GH from TBO; .tearoff doesn't tell success"
+ endcatch
+
+ kontext "Connectorsbar"
+ Verbinder.click
+ gMouseMove ( 10,10,30,30)
+
+ Call hCloseDocument
+ '/// Open file with a finished scenario ///'
+ hFileOpen ConvertPath (gTesttoolPath + "graphics\required\input\FormatConnector." + ExtensionString)
+ sleep (1)
+ '/// 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
+ end if
+ end if
+ gMouseClick 1,1
+
+ '/// Press TAB three times to select the connector. ///'
+ hTypekeys "<TAB>"
+ hTypekeys "<TAB>"
+ hTypekeys "<TAB>"
+
+ WaitSlot (1000)
+ hTypeKeys "<SHIFT F10>" 'OpenContextMenu(true)
+ sleep (3)
+ hMenuSelectNr(2) ' Connector
+ Kontext "Verbinder"
+ Typ.Select 2 ' the one with 2 from 3 posibilities to set a value...
+ Sleep (1)
+ AnfangHorizontal.SetText "1"
+ Verbinder.TypeKeys "<TAB>"
+ AnfangVertikal.SetText "1"
+ Verbinder.TypeKeys "<TAB>"
+ EndeHorizontal.SetText "1"
+ Verbinder.TypeKeys "<TAB>"
+ EndeVertikal.SetText "1"
+ Verbinder.TypeKeys "<TAB>"
+ printlog EndeVertikal.getText
+ try
+ Linie1.SetText "10"
+ Verbinder.TypeKeys "<TAB>"
+ sTemp = Linie1.getText
+ sUnit = GetMeasUnit(sTemp)
+ cDecSep = GetDecimalSeperator(sTemp)
+ catch
+ PrintLog " Lineoffset not activated -> you have to choose another linetype: 1"
+ endcatch
+ try
+ Linie2.SetText "10"
+ Verbinder.TypeKeys "<TAB>"
+ catch
+ PrintLog " Lineoffset not activated -> you have to choose another linetype: 2"
+ endcatch
+ try
+ Linie3.SetText "10"
+ Verbinder.TypeKeys "<TAB>"
+ catch
+ PrintLog " Lineoffset not activated -> you have to choose another linetype: 3 when will this be enabled ?"
+ endcatch
+ Verbinder.OK
+
+ FormatConnector
+ Kontext "Verbinder"
+ sTemp = AnfangHorizontal.GetText
+
+ if fCompareTwoValues(sTemp, "1"+cDecSep+"00"+sUnit) Then
+ WarnLog " value not changed"
+ printlog "AnfangHorizontal = is '" + sTemp + "' should: '"+"1"+cDecSep+"00"+sUnit+"'"
+ end if
+ if fCompareTwoValues(AnfangVertikal.GetText, "1"+cDecSep+"00"+sUnit) Then
+ WarnLog " value not changed"
+ printlog "AnfangVertikal.GetText = " + AnfangVertikal.GetText
+ end if
+ if fCompareTwoValues(EndeHorizontal.GetText, "1"+cDecSep+"00"+sUnit) Then
+ WarnLog " value not changed"
+ printlog "EndeHorizontal.GetText = " + EndeHorizontal.GetText
+ end if
+ if fCompareTwoValues(EndeVertikal.GetText, "1"+cDecSep+"00"+sUnit) Then
+ WarnLog " value not changed"
+ printlog "EndeHorizontal.GetText = " + EndeHorizontal.GetText
+ end if
+
+ Zaehler = Typ.GetItemCount
+ for i = 1 to Zaehler
+ Typ.Select i
+ SetClipboard Typ.GetSelText
+ Verbinder.OK
+ FormatConnector
+ Kontext "Verbinder"
+ if GetClipboardText <> Typ.GetSelText Then
+ WarnLog " Selection not saved. Was: " + Typ.GetSelText + " . But should have been: " +GetClipboardText
+ end if
+ next i
+ Verbinder.OK
+ Call hCloseDocument
+
+endcase 'tdFormatConnector
+'-------------------------------------------------------------------------------
+testcase tiFormatPositionAndSize
+
+ Dim x 'Variable fuer PositionX
+ Dim y 'Variable fuer PositionY
+ Dim h 'Variable fuer Hoehe
+ Dim b 'Variable fuer Breite
+ Dim r 'Variable fuer Radius
+ Dim w 'Variable fuer Winkel
+
+printlog "New impress doc"
+ Call hNewDocument
+ WaitSlot (3000)
+ printlog "RECTANGLE-----1/2"
+ printlog "create rectangle"
+ Call hRechteckErstellen (20,20,70,30)
+ WaitSlot (1000)
+ gMouseClick 50,25
+ WaitSlot (1000)
+ printlog "Format-position and size"
+ ContextPositionAndSize
+ WaitSlot (1000)
+ Kontext
+ printlog "TabPositionAndSize"
+ Active.SetPage TabPositionAndSize
+ Kontext "TabPositionAndSize"
+ printlog "put x and y position into clipboard"
+ printlog "x = " & PositionX.GetText
+ printlog "y = " & PositionY.GetText
+ SetClipboard (PositionX.GetText + PositionY.GetText)
+ TabPositionAndSize.OK
+ WaitSlot (1000)
+ printlog "move rectangle down and right"
+ hTypeKeys "<DOWN>",10
+ hTypeKeys "<RIGHT>",10
+ printlog "open PositionAndSize"
+ ContextPositionAndSize
+ WaitSlot (1000)
+ Kontext
+ printlog "TabPositionAndSize"
+ Active.SetPage TabPositionAndSize
+ Kontext "TabPositionAndSize"
+ printlog "control position changes with clipboard content"
+ if (PositionX.GetText + PositionY.GetText) = GetClipboardText Then WarnLog "Der Dialog hat die Positionsaenderung nicht registriert"
+ printlog "set position of rectange using the edit fields"
+ PositionX.SetText "2"
+ x=PositionX.GetText
+ PositionY.SetText "2"
+ y=PositionY.GetText
+ printlog "check protect"
+ ProtectPosition.Check
+ TabPositionAndSize.OK
+ WaitSlot (1000)
+ ContextPositionAndSize
+ WaitSlot (1000)
+ Kontext
+ Active.SetPage TabPositionAndSize
+ Kontext "TabPositionAndSize"
+ printlog "check if values are correct"
+ if PositionX.GetText = x And PositionY.GetText = y Then PrintLog " Values could be changed"
+ printlog "check if protect works"
+ if PositionX.GetText<> x Then
+ WarnLog "Protect does not work"
+ else
+ PrintLog "Protext works, X axis checked"
+ end if
+ if PositionY.GetText<> y Then
+ WarnLog "Protect does not work"
+ else
+ PrintLog " Protext does work, checked y axis"
+ end if
+ printlog "uncheck protect"
+ ProtectPosition.UnCheck
+ TabPositionAndSize.OK
+ WaitSlot (1000)
+ ContextPositionAndSize
+ WaitSlot (1000)
+ Kontext
+ printlog "TabPositionAndSize"
+ WaitSlot (1000)
+ Active.SetPage TabPositionAndSize
+ Kontext "TabPositionAndSize"
+ KeepRatio.UnCheck
+ printlog "set width to 10"
+ WaitSlot (1000)
+ Width.SetText "10"
+ printlog "put value into a variable"
+ WaitSlot (1000)
+ b=Width.GetText
+ printlog "Width is " & b
+ SetClipboard Width.GetText
+ '/// set heigth to 5 ///'
+ Height.SetText "5"
+ printlog "put value into variable"
+ WaitSlot (1000)
+ h=Height.GetText
+ printlog "Height is " & h
+ printlog "check protect"
+ ProtectPosition.Check
+ printlog "close dialog"
+ TabPositionAndSize.OK
+ WaitSlot (1000)
+ ContextPositionAndSize
+ WaitSlot (1000)
+ Kontext
+ Active.SetPage TabPositionAndSize
+ Kontext "TabPositionAndSize"
+ WaitSlot (2000)
+ printlog "control size changes"
+ printlog "Width value is: " & Width.GetText
+ printlog "Value from Clipboard is: " & GetClipboardText
+ if Width.GetText = GetClipboardText Then
+ PrintLog " Size of rectangle could be changed. It is = " + Width.GetText + " but it should be = " + b
+ else
+ WarnLog " Controls for height and width do not work"
+ end if
+ printlog "Uncheck the Position-Protection, so we can work with this window."
+ if ProtectPosition.isChecked = FALSE then
+ printlog "Should be checked since it was checked just 16 rows ago"
+ ErrorLog "ProtectPosition was not checked - why?"
+ else
+ ProtectPosition.Uncheck
+ end if
+
+ KeepRatio.Check
+ printlog "raise value for width"
+ Width.More 5
+ if Height.GetText = h Then
+ WarnLog " Keep ratio does not work properly"
+ else
+ PrintLog " Keep ratio does work"
+ KeepRatio.UnCheck
+ end if
+ TabPositionAndSize.OK
+ WaitSlot (2000)
+ gMouseClick 90,90
+ WaitSlot (2000)
+ printlog "Now trying TEXT..."
+ printlog "create textbox"
+ Call hTextrahmenErstellen ("Never before have I written such a meaning" ,10,10,60,20)
+ WaitSlot (2000)
+ printlog "Format-Postion and Size"
+ FormatPositionAndSize
+ WaitSlot (1000)
+ Kontext
+ printlog "TabPositionAndSize"
+ Active.SetPage TabPositionAndSize
+ Kontext "TabPositionAndSize"
+ printlog "default value ?: width :-----"+Width.IsEnabled
+ printlog "check fit width to text"
+ if Width.IsEnabled then FitWidthText.Check
+ if Width.IsEnabled = True Then
+ WarnLog " Fit width does not work"
+ else
+ PrintLog " Fit width does work"
+ end if
+ printlog "fit heigth to text"
+ FitHeightText.Check
+ if Height.IsEnabled = True Then
+ WarnLog " fit heigth doe not work"
+ else
+ PrintLog " fit heigth does work"
+ end if
+ ' PrintLog " Fit width to text active: " + FitWidthText.IsChecked
+ ' PrintLog " Fit heigth to text active: " + FitHeightText.IsChecked
+ printlog "uncheck fit width to text"
+ FitWidthText.UnCheck
+ printlog "uncheck fit heigth to text"
+ FitHeightText.Uncheck
+ TabPositionAndSize.OK
+ WaitSlot (1000)
+ hTypeKeys "<escape>",2
+ hTypeKeys "<TAB>",2
+ WaitSlot (1000)
+ ContextPositionAndSize
+ WaitSlot (1000)
+ Kontext
+ Active.SetPage TabPositionAndSize
+ Kontext "TabPositionAndSize"
+ printlog "check x-position of textbox"
+ SetClipboard PositionX.GetText
+ WaitSlot (1000)
+ Kontext
+ printlog "set rotation angle to 50 and position x and y to 1"
+ Active.SetPage TabDrehung
+ Kontext "TabDrehung"
+ PositionX.SetText "1"
+ PositionY.SetText "1"
+ Winkel.SetText "50"
+ w=Winkel.GetText
+ TabDrehung.OK
+ WaitSlot (3000)
+
+ printlog "check position of manipulated textbox"
+ ContextPositionAndSize
+ WaitSlot (3000)
+ Kontext
+ Active.SetPage TabPositionAndSize
+ Kontext "TabPositionAndSize"
+ if PositionX = GetClipboardText Then PrintLog " Position changed due to rotation"
+ Kontext
+ Active.SetPage TabDrehung
+ Kontext "TabDrehung"
+ WaitSlot (1000)
+ printlog "check rotation angle"
+ if Winkel.GetText = w Then PrintLog " Object rotated"
+ TabDrehung.OK
+
+ printlog "RECTANGLE-----2/2"
+ printlog "create rectangle"
+ Call hRechteckErstellen (10,60,70,90)
+ WaitSlot (2000)
+ ContextPositionAndSize
+ WaitSlot (1000)
+ Kontext
+ Active.SetPage TabPositionAndSize
+ Kontext "TabPositionAndSize"
+ printlog "put x-axis postion of rectangle into clipboard"
+ SetClipboard PositionX.GetText
+ Kontext
+ printlog "set slant angle to 5"
+ Active.SetPage TabSchraegstellen
+ Kontext "TabSchraegstellen"
+ WaitSlot (1000)
+ printlog "set radius to 5"
+ Radius.SetText "5"
+ r=Radius.GetText
+ Winkel.SetText w
+ TabSchraegstellen.OK
+ WaitSlot (1000)
+ ContextPositionAndSize
+ Kontext
+ Active.SetPage TabPositionAndSize
+ Kontext "TabPositionAndSize"
+ if PositionX <> GetClipboardText Then PrintLog " Object changed position due to scaling"
+ printlog "Before we change tab, we set the Position-marker back to checked "
+ ProtectPosition.Check
+ Kontext
+ printlog "check slant angle and radius"
+ Active.SetPage TabSchraegstellen
+ Kontext "TabSchraegstellen"
+ if Radius.GetText = r Then PrintLog " Cornwer radius changed"
+ if Winkel.GetText =w Then PrintLog " Object rotated over 45°"
+ TabSchraegstellen.OK
+ Call hCloseDocument
+
+endcase 'tiFormatPositionAndSize
+'-------------------------------------------------------------------------------
+testcase tiFormat3D_Effekte
+
+ Dim Hor as string
+ Dim Vert as string
+ Dim Rund as string
+ Dim Skal as string
+ Dim Tief as string
+ Dim Winkel as string ' get value for angle
+ Dim X as string
+ Dim y as integer
+ Dim i as integer
+ Dim Zaehler as integer
+ Dim Posi as string
+
+ Call hNewDocument
+ Call sSelectEmptyLayout
+ printlog "new document"
+ '-----------------------------------RECTANGLE------------------------------------------------------
+ Call hRechteckErstellen (20,20,60,70) '/// create rectangle ///'
+ WaitSlot (1000)
+ ContextPositionAndSize '/// get position and size of rectangle ///'
+ Kontext
+ Active.SetPage TabPositionAndSize
+ Kontext "TabPositionAndSize"
+ PositionX.SetText "5"
+ X=PositionX.GetText
+ printlog "--- created RECTANGLE; xPosition @ "+ x
+ TabPositionAndSize.OK
+ ContextConvertInto3D '/// convert rectangle into 3d ///'
+ WaitSlot (1000)
+ Kontext "Drei_D_Effekte"
+ if Drei_D_Effekte.exists(3) then
+ qaerrorlog " The 3D-Effects-dialogue was open. Check why."
+ else
+ Format3D_Effects '/// open 3d flyer///'
+ end if
+ try
+ if Perspektive.isvisible then
+ Perspektive.Click '/// check perspective ///'
+ else
+ warnlog "why not in draw?"
+ end if
+ catch
+ warnlog "something is wrong mit perspective"
+ endcatch
+ Zuweisen.Click '/// assign perspective ///'
+ Kontext "DocumentImpress"
+ hTypeKeys "<MOD1 A>"
+ ContextPositionAndSize '/// check position and size ///'
+ Kontext
+ Active.SetPage TabPositionAndSize
+ Kontext "TabPositionAndSize"
+ if PositionX.GetText = X Then
+ printlog "- Perspective acitvated x: "+PositionX.GetText
+ else
+ warnlog "- Perspective seems to have a problem, x value has changed!"
+ end if
+ TabPositionAndSize.OK
+ Kontext "Drei_D_Effekte"
+ Aktualisieren.Click
+ Drei_D_Effekte.Close
+ EditSelectAll '/// delete rectangle ///'
+ hTypeKeys "<DELETE>"
+
+ '-----------------------------------RECTANGLE------------------------------------------------------
+ hRechteckErstellen (20,20,60,70) '/// create new rectangle ///'
+ printlog "--- created RECTANGLE 2"
+ Format3D_Effects '/// open 3d flyer ///'
+ Kontext "Drei_D_Effekte"
+ Rotationskoerper.Click '/// create lathe object ///'
+ WaitSlot (1000)
+ Kontext "DocumentImpress"
+ ContextPositionAndSize '/// check position and size ///'
+ Kontext
+ Active.SetPage TabPositionAndSize
+ Kontext "TabPositionAndSize"
+ if PositionX.GetText = X Then
+ Warnlog "- Rectangle not converted into a lath object; x: "+PositionX.GetText
+ else
+ Printlog "- Creating a lath object seems to work"
+ end if
+ TabPositionAndSize.OK
+ EditSelectAll
+ hTypeKeys "<DELETE>" '/// delete object ///'
+ Sleep (1)
+ '-----------------------------------RECTANGLE------------------------------------------------------
+ hRechteckErstellen (20,20,60,70) '/// create rectangle ///'
+ printlog "--- created RECTANGLE 3"
+ Kontext "Drei_D_Effekte"
+ WaitSlot (1000)
+ In_3D_Umwandeln.Click '/// convert to 3d in 3d flyer ///'
+ WaitSlot (2000)
+ gMouseClick 40,40
+ qaerrorlog "#i92910: automation: crash when executing tiFormat3D_Effekte in test g_format"
+ 'hOpenContextmenu
+ 'y = hMenuItemGetCount
+ 'MenuSelect (0)
+ 'gMouseClick 90,90
+ 'select case gApplication
+ ' case "DRAW" : if y = 13 then
+ ' Printlog "- 3D object created"
+ ' else
+ ' Warnlog " Context-menu-entry-number was wrong. Expected 13, but was " + y + "."
+ ' end if
+ ' case else : if y = 15 then
+ ' Printlog "- 3D object created"
+ ' else
+ ' Warnlog " Context-menu-entry-number was wrong. Expected 15, but was " + y + "."
+ ' end if
+ 'end select
+
+ EditSelectAll
+ hTypeKeys "<DELETE>" '/// delete object ///'
+
+ '-----------------------------------ZYLINDER------------------------------------------------------
+ Sleep (1)
+ printlog "--- create CYLINDER"
+ WL_SD_Zylinder '/// create cylinder ///'
+ gMousemove 30,30,80,80 '/// This affects the Vertical-value down to 15 ///'
+ Sleep (1)
+ hTypeKeys "<ESC>"
+ Kontext "Drei_D_Effekte"
+ Geometrie.Click '/// geometry ///'
+ WaitSlot (1000)
+ ' Endwinkel.More
+ Vert=Vertikale_Segmente.GetText '/// get value for vertical segments (default) ///'
+ Hor =Horizontale_Segmente.GetText '/// get value for horizontal segments (default) ///'
+ Rund=Kantenrundung.GetText '/// get value for edge rounding ///'
+ Skal=Tiefenskalierung.GetText '/// get value for scale ///'
+ Tief=Tiefe.GetText '/// get value for depth ///'
+ Winkel=Endwinkel.GetText '/// get value for angle ///'
+
+ '/// Check if every entry has a value <> "" -> an init value is shown. ///'
+ if Vert ="" then warnlog "Vertical Segment has no init value"
+ if Hor ="" then warnlog "Horizontal Segment has no init value"
+ if Rund ="" then warnlog "Rounded edges has no init value"
+ if Skal ="" then warnlog "Scaled depth has no init value"
+ if Tief ="" then warnlog "Depth has no init value"
+ if Winkel="" then printlog "Rotation angle has no init value"
+
+ '/// Go back to the 3d-effects-dialogue and change the value for the cylinder ///'
+
+ hTypeKeys "<ESC>" '/// Deselect object and check if 3d controller has default values again ///'
+ Kontext "Drei_D_Effekte"
+
+ '/// Check if value for vertical segments has changed in 3d controller ///'
+ if Vertikale_Segmente.GetText = Vert Then
+ Printlog "- Vertical segment value read from object's properties in the 3d flyer"
+ else
+ Warnlog "- 3D flyer could not read vertical segment information from object. It is = '"+ Vertikale_Segmente.GetText + "' but should be = '" + Vert + "'"
+ end if
+
+ if Horizontale_Segmente.GetText = Hor Then '/// check if value for horizontal segments has changed ///'
+ Printlog "- Horizontal segment value read from object's properties in the 3d flyer"
+ else
+ Warnlog "- 3D flyer not be able to read horizonal segment information from object. It is = '"+ Horizontale_Segmente.GetText + "' but should be = '" + Hor + "'"
+ end if
+
+ if Kantenrundung.GetText = Rund Then '/// check if value for edge rounding has changed ///'
+ Printlog "- Rounded edges works"
+ else
+ Warnlog "- Rounded edges value could not be read by the 3d flyer It is = '" + Kantenrundung.GetText + "' but should be = '" + rund + "'"
+ end if
+
+ if Tiefenskalierung.GetText = Skal Then '/// check value for scale ///'
+ Printlog "- Scaled depth works"
+ else
+ Warnlog "- Scale depth value could not be read by the 3d flyer It is = '" + Tiefenskalierung.GetText + "' but should be = '" + skal + "'"
+ end if
+
+ if Tiefe.GetText = Tief Then '/// check value for depth ///'
+ Printlog "- Depth value could be read by the 3d flyer"
+ else
+ Warnlog "- Depth value of object could not be read by the flyer It is = '"+ Tiefe.GetText + "' but should be = '" + tief + "'"
+ end if
+
+ if Endwinkel.GetText = Winkel Then '/// check value for angle ///'
+ Printlog "- Angle value could be read by the 3d flyer"
+ else
+ Warnlog "- Angle value is not correct"
+ end if
+
+ hTypeKeys "<ESC>" '/// deselect object and check if 3d controller has default values again ///'
+ Kontext "Drei_D_Effekte"
+ Sleep (2)
+ Printlog "- check if 3D flyer goes back to default values if object is deselected"
+ if Vertikale_Segmente.GetText <> Vert Then Warnlog " Vertical Segment - Default value is wrong is: "+Vertikale_Segmente.GetText+"; should: " +vert
+ if Horizontale_Segmente.GetText <> Hor Then Warnlog " Horizontal Segment - Default value is wrong"
+ if Kantenrundung.GetText <> Rund Then Warnlog " Rounded edges - Default value is wrong"
+ if Tiefenskalierung.GetText <> Skal Then Warnlog " Scaled depth - Default value is wrong"
+ if Endwinkel.GetText <> Winkel Then Warnlog " Rotation angle - Default value is wrong"
+ if Tiefe.GetText<>Tief Then Warnlog " Depth - Default value is wrong"
+
+ hTypeKeys "<TAB>"
+ Kontext "Drei_D_Effekte"
+ Sleep (2)
+ Horizontale_Segmente.SetText "32" '/// change horizontal and vertical segments ///'
+ Vertikale_Segmente.SetText "32"
+ Kantenrundung.SetText "100"
+ Endwinkel.Settext "300"
+ Tiefenskalierung.SetText "500"
+ Tiefe.SetText "100"
+ Zuweisen.Click '/// assign changes ///'
+
+ WaitSlot (1000) '/// check value changes ///'
+ if Vertikale_Segmente.GetText = Vert Then Warnlog "- Default value is wrong"
+ if Horizontale_Segmente.GetText = Hor Then Warnlog "- Default value is wrong"
+ if Kantenrundung.GetText = Rund Then Warnlog "- Default value is wrong"
+ if Tiefenskalierung.GetText = Skal Then Warnlog "- Default value is wrong"
+ if Endwinkel.GetText = Winkel Then Warnlog "- Default value is wrong"
+ if Tiefe.GetText=Tief Then Warnlog "- Default value is wrong"
+ EditSelectAll
+ hTypeKeys "<DELETE>" '/// delete cylinder ///'
+
+ '-----------------------------------ZYLINDER------------------------------------------------------
+ WL_SD_Zylinder '/// create new cylinder ///'
+ gMouseMove (20,20,60,60)
+ WaitSlot (3000)
+ Kontext "Drei_D_Effekte"
+ Printlog "- Change basic geometric parameters for the object"
+ Printlog "Segments : Horizontal: 8; Vertical: 8; Rounded edges: 50 %"
+ Horizontale_Segmente.SetText "8" '/// changing values for cylinder ///'
+ Vertikale_Segmente.SetText "8"
+ Kantenrundung.SetText "50 %"
+ Sleep (1)
+ Zuweisen.Click
+ WaitSlot (2000)
+ gMouseClick 90,90
+ Sleep (2)
+ EditSelectAll '/// select object ///'
+ WaitSlot (1000)
+ Kontext "Drei_D_Effekte" '/// control if changes are done ///'
+ if Horizontale_Segmente.GetText <> "8" Then Warnlog "- Horizontal segment count is not correct "+Horizontale_Segmente.GetText
+ if Vertikale_Segmente.GetText <> "8" Then Warnlog "- Vertical segment count is not correct "+Vertikale_Segmente.GetText
+ if Kantenrundung.GetText <> "50 %" Then Warnlog "- Value for rounded edges is not correct "+Kantenrundung.GetText
+ Darstellung.Click
+ Zaehler=Modus.GetItemCount '/// get number of pssibole render methods ///'
+ for i =1 to Zaehler
+ Modus.Select i
+ Zuweisen.Click '/// assign every render method ///'
+ gMouseClick 90,90
+ Sleep (1)
+ EditSelectAll '/// select object ///'
+ Sleep (1)
+ Kontext "Drei_D_Effekte"
+ if Modus.GetSelIndex <> i Then Warnlog "- Value for render modus did not change" '/// check if render method has changed ///'
+ next i
+ Printlog "- Check 3d shadow and surface angle"
+ Drei_DSchatten.Click '/// check 3d shadow ///'
+ Papierneigung.SetText "90 degree(s)"
+ vert = Papierneigung.getText
+ Zuweisen.Click '/// assign shadow ///'
+ gMouseClick 90,90 '/// deselect object ///'
+ WaitSlot (1000)
+ EditSelectAll '/// select object ///'
+ Kontext "Drei_D_Effekte"
+ if Papierneigung.GetText <> vert Then Warnlog "- Value for surface angle is not correct" '/// check value changes ///'
+ Entfernung.SetText "10" '/// set distance to 10 ///'
+ Sleep (1)
+ hor = Entfernung.getText
+ Sleep (1)
+ Zuweisen.Click
+ if Entfernung.GetText <> hor Then Warnlog "- Value for distance is not correct; should: "+hor+"; is: "+Entfernung.GetText
+ WaitSlot (2000)
+ hTypeKeys "<TAB>"
+ Sleep (2)
+ ContextPositionAndSize
+ WaitSlot (2000)
+ Kontext
+ Active.SetPage TabPositionAndSize
+ Kontext "TabPositionAndSize"
+ PositionX.SetText "5,00cm"
+ Posi=PositionX.GetText
+ TabPositionAndSize.OK
+ WaitSlot (1000)
+ Kontext "Drei_D_Effekte"
+
+ Brennweite.SetText "50" '/// set focval length to 50 ///'
+ Zuweisen.Click
+ ContextPositionAndSize '/// check change in position of the object ///'
+ Kontext
+ Active.SetPage TabPositionAndSize
+ Kontext "TabPositionAndSize"
+ If PositionX.GetText = Posi Then
+ printlog "- Raising value for focal length has not changed optical appearence of object, ok."
+ else
+ warnlog "Problem with focal lenght here!"
+ endif
+ TabPositionAndSize.OK
+ WaitSlot (1000)
+ Kontext "Drei_D_Effekte"
+ Brennweite.SetText "5"
+ Zuweisen.Click
+ WaitSlot (1000)
+ EditSelectAll
+ WaitSlot (3000)
+ ContextPositionAndSize
+ WaitSlot (1000)
+ Kontext
+ Sleep (1)
+ Active.SetPage TabPositionAndSize
+ Kontext "TabPositionAndSize"
+ Sleep (2)
+ if PositionX.GetText = Posi Then
+ printlog "- Lowering focus length value has not changed optical appearence of object, ok."
+ else
+ warnlog "problem with focus, check!"
+ endif
+ TabPositionAndSize.OK
+ Kontext "Drei_D_Effekte"
+ printlog "close document"
+ Drei_D_Effekte.Close
+ Call hCloseDocument
+
+endcase 'tiFormat3D_Effekte
+'------------------------------------------------------------------
+testcase tdFormatTemplates
+
+ qaerrorlog "Not yet ready."
+ goto endsub
+
+ dim Zaehler as integer
+ dim i as integer
+ dim x as integer
+ dim iWaitIndex as integer
+ dim sStyleName as string
+ dim bDouble as boolean
+ dim sTemp(2) as string
+
+ Call hNewDocument '/// new impress document ///'
+
+ WaitSlot (5000)
+ FormatStylesCatalog '/// format-Style catalog///'
+ iWaitIndex = 0
+ do while Vorlagenkatalog.NotExists AND iWaitIndex < 10
+ sleep (1)
+ iWaitIndex = iWaitIndex + 1
+ loop
+
+ Kontext "Vorlagenkatalog"
+ Vorlagen.GetItemCount '/// get item count for templates ///'
+ Vorlagen.Select 2 '/// select template 2 ///'
+
+ if Bereich.GetItemCount = Vorlagen.GetItemCount Then '/// check if area changes when selecting a template ///'
+ PrintLog " - Area did changed"
+ else
+ WarnLog " Number of entrees should be 2, but it is " + Bereich.GetItemCount
+ end if
+
+ Zaehler = Ansicht.GetItemCount 'Vorlagenliste.GetItemCount
+
+ for i = 1 to Zaehler
+ Ansicht.TypeKeys "<DOWN>" ,i
+ SetClipboard Ansicht.GetSelText
+ WaitSlot (2000)
+ Vorlagen.Select 1
+ PrintLog " "+i+": Offset: '" + Vorlagen.GetSelText+"'"
+ if Bereich.GetItemCount=Vorlagen.GetItemCount Then WarnLog " Range has not changed"
+ Vorlagen.Select 2
+ WaitSlot (1000)
+ Ansicht.TypeKeys "<HOME>"
+ WaitSlot (1000)
+ Ansicht.Select 1
+ WaitSlot (1000)
+ PrintLog " : Offset: '"+Vorlagen.GetSelText + "'; Opinion: '" + Ansicht.GetSelText+"'"
+ Vorlagenkatalog.OK
+ FormatStylesCatalog
+ Kontext "Vorlagenkatalog"
+ next i
+
+ Vorlagen.Select 2
+ WaitSlot (2000)
+ Vorlagen.Select 1 '/// select first template ///'
+ if Neu.IsEnabled =False Then WarnLog " Button must be choosable, but is not"
+ Ansicht.Select 1
+ WaitSlot (1000)
+ Neu.Click '/// create new template ///'
+ Kontext
+ Active.SetPage TabVerwalten
+ Kontext "TabVerwalten"
+ sStyleName = VorlagenName.GetText
+ printlog " created new style: '"+sStyleName +"'"
+ TabVerwalten.OK
+ PrintLog " New template created"
+ Kontext "Vorlagenkatalog"
+ WaitSlot (1000)
+ ' find newly created style, because they are alphabetical ordered :-( i have to check every entry :-(((((
+ Zaehler = Ansicht.GetItemCount
+ i=1
+ Ansicht.TypeKeys "<home>"
+ bDouble = false
+ sTemp(1) = Ansicht.GetText
+ while (sTemp(1) <> sStyleName) AND (i <= Zaehler)
+ Ansicht.TypeKeys "<DOWN>"
+ inc i
+ if (i > Zaehler) then ' here we are only, if we didn't found 'our' template
+ if bDouble then
+ qaErrorLog "There are Double Entries in the list! #111652#"
+ else
+ warnlog " style not found :-(" ' print out the styles...
+ end if
+ Ansicht.TypeKeys "<home>"
+ for x=0 to zaehler
+ printlog " "+(x+1)+": "+Ansicht.GetText
+ if (Loeschen.IsEnabled) then qaErrorLog "^ is delete-able :-)"
+ Ansicht.TypeKeys "<DOWN>"
+ next x
+ end if
+ sTemp(2) = sTemp(1)
+ sTemp(1) = Ansicht.GetText
+ if (sTemp(1) = sTemp(2)) then
+ bDouble = true
+ end if
+ wEnd
+ if bDouble then
+ i=1
+ Ansicht.TypeKeys "<end>"
+ sTemp(1) = Ansicht.GetText
+ while (sTemp(1) <> sStyleName) AND (i <= Zaehler)
+ printlog " "+(i)+": "+sTemp(1)
+ Ansicht.TypeKeys "<UP>"
+ inc i
+ if (i > Zaehler) then ' here we are only, if we didn't found 'our' template
+ warnlog " style not found :-(" ' print out the styles...
+ Ansicht.TypeKeys "<end>"
+ for x=0 to zaehler
+ printlog " "+(x+1)+": "+Ansicht.GetText
+ if (Loeschen.IsEnabled) then qaErrorLog "^ is delete-able :-)"
+ Ansicht.TypeKeys "<UP>"
+ next x
+ end if
+ sTemp(1) = Ansicht.GetText
+ wEnd
+ end if
+ if (i <= Zaehler) then printlog " found created entry for deleting it :-)"
+ ' Ansicht.TypeKeys "<DOWN>" ,( i + 1 ) '/// control if template list has created template included ///'
+ WaitSlot (2000)
+ try
+ Loeschen.Click '/// delete template ///'
+ WaitSlot (1000)
+ Kontext "Active"
+ if active.exists then
+ printlog "ac: "+active.gettext
+ try
+ Active.Yes
+ catch
+ warnlog "active-Yes doesn't exist :-( WorkInProgress TBO"
+ endcatch
+ end if
+ PrintLog " Delete did work"
+ Kontext "Vorlagenkatalog"
+ catch
+ WarnLog " Only a new created template can be deleted"
+ endcatch
+ WaitSlot (1000)
+ UseBindings
+ Ansicht.Select 1
+ WaitSlot (1000)
+ Aendern.Click '/// modify template ///'
+ WaitSlot (2000)
+ Kontext
+ Active.SetPage TabSchatten
+ Kontext "TabSchatten"
+ WaitSlot (2000)
+ TabSchatten.Cancel
+ WaitSlot (2000)
+ Kontext "Vorlagenkatalog"
+
+ Verwalten.Click '/// organize templates ///'
+ WaitSlot (2000)
+ Kontext "DVVerwalten"
+ DVVerwalten.OK
+ WaitSlot (1000)
+ try
+ Kontext "Vorlagenkatalog"
+ Vorlagenkatalog.OK
+ catch
+ Warnlog " - Style Catalog can't close unless the Template Management-dialog is closed"
+ endcatch
+ PrintLog " FormatStylesCatalog finished" '/// close template catalog ///'
+ WaitSlot (2000)
+ FormatModifyLayout '/// format modify layout ///'
+ WaitSlot (2000)
+ Kontext "Seitenvorlage"
+ if HintergrundseiteAustauschen.IsChecked=True Then HintergrundseiteAustauschen.UnCheck '/// uncheck switch background page ///'
+ Laden.Click '/// load ///'
+ WaitSlot (2000)
+ Kontext "Neu"
+ Neu.Cancel
+ Kontext "Seitenvorlage" '/// choose a page layout ///'
+ 'Waehlen.Click
+ Seitenvorlage.OK '/// close dialog ///'
+
+ Call hCloseDocument '/// close document ///'
+
+endcase 'tdFormatTemplates
+'-------------------------------------------------------------------------------
+testcase tiFormatAufzaehlungszeichen
+
+ Dim i as Integer
+ PrintLog "- Format/Numbering and Bullets"
+
+ Call hNewDocument
+ Call sSelectEmptyLayout
+ WaitSlot (2000)
+ Kontext "DocumentImpress"
+ hTextrahmenErstellen ("Hello <Return><Return>",20,20,60,60)
+ for i=1 to 8
+ Kontext "DocumentImpress"
+ gMouseClick 30,30
+ EditSelectAll
+ WaitSlot (1000)
+ FormatNumberingBulletsDraw
+ WaitSlot (2000)
+ Kontext
+ Active.SetPage TabBullet
+ Kontext "TabBullet"
+ Auswahl.TypeKeys "<Right>", i
+ TabBullet.OK
+ Kontext "DocumentImpress"
+ next i
+ for i=1 to 8
+ Kontext "DocumentImpress"
+ gMouseClick 30,30
+ EditSelectAll
+ WaitSlot (1000)
+ FormatNumberingBulletsDraw
+ Kontext
+ Active.SetPage TabNumerierungsart
+ Kontext "TabNumerierungsart"
+ Auswahl.TypeKeys "<Right>", i
+ TabNumerierungsart.OK
+ Kontext "DocumentImpress"
+ next i
+ for i=1 to 8
+ Kontext "DocumentImpress"
+ gMouseClick 30,30
+ EditSelectAll
+ FormatNumberingBulletsDraw
+ Kontext
+ Active.SetPage TabNumerierungsart
+ Kontext "TabNumerierungsart"
+ Auswahl.TypeKeys "<Right>", i
+ TabNumerierungsart.OK
+ Kontext "DocumentImpress"
+ next i
+ WaitSlot (3000)
+ for i=1 to 29
+ WaitSlot (3000)
+ FormatNumberingBulletsDraw
+ WaitSlot (3000)
+ Kontext
+ Active.SetPage TabGrafiken
+ Kontext "TabGrafiken"
+ sleep 1
+ Auswahl.TypeKeys "<Right>", i
+ TabGrafiken.OK
+ Kontext "DocumentImpress"
+ next i
+
+ gMouseClick 90,90
+
+ Call hCloseDocument
+
+endcase 'tiFormatAufzaehlungszeichen
diff --git a/testautomation/graphics/optional/includes/global/g_group.inc b/testautomation/graphics/optional/includes/global/g_group.inc
new file mode 100644
index 000000000000..a11b809355ce
--- /dev/null
+++ b/testautomation/graphics/optional/includes/global/g_group.inc
@@ -0,0 +1,107 @@
+'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
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* Owner : wolfram.garten@oracle.com
+'*
+'* short description :
+'*
+'*********************************************************************
+' #1 tiGruppierung
+'\********************************************************************
+
+testcase tiGruppierung
+ Dim PosX 'Variable fuer PositionX
+
+ Call hNewDocument
+ Call sSelectEmptyLayout '/// new document ///'
+ sleep 3
+ Kontext "DocumentImpress"
+ sleep 2
+ hRechteckErstellen (20,20,40,40) '/// create rectangle ///'
+ sleep 1
+ hRechteckErstellen (60,60,70,10) '/// create 2nd rectangle ///'
+ sleep 1
+ hRechteckErstellen (50,90,70,40) '/// create 3rd rectangle ///'
+ sleep 1
+ Printlog "- Created 3 rectangles for group testing"
+ gMouseClick (50,50) '/// Put the mouse-marker in the middle of the screen ///'
+ EditSelectAll '/// select all rectangles ///'
+ if (gApplication = "DRAW") then
+ hOpenContextMenu
+ sleep(2)
+ hMenuSelectNr(12) ' Select "Group"
+ sleep(2)
+ else
+ FormatGroupDraw '/// open context menue and group rectangles ///'
+ endif
+ sleep 1
+ Printlog "- Get position and dimensions of elements"
+ ContextPositionAndSize '/// get dimensions of group ///'
+ sleep 1
+ Kontext
+ Active.SetPage TabPositionAndSize
+ Kontext "TabPositionAndSize"
+ sleep 1
+ PosX=PositionX.GetText
+ TabPositionAndSize.OK
+ sleep 1
+ Kontext "DocumentImpress"
+ gMouseClick 35,35
+ sleep 1
+ hTypeKeys "<F3>" '/// entering group using key "F3" ///'
+ sleep 3
+ try
+ EditCut '/// cut rectangle out of document ///'
+ sleep 1
+ Warnlog "- Entering the group, no object within the group should have been selected"
+ catch
+ Printlog "- entered group, nothing selected"
+ endcatch
+ gMouseClick (35,35)
+ gMouseMove (30,30,60,60)
+ sleep 1
+ Printlog "- Exit group"
+' DocumentImpress.OpenContextMenu '/// leave group, compare dimensions ///'
+' sleep 1
+' hMenuSelectNr (13)
+ hTypeKeys "<mod1 F3>" '/// exit group using key "strg F3" ///'
+ ' would be better to call the slot TBO!
+ ContextPositionAndSize
+ sleep 1
+ Kontext
+ Active.SetPage TabPositionAndSize
+ Kontext "TabPositionAndSize"
+ sleep 1
+ if PosX = PositionX.GetText then
+ Warnlog "- No change in position for X axis, even we changed position of 1 object within the group"
+ TabPositionAndSize.OK
+ else
+ Printlog "- Moving within the group works"
+ TabPositionAndSize.OK
+ end if
+ Call hCloseDocument '/// close document ///'
+endcase
diff --git a/testautomation/graphics/optional/includes/global/g_imagemap.inc b/testautomation/graphics/optional/includes/global/g_imagemap.inc
new file mode 100644
index 000000000000..de53fdb6f647
--- /dev/null
+++ b/testautomation/graphics/optional/includes/global/g_imagemap.inc
@@ -0,0 +1,159 @@
+'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
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* Owner : wolfram.garten@oracle.com
+'*
+'* short description :
+'*
+'**************************************************************************************
+' #1 tEditImageMap
+' #1 tEditImageMapProperties
+'\*************************************************************************************
+
+testcase tEditImageMap
+ Call hNewDocument '/// new document ///'
+ EditImageMap '/// edit image map ///'
+ Kontext "ImageMapEditor"
+ sleep 1
+ if ImageMapEditor.Exists (2) then '/// test dialog controls ///'
+ printlog "ImageMap editor exists"
+ DialogTest ( ImageMapEditor )
+ try
+ ImageMapEditor.Close
+ Printlog "ImageMap closed"
+ catch
+ EditImageMap
+ Printlog "ImageMap closed using the edit-menu entry"
+ endcatch
+ else
+ sleep 2
+ DialogTest ( ImageMapEditor )
+ try
+ ImageMapEditor.Close
+ Printlog "ImageMap closed"
+ catch
+ EditImageMap
+ Printlog "ImageMap closed using the edit-menu entry"
+ endcatch
+ end if
+ Call hCloseDocument '/// close document ///'
+
+endcase 'tEditImageMap
+'------------------------------------------------------------------------------------------------------------------------------------
+testcase tEditImageMapProperties
+
+ qaerrorlog "test not yet ready."
+ goto endsub
+ Call hNewDocument '/// new document ///'
+ InsertGraphicsFromFile '/// Insert a graphic and select it ///'
+ sleep (1)
+ Kontext "GrafikEinfuegenDlg"
+ sleep (2)
+ Dateiname.SetText ConvertPath (gTesttoolPath + "graphics\required\input\SaveAsPicture\SaveAsPicture.pcx")
+ sleep (2)
+ Oeffnen.Click
+ sleep (2)
+ EditImageMap '/// Open the image map dialog ///'
+ Kontext "ImageMapEditor"
+ sleep (1)
+ if ImageMapEditor.Exists (2) then '/// test dialog controls ///'
+ printlog "ImageMap editor exists"
+ else
+ warnlog "Something is wrong, the Imagemap didn't show up."
+ end if
+
+ Ellipse.Click '/// Insert an 'image map' object ///'
+ Dokument.MouseDown 50,50
+ Dokument.MouseMove 50,50,10,10
+ Dokument.MouseUp 10,10
+
+ Eigenschaften.Click '/// Click on the properties icon to open up the properties for the Object ///'
+ kontext "ImageMapHyperlink"
+ sleep (1)
+ if ImageMapHyperlink.Exists (2) then
+ printlog "ImageMapHyperlink (properties) editor exists"
+ else
+ warnlog "Something is wrong, the ImageMapHyperlink (properties) didn't show up."
+ end if
+
+ URL.SetText "http://www.cnn.com" '/// Write some text in each field ///'
+ Frame.SetText "http://www.framed.com"
+ Objectname.SetText "This is a strange name: Huckillerry Bohaahw"
+ Alternativetext.SetText "Alternative, the only way to fly..."
+ Description.SetText "Just a Foney-text... or whatever it's called."
+ ImageMapHyperlink.Ok '/// Close the Properties-Dialogue with "Ok" ///'
+ kontext "ImageMapEditor"
+ Zuweisen.Click
+ sleep (1)
+ ImageMapEditor.Close
+
+ if gApplication = "DRAW" then
+ kontext "DocumentDraw"
+ else
+ kontext "DocumentImpress"
+ end if
+
+ EditImageMap '/// Check if what we wrote in the Properites-Dialogue still is visible."
+ Kontext "ImageMapEditor"
+ sleep (1)
+ if ImageMapEditor.Exists (2) then
+ printlog "ImageMap editor exists"
+ else
+ warnlog "Something is wrong, the ImageMap Editor didn't show up."
+ end if
+
+ Dokument.TypeKeys "<TAB>"
+ sleep (1)
+
+ Eigenschaften.Click '/// Click on the properties icon to open up the properties for the Object ///'
+ kontext "ImageMapHyperlink"
+ sleep (1)
+ if ImageMapHyperlink.Exists (2) then
+ printlog "ImageMapHyperlink (properties) editor exists"
+ else
+ warnlog "Something is wrong, the ImageMapHyperlink (properties) didn't show up."
+ end if
+
+ '/// Check if the entries we set before has remained the same, with one exception: cnn.com should now have a slash after it. ///'
+ if URL.GetText <> "http://www.cnn.com/" then warnlog "URL should have been: http://www.cnn.com/ . But was " + URL.GetText
+' if Frame.GetSelText <> "http://www.framed.com" then warnlog "Frame should have been: http://www.framed.com. But was " + Frame.GetSelText
+ if Objectname.GetText <> "This is a strange name: Huckillerry Bohaahw" then warnlog "Objectname. should have been: This is a strange name: Huckillerry Bohaahw. But was " + Objectname.GetText
+ if Alternativetext.GetText <> "Alternative, the only way to fly..." then warnlog "Alternativetext should have been: . But was " + Alternativetext.GetText
+ if Description.GetText <> "Just a Foney-text... or whatever it's called." then warnlog "Description. should have been: . But was " + Description.GetText
+ ImageMapHyperlink.Ok '/// Close the Properties-Dialogue ///'
+ sleep (1)
+
+ kontext "ImageMapEditor"
+ Zuweisen.Click
+ sleep (1)
+ ImageMapEditor.Close
+ sleep (1)
+
+ Call hCloseDocument '/// close document ///'
+
+endcase 'tEditImageMapProperties
+'------------------------------------------------------------------------------------------------------------------------------------
diff --git a/testautomation/graphics/optional/includes/global/g_insert.inc b/testautomation/graphics/optional/includes/global/g_insert.inc
new file mode 100644
index 000000000000..44d9030413ea
--- /dev/null
+++ b/testautomation/graphics/optional/includes/global/g_insert.inc
@@ -0,0 +1,1227 @@
+'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
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* Owner : wolfram.garten@oracle.com
+'*
+'* short description :
+'*
+'**************************************************************************************
+
+testcase tdInsertObjectOleObjects
+
+ Dim Zaehler as Integer
+ Dim i as integer
+ Dim a as integer
+ Dim Liste (100) as String
+
+ Liste (0) = 0
+ printlog " open application "
+ Call hNewDocument
+ printlog " Insert->Object->OLE Object... "
+ InsertObjectOLEObject
+ Kontext "OLEObjektInsert"
+ Zaehler = Objekttyp.GetItemCount
+
+ printlog " - there are: --"+Zaehler + "-- possible items to insert"
+
+ ' on lin & sol there are no additional OLE-Types, like on win ??!?!?!?!.
+ ' first letter is usuallay 'S' from 'Star...', but on windows exists 'Further Objects' as last type. this won't be used.
+ if (left(Objekttyp.GetItemText (Zaehler),1) <> left (Objekttyp.GetItemText (1),1)) then
+ PrintLog " "+Zaehler +": '"+Objekttyp.GetItemText (Zaehler) + "' WONT be inserted"
+ a = Zaehler -1
+ else
+ a = Zaehler
+ endif
+
+ printlog " insert every object type, except the one, that is the last with the first letter being different from the firts' object' letter "
+ for i = 1 to a
+ printlog "+ select object entry in list "
+ Objekttyp.Select i
+ sleep 2
+ PrintLog " "+i+": '"+Objekttyp.GetSelText + "' will be inserted"
+ printlog "+ leave dialog 'Insert OLE Object' with OK "
+ OLEObjektInsert.OK
+ sleep 2
+ printlog "+ leave edit mode by typing key [Escape] "
+ hTypeKeys "<escape>"
+ printlog "+ Edit -> Select All "
+ EditSelectAll
+ sleep 2
+ printlog "+ Delete object by typing key [Delete] "
+ hTypeKeys "<DELETE>"
+ sleep 2
+ printlog "+ Insert->Object->OLE Object... "
+ InsertObjectOLEObject
+ Kontext "OLEObjektInsert"
+ next i
+
+ printlog "+ leave dialog 'Insert OLE Object' with CANCEL "
+ OLEObjektInsert.Cancel
+ sleep 1
+ printlog " close application "
+ Call hCloseDocument
+
+endcase 'tdInsertObjectOleObjects
+
+'-------------------------------------------------------------------------------
+testcase tInsertFloatingFrame
+
+ dim iWaitIndex as integer
+
+ if (gApplication = "IMPRESS") then
+ ExtensionString = "odp"
+ else
+ ExtensionString = "odg"
+ end if
+
+ printlog " open application "
+ Call hNewDocument
+ printlog " Insert->Floating Frame... "
+ InsertFloatingFrame
+ Kontext "TabEigenschaften"
+ printlog " set 'name' to something "
+ FrameName.SetText "StarDivision Home"
+ printlog " set 'Contents' to 'graphics\\input\\leer.od?' "
+ Inhalt.SetText ConvertPath (gTesttoolPath + "graphics\required\input\leer." + ExtensionString)
+ printlog " close dialog 'Floating Frames Properties' with OK "
+ TabEigenschaften.OK
+ iWaitIndex = 0
+ do while TabEigenschaften.Exists AND iWaitIndex < 10
+ sleep (1)
+ iWaitIndex = iWaitIndex + 1
+ loop
+ ' gMouseMove 10,10,90,90
+ printlog " the object should be selected by default now "
+ try
+ printlog " Format->Position And Size "
+ ContextPositionAndSize
+ Kontext
+ Active.SetPage TabPositionAndSize
+ Kontext "TabPositionAndSize"
+ If (PositionY.GetText = "") Then
+ Warnlog "No position for frame available ?!"
+ endif
+ printlog " close dialog with OK "
+ TabPositionAndSize.OK
+ catch
+ Warnlog "- Insert Floating Frame did not work, there is nothing in the document?"
+ endcatch
+ printlog " delete object by typing Key [Delete] "
+ hTypekeys "<DELETE>"
+ sleep 2
+ kontext
+ if (messagebox.exists (5)) then
+ printlog "messageb: " + messagebox.gettext
+ messagebox.cancel
+ else
+ qaErrorLog "Messagebox missing about changes in inserted document! #103343# 6.y"
+ endif
+ sleep 2
+ printlog " close application "
+ Call hCloseDocument
+
+endcase 'tInsertFloatingFrame
+
+'-------------------------------------------------------------------------------
+testcase tInsertFields
+
+ dim sTemp as string
+ dim sFile as string
+ dim i as integer
+
+ if (gApplication = "IMPRESS") then
+ ExtensionString = "odp"
+ else
+ ExtensionString = "odg"
+ end if
+
+ Call hNewDocument
+ printlog " new document "
+
+ printlog " open 'tools->options' and set first/last name and email adress on the page 'StarOffice->UserData' "
+ ToolsOptions
+ hToolsOptions ("STAROFFICE","USERDATA")
+ VorName.SetText "Garfield"
+ ZuName.SetText "Peanuts"
+ EMail.SetText "recumbent@oracle.com"
+ Kontext "ExtrasOptionenDlg"
+ ExtrasOptionenDlg.OK
+
+ printlog " every item from menue 'Insert->Fields' is inserted, and the keys [Strg]+[A], [Delete] are pressed "
+ InsertFieldsDateFix
+ printlog " (date fix) "
+ EditSelectAll
+ hTypeKeys "<DELETE>"
+
+ InsertFieldsDateVariable
+ printlog " (date variable) "
+ EditSelectAll
+ hTypeKeys "<DELETE>"
+
+ InsertFieldsTimeFix
+ printlog " (time fix)"
+ EditSelectAll
+ hTypeKeys "<DELETE>"
+
+ InsertFieldsTimeVariable
+ printlog " (time variable) "
+ EditSelectAll
+ hTypeKeys "<DELETE>"
+
+ InsertFieldsPageCountDraw
+ printlog " (page count)"
+ EditSelectAll
+ hTypeKeys "<DELETE>"
+
+ InsertFieldsAuthorDraw
+ printlog " (author) "
+ printlog "+ additional test for author "
+ printlog "+ it has to tbe 'Garfield Peanuts' "
+ hTypeKeys "<F2>"
+ EditSelectAll
+ EditCopy
+ sTemp = GetClipboard()
+ if (sTemp <> "Garfield Peanuts") then
+ Warnlog "wrong author; expected: 'Garfield Peanuts' is: '" + sTemp + "'"
+ else
+ Printlog "Author is: '" + sTemp + "'"
+ endif
+ hTypeKeys "<Escape><Escape>"
+ printlog "deleting content"
+ EditSelectAll
+ hTypeKeys "<DELETE>"
+
+ printlog "+ additional test for pagenumber "
+ for i = 1 to 2
+ InsertFieldsPageNumberDraw
+ printlog "Inserting page number. It has to be '1' and should remain the same when we insert a new slide "
+ hTypeKeys "<F2>"
+ EditSelectAll
+ EditCopy
+ sTemp = GetClipboard()
+ if (sTemp <> right(str(i),1) ) then
+ if sTemp = 2 then
+ warnlog "Wrong number; expected it to still be: '1' but was: '" + sTemp + "'"
+ else
+ printlog "Good. Number is: '" + sTemp + "'"
+ endif
+ else
+ printlog "Good. Number is: '" + sTemp + "'"
+ endif
+ hTypeKeys "<Escape><Escape>"
+ EditSelectAll
+ hTypeKeys "<DELETE>"
+ printlog " Insert->Slide "
+ InsertSlide
+ sleep 2
+ next i
+
+ printlog "And one try when we switch slides manually, deleting slides to start."
+ EditDeleteSlide
+ EditDeleteSlide
+
+ for i = 1 to 2
+ InsertFieldsPageNumberDraw
+ printlog " (page number) "
+ printlog "+ additional test for pagenumber "
+ printlog "+ it has to change when we insert a new slide and press pagedown "
+ hTypeKeys "<F2>"
+ EditSelectAll
+ EditCopy
+ sTemp = GetClipboard()
+ if i > 1 then
+ if (sTemp <> right(str(i),1) ) then
+ warnlog "Wrong number; expected: '" + i + "' and it was: '" + sTemp + "'"
+ else
+ printlog "Good. We expected number: '" + i + "' and it was number: '" + sTemp + "'"
+ endif
+ else
+ if (sTemp <> right(str(i),1) ) then
+ warnlog "Wrong number; expected: '" + i + "' and it was: '" + sTemp + "'"
+ else
+ printlog "Good. We expected number: '" + i + "' and it was number: '" + sTemp + "'"
+ endif
+ endif
+ hTypeKeys "<Escape><Escape>"
+ EditSelectAll
+ hTypeKeys "<DELETE>"
+ printlog " Insert->Slide "
+ InsertSlide
+ hTypeKeys "<PAGEDOWN>"
+ sleep 2
+ next i
+ printlog "Additional test for Page Count:"
+ InsertFieldsPageCountDraw
+ hTypeKeys "<F2>"
+ EditSelectAll
+ EditCopy
+ sTemp = GetClipboard()
+ if sTemp <> "3" then
+ warnlog "Wrong page count detected!"
+ else
+ printlog "Page count " & sTemp & " was expected."
+ endif
+ hTypeKeys "<Escape><Escape>"
+
+ printlog "checking of page count changes if slide is inserted"
+ InsertSlide
+ hTypeKeys "<PAGEUP>"
+ EditSelectAll
+ hTypeKeys "<F2>"
+ EditSelectAll
+ EditCopy
+ sTemp = GetClipboard()
+ if sTemp <> "4" then
+ warnlog "Wrong page count detected!"
+ else
+ printlog "Page count " & sTemp & " was expected and updated correctly."
+ endif
+
+ hTypeKeys "<Escape><Escape>"
+ printlog "deleting all"
+ EditSelectAll
+ hTypeKeys "<DELETE>"
+
+ InsertFieldsFileName
+ printlog " (file name) "
+ printlog "+ additional test for filename "
+ printlog "+ save file as " + gOfficePath + "user\\work\\fields.od ?"
+ sFile = ConvertPath (gOfficePath + "user\work\fields"
+ if FileExists(sFile + "." + ExtensionString) then
+ kill (sFile + "." + ExtensionString)
+ end if
+
+ hFileSaveAsKill (sFile)
+ sleep 5
+ hTypeKeys "<F2>"
+ EditSelectAll
+ EditCopy
+ sTemp = GetClipboard()
+
+ if (sTemp <> sFile) then
+ Warnlog "wrong author; expected: '" + sFile + "' is: '" + sTemp + "'"
+ else
+ Printlog "Author is: '" + sTemp + "'"
+ end if
+
+ hTypeKeys "<Escape><Escape>"
+ EditSelectAll
+ hTypeKeys "<DELETE>"
+
+ printlog " close application "
+ hCloseDocument
+
+endcase 'tInsertFields
+
+'-------------------------------------------------------------------------------
+testcase tdInsertSnapPoint_Line
+ qaerrorlog "Disabled SnappPointLine test, because of unpredictable mouse moves (07/2002 TBO)"
+ goto endsub
+
+ Dim Wert1 as string
+ Dim Wert2 as string
+ dim sGridArea as string ' holds the old value from the options
+ dim i as integer
+ dim z as integer
+ dim itemp as integer
+ dim iState as integer
+ dim iPosition as integer
+
+ printlog " new document "
+ Call hNewDocument
+
+ printlog " the snap depends on the snap-grid in tools->options->draw->grid ...->snap range "
+ printlog "+ so i will modify the snap range to the maximum of 50 pixel, to be safe, i hope :-) "
+ printlog " Tools->Options "
+ ToolsOptions
+ printlog " select Grid tab page in application "
+ Select Case Ucase(gApplication)
+ case "DRAW" : hToolsOptions ("Drawing","GRID")
+ case "IMPRESS" : hToolsOptions ("IMPRESS","GRID")
+ end select
+ sGridArea = fangenFangBereich.GetText
+ printlog " set metric field 'Snap Range' to Maximum "
+ fangenFangBereich.ToMax
+ Kontext "ExtrasOptionenDlg"
+ printlog " close options dialog with OK "
+ ExtrasOptionenDlg.OK
+
+ for i = 1 to 3
+ printlog " new document "
+ Call hNewDocument
+
+ printlog " ContextMenu: Insert SnapPointLine "
+ InsertSnapPointLine
+ Kontext "NeuesFangobjekt"
+ printlog "+ check checkbox 'Type: Point' "
+ select case i
+ case 1: printlog "------- vertical Snap Object"
+ Vertikal.Check
+ case 2: printlog "------- horizontal Snap Object"
+ Horizontal.Check
+ case 3: printlog "------- Point Snap Object"
+ Punkt.Check
+ end select
+ printlog "+ set Metric Field 'Position X' to 5 and get entry from field for further reference "
+ if (1 AND i) then
+ X.SetText "5"
+ Wert1=X.GetText
+ endif
+ printlog "+ set Metric Field 'Position Y' to 5 and get entry from field for further reference "
+ if (2 AND i) then
+ Y.SetText "5"
+ Wert2=Y.GetText
+ else
+ Wert2=Wert1
+ endif
+ sleep 2
+ printlog "+ close dialog 'New Snap Object' with OK "
+ NeuesFangobjekt.OK
+ Printlog "SnapPoint x: '"+Wert1+"', y: '"+Wert2+"' created"
+ sleep 2
+
+ printlog " view->Zoom... "
+ ViewZoom
+ Kontext "Massstab"
+ printlog "+ check radiobutton '75%' "
+ Vergroesserung75.Check
+ printlog "+ close dialog 'Zoom' with OK "
+ Massstab.OK
+
+ printlog " create a rectangle "
+ Call hRechteckErstellen (27,27,80,80)
+ sleep 3
+ printlog " Moove rectangle to test snapping: "
+ printlog "+ Format->Position and SIze... "
+ ContextPositionAndSize
+ Kontext
+ printlog "+ select tabpage 'Position and Size' on dialog 'Position and Size' "
+ Active.SetPage TabPositionAndSize
+ Kontext "TabPositionAndSize"
+ printlog "+ enter saved text into metricfields into 'Position X' and 'Position Y' "
+ printlog "+ press more button on metric fields 'Position X' and 'Position Y' "
+ if (1 AND i) then
+ PositionX.SetText Wert1
+ sleep 1
+ PositionX.More
+ endif
+ if (2 AND i) then
+ PositionY.SetText Wert2
+ sleep 1
+ PositionY.More
+ endif
+ printlog "+ close dialog 'Position and Size' with OK "
+ TabPositionAndSize.OK
+ sleep 2
+
+ printlog " move rectangle "
+ iState = 0
+ for z = 1 to 100
+ gmousemove2 z,z
+ try
+ iTemp = getmousestyle
+ catch
+ qaerrorlog "OOo-Application was not on top all applications - please move the testtool to the back!"
+ endcatch
+ if ((0 = iState) and (6 = iTemp)) then
+ iState = 1 ' found object
+ iPosition = z
+ printlog "found: " + z
+ endif
+ if ((1 = iState) and (6 <> iTemp)) then
+ iState = 2 ' left object
+ iPosition = (fix (z - iPosition) / 2) + iPosition
+ printlog "found: " + z
+ endif
+ next z
+ if (2 <> iState) then
+ qaerrorlog "couldn't find object - the following action may fail..."
+ iPosition = 60
+ endif
+ gMousemove (iPosition,iPosition,iPosition + 1,iPosition + 1)
+ sleep 4
+ printlog " check if object snapped back to snap point "
+ ContextPositionAndSize
+ Kontext
+ if active.exists (5) then
+ Active.SetPage TabPositionAndSize
+ else
+ warnlog "Couldn't switch tabpage (2), because object was deselected"
+ hTypeKeys "<TAB>"
+ ContextPositionAndSize
+ Kontext
+ Active.SetPage TabPositionAndSize
+ endif
+ Kontext "TabPositionAndSize"
+ if (1 AND i) then
+ if (PositionX.GetText <> Wert1) Then
+ WarnLog "(1) Rectangle not aligned to snap point. Soll X= "+ Wert1 + " IST= " + PositionX.GetText
+ else
+ PrintLog "(1) Rectangle aligned to snap point. Soll= " + Wert1 + " Ist= " + PositionX.GetText
+ end if
+ end if
+ if (2 AND i) then
+ if (PositionY.GetText <> Wert2) Then
+ WarnLog "(1) Rectangle not aligned to snap point. Soll Y= "+ Wert2 + " IST= " + PositionY.GetText
+ else
+ PrintLog "(1) Rectangle aligned to snap point. Soll= " + Wert2 + " Ist= " + PositionY.GetText
+ end if
+ end if
+ TabPositionAndSize.OK
+ sleep 1
+
+ printlog " close application "
+ Call hCloseDocument
+ next i
+
+ ToolsOptions
+ Select Case Ucase(gApplication)
+ case "DRAW" : hToolsOptions ("Drawing","GRID")
+ case "IMPRESS" : hToolsOptions ("IMPRESS","GRID")
+ end select
+ fangenFangBereich.SetText sGridArea
+ Kontext "ExtrasOptionenDlg"
+ ExtrasOptionenDlg.OK
+
+ printlog " close application "
+ Call hCloseDocument
+
+endcase 'tdInsertSnapPoint_Line
+
+'-------------------------------------------------------------------------------
+testcase tdInsertFile
+
+ dim sTemp as string
+ dim sFile as string
+ dim i as integer
+ dim iCut as integer
+
+ if (gApplication = "IMPRESS") then
+ ExtensionString = "odp"
+ else
+ ExtensionString = "odg"
+ end if
+
+ printlog " open application "
+ Call hNewDocument
+ sleep 1
+ printlog "<b> take a text file without .txt extension, to test file regcognition </b>"
+ printlog " Insert->File "
+ InsertFileDraw
+ sleep 1
+ Kontext "OeffnenDlg"
+ printlog " use file: graphics\\optional\\input\\einfg.ini"
+ sFile = ConvertPath (gTesttoolPath + "graphics\required\input\einfg.ini")
+ Printlog "file: '" + sFile + "'"
+ Dateiname.SetText (sFile)
+ printlog " click button 'Insert' "
+ Oeffnen.Click
+ Kontext "SeitenObjekteEinfuegen"
+ sleep 3
+ printlog " expected: dialog 'Insert Slides/Objects' "
+ if (SeitenObjekteEinfuegen.Exists (5) = False) Then
+ warnlog "1 - Dialog 'Insert Slides/Objects' does not exist :-("
+ kontext
+ ' Text File Path - do it again :-(
+ if active.exists (5) then
+ printlog "ACTIVE: "+active.gettext
+ active.ok
+ ' will be wrong next time, bzw support it tooo
+ printlog "Have to select the text filter manually, to get file loaded"
+ InsertFileDraw
+ sleep 1
+ Kontext "OeffnenDlg"
+ Dateiname.SetText ConvertPath (gTesttoolPath + "graphics\required\input\einfg.ini")
+ Select Case Ucase(gApplication)
+ case "DRAW"
+ DateiTyp.Select 6 ' hopefully TEXT!
+ case "IMPRESS"
+ DateiTyp.Select 11 ' hopefully TEXT!
+ end select
+ printlog "selected filter: "+DateiTyp.GetSelText
+ Oeffnen.Click
+ kontext
+ if active.exists (5) then
+ printlog "ACTIVE: "+active.gettext
+ active.ok
+ warnlog "failed to open file? :-("
+ endif
+ ' Text File Path - dialog is there :-(
+ else
+ Kontext "AsciiFilterOptionen"
+ If AsciiFilterOptionen.Exists(3) then
+ printlog "NO, not loaded (yet): we are in ASCII filter dialog :-("
+ AsciiFilterOptionen.OK
+ else
+ warnlog "Now there is a problem :-( 1"
+ endif
+ endif
+ sleep 3
+ Kontext "SeitenObjekteEinfuegen"
+ if SeitenObjekteEinfuegen.Exists (5) <> TRUE then
+ warnlog "Now there is a problem :-( 2"
+ else
+ Printlog "InsertFile Text-dialogue came up :-) (finaly)"
+ SeitenObjekteEinfuegen.OK
+ sleep 3
+ endif
+ ' as expected, file got regcognized and i can select the slides
+ else ' the good way with ' little strange dialog
+ '*SeitenObjekteEinfuegen DLG_INSERT_PAGES_OBJS
+ 'DeleteUnusedBackgrounds sd:CheckBox:DLG_INSERT_PAGES_OBJS:CBX_CHECK_MASTERS
+ Printlog "1: '" + InsertObjectsList.GetSelText + "'"
+ printlog " leave dialog 'Insert Slides/Objects' with OK "
+ SeitenObjekteEinfuegen.OK
+ sleep 3
+ end if
+ printlog " select all inserted text, by typing [Strg]+[A] "
+ EditSelectAll
+ try
+ printlog " Edit->Cut "
+ EditCut
+ catch
+ Warnlog "It seems there is nothing inserted :-("
+ endcatch
+ sleep 1
+
+ printlog "<b> use a presentation file to test extended capability of dialog </b>"
+ printlog " Insert->File "
+ InsertFileDraw
+ sleep 1
+ Kontext "OeffnenDlg"
+ printlog " use file: graphics\required\input\diashow.odp"
+ sFile = ConvertPath (gTesttoolPath + "graphics\required\input\diashow.odp")
+ Printlog "file used : '" + sFile + "'"
+ Dateiname.SetText (sFile)
+ printlog " click button 'Insert' "
+ Oeffnen.Click
+ Kontext "SeitenObjekteEinfuegen"
+ sleep 3
+ printlog " expected: dialog 'Insert Slides/Objects' "
+ if (SeitenObjekteEinfuegen.Exists (5) = False) Then
+ warnlog "unexpected error :-("
+ else ' the good way with ' little strange dialog
+ '*SeitenObjekteEinfuegen DLG_INSERT_PAGES_OBJS
+ 'DeleteUnusedBackgrounds sd:CheckBox:DLG_INSERT_PAGES_OBJS:CBX_CHECK_MASTERS
+ InsertObjectsList.TypeKeys "<up>"
+ sTemp = InsertObjectsList.GetSelText
+ if (gPlatgroup <> "unx") then ' to get rid of file://[/] on unix the last '/' belongs too the file path :-(
+ iCut = 8
+ else
+ iCut = 7
+ endif
+ if (fConvertBackslashToSlash (sFile) = right(sTEmp, len(sTemp)-(iCut))) then
+ Printlog " 0: '" + sTemp + "'"
+ else
+ Warnlog "different : '" + fConvertBackslashToSlash (sFile) + "' than '" + right(sTEmp, len(sTemp)-(iCut)) + "'"
+ endif
+ InsertObjectsList.TypeKeys "<+>"
+ sleep 10
+ for i = 1 to 4
+ InsertObjectsList.TypeKeys "<down>"
+ sTemp = InsertObjectsList.GetSelText
+ if (right(sTemp,1) <> right (str(i),1)) then
+ warnlog " " + i + ": '" + sTemp + "' is not as expected :-("
+ else
+ Printlog " " + i + ": '" + sTemp + "'"
+ endif
+ next i
+ printlog " leave dialog 'Insert Slides/Objects' with OK "
+ SeitenObjekteEinfuegen.OK
+ sleep 3
+ end if
+ kontext "Messagebox"
+ printlog " in draw pops a mesbox up, about adopting format for objects, too [yes no cancel] -> say NO printlog "
+ if messagebox.exists (5) then
+ printlog "active: '" + messagebox.gettext + "'"
+ messagebox.no
+ endif
+ printlog " select the inserted slide content on the last slide, by typing [End] [Strg]+[A] "
+ hTypeKeys "<end>"
+ EditSelectAll
+ try
+ printlog " Edit->Cut "
+ EditCut
+ catch
+ Warnlog "It seems there is nothing inserted :-("
+ endcatch
+ sleep 1
+
+ printlog " close application "
+ Call hCloseDocument
+
+endcase 'tdInsertFile
+
+'-------------------------------------------------------------------------------
+testcase tInsertGraphics
+
+ dim i as integer
+
+ printlog " open application "
+ Call hNewDocument
+ printlog " Insert->Graphics "
+ InsertGraphicsFromFile
+ Kontext "GrafikEinfuegenDlg"
+ sleep 2
+ printlog " check number of graphics filter in dialog, should be 27 "
+ i = Dateityp.GetItemCount
+ if (i <> 27) Then
+ Warnlog "- Number of filters changed. Should be = 27 / but it is = '" + i + "'"
+ endif
+ sleep 1
+ printlog " set file name to global\\input\\graf_inp\\enter.bmp"
+ Dateiname.SetText ConvertPath (gTesttoolPath + "global\input\graf_inp\enter.bmp")
+ sleep 3
+ printlog " check checkbox 'Preview' "
+ Preview.Check
+ sleep 5
+ printlog " click button 'open' "
+ Oeffnen.Click
+ sleep 5
+ Kontext "Active"
+ if Active.Exists Then
+ Warnlog Active.GetText
+ Active.OK
+ end if
+ try
+ printlog " to check if something was inserted, try Edit->Cut and Edit->Paste "
+ EditCut
+ sleep 3
+ EditPaste
+ sleep 3
+ catch
+ WarnLog " Nothing was created, so EditCut does not work ?"
+ endcatch
+ sleep 2
+ printlog " close application "
+ Call hCloseDocument
+ 'TODO: TBO: Check if link graphic would work!"
+
+endcase 'tInsertGraphics
+
+'-------------------------------------------------------------------------------
+
+testcase tInsertObjectFormula
+
+ printlog " open application "
+ Call hNewDocument
+ printlog " put '1+2+3+4+5+6+7+8+9=x' into the Clipboard "
+ SetClipboard "1+2+3+4+5+6+7+8+9=x"
+ printlog " Insert->Object->Formula "
+ InsertObjectFormulaDraw
+ sleep 2
+ printlog " check if window 'Selection' exists -> if not ERROR & open window with View->Selection "
+ Kontext "AuswahlMath"
+ if AuswahlMath.Exists Then
+ printlog " - selection is visible :-) "
+ else
+ if gApplication = "IMPRESS" then
+ Kontext "DocumentImpress"
+ DocumentImpress.UseMenu
+ hMenuSelectNr(3)
+ hMenuItemCheck(6)
+ else
+ Kontext "DocumentDraw"
+ DocumentDraw.UseMenu
+ hMenuSelectNr(3)
+ hMenuItemCheck(6)
+ endif
+ endif
+ 'ViewSelection deactivated due to problems with Slot
+ printlog " - selection wasn't visible :-( "
+ Kontext "AuswahlMath"
+ if (AuswahlMath.Exists = FALSE) Then
+ warnlog " - selection is STILL not visible :-) "
+ endif
+ sleep 5
+ Kontext "AuswahlMath"
+ sleep 3
+ if AuswahlMath.Exists Then
+ AuswahlMath.Close
+ printlog " put Clipboard into window 'Commands' with Edit->Paste "
+ if gApplication = "IMPRESS" then
+ Kontext "DocumentImpress"
+ DocumentImpress.UseMenu
+ hMenuSelectNr(2)
+ hMenuSelectNr(5)
+ else
+ Kontext "DocumentDraw"
+ DocumentDraw.UseMenu
+ hMenuSelectNr(2)
+ hMenuSelectNr(5)
+ endif
+ 'EditPaste deactivated due to problems with Slot
+
+ PrintLog "Formel: " + GetClipboardText + " placed into document"
+ else
+ Warnlog " Selection-window doesn't exist"
+ end if
+ gMouseClick 10,10
+ printlog " close application "
+ hCloseDocument
+
+endcase 'tInsertObjectFormula
+
+'-------------------------------------------------------------------------------
+testcase tInsertChart
+ qaerrorlog "Not yet ready."
+ goto endsub
+
+ dim sTemp as string
+
+ printlog " open application "
+ Call hNewDocument
+ printlog " Insert->Chart "
+ InsertChart
+ sleep 5
+ printlog " now to check we are in Chart mode, trie Insert->Title "
+ InsertTitle
+ Kontext "InsertTitleDialog"
+ printlog " type something in field 'Main Title' "
+ MainTitle.SetText "Koelner Dom Koelsch"
+ PrintLog MainTitle.GetText
+ printlog " Close dialog 'InsertTitleDialog' "
+ InsertTitleDialog.OK
+ printlog " click outside the chart, to get out of chart mode "
+ gMouseClick 10,10
+ printlog " check if the InsertTitle -entry is available, if yes, then it's a bug. If not, then it's ok "
+ try
+ InsertTitle
+ Kontext "InsertTitleDialog"
+ Warnlog "Edit mode of chart was not left :-("
+ InsertTitleDialog.Cancel
+ catch
+ Printlog "Edit mode of chart left :-)"
+ endcatch
+ printlog " go into edit mode of chart again, by typing [Tab][Return] "
+ hTypeKeys "<TAB><RETURN>"
+ printlog " now to check we are in Chart mode, trie Insert->Title "
+ InsertTitle
+ Kontext "InsertTitleDialog"
+ sTemp = MainTitle.GetText
+ if (sTemp <> "Koelner Dom Koelsch") then
+ Warnlog "Title changed :-( is: '" + sTemp + "'; should be: '" + "Koelner Dom Koelsch" + "'"
+ endif
+ InsertTitleDialog.Cancel
+ printlog " click outside the chart, to get out of chart mode "
+ gMouseClick 10,10
+
+
+ printlog " go into edit mode of chart again, by typing [Tab][Return] "
+ hTypeKeys "<TAB><RETURN>"
+ printlog " now to check we are in Chart mode, try Insert->Title "
+ InsertTitle
+ Kontext "InsertTitleDialog"
+ SubtitleCheck.Check
+ sTemp = MainTitle.GetText
+ if (sTemp <> "Koelner Dom Koelsch") then
+ Warnlog "Title changed :-( is: '" + sTemp + "'; should be: '" + "Koelner Dom Koelsch" + "'"
+ endif
+
+ printlog " type something in field 'Main Title' "
+ SubtitleTitle.SetText "This is the Subtitle-Title"
+ PrintLog SubtitleTitle.GetText
+ printlog " Close dialog 'InsertTitleDialog' "
+ InsertTitleDialog.OK
+ printlog " click outside the chart, to get out of chart mode "
+ gMouseClick 10,10
+
+
+ printlog " go into edit mode of chart again, by typing [Tab][Return] "
+ hTypeKeys "<TAB><RETURN>"
+ printlog " now to check we are in Chart mode, trie Insert->Title "
+ InsertTitle
+ Kontext "InsertTitleDialog"
+ XaxisCheck.Check
+ sTemp = SubtitleTitle.GetText
+ if (sTemp <> "This is the Subtitle-Title") then
+ Warnlog "Title changed :-( is: '" + sTemp + "'; should be: '" + "This is the Subtitle-Title" + "'"
+ endif
+
+ sTemp = MainTitle.GetText
+ if (sTemp <> "Koelner Dom Koelsch") then
+ Warnlog "Title changed :-( is: '" + sTemp + "'; should be: '" + "Koelner Dom Koelsch" + "'"
+ endif
+
+ printlog " type something in field 'X Axis Title' "
+ XaxisTitle.SetText "This is the X Axis -Title"
+ PrintLog XaxisTitle.GetText
+ printlog " Close dialog 'InsertTitleDialog' "
+ InsertTitleDialog.OK
+ printlog " click outside the chart, to get out of chart mode "
+ gMouseClick 10,10
+
+
+ printlog " go into edit mode of chart again, by typing [Tab][Return] "
+ hTypeKeys "<TAB><RETURN>"
+ printlog " now to check we are in Chart mode, try Insert->Title "
+ InsertTitle
+ Kontext "InsertTitleDialog"
+ YaxisCheck.Check
+ sTemp = XaxisTitle.GetText
+ if (sTemp <> "This is the X Axis -Title") then
+ Warnlog "Title changed :-( is: '" + sTemp + "'; should be: '" + "This is the X Axis -Title" + "'"
+ endif
+
+ sTemp = SubtitleTitle.GetText
+ if (sTemp <> "This is the Subtitle-Title") then
+ Warnlog "Title changed :-( is: '" + sTemp + "'; should be: '" + "This is the Subtitle-Title" + "'"
+ endif
+
+ sTemp = MainTitle.GetText
+ if (sTemp <> "Koelner Dom Koelsch") then
+ Warnlog "Title changed :-( is: '" + sTemp + "'; should be: '" + "Koelner Dom Koelsch" + "'"
+ endif
+
+ if ZaxisCheck.IsChecked then
+ Warnlog "ZaxisTitle should not have been checked. Check why."
+ else
+ try
+ ZaxisTitle.SetText "This is the Z Axis -Title"
+ Warnlog "ZaxisTitle should not be writable at this moment."
+ catch
+ printlog "ZaxisTitle was not writable. Good."
+ endcatch
+ end if
+
+ printlog " type something in field 'Main Title' "
+ YaxisTitle.SetText "This is the Y Axis -Title"
+ PrintLog YaxisTitle.GetText
+ printlog " Close dialog 'InsertTitleDialog' "
+ InsertTitleDialog.OK
+ printlog " click outside the chart, to get out of chart mode "
+ gMouseClick 10,10
+
+ hTypeKeys "<TAB>"
+
+
+ printlog " go into edit mode of chart again, by typing [Tab][Return] "
+ hTypeKeys "<TAB><RETURN>"
+ printlog " now to check we are in Chart mode, trie Insert->Title "
+ InsertTitle
+ Kontext "InsertTitleDialog"
+ ' ZaxisCheck.Check
+ sTemp = YaxisTitle.GetText
+ if (sTemp <> "This is the Y Axis -Title") then
+ Warnlog "Title changed :-( is: '" + sTemp + "'; should be: '" + "This is the Y Axis -Title" + "'"
+ endif
+
+ sTemp = XaxisTitle.GetText
+ if (sTemp <> "This is the X Axis -Title") then
+ Warnlog "Title changed :-( is: '" + sTemp + "'; should be: '" + "This is the X Axis -Title" + "'"
+ endif
+
+ sTemp = SubtitleTitle.GetText
+ if (sTemp <> "This is the Subtitle-Title") then
+ Warnlog "Title changed :-( is: '" + sTemp + "'; should be: '" + "This is the Subtitle-Title" + "'"
+ endif
+
+ sTemp = MainTitle.GetText
+ if (sTemp <> "Koelner Dom Koelsch") then
+ Warnlog "Title changed :-( is: '" + sTemp + "'; should be: '" + "Koelner Dom Koelsch" + "'"
+ endif
+
+ printlog " type something in field 'X Axis Title' "
+ ' ZaxisTitle.SetText "This is the Z Axis -Title"
+ ' PrintLog ZaxisTitle.GetText
+ printlog " Close dialog 'InsertTitleDialog' "
+ InsertTitleDialog.OK
+ printlog " click outside the chart, to get out of chart mode "
+ gMouseClick 10,10
+
+
+ printlog " go into edit mode of chart again, by typing [Tab][Return] "
+ hTypeKeys "<TAB><RETURN>"
+ printlog " now to check we are in Chart mode, trie Insert->Title "
+ InsertTitle
+ Kontext "InsertTitleDialog"
+ sTemp = YaxisTitle.GetText
+ if (sTemp <> "This is the Y Axis -Title") then
+ Warnlog "Title changed :-( is: '" + sTemp + "'; should be: '" + "This is the Y Axis -Title" + "'"
+ endif
+
+ sTemp = XaxisTitle.GetText
+ if (sTemp <> "This is the X Axis -Title") then
+ Warnlog "Title changed :-( is: '" + sTemp + "'; should be: '" + "This is the X Axis -Title" + "'"
+ endif
+
+ sTemp = SubtitleTitle.GetText
+ if (sTemp <> "This is the Subtitle-Title") then
+ Warnlog "Title changed :-( is: '" + sTemp + "'; should be: '" + "This is the Subtitle-Title" + "'"
+ endif
+
+ sTemp = MainTitle.GetText
+ if (sTemp <> "Koelner Dom Koelsch") then
+ Warnlog "Title changed :-( is: '" + sTemp + "'; should be: '" + "Koelner Dom Koelsch" + "'"
+ endif
+
+ ' sTemp = ZaxisTitle.GetText
+ ' if (sTemp <> "This is the Z Axis -Title") then
+ ' Warnlog "Title changed :-( is: '" + sTemp + "'; should be: '" + "This is the Z Axis -Title" + "'"
+ ' endif
+
+ printlog " Close dialog 'InsertTitleDialog' "
+ InsertTitleDialog.OK
+
+ printlog " click outside the chart, to get out of chart mode "
+ gMouseClick 10,10
+ printlog " close application "
+ Call hCloseDocument
+
+endcase 'tInsertChart
+
+'----------------------------------------------------------------------------------------------------------------------------------------------------------
+testcase tInsertObjectPlugIn
+
+ dim i as integer
+ dim x as integer
+ dim bAble as boolean
+ dim sTemp as string
+
+ printlog " open application "
+ call hNewDocument
+ sleep 2
+ printlog " Insert->Object->Plug-in"
+ InsertObjectPlugIn
+ sleep 2
+ Kontext "PlugInEinfuegen"
+ printlog " click on button 'Browse...' "
+ Durchsuchen.Click
+ sleep 2
+ kontext "OeffnenDLG"
+ sleep 1
+ bAble = FALSE
+ x = Dateityp.GetItemCount
+ Printlog "-------TBO: print all entries from File-Type-List: "
+ for i = 1 to x
+ sTemp = Dateityp.GetItemText (i)
+ printlog "- - - - -: '"+ sTemp +"'"
+ if (inStr(sTemp, ".mov") > 0) then
+ bAble = True
+ Printlog "^^^^^^^^^^^^^^^^^^ contains a Apple QT plugin .mov :-) "
+ endif
+ next i
+ Printlog "---------------------------------------------------"
+ OeffnenDLG.cancel
+ Kontext "PlugInEinfuegen" ' :-)
+ printlog " if .mov files are regcognized, insert the folowing one; else cancel dialog!"
+ if bAble then
+ printlog "+ set field 'File/URL' to 'graphics\\input\\sample.mov' "
+ DateiUrl.SetText ConvertPath (gTesttoolPath + "graphics\required\input\sample.mov")
+ printlog "+ press button 'OK' to close dialog "
+ PlugInEinfuegen.OK
+ sleep 2
+ Kontext "Active"
+ if Active.Exists then
+ printlog Active.GetText
+ Active.OK
+ sleep 1
+ end if
+ printlog "+ click outside the inserted frame "
+ gMouseClick 30,30
+ try
+ printlog "+ check with 'Edit->Select all' and key [delete] if something was inserted "
+ EditSelectAll
+ hTypeKeys "<DELETE>"
+ catch
+ Warnlog " Nothing inserted which could be deleted"
+ endcatch
+ else
+ qaErrorLog "Not able to test the insertion of a plugin, because no ability to play .mov files is available :-("
+ PlugInEinfuegen.Cancel
+ endif
+ printlog " close application "
+ hCloseDocument
+
+endcase 'tInsertObjectPlugIn
+
+'-------------------------------------------------------------------------------
+testcase tInsertSpecialCharacter
+ qaerrorlog "tInsertSpecialCharacter outcommented due to unpredictable results"
+ goto endsub
+
+ Dim i as integer
+ Dim j as integer
+ Dim Zaehler as integer
+ Dim sSchriftType
+ Dim Zufall as Integer
+ dim sTemp as string
+
+ printlog " open application "
+ Call hNewDocument
+
+ printlog " insert a text frame with content "
+ hTextRahmenErstellen ("Who will read this?",30,30,80,80)
+ printlog "<b> Insert->Special Character... </b>"
+ InsertSpecialCharacterDraw
+ Kontext "Sonderzeichen"
+ printlog " select a character for every 'font' "
+ j = Schrift.GetItemCount
+ For i = 1 to j
+ Schrift.Select j
+ Zufall = Int((12*Rnd)+1)
+ printlog "+ to insert a character, randomize the type keys [Cursor Right] and press [Space] "
+ SchriftListe.TypeKeys "<RIGHT>" , Zufall
+ SchriftListe.TypeKeys "<SPACE>"
+ next i
+ sleep 1
+ printlog " press button [Delete] "
+ Loeschen.Click '----------------------------------- > NOTHING is inserted !!
+ sleep 1
+ try
+ printlog " tries to close dialog 'Special Characters' with OK "
+ Sonderzeichen.OK
+ Warnlog "Dialogue need not to be closeable, because nothing is selected :-("
+ catch
+ printlog " close dialog with 'Cancel' "
+ Sonderzeichen.Cancel
+ endcatch
+ sleep 1
+ printlog " select something with keys [Shift]+[Home] "
+ hTypeKeys "<SHIFT HOME>"
+ printlog " Edit->Copy "
+ EditCopy
+ sTemp = GetClipboardText
+ printlog " Compare the selected text with the one typed at the beginning - it has to be the same "
+ ' if (sTemp <> "Who will read this?") then
+ ' Warnlog "Hmm, there is something wrong! But what? :-( "
+ ' printlog "is: '" + sTemp + "'; should: '" + "Who will read this?" + "'"
+ ' endif
+ sleep 2
+ hTypeKeys "<end>"
+
+ ' printlog "<b> select a character for every 'font' </b>"
+ ' j = Schrift.GetItemCount
+ For i = 1 to j
+ printlog " Insert->Special Character... "
+ InsertSpecialCharacterDraw
+ Kontext "Sonderzeichen"
+ sleep 1
+ try
+ Schrift.Select i
+ catch
+ qaErrorLog("Sometimes this Timeout happens: " + i )
+ endcatch
+ Printlog "(" + i + "/" + j + "): '" + Schrift.GetSelText + "'"
+ sleep 1
+ Zufall = Int((256*Rnd)+1)
+ printlog "+ to insert a character, randomize the type keys [Cursor Right] and press [Space] "
+ SchriftListe.TypeKeys "<home>"
+ SchriftListe.TypeKeys "<RIGHT>" , Zufall
+ SchriftListe.TypeKeys "<SPACE>"
+ sleep 1
+ try
+ printlog " trie to close dialog 'Special Characters' with OK "
+ Sonderzeichen.OK
+ catch
+ printlog " close dialog with 'Cancel' "
+ Warnlog "Dialog was not closeable with OK :-("
+ Sonderzeichen.Cancel
+ endcatch
+ sleep 2
+ next i
+ printlog " select the inserted chars with keys with keys [Strg]+[End] + j-times [shift]+[right] "
+ hTypeKeys "<Mod1 end>"
+ hTypeKeys ("<shift left>", j)
+ printlog " Edit->Copy "
+ EditCut
+ printlog " now select the rest with keys [Shift]+[Home] "
+ hTypeKeys "<SHIFT HOME>"
+ printlog " Edit->Copy "
+ EditCopy
+ sTemp = GetClipboardText
+ printlog " Compare the selected text with the one typed at the beginning - it has to be the same "
+ if (sTemp <> "Who will read this?") then
+ qaerrorlog "is: '" + sTemp + "'; should: '" + "Who will read this?" + "'"
+ endif
+ sleep 2
+ hTypeKeys "<end>"
+
+ printlog "<b> Insert->Special Character... </b>"
+ InsertSpecialCharacterDraw
+ Kontext "Sonderzeichen"
+ sleep 3
+ ' printlog " select a character for every 'font' "
+ ' j = Schrift.GetItemCount
+ For i = 1 to j
+ Zufall = Int((256*Rnd)+1)
+ Schrift.Select i
+ sleep 5
+ Printlog "(" + i + "/" + j + "): '" + Schrift.GetSelText + "'; " + Zufall
+ sleep 3
+ printlog "+ to insert a character, randomize the type keys [Cursor Right] and press [Space] "
+ SchriftListe.TypeKeys "<RIGHT>" , Zufall
+ SchriftListe.TypeKeys "<SPACE>"
+ sleep 3
+ next i
+ sleep 1
+ try
+ printlog " tries to close dialog 'Special Characters' with OK "
+ Sonderzeichen.OK
+ catch
+ printlog " close dialog with 'Cancel' "
+ Warnlog "Dialogue was not closeable with OK :-("
+ Sonderzeichen.Cancel
+ endcatch
+ sleep 2
+ printlog " close application "
+ Call hCloseDocument
+
+endcase 'tInsertSpecialCharacter
+
+'-------------------------------------------------------------------------------
+testcase tInsertSpreadsheet
+
+ printlog " open application "
+ Call hNewDocument
+ sleep 3
+ printlog " Insert->Spreadsheet "
+ InsertSpreadsheetDraw
+ sleep 2
+ try
+ printlog " Spreadsheet is in edit mode per default "
+ printlog " Format->Sheet->Rename "
+ FormatSheetRename
+ Kontext "TabelleUmbenennen"
+ printlog " close dialog 'Rename Sheet' with OK "
+ TabelleUmbenennen.OK
+ catch
+ WarnLog "Spreadsheet is not in editmode :-( "
+ endcatch
+ printlog " delete spreadsheet OLE by typing [DELETE] (first click outside the spreadsheet!) "
+ gMouseClick (1,1)
+ hTypeKeys "<tab>"
+ sleep 3
+ hTypeKeys "<DELETE>"
+ sleep 2
+ printlog " close application "
+ hCloseDocument
+
+endcase 'tInsertSpreadsheet
+
+'-------------------------------------------------------------------------------
+
diff --git a/testautomation/graphics/optional/includes/global/g_line.inc b/testautomation/graphics/optional/includes/global/g_line.inc
new file mode 100644
index 000000000000..adc573a16e48
--- /dev/null
+++ b/testautomation/graphics/optional/includes/global/g_line.inc
@@ -0,0 +1,533 @@
+'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
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* Owner : wolfram.garten@oracle.com
+'*
+'* short description :
+'*
+'**************************************************************************************
+' #1 tiFormatLine
+' #1 tLineConnect
+'\*************************************************************************************
+testcase tiFormatLine
+
+ Dim ZaehlerStil
+ Dim ZaehlerFarbe
+ Dim ZaehlerTransp
+ Dim i 'Variable fuer Stil (Anzahl)
+ Dim j 'Variable fur Farbe (Anzahl)
+ Dim k 'Variable fuer Transparenz (Anzahl)
+ Dim l
+ Dim ZaehlerStilLinks
+
+ Call hNewDocument '/// New impress document
+ sleep 3
+ Call hRechteckErstellen (10,10,60,60) '/// create rectangle
+ sleep 2
+ FormatLine '/// open Format line dialog
+ Kontext
+ Active.SetPage TabLinie '///Open TabLine Tabpage
+ Kontext "TabLinie"
+ sleep 2
+ Stil.GetItemCount '/// Get item count for style ///'
+ Farbe.GetItemCount '/// Get item count for color ///'
+ Breite.More 1 '/// change value for ///'
+ ZaehlerStil = Stil.GetItemCount
+ ZaehlerFarbe = Farbe.GetItemCount
+
+ for i=1 to ZaehlerStil '/// Apply every style to the rectangle ///'
+ wait 10
+ Stil.Select i
+ wait 10
+ TabLinie.OK '/// Closing dialog with ok
+ ' Kontext "DocumentImpress"
+ FormatLine '///Open TabLine Tabpage
+ Kontext
+ Active.SetPage TabLinie
+ Kontext "TabLinie"
+ next i
+
+ for j=1 to ZaehlerFarbe '/// Apply every color to the rectangle///'
+ PrintLog "-- " + Farbe.GetSelText
+ wait 10
+ Farbe.Select j
+ wait 10
+ TabLinie.OK
+ ' Kontext "DocumentImpress"
+ FormatLine
+ Kontext
+ Active.SetPage TabLinie
+ Kontext "TabLinie"
+ next j
+ Breite.More 3 '/// change Breite ///'
+ Breite.Less 2
+ for k=1 to 6
+ Transparenz.More 1 '/// change tranparence///'
+ next k
+ TabLinie.OK
+ '---------------------------------------
+ sleep 2
+ EditSelectAll '/// Select all objects in document ///'
+ sleep 2
+ hTypeKeys "<DELETE>" '/// Delete objects ///'
+ sleep 2
+ FormatLine
+
+ Kontext
+ Active.SetPage TabLinie '/// TabLine ///'
+ Kontext "TabLinie"
+ StilLinks.GetItemCount
+ ZaehlerStilLinks=StilLinks.GetItemCount
+ for l=1 to ZaehlerStilLinks '/// Apply all line end styles///'
+ wait 10
+ if EndenSynchronisieren.IsChecked=False Then EndenSynchronisieren.Check '/// check synchronize ///'
+ wait 10
+ StilLinks.Select l
+ if StilLinks.GetSelText<>StilRechts.GetSelText Then
+ WarnLog " Ends not synchronized. " + StilLinks.GetSelText + " Right: " + StilRechts.GetSelText '/// check if style is automatically applied for both ends ///'
+ else
+ PrintLog " Left: " + StilLinks.GetSelText + " Right: " + StilRechts.GetSelText
+ end if
+ EndenSynchronisieren.UnCheck
+ next l
+ ZentriertLinks.Check
+ if ZentriertRechts.isChecked = True Then PrintLog " Centered right does work"
+ i = CornerStyle.GetItemCount
+ if i <> 4 then warnlog "CornerStyle should contain four options, but currently has: " + i
+ for i = 1 to 4
+ CornerStyle.Select i
+ if CornerStyle.GetSelIndex <> i then warnlog "Corner Styles was: " + CornerStyle.GetSelIndex + ", should have been " + i
+ Printlog "Corner Style nr: " + i + " = " + CornerStyle.GetSelText
+ next i
+ TabLinie.OK
+ '------------------------------------------
+ sleep 2
+ FormatLine
+ Kontext
+ Active.SetPage TabLinienstile
+ Kontext "TabLinienstile"
+ Hinzufuegen.Click '/// Add new line style ///'
+ Kontext "NameDlg"
+ Eingabefeld.SetText "Testlinie2" '/// insert name of style (Testlinie2) ///'
+ NameDlg.OK
+ sleep 1
+ Kontext
+ Active.SetPage TabLinienstile
+ Kontext "TabLinienstile"
+ Loeschen.Click '/// delete created style ///'
+ Kontext "Active"
+ Active.Yes
+ Kontext
+ Active.SetPage TabLinienstile
+ Kontext "TabLinienstile"
+ TypLinks.Select 2
+ TypRechts.Select 2
+ AnzahlLinks.SetText "20"
+ AnzahlRechts.SetText "5"
+ LaengeLinks.More 3
+ LaengeRechts.More 3
+ Abstand.SetText "0,1"
+ if AnLinienbreite.IsChecked = True Then AnLinienbreite.Click '/// all fields changed in TabLinienstile ///'
+ PrintLog " All controls could be manipulated."
+ TypLinks.Select 1
+ TypRechts.Select 1
+ if LaengeLinks.IsEnabled And LaengeRechts.IsEnabled =True Then '/// check if its possible to apply a length to a point ///'
+ WarnLog " A point where you can change its length is not a point anymore"
+ else
+ PrintLog " Line style pint tested" '/// All styles for points are changed ///'
+ end if
+ sleep 1
+ try
+ Linienstil.Select 1
+ catch
+ if Linienstil.GetItemCount = 0 then '/// check if style list is filled ///'
+ Warnlog "- The list for line styles is empty"
+ Hinzufuegen.Click '/// new style ///'
+ Kontext "NameDlg"
+ NameDlg.OK
+ end if
+ endcatch
+ Kontext
+ Active.SetPage TabLinienstile
+ Kontext "TabLinienstile"
+ Aendern.Click '/// change style ///'
+ Kontext "NameDlg"
+ Eingabefeld.SetText Eingabefeld.GetText + "1" '/// new name for changed style ///'
+ SetClipboard Eingabefeld.GetText '/// put name into clipboard ///'
+ NameDlg.OK
+ Kontext
+ Active.SetPage TabLinienstile
+ Kontext "TabLinienstile"
+ TabLinienstile.OK
+ sleep 2
+ FormatLine
+ Kontext
+ Active.SetPage TabLinienstile
+ Kontext "TabLinienstile"
+ try
+ Aendern.Click
+ catch
+ Hinzufuegen.Click
+ endcatch
+ Kontext "NameDlg"
+ if Eingabefeld.GetText <> GetClipboardText Then WarnLog "No changes for Line style" '/// check if changed style is in list ///'
+ NameDlg.Cancel
+ sleep 2
+ Kontext
+ Active.SetPage TabLinienstile
+ Kontext "TabLinienstile"
+ sleep 1
+ try
+ Loeschen.Click '/// delete changed style ///'
+ Kontext "Active"
+ Active.Yes
+ sleep 3
+ catch
+ if Linienstile.GetItemCount = 0 Then
+ Hinzufuegen.Click
+ Kontext "NameDlg"
+ sleep 1
+ Eingabefeld.SetText "Delete"
+ NameDlg.OK
+ end if
+ endcatch
+ Kontext
+ Active.SetPage TabLinienstile
+ Kontext "TabLinienstile"
+ sleep 1
+ TabLinienstile.OK
+ '--------------------------------------------
+ sleep 2
+ Call hRechteckErstellen (40,40,80,50) '/// create rectangle ///'
+ sleep 2
+ FormatLine
+ Kontext
+ Active.SetPage TabLinienenden
+ Kontext "TabLinienenden"
+ sleep 2
+ Kontext "Linienstil"
+ if Linienstil.Exists then Aendern.Click '/// change style ///'
+ sleep 1
+ Kontext
+ Active.SetPage TabLinienenden
+ Kontext "TabLinienenden"
+ sleep 1
+ Liste.GetItemCount
+ Liste.Select 3
+ Hinzufuegen.Click '/// add style ///'
+ Kontext "NameDlg"
+ NameDlg.OK
+
+ Kontext
+ Active.SetPage TabLinienenden
+ Kontext "TabLinienenden"
+ Aendern.Click '/// change style ///'
+ Kontext "Active"
+ Printlog Active.GetText
+ Active.OK
+ Kontext "NameDlg"
+ Eingabefeld.SetText Eingabefeld.GetText + "1"
+ PrintLog " Name inserted"
+ NameDlg.OK
+
+ Kontext
+ if active.GetRt=304 then
+ active.ok
+ Kontext "NameDlg"
+ Eingabefeld.SetText Eingabefeld.GetText + "1"
+ PrintLog " Name inserted"
+ NameDlg.OK
+ endif
+ if active.GetRt=304 then
+ active.ok
+ warnlog "still not a valid name :-("
+ endif
+ Kontext
+ Active.SetPage TabLinienenden
+ Kontext "TabLinienenden"
+ Loeschen.Click '/// delete style ///'
+ Kontext "Active"
+ Active.Yes
+
+ Kontext
+ Active.SetPage TabLinienenden
+ Kontext "TabLinienenden"
+ sleep 1
+ Speichern.Click '/// save style ///'
+ sleep 1
+ Kontext "SpeichernDlg"
+ sleep 1
+ SpeichernDlg.Cancel
+
+ Kontext "TabLinienenden"
+ TabLinienenden.Cancel
+ sleep 2
+
+ '///New part for line
+ 'EditSelectAll '/// Select all objects in document ///'
+ 'sleep 2
+ 'hTypeKeys "<DELETE>" '/// Delete objects ///'
+ 'sleep 2
+
+ '/// Create line to test shadow tabpage in line dialog
+ 'kontext "Toolbar"
+ 'Kurven.Click
+ 'sleep 1
+ 'if (gApplication = "DRAW") then
+ ' Kontext "DocumentDraw"
+ ' gMouseMove (30,50, 40,60)
+ ' sleep 1
+ 'else
+ ' Kontext "DocumentImpress"
+ ' gMouseMove (30,50, 40,60)
+ ' sleep 1
+ 'endif
+ 'FormatLine
+ 'Kontext
+ 'Active.SetPage TabSchatten
+
+ ' FormatLine.Cancel
+ Call hCloseDocument '/// close document ///'
+
+endcase 'tiFormatLine
+'-------------------------------------------------------------------------------'
+testcase tLineConnect
+
+ Dim value1 as integer
+ Dim value2 as integer
+ Dim value3 as integer
+ Dim StatusBarText as string
+ Dim i as integer
+ Dim cname as string
+ Dim cfirst as integer
+
+ if bAsianLan then
+ QaErrorLog "tLineConnect ends because Asian languages are not fully supported."
+ goto Endsub
+ end if
+
+ Call hNewDocument '/// New Impress / Draw document ///'
+ Call sSelectEmptyLayout
+ sleep 3
+ kontext "GraphicObjectbar"
+ if GraphicObjectbar.Exists then
+ if GraphicObjectbar.isDocked = False then
+ GraphicObjectbar.Move 900,900
+ endif
+ endif
+ kontext "Gluepointsobjectbar"
+ if Gluepointsobjectbar.Exists then
+ if Gluepointsobjectbar.isDocked = false then
+ Gluepointsobjectbar.Move 900,900
+ endif
+ endif
+ kontext "Optionsbar"
+ if Optionsbar.Exists then
+ if Optionsbar.isDocked = false then
+ Optionsbar.Move 900,900
+ end if
+ endif
+
+ '/// Create 2 lines ///'
+ kontext "Toolbar"
+ Kurven.Click
+ sleep 1
+ if (gApplication = "DRAW") then
+ Kontext "DocumentDraw"
+ gMouseMove (30,50, 40,60)
+ sleep 1
+ kontext "Toolbar"
+ Kurven.Click
+ Kontext "DocumentDraw"
+ gMouseMove (70,50, 60,60)
+ else
+ Kontext "DocumentImpress"
+ gMouseMove (30,50, 40,60)
+ sleep 1
+ kontext "Toolbar"
+ Kurven.Click
+ Kontext "DocumentImpress"
+ gMouseMove (70,50, 60,60)
+ endif
+
+ printlog "'" + (gApplication) +"'"
+
+ '/// Check the amount of objects ///'
+ gMouseClick (10, 10)
+ sleep 1
+ EditSelectAll
+ sleep 1
+ if (gApplication = "IMPRESS") then
+ StatusBarText = DocumentImpress.StatusGetText(DocumentImpress.StatusGetItemID(1))
+ else
+ kontext "DocumentDraw"
+ StatusBarText = DocumentDraw.StatusGetText(DocumentDraw.StatusGetItemID(1))
+ endif
+ if bAsianLan then
+ value1 = left(StatusBarText,(InStr(StatusBarText, "2" )))
+ if value1 <> 2 then
+ warnlog "UH? There is supposed to be two objects visible, but was: " + value1 + " and the StatusBarText said: " + StatusBarText + "."
+ end if
+ else
+ value1 = left(StatusBarText,1)
+ printlog "StatusBarText was: " + StatusBarText
+ if value1 <> 2 then
+ warnlog "UH? There is supposed to be two objects visible, but we found " + value1 + " objects."
+ end if
+ end if
+
+ '/// Connect the two objects selected ///'
+ hOpenContextMenu
+ sleep 1
+ hMenuSelectNr(13)
+ sleep 1
+ '/// Check the amount of objects ///'
+ gMouseClick (10, 10)
+ sleep 1
+ EditSelectAll
+ sleep 1
+ if (gApplication = "IMPRESS") then
+ StatusBarText = DocumentImpress.StatusGetText(DocumentImpress.StatusGetItemID(1))
+ else
+ kontext "DocumentDraw"
+ StatusBarText = DocumentDraw.StatusGetText(DocumentDraw.StatusGetItemID(1))
+ endif
+ value2 = left(StatusBarText,1)
+ printlog "StatusBarText was: " + StatusBarText
+
+ '/// if same as the first value = wrong ///'
+ if value1 = value2 then
+ warnlog "Expected to find one object, but found " + value2 + " instead."
+ endif
+ if value2 = "2" then
+ warnlog "Connect was not successful. We should have one object, but have " + value2 + " instead."
+ endif
+
+ '/// unmark the objects, thereafter mark them again ///'
+ gMouseClick (10, 10)
+ sleep 1
+ EditSelectAll
+ sleep 1
+ '/// Break them from eachother ///'
+ hOpenContextMenu
+ sleep 1
+ hMenuSelectNr(11)
+ sleep 1
+ '/// unmark the objects, thereafter mark them again ///'
+ gMouseClick (10, 10)
+ sleep 1
+ EditSelectAll
+ sleep 1
+ '/// Check the amount of objects ///'
+ if (gApplication = "IMPRESS") then
+ StatusBarText = DocumentImpress.StatusGetText(DocumentImpress.StatusGetItemID(1))
+ else
+ kontext "DocumentDraw"
+ StatusBarText = DocumentDraw.StatusGetText(DocumentDraw.StatusGetItemID(1))
+ endif
+ value3 = left(StatusBarText,1)
+
+ printlog "StatusBarText was: " + StatusBarText
+
+ '/// if the same as any of the ones before: Wrong ///'
+ if (value3 = value1 OR value3 = value2) then
+ warnlog "Expected to find three objects, but found " + value3 + " instead."
+ endif
+
+ '/// if 3 objects, then everything is ok ///'
+ if value3 = 3 then
+ printlog "Found three objects. Means the test was successful."
+ else
+ warnlog "Wrong value, expected three objects, but found " + value3 + "."
+ endif
+
+ '/// Go through the different Corner-styles ///'
+
+ hOpenContextMenu
+ sleep 1
+ hMenuSelectNr(2) 'Choose "Line"
+
+ Kontext "TabLinie"
+ if TabLinie.Exists(2) then
+ cfirst = CornerStyle.GetSelIndex
+ else
+ sleep 1
+ endif
+
+ For i = 1 to CornerStyle.GetItemCount
+ Kontext "TabLinie"
+ if (i > 1) AND (cname <> CornerStyle.GetSelText) then
+ warnlog "Cornerstylename wasnt saved. Should have been: " + cname + ". But was: " + CornerStyle.GetSelText
+ endif
+ CornerStyle.Select i
+ cname = CornerStyle.GetSelText
+ Printlog " Found and selected Corner-Style: " + cname
+ TabLinie.Ok
+ sleep 1
+ hOpenContextMenu
+ hMenuSelectNr(2) 'Choose "Line"
+ Next i
+
+ Kontext "TabLinie"
+ CornerStyle.Select cfirst
+ TabLinie.Ok
+
+ '/// And a nice finish to make life a bit happier for anyone who looks at the test ///'
+ kontext "Toolbar"
+ Ellipsen.Click
+ if (gApplication = "DRAW") then
+ Kontext "DocumentDraw"
+ gMouseMove (40,40, 50,30)
+ sleep 1
+ kontext "Toolbar"
+ Ellipsen.Click
+ Kontext "DocumentDraw"
+ gMouseMove (51,40, 61,30)
+ kontext "Toolbar"
+ Ellipsen.Click
+ Kontext "DocumentDraw"
+ gMouseMove (48,43, 53,50)
+ else
+ Kontext "DocumentImpress"
+ gMouseMove (40,40, 50,30)
+ sleep 1
+ kontext "Toolbar"
+ Ellipsen.Click
+ Kontext "DocumentImpress"
+ gMouseMove (51,40, 61,30)
+ kontext "Toolbar"
+ Ellipsen.Click
+ Kontext "DocumentImpress"
+ gMouseMove (48,43, 53,50)
+ endif
+ gMouseClick (10, 10)
+ '/// Close the document ///'
+ hCloseDocument
+ '/// Endcase ///'
+
+endcase 'tiLineConnect
+'-------------------------------------------------------------------------------'
diff --git a/testautomation/graphics/optional/includes/global/g_load_save.inc b/testautomation/graphics/optional/includes/global/g_load_save.inc
new file mode 100644
index 000000000000..8d64e158eb2a
--- /dev/null
+++ b/testautomation/graphics/optional/includes/global/g_load_save.inc
@@ -0,0 +1,783 @@
+'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
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* Owner : wolfram.garten@oracle.com
+'*
+'* short description :
+'*
+'**************************************************************************************
+' #1 tFileOpenSaveEtc
+' #1 tFileProperties
+' #1 tFilePassword52
+' #1 tFileOpenImport
+' #1 tTestDXF255CharBug
+' #1 tDeletedTemplate
+' #1 tSaveLoadLayoutOLE
+' #1 tSaveLoadLayoutEmpty
+' #1 tSaveLoadLayoutText
+' #1 tSaveLoadLayoutOutline
+' #1 tSaveLoadLayoutPicture
+' #1 tSaveLoadLayoutChart
+' #1 tSaveLoadLayoutSpreadsheet
+'\*************************************************************************************
+testcase tFileOpenSaveEtc
+ Dim Dokument$
+ Dim Dokument2$
+
+ Dokument$ = ConvertPath ( gOfficePath + "user\work\test1")
+ Dokument2$ = ConvertPath ( gOfficePath + "user\work\test1_2")
+
+ if (gApplication = "IMPRESS") then
+ ExtensionString = "odp"
+ else
+ ExtensionString = "odg"
+ end if
+
+ '/// delete previous created documents: 'user\\work\\test1*.od?' ///'
+ if Dir (Dokument$ + ".odp") <> "" then kill (Dokument$ + ".odp")
+ if Dir (Dokument2$ + ".odg") <> "" then kill (Dokument2$ + ".odg")
+
+ '/// open application ///'
+ hNewDocument
+ gMouseclick 90,90
+ '/// create a textframe with content ///'
+ Call hTextrahmenErstellen ( "This is a test",20,20,40,30 )
+ '/// save file as 'test1' ///'
+ hFileSaveAsKill (Dokument$ + "." + ExtensionString)
+ Sleep 10
+ '/// close Document ///'
+ hCloseDocument
+ printlog "- Document Saved and Closed"
+
+ '/// load document 'test1' ///'
+ hFileOpen (Dokument$ + "." + ExtensionString)
+
+ Sleep 10
+ '/// close Document ///'
+ hCloseDocument
+ printlog "- document Loaded and closed"
+ Sleep 10
+ '/// load document 'test1' ///'
+ hFileOpen (Dokument$ + "." + ExtensionString)
+ ' 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
+ Sleep 10
+ gMouseclick 90,90
+ '/// create another textbox with content ///'
+ Call hTextrahmenerstellen ( "Change",60,60,80,80 )
+ '/// File->Close needn't work, just say CANCEL to the question about saving changes! ///'
+ FileClose
+ Kontext ' message about 'something changed should i [overwrite discard cancel]?'
+ if Messagebox.exists (5) then
+ printlog "2:"+messagebox.gettext
+ Messagebox.Cancel
+ else
+ Warnlog "Mesagebox is missing :-("
+ endif
+ printlog "- Document loaded, changed and closed discarding all changes"
+
+ printlog "- Last version"
+ try
+ FileReload '/// File Reload ///'
+ catch
+ kontext "documentimpress"
+ try
+ FileReload '/// File Reload ///'
+ catch
+ warnlog "Damn reload ?? Why ? BREAKPOINT! File reload doesn't work. Create new object and try again :-("
+ endcatch
+ endcatch
+ Kontext
+ Messagebox.Yes
+ Sleep 10
+ gMouseDoubleClick 70,70
+ hTypeKeys "<Down>", 3
+ hTypeKeys "<SHIFT LEFT>",10
+ hTypeKeys "<MOD1 C>"
+ Sleep 1
+ if GetClipboardText = "Change" then Warnlog "- Last version not loaded. Changes in the document still in."
+ printlog "- Change document, save it under different name"
+ Kontext "DocumentImpress"
+ Call hTextrahmenErstellen ("Change2",10,10,50,20 ) '/// new textbox ///'
+ gMouseclick 90,90
+ sleep 1
+ FileSaveAs
+ Kontext "SpeichernDlg"
+ Dateiname.SetText Dokument2$
+ Speichern.Click
+ kontext "AlienWarning"
+ if AlienWarning.exists(5) then
+ warnlog "#i41983# Alien Warning on export not allowed"
+ AlienWarning.OK
+ endif
+ Kontext "Messagebox"
+ if Messagebox.Exists(2) then Messagebox.Yes
+ Sleep 3
+ FileClose '/// Close document ///'
+ sleep 10
+ Kontext "Messagebox"
+ if Messagebox.Exists Then
+ Warnlog "- Document saved, but Msgbox appeared, even no changes were made: " + Messagebox.GetText
+ Messagebox.Yes
+ end if
+ sleep 2
+ printlog "- Loading write protected file"
+ FileOpen '/// Open write protected file ///'
+ Kontext "OeffnenDlg"
+ Dateiname.SetText (Dokument2$ + "." + ExtensionString)
+ NurLesen.Check
+ Oeffnen.Click
+ Sleep 10
+ ' check if the document is writable
+ try
+ Call hTextrahmenErstellen ( "Hello",85,85,95,95 ) '/// attempt to create a textbox ///'
+ hTypeKeys "<SHIFT LEFT>",5
+ hTypeKeys "<MOD1 C>"
+ sleep 1
+ if GetClipboardText = "Hello" then Warnlog "Write protected document could be edited"
+ catch
+ Printlog "- Write protected document could not be edited"
+ endcatch
+ sleep 5
+ FileClose '/// Close document ///'
+
+endcase 'tFileOpenSaveEtc
+'--------------------------------------------------------
+testcase tFileProperties
+
+ qaerrorlog "#i88163#, File/properties/user defined fields get mixed up."
+ goto endsub
+ Call hNewDocument
+ Call hTextrahmenErstellen ("This is a document to test the Menupoint in File/Properties",30,30,60,40)
+
+ if (gApplication = "IMPRESS") then
+ ExtensionString = "odp"
+ else
+ ExtensionString = "odg"
+ end if
+
+ FileProperties
+
+ Kontext
+ active.SetPage TabDokumentinfo
+ Kontext "TabDokumentinfo"
+ Titel.SetText "Properties"
+ Thema.SetText "Documentproperties"
+ Schluesselworte.SetText "None"
+
+ qaerrorlog "#i95523#"
+ 'Kontext
+ 'active.SetPage TabBenutzer
+ 'Kontext "TabBenutzer"
+ 'Info2.SetText "Thorsten Peters"
+
+ 'Infofelder.Click
+ 'Kontext "InfonamenBearbeiten"
+ 'Namen2.SetText "Name"
+ 'InfonamenBearbeiten.OK
+ 'sleep 2
+ Kontext
+ active.SetPage TabInternet
+ Kontext "TabInternet"
+ RefreshThisDocument.Check
+
+ TabInternet.OK
+
+ hFileSaveAsKill ConvertPath (gOfficePath + "user\work\eigen." & ExtensionString)
+
+ FileClose
+ Kontext "Active"
+ if Active.Exists(2) then Active.Yes
+
+ PrintLog "- File / Properties compare"
+ Sleep 2
+ hFileOpen ConvertPath (gOfficePath + "user\work\eigen." + ExtensionString)
+
+ ' 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
+ FileProperties
+ Kontext
+ active.SetPage TabDokumentinfo
+ Kontext "TabDokumentinfo"
+ if Titel.GetText <> "Properties" then Warnlog "Description / Titel is wrong"
+ if Thema.GetText <> "Documentproperties" then Warnlog "Description / Thema is wrong"
+ if Schluesselworte.GetText <> "None" then Warnlog "Description / Keywords is wrong"
+
+ qaerrorlog "#i95523#"
+ 'Kontext
+ 'active.SetPage TabBenutzer
+ 'Kontext "TabBenutzer"
+ 'if Info2.GetText <> "Thorsten Peters" then Warnlog "User Defined / Info2 is wrong"
+
+ 'Infofelder.Click
+ 'sleep 2
+ 'Kontext "InfonamenBearbeiten"
+ 'if Namen2.GetText <> "Name" then Warnlog "Edit Field Names / Info2 is wrong"
+ 'InfonamenBearbeiten.OK
+
+ Kontext
+ active.SetPage TabInternet
+ Kontext "TabInternet"
+ if RefreshThisDocument.IsChecked = FALSE then Warnlog "Internet / 'Refresh this document' is not checked"
+
+ TabInternet.Close
+
+ Call hCloseDocument
+endcase
+
+'********************************************************************************************
+
+testcase tFilePassword52
+ Dim Datei$
+ dim i as integer
+ dim x as integer
+ dim y as integer
+ dim sExt() as string
+
+ sExt = array("d","a")
+ ' passwo52.sd d-preas a-draw
+ for i = 0 to 1
+ Datei$ = ConvertPath ( gTesttoolPath + "graphics\required\input\passwo52.sd"+sExt(i) )
+ hFileOpen(Datei$)
+ sleep 2
+ Kontext "passwordFileOpen"
+ if passwordFileOpen.exists(5) then
+ PasswortName.SetText "12345"
+ passwordFileOpen.OK
+ Printlog "Ok, password dialog came up :-) for file : '" + datei$ + "'"
+ else
+ Warnlog "No password dialog came up :-( for file : '" + datei$ + "'"
+ endif
+ Kontext "Messagebox"
+ if Messagebox.Exists(2) then
+ Warnlog "messagebox ?: '" + Messagebox.GetText + "'"
+ endif
+ hCloseDocument
+ next i
+endcase
+
+'********************************************************************************************
+
+testcase tFileOpenImport
+ dim q as integer
+ call hNewDocument
+ FileOpen
+ Kontext "OeffnenDlg"
+ Dateiname.SetText (ConvertPath (gTesttoolpath + "graphics\required\input\imsusmap.cgm"))
+ Oeffnen.Click
+ Sleep 2
+
+ call fMakeDocumentWritable
+
+ kontext "DocumentImpress"
+ if DocumentImpress.exists(5) then
+ DocumentImpress.TypeKeys ("<Tab>")
+ else
+ warnlog "Not loaded in impress"
+ endif
+ try
+ ContextPositionAndSize
+ kontext
+ messagebox.setpage TabPositionAndSize
+ sleep 1
+ TabPositionAndSize.Close
+ catch
+ warnlog "Documents of Type 'ComputerGraphicsMetafile' can't get loaded :-("
+ endcatch
+ Call hCloseDocument
+ if (gApplication="DRAW") then
+ Call hCloseDocument
+ endif
+endcase
+
+'********************************************************************************************
+testcase tTestDXF255CharBug
+
+'/// tries to load a DXF-document which has a string-leght of 255 characters. ///'
+dim q as integer
+ call hNewDocument
+ InsertGraphicsFromFile '/// insert graphic ///'
+ sleep 1
+ kontext "Active"
+ sleep 1
+ if Active.Exists Then
+ Active.OK
+ end if
+ sleep 1
+ Kontext "GrafikEinfuegenDlg"
+ sleep 2
+ '/// Dateiname.SetText (ConvertPath (gTesttoolpath + "graphics\required\input\255chars.dxf")) ///'
+ Dateiname.SetText (ConvertPath (gTesttoolpath + "graphics\required\input\255chars.dxf"))
+ Oeffnen.Click
+ Sleep 2
+
+ if gApplication = "DRAW" then
+ Kontext "Documentdraw"
+ if Documentdraw.exists(5) then
+ Documentdraw.TypeKeys ("<Tab>")
+ else
+ warnlog "Not loaded in draw"
+ endif
+ else '(Impress)
+ Kontext "DocumentImpress"
+ if DocumentImpress.exists(5) then
+ DocumentImpress.TypeKeys ("<Tab>")
+ else
+ warnlog "Not loaded in impress"
+ endif
+ endif
+
+ try
+ ContextPositionAndSize
+ kontext
+ messagebox.setpage TabPositionAndSize
+ sleep 1
+ TabPositionAndSize.Close
+ catch
+ warnlog "DXF-Document could not be loaded :-("
+ endcatch
+ Call hCloseDocument
+
+endcase 'tTestDXF255CharBug
+'********************************************************************************************
+testcase tDeletedTemplate
+
+ dim i as integer
+ dim Dokument1$
+ dim Dokument2$
+ dim SavedActiveMessage as string
+ dim found as boolean
+
+ if (gApplication = "IMPRESS") then
+ ExtensionString = "odp"
+ else
+ ExtensionString = "odg"
+ end if
+
+ Dokument1$ = ConvertPath ( gOfficePath + "user\work\test1." & ExtensionString)
+ Dokument2$ = ConvertPath ( gOfficePath + "user\work\test2." & ExtensionString)
+
+
+
+ '/// delete previous created documents: 'user\\work\\test*.odp' ///'
+ if Dir (Dokument1$) <> "" then kill Dokument1$
+ if Dir (Dokument2$) <> "" then kill Dokument2$
+
+ '/// open application ///'
+ hNewDocument
+ gMouseclick 90,90
+ '/// create a textframe with content ///'
+ Call hTextrahmenErstellen ( "This is the first file",20,20,40,30 )
+ '/// save file as 'test1.odp' ///'
+ hFileSaveAsKill (Dokument1$)
+ Sleep 10
+ '/// close Document ///'
+ hCloseDocument
+ printlog "- Document 'test1.odp' Saved and Closed"
+
+ '/// open application again ///'
+ hNewDocument
+ gMouseclick 90,90
+ '/// create another textframe with content ///'
+ Call hTextrahmenErstellen ( "This is the second file",20,20,40,30 )
+ '/// save file as 'test2.odp' ///'
+ hFileSaveAsKill (Dokument2$)
+ Sleep 10
+ '/// close Document ///'
+ hCloseDocument
+ printlog "- Document 'test2.odp' Saved and Closed"
+
+ '/// Delete the first file ///'
+ try
+ kill Dokument1$
+ Printlog " Correctly deleted the file: " + Dokument1$
+ catch
+ warnlog "Could not delete the file: " + Dokument1$
+ endcatch
+
+ '/// File => New => Presentation ///'
+ FileAutopilotPresentation '/// new document-autopilot ///'
+ Kontext "AutopilotPraesentation1"
+ sleep 5
+ Existingpresentation.Check
+ sleep 5
+ kontext "active"
+ if active.exists then
+ SavedActiveMessage = Active.GetText
+ QaErrorLog "Message: " + SavedActiveMessage
+ active.ok
+ Kontext "AutopilotPraesentation1"
+ if Existinglist.GetSelText = "test1.odp" then
+ warnlog " The deleted File was found. Messagebox said: " + SavedActiveMessage
+ endif
+ SavedActiveMessage = ""
+ endif
+ Kontext "AutopilotPraesentation1"
+ Existinglist.TypeKeys "<HOME>"
+ sleep 5
+ found = false
+ for i = 1 to Existinglist.GetItemCount
+ kontext "active"
+ if active.exists then
+ SavedActiveMessage = Active.GetText
+ active.ok
+ endif
+ Kontext "AutopilotPraesentation1"
+ if Existinglist.GetSelText = "test1.odp" then
+ found = true
+ if SavedActiveMessage <> "" then
+ warnlog " The deleted File was found. Messagebox said: " + SavedActiveMessage
+ else
+ warnlog " The deleted File was found. However without any messagebox."
+ endif
+ endif
+ Existinglist.TypeKeys "<DOWN>"
+ sleep 5
+ next i
+ if found = true then warnlog " An error-message showed up. Eventually a result of '138498'"
+ AutopilotPraesentation1.Cancel
+ Sleep 2
+ '/// Delete the second file ///'
+ try
+ kill Dokument2$
+ Printlog " Correctly deleted the file: " + Dokument2$
+ catch
+ warnlog "Could not delete the file: " + Dokument2$
+ endcatch
+
+endcase 'tDeletedTemplate
+'****************************************************************************************************
+
+testcase tSaveLoadLayoutEmpty
+ Dim NewFileDir as String
+
+ NewFileDir = ConvertPath (gOfficePath + "user\work\LayoutTest\")
+
+ printlog " Will try to create the directory: " + NewFileDir
+ app.mkdir NewFileDir
+
+
+ gApplication = "IMPRESS"
+ Call hNewDocument
+
+ printlog "Choose and Insert an empty Layout."
+ FormatModifyPage
+ sleep 1
+ kontext "Tasks"
+ LayoutsPreview.TypeKeys "<HOME>"
+ kontext "Pagelayout_UndoDeleteWarning"
+ if Pagelayout_UndoDeleteWarning.exists then
+ Pagelayout_UndoDeleteWarning.ok
+ endif
+ kontext "Tasks"
+ LayoutsPreview.TypeKeys "<RETURN>"
+ sleep (5)
+
+ call fSaveLoadAllFormats (NewFileDir) 'Runs the Function below.
+
+ printlog " Will try to delete the directory: " + NewFileDir
+ app.rmDir NewFileDir
+
+endcase 'tSaveLoadLayoutEmpty
+
+'****************************************************************************************************
+
+testcase tSaveLoadLayoutOLE
+ qaerrorlog "not yet ready"
+ goto endsub
+ Dim NewFileDir as String
+
+ NewFileDir = ConvertPath (gOfficePath + "user\work\LayoutTest\")
+
+ printlog " Will try to create the directory: " + NewFileDir
+ app.mkdir NewFileDir
+
+
+ gApplication = "IMPRESS"
+ Call hNewDocument
+
+ printlog "Choose and Insert an Layout with an OLE."
+ FormatModifyPage
+ sleep 1
+ kontext "Tasks"
+ LayoutsPreview.TypeKeys "<HOME>"
+ kontext "Pagelayout_UndoDeleteWarning"
+ if Pagelayout_UndoDeleteWarning.exists then
+ Pagelayout_UndoDeleteWarning.ok
+ endif
+ kontext "Tasks"
+ LayoutsPreview.TypeKeys ("<RIGHT>",12)
+ sleep (1)
+ LayoutsPreview.TypeKeys ("<Return>")
+ sleep (1)
+ hTypeKeys ("<TAB><TAB><TAB>")
+ hTypeKeys ("<Return>")
+ try
+ sleep (2)
+ kontext "OLEObjektInsert"
+ sleep (1)
+ OLEObjektInsert.Cancel
+ Printlog "Inserted a layout with an 'Insert OLE-Object'-frame. Correct."
+ catch
+ warnlog "Ole wasn't selected :-("
+ CALL hCloseDocument
+ Goto Endsub
+ endcatch
+ sleep (5)
+
+ call fSaveLoadAllFormats (NewFileDir) 'Runs the Function below.
+
+ printlog " Will try to delete the directory: " + NewFileDir
+ app.rmDir ConvertPath (gOfficePath + "user\work\LayoutTest\")' NewFileDir
+
+endcase 'tSaveLoadLayoutOLE
+
+'****************************************************************************************************
+
+testcase tSaveLoadLayoutText
+ qaerrorlog "not yet ready"
+ goto endsub
+ Dim NewFileDir as String
+
+ NewFileDir = ConvertPath (gOfficePath + "user\work\LayoutTest\")
+
+ printlog " Will try to create the directory: " + NewFileDir
+ app.mkdir NewFileDir
+
+
+ gApplication = "IMPRESS"
+ Call hNewDocument
+
+ printlog "Choose and Insert an Layout with a Text-field."
+ FormatModifyPage
+ sleep 1
+ kontext "Tasks"
+ LayoutsPreview.TypeKeys "<HOME>"
+ kontext "Pagelayout_UndoDeleteWarning"
+ if Pagelayout_UndoDeleteWarning.exists then
+ Pagelayout_UndoDeleteWarning.ok
+ endif
+ kontext "Tasks"
+ LayoutsPreview.TypeKeys ("<RIGHT>")
+ sleep (1)
+ LayoutsPreview.TypeKeys ("<Return>")
+ sleep (1)
+ hTypeKeys ("<TAB><TAB><TAB>")
+ hTypeKeys ("<Return>")
+ hTypeKeys ("<ESCAPE>")
+ ' LayoutsPreview.TypeKeys "<RETURN>"
+ sleep (5)
+
+ call fSaveLoadAllFormats (NewFileDir) 'Runs the Function below.
+
+ printlog " Will try to delete the directory: " + NewFileDir
+ app.rmDir ConvertPath (gOfficePath + "user\work\LayoutTest\")' NewFileDir
+
+endcase 'tSaveLoadLayoutText
+
+'****************************************************************************************************
+
+testcase tSaveLoadLayoutOutline
+ qaerrorlog "not yet ready"
+ goto endsub
+ Dim NewFileDir as String
+
+ NewFileDir = ConvertPath (gOfficePath + "user\work\LayoutTest\")
+
+ printlog " Will try to create the directory: " + NewFileDir
+ app.mkdir NewFileDir
+
+
+ gApplication = "IMPRESS"
+ Call hNewDocument
+
+ printlog "Choose and Insert an Layout with a Outline-field."
+ FormatModifyPage
+ sleep 1
+ kontext "Tasks"
+ LayoutsPreview.TypeKeys "<HOME>"
+ kontext "Pagelayout_UndoDeleteWarning"
+ if Pagelayout_UndoDeleteWarning.exists then
+ Pagelayout_UndoDeleteWarning.ok
+ endif
+ kontext "Tasks"
+ LayoutsPreview.TypeKeys ("<RIGHT>",3)
+ sleep (1)
+ LayoutsPreview.TypeKeys ("<Return>")
+ sleep (1)
+ hTypeKeys ("<TAB><TAB><TAB>")
+ hTypeKeys ("<Return>")
+ hTypeKeys ("<ESCAPE>")
+ sleep (5)
+
+ call fSaveLoadAllFormats (NewFileDir) 'Runs the Function below.
+
+ printlog " Will try to delete the directory: " + NewFileDir
+ app.rmDir ConvertPath (gOfficePath + "user\work\LayoutTest\")' NewFileDir
+
+endcase 'tSaveLoadLayoutOutline
+
+'****************************************************************************************************
+
+testcase tSaveLoadLayoutPicture
+ qaerrorlog "not yet ready"
+ goto endsub
+ Dim NewFileDir as String
+
+ NewFileDir = ConvertPath (gOfficePath + "user\work\LayoutTest\")
+
+ printlog " Will try to create the directory: " + NewFileDir
+ app.mkdir NewFileDir
+
+
+ gApplication = "IMPRESS"
+ Call hNewDocument
+
+ printlog "Choose and Insert an Layout with a Graphic-field."
+ FormatModifyPage
+ sleep 1
+ kontext "Tasks"
+ LayoutsPreview.TypeKeys "<HOME>"
+ kontext "Pagelayout_UndoDeleteWarning"
+ if Pagelayout_UndoDeleteWarning.exists then
+ Pagelayout_UndoDeleteWarning.ok
+ endif
+ kontext "Tasks"
+ LayoutsPreview.TypeKeys ("<RIGHT>",8)
+ sleep (1)
+ LayoutsPreview.TypeKeys ("<Return>")
+ sleep (1)
+ hTypeKeys ("<TAB><TAB><TAB>")
+ hTypeKeys ("<Return>")
+ hTypeKeys ("<ESCAPE>")
+ sleep (5)
+
+ call fSaveLoadAllFormats (NewFileDir) 'Runs the Function below.
+
+ printlog " Will try to delete the directory: " + NewFileDir
+ app.rmDir ConvertPath (gOfficePath + "user\work\LayoutTest\")' NewFileDir
+
+endcase 'tSaveLoadLayoutPicture
+
+'****************************************************************************************************
+
+testcase tSaveLoadLayoutChart
+ qaerrorlog "not yet ready"
+ goto endsub
+ Dim NewFileDir as String
+
+ NewFileDir = ConvertPath (gOfficePath + "user\work\LayoutTest\")
+
+ printlog " Will try to create the directory: " + NewFileDir
+ app.mkdir NewFileDir
+
+
+ gApplication = "IMPRESS"
+ Call hNewDocument
+
+ printlog "Choose and Insert an Layout with a Chart-field."
+ FormatModifyPage
+ sleep 1
+ kontext "Tasks"
+ LayoutsPreview.TypeKeys "<HOME>"
+ kontext "Pagelayout_UndoDeleteWarning"
+ if Pagelayout_UndoDeleteWarning.exists then
+ Pagelayout_UndoDeleteWarning.ok
+ endif
+ kontext "Tasks"
+ LayoutsPreview.TypeKeys ("<RIGHT>",6)
+ sleep (1)
+ LayoutsPreview.TypeKeys ("<Return>")
+ sleep (1)
+ hTypeKeys ("<TAB><TAB><TAB>")
+ hTypeKeys ("<Return>")
+ hTypeKeys ("<ESCAPE>")
+ sleep (5)
+
+ call fSaveLoadAllFormats (NewFileDir) 'Runs the Function below.
+
+ printlog " Will try to delete the directory: " + NewFileDir
+ app.rmDir ConvertPath (gOfficePath + "user\work\LayoutTest\")' NewFileDir
+
+endcase 'tSaveLoadLayoutChart
+
+'****************************************************************************************************
+
+testcase tSaveLoadLayoutSpreadsheet
+ qaerrorlog "not yet ready"
+ goto endsub
+ Dim NewFileDir as String
+
+ NewFileDir = ConvertPath (gOfficePath + "user\work\LayoutTest\")
+
+ printlog " Will try to create the directory: " + NewFileDir
+ app.mkdir NewFileDir
+
+
+ gApplication = "IMPRESS"
+ Call hNewDocument
+
+ printlog "Choose and Insert an Layout with a Spreadsheet-field."
+ FormatModifyPage
+ sleep 1
+ kontext "Tasks"
+ LayoutsPreview.TypeKeys "<HOME>"
+ kontext "Pagelayout_UndoDeleteWarning"
+ if Pagelayout_UndoDeleteWarning.exists then
+ Pagelayout_UndoDeleteWarning.ok
+ endif
+ kontext "Tasks"
+ LayoutsPreview.TypeKeys ("<RIGHT>",7)
+ sleep (1)
+ LayoutsPreview.TypeKeys ("<Return>")
+ sleep (1)
+ hTypeKeys ("<TAB><TAB><TAB>")
+ hTypeKeys ("<Return>")
+ hTypeKeys ("<ESCAPE>")
+ sleep (5)
+
+ call fSaveLoadAllFormats (NewFileDir) 'Runs the Function below.
+
+ printlog " Will try to delete the directory: " + NewFileDir
+ app.rmDir ConvertPath (gOfficePath + "user\work\LayoutTest\")' NewFileDir
+
+endcase 'tSaveLoadLayoutSpreadsheet
+
+'****************************************************************************************************
+
diff --git a/testautomation/graphics/optional/includes/global/g_mediaplayer.inc b/testautomation/graphics/optional/includes/global/g_mediaplayer.inc
new file mode 100644
index 000000000000..5961a2132467
--- /dev/null
+++ b/testautomation/graphics/optional/includes/global/g_mediaplayer.inc
@@ -0,0 +1,256 @@
+'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
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* Owner : wolfram.garten@oracle.com
+'*
+'* short description : g_mediaplayer.inc
+'*
+'*********************************************************************
+' #1 g_mediaplayer
+'\********************************************************************
+
+testcase g_mediaplayer
+ dim Datei$
+ dim timevalue1
+ dim timevalue2
+ dim timevalue3
+ dim timecounter, iWaitIndex, timefound as integer
+
+ if iSprache <> 39 then
+ Printlog "- MediaPlayer"
+ if gPlatgroup = "unx" then
+ QaErrorLog "Solaris / Linux: Soundcard + Java Media Framework (JMF) Media-Libraries is needed."
+ goto endsub
+ endif
+ Datei$ = ConvertPath (convertPath (gTesttoolPath + "graphics\required\input\29secsound.wav"))
+ '/// Open New Document ///'
+ Call hNewDocument
+ sleep 2
+ '/// Check if the Media Player already exists - if so - close it ///'
+ kontext "mPlayer"
+ if mPlayer.exists then ' Close the MediaPlayer
+ warnlog "The MediaPlayer was visible since some earlier test. Plese notify FHA."
+ ToolsMediaPlayer
+ printlog "Closed the Media Player"
+ endif
+
+ '/// Tools - MediaPlayer ///'
+ ToolsMediaPlayer
+ sleep 2
+ '/// Open file ///' 'a bigger / longer one
+ kontext "mPlayer"
+ if mPlayer.exists then
+ printlog "The MediaPlayer was open."
+ else
+ warnlog "Tools - MediaPlayer didnt work. The MediaPlayer wasnt visible. Aborting test."
+ Call hCloseDocument '/// Close document ///'
+ goto endsub
+ endif
+ Mopen.Click
+ kontext "OeffnenDlg"
+ Pfad.SetText Datei$
+ Oeffnen.Click
+
+ '/// This test wont work correctly under Solaris and Linux, ///'
+ '/// unless some optional Media-libraries are installed. ///'
+ '/// Therefore we warn the tester about it if we cannot open the file. ///'
+
+ iWaitIndex = 0
+ do while OeffnenDlg.Exists AND iWaitIndex < 10
+ sleep (1)
+ iWaitIndex = iWaitIndex + 1
+ loop
+ kontext "Active"
+ if Active.exists then
+ Warnlog "Error when opening file. Last dialogue said: " + Active.GetText
+ Active.OK
+ kontext "Mplayer"
+ ToolsMediaPlayer
+ Call hCloseDocument '/// close document ///'
+ goto endsub
+ else
+ kontext "Mplayer"
+ if Mplayer.exists then printlog "Media Player was opened."
+ endif
+
+ timevalue1 = mTimeedit.GetText
+
+ '/// Stop ///'
+ sleep 2
+ mStop.Click
+ printlog "Just pressed stop."
+ sleep 1
+ timevalue2 = mTimeedit.GetText
+ sleep 2
+ timevalue3 = mTimeedit.GetText
+ printlog "The time was: " + mTimeedit.GetText
+ if timevalue1 = timevalue2 AND timevalue2 = timevalue3 then
+ if gtSYSName <> "WinXP" then '("Solaris x86" OR "Linux" OR "Solaris") then
+ warnlog "The sound doesnt seem to be played at all. And since the test is run on a platform which needs extra libraries, the test ends now."
+ kontext "Mplayer"
+ if Mplayer.Exists(3) then
+ ToolsMediaPlayer
+ endif
+ Call hCloseDocument '/// close document ///'
+ goto endsub
+ else
+ warnlog "The sound doesnt seem to be played at all, but I will continue the test. The platform was: " + gtSYSName
+ endif
+ else
+ if timevalue1 <> timevalue2 AND timevalue2 = timevalue3 then
+ Printlog "the stop-button seemed to work. Good."
+ else
+ warnlog "Very strange. The first value was: " + timevalue1 + ". Second: " + timevalue2 + ". Third: " + timevalue3
+ endif
+ endif
+ '/// Play ///'
+ ' Save value
+ timevalue1 = mTimeedit.GetText
+ ' Press 'Play'
+ mPlay.Click
+ sleep 2
+ timevalue2 = mTimeedit.GetText
+ printlog "The time was: " + mTimeedit.GetText
+ if timevalue1 = timevalue2 then
+ warnlog "The play-button didnt seem to work" ' Because the time did not change.
+ else
+ Printlog "the play-button seemed to work. Good."
+ endif
+
+ '/// Pause ///'
+ mPlay.Click
+ sleep 10
+ mPause.Click
+ printlog "Pause."
+ timevalue1 = mTimeedit.GetText
+ sleep 2
+ timevalue2 = mTimeedit.GetText
+ printlog "The time was: " + mTimeedit.GetText
+ if timevalue1 <> timevalue2 then
+ warnlog "The pause-button didnt seem to work"
+ else
+ Printlog "the pause-button seemed to work. Good."
+ endif
+
+ '/// Time ///'
+ mStop.Click 'to get to the beginning.
+ sleep 1 'And make sure it's really the beginning.
+ timevalue1 = mTimeedit.GetText
+ if timevalue1 <> "00:00:00 / 00:00:29" then
+ warnlog "Expected the time to go back to 00:00:00, but was " + timevalue1 + " instead."
+ mStop.Click 'to make another try to get to the beginning again.
+ else
+ printlog "Sound stopped, time-value set to 00:00:00."
+ endif
+
+ printlog "We press 'Play'"
+ mPlay.Click 'to get it running
+ sleep 5
+ timefound = 0
+
+ for timecounter = 1 to 50000
+ timevalue1 = mTimeedit.GetText
+ if timevalue1 = "00:00:20 / 00:00:29" then
+ timecounter = 50000
+ timefound = 1
+ endif
+ if timevalue1 = "00:00:29 / 00:00:29" then
+ timecounter = 50000
+ timefound = 2
+ endif
+ next timecounter
+
+ if timefound = 1 then
+ Printlog "the time-counter seemed to work. Good."
+ elseif timefound = 2 then
+ warnlog "Contact the test-administrator, this test needs to be rewritten."
+ elseif timefound = 0 then
+ warnlog "Either the time didnt change, or the test-computer is too fast."
+ endif
+
+ '-Repeat
+ 'Plays the file repeatedly.
+ '/// Loop ///'
+ mLoop.Click
+
+ '/// Volume ///'
+ 'mVolume. 'Click
+ '-Volume slider
+ 'Adjusts the volume.
+
+ '/// Mute ///'
+ mMute.Click
+ sleep 1
+ mMute.Click
+ '-Mute
+ 'Turns sound off and on.
+
+ '/// Time-slider ///'
+ ' mTimeslider. 'Click
+ '-Position slider
+ 'Moves to a different position in the file.
+
+ '/// Scroll-whatever ///'
+ 'mZoomlistbox.
+ '-Zoom
+ 'Adjusts the size of the movie playback.
+
+ '/// Apply ///'
+ mInsert.Click
+ sleep 10
+
+ '/// Close the MediaPlayer via Tools - MediaPlayer ///'
+ ToolsMediaPlayer
+
+ '/// Check if there is an object available. ///'
+ if (gApplication = "IMPRESS") then
+ kontext "DocumentImpress"
+ else
+ kontext "DocumentDraw"
+ endif
+ hTypeKeys ("<escape><tab><tab><tab>")
+ hOpenContextMenu()
+ hMenuSelectNr(1)
+
+ Kontext "TabPositionAndSize"
+ Kontext
+ Active.SetPage TabPositionAndSize
+ Kontext "TabPositionAndSize"
+ if Width.Exists then
+ Printlog "Position and Size came up, object inserted correctly."
+ '/// Close dialog TabPositionAndSize with 'OK' ///'
+ TabPositionAndSize.OK
+ else
+ Warnlog "Position And Size didn't come up, was there no sound-object inserted?"
+ endif
+ sleep 2
+ '/// close document ///'
+ Call hCloseDocument '/// close document ///'
+ else
+ qaerrorLog "#74350# - Different strings in g_mediaplayer under Italian."
+ endif
+endcase
diff --git a/testautomation/graphics/optional/includes/global/g_navigator.inc b/testautomation/graphics/optional/includes/global/g_navigator.inc
new file mode 100644
index 000000000000..4b9ef8948ab8
--- /dev/null
+++ b/testautomation/graphics/optional/includes/global/g_navigator.inc
@@ -0,0 +1,309 @@
+'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
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* Owner : wolfram.garten@oracle.com
+'*
+'* short description :
+'*
+'**************************************************************************************
+' #1 tdViewNavigator
+' #1 tViewNavigatorZOrder
+' #1 tViewNavigatorNameActivated
+' #1 tViewNavigatorGroupedObjects
+'\*************************************************************************************
+
+testcase tdViewNavigator
+ dim position1 as integer
+ dim zaehler as integer
+ dim Ueber_Text_1 as string
+ dim Ueber_Text_2 as string
+ dim Ueber_Text_3 as string
+ dim Ueber_Text_4 as string
+ dim Ueber_Text_5 as string
+ dim Ueber_Text_6 as string
+
+ Call hNewDocument
+
+ For Zaehler = 1 to 3
+ Select Case Zaehler
+ Case 1: Position1 = 20
+ Case 2: Position1 = 30
+ Case 3: Position1 = 40
+
+ ContextPositionAndSize
+ kontext
+ active.SetPage TabPositionAndSize
+ kontext "TabPositionAndSize"
+ Select Case Zaehler
+ Case 1: Ueber_Text_4 = PositionX.GetText
+ Case 2: Ueber_Text_5 = PositionX.GetText
+ Case 3: Ueber_Text_6 = PositionX.GetText
+ End Select
+ printlog " CHECK: Xposition i: "+Zaehler+": "+PositionX.GetText
+ TabPositionAndSize.OK
+ Select Case Zaehler
+ Case 1,2: InsertSlide
+ WaitSlot (2000)
+ hTypekeys "<Pagedown>"
+ WaitSlot (2000)
+ End Select
+ Next Zaehler
+
+ WaitSlot (1000)
+ Kontext "NavigatorDraw"
+ if NavigatorDraw.exists (5) then printlog "OK"
+ Ueber_Text_2 = "OK First"
+ Ueber_Text_3 = "First doesnt work"
+ Call Position_Vergleichen (Ueber_Text_1,Ueber_Text_2,Ueber_Text_3)
+ WaitSlot (1000)
+ Kontext "NavigatorDraw"
+ Ueber_Text_2 = "OK Next"
+ Ueber_Text_3 = "Next doesnt work"
+ Call Position_Vergleichen (Ueber_Text_1,Ueber_Text_2,Ueber_Text_3)
+ Kontext "NavigatorDraw"
+ WaitSlot (1000)
+ Ueber_Text_2 = "OK Last"
+ Ueber_Text_3 = "Last doesnt work"
+ Call Position_Vergleichen (Ueber_Text_1,Ueber_Text_2,Ueber_Text_3)
+ WaitSlot (1000)
+ Kontext "NavigatorDraw"
+ Vorherige.Click
+ Ueber_Text_1 = Ueber_Text_5
+ Ueber_Text_2 = "OK Before this"
+ Ueber_Text_3 = "Before this doesnt work"
+ Call Position_Vergleichen (Ueber_Text_1,Ueber_Text_2,Ueber_Text_3)
+
+ WaitSlot (1000)
+ Kontext "NavigatorDraw"
+ try
+ Kontext "Navigator"
+ catch
+ hTypeKeys "<SHIFT MOD1 F5>"
+ Warnlog "- Unable to reach the Navigator, tried to use the keyboard Shortcut (MOD1 F5) to close it."
+ endcatch
+
+ Kontext "Navigator"
+ if Navigator.exists then
+ Navigator.Close
+ Warnlog "Navigator: should be closed at this point, but was not."
+ else
+ printlog "Navigator: Not available - Good."
+ end if
+
+ WaitSlot (1000)
+ Call hCloseDocument
+endcase 'tdViewNavigator
+
+'--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+
+testcase tViewNavigatorZOrder
+ qaerrorlog "Not yet ready."
+ goto endsub
+
+ dim zPosition(4)
+ dim Counter as integer
+ dim MaxCounter as integer
+ dim PositionName as string
+ dim CheckingValue as string
+
+ Call hNewDocument
+
+ zPosition(1) = "10"
+ zPosition(2) = "15"
+ zPosition(3) = "20"
+ zPosition(4) = "25"
+
+ For Counter = 1 to 4
+ Call hRechteckErstellen ((zPosition(Counter)), (zPosition(Counter)), 60, 60)
+ WaitSlot (1000)
+ printlog "Name the Objects according to their Z-Order. (" +Counter + ")"
+ hOpenContextMenu
+ WaitSlot (1000)
+ 'Choose rename.
+ if hMenuFindSelect(27027, true, 16) = false then
+ Warnlog "Context-Menu-entry `Rename` was not found. Therefore the test ends."
+ Call hCloseDocument
+ Goto Endsub
+ end if
+ kontext "NameDlgObject"
+ NameField.SetText "Object" + Counter
+ NameDlgObject.OK
+ hTypeKeys "<ESCAPE>"
+ Next Counter
+
+ printlog "check"
+
+ Kontext "NavigatorDraw"
+ if (gApplication = "IMPRESS") then
+ try
+ warnlog "- the Navigator was open, check earlier ran tests for inconsistency."
+ hTypeKeys "<SHIFT MOD1 F5>"
+ catch
+ hTypeKeys "<SHIFT MOD1 F5>"
+ endcatch
+ else
+ Kontext "NavigatorDraw"
+ try
+ Warnlog "- the Navigator was open, check earlier ran tests for inconsistency."
+ hTypeKeys "<F5>"
+ catch
+ hTypeKeys "<F5>"
+ endcatch
+ end if
+
+ ' * Check if the Navigator contains the 'Show Shapes' drop down menu.
+
+ kontext "NavigatorDraw"
+ Dragmodus.OpenMenu
+
+ MaxCounter = MenuGetItemCount
+ if MaxCounter <> 0 then
+ For Counter = 1 to MaxCounter
+ printlog "Entry (Dragmode): '" + (MenuGetItemText(MenuGetItemID (Counter))) + "' Found."
+ Next Counter
+ end if
+
+ hMenuSelectNr (0)
+
+
+ Shapesfilter.OpenMenu
+ MaxCounter = MenuGetItemCount
+ For Counter = 1 to MaxCounter
+ printlog "Entry (Shapesfilter): '" + (MenuGetItemText(MenuGetItemID (Counter))) + "' Found."
+ Next Counter
+ hMenuSelectNr (0)
+
+ Printlog " "
+
+ 'Dokumentliste.Click
+
+ kontext "NavigatorDraw"
+
+ 'Main part of the Navigator: the list with it's contents.
+
+ Liste.TypeKeys "<PAGEDOWN>"
+ CheckingValue = Liste.GetSelText
+ printlog CheckingValue
+
+ Liste.TypeKeys "<RIGHT>"
+ Liste.TypeKeys "<DOWN>"
+ CheckingValue = Liste.GetSelText
+ printlog CheckingValue
+ Liste.TypeKeys "<DOWN>"
+ CheckingValue = Liste.GetSelText
+ printlog CheckingValue
+ Liste.TypeKeys "<DOWN>"
+ CheckingValue = Liste.GetSelText
+ printlog CheckingValue
+ Liste.TypeKeys "<DOWN>"
+ CheckingValue = Liste.GetSelText
+ printlog CheckingValue
+ printlog "ok?"
+
+
+ '*NavigatorDraw HID_SD_NAVIGATOR
+ 'NavigatorToolboxDraw HID_SD_NAVIGATOR_TBX
+ 'Stift HID_SD_NAVIGATOR_TBI_PEN
+ 'Erste HID_SD_NAVIGATOR_TBI_FIRST
+ 'Vorherige HID_SD_NAVIGATOR_TBI_PREV
+ 'Naechste HID_SD_NAVIGATOR_TBI_NEXT
+ 'Letzte HID_SD_NAVIGATOR_TBI_LAST
+
+ 'Context-menu framställbar?
+ 'Dragmodus HID_SD_NAVIGATOR_TBI_DRAGTYPE
+
+ 'Liste HID_SD_NAVIGATOR_TLB
+
+ 'Den undre scroll-delen.
+ 'Dokumentliste HID_SD_NAVIGATOR_LB
+
+ ' * the drop down menu must contain the entries 'Named shapes' and 'All Shapes'
+
+ Kontext "Navigator"
+ try
+ Navigator.Close
+ catch
+ printlog "Nope"
+ endcatch
+
+ ' * check if 'Named shapes' is selected by default
+
+ ' * insert 5 shapes in the Document. the shapes should overlap slightly.
+ ' * there must be no entry in the navigator
+ ' * name 1 shape (context menu of the shape / name...)
+ ' * there must appear 1 entry 'under' the corresponding slide in the navigator
+ ' * Select All shapes in the Show shapes drop down menu
+ ' * there must be 5 shapes in the navigator
+ ' * change the order of the shapes in the navigator
+ ' * the z-order of the shapes must stay
+ ' * delete 1 shape from the slide
+ ' * the automatic generated names of the shapes must change and no shape name must be duplicate. The changed shape name must stay
+
+ ' * select 2 shapes and group them
+ ' * an entry with a small plus in front must appear in the navigator
+ ' * click on the plus
+ ' * there must be an additional tree with the 2 shapes of the group
+
+ Call hCloseDocument
+endcase 'tViewNavigatorZOrder
+
+'--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+
+testcase tViewNavigatorNameActivated
+ qaerrorlog "Not yet ready."
+ goto endsub
+ dim zPosition1 as integer
+ dim zPosition2 as integer
+ dim zPosition3 as integer
+ dim zPosition4 as integer
+ dim counter as integer
+
+ Call hNewDocument
+
+ Call hRechteckErstellen ( Position1, Position1, 60, 60)
+
+endcase 'tViewNavigatorNameActivated
+
+'--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+
+testcase tViewNavigatorGroupedObjects
+ qaerrorlog "Not yet ready."
+ goto endsub
+ dim zPosition1 as integer
+ dim zPosition2 as integer
+ dim zPosition3 as integer
+ dim zPosition4 as integer
+ dim counter as integer
+
+ Call hNewDocument
+
+ Call hRechteckErstellen ( Position1, Position1, 60, 60)
+
+
+endcase 'tViewNavigatorGroupedObjects
+
+'--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
diff --git a/testautomation/graphics/optional/includes/global/g_ole.inc b/testautomation/graphics/optional/includes/global/g_ole.inc
new file mode 100644
index 000000000000..56a23c5fb021
--- /dev/null
+++ b/testautomation/graphics/optional/includes/global/g_ole.inc
@@ -0,0 +1,458 @@
+'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
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* Owner : wolfram.garten@oracle.com
+'*
+'* short description: includefile for Ole-testing
+'*
+'\*************************************************************************************
+
+testcase tOLE_Copy
+ qaerrorlog "not running due to reconstruction"
+ goto endsub
+ printlog "Test to see if three different OLEs can be copied and identified correctly."
+
+ dim writerfilename1 as string
+ writerfilename1 = ConvertPath (gTesttoolPath + "graphics\required\input\oletest.odg")
+
+ printlog "Open draw-file" & writerfilename1
+ FileOpen
+ Kontext "OeffnenDlg"
+ sleep 1
+ Dateiname.SetText (writerfilename1)
+ Oeffnen.Click
+ Sleep 3
+
+ printlog "When messagebox about Update all links shows up - press yes."
+ kontext "Messagebox"
+ if Messagebox.exists then
+ Messagebox.Yes
+ endif
+
+ sleep 3
+ gApplication = "DRAW"
+ printlog "Select first object. Use EditCopy to copy it to the clipboard"
+ sleep 1
+ kontext "DocumentDraw"
+ DocumentDraw.mousedown (10,10)
+ DocumentDraw.mouseup (10,10)
+ sleep 1
+ DocumentDraw.Typekeys "<TAB>"
+ EditCopy
+
+ printlog "Close document. Open new Impress-Document. Paste the OLE-Object."
+ Call hCloseDocument
+ gApplication = "IMPRESS"
+ Call hNewDocument
+ EditPaste
+
+ printlog "Select object and check via the Context-menu what it has been opened as."
+ sleep 1
+ Kontext "DocumentImpress"
+ hTypekeys "<MOD1> A"
+ hTypekeys "<RETURN>"
+ hOpenContextMenu
+
+ printlog "Count the number of entries. If 5 (including a menuseparator), then its a spreadsheet"
+ if MenuGetItemCount <> 5 then
+ Warnlog "This doesn't seem to be recognized as a Metafile. It has " + MenuGetItemCount + " entries."
+ end if
+
+ printlog "Close Context menu. Then check if a Edit-line for the Cells is visible."
+ sleep 3
+ MenuSelect (1) 'Default
+
+ Kontext "RechenleisteCalc"
+ if RechenleisteCalc.Exists then
+ Printlog "This is a spreadsheet-Document. Good"
+ endif
+
+ Kontext "DocumentImpress"
+ printlog "Click outside the OLE to deactivate it. Then close the Document "
+ DocumentImpress.mousedown (10,10)
+ DocumentImpress.mouseup (10,10)
+ sleep 3
+ Call hCloseDocument
+
+ printlog "Open Draw-file "
+ FileOpen
+ Kontext "OeffnenDlg"
+ sleep 1
+ Dateiname.SetText (writerfilename1)
+ Oeffnen.Click
+ Sleep 3
+
+ printlog " When messagebox about Update all links shows up - press yes."
+ kontext "Messagebox"
+ if Messagebox.exists then
+ Messagebox.Yes
+ endif
+ sleep 3
+
+ printlog "Select second object. Use EditCopy to copy it to the clipboard."
+ gApplication = "DRAW"
+ sleep 1
+ kontext "DocumentDraw"
+ DocumentDraw.mousedown (10,10)
+ DocumentDraw.mouseup (10,10)
+ sleep 1
+ DocumentDraw.Typekeys "<TAB><TAB>"
+ EditCopy
+
+ printlog "Close document. Open new Impress-Document. Paste the OLE-Object."
+ sleep 1
+ DocumentDraw.mousedown (10,10)
+ DocumentDraw.mouseup (10,10)
+ sleep 1
+ Call hCloseDocument
+
+ gApplication = "IMPRESS"
+ Call hNewDocument
+ EditPaste
+
+ printlog "Select the object, and check via the Context-menu what it has been opened as."
+ sleep 1
+ Kontext "DocumentImpress"
+ hTypekeys "<MOD1> A"
+ hTypekeys "<RETURN>"
+ hOpenContextMenu
+
+ printlog "Count the number of entries. If 5 (including a menuseparator), then its a spreadsheet"
+ if MenuGetItemCount <> 5 then
+ Warnlog "This doesn't seem to be recognized as a Metafile. It has " + MenuGetItemCount + " entries."
+ end if
+
+ printlog "Close Context menu. Then check if a Edit-line for the Cells is visible."
+ sleep 3
+ MenuSelect (1) 'Default
+
+ Kontext "RechenleisteCalc"
+ if RechenleisteCalc.Exists then
+ Printlog "This is a spreadsheet-Document. Good"
+ endif
+
+ kontext "DocumentImpress"
+ sleep 1
+ DocumentImpress.mousedown (10,10)
+ DocumentImpress.mouseup (10,10)
+ sleep 1
+
+ printlog "Close document"
+ Call hCloseDocument
+
+ printlog "Open draw-file"
+ FileOpen
+ Kontext "OeffnenDlg"
+ sleep 1
+ Dateiname.SetText (writerfilename1)
+ Oeffnen.Click
+ Sleep 3
+ kontext "Messagebox"
+ printlog "When messagebox about Update all links shows up - press yes."
+ if Messagebox.exists then
+ Messagebox.Yes
+ endif
+ sleep 3
+
+ printlog "Select third object. Use EditCopy to copy it to the clipboard."
+ gApplication = "DRAW"
+ sleep 1
+ kontext "DocumentDraw"
+ DocumentDraw.mousedown (10,10)
+ DocumentDraw.mouseup (10,10)
+ sleep 1
+ DocumentDraw.Typekeys "<TAB><TAB><TAB>"
+ EditCopy
+
+ printlog "Close the Document. Open new Impress-Document. Paste the OLE-Object."
+ sleep 1
+ DocumentDraw.mousedown (10,10)
+ DocumentDraw.mouseup (10,10)
+ sleep 1
+ Call hCloseDocument
+
+ gApplication = "IMPRESS"
+ Call hNewDocument
+ EditPaste
+
+ printlog "Select the object, and check via the Context-menu what it has been opened as."
+ Kontext "DocumentImpress"
+ hTypekeys "<MOD1> A"
+ hTypekeys "<RETURN>"
+ hOpenContextMenu
+
+ printlog "Count the number of entries. If 5 (including a menuseparator), then its a spreadsheet"
+ if MenuGetItemCount <> 5 then
+ Warnlog "This doesn't seem to be recognized as a Metafile. It has " + MenuGetItemCount + " entries."
+ end if
+
+ printlog "Close Context menu. Then check if a Edit-line for the Cells is visible."
+ sleep 3
+ MenuSelect (1) 'Default
+
+ Kontext "RechenleisteCalc"
+ if RechenleisteCalc.Exists then
+ Printlog "This is a spreadsheet-Document. Good"
+ endif
+
+ printlog "Close Context menu. Then close the Document"
+ Call hCloseDocument
+
+endcase 'tOLE_Copy
+'-----------------------------------------------------------------------------------------------------------'
+testcase tOLE_SaveLoad
+
+ printlog "Test to see if an OLE can be inserted, saved and loaded correctly."
+ dim filename as string
+ dim filetype as string
+ dim filetype2 as string
+
+ if (gApplication = "IMPRESS") then
+ ExtensionString = "odp"
+ else
+ ExtensionString = "odg"
+ end if
+ setClipboard(" ")
+ filename = ConvertPath (gOfficePath + "user\work\oletest." & ExtensionString)
+ printlog "Create a new document."
+ Call hNewDocument
+ Call sSelectEmptyLayout
+ printlog "Insert->Object->OLE Object..."
+ InsertObjectOLEObject
+ Kontext "OLEObjektInsert"
+
+ printlog "Choose create new. Select Writer."
+ Objekttyp.Select 5
+
+ printlog "Click OK to close dialog and insert OLE."
+ OLEObjektInsert.OK
+
+ printlog "Deselect object."
+ sleep 1
+ kontext "DocumentImpress"
+ DocumentImpress.mousedown (10,10)
+ DocumentImpress.mouseup (10,10)
+ sleep 1
+ printlog "Select object."
+ hTypekeys "<MOD1 A>"
+ hOpenContextMenu
+ printlog "Count number of context menu entries. If 20 (including menuseparators), then its a OLE."
+ if MenuGetItemCount <> 20 then
+ Warnlog "This doesnt seem to be a Writer-OLE. It has " + MenuGetItemCount + " entries."
+ else
+ printlog "Right number of context menu entries for OLE."
+ end if
+ printlog "Closing Context Menu"
+ MenuSelect (0)
+ printlog "Save the File."
+ FileSaveAs
+ Kontext "SpeichernDlg"
+ if ( SpeichernDlg.exists( 1 ) ) then
+ Dateiname.Settext (filename)
+ printlog "Saving as: " & filename
+ Speichern.Click
+ else
+ warnlog( "<FileSaveAs> dialog did not open" )
+ endif
+
+ printlog "If the file already exists - press yes to overwrite it."
+ kontext "Messagebox"
+ if ( Messagebox.exists( 3 ) ) then
+ Messagebox.Yes
+ endif
+ Sleep 3
+
+ printlog "Getting type of OLE from save as dialog."
+ hOpenContextMenu
+ hMenuSelectNr(-1)
+ Kontext "SpeichernDlg"
+ filetype = Dateityp.GetSelText (1)
+ printlog "Filetype is " & Dateityp.GetSelText (1)
+ SpeichernDlg.Cancel
+
+ printlog "Close Document."
+ Call hCloseDocument
+ Call hNewDocument
+
+ Kontext "DocumentImpress"
+ printlog "Open saved file."
+ Call hFileOpen (filename)
+ sleep 1
+ hTypekeys "<MOD1 A>"
+ hOpenContextMenu
+ hMenuSelectNr(-1)
+ Kontext "SpeichernDlg"
+ filetype2 = Dateityp.GetSelText
+ SpeichernDlg.Cancel
+ printlog "Check if it has the same number of context menu entries."
+ Printlog "The OLE created was a: " + filetype + " and the one which was loaded was a: " + filetype2
+ if ((left(right(filetype,4),3))) <> ((left(right(filetype2,4),3))) then
+ warnlog "The first was a: " + ((left(right(filetype,4),3))) + " and second was a: " + ((left(right(filetype2,4),3)))
+ else
+ printlog "Good: the first one was a: " + ((left(right(filetype,4),3))) + "-file, and second one was a: " + ((left(right(filetype2,4),3))) + "-file."
+ endif
+ printlog "Closing document."
+ Call hCloseDocument
+
+ 'FHA TODO
+ 'testcase tOLE_DragDrop
+ printlog " Create OLE, drag n drop within the document. "
+ printlog " If Impress, drag and drop from document to another slide. "
+ 'endcase 'tOLE_DragDrop
+
+endcase ' tOLE_Save
+'-------------------------------------------------------------------------------
+testcase tiOpenOLECrash
+
+ dim sFileodp as string
+ dim oFile as string
+ dim i as integer
+ printlog "Testing for bug nr: i70019"
+
+ printlog "Open Application"
+ Call hNewDocument
+ sleep 1
+ printlog "1. Open file: generic_de.ppt"
+ FileOpen
+ sleep 1
+ Kontext "OeffnenDlg"
+ printlog " Use file: graphics\optional\input\generic_de.ppt "
+ oFile = ConvertPath (gTesttoolPath + "graphics\required\input\generic_de.ppt")
+ Printlog "file: '" + oFile + "'"
+ Dateiname.SetText (oFile)
+ printlog "2. Save this document as an *.odp -file."
+ Oeffnen.Click
+ kontext "DocumentImpress"
+ i = 0
+ do while (i < 20)
+ try
+ ApplicationBusy
+ catch
+ sleep (1)
+ i = i + 1
+ endcatch
+ loop
+ if DocumentImpress.StatusIsProgress AND i > 19 then
+ warnlog " Took over 20 seconds to load the document Document. Stalled?"
+ endif
+
+ FileSaveAs
+ Kontext "SpeichernDlg"
+ if ( SpeichernDlg.exists( 2 ) ) then
+ sFileodp = (ConvertPath(gOfficePath + "user\work\generic_de"))
+ Dateiname.SetText (sFileodp)
+ Dateityp.Select (1)
+ Speichern.Click
+ Kontext "Messagebox"
+ if Messagebox.Exists(2) then
+ try
+ Messagebox.Yes
+ catch
+ warnlog( "#i110938 - Failure to save certain impress documents" )
+ Messagebox.ok()
+ goto endsub
+ endcatch
+ Kontext "AlienWarning"
+ if AlienWarning.Exists(2) then
+ Warnlog "Should not be any alienwarning when saving in our own format!"
+ AlienWarning.OK
+ end if
+ printlog "Saved as: " + sFileodp
+ end if
+ else
+ warnlog( "<FileSaveAs> dislog did not open" )
+ goto endsub
+ endif
+ Sleep 3
+ kontext "DocumentImpress"
+ printlog "3. Close Impress."
+ Call hCloseDocument
+
+ printlog "4.Reopen the *.odp file again"
+ FileOpen
+ Kontext "OeffnenDlg"
+ Dateiname.SetText (sFileodp + ".odp")
+ Oeffnen.Click
+ kontext
+ if Active.exists (5) then
+ Printlog "ACTIVE: "+active.gettext
+ Active.ok
+ Warnlog "failed to open file? :-("
+ end if
+
+ i = 0
+ do while (i < 20)
+ try
+ ApplicationBusy
+ catch
+ sleep (1)
+ i = i + 1
+ endcatch
+ loop
+ if DocumentImpress.StatusIsProgress AND i > 19 then
+ warnlog "Took over 20 seconds to load the document Document. Stalled?"
+ endif
+
+ printlog "5. Right-click on the second slide and click on New slide. "
+ Kontext "Slides"
+ SlidesControl.TypeKeys "<PAGEDOWN>" 'Goto second slide. (and get the focus right)
+ SlidesControl.TypeKeys "<SHIFT F10>" 'OpenContextMenu (True) 'Open Context-menu
+ hMenuSelectNr (1) 'New Slide
+
+ printlog "6. Change the title-(the text was F�r den TCM-Test, but this should irrelevant... ;) )."
+ hTypeKeys "<TAB>" 'To select the title.
+ hTypeKeys "Fuer den TCM-Test" 'To enter text
+ printlog " 7. Clicked two times on the Click twice to insert object "
+ hTypeKeys "<ESCAPE>"
+ gMouseClick 1,1
+ hTypeKeys "<TAB><TAB>" '(to select the second object)
+ hTypeKeys "<RETURN>"
+ sleep (2)
+
+ printlog "8. Choose OpenOffice.org 2.0 Formular"
+ Kontext "OLEObjektInsert"
+ Objekttyp.Select (4)
+ sleep (2)
+ PrintLog " Object: " + Objekttyp.GetSelText + " will be inserted."
+ printlog "Leave dialog 'Insert OLE Object' with OK"
+ OLEObjektInsert.OK
+ sleep (2)
+
+ kontext "CommandsMath"
+ Commands.TypeKeys "A over B + FACT 6 = x"
+
+ 'printlog " Leave edit mode by typing key [Escape] "
+ 'Comment: If I do this, the bug wont occur...
+ 'hTypeKeys "<ESCAPE>"
+
+ printlog "10. Click on the Save button."
+ kontext "Standardbar"
+ Speichern.Click
+
+ printlog "11. Click on the X to close the window while the OLE-object still in Edit-mode."
+ Call hCloseDocument
+endcase 'tiOpenOLECrash
diff --git a/testautomation/graphics/optional/includes/global/g_paneview.inc b/testautomation/graphics/optional/includes/global/g_paneview.inc
new file mode 100644
index 000000000000..a2e7bdb87266
--- /dev/null
+++ b/testautomation/graphics/optional/includes/global/g_paneview.inc
@@ -0,0 +1,535 @@
+'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
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* Owner : wolfram.garten@oracle.com
+'*
+'* short description: includefile for Paneview-testing
+'*
+'**************************************************************************************
+' #1 tiMinimize_Maximize_Docking_SlidePane
+' #1 tiMinimize_Maximize_Docking_TaskPane
+' #1 tdMinimize_Maximize_Docking_Pagepane
+' #1 tiPaneview_LoadSave_Windowsstate
+' #1 tdPaneview_LoadSave_Windowsstate
+'\*************************************************************************************
+
+testcase tiMinimize_Maximize_Docking_SlidePane
+ Dim xPos%
+ Dim yPos%
+ Dim xSize%
+ Dim ySize%
+
+ printlog "- SlidePane : using all possible things to manipulate the SlidePane"
+ Call hNewDocument
+ Kontext "Slides"
+ if (Slides.isVisible = false) Then 'isReallyVisible ?
+ qaErrorLog "- Expected SlidePane to be open; But is closed. Check tests."
+ Kontext "DocumentImpress"
+ ViewTaskSlide
+ sleep 1
+ else
+ printlog "SlidePane was open - good."
+ end if
+ Kontext "Slides"
+
+ 'Only because of overflow-error when some part of the pane is outside the window.
+
+ if Slides.IsDocked then Slides.UnDock
+
+ Slides.Move 15, 15
+
+
+ xSize% = Slides.GetSizeX
+ ySize% = Slides.GetSizeY
+ xPos% = Slides.GetPosX
+ yPos% = Slides.GetPosY
+ Slides.Move 300, 400
+ Sleep 1
+ Slides.Move 590, 790
+ Sleep 1
+ Slides.Move 10, 10
+ Sleep 1
+
+ Slides.Size 200, 200
+ Sleep 1
+ Slides.Size 300, 400
+ Sleep 1
+ Slides.Size 150, 250
+ Sleep 1
+ Slides.Size xSize%, ySize%
+ Sleep 1
+
+ printlog " - Close the SlidePane, reopen it, check if appearence is same as before"
+ xPos% = Slides.GetPosX
+ yPos% = Slides.GetPosY
+ xSize% = Slides.GetSizeX
+ ySize% = Slides.GetSizeY
+ Kontext "DocumentImpress"
+ ViewTaskSlide
+ ViewTaskSlide
+ Kontext "Slides"
+ Sleep 1
+ if xPos% <> Slides.GetPosX then Warnlog "The x-Pos. has changed : Should be -> "+ xPos% + " Is -> "+ Slides.GetPosX
+ if yPos% <> Slides.GetPosY then Warnlog "The y-Pos. has changed : Should be -> "+ yPos% + " Is -> "+ Slides.GetPosY
+ if xSize% <> Slides.GetSizeX then Warnlog "The x-Size has changed : Should be -> "+ xSize% + " Is -> "+ Slides.GetSizeX
+ if ySize% <> Slides.GetSizeY then Warnlog "Die y-Size has changed : Should be -> "+ ySize% + " Is -> "+ Slides.GetSizeY
+
+ printlog " - dock SlidePane"
+ Slides.Dock
+ Sleep 1
+ if (NOT Slides.IsDocked) then
+ Warnlog "SlidePane not docked but should be"
+ end if
+ if (Slides.IsDocked) Then
+ Slides.UnDock
+ end if
+ Sleep 1
+
+ printlog " - maximize/minimize SlidePane"
+ Slides.Minimize
+ Sleep 1
+ Slides.Maximize
+ Sleep 1
+ if (NOT Slides.IsMax) then
+ Warnlog "The Slides-docking-window did not return to maximized state"
+ end if
+ Slides.Close
+ Kontext "DocumentImpress"
+ ViewTaskSlide
+ Sleep (2)
+ Kontext "Slides"
+ if (Slides.isVisible = false) Then 'isReallyVisible ?
+ warnlog "the Slidepane wasnt visible"
+ end if
+ Sleep (1)
+ Slides.Move xPos%, yPos%
+ Sleep 1
+ if (Slides.IsDocked = True) then
+ warnlog "the SlidePane was docked - should have been undocked."
+ else
+ printlog "the SlidePane was not docked, good."
+ Slides.Dock
+ end if
+ Call hCloseDocument
+endcase 'tiMinimize_Maximize_Docking_SlidePane
+
+'------------------------------------------------------------------------------------'
+
+testcase tiMinimize_Maximize_Docking_TaskPane
+ Dim xPos%
+ Dim yPos%
+ Dim xSize%
+ Dim ySize%
+
+ printlog "- TaskPane : using all possible things to manipulate the TaskPane"
+ Call hNewDocument
+ Kontext "Tasks"
+ if (Tasks.isVisible = false) Then 'isReallyVisible ?
+ qaErrorLog "- Expected TaskPane to be open; But is closed. Check tests."
+ sleep 1
+ Kontext "DocumentImpress"
+ ViewTaskPane
+ else
+ printlog "TaskPane was open - good."
+ end if
+ Kontext "Tasks"
+
+ 'Only because of overflow-error when some part of the pane is outside the window.
+ if Tasks.IsDocked then Tasks.UnDock
+
+ Tasks.Move 15, 15
+
+ xSize% = Tasks.GetSizeX
+ ySize% = Tasks.GetSizeY
+
+ xPos% = Tasks.GetPosX
+ yPos% = Tasks.GetPosY
+ Tasks.Move 300, 400
+ Sleep 1
+ Tasks.Move 590, 790
+ Sleep 1
+ Tasks.Move 10, 10
+ Sleep 1
+ Tasks.Size 200, 200
+ Sleep 1
+ Tasks.Size 300, 400
+ Sleep 1
+ Tasks.Size 150, 250
+ Sleep 1
+ Tasks.Size xSize%, ySize%
+ Sleep 1
+
+ printlog " - Close the TaskPane, reopen it, check if appearence is same as before"
+ xPos% = Tasks.GetPosX
+ yPos% = Tasks.GetPosY
+ xSize% = Tasks.GetSizeX
+ ySize% = Tasks.GetSizeY
+ Kontext "DocumentImpress"
+ ViewTaskPane
+ ViewTaskPane
+ Sleep 1
+ Kontext "Tasks"
+ if xPos% <> Tasks.GetPosX then Warnlog "The x-Pos. has changed : Should be -> "+ xPos% + " Is -> "+ Tasks.GetPosX
+ if yPos% <> Tasks.GetPosY then Warnlog "The y-Pos. has changed : Should be -> "+ yPos% + " Is -> "+ Tasks.GetPosY
+ if xSize% <> Tasks.GetSizeX then Warnlog "The x-Size has changed : Should be -> "+ xSize% + " Is -> "+ Tasks.GetSizeX
+ if ySize% <> Tasks.GetSizeY then Warnlog "Die y-Size has changed : Should be -> "+ ySize% + " Is -> "+ Tasks.GetSizeY
+
+ printlog " - dock TaskPane"
+ Tasks.Dock
+ Sleep 1
+ if (NOT Tasks.IsDocked) then
+ Warnlog "TaskPane not docked but should be"
+ end if
+ if (Tasks.IsDocked) Then
+ Tasks.UnDock
+ end if
+ Sleep 1
+
+ printlog " - maximize/minimize TaskPane"
+ Tasks.Minimize
+ Sleep 1
+ Tasks.Maximize
+ Sleep 1
+ if (NOT Tasks.IsMax) then
+ Warnlog "The Task-docking-window did not return to maximized state"
+ end if
+ Tasks.Close
+ Sleep (1)
+ Kontext "DocumentImpress"
+ ViewTaskPane
+ Sleep (2)
+ Kontext "Tasks"
+ if (Tasks.isVisible = false) Then 'isReallyVisible ?
+ warnlog "the Taskpane wasnt visible"
+ end if
+ Tasks.Move xPos%, yPos%
+ Sleep 1
+ if (Tasks.IsDocked = True) then
+ warnlog "the TaskPane was docked - should have been undocked."
+ else
+ printlog "the TaskPane was not docked, good."
+ Tasks.Dock
+ end if
+ Call hCloseDocument
+endcase 'tiMinimize_Maximize_Docking_TaskPane
+
+'------------------------------------------------------------------------------------'
+
+testcase tiPaneview_LoadSave_Windowsstate
+ QaErrorLog "#i84057# - tiPaneview_LoadSave_Windowsstate deactivated."
+ goto endsub
+ Dim xPos%
+ Dim yPos%
+ Dim xSize%
+ Dim ySize%
+ Dim Filenamex as string
+ dim applicationchar as string
+
+ Filenamex = ConvertPath (gOfficePath + "user\work\Task-postion")
+
+ printlog "- TaskPane : using all possible things to manipulate the TaskPane"
+ Call hNewDocument
+ kontext "Tasks"
+ if (Tasks.isVisible = false) Then 'isReallyVisible ?
+ qaErrorLog "- Expected TaskPane to be open; But is closed. Check tests."
+ sleep 1
+ Kontext "DocumentImpress"
+ ViewTaskPane
+ else
+ printlog "TaskPane was open - good."
+ end if
+
+ Kontext "Tasks"
+ 'Only because of overflow-error when some part of the pane is outside the window.
+
+ if Tasks.IsDocked then Tasks.UnDock
+ Sleep (1)
+ Tasks.Move 15, 15
+
+ xSize% = Tasks.GetSizeX
+ ySize% = Tasks.GetSizeY
+
+ xPos% = Tasks.GetPosX
+ yPos% = Tasks.GetPosY
+ Sleep (2)
+ Tasks.Size 200, 200
+ Sleep 1
+ Tasks.Move 10, 10
+ Tasks.Size 300, 400
+ Sleep 1
+ Tasks.Move 550, 290
+ Sleep 1
+
+ printlog " - Close the TaskPane, reopen it, check if appearence is same as before"
+ xPos% = Tasks.GetPosX
+ yPos% = Tasks.GetPosY
+ xSize% = Tasks.GetSizeX
+ ySize% = Tasks.GetSizeY
+
+ if Dir(Filenamex)<>"" then app.Kill(Filenamex) ' kill old file
+
+ printlog "OK saved at ", Filenamex
+ sleep 1
+
+ Call hCloseDocument
+
+ hDateiOeffnen (Filenamex + "." + ExtensionString)
+
+ Kontext "Tasks"
+ if (Tasks.IsVisible = false) then
+ warnlog "Taskpanel wasnt visible"
+ Kontext "DocumentImpress"
+ ViewTaskPane
+ Sleep 1
+ else
+ printlog "Taskpanel was visible, good"
+ end if
+
+ Kontext "Tasks"
+ if xPos% <> Tasks.GetPosX then Warnlog "The x-Pos. has changed : Should be -> "+ xPos% + " Is -> "+ Tasks.GetPosX
+ if yPos% <> Tasks.GetPosY then Warnlog "The y-Pos. has changed : Should be -> "+ yPos% + " Is -> "+ Tasks.GetPosY
+ if xSize% <> Tasks.GetSizeX then Warnlog "The x-Size has changed : Should be -> "+ xSize% + " Is -> "+ Tasks.GetSizeX
+ if ySize% <> Tasks.GetSizeY then Warnlog "Die y-Size has changed : Should be -> "+ ySize% + " Is -> "+ Tasks.GetSizeY
+ Sleep (2)
+ Tasks.Size xSize%, ySize%
+ Sleep 1
+
+ printlog " - dock TaskPane"
+ Tasks.Dock
+ Call hCloseDocument
+endcase
+
+'----------------------------------------------------------------------------------------'
+
+testcase tdPaneview_LoadSave_Windowsstate
+ QaErrorLog "#i84057# - tiPaneview_LoadSave_Windowsstate deactivated."
+ goto endsub
+ Dim xPos%
+ Dim yPos%
+ Dim xSize%
+ Dim ySize%
+ Dim Filenamex as string
+
+ Filenamex = ConvertPath (gOfficePath + "user\work\Task-postion")
+
+ printlog "- Pagepane : using all possible things to manipulate the Pagepane"
+ Call hNewDocument
+ kontext "Pagepane"
+ if (Pagepane.isVisible = false) Then 'isReallyVisible ?
+ qaErrorLog "- Expected Pagepane to be open; But is closed. Check tests."
+ sleep 1
+ Kontext "DocumentDraw"
+ ViewPagepane
+ else
+ printlog "Pagepane was open - good."
+ end if
+
+ 'Only because of overflow-error when some part of the pane is outside the window.
+
+ if Pagepane.IsDocked then Pagepane.UnDock
+
+ Pagepane.Move 15, 15
+
+
+ Kontext "Pagepane"
+ xSize% = Pagepane.GetSizeX
+ ySize% = Pagepane.GetSizeY
+
+ xPos% = Pagepane.GetPosX
+ yPos% = Pagepane.GetPosY
+ Pagepane.Size 200, 100
+ Sleep 1
+ Pagepane.Move 10, 10
+ Pagepane.Size 300, 150
+ Sleep 1
+ Pagepane.Move 550, 290
+ Sleep 1
+
+ printlog " - Close the Pagepane, reopen it, check if appearence is same as before"
+ xPos% = Pagepane.GetPosX
+ yPos% = Pagepane.GetPosY
+ xSize% = Pagepane.GetSizeX
+ ySize% = Pagepane.GetSizeY
+
+ if Dir(Filenamex)<>"" then app.Kill(Filenamex) ' kill old file
+
+ printlog "OK saved at ", Filenamex
+ sleep 1
+
+ Call hCloseDocument
+
+ hDateiOeffnen (Filenamex + "." + ExtensionString)
+
+ Kontext "Pagepane"
+ if (Pagepane.IsVisible = false) then
+ warnlog "Pagepane wasnt visible"
+ Kontext "DocumentDraw"
+ ViewPagepane
+ Sleep 1
+ else
+ printlog "Pagepane was visible, good"
+ end if
+
+ Kontext "Pagepane"
+ if xPos% <> Pagepane.GetPosX then Warnlog "The x-Pos. has changed : Should be -> "+ xPos% + " Is -> "+ Pagepane.GetPosX
+ if yPos% <> Pagepane.GetPosY then Warnlog "The y-Pos. has changed : Should be -> "+ yPos% + " Is -> "+ Pagepane.GetPosY
+ if xSize% <> Pagepane.GetSizeX then Warnlog "The x-Size has changed : Should be -> "+ xSize% + " Is -> "+ Pagepane.GetSizeX
+ if ySize% <> Pagepane.GetSizeY then Warnlog "Die y-Size has changed : Should be -> "+ ySize% + " Is -> "+ Pagepane.GetSizeY
+
+ Pagepane.Size xSize%, ySize%
+ Sleep 1
+
+ printlog " - dock Pagepane"
+ Pagepane.Dock
+ Call hCloseDocument
+endcase 'tdPaneview_LoadSave_Windowsstate
+
+'--------------------------------------------------------------------------------------'
+
+testcase tdMinimize_Maximize_Docking_Pagepane
+ Dim xPos%
+ Dim yPos%
+ Dim xSize%
+ Dim ySize%
+
+ printlog "- Pagepane : using all possible things to manipulate the Pagepane"
+ Call hNewDocument
+ Kontext "Pagepane"
+ if (Pagepane.isVisible = false) Then 'isReallyVisible ?
+ qaErrorLog "- Expected Pagepane to be open; But is closed. Check tests."
+ sleep 1
+ Kontext "DocumentDraw"
+ ViewPagepane
+ else
+ printlog "Pagepane was open - good."
+ end if
+ Kontext "Pagepane"
+
+ 'Only because of overflow-error when some part of the pane is outside the window.
+
+ if Pagepane.IsDocked then Pagepane.UnDock
+
+ Pagepane.Move 10, 10
+ Sleep 1
+
+ xPos% = Pagepane.GetPosX
+ yPos% = Pagepane.GetPosY
+ xSize% = Pagepane.GetSizeX
+ ySize% = Pagepane.GetSizeY
+ Pagepane.Move 300, 400
+ Sleep 1
+ Pagepane.Move 590, 790
+ Sleep 1
+ Pagepane.Move xPos%, yPos%
+ Sleep 1
+
+ Pagepane.Size 200, 200
+ Sleep 1
+ Pagepane.Size 300, 400
+ Sleep 1
+ Pagepane.Size 150, 250
+ Sleep 1
+ Pagepane.Size xSize%, ySize%
+ Sleep 1
+
+ printlog " - Close the Pagepane, reopen it, check if appearence is same as before"
+ xPos% = Pagepane.GetPosX
+ yPos% = Pagepane.GetPosY
+ xSize% = Pagepane.GetSizeX
+ ySize% = Pagepane.GetSizeY
+ Kontext "DocumentDraw"
+ ViewPagepane
+ ViewPagepane
+ Sleep 1
+ Kontext "Pagepane"
+ if xPos% <> Pagepane.GetPosX then Warnlog "The x-Pos. has changed : Should be -> "+ xPos% + " Is -> "+ Pagepane.GetPosX
+ if yPos% <> Pagepane.GetPosY then Warnlog "The y-Pos. has changed : Should be -> "+ yPos% + " Is -> "+ Pagepane.GetPosY
+ if xSize% <> Pagepane.GetSizeX then Warnlog "The x-Size has changed : Should be -> "+ xSize% + " Is -> "+ Pagepane.GetSizeX
+ if ySize% <> Pagepane.GetSizeY then Warnlog "Die y-Size has changed : Should be -> "+ ySize% + " Is -> "+ Pagepane.GetSizeY
+
+ printlog " - dock Pagepane"
+ Pagepane.Dock
+ Sleep 1
+ if (NOT Pagepane.IsDocked) then
+ Warnlog "Pagepane not docked but should be"
+ end if
+ if (Pagepane.IsDocked) Then
+ Pagepane.UnDock
+ end if
+ Sleep 1
+
+ printlog " - maximize/minimize Pagepane"
+ Pagepane.Minimize
+ Sleep 1
+ Pagepane.Maximize
+ Sleep 1
+ if (NOT Pagepane.IsMax) then
+ warnlog "The Pagepane-docking-window did not return to maximized state"
+ end if
+ Kontext "DocumentDraw"
+ ViewPagepane
+ sleep (1)
+ Kontext "Pagepane"
+ if Pagepane.Exists(5) Then
+ warnlog "the Pagepane wasnt closed properly"
+ else
+ Kontext "DocumentDraw"
+ ViewPagepane
+ end if
+ sleep (1)
+ Kontext "Pagepane"
+ if (Pagepane.Exists = true) AND (Pagepane.isVisible = false) Then
+ warnlog "the Pagepane wasnt visible"
+ end if
+
+ if (Pagepane.IsDocked = True) then
+ warnlog "the Pagepane was docked - should have been undocked."
+ else
+ printlog "the Pagepane was not docked, good."
+ Pagepane.Dock
+ end if
+ Call hCloseDocument
+endcase 'tdMinimize_Maximize_Docking_Pagepane
+
+'--------------------------------------------------------------------------------------'
+'TODO FHA : testcase tClick_everywhere
+' Call hNewDocument
+' Kontext "LayerTabBar"
+'Click everywhere
+
+'Draw:
+'Page Pane
+
+'Imp:
+'Slides:SlidesControl
+' kontext "Slides"
+' SlidesControl.MouseClick
+' kontext "Tasks"
+' View = same as slidescontrol
+' LayoutsPreview HID_SD_TASK_PANE_PREVIEW_LAYOUTS
+'endcase 'tClick_everywhere
+'--------------------------------------------------------------------------------------'
diff --git a/testautomation/graphics/optional/includes/global/g_paragraph.inc b/testautomation/graphics/optional/includes/global/g_paragraph.inc
new file mode 100644
index 000000000000..69f145230d2a
--- /dev/null
+++ b/testautomation/graphics/optional/includes/global/g_paragraph.inc
@@ -0,0 +1,211 @@
+'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
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* Owner : wolfram.garten@oracle.com
+'*
+'* short description :
+'*
+'\***********************************************************************************
+
+testcase tdFormatParagraph
+ Dim Zaehler as integer
+ Dim a as integer
+ dim iCount as integer '3 out of 6 have to be able to change a value!
+ dim sIndent as string
+ dim sIndentValue
+ dim sTemp(5) as string
+ dim iTemp as integer
+
+ iCount = 0
+ Call hNewDocument
+
+ ToolsOptions
+ hToolsOptions (gApplication,"General")
+ iTemp = Masseinheit.GetSelIndex
+ Masseinheit.TypeKeys= "<HOME>" '(first entry)
+ Kontext "ExtrasOptionenDlg"
+ ExtrasOptionenDlg.OK
+
+ FormatParagraph
+ Kontext
+ Active.SetPage TabEinzuegeUndAbstaende
+ Kontext "TabEinzuegeUndAbstaende"
+ VonLinks.SetText "2"
+ sleep (1)
+ VonLinks.Typekeys "<TAB>"
+ ErsteZeile.SetText "2"
+ sleep (1)
+ ErsteZeile.Typekeys "<TAB>"
+ VonRechts.SetText "2"
+ sleep (1)
+ VonRechts.Typekeys "<TAB>"
+ Oben.SetText "2"
+ sleep (1)
+ Oben.Typekeys "<TAB>"
+ Unten.SetText "2"
+ sleep (1)
+ Unten.Typekeys "<TAB>"
+ Zeilenabstand.TypeKeys "<DOWN>"
+ Zeilenabstand.TypeKeys "<UP>"
+ printlog "linespacing count: "+Zeilenabstand.GetItemCount
+ sTemp(1) = VonLinks.getText
+ sTemp(2) = ErsteZeile.getText
+ sTemp(3) = VonRechts.getText
+ sTemp(4) = Oben.getText
+ sTemp(5) = Unten.getText
+ TabEinzuegeUndAbstaende.OK
+ FormatParagraph
+ Kontext
+ Active.SetPage TabEinzuegeUndAbstaende
+ Kontext "TabEinzuegeUndAbstaende"
+ if LiberalMeasurement(VonLinks.GetText, sTemp(1)) <> TRUE Then WarnLog "Value changed VonLinks is: '" + VonLinks.GetText + "' should: '" + sTemp(1) +"'"
+ if LiberalMeasurement(VonRechts.GetText, sTemp(2)) <> TRUE Then WarnLog "Value changed VonRechts is: '" + VonRechts.GetText + "' should: '" + sTemp(2) +"'"
+ if LiberalMeasurement(ErsteZeile.GetText, sTemp(3)) <> TRUE Then WarnLog "Value changed ErsteZeile is: '" + ErsteZeile.GetText + "' should: '" + sTemp(3) +"'"
+ if LiberalMeasurement(Oben.GetText, sTemp(4)) <> TRUE Then WarnLog "Value changed Oben is: '" + Oben.GetText + "' should: '" + sTemp(4) +"'"
+ if LiberalMeasurement(Unten.GetText, sTemp(5)) <> TRUE Then WarnLog "Value changed Unten is: '" + Unten.GetText + "' should: '" + sTemp(5) +"'"
+
+ Zaehler=Zeilenabstand.GetItemCount
+ for a=1 to Zaehler
+ Zeilenabstand.Select a
+ sIndent = Zeilenabstand.GetSelText
+ sleep 1
+ try
+ ' if um.IsEnabled then printlog "## UM##"
+ ' if von.IsEnabled then printlog "##VON##"
+ if (von.IsEnabled and um.IsEnabled) then printlog "##VON#### UM## !!!!! :-("
+ if von.IsEnabled then
+ sIndentValue = von.GetText
+ von.More
+ sleep 1
+ if sIndentValue = von.GetText then
+ warnlog "value didn't change :-( : '"+sIndent +"'"
+ else
+ printlog "value changed :-) '"+sIndent +"'"
+ endif
+ iCount = iCount+1
+ else
+ if um.IsEnabled then
+ sIndentValue = Um.GetText
+ Um.More
+ sleep 1
+ if sIndentValue = Um.GetText then
+ warnlog "value didn't change :-( : '"+sIndent +"'"
+ else
+ printlog "value changed :-) '"+sIndent +"'"
+ endif
+ iCount = iCount+1
+ else
+ printlog "value not changeable :-? '"+sIndent +"'"
+ endif
+ endif
+ catch
+ warnLog "BIGERROR :-("
+ endcatch
+ printlog "----------------------------------------------------------------------------------------"
+ sleep 1
+ TabEinzuegeUndAbstaende.OK
+ sleep 1
+ FormatParagraph
+ Kontext
+ Active.SetPage TabEinzuegeUndAbstaende
+ Kontext "TabEinzuegeUndAbstaende"
+ next a
+ if iCount <> 3 then warnlog "Could only activate "+ iCount + " out of "+Zaehler +" vlauefields :-("
+ TabeinzuegeUndAbstaende.OK
+
+ FormatParagraph
+ Kontext
+ Active.SetPage TabAusrichtungAbsatz
+ Kontext "TabAusrichtungAbsatz"
+
+ Links.Check
+ TabAusrichtungAbsatz.OK
+ FormatParagraph
+ Kontext
+ Active.SetPage TabAusrichtungAbsatz
+ Kontext "TabAusrichtungAbsatz"
+ if Links.IsChecked=False Then WarnLog " Button 'left' is not activated"
+
+ Rechts.Check
+ TabAusrichtungAbsatz.OK
+ FormatParagraph
+ Kontext
+ Active.SetPage TabAusrichtungAbsatz
+ Kontext "TabAusrichtungAbsatz"
+ if Rechts.IsChecked=False Then WarnLog " Button 'right' is not activated"
+
+ Zentriert.Check
+ TabAusrichtungAbsatz.OK
+ FormatParagraph
+ Kontext
+ Active.SetPage TabAusrichtungAbsatz
+ Kontext "TabAusrichtungAbsatz"
+ if Zentriert.IsChecked=False Then WarnLog " Button 'center' is not activated"
+
+ Blocksatz.Check
+ TabAusrichtungAbsatz.OK
+ FormatParagraph
+ Kontext
+ Active.SetPage TabAusrichtungAbsatz
+ Kontext "TabAusrichtungAbsatz"
+ if Blocksatz.IsChecked=False Then WarnLog " Button 'justified' is not activated"
+ TabAusrichtungAbsatz.OK
+
+ FormatParagraph
+ Kontext
+ Active.SetPage TabTabulator
+ Kontext "TabTabulator"
+ SetClipboard Position.GetItemCount
+ Position.SetText "1"
+ Neu.Click
+ Position.SetText "2"
+ Neu.Click
+ Position.SetText "3"
+ Neu.Click
+ TabTabulator.OK
+ FormatParagraph
+ Kontext
+ Active.SetPage TabTabulator
+ Kontext "TabTabulator"
+ if GetClipboardText + 3 = Position.GetItemCount Then PrintLog " positions added"
+ Loeschen.Click
+ if Position.GetItemCount="3" Then
+ WarnLog " Delete does not work"
+ else
+ Printlog " TAll ran well in TabTabulator"
+ end if
+ TabTabulator.OK
+
+ ToolsOptions
+ hToolsOptions (gApplication,"General")
+ Masseinheit.Select iTemp
+ if ( Masseinheit.GetSelIndex <> iTemp ) then WarnLog "Unit of Measurement state were NOT changed back"
+ Kontext "ExtrasOptionenDlg"
+ ExtrasOptionenDlg.OK
+
+ Call hCloseDocument
+endcase
diff --git a/testautomation/graphics/optional/includes/global/g_savepictureas.inc b/testautomation/graphics/optional/includes/global/g_savepictureas.inc
new file mode 100644
index 000000000000..bbf9776b7ece
--- /dev/null
+++ b/testautomation/graphics/optional/includes/global/g_savepictureas.inc
@@ -0,0 +1,773 @@
+'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
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/********************************************************************
+'*
+'* Owner : wolfram.garten@oracle.com
+'*
+'* short description : Graphics ContextMenu -SavePictureAs -Test
+'*
+'*************************************************************************
+'*
+' #1 tContextSaveAsPicture
+' #1 tContextSavePictureLinkAsPicture
+'*
+'\***********************************************************************
+
+testcase tContextSaveAsPicture
+ Dim Counter as integer
+ Dim CounterShouldBe as integer
+ Dim SavedOrgPosition as integer
+ Dim i as integer
+ Dim q as integer
+ Dim iFileSize(50) as Long
+ Dim FileList(50) as String
+ Dim FileList2(50) as string
+ Dim Filesize1 as Long
+ Dim Filesize2 as Long
+ Dim Filename, LastFilterName as String
+ Dim Filetype as String
+ Dim OrgFile as String
+ Dim NewFile as String
+ Dim OrgFileDir as String
+ Dim NewFileDir as String
+ Dim Testsize as Boolean
+
+ OrgFileDir = ConvertPath ( gTesttoolPath + "graphics\required\input\SaveAsPicture\" )
+ NewFileDir = ConvertPath ( gOfficePath + "user\work\SaveAsPicture\" )
+
+ app.mkDir (NewFileDir)
+ sleep 3
+ FileList2(0) = 0
+ GetFileList ((ConvertPath (NewFileDir)), "*.*" , FileList2() )
+ sleep 1
+ if (KillFileList (FileList2()) <> TRUE) then
+ for i = 1 to ListCount2 (FileList2())
+ Warnlog "File Not deleted: " + i + ": '" + FileList2(i) + "'"
+ next i
+ endif
+
+ Call hNewDocument
+ Call sSelectEmptyLayout
+ setClipboard(" ")
+ sleep 2
+ InsertGraphicsFromFile
+ Kontext "GrafikEinfuegenDlg"
+ Counter = Dateityp.GetItemCount
+
+ Pfad.SetText OrgFileDir
+ Pfad.TypeKeys ("<Return>")
+ Kontext "Active"
+ if Active.Exists then
+ warnlog "Error when going to the directory " + OrgFileDir + ". Active: " + Active.GetText
+ Active.OK
+ endif
+ Kontext "GrafikEinfuegenDlg"
+
+ if Dateityp.GetItemCount > 0 then
+ Printlog "The ImportGraphic-Dialogue has " + Dateityp.GetItemCount + " File-types."
+ else
+ Warnlog "The ImportGraphic-Dialogue doesn't have any File-types listed"
+ endif
+
+ for i = 2 to Dateityp.GetItemCount 'Get the number of entries.
+ Printlog " *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* "
+ Pfad.SetText OrgFileDir
+ Pfad.TypeKeys ("<Return>")
+ Kontext "Active"
+ if Active.Exists then
+ warnlog "Error when going to the directory " + OrgFileDir + ". Active: " + Active.GetText
+ Active.OK
+ endif
+ Kontext "GrafikEinfuegenDlg"
+
+ if Dateityp.GetItemCount < 1 then
+ Warnlog "Only one or none selectable fileformats."
+ endif
+ Dateityp.Select i
+ Filetype = Dateityp.GetSelText
+ Filetype = left(Right(Dateityp.GetSelText,4),3)
+
+ DateiAuswahl.TypeKeys "<END>"
+ DateiAuswahl.TypeKeys "<SPACE>"
+ if DateiAuswahl.GetItemCount < 1 then
+ warnlog "The file with the extension " + Filetype + " does not exist. Please inform FHA."
+ else
+ printlog "Selected: " + DateiAuswahl.GetSelText
+ Filename = Dateiname.GetSelText
+ OrgFile = ConvertPath (OrgFileDir + Dateiname.GetSelText)
+ printlog " File is: " + OrgFile
+
+ iFileSize(i) = app.FileLen(OrgFile)
+ printlog " The filesize was: " + iFileSize(i)
+
+ DateiAuswahl.TypeKeys "<DOWN>",true
+ if DateiAuswahl.GetSelText <> Filename then
+ warnlog "More than one file with the same extension. Contact Test-Administrator."
+ endif
+
+ if Link.IsChecked = true then
+ Link.UnCheck
+ endif
+
+ Oeffnen.Click
+
+ if (gApplication = "IMPRESS") then
+ Kontext "DocumentImpress"
+ else
+ Kontext "DocumentDraw"
+ endif
+ EditSelectall
+
+ hOpenContextMenu
+ if (gApplication = "IMPRESS") then
+ Kontext "DocumentImpress"
+ DocumentImpress.OpenContextMenu true
+ WaitSlot(1000)
+ if hMenuFindSelect(27353, true, (MenuGetItemCount - 4), true) = false then
+ Warnlog "Context-Menu-entry `SaveAsGraphics` was not found. Therefore the test ends."
+ Call hCloseDocument
+ Goto Endsub
+ endif
+ else 'Should be Draw
+ Kontext "DocumentDraw"
+ DocumentDraw.OpenContextMenu true
+ WaitSlot(1000)
+ if hMenuFindSelect(27353, true, (MenuGetItemCount - 4), true) = false then
+ Warnlog "Context-Menu-entry `SaveAsGraphics` was not found. Therefore the test ends."
+ Call hCloseDocument
+ Goto Endsub
+ endif
+ endif
+ sleep 1
+
+ Kontext "ExportierenDlg"
+ if ExportierenDlg.IsVisible then
+ Printlog " 'Save As Picture' came up correctly when using the Context-menu."
+ endif
+
+ Kontext "ExportierenDlg" 'SaveAsDialogue
+
+ Testsize = false
+ SavedOrgPosition = Dateityp.GetSelIndex
+ select case left(lcase(Dateityp.GetSelText),3) 'Filetype
+ case "png" : if (Filetype = "png") OR (Filetype = "psd") OR (Filetype = "pcx") OR (Filetype = "xbm") OR (Filetype = "ras") OR (Filetype = "pbm") OR (Filetype = "pcd") OR (Filetype = "pgm") OR (Filetype = "bmp") OR (Filetype = "ppm") OR (Filetype = "sgf") OR (Filetype = "xpm") OR (Filetype = "tga") then
+ printlog " " + Filetype + " will be saved as png, correct."
+ CounterShouldBe = 17
+ else
+ warnlog "Png should not have been selected when we opened a '" + Filetype + "'-file."
+ endif
+ case "svm" : if (Filetype = "svm") OR (Filetype = "dxf") OR (Filetype = "eps") OR (Filetype = "sgv") then
+ printlog " " + Filetype + " will be saved as Svm, correct."
+ CounterShouldBe = 17
+ else
+ warnlog "Svm should not have been selected when we opened a '" + Filetype + "'-file."
+ endif
+ case "wmf" : if (Filetype = "wmf") OR (Filetype = "emf") then
+ printlog " " + Filetype + " will be saved as Wmf, correct."
+ CounterShouldBe = 17
+ if Filetype = "wmf" then Testsize = true
+ else
+ warnlog "Wmf should not have been selected when we opened a '" + Filetype + "'-file."
+ endif
+ case "jpe" : if (Filetype = "jpg") OR Filetype = "jif" OR Filetype = "peg" then
+ printlog " " + Filetype + " will be saved as Jpg, correct."
+ CounterShouldBe = 17
+ if Filetype = "jpg" then Testsize = true
+ else
+ warnlog "Jpg should not have been selected when we opened a '" + Filetype + "'-file."
+ endif
+ case "tif" : if Filetype = "tif" OR Filetype = "iff" then
+ printlog " " + Filetype + " will be saved as Tiff, correct."
+ CounterShouldBe = 17
+ if Filetype = "tif" then Testsize = true
+ else
+ warnlog "Tif should not have been selected when we opened a '" + Filetype + "'-file."
+ endif
+ case "sgf" : if (Filetype = "sgv") OR (Filetype = "sgf") then
+ printlog " " + Filetype + " will be saved as Sgf, correct."
+ CounterShouldBe = 17
+ if Filetype = "sgf" then Testsize = true
+ else
+ warnlog "Sgf should not have been selected when we opened a '" + Filetype + "'-file."
+ endif
+ case "gif" : if (Filetype = "gif") then
+ printlog " " + Filetype + " will be saved as Gif, correct."
+ CounterShouldBe = 17
+ if Filetype = "gif" then Testsize = true
+ else
+ warnlog "Gif should not have been selected when we opened a '" + Filetype + "'-file."
+ endif
+ case "met" : if (Filetype = "met") then
+ printlog " " + Filetype + " will be saved as Met, correct."
+ CounterShouldBe = 17
+ if Filetype = "met" then Testsize = true
+ else
+ warnlog "Met should not have been selected when we opened a '" + Filetype + "'-file."
+ endif
+ case "pct" : if (Filetype = "pct") OR (Filetype = "ict") then
+ printlog " " + Filetype + " will be saved as Pct, correct."
+ CounterShouldBe = 17
+ if Filetype = "pct" then Testsize = true
+ else
+ warnlog "Pct should not have been selected when we opened a '" + Filetype + "'-file."
+ endif
+ case else : qaerrorlog " The test has not yet been fitted for this format ( " + Filetype + "). Contact FHA."
+ printlog " But will be saved as: " + left(lcase(Dateityp.GetSelText),3)
+ CounterShouldBe = 18
+ Testsize = true
+ end select
+
+ '..........................................................................................................................'
+
+ Dateityp.TypeKeys "<HOME>"
+ if (Dateityp.GetItemCount) = CounterShouldBe then 'Counter - 10
+ for q = 1 to CounterShouldBe - 1
+ LastFilterName = Dateityp.GetSelIndex
+ Dateityp.TypeKeys "<DOWN>"
+ if Dateityp.GetSelIndex = LastFilterName then
+ warnlog " Check the export-filters when trying to save a " + Filename + "-file. Exiting test."
+ goto endsub
+ endif
+ next q
+ else
+ warnlog "Dateityp.GetItemCount = " + (Dateityp.GetItemCount) + " CounterShouldBe = " + CounterShouldBe
+ endif
+
+ Dateityp.Select SavedOrgPosition
+
+ Dateiname.SetText ( NewFileDir )
+ Dateiname.TypeKeys ("<Return>")
+
+ kontext "Active"
+ if Active.Exists then 'Could not find directory.
+ warnlog "Error when going to the directory " + NewFileDir + ". Active: " + Active.GetText
+ warnlog "ABORTING TESTCASE. PLEASE INFORM TESTPROGRAMMER."
+ Active.OK
+ kontext "GrafikEinfuegenDlg"
+ GrafikEinfuegenDlg.Close
+ goto Endsub
+ endif
+ Kontext "ExportierenDlg"
+
+ sleep 1
+ Dateiname.SetText ConvertPath ( NewFileDir + "SaveAsPicture")
+ NewFile = ConvertPath ( NewFileDir + "SaveAsPicture" + "." + left(lcase(Dateityp.GetSelText),3) )
+ Dateiname.TypeKeys ("<Return>")
+ Kontext "Active"
+ if Active.Exists then 'either could not find directory, or overwrite.
+ Active.Yes ' Overwrite?
+ endif
+
+ if Testsize = true then
+ if NewFile <> "" then
+ Filesize1 = iFileSize(i)
+ printlog " Saved file-size was: " + app.FileLen(NewFile)
+ Filesize2 = app.FileLen(NewFile)
+ endif
+ endif
+
+ if (Testsize = true) then
+ if (Filesize1 < (Filesize2*0.95)) OR (Filesize1 > (Filesize2*1.05)) then
+ warnlog "Format '" + right(NewFile,3) + "' was NOT saved properly. Org-Size: '" + Filesize1 + "' Saved-Size: '" + Filesize2 + "'."
+ else
+ printlog " The Format '" + right(NewFile,3) + "' was saved correctly."
+ endif
+ endif
+ if (gApplication = "IMPRESS") then
+ Kontext "DocumentImpress"
+ else
+ Kontext "DocumentDraw"
+ endif
+ hTypeKeys "<DELETE>"
+ call hCloseDocument
+ call hNewDocument
+ Call sSelectEmptyLayout
+ InsertGraphicsFromFile
+ Kontext "GrafikEinfuegenDlg"
+ if GrafikEinfuegenDlg.exists(5) then
+ printlog " The Insertgraphics-dialogue showed up correctly."
+ sleep (5)
+ else
+ warnlog " The Insertgraphics-dialogue didn't show up."
+ endif
+endif
+next i
+GrafikEinfuegenDlg.Close
+
+GetFileList (NewFileDir, "*.*" , FileList() )
+sleep 1
+if (KillFileList (FileList()) <> TRUE) then
+for i = 1 to ListCount (FileList())
+ Warnlog "File Not deleted: " + i + ": '" + FileList(i) + "'"
+next i
+endif
+Printlog "The test will exit now."
+Sleep 1
+Call hCloseDocument
+endcase 'tContextSaveAsPicture
+
+'--------------------------------------------------------------------------------------
+
+'(Different behaviour = new testcase)
+
+testcase tContextSavePictureLinkAsPicture
+ Dim Counter as integer
+ Dim CounterShouldBe as integer
+ Dim SavedOrgPosition as integer
+ Dim LastFilterName as String
+ Dim i as integer
+ Dim q as integer
+ Dim iFileSize(50) as Long
+ Dim FileList(50) as String
+ Dim FileList2(50) as string
+ Dim Filesize1 as Long
+ Dim Filesize2 as Long
+ Dim Filename as String
+ Dim Filetype as String
+ Dim SavedFileType as String
+ Dim OrgFile as String
+ Dim NewFile as String
+ Dim OrgFileDir as String
+ Dim NewFileDir as String
+ Dim Testsize as Boolean
+ Dim Found as Boolean
+
+ OrgFileDir = ConvertPath ( gTesttoolPath + "graphics\required\input\SaveAsPicture\" )
+ NewFileDir = ConvertPath ( gOfficePath + "user\work\SaveAsPicture\" )
+
+ app.mkDir (NewFileDir)
+ sleep 3
+ FileList2(0) = 0
+ GetFileList ((ConvertPath (NewFileDir)), "*.*" , FileList2() )
+ sleep 1
+ if (KillFileList (FileList2()) <> TRUE) then
+ for i = 1 to ListCount2 (FileList2())
+ Warnlog "File Not deleted: " + i + ": '" + FileList2(i) + "'"
+ next i
+ endif
+
+ Call hNewDocument
+ Call sSelectEmptyLayout
+ setClipboard(" ")
+ sleep 2
+ InsertGraphicsFromFile
+ Kontext "GrafikEinfuegenDlg"
+ Counter = Dateityp.GetItemCount
+
+ Pfad.SetText OrgFileDir
+ Pfad.TypeKeys ("<Return>")
+ Kontext "Active"
+ if Active.Exists then
+ warnlog "Error when going to the directory " + OrgFileDir + ". Active: " + Active.GetText
+ Active.OK
+ endif
+ Kontext "GrafikEinfuegenDlg"
+
+ if Dateityp.GetItemCount > 0 then
+ Printlog "The ImportGraphic-Dialogue has " + Dateityp.GetItemCount + " File-types."
+ else
+ Warnlog "The ImportGraphic-Dialogue doesn't have any File-types listed"
+ endif
+
+ for i = 2 to Dateityp.GetItemCount 'Get the number of entries.
+ Printlog " *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* "
+ Pfad.SetText OrgFileDir
+ Pfad.TypeKeys ("<Return>")
+ Kontext "Active"
+ if Active.Exists then
+ warnlog "Error when going to the directory " + OrgFileDir + ". Active: " + Active.GetText
+ Active.OK
+ endif
+ Kontext "GrafikEinfuegenDlg"
+
+ if Dateityp.GetItemCount < 1 then
+ Warnlog "Only one or none selectable fileformats."
+ endif
+ Dateityp.Select i
+ Filetype = Dateityp.GetSelText
+ printlog " orginal: " + Dateityp.GetSelText
+ Filetype = left(Right(Dateityp.GetSelText,4),3)
+
+ DateiAuswahl.TypeKeys "<END>"
+ DateiAuswahl.TypeKeys "<SPACE>"
+ if DateiAuswahl.GetItemCount < 1 then
+ warnlog "The file with the extension " + Filetype + " does not exist. Please inform FHA."
+ else
+ printlog " Selected: " + DateiAuswahl.GetSelText
+ Filename = Dateiname.GetSelText
+ OrgFile = ConvertPath (OrgFileDir + Dateiname.GetSelText)
+ printlog " File is: " + OrgFile
+
+ iFileSize(i) = app.FileLen(OrgFile)
+ printlog " The filesize was: " + iFileSize(i)
+
+ DateiAuswahl.TypeKeys "<DOWN>",true
+ if DateiAuswahl.GetSelText <> Filename then
+ warnlog "More than one file with the same extension. Contact Test-Administrator."
+ endif
+
+ if Link.IsChecked <> true then
+ Link.Check
+ endif
+ Oeffnen.Click
+
+ if (gApplication = "IMPRESS") then
+ Kontext "DocumentImpress"
+ else
+ Kontext "DocumentDraw"
+ endif
+ EditSelectall
+
+ hOpenContextMenu
+ if (gApplication = "IMPRESS") then
+ Kontext "DocumentImpress"
+ DocumentImpress.OpenContextMenu true
+ if hMenuFindSelect(27353, true, (MenuGetItemCount - 4), true) = false then
+ Warnlog "Context-Menu-entry `SaveAsGraphics` was not found. Therefore the test ends."
+ Call hCloseDocument
+ Goto Endsub
+ endif
+ else 'Should be Draw
+ Kontext "DocumentDraw"
+ DocumentDraw.OpenContextMenu true
+ if hMenuFindSelect(27353, true, (MenuGetItemCount - 4), false) = false then
+ Warnlog "Context-Menu-entry `SaveAsGraphics` was not found. Therefore the test ends."
+ Call hCloseDocument
+ Goto Endsub
+ endif
+ endif
+ sleep 1
+
+ Kontext "ExportierenDlg"
+ if ExportierenDlg.IsVisible then
+ Printlog " 'Save As Picture' came up correctly when using the Context-menu."
+ endif
+
+ Kontext "ExportierenDlg" 'SaveAsDialogue
+
+ Testsize = false
+ Found = true
+ SavedOrgPosition = Dateityp.GetSelIndex
+ select case left(lcase(Dateityp.GetSelText),3) 'Filetype
+ case "png" : if (Filetype = "png") then
+ printlog " " + Filetype + " will be saved as png, correct."
+ SavedFileType = "png"
+ Testsize = true
+ CounterShouldBe = 17
+ else
+ warnlog "Png should not have been selected when we opened a '" + Filetype + "'-file."
+ endif
+ case "pcx" : if(Filetype = "pcx") then
+ printlog " " + Filetype + " will be saved as pcx, correct."
+ SavedFileType = "pcx"
+ Testsize = true
+ CounterShouldBe = 18
+ else
+ warnlog "Png should not have been selected when we opened a '" + Filetype + "'-file."
+ endif
+ case "xbm" : if (Filetype = "xbm") then
+ printlog " " + Filetype + " will be saved as xbm, correct."
+ SavedFileType = "xbm"
+ Testsize = true
+ CounterShouldBe = 18
+ else
+ warnlog "xbm should not have been selected when we opened a '" + Filetype + "'-file."
+ endif
+case "xpm" : if (Filetype = "xpm") then
+ printlog " " + Filetype + " will be saved as Xpm, correct."
+ SavedFileType = "xpm"
+ Testsize = true
+ CounterShouldBe = 17
+else
+ warnlog "xpm should not have been selected when we opened a '" + Filetype + "'-file."
+endif
+case "svm" : if (Filetype = "svm") then
+printlog " " + Filetype + " will be saved as Svm, correct."
+SavedFileType = "svm"
+if (Filetype = "svm") then Testsize = true
+ CounterShouldBe = 17
+else
+ warnlog "Svm should not have been selected when we opened a '" + Filetype + "'-file."
+endif
+case "tga" : if (Filetype = "tga") then
+printlog " " + Filetype + " will be saved as Svm, correct."
+SavedFileType = "tga"
+if (Filetype = "tga") then Testsize = true
+ CounterShouldBe = 18
+else
+ warnlog "Tga should not have been selected when we opened a '" + Filetype + "'-file."
+endif
+case "bmp" : if (Filetype = "bmp") then
+printlog " " + Filetype + " will be saved as Bmp, correct."
+SavedFileType = "bmp"
+Testsize = true
+CounterShouldBe = 17
+else
+warnlog "Bmp should not have been selected when we opened a '" + Filetype + "'-file."
+endif
+case "ppm" : if (Filetype = "ppm") then
+printlog " " + Filetype + " will be saved as Bmp, correct."
+SavedFileType = "ppm"
+if Filetype = "ppm" then Testsize = true
+CounterShouldBe = 17
+else
+warnlog "Ppm should not have been selected when we opened a '" + Filetype + "'-file."
+endif
+case "eps" : if (Filetype = "eps") then
+printlog " " + Filetype + " will be saved as Eps, correct."
+SavedFileType = "eps"
+if Filetype = "eps" then Testsize = true
+CounterShouldBe = 17
+else
+warnlog "Eps should not have been selected when we opened a '" + Filetype + "'-file."
+endif
+case "pgm" : if (Filetype = "pgm") then
+printlog " " + Filetype + " will be saved as Pgm, correct."
+SavedFileType = "pgm"
+if Filetype = "pgm" then Testsize = true
+CounterShouldBe = 17
+else
+warnlog "Pgm should not have been selected when we opened a '" + Filetype + "'-file."
+endif
+case "dxf" : if (Filetype = "dxf") then
+printlog " " + Filetype + " will be saved as Dxf, correct."
+SavedFileType = "dxf"
+if Filetype = "dxf" then Testsize = true
+CounterShouldBe = 18
+else
+warnlog "Dxf should not have been selected when we opened a '" + Filetype + "'-file."
+endif
+case "pbm" : if (Filetype = "pbm") then
+printlog " " + Filetype + " will be saved as Pbm, correct."
+SavedFileType = "pbm"
+if Filetype = "pbm" then Testsize = true
+CounterShouldBe = 17
+else
+warnlog "Pbm should not have been selected when we opened a '" + Filetype + "'-file."
+endif
+case "ras" : if (Filetype = "ras") then
+printlog " " + Filetype + " will be saved as Ras, correct."
+SavedFileType = "ras"
+if Filetype = "ras" then Testsize = true
+CounterShouldBe = 17
+else
+warnlog "Ras should not have been selected when we opened a '" + Filetype + "'-file."
+endif
+case "wmf" : if (Filetype = "wmf") or (Filetype = "emf") then
+printlog " " + Filetype + " will be saved as Wmf, correct."
+SavedFileType = "wmf"
+if Filetype = "wmf" then Testsize = true
+CounterShouldBe = 17
+else
+warnlog "Wmf should not have been selected when we opened a '" + Filetype + "'-file."
+endif
+case "emf" : if (Filetype = "emf") then
+printlog " " + Filetype + " will be saved as Wmf, correct."
+SavedFileType = "emf"
+Testsize = true
+CounterShouldBe = 17
+else
+qaerrorlog "Wmf should not have been selected when we opened a '" + Filetype + "'-file. #i95364#"
+endif
+case "jpe" : if (Filetype = "jpg") OR Filetype = "jif" OR Filetype = "peg" then
+printlog " " + Filetype + " will be saved as Jpg, correct."
+SavedFileType = "jpg"
+Testsize = true
+CounterShouldBe = 17
+else
+warnlog "Jpg should not have been selected when we opened a '" + Filetype + "'-file."
+endif
+case "tif" : if Filetype = "tif" OR Filetype = "iff" then
+printlog " " + Filetype + " will be saved as Tiff, correct."
+SavedFileType = "tif"
+Testsize = true
+CounterShouldBe = 17
+else
+warnlog "Tif should not have been selected when we opened a '" + Filetype + "'-file."
+endif
+case "sgf" : if (Filetype = "sgf") OR (Filetype = "sgv") then 'sgf
+printlog " " + Filetype + " will be saved as Sgf, correct."
+SavedFileType = "sgf"
+Testsize = true
+CounterShouldBe = 18
+else
+warnlog "Sgf should not have been selected when we opened a '" + Filetype + "'-file."
+endif
+case "gif" : if (Filetype = "gif") then
+SavedFileType = "gif"
+printlog " " + Filetype + " will be saved as Gif, correct."
+if Filetype = "gif" then Testsize = true
+CounterShouldBe = 17
+else
+warnlog "Gif should not have been selected when we opened a '" + Filetype + "'-file."
+endif
+case "met" : if (Filetype = "met") then
+printlog " " + Filetype + " will be saved as Met, correct."
+SavedFileType = "met"
+if Filetype = "met" then Testsize = true
+CounterShouldBe = 17
+else
+warnlog "Met should not have been selected when we opened a '" + Filetype + "'-file."
+endif
+case "pct" : if (Filetype = "pct") OR (Filetype = "ict") then
+printlog " " + Filetype + " will be saved as Pct, correct."
+SavedFileType = "pct"
+if Filetype = "pct" then Testsize = true
+CounterShouldBe = 17
+else
+warnlog "Pct should not have been selected when we opened a '" + Filetype + "'-file."
+endif
+case "pcd" : if (Filetype = "pcd") then
+printlog " " + Filetype + " will be saved as Pcd, correct."
+SavedFileType = "pcd"
+if Filetype = "pcd" then Testsize = true
+CounterShouldBe = 18
+else
+warnlog "Pcd should not have been selected when we opened a '" + Filetype + "'-file."
+endif
+case "psd" : if (Filetype = "psd") then
+printlog " " + Filetype + " will be saved as Psd, correct."
+SavedFileType = "psd"
+if Filetype = "psd" then Testsize = true
+CounterShouldBe = 18
+else
+warnlog "Psd should not have been selected when we opened a '" + Filetype + "'-file."
+endif
+case else : qaerrorlog " The test has not yet been fitted for this format ( " + Filetype + "). Contact FHA."
+printlog " But will be saved as: " + left(lcase(Dateityp.GetSelText),3)
+CounterShouldBe = 18
+Found = false
+end select
+
+Dateityp.TypeKeys "<HOME>"
+if (Dateityp.GetItemCount) = CounterShouldBe then 'Counter - 10
+for q = 1 to CounterShouldBe - 1
+LastFilterName = Dateityp.GetSelIndex
+Dateityp.TypeKeys "<DOWN>"
+if Dateityp.GetSelIndex = LastFilterName then
+warnlog " Check the export-filters when trying to save a " + Filename + "-file. Exiting Test."
+goto endsub
+endif
+next q
+else
+warnlog "Dateityp.GetItemCount = " + (Dateityp.GetItemCount) + " CounterShouldBe = " + CounterShouldBe
+endif
+Dateityp.Select SavedOrgPosition
+
+Dateiname.SetText ( NewFileDir )
+Dateiname.TypeKeys ("<Return>")
+
+kontext "Active"
+if Active.Exists then 'Could not find directory.
+warnlog "Error when going to the directory " + NewFileDir + ". Active: " + Active.GetText
+warnlog "ABORTING TESTCASE. PLEASE INFORM THE TESTPROGRAMMER."
+Active.OK
+kontext "GrafikEinfuegenDlg"
+GrafikEinfuegenDlg.Close
+goto Endsub
+endif
+Kontext "ExportierenDlg"
+
+sleep 1
+
+if Found = false then
+NewFile = ConvertPath ( NewFileDir + "SaveAsPicture" + "." + left(lcase(Dateityp.GetSelText),3) )
+else
+NewFile = ConvertPath ( NewFileDir + "SaveAsPicture" + "." + SavedFileType ' left(lcase(Dateityp.GetSelText),3) )
+endif
+Dateiname.SetText NewFile
+
+Dateiname.TypeKeys ("<Return>")
+Kontext "Active"
+if Active.Exists then 'either could not find directory, or overwrite.
+Active.Yes ' Overwrite?
+endif
+
+if Testsize = true then
+if NewFile <> "" then
+Filesize1 = iFileSize(i)
+printlog " Saved file-size was: " + app.FileLen(NewFile)
+Filesize2 = app.FileLen(NewFile)
+endif
+endif
+
+if (Testsize = true) AND (Filesize1 <> Filesize2) then
+qaerrorlog "Format '" + right(NewFile,3) + "' was NOT saved properly. Org-Size: '" + Filesize1 + "' Saved-Size: '" + Filesize2 + "'.#i95364#"
+else
+printlog " The Format '" + right(NewFile,3) + "' was saved correctly."
+endif
+
+if (gApplication = "IMPRESS") then
+Kontext "DocumentImpress"
+else
+Kontext "DocumentDraw"
+endif
+hTypeKeys "<DELETE>"
+call hCloseDocument
+call hNewDocument
+Call sSelectEmptyLayout
+InsertGraphicsFromFile
+Kontext "GrafikEinfuegenDlg"
+if GrafikEinfuegenDlg.exists(5) then
+printlog " The Insertgraphics-dialogue showed up correctly."
+sleep (5)
+else
+warnlog " The Insertgraphics-dialogue didn't show up."
+endif
+endif
+next i
+
+GrafikEinfuegenDlg.Close
+
+GetFileList (NewFileDir, "*.*" , FileList() )
+sleep 1
+if (KillFileList (FileList()) <> TRUE) then
+for i = 1 to ListCount (FileList())
+Warnlog "File Not deleted: " + i + ": '" + FileList(i) + "'"
+next i
+endif
+Printlog "The test will exit now."
+Sleep 1
+Call hCloseDocument
+
+endcase 'tContextSaveAsPicture
+
+'******************************************************************************************************************************'
+
+testcase Mnemonickey
+ qaerrorlog "Not yet ready."
+ goto endsub
+
+ if iSprache = 01 then
+ ExportierenDlg.Close
+ hOpenContextMenu
+ TypeKeys ("<SHIFT S>")
+ kontext "ExportierenDlg"
+ if ExportierenDlg.IsVisible then
+ Printlog "'Save As Picture' came up correctly when using the Context-menu."
+ endif
+ endif
+endcase
diff --git a/testautomation/graphics/optional/includes/global/g_shaddow.inc b/testautomation/graphics/optional/includes/global/g_shaddow.inc
new file mode 100644
index 000000000000..1dfd01f305aa
--- /dev/null
+++ b/testautomation/graphics/optional/includes/global/g_shaddow.inc
@@ -0,0 +1,513 @@
+'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
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* Owner : wolfram.garten@oracle.com
+'*
+'* short description : Tests the shaddow-function on a picture
+'*
+'*******************************************************************
+'*
+' #1 tiShaddow
+'*
+'\*******************************************************************
+testcase tiShaddow
+
+ dim sFilter as string
+ dim i as integer
+ dim t as integer
+ dim q as integer
+ dim PosX as integer
+ dim PosY as integer
+ dim e as string
+ dim sFileName as string
+ dim ImageWidth as string
+ dim ImageHeight as string
+ dim shadowdistancevalue as string
+ dim shadowcolorvalue as string
+ dim shadowtransparencyvalue as string
+ dim linetype as string
+ dim linecolour as string
+ dim linewidth as string
+ dim cornerstyletype as string
+
+ '/// Set the file-extension we'll be using when opening the saved file ///'
+ if (gApplication = "IMPRESS") then
+ ExtensionString = "odp"
+ else
+ ExtensionString = "odg"
+ end if
+
+ '/// Open application ///'
+ Call hNewDocument
+ Call sSelectEmptyLayout
+ sleep 1
+
+ '/// Import picture ///'
+ InsertGraphicsFromFile
+ sleep 3
+ kontext "Active"
+ if Active.Exists Then
+ Active.OK
+ end if
+ sleep 5
+ Kontext "GrafikEinfuegenDlg"
+ sleep 2
+ Dateiname.SetText (ConvertPath(gOfficeBasisPath + "share\gallery\bigapple.gif"))
+ sleep 2
+ Oeffnen.Click
+ printlog "Inserted file"
+ sleep 2
+ '/// Select all ///'
+ EditSelectAll
+ sleep 3
+ '/// Check values and save them ///'
+ FormatPositionAndSize
+ kontext
+ active.SetPage TabPositionAndSize
+ kontext "TabPositionAndSize"
+ ImageWidth = Width.GetText
+ ImageHeight = Height.GetText
+ printlog "Got values from position and size"
+ '/// Check the "Protect Size"-button. And close dialogue. ///'
+ ProtectSize.Check
+ TabPositionAndSize.Ok
+
+ '/// Add Shaddow via Toolbar-Button ///'
+ Kontext "GraphicObjectbar"
+ if GraphicObjectbar.Exists = FALSE then
+ ViewToolbarsPicture
+ endif
+ if schatten.GetState(2) <> 0 then '0 = not pressed. 1 = pressed.
+ warnlog "Shaddow-button shouldnt have been checked"
+ end if
+ sleep 1
+
+ '/// click button 'Shadow' ///'
+ Schatten.Click
+' '/// Check and save Shaddow-values via context-menu ///'
+ EditSelectAll
+ hOpenContextMenu
+ sleep(2)
+ if hMenuFindSelect(10142, true, 4) = false then
+ Warnlog "Context-Menu-entry `Area` was not found. Therefore the test ends."
+ Call hCloseDocument
+ Goto Endsub
+ endif
+ '/// Select Contextmenu entry "Area" ///'
+ sleep(2)
+ kontext "TabArea"
+ '/// Switch to Shaddow-tabpage, do some changes, save them, close dialogue
+ Kontext
+ active.SetPage TabSchatten
+ kontext "TabSchatten"
+ if Anzeigen.isVisible(5) AND Anzeigen.Exists(5) then
+ if Anzeigen.GetState <> 1 then Warnlog "Anzeigen.GetState should be 1, but is: " + Anzeigen.GetState
+ Anzeigen.Check
+ else
+ Warnlog "'Use Shadow' doesn't exist or isn't visible."
+ endif
+
+ '/// Change Distance and Transparency-values ///'
+ Entfernung.More ',2
+ Transparenz.More ',2
+ shadowdistancevalue = Entfernung.GetText
+ shadowcolorvalue = Farbe.GetSelText
+ shadowtransparencyvalue = Transparenz.GetText
+ printlog "Got values from TabArea"
+ TabSchatten.Ok
+
+ '/// Check if it's the same when going over FormatArea ///'
+ FormatArea
+ sleep 1
+ kontext "TabArea"
+ '/// Switch to Shaddow-tabpage, do some changes, save them, close dialogue ///'
+ Kontext
+ active.SetPage TabSchatten
+ kontext "TabSchatten"
+ if Anzeigen.isVisible(5) AND Anzeigen.Exists(5) then
+ if Anzeigen.GetState <> 1 then Warnlog "should be active"
+ Anzeigen.Check
+ else
+ Warnlog "'Use Shadow' doesn't exist or isn't visible."
+ endif
+ if shadowdistancevalue <> Entfernung.GetText then
+ warnlog "Distance value changed. Should be: " + shadowdistancevalue + ". But is: " + Entfernung.gettext
+ endif
+ if shadowcolorvalue <> Farbe.GetSelText then
+ warnlog "Color value changed. Should be: " + shadowcolorvalue + ". But is: " + Farbe.getSeltext
+ endif
+ if shadowtransparencyvalue <> Transparenz.GetText then
+ warnlog "Transparency value changed. Should be: " + shadowtransparencyvalue + ". But is: " + Transparenz.gettext
+ endif
+ TabSchatten.Ok
+
+ '/// Add Cornerstyle via FormatLine ///'
+ FormatLine
+ Kontext
+ Messagebox.SetPage TabLinie
+ kontext "TabLinie"
+ Stil.Select 2 ' Select Continuously.
+ linetype = Stil.GetItemText
+ Farbe.Select 2 ' Select Blue
+ linecolour = Farbe.GetItemText
+ Breite.More 3 ' Set Width to 3
+ linewidth = Breite.Gettext
+ CornerStyle.Select 4 ' Select number four: Beveled
+ cornerstyletype = CornerStyle.GetSelText
+ printlog "Cornerstyle is: " + CornerStyle.GetSelText '+ cornerstyletype
+ TabLinie.ok
+
+ '/// Check values via PositionAndSize via the Contextmenu ///'
+ hOpenContextmenu
+ sleep(2)
+ if hMenuFindSelect(10087, true, 1) = false then
+ Warnlog "Context-Menu-entry `Position and Size` was not found. Therefore the test ends."
+ Call hCloseDocument
+ Goto Endsub
+ endif
+ 'Select "Position and Size"
+ sleep(2)
+ Kontext
+ Active.SetPage TabPositionAndSize
+ Kontext "TabPositionAndSize"
+ if ImageWidth <> Width.GetText then warnlog "Position X differs. Should be: " + ImageWidth + " But is: " + Width.GetText
+ if ImageHeight <> Height.GetText then warnlog "Position Y differs. Should be: " + ImageHeight + " But is: " + Height.GetText
+ TabPositionAndSize.OK
+
+ '/// Check Cornerstyle via FormatLine ///'
+ FormatLine
+ Kontext
+ Messagebox.SetPage TabLinie
+ kontext "TabLinie"
+ if linetype <> Stil.GetItemText then warnlog "Linetype should be: " + linetype + " But is: " + Stil.GetItemText
+ if linecolour <> Farbe.GetItemText then warnlog "Linecolour should be: " + linetype + " But is: " + Farbe.GetItemText
+ if linewidth <> Breite.GetText then warnlog "Linewidth should be: " + linewidth + " But is: " + Breite.GetText
+ if cornerstyletype <> CornerStyle.GetSelText then warnlog "CornerStyle should be: " + cornerstyletype + " But is: " + CornerStyle.GetSelText 'ItemText
+ TabLinie.ok
+
+ '/// Check if the Shaddow-button is activated ///'
+ Kontext "GraphicObjectbar"
+ if Schatten.GetState(2) <> 1 then
+ warnlog "Shaddow-button shouldnt have been checked"
+ endif
+
+ '/// Save the file. Then close the office and reload the file ///'
+ sFileName = ( ConvertPath(gOfficePath + "user\work\shaddow-test"))
+ '/// File-Save As with filter as: "user\temp\shaddow-test" ///'
+ try
+ FileSaveAs
+ Kontext "SpeichernDlg"
+ Dateiname.SetText sFileName
+ printlog "Saving with filter: " + Dateityp.GetSelText
+ Speichern.Click
+ Kontext "Messagebox"
+ if Messagebox.Exists(2) then Messagebox.Yes
+ Kontext "AlienWarning"
+ if AlienWarning.Exists(2) then AlienWarning.OK
+ printlog "Saved as: " + sFileName
+ catch
+ warnlog "Error when saving file."
+ endcatch
+
+ '/// Close the office-session ///'
+ FileClose
+ Kontext "Messagebox"
+ if Messagebox.Exists(2) then Messagebox.Yes
+ Sleep 3
+ '/// Open the saved file ///'
+ try
+ hFileOpen sFileName + "." + ExtensionString
+ Sleep 3
+ printlog "opened file successfully"
+ catch
+ warnlog "Error when opening file."
+ endcatch
+
+ '/// Select all ///'
+ EditSelectAll
+ sleep 2
+
+ '/// Check if the Shaddow-button still is activated ///'
+ kontext "GraphicObjectbar"
+ if schatten.Getstate(2) <> 1 then
+ warnlog "The Shadow-button should be activated"
+ else
+ Printlog "Shaddowbutton activated, good."
+ endif
+
+ '/// Check the attributes for the picture ///'
+ hOpenContextmenu
+ sleep(2)
+ if hMenuFindSelect(10087, true, 1) = false then
+ Warnlog "Context-Menu-entry `Position and Size` was not found. Therefore the test ends."
+ Call hCloseDocument
+ Goto Endsub
+ endif
+ 'Select "Position and Size"
+ sleep(2)
+ Kontext
+ Active.SetPage TabPositionAndSize
+ Kontext "TabPositionAndSize"
+ if ImageWidth <> Width.GetText then warnlog "Position X differs. Should be: " + ImageWidth + " But is: " + Width.GetText
+ if ImageHeight <> Height.GetText then warnlog "Position X differs. Should be: " + ImageHeight + " But is: " + Height.GetText
+ TabPositionAndSize.OK
+
+ FormatArea
+ sleep 1
+ kontext "TabArea"
+ '/// Switch to Shaddow-tabpage, do some changes, save them, close dialogue ///'
+ Kontext
+ active.SetPage TabSchatten
+ kontext "TabSchatten"
+ if Anzeigen.isVisible(5) AND Anzeigen.Exists(5) then
+ if Anzeigen.GetState <> 1 then Warnlog "Shaddow-checkbox should be active"
+ Anzeigen.Check
+ else
+ Warnlog "'Use Shadow' doesn't exist or isn't visible."
+ endif
+ if shadowdistancevalue <> Entfernung.GetText then warnlog "Distance value changed. Should be: " + shadowdistancevalue + ". But is: " + Entfernung.gettext
+ if shadowcolorvalue <> Farbe.GetSelText then warnlog "Color value changed. Should be: " + shadowcolorvalue + ". But is: " + Farbe.gettext
+ if shadowtransparencyvalue <> Transparenz.GetText then warnlog "Transparency value changed. Should be: " + shadowtransparencyvalue + ". But is: " + Transparenz.gettext
+
+ '/// Check Transparency ///'
+ Kontext
+ Active.SetPage TabTransparenz
+ kontext "TabTransparenz"
+ LineareTransparenz.Check
+ shadowtransparencyvalue = MFLinTransparenz.GetText
+
+ sleep 2
+ Kontext
+ active.SetPage TabSchatten
+ kontext "TabSchatten"
+ TabSchatten.Ok
+
+ '/// Check Cornerstyle via FormatLine ///'
+ FormatLine
+ Kontext
+ Messagebox.SetPage TabLinie
+ kontext "TabLinie"
+ if linetype <> Stil.GetItemText then warnlog "Linetype should be: " + linetype + " But is: " + Stil.GetItemText
+ if linecolour <> Farbe.GetItemText then warnlog "Linecolour should be: " + linetype + " But is: " + Farbe.GetItemText
+ if linewidth <> Breite.GetText then warnlog "Linewidth should be: " + linewidth + " But is: " + Breite.GetText
+ if cornerstyletype <> CornerStyle.GetSelText then warnlog "CornerStyle should be: " + cornerstyletype + " But is: " + CornerStyle.GetSelText 'ItemText
+ TabLinie.ok
+
+ '/// If Impress: Save as Powerpoint-file. If Draw: Save as usual Draw-file. ///'
+ if (gApplication = "IMPRESS") then
+ ExtensionString = "ppt"
+ else
+ ExtensionString = "odg"
+ end if
+
+ sFileName = ( ConvertPath(gOfficePath + "user\work\shaddow-test"))
+
+ FileSaveAs
+ Kontext "SpeichernDlg"
+ Dateiname.SetText sFileName
+ if (gApplication = "IMPRESS") then
+ Dateityp.Select 5 ' Powerpoint
+ printlog "Trying to save with filter: " + Dateityp.GetSelText + sFilter(5)
+ else
+ Dateityp.Select 1
+ printlog "Trying to save with filter: " + Dateityp.GetSelText + sFilter(1)
+ endif
+ Speichern.Click
+ Kontext "Messagebox"
+ if Messagebox.Exists(2) then Messagebox.Yes
+ Kontext "AlienWarning"
+ if AlienWarning.Exists(2) then AlienWarning.OK
+ printlog "Saved as: " + sFileName
+ Sleep 3
+
+ '/// Close the office and reload the file ///'
+ FileClose
+ Kontext "Messagebox"
+ if Messagebox.Exists(2) then Messagebox.Yes
+ Sleep 3
+ '/// Open the saved file ///'
+ hFileOpen (sFileName + "." + ExtensionString)
+ printlog "File opened: " + sFileName + "." + ExtensionString
+ Sleep 3
+ '/// Select all ///'
+ EditSelectAll
+
+ '/// Check the attributes for the picture ///'
+ hOpenContextmenu
+ sleep(2)
+ if hMenuFindSelect(10087, true, 1) = false then
+ Warnlog "Context-Menu-entry `Position and Size` was not found. Therefore the test ends."
+ Call hCloseDocument
+ Goto Endsub
+ endif
+ 'Select "Position and Size"
+ sleep(2)
+ Kontext
+ Active.SetPage TabPositionAndSize
+ Kontext "TabPositionAndSize"
+ if ImageWidth <> Width.GetText then warnlog "Position X differs. Should be: " + ImageWidth + " But is: " + Width.GetText
+ if ImageHeight <> Height.GetText then warnlog "Position X differs. Should be: " + ImageHeight + " But is: " + Height.GetText
+ TabPositionAndSize.OK
+
+ '/// Check if transparency has disappeared and if the cornerstyle has changed ///'
+ FormatArea
+ Kontext
+ Messagebox.SetPage TabTransparenz
+ kontext "TabTransparenz"
+ if (gApplication = "DRAW") then
+ if LineareTransparenz.Ischecked = FALSE then
+ warnlog "Transparency should have been checked!"
+ if MFLinTransparenz.GetText <> shadowtransparencyvalue then warnlog "Transparency-value should NOT have changed"
+ KeineTransparenz.Check
+ end if
+ endif
+ if (gApplication = "DRAW") then
+ if LineareTransparenz.Ischecked = FALSE then
+ warnlog "Transparency should have been checked!"
+ if MFLinTransparenz.GetText <> shadowtransparencyvalue then warnlog "Transparency-value should NOT have changed"
+ KeineTransparenz.Check
+ end if
+ endif
+ if (gApplication = "IMPRESS") then
+ if LineareTransparenz.Ischecked =TRUE then
+ printlog "Transparency contained in newer ppt files, ok.!"
+ if MFLinTransparenz.GetText <> shadowtransparencyvalue then warnlog "Transparency-value should NOT have changed"
+ KeineTransparenz.Check
+ end if
+ endif
+
+ TabTransparenz.Cancel
+
+ '/// Check Cornerstyle via FormatLine ///'
+ FormatLine
+ Kontext
+ Messagebox.SetPage TabLinie
+ kontext "TabLinie"
+ if linetype <> Stil.GetItemText then warnlog "Linetype should be: " + linetype + " But is: " + Stil.GetItemText
+ if linecolour <> Farbe.GetItemText then warnlog "Linecolour should be: " + linetype + " But is: " + Farbe.GetItemText
+ if linewidth <> Breite.GetText then warnlog "Linewidth should be: " + linewidth + " But is: " + Breite.GetText
+ if cornerstyletype <> CornerStyle.GetSelText then warnlog "CornerStyle should be: " + cornerstyletype + " But is: " + CornerStyle.GetSelText 'ItemText
+ TabLinie.ok
+
+ '/// Remove the Shaddow, Transparency and Cornerstyle ///'
+ FormatArea
+ Kontext
+ Messagebox.SetPage TabTransparenz
+ kontext "TabTransparenz"
+ KeineTransparenz.Check
+ sleep 1
+ kontext "TabArea"
+ '/// Switch to Shaddow-tabpage, do some changes, save them, close dialogue ///'
+ Kontext
+ active.SetPage TabSchatten
+ kontext "TabSchatten"
+ Anzeigen.UnCheck
+ TabSchatten.Ok
+
+ '/// If Impress: Save as Powerpoint-file. If Draw: Save as usual Draw-file. ///'
+ if (gApplication = "IMPRESS") then
+ ExtensionString = "ppt"
+ else
+ ExtensionString = "odg"
+ end if
+ sFileName = ( ConvertPath(gOfficePath + "user\work\shaddow-test"))
+
+ FileSaveAs
+ Kontext "SpeichernDlg"
+ Dateiname.SetText sFileName
+ if (gApplication = "IMPRESS") then
+ Dateityp.Select 5 ' Powerpoint
+ printlog "Trying to save with filter: " + Dateityp.GetSelText + sFilter(5)
+ else
+ Dateityp.Select 1
+ printlog "Trying to save with filter: " + Dateityp.GetSelText + sFilter(1)
+ endif
+ Speichern.Click
+ Kontext "Messagebox"
+ if Messagebox.Exists(2) then Messagebox.Yes
+ Kontext "AlienWarning"
+ if AlienWarning.Exists(2) then AlienWarning.OK
+ printlog "Saved as: " + sFileName
+ Sleep 3
+
+ '/// Close the office-session ///'
+ FileClose
+ Kontext "Messagebox"
+ if Messagebox.Exists(2) then Messagebox.Yes
+ Sleep 3
+ '/// Open the saved file ///'
+ hFileOpen (sFileName + "." + ExtensionString)
+ printlog "File opened: " + sFileName + "." + ExtensionString
+ Sleep 3
+ '/// Select all ///'
+ EditSelectAll
+
+ '/// Check the attributes for the picture ///'
+ hOpenContextmenu
+ sleep(2)
+ if hMenuFindSelect(10087, true, 1) = false then
+ Warnlog "Context-Menu-entry `Position and Size` was not found. Therefore the test ends."
+ Call hCloseDocument
+ Goto Endsub
+ endif
+ 'Select "Position and Size"
+ sleep(2)
+ Kontext
+ Active.SetPage TabPositionAndSize
+ Kontext "TabPositionAndSize"
+ if ImageWidth <> Width.GetText then warnlog "Position X differs. Should be: " + ImageWidth + " But is: " + Width.GetText
+ if ImageHeight <> Height.GetText then warnlog "Position X differs. Should be: " + ImageHeight + " But is: " + Height.GetText
+ TabPositionAndSize.OK
+
+ '/// Check if transparency has disappeared ///'
+ FormatArea
+ Kontext
+ Messagebox.SetPage TabTransparenz
+ kontext "TabTransparenz"
+ if LineareTransparenz.Ischecked <> FALSE then
+ warnlog "Transparency should NOT have been checked!"
+ if MFLinTransparenz.GetText <> shadowtransparencyvalue then warnlog "Transparency-value should NOT have changed"
+ LineareTransparenz.UnCheck
+ end if
+ TabTransparenz.Cancel
+
+ '/// Check if the cornerstyle has changed via FormatLine ///'
+ FormatLine
+ Kontext
+ Messagebox.SetPage TabLinie
+ kontext "TabLinie"
+ if linetype <> Stil.GetItemText then warnlog "Linetype should be: " + linetype + " But is: " + Stil.GetItemText
+ if linecolour <> Farbe.GetItemText then warnlog "Linecolour should be: " + linetype + " But is: " + Farbe.GetItemText
+ if linewidth <> Breite.GetText then warnlog "Linewidth should be: " + linewidth + " But is: " + Breite.GetText
+ if cornerstyletype <> CornerStyle.GetSelText then warnlog "CornerStyle should be: " + cornerstyletype + " But is: " + CornerStyle.GetSelText 'ItemText
+ TabLinie.ok
+
+ '/// Close application ///'
+ Call hCloseDocument
+ Printlog "Finished Shaddow-test for " + gApplication
+
+endcase ' tiShaddow
diff --git a/testautomation/graphics/optional/includes/global/g_slidelayer.inc b/testautomation/graphics/optional/includes/global/g_slidelayer.inc
new file mode 100644
index 000000000000..a28526305d75
--- /dev/null
+++ b/testautomation/graphics/optional/includes/global/g_slidelayer.inc
@@ -0,0 +1,92 @@
+'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
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* Owner : wolfram.garten@oracle.com
+'*
+'* short description :
+'*
+'**************************************************************************************
+' #1 tInsertSlide
+' #1 tInsertDuplicateSlide
+' #1 tInsertLayer
+'\*************************************************************************************
+
+testcase tInsertSlide
+ Call hNewDocument
+ InsertSlide
+ sleep 2
+ hTypekeys "<Pagedown>"
+ sleep 2
+ try
+ EditDeleteSlide
+ PrintLog "Slide 2 deleted"
+ catch
+ sleep 2
+ WarnLog "No slide was inserted"
+ endcatch
+ hCloseDocument
+endcase
+
+testcase tInsertDuplicateSlide
+ Call hNewDocument
+ sleep 2
+ hRechteckErstellen ( 10, 10, 50, 50 )
+ sleep 2
+ InsertDuplicateSlide
+ try
+ EditSelectAll
+ sleep 2
+ hTypeKeys "<DELETE>"
+ PrintLog "Slide duplicated"
+ catch
+ Warnlog " Slide not duplicated"
+ endcatch
+ try
+ EditDeleteSlide
+ catch
+ WarnLog "Error when deleting. Slide is not duplicated ??"
+ endcatch
+ hCloseDocument
+endcase
+
+testcase tInsertLayer
+ Call hNewDocument
+ sleep 2
+ ViewLayer
+ InsertLayer
+ Kontext "EbeneEinfuegenDlg"
+ EbeneEinfuegenDlg.OK
+ sleep 2
+ try
+ EditDeleteLayer
+ Kontext "Active"
+ Active.Yes
+ catch
+ WarnLog "There is no avaiable additional layer to delete"
+ endcatch
+ hCloseDocument
+endcase
diff --git a/testautomation/graphics/optional/includes/global/g_spellcheck.inc b/testautomation/graphics/optional/includes/global/g_spellcheck.inc
new file mode 100644
index 000000000000..1c82bf3921c3
--- /dev/null
+++ b/testautomation/graphics/optional/includes/global/g_spellcheck.inc
@@ -0,0 +1,917 @@
+'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
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* Owner : wolfram.garten@oracle.com
+'*
+'* short description :
+'*
+'*******************************************************************
+'*
+' #1 tiToolsSpellcheckCorrect
+' #1 tiToolsSpellcheckError
+' #1 tiToolsSpellcheckCheck
+' #1 tToolsSpellcheckAutoSpellcheck
+'*
+'\*******************************************************************
+testcase tiToolsSpellcheckCorrect
+ if iSprache = 48 then
+ qaerrorlog "This test is not adapted for polish, 48."
+ got endsub
+ endif
+
+ Dim DieDatei as String
+ dim lFiles(100) as string
+ dim i as integer
+ dim iFiles as integer
+
+ lFiles(0)=0
+ Printlog "- Checking Dictionary-Files" ' borrowed from w_106.inc
+ select case iSprache
+ case 01 : DieDatei = "01-44-hyph.dat"
+ case else : DieDatei = "" & iSprache & "-hyph.dat"
+ end select
+ DieDatei = Convertpath(gNetzOfficePath + "share\dict\" + DieDatei)
+ if gPlatGroup <> "unx" then
+ if (Dir(DieDatei) = "") then
+ if bAsianLan then
+ printlog "Dictionary not found : " + DieDatei + ", but is AsianLan, so OK :-)"
+ else
+ if gNetzInst then
+ printlog "Dictionary not found : " + DieDatei
+ else
+ warnlog "Dictionary not found : " + DieDatei
+ end if
+ end if
+ else
+ Printlog " Dictionary has been installed : " + DieDatei
+ end if
+ end if
+ iFiles = GetFileList (Convertpath (gNetzOfficePath + "share\dict\"), "*.dat" ,lFiles())
+ for i = 1 to iFiles
+ printlog " " + i + ": " + DateiExtract(lFiles(i))
+ next i
+
+ Call hNewDocument
+ ' sleep 2
+ ToolsSpellcheck
+ Kontext "Active"
+ if Active.Exists(5) then
+ try
+ printlog "Message: Finished: Want to continue at the beginning? '" + active.gettext + "'"
+ Active.No
+ catch
+ Warnlog "The Active-dialoge didn't have a No-button, tries with OK instead."
+ Active.Ok
+ endcatch
+ else
+ Warnlog "No 'Spellcheck finished, do you wish to continue?' message appeared"
+ end if
+ sleep 2
+
+ PrintLog "- Spellcheck with correct text"
+ select case iSprache
+ case 01 : hTextrahmenErstellen ("This is a text without any error.<Return>",10,10,50,20)
+ case 33 : hTextrahmenErstellen ("Il nous faut donc un de temps pour examiner avec soin tous les dossiers.<Return>",10,10,70,20)
+ case 34 : hTextrahmenErstellen ("Este es un chico muy importante.",10,10,50,20)
+ case 36 : hTextrahmenErstellen ("akit a b�r�s�g vagy a szab�lys�rt�si hat�s�g a eltiltott",10,10,70,20)
+ case 39 : hTextrahmenErstellen ("La ringraziamo per l'interesse mostrato a collaborare con la firma.<Return>",10,10,70,20)
+ case 46 : hTextrahmenErstellen ("Det varierar vad som behandlas och ur vilket perspektiv.<Return>",10,10,50,20)
+ case 49 : hTextrahmenErstellen ("Dies ist ein Text ohne Fehler.<Return>",10,10,50,20)
+ case 50 : hTextrahmenErstellen ("To je besedilo brez napake.<Return>",10,10,50,20)
+ case 55 : hTextrahmenErstellen ("Esta poderia ser a resposta para suas preces?<Return>",10,10,50,20)
+ case else :
+ if bAsianLan then
+ printlog "For the language " + iSprache +" nothing is prepared yet, but is AsianLan, so OK :-) will use english instaed"
+ ' there was smth wrong, try to find out :
+ kontext
+ if active.exists then
+ printlog "ERROR: active: '"+active.gettext+"'"
+ active.ok
+ end if
+ hTextrahmenErstellen ("This is a text without any error.<Return>",10,10,50,20)
+ else
+ Warnlog "For the language " + iSprache +" nothing is prepared yet: insert text here"
+ hTextrahmenErstellen ("This is a text without any error.<Return>",10,10,50,20)
+ end if
+ end select
+ ToolsSpellcheck
+ WaitSlot (2000)
+ Kontext "Active"
+ if active.exists(5) then
+ printlog "Message: spellchecking has finished?: '" + active.gettext + "'"
+ Active.OK
+ else
+ errorLog "Spellcheck started :"
+ Kontext "Spellcheck"
+ if Spellcheck.exists then
+ errorlog " - spellcheck came up and will be closed now"
+ Spellcheck.Close
+ else
+ printlog "spellcheck didn't come up"
+ end if
+ end if
+ WaitSlot (2000)
+ Call hCloseDocument
+endcase 'tiToolsSpellcheckCorrect
+
+'------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+testcase tiToolsSpellcheckError
+ if iSprache = 48 then
+ qaerrorlog "This test is not adapted for polish, 48."
+ got endsub
+ endif
+ Dim Fehler$
+ Dim Sprachenname$
+ Dim Dummy$
+ Dim FehlerText$
+ Dim i as integer
+
+ printlog "New document"
+ Call hNewDocument
+ printlog "Selecting language case: " & iSprache
+ select case iSprache
+ case 01 : FehlerText$ = "Thatt is a failure test." : Fehler$ = "Thatt" : Sprachenname$ = "English (US)"
+ case 34 : FehlerText$ = "Ezte es un chico muy importante." : Fehler$ = "Ezte" : Sprachenname$ = "Niederlaendisch"
+ case 33 : FehlerText$ = "Ler nous faut donc un de temps pour examiner." : Fehler$ = "Ler" : Sprachenname$ = "Franzoesisch"
+ case 36 : FehlerText$ = "Boszniai americkai kontingens háromnegyedesek – mintegy négyezer katona – magyarországi telepítése egy éven belül megtörténhet" : Fehler$ = "tellepítésel" : Sprachenname$ = "Ungarisch"
+ case 39 : FehlerText$ = "Ringrarziamo per l'interessa mostrato a collaborare con la firma." : Fehler$ = "Ringrarziamo" : Sprachenname$ = "Italienisch"
+ case 46 : FehlerText$ = "Detd varierar vad som behandlas och ur vilket perspektiv." : Fehler$ = "Detd" : Sprachenname$ = "Schwedisch"
+ case 49 : FehlerText$ = "Diees ist ein Fehler." : Fehler$ = "Diees" : Sprachenname$ = "Deutsch"
+ case 50 : FehlerText$ = "Toje napaka, ker manjka presledek." : Fehler$ = "Toje" : Sprachenname$ = "Slovenščina"
+ case 55 : FehlerText$ = "Eesta poderia ser a resposta para suas preces?": Fehler$ = "Eesta" : Sprachenname$ = "Portugiesisch"
+ case else :
+ if bAsianLan then
+ printlog "For the language " + iSprache +" nothing is prepared yet, but is AsianLan, so OK :-) using english"
+ FehlerText$ = "Thatt is a failure test."
+ Fehler$ = "Thatt"
+ Sprachenname$ = "English (US)"
+ call hSetSpellHypLanguage
+ else
+ Warnlog "For the language " + iSprache +" nothing is prepared yet: insert text here"
+ end if
+ end select
+ printlog "Error Text taken for testing is: " & FehlerText$
+ sleep 2
+
+ printlog "Delete ignore word list"
+ if (not wIgnorierenlisteLoeschen) then
+ qaErrorLog "Can't get into Dictionary lists"
+ goto endsub
+ end if
+ printlog "Setting doc language to english"
+ ToolsOptions
+ Kontext "ExtrasOptionenDlg"
+ hToolsOptions("LANGUAGESETTINGS","Languages")
+ Westlich.Select 34
+ Kontext "ExtrasOptionenDlg"
+ ExtrasOptionenDlg.OK
+ printlog "Create 1 textbox with 1 spelling error (test replace always)"
+ hTextrahmenErstellen (FehlerText$,30,30,90,40)
+
+ hTypeKeys "<HOME>"
+ printlog "Call 'Tools->Spellcheck->Check'"
+ ToolsSpellcheck
+ printlog "Spellcheck dialog has to come up, wrong word is selected."
+ Kontext "Spellcheck"
+ if Spellcheck.Exists then
+ printlog "There has to be at least ONE suggestion."
+ if (Suggestions.GetItemCount < 1) then
+ printlog "If no suggestion avilable:"
+ warnlog " - no suggestion for the language: "+DictionaryLanguage.GetSelIndex+" '"+DictionaryLanguage.GetSelText+"' , press check button..."
+ printlog "+ press button 'Check word'"
+ Pruefen.click
+ if (Suggestions.GetItemCount < 1) then
+ warnlog " STILL no suggestions :-( errors will follow "
+ else
+ printlog " - now suggestion for the language: "+DictionaryLanguage.GetSelIndex+" '"+DictionaryLanguage.GetSelText+"'" + Suggestions.GetItemCount
+ end if
+ end if
+ Dummy$=Suggestions.GetItemText (1)
+ printlog "Select first spellcheck suggestion (click it!)."
+ Suggestions.Select (1)
+ printlog "Check if textfield 'word' has changed to selected word."
+ if (Suggestions.GetSelText <> Dummy$) Then
+ Warnlog "Suggestion not used"
+ else
+ Printlog "Suggestion is used"
+ end if
+ sleep 1
+ kontext "Spellcheck"
+ printlog "click button 'Always replace'"
+ ChangeAll.Click
+ printlog "spellcheck dialog has to disappear and"
+ printlog "There has to come up only one active: 'Spellcheck of entire document has been completed [OK]'"
+ Kontext "Active"
+ if Active.Exists(5) then
+ Printlog "Message: Spellchecking has finished?: '" + active.gettext + "'"
+ Active.OK
+ else
+ Printlog "'Change All' seems to have worked correctly."
+ Kontext "Spellcheck"
+ Spellcheck.Close
+ Kontext "Active"
+ if active.exists(5) then
+ Printlog "Spellcheck dialog closed'" + active.gettext + "'"
+ Active.OK
+ else
+ Printlog "Spellcheck dialog closed'"
+ end if
+ end if
+ else
+ Warnlog " Error not recognized by the Spellchecker"
+ if active.exists(5) then
+ Kontext "Active"
+ printlog "Message: spellchecking has finished?: '" + active.gettext + "'"
+ Active.OK
+ end if
+ end if
+
+ printlog "delete textbox"
+ EditSelectAll
+ hTypeKeys "<DELETE>"
+ sleep 1
+
+ printlog "Create same textbox again (test IGNORE function)."
+ Printlog "Check function Ignore"
+ hTextrahmenErstellen (FehlerText$,30,30,80,40)
+ printlog "All 'Tools->Spellcheck->Check'."
+
+ 'printlog "Setting Text to english"
+ 'sleep 1
+ 'EditSelectAll
+ 'FormatCharacter
+ 'sleep 1
+ 'Kontext
+ 'Messagebox.SetPage TabFont
+ 'Kontext "TabFont"
+ 'Language.Select 41
+ 'TabFont.OK
+
+ ToolsSpellcheck
+ Kontext "Spellcheck"
+ printlog "press button 'Ignore'"
+ IgnoreOnce.Click
+ printlog "spellcheck dialog has to disappear and "
+ printlog " There has to come up only one active: 'Spellcheck of entire document has been completed [OK]'."
+ Kontext "Active"
+ if Active.Exists(5) Then
+ Printlog " Spellcheck ended because of only 1 defined error. And Ignore worked.'" + active.gettext + "'"
+ Active.OK
+ else
+ Printlog " 'Ignore Once' seems to work correctly."
+ Kontext "Spellcheck"
+ Spellcheck.Close
+ Kontext "Active"
+ if active.exists(5) then
+ Printlog " Spellcheck dialog closed'" + active.gettext + "'"
+ Active.OK
+ else
+ Printlog " Spellcheck dialog closed'"
+ end if
+ end if
+
+ printlog "Call 'Tools->Spellcheck->Check."
+ ToolsSpellcheck
+ Kontext "Spellcheck"
+ if Spellcheck.Exists Then
+ Printlog " Ignore worked"
+ Spellcheck.Close
+ Kontext "Active"
+ if active.exists(5) then
+ Printlog " " + active.gettext + "'"
+ Active.OK
+ else
+ Printlog " Spellcheck dialog closed'"
+ end if
+ else
+ Warnlog " Spellcheck ended even we only ignored the error"
+ end if
+
+ printlog "delete textbox."
+ EditSelectAll
+ hTypeKeys "<DELETE>"
+ sleep 1
+
+ printlog "create same textbox again (test ALWAYS IGNORE function)."
+ hTextrahmenErstellen (FehlerText$,30,30,60,40)
+
+ 'printlog "Setting Text to english"
+ 'sleep 1
+ 'EditSelectAll
+ 'FormatCharacter
+ 'sleep 1
+ 'Kontext
+ 'Messagebox.SetPage TabFont
+ 'Kontext "TabFont"
+ 'Language.Select 41
+ 'TabFont.OK
+
+ printlog "Call 'Tools->Spellcheck->Check'."
+ ToolsSpellcheck
+ Kontext "Spellcheck"
+ printlog "click button 'Always Ignore."
+ IgnoreAll.Click
+ printlog "spellcheck dialog has to disappear and"
+ printlog "There has to come up only one active: 'Spellcheck of entire document has been completed [OK]'."
+ Kontext "Active"
+ if active.exists(5) then
+ Printlog " Spellcheck ended because of only 1 defined error. And Ignore worked.'" + active.gettext + "'"
+ Active.OK
+ else
+ Printlog " 'Ignore All' seems to work."
+ Kontext "Spellcheck"
+ Spellcheck.Close
+ Kontext "Active"
+ if active.exists(5) then
+ Printlog " Spellcheck dialog closed'" + active.gettext + "'"
+ Active.OK
+ else
+ Printlog " Spellcheck dialog closed'"
+ end if
+ end if
+
+ Printlog "- Delete ignore list"
+ sleep 1
+ printlog "Delete ignore word list."
+ if (not wIgnorierenlisteLoeschen) then
+ qaErrorLog "Can't get into Dictionary lists"
+ goto endsub
+ end if
+ Call hCloseDocument
+endcase 'tiToolsSpellcheckError
+
+'------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+testcase tiToolsSpellcheckCheck
+ if iSprache = 48 then
+ qaerrorlog "This test is not adapted for polish, 48."
+ got endsub
+ endif
+ Dim Datei$
+ Dim sWord(2) as string
+ Dim i as integer
+ Dim j as integer
+ Dim s as integer
+ Dim AlleBuecher as integer
+ Dim sExt as string
+ Dim sWordOne as string
+ Dim sWordTwo as string
+ Dim iBooks as integer
+ Dim bWordFound(2) as boolean
+ Dim iSuggestions as integer
+ Dim iWord(2) as integer
+ Dim bFound as boolean
+
+ Select Case Ucase(gApplication)
+ case "DRAW" : sExt = ".odg"
+ case "IMPRESS" : sExt = ".odp"
+ end select
+
+ printlog "Load prepared document containing 4 errors : graphics\\required\\input\\recht_" & iSprache & sExt
+ if (not bAsianLan) then
+ printlog "Check if the document is writable."
+ Call hFileOpen (gTesttoolpath + "graphics\required\input\recht_"+iSprache+sExt)
+ else
+ Call hFileOpen (gTesttoolpath + "graphics\required\input\recht_1"+sExt)
+ end if
+ if fIsDocumentWritable = false then
+ printlog "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
+ end if
+ end if
+ select case iSprache ' sWord(1)=red : sWord(2)=turquoise
+ case 01 : sWord(1) = "documente" : sWord(2) = "expriss"
+ case 33 : sWord(1) = "intercu" : sWord(2) = "Lees"
+ case 34 : sWord(1) = "afekto" : sWord(2) = "fratternal"
+ case 36 : sWord(1) = "szeerint" : sWord(2) = "tervvezi"
+ case 39 : sWord(1) = "Millano" : sWord(2) = "tarrget"
+ case 46 : sWord(1) = "desa" : sWord(2) = "occh"
+ case 49 : sWord(1) = "Texxt" : sWord(2) = "reichtt"
+ case 50 : sWord(1) = "Bsedilo" : sWord(2) = "zadosča"
+ case 55 : sWord(1) = "esktava" : sWord(2) = "noitee"
+ case else :
+ if bAsianLan then
+ sWord(1) = "documente" : sWord(2) = "expriss"
+ else
+ Warnlog "For the language " + iSprache +" nothing is prepared yet: insert text here and create the file"
+ end if
+ end select
+ sleep 2
+
+ Printlog "Delete all added words from dictionaries."
+ printlog "Call Tools->Options."
+ ToolsOptions
+ printlog "Select in category 'Languagesettings' entry 'Writing Aids.'"
+ hToolsOptions ("LANGUAGESETTINGS","WRITINGAIDS")
+ sleep 1
+ Kontext "WRITINGAIDS"
+ sleep 1
+ printlog "Click on button 'edit' in section 'User-defined dictionaries.'"
+ if (fGetIntoDictionary) then
+ qaErrorLog "wTSC"
+ goto endsub
+ end if
+ Kontext "BenutzerwoerterbuchBearbeiten"
+ sleep 1
+ printlog "Check every book, if it contains the words that will be added in this test."
+ iBooks = Buch.getItemCount
+ bWordFound(1) = false
+ bWordFound(2) = false
+ for i = 1 to iBooks
+ Buch.select(i)
+ printlog "Items in Booklist: " & WordList.getItemCount
+ for j = 1 to 2
+ Wort.setText sWord(j)
+ sleep 1
+ if ((not neu.isEnabled) and Loeschen.isEnabled) then
+ printlog "If it contains the word, press button 'delete'."
+ Loeschen.click
+ bWordFound(j) = true
+ printlog "Added word WAS in dictionary: '" + Buch.getSelText + "' - '" + sWord(j) + "'"
+ end if
+ next j
+ next i
+ if (bWordFound(1) OR bWordFound(2))then
+ qaErrorLog "Word was found in dictionary - check why it was there. '" + sWord(1) + "': " + bWordFound(1) + " '" + sWord(2) + "': " + bWordFound(2)
+ end if
+ printlog "Close dialog 'Edit Custom Dictionary.'"
+ BenutzerwoerterbuchBearbeiten.Close
+ sleep 1
+ Kontext "ExtrasOptionenDlg"
+ printlog "Press button 'OK' on dialog 'Writing Aids'."
+ ExtrasOptionenDlg.OK
+ printlog "Call dialog again and delete all remaining words from dictionary 'IgnoreAllList'."
+ if (not wIgnorierenlisteLoeschen) then
+ qaErrorLog "Can't get into Dictionary lists"
+ goto endsub
+ end if
+
+ printlog "Test if spellcheck dialog comes up and check/set direction of spellcheck."
+ printlog "Call 'Tools->Spellcheck->Check'."
+ ToolsSpellcheck
+ Kontext "Spellcheck"
+ WaitSlot (1000)
+ printlog "If no dictionary for the language is available, a messagebox comes up:"
+ printlog ". . . 'Error executing the spellcheck.: Language is not supported by spellchecker funtion."
+ kontext "active"
+ if active.exists(5) then
+ warnlog "$Language is not supported by spellchecker funtion: '" + active.gettext + "'"
+ Active.OK
+ printlog ". . . exiting testcase."
+ goto endsub
+ end if
+ Kontext "Spellcheck"
+ printlog "Close dialog 'Spellcheck'."
+ Spellcheck.Close
+ Kontext "Active"
+ if active.exists(5) then
+ Warnlog " Should not be any message here: " + active.gettext + "'"
+ Active.OK
+ else
+ printlog "Spellcheck ended, dialog closed"
+ end if
+ printlog "Select all."
+ hTypeKeys "<MOD1 A>"
+ printlog "Check presupposition: 12 Words have to be complained about."
+ printlog "All 'Tools->Spellcheck->Check'."
+ ToolsSpellcheck
+ WaitSlot (2000)
+ Kontext "Spellcheck"
+ printlog "Click button 'Ignore' 12 times."
+
+ for i = 1 to 11
+ Kontext "Spellcheck"
+ IgnoreOnce.Click
+ Kontext "Active"
+ if active.exists(5) then
+ warnlog "Presupposition not met: there are less than 12 errors in the document! " + i
+ Active.OK
+ printlog "If errors < 12 -> exiting testcase."
+ goto endsub
+ end if
+ next i
+ Kontext "Spellcheck"
+ IgnoreOnce.Click
+ printlog "Spellcheck dialog has to disapear and messagebox with OK has to come up."
+ Kontext "Active"
+ if active.exists(5) then
+ printlog "Active dialog said: " + active.gettext + "'"
+ Active.OK
+ end if
+ Kontext "Spellcheck"
+ if Spellcheck.Exists(5) then
+ warnlog "Presupposition not met: there are more than 12 errors in the document!"
+ Spellcheck.Close
+ kontext "Active"
+ if active.exists(5) then
+ Active.OK
+ else
+ printlog "bug fixed #111972# "
+ end if
+ printlog "If errors > 12 -> exiting testcase."
+ goto endsub
+ else
+ Kontext "Active"
+ if active.exists(5) then
+ warnlog "There was a Message where none was supposed to be: '" + active.gettext + "'"
+ Active.NO
+ end if
+ printlog "Presupposition met: there are 12 errors in the document!"
+ end if
+
+ printlog "Perform the test now:"
+ printlog "Call 'Tools->Spellcheck->Check'"
+ ToolsSpellcheck
+ WaitSlot (2000)
+ Kontext "Spellcheck"
+ Printlog "----------------------------------------------------------------------------"
+ Printlog "1st Test: - Ignore now"
+ printlog "1st error: ignore : 1st pink word in 1st Paragraph."
+ printlog "Backwards: last green word in 3rd Paragraph."
+ sWordOne = Suggestions.GetSelText
+ printlog "********* Suggestion word found: '" + sWordOne + "'"
+ printlog "##### suggestions: "+Suggestions.GetItemCount+"; Language: "+DictionaryLanguage.getSelText '+" ; dictionary: "+woerterbuch.getSelText
+ if (Suggestions.GetItemCount > 0) then
+ printlog "----- "+i+": "+Suggestions.GetSelText (1)
+ end if
+ printlog "Click button 'Ignore'."
+ IgnoreOnce.Click
+ Sleep 2
+
+ Printlog "----------------------------------------------------------------------------"
+ Printlog "2nd Test: - Add"
+ printlog "2nd error: add : 1st red word in 1st Paragraph -> hasn't to show up anymore from now on."
+ printlog "Backwards: last turquoise word in 3rd Paragraph -> hasn't to show up anymore from now on."
+ printlog "Check if word in textfield 'Word' changed."
+ printlog "(Check if it is the expected next error - you have to look into the source code for the right word!)."
+ sWordTwo = Suggestions.GetSelText
+ if (sWordOne = sWordTwo) then
+ warnlog "Ignore didn't work? Spellcheck didn't go on"
+ end if
+ if (sWord(iWord(1)) <> sWordTwo) then
+ Printlog "The errornous word '" + sWord(iWord(1)) + "' would be replaced with: '" + sWordTwo + "'"
+ end if
+ printlog "********* word found: '" + sWordTwo + "'"
+ printlog "##### suggestions: "+Suggestions.GetItemCount+"; Language: "+DictionaryLanguage.getSelText ' +" ; dictionary: "+woerterbuch.getSelText
+ if (Suggestions.GetItemCount > 0) then
+ printlog "----- "+i+": "+Suggestions.GetSelText (1)
+ end if
+ Sleep 1
+ printlog "Click button 'Add' on dialog '"
+ AddToDictionary.Click
+ Sleep 2
+ printlog "The menu has: " + MenuGetItemCount + " entries."
+ hMenuSelectNr(1) 'Default
+ Kontext "Active"
+ if Active.Exists(5) Then
+ Warnlog " - Word could not be added to dictionary: '" + active.getText + "'"
+ Active.OK
+ Sleep 1
+ end if
+ printlog "Check in options, if word exists in word list."
+ printlog "Click button 'Options' on dialog 'Spellcheck'."
+ Kontext "Spellcheck"
+ SpellcheckOptions.Click
+ Kontext "TabLinguistik"
+ printlog "Click button 'Edit ...' on dialog 'Writing Aids' in section 'User-defined dictionaries'."
+ if TabLinguistik.exists(5) then
+ sleep 3
+ if (fGetIntoDictionary) then
+ qaErrorLog "wTSC"
+ goto endsub
+ end if
+ else
+ qaerrorlog "baeh"
+ end if
+ Kontext "BenutzerwoerterbuchBearbeiten"
+ printlog "Check every book, if it contains the added word."
+ if not BenutzerwoerterbuchBearbeiten.exists(5) then
+ sleep 5
+ qaerrorlog "baeh"
+ end if
+ iBooks = Buch.getItemCount
+ bWordFound(1) = false
+ for i = 1 to iBooks
+ Buch.select(i)
+ printlog "Book number selected: " & i
+ Wort.setText sWord(iWord(1))
+ sleep 1
+ if ((not neu.isEnabled) and Loeschen.isEnabled) then
+ bWordFound(1) = true
+ printlog "Added word is in dictionary: '" + Buch.getSelText + "'"
+ end if
+ next i
+ if (not bWordFound(1)) then
+ warnlog "Word was not added to dictionary"
+ end if
+ printlog "Cancel dialog 'Edit Custom Dictionary'."
+ BenutzerwoerterbuchBearbeiten.Close
+ Kontext "TabLinguistik"
+ printlog "Cancel dialog 'Writing Aids'."
+ TabLinguistik.Close
+ Kontext "Spellcheck"
+
+ Printlog "----------------------------------------------------------------------------"
+ Printlog " 3rd Test: - Always Ignore"
+ printlog "3rd error: always ignore : 1st turquoise word in 1st Paragraph -> hasn't to show up anymore from now on."
+ printlog "Check if word in textfield 'Word' changed."
+ printlog "(check if it is the expected next error - you have to look into the source code for the right word!)"
+ sWordOne = sWordTwo
+ sWordTwo = Suggestions.GetSelText 'wort.getText
+ if (sWordOne = sWordTwo) then
+ warnlog "Add didn't work? Spellcheck didn't go on."
+ end if
+ if (sWord(iWord(2)) <> sWordTwo) then
+ Printlog "The erroneous word '" + sWord(iWord(2)) + "' would be replaced with: '" + sWordTwo + "'"
+ else
+ warnlog "ERROR: SAME WORD in the dictionary as in the text??? Must be wrong."
+ end if
+ printlog "********* word found: '" + sWordTwo + "'"
+ printlog "##### suggestions: "+Suggestions.GetItemCount+"; Language: "+DictionaryLanguage.getSelText ' +" ; dictionary: "+DictionaryLanguage.getSelText 'Wort.GetItemCount 'Woerterbuch.GetSelText
+ if (Suggestions.GetItemCount > 0) then 'Wort.GetItemCount > 0) then
+ printlog "----- "+i+": "+Suggestions.GetItemText (1) 'Wort.GetItemText (1)
+ end if
+ Sleep 1
+ printlog "Click button 'Always ignore' on dialog."
+ IgnoreAll.Click
+ Sleep 2
+ printlog "Check in options, if word exists in word list."
+ printlog "Click button 'Options' on dialog 'Spellcheck'."
+ SpellcheckOptions.Click
+ Kontext "TabLinguistik"
+ printlog "Click button 'Edit ...' on dialog 'Writing Aids' in section 'User-defined dictionaries."
+ if TabLinguistik.exists(5) then
+ sleep 3 'culprint swedish windows; wait until butrton exists?
+ if (fGetIntoDictionary) then
+ qaErrorLog "wTSC"
+ goto endsub
+ end if
+ else
+ qaerrorlog "baeh"
+ end if
+ Kontext "BenutzerwoerterbuchBearbeiten"
+ if not BenutzerwoerterbuchBearbeiten.exists(5) then
+ sleep 3
+ qaerrorlog "baeh"
+ end if
+ printlog "Check every book, if it contains the added word."
+ iBooks = Buch.getItemCount
+ bWordFound(2) = false
+ for i = 1 to iBooks
+ Kontext "BenutzerwoerterbuchBearbeiten"
+ Buch.select(i)
+ Inhalt.setText sWord(iWord(2)) 'Wort.setText sWord(iWord(2))
+ sleep 1
+ if ((not neu.isEnabled) and Loeschen.isEnabled) then
+ bWordFound(2) = true
+ printlog " added word is in dictionary: '" + Buch.getSelText + "'"
+ end if
+ next i
+ if (not bWordFound(2)) then
+ warnlog "Word was not added to dictionary, #ixxxxxx"
+ end if
+ printlog "Cancel dialog 'Edit Custom Dictionary'."
+ BenutzerwoerterbuchBearbeiten.Close
+ Kontext "TabLinguistik"
+ printlog "Cancel dialog 'Writing Aids'."
+ TabLinguistik.Close
+ kontext "Spellcheck"
+
+ Printlog "----------------------------------------------------------------------------"
+ Printlog "4th test: - Replace"
+ printlog "4th error: replace : 1st green word in 1st Paragraph."
+ printlog "Check if word in textfield 'Word' changed."
+ printlog "(check if it is the expected next error - you have to look into the source code for the right word!)."
+ sWordOne = sWordTwo
+ sWordTwo = Suggestions.GetSelText
+ if (sWordOne = sWordTwo) then
+ warnlog "Always ignore didn't work? Spellcheck didn't go on."
+ end if
+ printlog "********* word found: '" + sWordTwo + "'"
+ iSuggestions = Suggestions.GetItemCount
+ printlog "##### suggestions: " + iSuggestions + "; Language: "+DictionaryLanguage.getSelText '+"; dictionary: "+woerterbuch.getSelText
+ if (Suggestions.GetItemCount > 0) then
+ printlog "----- "+i+": "+Suggestions.GetItemText (1)
+ end if
+ Sleep 1
+ printlog "Click button 'Replace'."
+ if (iSuggestions > 0) then
+ Change.click
+ else
+ qaerrorlog "Please change the text in the file, so the spellchecker can make a suggestion for the word: '" + sWordTwo + "'"
+ IgnoreOnce.Click
+ end if
+
+ Printlog "----------------------------------------------------------------------------"
+ Printlog "5th Test: - Always Replace"
+ printlog "5th error: always replace : 1st pink word in 2nd Paragraph -> hasn't to show up anymore from now on."
+ printlog "backwards: 1st green word in 2nd Paragraph -> hasn't to show up anymore from now on."
+ printlog "check if word in textfield 'Word' changed."
+ printlog "(check if it is the expected next error - you have to look into the source code for the right word!)."
+ sWordOne = sWordTwo
+ sWordTwo = Suggestions.GetSelText
+ if (sWordOne = sWordTwo) then
+ warnlog "Replace didn't work? Spellcheck didn't go on"
+ end if
+ printlog "********* word found: '" + sWordTwo + "'"
+ iSuggestions = Suggestions.GetItemCount
+ printlog "##### suggestions: " + iSuggestions + "; Language: "+DictionaryLanguage.getSelText ' +" ; dictionary: "+woerterbuch.getSelText
+ if (Suggestions.GetItemCount > 0) then
+ printlog "----- "+i+": "+Suggestions.GetItemText (1)
+ end if
+ Sleep 1
+ printlog "click button 'Always Replace'."
+ if (iSuggestions > 0) then
+ ChangeAll.click
+ else
+ qaErrorLog "Please change the text in the file, so the spellchecker can make a suggestion for the word: '" + sWordTwo + "'"
+ IgnoreOnce.Click
+ end if
+
+ printlog "2 errors are left: 4th word (green) in 2nd and 3rd paragraph."
+ printlog "backwards: 1st word (pink) in 2nd and 1st paragraph."
+ Kontext "Spellcheck"
+ sWordOne = sWordTwo
+ sWordTwo = Suggestions.GetSelText
+ if (sWordOne <> sWordTwo) then
+ printlog sWordTwo
+ else
+ warnlog "there is anopther word left, that wasn't expected!. '" + sWordTwo +"'"
+ end if
+ printlog "Click button 'Ignore' 2 times."
+ IgnoreOnce.Click
+
+ Kontext "Spellcheck"
+ sWordOne = sWordTwo
+ sWordTwo = Suggestions.GetSelText
+ if (sWordOne <> sWordTwo) then
+ warnlog "there is anopther word left, that wasn't expected!. '" + sWordTwo +"'"
+ else
+ printlog sWordTwo
+ end if
+ printlog "Click button 'Ignore' 2 times."
+ IgnoreOnce.Click
+ Kontext "Active"
+ if active.exists(5) then
+ printlog "Spellcheck works :-) '" + active.gettext + "'"
+ Active.No
+ else
+ warnlog "Spellcheck didn't work :-(! there are still errors in the document."
+ Kontext "Spellcheck"
+ Spellcheck.Close
+ Kontext "Active"
+ if active.exists(5) then
+ qaErrorLog " Spellcheck dialog closed'" + active.gettext + "'"
+ Active.No
+ end if
+ end if
+ sleep 2
+
+ Printlog "Delete all added words from dictionaries."
+ printlog "Call Tools->Options."
+ ToolsOptions
+ printlog "Select in category 'Languagesettings' entry 'Writing Aids'."
+ hToolsOptions ("LANGUAGESETTINGS","WRITINGAIDS")
+ sleep 1
+ Kontext "WRITINGAIDS"
+ printlog "Click on button 'edit' in section 'User-defined dictionaries'."
+ if (fGetIntoDictionary) then
+ qaErrorLog "wTSC"
+ goto endsub
+ end if
+ Kontext "BenutzerwoerterbuchBearbeiten"
+ printlog "Check every book, if it contains the added word."
+ iBooks = Buch.getItemCount
+ bWordFound(1) = false
+ bWordFound(2) = false
+ for i = 1 to iBooks
+ Buch.select(i)
+ for j = 1 to 2
+ Wort.setText sWord(j)
+ sleep 1
+ if ((not neu.isEnabled) and Loeschen.isEnabled) then
+ printlog "If it contains the word, press button 'delete'."
+ Loeschen.click
+ bWordFound(j) = true
+ printlog " added word is in dictionary: '" + Buch.getSelText + "' - '" + sWord(j) + "'"
+ end if
+ next j
+ next i
+ if ((not bWordFound(1)) AND (not bWordFound(2)))then
+ warnlog "Word was not found in dictionary. '" + sWord(1) + "': " + bWordFound(1) + " '" + sWord(2) + "': " + bWordFound(2)
+ end if
+ printlog "Close dialog 'Edit Custom Dictionary'."
+ BenutzerwoerterbuchBearbeiten.Close
+ sleep 1
+ Kontext "ExtrasOptionenDlg"
+ printlog "press button 'OK' on dialog 'Writing Aids'."
+ ExtrasOptionenDlg.OK
+ printlog "Call dialog again and delete all remaining words from dictionary 'IgnoreAllList'."
+ if (not wIgnorierenlisteLoeschen) then
+ qaErrorLog "Can't get into Dictionary lists"
+ goto endsub
+ end if
+
+ printlog "Close document"
+ Call hCloseDocument
+endcase 'tiToolsSpellcheckCheck
+
+'-------------------------------------------------------------------------------
+testcase tToolsSpellcheckAutoSpellcheck
+
+ QaErrorLog "#i81928# - outcommented tToolsSpellcheckAutoSpellcheck due to bug."
+ goto endsub
+ dim i as integer
+ dim x as integer
+ dim y as integer
+ dim q as integer
+ dim z as integer
+ dim iResult as long
+ dim iTemp as long
+ dim iTemp2 as long
+ dim sTemp as string
+ dim sCompare as string
+ dim iCompare as long
+ dim iError as long
+ dim sError as string
+
+ call hNewDocument
+
+ call hTextrahmenErstellen ("Ein Tipp: Schiffahrt schreibt man nun mit 3f Tunfisch Amboss a", 10, 10, 90, 50)
+
+ EditSelectAll
+ setCharacterLanguage(glLocale(4))
+ sleep 10
+ printlog "## check ENGLISH auto spellchecking"
+ iError = 0
+ ' Get underlined words / wrong recognized words by spellchecker
+ iResult = sAnalyseContextMenu(11, iError)
+ sTemp = sLongToBinary(iResult, 11)
+ sError = sLongToBinary(iError, 11)
+ ' reference of words, which should be underlined
+ sCompare = "11011001011"
+ iCompare = sBinaryToLong(sCompare)
+ ' compare result with reference -> get the difference
+ iTemp = not (iResult EQV iCompare)
+ ' eliminate errors from open bugs -> get the real errors
+ iTemp2 = iTemp AND NOT iError
+ if (iTemp2 > 0) then
+ warnlog "wrong words are not underlined? Should be: " + sCompare
+ warnlog "Is: " + sTemp
+ warnlog "Differences: " + sLongToBinary(iTemp, 11)
+ warnlog "Wrong after merging errors from bugs " + sLongToBinary(iTemp2, 11)
+ end if
+
+ sleep 1
+ ' call hTypeKeys "<F2>"
+ call hTypeKeys "<mod1 end> <Shift mod1 home>"
+ setCharacterLanguage(glLocale(6))
+ sleep 10
+ printlog "## check GERMAN auto spellchecking"
+ iError = 0
+ iResult = sAnalyseContextMenu(11, iError)
+ sTemp = sLongToBinary(iResult, 11)
+ sError = sLongToBinary(iError, 11)
+ sCompare = "00010000000"
+ iCompare = sBinaryToLong(sCompare)
+ ' compare result with reference -> get the difference
+ iTemp = not (iResult EQV iCompare)
+ ' eliminate errors from open bugs -> get the real errors
+ iTemp2 = iTemp AND NOT iError
+ if (iTemp2 > 0) then
+ warnlog "wrong words are not underlined? Should be: " + sCompare
+ warnlog "Is: " + sTemp
+ warnlog "Differences: " + sLongToBinary(iTemp, 11)
+ warnlog "Wrong after merging errors from bugs " + sLongToBinary(iTemp2, 11)
+ end if
+ printlog "-----------------------------------"
+
+ hCloseDocument()
+endcase 'tToolsSpellcheckAutoSpellcheck
+
+'-------------------------------------------------------------------------------
diff --git a/testautomation/graphics/optional/includes/global/g_stylist.inc b/testautomation/graphics/optional/includes/global/g_stylist.inc
new file mode 100644
index 000000000000..fab547eb5d3b
--- /dev/null
+++ b/testautomation/graphics/optional/includes/global/g_stylist.inc
@@ -0,0 +1,1020 @@
+'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
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* Owner : wolfram.garten@oracle.com
+'*
+'* short description :
+'*
+'\*******************************************************************
+
+testcase tFormatStylistFlyer
+ Dim xPos%
+ Dim yPos%
+ Dim xSize%
+ Dim ySize%
+
+ printlog " - Format/Stylist : using all possible things to manipulate the flyer"
+ '/// open application ///'
+ Call hNewDocument
+ Kontext "Gestalter"
+ '/// Check if stylist is there. Expected: not there ///'
+ if Gestalter.NotExists = false Then
+ qaErrorLog " - Expected Stylist to be closed; But is Open. Check tests."
+ else
+ if lcase(gPlatform) = "osx" then
+ hTypekeys "<mod1 t>"
+ else
+ hTypekeys "<F11>" '/// open stylist by pressing key [F11] ///'
+ end if
+ sleep 1
+ end if
+ Kontext "Gestalter"
+ if Gestalter.NotExists then
+ Warnlog " No stylist popped up using F11; opening now via slotID"
+ FormatStylist
+ end if
+ '///+ save stylist position and size ///'
+ xPos% = Gestalter.GetPosX
+ yPos% = Gestalter.GetPosY
+ xSize% = Gestalter.GetSizeX
+ ySize% = Gestalter.GetSizeY
+ '///+ if Stylist is docked; undock ///'
+ if Gestalter.IsDocked then Gestalter.UnDock
+ printlog " - '///move stylist ///"
+ '///+ move stylist to 10,10 ///'
+ Gestalter.Move 10, 10
+ Sleep 1
+ '///+ move stylist to 300,400 ///'
+ Gestalter.Move 300, 400
+ Sleep 1
+ '///+ move stylist to 590,790 ///'
+ Gestalter.Move 590, 790
+ Sleep 1
+ '///+ move stylist back to saved start position ///'
+ Gestalter.Move xPos%, yPos%
+ Sleep 1
+
+ printlog " - '///size stylist ///"
+ '///+ change size to 200,200 ///'
+ Gestalter.Size 200, 200
+ Sleep 1
+ '///+ change size to 300,400 ///'
+ Gestalter.Size 300, 400
+ Sleep 1
+ '///+ change size to 150,250 ///'
+ Gestalter.Size 150, 250
+ Sleep 1
+ '///+ change size back to saved size ///'
+ Gestalter.Size xSize%, ySize%
+ Sleep 1
+
+ printlog " - Close stylist reopen stylist, check if appearence is same as before"
+ '/// save stylist position and size ///'
+ xPos% = Gestalter.GetPosX
+ yPos% = Gestalter.GetPosY
+ xSize% = Gestalter.GetSizeX
+ ySize% = Gestalter.GetSizeY
+ '/// close stylist Format->Stylist ///'
+ FormatStylist
+ Sleep 1
+ '/// open stylist Format->Stylist ///'
+ FormatStylist
+ sleep (1)
+ if xPos% <> Gestalter.GetPosX then Warnlog "The x-Pos. has changed : Should be -> '"+ xPos% + "' Is -> '"+ Gestalter.GetPosX +"'."
+ if yPos% <> Gestalter.GetPosY then Warnlog "The y-Pos. has changed : Should be -> '"+ yPos% + "' Is -> '"+ Gestalter.GetPosY +"'."
+ if xSize% <> Gestalter.GetSizeX then Warnlog "The x-Size has changed : Should be -> '"+ xSize% + "' Is -> '"+ Gestalter.GetSizeX +"'."
+ if ySize% <> Gestalter.GetSizeY then Warnlog "The y-Size has changed : Should be -> '"+ ySize% + "' Is -> '"+ Gestalter.GetSizeY +"'."
+
+ printlog " - dock stylist"
+ '/// dock stylist ///'
+ Gestalter.Dock
+ Sleep 1
+ if (NOT Gestalter.IsDocked) then
+ warnlog " stylist not docked but should"
+ endif
+ '/// UNdock stylist ///'
+ if (Gestalter.IsDocked) Then
+ Gestalter.UnDock
+ endif
+ Sleep 1
+
+ printlog " - maximize/minimize stylist"
+ '/// minimize stylist ///'
+ Gestalter.Minimize
+ Sleep 1
+ '/// maximize stylist ///'
+ Gestalter.Maximize
+ Sleep 1
+ if (NOT Gestalter.IsMax) then
+ warnlog " The stylist did not return to maximized state"
+ endif
+ '/// close stylist ///'
+ Gestalter.Close
+ Call hCloseDocument
+
+endcase 'tFormatStylistFlyer
+'--------------------------------------------------------
+testcase tFormatStylistDocuments
+
+ Dim xPos% as Integer
+ Dim yPos% as Integer
+ Dim xSize% as Integer
+ Dim ySize% as Integer
+
+ printlog " - Format/Stylist : check methods with more than 1 document"
+ Call hNewDocument
+ printlog " - Open stylist, check stylist in another document"
+ FormatStylist
+ Call hNewDocument
+ Kontext "Gestalter"
+ if (Gestalter.NotExists) then
+ warnlog " There is no stylist in the new document"
+ FormatStylist
+ endif
+
+ printlog " - Close all documents, reopen 1"
+ hFileCloseAll()
+ hNewDocument()
+
+ Kontext "Gestalter"
+ if (Gestalter.NotExists) then
+ warnlog " There is no stylist in the new document"
+ endif
+
+ printlog " - stylist in a document docked, in a new rechecked"
+ Gestalter.Dock
+ Sleep 3
+ hNewDocument
+ sleep 3
+ Kontext "Gestalter"
+ if NOT Gestalter.IsDocked then
+ warnlog " In the new document is the stylist not docked"
+ endif
+
+ printlog " - Close all documents, reopen one and check the docked stylist"
+ hFileCloseAll()
+ hNewDocument()
+
+ Kontext "Gestalter"
+ if NOT Gestalter.IsDocked then
+ warnlog " In the new document is the stylist not docked"
+ endif
+
+ printlog " - Close stylist using F11"
+ Gestalter.Undock
+ Sleep 1
+ if lcase(gPlatform) = "osx" then
+ hTypekeys "<mod1 t>"
+ else
+ hTypeKeys "<F11>"
+ end if
+ Kontext "Gestalter"
+ if Gestalter.exists then
+ warnlog " Stylist still exists - closing again"
+ Gestalter.Close
+ end if
+ Call hCloseDocument
+
+endcase 'tFormatStylistDocuments
+'--------------------------------------------------------
+testcase tFormatStylistTemplatesUse
+
+ Dim i as Integer
+ Dim save as integer
+
+ printlog "- Format/Stylist : use all templates"
+ hNewDocument
+ sleep 1
+ FormatStylist
+ sleep 1
+ Kontext "Gestalter"
+ if (Gestalter.NotExists) then
+ warnlog " There is no stylist open, trying again now"
+ FormatStylist
+ endif
+ printlog " - Presentation-templates"
+ if ( gApplication = "IMPRESS") then
+ TBGestalter.Click Praesentationsvorlagen
+ endif
+ save = Gruppenliste.GetSelIndex
+ for i=1 to Gruppenliste.GetItemCount
+ Gruppenliste.Select i
+ Sleep 1
+ next i
+
+ TBGestalter.Click Grafikvorlagen
+ Sleep 2
+ printlog " - Graphic-templates"
+ for i=1 to Gruppenliste.GetItemCount
+ Gruppenliste.Select i
+ Sleep 1
+ next i
+ sleep 1
+ Gruppenliste.Select save
+
+ kontext "Gestalter"
+ hCloseDialog( Gestalter, "Close" )
+
+ hFileCloseAll()
+
+endcase 'tFormatStylistTemplatesUse
+'--------------------------------------------------------
+testcase tFormatStylistTemplateCreate
+
+ goto endsub
+ dim i
+ dim Zaehler
+
+ printlog "- Format/stylist :Create template and use it"
+ Call hNewDocument
+ sleep 3
+ printlog " - create template for paragraph"
+ FormatStylesCatalog
+ Kontext "VorlagenKatalog"
+ sleep 2
+ printlog " " + Vorlagen.GetItemCount
+ Vorlagen.Select 1
+ sleep 3
+ Neu.Click
+ sleep 2
+ Kontext
+ Active.SetPage TabVerwalten
+ Kontext "TabVerwalten"
+ VorlagenName.SetText "ATesttool"
+ TabVerwalten.OK
+ sleep 2
+ Kontext "VorlagenKatalog"
+ sleep 1
+ VorlagenKatalog.Close
+ sleep 1
+
+ Printlog " - New created template will be deleted now"
+ FormatStylesCatalog
+ sleep 1
+ Kontext "Vorlagenkatalog"
+ sleep 1
+ Vorlagen.Select 1
+ sleep 1
+ zaehler=Ansicht.getItemCount
+ i=0
+ do
+ inc i
+ loop while ((Ansicht.getItemText(i) <> "ATesttool") AND (i <= zaehler))
+ if i>zaehler then
+ warnlog " error"
+ endif
+ Ansicht.Select i
+ sleep 1
+ Ansicht.TypeKeys "<SPACE>"
+ sleep 1
+ Loeschen.Click
+ Kontext "Active"
+ Active.Yes
+ sleep 1
+ Kontext "Vorlagenkatalog"
+ Vorlagenkatalog.Close
+ sleep 1
+ Kontext "DocumentDraw"
+ gMouseClick 90,90
+ hFileCloseAll()
+
+endcase 'tFormatStylistTemplateCreate
+'--------------------------------------------------------
+testcase tFormatStylistTemplateSelect
+
+ dim i as integer
+ dim sListDown(21) as string
+ dim sListUp(21) as string
+ dim sTemp as string
+
+ printlog " - Format/Stylist : select template"
+ Call hNewDocument
+ hTextrahmenErstellen ("This is a formatted text <Shift Home>",20,20,80,30)
+ printlog " - format text"
+ FormatCharacter
+ Kontext
+ Active.SetPage TabFont
+ Kontext "TabFont"
+ TabFont.OK
+
+ printlog " - choose format using stylist"
+ FormatStylist
+ Kontext "Gestalter"
+ sleep 1
+ ' going from bottom to top
+ Vorlagenliste.TypeKeys "<End>"
+ for i = 1 to 20
+ ListAppend(sListUp(), Vorlagenliste.GetText)
+ Vorlagenliste.TypeKeys "<Up>"
+ next i
+ ' going from top to bottom
+ Vorlagenliste.TypeKeys "<Home>"
+ for i = 1 to 20
+ ListAppend(sListDown(), Vorlagenliste.GetText)
+ Vorlagenliste.TypeKeys "<Down>"
+ next i
+ ' delete double entries in both lists (up/down)
+ sTemp = sListUp(20)
+ for i = 19 to 1 step -1
+ if (sListUp(i) = sTemp) then
+ printlog i
+ ListDelete(sListUp(), i+1)
+ endif
+ sTemp = sListUp(i)
+ next i
+ sTemp = sListDown(20)
+ for i = 19 to 1 step -1
+ if (sListDown(i) = sTemp) then
+ ListDelete(sListDown(), i+1)
+ endif
+ sTemp = sListDown(i)
+ next i
+ ' if there are double entries...
+ if (ListCount(sListUp()) <> ListCount(sListDown())) then
+ if (iSprache = 82) then ' WorkAround BUG: #111652#
+ warnLog "There are double entries in the list! Up: " + ListCount(sListUp()) + "; Down: " +ListCount(sListDown())
+ elseif (iSprache = 07) then
+ warnlog "There are missing entries in the list. Will be fixed in CWS the 06.02.2006. - FHA" 'Russian TODO -FHA
+ else
+ warnlog "There are double entries in the list! Up: " + ListCount(sListUp()) + "; Down: " +ListCount(sListDown())
+ endif
+ for i = ListCount(sListUp()) to 1 step -1
+ printlog "* " + i + ": '" + sListUp(i) + "'"
+ next i
+ endif
+ ' here this method has to stay, because it will also find some errors;
+ ' the method, that works even with an error in the list is shown in testcase tFormatStylistTemplateNew
+ hDoubleClickInList ( Vorlagenliste, glLocale (3) )
+ Gestalter.Close
+
+ printlog " - check Format"
+ FormatArea
+ Kontext
+ Active.SetPage TabArea
+ Kontext "TabArea"
+ 'TODO: TBO check criteria, that right template is used....
+ ' ???? if Farbe.IsChecked then Printlog "Standard template is used"
+ TabArea.OK
+ sleep 2
+ hCloseDocument
+
+endcase 'tFormatStylistTemplateSelect
+'---------------------------------------------------------
+testcase tFormatStylistTemplateNew
+
+ dim sListDown(21) as string
+ dim sListUp(21) as string
+ dim sTemp as string
+ dim i as integer
+
+ printlog "- Format/Stylist : New template from selection"
+ Call hNewDocument
+ hTextrahmenErstellen ("This text will soon be formatted and thereafter made as template",20,20,80,40)
+ sleep 1
+ hTypeKeys "<Return><Up><Shift End>"
+ FormatCharacter
+ Kontext
+ Active.SetPage TabFont
+ Kontext "TabFont"
+ TabFont.OK
+
+ printlog " - Create template from selection"
+ FormatStylist
+ Kontext "Gestalter"
+ TBGestalter.Click Grafikvorlagen
+ Sleep 1
+ TBGestalterRight.Click AusSelektion
+ Kontext "VorlageErzeugen"
+ VorlagenName.SetText "Testtool"
+ VorlageErzeugen.OK
+ printlog " - assign new graphic template to selected text"
+ hTextrahmenErstellen ("This is another text",40,40,70,50)
+ hTypeKeys "<Return><Up><Shift End>"
+ Kontext "Gestalter"
+ TBGestalter.Click Grafikvorlagen
+ sleep 1
+ ' test BUG: #111652# ' find illegal double entries in template list
+ ' going from bottom to top
+ Vorlagenliste.TypeKeys "<End>"
+ for i = 1 to 20
+ sTemp = Vorlagenliste.GetText
+ ListAppend(sListUp(), sTemp)
+ Vorlagenliste.TypeKeys "<Up>"
+ next i
+ ' going from top to bottom
+ Vorlagenliste.TypeKeys "<Home>"
+ for i = 1 to 20
+ ListAppend(sListDown(), Vorlagenliste.GetText)
+ Vorlagenliste.TypeKeys "<Down>"
+ next i
+ ' delete double entries in both lists (up/down)
+ sTemp = sListUp(20)
+ for i = 19 to 1 step -1
+ if (sListUp(i) = sTemp) then
+ ListDelete(sListUp(), i+1)
+ endif
+ sTemp = sListUp(i)
+ next i
+ sTemp = sListDown(20)
+ for i = 19 to 1 step -1
+ if (sListDown(i) = sTemp) then
+ ListDelete(sListDown(), i+1)
+ endif
+ sTemp = sListDown(i)
+ next i
+ ' if any double entries...
+ if (ListCount(sListUp()) <> ListCount(sListDown())) then
+ if (iSprache = 82) then ' WorkAround BUG: #111652#
+ warnLog "82: There are double entries in the list! Up: " + ListCount(sListUp()) + "; Down: " +ListCount(sListDown())
+ elseif (iSprache = 07) then
+ warnlog "There are missing entries in the list. Will be fixed in CWS the 06.02.2006. - FHA" 'Russian TODO -FHA
+ else
+ warnlog "There are double entries in the list! Up: " + ListCount(sListUp()) + "; Down: " +ListCount(sListDown())
+ for i = ListCount(sListDown()) to 1 step -1
+ printlog " - " + i + " " + sListDown(i)
+ next i
+ for i = ListCount(sListUp()) to 1 step -1
+ printlog " - " + i + " " + sListUp(i)
+ next i
+ endif
+ endif
+ Vorlagenliste.TypeKeys "<End>"
+ i = 0
+ do
+ inc i
+ sTemp = Vorlagenliste.GetText
+ Vorlagenliste.TypeKeys "<Up>"
+ loop while (("Testtool" <> sTemp) AND (i<20))
+ Vorlagenliste.TypeKeys "<Return>"
+ Kontext "Gestalter"
+ Gestalter.Close
+
+ Printlog " - check template"
+ FormatCharacter
+ Kontext
+ Active.SetPage TabFont
+ Kontext "TabFont"
+ TabFont.OK
+ hTypeKeys ("<escape>",2)
+ hCloseDocument
+
+endcase 'tFormatStylistTemplateNew
+'--------------------------------------------------------
+testcase tiFormatStylist
+
+ Dim Num1 as integer ' graphics : first line indent ; the one with 0,6cm in the summary
+ Dim Num2 as integer ' presentations : background ; just one tabpage pops up: Area
+ Dim Num3 as integer ' : background objects ; Line pops up
+ Dim Num4 as integer ' : notes ; font 20
+ Dim Num5 as integer ' : outline 1 ; where 9 items exist of
+
+ select case iSprache
+ case 01: Num1 = 3 : Num2 = 1 : Num3 = 2 : Num4 = 3 : Num5 = 4
+ case 07: Num1 = 3 : Num2 = 4 : Num3 = 2 : Num4 = 3 : Num5 = 1 'Russian TODO -FHA
+ case 31: Num1 = 1 : Num2 = 2 : Num3 = 3 : Num4 = 1 : Num5 = 5
+ case 33: Num1 = 3 : Num2 = 1 : Num3 = 3 : Num4 = 2 : Num5 = 5
+ case 34: Num1 = 2 : Num2 = 10 : Num3 = 12 : Num4 = 3 : Num5 = 4
+ case 36: Num1 = 2 : Num2 = 3 : Num3 = 4 : Num4 = 10 : Num5 = 6
+ case 39: Num1 = 2 : Num2 = 3 : Num3 = 2 : Num4 = 1 : Num5 = 5
+ case 45: Num1 = 11 : Num2 = 2 : Num3 = 2 : Num4 = 13 : Num5 = 5
+ case 46: Num1 = 2 : Num2 = 2 : Num3 = 3 : Num4 = 1 : Num5 = 4
+ case 48: Num1 = 11 : Num2 = 13 : Num3 = 11 : Num4 = 1 : Num5 = 5
+ case 49: Num1 = 1 : Num2 = 10 : Num3 = 11 : Num4 = 14 : Num5 = 1
+ case 55: Num1 = 4 : Num2 = 12 : Num3 = 11 : Num4 = 10 : Num5 = 1
+ ' case 81: Num1 = 9 : Num2 = 13 : Num3 = 14 : Num4 = 12 : Num5 = 1 Asian languages not testable, because locale dependant :-(
+ ' case 82: Num1 = 6 : Num2 = 11 : Num3 = 12 : Num4 = 10 : Num5 = 1
+ ' case 86: Num1 = 15 : Num2 = 13 : Num3 = 14 : Num4 = 12 : Num5 = 2
+ ' case 88: Num1 = 4 : Num2 = 13 : Num3 = 14 : Num4 = 3 : Num5 = 4
+ case else :
+ if (bAsianLan = FALSE) then
+ Warnlog "For the language " + iSprache +" nothing is prepared yet: find numbers of entries in stylist and insert here"
+ else
+ qaErrorLog "The Asian-office-languages aren't supported yet."
+ endif
+ goto endsub
+ end select
+
+ Call hNewDocument
+ sleep 2
+ Kontext "Gestalter"
+ if Gestalter.Exists Then
+ Warnlog "- Stylist exists, perhaps not closed last time a Impress doc was open"
+ Gestalter.Close
+ end if
+ sleep 1
+
+ FormatStylist
+ Kontext "Gestalter"
+ Grafikvorlagen.Click
+ sleep 1
+ Vorlagenliste.Select Num1 ' num1
+ sleep 1
+ Printlog "- open Grafic template Dialogs using the context menue , checking if all resources exist"
+ Vorlagenliste.OpenContextMenu
+ sleep 1
+ hMenuSelectNr (2)
+ sleep 1
+ call hWalkTheStyles
+ Kontext
+ Messagebox.SetPage TabText
+ Kontext "TabText"
+ sleep 1
+ TabText.Cancel
+ sleep 1
+
+ if (Ucase(gApplication) = "IMPRESS") AND (iSprache <> 07) then 'Russian TODO -FHA
+ Kontext "Gestalter"
+ Printlog "- presentation templates"
+ sleep 1
+ Praesentationsvorlagen.Click
+
+ Vorlagenliste.Select Num2
+ sleep 1
+ Vorlagenliste.OpenContextMenu
+ sleep 1
+ hMenuSelectNr (1)
+ sleep 1
+ Kontext
+ if Messagebox.exists (5) then
+ try
+ ' Messagebox.SetPage TabArea
+ Kontext "TabArea"
+ if TabArea.Exists = false then
+ warnlog "Where is TabArea?"
+ else
+ Printlog "TabArea exists, good."
+ TabArea.Cancel
+ endif
+ catch
+ warnlog "there might be another systemlocale -> I can't select the entries in the stylist via numbers :-("
+ endcatch
+ else
+ warnlog "tab area/Messagebox doesn't exist :-("
+ endif
+ Kontext "Gestalter"
+ sleep 1
+
+ Vorlagenliste.Select Num3
+ sleep 1
+ Vorlagenliste.OpenContextMenu
+ sleep 1
+ hMenuSelectNr (1)
+ sleep 1
+ call hWalkTheStyles (1,1)
+ Kontext
+ Messagebox.SetPage TabEinzuegeUndAbstaende
+ Kontext "TabEinzuegeUndAbstaende"
+ sleep 1
+ TabEinzuegeUndAbstaende.Cancel
+ sleep 1
+ Kontext "Gestalter"
+ sleep 1
+
+ Vorlagenliste.Select Num4
+ sleep 1
+ Vorlagenliste.OpenContextMenu
+ sleep 1
+ hMenuSelectNr (1)
+ sleep 1
+ Kontext
+ Messagebox.SetPage TabFont
+ kontext "TabFont"
+ Kontext
+ Messagebox.SetPage TabFontEffects
+ kontext "TabFontEffects"
+ Kontext
+ Messagebox.SetPage TabEinzuegeUndAbstaende
+ kontext "TabEinzuegeUndAbstaende"
+ sleep 1
+ TabEinzuegeUndAbstaende.Cancel
+ sleep 1
+ Kontext "Gestalter"
+ sleep 1
+
+ Vorlagenliste.Select Num5
+ sleep 1
+ Vorlagenliste.OpenContextMenu
+ sleep 1
+ hMenuSelectNr (1)
+ sleep 1
+ Kontext
+ Messagebox.SetPage TabFont
+ kontext "TabFont"
+ Kontext
+ Messagebox.SetPage TabFontEffects
+ kontext "TabFontEffects"
+ Kontext
+ Messagebox.SetPage TabEinzuegeUndAbstaende
+ kontext "TabEinzuegeUndAbstaende"
+ sleep 1
+ Kontext
+ Messagebox.SetPage TabBullet
+ Kontext "TabBullet"
+ sleep 1
+ Kontext
+ Messagebox.SetPage TabNumerierungsart
+ Kontext "TabNumerierungsart"
+ sleep 1
+ Kontext
+ Messagebox.SetPage TabGrafiken
+ Kontext "TabGrafiken"
+ sleep 1
+ Kontext
+ Messagebox.SetPage TabOptionenNumerierung
+ Kontext "TabOptionenNumerierung"
+ sleep 1
+ TabOptionenNumerierung.Cancel
+ sleep 1
+ endif
+ if lcase(gPlatform) = "osx" then
+ hTypekeys "<mod1 t>"
+ else
+ hTypeKeys "<F11>"
+ end if
+ sleep 1
+ Kontext "Gestalter"
+ if Gestalter.Exists Then Warnlog "- Stylist could not be closed pressing F11"
+ Call hCloseDocument
+
+endcase 'tiFormatStylist
+'---------------------------------------------------------
+sub hWalkTheStyles (optional a as integer,optional b as integer)
+ ' TODO: TBO DialogTest should go to Recource test!
+ dim i as integer
+
+ if isMissing (a) then a=1
+ if isMissing (b) then b=2
+ i=1
+ if a <= i AND i <= b then
+ Kontext
+ Messagebox.SetPage TabLinie
+ kontext "TabLinie"
+ Call DialogTest ( TabLinie )
+ Kontext
+ Messagebox.SetPage TabArea
+ kontext "TabArea"
+ Call DialogTest ( TabArea, 1 )
+ FillOptions.Select 1 ' NoFill.Check
+ Call DialogTest ( TabArea, 1 )
+ FillOptions.Select 2
+ Call DialogTest ( TabArea, 2 )
+ FillOptions.Select 3
+ Call DialogTest ( TabArea, 3 )
+ FillOptions.Select 4
+ Call DialogTest ( TabArea, 4 )
+ FillOptions.Select 5
+ Call DialogTest ( TabArea, 5 )
+ Kontext
+ Messagebox.SetPage TabSchatten
+ kontext "TabSchatten"
+ Anzeigen.check
+ Call DialogTest ( TabSchatten )
+ Kontext
+ Messagebox.SetPage TabTransparenz
+ kontext "TabTransparenz"
+ KeineTransparenz.Check
+ LineareTransparenz.Check
+ Transparenzverlauf.Check
+ Kontext
+ Messagebox.SetPage TabFont
+ kontext "TabFont"
+ Call DialogTest ( TabFont )
+ Kontext
+ Messagebox.SetPage TabFontEffects
+ kontext "TabFontEffects"
+ Kontext
+ Messagebox.SetPage TabEinzuegeUndAbstaende
+ kontext "TabEinzuegeUndAbstaende"
+ Call DialogTest ( TabEinzuegeUndAbstaende )
+ endif
+ i=2
+ if a <= i AND i <= b then
+ Kontext
+ Messagebox.SetPage TabVerwalten
+ kontext "TabVerwalten"
+ Call DialogTest ( TabVerwalten )
+ Kontext
+ Messagebox.SetPage TabText
+ Kontext "TabText"
+ Call DialogTest ( TabText )
+ Kontext
+ Messagebox.SetPage TabLauftext
+ Kontext "TabLauftext"
+ Call DialogTest ( TabLauftext )
+ Kontext
+ Messagebox.SetPage TabBemassung
+ Kontext "TabBemassung"
+ Call DialogTest ( TabBemassung )
+ Kontext
+ Messagebox.setpage TabVerbinder
+ Kontext "TabVerbinder"
+ Call Dialogtest ( TabVerbinder )
+ Kontext
+ Messagebox.setpage TabAusrichtungAbsatz
+ Kontext "TabAusrichtungAbsatz"
+ Links.Check
+ Rechts.Check
+ Zentriert.Check
+ Blocksatz.Check
+ Kontext
+ Messagebox.setpage TabTabulator
+ Kontext "TabTabulator"
+ Neu.click
+ AlleLoeschen.click
+ Neu.click
+ Loeschen.click
+ endif
+ i=3
+ if a <= i AND i <= b then
+ Kontext
+ Messagebox.SetPage TabBullet
+ Kontext "TabBullet"
+ sleep 1
+ Call DialogTest (TabBullet)
+ sleep 1
+ Kontext
+ Messagebox.SetPage TabNumerierungsart
+ Kontext "TabNumerierungsart"
+ sleep 1
+ Call DialogTest (TabNumerierungsart)
+ sleep 1
+ Kontext
+ Messagebox.SetPage TabGrafiken
+ Kontext "TabGrafiken"
+ sleep 1
+ Call DialogTest (TabGrafiken)
+ sleep 1
+ Kontext
+ Messagebox.SetPage TabOptionenNumerierung
+ Kontext "TabOptionenNumerierung"
+ sleep 1
+ Call DialogTest (TabOptionenNumerierung)
+ sleep 1
+ endif
+
+end sub 'hWalkTheStyles
+'---------------------------------------------------------
+testcase tFormatStylist
+
+ Dim sTemp as String
+ dim sSettings(20,3) ' control_name; control_type; value
+ dim i as integer
+ dim abctemp
+
+ Call hNewDocument
+ sleep 5
+
+ hTextrahmenErstellen ("I hate mondays...",20,20,80,40)
+ sleep 1
+ FormatStylist
+ sleep 1
+ Kontext "Stylist"
+ if (Stylist.NotExists) then
+ qaErrorLog "There is no stylist open, trying again now"
+ FormatStylist
+ endif
+ sleep 1
+ Vorlagenliste.TypeKeys "<End>"
+ Vorlagenliste.TypeKeys "<Up>"
+ Vorlagenliste.TypeKeys "<Up>"
+ sleep 1
+ Vorlagenliste.OpenContextMenu
+ sleep 1
+ hMenuSelectNr 1
+ sleep 1
+ Kontext
+ if Messagebox.exists (5) then
+ Messagebox.SetPage TabVerwalten
+ Kontext "TabVerwalten"
+ VorlagenName.SetText "1Newtheme"
+ sTemp = VorlagenName.getText
+ VerknuepftMit.getSelText
+ Bereich.getSelText
+ TabVerwalten.OK
+ endif
+ sleep 1
+ Kontext "Stylist"
+ hSelectInList(Vorlagenliste,sTemp)
+ sleep 1
+ Vorlagenliste.OpenContextMenu
+ sleep 1
+ hMenuSelectNr 2
+ sleep 1
+ Kontext
+ if Messagebox.exists (5) then
+ Messagebox.SetPage TabVerwalten
+ Kontext "TabVerwalten"
+ VorlagenName.setText("1Test")
+ TabVerwalten.OK
+ endif
+ sleep 1
+
+ ' hTextrahmenErstellen ("I hate mondays..., too",60,60,80,60)
+ ' sleep 1
+ ' FormatArea
+ ' i = 1
+ ' kontext "tabArea"
+ '' temp = Hatching
+ ' abctemp = 666666
+ ' printlog isobject(abctemp)
+ ' printlog isnumeric(abctemp)
+ ' sSettings(i,1) = Hatching
+ ' printlog isobject(sSettings(i,1))
+ ' printlog isnumeric(sSettings(i,1))
+ ' sSettings(i,2) = "CheckBox"
+ ' sSettings(i,3) = True
+ ' inc (i)
+ '' printlog " " + i
+ ' dim asgc as boolean
+ ' asgc = true
+ '' hWalkTheStyles2(asgc, sSettings(), temp)
+ ' ' hWalkTheStyles2(abctemp)
+ ' Kontext "TabArea"
+ ' TabArea.OK
+ Kontext "Stylist"
+ if (Stylist.NotExists) then
+ ErrorLog "There is no stylist open, should be."
+ else
+ if lcase(gPlatform) = "osx" then
+ hTypekeys "<mod1 t>"
+ else
+ hTypekeys "<F11>"
+ end if
+ Kontext "Stylist"
+ if (Stylist.Exists) then
+ ErrorLog "The Stylist should be closed now."
+ endif
+ endif
+ Call hCloseDocument
+
+endcase 'tFormatStylist
+'--------------------------------------------------------
+function hSelectInList (window, sEntry as String) as Boolean
+
+ Dim i as Integer
+ Dim sTemp as String
+ Dim sLastTemp as String
+
+ window.TypeKeys "<End>"
+ sTemp = ""
+ do
+ sLastTemp = sTemp
+ sTemp = window.GetText
+ window.TypeKeys "<Up>"
+ loop while ((sEntry <> sTemp) AND (sLastTemp <> sTemp))
+ if (sEntry = sTemp) then
+ window.TypeKeys "<Return>"
+ hSelectInList = TRUE
+ else
+ hSelectInList = FALSE
+ endif
+
+end function 'hSelectInList
+'---------------------------------------------------------
+function hWalkTheStyles2 (atemp)
+
+ 'function hWalkTheStyles2 (bSet as boolean, aSettings(), atemp as variant) as string
+ dim i as integer
+ dim x as integer
+ dim itemp
+ dim bSet
+ dim aSettings(5,5)
+ ' dim atemp
+
+ i=1
+ Kontext
+ printlog aSettings(i,3)
+ printlog aSettings(i,2)
+ printlog val(aSettings(i,1))
+ printlog atemp
+ Messagebox.SetPage TabArea
+ kontext "TabArea"
+ 'press button standard :-))))))
+ atemp = Hatching
+ printlog atemp
+
+ if aSettings(i,3) then
+ itemp = val(aSettings(i,1))
+ printlog isobject(atemp)
+ printlog isNumeric(atemp)
+ Hatching.check
+ atemp.check
+
+ else
+ ' aSettings(i,1).Uncheck
+ endif
+ 'print "baeh"
+ i=2
+ Kontext
+ Messagebox.SetPage TabSchatten
+ kontext "TabSchatten"
+
+ Kontext
+ Messagebox.SetPage TabVerwalten
+ kontext "TabVerwalten"
+ i=2
+ Kontext
+ Messagebox.SetPage TabLinie
+ kontext "TabLinie"
+ 'Context: *Line; Line Styles; Arrow Styles
+ i=3
+ Kontext
+ Messagebox.SetPage TabArea
+ kontext "TabArea"
+ 'Context: *Area; *Shadow; Transparency; Colors; Gradients; Hatching; Bitmaps
+ i=4
+ Kontext
+ Messagebox.SetPage TabSchatten
+ kontext "TabSchatten"
+ i=5
+ Kontext
+ Messagebox.SetPage TabTransparenz
+ kontext "TabTransparenz"
+ i=6
+ Kontext
+ Messagebox.SetPage TabFont
+ kontext "TabFont"
+ 'Context: *Font; *Font Effect; Position
+ i=7
+ Kontext
+ Messagebox.SetPage TabFontEffects
+ kontext "TabFontEffects"
+ i=8
+ Kontext
+ Messagebox.SetPage TabEinzuegeUndAbstaende
+ kontext "TabEinzuegeUndAbstaende"
+ 'Context: *Indents & Spacing; *Alignment; *Tabs
+ i=9
+ Kontext
+ Messagebox.SetPage TabText
+ Kontext "TabText"
+ 'Context: *Text; *Text Animation
+ i=10
+ Kontext
+ Messagebox.SetPage TabLauftext
+ Kontext "TabLauftext"
+ i=11
+ Kontext
+ Messagebox.SetPage TabBemassung
+ Kontext "TabBemassung"
+ i=12
+ Kontext
+ Messagebox.setpage TabVerbinder
+ Kontext "TabVerbinder"
+ i=13
+ Kontext
+ Messagebox.setpage TabAusrichtungAbsatz
+ Kontext "TabAusrichtungAbsatz"
+ i=14
+ Kontext
+ Messagebox.setpage TabTabulator
+ Kontext "TabTabulator"
+
+ ' Messagebox.SetPage TabBullet
+ ' Kontext "TabBullet"
+ ' sleep 1
+ ' Call DialogTest (TabBullet)
+ ' sleep 1
+ ' Kontext
+ ' Messagebox.SetPage TabNumerierungsart
+ ' Kontext "TabNumerierungsart"
+ ' sleep 1
+ ' Call DialogTest (TabNumerierungsart)
+ ' sleep 1
+ ' Kontext
+ ' Messagebox.SetPage TabGrafiken
+ ' Kontext "TabGrafiken"
+ ' sleep 1
+ ' Call DialogTest (TabGrafiken)
+ ' sleep 1
+ ' Kontext
+ ' Messagebox.SetPage TabOptionenNumerierung
+ ' Kontext "TabOptionenNumerierung"
+ ' sleep 1
+ ' Call DialogTest (TabOptionenNumerierung)
+ ' sleep 1
+end function 'hWalkTheStyles2
diff --git a/testautomation/graphics/optional/includes/global/g_tables.inc b/testautomation/graphics/optional/includes/global/g_tables.inc
new file mode 100644
index 000000000000..410ed8ca0fc6
--- /dev/null
+++ b/testautomation/graphics/optional/includes/global/g_tables.inc
@@ -0,0 +1,583 @@
+'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
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/******************************************************************
+'*
+'* owner : wolfram.garten@oracle.com
+'*
+'* short description : Testing of impress tables
+'*
+'\******************************************************************
+
+'Variables:
+
+dim iItemCount AS integer 'Count variable for combobox
+dim iItemIndex AS integer 'Counter for/next
+
+'-------------------------------------------------------------------------------
+
+testcase tiInsertTableUsingMenu
+
+ printlog "Inserting table into doc using the menu."
+ Call hNewDocument
+ printlog "Switching between Draw/Impress"
+ if ( gApplication = "IMPRESS" ) then
+ DocumentImpress.UseMenu
+ hMenuSelectNr(4)
+ hMenuSelectNr(14)
+ else
+ DocumentDraw.UseMenu
+ hMenuSelectNr(4)
+ hMenuSelectNr(11)
+ endif
+
+
+ printlog "Checking if insert Table dialog comes up."
+ Kontext "InsertTableImpress"
+ if InsertTableImpress.Exists then
+ printlog "InsertTable Dialog is up."
+ else
+ warnlog "InsertTableDialog did not come up!"
+ endif
+
+ printlog "Checking for availability of column and row boxes."
+ if NumberOfColumns.IsEnabled AND NumberOfRows.IsEnabled then
+ printlog "Columns and rows boxes available."
+ else
+ warnlog "One or both spinboxes not active!"
+ endif
+
+ printlog "Checking max and min for Columns."
+ NumberOfColumns.ToMax
+ if NumberOfColumns.GetText = "75" then
+ printlog "Max is 75 Columns."
+ else
+ warnlog "Max Columns cannot be reached!"
+ endif
+
+ NumberOfColumns.ToMin
+ if NumberOfColumns.GetText ="1" then
+ printlog "Min is 1 column."
+ else
+ warnlog "Min column is wrong!"
+ endif
+
+ printlog "Checking max and min for Rows."
+ NumberOfRows.ToMax
+ if NumberOfRows.GetText = "75" then
+ printlog "Max is 75 Rows."
+ else
+ warnlog "Max Rows cannot be reached!"
+ endif
+
+ NumberOfRows.ToMin
+ if NumberOfRows.GetText ="1" then
+ printlog "Min is 1 Row."
+ else
+ warnlog "Min Row is wrong!"
+ endif
+
+ printlog "Inserting Table now, 5 columns ,2 rows."
+ NumberOfColumns.SetText "5"
+ NumberOfRows.SetText "2"
+ InsertTableImpress.OK
+ Kontext "DocumentImpress"
+
+ printlog "Checking if table is inserted."
+ Kontext "TableObjectbar"
+ if TableObjectbar.Exists(1) then
+ printlog "TableObjectBar is up, Table inserted."
+ else
+ warnlog " TableObjectBar not up !"
+ endif
+ TableObjectbar.Close
+
+ printlog " Close document."
+ Call hCloseDocument
+
+endcase 'tiInsertTableUsingMenu
+
+'-------------------------------------------------------------------------------
+
+testcase tiInsertTableUsingButton
+
+ printlog " Inserting table using the button in standard toolbar."
+ Call hNewDocument
+ printlog "Open New Document."
+ kontext "Standardbar"
+
+ printlog "Checking if button is available."
+ try
+ Table.Click
+ catch
+ warnlog "Table button in standardbar is not available!"
+ endcatch
+ printlog "Clicking on insert table button in standardbar."
+
+ printlog " Checking if insert Table dialog comes up."
+ Kontext "InsertTableImpress"
+ if InsertTableImpress.Exists then
+ printlog "InsertTable Dialog is up."
+ else
+ warnlog "InsertTableDialog did not come up!"
+ endif
+ printlog "Inserting Table by clicking OK."
+ InsertTableImpress.OK
+
+ printlog "Checking if table is inserted."
+ Kontext "TableObjectbar"
+ if TableObjectbar.Exists(1) then
+ printlog "TableObjectBar is up, Table inserted."
+ else
+ warnlog "TableObjectBar not up!"
+ endif
+ TableObjectbar.Close
+ printlog " Close document."
+ Call hCloseDocument
+
+endcase 'tiInsertTableUsingButton
+
+'-------------------------------------------------------------------------------
+testcase tiInsertTableUsingToolbarbutton
+
+ printlog " Inserting table using the button in table toolbar."
+ Call hNewDocument
+ printlog "Clicking on button in toolbar."
+ Call hToolbarSelect ("Table", true)
+ Kontext "TableObjectBar"
+ if TableObjectbar.Exists(1) then
+ printlog "TableObjectBar is up."
+ else
+ warnlog "TableObjectBar not up!"
+ endif
+ Table.Click
+
+ printlog " Checking if insert Table dialog comes up."
+ Kontext "InsertTableImpress"
+ if InsertTableImpress.Exists then
+ printlog "InsertTable Dialog is up."
+ else
+ warnlog "InsertTableDialog did not come up!"
+ endif
+
+ printlog "Inserting Table..."
+ InsertTableImpress.OK
+
+ printlog " Checking if dialog comes up."
+ Kontext "TableObjectbar"
+ if TableObjectbar.Exists(1) then
+ printlog "Success, Table inserted."
+ else
+ warnlog " Table Dialog did not came up!"
+ endif
+ TableObjectbar.Close
+
+ printlog " Close document."
+ Call hCloseDocument
+
+endcase 'tiInsertTableUsingToolbarbutton
+
+'-------------------------------------------------------------------------------
+testcase tiTableObjectBar
+
+ printlog "Testing TableObjectBar."
+ printlog "Inserting table into doc using the menu."
+ Call hNewDocument
+ printlog "Switching between Draw/Impress"
+ if ( gApplication = "IMPRESS" ) then
+ DocumentImpress.UseMenu
+ hMenuSelectNr(4)
+ hMenuSelectNr(14)
+ else
+ DocumentDraw.UseMenu
+ hMenuSelectNr(4)
+ hMenuSelectNr(11)
+ endif
+
+ Kontext "InsertTableImpress"
+ printlog "Inserting table."
+ if InsertTableImpress.Exists(1) then
+ InsertTableImpress.OK
+ else
+ sleep (1)
+ InsertTableImpress.OK
+ endif
+ printlog "Selecting table for geeting the TableObjectBar."
+ printlog "Switching between Draw/Impress"
+ if ( gApplication = "IMPRESS" )then
+ Kontext "DocumentImpress"
+ DocumentImpress.TypeKeys "<TAB>",3
+ else
+ Kontext "DocumentDraw"
+ DocumentDraw.TypeKeys "<MOD1 A>"
+ endif
+
+ printlog " Checking Table button."
+ Kontext "TableObjectBar"
+ if TableObjectBar.Exists then
+ printlog "Table bar visible."
+ else
+ warnlog "Table bar is not up!"
+ endif
+
+ printlog "Checking LinienStil."
+ LinienStil.TearOff
+ Kontext "TB_Umrandungsstil"
+ WaitSlot(1000)
+ if TB_Umrandungsstil.Exists then
+ printlog "LineStyle Box is up."
+ TB_Umrandungsstil.Close
+ else
+ warnlog "LineStyleBox is not up!"
+ endif
+ Kontext "TableObjectBar"
+
+ TableObjectBar.Close
+ if ( gApplication = "IMPRESS" ) then
+ Kontext "DocumentImpress"
+ else
+ Kontext "DocumentDraw"
+ endif
+ Call hToolbarSelect ("Table", true)
+ Kontext "TableObjectBar"
+
+ printlog "Checking LineColorOfTheBorder."
+ LineColorOfTheBorder.TearOff
+ Kontext "TB_Farbe"
+ WaitSlot(1000)
+ if TB_Farbe.Exists then
+ printlog "LineColorOfTheBorder is up."
+ TB_Farbe.Close
+ else
+ warnlog "LineColorOfTheBorder is not up!"
+ endif
+ Kontext "TableObjectBar"
+ TableObjectBar.Close
+ if ( gApplication = "IMPRESS" ) then
+ Kontext "DocumentImpress"
+ else
+ Kontext "DocumentDraw"
+ endif
+ Call hToolbarSelect ("Table", true)
+ Kontext "TableObjectBar"
+
+ printlog "Checking Borderstyle."
+ Umrandung.TearOff
+ Kontext "TB_Umrandung"
+ if TB_Umrandung.Exists then
+ printlog " BordersTB is up."
+ TB_Umrandung.Close
+ else
+ warnlog "BordersTB is not up!"
+ endif
+ if ( gApplication = "IMPRESS" ) then
+ Kontext "DocumentImpress"
+ else
+ Kontext "DocumentDraw"
+ endif
+
+ printlog "Checking merge cells."
+ printlog "Inserting something into cell and select."
+ if ( gApplication = "IMPRESS" ) then
+ DocumentImpress.TypeKeys ("a")
+ DocumentImpress.TypeKeys "<SHIFT RIGHT>"
+ else
+ DocumentDraw.TypeKeys ("a")
+ DocumentDraw.TypeKeys "<SHIFT RIGHT>"
+ endif
+ Kontext "TableObjectBar"
+ if TableObjectBar.NotExists(2) then ViewToolbarsTable
+
+ printlog( "Merge cells" )
+ Wait( 1000 )
+ ZellenVerbinden.Click
+
+ printlog( "Split cells" )
+ Wait( 1000 )
+ ZelleTeilen.Click
+
+ Kontext "ZellenTeilen"
+ if ( ZellenTeilen.exists( 2 ) ) then
+
+ printlog "SplitCells dialog open."
+
+ printlog( "Set number to maximum" )
+ Anzahl.ToMax
+ printlog "Maximum SplitCellCount is " & Anzahl.GetText & "."
+
+ printlog( "Set number to minimum" )
+ Anzahl.ToMin
+ printlog "Minimum SplitCellCount is " & Anzahl.GetText & "."
+
+ printlog( "<Horizontal> should be checked" )
+ if ( Horizontal.IsChecked ) then
+ printlog "Horizontally is clicked."
+ else
+ warnlog "Horizontally should be clicked by default!"
+ endif
+
+ printlog( "Distribute/Split equally" )
+ GleichmaessigTeilen.Check
+
+ printlog( "Check <Vertically>" )
+ Vertikal.Check
+
+ printlog( "Close dialog <Split Cells>" )
+ hCloseDialog( ZellenTeilen, "close" )
+ else
+ warnlog( "Dialog <Split Cells> did not open" )
+ endif
+ printlog " Checking optimize button 'ToDo: button not working"
+ 'Kontext "TableObjectBar"
+ 'Optimieren.TearOff
+ 'OptimizeTablebar.Close
+
+ printlog "Checking Alignment."
+ Kontext "TableObjectBar"
+ Top.Click
+ CenterVertical.Click
+ Bottom.Click
+ printlog "Alignment buttons checked."
+
+ printlog "Checking inserting and deleting of columns and rows."
+ ZeileEinfuegen.Click
+ printlog "Row inserted."
+
+ Zeileloeschen.Click
+ printlog "Row deleted."
+
+ SpalteEinfuegen.Click
+ printlog "Column inserted."
+
+ Spalteloeschen.Click
+ printlog "Column deleted."
+
+ printlog "Checking table design button 'ToDo:needs some further examination here!"
+ tabledesign.Click
+
+ printlog "Checking for Table Design in Impress TaskBar or for Dialog in Draw."
+ if ( gApplication = "IMPRESS" ) then
+ kontext "Tasks"
+ if (NOT Tasks.exists) then
+ warnlog "Tasks Panel not visible. Opening now."
+ ViewTaskPane
+ else
+ printlog "Task Pane visible."
+ endif
+ else
+ kontext "TableDesign"
+ if TableDesign.exists then
+ printlog "Table Design Dialog is up."
+ TableDesign.Close
+ else
+ warnlog "TableDesign Dialog for Draw is missing."
+ endif
+ endif
+
+ printlog "Checking Properties button."
+ Kontext "TableObjectBar"
+ TableProperties.Click
+ Kontext
+ active.SetPage TabFont
+ if (NOT TabFont.Exists) then
+ warnlog "Tabpage missing!"
+ else
+ printlog "Tabpage Font is up."
+ endif
+ kontext "TabFont"
+
+ printlog "Checking Fonts Box."
+
+ if ( Font.exists() ) then
+ printlog( "Western dialog layout -> good" )
+ else
+ if ( FontWest.exists() ) then
+ warnlog( "<FontWest> exists, asian support is enabled which this test cannot handle" )
+ else
+ warnlog( "Unknown error while trying to access <Font> listbox" )
+ endif
+ hCloseDialog( TabFont, "close" )
+ hFileCloseAll()
+ goto endsub
+ endif
+
+ iItemCount = Font.GetItemCount
+ printlog "Fontbox has " & iItemCount & " entries."
+ for iItemIndex = 1 to iItemCount
+ Font.Select(iItemIndex)
+ next iItemIndex
+
+ printlog "Checking style box."
+ iItemCount = Style.GetItemCount
+ printlog "Stylebox has " & iItemCount & " entries."
+ for iItemIndex = 1 to iItemCount
+ Style.Select(iItemIndex)
+ next iItemIndex
+
+ printlog "Checking size box."
+ iItemCount = Size.GetItemCount
+ printlog "Sizebox has " & iItemCount & " entries."
+ for iItemIndex = 1 to iItemCount
+ Size.Select(iItemIndex)
+ next iItemIndex
+
+ printlog "Checking language box."
+ iItemCount = Language.GetItemCount
+ printlog "Language box has " & iItemCount & " entries."
+ for iItemIndex = 1 to iItemCount
+ Language.Select(iItemIndex)
+ next iItemIndex
+
+ '------------Next Tab-----------------
+
+ printlog "Checking Tabpage FontEffects."
+ Kontext
+ active.SetPage TabFontEffects
+ if (NOT TabFontEffects.Exists) then
+ warnlog "Tabpage FontEffects missing!"
+ else
+ printlog "Tabpage FontEffects is up."
+ endif
+ kontext "TabFontEffects"
+
+ printlog "Checking Underlining box."
+ iItemCount = Underline.GetItemCount
+ printlog "Underlining has " & iItemCount & " entries."
+ for iItemIndex = 1 to iItemCount
+ Underline.Select(iItemIndex)
+ next iItemIndex
+
+ printlog "Checking StrikeThrough box."
+ iItemCount = StrikeThrough.GetItemCount
+ printlog "StrikeThrough has " & iItemCount & " entries."
+ for iItemIndex = 1 to iItemCount
+ StrikeThrough.Select(iItemIndex)
+ next iItemIndex
+
+ printlog "Checking individual words."
+ IndividualWords.Check
+ printlog "Individual words checked."
+
+ printlog "Checking Color box."
+ iItemCount = Color.GetItemCount
+ printlog "Font color has " & iItemCount & " entries."
+ for iItemIndex = 1 to iItemCount
+ Color.Select(iItemIndex)
+ next iItemIndex
+
+ printlog "Checking Relief."
+ iItemCount = Relief.GetItemCount
+ printlog "Relief has " & iItemCount & " entries."
+ for iItemIndex = 1 to iItemCount
+ Relief.Select(iItemIndex)
+ next iItemIndex
+ Relief.Select(1) 'setting back Relief, otherwise Outline is greyed out
+
+ printlog "Checking Outline and Shadow."
+ Outline.Check
+ printlog "Outline checked."
+ Shadow.Check
+ printlog "Shadow checked."
+
+ '------------Next Tab-----------------
+
+ printlog "Checking Tabpage Borders."
+ Kontext
+ active.SetPage TabUmrandung
+ if (NOT TabUmrandung.Exists) then
+ warnlog "Tabpage Borders missing!"
+ else
+ printlog "Tabpage Borders is up."
+ endif
+ kontext "TabUmrandung"
+ printlog "Checking Style."
+ iItemCount = Stil.GetItemCount
+ printlog "Style has " & iItemCount & " entries."
+ for iItemIndex = 1 to iItemCount
+ Stil.Select(iItemIndex)
+ next iItemIndex
+
+ printlog "Checking Color."
+ iItemCount = StilFarbe.GetItemCount
+ printlog "Color has " & iItemCount & " entries."
+ for iItemIndex = 1 to iItemCount
+ StilFarbe.Select(iItemIndex)
+ next iItemIndex
+
+ printlog "Un-Checking Synchronize."
+ Synchronisieren.UnCheck
+ printlog "Synchronize unchecked."
+
+ printlog "Checking Left."
+ Links.ToMax
+ printlog "Maximum Left is " & Links.GetText & "."
+ Links.ToMin
+ printlog "Minimum Left is " & Links.GetText & "."
+
+ printlog "Checking Right."
+ Rechts.ToMax
+ printlog "Maximum Right is " & Rechts.GetText & "."
+ Rechts.ToMin
+ printlog "Minimum Right is " & Rechts.GetText & "."
+
+ printlog "Checking Top."
+ Oben.ToMax
+ printlog "Maximum Top is " & Oben.GetText & "."
+ Oben.ToMin
+ printlog "Minimum Top is " & Oben.GetText & "."
+
+ printlog "Checking Bottom."
+ Unten.ToMax
+ printlog "Maximum Bottom is " & Unten.GetText & "."
+ Unten.ToMin
+ printlog "Minimum Bottom is " & Unten.GetText & "."
+
+ '------------Next Tab-----------------
+
+ printlog "Checking Tabpage Background."
+ Kontext
+ active.SetPage TabArea
+ if (NOT TabArea.Exists) then
+ warnlog "Tabpage Area missing!"
+ else
+ printlog "Tabpage Area is up."
+ endif
+ kontext "TabArea"
+
+ iItemCount = FillOptions.GetItemCount
+ for iItemIndex = 2 to iItemCount
+ FillOptions.Select(iItemIndex)
+ next iItemIndex
+ printlog "Tabpage Background tested."
+ TabArea.Cancel
+ printlog "Format Cells dialog closed."
+ printlog "Toolbar tested."
+
+ printlog " Closing doc."
+ hCloseDocument
+
+endcase 'tiTableObjectBar
+
+'-------------------------------------------------------------------------------
diff --git a/testautomation/graphics/optional/includes/global/g_toolbars.inc b/testautomation/graphics/optional/includes/global/g_toolbars.inc
new file mode 100644
index 000000000000..9f8d8a6b2fb4
--- /dev/null
+++ b/testautomation/graphics/optional/includes/global/g_toolbars.inc
@@ -0,0 +1,358 @@
+'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
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* Owner : wolfram.garten@oracle.com
+'*
+'* short description :
+'*
+'*********************************************************************
+' #1 Toolboxen_Rechtecke
+' #1 Toolboxen_Kreise
+' #1 Toolboxen_3dObjekte
+' #1 Toolboxen_Linien
+' #1 Toolboxen_Kurven
+'\********************************************************************
+
+
+testcase Toolboxen_Rechtecke
+ Printlog "- Toolbox rectangles"
+ Dim i
+
+
+ Printlog "- 1.: Create rectangles, apply shadow and move them around"
+
+ for i = 1 to 4
+ select case i
+ case 1 : Printlog "- Create Rectangle Filled"
+ sleep 1
+ case 2 : Printlog "- Create Rectangle Round-Filled"
+ WL_SD_RechteckRundVoll
+ sleep 1
+ case 3 : Printlog "- Create Quadrat Filled"
+ WL_SD_QuadratVoll
+ sleep 1
+ case 4 : Printlog "Create Quadrat Round-Filled"
+ WL_SD_QuadratRundVoll
+ sleep 1
+ end select
+
+ Kontext "DocumentImpress"
+ sleep 2
+ Kontext
+ Kontext "TabSchatten"
+ sleep 1
+ Kontext "DocumentImpress"
+
+
+ gMouseClick 30,30
+ gMouseMove 30,30,90,90
+
+ gMouseClick 90,90
+ gMouseMove 90,90,30,30
+
+ gMouseClick 30,30
+ gMouseMove 30,30,90,90
+
+ gMouseClick 90,90
+ gMouseMove 90,90,30,30
+
+ sleep 2
+ next i
+endcase
+
+'**********************************************************************
+testcase Toolboxen_Kreise
+ Printlog "- Toolbox Circles"
+
+ Dim i
+
+
+
+ Printlog "- Create circles and ellipses"
+ for i = 1 to 7
+ case 1 : WL_SD_Ellipsen
+ sleep 1
+ Kontext "DocumentImpress"
+ gMouseMove 20,20,60,60
+ case 2 : WL_SD_EllipseVoll
+ sleep 1
+ Kontext "DocumentImpress"
+ gMouseMove 20,20,60,60
+ case 3 : WL_SD_EllipsensegmentVoll
+ sleep 1
+ kontext "DocumentImpress"
+ gMouseMove 20,20,40,40
+ gMouseClick 20,30
+ gMouseClick 20,28
+ case 4 : WL_SD_EllipsenabschnittVoll
+ sleep 1
+ kontext "DocumentImpress"
+ gMouseMove 20,20,40,40
+ gMouseClick 20,30
+ gMouseClick 20,28
+ case 5 : WL_SD_KreisVoll
+ sleep 1
+ kontext "DocumentImpress"
+ gMouseMove 20,20,40,40
+ case 6 : WL_SD_KreissegmentVoll
+ sleep 1
+ kontext "DocumentImpress"
+ gMouseMove 20,20,40,40
+ gMouseClick 20,30
+ gMouseClick 20,28
+ case 7 : WL_SD_KreisabschnittVoll
+ sleep 1
+ kontext "DocumentImpress"
+ gMouseMove 20,20,40,40
+ gMouseClick 20,30
+ gMouseClick 20,28
+ end select
+
+ FormatArea
+ Kontext
+ Kontext "TabSchatten"
+ Anzeigen.Click
+ TabSchatten.OK
+ sleep 1
+ Kontext "DocumentImpress"
+ gMouseClick 30,30
+
+ gMouseClick 90,90
+ gMouseMove 90,90,30,30
+
+ gMouseClick 30,30
+ gMouseMove 30,30,90,90
+
+ gMouseClick 90,90
+ gMouseMove 90,90,30,30
+
+ gMouseClick 30,30
+ gMouseMove 30,30,90,90
+
+ gMouseClick 90,90
+ gMouseMove 90,90,30,30
+
+ sleep 2
+next i
+endcase
+'***********************************************************************************
+testcase Toolboxen_3dObjekte
+ Printlog "- Toolbox 3D objects"
+ Dim i
+
+
+ Printlog "- Create 3D objects"
+ for i = 1 to 8
+ printlog "doing now: "+i
+ select case i
+ sleep 1
+ Kontext "DocumentImpress"
+ gMouseMove 20,20,60,60
+ case 2 : WL_SD_Kugel
+ sleep 1
+ Kontext "DocumentImpress"
+ gMouseMove 20,20,60,60
+ case 3 : WL_SD_Zylinder
+ sleep 1
+ kontext "DocumentImpress"
+ gMouseMove 20,20,40,40
+ case 4 : WL_SD_Kegel
+ sleep 1
+ kontext "DocumentImpress"
+ gMouseMove 20,20,40,40
+ case 5 : WL_SD_Pyramide
+ sleep 1
+ kontext "DocumentImpress"
+ gMouseMove 20,20,40,40
+ case 6 : WL_SD_Torus
+ sleep 1
+ kontext "DocumentImpress"
+ gMouseMove 20,20,40,40
+ case 7 : WL_SD_Schale
+ sleep 1
+ kontext "DocumentImpress"
+ gMouseMove 20,20,40,40
+ case 8 : WL_SD_Halbkugel
+ end select
+ sleep 2
+ FormatArea
+ sleep 2
+ Kontext
+ Kontext "TabSchatten"
+ Anzeigen.Click
+ TabSchatten.OK
+ sleep 1
+ Kontext "DocumentImpress"
+ gMouseClick 30,30
+ gMouseClick 90,90
+ gMouseMove 90,90,30,30
+ gMouseClick 30,30
+ gMouseMove 30,30,90,90
+ gMouseClick 90,90
+ gMouseMove 90,90,30,30
+ gMouseClick 30,30
+ gMouseMove 30,30,90,90
+ gMouseClick 90,90
+ gMouseMove 90,90,30,30
+ sleep 2
+ next i
+ gMouseClick 99,99
+ sleep 1
+ Printlog "- 3D-body created"
+endcase
+'******************************************************************************
+testcase Toolboxen_Linien
+ Printlog "- Toolbox Lines "
+ Dim i
+ Printlog "- Create lines and arrows"
+ for i = 1 to 10
+ select case i
+ sleep 1
+ Kontext "DocumentImpress"
+ gMouseMove 20,20,60,60
+ case 2 : WL_SD_LinieMitPfeilende
+ sleep 1
+ Kontext "DocumentImpress"
+ gMouseMove 20,20,60,60
+ case 3 : WL_SD_LinieMitPfeilKreisende
+ sleep 1
+ kontext "DocumentImpress"
+ gMouseMove 20,20,40,40
+ case 4 : WL_SD_LiniemitPfeilQuadratende
+ sleep 1
+ kontext "DocumentImpress"
+ gMouseMove 20,20,40,40
+ case 5 : WL_SD_Liniewinkel
+ sleep 1
+ kontext "DocumentImpress"
+ gMouseMove 20,20,40,40
+ case 6 : WL_SD_LinieMitPfeilanfang
+ sleep 1
+ kontext "DocumentImpress"
+ gMouseMove 20,20,40,40
+ case 7 : WL_SD_LinieMitKreisPfeilende
+ sleep 1
+ kontext "DocumentImpress"
+ gMouseMove 20,20,40,40
+ case 8 : WL_SD_LiniemitPfeilKreisende
+
+ case 9 : WL_SD_Masslinie
+ sleep 1
+ kontext "DocumentImpress"
+ gMouseMove 20,20,40,40
+ case 10 : WL_SD_LinieMitPfeilenden
+
+ end select
+ Kontext "DocumentImpress"
+ gMouseClick 25,25
+ sleep 1
+ sleep 1
+ gMouseMove 80,80,25,25
+ sleep 1
+ gMouseMove 25,25,90,90
+ sleep 1
+ gMouseClick 90,90,25,25
+ sleep 1
+ gMouseClick 99,99
+ sleep 1
+ next i
+ Call hCloseDocument
+endcase
+'********************************************************************
+testcase Toolboxen_Kurven
+ Printlog "- Toolbox curves"
+ Dim i
+ Call hNewDocument
+ sleep 1
+ for i = 1 to 8
+ select case i
+ case 1 : WL_SD_KurveVoll
+ sleep 1
+ gMouseMove 20,20,60,60
+ gMouseClick 70,70
+ gMouseMove 70,70,30,30
+ gMouseDoubleClick 30,30
+ case 2 : WL_SD_KurveLeer
+ sleep 1
+ gMouseMove 20,20,60,60
+ gMouseClick 70,70
+ gMouseMove 70,70,30,30
+ gMouseDoubleClick 30,30
+ case 3 : WL_SD_PolygonVoll
+ sleep 1
+ gMouseMove 20,20,60,60
+ gMouseClick 70,70
+ gMouseClick 10,10
+ gMouseClick 90,90
+ gMouseClick 50,50
+ gMouseDoubleClick 50,50
+ case 4 : WL_SD_Polygon
+ sleep 1
+ gMouseMove 20,20,60,60
+ gMouseClick 70,70
+ gMouseClick 10,10
+ gMouseClick 90,90
+ gMouseClick 50,50
+ gMouseDoubleClick 50,50
+ case 5 : WL_SD_PolygonWinkelVoll
+ sleep 1
+ gMouseMove 20,20,60,60
+ gMouseClick 70,70
+ gMouseClick 10,10
+ gMouseClick 90,90
+ gMouseClick 50,50
+ gMouseDoubleClick 50,50
+ case 6 : WL_SD_PolygonWinkel
+ sleep 1
+ gMouseMove 20,20,60,60
+ gMouseClick 70,70
+ gMouseClick 10,10
+ gMouseClick 90,90
+ gMouseClick 50,50
+ gMouseDoubleClick 50,50
+ case 7 : WL_SD_FreihandlinieVoll
+ sleep 1
+ gMouseMove 10,10,70,70
+ gMouseMove 20,20,30,80
+ case 8 : WL_SD_FreihandlinieLeer
+ sleep 1
+ gMouseMove 10,10,70,70
+ gMouseMove2 70,70,20,20
+ gMouseMove 20,20,30,80
+ end select
+ Kontext "DocumentImpress"
+ sleep 1
+ sleep 1
+ try
+ catch
+ Warnlog "- Nothing in the document to cut out"
+ endcatch
+ sleep 1
+ next i
+endcase
+
+
diff --git a/testautomation/graphics/optional/includes/global/g_tools.inc b/testautomation/graphics/optional/includes/global/g_tools.inc
new file mode 100644
index 000000000000..fa3f429bbb3b
--- /dev/null
+++ b/testautomation/graphics/optional/includes/global/g_tools.inc
@@ -0,0 +1,582 @@
+'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
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* Owner : wolfram.garten@oracle.com
+'*
+'* short description : will be moved to autocorrection.bas/inc
+'*
+'**************************************************************************************
+' #1 tiToolsThesaurus
+' #1 tiToolsHyphenation1
+' #1 tiToolsHyphenation2
+' #1 tToolsMacro
+'\*************************************************************************************
+' sFile = gTesttoolpath + "graphics\required\input\silben_"+iSprache+sExt
+
+'-------------------------------------------------------------------------------
+testcase tiToolsThesaurus
+
+ Dim sWord as string
+ Dim sChangedWord as string
+ Dim sReplaceWord as string
+ Dim sAlternativeText as string
+ Dim sExt as string
+ Dim ZaehlerBedeutung
+
+ 'for normal text, the thesaurus is enabled,
+ 'if the format->character->language of the word has a thesaurus
+ 'unfortunately in textboxes this doesn't work, you can give the word a langauge,
+ 'but this is been ignored by our thesaurus
+ 'so especially for asian languages you have to set a default language in the options,
+ 'to be able to use the thesaurus there - fallback to englisch,
+ 'because there is no thesaurus for cjk languages
+
+ 'As long as OOo has no modules for that, disabled
+ if gOOO = True then
+ printlog "No spellchecking in OOo"
+ goto endsub
+ endif
+
+ 'First we make sure we test a language where Thesaurus
+ select case iSprache
+ case 01 : sWord = "Hello"
+ case 03 : sWord = "Alo"
+ case 07 : printlog "- No Thesaur for Russian available"
+ goto endsub
+ case 30 : Printlog "- No Thesaurus available !"
+ goto endsub
+ case 31 : sWord = "Guiten"
+ case 33 : sWord = "Bonjour"
+ case 34 : sWord = "Hola"
+ case 35 : Printlog "- No Thesaurus available !"
+ goto endsub
+ case 36 : Printlog "- No Thesaurus available !"
+ goto endsub
+ case 37 : Printlog "- No Thesaurus available !"
+ goto endsub
+ case 39 : sWord = "Ciao"
+ case 42 : Printlog "- No Thesaurus available !"
+ goto endsub
+ case 45 : sWord = "Hej"
+ case 46 : sWord = "Välkommen"
+ case 47 : Printlog "- No Thesaurus available !"
+ goto endsub
+ case 48 : Printlog "- No Thesaurus in Polish!"
+ goto endsub
+ case 49 : sWord = "Hallo"
+ case 50 : sWord = "Prosojnica"
+ case 51 : Printlog "- No Thesaurus available !"
+ goto endsub
+ case 55 : Printlog "- No Thesaurus in Brazilian!"
+ goto endsub
+ case 90 : Printlog "- No Thesaurus available !"
+ goto endsub
+
+ case else : if bAsianLan then
+ hSetSpellHypLanguage
+ sWord = "Hello"
+ else
+ Warnlog "For the language " + iSprache +" nothing is prepared yet: insert text here"
+ sWord = "Hello"
+ endif
+ end select
+
+ PrintLog "Thesaurus with 1 word: " + sWord
+
+ if( Ucase(gApplication) = "DRAW" ) then
+ sExt = ".odg"
+ elseif( Ucase(gApplication) = "IMPRESS" ) then
+ sExt = ".odp"
+ endif
+
+ Call hFileOpen (gTesttoolpath + "graphics\required\input\recht_" + iSprache + sExt)
+ Call sMakeReadOnlyDocumentEditable()
+ Call hTextrahmenErstellen (sWord,20,20,50,30)
+ sleep 1
+
+ printlog "select the word"
+ hTypeKeys "<Home><SHIFT END>"
+
+ try
+ ExtrasThesaurusDraw
+ catch
+ warnlog "No Thesaurus available."
+ hCloseDocument()
+ goto endsub
+ endcatch
+
+ Kontext "Thesaurus"
+ if Thesaurus.Exists(3) then
+
+ if CurrentWord.GetSelText <> sWord Then
+ WarnLog "marked word should be:" + sWord + " but it is:" + CurrentWord.GetSelText
+ else
+ PrintLog "Marked word is correctly changed"
+ endif
+
+ if Alternatives.GetItemCount = 0 Then
+ warnlog "There are no alternative for this word"
+ sleep 1
+ else
+ printlog "select the first alternative"
+ Alternatives.Select 1
+
+ printlog "check if the selected alternative apprear in the ReplaceWith field."
+
+ sAlternativeText = Alternatives.getSeltext(1,3)
+ 'remove the part in the () if there is any
+ if( Instr(sAlternativeText, "(") <> 0 ) then
+ sAlternativeText = left(sAlternativeText, Instr(sAlternativeText, "(") - 2 )
+ endif
+
+ if ( ReplaceWith.getText() <> sAlternativeText ) then
+ warnlog "the text is no transfered to the ReplaceWith field. " +_
+ "ReplaceWith = " + ReplaceWith.getText() + ", Alternative = " + sAlternativeText
+ else
+ printlog "the text is transfered to the ReplaceWith field."
+ endif
+
+ sReplaceWord = ReplaceWith.getText()
+ sleep 1
+ endif
+ Thesaurus.OK
+
+ if(Ucase(gApplication) = "DRAW") then
+ Kontext "Draw"
+ elseif(Ucase(gApplication) = "IMPRESS") then
+ Kontext "Impress"
+ else ' fallback
+ warnlog "gApplication is wrong"
+ goto endsub
+ endif
+
+ hTypeKeys "<Home><SHIFT END>"
+ EditCopy
+ sChangedWord = getClipboard()
+ printlog "sChangedWord = " + sChangedWord
+ if(sChangedWord <> sReplaceWord) then
+ warnlog "the text was not replaced"
+ else
+ printlog "the text was successfull replaced"
+ endif
+ else
+ warnlog "thesaurus didn't come up."
+ end if
+
+ Call hCloseDocument
+
+endcase
+'-------------------------------------------------------------------------------
+testcase tiToolsThesaurusWithoutText
+
+ printlog "Thesaurus without any word in the document"
+ Call hNewDocument
+ try
+ ExtrasThesaurusDraw
+ catch
+ printlog "the Thesaurus is correctly not available"
+ call hCloseDocument
+ goto endsub
+ endcatch
+
+ WarnLog "If no word is in the document, Thesaurus shouldn't be available"
+ Kontext "Thesaurus"
+ if Thesaurus.Exists then
+ Thesaurus.Cancel
+ endif
+
+ Call hCloseDocument
+
+
+endcase
+'-------------------------------------------------------------------------------
+testcase tiToolsThesaurusContextMenu
+
+ Dim sWord as string
+ Dim sExt as string
+ Dim iItemCount as Integer
+
+ 'for normal text, the thesaurus is enabled,
+ 'if the format->character->language of the word has a thesaurus
+ 'unfortunately in textboxes this doesn't work, you can give the word a langauge,
+ 'but this is been ignored by our thesaurus
+ 'so especially for asian languages you have to set a default language in the options,
+ 'to be able to use the thesaurus there - fallback to englisch,
+ 'because there is no thesaurus for cjk languages
+
+ 'As long as OOo has no modules for that, disabled
+ if gOOO = True then
+ printlog "No spellchecking in OOo"
+ goto endsub
+ endif
+
+ 'First we make sure we test a language where Thesaurus
+ select case iSprache
+ case 01 : sWord = "Hello"
+ case 03 : sWord = "Alo"
+ case 07 : printlog "- No Thesaur for Russian available"
+ goto endsub
+ case 30 : Printlog "- No Thesaurus available !"
+ goto endsub
+ case 31 : sWord = "Guiten"
+ case 33 : sWord = "Bonjour"
+ case 34 : sWord = "Hola"
+ case 35 : Printlog "- No Thesaurus available !"
+ goto endsub
+ case 36 : Printlog "- No Thesaurus available !"
+ goto endsub
+ case 37 : Printlog "- No Thesaurus available !"
+ goto endsub
+ case 39 : sWord = "Ciao"
+ case 42 : Printlog "- No Thesaurus available !"
+ goto endsub
+ case 45 : sWord = "Hej"
+ case 46 : sWord = "Välkommen"
+ case 47 : Printlog "- No Thesaurus available !"
+ goto endsub
+ case 48 : Printlog "- No Thesaurus in Polish!"
+ goto endsub
+ case 49 : sWord = "Hallo"
+ case 50 : sWord = "Prosojnica"
+ case 51 : Printlog "- No Thesaurus available !"
+ goto endsub
+ case 55 : Printlog "- No Thesaurus in Brazilian!"
+ goto endsub
+ case 90 : Printlog "- No Thesaurus available !"
+ goto endsub
+
+ case else : if bAsianLan then
+ hSetSpellHypLanguage
+ sWord = "Hello"
+ else
+ Warnlog "For the language " + iSprache +" nothing is prepared yet: insert text here"
+ sWord = "Hello"
+ endif
+ end select
+
+ PrintLog "Thesaurus with 1 word: " + sWord
+
+ Call hNewDocument
+ Call hTextrahmenErstellen (sWord,20,20,50,30)
+ sleep 1
+
+ printlog "select the word"
+ hTypeKeys "<Home><SHIFT END>"
+
+ hOpenContextMenu
+
+ hMenuSelectNr(14) ' the synonyms
+ iItemCount = hMenuItemGetCount
+ printlog iItemCount
+ if(iItemCount <= 2 ) then ' none and Thesaurus item
+ warnlog "There should be a synonymus display for the word '" + sWord + "' but it isn't."
+ endif
+
+ hMenuSelectNr(iItemCount) ' the last item
+
+ Kontext "Thesaurus"
+ if Thesaurus.Exists(5) then
+ printlog "Thesaurus dialog appear from the context menu"
+ Thesaurus.Cancel
+ else
+ warnlog "the thesaurus dialog does not appear fro mthe context menu of a selected word"
+ endif
+
+ call hCloseDocument
+
+endcase
+'-------------------------------------------------------------------------------
+testcase tiToolsHyphenation1
+
+ printlog " - Hyphenation without any text"
+ Call hNewDocument '/// New impress document ///'
+ sleep 3
+ ToolsLanguageHyphenationDraw '/// Try with empty document ///'
+ Kontext "Hyphenation"
+ if Hyphenation.Exists(1) = True Then
+ Warnlog " - Dialog ist da"
+ Hyphenation.Cancel
+ else
+ Printlog " - Hyphenation activated"
+ end if
+' Kontext "DocumentImpress"
+ printlog " - Hyphenation with text, but without any possibility to break words"
+ select case iSprache
+ case 01 : hTextrahmenErstellen ("This ist a text with no split words",10,10,40,40) '/// Create text without a pssibility to split words///'
+ case 03 : hTextrahmenErstellen ("Compare a tradu" + Chr(231) + Chr(227) + "o com o original",10,10,40,40)
+ case 07 : qaerrorlog "- No Hypenation for Russian available"
+ Call hCloseDocument '/// Close document ///'
+ goto endsub
+ case 31 : hTextrahmenErstellen ("Het is mijn bedoeling om voor en hulpmiddel.",10,10,40,40)
+ case 33 : hTextrahmenErstellen ("Merci beaucoup pout votre candidature du 13/11/97.",10,10,40,40)
+ case 34 : hTextrahmenErstellen ("This ist a text with no spliting words",10,10,40,40)
+ case 36 : hTextrahmenErstellen ("Semmi karhozattyoc nincz most azoknac, a kic az Iesus Christusban be oltattac",10,10,40,40)
+ case 39 : hTextrahmenErstellen ("Il documento 'Senza nome 1' stato modififcato",10,10,40,40)
+ case 45 : hTextrahmenErstellen ("at du har nok i dit hvis du",10,10,40,40 )
+ case 46 : hTextrahmenErstellen ("Detta är en text utan delade ord",10,10,40,40)
+ case 48 : hTextrahmenErstellen (" Jeoli jednak zechcesz",10,10,40,40)
+ case 49 : hTextrahmenErstellen ("Dies ist ein Text ohne eine Moeglichkeit Woerter zu trennen",10,10,40,40)
+ case 50 : hTextrahmenErstellen ("Zato ves čas iščemo nove člane: sodelujte",10,10,40,40)
+ case 55 : hTextrahmenErstellen ("a Sun tentou adquirir a Apple",10,10,40,40)
+ case else : if bAsianLan then
+ printlog "For the language " + iSprache +" nothing is prepared yet, but is AsianLan, so OK :-)"
+ printlog " :-) will use English instead"
+ hTextrahmenErstellen ("This ist a text with no split words",10,10,40,40)
+ else
+ Warnlog "For the language " + iSprache +" nothing is prepared yet: insert text here"
+ endif
+ end select
+ hTypeKeys "<Home>"
+ ToolsLanguageHyphenationDraw '/// Try ///'
+ Kontext "Hyphenation"
+ if Hyphenation.Exists =True Then
+ Warnlog "Dialog exists"
+ Hyphenation.Cancel
+ else
+ Kontext "Active"
+ if Active.Exists then Active.OK
+ end if
+
+ Call hCloseDocument '/// Close document ///'
+
+endcase 'tiToolsHyphenation1
+
+'-------------------------------------------------------------------------------
+testcase tiToolsHyphenation2
+
+ dim iWaitIndex as integer
+ dim sExt as string
+ Dim i : Dim DasWort2 : Dim DasWort3 : Dim DasWort4 : Dim DasWort5 : Dim DasWort6 : Dim DasWort7
+ Dim DasWort as string
+ dim sDraw as string
+ dim sFile as string
+ PrintLog "- Tools/Hyphenation2"
+ Select Case Ucase(gApplication)
+ case "DRAW" : sExt = ".odg"
+ case "IMPRESS" : sExt = ".odp"
+ end select
+
+ if ((not bAsianLan) AND (iSprache <> 07)) then
+ sFile = gTesttoolpath + "graphics\required\input\silben_"+iSprache+sExt
+ Call hFileOpen (sFile)
+ endif
+
+ select case iSprache '/// Open prepared document ///'
+ case 01 :DasWort = "ation" : DasWort2 = "tion" : DasWort3 = "ion" : DasWort4 = "on" '+Chr(34)
+ case 07 : qaerrorlog "- No Hypenation for Russian available"
+ goto endsub
+ case 31 :DasWort = "siteit" : DasWort2 = "iteit" : DasWort3 = "teit" : DasWort4 = "eit"
+ case 33 :DasWort = "ture" : DasWort2 = "ure" : DasWort3 = "re" : DasWort4 = "e"
+ case 34 :DasWort = "chvo" : DasWort2 = "hvo" : DasWort3 = "vo" : DasWort4 = "o"
+ case 36 :DasWort = "zatnal" : DasWort2 = "atnal" : DasWort3 = "tnal" : DasWort4 = "nal"
+ case 39 :DasWort = "sentu" : DasWort2 = "entu" : DasWort3 = "ntu" : DasWort4 = "tu"
+ case 46 :DasWort = "niska" : DasWort2 = "iska" : DasWort3 = "ska" : DasWort4 = "ka"
+ case 48 :DasWort = "nie" : DasWort2 = "ie" : DasWort3 = "e"
+ case 49 :DasWort = "nung" : DasWort2 = "ung" : DasWort3 = "ng" : DasWort4 = "g"
+ case 50 :DasWort = "nica" : DasWort2 = "ica" : DasWort3 = "ca" : DasWort4 = "a"
+ case 55 :DasWort = "gia" : DasWort2 = "ia" : DasWort3 = "a" : DasWort4 = "ogia"
+ case else : if bAsianLan then
+ printlog "For the language " + iSprache +" nothing is prepared yet, but is AsianLan, so OK :-)"
+ printlog " :-) will use English instead"
+ Call hFileOpen (gTesttoolpath + "graphics\required\input\silben_"+"1"+sExt)
+ DasWort = "ation" : DasWort2 = "tion" : DasWort3 = "ion" : DasWort4 = "on" '+Chr(34)
+ else
+ Warnlog "For the language " + iSprache +" nothing is prepared yet: insert text here and create file: "+sFile
+ hNewDocument
+ endif
+ end select
+
+ Call sMakeReadOnlyDocumentEditable
+
+ printlog " - Test hyphenation"
+ EditSelectAll '/// Press CTRL + A to select all ///'
+ '/// press return to go into the edit mode ///'
+ hTypeKeys "<Return>"
+
+ sleep 1
+ ' WA for draw, or smth else: get text part before hyphenation:
+ if iSprache = "1" OR bAsianLan = TRUE then
+ hTypeKeys "<MOD1 END><HOME><MOD1 SHIFT RIGHT RIGHT>" '/// Select part of text and compare it with original text at this place ///'
+ else
+ hTypeKeys "<MOD1 END><HOME><MOD1 SHIFT RIGHT>"
+ endif
+ EditCopy
+ sDraw = GetClipboardText()
+ EditSelectAll '/// Select whole text ///'
+ ToolsLanguageHyphenationDraw '/// Run Hyphenation ///'
+ gMouseClick 50,50
+ hTypeKeys "<MOD1 END><HOME><MOD1 SHIFT RIGHT>" '/// Select part of text and compare it with original text at this place ///'
+ sleep 3
+ EditCopy
+printlog GetClipboardText
+ select case GetClipboardText
+ case DasWort : printlog " - Hyphenation worked"
+ case DasWort2 : printlog " - Hyphenation worked"
+ case DasWort3 : printlog " - Hyphenation worked"
+ case DasWort4 : printlog " - Hyphenation worked"
+ case else : warnlog " - Hyphenation didnt work"
+ end select
+ if GetClipboardText <> sDraw then
+ Printlog " - WA draw hyphenation did work :-)"
+ else
+ Warnlog " - Hyphenation did not work"
+ Printlog "Expected: '"+DasWort+"'; or something different than: '"+sDraw+"'; But what we got was: '"+GetClipboardText+"'"
+ end if
+ sleep 1
+ Call hCloseDocument '/// Close document ///'
+
+endcase 'tiToolsHyphenation2
+
+'-------------------------------------------------------------------------------
+testcase tToolsMacro
+
+ Dim i as integer
+ Dim j as integer
+ Dim Zaehler as integer
+ Dim ZaehlerListe as integer
+
+ Call hNewDocument
+
+ ToolsMacro
+ Kontext "Makro"
+
+ '/// to get the count of all macros, the list needs to get elapsed-all ///'
+ for j = 1 to 2
+ Zaehler=MakroAus.GetItemCount
+ MakroAus.typeKeys "<end>"
+ for i = 1 to Zaehler
+ MakroAus.typeKeys "<+><up>"
+ next i
+ next j
+ Zaehler=MakroAus.GetItemCount
+ for i= 1 to Zaehler
+ printlog "Starting Macro: (" + i + "/"+ Zaehler + ")"
+ MakroAus.Select i
+ if Makroname.GetText = "" Then
+ try
+ Ausfuehren.Click
+ Aufzeichnen.Click
+ Zuordnen.Click
+ Bearbeiten.Click
+ Warnlog " - Controls should not be visible"
+ catch
+ Printlog " Contrls invisible because no macro choosen"
+ endcatch
+ else
+ SetClipboard = Makroname.GetText
+ ZaehlerListe=MakroListe.GetItemCount
+ for j=2 to ZaehlerListe
+ Makroliste.Select j
+ if Makroname.GetText<>GetClipboardText Then
+ Printlog " Selection got used"
+ else
+ Warnlog " - Selection not right, it should be: " + Makroliste.GetSelText + " but it is: " + GetClipboardText
+ end if
+ next j
+ end if
+ next i
+
+ Printlog " run macros"
+ MakroAus.Select 6 '3
+ Ausfuehren.Click
+ sleep 10
+ if Makro.Exists Then
+ Warnlog " - Macro not executed"
+ else
+ Printlog " Macro executed"
+ ToolsMacro
+ Kontext "Makro"
+ end if
+
+ Zuordnen.Click
+ Kontext
+ Active.SetPage TabCustomizeMenu
+ Kontext "TabCustomizeMenu"
+ If TabCustomizeMenu.Exists Then
+ Printlog " Assign macro works"
+ TabCustomizeMenu.Cancel
+ sleep 3
+ Kontext "Makro"
+ else
+ Warnlog " - Assigning macro does not work"
+ end if
+
+ Bearbeiten.Click
+ try
+ sleep 1 ' this sleep is necessary. it takes some time, until focuse switched to basic window!
+ ViewNavigator
+ kontext "NavigatorDraw"
+ if NavigatorDraw.exists (5) then
+ Warnlog " - Edit macro does not work"
+ ViewNavigator
+ endif
+ catch
+ hCloseDocument
+ Kontext "DocumentDraw"
+ ToolsMacro
+ Kontext "Makro"
+ Printlog " Edit macro works"
+ endcatch
+
+ MakroAus.typeKeys "<end>"
+ Zaehler = Makroliste.GetItemCount
+ Neu.Click ' same as delete
+ kontext "NeuesModul"
+ Modulname.SetText "NewMarco"
+ NeuesModul.OK
+ ToolsMacro
+ Kontext "Makro"
+ if (Makroliste.GetItemCount = (Zaehler+1)) Then
+ Printlog " New macro works"
+ else
+ Warnlog " - Macro wasn't created"
+ end if
+
+ if (Makroliste.GetItemCount <> Makroliste.getSelIndex) Then
+ Warnlog " created Macro not selected"
+ Makroaus.Select(Makroaus.GetItemCount)
+ end if
+ sleep 1
+ Loeschen.Click
+ sleep 1
+ Kontext "Active"
+ printlog Active.getText
+ Active.Yes
+ sleep 2
+ Kontext "Makro"
+ if (Makroliste.GetItemCount = 0) Then
+ Printlog " Delete macro works"
+ else
+ Warnlog " - Macro wasn't deleted"
+ end if
+ sleep 2
+ makro.close
+ 'TODO: organizer testing!
+ Call hCloseDocument
+ Call hCloseDocument
+
+endcase 'tToolsMacro
diff --git a/testautomation/graphics/optional/includes/global/g_zoom.inc b/testautomation/graphics/optional/includes/global/g_zoom.inc
new file mode 100644
index 000000000000..c82b6743966a
--- /dev/null
+++ b/testautomation/graphics/optional/includes/global/g_zoom.inc
@@ -0,0 +1,133 @@
+'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
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* Owner : wolfram.garten@oracle.com
+'*
+'* short description :
+'*
+'*********************************************************************
+' #1 tViewZoom
+'\********************************************************************
+
+testcase tViewZoom
+ dim Zaehler as integer
+ dim Position1 as integer
+ dim Position2 as integer
+ Dim Datei$
+ Printlog "- view Zoom"
+
+ if (gApplication = "IMPRESS") then
+ ExtensionString = "odp"
+ else
+ ExtensionString = "odg"
+ end if
+
+ Datei$ = ConvertPath (gOfficePath + "user\work\test." & ExtensionString)
+
+ Printlog "- View-Zoom testing"
+ if dir(Datei$) <> "" then app.Kill(Datei$) ' to avoid the anoying overwrite warnlog :-)
+ Call hNewDocument '/// new document ///'
+ ViewZoom
+ Kontext "Massstab"
+ Vergroesserung100.Check '/// set zoom to 50% ///'
+ Massstab.OK
+ '/// create a number of rectangles with different color properties ///'
+ Kontext "SD_Farbleiste"
+ sleep 1
+ if SD_Farbleiste.Exists then
+ Printlog "- Color toolbar will be disabled now"
+ ViewToolbarsColorBar
+ end if
+ '/// All rectangles are created with same dimensions but using different zoom settings ///'
+ For Zaehler = 1 to 9
+ Position1 = 5 * Zaehler - 3
+ Position2 = 105 - 5 * Zaehler
+ Call hRechteckErstellen (Position1, Position1, Position2, Position2)
+ FormatArea
+ kontext
+ Active.SetPage TabFarben
+ Kontext "TabFarben"
+ Farbe.Select 5*Zaehler
+ TabFarben.OK
+ sleep 1
+ gMouseClick 50,0
+ Next Zaehler
+ sleep 2
+ hFileSaveAs (Datei$) '/// save document ///'
+ sleep 3
+ for Zaehler = 1 to 6 '/// changing zoom settings and checking functionality with controlling the color of the selected rectangle ///'
+ ViewZoom
+ Kontext "Massstab"
+ VergroesserungStufenlos.check
+ Stufenlos.Settext "45"
+ Massstab.OK
+ sleep 2
+ gMouseClick 50,1
+ ViewZoom
+ Kontext "Massstab"
+ Select Case Zaehler
+ Case 1: VergroesserungStufenlos.check
+ Stufenlos.Settext "40"
+ Case 2: VergroesserungStufenlos.check
+ Stufenlos.Settext "50"
+ Case 3: VergroesserungStufenlos.check
+ Stufenlos.Settext "75"
+ Case 4: VergroesserungStufenlos.check
+ Stufenlos.Settext "100"
+ Case 5: VergroesserungStufenlos.check
+ Stufenlos.Settext "150"
+ Case 6: VergroesserungStufenlos.check
+ Stufenlos.Settext "200"
+
+ 'Case 2: Vergroesserung50.check
+ 'Case 3: Vergroesserung75.check
+ 'Case 4: Vergroesserung100.check
+ 'Case 5: Vergroesserung150.check
+ 'Case 6: Vergroesserung200.check
+ End Select
+ Massstab.OK
+ sleep 1
+ Kontext "DocumentImpress"
+ gMouseClick 15,15 'hier soll die Maus ein Rechteck treffen;
+ 'die Farbe des Rechtecks sagt uns dann, ob
+ FormatArea 'richtig vergroessert oder verkleinert wurde.
+ sleep 1
+ Kontext
+ Active.SetPage TabFarben
+ Kontext "TabFarben"
+ printlog "Color index ", Farbe.GetSelIndex
+ TabFarben.Cancel
+ sleep 1
+ next Zaehler
+
+ 'GanzeSeite.push
+ 'Optimal.push
+ 'Seitenbreite.push
+ sleep 2
+
+ Call hCloseDocument '/// close document ///'
+endcase
diff --git a/testautomation/graphics/optional/includes/global/gallery.inc b/testautomation/graphics/optional/includes/global/gallery.inc
new file mode 100644
index 000000000000..6eca0a5276e3
--- /dev/null
+++ b/testautomation/graphics/optional/includes/global/gallery.inc
@@ -0,0 +1,954 @@
+'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
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* owner : wolfram.garten@oracle.com
+'*
+'* short description : Global Required/resource test: Checking the gallery
+'*
+'*******************************************************************
+'*
+' #1 tGallery_DialogTest ' Open gallery, pin - unpin, dock - undock, close gallery
+' #1 tGallery_ActivateAndUpdateAllThemes ' Activate all gallery-themes and update this theme
+' #1 tGallery_CheckNames ' Check the names for all themes depends on language
+' #1 tGallery_CheckContextMenuForGalleryThemes ' Test the context menu on themes window
+' #1 tGallery_CreateAndWorkWithANewGalleryThemes ' Create a new theme, add graphics and work with it
+' #1 tGallery_GalleryView_Preview ' Preview-feature in Gallery Beamer-window
+' #1 tGallery_GalleryView_Insert ' Insert gallery objects in all applications
+' #1 tGallery_GalleryView_Delete ' Delete gallery objects out of Beamer window
+' #0 hOpenGallery ' Open the gallery
+' #1 tGallery_Quick_check
+'*
+'\******************************************************************
+testcase tGallery_DialogTest
+ printlog "- Working with Gallery-Beamer!"
+ gApplication = "WRITER"
+ call hNewDocument
+ call hOpenGallery
+ Kontext "DocumentWriter"
+ printlog "- undock the Gallery Beamer"
+ Kontext "Gallery"
+ Gallery.Undock ( AlignTop )
+ sleep(2)
+ printlog " - move the gallery window"
+ Gallery.move ( 20, 20 )
+ sleep(2)
+ printlog "- dock the Gallery Beamer"
+ Gallery.Dock ( AlignTop )
+ sleep(2)
+ printlog "- close the Gallery Beamer"
+ ToolsGallery
+ call hCloseDocument
+endcase
+
+'-------------------------------------------------------------------------
+
+testcase tGallery_ActivateAndUpdateAllThemes
+ Dim iThemeCount as Integer
+ Dim i as Integer
+ Dim j as Integer
+ Dim Gallerytext as string
+ printlog "activate and update all gallery-themes"
+ gApplication = "WRITER"
+ call hNewDocument
+ Kontext
+ call hOpenGallery
+ Kontext "Gallery"
+ iThemeCount = Gallerys.GetItemCount
+ for i=1 to iThemeCount
+ if gNetzInst = FALSE then
+ Kontext "Gallery"
+ Gallerytext = Gallerys.GetItemText(i)
+ printlog "- " + i + ". entry (" & Gallerytext & ")"
+ Gallerys.Select i
+ Gallerys.MouseMove ( 10, 10 )
+ Gallerys.OpenContextMenu
+ sleep (3)
+ printlog " - update"
+ hMenuSelectNr (1)
+ sleep (3)
+ Kontext "Messagebox"
+ if Messagebox.Exists(3) then
+ if Messagebox.getRT=304 then
+ printlog "- 'MyTheme' is the " & i & "'s entry."
+ Messagebox.No
+ end if
+ else
+ for j = 1 to 800
+ Kontext "AktualisierenGallery"
+ if AktualisierenGallery.Exists then
+ printlog "DEBUG (j): " & j
+ sleep (1)
+ else
+ printlog "DEBUG: 800 reached!"
+ j=801
+ end if
+ next j
+ end if
+ end if
+ next i
+ call hCloseDocument
+endcase
+
+'-------------------------------------------------------------------------
+
+testcase tGallery_CheckNames
+ Dim iThemeCount as Integer
+ Dim i as Integer
+ Dim j as Integer
+ Dim ssList (100) as String
+ Dim siList (100) as String
+ Dim sFileName as String
+ Dim iGalleryThemes as integer
+
+ if gOOO = true then
+ sFileName = ConvertPath ( gTesttoolPath + "graphics\required\input\gallery\gal_oo_" + iSprache + ".txt" )
+ else
+ sFileName = ConvertPath ( gTesttoolPath + "graphics\required\input\gallery\gal_" + iSprache + ".txt" )
+ end if
+
+ gApplication = "WRITER"
+ call hNewDocument
+ Kontext
+ call hOpenGallery
+ printlog "- check the number of gallery-themes"
+ Kontext "Gallery"
+ if NOT gOOO then
+ if bAsianLan then
+ iGalleryThemes = 29 ' Flags are not allowed!
+ else
+ iGalleryThemes = 30
+ end if
+ else
+ if bAsianLan then
+ iGalleryThemes = 6 ' Flags are not allowed!
+ else
+ iGalleryThemes = 6
+ end if
+ end if
+ iThemeCount = Gallerys.GetItemCount
+ if (iThemeCount <> iGalleryThemes) then
+ warnlog "Difference in count of gallery themes; found: '" + iThemeCount + "'; expected: '"+ iGalleryThemes +"'"
+ end if
+ for i=1 to iThemeCount
+ Gallerys.Select i
+ ListAppend ( siList(), Gallerys.GetSelText )
+ next i
+ printlog "- check the names of gallery-themes"
+ if Dir ( sFilename ) = "" then
+ warnlog "The file for comparison does not exists. The file will be written!"
+ warnlog "Please control : " + sFilename
+ ListWrite ( siList(), sFilename, "utf8" )
+ else
+ printlog " file for comparison is : " + sFilename
+ ListRead ( ssList (), sFilename, "uft8" )
+ gCompare2Lists ( siList(), ssList () )
+ end if
+ ToolsGallery
+ call hCloseDocument
+endcase
+
+'-------------------------------------------------------------------------
+
+testcase tGallery_CheckContextMenuForGalleryThemes
+ Dim iForBidden as Integer
+ Dim iMenuEntries as Integer
+ Dim i as Integer
+ Dim iThemeCount as Integer
+ printlog "check the contextmenu for the gallery-themes"
+ gApplication = "WRITER"
+ call hNewDocument
+ call hOpenGallery
+ Kontext "Gallery"
+ iThemeCount = Gallerys.GetItemCount
+ Gallerys.MouseMove ( 10, 10 )
+ for i=1 to iThemeCount
+ Kontext "Gallery"
+ printlog "- " + i + ". entry"
+ sleep 1
+ Gallerys.Select 1
+ sleep (1)
+ Gallerys.Select i
+ sleep (1)
+ Gallerys.OpenContextMenu
+ sleep (2)
+ iMenuEntries = hMenuItemGetCount
+ if iMenuEntries <> 3 then
+ if gNetzInst = FALSE then
+ warnlog "There are not 3 entries! => no test on the contextmenu!"
+ else
+ if iMenuEntries <> 1 then
+ warnlog "Net-Inst : There are not 1 entries! => no test on the contextmenu!"
+ else
+ sleep (3)
+ hMenuSelectNr(1)
+ Kontext
+ if Active.GetPageCount <> 1 then
+ warnlog "There are more than 1 Tabpage in Net-Installation ( perhaps no root-installation )!"
+ end if
+ Active.SetPage TabAllgemeinGallery
+ Kontext "TabAllgemeinGallery"
+ TabAllgemeinGallery.Cancel
+ sleep (1)
+ end if
+ end if
+ else
+ sleep (1)
+ hMenuSelectNr(2)
+ Kontext "GalleryNewTitle"
+ GalleryNewTitle.Cancel
+ sleep(1)
+ Kontext "Gallery"
+ Gallerys.OpenContextMenu
+ sleep (3)
+ hMenuSelectNr (3)
+ Kontext
+ Active.SetPage TabAllgemeinGallery
+ Active.SetPage TabDateien
+ Kontext "TabDateien"
+ TabDateien.Cancel
+ sleep(1)
+ end if
+ next i
+ ToolsGallery
+ call hCloseDocument
+endcase
+
+'-------------------------------------------------------------------------
+
+testcase tGallery_CreateAndWorkWithANewGalleryThemes
+ Dim iMenuEntries as Integer
+ Dim j as Integer
+ printlog "Open a new Writer document"
+ printlog "Tools / Gallery"
+ printlog "create a new gallery-theme ( TT-theme )"
+ gApplication = "WRITER"
+ call hNewDocument
+ call hOpenGallery
+ iMenuEntries = Gallerys.GetItemCount
+ printlog "- Clicking on 'New Theme' and creating a new theme"
+ NewTheme.Click
+ printlog "+Activate General tabpage and insert TT-theme as name"
+ Kontext
+ Active.SetPage TabAllgemeinGallery
+ Kontext "TabAllgemeinGallery"
+ NeuesThema.SetText "TT-theme"
+ sleep (1)
+ printlog " - named the new theme 'TT-theme' on the general-page"
+ printlog " - insert all files out of '[gTestToolpath]\global\input\graf_inp' in the files-page"
+ printlog "+Activate Files tabpage"
+ Kontext
+ Active.SetPage TabDateien
+ Kontext "TabDateien"
+ printlog " - click 'add' without a selected file => insert-graphic-dialog has to be be visible"
+ printlog "+Click on Add (If no file is selected the Graphic-Insert dialog has to be be opened -> close it)"
+ Hinzufuegen.Click
+ sleep (1)
+ Kontext "GrafikEinfuegenDlg"
+ GrafikEinfuegenDlg.Cancel
+ sleep (1)
+ printlog " - click 'find files' to insert the path for graphics"
+ printlog "+Click on Find Files => select-path dialog will be visible"
+ Kontext "TabDateien"
+ Suche.Click
+ sleep (1)
+ printlog "+Insert [gTesttoolPath]/input/global/graf_inp as path-name as click on Select"
+ Kontext "OeffnenDlg"
+ Pfad.SetText ( convertPath ( gTesttoolPath + "global\input\graf_inp" ) )
+ sleep (1)
+ Auswaehlen.Click
+ sleep (10)
+ printlog "+Click on Add for some graphics"
+ printlog " - 'add' one by one"
+ Kontext "TabDateien"
+ DateiListe.Select 1
+ WaitSlot(1000)
+ Hinzufuegen.Click
+ printlog "Checking if Apply window is closed"
+ Kontext "ApplyGallery"
+ for j=1 to 100
+ if ApplyGallery.Exists then
+ sleep (1)
+ else
+ j=101
+ endif
+ next j
+
+ sleep (1)
+ Kontext "TabDateien"
+ printlog "add the 2nd one"
+ DateiListe.Select 1
+ Hinzufuegen.Click
+ printlog "Checking if Apply window is closed"
+ Kontext "ApplyGallery"
+ for j=1 to 100
+ if ApplyGallery.Exists then
+ sleep (1)
+ else
+ j=101
+ endif
+ next j
+ sleep (1)
+ Kontext "TabDateien"
+
+ printlog "+Click on Add all for rest of the graphics"
+ printlog " - 'add all' for the rest of the files"
+ DateiListe.Select 1
+ HinzufuegenAlle.Click
+ sleep (8)
+ printlog " - apply-dialog -> cancel"
+ Kontext "ApplyGallery"
+ for j=1 to 100
+ if ApplyGallery.Exists then
+ sleep (1)
+ else
+ j=101
+ endif
+ next j
+ sleep (1)
+ Kontext "TabDateien"
+
+ if DateiListe.GetItemCount > 1 then
+ printlog " - 'add all' for the rest of the files"
+ DateiListe.Select 1
+ HinzufuegenAlle.Click
+ sleep (8)
+ Kontext "ApplyGallery"
+ for j=1 to 100
+ If ApplyGallery.Exists then
+ sleep (1)
+ else
+ j=101
+ end if
+ next j
+ end if
+ Kontext "TabDateien"
+ printlog " - click 'OK' for the tabpages"
+ TabDateien.OK
+ printlog "+Check if the new entry is inserted and select it"
+ printlog " - check if the new entrie is inserted and select it"
+ Kontext "Gallery"
+ if Gallerys.GetItemCount <> ( iMenuEntries + 1 ) then
+ warnlog "No new theme was created => the test ends here"
+ ToolsGallery
+ call hCloseDocument
+ else
+ printlog "make mouseclick to set focus"
+ gMouseClick 50,50
+ Kontext "Gallery"
+ Gallerys.Select "TT-theme"
+ Gallerys.MouseMove ( 10, 10 )
+ sleep (1)
+ Gallerys.OpenContextMenu
+ printlog "+Update the entry (1. entry in context menu ) => cancel it"
+ sleep (3)
+ hMenuSelectNr (1)
+ sleep (1)
+ Kontext "AktualisierenGallery"
+ if AktualisierenGallery.Exists <> TRUE then
+ AktualisierenGallery.Cancel
+ end if
+ do
+ sleep 1
+ loop while AktualisierenGallery.Exists
+ Kontext "Gallery"
+ Gallerys.Select "TT-theme"
+ Gallerys.OpenContextMenu
+ printlog "+Update it (1. entry in context menu )"
+ sleep (3)
+ hMenuSelectNr (1)
+ for j=1 to 100
+ Kontext "AktualisierenGallery"
+ if AktualisierenGallery.Exists <> TRUE then
+ j=101
+ else
+ sleep (1)
+ end if
+ next j
+ printlog " - rename ( 3. entry in context-menu )"
+ Kontext "Gallery"
+ Gallerys.OpenContextMenu
+ sleep (3)
+ hMenuSelectNr (3)
+ Kontext "GalleryNewTitle"
+ Title.SetText "New TT-theme"
+ GalleryNewTitle.OK
+ Kontext "Gallery"
+ Gallerys.Select "New TT-theme"
+ printlog " - add new graphics in properties ( 4. entry in context-menu )"
+ Kontext "Gallery"
+ Gallerys.OpenContextMenu
+ sleep (3)
+ hMenuSelectNr (4)
+ Kontext
+ Active.SetPage TabDateien
+ Kontext "TabDateien"
+ Suche.Click
+ Kontext "OeffnenDlg"
+ Pfad.SetText ( convertPath ( gTesttoolPath + "global\input\graf_inp" ) )
+ Auswaehlen.Click
+ sleep (10)
+ Kontext "TabDateien"
+ DateiListe.Select 1
+ Hinzufuegen.Click
+ TabDateien.OK
+ printlog " - delete the entry ( 2. entry in context-menu )"
+ printlog " - messagebox -> no"
+ Kontext "Gallery"
+ Gallerys.Select "New TT-theme"
+ sleep (5)
+ Gallerys.OpenContextMenu
+ sleep (3)
+ hMenuSelectNr (2)
+ Kontext "Active"
+ sleep (1)
+ Active.No
+ printlog " - messagebox -> yes"
+ Kontext "Gallery"
+ sleep (1)
+ Gallerys.Select "New TT-theme"
+ sleep (1)
+ Gallerys.OpenContextMenu
+ sleep (3)
+ hMenuSelectNr (2)
+ Kontext "Active"
+ Active.Yes
+ try
+ Kontext "Gallery"
+ Gallerys.Select "New TT-theme"
+ warnlog "The entry isn't deleted!"
+ catch
+ endcatch
+end if
+sleep 10
+ToolsGallery
+call hCloseDocument
+endcase
+
+'-------------------------------------------------------------------------
+
+testcase tGallery_GalleryView_Preview
+ Dim jpeg_bkg as Integer
+ Dim iAnimation as Integer
+ Dim iSound as Integer
+ Dim i as Integer
+ Dim iPreview as Integer
+ Dim iTitle as Integer
+ if NOT gOOO then
+ select case iSprache
+ case 01 : jpeg_bkg = 3 : iAnimation = 1 : iSound = 28
+ case 07 : jpeg_bkg = 29 : iAnimation = 1 : iSound = 6
+ case 31 : jpeg_bkg = 3 : iAnimation = 3 : iSound = 11
+ case 33 : jpeg_bkg = 13 : iAnimation = 1 : iSound = 29
+ case 34 : jpeg_bkg = 11 : iAnimation = 1 : iSound = 28
+ case 36 : jpeg_bkg = 12 : iAnimation = 1 : iSound = 10
+ case 39 : jpeg_bkg = 10 : iAnimation = 1 : iSound = 27
+ case 46 : jpeg_bkg = 2 : iAnimation = 1 : iSound = 17
+ case 48 : jpeg_bkg = 2 : iAnimation = 1 : iSound = 17
+ case 49 : jpeg_bkg = 12 : iAnimation = 1 : iSound = 16
+ case 50 : jpeg_bkg = 12 : iAnimation = 1 : iSound = 16
+ case 55 : jpeg_bkg = 21 : iAnimation = 1 : iSound = 28
+ case 81 : jpeg_bkg = 21 : iAnimation = 1 : iSound = 10 'FHA TODO: Find out the right numbers for Asian languages.
+ case 82 : jpeg_bkg = 1 : iAnimation = 17 : iSound = 12
+ case 86 : jpeg_bkg = 1 : iAnimation = 9 : iSound = 13
+ case 88 : jpeg_bkg = 1 : iAnimation = 7 : iSound = 20
+ case else : jpeg_bkg = 10 : iAnimation = 1 : iSound = 17
+ warnlog "Please insert the entrienumbers for 'Backgrounds', 'Sounds' and one with normal files ( Animations )"
+ end select
+ else ' Testing OOO
+ select case iSprache
+ case 01 : jpeg_bkg = 1 : iAnimation = 5 : iSound = 2
+ case 07 : jpeg_bkg = 1 : iAnimation = 5 : iSound = 2
+ case 31 : jpeg_bkg = 3 : iAnimation = 1 : iSound = 1
+ case 33 : jpeg_bkg = 3 : iAnimation = 1 : iSound = 2
+ case 34 : jpeg_bkg = 1 : iAnimation = 1 : iSound = 2
+ case 36 : jpeg_bkg = 2 : iAnimation = 1 : iSound = 2
+ case 39 : jpeg_bkg = 2 : iAnimation = 1 : iSound = 2
+ case 46 : jpeg_bkg = 2 : iAnimation = 5 : iSound = 2
+ case 48 : jpeg_bkg = 2 : iAnimation = 5 : iSound = 2
+ case 49 : jpeg_bkg = 2 : iAnimation = 5 : iSound = 2
+ case 50 : jpeg_bkg = 2 : iAnimation = 5 : iSound = 2
+ case 55 : jpeg_bkg = 2 : iAnimation = 5 : iSound = 2
+ case 81 : jpeg_bkg = 2 : iAnimation = 5 : iSound = 2 'FHA TODO: Find out the right numbers for Asian languages.
+ case 82 : jpeg_bkg = 1 : iAnimation = 5 : iSound = 2
+ case 86 : jpeg_bkg = 1 : iAnimation = 5 : iSound = 3
+ case 88 : jpeg_bkg = 1 : iAnimation = 5 : iSound = 2
+ case else : jpeg_bkg = 1 : iAnimation = 5 : iSound = 2
+ warnlog "Please insert the entrienumbers for 'Backgrounds', 'Sounds' and one with normal files ( Animations )"
+ end select
+ end if
+ printlog "open a writer and the gallery"
+ gApplication = "WRITER"
+ call hNewDocument
+ Kontext
+ call hOpenGallery
+ for i=1 to 3
+ if i=1 then
+ Gallerys.Select jpeg_bkg
+ printlog "selected gallery-theme : Backgrounds (Jpeg-files)"
+ end if
+ if i=2 then
+ Gallerys.Select iAnimation
+ printlog "selected gallery-theme : Animation"
+ end if
+ if i=3 then
+ Gallerys.Select iSound
+ printlog "selected gallery-theme : Sound"
+ end if
+ if gNetzInst = FALSE then
+ iPreview = 2 : iTitle = 3
+ else
+ iPreview = 2 : iTitle = 0
+ end if
+ printlog "- list-view"
+ printlog " - open the list-view"
+ ListView.Click
+ sleep (1)
+ printlog " - Press Home + Enter to focus and enter Preview-mode."
+ View.TypeKeys "<HOME>"
+ View.TypeKeys "<RETURN>"
+ sleep (2)
+ View.TypeKeys "<RETURN>"
+ sleep (2)
+ printlog " - preview out of context menu on/off"
+ View.TypeKeys "<HOME>"
+ Sleep (2)
+ View.OpenContextMenu true
+ sleep (3)
+ hMenuSelectNr ( iPreview )
+ sleep (3)
+ kontext "Gallery"
+ Sleep (2)
+ View.OpenContextMenu true
+ sleep (2)
+ hMenuSelectNr ( iPreview )
+ sleep (3)
+ if gNetzInst = FALSE then
+ printlog " - title"
+ Kontext "Gallery"
+ sleep (2)
+ View.OpenContextMenu true
+ sleep (3)
+ hMenuSelectNr ( iTitle )
+ Kontext "GalleryNewTitle"
+ sleep (1)
+ GalleryNewTitle.Cancel
+ sleep (1)
+ Kontext "Gallery"
+ end if
+ View.OpenContextMenu true
+ sleep (3)
+ hMenuSelectNr ( iPreview )
+ sleep (3)
+ View.OpenContextMenu true
+ sleep (3)
+ printlog MenuIsItemChecked (MenuGetItemID(iPreview+1))
+ if MenuIsItemChecked (MenuGetItemID(iPreview+1)) then
+ Printlog " Entered Preview-mode correctly"
+ sleep (1)
+ else
+ Warnlog " Didnt seem to enter preview-mode correctly."
+ end if
+ MenuSelect (0)
+ sleep (1)
+ printlog "- icon-view"
+ if IconView.isEnabled then
+ IconView.Click
+ qaErrorLog "The bug 64543 has been fixed! Please report to FHA."
+ end if
+ sleep (1)
+ View.TypeKeys "<HOME>"
+ printlog " - Enter to get out of Preview-mode"
+ View.TypeKeys "<RETURN>"
+ sleep (2)
+ View.TypeKeys "<RETURN>"
+ sleep (2)
+ printlog " - preview out of context menu on/off"
+ View.TypeKeys "<HOME>"
+ sleep (3)
+ View.OpenContextMenu true
+ sleep (3)
+ hMenuSelectNr ( iPreview )
+ sleep (3)
+ View.OpenContextMenu true
+ sleep (3)
+ hMenuSelectNr ( iPreview )
+ sleep (3)
+ if gNetzInst = FALSE then
+ printlog " - title"
+ try
+ View.OpenContextMenu true
+ sleep (3)
+ catch
+ warnlog "Could not open Contextmenu for Title nr:" +iTitle
+ endcatch
+ hMenuSelectNr ( iTitle )
+ Kontext "GalleryNewTitle"
+ GalleryNewTitle.Cancel
+ Kontext "Gallery"
+ end if
+ next i
+ sleep 1 ' else crash
+ ToolsGallery
+
+ kontext "Mplayer"
+ if Mplayer.Exists then
+ if (gApplication = "IMPRESS") then
+ kontext "DocumentImpress"
+ else
+ kontext "DocumentDraw"
+ end if
+ ToolsMediaPlayer
+ else
+ if (gApplication = "IMPRESS") then
+ kontext "DocumentImpress"
+ else
+ kontext "DocumentDraw"
+ end if
+ end if
+
+ call hCloseDocument
+endcase
+
+'-------------------------------------------------------------------------
+
+testcase tGallery_GalleryView_Insert
+ Dim jpeg_bkg as Integer
+ Dim iAnimation as Integer
+ Dim i as Integer
+ Dim j as Integer
+ Dim k as Integer
+ if NOT gOOO then
+ select case iSprache
+ case 01 : jpeg_bkg = 3 : iAnimation = 1
+ case 07 : jpeg_bkg = 29 : iAnimation = 1
+ case 31 : jpeg_bkg = 3 : iAnimation = 3
+ case 33 : jpeg_bkg = 13 : iAnimation = 1
+ case 34 : jpeg_bkg = 7 : iAnimation = 1
+ case 36 : jpeg_bkg = 12 : iAnimation = 1
+ case 39 : jpeg_bkg = 10 : iAnimation = 1
+ case 46 : jpeg_bkg = 1 : iAnimation = 2
+ case 48 : jpeg_bkg = 3 : iAnimation = 1
+ case 49 : jpeg_bkg = 1 : iAnimation = 2
+ case 50 : jpeg_bkg = 1 : iAnimation = 2
+ case 55 : jpeg_bkg = 8 : iAnimation = 1
+ case 81 : jpeg_bkg = 1 : iAnimation = 3
+ case 82 : jpeg_bkg = 1 : iAnimation = 17
+ case 86 : jpeg_bkg = 17 : iAnimation = 15
+ case 88 : jpeg_bkg = 17 : iAnimation = 15
+ case else : jpeg_bkg = 1 : iAnimation = 2
+ warnlog "Please insert the entrienumbers for 'Backgrounds' and one with normal files ( Animations )"
+ end select
+ else ' Testing OOO
+ select case iSprache
+ case 01 : jpeg_bkg = 3 : iAnimation = 1
+ case 07 : jpeg_bkg = 5 : iAnimation = 1
+ case 31 : jpeg_bkg = 3 : iAnimation = 3
+ case 33 : jpeg_bkg = 5 : iAnimation = 1
+ case 34 : jpeg_bkg = 6 : iAnimation = 1
+ case 36 : jpeg_bkg = 5 : iAnimation = 1
+ case 39 : jpeg_bkg = 5 : iAnimation = 1
+ case 46 : jpeg_bkg = 1 : iAnimation = 2
+ case 48 : jpeg_bkg = 3 : iAnimation = 1
+ case 49 : jpeg_bkg = 1 : iAnimation = 2
+ case 50 : jpeg_bkg = 1 : iAnimation = 2
+ case 55 : jpeg_bkg = 6 : iAnimation = 1
+ case 81 : jpeg_bkg = 1 : iAnimation = 3
+ case 82 : jpeg_bkg = 1 : iAnimation = 1
+ case 86 : jpeg_bkg = 5 : iAnimation = 5
+ case 88 : jpeg_bkg = 5 : iAnimation = 1
+ case else : jpeg_bkg = 1 : iAnimation = 2
+ warnlog "Please insert the entrienumbers for 'Backgrounds' and one with normal files ( Animations )"
+ end select
+ end if
+ for i=1 to 4 ' each application
+ if i=1 then gApplication = "WRITER"
+ if i=2 then gApplication = "CALC"
+ if i=3 then gApplication = "IMPRESS"
+ if i=4 then gApplication = "DRAW"
+
+ printlog gApplication 'Chr(13)
+ call hNewDocument
+ call hOpenGallery
+ ' kontext "GraphicObjectbar"
+ ' if GraphicObjectbar.Exists then GraphicObjectbar.Close
+ for j=1 to 2 ' the two gallery-theme
+ if j=1 then
+ Gallerys.Select jpeg_bkg
+ printlog " selected gallery-theme : Backgrounds"
+ end if
+
+ if j=2 then
+ Gallerys.Select iAnimation
+ printlog " selected gallery-theme : Animation"
+ end if
+
+ if i=1 then ' test for writer
+ for k=1 to 2
+ if k=1 then
+ ListView.Click
+ printlog " - insert on list view"
+ else
+ IconView.Click
+ printlog " - insert on icon view"
+ end if
+
+ sleep (2)
+ View.Mousedown ( 5, 18 )
+ View.Mouseup ( 5, 18 )
+ View.typekeys "<DOWN>,<UP>"
+
+ sleep (3)
+ View.TypeKeys "<SHIFT F10>" ' OpenContextMenu
+ sleep (3)
+ hMenuSelectNr ( 1 )
+
+ if j=1 then
+ printlog " - copy"
+ sleep (1)
+ hMenuSelectNr ( 1 )
+ sleep (2)
+ else
+ printlog " - copy"
+ sleep (1)
+ hMenuSelectNr ( 1 )
+ sleep (3)
+
+ printlog " - link"
+ View.TypeKeys "<SHIFT F10>" 'OpenContextMenu
+ sleep (1)
+ hMenuSelectNr ( 1 )
+ hMenuSelectNr ( 2 )
+ sleep (3)
+
+ printlog " - background -> page"
+ View.TypeKeys "<SHIFT F10>" 'OpenContextMenu
+ sleep (2)
+ hMenuSelectNr ( 1 )
+ hMenuSelectNr ( 3 )
+ hMenuSelectNr ( 1 )
+ sleep (3)
+
+ printlog " - background -> paragraph"
+ View.TypeKeys "<SHIFT F10>" 'OpenContextMenu
+ sleep (2)
+ hMenuSelectNr ( 1 )
+ hMenuSelectNr ( 3 )
+ hMenuSelectNr ( 2 )
+ sleep (3)
+ end if
+
+ kontext "GraphicObjectbar"
+ if GraphicObjectbar.Exists then
+ if GraphicObjectbar.isDocked = False then
+ GraphicObjectbar.Move 900,900
+ end if
+ end if
+ kontext "Gallery"
+
+ next k
+ else ' test for other applications ( calc, impress, draw )
+ kontext "GraphicObjectbar"
+ if GraphicObjectbar.Exists then
+ if GraphicObjectbar.isDocked = False then
+ GraphicObjectbar.Move 900,900
+ end if
+ end if
+ kontext "Gallery"
+
+ kontext "Gluepointsobjectbar"
+ if Gluepointsobjectbar.Exists then
+ if Gluepointsobjectbar.isDocked = false then
+ Gluepointsobjectbar.Move 900,900
+ end if
+ end if
+ kontext "Gallery"
+
+ kontext "Optionsbar"
+ if Optionsbar.Exists then
+ if Optionsbar.isDocked = false then
+ Optionsbar.Move 900,900
+ end if
+ end if
+ kontext "Gallery"
+
+ for k=1 to 2
+ if k=1 then
+ ListView.Click
+ printlog " - insert on list view"
+ else
+ IconView.Click
+ printlog " - insert on icon view"
+ end if
+
+ sleep (1)
+ View.Mousedown ( 5, 18 )
+ View.Mouseup ( 5, 18 )
+ View.typekeys "<DOWN>,<UP>"
+
+ sleep (1)
+ View.TypeKeys "<SHIFT F10>" 'OpenContextMenu
+ printlog " - copy"
+ sleep (3)
+ hMenuSelectNr ( 1 )
+ hMenuSelectNr ( 1 )
+ sleep (3)
+
+ if j=2 then
+ View.TypeKeys "<SHIFT F10>" 'OpenContextMenu
+ printlog " - link"
+ sleep (3)
+ hMenuSelectNr ( 1 )
+ hMenuSelectNr ( 2 )
+ sleep (2)
+ end if
+
+ next k
+ end if
+ next j
+ ToolsGallery
+ WaitSlot (2000)
+ call hCloseDocument
+ WaitSlot (2000)
+ next i
+endcase
+
+'-------------------------------------------------------------------------
+
+testcase tGallery_GalleryView_Delete
+ Dim jpeg_bkg as Integer
+ Dim iAnimation as Integer
+ Dim iSound as Integer
+ Dim i as Integer
+ Dim j as Integer
+ Dim k as Integer
+
+ if gNetzInst = TRUE then
+ ' TODO: since we now only know net- installations, make it work!
+ printlog "No test for 'net' installations, because there are no rights to delete objects out of Gallery!"
+ 'NOTE: Jump to NotForNetInst...
+ Goto NotForNetInst
+ end if
+
+ select case iSprache
+ case 01 : jpeg_bkg = 1 : iAnimation = 2 : iSound = 28
+ case 07 : jpeg_bkg = 29 : iAnimation = 1 : iSound = 6
+ case 31 : jpeg_bkg = 1 : iAnimation = 2 : iSound = 28
+ case 33 : jpeg_bkg = 13 : iAnimation = 1 : iSound = 29
+ case 34 : jpeg_bkg = 7 : iAnimation = 1 : iSound = 28
+ case 36 : jpeg_bkg = 12 : iAnimation = 1 : iSound = 10
+ case 39 : jpeg_bkg = 10 : iAnimation = 1 : iSound = 27
+ case 46 : jpeg_bkg = 1 : iAnimation = 2 : iSound = 18
+ case 49 : jpeg_bkg = 1 : iAnimation = 2 : iSound = 17
+ case 50 : jpeg_bkg = 1 : iAnimation = 2 : iSound = 17
+ case 55 : jpeg_bkg = 8 : iAnimation = 1 : iSound = 30
+ case 81 : jpeg_bkg = 1 : iAnimation = 3 : iSound = 10
+ case 82 : jpeg_bkg = 1 : iAnimation = 17 : iSound = 12
+ case 86 : jpeg_bkg = 1 : iAnimation = 9 : iSound = 13
+ case 88 : jpeg_bkg = 1 : iAnimation = 7 : iSound = 20
+ case else : jpeg_bkg = 1 : iAnimation = 2 : iSound = 17
+ warnlog "Please insert the entrienumbers for '3D-graphics', 'Sounds' and one with normal files ( Animations )"
+ end select
+
+ gApplication = "WRITER"
+ call hNewDocument
+ call hOpenGallery
+ for i=1 to 3
+ Kontext "Gallery"
+ if i=1 then
+ Gallerys.Select jpeg_bkg
+ printlog " selected gallery-theme : Backgrounds"
+ end if
+
+ if i=2 then
+ Gallerys.Select iAnimation
+ printlog " selected gallery-theme : Animation"
+ end if
+
+ if i=3 then
+ Gallerys.Select iSound
+ printlog " selected gallery-theme : Sound"
+ end if
+
+ for j=1 to 2
+ Kontext "Gallery"
+ if j=1 then
+ IconView.Click
+ printlog " Icon view"
+ sleep 1
+ end if
+ if j=2 then
+ ListView.Click
+ printlog " List view"
+ end if
+
+ for k=1 to 2
+ Kontext "Gallery"
+ sleep (1)
+ View.MouseMove ( 5, 15 )
+ View.TypeKeys "<SHIFT F10>" 'OpenContextMenu true
+ hMenuSelectNr ( 4 )
+ kontext "Active"
+ if k=1 then
+ Active.No
+ printlog " delete one object => no"
+ else
+ Active.Yes
+ printlog " delete one object => yes"
+ end if
+ next k
+ next j
+ next i
+ ToolsGallery
+ call hCloseDocument
+ 'NOTE: Jump End NotForNetInst
+ NotForNetInst:
+endcase
+
+'-------------------------------------------------------------------------
+testcase tGallery_Quick_check
+
+ dim sFile(1) as string
+ dim i as integer
+
+ sFile(0) = ConvertPath ( gOfficeBasisPath + "share/gallery/apples.gif" ) '
+ sFile(1) = ConvertPath ( gOfficeBasisPath + "share/gallery/bullets/coffee_1.gif" ) '
+ call hNewDocument
+ for i = 0 to 1
+ gMouseclick 1, 50
+ if FileExists(sFile(i)) then
+ if (FileLen(sFile(i)) > 0 ) then
+ call hGrafikEinfuegen ( sFile(i) )
+ else
+ warnlog "File lenght is 0: '" + sFile(i) + "'"
+ end if
+ else
+ warnlog "File doesn't exist: '" + sFile(i) + "'"
+ end if
+ next i
+ call hCloseDocument
+endcase
+
diff --git a/testautomation/graphics/optional/includes/global/gallery2.inc b/testautomation/graphics/optional/includes/global/gallery2.inc
new file mode 100644
index 000000000000..d46d0ae4a99c
--- /dev/null
+++ b/testautomation/graphics/optional/includes/global/gallery2.inc
@@ -0,0 +1,258 @@
+'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
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* owner : wolfram.garten@oracle.com
+'*
+'* short description : Checking all gallery themes
+'*
+'*****************************************************************
+'*
+' #1 tLoad100GalleryGraphicFiles 'Inserting 100 gallery graphics and checking the sizes
+' #1 tCheckAllGalleryGraphicFiles 'Checking the size ( > 0 Byte ) of all gallery-files.
+' #1 tInsertGalleryObjects 'Inserting random objects via contextmenu-insert-copy.
+' #0 LoadGraphic
+' #0 CheckGraphic
+' #0 makeNumOutOfText
+' #1 tSettingsToCM 'Measurement unit for textdocuments to cm
+' #1 tResetSettings 'Resetting the measurement unit for textdocuments.
+'*
+'\****************************************************************
+
+testcase tSettingsToCM
+
+ printlog " Setting the measurement unit for textdocuments to cm."
+ printlog " +Tools / options / text documents / general"
+ ExitRestartTheOffice
+ WaitSlot (10000)
+ Call hNewDocument
+ ToolsOptions
+ hToolsOptions ( "WRITER", "General" )
+ iSaveSetting = Masseinheit.GetSelIndex
+ Masseinheit.Select 2
+ Kontext "ExtrasOptionenDlg"
+ ExtrasOptionenDlg.OK
+ Call hCloseDocument
+
+endcase
+'-------------------------------------------------------------------------
+testcase tLoad100GalleryGraphicFiles
+
+ Dim lsFiles (3000) as String
+ Dim lsGraphics (3000) as String
+ Dim i as Integer
+ Dim y as Integer
+ Dim t as Integer
+ Dim iCount as Integer
+ Dim corLoad as Boolean
+ Dim x as boolean
+
+ if gNetzInst = TRUE then
+ GetAllFileList ( ConvertPath ( gOfficeBasisPath + "share\gallery\" ), "*.*", lsFiles () )
+ else
+ GetAllFileList ( ConvertPath ( gOfficePath + "share\gallery\" ), "*.*", lsFiles () )
+ end if
+ call GetOnlyGraphics ( lsFiles (), lsGraphics() )
+ iCount = ListCount ( lsGraphics() )
+ printlog " We have " + iCount + " graphics in the gallery."
+ call hNewDocument
+
+ for i = 1 to 100
+ for y = 1 to 1
+ randomize
+ t = Int((iCount*Rnd))
+ if (t<1) then 'just so we get it between 1 and the amount of items.
+ y = y - 1
+ end if
+ next y
+
+ corLoad = FALSE
+ try
+ x = LoadGraphic ( lsGraphics(t), corLoad )
+ printlog
+ catch
+ ExceptLog
+ if corLoad = FALSE then
+ warnlog "Problems with " + lsGraphics(t)
+ ResetApplication
+ call hNewDocument
+ end if
+ endcatch
+ if (not x) then
+ printlog " Tested nr: " + t + " : " + lsGraphics(t)
+ end if
+ next i
+
+ ToolsGallery
+ WaitSlot (2000)
+ call hCloseDocument
+endcase 'tLoadAllGalleryGraphicFiles
+
+'-------------------------------------------------------------------------
+
+testcase tCheckAllGalleryGraphicFiles
+ Dim lsFiles (3000) as String
+ Dim lsGraphics (3000) as String
+ Dim i as Integer
+ Dim y as Integer
+ Dim t as Integer
+ Dim iCount as Integer
+ Dim corLoad as Boolean
+ Dim x as boolean
+
+ if gNetzInst = TRUE then
+ GetAllFileList ( ConvertPath ( gOfficeBasisPath + "share\gallery\" ), "*.*", lsFiles () )
+ else
+ GetAllFileList ( ConvertPath ( gOfficePath + "share\gallery\" ), "*.*", lsFiles () )
+ end if
+ call GetOnlyGraphics ( lsFiles (), lsGraphics() )
+ iCount = ListCount ( lsGraphics() )
+ printlog " We have " + iCount + " graphics in the gallery."
+ call hNewDocument
+
+ for i=1 to iCount
+ corLoad = FALSE
+ try
+ x = CheckGraphic ( lsGraphics(i), corLoad )
+ catch
+ ExceptLog
+ if corLoad = FALSE then
+ warnlog "Problems with " + lsGraphics(i)
+ ResetApplication
+ call hNewDocument
+ end if
+ endcatch
+ if (not x) then
+ printlog " Tested nr: " + i + " : " + lsGraphics(i)
+ end if
+ next i
+ ToolsGallery
+ WaitSlot (2000)
+ call hCloseDocument
+endcase 'tLoadAllGalleryGraphicFiles
+
+'-------------------------------------------------------------------------
+
+testcase tInsertGalleryObjects
+ Dim lsFiles (3000) as String
+ Dim lsGraphics (3000) as String
+ Dim CountOfThemes
+ Dim HowManyItems as Integer
+ Dim WhichOne as Integer
+ Dim CountOfItems as Integer
+ Dim ct as Integer
+ Dim i as Integer
+ Dim d as Integer
+ Dim iCount as Integer
+ Dim corLoad, x as Boolean
+
+ call hNewDocument
+ call hOpenGallery
+ kontext "Gallery"
+ CountOfThemes = Gallerys.GetItemCount
+ for ct = 1 to CountOfThemes
+ Gallerys.Select ct
+ printlog " Selected Gallery-Theme nr: " + ct + ": " + Gallerys.GetSelText
+ kontext "Gallery"
+ CountOfItems = View.GetItemCount()
+ for d = 1 to 1
+ randomize
+ HowManyItems=Int((5*Rnd)+(3*Rnd))
+ if CountOfItems = 0 then
+ QaErrorLog " There were no objects in the the gallery-theme on position: " + ct
+ else
+ if (HowManyItems<3) then 'just so we get it between 3 and 5.
+ d = d - 1
+ else
+ printlog " Will now select and copy " + HowManyItems + " items from this Theme."
+ end if
+ for i = 1 to HowManyItems
+ for x = 1 to 1
+ randomize
+ WhichOne=Int(CountOfItems*RND) '(5*Rnd)+(CountOfItems*Rnd))
+ if (WhichOne<1) then 'just so we get it between 1 and the amount of items. '>(CountOfItems + 1)) OR (WhichOne<1) then '
+ x = x - 1
+ end if
+ next x
+ printlog " Will copy object nr: " + WhichOne
+ View.Mousemove (1,1)
+ View.TypeKeys "<HOME>"
+ View.TypeKeys "<RIGHT>", (WhichOne)
+ kontext "GraphicObjectBar"
+ if GraphicObjectBar.Exists then
+ if GraphicObjectBar.IsDocked = False then GraphicObjectBar.Dock
+ end if
+ kontext "Gallery"
+ sleep (1)
+ View.TypeKeys("<shift f10>")
+ sleep (1)
+ try
+ dim number as integer
+ number = MenuGetItemCount
+ if (number > 2) AND (number < 10) then
+ hMenuSelectNr (1) 'Insert
+ hMenuSelectNr (1) 'As Copy
+ sleep (1)
+ else
+ Warnlog " The contextmenu came up, but the number of entries were strange."
+ printlog " Number of entries:" + number
+ MenuSelect(0)
+ end if
+ catch
+ warnlog " A contextmenu didnt come up for the gallery-theme on position: " + ct
+ i = HowManyItems
+ endcatch
+ next i
+ end if 'if the theme didnt have any objects, we landed here.
+ next d
+ next ct
+
+ Kontext "Gallery"
+ if Gallery.Exists(2) then
+ ToolsGallery
+ WaitSlot (2000)
+ end if
+
+ hTypeKeys "<DELETE>"
+ call hCloseDocument
+
+endcase 'tInsertGalleryObjects
+
+'-------------------------------------------------------------------------
+testcase tResetSettings
+
+ printlog "Resetting the measurement unit for textdocuments."
+ printlog "+Tools / options / text documents / general"
+ call hNewDocument
+ ToolsOptions
+ hToolsOptions ( "WRITER", "General" )
+ Masseinheit.Select iSaveSetting
+ Kontext "ExtrasOptionenDlg"
+ ExtrasOptionenDlg.OK
+ call hCloseDocument
+
+endcase 'tResetSettings
+'-------------------------------------------------------------------------
diff --git a/testautomation/graphics/optional/includes/global/id_001.inc b/testautomation/graphics/optional/includes/global/id_001.inc
new file mode 100644
index 000000000000..15a99c0d3f23
--- /dev/null
+++ b/testautomation/graphics/optional/includes/global/id_001.inc
@@ -0,0 +1,725 @@
+'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
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* Owner : wolfram.garten@oracle.com
+'*
+'* short description :
+'*
+'\**********************************************************************************
+
+
+testcase tiFileSaveAs
+
+ dim sFileName as string ' test document & new created doc
+ ' dim sFormula as string ' container for formula to create document with
+ dim sTemp as string
+ dim sFilter (50) as string
+ dim i as integer
+ dim x as integer
+ dim y as integer
+ dim Exlist(100) as string ' files to be deleted
+ dim sFile as string ' filename to export
+ dim sPath as string ' filename to export
+
+ if (gApplication = "IMPRESS") then
+ ExtensionString = "odp"
+ else
+ ExtensionString = "odg"
+ end if
+
+ sFilter (0) = 0 ' initalize ;-)...
+
+ sFileName = "graphics\required\input\tbo_alf_." + ExtensionString ' this is the file with all features
+ sFile = "isas_" ' this is the filename of the export files
+ sPath = ConvertPath ( gOfficePath + "user/work/graphics/required/"+gApplication+"\"+ gPlatform) ' this is the export path
+ if dir (sPath) = "" then
+ app.mkdir (sPath)
+ end if
+
+ if gSamePC = TRUE then ' delete export directory
+ GetFileList ( sPath, sFile+"*", Exlist() )
+ if KillFileList ( Exlist() ) <> TRUE then
+ Warnlog "Couldn't delete all Files in Output-Export-Directory, the followings are still there:"
+ for i=1 to ListCount ( Exlist() )
+ printlog " <> " + Exlist(i)
+ next i
+ end if
+ end if
+
+ Call hFileOpen ( ConvertPath(gTesttoolPath + sFileName) )
+ WaitSlot (3000)
+
+
+ ' to use the helper fileSaveAs functions i get alll available filters...
+ FileSaveAs
+ WaitSlot (2000)
+ Kontext "SpeichernDlg"
+ for i = 0 to 5
+ if i=0 then x = Dateityp.GetItemCount
+ if (i) then ' set border, whenm start from beginning/end
+ y = i ' set filter from beginning
+ else
+ y = x-3 ' set filter from end
+ end if
+ ListAppend(sFilter(), Dateityp.GetItemText (y))
+ next i
+ SpeichernDlg.Cancel
+ y = ListCount(sFilter())
+
+ if gtSYSName = "Linux" then y=y-1
+ '#i45961# - last part of filter-list deactivated due to BUG - FHA
+ 'TODO: JSI->FHA please verify if this special handling needed after the issue has been fixed.
+
+ for i = 1 to y
+ sFileName = sPath + sFile + (i)
+ hFileSaveAsWithFilter (sFileName, sFilter(i), TRUE )
+ kontext
+ if messagebox.exists then
+ messagebox.Yes ' to go on ....
+ end if
+ printlog " saved with filter ("+i+"/"+y+"): "+ sFilter(i)
+ next i
+ ' TODO TBO: small check, if correct filter was used!
+ WaitSlot (3000)
+ fileclose
+ WaitSlot (3000)
+ kontext "Messagebox"
+ if Messagebox.exists then
+ printlog "Messagebox about informationloss... :-) that's OK: 'Text in the messagebox: "+Messagebox.GetText+"'"
+ Messagebox.YES
+ end if
+
+ '-----------------------------------------------------------------
+ hNewDocument
+
+
+ sFilter (0) = 0
+ sFileName = sPath
+ GetFileList ( sFileName, sFile + "*", sFilter() )
+
+ ' call hNewDocument
+ x = ListCount ( sFilter() )
+ for i = 1 to x
+ printlog "("+i+"/"+x+"): "+sFilter(i)
+ hFileOpen ( sFilter(i) )
+ WaitSlot (3000)
+ If hIsNamedDocLoaded (sFilter(i)) Then
+ printlog " used filter: " + hGetUsedFilter()
+ else
+ sTemp = left(right(sFilter(i),2),1)
+ if ( (sTemp = "t") OR (sTemp = "o") ) then
+ printlog "document is --- TEMPLATE?! --- "
+ else
+ qaErrorlog "#116563# document didn't get loaded "
+ end if
+ end if
+ hCloseDocument
+ WaitSlot (2000)
+ next i
+ ' Call hCloseDocument
+endcase
+
+testcase tiFileReload
+ Dim DokumentPfad$
+ Dim Datei$
+
+ if (gApplication = "IMPRESS") then
+ ExtensionString = "odp"
+ else
+ ExtensionString = "odg"
+ end if
+
+ Datei$= (ConvertPath (gOfficePath + "user/work/graphics/required/version1." + ExtensionString))
+
+ if app.dir(ConvertPath (gOfficePath + "user/work/graphics/required/")) = "" then
+ app.mkdir (ConvertPath (gOfficePath + "user/work/graphics/required/"))
+ end if
+ Call hNewDocument
+ WaitSlot (2000)
+ Call hFileSaveAsKill (Datei$)
+ WaitSlot (2000)
+ Call hCloseDocument
+
+ Call hFileOpen (Datei$)
+ WaitSlot (2000)
+ call hTBOtypeInDoc
+ WaitSlot (2000)
+ FileReload
+ WaitSlot (2000)
+ Kontext "Messagebox"
+ sleep 2
+ Messagebox.No
+ WaitSlot (2000)
+
+ FileReload
+ WaitSlot (2000)
+ Kontext "Messagebox"
+ sleep 2
+ Messagebox.Yes
+ WaitSlot (1000)
+
+ Call hCloseDocument
+ if Dir (Datei$) <> "" AND gSamePC = TRUE then kill Datei$
+endcase
+
+testcase tiFileVersion
+ Dim DokumentPfad$
+ Dim Datei$
+
+ if (gApplication = "IMPRESS") then
+ ExtensionString = "odp"
+ else
+ ExtensionString = "odg"
+ end if
+
+ Datei$= (ConvertPath (gOfficePath + "user/work/graphics/required/erwin." + ExtensionString))
+ 'if dir (ConvertPath (gOfficePath + "user/work/graphics/required/")) = "" then
+ if dir (Datei$) = "" then app.mkdir (ConvertPath (gOfficePath + "user/work/graphics/required/"))
+ Call hNewDocument
+ WaitSlot (1000)
+ Call hFileSaveAsKill (Datei$)
+ WaitSlot (1000)
+ Call hCloseDocument
+
+ Call hFileOpen (Datei$)
+ WaitSlot (1000)
+ call hTBOtypeInDoc
+ WaitSlot (1000)
+ try
+ FileVersions
+ catch
+ Warnlog "- File / Versions not accessible!"
+ goto endsub
+ endcatch
+
+ Kontext "Versionen"
+ Call DialogTest ( Versionen )
+ Speichern.Click
+ Kontext "VersionskommentarEingeben"
+ Call DialogTest ( VersionskommentarEingeben )
+ VersionskommentarEingeben.Cancel
+ Kontext "Versionen"
+ Versionen.Close
+ Call hCloseDocument
+ ' if Dir (Datei$) <> "" AND gSamePC = TRUE then kill Datei$
+endcase
+
+testcase tiFilePassword
+ goto endsub
+ Dim DokumentPfad$
+ Dim Datei$
+ dim sFileName as string ' test document & new created doc
+ ' dim sFormula as string ' container for formula to create document with
+ dim e as string
+ dim sTemp as string
+ dim sFilter (50) as string
+ dim i as integer
+ dim x as integer
+ dim y as integer
+ dim Exlist(100) as string ' files to be deleted
+ dim sFileIn as string ' filename to import
+ dim sFile as string ' filename to export
+ dim sPath as string ' and path to export
+
+ if (gApplication = "IMPRESS") then
+ ExtensionString = "odp"
+ else
+ ExtensionString = "odg"
+ end if
+
+ sFile = "isp__" ' this is the filename of the export files
+ sPath = ConvertPath ( gOfficePath + "user/work/graphics/required/"+gApplication+"\"+ gPlatform+"\") ' this is the export path
+ mkdir (sPath)
+ if dir (sPath) = "" then app.mkdir (sPath)
+ sFileIn = (sPath + sFile + "." + ExtensionString)
+ if gSamePC = TRUE then ' delete export directory
+ GetFileList ( sPath, sFile+"*", Exlist() )
+ if KillFileList ( Exlist() ) <> TRUE then
+ Warnlog "Couldnt delete all Files in Output-Export-Directory, the followings are still there:"
+ for i=1 to ListCount ( Exlist() )
+ printlog " <> " + Exlist(i)
+ next i
+ end if
+ end if
+
+ Call hNewDocument
+ WaitSlot (1000)
+ FileSaveAs
+ Kontext "SpeichernDlg"
+ Datei$ = ConvertPath ( sFileIn )
+ printlog " will use the file: "+Datei$
+ if Dir (Datei$) <> "" then
+ kill Datei$
+ end if
+ Passwort.Check
+ Dateiname.SetText Datei$
+ Speichern.Click
+ WaitSlot (2000)
+ Kontext "Passwort"
+ PasswortName.SetText "12345"
+ PasswortBestaetigen.Settext "54321"
+ Passwort.OK
+ WaitSlot (2000)
+ Kontext "Messagebox"
+ if Messagebox.Exists(1) then
+ Messagebox.OK
+ else
+ Warnlog "- Wrong password not recognized"
+ end if
+ Kontext "Passwort"
+ PasswortName.SetText "12345"
+ PasswortBestaetigen.SetText "12345"
+ Passwort.OK
+ sleep 2
+ FileClose
+ sleep 2
+
+ FileOpen
+ Kontext "OeffnenDlg"
+ WaitSlot (2000)
+ Dateiname.SetText Datei$
+ Oeffnen.Click
+ WaitSlot (2000)
+ Kontext "PasswordFileOpen"
+ PasswortName.SetText "34567"
+ try
+ PasswordFileOpen.OK
+ catch
+ Printlog "- Wrong password not accepted"
+ endcatch
+ Kontext
+ if Not Messagebox.Exists(1) then
+ Warnlog "Wrong password while loading not recognized"
+ else
+ Messagebox.OK
+ printlog "Wrong password on loading ok - recogniced"
+ end if
+ WaitSlot (3000)
+ Kontext "PasswordFileOpen"
+ PasswortName.SetText "12345"
+ PasswordFileOpen.OK
+ WaitSlot (5000)
+ FileSaveAs
+ Kontext "SpeichernDlg"
+ Dateiname.SetText Datei$
+ if (Passwort.IsChecked <> TRUE) then
+ Warnlog "Password has to be checked! :-("
+ end if
+ Speichern.Click
+ WaitSlot (1000)
+ Kontext "Messagebox"
+ if Messagebox.Exists(5) then
+ Messagebox.Yes
+ end if
+ Kontext "Passwort"
+ if (Passwort.Exists(5) = FALSE)then
+ Warnlog "- Password dialog Didn't pop up after pressing save"
+ else
+ Kontext "Passwort"
+ WaitSlot (1000)
+ PasswortName.SetText "a12345"
+ PasswortBestaetigen.SetText "a12345"
+ Passwort.OK
+ WaitSlot (1000)
+ FileClose
+ WaitSlot (1000)
+ end if
+ FileOpen
+ WaitSlot (2000)
+ Kontext "OeffnenDlg"
+ Dateiname.SetText Datei$
+ Oeffnen.Click
+ Kontext "PasswordFileOpen"
+ WaitSlot (1000)
+ PasswortName.SetText "a12345"
+ PasswordFileOpen.OK
+ WaitSlot (5000)
+ FileSaveAs
+ Kontext "SpeichernDlg"
+ Dateiname.SetText Datei$
+ if (Passwort.IsChecked <> TRUE) then
+ Warnlog "Password has to be checked! :-("
+ end if
+ Passwort.UnCheck
+ Speichern.Click
+ Kontext "Messagebox"
+ if Messagebox.Exists(5) then Messagebox.Yes
+ Kontext "Passwort"
+ if (Passwort.Exists(5))then
+ Warnlog "- Password dialog didn't pop up after pressing save"
+ Kontext "Passwort"
+ password.cancel
+ FileClose
+ else
+ hCloseDocument
+ end if
+endcase
+
+testcase tiFileTemplates
+ Call hNewDocument
+
+ FileTemplatesOrganize
+ Kontext "DVVerwalten"
+ WaitSlot (1000)
+ Call DialogTest (DVVerwalten)
+ sleep 1
+ PopuplisteLinks.Select 2
+ WaitSlot (1000)
+ PopuplisteRechts.Select 2
+ WaitSlot (1000)
+ WelcheDatei.Click
+ WaitSlot (1000)
+ Kontext "Oeffnendlg"
+ Call DialogTest (OeffnenDlg)
+ sleep 1
+ OeffnenDlg.Cancel
+ WaitSlot (2000)
+ Kontext "DVVerwalten"
+ DVVerwalten.Close
+
+ if gtSYSName = "Solaris x86" then
+ qaErrorLog "#i62423# - FileTemplatesAddressBookSource outcommented under x86. - FHA"
+ else
+ FileTemplatesAddressBookSource
+ Printlog "- AddressBookAssignment"
+ kontext "AddressBookSource"
+ Call DialogTest (AddressBookSource)
+ Administrate.Click
+ kontext "AddressSourceAutopilot"
+ AddressSourceAutopilot.Cancel
+ kontext "AddressBookSource"
+ AddressBookSource.Cancel
+ end if
+
+ FileTemplatesSave
+ Printlog "- Save template"
+ WaitSlot (1000)
+ Kontext "Dokumentvorlagen"
+ sleep 1
+ Call DialogTest (Dokumentvorlagen)
+ WaitSlot (1000)
+ Verwalten.Click
+ WaitSlot (2000)
+ Kontext "DVVerwalten"
+ Call DialogTest (DVVerwalten)
+ WaitSlot (3000)
+ DVVerwalten.Close
+ WaitSlot (1000)
+ Kontext "Dokumentvorlagen"
+ sleep 1
+ Dokumentvorlagen.Cancel
+ WaitSlot (1000)
+
+ try
+ FileTemplatesEdit
+ Printlog "- Edit template"
+ WaitSlot (1000)
+ Kontext "OeffnenDlg"
+ sleep 1
+ Call DialogTest (OeffnenDlg)
+ WaitSlot (1000)
+ OeffnenDlg.Cancel
+ catch
+ Warnlog "- There are problems with File-Template-Save"
+ endcatch
+ WaitSlot (1000)
+ Call hCloseDocument
+endcase
+
+
+'-----------------------------------------------------------
+'******************* M A T H dito *************************
+'-----------------------------------------------------------
+
+
+testcase tmFileNewFromTemplate
+ Call hNewDocument
+ FileNewFromTemplate
+ WaitSlot (5000)
+ Kontext "TemplateAndDocuments"
+ if TemplateAndDocuments.NotExists then
+ Warnlog "Dialog Templates and Documents are not up!"
+ goto endsub
+ end if
+ Call DialogTest (TemplateAndDocuments)
+ WaitSlot (5000)
+ try
+ TemplateAndDocuments.Cancel
+ catch
+ endcatch
+ WaitSlot (5000)
+ Call hCloseDocument
+endcase
+
+testcase tmFileOpen
+ call hNewDocument
+ FileOpen
+ Kontext "OeffnenDlg"
+ UebergeordneterOrdner.Click
+ Standard.Click
+ NurLesen.check
+ Call DialogTest ( OeffnenDlg )
+ OeffnenDlg.Cancel
+ WaitSlot (2000)
+ Call hCloseDocument
+endcase
+
+testcase tmFileClose
+ printlog "- File Close"
+ hNewDocument ' just for the records: I open ONE document
+ call hTBOtypeInDoc
+ WaitSlot (2000)
+ FileClose
+ Kontext ' Expecting "Modified, do you want to close?"
+ if active.exists (5) then
+ printlog " Ok, active came up: " + active.gettext
+ Active.Cancel ' No, not this time
+ else
+ warnlog "active missing (1)"
+ end if
+ WaitSlot (2000)
+
+ FileClose
+ Kontext
+ Active.Yes ' but now - records: this document is closed
+ WaitSlot (2000)
+
+ Kontext "SpeichernDlg"
+ Call DialogTest ( SpeichernDlg )
+ SpeichernDlg.Cancel
+ WaitSlot (2000)
+
+ FileClose ' now the office gets closed! (if there were no modifications!)
+ Kontext
+ Active.No
+ WaitSlot (2000)
+endcase
+'-----------------------------------------------------------
+testcase tmFileSave
+ hNewDocument
+ call hTBOtypeInDoc
+
+ FileSave
+ WaitSlot (2000)
+ Kontext "SpeichernDlg"
+ UebergeordneterOrdner.click
+ Standard.Click
+ Call DialogTest (SpeichernDlg)
+ Kontext "SpeichernDlg"
+ Standard.Click
+ SpeichernDlg.Cancel
+ WaitSlot (2000)
+ Call hCloseDocument
+endcase
+
+testcase tmFileSaveAs
+
+ hNewDocument
+ WaitSlot (2000)
+ call hTBOtypeInDoc
+
+ FileSaveAs
+ WaitSlot (2000)
+ Kontext "SpeichernDlg"
+ if (SpeichernDlg.exists (5) = FALSE) then
+ warnlog "FileSaveAs dialog is not visible"
+ end if
+ WaitSlot (2000)
+ Passwort.check
+ Passwort.uncheck
+ UebergeordneterOrdner.click
+ Standard.Click
+
+ NeuerOrdner.click
+ kontext "NeuerOrdner"
+ neuerordner.cancel
+ Kontext "SpeichernDlg"
+
+ Call DialogTest (SpeichernDlg)
+
+ Kontext "SpeichernDlg"
+ SpeichernDlg.Cancel
+ WaitSlot (2000)
+ Call hCloseDocument
+endcase
+
+testcase tmFileSaveAll
+ printlog "- File SaveAll"
+
+ hNewDocument
+ call hTBOtypeInDoc
+
+ Printlog " open 2. window"
+ hNewDocument
+ call hTBOtypeInDoc
+
+ Printlog " call save all"
+ FileSaveAll
+ Printlog " cancel 1. save"
+ Kontext "SpeichernDlg"
+ SpeichernDlg.Cancel
+
+ Printlog " cancel 2. save"
+ WaitSlot (2000)
+ Kontext "SpeichernDlg"
+ SpeichernDlg.Cancel
+ WaitSlot (2000)
+
+ try
+ Kontext "SpeichernDlg"
+ SpeichernDlg.Cancel
+ printlog "smth had been typed in the starting window (just a hint ;-) )"
+ catch
+ printlog "--------- no other window wants to get saved. :-)"
+ endcatch
+
+ WaitSlot (2000)
+ Printlog " hCloseDocument both"
+ Call hCloseDocument
+ sleep 2
+ Printlog " first closed"
+ Call hCloseDocument
+ WaitSlot (2000)
+ Printlog " second closed"
+ WaitSlot (5000)
+endcase
+
+testcase tmFileProperties
+ printlog "- File Properties"
+
+ Call hNewDocument
+ FileProperties
+
+ Kontext
+ active.SetPage TabDokument
+ Kontext "TabDokument"
+ Call DialogTest ( TabDokument )
+
+ Kontext
+ active.SetPage TabDokumentInfo
+ Kontext "TabDokumentInfo"
+ Call DialogTest ( TabDokumentInfo )
+
+ 'Deactivating this part because of #i95523#:
+ 'Kontext
+ 'active.SetPage TabBenutzer
+ 'Kontext "TabBenutzer"
+ 'Call DialogTest ( TabBenutzer )
+ 'Infofelder.Click
+ ' Kontext "InfonamenBearbeiten"
+ ' Call DialogTest (InfonamenBearbeiten)
+ 'InfonamenBearbeiten.Cancel
+
+ Kontext
+ active.SetPage TabInternet
+ Kontext "TabInternet"
+ Call DialogTest (TabInternet)
+ TabInternet.Cancel
+
+ Call hCloseDocument
+endcase
+
+testcase tmFilePrinterSetting
+ printlog "- File Printersettings"
+ Call hNewDocument
+ WaitSlot (3000)
+ FilePrintersettings
+ kontext
+ if active.exists(5) then
+ active.ok
+ qaerrorlog "There is no printer available - please install one on your system!"
+ end if
+ WaitSlot (2000)
+ Kontext "DruckerEinrichten"
+ Call DialogTest (DruckerEinrichten)
+ sleep 2
+ DruckerEinrichten.Cancel
+ WaitSlot (2000)
+ Call hCloseDocument
+endcase
+
+testcase tdFileExport
+ goto endsub
+ dim x as integer
+ Call hNewDocument
+ WaitSlot (3000)
+ FileExport
+ Kontext "ExportierenDlg"
+ Call DialogTest ( ExportierenDlg )
+ UebergeordneterOrdner.Click
+ Kontext "SpeichernDlg"
+ x=Dateityp.getitemcount
+ if x <> 18 then warnlog "the number of filters is not 18, it is: " + x
+ SpeichernDlg.Cancel
+ WaitSlot (2000)
+ Call hCloseDocument
+ WaitSlot (2000)
+endcase
+
+testcase tmFileExit
+ goto endsub
+ printlog "- File Close"
+ Call hNewDocument
+ WaitSlot (2000)
+ try
+ FileExit "SynchronMode", TRUE
+ WaitSlot (2000)
+ Kontext
+ WaitSlot (2000)
+ Kontext "MessageBox"
+ if MessageBox.Exists(1) then ' this is the messagebox from the first window!
+ Printlog MessageBox.GetText
+ try
+ MessageBox.OK
+ catch
+ MessageBox.No
+ endcatch
+ end if
+ Kontext "MessageBox"
+ if MessageBox.Exists(1) then
+ Warnlog "MsgBox popped up and there were no changes in the document"
+ Printlog MessageBox.GetText
+ try
+ MessageBox.OK
+ catch
+ MessageBox.No
+ endcatch
+ end if
+ catch
+ printlog "this exit is wanted :-)"
+ endcatch
+ try
+ WaitSlot (20000)
+ call hStartTheOffice ' from master.inc
+ catch
+ printlog "catch AGAIN"
+ endcatch
+ Kontext "SD_Praesentation"
+ if SD_Praesentation.exists (2) then
+ ViewToolbarsPresentation
+ end if
+endcase
diff --git a/testautomation/graphics/optional/includes/global/id_002.inc b/testautomation/graphics/optional/includes/global/id_002.inc
new file mode 100644
index 000000000000..c199ab998524
--- /dev/null
+++ b/testautomation/graphics/optional/includes/global/id_002.inc
@@ -0,0 +1,440 @@
+'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
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* Owner : wolfram.garten@oracle.com
+'*
+'* short description :
+'*
+'\**********************************************************************************
+
+testcase tiEditUndoRedo
+
+ hNewDocument
+ call hTBOtypeInDoc
+
+ EditUndo
+ WaitSlot (2000)
+ EditRedo
+ WaitSlot (2000)
+ Call hCloseDocument
+endcase
+
+testcase tiEditRepeat
+ goto endsub 'Quaste, ask FHA
+ Call hNewDocument
+
+ gMouseClick 50,50
+ Call hRechteckErstellen ( 30, 10, 70, 30 )
+ WaitSlot (1000)
+ Call hRechteckErstellen ( 20, 20, 60, 40 )
+ WaitSlot (1000)
+ Call hRechteckErstellen ( 80, 50, 40, 20 )
+ WaitSlot (1000)
+ ContextArrangeBringBackward
+ WaitSlot (2000)
+ try
+ EditRepeat
+ catch
+ Warnlog " Menu entry is disabled #i26129#"
+ endcatch
+
+ Call hCloseDocument
+endcase
+
+testcase tiEditCutPasteCopySelectall
+ Call hNewDocument
+
+ call hTBOtypeInDoc
+
+ EditCut
+ WaitSlot (2000)
+ EditPaste
+ WaitSlot (2000)
+ EditCopy
+ WaitSlot (2000)
+ EditPaste
+ WaitSlot (2000)
+ EditSelectAll
+ WaitSlot (2000)
+ EditCut
+ WaitSlot (2000)
+ EditPaste
+ WaitSlot (2000)
+ EditDeleteContents
+ WaitSlot (2000)
+ Call hCloseDocument
+endcase
+
+testcase tiEditPasteSpecial
+ Call hNewDocument
+
+ SetClipboard "This is a Text in the Clipboard"
+
+ EditPasteSpecial
+ WaitSlot (1000)
+ Kontext "InhaltEinfuegen"
+ DialogTest ( InhaltEinfuegen )
+
+ InhaltEinfuegen.Cancel
+ WaitSlot (1000)
+ Call hCloseDocument
+endcase
+
+testcase tiEditSearchAndReplace
+ Call hNewDocument
+
+ try
+ EditSearchAndReplace
+ WaitSlot (1000)
+ Kontext "FindAndReplace"
+ DialogTest ( FindAndReplace )
+
+ More.Click
+ SimilaritySearch.Check ' culprint for errors if not resetted !
+ WaitSlot (1000)
+ SimilaritySearchFor.Click
+ Kontext "Aehnlichkeitssuche"
+ DialogTest (Aehnlichkeitssuche )
+ Aehnlichkeitssuche.Cancel
+ Kontext "FindAndReplace"
+ SimilaritySearch.UnCheck
+ More.Click
+ FindAndReplace.Close
+ catch
+ Warnlog "EditSearchAndReplace caused an error"
+ endcatch
+ Call hCloseDocument
+endcase
+
+testcase tiEditDuplicate
+ Call hNewDocument
+ call hTBOtypeInDoc
+ EditSelectAll
+ EditDuplicate
+
+ Kontext "Duplizieren"
+ Call DialogTest ( Duplizieren )
+ Duplizieren.Cancel
+
+ Call hCloseDocument
+endcase
+
+testcase tEditPoints
+ Call hNewDocument
+ call hTBOtypeInDoc
+ FormatEditPoints
+ EditGluePoints
+ Call hCloseDocument
+endcase
+
+testcase tiEditFields
+ Call hNewDocument
+ WaitSlot (2000)
+ InsertFieldsDateFix
+ WaitSlot (1000)
+ gMouseDoubleClick 10,10
+
+ hTypeKeys "<ESCAPE>"
+ hTypeKeys "<Tab>" ' With a Tab catches we always the Object
+ hTypeKeys "<F2>" ' Here we enter Edit-Mode and therefore also the right place
+ hTypeKeys "<Home>" ' Here we enter Edit-Mode and therefore also the right place
+
+ try
+ EditFieldsDraw
+ Kontext "FeldbefehlBearbeitenDraw"
+ Call DialogTest ( FeldbefehlBearbeitenDraw )
+ FeldbefehlBearbeitenDraw.Close
+ catch
+ Warnlog "- Slot could not be accessed"
+ endcatch
+
+ Call hCloseDocument
+endcase
+
+testcase tdEditDeleteSlide
+ Call hNewDocument
+ InsertSlide
+ WaitSlot (2000)
+ hTypekeys "<Pagedown>"
+ WaitSlot (2000)
+ Kontext "Navigator"
+ sleep (2)
+ if Navigator.exists then
+ printlog "Navigator: open :-)"
+ else
+ printlog "Navigator: NOT available :-( Will be opened now!"
+ ViewNavigator
+ end if
+ WaitSlot (2000)
+ Kontext "NavigatorDraw"
+ if Liste.GetItemCount<>2 Then
+ Warnlog "- No slide inserted"
+ Kontext "Navigator"
+ Navigator.Close
+ Call hCloseDocument
+ goto endsub
+ else
+ Liste.Select 2
+ Kontext "Navigator"
+ Navigator.Close
+ end if
+ WaitSlot (2000)
+ EditDeleteSlide
+ WaitSlot (2000)
+ Call hCloseDocument
+endcase
+
+testcase tiEditLinks
+ Call hNewDocument
+
+ InsertGraphicsFromFile
+ Kontext "GrafikEinfuegenDlg"
+ try
+ if Link.Exists then
+ Link.Check
+ else
+ Warnlog "- Link in Insert graphic is not working"
+ end if
+ Dateiname.settext Convertpath (gTesttoolPath + "global\input\graf_inp\stabler.tif")
+ Oeffnen.Click
+ Kontext "Messagebox"
+ if Messagebox.Exists=True Then
+ Warnlog Messagebox.GetText
+ Messagebox.Ok
+ end if
+ InsertGraphicsFromFile
+ Kontext "GrafikEinfuegenDlg"
+ Link.Check
+ Dateiname.SetText ConvertPath (gTesttoolPath + "global\input\graf_inp\desp.bmp")
+ Oeffnen.Click
+
+ kontext "Messagebox"
+ if Messagebox.Exists( 2 ) then
+ Warnlog Messagebox.GetText
+ Messagebox.OK
+ sleep 1
+ end if
+ catch
+ Warnlog "Insert graphic caused errors"
+ endcatch
+
+ WaitSlot (2000)
+ try
+ EditLinksDraw
+ WaitSlot (2000)
+ Kontext "VerknuepfungenBearbeiten"
+ Call DialogTest ( VerknuepfungenBearbeiten )
+ VerknuepfungenBearbeiten.Close
+ WaitSlot (1000)
+ catch
+ Warnlog "- EditLinks could not be executed, could be the graphic was not imported"
+ endcatch
+
+ Call hCloseDocument
+endcase
+
+testcase tiEditImageMap
+ Call hNewDocument
+
+ EditImageMap
+
+ Kontext "ImageMapEditor"
+ if ImageMapEditor.Exists( 5 ) then
+ printlog "- ImageMap exists"
+ DialogTest ( ImageMapEditor )
+ try
+ ImageMapEditor.Close
+ Printlog "ImageMap closed using the close button"
+ catch
+ EditImageMap
+ Printlog "ImageMap closed using menue 'edit-imagemap'"
+ endcatch
+ else
+ warnlog "ImageMap didn't come up!"
+ end if
+ Call hCloseDocument
+endcase
+
+testcase tiEditObjectProperties
+ dim i as integer
+
+ Call hNewDocument
+
+ InsertFloatingFrame
+ WaitSlot (2000)
+
+ Kontext "TabEigenschaften"
+ FrameName.SetText "Hello"
+ Inhalt.SetText ConvertPath ( gTesttoolpath + "global\input\graf_inp\desp.bmp" )
+ WaitSlot (2000)
+ TabEigenschaften.OK
+ WaitSlot (2000)
+ gMouseDoubleClick 1,1
+
+ hTypekeys "<tab>"
+
+ kontext
+ WaitSlot (2000)
+ EditObjectProperties
+ WaitSlot (1000)
+ Kontext "TabEigenschaften"
+ DialogTest ( TabEigenschaften )
+ Oeffnen.Click
+ Kontext "OeffnenDlg"
+ Call DialogTest ( OeffnenDlg )
+ OeffnenDlg.Cancel
+ Kontext "TabEigenschaften"
+ TabEigenschaften.Cancel
+
+ Call hCloseDocument
+endcase
+
+testcase tiEditObjectEdit
+ dim i as integer
+ Call hNewDocument
+
+ InsertObjectOLEObject
+ WaitSlot (1000)
+ Kontext "OLEObjektEinfuegen"
+ ObjektTyp.Select 1
+ OLEObjektEinfuegen.OK
+ WaitSlot (1000)
+
+ gMouseClick 20,1
+
+ hTypekeys "<tab>"
+
+ EditObjectEdit
+ ' try EditObjectEdit again, to see, if it is in edit mode !
+ WaitSlot (2000)
+ try
+ ContextNameObject
+ warnlog " Couldn't get into edit mode!"
+ catch
+ printlog "Reached edit mode - ok :-)"
+ gMouseClick 20,1
+ endcatch
+
+ EditSelectAll
+
+ EditObjectSaveCopyAs
+ Kontext "SpeichernDlg"
+ Call DialogTest ( SpeichernDlg )
+ SpeichernDlg.Cancel
+ WaitSlot (2000)
+ Kontext "Active"
+ if Active.Exists(2) then Active.No
+ Call hCloseDocument
+endcase
+
+testcase tiEditPlugIn
+ Call hNewDocument
+
+ InsertObjectPlugin
+ Kontext "PlugInEinfuegen"
+ ' DialogTest ( PlugInEinfuegen)
+ Durchsuchen.click
+ Kontext "OeffnenDlg"
+ ' Call DialogTest ( OeffnenDlg )
+ if OeffnenDlg.exists (5) then
+ OeffnenDlg.Cancel
+ else
+ warnlog "Open file dialog didn't come up"
+ end if
+ WaitSlot (5000)
+ Kontext "PlugInEinfuegen"
+ if PlugInEinfuegen.exists then
+ DateiUrl.SetText (ConvertPath ( gTesttoolpath + "graphics\required\input\sample.mov" ))
+
+ Optionen.SetText "Fiddler's Green"
+ Optionen.TypeKeys "<HOME>"
+ Optionen.TypeKeys "<SHIFT><END>"
+ Optionen.TypeKeys "<delete>"
+ PlugInEinfuegen.Ok
+ else
+ warnlog "Insert plugin isn't visible"
+ end if
+ WaitSlot (5000)
+ kontext "Messagebox"
+ if Messagebox.exists (5) then
+ warnlog "Messagebox: " + Messagebox.gettext
+ Messagebox.ok
+ end if
+ EditPlugIn
+ printlog "Editplugin works!"
+
+ Call hCloseDocument
+endcase
+
+testcase tiEditHyperlink
+ hNewDocument
+ InsertHyperlink
+
+ kontext "HyperlinkDialog"
+ if ( HyperlinkDialog.exists( 2 ) ) then
+ Kontext "Hyperlink"
+ Auswahl.MouseDown 50, 5
+ Auswahl.MouseUp 50, 5
+ Auswahl.typekeys "<PAGEDOWN><PAGEUP>"
+ Auswahl.typekeys "<TAB>"
+ sleep( 1 )
+ Kontext "TabHyperlinkInternet"
+
+ 'Workaround to get rid of a Focusing-problem...
+ NameText.Typekeys "alal <RETURN>"
+ NameText.Typekeys "<MOD1 A><DELETE>"
+ TabHyperlinkInternet.Typekeys "<TAB>", 6
+ TabHyperlinkInternet.Typekeys "<LEFT>", 3
+ 'End of workaround...
+
+ Internet.Check 'Just to make sure the radio-button is addressable.
+ ZielUrl.Settext "http://www.liegerad-fahrer.de"
+
+ Uebernehmen.Click()
+
+ kontext "HyperlinkDialog"
+ HyperlinkDialog.Close()
+
+ hTypeKeys "<TAB><F2>"
+ EditSelectAll
+ try
+ EditHyperlinkDraw
+ Kontext "HyperlinkDialog"
+ if ( HyperlinkDialog.Exists( 1 ) ) then
+ HyperlinkDialog.Close()
+ else
+ Warnlog "- Hyperlinkdialog not up"
+ end if
+ catch
+ Warnlog "- Not able to edit Hyperlink!"
+ endcatch
+ else
+ warnlog( "Failed to open <HyperlinkDialog>" )
+ endif
+
+ Call hCloseDocument
+endcase
diff --git a/testautomation/graphics/optional/includes/global/id_003.inc b/testautomation/graphics/optional/includes/global/id_003.inc
new file mode 100644
index 000000000000..4ada1beaaea4
--- /dev/null
+++ b/testautomation/graphics/optional/includes/global/id_003.inc
@@ -0,0 +1,264 @@
+'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
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* Owner : wolfram.garten@oracle.com
+'*
+'* short description :
+'*
+'\**********************************************************************************
+
+testcase tiViewNavigator
+ Call hNewDocument
+
+ Kontext "NavigatorDraw"
+ if Not NavigatorDraw.Exists Then
+ ViewNavigator
+ end if
+ Kontext "NavigatorDraw"
+ Call DialogTest ( NavigatorDraw )
+
+ try
+ Kontext "Navigator"
+ Navigator.Close
+ catch
+ Errorlog " Navigator wasn't closed, second try with Menu"
+ ViewNavigator
+ endcatch
+ Call hCloseDocument
+endcase
+
+'-------------------------------------------------------------------------
+
+testcase tiViewZoom
+ Call hNewDocument
+ UseBindings
+ ViewZoom
+ Kontext "Massstab"
+ DialogTest ( Massstab )
+ Massstab.Cancel
+ Call hCloseDocument
+endcase
+
+'-------------------------------------------------------------------------
+
+testcase tiViewToolbar
+ Call hNewDocument
+
+ ViewToolbarsThreeDSettings
+ WaitSlot (1000)
+ ViewToolbarsThreeDSettings
+ WaitSlot (1000)
+
+ ViewToolbarsAlign
+ WaitSlot (1000)
+ ViewToolbarsAlign
+ WaitSlot (1000)
+
+ ViewToolbarsTools
+ WaitSlot (1000)
+ ViewToolbarsTools
+ WaitSlot (1000)
+
+ ViewToolbarsBezier
+ WaitSlot (1000)
+ ViewToolbarsBezier
+ WaitSlot (1000)
+
+ ViewToolbarsFontwork
+ WaitSlot (1000)
+ ViewToolbarsFontwork
+ WaitSlot (1000)
+
+ ' if gApplication = "IMPRESS" then
+ ' ViewToolbarsPresentation ' only in impress, not draw
+ ' ViewToolbarsPresentation
+ ' endif
+
+ ViewToolbarsFormControls
+ WaitSlot (1000)
+ ViewToolbarsFormControls
+ WaitSlot (1000)
+
+ '-----------------
+ ViewToolbarsFormDesign
+ WaitSlot (1000)
+ ViewToolbarsFormDesign
+ WaitSlot (1000)
+
+ ViewToolbarsFormNavigation
+ WaitSlot (1000)
+ ViewToolbarsFormNavigation
+ WaitSlot (1000)
+
+ ViewToolbarsGluepoints
+ WaitSlot (1000)
+ ViewToolbarsGluepoints
+ WaitSlot (1000)
+ ViewToolbarsInsert
+ WaitSlot (1000)
+ ViewToolbarsInsert
+ WaitSlot (1000)
+
+ ViewToolbarsGraphic
+ WaitSlot (1000)
+ ViewToolbarsGraphic
+ WaitSlot (1000)
+
+ ViewToolbarsMediaPlayback
+ WaitSlot (1000)
+ ViewToolbarsMediaPlayback
+ WaitSlot (1000)
+
+ ViewToolbarsOptionbar
+ WaitSlot (1000)
+ ViewToolbarsOptionbar
+ WaitSlot (1000)
+
+ ViewToolbarsPicture
+ WaitSlot (1000)
+ ViewToolbarsPicture
+ WaitSlot (1000)
+
+ ViewToolbarsStandard
+ WaitSlot (1000)
+ ViewToolbarsStandard
+ WaitSlot (1000)
+
+ ViewToolbarsStandardView
+ WaitSlot (1000)
+ ViewToolbarsStandardView
+ WaitSlot (1000)
+
+ ViewToolbarsHyperlinkbar
+ WaitSlot (1000)
+ ViewToolbarsHyperlinkbar
+ WaitSlot (1000)
+
+ ViewToolbarsColorBar
+ WaitSlot (1000)
+ ViewToolbarsColorBar
+ WaitSlot (1000)
+
+ ViewToolbarsCustomize
+ WaitSlot (1000)
+ Kontext
+ try
+ Messagebox.SetPage TabCustomizeMenu ' 1 ------------------
+ catch
+ warnlog "couldn't switch to tabpage 'Menus'"
+ endcatch
+ Kontext "TabCustomizeMenu"
+ if TabCustomizeMenu.exists(5) then
+ Call DialogTest ( TabCustomizeMenu )
+ Menu.typeKeys("<down>")
+ Entries.typeKeys("<down>")
+ sleep 2
+ BtnNew.Click
+ sleep 1
+ Kontext "MenuOrganiser"
+ Call DialogTest ( MenuOrganiser )
+ MenuOrganiser.cancel
+ sleep 1
+ Kontext "TabCustomizeMenu"
+ TabCustomizeMenu.Close
+ end if
+ sleep (1)
+
+ Call hCloseDocument
+endcase
+
+'-------------------------------------------------------------------------
+
+testcase tiViewDisplayQuality
+ Call hNewDocument
+
+ Call hRechteckErstellen 20,20,40,40
+
+ try
+ ViewQualityBlackWhite
+ Printlog "- Quality set to black and white"
+ catch
+ Warnlog "- Slot could not be accessed"
+ endcatch
+ WaitSlot (1000)
+ try
+ ViewQualityGreyscale
+ Printlog "- View quality set to greyscale"
+ catch
+ Warnlog "- View quality greyscale could not be accessed"
+ endcatch
+ WaitSlot (1000)
+ try
+ ViewQualityColour
+ Printlog "- View quality set to colour"
+ catch
+ Warnlog "- View quality colour could not be accessed"
+ endcatch
+ Call hClosedocument
+endcase
+
+'-------------------------------------------------------------------------
+
+testcase tiViewLayer
+ Call hNewDocument
+
+ ViewLayer
+ WaitSlot (1000)
+ ViewLayer
+ Call hCloseDocument
+endcase
+
+'-------------------------------------------------------------------------
+
+testcase tViewGrid
+ Call hNewDocument
+
+ ViewGridVisible
+ ViewGridUse
+ ViewGridFront
+ ViewGridVisible
+ ViewGridUse
+ ViewGridFront
+ WaitSlot (1000)
+ Call hCloseDocument
+endcase
+
+'-------------------------------------------------------------------------
+
+testcase tViewSnapLines
+ Call hNewDocument
+
+ ViewSnapLinesVisible
+ ViewSnapLinesUse
+ ViewSnapLinesFront
+ ViewSnapLinesVisible
+ ViewSnapLinesUse
+ ViewSnapLinesFront
+ WaitSlot (1000)
+ Call hCloseDocument
+endcase
+
diff --git a/testautomation/graphics/optional/includes/global/id_004.inc b/testautomation/graphics/optional/includes/global/id_004.inc
new file mode 100644
index 000000000000..2e1aa6db3cd1
--- /dev/null
+++ b/testautomation/graphics/optional/includes/global/id_004.inc
@@ -0,0 +1,370 @@
+'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
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* Owner : wolfram.garten@oracle.com
+'*
+'* short description :
+'*
+'\**********************************************************************************
+
+
+testcase tiInsertSlide
+
+ Call hNewDocument
+ InsertSlide
+ WaitSlot (2000)
+ hTypekeys "<Pagedown>"
+ WaitSlot (2000) 'sleep 2
+ Call hCloseDocument
+endcase
+
+testcase tiInsertDuplicateSlide
+ Call hNewDocument
+ Call hRechteckErstellen ( 30, 40, 40, 50 )
+ InsertDuplicateSlide
+ WaitSlot (2000)
+ Call hCloseDocument
+endcase
+
+testcase tiInsertField
+ Call hNewDocument
+
+ InsertFieldsTimeFix
+ WaitSlot (1000)
+ printlog "OK Time Fix"
+ EditSelectAll
+ hTypekeys "<Delete>"
+ sleep 1
+
+ InsertFieldsDateFix
+ WaitSlot (1000)
+ printlog "OK Date Fix"
+ EditSelectAll
+ hTypekeys "<Delete>"
+ sleep 1
+
+ InsertFieldsTimeVariable
+ WaitSlot (1000)
+ printlog "OK Time Variabel"
+ EditSelectAll
+ hTypekeys "<Delete>"
+ sleep 1
+
+ InsertFieldsDateVariable
+ WaitSlot (1000)
+ printlog "OK Date Variabel"
+ EditSelectAll
+ hTypekeys "<Delete>"
+ sleep 1
+
+ InsertFieldsAuthorDraw
+ WaitSlot (1000)
+ printlog "OK Author"
+ EditSelectAll
+ hTypekeys "<Delete>"
+ sleep 1
+
+ InsertFieldsPageNumberDraw
+ WaitSlot (1000)
+ printlog "OK Page number"
+ EditSelectAll
+ hTypekeys "<Delete>"
+ sleep 1
+
+ InsertFieldsFileName
+ WaitSlot (1000) 'sleep 1
+ printlog "OK File name"
+ EditSelectAll
+ hTypekeys "<Delete>"
+ sleep 2
+ Call hCloseDocument
+endcase
+
+testcase tiInsertSpecialCharacter
+ Call hNewDocument
+
+ hTextrahmenErstellen ("This is a testtext",30,40,60,50)
+ sleep 2
+ InsertSpecialCharacterDraw
+
+ Kontext "Sonderzeichen"
+ if ( Sonderzeichen.exists( 2 ) ) then
+ Call DialogTest (Sonderzeichen)
+ hCloseDialog( Sonderzeichen, "Cancel" )
+ else
+ warnlog( "<Special Characters> dialog not open" )
+ endif
+ Call hCloseDocument
+endcase
+
+testcase tiInsertHyperlink
+
+ Call hNewDocument
+ InsertHyperlink
+
+ kontext "HyperlinkDialog"
+ if ( HyperlinkDialog.exists( 2 ) ) then
+
+ Kontext "TabHyperlinkInternet"
+ Auswahl.MouseDown 50, 5
+ Auswahl.MouseUp 50, 5
+ Auswahl.typekeys "<PAGEDOWN><PAGEUP>"
+ Auswahl.typekeys "<TAB>"
+
+ 'Workaround to get rid of a Focusing-problem...
+ NameText.Typekeys "alal <RETURN>"
+ NameText.Typekeys "<MOD1 A><DELETE>"
+ TabHyperlinkInternet.Typekeys "<TAB>", 6
+ TabHyperlinkInternet.Typekeys "<LEFT>", 3
+ 'End of workaround...
+
+ Internet.Check
+ ZielUrl.SetText( "http://www.nowhere.com" )
+ Uebernehmen.Click()
+
+ kontext "HyperlinkDialog"
+ HyperlinkDialog.Close()
+
+ else
+ warnlog "Failed to open <HyperlinkDialog>"
+ end if
+ Call hCloseDocument
+endcase
+
+testcase tiInsertGraphic
+ Call hNewDocument
+ InsertGraphicsFromFile
+ WaitSlot (2000) '
+ try
+ Kontext "GrafikEinfuegenDlg"
+ if Link.exists then
+ Link.Check
+ else
+ Warnlog "Linking grafik doesn't work :-("
+ end if
+ if Preview.exists then
+ Preview.Check
+ else
+ Warnlog "Preview of graphic doesn't work :-("
+ end if
+ DialogTest (GrafikEinfuegenDlg)
+
+ Dateiname.settext Convertpath (gTesttoolPath + "global\input\graf_inp\stabler.tif")
+ Oeffnen.click
+ catch
+ Warnlog "Insert graphic doesn't work :-("
+ endcatch
+
+ Call hCloseDocument
+endcase
+
+testcase tiInsertObjectSound
+ goto endsub ' disabled for final, because always wrong (TZ 01/2002)
+ 'TODO: TBO: enhance!
+ Call hNewDocument
+ try
+ InsertObjectSound
+ WaitSlot (1000)
+ Kontext "OeffnenDlg"
+ ' Call Dialogtest (OeffnenDlg) ' just be sure to check one pth and one open dialog : TZ 28.11.201
+
+ OeffnenDlg.Cancel
+ catch
+ printlog "'Insert -> Object -> Sound' not available. TestDevelopmentInProgress (TDIP) ;-)"
+ endcatch
+ Call hCloseDocument
+endcase
+
+testcase tiInsertObjectVideo
+ goto endsub
+ 'TODO: TBO: enhance!
+ Call hNewDocument
+ try
+ InsertObjectVideo
+ Kontext "OeffnenDlg"
+ ' Call Dialogtest (OeffnenDlg)
+ WaitSlot (1000)
+ OeffnenDlg.Cancel
+ catch
+ printlog "'Insert -> Object -> Video' not available. (TDIP) ;-)"
+ endcatch
+ Call hCloseDocument
+endcase
+
+testcase tiInsertChart
+ Call hNewDocument
+ InsertChart
+
+ Kontext "Messagebox"
+ if ( Messagebox.Exists( 2 ) ) then
+ Warnlog Messagebox.GetText
+ hCloseDialog( Messagebox, "OK" )
+ end if
+ gMouseClick 1,1
+ sleep 2
+ Call hCloseDocument
+endcase
+
+testcase tiInsertObjectOLEObjects
+ hNewDocument
+ InsertObjectOLEObject
+ Kontext "OLEObjektEinfuegen"
+ ' Call Dialogtest ( OLEObjektEinfuegen )
+ ' NeuErstellen.Check ' is default value
+ Call DialogTest (OLEObjektEinfuegen, 1)
+ AusDateiErstellen.Check
+ Call DialogTest (OLEObjektEinfuegen, 2)
+ Durchsuchen.click
+ Kontext "OeffnenDlG"
+ OeffnenDLG.Cancel
+ Kontext "OLEObjektEinfuegen"
+ OLEObjektEinfuegen.Cancel
+ sleep 1
+ Call hCloseDocument
+endcase
+
+testcase tiInsertSpreadsheet
+ if gtSYSName = "Linux" then
+ printlog "Linux = wont test tiInsertSpreadsheet"
+ goto endsub
+ endif
+
+ Call hNewDocument
+ WaitSlot (2000)
+ InsertSpreadsheetDraw
+ WaitSlot (2000)
+ Kontext "Messagebox"
+ if Messagebox.Exists (5) then
+ Warnlog Messagebox.GetText
+ hCloseDialog( Messagebox, "ok" )
+ end if
+ gMouseClick 1,1
+ sleep 1
+ hTypekeys "<Tab><Delete>"
+ sleep 2
+ Call hCloseDocument
+endcase
+
+testcase tiInsertFormula
+ Call hNewDocument
+ InsertObjectFormulaDraw
+
+ Kontext "Messagebox"
+ if ( Messagebox.Exists( 2 ) ) then
+ Warnlog Messagebox.GetText
+ hCloseDialog( Messagebox, "ok" )
+ end if
+ gMouseClick 1,1
+ sleep 1
+ hTypekeys "<Tab><Delete>"
+ Call hCloseDocument
+endcase
+
+testcase tiInsertFloatingFrame
+ Call hNewDocument
+ InsertFloatingFrame
+ WaitSlot (2000)
+ Kontext "TabEigenschaften"
+ Dialogtest (TabEigenschaften)
+ Oeffnen.Click
+ Kontext "OeffnenDlg"
+ hCloseDialog( OeffnenDlg, "Cancel" )
+ Kontext "TabEigenschaften"
+ TabEigenschaften.Cancel
+ Call hCloseDocument
+endcase
+
+testcase tiInsertFile
+ Call hNewDocument
+ WaitSlot (1000)
+ InsertFileDraw
+ WaitSlot (1000)
+ Kontext "OeffnenDLG"
+ ' Call Dialogtest ( OeffnenDLG )
+ OeffnenDLG.Cancel
+ Call hCloseDocument
+endcase
+
+testcase tiInsertPlugin
+ call hNewDocument
+ InsertObjectPlugIn
+ Kontext "PluginEinfuegen"
+ if PluginEinfuegen.exists (5) then
+ call Dialogtest (PluginEinfuegen)
+ Durchsuchen.Click
+ sleep 1
+ Kontext "Messagebox"
+ if Messagebox.Exists (5) Then
+ Warnlog Messagebox.GetText
+ Messagebox.OK
+ else
+ printlog "No Messagebox :-)"
+ end if
+ Kontext "OeffnenDlG"
+ if OeffnenDlG.exists (5) then
+ OeffnenDLG.Cancel
+ end if
+ Kontext "PluginEinfuegen"
+ if PluginEinfuegen.exists (5) then PluginEinfuegen.Cancel
+ else
+ warnlog "Insert Plugin does not work :-("
+ end if
+ Call hCloseDocument
+endcase
+
+testcase tiInsertScan
+ goto endsub
+ Call hNewDocument
+ InsertScanRequest ' as long as there is no scanner available, nothing happens
+ WaitSlot (1000)
+ InsertScanSelectSource
+ WaitSlot (1000)
+ printlog "Not testable, not translatable, just callable, because of systemdialog :-("
+ Call hCloseDocument
+endcase
+
+testcase tiInsertSnappointLine
+ Call hNewDocument
+ InsertSnapPointLine
+ Kontext "NeuesFangobjekt"
+ DialogTest ( NeuesFangobjekt )
+ NeuesFangobjekt.Cancel
+ sleep 2
+ Call hCloseDocument
+endcase
+
+testcase tdInsertLayer
+ Call hNewDocument
+ WaitSlot (1000)
+ ViewLayer
+ InsertLayer
+ Kontext "EbeneEinfuegenDlg"
+ DialogTest ( EbeneEinfuegenDlg )
+ EbeneEinfuegenDlg.Cancel
+ Call hCloseDocument
+endcase
+
diff --git a/testautomation/graphics/optional/includes/global/id_005.inc b/testautomation/graphics/optional/includes/global/id_005.inc
new file mode 100644
index 000000000000..4aefb701a861
--- /dev/null
+++ b/testautomation/graphics/optional/includes/global/id_005.inc
@@ -0,0 +1,808 @@
+'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
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* Owner : wolfram.garten@oracle.com
+'*
+'* short description :
+'*
+'***********************************************************************************
+' #1 tiFormatDefault
+' #1 tiFormatLine
+' #1 tdFormatArea
+' #1 tiFormatText
+' #1 tiFormatPositionAndSize
+' #1 tiFormatCharacter
+' #1 tiFormatControlForm
+' #1 tiFormatDimensions
+' #1 tiFormatConnector
+' #1 tiFormat3D_Effects
+' #1 tiFormatNumberingBullets
+' #1 tiFormatCaseCharacter
+' #1 tiFormatParagraph
+' #1 tiFormatPage
+' #1 tiFormatStylesAndFormatting
+' #1 tiFormatStylesSlideDesign
+' #1 tiFormatFontwork
+' #1 tiFormatGroup
+' #1 hWalkTheStyles
+'\**********************************************************************************
+
+testcase tiFormatDefault
+
+ Call hNewDocument
+ gMouseClick 50,50
+ Call hRechteckErstellen ( 10, 10, 20, 40 )
+ FormatStandardDraw
+ Call hCloseDocument
+endcase
+
+testcase tiFormatLine
+ hNewDocument
+ gMouseClick 50,50
+ Call hRechteckErstellen ( 10, 10, 20, 40 )
+ FormatLine
+ Kontext
+ Messagebox.SetPage TabLinie
+ kontext "TabLinie"
+ Call DialogTest ( TabLinie )
+
+ Kontext
+ Messagebox.SetPage TabLinienstile
+ kontext "TabLinienstile"
+ Call DialogTest ( TabLinienstile )
+ Hinzufuegen.click
+ Kontext "NameDLG"
+ Call DialogTest ( NameDlg )
+ NameDlg.Cancel
+
+ kontext "TabLinienstile"
+ Aendern.Click
+ Kontext "NameDlg"
+ Call DialogTest ( NameDlg )
+ NameDlg.Cancel
+ kontext "TabLinienstile"
+ Loeschen.Click
+ Kontext "Messagebox"
+ Messagebox.no
+
+ kontext "TabLinienstile"
+ Oeffnen.click
+ Kontext "OeffnenDLG"
+ call Dialogtest (OeffnenDLG)
+ OeffnenDLG.Cancel
+ kontext "TabLinienstile"
+ Speichern.click
+ Kontext "SpeichernDLG"
+ call Dialogtest (SpeichernDLG)
+ SpeichernDLG.Cancel
+ Kontext
+ Messagebox.SetPage TabLinienenden
+ kontext "TabLinienenden"
+ Call DialogTest ( TabLinienenden )
+ Hinzufuegen.Click
+ Kontext "NameDLG"
+ Call DialogTest ( NameDlg )
+ NameDlg.Cancel
+
+ kontext "TabLinienenden"
+ Aendern.Click
+ Kontext "Messagebox"
+ try
+ Messagebox.OK
+ catch
+ 'print "TabLinienenden"
+ endcatch
+
+ kontext "NameDlg"
+ Call DialogTest ( NameDlg )
+ NameDlg.Cancel
+
+ kontext "TabLinienenden"
+ Loeschen.Click
+ Kontext "Messagebox"
+ Messagebox.no
+
+ kontext "TabLinienenden"
+ Oeffnen.click
+ Kontext "OeffnenDLG"
+ call Dialogtest (OeffnenDLG)
+ OeffnenDLG.Cancel
+ kontext "TabLinienenden"
+ Speichern.click
+ Kontext "SpeichernDLG"
+ call Dialogtest (SpeichernDLG)
+ SpeichernDlg.Cancel
+ kontext "TabLinienenden"
+ TabLinienenden.cancel
+ Call hCloseDocument
+endcase
+
+testcase tdFormatArea
+ Call hNewDocument
+ gMouseClick 50,50
+ Call hRechteckErstellen (15,15,65,65)
+ gMouseClick 30,30
+ FormatArea
+ WaitSlot (1000)
+ Kontext
+ Messagebox.SetPage TabArea
+ Kontext "TabArea"
+ Call DialogTest ( TabArea )
+ Kontext
+ Messagebox.SetPage TabSchatten
+ kontext "TabSchatten"
+ Anzeigen.Check
+ Call DialogTest ( TabSchatten )
+ Kontext
+ Messagebox.SetPage TabFarben
+ kontext "TabFarben"
+ Farbe.select 1
+ Farbmodell.Select 1
+ Call DialogTest ( TabFarben,1 )
+ Farbmodell.Select 2
+ Call DialogTest ( TabFarben,2 )
+
+ Hinzufuegen.click
+ Kontext "Messagebox"
+ Messagebox.OK
+ kontext "NameDlg"
+ Call DialogTest ( NameDlg )
+ NameDlg.Cancel
+ kontext "TabFarben"
+ Loeschen.click
+ Kontext "Messagebox"
+ Messagebox.no
+
+ kontext "TabFarben"
+ sleep 1
+ Speichern.click
+ Kontext "SpeichernDLG"
+ call Dialogtest (SpeichernDLG)
+ SpeichernDlg.Cancel
+ sleep 1
+
+ kontext "TabFarben"
+ Oeffnen.click
+ Kontext "OeffnenDLG"
+ call Dialogtest (OeffnenDLG)
+ OeffnenDLG.Cancel
+ Kontext "TabFarben"
+
+ Kontext
+ Messagebox.SetPage TabFarbverlaeufe
+ kontext "TabFarbverlaeufe"
+ Call DialogTest ( TabFarbverlaeufe )
+
+ Hinzufuegen.click
+ Kontext "NameDlg"
+ Call DialogTest ( NameDlg )
+ NameDlg.Cancel
+
+ kontext "TabFarbverlaeufe"
+ Aendern.Click
+ Kontext "NameDlg"
+ Call DialogTest ( NameDlg )
+ NameDlg.Cancel
+
+ kontext "TabFarbverlaeufe"
+ loeschen.click
+ try
+ kontext "Messagebox"
+ Messagebox.no
+ catch
+ warnlog "nobody cares about deleting a gradient :-("
+ endcatch
+
+ kontext "TabFarbverlaeufe"
+ Oeffnen.click
+ Kontext "OeffnenDLG"
+ call Dialogtest (OeffnenDLG)
+ OeffnenDLG.Cancel
+ kontext "TabFarbverlaeufe"
+ Speichern.click
+ Kontext "SpeichernDLG"
+ call Dialogtest (SpeichernDLG)
+ SpeichernDLG.Cancel
+
+ Kontext
+ Messagebox.SetPage TabSchraffuren
+ kontext "TabSchraffuren"
+ Call DialogTest ( TabSchraffuren)
+
+ Hinzufuegen.click
+ Kontext "NameDlg"
+ Call DialogTest ( NameDlg )
+ NameDlg.Cancel
+
+ kontext "TabSchraffuren"
+ Aendern.Click
+ Kontext "NameDlg"
+ Call DialogTest ( NameDlg )
+ NameDlg.Cancel
+
+ kontext "TabSchraffuren"
+ Loeschen.click
+ kontext "Messagebox"
+ Messagebox.no
+
+ kontext "TabSchraffuren"
+ Oeffnen.click
+ Kontext "OeffnenDLG"
+ call Dialogtest (OeffnenDLG)
+ OeffnenDLG.Cancel
+ kontext "TabSchraffuren"
+ Speichern.click
+ Kontext "SpeichernDLG"
+ call Dialogtest (SpeichernDLG)
+ SpeichernDLG.Cancel
+
+ Kontext
+ Messagebox.SetPage TabBitmap
+ kontext "TabBitmap"
+ Call DialogTest ( TabBitmap )
+ zurueck.click
+ sleep 1
+ hinzufuegen.click
+ Kontext "NameDlg"
+ Call DialogTest ( NameDlg )
+ NameDlg.cancel
+
+ kontext "TabBitmap"
+ try
+ Aendern.Click
+ Kontext "NameDlg"
+ Call DialogTest ( NameDlg )
+ NameDlg.cancel
+ catch
+ WarnLog "Control is disabled - modify bitmap"
+ endcatch
+ kontext "TabBitmap"
+ Import.Click
+ try
+ Kontext "GrafikEinfuegenDlg"
+ Call DialogTest ( GrafikEinfuegenDlg )
+ Kontext "GrafikEinfuegenDlg"
+ GrafikEinfuegenDlg.Cancel
+ catch
+ Warnlog "Insert graphic does not work"
+ endcatch
+
+ kontext "TabBitmap"
+ loeschen.click
+ kontext "Messagebox"
+ Messagebox.no
+
+ kontext "TabBitmap"
+ Oeffnen.click
+ Kontext "OeffnenDLG"
+ call Dialogtest (OeffnenDLG)
+ OeffnenDLG.Cancel
+ kontext "TabBitmap"
+ Speichern.click
+ Kontext "SpeichernDLG"
+ call Dialogtest (SpeichernDLG)
+ SpeichernDLG.Cancel
+ kontext "TabBitmap"
+ TabBitmap.Cancel
+ Call hCloseDocument
+endcase
+
+testcase tiFormatText
+ Call hNewDocument
+ FormatTextDraw
+ Kontext
+ Messagebox.SetPage TabText
+ Kontext "TabText"
+ DialogTest ( TabText )
+ Kontext
+ Messagebox.SetPage TabLauftext
+ Kontext "TabLauftext"
+ DialogTest ( TabLauftext )
+ TabLauftext.Cancel
+ Call hCloseDocument
+endcase
+
+testcase tiFormatPositionAndSize
+ Call hNewDocument
+ Call hRechteckErstellen ( 10, 10, 20, 40 )
+ ContextPositionAndSize
+ Kontext
+ Messagebox.setpage TabPositionAndSize
+ Kontext "TabPositionAndSize"
+ call Dialogtest ( TabPositionAndSize )
+ kontext "PositionPosition"
+ PositionPosition.TypeKeys ("<right>", 2)
+ kontext "SizePosition"
+ SizePosition.TypeKeys ("<down>", 2)
+ Kontext
+ Messagebox.setPage TabDrehung
+ Kontext "TabDrehung"
+ call Dialogtest ( TabDrehung )
+ Kontext
+ Messagebox.setpage TabSchraegstellen
+ Kontext "TabSchraegstellen"
+ call Dialogtest ( TabSchraegstellen )
+ TabSchraegstellen.cancel
+ Call hCloseDocument
+endcase
+
+testcase tiFormatCharacter
+ Call hNewDocument
+ FormatCharacter
+ WaitSlot (1000)
+ Kontext
+ Messagebox.SetPage TabFont
+ kontext "TabFont"
+ sleep 1
+ Call DialogTest ( TabFont )
+ Kontext
+ Messagebox.SetPage TabFontEffects
+ kontext "TabFontEffects"
+ sleep 1
+ Call DialogTest ( TabFontEffects )
+ sleep 1
+ Kontext
+ Messagebox.SetPage TabFontPosition
+ Kontext "TabFontPosition"
+ sleep 1
+ Call DialogTest ( TabFontPosition )
+ sleep 2
+ TabFontPosition.Cancel
+ Call hCloseDocument
+endcase
+
+testcase tiFormatControlForm
+
+ printlog "testcase: check if controls are available"
+
+ printlog "open new document"
+ Call hNewDocument
+
+ 'click in the document to get the focus into the document
+ if ( UCase(gApplication) = "DRAW" ) then
+ Kontext "DocumentDraw"
+ DocumentDraw.MouseDown(50,50)
+ DocumentDraw.MouseUp(50,50)
+ else 'Impress
+ Kontext "DocumentImpress"
+ DocumentImpress.MouseDown(50,50)
+ DocumentImpress.MouseUp(50,50)
+ endif
+
+ printlog "open the form controls toolbar"
+ call hToolbarSelect("FormControls",true)
+
+ kontext "FormControls"
+ printlog "insert a PushButton"
+ Pushbutton.Click
+ Sleep 1
+ gMouseMove (50, 20,70, 40)
+
+ printlog "open the control properties dialog"
+ FormatControl
+
+ Kontext "ControlPropertiesDialog"
+ WaitSlot (1000)
+ printlog "close the control properties dialog"
+ ControlPropertiesDialog.Close
+
+ printlog "open the form properties dialog"
+ FormatForm
+ Kontext "ControlPropertiesDialog"
+ WaitSlot (1000)
+ printlog "close the form properties dialog"
+ ControlPropertiesDialog.Close
+
+ printlog "close the form control toolbar"
+ call hToolbarSelect("FormControls",false)
+
+ printlog "close application"
+ Call hCloseDocument
+
+endcase
+
+testcase tiFormatDimensions
+ Call hNewDocument
+ FormatDimensioning
+ Kontext "Bemassung"
+ DialogTest ( Bemassung )
+ Bemassung.Cancel
+ Call hCloseDocument
+endcase
+
+testcase tiFormatConnector
+ Call hNewDocument
+ FormatConnector
+ Kontext "Verbinder"
+ DialogTest ( Verbinder )
+ Verbinder.Cancel
+ Call hCloseDocument
+endcase
+
+testcase tiFormat3D_Effects
+ Call hNewDocument
+ Format3D_Effects
+ Kontext "Drei_D_Effekte"
+ Call DialogTest ( Drei_D_Effekte,1 )
+ Geometrie.Click
+ Call DialogTest ( Drei_D_Effekte,2 )
+ Darstellung.Click
+ Call DialogTest ( Drei_D_Effekte,3 )
+ Beleuchtung.Click
+ Call DialogTest ( Drei_D_Effekte,4 )
+ Texturen.Click
+ Call DialogTest ( Drei_D_Effekte,5 )
+ Material.Click
+ Call DialogTest ( Drei_D_Effekte,6 )
+ Kontext "Drei_D_Effekte"
+ Drei_D_Effekte.Close
+ Call hCloseDocument
+endcase
+
+'---------------------------------------------------------------------------------------
+
+testcase tiFormatNumberingBullets
+ Call hNewDocument
+ WaitSlot (2000)
+ FormatNumberingBulletsDraw
+ WaitSlot (2000)
+ Kontext
+ Messagebox.SetPage TabBullet
+ Kontext "TabBullet"
+ Call DialogTest ( TabBullet )
+ Kontext
+ Messagebox.SetPage TabNumerierungsart
+ Kontext "TabNumerierungsart"
+ Call DialogTest ( TabNumerierungsart )
+ Kontext
+ Messagebox.SetPage TabGrafiken
+ Kontext "TabGrafiken"
+ Call DialogTest ( TabGrafiken )
+ Kontext
+ Messagebox.SetPage TabPositionNumerierung
+ Kontext "TabPositionNumerierung"
+ Call DialogTest ( TabPositionNumerierung )
+ Kontext
+ Messagebox.SetPage TabOptionenNumerierung
+ Kontext "TabOptionenNumerierung"
+ Call DialogTest ( TabOptionenNumerierung )
+ Numerierung.Select 9 ' last one always ? -> graphics
+ TabOptionenNumerierung.MouseDown 50,60
+ TabOptionenNumerierung.MouseUp 50,60
+ Auswahl.TypeKeys "<SPACE>"
+ hMenuSelectNr (1)
+ sleep 3
+ Kontext "OeffnenDlg"
+ OeffnenDlg.Cancel
+ sleep 1
+ sleep 1
+ Kontext
+ Messagebox.SetPage TabOptionenNumerierung
+ Kontext "TabOptionenNumerierung"
+ sleep 1
+ try
+ Auswahl.TypeKeys "<SPACE>"
+ hMenuSelectNr (2)
+ hMenuSelectNr (3)
+ Sleep 2
+ catch
+ warnlog "couldn't do something :-) (1)"
+ Exceptlog
+ Call hMenuClose
+ endcatch
+ TabOptionenNumerierung.Cancel
+ sleep 1
+ Call hCloseDocument
+endcase
+
+'---------------------------------------------------------------------------------------
+
+testcase tiFormatCaseCharacter
+ Call hNewDocument
+ Call hTextrahmenErstellen ("testit",20,20,50,30)
+ sleep 1
+ hTypeKeys "<left>"
+
+ FormatChangeCaseUpper
+ WaitSlot (1000)
+ FormatChangeCaseLower
+ WaitSlot (2000)
+ if bAsianLan then
+ if not gAsianSup then
+ qaerrorlog "This is an asian language-office, but asian support was disabled in a previous test?"
+ end if
+ try
+ FormatChangeCaseHalfWidth
+ catch
+ Warnlog "Format / Change Case / Half Width does not work."
+ endcatch
+ WaitSlot (1000)
+ try
+ FormatChangeCaseFullWidth
+ catch
+ Warnlog "Format / Change Case / Full Width does not work!"
+ endcatch
+ sleep 1
+ try
+ FormatChangeCaseHiragana
+ catch
+ Warnlog "Format / Change Case / Hiragana does not work."
+ endcatch
+ sleep 1
+ try
+ FormatChangeCaseKatagana
+ catch
+ Warnlog "Format / Change Case / Katagana does not work."
+ endcatch
+ end if
+ Call hCloseDocument
+endcase
+
+'---------------------------------------------------------------------------------------
+
+testcase tiFormatParagraph
+ Call hNewDocument
+ FormatParagraph
+ Kontext
+ Messagebox.SetPage TabEinzuegeUndAbstaende
+ kontext "TabEinzuegeUndAbstaende"
+ Call DialogTest ( TabEinzuegeUndAbstaende )
+ Kontext
+ Messagebox.SetPage TabAusrichtungAbsatz
+ Kontext "TabAusrichtungAbsatz"
+ Call DialogTest ( TabAusrichtungAbsatz )
+ Kontext
+ Messagebox.SetPage TabTabulator
+ kontext "TabTabulator"
+ Call DialogTest ( TabTabulator )
+ TabTabulator.Cancel
+ Call hCloseDocument
+endcase
+
+'---------------------------------------------------------------------------------------
+
+testcase tiFormatPage
+ Call hNewDocument
+ FormatSlideDraw
+ kontext
+ if Messagebox.exists (5) then
+ Messagebox.SetPage TabSeite
+ Kontext "TabSeite"
+ if TabSeite.exists (5) then
+ Call Dialogtest (TabSeite)
+ else
+ warnlog "nope :-(1"
+ endif
+ sleep 1
+ kontext
+ Messagebox.SetPage TabArea
+ sleep 1
+ kontext
+ if messagebox.GetRT = 304 then
+ printlog "active about pagesize != printersettings, will say NO: " + Messagebox.GetText
+ try
+ Messagebox.No
+ catch
+ warnlog messagebox.getText
+ Messagebox.ok ' should be Error loading BASIC of document ##?
+ kontext
+ if messagebox.GetRT = 304 then
+ try
+ warnlog messagebox.getText
+ Messagebox.ok
+ catch
+ printlog "not expected state."
+ endcatch
+ endif
+ endcatch
+ endif
+ sleep 1
+ kontext
+ Messagebox.SetPage TabArea
+ Kontext "TabArea"
+ if TabArea.exists (5) then
+ Call Dialogtest (TabArea)
+ endif
+ sleep 1
+ TabArea.Cancel
+ else
+ warnlog "FormatPage doesn't come up with dialog :-("
+ endif
+ Call hCloseDocument
+endcase
+
+'---------------------------------------------------------------------------------------
+
+testcase tiFormatStylesAndFormatting
+ Dim sTemp as String
+ dim sSettings(20,3) ' Control_name; control_type; value
+ dim i as integer
+ dim abctemp
+
+ Call hNewDocument
+ sleep 5
+
+ hTextrahmenErstellen ("I love Wednesdays...",20,20,80,40)
+ sleep 1
+ printlog "Checking if TextObjectBar is up"
+ Kontext "TextObjectbar"
+ if TextObjectbar.Exists Then
+ printlog "TextObjectbar.Exists = " + TextObjectbar.Exists
+ else
+ ViewToolbarsTextFormatting
+ endif
+ FormatStylist
+ WaitSlot (1000)
+ Kontext "Stylist"
+ if (Stylist.NotExists) then
+ qaErrorLog "There is no stylist open, trying again now"
+ FormatStylist
+ end if
+ WaitSlot (1000)
+ Vorlagenliste.TypeKeys "<End>"
+ Vorlagenliste.TypeKeys "<Up>"
+ Vorlagenliste.TypeKeys "<Up>"
+ sleep 1
+ Vorlagenliste.OpenContextMenu
+ sleep 1
+ hMenuSelectNr (1)
+ sleep 1
+
+ Kontext
+ if Messagebox.exists (5) then
+ try
+ Messagebox.SetPage TabVerwalten
+ Kontext "TabVerwalten"
+ TabVerwalten.TypeKeys "<TAB>"
+ VorlagenName.setText("1Test")
+ sTemp = VorlagenName.getText
+ VerknuepftMit.getSelText
+ Bereich.getSelText
+ TabVerwalten.OK
+ catch
+ warnlog "Under Gnome we have a focus problem here."
+ endcatch
+ end if
+ sleep 1
+ Kontext "Stylist"
+ Vorlagenliste.TypeKeys "<Home>" 'to go to the style we've created ourselves.
+ sleep 1
+ Vorlagenliste.OpenContextMenu
+ sleep 1
+ hMenuSelectNr (2) 'modify...
+ sleep 1
+ Kontext
+ if Messagebox.exists (5) then
+ try
+ Messagebox.SetPage TabVerwalten
+ Kontext "TabVerwalten"
+ VorlagenName.setText("2Test")
+ TabVerwalten.OK
+ catch
+ warnlog "Under Gnome we have a focus problem here."
+ endcatch
+ end if
+
+ sleep 3
+ Kontext "Stylist"
+ Vorlagenliste.TypeKeys "<Home>" 'to go to the style we've created ourselves.
+ sleep 1
+ try
+ Vorlagenliste.TypeKeys "<Delete>" 'To delete the style.
+ Kontext "Active" 'do you really wish to delete?
+ Active.YES
+ sleep 2
+ catch
+ Warnlog "Couldnt delete the new Style, or maybe wrong position?"
+ endcatch
+ Kontext "Stylist"
+ if (Stylist.NotExists) then
+ ErrorLog "There was no Stylist open, should be."
+ else
+ if lcase(gPlatform) = "osx" then
+ hTypekeys "<mod1 t>"
+ else
+ hTypekeys "<F11>"
+ endif
+ Kontext "Stylist"
+ if (Stylist.Exists) then
+ ErrorLog "The Stylist should be closed now."
+ endif
+ endif
+ Call hCloseDocument
+endcase
+
+'---------------------------------------------------------------------------------------
+
+testcase tiFormatFontwork
+ Call hNewDocument
+ Call hTextrahmenErstellen ("Flightplanning via www.aua.com is hard!",20,20,50,30)
+ sleep 1
+ FormatFontwork
+ Kontext "FontWork"
+ if FontWork.exists (5) then
+ DialogTest ( FontWork )
+ sleep 1
+ FontWork.Close
+ else
+ warnlog "FontWork didn't came up :-("
+ endif
+ Call hCloseDocument
+endcase
+
+'---------------------------------------------------------------------------------------
+
+testcase tiFormatGroup
+ Call hNewDocument
+ hRechteckErstellen ( 10, 10, 20, 20 )
+ hRechteckErstellen ( 30, 30, 40, 40 )
+ EditSelectAll
+ FormatGroupDraw
+ WaitSlot (1000)
+ FormatEditGroupDraw
+ WaitSlot (1000)
+ FormatExitGroupDraw
+ WaitSlot (1000)
+ FormatUngroupDraw
+ WaitSlot (1000)
+ Call hCloseDocument
+endcase
+
+'---------------------------------------------------------------------------------------
+
+testcase tiFormatStylesSlideDesign
+ ' create recktanglr; click outside ?
+ Call hNewDocument
+ WaitSlot (3000)
+ FormatModifyLayout ' is OK : Format->Styles->Slide Design; 27064; SID_PRESENTATION_LAYOUT
+ WaitSlot (1000)
+ Kontext "Seitenvorlage"
+ Call DialogTest ( Seitenvorlage )
+ HintergrundseiteAustauschen.check
+ DeleteUnusedBackgrounds.check
+ Laden.Click
+ kontext "Neu"
+ Zusaetze.click
+ sleep 1
+ kontext "Neu"
+ try
+ Vorschau.check
+ catch
+ printlog "Preview wasn't checkable :-( hopfully now:"
+ Zusaetze.click
+ sleep 1
+ Vorschau.check
+ printlog "... OK :-)"
+ endcatch
+ Neu.cancel
+ Kontext "Seitenvorlage"
+ Seitenvorlage.Cancel
+ sleep 2
+ Call hCloseDocument
+endcase
+
+'---------------------------------------------------------------------------------------
diff --git a/testautomation/graphics/optional/includes/global/id_006.inc b/testautomation/graphics/optional/includes/global/id_006.inc
new file mode 100644
index 000000000000..bcbfa3d7c24b
--- /dev/null
+++ b/testautomation/graphics/optional/includes/global/id_006.inc
@@ -0,0 +1,362 @@
+'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
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* Owner : wolfram.garten@oracle.com
+'*
+'* short description :
+'*
+'***********************************************************************************
+' #1 tiToolsSpellchecking
+' #1 tiToolsSpellcheckingAutomatic
+' #1 tiToolsThesaurus
+' #1 tiToolsHyphenation
+' #1 tiToolsAutoCorrect
+' #1 tChineseTranslation
+' #1 tiToolsMacro
+' #1 tiToolsGallery
+' #1 tiToolsEyedropper
+' #1 tiToolsOptions
+'\**********************************************************************************
+
+
+testcase tiToolsSpellchecking
+
+ if not gOOO then ' Spellcheck doesn't work in OOo builds.
+ Call hNewDocument
+ WaitSlot (2000) 'sleep 2
+ call hSetSpellHypLanguage
+ Call hTextrahmenErstellen ("Whaaaat", 10, 10, 30, 40)
+ sleep 1
+ ToolsSpellCheck
+ WaitSlot (1000) 'sleep 1
+ Kontext "MessageBox"
+ if MessageBox.exists(2) then
+ qaerrorlog "Messagebox : " + MessageBox.gettext() + " appear."
+ qaerrorlog "Maybe no spellchecking for this languages is available."
+ MessageBox.OK
+ else
+ Kontext "Rechtschreibung"
+ if Rechtschreibung.exists then
+ Call DialogTest ( Rechtschreibung )
+ Rechtschreibung.Close
+ else
+ warnlog " Spellcheck dialog didn't came up :-("
+ end if
+ end if
+ sleep 1
+ Kontext "Messagebox"
+ if Messagebox.exists (5) then
+ warnlog "Shouldn't be any messagebox after pressing close in spellchecker"
+ Messagebox.OK
+ sleep (2)
+ Kontext
+ end if
+ Call hCloseDocument
+ else goto endsub
+ endif
+endcase
+
+'--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+
+testcase tiToolsSpellcheckingAutomatic
+ Call hNewDocument
+ ToolsSpellcheckAutoSpellcheck
+ Call hTextrahmenErstellen ("What", 10, 10, 30, 40)
+ sleep 2
+ ToolsSpellcheckAutoSpellcheck
+ Call hCloseDocument
+endcase
+
+'--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+
+testcase tiToolsThesaurus
+ if not gOOO then ' Thesaurus doesn't work in OOo builds.
+
+ dim sFileName as String
+
+ call hSetSpellHypLanguage
+ if (gApplication = "IMPRESS") then
+ sFileName = (ConvertPath (gTesttoolPath + "graphics\required\input\engtext.odp"))
+ else
+ sFileName = (ConvertPath (gTesttoolPath + "graphics\required\input\engtext.odg"))
+ end if
+ if FileExists ( sFileName ) = FALSE then
+ warnlog "The language-file was not found or accessible! The test ends."
+ goto endsub
+ end if
+ Call hFileOpen (sFileName)
+ sleep (2)
+
+ hTypeKeys "<TAB><RETURN>"
+ hTypeKeys "<END><SHIFT HOME>"
+
+ ' Call hTextrahmenErstellen ("SimpleTest" + "<Mod1 Shift left>", 10, 10, 30, 40)
+ try
+ ExtrasThesaurusDraw
+ Kontext "Thesaurus"
+ Call DialogTest ( Thesaurus )
+ Sprache.Click
+ Kontext "SpracheAuswaehlen"
+ Call DialogTest ( SpracheAuswaehlen )
+ SpracheAuswaehlen.cancel
+ Kontext "Thesaurus"
+ Nachschlagen.Click
+ kontext
+ if Messagebox.exists (5) then
+ printlog "Messagebox: word not in thesaurus: '"+Messagebox.gettext+"'"
+ Messagebox.ok
+ end if
+ sleep 1
+ Kontext "Thesaurus"
+ Thesaurus.Cancel
+ catch
+ warnlog "Thesaurus didn't work :-("
+ endcatch
+ sleep 1
+ Call hCloseDocument
+ else goto endsub
+ endif
+endcase
+
+'--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+
+testcase tiToolsHyphenation
+ Call hNewDocument
+ ToolsLanguageHyphenationDraw
+ WaitSlot (2000) 'sleep 2
+ ToolsLanguageHyphenationDraw
+ Call hCloseDocument
+endcase
+
+testcase tiToolsAutoCorrect
+ dim iLanguage as integer ' for resetting the language
+ Call hNewDocument
+ WaitSlot (1000) 'sleep 1
+ ToolsAutocorrect
+ WaitSlot (2000) 'sleep 1
+ Kontext
+ Messagebox.SetPage TabErsetzung
+ Kontext "TabErsetzung"
+ Call DialogTest ( TabErsetzung )
+ iLanguage = WelcheSprache.GetSelIndex
+ WelcheSprache.Select 1 ' select language with empty list
+ Kuerzel.SetText "a"
+ ErsetzenDurch.SetText "b"
+ Neu.Click
+ sleep 1
+ Loeschen.Click
+ sleep 1
+ try
+ Loeschen.Click
+ catch
+ printlog "ok was CRASH before" '#
+ endcatch
+ WelcheSprache.select (iLanguage)
+ Kontext
+ Messagebox.SetPage TabAusnahmen
+ Kontext "TabAusnahmen"
+ Call DialogTest ( TabAusnahmen )
+ Abkuerzungen.settext "Lala"
+ AbkuerzungenNeu.click
+ AbkuerzungenLoeschen.click
+ Woerter.settext "LALA"
+ WoerterAutomatisch.Check
+ WoerterNeu.click
+ WoerterLoeschen.click
+ WoerterAutomatisch.UnCheck
+ Kontext
+ Messagebox.SetPage TabOptionen
+ Kontext "TabOptionen"
+ Call DialogTest ( TabOptionen )
+ Kontext
+ Messagebox.SetPage TabLocalizedOptions
+ Kontext "TabLocalizedOptions" ' 1a
+ SingleQuotesReplace.Check
+ SingleQuotesStart.Click
+ Kontext "Sonderzeichen"
+ Call DialogTest ( Sonderzeichen, 1 )
+ Sonderzeichen.Cancel
+ Kontext "TabLocalizedOptions" ' 1b
+ SingleQuotesEnd.Click
+ Kontext "Sonderzeichen"
+ Call DialogTest ( Sonderzeichen, 2 )
+ Sonderzeichen.Cancel
+ Kontext "TabLocalizedOptions" ' 1s
+ SingleQuotesDefault.Click
+
+ Kontext "TabLocalizedOptions" ' 2a
+ DoubleQuotesStart.Click
+ Kontext "Sonderzeichen"
+ Call DialogTest ( Sonderzeichen, 3 )
+ Sonderzeichen.Cancel
+ Kontext "TabLocalizedOptions" ' 2b
+ DoubleQuotesEnd.Click
+ Kontext "Sonderzeichen"
+ Call DialogTest ( Sonderzeichen, 4 )
+ Sonderzeichen.Cancel
+ Kontext "TabLocalizedOptions" ' 2s
+ DoubleQuotesDefault.Click
+ SingleQuotesReplace.UnCheck
+ TabLocalizedOptions.cancel
+ Call hCloseDocument
+endcase
+
+'--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+
+testcase tChineseTranslation
+
+ qaerrorlog( "#i89634# - Chinese Translation dialog does not close" )
+ goto endsub
+
+ dim sFileName as string
+ dim bSavedAsianSupport as boolean
+
+ if uCase(gApplication) = "IMPRESS" then
+ sFileName = "graphics\required\input\tchinese.odp"
+ else
+ sFileName = "graphics\required\input\tchinese.odg"
+ end if
+
+ Call hNewDocument
+ WaitSlot (2000) 'sleep 1
+ bSavedAsianSupport = ActiveDeactivateAsianSupport(TRUE)
+ Call hFileOpen ( ConvertPath(gTesttoolPath + sFileName) )
+ sleep (2)
+ Kontext "Standardbar"
+ if Bearbeiten.GetState(2) <> 1 then
+ Bearbeiten.Click '0 = not pressed. 1 = pressed.
+ Kontext
+ if Active.Exists(1) then
+ Active.Yes
+ else
+ warnlog "No messagebox after making document editable? - Test canceled here"
+ goto endsub
+ end if
+ end if
+ if uCase(gApplication) = "IMPRESS" then
+ Kontext "DocumentImpress"
+ else
+ Kontext "DocumentDraw"
+ end if
+ EditSelectAll
+ hTypeKeys "<RETURN>"
+ hTypeKeys "<MOD1 HOME><RIGHT><RIGHT><SHIFT RIGHT RIGHT>"
+ ToolsChineseTranslation
+ WaitSlot (2000) 'sleep 1
+ kontext "ChineseTranslation"
+ Call DialogTest ( ChineseTranslation )
+ EditTerms.Click
+ kontext "ChineseDictionary"
+ Call DialogTest ( ChineseDictionary )
+ ChineseDictionary.Ok
+ kontext "ChineseTranslation"
+ ChineseTranslation.OK
+ kontext
+ if Messagebox.exists (5) then
+ printlog "Messagebox: "+Messagebox.gettext+"'"
+ Messagebox.ok
+ end if
+ ActiveDeactivateAsianSupport(bSavedAsianSupport)
+ Call hCloseDocument
+endcase
+
+'--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+
+testcase tiToolsMacro
+ Call hNewDocument
+ WaitSlot (2000) 'sleep 2
+ ToolsMacro
+ Kontext "Makro"
+ Call DialogTest ( Makro )
+ Verwalten.Click
+
+ Kontext
+ Messagebox.SetPage TabModule
+ Kontext "TabModule"
+ Call DialogTest ( TabModule )
+
+ Kontext
+ Messagebox.SetPage TabBibliotheken
+ Kontext "TabBibliotheken"
+ Call DialogTest ( TabBibliotheken )
+ Hinzufuegen.Click
+ Kontext "Messagebox"
+ if Messagebox.Exists (5) then
+ if Messagebox.GetRT = 304 then
+ Warnlog Messagebox.Gettext
+ Messagebox.Ok
+ end if
+ end if
+ Kontext "OeffnenDlg"
+ OeffnenDlg.Cancel
+ Kontext "TabBibliotheken"
+ Neu.Click
+ kontext "NeueBibliothek"
+ sleep 1 'Bibliotheksname
+ NeueBibliothek.cancel
+ Kontext "TabBibliotheken"
+ TabBibliotheken.Close
+
+ Kontext "Makro"
+ Makro.Cancel
+ Call hCloseDocument
+endcase
+
+'--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+
+testcase tiToolsGallery
+ Call hNewDocument
+ ToolsGallery
+ WaitSlot (2000) 'sleep 1
+ ToolsGallery
+ Call hCloseDocument
+endcase
+
+'--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+
+testcase tiToolsEyedropper
+ Call hNewDocument
+ ToolsEyedropper
+ Kontext "Pipette"
+ Call DialogTest (Pipette)
+ Pipette.Close
+ sleep 1
+ Call hCloseDocument
+endcase
+
+'--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+
+testcase tiToolsOptions
+ Call hNewDocument
+ ToolsOptions
+ WaitSlot (2000) 'sleep 1
+ kontext "OptionenDlg"
+ OptionenDlg.Close
+ Call hCloseDocument
+endcase
+
+'--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
diff --git a/testautomation/graphics/optional/includes/global/id_007.inc b/testautomation/graphics/optional/includes/global/id_007.inc
new file mode 100644
index 000000000000..bbc870953f3a
--- /dev/null
+++ b/testautomation/graphics/optional/includes/global/id_007.inc
@@ -0,0 +1,426 @@
+'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
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* Owner : wolfram.garten@oracle.com
+'*
+'* short description :
+'*
+'***********************************************************************************
+' #1 tdModifyFlipVertikal
+' #1 tdModifyFlipHorizontal
+' #1 tdContextConvertIntoCurve
+' #1 tdContextConvertIntoPolygon
+' #1 tdContextConvertIntoContour
+' #1 tdContextConvertInto3D
+' #1 tdContextConvertIntoRotationObject
+' #1 tdContextConvertIntoBitmap
+' #1 tdContextConvertIntoMetaFile
+' #1 tdModifyArrange
+' #1 tdModifyArrangeObjects
+' #1 tdModifyAlignment
+' #1 tdContextDistribution
+' #1 tdContextDescriptionObject
+' #1 tdContextNameObject
+' #1 tdModifyConnectBreak
+' #1 tdModifyShapes
+' #1 tdModifyCombineSplit
+'\**********************************************************************************
+
+testcase tdModifyFlipVertikal
+
+ Call hNewDocument ' imp: contextmenue same SID!
+ sleep 1
+ Call hRechteckErstellen ( 10, 10, 20, 40 )
+ try
+ ContextFlipVerticalDraw
+ Printlog "- Flip-vertical is working"
+ catch
+ Warnlog "- Flip-Vertical does not work"
+ endcatch
+ sleep 1
+ Call hCloseDocument
+endcase
+
+'------------------------------------------------------------------------------------------------------------------------------------------------
+
+testcase tdModifyFlipHorizontal
+ Call hNewDocument ' imp: contextmenue same SID!
+ WaitSlot (1000)
+ Call hRechteckErstellen ( 10, 10, 20, 40 )
+ try
+ ContextFlipHorizontalDraw
+ Printlog "- Flip-horizontal is working"
+ catch
+ Warnlog "- Flip-horizontal does not work"
+ endcatch
+ sleep 1
+ Call hCloseDocument
+endcase
+
+'------------------------------------------------------------------------------------------------------------------------------------------------
+
+testcase tdContextConvertIntoCurve
+ Call hNewDocument
+ Call hRechteckErstellen ( 10, 10, 20, 40 )
+ ContextConvertIntoCurve
+ WaitSlot (2000)
+ Call hCloseDocument
+endcase
+
+'------------------------------------------------------------------------------------------------------------------------------------------------
+
+testcase tdContextConvertIntoPolygon
+ dim iWaitIndex as integer
+ Call hNewDocument ' imp: contextmenue same SID!
+ InsertGraphicsFromFile
+ Kontext "GrafikEinfuegenDlg"
+ iWaitIndex = 0
+ do while NOT GrafikEinfuegenDlg.Exists AND iWaitIndex < 10
+ sleep(1)
+ iWaitIndex = iWaitIndex + 1
+ loop
+ if NOT GrafikEinfuegenDlg.Exists AND iWaitIndex = 10 then
+ warnlog "Dialogue Insert Graphics didnt work. Ending testcase."
+ Call hCloseDocument
+ goto endsub
+ end if
+ Dateiname.SetText ConvertPath (gTesttoolPath + "global\input\graf_inp\enter.bmp")
+ Oeffnen.Click
+ sleep 3
+ ContextConvertIntoPolygon
+ Kontext "InPolygonUmwandeln"
+ Call DialogTest (InPolygonUmwandeln)
+ LoecherFuellen.Check
+ Farbanzahl.More
+ Punktreduktion.More
+ Kachelgroesse.More
+ Vorschau.Click
+ sleep 10
+ InPolygonUmwandeln.Cancel
+ sleep (2)
+ Call hCloseDocument
+endcase
+
+'------------------------------------------------------------------------------------------------------------------------------------------------
+
+testcase tdContextConvertIntoContour
+ Call hNewDocument
+ Call hRechteckErstellen ( 10, 10, 20, 40 )
+ ContextConvertIntoContour
+ WaitSlot (1000)
+ Call hCloseDocument
+endcase
+
+'------------------------------------------------------------------------------------------------------------------------------------------------
+
+testcase tdContextConvertInto3D
+ Call hNewDocument
+ Call hRechteckErstellen ( 10, 10, 20, 40 )
+ ContextConvertInto3D
+ WaitSlot (1000)
+ Call hCloseDocument
+endcase
+
+'------------------------------------------------------------------------------------------------------------------------------------------------
+
+testcase tdContextConvertIntoRotationObject
+ Call hNewDocument
+ WaitSlot (1000)
+ Call hRechteckErstellen (20,20,50,50)
+ sleep 2
+ ContextConvertInto3DRotationObject
+ WaitSlot (1000)
+ Call hCloseDocument
+endcase
+
+'------------------------------------------------------------------------------------------------------------------------------------------------
+
+testcase tdContextConvertIntoBitmap
+ Call hNewDocument
+ WaitSlot (3000)
+ InsertGraphicsFromFile
+ WaitSlot (3000)
+ Kontext "GrafikEinfuegenDlg"
+ sleep 2
+ Dateiname.SetText ConvertPath (gTesttoolPath + "global\input\graf_inp\columbia.dxf")
+ sleep 2
+ Oeffnen.Click
+ sleep 2
+ try
+ ContextConvertIntoBitmap
+ Printlog "- Convert into bitmap is working"
+ catch
+ Warnlog "- Convert into bitmap does not work"
+ endcatch
+ Call hCloseDocument
+endcase
+
+'------------------------------------------------------------------------------------------------------------------------------------------------
+
+testcase tdContextConvertIntoMetaFile
+ Call hNewDocument
+ WaitSlot (3000)
+ InsertGraphicsFromFile
+ WaitSlot (1000)
+ kontext "Messagebox"
+ if Messagebox.Exists (5) Then Messagebox.OK
+ sleep 1
+ Kontext "GrafikEinfuegenDlg"
+ sleep 2
+ Dateiname.SetText ConvertPath (gTesttoolPath + "global\input\graf_inp\desp.bmp")
+ sleep 2
+ Preview.Click
+ sleep 3
+ Oeffnen.Click
+ sleep 5
+ try
+ ContextConvertIntoMetafile
+ Printlog "- convert into meta file does work"
+ catch
+ Warnlog "- convert into meta file does not work"
+ endcatch
+ Call hCloseDocument
+endcase
+
+'------------------------------------------------------------------------------------------------------------------------------------------------
+
+testcase tdModifyArrange
+ Call hNewDocument
+ Call hRechteckErstellen ( 10, 10, 20, 40 )
+ hTypeKeys("<escape>")
+ Call hRechteckErstellen ( 30, 30, 50, 60 )
+ FormatArrangeBringToFront
+ WaitSlot (1000)
+ ContextArrangeBringForward
+ WaitSlot (1000)
+ ContextArrangeBringBackward
+ WaitSlot (1000)
+ FormatArrangeSendToBack
+ WaitSlot (1000)
+ EditSelectAll
+ ContextArrangeReverse
+ WaitSlot (1000)
+ Call hCloseDocument
+endcase
+
+'------------------------------------------------------------------------------------------------------------------------------------------------
+
+testcase tdModifyArrangeObjects
+ Call hNewDocument
+ WaitSlot (1000)
+ Call hRechteckErstellen ( 20, 20, 30, 50 )
+ hTypeKeys("<escape>")
+ Call hRechteckErstellen ( 30,30,50,50 )
+ ContextArrangeInFrontOfObject
+ gMouseClick 11,11
+ ContextArrangeBehindObject
+ gMouseClick 45,45
+ sleep 1
+ Call hCloseDocument
+endcase
+
+'------------------------------------------------------------------------------------------------------------------------------------------------
+
+testcase tdModifyAlignment
+ Call hNewDocument
+ WaitSlot (1000)
+ Call hRechteckErstellen ( 20, 20, 30, 50 )
+ ContextAlignmentLeft
+ WaitSlot (1000)
+ ContextAlignmentCentered
+ WaitSlot (1000)
+ ContextAlignmentRight
+ WaitSlot (1000)
+ ContextAlignmentTop
+ WaitSlot (1000)
+ ContextAlignmentBottom
+ WaitSlot (1000)
+ ContextAlignmentCenter
+ WaitSlot (1000)
+ Call hCloseDocument
+endcase
+
+'------------------------------------------------------------------------------------------------------------------------------------------------
+
+testcase tdContextDistribution
+ Call hNewDocument
+ WaitSlot (3000)
+ Call hRechteckErstellen (20,20,30,30)
+ Call hRechteckErstellen (40,40,50,50)
+ Call hRechteckErstellen (60,60,70,70)
+ sleep 1
+ EditSelectAll
+ sleep 1
+ ContextDistribution
+ Kontext "VerteilenDlg"
+ sleep 1
+ Call DialogTest (VerteilenDlg)
+ sleep 1
+ Links.Check
+ MitteHorizontal.Check
+ AbstandHorizontal.Check
+ Rechts.Check
+ KeineHorizontal.Check
+ Oben.Check
+ MitteVertikal.Check
+ AbstandVertikal.Check
+ Unten.Check
+ KeineVertikal.Check
+ VerteilenDlg.Cancel
+ sleep 2
+ Call hCloseDocument
+endcase
+
+'------------------------------------------------------------------------------------------------------------------------------------------------
+
+testcase tdContextDescriptionObject
+ Call hNewDocument
+ WaitSlot (1000)
+ Call hRechteckErstellen ( 10, 10, 20, 40 )
+ ContextDescriptionObject
+ Kontext "DescriptionObject"
+ Call DialogTest (DescriptionObject)
+ DescriptionObject.Cancel
+ Call hCloseDocument
+endcase
+
+'------------------------------------------------------------------------------------------------------------------------------------------------
+
+testcase tdContextNameObject
+ Call hNewDocument
+ WaitSlot (1000)
+ Call hRechteckErstellen ( 20, 20, 30, 50 )
+ hTypeKeys("<escape>")
+ Call hRechteckErstellen ( 30, 40, 50, 60 )
+ sleep 1
+ gMouseMove 1,1,95,95
+ sleep 1
+ FormatGroupGroup
+ WaitSlot (1000)
+ ContextNameObject
+ Kontext "NameDlgObject"
+ Call DialogTest (NameDlgObject)
+ NameDlgObject.Cancel
+ FormatUngroupDraw
+ Call hCloseDocument
+endcase
+
+'------------------------------------------------------------------------------------------------------------------------------------------------
+
+testcase tdModifyConnectBreak
+ Call hNewDocument
+ sleep 1
+ Call hRechteckErstellen (10,10,30,30)
+ Call hRechteckErstellen (35,35,50,50)
+ sleep 1
+ EditSelectAll
+ ContextConnect
+ sleep 1
+ try
+ ContextBreak
+ catch
+ Warnlog "- Modify-Break does not work"
+ endcatch
+ sleep 1
+ Call hCloseDocument
+endcase
+
+'------------------------------------------------------------------------------------------------------------------------------------------------
+
+testcase tdModifyShapes
+ Call hNewDocument
+ sleep 1
+ gMouseClick 50,50
+ Call hRechteckErstellen (30,30,50,50)
+ Call hRechteckErstellen (60,60,80,80)
+ sleep 1
+ EditSelectAll
+ sleep 1
+ try
+ ModifyShapesMerge ' 1
+ WaitSlot (1000) 'sleep 1
+ Printlog "- Modify-Shape merge is working"
+ catch
+ Warnlog "- Modify-shape merge is not working"
+ endcatch
+ EditSelectAll
+ sleep 1
+ hTypeKeys "<DELETE>"
+ sleep 1
+ Call hRechteckErstellen (30,30,50,50)
+ Call hRechteckErstellen (60,60,80,80)
+ sleep 1
+ EditSelectAll
+ sleep 1
+ try
+ ModifyShapesSubstract ' 2
+ Printlog "- Modify-shape-substract is working"
+ catch
+ Warnlog "- Modify-shape substract is not working"
+ endcatch
+ sleep 1
+ EditSelectAll
+ sleep 1
+ hTypeKeys "<DELETE>"
+ sleep 1
+ Call hRechteckErstellen (30,30,50,50)
+ sleep 1
+ Call hRechteckErstellen (60,60,80,80)
+ sleep 1
+ EditSelectall
+ sleep 1
+ try
+ ModifyShapesIntersect ' 3
+ Printlog "- Modify-shape intersect is working"
+ catch
+ Warnlog "- Modify-Shape intersect is not working"
+ endcatch
+ Call hCloseDocument
+endcase
+
+'------------------------------------------------------------------------------------------------------------------------------------------------
+
+testcase tdModifyCombineSplit
+ Call hNewDocument
+ sleep 1
+ Call hRechteckErstellen (30,30,50,50)
+ Call hRechteckErstellen (60,60,80,80)
+ sleep 1
+ EditSelectAll
+ sleep 1
+ try
+ ContextCombine
+ Printlog "- Modify combine is working"
+ ContextSplit
+ Printlog "- Modify-split is working"
+ catch
+ Warnlog "- Modify-combine and split are not working"
+ endcatch
+ Call hCloseDocument
+endcase
+
+'------------------------------------------------------------------------------------------------------------------------------------------------
diff --git a/testautomation/graphics/optional/includes/global/id_008.inc b/testautomation/graphics/optional/includes/global/id_008.inc
new file mode 100644
index 000000000000..654cae0f00df
--- /dev/null
+++ b/testautomation/graphics/optional/includes/global/id_008.inc
@@ -0,0 +1,71 @@
+'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
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* Owner : wolfram.garten@oracle.com
+'*
+'* short description :
+'*
+'******************************************************************
+' #1 tiWindowNewWindow
+' #1 tidWindow123 'wrn:2
+'\*****************************************************************
+
+testcase tiWindowNewWindow
+
+ Call hNewDocument
+ Call hRechteckErstellen ( 10, 10, 20, 40 )
+ WindowNewWindow
+ WaitSlot (2000)
+ Call hCloseDocument
+endcase
+
+testcase tidWindow123
+ goto endsub '' testing TBO: 29.03.2002
+ dim iMenues as integer
+ Call hNewDocument
+ Call hRechteckErstellen ( 10, 10, 20, 40 )
+
+ Kontext "DocumentImpress"
+ DocumentImpress.UseMenu
+ iMenues = MenuGetItemCount
+ warnlog "---- Number of Main menus: " & iMenues
+ MenuSelect(Menugetitemid(8))
+ sleep 1
+ iMenues = MenuGetItemCount
+ printlog "---- Number of Main menus: " & iMenues
+ ' MenuSelect(Menugetitemid(14))
+ sleep 1
+ i=1
+ printlog "count: " + i + "; of submenu: " + MenuGetItemCount + "; SID: " + MenuGetItemId (i) + "; Text: " + MenuGetItemText (Menugetitemid(i)) + "; Command: " + MenuGetItemCommand(Menugetitemid(i)) + "; Seperator?: " + MenuIsSeperator(i) + "; Enabled: " + MenuIsItemEnabled(Menugetitemid(i)) + "; Checked: " + MenuIsItemChecked(Menugetitemid(i)) + ";"
+ i=2
+ printlog "count: " + i + "; of submenu: " + MenuGetItemCount + "; SID: " + MenuGetItemId (i) + "; Text: " + MenuGetItemText (Menugetitemid(i)) + "; Command: " + MenuGetItemCommand(Menugetitemid(i)) + "; Seperator?: " + MenuIsSeperator(i) + "; Enabled: " + MenuIsItemEnabled(Menugetitemid(i)) + "; Checked: " + MenuIsItemChecked(Menugetitemid(i)) + ";"
+ warnlog "Dynamic entries not accessible ? :-((((("
+ ' i=3
+ ' printlog "count: " + i + "; of submenue: " + MenuGetItemCount + "; SID: " + MenuGetItemId (i) + "; Text: " + MenuGetItemText (Menugetitemid(i)) + "; Command: " + MenuGetItemCommand(Menugetitemid(i)) + "; Seperator?: " + MenuIsSeperator(i) + "; Enabled: " + MenuIsItemEnabled(Menugetitemid(i)) + "; Checked: " + MenuIsItemChecked(Menugetitemid(i)) + ";"
+ Call hCloseDocument
+endcase
+
diff --git a/testautomation/graphics/optional/includes/global/id_009.inc b/testautomation/graphics/optional/includes/global/id_009.inc
new file mode 100644
index 000000000000..7096a1a860a9
--- /dev/null
+++ b/testautomation/graphics/optional/includes/global/id_009.inc
@@ -0,0 +1,243 @@
+'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
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* Owner : wolfram.garten@oracle.com
+'*
+'* short description : Testcases to test the Help-Menu.
+'*
+'***********************************************************************************
+' #1 tmHelpHelpAgent
+' #1 tmHelpTips
+' #1 tmHelpExtendedTips
+' #1 tmHelpAboutStarOffice
+' #1 tmHelpContents
+' #1 tCheckIfTheHelpExists
+'\**********************************************************************************
+'
+testcase tmHelpHelpAgent
+
+ Call hNewDocument
+
+ hTBOtypeInDoc
+
+ HelpHelpAgent ' it's just a switch
+ sleep 2
+ HelpHelpAgent
+
+ Call hCloseDocument
+endcase
+
+'...---....---.-.-.-.-.....---......--.-.-.-.....----..-........................---.......
+
+testcase tmHelpTips
+ Call hNewDocument
+ hTBOtypeInDoc
+
+ HelpTips
+ Sleep 2
+ HelpTips
+
+ Call hCloseDocument
+endcase
+
+'...---....---.-.-.-.-.....---......--.-.-.-.....----..-........................---.......
+
+testcase tmHelpExtendedTips
+ Call hNewDocument
+ hTBOtypeInDoc
+
+ HelpEntendedHelp
+ Sleep (2)
+ HelpEntendedHelp
+
+ Call hCloseDocument
+endcase
+
+'...---....---.-.-.-.-.....---......--.-.-.-.....----..-........................---.......
+
+testcase tmHelpAboutStarOffice
+ Call hNewDocument
+ hTBOtypeInDoc
+
+ HelpAboutStarOffice
+ Kontext "UeberStarMath"
+ DialogTest (UeberStarMath)
+ UeberStarMath.OK
+
+ Call hCloseDocument
+endcase
+
+'...---....---.-.-.-.-.....---......--.-.-.-.....----..-........................---.......
+
+testcase tmHelpContents
+ goto endsub '"#i84486# - tmHelpContents outcommented due to crash."
+ dim i as integer
+
+ Call hNewDocument
+ HelpContents
+ sleep(8)
+ kontext "StarOfficeHelp"
+ if Not StarOfficeHelp.Exists then
+ Warnlog "Help is not up!"
+ else
+ Printlog "HelpAbout: '" + HelpAbout.GetItemCount +"'"
+ '################ left half ################
+ TabControl.SetPage ContentPage
+ Printlog "SearchContent: '" + SearchContent.GetItemCount + "'"
+ TabControl.SetPage IndexPage
+ Printlog "SearchIndex: '" + SearchIndex.GetItemCount + "'"
+ sleep 5
+ DisplayIndex.Click
+ sleep 5
+ TabControl.SetPage FindPage
+ Printlog "SearchFind: '" + SearchFind.GetItemCount + "'"
+ if SearchFind.GetSelText = "" then
+ if FindButton.IsEnabled then
+ warnlog " The Find-Button should have been inactive, but was active."
+ endif
+ else
+ warnlog " The Search-Text-Field shouldn't contain any text. But contained: " + SearchFind.GetSelText
+ endif
+ SearchFind.SetText "Doobbidedooo"
+ FindButton.Click
+ kontext
+ if (active.exists (2) )then
+ Printlog "active came up: '" + active.gettext + "'"
+ active.ok
+ endif
+ kontext "StarOfficeHelp"
+ FindFullWords.Check
+ FindInHeadingsOnly.Check
+ Printlog "Result: '" + Result.GetItemCount + "'"
+ DisplayFind.Click
+ TabControl.SetPage BookmarksPage
+ Printlog "Bookmarks: '" + Bookmarks.GetItemCount + "'"
+ DisplayBookmarks.Click
+ '################ right half ################
+ '################ toolbar ################
+ Kontext "TB_Help"
+ Index.Click
+ sleep 1
+ Index.Click
+ sleep 1
+ GoToStart.Click
+ sleep 1
+ Backward.Click
+ sleep 1
+ Forward.Click
+ sleep 1
+ PrintButton.Click
+ sleep (1)
+
+ kontext "Active"
+ if Active.Exists( 2 ) then
+ qaerrorlog "No default printer defined: " & Active.GetText
+ Active.Ok
+ end if
+
+ kontext "Printing"
+ if Printing.Exists( 2 ) then
+ Printing.cancel
+ else
+ warnlog "the Print-Dialogue didnt appear."
+ end if
+ Kontext "TB_Help"
+ sleep 1
+ SetBookmarks.Click
+ sleep 1
+ Kontext "AddBookmark"
+ Printlog "Bookmarkname: '" + Bookmarkname.GetText + "'"
+ AddBookmark.Cancel
+ sleep 1
+ '################ help display ################
+ kontext "HelpContent"
+ HelpContent.OpenContextMenu
+
+ sleep 1
+ Printlog " i: " + hMenuItemGetCount
+ hMenuClose()
+ '################ right scroolbar ################
+ kontext "HelpContent"
+ if HelpContentUP.IsVisible then
+ HelpContentUP.Click
+ sleep 1
+ endif
+ if HelpContentNAVIGATION.IsVisible then
+ HelpContentNAVIGATION.Click
+ sleep 1
+ endif
+ kontext "NavigationsFenster"
+ NavigationsFenster.Close
+ sleep 1
+ kontext "HelpContent"
+ if HelpContentDOWN.IsVisible then
+ HelpContentDOWN.Click
+ sleep 1
+ endif
+ kontext "StarOfficeHelp"
+ Printlog "trying to close the help now"
+ try
+ StarOfficeHelp.TypeKeys "<Mod1 F4>" ' strg F4 supported since bug #103586#
+ catch
+ Warnlog "failed to close the help window :-("
+ endcatch
+ kontext "StarOfficeHelp"
+ if StarOfficeHelp.Exists then
+ warnlog "Help still up!"
+ endif
+ endif
+ Call hCloseDocument
+endcase
+
+'...---....---.-.-.-.-.....---......--.-.-.-.....----..-........................---.......
+
+testcase tCheckIfTheHelpExists
+ Call hNewDocument
+ HelpContents
+ kontext "HelpContent"
+ sleep (5)
+ HelpContent.TypeKeys "<MOD1 A>"
+ sleep (1)
+ HelpContent.TypeKeys "<MOD1 C>"
+ if GetClipBoard = "" then
+ Warnlog " No content in the Help-Content -view."
+ else
+ Printlog " The Help-Content -view contained content. Good."
+ endif
+ kontext "StarOfficeHelp"
+ try
+ StarOfficeHelp.TypeKeys "<MOD1 F4>"
+ catch
+ Warnlog " Failed to close the help window :-("
+ endcatch
+ kontext "StarOfficeHelp"
+ if StarOfficeHelp.Exists then
+ warnlog "Help was still visible!"
+ endif
+ hTypeKeys "."
+ Call hCloseDocument
+endcase 'tCheckIfTheHelpExists
diff --git a/testautomation/graphics/optional/includes/global/id_011.inc b/testautomation/graphics/optional/includes/global/id_011.inc
new file mode 100644
index 000000000000..b1880d0982e8
--- /dev/null
+++ b/testautomation/graphics/optional/includes/global/id_011.inc
@@ -0,0 +1,995 @@
+'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
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/******************************************************************************
+'*
+'* Owner : wolfram.garten@oracle.com
+'*
+'* short description :
+'*
+'\******************************************************************************
+
+testcase tiTextToolbar
+
+ Dim iWaitIndex as integer
+ Dim Zufall as integer
+ Dim i as integer
+
+ Call hNewDocument
+
+ hTextrahmenErstellen ("This is a Text, which will be formatted in several ways", 20,20,40,80)
+ sleep 2
+ EditSelectAll
+ sleep 2
+ Kontext "TextObjectbar"
+ if TextObjectbar.Exists <> TRUE then 'isVisible
+ ViewToolbarsTextFormatting
+ endif
+ WaitSlot (3000) 'sleep (3)
+ Kontext "TextObjectbar"
+ Printlog "- choose random font"
+ randomize
+ Zufall=((2*Rnd)+1) ' wird nicht auf den verfuegbaren bereich getreckt :-( TODO TBO!
+ Schriftart.GetItemcount
+ Schriftart.GetSelText
+ Schriftart.Select (Zufall)
+ Printlog Schriftart.GetSelText + " chosen"
+
+ Kontext "TextObjectbar"
+ sleep 2
+ Printlog "- Change size of font"
+ Schriftgroesse.Select (Zufall)
+ Printlog Schriftgroesse.GetSelText + " chosen"
+
+ Kontext "TextObjectbar"
+ Printlog "- Font attribute bold"
+ Fett.Click
+ sleep 2
+
+ Kontext "TextObjectbar"
+ Printlog "- Font attribute cursive"
+ Kursiv.Click
+ sleep 2
+
+ Kontext "TextObjectbar"
+ Printlog "- Font attribute cursiv"
+ Unterstrichen.Click
+ sleep 2
+
+ Kontext "TextObjectbar"
+ Printlog "- font attribute color"
+ sleep 3
+ FontColorGraphics.TearOff
+ Kontext "TB_Farbe"
+ TB_Farbe.Move 20, 20
+ Sleep 2
+ TB_Farbe.MouseDoubleClick 50, 50
+ Sleep 2
+ TB_Farbe.Close
+
+ Kontext "TextObjectbar"
+ Printlog "- Allign text left"
+ Linksbuendig.Click
+ sleep 2
+
+ Kontext "TextObjectbar"
+ Printlog "- Allign text centered"
+ Zentriert.Click
+ sleep 2
+
+ Kontext "TextObjectbar"
+ Printlog "- align text to right"
+ Rechtsbuendig.Click
+ sleep 2
+
+ Kontext "TextObjectbar"
+ Printlog "- Justified"
+ Blocksatz.Click
+ sleep 2
+
+ Kontext "TextObjectbar"
+ if TextObjectbar.isEnabled <> TRUE then
+ warnlog "Couldn't access TextObjectbar - known bug with bars - FHA"
+ ViewToolbarsTextFormatting
+ endif
+ WaitSlot (2000) 'sleep 2
+ Printlog "- Raising Font spacing"
+
+ kontext "TextObjectbar"
+ sleep 1
+ iWaitIndex = 0
+ do while NOT TextObjectbar.isEnabled AND iWaitIndex < 10
+ sleep(1)
+ iWaitIndex = iWaitIndex + 1
+ loop
+ if NOT TextObjectbar.isEnabled AND iWaitIndex = 10 then
+ warnlog "Dialogue TextObjectbar didnt work. Ending testcase."
+ Call hCloseDocument
+ goto endsub
+ endif
+ TextObjectbar.OpenContextMenu
+ sleep 2
+ hMenuselectNr (1)
+ sleep 2
+ hMenuItemCheck (13)
+ sleep 2
+ TextObjectbar.OpenContextMenu
+ sleep 2
+ hMenuselectNr (1)
+ sleep 2
+ hMenuItemCheck (14)
+ sleep 2
+ ZeilenabstandErhoehen.Click
+ sleep 2
+
+ Kontext "TextObjectbar"
+ Printlog "- Decrease Spacing"
+ ZeilenabstandVerringern.Click
+ sleep 2
+
+ Kontext "TextObjectbar"
+ Printlog "- Numbering and Bullets"
+ sleep 2
+ BulletsOnOff.Click
+ sleep 2
+ BulletsOnOff.Click
+
+ Kontext "TextObjectBar"
+ Printlog "- Increase Font /Reduce Font"
+ sleep 2
+ printlog "Click on Increase Font"
+ IncreaseFont.Click
+ sleep 2
+ printlog "Click on Reduce Font"
+ ReduceFont.Click
+
+ Kontext "TextObjectbar"
+ Printlog "- Text direction from left to right"
+ sleep 2
+ Printlog "- click button 'Text direction from left to right
+ try
+ TextdirectionLeftToRight.Click
+ printlog "hor does work :-)"
+ if (NOT gAsianSup) then
+ warnlog " this doesn't have to work if asian lang support is disabled :-)"
+ endif
+ catch
+ if (gAsianSup) then
+ warnlog "hor does NOT work :-("
+ endif
+ endcatch
+ Printlog "- click button 'Text direction from top to bottom"
+ try
+ TextdirectionTopToBottom.Click
+ printlog "ver does work :-)"
+ if (gAsianSup = FALSE) then
+ warnlog " this doesnt have to work if asian lang support is disabled :-)"
+ endif
+ catch
+ if (gAsianSup = TRUE) then
+ warnlog "ver does NOT work :-( , AsianLanguage support is enabled !"
+ endif
+ endcatch
+
+ Printlog "- open character dialog"
+ Kontext "TextObjectbar"
+ sleep 2
+ Zeichenformat.Click
+ sleep 2
+
+ Kontext
+ Active.SetPage TabFont
+
+ Kontext "TabFont"
+ sleep 2
+ if TabFont.Exists Then
+ TabFont.Cancel
+ Printlog "- Tabfont exists"
+ else
+ Warnlog "- No dialog exists "
+ endif
+
+ Kontext "TextObjectbar"
+ sleep 2
+ Printlog "- call properties for paragraph using text object toolbar"
+ Absatzformat.Click
+ sleep 2
+
+ Kontext
+ Active.SetPage TabTabulator
+
+ Kontext "TabTabulator"
+ if TabTabulator.Exists Then
+ Printlog "- TabTabulator exists"
+ TabTabulator.Cancel
+ else
+ Warnlog "- TabTabulator does not exist"
+ endif
+
+ if ( gApplication = "IMPRESS" ) then ' IMPRESS only
+
+ Kontext "TextObjectbar"
+ OutlineBullet.Click
+ kontext
+ if active.exists (5) then
+ messagebox.SetPage TabOptionenNumerierung
+
+ kontext "TabOptionenNumerierung"
+ if (TabOptionenNumerierung.exists (5) ) then
+ Printlog "Numbering/Bullets window came up :-)"
+ TabOptionenNumerierung.cancel
+ else
+ warnlog "no Numbering/Bullets window came up :-("
+ endif
+ else
+ warnlog "no Numbering/Bullets window came up :-( 2"
+ endif
+
+ Printlog "-change order of outline points"
+ sleep 3
+ ViewWorkspaceOutlineView
+ WaitSlot (2000) 'sleep (3)
+
+ Kontext "DocumentImpressOutlineView"
+ sleep 1
+ DocumentImpressOutlineView.TypeKeys "Bla bla bla <RETURN><TAB>bla bla bla bla bla <MOD1 SHIFT LEFT>"
+ sleep 1
+
+ Kontext "TextObjectbar"
+ HierachieRunter.Click
+ sleep 1
+ Printlog "- Move back down"
+ HierachieHoch.Click
+ sleep 1
+ HierachieHoch.Click
+ sleep 1
+ Printlog "- Move paragraph up"
+ AbsatzHoch.Click
+ sleep 1
+ Printlog "- move paragraph back down and switch to drawing view"
+ AbsatzRunter.Click
+ sleep 1
+
+ Kontext "Vorschau"
+ if Vorschau.Exists then
+ printlog "- - - - preview window is open, hope there is no problem"
+ ' Vorschau.Close
+ endif
+
+ else ' DRAW only
+ Kontext "TextObjectbar"
+ Printlog "- Double"
+ LineSpacing2.Click
+ sleep 2
+
+ Kontext "TextObjectbar"
+ Printlog "- 1.5 lines"
+ LineSpacing15.Click
+ sleep 2
+
+ Kontext "TextObjectbar"
+ Printlog "- Single"
+ LineSpacing1.Click
+ sleep 2
+ endif
+
+ iWaitIndex = 0
+
+ Kontext "TextObjectbar"
+ do while TextObjectbar.isEnabled = FALSE AND iWaitIndex < 10
+ sleep(1)
+ iWaitIndex = iWaitIndex + 1
+ loop
+ if TextObjectbar.isEnabled = FALSE AND iWaitIndex = 10 then
+ warnlog "Dialogue TextObjectbar didnt work. Ending testcase."
+ Call hCloseDocument
+ goto endsub
+ endif
+ sleep 2
+
+ Kontext "TextObjectbar"
+ TextObjectbar.OpenContextMenu
+ sleep 2
+ hMenuselectNr (1)
+ sleep 2
+ hMenuItemUnCheck (13)
+ sleep 2
+ TextObjectbar.OpenContextMenu
+ sleep 2
+ hMenuselectNr (1)
+ sleep 2
+ hMenuItemUnCheck (14)
+ sleep 2
+ ViewToolbarsTextFormatting
+ WaitSlot (2000) 'sleep 1
+ if ( gApplication = "IMPRESS" ) then
+ Kontext "DocumentImpressOutlineView"
+ DocumentImpressOutlineView.TypeKeys "<ESCAPE>"
+ hUseAsyncSlot( "EditSelectAll" )
+ DocumentImpressOutlineView.TypeKeys "<DELETE>"
+ sleep (3)
+ ViewWorkspaceDrawingView
+
+ Kontext "DocumentImpress"
+ WaitSlot (2000) 'sleep 1
+ DocumentImpress.TypeKeys "<ESCAPE>"
+ hUseAsyncSlot( "EditSelectAll" )
+ DocumentImpress.TypeKeys "<DELETE>"
+ else
+ Kontext "DocumentDraw"
+ DocumentDraw.TypeKeys "<ESCAPE>"
+ hUseAsyncSlot( "EditSelectAll" )
+ DocumentDraw.TypeKeys "<DELETE>"
+ endif
+ Printlog "Test ended."
+
+ Call hCloseDocument
+endcase
+
+'------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------'
+
+testcase tiDrawObjectBar
+ Dim a as string
+ Dim Zaehler as integer
+ Dim i as integer
+ Dim x as integer
+
+ Call hNewDocument
+
+ Call hRechteckErstellen (20,20,70,70)
+ sleep 1
+ '--------------------------- format line ------------------------
+ Printlog "- call format line using graphic object toolbar"
+ Kontext "DrawingObjectbar"
+ if DrawingObjectbar.Exists = FALSE then
+ ViewToolbarsGraphic
+ endif
+ if DrawingObjectbar.Exists = FALSE then
+ warnlog "Drawing-Objectbar should have been opened, but wasnt"
+ ViewToolbarsGraphic
+ endif
+
+ sleep 3
+ Linie.Click
+ sleep 2
+ Kontext
+ Active.SetPage TabLinie
+ Kontext "TabLinie"
+ if TabLinie.Exists Then
+ TabLinie.Cancel
+ Printlog "- TabLinie exists "
+ else
+ Warnlog "- TabLinie does not exist"
+ endif
+
+ '--------------------------- Linienendenstil --------------------
+ Printlog "- Style of line ends"
+ Kontext "DrawingObjectbar"
+ sleep 1
+ Linienendenstil.TearOff
+ sleep 2
+ Kontext "Linienenden"
+ if Linienenden.Exists Then
+ Printlog "- dialog exists"
+ Linienenden.Close
+ else
+ Warnlog "- Arrowheads does not exist"
+ endif
+
+ '--------------------------- Linienstil -------------------------
+ Printlog "- choose style of lines using graphic object toolbar"
+
+ Kontext "DrawingObjectbar"
+ sleep 1
+ Linienstil.Select 2
+ Printlog Linienstil.GetSelText + " chosen"
+ Linienstil.Select Linienstil.GetItemCount
+ Printlog Linienstil.GetSelText + " chosen"
+ sleep 2
+
+ '--------------------------- Linienbreite------------------------
+ Printlog "- check style of lines using graphic object toolbar"
+ Kontext "DrawingObjectbar"
+ sleep 1
+ a = Linienbreite.GetText
+ SetClipboard a
+ sleep 1
+ Linienbreite.SetText "0,5"
+ sleep 2
+ if Linienbreite.GetText = a Then
+ Warnlog "- changes in edit field did not happen; is: '"+Linienbreite.GetText+"', should be : '"+"0,5"+"'"
+ else
+ Printlog "- Width of lines changed"
+ endif
+
+ '--------------------------- Linienfarbe ------------------------
+ Printlog "- change line color"
+ Kontext "DrawingObjectbar"
+ sleep 1
+ Zaehler = Linienfarbe.GetItemCount
+ randomize
+ i = Int(Zaehler*Rnd+1)
+ Linienfarbe.Select i
+ Printlog Linienfarbe.GetSelText + " chosen"
+
+ '--------------------------- Flaechenformatierung ---------------
+ Printlog "- Call Format area using graphic object toolbar"
+ Kontext "DrawingObjectbar"
+ sleep 1
+ try
+ Flaeche.Click
+ catch
+ printlog "clicking on area took ages :-("
+ endcatch
+ sleep 5
+ Kontext
+ Active.SetPage TabArea
+ Kontext "TabArea"
+ if TabArea.Exists Then
+ Printlog "- TabArea exists "
+ TabArea.Cancel
+ else
+ Warnlog "- TabArea does not exist"
+ endif
+
+ '---
+ sleep 1
+ Kontext "DrawingObjectbar"
+ sleep 1
+ x = AreaStyle.GetItemCount
+ i = 1
+ for i = i to x
+ AreaStyle.Select i
+ Printlog "Area Style: (" + i + "/" + x + ") - " + AreaStyle.GetSelText
+ sleep 1
+ if AreaStyle.GetSelIndex > 1 then
+ Printlog " Area Filling " + AreaFilling.GetSelIndex + " - " + AreaFilling.GetItemCount
+ if (i <> 1) AND (AreaFilling.GetItemCount <> 0) then
+ if (AreaFilling.GetSelIndex = 0) AND (AreaFilling.GetItemCount > 0) then
+ printlog "default item is 0 => means nothing; NO BUG! 100909"
+ endif
+ AreaFilling.Select (AreaFilling.GetItemCount)
+ Printlog " Selected: " + AreaFilling.GetSelIndex + " - " + AreaFilling.GetSelText
+ endif
+ endif
+ next i
+
+ '---------------------------- Schatten --------------------------
+ Printlog "- Assign shadow using graphic object toolbar"
+ Kontext "DrawingObjectbar"
+ sleep 1
+ Schatten.Click
+ sleep 1
+ Printlog "- shadow assigned"
+
+ '---------------------------- Praesentationsflyer ---------------
+ if ( gApplication = "IMPRESS" ) then ' IMPRESS only
+ Printlog "- Call presentation flyer"
+ Kontext "CommonTaskbar" ' first check , if presentation flyer is up! if not -> make it up :-)
+ if CommonTaskbar.Exists Then
+ printlog "- flyer is already visible :-)"
+ else
+ printlog "- flyer wasn't visible :-( -will be now!"
+ Kontext "DrawingObjectbar"
+ sleep 1
+ ViewToolbarsPresentation ' put it up again!
+ endif
+ endif
+ if ((UCase(gApplication)) = "IMPRESS") then ' IMPRESS only
+ Kontext "DrawingObjectbar"
+ if DrawingObjectbar.isVisible = FALSE then
+ ViewToolbarsGraphic
+ endif
+ endif
+ Call hCloseDocument
+endcase
+
+'------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------'
+
+testcase tiGraphicsObjectBar
+ dim i as integer
+ Call hNewDocument
+
+ hGrafikeinfuegen ConvertPath (gTesttoolPath & "global\input\graf_inp\desp.bmp")
+ sleep 1
+ Kontext "GraphicObjectbar"
+ if ( NOT GraphicObjectbar.Exists() ) then
+ ViewToolbarsPicture
+ endif
+ sleep 1
+ Filter.TearOff
+ sleep 1
+ Kontext "GraphicFilterBar"
+ sleep 1
+ Printlog "invert"
+ Invert.Click
+ sleep 3
+ Printlog "smooth"
+ Smooth.Click
+ sleep 3
+ Printlog "sharpen"
+ Sharpen.Click
+ sleep 3
+ Printlog "remove noise"
+ Remove.Click
+ sleep 3
+ Printlog "solarization"
+ Solarization.Click
+ sleep 3
+ Kontext "Solarization"
+ if Solarization.exists (5) then
+ sleep 1
+ Call Dialogtest ( Solarization )
+ sleep 1
+ Value.More
+ Value.Less
+ Invert.Check
+ Solarization.OK
+ else
+ warnlog "solarization didn't came up :-("
+ endif
+ sleep 1
+ Kontext "GraphicFilterBar"
+ sleep 1
+ Printlog "aging"
+ Aging.Click
+ Kontext "Aging"
+ sleep 1
+ Call Dialogtest ( Aging )
+ AgingDegree.More
+ AgingDegree.Less
+ sleep 1
+ Aging.OK
+ sleep 1
+ Kontext "GraphicFilterBar"
+ sleep 1
+ Printlog "poster"
+ Posterize.Click
+ sleep 1
+ Kontext "Posterize"
+ sleep 1
+ Call Dialogtest ( Posterize )
+ PosterColors.More
+ PosterColors.Less
+ sleep 1
+ Posterize.OK
+ sleep 2
+ kontext "GraphicFilterBar"
+ sleep 1
+ Printlog "pop"
+ Art.Click
+ sleep 3
+ Printlog "charcoal"
+ CharcoalSketch.Click
+ sleep 3
+ Printlog "relief"
+ Relief.Click
+ Kontext "Relief"
+ sleep 1
+ Call Dialogtest ( Relief )
+ LightSource.TypeKeys "<left><up>"
+ Relief.OK
+ sleep 3
+ Kontext "GraphicFilterBar"
+ Printlog "mos"
+ Mosaic.Click
+ sleep 1
+ Kontext "Mosaic"
+ sleep 1
+ Call Dialogtest ( Mosaic )
+ Width.More
+ Width.Less
+ Height.More
+ Height.Less
+ EnhanceEdges.Check
+ Mosaic.OK
+ sleep 3
+ Kontext "GraphicFilterBar"
+ GraphicFilterBar.Close
+
+ Kontext "GraphicObjectbar"
+ if GraphicObjectbar.Exists = FALSE then
+ ViewToolbarsPicture
+ endif
+ sleep 1
+ for i = 1 to Grafikmodus.GetItemCount
+ Grafikmodus.select i
+ sleep 1
+ next i
+
+ ColorSettings.Click
+ Kontext "ColorBar"
+
+ try
+ Rotanteil.More
+ Rotanteil.Less
+ catch
+ warnlog "not working from testtool redvalue "+ rotanteil.GetRT
+ endcatch
+ try
+ Gruenanteil.More
+ Gruenanteil.Less
+ catch
+ warnlog "not working from testtool Greenvalue."
+ endcatch
+ try
+ Blauanteil.More
+ Blauanteil.Less
+ catch
+ warnlog "not working from testtool Bluevalue."
+ endcatch
+ try
+ Helligkeit.More
+ Helligkeit.Less
+ catch
+ warnlog "not working from testtool Brightness."
+ endcatch
+ try
+ Kontrast.More
+ Kontrast.Less
+ catch
+ warnlog "not working from testtool Contrast."
+ endcatch
+ try
+ Gamma.More
+ Gamma.Less
+ catch
+ warnlog "not working from testtool Gamma."
+ endcatch
+
+ ColorBar.Close
+ Kontext "GraphicObjectbar"
+
+ try
+ Transparenz.More
+ Transparenz.Less
+ catch
+ warnlog "Not working from testtool Transparency."
+ endcatch
+
+ Crop.click
+ FormatCropPicture
+
+ kontext "TabZuschneiden"
+ GroesseBeibehalten.Check
+ MassstabBeibehalten.Check
+ Links.More
+ Links.Less
+ Rechts.More
+ Rechts.Less
+ Oben.More
+ Oben.Less
+ Unten.More
+ Unten.Less
+ MassstabBreite.More
+ MassstabBreite.Less
+ MassstabHoehe.More
+ MassstabHoehe.Less
+ GroesseBreite.More
+ GroesseBreite.Less
+ GroesseHoehe.More
+ GroesseHoehe.Less
+ Originalgroesse.Click
+ TabZuschneiden.Cancel
+
+ Call hCloseDocument
+endcase
+
+'------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------'
+
+testcase tiGluepointToolbar
+ Call hNewDocument
+
+ Call hRechteckErstellen 20,20,40,40
+ Call hRechteckErstellen 60,60,80,80
+ sleep 2
+ ViewToolbarsOptionbar
+ sleep 2
+
+ Kontext "Optionsbar"
+ if Optionsbar.Exists = False Then
+ ViewToolbarsOptionbar
+ Kontext "Optionsbar"
+ if Optionsbar.Exists = False Then
+ warnlog "Can't open Optionsbar."
+ endif
+ endif
+ sleep 2
+ Kontext "Toolbar"
+ sleep 1
+ Verbinder.Click
+ gMouseMove 30,30,70,70
+ sleep 3
+ Kontext "Toolbar"
+ GluePoints.Click
+ sleep 1
+ Kontext "Gluepointsobjectbar"
+ if Gluepointsobjectbar.Exists = False Then
+ ViewToolbarsGluepoints
+ endif
+ sleep 3
+ '-------------------------------------- Klebepunkt einfuegen ----
+ try
+ PunkteEinfuegen.Click
+ sleep 2
+ gMouseClick 25,30
+ sleep 1
+ gMouseclick 25,30
+ Printlog "- insert gluepoint works"
+ catch
+ Warnlog "- gluepoint could not be insert. Following errors might have their reason here"
+ endcatch
+ sleep 3
+ Kontext "Gluepointsobjectbar"
+
+ '-------------------------------------- Links -------------------
+ try
+ Links.Click
+ Printlog "- gluepoint left works"
+ catch
+ Warnlog "- gluepoint left does not work"
+ endcatch
+ sleep 1
+ '-------------------------------------- Rechts ------------------
+ try
+ Rechts.Click
+ Printlog "- gluepoint right works"
+ catch
+ Warnlog "- gluepoint right does not work"
+ endcatch
+ sleep 1
+ '-------------------------------------- Oben --------------------
+ try
+ Oben.Click
+ Printlog "- gluepoint top works"
+ catch
+ Warnlog "- gluepoint top does not work"
+ endcatch
+ sleep 1
+ '-------------------------------------- Unten -------------------
+ try
+ Unten.Click
+ Printlog "- gluepoint bottom works"
+ catch
+ Warnlog "- gluepoint bottom does not work"
+ endcatch
+ sleep 1
+ '---------------------- Position an Objekt anpassen -------------
+ try
+ PositionAnObjektAnpassen.Click
+ Printlog "- align position to object works"
+ gMouseClick 25,30 ' if you don't click onto an existing point, the state changes back :-[
+ catch
+ Warnlog "- align position to object does not work"
+ endcatch
+ Kontext "Gluepointsobjectbar"
+ sleep 1
+ '------------------------------------- Horizontal links ---------
+ if PositionAnObjektAnpassen.exists then
+ printlog "PositionAnObjektAnpassen = Exists"
+ endif
+ if PositionAnObjektAnpassen.GetState(2) <> 0 then
+ PositionAnObjektAnpassen.Click ' make unpressed!
+ endif
+ '0 = not pressed. 1 = pressed.
+ sleep 2
+ try
+ Kontext "Gluepointsobjectbar"
+ HorizontalLinks.Click
+ Printlog "- align horizontal left works"
+ catch
+ Warnlog "- align horizontal left does not work"
+ PositionAnObjektAnpassen.Click ' that's the middle button, it has to be UP/not activated!
+ for i = 1 to Gluepointsobjectbar.GetItemCount
+ if (Gluepointsobjectbar.GetState ( i, 0 ) <> 0 ) then ' is no seperator
+ printlog "----------------------------------------------------------------------"
+ printlog "helpid : " + Gluepointsobjectbar.Getstate ( i, 0 ) + " number in row: " + i
+ printlog "itemtype: " + Gluepointsobjectbar.GetState ( i, 1 )
+ printlog "state : " + Gluepointsobjectbar.GetState ( i, 2 )
+ printlog "----------------------------------------------------------------------"
+ endif
+ next i
+ endcatch
+ sleep 2
+ '------------------------------------- Horizontal rechts --------
+ try
+ HorizontalRechts.Click
+ Printlog "- Align horizontal right does work"
+ catch
+ Warnlog "- Align horizontal right does notwork"
+ endcatch
+ sleep 1
+ '------------------------------------- Horizontal zentriert -----
+ try
+ HorizontalZentriert.Click
+ Printlog "- align horizontal center does work"
+ catch
+ Warnlog "- align horizontal center does work"
+ endcatch
+ sleep 1
+ '------------------------------------- Vertikal oben ------------
+ try
+ VertikalOben.Click
+ sleep 1
+ Printlog "- Align vertical top does work"
+ catch
+ Warnlog "- Align vertical top does not work"
+ endcatch
+ '------------------------------------- Vertikal unten -----------
+ try
+ VertikalUnten.Click
+ sleep 1
+ printlog "- Align vertical bottom does work"
+ catch
+ Warnlog "- Align vertical bottom does not work"
+ endcatch
+ '------------------------------------- Vertikal zentriert -------
+ try
+ VertikalZentriert.Click
+ sleep 1
+ Printlog "- Align vertical center does work"
+ catch
+ Warnlog "- Align vertical center does not work"
+ endcatch
+
+ Printlog "- End of testing gluepoints"
+
+ ViewToolbarsOptionbar
+ sleep 2
+ Kontext "Optionsbar"
+ if Optionsbar.Exists Then
+ warnlog "Couldnt close Optionsbar."
+ endif
+ Call hCloseDocument
+endcase
+
+'------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------'
+
+testcase tdBezierToolbar
+ Call hNewDocument
+
+ Call hRechteckErstellen ( 10, 10, 30, 40 )
+ sleep (1)
+
+ Call hOpenContextMenu
+ sleep (1)
+
+ Call hOpenContextMenu
+ sleep (2)
+
+ Kontext "Bezierobjectbar"
+ if Bezierobjectbar.Exists <> TRUE then
+ ViewToolbarsBezier
+ Sleep (2)
+ if Bezierobjectbar.Exists <> TRUE then
+ warnlog "Bezierobjectbar did not show up. Check why."
+ endif
+ endif
+
+ '----------------------------------- Punkte verschieben ------------------------------------
+
+ Kontext "Bezierobjectbar"
+ if Bezierobjectbar.Exists <> TRUE then
+ ViewToolbarsBezier
+ Sleep 2
+ endif
+ if Bezierobjectbar.Exists <> TRUE then
+ Warnlog "The Bezier-Objectbar should have been opened, but wasnt."
+ ViewToolbarsBezier
+ Sleep 2
+ endif
+
+ Kontext "Bezierobjectbar"
+ sleep 1
+ Printlog "- Move points"
+ Verschieben.Click
+ sleep 2
+
+ hTypeKeys "<MOD1 TAB>"
+
+ Printlog "- Insert points"
+ Kontext "Bezierobjectbar"
+ Einfuegen.Click
+ sleep 2
+ Bezierobjectbar.Move 20, 20
+ sleep (1)
+ Printlog "- Delete points"
+
+ gMouseMove 25,25,45,45
+
+
+ sleep 2
+ Kontext "Bezierobjectbar"
+ sleep 2
+ Printlog "- Convert into curve"
+ InKurve.Click
+ sleep 2
+ Printlog "- Place edge point"
+ Ecke.Click
+ sleep 2
+ Printlog "- Smooth transition"
+ Glatt.Click
+ sleep 2
+ Printlog "- Symetric transition"
+ Symmetrisch.Click
+ sleep 2
+
+ Kontext "Bezierobjectbar"
+ PunkteReduzieren.Click
+ sleep 2
+
+ hTypeKeys "<MOD1 TAB>"
+ hTypeKeys "<MOD1 SHIFT SPACE>"
+
+ Kontext "Bezierobjectbar"
+ try
+ Auftrennen.Click
+ catch
+ Warnlog "- 'Break' could not be executed"
+ endcatch
+ sleep 2
+
+ hTypeKeys "<MOD1 TAB>"
+ hTypeKeys "<MOD1 A>"
+
+ Printlog "- Close bezier"
+ Kontext "Bezierobjectbar"
+ try
+ Schliessen.Click
+ catch
+ InKurve.Click
+ sleep 2
+ try
+ Schliessen.Click
+ catch
+ warnlog "Couldn't push button :-( can't reproduce it now, mostly seen on linux, if i loop this test, it happens only 1/5 of the time ... :-)"
+ endcatch
+ endcatch
+ sleep 2
+
+ hTypeKeys "<MOD1 TAB>"
+ hTypeKeys "<MOD1 A>"
+
+ Kontext "Bezierobjectbar"
+ Printlog "- Break curve"
+ try
+ Loeschen.Click
+ sleep 2
+ catch
+ warnlog "Delete didn't work... why?"
+ endcatch
+
+ Kontext "Toolbar"
+ sleep 2
+ Toolbar.OpenContextMenu ' Enable forms button in menuebar
+ sleep 2
+ hMenuselectNr (1)
+ sleep 2
+ hMenuItemUnCheck (7)
+ sleep 2
+ Call hCloseDocument
+endcase
+
+'------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------'
diff --git a/testautomation/graphics/optional/includes/impress/i_animation.inc b/testautomation/graphics/optional/includes/impress/i_animation.inc
new file mode 100644
index 000000000000..8ee7777e5994
--- /dev/null
+++ b/testautomation/graphics/optional/includes/impress/i_animation.inc
@@ -0,0 +1,187 @@
+'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
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* Owner : wolfram.garten@oracle.com
+'*
+'* short description :
+'*
+'*********************************************************************
+' #1 tExtrasAnimation
+'\********************************************************************
+
+' Dateiname.SetText ConvertPath (gTesttoolPath + "global\input\graf_inp\enter.bmp")
+' Dateiname.SetText ConvertPath (gTesttoolPath + "global\input\graf_inp\grafix3.ras")
+
+testcase tExtrasAnimation
+ Printlog "- Tools/Animation"
+ Dim i
+ Call hNewDocument
+ Call sSelectEmptyLayout '/// New impress document ///'
+ sleep 2
+ InsertGraphicsFromFile '/// insert graphic file (sample.bmp) ///'
+ sleep 1
+ Kontext "GrafikEinfuegenDlg"
+ sleep 2
+
+ Dateiname.SetText ConvertPath (gTesttoolPath + "global\input\graf_inp\enter.bmp")
+ sleep 2
+ Oeffnen.Click
+ sleep 2
+ Kontext "DocumentImpress"
+ DocumentImpress.MouseDoubleClick 90,90 '/// Deselect graphic ///'
+ sleep 1
+ InsertGraphicsFromFile
+ sleep 2
+ Kontext "GrafikEinfuegenDlg"
+ Dateiname.SetText ConvertPath (gTesttoolPath + "global\input\graf_inp\grafix3.ras")
+ sleep 2
+ Oeffnen.Click
+ sleep 2
+ Opl_SD_EffekteZulassen
+ Kontext "Animation"
+
+ for i=1 to 10
+ BildAufnehmen.Click '/// add selected picture 10 times into the animation ///'
+ next i
+ sleep 1
+ if AnzahlBilder.GetText <> "10" Then '/// compare frame number in animation dialog ///'
+ WarnLog " - Adding graphics did not work"
+ else
+ PrintLog " Pictures added"
+ end if
+
+ if AlleAufnehmen.IsEnabled Then WarnLog " - Add all should not be enabled, there is only 1 graphic selected" '/// test if Add all is eneabled (shouldn't be because of only 1 object selected) ///'
+ Kontext "DocumentImpress"
+ EditSelectAll '/// Select both pictures ///'
+
+ Kontext "Animation"
+
+ for i=1 to 5
+ AlleAufnehmen.Click '/// Add all (5 times) ///'
+ next i
+ sleep 1
+ if AnzahlBilder.GetText <> "20" Then '/// check if number of frames is now 20 ///'
+ WarnLog " - Adding pics did not work"
+ else
+ PrintLog " All pics added"
+ end if
+
+ ErstesBild.Click '/// Click First Picture ///'
+
+ if AnzahlBilder.GetText <> "1" Then '/// Control if we are at frame 1 ///'
+ WarnLog " - Jump back to start did not work"
+ else
+ PrintLog " Jumped back to first picture"
+ end if
+
+ LetztesBild.Click '/// Go to last picture ///'
+
+ if AnzahlBilder.GetText <> "20" Then '/// Control frame number ///'
+ WarnLog " - Jump to end did not work"
+ else
+ PrintLog " Jump to end did work"
+ end if
+
+ Abspielen.Click '/// Play animation ///'
+ sleep 3
+ Kontext "DocumentImpress"
+ EditSelectAll '/// Select all in document ///'
+ DocumentImpress.TypeKeys "<DELETE>" '/// Delete content ///'
+
+ Kontext "Animation"
+ Erstellen.Click '/// /Create animation //'
+ sleep 10
+
+ Kontext "DocumentImpress"
+ try
+ EditCopy '/// Try to copy ccreated animation into clipboard ///'
+ PrintLog " animation created"
+ catch
+ WarnLog " - Animation not created"
+ endcatch
+
+ Kontext "Animation"
+
+ if AnimationsgruppeGruppenobjekt.IsChecked=True Then
+ try
+ AnzeigedauerProBild.SetText "1" '/// Try setting duration per frame ///'
+ WarnLog " - Edit field should be disabled"
+ catch
+ PrintLog " Edit field not enabled because groupobject status is = " + AnimationsgruppeGruppenobjekt.IsChecked
+ endcatch
+ end if
+
+
+ AnimationsgruppeBitmapobjekt.Check '/// check animation group object ///'
+
+ AnzeigedauerProBild.SetText "3" '/// Set duration per frame to 3///'
+ SetClipboard AnzeigedauerProBild.GetText
+ AnzeigedauerProBild.More '/// Raise value for duration ///'
+ if AnzeigedauerProBild.GetText <> GetClipboardText Then
+ PrintLog " Time per pic could be edited"
+ else
+ WarnLog " - Time per pic could be edited"
+ end if
+
+ Dim Zaehler
+ Zaehler = AnzahlDurchlaeufe.GetItemCount
+ for i=1 to Zaehler '/// Change number of plays ///'
+ AnzahlDurchlaeufe.Select i
+ next i
+ PrintLog " Number of loops checked"
+
+
+ Dim ZaehlerAnpassung
+ ZaehlerAnpassung=Anpassung.GetItemCount '/// change ZaehlerAnpassung ///'
+ for i=1 to ZaehlerAnpassung
+ Anpassung.Select i
+ next i
+ PrintLog " Loop count changed"
+
+ BildLoeschen.Click '/// Delete 1 frame ///'
+ if AnzahlBilder = "20" Then
+ WarnLog " - Delete pictures from animation did not work"
+ else
+ PrintLog " Picture No20 deleted"
+ end if
+
+ AlleLoeschen.Click '/// Delete all frames ///'
+ Kontext "Active"
+ Active.Yes
+ sleep 3
+
+ Kontext "Animation"
+ if Abspielen.IsEnabled=true Then
+ WarnLog " - Not all pics could be deleted"
+ else
+ PrintLog " all pics deleted"
+ end if
+ sleep 2
+ Animation.Close
+ sleep 2
+ Call hCloseDocument '/// close document///'
+endcase
diff --git a/testautomation/graphics/optional/includes/impress/i_headerfooter.inc b/testautomation/graphics/optional/includes/impress/i_headerfooter.inc
new file mode 100644
index 000000000000..3e4c54551525
--- /dev/null
+++ b/testautomation/graphics/optional/includes/impress/i_headerfooter.inc
@@ -0,0 +1,685 @@
+'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
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* Owner : wolfram.garten@oracle.com
+'*
+'* short description : Tests the header-footer-function in Impress
+'*
+'*******************************************************************
+'*
+' #1 tiHeaderFooterSlide
+' #1 tiHeaderFooterNotesHandout
+'*
+'\*******************************************************************
+
+dim numbervalue1 as integer
+dim value2 as String
+dim value3 as String
+
+'------------------------------------------------------------------------------
+
+testcase tiHeaderFooterSlide
+ '/// This part checks the first Tabpage of the Header and Footer Dialog
+
+ Call hNewDocument '/// Open New document
+ kontext "drawimpress"
+ try
+ ViewHeaderAndFooter '/// View - Header And Footer
+ sleep(1)
+ catch
+ warnlog " Could'nt open ViewHeaderAndFooter!" '/// Warnlog for not opening dialog
+ endcatch
+
+ printlog " Testing TabHeaderFooterSlide."
+ kontext "TabHeaderFooterSlide"
+
+ '/// Check Date And Time on first tab
+ if DateTime.Exists = TRUE AND DateTimeFixed.isVisible = TRUE then '/// Testing date and time checkbox
+ DateTime.UnCheck
+ sleep(1)
+ DateTime.Check
+ sleep(1)
+
+ if DateTime.IsChecked then
+ printlog " DateTimeFormat-checkbox works."
+ else
+ warnlog " Something wrong with the DateTime-checkbox!"
+ endif
+
+ else
+ warnlog "DateTime does not exist or is not visible."
+ endif
+
+ '/// Checking if DateTime checkbox setting is remembered...
+ DateTime.Uncheck
+ printlog " Date Time is unchecked now."
+ Apply.Click
+ ViewHeaderAndFooter
+
+ if DateTime.isChecked then
+ warnlog " Settings of Date Time not remembered!"
+ else
+ printlog " Setting of date Time is remembered."
+ endif
+ DateTime.Check
+
+ '/// Check DateTimeFixed can be checked/unchecked
+ if DateTimeFixed.Exists = TRUE AND DateTimeFixed.isVisible = TRUE then
+ DateTimeFixed.Check
+ sleep(1)
+
+ if DateTimeFixed.isChecked = TRUE AND DateTimeVariable.IsChecked = FALSE then
+ printlog " Datetimefixed-checkbox seem to work."
+ else
+ warnlog " Datetimefixed-checkbox isnt checked or DateTimeVariable is checked!"
+ endif
+
+ else
+ warnlog " DateTimeFixed doesnt exist or is not visible!"
+ endif
+
+ '/// Can text be inserted in the "fixed"-field?
+ if DateTimeFixedText.exists = TRUE AND DateTimeFixedText.isVisible = TRUE then
+ DateTimeFixedText.settext "lalala"
+
+ if DateTimeFixedText.gettext <> "lalala" then
+ errorlog " Could'nt write a text to the DateTimeFixedText-field!"
+ else
+ printlog " Text is the same."
+ endif
+
+ else
+ warnlog " DateTimeFixedText doesnt exist or is not visible!"
+ endif
+
+ '/// Checking if DateTimeFixed and Text setting is remembered...
+ DateTime.Check
+ DateTimeFixed.Check
+ DateTimeFixedText.settext "lalala"
+ Apply.Click
+ ViewHeaderAndFooter
+
+ if DateTimeFixedText.gettext <> "lalala" then
+ warnlog " Text in DateTimeFixedText is not the same!"
+ else
+ printlog " Text was saved."
+ endif
+ DateTimeFixedText.settext ""
+
+ '/// Can I change to "Variable" and check it?
+ if DateTimeVariable.exists = TRUE AND DateTimeVariable.isVisible = TRUE then
+ DateTimeVariable.Check
+ sleep(1)
+
+ if DateTimeVariable.IsChecked AND DateTimeFixed.IsChecked = FALSE then
+ printlog " DateTimeVariable-checkbox works."
+ else
+ warnlog " Something wrong with the DateTimeVariable-checkbox or DateTimeFormat is checked!"
+ endif
+
+ else
+ warnlog " DateTimeVariable doesnt exist or is not visible!"
+ endif
+
+ '/// Is the Variable setting saved?
+ Apply.Click
+ ViewHeaderAndFooter
+ if DateTimeVariable.isChecked then
+ printlog " Variable Setting gets saved."
+ else
+ warnlog " Variable setting does not get saved!"
+ endif
+
+ '/// Checking DateTimeFormat box
+ if DateTimeFormat.exists = TRUE AND DateTimeFormat.isVisible = TRUE then
+ numbervalue1 = DateTimeFormat.getitemcount '/// Get the number of choices
+ printlog " DateTimeFormat equals: " + numbervalue1
+ value2 = DateTimeFormat.getseltext '/// Get the text for the choosen entry
+ printlog " Tries to get ", numbervalue1 & "."
+ DateTimeFormat.select ( numbervalue1 - 1 ) '/// Select the last entry
+ value3 = DateTimeFormat.getseltext '/// Get the text for the last entry
+ printlog " DateTimeFormat is: " + value3
+
+ if value2 = value3 then
+ errorlog " More options for Date should exist!" '/// Check if the first and last are the same.
+ DateTimeFormat.select value2 '/// Choose the original state
+ else
+ printlog " DateTimeFormat box works."
+ endif
+
+ '/// Checking if settings of DateTimeFormat box get saved
+ Apply. Click
+ ViewHeaderAndFooter
+ if DateTimeFormat.GetSelText = value3 then
+ printlog " DateTimeFormat settings get saved."
+ else
+ warnlog " DateTimeFormat settings did not get saved!"
+ endif
+
+ else
+ warnlog " DateTimeFormat doesnt exist or is not visible."
+ endif
+
+ '/// Checking DateTimeLanguage box
+ if DateTimeLanguage.exists = TRUE AND DateTimeLanguage.isVisible = TRUE then
+ numbervalue1 = DateTimeLanguage.GetItemCount '/// Get the number of choices
+ DateTimeFormat.select 1 '/// Choose the first entry
+ value2 = DateTimeLanguage.GetSelText '/// Get the text for the choosen entry
+ DateTimeLanguage.select ( numbervalue1 - 1 ) '/// Select the last entry
+ value3 = DateTimeLanguage.GetSelText '/// Get the text for the last entry
+
+ if value2 = value3 then
+ errorlog " More options for Date should exist!" '/// Check if the first and last aare the same.
+ DateTimeLanguage.select value2 '/// Choose the original state
+ value3 = DateTimeLanguage.GetSelText
+ else
+ printlog " DateTimeLanguage box works."
+ endif
+
+ '/// Checking if language settings get saved
+ Apply.Click
+ ViewHeaderAndFooter
+ if DateTimeLanguage.GetSelText = value3 then
+ printlog " DateTimeLanguage settings get saved."
+ else
+ warnlog " DateTimeLanguage do not get saved!"
+ endif
+
+ else
+ warnlog " DateTime doesnt exist or is not visible!"
+ endif
+
+ '/// Checking Footer checkbox
+ if Footer.exists = TRUE AND Footer.isVisible = TRUE then
+ Footer.Check
+ sleep(1)
+
+ if Footer.IsChecked then
+ printlog " Footer-checkbox works."
+ else
+ errorlog " Something wrong with the Footer-checkbox!"
+ endif
+
+ else
+ warnlog " Footer checkbox doesnt exist or is not visible!"
+ endif
+
+ '/// Checking if Footer setting gest saved
+ Footer.Uncheck
+ Apply.Click
+ ViewHeaderAndFooter
+ if Footer.IsChecked then
+ warnlog " Footer settings do not get saved!"
+ else
+ printlog " Footer settings saved."
+ endif
+ Footer.Check
+
+ '/// Checking if text can be inserted in FooterFixedText
+ if FooterFixedText.exists = TRUE AND FooterFixedText.isVisible = TRUE then
+ FooterFixedText.SetText "lalala"
+
+ if FooterFixedText.GetText <> "lalala" then
+ errorlog " Could'nt write a text to the FooterFixedText-field!"
+ else
+ printlog " FooterFixedText works."
+ endif
+
+ else
+ warnlog " Footer doesnt exist or is not visible!"
+ endif
+
+ '/// Checking if Footer text gets saved.
+ Apply.Click
+ ViewHeaderAndFooter
+
+ if FooterFixedText.GetText <>"lalala" then
+ errorlog " Text does not get saved!"
+ else
+ printlog " FooterFixedText works."
+
+ endif
+ FooterFixedText.SetText ""
+
+ '/// Checking Slidenumber checkbox
+ if Donotshowonfirstslide.exists = TRUE AND Donotshowonfirstslide.isVisible = TRUE then
+ Slidenumber.Check
+ sleep(1)
+
+ if Slidenumber.IsChecked then
+ printlog " Slidenumber-checkbox works"
+ else
+ warnlog " Something wrong with the slidenumber-checkbox!"
+ endif
+ else
+ warnlog " Do not show on first slide doesnt exist or is not visible!"
+ endif
+
+ '/// Checking if Slidenumber gets saved.
+ Apply.Click
+ ViewHeaderAndFooter
+
+ if Slidenumber.IsChecked then
+ printlog " Slidenumber setting is remembered."
+ else
+ warnlog " Slidenumber setting is not remembered!"
+ endif
+
+ '/// Checking "Do not show on first slide" checkbox
+ if Donotshowonfirstslide.exists = TRUE AND Donotshowonfirstslide.isVisible = TRUE then
+ Donotshowonfirstslide.UnCheck
+ sleep(1)
+ Donotshowonfirstslide.Check
+ if Donotshowonfirstslide.IsChecked then
+ printlog " Do not show on first slide-checkbox works"
+ else
+ errorlog " Something wrong with the Do not show on first slide-checkbox!"
+ endif
+ else
+ warnlog " Do not show on first slide doesnt exist or is not visible!"
+ endif
+
+ '/// Checking if Do not show on first slide is saved.
+ Apply.Click
+ ViewHeaderAndFooter
+
+ if Donotshowonfirstslide.IsChecked then
+ printlog " Do not show on first slide setting is saved."
+ else
+ warnlog " Do not show on first slide setting is not saved!"
+ endif
+
+ '/// Closing dialog with cancel
+ sleep 1
+ TabHeaderFooterSlide.Cancel
+ sleep 1
+ kontext "drawimpress"
+ sleep 1
+
+ '/// Close document
+ Call hCloseDocument
+
+endcase
+
+'----------------------------------------------------------------------------
+
+testcase tiHeaderFooterNotesHandout
+ '/// This part checks the second Tabpage of the Header and Footer Dialog for notes and handout
+
+ Call hNewDocument '/// Open New document
+ kontext "drawimpress"
+ try
+ ViewHeaderAndFooter '/// View - Header And Footer
+ sleep(1)
+ catch
+ warnlog " Could'nt open ViewHeaderAndFooter!" '/// Warnlog for not opening dialog
+ endcatch 'goto endcase
+ kontext " TabHeaderFooterSlide"
+
+ '/// Change tabpage to HeaderFooterNotesHandout
+ printlog " Testing TabHeaderFooterNotesHandout."
+ sleep 2
+ kontext
+ active.setpage TabHeaderFooterNotesHandout
+ sleep 2
+ kontext "TabHeaderFooterNotesHandout"
+
+ '/// Checking Header checkbox
+ if Header.exists = TRUE AND Header.isVisible = TRUE then
+ Header.UnCheck
+ sleep(1)
+ Header.Check
+ sleep(1)
+
+ if Header.isChecked then
+ printlog " Header-checkbox works."
+ else
+ warnlog " Header-checkbox doesn't work!"
+ endif
+
+ else
+ warnlog " Header doesnt exist or is not visible!"
+ endif
+
+ '/// Checking if Header setting is saved.
+ Header.Uncheck
+ ApplyToAll.Click
+ ViewHeaderAndFooter
+ kontext
+ active.setpage TabHeaderFooterNotesHandout
+ kontext "TabHeaderFooterNotesHandout"
+
+ if Header.IsChecked then
+ warnlog " Header should not be checked!"
+ else
+ printlog " Header not checked."
+ Header.Check
+ endif
+
+ '/// Checking if header text can be inserted
+ if HeaderFixedText.exists = TRUE AND HeaderFixedText.isVisible = TRUE then
+ HeaderFixedText.settext "lalala"
+ sleep(1)
+
+ if HeaderFixedText.gettext <> "lalala" then
+ warnlog " HeaderFixedText is wrong!"
+ else
+ printlog " HeaderFixedText works."
+ endif
+ else
+ warnlog " HeaderFixedText doesnt exist or is not visible!"
+ endif
+
+ '/// Checking if text is saved.
+ ApplyToAll.Click
+ ViewHeaderAndFooter
+ kontext
+ active.setpage TabHeaderFooterNotesHandout
+ kontext "TabHeaderFooterNotesHandout"
+ if HeaderFixedText.gettext <> "lalala" then
+ warnlog " HeaderFixedText does not get saved!"
+ else
+ printlog " HeaderFixedText gets saved."
+ endif
+ HeaderFixedText.SetText ""
+
+ '/// Checking Date And Time checkbox
+ if DateTime.exists = TRUE AND DateTime.isVisible = TRUE then
+ DateTime.UnCheck
+ sleep(1)
+ DateTime.Check
+ sleep(1)
+
+ if DateTime.isChecked then
+ printlog " DateAndTime-checkbox works."
+ else
+ warnlog " DateAndTime-checkbox doesnt work!"
+ endif
+
+ else
+ warnlog " DateTime doesnt exist or is not visible!"
+ endif
+
+ '/// Checking if Date and Time setting is saved.
+ DateTime.Uncheck
+ ApplyToAll.Click
+ ViewHeaderAndFooter
+ kontext
+ active.setpage TabHeaderFooterNotesHandout
+ kontext "TabHeaderFooterNotesHandout"
+
+ if DateTime.IsChecked then
+ warnlog " DateTime is not saved!"
+ else
+ printlog " DateTime gets saved."
+ endif
+ DateTime.Check
+
+ '/// Check DateTimeFixed can be checked/unchecked
+ if DateTimeFixed.exists = TRUE AND DateTimeFixed.isVisible = TRUE then
+
+ if DateTimeFixed.isChecked then
+ errorlog "DateTimeFixed shouldnt be checked at this point"
+ DateTimeVariable.check
+ sleep(1)
+ else
+ printlog " DateTimeFixed not checked."
+ endif
+
+ if DateTimeFixed.isChecked then
+ warnlog " Datetimefixed-checkbox doesnt work!"
+ else
+ DateTimeFixed.check
+ if DateTimeFixed.isChecked then
+ printlog " Datetimefixed checkbox works."
+ else
+ warnlog " DateTimeFixed is not checked!"
+ endif
+ endif
+ else
+ warnlog " DateTimeFixed doesnt exist or is not visible!"
+ endif
+
+ '/// Can text be inserted in the "fixed"-field?
+ if DateTimeFixedText.exists = TRUE AND DateTimeFixedText.isVisible = TRUE then
+ DateTimeFixedText.settext "lalala"
+
+ if DateTimeFixedText.gettext <> "lalala" then
+ errorlog " Error with writing in the DateTimeFixedText-field!"
+ else
+ printlog " DateTimeFixedText works."
+ endif
+
+ '/// Checking if DateTimeFixedText gets saved.
+ ApplyToAll.Click
+ ViewHeaderAndFooter
+ kontext
+ active.setpage TabHeaderFooterNotesHandout
+ kontext "TabHeaderFooterNotesHandout"
+
+ if DateTimeFixedText.GetText <> "lalala" then
+ warnlog " DateTimeFixedText does not get saved!"
+ else
+ printlog " DateTimeFixedText gets saved."
+ endif
+
+ else
+ warnlog "DateTimeFixedText doesnt exist or is not visible"
+ endif
+
+ '/// Can it be changed to "Variable" and checked?
+ if DateTimeVariable.exists = TRUE AND DateTimeVariable.isVisible = TRUE then
+ DateTimeVariable.Check
+ sleep(1)
+
+ if DateTimeVariable.IsChecked AND DateTimeFixed.IsChecked = FALSE then
+ printlog " DateTimeVariable-checkbox works."
+ else
+ warnlog " Something wrong with the DateTimeVariable-checkbox or DateTimeFormat is checked!"
+ endif
+
+ '/// Checking if DateTimeVariable setting gets saved.
+ ApplyToAll.Click
+ ViewHeaderAndFooter
+ kontext
+ active.setpage TabHeaderFooterNotesHandout
+ kontext "TabHeaderFooterNotesHandout"
+
+ if DateTimeVariable.IsChecked then
+ printlog " Variable setting gets saved."
+ else
+ warnlog " Variable setting does not get saved!"
+ endif
+
+ else
+ warnlog " DateTimeVariable doesnt exist or is not visible"
+ endif
+
+ '/// Checking format dropdown box
+ numbervalue1 = DateTimeFormat.getitemcount '/// Get the number of choices
+ printlog " DateTimeFormat equals: " + numbervalue1
+ value2 = DateTimeFormat.getseltext '/// Get the text for the choosen entry
+ printlog " Tries to get ", numbervalue1
+
+ if DateTimeFormat.exists = TRUE AND DateTimeFormat.isVisible = TRUE then
+ DateTimeFormat.select ( numbervalue1 - 1 ) '/// Select the last entry
+ value3 = DateTimeFormat.getseltext '/// Get the text for the last entry
+ printlog " DateTimeFormat is: " + value3
+
+ if value2 = value3 then
+ errorlog " More options for Date should exist." '/// Check if the first and last are the same.
+ DateTimeFormat.select value2 '/// Choose the original state
+ else
+ printlog " DateTimeFormat works."
+ endif
+
+ '/// Checking if DateTimeFormat setting gets saved.
+ ApplyToAll.Click
+ ViewHeaderAndFooter
+ kontext
+ active.setpage TabHeaderFooterNotesHandout
+ kontext "TabHeaderFooterNotesHandout"
+
+ if DateTimeFormat.GetSelText = value3 then
+ printlog " DateTimeFormat setting gets saved."
+ else
+ warnlog " DateTimeFormat setting does not get saved!"
+ endif
+
+ else
+ warnlog "DateTimeFormat does not exist or is not visible."
+ endif
+
+ if DateTimeLanguage.exists = TRUE AND DateTimeLanguage.isVisible = TRUE then
+ numbervalue1 = DateTimeLanguage.getitemcount '/// Get the number of choices
+ DateTimeFormat.select 1 '/// Choose the first entry
+ value2 = DateTimeLanguage.getseltext '/// Get the text for the choosen entry
+ DateTimeLanguage.select ( numbervalue1 - 1 ) '/// Select the last entry
+ value3 = DateTimeLanguage.getseltext '/// Get the text for the last entry
+
+ if value2 = value3 then
+ errorlog " More options for Date should exist!" '/// Check if the first and last are the same.
+ else
+ printlog " Footer works."
+ endif
+
+ '/// Checking if DateTimeLanguage setting gets saved.
+ ApplyToAll.Click
+ ViewHeaderAndFooter
+ kontext
+ active.setpage TabHeaderFooterNotesHandout
+ kontext "TabHeaderFooterNotesHandout"
+
+ if DateTimeLanguage.GetSelText = value3 then
+ printlog " DateTimeLanguage setting gets saved."
+ else
+ warnlog " DateTimeLanguage setting does not get saved!"
+ endif
+ else
+ warnlog " DateTimeLanguage does not exist!"
+ endif
+
+ '/// Checking Footer checkbox.
+ if Footer.exists = TRUE AND Footer.isVisible = TRUE then
+ Footer.UnCheck
+ sleep(1)
+ else
+ warnlog " Footer does not exists!"
+ endif
+
+ if Footer.IsChecked = TRUE then
+ warnlog "Footer should NOT be checked at this point"
+ else
+ Footer.Check
+ endif
+
+ '///Check if Footer setting is saved.
+ Footer.Uncheck
+ ApplyToAll.Click
+ ViewHeaderAndFooter
+ kontext
+ active.setpage TabHeaderFooterNotesHandout
+ kontext "TabHeaderFooterNotesHandout"
+
+ if Footer.IsChecked then
+ warnlog " Footer should not be checked!"
+ else
+ printlog " Footer is not checked."
+ endif
+ Footer.Check
+
+
+
+ '/// Checking if Footer text can be inserted
+ if FooterFixedText.exists = TRUE AND FooterFixedText.isVisible = TRUE then
+ FooterFixedText.SetText "lalala"
+ sleep(1)
+
+ if FooterFixedText.GetText <> "lalala" then
+ errorlog " Could'nt write a text to the FooterFixedText-field!"
+ else
+ printlog " FooterFixedText works."
+ endif
+
+ else
+ warnlog " FooterFixedText does not exists!"
+ endif
+
+ '///Checking if Footer text is saved.
+ ApplyToAll.Click
+ ViewHeaderAndFooter
+ kontext
+ active.setpage TabHeaderFooterNotesHandout
+ kontext "TabHeaderFooterNotesHandout"
+
+ if FooterFixedText.GetText <> "lalala" then
+ warnlog " FooterFixedText does not get saved!"
+ else
+ printlog " FooterFixedText gets saved."
+ endif
+
+ '/// Checking Slidenumber checkbox
+ if Slidenumber.exists = TRUE AND Slidenumber.isVisible = TRUE then
+ Slidenumber.UnCheck
+ sleep(1)
+
+ if Slidenumber.IsChecked = TRUE then
+ warnlog " Slidenumber should NOT be checked at this point!"
+ else
+ Slidenumber.Check
+ endif
+
+ '/// Checking if Slidenumber setting is saved.
+ ApplyToAll.Click
+ ViewHeaderAndFooter
+ kontext
+ active.setpage TabHeaderFooterNotesHandout
+ kontext "TabHeaderFooterNotesHandout"
+
+ if Slidenumber.IsChecked then
+ printlog " Slidenumber setting get saved."
+ else
+ warnlog " Slidenumber setting does not get saved!"
+ endif
+
+ else
+ warnlog " Slidenumber does'nt exist or is not visible!"
+ endif
+
+ '/// Close dialog with cancel
+ sleep 1
+ TabHeaderFooterNotesHandout.Cancel
+ sleep 1
+ kontext "drawimpress"
+ sleep 1
+
+ '/// Close document
+ Call hCloseDocument
+
+endcase
+
+'-------------------------------------------------------------------------------
diff --git a/testautomation/graphics/optional/includes/impress/i_pengine.inc b/testautomation/graphics/optional/includes/impress/i_pengine.inc
new file mode 100644
index 000000000000..4f19f254b055
--- /dev/null
+++ b/testautomation/graphics/optional/includes/impress/i_pengine.inc
@@ -0,0 +1,762 @@
+'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
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* Owner : wolfram.garten@oracle.com
+'*
+'* short description : Tests the shaddow-function on a picture
+'*
+'*******************************************************************
+'*
+' #1 tiPenginefast
+'*
+'\*******************************************************************
+
+testcase tiPenginefast
+' dim i,t,q as integer
+' dim e as string
+ dim sFileName as string
+
+'/// the Presentation-Engine consists of showing the presentation, with all it's effects. ///'
+
+'/// Create a new presentation. ///'
+ Call hNewDocument
+ sleep 1
+
+
+ '/// Open the test-file. ///'
+ Call hDateiOeffnen (gTesttoolpath + "graphics\required\input\allshapes.odp") 'effects.odp")
+
+ '/// Start the slideshow. ///'
+ CALL hTypeKeys "<F5>"
+ sleep (5)
+ kontext "DocumentPresentation"
+ DocumentPresentation.TypeKeys "<SPACE>"
+ '/// Wait for the presentation to reach a certain moment. ///'
+ sleep (10)
+ DocumentPresentation.TypeKeys "<SPACE>"
+ sleep (7)
+ DocumentPresentation.TypeKeys "<SPACE>"
+ sleep (7)
+ DocumentPresentation.TypeKeys "<SPACE>"
+ sleep (7)
+ '/// Press "Space" again, to continue with slide two. ///'
+ DocumentPresentation.TypeKeys "<SPACE>"
+ sleep (7)
+ DocumentPresentation.TypeKeys "<SPACE>"
+ sleep (7)
+ DocumentPresentation.TypeKeys "<SPACE>"
+ sleep (7)
+ DocumentPresentation.TypeKeys "<SPACE>"
+ sleep (7)
+ '/// And press "Space" again, to exit the presentation-mode. ///'
+ DocumentPresentation.TypeKeys "<SPACE>"
+
+ FileClose
+
+ Call hNewDocument
+ sleep 1
+ '/// Open the test-file. ///'
+ Call hDateiOeffnen (gTesttoolpath + "graphics\required\input\effects.odp")
+ '/// Start the slideshow. ///'
+ CALL hTypeKeys "<F5>"
+ sleep (200)
+ '/// Press "Space" again, to continue with slide two. ///'
+ kontext "DocumentPresentation"
+ DocumentPresentation.TypeKeys "<SPACE>"
+ sleep (40)
+ printlog "End of first page."
+ DocumentPresentation.TypeKeys "<SPACE>"
+ sleep (12)
+ printlog "End of second page."
+ DocumentPresentation.TypeKeys "<SPACE>"
+ sleep (25)
+ printlog "End of third page."
+ DocumentPresentation.TypeKeys "<SPACE>"
+ sleep (15)
+ printlog "End of fourth page."
+ DocumentPresentation.TypeKeys "<SPACE>"
+ sleep (2)
+ printlog "End of fifth page."
+ DocumentPresentation.TypeKeys "<SPACE>"
+ printlog "End of sixth page."
+ DocumentPresentation.TypeKeys "<SPACE>"
+ sleep (5)
+ printlog "End of seventh page."
+ DocumentPresentation.TypeKeys "<SPACE>"
+ sleep (1)
+ printlog "End of eight page."
+ DocumentPresentation.TypeKeys "<SPACE>"
+ sleep (1)
+ printlog "End of ninth page."
+ DocumentPresentation.TypeKeys "<SPACE>"
+ sleep (1)
+ printlog "End of tenth page."
+ DocumentPresentation.TypeKeys "<SPACE>"
+ sleep (7)
+ printlog "End of eleventh page."
+ if DocumentPresentation.Exists then
+ warnlog "DocumentPresentation shouldnt be visible right now."
+ DocumentPresentation.TypeKeys "<SPACE>"
+ else
+ printlog "Presentation ended correctly."
+ kontext "DocumentImpress"
+ end if
+
+'/// Insert a new slide. ///'
+' InsertSlide
+' sleep 2
+' hTypekeys "<Pagedown>"
+' sleep 2
+
+'/// Menu: Slideshow: Check every menu-item. ///'
+
+'Exists:
+' #1 tSlideShowSlideShow
+' #1 tSlideShowRehearseTimings
+' #1 tSlideShowSlideShowSettings
+' #1 tSlideShowCustomSlideShow
+' #1 tSlideShowSlideTransition
+' #1 tSlideShowShowHideSlide
+
+' Slideshow menu 1 - Slide show
+' Slideshow menu 2 - Slide show settings
+' Slideshow menu 3 - Rehearse timings
+' Slideshow menu 4 - Interaction
+' Slideshow menu 6 - Slide Transition
+' Slideshow menu 7 - Show / Hide slide
+' Slideshow menu 8 - Custom Slide show
+
+
+'Printlog " Here starts the test "
+
+'Presentation - Start / Stop. Different ways to do it.
+'Presentation - Effects.
+'LeftWindow
+
+'/// Slideshow Settings: Range: test all three alternatives. ///'
+'/// Test if the Slideshow-types (Default, Window, Auto) works. ///'
+'/// Check if the checkboxes works. ///'
+'/// Close dialogue. ///'
+'/// Add an object. ///'
+'/// Custom Animation: Add an Animation to the object. ///'
+'/// Run the slideshow. ///'
+
+'/// Change to the next effect and continue through every animation in ///'
+'/// Entrance, Emphasis, Exit and Motion Paths. ///'
+'/// While testing - test the speed-choices for every kind of animation. ///'
+'/// Check if the "Change" and "Remove"-buttons. ///'
+'/// Check the Start, "Direction" and "Speed" variables. ///'
+'/// Add two effects to one object and change the order. ///'
+'/// Try the Play and "Slide Show"-button. ///'
+'/// Try the Automatic preview-button. ///'
+
+'/// Slidetransition. ///'
+'/// Go through every kind of effect, speed, and sound. ///'
+'/// Check loop until next sound. ///'
+'/// Check the Advance slide with mouseclick-function. ///'
+'/// Check the "Apply to all slides", "Play", and "Slide Show"-buttons. ///'
+'/// Check Automatic preview. ///'
+
+'/// Some effects doesnt have a right / left orientation. Test these. ///'
+'/// Possibility: check random effects and see if something hangs. ///'
+
+'/// Load/Save-test: Does the settings last? ///'
+
+'/// Are two different objects dependant or independent from each other? ///'
+
+'/// Close Application ///'
+ Call hCloseDocument
+ Printlog "Finished Optional-test for Presentation-Engine"
+endcase
+
+
+testcase tSlideShowInteraction
+ Dim Datei$
+ Dim i as integer
+ Dim Zaehler as integer
+ dim b115364 as boolean
+
+ Datei$ =ConvertPath (gOfficePath + "user\work\interac.sxi")
+
+' '/// save file as presentation with name '"user\\work\\diashow.sxi")' ///'
+' hFileSaveAsWithFilterKill ( sFile , gImpressFilter, FALSE )
+' Printlog "saved presetation: '" + sFile + "'"
+
+ '/// open application ///'
+ Call hNewDocument
+ sleep 5
+ setStartCurrentPage(FALSE) '/// Set "start with current page to OFF ///'
+
+ '/// call 'Insert->Slide' three times and name the slides 2, 3, 4 and create a rectangle on it ///'
+ '///+ we now have 4 slides ?! :-) ///'
+ for i = 2 to 4
+ InsertSlide
+ sleep 2
+ hTypekeys "<Pagedown>"
+ sleep 2
+ Call hRechteckErstellen (i*10,i*10,i*20,i*20)
+ sleep 2
+ next i
+
+ '/// check state of navigator ! expected: closed -> open navigator ///'
+ Kontext "Navigator"
+ if Navigator.exists then
+ warnlog "Navigator: already open :-("
+ else
+ printlog "Navigator: NOT available :-( will be opened now!"
+ ViewNavigator
+ endif
+ sleep 3
+
+ '/// Slide Show->Interaction ///'
+ SlideShowInteraction
+ Kontext "TabInteraktion"
+ sleep 1
+ if AktionBeiMausklick.GetItemCount = 13 Then
+ Printlog "- List is complete"
+ else
+ Warnlog "- Number of possible actions is wrong. It should be: 13, but it is: " + AktionBeiMausklick.GetItemCount
+ end if
+ sleep 1
+
+ AktionBeiMausklick.Select 1 'Keine Aktion bei Mausclick
+ Printlog (AktionBeiMausklick.GetSelText + " chosen")
+ If Durchsuchen.IsVisible then Warnlog "- Control should be invisible because AktionBeiMausklick = " + AktionBeiMausKlick.GetSelText
+ sleep 1
+
+ Kontext "TabInteraktion"
+ AktionBeiMausklick.Select 2 'Sprung zur vorhergehenden Seite
+ Printlog (AktionBeiMausklick.GetSelText + " chosen")
+ if Durchsuchen.IsVisible Then Warnlog "- Control should be invisible, beacause Action = " + AktionBeiMausKlick.GetSelText
+ TabInteraktion.OK
+ sleep 2
+ Kontext "DocumentImpress"
+ gMouseClick 90,90
+ sleep 1
+ gMouseClick 50,50
+ sleep 2
+
+ Kontext "NavigatorDraw"
+ sleep 2
+ if Not Liste.GetSelIndex = 3 Then
+ Warnlog "- jumped to wrong slide"
+ else
+ Printlog "- jumped to correct slide"
+ end if
+ sleep 1
+
+ Kontext "DocumentImpress"
+ EditSelectAll
+ sleep 1
+
+ SlideShowInteraction
+ sleep 2
+ Kontext "TabInteraktion"
+ AktionBeiMausklick.select 3 'Sprung zur naechsten Seite
+ Printlog (AktionBeiMausKlick.GetSelText + " chosen")
+ TabInteraktion.OK
+ sleep 1
+
+ Kontext "DocumentImpress"
+ gMouseClick 90,90
+ sleep 2
+ gMouseClick 50,50
+ Kontext "NavigatorDraw"
+ if Liste.GetSelIndex <> 4 Then
+ Warnlog "- Jumped to wrong slide"
+ else
+ Printlog " Jumped to correct slide"
+ end if
+ sleep 1
+ kontext "DocumentImpress"
+ EditSelectAll
+ sleep 1
+
+ SlideShowInteraction
+ sleep 1
+ Kontext "TabInteraktion"
+ AktionBeiMausklick.select 4 'Sprung zur ersten Seite
+ Printlog AktionBeiMausKlick.GetSelText
+ sleep 1
+ TabInteraktion.OK
+ sleep 1
+ Kontext "DocumentImpress"
+ gMouseClick 90,90
+ gMouseClick 50,50
+ Kontext "NavigatorDraw"
+ if Liste.GetSelIndex <> 1 Then Warnlog "- jumped to wrong slide"
+ Letzte.Click 'Liste.Select 4
+ Kontext "DocumentImpress"
+ EditSelectAll
+ sleep 2
+
+ try
+ SlideShowInteraction
+ catch
+ warnlog "SlideshowInteraction diasabled :-("
+ endcatch
+ Kontext "TabInteraktion"
+ AktionBeiMausklick.select 5 'Sprung zur letzten Seite
+ printlog AktionBeiMausKlick.GetSelText
+ TabInteraktion.OK
+ sleep 1
+ Kontext "NavigatorDraw"
+ if Not Liste.GetSelIndex = 1 Then Warnlog "- jumped to wrong slide"
+
+ kontext "DocumentImpress"
+ Call hRechteckErstellen 20,20,50,50
+ sleep 1
+ EditSelectAll
+ sleep 1
+ try
+ FormatGroupGroup
+ catch
+ warnlog "GROUP?"
+ endcatch
+ sleep 1
+
+ SlideShowInteraction
+ Kontext "TabInteraktion"
+ AktionBeiMausklick.select 6 'Sprung zu Seite oder Objekt
+ printlog AktionBeiMausKlick.GetSelText
+ sleep 2
+ if Not ListeSprungZuSeiteObjekt.IsVisible Then Warnlog " list seems to be invisible"
+ Seite.SetText S2
+ Suchen.Click
+ if ListeSprungZuSeiteObjekt.GetSelIndex <> 3 Then Warnlog " Search does not work"
+ printlog ListeSprungZuSeiteObjekt.GetSelIndex
+ TabInteraktion.OK
+ sleep 1
+
+ Kontext "DocumentImpress"
+ gMouseClick 90,90
+ gMouseClick 25,25,
+ sleep 2
+ Kontext "NavigatorDraw"
+ if Liste.GetSelIndex <> 2 Then Warnlog "- Jumped to wrong destination"
+ printlog Liste.GetSelIndex
+ Liste.Select 4
+ Kontext "DocumentImpress"
+ EditSelectAll
+ sleep 1
+
+ Kontext "DocumentImpress"
+ EditSelectAll
+ sleep 1
+ SlideShowInteraction
+ Kontext "TabInteraktion"
+ sleep 1
+ AktionBeiMausKlick.Select 7 'Sprung zu Dokument
+ Printlog AktionBeiMausKlick.GetSelText + " chosen"
+ try
+ Durchsuchen.Click
+ sleep 1
+ Kontext "OeffnenDlg"
+ sleep 1
+ Dateiname.SetText ConvertPath (gTesttoolPath + "graphics\required\input\recht_49.sxi")
+ Oeffnen.Click
+ sleep 10
+ ' 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
+ catch
+ Warnlog "- Search button could not be accessed"
+ endcatch
+ sleep 1
+ Kontext "TabInteraktion"
+ sleep 1
+ TabInteraktion.OK
+ sleep 3
+ Kontext "DocumentImpress"
+ DocumentImpress.MouseDown 90,90
+ DocumentImpress.MouseUp 90,90
+ sleep 2
+ Kontext "DocumentImpress"
+ DocumentImpress.Mousedown 30,30
+ kontext
+ b115364 = false
+ if messagebox.exists then
+ printlog "baeh: '" + messagebox.gettext + "'"
+ try
+ messagebox.ok ' was default in so7
+ catch
+ warnlog "behaviour changed #115364# mother document gets closed :-("
+ if fileExists(ConvertPath (gOfficePath + "user\work\bug115364.sxi")) then
+ kill ConvertPath (gOfficePath + "user\work\bug115364.sxi")
+ endif
+ messagebox.yes ' don't save changes, before going on!
+ b115364 = true
+ kontext "SpeichernDlg"
+ Dateiname.setText ConvertPath (gOfficePath + "user\work\bug115364.sxi")
+ Speichern.click
+ sleep 10
+ endcatch
+ else
+ printlog "OK :-)"
+ endif
+ Kontext "DocumentImpress"
+ DocumentImpress.MouseUp 30,30
+
+ try
+ ViewDrawing
+ sleep 1
+ Kontext "DocumentImpress"
+ DocumentImpress.MouseDown 25,25
+ DocumentImpress.MouseUp 25,25
+ catch
+ Warnlog "- Jump to document did not work or preview window did not appear"
+ endcatch
+ sleep 2
+ if (not b115364) then
+ Call hCloseDocument
+ else
+ Call hCloseDocument
+ hDateiOeffnen (ConvertPath (gOfficePath + "user\work\bug115364.sxi"))
+ endif
+ sleep 5
+
+ Kontext "NavigatorDraw"
+ sleep 1
+ Naechste.click
+
+ Kontext "DocumentImpress"
+ EditSelectAll
+ sleep 1
+
+ SlideShowInteraction
+ Kontext "TabInteraktion"
+ sleep 1
+ AktionBeiMausKlick.Select 9
+ Printlog AktionBeiMausKlick.GetSelText + " chosen"
+ sleep 1
+ Tabinteraktion.OK
+ sleep 2
+
+ SlideShowInteraction
+ Kontext "TabInteraktion"
+ sleep 1
+ if not AktionBeiMausKlick.GetSelIndex = 9 Then Warnlog "- Not the right action chosen"
+ sleep 1
+ AktionBeiMausKlick.Select 9 'Klang abspielen
+ Printlog AktionBeiMausKlick.GetSelText + "- chosen"
+ sleep 1
+ Tabinteraktion.OK
+ sleep 2
+ Kontext "NavigatorDraw"
+ sleep 1
+ Liste.Select 2
+ Kontext "DocumentImpress"
+ EditSelectAll
+ sleep 1
+ SlideShowInteraction
+ Kontext "TabInteraktion"
+ sleep 1
+ Durchsuchen.Click
+ sleep 1
+ Kontext "OeffnenDlg"
+ sleep 1
+ Dateiname.SetText ConvertPath (gTesttoolPath + "graphics\required\input\blip.wav")
+ sleep 1
+ Oeffnen.Click
+ sleep 1
+ Kontext "Active"
+ if Active.Exists Then
+ Warnlog Active.GetText + " Gallery might be empty"
+ Active.OK
+ sleep 1
+ Kontext "OeffnenDlg"
+ OeffnenDlg.Cancel
+ sleep 1
+ end if
+ Kontext "TabInteraktion"
+ SetClipboard Klangwahl.GetText
+ TabInteraktion.OK
+ sleep 1
+ SlideShowInteraction
+ Kontext "TabInteraktion"
+ sleep 1
+ if Klangwahl.GetText <> GetClipboardText then Warnlog "- Not the right sound chosen"
+ TabInteraktion.OK
+ sleep 1
+ InsertGraphicsFromFile
+ sleep 1
+ Kontext "GrafikeinfuegenDlg"
+ sleep 1
+ if Verknuepfen.IsChecked then Verknuepfen.UnCheck
+ Dateiname.SetText ConvertPath (gTesttoolPath + "global\input\graf_inp\enter.bmp")
+ Oeffnen.Click
+ sleep 3
+ Kontext "NavigatorDraw"
+ sleep 1
+ Liste.Select 4
+ sleep 1
+ SlideShowInteraction
+ Kontext "TabInteraktion"
+ sleep 1
+ AktionBeiMausKlick.Select 11 'Objektaktion ausfuehren
+ Printlog AktionBeiMausKlick.GetSelText + " chosen"
+ sleep 1
+ Zaehler=Effekt.GetItemCount
+ for i=1 to Zaehler
+ Effekt.Select i
+ Printlog Effekt.GetSelText + " chosen"
+ if i=1 Then
+ if Langsam.IsEnabled Then Warnlog "- Control should not be enabled, because no effect chosen"
+ if Mittel.IsEnabled Then Warnlog "- Control should not be enabled, because no effect chosen"
+ if Schnell.IsEnabled Then Warnlog "- Control should not be enabled, because no effect chosen"
+ end if
+ sleep 1
+
+ TabInteraktion.OK
+ sleep 1
+ SlideShowInteraction
+ Kontext "TabInteraktion"
+ sleep 1
+ next i
+ TabInteraktion.OK
+ sleep 1
+ SlideShowInteraction
+ Kontext "TabInteraktion"
+ sleep 1
+ AktionBeiMausKlick.Select 10 'Objekt ausblenden
+ Printlog AktionBeiMausKlick.GetSelText + " chosen"
+ ListeObjektAktion.Select 1
+ sleep 1
+ TabInteraktion.OK
+ sleep 1
+ gMouseClick 90,90
+ sleep 1
+ gMouseClick 55,55
+ sleep 1
+ Kontext "DocumentImage"
+
+ SlideShowInteraction
+ Kontext "TabInteraktion"
+ sleep 1
+ AktionBeiMausKlick.Select 13 'Makro
+ Printlog AktionBeiMausKlick.GetSelText + " chosen"
+ sleep 2
+ Durchsuchen.Click
+ sleep 5
+ Kontext "Makro"
+ sleep 5
+ Makro.Cancel
+ sleep 2
+ Kontext "TabInteraktion"
+ sleep 1
+ TabInteraktion.OK
+ sleep 3
+
+ SlideShowInteraction
+ Kontext "TabInteraktion"
+ sleep 2
+ if not AktionBeiMausKlick.GetSelIndex = 12 Then Warnlog "- Wrong action used"
+ sleep 1
+ AktionBeiMausKlick.Select 14 'Praesentation beenden
+ Printlog AktionBeiMausKlick.GetSelText
+ Tabinteraktion.OK
+ sleep 1
+
+ SlideShowPresentationSettings
+ Kontext "Bildschirmpraesentation"
+ if not Fenster.IsChecked Then Fenster.Check
+ BildschirmPraesentation.OK
+ sleep 2
+ Kontext "DocumentImpress"
+ DocumentImpress.TypeKeys "<MOD1 F2>"
+ sleep 5
+ Kontext "DocumentPresentation"
+ sleep 2
+ DocumentPresentation.MouseDown 50,50
+ DocumentPresentation.MouseUp 50,50
+ sleep 5
+ try
+ Kontext "DocumentImpress"
+ EditSelectAll
+ Printlog "- Slideshow ended at right point"
+ catch
+ Warnlog "- Program is still in slideshow mode"
+ Kontext "DocumentPresentation"
+ DocumentPresentation.TypeKeys "<ESCAPE>"
+ endcatch
+
+ Kontext "DocumentImpress"
+ DocumentImpress.TypeKeys "<SHIFT MOD1 F5>"
+ sleep 3
+ setStartCurrentPage(TRUE) '/// Set "start with current page to ON = Default ///'
+ Call hCloseDocument
+endcase
+
+' Slideshow menu 5 - Custom Animation
+
+testcase tSlideShowCustomAnimation
+ dim bError as boolean
+
+ '/// open application ///'
+ Call hNewDocument
+ '/// create textbox with text ///'
+ Call hTextrahmenErstellen ("Test text to test text effects", 10, 10, 20, 40 )
+ '/// Slide Show->Custom Animation... ///'
+ SlideShowCustomAnimation
+ Kontext "Tasks"
+ '/// click button 'Add...' ///'
+ EffectAdd.click
+ '/// Dialog 'Custom Animation' comes up ///'
+ kontext
+ '/// Switch to TabPage: Entrance ///'
+ active.setPage(TabEntrance)
+ kontext "TabEntrance"
+ if TabEntrance.exists(5) then
+ DialogTest(TabEntrance)
+ '/// select in the listbox 'Effects' the second entry ///'
+ Effects.select(2)
+ Speed.getItemCount
+ AutomaticPreview.unCheck
+ sleep 1
+ AutomaticPreview.Check
+ kontext
+ '/// Switch to TabPage: Emphasis ///'
+ active.setPage(TabEmphasis)
+ kontext "TabEmphasis"
+ if TabEmphasis.exists(5) then
+ DialogTest(TabEmphasis)
+ else
+ bError = true
+ warnlog "Impress:Tasks Pane:Custom Animation:TabEmphasis tabPage doesn't work."
+ endif
+ kontext
+ '/// Switch to TabPage: Exit ///'
+ active.setPage(TabExit)
+ kontext "TabExit"
+ if TabExit.exists(5) then
+ DialogTest(TabExit)
+ else
+ bError = true
+ warnlog "Impress:Tasks Pane:Custom Animation:TabExit tabPage doesn't work."
+ endif
+ kontext
+ '/// Switch to TabPage: Motion Paths ///'
+ active.setPage(TabMotionPaths)
+ kontext "TabMotionPaths"
+ if TabMotionPaths.exists(5) then
+ DialogTest(TabMotionPaths)
+ Effects.select(2)
+ else
+ bError = true
+ warnlog "Impress:Tasks Pane:Custom Animation:TabMotionPaths tabPage doesn't work."
+ endif
+ '/// Close dialog 'Custom Animation' with 'OK' ///'
+ TabMotionPaths.OK
+ bError = false
+ else
+ bError = true
+ warnlog "Impress:Tasks Pane:Custom Animation:Add... button didn't work."
+ endif
+ Kontext "Tasks"
+ if (NOT bError) then
+ '/// click button 'Change...' ///'
+ EffectChange.click
+ '/// Dialog 'Custom Animation' comes up ///'
+ kontext
+ '/// Switch to TabPage: Entrance ///'
+ active.setPage(TabEntrance)
+ kontext "TabEntrance"
+ if (NOT TabEntrance.exists(5)) then
+ warnlog "Impress:Tasks Pane:Custom Animation:Change... button didn't work."
+ endif
+ TabEntrance.cancel
+ Kontext "Tasks"
+ EffectStart.getItemCount
+ if EffectProperty.isEnabled then
+ EffectProperty.getItemCount
+ endif
+ '/// CLick on button '...' (Options) ///'
+ EffectOptions.click
+ kontext "TabEffect"
+ if TabEffect.exists(5) then
+ dialogTest(TabEffect)
+ Sound.getItemCount
+ AfterAnimation.getItemCount
+ '/// switch to TabPage 'Timing' ///'
+ Kontext
+ active.setPage TabTiming
+ kontext "TabTiming"
+ if TabTiming.exists(5) then
+ dialogTest(TabTiming)
+ TimingStart.getItemCount
+ Delay.getText
+ Speed.getItemCount
+ Repeat.getItemCount
+ Rewind.ischecked
+ TriggerAnimate.isChecked
+ TriggerStart.isChecked
+ Shape.getItemCount
+ else
+ warnlog "Impress:Tasks Pane:Custom Animation:Effect Options: Timing TabPage didn't work."
+ endif
+ '/// switch to TabPage 'Timing' ///'
+ Kontext
+ active.setPage TabTextAnimation
+ kontext "TabTextAnimation"
+ if TabTextAnimation.exists(5) then
+ dialogTest(TabTextAnimation)
+ GroupText.getItemCount
+ AnimateAttachedShape.isChecked
+ TabTextAnimation.cancel
+ else
+ warnlog "Impress:Tasks Pane:Custom Animation:Effect Options: TextAnimation TabPage didn't work."
+ endif
+ else
+ warnlog "Impress:Tasks Pane:Custom Animation:... button didn't work."
+ endif
+ Kontext "Tasks"
+ EffectSpeed.getItemCount
+ EffectList.getItemCount
+ EffectPlay.click
+ EffectSlideShow.click
+ sleep 1
+ kontext "DocumentPresentation"
+ if DocumentPresentation.exists (5) then
+ printlog "Presentation started :-)"
+ DocumentPresentation.typeKeys "<escape>"
+ else
+ warnlog "Impress:Tasks Pane:Custom Animation:Slide Show button doesn't start slideshow!"
+ endif
+ kontext "Tasks"
+ EffectAutomaticPreview.isChecked
+ '/// click button 'Remove' ///'
+ EffectRemove.click
+ endif
+ '/// close application ///'
+ Call hCloseDocument
+endcase
+
diff --git a/testautomation/graphics/optional/includes/impress/i_pengine1.inc b/testautomation/graphics/optional/includes/impress/i_pengine1.inc
new file mode 100644
index 000000000000..44f531c47fcd
--- /dev/null
+++ b/testautomation/graphics/optional/includes/impress/i_pengine1.inc
@@ -0,0 +1,1356 @@
+'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
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* Owner : wolfram.garten@oracle.com
+'*
+'* short description : Tests the Engine for Presentation
+'*
+'*******************************************************************
+'*
+' #1 tiPengineTabEntrance
+' #1 tiPengineTabEmphasis
+' #1 tiPengineTabExit
+' #1 tiPengineTabMotionPaths
+' #1 tiPengineSlideTransition
+' #1 tiPengineTabpageEntrance2
+' #1 tiPengineTabPageEmphasis2
+' #1 tiPengineTabPageExit2
+' #1 tiPengineTabPageMotionPaths2
+'*
+'\*******************************************************************
+
+testcase tiPengineTabEntrance
+ dim bError as boolean
+ dim e as integer
+ dim d as integer
+ dim i as integer
+ dim l as integer
+ dim o as integer
+ dim p as integer
+ dim q as integer
+ dim s as integer
+ dim t as integer
+ dim u as integer
+ dim w as integer
+ dim Effectname1 as string
+ dim StartName1 as string
+ dim PropertyName1 as string
+ dim UsedEffect as string
+ dim NewEffect as string
+
+'/// open application ///'
+Call hNewDocument
+'/// create textbox with text ///'
+Call hTextrahmenErstellen ("Test text to test text effects", 35, 35, 70, 70 )
+'/// Slide Show->Custom Animation... ///'
+SlideShowCustomAnimation
+ Kontext "Tasks"
+ '/// click button 'Add...' ///'
+ EffectAdd.click
+ '/// Dialog 'Custom Animation' comes up ///'
+ kontext
+
+ '/// Switch to TabPage: Entrance ///'
+ active.setPage(TabEntrance)
+ kontext "TabEntrance"
+ if TabEntrance.exists(5) then
+ DialogTest(TabEntrance)
+ AutomaticPreview.UnCheck
+ Printlog "Testing effects in - TabEntrance"
+ i = Effects.GetItemCount
+ For o = 1 to 1'2
+ p = 7555
+ Effects.TypeKeys "<HOME>"
+ For e = 1 to i
+ sleep 1
+ Printlog "Effect Nr: " + (Effects.GetSelIndex -1) + ". Name: " + Effects.GetSelText
+ Effectname1 = Effects.GetSelText
+ NewEffect = Effectname1
+
+ if UsedEffect = NewEffect then
+ Warnlog "Wrong effect? The recently tested Effect was: " + Effects.GetSelIndex + ": " + UsedEffect + " and the new one: " + Effects.GetSelIndex + ": " + NewEffect
+ endif
+ UsedEffect = NewEffect
+
+ if AutomaticPreview.IsChecked = TRUE then sleep 1
+ d = Effects.GetSelIndex
+ TabEntrance.Ok
+ Kontext "Tasks"
+ if EffectStart.isEnabled then
+ t = EffectStart.GetItemCount
+ for u = 1 to 1't
+ EffectStart.Select u
+ printlog "EffectStart selected " + EffectStart.GetSelText
+ StartName1 = EffectStart.GetSelText
+ if EffectProperty.Exists then
+ if EffectProperty.isEnabled then
+ if EffectProperty.isVisible then
+ printlog "EffectProperty.!"
+ w = EffectProperty.GetItemCount
+ if w > 0 then
+ for l = 1 to w
+ EffectProperty.Select l
+ sleep 1
+ PropertyName1 = EffectProperty.GetSelText
+ printlog "Properties for the effect: " + PropertyName1
+' EffectSlideShow.Click
+' Sleep (2)
+' kontext "DocumentPresentation"
+' if DocumentPresentation.Exists (15) then
+' DocumentPresentation.TypeKeys "<Space>"
+' if DocumentPresentation.Exists (15) then
+' DocumentPresentation.TypeKeys "<Space>"
+' endif
+' Sleep (3)
+' if DocumentPresentation.Exists (15) then
+' DocumentPresentation.TypeKeys "<Escape>"
+' endif
+' else
+' Warnlog "Effect: " + Effectname1 + " didn't work when it started with: " + StartName1 + "and ended with: " + PropertyName1
+' endif
+' sleep (2)
+ Kontext "Tasks"
+ Next l
+ endif
+ endif '1
+ endif '2
+ elseif EffectDirection.Exists then
+ if EffectDirection.isEnabled then
+ if EffectDirection.isVisible then
+ w = EffectDirection.GetItemCount
+ if w > 0 then
+ for l = 1 to 1'w
+ EffectDirection.Select l
+ PropertyName1 = EffectDirection.GetSelText
+ printlog "Properties for the effect: " + PropertyName1
+ sleep (5)
+' EffectSlideShow.Click
+' Sleep (2)
+' kontext "DocumentPresentation"
+' if DocumentPresentation.Exists (15) then
+' DocumentPresentation.TypeKeys "<Space>"
+' if DocumentPresentation.Exists (15) then
+' DocumentPresentation.TypeKeys "<Space>"
+' endif
+' Sleep (3)
+' if DocumentPresentation.Exists (15) then
+' DocumentPresentation.TypeKeys "<Escape>"
+' endif
+' else
+' warnlog "Effect: " + Effectname1 + " didn't work when it started with: " + StartName1 + "and ended with: " + PropertyName1
+' endif
+ Kontext "Tasks"
+ sleep (2)
+ Next l
+ else
+ warnlog "EffectDirection.isEnabled AND EffectDirection.isVisible, but no items selectable? Effect was: " + Effectname1
+ endif
+ endif '1
+ endif '2
+ endif '3
+ kontext "EffectProperty"
+ Next u
+ Endif
+
+ Kontext "Tasks"
+ if Tasks.Exists then
+ EffectChange.Click
+ else
+ Printlog "Presentation didn't end. Error?"
+ endif
+ kontext "TabEntrance"
+ Effects.TypeKeys "<DOWN>", e '/// Select the next entry ///'
+ p = Effects.GetSelIndex
+ If p = d Then e = i
+ Next e
+ kontext "TabEntrance"
+
+ e = 0
+ if Speed.GetItemCount = 0 then
+ warnlog " 'Speed' has 0 entries. Check it."
+ else
+ do while (e < 1)
+ e = Int(Speed.GetItemCount * Rnd)
+ loop
+ try
+ Speed.Select (e)
+ catch
+ qaerrorlog "#i89498, Custom animation speed field is greyed out"
+ endcatch
+ endif
+ Printlog "Test of Entrance-list ended."
+ Next o
+ kontext
+
+ '/// Switch to TabPage: Entrance ///'
+ active.setPage(TabEntrance)
+ kontext "TabEntrance"
+ if TabEntrance.exists(5) then
+ Effects.Select 4
+ '/// Close dialog 'Custom Animation' with 'OK' ///'
+ TabEntrance.OK
+ else
+ warnlog "Error when switching Tab"
+ endif
+ bError = false
+ else
+ bError = true
+ warnlog "Impress:Tasks Pane:Custom Animation:Add... button didnt work."
+ endif
+ kontext "Tasks"
+ EffectAutomaticPreview.Check
+ '/// click button 'Remove' ///'
+ EffectRemove.Click
+ '/// close application ///'
+ Call hCloseDocument
+endcase
+
+'------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+
+testcase tiPengineTabEmphasis
+ dim bError as boolean
+ dim e as integer
+ dim d as integer
+ dim i as integer
+ dim l as integer
+ dim o as integer
+ dim p as integer
+ dim q as integer
+ dim s as integer
+ dim t as integer
+ dim u as integer
+ dim w as integer
+ dim Effectname1 as string
+ dim StartName1 as string
+ dim PropertyName1 as string
+ dim UsedEffect as string
+ dim NewEffect as string
+
+ '/// open application ///'
+ Call hNewDocument
+ '/// create textbox with text ///'
+ Call hTextrahmenErstellen ("Test text to test text effects", 35, 35, 70, 70 )
+ '/// Slide Show->Custom Animation... ///'
+ SlideShowCustomAnimation
+ Kontext "Tasks"
+ '/// click button 'Add...' ///'
+ EffectAdd.click
+ '/// Dialog 'Custom Animation' comes up ///'
+ kontext
+
+ '/// Switch to TabPage: Emphasis ///'
+ kontext
+ active.setPage(TabEmphasis)
+ kontext "TabEmphasis"
+ if TabEmphasis.exists(10) then
+ Printlog "Testing effects in - TabEmphasis"
+ i = Effects.GetItemCount
+ For o = 1 to 2
+ p = 7555
+ Effects.TypeKeys "<HOME>"
+ For e = 1 to 1'i
+ sleep 2
+ Printlog "Effect Nr: " + (Effects.GetSelIndex -1) + ". Name: " + Effects.GetSelText
+ Effectname1 = Effects.GetSelText
+ if AutomaticPreview.IsChecked = TRUE then sleep 1
+ d = Effects.GetSelIndex
+ TabEmphasis.Ok
+ Kontext "Tasks"
+ if EffectStart.isEnabled then
+ t = EffectStart.GetItemCount
+ for u = 1 to t
+ EffectStart.Select u
+ StartName1 = EffectStart.GetSelText
+ printlog "EffectStart selected " + StartName1
+
+ if EffectProperty.Exists then
+ if EffectProperty.isEnabled then
+ if EffectProperty.isVisible then
+ w = EffectProperty.GetItemCount
+ if w > 0 then
+ for l = 1 to 1'w
+ EffectProperty.Select l
+ PropertyName1 = EffectProperty.GetSelText
+ printlog "Properties for the effect: " + PropertyName1
+ sleep 1
+' EffectSlideShow.Click
+' Sleep (2)
+' kontext "DocumentPresentation"
+' if DocumentPresentation.Exists (15) then
+' DocumentPresentation.TypeKeys "<Space>"
+' if DocumentPresentation.Exists (15) then
+' DocumentPresentation.TypeKeys "<Space>"
+' endif
+' Sleep (3)
+' if DocumentPresentation.Exists (15) then
+' DocumentPresentation.TypeKeys "<Escape>"
+' endif
+' else
+' Warnlog "Effect: " + Effectname1 + " didn't work when it started with: " + StartName1 + "and ended with: " + PropertyName1
+' endif
+' sleep (2)
+ Kontext "Tasks"
+ Next l
+ endif
+ Else
+ Printlog "No effect properties for " + StartName1
+ sleep 1
+' EffectSlideShow.Click
+' Sleep (2)
+' kontext "DocumentPresentation"
+' if DocumentPresentation.Exists (15) then
+' DocumentPresentation.TypeKeys "<Space>"
+' if DocumentPresentation.Exists (15) then
+' DocumentPresentation.TypeKeys "<Space>"
+' endif
+' Sleep (3)
+' if DocumentPresentation.Exists (15) then
+' DocumentPresentation.TypeKeys "<Escape>"
+' endif
+' else
+' Warnlog "Effect: " + Effectname1 + " didn't work when it started with: " + StartName1
+' endif
+' sleep (2)
+ Kontext "Tasks"
+ Endif
+ endif
+ endif
+ Next u
+ Endif
+ Kontext "Tasks"
+ if Tasks.Exists then
+ EffectChange.Click
+ else
+ Printlog "Presentation didn't end. Error?"
+ endif
+ '/// Switch to TabPage: Emphasis ///'
+ kontext
+ active.setPage(TabEmphasis)
+ kontext "TabEmphasis"
+ Effects.TypeKeys "<DOWN>", e + 1 '/// Select the next entry ///'
+ p = Effects.GetSelIndex
+ If p = d Then e = i
+ Next e
+ kontext "TabEmphasis"
+
+ e = 0
+ if Speed.GetItemCount = 0 then
+ warnlog " 'Speed' has 0 entries. Check it."
+ else
+ do while (e < 1)
+ e = Int(Speed.GetItemCount * Rnd)
+ loop
+ Speed.Select (e)
+ endif
+
+ Printlog "Test of Entrance-list ended."
+ Next o
+ else
+ bError = true
+ warnlog "Impress:Tasks Pane:Custom Animation:TabExit tabPage doesnt work."
+ endif
+ kontext
+
+ '/// Switch to TabPage: Entrance ///'
+ active.setPage(TabEntrance)
+ kontext "TabEntrance"
+ if TabEntrance.exists(5) then
+ Effects.Select 4
+ '/// Close dialog 'Custom Animation' with 'OK' ///'
+ TabEntrance.OK
+ else
+ warnlog "Error when switching Tab"
+ endif
+ bError = false
+ kontext "Tasks"
+ EffectAutomaticPreview.Check
+ '/// click button 'Remove' ///'
+ EffectRemove.Click
+ '/// close application ///'
+ Call hCloseDocument
+endcase
+
+'------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+
+testcase tiPengineTabExit
+ dim bError as boolean
+ dim e as integer
+ dim d as integer
+ dim i as integer
+ dim l as integer
+ dim o as integer
+ dim p as integer
+ dim q as integer
+ dim s as integer
+ dim t as integer
+ dim u as integer
+ dim w as integer
+ dim Effectname1 as string
+ dim StartName1 as string
+ dim PropertyName1 as string
+ dim UsedEffect as string
+ dim NewEffect as string
+
+ '/// open application ///'
+ Call hNewDocument
+ '/// create textbox with text ///'
+ Call hTextrahmenErstellen ("Test text to test text effects", 35, 35, 70, 70 )
+ '/// Slide Show->Custom Animation... ///'
+ SlideShowCustomAnimation
+ Kontext "Tasks"
+ '/// click button 'Add...' ///'
+ EffectAdd.click
+ '/// Dialog 'Custom Animation' comes up ///'
+ kontext
+
+ '/// Switch to TabPage: Exit ///'
+ active.setPage(TabExit)
+ kontext "TabExit"
+ if TabExit.exists(5) then
+ Printlog "Testing effects in - TabExit"
+ i = Effects.GetItemCount
+ For o = 1 to 2
+ p = 7555
+ Effects.TypeKeys "<HOME>"
+ For e = 1 to 1'i
+ sleep 1
+ Printlog "Effect Nr: " + (Effects.GetSelIndex -1) + ". Name: " + Effects.GetSelText
+ Effectname1 = Effects.GetSelText
+ if AutomaticPreview.IsChecked = TRUE then sleep 1
+ d = Effects.GetSelIndex
+ TabExit.Ok
+ Kontext "Tasks"
+
+ if EffectStart.isEnabled then
+ t = EffectStart.GetItemCount
+ for u = 1 to 1't
+ EffectStart.Select u
+ StartName1 = EffectStart.GetSelText
+ printlog "EffectStart selected " + StartName1
+
+ if EffectProperty.isEnabled then
+ if EffectProperty.isVisible then
+ if EffectProperty.isVisible then
+ w = EffectProperty.GetItemCount
+ if w > 0 then
+ for l = 1 to 1'w
+ EffectProperty.Select l
+ PropertyName1 = EffectProperty.GetSelText
+ printlog "Properties for the effect: " + PropertyName1
+ sleep 1
+' EffectSlideShow.Click
+' Sleep 2
+' kontext "DocumentPresentation"
+' if DocumentPresentation.Exists (5) then
+' DocumentPresentation.TypeKeys "<Space>"
+' if DocumentPresentation.Exists (15) then
+' DocumentPresentation.TypeKeys "<Space>"
+' endif
+' if DocumentPresentation.Exists (15) then
+' DocumentPresentation.TypeKeys "<Escape>"
+' endif
+' else
+' Warnlog "Effect: " + Effectname1 + " didn't work when it started with: " + StartName1 + "and ended with: " + PropertyName1
+' endif
+' sleep (2)
+ Kontext "Tasks"
+ Next l
+ endif
+ Else
+' Printlog "No effect properties for " + StartName1
+ sleep 1
+' EffectSlideShow.Click
+' Sleep 2
+' kontext "DocumentPresentation"
+' if DocumentPresentation.Exists (5) then
+' DocumentPresentation.TypeKeys "<Space>"
+' Sleep 2
+' DocumentPresentation.TypeKeys "<Space>"
+' DocumentPresentation.TypeKeys "<Escape>"
+' else
+' Warnlog "Effect: " + Effectname1 + " didn't work when it started with: " + StartName1
+' endif
+' sleep (2)
+ Kontext "Tasks"
+ Endif
+ Endif
+ Endif
+ Next u
+ Endif
+
+ Kontext "Tasks"
+ if Tasks.Exists then
+ EffectChange.Click
+ else
+ Printlog "Presentation didn't end. Error?"
+ endif
+ kontext
+ '/// Switch to TabPage: Exit ///'
+ active.setPage(TabExit)
+ kontext "TabExit"
+ Effects.TypeKeys "<DOWN>", e + 1 '/// Select the next entry ///'
+ p = Effects.GetSelIndex
+ If p = d Then e = i 'p > 2 AND
+ Next e
+ randomize
+
+ kontext "TabExit"
+ Speed.Typekeys "<DOWN>", (Int(Speed.GetItemCount * Rnd) + 1)
+ Printlog "Test of Entrance-list ended."
+ Next o
+ bError = false
+ else
+ bError = true
+ warnlog "Impress:Tasks Pane:Custom Animation:TabExit tabPage doesnt work."
+ endif
+ kontext
+
+ '/// Switch to TabPage: Entrance ///'
+ active.setPage(TabEntrance)
+ kontext "TabEntrance"
+ if TabEntrance.exists(5) then
+ Effects.Select 4
+ '/// Close dialog 'Custom Animation' with 'OK' ///'
+ TabEntrance.OK
+ else
+ warnlog "Error when switching Tab"
+ endif
+ bError = false
+ kontext "Tasks"
+ EffectAutomaticPreview.Check
+ '/// click button 'Remove' ///'
+ EffectRemove.Click
+ '/// close application ///'
+ Call hCloseDocument
+endcase
+
+'------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+
+testcase tiPengineTabMotionPaths
+ dim bError as boolean
+ dim e as integer
+ dim d as integer
+ dim i as integer
+ dim l as integer
+ dim o as integer
+ dim p as integer
+ dim q as integer
+ dim s as integer
+ dim t as integer
+ dim u as integer
+ dim w as integer
+ dim Effectname1 as string
+ dim StartName1 as string
+ dim PropertyName1 as string
+ dim UsedEffect as string
+ dim NewEffect as string
+
+ '/// open application ///'
+ Call hNewDocument
+ '/// create textbox with text ///'
+ Call hTextrahmenErstellen ("Test text to test text effects", 35, 35, 70, 70 )
+ '/// Slide Show->Custom Animation... ///'
+ SlideShowCustomAnimation
+ Kontext "Tasks"
+ '/// click button 'Add...' ///'
+ EffectAdd.click
+ '/// Dialog 'Custom Animation' comes up ///'
+ kontext
+
+ '/// Switch to TabPage: Motion Paths ///'
+ active.setPage(TabMotionPaths)
+ kontext "TabMotionPaths"
+ if TabMotionPaths.exists(5) then
+ Printlog "Testing effects in - TabMotionPaths"
+ i = Effects.GetItemCount
+ For o = 1 to 1'2
+ p = 7555
+ Effects.TypeKeys "<DOWN>",4
+ For e = 1 to 1'i
+ sleep 1
+ Printlog "Effect Nr: " + (Effects.GetSelIndex -1) + ". Name: " + Effects.GetSelText
+ Effectname1 = Effects.GetSelText
+ if AutomaticPreview.IsChecked = TRUE then sleep 1
+ d = Effects.GetSelIndex
+ TabMotionPaths.Ok
+ Kontext "Tasks"
+
+ if EffectStart.isEnabled then
+ t = EffectStart.GetItemCount
+ for u = 1 to 1 't
+ EffectStart.Select u
+ StartName1 = EffectStart.GetSelText
+ printlog "EffectStart selected " + StartName1
+ if EffectProperty.isEnabled then
+ if EffectProperty.isVisible then
+ if EffectProperty.isVisible then
+ w = EffectProperty.GetItemCount
+ if w > 0 then
+ for l = 1 to 1'w
+ EffectProperty.Select l
+ PropertyName1 = EffectProperty.GetSelText
+ sleep 1
+ printlog "Properties for the effect: " + PropertyName1
+' EffectSlideShow.Click
+' Sleep (2)
+' kontext "DocumentPresentation"
+' if DocumentPresentation.Exists (15) then
+' DocumentPresentation.TypeKeys "<Space>"
+' Sleep (2)
+' if DocumentPresentation.Exists (15) then
+' DocumentPresentation.TypeKeys "<Space>"
+' endif
+' if DocumentPresentation.Exists (15) then
+' DocumentPresentation.TypeKeys "<Escape>"
+' endif
+' else
+' Warnlog "Effect: " + Effectname1 + " didn't work when it started with: " + StartName1 + "and ended with: " + PropertyName1
+' endif
+' sleep (2)
+ Kontext "Tasks"
+ Next l
+ endif
+ Else
+' Printlog "No effect properties for " + StartName1
+ sleep 1
+' EffectSlideShow.Click
+' Sleep (2)
+' kontext "DocumentPresentation"
+' if DocumentPresentation.Exists (15) then
+' DocumentPresentation.TypeKeys "<Space>"
+' Sleep (2)
+' if DocumentPresentation.Exists (15) then
+' DocumentPresentation.TypeKeys "<Space>"
+' endif
+' if DocumentPresentation.Exists (15) then
+' DocumentPresentation.TypeKeys "<Escape>"
+' endif
+' else
+' Warnlog "Effect: " + Effectname1 + " didn't work when it started with: " + StartName1
+' endif
+ Kontext "Tasks"
+' sleep (2)
+ Endif
+ Endif
+ Endif
+ Next u
+ Endif
+ kontext "DocumentImpress"
+ if DocumentImpress.Exists (15) then
+ printlog "Returned to the Impress Edit-mode."
+ endif
+
+ Kontext "Tasks"
+ if Tasks.Exists then
+ EffectChange.Click
+ else
+ Printlog "Presentation didn't end. Error?"
+ endif
+ kontext
+ '/// Switch to TabPage: Motion Paths ///'
+ active.setPage(TabMotionPaths)
+ kontext "TabMotionPaths"
+ Effects.TypeKeys "<DOWN>", e + 1 '/// Select the next entry ///'
+' if p = 2 then Effects.TypeKeys "<DOWN>"
+ p = Effects.GetSelIndex
+ If p = d Then e = i 'p > 2 AND
+ Next e
+
+ kontext "TabMotionPaths"
+ Speed.Typekeys "<DOWN>", (Int(Speed.GetItemCount * Rnd) + 1)
+ Printlog "Test of Entrance-list ended."
+ Next o
+ bError = false
+ else
+ bError = true
+ warnlog "Impress:Tasks Pane:Custom Animation:TabMotionPaths tabPage doesn't work."
+ endif
+ kontext
+
+ '/// Switch to TabPage: Entrance ///'
+ active.setPage(TabEntrance)
+ kontext "TabEntrance"
+ if TabEntrance.exists(5) then
+ Effects.Select 4
+ '/// Close dialog 'Custom Animation' with 'OK' ///'
+ TabEntrance.OK
+ else
+ warnlog "Error when switching Tab"
+ endif
+ bError = false
+ kontext "Tasks"
+ EffectAutomaticPreview.Check
+ '/// click button 'Remove' ///'
+ EffectRemove.Click
+ '/// close application ///'
+ Call hCloseDocument
+endcase
+
+'--------------------------------------------------------------------------------------------------------------------------------------------------
+
+testcase tiPengineSlideTransition
+ dim a as integer
+ dim b as integer
+ dim i as integer
+ dim lala as integer
+ dim iCount as integer
+ dim Soundposition as integer
+
+ '/// open application ///'
+ Call hNewDocument
+ '/// create rectangle ///'
+ Call hRechteckErstellen ( 10, 10, 20, 40 )
+ sleep 1
+ '/// Insert a second slide ///'
+ InsertSlide
+ sleep 2
+ hTypekeys "<Pagedown>"
+ sleep 2
+ '/// create textframe with quotes; Simple: 39; Double: 34; ///'
+ hTextrahmenErstellen ( "Hallo",20,20,60,30)
+ '/// Insert a third slide ///'
+ InsertSlide
+ sleep 2
+ hTypekeys "<Pagedown>"
+ sleep 2
+ '/// Slide Show->Slide Transition ///'
+ SlideShowSlideTransition
+ sleep 2
+ '/// The 'Slide Transition' in the right 'Tasks' Pane has to come up ///'
+ Kontext "Tasks"
+ '/// Select every entry in the Listbox 'Apply to Selected Slides' ///'
+ '/// Then select the next Speed for Transition and retest all the effects ///'
+ '/// Redo until all effects has been tested with all speeds ///'
+ lala = TransitionApplyToSelectedSlide.GetItemCount
+ Printlog "Count of effects : " + TransitionApplyToSelectedSlide.GetItemCount
+ Printlog "Count of Speeds : " + TransitionSpeed.GetItemCount
+ For b = 1 to 1 'i
+ TransitionSpeed.Typekeys "<DOWN>", (Int(TransitionSpeed.GetItemCount * Rnd))
+ Printlog "Current speed is: " + TransitionSpeed.GetSelText
+ For iCount = 50 to lala
+ TransitionApplyToSelectedSlide.Select (iCount)
+ TransitionPlay.Click
+ sleep 5 ' takes some time, until it is running
+ Printlog "Selected effect is: " + TransitionApplyToSelectedSlide.GetSelText
+ Next iCount
+ Next b
+ Printlog "Count of Sounds : " + TransitionSound.GetItemCount
+ '/// One Entry of the Listbox 'Sound' is 'Other sound...', select it ///'
+' iCount = TransitionSound.GetItemCount
+ TransitionSound.TypeKeys "<HOME>"
+ i = 0
+ randomize
+' for a = 1 to 1 'iCount
+ TransitionSound.Select (Int(TransitionSound.GetItemCount * Rnd) + 1)
+ Printlog "The Transition Sound tested is: " + TransitionSound.GetSelText + " ( " + TransitionSound.GetSelIndex + " )."
+ Soundposition = TransitionSound.GetSelIndex
+ kontext "OeffnenDlg"
+ if (OeffnenDlg.Exists (5)) then
+ '/// Read all entries in Listbox 'File type' ///'
+ for i = 1 to Dateityp.getItemCount
+ printlog "" + i + ":" + Dateityp.getItemText(i)
+ next i
+ '/// cancel dialog 'Open' ///'
+ sleep 1
+ OeffnenDlg.cancel
+ kontext "Tasks"
+ if TransitionSound.GetSelIndex <> 1 then
+ Warnlog "TransitionSound didn't go back to the " + Soundposition + " position after pressing cancel in dialogue"
+ endif
+ endif
+ kontext "Tasks"
+ ' the Checkbox is disabled on the first three entries: <No Sound>, <Stop previous sound>...
+ if (TransitionLoopUntilNextSound.IsEnabled AND (TransitionSound.GetSelIndex<4)) then
+ qaErrorLog "May be Language specific -> Evaluation of TBO; " + TransitionSound.GetSelText + "( " + TransitionSound.GetSelIndex + " )."
+ endif
+' next a
+
+ sleep 5
+ kontext "Tasks"
+
+ '/// check checkbox 'Automatically after' ///'
+ TransitionAutomaticallyAfter.Check
+ sleep 5
+ '/// press key 'Page Up' in box ///'
+ TransitionAutomaticallyAfterTime.TypeKeys "<PageUp>"
+ sleep 5
+ '/// check the standard checkbox 'On mouse click' ///'
+ TransitionOnMouseClick.Check
+ sleep 5
+ '/// press button 'Apply to All Slides' ///'
+ TransitionApplyToAllSlides.Click
+ sleep 5
+ '/// press button 'Play' ///'
+ TransitionPlay.Click
+ '/// press button 'Slide Show' ///'
+ sleep (10)
+ TransitionSlideShow.Click
+ sleep (3)
+ kontext "DocumentPresentation"
+ if DocumentPresentation.Exists (5) then
+ printlog "Presentation started :-)"
+ if DocumentPresentation.Exists (15) then
+ DocumentPresentation.TypeKeys "<Space>"
+ endif
+ if DocumentPresentation.Exists (15) then
+ DocumentPresentation.TypeKeys "<Space>"
+ endif
+ if DocumentPresentation.Exists (15) then
+ DocumentPresentation.TypeKeys "<Escape>"
+ endif
+ else
+ warnlog "Impress:Tasks Pane:Slide Transition:Slide Show button doesn't start slideshow!"
+ endif
+ kontext "Tasks"
+
+ '/// uncheck and check Checkbox 'Automatic Preview' ///'
+ '/// default is checked ///'
+ if (NOT TransitionAutomaticPreview.IsChecked) then
+ warnlog "Impress:Tasks Pane:Slide Transition: Automatic preview has to be checked by default, wasn't!"
+ endif
+ TransitionAutomaticPreview.UnCheck
+ sleep 1
+ TransitionAutomaticPreview.Check
+ '/// close application ///'
+ Call hCloseDocument
+endcase
+
+'testcase
+' Two different objects for two different effects. Does it work?
+'Endcase
+
+'Further ideas...
+'testcase tipEngineUserFunctionTest
+' Insert some extra slides and see if they changes on themselves. (chain-reaction)
+' Save file, close, open again and see if everything is as it were. (Random effects)
+'Endcase
+
+'########################################################################
+
+testcase tiPengineTabpageEntrance2
+ dim bError as boolean
+ dim e as integer
+ dim d as integer
+ dim i as integer
+ dim l as integer
+ dim o as integer
+ dim p as integer
+ dim q as integer
+ dim s as integer
+ dim t as integer
+ dim u as integer
+ dim w as integer
+ dim Effectname1 as string
+ dim StartName1 as string
+ dim PropertyName1 as string
+
+'/// open application ///'
+Call hNewDocument
+'/// create textbox with text ///'
+Call hTextrahmenErstellen ("Test text to test text effects", 35, 35, 70, 70 )
+'/// Slide Show->Custom Animation... ///'
+SlideShowCustomAnimation
+ Kontext "Tasks"
+ '/// Uncheck AutomaticPreview ///'
+ EffectAutomaticPreview.UnCheck
+ '/// click button 'Add...' ///'
+ EffectAdd.click
+ '/// Dialog 'Custom Animation' comes up ///'
+ kontext
+
+ '/// Switch to TabPage: Entrance ///'
+ active.setPage(TabEntrance)
+ kontext "TabEntrance"
+ if TabEntrance.exists(5) then
+ DialogTest(TabEntrance)
+ AutomaticPreview.UnCheck
+ Printlog "Testing effects in - TabEntrance"
+ i = Effects.GetItemCount
+ For o = 1 to 2
+ p = 7555
+ Effects.TypeKeys "<HOME>"
+ For e = 1 to i
+ sleep 1
+ Printlog "Effect Nr: " + (Effects.GetSelIndex -1) + ". Name: " + Effects.GetSelText
+ Effectname1 = Effects.GetSelText
+ if AutomaticPreview.IsChecked = TRUE then sleep 1
+ d = Effects.GetSelIndex
+ TabEntrance.Ok
+ Kontext "Tasks"
+ EffectPlay.Click
+ Sleep 5
+' EffectSlideShow.Click
+' Sleep (2)
+' kontext "DocumentPresentation"
+' if DocumentPresentation.Exists (15) then
+' DocumentPresentation.TypeKeys "<Space>"
+' Sleep (2)
+' DocumentPresentation.TypeKeys "<Space>"
+' if DocumentPresentation.Exists (15) then
+' DocumentPresentation.TypeKeys "<Space>"
+' endif
+' if DocumentPresentation.Exists (15) then
+' DocumentPresentation.TypeKeys "<Escape>"
+' endif
+' else
+' Warnlog "Effect: " + Effectname1 + " didn't work when it started with: " + StartName1 + "and ended with: " + PropertyName1
+' endif
+' sleep (2)
+ Kontext "Tasks"
+ if Tasks.Exists(5) then
+ EffectChange.Click
+ else
+ Printlog "Presentation didn't end. Error?"
+ endif
+ kontext "TabEntrance"
+ Effects.TypeKeys "<DOWN>", e '/// Select the next entry ///'
+ p = Effects.GetSelIndex
+ If p = d Then e = i
+ Next e
+
+ kontext "DocumentPresentation"
+ EditSelectAll
+ kontext "TabEntrance"
+ try
+ Speed.Typekeys "<DOWN>", (Int(Speed.GetItemCount * Rnd))
+ catch
+ printlog "Speed doesn't seem to work with the effect: " + Effectname1 + ". Check if this is ok."
+ endcatch
+
+ Printlog "Test of Entrance-list ended."
+ Next o
+
+ kontext
+ '/// Switch to TabPage: Entrance ///'
+ active.setPage(TabEntrance)
+ kontext "TabEntrance"
+ if TabEntrance.exists(5) then
+ Effects.Select 4
+ '/// Close dialog 'Custom Animation' with 'OK' ///'
+ TabEntrance.OK
+ else
+ warnlog "Error when switching Tab"
+ endif
+ bError = false
+ else
+ bError = true
+ warnlog "Impress:Tasks Pane:Custom Animation:Add... button didnt work."
+ endif
+ kontext "Tasks"
+ EffectAutomaticPreview.Check
+ '/// click button 'Remove' ///'
+ EffectRemove.Click
+ '/// close application ///'
+ Call hCloseDocument
+endcase
+
+'------------------------------------------------------------------------------------------------------------------------------------------------------
+
+testcase tiPengineTabPageEmphasis2
+ dim bError as boolean
+ dim e as integer
+ dim d as integer
+ dim i as integer
+ dim l as integer
+ dim o as integer
+ dim p as integer
+ dim q as integer
+ dim s as integer
+ dim t as integer
+ dim u as integer
+ dim w as integer
+ dim Effectname1 as string
+ dim StartName1 as string
+ dim PropertyName1 as string
+
+'/// open application ///'
+Call hNewDocument
+'/// create textbox with text ///'
+Call hTextrahmenErstellen ("Test text to test text effects", 35, 35, 70, 70 )
+'/// Slide Show->Custom Animation... ///'
+SlideShowCustomAnimation
+ Kontext "Tasks"
+ '/// Uncheck AutomaticPreview ///'
+ EffectAutomaticPreview.UnCheck
+ '/// click button 'Add...' ///'
+ EffectAdd.click
+ '/// Dialog 'Custom Animation' comes up ///'
+ kontext
+
+ '/// Switch to TabPage: Emphasis ///'
+ kontext
+ active.setPage(TabEmphasis)
+ kontext "TabEmphasis"
+ if TabEmphasis.exists(5) then
+ kontext
+ active.setPage(TabEmphasis)
+ Printlog "Testing effects in - TabEmphasis"
+ kontext "TabEmphasis"
+ i = Effects.GetItemCount
+ For o = 1 to 2
+ p = 7555
+ Effects.TypeKeys "<HOME>"
+ For e = 1 to i
+ sleep 1
+ Printlog "Effect Nr: " + (Effects.GetSelIndex -1) + ". Name: " + Effects.GetSelText
+ Effectname1 = Effects.GetSelText
+ if AutomaticPreview.IsChecked = TRUE then sleep 1
+ d = Effects.GetSelIndex
+ TabEmphasis.Ok
+ Kontext "Tasks"
+' EffectSlideShow.Click
+' Sleep (1)
+' kontext "DocumentPresentation"
+' if DocumentPresentation.Exists (15) then
+' DocumentPresentation.TypeKeys "<Space>"
+' Sleep (1)
+' if DocumentPresentation.Exists (10) then
+' DocumentPresentation.TypeKeys "<Space>"
+' Sleep (1)
+' endif
+' if DocumentPresentation.Exists (10) then
+' DocumentPresentation.TypeKeys "<Escape>"
+' endif
+' else
+' Warnlog "Effect: " + Effectname1 + " didn't work when it started with: " + StartName1 + "and ended with: " + PropertyName1
+' endif
+' sleep (5)
+ Kontext "Tasks"
+ if Tasks.Exists then
+ EffectChange.Click
+ else
+ Printlog "Presentation didn't end. Error?"
+ endif
+ kontext
+ active.setPage(TabEmphasis)
+ Printlog "Testing effects in - TabEmphasis"
+ kontext "TabEmphasis"
+ Effects.TypeKeys "<DOWN>", e + 1 '/// Select the next entry ///'
+ p = Effects.GetSelIndex
+ If p = d Then e = i 'p > 2 AND
+ Next e
+ kontext
+ active.setPage(TabEmphasis)
+ kontext "TabEmphasis"
+
+ e = 0
+ if Speed.GetItemCount = 0 then
+ warnlog " 'Speed' has 0 entries. Check it."
+ else
+ do while (e < 1)
+ e = Int(Speed.GetItemCount * Rnd)
+ loop
+ Speed.Select (e)
+ endif
+ Printlog "Test of Entrance-list ended."
+ Next o
+ else
+ bError = true
+ warnlog "Impress:Tasks Pane:Custom Animation:TabExit tabPage doesnt work."
+ endif
+
+ kontext
+ '/// Switch to TabPage: Entrance ///'
+ active.setPage(TabEntrance)
+ kontext "TabEntrance"
+ if TabEntrance.exists(5) then
+ Effects.Select 4
+ '/// Close dialog 'Custom Animation' with 'OK' ///'
+ TabEntrance.OK
+ else
+ warnlog "Error when switching Tab"
+ endif
+ bError = false
+ kontext "Tasks"
+ EffectAutomaticPreview.Check
+ '/// click button 'Remove' ///'
+ EffectRemove.Click
+ '/// close application ///'
+ Call hCloseDocument
+endcase
+
+'------------------------------------------------------------------------------------
+
+testcase tiPengineTabPageExit2
+ dim bError as boolean
+ dim e as integer
+ dim d as integer
+ dim i as integer
+ dim l as integer
+ dim o as integer
+ dim p as integer
+ dim q as integer
+ dim s as integer
+ dim t as integer
+ dim u as integer
+ dim w as integer
+ dim Effectname1 as string
+ dim StartName1 as string
+ dim PropertyName1 as string
+
+'/// open application ///'
+Call hNewDocument
+'/// create textbox with text ///'
+Call hTextrahmenErstellen ("Test text to test text effects", 35, 35, 70, 70 )
+'/// Slide Show->Custom Animation... ///'
+SlideShowCustomAnimation
+ Kontext "Tasks"
+ '/// Uncheck AutomaticPreview ///'
+ EffectAutomaticPreview.UnCheck
+ '/// click button 'Add...' ///'
+ EffectAdd.click
+ '/// Dialog 'Custom Animation' comes up ///'
+ kontext
+
+ '/// Switch to TabPage: Exit ///'
+ active.setPage(TabExit)
+ kontext "TabExit"
+ if TabExit.exists(5) then
+ Printlog "Testing effects in - TabExit"
+ i = Effects.GetItemCount
+ For o = 1 to 2
+ p = 7555
+ Effects.TypeKeys "<HOME>"
+ For e = 1 to i
+ sleep 1
+ Printlog "Effect Nr: " + (Effects.GetSelIndex -1) + ". Name: " + Effects.GetSelText
+ Effectname1 = Effects.GetSelText
+ if AutomaticPreview.IsChecked = TRUE then sleep 1
+ d = Effects.GetSelIndex
+ TabExit.Ok
+ Kontext "Tasks"
+' EffectSlideShow.Click
+' Sleep (3)
+' kontext "DocumentPresentation"
+' if DocumentPresentation.Exists (15) then
+' DocumentPresentation.TypeKeys "<Space>"
+' Sleep (7)
+' if DocumentPresentation.Exists (15) then
+' DocumentPresentation.TypeKeys "<Space>"
+' endif
+' if DocumentPresentation.Exists (15) then
+' DocumentPresentation.TypeKeys "<Escape>"
+' endif
+' if DocumentPresentation.Exists (15) then
+' DocumentPresentation.TypeKeys "<Escape>"
+' endif
+' else
+' Warnlog "Effect: " + Effectname1 + " didn't work when it started with: " + StartName1 + "and ended with: " + PropertyName1
+' endif
+' sleep (5)
+ kontext "DocumentImpress"
+ if DocumentImpress.Exists (15) then
+ printlog "Returned to the Impress Edit-mode."
+ else
+ kontext "DocumentPresentation"
+ DocumentPresentation.TypeKeys "<Escape>"
+ sleep (4)
+ endif
+
+ Kontext "Tasks"
+ if Tasks.Exists then
+ EffectChange.Click
+ else
+ Printlog "Presentation didn't end. Error?"
+ endif
+ kontext
+ '/// Switch to TabPage: Exit ///'
+ active.setPage(TabExit)
+ kontext "TabExit"
+ Effects.TypeKeys "<DOWN>", e + 1 '/// Select the next entry ///'
+ p = Effects.GetSelIndex
+ If p = d Then e = i 'p > 2 AND
+ Next e
+ kontext
+ '/// Switch to TabPage: Exit ///'
+ active.setPage(TabExit)
+ kontext "TabExit"
+ e = 0
+ if Speed.GetItemCount = 0 then
+ warnlog " 'Speed' has 0 entries. Check it."
+ else
+ do while (e < 1)
+ e = Int(Speed.GetItemCount * Rnd)
+ loop
+ Speed.Select (e)
+ endif
+
+ Printlog "Test of Entrance-list ended."
+ Next o
+ bError = false
+ else
+ bError = true
+ warnlog "Impress:Tasks Pane:Custom Animation:TabExit tabPage doesnt work."
+ endif
+
+ kontext
+ '/// Switch to TabPage: Entrance ///'
+ active.setPage(TabEntrance)
+ kontext "TabEntrance"
+ if TabEntrance.exists(5) then
+ Effects.Select 4
+ '/// Close dialog 'Custom Animation' with 'OK' ///'
+ TabEntrance.OK
+ else
+ warnlog "Error when switching Tab"
+ endif
+ bError = false
+ kontext "Tasks"
+ EffectAutomaticPreview.Check
+ '/// click button 'Remove' ///'
+ EffectRemove.Click
+ '/// close application ///'
+ Call hCloseDocument
+endcase
+
+'--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+
+testcase tiPengineTabPageMotionPaths2
+ dim bError as boolean
+ dim e as integer
+ dim d as integer
+ dim i as integer
+ dim l as integer
+ dim o as integer
+ dim p as integer
+ dim q as integer
+ dim s as integer
+ dim t as integer
+ dim u as integer
+ dim w as integer
+ dim Effectname1 as string
+ dim StartName1 as string
+ dim PropertyName1 as string
+
+ '/// open application ///'
+ Call hNewDocument
+ '/// create textbox with text ///'
+ Call hTextrahmenErstellen ("Test text to test text effects", 35, 35, 70, 70 )
+ '/// Slide Show->Custom Animation... ///'
+ SlideShowCustomAnimation
+ Kontext "Tasks"
+ '/// Uncheck AutomaticPreview ///'
+ EffectAutomaticPreview.UnCheck
+ '/// click button 'Add...' ///'
+ EffectAdd.click
+ '/// Dialog 'Custom Animation' comes up ///'
+ kontext
+
+ '/// Switch to TabPage: Motion Paths ///'
+ active.setPage(TabMotionPaths)
+ kontext "TabMotionPaths"
+ if TabMotionPaths.exists(5) then
+ Printlog "Testing effects in - TabMotionPaths"
+ i = Effects.GetItemCount
+ For o = 1 to 2
+ p = 7555
+ Effects.TypeKeys "<DOWN>",4
+ For e = 4 to i '1 when adepted.
+ sleep 1
+ Printlog "Effect Nr: " + (Effects.GetSelIndex -1) + ". Name: " + Effects.GetSelText
+ Effectname1 = Effects.GetSelText
+ if AutomaticPreview.IsChecked = TRUE then sleep 1
+ d = Effects.GetSelIndex
+ TabMotionPaths.Ok
+ Kontext "Tasks"
+' EffectSlideShow.Click
+' Sleep (4)
+' kontext "DocumentPresentation"
+' if DocumentPresentation.Exists (15) then
+' DocumentPresentation.TypeKeys "<Space>"
+' Sleep (7)
+' if DocumentPresentation.Exists (15) then
+' DocumentPresentation.TypeKeys "<Space>"
+' endif
+' if DocumentPresentation.Exists (15) then
+' DocumentPresentation.TypeKeys "<Escape>"
+' endif
+' else
+' Warnlog "Effect: " + Effectname1 + " didn't work when it started with: " + StartName1 + "and ended with: " + PropertyName1
+' endif
+' sleep (2)
+ kontext "DocumentPresentation"
+ EditSelectAll ' (Select the text again)
+ Kontext "Tasks"
+ if Tasks.Exists then
+ EffectChange.Click
+ else
+ Printlog "Presentation didn't end. Error?"
+ endif
+ kontext
+ '/// Switch to TabPage: Motion Paths ///'
+ active.setPage(TabMotionPaths)
+ kontext "TabMotionPaths"
+ Effects.TypeKeys "<DOWN>", e + 1 '/// Select the next entry ///'
+ p = Effects.GetSelIndex
+ If p = d Then e = i 'p > 2 AND
+ Next e
+ kontext
+ '/// Switch to TabPage: Motion Paths ///'
+ active.setPage(TabMotionPaths)
+ kontext "TabMotionPaths"
+
+ e = 0
+ if Speed.GetItemCount = 0 then
+ warnlog " 'Speed' has 0 entries. Check it."
+ else
+ do while (e < 1)
+ e = Int(Speed.GetItemCount * Rnd)
+ loop
+ Speed.Select (e)
+ endif
+
+ Printlog "Test of Entrance-list ended."
+ Next o
+ bError = false
+ else
+ bError = true
+ warnlog "Impress:Tasks Pane:Custom Animation:TabMotionPaths tabPage doesn't work."
+ endif
+ kontext
+ '/// Switch to TabPage: Entrance ///'
+ active.setPage(TabEntrance)
+ kontext "TabEntrance"
+ if TabEntrance.exists(5) then
+ Effects.Select 4
+ '/// Close dialog 'Custom Animation' with 'OK' ///'
+ TabEntrance.OK
+ else
+ warnlog "Error when switching Tab"
+ endif
+ bError = false
+ kontext "Tasks"
+ EffectAutomaticPreview.Check
+ '/// click button 'Remove' ///'
+ EffectRemove.Click
+ '/// close application ///'
+ Call hCloseDocument
+endcase
+
+'--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+
+
diff --git a/testautomation/graphics/optional/includes/impress/i_pengine2.inc b/testautomation/graphics/optional/includes/impress/i_pengine2.inc
new file mode 100644
index 000000000000..f1fa908cf7b7
--- /dev/null
+++ b/testautomation/graphics/optional/includes/impress/i_pengine2.inc
@@ -0,0 +1,609 @@
+'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
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* Owner : wolfram.garten@oracle.com
+'*
+'* short description : Tests the Presentation-Engines effects
+'*
+'*******************************************************************
+'*
+' #1 tiPengineAnimationEffectsPreview
+' #1 tiPengineAnimationEffectsOptions
+' #1 tiPengineAllShapesAndEffects
+' #1 tiPengine2ObjectsGetsEffects
+'*
+'\*******************************************************************
+
+testcase tiPengineAnimationEffectsPreview
+ dim bError as boolean
+
+ '/// open application ///'
+ Call hNewDocument
+ '/// create textbox with text ///'
+ Call hTextrahmenErstellen ("Test text to test text effects", 35, 35, 70, 70 )
+ '/// Slide Show->Custom Animation... ///'
+ SlideShowCustomAnimation
+ Kontext "Tasks"
+ '/// click button 'Add...' ///'
+ EffectAdd.click
+ '/// Dialog 'Custom Animation' comes up ///'
+ kontext
+ '/// Switch to TabPage: Entrance ///'
+ active.setPage(TabEntrance)
+ kontext "TabEntrance"
+ if TabEntrance.exists(5) then
+ DialogTest(TabEntrance)
+ TestAnimations
+ '/// Switch to TabPage: Emphasis ///'
+ kontext
+ active.setPage(TabEmphasis)
+ kontext "TabEmphasis"
+ if TabEmphasis.exists(5) then
+ DialogTest(TabEmphasis)
+ TestAnimations
+ else
+ bError = true
+ warnlog "Impress:Tasks Pane:Custom Animation:TabEmphasis tabPage doesn't work."
+ endif
+ kontext
+
+ '/// Switch to TabPage: Exit ///'
+ active.setPage(TabExit)
+ kontext "TabExit"
+ if TabExit.exists(5) then
+ DialogTest(TabExit)
+ TestAnimations
+ else
+ bError = true
+ warnlog "Impress:Tasks Pane:Custom Animation:TabExit tabPage doesn't work."
+ endif
+ kontext
+
+ '/// Switch to TabPage: Motion Paths ///'
+ active.setPage(TabMotionPaths)
+ kontext "TabMotionPaths"
+ if TabMotionPaths.exists(5) then
+ DialogTest(TabMotionPaths)
+ TestAnimations
+ else
+ bError = true
+ warnlog "Impress:Tasks Pane:Custom Animation:TabMotionPaths tabPage doesn't work."
+ endif
+ kontext
+
+ '/// Switch to TabPage: Entrance ///'
+ active.setPage(TabEntrance)
+ kontext "TabEntrance"
+ if TabEntrance.exists(5) then
+ Effects.Select 4
+ '/// Close dialog 'Custom Animation' with 'OK' ///'
+ TabEntrance.OK
+ else
+ warnlog "Error when switching Tab"
+ endif
+ bError = false
+ else
+ bError = true
+ warnlog "Impress:Tasks Pane:Custom Animation:Add... button didn't work."
+ endif
+ Kontext "Tasks"
+ if (NOT bError) then
+ '/// click button 'Change...' ///'
+ EffectChange.click
+ '/// Dialog 'Custom Animation' comes up ///'
+ kontext
+
+ '/// Switch to TabPage: Entrance ///'
+ active.setPage(TabEntrance)
+ kontext "TabEntrance"
+ if (NOT TabEntrance.exists(5)) then
+ warnlog "Impress:Tasks Pane:Custom Animation:Change... button didn't work."
+ endif
+ TabEntrance.Cancel
+ Kontext "Tasks"
+ EffectStart.GetItemCount
+ if EffectProperty.IsVisible then
+ EffectProperty.GetItemCount
+ endif
+ '/// CLick on button '...' (Options) ///'
+ EffectOptions.Click
+ kontext "TabEffect"
+ if TabEffect.Exists(5) then
+ dialogTest(TabEffect)
+ Sound.GetItemCount
+ AfterAnimation.GetItemCount
+
+ '/// switch to TabPage 'Timing' ///'
+ Kontext
+ Active.SetPage TabTiming
+ kontext "TabTiming"
+ if TabTiming.Exists(5) then
+ dialogTest(TabTiming)
+ TimingStart.GetItemCount
+ Delay.GetText
+ Speed.GetItemCount
+ Repeat.GetItemCount
+ Rewind.Ischecked
+ TriggerAnimate.IsChecked
+ TriggerStart.IsChecked
+ Shape.GetItemCount
+ else
+ warnlog "Impress:Tasks Pane:Custom Animation:Effect Options: Timing TabPage didn't work."
+ endif
+
+ '/// switch to TabPage 'Timing' ///'
+ Kontext
+ active.setPage TabTextAnimation
+ kontext "TabTextAnimation"
+ if TabTextAnimation.Exists(5) then
+ dialogTest(TabTextAnimation)
+ GroupText.GetItemCount
+ AnimateAttachedShape.IsChecked
+ TabTextAnimation.Cancel
+ else
+ warnlog "Impress:Tasks Pane:Custom Animation:Effect Options: TextAnimation TabPage didn't work."
+ endif
+ else
+ warnlog "Impress:Tasks Pane:Custom Animation:... button didn't work."
+ endif
+ Kontext "Tasks"
+ EffectSpeed.GetItemCount
+ EffectList.GetItemCount
+ EffectPlay.Click
+ sleep (3)
+ EffectSlideShow.Click
+ sleep (1)
+ kontext "DocumentPresentation"
+ if DocumentPresentation.Exists (15) then
+ printlog "Presentation started :-)"
+ DocumentPresentation.TypeKeys "<SPACE>"
+ if DocumentPresentation.Exists (15) then
+ DocumentPresentation.TypeKeys "<SPACE>"
+ endif
+ if DocumentPresentation.Exists (15) then
+ DocumentPresentation.TypeKeys "<ESCAPE>"
+ endif
+ else
+ warnlog "Impress:Tasks Pane:Custom Animation:Slide Show button doesn't start slideshow!"
+ endif
+ sleep (2)
+ kontext "Tasks"
+ EffectAutomaticPreview.Check
+ '/// click button 'Remove' ///'
+ EffectRemove.Click
+ endif
+ sleep (2)
+ '/// close application ///'
+ Call hCloseDocument
+endcase 'tiPengineAnimationEffectsPreview
+
+'------------------------------------------------------------------------------
+
+testcase tiPengineAnimationEffectsOptions
+ dim bError as boolean
+ dim e as integer
+ dim d as integer
+ dim i as integer
+ dim l as integer
+ dim o as integer
+ dim p as integer
+ dim q as integer
+ dim s as integer
+ dim t as integer
+ dim u as integer
+ dim y as integer
+ dim w as integer
+ dim numberx as integer
+ dim Effectname1 as string
+ dim StartName1 as string
+ dim PropertyName1 as string
+
+'/// open application ///'
+Call hNewDocument
+'/// create textbox with text ///'
+Call hTextrahmenErstellen ("Test text to test text effects", 35, 35, 70, 70 )
+'/// Slide Show->Custom Animation... ///'
+SlideShowCustomAnimation
+ '/// Dialog 'Custom Animation' comes up ///'
+ Kontext "Tasks"
+ '/// Click button 'Add...' to add an effect to the text ///'
+ EffectAdd.click
+ kontext
+ '/// Switch to TabPage: Entrance ///'
+ active.setPage(TabEntrance)
+ kontext "TabEntrance"
+ if TabEntrance.exists(5) then
+ AutomaticPreview.UnCheck
+ Printlog "Testing effects in - TabEntrance"
+ i = Effects.GetItemCount
+ p = 7555
+ Effects.TypeKeys "<HOME DOWN>"
+ Randomize
+ '/// Choose ten random effects, and test them. ///'
+ For e = 1 to 10
+ randomize
+ for y = 1 to 1
+ randomize
+ numberx = Int((i*Rnd))
+ if (numberx<1) OR (numberx>i) then ' Just so we get it between 1 and the amount of items.
+ y = y - 1
+ endif
+ next y
+ printlog numberx ' Log what effect were about to select. Just for debugging.
+ Effects.TypeKeys "<HOME>"
+ Effects.TypeKeys "<DOWN>", numberx ' Select the effect.
+ sleep 1
+ Printlog "Effect Nr: " + (Effects.GetSelIndex -1) + ". Name: " + Effects.GetSelText ' Log the number and effect-name.
+ Effectname1 = Effects.GetSelText
+ if AutomaticPreview.IsChecked = TRUE then sleep 1 ' Sleep one sec to at least let the preview start.
+ d = Effects.GetSelIndex
+ TabEntrance.Ok
+ optionstest2 ' Do the optionstest for this effect.
+ Kontext "Tasks"
+ if Tasks.Exists then
+ EffectChange.Click
+ else
+ Warnlog "Something wrong when exiting Impress:Tasks Pane:Custom Animation: ... (options)"
+ endif
+ kontext "TabEntrance"
+ '/// Select the next entry ///'
+ Effects.TypeKeys "<DOWN>", e
+ p = Effects.GetSelIndex
+ If p = d Then e = i
+ sleep 2
+ if Speed.isVisible then
+ if Speed.isEnabled then
+ s = Speed.GetItemCount
+ For q = 1 to s
+ try
+ Speed.Select q
+ catch
+ warnlog "The speed nr: " + q + " had some kind of problem. Check it."
+ endcatch
+ Next q
+ endif
+ else
+ Warnlog "Speed in Effect Options were not to be found."
+ endif
+ Next e
+ kontext "TabEntrance"
+ Printlog "Test of Entrance-list ended."
+ AutomaticPreview.Check
+ TabEntrance.Ok
+ else
+ bError = true
+ warnlog "Impress:Tasks Pane:Custom Animation:Add... button didnt work."
+ endif
+ kontext "Tasks"
+ EffectAutomaticPreview.Check
+ '/// click button 'Remove' ///'
+ EffectRemove.Click
+ '/// close application ///'
+ Call hCloseDocument
+endcase 'tiPengineAnimationEffectsOptions
+
+'------------------------------------------------------------------------------------------------------------------------------------------------------
+
+testcase tiPengineAllShapesAndEffects
+ dim sFileName as string
+
+'/// the Presentation-Engine consists of showing the presentation, with all it's effects. ///'
+
+ '/// Create a new presentation. ///'
+ Call hNewDocument
+ Sleep (1)
+
+ '/// Open the test-file. ///'
+ Call hFileOpen (gTesttoolpath + "graphics\required\input\allshapes2.odp") 'effects.odp")
+
+ '/// Start the slideshow. ///'
+ Call hTypeKeys "<F5>"
+ sleep (10)
+ kontext "DocumentPresentation"
+ while DocumentPresentation.exists()
+ DocumentPresentation.TypeKeys "<SPACE>"
+ sleep(10)
+ wend
+
+ Kontext "DocumentImpress"
+ if (DocumentImpress.exists(1)) then
+ 'nothing
+ else
+ warnlog "presentation not ended."
+ endif
+
+ Call hCloseDocument
+
+ sleep (1)
+ '/// Open the test-file. ///'
+ Call hFileOpen (gTesttoolpath + "graphics\required\input\effects.odp")
+ Sleep (10)
+
+ '/// Start the slideshow. ///'
+ CALL hTypeKeys "<F5>"
+ Sleep (10)
+ '/// Press "Space" again, to continue with slide two. ///'
+ kontext "DocumentPresentation"
+ while DocumentPresentation.exists()
+ DocumentPresentation.TypeKeys "<SPACE>"
+ sleep(10)
+ wend
+
+ printlog "End of eleventh page."
+ if DocumentPresentation.Exists then
+ warnlog "DocumentPresentation shouldnt be visible right now."
+ DocumentPresentation.TypeKeys "<SPACE>"
+ else
+ printlog "Presentation ended correctly."
+ kontext "DocumentImpress"
+ end if
+
+'/// Close Application ///'
+ Call hCloseDocument
+ Printlog "Finished Optional-test for Presentation-Engine"
+endcase 'tiPengineAllShapesAndEffects
+
+'-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+
+testcase tiPengine2ObjectsGetsEffects
+ dim i as integer
+ dim t as integer
+ dim q as integer
+ dim e as integer
+ dim sFileName as string
+
+ printlog "the Presentation-Engine consists of showing the presentation, with all it's effects."
+
+ printlog "Create a new presentation."
+ Call hNewDocument
+ Call sSelectEmptyLayout
+ sleep (1)
+
+ kontext "Toolbar"
+ sleep (1)
+ printlog "insert a Smiley."
+ printlog "From the toolbar: Insert three objects:"
+ printlog "insert a Smiley."
+ kontext "Toolbar"
+ if Toolbar.Exists then
+ if Toolbar.IsVisible then
+ sleep (1)
+ try
+ SymbolShapes.TearOff
+ catch
+ warnlog "Issue for GH; .tearoff doesnt tell success"
+ endcatch
+ sleep (1)
+ kontext "SymbolShapes"
+ SymbolShapesSmiley.Click
+ sleep (1)
+
+ gMouseDown (40,40)
+ gMouseMove (40,40,60,60)
+ gMouseUp (60,60)
+
+ sleep (1)
+ kontext "SymbolShapes"
+ SymbolShapes.Close
+
+ printlog "Unmark all objects"
+ hTypeKeys "<ESCAPE>"
+
+ printlog "Mark the Smiley"
+ hTypeKeys "<TAB>"
+ else
+ warnlog "No toolbar visible, please notify the test-administrator"
+ end if
+ else
+ warnlog "toolbar not visible"
+ end if
+
+ printlog "Smiley inserted, time to add some effects."
+
+ printlog "Effect no 1"
+
+ printlog "Slide Show->Custom Animation..."
+ SlideShowCustomAnimation
+ Kontext "Tasks"
+ printlog "Click button 'Add...'"
+ EffectAdd.click
+ printlog "Dialog 'Custom Animation' comes up"
+ kontext
+ printlog "Switch to TabPage: Entrance"
+ active.setPage(TabEntrance)
+ kontext "TabEntrance"
+ if TabEntrance.exists(5) then
+ DialogTest(TabEntrance)
+ printlog "Find 'Dissolve-in'."
+ TabEntrance.TypeKeys "<DOWN>", 6
+ Sleep (3)
+ TabEntrance.Ok
+ Printlog "Added effect 'Dissolve-in'"
+ else
+ warnlog "Tab Entrance does not exist?"
+ end if
+ Kontext "Tasks"
+
+ printlog "Effect no 2"
+
+ printlog "Add a second effect to the object"
+ EffectAdd.click
+
+ printlog "Dialog 'Custom Animation' comes up"
+ printlog "Switch to TabPage: Emphasis"
+ kontext
+ active.setPage(TabEmphasis)
+ kontext "TabEmphasis"
+ if TabEmphasis.exists(5) then
+ DialogTest(TabEmphasis)
+ Effects.Select 5 'Transparency
+ Sleep (3)
+ printlog "Close dialog 'Custom Animation' with 'OK'"
+ TabEmphasis.OK
+ Printlog "Added effect 'Transparency'"
+ else
+ warnlog "Error when switching Tab"
+ end if
+ Kontext "Tasks"
+
+ printlog "Effect no 3"
+
+ printlog "Insert new slide"
+ InsertSlide
+ Printlog "Inserted new Slide"
+
+ kontext "Slides"
+ printlog "Make sure the last slide is selcted"
+ SlidesControl.TypeKeys "<TAB>"
+ SlidesControl.TypeKeys "<PAGEDOWN>", 3
+ Sleep (1)
+
+ printlog "Insert new object"
+ Call hTextrahmenErstellen ("Test text for the second slide to test the PresentationEngine", 35, 35, 70, 70)
+
+ printlog "Add the Transformation-Effect 'put on the brakes'"
+ SlideShowCustomAnimation
+ Kontext "Tasks"
+ printlog "Click button 'Add...'"
+ EffectAdd.click
+ printlog "Dialog 'Custom Animation' comes up"
+ kontext
+ printlog "Switch to TabPage: Entrance"
+ active.setPage(TabEntrance)
+ kontext "TabEntrance"
+ if TabEntrance.exists(5) then
+ printlog "Add Transformation-Effect: 'Put on the Breaks'"
+ TabEntrance.TypeKeys "<DOWN>", 30
+ Sleep (3)
+ TabEntrance.Ok
+ Printlog "Added effect 'Put on the Breaks'"
+ else
+ warnlog "Impress:Tasks Pane:Custom Animation:Add... button didn't work."
+ end if
+ Kontext "Tasks"
+
+ printlog "Effect no 4"
+
+ printlog "Click button 'Add...'"
+ EffectAdd.click
+ printlog "Dialog 'Custom Animation' comes up"
+ kontext
+ printlog "Switch to TabPage: Motion Paths"
+ active.setPage(TabMotionPaths)
+ kontext "TabMotionPaths"
+ if TabMotionPaths.exists(5) then
+ printlog "Add motion-path-effect: 'schwosch'"
+ TabMotionPaths.TypeKeys "<DOWN>", 66
+ Sleep (3)
+ TabMotionPaths.Ok
+ Printlog "Added effect 'Schwosch'"
+ kontext "Tasks"
+ else
+ warnlog "Couldn't find the Tabpage: MotionPaths. Check why."
+ end if
+
+ printlog "Press 'PageUp' to get to the first slide"
+ hTypeKeys "<PAGEUP>"
+
+ printlog "Run the slideshow with F5."
+ hTypeKeys "<F5>"
+ Sleep (5)
+ kontext "DocumentPresentation"
+ if DocumentPresentation.Exists (15) then
+ Printlog "Presentation started, calling 1st effect, 1st object."
+ DocumentPresentation.TypeKeys "<SPACE>"
+ sleep (5)
+ else
+ warnlog "Slideshow didn't start. Check why."
+ end if
+ printlog "calling 2nd effect, 1st object."
+ DocumentPresentation.TypeKeys "<SPACE>"
+ Sleep (5)
+ printlog "calling 2nd slide."
+ DocumentPresentation.TypeKeys "<SPACE>"
+ Sleep (5)
+ printlog "calling 1st effect, 2nd object"
+ DocumentPresentation.TypeKeys "<SPACE>"
+ Sleep (5)
+ printlog "calling 2nd effect, 2nd object"
+ DocumentPresentation.TypeKeys "<SPACE>"
+ Sleep (5)
+ printlog "ending presentation"
+ DocumentPresentation.TypeKeys "<SPACE>"
+ Sleep (5)
+ Kontext "DocumentPresentation"
+ printlog "getting back to edit view."
+ DocumentPresentation.TypeKeys "<SPACE>"
+
+ if DocumentPresentation.Exists(5) then
+ warnlog "Presentation should have ended. Check why it didn't."
+ end if
+
+ Kontext "DocumentImpress"
+
+ printlog "Close the document"
+ Call hCloseDocument
+ Printlog "Finished Optional-test for Presentation-Engine"
+endcase 'tiPengine2ObjectsGetsEffects
+
+'------------------------------------------------------------------------------------------------------------------------------------------------------
+
+Function TestAnimations
+ '/// select in the listbox 'Effects' the second entry///'
+ Dim i as Integer
+ Dim s as Integer
+ Dim q as Integer
+ Dim e as Integer
+ Dim o as Integer
+ Dim p as Integer
+ i = Effects.GetItemCount
+ s = Speed.GetItemCount
+ AutomaticPreview.Check
+ Effects.TypeKeys "<HOME>"
+ For e = 1 to i
+ If e <> p Then
+ if AutomaticPreview.isChecked = TRUE then sleep 1
+ Printlog "Effect has position Nr: " + Effects.GetSelIndex + ". Name of effect: " + Effects.GetSelText
+ '/// Select the next entry ///'
+ Effects.TypeKeys "<DOWN>"
+ p = Effects.GetSelIndex
+ Else
+ Printlog "Test of effects ended."
+ e = i
+ Endif
+ Next e
+ if Speed.IsEnabled then
+ For q = 1 to s
+ Speed.Select q
+ sleep 1
+ Next q
+ endif
+ AutomaticPreview.Check
+ sleep 1
+ AutomaticPreview.Check
+ Kontext
+end Function
diff --git a/testautomation/graphics/optional/includes/impress/i_saveloadlayout.inc b/testautomation/graphics/optional/includes/impress/i_saveloadlayout.inc
new file mode 100644
index 000000000000..06a7ac89cf9d
--- /dev/null
+++ b/testautomation/graphics/optional/includes/impress/i_saveloadlayout.inc
@@ -0,0 +1,175 @@
+'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
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* Owner : wolfram.garten@oracle.com
+'*
+'* short description: Save & Load testing of Layout -templates.
+'*
+'**************************************************************************************
+
+testcase tSaveLoadLayoutEmpty
+ Dim NewFileDir as String
+ NewFileDir = ConvertPath (gOfficePath + "user\work\LayoutTest\")
+
+ printlog "Create New folder in the Work-directory"
+ printlog " Will try to create the directory: " + NewFileDir
+ app.mkdir NewFileDir
+
+ printlog "Create a new document, add an empty Layout, Save the document in all available Formats, and open the saved files."
+
+ printlog "Make new Presentation"
+ gApplication = "IMPRESS"
+ Call hNewDocument
+
+ printlog "Choose and Insert an empty Layout."
+ printlog " Choose and Insert an empty Layout."
+ FormatModifyPage
+ sleep (1)
+ kontext "Tasks"
+ LayoutsPreview.TypeKeys "<HOME>"
+ kontext "Pagelayout_UndoDeleteWarning"
+ if Pagelayout_UndoDeleteWarning.exists then
+ Pagelayout_UndoDeleteWarning.ok
+ end if
+ kontext "Tasks"
+ printlog "Press Enter to use the layout on the current slide"
+ LayoutsPreview.TypeKeys "<RETURN>"
+ sleep (5)
+
+ printlog "Save the document in different formats..."
+ printlog "Close the file."
+ printlog "Load the different files."
+ call fSaveLoadAllFormats (NewFileDir) 'Runs the Function below.
+
+ printlog "Delete the different files."
+ printlog " Will try to delete the directory: " + NewFileDir
+ app.rmDir NewFileDir
+
+ printlog "tSaveLoadLayoutEmpty ended."
+ printlog "End the test"
+endcase 'tSaveLoadLayoutEmpty
+
+'****************************************************************************************************
+
+testcase tSaveLoadLayoutText
+ printlog "Testing layout with text."
+ Dim NewFileDir as String
+ NewFileDir = ConvertPath (gOfficePath + "user\work\LayoutTest\")
+
+ printlog "Create New folder in the Work-directory"
+ printlog " Will try to create the directory: " + NewFileDir
+ app.mkdir NewFileDir
+
+ printlog "Create a new document, add a Layout with a Textfield, Save the document in all available Formats, and open the saved files."
+
+ printlog "Make new Presentation"
+ gApplication = "IMPRESS"
+ Call hNewDocument
+
+ printlog "Choose and Insert an Layout with a Text-field."
+ FormatModifyPage
+ sleep (1)
+ kontext "Tasks"
+ LayoutsPreview.TypeKeys "<HOME>"
+ kontext "Pagelayout_UndoDeleteWarning"
+ if Pagelayout_UndoDeleteWarning.exists then
+ Pagelayout_UndoDeleteWarning.ok
+ end if
+ kontext "Tasks"
+ printlog "select the Text placeholder and activate it with [Return]"
+ LayoutsPreview.TypeKeys ("<RIGHT>",5)
+ sleep (1)
+ LayoutsPreview.TypeKeys ("<Return>")
+ sleep (1)
+ kontext "DocumentImpress"
+ DocumentImpress.TypeKeys ("<TAB>")
+ DocumentImpress.TypeKeys ("<Return>")
+ DocumentImpress.TypeKeys ("<ESCAPE>")
+ sleep (5)
+
+ printlog "Save the document in all available formats..."
+ printlog "Close the file."
+ printlog "Load the different files."
+ call fSaveLoadAllFormats (NewFileDir) 'Runs the Function below.
+
+ printlog "Delete the different files."
+ printlog "Will try to delete the directory: " + NewFileDir
+ app.rmDir NewFileDir
+
+ printlog "tSaveLoadLayoutText ended."
+endcase 'tSaveLoadLayoutText
+
+'****************************************************************************************************
+
+testcase tSaveLoadLayoutContent
+ Dim NewFileDir as String
+ NewFileDir = ConvertPath (gOfficePath + "user\work\LayoutTest\")
+
+ printlog "Create New folder in the Work-directory"
+ printlog " Will try to create the directory: " + NewFileDir
+ app.mkdir NewFileDir
+
+ printlog "Create a new document, add a Layout with a Content-field, Save the document in all available Formats, and open the saved files."
+
+ printlog "Make new Presentation"
+ gApplication = "IMPRESS"
+ Call hNewDocument
+
+ printlog "Choose and Insert an Layout with a Content-field."
+ FormatModifyPage
+ sleep (1)
+ kontext "Tasks"
+ LayoutsPreview.TypeKeys "<HOME>"
+ kontext "Pagelayout_UndoDeleteWarning"
+ if Pagelayout_UndoDeleteWarning.exists then
+ Pagelayout_UndoDeleteWarning.ok
+ end if
+ kontext "Tasks"
+ printlog "select the Picture placeholder and activate it with [Return]"
+ LayoutsPreview.TypeKeys ("<RIGHT>",2)
+ sleep (1)
+ LayoutsPreview.TypeKeys ("<Return>")
+ sleep (1)
+ kontext "DocumentImpress"
+ DocumentImpress.TypeKeys ("<TAB><TAB>")
+ DocumentImpress.TypeKeys ("<Return>")
+ DocumentImpress.TypeKeys ("<ESCAPE>")
+ sleep (5)
+
+ printlog "Save the document in all available formats."
+ printlog "Close the file."
+ printlog "Load the different files."
+ call fSaveLoadAllFormats (NewFileDir) 'Runs the Function below.
+
+ printlog "Delete the different files."
+ printlog " Will try to delete the directory: " + NewFileDir
+ app.rmDir NewFileDir 'ConvertPath (gOfficePath + "user\work\LayoutTest\")
+
+ printlog "tSaveLoadLayoutPicture ended."
+endcase 'tSaveLoadLayoutPicture
+
+'****************************************************************************************************
diff --git a/testautomation/graphics/optional/includes/impress/i_shape.inc b/testautomation/graphics/optional/includes/impress/i_shape.inc
new file mode 100644
index 000000000000..c33c92f2ec0f
--- /dev/null
+++ b/testautomation/graphics/optional/includes/impress/i_shape.inc
@@ -0,0 +1,89 @@
+'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
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* owner : owner : wolfram.garten@oracle.com
+'*
+'* short description : import presentations with shapes in .ppt format
+'*
+'************************************************************************
+'*
+' #1 t_import_shapes ' Load all shapes with .ppt format one time
+'*
+'\***********************************************************************
+
+testcase t_import_shapes
+ dim i as integer
+ dim iOldState as integer
+ dim iDocuments as integer
+ dim lDocuments(100) as string
+ dim sPage as string
+
+ iOldState = hSetMacroSecurity ( 0 )
+ iDocuments = GetFileList(convertPath(gTesttoolPath + "graphics/required/input/shapes"),"*.ppt",lDocuments())
+ for i = 1 to iDocuments
+ printlog "(" + i + "/" + iDocuments + "): " + lDocuments(i)
+ printlog "------------------------------------------------------"
+ hFileOpen(lDocuments(i))
+
+ ' 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
+
+ kontext "DocumentImpress"
+ DocumentImpress.typeKeys("<home>")
+ while (sPage <> DocumentImpress.StatusGetText(DocumentImpress.StatusGetItemID(6)))
+ printlog "------------"
+ sleep 1
+ DocumentImpress.typeKeys("<tab>")
+ sleep 1 ' loop while empty: break after 10 minutes
+ DocumentImpress.typeKeys("<tab>")
+ FormatPositionAndSize
+ kontext
+ active.setpage TabPositionAndSize
+ kontext "TabPositionAndSize"
+ printlog "w: '" + Width.getText + "'; h: '" + Height.getText + "'"
+ TabPositionAndSize.cancel
+ kontext "DocumentImpress"
+ DocumentImpress.typeKeys("<F2>")
+ editSelectAll
+ editCopy
+ printlog getClipboard
+ sPage = DocumentImpress.StatusGetText(DocumentImpress.StatusGetItemID(6))
+ printlog sPage
+ DocumentImpress.typeKeys("<escape><pageDown>")
+ sleep 5
+ wend
+ hCloseDocument
+ next i
+hSetMacroSecurity ( iOldState )
+endcase
+
diff --git a/testautomation/graphics/optional/includes/impress/i_slidecopy.inc b/testautomation/graphics/optional/includes/impress/i_slidecopy.inc
new file mode 100644
index 000000000000..92283b35a369
--- /dev/null
+++ b/testautomation/graphics/optional/includes/impress/i_slidecopy.inc
@@ -0,0 +1,979 @@
+'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
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* Owner : wolfram.garten@oracle.com
+'*
+'* short description: includefile for Slidecopy-testing
+'*
+'\******************************************************************************
+
+testcase tiSlideCopyNewPresentation
+
+ const MENUITEM_RENAME = 27027
+
+ Dim value1 as string
+ Dim value2 as string
+ Dim value12 as string
+ Dim value13 as string
+
+ printlog "This test copies one slide from one presentation to another."
+ printlog "Make new presentation"
+ Call hNewDocument
+ Call sSelectEmptyLayout
+ printlog "Insert three objects: Connector, Door-plate, and Smiley."
+
+ printlog "First we Insert a Connector."
+ kontext "Toolbar"
+ sleep 1
+ try
+ Verbinder.TearOff
+ catch
+ warnlog "bug for GH from FHA; .tearoff doesnt tell success"
+ endcatch
+ kontext "Connectorsbar"
+ sleep 2
+ Verbinder.click
+ sleep 5
+ gMouseDown (10,10)
+ gMouseMove (10,10,30,30)
+ gMouseUp (30,30)
+ kontext "Connectorsbar"
+ Connectorsbar.Close
+ hTypeKeys "<ESCAPE>"
+ hTypeKeys "<TAB>", 1
+ printlog "We rename the object via the contextmenu."
+ sleep (1)
+ DocumentImpress.TypeKeys "<SHIFT F10>"
+ sleep (2)
+ printlog "then Choose rename."
+ if hMenuFindSelect( MENUITEM_RENAME, true, 14) = false then
+ Warnlog "Context-Menu-entry `Rename` was not found. Therefore the test ends."
+ Call hCloseDocument
+ Goto Endsub
+ endif
+
+ kontext "NameDlgObject"
+ if ( NameDlgObject.exists( 2 ) ) then
+ NameField.SetText "First"
+ NameDlgObject.OK
+ else
+ warnlog( "<NameDlgObject> failed to open" )
+ endif
+
+ kontext "DocumentImpress"
+ hMouseClick DocumentImpress, 90, 90
+ '----------------------------------------------------------------------------1
+ printlog "Then we insert the second object: a Door-plate."
+
+ kontext "Toolbar"
+ sleep 2
+ try
+ StarShapes.TearOff
+ catch
+ warnlog( "<StarShapes.TearOff> failed" )
+ goto endsub
+ endcatch
+
+ kontext "StarShapes"
+ if ( StarShapes.exists( 2 ) ) then
+ StarShapesDoorplate.click
+ else
+ warnlog( "<StarShapesDoorplate> could not be clicked" )
+ endif
+
+ sleep (3)
+ gMouseDown (40,40)
+ gMouseMove (40,40,60,60)
+ gMouseUp (60,60)
+
+ kontext "StarShapes"
+ hCloseDialog( StarShapes, "close" )
+
+ hTypeKeys "<ESCAPE>"
+ hTypeKeys "<TAB>", 2
+ printlog "And then we rename the object."
+ sleep (1)
+ DocumentImpress.TypeKeys "<SHIFT F10>"
+ sleep 2
+ if hMenuFindSelect( MENUITEM_RENAME, true, 15) = false then
+ Warnlog "Context-Menu-entry `Rename` was not found. Therefore the test ends."
+ Call hCloseDocument
+ Goto Endsub
+ endif
+ kontext "NameDlgObject"
+ if ( NameDlgObject.exists( 2 ) ) then
+ NameField.SetText "Second"
+ NameDlgObject.OK
+ else
+ warnlog( "<NameDlgObject> could not be accessed" )
+ endif
+
+ kontext "DocumentImpress"
+ hMouseClick DocumentImpress, 90, 90
+ '----------------------------------------------------------------------------2
+ printlog "Then we insert the thrid object: a Smiley."
+ kontext "Toolbar"
+ sleep 1
+ try
+ SymbolShapes.TearOff
+ catch
+ warnlog "bug for GH from FHA; .tearoff doesnt tell success"
+ endcatch
+ kontext "SymbolShapes"
+ sleep 1
+ SymbolShapesSmiley.Click
+ sleep 2
+ gMouseDown (70,70)
+ gMouseMove (70,70,89,89)
+ gMouseUp (89,89)
+ kontext "SymbolShapes"
+ SymbolShapes.Close
+ hTypeKeys "<ESCAPE>"
+ hTypeKeys "<TAB>", 3
+ printlog "We rename the object via the Context-menu."
+ DocumentImpress.TypeKeys "<SHIFT F10>"
+ sleep (2)
+ 'Choose rename.
+ if hMenuFindSelect( MENUITEM_RENAME, true, 15) = false then
+ Warnlog "Context-Menu-entry `Rename` was not found. Therefore the test ends."
+ Call hCloseDocument
+ Goto Endsub
+ endif
+ kontext "NameDlgObject"
+ NameField.SetText "Third"
+ NameDlgObject.OK
+ kontext "DocumentImpress"
+ hMouseClick DocumentImpress, 90, 90
+ '---------------------------------------------------------------------------3
+ '/// Copy the slide to the clipboard ///'
+ kontext "Slides"
+ SlidesControl.TypeKeys "<PAGEUP>"
+ sleep (1)
+ SlidesControl.TypeKeys "<SHIFT F10>"
+ sleep 2
+ printlog "We copy the object via the Context-menu."
+
+ if hMenuFindSelect(5711, true, 10) = false then
+ Warnlog "Context-Menu-entry `Copy` was not found. Therefore the test ends."
+ Call hCloseDocument
+ Goto Endsub
+ endif
+ '/// Close the presentation-window ///'
+ Call hCloseDocument
+ '/// Open a new presentation ///'
+ Call hNewDocument
+ '/// Paste the slide from the clipboard ///'
+ kontext "Slides"
+ hUseAsyncSlot( "EditPaste" )
+ '/// Delete the first slide ///'
+ hUseAsyncSlot( "EditDeleteSlide" )
+ '/// Check if all three objects exists, and has the right values ///'
+ kontext "DocumentImpress"
+ hTypeKeys "<ESCAPE>"
+ hTypeKeys "<TAB>", 1 'Select the first object.
+ 'Bring up the kontext-menu for the object
+ sleep (1)
+ DocumentImpress.TypeKeys "<SHIFT F10>"
+ sleep 2
+ printlog "We rename the object via the Context-menu."
+ if hMenuFindSelect( MENUITEM_RENAME, true, 14) = false then
+ Warnlog "Context-Menu-entry `Rename` was not found. Therefore the test ends."
+ Call hCloseDocument
+ Goto Endsub
+ endif
+ printlog "Read out what the name is, and checks if it's correct."
+ kontext "NameDlgObject"
+ value1 = NameField.GetText
+ NameDlgObject.OK
+ if value1 = "First" then
+ printlog "First object was found correctly"
+ else
+ Warnlog "Wrong object or object-name! The name found was: " + value1
+ endif
+ kontext "DocumentImpress"
+ hMouseClick DocumentImpress, 90, 90
+ DocumentImpress.TypeKeys "<TAB TAB>" 'Select the second object.
+ 'Bring up the kontext-menu for the object
+ sleep (1)
+ DocumentImpress.TypeKeys "<SHIFT F10>"
+ sleep 2
+ printlog "We rename the object via the Context-menu."
+ if hMenuFindSelect( MENUITEM_RENAME, true, 15) = false then
+ Warnlog "Context-Menu-entry `Rename` was not found. Therefore the test ends."
+ Call hCloseDocument
+ Goto Endsub
+ endif
+ printlog "Read out what the name is, and check if it's correct."
+ sleep 1
+ kontext "NameDlgObject"
+ value12 = NameField.GetText
+ NameDlgObject.OK
+
+ if value12 = "Second" then
+ printlog "Second object was found correctly"
+ else
+ Warnlog "Wrong object or object-name! The name found was: " + value12
+ endif
+
+ kontext "DocumentImpress"
+ hMouseClick DocumentImpress, 90, 90
+ DocumentImpress.TypeKeys "<TAB TAB TAB>" 'Select the third object.
+ 'Bring up the kontext-menu for the object
+ sleep (2)
+ DocumentImpress.TypeKeys "<SHIFT F10>"
+ sleep 2
+ printlog "We rename the object via the Context-menu."
+ if hMenuFindSelect( MENUITEM_RENAME, true, 15) = false then
+ Warnlog "Context-Menu-entry `Rename` was not found. Therefore the test ends."
+ Call hCloseDocument
+ Goto Endsub
+ endif
+ printlog "Read out what the name is, and check if it's correct."
+ kontext "NameDlgObject"
+ value13 = NameField.GetText
+ NameDlgObject.OK
+
+ if value13 = "Third" then
+ printlog "Third object was found correctly"
+ else
+ Warnlog "Wrong object or object-name! The name found was: " + value13
+ endif
+
+ '/// Close the bars we opened before. ///'
+ kontext "Connectorsbar"
+ if Connectorsbar.Exists then Connectorsbar.Close
+ kontext "SymbolShapes"
+ if SymbolShapes.Exists then SymbolShapes.Close
+ kontext "StarShapes"
+ if StarShapes.Exists then StarShapes.Close
+
+ '/// Close Presentation. End testcase ///'
+ Call hCloseDocument
+endcase 'tiSlideCopyNewPresentation
+
+'-------------------------------------------------------------------------
+
+testcase tiSlideCopyDuplicate
+ Dim value1 as string
+ Dim value2 as string
+ Dim value12 as string
+ Dim value13 as string
+ dim i as integer
+ printlog "Make new presentation"
+ Call hNewDocument
+ Call sSelectEmptyLayout
+ printlog "Insert Connector."
+ kontext "Toolbar"
+ sleep 1
+ try
+ Verbinder.TearOff ' insert connector
+ catch
+ warnlog "bug for GH from FHA; .tearoff doesnt tell success"
+ endcatch
+ kontext "Connectorsbar"
+ sleep 1
+ Verbinder.click
+ sleep 1
+ kontext "DocumentImpress"
+ gMouseDown (10,10)
+ gMouseMove (10,10,30,30)
+ gMouseUp (30,30)
+
+ hTypeKeys "<ESCAPE>"
+ hTypeKeys "<TAB>", 1
+ sleep (1)
+
+ printlog "rename object"
+ DocumentImpress.TypeKeys "<SHIFT F10>"
+ sleep 1
+
+ printlog "Choose rename"
+ if hMenuFindSelect(27027, true, 14) = false then
+ Warnlog "Context-Menu-entry `Rename` was not found. Therefore the test ends."
+ Call hCloseDocument
+ Goto Endsub
+ endif
+ kontext "NameDlgObject"
+ NameField.SetText "First"
+ NameDlgObject.OK
+ sleep 1
+
+ kontext "DocumentImpress"
+ hMouseClick DocumentImpress, 90, 90
+
+ printlog "2 Insert Door-plate"
+ kontext "Toolbar"
+ sleep 1
+ try
+ StarShapes.TearOff
+ catch
+ warnlog "bug for GH from FHA; .tearoff doesnt tell success"
+ endcatch
+ kontext "StarShapes"
+ sleep 1
+ StarShapesDoorplate.click
+ sleep 1
+ kontext "DocumentImpress"
+ gMouseDown (40,40)
+ gMouseMove (40,40,60,60)
+ gMouseUp (60,60)
+
+ hTypeKeys "<ESCAPE>"
+ hTypeKeys "<TAB>", 2
+ sleep (1)
+
+ printlog "Rename object"
+ kontext "DocumentImpress"
+ DocumentImpress.TypeKeys "<SHIFT F10>"
+ sleep (1)
+ printlog "Choose rename."
+ if hMenuFindSelect(27027, true, 15) = false then
+ Warnlog "Context-Menu-entry `Rename` was not found. Therefore the test ends."
+ Call hCloseDocument
+ Goto Endsub
+ endif
+ kontext "NameDlgObject"
+ NameField.SetText "Second"
+ NameDlgObject.OK
+ sleep 1
+
+ kontext "DocumentImpress"
+ hMouseClick DocumentImpress, 90, 90
+
+ printlog "Insert Smiley."
+ kontext "Toolbar"
+ sleep 1
+ try
+ SymbolShapes.TearOff
+ catch
+ warnlog "bug for GH from FHA; .tearoff doesnt tell success"
+ endcatch
+ kontext "SymbolShapes"
+ sleep 1
+ SymbolShapesSmiley.Click
+ sleep 1
+ gMouseDown (70,70)
+ gMouseMove (70,70,89,89)
+ gMouseUp (89,89)
+
+ hTypeKeys "<ESCAPE>"
+ hTypeKeys "<TAB>", 3
+ sleep (1)
+
+ printlog "rename object"
+ DocumentImpress.TypeKeys "<SHIFT F10>"
+ sleep (1)
+ printlog "Choose rename"
+ if hMenuFindSelect(27027, true, 15) = false then
+ Warnlog "Context-Menu-entry `Rename` was not found. Therefore the test ends."
+ Call hCloseDocument
+ Goto Endsub
+ endif
+ kontext "NameDlgObject"
+ NameField.SetText "Third"
+ NameDlgObject.OK
+ sleep 1
+
+ kontext "DocumentImpress"
+ hMouseClick DocumentImpress, 90, 90
+
+ printlog "Close the bars we opened before."
+ kontext "Connectorsbar"
+ if Connectorsbar.Exists then Connectorsbar.Close
+ kontext "SymbolShapes"
+ if SymbolShapes.Exists then SymbolShapes.Close
+ kontext "StarShapes"
+ if StarShapes.Exists then StarShapes.Close
+
+ printlog "Copy the slide to the clipboard"
+ kontext "Slides"
+ SlidesControl.TypeKeys "<PAGEUP>"
+ sleep (1)
+ SlidesControl.TypeKeys "<SHIFT F10>"
+ sleep (1)
+ printlog "Choose `Copy`"
+ if hMenuFindSelect(5711, true, 10) = false then
+ Warnlog "Context-Menu-entry `Copy` was not found.Therefore the test ends."
+ Call hCloseDocument
+ Goto Endsub
+ endif
+
+ printlog "Paste the content from the Clipboard"
+ kontext "Slides"
+ printlog "open context-menu choose 'paste'"
+
+ EditPaste
+
+ kontext "InsertPaste"
+ if InsertPaste.Exists(1) then
+ After.Check
+ InsertPaste.OK
+ endif
+ sleep (2)
+ printlog "Check if we have two slides, and that the objects exists, and has the right values "
+
+ kontext "Slides"
+ SlidesControl.TypeKeys "<PAGEUP>"
+
+ for i = 1 to 2
+ Printlog "Checking objects the " + i + " + time."
+ kontext "DocumentImpress"
+ hMouseClick DocumentImpress, 90, 90
+ DocumentImpress.TypeKeys "<TAB>"
+ sleep (1)
+
+ DocumentImpress.TypeKeys "<SHIFT F10>"
+ sleep 1
+ printlog "Choose rename"
+ if hMenuFindSelect(27027, true, 14) = false then
+ Warnlog "Context-Menu-entry `Rename` was not found. Therefore the test ends."
+ Call hCloseDocument
+ Goto Endsub
+ endif
+
+ printlog "Read out what the name is, and check if its correct."
+ kontext "NameDlgObject"
+ value1 = NameField.GetText
+ NameDlgObject.OK
+
+ if value1 = "First" then
+ printlog "First object was found correctly"
+ else
+ Warnlog "Wrong object or object-name! The name found was: " + value1
+ endif
+
+ hTypeKeys "<ESCAPE>"
+ DocumentImpress.TypeKeys "<TAB>", 2
+ sleep (1)
+ DocumentImpress.TypeKeys "<SHIFT F10>"
+
+ printlog "Choose rename"
+ if hMenuFindSelect(27027, true, 15) = false then
+ Warnlog "Context-Menu-entry `Rename` was not found. Therefore the test ends."
+ Call hCloseDocument
+ Goto Endsub
+ endif
+
+ printlog "Read out what the name is, and check if its correct."
+ kontext "NameDlgObject"
+ value12 = NameField.GetText
+ NameDlgObject.OK
+
+ if value12 = "Second" then
+ printlog "Second object was found correctly"
+ else
+ Warnlog "Wrong object or object-name! The name found was: " + value12
+ endif
+
+ hTypeKeys "<ESCAPE>"
+ printlog "Select the third object."
+ hTypeKeys "<TAB>", 3
+ sleep (1)
+
+ printlog "Bring up the kontext-menu for the object"
+ DocumentImpress.TypeKeys "<SHIFT F10>"
+ sleep 1
+ printlog "Choose rename"
+ if hMenuFindSelect(27027, true, 15) = false then
+ Warnlog "Context-Menu-entry `Rename` was not found. Therefore the test ends."
+ Call hCloseDocument
+ Goto Endsub
+ endif
+
+ printlog "Read out what the name is, and check if its correct."
+ kontext "NameDlgObject"
+ value13 = NameField.GetText
+ NameDlgObject.OK
+
+ if value13 = "Third" then
+ printlog "Third object was found correctly"
+ else
+ Warnlog "Wrong object or object-name! The name found was: " + value13
+ endif
+ kontext "Slides"
+ SlidesControl.TypeKeys "<DOWN>"
+ next i
+
+ printlog " Close Presentation. End testcase "
+ Call hCloseDocument
+endcase 'tiSlidecopyDuplicate
+
+'-----------------------------------------------------------------------
+
+testcase tiSlideCopyPasteSpecial
+ qaerrorlog "#i93377#: Paste special dialog does not come up with kontext on slide pane"
+ goto endsub
+
+ Dim value1 as string
+ Dim value2 as string
+ Dim value3 as string
+ '/// Copies slide, and pastes it with "Paste Special", ///'
+ '/// just to see if the office can handle it ///'
+ '/// Make new presentation ///'
+ Call hNewDocument
+ '/// Insert three objects: Connector, Door-plate, and Smiley ///'
+
+ '1 Insert Connector.
+ kontext "Toolbar"
+ sleep 1
+ try
+ Verbinder.TearOff ' insert connector
+ catch
+ warnlog "bug for GH from FHA; .tearoff doesnt tell success"
+ endcatch
+ kontext "Connectorsbar"
+ sleep 1
+ Verbinder.click
+ sleep 1
+ gMouseDown (10,10)
+ gMouseMove (10,10,30,30)
+ gMouseUp (30,30)
+
+ kontext "DocumentImpress"
+ hMouseClick DocumentImpress, 90, 90
+
+ '2 Insert Door-plate.
+ kontext "Toolbar"
+ sleep 1
+ try
+ StarShapes.TearOff ' insert connector
+ catch
+ warnlog "bug for GH from FHA; .tearoff doesnt tell success"
+ endcatch
+ kontext "StarShapes"
+ sleep 1
+ StarShapesDoorplate.click
+ sleep 1
+ gMouseDown (40,40)
+ gMouseMove (40,40,60,60)
+ gMouseUp (60,60)
+
+ kontext "DocumentImpress"
+ hMouseClick DocumentImpress, 90, 90
+
+ '3 Insert Smiley.
+ kontext "Toolbar"
+ sleep 1
+ try
+ SymbolShapes.TearOff ' insert connector
+ catch
+ warnlog "bug for GH from FHA; .tearoff doesnt tell success"
+ endcatch
+ kontext "SymbolShapes"
+ sleep 1
+ SymbolShapesSmiley.Click
+ sleep 1
+ gMouseDown (70,70)
+ gMouseMove (70,70,89,89)
+ gMouseUp (89,89)
+
+ '/// Copy the slide to the clipboard ///'
+ kontext "Slides"
+ SlidesControl.TypeKeys "<PAGEUP>"
+ SlidesControl.TypeKeys "<SHIFT F10>"
+ sleep 1
+ 'Choose `Copy`
+ if hMenuFindSelect(5711, true, 10) = false then
+ Warnlog "Context-Menu-entry `Copy` was not found. Therefore the test ends."
+ Call hCloseDocument
+ Goto Endsub
+ endif
+
+ '/// Try to paste special. And check that the office still stays alive ///'
+ EditPasteSpecial
+ kontext "InhaltEinfuegen"
+ InhaltEinfuegen.OK
+
+ '/// Close the bars we opened before. ///'
+ kontext "Connectorsbar"
+ if Connectorsbar.Exists then Connectorsbar.Close
+ kontext "SymbolShapes"
+ if SymbolShapes.Exists then SymbolShapes.Close
+ kontext "StarShapes"
+ if StarShapes.Exists then StarShapes.Close
+
+ sleep 1
+ kontext "DocumentImpress"
+ '/// Close Presentation. End testcase ///'
+
+ Call hCloseDocument
+endcase 'tiSlideCopyPasteSpecial
+
+'-----------------------------------------------------------------------
+testcase tiSlideCopyInSlideSorter
+ qaerrorlog "#i58418#: Pasting in slide sorter sets slide to wrong position"
+ goto endsub
+
+ Dim value1 as string
+ Dim value2 as string
+ Dim value3 as string
+ '/// Copies slides within the slidesorter, and makes sure they are pasted on the correct position ///'
+ '/// Make new presentation ///'
+ Call hNewDocument
+ '/// Insert an object: Connector, on the first slide ///'
+ kontext "Toolbar"
+ sleep 1
+ try
+ Verbinder.TearOff
+ catch
+ warnlog "bug for GH from FHA; .tearoff doesnt tell success"
+ endcatch
+ kontext "Connectorsbar"
+ sleep 1
+ Verbinder.click
+ Verbinder.click
+ Verbinder.click
+ sleep 1
+ kontext "DocumentImpress"
+ gMouseDown (10,10)
+ gMouseMove (10,10,30,30)
+ gMouseUp (30,30)
+ Printlog " Inserted a Connector-object."
+ 'Rename object
+ hTypeKeys "<ESCAPE>"
+ hTypeKeys "<TAB>", 1
+ DocumentImpress.TypeKeys "<SHIFT F10>"
+
+ 'Rename
+ if hMenuFindSelect(27027, true, 14) = false then
+ Warnlog "Context-Menu-entry `Rename` was not found. Therefore the test ends."
+ Call hCloseDocument
+ Goto Endsub
+ endif
+ kontext "NameDlgObject"
+ NameField.SetText "First"
+ NameDlgObject.OK
+ sleep 1
+ Printlog " Renamed a the object to 'First'"
+
+ sleep 3
+ '/// Rename slide to "1" ///'
+ kontext "Slides"
+ SlidesControl.TypeKeys "<PAGEUP>"
+ SlidesControl.TypeKeys "<SHIFT F10>"
+ sleep 3
+ 'Rename
+ if hMenuFindSelect(27268, true, 2) = false then
+ Warnlog "Context-Menu-entry `Rename` was not found. Therefore the test ends."
+ Call hCloseDocument
+ Goto Endsub
+ endif
+
+ kontext "NameDlgPage"
+ NameField.SetText "1"
+ NameDlgPage.OK
+ sleep 1
+ Printlog " Renamed the Slide to '1'"
+
+ kontext "DocumentImpress"
+ hMouseClick DocumentImpress, 90, 90
+ sleep 3
+
+ '/// Insert a new slide ///'
+ kontext "Slides"
+ SlidesControl.TypeKeys "<TAB><PAGEDOWN>"
+ SlidesControl.OpenContextMenu
+ sleep 3
+ 'Insert slide
+ if hMenuFindSelect(27014, true, 1) = false then
+ Warnlog "Context-Menu-entry `Insert slide` was not found. Therefore the test ends."
+ Call hCloseDocument
+ Goto Endsub
+ endif
+ Printlog " Inserted a new slide."
+ '/// Insert an object: Door-plate, on the second slide ///'
+ kontext "Toolbar"
+ sleep 1
+ try
+ StarShapes.TearOff
+ catch
+ warnlog "bug for GH from FHA; .tearoff doesnt tell success"
+ endcatch
+ kontext "StarShapes"
+ sleep 1
+ StarShapesDoorplate.click
+ sleep 1
+ kontext "DocumentImpress"
+ gMouseDown (40,40)
+ gMouseMove (40,40,60,60)
+ gMouseUp (60,60)
+ Printlog " Inserted a Door-Plate-object."
+
+ hTypeKeys "<ESCAPE>"
+ hTypeKeys "<TAB>", 2
+ hTypeKeys "<SHIFT F10>"
+
+ ' Rename
+ if hMenuFindSelect(27027, true, 15) = false then
+ Warnlog "Context-Menu-entry `Rename` was not found. Therefore the test ends."
+ Call hCloseDocument
+ Goto Endsub
+ endif
+
+ kontext "NameDlgObject"
+ NameField.SetText "Second"
+ NameDlgObject.OK
+ sleep 1
+ Printlog " Renamed a the object to 'Second'"
+
+ kontext "DocumentImpress"
+ hMouseClick DocumentImpress, 90, 90
+ sleep 2
+ '/// Rename slide to "2" ///'
+ kontext "Slides"
+ SlidesControl.OpenContextMenu
+ sleep 3
+ ' Rename
+ if hMenuFindSelect(27268, true, 3) = false then
+ Warnlog "Context-Menu-entry `Rename` was not found. Therefore the test ends."
+ Call hCloseDocument
+ Goto Endsub
+ endif
+ kontext "NameDlgPage"
+ NameField.SetText "2"
+ NameDlgPage.OK
+ sleep 1
+ Printlog " Renamed the slide '2'"
+
+ '/// Insert a new slide ///'
+ kontext "Slides"
+ Slidescontrol.TypeKeys "<PAGEDOWN>", 2
+ Slidescontrol.TypeKeys "<SHIFT F10>"
+ sleep 3
+ 'Insert slide
+ if hMenuFindSelect(27014, true, 1) = false then
+ Warnlog "Context-Menu-entry `Insert slide` was not found. Therefore the test ends."
+ Call hCloseDocument
+ Goto Endsub
+ endif
+ Printlog " Inserted a new slide."
+
+ '/// Insert an object: Smiley, on the second slide ///'
+ kontext "Toolbar"
+ sleep 1
+ try
+ SymbolShapes.TearOff
+ catch
+ warnlog "bug for GH from FHA; .tearoff doesnt tell success"
+ endcatch
+ kontext "SymbolShapes"
+ sleep 1
+ SymbolShapesSmiley.Click
+ sleep 1
+ gMouseDown (70,70)
+ gMouseMove (70,70,89,89)
+ gMouseUp (89,89)
+ Printlog " Inserted a Smiley-object."
+
+ 'Rename object
+ hTypeKeys "<ESCAPE>"
+ hTypeKeys "<TAB>", 2
+ hTypeKeys "<SHIFT F10>"
+
+ 'Choose rename.
+ if hMenuFindSelect(27027, true, 15) = false then
+ Warnlog "Context-Menu-entry `Rename` was not found. Therefore the test ends."
+ Call hCloseDocument
+ Goto Endsub
+ endif
+ kontext "NameDlgObject"
+ NameField.SetText "Third"
+ NameDlgObject.OK
+ Printlog " Renamed a the object to 'Third'"
+
+ '/// Rename slide to "3" ///'
+ kontext "Slides"
+ Slidescontrol.TypeKeys "<PAGEDOWN>", 2
+ SlidesControl.OpenContextMenu
+ sleep 3
+ ' Rename
+ if hMenuFindSelect(27268, true, 3) = false then
+ Warnlog "Context-Menu-entry `Rename` was not found. Therefore the test ends."
+ Call hCloseDocument
+ Goto Endsub
+ endif
+
+ kontext "NameDlgPage"
+ NameField.SetText "3"
+ NameDlgPage.OK
+ sleep 1
+ Printlog " Renamed the slide '3'"
+
+ '/// Close the bars we opened before. ///'
+ kontext "Connectorsbar"
+ if Connectorsbar.Exists then Connectorsbar.Close
+ kontext "SymbolShapes"
+ if SymbolShapes.Exists then SymbolShapes.Close
+ kontext "StarShapes"
+ if StarShapes.Exists then StarShapes.Close
+
+ '/// Change to Slidesorter ///'
+ kontext "DocumentImpress"
+ ViewSlideSorter
+
+ '/// Now we have changed view to the slidesorter ///'
+
+ kontext "Slides"
+ Printlog " Changed view to 'SlideSorter'"
+ '/// Make sure the last slide is selcted ///'
+ SlidesControl.TypeKeys "<TAB>"
+ SlidesControl.TypeKeys "<PAGEDOWN>", 3
+
+ '/// Cut the last slide ///'
+ SlidesControl.TypeKeys "<MOD1 X>"
+
+ '/// Make sure the first slide is selected ///'
+ SlidesControl.TypeKeys "<TAB>"
+ SlidesControl.TypeKeys "<PAGEUP>", 2
+ sleep 1
+
+ '/// Paste the Slide ///'
+ kontext "Slides"
+ SlidesControl.TypeKeys "<MOD1 V>"
+
+ '/// choose "Before" as specification for where
+ Kontext "InsertPaste"
+ if InsertPaste.Exists(3) then
+ Before.Check
+ InsertPaste.OK
+ Printlog " Pasted slide 'Before'"
+ else
+ warnlog " Problem when copying/pasting slide."
+ endif
+
+ '/// Check where the slide ended up ///'
+ kontext "Slides"
+ SlidesControl.TypeKeys "<TAB>"
+ SlidesControl.TypeKeys "<PAGEUP>", 3 'to get to the first slide
+ SlidesControl.TypeKeys "<SHIFT F10>"
+ sleep 3
+ ' Rename
+ if hMenuFindSelect(27268, true, 3) = false then
+ Warnlog "Context-Menu-entry `Rename` was not found. Therefore the test ends."
+ Call hCloseDocument
+ Goto Endsub
+ endif
+
+ kontext "NameDlgPage"
+ if NameField.GetText <> "3" then
+ Warnlog "Wrong slide found! Expected nr 3, but found " + NameField.GetText + "."
+ else
+ Printlog " Slide nr 3 was found correctly."
+ endif
+ NameDlgPage.OK
+ sleep 1
+
+ kontext "Slides"
+ '/// Choose the slide in the middle (named "1") ///'
+ SlidesControl.TypeKeys "<TAB>"
+ SlidesControl.TypeKeys "<PAGEDOWN>", 3 'to get to the last slide
+ SlidesControl.TypeKeys "<PAGEUP>" 'to go back one step
+ SlidesControl.OpenContextMenu (true)
+ ' Check the name of that slide (via Rename)
+ if hMenuFindSelect(27268, true, 3) = false then
+ Warnlog "Context-Menu-entry `Rename` was not found. Therefore the test ends."
+ Call hCloseDocument
+ Goto Endsub
+ endif
+
+ kontext "NameDlgPage"
+ if NameField.GetText <> "1" then
+ Warnlog "Wrong slide found! Expected nr 1, but found " + NameField.GetText + "."
+ else
+ Printlog " Slide nr 1 was found correctly in the middle position."
+ endif
+ NameDlgPage.OK
+ sleep 1
+ kontext "Slides"
+
+ '/// Cut the slide ///'
+ SlidesControl.TypeKeys "<SHIFT F10>"
+ sleep 3
+ if hMenuFindSelect(5710, true, 10) = false then
+ Warnlog "Context-Menu-entry `Cut` was not found. Therefore the test ends."
+ Call hCloseDocument
+ Goto Endsub
+ endif
+
+ '/// Make sure we have selected the last slide ///'
+ SlidesControl.TypeKeys "<TAB>"
+ SlidesControl.TypeKeys "<PAGEDOWN>", 2
+
+ '/// Place the mousepointer to the left of the first slide ///'
+ sleep 1
+ kontext "Slides"
+ SlidesControl.MouseMove 2, 3
+ SlidesControl.OpenContextMenu true
+ sleep 3
+
+ '/// Paste the Slide ///'
+ if hMenuFindSelect(5712, true, 12) = false then
+ Warnlog "Context-Menu-entry `Paste` were not found. Therefore the test ends."
+ Call hCloseDocument
+ Goto Endsub
+ endif
+ sleep 1
+
+ '/// Choose "After" as specification for where ///'
+ Kontext "InsertPaste"
+ if InsertPaste.Exists(3) then
+ After.Check
+ InsertPaste.OK
+ Printlog " Pasted slide 'After'"
+ else
+ warnlog " Problem when copying/pasting slide."
+ endif
+
+ '/// Check where the slide ended up. Should have showed up at the last position ///'
+ kontext "Slides"
+ SlidesControl.TypeKeys "<TAB>"
+ SlidesControl.TypeKeys "<PAGEDOWN>", 3 'to get to the last slide
+ SlidesControl.TypeKeys "<SHIFT F10>" '= open context menu
+ sleep 3
+ ' Rename
+ if hMenuFindSelect(27268, true, 3) = false then
+ Warnlog "Context-Menu-entry `Rename` was not found. Therefore the test ends."
+ Call hCloseDocument
+ Goto Endsub
+ endif
+
+ kontext "NameDlgPage"
+ if NameField.GetText <> "1" then
+ Warnlog "Wrong slide found! Expected nr 1, but found " + NameField.GetText + "."
+ else
+ Printlog " Slide nr 1 was found correctly."
+ endif
+ NameDlgPage.OK
+ sleep 1
+
+ '/// Close Presentation. End testcase ///'
+ Call hCloseDocument
+endcase 'tiSlideCopyInSlideSorter
+
+'------------------------------------------------------------------------
+
+'TODO FHA - Check the objects after pasting them.
diff --git a/testautomation/graphics/optional/includes/impress/i_slidelayer.inc b/testautomation/graphics/optional/includes/impress/i_slidelayer.inc
new file mode 100644
index 000000000000..441e0a323099
--- /dev/null
+++ b/testautomation/graphics/optional/includes/impress/i_slidelayer.inc
@@ -0,0 +1,522 @@
+'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
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* Owner : wolfram.garten@oracle.com
+'*
+'* short description :
+'*
+'*********************************************************************
+' #1 tiInsertExpandSlide
+' #1 tiInsertSummarySlide
+' #1 tiFormatSeitenlayout
+' #1 t114174
+' #1 t111862
+'\********************************************************************
+
+' Dateiname.SetText ConvertPath (gTesttoolPath + "global\input\graf_inp\enter.bmp")
+' Inhalt.SetText ConvertPath (gTesttoolPath + "graphics\required\input\leer.sxd") '/// auto.sdd choosen ///'
+
+'-------------------------------------------------------------------------------
+testcase tiInsertExpandSlide
+
+ dim i,x as integer
+ dim sTemp as string
+ dim b116350 as boolean
+
+ '/// open application ///'
+ Call hNewDocument
+ Call sSelectEmptyLayout
+ '/// create presupposition ///
+ '///+ View->Master View->Outline View ///'
+ ViewWorkspaceOutlineView
+ Sleep 1
+ Kontext "DocumentImpressOutlineView"
+ '///+ create a slide with some levels...and some more slides with just one level... ///'
+ '///+ it should look like this: ///'
+ '///+-------------------------------------------------- ///'
+ '///+ Slide 1///'
+ '///+ - A ///'
+ '///+ - - B///'
+ '///+ - - - C///'
+ '///+ - - - - D///'
+ '///+ - - - - - - F///'
+ '///+ - B///'
+ '///+ - C///'
+ '///+ - D///'
+ '///+ Slide 2 ///'
+ '///+ Slide 3 ///'
+ '///+ Slide 4 ///'
+ '///+ Slide 5 ///'
+ '///+-------------------------------------------------- ///'
+ DocumentImpressOutlineView.TypeKeys "Slide 1"
+ for i = 1 to 6
+ DocumentImpressOutlineView.TypeKeys "<return><tab>"
+ DocumentImpressOutlineView.TypeKeys chr(64+i)
+ next i
+ DocumentImpressOutlineView.TypeKeys "<return>"
+ DocumentImpressOutlineView.TypeKeys ("<shift tab>",5)
+ for i = 1 to 3
+ DocumentImpressOutlineView.TypeKeys chr(65+i)
+ DocumentImpressOutlineView.TypeKeys "<return>"
+ next i
+ DocumentImpressOutlineView.TypeKeys ("<shift tab>")
+ for i = 2 to 5
+ DocumentImpressOutlineView.TypeKeys "Slide " + i
+ DocumentImpressOutlineView.TypeKeys "<return>"
+ next i
+ DocumentImpressOutlineView.TypeKeys "<backspace>"
+ '///+ View->Master View->Drawing View ///'
+ ViewWorkspaceDrawingView
+ Sleep 1
+ '///+ there have to be 5 slides now ///'
+ fGetSlideCount (5)
+
+ '/// goto the first slide ///'
+ hTypeKeys "<home>"
+ '///<b> Insert->Expand Slide </b>///'
+ InsertExpandSlide
+ ' usually the content of the new pages is the same as the curren, there is a slide created for every part in the first outline level (gliederungsebene)
+ Sleep 1
+ if (8 = fGetSlideCount (8)) then
+ printlog "Insert Expand Slide accomplished correctly"
+ else
+ warnLog "Bug with Insert Expand Slide"
+ endif
+ '///+ check slide content ///'
+ hTypeKeys ("<TAB><F2>"
+ EditSelectAll
+ EditCopy
+ sTemp = GetClipboard()
+ if (sTemp <> "A") then
+ Warnlog "wrong slide content, expected: '" + "Slide 1" + "'; but got: '" + sTemp + "'"
+ else
+ Printlog "OK :-)"
+ endif
+ for i = 2 to 4
+ hTypeKeys "<pagedown>"
+ hTypeKeys ("<TAB><F2>")
+ EditSelectAll
+ EditCopy
+ sTemp = GetClipboard()
+ if (sTemp <> chr(64+i)) then
+ Warnlog "Wrong slide content, expected: '" + chr(64+i) + "'; but got: '" + sTemp + "'"
+ else
+ Printlog "OK :-)"
+ endif
+ next i
+ for i = 2 to 5
+ hTypeKeys "<pagedown>" 'If the first slide existed, this is where it would have been.
+ hTypeKeys ("<TAB><F2>")
+ EditSelectAll
+ EditCopy
+ sTemp = GetClipboard()
+ if (sTemp <> ("Slide "+i)) then
+ Warnlog "Wrong slide content, expected: '" + "Slide "+i + "'; but got: '" + sTemp + "'"
+ else
+ Printlog "OK :-)"
+ endif
+ next i
+
+ hTypeKeys "<escape><home>"
+ '///<b> Insert->Expand Slide </b>///'
+ InsertExpandSlide
+ '/// And since the Second slide now should be named "B", we check that first ///'
+ hTypeKeys ("<TAB><F2>")
+ EditSelectAll
+ try
+ EditCopy
+ catch
+ printlog "Something wrong when trying to select Slide-name."
+ endcatch
+ sTemp = GetClipboard()
+ if (sTemp <> "B") then
+ Warnlog "Wrong slide content, expected: 'B'; but got: '" + sTemp + "'"
+ else
+ Printlog "OK :-)"
+ endif
+ hTypeKeys "<pagedown>"
+ hTypeKeys ("<TAB><F2>")
+ EditSelectAll
+ for i = 2 to 4
+ try
+ EditCopy
+ catch
+ printlog "Something wrong when trying to select Slide-name."
+ endcatch
+ sTemp = GetClipboard()
+ if (sTemp <> chr(64+i)) then
+ Warnlog "Wrong slide content, expected: '" + chr(64+i) + "'; but got: '" + sTemp + "'"
+ else
+ Printlog "OK :-)"
+ endif
+ hTypeKeys "<pagedown>"
+ hTypeKeys ("<TAB><F2>")
+ EditSelectAll
+ next i
+ for i = 2 to 5
+ EditCopy
+ sTemp = GetClipboard()
+ if (sTemp <> ("Slide "+i)) then
+ Warnlog "Wrong slide content, expected: '" + "Slide "+i + "'; but got: '" + sTemp + "'"
+ else
+ Printlog "OK :-)"
+ endif
+ hTypeKeys "<pagedown>" 'If the first slide existed, this is where it would have been.
+ hTypeKeys ("<TAB><F2>")
+ EditSelectAll
+ next i
+
+ '/// close application ///'
+ Call hCloseDocument
+endcase 'tiInsertExpandSlide
+
+'-------------------------------------------------------------------------------
+testcase tiInsertSummarySlide
+
+ dim i as integer
+ dim sTemp as string
+ dim saText (10) as string
+
+ for i = 1 to 7
+ saText (i) = chr(64+i)
+ next i
+ saText (5) = ""
+ saText (7) = ""
+
+ printlog "Open application."
+ Call hNewDocument
+
+ printlog "Presupposition : on the slide has to be something from the outline view AND i have to be on such a slide!"
+ printlog "View->Master View->Outline View."
+ ViewWorkspaceOutlineView
+ Sleep 1
+ Kontext "DocumentImpressOutlineView"
+ DocumentImpressOutlineView.TypeKeys "<home>"
+ printlog "+ create 7 slides like this:"
+ printlog "+--------------------------------------------------"
+ printlog "+ A "
+ printlog "+ B"
+ printlog "+ C"
+ printlog "+ D"
+ printlog "+ "
+ printlog "+ F"
+ printlog "+ "
+ printlog "+--------------------------------------------------"
+ for i = 1 to 7
+ DocumentImpressOutlineView.TypeKeys (saText(i) + "<return>")
+ next i
+
+ printlog "View->Master View->Drawing View ."
+ ViewWorkspaceDrawingView
+ Sleep 1
+ printlog "Goto first slide by typing [home]"
+ hTypeKeys "<Home>"
+ printlog "test menue entries"
+ printlog "Insert->Summery Slide."
+ try
+ InsertSummerySlide
+ catch
+ warnlog "InsertSummerySlide didnt work. Check why."
+ endcatch
+ Sleep 1
+ printlog "slide is appended after the last slide"
+ printlog "the content of the slide depends on from which slide the function was called!"
+ printlog "it is only from the actual slide to the end of the presentation"
+ printlog "it is aloowed to have a slide without the outline stuff inbetween"
+ printlog "check slide content"
+ hTypeKeys "<Tab>"
+ wait 50
+ htypekeys "<Tab>"
+ wait 50
+ htypekeys "<F2>"
+ wait 50
+ htypekeys "<mod1 Home>"
+ wait 50
+ for i = 1 to 7
+ hTypeKeys "<Shift End>"
+ EditCopy
+ sTemp = GetClipboardText
+ if (saText(i) <> sTemp) then
+ if ((i=5) OR (i=7)) then
+ if (saText(6) <> sTemp) then
+ Warnlog "WRONG: is: '" + sTemp + "'; should: '" + saText(6) + "'"
+ else
+ Printlog "is: '" + sTemp + "'; should: '" + saText(i) + "'"
+ endif
+ else
+ Warnlog "WRONG: is: '" + sTemp + "'; should: '" + saText(i) + "'"
+ endif
+ else
+ Printlog "is: '" + sTemp + "'; should: '" + saText(i) + "'"
+ endif
+ hTypeKeys "<down><home>"
+ next i
+ printlog "close application"
+ Call hCloseDocument
+endcase 'tiInsertSummarySlide
+
+'------------------------------------------------------------------------------
+testcase tiFormatSeitenlayout
+
+ qaerrorlog "outcommented due to bug"
+ goto endsub
+
+ Printlog "Format/Page Layout"
+ Call hNewDocument '/// new impress document ///'
+
+ FormatPage '/// format page ///'
+ Kontext "Tasks"
+ sleep 5
+ SetClipboard LayoutsPreview.GetText '/// get page name ///'
+ SeitenName.SetText "Test" '/// change page name ///'
+ sleep 1
+ if Hintergrund.IsChecked=False Then '/// check background ///'
+ Hintergrund.Check
+ else
+ Hintergrund.UnCheck
+ if Hintergrund.IsChecked=False Then PrintLog " Background is deactivated"
+ end if
+
+ if ObjekteAufDemHintergrund.IsChecked = True Then '/// change status of objects on background ///'
+ PrintLog " Object on background is activated"
+ ObjekteAufDemHintergrund.UnCheck
+ if ObjekteAufDemHintergrund.IsChecked = False Then PrintLog " Objects on background are deactivated"
+ else
+ ObjekteAufDemHintegrund.Check
+ PrintLog " Object on background is activated"
+ end if
+ Seitenlayout.OK '/// close dialog ///'
+ sleep 1
+ FormatPage '/// reopen dialog ///'
+ Kontext "LayoutsPreview"
+ sleep 2
+ if GetClipboardText <> SeitenName.GetText Then
+ PrintLog " Page name is correct"
+ else
+ WarnLog " Page name is not correct"
+ end if
+ sleep 2
+ LayoutsPreview.TypeKeys "<TAB>" '/// assign different page layout ///'
+ LayoutsPreview.TypeKeys "<DOWN>" ,2
+ LayoutsPreview.TypeKeys "<Return>"
+ sleep 2
+ Kontext
+ if Active.Exists (5) then
+ printlog "active (1): "+active.gettext
+ Active.OK
+ else
+ kontext "Pagelayout_UndoDeleteWarning"
+ Pagelayout_UndoDeleteWarning.OK
+ printlog "Can't redo this action! Apply template? -> OK (1) "
+ 'DontShowAgain.check ' since it's a level2 test i COULD do this .-) TBO
+ endif
+ Kontext "DocumentImpress"
+ sleep 3
+ DocumentImpress.MouseDoubleClick 25,60
+ sleep 3
+ Kontext "GrafikEinfuegenDlg" '/// check in document if layout has changed ///'
+ sleep 2
+ if GrafikEinfuegenDlg.exists (5) then
+ try
+ DateiName.SetText ConvertPath (gTesttoolPath + "global\input\graf_inp\baer.tif")
+ sleep 3
+ Preview.Check
+ sleep 3
+ Oeffnen.Click
+ sleep 3
+ Kontext "Active"
+ if Active.Exists Then
+ Warnlog Active.GetText
+ Active.OK
+ end if
+ catch
+ WarnLog " LayoutsPreview did not work"
+ endcatch
+ else
+ warnlog "Clicked beside :-( I tried to click into the dokument, to insert a graphic, but missed the right point :-("
+ endif
+ sleep 3
+ Kontext "DocumentImpress"
+ Call hCloseDocument '/// close document ///'
+ endcase 'tiFormatSeitenlayout
+
+'------------------------------------------------------------------------------
+testcase t114174
+
+ '/// resulting from regression in #111862# ///'
+ dim sReference(2) as string
+ dim sText(2) as string
+ dim i as integer
+ dim sFile as string
+
+ if gApplication = "IMPRESS" then
+ ExtensionString = "odp"
+ else
+ ExtensionString = "odg"
+ end if
+ printlog "Used extension string is: " & ExtensionString
+ sFile = convertPath(gOfficePath + "user/work/" + getTestcaseName & "." & ExtensionString)
+ printlog "Filepath is: " & sFile
+ if Dir (sFile) <> "" then kill (sFile)
+
+ sReference(1) = "Koelle"
+ sReference(2) = "Alaaf!"
+ '/// open application ///'
+ Call hNewDocument
+
+ '/// Format->Modify Layout ///'
+ FormatPage
+ Kontext "Tasks"
+ LayoutsPreview.TypeKeys "<TAB>"
+ LayoutsPreview.TypeKeys "<Home><Right>"
+
+ kontext "Pagelayout_UndoDeleteWarning"
+ if Pagelayout_UndoDeleteWarning.exists then
+ Pagelayout_UndoDeleteWarning.ok
+ endif
+ Kontext "Tasks"
+ LayoutsPreview.TypeKeys "<Return>"
+ printlog "(a) setting title and body text"
+ for i = 1 to 2
+ hTypeKeys("<Tab><F2>")
+ hTypeKeys(sReference(i))
+ EditSelectAll
+ EditCopy
+ sText(i) = getClipboardText()
+ printlog sText(i)
+ hTypeKeys("<Escape>")
+ if (sText(i) <> sReference(i)) then
+ warnlog "(1) selected text '" + sText(i) + "' is different from inserted text '" + sReference(i) + "'"
+ endif
+ next i
+
+ '/// deselect all by typing key 'ESCAPE' again ///'
+ hTypeKeys("<Escape>")
+
+ hFileSaveAsKill(sFile)
+ sleep 5
+
+ printlog "(b) checking title and body text"
+ for i = 1 to 2
+ hTypeKeys("<Tab><F2>")
+ EditSelectAll
+ try
+ EditCopy
+ sText(i) = getClipboardText()
+ catch
+ sText(i) = ""
+ endcatch
+ if (sText(i) <> sReference(i)) then
+ warnlog " (2) selected text '" + sText(i) + "' is different from inserted text '" + sReference(i) + "'"
+ endif
+ hTypeKeys("<Escape>")
+ next i
+
+ hCloseDocument()
+
+ printlog " (c) checking title and body text of saved document"
+ hFileOpen(sFile)
+ sleep 5
+ for i = 1 to 2
+ hTypeKeys("<Tab><F2>")
+ EditSelectAll
+ try
+ EditCopy
+ sText(i) = getClipboardText()
+ catch
+ sText(i) = ""
+ endcatch
+ hTypeKeys("<Escape>")
+ if (sText(i) <> sReference(i)) then
+ warnlog " (3) selected text '" + sText(i) + "' is different from inserted text '" + sReference(i) + "'"
+ endif
+ next i
+
+ hCloseDocument()
+endcase 't114174
+
+'------------------------------------------------------------------------------
+testcase t111862
+
+ qaerrorlog "outcommented due to bug"
+ goto endsub
+ dim sReference(2) as string
+ dim sText(2) as string
+ dim i as integer
+ dim sFile as string
+
+ sFile = convertPath(gOfficePath + "/user/work/" + getTestcaseName + ".sxi")
+
+ if FileExists(sFile) then
+ kill sFile
+ endif
+
+ sReference(1) = "Koelle"
+ sReference(2) = "Alaaf!"
+ '/// open application ///'
+ Call hNewDocument
+
+ '/// Format->Modify Layout ///'
+ Formatpage
+ Kontext "Tasks"
+ LayoutsPreview.TypeKeys "<TAB>"
+ LayoutsPreview.TypeKeys "<Home>"
+ LayoutsPreview.TypeKeys "<Return>"
+ Kontext "Pagelayout_UndoDeleteWarning"
+ if Pagelayout_UndoDeleteWarning.exists(5) then
+ Pagelayout_UndoDeleteWarning.OK
+ endif
+ Kontext "Tasks"
+ LayoutsPreview.TypeKeys "<Right>"
+ LayoutsPreview.TypeKeys "<Return>"
+ Kontext "Pagelayout_UndoDeleteWarning"
+ if Pagelayout_UndoDeleteWarning.exists(5) then
+ Pagelayout_UndoDeleteWarning.OK
+ endif
+ Kontext "Tasks"
+ LayoutsPreview.TypeKeys "<Right>"
+ LayoutsPreview.TypeKeys "<Return>"
+ Kontext "Pagelayout_UndoDeleteWarning"
+ if Pagelayout_UndoDeleteWarning.exists(5) then
+ Pagelayout_UndoDeleteWarning.OK
+ endif
+
+ EditSelectAll
+ i=0
+ gMouseMove2(30,1)
+ while ((getMouseStyle <> 6) AND (i<100))
+ inc (i)
+ gMouseMove2(30,i)
+ 'printlog getMouseStyle
+ wend
+
+ gMouseMove(30, i, 70, i+20)
+
+ hCloseDocument()
+
+endcase 't111862
+'------------------------------------------------------------------------------
diff --git a/testautomation/graphics/optional/includes/impress/i_slideshow.inc b/testautomation/graphics/optional/includes/impress/i_slideshow.inc
new file mode 100644
index 000000000000..d313f444994b
--- /dev/null
+++ b/testautomation/graphics/optional/includes/impress/i_slideshow.inc
@@ -0,0 +1,1236 @@
+'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
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* Owner : wolfram.garten@oracle.com
+'*
+'* short description :
+'*
+'*******************************************************************
+'*
+' #1 tSlideShowSlideShow
+' #1 tSlideShowRehearseTimings
+' #1 tSlideShowSlideShowSettings
+' #1 tSlideShowCustomSlideShow
+' #1 tSlideShowSlideTransition
+' #1 tSlideShowShowHideSlide
+'*
+'\******************************************************************
+testcase tSlideShowSlideShow
+
+ dim bLoaded as boolean
+ dim i as integer
+
+ '/// open file 'graphics\\input\\diashow.odp' ///'
+ hFileOpen ConvertPath (gTesttoolPath + "graphics\required\input\diashow.odp")
+ sleep 30
+
+ printlog "check if the document is writable"
+ sMakeReadOnlyDocumentEditable
+
+ bLoaded = false
+
+ Kontext "Navigator"
+ if Navigator.Exists then Navigator.Close
+
+ '/// Deactivate "Start with current page" in ToolsOptions ///'
+ setStartCurrentPage(FALSE)
+
+ try
+ '/// SlideShow->Slide Show Settings... ///'
+ SlideShowPresentationSettings
+ bLoaded = true
+ catch
+ warnlog "SlideShowPresentationSettings could not be run, because document didn't get loaded in time ??! :-("
+ endcatch
+ if bLoaded then
+ Kontext "Bildschirmpraesentation"
+
+ '/// check Radio button 'Type': 'Window' ///'
+ Fenster.Check
+ '/// close dialog 'Slide Show' with OK ///'
+ Bildschirmpraesentation.OK
+ sleep 3
+ '/// start the slideshow with 'Slide Show->Slide Show' ///'
+ SlideShowSlideshow
+ sleep 3
+ Kontext "DocumentPresentation"
+ sleep 5
+ '/// end the presentation by typing [ESCAPE] ///'
+ DocumentPresentation.TypeKeys "<ESCAPE>"
+ sleep 3
+ try
+ hTypeKeys "<TAB>"
+ Printlog "- Slideshow ended using 'ESCAPE'"
+ catch
+ Warnlog "- Slideshow did not end"
+ DocumentPresentation.TypeKeys "<ESCAPE>"
+ sleep 3
+ endcatch
+
+ '/// start the slideshow with 'Slide Show->Slide Show' ///'
+ SlideShowSlideshow
+ Kontext "DocumentPresentation"
+ Printlog "- Check if slideshow runs"
+ sleep 5
+ try
+ DocumentPresentation.TypeKeys "<pagedown>"
+ catch
+ Warnlog "Presentation is not running !"
+ endcatch
+ sleep 5
+ '/// type the key [SHIFT + F5] to open the navigator ///'
+ DocumentPresentation.TypeKeys "<MOD1 SHIFT F5>"
+ Kontext "NavigatorDraw"
+ sleep 1
+ '/// check in list, if the page changed ///'
+ if Liste.GetSelIndex <> 2 Then Warnlog "- pagedown not working: '" + Liste.GetSelText+"'"
+ Kontext "DocumentPresentation"
+ '/// press key [cursor right] 3 times ///'
+ for i = 1 to 3
+ sleep 3
+ DocumentPresentation.TypeKeys "<right>"
+ next i
+ sleep (3)
+ DocumentPresentation.MouseDown 50,50
+ DocumentPresentation.MouseUp 50,50
+ sleep 10
+ try
+ Kontext "DocumentPresentation"
+ DocumentPresentation.MouseDown 50,50
+ DocumentPresentation.MouseUp 50,50
+ Warnlog "- Slideshow still running"
+ DocumentPresentation.TypeKeys "<ESCAPE>"
+ catch
+ Printlog "- Slideshow ended at the right time"
+ endcatch
+ sleep 2
+ else
+ warnlog "Document didn't get loaded"
+ endif
+ Kontext "DocumentImpress"
+ '/// Close the Navigator ///'
+ DocumentImpress.TypeKeys "<MOD1 SHIFT F5>"
+ '/// Set "Start with current page" back to default = on, in ToolsOptions ///'
+ setStartCurrentPage(TRUE)
+ '/// close the application ///'
+ Call hCloseDocument
+
+endcase 'tSlideShowSlideShow
+
+'-------------------------------------------------------------------------------
+
+testcase tSlideShowRehearseTimings
+ qaerrorlog "#i64783# - tSlideShowRehearseTimings outcommented due to bug"
+ goto endsub
+ dim bLoaded as boolean
+ dim i as integer
+
+ '/// open file 'graphics\\input\\diashow.odp' ///'
+ hFileOpen ConvertPath (gTesttoolPath + "graphics\required\input\diashow.odp")
+ sleep 10
+ ' 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
+ Kontext "Navigator"
+ if Navigator.Exists then Navigator.Close
+ bLoaded = false
+ try
+ '/// SlideShow->Slide Show Settings... ///'
+ SlideShowPresentationSettings
+ bLoaded = true
+ catch
+ warnlog "SlideShowPresentationSettings could not be run, because document didn't get loaded in time ( ?? ) :-("
+ endcatch
+ if bLoaded then
+ Kontext "Bildschirmpraesentation"
+ '/// check Radio button 'Type': 'Window' ///'
+ Fenster.Check
+ '/// close dialog 'Slide Show' with OK ///'
+ Bildschirmpraesentation.OK
+ sleep 3
+ '/// start the slideshow with 'Slide Show->Rehearse Timings' ///'
+ SlideShowRehearseTimings
+ Kontext "DocumentPresentation"
+ if DocumentPresentation.Exists then
+ printlog "OK"
+ else
+ warnlog "bah"
+ endif
+ '/// press key [return] 5 times ///'
+ for i = 1 to 5
+ sleep 5
+ DocumentPresentation.TypeKeys "<return>"
+ next i
+ sleep 5
+ try
+ gMouseClick 50,50
+ Printlog "- Slideshow ended "
+ catch
+ Kontext "DocumentPresentation"
+ Warnlog "- Slideshow still running"
+ DocumentPresentation.TypeKeys "<ESCAPE>"
+ sleep 3
+ endcatch
+ sleep 2
+ else
+ warnlog "Documnet didn't get loaded"
+ endif
+
+ '/// check state of navigator ! expected: closed ///'
+ Kontext "Navigator"
+ if Navigator.exists then
+ '///+ close navigator ! ///'
+ Navigator.Close
+ else
+ printlog "Navigator: NOT available"
+ endif
+ '/// close the application ///'
+ Call hCloseDocument
+
+endcase 'tSlideShowRehearseTimings
+
+'-------------------------------------------------------------------------------
+testcase tSlideShowSlideShowSettings
+
+ dim bLoaded as boolean
+ dim i as integer
+ dim x as integer
+ dim sTemp as string
+ dim saSlideNames(4) as string
+ dim bCurrentPage as boolean
+
+ S1 = glLocale (2) + " 1"
+ S2 = glLocale (2) + " 2"
+ S3 = glLocale (2) + " 3"
+ S4 = glLocale (2) + " 4"
+ saSlideNames(1) = S1
+ saSlideNames(2) = S2
+ saSlideNames(3) = S3
+ saSlideNames(4) = S4
+
+ ' the navigator you open during a presentation is closed after the last slide (in full screen mode)
+ ' the state of the navigator in the normal view is not affected
+ ' the navigator that is open in normal view, is not visible in windows presenattions
+
+ '/// open application ///'
+ Call hNewDocument
+
+'/// check state of navigator ! expected: closed ///'
+ Kontext "Navigator"
+ if Navigator.exists then
+ '///+ close navigator ! ///'
+ Navigator.Close
+ QaErrorLog "Navigator was open. Check earlier tests. Now closed."
+ else
+ printlog "Navigator: NOT available. Good."
+ endif
+
+ '/// Slide Show -> Slide Show Settings ///'
+ SlideShowPresentationSettings
+ Kontext "Bildschirmpraesentation"
+ '/// check checkbox in section 'Range' - 'From: ///'
+ AbDia.Check
+ '/// get count of slides from listbox 'From:' ///'
+ x = AbDiaName.GetItemCount
+ '/// check if count in listbox 'from' is '0' ///'
+ if (x = 1) Then
+ Printlog " - Slide count in the list: '" + x + "'"
+ else
+ Warnlog " - unexpected slide count; should be '1'; is '" + x + "'"
+ end if
+ '/// close dialog 'Slide Show' with OK ///'
+ Bildschirmpraesentation.OK
+ '/// Insert->Slide... ///'
+ InsertSlide
+ sleep 2
+ hTypekeys "<Pagedown>"
+ sleep 2
+ '/// Slide Show -> Slide Show Settings ///'
+ SlideShowPresentationSettings
+ Kontext "Bildschirmpraesentation"
+ Printlog "'///<b> check if count in listbox 'from' increased </b>///'"
+ i = AbDiaName.GetItemCount
+ if ((i -1) = x) Then
+ Printlog " - Slide appears in the list; count : '" + i + "'"
+ else
+ Warnlog " - Slide not added; is '" + i + "' should: '" + x + "'"
+ end if
+ '/// close dialog 'Slide Show' with CANCEL ///'
+ Bildschirmpraesentation.Cancel
+ '/// close application ///'
+ Call hCloseDocument
+ sleep 5
+
+ bLoaded = false
+ '/// open file 'graphics\\input\\diashow.odp' (Slide Show with 4 Slides) ///'
+ hFileOpen ConvertPath (gTesttoolPath + "graphics\required\input\diashow.odp")
+ sleep 10
+ printlog "check if the document is writable"
+ sMakeReadOnlyDocumentEditable
+
+ try
+ Kontext "DocumentImpress"
+ '/// Slide Show -> Slide Show Settings ///'
+ Printlog "'--------------------------------------------------------------------------"
+ SlideShowPresentationSettings
+ bLoaded = true
+ catch
+ warnlog "SlideShowPresentationSettings could not be run, because document didn't get loaded in time ( ?? ) :-("
+ endcatch
+ if bLoaded then
+ Kontext "Bildschirmpraesentation"
+ if (AlleDias.IsChecked = FALSE) then
+ Warnlog "'All Slides' is not checked :-("
+ endif
+ if (Standard.IsChecked = FALSE) then
+ Warnlog "'Default' is not checked :-("
+ endif
+ if (NavigatorSichtbar.IsChecked) then
+ Warnlog "'Navigator visible' is checked :-("
+ endif
+ '///<b> check checkbox 'All Slides' </b>///'
+ AlleDias.Check
+ '///<b> check checkbox 'Window' </b>///'
+ Fenster.Check
+ '///<b> check checkbox 'Navigator visible' </b>///'
+ NavigatorSichtbar.Check '--------------------------------------------------------------------------
+ '/// close dialog 'Slide Show' with OK ///'
+ Bildschirmpraesentation.OK
+ '/// start the slideshow with 'Slide Show->Slide Show' ///'
+ SlideShowSlideshow
+ Printlog "'---------------------------- START P -- All -- Window -- Navigator -------------------------"
+ sleep 5
+ '/// check state of navigator ! expected: open ///'
+ Kontext "Navigator"
+ if Navigator.exists then
+ Printlog "Navigator: open :-)"
+ else
+ Warnlog "Navigator: NOT available :-( will be opened now!"
+ Kontext "DocumentPresentation"
+ DocumentPresentation.TypeKeys "<MOD1 SHIFT F5>"
+ endif
+ sleep 1
+ Kontext "DocumentPresentation"
+ try
+ '/// press pagedown ///'
+ DocumentPresentation.TypeKeys "<pagedown>"
+ catch
+ Warnlog "presentation is not running !"
+ endcatch
+ sleep 5
+ Kontext "NavigatorDraw"
+ if Liste.GetSelIndex <> 2 Then
+ warnlog "Wrong slide."
+ endif
+ '/// press the key [Page Down] 3 times ///'
+ '///+ check in Navigator list, if the slide is number: (times key pressed) ///'
+ for i = 2 to 4
+ Kontext "Navigator"
+ if Navigator.exists then
+ printlog "Navigator was there, good."
+ else
+ Warnlog "The Navigator should have been activated, but was not. Opening now."
+ Kontext "DocumentPresentation"
+ DocumentPresentation.TypeKeys "<MOD1 SHIFT F5>"
+ endif
+ fGetSlideName(saSlideNames(i))
+ kontext "DocumentPresentation"
+ DocumentPresentation.TypeKeys "<pagedown>"
+ next i
+ sleep (2)
+ '/// press the key [Page Down] to exit presentation ///'
+ DocumentPresentation.TypeKeys "<pagedown>"
+ sleep (5)
+ try
+ gMouseClick 50,50 ' this one works to recognice the not ending ! TBO
+ Printlog "- Slideshow ended at the right time"
+ catch
+ Warnlog "- Slideshow still running "
+ DocumentPresentation.TypeKeys "<ESCAPE>"
+ endcatch
+ sleep 2
+ '/// check state of navigator ! expected: open ///'
+ Kontext "Navigator"
+ if Navigator.exists then
+ '///+ close navigator ! ///'
+ Navigator.Close
+ else
+ printlog "Navigator: NOT available"
+ endif
+ Printlog "'--------------------------------------------------------------------------"
+
+ Kontext "DocumentPresentation"
+ '/// type the key [MOD1 SHIFT F5] to open the navigator ///' '--------------------------------------------------------------------------
+ hTypeKeys "<MOD1 SHIFT F5>"
+ '/// Slide Show -> Slide Show Settings ///'
+ SlideShowPresentationSettings
+ Kontext "Bildschirmpraesentation"
+ if (AlleDias.IsChecked = FALSE) then
+ Warnlog "'All Slides' is not checked :-("
+ endif
+ if (Fenster.IsChecked = FALSE) then
+ Warnlog "'Window' is not checked :-("
+ endif
+ if (NavigatorSichtbar.IsChecked = FALSE) then
+ Warnlog "'Navigator visible' is not checked :-("
+ endif
+ if (DiawechselAufHintergrund.IsChecked = FALSE) then
+ Warnlog "'Change slides by clicking on background' is not checked :-("
+ endif
+ '///<b> check checkbox in section 'Range' - 'From: </b>///'
+ AbDia.Check
+ '/// select the 3rd item from the top from listbox 'From:' -> 2 slides to go ///'
+ AbDiaName.Select 3
+ sTemp = AbDiaName.GetSelText
+ Printlog " - From '" + sTemp + "' will be shown"
+ '///<b> check checkbox 'Default' </b>///'
+ Standard.Check
+ '/// UNcheck checkbox 'Navigator visible'///'
+ NavigatorSichtbar.UnCheck
+ '/// UNcheck checkbox 'Change slides by clicking on background'///'
+ DiawechselAufHintergrund.UnCheck
+ '/// close dialog 'Slide Show' with OK ///'
+ Bildschirmpraesentation.OK
+ sleep 3
+ Kontext "DocumentPresentation"
+ '/// start the slideshow with 'Slide Show->Slide Show' ///'
+ SlideShowSlideshow
+ Printlog "'---------------------------- START P -- From -- Default -- Click on Bg -----------------------"
+ sleep 5
+ '/// check state of navigator ! expected: closed ///'
+ Kontext "Navigator"
+ if Navigator.exists then
+ '///+ close navigator ! ///'
+ Navigator.Close
+ Warnlog "Navigator: closed"
+ else
+ Printlog "Navigator: NOT available. Good."
+ endif
+ sleep 1
+ '/// type the key [MOD1 SHIFT F5] to open the navigator ///' '--------------------------------------------------------------------------
+ Kontext "DocumentPresentation"
+ DocumentPresentation.TypeKeys "<MOD1 SHIFT F5>"
+ sleep 3
+ '/// check in Navigator list, if the page is THREE! ///'
+ fGetSlideName(S3)
+ '/// click right mouse button ///'
+ sleep 5
+ DocumentPresentation.MouseDown 50,50
+ DocumentPresentation.MouseUp 50,50
+ '/// check in Navigator list, if the page is still THREE. If so, change slide with PageDown ///'
+ if (fGetSlideName(S3) <> S3) then
+ Warnlog "'Change slides by clicking on background' disable did not work :-("
+ else
+ DocumentPresentation.TypeKeys "<PAGEDOWN>"
+ endif
+ '/// check in Navigator list, if the page is FOUR ///'
+ fGetSlideName(S4)
+ sleep 5
+ '/// press the key [Page Down] ///'
+ DocumentPresentation.TypeKeys "<pagedown>"
+ sleep 5
+ '/// press the key [Space] to exit presentation ///'
+ DocumentPresentation.TypeKeys "<Space>"
+ sleep 10
+ try
+ ViewZoom '-----------!!!!!1 TBO: Make function!!! ----------------------- works! TBO
+ Kontext "Massstab"
+ Massstab.OK
+ catch
+ Kontext "DocumentPresentation"
+ DocumentPresentation.TypeKeys "<ESCAPE>"
+ Warnlog " - Program was still in slideshow mode - ended now ?"
+ endcatch
+ '/// check state of navigator ! expected: open ///'
+ Kontext "Navigator"
+ if Navigator.exists then
+ '///+ close navigator ! ///'
+ Navigator.Close
+ printlog "Navigator: closed"
+ else
+ warnlog "Navigator: NOT available"
+ endif
+ Printlog "'--------------------------------------------------------------------------"
+
+ '/// Slide Show -> Slide Show Settings ///'
+ SlideShowPresentationSettings
+ Kontext "Bildschirmpraesentation"
+ if (AbDia.IsChecked = FALSE) then
+ Warnlog "'From' is not checked :-("
+ endif
+ if (Standard.IsChecked = FALSE) then
+ Warnlog "'Default' is not checked :-("
+ endif
+ if (AbDiaName.GetSelText <> sTemp ) then
+ Warnlog "'From Slide' has wrong value :-(; should be: '" + sTemp + "' ; is: '" + AbDiaName.GetSelText + "'"
+ endif
+ if (DiawechselAufHintergrund.IsChecked) then
+ Warnlog "'Change slides by clicking in background' is checked :-("
+ endif
+ '/// check checkbox 'All Slides' ///'
+ AlleDias.Check
+ '///<b> check check box 'Auto' -> implies looping of slideshow in fullscreen mode </b>///'
+ Auto.Check
+ '/// set duration of pause to '00:00:05' ///'
+ Zeit.SetText "00:00:05"
+ '/// check check box 'Show logo' ///'
+ LogoAnzeigen.Check
+ '/// check checkbox 'Change slides by clicking on background'///'
+ DiawechselAufHintergrund.Check
+ '/// close dialog 'Slide Show' with OK ///'
+ Bildschirmpraesentation.OK
+ '/// start the slideshow with 'Slide Show->Slide Show' ///'
+ SlideShowSlideshow
+ Printlog "'---------------------------- START P -- All -- Auto -- :05 -- Logo -----------------------------"
+ sleep 3
+ Kontext "DocumentPresentation"
+ '/// type the key [MOD1 SHIFT F5] to open the navigator ///' '--------------------------------------------------------------------------
+ DocumentPresentation.TypeKeys "<MOD1 SHIFT F5>"
+ '/// press the key [Space] 4 times ///'
+ '///+ check in Navigator list, if the slide is number: [(times key pressed) -1 ] ///'
+ for i = 1 to 4
+ fGetSlideName(saSlideNames(i))
+ DocumentPresentation.TypeKeys "<Space>"
+ sleep 5
+ next i
+ '/// wait until autopause ended (5 secs) ///'
+ sleep 10
+ if (fGetSlideName(saSlideNames(1)) = saSlideNames(1)) then
+ Printlog " - Enless loop works"
+ else
+ Warnlog " Enless loop does NOT work"
+ end if
+ sleep 2
+ '/// type key [excape] to exit presentation ///'
+ Kontext "DocumentPresentation"
+ DocumentPresentation.TypeKeys "<ESCAPE>"
+ sleep 5
+ try
+ SlideShowPresentationSettings
+ Kontext "Bildschirmpraesentation"
+ Bildschirmpraesentation.OK
+ catch
+ Warnlog " - Still in slideshow mode, tries to end again..."
+ Kontext "DocumentPresentation"
+ DocumentImpress.TypeKeys "<ESCAPE>"
+ sleep 5
+ endcatch
+ '/// check state of navigator ! expected: closed ///'
+ Kontext "Navigator"
+ if Navigator.exists then
+ Navigator.Close
+ warnlog "Navigator: closed"
+ else
+ printlog "Navigator: NOT available"
+ endif
+ Printlog "'--------------------------------------------------------------------------"
+
+ Kontext "DocumentImpress"
+ '/// Slide Show -> Slide Show Settings ///'
+ SlideShowPresentationSettings
+ Kontext "BildschirmPraesentation"
+ '/// check checkbox 'default' ///'
+ Standard.Check
+ '///<b> check checkbox 'Change slides maually' </b>///'
+ ' to check this i need an automatic transition somewhere in the presentation !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+ DiawechselManuel.Check
+ '///<b> check checkbox 'Mouse pointer as pen' </b>///'
+ MauszeigerAlsStift.Check
+ '/// close dialog 'Slide Show' with OK ///'
+ BildschirmPraesentation.Ok
+ sleep 1
+
+ '/// goto the first slide by typing [strg home] ///'
+ hTypeKeys "<mod1 home>"
+ '///+ - SlideShow->SlideTransition ///'
+ SlideShowSlideTransition
+ Kontext "Tasks"
+ '///+ - click button 'Extras' ///'
+ sleep 1
+ '///+ - + click button 'Automatic Transition' ///'
+ TransitionAutomaticallyAfter.Check 'click
+ '///+ - + + Set Time to '00:00:01' ///'
+ TransitionAutomaticallyAfterTime.SetText "2"
+ '///+ - click button 'Assign' ///'
+ TransitionApplyToAllSlides.Click
+ '///+ - close dialog 'Slide Transition' ///'
+ sleep 3
+
+ '/// start the slideshow with keys [STRG F2] ///'
+ Kontext "DocumentImpress"
+ DocumentImpress.TypeKeys "<MOD1 F2>"
+ Printlog "'---------------------------- START P -- Default -- Manuel ------------------------------"
+ '/// wait 10 seconds (to get the dia changed automatical has not to happen !) ///'
+ sleep 10
+ Kontext "DocumentPresentation"
+ '/// type the key [MOD1 SHIFT F5] to open the navigator ///' '--------------------------------------------------------------------------
+ DocumentPresentation.TypeKeys "<MOD1 SHIFT F5>"
+ '/// press key [cursor right] 3 times ///'
+ for i = 1 to 4
+ sleep 5
+ fGetSlideName(saSlideNames(i))
+ '///+ use the left mouse button, to use the pen drawing function ///'
+ DocumentPresentation.MouseDown (10, 10)
+ DocumentPresentation.MouseMove (10, 90)
+ DocumentPresentation.MouseUp (10, 90)
+ DocumentPresentation.TypeKeys "<right>"
+ next i
+ '/// press the key [Page Down] to exit presentation ///'
+ sleep (2)
+ DocumentPresentation.TypeKeys "<pagedown>"
+ sleep (2)
+ if DocumentPresentation.Exists then
+ Warnlog "- Slideshow still running "
+ DocumentPresentation.TypeKeys "<ESCAPE>"
+ else
+ Printlog "- Slideshow ended at the right time"
+ endif
+ sleep 2
+ '/// check state of navigator ! expected: closed ///'
+ Kontext "Navigator"
+ if Navigator.exists then
+ '///+ close navigator ! ///'
+ Navigator.Close
+ warnlog "Navigator: closed"
+ else
+ printlog "Navigator: NOT available"
+ endif
+ Printlog "'--------------------------------------------------------------------------"
+
+ Kontext "DocumentImpress"
+ '/// Slide Show -> Slide Show Settings ///'
+ SlideShowPresentationSettings
+ Kontext "BildschirmPraesentation"
+ '/// check checkbox 'default' ///'
+ Standard.Check
+ '///<b> UNcheck checkbox 'Change slides manually' </b>///'
+ DiawechselManuel.UNCheck
+ '/// UNcheck checkbox 'Mouse pointer as pen' ///'
+ MauszeigerAlsStift.UNCheck
+ '/// close dialog 'Slide Show' with OK ///'
+ BildschirmPraesentation.Ok
+ sleep 1
+ '/// goto the first slide by typing [strg home] ///'
+ hTypeKeys "<MOD1 HOME>"
+ '/// Set all slides to 'wait 10 seconds' to get the slide changed automatically ///'
+ '///+ - SlideShow->SlideTransition ///'
+ SlideShowSlideTransition
+ Kontext "Tasks"
+ '///+ - click button 'Extras' ///'
+ sleep 1
+ '///+ - + click button 'Automatic Transition' ///'
+ TransitionAutomaticallyAfter.Check 'click
+ '///+ - + + Set Time to '10sec' ///'
+ TransitionAutomaticallyAfterTime.SetText "10"
+ '///+ - click button 'Apply to all Slides' ///'
+ TransitionApplyToAllSlides.Click
+ '///+ - close dialog 'Slide Transition' ///'
+ sleep (1)
+ '/// start the slideshow with keys [STRG F2] ///'
+ Kontext "DocumentImpress"
+ DocumentImpress.TypeKeys "<MOD1 F2>"
+ Printlog "'---------------------------- START P -- Default -- Automatic -----------------------------"
+ '/// Wait 6 seconds to see if the Automatic Transition changes the slide. ///'
+ sleep 6
+ Kontext "DocumentPresentation"
+ '/// type the key [MOD1 SHIFT F5] to open the navigator ///' '--------------------------------------------------------------------------
+ DocumentPresentation.TypeKeys "<MOD1 SHIFT F5>"
+ '/// press key [cursor right] 3 times ///'
+ for i = 2 to 4
+ sleep (5)
+ fGetSlideName(saSlideNames(i))
+ DocumentPresentation.TypeKeys "<right>"
+ next i
+ '/// press the key [Page Down] to exit presentation ///'
+ sleep (2)
+ DocumentPresentation.TypeKeys "<PAGEDOWN>"
+ sleep (2)
+ if DocumentPresentation.Exists then
+ Warnlog "- Slideshow still running "
+ DocumentPresentation.TypeKeys "<ESCAPE>"
+ else
+ Printlog "- Slideshow ended at the right time"
+ endif
+ sleep 2
+ '/// check state of navigator ! expected: closed ///'
+ Kontext "Navigator"
+ if Navigator.exists then
+ '///+ close navigator ! ///'
+ Navigator.Close
+ endif
+ else
+ warnlog "document didn't get loaded"
+ endif
+ '/// Set "Start with current page" back to default = on, in ToolsOptions ///'
+ setStartCurrentPage(TRUE)
+ '/// Close the document ///'
+ call hCloseDocument
+
+endcase 'tSlideShowSlideShowSettings
+
+'-------------------------------------------------------------------------------
+testcase tSlideShowCustomSlideShow
+
+ Dim Seite as string
+ dim i as integer
+ dim x as integer
+ dim sTemp as string
+
+ Seite = s1
+ '/// open application ///'
+ Call hNewDocument
+
+ Kontext "Navigator"
+ if Navigator.Exists then Navigator.Close
+ '/// Deactivate "Start with current page" in ToolsOptions ///'
+ setStartCurrentPage(FALSE)
+
+ '/// create a rectangle ///'
+ hRechteckErstellen 30,30,60,60
+ '/// do 2 times : ///'
+ for i = 1 to 2
+ '///+ Insert->Slide... ///'
+ InsertSlide
+ sleep 2
+ hTypekeys "<Pagedown>"
+ sleep 2
+ '///+ create a rectangle ///'
+ hRechteckErstellen 30,30,70,70
+ next i
+
+ '/// Slide Show -> Slide Show Settings ///'
+ SlideShowPresentationSettings
+ Kontext "Bildschirmpraesentation"
+ if (Fenster.IsChecked = False) Then Fenster.Check
+ '/// close dialog 'Slide Show' with OK ///'
+ Bildschirmpraesentation.OK
+
+ '/// Slide Show -> Custom Slide Show... ///'
+ SlideShowCustomSlideshow
+ Kontext "IndividuellePraesentation"
+ '///<b> click button 'New...' </b>///'
+ Neu.Click
+
+ Kontext "IndividuellePraesentationDefinieren"
+ '/// type something in 'Name' ///'
+ PraesentationName.SetText "Individually 1"
+ '/// select the first entry in the list 'Existing Slides' ///'
+ SeitenPraesentation.Select 1
+ '/// click button '>>' ///'
+ Hinzufuegen.Click
+ i = SelectedSlides.GetItemCount
+ if (i <> 1) Then
+ Warnlog "- Number of slides 'Selected Slides' is not correct. It should be = '1', but it is = '" + i + "'"
+ endif
+ '/// close dialog 'Define Custom Slide Show' with OK ///'
+ IndividuellePraesentationDefinieren.OK
+ Kontext "IndividuellePraesentation"
+ '///<b> click button 'Edit...' </b>///'
+ Bearbeiten.Click
+ Kontext "IndividuellePraesentationDefinieren"
+ '/// select an entry in the list 'Selected Slides' ///'
+ SelectedSlides.TypeKeys "<pagedown>"
+ '/// click button '<<' ///'
+ Entfernen.Click
+ i = SelectedSlides.GetItemCount
+ if (i <> 0) Then
+ Warnlog " Removing slides from list 'Selected Slides' does not work It should be = '1', but it is = '" + i + "'"
+ endif
+ '/// select the first entry in the list 'Existing Slides' ///'
+ SeitenPraesentation.Select 1
+ '/// click button '>>' ///'
+ Hinzufuegen.Click
+ '/// close dialog 'Define Custom Slide Show' with OK ///'
+ IndividuellePraesentationDefinieren.OK
+ Kontext "IndividuellePraesentation"
+
+ '///<b> check checkbox 'Use Custom Slide Show' </b>///' '-------------------------------------------------------
+ IndividuellePraesentationBenutzen.Check
+ '///<b> click button 'Start...' </b>///'
+ Starten.Click
+ sleep 2
+ Kontext "DocumentPresentation"
+ '/// press key [space] 2 times ///'
+ DocumentPresentation.TypeKeys "<space>"
+ sleep 2
+ DocumentPresentation.TypeKeys "<space>"
+ sleep 5
+ try
+ Kontext "IndividuellePraesentation"
+ '/// close dialog 'Custom Slide Shows' with button 'Close' ///'
+ IndividuellePraesentation.Close
+ catch
+ Warnlog "- Slideshow did not end after slide 1"
+ DocumentPresentation.TypeKeys "<space>"
+ sleep 2
+ endcatch
+ '/// Slide Show -> Custom Slide Show... ///'
+ SlideShowCustomSlideshow
+ Kontext "IndividuellePraesentation"
+ '/// click button 'Edit...' ///'
+ Bearbeiten.Click
+ Kontext "IndividuellePraesentationDefinieren"
+ '/// select 1st entry in the list 'Selected Slides' ///'
+ SelectedSlides.Select 1
+ '/// click button '<<' ///'
+ Entfernen.Click
+ i = SelectedSlides.GetItemCount
+ if (i <> 0) Then
+ Warnlog "- Add and remove slides does not work properly. It should be '0', but it is = '"+i+"'"
+ endif
+ '/// select the first entry in the list 'Existing Slides' ///'
+ SeitenPraesentation.Select 1
+ '/// click button '>>' 4 times ///'
+ for i =1 to 4
+ Hinzufuegen.Click
+ next i
+ for i =1 to 4
+ SelectedSlides.Select i
+ sTemp = SelectedSlides.GetSelText
+ If (sTemp <> Seite) then
+ Warnlog "- Wrong slide added to individual slideshow. Instead of '" + Seite + "', '" + sTemp + "' was added"
+ endif
+ next i
+ '/// close dialog 'Define Custom Slide Show' with OK ///'
+ IndividuellePraesentationDefinieren.OK
+ sleep 1
+ Kontext "IndividuellePraesentation"
+
+ '///<b> UNcheck checkbox 'Use Custom Slide Show' </b>///'
+ IndividuellePraesentationBenutzen.UnCheck
+ '/// click button 'Start...' ///'
+ Starten.Click '---------------------------- START P ----------------------------------------------
+ '/// press key [space] 4 times ///'
+ kontext "DocumentPresentation"
+ for i = 1 to 4
+ sleep 3
+ DocumentPresentation.TypeKeys "<space>"
+ next i
+ sleep 10
+ kontext "IndividuellePraesentation"
+ '/// close dialog 'Custom Slide Shows' with button 'Close' ///'
+ if IndividuellePraesentation.exists then
+ IndividuellePraesentation.Close
+ else
+ Warnlog "'IndividuellePraesentation' was closed :-("
+ end if
+
+ '/// Set "Start with current page" back to default = on, in ToolsOptions ///'
+ setStartCurrentPage(TRUE)
+ '/// close the application ///'
+ Kontext "Navigator"
+ if Navigator.exists then
+ '///+ close navigator ! ///'
+ Navigator.Close
+ else
+ printlog "Navigator: NOT available"
+ end if
+ Call hCloseDocument
+
+endcase 'tSlideShowCustomSlideShow
+
+'-------------------------------------------------------------------------------
+testcase tSlideShowSlideTransition
+
+ dim i as integer
+ dim x as integer
+ dim q as integer
+ dim sTemp as string
+ dim TimerValue as string
+ dim sFile as string
+ dim sEffect (3) as string
+
+ sFile = ConvertPath (gOfficePath + "user\work\diashow")
+
+' '/// open application ///'
+ call hNewDocument
+
+ '/// close the navigator///'
+ Kontext "Navigator"
+ if Navigator.Exists then Navigator.Close
+ WaitSlot (3000)
+ '/// create 3 slides with a rectangle ///'
+ hRechteckErstellen (30,30,60,60)
+ for i = 1 to 2
+ '///+ - Insert->Slide ///'
+ WaitSlot (1000)
+ InsertSlide
+ WaitSlot (2000)
+ hTypekeys "<Pagedown>"
+ WaitSlot (2000)
+ '///+ - insert rectangle///'
+ hRechteckErstellen (30,30,60,60)
+ next i
+ Printlog "created 3 slides"
+ '/// for all 3 slides do: ///'
+ for i = 1 to 3
+ '///+ - open navigator with shortcutkey [MOD1 SHIFT F5] ///'
+ hTypeKeys "<MOD1 SHIFT F5>"
+ Sleep (3)
+ Kontext "NavigatorDraw"
+ '///+ - select the next slide in the list ///'
+ if Liste.GetItemCount < 3 then
+ warnlog "We have " + Liste.GetItemCount + " entries in the Navigator."
+ hTypeKeys "<MOD1 SHIFT F5>"
+ hTypeKeys "<MOD1 SHIFT F5>"
+ Kontext "NavigatorDraw"
+ end if
+ Liste.Select i
+ '///+ - press key [return] ///'
+ Liste.TypeKeys "<return>"
+ Kontext "Navigator"
+ '///+ - close Navigator ///'
+ Navigator.Close
+ '///+ - SlideShow->SlideTransition ///'
+ SlideShowSlideTransition
+ Kontext "Tasks" '"SlideTransition"' "OL_DIA_Diawechsel" 'OL_DIA_Diawechsel
+ TransitionAutomaticPreview.UnCheck
+ '///+ - click button 'Effects' ///'
+ TransitionApplyToSelectedSlide.typekeys "<pagedown>"
+ Sleep (1)
+ '///+ - in the listbox 'speed' select the i. one from the top ///'
+ TransitionSpeed.Select i
+ '///+ - Select an effect-group from the listbox ///'
+ TransitionApplyToSelectedSlide.typekeys "<home>"
+ for q= 1 to (i+2)
+ Sleep (2)
+ TransitionApplyToSelectedSlide.typekeys "<down>"
+ Sleep (2)
+ next q
+ sEffect(i) = TransitionApplyToSelectedSlide.GetSelText
+ '///+ - click button 'Extras' ///'
+ Sleep (2)
+ select case i
+ case 1: '///+ - + click button 'Automatic Transition' ///'
+ TransitionAutomaticallyAfter.Check
+ '///+ - + + Set Time to '00:00:01' OR ///'
+ TransitionAutomaticallyAfterTime.ToMin 'SetText "1" '"00:00:01"
+ TransitionAutomaticallyAfterTime.More
+ TransitionApplyToSelectedSlide.typekeys "<DOWN>"
+ TransitionApplyToSelectedSlide.typekeys "<UP>"
+ TransitionAutomaticallyAfter.Check
+ Tasks.TypeKeys "<TAB><TAB><TAB>"
+ TimerValue = TransitionAutomaticallyAfterTime.GetText
+ printlog " TimerValue is now: " + TimerValue
+ case else: '///+ - + click button 'SemiAutomatic Transition' OR ///'
+ TransitionOnMouseClick.Check
+ end select
+ Sleep (3)
+ next i
+ Printlog "assigned transitions to all slides"
+
+ Kontext "DocumentImpress"
+ Sleep (3)
+ '/// SlideShow->Slide Show Settings... ///'
+ SlideShowPresentationSettings
+ Kontext "Bildschirmpraesentation"
+ WaitSlot (2000)
+ '/// check Radio button 'Type': 'Window' ///'
+ Fenster.Check
+ '/// close dialog 'Slide Show' ///'
+ Bildschirmpraesentation.OK
+ WaitSlot (5000)
+ Kontext "DocumentImpress"
+ Printlog "'/// SlideShow->Slide Show ///'"
+ SlideShowSlideshow
+ '/// wait 10 sec ///'
+ sleep (10) 'WaitSlot (10000)
+ Kontext "DocumentPresentation"
+ '/// type key [ESCAPE] ///'
+ DocumentPresentation.TypeKeys "<ESCAPE>"
+ WaitSlot (3000)
+ try
+ '/// type key [F11] to open the stylist (to check ending of presenation) ///'
+ if lcase(gPlatform) = "osx" then
+ hTypekeys "<mod1 t>"
+ else
+ hTypeKeys "<F11>"
+ endif
+ Sleep (3)
+ Kontext "Gestalter"
+ Sleep (3)
+ '/// close Stylist ///'
+ Gestalter.Close
+ Printlog "- Slideshow worked"
+ catch
+ Kontext "DocumentPresentation"
+ DocumentPresentation.TypeKeys "<ESCAPE>"
+ Warnlog "slideshow somehow didn't end :-("
+ Sleep (2)
+ endcatch
+
+ '/// close the navigator///'
+ Kontext "Navigator"
+ if Navigator.Exists then Navigator.Close
+ Printlog "'///+ check the settings in SlideView in the Dia object bar ///'"
+ for i = 1 to 3
+ Printlog " --------------------- " + i + " ---------------------------"
+ '///+ - open navigator with shortcutkey [MOD1 SHIFT F5] ///'
+ hTypeKeys "<MOD1 SHIFT F5>"
+ sleep (3)
+ Kontext "NavigatorDraw"
+ '///+ - select the next slide in the list ///'
+ Liste.Select i
+ '///+ - press key [return] ///'
+ Liste.TypeKeys "<return>"
+ Kontext "Navigator"
+ '///+ - close Navigator ///'
+ Navigator.Close
+ '///+ - View->Master View->Slides View ///'
+' ViewWorkspaceSlidesView
+ Sleep (2)
+ Kontext "Tasks" 'SlideViewObjectbar"
+ '///+ - check 'speed' ///'
+ if Tasks.Exists = TRUE AND Tasks.IsVisible = TRUE then
+ x = TransitionSpeed.GetSelIndex 'TransitionSpeed
+ if (x <> i) then
+ Warnlog "Speed changed :-( is: '" + x + "' should be: '" + i + "'"
+ end if
+ '///+ - check 'Transition' ///'
+ x = TransitionApplyToSelectedSlide.GetSelIndex 'Diawechsel.GetSelIndex
+ if (x <> (i+3)) then
+ Warnlog "Transition changed :-( is: '" + x + "' should be: '" + (i+3) + "'"
+ sTemp = TransitionAutomaticallyAfterTime.GetText
+ if ((sTemp <> TimerValue)) then '"00:00:01" '(i = 3) AND
+ Warnlog "Time is different :-( is: '" + sTemp + "' should: '" + TimerValue + "'" '"00:00:01"
+ end if
+ end if
+
+ '///+ - check 'effect group' ///'
+ sTemp = TransitionApplyToSelectedSlide.GetSelText
+ x = inStr (sTemp,sEffect(i))
+ Printlog " Effect tried :-) '" + x + "'"
+ if (x < 1) then
+ printlog "the string '" + sTemp + "' should contain the words(s): '" + sEffect(i) + "'"
+ end if
+' ViewWorkspaceDrawingView
+ else
+ warnlog " SlideViewObjectbar doesnt exists or isnt visible"
+ end if
+ next i
+ '/// save file as presentation with name '"user\\work\\diashow")' ///'
+
+ hFileSaveAsWithFilterKill ((sFile + ".odp") , "impress8" )
+
+ Printlog " saved presentation: '" + sFile + "'" '." + gImpressFilter + "
+ '/// close application///'
+ hCloseDocument ()
+ WaitSlot (10000)
+ '/// load file again ///'
+ hFileOpen (sFile + ".odp")
+ WaitSlot (5000)
+ Printlog " '/// check setings for every slide in the transition dialog ///'"
+ '///+ for all 3 slides do: ///'
+ for i = 1 to 3
+ Printlog " --------------------- " + i + " ---------------------------"
+ '///+ - open navigator with shortcutkey [MOD1 SHIFT F5] ///'
+ hTypeKeys "<MOD1 SHIFT F5>"
+ Sleep (3)
+ Kontext "NavigatorDraw"
+ '///+ - select the next slide in the list ///'
+ Liste.Select i
+ '///+ - press key [return] ///'
+ Liste.TypeKeys "<return>"
+ Kontext "Navigator"
+ '///+ - close Navigator ///'
+ Navigator.Close
+ '///+ - select the grafik with the key [TAB] ///'
+ hTypeKeys ("<tab>")
+ '///+ - SlideShow->SlideTransition ///'
+ SlideShowSlideTransition
+ Kontext "Tasks"
+ Sleep (1)
+ '///+ - check 'speed' ///'
+ x = TransitionSpeed.GetSelIndex
+ if (x <> i) then
+ Warnlog " Speed changed :-( is: '" + x + "' should: '" + i + "'"
+ end if
+ '///+ - check 'effect group' ///'
+ x = TransitionApplyToSelectedSlide.GetSelIndex
+ if (x <> (i+3)) then
+ Warnlog " Effect changed :-( is: '" + x + "' should: '" + (i+3) + "'"
+ end if
+ sleep (1)
+ select case i
+ case 1: '///+ - click button 'Automatic Transition' ///'
+ if (TransitionAutomaticallyAfter.IsEnabled) then
+ '///+ - + + Check Time '1' OR ///'
+ sTemp = TransitionAutomaticallyAfterTime.GetText
+ if (sTemp <> TimerValue) then
+ Warnlog " Time is different :-( is: '" + sTemp + "' should be: '" + TimerValue + "'" '"00:00:01"
+ end if
+ else
+ Warnlog " button 'Automatic Transition' not pressed ?"
+ end if
+ case 2: if (TransitionAutomaticallyAfter.IsChecked <> FALSE) then
+ '///+ - + check button 'SemiAutomatic Transition' OR ///'
+ Warnlog " button 'Automatic Transition' is pressed ?"
+ end if
+ case 3: if (TransitionAutomaticallyAfter.IsChecked <> FALSE) then
+ '///+ - + click button 'Manual Transition' ///'
+ Warnlog " button 'Automatic Transition' is pressed ?"
+ end if
+ end select
+ Sleep (3)
+ next i
+ TransitionAutomaticPreview.Check
+ '/// Set "Start with current page" back to default = on, in ToolsOptions ///'
+ setStartCurrentPage(TRUE)
+ Kontext "Navigator"
+ if Navigator.exists then
+ '///+ close navigator ! ///'
+ Navigator.Close
+ else
+ printlog "Navigator: NOT available"
+ end if
+ '/// Close the document ///'
+ call hCloseDocument
+
+endcase 'tSlideShowSlideTransition
+
+'-------------------------------------------------------------------------------------
+testcase tSlideShowShowHideSlide
+
+ dim saSlideNames(4) as string
+ dim i as integer
+
+ S1 = glLocale (2) + " 1"
+ S2 = glLocale (2) + " 2"
+ S3 = glLocale (2) + " 3"
+ S4 = glLocale (2) + " 4"
+ saSlideNames(1) = S1
+ saSlideNames(2) = S2
+ saSlideNames(3) = S3
+ saSlideNames(4) = S4
+
+ printlog "Open file 'graphics\\input\\diashow.odp' (Slide Show with 4 Slides)"
+ hFileOpen ConvertPath (gTesttoolPath + "graphics\required\input\diashow.odp")
+ sleep (10)
+ printlog "check if the document is writable"
+ if fIsDocumentWritable = false then
+ printlog "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
+ Kontext "Navigator"
+ if Navigator.exists then
+ printlog "close navigator"
+ Navigator.Close
+ else
+ printlog "Navigator: NOT available"
+ endif
+ printlog "View->Workspace->Slides View"
+ ViewWorkspaceSlidesView
+ sleep (1)
+ Kontext "Slides"
+ printlog "Selecting 2nd slide"
+ SlidesControl.TypeKeys "<PAGEDOWN>"
+ printlog "Hiding 2nd slide"
+ SlideShowHideSlide
+ printlog "Selecting 4th slide"
+ SlidesControl.TypeKeys "<PAGEDOWN>" ,2
+ printlog "Hiding 4th slide"
+ SlideShowHideSlide
+
+ sleep (2)
+ printlog "View->Workspace->Drawing View"
+ ViewWorkspaceDrawingView
+ kontext "DocumentImpress"
+ DocumentImpress.TypeKeys "<HOME>"
+ sleep (2)
+ printlog "SlideShow->Slide Show Settings..."
+ SlideShowPresentationSettings
+ Kontext "Bildschirmpraesentation"
+ sleep (2)
+ printlog "check Radio button 'Type': 'Window'"
+ Fenster.Check
+ sleep (1)
+ printlog "close dialog 'Slide Show' with OK "
+ Bildschirmpraesentation.OK
+ printlog "start the slideshow with 'Slide Show->Slide Show'"
+ SlideShowSlideshow
+ sleep (1)
+ kontext "DocumentPresentation"
+ printlog "type the key [MOD1 SHIFT F5] to open the navigator" '--------------------------------------------------------------------------
+ DocumentPresentation.TypeKeys "<MOD1 SHIFT F5>"
+ sleep (1)
+ kontext "NavigatorDraw"
+ for i = 1 to 2
+ if ((i mod 2) = 1) then ' for all odd numbers (ungerade) do
+ printlog "Getting slide names"
+ fGetSlideName(saSlideNames(i))
+ kontext "DocumentPresentation"
+ DocumentPresentation.TypeKeys "<pagedown>"
+ sleep (3)
+ endif
+ Kontext "NavigatorDraw"
+ if NavigatorDraw.exists (5) then
+ sleep 1
+ printlog "check in list, if the page changed"
+ if ((i mod 2) = 1) then ' for all odd numbers (ungerade) do
+ if i = Liste.GetSelIndex then
+ qaerrorlog "the Navigator didn't update!"
+ endif
+ endif
+ else
+ warnlog " Navigator doesn't exist?!?!?"
+ endif
+ sleep (1)
+ next i
+ sleep (3)
+ Kontext "DocumentPresentation"
+ DocumentPresentation.TypeKeys "<pagedown>"
+ sleep (2)
+ DocumentPresentation.TypeKeys "<pagedown>"
+ sleep (5)
+ try
+ DocumentPresentation.MouseDown 50,50
+ DocumentPresentation.MouseUp 50,50 'This one works to recognice the not ending.
+ warnlog " Presentation did NOT END!!!"
+ catch
+ printlog " ended right."
+ endcatch
+ sleep (2)
+ Kontext "Navigator"
+ if Navigator.exists then
+ printlog "close navigator !"
+ Navigator.Close
+ else
+ printlog "Navigator: NOT available"
+ endif
+ Call hCloseDocument
+
+endcase 'tSlideShowShowHideSlide
+
+'------------------------------------------------------------------------------
diff --git a/testautomation/graphics/optional/includes/impress/i_slideshow2.inc b/testautomation/graphics/optional/includes/impress/i_slideshow2.inc
new file mode 100644
index 000000000000..b15beb28932d
--- /dev/null
+++ b/testautomation/graphics/optional/includes/impress/i_slideshow2.inc
@@ -0,0 +1,1011 @@
+'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
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* Owner : wolfram.garten@oracle.com
+'*
+'* short description :
+'*
+'*******************************************************************
+'*
+' #1 tPraesentationAnimation
+' #1 tPraesentationEffekt
+' #1 tSlideShowInteraction
+' #1 tAendernObjektBenennen
+' #1 tSlideshowBackgroundAllSlides
+' #1 tSlideshowBackgroundSelectedSlide
+'*
+'\******************************************************************
+
+testcase tPraesentationAnimation
+ Dim i
+ Printlog "- Slideshow/Animation"
+
+ Call hNewDocument
+ Call sSelectEmptyLayout '/// new document ///'
+ sleep 2
+ InsertGraphicsFromFile '/// insert graphic ///'
+ Kontext "OeffnenDlg"
+ Dateiname.SetText ConvertPath (gTesttoolPath + "global/input/graf_inp/desp.bmp")
+ sleep 2
+ Oeffnen.Click
+ sleep 2
+
+ gMouseClick 90,90 '/// deselect graphic ///'
+
+ InsertGraphicsFromFile '/// insert 2nd graphic ///'
+ Kontext "OeffnenDlg"
+ Dateiname.SetText ConvertPath (gTesttoolPath + "global/input/graf_inp/borabora.jpg")
+ sleep 2
+ Oeffnen.Click
+ sleep 2
+
+ Call hTypekeys "<TAB>"
+
+ Opl_SD_EffekteZulassen '/// open animation dialogue ///'
+ Kontext "Animation"
+
+ for i=1 to 10
+ BildAufnehmen.Click '/// add graphic 10 times ///'
+ next i
+
+ sleep 1
+ if AnzahlBilder.GetText <> "10" Then '/// get number of frames (should be 10) ///'
+ WarnLog " - Adding pictures did not work"
+ else
+ PrintLog " Pictures added"
+ end if
+
+ if AlleAufnehmen.IsEnabled Then WarnLog " - Add all should not be enabled because only 1 object is selected"
+
+ Kontext "DocumentImpress"
+ EditSelectAll '/// select both graphics in document ///'
+
+ Kontext "Animation"
+
+ for i=1 to 5
+ printlog i
+ AlleAufnehmen.Click '/// add them 5 times (10 frames) ///'
+ next i
+
+ sleep 1
+ if AnzahlBilder.GetText <> "20" Then '/// compare total numbers of frame ///'
+ WarnLog " - Adding pics does not work"
+ else
+ PrintLog " all pics added"
+ end if
+
+ ErstesBild.Click '/// jump to 1st frame ///'
+
+ if AnzahlBilder.GetText <> "1" Then '/// get number index of selected frame ///'
+ WarnLog " - Jump back to beginning does not work"
+ else
+ PrintLog " Jump back to beginning works"
+ end if
+
+ LetztesBild.Click '/// jump to last frame ///'
+
+ if AnzahlBilder.GetText <> "20" Then '/// control number index of selected frame ///'
+ WarnLog " - Jump to end does not work"
+ else
+ PrintLog " Jumped to end"
+ end if
+ sleep 1
+ Abspielen.Click '/// play animation ///'
+ sleep 10
+ Kontext "DocumentImpress"
+ EditSelectAll '/// delete graphics in document ///'
+ DocumentImpress.TypeKeys "<DELETE>"
+ sleep 2
+ Kontext "Animation"
+ Erstellen.Click '/// create animation ///'
+ sleep 10
+
+ Kontext "DocumentImpress"
+ try
+ EditCopy '/// try to copy created animation to make sure it is created ///'
+ PrintLog " Animation created"
+ catch
+ WarnLog " - Animation not created"
+ endcatch
+
+ Kontext "Animation"
+
+ if AnimationsgruppeGruppenobjekt.IsChecked = True Then '/// set duration time of frames ///'
+ try
+ AnzeigedauerProBild.SetText "1"
+ WarnLog " - Control should be disabled"
+ catch
+ PrintLog " Control disabled because Groupobjekt = " + AnimationsgruppeGruppenobjekt.IsChecked
+ endcatch
+ end if
+
+ AnimationsgruppeBitmapobjekt.Check '/// check group object ///'
+
+ AnzeigedauerProBild.SetText "3" '/// set frame visibility time to 3 ///'
+ SetClipboard AnzeigedauerProBild.GetText
+ AnzeigedauerProBild.More '/// raise value for frame time ///'
+ if AnzeigedauerProBild.GetText<> GetClipboardText Then
+ PrintLog " Duration per frame works"
+ else
+ WarnLog " - Duration could not be changed"
+ end if
+
+ Dim Zaehler
+ Zaehler = AnzahlDurchlaeufe.GetItemCount '/// test different settings for pass amount ///'
+ for i=1 to Zaehler
+ AnzahlDurchlaeufe.Select i
+ next i
+ PrintLog " Number of loops is set"
+
+ Dim ZaehlerAnpassung
+ ZaehlerAnpassung=Anpassung.GetItemCount
+ for i=1 to ZaehlerAnpassung
+ Anpassung.Select i
+ next i
+
+ BildLoeschen.Click '/// delete 1 frame ///'
+ if AnzahlBilder = "20" Then
+ WarnLog " - Deleting pictures does not work"
+ else
+ PrintLog " Picture No.20 deleted"
+ end if
+
+ AlleLoeschen.Click '/// delete all frames ///'
+ Kontext "Active"
+ Active.Yes
+ sleep 3
+
+ Kontext "Animation"
+ if Abspielen.IsEnabled = true Then '/// check if play button is still active ///'
+ WarnLog " - Not all pics are deleted"
+ else
+ PrintLog " All pics deleted"
+ end if
+ sleep 2
+ Animation.Close '/// close animation flyer ///'
+ sleep 2
+ Call hCloseDocument '/// close document ///'
+endcase
+
+'---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+
+testcase tPraesentationEffekt
+ qaerrorlog "Test not yet ready."
+ goto endsub
+ Printlog "- Slideshow/Effect"
+ Dim i
+ Dim j
+ Dim k
+ Dim l
+ Dim m
+ Dim n
+ Dim Zaehler
+ Dim ZaehlerKmh
+ Dim ZaehlerText
+ Dim ZaehlerTon
+ Dim Zufall
+ Call hNewDocument '/// new document ///'
+ '/// check state of navigator ! expected: closed ///'
+ Kontext "Navigator"
+ if Navigator.exists then
+ '///+ close navigator ! ///'
+ Navigator.Close
+ Warnlog "Navigator was open. Check earlier tests. Now closed."
+ else
+ printlog "Navigator: NOT available. Good."
+ endif
+ sleep 2
+ kontext "DocumentImpress"
+ gMouseClick 50,50
+ hRechteckErstellen (20,20,50,50) '/// create rectangle ///'
+ sleep 3
+ Kontext "Effekt"
+ Printlog " - Test effects"
+ gMouseClick 90,90 '/// deselect rectangle ///'
+ sleep 1
+ DocumentImpress.TypeKeys "<TAB>" '/// select rectangle ///'
+ sleep 1
+ DocumentImpress.TypeKeys "<F2>" '/// go into text edit mode (F2) ///'
+ sleep 1
+ DocumentImpress.TypeKeys "test text to test text effects" '/// type text into the rectangle ///'
+ sleep 1
+ DocumentImpress.TypeKeys "<ESCAPE>"
+ sleep 2
+ DocumentImpress.TypeKeys "<TAB>"
+ sleep 1
+ SlideShowEffects
+ Kontext "Effekt"
+ sleep 3
+ Effekte.Click
+ Zaehler=Effekteliste.GetItemCount
+ for i=2 to Zaehler '/// Start from the second entry since the first one is "No effect" ///'
+ Effekteliste.Select i
+ SetClipboard Effekteliste.GetSelText
+ Effekt.TypeKeys "<TAB>"
+ Effekteauswahl.TypeKeys "<RIGHT>" ,2
+ sleep 1
+ Zuweisen.Click
+ sleep 1
+ Effekt.Close
+ sleep 1
+ PraesentationEffekt
+ Kontext "Effekt"
+ sleep 1
+ if GetClipboardText<>Effekteliste.GetSelText Then Warnlog " - Invisible color not changed"
+ sleep 1
+ next i
+ sleep 1
+ Printlog " - Test speed setting"
+ sleep 1
+ Texteffekte.Click
+
+ sleep 1
+ ZaehlerKmh=Geschwindigkeit.GetItemCount
+ for j=1 to ZaehlerKmh
+ Geschwindigkeit.Select j
+ SetClipboard Geschwindigkeit.GetSelText
+ Zuweisen.Click
+ Effekt.Close
+ sleep 1
+ SlideShowEffects
+ Kontext "Effekt"
+ sleep 1
+ if GetClipboardText <> Geschwindigkeit.GetSelText Then Warnlog " - Speed setting did not change"
+ next j
+ Printlog " - Test text effects"
+ Texteffekte.Click
+ sleep 1
+ ZaehlerText=TexteffekteListe.GetItemCount
+ for k=1 to ZaehlerText
+ TexteffekteListe.Select k
+ SetClipboard TexteffekteListe.GetSelText
+ Effekt.TypeKeys "<TAB>"
+ Texteffektauswahl.TypeKeys "<RIGHT>" ,2
+ Zuweisen.Click
+ sleep 1
+ Effekt.Close
+ gMouseClick 90,90
+ sleep 2
+ gmouseClick 40,40
+ PraesentationEffekt
+ Kontext "Effekt"
+ sleep 1
+ Texteffekte.Click
+ sleep 1
+ next k
+ Printlog " - Test invisible color"
+ Effekte.Click
+ Effekteliste.Select 1
+ Effekteauswahl.TypeKeys "<RIGHT>" ,2
+ Zuweisen.Click
+ sleep 2
+ try
+ Extras.Click
+ catch
+ Warnlog "- Extras Button not active"
+ endcatch
+ sleep 1
+ randomize
+ Zufall=((2*Rnd)+1)
+ for l=1 to 5
+ if (NOT Abblendfarbe.IsEnabled) then
+ MitFarbeAbblenden.Click
+ endif
+ sleep 1
+ if Abblendfarbe.IsEnabled = False Then Warnlog " - Control should not be enabled"
+ sleep 1
+ Zuweisen.Click
+ Effekt.Close
+ SlideShowEffects
+ Kontext "Effekt"
+ sleep 1
+ Effekte.Click
+ Effekteliste.Select 1
+ Effekteauswahl.TypeKeys "<RIGHT>" ,3
+ try
+ Zuweisen.Click
+ catch
+ Effekteauswahl.TypeKeys "<RIGHT>"
+ Zuweisen.Click
+ endcatch
+ sleep 2
+ Extras.Click
+ next l
+ Printlog " - Test blend with color"
+ MitFarbeAbblenden.Click
+ try
+ for m=1 to 5
+ sleep 2
+ Abblendfarbe.Select Zufall
+ SetClipboard Abblendfarbe.GetSelText
+ Zuweisen.Click
+ next m
+ catch
+ MitFarbeAbblenden.Click
+ for m=1 to 5
+ sleep 2
+ Abblendfarbe.Select Zufall
+ SetClipboard Abblendfarbe.GetSelText
+ Zuweisen.Click
+ next m
+ endcatch
+ Printlog " - Test order"
+ Effekte.Click
+ Effekteliste.Select 2
+ Zuweisen.Click
+ Reihenfolge.Click
+ sleep 1
+ Printlog " - Test preview"
+ Vorschaufenster.Click
+ sleep 1
+ Kontext "Vorschau"
+ if Vorschau.Exists = False Then Warnlog " - Preview window does not exist"
+ Vorschau.Close
+ Kontext "Effekt"
+ Effekte.Click
+ UseBindings
+ sleep 1
+ Extras.Click
+ sleep 1
+ if NOT klang.Exists then
+ warnlog "- Control Sound does not exist"
+ end if
+ if Klangliste.Exists = false Then Klang.Click
+ sleep 1
+ ZaehlerTon = Klangliste.GetItemCount
+ for n=1 to ZaehlerTon
+
+ Klangliste.Select n
+ SetClipboard Klangliste.GetSelText
+ VollstaendigAbspielen.Click
+ Effekt.Close
+ sleep 1
+ Kontext "DocumentImpress"
+ gMouseClick 40,40
+ sleep 1
+ PraesentationEffekt
+ Kontext "Effekt"
+ sleep 1
+ Effekte.Click
+ sleep 1
+ Extras.Click
+ if Klangliste.IsVisible = False Then Klang.Click
+ next n
+ Effekt.Close
+ sleep 1
+ Call hCloseDocument
+endcase
+
+'---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+
+testcase tSlideShowInteraction
+ Dim Datei$
+ Dim i as integer
+ Dim Zaehler as integer
+ dim b115364 as boolean
+
+ Datei$ = ConvertPath (gOfficePath + "user\work\interac.odp")
+
+ '/// open application ///'
+ Call hNewDocument
+ Call sSelectEmptyLayout
+ sleep 5
+ setStartCurrentPage(TRUE) '/// Set "start with current page to ON ///'
+
+ '/// call 'Insert->Slide' three times and name the slides 2, 3, 4 and create a rectangl� on it ///'
+ '///+ we now have 4 slides ?! :-) ///'
+ Kontext "DocumentImpress"
+ for i = 2 to 4
+ InsertSlide
+ sleep 2
+ hTypekeys "<Pagedown>" , 10 ' workaround for issue i56267. Has to be removed when cws impress73 has be integrated
+ sleep 2
+ Kontext "DocumentImpress"
+ gMouseClick 50,50
+ Call hRechteckErstellen (i*10,i*10,i*20,i*20)
+ sleep 2
+ next i
+
+ '/// check state of navigator ! expected: closed -> open navigator ///'
+ Kontext "Navigator"
+ if Navigator.exists then
+ qaerrorlog "Navigator: already open :-("
+ else
+ printlog "Navigator: NOT available :-) will be opened now."
+ Kontext "DocumentImpress"
+ DocumentImpress.TypeKeys "<MOD1 SHIFT F5>"
+' ViewNavigator
+ endif
+ sleep 3
+
+ '/// Slide Show->Interaction ///'
+ SlideShowInteraction
+ Kontext "TabInteraktion"
+ sleep 1
+ if AktionBeiMausklick.GetItemCount = 11 Then
+ Printlog "- List is complete"
+ else
+ Warnlog "- Number of possible actions is wrong. It should be: 11, but it is: " + AktionBeiMausklick.GetItemCount
+ end if
+ sleep 1
+
+ AktionBeiMausklick.Select 1 'Keine Aktion bei Mausclick
+ Printlog (AktionBeiMausklick.GetSelText + " chosen")
+ If Durchsuchen.IsVisible then Warnlog "- Control should be invisible because AktionBeiMausklick = " + AktionBeiMausKlick.GetSelText
+ sleep 1
+
+ Kontext "TabInteraktion"
+ AktionBeiMausklick.Select 2 'Go to previous Slide
+ Printlog (AktionBeiMausklick.GetSelText + " chosen")
+ if Durchsuchen.IsVisible Then Warnlog "- Control should be invisible, beacause Action = " + AktionBeiMausKlick.GetSelText
+ TabInteraktion.OK
+ sleep 2
+ Kontext "DocumentImpress"
+ gMouseClick 90,90
+ sleep 1
+ gMouseClick 50,50
+ sleep 2
+
+ Kontext "NavigatorDraw"
+ sleep 2
+ if Not Liste.GetSelIndex = 3 Then
+ Warnlog "- jumped to wrong slide"
+ else
+ Printlog "- jumped to correct slide"
+ end if
+ sleep 1
+
+ Kontext "DocumentImpress"
+ EditSelectAll
+ sleep 1
+
+ SlideShowInteraction
+ sleep 2
+ Kontext "TabInteraktion"
+ AktionBeiMausklick.select 3 'Go to next Slide
+ Printlog (AktionBeiMausKlick.GetSelText + " chosen")
+ TabInteraktion.OK
+ sleep 1
+ Kontext "DocumentImpress"
+ gMouseClick 90,90
+ sleep 1
+ gMouseClick 50,50
+ sleep 2
+ gMouseClick 90,90
+ Kontext "NavigatorDraw"
+ if Liste.GetSelIndex <> 4 Then
+ Warnlog "- Jumped to wrong slide. Jumped to " + Liste.GetSelIndex + " instead of 4."
+ else
+ Printlog " Jumped to correct slide"
+ end if
+ sleep 1
+ kontext "DocumentImpress"
+ EditSelectAll
+ sleep 1
+
+ SlideShowInteraction
+ sleep 1
+ Kontext "TabInteraktion"
+ AktionBeiMausklick.select 4 'Go to first Slide
+ Printlog AktionBeiMausKlick.GetSelText
+ sleep 1
+ TabInteraktion.OK
+ sleep 1
+ Kontext "DocumentImpress"
+ gMouseClick 90,90
+ sleep 1
+ gMouseClick 50,50
+ sleep 1
+ gMouseClick 90,90
+ Kontext "NavigatorDraw"
+ if Liste.GetSelIndex <> 1 Then Warnlog "- jumped to wrong slide. Jumped to " + Liste.GetSelIndex + " instead of 1."
+ Letzte.Click 'Liste.Select 4
+ Kontext "DocumentImpress"
+ EditSelectAll
+ sleep 2
+
+ try
+ SlideShowInteraction
+ catch
+ warnlog "SlideshowInteraction diasabled :-("
+ endcatch
+ Kontext "TabInteraktion"
+ AktionBeiMausklick.select 5 'Go to last page
+ printlog AktionBeiMausKlick.GetSelText
+ TabInteraktion.OK
+ sleep 1
+ Kontext "NavigatorDraw"
+ if Not Liste.GetSelIndex = 1 Then Warnlog "- jumped to wrong slide"
+
+ kontext "DocumentImpress"
+ gMouseClick 90,90
+ sleep 1
+ hMouseClick DocumentImpress,50,50
+ Call hRechteckErstellen 20,20,50,50
+ sleep 1
+ EditSelectAll
+ sleep 1
+ try
+ FormatGroupGroup
+ catch
+ warnlog "GROUP?"
+ endcatch
+ sleep 1
+
+ SlideShowInteraction
+ Kontext "TabInteraktion"
+ AktionBeiMausklick.select 6 'Sprung zu Seite oder Objekt
+ printlog AktionBeiMausKlick.GetSelText
+ sleep 2
+ if Not ListeSprungZuSeiteObjekt.IsVisible Then Warnlog " list seems to be invisible"
+ Seite.SetText S2
+ Suchen.Click
+ if ListeSprungZuSeiteObjekt.GetSelIndex <> 3 Then
+ Warnlog " Search does not work. Current slide is: " + ListeSprungZuSeiteObjekt.GetSelText
+ endif
+ TabInteraktion.OK
+ sleep 1
+
+ Kontext "DocumentImpress"
+ gMouseClick 90,90
+ sleep 1
+ gMouseClick 25,25
+ sleep 2
+ Kontext "NavigatorDraw"
+ if Liste.GetSelIndex <> 2 Then
+ Warnlog "- Jumped to wrong destination"
+ printlog Liste.GetSelIndex
+ Liste.Select 4
+ Liste.TypeKeys "<RETURN>"
+ endif
+ Kontext "DocumentImpress"
+ EditSelectAll
+ sleep 1
+
+ Kontext "DocumentImpress"
+ EditSelectAll
+ sleep 1
+ SlideShowInteraction
+ Kontext "TabInteraktion"
+ sleep 1
+ AktionBeiMausKlick.Select 7 'Go to Document
+ Printlog AktionBeiMausKlick.GetSelText + " chosen"
+ try
+ Durchsuchen.Click
+ sleep 1
+ Kontext "OeffnenDlg"
+ sleep 1
+ Dateiname.SetText ConvertPath (gTesttoolPath + "graphics\required\input\recht_49.odp")
+ Oeffnen.Click
+ sleep 10
+ Kontext "TabInteraktion"
+ sleep 1
+ TabInteraktion.OK
+ sleep 3
+ Kontext "DocumentImpress"
+ catch
+ Warnlog "- Search button could not be accessed"
+ endcatch
+ sleep 1
+ DocumentImpress.MouseDown 90,90
+ DocumentImpress.MouseUp 90,90
+ sleep 2
+ Kontext "DocumentImpress"
+ DocumentImpress.Mousedown 30,30
+ kontext
+ b115364 = false
+ if messagebox.exists then
+ printlog "baeh: '" + messagebox.gettext + "'"
+ try
+ messagebox.ok ' was default in so7
+ catch
+ warnlog "behaviour changed #115364# mother document gets closed :-("
+ if fileExists(ConvertPath (gOfficePath + "user\work\bug115364.odp")) then
+ kill ConvertPath (gOfficePath + "user\work\bug115364.odp")
+ endif
+ messagebox.yes ' don't save changes, before going on!
+ b115364 = true
+ kontext "SpeichernDlg"
+ Dateiname.setText ConvertPath (gOfficePath + "user\work\bug115364.odp")
+ Speichern.click
+ sleep 10
+ endcatch
+ else
+ printlog "OK :-)"
+ endif
+ Kontext "DocumentImpress"
+ DocumentImpress.MouseUp 30,30
+ sleep 2
+ try
+ ViewDrawing
+ sleep 1
+ Kontext "DocumentImpress"
+ DocumentImpress.MouseDown 25,25
+ DocumentImpress.MouseUp 25,25
+ catch
+ Warnlog "- Jump to document did not work or preview window did not appear"
+ endcatch
+ sleep 2
+ if (not b115364) then
+ Call hCloseDocument
+ else
+ Call hCloseDocument
+ hFileOpen (ConvertPath (gOfficePath + "user\work\bug115364.odp"))
+ endif
+ sleep 6
+
+ '/// Do Page down + Page up due to focusing-problems ///'
+ kontext "Slides"
+ hTypeKeys "<PAGEDOWN>"
+ hTypeKeys "<PAGEUP>"
+ Kontext "NavigatorDraw"
+ if NavigatorDraw.Exists = FALSE then
+ qaerrorlog "Navigator: NOT available :-( will be opened now!"
+ Kontext "DocumentImpress"
+ DocumentImpress.TypeKeys "<MOD1 SHIFT F5>"
+ else
+ printlog "Navigator: already open :-)"
+ endif
+ Kontext "NavigatorDraw"
+ sleep 1
+ if Naechste.IsEnabled then
+ Naechste.Click
+ else
+ warnlog "'Next' wasn't visible. Clicking 'First' + Two 'Next'."
+ Erste.Click
+ sleep 2
+ Naechste.Click
+ Naechste.Click
+ sleep 2
+ endif
+
+ Kontext "DocumentImpress"
+ EditSelectAll
+ sleep 1
+
+ SlideShowInteraction
+ Kontext "TabInteraktion"
+ sleep 1
+ AktionBeiMausKlick.Select 8
+ Printlog AktionBeiMausKlick.GetSelText + " chosen"
+ sleep 1
+ Tabinteraktion.OK
+ sleep 2
+ SlideShowInteraction
+ Kontext "TabInteraktion"
+ sleep 1
+ if not AktionBeiMausKlick.GetSelIndex = 8 Then Warnlog "- Not the right action chosen"
+ sleep 1
+ AktionBeiMausKlick.Select 8 'Play sound
+ Printlog AktionBeiMausKlick.GetSelText + "- chosen"
+ sleep 1
+ Tabinteraktion.OK
+ sleep 2
+ Kontext "NavigatorDraw"
+ sleep 1
+ Liste.Select 2
+ Kontext "DocumentImpress"
+ EditSelectAll
+ sleep 1
+ SlideShowInteraction
+ Kontext "TabInteraktion"
+ sleep 1
+ Durchsuchen.Click
+ sleep 1
+ Kontext "OeffnenDlg"
+ sleep 1
+ Dateiname.SetText ConvertPath (gTesttoolPath + "graphics\required\input\blip.wav")
+ sleep 1
+ Oeffnen.Click
+ sleep 1
+ Kontext "Active"
+ if Active.Exists Then
+ Warnlog Active.GetText + " Gallery might be empty"
+ Active.OK
+ sleep 1
+ Kontext "OeffnenDlg"
+ OeffnenDlg.Cancel
+ sleep 1
+ end if
+ Kontext "TabInteraktion"
+ SetClipboard Klangwahl.GetText
+ TabInteraktion.OK
+ sleep 1
+ SlideShowInteraction
+ Kontext "TabInteraktion"
+ sleep 1
+ if Klangwahl.GetText <> GetClipboardText then Warnlog "- Not the right sound chosen"
+ TabInteraktion.OK
+ sleep 1
+ InsertGraphicsFromFile
+ sleep 1
+ Kontext "GrafikeinfuegenDlg"
+ sleep 1
+ if Verknuepfen.IsChecked then Verknuepfen.UnCheck
+ Dateiname.SetText ConvertPath (gTesttoolPath + "global\input\graf_inp\enter.bmp")
+ Oeffnen.Click
+ sleep 3
+ Kontext "NavigatorDraw"
+ sleep 1
+ Liste.Select 4
+ sleep 1
+ SlideShowInteraction
+ Kontext "TabInteraktion"
+ sleep 1
+ AktionBeiMausKlick.Select 9 'Objektaktion ausfuehren
+ Printlog AktionBeiMausKlick.GetSelText + " chosen"
+ sleep 1
+ Zaehler=Effekt.GetItemCount
+ for i=1 to Zaehler
+ Effekt.Select i
+ Printlog Effekt.GetSelText + " chosen"
+
+ TabInteraktion.OK
+ sleep 1
+ SlideShowInteraction
+ Kontext "TabInteraktion"
+ sleep 1
+ next i
+ TabInteraktion.OK
+ sleep 1
+ SlideShowInteraction
+ Kontext "TabInteraktion"
+ sleep 1
+ AktionBeiMausKlick.Select 11 'Macro
+ Printlog AktionBeiMausKlick.GetSelText + " chosen"
+ sleep 2
+ Durchsuchen.Click
+ sleep 5
+ Kontext "ScriptSelector"
+ sleep 5
+ ScriptSelector.Cancel
+ sleep 2
+ Kontext "TabInteraktion"
+ sleep 1
+ TabInteraktion.OK
+ sleep 3
+
+ SlideShowInteraction
+ Kontext "TabInteraktion"
+ sleep 2
+ if not AktionBeiMausKlick.GetSelIndex = 11 Then Warnlog "- Wrong action used"
+ sleep 1
+ AktionBeiMausKlick.Select 12 'End Presentation
+ Printlog AktionBeiMausKlick.GetSelText
+ Tabinteraktion.OK
+ sleep 1
+
+ SlideShowPresentationSettings
+ Kontext "Bildschirmpraesentation"
+ if not Fenster.IsChecked Then Fenster.Check
+ BildschirmPraesentation.OK
+ sleep 2
+ Kontext "DocumentImpress"
+ DocumentImpress.TypeKeys "<F5>"
+ sleep 5
+ Kontext "DocumentPresentation"
+ sleep 2
+ DocumentPresentation.MouseDown 50,50
+ DocumentPresentation.MouseUp 50,50
+ sleep 3
+ if DocumentPresentation.Exists then
+ qaerrorlog "#i51418# Sound played instead of ending presentation"
+ DocumentPresentation.TypeKeys "<ESCAPE>"
+ sleep 3
+ endif
+ try
+ Kontext "DocumentImpress"
+ EditSelectAll
+ Printlog "- Slideshow ended at right point"
+ catch
+ Warnlog "- Program is still in slideshow mode"
+ Kontext "DocumentPresentation"
+ DocumentPresentation.TypeKeys "<ESCAPE>"
+ endcatch
+
+ Kontext "DocumentImpress"
+ '/// Close the Navigator ///'
+ DocumentImpress.TypeKeys "<MOD1 SHIFT F5>"
+ sleep 3
+ '/// Set "start with current page to ON = Default ///'
+ setStartCurrentPage(TRUE)
+ Call hCloseDocument
+endcase
+
+'---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+
+testcase tAendernObjektBenennen
+ Printlog "- Context/Name object"
+ Call hNewDocument
+ Call sSelectEmptyLayout '/// new document ///'
+
+ sleep 1
+ Kontext "DocumentImpress"
+ if NOT DocumentImpress.Exists then
+ Warnlog "- Due to Bug 91799 the document disappeared right after loading"
+ Call hNewDocument
+ sleep 1
+ end if
+ sleep 1
+ hRechteckErstellen (20,20,30,30)
+ sleep 1
+ hRechteckErstellen (60,60,80,80)
+
+ gMouseMove (10,10,90,90)
+ Printlog " - check if menu entry is disabled for normal objects"
+ try
+ ContextNameObject
+ Warnlog " function should be only enabled for graphics, ole objects and groups"
+ catch
+ Printlog " Function disabled"
+ endcatch
+ EditSelectAll
+ Kontext "DocumentImpress"
+ FormatGroupGroup
+ sleep 2
+ gMouseClick 25,25
+ ContextNameObject
+ sleep (2)
+ Kontext "NameDlgObject"
+ NameField.SetText "Test"
+ NameDlgObject.OK
+ sleep 1
+ Printlog " - Name object worked"
+ Kontext "DocumentImpress"
+ EditSelectAll
+ DocumentImpress.TypeKeys "<DEL>"
+ InsertGraphicsFromFile
+ Kontext "GrafikEinfuegenDlg"
+ Dateiname.SetText ConvertPath (gTesttoolPath + "global\input\graf_inp\enter.bmp")
+ sleep 3
+ Preview.Check
+ sleep 1
+ Oeffnen.Click
+ sleep 1
+ printlog " - Name a graphic file"
+ try
+ ContextNameObject
+ Kontext "NameDlgObject"
+ Namefield.SetText "Grafik"
+ NameDlgObject.OK
+ sleep 1
+ Printlog " - Name a graphic object did work"
+ catch
+ Warnlog " - Function should have been enabled"
+ endcatch
+ sleep 2
+ Call hCloseDocument
+ sleep 2
+endcase
+
+'---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+
+testcase tSlideshowBackgroundAllSlides
+ Dim Datei$ as string
+ Dim Background$ as string
+ Dim i as integer
+ Dim Zaehler as integer
+ Background$ = ConvertPath(gOfficeBasisPath + "share\gallery\emoticons\grin.gif")
+ Datei$ = ConvertPath (gOfficePath + "user\work\background.odp")
+
+ '/// Create a new document ///'
+ Printlog "- SlideshowBackground"
+ Call hNewDocument
+
+ '/// Insert a new Slide ///'
+ Kontext "DocumentImpress"
+ InsertSlide
+
+ '/// Open the Contextmenu ///'
+ DocumentImpress.OpenContextMenu
+
+ '/// Select the entry "Slide" ///'
+ hMenuFindSelect (".uno:PageMenu", true, 1, true)
+ '/// Select the entry "Background" ///'
+ hMenuSelectNr (4)
+
+ '/// In the open-file dialogue, choose and open a graphic-file you wish to have as a background ///'
+ kontext "GrafikEinfuegenDlg"
+ If GrafikEinfuegenDlg.Exists Then
+ DateiName.SetText (Background$)
+ Oeffnen.Click
+ Else
+ warnlog "GrafikEinfuegenDlg not existent... check why."
+ End if
+
+ '/// If an "active"-message shows up, press "yes" to apply this background to all slides. ///'
+ kontext "Active"
+ if Active.Exists then
+ Active.Yes
+ else
+ QaErrorLog "No dialogue considering if we wish to apply the background to all slides."
+ end if
+
+ '/// Save the document ///'
+ Call hFileSaveAsKill (Datei$)
+ '/// Close the document ///'
+ Call hCloseDocument
+ '/// Open the document ///'
+ Call hFileOpen (Datei$)
+ '/// Close the document ///'
+ Call hCloseDocument
+endcase
+
+'---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+
+testcase tSlideshowBackgroundSelectedSlide
+ Dim Datei$ as string
+ Dim Background$ as string
+ Dim i as integer
+ Dim Zaehler as integer
+ Background$ = ConvertPath(gOfficeBasisPath + "share\gallery\emoticons\grin.gif")
+ Datei$ = ConvertPath (gOfficePath + "user\work\background.odp")
+
+ '/// Create a new document ///'
+ Printlog "- SlideshowBackground"
+ Call hNewDocument
+
+ '/// Insert a new Slide ///'
+ Kontext "DocumentImpress"
+ InsertSlide
+
+ '/// Open the Contextmenu ///'
+ DocumentImpress.OpenContextMenu
+
+ '/// Select the entry "Slide" ///'
+ hMenuFindSelect (".uno:PageMenu", true, 1, true)
+ '/// Select the entry "Background" ///'
+ hMenuSelectNr (4)
+
+ '/// In the open-file dialogue, choose and open a graphic-file you wish to have as a background ///'
+ kontext "GrafikEinfuegenDlg"
+ If GrafikEinfuegenDlg.Exists Then
+ DateiName.SetText (Background$)
+ Oeffnen.Click
+ Else
+ warnlog "GrafikEinfuegenDlg not existent... check why."
+ End if
+
+ '/// If an "active"-message shows up, press "No" to only apply this background to the selected slide. ///'
+ kontext "Active"
+ if Active.Exists then
+ Active.No
+ else
+ QaErrorLog "No dialogue considering if we wish to apply the background to all slides."
+ end if
+
+ '/// Save the document ///'
+ Call hFileSaveAsKill (Datei$)
+ '/// Close the document ///'
+ Call hCloseDocument
+ '/// Open the document ///'
+ Call hFileOpen (Datei$)
+ '/// Close the document ///'
+ Call hCloseDocument
+endcase
+
+'---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
diff --git a/testautomation/graphics/optional/includes/impress/i_slideshow3.inc b/testautomation/graphics/optional/includes/impress/i_slideshow3.inc
new file mode 100644
index 000000000000..63a04aa6f8d5
--- /dev/null
+++ b/testautomation/graphics/optional/includes/impress/i_slideshow3.inc
@@ -0,0 +1,1103 @@
+'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
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* Owner : wolfram.garten@oracle.com
+'*
+'* short description :
+'*
+'*******************************************************************
+' #1 tExtrasInteraktion
+' #1 tExtrasEffekt
+' #1 tExtrasPraesentationseinstellungen
+' #1 tExtrasIndividuellePraesentation
+' #1 tExtrasInteraktion
+' #1 tSlideshowContextMenuOneSlide
+' #1 tSlideshowContextMenuMoreSlides
+' #1 tiMousePointerHides
+'\******************************************************************
+
+testcase tExtrasInteraktion
+ Printlog " - SlideShow/Interaction"
+ Call hNewDocument
+ Call sSelectEmptyLayout
+ sleep 1
+ Call hTextrahmenErstellen ("Seite 1",10,10,40,40) '/// create textbox ///'
+ SlideShowPresentationSettings '/// Set slide show settings ///'
+ Kontext "Bildschirmpraesentation"
+ NavigatorSichtbar.Check '/// Navigator visible ///'
+ Bildschirmpraesentation.OK
+ SlideShowInteraction '/// open Interaction ///'
+ Kontext "Interaktion"
+ if Interaktion.exists(5)then
+ AktionBeiMausklick.Select 1 '/// Select "Go to previous slide" ///'
+ else
+ Print "Interaction doesnt exist, something is wrong here."
+ endif
+ Interaktion.OK
+ Kontext "DocumentImpress"
+ SlideShowSlideshow '/// Run slideshow ///'
+ Sleep (2)
+ Kontext "DokumentPraesentation"
+ DokumentPraesentation.TypeKeys "<ESCAPE>"
+ Sleep 2
+ Kontext "DocumentImpress"
+ gMouseClick 20,20
+ EditSelectAll
+ try
+ EditCopy
+ Printlog " Interaction ->No action works"
+ Kontext "DocumentImpress"
+ catch
+ Warnlog " - Interaction->does not work properly: Should be: Page 2 but it is: " + GetClipboardText
+ DocumentImpress.TypeKeys "<ESCAPE>"
+ Kontext "DocumentImpress"
+ endcatch
+ hCloseDocument
+ Call hNewDocument
+ Call sSelectEmptyLayout
+ Call hRechteckErstellen (50,50,80,80) '/// create rectangle ///'
+ SlideShowInteraction
+ Kontext "Interaktion"
+ Dim i
+ Dim Zaehler
+ Zaehler=AktionBeiMausklick.GetItemCount
+ For i=2 to Zaehler
+ AktionBeiMausklick.Select i '/// select actions ///'
+ SetClipboard AktionBeiMausklick.GetSelText
+ Interaktion.OK
+ Kontext "DocumentImpress"
+ EditSelectAll
+ SlideShowInteraction
+ Kontext "Interaktion"
+ if GetClipboardText<>AktionBeiMausklick.GetSelText Then
+ Warnlog " Action at mouseclick - " + GetClipboardText + " - not taken" '/// control if action is saved (closing reopening dialog) ///'
+ else
+ Printlog " Action at mouseclick - " + GetClipboardText + " - runs"
+ end if
+ next i
+ Interaktion.OK
+ sleep 1
+ Call hCloseDocument '/// close document ///'
+endcase
+
+testcase tExtrasEffekt
+ qaerrorlog "Test not yet ready."
+ goto endsub
+ Dim i
+ Dim j
+ Dim k
+ Dim l
+ Dim m
+ Dim n
+ Dim Zaehler
+ Dim ZaehlerKmh
+ Dim ZaehlerText
+ Dim ZaehlerTon
+ Dim Zufall
+ Call hNewDocument '/// New impress document ///'
+
+ '/// check state of navigator ! expected: closed ///'
+ Kontext "Navigator"
+ if Navigator.exists then
+ '///+ close navigator ! ///'
+ Navigator.Close
+ Warnlog "Navigator was open. Check earlier tests. Now closed."
+ else
+ printlog "Navigator: NOT available. Good."
+ endif
+
+ gMouseClick 50,50
+ hRechteckErstellen (20,20,50,50) '/// create rectangle ///'
+ sleep 2
+ DocumentImpress.TypeKeys "<F2>"
+ DocumentImpress.TypeKeys "- This is text to test the text effects of the Effects flyer"
+ sleep 1
+ gMouseClick 90,90 '/// deselect rectangle ///'
+ DocumentImpress.TypeKeys "<TAB>" '/// reselect rectangle ///'
+
+ sleep 1
+ Kontext "Effekt"
+ Printlog " - Test effect flyer"
+
+ SlideShowEffects '/// Open effect flyer ///'
+ Kontext "ExtrasEffekt"
+ sleep 1
+ Effekte.Click
+ Zaehler=Effekteliste.GetItemCount '/// select each effect 1 time, assign effect and close dialog ///'
+ for i=1 to Zaehler '/// reopen dialog and check if the effect is still there ///'
+ Effekteliste.Select i
+ SetClipboard Effekteliste.GetSelText
+ Effekt.TypeKeys "<TAB>"
+ Effekteauswahl.TypeKeys "<RIGHT>" ,2
+ sleep 1
+ Zuweisen.Click
+ Effekt.Close
+ SlideShowEffects
+ Kontext "Effekt"
+ sleep 1
+ if GetClipboardText<>Effekteliste.GetSelText Then Warnlog " - Invisible color not chosen"
+ printlog GetClipboardText + " should be " + Effekteliste.GetSelText
+
+ sleep 1
+ next i
+ sleep 2
+ Texteffekte.Click '/// test text effects ///'
+ sleep 1
+ ZaehlerKmh=Geschwindigkeit.GetItemCount
+ for j=1 to ZaehlerKmh
+ Geschwindigkeit.Select j
+ SetClipboard Geschwindigkeit.GetSelText
+ Zuweisen.Click
+ Effekt.Close
+ SlideShowEffects
+ Kontext "Effekt"
+ sleep 1
+ if GetClipboardText<>Geschwindigkeit.GetSelText Then Warnlog " - Speed not taken over"
+ next j
+ Printlog " - Speed test ok"
+
+ Printlog " - Test text effects"
+ Texteffekte.Click
+ sleep 1
+ ZaehlerText=TexteffekteListe.GetItemCount
+ for k=1 to ZaehlerText
+ TexteffekteListe.Select k
+ printlog TexteffekteListe.GetSelText + "-effect choosen"
+ SetClipboard TexteffekteListe.GetSelText
+ Effekt.TypeKeys "<TAB>"
+ Texteffektauswahl.TypeKeys "<RIGHT>" ,2
+ N: Zuweisen.Click
+ sleep 1
+ Effekt.Close
+ SlideShowEffects
+ Kontext "Effekt"
+ sleep 1
+ Texteffekte.Click
+ printlog "and when we closed the window and opened again... " + TexteffekteListe.GetSelText + " was choosen"
+ sleep 1
+ if GetClipboardText<>TexteffekteListe.GetSelText Then Warnlog " - Texteffect did not changed"
+ sleep 1
+ next k
+ Printlog " - Test invisible color"
+ Effekte.Click
+ Effekteliste.Select 1
+ Effekteauswahl.TypeKeys "<RIGHT>",2
+ Zuweisen.Click
+ sleep 1
+ Extras.Click
+ sleep 1
+ randomize
+ Zufall=((2*Rnd)+1)
+ for l=1 to 4
+ UnsichtbarMachen.Click
+ sleep 1
+ if Abblendfarbe.IsEnabled=True Then Warnlog " - control shouldn't be enabled"
+ Zuweisen.Click
+ Effekt.Close
+ SlideShowEffects
+ Kontext "Effekt"
+ sleep 1
+ Effekteauswahl.TypeKeys "<RIGHT>",2
+ Extras.Click '/// test extras ///'
+ sleep 1
+ UnsichtbarMachen.Click
+ sleep 1
+ Zuweisen.Click
+ sleep 1
+ next l
+ Printlog " - Blend with color"
+ sleep 2
+ for m=1 to 5
+ MitFarbeAbblenden.Click
+ sleep 2
+ Abblendfarbe.Select Zufall
+ SetClipboard Abblendfarbe.GetSelText
+ Zuweisen.Click
+ Effekt.Close
+ SlideShowEffects
+ Kontext "Effekt"
+ sleep 1
+ Effekteauswahl.TypeKeys "<RIGHT>",3
+ sleep 1
+ Extras.Click
+ sleep 1
+ MitFarbeAbblenden.Click
+ sleep 1
+ Zuweisen.Click
+ sleep 1
+' if GetClipboardText<>Abblendfarbe.GetSelText Then Warnlog " - Blendingcolor did not take over"
+ next m
+ Printlog " - Test order"
+ Effekte.Click
+ sleep 1
+ Effekteliste.Select 2
+ Zuweisen.Click
+ Reihenfolge.Click
+ sleep 1
+ sleep 1
+ Printlog " - test preview window"
+ Vorschaufenster.Click '/// open preview window ///'
+ sleep 1
+ Kontext "Vorschau"
+ if Vorschau.Exists = False Then Warnlog " - Preview window not opened"
+ Vorschau.Close
+ Kontext "Effekt"
+ Extras.Click
+ if not Klangliste.IsEnabled Then Klang.Click '/// insert sound ///'
+ sleep 1
+' ZaehlerTon=Klangliste.GetItemCount
+ for n=1 to 5
+ SetClipboard Klangliste.GetSelText
+ Klangliste.Select n
+ VollstaendigAbspielen.Click
+ Effekt.Close
+ SlideShowEffects
+ Kontext "Effekt"
+ sleep 1
+ Extras.Click
+ sleep 1
+ if GetClipboardText<>Klangliste.GetSelText Then Warnlog " - sound did not change"
+ next n
+ Effekt.Close
+ sleep 1
+ Call hCloseDocument '/// close document ///'
+endcase
+
+testcase tExtrasPraesentationseinstellungen
+dim waschecked as boolean
+ Printlog " - SlideShow/Slideshow settings"
+ Call hNewDocument '/// New impress document ///'
+ setStartCurrentPage(FALSE) '/// Set ToolsOptions - Presentation - StartCurrentPage = off ///'
+ '/// check state of navigator ! expected: closed ///'
+ Kontext "Navigator"
+ if Navigator.exists then
+ '///+ close navigator ! ///'
+ Navigator.Close
+ Warnlog "Navigator was open. Check earlier tests. Now closed."
+ else
+ printlog "Navigator: NOT available. Good."
+ endif
+ Kontext "DocumentImpress"
+ ExtrasPraesentationseinstellung
+ Kontext "Bildschirmpraesentation"
+ AbDia.Check
+ SetClipboard AbDiaName.GetItemCount
+ Bildschirmpraesentation.OK
+ InsertSlide '/// insert slide ///'
+ sleep 2
+ hTypekeys "<Pagedown>"
+ sleep 2
+ SlideShowPresentationSettings '/// slideshow settings ///'
+ Kontext "Bildschirmpraesentation"
+ if AbDiaName.GetItemCount <> GetClipboardText Then
+ Printlog " - Added page appears in list"
+ else
+ Warnlog " - Page not added to the list"
+ end if
+ AlleDias.Check '/// check all dias///'
+ Printlog " - Test all slides"
+ Bildschirmpraesentation.OK
+ hCloseDocument '/// close document ///'
+ DateiOeffnen '/// open document (diashow.odp) ///'
+ Kontext "OeffnenDlg"
+ if OeffnenDlg.Exists(10) then
+ Dateiname.SetText ConvertPath (gTesttoolPath + "graphics\required\input\diashow.odp")
+ else
+ Warnlog "Took more then 10 seconds to get the file-open -dialogue open. Ending Test."
+ goto endsub
+ endif
+ Oeffnen.Click
+ sleep (60)
+ ' 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
+ Kontext "DocumentImpress"
+ sleep 1
+ SlideShowPresentationSettings
+ Kontext "Bildschirmpraesentation"
+ if Fenster.IsChecked = False Then '/// slideshow runs in window mode checked ///'
+ Fenster.Check
+ Printlog " - Slideshow in window mode"
+ else
+ Printlog " - Slideshow in window mode checked"
+ end if
+ Bildschirmpraesentation.OK
+
+ Printlog " - Testing slide show"
+ SlideShowSlideshow '/// run slideshow ///'
+ sleep (3)
+ Kontext "DocumentPresentation"
+ DocumentPresentation.TypeKeys "<pagedown>"
+ try
+ Kontext "DocumentImpress"
+ ViewZoom '/// try using menue entrees (should be disabled while slideshow is running) ///'
+ Warnlog " - In slide show mode controls shouldn't be enabled"
+ Kontext "Massstab"
+ Massstab.OK
+ catch
+ Kontext "DocumentPresentation"
+ Printlog " - Slideshow runs"
+ endcatch
+ sleep 2
+ DocumentPresentation.TypeKeys "<pagedown>"
+ sleep 2
+ DocumentPresentation.TypeKeys "<pagedown>"
+ sleep 2
+ DocumentPresentation.TypeKeys "<pagedown>"
+ sleep 2
+ DocumentPresentation.TypeKeys "<pagedown>"
+ sleep (5)
+
+ kontext "DocumentPresentation"
+ if DocumentPresentation.Exists(3) then '/// test if application is still in slideshow mode ///'
+ warnlog " - We are still in slideshow mode"
+ DocumentPresentation.TypeKeys "<ESCAPE>"
+ else
+ Printlog " - Test Abdia page 3 ended"
+ endif
+
+ Printlog " - From slides test"
+ SlideShowPresentationSettings '/// open slideshow settings ///'
+ Kontext "Bildschirmpraesentation"
+ Fenster.Check '/// check slideshow in window mode ///'
+ AbDia.Check
+ AbDiaName.Select 3 '/// slideshow begins at dia 3///'
+ Printlog " - From " + AbDiaName.GetSelText + " was the slides shown"
+ Bildschirmpraesentation.OK
+ SlideShowSlideshow '/// run slideshow ///'
+ sleep (3)
+ Kontext "DocumentPresentation"
+ DocumentPresentation.TypeKeys "<pagedown>" 'to get to 4
+ sleep 2
+ DocumentPresentation.TypeKeys "<pagedown>" ' to get to the end
+ sleep 2
+ '/// Click once more to get out of presentation-mode ///'
+ DocumentPresentation.TypeKeys "<pagedown>" 'out
+ sleep (3)
+ kontext "DocumentPresentation"
+ if DocumentPresentation.Exists(3) then
+ warnlog " - We are still in slideshow mode"
+ DocumentPresentation.TypeKeys "<ESCAPE>"
+ else
+ Printlog " - Test Abdia page 3 ended"
+ endif
+ Printlog " - Repeat endless"
+
+ Kontext "DocumentImpress"
+ SlideShowPresentationSettings '/// open slideshow settings ///'
+ Kontext "Bildschirmpraesentation"
+ if AbDia.IsChecked=True Then AlleDias.Check
+ if Auto.IsChecked=False Then Auto.Check
+ Bildschirmpraesentation.OK
+ sleep (1)
+ SlideShowSlideshow 'start from 1
+ sleep (3)
+ Kontext "DocumentPresentation"
+ DocumentPresentation.TypeKeys "<pagedown>" 'to 2
+ sleep 2
+ DocumentPresentation.TypeKeys "<pagedown>" 'to 3
+ sleep 2
+ DocumentPresentation.TypeKeys "<pagedown>" 'to 4
+ sleep 2
+ DocumentPresentation.TypeKeys "<pagedown>" 'to pause
+ sleep 2
+ DocumentPresentation.TypeKeys "<pagedown>" 'to 1
+ sleep 2
+ DocumentPresentation.TypeKeys "<pagedown>" 'to 2
+ sleep 2
+ DocumentPresentation.TypeKeys "<pagedown>" 'to 3
+ sleep 2
+ DocumentPresentation.TypeKeys "<MOD1 SHIFT F5>" '/// Open the navigator ///'
+ sleep 2
+ DocumentPresentation.TypeKeys "<pagedown>" 'to 4
+ sleep 2
+ DocumentPresentation.TypeKeys "<pagedown>" 'to pause
+ sleep 2
+ DocumentPresentation.TypeKeys "<pagedown>" 'to 1
+ sleep 3
+ DocumentPresentation.TypeKeys "<pagedown>" 'to 2
+ sleep 3
+ DocumentPresentation.TypeKeys "<pagedown>" 'to 3
+ sleep 3
+ Kontext "NavigatorDraw"
+ if NavigatorDraw.Exists then
+ Printlog " The navigator is open. good."
+ else
+ Warnlog " The navigator should be accessable. Opening now."
+ Kontext "DocumentImpress"
+ DocumentImpress.TypeKeys "<MOD1 SHIFT F5>"
+ Kontext "NavigatorDraw"
+ end if
+ sleep 2
+ if Liste.GetSelIndex <> 3 then
+ Warnlog " - Diashow not repeated: We should be at page no 3, but we are at page no: " + Liste.GetSelIndex
+ Kontext "DocumentPresentation"
+ DocumentPresentation.TypeKeys "<MOD1 SHIFT F5>" '/// Close the Navigator-window ///'
+ else
+ Printlog " - Repeat endless does work"
+ Kontext "DocumentPresentation"
+ DocumentPresentation.TypeKeys "<MOD1 SHIFT F5>" '/// Close the Navigator-window ///'
+ sleep 2
+ endif
+ Kontext "DocumentPresentation"
+ DocumentPresentation.TypeKeys "<ESCAPE>"
+ sleep 2
+ Kontext "DocumentImpress"
+ gMouseClick 80,80
+ try
+ SlideShowPresentationSettings '/// test endless repeating setting ///'
+ Kontext "Bildschirmpraesentation"
+ Bildschirmpraesentation.OK
+ Printlog " - Repeat endless"
+ catch
+ Warnlog " - We are still in slideshow mode"
+ DocumentPresentation.TypeKeys "<ESCAPE>"
+ sleep 5
+ endcatch
+ Kontext "DocumentImpress"
+ SlideShowPresentationSettings
+ Kontext "BildschirmPraesentation"
+ Fenster.Check
+ Printlog " - Test slide switching manually" '/// test dia switch manual ///'
+ if DiawechselManuel.IsChecked = False Then DiawechselManuel.Check
+ BildschirmPraesentation.Ok
+ sleep 1
+ Kontext "DocumentImpress"
+ DocumentImpress.TypeKeys "<MOD1 F2>"
+ try
+ ViewZoom
+ Kontext "Massstab"
+ Warnlog " - No slide show mode with 'Ctrl+F2'"
+ catch
+ Printlog " - Slide show started using 'Ctrl F2'"
+ endcatch
+ Kontext "DocumentPresentation"
+ DocumentPresentation.TypeKeys "<pagedown>"
+ sleep 1
+ DocumentPresentation.TypeKeys "<MOD1 SHIFT F5>"
+' Kontext "NavigatorDraw"
+ sleep 3
+ DocumentPresentation.TypeKeys "<pagedown>"
+ sleep 3
+ DocumentPresentation.TypeKeys "<MOD1 SHIFT F5>"
+ Kontext "Navigator"
+ sleep 5
+
+ '/// Check state of navigator ! Expected: closed ///'
+ Kontext "Navigator"
+ if Navigator.exists then
+ '///+ Close Navigator ! ///'
+ Navigator.Close
+ Warnlog "Navigator: Should have been closed. Closing now."
+ else
+ printlog "Navigator: not available - Good"
+ endif
+ Kontext "DokumentPraesentation"
+ DokumentPraesentation.TypeKeys "<ESCAPE>" '/// Exit presentation-mode ///'
+ Kontext "DocumentImpress"
+ Call hCloseDocument '/// close document ///'
+endcase
+
+testcase tExtrasIndividuellePraesentation
+ Printlog "- Slideshow/Individual slideshow"
+ Call hNewDocument '/// new impress document ///'
+ '/// Deactivate "Start with current page" in ToolsOptions ///'
+ setStartCurrentPage(FALSE)
+ '/// check state of navigator ! expected: closed ///'
+ Kontext "Navigator"
+ if Navigator.exists then
+ '///+ close navigator ! ///'
+ Navigator.Close
+ Warnlog "Navigator was open. Check earlier tests. Now closed."
+ else
+ printlog "Navigator: NOT available. Good."
+ endif
+ Printlog " - insert 3 slides for the individual slide show"
+ SlideShowPresentationSettings '/// open slide show settings ///'
+ Kontext "Bildschirmpraesentation"
+ Fenster.Check
+ Bildschirmpraesentation.OK
+ InsertSlide '/// insert slide ///'
+ sleep 2
+ hTypekeys "<Pagedown>"
+ sleep 2
+ InsertSlide
+ sleep 2
+ hTypekeys "<Pagedown>"
+ sleep 2
+ InsertSlide '/// insert another slide ///'
+ sleep 2
+ hTypekeys "<Pagedown>"
+ sleep 2
+ Printlog " - Slides added"
+ sleep 1
+ Kontext "DocumentImpress"
+ DocumentImpress.TypeKeys "<MOD1 SHIFT F5>" '/// open navigator ///'
+ sleep 1
+ Kontext "NavigatorDraw"
+ if NavigatorDraw.Exists Then
+ Printlog " - Navigator exists"
+ Erste.Click '/// switch to 1st slide ///'
+ Kontext "DocumentImpress"
+ DocumentImpress.MouseDown ( 50, 50 ) '/// Make a click onto the slide to focus onto that ///'
+ DocumentImpress.MouseUp ( 50, 50 )
+ hRechteckErstellen (10,10,20,20) '/// create rectangle ///'
+ Kontext "NavigatorDraw"
+ Naechste.Click '/// switch to 2nd slide ///'
+ Kontext "DocumentImpress"
+ hRechteckErstellen (30,30,40,40) '/// create another rectangle ///'
+ Kontext "NavigatorDraw"
+ Naechste.Click '/// switch to 3rd slide ///'
+ Kontext "DocumentImpress"
+ hRechteckErstellen (40,40,50,50) '/// create rectangle ///'
+ Kontext "NavigatorDraw"
+ Naechste.Click '/// switch to next slide ///'
+ Kontext "DocumentImpress"
+ hRechteckErstellen (50,50,60,60) '/// create rectangle ///'
+ Printlog " - Created rectangles on all slides"
+ else
+ Warnlog " No Navigator"
+ end if
+ sleep 1
+ SlideShowCustomSlideshow '/// open custom slideshow ///'
+ Kontext "IndividuellePraesentation"
+ Printlog " - Create new slideshow"
+ Neu.Click '/// create new individual slideshow ///'
+ Kontext "IndividuellePraesentationDefinieren"
+ PraesentationName.SetText "Test 1" '/// set name of individiual slideshow to Test 1 ///'
+ Dim i
+ Dim Zaehler
+ Zaehler=SeitenPraesentation.GetItemCount '/// add slides to presentation ///'
+ For i=1 to Zaehler
+ SeitenPraesentation.SetNoSelection
+ SeitenPraesentation.Select i
+ Hinzufuegen.Click
+ if SelectedSlides.GetItemCount=i Then
+ Printlog " - slide added to slideshow"
+ else
+ Warnlog " Count does not match selection. Should be: "+ i + " but is: "+ IndividuellePraesentation.GetItemCount
+ end if
+ next i
+ Printlog " - Add slides using multiple selections"
+ SeitenPraesentation.Select 1
+ Hinzufuegen.Click
+ SeitenPraesentation.Select 2
+ Hinzufuegen.Click
+ SeitenPraesentation.Select 3
+ Hinzufuegen.Click
+ SeitenPraesentation.Select 4
+ Hinzufuegen.Click
+
+ if SelectedSlides.GetItemCount=8 Then '/// control number of added slides ///'
+ Printlog " - slides has been added, multiple selection is working"
+ else
+ Warnlog " Multiple selection does not work"
+ end if
+
+ IndividuellePraesentationDefinieren.OK
+ sleep 2
+ Kontext "IndividuellePraesentation"
+ if IndividuellePraesentationBenutzen.IsChecked=False Then IndividuellePraesentationBenutzen.Check
+ sleep 2
+ Starten.Click '/// run presentation ///'
+ Printlog " - Individual slideshow started"
+ sleep 5
+ Kontext "Navigator" '/// Check if the navigator exists, if so - close it ///'
+ if Navigator.Exists Then
+ Printlog " - Navigator exists, we close it"
+ Navigator.Close '/// close navigator ///'
+ sleep 2
+ end if
+ Kontext "DocumentPresentation"
+ sleep 3
+ DocumentPresentation.TypeKeys "<RETURN>"
+ sleep 2
+ DocumentPresentation.TypeKeys "<RETURN>"
+ sleep 2
+ DocumentPresentation.TypeKeys "<RETURN>"
+ sleep 2
+ DocumentPresentation.TypeKeys "<RETURN>"
+ sleep 2
+ DocumentPresentation.TypeKeys "<RETURN>"
+ sleep 2
+ DocumentPresentation.TypeKeys "<RETURN>"
+ sleep 2
+ DocumentPresentation.TypeKeys "<RETURN>"
+ sleep 2
+ DocumentPresentation.TypeKeys "<RETURN>"
+ sleep 2
+ DocumentPresentation.TypeKeys "<ESCAPE>"
+ sleep 5
+ Kontext "IndividuellePraesentation"
+ if IndividuellePraesentation.IsVisible=False Then
+ Warnlog " Slideshow should have ended"
+ Kontext "DocumentPresentation"
+ DocumentPresentation.TypeKeys "<ESCAPE>"
+ else
+ printlog " Presentation seems to have ended successfully"
+ end if
+
+ sleep 2
+
+ Kontext "IndividuellePraesentation"
+ IndividuellePraesentation.Close '/// Close custom slideshow ///'
+
+ Kontext "NavigatorDraw" '/// Navigator: Control if right slide is displayed ///'
+ printlog " Now we switch to the navigator again"
+ if Liste.GetSelIndex <> 4 then '/// Unless -Start on first slide- is activated? Default = No ///'
+ Warnlog " This is not the right slide, it should be 4 but is: " + Liste.GetSelIndex
+ else
+ Printlog " - Individual slideshow seems to work"
+ end if
+ SlideShowCustomSlideshow '/// open custom slideshow ///'
+ '/// Set "Start with current page" back to default = on, in ToolsOptions ///'
+ Kontext "IndividuellePraesentation"
+ if IndividuellePraesentationBenutzen.IsChecked=False Then IndividuellePraesentationBenutzen.Check
+ IndividuellePraesentation.Close
+ sleep 2
+ Kontext "Navigator" 'Draw
+ if Navigator.exists then
+ Navigator.Close '/// Close the Navigator ///'
+ Kontext "NavigatorDraw"
+ if NavigatorDraw.exists then
+ NavigatorDraw.Close
+ endif
+ else
+ printlog "Navigator: NOT available. Good."
+ endif
+ Kontext "DocumentImpress"
+ setStartCurrentPage(TRUE)
+ Call hCloseDocument '/// close document ///'
+endcase
+
+'****************************************************************************************************
+
+testcase tSlideshowContextMenuOneSlide
+ qaerrorlog "Test not yet ready."
+ goto endsub
+ dim NumberOfEntries as Integer
+ Printlog "- ContextMenu in Slideshow"
+ '/// New Impress Document ///'
+ Call hNewDocument
+
+ '/// Start the Slideshow. ///'
+ hTypeKeys "<F5>"
+ '/// Check that the right mousebutton brings up the Context-Menu. ///'
+ Kontext "DocumentPresentation"
+ DocumentPresentation.MouseDown 50, 50, 3
+ DocumentPresentation.MouseUp 50, 50, 3
+ '/// Check that the right-click brought up a Context-Menu. ///'
+ '/// And check the number of Menu-Positions (there should be XXX of them ) ///'
+ NumberOfEntries = 0
+ sleep 2
+ try
+ NumberOfEntries = MenuGetItemCount
+ catch
+ warnlog " No ContextMenu found? Please inform the Automatic Tester"
+ kontext "DocumentImpress"
+ hOpenContextMenu
+ NumberOfEntries = MenuGetItemCount
+ endcatch
+ if (NumberOfEntries = 0) then
+ Warnlog " the Context-Menu doesnt contain any entries, or were not up. Test ends."
+ Goto Endsub
+ endif
+ if NumberOfEntries <> 3 then
+ warnlog " Expected three entries in this Menu, but found " + NumberOfEntries
+' if NumberOfEntries <> 6 then
+' warnlog " Expected six entries in this Menu, but found " + NumberOfEntries
+ else
+ printlog " Number of Entries was: " + NumberOfEntries
+ endif
+ '/// Check that every position contains the expected Undermenu. ("Screen": Black/White. and "End Slideshow") ///'
+ '/// And check that Menu-Item one opens an undermenu. ///'
+ Printlog " We open number one: " + MenuGetItemText(MenuGetItemID(1))
+ hMenuSelectNr (1)
+ sleep 2
+ NumberOfEntries = MenuGetItemCount
+ printlog " Menu-entries: " + MenuGetItemCount
+ if (NumberOfEntries <> 2) then
+ Warnlog " the third Context-Menu-entry was NOT 'Screen'."
+ else
+ Printlog " We open the next number one: " + MenuGetItemText(MenuGetItemID(1))
+ hMenuSelectNr (1)
+ endif
+ DocumentPresentation.MouseDown 50, 50, 3
+ DocumentPresentation.MouseUp 50, 50, 3
+ hMenuSelectNr (1) 'Open the Screen -menu.
+ sleep 2
+ Printlog " We open number two: " + MenuGetItemText(MenuGetItemID(MenuGetItemCount))
+ hMenuSelectNr (2) 'Choose "White"
+ sleep 2
+
+ 'TODO - Due to existing bug, function not yet available.
+ '/// Change to slideshow-ending. Check that the Context-Menu also comes up here. ///'
+ 'DocumentPresentation.
+ hTypeKeys "<SPACE>"
+ Kontext "DocumentPresentation"
+ DocumentPresentation.MouseDown 50, 50, 3
+ DocumentPresentation.MouseUp 50, 50, 3
+ sleep 2
+ NumberOfEntries = 0
+ NumberOfEntries = MenuGetItemCount
+ if NumberOfEntries <> 0 then
+ printlog " Menu-entries: " + MenuGetItemCount
+ else
+ warnlog " No context-menu at Slideshow-endpage."
+ DocumentPresentation.TypeKeys "<ESCAPE>"
+ endif
+
+ '/// And that one can go back. ///'
+ hMenuSelectNr (1) 'Open the Goto Slide -menu.
+ sleep 2
+ Printlog " We open number one (should be 'Goto First Slide'): " + MenuGetItemText(MenuGetItemID(1))
+ hMenuSelectNr (2) 'Choose "Back" 'TODO ;: but now we just end the slideshow
+ sleep 2
+
+ Kontext "DocumentPresentation"
+ DocumentPresentation.TypeKeys "<ESCAPE>"
+ DocumentPresentation.TypeKeys "<ESCAPE>"
+ Kontext "DocumentImpress"
+ InsertSlide
+
+ '/// Start the Slideshow. ///'
+ hTypeKeys "<F5>"
+ '/// Check that the right mousebutton brings up the Context-Menu. ///'
+ Kontext "DocumentPresentation"
+ DocumentPresentation.MouseDown 50, 50, 3
+ DocumentPresentation.MouseUp 50, 50, 3
+ sleep 2
+
+ '/// Check that Menu-Item (three) really finishes the presentation. ///'
+ Printlog " We open the last entry (End Show): " + MenuGetItemText(MenuGetItemID(MenuGetItemCount))
+ hMenuSelectNr (4) 'MenuGetItemCount) 'End Slideshow
+ if DocumentPresentation.Exists then
+ Warnlog "either wrong position for 'End Slideshow', or the command didnt work."
+ else
+ printlog "The presentation was closed, good."
+ endif
+
+ '/// Check that one can step one step forward, even if there is no more than one slide. ///'
+ '/// Start the Slideshow. ///'
+ hTypeKeys "<F5>"
+ '/// Check that the right mousebutton brings up the Context-Menu. ///'
+ sleep (2)
+ Kontext "DocumentPresentation"
+ DocumentPresentation.MouseDown 50, 50, 3
+ DocumentPresentation.MouseUp 50, 50, 3
+ sleep 2
+
+ hMenuSelectNr (2) 'Open the Goto Slide -menu.
+
+ '/// Select the 'one step forward' -entry ///'
+ hMenuSelectNr (1)
+
+ '/// Check that we're on the last slide ///'
+ Kontext "DocumentPresentation"
+ DocumentPresentation.MouseDown 50, 50, 3
+ DocumentPresentation.MouseUp 50, 50, 3
+ sleep 2
+
+ hMenuSelectNr (2) 'Open the Goto Slide -menu.
+ if MenuIsItemEnabled (MenugetItemID(4)) then
+ printlog "Jumped to the right slide"
+ else
+ warnlog "possibly the 'jump to slide' -menu didnt quite work"
+ endif
+
+ '/// Close the Context-Menu ///'
+ hMenuSelectNr (0)
+ Kontext "DocumentPresentation"
+
+ '/// Check if the context-menu also comes up at the very last page (slideshow-ending) ///'
+ DocumentPresentation.TypeKeys "<SPACE>"
+' DocumentPresentation.TypeKeys "<SPACE>"
+ sleep 1
+ Kontext "DocumentPresentation"
+ DocumentPresentation.MouseDown 50, 50, 3
+ DocumentPresentation.MouseUp 50, 50, 3
+ sleep 2
+
+ if MenuGetItemText (MenuGetItemID(1)) <> "" then
+ Printlog "Context-menu came up at the last page: correct."
+ else
+ Warnlog "Context-menu did NOT come up correctly at the last page: false."
+ endif
+
+ '/// Check if we from here, via the context menu, can go back to the first page ///'
+ hMenuSelectNr (2) 'Open the Goto Slide -menu.
+ sleep 1
+ hMenuSelectNr (1) 'First Slide
+
+ '/// Check that we're on the first slide ///'
+ Kontext "DocumentPresentation"
+ DocumentPresentation.MouseDown 50, 50, 3
+ DocumentPresentation.MouseUp 50, 50, 3
+ sleep 2
+
+ hMenuSelectNr (2) 'Open the Goto Slide -menu.
+ if MenuIsItemEnabled (MenugetItemID(3)) then
+ printlog "Jumped to the right slide"
+ else
+ warnlog "possibly the 'jump to slide' -menu didnt quite work from the last slide"
+ endif
+
+ '/// Close the Context-Menu ///'
+ MenuSelect (0)
+ '/// Close the Presentation ///'
+ hTypeKeys "<ESCAPE>"
+ '/// Close Document ///'
+ Call hCloseDocument
+endcase 'tSlideshowContextMenuOneSlide
+
+'****************************************************************************************************
+
+testcase tSlideshowContextMenuMoreSlides
+ qaerrorlog "Test not yet ready."
+ goto endsub
+ dim NumberOfEntries as Integer
+ Printlog "- ContextMenu in Slideshow"
+ '/// New Impress Document ///'
+ Call hNewDocument
+ '/// Insert three new Slides ///'
+ InsertSlide
+ InsertSlide
+ InsertSlide
+ '/// Start the Slideshow. ///'
+ hTypeKeys "<F5>"
+ sleep (3)
+ '/// Check that the right mousebutton brings up the Context-Menu. ///'
+ Kontext "DocumentPresentation"
+ DocumentPresentation.MouseDown 50, 50, 3
+ DocumentPresentation.MouseUp 50, 50, 3
+ '/// Check that the right-click brought up a Context-Menu. ///'
+ '/// And check the number of Menu-Positions (there should be XXX of them ) ///'
+ NumberOfEntries = 0
+ sleep 2
+ try
+ NumberOfEntries = MenuGetItemCount
+ catch
+ warnlog " No ContextMenu found? Please inform the Automatic Tester"
+ kontext "DocumentImpress"
+ hOpenContextMenu
+ NumberOfEntries = MenuGetItemCount
+ endcatch
+ if (NumberOfEntries = 0) then
+ Warnlog " the Context-Menu doesnt contain any entries, or were not up. Test ends."
+ Goto Endsub
+ endif
+ if NumberOfEntries <> 6 then
+ warnlog " Expected six entries in this Menu, but found " + NumberOfEntries
+ else
+ printlog " Number of Entries was: " + NumberOfEntries
+ endif
+ '/// Check that every position contains the expected Undermenu. ("Screen": Black/White. and "End Slideshow") ///'
+ '/// And check that Menu-Item one opens an undermenu. ///'
+ Printlog " We open number four: " + MenuGetItemText(MenuGetItemID(4))
+ hMenuSelectNr (3)
+ sleep 2
+ NumberOfEntries = MenuGetItemCount
+ printlog " Menu-entries: " + MenuGetItemCount
+ if (NumberOfEntries <> 2) then
+ Warnlog " the first Context-Menu-entry was NOT 'Screen'."
+ else
+ Printlog " We open the next number one: " + MenuGetItemText(MenuGetItemID(1))
+ hMenuSelectNr (1)
+ endif
+ DocumentPresentation.MouseDown 50, 50, 3
+ DocumentPresentation.MouseUp 50, 50, 3
+ hMenuSelectNr (3) 'Open the Screen -menu.
+ sleep 2
+ Printlog " We open number two: " + MenuGetItemText(MenuGetItemID(MenuGetItemCount))
+ hMenuSelectNr (2) 'Choose "White"
+ sleep 2
+
+ 'TODO - Due to existing bug, function not yet available.
+ '/// Change to slideshow-ending. Check that the Context-Menu also comes up here. ///'
+ 'DocumentPresentation.
+ hTypeKeys "<SPACE>"
+ Kontext "DocumentPresentation"
+ DocumentPresentation.MouseDown 50, 50, 3
+ DocumentPresentation.MouseUp 50, 50, 3
+ sleep 2
+ NumberOfEntries = 0
+ NumberOfEntries = MenuGetItemCount
+ if NumberOfEntries <> 0 then
+ printlog " Menu-entries: " + MenuGetItemCount
+ else
+ warnlog " No context-menu at Slideshow-endpage."
+ DocumentPresentation.TypeKeys "<ESCAPE>"
+ endif
+
+ '/// And that one can go back. ///'
+ hMenuSelectNr (2) 'Open the Goto Slide -menu.
+ sleep 2
+ Printlog " We open number one (should be 'Goto First Slide'): " + MenuGetItemText(MenuGetItemID(1))
+ hMenuSelectNr (2) 'Choose "Back" 'TODO ;: but now we just end the slideshow
+ sleep 2
+
+ Kontext "DocumentPresentation"
+ DocumentPresentation.TypeKeys "<ESCAPE>"
+ DocumentPresentation.TypeKeys "<ESCAPE>"
+ Kontext "DocumentImpress"
+
+ '/// Start the Slideshow. ///'
+ hTypeKeys "<F5>"
+ '/// Check that the right mousebutton brings up the Context-Menu. ///'
+ Kontext "DocumentPresentation"
+ DocumentPresentation.MouseDown 50, 50, 3
+ DocumentPresentation.MouseUp 50, 50, 3
+ sleep 2
+
+ '/// Check that Menu-Item (three) really finishes the presentation. ///'
+ Printlog " We open the last entry (End Show): " + MenuGetItemText(MenuGetItemID(MenuGetItemCount))
+ hMenuSelectNr (4)'MenuGetItemCount) 'End Slideshow
+ sleep 4
+ if DocumentPresentation.Exists then
+ Warnlog "either wrong position for 'End Slideshow', or the command didnt work."
+ Kontext "DocumentPresentation"
+ DocumentPresentation.MouseDown 50, 50, 3
+ DocumentPresentation.MouseUp 50, 50, 3
+ sleep 2
+ Printlog " We open the last entry (End Show): " + MenuGetItemText(MenuGetItemID(MenuGetItemCount))
+ hMenuSelectNr (4)'MenuGetItemCount) 'End Slideshow
+ else
+ printlog "The presentation was closed, good."
+ endif
+
+ '/// Check that one can step one step forward, even if there is no more than one slide. ///'
+ '/// Start the Slideshow. ///'
+ hTypeKeys "<F5>"
+ sleep (3)
+ '/// Check that the right mousebutton brings up the Context-Menu. ///'
+ Kontext "DocumentPresentation"
+ DocumentPresentation.MouseDown 50, 50, 3
+ DocumentPresentation.MouseUp 50, 50, 3
+ sleep 2
+
+ hMenuSelectNr (2) 'Open the Goto Slide -menu.
+
+ '/// Select the 'one step forward' -entry ///'
+ hMenuSelectNr (1)
+
+ '/// Check that we're on the last slide ///'
+ Kontext "DocumentPresentation"
+ DocumentPresentation.MouseDown 50, 50, 3
+ DocumentPresentation.MouseUp 50, 50, 3
+ sleep 2
+
+ hMenuSelectNr (2) 'Open the Goto Slide -menu.
+ if MenuIsItemEnabled (MenugetItemID(4)) then
+ printlog "Jumped to the right slide"
+ else
+ warnlog "possibly the 'jump to slide' -menu didnt quite work"
+ endif
+
+ '/// Close the Context-Menu ///'
+ hMenuSelectNr (0)
+ Kontext "DocumentPresentation"
+
+ '/// Check if the context-menu also comes up at the very last page (slideshow-ending) ///'
+ DocumentPresentation.TypeKeys "<SPACE>"
+ sleep 1
+ Kontext "DocumentPresentation"
+ DocumentPresentation.MouseDown 50, 50, 3
+ DocumentPresentation.MouseUp 50, 50, 3
+ sleep 2
+
+ if MenuGetItemText (MenuGetItemID(1)) <> "" then
+ Printlog "Context-menu came up at the last page: correct."
+ else
+ Warnlog "Context-menu did NOT come up correctly at the last page: false."
+ endif
+
+ '/// Check if we from here, via the context menu, can go back to the first page ///'
+ hMenuSelectNr (2) 'Open the Goto Slide -menu.
+ sleep 1
+ hMenuSelectNr (1) 'First Slide
+
+ '/// Check that we're on the first slide ///'
+ Kontext "DocumentPresentation"
+ DocumentPresentation.MouseDown 50, 50, 3
+ DocumentPresentation.MouseUp 50, 50, 3
+ sleep 2
+
+ hMenuSelectNr (2) 'Open the Goto Slide -menu.
+ if MenuIsItemEnabled (MenugetItemID(3)) then
+ printlog "Jumped to the right slide"
+ else
+ warnlog "possibly the 'jump to slide' -menu didnt quite work from the last slide"
+ endif
+
+ '/// Close the Context-Menu ///'
+ MenuSelect (0)
+ '/// Close the Presentation ///'
+ hTypeKeys "<ESCAPE>"
+ '/// Close Document ///'
+ Call hCloseDocument
+endcase 'tSlideshowContextMenuMoreSlides
+
+'****************************************************************************************************
+
+testcase tiMousePointerHides
+ qaerrorlog "Test not yet ready."
+ goto endsub
+ dim i as Integer
+ Printlog "- ContextMenu in Slideshow"
+ '/// New Impress Document ///'
+ Call hNewDocument
+
+ '/// Start the Slideshow. ///'
+ hTypeKeys "<F5>"
+ sleep 1
+ i = 0
+ while ((getMouseStyle = 0) AND (i<20))
+ sleep 1
+ inc (i)
+ printlog getMouseStyle
+ if (getMouseStyle <> 0) then i = 20
+ wend
+ if (getMouseStyle <> 0) then
+ printlog "Mousepointer disappeared like it should have"
+ else
+ warnlog "the mousepointer was still visible, after 20 seconds."
+ endif
+
+ hTypeKeys "<ESCAPE>"
+ hTypeKeys "<ESCAPE>"
+
+ '/// Close Document ///'
+ Call hCloseDocument
+endcase 'tSlideshowContextMenuMoreSlides
+
+'****************************************************************************************************
+
diff --git a/testautomation/graphics/optional/includes/impress/i_stylist.inc b/testautomation/graphics/optional/includes/impress/i_stylist.inc
new file mode 100644
index 000000000000..7efe28089365
--- /dev/null
+++ b/testautomation/graphics/optional/includes/impress/i_stylist.inc
@@ -0,0 +1,157 @@
+'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
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* Owner : wolfram.garten@oracle.com
+'*
+'* short description :
+'*
+'*******************************************************************
+'*
+' #1 tFormatStylistBackground
+' #1 fGetSetPageBackground
+'*
+'\*******************************************************************
+
+testcase tFormatStylistBackground
+'/// special test for BUG # 96364 "Background style looses functionality over PPT Ex/import" ///'
+ dim sFilter (50) as string
+ dim sFileList (30) as string
+ dim i as integer
+ dim x as integer
+ dim y as integer
+ dim iColor as integer
+ dim sFileName as string
+ dim Exlist(20) as string
+
+ sFilter (0) = 0
+
+ if bAsianLan then
+ QaErrorLog "This testcase does not support Asian languages. Test ends."
+ goto endsub
+ end if
+
+ if (glLocale(5) = "") then
+ qaErrorLog("Language dependant string 'Background' is missing; get it from the stylist and insert it into the locale-file mentioned in the .bas file!")
+ goto endsub
+ endif
+
+ '/// if not exists : gOfficePath + '\\user\\impress\\optional\\', create it ///'
+ if app.dir (ConvertPath ( gOfficePath + "user/work/impress") ) = "" then
+ app.mkdir ConvertPath ( gOfficePath + "user/work/impress")
+ endif
+ if app.dir (ConvertPath ( gOfficePath + "user/work/impress/optional")) = "" then
+ app.mkdir ConvertPath ( gOfficePath + "user/work/impress/optional")
+ endif
+
+ '/// open application ///'
+ Call hNewDocument
+
+ iColor = 10
+ '/// change background color via stylist ///'
+ if (iColor <> fGetSetPageBackground (iColor,0)) then
+ warnlog "Stylist background was not changed as expected :-( "+iColor
+ endif
+ '/// check if it is the same in Format -> Page ///'
+ if fGetSetPageBackground (0,1) <> iColor then
+ warnlog " First stage error! Difference between stylist and menu entry :-( "+iColor
+ endif
+
+ '/// save this in 3 formats: ///'
+ '///+ - StarImpress 5.0 ///'
+ '///+ - StarOffice 6.0 Presentation ///'
+ '///+ - Microsoft PowerPoint 97/2000/XP ///'
+ FileSaveAs
+ sleep 2
+ Kontext "SpeichernDlg"
+ for i = 0 to 2
+ if i=0 then x = Dateityp.GetItemCount
+ if (i) then ' set border, whenm start from beginning/end
+ y = ((i-1)*2)+1 ' set filter from beginning
+ else
+ y = x-3 ' set filter from end
+ endif
+ ListAppend(sFilter(), Dateityp.GetItemText (y))
+ next i
+ SpeichernDlg.Cancel
+
+ sFileName = convertpath( gOfficePath + "user/work/impress/optional")
+ GetFileList ( sFileName, "isty_*.*", Exlist() )
+ KillFileList ( Exlist() )
+
+ for i = 1 to (ListCount(sFilter()))
+ sleep 1
+ printlog "Going to save: '"+sFileName+"isty_"+(i)+"'..."
+ sleep 1
+ hFileSaveAsWithFilterKill (sFileName+"isty_"+(i), "impress8" )
+ printlog " saved with filter ("+i+"/3): "+ sFilter(i)
+ next i
+
+ '/// close impress ///'
+ FileClose
+ sleep 1
+ kontext ' active about information loss ?
+ if active.exists (5) then active.yes
+ sleep 10
+
+ '/// open just saved files ///'
+ sFileName = ConvertPath ( gOfficePath + "user/work/impress/optional/" )
+ GetFileList ( sFileName, "isty_*", sFileList() )
+
+ x = ListCount ( sFileList() )
+ for i = 1 to x
+ printlog "("+i+"/"+x+"): "+sFileList(i)
+ hFileOpen ( sFileList(i) )
+ Sleep 5
+ If hIsNamedDocLoaded (sFileList(i)) Then
+ printlog " used filter: " + hGetUsedFilter()
+ else
+ warnlog "document didn't get loaded"
+ endif
+ sleep 5
+ '/// check if stylist, menue and prediction are as expected ///'
+ iColor = 10
+ if ((fGetSetPageBackground (0,0) <> iColor) OR (fGetSetPageBackground (0,1) <> iColor)) then
+ warnlog "Background was not as expected on loading :-( "+iColor
+ endif
+ iColor = 20
+ '/// change background in stylist ///'
+ if (fGetSetPageBackground (iColor,0) <> iColor) then
+ warnlog "Stylist background was not changed as expected :-( "+iColor
+ endif
+ sleep 1
+ '/// check if background is same in format menu ///'
+ if (fGetSetPageBackground (0,1) <> iColor) then
+ warnlog "Format menu background is wrong :-( "+iColor
+ endif
+
+ hCloseDocument
+ sleep 2
+ next i
+endcase
+
+'------------------------------------------------------------------------------
+
diff --git a/testautomation/graphics/optional/includes/impress/i_us2_present.inc b/testautomation/graphics/optional/includes/impress/i_us2_present.inc
new file mode 100644
index 000000000000..eeeeb5effb6b
--- /dev/null
+++ b/testautomation/graphics/optional/includes/impress/i_us2_present.inc
@@ -0,0 +1,332 @@
+'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
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/**************************************************************************
+'*
+'* Owner : wolfram.garten@oracle.com
+'*
+'* short description : Impress User-Scenario: Beginner makes presentation.
+'*
+'\**************************************************************************
+
+testcase i_us2_pres1
+
+ dim Result1, Result2 as integer
+ dim iPictures as integer
+ dim PresentationFile1 as string
+ PresentationFile1 = (ConvertPath (gOfficePath + "user\work\PwrPres1.odp"))
+ kontext "DocumentImpress"
+ printlog "New - Wizard - Presentation."
+ FileAutopilotPresentation
+ printlog "Called File-Autopilot-Presentation."
+ printlog "Create from Template"
+ kontext "AutoPilotPraesentation1"
+ FromTemplate.Check
+ 'This part is for language-indepencancy
+ if gOOO = TRUE then
+ TemplateRegion.Select (1)
+ printlog "Choose a Presentation"
+ TemplateList.Select (2)
+ else
+ TemplateRegion.Select (1)
+ if TemplateList.GetItemCount < 40 then
+ TemplateRegion.Select (2)
+ if TemplateList.GetItemCount < 40 then
+ TemplateRegion.Select (3)
+ if TemplateList.GetItemCount < 40 then
+ Warnlog " No Templates selectable in the wizard. Please check."
+ goto endsub
+ endif
+ endif
+ endif
+ printlog "Choose a Presentation"
+ TemplateList.Select (4)
+ endif
+ printlog "Next"
+ Nextbutton.Click
+ sleep (1)
+ Backbutton.Click
+ sleep (1)
+ Nextbutton.Click
+
+ printlog " Switched to the second Wizard-page."
+ sleep (1)
+ printlog "Presentations"
+ kontext "AutoPilotPraesentation2"
+ printlog "Output: Screen"
+ if gOOO = TRUE then 'OpenOffice.org
+ Background.Select (2)
+ if Backgroundchoice.GetItemCount < 2 then
+ Background.Select (1)
+ if Backgroundchoice.GetItemCount = 0 then
+ Warnlog " No Backgrounds selectable in the wizard. Please check."
+ goto endsub
+ endif
+ endif
+ Backgroundchoice.Select (2)
+ else 'StarOffice
+ Background.Select (3)
+ if Backgroundchoice.GetItemCount < 10 then
+ Background.Select (2)
+ if Backgroundchoice.GetItemCount < 10 then
+ Background.Select (3)
+ if Backgroundchoice.GetItemCount < 10 then
+ Warnlog " No Backgrounds selectable in the wizard. Please check."
+ goto endsub
+ endif
+ endif
+ endif
+ Backgroundchoice.Select (5)
+ endif
+ Screen.Check
+ printlog "Next"
+ Nextbutton.Click
+
+ printlog " Switched to the third Wizard-page."
+ sleep (1)
+ kontext "AutoPilotPraesentation3"
+ printlog "Random Effect. Random Speed. Click through every choice."
+ Effect.Select (15)
+ Speed.Select (3)
+ WaitSlot (5000)
+ Automatic.Check
+ Timebutton.SetText "00:00:15"
+ Break.SetText "00:00:20"
+ Logo.Check
+ printlog "Next"
+ Nextbutton.Click
+
+ printlog " Switched to the fourth Wizard-page."
+ sleep (1)
+ kontext "AutoPilotPraesentation4"
+ printlog "Fill in some company-name-subject-text"
+ AddName.SetText "Lala1"
+ AddTopic.SetText "Lala2"
+ Askinformation.SetText "Lala3"
+ printlog "Next"
+ Nextbutton.Click
+ printlog " Switched to the fifth Wizard-page."
+ sleep (1)
+ kontext "AutoPilotPraesentation5"
+ Summary.Check
+ printlog "Create"
+ WaitSlot (2000)
+ AutoPilotPraesentation5.OK
+
+ sleep (1)
+ printlog " Pressed 'Create'."
+ printlog "Add a Slide via Insert - Slide."
+ Kontext "DocumentImpress"
+ hTypeKeys "What we will talk about"
+ gMouseClick 1,1
+ Kontext "DocumentImpress"
+ DocumentImpress.UseMenu
+ hMenuSelectNr (4)
+ hMenuSelectNr (1)
+ call sSelectEmptyLayout
+ sleep (1)
+
+ kontext "Slides"
+ SlidesControl.TypeKeys "<HOME><RETURN>"
+ kontext "DocumentImpress"
+ DocumentImpress.TypeKeys "<TAB>Text we just wrote..."
+ printlog "Switch to the second slide."
+ kontext "Slides"
+ SlidesControl.TypeKeys "<DOWN><RETURN>"
+ SlidesControl.TypeKeys "<RETURN>"
+ kontext "DocumentImpress"
+ printlog "Insert three lines with text, all with different formatting."
+ call hTextrahmenErstellen ("First line with text",20,50,70,50)
+ call hTextrahmenErstellen ("Second line with text",20,60,70,60)
+ call hTextrahmenErstellen ("Third line with text",20,70,70,70)
+ printlog "Go down to the eleventh slide."
+ kontext "Slides"
+ SlidesControl.TypeKeys "<HOME>"
+ SlidesControl.TypeKeys "<PAGEDOWN>", 10
+ SlidesControl.TypeKeys "<RETURN>"
+ printlog "Insert Smiley, + two circles around the eyes, + two new pupils,"
+ printlog "placed at some interesteing place inside the circles."
+ Kontext "Toolbar"
+ SymbolShapes.TearOff
+ sleep (1)
+ kontext "SymbolShapes"
+ SymbolShapesSmiley.Click
+ sleep (1)
+ kontext "DrawingObjectbar"
+ AreaFilling.TypeKeys "<HOME>"
+ AreaFilling.TypeKeys "<DOWN>", 10
+ printlog "Select (11) 'Lime-Green"
+ AreaFilling.TypeKeys "<RETURN>"
+ sleep (1)
+ gMouseMove (53,50,90,80)
+ Kontext "Toolbar"
+ Ellipsen.Click
+ kontext "SymbolShapes"
+ SymbolShapes.Close
+ Kontext "DocumentImpress"
+ gMouseMove (60,43,70,65)
+ hTypeKeys "<Escape>"
+ Kontext "Toolbar"
+ Ellipsen.Click
+ gMouseMove (65,57,69,63)
+ hTypeKeys "<Escape>"
+ Kontext "Toolbar"
+ Ellipsen.Click
+ gMouseMove (70,50,82,65)
+ hTypeKeys "<Escape>"
+ Kontext "Toolbar"
+ Ellipsen.Click
+ gMouseMove (77,57,80,63)
+ hTypeKeys "<Escape>"
+ sleep (1)
+
+ printlog "Insert new slide."
+ kontext "Slides"
+ printlog "get to the last slide."
+ SlidesControl.TypeKeys "<PAGEDOWN>", 15
+ SlidesControl.TypeKeys "<RETURN>"
+ printlog "Delete the two fields the stylist has."
+ kontext "DocumentImpress"
+ gMouseClick 1,1
+ EditSelectAll
+ DocumentImpress.TypeKeys "<DELETE>"
+ printlog "Insert-Picture-From File. (some crazy picture which fits the theme)"
+ InsertGraphicsFromFile
+ Kontext "GrafikEinfuegenDlg"
+ printlog "Open graphic"
+ Dateiname.SetText ConvertPath (gTesttoolPath + "global\input\graf_inp\ball.eps")
+ Oeffnen.Click
+ gMouseClick 1,1
+ printlog "Add a text above the picture. 'There is movement..."
+ call hTextrahmenErstellen ("There is movement...",20,20,70,30)
+
+ printlog "Add a new slide."
+ InsertSlide
+ printlog " Inserted new slide."
+ kontext "DocumentImpress"
+ printlog "Bla bla about everything..."
+ call hTextrahmenErstellen ("Bla bla about everything...",20,20,70,30)
+
+ printlog "Add a new slide."
+ InsertSlide
+ printlog " Inserted new slide."
+ kontext "DocumentImpress"
+ printlog "Write text: Q & A"
+ call hTextrahmenErstellen ("Q & A",20,20,70,30)
+ DocumentImpress.TypeKeys "<SHIFT HOME>"
+ sleep (1)
+
+ printlog "Add a new slide."
+ InsertSlide
+ kontext "DocumentImpress"
+
+ printlog "Thanks for listening, time for coffee... (ending)"
+ call hTextrahmenErstellen ("Class dismissed...",20,20,70,30)
+
+ printlog "Save Document"
+ call hFileSaveAsKill (PresentationFile1)
+ printlog "OK saved at ", PresentationFile1
+ sleep (1)
+
+ printlog "Close Document"
+ Call hCloseDocument
+endcase 'i_us2_pres1
+
+'------------------------------------------------------------------------------
+
+testcase i_us2_pres2
+ qaerrorlog "not yet ready."
+ goto endsub
+ dim Result1, Result2 as integer
+ dim iPictures as integer
+ dim PresentationFile1, PresentationFile2, PresentationFileToBeLoaded as string
+ PresentationFile1 = (ConvertPath (gTesttoolPath + "graphics\required\input\rightfont.odp"))
+ PresentationFile2 = (ConvertPath (gOfficePath + "user\work\xxxxxx9.odp"))
+ kontext "DocumentImpress"
+ printlog "New - Wizard - Presentation"
+ FileAutopilotPresentation
+ printlog " Called File-Autopilot-Presentation."
+ printlog "Create from Template"
+ kontext "AutoPilotPraesentation1"
+ EmptyPresentation.Check
+ AutoPilotPraesentation1.TypeKeys "<DOWN>"
+ sleep (3)
+ AutoPilotPraesentation1.TypeKeys "<DOWN>"
+ if Existingpresentation.IsChecked(5) then
+ printlog " Pressing down worked fine"
+ else
+ warnlog " Pressing down didnt work as expected."
+ endif
+ printlog "Click the Open-button"
+ ExistingOpen.Click
+ printlog "Check if the Open-dialogue is there"
+ kontext "GeneralFileDialog"
+ if GeneralFileDialog.Exists(10) = FALSE then
+ warnlog " Open-file-dialogue didnt show up."
+ else
+ GeneralFileDialog.Cancel
+ endif
+ sleep (3)
+ kontext "AutoPilotPraesentation1"
+ AutoPilotPraesentation1.TypeKeys "<SHIFT TAB>"
+ AutoPilotPraesentation1.TypeKeys "<UP>"
+ AutoPilotPraesentation1.TypeKeys "<DOWN>"
+ AutoPilotPraesentation1.TypeKeys "<TAB><TAB>"
+ sleep (1)
+ Existinglist.TypeKeys "<HOME>"
+ sleep (1)
+ Existinglist.TypeKeys "<DOWN>"
+ sleep (3)
+ if Existinglist.GetSelText = "" then
+ Warnlog " No entries in the recently-opened-files-list. Check if it's correct."
+ else
+ PresentationFileToBeLoaded = Existinglist.GetSelText
+ AutoPilotPraesentation1.OK
+ endif
+
+ kontext "DocumentImpress"
+ if DocumentImpress.Exists(10) = FALSE then
+ if DocumentImpress.StatusIsProgress = FALSE then
+ sleep (10)
+ if DocumentImpress.StatusIsProgress then
+ warnlog " Took over 20 seconds to load the document Document: " + PresentationFileToBeLoaded + ". Stalled?"
+ endif
+ goto endsub
+ endif
+ else
+ printlog " Document " + PresentationFileToBeLoaded + " seemed to have been loaded correctly."
+ endif
+ sleep (3)
+ if DocumentImpress.StatusIsProgress then
+ sleep (5)
+ endif
+ printlog "Save Document"
+ call hFileSaveAsKill (PresentationFile2)
+ printlog "OK saved at ", PresentationFile2
+ sleep (1)
+
+ printlog "Close Document"
+ Call hCloseDocument
+endcase 'i_us2_pres2
diff --git a/testautomation/graphics/optional/includes/impress/i_us_present.inc b/testautomation/graphics/optional/includes/impress/i_us_present.inc
new file mode 100644
index 000000000000..ee0019586d14
--- /dev/null
+++ b/testautomation/graphics/optional/includes/impress/i_us_present.inc
@@ -0,0 +1,694 @@
+'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
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/**************************************************************************
+'*
+'* Owner : wolfram.garten@oracle.com
+'*
+'* short description : Include-file for impress User-Scenario: Presentation.
+'*
+'\********************************************************************
+
+testcase i_us_presentation1
+
+ dim iPictures as integer
+ dim PresentationFile1 as string
+
+ PresentationFile1 = ConvertPath( gOfficePath + "user\work\PowerPes1.odp" )
+
+ printlog "New impress document"
+ Call hNewDocument
+ Call sSelectEmptyLayout
+ WaitSlot (2000)
+ kontext "DocumentImpress"
+
+ printlog "Add second Master-Page "
+ ViewMasterPage
+ kontext "Slides"
+ SlidesControl.OpenContextMenu(true)
+ sleep (2)
+ printlog "New master"
+ MenuSelect(MenuGetItemID(1))
+ sleep (1)
+ printlog "Inserted second Master-Slide"
+
+
+ printlog "set background to picture(Gallery)"
+ Kontext "Gallery"
+ if Gallery.Exists(2) then
+ warnlog "The Gallery was already visible. Check earlier ran tests for inconsistency."
+ sleep (2)
+ else
+ ToolsGallery
+ WaitSlot (2000)
+ end if
+
+ if gOOO = TRUE then 'OpenOffice.org
+ select case iSprache
+ case 01 : iPictures = 1 'English
+ case else : iPictures = 1 'Unknown
+ warnlog "Please insert the entrienumbers for 'Backgrounds'. Language: " + iSprache
+ end select
+
+ else ' StarOffice...
+ select case iSprache
+ case 01 : iPictures = 21 'English
+ case 07 : iPictures = 28 'Russian
+ case 31 : iPictures = 04 'Netherlands
+ case 33 : iPictures = 22 'French
+ case 34 : iPictures = 12 'Spanish
+ case 36 : iPictures = 17 'Hungaria
+ case 39 : iPictures = 23 'Italian
+ case 46 : iPictures = 09 'Swedish
+ case 48 : iPictures = 20 'Polish
+ case 49 : iPictures = 11 'German
+ case 55 : iPictures = 16 'Portuguese
+ case 81 : iPictures = 22 'Japanese
+ case 82 : iPictures = 04 'Korean
+ case 86 : iPictures = 06 'Simplified
+ case 88 : iPictures = 17 'Traditional
+ case else : iPictures = 21 'Unknown
+ warnlog "Please insert the entrienumbers for 'Backgrounds'. Language: " + iSprache
+ end select
+ end if
+
+ kontext "Gallery"
+ Gallerys.Select (iPictures)
+ View.TypeKeys "<HOME><RIGHT><RIGHT>"
+ printlog "OpenContextMenu"
+ View.TypeKeys "<SHIFT F10>"
+ sleep (2)
+ MenuSelect(MenuGetItemID(1))
+ sleep (2)
+ MenuSelect(MenuGetItemID(1))
+ sleep (2)
+ printlog "Check that we really got a copy of the object"
+ kontext "DocumentImpress"
+ DocumentImpress.OpenContextMenu(true)
+ sleep (2)
+ MenuSelect 27353
+ sleep (2)
+ Kontext "ExportierenDlg"
+ if ExportierenDlg.IsVisible(5) then
+ printlog "Gallery-object correctly copied into Slide."
+ ExportierenDlg.Close
+ WaitSlot (2000)
+ end if
+ kontext "GraphicObjectbar"
+ if GraphicObjectbar.Exists(5) = FALSE then
+ kontext "DocumentImpress"
+ ViewToolbarsPicture
+ end if
+
+ kontext "Gallery"
+ Gallerys.Select (iPictures)
+ printlog " 50% Transparency"
+ WaitSlot (2000)
+ kontext "GraphicObjectbar"
+ Transparenz.SetText "50"
+ sleep (1)
+ printlog "Mosaic 16px x 16px"
+ Filter.TearOff
+ sleep (1)
+ kontext "GraphicFilterBar"
+ Mosaic.Click
+ WaitSlot (2000)
+ kontext "Mosaic"
+ Width.SetText "16"
+ Height.SetText "16"
+ Mosaic.OK
+
+ kontext "GraphicFilterBar"
+ Mosaic.Click
+ kontext "Mosaic"
+ if ( Mosaic.exists( 2 ) ) then
+ Width.SetText "16"
+ Height.SetText "16"
+ Mosaic.OK
+ else
+ warnlog( "Dialog <Mosaic> did not open" )
+ endif
+ kontext "GraphicFilterBar"
+ GraphicFilterBar.Close
+ ToolsGallery
+ WaitSlot (1000)
+ kontext "DocumentImpress"
+ gMouseClick 50,50
+ sleep (1)
+ FormatPositionAndSize
+
+ kontext
+ if ( Active.exists( 2 ) ) then
+ active.setPage(TabPositionAndSize)
+ kontext "TabPositionAndSize"
+ Width.SetText "15"
+ Height.SetText "11"
+ SizePosition.TypeKeys "<RIGHT><DOWN>"
+ TabPositionAndSize.OK
+ else
+ warnlog( "Page <TabPositionAndSize> did not open" )
+ endif
+
+ printlog "Close Master"
+ hUseAsyncSlot( "ViewNormal" )
+
+ printlog "Save Document"
+ call hFileSaveAsKill (PresentationFile1)
+
+ ActiveDeactivateCTLSupport (FALSE)
+
+ printlog "Close Document"
+ hFileCloseAll()
+
+endcase 'i_us_presentation1
+
+'-------------------------------------------------------------------------------
+
+testcase i_us_presentation2
+
+ dim PresentationFile1 as string
+ dim PresentationFile2 as string
+
+ PresentationFile1 = ConvertPath( gOfficePath + "user\work\PowerPes1.odp" )
+ PresentationFile2 = ConvertPath( gOfficePath + "user\work\PowerPes2.odp" )
+
+ if ( FileExists( PresentationFile1 ) ) then 'if file exists...
+ hFileOpen (PresentationFile1)
+ else
+ warnlog " This test is supposed to run after the previous testcase has been run. Notify the Automatic-tester."
+ goto endsub
+ end if
+ sleep (2)
+ printlog "New Slide"
+ kontext "slides"
+ SlidesControl.TypeKeys( "<PAGEDOWN>", 3 )
+ SlidesControl.TypeKeys "<SHIFT F10>" 'OpenContextMenu(true)
+ sleep (1)
+
+ MenuSelect(MenuGetItemID(1)) 'New Slide 'No 2
+ printlog " Inserted second normal Slide"
+ call sSelectEmptyLayout
+ printlog "2. Layouts: Text. Bild: Gallery: Animation - Gif"
+ Kontext "Tasks"
+ printlog "to get to the very first position"
+ LayoutsPreview.TypeKeys "<HOME>"
+ printlog "'to get to the right position"
+ LayoutsPreview.TypeKeys "<RIGHT>", 9
+ LayoutsPreview.TypeKeys "<RETURN>"
+
+ hUseAsyncSlot( "ViewNormal" )
+
+ printlog "3. Hide Slidepane (Oops! The user were too fast: accidently hide the pane)"
+ kontext "Slides"
+ SlidesControl.FadeOut
+ WaitSlot (1000)
+
+ printlog "4. Restore Pane."
+ SlidesControl.FadeIn
+
+ printlog " Did the 'mistake' to FadeIn/Out the Slidepane"
+
+InsertGraphicsFromFile
+Kontext "GrafikEinfuegenDlg"
+if GrafikEinfuegenDlg.exists(5) then
+printlog " The Insertgraphics-dialogue showed up correctly."
+sleep (5)
+else
+warnlog " The Insertgraphics-dialogue didn't show up."
+endif
+
+ printlog "Graphics-Import-dialogue. Select i_us_large.jpg"
+ Kontext "GrafikEinfuegenDlg"
+ if ( GrafikEinfuegenDlg.exists( 2 ) ) then
+
+ Dateiname.SetText ConvertPath (gTesttoolPath + "graphics\required\input\i_us_large.jpg")
+ Oeffnen.Click
+
+ Kontext "DocumentImpress"
+ printlog "Deselect graphic"
+ DocumentImpress.MouseDoubleClick 90,90
+ printlog " Inserted Graphic into the second Slide"
+
+ printlog "Change text on the two text-boxes"
+ DocumentImpress.TypeKeys "<TAB>" 'First text.
+ DocumentImpress.TypeKeys "<RETURN>" 'To get into edit-mode.
+ DocumentImpress.TypeKeys "The World has just become a bit easier"
+ DocumentImpress.TypeKeys "<ESCAPE><ESCAPE>"
+ DocumentImpress.TypeKeys "<TAB><TAB><TAB>"
+ DocumentImpress.TypeKeys "<RETURN>"
+ DocumentImpress.TypeKeys "100% Recyclable"
+ DocumentImpress.TypeKeys "<RETURN>"
+ DocumentImpress.TypeKeys "Very durable"
+ DocumentImpress.TypeKeys "<RETURN>"
+ DocumentImpress.TypeKeys "Priced lower than its predecessor!"
+ DocumentImpress.TypeKeys "<RETURN>"
+ DocumentImpress.TypeKeys "Sexy"
+ DocumentImpress.TypeKeys "<RETURN>"
+ DocumentImpress.TypeKeys "Energy-efficient"
+ DocumentImpress.TypeKeys "<ESCAPE><ESCAPE>"
+ else
+ warnlog( "Failed to open <Insert Graphics> dialog" )
+ endif
+
+ printlog "Save Document"
+ call hFileSaveAsKill (PresentationFile2)
+
+ ActiveDeactivateCTLSupport (FALSE)
+
+ printlog "Close Document"
+ hFileCloseAll()
+
+endcase 'i_us_presentation2
+
+'-------------------------------------------------------------------------------
+
+testcase i_us_presentation3
+
+ dim PresentationFile2 as string
+ dim PresentationFile3 as string
+
+ PresentationFile2 = ConvertPath( gOfficePath + "user\work\PowerPes2.odp" )
+ PresentationFile3 = ConvertPath( gOfficePath + "user\work\PowerPes3.odp" )
+
+ if ( FileExists( PresentationFile2 ) ) then 'if file exists...
+ hFileOpen( PresentationFile2 )
+ else
+ warnlog " This test is supposed to run after the previous testcase has been run. Notify the Automatic-tester."
+ goto endsub
+ end if
+
+ printlog "Insert New Slide"
+ kontext "slides"
+ SlidesControl.TypeKeys( "<PAGEDOWN>", 3 )
+
+ kontext "DocumentImpress"
+ InsertSlide 'No 3
+
+ printlog "5. Layout. Clip/Text"
+ kontext "Tasks"
+ LayoutsPreview.TypeKeys "<HOME>" 'to get to the very first position
+ LayoutsPreview.TypeKeys "<RIGHT>", 4 'to get to the right position
+ LayoutsPreview.TypeKeys "<RETURN>"
+
+ hUseAsyncSlot( "ViewNormal" )
+
+ kontext "DocumentImpress"
+ Call gMouseClick 50,50
+ DocumentImpress.TypeKeys "<TAB><RETURN>"
+ DocumentImpress.TypeKeys "A new form"
+
+ printlog "6. (Fat picture) InsertPictureFromFile: (empty slide) (ev size-fit)"
+ printlog "insert graphic file (i_us_large.jpg)"
+ InsertGraphicsFromFile
+ WaitSlot (1000)
+ Kontext "GrafikEinfuegenDlg"
+ Dateiname.SetText ConvertPath (gTesttoolPath + "graphics\required\input\i_us_large.jpg")
+ sleep (2)
+ Oeffnen.Click
+ WaitSlot (2000)
+ Kontext "DocumentImpress"
+
+ printlog "The user corrects the picture"
+ DocumentImpress.MouseDown 50,50
+ DocumentImpress.MouseUp 50,50
+ DocumentImpress.TypeKeys "<DOWN>", 30
+
+ printlog "Deselect graphic"
+ DocumentImpress.MouseDoubleClick 90,90
+
+ printlog " Wrote Text, Inserted Graphic, and moved it in the third Slide"
+
+ printlog "Save Document"
+ call hFileSaveAsKill (PresentationFile3)
+
+ ActiveDeactivateCTLSupport (FALSE)
+
+ printlog "Close Document"
+ hFileCloseAll()
+
+endcase 'i_us_presentation3
+
+'-------------------------------------------------------------------------------
+
+testcase i_us_presentation4
+
+ dim PresentationFile3 as string
+ dim PresentationFile4 as string
+ dim iAnimations as Integer
+ dim iSize as integer
+
+ PresentationFile3 = ConvertPath( gOfficePath + "user\work\PowerPes3.odp" )
+ PresentationFile4 = ConvertPath( gOfficePath + "user\work\PowerPes4.odp" )
+
+ select case iSprache
+ case 01 : iAnimations = 01 'English
+ case 07 : iAnimations = 01 'Russian
+ case 31 : iAnimations = 03 'Netherlands
+ case 33 : iAnimations = 01 'French
+ case 34 : iAnimations = 01 'Spanish
+ case 36 : iAnimations = 01 'Hungaria
+ case 39 : iAnimations = 01 'Italian
+ case 46 : iAnimations = 01 'Swedish
+ case 48 : iAnimations = 01 'Polish
+ case 49 : iAnimations = 01 'German
+ case 55 : iAnimations = 01 'Portuguese
+ case 81 : iAnimations = 02 'Japanese
+ case 82 : iAnimations = 17 'Korean
+ case 86 : iAnimations = 07 'Simplified
+ case 88 : iAnimations = 15 'Traditional
+ case else : iAnimations = 01 'Unknown
+ warnlog "Please insert the entrienumbers for 'Backgrounds'. Language: " + iSprache
+ end select
+
+ if ( FileExists( PresentationFile3 ) ) then 'if file exists...
+ hFileOpen( PresentationFile3 )
+ else
+ warnlog " This test is supposed to run after the previous testcase has been run. Notify the Automatic-tester."
+ goto endsub
+ end if
+
+ kontext "slides"
+ SlidesControl.TypeKeys( "<PAGEDOWN>", 5 )
+
+ kontext "DocumentImpress"
+ printlog "insert slide no 4"
+ hUseAsyncSlot( "InsertSlide" )
+
+ printlog "Background: picture (Gallery)"
+ Kontext "Gallery"
+ if ( Not Gallery.Exists() ) then
+ ToolsGallery
+ end if
+
+ kontext "Gallery"
+ if ( Gallery.exists( 2 ) ) then
+ Gallerys.Select (iAnimations)
+
+ kontext "Gallery"
+ View.TypeKeys "<HOME><RIGHT><RIGHT>"
+ wait( 200 )
+ View.TypeKeys "<SHIFT F10>" 'OpenContextMenu
+ wait( 200 )
+ MenuSelect(MenuGetItemID(1)) 'Insert
+ wait( 200 )
+ MenuSelect(MenuGetItemID(1)) 'Copy
+ else
+ warnlog( "Could not access Gallery" )
+ endif
+
+ printlog "Check that we really got a copy of the object"
+ kontext "DocumentImpress"
+ DocumentImpress.OpenContextMenu(true)
+ WaitSlot (1000)
+ MenuSelect 27353
+
+ Kontext "ExportierenDlg"
+ if ( ExportierenDlg.exists( 5 ) ) then
+ printlog " Gallery-object correctly copied into Slide."
+ ExportierenDlg.Close
+ else
+ warnlog " Doesn't seem like we copied anything from the Gallery... ?"
+ end if
+
+ kontext "DocumentImpress"
+ DocumentImpress.TypeKeys "<UP>", 82
+ DocumentImpress.TypeKeys "<LEFT>", 130
+
+ printlog "Deselect graphic"
+ DocumentImpress.MouseDoubleClick 90,90
+
+ printlog "Close the Gallery"
+ ToolsGallery
+
+ printlog "Change Text on slide"
+ DocumentImpress.TypeKeys "<TAB>"
+ DocumentImpress.TypeKeys "<RETURN>"
+ DocumentImpress.TypeKeys "The process starts to flourish"
+ DocumentImpress.TypeKeys "<ESCAPE><ESCAPE>"
+ gMouseClick 50,50
+
+ ActiveDeactivateCTLSupport (TRUE)
+
+ printlog( "Decrease..." )
+ for iSize = 100 to 25 step -25
+ CreateTextSetEffectAndAngle
+ DocumentImpress.TypeKeys "<DOWN>", 80
+ DocumentImpress.TypeKeys "<LEFT>", iSize
+ gMouseClick 90,90
+ next iSize
+
+ printlog( "Increase..." )
+ for iSize = 25 to 100 step 25
+ CreateTextSetEffectAndAngle
+ DocumentImpress.TypeKeys "<DOWN>", 80
+ DocumentImpress.TypeKeys "<LEFT>", iSize
+ gMouseClick 90,90
+ next iSize
+
+ printlog " Inserted fourth slide with Gallery-object."
+
+ printlog "Save Document"
+ call hFileSaveAsKill (PresentationFile4)
+
+ ActiveDeactivateCTLSupport (FALSE)
+
+ printlog "Close Document"
+ hFileCloseAll()
+
+endcase 'i_us_presentation4
+
+'-------------------------------------------------------------------------------
+
+testcase i_us_presentation5
+
+ dim PresentationFile4 as string
+ dim PresentationFile5 as string
+
+ PresentationFile4 = ConvertPath( gOfficePath + "user\work\PowerPes4.odp" )
+ PresentationFile5 = ConvertPath( gOfficePath + "user\work\PowerPes5.odp" )
+
+ if ( FileExists( PresentationFile4 ) ) then 'if file exists...
+ hFileOpen( PresentationFile4 )
+ else
+ warnlog " This test is supposed to run after the previous testcase has been run. Notify the Automatic-tester."
+ goto endsub
+ end if
+
+ kontext "slides"
+ SlidesControl.TypeKeys( "<PAGEDOWN>", 7 )
+
+ kontext "DocumentImpress"
+ printlog "8. New Slide. (Insert Menu) (Duplicate slide)"
+ InsertDuplicateSlide 'No 5
+ printlog "Change the text in some way. (the user is making a joke with the audience)"
+ gMouseClick 90,90
+ DocumentImpress.TypeKeys "<TAB>"
+ DocumentImpress.TypeKeys "<RETURN>"
+ hUseAsyncSlot( "EditSelectAll" )
+ DocumentImpress.TypeKeys "And does it with strength..."
+
+ printlog " Inserted fifth slide with audience-joke."
+
+ printlog "Save Document"
+ call hFileSaveAsKill (PresentationFile5)
+
+ ActiveDeactivateCTLSupport (FALSE)
+
+ printlog "Close Document"
+ hFileCloseAll()
+
+endcase 'i_us_presentation5
+
+'-------------------------------------------------------------------------------
+
+testcase i_us_presentation6
+
+ dim PresentationFile5 as string
+ dim PresentationFile6 as string
+
+ PresentationFile5 = ConvertPath( gOfficePath + "user\work\PowerPes5.odp" )
+ PresentationFile6 = ConvertPath( gOfficePath + "user\work\PowerPes6.odp" )
+
+ if ( FileExists( PresentationFile5 ) ) then 'if file exists...
+ hFileOpen( PresentationFile5 )
+ else
+ warnlog " This test is supposed to run after the previous testcase has been run. Notify the Automatic-tester."
+ goto endsub
+ end if
+
+ kontext "slides"
+ SlidesControl.TypeKeys( "<PAGEDOWN>", 6 )
+
+ kontext "DocumentImpress"
+ printlog "9. Q&A Slide"
+ InsertSlide
+ WaitSlot (1000)
+ kontext "DocumentImpress"
+ DocumentImpress.TypeKeys "<TAB>"
+ DocumentImpress.TypeKeys "<RETURN>"
+ DocumentImpress.TypeKeys "Q&A"
+ DocumentImpress.TypeKeys "<SHIFT HOME>"
+ wait( 500 )
+
+ Kontext "TextObjectbar"
+ if ( not TextObjectbar.Exists() ) then
+ ViewToolbarsTextFormatting
+ end if
+
+ Kontext "TextObjectbar"
+ wait( 500 )
+ Printlog "- Change size of font"
+ Schriftgroesse.Select "26"
+ Schriftgroesse.TypeKeys "<RETURN>"
+ Fett.Click
+ kontext "DocumentImpress"
+ DocumentImpress.TypeKeys "<ESCAPE><ESCAPE>"
+ kontext "Toolbar"
+ Auswahl.Click
+ gMouseClick 60,60
+ hUseAsyncSlot( "EditSelectAll" )
+
+ DocumentImpress.TypeKeys "<DOWN>", 50
+ kontext "DocumentImpress"
+ printlog " Inserted sixth slide with Q&A."
+
+ printlog "Save Document"
+ call hFileSaveAsKill (PresentationFile6)
+
+ ActiveDeactivateCTLSupport (FALSE)
+
+ printlog "Close Document"
+ hFileCloseAll()
+
+endcase 'i_us_presentation6
+
+'-------------------------------------------------------------------------------
+
+testcase i_us_presentation7
+
+ const KEY_STROKE_REPEAT = 8
+
+ dim sFilter as string
+ dim sFileName as string
+ dim PresentationFile6 as string
+ dim PresentationFile7 as string
+ dim iKeyStroke as integer
+
+ PresentationFile6 = ConvertPath( gOfficePath + "user\work\PowerPes6.odp" )
+ PresentationFile7 = ConvertPath( gOfficePath + "user\work\PowerPes7.odp" )
+ sFileName = ConvertPath( gOfficePath + "user\work\export-test.ppt" )
+
+ if ( FileExists( PresentationFile6 ) ) then 'if file exists...
+ hFileOpen( PresentationFile6 )
+ else
+ warnlog " This test is supposed to run after the previous testcase has been run. Notify the Automatic-tester."
+ goto endsub
+ end if
+
+ kontext "slides"
+ SlidesControl.TypeKeys( "<PAGEDOWN>", KEY_STROKE_REPEAT )
+
+ kontext "DocumentImpress"
+ printlog " inserting Ending Slide"
+ InsertSlide 'No 7
+ DocumentImpress.TypeKeys "Ende"
+ printlog " Inserted ending -slide."
+
+ Kontext "Gallery"
+ if Gallery.Exists(2) then
+ warnlog " The Gallery was visible. Closed it. Check earlier ran tests for inconsistency."
+ ToolsGallery
+ WaitSlot (2000)
+ end if
+
+ kontext "slides"
+ for i = 1 to 7
+ sleep 1
+ SlidesControl.TypeKeys "<PAGEUP>"
+ next i
+ SlidesControl.TypeKeys "<RETURN>" 'At the first slide
+
+ hTypeKeys "<F5>"
+
+ kontext "DocumentPresentation"
+ for iKeyStroke = 1 to KEY_STROKE_REPEAT
+ wait( 3000 )
+ DocumentPresentation.TypeKeys "<PAGEDOWN>"
+ wait( 2000 )
+ next iKeyStroke
+
+ kontext "DocumentPresentation"
+ if ( DocumentPresentation.notExists( 5 ) ) then
+ printlog( "Presentation closed. Good." )
+ else
+ warnlog " Presentation not finished, fullscreen view still open."
+ DocumentPresentation.typeKeys "<ESC>"
+
+ kontext "DocumentPresentation"
+ if ( DocumentPresentation.notExists( 3 ) ) then
+ printlog( "Recovery attempt successful" )
+ else
+ goto endsub
+ endif
+ end if
+
+ kontext "DocumentImpress"
+ printlog "Save Document"
+ call hFileSaveAsKill (PresentationFile7)
+
+ printlog( "Save as Powerpoint-file (Using filter at pos. 5 in the filter list)" )
+ FileSaveAs
+
+ Kontext "SpeichernDlg"
+ if ( SpeichernDlg.exists( 2 ) ) then
+
+ Dateiname.SetText sFileName
+ Dateityp.Select 5 ' Powerpoint (possibly)
+ printlog "Trying to save with filter: " + Dateityp.GetSelText + sFilter(5)
+ Speichern.Click
+
+ Kontext "Messagebox"
+ hCloseDialog( Messagebox, "Yes, optional" )
+
+ Kontext "AlienWarning"
+ hCloseDialog( AlienWarning, "ok, optional" )
+ else
+ warnlog( "<FileSaveAs> dialog did not open" )
+ endif
+
+ printlog "Close all open documents"
+ hFileCloseAll()
+
+ printlog( "Reload file: " & sFileName )
+ hFileOpen sFileName
+ sleep( 3 )
+
+ printlog "Close the office-session"
+ ActiveDeactivateCTLSupport (FALSE)
+
+ printlog "Close Documents"
+ hFileCloseAll()
+
+endcase 'i_us_presentation7
diff --git a/testautomation/graphics/optional/includes/impress/i_view.inc b/testautomation/graphics/optional/includes/impress/i_view.inc
new file mode 100644
index 000000000000..54ba5132d16e
--- /dev/null
+++ b/testautomation/graphics/optional/includes/impress/i_view.inc
@@ -0,0 +1,318 @@
+'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
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* Owner : wolfram.garten@oracle.com
+'*
+'* short description :
+'*
+'*********************************************************************
+' #1 tAnsichtHintergrundNotizen
+' #1 tViewWorkspaceHandoutView
+' #1 tViewWorkspaceOutlineView
+' #1 tViewWorkspaceDrawingView
+' #1 tAnsichtEbene
+'\********************************************************************
+
+'Datei$ = ConvertPath (gOfficePath + "user\work\test.sxi")
+
+testcase tAnsichtHintergrundNotizen
+ Printlog "- View background notes"
+ Call hNewDocument '/// new document ///'
+ try
+ ViewNotes '/// view background notes ///'
+ sleep 3
+ catch
+ Warnlog "View-Notes could not be accessed"
+ endcatch
+ ViewWorkspaceDrawingView
+ sleep 1
+ Call hCloseDocument '/// close document ///'
+ sleep 1
+endcase
+
+'-------------------------------------------------------------------------------
+
+testcase tViewWorkspaceHandoutView
+ Printlog "- View background handout"
+ Call hNewDocument '/// new document ///'
+ sleep 2
+ Kontext "DocumentImpress"
+ if NOT documentImpress.Exists then
+ hNewDocument
+ sleep 1
+ end if
+ sleep 2
+ Printlog " ViewWorkspaceHandoutView"
+ ViewWorkspaceHandoutView '/// view background handout ///'
+ sleep 2
+ Kontext "Tasks"
+ sleep 2
+ if LayoutsPreview.GetItemCount <> 6 Then
+ Warnlog " this doesn't seem to be a handout ?: should be: 6 layouts in the Preview window, but are: " + LayoutsPreview.GetItemCount
+ else
+ Printlog " ViewWorkspaceHandoutView works"
+ end if
+ Printlog "ViewWorkspaceHandoutView closed"
+ ViewWorkspaceDrawingView '/// back to view background drawing ///'
+ Call hCloseDocument '/// close document ///'
+endcase
+
+'-------------------------------------------------------------------------------
+
+testcase tViewWorkspaceOutlineView
+ qaerrorlog "Outcommenting tViewWorkspaceOutlineView due to unreability. - FHA"
+ goto endsub
+ dim sFile as string
+ dim i as integer
+
+ '/// load a document with heading styles in writer and use the function 'writer:'File->Send->Outline to presentation' to get it into the presentation ///'
+ ' all 'heading 1' are new slides
+
+ '/// document used : "graphics\\required\\input\\outlinefromwriter.sxw" -> you get into writer ///'
+ sFile = ConvertPath (gTesttoolPath + "graphics\required\input\outlinefromwriter.sxw")
+ hDateiOeffnen (sFile)
+ sleep 10
+ '///+ with 'File->Send->Outline to presentation' you get into impress ///'
+ FileSendOutlineToPresentation
+ sleep 10
+ Printlog "'/// View->Workspace->Outline View ///'"
+ ViewWorkspaceOutlineView
+ sleep 1
+ '/// go to the line with the 'I' (via 'search & replace' function) ///'
+ hTypeKeys "<STRG HOME>"
+ EditSelectAll
+ hFindeImDokument ("I")
+
+ '///<b> expected level/style: 'Outline 8' </b>///'
+ '/// get last character from selected style in stylist (expect a number of the outline(heading level) ///'
+ fGetPresentationStyle ("8")
+
+ '/// type keys [home] [tab] to go one level down ///'
+ Kontext "DocumentImpressOutlineView"
+ DocumentImpressOutlineView.TypeKeys "<Home><Tab>"
+
+ '///<b> expected level/style: 'Outline 9' </b>///'
+ fGetPresentationStyle ("9")
+
+ Kontext "DocumentImpressOutlineView"
+ '/// Edit - "Select All" to go select the whole text ///'
+ EditSelectAll
+ '/// type keys [shift]+[tab] eight times, to get all lines to the highest, except the one with the 'I' ///'
+ DocumentImpressOutlineView.TypeKeys ("<Shift Tab>", 8)
+
+hPrepareSearchBUG
+ hTypeKeys "<STRG HOME>"
+ EditSelectAll
+ hFindeImDokument ("I")
+ '///<b> expected level/style: 'Outline 1' </b>///'
+ fGetPresentationStyle ("1")
+
+ '/// type keys [shift]+[tab] to get the last line to the highest level, too ///'
+ Kontext "DocumentImpressOutlineView"
+ DocumentImpressOutlineView.TypeKeys ("<Shift Tab>", 1)
+ '///<b> expected level/style: 'Title' </b>///'
+ fGetPresentationStyle (0)
+
+ Kontext "DocumentImpressOutlineView"
+ DocumentImpressOutlineView.TypeKeys ("<escape>", 1)
+ Printlog "'///<b> call 'Edit->Undo' nine times </b>///'"
+ for i = 1 to 9
+ editundo
+ next i
+
+hPrepareSearchBUG
+ hFindeImDokument ("I")
+ '///<b> expected level/style: 'Outline 9' </b>///'
+ fGetPresentationStyle (9)
+
+ Printlog "'///<b> call 'Edit->Redo' nine times </b>///'"
+ for i = 1 to 9
+ editredo
+ next i
+ try
+ editredo
+ Warnlog "NOT OK :-("
+ catch
+ Printlog "OK"
+ endcatch
+
+hPrepareSearchBUG
+ hTypeKeys "<STRG HOME>"
+ EditSelectAll
+ hFindeImDokument ("I")
+ '///<b> expected level/style: 'Title' </b>///'
+ fGetPresentationStyle (0)
+
+ Printlog "'///<b> call 'Edit->Undo' nine times </b>///'"
+ for i = 1 to 9
+ editundo
+ next i
+
+hPrepareSearchBUG
+ hTypeKeys "<STRG HOME>"
+ EditSelectAll
+ hFindeImDokument ("I")
+ '///<b> expected level/style: 'Outline 9' </b>///'
+ fGetPresentationStyle (9)
+
+ '/// type keys [strg]+[A] ///'
+ Kontext "DocumentImpressOutlineView"
+ EditSelectAll
+ '/// type keys [strg]+[X] ///'
+ DocumentImpressOutlineView.TypeKeys "<mod1 X>"
+
+ kontext
+ if messagebox.exists (5) then
+ Printlog "active about deleting pages with graphic objects: '" + messagebox.GetText + "'"
+ Messagebox.ok
+ else
+ Warnlog "messagebox missing ! (about deleting pages with graphic objects:)"
+ endif
+
+ '/// 'Edit->Undo' ///'
+ editundo
+ '/// 'Edit->Redo' ///'
+ editredo
+ '/// 'Edit->Undo' ///'
+ editundo
+
+ '/// type keys [strg]+[A] ///'
+ Kontext "DocumentImpressOutlineView"
+ EditSelectAll
+ '/// type keys [strg]+[X] ///'
+ DocumentImpressOutlineView.TypeKeys "<mod1 X>"
+
+ kontext
+ if messagebox.exists (5) then
+ Printlog "active about deleting pages with graphic objects: '" + messagebox.GetText + "'"
+ Messagebox.ok
+ else
+ Warnlog "messagebox missing ! (about deleting pages with graphic objects:)"
+ endif
+
+ '/// type keys [strg]+[V] ///'
+ Kontext "DocumentImpressOutlineView"
+ DocumentImpressOutlineView.TypeKeys "<mod1 V>"
+
+ '/// 'Edit->Undo' ///'
+ editundo
+ '/// 'Edit->Redo' ///'
+ editredo
+
+ '/// type keys [strg]+[End] ///'
+ Kontext "DocumentImpressOutlineView"
+ DocumentImpressOutlineView.TypeKeys "<mod1 End>"
+ '/// type keys [strg]+[V] ///'
+ DocumentImpressOutlineView.TypeKeys "<mod1 V>"
+ '/// type keys [strg]+[A] ///'
+ EditSelectAll
+ '/// type keys [delete] ///'
+ DocumentImpressOutlineView.TypeKeys "<delete>"
+
+ kontext
+ if messagebox.exists (5) then
+ Printlog "active-box about deleting pages with graphic objects: '" + messagebox.GetText + "'"
+ Printlog "SAY CANCEL TO DIALOG!"
+ Messagebox.Cancel
+ else
+ Warnlog "messagebox missing ! (about deleting pages with graphic objects:)"
+ endif
+
+ '/// type keys [strg]+[A] ///'
+ Kontext "DocumentImpressOutlineView"
+ EditSelectAll
+ try
+ editcopy
+ Printlog "OK"
+ catch
+ Warnlog "error 4711 TBO :-("
+ endcatch
+
+ '/// type keys [delete] ///'
+ Kontext "DocumentImpressOutlineView"
+ DocumentImpressOutlineView.TypeKeys "<delete>"
+
+ kontext
+ if messagebox.exists (5) then
+ Printlog "Active-box about deleting pages with graphic objects: '" + messagebox.GetText + "'"
+ Messagebox.ok
+ else
+ Warnlog "Messagebox missing ! (about deleting pages with graphic objects:)"
+ endif
+
+ Kontext "DocumentImpressOutlineView"
+ EditSelectAll
+ try
+ editcopy
+ Warnlog "Didn't work!"
+ Printlog "'" + getclipboard() + "'"
+ catch
+ Printlog "OK"
+ endcatch
+
+ ViewWorkspaceDrawingView
+ Call hCloseDocument '/// close document ///'
+ Call hCloseDocument '/// close document ///'
+endcase
+
+'-------------------------------------------------------------------------------
+
+testcase tViewWorkspaceDrawingView
+ Printlog "- View/Background-drawing"
+ Call hNewDocument '/// new document ///'
+ sleep 2
+ ViewDrawing '/// view background drawing ///'
+ try
+ hRechteckErstellen ( 20,20,40,40 ) '/// create rectangle ///'
+ sleep 1
+ Printlog " - rectangle created"
+ catch
+ Warnlog " Rectangle could not be created"
+ endcatch
+ Call hCloseDocument '/// close document ///'
+endcase
+
+'-------------------------------------------------------------------------------
+
+testcase tAnsichtEbene
+ printLog "- View/Layer" '/// view layer ///'
+
+
+ FileAutopilotPresentation '/// new document-autopilot ///'
+ Kontext "AutopilotPraesentation1"
+ sleep 5
+ AutopilotPraesentation1.Ok
+ sleep 2
+ sleep 2
+ ViewSlide '/// back to view slide ///'
+ Sleep 2
+
+ Call hCloseDocument '/// close document ///'
+
+endcase
+
+'-------------------------------------------------------------------------------
diff --git a/testautomation/graphics/optional/includes/impress/im_002_.inc b/testautomation/graphics/optional/includes/impress/im_002_.inc
new file mode 100644
index 000000000000..d1fa457ae8b2
--- /dev/null
+++ b/testautomation/graphics/optional/includes/impress/im_002_.inc
@@ -0,0 +1,52 @@
+'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
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* Owner : wolfram.garten@oracle.com
+'*
+'* short description : Impress Required Test Library (2)
+'*
+'\*****************************************************************
+
+testcase tiEditDeleteSlide
+'/// open application ///'
+ Call hNewDocument
+'/// Insert->Slide; press 'OK' ///'
+ InsertSlide
+ sleep 2
+ hTypekeys "<Pagedown>"
+ sleep 2
+'/// Edit->Delete Slide ///'
+ try
+ EditDeleteSlide
+ catch
+ warnlog "Error when deleting slide"
+ endcatch
+ Call hCloseDocument
+'/// close application ///'
+endcase
+
+
diff --git a/testautomation/graphics/optional/includes/impress/im_003_.inc b/testautomation/graphics/optional/includes/impress/im_003_.inc
new file mode 100644
index 000000000000..1db0627e4a4e
--- /dev/null
+++ b/testautomation/graphics/optional/includes/impress/im_003_.inc
@@ -0,0 +1,254 @@
+'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
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* Owner : wolfram.garten@oracle.com
+'*
+'* short description : Impress Resource Test: View Menu
+'*
+'***********************************************************************************
+' #1 tiViewPanes
+' #1 tiViewMasterView
+' #1 tiViewSlideMaster
+' #1 tiViewToolbar_1
+'\**********************************************************************************
+
+testcase tiViewPanes
+ goto endsub 'TODO WG, tiViewPanes outcommented due to reconstruction of test
+ dim bState as boolean
+ '/// open application ///'
+ Call hCloseDocument
+ Call hNewDocument
+ sleep 1
+ kontext "Tasks"
+ if (NOT Tasks.exists) then
+ warnlog "Tasks Panel not visible on opening application. Opening now."
+ ViewTaskPane
+ endif
+ kontext "Slides"
+ if (NOT Slides.exists) then
+ warnlog "Slides Panel not visible on opening application. Opening now."
+ ViewTaskSlide
+ endif
+ kontext "Tasks"
+ '/// Deactivate all but "masterpages" ///'
+ View.OpenMenu
+ hMenuSelectNr (2)
+ View.OpenMenu
+ hMenuSelectNr (3)
+ View.OpenMenu
+ hMenuSelectNr (4)
+
+ sleep 1
+
+ Tasks.TypeKeys ("<RIGHT><RIGHT><RIGHT>")
+
+ try
+ kontext "recentlyUsed"
+ printlog "Toggeling Master Pages now with <space>"
+ kontext "MasterPages"
+ MasterPages.typeKeys "<space>"
+ kontext "recentlyUsed"
+ if (recentlyUsed.IsVisible = FALSE) then 'exists = FALSE) then
+ warnlog "View-menu didn't work"
+ endif
+ kontext "Tasks"
+ sleep 1
+ '/// View->Task Pane ///'
+ ViewTaskPane
+ sleep 1
+ if (Tasks.exists) then
+ warnlog "View->Task Panel failed"
+ ViewTaskPane
+ endif
+ '/// View->Task Pane ///'
+ ViewTaskPane
+ sleep 1
+ if (NOT Tasks.exists) then
+ warnlog "View->Task Panel failed"
+ ViewTaskPane
+ endif
+ catch
+ warnlog "View->Task Pane couldn't get executed"
+ endcatch
+ kontext "Slides"
+ try
+ ViewTaskSlide
+ if (Slides.exists) then
+ warnlog "View->Slide Panel failed."
+ ViewTaskSlide
+ endif
+ '/// View->Slide Pane ///'
+ ViewTaskSlide
+ sleep 1
+ if (NOT Slides.exists) then
+ warnlog "View->Slide Panel failed."
+ ViewTaskSlide
+ endif
+ catch
+ warnlog "View->Slide Pane couldn't get executed"
+ endcatch
+
+ '/// Reactivate all pages in the Task-panel ///'
+ kontext "Tasks"
+ View.OpenMenu
+ hMenuSelectNr (2)
+ View.OpenMenu
+ hMenuSelectNr (3)
+ View.OpenMenu
+ hMenuSelectNr (4)
+endcase
+
+testcase tiViewMasterView
+'/// open application ///'
+ Call hNewDocument
+'/// View->Master View->Drawing View ///'
+ sleep 1
+ ViewWorkspaceDrawingView
+' Kontext "DocumentImpress"
+' gMouseClick 70,70
+ sleep 5
+'/// View->Master View->Outline View ///'
+ ViewWorkspaceOutlineView
+' Kontext "DocumentImpressOutlineView"
+' DocumentImpressOutlineView.MouseDown 70,70
+' DocumentImpressOutlineView.MouseUp 70,70
+ sleep 1
+'/// View->Master View->Slides View ///'
+ ViewWorkspaceSlidesView
+' Kontext "DocumentImpressSlideView"
+' DocumentImpressSlideView.MouseDown 70,70
+' DocumentImpressSlideView.MouseUp 70,70
+ sleep 1
+'/// View->Master View->Notes View ///'
+ ViewWorkspaceNotesView
+ sleep 1
+'/// View->Master View->Handout View ///'
+ ViewWorkspaceHandoutView
+ sleep 1
+'/// View->Master View->Drawing View ///'
+ ViewWorkspaceDrawingView
+'/// close application ///'
+ sleep 1
+ Call hCloseDocument
+endcase
+
+testcase tiViewSlideMaster
+'/// open application with : File->Autopilot->Presentation; OK; OK ///'
+' Call hNewDocument
+ FileAutopilotPresentation ' to get a title :-)
+ sleep 2
+ Kontext "AutopilotPraesentation1"
+ AutopilotPraesentation1.Ok
+ sleep 1
+ Kontext "Seitenlayout" ' aka: Modify Slide
+ if Seitenlayout.exists(5) then
+ warnlog "Slidelayout has to vanish; moved to sidebar"
+ Seitenlayout.OK
+ endif
+ kontext "DocumentImpress"
+ sleep 1
+'/// View->Slide ///'
+ ViewSlide
+ Sleep 1
+'/// View->Master->Drawing ///'
+ ViewDrawing
+ Sleep 1
+'/// View->Slide ///'
+ ViewSlide
+ Sleep 1
+'/// View->Master->Title ///'
+ try
+ ViewTitle
+ Errorlog "View - Master - Title Slide Master should NOT be accessable"
+ catch
+ printlog "View - Master - Title Slide Master not accessable - good"
+ endcatch
+ Sleep 1
+'/// View->Slide ///'
+ ViewSlide
+ Sleep 1
+'/// View->Master->Handout ///'
+ ViewHandout
+ Sleep 1
+' ViewSlide
+ Sleep 1
+'/// View->Master->Notes ///'
+ ViewNotes
+ kontext "DocumentImpress"
+ Sleep 1
+'/// View->Slide ///'
+ ViewSlide
+ Sleep 1
+'/// close application ///'
+ Call hCloseDocument
+endcase
+
+testcase tiViewToolbar_1
+ Dim Zaehler as integer
+ Dim i as integer
+
+'/// open application ///'
+ Call hNewDocument
+ sleep 2
+'/// Insert->Graphic... : "global\input\graf_inp\desp.bmp" ///'
+ InsertGraphicsFromFile
+ sleep 2
+ Kontext "GrafikEinfuegenDlg"
+ sleep 1
+ Dateiname.SetText ConvertPath (gTesttoolPath + "global\input\graf_inp\desp.bmp")
+ sleep 1
+ Oeffnen.Click
+ sleep 3
+ Kontext "Messagebox"
+ if Messagebox.Exists then
+ Warnlog Messagebox.GetText
+ Messagebox.OK
+ end if
+ Kontext "DocumentImpress"
+'/// select graphic ///'
+ EditSelectAll
+ sleep 2
+ Kontext "GraphicObjectbar"
+ sleep 1
+'/// The Graphics Toolbar has to be visible now; If not -> ERROR ///'
+ if GraphicObjectbar.Exists Then
+ Printlog "- graphic object toolbar exists"
+ Zaehler=Grafikmodus.GetItemCount
+ for i = 1 to Zaehler
+ Printlog "- access all controls in the toolbar (" +i+"/"+Zaehler+")"
+ Grafikmodus.Select i
+ sleep 3
+ next i
+ sleep 3
+ else
+ Warnlog "- No graphic function toolbar visible"
+ end if
+'/// close application ///'
+ Call hCloseDocument
+endcase
+
+
diff --git a/testautomation/graphics/optional/includes/impress/im_004_.inc b/testautomation/graphics/optional/includes/impress/im_004_.inc
new file mode 100644
index 000000000000..17d00addc847
--- /dev/null
+++ b/testautomation/graphics/optional/includes/impress/im_004_.inc
@@ -0,0 +1,58 @@
+'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
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* Owner : wolfram.garten@oracle.com
+'*
+'* short description : Impress Required Test Library (4)
+'*
+'\*****************************************************************
+
+testcase tiInsertSlideExpandSummary
+
+'/// open application ///'
+ Call hNewDocument
+ ' presupposition
+'/// View->Master View->Outline View ///'
+ ViewWorkspaceOutlineView
+ Sleep 1
+ Kontext "DocumentImpressOutlineView"
+'/// Type 2 rows ///'
+ DocumentImpressOutlineView.TypeKeys "Herbert<Return>Rudi"
+'/// View->Master View->Drawing View ///'
+ ViewWorkspaceDrawingView
+ Sleep 1
+ ' test menue entries
+'/// Insert->Summery Slide ///'
+ InsertSummerySlide
+ Sleep 1
+'/// Insert->Expand Slide ///'
+ InsertExpandSlide
+ Sleep 2
+'/// close application ///'
+ Call hCloseDocument
+endcase
+
diff --git a/testautomation/graphics/optional/includes/impress/im_005_.inc b/testautomation/graphics/optional/includes/impress/im_005_.inc
new file mode 100644
index 000000000000..1aa218f3ecba
--- /dev/null
+++ b/testautomation/graphics/optional/includes/impress/im_005_.inc
@@ -0,0 +1,50 @@
+'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
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* Owner : wolfram.garten@oracle.com
+'*
+'* short description : Impress Required Test Library (5)
+'*
+'\*****************************************************************
+
+testcase tiFormatModifyLayout
+
+'/// open application ///'
+ Call hNewDocument
+'/// Impress: Format->Modify Layout ///'
+'/// Draw : kontext menu: Slide-> Modify Slide (always disabled :-( ?///'
+ FormatPage ' 27046 SID_MODIFYPAGE
+ Kontext "SeitenLayout"
+ DialogTest ( SeitenLayout )
+ sleep 1
+'/// cancel dialog 'Page Setup' ///'
+ SeitenLayout.Cancel
+'/// close application ///'
+ Call hCloseDocument
+endcase
+
+
diff --git a/testautomation/graphics/optional/includes/impress/im_007_.inc b/testautomation/graphics/optional/includes/impress/im_007_.inc
new file mode 100644
index 000000000000..fc9ba2800e0c
--- /dev/null
+++ b/testautomation/graphics/optional/includes/impress/im_007_.inc
@@ -0,0 +1,693 @@
+'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
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* Owner : wolfram.garten@oracle.com
+'*
+'* short description : Impress Required Test Library (7)
+'*
+'\*****************************************************************
+
+' this menue is only in impress availble
+testcase tSlideShowSlideShow
+ '/// open application ///'
+ Call hNewDocument
+ '/// Slide Show->Slide Show Settings ///'
+ SlideShowPresentationSettings
+ Kontext "Bildschirmpraesentation"
+ '/// check if 'type' 'default' is checked, it has to be the default !///'
+ if standard.IsChecked then
+ if LogoAnzeigen.isEnabled then
+ Warnlog "'Show Logo' is Enabled :-("
+ endif
+ else
+ Warnlog "type 'default' is not checked as default :-("
+ endif
+ '/// check checkbox 'Window' ///'
+ Fenster.Check
+ Printlog "- Presentation in window mode is checked"
+ '/// close dialog with OK 'Slide Show' ///'
+ Bildschirmpraesentation.Ok
+ sleep 3
+ '/// Slide Show->Slide Show ///'
+ SlideShowSlideshow
+ Sleep 5
+ try
+ Kontext "DocumentPresentation"
+ sleep 3
+ '/// Press <Esc> to leave presentation mode ///'
+ DocumentPresentation.Typekeys ("<Escape>")
+ Sleep 3
+ Kontext "DocumentImpress"
+ DocumentImpress.MouseDoubleClick ( 50, 50 )
+ Sleep 3
+ catch
+ ' FileClose
+ warnlog "had to catch <the ball> :-( "
+ ' Kontext "Messagebox"
+ ' if Messagebox.Exists (5) Then Messagebox.No
+ ' Kontext
+ ' sleep (12)
+ ' start sAppExe$
+ ' sleep (6)
+ ' Kontext
+ ' if Office.Exists(2) then Resetapplication
+ ' Warnlog "Slide didn't end, application wasn't in document edit mode"
+ endcatch
+ '/// close application ///'
+ Call hCloseDocument
+endcase
+
+testcase tSlideShowRehearseTimings
+ goto endsub
+ '/// open application ///'
+ Call hNewDocument
+ '/// Slide Show->Slide Show Settings ///'
+ SlideShowPresentationSettings
+ Kontext "Bildschirmpraesentation"
+ '/// check checkbox 'Window' ///'
+ Fenster.Check
+ '/// close dialog with OK 'Slide Show' ///'
+ Bildschirmpraesentation.Ok
+ '/// Slide Show->Rehearse Timings ///'
+ SlideShowRehearseTimings
+ sleep 2
+ Kontext "DocumentPresentation"
+ '/// Press <Esc> to leave presentation mode ///'
+ if DocumentPresentation.Exists (5) then
+ DocumentPresentation.Typekeys ("<Escape>")
+ else
+ Warnlog "SlideShowRehearseTimings mode not accessible"
+ endif
+ Sleep 3
+ if DocumentPresentation.Exists then ' the kontext hasnt to be available, else ERROR
+ DocumentPresentation.TypeKeys "<ESCAPE>" ' => I mustn't be here ever !
+ Warnlog "- Slide show mode should have ended"
+ else
+ printlog "SlideShowRehearseTimings mode not accessible :-) "
+ end if
+ sleep 3
+ try
+ Kontext "DocumentImpress"
+ DocumentImpress.MouseDoubleClick ( 50, 50 )
+
+ sleep 3
+ catch
+ warnlog "Had to catch <the ball> :-( "
+ endcatch
+ sleep 3
+ '/// close application ///'
+ Call hCloseDocument
+endcase
+
+testcase tSlideShowSlideShowSettings
+ '/// open application ///'
+ Call hNewDocument
+ sleep 2
+ '/// Slide Show->Slide Show Settings ///'
+ SlideShowPresentationSettings
+ Kontext "Bildschirmpraesentation"
+ call Dialogtest (Bildschirmpraesentation)
+ '/// check checkbox in section 'Range' - 'From: ///'
+ AbDia.Check
+ '/// select the 3rd item from the top from listbox 'From:' ///'
+ AbDiaName.GetSelText
+ '/// check checkbox 'All Slides' ///'
+ AlleDias.Check
+ '///' RangeCustomSlideShow ' gets tested in tSlideShowCustomSlideShow ///'
+ ' IndividuellePraesentationName
+ '///<b> check checkbox 'window' </b>///'
+ Fenster.Check
+ '/// check checkbox 'default' ///'
+ Standard.Check
+ '///<b> check check box 'Auto' -> implies looping of slideshow in fullscreen mode </b>///'
+ Auto.Check
+ '/// set duration of pause to '00:00:05' ///'
+ Zeit.GetText
+ '/// check check box 'Show logo' ///'
+ LogoAnzeigen.Check
+ '///<b> check checkbox 'Change slides maually' </b>///'
+ DiawechselManuel.Check
+ '///<b> check checkbox 'Mouse pointer as pen' </b>///'
+ MauszeigerAlsStift.Check
+ '///<b> UNcheck checkbox 'Mouse pointer visible' </b>///'
+ MauszeigerSichtbar.UnCheck
+ '///<b> check checkbox 'Navigator visible' </b>///'
+ NavigatorSichtbar.Check
+ '///<b> UNcheck checkbox 'animations allowed' </b>///'
+ AnimationenZulassen.UnCheck
+ '///<b> UNcheck checkbox 'Change slides by clicking on background' </b>///'
+ DiaWechselAufHintergrund.UnCheck
+ '///<b> check checkbox 'Presentation always on top' </b>///'
+ PraesentationImmerImVordergrund.Check
+ '/// cancel dialog 'Slide Show' ///'
+ Bildschirmpraesentation.Cancel
+ '/// close application ///'
+ Call hCloseDocument
+endcase
+
+testcase tSlideShowCustomSlideShow
+ '/// open application ///'
+ Call hNewDocument
+ sleep 2
+ '/// Slide Show->Custom Slide Show ///'
+ SlideShowCustomSlideshow
+ Kontext "IndividuellePraesentation"
+ call Dialogtest (IndividuellePraesentation)
+ '/// click button 'New' ///'
+ Neu.Click
+ Kontext "IndividuellePraesentationDefinieren"
+ Call DialogTest (IndividuellePraesentationDefinieren)
+ '/// select the first entry in the list 'Existing Slides' ///'
+ SeitenPraesentation.Select 1
+ '/// click button '>>' ///'
+ Hinzufuegen.Click
+ '/// close dialog 'Define Custom Slide Show' with OK ///'
+ IndividuellePraesentationDefinieren.OK
+ Kontext "IndividuellePraesentation"
+ '/// click button 'Copy' ///'
+ Kopieren.Click
+ '/// click button 'Delete' ///'
+ Loeschen.Click
+ '/// click button 'Edit' ///'
+ Bearbeiten.Click
+ Kontext "IndividuellePraesentationDefinieren"
+ '/// select 1st entry in the list 'Selected Slides' ///'
+ SelectedSlides.Select 1
+ '/// click button '<<' ///'
+ Entfernen.Click
+ '/// close dialog 'Define Custom Slide Show' with Cancel ///'
+ IndividuellePraesentationDefinieren.Cancel
+ Kontext "IndividuellePraesentation"
+ '/// check checkbox 'Use Custom Slide Show' ///'
+ IndividuellePraesentationBenutzen.Check
+ sleep 1
+ '///+ UNcheck checkbox 'Use Custom Slide Show' ///'
+ IndividuellePraesentationBenutzen.UnCheck
+ '/// click button 'Start...' ///'
+ Starten.Click
+ sleep 5
+ '/// press key [space] 2 times ///'
+ kontext "DocumentPresentation"
+ DocumentPresentation.TypeKeys "<space>"
+ sleep 1
+ DocumentPresentation.TypeKeys "<space>"
+ sleep 1
+ '/// close dialog 'Custom Slide Shows' ///'
+ ' IndividuellePraesentation.Close ' slide show ends dialog !
+ '/// Slide Show->Slide Show Settings ///'
+ try
+ SlideShowPresentationSettings
+ catch
+ warnlog "Presentation did not end :-("
+ DocumentPresentation.TypeKeys "<escape>"
+ endcatch
+ Kontext "Bildschirmpraesentation"
+ if Bildschirmpraesentation.exists (5) then
+ '/// check checkbox 'Custom Slide Show' ///'
+ RangeCustomSlideShow.Check
+ printlog "check: '" + IndividuellePraesentationName.GetSelText + "'"
+ '/// cancel dialog 'Slide Show' ///'
+ Bildschirmpraesentation.Cancel
+ else
+ warnlog "Dialog not open? SlideShowPresentationSettings"
+ endif
+ '/// Slide Show->Custom Slide Show ///'
+ SlideShowCustomSlideshow
+ Kontext "IndividuellePraesentation"
+ if (IndividuellePraesentation.exists (5)) then
+ '/// click button 'Delete' ///'
+ Loeschen.Click
+ '/// close dialog 'Custom Slide Shows' ///'
+ IndividuellePraesentation.Close
+ else
+ warnlog "Dialog not open? SlideShowCustomSlideshow"
+ endif
+ '/// close application ///'
+ Call hCloseDocument
+endcase
+
+testcase tSlideShowSlideTransition
+ goto endsub '"#149943# - Outcommented tSlideShowSlideTransition due to bug."
+ dim i as integer
+ dim a as integer
+ dim iCount as integer
+
+ '/// open application ///'
+ Call hNewDocument
+ '/// create rectangle ///'
+ Call hRechteckErstellen ( 10, 10, 20, 40 )
+ sleep 1
+ '/// Slide Show->Slide Transition ///'
+ SlideShowSlideTransition
+ sleep 2
+ '/// The 'Slide Transition' in the right 'Tasks' Pane has to come up ///'
+ Kontext "Tasks"
+ '/// Select the second entry from teh Listbox 'Applay to selected slides' ///'
+ TransitionApplyToSelectedSlide.select (2)
+ sleep 5 ' takes some time, until it is run
+ Printlog "Count of effects : "+TransitionApplyToSelectedSlide.GetItemCount
+ Printlog "Count of Speeds : "+TransitionSpeed.GetItemCount
+ iCount = TransitionSound.GetItemCount
+ Printlog "Count of Sounds : " + iCount
+
+ '/// One Entry of the Listbox 'Sound' is 'Other sound...', select it ///'
+ TransitionSound.typeKeys "<home>"
+ i = 0
+ for a = 1 to iCount
+ TransitionSound.select (a)
+ kontext "OeffnenDlg"
+ if (OeffnenDlg.exists (5)) then
+ if (0=i) then
+ ' remember when dialog came up
+ i = a
+ OeffnenDlg.cancel
+ else
+ warnlog "File Open Dialog comes up a second time!"
+ OeffnenDlg.cancel
+ endif
+ endif
+ kontext "Tasks"
+ ' the Checkbox is disabled on teh first three entries: <No Sound>, <Stop previous sound>...
+ if (TransitionLoopUntilNextSound.isEnabled AND (a<4)) then
+ qaErrorLog "May be Language specific -> Evaluation of TBO; " + a
+ endif
+ next a
+ TransitionSound.select (i)
+ '/// The dialog 'Open' comes up///'
+ sleep 1
+ kontext "OeffnenDlg"
+ if (OeffnenDlg.exists (5)) then
+ '/// Read all entries in Listbox 'File type' ///'
+ for i = 1 to Dateityp.getItemCount
+ printlog "" + i + ":" + Dateityp.getItemText(i)
+ next i
+ '/// cancel dialog 'Open' ///'
+ OeffnenDlg.cancel
+ else
+ warnlog "Impress:Tasks Pane:Slide Transition:Sound:Other sound... disdn't bring up teh File Open Dialog!"
+ endif
+ kontext "Tasks"
+ sleep (2)
+ '/// check checkbox 'Automatically after' ///'
+ TransitionAutomaticallyAfter.check
+ sleep (2)
+ '/// press key 'Page Up' in box ///'
+ TransitionAutomaticallyAfterTime.typeKeys "<PageUp>"
+ sleep 9
+ '/// check the standard checkbox 'On mouse click' ///'
+ TransitionOnMouseClick.check
+ sleep (2)
+ '/// press button 'Apply to All Slides' ///'
+ TransitionApplyToAllSlides.click
+ sleep (2)
+ '/// press button 'Play' ///'
+ TransitionPlay.click
+ sleep 10
+ '/// press button 'Slide Show' ///'
+ TransitionSlideShow.click
+ sleep 2
+ kontext "DocumentPresentation"
+ if DocumentPresentation.exists (10) then
+ printlog "Presentation started :-)"
+ DocumentPresentation.typeKeys "<escape>"
+ else
+ warnlog "Impress:Tasks Pane:Slide Transition:Slide Show button doesn't start slideshow!"
+ endif
+ kontext "Tasks"
+
+ '/// uncheck and check Checkbox 'Automatic Preview' ///'
+ '/// default is checked ///'
+ if (NOT TransitionAutomaticPreview.isChecked) then
+ warnlog "Impress:Tasks Pane:Slide Transition: Automatic preview has to be checked by default, wasn't!"
+ endif
+ sleep (2)
+ TransitionAutomaticPreview.unCheck
+ sleep (2)
+ TransitionAutomaticPreview.Check
+ '/// close application ///'
+ Call hCloseDocument
+endcase
+
+testcase tSlideShowShowHideSlide
+ '/// open application ///'
+ Call hNewDocument
+ '/// create rectangle ///'
+ Call hRechteckErstellen ( 10, 10, 20, 40 )
+ '/// View->Master View->Slides View ///'
+ ViewWorkspaceSlidesView
+ sleep 1
+ '/// Slide Show->Hide Slide ///'
+ SlideShowHideSlide
+ sleep 1
+ '/// Slide Show->Show Slide ///'
+ SlideShowShowSlide
+ '/// close application ///'
+ Call hCloseDocument
+endcase
+
+testcase tSlideShowAnimation
+ '/// open application ///'
+ Call hNewDocument
+ sleep 1
+ '/// create rectangle ///'
+ Call hRechteckErstellen ( 10, 10, 20, 40 )
+ sleep 1
+ '/// Insert ->Animated image ///'
+ Opl_SD_EffekteZulassen
+ Kontext "Animation"
+ sleep 1
+ '/// click button 'Apply Object' ///'
+ BildAufnehmen.Click 'BildAufnehmen
+ '/// click button 'Create' ///'
+ Erstellen.Click
+ sleep 1
+ '/// Select 1st entry from top in 'Alignment' ///'
+ Anpassung.Select 1
+ sleep 1
+ '/// click button 'Create' ///'
+ Erstellen.Click
+ sleep 1
+ '/// click button 'Apply Objects Individually' ///'
+ AlleAufnehmen.Click
+ sleep 1
+ '/// click button 'First Image' ///'
+ ErstesBild.Click
+ sleep 1
+ '/// click button 'Last Image' ///'
+ LetztesBild.Click
+ sleep 1
+ '/// click button 'BAckwards' ///'
+ Rueckwaerts.Click
+ sleep 1
+ '/// click button 'Play' ///'
+ Abspielen.Click
+ sleep 1
+ '/// click in Number field 'Image Number' Less - More ///'
+ AnzahlBilder.Less
+ sleep 1
+ AnzahlBilder.More
+ sleep 1
+ '/// check 'Bitmap Object' ///'
+ AnimationsgruppeBitmapobjekt.Check
+ sleep 1
+ '/// Type '10' into the field 'Duration' ///'
+ AnzeigedauerProBild.SetText "10"
+ '/// click button 'Play' ///'
+ Abspielen.Click
+ '/// wait 5 seconds ///'
+ sleep 5
+ '/// click button 'Stop' ///'
+ try
+ Stopp.Click
+ catch
+ warnlog "Stopbutton doesn't work"
+ endcatch
+ sleep 1
+ '/// Select 1st entry from top in 'Loop Count' ///'
+ AnzahlDurchlaeufe.Select 1
+ sleep 1
+ '/// click button 'Delete Current Image' ///'
+ BildLoeschen.Click
+ sleep 1
+ '/// check 'Group Object' ///'
+ AnimationsgruppeGruppenobjekt.Check
+ sleep 1
+ '/// click button 'Delete All Images' ///'
+ AlleLoeschen.Click
+ kontext "Messagebox"
+ '/// there has to be a messagebox 'Really delete?' say YES!; else ERROR ///'
+ if Messagebox.exists (5) then
+ Messagebox.YES
+ else
+ warnlog "No one cares about my data :-( No one asked if all shall be deleted :-( "
+ endif
+ sleep 1
+ kontext "Animation"
+ '/// close dialog 'Animation' ///'
+ Animation.Close
+ '/// close application ///'
+ Call hCloseDocument
+endcase
+
+testcase tSlideShowCustomAnimation
+ dim bError as boolean
+
+ '/// open application ///'
+ Call hNewDocument
+ '/// create textbox with text ///'
+ Call hTextrahmenErstellen ("Test text to test text effects", 10, 10, 20, 40 )
+ '/// Slide Show->Custom Animation... ///'
+ SlideShowCustomAnimation
+ Kontext "Tasks"
+ '/// click button 'Add...' ///'
+ EffectAdd.click
+ '/// Dialog 'Custom Animation' comes up ///'
+ kontext
+ '/// Switch to TabPage: Entrance ///'
+ active.setPage(TabEntrance)
+ kontext "TabEntrance"
+ if TabEntrance.exists(5) then
+ DialogTest(TabEntrance)
+ '/// select in the listbox 'Effects' the second entry///'
+ Effects.select(2)
+ Speed.getItemCount
+ AutomaticPreview.unCheck
+ sleep 1
+ AutomaticPreview.Check
+ kontext
+ '/// Switch to TabPage: Emphasis ///'
+ active.setPage(TabEmphasis)
+ kontext "TabEmphasis"
+ if TabEmphasis.exists(5) then
+ DialogTest(TabEmphasis)
+ else
+ bError = true
+ warnlog "Impress:Tasks Pane:Custom Animation:TabEmphasis tabPage doesn't work."
+ endif
+ kontext
+ '/// Switch to TabPage: Exit ///'
+ active.setPage(TabExit)
+ kontext "TabExit"
+ if TabExit.exists(5) then
+ DialogTest(TabExit)
+ else
+ bError = true
+ warnlog "Impress:Tasks Pane:Custom Animation:TabExit tabPage doesn't work."
+ endif
+ kontext
+ '/// Switch to TabPage: Motion Paths ///'
+ active.setPage(TabMotionPaths)
+ kontext "TabMotionPaths"
+ if TabMotionPaths.exists(5) then
+ DialogTest(TabMotionPaths)
+ Effects.select(7)
+ else
+ bError = true
+ warnlog "Impress:Tasks Pane:Custom Animation:TabMotionPaths tabPage doesn't work."
+ endif
+ '/// Close dialog 'Custom Animation' with 'OK' ///'
+ TabMotionPaths.OK
+ bError = false
+ else
+ bError = true
+ warnlog "Impress:Tasks Pane:Custom Animation:Add... button didn't work."
+ endif
+ Kontext "Tasks"
+ if (NOT bError) then
+ '/// click button 'Change...' ///'
+ EffectChange.click
+ '/// Dialog 'Custom Animation' comes up ///'
+ kontext
+ '/// Switch to TabPage: Entrance ///'
+ active.setPage(TabEntrance)
+ kontext "TabEntrance"
+ if (NOT TabEntrance.exists(5)) then
+ warnlog "Impress:Tasks Pane:Custom Animation:Change... button didn't work."
+ endif
+ TabEntrance.cancel
+ Kontext "Tasks"
+ EffectStart.getItemCount
+ if EffectProperty.isEnabled then
+ EffectProperty.getItemCount
+ endif
+ '/// CLick on button '...' (Options) ///'
+ EffectOptions.click
+ kontext "TabEffect"
+ if TabEffect.exists(5) then
+ dialogTest(TabEffect)
+ Sound.getItemCount
+ AfterAnimation.getItemCount
+ '/// switch to TabPage 'Timing' ///'
+ Kontext
+ active.setPage TabTiming
+ kontext "TabTiming"
+ if TabTiming.exists(5) then
+ dialogTest(TabTiming)
+ TimingStart.getItemCount
+ Delay.getText
+ Speed.getItemCount
+ Repeat.getItemCount
+ Rewind.ischecked
+ TriggerAnimate.isChecked
+ TriggerStart.isChecked
+ Shape.getItemCount
+ else
+ warnlog "Impress:Tasks Pane:Custom Animation:Effect Options: Timing TabPage didn't work."
+ endif
+ '/// switch to TabPage 'Timing' ///'
+ Kontext
+ active.setPage TabTextAnimation
+ kontext "TabTextAnimation"
+ if TabTextAnimation.exists(5) then
+ dialogTest(TabTextAnimation)
+ GroupText.getItemCount
+ AnimateAttachedShape.isChecked
+ TabTextAnimation.cancel
+ else
+ warnlog "Impress:Tasks Pane:Custom Animation:Effect Options: TextAnimation TabPage didn't work."
+ endif
+ else
+ warnlog "Impress:Tasks Pane:Custom Animation:... button didn't work."
+ endif
+ Kontext "Tasks"
+ EffectSpeed.getItemCount
+ EffectList.getItemCount
+ EffectPlay.click
+ '/// Wait five seconds so the Playfunction has ended ///'
+ sleep 5
+ EffectSlideShow.click
+ sleep 1
+ kontext "DocumentPresentation"
+ if DocumentPresentation.exists (5) then
+ printlog "Presentation started :-)"
+ DocumentPresentation.typeKeys "<escape>"
+ else
+ warnlog "Impress:Tasks Pane:Custom Animation:Slide Show button doesn't start slideshow!"
+ endif
+ kontext "Tasks"
+ EffectAutomaticPreview.isChecked
+ '/// click button 'Remove' ///'
+ EffectRemove.click
+ endif
+ '/// close application ///'
+ Call hCloseDocument
+endcase
+
+testcase tSlideShowInteraction
+ '/// open application ///'
+ Call hNewDocument
+ sleep 2
+ '/// create rectangle ///'
+ Call hRechteckErstellen (10, 10, 20, 20)
+ sleep 3
+ '/// Slide Show->Interaction ///'
+ SlideShowInteraction
+ Kontext "TabInteraktion"
+ Call DialogTest (TabInteraktion, 1)
+ '///+ Select 6th entry from top in 'Action at mouse click' : 'Go to page or object' ///'
+ AktionBeiMausklick.select 6
+ Printlog AktionBeiMausklick.GetSelText + " chosen"
+ Call DialogTest (TabInteraktion, 2)
+ '///+ click button 'Find' ///'
+ sleep 1
+ suchen.click
+ Kontext "TabInteraktion"
+ '/// Select 7th entry from top in 'Action at mouse click' : 'Go to document' ///'
+ sleep 1
+ AktionBeiMausklick.select 7
+ sleep 1
+ Printlog AktionBeiMausklick.GetSelText + " chosen"
+ Kontext "TabInteraktion"
+ Call DialogTest (TabInteraktion, 3)
+ '///+ click button 'Browse...' ///'
+ Durchsuchen.click
+ sleep 1
+ kontext "OeffnenDlg"
+ call Dialogtest (OeffnenDlg)
+ '///+ cancel dialog 'open' ///'
+ OeffnenDlg.cancel
+ Kontext "TabInteraktion"
+ sleep 1
+ '/// Select 9th entry from top in 'Action at mouse click' : 'Play Sound' ///'
+ AktionBeiMausklick.select 8
+ Printlog AktionBeiMausklick.GetSelText + " chosen"
+ Call DialogTest (TabInteraktion, 4)
+ '///+ click button 'Browse...' ///'
+ Durchsuchen.click
+ sleep 1
+ Kontext "OeffnenDlg"
+ Call dialogTest (OeffnenDlg)
+ '///+ cancel dialog 'open' ///'
+ OeffnenDlg.Cancel
+ sleep 1
+ Kontext "TabInteraktion"
+ '/// Select 8th entry from top in 'Action at mouse click' : 'Run Program' ///'
+ AktionBeiMausklick.select 9
+ Printlog AktionBeiMausklick.GetSelText + " chosen"
+ Call DialogTest (TabInteraktion, 7)
+ Kontext "TabInteraktion"
+ '///+ click button 'Browse...' ///'
+ Durchsuchen.Click
+ sleep 1
+ Kontext "OeffnenDlg"
+ Call dialogTest (OeffnenDlg)
+ '///+ cancel dialog 'open' ///'
+ OeffnenDlg.Cancel
+ sleep 1
+ '/// Select 9th entry from top in 'Action at mouse click' : 'Run Macro' ///'
+ Kontext "TabInteraktion"
+ AktionBeiMausklick.select 10
+ Printlog AktionBeiMausklick.GetSelText + " chosen"
+ sleep 3
+ Call DialogTest (TabInteraktion, 6)
+ '///+ click button 'Browse...' ///'
+ Durchsuchen.Click
+ sleep 1
+ Kontext "ScriptSelector"
+ sleep 1
+ Call DialogTest ( ScriptSelector, 1)
+ sleep 1
+ '///+ cancel dialog 'ScriptSelector' ///'
+ ScriptSelector.Cancel
+ sleep 1
+ '/// Select 10th entry from top in 'Action at mouse click' : 'Exit Presentation' ///'
+ Kontext "TabInteraktion"
+ AktionBeiMausklick.select 11
+ Printlog AktionBeiMausklick.GetSelText + " chosen"
+ Call DialogTest (TabInteraktion, 7)
+ Kontext "TabInteraktion"
+ '/// close dialog 'Interaction' ///'
+ TabInteraktion.Close
+ sleep 2
+ '/// close application ///'
+ Call hCloseDocument
+endcase
+
+
+
+
+
diff --git a/testautomation/graphics/optional/includes/impress/im_011_.inc b/testautomation/graphics/optional/includes/impress/im_011_.inc
new file mode 100644
index 000000000000..30ab1bebb74e
--- /dev/null
+++ b/testautomation/graphics/optional/includes/impress/im_011_.inc
@@ -0,0 +1,173 @@
+'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
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* Owner : wolfram.garten@oracle.com
+'*
+'* short description : Impress Required Test Library (11)
+'*
+'\*****************************************************************
+
+testcase tiDiaLeiste
+
+' only in IMPRESS
+ dim sTemp as string
+ Dim i,x as integer
+
+'/// open application ///'
+ Call hNewDocument
+ sleep 1
+'/// Change options so the presentation won't start from the current, but the first slide. ///'
+ ToolsOptions
+ hToolsOptions ( "IMPRESS", "General" )
+ MitAktuellerSeite.Uncheck
+ Kontext "ExtrasOptionenDlg"
+ ExtrasOptionenDlg.OK
+
+'/// insert a graphic: "global\input\graf_inp\desp.bmp") ///'
+ Printlog "- Insert graphic from file so there is something for the slide mode"
+ hGrafikEinfuegen ConvertPath (gTesttoolPath + "global\input\graf_inp\desp.bmp")
+ sleep 3
+'///+ Insert->Slide ///'
+ InsertSlide
+ sleep 2
+ hTypekeys "<Pagedown>"
+ sleep 2
+'///+ insert a graphic: "global\input\graf_inp\desp.bmp") ///'
+ hGrafikeinfuegen ConvertPath (gTesttoolPath + "global\input\graf_inp\desp.bmp")
+ sleep 3
+'///+ View->Master View->Slides View ///'
+ ViewWorkspaceSlidesView
+ sleep 2
+'-------------------------------- Ueberblendeffekt ----------------------------------------
+ Printlog "- Test blend effect"
+ Kontext "SlideViewObjectbar" ' CORRECT
+ sleep 5
+
+ if Ueberblendeffekt.GetItemCount <> 57 then warnlog "these are not 57: " + Ueberblendeffekt.GetItemCount
+'/// select last entry 'Automatic (random)' in listbox 'Slide Effects' on object toolbar ///'
+ Ueberblendeffekt.Select (Ueberblendeffekt.GetItemCount)
+ Printlog " select last effect (random effect): " + Ueberblendeffekt.GetSelText
+
+' Printlog Geschwindigkeit.GetRT ' 341 listbox
+' Printlog Diawechsel.GetRT ' 341 listbox
+' Printlog Zeit.GetRT ' 353 spinfield
+' Printlog DiasProReihe.GetRT ' 353 spinfield
+' Printlog PraesentationMitZeitnahme.GetRT doesn't work, but behave as button
+' Printlog DiaAnzeigen.GetRT doesn't work, but behave as button
+
+'-------------------------------- Geschwindigkeit -----------------------------------------
+ Printlog "- Check different speed settings"
+ Kontext "SlideViewObjectbar"
+'/// select every item in list 'Transition Speed' ///'
+ x = Geschwindigkeit.GetItemCount
+ for i = 1 to x
+ Geschwindigkeit.Select i
+ Printlog " changed to: " + Geschwindigkeit.GetSelText
+ next i
+'-------------------------------- Diawechsel ----------------------------------------------
+ Printlog "- Style of slide change"
+ Kontext "SlideViewObjectbar"
+'/// select every item in list 'Auto Transition' ///'
+ x = Diawechsel.GetItemCount
+ for i = 1 to x
+ Diawechsel.Select i
+ Printlog " Changed to: " + Diawechsel.GetSelText + "; is time enabled ?: "+Zeit.IsEnabled
+ next i
+'-------------------------------- Diawechsel Zeitintervall --------------------------------
+ Printlog "- Zeitintervall testen"
+ Kontext "SlideViewObjectbar"
+'/// select last entry 'Automatic' in listbox 'Auto Transition' ///'
+ Diawechsel.Select (Diawechsel.GetItemCount) ' automatic is usually the last one
+ sleep 1
+ if (Zeit.IsEnabled = FALSE) Then Warnlog "- Time should be editable, if automatic is chosen"
+'/// type "15" into the field 'Time' ///'
+ Zeit.SetText "15"
+ sleep 1
+ Printlog " Time set to: " + Zeit.GetText
+'-------------------------------- Praesentation mit Zeitnahme ------------------------------
+ Printlog "- Presentation with rehearsed timings"
+ Kontext "SlideViewObjectbar"
+'/// click button 'Rehearse Timings' ///'
+ PraesentationMitZeitnahme.Click
+ sleep 2
+ Kontext "DocumentPresentation"
+ if DocumentPresentation.exists (5) then
+ sleep 5
+'/// wait some seconds and click with mouse ///'
+ DocumentPresentation.MouseDown 50,50
+ DocumentPresentation.MouseUp 50,50
+ sleep 2
+'/// wait some seconds and click with mouse ///'
+ DocumentPresentation.MouseDown 50,50
+ DocumentPresentation.MouseUp 50,50
+ sleep 3
+ else
+ warnlog "Didn't switch into presentation mode :-("
+ endif
+ Kontext "DocumentPresentation"
+ if DocumentPresentation.exists (5) then
+ warnlog "We are still in presentation mode :-( WHY!!!!???"
+ endif
+'------------------------------- Dia anzeigen ja/nein --------------------------------------
+ Printlog "- Show slide yes/no"
+ Kontext "SlideViewObjectbar"
+'/// click button 'Show/Hide Slide' ///'
+ DiaAnzeigen.Click
+ sleep 3
+'/// click button 'Show/Hide Slide' ///'
+ DiaAnzeigen.Click
+'------------------------------- Dias pro Reihe --------------------------------------------
+ Printlog "- Presentation with rehearsed timings"
+ Kontext "SlideViewObjectbar"
+ sTemp = DiasProReihe.GetText
+'/// press button 'less' in field 'Slides Per Row' ///'
+ DiasProReihe.Less
+ if sTemp = DiasProReihe.GetText then warnlog " nothing changed (less)"
+ sTemp = DiasProReihe.GetText
+'/// press button 'more' in field 'Slides Per Row' ///'
+ DiasProReihe.more
+ if sTemp = DiasProReihe.GetText then warnlog " nothing changed (more 1)"
+ sTemp = DiasProReihe.GetText
+'/// press button 'more' in field 'Slides Per Row' ///'
+ DiasProReihe.more
+ if sTemp = DiasProReihe.GetText then warnlog " nothing changed (more 2)"
+ kontext
+ if active.exists then
+ warnlog "active (1): '"+active.gettext+"'"
+ endif
+'/// Restore default settings in ToolsOptions ///'
+ ToolsOptions
+ hToolsOptions ( "IMPRESS", "General" )
+ MitAktuellerSeite.Check
+ Kontext "ExtrasOptionenDlg"
+ ExtrasOptionenDlg.OK
+'/// close application ///'
+ Call hCloseDocument
+ sleep 2
+endcase
+
+
diff --git a/testautomation/graphics/optional/includes/impress/options.inc b/testautomation/graphics/optional/includes/impress/options.inc
new file mode 100644
index 000000000000..cfce04e68805
--- /dev/null
+++ b/testautomation/graphics/optional/includes/impress/options.inc
@@ -0,0 +1,270 @@
+'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
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* Owner : wolfram.garten@oracle.com
+'*
+'* short description : Tests the Presentation-Engines effects
+'*
+'*******************************************************************
+'*
+' #1 tiPEngineOptionsTest
+' #1 tiPEngineOptionsTest2
+'*
+'\*******************************************************************
+
+function tiPEngineOptionsTest
+ dim filedialogue as boolean
+ dim lala, optsound, os, oa, odc, ota, ets, etspeed, etrep, etshap, etgt as integer
+
+ Kontext "Tasks"
+' if (NOT bError) then
+ '/// CLick on button '...' (Options) ///'
+ EffectOptions.Click
+ kontext "TabEffect"
+ if TabEffect.Exists(5) then
+ optsound = Sound.GetItemCount
+ for os = 1 to optsound
+ Sound.Select os
+ kontext "OeffnenDlg"
+ if OeffnenDlg.Exists (5) then
+ filedialogue = TRUE
+ OeffnenDlg.Close
+ kontext "TabEffect"
+ else
+ kontext "TabEffect"
+' if play.isEnabled then
+' try
+' play.click
+' catch
+' warnlog Sound.GetSelText + " wasn't played correctly."
+' endcatch
+' endif
+ endif
+ next os
+ if AfterAnimation.isEnabled AND AfterAnimation.isVisible then
+ for oa = 1 to AfterAnimation.GetItemCount
+ AfterAnimation.Select oa
+ if DimColor.isEnabled then
+ for odc = 1 to DimColor.GetItemCount
+ DimColor.Select odc
+ next odc
+ endif
+ if DelayBetweenCharacters.isEnabled then
+ for odc = 1 to DelayBetweenCharacters.GetItemCount
+ DelayBetweenCharacters.Select odc
+ next odc
+ endif
+ next oa
+ else
+ if DelayBetweenCharacters.isEnabled then
+ for odc = 1 to DelayBetweenCharacters.GetItemCount
+ DelayBetweenCharacters.Select odc
+ next odc
+ endif
+ endif
+ for ota = 1 to TextAnimation.GetItemCount
+ TextAnimation.Select ota
+ next ota
+ '/// switch to TabPage 'Timing' ///'
+ Kontext
+ Active.SetPage TabTiming
+ kontext "TabTiming"
+ if TabTiming.Exists(5) then
+ for ets = 1 to TimingStart.GetItemCount
+ TimingStart.Select ets
+ next ets
+ if Delay.isVisible AND Delay.isEnabled then
+ Delay.GetText
+ else
+ Warnlog "Delay in Effect Options were not to be found."
+ endif
+ if Speed.isVisible AND Speed.isEnabled then
+ for etspeed = 1 to Speed.GetItemCount
+ Speed.Select etspeed
+ next etspeed
+ else
+ printlog " No Speed-entry for this effect."
+ endif
+ if Repeat.isVisible AND Repeat.isEnabled then
+ for etrep = 1 to Speed.GetItemCount
+ Repeat.Select etrep
+ next etrep
+ else
+ Printlog "Repeat in Effect Options were not to be found."
+ endif
+ Rewind.Check
+ Rewind.UnCheck
+ TriggerAnimate.IsChecked
+ TriggerStart.IsChecked
+ if Shape.isVisible AND Shape.isEnabled then
+ for etshap = 1 to Shape.GetItemCount
+ Shape.Select etshap
+ next etshap
+ else
+ Warnlog "Shape in Effect Options were not to be found."
+ endif
+ else
+ warnlog "Impress:Tasks Pane:Custom Animation:Effect Options: Timing TabPage didn't work."
+ endif
+ '/// switch to TabPage 'Timing' ///'
+ Kontext
+ active.setPage TabTextAnimation
+ kontext "TabTextAnimation"
+ if TabTextAnimation.Exists(5) then
+ lala = GroupText.GetItemCount
+ for etgt = 1 to lala
+ GroupText.Select etgt
+ if AutomaticallyAfter.IsEnabled then
+ AutomaticallyAfter.Check
+ AutomaticallyAfter.TypeKeys "<UP>"
+ endif
+ if AnimateAttachedShape.IsEnabled then
+ AnimateAttachedShape.Check
+ if AnimateAttachedShape.IsChecked = FALSE then
+ Warnlog "AnimateAttachedShape should have been checked"
+ endif
+ endif
+ if InreverseOrder.IsEnabled then
+ InreverseOrder.Check
+ if InreverseOrder.IsChecked = FALSE then
+ Warnlog "InreverseOrder should have been checked"
+ endif
+ endif
+ next etgt
+ TabTextAnimation.Cancel
+ else
+ warnlog "Impress:Tasks Pane:Custom Animation:Effect Options: TextAnimation TabPage didn't work."
+ endif
+ else
+ warnlog "Impress:Tasks Pane:Custom Animation:... button didn't work."
+ endif
+ Kontext "Tasks"
+end function
+
+
+
+function optionstest2
+ dim filedialogue as boolean
+ dim lala, optsound, os, oa, odc, ota, ets, etspeed, etrep, etshap, etgt as integer
+
+ Kontext "Tasks"
+ EffectOptions.Click
+ kontext "TabEffect"
+ if TabEffect.Exists(5) then
+ Sound.Select 5
+ AfterAnimation.Select 2
+ if DimColor.isEnabled then
+ DimColor.Select 5
+ else
+ Warnlog "DimColor should have been enabled"
+ endif
+ TextAnimation.Select 3
+ if DelayBetweenCharacters.isEnabled then
+ DelayBetweenCharacters.More 5
+ else
+ Warnlog "DelayBetweenCharacters should have been enabled"
+ endif
+ '/// switch to TabPage 'Timing' ///'
+ Kontext
+ Active.SetPage TabTiming
+ kontext "TabTiming"
+ if TabTiming.Exists(5) then
+ TimingStart.Select 2
+ if Delay.isVisible AND Delay.isEnabled then
+ Delay.More 5
+ else
+ Warnlog "Delay in Effect Options were not to be found."
+ endif
+ if Speed.isVisible AND Speed.isEnabled then
+ Speed.Select 3
+ else
+ Printlog "Speed in Effect Options were not to be found."
+ endif
+ if Repeat.isVisible AND Repeat.isEnabled then
+ for etrep = 1 to Speed.GetItemCount
+ Repeat.Select etrep
+ next etrep
+ else
+ Warnlog "Repeat in Effect Options were not to be found."
+ endif
+ if Rewind.isVisible AND Rewind.isEnabled then
+ Rewind.Check
+ else
+ Printlog "Rewind in Effect Options were not to be found."
+ endif
+ if Rewind.isVisible AND Rewind.isEnabled then
+ Rewind.Check
+ Rewind.UnCheck
+ else
+ Warnlog "Rewind in Effect Options were not to be found."
+ endif
+ TriggerAnimate.IsChecked
+ TriggerStart.IsChecked
+ if Shape.isVisible AND Shape.isEnabled then
+ for etshap = 1 to Shape.GetItemCount
+ Shape.Select etshap
+ next etshap
+ else
+ Warnlog "Shape in Effect Options were not to be found."
+ endif
+ else
+ warnlog "Impress:Tasks Pane:Custom Animation:Effect Options: Timing TabPage didn't work."
+ endif
+ '/// switch to TabPage 'Timing' ///'
+ Kontext
+ active.setPage TabTextAnimation
+ kontext "TabTextAnimation"
+ if TabTextAnimation.Exists(5) then
+ lala = GroupText.GetItemCount
+ for etgt = 1 to lala
+ GroupText.Select etgt
+ if AutomaticallyAfter.IsEnabled then
+ AutomaticallyAfter.Check
+ AutomaticallyAfter.TypeKeys "<UP>"
+ endif
+ if AnimateAttachedShape.IsEnabled then
+ AnimateAttachedShape.Check
+ if AnimateAttachedShape.IsChecked = FALSE then
+ Warnlog "AnimateAttachedShape should have been checked"
+ endif
+ endif
+ if InreverseOrder.IsEnabled then
+ InreverseOrder.Check
+ if InreverseOrder.IsChecked = FALSE then
+ Warnlog "InreverseOrder should have been checked"
+ endif
+ endif
+ next etgt
+ TabTextAnimation.Cancel
+ else
+ warnlog "Impress:Tasks Pane:Custom Animation:Effect Options: TextAnimation TabPage didn't work."
+ endif
+ else
+ warnlog "Impress:Tasks Pane:Custom Animation:... button didn't work."
+ endif
+ Kontext "Tasks"
+end function