summaryrefslogtreecommitdiff
path: root/testautomation/writer/optional/includes/number
diff options
context:
space:
mode:
Diffstat (limited to 'testautomation/writer/optional/includes/number')
-rwxr-xr-xtestautomation/writer/optional/includes/number/w_205_.inc731
-rwxr-xr-xtestautomation/writer/optional/includes/number/w_205a_.inc875
-rwxr-xr-xtestautomation/writer/optional/includes/number/w_206_.inc726
-rwxr-xr-xtestautomation/writer/optional/includes/number/w_207_.inc175
4 files changed, 2507 insertions, 0 deletions
diff --git a/testautomation/writer/optional/includes/number/w_205_.inc b/testautomation/writer/optional/includes/number/w_205_.inc
new file mode 100755
index 000000000000..57a56ab80b8c
--- /dev/null
+++ b/testautomation/writer/optional/includes/number/w_205_.inc
@@ -0,0 +1,731 @@
+'encoding UTF-8 Do not remove or change this line!
+'**************************************************************************
+' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+'
+' Copyright 2000, 2010 Oracle and/or its affiliates.
+'
+' OpenOffice.org - a multi-platform office productivity suite
+'
+' This file is part of OpenOffice.org.
+'
+' OpenOffice.org is free software: you can redistribute it and/or modify
+' it under the terms of the GNU Lesser General Public License version 3
+' only, as published by the Free Software Foundation.
+'
+' OpenOffice.org is distributed in the hope that it will be useful,
+' but WITHOUT ANY WARRANTY; without even the implied warranty of
+' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' GNU Lesser General Public License version 3 for more details
+' (a copy is included in the LICENSE file that accompanied this code).
+'
+' You should have received a copy of the GNU Lesser General Public License
+' version 3 along with OpenOffice.org. If not, see
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* owner : helge.delfs@oracle.com
+'*
+'* short description : Testing Number and Bullets
+'*
+'\***********************************************************************
+
+sub w_205_
+
+ Call tNumberingBullets_1
+ Call tFormatNumberingBullets
+ Call tFormatNumberingPosition
+ Call tFormatNumberingOptions
+ Call tFormatNumberingAll
+
+end sub
+
+testcase tNumberingBullets_1
+
+ printlog "Turn several selected paragraphs into numbered list"
+ '/// Open a new text document
+ Call hNewDocument()
+ '/// Insert 3 times dummy text
+ Call wBlindTextEinfuegen()
+ Call wBlindTextEinfuegen()
+ Call wBlindTextEinfuegen()
+ '/// Select all inserted text
+ call wTypeKeys "<shift mod1 home>"
+
+ '/// Choose 'Numbering' on 'Objectbar'
+ Kontext "TextObjectbar"
+ try
+ Numerierung.Click
+ catch
+ warnlog "Objectbar is not accessible for numbering bullets"
+ endcatch
+ '/// Check if numbering has been created
+ if (hIsNumberingBullets () <> True) then
+ Warnlog " - Seems numbering has not been created"
+ else
+ printlog " - Numbering has been created"
+ end if
+
+ '/// Turn numbereing off via Toolbar
+ Printlog "Turn Numbering off"
+ OL_Writer_Numerierung
+ '/// Check if numbering has been turned off
+ if (hIsNumberingBullets () <> False) then
+ warnlog " - Seems numbering is still available"
+ else
+ printlog " - Numbering has been turned off"
+ end if
+
+ Printlog "'/// Restart counting via Format->Paragraph->Numbering ///"
+ Call hFormatParagraphNumbering ("",1,-1)
+ if (hIsNumberingBullets () <> True) then
+ Warnlog "Seems numbering has not been created"
+ else
+ printlog "Numbering has been created"
+ end if
+
+ Printlog "'/// +O+ restart numbering enable///"
+ ' checked 'restart numbering' on tabpage toggles icon at Objectbar
+ Kontext "NumObjectbar"
+ if Not NumObjectBar.Exists then Call hToolbarSelect ( "BULLETSANDNUMBERING", true )
+
+ ' Button in objectbar has to be checked
+ if NeuStarten.GetState(2) <> 1 then
+ warnlog "Button 'Restart Numbering' not pressed!"
+ NeuStarten.Click
+ sleep (1)
+ if NeuStarten.GetState(2) <> 1 then
+ warnlog "doesn't work"
+ else
+ printlog " --- worked :-)"
+ end if
+ else
+ ' Undo 'restart numbering'
+ Printlog "' disable"
+ NeuStarten.Click
+ sleep (1)
+ if NeuStarten.GetState(2) <> 0 then
+ warnlog "doesn't work "
+ else
+ printlog " --- worked :-)"
+ end if
+ end if
+
+ Call hCloseDocument
+
+endcase
+
+'--------------------------------------------------
+
+testcase tFormatNumberingBullets
+ Dim i as Integer :
+ PrintLog "- Format / Numbering and Bullets"
+
+ '/// New document ///
+ Call hNewDocument
+
+ printlog " - All bullet entries"
+ '/// Insert all bullet entries ///
+ for i=1 to 8
+ FormatNumberingBullets
+ Kontext
+ Active.SetPage TabBullet
+ Kontext "TabBullet"
+ Auswahl.TypeKeys "<Right>", i
+ TabBullet.OK
+ call wTypeKeys "Bullet <Return><Return>"
+ next i
+
+ printlog " - All Numbering entries"
+ '/// Insert all numbering entries ///
+ for i=1 to 8
+ FormatNumberingBullets
+ Kontext
+ Active.SetPage TabNumerierungsart
+ Kontext "TabNumerierungsart"
+ Auswahl.TypeKeys "<Right>", i
+ TabNumerierungsart.OK
+ call wTypeKeys "Nummerierungsart <Return><Return>"
+ Sleep 1
+ next i
+
+ printlog " - All entries in Level"
+ '/// Insert all level entries ///
+ for i=1 to 8
+ FormatNumberingBullets
+ Kontext
+ Active.SetPage TabGliederung
+ Kontext "TabGliederung"
+ Auswahl.TypeKeys "<Right>", i
+ TabGliederung.OK
+ call wTypeKeys "Gliederung <Return><Return>"
+ Sleep 1
+ next i
+
+ printlog " - All entries in graphic"
+ '/// Insert all graphic entries ///
+ for i=1 to 29
+ FormatNumberingBullets
+ Kontext
+ Active.SetPage TabGrafiken
+ Kontext "TabGrafiken"
+ wait 500
+ Auswahl.TypeKeys "<Right>", i
+ TabGrafiken.OK
+ call wTypeKeys "Grafik <Return><Return>"
+ Sleep 1
+ next i
+
+ printlog " - Save document and reload"
+ '/// Save document, close and reopen previous saved document ///
+ Call hFileSaveAsKill ( gOfficePath + "user\work\format4." & WriterFilterExtension(0) )
+ Sleep 2
+ Call hCloseDocument
+ Sleep 2
+ Call hFileOpen ( gOfficePath + "user\work\format4." & WriterFilterExtension(0) )
+ Sleep 2
+ '/// Close document ///
+ Call hCloseDocument
+endcase
+
+'--------------------------------------------------
+testcase tFormatNumberingPosition
+ Dim V1 : Dim V2 : Dim V3 : Dim V4 : Dim V5 : Dim V6 : Dim V7 : Dim V8 : Dim V9 : Dim V10
+ Dim V11 : Dim V12 : Dim V13 : Dim V14 : Dim V15 : Dim V16
+
+ printlog " - adjust position of Numbering"
+ '/// New document ///
+ Call hNewDocument
+ '/// Select Format / Numbering Bullets and adjust position for each level ///
+ FormatNumberingBullets
+ Kontext
+ Active.SetPage TabPositionNumerierung
+ Kontext "TabPositionNumerierung"
+ Level.Select 1
+ Alignment.Select 2 ' Zentriert
+' if Relativ.IsEnabled then Warnlog "Relativ is enabled with level1!"
+ AlignedAt.More 5
+ V1 = AlignedAt.GetText
+ IndentAt.More 1
+ V2 = IndentAt.GetText
+ Level.Select 3
+ Alignment.Select 3 ' Rechts
+' Relativ.Check
+ AlignedAt.Less 5
+ V3 = AlignedAt.GetText
+' AbstandTextNumerierung.More 2
+' V4 = AbstandTextNumerierung.GetText
+ Level.Select 4
+ Alignment.Select 1 ' Links
+' Relativ.Check
+ V5 = AlignedAt.GetText
+ ' V6 = AbstandTextNumerierung.GetText
+ V7 = IndentAt.GetText
+ Level.Select 6
+ Alignment.Select 3 ' Rechts
+' Relativ.Check
+ AlignedAt.More 4
+ V8 = AlignedAt.GetText
+' AbstandTextNumerierung.Less 3
+' V9 = AbstandTextNumerierung.GetText
+ IndentAt.Less 3
+ V10 = IndentAt.GetText
+ Level.Select 9
+ Alignment.Select 1
+' Relativ.Check
+ AlignedAt.Less 2
+ V11 = AlignedAt.GetText
+' AbstandTextNumerierung.More 2
+' V12 = AbstandTextNumerierung.GetText
+ IndentAt.More 3
+ V13 = IndentAt.GetText
+ Level.Select 10
+ Alignment.Select 3
+' Relativ.Check
+ AlignedAt.More 4
+ V14 = AlignedAt.GetText
+' AbstandTextNumerierung.Less 3
+' V15 = AbstandTextNumerierung.GetText
+ IndentAt.Less 3
+ V16 = IndentAt.GetText
+ TabPositionNumerierung.OK
+
+ printlog " - write down numbering"
+ '/// write down the numbering ///
+ call wTypeKeys "Nummerierung 1. Ebene<Return>"
+ call wTypeKeys "<Tab>Nummerierung 2. Ebene<Return>"
+ call wTypeKeys "<Tab>Nummerierung 3. Ebene<Return>"
+ call wTypeKeys "<Tab>Nummerierung 4. Ebene<Return>"
+ call wTypeKeys "<Tab>Nummerierung 5. Ebene<Return>"
+ call wTypeKeys "<Tab>Nummerierung 6. Ebene<Return>"
+ call wTypeKeys "<Tab>Nummerierung 7. Ebene<Return>"
+ call wTypeKeys "<Tab>Nummerierung 8. Ebene<Return>"
+ call wTypeKeys "<Tab>Nummerierung 9. Ebene<Return>"
+ call wTypeKeys "<Tab>Nummerierung 10. Ebene<Return>"
+ call wTypeKeys "<Tab>Immer noch 10. Ebene<Return>"
+ call wTypeKeys "<Return><Return>Ende der Nummerierung"
+ call wTypeKeys "<Up>", 5
+
+ printlog " - check numbering-position"
+ '/// reopen Format / NumberingBullets and check settings made ///
+ FormatNumberingBullets
+ Kontext
+ Active.SetPage TabPositionNumerierung
+ Kontext "TabPositionNumerierung"
+ Level.Select 1
+' if Alignment.GetSelIndex <> 2 then Warnlog "#i38904#Level 1: Wrong alignment: Should = 2 Ist = "+ Alignment.GetSelIndex
+ if V1 <> AlignedAt.GetText then Warnlog "Level 1: Wrong Text <-> Rand: Should = "+ V1+ " Is = "+ AlignedAt.GetText
+ if V2 <> IndentAt.GetText then Warnlog "Level 1: Wrong indent: Should = "+ V2+ " Is = "+ IndentAt.GetText
+ Level.Select 3
+' if Not Relativ.IsChecked then Warnlog "Relativ is checked in Level 3!"
+ if Alignment.GetSelIndex <> 3 then Warnlog "#i38904#Level 3: Wrong alignment: Should = 3 Is = "+ Alignment.GetSelIndex
+ if V3 <> AlignedAt.GetText then Warnlog "Level 3: Wrong Text <-> Spacing to text: Should = "+ V3+ " Is = "+ AlignedAt.GetText
+' if V4 <> AbstandTextNumerierung.GetText then Warnlog "Level 3: Wrong indent: Should = "+ V4+ " Is = "+ AbstandTextNumerierung.GetText
+ Level.Select 4
+' if Not Relativ.IsChecked then Warnlog "Relativ is checked in Level 4!"
+ if Alignment.GetSelIndex <> 1 then Warnlog "#i38904#Level 4: Wrong alignment: Should = 1 Is = "+ Alignment.GetSelIndex
+ if V5 <> AlignedAt.GetText then Warnlog "Level 4: Wrong Text <-> Spacing to text: Should = "+ V5+ " Is = "+ AlignedAt.GetText
+' if V6 <> AbstandTextNumerierung.GetText then Warnlog "Level 4: Wrong indent: Should = "+ V6+ " Is = "+ AbstandTextNumerierung.GetText
+ if V7 <> IndentAt.GetText then Warnlog "Level 4: Wrong indent: Should = "+ V7+ " Is = "+ IndentAt.GetText
+ Level.Select 6
+' if Not Relativ.IsChecked then Warnlog "Relativ is checked in Level 6!"
+ if Alignment.GetSelIndex <> 3 then Warnlog "#i38904#Level 6: Wrong alignment: Should = 3 Is = "+ Alignment.GetSelIndex
+ if V8 <> AlignedAt.GetText then Warnlog "Level 6: Wrong Text <-> Spacing to text: Should = "+ V8+ " Is = "+ AlignedAt.GetText
+' if V9 <> AbstandTextNumerierung.GetText then Warnlog "Level 6: Wrong indent: Should = "+ V9+ " Is = "+ AbstandTextNumerierung.GetText
+ if V10 <> IndentAt.GetText then Warnlog "Level 6: Wrong indent: Should = "+ V10+ " Is = "+ IndentAt.GetText
+ Level.Select 9
+' if Not Relativ.IsChecked then Warnlog "Relativ is checked in Level 9!"
+ if Alignment.GetSelIndex <> 1 then Warnlog "#i38904#Level 9: Wrong alignment: Should = 1 Is = "+ Alignment.GetSelIndex
+ if V11 <> AlignedAt.GetText then Warnlog "Level 9: Wrong Text <-> Spacing to text: Should = "+ V11+ " Is = "+ AlignedAt.GetText
+' if V12 <> AbstandTextNumerierung.GetText then Warnlog "Level 9: Wrong indent: Should = "+ V12+ " Is = "+ AbstandTextNumerierung.GetText
+ if V13 <> IndentAt.GetText then Warnlog "Level 9: Wrong indent: Should = "+ V13+ " Is = "+ IndentAt.GetText
+ Level.Select 10
+' if Not Relativ.IsChecked then Warnlog "Relativ is checked in Level 10!"
+ if Alignment.GetSelIndex <> 3 then Warnlog "#i38904#Level 10: Wrong alignment: Should = 3 Is = "+ Alignment.GetSelIndex
+ if V14 <> AlignedAt.GetText then Warnlog "Level 10: Wrong Text <-> Spacing to text: Should = "+ V14+ " Is = "+ AlignedAt.GetText
+' if V15 <> AbstandTextNumerierung.GetText then Warnlog "Level 10: Wrong indent: Should = "+ V15+ " Is = "+ AbstandTextNumerierung.GetText
+ if V16 <> IndentAt.GetText then Warnlog "Level 10: Wrong indent: Should = "+ V16+ " Is = "+ IndentAt.GetText
+ TabPositionNumerierung.Ok
+
+ printlog " - check previous saved numbering"
+ '/// save document, close it and reload previous saved document ///
+ Sleep 1
+ Call hFileSaveAsKill ( gOfficePath + "user\work\tFormatNumberingPosition." & WriterFilterExtension(0) )
+ Sleep 2
+ Call hCloseDocument
+ Sleep 2
+ Call hFileOpen ( gOfficePath + "user\work\tFormatNumberingPosition." & WriterFilterExtension(0) )
+
+ '/// check settings on Format / NumberingBullets ///
+ FormatNumberingBullets
+ Kontext
+ Active.SetPage TabPositionNumerierung
+ Kontext "TabPositionNumerierung"
+ Level.Select 1
+
+ if Alignment.GetSelIndex <> 2 then Warnlog "#i38904#Level 1: Wrong alignment: Should = 2 Ist = "+ Alignment.GetSelIndex
+ if V1 <> AlignedAt.GetText then Warnlog "Level 1: Wrong Text <-> Rand: Should = "+ V1+ " Is = "+ AlignedAt.GetText
+ if V2 <> IndentAt.GetText then Warnlog "Level 1: Wrong indent: Should = "+ V2+ " Is = "+ IndentAt.GetText
+ Level.Select 3
+' if Not Relativ.IsChecked then Relativ.Check
+ if Alignment.GetSelIndex <> 3 then Warnlog "#i38904#Level 3: Wrong alignment: Should = 3 Is = "+ Alignment.GetSelIndex
+ if V3 <> AlignedAt.GetText then Warnlog "Level 3: Wrong Text <-> Spacing to text: Should = "+ V3+ " Is = "+ AlignedAt.GetText
+' if V4 <> AbstandTextNumerierung.GetText then Warnlog "Level 3: Wrong indent: Should = "+ V4+ " Is = "+ AbstandTextNumerierung.GetText
+ Level.Select 4
+' if Not Relativ.IsChecked then Relativ.Check
+ if Alignment.GetSelIndex <> 1 then Warnlog "#i38904#Level 4: Wrong alignment: Should = 1 Is = "+ Alignment.GetSelIndex
+ if V5 <> AlignedAt.GetText then Warnlog "Level 4: Wrong Text <-> Spacing to text: Should = "+ V5+ " Is = "+ AlignedAt.GetText
+' if V6 <> AbstandTextNumerierung.GetText then Warnlog "Level 4: Wrong indent: Should = "+ V6+ " Is = "+ AbstandTextNumerierung.GetText
+ if V7 <> IndentAt.GetText then Warnlog "Level 4: Wrong indent: Should = "+ V7+ " Is = "+ IndentAt.GetText
+ Level.Select 6
+' if Not Relativ.IsChecked then Relativ.Check
+ if Alignment.GetSelIndex <> 3 then Warnlog "#i38904#Level 6: Wrong alignment: Should = 3 Is = "+ Alignment.GetSelIndex
+ if V8 <> AlignedAt.GetText then Warnlog "Level 6: Wrong Text <-> Spacing to text: Should = "+ V8+ " Is = "+ AlignedAt.GetText
+' if V9 <> AbstandTextNumerierung.GetText then Warnlog "Level 6: Wrong indent: Should = "+ V9+ " Is = "+ AbstandTextNumerierung.GetText
+ if V10 <> IndentAt.GetText then Warnlog "Level 6: Wrong indent: Should = "+ V10+ " Is = "+ IndentAt.GetText
+ Level.Select 9
+' if Not Relativ.IsChecked then Relativ.Check
+ if Alignment.GetSelIndex <> 1 then Warnlog "#i38904#Level 9: Wrong alignment: Should = 1 Is = "+ Alignment.GetSelIndex
+ if V11 <> AlignedAt.GetText then Warnlog "Level 9: Wrong Text <-> Spacing to text: Should = "+ V11+ " Is = "+ AlignedAt.GetText
+' if V12 <> AbstandTextNumerierung.GetText then Warnlog "Level 9: Wrong indent: Should = "+ V12+ " Is = "+ AbstandTextNumerierung.GetText
+ if V13 <> IndentAt.GetText then Warnlog "Level 9: Wrong indent: Should = "+ V13+ " Is = "+ IndentAt.GetText
+ Level.Select 10
+' if Not Relativ.IsChecked then Relativ.Check
+ if Alignment.GetSelIndex <> 3 then Warnlog "#i38904#Level 10: Wrong alignment: Should = 3 Is = "+ Alignment.GetSelIndex
+ if V14 <> AlignedAt.GetText then Warnlog "Level 10: Wrong Text <-> Spacing to text: Should = "+ V14+ " Is = "+ AlignedAt.GetText
+' if V15 <> AbstandTextNumerierung.GetText then Warnlog "Level 10: Wrong indent: Should = "+ V15+ " Is = "+ AbstandTextNumerierung.GetText
+ if V16 <> IndentAt.GetText then Warnlog "Level 10: Wrong indent: Should = "+ V16+ " Is = "+ IndentAt.GetText
+ TabPositionNumerierung.Cancel
+ Sleep 1
+ '/// Close document ///
+ Call hCloseDocument
+endcase
+
+'--------------------------------------------------
+
+testcase tFormatNumberingOptions
+ Dim V1 : Dim V2 : Dim V3 : Dim V4 : Dim V5 : Dim V6 : Dim V7 : Dim V8 : Dim V9 : Dim V10
+ Dim i as integer
+
+ printlog " - adjust numbering properties"
+ '/// New document ///
+ Call hNewDocument
+ '/// Select Format / Numbering Bullets and adjust properties for each level ///
+ FormatNumberingBullets
+
+ Kontext
+ Active.SetPage TabOptionenNumerierung
+ Kontext "TabOptionenNumerierung"
+
+ Ebene.Select 1
+ Numerierung.Select 11 ' Keine
+ Davor.SetText "Vorher "
+ Dahinter.SetText "sp�ter "
+
+ Ebene.Select 3
+ Numerierung.Select 2 ' A,B,C,...
+ Davor.SetText "��� "
+ Dahinter.SetText "��� "
+ Zeichenvorlage.Select 2
+ V9 = Zeichenvorlage.GetSelText
+ Vollstaendig.Less 1
+ V1 = Vollstaendig.GetText
+ BeginnBei.More 4
+ V2 = BeginnBei.GetText
+
+ Ebene.Select 5
+ Numerierung.Select 8 ' Bullets
+ if Davor.IsVisible then Warnlog "'Before' is visible on Bullet-Options"
+ if Dahinter.IsVisible then Warnlog "'After' is visible on Bullet-Options"
+ Zeichenvorlage.Select 1
+
+ Ebene.Select 7
+ Numerierung.Select 9 ' Grafik
+ if Davor.IsVisible then Warnlog "'Before' is visible on Graphic-Options"
+ if Dahinter.IsVisible then Warnlog "'After' is visible on Graphic-Options"
+ Auswahl.Click
+ Call hMenuSelectNr (1)
+ Kontext "OeffnenDlg"
+ Dateiname.Settext Convertpath(gtesttoolpath + "writer\optional\input\graphics\bullet.gif")
+ Oeffnen.Click
+ wait 500
+ Kontext "Active"
+ if Active.Exists then
+ if Active.GetRT = 304 then
+ Warnlog Active.Gettext
+ Active.Ok
+ end if
+ end if
+
+ Kontext "TabOptionenNumerierung"
+ Breite.More 4
+ V3 = Breite.GetText
+ Hoehe.More 3
+ V4 = Hoehe.GetText
+ Ausrichtung.Select 4
+
+ Ebene.Select 9
+ Numerierung.Select 1 ' 1,2,3,...
+ Zeichenvorlage.Select 3
+ V10 = Zeichenvorlage.GetSelText
+
+ Ebene.Select 10
+ Numerierung.Select 3 ' a,b,c,...
+ V5 = Davor.GetText
+ V6 = Dahinter.GetText
+ Vollstaendig.More 9
+ V7 = Vollstaendig.GetText
+ BeginnBei.More 3
+ V8 = BeginnBei.GetText
+ TabOptionenNumerierung.OK
+
+ printlog " - write down numbering"
+ '/// write down numbering ///
+ call wTypeKeys "Hallo 1. Ebene<Return>"
+ call wTypeKeys "<Tab>Hallo 2. Ebene<Return>"
+ call wTypeKeys "<Tab>Hallo 3. Ebene<Return>"
+ call wTypeKeys "<Tab>Hallo 4. Ebene<Return>"
+ call wTypeKeys "<Tab>Hallo 5. Ebene<Return>"
+ call wTypeKeys "<Tab>Hallo 6. Ebene<Return>"
+ call wTypeKeys "<Tab>Hallo 7. Ebene<Return>"
+ call wTypeKeys "<Tab>Hallo 8. Ebene<Return>"
+ call wTypeKeys "<Tab>Hallo 9. Ebene<Return>"
+ call wTypeKeys "<Tab>Hallo 10. Ebene<Return>"
+ call wTypeKeys "<Tab>Immer noch 10. Ebene<Return>"
+ call wTypeKeys "<Return><Return>Ende der Numerierung"
+ call wTypeKeys "<Up>", 5
+
+ FormatNumberingBullets
+ Kontext
+ Active.SetPage TabOptionenNumerierung
+ Kontext "TabOptionenNumerierung"
+ Ebene.Select 1
+ if Numerierung.GetSelIndex <> 11 then Warnlog "Level 1: Wrong Numbering type : Should 11 Is " + Numerierung.GetSelIndex
+ if Davor.GetText <> "Vorher " then Warnlog "Level 1: Wrong Text in 'After': Should 'Vorher ' Is " + Davor.GetText
+ if Dahinter.GetText <> "sp�ter " then Warnlog "Level 1: Wrong Text in 'Before': Should 'sp�ter ' Is " + Dahinter.GetText
+ Ebene.Select 3
+ if Numerierung.GetSelIndex <> 2 then Warnlog "Level 3: Wrong Numbering type : Should 2 Is " + Numerierung.GetSelIndex
+ if Davor.GetText <> "��� " then Warnlog "Level 3: Wrong Text in 'Before': Should '��� ' Is " + Davor.GetText
+ if Dahinter.GetText <> "��� " then Warnlog "Level 3: Wrong Text in 'After': Should '��� ' Is " + Dahinter.GetText
+ if Zeichenvorlage.GetSelText <> V9 then Warnlog "Level 3: Wrong Character Style: Should " + V9 + " Is " + Zeichenvorlage.GetSelText
+ if V1 <> Vollstaendig.GetText then Warnlog "Level 3: 'Show Sublevels' Is wrong: Should " + V1 + " Is: " + Vollstaendig.GetText
+ if V2 <> BeginnBei.GetText then Warnlog "Level 3: 'Start at' Is wrong: Should " + V2 + " Is: " + BeginnBei.GetText
+ Ebene.Select 5
+ if Numerierung.GetSelIndex <> 8 then Warnlog "Level 5: Wrong Numbering type : Should 8 Is " + Numerierung.GetSelIndex
+ if Zeichenvorlage.GetSelIndex <> 1 then Warnlog "Level 5: Wrong Character Style: Should 1 Is " + Zeichenvorlage.GetSelIndex
+ Ebene.Select 7
+ if Numerierung.GetSelIndex <> 9 then
+ Warnlog "Level 7: Wrong Numbering type : Should 9 Is " + Numerierung.GetSelIndex
+ else
+ if V3 <> Breite.GetText then Warnlog "Level 7: Wrong graphic width: Should " + V3 + " Is: " + Breite.GetText
+ if V4 <> Hoehe.GetText then Warnlog "Level 7: Wrong graphic height: Should " + V4 + " Is: " + Hoehe.GetText
+ if Ausrichtung.GetSelIndex <> 4 then Warnlog "Level 7: Alignment Is not 4 but " + Ausrichtung.GetSelIndex
+ end if
+ Ebene.Select 9
+ if Numerierung.GetSelIndex <> 1 then Warnlog "Level 9: Wrong Numbering type : Should 1 Is " + Numerierung.GetSelIndex
+ if Zeichenvorlage.GetSelText <> V10 then Warnlog "Level 9: Wrong Character Style: Should " + V10 +" Is " + Zeichenvorlage.GetSelText
+ Ebene.Select 10
+ if Numerierung.GetSelIndex <> 3 then Warnlog "Level 10: Wrong Numbering type : Should 3 Is " + Numerierung.GetSelIndex
+ if Davor.GetText <> V5 then Warnlog "Level 10: Wrong Text in 'Before': Should "+ V5 + " Is " + Davor.GetText
+ if Dahinter.GetText <> V6 then Warnlog "Level 10: Wrong Text in 'After': Should "+ V6 + " Is " + Dahinter.GetText
+ if V7 <> Vollstaendig.GetText then Warnlog "Level 10: 'Show Sublevels' Is wrong: Should " + V7 + " Is: " + Vollstaendig.GetText
+ if V8 <> BeginnBei.GetText then Warnlog "Level 10: 'Start at' Is wrong: Should " + V8 + " Is: " + BeginnBei.GetText
+ TabOptionenNumerierung.Cancel
+
+ printlog " - check previous saved numbering"
+ '/// save document, close it and reload previous saved document ///
+ Call hFileSaveAsKill ( gOfficePath + "user\work\format6." & WriterFilterExtension(0) )
+ Sleep 2
+ Call hCloseDocument
+ Sleep 2
+ Call hFileOpen ( gOfficePath + "user\work\format6." & WriterFilterExtension(0) )
+ For i = 1 to 15
+ call wTypeKeys "<Up>"
+ Wait 500
+ next i
+ call wTypeKeys "<Home>"
+
+ '/// check settings in Format / Numbering Bullets ///
+ FormatNumberingBullets
+ Kontext
+ Active.SetPage TabOptionenNumerierung
+ Kontext "TabOptionenNumerierung"
+ Ebene.Select 1
+ if Numerierung.GetSelIndex <> 11 then Warnlog "Level 1: Wrong Numbering type : Should 11 Is " + Numerierung.GetSelIndex
+ if Davor.GetText <> "Vorher " then Warnlog "Level 1: Wrong Text in 'After': Should 'Vorher ' Is " + Davor.GetText
+ if Dahinter.GetText <> "sp�ter " then Warnlog "Level 1: Wrong Text in 'Before': Should 'sp�ter ' Is " + Dahinter.GetText
+ Ebene.Select 3
+ if Numerierung.GetSelIndex <> 2 then Warnlog "Level 3: Wrong Numbering type : Should 2 Is " + Numerierung.GetSelIndex
+ if Davor.GetText <> "��� " then Warnlog "Level 3: Wrong Text in 'Before': Should '��� ' Is " + Davor.GetText
+ if Dahinter.GetText <> "��� " then Warnlog "Level 3: Wrong Text in 'After': Should '��� ' Is " + Dahinter.GetText
+ if Zeichenvorlage.GetSelText <> V9 then Warnlog "Level 3: Wrong Character Style: Should " + V9 + " Is " + Zeichenvorlage.GetSelText
+ if V1 <> Vollstaendig.GetText then Warnlog "Level 3: 'Show Sublevels' Is wrong: Should " + V1 + " Is: " + Vollstaendig.GetText
+ if V2 <> BeginnBei.GetText then Warnlog "Level 3: 'Start at' Is wrong: Should " + V2 + " Is: " + BeginnBei.GetText
+ Ebene.Select 5
+ if Numerierung.GetSelIndex <> 8 then Warnlog "Level 5: Wrong Numbering type : Should 8 Is " + Numerierung.GetSelIndex
+ if Zeichenvorlage.GetSelIndex <> 1 then Warnlog "Level 5: Wrong Character Style: Should 1 Is " + Zeichenvorlage.GetSelIndex
+ Ebene.Select 7
+ if Numerierung.GetSelIndex <> 9 then
+ Warnlog "Level 7: Wrong Numbering type : Should 9 Is " + Numerierung.GetSelIndex
+ else
+ if V3 <> Breite.GetText then Warnlog "Level 7: Wrong graphic width: Should " + V3 + " Is: " + Breite.GetText
+ if V4 <> Hoehe.GetText then Warnlog "Level 7: Wrong graphic height: Should " + V4 + " Is: " + Hoehe.GetText
+ if Ausrichtung.GetSelIndex <> 4 then Warnlog "Level 7: Alignment Is not 4 but " + Ausrichtung.GetSelIndex
+ end if
+ Ebene.Select 9
+ if Numerierung.GetSelIndex <> 1 then Warnlog "Level 9: Wrong Numbering type : Should 1 Is " + Numerierung.GetSelIndex
+ if Zeichenvorlage.GetSelText <> V10 then Warnlog "Level 9: Wrong Character Style: Should " + V10 +" Is " + Zeichenvorlage.GetSelText
+ Ebene.Select 10
+ if Numerierung.GetSelIndex <> 3 then Warnlog "Level 10: Wrong Numbering type : Should 3 Is " + Numerierung.GetSelIndex
+ if Davor.GetText <> V5 then Warnlog "Level 10: Wrong Text in 'Before': Should "+ V5 + " Is " + Davor.GetText
+ if Dahinter.GetText <> V6 then Warnlog "Level 10: Wrong Text in 'After': Should "+ V6 + " Is " + Dahinter.GetText
+ if V7 <> Vollstaendig.GetText then Warnlog "Level 10: 'Show Sublevels' Is wrong: Should " + V7 + " Is: " + Vollstaendig.GetText
+ if V8 <> BeginnBei.GetText then Warnlog "Level 10: 'Start at' Is wrong: Should " + V8 + " Is: " + BeginnBei.GetText
+ TabOptionenNumerierung.Cancel
+
+ '/// Close document ///
+ Call hCloseDocument
+endcase
+
+'--------------------------------------------------
+testcase tFormatNumberingAll
+ Dim i as Integer
+ Dim Wert( 20 ) as Integer
+ printlog "- Format / Numbering -Bullets in detail"
+ printlog " - adjust different Numbering and check the properties"
+ '/// New document ///
+ Call hNewDocument
+ '/// Select Format / NumberingBullets and adjust different numbering ///
+ FormatNumberingBullets
+
+ Kontext
+ Active.SetPage TabBullet
+ Kontext "TabBullet"
+ Sleep 1
+ Auswahl.TypeKeys "<Right><Down>"
+ Kontext
+ Active.SetPage TabOptionenNumerierung
+ Kontext "TabOptionenNumerierung"
+ '/// Level 1 select a bullet ///
+ Ebene.Select 1 ' 1. Ebene ein Bullet einstellen
+
+ Kontext
+ Active.SetPage TabOptionenNumerierung
+ Kontext "TabOptionenNumerierung"
+ '/// Level 2 select a numbering ///
+ Ebene.Select 2 ' 2. Ebene eine Numerierungsart einstellen
+
+ Kontext
+ Active.SetPage TabNumerierungsart
+ Kontext "TabNumerierungsart"
+ Sleep 1
+ Auswahl.TypeKeys "<Down>", 2
+
+ Kontext
+ Active.SetPage TabOptionenNumerierung
+ Kontext "TabOptionenNumerierung"
+ '/// Level 3 select a numbering ///
+ Ebene.Select 3 ' 3. Ebene eine Numerierungsart einstellen
+
+ Kontext
+ Active.SetPage TabNumerierungsart
+ Kontext "TabNumerierungsart"
+ Sleep 1
+ Auswahl.TypeKeys "<Down><Right>", 2
+
+ Kontext
+ Active.SetPage TabOptionenNumerierung
+ Kontext "TabOptionenNumerierung"
+ '/// Level 4 select a graphic ///
+ Ebene.Select 4 ' 4. Ebene eine Grafik einstellen
+
+ Kontext
+ Active.SetPage TabGrafiken
+ Kontext "TabGrafiken"
+ Sleep 1
+ Auswahl.TypeKeys "<Right>"
+ ' 5. und 6. Ebene werden nicht besonders eingestellt
+ Kontext
+ Active.SetPage TabOptionenNumerierung
+ Kontext "TabOptionenNumerierung"
+ '/// Level 7 select a graphic ///
+ Ebene.Select 7 ' 7. Ebene eine Grafik einstellen
+
+ Kontext
+ Active.SetPage TabGrafiken
+ Kontext "TabGrafiken"
+ Sleep 1
+ Auswahl.TypeKeys "<Right><Down>"
+
+ Kontext
+ Active.SetPage TabOptionenNumerierung
+ Kontext "TabOptionenNumerierung"
+ '/// Level 8 select a graphic ///
+ Ebene.Select 8 ' 8. Ebene eine Grafik einstellen
+
+ Kontext
+ Active.SetPage TabGrafiken
+ Kontext "TabGrafiken"
+ Sleep 1
+ Auswahl.TypeKeys "<Right>", 5
+
+ Kontext
+ Active.SetPage TabOptionenNumerierung
+ Kontext "TabOptionenNumerierung"
+ '/// Level 9 select a bullet ///
+ Ebene.Select 9 ' 9. Ebene ein Bullet einstellen
+
+ Kontext
+ Active.SetPage TabBullet
+ Kontext "TabBullet"
+ Sleep 1
+ Auswahl.TypeKeys "<Down>"
+
+ Kontext
+ Active.SetPage TabOptionenNumerierung
+ Kontext "TabOptionenNumerierung"
+ '/// Level 10 select a numbering ///
+ Ebene.Select 10 ' 10. Ebene eine Numerierungsart einstellen
+
+ Kontext
+ Active.SetPage TabNumerierungsart
+ Kontext "TabNumerierungsart"
+ Sleep 1
+ Auswahl.TypeKeys "<Right>", 2
+
+ Kontext
+ Active.SetPage TabOptionenNumerierung
+ Kontext "TabOptionenNumerierung"
+
+ for i=1 to 10
+ Ebene.Select i
+ Wert (i) = Numerierung.GetSelIndex
+ next i
+ '/// check settings made ///
+
+ if Wert(1) <> 8 then Warnlog "Selected entry => 1. Level Is not Bullets (8. Entry) but entry " + Wert(1)
+ if Wert(2) <> 2 then Warnlog "Selected entry => 2. Level Is not Numbering 1 but entry " + Wert(2)
+ if Wert(3) <> 3 then Warnlog "Selected entry => 3. Level Is not Numbering 2 but entry " + Wert(3)
+ if Wert(4) <> 9 then Warnlog "Selected entry => 4. Level Is not Graphic (9. Entry) but entry " + Wert(4)
+ if Wert(5) <> 8 then Warnlog "Selected entry => 5. Level Is not Bullets (8. Entry) but entry " + Wert(5)
+ if Wert(6) <> 8 then Warnlog "Selected entry => 6. Level Is not Bullets (8. Entry) but entry " + Wert(6)
+ if Wert(7) <> 9 then Warnlog "Selected entry => 7. Level Is not Graphic (9. Entry) but entry " + Wert(7)
+ if Wert(8) <> 9 then Warnlog "Selected entry => 8. Level Is not Graphic (9. Entry) but entry " + Wert(8)
+ if Wert(9) <> 8 then Warnlog "Selected entry => 9. Level Is not Bullets (8. Entry) but entry " + Wert(9)
+ if Wert(10) <> 1 then Warnlog "Selected entry => 10. Level Is not Numbering 1 but entry " + Wert(10)
+
+ TabOptionenNumerierung.OK
+
+ printlog " - create numbering and check them"
+ '/// create numbering and check it ///
+ call wTypeKeys "Hallo 1. Ebene<Return>"
+ call wTypeKeys "<Tab>Hallo 2. Ebene<Return>"
+ call wTypeKeys "<Tab>Hallo 3. Ebene<Return>"
+ call wTypeKeys "<Tab>Hallo 4. Ebene<Return>"
+ call wTypeKeys "<Tab>Hallo 5. Ebene<Return>"
+ call wTypeKeys "<Tab>Hallo 6. Ebene<Return>"
+ call wTypeKeys "<Tab>Hallo 7. Ebene<Return>"
+ call wTypeKeys "<Tab>Hallo 8. Ebene<Return>"
+ call wTypeKeys "<Tab>Hallo 9. Ebene<Return>"
+ call wTypeKeys "<Tab>Hallo 10. Ebene<Return>"
+ call wTypeKeys "<Tab>Immer noch 10. Ebene<Return>"
+ call wTypeKeys "<Return><Return>Ende der Numerierung"
+ call wTypeKeys "<Up>", 5
+
+ FormatNumberingBullets
+ '/// reopen dialog and check settings ///
+ Kontext
+ Active.SetPage TabOptionenNumerierung
+ Kontext "TabOptionenNumerierung"
+ for i=1 to 10
+ Ebene.Select i
+ if Numerierung.GetSelIndex <> Wert(i) then
+ Warnlog "After creating: => Level " + i + " has not numbering " + Wert (i) + " but " + Numerierung.GetSelIndex
+ end if
+ next i
+ TabOptionenNumerierung.Cancel
+
+ printlog " - check previous saved numbering"
+ '/// save document, close and reload previous saved document ///
+ Sleep 2
+ Call hFileSaveAsKill ( gOfficePath + "user\work\format7." & WriterFilterExtension(0) )
+ Sleep 2
+ Call hCloseDocument
+ Sleep 2
+ Call hFileOpen ( gOfficePath + "user\work\format7." & WriterFilterExtension(0) )
+ Sleep 2
+ FormatNumberingBullets
+ '/// reopen Format / NumberingBullets and check saved settings ///
+ Kontext
+ Active.SetPage TabOptionenNumerierung
+ Kontext "TabOptionenNumerierung"
+ for i=1 to 10
+ Ebene.Select i
+ if Numerierung.GetSelIndex <> Wert(i) then Warnlog "After saving: => Level " + i + " has not Numbering " + Wert (i) + " but " + Numerierung.GetSelIndex
+ next i
+ TabOptionenNumerierung.Cancel
+
+ '/// close document ///
+ Call hCloseDocument
+endcase
diff --git a/testautomation/writer/optional/includes/number/w_205a_.inc b/testautomation/writer/optional/includes/number/w_205a_.inc
new file mode 100755
index 000000000000..0e157368d433
--- /dev/null
+++ b/testautomation/writer/optional/includes/number/w_205a_.inc
@@ -0,0 +1,875 @@
+'**************************************************************************
+' 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@oracle.com
+'*
+'* short description :
+'*
+'\***********************************************************************
+
+sub w_205a_
+ printLog Chr(13) + "--------- Level 1 - Tools - Menu (3) ----------"
+
+ Call tToolsOutlineNumbering1 ' Numerierungtabpage f�r Kapitelnumerierung
+ Call tToolsOutlineNumbering2 ' Positionstabpage f�r Kapitelnumerierung
+ Call tToolsOutlineNumbering3 ' Gesamtes f�r Kapitelnumerierung
+ Call tToolsFootnoteEndnote ' Fu�- + Endnoten formatieren
+
+end sub
+
+' *******************************************************************
+
+testcase tToolsOutlineNumbering1
+ Dim VorlagenLst(11) as String : Dim Zaehler as Integer
+ Dim i as integer
+ PrintLog "- Tools / Outline Numbering: Part 1 - Numbering"
+
+ Call hFileOpen ( gTesttoolPath + "writer\optional\input\number\numbering1.sxw" )
+ Call sMakeReadOnlyDocumentEditable
+
+ ToolsOutlineNumbering
+ Kontext
+ Active.SetPage TabKapitelnumerierung
+ Kontext "TabKapitelnumerierung"
+
+ PrintLog " - adjust level"
+ Ebene.Select 1
+ ' I need to know the name of entry (none), depends on language, for checking the results
+ Absatzvorlage.Select 1
+ VorlagenLst(11)= Absatzvorlage.GetSelText
+ Sleep 2
+ ' Select next paragraph style
+ Absatzvorlage.Select 2
+ Nummer.Select 1
+ if Vollstaendig.IsEnabled then Warnlog "On 1. Level 'Show Sublevels' is active -> Bug"
+ BeginBei.SetText "7"
+ Davor.SetText "Ha "
+ Dahinter.SetText " aH"
+
+ Ebene.Select 2
+ Absatzvorlage.Select 3
+ Nummer.Select 2
+ Vollstaendig.SetText "0"
+ BeginBei.SetText "4"
+ Davor.SetText "Q "
+ Dahinter.SetText " Q"
+
+ Ebene.Select 3
+ Absatzvorlage.Select 4
+ Nummer.Select 3
+ Vollstaendig.SetText "3"
+ BeginBei.SetText "2"
+ Davor.SetText "A "
+ Dahinter.SetText " s"
+
+ Ebene.Select 4
+ Absatzvorlage.Select 5
+ Nummer.Select 4
+ Vollstaendig.SetText "1"
+ Davor.SetText "Ups "
+ Dahinter.SetText " spU"
+
+ Ebene.Select 5
+ Absatzvorlage.Select 6
+ Nummer.Select 5
+ Vollstaendig.SetText "0"
+ Davor.SetText "*. "
+ Dahinter.SetText " @�"
+
+ Ebene.Select 6
+ Absatzvorlage.Select 7
+ Nummer.Select 6
+ Vollstaendig.SetText "5"
+ Davor.SetText " "
+ Sleep 1
+
+ Ebene.Select 7
+ Absatzvorlage.Select 8
+ Nummer.Select 5
+ Vollstaendig.SetText "9"
+ Sleep 1
+
+ Ebene.Select 8
+ Absatzvorlage.Select 9
+ Nummer.Select 4
+ Vollstaendig.SetText "9"
+ Sleep 1
+
+ Ebene.Select 9
+ Absatzvorlage.Select 10
+ Nummer.Select 3
+ Vollstaendig.SetText "9"
+ Dahinter.SetText "Hallo dies ist ein langer Text"
+ Sleep 1
+
+ Ebene.Select 10
+ Absatzvorlage.Select 11
+ Nummer.Select 3
+ Vollstaendig.SetText "9"
+ Davor.SetText "Hallo dies ist ein langer Text"
+ Sleep 1
+
+ ' remember the paragraph style
+ For i = 1 to 10
+ Ebene.Select i
+ VorlagenLst(i) = Absatzvorlage.GetSelText
+ next i
+
+ TabKapitelnumerierung.Ok
+
+ printlog "- format document"
+ call wTypeKeys "<Up>", 25
+
+ for Zaehler = 1 to 10
+ call wTypeKeys "<Shift End>"
+ if wStyleSet ( VorlagenLst(Zaehler) ) = false then
+ Warnlog "- Style '" & VorlagenLst(Zaehler) & "' could not be set!"
+ end if
+ call wTypeKeys "<Down>", 8
+ call wTypeKeys "<Home>"
+ wait 500
+ next Zaehler
+
+ printlog "- check properties"
+ ToolsOutlineNumbering
+ Kontext
+ Active.SetPage TabKapitelnumerierung
+ Kontext "TabKapitelnumerierung"
+ Ebene.Select 1
+ if Absatzvorlage.GetSelText <> VorlagenLst(1) then Warnlog "Level 1: wrong Paragraph Style"
+ if Nummer.GetSelIndex <> 1 then Warnlog "Level 1: wrong Character Style -> " + Nummer.GetSeltext + "instead of 1 !"
+ if BeginBei.GetText <> "7" then Warnlog "7 is not selected at 'Start at' but " + BeginBei.Gettext
+ if Davor.GetText <> "Ha " then Warnlog "Level 1: Seperator before not 'Ha ' but " + Davor.Gettext
+ if Dahinter.GetText <> " aH" then Warnlog "Level 1: Seperator after not ' aH' but " + Dahinter.Gettext
+
+ Ebene.Select 2
+ if Absatzvorlage.GetSelText <> VorlagenLst(2) then Warnlog "Level 2: Paragraph Style not " + VorlagenLst(2) + " but " + Absatzvorlage.GetSelText
+ if Nummer.GetSelIndex <> 2 then Warnlog "Level 2: wrong Character Style"
+ if Vollstaendig.GetText <> "1" then Warnlog "Level 2: 'Show Sublevels' is not 1 but " + Vollstaendig.GetText
+ if Davor.GetText <> "Q " then Warnlog "Level 2: Seperator before is wrong"
+ if Dahinter.GetText <> " Q" then Warnlog "Level 2: Seperator after is wrong"
+
+ Ebene.Select 3
+ if Absatzvorlage.GetSelText <> VorlagenLst(3) then Warnlog "Level 3: Paragraph Style" + VorlagenLst(3) + " but " + Absatzvorlage.GetSelText
+ if Nummer.GetSelIndex <> 3 then Warnlog "Level 3: wrong Character Style"
+ if Vollstaendig.GetText <> "3" then Warnlog "Level 3: 'Show Sublevels' is not 3 but " + Vollstaendig.GetText
+ if Davor.GetText <> "A " then Warnlog "Level 3: Seperator before is wrong"
+ if Dahinter.GetText <> " s" then Warnlog "Level 3: Seperator after is wrong"
+
+ Ebene.Select 4
+ if Absatzvorlage.GetSelText <> VorlagenLst(4) then Warnlog "Level 4: Paragraph Style" + VorlagenLst(4) + " but " + Absatzvorlage.GetSelText
+ if Nummer.GetSelIndex <> 4 then Warnlog "Level 4: wrong Character Style"
+ if Vollstaendig.GetText <> "1" then Warnlog "Level 4: 'Show Sublevels' is not 1 but " + Vollstaendig.GetText
+ if Davor.GetText <> "Ups " then Warnlog "Level 4: Seperator before is wrong"
+ if Dahinter.GetText <> " spU" then Warnlog "Level 4: Seperator after is wrong"
+
+ Ebene.Select 5
+ if Absatzvorlage.GetSelText <> VorlagenLst(5) then Warnlog "Level 5: Paragraph Style" + VorlagenLst(5) + " but " + Absatzvorlage.GetSelText
+ if Nummer.GetSelIndex <> 5 then Warnlog "Level 5: wrong Character Style"
+ if Vollstaendig.GetText <> "1" then Warnlog "Level 5: 'Show Sublevels' is not 1 but " + Vollstaendig.GetText
+ if Davor.GetText <> "*. " then Warnlog "Level 5: Seperator before is wrong"
+ if Dahinter.GetText <> " @�" then Warnlog "Level 5: Seperator after is wrong"
+
+ Ebene.Select 6
+ if Absatzvorlage.GetSelText <> VorlagenLst(6) then Warnlog "Level 6: Paragraph Style" + VorlagenLst(6) + " but " + Absatzvorlage.GetSelText
+ if Nummer.GetSelIndex <> 6 then Warnlog "Level 6: wrong Character Style"
+ if Vollstaendig.GetText <> "5" then Warnlog "Level 6: 'Show Sublevels' is not 5 but " + Vollstaendig.GetText
+ if Davor.GetText <> " " then Warnlog "Level 6: Seperator before is wrong"
+
+ Ebene.Select 7
+ if Absatzvorlage.GetSelText <> VorlagenLst(7) then Warnlog "Level 7: Paragraph Style" + VorlagenLst(7) + " but " + Absatzvorlage.GetSelText
+ if Nummer.GetSelIndex <> 5 then Warnlog "Level 7: wrong Character Style"
+ if Vollstaendig.GetText <> "7" then Warnlog "Level 7: 'Show Sublevels' is not 7 but " + Vollstaendig.GetText
+
+ Ebene.Select 8
+ if Absatzvorlage.GetSelText <> VorlagenLst(8) then Warnlog "Level 8: Paragraph Style" + VorlagenLst(8) + " but " + Absatzvorlage.GetSelText
+ if Nummer.GetSelIndex <> 4 then Warnlog "Level 8: wrong Character Style"
+ if Vollstaendig.GetText <> "8" then Warnlog "Level 8: 'Show Sublevels' is not 8 but " + Vollstaendig.GetText
+
+ Ebene.Select 9
+ if Absatzvorlage.GetSelText <> VorlagenLst(9) then Warnlog "Level 9: Paragraph Style not " + VorlagenLst(9) + " but " + Absatzvorlage.GetSelText
+ if Nummer.GetSelIndex <> 3 then Warnlog "Level 9: wrong Character Style"
+ if Vollstaendig.GetText <> "9" then Warnlog "Level 9: 'Show Sublevels' is not 9 but " + Vollstaendig.GetText
+ if Dahinter.GetText <> "Hallo dies ist ein langer Text" then Warnlog "Level 9: Seperator after is wrong"
+
+ Ebene.Select 10
+ if Absatzvorlage.GetSelText <> VorlagenLst(10) then
+ QAErrorlog "#125998#Level 10: Paragraph Style not " + VorlagenLst(10) + " but " + Absatzvorlage.GetSelText
+ end if
+ if Nummer.GetSelIndex <> 3 then Warnlog "Level 10: wrong Character Style"
+ if Vollstaendig.GetText <> "9" then Warnlog "Level 10: 'Show Sublevels' is not 9 but " + Vollstaendig.GetText
+ if Davor.GetText <> "Hallo dies ist ein langer Text" then Warnlog "Level 10: Seperator before is wrong"
+ TabKapitelnumerierung.Ok
+
+ for i = 1 to 2
+ Select Case i
+ Case 1
+ printlog "- Save as sxw"
+ Call hFileSaveAsKill ( gOfficePath + "user\work\tToolsOutlineNumbering1.sxw" )
+ Case 2
+ printlog "- Save as odt"
+ Call hFileSaveAsWithFilterKill ( gOfficePath + "user\work\tToolsOutlineNumbering1.odt", "writer8")
+ end select
+ next i
+ Call hCloseDocument
+
+ for i = 1 to 2
+ Select Case i
+ Case 1
+ printlog "- Load sxw and check formattings"
+ Call hFileOpen ( gOfficePath + "user\work\tToolsOutlineNumbering1.sxw" )
+ Case 2
+ printlog "- Load odt and check formattings"
+ Call hFileOpen ( gOfficePath + "user\work\tToolsOutlineNumbering1.odt" )
+ end select
+ call wTypeKeys "<PageUp>", 8
+ call wTypeKeys "<Up>", 10
+
+ for Zaehler = 1 to 10
+ call wTypeKeys "<Shift End>"
+ if wStyleGet(VorlagenLst(Zaehler)) = false then Warnlog "Wrong Style for Outline Numbering " + Zaehler
+ call wTypeKeys "<Down>", 8
+ call wTypeKeys "<Home>"
+ next Zaehler
+
+ printlog " - check saved properties"
+ ToolsOutlineNumbering
+ Kontext
+ Active.SetPage TabKapitelnumerierung
+ Kontext "TabKapitelnumerierung"
+ Ebene.Select 1
+ if Absatzvorlage.GetSelText <> VorlagenLst(1) then Warnlog " - Level 1: wrong Paragraph Style"
+ if Nummer.GetSelIndex <> 1 then Warnlog " - Level 1: wrong Character Style -> " + Nummer.GetSeltext + "instead of 1 !"
+ if BeginBei.GetText <> "7" then Warnlog " - 7 is not selected at 'Start at' but " + BeginBei.Gettext
+ if Davor.GetText <> "Ha " then Warnlog " - Level 1: Seperator before not 'Ha ' but " + Davor.Gettext
+ if Dahinter.GetText <> " aH" then Warnlog " - Level 1: Seperator after not ' aH' but " + Dahinter.Gettext
+
+ Ebene.Select 2
+ if Absatzvorlage.GetSelText <> VorlagenLst(2) then Warnlog " - Level 2: Paragraph Style not " + VorlagenLst(2) + " but " + Absatzvorlage.GetSelText
+ if Nummer.GetSelIndex <> 2 then Warnlog " - Level 2: wrong Character Style"
+ if Vollstaendig.GetText <> "1" then Warnlog " - Level 2: 'Show Sublevels' is not 1 but " + Vollstaendig.GetText
+ if Davor.GetText <> "Q " then Warnlog " - Level 2: Seperator before is wrong"
+ if Dahinter.GetText <> " Q" then Warnlog " - Level 2: Seperator after is wrong"
+
+ Ebene.Select 3
+ if Absatzvorlage.GetSelText <> VorlagenLst(3) then
+ QAErrorlog " - #125998#Level 3: Paragraph Style not " + VorlagenLst(3) + " but " + Absatzvorlage.GetSelText
+ end if
+ if Nummer.GetSelIndex <> 3 then Warnlog " - Level 3: wrong Character Style"
+ if Vollstaendig.GetText <> "3" then Warnlog " - Level 3: 'Show Sublevels' is not 3 but " + Vollstaendig.GetText
+ if Davor.GetText <> "A " then Warnlog " - Level 3: Seperator before is wrong"
+ if Dahinter.GetText <> " s" then Warnlog " - Level 3: Seperator after is wrong"
+
+ Ebene.Select 4
+ if Absatzvorlage.GetSelText <> VorlagenLst(4) then Warnlog " - Level 4: Paragraph Style not " + VorlagenLst(4) + " but " + Absatzvorlage.GetSelText
+ if Nummer.GetSelIndex <> 4 then Warnlog " - Level 4: wrong Character Style"
+ if Vollstaendig.GetText <> "1" then Warnlog " - Level 4: 'Show Sublevels' is not 1 but " + Vollstaendig.GetText
+ if Davor.GetText <> "Ups " then Warnlog " - Level 4: Seperator before is wrong"
+ if Dahinter.GetText <> " spU" then Warnlog " - Level 4: Seperator after is wrong"
+
+ Ebene.Select 5
+ if Absatzvorlage.GetSelText <> VorlagenLst(5) then Warnlog " - Level 5: Paragraph Style not " + VorlagenLst(5) + " but " + Absatzvorlage.GetSelText
+ if Nummer.GetSelIndex <> 5 then Warnlog " - Level 5: wrong Character Style"
+ if Vollstaendig.GetText <> "1" then Warnlog " - Level 5: 'Show Sublevels' is not 1 but " + Vollstaendig.GetText
+ if Davor.GetText <> "*. " then Warnlog " - Level 5: Seperator before is wrong"
+ if Dahinter.GetText <> " @�" then Warnlog " - Level 5: Seperator after is wrong"
+
+ Ebene.Select 6
+ if Absatzvorlage.GetSelText <> VorlagenLst(6) then Warnlog " - Level 6: Paragraph Style not " + VorlagenLst(6) + " but " + Absatzvorlage.GetSelText
+ if Nummer.GetSelIndex <> 6 then Warnlog " - Level 6: wrong Character Style"
+ if Vollstaendig.GetText <> "5" then Warnlog " - Level 6: 'Show Sublevels' is not 5 but " + Vollstaendig.GetText
+ if Davor.GetText <> " " then Warnlog " - Level 6: Seperator before is wrong"
+
+ Ebene.Select 7
+ if Absatzvorlage.GetSelText <> VorlagenLst(7) then Warnlog " - Level 7: Paragraph Style not " + VorlagenLst(7) + " but " + Absatzvorlage.GetSelText
+ if Nummer.GetSelIndex <> 5 then Warnlog " - Level 7: wrong Character Style"
+ if Vollstaendig.GetText <> "7" then Warnlog " - Level 7: 'Show Sublevels' is not 7 but " + Vollstaendig.GetText
+
+ Ebene.Select 8
+ if Absatzvorlage.GetSelText <> VorlagenLst(8) then Warnlog " - Level 8: Paragraph Style not " + VorlagenLst(8) + " but " + Absatzvorlage.GetSelText
+ if Nummer.GetSelIndex <> 4 then Warnlog " - Level 8: wrong Character Style"
+ if Vollstaendig.GetText <> "8" then Warnlog " - Level 8: 'Show Sublevels' is not 8 but " + Vollstaendig.GetText
+
+ Ebene.Select 9
+ if Absatzvorlage.GetSelText <> VorlagenLst(9) then Warnlog " - Level 9: Paragraph Style not " + VorlagenLst(9) + " but " + Absatzvorlage.GetSelText
+ if Nummer.GetSelIndex <> 3 then Warnlog " - Level 9: wrong Character Style"
+ if Vollstaendig.GetText <> "9" then Warnlog " - Level 9: 'Show Sublevels' is not 9 but " + Vollstaendig.GetText
+ if Dahinter.GetText <> "Hallo dies ist ein langer Text" then Warnlog " - Level 9: Seperator after is wrong"
+
+ Ebene.Select 10
+ if Absatzvorlage.GetSelText <> VorlagenLst(10) then
+ QAErrorlog " - #125998#Level 10: Paragraph Style not " + VorlagenLst(10) + " but " + Absatzvorlage.GetSelText
+ end if
+ if Nummer.GetSelIndex <> 3 then Warnlog " - Level 10: wrong Character Style"
+ if Vollstaendig.GetText <> "9" then Warnlog " - Level 10: 'Show Sublevels' is not 9 but " + Vollstaendig.GetText
+ if Davor.GetText <> "Hallo dies ist ein langer Text" then Warnlog " - Level 10: Seperator before is wrong"
+ TabKapitelnumerierung.Cancel
+
+ Call hCloseDocument
+ next i
+
+endcase
+
+'--------------------------------------------------
+
+testcase tToolsOutlineNumbering2
+ Dim i as Integer
+ Dim VorlagenLst (11) as String
+ Dim V1 : Dim V2 : Dim V3 : Dim V4 : Dim V5 : Dim V6 : Dim V7 : Dim V8 : Dim V9 : Dim V10
+ Dim V11 : Dim V12 : Dim V13 : Dim V14 : Dim V15 : Dim V16
+
+ PrintLog "- Tools / Outline Numbering: Part 2 - Tabpage Position"
+
+ Call hFileOpen ( gTesttoolPath + "writer\optional\input\number\numbering1.sxw" )
+ Call sMakeReadOnlyDocumentEditable
+
+ ToolsOutlineNumbering
+ Kontext
+ Active.SetPage TabKapitelnumerierung
+ Kontext "TabKapitelnumerierung"
+ for i=1 to 10
+ if iSprache = 01 then
+ VorlagenLst (i) = Absatzvorlage.GetItemText ( i+1 )
+ else
+ VorlagenLst (i) = Absatzvorlage.GetItemText ( i+2 )
+ end if
+ next i
+ Kontext
+ Active.SetPage TabPositionKapitelnumerierung
+ Kontext "TabPositionKapitelnumerierung"
+
+ Level.Select 1
+ NumberAlignment.Select 2
+ if relativ.IsEnabled then Warnlog "'Relative' is enabled when selecting 'Level 1' -> Bug"
+ IndentAt.More 5
+ V1 = IndentAt.GetText
+ AlignedAt.More 1
+ V2 = AlignedAt.GetText
+
+ Level.Select 3
+ NumberAlignment.Select 3
+ Relativ.Check
+ IndentAt.Less 5
+ V3 = IndentAt.GetText
+ AbstandTextNumerierung.More 2
+ V4 = AbstandTextNumerierung.GetText
+
+ Level.Select 4
+ NumberAlignment.Select 1
+ Relativ.Check
+ V5 = IndentAt.GetText
+ V6 = AbstandTextNumerierung.GetText
+ V7 = AlignedAt.GetText
+
+ Level.Select 6
+ NumberAlignment.Select 3
+ Relativ.Check
+ IndentAt.More 4
+ V8 = IndentAt.GetText
+ AbstandTextNumerierung.Less 3
+ V9 = AbstandTextNumerierung.GetText
+ AlignedAt.Less 3
+ V10 = AlignedAt.GetText
+
+ Level.Select 9
+ NumberAlignment.Select 1
+ Relativ.Check
+ IndentAt.Less 2
+ V11 = IndentAt.GetText
+ AbstandTextNumerierung.More 2
+ V12 = AbstandTextNumerierung.GetText
+ AlignedAt.More 3
+ V13 = AlignedAt.GetText
+
+ Level.Select 10
+ NumberAlignment.Select 3
+ Relativ.Check
+ IndentAt.More 4
+ V14 = IndentAt.GetText
+ AbstandTextNumerierung.Less 3
+ V15 = AbstandTextNumerierung.GetText
+ AlignedAt.Less 3
+ V16 = AlignedAt.GetText
+ TabPositionKapitelnumerierung.OK
+
+ printlog " - create Numbering"
+ for i = 1 to 10
+ call wTypeKeys "<Shift End>"
+ if wStyleSet ( VorlagenLst(i) ) = false then
+ Warnlog "- Style '" & VorlagenLst(i) & "' could not be set!"
+ end if
+ call wTypeKeys "<Down>", 8
+ call wTypeKeys "<Home>"
+ next i
+
+ printlog " - check Numbering-Position"
+ ToolsOutlineNumbering
+ Kontext
+ Active.SetPage TabPositionKapitelnumerierung
+ Kontext "TabPositionKapitelnumerierung"
+ Level.Select 1
+ if NumberAlignment.GetSelIndex <> 2 then Warnlog "Level 1: Wrong Numbering Alignment: Not = 2 But = "+ NumberAlignment.GetSelIndex
+ if V1 <> IndentAt.GetText then Warnlog "Level 1: Wrong Indent: Not = "+ V1+ " But = "+ IndentAt.GetText
+ if V2 <> AlignedAt.GetText then Warnlog "Level 1: Space to Text Not = "+ V2+ " But = "+ AlignedAt.GetText
+ Level.Select 3
+ if NumberAlignment.GetSelIndex <> 3 then Warnlog "Level 3: Wrong Numbering Alignment: Not = 3 But = "+ NumberAlignment.GetSelIndex
+ if V3 <> IndentAt.GetText then Warnlog "Level 3: Wrong Indent: Not = "+ V3+ " But = "+ IndentAt.GetText
+ if V4 <> AbstandTextNumerierung.GetText then Warnlog "Level 3: Minimum Space numbering <> Text Not = "+ V4+ " But = "+ AbstandTextNumerierung.GetText
+ Level.Select 4
+ if NumberAlignment.GetSelIndex <> 1 then Warnlog "Level 4: Wrong Numbering Alignment: Not = 1 But = "+ NumberAlignment.GetSelIndex
+ if V5 <> IndentAt.GetText then Warnlog "Level 4: Wrong Indent: Not = "+ V5+ " But = "+ IndentAt.GetText
+ if V6 <> AbstandTextNumerierung.GetText then Warnlog "Level 4: Minimum Space numbering <> Text Not = "+ V6+ " But = "+ AbstandTextNumerierung.GetText
+ if V7 <> AlignedAt.GetText then Warnlog "Level 4: Space to Text Not = "+ V7+ " But = "+ AlignedAt.GetText
+ Level.Select 6
+ if NumberAlignment.GetSelIndex <> 3 then Warnlog "Level 6: Wrong Numbering Alignment: Not = 3 But = "+ NumberAlignment.GetSelIndex
+ if V8 <> IndentAt.GetText then Warnlog "Level 6: Wrong Indent: Not = "+ V8+ " But = "+ IndentAt.GetText
+ if V9 <> AbstandTextNumerierung.GetText then Warnlog "Level 6: Minimum Space numbering <> Text Not = "+ V9+ " But = "+ AbstandTextNumerierung.GetText
+ if V10 <> AlignedAt.GetText then Warnlog "Level 6: Space to Text Not = "+ V10+ " But = "+ AlignedAt.GetText
+ Level.Select 9
+ if NumberAlignment.GetSelIndex <> 1 then Warnlog "Level 9: Wrong Numbering Alignment: Not = 1 But = "+ NumberAlignment.GetSelIndex
+ if V11 <> IndentAt.GetText then Warnlog "Level 9: Wrong Indent: Not = "+ V11+ " But = "+ IndentAt.GetText
+ if V12 <> AbstandTextNumerierung.GetText then Warnlog "Level 9: Minimum Space numbering <> Text Not = "+ V12+ " But = "+ AbstandTextNumerierung.GetText
+ if V13 <> AlignedAt.GetText then Warnlog "Level 9: Space to Text Not = "+ V13+ " But = "+ AlignedAt.GetText
+ Level.Select 10
+ if NumberAlignment.GetSelIndex <> 3 then Warnlog "Level 10: Wrong Numbering Alignment: Not = 3 But = "+ NumberAlignment.GetSelIndex
+ if V14 <> IndentAt.GetText then Warnlog "Level 10: Wrong Indent: Not = "+ V14+ " But = "+ IndentAt.GetText
+ if V15 <> AbstandTextNumerierung.GetText then Warnlog "Level 10: Minimum Space numbering <> Text Not = "+ V15+ " But = "+ AbstandTextNumerierung.GetText
+ if V16 <> AlignedAt.GetText then Warnlog "Level 10: Space to Text Not = "+ V16+ " But = "+ AlignedAt.GetText
+ TabPositionKapitelnumerierung.Cancel
+
+ printlog " - check saved Numbering"
+ Call hFileSaveAsWithFilterKill ( gOfficePath + "user\work\tToolsOutlineNumbering2.odt", "writer8" )
+ Call hCloseDocument
+ Call hFileOpen ( gOfficePath + "user\work\tToolsOutlineNumbering2.odt" )
+
+ ToolsOutlineNumbering
+ Kontext
+ Active.SetPage TabPositionKapitelnumerierung
+ Kontext "TabPositionKapitelnumerierung"
+ Level.Select 1
+ if NumberAlignment.GetSelIndex <> 2 then Warnlog "Level 1: Wrong Numbering Alignment: Not = 2 But = "+ NumberAlignment.GetSelIndex
+ if V1 <> IndentAt.GetText then Warnlog "Level 1: Wrong Indent: Not = "+ V1+ " But = "+ IndentAt.GetText
+ if V2 <> AlignedAt.GetText then Warnlog "Level 1: Space to Text Not = "+ V2+ " But = "+ AlignedAt.GetText
+ Level.Select 3
+ if NumberAlignment.GetSelIndex <> 3 then Warnlog "Level 3: Wrong Numbering Alignment: Not = 3 But = "+ NumberAlignment.GetSelIndex
+ if V3 <> IndentAt.GetText then Warnlog "Level 3: Wrong Indent: Not = "+ V3+ " But = "+ IndentAt.GetText
+ if V4 <> AbstandTextNumerierung.GetText then Warnlog "Level 3: Minimum Space numbering <> Text Not = "+ V4+ " But = "+ AbstandTextNumerierung.GetText
+ Level.Select 4
+ if NumberAlignment.GetSelIndex <> 1 then Warnlog "Level 4: Wrong Numbering Alignment: Not = 1 But = "+ NumberAlignment.GetSelIndex
+ if V5 <> IndentAt.GetText then Warnlog "Level 4: Wrong Indent: Not = "+ V5+ " But = "+ IndentAt.GetText
+ if V6 <> AbstandTextNumerierung.GetText then Warnlog "Level 4: Minimum Space numbering <> Text Not = "+ V6+ " But = "+ AbstandTextNumerierung.GetText
+ if V7 <> AlignedAt.GetText then Warnlog "Level 4: Space to Text Not = "+ V7+ " But = "+ AlignedAt.GetText
+ Level.Select 6
+ if NumberAlignment.GetSelIndex <> 3 then Warnlog "Level 6: Wrong Numbering Alignment: Not = 3 But = "+ NumberAlignment.GetSelIndex
+ if V8 <> IndentAt.GetText then Warnlog "Level 6: Wrong Indent: Not = "+ V8+ " But = "+ IndentAt.GetText
+ if V9 <> AbstandTextNumerierung.GetText then Warnlog "Level 6: Minimum Space numbering <> Text Not = "+ V9+ " But = "+ AbstandTextNumerierung.GetText
+ if V10 <> AlignedAt.GetText then Warnlog "Level 6: Space to Text Not = "+ V10+ " But = "+ AlignedAt.GetText
+ Level.Select 9
+ if NumberAlignment.GetSelIndex <> 1 then Warnlog "Level 9: Wrong Numbering Alignment: Not = 1 But = "+ NumberAlignment.GetSelIndex
+ if V11 <> IndentAt.GetText then Warnlog "Level 9: Wrong Indent: Not = "+ V11+ " But = "+ IndentAt.GetText
+ if V12 <> AbstandTextNumerierung.GetText then Warnlog "Level 9: Minimum Space numbering <> Text Not = "+ V12+ " But = "+ AbstandTextNumerierung.GetText
+ if V13 <> AlignedAt.GetText then Warnlog "Level 9: Space to Text Not = "+ V13+ " But = "+ AlignedAt.GetText
+ Level.Select 10
+ if NumberAlignment.GetSelIndex <> 3 then Warnlog "Level 10: Wrong Numbering Alignment: Not = 3 But = "+ NumberAlignment.GetSelIndex
+ if V14 <> IndentAt.GetText then Warnlog "Level 10: Wrong Indent: Not = "+ V14+ " But = "+ IndentAt.GetText
+ if V15 <> AbstandTextNumerierung.GetText then Warnlog "Level 10: Minimum Space numbering <> Text Not = "+ V15+ " But = "+ AbstandTextNumerierung.GetText
+ if V16 <> AlignedAt.GetText then Warnlog "Level 10: Space to Text Not = "+ V16+ " But = "+ AlignedAt.GetText
+ TabPositionKapitelnumerierung.Cancel
+
+ Call hCloseDocument
+endcase
+
+' *******************************************************************
+
+testcase tToolsOutlineNumbering3
+ Dim V1 : Dim V2 : Dim V3 : Dim V4 : Dim V5 : Dim V6 : Dim V7 : Dim V8 : Dim V9 : Dim V10
+
+ PrintLog "- Tools / Outline Numbering: Part 3 - Total"
+
+ Call hNewDocument
+ ToolsOutlineNumbering
+ Kontext
+ Active.SetPage TabKapitelnumerierung
+ Kontext "TabKapitelnumerierung"
+
+ PrintLog " - Same Formatting from 1-10"
+ Ebene.Select 11
+ if Absatzvorlage.IsEnabled then Warnlog "Able to adjust Paragraph Style for all Levels -> Bug"
+ Nummer.Select 4
+ Davor.SetText "HoHo "
+ Dahinter.SetText " HiHi "
+ BeginBei.SetText "4"
+
+ Ebene.Select 1
+ Nummer.Select 3
+ Davor.SetText "Anders 1 "
+ Dahinter.SetText " 1 Anders"
+ BeginBei.SetText "1"
+
+ Ebene.Select 5
+ Nummer.Select 2
+ Davor.SetText "Anders 5 "
+ Dahinter.SetText " 5 Anders"
+ BeginBei.SetText "2"
+
+ Kontext
+ Active.SetPage TabPositionKapitelnumerierung
+ Kontext "TabPositionKapitelnumerierung"
+
+ Level.Select 1
+ NumberingAlignment.Select 2
+ if relativ.IsEnabled then Warnlog "Relative is enabled when selecting Level 1 -> Bug!"
+ AlignedAt2.More 5
+ V1 = AlignedAt2.GetText
+ IndentAt2.More 1
+ V2 = IndentAt2.GetText
+
+ Level.Select 3
+ NumberingAlignment.Select 3
+ AlignedAt2.More 5
+ V3 = AlignedAt2.GetText
+ AbstandTextNumerierung2.More 2
+ V4 = AbstandTextNumerierung2.GetText
+
+ Level.Select 7
+ NumberingAlignment.Select 1
+ IndentAt2.More 4
+ Sleep 1
+ V5 = AlignedAt2.GetText
+ V6 = AbstandTextNumerierung2.GetText
+ V7 = IndentAt2.GetText
+
+ Level.Select 8
+ NumberingAlignment.Select 3
+ AlignedAt2.More 1
+ AbstandTextNumerierung2.Less 4
+ IndentAt2.More 4
+ V8 = AlignedAt2.GetText
+ V9 = AbstandTextNumerierung2.GetText
+ V10 = IndentAt2.GetText
+
+ TabPositionKapitelnumerierung.OK
+ Sleep 1
+
+ PrintLog " - check the Levels"
+ ToolsOutlineNumbering
+ Kontext
+ Active.SetPage TabKapitelnumerierung
+ Kontext "TabKapitelnumerierung"
+ printlog " - Tabpage Numbering"
+ Ebene.Select 1
+ if Nummer.GetSelIndex <> 3 then Warnlog "Level 1: Wrong number selected, not 3 but " + Nummer.GetSelIndex
+ if Davor.GetText <> "Anders 1 " then Warnlog "Level 1:Seperator before is wrong.. Not 'Anders 1 ' But " + Davor.GetText
+ if Dahinter.GetText <> " 1 Anders" then Warnlog "Level 1: Seperator after text is wrong. Not ' Anders 1' But " + Dahinter.GetText
+ if BeginBei.GetText <> "1" then Warnlog "Level 1: Start at is not 1 but " + BeginnBei.GetText
+
+ Ebene.Select 2
+ if Nummer.GetSelIndex <> 4 then Warnlog "Level 2: Wrong number selected, not 4 but " + Nummer.GetSelIndex
+ if Davor.GetText <> "HoHo " then Warnlog "Level 2:Seperator before is wrong.. Not 'Hoho ' But " + Davor.GetText
+ if Dahinter.GetText <> " HiHi " then Warnlog "Level 2: Seperator after text is wrong. Not ' HiHi ' But " + Dahinter.GetText
+ if BeginBei.GetText <> "4" then Warnlog "Level 2: Start at is not 4 but " + BeginnBei.GetText
+
+ Ebene.Select 5
+ if Nummer.GetSelIndex <> 2 then Warnlog "Level 5: Wrong number selected, not 2 but " + Nummer.GetSelIndex
+ if Davor.GetText <> "Anders 5 " then Warnlog "Level 5:Seperator before is wrong.. Not 'Anders 5 ' But " + Davor.GetText
+ if Dahinter.GetText <> " 5 Anders" then Warnlog "Level 5: Seperator after text is wrong. Not ' 5 Anders' But " + Dahinter.GetText
+ if BeginBei.GetText <> "2" then Warnlog "Level 1: Start at is not 1 but " + BeginnBei.GetText
+
+ Ebene.Select 7
+ if Nummer.GetSelIndex <> 4 then Warnlog "Level 7: Wrong number selected, not 4 but " + Nummer.GetSelIndex
+ if Davor.GetText <> "HoHo " then Warnlog "Level 7:Seperator before is wrong.. Not 'Hoho ' But " + Davor.GetText
+ if Dahinter.GetText <> " HiHi " then Warnlog "Level 7: Seperator after text is wrong. Not ' HiHi ' But " + Dahinter.GetText
+ if BeginBei.GetText <> "4" then Warnlog "Level 7: Start at is not 4 but " + BeginnBei.GetText
+
+ Ebene.Select 11
+ if Nummer.GetSelIndex <> 0 then Warnlog "Level 1-10: Setting for 'Number' is not 'keine Selektion' but " + Nummer.GetSelIndex
+ if Davor.GetText <> "" then Warnlog "Level 1-10: Seperator before is not 'keine Selektion' but " + Davor.GetText
+ if Dahinter.GetText <> "" then Warnlog "Level 1-10: Seperator after is not 'keine Selektion' but " + Dahinter.GetText
+ if BeginBei.GetText <> "" then Warnlog "Level 1-10: Start at is not 'keine Selektion' but " + BeginBei.GetText
+
+ Kontext
+ Active.SetPage TabPositionKapitelnumerierung
+ Kontext "TabPositionKapitelnumerierung"
+ printlog " - Tabpage Position"
+ Level.Select 1
+ if NumberingAlignment.GetSelIndex <> 2 then Warnlog "Level 1: Wrong Numbering Alignment: Not = 2 But = "+ NumberingAlignment.GetSelIndex
+ if V1 <> AlignedAt2.GetText then Warnlog "Level 1: Wrong Indent: Not = "+ V1+ " But = "+ AlignedAt2.GetText
+ if V2 <> IndentAt2.GetText then Warnlog "Level 1: Space to Text Not = "+ V2+ " But = "+ IndentAt2.GetText
+ Level.Select 3
+ if NumberingAlignment.GetSelIndex <> 3 then Warnlog "Level 3: Wrong Numbering Alignment: Not = 3 But = "+ NumberingAlignment.GetSelIndex
+ if V3 <> AlignedAt2.GetText then Warnlog "Level 3: Wrong Indent: Not = "+ V3+ " But = "+ AlignedAt2.GetText
+ if V4 <> AbstandTextNumerierung2.GetText then Warnlog "Level 3: Space to Text Not = "+ V4+ " But = "+ AbstandTextNumerierung2.GetText
+ Level.Select 7
+ if NumberingAlignment.GetSelIndex <> 1 then Warnlog "Level 7: Wrong Numbering Alignment: Not = 1 But = "+ NumberingAlignment.GetSelIndex
+ if V5 <> AlignedAt2.GetText then Warnlog "Level 7: Wrong Indent: Not = "+ V5+ " But = "+ AlignedAt2.GetText
+ if V6 <> AbstandTextNumerierung2.GetText then Warnlog "Level 7: Space to Text Not = "+ V6+ " But = "+ AbstandTextNumerierung2.GetText
+ if V7 <> IndentAt2.GetText then Warnlog "Level 7: Space to Text Not = "+ V7+ " But = "+ IndentAt2.GetText
+ Level.Select 8
+ if NumberingAlignment.GetSelIndex <> 3 then Warnlog "Level 8: Wrong Numbering Alignment: Not = 3 But = "+ NumberingAlignment.GetSelIndex
+ if V8 <> AlignedAt2.GetText then Warnlog "Level 8: Wrong Indent: Not = "+ V8+ " But = "+ AlignedAt2.GetText
+ if V9 <> AbstandTextNumerierung2.GetText then Warnlog "Level 8: Space to Text Not = "+ V9+ " But = "+ AbstandTextNumerierung2.GetText
+ if V10 <> IndentAt2.GetText then Warnlog "Level 8: Space to Text Not = "+ V10+ " But = "+ IndentAt2.GetText
+
+ TabPositionKapitelnumerierung.Cancel
+
+ printlog " - check saved Numbering"
+ Call hFileSaveAsWithFilterKill ( gOfficePath + "user\work\tToolsOutlineNumbering3.odt", "writer8" )
+ Call hCloseDocument
+ Call hFileOpen ( gOfficePath + "user\work\tToolsOutlineNumbering3.odt" )
+ ToolsOutlineNumbering
+ Kontext
+ Active.SetPage TabKapitelnumerierung
+ Kontext "TabKapitelnumerierung"
+ printlog " - Tabpage Numbering"
+ Ebene.Select 1
+ if Nummer.GetSelIndex <> 3 then Warnlog "Level 1: Wrong number selected, not 3 but " + Nummer.GetSelIndex
+ if Davor.GetText <> "Anders 1 " then Warnlog "Level 1:Seperator before is wrong.. Not 'Anders 1 ' But " + Davor.GetText
+ if Dahinter.GetText <> " 1 Anders" then Warnlog "Level 1: Seperator after text is wrong. Not ' Anders 1' But " + Dahinter.GetText
+ if BeginBei.GetText <> "1" then Warnlog "Level 1: Start at is not 1 but " + BeginnBei.GetText
+
+ Ebene.Select 2
+ if Nummer.GetSelIndex <> 4 then Warnlog "Level 2: Wrong number selected, not 4 but " + Nummer.GetSelIndex
+ if Davor.GetText <> "HoHo " then Warnlog "Level 2:Seperator before is wrong.. Not 'Hoho ' But " + Davor.GetText
+ if Dahinter.GetText <> " HiHi " then Warnlog "Level 2: Seperator after text is wrong. Not ' HiHi ' But " + Dahinter.GetText
+ if BeginBei.GetText <> "4" then Warnlog "Level 2: Start at is not 4 but " + BeginnBei.GetText
+
+ Ebene.Select 5
+ if Nummer.GetSelIndex <> 2 then Warnlog "Level 5: Wrong number selected, not 2 but " + Nummer.GetSelIndex
+ if Davor.GetText <> "Anders 5 " then Warnlog "Level 5:Seperator before is wrong.. Not 'Anders 5 ' But " + Davor.GetText
+ if Dahinter.GetText <> " 5 Anders" then Warnlog "Level 5: Seperator after text is wrong. Not ' 5 Anders' But " + Dahinter.GetText
+ if BeginBei.GetText <> "2" then Warnlog "Level 1: Start at is not 1 but " + BeginnBei.GetText
+
+ Ebene.Select 7
+ if Nummer.GetSelIndex <> 4 then Warnlog "Level 7: Wrong number selected, not 4 but " + Nummer.GetSelIndex
+ if Davor.GetText <> "HoHo " then Warnlog "Level 7:Seperator before is wrong.. Not 'Hoho ' But " + Davor.GetText
+ if Dahinter.GetText <> " HiHi " then Warnlog "Level 7: Seperator after text is wrong. Not ' HiHi ' But " + Dahinter.GetText
+ if BeginBei.GetText <> "4" then Warnlog "Level 7: Start at is not 4 but " + BeginnBei.GetText
+
+ Ebene.Select 11
+ if Nummer.GetSelIndex <> 0 then Warnlog "Level 1-10: Setting for 'Number' is not 'keine Selektion' but " + Nummer.GetSelIndex
+ if Davor.GetText <> "" then Warnlog "Level 1-10: Seperator before is not 'keine Selektion' but " + Davor.GetText
+ if Dahinter.GetText <> "" then Warnlog "Level 1-10: Seperator after is not 'keine Selektion' but " + Dahinter.GetText
+ if BeginBei.GetText <> "" then Warnlog "Level 1-10: Start at is not 'keine Selektion' but " + BeginBei.GetText
+
+ Kontext
+ Active.SetPage TabPositionKapitelnumerierung
+ Kontext "TabPositionKapitelnumerierung"
+ printlog " - Tabpage Position"
+ Level.Select 1
+ if NumberingAlignment.GetSelIndex <> 2 then Warnlog "Level 1: Wrong Numbering Alignment: Not = 2 But = "+ NumberingAlignment.GetSelIndex
+ if V1 <> AlignedAt2.GetText then Warnlog "Level 1: Wrong Indent: Not = "+ V1+ " But = "+ AlignedAt2.GetText
+ if V2 <> IndentAt2.GetText then Warnlog "Level 1: Space to Text Not = "+ V2+ " But = "+ IndentAt2.GetText
+ Level.Select 3
+ if NumberingAlignment.GetSelIndex <> 3 then Warnlog "Level 3: Wrong Numbering Alignment: Not = 3 But = "+ NumberingAlignment.GetSelIndex
+ if V3 <> AlignedAt2.GetText then Warnlog "Level 3: Wrong Indent: Not = "+ V3+ " But = "+ AlignedAt2.GetText
+ if V4 <> AbstandTextNumerierung2.GetText then Warnlog "Level 3: Space to Text Not = "+ V4+ " But = "+ AbstandTextNumerierung2.GetText
+ Level.Select 7
+ if NumberingAlignment.GetSelIndex <> 1 then Warnlog "Level 7: Wrong Numbering Alignment: Not = 1 But = "+ NumberingAlignment.GetSelIndex
+ if V5 <> AlignedAt2.GetText then Warnlog "Level 7: Wrong Indent: Not = "+ V5+ " But = "+ AlignedAt2.GetText
+ if V6 <> AbstandTextNumerierung2.GetText then Warnlog "Level 7: Space to Text Not = "+ V6+ " But = "+ AbstandTextNumerierung2.GetText
+ if V7 <> IndentAt2.GetText then Warnlog "Level 7: Space to Text Not = "+ V7+ " But = "+ IndentAt2.GetText
+ Level.Select 8
+ if NumberingAlignment.GetSelIndex <> 3 then Warnlog "Level 8: Wrong Numbering Alignment: Not = 3 But = "+ NumberingAlignment.GetSelIndex
+ if V8 <> AlignedAt2.GetText then Warnlog "Level 8: Wrong Indent: Not = "+ V8+ " But = "+ AlignedAt2.GetText
+ if V9 <> AbstandTextNumerierung2.GetText then Warnlog "Level 8: Space to Text Not = "+ V9+ " But = "+ AbstandTextNumerierung2.GetText
+ if V10 <> IndentAt2.GetText then Warnlog "Level 8: Space to Text Not = "+ V10+ " But = "+ IndentAt2.GetText
+
+ TabPositionKapitelnumerierung.Cancel
+
+ Call hCloseDocument
+endcase
+
+' *******************************************************************
+
+testcase tToolsFootnoteEndnote
+ PrintLog "- Tools / Format Footnote- and Endnote"
+
+ Call hNewDocument
+ ToolsFootnote
+ Printlog " - adjust Footnote-properties"
+ Kontext
+ Active.SetPage TabFussnoten
+ Kontext "TabFussnoten"
+ Numerierung.Select 2
+ Pro.Select 1
+ if BeginnBei.IsEnabled then Warnlog "On Numbering 'per page' 'Start at' is active. Bug!"
+ Pro.Select 2
+ if BeginnBei.IsEnabled then Warnlog "On Numbering 'per Chaper' 'Start at' is active. Bug!"
+ Pro.Select 3
+ BeginnBei.SetText "3"
+ Davor.SetText "Vorher "
+ Dahinter.SetText " Hinterher"
+ Absatz.Select 4
+ ZeichenvorlageTextbereich.Select 1
+ ZeichenvorlageFussnotenbereich.Select 1
+ SeitenEnde.Check
+ FolgeSeite.SetText "Aha"
+ Beginn.SetText "oHo"
+
+ Printlog " - adjust Endnote-properties"
+ Kontext
+ Active.SetPage TabEndnoten
+ Kontext "TabEndnoten"
+ Numerierung.Select 1
+ BeginnBei.SetText "8"
+ Absatz.Select 3
+ Seite.Select 2
+ Davor.SetText "Hihi "
+ Dahinter.SetText " HaHa"
+ ZeichenvorlageTextbereich.Select 4
+ ZeichenvorlageEndnotenbereich.Select 5
+ TabEndnoten.OK
+
+ call wTypeKeys "Footnote bound to this text"
+ InsertFootnote
+ Kontext "FussnoteEinfuegen"
+ Fussnote.Check
+ FussnoteEinfuegen.OK
+
+ call wTypeKeys "Wassup<PageUp><Return>Followed by an endnote."
+ InsertFootnote
+ Kontext "FussnoteEinfuegen"
+ Endnote.Check
+ FussnoteEinfuegen.OK
+
+ call wTypeKeys "Wassup<PageUp><Return>And again a footnote"
+ InsertFootnote
+ Kontext "FussnoteEinfuegen"
+ Fussnote.Check
+ FussnoteEinfuegen.OK
+ InsertFieldsPageNumbers
+ call wTypeKeys "+0"
+ call wTypeKeys "<Shift Home>"
+ Sleep 1
+ try
+ ToolsCalculate
+ catch
+ ' Workaround for bug.
+ call wTypeKeys "<End>"
+ call wTypeKeys "<Shift Home>"
+ try
+ ToolsCalculate
+ Warnlog "Selecting text in footnote with <Shift Home> works only at the second time (bug#101047)"
+ catch
+ Warnlog "Tools/Calculate is disabled!"
+ endcatch
+ endcatch
+ if GetClipboardText <> "1" then Warnlog "2. Footnote has not been inserted on 1. Page."
+
+ call wTypeKeys "<PageUp><Return>Again followed by an endnote"
+ InsertFootnote
+ Kontext "FussnoteEinfuegen"
+ Endnote.Check
+ FussnoteEinfuegen.OK
+ InsertFieldsPageNumbers
+ call wTypeKeys "+0"
+ call wTypeKeys "<Shift Home>"
+ Sleep 1
+ try
+ ToolsCalculate
+ catch
+ ' Workaround for bug.
+ call wTypeKeys "<End>"
+ call wTypeKeys "<Shift Home>"
+ try
+ ToolsCalculate
+ catch
+ Warnlog "Tools/Calculate is disabled!"
+ endcatch
+ endcatch
+ Sleep 1
+ ToolsCalculate
+ if GetClipboardText <> "2" then Warnlog "2. Footnote has not been inserted on 2. page"
+
+ call wTypeKeys "<PageUp><Return>That's it!"
+
+ printlog " - check properties"
+ ToolsFootnote
+ Kontext
+ Active.SetPage TabFussnoten
+ Kontext "TabFussnoten"
+ if Numerierung.GetSelIndex <> 2 then Warnlog "Footnote: Numbering not the 2. entry selected, but " + Numerierung.GetSelIndex
+ if Pro.GetSelIndex <> 3 then Warnlog "Footnote: 'Per document (3. entry) is not selected but " + Pro.GetSelIndex
+ if BeginnBei.GetText <> "3" then Warnlog "Footnote: Start at is not 3 but " + BeginnBei.GetText
+ if Davor.GetText <> "Vorher " then Warnlog "Footnote: Text 'Before' is wrong. Not 'Vorher ' but " + Davor.GetText
+ if Dahinter.GetText <> " Hinterher" then Warnlog "Footnote: Text 'After' is wrong. Not ' Hinterher' but " + Dahinter.GetText
+ if Absatz.GetSelIndex <> 4 then Warnlog "Footnote: Wrong entry selected in paragraph. Not 4 but " + Absatz.GetSelIndex
+ if ZeichenvorlageTextbereich.GetSelIndex <> 1 then Warnlog "Footnote: Text area has been changed!"
+ if ZeichenvorlageFussnotenbereich.GetSelIndex <> 1 then Warnlog "Footnote: Footnote area has been changed!"
+ if NOT SeitenEnde.IsChecked then Warnlog "Footnote: End of page is not checked anymore."
+ if FolgeSeite.GetText <> "Aha" then Warnlog "Footnote: End of footnote is not 'Aha' but " + FolgeSeite.GetText
+ if Beginn.GetText <> "oHo" then Warnlog "Footnote: Start of next page is not 'oHo' but " + Beginn.GetText
+
+ Kontext
+ Active.SetPage TabEndnoten
+ Kontext "TabEndnoten"
+ if Numerierung.GetSelIndex <> 1 then Warnlog "Endnote: Numbering not 1. entry but " + Numerierung.GetSelIndex
+ if BeginnBei.GetText <> "8" then Warnlog "Endnote: Strat at is not 8 but " + BeginnBei.GetText
+ if Davor.GetText <> "Hihi " then Warnlog "Endnote: 'Before' is wrong. Not 'Hihi ' but " + Davor.GetText
+ if Dahinter.GetText <> " HaHa" then Warnlog "Endnote: Text after is wrong. Not ' HaHa' but " + Dahinter.GetText
+ if Absatz.GetSelIndex <> 3 then Warnlog "Endnote: Wrong entry selected in paragraph. Not 3 but " + Absatz.GetSelIndex
+ if Seite.GetSelIndex <> 2 then Warnlog "Endnote: Wrong Page entry selected. Not 2 but " + Seite.GetSelIndex
+ if ZeichenvorlageTextbereich.GetSelIndex <> 4 then Warnlog "Endnote: Text area has been changed!"
+ if ZeichenvorlageEndnotenbereich.GetSelIndex <> 5 then Warnlog "Endnote: Endnote area has been changed!"
+
+ TabEndnoten.Cancel
+
+ printlog " - Save and reload"
+ Call hFileSaveAsWithFilterKill ( gOfficePath + "user\work\tToolsFootnoteEndnote.odt", "writer8" )
+ Call hCloseDocument
+ Call hFileOpen ( gOfficePath + "user\work\tToolsFootnoteEndnote.odt" )
+ printlog " - check saved properties"
+ ToolsFootnote
+ Kontext
+ Active.SetPage TabFussnoten
+ Kontext "TabFussnoten"
+ if Numerierung.GetSelIndex <> 2 then Warnlog "Footnote: Numbering not the 2. entry selected, but " + Numerierung.GetSelIndex
+ if Pro.GetSelIndex <> 3 then Warnlog "Footnote: 'Per document (3. entry) is not selected but " + Pro.GetSelIndex
+ if BeginnBei.GetText <> "3" then Warnlog "Footnote: Start at is not 3 but " + BeginnBei.GetText
+ if Davor.GetText <> "Vorher " then Warnlog "Footnote: Text 'Before' is wrong. Not 'Vorher ' but " + Davor.GetText
+ if Dahinter.GetText <> " Hinterher" then Warnlog "Footnote: Text 'After' is wrong. Not ' Hinterher' but " + Dahinter.GetText
+ if Absatz.GetSelIndex <> 4 then Warnlog "Footnote: Wrong entry selected in paragraph. Not 4 but " + Absatz.GetSelIndex
+ if ZeichenvorlageTextbereich.GetSelIndex <> 1 then Warnlog "Footnote: Text area has been changed!"
+ if ZeichenvorlageFussnotenbereich.GetSelIndex <> 1 then Warnlog "Footnote: Footnote area has been changed!"
+ if NOT SeitenEnde.IsChecked then Warnlog "Footnote: End of page is not checked anymore."
+ if FolgeSeite.GetText <> "Aha" then Warnlog "Footnote: End of footnote is not 'Aha' but " + FolgeSeite.GetText
+ if Beginn.GetText <> "oHo" then Warnlog "Footnote: Start of next page is not 'oHo' but " + Beginn.GetText
+
+ Kontext
+ Active.SetPage TabEndnoten
+ Kontext "TabEndnoten"
+ if Numerierung.GetSelIndex <> 1 then Warnlog "Endnote: Numbering not 1. entry but " + Numerierung.GetSelIndex
+ if BeginnBei.GetText <> "8" then Warnlog "Endnote: Strat at is not 8 but " + BeginnBei.GetText
+ if Davor.GetText <> "Hihi " then Warnlog "Endnote: 'Before' is wrong. Not 'Hihi ' but " + Davor.GetText
+ if Dahinter.GetText <> " HaHa" then Warnlog "Endnote: Text after is wrong. Not ' HaHa' but " + Dahinter.GetText
+ if Absatz.GetSelIndex <> 3 then Warnlog "Endnote: Wrong entry selected in paragraph. Not 3 but " + Absatz.GetSelIndex
+ if Seite.GetSelIndex <> 2 then Warnlog "#i40579#Endnote: Wrong Page entry selected. Not 2 but " + Seite.GetSelIndex
+ if ZeichenvorlageTextbereich.GetSelIndex <> 4 then Warnlog "Endnote: Text area has been changed!"
+ if ZeichenvorlageEndnotenbereich.GetSelIndex <> 5 then Warnlog "Endnote: Endnote area has been changed!"
+ TabEndnoten.Cancel
+
+ Call hCloseDocument
+endcase
diff --git a/testautomation/writer/optional/includes/number/w_206_.inc b/testautomation/writer/optional/includes/number/w_206_.inc
new file mode 100755
index 000000000000..ae7698017216
--- /dev/null
+++ b/testautomation/writer/optional/includes/number/w_206_.inc
@@ -0,0 +1,726 @@
+'encoding UTF-8 Do not remove or change this line!
+'**************************************************************************
+' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+'
+' Copyright 2000, 2010 Oracle and/or its affiliates.
+'
+' OpenOffice.org - a multi-platform office productivity suite
+'
+' This file is part of OpenOffice.org.
+'
+' OpenOffice.org is free software: you can redistribute it and/or modify
+' it under the terms of the GNU Lesser General Public License version 3
+' only, as published by the Free Software Foundation.
+'
+' OpenOffice.org is distributed in the hope that it will be useful,
+' but WITHOUT ANY WARRANTY; without even the implied warranty of
+' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' GNU Lesser General Public License version 3 for more details
+' (a copy is included in the LICENSE file that accompanied this code).
+'
+' You should have received a copy of the GNU Lesser General Public License
+' version 3 along with OpenOffice.org. If not, see
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* owner : helge.delfs@oracle.com
+'*
+'* short description : Testing Number and Bullets
+'*
+'\***********************************************************************
+
+sub w_206_
+
+ Call tToolsNumbering1
+ Call tToolsNumbering2
+ Call tToolsNumbering3
+ Call tToolsNumbering4
+ Call tToolsNumbering5
+ Call tToolsNumbering6
+ Call tToolsNumbering7
+ Call tToolsNumbering8
+ Call tToolsNumbering9
+ Call tToolsNumbering10
+ Call tToolsNumbering11
+
+end sub
+
+testcase tToolsNumbering1
+ printlog "Create a simple numbering without selection"
+ '/// Create a simple numbering without selection
+ Dim i as integer
+
+ '/// Open a new text document
+ Call hNewDocument
+
+ '/// Activate Numbering/Bullets via Objectbar
+ Call hToolbarSelect("BulletsAndNumbering", true)
+
+ '/// Create a numbering
+ Kontext "NumObjectbar"
+ if Not NumObjectbar.Exists then
+ Warnlog "Numbering/Bullets objectbar not accessible"
+ Call hCloseDocument
+ goto endsub
+ end if
+
+ NumberingOnOff.Click
+ For i = 1 to 5
+ call wTypeKeys ( "Numbering Level " & i )
+ call wTypeKeys ( "<RETURN>" )
+ next i
+
+ '/// Check if numbering has been created
+ For i = 1 to 5
+ call wTypeKeys ( "<UP>" )
+ if hIsNumberingBullets() = false then
+ Warnlog "Seems numbering has not been completely created"
+ end if
+ next i
+
+ '/// CloseDocument
+ Call hCloseDocument
+
+endcase
+
+testcase tToolsNumbering2
+ printlog "Create simple bullets without selection"
+ '/// Create simple bullets without selection
+ Dim i as integer
+
+ '/// Open a new text document
+ Call hNewDocument
+
+ '/// Activate Numbering/Bullets via Objectbar
+ Call hToolbarSelect("BulletsAndNumbering", true)
+
+ '/// Create bullets
+ Kontext "NumObjectbar"
+ if Not NumObjectbar.Exists then
+ Warnlog "Numbering/Bullets objectbar not accessible"
+ Call hCloseDocument
+ goto endsub
+ end if
+
+ BulletsOnOff.Click
+ For i = 1 to 5
+ call wTypeKeys ( "Numbering Level " & i )
+ call wTypeKeys ( "<RETURN>" )
+ next i
+
+ '/// Check if numbering has been created
+ For i = 1 to 5
+ call wTypeKeys ( "<UP>" )
+ if hIsNumberingBullets() = false then
+ Warnlog "Seems numbering has not been completely created"
+ end if
+ next i
+
+ '/// CloseDocument
+ Call hCloseDocument
+
+endcase
+
+
+testcase tToolsNumbering3
+ printlog "Turn several selected paragraphs into numbering"
+ '/// Turn several selected paragraphs into numbering
+ Dim i as integer
+
+ '/// Open a new text document
+ Call hNewDocument
+
+ '/// Insert autotext 'Dummy text' 3 times
+ for i = 1 to 3
+ Call wBlindtextEinfuegen
+ next i
+
+ '/// Point cursor to beginning of document
+ call wTypeKeys ( "<Mod1 Home>" )
+ '/// Select all text inserted
+ call wTypeKeys ( "<Mod1 A>" )
+
+ '/// Activate Numbering/Bullets via Objectbar
+ Call hToolbarSelect("BulletsAndNumbering", true)
+
+ Kontext "NumObjectbar"
+ if Not NumObjectbar.Exists then
+ Warnlog "Numbering/Bullets objectbar not accessible"
+ Call hCloseDocument
+ goto endsub
+ end if
+
+ NumberingOnOff.Click
+ '/// Check if numbering has been created
+ call wTypeKeys ( "<Mod1 Home>" )
+
+ For i = 1 to 2
+ if hIsNumberingBullets() = false then
+ Warnlog "Seems numbering has not been completely created"
+ end if
+ call wTypeKeys ( "<Mod1 Down>" )
+ next i
+
+ '/// CloseDocument
+ Call hCloseDocument
+
+endcase
+
+
+testcase tToolsNumbering4
+ printlog "Turn several selected paragraphs into bullets"
+ '/// Turn several selected paragraphs into bullets
+ Dim i as integer
+
+ '/// Open a new text document
+ Call hNewDocument
+
+ '/// Insert autotext 'Dummy text' 3 times
+ for i = 1 to 3
+ Call wBlindtextEinfuegen
+ next i
+
+ '/// Point cursor to beginning of document
+ call wTypeKeys ( "<Mod1 Home>" )
+ '/// Select all text inserted
+ call wTypeKeys ( "<Mod1 A>" )
+
+ '/// Activate Numbering/Bullets via Objectbar
+ Call hToolbarSelect("BulletsAndNumbering", true)
+
+ Kontext "NumObjectbar"
+ if Not NumObjectbar.Exists then
+ Warnlog "Numbering/Bullets objectbar not accessible"
+ Call hCloseDocument
+ goto endsub
+ end if
+
+ BulletsOnOff.Click
+ '/// Check if numbering has been created
+ call wTypeKeys ( "<Mod1 Home>" )
+
+ For i = 1 to 2
+ if hIsNumberingBullets() = false then
+ Warnlog "Seems bullets have not been completely created"
+ end if
+ call wTypeKeys ( "<Mod1 Down>" )
+ next i
+
+ '/// CloseDocument
+ Call hCloseDocument
+
+endcase
+
+
+testcase tToolsNumbering5
+ printlog "create numbering via autoformat"
+ '/// create numbering via autoformat
+ Dim i as integer, sClipBrd() as string
+
+ For i = 1 to 8
+ '/// Open a new text document
+ Call hNewDocument
+
+ '/// Insert '1.' // 'I.' // 'a.' followed by text
+ Select Case i
+ Case 1
+ printlog "- Enter numbering starting with 1)"
+ call wTypeKeys ( "1) " )
+ Case 2
+ call wTypeKeys ( "1. " )
+ printlog "- Enter numbering starting with 1."
+ Case 3
+ call wTypeKeys ( "(1) " )
+ printlog "- Enter numbering starting with (1)"
+ Case 4
+ call wTypeKeys ( "I. " )
+ printlog "- Enter numbering starting with I."
+ Case 5
+ call wTypeKeys ( "i. " )
+ printlog "- Enter numbering starting with i."
+ Case 6
+ call wTypeKeys ( "A) " )
+ printlog "- Enter numbering starting with A)"
+ Case 7
+ call wTypeKeys ( "a) " )
+ printlog "- Enter numbering starting with a)"
+ Case 8
+ call wTypeKeys ( "(a) " )
+ printlog "- Enter numbering starting with (a)"
+ end select
+
+ '/// + 'my new numbering'
+ '/// + followed by return (creats the numbering)
+ '/// + followed by text 'my newer numbering'
+ call wTypeKeys "my new numbering<Return>"
+ call wTypeKeys "my newer numbering"
+
+ '/// check if numbering has been created
+ call wTypeKeys ( "<MOD1 A>" )
+ EditCopy
+ Select Case gPlatGroup
+ Case "unx"
+ sClipBrd() = Split (GetClipboardText, CHR$(10))
+ Case else
+ sClipBrd() = Split (GetClipboardText, CHR$(13) & CHR$(10))
+ end select
+ if Ubound(sClipBrd()) = 1 then
+ Select Case i
+ Case 1
+ if Left$(sClipBrd(1), 2) <> "2)" then
+ Warnlog "Seems numbering 1) has not been correctly created"
+ end if
+ Case 2
+ if Left$(sClipBrd(1), 2) <> "2." then
+ Warnlog "Seems numbering 1. has not been correctly created"
+ end if
+ Case 3
+ if Left$(sClipBrd(1), 3) <> "(2)" then
+ Warnlog "Seems numbering (1) has not been correctly created"
+ end if
+ Case 4
+ if Left$(sClipBrd(1), 3) <> "II." then
+ Warnlog "Seems numbering I. has not been correctly created"
+ end if
+ Case 5
+ if Left$(sClipBrd(1), 3) <> "ii." then
+ QaErrorLog "#i78524#Auto-capitalisation of letter i hinders Automatic numbering" 'Warnlog "Seems numbering i. has not been correctly created"
+ end if
+ Case 6
+ if Left$(sClipBrd(1), 2) <> "B)" then
+ QaErrorLog "#i71136# - Autocorrect won't start numbering by 'A)'" 'warnlog "Seems numbering A) has not been correctly created"
+ end if
+ Case 7
+ if Left$(sClipBrd(1), 2) <> "b)" then
+ QaErrorLog "#i71136# - Autocorrect won't start numbering by 'a)'" 'warnlog "Seems numbering a) has not been correctly created"
+ end if
+ Case 8
+ if Left$(sClipBrd(1), 2) <> "(b)" then
+ QaErrorLog "#i71136# - Autocorrect won't start numbering by '(a)'" 'warnlog "Seems numbering (a) has not been correctly created"
+ end if
+ end select
+ else
+ Warnlog "Error in clipboard content! " & Ubound(sClipBrd())
+ end if
+
+ '/// CloseDocument
+ Call hCloseDocument
+ next i
+
+endcase
+
+
+testcase tToolsNumbering6
+ printlog "Remove numbering from paragraph by pressing <DEL> key (normal numbering)"
+ Dim j as integer
+ Dim i as integer, sClipBrd() as string
+
+ '/// Remove numbering from paragraph by pressing "DEL" key (normal numbering)
+ '/// Open a new text document
+ Call hNewDocument
+ '/// Insert some text '1. This is the first' followed by a return
+ call wTypeKeys ( "1. This is the first<Return>" )
+ '/// Insert some text 'This is the second' followed by a return
+ call wTypeKeys ( "This is the second<Return>" )
+ '/// Insert some text 'This is the third'
+ call wTypeKeys ( "This is the third" )
+
+ '/// Press key <STRG HOME> to go to first
+ call wTypeKeys ( "<MOD1 Home>" )
+ '/// Press <HOME> to highlight numbering
+ call wTypeKeys ( "<Home>" )
+ '/// Press <DELETE> to remove first paragraph numbering
+ call wTypeKeys ( "<DELETE>" )
+ '/// Check if numbering of the following paragraphs has been adapted even after save and reload
+ For j = 1 to 2
+ if j = 2 then
+ '/// Save document
+ Call hFileSaveAsKill ( gOfficepath & "user\work\tToolsNumbering6.odt" )
+ '/// Close and reload document
+ Call hCloseDocument
+ Call hFileOpen ( gOfficepath & "user\work\tToolsNumbering6.odt" )
+ end if
+ call wTypeKeys ( "<MOD1 A>" )
+ EditCopy
+ Select Case gPlatGroup
+ Case "unx"
+ sClipBrd() = Split (GetClipboardText, CHR$(10))
+ Case else
+ sClipBrd() = Split (GetClipboardText, CHR$(13) & CHR$(10))
+ end select
+
+ For i = 1 to 3
+ Select Case i
+ Case 1
+ if sClipBrd(0) <> "This is the first" then
+ Warnlog "First paragraph not 'This is the first' but: " & sClipBrd(0)
+ end if
+ Case 2
+ if sClipBrd(1) <> "1. This is the second" then
+ Warnlog "First paragraph not '1.This is the second' but: " & sClipBrd(1)
+ end if
+ Case 3
+ if sClipBrd(2) <> "2. This is the third" then
+ Warnlog "First paragraph not '2.This is the third' but: " & sClipBrd(2)
+ end if
+ end select
+ next i
+ next j
+ '/// Close document
+ Call hCloseDocument
+
+endcase
+
+
+testcase tToolsNumbering7
+ printlog "Remove numbering from paragraph by pressing <DEL> key (outlined numbering)"
+ Dim j as integer, sVorlage as string
+ Dim i as integer, sClipBrd() as string
+ '/// Remove numbering from paragraph by pressing "DEL" key (outlined numbering)
+ '/// Open a new text document
+ Call hNewDocument
+ '/// Tools / Outline Numbering
+ ToolsOutlineNumbering
+ Kontext
+ Active.SetPage TabKapitelnumerierung
+ Kontext "TabKapitelnumerierung"
+ sVorlage = Absatzvorlage.GetSelText
+ '/// Select as Numbering Number 1 in list
+ Nummer.Select 2
+ '/// Set as Seperator (After) a `.`
+ Dahinter.Settext "."
+ '/// Close 'Outline Numbering' dialog
+ TabKapitelnumerierung.Ok
+
+ ' Numbering of outlines will not be copied to clipboard
+ ' so we use the Field 'Chapter' which does
+ for i = 1 to 3
+ InsertFieldsOther
+ Kontext
+ Active.Setpage TabDokumentFeldbefehle
+ Kontext "TabDokumentFeldbefehle"
+ try
+ Feldtyp.Select fGetType("Chapter")
+ wait 500
+ Select Case iSprache
+ Case 7 :Formatliste.Select 3 'Chapternumber
+ Case 34 :Formatliste.Select 3 'Chapternumber
+ Case else :Formatliste.Select 2 'Chapternumber
+ end select
+ catch
+ Warnlog "Unable to select field 'chapter'"
+ TabDokumentFeldbefehle.Close
+ Call hCloseDocument
+ goto endsub
+ endcatch
+ Einfuegen.Click
+ TabDokumentFeldbefehle.Close
+
+ Select Case i
+ Case 1
+ '/// Insert some text 'My first number' followed by a return
+ call wTypeKeys ( "My first number<RETURN>" )
+ Case 2
+ '/// Insert some text 'My second number' followed by a return
+ call wTypeKeys ( "My second number<RETURN>" )
+ Case 3
+ '/// Insert some text 'My third number'
+ call wTypeKeys ( "My third number" )
+ end select
+ next i
+ '/// Select all text
+ call wTypeKeys ( "<MOD1 A>" )
+ '/// Set Style 'Heading 1'
+ Call wStyleSet ( sVorlage )
+
+ '/// Press key <STRG HOME> to go to first
+ call wTypeKeys ( "<MOD1 Home>" )
+ '/// Press <HOME> to highlight numbering
+ call wTypeKeys ( "<Home>" )
+ '/// Press <DELETE> to remove first paragraph numbering
+ call wTypeKeys ( "<DELETE>" )
+ '/// Check if numbering of the following paragraphs has been adapted even after save and reload
+ For j = 1 to 2
+ if j = 2 then
+ '/// Save document
+ Call hFileSaveAsKill ( gOfficepath & "user\work\tToolsNumbering7.odt" )
+ '/// Close and reload document
+ Call hCloseDocument
+ Call hFileOpen ( gOfficepath & "user\work\tToolsNumbering7.odt" )
+ end if
+
+ call wTypeKeys ( "<MOD1 A>" )
+ EditCopy
+ Select Case gPlatGroup
+ Case "unx"
+ sClipBrd() = Split (GetClipboardText, CHR$(10))
+ Case else
+ sClipBrd() = Split (GetClipboardText, CHR$(13) & CHR$(10))
+ end select
+
+ For i = 1 to 3
+ Select Case i
+ Case 1
+ if sClipBrd(0) <> "My first number" then
+ if Left$(sClipBrd(0), 2) = "1." then
+ Warnlog "Outline Numbering cannot be deleted pressing '<DELETE>' key"
+ exit for
+ else
+ Warnlog "First paragraph not 'My first number' but: " & sClipBrd(0)
+ end if
+ end if
+ Case 2
+ if sClipBrd(1) <> "1. 1.My second number" then
+ Warnlog "#128041#Second paragraph not '1. 1.My second number' but: " & sClipBrd(1)
+ end if
+ Case 3
+ if sClipBrd(2) <> "2. 2.My third number" then
+ Warnlog "#128041#Third paragraph not '2. 2.My third number' but: " & sClipBrd(2)
+ end if
+ end select
+ next i
+ next j
+ '/// Close document
+ Call hCloseDocument
+
+endcase
+
+
+testcase tToolsNumbering8
+ printlog "Take care that numbering can be activated within tables"
+ Dim i as integer
+ '/// Take care that numbering can be activated within tables
+ '/// Open a new text document
+ Call hNewDocument
+ '/// Insert a table with 6 rows and 3 columns
+ TableInsertTable
+ Kontext "TabelleEinfuegenWriter"
+ Spalten.Settext "3"
+ Zeilen.Settext "6"
+ TabelleEinfuegenWriter.Ok
+
+ '/// Select 2nd to 6th row in first column
+ call wTypeKeys ( "<Mod1 Home>" )
+ call wTypeKeys ( "<Down>" )
+ call wTypeKeys ( "<Shift Down>", 4 )
+
+ '/// Activate Numbering/Bullets via Objectbar
+ Call hToolbarSelect("BulletsAndNumbering", true)
+ Kontext "NumObjectbar"
+ if Not NumObjectbar.Exists then
+ Warnlog "Numbering/Bullets objectbar not accessible"
+ Call hCloseDocument
+ goto endsub
+ end if
+
+ '/// Enable numbering
+ NumberingOnOff.Click
+ '/// Check if numbering has been created in table
+ call wTypeKeys ( "<Mod1 Home>" )
+ For i = 1 to 5
+ if i = 1 then
+ if hIsNumberingBullets() = true then
+ Warnlog "Seems numbering has been created in first row"
+ end if
+ else
+ if hIsNumberingBullets() = false then
+ Warnlog "Seems numbering has not been created correctly"
+ exit for
+ end if
+ end if
+ call wTypeKeys ( "<Down>" )
+ next i
+
+ '/// Close document
+ Call hCloseDocument
+endcase
+
+
+testcase tToolsNumbering9
+ Dim i as integer
+ printlog "Turn off a numbered list"
+ '/// Turn off a numbered list via toolbar
+ '/// Open a new text docoument
+ Call hNewDocument
+ '/// Create a numbering
+ '/// Write in document '1. This numbering' followed by a return
+ call wTypeKeys "1. This numbering<Return>"
+ '/// + write 'that will be automatically created' followed by a return
+ call wTypeKeys "that will be automatically created<RETURN>"
+ '/// + write 'and be turned off via toolbar'
+ call wTypeKeys ( "and turned off via toolbar" )
+ '/// Select all
+ call wTypeKeys ( "<Mod1 A>" )
+ '/// Activate Numbering/Bullets via Objectbar
+ Call hToolbarSelect("BulletsAndNumbering", true)
+ Kontext "NumObjectbar"
+ if Not NumObjectbar.Exists then
+ Warnlog "Numbering/Bullets objectbar not accessible"
+ Call hCloseDocument
+ goto endsub
+ end if
+ '/// Turn numbering off by clicking 'Numbering' symbol
+ NumberingOnOff.Click
+
+ '/// Check if numbering has been turned off
+ call wTypeKeys ( "<Mod1 Home>" )
+ For i = 1 to 3
+ call wTypeKeys ( "<Shift End>" )
+ EditCopy
+ Select Case i
+ Case 1
+ if GetClipboardtext <> "This numbering" then
+ Warnlog "It seems numbering isn't turned off"
+ exit for
+ end if
+ Case 2
+ if GetClipboardtext <> "that will be automatically created" then
+ Warnlog "It seems numbering isn't turned off"
+ exit for
+ end if
+ Case 3
+ if GetClipboardtext <> "and turned off via toolbar" then
+ Warnlog "It seems numbering isn't turned off"
+ end if
+ end select
+ call wTypeKeys ( "<Down><Home>" )
+ next i
+ '/// Close document
+ Call hCloseDocument
+endcase
+
+
+testcase tToolsNumbering10
+ Dim i as integer
+ printlog "Pressing <ENTER> key in an empty paragraph turns off numbering"
+ '/// Press <ENTER> key in an empty paragraph turns off numbering
+ '/// Open a new text docoument
+ Call hNewDocument
+ '/// Create a numbering
+ '/// Write in document '1. This numbering' followed by a return
+ call wTypeKeys "1. This numbering<Return>"
+ '/// + write 'that will be automatically created' followed by a return
+ call wTypeKeys "that will be automatically created<RETURN>"
+ '/// + write 'and be turned off via return' followed by a return
+ call wTypeKeys ( "and turned off via return<RETURN>" )
+ '/// + enter <Return> to create an empty paragraph
+ call wTypeKeys ( "<Return>" )
+ '/// Hit <Return> again should leave a numbering with 3 paragraphs
+ call wTypeKeys ( "No numbering anymore" )
+ call wTypeKeys ( "<Shift Home>" )
+ EditCopy
+ if GetClipboardtext <> "No numbering anymore" then
+ Warnlog "Seems numbering wasn't turned off !"
+ else
+ call wTypeKeys ( "<Mod1 Home>" )
+ For i = 1 to 3
+ if hIsNumberingBullets() = false then
+ Warnlog "Seems numbering has been completely turned off"
+ exit for
+ end if
+ call wTypeKeys ( "<Down>" )
+ next i
+ end if
+
+ '/// Close document
+ Call hCloseDocument
+endcase
+
+
+testcase tToolsNumbering11
+ Dim i as integer, sVorlage as string
+ Dim sClipBrd() as string
+ printlog "Create an empty heading (Ouline numbering)"
+ '/// Create an empty heading (Ouline numbering)
+ '/// Open a new text document
+ Call hNewDocument
+ ' Get name of 'Heading' (language dependent)
+ ToolsOutlineNumbering
+ Kontext
+ Active.SetPage TabKapitelnumerierung
+ Kontext "TabKapitelnumerierung"
+ sVorlage = Absatzvorlage.GetSelText
+ TabKapitelnumerierung.Cancel
+
+ '/// Create a outline numbering
+ ' Numbering of outlines will not be copied to clipboard
+ ' so we use the Field 'Chapter' which does
+ for i = 1 to 3
+ InsertFieldsOther
+ Kontext
+ Active.Setpage TabDokumentFeldbefehle
+ Kontext "TabDokumentFeldbefehle"
+ try
+ Feldtyp.Select fGetType("Chapter")
+ wait 500
+ Select Case iSprache
+ Case 7 :Formatliste.Select 3 'Chapternumber
+ Case else :Formatliste.Select 2 'Chapternumber
+ end select
+ catch
+ Warnlog "Unable to select field 'chapter'"
+ TabDokumentFeldbefehle.Close
+ Call hCloseDocument
+ goto endsub
+ endcatch
+ Einfuegen.Click
+ TabDokumentFeldbefehle.Close
+
+ Select Case i
+ Case 1
+ '/// Insert some text 'A new first paragraph' followed by a return
+ call wTypeKeys ( "A new first paragraph<RETURN>" )
+ Case 2
+ '/// Insert an empty paragraph
+ call wTypeKeys ( "<RETURN>" )
+ Case 3
+ '/// Insert some text 'A new third paragraph'
+ call wTypeKeys ( "A new third paragraph" )
+ end select
+ next i
+ '/// Select all text
+ call wTypeKeys ( "<MOD1 A>" )
+ '/// Set Style 'Heading 1'
+ Call wStyleSet ( sVorlage )
+ '/// Activate Numbering/Bullets via Objectbar
+ Call hToolbarSelect("BulletsAndNumbering", true)
+ '/// Create a numbering
+ Kontext "NumObjectbar"
+ if Not NumObjectbar.Exists then
+ Warnlog "Numbering/Bullets objectbar not accessible"
+ Call hCloseDocument
+ goto endsub
+ end if
+ NumberingOnOff.Click
+ '/// Check if second paragraph is empty but numbered
+
+ EditCopy
+ Select Case gPlatGroup
+ Case "unx"
+ sClipBrd() = Split (GetClipboardText, CHR$(10))
+ Case else
+ sClipBrd() = Split (GetClipboardText, CHR$(13) & CHR$(10))
+ end select
+
+ For i = 1 to 3
+ Select Case i
+ Case 1
+ if sClipBrd(0) <> "1 1A new first paragraph" then
+ Warnlog "First Heading not: '1 1A new first paragraph' but: " & sClipBrd(0)
+ end if
+ Case 2
+ if sClipBrd(1) <> "2 2" then
+ Warnlog "First paragraph not '2 2' but: " & sClipBrd(1)
+ end if
+ Case 3
+ if sClipBrd(2) <> "3 3A new third paragraph" then
+ Warnlog "First paragraph not '3 3A new third paragraph' but: " & sClipBrd(2)
+ end if
+ end select
+ next i
+
+ '/// Close document
+ Call hCloseDocument
+endcase
diff --git a/testautomation/writer/optional/includes/number/w_207_.inc b/testautomation/writer/optional/includes/number/w_207_.inc
new file mode 100755
index 000000000000..634e7c5773a7
--- /dev/null
+++ b/testautomation/writer/optional/includes/number/w_207_.inc
@@ -0,0 +1,175 @@
+'encoding UTF-8 Do not remove or change this line!
+'**************************************************************************
+' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+'
+' Copyright 2000, 2010 Oracle and/or its affiliates.
+'
+' OpenOffice.org - a multi-platform office productivity suite
+'
+' This file is part of OpenOffice.org.
+'
+' OpenOffice.org is free software: you can redistribute it and/or modify
+' it under the terms of the GNU Lesser General Public License version 3
+' only, as published by the Free Software Foundation.
+'
+' OpenOffice.org is distributed in the hope that it will be useful,
+' but WITHOUT ANY WARRANTY; without even the implied warranty of
+' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' GNU Lesser General Public License version 3 for more details
+' (a copy is included in the LICENSE file that accompanied this code).
+'
+' You should have received a copy of the GNU Lesser General Public License
+' version 3 along with OpenOffice.org. If not, see
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* owner : helge.delfs@oracle.com
+'*
+'* short description : Testing Number and Bullets
+'*
+'\***********************************************************************
+
+sub w_207_
+
+ Call tToolsNumbering12
+ Call tToolsNumbering13
+
+end sub
+
+'------------------------------------------------------------------------------------------------------------------------
+
+testcase tToolsNumbering12
+
+ printlog "Import / Export Regression Test"
+ '/// Import / Export Regression-Test
+ Dim DocFileList( 30 ) as String, sCurrentFilter as string
+ Dim sSourcePath as String, sCurrentFilterExt as string
+ Dim iCurrentDocument as Integer
+ Dim iDocumentType as Integer
+ Dim ExportFileName as string
+
+ ReDim DocFileList( 30 ) as String
+
+ '/// load all documents from "sun_writer\optional\input\number\regression"
+ sSourcePath = convertpath( gTesttoolPath & "writer\optional\input\number\regression\" )
+ GetFileList ( sSourcePath, "*.*", DocFileList() )
+ hListPrint( DocFileList(), "Files to be loaded" )
+
+ printlog( "Start loading and exporting files" )
+ for iCurrentDocument = 1 to ListCount ( DocFileList() )
+ printlog( "File: " & DocFileList( iCurrentDocument ) )
+ For iDocumentType = 1 to 3
+ Select Case iDocumentType
+ Case 1
+ sCurrentFilter = "writer8" 'gWriterFilter
+ sCurrentFilterExt = "odt" 'WriterFilterExtension(0)
+ Case 2
+ sCurrentFilter = "StarOffice XML (Writer)" 'hGetUIFiltername("StarOffice XML (Writer)") & " (.sxw)"
+ sCurrentFilterExt = "sxw"
+ Case 3
+ sCurrentFilter = "StarWriter 5.0" 'StarWriter 5.0 (.sdw)
+ sCurrentFilterExt = "sdw"
+ end select
+
+ printlog( "Open file: " & DocFileList( iCurrentDocument ) )
+ Call hFileOpen ( DocFileList( iCurrentDocument ) )
+
+ printlog( "Make a copy if the file is write protected" )
+ Call sMakeReadOnlyDocumentEditable
+
+ printlog( "Test for unexpected dialog: Filter Selection" )
+ Kontext "Filterauswahl"
+ if ( Filterauswahl.Exists( 1 ) ) then
+ Warnlog " - Filter Selection dialog is up !"
+ Filterauswahl.Cancel
+ hFileCloseAll()
+ goto endsub
+ endif
+
+ printlog( "Test for unexpected dialog: ASCII Filter Options" )
+ Kontext "AsciiFilterOptionen"
+ if ( AsciiFilterOptionen.Exists() ) then
+ AsciiFilterOptionen.Ok
+ hFileCloseAll()
+ goto endsub
+ endif
+
+ printlog( "Allow macro execution (if general setting permit" )
+ hAllowMacroExecution()
+
+ '/// check if loaded
+ if ( GetDocumentCount <= 2 ) then
+ ExportFileName = ConvertPath ( gOfficePath & "user\work\" & _
+ DateiOhneExt(DateiExtract ( DocFileList( iCurrentDocument ) ) ) & _
+ "." & sCurrentFilterExt )
+ hDeleteFile( ExportFileName ) ' There should never be a reason to overwrite
+
+ printlog " - export as: " & ExportFileName
+ Call hFileSaveAsWithFilter( ExportFileName, sCurrentFilter )
+ Call hCloseDocument
+
+ printlog " - load previous saved document"
+ Call hFileOpen ( ExportFileName )
+
+ printlog " - close document"
+ hFileCloseAll()
+ else
+ Warnlog " - Doc probably didn't get loaded !!!"
+ end if
+ next iDocumentType
+ next iCurrentDocument
+
+endcase
+
+'------------------------------------------------------------------------------------------------------------------------
+
+testcase tToolsNumbering13
+
+ Dim i as integer, iCounter as integer
+ '/// #i73790 Regression testing
+ '/// This testcase loads a Worddocument that lost all formattings
+ printlog "#i73790 regression testing"
+ '/// Load document 'writer\\optional\\input\\number\\regression\\73790.doc'
+ Call hFileOpen ( gTesttoolPath + "writer\optional\input\number\regression\73790.doc" )
+ Call sMakeReadOnlyDocumentEditable
+ '/// Document has Heading1-Heading3 formatted, be sure it is
+ call wTypeKeys ("<Mod1 Home>")
+ '/// Point cursor to top of document with <STRG HOME>
+ Select Case iSprache
+ case 01 : iCounter = 2
+ case 03 : iCounter = 1
+ case 07 : iCounter = 2
+ case 31 : iCounter = 1
+ case 33 : iCounter = 3
+ case 34 : iCounter = 2
+ case 36 : iCounter = 2
+ case 39 : iCounter = 2
+ case 45 : iCounter = 1
+ case 46 : iCounter = 2
+ case 48 : iCounter = 2
+ case 49 : iCounter = 3
+ case 55 : iCounter = 3
+ case 81 : iCounter = 3
+ case 82 : iCounter = 1
+ case 86 : iCounter = 1
+ case 88 : iCounter = 3
+ case else : iCounter = 2
+ end select
+ For i = 1 to 3
+ call wTypeKeys ("<Shift End>")
+ '/// Select first to third entry and check it i formatted with 'Heading1','Heading2','Heading3'
+ Kontext "Textobjectbar"
+ if Vorlage.GetSelIndex <> ( i + iCounter ) then
+ Warnlog "Heading " & i & " not " & ( i + iCounter ) & " but " & Vorlage.GetSelIndex
+ end if
+ call wTypeKeys ( "<Home>" )
+ call wTypeKeys ( "<Down>" )
+ next i
+
+ printlog " Close active document "
+ Do Until GetDocumentCount = 0
+ Call hCloseDocument
+ Loop
+endcase