'encoding UTF-8 Do not remove or change this line! '************************************************************************* ' ' Licensed to the Apache Software Foundation (ASF) under one ' or more contributor license agreements. See the NOTICE file ' distributed with this work for additional information ' regarding copyright ownership. The ASF licenses this file ' to you under the Apache License, Version 2.0 (the ' "License"); you may not use this file except in compliance ' with the License. You may obtain a copy of the License at ' ' http://www.apache.org/licenses/LICENSE-2.0 ' ' Unless required by applicable law or agreed to in writing, ' software distributed under the License is distributed on an ' "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY ' KIND, either express or implied. See the License for the ' specific language governing permissions and limitations ' under the License. ' '************************************************************************* '* '* 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" printlog "new document" Call hNewDocument try printlog "view background notes" ViewNotes sleep 3 catch Warnlog "View-Notes could not be accessed" endcatch ViewWorkspaceDrawingView sleep 1 printlog "close document" Call hCloseDocument sleep 1 endcase 'tAnsichtHintergrundNotizen '------------------------------------------------------------------------------- testcase tViewWorkspaceHandoutView Printlog "- View background handout" printlog "new document" Call hNewDocument sleep 2 Kontext "DocumentImpress" DocumentImpress.UseMenu hMenuSelectNr (5) hMenuSelectNr (13) Printlog " ViewWorkspaceHandoutView" ViewWorkspaceHandoutView 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" printlog "back to view background drawing" ViewWorkspaceDrawingView printlog "close document" Call hCloseDocument endcase 'tViewWorkspaceHandoutView '------------------------------------------------------------------------------- testcase tViewWorkspaceOutlineView qaerrorlog "Outcommenting tViewWorkspaceOutlineView due to unreability. - FHA" goto endsub dim sFile as string dim i as integer printlog "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 printlog "document used : graphics\\required\\input\\outlinefromwriter.sxw -> you get into writer" sFile = ConvertPath (gTesttoolPath + "graphics\required\input\outlinefromwriter.sxw") hDateiOeffnen (sFile) sleep 10 printlog "with 'File->Send->Outline to presentation' you get into impress" FileSendOutlineToPresentation sleep 10 Printlog "printlog View->Workspace->Outline View" ViewWorkspaceOutlineView sleep 1 printlog "go to the line with the 'I' (via 'search & replace' function)" hTypeKeys "" EditSelectAll hFindeImDokument ("I") printlog "expected level/style: 'Outline 8'" printlog "get last character from selected style in stylist (expect a number of the outline(heading level)" fGetPresentationStyle ("8") printlog "type keys [home] [tab] to go one level down" Kontext "DocumentImpressOutlineView" DocumentImpressOutlineView.TypeKeys "" printlog "expected level/style: 'Outline 9'" fGetPresentationStyle ("9") Kontext "DocumentImpressOutlineView" printlog "Edit - Select All to go select the whole text" EditSelectAll printlog "type keys [shift]+[tab] eight times, to get all lines to the highest, except the one with the 'I'" DocumentImpressOutlineView.TypeKeys ("", 8) hPrepareSearchBUG hTypeKeys "" EditSelectAll hFindeImDokument ("I") printlog "expected level/style: 'Outline 1" fGetPresentationStyle ("1") printlog "type keys [shift]+[tab] to get the last line to the highest level, too" Kontext "DocumentImpressOutlineView" DocumentImpressOutlineView.TypeKeys ("", 1) printlog "expected level/style: 'Title'" fGetPresentationStyle (0) Kontext "DocumentImpressOutlineView" DocumentImpressOutlineView.TypeKeys ("", 1) Printlog "call 'Edit->Undo' nine times" for i = 1 to 9 editundo next i hPrepareSearchBUG hFindeImDokument ("I") printlog "expected level/style: 'Outline 9'" fGetPresentationStyle (9) Printlog "call 'Edit->Redo' nine times " for i = 1 to 9 editredo next i try editredo Warnlog "NOT OK :-(" catch Printlog "OK" endcatch hPrepareSearchBUG hTypeKeys "" EditSelectAll hFindeImDokument ("I") printlog "expected level/style: 'Title'" fGetPresentationStyle (0) Printlog "call 'Edit->Undo' nine times" for i = 1 to 9 editundo next i hPrepareSearchBUG hTypeKeys "" EditSelectAll hFindeImDokument ("I") printlog "expected level/style: 'Outline 9" fGetPresentationStyle (9) printlog "type keys [strg]+[A]" Kontext "DocumentImpressOutlineView" EditSelectAll printlog "type keys [strg]+[X]" DocumentImpressOutlineView.TypeKeys "" 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 printlog "'Edit->Undo'" editundo printlog "'Edit->Redo'" editredo printlog "'Edit->Undo'" editundo printlog "type keys [strg]+[A]" Kontext "DocumentImpressOutlineView" EditSelectAll printlog "type keys [strg]+[X]" DocumentImpressOutlineView.TypeKeys "" 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 printlog "type keys [strg]+[V]" Kontext "DocumentImpressOutlineView" DocumentImpressOutlineView.TypeKeys "" printlog "'Edit->Undo'" editundo printlog "'Edit->Redo'" editredo printlog "type keys [strg]+[End]" Kontext "DocumentImpressOutlineView" DocumentImpressOutlineView.TypeKeys "" printlog "type keys [strg]+[V]" DocumentImpressOutlineView.TypeKeys "" printlog "type keys [strg]+[A]" EditSelectAll printlog "type keys [delete]" DocumentImpressOutlineView.TypeKeys "" 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 printlog "type keys [strg]+[A]" Kontext "DocumentImpressOutlineView" EditSelectAll try editcopy Printlog "OK" catch Warnlog "error 4711 TBO :-(" endcatch printlog "type keys [delete]" Kontext "DocumentImpressOutlineView" DocumentImpressOutlineView.TypeKeys "" 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 printlog "close document" Call hCloseDocument endcase 'tViewWorkspaceOutlineView '------------------------------------------------------------------------------- testcase tViewWorkspaceDrawingView Printlog "- View/Background-drawing" printlog "new document" Call hNewDocument sleep 2 printlog "view background drawing" ViewDrawing try printlog "create rectangle" hRechteckErstellen ( 20,20,40,40 ) sleep 1 Printlog " - rectangle created" catch Warnlog " Rectangle could not be created" endcatch printlog "close document" Call hCloseDocument endcase 'tViewWorkspaceDrawingView '------------------------------------------------------------------------------- testcase tAnsichtEbene printLog "- View/Layer" printlog "new document-autopilot" FileAutopilotPresentation Kontext "AutopilotPraesentation1" sleep 5 AutopilotPraesentation1.Ok sleep 2 sleep 2 printlog "back to view slide" ViewSlide Sleep 2 printlog "close document" Call hCloseDocument endcase 'tAnsichtEbene '-------------------------------------------------------------------------------