1 'encoding UTF-8 Do not remove or change this line!
2 '*******************************************************************************
3 '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 '* Copyright 2008 by Sun Microsystems, Inc.
7 '* OpenOffice.org - a multi-platform office productivity suite
9 '* $RCSfile: w_tools.inc,v $
13 '* last change: $Author: vg $ $Date: 2008-08-18 12:44:20 $
15 '* This file is part of OpenOffice.org.
17 '* OpenOffice.org is free software: you can redistribute it and/or modify
18 '* it under the terms of the GNU Lesser General Public License version 3
19 '* only, as published by the Free Software Foundation.
21 '* OpenOffice.org is distributed in the hope that it will be useful,
22 '* but WITHOUT ANY WARRANTY; without even the implied warranty of
23 '* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 '* GNU Lesser General Public License version 3 for more details
25 '* (a copy is included in the LICENSE file that accompanied this code).
27 '* You should have received a copy of the GNU Lesser General Public License
28 '* version 3 along with OpenOffice.org. If not, see
29 '* <http://www.openoffice.org/license.html>
30 '* for a copy of the LGPLv3 License.
32 '/******************************************************************************
34 '* owner : helge.delfs@sun.com
36 '* short description : Writer-Tools
38 '\******************************************************************************
40 sub wDokSchreiben ( OutputText , optional iLoop as Integer )
42 If lcase(OutputText) = "<mod1 a>" then
43 If iSprache = 34 then OutputText = "<Mod1 E>"
45 If IsMissing(iLoop) = True then iLoop = 1
47 Select Case Ucase(gApplication)
49 Kontext "DocumentWriter"
50 DocumentWriter.TypeKeys OutputText
53 Kontext "DocumentMasterDoc"
54 DocumentMasterDoc.TypeKeys OutputText
57 Kontext "DocumentWriterWeb"
58 DocumentWriterWeb.TypeKeys OutputText
61 Call hTextrahmenErstellen (OutputText,35,35,50,20)
63 Call hTextrahmenErstellen (OutputText,35,35,50,20)
70 ' -----------------------------------------------------------------------
72 sub wTypeKeys ( OutputText , optional iLoop as Integer )
74 If lcase(OutputText) = "<mod1 a>" then
75 If iSprache = 34 then OutputText = "<Mod1 E>"
77 If IsMissing(iLoop) = True then iLoop = 1
79 Select Case Ucase(gApplication)
81 Kontext "DocumentWriter"
82 DocumentWriter.TypeKeys OutputText
85 Kontext "DocumentMasterDoc"
86 DocumentMasterDoc.TypeKeys OutputText
89 Kontext "DocumentWriterWeb"
90 DocumentWriterWeb.TypeKeys OutputText
93 Call hTextrahmenErstellen (OutputText,35,35,50,20)
95 Call hTextrahmenErstellen (OutputText,35,35,50,20)
101 ' -----------------------------------------------------------------------
104 Select Case Ucase(gApplication)
106 Kontext "DocumentWriter"
108 Case "MASTERDOCUMENT"
109 Kontext "DocumentMasterDoc"
112 Kontext "DocumentWriterWeb"
115 Kontext "DocumentImpress"
118 Kontext "DocumentDraw"
121 Kontext "DocumentMath"
124 Kontext "DocumentCalc"
130 ' -----------------------------------------------------------------------
132 function wBlindtextEinfuegen() as boolean
133 '/// This functions inserts a Dummytext and returns true if it was inserted
134 Dim BlindText as string, bTemp as boolean
137 case 01 : BlindText = "DT<F3>"
138 case 03 : BlindText = "TE<F3>"
139 case 07 : BlindText = "DT<F3>"
140 case 31 : BlindText = "BT<F3>"
141 case 34 : BlindText = "TE<F3>"
142 case 33 : BlindText = "TEX<F3>"
143 case 39 : BlindText = "TE<F3>"
144 case 45 : BlindText = "ET<F3>"
145 case 46 : BlindText = "BT<F3>"
146 case 48 : BlindText = "TW<F3>"
147 case 49 : BlindText = "BT<F3>"
148 case 55 : BlindText = "TP<F3>"
149 case 81 : BlindText = "DT<F3>"
150 case 82 : BlindText = "BT<F3>"
151 case 86 : BlindText = "DT<F3>"
152 case 88 : BlindText = "BT<F3>"
153 case else : QAErrorlog "No Shortcut for Dummytext available!"
156 if BlindText > "" then
157 Call wTypeKeys BlindText
159 if Active.Exists then
160 if Active.GetRT = 304 then
161 Warnlog Active.Gettext
171 wBlindtextEinfuegen = bTemp
175 ' -----------------------------------------------------------------------
177 sub wZeichenobjektEinfuegen ( Objekt$, xStart%, yStart%, xEnde%, yEnde%, optional sCloseToolbar as boolean )
180 if Not DrawBar.Exists then Call hToolbarSelect("Drawing", true)
183 Objekt = UCase( Objekt )
185 case "RECHTECK" : Rechteck.Click
186 case "LINIE" : Linie.Click
187 case "ELLIPSE" : Ellipse.Click
188 case "TEXT" : Textobjekt.Click
193 if gAsianSup = True then
194 Warnlog "Unable to insert Vertical Text! Asian Support in Options activated ?"
197 case "LAUFTEXT" : Lauftext.Click
198 case "LEGENDE" : Legende.Click
201 VerticalCallout.Click
203 Warnlog "Unable to insert Vertical Callout! Asian Support in Options activated ?"
208 Select Case gApplication
210 Kontext "DocumentWriter"
211 DocumentWriter.MouseDown xStart%, yStart%
212 DocumentWriter.MouseMove xEnde%, yEnde%
213 DocumentWriter.MouseUp xEnde%, yEnde%
216 if IsMissing(sCloseToolbar) then
219 if sCloseToolbar = true then Drawbar.Close
221 if Objekt <> "TEXT" and Objekt <> "VTEXT" then
222 Kontext "DocumentWriter"
223 Call gMouseClick (10, 10)
227 Case "MASTERDOCUMENT"
228 Kontext "DocumentMasterDoc"
229 DocumentMasterDoc.MouseDown xStart%, yStart%
230 DocumentMasterDoc.MouseMove xEnde%, yEnde%
231 DocumentMasterDoc.MouseUp xEnde%, yEnde%
234 if IsMissing(sCloseToolbar) then
237 if sCloseToolbar = true then Drawbar.Close
239 if Objekt <> "TEXT" and Objekt <> "VTEXT" then
240 Kontext "DocumentMasterDoc"
241 Call gMouseClick (10, 10)
248 ' -----------------------------------------------------------------------
250 sub wObjektSelektieren ( xStart%, yStart%, xEnde%, yEnde% )
251 ' Call gMouseClick(90,90)
252 Call hToolbarSelect("DRAWING",true)
254 Select Case gApplication
256 Kontext "DocumentWriter"
257 DocumentWriter.MouseDown xStart%, yStart%
258 DocumentWriter.MouseMove xEnde%, yEnde%
259 DocumentWriter.MouseUp xEnde%, yEnde%
260 Case "MASTERDOCUMENT"
261 Kontext "DocumentMasterDoc"
262 DocumentMasterDoc.MouseDown xStart%, yStart%
263 DocumentMasterDoc.MouseMove xEnde%, yEnde%
264 DocumentMasterDoc.MouseUp xEnde%, yEnde%
269 ' -----------------------------------------------------------------------
271 sub wFindSelectObjectBelow ( xStart%, yStart%, xEnde%, yEnde% )
273 Select Case gApplication
275 Kontext "DocumentWriter"
276 DocumentWriter.MouseMove xStart%, yStart%
277 DocumentWriter.MouseDown xStart%, yStart%
278 DocumentWriter.MouseUp xStart%, yStart%
280 do while (Mousepointer<>"Normalpointer")
281 DocumentWriter.MouseMove xEnde%, yEnde%
282 DocumentWriter.MouseDown xEnde%, yEnde%
283 DocumentWriter.MouseUp
287 while ((getMouseStyle = 0) AND (i<80))
290 printlog getMouseStyle
291 if (getMouseStyle <> 0) then i = 80
294 Case "MASTERDOCUMENT"
295 Kontext "DocumentMasterDoc"
296 DocumentMasterDoc.MouseDown xStart%, yStart%
297 DocumentMasterDoc.MouseMove xEnde%, yEnde%
298 DocumentMasterDoc.MouseUp xEnde%, yEnde%
303 ' -----------------------------------------------------------------------
305 function WortAusWoerterbuchLoeschen ( Aufnahme$ ) as Boolean
306 Dim i as integer : Dim AnzahlBuecher as string
310 Call hToolsOptions("LanguageSettings","WritingAids")
311 WortAusWoerterbuchLoeschen = FALSE
312 for j = 1 to Benutzerwoerterbuch.GetItemCount
317 Benutzerwoerterbuch.Select j
320 Kontext "BenutzerwoerterbuchBearbeiten"
321 AnzahlBuecher = Buch.GetItemCount
323 for i= 1 to AnzahlBuecher
325 printlog " - search word in module: " + Buch.GetSelText
326 Kontext "BenutzerwoerterbuchBearbeiten"
327 Inhalt.SetText Aufnahme$
329 if Entfernen.IsEnabled then
331 WortAusWoerterbuchLoeschen = TRUE
332 i = AnzahlBuecher + 1
335 if WortAusWoerterbuchLoeschen = FALSE then Warnlog "The added word has not been found in modules"
336 BenutzerwoerterbuchBearbeiten.Close
337 Kontext "ExtrasOptionenDlg"
341 ' -----------------------------------------------------------------------
343 function wIgnorierenlisteLoeschen
344 Dim i as integer : Dim j as integer : Dim AlleBuecher as integer
347 Call hToolsOptions("LANGUAGESETTINGS","WRITINGAIDS")
349 for j = 1 to Benutzerwoerterbuch.GetItemCount
354 Benutzerwoerterbuch.Select j
357 Kontext "BenutzerwoerterbuchBearbeiten"
359 AlleBuecher = Buch.GetItemCount
360 for i = 1 to AlleBuecher
362 if Left$(Buch.GetSelText,13)="IgnoreAllList" then
365 if Loeschen.IsEnabled then
370 if Active.Exists then
371 Warnlog Active.Gettext
374 Kontext "BenutzerwoerterbuchBearbeiten"
375 BenutzerwoerterbuchBearbeiten.Cancel
384 Kontext "ExtrasOptionenDlg"
388 ' -----------------------------------------------------------------------
390 sub hLeisteUmschalten(welche as integer)
395 Kontext "NumObjectbar"
396 NumObjectbar.SetNextToolbox
400 if gApplication = "HTML" then
401 Kontext "TextObjectbar"
403 Kontext "TextObjectbar"
407 Fett.Click ' Sonst sind Comboboxen fÈr Testtool nicht sichtbar
411 Warnlog "Error on switching the function bar!"
416 Select Case gApplication
417 ' Numbering-Objectbar
419 Kontext "TextObjectbar"
421 TextObjectbar.SetNextToolbox
426 Kontext "TextObjectbar"
428 TextObjectbar.SetNextToolbox
433 Kontext "NumObjectbar"
440 Warnlog "Error on switching the function bar!"
447 ' -----------------------------------------------------------------------
449 sub hGrafikleisteUmschalten(welche as integer)
453 Kontext "GraphicObjectbar"
455 GraphicObjectbar.SetNextToolBox
458 Kontext "FrameObjectbar"
463 Kontext "FrameObjectbar"
465 FrameObjectbar.SetNextToolBox
468 Kontext "GraphicObjectbar"
473 ' -----------------------------------------------------------------------
475 sub wEinfuegenHyperlink(welcheSeite as integer)
477 Auswahl.MouseDown 2,2
480 Auswahl.TypeKeys "<Down>",1
482 Auswahl.TypeKeys "<Up>",4
485 Select case welcheSeite
487 Kontext "TabHyperlinkInternet"
490 Auswahl.TypeKeys "<Down>",1
491 Kontext "TabHyperlinkMailUndNews"
494 Auswahl.TypeKeys "<Down>",2
495 Kontext "TabHyperlinkDokument"
498 Auswahl.TypeKeys "<Down>",3
499 Kontext "TabHyperlinkNeuesDokument"
504 ' -----------------------------------------------------------------------
506 sub wNavigatorAuswahl(Gruppe as integer, Eintrag as integer,optional LeaveFocus as boolean)
507 dim j as integer, WelcherEintrag as integer
508 Dim MinEntrys as integer
510 If IsMissing(LeaveFocus) = True then LeaveFocus = False
512 Select Case Ucase(gApplication)
514 Kontext "NavigatorCalc"
515 if NavigatorCalc.NotExists then ViewNavigator
517 Kontext "NavigatorCalc"
519 Case "WRITER", "HTML", "HTML"
520 Kontext "NavigatorWriter"
521 if NavigatorWriter.NotExists then ViewNavigator
523 Kontext "NavigatorWriter"
525 Case "MASTERDOCUMENT"
526 Kontext "NavigatorGlobalDoc"
527 if NavigatorGlobalDoc.NotExists then ViewNavigator
529 Kontext "NavigatorGlobalDoc"
530 if Liste.IsVisible then
531 Kontext "GlobaldokumentToolbox"
533 Kontext "NavigatorWriter"
536 Case Else ' for all others!!!!
537 Warnlog "Not supported application!"
543 Select Case Ucase(gApplication)
545 if (Liste.GetItemCount < MinEntrys) then Umschalten.Click
546 if Liste.GetItemCount >MinEntrys then
555 WelcherEintrag = Gruppe + Eintrag
557 Liste.Select WelcherEintrag
558 Liste.TypeKeys "<Return>"
561 Case "WRITER","HTML", "HTML"
562 if (Auswahlliste.GetItemCount < MinEntrys) then
568 if Auswahlliste.GetItemCount >MinEntrys then
570 Auswahlliste.Select j
571 Auswahlliste.TypeKeys "-"
575 Auswahlliste.Select Gruppe
577 WelcherEintrag = Gruppe + Eintrag
578 Auswahlliste.TypeKeys "+"
579 Auswahlliste.Select WelcherEintrag
580 Auswahlliste.TypeKeys "<Return>"
583 Case "MASTERDOCUMENT"
584 if Liste.IsVisible = True then
588 if Auswahlliste.GetItemCount >MinEntrys then
590 Auswahlliste.Select j
591 Auswahlliste.TypeKeys "-"
595 Auswahlliste.Select Gruppe
597 WelcherEintrag = Gruppe + Eintrag
598 Auswahlliste.TypeKeys "+"
599 Auswahlliste.Select WelcherEintrag
600 Auswahlliste.TypeKeys "<Return>"
604 if LeaveFocus = False then
605 Select Case Ucase(gApplication)
607 Kontext "DocumentCalc"
609 Kontext "DocumentWriter"
611 Kontext "DocumentWriter"
612 Case "MASTERDOCUMENT"
613 Kontext "DocumentMasterDoc"
618 ' ---------------------------------------------------------------
620 function wNavigatorClose
623 if Navigator.Exists(2) then
629 ' ---------------------------------------------------------------
632 Dim i as integer : Dim j as integer
633 '/// Remove all Text, Drawing-objects or Objects from document ///
634 Call wTypeKeys "<PageUp><Home>"
635 Call wTypeKeys "<Backspace>",5
636 DocumentWriter.MouseDown ( 30,30 )
637 DocumentWriter.MouseMove ( 75,60 )
639 DocumentWriter.MouseUp ( 75, 60 )
641 Call wTypeKeys "<Delete>"
644 Kontext "NavigatorWriter"
645 if Not NavigatorWriter.Exists then ViewNavigator
648 Kontext "NavigatorWriter"
649 if Auswahlliste.GetItemCount <11 then Inhaltsansicht.Click ' Grundzustand
651 if Auswahlliste.GetItemCount >11 then
653 Auswahlliste.Select j
654 Auswahlliste.TypeKeys "-"
659 Auswahlliste.Select i
660 Auswahlliste.TypeKeys "+"
661 if Auswahlliste.GetItemCount > 11 then
662 for j = 1 to 5 ' maximal 5 Elemente in einer Gruppe
663 Auswahlliste.TypeKeys "<Down>"
664 Auswahlliste.TypeKeys "<Delete>"
666 if Auswahlliste.GetItemCount > 11 then Auswahlliste.Select i
670 if j= 5 then Warnlog "Try another way to clear page !"
681 Call wTypeKeys "<Mod1 A>"
684 Call wTypeKeys "<Delete>"
685 DocumentWriter.MouseDown ( 50,10 )
686 DocumentWriter.MouseUp ( 50,10 )
688 Call wTypeKeys "<Home><PageUp>"
692 ' ---------------------------------------------------------------
694 sub wMarkObjects(delete as boolean)
695 ' The drawing objects has to be selected before deleting them
696 Select Case gApplication
698 Kontext "DocumentWriter"
699 Case "MASTERDOCUMENT"
700 Kontext "DocumentMasterDoc"
702 Kontext "DocumentWriterWeb"
705 Call gMouseClick 50,50
706 Call wTypeKeys "<PageUp><Home>"
707 Call wTypeKeys "<Backspace>",5
708 Call gMouseClick 50,50
709 Select Case gApplication
711 DocumentWriter.TypeKeys "<Shift F4>"
713 Case "MASTERDOCUMENT"
714 DocumentMasterDoc.TypeKeys "<Shift F4>"
717 DocumentWriterWeb.TypeKeys "<Shift F4>"
721 if delete = TRUE then
722 Call wTypeKeys "<Delete>"
727 ' -----------------------------------------------------------------------
729 sub hExportUmstellung ( WasDenn as Boolean )
730 if Ucase(gApplication) = "HTML" then
732 Call hToolsOptions("LoadSave","HTMLCompatibility")
733 if WasDenn = TRUE then
734 'Select Case iSprache
735 ' Case 81 : Export.Select "Microsoft Internet Explorer 4.0"
736 ' Case else : Export.Select "MS Internet Explorer 4.0"
739 Export.Select "Microsoft Internet Explorer"
741 Warnlog "Unable to choose browser for export !"
744 Export.Select "Netscape Navigator"
746 Kontext "ExtrasOptionenDlg"
751 ' -----------------------------------------------------------------------
753 sub wSetMacroSecurityLevel ( wLevel as integer ) as boolean
755 Call hToolsOptions("StarOffice","Security")
756 wSetMacroSecurityLevel = False
760 Warnlog "Unable to set macro security level (Button 'Macro Security' not found)"
765 Active.SetPage TabSecurityLevel
766 Kontext "TabSecurityLevel"
769 Case 1: VeryHigh.Check
773 Case else: Warnlog "Wrong level number entered. Unknown"
777 wSetMacroSecurityLevel = True
780 Kontext "ExtrasOptionenDlg"
785 ' -----------------------------------------------------------------------
790 Active.SetPage TabType
796 ' -----------------------------------------------------------------------
798 sub wRectangleToClipboard
799 Dim tempApplication as string
800 tempApplication = gApplication
801 gApplication = "DRAW"
803 Call hRechteckErstellen ( 45, 45, 60, 60 )
804 ' select the drawn object
808 warnlog "Unable to select object. Maybe not drawn!"
810 ' copy the selected object
814 Warnlog "Unable to copy object. Maybe not selected!"
818 gApplication = tempApplication
819 Select Case gApplication
821 Kontext "DocumentWriter"
822 Case "MASTERDOCUMENT"
823 Kontext "DocumentMasterDoc"
825 Call gMouseClick 10,10
828 ' -----------------------------------------------------------------------
830 sub wRectangleToClipboardHTML
831 gApplication = "DRAW"
833 Call hRechteckErstellen ( 45, 45, 60, 60 )
837 gApplication = "HTML"
838 Kontext "DocumentWriterWeb"
842 ' -----------------------------------------------------------------------
844 function MachMirDenEintrag(WoDenn as integer,WieLang as integer, optional Welches as string)
845 Call wTypeKeys "<Home>"
846 Call wTypeKeys "<Down>",WoDenn
847 Call wTypeKeys "<Mod1 Shift Right>" , WieLang
848 Kontext "VerzeichniseintragEinfuegen"
851 case "Inhalt" : Verzeichnis.Select 1
852 case "Stich" : Verzeichnis.Select 2
853 case "Benutz" : Verzeichnis.Select 3
856 Verzeichniseintrag.TypeKeys "<Up>"
861 ' -----------------------------------------------------------------------
863 sub wOptionsUndo ( sOption$ )
865 Dim sTempSeparator as string
866 Dim sTempUnit as integer
868 Printlog " - Initial state"
872 Kontext "ExtrasOptionenDlg"
873 if Not ExtrasOptionenDlg.Exists then
877 Call hToolsOptions("WRITER","General")
878 if Instr(Tabulatorenabstand.Gettext, ",") then
883 sTempUnit = Masseinheit.GetSelIndex
885 if sOption$ = "Laden" OR sOption$ = "All" then
891 Select Case sTempUnit
893 Tabulatorenabstand.Settext "12" & sTempSeparator & "51"
895 Tabulatorenabstand.Settext "1" & sTempSeparator & "25"
897 Tabulatorenabstand.Settext "0" & sTempSeparator & "49"
899 Tabulatorenabstand.Settext "2" & sTempSeparator & "95"
901 Tabulatorenabstand.Settext "35" & sTempSeparator & "5"
905 Call hToolsOptions("WRITER","View")
906 if sOption$ = "Inhalte" OR sOption$ = "All" then
910 GrosseHandles.Uncheck
912 HorizontaleBildlaufleiste.Check
913 VertikaleBildlaufleiste.Check
915 HorizontalesLineal.Check
916 VertikalesLineal.Check
917 WeichesScrollen.Uncheck
919 GrafikenUndObjekte.Check
926 if sOption$ = "Cursor" OR sOption$ = "All" then
927 Call hToolsOptions("WRITER","FormattingAids")
932 GeschLeerzeichen.Check
935 VersteckterText.Uncheck
936 VersteckteAbsatze.Check
939 Absatzausrichtung.Check
940 'Cursor in protected areas
944 if sOption$ = "Raster" OR sOption$ = "All" then
945 Call hToolsOptions("WRITER","Grid")
947 FangrasterBenutzen.Uncheck
948 RasterSichtbar.Uncheck
950 AchsenSynchronisieren.Uncheck
951 Select Case sTempUnit
953 RasterAufloesungXAchse.SetText "10" & sTempSeparator & "00"
954 RasterAufloesungYAchse.SetText "10" & sTempSeparator & "00"
956 RasterAufloesungXAchse.SetText "1" & sTempSeparator & "00"
957 RasterAufloesungYAchse.SetText "1" & sTempSeparator & "00"
959 RasterAufloesungXAchse.SetText "0" & sTempSeparator & "39"
960 RasterAufloesungYAchse.SetText "0" & sTempSeparator & "39"
962 RasterAufloesungXAchse.SetText "2" & sTempSeparator & "36"
963 RasterAufloesungYAchse.SetText "2" & sTempSeparator & "36"
965 RasterAufloesungXAchse.SetText "28" & sTempSeparator & "3"
966 RasterAufloesungYAchse.SetText "28" & sTempSeparator & "3"
968 RasterUnterteilungXAchse.ToMin
969 RasterUnterteilungXAchse.More 1
970 RasterUnterteilungYAchse.ToMin
971 RasterUnterteilungYAchse.More 1
974 if sOption$ = "Grundschriften" OR sOption$ = "All" then
975 Call hToolsOptions("WRITER","BasicFonts")
977 AktuellesDokument.Uncheck
980 if sOption$ = "Drucken" OR sOption$ = "All" then
981 Call hToolsOptions("WRITER","Print")
988 SchwarzDrucken.Uncheck
997 EinzelneDruckauftraege.Uncheck
998 AusDruckereinstellung.Uncheck
1002 if sOption$ = "Tabelle" OR sOption$ = "All" then
1003 Call hToolsOptions("WRITER","Table")
1007 NichtTrennen.Uncheck
1010 AutomatischeZahlenerkennung.Check
1011 Zahlenformaterkennung.Check
1012 AutomatischeAusrichtung.Check
1013 AutomatischeZahlenerkennung.UnCheck
1015 Select Case sTempUnit
1017 VerschiebenZeile.SetText "4" & sTempSeparator & "99"
1018 VerschiebenSpalte.SetText "4" & sTempSeparator & "99"
1019 EinfuegenZeile.SetText "4" & sTempSeparator & "99"
1020 EinfuegenSpalte.SetText "24" & sTempSeparator & "99"
1021 Case 2: ' Centimeter
1022 VerschiebenZeile.SetText "0" & sTempSeparator & "50"
1023 VerschiebenSpalte.SetText "0" & sTempSeparator & "50"
1024 EinfuegenZeile.SetText "0" & sTempSeparator & "50"
1025 EinfuegenSpalte.SetText "2" & sTempSeparator & "50"
1027 VerschiebenZeile.SetText "0" & sTempSeparator & "20"
1028 VerschiebenSpalte.SetText "0" & sTempSeparator & "20"
1029 EinfuegenZeile.SetText "0" & sTempSeparator & "20"
1030 EinfuegenSpalte.SetText "0" & sTempSeparator & "98"
1032 VerschiebenZeile.SetText "1" & sTempSeparator & "18"
1033 VerschiebenSpalte.SetText "1" & sTempSeparator & "18"
1034 EinfuegenZeile.SetText "1" & sTempSeparator & "18"
1035 EinfuegenSpalte.SetText "5" & sTempSeparator & "90"
1037 VerschiebenZeile.SetText "14" & sTempSeparator & "2"
1038 VerschiebenSpalte.SetText "14" & sTempSeparator & "2"
1039 EinfuegenZeile.SetText "14" & sTempSeparator & "2"
1040 EinfuegenSpalte.SetText "70" & sTempSeparator & "9"
1043 ' Behaviour of rows/columns
1047 if sOption$ = "Aenderung" OR sOption$ = "All" then
1048 Call hToolsOptions("WRITER","Changes")
1050 EinfuegenAttribute.Select 4
1051 EinfuegenFarbe.Select 2
1052 LoeschenAttribute.Select 4
1053 LoeschenFarbe.Select 2
1054 AendernAttribute.Select 2
1055 AendernFarbe.Select 2
1057 Zeilenmarkierung.Select 2
1058 Zeilenfarbe.Select 1
1061 if sOption$ = "AutoCaption" OR sOption$ = "All" then
1062 Call hToolsOptions("WRITER","Autocaption")
1063 for i = 1 to ObjectList.GetItemCount
1069 Kontext "ExtrasOptionenDlg"
1070 ExtrasOptionenDlg.OK
1075 ' -----------------------------------------------------------------------
1077 function wInsertDocumentinMasterDoc(DocumentName as string) as boolean
1079 Call hFileOpen(DocumentName)
1081 Call wTypeKeys "<Mod1 A>"
1085 wInsertDocumentinMasterDoc = True
1088 ' -----------------------------------------------------------------------
1090 function CheckForFilters() as boolean
1091 Kontext "GraphicFilterBar"
1092 if not GraphicFilterBar.Exists then
1093 Warnlog "- Toolbox has been closed!"
1094 Kontext "GraphicObjectbar"
1095 if Filter.IsEnabled then
1096 GraphicObjectbar.TearOff Filter
1097 Kontext "GraphicFilterBar"
1098 GraphicFilterBar.Move ( 20, 20 )
1099 CheckForFilters = True
1101 Warnlog "- Though graphic is selected, the filter button in objectbar is disabled!"
1102 Select Case gApplication
1104 Kontext "DocumentWriter"
1105 DocumentWriter.MouseDoubleClick 10,10
1106 DocumentWriter.MouseDown 50,20
1107 DocumentWriter.MouseUp 50,20
1109 Kontext "DocumentMasterDoc"
1110 DocumentMasterDoc.MouseDoubleClick 10,10
1111 DocumentMasterDoc.MouseDown 50,20
1112 DocumentMasterDoc.MouseUp 50,20
1115 Kontext "GraphicObjectbar"
1116 if Filter.IsEnabled then
1117 GraphicObjectbar.TearOff Filter
1118 Kontext "GraphicFilterBar"
1119 GraphicFilterBar.Move ( 20, 20 )
1120 CheckForFilters = True
1122 Warnlog "- Reselecting the graphic didn't enable the button in the toolbar! No further test!"
1123 CheckForFilters = False
1127 CheckForFilters=True
1129 Kontext "GraphicFilterBar"
1132 ' -----------------------------------------------------------------------
1134 sub hInsertFloatingFrame
1138 Kontext "TabEigenschaften"
1139 FrameName.SetText "Hallo"
1142 Kontext "OeffnenDlg"
1143 if OeffnenDlg.Exists(2) then OeffnenDlg.Cancel
1146 ' -----------------------------------------------------------------------
1148 function wStyleCreate( sStyleName as string, sType as string, optional NotFromSelection as boolean ) as boolean
1149 '/// This function creates a new style through stylist
1152 If Not Stylist.Exists then FormatStylist
1155 case "Paragraph": Absatzvorlagen.Click
1156 case "Character": Zeichenvorlagen.Click
1157 case "Frame": Rahmenvorlagen.Click
1158 case "Page": Seitenvorlagen.Click
1159 case "Numbering": Numerierungsvorlagen.Click
1162 if IsMissing ( NotFromSelection ) then
1164 AusSelektion.OpenMenu
1166 Call hMenuSelectNr(1)
1169 Kontext "VorlageErzeugen"
1170 Vorlagenname.Settext sStyleName
1173 if NotFromSelection = true then
1174 VorlagenListe.TypeKeys "<Mod1 End>"
1175 Vorlagenliste.TypeKeys "<Mod1 Home>"
1176 Vorlagenliste.OpenContextMenu
1178 Call hMenuSelectNr(1)
1181 Active.SetPage TabVerwalten
1183 Kontext "TabVerwalten"
1184 VorlagenName.SetText sStyleName
1192 if wStyleSelect ( sStyleName, sType ) = true then
1193 wStyleCreate = False
1200 ' -----------------------------------------------------------------------
1202 function wStyleSelect( sStyleName as string, optional sType as string ) as boolean
1203 '/// This function selects a given style in Stylist
1204 '/// function leaves Stylist opened
1209 If Not Stylist.Exists then FormatStylist
1212 Gruppenliste.Select 2 '-> 'All Styles' has to be selected
1214 if IsMissing (sType) then
1215 Absatzvorlagen.Click
1218 case "Paragraph": Absatzvorlagen.Click
1219 case "Character": Zeichenvorlagen.Click
1220 case "Frame": Rahmenvorlagen.Click
1221 case "Page": Seitenvorlagen.Click
1222 case "Numbering": Numerierungsvorlagen.Click
1227 Vorlagenliste.Select 1
1229 if Vorlagenliste.GetSelText <> sStyleName then
1231 if Vorlagenliste.GetSelText = sStyleName then
1235 Vorlagenliste.TypeKeys "<Down>"
1238 if i = 202 then wStyleSelect = true
1245 ' -----------------------------------------------------------------------
1247 function wStyleDelete ( sStyleName as string, sType as string ) as boolean
1248 '/// This function selects a given style in Stylist
1249 '/// function leaves Stylist opened
1254 If Not Stylist.Exists then FormatStylist
1257 case "Paragraph": Absatzvorlagen.Click
1258 case "Character": Zeichenvorlagen.Click
1259 case "Frame": Rahmenvorlagen.Click
1260 case "Page": Seitenvorlagen.Click
1261 case "Numbering": Numerierungsvorlagen.Click
1264 Vorlagenliste.TypeKeys "<Mod1 End>"
1265 Vorlagenliste.TypeKeys "<Mod1 Home>"
1266 if Vorlagenliste.GetSelText <> sStyleName then
1268 if Vorlagenliste.GetSelText = sStyleName then
1269 Vorlagenliste.OpenContextMenu
1271 Call hMenuSelectNr(3)
1274 if Active.Exists then
1275 if Active.GetRT = 304 then
1281 Vorlagenliste.TypeKeys "<Down>"
1284 if i = 204 then wStyleDelete = true
1286 Vorlagenliste.OpenContextMenu
1288 Call hMenuSelectNr(3)
1291 if Active.Exists then
1292 if Active.GetRT = 304 then
1301 ' -----------------------------------------------------------------------
1303 function wStyleSet( sStyleName as string, optional sType as string ) as boolean
1304 '/// This function sets a given style in Stylist
1305 '/// function leaves Stylist opened
1310 If Not Stylist.Exists then FormatStylist
1313 Gruppenliste.Select 2 '-> 'All Styles' has to be selected
1315 if IsMissing (sType) then
1316 Absatzvorlagen.Click
1319 case "Paragraph": Absatzvorlagen.Click
1320 case "Character": Zeichenvorlagen.Click
1321 case "Frame": Rahmenvorlagen.Click
1322 case "Page": Seitenvorlagen.Click
1323 case "Numbering": Numerierungsvorlagen.Click
1328 Vorlagenliste.Select 1
1330 if Vorlagenliste.GetSelText <> sStyleName then
1332 if Vorlagenliste.GetSelText = sStyleName then
1334 Vorlagenliste.TypeKeys "<Return>"
1337 Vorlagenliste.TypeKeys "<Down>"
1346 ' -----------------------------------------------------------------------
1348 function wStyleGet( sStyleName as string, optional sType as string ) as boolean
1349 '/// This function checks if a given style is selected in Stylist
1350 '/// function leaves Stylist opened
1355 If Not Stylist.Exists then FormatStylist
1358 Gruppenliste.Select 2 '-> 'All Styles' has to be selected
1360 if IsMissing (sType) then
1361 Absatzvorlagen.Click
1364 case "Paragraph": Absatzvorlagen.Click
1365 case "Character": Zeichenvorlagen.Click
1366 case "Frame": Rahmenvorlagen.Click
1367 case "Page": Seitenvorlagen.Click
1368 case "Numbering": Numerierungsvorlagen.Click
1373 if Vorlagenliste.GetSelText = sStyleName then