Commits

Anonymous committed 719e09f Merge

CWS-TOOLING: integrate CWS automationdev300m86graphics

Comments (0)

Files changed (6)

testautomation/graphics/optional/includes/global/g_edit.inc

   else
 
       Call hNewDocument
+      call sSelectEmptyLayout
       sleep 1               '/// new document ///'
       InsertObjectOLEObject             '/// insert writer ole object ///'
       Kontext "OLEObjektEinfuegen"

testautomation/graphics/optional/includes/global/g_tools.inc

     endif
 
     Call hFileOpen (gTesttoolpath + "graphics\required\input\recht_" + iSprache + sExt)
-
+    Call sMakeReadOnlyDocumentEditable
     Call hTextrahmenErstellen (sWord,20,20,50,30)
     sleep 1
 

testautomation/graphics/optional/includes/impress/i_us2_present.inc

     DocumentImpress.UseMenu
     hMenuSelectNr (4)
     hMenuSelectNr (1)
+    call sSelectEmptyLayout
     sleep (1)
 
     kontext "Slides"

testautomation/graphics/optional/includes/impress/i_us_present.inc

     printlog "New master"
     MenuSelect(MenuGetItemID(1))
     sleep (1)
-    ViewMasterPage
-    kontext "Slides"
-    SlidesControl.OpenContextMenu(true)
-    sleep (2)
-    MenuSelect(MenuGetItemID(1)) 'New Master
-    sleep (1)
     printlog "   Inserted second Master-Slide"
 
 
     if ExportierenDlg.IsVisible(5) then
         printlog "   Gallery-object correctly copied into Slide."
         ExportierenDlg.Close
-        ToolsGallery
         WaitSlot (2000)
     end if
     kontext "GraphicObjectbar"
         kontext "DocumentImpress"
         ViewToolbarsPicture
     end if
-    Kontext "Gallery"
-    View.TypeKeys "<HOME><RIGHT><RIGHT>"
-    printlog "'OpenContextMenu"
-    View.TypeKeys "<SHIFT F10>"
-    sleep (2)
-    MenuSelect(MenuGetItemID(1))   'Insert
-    sleep (2)
-    MenuSelect(MenuGetItemID(1))   'Copy
-    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
-    else
-        warnlog "   Doesn't seem like we copied anything from the Gallery... ?"
-    end if
-    kontext "GraphicObjectbar"
-    if GraphicObjectbar.Exists(5) = FALSE then
-        kontext "DocumentImpress"
-        ViewToolbarsPicture
-    end if
+
     kontext "Gallery"
     Gallerys.Select (iPictures)
     printlog " 50% Transparency"
     Width.SetText "16"
     Height.SetText "16"
     Mosaic.OK
-    kontext "GraphicFilterBar"
-    GraphicFilterBar.Close
-    ToolsGallery
-    WaitSlot (1000)
-    kontext "DocumentImpress"
-    hTypeKeys "<TAB>"
-    sleep (1)
-
+    
     kontext "GraphicFilterBar"
     Mosaic.Click
 
 
     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"
 
     printlog "   Did the 'mistake' to FadeIn/Out the Slidepane"
 
-    printlog "activating the input picture area"
-    kontext "DocumentImpress"
-    DocumentImpress.TypeKeys "<TAB>",2
-    DocumentImpress.TypeKeys "<RETURN>"
-    sleep (1)
+
+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"

testautomation/graphics/tools/id_tools.inc

 
 '-------------------------------------------------------------------------------
 
-function fGetSizeXY (sX as string, sY as string, bRetrieveOnly as boolean) as Boolean
+function fGetSizeXY (sX as string, sY as string, bGet as boolean) as Boolean
+   dim sTx as string
+   dim sTy as string
+   dim bReturn as boolean
 
-    const RC_FAILURE = -1
-
-    dim sTx as string
-    dim sTy as string
-
-    fGetSizeXY() = True
-
-    if ( hUseAsyncSlot( "ContextPositionAndSize" ) <> RC_FAILURE ) then
-
-        kontext
-        active.SetPage TabPositionAndSize
-
-        kontext "TabPositionAndSize"
-        if ( TabPositionAndSize.exists( 2 ) ) then
-            sTx = Width.GetText()
-            sTy = Height.GetText()
-            hCloseDialog( TabPositionAndSize, "ok" )
-        else
-            warnlog "Couldn't switch tab page :-( "
-        endif
-
-        if ( bRetrieveOnly ) then  ' Get the Values only
-            sY = sTy
-            sX = sTx
-        else          ' Get the Values and compare them
-            if ( not LiberalMeasurement (sX,sTx) ) then
-                warnlog "width is different :-( should: '"+sX+"' is: '"+sTx+"'" + "eventually a result of i35519"
-                fGetSizeXY() = False
-            endif
-            if (not LiberalMeasurement (sY,sTy) ) then
-                warnlog "hight is different :-( should: '"+sY+"' is: '"+sTy+"'" + "eventually a result of i35519"
-                fGetSizeXY() = False
-            endif
-        endif
-    else
-        warnlog( "Failed to open <Position And Size> dialog" )
-    endif
-
+   bReturn = True
+   try
+      ContextPositionAndSize
+   catch
+      warnlog "couldn't call 'ContextPositionAndSize' no object selected ?"
+   endcatch
+   kontext
+   active.SetPage TabPositionAndSize
+   kontext "TabPositionAndSize"
+   if TabPositionAndSize.exists (5) then
+      sTx = Width.GetText
+      sTy = Height.GetText
+      TabPositionAndSize.OK
+   else
+      warnlog "Couldn't switch tab page :-( "
+   endif
+   if bGet then  ' Get the Values only
+      sY = sTy
+      sX = sTx
+   else          ' Get the Values and COMPARE them
+      if (LiberalMeasurement (sX,sTx) <> TRUE) then
+         warnlog "width is different :-( should: '"+sX+"' is: '"+sTx+"'" + "eventually a result of i35519"
+         bReturn = False
+      endif
+      if (LiberalMeasurement (sY,sTy) <> TRUE) then
+         warnlog "hight is different :-( should: '"+sY+"' is: '"+sTy+"'" + "eventually a result of i35519"
+         bReturn = False
+      endif
+      bGet = bReturn
+   endif
 end function
-
 '-------------------------------------------------------------------------
 
 function hCallExport ( cFileName as String , sFilter as String, optional bSelection as boolean ) as Boolean

testautomation/graphics/tools/id_tools_2.inc

     Dim iHMax
     if app.FileLen(sFile) = "0" then warnlog "   the file (" + (sFile) + ") seems to be zero bytes large."
     call hGrafikEinfuegen ( sFile )
+    sleep (1)
     FormatGraphics
     Kontext
     Active.SetPage TabType