diff options
author | Vladimir Glazounov <vg@openoffice.org> | 2009-08-27 11:59:20 +0000 |
---|---|---|
committer | Vladimir Glazounov <vg@openoffice.org> | 2009-08-27 11:59:20 +0000 |
commit | c1a6d9acd8323f29af9924e2c5308a5bdd4d7f31 (patch) | |
tree | 4864a982c0f529ff88c340c826f40d88d08dc869 /testautomation/writer/optional | |
parent | CWS-TOOLING: integrate CWS automationdev300m55cat0 (diff) | |
download | core-c1a6d9acd8323f29af9924e2c5308a5bdd4d7f31.tar.gz core-c1a6d9acd8323f29af9924e2c5308a5bdd4d7f31.zip |
CWS-TOOLING: integrate CWS sw32a11y01
2009-08-27 10:11:46 +0200 hde r275457 : new testcase i103265
2009-08-27 08:24:31 +0200 hde r275454 : new testcase i103265
2009-08-27 08:23:05 +0200 hde r275453 : new document for testcase i103265
2009-08-26 13:43:33 +0200 hde r275421 : added new autotest
2009-08-26 13:36:28 +0200 hde r275420 : added new autotest
2009-08-18 15:41:18 +0200 od r275113 : #i104300# method <SwEditWin::RequestHelp(..)>
- improve help tip for hyperlinks to cross-reference bookmarks.
2009-08-10 15:18:41 +0200 od r274816 : #i73249# method <SwFrameShell::Execute(..)>
- no update of fly frame manager on dialog "Title and Description"
2009-08-10 14:24:15 +0200 od r274813 : #i92125# correction of end of file - missing newline end
2009-08-10 14:10:14 +0200 od r274811 : #i92125# correction of end of file - newline missing
2009-08-10 14:00:30 +0200 od r274808 : #i92125# - correct end of file - new line missing
2009-08-10 09:12:30 +0200 od r274794 : CWS-TOOLING: rebase CWS sw32a11y01 to trunk@274622 (milestone: DEV300:m54)
2009-08-07 15:52:59 +0200 od r274775 : #i73249# minor adjustment due to compiler warning
2009-08-07 15:40:38 +0200 od r274774 : #i92125# method <MarkManager::deleteMarks(..)>
- do not delete cross-reference bookmark, if deletion occurs inside a certain node
2009-08-06 12:53:05 +0200 od r274717 : #i92125# method <MarkManager::deleteMarks(..)
- no move of position for cross-reference bookmark, if move occurs inside certain node.
2009-08-06 12:50:27 +0200 od r274716 : #i92125# method <SwUndoSaveCntnt::DelCntntIndex(..)>
- keep cross-reference bookmarks, if deletion occurs inside a certain node.
2009-08-06 09:53:29 +0200 od r274705 : #i103265# method <SwTOXPara::GetURL()>
- For outline and template entries create link to bookmark.
The bookmark of type CROSSREF_HEADING_BOOKMARK is created, if needed
2009-07-22 13:57:04 +0200 od r274236 : #i73249# adjustment for export of svg:title and svg:description
2009-07-22 13:51:58 +0200 od r274234 : #i73249# adjust and enhance import/export of svg:title and svg:description
for Writer's text frames, graphics and embedded objects
2009-07-21 10:26:27 +0200 od r274168 : #i73249# implement support for attributes Title and Description for
text frames, graphics and embedded objects in Writer
- core, UNO-API, undo/redo and UI
2009-07-21 10:05:15 +0200 od r274164 : #i73249# new optional properties Title and Description as basis frame properties in text documents
2009-07-13 12:19:54 +0200 od r273928 : #i73249# Implementation of Undo/Redo of drawing object's name, title and description
Diffstat (limited to 'testautomation/writer/optional')
-rwxr-xr-x | testautomation/writer/optional/includes/alternative_text/w_alternative_text.inc | 305 | ||||
-rwxr-xr-x | testautomation/writer/optional/includes/regression/issuezilla/w_issuezilla_regression.inc | 77 | ||||
-rwxr-xr-x | testautomation/writer/optional/input/alternative_text/jolink.jpg | bin | 0 -> 11686 bytes | |||
-rw-r--r-- | testautomation/writer/optional/input/regression/issuezilla/i103265.odt | bin | 0 -> 8768 bytes | |||
-rw-r--r-- | testautomation/writer/optional/w_alternative_text.bas | 65 |
5 files changed, 447 insertions, 0 deletions
diff --git a/testautomation/writer/optional/includes/alternative_text/w_alternative_text.inc b/testautomation/writer/optional/includes/alternative_text/w_alternative_text.inc new file mode 100755 index 000000000000..51b1f4ebf792 --- /dev/null +++ b/testautomation/writer/optional/includes/alternative_text/w_alternative_text.inc @@ -0,0 +1,305 @@ +'encoding UTF-8 Do not remove or change this line! +'************************************************************************** +'* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +'* +'* Copyright 2008 by Sun Microsystems, Inc. +'* +'* OpenOffice.org - a multi-platform office productivity suite +'* +'* $RCSfile: w_alternative_text.inc,v $ +'* +'* $Revision: 1.2 $ +'* +'* last change: $Author: hde $ $Date: 2008-08-18 12:30:39 $ +'* +'* 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 : Test Alternative Text for objects in writer +'* +'\************************************************************************ + +sub w_alternative_text + + Call tPictureAlternativeText + Call tFrameAlternativeText + Call tOLEAlternativeText + + +end sub + +'------------------------------------------------------------------------- + +testcase tPictureAlternativeText + + printlog "- New writer document" + Call hNewDocument + + printlog "- Insert a picture" + InsertGraphicsFromFile + Kontext "GrafikEinfuegenDlg" + Dateiname.Settext ConvertPath(gTesttoolpath + "writer\optional\input\alternative_text\jolink.jpg") + Sleep 1 + Oeffnen.Click + Sleep 2 + + printlog "- Context menu on the picture, choose 'Description'" + try + ContextDescriptionObject + catch + Warnlog "Seems picture is not selected => Description Object could not be opened" + endcatch + + printlog "- Type 'TitleText' in the Title field" + Kontext "DescriptionObject" + DescriptionTitle.Settext "TitleText" + + printlog "- Type 'This Is A Description'" + DescriptionText.Settext "This Is A Description" + + printlog "- Close the dialog" + DescriptionObject.Ok + + printlog "- Context menu on the picture, choose 'Description'" + try + ContextDescriptionObject + catch + Warnlog "Seems picture is not selected => Description Object could not be opened" + endcatch + + printlog "Check that the Title and Description fields have been saved correctly" + Kontext "DescriptionObject" + if DescriptionTitle.Gettext <> "TitleText" then + Warnlog "Object title gets lost. Not 'TitleText' but " & DescriptionTitle.Gettext + endif + if DescriptionText.Gettext <> "This Is A Description" then + warnlog "Object description gets lost. Not 'This Is A Description' but " & DescriptionText.Gettext + endif + DescriptionObject.Cancel + + printlog "- Format - Picture" + FormatGraphics + + printlog "The 'Alternative' field must be filled with the content of the Title field (='TitleText')" + Kontext + Active.Setpage TabZusaetze + Kontext "TabZusaetze" + if Alternativtext.Gettext <> "TitleText" then + Warnlog "Alternatice text in pictures options is not set" + endif + TabZusaetze.Cancel + + printlog "- Save the document" + Call hFileSaveAsKill ( gOfficePath + "user\work\tPictureAlternativeText.odt" ) + Call hCloseDocument + + printlog "- Reload" + Call hFileOpen ( gOfficePath + "user\work\tPictureAlternativeText.odt" ) + ' select graphic + Call wTypeKeys ("<SHIFT F4>") + + printlog "Check that the Title and Description fields have been saved correctly" + try + ContextDescriptionObject + catch + Warnlog "Seems picture is not selected => Description Object could not be opened" + endcatch + + Kontext "DescriptionObject" + if DescriptionTitle.Gettext <> "TitleText" then + Warnlog "Object title gets lost. Not 'TitleText' but " & DescriptionTitle.Gettext + endif + if DescriptionText.Gettext <> "This Is A Description" then + warnlog "Object description gets lost. Not 'This Is A Description' but " & DescriptionText.Gettext + endif + DescriptionObject.Cancel + + printlog "- Format - Picture" + FormatGraphics + Kontext + Active.Setpage TabZusaetze + Kontext "TabZusaetze" + if Alternativtext.Gettext <> "TitleText" then + Warnlog "Alternatice text in pictures options is not set after save and reload" + endif + TabZusaetze.Cancel + + printlog "- close document" + Call hCloseDocument + +endcase + +'------------------------------------------------------------------------- + +testcase tFrameAlternativeText + + printlog "- New writer document" + Call hNewDocument + + printlog "- Insert a frame" + Call wInsertFrame + + printlog "- Context menu on the frame, choose 'Description'" + try + ContextDescriptionObject + catch + Warnlog "Seems Frame is not selected => Description Object could not be opened" + endcatch + + printlog "- Type 'TitleText' in the Title field" + Kontext "DescriptionObject" + DescriptionTitle.Settext "TitleText" + + printlog "- Type 'This Is A Description'" + DescriptionText.Settext "This Is A Description" + + printlog "- Close the dialog" + DescriptionObject.Ok + + printlog "- Context menu on the frame, choose 'Description'" + try + ContextDescriptionObject + catch + Warnlog "Seems frame is not selected => Description Object could not be opened" + endcatch + + printlog "Check that the Title and Description fields have been saved correctly" + Kontext "DescriptionObject" + if DescriptionTitle.Gettext <> "TitleText" then + Warnlog "Object title gets lost. Not 'TitleText' but " & DescriptionTitle.Gettext + endif + if DescriptionText.Gettext <> "This Is A Description" then + warnlog "Object description gets lost. Not 'This Is A Description' but " & DescriptionText.Gettext + endif + DescriptionObject.Cancel + + printlog "- Save the document" + Call hFileSaveAsKill ( gOfficePath + "user\work\tFrameAlternativeText.odt" ) + Call hCloseDocument + + printlog "- Reload" + Call hFileOpen ( gOfficePath + "user\work\tFrameAlternativeText.odt" ) + ' select frame + Call wTypeKeys ("<SHIFT F4>") + + printlog "Check that the Title and Description fields have been saved correctly" + try + ContextDescriptionObject + catch + Warnlog "Seems frame is not selected => Description Object could not be opened" + endcatch + + Kontext "DescriptionObject" + if DescriptionTitle.Gettext <> "TitleText" then + Warnlog "Object title gets lost. Not 'TitleText' but " & DescriptionTitle.Gettext + endif + if DescriptionText.Gettext <> "This Is A Description" then + warnlog "Object description gets lost. Not 'This Is A Description' but " & DescriptionText.Gettext + endif + DescriptionObject.Cancel + + printlog "- close document" + Call hCloseDocument + + +endcase + +'------------------------------------------------------------------------- + +testcase tOLEAlternativeText + + printlog "- New writer document" + Call hNewDocument + + printlog "- Insert a OLE" + InsertObjectOLEObject + Kontext "OLEObjektEinfuegen" + NeuErstellen.Check + OLEObjektEinfuegen.Ok + Sleep 2 + Call gMouseClick (10,10) + Call wTypeKeys "<SHIFT F4>" + + printlog "- Context menu on the OLE, choose 'Description'" + try + ContextDescriptionObject + catch + Warnlog "Seems OLE is not selected => Description Object could not be opened" + endcatch + + printlog "- Type 'TitleText' in the Title field" + Kontext "DescriptionObject" + DescriptionTitle.Settext "TitleText" + + printlog "- Type 'This Is A Description'" + DescriptionText.Settext "This Is A Description" + + printlog "- Close the dialog" + DescriptionObject.Ok + + printlog "- Context menu on the OLE, choose 'Description'" + try + ContextDescriptionObject + catch + Warnlog "Seems OLE is not selected => Description Object could not be opened" + endcatch + + printlog "Check that the Title and Description fields have been saved correctly" + Kontext "DescriptionObject" + if DescriptionTitle.Gettext <> "TitleText" then + Warnlog "Object title gets lost. Not 'TitleText' but " & DescriptionTitle.Gettext + endif + if DescriptionText.Gettext <> "This Is A Description" then + warnlog "Object description gets lost. Not 'This Is A Description' but " & DescriptionText.Gettext + endif + DescriptionObject.Cancel + + printlog "- Save the document" + Call hFileSaveAsKill ( gOfficePath + "user\work\tOLEAlternativeText.odt" ) + Call hCloseDocument + + printlog "- Reload" + Call hFileOpen ( gOfficePath + "user\work\tOLEAlternativeText.odt" ) + ' select OLE + Call wTypeKeys ("<SHIFT F4>") + + printlog "Check that the Title and Description fields have been saved correctly" + try + ContextDescriptionObject + catch + Warnlog "Seems OLE is not selected => Description Object could not be opened" + endcatch + + Kontext "DescriptionObject" + if DescriptionTitle.Gettext <> "TitleText" then + Warnlog "Object title gets lost. Not 'TitleText' but " & DescriptionTitle.Gettext + endif + if DescriptionText.Gettext <> "This Is A Description" then + warnlog "Object description gets lost. Not 'This Is A Description' but " & DescriptionText.Gettext + endif + DescriptionObject.Cancel + + printlog "- close document" + Call hCloseDocument + + + +endcase
\ No newline at end of file diff --git a/testautomation/writer/optional/includes/regression/issuezilla/w_issuezilla_regression.inc b/testautomation/writer/optional/includes/regression/issuezilla/w_issuezilla_regression.inc index ad15f9b70aa0..9a7c142d0b1d 100755 --- a/testautomation/writer/optional/includes/regression/issuezilla/w_issuezilla_regression.inc +++ b/testautomation/writer/optional/includes/regression/issuezilla/w_issuezilla_regression.inc @@ -46,6 +46,7 @@ sub w_issuezilla_regression Call i75027 Call i76637 Call i88656 + Call i103265 end sub @@ -441,3 +442,79 @@ testcase i88656 endcase '-------------------------------------------------------------------------- + +testcase i103265 + + Dim i as integer + + printlog "ODF Hyperlinks in TOCs" + Call hNewDocument + printlog "- Open test document" + Call hFileOpen ( gTesttoolPath + "writer\optional\input\regression\issuezilla\i103265.odt" ) + printlog "- Update TOC" + ToolsUpdateAllIndexes + + printlog "Check that every hyperlink jumps correctly to its target" + For i = 1 to 3 + ' point cursor to beginning of document + Call wTypeKeys "<MOD1 HOME>" + ' point cursor to index entry + Call wTypeKeys "<DOWN>", 4 + i + 'execute Hyperlink + ContextOpenHyperlink + ' check if it jumps to correct target + Call wTypeKeys "<SHIFT END>" + EditCopy + Select Case i + Case 1: + if GetClipboardText <> "# 1 Test" then + Warnlog "First hyperlink not correctly jumped to. Not '# 1 Test' but " & GetClipboardtext + end if + Case 2: + if GetClipboardText <> "1. Test" then + Warnlog "First hyperlink not correctly jumped to. Not '# 1. Test' but " & GetClipboardtext + end if + Case 3: + if GetClipboardText <> "Test " then + Warnlog "First hyperlink not correctly jumped to. Not 'Test' but " & GetClipboardtext + end if + end select + next i + + printlog "- Save as HTML" + gApplication = "HTML" + Call hFileSaveAsWithFilterKill ( gOfficePath + "user\work\ODFHyperlinksInTOCs.html", "HTML" ) + Call hCloseDocument + + printlog "- Reload" + Call hFileOpen ( gOfficePath + "user\work\ODFHyperlinksInTOCs.html" ) + printlog "Check that every hyperlink jumps correctly to its target" + For i = 1 to 3 + ' point cursor to beginning of document + Call wTypeKeys "<MOD1 HOME>" + ' point cursor to index entry + Call wTypeKeys "<DOWN>", 5 + i + 'execute Hyperlink + ContextOpenHyperlink + ' check if it jumps to correct target + Call wTypeKeys "<SHIFT END>" + EditCopy + Select Case i + Case 1: + if GetClipboardText <> "# 1 Test" then + Warnlog "First hyperlink not correctly jumped to. Not '# 1 Test' but " & GetClipboardtext + end if + Case 2: + if GetClipboardText <> "1. Test" then + Warnlog "First hyperlink not correctly jumped to. Not '# 1. Test' but " & GetClipboardtext + end if + Case 3: + if GetClipboardText <> "1Test " then + Warnlog "First hyperlink not correctly jumped to. Not 'Test ' but " & GetClipboardtext + end if + end select + next i + + Call hCloseDocument + +endcase
\ No newline at end of file diff --git a/testautomation/writer/optional/input/alternative_text/jolink.jpg b/testautomation/writer/optional/input/alternative_text/jolink.jpg Binary files differnew file mode 100755 index 000000000000..6200757dd797 --- /dev/null +++ b/testautomation/writer/optional/input/alternative_text/jolink.jpg diff --git a/testautomation/writer/optional/input/regression/issuezilla/i103265.odt b/testautomation/writer/optional/input/regression/issuezilla/i103265.odt Binary files differnew file mode 100644 index 000000000000..bbf90f8febba --- /dev/null +++ b/testautomation/writer/optional/input/regression/issuezilla/i103265.odt diff --git a/testautomation/writer/optional/w_alternative_text.bas b/testautomation/writer/optional/w_alternative_text.bas new file mode 100644 index 000000000000..86cf50a6bd5c --- /dev/null +++ b/testautomation/writer/optional/w_alternative_text.bas @@ -0,0 +1,65 @@ +'************************************************************************** +'* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +'* +'* Copyright 2008 by Sun Microsystems, Inc. +'* +'* OpenOffice.org - a multi-platform office productivity suite +'* +'* $RCSfile: w_alternative_text.bas,v $ +'* +'* $Revision: 1.1 $ +'* +'* last change: $Author: hde $ $Date: 2008-06-18 09:11:25 $ +'* +'* 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 : Alternative Texts For Writer Objects +'* +'\*********************************************************************** + +sub main + Dim StartTime + StartTime = Now() + + use "writer\tools\includes\w_tools.inc" + + use "writer\optional\includes\alternative_text\w_alternative_text.inc" + + printlog Chr(13) + "Loading of Include - Files takes: " + Wielange ( StartTime ) + printlog Chr(13) + "******* Writer - Alternative Text - Test *******" + + Call hStatusIn ( "writer", "w_alternative_text.bas" ) + Call w_alternative_text + Call hStatusOut + + Printlog Chr(13) + "End of Autotest:" + Printlog "Duration: "+ WieLange ( StartTime ) + Printlog "Date: " + Date + " Time: " + Time + +end sub + +sub LoadIncludeFiles + use "global\system\includes\master.inc" + use "global\system\includes\gvariabl.inc" + Call GetUseFiles + gApplication = "WRITER" +end sub |