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_section_tools.inc,v $
13 '* last change: $Author: fredrikh $ $Date: 2008-06-18 15:03:58 $
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/functions for the Section-testing
38 '************************************************************************
46 ' #1 fCheckDirectCursor
49 '\***********************************************************************
51 '******************************************************
52 '* insert a section with name SectionName **
53 '******************************************************
54 function fInsertSection(SectionName as string)
58 Active.Setpage TabBereiche
60 Bereichsliste.Settext SectionName
65 '******************************************************
66 '* insert a bookmark with name **
67 '******************************************************
68 function fInsertBookmark(BookmarkName as string)
72 Kontext "TextmarkeEinfuegen"
73 Textmarken.SetText BookmarkName
79 '******************************************************
80 '* insert a footnote **
81 '******************************************************
82 function fInsertFootnote(Numbering as string , ConTentInCharater as String)
85 Kontext "FussnoteEinfuegen"
91 Case "automatic" : Automatisch.Check
92 Case "character" : Zeichen.Check
93 ZeichenText.SetText ConTentInCharater
94 Case else : Warnlog "Maybe new options! :-)"
103 '******************************************************
104 '* insert a endnote **
105 '******************************************************
106 function fInsertEndnote(Numbering as string , ConTentInCharater as String)
109 Kontext "FussnoteEinfuegen"
114 Select Case Numbering
115 Case "automatic" : Automatisch.Check
116 Case "character" : Zeichen.Check
117 ZeichenText.SetText ConTentInCharater
118 Case else : Warnlog "Maybe new options! :-)"
127 '******************************************************
128 '* insert a table with name TableName **
129 '* Column is table's column's number **
130 '* Row is table's row 's number **
131 '******************************************************
132 function fInsertTable(TableName as string, ColumnNumber as string, RowNumber as string)
136 Kontext "TabelleEinfuegenWriter"
137 TabellenName.SetText TableName
139 Spalten.SetText ColumnNumber
140 Zeilen.SetText RowNumber
142 TabelleEinfuegenWriter.OK
146 '*******************************************************
147 '* Close Navigator **
148 '*******************************************************
149 function fCloseNavigator
156 Warnlog "Could not close Navigator!"
161 '*******************************************************
162 '* Open options and check 'Direct-Cursor' in options **
163 '*******************************************************
164 function fCheckDirectCursor
167 Call hToolsOptions("WRITER","FormattingAids")
169 Kontext "ExtrasOptionenDlg"
175 '*********************************************************
176 '* This function is evaluated multisection **
177 '* selectString is the selected string in the text **
178 '* There must be more than 2 selectStrings in the text **
179 '*********************************************************
180 function fMultiSelection(selectedString as String)
184 Kontext "FindAndReplace"
186 SearchFor.SetText selectedString