summaryrefslogtreecommitdiff
path: root/testautomation/writer/optional/includes/clipboard
diff options
context:
space:
mode:
Diffstat (limited to 'testautomation/writer/optional/includes/clipboard')
-rwxr-xr-xtestautomation/writer/optional/includes/clipboard/clipbrd_func.inc447
-rw-r--r--testautomation/writer/optional/includes/clipboard/w_210_.inc455
-rw-r--r--testautomation/writer/optional/includes/clipboard/w_211_.inc540
-rw-r--r--testautomation/writer/optional/includes/clipboard/w_212_.inc532
-rw-r--r--testautomation/writer/optional/includes/clipboard/w_213_.inc533
-rw-r--r--testautomation/writer/optional/includes/clipboard/w_214_.inc524
-rw-r--r--testautomation/writer/optional/includes/clipboard/w_215_.inc448
-rw-r--r--testautomation/writer/optional/includes/clipboard/w_216_.inc440
-rw-r--r--testautomation/writer/optional/includes/clipboard/w_217_.inc393
-rw-r--r--testautomation/writer/optional/includes/clipboard/w_218_.inc402
-rw-r--r--testautomation/writer/optional/includes/clipboard/w_219_.inc397
-rw-r--r--testautomation/writer/optional/includes/clipboard/w_220_.inc392
-rw-r--r--testautomation/writer/optional/includes/clipboard/w_221_.inc430
-rw-r--r--testautomation/writer/optional/includes/clipboard/w_222_.inc432
14 files changed, 6365 insertions, 0 deletions
diff --git a/testautomation/writer/optional/includes/clipboard/clipbrd_func.inc b/testautomation/writer/optional/includes/clipboard/clipbrd_func.inc
new file mode 100755
index 000000000000..bad0c5f41dae
--- /dev/null
+++ b/testautomation/writer/optional/includes/clipboard/clipbrd_func.inc
@@ -0,0 +1,447 @@
+'**************************************************************************
+' 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 : helge.delfs@sun.com
+'*
+'* short description : Functions for HTML-Test
+'*
+'************************************************************************
+'*
+' #0 wPasteAvailableClipboardFormats(TheNumber as integer
+' #0 wSetClipboardtestDefaults(ForWhat as string) as boolean
+' #0 wInsertNewCalcSheet(SheetName as string) as booloean
+' #0 wRenameCalcSheet(NewName as string) as boolean
+' #0 wFilterSpecialCharacters(ToFilter as string) as string
+' #0 ReplaceCharacter(stringToChange$
+' #0 wChangeHTMLCompatibility ( optional RecentCompatibility as integer ) as integer
+'*
+'\***********************************************************************
+
+function wPasteAvailableClipboardFormats(TheNumber as integer, CheckWhat as String )
+ Dim i as integer, ClipboardFormat as string
+ For i = 1 to TheNumber
+ try
+ Auswahl.Select i
+ catch
+ if i <= TheNumber then
+ QAErrorlog "Number of clipboard formats seems to be changed!"
+ end if
+ exit for
+ endcatch
+ ClipboardFormat = Auswahl.GetSeltext
+ printlog "- Paste as: " + ClipboardFormat
+ Select Case CheckWhat
+ Case "ctext", "DRAW"
+ if lcase(gPlatform) = "sol" and lcase(ClipboardFormat) = "bitmap" then
+ QAErrorlog "#i49505#Paste drawing object as bitmap crashes office"
+ goto s_next_item
+ else
+ InhaltEinfuegen.Ok
+ Sleep 3
+ end if
+ Case else
+ InhaltEinfuegen.Ok
+ Sleep 3
+ end select
+
+ Select Case gApplication
+ Case "CALC"
+ Kontext "TextImport"
+ if TextImport.Exists then TextImport.Ok
+ end select
+
+ Kontext "Active"
+ if Active.Exists then
+ QAErrorlog " - " + Active.Gettext + "->Bug#110181"
+ Active.Ok
+ end if
+ Call wDocSetContext
+ Call wTypeKeys "<Escape>",2
+ Select Case gApplication
+ Case "WRITER","MASTERDOCUMENT","HTML"
+ Select Case CheckWhat
+ Case "text","field","table"
+ Call wTypeKeys "<Down><End><Return>"
+ Call wTypeKeys "(" + Clipboardformat + ")"
+ Call wTypeKeys "<End><Return>",2
+ Case "frame", "DRAW", "graphicL", "graphicE", "ole", "control", "ctext"
+ 'Call gMouseClick (50,100)
+ Call wTypeKeys ("<Escape>")
+ Call wTypeKeys "(" + Clipboardformat + ")"
+ if i < TheNumber Then
+ if gApplication <> "HTML" then
+ InsertManualBreak
+ Kontext "UmbruchEinfuegen"
+ Seitenumbruch.Check
+ UmbruchEinfuegen.OK
+ else
+ Call wTypeKeys ("<Return>" , 2)
+ end if
+ end if
+ end select
+ EditPasteSpecialWriter
+
+ Case "IMPRESS","DRAW"
+ Call gMouseClick(7,7)
+ Call wRenameImpressSlide(ClipboardFormat)
+ if i < TheNumber Then
+ Call wInsertNewImpressSlide
+ EditPasteSpecial
+ end if
+ Case "CALC"
+ printlog " Rename first sheet"
+ if wRenameCalcSheet(Clipboardformat) = False then
+ Warnlog "Unable to rename Sheet Name !"
+ end if
+ if i < TheNumber Then
+ if wInsertNewCalcSheet(Clipboardformat) = False then
+ Warnlog "Unable to set Sheetname : " + Clipboardformat
+ end if
+ EditPasteSpecialCalc
+
+ end if
+ end select
+ s_next_item:
+ Kontext "InhaltEinfuegen"
+ next i
+ kontext "NavigatorDraw"
+ if NavigatorDraw.Exists then NavigatorDraw.Close
+ kontext "Navigator"
+ if Navigator.Exists then Navigator.Close
+
+ kontext "InhaltEinfuegen"
+ f_exit:
+ if InhaltEinfuegen.Exists then InhaltEinfuegen.Cancel
+end function
+
+' ---------------------------------------------------------------------------------
+
+function wSetClipboardtestDefaults(ForWhat as string) as boolean
+ printlog " Points cursor to beginning of document "
+ Call hFileOpen (gtesttoolpath & "writer\optional\input\clipboard\writer.sxw")
+ Call sMakeReadOnlyDocumentEditable
+ Kontext "DocumentWriter"
+ printlog " Jump to beginning of document "
+ Call wTypeKeys "<Mod1 Home>"
+ printlog " Check if beginning of document reached "
+ Call wTypeKeys "<Mod1 Shift Right>"
+ EditCopy
+
+ Select Case ForWhat
+ Case "text"
+ '"+ Select first paragraph "
+ Call wTypeKeys "<Shift End>"
+ Call wTypeKeys "<Shift Down>"
+ '"+ Copy selected text "
+
+ Case "field"
+ '"+ Select paragraph with 'Date Field' "
+ Call wTypeKeys "<Down>",3
+ Call wTypeKeys "<Home><Shift End>"
+ '"+ Copy selected text "
+
+ Case "table"
+ '"+ Select paragraph with 'Table' "
+ Call wNavigatorAuswahl(2,1)
+ 'Call wTypeKeys "<Down>",6
+ Call wTypeKeys "<Mod1 A>",2
+ '"+ Copy selected table "
+
+ Case "frame"
+ '"+ Select 'Frame' "
+ Call wTypeKeys ( "<Shift F4>" )
+ '"+ Copy selected frame "
+
+ Case "DRAW"
+ '"+ Select 'Drawing Object' "
+ Call wTypeKeys ( "<Shift F4>" )
+ Call wTypeKeys "<Tab>"
+ '"+ Copy selected Drawing Object "
+
+ Case "graphicL"
+ '"+ Select 'Linked Graphic' "
+ Call wTypeKeys ( "<Shift F4>" )
+ Call wTypeKeys "<Tab>",2
+ '"+ Copy selected Linked Graphic "
+
+ Case "graphicE"
+ '"+ Select 'Embedded Graphic' "
+ Call wTypeKeys ( "<Shift F4>" )
+ Call wTypeKeys "<Tab>",3
+ '"+ Copy selected Embedded Graphic "
+
+ Case "ole"
+ '"+ Select 'OLE Object' "
+ Call wTypeKeys ( "<Shift F4>" )
+ Call wTypeKeys "<Tab>",4
+ '"+ Copy selected OLE Object "
+
+ Case "control"
+ '"+ Select 'Control' "
+ Call wTypeKeys ( "<Shift F4>" )
+ Call wTypeKeys "<Tab>",5
+ '"+ Copy selected Control "
+
+ Case else
+ Warnlog "Unknown object!"
+ end select
+
+ try
+ EditCopy
+ EditCopy 'and a second time to make sure..
+ wSetClipboardtestDefaults = True
+ catch
+ QAErrorlog "Error jump to beginning of document!"
+ wSetClipboardtestDefaults = False
+ endcatch
+
+ ' Because of Clipboard bug set
+ wSetClipboardtestDefaults = True
+end function
+
+' ---------------------------------------------------------------------------------
+
+function wInsertNewCalcSheet(SheetName as string) as boolean
+ SheetName= wFilterSpecialCharacters(SheetName)
+ printlog " Inserts a new shett and sets the name for it "
+ InsertSheetCalc
+ Kontext "TabelleEinfuegenCalc"
+ if TabelleEinfuegenCalc.Exists then
+ Nach.Check
+ printlog " Check 'After current sheet' "
+ NeuErstellen.Check
+ printlog " Check 'New Sheet' "
+ 'Tabellenname.Settext SheetName
+ printlog " Set Name of sheet "
+ TabelleEinfuegenCalc.Ok
+ printlog " Unable to set name of Sheet ? "
+ Kontext "Active"
+ if Active.Exists then
+ if Active.GetRT = 304 then
+ Warnlog Active.Gettext
+ Active.Ok
+ Kontext "TabelleEinfuegenCalc"
+ if TabelleEinfuegenCalc.Exists then TabelleEinfuegenCalc.Cancel
+ wInsertNewCalcSheet = False
+ else
+ wInsertNewCalcSheet = True
+ end if
+ else
+ wInsertNewCalcSheet = True
+ end if
+ else
+ Warnlog "Dialog 'Insert Sheet' not up!"
+ wInsertNewCalcSheet = False
+ end if
+end function
+
+' ---------------------------------------------------------------------------------
+
+function wRenameCalcSheet(NewName as string) as boolean
+ printlog " Renames an existing sheet in calc "
+ FormatSheetRename
+ Kontext "TabelleUmbenennen"
+ if TabelleUmbenennen.Exists then
+ TabellenName.Settext wFilterSpecialCharacters(NewName)
+ TabelleUmbenennen.Ok
+ Kontext "Active"
+ if Active.Exists then
+ if Active.GetRT = 304 then
+ Active.Ok
+ Kontext "TabelleUmbenennen"
+ if TabelleUmbenennen.Exists then TabelleUmbenennen.Cancel
+ wRenameCalcSheet = False
+ else
+ wRenameCalcSheet = True
+ end if
+ else
+ wRenameCalcSheet = True
+ end if
+ else
+ wRenameCalcSheet = False
+ end if
+end function
+
+' ---------------------------------------------------------------------------------
+
+sub wInsertNewImpressSlide()
+ InsertSlide
+end sub
+
+' ---------------------------------------------------------------------------------
+
+sub wRenameImpressSlide(NewName as string)
+ printlog " Edit->Layer->Rename "'
+ try
+ EditRenameSlide
+ Kontext "NameDlgPage"
+ if NameDlgPage.Exists then
+ NameField.Settext NewName
+ NameDlgPage.Ok
+ else
+ try
+ Kontext "DocumentDrawImpress"
+ TabBar.TypeKeys NewName + "<Return>" , true
+ catch
+ Warnlog "Unable to rename Slide (No access to to Tab-Bar!)"
+ endcatch
+ end if
+ catch
+ Warnlog "Unable to rename Slide!"
+ endcatch
+
+end sub
+
+' ---------------------------------------------------------------------------------
+
+function wFilterSpecialCharacters(ToFilter as string) as string
+ Dim i as integer, SpecialCharacters as string
+ SpecialCharacters = "!$%&/()=?\}][{*+~'#;,:.-"
+ printlog " Replace SpecialCharacters in SheetName with an underscore (_) "
+ For i = 1 to len(SpecialCharacters)
+ ToFilter = ReplaceCharacter(ToFilter,Mid$(SpecialCharacters,i,1),"_")
+ next i
+ wFilterSpecialCharacters = ToFilter
+end function
+
+' ---------------------------------------------------------------------------------
+
+function ReplaceCharacter(stringToChange$, charToReplace$, replaceWith$) As String
+
+ 'Replaces a specified character in a string with another character that you specify
+ Dim ln As Long
+ Dim n As Long
+ Dim NextLetter As String
+ Dim FinalString As String
+ Dim txt As String
+ Dim char As String
+ Dim rep As String
+ txt = stringToChange$ 'store all arguments in
+ char = charToReplace$ 'new variables
+ rep = replaceWith$
+
+ ln = Len(txt)
+
+ For n = 1 To ln Step 1
+ NextLetter = Mid(txt, n, 1)
+ If NextLetter = char Then
+ NextLetter = rep
+ End If
+ FinalString = FinalString & NextLetter
+ Next n
+ ReplaceCharacter = FinalString
+
+end function
+
+' ---------------------------------------------------------------------------------
+
+Sub wDisableImpressAutopilot()
+
+ gApplication = "IMPRESS"
+ Call hNewDocument
+ ToolsOptions
+ Call hToolsOptions ("IMPRESS","General")
+ MitAutopilotStarten.UnCheck
+ Kontext "ExtrasOptionenDlg"
+ ExtrasOptionenDlg.OK
+ Call hCloseDocument
+
+end sub
+
+function wChangeHTMLCompatibility ( optional RecentCompatibility as integer ) as integer
+ Dim i as integer
+ Dim CurrentCharSet as String
+ Dim RecentCharSet as integer
+ Dim CharsetFound as boolean
+ printlog " This function sets the charset in options to UTF-8 "
+ printlog " Giving a parameter a special charset will be chosen "
+
+ CharsetFound = False
+ ToolsOptions
+ Call hToolsOptions("LOADSAVE", "HTMLCOMPATIBILITY")
+ if IsMissing(RecentCompatibility) = True then
+ RecentCharSet = Zeichensatz.GetSelIndex
+ For i = 1 to Zeichensatz.GetItemCount
+ Zeichensatz.Select i
+ CurrentCharset = Zeichensatz.GetSelText
+ if Instr(Ucase(CurrentCharset), "UTF-8") then
+ i = Zeichensatz.GetItemCount + 1
+ CharsetFound = True
+ end if
+ next i
+ else
+ CharsetFound = True
+ RecentCharSet = RecentCompatibility
+ Zeichensatz.Select RecentCompatibility
+ end if
+ if CharsetFound = True then
+ printlog "Charset has been changed!"
+ else
+ Warnlog "Couldn't set Charset to UTF-8!"
+ end if
+ Kontext "ExtrasOptionenDlg"
+ ExtrasOptionenDlg.OK
+ wChangeHTMLCompatibility = RecentCharset
+
+end function
+
+' ---------------------------------------------------------------------------------
+
+function wChangeHTMLCompatibilityExport ( optional wExport as integer ) as integer
+ Dim i as integer
+ Dim CurrentExportSet as String
+ Dim RecentExportSet as integer
+ Dim ExportFound as boolean
+ printlog " This function sets the export in options to 'Oracle Open Office Writer' "
+ printlog " Giving a parameter a special export will be chosen "
+
+ ExportFound = False
+ ToolsOptions
+ Call hToolsOptions("LOADSAVE", "HTMLCOMPATIBILITY")
+ if IsMissing ( wExport ) = True then
+ RecentExportSet = Export.GetSelIndex
+ For i = 1 to Export.GetItemCount
+ Export.Select i
+ CurrentExportset = Export.GetSelText
+ if Instr(Ucase(CurrentExportset), "Oracle Open Office Writer") then
+ i = Export.GetItemCount + 1
+ ExportFound = True
+ end if
+ next i
+ else
+ ExportFound = True
+ RecentExportSet = wExport
+ Export.Select RecentExportSet
+ end if
+ if ExportFound = True then
+ printlog "Export has been changed!"
+ else
+ Warnlog "Couldn't set Export to Oracle Open Office Writer!"
+ end if
+ Kontext "ExtrasOptionenDlg"
+ ExtrasOptionenDlg.OK
+ wChangeHTMLCompatibilityExport = RecentExportSet
+end function
diff --git a/testautomation/writer/optional/includes/clipboard/w_210_.inc b/testautomation/writer/optional/includes/clipboard/w_210_.inc
new file mode 100644
index 000000000000..296772b937fc
--- /dev/null
+++ b/testautomation/writer/optional/includes/clipboard/w_210_.inc
@@ -0,0 +1,455 @@
+'**************************************************************************
+' 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 : helge.delfs@sun.com
+'*
+'* short description : CROSS-APPLICATIONS CLIPBOARD TEST (Writer)
+'*
+'\***********************************************************************
+
+sub w_210_
+
+ Call WriterToWriterText
+ Call WriterToWriterField
+ Call WriterToWriterTable
+ Call WriterToWriterFrame
+ Call WriterToWriterDrawingObject
+ Call WriterToWriterGraphicLinked
+ Call WriterToWriterGraphicEmbedded
+ Call WriterToWriterOLEObject
+ Call WriterToWriterControl
+
+end sub
+
+' ---------------------------------------------------------------------------------
+
+testcase WriterToWriterText
+ gApplication = "WRITER"
+ printlog " Open File '..\\writer\\optional\\input\\clipboard\\writer.sxw' "
+ printlog " + Jump to beginning of document "
+ printlog " + Select first paragraph "
+ printlog " + Copy selected text "
+ if wSetClipboardtestDefaults("text") = True then
+ printlog " + Open new document "
+ Call hNewDocument
+ printlog " + Edit / Paste Special "
+ EditPasteSpecialWriter
+ Wait 500
+ printlog " Paste 'Text' in all available clipboard formats "
+ Kontext "InhaltEinfuegen"
+ if InhaltEinfuegen.Exists then
+ printlog " + Write Clipboard format under pasted content "
+ Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"text")
+ printlog " + Save document as ..\user\work\writer_to_writer_text.odt"
+ Call hFileSaveAsWithFilterKill( gOfficepath + "user\work\writer_to_writer_text.odt" , "writer8" )
+ Wait 500
+ printlog " + Close saved document "
+ Call hCloseDocument
+ printlog " + Reopen saved document "
+ if hFileOpen (gOfficepath + "user\work\writer_to_writer_text.odt",true) = false then
+ Kontext "Active"
+ if Active.Exists then
+ try
+ Active.Yes
+ catch
+ Warnlog "Unable to remove checkbox: " + Active.Gettext
+ Active.ok
+ endcatch
+ end if
+ end if
+ printlog " + Close saved document "
+ Call hCloseDocument
+ else
+ Warnlog "Dialog 'Paste Special' is not up!"
+ Call hCloseDocument
+ goto endsub
+ end if
+ else
+ Warnlog "Writer To Writer -> 'Text' failed !"
+ end if
+ printlog " Close active document "
+ Do Until GetDocumentCount = 0
+ Call hCloseDocument
+ Loop
+endcase
+
+' ----------------------------------------------------------------------------------------------
+
+testcase WriterToWriterField
+ gApplication = "WRITER"
+ printlog " Open File '..\\writer\\optional\\input\\clipboard\\writer.sxw' "
+ printlog " + Jump to beginning of document "
+ printlog " + Select paragraph with 'Date Field' "
+ printlog " + Copy selected text "
+ printlog " + Open new document "
+ if wSetClipboardtestDefaults("field") = True then
+ Call hNewDocument
+ printlog " + Edit / Paste Special "
+ EditPasteSpecialWriter
+ Wait 500
+ printlog " Paste 'Field' in all available clipboard formats "
+ Kontext "InhaltEinfuegen"
+ if InhaltEinfuegen.Exists then
+ printlog " + Write Clipboard format under pasted content "
+ Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"field")
+ printlog " + Save document as ..\user\work\writer_to_writer_field.odt"
+ Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\writer_to_writer_field.odt", "writer8")
+ sleep (2) 'Wait 500
+ printlog " + Close saved document "
+ Call hCloseDocument
+ printlog " + Reopen saved document "
+ if hFileOpen (gOfficepath + "user\work\writer_to_writer_field.odt",true) = false then
+ Kontext "Active"
+ if Active.Exists then
+ try
+ Active.Yes
+ catch
+ Warnlog "Unable to remove checkbox: " + Active.Gettext
+ Active.ok
+ endcatch
+ end if
+ end if
+ printlog " + Close saved document "
+ Call hCloseDocument
+ else
+ Warnlog "Dialog 'Paste Special' is not up!"
+ Call hCloseDocument
+ goto endsub
+ end if
+ else
+ Warnlog "Writer To Writer -> 'Field' failed !"
+ end if
+ printlog " Close active document "
+ Do Until GetDocumentCount = 0
+ Call hCloseDocument
+ Loop
+endcase
+
+' ----------------------------------------------------------------------------------------------
+
+testcase WriterToWriterTable
+ gApplication = "WRITER"
+ printlog " Open File '..\\writer\\optional\\input\\clipboard\\writer.sxw' "
+ printlog " + Jump to beginning of document "
+ printlog " + Select 'Table' "
+ printlog " + Copy selected table "
+ printlog " + Open new document "
+ if wSetClipboardtestDefaults("table") = True then
+ Call hNewDocument
+ printlog " + Edit / Paste Special "
+ EditPasteSpecialWriter
+ sleep (1) 'Wait 500
+ printlog " Paste 'Table' in all available clipboard formats "
+ Kontext "InhaltEinfuegen"
+ if InhaltEinfuegen.Exists then
+ printlog " + Write Clipboard format under pasted content "
+ Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"table")
+ printlog " + Save document as ..\user\work\writer_to_writer_table.odt"
+ Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\writer_to_writer_table.odt", "writer8")
+ Wait 500
+ printlog " + Close saved document "
+ Call hCloseDocument
+ printlog " + Reopen saved document "
+ if hFileOpen (gOfficepath + "user\work\writer_to_writer_table.odt",true) = false then
+ Kontext "Active"
+ if Active.Exists then
+ try
+ Active.Yes
+ catch
+ Warnlog "Unable to remove checkbox: " + Active.Gettext
+ Active.ok
+ endcatch
+ end if
+ end if
+ printlog " + Close saved document "
+ Call hCloseDocument
+ else
+ Warnlog "Dialog 'Paste Special' is not up!"
+ Call hCloseDocument
+ goto endsub
+ end if
+ else
+ Warnlog "Writer To Writer -> 'Table' failed !"
+ end if
+ printlog " Close active document "
+ Do Until GetDocumentCount = 0
+ Call hCloseDocument
+ Loop
+endcase
+
+' ----------------------------------------------------------------------------------------------
+
+testcase WriterToWriterFrame
+ gApplication = "WRITER"
+ printlog " Open File '..\\writer\\optional\\input\\clipboard\\writer.sxw' "
+ printlog " + Jump to beginning of document "
+ printlog " + Select 'Frame' "
+ printlog " + Copy selected frame "
+ printlog " + Open new document "
+ if wSetClipboardtestDefaults("frame") = True then
+ Call hNewDocument
+ printlog " + Edit / Paste Special "
+ EditPasteSpecialWriter
+ sleep (1) 'Wait 500
+ printlog " Paste 'Table' in all available clipboard formats "
+ Kontext "InhaltEinfuegen"
+ if InhaltEinfuegen.Exists then
+ printlog " + Write Clipboard format under pasted content "
+ Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"frame")
+ printlog " + Save document as ..\user\work\writer_to_writer_frame.odt"
+ Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\writer_to_writer_frame.odt", "writer8")
+ WaitSlot (2000)
+ printlog " + Close saved document "
+ Call hCloseDocument
+ printlog " + Reopen saved document "
+ Call hFileOpen (gOfficepath + "user\work\writer_to_writer_frame.odt",false)
+ printlog " + Close saved document "
+ Call hCloseDocument
+ else
+ Warnlog "Dialog 'Paste Special' is not up!"
+ Call hCloseDocument
+ goto endsub
+ end if
+ else
+ Warnlog "Writer To Writer -> 'Frame' failed !"
+ end if
+ printlog " Close active document "
+ Do Until GetDocumentCount = 0
+ Call hCloseDocument
+ Loop
+endcase
+
+' ----------------------------------------------------------------------------------------------
+
+testcase WriterToWriterDrawingObject
+ gApplication = "WRITER"
+ printlog " Open File '..\\writer\\optional\\input\\clipboard\\writer.sxw' "
+ printlog " + Jump to beginning of document "
+ printlog " + Select 'Drawing Object' "
+ printlog " + Copy selected Drawing Object "
+ printlog " + Open new document "
+ if wSetClipboardtestDefaults("DRAW") = True then
+ Call hNewDocument
+ printlog " + Edit / Paste Special "
+ EditPasteSpecialWriter
+ Wait 500
+ printlog " Paste 'Table' in all available clipboard formats "
+ Kontext "InhaltEinfuegen"
+ if InhaltEinfuegen.Exists then
+ printlog " + Write Clipboard format under pasted content "
+ Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"DRAW")
+ printlog " + Save document as ..\user\work\writer_to_writer_draw.odt"
+ Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\writer_to_writer_draw.odt", "writer8")
+ WaitSlot (2000)
+ printlog " + Close saved document "
+ Call hCloseDocument
+ printlog " + Reopen saved document "
+ Call hFileOpen (gOfficepath + "user\work\writer_to_writer_draw.odt",false)
+ printlog " + Close saved document "
+ Call hCloseDocument
+ else
+ Warnlog "Dialog 'Paste Special' is not up!"
+ Call hCloseDocument
+ goto endsub
+ end if
+ else
+ Warnlog "Writer To Writer -> 'Drawing Object' failed !"
+ end if
+ printlog " Close active document "
+ Do Until GetDocumentCount = 0
+ Call hCloseDocument
+ Loop
+endcase
+
+' ----------------------------------------------------------------------------------------------
+
+testcase WriterToWriterGraphicLinked
+ gApplication = "WRITER"
+ printlog " Open File '..\\writer\\optional\\input\\clipboard\\writer.sxw' "
+ printlog " + Jump to beginning of document "
+ printlog " + Select 'Linked Graphic' "
+ printlog " + Copy selected Linked Graphic "
+ printlog " + Open new document "
+ if wSetClipboardtestDefaults("graphicL") = True then
+ Call hNewDocument
+ printlog " + Edit / Paste Special "
+ EditPasteSpecialWriter
+ WaitSlot (2000)
+ printlog " Paste 'Linked Graphic' in all available clipboard formats "
+ Kontext "InhaltEinfuegen"
+ if InhaltEinfuegen.Exists then
+ printlog " + Write Clipboard format under pasted content "
+ Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"graphicL")
+ printlog " + Save document as ..\user\work\writer_to_writer_graphic1.odt"
+ Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\writer_to_writer_graphic1.odt", "writer8")
+ Wait 500
+ printlog " + Close saved document "
+ Call hCloseDocument
+ printlog " + Reopen saved document "
+ Call hFileOpen (gOfficepath + "user\work\writer_to_writer_graphic1.odt",false)
+ printlog " + Close saved document "
+ Call hCloseDocument
+ else
+ Warnlog "Dialog 'Paste Special' is not up!"
+ Call hCloseDocument
+ goto endsub
+ end if
+ else
+ Warnlog "Writer To Writer -> 'Linked Graphic' failed !"
+ end if
+ printlog " Close active document "
+ Do Until GetDocumentCount = 0
+ Call hCloseDocument
+ Loop
+endcase
+
+' ----------------------------------------------------------------------------------------------
+
+testcase WriterToWriterGraphicEmbedded
+ gApplication = "WRITER"
+ printlog " Open File '..\\writer\\optional\\input\\clipboard\\writer.sxw' "
+ printlog " + Jump to beginning of document "
+ printlog " + Select 'Embedded Graphic' "
+ printlog " + Copy selected Embedded Graphic "
+ printlog " + Open new document "
+ if wSetClipboardtestDefaults("graphicE") = True then
+ Call hNewDocument
+ printlog " + Edit / Paste Special "
+ EditPasteSpecialWriter
+ Wait 500
+ printlog " Paste 'Embedded Graphic' in all available clipboard formats "
+ Kontext "InhaltEinfuegen"
+ if InhaltEinfuegen.Exists then
+ Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"graphicE")
+ printlog " + Write Clipboard format under pasted content "
+ Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\writer_to_writer_graphic2.odt", "writer8")
+ printlog " + Save document as ..\user\work\writer_to_writer_graphic2.odt"
+ WaitSlot (2000)
+ printlog " + Close saved document "
+ Call hCloseDocument
+ printlog " + Reopen saved document "
+ Call hFileOpen (gOfficepath + "user\work\writer_to_writer_graphic2.odt",false)
+ printlog " + Close saved document "
+ Call hCloseDocument
+ else
+ Warnlog "Dialog 'Paste Special' is not up!"
+ Call hCloseDocument
+ goto endsub
+ end if
+ else
+ Warnlog "Writer To Writer -> 'Embedded Graphic' failed !"
+ end if
+ printlog " Close active document "
+ Do Until GetDocumentCount = 0
+ Call hCloseDocument
+ Loop
+endcase
+
+' ----------------------------------------------------------------------------------------------
+
+testcase WriterToWriterOLEObject
+ gApplication = "WRITER"
+ printlog " Open File '..\\writer\\optional\\input\\clipboard\\writer.sxw' "
+ printlog " + Jump to beginning of document "
+ printlog " + Select 'OLE Object' "
+ printlog " + Copy selected OLE Object "
+ printlog " + Open new document "
+ if wSetClipboardtestDefaults("ole") = True then
+ Call hNewDocument
+ printlog " + Edit / Paste Special "
+ EditPasteSpecialWriter
+ Wait 500
+ printlog " Paste 'OLE object' in all available clipboard formats "
+ Kontext "InhaltEinfuegen"
+ if InhaltEinfuegen.Exists then
+ printlog " + Write Clipboard format under pasted content "
+ Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"ole")
+ printlog " + Save document as ..\user\work\writer_to_writer_ole.odt"
+ Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\writer_to_writer_ole.odt", "writer8")
+ WaitSlot (2000)
+ printlog " + Close saved document "
+ Call hCloseDocument
+ printlog " + Reopen saved document "
+ Call hFileOpen (gOfficepath + "user\work\writer_to_writer_ole.odt",false)
+ printlog " + Close saved document "
+ Call hCloseDocument
+ else
+ Warnlog "Dialog 'Paste Special' is not up!"
+ Call hCloseDocument
+ goto endsub
+ end if
+ else
+ Warnlog "Writer To Writer -> 'OLE object' failed !"
+ end if
+ printlog " Close active document "
+ Do Until GetDocumentCount = 0
+ Call hCloseDocument
+ Loop
+endcase
+
+' ----------------------------------------------------------------------------------------------
+
+testcase WriterToWriterControl
+ gApplication = "WRITER"
+ printlog " Open File '..\\writer\\optional\\input\\clipboard\\writer.sxw' "
+ printlog " + Jump to beginning of document "
+ printlog " + Select 'Control' "
+ printlog " + Copy selected Control "
+ printlog " + Open new document "
+ if wSetClipboardtestDefaults("control") = True then
+ Call hNewDocument
+ printlog " + Edit / Paste Special "
+ EditPasteSpecialWriter
+ Wait 500
+ printlog " Paste 'Control' in all available clipboard formats "
+ Kontext "InhaltEinfuegen"
+ if InhaltEinfuegen.Exists then
+ printlog " + Write Clipboard format under pasted content "
+ Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"control")
+ printlog " + Save document as ..\user\work\writer_to_writer_control.odt"
+ Call hFileSaveAsWithFilterKill(gOfficepath & "user\work\writer_to_writer_control.odt", "writer8")
+ WaitSlot (2000)
+ printlog " + Close saved document "
+ Call hCloseDocument
+ printlog " + Reopen saved document "
+ Call hFileOpen (gOfficepath + "user\work\writer_to_writer_control.odt",false)
+ printlog " + Close saved document "
+ Call hCloseDocument
+ else
+ Warnlog "Dialog 'Paste Special' is not up!"
+ Call hCloseDocument
+ goto endsub
+ end if
+ else
+ Warnlog "Writer To Writer -> 'Control' failed !"
+ end if
+ printlog " Close active document "
+ Do Until GetDocumentCount = 0
+ Call hCloseDocument
+ Loop
+endcase
+
+' ----------------------------------------------------------------------------------------------
diff --git a/testautomation/writer/optional/includes/clipboard/w_211_.inc b/testautomation/writer/optional/includes/clipboard/w_211_.inc
new file mode 100644
index 000000000000..2507bdb422e3
--- /dev/null
+++ b/testautomation/writer/optional/includes/clipboard/w_211_.inc
@@ -0,0 +1,540 @@
+'**************************************************************************
+' 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 : helge.delfs@sun.com
+'*
+'* short description : CROSS-APPLICATIONS CLIPBOARD TEST (Writer)
+'*
+'\***********************************************************************
+
+sub w_211_
+
+ Call WriterToCalcText
+ Call WriterToCalcField
+ Call WriterToCalcTable
+ Call WriterToCalcFrame
+ Call WriterToCalcDrawingObject
+ Call WriterToCalcGraphicLinked 'wrn:1
+ Call WriterToCalcGraphicEmbedded
+ Call WriterToCalcOLEObject
+ Call WriterToCalcControl
+
+end sub
+
+' ---------------------------------------------------------------------------------
+
+testcase WriterToCalcText
+ gApplication = "WRITER"
+ printlog " Open File '..\\writer\\optional\\input\\clipboard\\writer.sxw' "
+ printlog " Jump to beginning of document "
+ printlog " Select first paragraph "
+ printlog " Copy selected text "
+ if wSetClipboardtestDefaults("text") = True then
+ gApplication = "CALC"
+ printlog " Open new document "
+ Call hNewDocument
+ printlog " Edit / Paste Special "
+ Sleep 2
+ try
+ EditPasteSpecialCalc
+ catch
+ Warnlog "Unable to execute 'Edit / Paste / Special' -> Disabled !"
+ Call hCloseDocument
+ wait 500
+ Call hCloseDocument
+ goto endsub
+ endcatch
+ Wait 500
+ printlog " Paste 'Text' in all available clipboard formats "
+ Kontext "InhaltEinfuegen"
+ if InhaltEinfuegen.Exists then
+ Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"text")
+ printlog " Write Clipboard format under pasted content "
+ Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\writer_to_calc_text.ods", "calc8")
+ printlog " Save document as ..\user\work\writer_to_calc_text.ods"
+ Wait 500
+ Call hCloseDocument
+ printlog " Close saved document "
+ wait 500
+ Call hFileOpen (gOfficepath + "user\work\writer_to_calc_text.ods",true)
+ printlog " Reopen saved document "
+ Wait 500
+ Call hCloseDocument
+ printlog " Close saved document "
+ else
+ Warnlog "Dialog 'Paste Special' is not up!"
+ Call hCloseDocument
+ goto endsub
+ end if
+ else
+ Warnlog "Writer To Calc -> 'Text' failed !"
+ end if
+ printlog " Close active document "
+ Do Until GetDocumentCount = 0
+ Call hCloseDocument
+ Loop
+endcase
+
+' ----------------------------------------------------------------------------------------------
+
+testcase WriterToCalcField
+ gApplication = "WRITER"
+ printlog " Open File '..\\writer\\optional\\input\\clipboard\\writer.sxw' "
+ printlog " Jump to beginning of document "
+ printlog " Select paragraph with 'Date Field' "
+ printlog " Copy selected text "
+ if wSetClipboardtestDefaults("field") = True then
+ gApplication = "CALC"
+ printlog " Open new document "
+ Call hNewDocument
+ printlog " Edit / Paste Special "
+ Sleep 2
+ try
+ EditPasteSpecialCalc
+ catch
+ Warnlog "Unable to execute 'Edit / Paste / Special' -> Disabled !"
+ Call hCloseDocument
+ wait 500
+ Call hCloseDocument
+ goto endsub
+ endcatch
+ Wait 500
+ printlog " Paste 'Field' in all available clipboard formats "
+ Kontext "InhaltEinfuegen"
+ if InhaltEinfuegen.Exists then
+ Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"field")
+ printlog " Write Clipboard format under pasted content "
+ Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\writer_to_calc_field.ods", "calc8")
+ printlog " Save document as ..\user\work\writer_to_calc_field.ods"
+ Wait 500
+ Call hCloseDocument
+ printlog " Close saved document "
+ wait 500
+ Call hFileOpen (gOfficepath + "user\work\writer_to_calc_field.ods",true)
+ printlog " Reopen saved document "
+ Wait 500
+ Call hCloseDocument
+ printlog " Close saved document "
+ else
+ Warnlog "Dialog 'Paste Special' is not up!"
+ Call hCloseDocument
+ goto endsub
+ end if
+ else
+ Warnlog "Writer To Calc -> 'Field' failed !"
+ end if
+ printlog " Close active document "
+ Do Until GetDocumentCount = 0
+ Call hCloseDocument
+ Loop
+endcase
+
+' ----------------------------------------------------------------------------------------------
+
+testcase WriterToCalcTable
+ gApplication = "WRITER"
+ printlog " Open File '..\\writer\\optional\\input\\clipboard\\writer.sxw' "
+ printlog " Jump to beginning of document "
+ printlog " Select 'Table' "
+ printlog " Copy selected table "
+ if wSetClipboardtestDefaults("table") = True then
+ gApplication = "CALC"
+ printlog " Open new document "
+ Call hNewDocument
+ printlog " Edit / Paste Special "
+ Sleep 2
+ try
+ EditPasteSpecialCalc
+ catch
+ Warnlog "Unable to execute 'Edit / Paste / Special' -> Disabled !"
+ Call hCloseDocument
+ wait 500
+ goto endsub
+ endcatch
+ Wait 500
+ printlog " Paste 'Table' in all available clipboard formats "
+ Kontext "InhaltEinfuegen"
+ if InhaltEinfuegen.Exists then
+ Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"table")
+ kontext "navigator"
+ if navigator.exists then navigator.close
+ printlog " Write Clipboard format under pasted content "
+
+ Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\writer_to_calc_table.ods", "calc8")
+ printlog " Save document as ..\user\work\writer_to_calc_table.ods"
+ Wait 500
+ printlog " Close saved document "
+ Call hCloseDocument
+ wait 500
+ kontext "navigator"
+ if navigator.exists then navigator.close
+
+ Call hFileOpen (gOfficepath + "user\work\writer_to_calc_table.ods",false)
+ printlog " Reopen saved document "
+ Wait 500
+ Call hCloseDocument
+ printlog " Close saved document "
+ kontext "navigator"
+ if navigator.exists then navigator.close
+ else
+ Warnlog "Dialog 'Paste Special' is not up!"
+ Call hCloseDocument
+ goto endsub
+ end if
+ else
+ Warnlog "Writer To Calc -> 'Table' failed !"
+ end if
+ printlog " Close active document "
+ Do Until GetDocumentCount = 0
+ Call hCloseDocument
+ Loop
+endcase
+
+' ----------------------------------------------------------------------------------------------
+
+testcase WriterToCalcFrame
+ gApplication = "WRITER"
+ printlog " Open File '..\\writer\\optional\\input\\clipboard\\writer.sxw' "
+ printlog " Jump to beginning of document "
+ printlog " Select 'Frame' "
+ printlog " Copy selected frame "
+ if wSetClipboardtestDefaults("frame") = True then
+ gApplication = "CALC"
+ printlog " Open new document "
+ Call hNewDocument
+ printlog " Edit / Paste Special "
+ Sleep 2
+ try
+ EditPasteSpecialCalc
+ catch
+ Warnlog "Unable to execute 'Edit / Paste / Special' -> Disabled !"
+ Call hCloseDocument
+ wait 500
+ Call hCloseDocument
+ goto endsub
+ endcatch
+ Wait 500
+ printlog " Paste 'Table' in all available clipboard formats "
+ Kontext "InhaltEinfuegen"
+ if InhaltEinfuegen.Exists then
+ Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"frame")
+ printlog " Write Clipboard format under pasted content "
+ Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\writer_to_calc_frame.ods", "calc8")
+ printlog " Save document as ..\user\work\writer_to_calc_frame.ods"
+ Wait 500
+ Call hCloseDocument
+ printlog " Close saved document "
+ wait 500
+ Call hFileOpen (gOfficepath + "user\work\writer_to_calc_frame.ods",false)
+ printlog " Reopen saved document "
+ Wait 500
+ Call hCloseDocument
+ printlog " Close saved document "
+ else
+ Warnlog "Dialog 'Paste Special' is not up!"
+ Call hCloseDocument
+ goto endsub
+ end if
+ else
+ Warnlog "Writer To Calc -> 'Frame' failed !"
+ end if
+ printlog " Close active document "
+ Do Until GetDocumentCount = 0
+ Call hCloseDocument
+ Loop
+endcase
+
+' ----------------------------------------------------------------------------------------------
+
+testcase WriterToCalcDrawingObject
+ gApplication = "WRITER"
+ printlog " Open File '..\\writer\\optional\\input\\clipboard\\writer.sxw' "
+ printlog " Jump to beginning of document "
+ printlog " Select 'Drawing Object' "
+ printlog " Copy selected Drawing Object "
+ if wSetClipboardtestDefaults("DRAW") = True then
+ gApplication = "CALC"
+ printlog " Open new document "
+ Call hNewDocument
+ printlog " Edit / Paste Special "
+ Sleep 2
+ try
+ EditPasteSpecialCalc
+ catch
+ Warnlog "Unable to execute 'Edit / Paste / Special' -> Disabled !"
+ Call hCloseDocument
+ wait 500
+ Call hCloseDocument
+ goto endsub
+ endcatch
+ Wait 500
+ printlog " Paste 'Table' in all available clipboard formats "
+ Kontext "InhaltEinfuegen"
+ if InhaltEinfuegen.Exists then
+ Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"DRAW")
+ printlog " Write Clipboard format under pasted content "
+ Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\writer_to_calc_draw.ods", "calc8")
+ printlog " Save document as ..\user\work\writer_to_calc_draw.ods"
+ Wait 500
+ Call hCloseDocument
+ printlog " Close saved document "
+ wait 500
+ Call hFileOpen (gOfficepath + "user\work\writer_to_calc_draw.ods",false)
+ printlog " Reopen saved document "
+ Wait 500
+ Call hCloseDocument
+ printlog " Close saved document "
+ else
+ Warnlog "Dialog 'Paste Special' is not up!"
+ Call hCloseDocument
+ goto endsub
+ end if
+ else
+ Warnlog "Writer To Calc -> 'Drawing Object' failed !"
+ end if
+ printlog " Close active document "
+ Do Until GetDocumentCount = 0
+ Call hCloseDocument
+ Loop
+endcase
+
+' ----------------------------------------------------------------------------------------------
+
+testcase WriterToCalcGraphicLinked
+ EnableQaErrors = true
+ gApplication = "WRITER"
+ printlog " Open File '..\\writer\\optional\\input\\clipboard\\writer.sxw' "
+ printlog " Jump to beginning of document "
+ printlog " Select 'Linked Graphic' "
+ printlog " Copy selected Linked Graphic "
+ if wSetClipboardtestDefaults("graphicL") = True then
+ gApplication = "CALC"
+ printlog " Open new document "
+ Call hNewDocument
+ printlog " Edit / Paste Special "
+ Sleep 2
+ try
+ EditPasteSpecialCalc
+ catch
+ warnlog "Check why linked graphic fails !"
+ Call hCloseDocument
+ wait 500
+ Call hCloseDocument
+ goto endsub
+ endcatch
+ Wait 500
+ printlog " Paste 'Linked Graphic' in all available clipboard formats "
+ Kontext "InhaltEinfuegen"
+ if InhaltEinfuegen.Exists then
+ Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"graphicL")
+ printlog " Write Clipboard format under pasted content "
+ Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\writer_to_calc_graphic1.ods", "calc8")
+ printlog " Save document as ..\user\work\writer_to_calc_graphic1.ods"
+ Wait 500
+ Call hCloseDocument
+ printlog " Close saved document "
+ wait 500
+ Call hFileOpen (gOfficepath + "user\work\writer_to_calc_graphic1.ods",false)
+ printlog " Reopen saved document "
+ Wait 500
+ Call hCloseDocument
+ printlog " Close saved document "
+ else
+ Warnlog "Dialog 'Paste Special' is not up!"
+ Call hCloseDocument
+ goto endsub
+ end if
+ else
+ Warnlog "Writer To Calc -> 'Linked Graphic' failed !"
+ end if
+ printlog " Close active document "
+ Do Until GetDocumentCount = 0
+ Call hCloseDocument
+ Loop
+ EnableQaErrors = false
+endcase
+
+' ----------------------------------------------------------------------------------------------
+
+testcase WriterToCalcGraphicEmbedded
+ gApplication = "WRITER"
+ printlog " Open File '..\\writer\\optional\\input\\clipboard\\writer.sxw' "
+ printlog " Jump to beginning of document "
+ printlog " Select 'Embedded Graphic' "
+ printlog " Copy selected Embedded Graphic "
+ if wSetClipboardtestDefaults("graphicE") = True then
+ gApplication = "CALC"
+ printlog " Open new document "
+ Call hNewDocument
+ printlog " Edit / Paste Special "
+ Sleep 2
+ try
+ EditPasteSpecialCalc
+ catch
+ Warnlog "Unable to execute 'Edit / Paste / Special' -> Disabled !"
+ Call hCloseDocument
+ wait 500
+ Call hCloseDocument
+ goto endsub
+ endcatch
+ Wait 500
+ printlog " Paste 'Embedded Graphic' in all available clipboard formats "
+ Kontext "InhaltEinfuegen"
+ if InhaltEinfuegen.Exists then
+ Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"graphicE")
+ printlog " Write Clipboard format under pasted content "
+ Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\writer_to_calc_graphic2.ods", "calc8")
+ printlog " Save document as ..\user\work\writer_to_calc_graphic2.ods"
+ Wait 500
+ Call hCloseDocument
+ printlog " Close saved document "
+ wait 500
+ Call hFileOpen (gOfficepath + "user\work\writer_to_calc_graphic2.ods",false)
+ printlog " Reopen saved document "
+ Wait 500
+ Call hCloseDocument
+ printlog " Close saved document "
+ else
+ Warnlog "Dialog 'Paste Special' is not up!"
+ Call hCloseDocument
+ goto endsub
+ end if
+ else
+ Warnlog "Writer To Calc -> 'Embedded Graphic' failed !"
+ end if
+ printlog " Close active document "
+ Do Until GetDocumentCount = 0
+ Call hCloseDocument
+ Loop
+endcase
+
+' ----------------------------------------------------------------------------------------------
+
+testcase WriterToCalcOLEObject
+ gApplication = "WRITER"
+ printlog " Open File '..\\writer\\optional\\input\\clipboard\\writer.sxw' "
+ printlog " Jump to beginning of document "
+ printlog " Select 'OLE Object' "
+ printlog " Copy selected OLE Object "
+ if wSetClipboardtestDefaults("ole") = True then
+ gApplication = "CALC"
+ printlog " Open new document "
+ Call hNewDocument
+ printlog " Edit / Paste Special "
+ Sleep 2
+ try
+ EditPasteSpecialCalc
+ catch
+ Warnlog "Unable to execute 'Edit / Paste / Special' -> Disabled !"
+ Call hCloseDocument
+ wait 500
+ Call hCloseDocument
+ goto endsub
+ endcatch
+ Wait 500
+ printlog " Paste 'OLE object' in all available clipboard formats "
+ Kontext "InhaltEinfuegen"
+ if InhaltEinfuegen.Exists then
+ Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"ole")
+ printlog " Write Clipboard format under pasted content "
+ Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\writer_to_calc_ole.ods", "calc8")
+ printlog " Save document as ..\user\work\writer_to_calc_ole.ods"
+ Wait 500
+ Call hCloseDocument
+ printlog " Close saved document "
+ wait 500
+ Call hFileOpen (gOfficepath + "user\work\writer_to_calc_ole.ods",false)
+ printlog " Reopen saved document "
+ Wait 500
+ Call hCloseDocument
+ printlog " Close saved document "
+ else
+ Warnlog "Dialog 'Paste Special' is not up!"
+ Call hCloseDocument
+ goto endsub
+ end if
+ else
+ Warnlog "Writer To Calc -> 'OLE object' failed !"
+ end if
+ printlog " Close active document "
+ Do Until GetDocumentCount = 0
+ Call hCloseDocument
+ Loop
+endcase
+
+' ----------------------------------------------------------------------------------------------
+
+testcase WriterToCalcControl
+ gApplication = "WRITER"
+ printlog " Open File '..\\writer\\optional\\input\\clipboard\\writer.sxw' "
+ printlog " Jump to beginning of document "
+ printlog " Select 'Control' "
+ printlog " Copy selected Control "
+ if wSetClipboardtestDefaults("control") = True then
+ gApplication = "CALC"
+ printlog " Open new document "
+ Call hNewDocument
+ printlog " Edit / Paste Special "
+ Sleep 2
+ try
+ EditPasteSpecialCalc
+ catch
+ Warnlog "Unable to execute 'Edit / Paste / Special' -> Disabled !"
+ Call hCloseDocument
+ wait 500
+ Call hCloseDocument
+ goto endsub
+ endcatch
+ Wait 500
+ printlog " Paste 'Control' in all available clipboard formats "
+ Kontext "InhaltEinfuegen"
+ if InhaltEinfuegen.Exists then
+ Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"control")
+ printlog " Write Clipboard format under pasted content "
+ Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\writer_to_calc_control.ods", "calc8")
+ printlog " Save document as ..\user\work\writer_to_calc_control.ods"
+ Wait 500
+ Call hCloseDocument
+ printlog " Close saved document "
+ wait 500
+ Call hFileOpen (gOfficepath + "user\work\writer_to_calc_control.ods",false)
+ printlog " Reopen saved document "
+ Wait 500
+ Call hCloseDocument
+ printlog " Close saved document "
+ else
+ Warnlog "Dialog 'Paste Special' is not up!"
+ Call hCloseDocument
+ goto endsub
+ end if
+ else
+ Warnlog "Writer To Calc -> 'Control' failed !"
+ end if
+ printlog " Close active document "
+ Do Until GetDocumentCount = 0
+ Call hCloseDocument
+ Loop
+endcase
diff --git a/testautomation/writer/optional/includes/clipboard/w_212_.inc b/testautomation/writer/optional/includes/clipboard/w_212_.inc
new file mode 100644
index 000000000000..667627689d6e
--- /dev/null
+++ b/testautomation/writer/optional/includes/clipboard/w_212_.inc
@@ -0,0 +1,532 @@
+'**************************************************************************
+' 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 : helge.delfs@sun.com
+'*
+'* short description : CROSS-APPLICATIONS CLIPBOARD TEST (Writer)
+'*
+'\***********************************************************************
+
+sub w_212_
+
+ Call wDisableImpressAutopilot
+ Call WriterToImpressText
+ Call WriterToImpressField
+ Call WriterToImpressTable
+ Call WriterToImpressFrame
+ Call WriterToImpressDrawingObject
+ Call WriterToImpressGraphicLinked
+ Call WriterToImpressGraphicEmbedded
+ Call WriterToImpressOLEObject
+ Call WriterToImpressControl
+
+end sub
+
+' ---------------------------------------------------------------------------------
+
+testcase WriterToImpressText
+ gApplication = "WRITER"
+ printlog " Open File '..\\writer\\optional\\input\\clipboard\\writer.sxw' "
+ printlog " Jump to beginning of document "
+ printlog " Select first paragraph "
+ printlog " Copy selected text "
+ if wSetClipboardtestDefaults("text") = True then
+ gApplication = "IMPRESS"
+ printlog " Open new document "
+ Call hNewDocument
+ printlog " Edit / Paste Special "
+ Sleep 2
+ try
+ EditPasteSpecial
+ catch
+ Warnlog "Unable to execute 'Edit / Paste / Special' -> Disabled !"
+ Call hCloseDocument
+ wait 500
+ Call hCloseDocument
+ goto endsub
+ endcatch
+ Wait 500
+ printlog " Paste 'Text' in all available clipboard formats "
+ Kontext "InhaltEinfuegen"
+ if InhaltEinfuegen.Exists then
+ Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"text")
+ printlog " Write Clipboard format under pasted content "
+ Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\writer_to_impress_text.odp", "impress8")
+ printlog " Save document as ..\user\work\writer_to_impress_text.odp"
+ Wait 500
+ Call hCloseDocument
+ printlog " Close saved document "
+ wait 500
+ Call hFileOpen (gOfficepath + "user\work\writer_to_impress_text.odp",false)
+ printlog " Reopen saved document "
+ Wait 500
+ Call hCloseDocument
+ printlog " Close saved document "
+ else
+ Warnlog "Dialog 'Paste Special' is not up!"
+ Call hCloseDocument
+ goto endsub
+ end if
+ else
+ Warnlog "Writer To Impress -> 'Text' failed !"
+ end if
+ printlog " Close active document "
+ Do Until GetDocumentCount = 0
+ Call hCloseDocument
+ Loop
+endcase
+
+' ----------------------------------------------------------------------------------------------
+
+testcase WriterToImpressField
+ gApplication = "WRITER"
+ printlog " Open File '..\\writer\\optional\\input\\clipboard\\writer.sxw' "
+ printlog " Jump to beginning of document "
+ printlog " Select paragraph with 'Date Field' "
+ printlog " Copy selected text "
+ if wSetClipboardtestDefaults("field") = True then
+ gApplication = "IMPRESS"
+ printlog " Open new document "
+ Call hNewDocument
+ printlog " Edit / Paste Special "
+ Sleep 2
+ try
+ EditPasteSpecial
+ catch
+ Warnlog "Unable to execute 'Edit / Paste / Special' -> Disabled !"
+ Call hCloseDocument
+ wait 500
+ Call hCloseDocument
+ goto endsub
+ endcatch
+ Wait 500
+ printlog " Paste 'Field' in all available clipboard formats "
+ Kontext "InhaltEinfuegen"
+ if InhaltEinfuegen.Exists then
+ Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"field")
+ printlog " Write Clipboard format under pasted content "
+ Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\writer_to_impress_field.odp", "impress8")
+ printlog " Save document as ..\user\work\writer_to_impress_field.odp"
+ Wait 500
+ Call hCloseDocument
+ printlog " Close saved document "
+ wait 500
+ Call hFileOpen (gOfficepath + "user\work\writer_to_impress_field.odp",false)
+ printlog " Reopen saved document "
+ Wait 500
+ Call hCloseDocument
+ printlog " Close saved document "
+ else
+ Warnlog "Dialog 'Paste Special' is not up!"
+ Call hCloseDocument
+ goto endsub
+ end if
+ else
+ Warnlog "Writer To Impress -> 'Field' failed !"
+ end if
+ printlog " Close active document "
+ Do Until GetDocumentCount = 0
+ Call hCloseDocument
+ Loop
+endcase
+
+' ----------------------------------------------------------------------------------------------
+
+testcase WriterToImpressTable
+ gApplication = "WRITER"
+ printlog " Open File '..\\writer\\optional\\input\\clipboard\\writer.sxw' "
+ printlog " Jump to beginning of document "
+ printlog " Select 'Table' "
+ printlog " Copy selected table "
+ if wSetClipboardtestDefaults("table") = True then
+ gApplication = "IMPRESS"
+ printlog " Open new document "
+ Call hNewDocument
+ printlog " Edit / Paste Special "
+ Sleep 2
+ try
+ EditPasteSpecial
+ catch
+ Warnlog "Unable to execute 'Edit / Paste / Special' -> Disabled !"
+ Call hCloseDocument
+ wait 500
+ Call hCloseDocument
+ goto endsub
+ endcatch
+ Wait 500
+ printlog " Paste 'Table' in all available clipboard formats "
+ Kontext "InhaltEinfuegen"
+ if InhaltEinfuegen.Exists then
+ Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"table")
+ printlog " Write Clipboard format under pasted content "
+ Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\writer_to_impress_table.odp", "impress8")
+ printlog " Save document as ..\user\work\writer_to_impress_table.odp"
+ Wait 500
+ Call hCloseDocument
+ printlog " Close saved document "
+ wait 500
+ Call hFileOpen (gOfficepath + "user\work\writer_to_impress_table.odp",false)
+ printlog " Reopen saved document "
+ Wait 500
+ Call hCloseDocument
+ printlog " Close saved document "
+ else
+ Warnlog "Dialog 'Paste Special' is not up!"
+ Call hCloseDocument
+ goto endsub
+ end if
+ else
+ Warnlog "Writer To Impress -> 'Table' failed !"
+ end if
+ printlog " Close active document "
+ Do Until GetDocumentCount = 0
+ Call hCloseDocument
+ Loop
+endcase
+
+' ----------------------------------------------------------------------------------------------
+
+testcase WriterToImpressFrame
+ gApplication = "WRITER"
+ printlog " Open File '..\\writer\\optional\\input\\clipboard\\writer.sxw' "
+ printlog " Jump to beginning of document "
+ printlog " Select 'Frame' "
+ printlog " Copy selected frame "
+ if wSetClipboardtestDefaults("frame") = True then
+ gApplication = "IMPRESS"
+ printlog " Open new document "
+ Call hNewDocument
+ printlog " Edit / Paste Special "
+ Sleep 2
+ try
+ EditPasteSpecial
+ catch
+ Warnlog "Unable to execute 'Edit / Paste / Special' -> Disabled !"
+ Call hCloseDocument
+ wait 500
+ Call hCloseDocument
+ goto endsub
+ endcatch
+ Wait 500
+ printlog " Paste 'Table' in all available clipboard formats "
+ Kontext "InhaltEinfuegen"
+ if InhaltEinfuegen.Exists then
+ Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"frame")
+ printlog " Write Clipboard format under pasted content "
+ Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\writer_to_impress_frame.odp", "impress8")
+ printlog " Save document as ..\user\work\writer_to_impress_frame.odp"
+ Wait 500
+ Call hCloseDocument
+ printlog " Close saved document "
+ wait 500
+ Call hFileOpen (gOfficepath + "user\work\writer_to_impress_frame.odp",false)
+ printlog " Reopen saved document "
+ Wait 500
+ Call hCloseDocument
+ printlog " Close saved document "
+ else
+ Warnlog "Dialog 'Paste Special' is not up!"
+ Call hCloseDocument
+ goto endsub
+ end if
+ else
+ Warnlog "Writer To Impress -> 'Frame' failed !"
+ end if
+ printlog " Close active document "
+ Do Until GetDocumentCount = 0
+ Call hCloseDocument
+ Loop
+endcase
+
+' ----------------------------------------------------------------------------------------------
+
+testcase WriterToImpressDrawingObject
+ gApplication = "WRITER"
+ printlog " Open File '..\\writer\\optional\\input\\clipboard\\writer.sxw' "
+ printlog " Jump to beginning of document "
+ printlog " Select 'Drawing Object' "
+ printlog " Copy selected Drawing Object "
+ if wSetClipboardtestDefaults("DRAW") = True then
+ gApplication = "IMPRESS"
+ printlog " Open new document "
+ Call hNewDocument
+ printlog " Edit / Paste Special "
+ Sleep 2
+ try
+ EditPasteSpecial
+ catch
+ Warnlog "Unable to execute 'Edit / Paste / Special' -> Disabled !"
+ Call hCloseDocument
+ wait 500
+ Call hCloseDocument
+ goto endsub
+ endcatch
+ Wait 500
+ printlog " Paste 'Table' in all available clipboard formats "
+ Kontext "InhaltEinfuegen"
+ if InhaltEinfuegen.Exists then
+ Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"DRAW")
+ printlog " Write Clipboard format under pasted content "
+ Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\writer_to_impress_draw.odp", "impress8")
+ printlog " Save document as ..\user\work\writer_to_impress_draw.odp"
+ Wait 500
+ Call hCloseDocument
+ printlog " Close saved document "
+ wait 500
+ Call hFileOpen (gOfficepath + "user\work\writer_to_impress_draw.odp",false)
+ printlog " Reopen saved document "
+ Wait 500
+ Call hCloseDocument
+ printlog " Close saved document "
+ else
+ Warnlog "Dialog 'Paste Special' is not up!"
+ Call hCloseDocument
+ goto endsub
+ end if
+ else
+ Warnlog "Writer To Impress -> 'Drawing Object' failed !"
+ end if
+ printlog " Close active document "
+ Do Until GetDocumentCount = 0
+ Call hCloseDocument
+ Loop
+endcase
+
+' ----------------------------------------------------------------------------------------------
+
+testcase WriterToImpressGraphicLinked
+ gApplication = "WRITER"
+ printlog " Open File '..\\writer\\optional\\input\\clipboard\\writer.sxw' "
+ printlog " Jump to beginning of document "
+ printlog " Select 'Linked Graphic' "
+ printlog " Copy selected Linked Graphic "
+ if wSetClipboardtestDefaults("graphicL") = True then
+ gApplication = "IMPRESS"
+ printlog " Open new document "
+ Call hNewDocument
+ printlog " Edit / Paste Special "
+ Sleep 2
+ try
+ EditPasteSpecial
+ catch
+ Warnlog "Unable to execute 'Edit / Paste / Special' -> Disabled !"
+ Call hCloseDocument
+ wait 500
+ Call hCloseDocument
+ goto endsub
+ endcatch
+ Wait 500
+ printlog " Paste 'Linked Graphic' in all available clipboard formats "
+ Kontext "InhaltEinfuegen"
+ if InhaltEinfuegen.Exists then
+ Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"graphicL")
+ printlog " Write Clipboard format under pasted content "
+ Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\writer_to_impress_graphic1.odp", "impress8")
+ printlog " Save document as ..\user\work\writer_to_impress_graphic1.odp"
+ Wait 500
+ Call hCloseDocument
+ printlog " Close saved document "
+ wait 500
+ Call hFileOpen (gOfficepath + "user\work\writer_to_impress_graphic1.odp",false)
+ printlog " Reopen saved document "
+ Wait 500
+ Call hCloseDocument
+ printlog " Close saved document "
+ else
+ Warnlog "Dialog 'Paste Special' is not up!"
+ Call hCloseDocument
+ goto endsub
+ end if
+ else
+ Warnlog "Writer To Impress -> 'Linked Graphic' failed !"
+ end if
+ printlog " Close active document "
+ Do Until GetDocumentCount = 0
+ Call hCloseDocument
+ Loop
+endcase
+
+' ----------------------------------------------------------------------------------------------
+
+testcase WriterToImpressGraphicEmbedded
+ gApplication = "WRITER"
+ printlog " Open File '..\\writer\\optional\\input\\clipboard\\writer.sxw' "
+ printlog " Jump to beginning of document "
+ printlog " Select 'Embedded Graphic' "
+ printlog " Copy selected Embedded Graphic "
+ if wSetClipboardtestDefaults("graphicE") = True then
+ gApplication = "IMPRESS"
+ printlog " Open new document "
+ Call hNewDocument
+ printlog " Edit / Paste Special "
+ Sleep 2
+ try
+ EditPasteSpecial
+ catch
+ Warnlog "Unable to execute 'Edit / Paste / Special' -> Disabled !"
+ Call hCloseDocument
+ wait 500
+ Call hCloseDocument
+ goto endsub
+ endcatch
+ Wait 500
+ printlog " Paste 'Embedded Graphic' in all available clipboard formats "
+ Kontext "InhaltEinfuegen"
+ if InhaltEinfuegen.Exists then
+ Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"graphicE")
+ printlog " Write Clipboard format under pasted content "
+ Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\writer_to_impress_graphic2.odp", "impress8")
+ printlog " Save document as ..\user\work\writer_to_impress_graphic2.odp"
+ Wait 500
+ Call hCloseDocument
+ printlog " Close saved document "
+ wait 500
+ Call hFileOpen (gOfficepath + "user\work\writer_to_impress_graphic2.odp",false)
+ printlog " Reopen saved document "
+ Wait 500
+ Call hCloseDocument
+ printlog " Close saved document "
+ else
+ Warnlog "Dialog 'Paste Special' is not up!"
+ Call hCloseDocument
+ goto endsub
+ end if
+ else
+ Warnlog "Writer To Impress -> 'Embedded Graphic' failed !"
+ end if
+ printlog " Close active document "
+ Do Until GetDocumentCount = 0
+ Call hCloseDocument
+ Loop
+endcase
+
+' ----------------------------------------------------------------------------------------------
+
+testcase WriterToImpressOLEObject
+ gApplication = "WRITER"
+ printlog " Open File '..\\writer\\optional\\input\\clipboard\\writer.sxw' "
+ printlog " Jump to beginning of document "
+ printlog " Select 'OLE Object' "
+ printlog " Copy selected OLE Object "
+ if wSetClipboardtestDefaults("ole") = True then
+ gApplication = "IMPRESS"
+ printlog " Open new document "
+ Call hNewDocument
+ printlog " Edit / Paste Special "
+ Sleep 2
+ try
+ EditPasteSpecial
+ catch
+ Warnlog "Unable to execute 'Edit / Paste / Special' -> Disabled !"
+ Call hCloseDocument
+ wait 500
+ Call hCloseDocument
+ goto endsub
+ endcatch
+ Wait 500
+ printlog " Paste 'OLE object' in all available clipboard formats "
+ Kontext "InhaltEinfuegen"
+ if InhaltEinfuegen.Exists then
+ Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"ole")
+ printlog " Write Clipboard format under pasted content "
+ Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\writer_to_impress_ole.odp", "impress8")
+ printlog " Save document as ..\user\work\writer_to_impress_ole.odp"
+ Wait 500
+ Call hCloseDocument
+ printlog " Close saved document "
+ wait 500
+ Call hFileOpen (gOfficepath + "user\work\writer_to_impress_ole.odp",false)
+ printlog " Reopen saved document "
+ Wait 500
+ Call hCloseDocument
+ printlog " Close saved document "
+ else
+ Warnlog "Dialog 'Paste Special' is not up!"
+ Call hCloseDocument
+ goto endsub
+ end if
+ else
+ Warnlog "Writer To Impress -> 'OLE object' failed !"
+ end if
+ printlog " Close active document "
+ Do Until GetDocumentCount = 0
+ Call hCloseDocument
+ Loop
+endcase
+
+' ----------------------------------------------------------------------------------------------
+
+testcase WriterToImpressControl
+ gApplication = "WRITER"
+ printlog " Open File '..\\writer\\optional\\input\\clipboard\\writer.sxw' "
+ printlog " Jump to beginning of document "
+ printlog " Select 'Control' "
+ printlog " Copy selected Control "
+ if wSetClipboardtestDefaults("control") = True then
+ gApplication = "IMPRESS"
+ printlog " Open new document "
+ Call hNewDocument
+ printlog " Edit / Paste Special "
+ Sleep 2
+ try
+ EditPasteSpecial
+ catch
+ Warnlog "Unable to execute 'Edit / Paste / Special' -> Disabled !"
+ Call hCloseDocument
+ wait 500
+ Call hCloseDocument
+ goto endsub
+ endcatch
+ Wait 500
+ printlog " Paste 'Control' in all available clipboard formats "
+ Kontext "InhaltEinfuegen"
+ if InhaltEinfuegen.Exists then
+ Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"control")
+ printlog " Write Clipboard format under pasted content "
+ Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\writer_to_impress_control.odp", "impress8")
+ printlog " Save document as ..\user\work\writer_to_impress_control.odp"
+ Wait 500
+ Call hCloseDocument
+ printlog " Close saved document "
+ wait 500
+ Call hFileOpen (gOfficepath + "user\work\writer_to_impress_control.odp",false)
+ printlog " Reopen saved document "
+ Wait 500
+ Call hCloseDocument
+ printlog " Close saved document "
+ else
+ Warnlog "Dialog 'Paste Special' is not up!"
+ Call hCloseDocument
+ goto endsub
+ end if
+ else
+ Warnlog "Writer To Impress -> 'Control' failed !"
+ end if
+ printlog " Close active document "
+ Do Until GetDocumentCount = 0
+ Call hCloseDocument
+ Loop
+endcase
diff --git a/testautomation/writer/optional/includes/clipboard/w_213_.inc b/testautomation/writer/optional/includes/clipboard/w_213_.inc
new file mode 100644
index 000000000000..f0cb56aa6dc3
--- /dev/null
+++ b/testautomation/writer/optional/includes/clipboard/w_213_.inc
@@ -0,0 +1,533 @@
+'**************************************************************************
+' 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 : helge.delfs@sun.com
+'*
+'* short description : CROSS-APPLICATIONS CLIPBOARD TEST (Writer)
+'*
+'\***********************************************************************
+
+sub w_213_
+
+ Call WriterToDrawText
+ Call WriterToDrawField
+ Call WriterToDrawTable
+ Call WriterToDrawFrame
+ Call WriterToDrawDrawingObject
+ Call WriterToDrawGraphicLinked
+ Call WriterToDrawGraphicEmbedded
+ Call WriterToDrawOLEObject
+ Call WriterToDrawControl
+
+end sub
+
+' ---------------------------------------------------------------------------------
+
+testcase WriterToDrawText
+ gApplication = "WRITER"
+ printlog " Open File '..\\writer\\optional\\input\\clipboard\\writer.sxw' "
+ printlog " + Jump to beginning of document "
+ printlog " + Select first paragraph "
+ printlog " + Copy selected text "
+ if wSetClipboardtestDefaults("text") = True then
+ gApplication = "DRAW"
+ printlog " + Open new document "
+ Call hNewDocument
+ printlog " + Edit / Paste Special "
+ Sleep 2
+ try
+ EditPasteSpecial
+ catch
+ Warnlog "Unable to execute 'Edit / Paste / Special' -> Disabled !"
+ Call hCloseDocument
+ wait 500
+ Call hCloseDocument
+ goto endsub
+ endcatch
+ Wait 500
+ printlog " Paste 'Text' in all available clipboard formats "
+ Kontext "InhaltEinfuegen"
+ if InhaltEinfuegen.Exists then
+ Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"text")
+ printlog " + Write Clipboard format under pasted content "
+ Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\writer_to_draw_text.odg", "draw8")
+ printlog " + Save document as ..\user\work\writer_to_draw_text.odg"
+ Wait 500
+ Call hCloseDocument
+ printlog " + Close saved document "
+ wait 500
+ Call hFileOpen (gOfficepath + "user\work\writer_to_draw_text.odg",false)
+ printlog " + Reopen saved document "
+ Wait 500
+ Call hCloseDocument
+ printlog " + Close saved document "
+ else
+ Warnlog "Dialog 'Paste Special' is not up!"
+ Call hCloseDocument
+ goto endsub
+ end if
+ else
+ Warnlog "Writer To Draw -> 'Text' failed !"
+ end if
+ printlog " Close active document "
+ Do Until GetDocumentCount = 0
+ Call hCloseDocument
+ Loop
+endcase
+
+' ----------------------------------------------------------------------------------------------
+
+testcase WriterToDrawField
+ gApplication = "WRITER"
+ printlog " Open File '..\\writer\\optional\\input\\clipboard\\writer.sxw' "
+ printlog " + Jump to beginning of document "
+ printlog " + Select paragraph with 'Date Field' "
+ printlog " + Copy selected text "
+ if wSetClipboardtestDefaults("field") = True then
+ gApplication = "DRAW"
+ printlog " + Open new document "
+ Call hNewDocument
+ printlog " + Edit / Paste Special "
+ Sleep 2
+ try
+ EditPasteSpecial
+ catch
+ Warnlog "Unable to execute 'Edit / Paste / Special' -> Disabled !"
+ Call hCloseDocument
+ wait 500
+ Call hCloseDocument
+ goto endsub
+ endcatch
+ Wait 500
+ printlog " Paste 'Field' in all available clipboard formats "
+ Kontext "InhaltEinfuegen"
+ if InhaltEinfuegen.Exists then
+ Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"field")
+ printlog " + Write Clipboard format under pasted content "
+ Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\writer_to_draw_field.odg", "draw8")
+ printlog " + Save document as ..\user\work\writer_to_draw_field.odg"
+ Wait 500
+ Call hCloseDocument
+ printlog " + Close saved document "
+ wait 500
+ Call hFileOpen (gOfficepath + "user\work\writer_to_draw_field.odg",false)
+ printlog " + Reopen saved document "
+ Wait 500
+ Call hCloseDocument
+ printlog " + Close saved document "
+ else
+ Warnlog "Dialog 'Paste Special' is not up!"
+ Call hCloseDocument
+ goto endsub
+ end if
+ else
+ Warnlog "Writer To Draw -> 'Field' failed !"
+ end if
+ printlog " Close active document "
+ Do Until GetDocumentCount = 0
+ Call hCloseDocument
+ Loop
+endcase
+
+' ----------------------------------------------------------------------------------------------
+
+testcase WriterToDrawTable
+ gApplication = "WRITER"
+ printlog " Open File '..\\writer\\optional\\input\\clipboard\\writer.sxw' "
+ printlog " + Jump to beginning of document "
+ printlog " + Select 'Table' "
+ printlog " + Copy selected table "
+ if wSetClipboardtestDefaults("table") = True then
+ gApplication = "DRAW"
+ printlog " + Open new document "
+ Call hNewDocument
+ printlog " + Edit / Paste Special "
+ Sleep 2
+ try
+ EditPasteSpecial
+ catch
+ Warnlog "Unable to execute 'Edit / Paste / Special' -> Disabled !"
+ Call hCloseDocument
+ wait 500
+ Call hCloseDocument
+ goto endsub
+ endcatch
+ Wait 500
+ printlog " Paste 'Table' in all available clipboard formats "
+ Kontext "InhaltEinfuegen"
+ if InhaltEinfuegen.Exists then
+ Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"table")
+ printlog " + Write Clipboard format under pasted content "
+ Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\writer_to_draw_table.odg", "draw8")
+ printlog " + Save document as ..\user\work\writer_to_draw_table.odg"
+ Wait 500
+ Call hCloseDocument
+ printlog " + Close saved document "
+ wait 500
+ Call hFileOpen (gOfficepath + "user\work\writer_to_draw_table.odg",false)
+ printlog " + Reopen saved document "
+ Wait 500
+ Call hCloseDocument
+ printlog " + Close saved document "
+ else
+ Warnlog "Dialog 'Paste Special' is not up!"
+ Call hCloseDocument
+ goto endsub
+ end if
+ else
+ Warnlog "Writer To Draw -> 'Table' failed !"
+ end if
+ printlog " Close active document "
+ Do Until GetDocumentCount = 0
+ Call hCloseDocument
+ Loop
+endcase
+
+' ----------------------------------------------------------------------------------------------
+
+testcase WriterToDrawFrame
+ gApplication = "WRITER"
+ printlog " Open File '..\\writer\\optional\\input\\clipboard\\writer.sxw' "
+ printlog " + Jump to beginning of document "
+ printlog " + Select 'Frame' "
+ printlog " + Copy selected frame "
+ if wSetClipboardtestDefaults("frame") = True then
+ gApplication = "DRAW"
+ printlog " + Open new document "
+ Call hNewDocument
+ printlog " + Edit / Paste Special "
+ Sleep 2
+ try
+ EditPasteSpecial
+ catch
+ Warnlog "Unable to execute 'Edit / Paste / Special' -> Disabled !"
+ Call hCloseDocument
+ wait 500
+ Call hCloseDocument
+ goto endsub
+ endcatch
+ Wait 500
+ printlog " Paste 'Table' in all available clipboard formats "
+ Kontext "InhaltEinfuegen"
+ if InhaltEinfuegen.Exists then
+ Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"frame")
+ printlog " + Write Clipboard format under pasted content "
+ Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\writer_to_draw_frame.odg", "draw8")
+ printlog " + Save document as ..\user\work\writer_to_draw_frame.odg"
+ Wait 500
+ Call hCloseDocument
+ printlog " + Close saved document "
+ wait 500
+ Call hFileOpen (gOfficepath + "user\work\writer_to_draw_frame.odg",false)
+ printlog " + Reopen saved document "
+ Wait 500
+ Call hCloseDocument
+ printlog " + Close saved document "
+ else
+ Warnlog "Dialog 'Paste Special' is not up!"
+ Call hCloseDocument
+ goto endsub
+ end if
+ else
+ Warnlog "Writer To Draw -> 'Frame' failed !"
+ end if
+ printlog " Close active document "
+ Do Until GetDocumentCount = 0
+ Call hCloseDocument
+ Loop
+endcase
+
+' ----------------------------------------------------------------------------------------------
+
+testcase WriterToDrawDrawingObject
+ gApplication = "WRITER"
+ printlog " Open File '..\\writer\\optional\\input\\clipboard\\writer.sxw' "
+ printlog " + Jump to beginning of document "
+ printlog " + Select 'Drawing Object' "
+ printlog " + Copy selected Drawing Object "
+ if wSetClipboardtestDefaults("DRAW") = True then
+ gApplication = "DRAW"
+ printlog " + Open new document "
+ Call hNewDocument
+ printlog " + Edit / Paste Special "
+ Sleep 2
+ try
+ EditPasteSpecial
+ catch
+ Warnlog "Unable to execute 'Edit / Paste / Special' -> Disabled !"
+ Call hCloseDocument
+ wait 500
+ Call hCloseDocument
+ goto endsub
+ endcatch
+ Wait 500
+ printlog " Paste 'Table' in all available clipboard formats "
+ Kontext "InhaltEinfuegen"
+ if InhaltEinfuegen.Exists then
+ Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"DRAW")
+ printlog " + Write Clipboard format under pasted content "
+ Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\writer_to_draw_draw.odg", "draw8")
+ printlog " + Save document as ..\user\work\writer_to_draw_draw.odg"
+ Wait 500
+ Call hCloseDocument
+ printlog " + Close saved document "
+ wait 500
+ Call hFileOpen (gOfficepath + "user\work\writer_to_draw_draw.odg",false)
+ printlog " + Reopen saved document "
+ Wait 500
+ Call hCloseDocument
+ printlog " + Close saved document "
+ else
+ Warnlog "Dialog 'Paste Special' is not up!"
+ Call hCloseDocument
+ goto endsub
+ end if
+ else
+ Warnlog "Writer To Draw -> 'Drawing Object' failed !"
+ end if
+ printlog " Close active document "
+ Do Until GetDocumentCount = 0
+ Call hCloseDocument
+ Loop
+endcase
+
+' ----------------------------------------------------------------------------------------------
+
+testcase WriterToDrawGraphicLinked
+ EnableQaErrors = true
+ gApplication = "WRITER"
+ printlog " Open File '..\\writer\\optional\\input\\clipboard\\writer.sxw' "
+ printlog " + Jump to beginning of document "
+ printlog " + Select 'Linked Graphic' "
+ printlog " + Copy selected Linked Graphic "
+ if wSetClipboardtestDefaults("graphicL") = True then
+ gApplication = "DRAW"
+ printlog " + Open new document "
+ Call hNewDocument
+ printlog " + Edit / Paste Special "
+ Sleep 2
+ try
+ EditPasteSpecial
+ catch
+ warnlog "Check why linked graphic fails !"
+ Call hCloseDocument
+ wait 500
+ Call hCloseDocument
+ goto endsub
+ endcatch
+ Wait 500
+ printlog " Paste 'Linked Graphic' in all available clipboard formats "
+ Kontext "InhaltEinfuegen"
+ if InhaltEinfuegen.Exists then
+ Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"graphicL")
+ printlog " + Write Clipboard format under pasted content "
+ Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\writer_to_draw_graphic1.odg", "draw8")
+ printlog " + Save document as ..\user\work\writer_to_draw_graphic1.odg"
+ Wait 500
+ Call hCloseDocument
+ printlog " + Close saved document "
+ wait 500
+ Call hFileOpen (gOfficepath + "user\work\writer_to_draw_graphic1.odg",false)
+ printlog " + Reopen saved document "
+ Wait 500
+ Call hCloseDocument
+ printlog " + Close saved document "
+ else
+ Warnlog "Dialog 'Paste Special' is not up!"
+ Call hCloseDocument
+ goto endsub
+ end if
+ else
+ Warnlog "Writer To Draw -> 'Linked Graphic' failed !"
+ end if
+ printlog " Close active document "
+ Do Until GetDocumentCount = 0
+ Call hCloseDocument
+ Loop
+ EnableQaErrors = false
+endcase
+
+' ----------------------------------------------------------------------------------------------
+
+testcase WriterToDrawGraphicEmbedded
+ gApplication = "WRITER"
+ printlog " Open File '..\\writer\\optional\\input\\clipboard\\writer.sxw' "
+ printlog " + Jump to beginning of document "
+ printlog " + Select 'Embedded Graphic' "
+ printlog " + Copy selected Embedded Graphic "
+ if wSetClipboardtestDefaults("graphicE") = True then
+ gApplication = "DRAW"
+ printlog " + Open new document "
+ Call hNewDocument
+ printlog " + Edit / Paste Special "
+ Sleep 2
+ try
+ EditPasteSpecial
+ catch
+ Warnlog "Unable to execute 'Edit / Paste / Special' -> Disabled !"
+ Call hCloseDocument
+ wait 500
+ Call hCloseDocument
+ goto endsub
+ endcatch
+ Wait 500
+ printlog " Paste 'Embedded Graphic' in all available clipboard formats "
+ Kontext "InhaltEinfuegen"
+ if InhaltEinfuegen.Exists then
+ Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"graphicE")
+ printlog " + Write Clipboard format under pasted content "
+ Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\writer_to_draw_graphic2.odg", "draw8")
+ printlog " + Save document as ..\user\work\writer_to_draw_graphic2.odg"
+ Wait 500
+ Call hCloseDocument
+ printlog " + Close saved document "
+ wait 500
+ Call hFileOpen (gOfficepath + "user\work\writer_to_draw_graphic2.odg",false)
+ printlog " + Reopen saved document "
+ Wait 500
+ Call hCloseDocument
+ printlog " + Close saved document "
+ else
+ Warnlog "Dialog 'Paste Special' is not up!"
+ Call hCloseDocument
+ goto endsub
+ end if
+ else
+ Warnlog "Writer To Draw -> 'Embedded Graphic' failed !"
+ end if
+ printlog " Close active document "
+ Do Until GetDocumentCount = 0
+ Call hCloseDocument
+ Loop
+endcase
+
+' ----------------------------------------------------------------------------------------------
+
+testcase WriterToDrawOLEObject
+ gApplication = "WRITER"
+ printlog " Open File '..\\writer\\optional\\input\\clipboard\\writer.sxw' "
+ printlog " + Jump to beginning of document "
+ printlog " + Select 'OLE Object' "
+ printlog " + Copy selected OLE Object "
+ if wSetClipboardtestDefaults("ole") = True then
+ gApplication = "DRAW"
+ printlog " + Open new document "
+ Call hNewDocument
+ printlog " + Edit / Paste Special "
+ Sleep 2
+ try
+ EditPasteSpecial
+ catch
+ Warnlog "Unable to execute 'Edit / Paste / Special' -> Disabled !"
+ Call hCloseDocument
+ wait 500
+ Call hCloseDocument
+ goto endsub
+ endcatch
+ Wait 500
+ printlog " Paste 'OLE object' in all available clipboard formats "
+ Kontext "InhaltEinfuegen"
+ if InhaltEinfuegen.Exists then
+ Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"ole")
+ printlog " + Write Clipboard format under pasted content "
+ Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\writer_to_draw_ole.odg", "draw8")
+ printlog " + Save document as ..\user\work\writer_to_draw_ole.odg"
+ Wait 500
+ Call hCloseDocument
+ printlog " + Close saved document "
+ wait 500
+ Call hFileOpen (gOfficepath + "user\work\writer_to_draw_ole.odg",false)
+ printlog " + Reopen saved document "
+ Wait 500
+ Call hCloseDocument
+ printlog " + Close saved document "
+ else
+ Warnlog "Dialog 'Paste Special' is not up!"
+ Call hCloseDocument
+ goto endsub
+ end if
+ else
+ Warnlog "Writer To Draw -> 'OLE object' failed !"
+ end if
+ printlog " Close active document "
+ Do Until GetDocumentCount = 0
+ Call hCloseDocument
+ Loop
+endcase
+
+' ----------------------------------------------------------------------------------------------
+
+testcase WriterToDrawControl
+ gApplication = "WRITER"
+ printlog " Open File '..\\writer\\optional\\input\\clipboard\\writer.sxw' "
+ printlog " + Jump to beginning of document "
+ printlog " + Select 'Control' "
+ printlog " + Copy selected Control "
+ if wSetClipboardtestDefaults("control") = True then
+ gApplication = "DRAW"
+ printlog " + Open new document "
+ Call hNewDocument
+ printlog " + Edit / Paste Special "
+ Sleep 2
+ try
+ EditPasteSpecial
+ catch
+ Warnlog "Unable to execute 'Edit / Paste / Special' -> Disabled !"
+ Call hCloseDocument
+ wait 500
+ Call hCloseDocument
+ goto endsub
+ endcatch
+ Wait 500
+ printlog " Paste 'Control' in all available clipboard formats "
+ Kontext "InhaltEinfuegen"
+ if InhaltEinfuegen.Exists then
+ Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"control")
+ printlog " + Write Clipboard format under pasted content "
+ Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\writer_to_draw_control.odg", "draw8")
+ printlog " + Save document as ..\user\work\writer_to_draw_control.odg"
+ Wait 500
+ Call hCloseDocument
+ printlog " + Close saved document "
+ wait 500
+ Call hFileOpen (gOfficepath + "user\work\writer_to_draw_control.odg",false)
+ printlog " + Reopen saved document "
+ Wait 500
+ Call hCloseDocument
+ printlog " + Close saved document "
+ else
+ Warnlog "Dialog 'Paste Special' is not up!"
+ Call hCloseDocument
+ goto endsub
+ end if
+ else
+ Warnlog "Writer To Draw -> 'Control' failed !"
+ end if
+ printlog " Close active document "
+ Do Until GetDocumentCount = 0
+ Call hCloseDocument
+ Loop
+endcase
diff --git a/testautomation/writer/optional/includes/clipboard/w_214_.inc b/testautomation/writer/optional/includes/clipboard/w_214_.inc
new file mode 100644
index 000000000000..1567818d63e1
--- /dev/null
+++ b/testautomation/writer/optional/includes/clipboard/w_214_.inc
@@ -0,0 +1,524 @@
+'**************************************************************************
+' 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 : helge.delfs@sun.com
+'*
+'* short description : CROSS-APPLICATIONS CLIPBOARD TEST (Writer)
+'*
+'\***********************************************************************
+
+sub w_214_
+
+ Call WriterToHTMLText
+ Call WriterToHTMLField
+ Call WriterToHTMLTable
+ Call WriterToHTMLFrame
+ Call WriterToHTMLDrawingObject
+ Call WriterToHTMLGraphicLinked
+ Call WriterToHTMLGraphicEmbedded
+ Call WriterToHTMLOLEObject
+ Call WriterToHTMLControl
+
+end sub
+
+' ---------------------------------------------------------------------------------
+
+testcase WriterToHTMLText
+ gApplication = "WRITER"
+ printlog " Open File '..\\writer\\optional\\input\\clipboard\\writer.sxw' "
+ printlog " + Jump to beginning of document "
+ printlog " + Select first paragraph "
+ printlog " + Copy selected text "
+ if wSetClipboardtestDefaults("text") = True then
+ gApplication = "HTML"
+ printlog " + Open new document "
+ Call hNewDocument
+ printlog " + Edit / Paste Special "
+ Sleep 2
+ try
+ EditPasteSpecialWriter
+ catch
+ Warnlog "Unable to execute 'Edit / Paste Special' ! Test failed!"
+ Call hCloseDocument ' Close Source-File
+ Call hCloseDocument ' Close Target-File
+ goto endsub
+ endcatch
+ Wait 500
+ printlog " Paste 'Text' in all available clipboard formats "
+ Kontext "InhaltEinfuegen"
+ if InhaltEinfuegen.Exists then
+ Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"text")
+ printlog " + Write Clipboard format under pasted content "
+ Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\writer_to_html_text.html", "HTML")
+ printlog " + Save document as ..\user\work\writer_to_html_text.html"
+ Wait 500
+ Call hCloseDocument
+ printlog " + Close saved document "
+ wait 500
+ Call hFileOpen (gOfficepath + "user\work\writer_to_html_text.html")
+ printlog " + Reopen saved document "
+ Wait 500
+ Call hCloseDocument
+ printlog " + Close saved document "
+ else
+ Warnlog "Dialog 'Paste Special' is not up!"
+ Call hCloseDocument
+ goto endsub
+ end if
+ else
+ Warnlog "Writer To HTML -> 'Text' failed !"
+ end if
+ printlog " Close active document "
+ Do Until GetDocumentCount = 0
+ Call hCloseDocument
+ Loop
+endcase
+
+' ----------------------------------------------------------------------------------------------
+
+testcase WriterToHTMLField
+ gApplication = "WRITER"
+ printlog " Open File '..\\writer\\optional\\input\\clipboard\\writer.sxw' "
+ printlog " + Jump to beginning of document "
+ printlog " + Select paragraph with 'Date Field' "
+ printlog " + Copy selected text "
+ if wSetClipboardtestDefaults("field") = True then
+ gApplication = "HTML"
+ printlog " + Open new document "
+ Call hNewDocument
+ printlog " + Edit / Paste Special "
+ Sleep 2
+ try
+ EditPasteSpecialWriter
+ catch
+ Warnlog "Unable to execute 'Edit / Paste Special' ! Test failed!"
+ Call hCloseDocument ' Close Source-File
+ Call hCloseDocument ' Close Target-File
+ goto endsub
+ endcatch
+ Wait 500
+ printlog " Paste 'Field' in all available clipboard formats "
+ Kontext "InhaltEinfuegen"
+ if InhaltEinfuegen.Exists then
+ Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"field")
+ printlog " + Write Clipboard format under pasted content "
+ Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\writer_to_html_field.html", "HTML")
+ printlog " + Save document as ..\user\work\writer_to_html_field.html"
+ Wait 500
+ Call hCloseDocument
+ printlog " + Close saved document "
+ wait 500
+ Call hFileOpen (gOfficepath + "user\work\writer_to_html_field.html")
+ printlog " + Reopen saved document "
+ Wait 500
+ Call hCloseDocument
+ printlog " + Close saved document "
+ else
+ Warnlog "Dialog 'Paste Special' is not up!"
+ Call hCloseDocument
+ goto endsub
+ end if
+ else
+ Warnlog "Writer To HTML -> 'Field' failed !"
+ end if
+ printlog " Close active document "
+ Do Until GetDocumentCount = 0
+ Call hCloseDocument
+ Loop
+endcase
+
+' ----------------------------------------------------------------------------------------------
+
+testcase WriterToHTMLTable
+ gApplication = "WRITER"
+ printlog " Open File '..\\writer\\optional\\input\\clipboard\\writer.sxw' "
+ printlog " + Jump to beginning of document "
+ printlog " + Select 'Table' "
+ printlog " + Copy selected table "
+ if wSetClipboardtestDefaults("table") = True then
+ gApplication = "HTML"
+ printlog " + Open new document "
+ Call hNewDocument
+ printlog " + Edit / Paste Special "
+ Sleep 2
+ try
+ EditPasteSpecialWriter
+ catch
+ Warnlog "Unable to execute 'Edit / Paste Special' ! Test failed!"
+ Call hCloseDocument ' Close Source-File
+ Call hCloseDocument ' Close Target-File
+ goto endsub
+ endcatch
+ Wait 500
+ printlog " Paste 'Table' in all available clipboard formats "
+ Kontext "InhaltEinfuegen"
+ if InhaltEinfuegen.Exists then
+ Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"table")
+ printlog " + Write Clipboard format under pasted content "
+ Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\writer_to_html_table.html", "HTML")
+ printlog " + Save document as ..\user\work\writer_to_html_table.html"
+ Wait 500
+ Call hCloseDocument
+ printlog " + Close saved document "
+ wait 500
+ Call hFileOpen (gOfficepath + "user\work\writer_to_html_table.html")
+ printlog " + Reopen saved document "
+ Wait 500
+ Call hCloseDocument
+ printlog " + Close saved document "
+ else
+ Warnlog "Dialog 'Paste Special' is not up!"
+ Call hCloseDocument
+ goto endsub
+ end if
+ else
+ Warnlog "Writer To HTML -> 'Table' failed !"
+ end if
+ printlog " Close active document "
+ Do Until GetDocumentCount = 0
+ Call hCloseDocument
+ Loop
+endcase
+
+' ----------------------------------------------------------------------------------------------
+
+testcase WriterToHTMLFrame
+ gApplication = "WRITER"
+ printlog " Open File '..\\writer\\optional\\input\\clipboard\\writer.sxw' "
+ printlog " + Jump to beginning of document "
+ printlog " + Select 'Frame' "
+ printlog " + Copy selected frame "
+ if wSetClipboardtestDefaults("frame") = True then
+ gApplication = "HTML"
+ printlog " + Open new document "
+ Call hNewDocument
+ printlog " + Edit / Paste Special "
+ Sleep 2
+ try
+ EditPasteSpecialWriter
+ catch
+ Warnlog "Unable to execute 'Edit / Paste Special' ! Test failed!"
+ Call hCloseDocument ' Close Source-File
+ Call hCloseDocument ' Close Target-File
+ goto endsub
+ endcatch
+ Wait 500
+ printlog " Paste 'Table' in all available clipboard formats "
+ Kontext "InhaltEinfuegen"
+ if InhaltEinfuegen.Exists then
+ Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"frame")
+ printlog " + Write Clipboard format under pasted content "
+ Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\writer_to_html_frame.html", "HTML")
+ printlog " + Save document as ..\user\work\writer_to_html_frame.html"
+ Wait 500
+ Call hCloseDocument
+ printlog " + Close saved document "
+ wait 500
+ Call hFileOpen (gOfficepath + "user\work\writer_to_html_frame.html")
+ printlog " + Reopen saved document "
+ Wait 500
+ Call hCloseDocument
+ printlog " + Close saved document "
+ else
+ Warnlog "Dialog 'Paste Special' is not up!"
+ Call hCloseDocument
+ goto endsub
+ end if
+ else
+ Warnlog "Writer To HTML -> 'Frame' failed !"
+ end if
+ printlog " Close active document "
+ Do Until GetDocumentCount = 0
+ Call hCloseDocument
+ Loop
+endcase
+
+' ----------------------------------------------------------------------------------------------
+
+testcase WriterToHTMLDrawingObject
+ gApplication = "WRITER"
+ printlog " Open File '..\\writer\\optional\\input\\clipboard\\writer.sxw' "
+ printlog " + Jump to beginning of document "
+ printlog " + Select 'Drawing Object' "
+ printlog " + Copy selected Drawing Object "
+ if wSetClipboardtestDefaults("DRAW") = True then
+ gApplication = "HTML"
+ printlog " + Open new document "
+ Call hNewDocument
+ printlog " + Edit / Paste Special "
+ Sleep 2
+ try
+ EditPasteSpecialWriter
+ catch
+ Warnlog "Unable to execute 'Edit / Paste Special' ! Test failed!"
+ Call hCloseDocument ' Close Source-File
+ Call hCloseDocument ' Close Target-File
+ goto endsub
+ endcatch
+ Wait 500
+ printlog " Paste 'Table' in all available clipboard formats "
+ Kontext "InhaltEinfuegen"
+ if InhaltEinfuegen.Exists then
+ Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"DRAW")
+ printlog " + Write Clipboard format under pasted content "
+ Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\writer_to_html_draw.html", "HTML")
+ printlog " + Save document as ..\user\work\writer_to_html_draw.html"
+ Wait 500
+ Call hCloseDocument
+ printlog " + Close saved document "
+ wait 500
+ Call hFileOpen (gOfficepath + "user\work\writer_to_html_draw.html")
+ printlog " + Reopen saved document "
+ Wait 500
+ Call hCloseDocument
+ printlog " + Close saved document "
+ else
+ Warnlog "Dialog 'Paste Special' is not up!"
+ Call hCloseDocument
+ goto endsub
+ end if
+ else
+ Warnlog "Writer To HTML -> 'Drawing Object' failed !"
+ end if
+ printlog " Close active document "
+ Do Until GetDocumentCount = 0
+ Call hCloseDocument
+ Loop
+endcase
+
+' ----------------------------------------------------------------------------------------------
+
+testcase WriterToHTMLGraphicLinked
+ gApplication = "WRITER"
+ printlog " Open File '..\\writer\\optional\\input\\clipboard\\writer.sxw' "
+ printlog " + Jump to beginning of document "
+ printlog " + Select 'Linked Graphic' "
+ printlog " + Copy selected Linked Graphic "
+ if wSetClipboardtestDefaults("graphicL") = True then
+ gApplication = "HTML"
+ printlog " + Open new document "
+ Call hNewDocument
+ printlog " + Edit / Paste Special "
+ Sleep 2
+ try
+ EditPasteSpecialWriter
+ catch
+ Warnlog "Unable to execute 'Edit / Paste Special' ! Test failed!"
+ Call hCloseDocument ' Close Source-File
+ Call hCloseDocument ' Close Target-File
+ goto endsub
+ endcatch
+ Wait 500
+ printlog " Paste 'Linked Graphic' in all available clipboard formats "
+ Kontext "InhaltEinfuegen"
+ if InhaltEinfuegen.Exists then
+ Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"graphicL")
+ printlog " + Write Clipboard format under pasted content "
+ Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\writer_to_html_graphic1.html", "HTML")
+ printlog " + Save document as ..\user\work\writer_to_html_graphic1.html"
+ Wait 500
+ Call hCloseDocument
+ printlog " + Close saved document "
+ wait 500
+ Call hFileOpen (gOfficepath + "user\work\writer_to_html_graphic1.html")
+ printlog " + Reopen saved document "
+ Wait 500
+ Call hCloseDocument
+ printlog " + Close saved document "
+ else
+ Warnlog "Dialog 'Paste Special' is not up!"
+ Call hCloseDocument
+ goto endsub
+ end if
+ else
+ Warnlog "Writer To HTML -> 'Linked Graphic' failed !"
+ end if
+ printlog " Close active document "
+ Do Until GetDocumentCount = 0
+ Call hCloseDocument
+ Loop
+endcase
+
+' ----------------------------------------------------------------------------------------------
+
+testcase WriterToHTMLGraphicEmbedded
+ gApplication = "WRITER"
+ printlog " Open File '..\\writer\\optional\\input\\clipboard\\writer.sxw' "
+ printlog " + Jump to beginning of document "
+ printlog " + Select 'Embedded Graphic' "
+ printlog " + Copy selected Embedded Graphic "
+ if wSetClipboardtestDefaults("graphicE") = True then
+ gApplication = "HTML"
+ printlog " + Open new document "
+ Call hNewDocument
+ printlog " + Edit / Paste Special "
+ Sleep 2
+ try
+ EditPasteSpecialWriter
+ catch
+ Warnlog "Unable to execute 'Edit / Paste Special' ! Test failed!"
+ Call hCloseDocument ' Close Source-File
+ Call hCloseDocument ' Close Target-File
+ goto endsub
+ endcatch
+ Wait 500
+ printlog " Paste 'Embedded Graphic' in all available clipboard formats "
+ Kontext "InhaltEinfuegen"
+ if InhaltEinfuegen.Exists then
+ Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"graphicE")
+ printlog " + Write Clipboard format under pasted content "
+ Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\writer_to_html_graphic2.html", "HTML")
+ printlog " + Save document as ..\user\work\writer_to_html_graphic2.html"
+ Wait 500
+ Call hCloseDocument
+ printlog " + Close saved document "
+ wait 500
+ Call hFileOpen (gOfficepath + "user\work\writer_to_html_graphic2.html")
+ printlog " + Reopen saved document "
+ Wait 500
+ Call hCloseDocument
+ printlog " + Close saved document "
+ else
+ Warnlog "Dialog 'Paste Special' is not up!"
+ Call hCloseDocument
+ goto endsub
+ end if
+ else
+ Warnlog "Writer To HTML -> 'Embedded Graphic' failed !"
+ end if
+ printlog " Close active document "
+ Do Until GetDocumentCount = 0
+ Call hCloseDocument
+ Loop
+endcase
+
+' ----------------------------------------------------------------------------------------------
+
+testcase WriterToHTMLOLEObject
+ gApplication = "WRITER"
+ printlog " Open File '..\\writer\\optional\\input\\clipboard\\writer.sxw' "
+ printlog " + Jump to beginning of document "
+ printlog " + Select 'OLE Object' "
+ printlog " + Copy selected OLE Object "
+ if wSetClipboardtestDefaults("ole") = True then
+ gApplication = "HTML"
+ printlog " + Open new document "
+ Call hNewDocument
+ printlog " + Edit / Paste Special "
+ Sleep 2
+ try
+ EditPasteSpecialWriter
+ catch
+ Warnlog "Unable to execute 'Edit / Paste Special' ! Test failed!"
+ Call hCloseDocument ' Close Source-File
+ Call hCloseDocument ' Close Target-File
+ goto endsub
+ endcatch
+ Wait 500
+ printlog " Paste 'OLE object' in all available clipboard formats "
+ Kontext "InhaltEinfuegen"
+ if InhaltEinfuegen.Exists then
+ Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"ole")
+ printlog " + Write Clipboard format under pasted content "
+ Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\writer_to_html_ole.html", "HTML")
+ printlog " + Save document as ..\user\work\writer_to_html_ole.html"
+ Wait 500
+ Call hCloseDocument
+ printlog " + Close saved document "
+ wait 500
+ Call hFileOpen (gOfficepath + "user\work\writer_to_html_ole.html")
+ printlog " + Reopen saved document "
+ Wait 500
+ Call hCloseDocument
+ printlog " + Close saved document "
+ else
+ Warnlog "Dialog 'Paste Special' is not up!"
+ Call hCloseDocument
+ goto endsub
+ end if
+ else
+ Warnlog "Writer To HTML -> 'OLE object' failed !"
+ end if
+ printlog " Close active document "
+ Do Until GetDocumentCount = 0
+ Call hCloseDocument
+ Loop
+endcase
+
+' ----------------------------------------------------------------------------------------------
+
+testcase WriterToHTMLControl
+ gApplication = "WRITER"
+ printlog " Open File '..\\writer\\optional\\input\\clipboard\\writer.sxw' "
+ printlog " + Jump to beginning of document "
+ printlog " + Select 'Control' "
+ printlog " + Copy selected Control "
+ if wSetClipboardtestDefaults("control") = True then
+ gApplication = "HTML"
+ printlog " + Open new document "
+ Call hNewDocument
+ printlog " + Edit / Paste Special "
+ Sleep 2
+ try
+ EditPasteSpecialWriter
+ catch
+ Warnlog "Unable to execute 'Edit / Paste Special' ! Test failed!"
+ Call hCloseDocument ' Close Source-File
+ Call hCloseDocument ' Close Target-File
+ goto endsub
+ endcatch
+ Wait 500
+ printlog " Paste 'Control' in all available clipboard formats "
+ Kontext "InhaltEinfuegen"
+ if InhaltEinfuegen.Exists then
+ Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"control")
+ printlog " + Write Clipboard format under pasted content "
+ Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\writer_to_html_control.html", "HTML")
+ printlog " + Save document as ..\user\work\writer_to_html_control.html"
+ Wait 500
+ Call hCloseDocument
+ printlog " + Close saved document "
+ wait 500
+ Call hFileOpen (gOfficepath + "user\work\writer_to_html_control.html")
+ printlog " + Reopen saved document "
+ Wait 500
+ Call hCloseDocument
+ printlog " + Close saved document "
+ else
+ Warnlog "Dialog 'Paste Special' is not up!"
+ Call hCloseDocument
+ goto endsub
+ end if
+ else
+ Warnlog "Writer To HTML -> 'Control' failed !"
+ end if
+ printlog " Close active document "
+ Do Until GetDocumentCount = 0
+ Call hCloseDocument
+ Loop
+endcase
+
+'------------------------------------------------------------------------------------------------------
diff --git a/testautomation/writer/optional/includes/clipboard/w_215_.inc b/testautomation/writer/optional/includes/clipboard/w_215_.inc
new file mode 100644
index 000000000000..76aa31a2e108
--- /dev/null
+++ b/testautomation/writer/optional/includes/clipboard/w_215_.inc
@@ -0,0 +1,448 @@
+'**************************************************************************
+' 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 : helge.delfs@sun.com
+'*
+'* short description : CROSS-APPLICATIONS CLIPBOARD TEST (Writer)
+'*
+'\***********************************************************************
+
+sub w_215_
+
+ Call CalcToWriterText1
+ Call CalcToWriterText2
+ Call CalcToWriterCalculation
+ Call CalcToWriterHyperlink1
+ Call CalcToWriterHyperlink2
+ Call CalcToWriterDrawObject
+ Call CalcToWriterOLE
+
+end sub
+
+'--------------------------------------------------------
+
+testcase CalcToWriterText1
+ gApplication = "CALC"
+ printlog " Open File '..\\writer\\optional\\input\\clipboard\\calc.sxc' "
+ printlog " Jump to beginning of document "
+ printlog " Select cell <A2> "
+ printlog " Copy selected text "
+ Call hFileOpen (gtesttoolpath & "writer\optional\input\clipboard\calc.sxc")
+ Call sMakeReadOnlyDocumentEditable
+ Kontext "DocumentCalc"
+ printlog " Jump to beginning of document "
+ DocumentCalc.TypeKeys "<Mod1 Home>"
+ DocumentCalc.TypeKeys "<Down>"
+ EditCopy
+ gApplication = "WRITER"
+ printlog " Open a new writerdocument "
+ Call hNewDocument
+ Sleep 2
+ try
+ EditPasteSpecialWriter
+ catch
+ Warnlog "Unable to execute 'Edit / Paste Special'! Test failed!"
+ Call hCloseDocument
+ Call hCloseDocument
+ goto endsub
+ endcatch
+ Wait 500
+ printlog " Paste 'Text' in all available clipboard formats "
+ Kontext "InhaltEinfuegen"
+ if InhaltEinfuegen.Exists then
+ Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"ctext")
+ printlog " Write Clipboard format under pasted content "
+ Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\writer_to_writer_textformat_wholecell.odt", "writer8")
+ printlog " Save document as ..\user\work\writer_to_writer_textformat_wholecell.odt"
+ Wait 500
+ Call hCloseDocument
+ printlog " Close saved document "
+ wait 500
+ printlog " Reopen saved document "
+ if hFileOpen (gOfficepath + "user\work\writer_to_writer_textformat_wholecell.odt",true) = false then
+ Kontext "Active"
+ if Active.Exists then
+ try
+ Active.Yes
+ catch
+ Warnlog "Unable to remove checkbox: " + Active.Gettext
+ Active.ok
+ endcatch
+ end if
+ end if
+ Wait 500
+ printlog " Close saved document "
+ Call hCloseDocument
+ else
+ Warnlog "Dialog 'Paste Special' is not up!"
+ Call hCloseDocument
+ goto endsub
+ end if
+ printlog " Close active document "
+ Call hCloseDocument
+endcase
+
+' ---------------------------------------------------------------------------------
+
+testcase CalcToWriterText2
+ gApplication = "CALC"
+ printlog " Open File '..\\writer\\optional\\input\\clipboard\\calc.sxc' "
+ printlog " Jump to beginning of document "
+ printlog " Select cell <A1>, press F2 and select all "
+ printlog " Copy selected text "
+ Call hFileOpen (gtesttoolpath & "writer\optional\input\clipboard\calc.sxc")
+ Call sMakeReadOnlyDocumentEditable
+ Kontext "DocumentCalc"
+ printlog " Jump to beginning of document "
+ DocumentCalc.TypeKeys "<Mod1 Home>"
+ DocumentCalc.TypeKeys "<Down>"
+ DocumentCalc.TypeKeys "<F2>"
+ DocumentCalc.TypeKeys "<Mod1 A>"
+ EditCopy
+ gApplication = "WRITER"
+ printlog " Open a new writerdocument "
+ Call hNewDocument
+ Sleep 2
+ try
+ EditPasteSpecialWriter
+ catch
+ Warnlog "Unable to execute 'Edit / Paste Special'! Test failed!"
+ Call hCloseDocument
+ Call hCloseDocument
+ goto endsub
+ endcatch
+ Wait 500
+ printlog " Paste 'Text' in all available clipboard formats "
+ Kontext "InhaltEinfuegen"
+ if InhaltEinfuegen.Exists then
+ Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"text")
+ printlog " Write Clipboard format under pasted content "
+ Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\writer_to_writer_textformat_cellcontent.odt", "writer8")
+ printlog " Save document as ..\user\work\writer_to_writer_textformat_cellcontent.odt"
+ Wait 500
+ printlog " Close saved document "
+ Call hCloseDocument
+ wait 500
+ printlog " Reopen saved document "
+ Call hFileOpen (gOfficepath + "user\work\writer_to_writer_textformat_cellcontent.odt",false)
+ Wait 500
+ printlog " Close saved document "
+ Call hCloseDocument
+ else
+ Warnlog "Dialog 'Paste Special' is not up!"
+ Call hCloseDocument
+ goto endsub
+ end if
+ printlog " Close active document "
+ Call hCloseDocument
+endcase
+
+' ---------------------------------------------------------------------------------
+
+testcase CalcToWriterCalculation
+ gApplication = "CALC"
+ printlog " Open File '..\\writer\\optional\\input\\clipboard\\calc.sxc' "
+ printlog " Jump to beginning of document "
+ printlog " Select cell <A5:C5> "
+ printlog " Copy selected text "
+ Call hFileOpen (gtesttoolpath & "writer\optional\input\clipboard\calc.sxc")
+ Call sMakeReadOnlyDocumentEditable
+ Kontext "DocumentCalc"
+ printlog " Jump to beginning of document "
+ DocumentCalc.TypeKeys "<Mod1 Home>"
+ DocumentCalc.TypeKeys "<Down>",4
+ DocumentCalc.TypeKeys "<Shift Right>", 2
+ EditCopy
+ gApplication = "WRITER"
+ printlog " Open a new writerdocument "
+ Call hNewDocument
+ Sleep 2
+ try
+ EditPasteSpecialWriter
+ catch
+ Warnlog "Unable to execute 'Edit / Paste Special'! Test failed!"
+ Call hCloseDocument
+ Call hCloseDocument
+ goto endsub
+ endcatch
+ Wait 500
+ printlog " Paste 'Text' in all available clipboard formats "
+ Kontext "InhaltEinfuegen"
+ if InhaltEinfuegen.Exists then
+ Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"ctext")
+ printlog " Write Clipboard format under pasted content "
+ Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\writer_to_writer_calculation_cellformat.odt", "writer8")
+ printlog " Save document as ..\user\work\writer_to_writer_calculation_cellformat.odt"
+ Wait 500
+ Call hCloseDocument
+ printlog " Close saved document "
+ wait 500
+ printlog " Reopen saved document "
+ if hFileOpen (gOfficepath + "user\work\writer_to_writer_calculation_cellformat.odt",true) = false then
+ Kontext "Active"
+ if Active.Exists then
+ try
+ Active.Yes
+ catch
+ Warnlog "Unable to remove checkbox: " + Active.Gettext
+ Active.ok
+ endcatch
+ end if
+ end if
+ Wait 500
+ printlog " Close saved document "
+ Call hCloseDocument
+ else
+ Warnlog "Dialog 'Paste Special' is not up!"
+ Call hCloseDocument
+ goto endsub
+ end if
+ printlog " Close active document "
+ Call hCloseDocument
+endcase
+
+' ---------------------------------------------------------------------------------
+
+testcase CalcToWriterHyperlink1
+ gApplication = "CALC"
+ printlog " Open File '..\\writer\\optional\\input\\clipboard\\calc.sxc' "
+ printlog " Jump to beginning of document "
+ printlog " Select cell <A8> "
+ printlog " Copy selected text "
+ Call hFileOpen (gtesttoolpath & "writer\optional\input\clipboard\calc.sxc")
+ Call sMakeReadOnlyDocumentEditable
+ Kontext "DocumentCalc"
+ printlog " Jump to beginning of document "
+ DocumentCalc.TypeKeys "<Mod1 Home>"
+ DocumentCalc.TypeKeys "<Down>",7
+ EditCopy
+ gApplication = "WRITER"
+ printlog " Open a new writerdocument "
+ Call hNewDocument
+ Sleep 2
+ try
+ EditPasteSpecialWriter
+ catch
+ Warnlog "Unable to execute 'Edit / Paste Special'! Test failed!"
+ Call hCloseDocument
+ Call hCloseDocument
+ goto endsub
+ endcatch
+ Wait 500
+ printlog " Paste 'Text' in all available clipboard formats "
+ Kontext "InhaltEinfuegen"
+ if InhaltEinfuegen.Exists then
+ Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"ctext")
+ printlog " Write Clipboard format under pasted content "
+ Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\writer_to_writer_hyperlink_wholecell.odt", "writer8")
+ printlog " Save document as ..\user\work\writer_to_writer_hyperlink_wholecell.odt"
+ Wait 500
+ Call hCloseDocument
+ printlog " Close saved document "
+ wait 500
+ printlog " Reopen saved document "
+ if hFileOpen (gOfficepath + "user\work\writer_to_writer_hyperlink_wholecell.odt",true) = false then
+ Kontext "Active"
+ if Active.Exists then
+ try
+ Active.Yes
+ catch
+ Warnlog "Unable to remove checkbox: " + Active.Gettext
+ Active.ok
+ endcatch
+ end if
+ end if
+ Wait 500
+ printlog " Close saved document "
+ Call hCloseDocument
+ else
+ Warnlog "Dialog 'Paste Special' is not up!"
+ Call hCloseDocument
+ goto endsub
+ end if
+ printlog " Close active document "
+ Call hCloseDocument
+endcase
+
+' ---------------------------------------------------------------------------------
+
+testcase CalcToWriterHyperlink2
+ gApplication = "CALC"
+ printlog " Open File '..\\writer\\optional\\input\\clipboard\\calc.sxc' "
+ printlog " Jump to beginning of document "
+ printlog " Select cell <A8> "
+ printlog " Copy selected text "
+ Call hFileOpen (gtesttoolpath & "writer\optional\input\clipboard\calc.sxc")
+ Call sMakeReadOnlyDocumentEditable
+ Kontext "DocumentCalc"
+ printlog " Jump to beginning of document "
+ DocumentCalc.TypeKeys "<Mod1 Home>"
+ DocumentCalc.TypeKeys "<Down>",7
+ DocumentCalc.TypeKeys "<F2>"
+ DocumentCalc.TypeKeys "<Mod1 A>"
+ EditCopy
+ gApplication = "WRITER"
+ printlog " Open a new writerdocument "
+ Call hNewDocument
+ Sleep 2
+ try
+ EditPasteSpecialWriter
+ catch
+ Warnlog "Unable to execute 'Edit / Paste Special'! Test failed!"
+ Call hCloseDocument
+ Call hCloseDocument
+ goto endsub
+ endcatch
+ Wait 500
+ printlog " Paste 'Text' in all available clipboard formats "
+ Kontext "InhaltEinfuegen"
+ if InhaltEinfuegen.Exists then
+ printlog " Write Clipboard format under pasted content "
+ Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"text")
+ printlog " Save document as ..\user\work\writer_to_writer_hyperlink_cellcontent.odt"
+ Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\writer_to_writer_hyperlink_cellcontent.odt", "writer8")
+ Wait 500
+ printlog " Close saved document "
+ Call hCloseDocument
+ wait 500
+ printlog " Reopen saved document "
+ Call hFileOpen (gOfficepath + "user\work\writer_to_writer_hyperlink_cellcontent.odt",false)
+ Wait 500
+ printlog " Close saved document "
+ Call hCloseDocument
+ else
+ Warnlog "Dialog 'Paste Special' is not up!"
+ Call hCloseDocument
+ goto endsub
+ end if
+ printlog " Close active document "
+ Call hCloseDocument
+endcase
+
+' ---------------------------------------------------------------------------------
+
+testcase CalcToWriterDrawObject
+ gApplication = "CALC"
+ printlog " Open File '..\\writer\\optional\\input\\clipboard\\calc.sxc' "
+ printlog " Jump to beginning of document "
+ printlog " Select Drawing object "
+ printlog " Copy selected object "
+ Call hFileOpen (gtesttoolpath & "writer\optional\input\clipboard\calc.sxc")
+ Call sMakeReadOnlyDocumentEditable
+ Kontext "DocumentCalc"
+ printlog " Jump to beginning of document "
+ Call wNavigatorAuswahl(8,1)
+ EditCopy
+ gApplication = "WRITER"
+ printlog " Open a new writerdocument "
+ Call hNewDocument
+ Sleep 2
+ try
+ EditPasteSpecialWriter
+ catch
+ Warnlog "Unable to execute 'Edit / Paste Special'! Test failed!"
+ Call hCloseDocument
+ Call hCloseDocument
+ goto endsub
+ endcatch
+ Wait 500
+ printlog " Paste 'Text' in all available clipboard formats "
+ Kontext "InhaltEinfuegen"
+ if InhaltEinfuegen.Exists then
+ printlog " Write Clipboard format under pasted content "
+ Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"ctext")
+ printlog " Save document as ..\user\work\writer_to_writer_draw.odt"
+ Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\writer_to_writer_draw.odt", "writer8")
+ Wait 500
+ printlog " Close saved document "
+ Call hCloseDocument
+ wait 500
+ printlog " Reopen saved document "
+ Call hFileOpen (gOfficepath + "user\work\writer_to_writer_draw.odt",false)
+ Wait 500
+ printlog " Close saved document "
+ Call hCloseDocument
+ else
+ Warnlog "Dialog 'Paste Special' is not up!"
+ Call hCloseDocument
+ goto endsub
+ end if
+ printlog " Close active document "
+ Call hCloseDocument
+endcase
+
+' ---------------------------------------------------------------------------------
+
+testcase CalcToWriterOLE
+ gApplication = "CALC"
+ printlog " Open File '..\\writer\\optional\\input\\clipboard\\calc.sxc' "
+ printlog " Jump to beginning of document "
+ printlog " Select OLE-Object "
+ printlog " Copy selected object "
+ Call hFileOpen (gtesttoolpath & "writer\optional\input\clipboard\calc.sxc")
+ Call sMakeReadOnlyDocumentEditable
+ Kontext "DocumentCalc"
+ printlog " Jump to beginning of document "
+ Call wNavigatorAuswahl(6,1)
+ EditCopy
+ gApplication = "WRITER"
+ printlog " Open a new writerdocument "
+ Call hNewDocument
+ Sleep 2
+ try
+ EditPasteSpecialWriter
+ catch
+ Warnlog "Unable to execute 'Edit / Paste Special'! Test failed!"
+ Call hCloseDocument
+ Call hCloseDocument
+ goto endsub
+ endcatch
+ Wait 500
+ printlog " Paste 'Text' in all available clipboard formats "
+ Kontext "InhaltEinfuegen"
+ if InhaltEinfuegen.Exists then
+ printlog " Write Clipboard format under pasted content "
+ Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"ctext")
+ printlog " Save document as ..\user\work\writer_to_writer_ole.odt"
+ Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\writer_to_writer_ole.odt", "writer8")
+ Wait 500
+ printlog " Close saved document "
+ Call hCloseDocument
+ wait 500
+ printlog " Reopen saved document "
+ Call hFileOpen (gOfficepath + "user\work\writer_to_writer_ole.odt",false)
+ Wait 500
+ printlog " Close saved document "
+ Call hCloseDocument
+ else
+ Warnlog "Dialog 'Paste Special' is not up!"
+ Call hCloseDocument
+ goto endsub
+ end if
+ printlog " Close active document "
+ Call hCloseDocument
+endcase
+
diff --git a/testautomation/writer/optional/includes/clipboard/w_216_.inc b/testautomation/writer/optional/includes/clipboard/w_216_.inc
new file mode 100644
index 000000000000..b36f8490a90e
--- /dev/null
+++ b/testautomation/writer/optional/includes/clipboard/w_216_.inc
@@ -0,0 +1,440 @@
+'**************************************************************************
+' 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 : helge.delfs@sun.com
+'*
+'* short description : CROSS-APPLICATIONS CLIPBOARD TEST (Writer)
+'*
+'\***********************************************************************
+
+sub w_216_
+
+ Call HTMLToWRITERText
+ Call HTMLToWRITERField
+ Call HTMLToWRITERTable
+ Call HTMLToWRITERGraphicLinked
+ Call HTMLToWRITERControl
+ Call HTMLToWRITERFloatingFrame
+
+end sub
+
+' ---------------------------------------------------------------------------------
+
+testcase HTMLToWRITERText
+
+ gApplication = "HTML"
+ printlog " Open File '..\\writer\\optional\\input\\clipboard\\html.html' "
+ printlog " Jump to beginning of document "
+ printlog " Select first paragraph "
+ printlog " Copy selected text "
+ Call hFileOpen (gtesttoolpath & "writer\optional\input\clipboard\html.html",false)
+ Call sMakeReadOnlyDocumentEditable
+ sleep (3)
+ if GetDocumentCount() = 2 then
+ Warnlog "#i104365#read only document remains opened"
+ endif
+ printlog " Jump to beginning of document "
+ Call wTypeKeys "<Mod1 Home>"
+ Call wTypeKeys "<Shift Down><Shift End>"
+ EditCopy
+ sleep (2)
+ Call wTypeKeys "<Home>"
+ gApplication = "WRITER"
+
+ printlog " Open new document "
+ Call hNewDocument
+ printlog " Edit / Paste Special "
+ Sleep 2
+ try
+ EditPasteSpecialWriter
+ catch
+ Warnlog "Unable to execute 'Edit / Paste Special'! Test failed!"
+ Call hCloseDocument
+ Call hCloseDocument
+ goto endsub
+ endcatch
+ Wait 500
+ printlog " Paste 'Text' in all available clipboard formats "
+ Kontext "InhaltEinfuegen"
+ if InhaltEinfuegen.Exists then
+ printlog " Write Clipboard format under pasted content "
+ Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"text")
+ printlog " Save document as ..\user\work\html_to_writer_text.odt"
+ Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\html_to_writer_text.odt", "writer8")
+ Wait 500
+ printlog " Close saved document "
+ Call hCloseDocument
+ wait 500
+ printlog " Reopen saved document "
+ if hFileOpen (gOfficepath + "user\work\html_to_writer_text.odt",true) = false then
+ Kontext "Active"
+ if Active.Exists then
+ try
+ Active.Yes
+ catch
+ Warnlog "Unable to remove checkbox: " + Active.Gettext
+ Active.ok
+ endcatch
+ end if
+ end if
+ Wait 500
+ printlog " Close saved document "
+ Call hCloseDocument
+ else
+ Warnlog "Dialog 'Paste Special' is not up!"
+ Call hCloseDocument
+ goto endsub
+ end if
+ printlog " Close saved document "
+ Do Until GetDocumentCount = 0
+ Call hCloseDocument
+ Loop
+endcase
+
+' ----------------------------------------------------------------------------------------------
+
+testcase HTMLToWRITERField
+ gApplication = "HTML"
+ printlog " Open File '..\\writer\\optional\\input\\clipboard\\html.html' "
+ printlog " Jump to beginning of document "
+ printlog " Select paragraph with 'Date Field' "
+ printlog " Copy selected text "
+ Call hFileOpen (gtesttoolpath & "writer\optional\input\clipboard\html.html")
+ Call sMakeReadOnlyDocumentEditable
+ if GetDocumentCount() = 2 then
+ Warnlog "#i104365#read only document remains opened"
+ endif
+ printlog " Jump to beginning of document "
+ Call wTypeKeys "<Mod1 Home>"
+ Call wTypeKeys "<Down>",2
+ Call wTypeKeys "<Home><Shift End>"
+ EditCopy
+
+ gApplication = "WRITER"
+ printlog " Open new document "
+ Call hNewDocument
+ printlog " Edit / Paste Special "
+ Sleep 2
+ try
+ EditPasteSpecialWriter
+ catch
+ Warnlog "Unable to execute 'Edit / Paste Special'! Test failed!"
+ Call hCloseDocument
+ Call hCloseDocument
+ goto endsub
+ endcatch
+ Wait 500
+ printlog " Paste 'Field' in all available clipboard formats "
+ Kontext "InhaltEinfuegen"
+ if InhaltEinfuegen.Exists then
+ Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"field")
+ printlog " Write Clipboard format under pasted content "
+ Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\html_to_writer_field.odt", "writer8")
+ printlog " Save document as ..\user\work\html_to_writer_field.odt"
+ Wait 500
+ printlog " Close saved document "
+ Call hCloseDocument
+ wait 500
+ printlog " Reopen saved document "
+ if hFileOpen (gOfficepath + "user\work\html_to_writer_field.odt",true) = false then
+ Kontext "Active"
+ if Active.Exists then
+ try
+ Active.Yes
+ catch
+ Warnlog "Unable to remove checkbox: " + Active.Gettext
+ Active.ok
+ endcatch
+ end if
+ end if
+ Wait 500
+ printlog " Close saved document "
+ Call hCloseDocument
+ else
+ Warnlog "Dialog 'Paste Special' is not up!"
+ Call hCloseDocument
+ goto endsub
+ end if
+ printlog " Close saved document "
+ Do Until GetDocumentCount = 0
+ Call hCloseDocument
+ Loop
+endcase
+
+' ----------------------------------------------------------------------------------------------
+
+testcase HTMLToWRITERTable
+ gApplication = "HTML"
+ printlog " Open File '..\\writer\\optional\\input\\clipboard\\html.html' "
+ printlog " Jump to beginning of document "
+ printlog " Select 'Table' "
+ printlog " Copy selected table "
+ Call hFileOpen (gtesttoolpath & "writer\optional\input\clipboard\html.html",false)
+ Call sMakeReadOnlyDocumentEditable
+ if GetDocumentCount() = 2 then
+ Warnlog "#i104365#read only document remains opened"
+ endif
+ printlog " Jump to beginning of document "
+ Call wTypeKeys "<Mod1 Home>"
+ Call wTypeKeys "<Down>",5
+ Call wTypeKeys "<Mod1 A>",2
+ EditCopy
+
+ gApplication = "WRITER"
+ printlog " Open new document "
+ Call hNewDocument
+ printlog " Edit / Paste Special "
+ Sleep 2
+ try
+ EditPasteSpecialWriter
+ catch
+ Warnlog "Unable to execute 'Edit / Paste Special'! Test failed!"
+ Call hCloseDocument
+ Call hCloseDocument
+ goto endsub
+ endcatch
+ Wait 500
+ printlog " Paste 'Table' in all available clipboard formats "
+ Kontext "InhaltEinfuegen"
+ if InhaltEinfuegen.Exists then
+ Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"table")
+ printlog " Write Clipboard format under pasted content "
+ Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\html_to_writer_table.odt", "writer8")
+ printlog " Save document as ..\user\work\html_to_writer_table.odt"
+ Wait 500
+ Call hCloseDocument
+ printlog " Close saved document "
+ wait 500
+ if hFileOpen (gOfficepath + "user\work\html_to_writer_table.odt",true) = false then
+ Kontext "Active"
+ if Active.Exists then
+ try
+ Active.Yes
+ catch
+ Warnlog "Unable to remove checkbox: " + Active.Gettext
+ Active.ok
+ endcatch
+ end if
+ end if
+ printlog " Reopen saved document "
+ Wait 500
+ printlog " Close saved document "
+ Call hCloseDocument
+ else
+ Warnlog "Dialog 'Paste Special' is not up!"
+ Call hCloseDocument
+ goto endsub
+ end if
+ printlog " Close saved document "
+ Do Until GetDocumentCount = 0
+ Call hCloseDocument
+ Loop
+endcase
+
+' ----------------------------------------------------------------------------------------------
+
+testcase HTMLToWRITERGraphicLinked
+ gApplication = "HTML"
+ printlog " Open File '..\\writer\\optional\\input\\clipboard\\html.html' "
+ printlog " Jump to beginning of document "
+ printlog " Select 'Linked Graphic' "
+ printlog " Copy selected Linked Graphic "
+ Call hFileOpen (gtesttoolpath & "writer\optional\input\clipboard\html.html",false)
+ Call sMakeReadOnlyDocumentEditable
+ if GetDocumentCount() = 2 then
+ Warnlog "#i104365#read only document remains opened"
+ endif
+ printlog " Jump to beginning of document "
+ Call wTypeKeys "<Mod1 Home>"
+ Call wTypeKeys ( "<Shift F4>" )
+ EditCopy
+
+ gApplication = "WRITER"
+ printlog " Open new document "
+ Call hNewDocument
+ printlog " Edit / Paste Special "
+ Sleep 2
+ try
+ EditPasteSpecialWriter
+ catch
+ Warnlog "Unable to execute 'Edit / Paste Special'! Test failed!"
+ Call hCloseDocument
+ Call hCloseDocument
+ goto endsub
+ endcatch
+ Wait 500
+ printlog " Paste 'Linked Graphic' in all available clipboard formats "
+ Kontext "InhaltEinfuegen"
+ if InhaltEinfuegen.Exists then
+ Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"graphicL")
+ printlog " Write Clipboard format under pasted content "
+ Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\html_to_writer_graphic1.odt", "writer8")
+ printlog " Save document as ..\user\work\html_to_writer_graphic1.odt"
+ Wait 500
+ Call hCloseDocument
+ printlog " Close saved document "
+ wait 500
+ Call hFileOpen (gOfficepath + "user\work\html_to_writer_graphic1.odt",false)
+ printlog " Reopen saved document "
+ Wait 500
+ printlog " Close saved document "
+ Call hCloseDocument
+ else
+ Warnlog "Dialog 'Paste Special' is not up!"
+ Call hCloseDocument
+ goto endsub
+ end if
+ printlog " Close saved document "
+ Do Until GetDocumentCount = 0
+ Call hCloseDocument
+ Loop
+endcase
+
+' ----------------------------------------------------------------------------------------------
+
+testcase HTMLToWRITERControl
+ gApplication = "HTML"
+ printlog " Open File '..\\writer\\optional\\input\\clipboard\\html.html' "
+ printlog " Jump to beginning of document "
+ printlog " Select 'Control' "
+ printlog " Copy selected Control "
+ Call hFileOpen (gtesttoolpath & "writer\optional\input\clipboard\html.html",false)
+ Call sMakeReadOnlyDocumentEditable
+ if GetDocumentCount() = 2 then
+ Warnlog "#i104365#read only document remains opened"
+ endif
+ printlog " Jump to beginning of document "
+ Call wTypeKeys "<Mod1 Home>"
+ Call wTypeKeys ( "<Shift F4>" )
+ Call wTypeKeys "<Tab>"
+ EditCopy
+
+ gApplication = "WRITER"
+ printlog " Open new document "
+ Call hNewDocument
+ printlog " Edit / Paste Special "
+ Sleep 2
+ try
+ EditPasteSpecialWriter
+ catch
+ Warnlog "Unable to execute 'Edit / Paste Special'! Test failed!"
+ Call hCloseDocument
+ Call hCloseDocument
+ goto endsub
+ endcatch
+ Wait 500
+ printlog " Paste 'Control' in all available clipboard formats "
+ Kontext "InhaltEinfuegen"
+ if InhaltEinfuegen.Exists then
+ Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"control")
+ printlog " Write Clipboard format under pasted content "
+ Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\html_to_writer_control.odt", "writer8")
+ printlog " Save document as ..\user\work\html_to_writer_control.odt"
+ Wait 500
+ Call hCloseDocument
+ printlog " Close saved document "
+ wait 500
+ Call hFileOpen (gOfficepath + "user\work\html_to_writer_control.odt",false)
+ printlog " Reopen saved document "
+ Wait 500
+ printlog " Close saved document "
+ Call hCloseDocument
+ else
+ Warnlog "Dialog 'Paste Special' is not up!"
+ Call hCloseDocument
+ goto endsub
+ end if
+ printlog " Close saved document "
+ Do Until GetDocumentCount = 0
+ Call hCloseDocument
+ Loop
+endcase
+
+' ----------------------------------------------------------------------------------------------
+
+testcase HTMLToWRITERFloatingFrame
+ gApplication = "HTML"
+ printlog " Open File '..\\writer\\optional\\input\\clipboard\\html.html' "
+ printlog " Jump to beginning of document "
+ printlog " Select 'Floating Frame' "
+ printlog " Copy selected Floating Frame "
+ Call hFileOpen (gtesttoolpath & "writer\optional\input\clipboard\html.html",false)
+ Call sMakeReadOnlyDocumentEditable
+ if GetDocumentCount() = 2 then
+ Warnlog "#i104365#read only document remains opened"
+ endif
+ printlog " Jump to beginning of document "
+ Call wTypeKeys "<Mod1 Home>"
+ Call wTypeKeys ( "<Shift F4>" )
+ Call wTypeKeys "<Tab>",2
+ try
+ EditCopy
+ catch
+ Warnlog "Edit / Copy is disabled ! Maybe object not selected !"
+ Call hCloseDocument
+ goto endsub
+ endcatch
+
+ gApplication = "WRITER"
+ printlog " Open new document "
+ Call hNewDocument
+ printlog " Edit / Paste Special "
+ Sleep 2
+ try
+ EditPasteSpecialWriter
+ catch
+ Warnlog "Unable to execute 'Edit / Paste Special'! Test failed!"
+ Call hCloseDocument
+ Call hCloseDocument
+ goto endsub
+ endcatch
+ Wait 500
+ printlog " Paste 'Floating Frame' in all available clipboard formats "
+ Kontext "InhaltEinfuegen"
+ if InhaltEinfuegen.Exists then
+ Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"control")
+ printlog " Write Clipboard format under pasted content "
+ Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\html_to_writer_float.odt", "writer8")
+ printlog " Save document as ..\user\work\html_to_writer_float.odt"
+ Wait 500
+ Call hCloseDocument
+ printlog " Close saved document "
+ wait 500
+ Call hFileOpen (gOfficepath + "user\work\html_to_writer_float.odt",false)
+ printlog " Reopen saved document "
+ Wait 500
+ Call hCloseDocument
+ printlog " Close saved document "
+ else
+ Warnlog "Dialog 'Paste Special' is not up!"
+ Call hCloseDocument
+ goto endsub
+ end if
+ printlog " Close saved document "
+ Do Until GetDocumentCount = 0
+ Call hCloseDocument
+ Loop
+endcase
diff --git a/testautomation/writer/optional/includes/clipboard/w_217_.inc b/testautomation/writer/optional/includes/clipboard/w_217_.inc
new file mode 100644
index 000000000000..0e9bc109e6e6
--- /dev/null
+++ b/testautomation/writer/optional/includes/clipboard/w_217_.inc
@@ -0,0 +1,393 @@
+'**************************************************************************
+' 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 : helge.delfs@sun.com
+'*
+'* short description : CROSS-APPLICATIONS CLIPBOARD TEST (Writer)
+'*
+'\***********************************************************************
+
+sub w_217_
+
+ Call HTMLToCALCText
+ Call HTMLToCALCField
+ Call HTMLToCALCTable
+ Call HTMLToCALCGraphicLinked
+ Call HTMLToCALCControl
+ Call HTMLToCALCFloatingFrame
+
+end sub
+
+' ---------------------------------------------------------------------------------
+
+testcase HTMLToCALCText
+ gApplication = "HTML"
+ printlog " Open File '..\\writer\\optional\\input\\clipboard\\html.html' "
+ printlog " Jump to beginning of document "
+ printlog " Select first paragraph "
+ printlog " Copy selected text "
+ Call hFileOpen (gtesttoolpath & "writer\optional\input\clipboard\html.html",false)
+ Call sMakeReadOnlyDocumentEditable
+ printlog " Jump to beginning of document "
+ Call wTypeKeys "<Mod1 Home>"
+ Call wTypeKeys "<Shift Down><Shift End>"
+ EditCopy
+
+ gApplication = "CALC"
+ printlog " Open new document "
+ Call hNewDocument
+ printlog " Edit / Paste Special "
+ Sleep 2
+ try
+ EditPasteSpecialCalc
+ catch
+ Warnlog "Unable to execute 'Edit / Paste Special'! Test failed!"
+ Call hCloseDocument
+ Call hCloseDocument
+ goto endsub
+ endcatch
+ Wait 500
+ printlog " Paste 'Text' in all available clipboard formats "
+ Kontext "InhaltEinfuegen"
+ if InhaltEinfuegen.Exists then
+ printlog " Write Clipboard format under pasted content "
+ Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"text")
+ printlog " Save document as ..\user\work\html_to_calc_text.ods"
+ Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\html_to_calc_text.ods", "calc8")
+ Wait 500
+ printlog " Close saved document "
+ Call hCloseDocument
+ wait 500
+ printlog " Reopen saved document "
+ if hFileOpen (gOfficepath + "user\work\html_to_calc_text.ods",true) = false then
+ Kontext "Active"
+ if Active.Exists then
+ try
+ Active.Yes
+ catch
+ Warnlog "Unable to remove checkbox: " + Active.Gettext
+ Active.ok
+ endcatch
+ end if
+ end if
+ Wait 500
+ printlog " Close saved document "
+ Call hCloseDocument
+ else
+ Warnlog "Dialog 'Paste Special' is not up!"
+ Call hCloseDocument
+ goto endsub
+ end if
+ printlog " Close active document "
+ Do Until GetDocumentCount = 0
+ Call hCloseDocument
+ Loop
+endcase
+
+' ----------------------------------------------------------------------------------------------
+
+testcase HTMLToCALCField
+ gApplication = "HTML"
+ printlog " Open File '..\\writer\\optional\\input\\clipboard\\html.html' "
+ printlog " Jump to beginning of document "
+ printlog " Select paragraph with 'Date Field' "
+ printlog " Copy selected text "
+ Call hFileOpen (gtesttoolpath & "writer\optional\input\clipboard\html.html",false)
+ Call sMakeReadOnlyDocumentEditable
+ printlog " Jump to beginning of document "
+ Call wTypeKeys "<Mod1 Home>"
+ Call wTypeKeys "<Down>",2
+ Call wTypeKeys "<Home><Shift End>"
+ EditCopy
+
+ gApplication = "CALC"
+ printlog " Open new document "
+ Call hNewDocument
+ printlog " Edit / Paste Special "
+ Sleep 2
+ try
+ EditPasteSpecialCalc
+ catch
+ Warnlog "Unable to execute 'Edit / Paste Special'! Test failed!"
+ Call hCloseDocument
+ Call hCloseDocument
+ goto endsub
+ endcatch
+ Wait 500
+ printlog " Paste 'Field' in all available clipboard formats "
+ Kontext "InhaltEinfuegen"
+ if InhaltEinfuegen.Exists then
+ printlog " Write Clipboard format under pasted content "
+ Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"field")
+ printlog " Save document as ..\user\work\html_to_calc_field.ods"
+ Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\html_to_calc_field.ods", "calc8")
+ Wait 500
+ printlog " Close saved document "
+ Call hCloseDocument
+ wait 500
+ printlog " Reopen saved document "
+ Call hFileOpen (gOfficepath + "user\work\html_to_calc_field.ods",true)
+ Wait 500
+ printlog " Close saved document "
+ Call hCloseDocument
+ else
+ Warnlog "Dialog 'Paste Special' is not up!"
+ Call hCloseDocument
+ goto endsub
+ end if
+ printlog " Close active document "
+ Do Until GetDocumentCount = 0
+ Call hCloseDocument
+ Loop
+endcase
+
+' ----------------------------------------------------------------------------------------------
+
+testcase HTMLToCALCTable
+ gApplication = "HTML"
+ printlog " Open File '..\\writer\\optional\\input\\clipboard\\html.html' "
+ printlog " Jump to beginning of document "
+ printlog " Select 'Table' "
+ printlog " Copy selected table "
+ Call hFileOpen (gtesttoolpath & "writer\optional\input\clipboard\html.html",false)
+ Call sMakeReadOnlyDocumentEditable
+ printlog " Jump to beginning of document "
+ Call wTypeKeys "<Mod1 Home>"
+ Call wTypeKeys "<Down>",5
+ Call wTypeKeys "<Mod1 A>",2
+ sleep (1)
+ EditCopy
+
+ gApplication = "CALC"
+ printlog " Open new document "
+ Call hNewDocument
+ printlog " Edit / Paste Special "
+ Sleep 2
+ try
+ EditPasteSpecialCalc
+ catch
+ Warnlog "Unable to execute 'Edit / Paste Special'! Test failed!"
+ Call hCloseDocument
+ Call hCloseDocument
+ goto endsub
+ endcatch
+ printlog " Paste 'Table' in all available clipboard formats "
+ Kontext "InhaltEinfuegen"
+ if InhaltEinfuegen.Exists(2) then
+ Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"table")
+ printlog " Write Clipboard format under pasted content "
+ Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\html_to_calc_table.ods", "calc8")
+ printlog " Save document as ..\user\work\html_to_calc_table.ods"
+ Call hCloseDocument
+ printlog " Close saved document "
+ Call hFileOpen (gOfficepath + "user\work\html_to_calc_table.ods",true)
+ printlog " Reopen saved document "
+ Call hCloseDocument
+ printlog " Close saved document "
+ else
+ Warnlog "Dialog 'Paste Special' is not up!"
+ Call hCloseDocument
+ goto endsub
+ end if
+ printlog " Close active document "
+ Do Until GetDocumentCount = 0
+ Call hCloseDocument
+ Loop
+endcase
+
+' ----------------------------------------------------------------------------------------------
+
+testcase HTMLToCALCGraphicLinked
+ gApplication = "HTML"
+ printlog " Open File '..\\writer\\optional\\input\\clipboard\\html.html' "
+ printlog " Jump to beginning of document "
+ printlog " Select 'Linked Graphic' "
+ printlog " Copy selected Linked Graphic "
+ Call hFileOpen (gtesttoolpath & "writer\optional\input\clipboard\html.html",false)
+ Call sMakeReadOnlyDocumentEditable
+ printlog " Jump to beginning of document "
+ Call wTypeKeys "<Mod1 Home>"
+ Call wTypeKeys ( "<Shift F4>" )
+ EditCopy
+ EditCopy
+
+ gApplication = "CALC"
+ printlog " Open new document "
+ Call hNewDocument
+ printlog " Edit / Paste Special "
+ Sleep 2
+ try
+ EditPasteSpecialCalc
+ catch
+ warnlog "Unable to execute 'Edit / Paste Special'! Test failed! Manually not reproducable"
+ Call hCloseDocument
+ Call hCloseDocument
+ goto endsub
+ endcatch
+ Wait 500
+ printlog " Paste 'Linked Graphic' in all available clipboard formats "
+ Kontext "InhaltEinfuegen"
+ if InhaltEinfuegen.Exists then
+ printlog " Write Clipboard format under pasted content "
+ Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"graphicL")
+ printlog " Save document as ..\user\work\html_to_calc_graphic1.ods"
+ Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\html_to_calc_graphic1.ods", "calc8")
+ Wait 500
+ printlog " Close saved document "
+ Call hCloseDocument
+ wait 500
+ printlog " Reopen saved document "
+ Call hFileOpen (gOfficepath + "user\work\html_to_calc_graphic1.ods",false)
+ Wait 500
+ printlog " Close saved document "
+ Call hCloseDocument
+ else
+ Warnlog "Dialog 'Paste Special' is not up!"
+ Call hCloseDocument
+ goto endsub
+ end if
+ printlog " Close active document "
+ Do Until GetDocumentCount = 0
+ Call hCloseDocument
+ Loop
+endcase
+
+' ----------------------------------------------------------------------------------------------
+
+testcase HTMLToCALCControl
+ gApplication = "HTML"
+ printlog " Open File '..\\writer\\optional\\input\\clipboard\\html.html' "
+ printlog " Jump to beginning of document "
+ printlog " Select 'Control' "
+ printlog " Copy selected Control "
+ Call hFileOpen (gtesttoolpath & "writer\optional\input\clipboard\html.html",false)
+ Call sMakeReadOnlyDocumentEditable
+ printlog " Jump to beginning of document "
+ Call wTypeKeys "<Mod1 Home>"
+ Call wTypeKeys ( "<Shift F4>" )
+ Call wTypeKeys "<Tab>"
+ EditCopy
+
+ gApplication = "CALC"
+ printlog " Open new document "
+ Call hNewDocument
+ printlog " Edit / Paste Special "
+ Sleep 2
+ try
+ EditPasteSpecialCalc
+ catch
+ Warnlog "Unable to execute 'Edit / Paste Special'! Test failed!"
+ Call hCloseDocument
+ Call hCloseDocument
+ goto endsub
+ endcatch
+ Wait 500
+ printlog " Paste 'Control' in all available clipboard formats "
+ Kontext "InhaltEinfuegen"
+ if InhaltEinfuegen.Exists then
+ printlog " Write Clipboard format under pasted content "
+ Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"control")
+ printlog " Save document as ..\user\work\html_to_calc_control.sxc"
+ Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\html_to_calc_control.ods", "calc8")
+ Wait 500
+ printlog " Close saved document "
+ Call hCloseDocument
+ wait 500
+ printlog " Reopen saved document "
+ Call hFileOpen (gOfficepath + "user\work\html_to_calc_control.ods",false)
+ Wait 500
+ printlog " Close saved document "
+ Call hCloseDocument
+ else
+ Warnlog "Dialog 'Paste Special' is not up!"
+ Call hCloseDocument
+ goto endsub
+ end if
+ printlog " Close active document "
+ Do Until GetDocumentCount = 0
+ Call hCloseDocument
+ Loop
+endcase
+
+' ----------------------------------------------------------------------------------------------
+
+testcase HTMLToCALCFloatingFrame
+ gApplication = "HTML"
+ printlog " Open File '..\\writer\\optional\\input\\clipboard\\html.html' "
+ printlog " Jump to beginning of document "
+ printlog " Select 'Floating Frame' "
+ printlog " Copy selected Floating Frame "
+ Call hFileOpen (gtesttoolpath & "writer\optional\input\clipboard\html.html",false)
+ Call sMakeReadOnlyDocumentEditable
+ printlog " Jump to beginning of document "
+ Call wTypeKeys "<Mod1 Home>"
+ Call wTypeKeys ( "<Shift F4>" )
+ Call wTypeKeys "<Tab>",2
+ wait 500
+ try
+ EditCopy
+ EditCopy
+ catch
+ Warnlog "Edit / Copy is disabled ! Maybe object not selected!"
+ Call hCloseDocument
+ goto endsub
+ endcatch
+ gApplication = "CALC"
+ printlog " Open new document "
+ Call hNewDocument
+ printlog " Edit / Paste Special "
+ Sleep 2
+ try
+ EditPasteSpecialCalc
+ catch
+ Warnlog "Unable to execute 'Edit / Paste Special'! Test failed!"
+ Call hCloseDocument
+ Call hCloseDocument
+ goto endsub
+ endcatch
+ printlog " Paste 'Floating Frame' in all available clipboard formats "
+ Kontext "InhaltEinfuegen"
+ if InhaltEinfuegen.Exists(3) then
+ printlog " Write Clipboard format under pasted content "
+ Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"control")
+ printlog " Save document as ..\user\work\html_to_calc_float.ods"
+ Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\html_to_calc_float.ods", "calc8")
+ printlog " Close saved document "
+ Call hCloseDocument
+ printlog " Reopen saved document "
+ Call hFileOpen (gOfficepath + "user\work\html_to_calc_float.ods",false)
+ printlog " Close saved document "
+ Call hCloseDocument
+ else
+ Warnlog "Dialog 'Paste Special' is not up!"
+ Call hCloseDocument
+ goto endsub
+ end if
+ printlog " Close active document "
+ Do Until GetDocumentCount = 0
+ Call hCloseDocument
+ Loop
+endcase
diff --git a/testautomation/writer/optional/includes/clipboard/w_218_.inc b/testautomation/writer/optional/includes/clipboard/w_218_.inc
new file mode 100644
index 000000000000..fe06d5bf9541
--- /dev/null
+++ b/testautomation/writer/optional/includes/clipboard/w_218_.inc
@@ -0,0 +1,402 @@
+'**************************************************************************
+' 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 : helge.delfs@sun.com
+'*
+'* short description : CROSS-APPLICATIONS CLIPBOARD TEST (Writer)
+'*
+'\***********************************************************************
+
+sub w_218_
+
+ Call HTMLToDRAWText
+ Call HTMLToDRAWField
+ Call HTMLToDRAWTable
+ Call HTMLToDRAWGraphicLinked
+ Call HTMLToDRAWControl
+ Call HTMLToDRAWFloatingFrame
+
+end sub
+
+' ---------------------------------------------------------------------------------
+
+testcase HTMLToDRAWText
+ gApplication = "HTML"
+ printlog " Open File '..\\writer\\optional\\input\\clipboard\\html.html' "
+ printlog " + Jump to beginning of document "
+ printlog " + Select first paragraph "
+ printlog " + Copy selected text "
+ Call hFileOpen (gtesttoolpath & "writer\optional\input\clipboard\html.html")
+ Call sMakeReadOnlyDocumentEditable
+ printlog " Jump to beginning of document "
+ Call wTypeKeys "<Mod1 Home>"
+ Call wTypeKeys "<Shift Down><Shift End>"
+ EditCopy
+
+ gApplication = "DRAW"
+ printlog " + Open new document "
+ Call hNewDocument
+ printlog " + Edit / Paste Special "
+ Sleep 2
+ try
+ EditPasteSpecial
+ catch
+ Warnlog "Unable to execute 'Edit / Paste Special'! Test failed!"
+ Call hCloseDocument
+ Call hCloseDocument
+ goto endsub
+ endcatch
+ Wait 500
+ printlog " Paste 'Text' in all available clipboard formats "
+ Kontext "InhaltEinfuegen"
+ if InhaltEinfuegen.Exists then
+ printlog " + Write Clipboard format under pasted content "
+ Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"text")
+ printlog " + Save document as ..\user\work\html_to_draw_text.odg"
+ Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\html_to_draw_text.odg", "draw8")
+ Wait 500
+ printlog " + Close saved document "
+ Call hCloseDocument
+ wait 500
+ printlog " + Reopen saved document "
+ if hFileOpen (gOfficepath + "user\work\html_to_draw_text.odg",false) = false then
+ Kontext "Active"
+ if Active.Exists then
+ try
+ Active.Yes
+ catch
+ Warnlog "Unable to remove checkbox: " + Active.Gettext
+ Active.ok
+ endcatch
+ end if
+ end if
+ Wait 500
+ printlog " + Close saved document "
+ Call hCloseDocument
+ else
+ Warnlog "Dialog 'Paste Special' is not up!"
+ Call hCloseDocument
+ goto endsub
+ end if
+ printlog " Close active document "
+ Do Until GetDocumentCount = 0
+ Call hCloseDocument
+ Loop
+endcase
+
+' ----------------------------------------------------------------------------------------------
+
+testcase HTMLToDRAWField
+ gApplication = "HTML"
+ printlog " Open File '..\\writer\\optional\\input\\clipboard\\html.html' "
+ printlog " + Jump to beginning of document "
+ printlog " + Select paragraph with 'Date Field' "
+ printlog " + Copy selected text "
+ Call hFileOpen (gtesttoolpath & "writer\optional\input\clipboard\html.html")
+ Call sMakeReadOnlyDocumentEditable
+ printlog " Jump to beginning of document "
+ Call wTypeKeys "<Mod1 Home>"
+ Call wTypeKeys "<Down>",2
+ Call wTypeKeys "<Home><Shift End>"
+ try
+ EditCopy
+ catch
+ Call wTypeKeys "<Down>",1
+ Call wTypeKeys "<Home><Shift End>"
+ EditCopy
+ endcatch
+ gApplication = "DRAW"
+ printlog " + Open new document "
+ Call hNewDocument
+ printlog " + Edit / Paste Special "
+ Sleep 2
+ try
+ EditPasteSpecial
+ catch
+ Warnlog "Unable to execute 'Edit / Paste Special'! Test failed!"
+ Call hCloseDocument
+ Call hCloseDocument
+ goto endsub
+ endcatch
+ Wait 500
+ printlog " Paste 'Field' in all available clipboard formats "
+ Kontext "InhaltEinfuegen"
+ if InhaltEinfuegen.Exists then
+ printlog " + Write Clipboard format under pasted content "
+ Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"field")
+ printlog " + Save document as ..\user\work\html_to_draw_field.odg"
+ Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\html_to_draw_field.odg", "draw8")
+ Wait 500
+ printlog " + Close saved document "
+ Call hCloseDocument
+ sleep (2)
+ printlog " + Reopen saved document "
+ Call hFileOpen (gOfficepath + "user\work\html_to_draw_field.odg",false)
+ Wait 500
+ printlog " + Close saved document "
+ Call hCloseDocument
+ else
+ Warnlog "Dialog 'Paste Special' is not up!"
+ Call hCloseDocument
+ goto endsub
+ end if
+ printlog " Close active document "
+ Do Until GetDocumentCount = 0
+ Call hCloseDocument
+ Loop
+endcase
+
+' ----------------------------------------------------------------------------------------------
+
+testcase HTMLToDRAWTable
+ gApplication = "HTML"
+ printlog " Open File '..\\writer\\optional\\input\\clipboard\\html.html' "
+ printlog " + Jump to beginning of document "
+ printlog " + Select 'Table' "
+ printlog " + Copy selected table "
+ Call hFileOpen (gtesttoolpath & "writer\optional\input\clipboard\html.html")
+ Call sMakeReadOnlyDocumentEditable
+ printlog " Jump to beginning of document "
+ Call wTypeKeys "<Mod1 Home>"
+ Call wTypeKeys "<Down>",5
+ Call wTypeKeys "<Mod1 A>",2
+ EditCopy
+
+ gApplication = "DRAW"
+ printlog " + Open new document "
+ Call hNewDocument
+ printlog " + Edit / Paste Special "
+ Sleep 2
+ try
+ EditPasteSpecial
+ catch
+ Warnlog "Unable to execute 'Edit / Paste Special'! Test failed!"
+ Call hCloseDocument
+ Call hCloseDocument
+ goto endsub
+ endcatch
+ Wait 500
+ printlog " Paste 'Table' in all available clipboard formats "
+ Kontext "InhaltEinfuegen"
+ if InhaltEinfuegen.Exists then
+ printlog " + Write Clipboard format under pasted content "
+ Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"table")
+ printlog " + Save document as ..\user\work\html_to_draw_table.odg"
+ Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\html_to_draw_table.odg", "draw8")
+ Wait 500
+ printlog " + Close saved document "
+ Call hCloseDocument
+ wait 500
+ printlog " + Reopen saved document "
+ Call hFileOpen (gOfficepath + "user\work\html_to_draw_table.odg",false)
+ Wait 500
+ printlog " + Close saved document "
+ Call hCloseDocument
+ else
+ Warnlog "Dialog 'Paste Special' is not up!"
+ Call hCloseDocument
+ goto endsub
+ end if
+ printlog " Close active document "
+ Do Until GetDocumentCount = 0
+ Call hCloseDocument
+ Loop
+endcase
+
+' ----------------------------------------------------------------------------------------------
+
+testcase HTMLToDRAWGraphicLinked
+ gApplication = "HTML"
+ printlog " Open File '..\\writer\\optional\\input\\clipboard\\html.html' "
+ printlog " + Jump to beginning of document "
+ printlog " + Select 'Linked Graphic' "
+ printlog " + Copy selected Linked Graphic "
+ Call hFileOpen (gtesttoolpath & "writer\optional\input\clipboard\html.html")
+ Call sMakeReadOnlyDocumentEditable
+ printlog " Jump to beginning of document "
+ Call wTypeKeys "<Mod1 Home>"
+ Call wTypeKeys ( "<Shift F4>" )
+ EditCopy
+
+ gApplication = "DRAW"
+ printlog " + Open new document "
+ Call hNewDocument
+ printlog " + Edit / Paste Special "
+ Sleep 2
+ try
+ EditPasteSpecial
+ catch
+ Warnlog "Unable to execute 'Edit / Paste Special'! Test failed!"
+ Call hCloseDocument
+ Call hCloseDocument
+ goto endsub
+ endcatch
+ Wait 500
+ printlog " Paste 'Linked Graphic' in all available clipboard formats "
+ Kontext "InhaltEinfuegen"
+ if InhaltEinfuegen.Exists then
+ printlog " + Write Clipboard format under pasted content "
+ Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"graphicL")
+ printlog " + Save document as ..\user\work\html_to_draw_graphic1.odg"
+ Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\html_to_draw_graphic1.odg", "draw8")
+ Wait 500
+ printlog " + Close saved document "
+ Call hCloseDocument
+ wait 500
+ printlog " + Reopen saved document "
+ Call hFileOpen (gOfficepath + "user\work\html_to_draw_graphic1.odg",false)
+ Wait 500
+ printlog " + Close saved document "
+ Call hCloseDocument
+ else
+ Warnlog "Dialog 'Paste Special' is not up!"
+ Call hCloseDocument
+ goto endsub
+ end if
+ printlog " Close active document "
+ Do Until GetDocumentCount = 0
+ Call hCloseDocument
+ Loop
+endcase
+
+' ----------------------------------------------------------------------------------------------
+
+testcase HTMLToDRAWControl
+ gApplication = "HTML"
+ printlog " Open File '..\\writer\\optional\\input\\clipboard\\html.html' "
+ printlog " + Jump to beginning of document "
+ printlog " + Select 'Control' "
+ printlog " + Copy selected Control "
+ Call hFileOpen (gtesttoolpath & "writer\optional\input\clipboard\html.html")
+ Call sMakeReadOnlyDocumentEditable
+ printlog " Jump to beginning of document "
+ Call wTypeKeys "<Mod1 Home>"
+ Call wTypeKeys ( "<Shift F4>" )
+ Call wTypeKeys "<Tab>"
+ EditCopy
+
+ gApplication = "DRAW"
+ printlog " + Open new document "
+ Call hNewDocument
+ printlog " + Edit / Paste Special "
+ Sleep 2
+ try
+ EditPasteSpecial
+ catch
+ Warnlog "Unable to execute 'Edit / Paste Special'! Test failed!"
+ Call hCloseDocument
+ Call hCloseDocument
+ goto endsub
+ endcatch
+ Wait 500
+ printlog " Paste 'Control' in all available clipboard formats "
+ Kontext "InhaltEinfuegen"
+ if InhaltEinfuegen.Exists then
+ printlog " + Write Clipboard format under pasted content "
+ Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"control")
+ printlog " + Save document as ..\user\work\html_to_draw_control.odg"
+ Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\html_to_draw_control.odg", "draw8")
+ Wait 500
+ printlog " + Close saved document "
+ Call hCloseDocument
+ wait 500
+ printlog " + Reopen saved document "
+ Call hFileOpen (gOfficepath + "user\work\html_to_draw_control.odg",false)
+ Wait 500
+ printlog " + Close saved document "
+ Call hCloseDocument
+ else
+ Warnlog "Dialog 'Paste Special' is not up!"
+ Call hCloseDocument
+ goto endsub
+ end if
+ printlog " Close active document "
+ Do Until GetDocumentCount = 0
+ Call hCloseDocument
+ Loop
+endcase
+
+' ----------------------------------------------------------------------------------------------
+
+testcase HTMLToDRAWFloatingFrame
+ gApplication = "HTML"
+ printlog " Open File '..\\writer\\optional\\input\\clipboard\\html.html' "
+ printlog " + Jump to beginning of document "
+ printlog " + Select 'Floating Frame' "
+ printlog " + Copy selected Floating Frame "
+ Call hFileOpen (gtesttoolpath & "writer\optional\input\clipboard\html.html")
+ Call sMakeReadOnlyDocumentEditable
+ printlog " Jump to beginning of document "
+ Call wTypeKeys "<Mod1 Home>"
+ Call wTypeKeys ( "<Shift F4>" )
+ Call wTypeKeys "<Tab>",2
+ try
+ EditCopy
+ catch
+ Warnlog "Edit / Copy is disabled ! Maybe object not selected!"
+ Call hCloseDocument
+ goto endsub
+ endcatch
+ gApplication = "DRAW"
+ printlog " + Open new document "
+ Call hNewDocument
+ printlog " + Edit / Paste Special "
+ Sleep 2
+ try
+ EditPasteSpecial
+ catch
+ Warnlog "Unable to execute 'Edit / Paste Special'! Test failed!"
+ Call hCloseDocument
+ Call hCloseDocument
+ goto endsub
+ endcatch
+ Wait 500
+ printlog " Paste 'Floating Frame' in all available clipboard formats "
+ Kontext "InhaltEinfuegen"
+ if InhaltEinfuegen.Exists then
+ printlog " + Write Clipboard format under pasted content "
+ Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"control")
+ printlog " + Save document as ..\user\work\html_to_draw_float.odg"
+ Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\html_to_draw_float.odg", "draw8")
+ Wait 500
+ printlog " + Close saved document "
+ Call hCloseDocument
+ wait 500
+ printlog " + Reopen saved document "
+ Call hFileOpen (gOfficepath + "user\work\html_to_draw_float.odg",false)
+ Wait 500
+ printlog " + Close saved document "
+ Call hCloseDocument
+ else
+ Warnlog "Dialog 'Paste Special' is not up!"
+ Call hCloseDocument
+ goto endsub
+ end if
+ printlog " Close active document "
+ Do Until GetDocumentCount = 0
+ Call hCloseDocument
+ Loop
+endcase
diff --git a/testautomation/writer/optional/includes/clipboard/w_219_.inc b/testautomation/writer/optional/includes/clipboard/w_219_.inc
new file mode 100644
index 000000000000..8e547d4bf448
--- /dev/null
+++ b/testautomation/writer/optional/includes/clipboard/w_219_.inc
@@ -0,0 +1,397 @@
+'**************************************************************************
+' 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 : helge.delfs@sun.com
+'*
+'* short description : CROSS-APPLICATIONS CLIPBOARD TEST (Writer)
+'*
+'\***********************************************************************
+
+sub w_219_
+
+ Call HTMLToIMPRESSText
+ Call HTMLToIMPRESSField
+ Call HTMLToIMPRESSTable
+ Call HTMLToIMPRESSGraphicLinked
+ Call HTMLToIMPRESSControl
+ Call HTMLToIMPRESSFloatingFrame
+
+end sub
+
+' ---------------------------------------------------------------------------------
+
+testcase HTMLToIMPRESSText
+ gApplication = "HTML"
+ printlog " Open File '..\\writer\\optional\\input\\clipboard\\html.html' "
+ printlog " Jump to beginning of document "
+ printlog " Select first paragraph "
+ printlog " Copy selected text "
+ Call hFileOpen (gtesttoolpath & "writer\optional\input\clipboard\html.html")
+ Call sMakeReadOnlyDocumentEditable
+ printlog " Jump to beginning of document "
+ Call wTypeKeys "<Mod1 Home>"
+ Call wTypeKeys "<Shift Down><Shift End>"
+ EditCopy
+
+ gApplication = "IMPRESS"
+ printlog " Open new document "
+ Call hNewDocument
+ printlog " Edit / Paste Special "
+ Sleep 2
+ try
+ EditPasteSpecial
+ catch
+ Warnlog "Unable to execute 'Edit / Paste Special'! Test failed!"
+ Call hCloseDocument
+ Call hCloseDocument
+ goto endsub
+ endcatch
+ Wait 500
+ printlog " Paste 'Text' in all available clipboard formats "
+ Kontext "InhaltEinfuegen"
+ if InhaltEinfuegen.Exists then
+ printlog " Write Clipboard format under pasted content "
+ Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"text")
+ printlog " Save document as ..\user\work\html_to_impress_text.odp"
+ Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\html_to_impress_text.odp", "impress8")
+ Wait 500
+ printlog " Close saved document "
+ Call hCloseDocument
+ wait 500
+ printlog " Reopen saved document "
+ if hFileOpen (gOfficepath + "user\work\html_to_impress_text.odp",false) = false then
+ Kontext "Active"
+ if Active.Exists then
+ try
+ Active.Yes
+ catch
+ Warnlog "Unable to remove checkbox: " + Active.Gettext
+ Active.ok
+ endcatch
+ end if
+ end if
+ Wait 500
+ printlog " Close saved document "
+ Call hCloseDocument
+ else
+ Warnlog "Dialog 'Paste Special' is not up!"
+ Call hCloseDocument
+ goto endsub
+ end if
+ printlog " Close active document "
+ Do Until GetDocumentCount = 0
+ Call hCloseDocument
+ Loop
+endcase
+
+' ----------------------------------------------------------------------------------------------
+
+testcase HTMLToIMPRESSField
+ gApplication = "HTML"
+ printlog " Open File '..\\writer\\optional\\input\\clipboard\\html.html' "
+ printlog " Jump to beginning of document "
+ printlog " Select paragraph with 'Date Field' "
+ printlog " Copy selected text "
+ Call hFileOpen (gtesttoolpath & "writer\optional\input\clipboard\html.html")
+ Call sMakeReadOnlyDocumentEditable
+ printlog " Jump to beginning of document "
+ Call wTypeKeys "<Mod1 Home>"
+ Call wTypeKeys "<Down>",2
+ Call wTypeKeys "<Home><Shift End>"
+ EditCopy
+
+ gApplication = "IMPRESS"
+ printlog " Open new document "
+ Call hNewDocument
+ printlog " Edit / Paste Special "
+ Sleep 2
+ try
+ EditPasteSpecial
+ catch
+ Warnlog "Unable to execute 'Edit / Paste Special'! Test failed!"
+ Call hCloseDocument
+ Call hCloseDocument
+ goto endsub
+ endcatch
+ Wait 500
+ printlog " Paste 'Field' in all available clipboard formats "
+ Kontext "InhaltEinfuegen"
+ if InhaltEinfuegen.Exists then
+ printlog " Write Clipboard format under pasted content "
+ Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"field")
+ printlog " Save document as ..\user\work\html_to_impress_field.odp"
+ Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\html_to_impress_field.odp", "impress8")
+ Wait 500
+ printlog " Close saved document "
+ Call hCloseDocument
+ wait 500
+ printlog " Reopen saved document "
+ Call hFileOpen (gOfficepath + "user\work\html_to_impress_field.odp",false)
+ Wait 500
+ printlog " Close saved document "
+ Call hCloseDocument
+ else
+ Warnlog "Dialog 'Paste Special' is not up!"
+ Call hCloseDocument
+ goto endsub
+ end if
+ printlog " Close active document "
+ Do Until GetDocumentCount = 0
+ Call hCloseDocument
+ Loop
+endcase
+
+' ----------------------------------------------------------------------------------------------
+
+testcase HTMLToIMPRESSTable
+ gApplication = "HTML"
+ printlog " Open File '..\\writer\\optional\\input\\clipboard\\html.html' "
+ printlog " Jump to beginning of document "
+ printlog " Select 'Table' "
+ printlog " Copy selected table "
+ Call hFileOpen (gtesttoolpath & "writer\optional\input\clipboard\html.html")
+ Call sMakeReadOnlyDocumentEditable
+ printlog " Jump to beginning of document "
+ Call wTypeKeys "<Mod1 Home>"
+ Call wTypeKeys "<Down>",5
+ Call wTypeKeys "<Mod1 A>",2
+ EditCopy
+
+ gApplication = "IMPRESS"
+ printlog " Open new document "
+ Call hNewDocument
+ printlog " Edit / Paste Special "
+ Sleep 2
+ try
+ EditPasteSpecial
+ catch
+ Warnlog "Unable to execute 'Edit / Paste Special'! Test failed!"
+ Call hCloseDocument
+ Call hCloseDocument
+ goto endsub
+ endcatch
+ Wait 500
+ printlog " Paste 'Table' in all available clipboard formats "
+ Kontext "InhaltEinfuegen"
+ if InhaltEinfuegen.Exists then
+ printlog " Write Clipboard format under pasted content "
+ Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"table")
+ printlog " Save document as ..\user\work\html_to_impress_table.odp"
+ Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\html_to_impress_table.odp", "impress8")
+ Wait 500
+ printlog " Close saved document "
+ Call hCloseDocument
+ wait 500
+ printlog " Reopen saved document "
+ Call hFileOpen (gOfficepath + "user\work\html_to_impress_table.odp",false)
+ Wait 500
+ printlog " Close saved document "
+ Call hCloseDocument
+ else
+ Warnlog "Dialog 'Paste Special' is not up!"
+ Call hCloseDocument
+ goto endsub
+ end if
+ printlog " Close active document "
+ Do Until GetDocumentCount = 0
+ Call hCloseDocument
+ Loop
+endcase
+
+' ----------------------------------------------------------------------------------------------
+
+testcase HTMLToIMPRESSGraphicLinked
+ gApplication = "HTML"
+ printlog " Open File '..\\writer\\optional\\input\\clipboard\\html.html' "
+ printlog " Jump to beginning of document "
+ printlog " Select 'Linked Graphic' "
+ printlog " Copy selected Linked Graphic "
+ Call hFileOpen (gtesttoolpath & "writer\optional\input\clipboard\html.html")
+ Call sMakeReadOnlyDocumentEditable
+ printlog " Jump to beginning of document "
+ Call wTypeKeys "<Mod1 Home>"
+ Call wTypeKeys ( "<Shift F4>" )
+ EditCopy
+
+ gApplication = "IMPRESS"
+ printlog " Open new document "
+ Call hNewDocument
+ printlog " Edit / Paste Special "
+ Sleep 2
+ try
+ EditPasteSpecial
+ catch
+ Warnlog "Unable to execute 'Edit / Paste Special'! Test failed!"
+ Call hCloseDocument
+ Call hCloseDocument
+ goto endsub
+ endcatch
+ Wait 500
+ printlog " Paste 'Linked Graphic' in all available clipboard formats "
+ Kontext "InhaltEinfuegen"
+ if InhaltEinfuegen.Exists then
+ printlog " Write Clipboard format under pasted content "
+ Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"graphicL")
+ printlog " Save document as ..\user\work\html_to_impress_graphic1.odp"
+ Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\html_to_impress_graphic1.odp", "impress8")
+ Wait 500
+ printlog " Close saved document "
+ Call hCloseDocument
+ wait 500
+ printlog " Reopen saved document "
+ Call hFileOpen (gOfficepath + "user\work\html_to_impress_graphic1.odp",false)
+ Wait 500
+ printlog " Close saved document "
+ Call hCloseDocument
+ else
+ Warnlog "Dialog 'Paste Special' is not up!"
+ Call hCloseDocument
+ goto endsub
+ end if
+ printlog " Close active document "
+ Do Until GetDocumentCount = 0
+ Call hCloseDocument
+ Loop
+endcase
+
+' ----------------------------------------------------------------------------------------------
+
+testcase HTMLToIMPRESSControl
+ gApplication = "HTML"
+ printlog " Open File '..\\writer\\optional\\input\\clipboard\\html.html' "
+ printlog " Jump to beginning of document "
+ printlog " Select 'Control' "
+ printlog " Copy selected Control "
+ Call hFileOpen (gtesttoolpath & "writer\optional\input\clipboard\html.html")
+ Call sMakeReadOnlyDocumentEditable
+ printlog " Jump to beginning of document "
+ Call wTypeKeys "<Mod1 Home>"
+ Call wTypeKeys ( "<Shift F4>" )
+ Call wTypeKeys "<Tab>"
+ EditCopy
+
+ gApplication = "IMPRESS"
+ printlog " Open new document "
+ Call hNewDocument
+ printlog " Edit / Paste Special "
+ Sleep 2
+ try
+ EditPasteSpecial
+ catch
+ Warnlog "Unable to execute 'Edit / Paste Special'! Test failed!"
+ Call hCloseDocument
+ Call hCloseDocument
+ goto endsub
+ endcatch
+ Wait 500
+ printlog " Paste 'Control' in all available clipboard formats "
+ Kontext "InhaltEinfuegen"
+ if InhaltEinfuegen.Exists then
+ printlog " Write Clipboard format under pasted content "
+ Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"control")
+ printlog " Save document as ..\user\work\html_to_impress_control.odp"
+ Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\html_to_impress_control.odp", "impress8")
+ Wait 500
+ printlog " Close saved document "
+ Call hCloseDocument
+ wait 500
+ printlog " Reopen saved document "
+ Call hFileOpen (gOfficepath + "user\work\html_to_impress_control.odp",false)
+ Wait 500
+ printlog " Close saved document "
+ Call hCloseDocument
+ else
+ Warnlog "Dialog 'Paste Special' is not up!"
+ Call hCloseDocument
+ goto endsub
+ end if
+ printlog " Close active document "
+ Do Until GetDocumentCount = 0
+ Call hCloseDocument
+ Loop
+endcase
+
+' ----------------------------------------------------------------------------------------------
+
+testcase HTMLToIMPRESSFloatingFrame
+ gApplication = "HTML"
+ printlog " Open File '..\\writer\\optional\\input\\clipboard\\html.html' "
+ printlog " Jump to beginning of document "
+ printlog " Select 'Floating Frame' "
+ printlog " Copy selected Floating Frame "
+ Call hFileOpen (gtesttoolpath & "writer\optional\input\clipboard\html.html")
+ Call sMakeReadOnlyDocumentEditable
+ printlog " Jump to beginning of document "
+ Call wTypeKeys "<Mod1 Home>"
+ Call wTypeKeys ( "<Shift F4>" )
+ Call wTypeKeys "<Tab>",2
+ try
+ EditCopy
+ catch
+ Warnlog "Edit / Copy is disabled ! Maybe object not selected!"
+ Call hCloseDocument
+ goto endsub
+ endcatch
+ gApplication = "IMPRESS"
+ printlog " Open new document "
+ Call hNewDocument
+ printlog " Edit / Paste Special "
+ Sleep 2
+ try
+ EditPasteSpecial
+ catch
+ Warnlog "Unable to execute 'Edit / Paste Special'! Test failed!"
+ Call hCloseDocument
+ Call hCloseDocument
+ goto endsub
+ endcatch
+ Wait 500
+ printlog " Paste 'Floating Frame' in all available clipboard formats "
+ Kontext "InhaltEinfuegen"
+ if InhaltEinfuegen.Exists then
+ printlog " Write Clipboard format under pasted content "
+ Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"control")
+ printlog " Save document as ..\user\work\html_to_impress_float.odp"
+ Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\html_to_impress_float.odp", "impress8")
+ Wait 500
+ printlog " Close saved document "
+ Call hCloseDocument
+ wait 500
+ printlog " Reopen saved document "
+ Call hFileOpen (gOfficepath + "user\work\html_to_impress_float.odp",false)
+ Wait 500
+ printlog " Close saved document "
+ Call hCloseDocument
+ else
+ Warnlog "Dialog 'Paste Special' is not up!"
+ Call hCloseDocument
+ goto endsub
+ end if
+ printlog " Close active document "
+ Do Until GetDocumentCount = 0
+ Call hCloseDocument
+ Loop
+endcase
diff --git a/testautomation/writer/optional/includes/clipboard/w_220_.inc b/testautomation/writer/optional/includes/clipboard/w_220_.inc
new file mode 100644
index 000000000000..c28b2c541cb8
--- /dev/null
+++ b/testautomation/writer/optional/includes/clipboard/w_220_.inc
@@ -0,0 +1,392 @@
+'**************************************************************************
+' 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 : helge.delfs@sun.com
+'*
+'* short description : CROSS-APPLICATIONS CLIPBOARD TEST (Writer)
+'*
+'\***********************************************************************
+
+sub w_220_
+
+ Call HTMLToHTMLText
+ Call HTMLToHTMLField
+ Call HTMLToHTMLTable
+ Call HTMLToHTMLGraphicLinked
+ Call HTMLToHTMLControl
+ Call HTMLToHTMLFloatingFrame
+
+end sub
+
+' ---------------------------------------------------------------------------------
+
+testcase HTMLToHTMLText
+
+' if lcase(gPlatform) = "x86" and Val(mid$(gMinor, 2, Len(gMinor))) <= 129 then
+' QAErrorlog "#125780#Stacktrace ID: 251397"
+' goto endsub
+' end if
+ gApplication = "HTML"
+ printlog " Open File '..\\writer\\optional\\input\\clipboard\\html.html' "
+ printlog " Jump to beginning of document "
+ printlog " Select first paragraph "
+ printlog " Copy selected text "
+ Call hFileOpen (gtesttoolpath & "writer\optional\input\clipboard\html.html")
+ Call sMakeReadOnlyDocumentEditable
+ printlog " Jump to beginning of document "
+ Call wTypeKeys "<Mod1 Home>"
+ Call wTypeKeys "<Shift Down><Shift End>"
+ EditCopy
+
+ gApplication = "HTML"
+ printlog " Open new document "
+ Call hNewDocument
+ printlog " Edit / Paste Special "
+ Sleep 2
+ try
+ EditPasteSpecialWriter
+ catch
+ Warnlog "Unable to execute 'Edit / Paste Special' ! Test failed!"
+ Call hCloseDocument ' Close Source-File
+ Call hCloseDocument ' Close Target-File
+ goto endsub
+ endcatch
+ Wait 500
+ printlog " Paste 'Text' in all available clipboard formats "
+ Kontext "InhaltEinfuegen"
+ if InhaltEinfuegen.Exists then
+ Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"text")
+ printlog " Write Clipboard format under pasted content "
+ Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\html_to_html_text.html", "HTML")
+ printlog " Save document as ..\user\work\html_to_html_text.html"
+ Wait 500
+ Call hCloseDocument
+ printlog " Close saved document "
+ wait 500
+ Call hFileOpen (gOfficepath + "user\work\html_to_html_text.html",false)
+ printlog " Reopen saved document "
+ Wait 500
+ Call hCloseDocument
+ printlog " Close saved document "
+ else
+ Warnlog "Dialog 'Paste Special' is not up!"
+ Call hCloseDocument
+ goto endsub
+ end if
+ printlog " Close active document "
+ Do Until GetDocumentCount = 0
+ Call hCloseDocument
+ Loop
+endcase
+
+' ----------------------------------------------------------------------------------------------
+
+testcase HTMLToHTMLField
+ gApplication = "HTML"
+ printlog " Open File '..\\writer\\optional\\input\\clipboard\\html.html' "
+ printlog " Jump to beginning of document "
+ printlog " Select paragraph with 'Date Field' "
+ printlog " Copy selected text "
+ Call hFileOpen (gtesttoolpath & "writer\optional\input\clipboard\html.html")
+ Call sMakeReadOnlyDocumentEditable
+ printlog " Jump to beginning of document "
+ Call wTypeKeys "<Mod1 Home>"
+ Call wTypeKeys "<Down>",2
+ Call wTypeKeys "<Home><Shift End>"
+ EditCopy
+
+ gApplication = "HTML"
+ printlog " Open new document "
+ Call hNewDocument
+ printlog " Edit / Paste Special "
+ Sleep 2
+ try
+ EditPasteSpecialWriter
+ catch
+ Warnlog "Unable to execute 'Edit / Paste Special' ! Test failed!"
+ Call hCloseDocument ' Close Source-File
+ Call hCloseDocument ' Close Target-File
+ goto endsub
+ endcatch
+ Wait 500
+ printlog " Paste 'Field' in all available clipboard formats "
+ Kontext "InhaltEinfuegen"
+ if InhaltEinfuegen.Exists then
+ Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"field")
+ printlog " Write Clipboard format under pasted content "
+ Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\html_to_html_field.html", "HTML")
+ printlog " Save document as ..\user\work\html_to_html_field.html"
+ Wait 500
+ Call hCloseDocument
+ printlog " Close saved document "
+ wait 500
+ Call hFileOpen (gOfficepath + "user\work\html_to_html_field.html",false)
+ printlog " Reopen saved document "
+ Wait 500
+ Call hCloseDocument
+ printlog " Close saved document "
+ else
+ Warnlog "Dialog 'Paste Special' is not up!"
+ Call hCloseDocument
+ goto endsub
+ end if
+ printlog " Close active document "
+ Do Until GetDocumentCount = 0
+ Call hCloseDocument
+ Loop
+endcase
+
+' ----------------------------------------------------------------------------------------------
+
+testcase HTMLToHTMLTable
+ gApplication = "HTML"
+ printlog " Open File '..\\writer\\optional\\input\\clipboard\\html.html' "
+ printlog " Jump to beginning of document "
+ printlog " Select 'Table' "
+ printlog " Copy selected table "
+ Call hFileOpen (gtesttoolpath & "writer\optional\input\clipboard\html.html")
+ Call sMakeReadOnlyDocumentEditable
+ printlog " Jump to beginning of document "
+ Call wTypeKeys "<Mod1 Home>"
+ Call wTypeKeys "<Down>",5
+ Call wTypeKeys "<Mod1 A>",2
+ EditCopy
+
+ gApplication = "HTML"
+ printlog " Open new document "
+ Call hNewDocument
+ printlog " Edit / Paste Special "
+ Sleep 2
+ try
+ EditPasteSpecialWriter
+ catch
+ Warnlog "Unable to execute 'Edit / Paste Special' ! Test failed!"
+ Call hCloseDocument ' Close Source-File
+ Call hCloseDocument ' Close Target-File
+ goto endsub
+ endcatch
+ Wait 500
+ printlog " Paste 'Table' in all available clipboard formats "
+ Kontext "InhaltEinfuegen"
+ if InhaltEinfuegen.Exists then
+ Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"table")
+ printlog " Write Clipboard format under pasted content "
+ Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\html_to_html_table.html", "HTML")
+ printlog " Save document as ..\user\work\html_to_html_table.html"
+ Wait 500
+ Call hCloseDocument
+ printlog " Close saved document "
+ wait 500
+ Call hFileOpen (gOfficepath + "user\work\html_to_html_table.html",false)
+ printlog " Reopen saved document "
+ Wait 500
+ Call hCloseDocument
+ printlog " Close saved document "
+ else
+ Warnlog "Dialog 'Paste Special' is not up!"
+ Call hCloseDocument
+ goto endsub
+ end if
+ printlog " Close active document "
+ Do Until GetDocumentCount = 0
+ Call hCloseDocument
+ Loop
+endcase
+
+' ----------------------------------------------------------------------------------------------
+
+testcase HTMLToHTMLGraphicLinked
+ gApplication = "HTML"
+ printlog " Open File '..\\writer\\optional\\input\\clipboard\\html.html' "
+ printlog " Jump to beginning of document "
+ printlog " Select 'Linked Graphic' "
+ printlog " Copy selected Linked Graphic "
+ Call hFileOpen (gtesttoolpath & "writer\optional\input\clipboard\html.html")
+ Call sMakeReadOnlyDocumentEditable
+ printlog " Jump to beginning of document "
+ Call wTypeKeys "<Mod1 Home>"
+ Call wTypeKeys ( "<Shift F4>" )
+ EditCopy
+
+ gApplication = "HTML"
+ printlog " Open new document "
+ Call hNewDocument
+ printlog " Edit / Paste Special "
+ Sleep 2
+ try
+ EditPasteSpecialWriter
+ catch
+ Warnlog "Unable to execute 'Edit / Paste Special' ! Test failed!"
+ Call hCloseDocument ' Close Source-File
+ Call hCloseDocument ' Close Target-File
+ goto endsub
+ endcatch
+ Wait 500
+ printlog " Paste 'Linked Graphic' in all available clipboard formats "
+ Kontext "InhaltEinfuegen"
+ if InhaltEinfuegen.Exists then
+ Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"graphicL")
+ printlog " Write Clipboard format under pasted content "
+ Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\html_to_html_graphic1.html", "HTML")
+ printlog " Save document as ..\user\work\html_to_html_graphic1.html"
+ Wait 500
+ Call hCloseDocument
+ printlog " Close saved document "
+ sleep (2)
+ Call hFileOpen (gOfficepath + "user\work\html_to_html_graphic1.html",false)
+ printlog " Reopen saved document "
+ Wait 500
+ Call hCloseDocument
+ printlog " Close saved document "
+ else
+ Warnlog "Dialog 'Paste Special' is not up!"
+ Call hCloseDocument
+ goto endsub
+ end if
+ printlog " Close active document "
+ Do Until GetDocumentCount = 0
+ Call hCloseDocument
+ Loop
+endcase
+
+' ----------------------------------------------------------------------------------------------
+
+testcase HTMLToHTMLControl
+ gApplication = "HTML"
+ printlog " Open File '..\\writer\\optional\\input\\clipboard\\html.html' "
+ printlog " Jump to beginning of document "
+ printlog " Select 'Control' "
+ printlog " Copy selected Control "
+ Call hFileOpen (gtesttoolpath & "writer\optional\input\clipboard\html.html")
+ Call sMakeReadOnlyDocumentEditable
+ printlog " Jump to beginning of document "
+ Call wTypeKeys "<Mod1 Home>"
+ Call wTypeKeys ( "<Shift F4>" )
+ Call wTypeKeys "<Tab>"
+ EditCopy
+
+ gApplication = "HTML"
+ printlog " Open new document "
+ Call hNewDocument
+ printlog " Edit / Paste Special "
+ Sleep 2
+ try
+ EditPasteSpecialWriter
+ catch
+ Warnlog "Unable to execute 'Edit / Paste Special' ! Test failed!"
+ Call hCloseDocument ' Close Source-File
+ Call hCloseDocument ' Close Target-File
+ goto endsub
+ endcatch
+ Wait 500
+ printlog " Paste 'Control' in all available clipboard formats "
+ Kontext "InhaltEinfuegen"
+ if InhaltEinfuegen.Exists then
+ Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"control")
+ printlog " Write Clipboard format under pasted content "
+ Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\html_to_html_control.html", "HTML")
+ printlog " Save document as ..\user\work\html_to_html_control.html"
+ Wait 500
+ Call hCloseDocument
+ printlog " Close saved document "
+ wait 500
+ Call hFileOpen (gOfficepath + "user\work\html_to_html_control.html",false)
+ printlog " Reopen saved document "
+ Wait 500
+ Call hCloseDocument
+ printlog " Close saved document "
+ else
+ Warnlog "Dialog 'Paste Special' is not up!"
+ Call hCloseDocument
+ goto endsub
+ end if
+ printlog " Close active document "
+ Do Until GetDocumentCount = 0
+ Call hCloseDocument
+ Loop
+endcase
+
+' ----------------------------------------------------------------------------------------------
+
+testcase HTMLToHTMLFloatingFrame
+ gApplication = "HTML"
+ printlog " Open File '..\\writer\\optional\\input\\clipboard\\html.html' "
+ printlog " Jump to beginning of document "
+ printlog " Select 'Floating Frame' "
+ printlog " Copy selected Floating Frame "
+ Call hFileOpen (gtesttoolpath & "writer\optional\input\clipboard\html.html")
+ Call sMakeReadOnlyDocumentEditable
+ printlog " Jump to beginning of document "
+ Call wTypeKeys "<Mod1 Home>"
+ Call wTypeKeys ( "<Shift F4>" )
+ Call wTypeKeys "<Tab>",2
+ try
+ EditCopy
+ catch
+ Warnlog "Edit / Copy is disabled ! Maybe object not selected!"
+ Call hCloseDocument
+ goto endsub
+ endcatch
+ gApplication = "HTML"
+ printlog " Open new document "
+ Call hNewDocument
+ printlog " Edit / Paste Special "
+ Sleep 2
+ try
+ EditPasteSpecialWriter
+ catch
+ Warnlog "Unable to execute 'Edit / Paste Special' ! Test failed!"
+ Call hCloseDocument ' Close Source-File
+ Call hCloseDocument ' Close Target-File
+ goto endsub
+ endcatch
+ Wait 500
+ printlog " Paste 'Floating Frame' in all available clipboard formats "
+ Kontext "InhaltEinfuegen"
+ if InhaltEinfuegen.Exists then
+ Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"control")
+ printlog " Write Clipboard format under pasted content "
+ Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\html_to_html_float.html", "HTML")
+ printlog " Save document as ..\user\work\html_to_html_float.html"
+ Wait 500
+ Call hCloseDocument
+ printlog " Close saved document "
+ wait 500
+ Call hFileOpen (gOfficepath + "user\work\html_to_html_float.html",false)
+ printlog " Reopen saved document "
+ Wait 500
+ Call hCloseDocument
+ printlog " Close saved document "
+ else
+ Warnlog "Dialog 'Paste Special' is not up!"
+ Call hCloseDocument
+ goto endsub
+ end if
+ printlog " Close active document "
+ Do Until GetDocumentCount = 0
+ Call hCloseDocument
+ Loop
+endcase
diff --git a/testautomation/writer/optional/includes/clipboard/w_221_.inc b/testautomation/writer/optional/includes/clipboard/w_221_.inc
new file mode 100644
index 000000000000..b699258c302f
--- /dev/null
+++ b/testautomation/writer/optional/includes/clipboard/w_221_.inc
@@ -0,0 +1,430 @@
+'**************************************************************************
+' 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 : helge.delfs@sun.com
+'*
+'* short description : CROSS-APPLICATIONS CLIPBOARD TEST (Writer)
+'*
+'\***********************************************************************
+
+sub w_221_
+
+ Call DrawToHTMLScrollingText
+ Call DrawToHTMLGroupedObject
+ Call DrawToHTML3D
+ Call DrawToHTMLFontwork
+ Call DrawToHTMLBullets
+ Call DrawToHTMLDimensionLines
+ Call DrawToHTMLConnectors
+
+end sub
+
+
+testcase DrawToHTMLScrollingText
+
+ gApplication = "DRAW"
+ printlog " Open File '..\\writer\\optional\\input\\clipboard\\draw.sxd' "
+ printlog " + Jump to beginning of document "
+ printlog " + Select Scrolling text "
+ printlog " + Copy selected text "
+ Call hFileOpen (gtesttoolpath & "writer\optional\input\clipboard\draw.sxd")
+ Call sMakeReadOnlyDocumentEditable
+ Kontext "DocumentDraw"
+ printlog " Jump to beginning of document "
+ DocumentDraw.TypeKeys "<Tab>"
+ EditCopy
+ gApplication = "HTML"
+ printlog " Open a new writerdocument "
+ Call hNewDocument
+ Sleep 2
+ try
+ EditPasteSpecialWriter
+ catch
+ Warnlog "Unable to execute 'Edit / Paste Special' ! Test failed!"
+ Call hCloseDocument ' Close Source-File
+ Call hCloseDocument ' Close Target-File
+ goto endsub
+ endcatch
+ Wait 500
+ printlog " Paste 'Scrolling Text' in all available clipboard formats "
+ Kontext "InhaltEinfuegen"
+ if InhaltEinfuegen.Exists then
+ Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"DRAW")
+ printlog " + Write Clipboard format under pasted content "
+ Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\draw_to_html_scrolling_text.html", "HTML")
+ printlog " + Save document as ..\user\work\draw_to_html_scrolling_text.html"
+ Wait 500
+ Call hCloseDocument
+ printlog " + Close saved document "
+ wait 500
+ Call hFileOpen (gOfficepath + "user\work\draw_to_html_scrolling_text.html",false)
+ printlog " + Reopen saved document "
+ Wait 500
+ Call hCloseDocument
+ printlog " + Close saved document "
+ else
+ Warnlog "Dialog 'Paste Special' is not up!"
+ Call hCloseDocument
+ goto endsub
+ end if
+ printlog " Close active document "
+ Do Until GetDocumentCount = 0
+ Call hCloseDocument
+ Loop
+endcase
+
+' ---------------------------------------------------------------------------------
+
+testcase DrawToHTMLGroupedObject
+
+ gApplication = "DRAW"
+ printlog " Open File '..\\writer\\optional\\input\\clipboard\\draw.sxd' "
+ printlog " + Jump to beginning of document "
+ printlog " + Select Grouped Object "
+ printlog " + Copy selected Object "
+ Call hFileOpen (gtesttoolpath & "writer\optional\input\clipboard\draw.sxd")
+ Call sMakeReadOnlyDocumentEditable
+ Kontext "DocumentDraw"
+ printlog " Jump to beginning of document "
+ DocumentDraw.TypeKeys "<Tab>",2
+ EditCopy
+ gApplication = "HTML"
+ printlog " Open a new writerdocument "
+ Call hNewDocument
+ Sleep 2
+ try
+ EditPasteSpecialWriter
+ catch
+ Warnlog "Unable to execute 'Edit / Paste Special' ! Test failed!"
+ Call hCloseDocument ' Close Source-File
+ Call hCloseDocument ' Close Target-File
+ goto endsub
+ endcatch
+ Wait 500
+ printlog " Paste 'Text' in all available clipboard formats "
+ Kontext "InhaltEinfuegen"
+ if InhaltEinfuegen.Exists then
+ Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"DRAW")
+ printlog " + Write Clipboard format under pasted content "
+ Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\draw_to_html_grouped_object.html", "HTML")
+ printlog " + Save document as ..\user\work\draw_to_html_grouped_object.html"
+ Wait 500
+ Call hCloseDocument
+ printlog " + Close saved document "
+ wait 500
+ Call hFileOpen (gOfficepath + "user\work\draw_to_html_grouped_object.html",false)
+ printlog " + Reopen saved document "
+ Wait 500
+ Call hCloseDocument
+ printlog " + Close saved document "
+ else
+ Warnlog "Dialog 'Paste Special' is not up!"
+ Call hCloseDocument
+ goto endsub
+ end if
+ printlog " Close active document "
+ Do Until GetDocumentCount = 0
+ Call hCloseDocument
+ Loop
+endcase
+
+' ---------------------------------------------------------------------------------
+
+testcase DrawToHTML3D
+
+ gApplication = "DRAW"
+ printlog " Open File '..\\writer\\optional\\input\\clipboard\\draw.sxd' "
+ printlog " + Jump to beginning of document "
+ printlog " + Select cell <A5:C5> "
+ printlog " + Copy selected text "
+ Call hFileOpen (gtesttoolpath & "writer\optional\input\clipboard\draw.sxd")
+ Call sMakeReadOnlyDocumentEditable
+ Kontext "DocumentDraw"
+ printlog " Jump to beginning of document "
+ DocumentDraw.TypeKeys "<Tab>",3
+ EditCopy
+ gApplication = "HTML"
+ printlog " Open a new writerdocument "
+ Call hNewDocument
+ Sleep 2
+ try
+ EditPasteSpecialWriter
+ catch
+ Warnlog "Unable to execute 'Edit / Paste Special' ! Test failed!"
+ Call hCloseDocument ' Close Source-File
+ Call hCloseDocument ' Close Target-File
+ goto endsub
+ endcatch
+ Wait 500
+ printlog " Paste 'Text' in all available clipboard formats "
+ Kontext "InhaltEinfuegen"
+ if InhaltEinfuegen.Exists then
+ Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"DRAW")
+ printlog " + Write Clipboard format under pasted content "
+ Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\draw_to_html_3d.html", "HTML")
+ printlog " + Save document as ..\user\work\draw_to_html_3d.html"
+ Wait 500
+ Call hCloseDocument
+ printlog " + Close saved document "
+ wait 500
+ Call hFileOpen (gOfficepath + "user\work\draw_to_html_3d.html",false)
+ printlog " + Reopen saved document "
+ Wait 500
+ Call hCloseDocument
+ printlog " + Close saved document "
+ else
+ Warnlog "Dialog 'Paste Special' is not up!"
+ Call hCloseDocument
+ goto endsub
+ end if
+ printlog " Close active document "
+ Do Until GetDocumentCount = 0
+ Call hCloseDocument
+ Loop
+endcase
+
+' ---------------------------------------------------------------------------------
+
+testcase DrawToHTMLFontwork
+
+ gApplication = "DRAW"
+ printlog " Open File '..\\writer\\optional\\input\\clipboard\\draw.sxd' "
+ printlog " + Jump to beginning of document "
+ printlog " + Select Fontwork "
+ printlog " + Copy selected Fontwork "
+ Call hFileOpen (gtesttoolpath & "writer\optional\input\clipboard\draw.sxd")
+ Call sMakeReadOnlyDocumentEditable
+ Kontext "DocumentDraw"
+ printlog " Jump to beginning of document "
+ DocumentDraw.TypeKeys "<Tab>",4
+ EditCopy
+ gApplication = "HTML"
+ printlog " Open a new writerdocument "
+ Call hNewDocument
+ Sleep 2
+ try
+ EditPasteSpecialWriter
+ catch
+ Warnlog "Unable to execute 'Edit / Paste Special' ! Test failed!"
+ Call hCloseDocument ' Close Source-File
+ Call hCloseDocument ' Close Target-File
+ goto endsub
+ endcatch
+ Wait 500
+ printlog " Paste 'Text' in all available clipboard formats "
+ Kontext "InhaltEinfuegen"
+ if InhaltEinfuegen.Exists then
+ Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"DRAW")
+ printlog " + Write Clipboard format under pasted content "
+ Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\draw_to_html_fontwork.html", "HTML")
+ printlog " + Save document as ..\user\work\draw_to_html_fontwork.html"
+ Wait 500
+ Call hCloseDocument
+ printlog " + Close saved document "
+ wait 500
+ Call hFileOpen (gOfficepath + "user\work\draw_to_html_fontwork.html",false)
+ printlog " + Reopen saved document "
+ Wait 500
+ Call hCloseDocument
+ printlog " + Close saved document "
+ else
+ Warnlog "Dialog 'Paste Special' is not up!"
+ Call hCloseDocument
+ goto endsub
+ end if
+ printlog " Close active document "
+ Do Until GetDocumentCount = 0
+ Call hCloseDocument
+ Loop
+endcase
+
+' ---------------------------------------------------------------------------------
+
+testcase DrawToHTMLBullets
+
+ gApplication = "DRAW"
+ printlog " Open File '..\\writer\\optional\\input\\clipboard\\draw.sxd' "
+ printlog " + Jump to beginning of document "
+ printlog " + Select Bullets "
+ printlog " + Copy selected Bullets "
+ Call hFileOpen (gtesttoolpath & "writer\optional\input\clipboard\draw.sxd")
+ Call sMakeReadOnlyDocumentEditable
+ Kontext "DocumentDraw"
+ printlog " Jump to beginning of document "
+ DocumentDraw.TypeKeys "<Tab>",5
+ EditCopy
+ gApplication = "HTML"
+ printlog " Open a new writerdocument "
+ Call hNewDocument
+ Sleep 2
+ try
+ EditPasteSpecialWriter
+ catch
+ Warnlog "Unable to execute 'Edit / Paste Special' ! Test failed!"
+ Call hCloseDocument ' Close Source-File
+ Call hCloseDocument ' Close Target-File
+ goto endsub
+ endcatch
+ Wait 500
+ printlog " Paste 'Text' in all available clipboard formats "
+ Kontext "InhaltEinfuegen"
+ if InhaltEinfuegen.Exists then
+ Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"DRAW")
+ printlog " + Write Clipboard format under pasted content "
+ Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\draw_to_html_bullets.html", "HTML")
+ printlog " + Save document as ..\user\work\draw_to_html_bullets.html"
+ Wait 500
+ Call hCloseDocument
+ printlog " + Close saved document "
+ wait 500
+ Call hFileOpen (gOfficepath + "user\work\draw_to_html_bullets.html",false)
+ printlog " + Reopen saved document "
+ Wait 500
+ Call hCloseDocument
+ printlog " + Close saved document "
+ else
+ Warnlog "Dialog 'Paste Special' is not up!"
+ Call hCloseDocument
+ goto endsub
+ end if
+ printlog " Close active document "
+ Do Until GetDocumentCount = 0
+ Call hCloseDocument
+ Loop
+endcase
+
+' ---------------------------------------------------------------------------------
+
+testcase DrawToHTMLDimensionLines
+
+ gApplication = "DRAW"
+ printlog " Open File '..\\writer\\optional\\input\\clipboard\\draw.sxd' "
+ printlog " + Jump to beginning of document "
+ printlog " + Select Dimension Lines "
+ printlog " + Copy selected Dimension Lines "
+ Call hFileOpen (gtesttoolpath & "writer\optional\input\clipboard\draw.sxd")
+ Call sMakeReadOnlyDocumentEditable
+ Kontext "DocumentDraw"
+ printlog " Jump to beginning of document "
+ DocumentDraw.TypeKeys "<PageDown>"
+ DocumentDraw.TypeKeys "<Tab>"
+ EditCopy
+ gApplication = "HTML"
+ printlog " Open a new writerdocument "
+ Call hNewDocument
+ Sleep 2
+ try
+ EditPasteSpecialWriter
+ catch
+ Warnlog "Unable to execute 'Edit / Paste Special' ! Test failed!"
+ Call hCloseDocument ' Close Source-File
+ Call hCloseDocument ' Close Target-File
+ goto endsub
+ endcatch
+ Wait 500
+ printlog " Paste 'Dimension Lines' in all available clipboard formats "
+ Kontext "InhaltEinfuegen"
+ if InhaltEinfuegen.Exists then
+ Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"DRAW")
+ printlog " + Write Clipboard format under pasted content "
+ Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\draw_to_html_dim_lines.html", "HTML")
+ printlog " + Save document as ..\user\work\draw_to_html_dim_lines.html"
+ Wait 500
+ Call hCloseDocument
+ printlog " + Close saved document "
+ wait 500
+ Call hFileOpen (gOfficepath + "user\work\draw_to_html_dim_lines.html",false)
+ printlog " + Reopen saved document "
+ Wait 500
+ Call hCloseDocument
+ printlog " + Close saved document "
+ else
+ Warnlog "Dialog 'Paste Special' is not up!"
+ Call hCloseDocument
+ goto endsub
+ end if
+ printlog " Close active document "
+ Do Until GetDocumentCount = 0
+ Call hCloseDocument
+ Loop
+endcase
+
+' ---------------------------------------------------------------------------------
+
+testcase DrawToHTMLConnectors
+
+ gApplication = "DRAW"
+ printlog " Open File '..\\writer\\optional\\input\\clipboard\\draw.sxd' "
+ printlog " + Jump to beginning of document "
+ printlog " + Select Connectors "
+ printlog " + Copy selected Connectors "
+ Call hFileOpen (gtesttoolpath & "writer\optional\input\clipboard\draw.sxd")
+ Call sMakeReadOnlyDocumentEditable
+ Kontext "DocumentDraw"
+ printlog " Jump to beginning of document "
+ DocumentDraw.TypeKeys "<PageDown>"
+ DocumentDraw.TypeKeys "<Tab>"
+ EditCopy
+ gApplication = "HTML"
+ printlog " Open a new writerdocument "
+ Call hNewDocument
+ Sleep 2
+ try
+ EditPasteSpecialWriter
+ catch
+ Warnlog "Unable to execute 'Edit / Paste Special' ! Test failed!"
+ Call hCloseDocument ' Close Source-File
+ Call hCloseDocument ' Close Target-File
+ goto endsub
+ endcatch
+ Wait 500
+ printlog " Paste 'Connectors' in all available clipboard formats "
+ Kontext "InhaltEinfuegen"
+ if InhaltEinfuegen.Exists then
+ Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"DRAW")
+ printlog " + Write Clipboard format under pasted content "
+ Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\draw_to_html_connectors.html", "HTML")
+ printlog " + Save document as ..\user\work\draw_to_html_connectors.html"
+ Wait 500
+ Call hCloseDocument
+ printlog " + Close saved document "
+ wait 500
+ Call hFileOpen (gOfficepath + "user\work\draw_to_html_connectors.html",false)
+ printlog " + Reopen saved document "
+ Wait 500
+ Call hCloseDocument
+ printlog " + Close saved document "
+ else
+ Warnlog "Dialog 'Paste Special' is not up!"
+ Call hCloseDocument
+ goto endsub
+ end if
+ printlog " Close active document "
+ Do Until GetDocumentCount = 0
+ Call hCloseDocument
+ Loop
+endcase
+
diff --git a/testautomation/writer/optional/includes/clipboard/w_222_.inc b/testautomation/writer/optional/includes/clipboard/w_222_.inc
new file mode 100644
index 000000000000..7850fe13f7bb
--- /dev/null
+++ b/testautomation/writer/optional/includes/clipboard/w_222_.inc
@@ -0,0 +1,432 @@
+'**************************************************************************
+' 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 : helge.delfs@sun.com
+'*
+'* short description : CROSS-APPLICATIONS CLIPBOARD TEST (Writer)
+'*
+'\***********************************************************************
+
+sub w_222_
+
+ Call DrawToWriterScrollingText
+ Call DrawToWriterGroupedObject
+ Call DrawToWriter3D
+ Call DrawToWriterFontwork
+ Call DrawToWriterBullets
+ Call DrawToWriterDimensionLines
+ Call DrawToWriterConnectors
+
+end sub
+
+'------------------------------------------------------------------------------
+
+testcase DrawToWriterScrollingText
+
+ gApplication = "DRAW"
+ printlog " Open File '..\\writer\\optional\\input\\clipboard\\draw.sxd' "
+ printlog " Jump to beginning of document "
+ printlog " Select Scrolling text "
+ printlog " Copy selected text "
+ Call hFileOpen (gtesttoolpath & "writer\optional\input\clipboard\draw.sxd")
+ Call sMakeReadOnlyDocumentEditable
+ Kontext "DocumentDraw"
+ printlog " Jump to beginning of document "
+ DocumentDraw.TypeKeys "<Tab>"
+ EditCopy
+ gApplication = "WRITER"
+ printlog " Open a new writerdocument "
+ Call hNewDocument
+ Sleep 2
+ try
+ EditPasteSpecialWriter
+ catch
+ Warnlog "Unable to execute 'Edit / Paste Special' ! Test failed!"
+ Call hCloseDocument ' Close Source-File
+ Call hCloseDocument ' Close Target-File
+ goto endsub
+ endcatch
+ Wait 500
+ printlog " Paste 'Scrolling Text' in all available clipboard formats "
+ Kontext "InhaltEinfuegen"
+ if InhaltEinfuegen.Exists then
+ Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"DRAW")
+ printlog " Write Clipboard format under pasted content "
+ Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\draw_to_writer_scrolling_text.odt", "writer8")
+ printlog " Save document as ..\user\work\draw_to_writer_scrolling_text.odt"
+ Wait 500
+ Call hCloseDocument
+ printlog " Close saved document "
+ wait 500
+ Call hFileOpen (gOfficepath + "user\work\draw_to_writer_scrolling_text.odt",false)
+ printlog " Reopen saved document "
+ Wait 500
+ Call hCloseDocument
+ printlog " Close saved document "
+ else
+ Warnlog "Dialog 'Paste Special' is not up!"
+ Call hCloseDocument
+ goto endsub
+ end if
+ printlog " Close active document "
+ Do Until GetDocumentCount = 0
+ Call hCloseDocument
+ Loop
+endcase
+
+' ---------------------------------------------------------------------------------
+
+testcase DrawToWriterGroupedObject
+
+ gApplication = "DRAW"
+ printlog " Open File '..\\writer\\optional\\input\\clipboard\\draw.sxd' "
+ printlog " Jump to beginning of document "
+ printlog " Select Grouped Object "
+ printlog " Copy selected Object "
+ Call hFileOpen (gtesttoolpath & "writer\optional\input\clipboard\draw.sxd")
+ Call sMakeReadOnlyDocumentEditable
+ Kontext "DocumentDraw"
+ printlog " Jump to beginning of document "
+ DocumentDraw.TypeKeys "<Tab>",2
+ EditCopy
+ gApplication = "WRITER"
+ printlog " Open a new writerdocument "
+ Call hNewDocument
+ Sleep 2
+ try
+ EditPasteSpecialWriter
+ catch
+ Warnlog "Unable to execute 'Edit / Paste Special' ! Test failed!"
+ Call hCloseDocument ' Close Source-File
+ Call hCloseDocument ' Close Target-File
+ goto endsub
+ endcatch
+ Wait 500
+ printlog " Paste 'Text' in all available clipboard formats "
+ Kontext "InhaltEinfuegen"
+ if InhaltEinfuegen.Exists then
+ Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"DRAW")
+ printlog " Write Clipboard format under pasted content "
+ Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\draw_to_writer_grouped_object.odt", "writer8")
+ printlog " Save document as ..\user\work\draw_to_writer_grouped_object.odt"
+ Wait 500
+ Call hCloseDocument
+ printlog " Close saved document "
+ wait 500
+ Call hFileOpen (gOfficepath + "user\work\draw_to_writer_grouped_object.odt",false)
+ printlog " Reopen saved document "
+ Wait 500
+ Call hCloseDocument
+ printlog " Close saved document "
+ else
+ Warnlog "Dialog 'Paste Special' is not up!"
+ Call hCloseDocument
+ goto endsub
+ end if
+ printlog " Close active document "
+ Do Until GetDocumentCount = 0
+ Call hCloseDocument
+ Loop
+endcase
+
+' ---------------------------------------------------------------------------------
+
+testcase DrawToWriter3D
+
+ gApplication = "DRAW"
+ printlog " Open File '..\\writer\\optional\\input\\clipboard\\draw.sxd' "
+ printlog " Jump to beginning of document "
+ printlog " Select cell <A5:C5> "
+ printlog " Copy selected text "
+ Call hFileOpen (gtesttoolpath & "writer\optional\input\clipboard\draw.sxd")
+ Call sMakeReadOnlyDocumentEditable
+ Kontext "DocumentDraw"
+ printlog " Jump to beginning of document "
+ DocumentDraw.TypeKeys "<Tab>",3
+ EditCopy
+ gApplication = "WRITER"
+ printlog " Open a new writerdocument "
+ Call hNewDocument
+ Sleep 2
+ try
+ EditPasteSpecialWriter
+ catch
+ Warnlog "Unable to execute 'Edit / Paste Special' ! Test failed!"
+ Call hCloseDocument ' Close Source-File
+ Call hCloseDocument ' Close Target-File
+ goto endsub
+ endcatch
+ Wait 500
+ printlog " Paste 'Text' in all available clipboard formats "
+ Kontext "InhaltEinfuegen"
+ if InhaltEinfuegen.Exists then
+ Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"DRAW")
+ printlog " Write Clipboard format under pasted content "
+ Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\draw_to_writer_3d.odt", "writer8")
+ printlog " Save document as ..\user\work\draw_to_writer_3d.odt"
+ Wait 500
+ Call hCloseDocument
+ printlog " Close saved document "
+ wait 500
+ Call hFileOpen (gOfficepath + "user\work\draw_to_writer_3d.odt",false)
+ printlog " Reopen saved document "
+ Wait 500
+ Call hCloseDocument
+ printlog " Close saved document "
+ else
+ Warnlog "Dialog 'Paste Special' is not up!"
+ Call hCloseDocument
+ goto endsub
+ end if
+ printlog " Close active document "
+ Do Until GetDocumentCount = 0
+ Call hCloseDocument
+ Loop
+endcase
+
+' ---------------------------------------------------------------------------------
+
+testcase DrawToWriterFontwork
+
+ gApplication = "DRAW"
+ printlog " Open File '..\\writer\\optional\\input\\clipboard\\draw.sxd' "
+ printlog " Jump to beginning of document "
+ printlog " Select Fontwork "
+ printlog " Copy selected Fontwork "
+ Call hFileOpen (gtesttoolpath & "writer\optional\input\clipboard\draw.sxd")
+ Call sMakeReadOnlyDocumentEditable
+ Kontext "DocumentDraw"
+ printlog " Jump to beginning of document "
+ DocumentDraw.TypeKeys "<Tab>",4
+ EditCopy
+ gApplication = "WRITER"
+ printlog " Open a new writerdocument "
+ Call hNewDocument
+ Sleep 2
+ try
+ EditPasteSpecialWriter
+ catch
+ Warnlog "Unable to execute 'Edit / Paste Special' ! Test failed!"
+ Call hCloseDocument ' Close Source-File
+ Call hCloseDocument ' Close Target-File
+ goto endsub
+ endcatch
+ Wait 500
+ printlog " Paste 'Text' in all available clipboard formats "
+ Kontext "InhaltEinfuegen"
+ if InhaltEinfuegen.Exists then
+ Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"DRAW")
+ printlog " Write Clipboard format under pasted content "
+ Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\draw_to_writer_fontwork.odt", "writer8")
+ printlog " Save document as ..\user\work\draw_to_writer_fontwork.odt"
+ Wait 500
+ Call hCloseDocument
+ printlog " Close saved document "
+ wait 500
+ Call hFileOpen (gOfficepath + "user\work\draw_to_writer_fontwork.odt",false)
+ printlog " Reopen saved document "
+ Wait 500
+ Call hCloseDocument
+ printlog " Close saved document "
+ else
+ Warnlog "Dialog 'Paste Special' is not up!"
+ Call hCloseDocument
+ goto endsub
+ end if
+ printlog " Close active document "
+ Do Until GetDocumentCount = 0
+ Call hCloseDocument
+ Loop
+endcase
+
+' ---------------------------------------------------------------------------------
+
+testcase DrawToWriterBullets
+
+ gApplication = "DRAW"
+ printlog " Open File '..\\writer\\optional\\input\\clipboard\\draw.sxd' "
+ printlog " Jump to beginning of document "
+ printlog " Select Bullets "
+ printlog " Copy selected Bullets "
+ Call hFileOpen (gtesttoolpath & "writer\optional\input\clipboard\draw.sxd")
+ Call sMakeReadOnlyDocumentEditable
+ Kontext "DocumentDraw"
+ printlog " Jump to beginning of document "
+ DocumentDraw.TypeKeys "<Tab>",5
+ EditCopy
+ gApplication = "WRITER"
+ printlog " Open a new writerdocument "
+ Call hNewDocument
+ Sleep 2
+ try
+ EditPasteSpecialWriter
+ catch
+ Warnlog "Unable to execute 'Edit / Paste Special' ! Test failed!"
+ Call hCloseDocument ' Close Source-File
+ Call hCloseDocument ' Close Target-File
+ goto endsub
+ endcatch
+ Wait 500
+ printlog " Paste 'Text' in all available clipboard formats "
+ Kontext "InhaltEinfuegen"
+ if InhaltEinfuegen.Exists then
+ Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"DRAW")
+ printlog " Write Clipboard format under pasted content "
+ Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\draw_to_writer_bullets.odt", "writer8")
+ printlog " Save document as ..\user\work\draw_to_writer_bullets.odt"
+ Wait 500
+ Call hCloseDocument
+ printlog " Close saved document "
+ wait 500
+ Call hFileOpen (gOfficepath + "user\work\draw_to_writer_bullets.odt",false)
+ printlog " Reopen saved document "
+ Wait 500
+ Call hCloseDocument
+ printlog " Close saved document "
+ else
+ Warnlog "Dialog 'Paste Special' is not up!"
+ Call hCloseDocument
+ goto endsub
+ end if
+ printlog " Close active document "
+ Do Until GetDocumentCount = 0
+ Call hCloseDocument
+ Loop
+endcase
+
+' ---------------------------------------------------------------------------------
+
+testcase DrawToWriterDimensionLines
+
+ gApplication = "DRAW"
+ printlog " Open File '..\\writer\\optional\\input\\clipboard\\draw.sxd' "
+ printlog " Jump to beginning of document "
+ printlog " Select Dimension Lines "
+ printlog " Copy selected Dimension Lines "
+ Call hFileOpen (gtesttoolpath & "writer\optional\input\clipboard\draw.sxd")
+ Call sMakeReadOnlyDocumentEditable
+ Kontext "DocumentDraw"
+ printlog " Jump to beginning of document "
+ DocumentDraw.TypeKeys "<PageDown>"
+ DocumentDraw.TypeKeys "<Tab>"
+ EditCopy
+ gApplication = "WRITER"
+ printlog " Open a new writerdocument "
+ Call hNewDocument
+ Sleep 2
+ try
+ EditPasteSpecialWriter
+ catch
+ Warnlog "Unable to execute 'Edit / Paste Special' ! Test failed!"
+ Call hCloseDocument ' Close Source-File
+ Call hCloseDocument ' Close Target-File
+ goto endsub
+ endcatch
+ Wait 500
+ printlog " Paste 'Dimension Lines' in all available clipboard formats "
+ Kontext "InhaltEinfuegen"
+ if InhaltEinfuegen.Exists then
+ Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"DRAW")
+ printlog " Write Clipboard format under pasted content "
+ Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\draw_to_writer_dim_lines.odt", "writer8")
+ printlog " Save document as ..\user\work\draw_to_writer_dim_lines.odt"
+ Wait 500
+ Call hCloseDocument
+ printlog " Close saved document "
+ wait 500
+ Call hFileOpen (gOfficepath + "user\work\draw_to_writer_dim_lines.odt",false)
+ printlog " Reopen saved document "
+ Wait 500
+ Call hCloseDocument
+ printlog " Close saved document "
+ else
+ Warnlog "Dialog 'Paste Special' is not up!"
+ Call hCloseDocument
+ goto endsub
+ end if
+ printlog " Close active document "
+ Do Until GetDocumentCount = 0
+ Call hCloseDocument
+ Loop
+endcase
+
+' ---------------------------------------------------------------------------------
+
+testcase DrawToWriterConnectors
+
+ gApplication = "DRAW"
+ printlog " Open File '..\\writer\\optional\\input\\clipboard\\draw.sxd' "
+ printlog " Jump to beginning of document "
+ printlog " Select Connectors "
+ printlog " Copy selected Connectors "
+ Call hFileOpen (gtesttoolpath & "writer\optional\input\clipboard\draw.sxd")
+ Call sMakeReadOnlyDocumentEditable
+ Kontext "DocumentDraw"
+ printlog " Jump to beginning of document "
+ DocumentDraw.TypeKeys "<PageDown>"
+ DocumentDraw.TypeKeys "<Tab>"
+ EditCopy
+ gApplication = "WRITER"
+ printlog " Open a new writerdocument "
+ Call hNewDocument
+ Sleep 2
+ try
+ EditPasteSpecialWriter
+ catch
+ Warnlog "Unable to execute 'Edit / Paste Special' ! Test failed!"
+ Call hCloseDocument ' Close Source-File
+ Call hCloseDocument ' Close Target-File
+ goto endsub
+ endcatch
+ Wait 500
+ printlog " Paste 'Connectors' in all available clipboard formats "
+ Kontext "InhaltEinfuegen"
+ if InhaltEinfuegen.Exists then
+ Call wPasteAvailableClipboardFormats(Auswahl.GetItemCount,"DRAW")
+ printlog " Write Clipboard format under pasted content "
+ Call hFileSaveAsWithFilterKill (gOfficepath + "user\work\draw_to_writer_connectors.odt", "writer8")
+ printlog " Save document as ..\user\work\draw_to_writer_connectors.odt"
+ Wait 500
+ Call hCloseDocument
+ printlog " Close saved document "
+ wait 500
+ Call hFileOpen (gOfficepath + "user\work\draw_to_writer_connectors.odt",false)
+ printlog " Reopen saved document "
+ Wait 500
+ Call hCloseDocument
+ printlog " Close saved document "
+ else
+ Warnlog "Dialog 'Paste Special' is not up!"
+ Call hCloseDocument
+ goto endsub
+ end if
+ printlog " Close active document "
+ Do Until GetDocumentCount = 0
+ Call hCloseDocument
+ Loop
+endcase
+
+'------------------------------------------------------------------------------