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: tools1.inc,v $
13 '* last change: $Author: vg $ $Date: 2008-08-18 12:38:22 $
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 : Tools for writer/Optional - 1
38 '************************************************************************
43 ' #0 fFormatPageWriter
47 ' #0 fFormatStylesCatalog
49 ' #0 fInsertFieldsOther
51 ' #0 fToolsAutocorrect
53 '\***********************************************************************
56 'This routine is executing file/properties , then tabpage Options
57 '*****************************************************************
58 function fFileProperties(Options as string)
64 case "TabDokument" : active.SetPage TabDokument
65 case "TabBeschreibung" : active.SetPage TabBeschreibung
66 case "TabBenutzer" : active.SetPage TabBenutzer
67 case "TabInternet" : active.SetPage TabInternet
68 case "TabStatistik" : active.SetPage TabStatistik
77 '*****************************************************************
78 'This routine is executing format/graphic , then tabpage Options
79 '*****************************************************************
80 function fFormatGraphic(Options as string) as boolean
81 Dim j as integer, sSlotOK as boolean
87 warnlog "Unable to execute Format / Graphics"
91 if sSlotOK = true then
93 case "TabType" : active.SetPage TabType
94 case "TabZusaetze" : active.SetPage TabZusaetze
95 case "TabUmlauf" : active.SetPage TabUmlauf
96 case "TabHyperlinkRahmen" : active.SetPage TabHyperlinkRahmen
97 case "TabGrafik" : active.SetPage TabGrafik
98 case "TabZuschneiden" : active.SetPage TabZuschneiden
99 case "TabUmrandung" : active.SetPage TabUmrandung
100 case "TabHintergrund" : active.SetPage TabHintergrund
102 active.SetPage TabMakro
103 ' if no JRE is installed a messagebox appears
107 if Active.Exists then
108 if Active.GetRT = 304 then
109 if j = 1 then Warnlog Active.Gettext
122 fFormatGraphic = sSlotOK
127 '*****************************************************************
128 'This routine is executing format/frame , then tabpage Options
129 '****************************************************************
130 function fFormatFrame(Options as string)
137 case "TabType" : active.SetPage TabType
138 case "TabZusaetze" : active.SetPage TabZusaetze
139 case "TabUmlauf" : active.SetPage TabUmlauf
140 case "TabHyperlinkRahmen" : active.SetPage TabHyperlinkRahmen
141 case "TabUmrandung" : active.SetPage TabUmrandung
142 case "TabHintergrund" : active.SetPage TabHintergrund
143 case "TabSpalten" : active.SetPage TabSpalten
144 case "TabMakro" : active.SetPage TabMakro
152 '*************************************************************************
153 'This routine is executing format/page in writer , then tabpage Options
154 '*************************************************************************
155 function fFormatPageWriter(Options as string)
161 case "TabVerwalten" : active.SetPage TabVerwalten
162 case "TabSeite" : active.SetPage TabSeite
163 case "TabHintergrund" : active.SetPage TabHintergrund
164 case "TabKopfzeile" : active.SetPage TabKopfzeile
165 case "TabFusszeile" : active.SetPage TabFusszeile
166 case "TabUmrandung" : active.SetPage TabUmrandung
167 case "TabSpalten" : active.SetPage TabSpalten
168 case "TabFussnote" : active.SetPage TabFussnote
169 case "TabGrid" : active.SetPage TabGrid
177 '*************************************************************************
178 'This routine is executing format/paragraph in writer , then tabpage Options
179 '*************************************************************************
180 function fFormatParagraph(Options as string)
186 case "TabEinzuegeUndAbstaende" : active.SetPage TabEinzuegeUndAbstaende
187 case "TabAusrichtungAbsatz" : active.SetPage TabAusrichtungAbsatz
188 case "TabTextfluss" : active.SetPage TabTextfluss
189 case "TabAsianTypography" : active.SetPage TabAsianTypography
190 case "TabNumerierungAbsatz" : active.SetPage TabNumerierungAbsatz
191 case "TabTabulatoren" : active.SetPage TabTabulatoren
192 case "TabInitialen" : active.SetPage TabInitialen
193 case "TabUmrandung" : active.SetPage TabUmrandung
194 case "TabHintergrund" : active.SetPage TabHintergrund
202 '*************************************************************************
203 'This routine is executing format/character in writer , then tabpage Options
204 '*************************************************************************
205 function fFormatCharacter(Options as string)
211 case "TabFont" : active.SetPage TabFont
212 case "TabFontEffects" : active.SetPage TabFontEffects
213 case "TabFontPosition" : active.SetPage TabFontPosition
214 case "TabAsianLayout" : active.SetPage TabAsianLayout
215 case "TabHyperlinkZeichen" : active.SetPage TabHyperlinkZeichen
216 case "TabHintergrund" : active.SetPage TabHintergrund
225 '*************************************************************************
226 'This routine is executing format/table in writer , then tabpage Options
227 '*************************************************************************
228 function fFormatTable(Options as string)
234 case "TabTabelle" : active.SetPage TabTabelle
235 case "TabTextflussTabelle" : active.SetPage TabTextflussTabelle
236 case "TabSpaltenTabelle" : active.SetPage TabSpaltenTabelle
237 case "TabUmrandung" : active.SetPage TabUmrandung
238 case "TabHintergrund" : active.SetPage TabHintergrund
246 '*************************************************************************
247 'This routine is executing Format/Styles / Catalog in writer , then tabpage Options
248 '*************************************************************************
249 function fFormatStylesCatalog(Options as string)
252 Kontext "VorlagenKatalog"
255 case "Paragraph" : Vorlagen.Select 1
256 case "Character" : Vorlagen.Select 2
257 case "Frame" : Vorlagen.Select 3
258 case "Page" : Vorlagen.Select 4
259 case "Numbering" : Vorlagen.Select 5
265 '******************************************************************************
266 'This routine is executing insert/fields/other in writer , then tabpage Options
267 '*******************************************************************************
268 function fInsertFieldsOther(Options as string)
274 case "TabDokumentFeldbefehle" : active.SetPage TabDokumentFeldbefehle
275 case "TabReferenzen" : active.SetPage TabReferenzen
276 case "TabFunktionen" : active.SetPage TabFunktionen
277 case "TabDokumentinfoFeldbefehle" : active.SetPage TabDokumentinfoFeldbefehle
278 case "TabVariablen" : active.SetPage TabVariablen
279 case "TabDatenbank" : active.SetPage TabDatenbank
287 '******************************************************
288 '* insert a section with tabpage Options **
289 '******************************************************
290 function fInsertSection(Options as string)
297 case "TabBereiche" : active.SetPage TabBereiche
298 case "TabSpalten" : active.SetPage TabSpalten
299 case "TabSectionIndent" : active.SetPage TabSectionIndent
300 case "TabHintergrund" : active.SetPage TabHintergrund
301 case "TabFussEndnoten" : active.SetPage TabFussEndnoten
310 '*************************************************************************
311 'This routine is executing Tools/AutoCorrect in writer , then tabpage Options
312 '*************************************************************************
313 function fToolsAutocorrect(Options as string)
319 case "TabErsetzung" : active.SetPage TabErsetzung
320 case "TabAusnahmen" : active.SetPage TabAusnahmen
321 case "TabOptionenAutokorrektur" : active.SetPage TabOptionenAutokorrektur
322 case "TabTypografisch" : active.SetPage TabTypografisch
323 case "TabWortergaenzung" : active.SetPage TabWortergaenzung
331 '******************************************************
332 '* Open Format/Position and Size diglog with Options **
333 '******************************************************
334 function fPositionAndSize(Options as string)
337 FormatPositionAndSize
340 case "TabPositionAndSizeWriter" : active.SetPage TabPositionAndSizeWriter
341 case "TabDrehung" : active.SetPage TabDrehung
342 case "TabSchraegstellen" : active.SetPage TabSchraegstellen